diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml new file mode 100644 index 000000000..1cc8411c7 --- /dev/null +++ b/.github/workflows/build-and-deploy.yml @@ -0,0 +1,72 @@ +name: Build and Deploy to GitHub Pages + +on: + schedule: + - cron: '0 2 * * *' + push: + branches: + - 3.13 + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout Python repository + uses: actions/checkout@v4 + with: + repository: python/cpython + ref: 3.13 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + + - name: Setup virtual environment + run: make venv + working-directory: ./Doc + + - name: Checkout translation files + uses: actions/checkout@v4 + with: + path: Doc/locales/fa/LC_MESSAGES + + - name: Pull latest translations + run: git pull + working-directory: ./Doc/locales/fa/LC_MESSAGES + + - name: Setup problem matcher + uses: sphinx-doc/github-problem-matcher@v1.1 + + - name: Build documentation + run: make -e SPHINXOPTS="--color -D language='fa' -D gettext_allow_fuzzy_translations=1 -W --keep-going" html + working-directory: ./Doc + + - name: Setup Pages + uses: actions/configure-pages@v4 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: Doc/build/html + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..81059ed34 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,36 @@ +name: Lint Check + +on: + schedule: + - cron: '0 0 * * *' + push: + branches: + - '*' + pull_request: + branches: + - '*' + workflow_dispatch: + +jobs: + lint: + runs-on: ubuntu-latest + strategy: + fail-fast: false + continue-on-error: true + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + + - name: Install sphinx-lint + run: pip install sphinx-lint + + - name: Setup problem matcher + uses: rffontenelle/sphinx-lint-problem-matcher@v1.0.0 + + - name: Run sphinx-lint + run: sphinx-lint diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml.disabled similarity index 100% rename from .github/workflows/sync.yml rename to .github/workflows/sync.yml.disabled diff --git a/.github/workflows/update-lint-and-build.yml b/.github/workflows/update-lint-and-build.yml deleted file mode 100644 index 8ab0114e3..000000000 --- a/.github/workflows/update-lint-and-build.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Build and Lint Workflow - -on: - schedule: - - cron: '0 0 * * *' - push: - branches: - - '*' - workflow_dispatch: - -jobs: - lint: - runs-on: ubuntu-latest - strategy: - fail-fast: false - continue-on-error: true - steps: - - uses: actions/setup-python@master - with: - python-version: 3 - - run: pip install sphinx-lint - - uses: actions/checkout@master - - uses: rffontenelle/sphinx-lint-problem-matcher@v1.0.0 - - run: sphinx-lint - - build-translation: - runs-on: ubuntu-latest - strategy: - fail-fast: false - steps: - - uses: actions/setup-python@master - with: - python-version: 3 - - uses: actions/checkout@master - with: - repository: python/cpython - ref: 3.13 - - run: make venv - working-directory: ./Doc - - uses: actions/checkout@master - with: - path: Doc/locales/fa/LC_MESSAGES - - run: git pull - working-directory: ./Doc/locales/fa/LC_MESSAGES - - uses: sphinx-doc/github-problem-matcher@v1.1 - - run: make -e SPHINXOPTS="--color -D language='fa' -D gettext_allow_fuzzy_translations=1 -W --keep-going" html - working-directory: ./Doc - - uses: actions/upload-artifact@master - if: success() || failure() - with: - name: build-3.13-html - path: Doc/build/html \ No newline at end of file diff --git a/.github/workflows/update-translation-stats.yml b/.github/workflows/update-translation-stats.yml.disabled similarity index 100% rename from .github/workflows/update-translation-stats.yml rename to .github/workflows/update-translation-stats.yml.disabled diff --git a/GLOSSARY.md b/GLOSSARY.md index d5072e21d..48a2629fa 100644 --- a/GLOSSARY.md +++ b/GLOSSARY.md @@ -60,3 +60,14 @@ | namespace | نام‌فضا | | Tracking | پیگیری | | method | روش | +| parameter | پارامتر | +| iterator | تکرارگر | +| generator | مولد، تولیدگر | +| decorator | دکوراتور، آراینده | +| keyword | کلیدواژه | +| operator | عملگر | +| interpreter | مفسر | +| mutable | تغییرپذیر | +| immutable | تغییرناپذیر | +| callback | کال‌بک، فراخوانی بازگشتی | +| deprecated | منسوخ، از رده خارج شده | diff --git a/README.md b/README.md index 35c2c7b46..4c50ba719 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,6 @@ ### مشارکت‌های کاربران -![مشارکت‌های کاربران](reports/contributor_stats_2025_05_17.png) -(به‌روزرسانی: 2025-05-17) +![مشارکت‌های کاربران](reports/contributor_stats_2025_07_12.png) +(به‌روزرسانی: 2025-07-12) \ No newline at end of file diff --git a/RESOURCE.md b/RESOURCE.md index 9659d1ac8..2e2c9efda 100644 --- a/RESOURCE.md +++ b/RESOURCE.md @@ -3,33 +3,32 @@ | about.po | 100.0% | 100.0% | 0.0% | | bugs.po | 100.0% | 100.0% | 0.0% | | c-api/abstract.po | 100.0% | 100.0% | 0.0% | -| tutorial/index.po | 100.0% | 100.0% | 0.0% | -| c-api/allocation.po | 100.0% | 43.0% | 0.0% | -| tutorial/appendix.po | 100.0% | 10.3% | 0.0% | -| tutorial/classes.po | 98.9% | 10.1% | 0.0% | -| library/functions.po | 98.1% | 2.9% | 0.0% | +| tutorial/appendix.po | 100.0% | 100.0% | 0.0% | +| tutorial/index.po | 77.0% | 77.0% | 0.0% | +| tutorial/classes.po | 98.9% | 20.6% | 0.0% | +| tutorial/errors.po | 98.9% | 18.8% | 0.0% | +| c-api/allocation.po | 21.0% | 12.1% | 0.0% | +| library/functions.po | 98.1% | 6.9% | 0.0% | | c-api/dict.po | 1.0% | 0.6% | 0.0% | | library/json.po | 0.4% | 0.1% | 0.0% | | tutorial/appetite.po | 100.0% | 0.0% | 0.0% | | tutorial/datastructures.po | 100.0% | 0.0% | 0.0% | | tutorial/floatingpoint.po | 100.0% | 0.0% | 0.0% | -| tutorial/modules.po | 100.0% | 0.0% | 0.0% | | tutorial/whatnow.po | 100.0% | 0.0% | 0.0% | | tutorial/venv.po | 99.9% | 0.0% | 0.0% | -| tutorial/errors.po | 98.9% | 0.0% | 0.0% | -| tutorial/introduction.po | 98.7% | 0.0% | 0.0% | -| tutorial/controlflow.po | 98.2% | 0.0% | 0.0% | +| tutorial/modules.po | 98.3% | 0.0% | 0.0% | | tutorial/stdlib.po | 97.7% | 0.0% | 0.0% | +| tutorial/introduction.po | 97.5% | 0.0% | 0.0% | | tutorial/interpreter.po | 97.4% | 0.0% | 0.0% | +| tutorial/controlflow.po | 97.0% | 0.0% | 0.0% | | tutorial/inputoutput.po | 96.8% | 0.0% | 0.0% | | tutorial/stdlib2.po | 94.3% | 0.0% | 0.0% | -| library/stdtypes.po | 94.0% | 0.0% | 0.0% | +| library/stdtypes.po | 92.3% | 0.0% | 0.0% | | tutorial/interactive.po | 77.2% | 0.0% | 0.0% | | c-api/apiabiversion.po | 58.4% | 0.0% | 0.0% | -| extending/newtypes_tutorial.po | 6.3% | 0.0% | 0.0% | +| extending/newtypes_tutorial.po | 4.6% | 0.0% | 0.0% | | library/datetime.po | 3.3% | 0.0% | 0.0% | | library/pwd.po | 3.1% | 0.0% | 0.0% | -| c-api/exceptions.po | 2.9% | 0.0% | 0.0% | | c-api/utilities.po | 2.8% | 0.0% | 0.0% | | library/grp.po | 2.6% | 0.0% | 0.0% | | c-api/concrete.po | 2.2% | 0.0% | 0.0% | @@ -40,10 +39,11 @@ | library/zipimport.po | 1.9% | 0.0% | 0.0% | | library/tomllib.po | 1.9% | 0.0% | 0.0% | | library/internet.po | 1.8% | 0.0% | 0.0% | +| c-api/exceptions.po | 1.7% | 0.0% | 0.0% | | reference/toplevel_components.po | 1.6% | 0.0% | 0.0% | -| glossary.po | 1.5% | 0.0% | 0.0% | | c-api/method.po | 1.5% | 0.0% | 0.0% | | c-api/none.po | 1.5% | 0.0% | 0.0% | +| glossary.po | 1.4% | 0.0% | 0.0% | | c-api/bytearray.po | 1.3% | 0.0% | 0.0% | | library/array.po | 1.3% | 0.0% | 0.0% | | library/io.po | 1.3% | 0.0% | 0.0% | @@ -62,20 +62,21 @@ | howto/pyporting.po | 0.8% | 0.0% | 0.0% | | library/html_entities.po | 0.8% | 0.0% | 0.0% | | library/string.po | 0.8% | 0.0% | 0.0% | +| c-api/arg.po | 0.7% | 0.0% | 0.0% | | c-api/mapping.po | 0.7% | 0.0% | 0.0% | | c-api/memoryview.po | 0.7% | 0.0% | 0.0% | -| c-api/typeobj.po | 0.7% | 0.0% | 0.0% | | library/curses_ascii.po | 0.7% | 0.0% | 0.0% | | library/site.po | 0.7% | 0.0% | 0.0% | | library/types.po | 0.7% | 0.0% | 0.0% | -| reference/lexical_analysis.po | 0.7% | 0.0% | 0.0% | +| c-api/code.po | 0.6% | 0.0% | 0.0% | | c-api/init_config.po | 0.6% | 0.0% | 0.0% | +| c-api/typeobj.po | 0.6% | 0.0% | 0.0% | | library/asyncio-exceptions.po | 0.6% | 0.0% | 0.0% | | library/constants.po | 0.6% | 0.0% | 0.0% | | library/termios.po | 0.6% | 0.0% | 0.0% | | library/webbrowser.po | 0.6% | 0.0% | 0.0% | | reference/compound_stmts.po | 0.6% | 0.0% | 0.0% | -| c-api/code.po | 0.5% | 0.0% | 0.0% | +| reference/lexical_analysis.po | 0.6% | 0.0% | 0.0% | | c-api/complex.po | 0.5% | 0.0% | 0.0% | | c-api/sequence.po | 0.5% | 0.0% | 0.0% | | library/asyncio-api-index.po | 0.5% | 0.0% | 0.0% | @@ -117,12 +118,10 @@ | library/warnings.po | 0.3% | 0.0% | 0.0% | | reference/executionmodel.po | 0.3% | 0.0% | 0.0% | | c-api/time.po | 0.3% | 0.0% | 0.0% | -| c-api/capsule.po | 0.2% | 0.0% | 0.0% | | c-api/contextvars.po | 0.2% | 0.0% | 0.0% | | c-api/intro.po | 0.2% | 0.0% | 0.0% | | c-api/object.po | 0.2% | 0.0% | 0.0% | | c-api/refcounting.po | 0.2% | 0.0% | 0.0% | -| c-api/structures.po | 0.2% | 0.0% | 0.0% | | c-api/tuple.po | 0.2% | 0.0% | 0.0% | | c-api/type.po | 0.2% | 0.0% | 0.0% | | extending/newtypes.po | 0.2% | 0.0% | 0.0% | @@ -133,7 +132,6 @@ | howto/ipaddress.po | 0.2% | 0.0% | 0.0% | | howto/sorting.po | 0.2% | 0.0% | 0.0% | | howto/urllib2.po | 0.2% | 0.0% | 0.0% | -| library/__future__.po | 0.2% | 0.0% | 0.0% | | library/asyncio-subprocess.po | 0.2% | 0.0% | 0.0% | | library/cmath.po | 0.2% | 0.0% | 0.0% | | library/copy.po | 0.2% | 0.0% | 0.0% | @@ -159,10 +157,11 @@ | whatsnew/3_3.po | 0.2% | 0.0% | 0.0% | | library/asyncio-runner.po | 0.2% | 0.0% | 0.0% | | howto/timerfd.po | 0.2% | 0.0% | 0.0% | -| c-api/arg.po | 0.1% | 0.0% | 0.0% | | c-api/call.po | 0.1% | 0.0% | 0.0% | +| c-api/capsule.po | 0.1% | 0.0% | 0.0% | | c-api/long.po | 0.1% | 0.0% | 0.0% | | c-api/module.po | 0.1% | 0.0% | 0.0% | +| c-api/structures.po | 0.1% | 0.0% | 0.0% | | extending/embedding.po | 0.1% | 0.0% | 0.0% | | faq/extending.po | 0.1% | 0.0% | 0.0% | | faq/general.po | 0.1% | 0.0% | 0.0% | @@ -267,6 +266,9 @@ | whatsnew/3_13.po | 0.1% | 0.0% | 0.0% | | howto/free-threading-python.po | 0.1% | 0.0% | 0.0% | | library/annotationlib.po | 0.1% | 0.0% | 0.0% | +| c-api/lifecycle.po | 0.1% | 0.0% | 0.0% | +| library/compression_zstd.po | 0.1% | 0.0% | 0.0% | +| library/concurrent_interpreters.po | 0.1% | 0.0% | 0.0% | | contents.po | 0.0% | 0.0% | 0.0% | | c-api/bool.po | 0.0% | 0.0% | 0.0% | | c-api/cell.po | 0.0% | 0.0% | 0.0% | @@ -303,6 +305,7 @@ | howto/logging.po | 0.0% | 0.0% | 0.0% | | howto/unicode.po | 0.0% | 0.0% | 0.0% | | installing/index.po | 0.0% | 0.0% | 0.0% | +| library/__future__.po | 0.0% | 0.0% | 0.0% | | library/__main__.po | 0.0% | 0.0% | 0.0% | | library/allos.po | 0.0% | 0.0% | 0.0% | | library/archiving.po | 0.0% | 0.0% | 0.0% | @@ -515,3 +518,6 @@ | howto/remote_debugging.po | 0.0% | 0.0% | 0.0% | | library/asyncio-graph.po | 0.0% | 0.0% | 0.0% | | whatsnew/3_14.po | 0.0% | 0.0% | 0.0% | +| library/compression.po | 0.0% | 0.0% | 0.0% | +| c-api/extension-modules.po | 0.0% | 0.0% | 0.0% | +| deprecations/c-api-pending-removal-in-3_16.po | 0.0% | 0.0% | 0.0% | diff --git a/TEAM.md b/TEAM.md index 5d32a50d8..94f311cb2 100644 --- a/TEAM.md +++ b/TEAM.md @@ -1,17 +1,18 @@ | User | Role | Translated Count | Reviewed Count | Proofread Count | |:-----|:------:|:------------------:|:-------------------:|:----------------------:| -| Revisto | coordinator | 4027 | 28 | 0 | -| danialbehzadi | reviewer | 740 | 5 | 0 | -| Ramiz_222 | reviewer | 11 | 83 | 0 | -| Ariyan_Bolandi | reviewer | 41 | 7 | 0 | +| Revisto | coordinator | 3983 (+1) | 30 | 0 | +| danialbehzadi | reviewer | 677 | 5 | 0 | +| khosro_o | reviewer | 63 | 87 | 0 | +| Ramiz_222 | reviewer | 10 | 82 | 0 | | ParhamF | translator | 41 | 0 | 0 | -| khosro_o | reviewer | 19 (+2) | 22 (+6) | 0 | +| Ariyan_Bolandi | reviewer | 37 | 4 | 0 | | mdflx | reviewer | 1 | 30 | 0 | -| aimer.hs872 | reviewer | 9 | 18 | 0 | -| nikovinix7878 | translator | 14 | 0 | 0 | -| thaghgoo | translator | 13 (+1) | 0 | 0 | -| arfa79lg | translator | 7 | 0 | 0 | -| shahriaarrr | translator | 2 (+2) | 0 | 0 | +| aimer.hs872 | reviewer | 8 | 18 | 0 | +| nikovinix7878 | translator | 13 | 0 | 0 | +| thaghgoo | translator | 12 | 0 | 0 | +| arfa79lg | translator | 6 | 0 | 0 | +| naweex | translator | 2 | 0 | 0 | +| pangominn | translator | 2 | 0 | 0 | | ashykng | translator | 1 | 0 | 0 | | aryasadeghy | translator | 0 | 0 | 0 | | pouya.abbassi | translator | 0 | 0 | 0 | @@ -34,6 +35,7 @@ | revistology | translator | 0 | 0 | 0 | | revistola | translator | 0 | 0 | 0 | | shahabworks | translator | 0 | 0 | 0 | +| shahriaarrr | translator | 0 | 0 | 0 | | mohammadreza13842018 | translator | 0 | 0 | 0 | | mjavadf | translator | 0 | 0 | 0 | | ArminTM | translator | 0 | 0 | 0 | @@ -47,4 +49,3 @@ | ftgupp | translator | 0 | 0 | 0 | | petrudi | reviewer | 0 | 0 | 0 | | mmdbalkhi | reviewer | 0 | 0 | 0 | -| naweex | translator | 0 | 0 | 0 | diff --git a/about.po b/about.po index 2acfd4ca0..b69716623 100644 --- a/about.po +++ b/about.po @@ -1,5 +1,5 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2025, Python Software Foundation +# Copyright (C) 2001 Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # @@ -11,9 +11,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Python 3.13\n" +"Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-02 14:19+0000\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 00:47+0000\n" "Last-Translator: khosro azimi, 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/bugs.po b/bugs.po index d4d8fcdae..56ec92e26 100644 --- a/bugs.po +++ b/bugs.po @@ -15,7 +15,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 00:47+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/abstract.po b/c-api/abstract.po index 06eab9efd..d1c1156a3 100644 --- a/c-api/abstract.po +++ b/c-api/abstract.po @@ -1,5 +1,5 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2025, Python Software Foundation +# Copyright (C) 2001 Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # @@ -10,9 +10,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Python 3.13\n" +"Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-02 14:19+0000\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 00:47+0000\n" "Last-Translator: khosro azimi, 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/allocation.po b/c-api/allocation.po index 0f6cf9df5..1095c5a00 100644 --- a/c-api/allocation.po +++ b/c-api/allocation.po @@ -4,23 +4,22 @@ # FIRST AUTHOR , YEAR. # # Translators: -# Danial Behzadi , 2025 # Mehdi Batani, 2025 # AmirHossein SAMIMI, 2025 # khosro azimi, 2025 # Ariyan Bolandi, 2025 -# Alireza Shabani (Revisto) , 2025 -# Shahriar Ghasempour, 2025 -# Komeil Parseh , 2025 +# Danial Behzadi , 2025 +# Benyamin Bentamin, 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:47+0000\n" -"Last-Translator: Komeil Parseh , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -37,67 +36,164 @@ 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 affected." +"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 "" -"یک شیء تازه تخصیص یافته *op* را با نوع و مقدار اولیه اش مقداردهی می کند. شیء " -"مقدار دهی شده را برمی گرداند. سایر بخش های شی تحت تأثیر قرار نمی گیرند." #: ../../c-api/allocation.rst:24 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 "" + +#: ../../c-api/allocation.rst:31 +msgid "" +"This function only initializes the object's memory corresponding to the " +"initial :c:type:`PyObject` structure. It does not zero the rest." +msgstr "" + +#: ../../c-api/allocation.rst:37 +msgid "" "This does everything :c:func:`PyObject_Init` does, and also initializes the " "length information for a variable-size object." msgstr "" "این تابع همهٔ کارهایی را انجام می‌دهد که :c:func:`PyObject_Init` انجام می‌دهد، " "و همچنین اطلاعات مربوط به طول را برای یک شیء با اندازهٔ متغیر مقداردهی می‌کند." -#: ../../c-api/allocation.rst:30 +#: ../../c-api/allocation.rst:42 +msgid "" +"This function only initializes some of the object's memory. It does not " +"zero the rest." +msgstr "" + +#: ../../c-api/allocation.rst:48 +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 "" + +#: ../../c-api/allocation.rst:54 ../../c-api/allocation.rst:107 msgid "" -"Allocate a new Python object using the C structure type *TYPE* and the " -"Python type object *typeobj* (``PyTypeObject*``). Fields not defined by the " -"Python object header are not initialized. The caller will own the only " -"reference to the object (i.e. its reference count will be one). The size of " -"the memory allocation is determined from the :c:member:`~PyTypeObject." -"tp_basicsize` field of the type object." +"Avoid calling this directly to allocate memory for an object; call the " +"type's :c:member:`~PyTypeObject.tp_alloc` slot instead." msgstr "" -#: ../../c-api/allocation.rst:38 +#: ../../c-api/allocation.rst:57 ../../c-api/allocation.rst:110 msgid "" -"Note that this function is unsuitable if *typeobj* has :c:macro:" -"`Py_TPFLAGS_HAVE_GC` set. For such objects, use :c:func:`PyObject_GC_New` " -"instead." +"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 "" -"توجه داشته باشید که اگر *typeobj* دارای :c:macro:`Py_TPFLAGS_HAVE_GC` مجموعه " -"باشد، این تابع نامناسب است. برای چنین اشیایی به جای آن از :c:func:" -"`PyObject_GC_New` استفاده کنید." -#: ../../c-api/allocation.rst:45 +#: ../../c-api/allocation.rst:61 msgid "" -"Allocate a new Python object using the C structure type *TYPE* and the " -"Python type object *typeobj* (``PyTypeObject*``). Fields not defined by the " -"Python object header are not initialized. The allocated memory allows for " -"the *TYPE* structure plus *size* (``Py_ssize_t``) fields of the size given " -"by the :c:member:`~PyTypeObject.tp_itemsize` field of *typeobj*. 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." +"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 "" -#: ../../c-api/allocation.rst:56 +#: ../../c-api/allocation.rst:65 msgid "" -"Note that this function is unsuitable if *typeobj* has :c:macro:" -"`Py_TPFLAGS_HAVE_GC` set. For such objects, use :c:func:`PyObject_GC_NewVar` " -"instead." +"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 "" -"توجه داشته باشید که اگر *typeobj* دارای :c:macro:`Py_TPFLAGS_HAVE_GC` مجموعه " -"باشد، این تابع نامناسب است. برای چنین اشیایی به جای آن از :c:func:" -"`PyObject_GC_NewVar` استفاده کنید." -#: ../../c-api/allocation.rst:63 +#: ../../c-api/allocation.rst:68 +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 "" + +#: ../../c-api/allocation.rst:73 ../../c-api/allocation.rst:123 +msgid "" +"The returned memory is not guaranteed to have been completely zeroed before " +"it was initialized." +msgstr "" + +#: ../../c-api/allocation.rst:78 ../../c-api/allocation.rst:128 +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 "" + +#: ../../c-api/allocation.rst:83 +msgid "PyObject *foo = PyObject_CallNoArgs((PyObject *)&PyFoo_Type);" +msgstr "" + +#: ../../c-api/allocation.rst:87 ../../c-api/allocation.rst:137 +msgid ":c:func:`PyObject_Free`" +msgstr "" + +#: ../../c-api/allocation.rst:88 +msgid ":c:macro:`PyObject_GC_New`" +msgstr "" + +#: ../../c-api/allocation.rst:89 ../../c-api/allocation.rst:139 +msgid ":c:func:`PyType_GenericAlloc`" +msgstr "" + +#: ../../c-api/allocation.rst:90 ../../c-api/allocation.rst:140 +msgid ":c:member:`~PyTypeObject.tp_alloc`" +msgstr "" + +#: ../../c-api/allocation.rst:95 +msgid "Like :c:macro:`PyObject_New` except:" +msgstr "" + +#: ../../c-api/allocation.rst:97 +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 "" + +#: ../../c-api/allocation.rst:100 +msgid "The memory is initialized like :c:func:`PyObject_InitVar`." +msgstr "" + +#: ../../c-api/allocation.rst:102 +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 "" + +#: ../../c-api/allocation.rst:114 +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 "" + +#: ../../c-api/allocation.rst:118 +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 "" + +#: ../../c-api/allocation.rst:133 +msgid "" +"PyObject *list_instance = PyObject_CallNoArgs((PyObject *)&PyList_Type);" +msgstr "" + +#: ../../c-api/allocation.rst:138 +msgid ":c:macro:`PyObject_GC_NewVar`" +msgstr "" + +#: ../../c-api/allocation.rst:145 msgid "Same as :c:func:`PyObject_Free`." msgstr "همانند :c:func:`PyObject_Free`" -#: ../../c-api/allocation.rst:67 +#: ../../c-api/allocation.rst:149 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 " @@ -107,10 +203,10 @@ msgstr "" "این فقط باید با استفاده از ماکرو :c:macro:`Py_None`، که به یک اشاره گر به " "این شی ارزیابی می شود، دسترسی پیدا کند." -#: ../../c-api/allocation.rst:74 -msgid ":c:func:`PyModule_Create`" -msgstr ":c:func:`PyModule_Create`" +#: ../../c-api/allocation.rst:156 +msgid ":ref:`moduleobjects`" +msgstr "" -#: ../../c-api/allocation.rst:75 +#: ../../c-api/allocation.rst:157 msgid "To allocate and create extension modules." msgstr "برای تخصیص و ایجاد ماژول های افزونه." diff --git a/c-api/apiabiversion.po b/c-api/apiabiversion.po index 2aa5e7f1b..f9d96cef9 100644 --- a/c-api/apiabiversion.po +++ b/c-api/apiabiversion.po @@ -7,15 +7,16 @@ # Mehdi Batani, 2025 # Danial Behzadi , 2025 # Ariyan Bolandi, 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:47+0000\n" -"Last-Translator: Ariyan Bolandi, 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/c-api/arg.po b/c-api/arg.po index f6cba2068..d9c333403 100644 --- a/c-api/arg.po +++ b/c-api/arg.po @@ -7,15 +7,16 @@ # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 # navid BH, 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:47+0000\n" -"Last-Translator: navid BH, 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -559,7 +560,7 @@ msgstr "" msgid "Allow :class:`bytearray` objects." msgstr "" -#: ../../c-api/arg.rst:300 ../../c-api/arg.rst:694 +#: ../../c-api/arg.rst:300 ../../c-api/arg.rst:701 msgid "``C`` (:class:`str` of length 1) [int]" msgstr "" @@ -569,7 +570,7 @@ msgid "" "1, to a C :c:expr:`int`." msgstr "" -#: ../../c-api/arg.rst:304 ../../c-api/arg.rst:701 +#: ../../c-api/arg.rst:304 ../../c-api/arg.rst:708 msgid "``f`` (:class:`float`) [float]" msgstr "" @@ -577,7 +578,7 @@ msgstr "" msgid "Convert a Python floating-point number to a C :c:expr:`float`." msgstr "" -#: ../../c-api/arg.rst:307 ../../c-api/arg.rst:698 +#: ../../c-api/arg.rst:307 ../../c-api/arg.rst:705 msgid "``d`` (:class:`float`) [double]" msgstr "" @@ -597,7 +598,7 @@ msgstr "" msgid "Other objects" msgstr "" -#: ../../c-api/arg.rst:316 ../../c-api/arg.rst:707 +#: ../../c-api/arg.rst:316 ../../c-api/arg.rst:714 msgid "``O`` (object) [PyObject \\*]" msgstr "" @@ -1131,44 +1132,50 @@ msgid "Convert a C :c:type:`Py_ssize_t` to a Python integer." msgstr "" #: ../../c-api/arg.rst:687 +msgid "Convert a C :c:expr:`int` to a Python :class:`bool` object." +msgstr "" + +#: ../../c-api/arg.rst:689 msgid "" -"Convert a C :c:expr:`int` to a Python :class:`bool` object. .. " -"versionadded:: 3.14" +"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 "" -#: ../../c-api/arg.rst:690 +#: ../../c-api/arg.rst:697 msgid "``c`` (:class:`bytes` of length 1) [char]" msgstr "" -#: ../../c-api/arg.rst:691 +#: ../../c-api/arg.rst:698 msgid "" "Convert a C :c:expr:`int` representing a byte to a Python :class:`bytes` " "object of length 1." msgstr "" -#: ../../c-api/arg.rst:695 +#: ../../c-api/arg.rst:702 msgid "" "Convert a C :c:expr:`int` representing a character to Python :class:`str` " "object of length 1." msgstr "" -#: ../../c-api/arg.rst:699 +#: ../../c-api/arg.rst:706 msgid "Convert a C :c:expr:`double` to a Python floating-point number." msgstr "" -#: ../../c-api/arg.rst:702 +#: ../../c-api/arg.rst:709 msgid "Convert a C :c:expr:`float` to a Python floating-point number." msgstr "" -#: ../../c-api/arg.rst:704 +#: ../../c-api/arg.rst:711 msgid "``D`` (:class:`complex`) [Py_complex \\*]" msgstr "" -#: ../../c-api/arg.rst:705 +#: ../../c-api/arg.rst:712 msgid "Convert a C :c:type:`Py_complex` structure to a Python complex number." msgstr "" -#: ../../c-api/arg.rst:708 +#: ../../c-api/arg.rst:715 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 " @@ -1178,30 +1185,30 @@ msgid "" "no exception has been raised yet, :exc:`SystemError` is set." msgstr "" -#: ../../c-api/arg.rst:717 +#: ../../c-api/arg.rst:724 msgid "``S`` (object) [PyObject \\*]" msgstr "" -#: ../../c-api/arg.rst:718 +#: ../../c-api/arg.rst:725 msgid "Same as ``O``." msgstr "" -#: ../../c-api/arg.rst:720 +#: ../../c-api/arg.rst:727 msgid "``N`` (object) [PyObject \\*]" msgstr "" -#: ../../c-api/arg.rst:721 +#: ../../c-api/arg.rst:728 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 "" -#: ../../c-api/arg.rst:725 +#: ../../c-api/arg.rst:732 msgid "``O&`` (object) [*converter*, *anything*]" msgstr "" -#: ../../c-api/arg.rst:726 +#: ../../c-api/arg.rst:733 msgid "" "Convert *anything* to a Python object through a *converter* function. The " "function is called with *anything* (which should be compatible with :c:expr:" @@ -1209,44 +1216,44 @@ msgid "" "``NULL`` if an error occurred." msgstr "" -#: ../../c-api/arg.rst:731 +#: ../../c-api/arg.rst:738 msgid "``(items)`` (:class:`tuple`) [*matching-items*]" msgstr "" -#: ../../c-api/arg.rst:732 +#: ../../c-api/arg.rst:739 msgid "" "Convert a sequence of C values to a Python tuple with the same number of " "items." msgstr "" -#: ../../c-api/arg.rst:734 +#: ../../c-api/arg.rst:741 msgid "``[items]`` (:class:`list`) [*matching-items*]" msgstr "" -#: ../../c-api/arg.rst:735 +#: ../../c-api/arg.rst:742 msgid "" "Convert a sequence of C values to a Python list with the same number of " "items." msgstr "" -#: ../../c-api/arg.rst:737 +#: ../../c-api/arg.rst:744 msgid "``{items}`` (:class:`dict`) [*matching-items*]" msgstr "" -#: ../../c-api/arg.rst:738 +#: ../../c-api/arg.rst:745 msgid "" "Convert a sequence of C values to a Python dictionary. Each pair of " "consecutive C values adds one item to the dictionary, serving as key and " "value, respectively." msgstr "" -#: ../../c-api/arg.rst:742 +#: ../../c-api/arg.rst:749 msgid "" "If there is an error in the format string, the :exc:`SystemError` exception " "is set and ``NULL`` returned." msgstr "" -#: ../../c-api/arg.rst:747 +#: ../../c-api/arg.rst:754 msgid "" "Identical to :c:func:`Py_BuildValue`, except that it accepts a va_list " "rather than a variable number of arguments." diff --git a/c-api/bool.po b/c-api/bool.po index daae4bcad..8938c2a1a 100644 --- a/c-api/bool.po +++ b/c-api/bool.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:47+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/c-api/buffer.po b/c-api/buffer.po index 0cd439bd5..975f25441 100644 --- a/c-api/buffer.po +++ b/c-api/buffer.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:47+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/c-api/bytearray.po b/c-api/bytearray.po index e0ff4ad5d..f562217a8 100644 --- a/c-api/bytearray.po +++ b/c-api/bytearray.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:47+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/c-api/bytes.po b/c-api/bytes.po index d27942cd0..079ccc2d1 100644 --- a/c-api/bytes.po +++ b/c-api/bytes.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:47+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/c-api/call.po b/c-api/call.po index 7520f131e..cc8e3327f 100644 --- a/c-api/call.po +++ b/c-api/call.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:47+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/c-api/capsule.po b/c-api/capsule.po index 11e67ac7a..913f34776 100644 --- a/c-api/capsule.po +++ b/c-api/capsule.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 00:47+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" @@ -154,15 +154,29 @@ msgstr "" #: ../../c-api/capsule.rst:108 msgid "" +"This function splits *name* on the ``.`` character, and imports the first " +"element. It then processes further elements using attribute lookups." +msgstr "" + +#: ../../c-api/capsule.rst:111 +msgid "" "Return the capsule's internal *pointer* on success. On failure, set an " "exception and return ``NULL``." msgstr "" -#: ../../c-api/capsule.rst:111 +#: ../../c-api/capsule.rst:116 +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 "" + +#: ../../c-api/capsule.rst:121 msgid "*no_block* has no effect anymore." msgstr "" -#: ../../c-api/capsule.rst:117 +#: ../../c-api/capsule.rst:127 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`` " @@ -171,41 +185,41 @@ msgid "" "compared.)" msgstr "" -#: ../../c-api/capsule.rst:123 +#: ../../c-api/capsule.rst:133 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 "" -#: ../../c-api/capsule.rst:127 +#: ../../c-api/capsule.rst:137 msgid "" "Return a nonzero value if the object is valid and matches the name passed " "in. Return ``0`` otherwise. This function will not fail." msgstr "" -#: ../../c-api/capsule.rst:133 +#: ../../c-api/capsule.rst:143 msgid "Set the context pointer inside *capsule* to *context*." msgstr "" -#: ../../c-api/capsule.rst:135 ../../c-api/capsule.rst:142 -#: ../../c-api/capsule.rst:151 ../../c-api/capsule.rst:159 +#: ../../c-api/capsule.rst:145 ../../c-api/capsule.rst:152 +#: ../../c-api/capsule.rst:161 ../../c-api/capsule.rst:169 msgid "" "Return ``0`` on success. Return nonzero and set an exception on failure." msgstr "" -#: ../../c-api/capsule.rst:140 +#: ../../c-api/capsule.rst:150 msgid "Set the destructor inside *capsule* to *destructor*." msgstr "" -#: ../../c-api/capsule.rst:147 +#: ../../c-api/capsule.rst:157 msgid "" "Set the name inside *capsule* to *name*. If non-``NULL``, the name must " "outlive the capsule. If the previous *name* stored in the capsule was not " "``NULL``, no attempt is made to free it." msgstr "" -#: ../../c-api/capsule.rst:156 +#: ../../c-api/capsule.rst:166 msgid "" "Set the void pointer inside *capsule* to *pointer*. The pointer may not be " "``NULL``." diff --git a/c-api/cell.po b/c-api/cell.po index f57a46fa7..bf7e229c8 100644 --- a/c-api/cell.po +++ b/c-api/cell.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:47+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/c-api/code.po b/c-api/code.po index 51bd5b6b6..3d47014fa 100644 --- a/c-api/code.po +++ b/c-api/code.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:48+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -217,7 +218,7 @@ msgstr "" #: ../../c-api/code.rst:184 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 " +"*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 "" @@ -256,85 +257,191 @@ msgid "" "it before returning." msgstr "" -#: ../../c-api/code.rst:215 +#: ../../c-api/code.rst:217 +msgid "Code Object Flags" +msgstr "" + +#: ../../c-api/code.rst:219 +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 "" + +#: ../../c-api/code.rst:224 +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 "" + +#: ../../c-api/code.rst:230 +msgid "" +"The following flags are available. For their meaning, see the linked " +"documentation of their Python equivalents." +msgstr "" + +#: ../../c-api/code.rst:238 +msgid "Flag" +msgstr "" + +#: ../../c-api/code.rst:239 +msgid "Meaning" +msgstr "" + +#: ../../c-api/code.rst:241 +msgid ":py:data:`inspect.CO_OPTIMIZED`" +msgstr "" + +#: ../../c-api/code.rst:243 +msgid ":py:data:`inspect.CO_NEWLOCALS`" +msgstr "" + +#: ../../c-api/code.rst:245 +msgid ":py:data:`inspect.CO_VARARGS`" +msgstr "" + +#: ../../c-api/code.rst:247 +msgid ":py:data:`inspect.CO_VARKEYWORDS`" +msgstr "" + +#: ../../c-api/code.rst:249 +msgid ":py:data:`inspect.CO_NESTED`" +msgstr "" + +#: ../../c-api/code.rst:251 +msgid ":py:data:`inspect.CO_GENERATOR`" +msgstr "" + +#: ../../c-api/code.rst:253 +msgid ":py:data:`inspect.CO_COROUTINE`" +msgstr "" + +#: ../../c-api/code.rst:255 +msgid ":py:data:`inspect.CO_ITERABLE_COROUTINE`" +msgstr "" + +#: ../../c-api/code.rst:257 +msgid ":py:data:`inspect.CO_ASYNC_GENERATOR`" +msgstr "" + +#: ../../c-api/code.rst:259 +msgid ":py:data:`inspect.CO_HAS_DOCSTRING`" +msgstr "" + +#: ../../c-api/code.rst:261 +msgid ":py:data:`inspect.CO_METHOD`" +msgstr "" + +#: ../../c-api/code.rst:264 +msgid "no effect (:py:data:`__future__.division`)" +msgstr "" + +#: ../../c-api/code.rst:266 +msgid "no effect (:py:data:`__future__.absolute_import`)" +msgstr "" + +#: ../../c-api/code.rst:268 +msgid "no effect (:py:data:`__future__.with_statement`)" +msgstr "" + +#: ../../c-api/code.rst:270 +msgid "no effect (:py:data:`__future__.print_function`)" +msgstr "" + +#: ../../c-api/code.rst:272 +msgid "no effect (:py:data:`__future__.unicode_literals`)" +msgstr "" + +#: ../../c-api/code.rst:274 +msgid "no effect (:py:data:`__future__.generator_stop`)" +msgstr "" + +#: ../../c-api/code.rst:276 +msgid ":py:data:`__future__.annotations`" +msgstr "" + +#: ../../c-api/code.rst:280 msgid "Extra information" msgstr "" -#: ../../c-api/code.rst:217 +#: ../../c-api/code.rst:282 msgid "" "To support low-level extensions to frame evaluation, such as external just-" "in-time compilers, it is possible to attach arbitrary extra data to code " "objects." msgstr "" -#: ../../c-api/code.rst:221 +#: ../../c-api/code.rst:286 msgid "" "These functions are part of the unstable C API tier: this functionality is a " "CPython implementation detail, and the API may change without deprecation " "warnings." msgstr "" -#: ../../c-api/code.rst:227 +#: ../../c-api/code.rst:292 msgid "Return a new an opaque index value used to adding data to code objects." msgstr "" -#: ../../c-api/code.rst:229 +#: ../../c-api/code.rst:294 msgid "" "You generally call this function once (per interpreter) and use the result " "with ``PyCode_GetExtra`` and ``PyCode_SetExtra`` to manipulate data on " "individual code objects." msgstr "" -#: ../../c-api/code.rst:233 +#: ../../c-api/code.rst:298 msgid "" "If *free* is not ``NULL``: when a code object is deallocated, *free* will be " "called on non-``NULL`` data stored under the new index. Use :c:func:" "`Py_DecRef` when storing :c:type:`PyObject`." msgstr "" -#: ../../c-api/code.rst:239 +#: ../../c-api/code.rst:304 msgid "as ``_PyEval_RequestCodeExtraIndex``" msgstr "" -#: ../../c-api/code.rst:243 +#: ../../c-api/code.rst:308 msgid "" "Renamed to ``PyUnstable_Eval_RequestCodeExtraIndex``. The old private name " "is deprecated, but will be available until the API changes." msgstr "" -#: ../../c-api/code.rst:249 +#: ../../c-api/code.rst:314 msgid "" "Set *extra* to the extra data stored under the given index. Return 0 on " "success. Set an exception and return -1 on failure." msgstr "" -#: ../../c-api/code.rst:252 +#: ../../c-api/code.rst:317 msgid "" "If no data was set under the index, set *extra* to ``NULL`` and return 0 " "without setting an exception." msgstr "" -#: ../../c-api/code.rst:257 +#: ../../c-api/code.rst:322 msgid "as ``_PyCode_GetExtra``" msgstr "" -#: ../../c-api/code.rst:261 +#: ../../c-api/code.rst:326 msgid "" "Renamed to ``PyUnstable_Code_GetExtra``. The old private name is deprecated, " "but will be available until the API changes." msgstr "" -#: ../../c-api/code.rst:267 +#: ../../c-api/code.rst:332 msgid "" "Set the extra data stored under the given index to *extra*. Return 0 on " "success. Set an exception and return -1 on failure." msgstr "" -#: ../../c-api/code.rst:272 +#: ../../c-api/code.rst:337 msgid "as ``_PyCode_SetExtra``" msgstr "" -#: ../../c-api/code.rst:276 +#: ../../c-api/code.rst:341 msgid "" "Renamed to ``PyUnstable_Code_SetExtra``. The old private name is deprecated, " "but will be available until the API changes." @@ -360,14 +467,14 @@ msgstr "" msgid "PyCode_NewWithPosOnlyArgs (C function)" msgstr "" -#: ../../c-api/code.rst:237 +#: ../../c-api/code.rst:302 msgid "_PyEval_RequestCodeExtraIndex (C function)" msgstr "" -#: ../../c-api/code.rst:255 +#: ../../c-api/code.rst:320 msgid "_PyCode_GetExtra (C function)" msgstr "" -#: ../../c-api/code.rst:270 +#: ../../c-api/code.rst:335 msgid "_PyCode_SetExtra (C function)" msgstr "" diff --git a/c-api/codec.po b/c-api/codec.po index b751dae90..bf8ead3e2 100644 --- a/c-api/codec.po +++ b/c-api/codec.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:48+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/c-api/complex.po b/c-api/complex.po index c2cc00ab4..e31d4474a 100644 --- a/c-api/complex.po +++ b/c-api/complex.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 00:48+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/concrete.po b/c-api/concrete.po index 8dff84f44..8ebddad67 100644 --- a/c-api/concrete.po +++ b/c-api/concrete.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:48+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/c-api/contextvars.po b/c-api/contextvars.po index 38589054a..e99e5c0b9 100644 --- a/c-api/contextvars.po +++ b/c-api/contextvars.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:48+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/c-api/conversion.po b/c-api/conversion.po index 6a30b8e2a..cdfe1d3ff 100644 --- a/c-api/conversion.po +++ b/c-api/conversion.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 00:48+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/c-api/coro.po b/c-api/coro.po index 2ed944075..2e57a1692 100644 --- a/c-api/coro.po +++ b/c-api/coro.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:48+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/c-api/datetime.po b/c-api/datetime.po index 02452a16e..54bee5aa3 100644 --- a/c-api/datetime.po +++ b/c-api/datetime.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:48+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/c-api/descriptor.po b/c-api/descriptor.po index d4ccf9728..966c8ebe9 100644 --- a/c-api/descriptor.po +++ b/c-api/descriptor.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:48+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/c-api/dict.po b/c-api/dict.po index 6ced814fe..7e439229c 100644 --- a/c-api/dict.po +++ b/c-api/dict.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # khosro azimi, 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:48+0000\n" -"Last-Translator: khosro azimi, 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/c-api/exceptions.po b/c-api/exceptions.po index b2d4564eb..9135dc1df 100644 --- a/c-api/exceptions.po +++ b/c-api/exceptions.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:48+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -800,24 +801,34 @@ msgid "" "as the docstring for the exception class." msgstr "" -#: ../../c-api/exceptions.rst:753 +#: ../../c-api/exceptions.rst:754 +msgid "" +"Return non-zero if *ob* is an exception class, zero otherwise. This function " +"always succeeds." +msgstr "" + +#: ../../c-api/exceptions.rst:759 +msgid "Return :c:member:`~PyTypeObject.tp_name` of the exception class *ob*." +msgstr "" + +#: ../../c-api/exceptions.rst:763 msgid "Exception Objects" msgstr "" -#: ../../c-api/exceptions.rst:757 +#: ../../c-api/exceptions.rst:767 msgid "" "Return the traceback associated with the exception as a new reference, as " "accessible from Python through the :attr:`~BaseException.__traceback__` " "attribute. If there is no traceback associated, this returns ``NULL``." msgstr "" -#: ../../c-api/exceptions.rst:765 +#: ../../c-api/exceptions.rst:775 msgid "" "Set the traceback associated with the exception to *tb*. Use ``Py_None`` to " "clear it." msgstr "" -#: ../../c-api/exceptions.rst:771 +#: ../../c-api/exceptions.rst:781 msgid "" "Return the context (another exception instance during whose handling *ex* " "was raised) associated with the exception as a new reference, as accessible " @@ -825,14 +836,14 @@ msgid "" "there is no context associated, this returns ``NULL``." msgstr "" -#: ../../c-api/exceptions.rst:779 +#: ../../c-api/exceptions.rst:789 msgid "" "Set the context associated with the exception to *ctx*. Use ``NULL`` to " "clear it. There is no type check to make sure that *ctx* is an exception " "instance. This steals a reference to *ctx*." msgstr "" -#: ../../c-api/exceptions.rst:786 +#: ../../c-api/exceptions.rst:796 msgid "" "Return the cause (either an exception instance, or ``None``, set by " "``raise ... from ...``) associated with the exception as a new reference, as " @@ -840,28 +851,28 @@ msgid "" "attribute." msgstr "" -#: ../../c-api/exceptions.rst:794 +#: ../../c-api/exceptions.rst:804 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 "" -#: ../../c-api/exceptions.rst:798 +#: ../../c-api/exceptions.rst:808 msgid "" "The :attr:`~BaseException.__suppress_context__` attribute is implicitly set " "to ``True`` by this function." msgstr "" -#: ../../c-api/exceptions.rst:804 +#: ../../c-api/exceptions.rst:814 msgid "Return :attr:`~BaseException.args` of exception *ex*." msgstr "" -#: ../../c-api/exceptions.rst:809 +#: ../../c-api/exceptions.rst:819 msgid "Set :attr:`~BaseException.args` of exception *ex* to *args*." msgstr "" -#: ../../c-api/exceptions.rst:813 +#: ../../c-api/exceptions.rst:823 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 " @@ -873,98 +884,98 @@ msgid "" "if there is nothing to reraise." msgstr "" -#: ../../c-api/exceptions.rst:827 +#: ../../c-api/exceptions.rst:837 msgid "Unicode Exception Objects" msgstr "" -#: ../../c-api/exceptions.rst:829 +#: ../../c-api/exceptions.rst:839 msgid "" "The following functions are used to create and modify Unicode exceptions " "from C." msgstr "" -#: ../../c-api/exceptions.rst:833 +#: ../../c-api/exceptions.rst:843 msgid "" "Create a :class:`UnicodeDecodeError` object with the attributes *encoding*, " "*object*, *length*, *start*, *end* and *reason*. *encoding* and *reason* are " "UTF-8 encoded strings." msgstr "" -#: ../../c-api/exceptions.rst:840 +#: ../../c-api/exceptions.rst:850 msgid "Return the *encoding* attribute of the given exception object." msgstr "" -#: ../../c-api/exceptions.rst:846 +#: ../../c-api/exceptions.rst:856 msgid "Return the *object* attribute of the given exception object." msgstr "" -#: ../../c-api/exceptions.rst:852 +#: ../../c-api/exceptions.rst:862 msgid "" "Get the *start* attribute of the given exception object and place it into " "*\\*start*. *start* must not be ``NULL``. Return ``0`` on success, ``-1`` " "on failure." msgstr "" -#: ../../c-api/exceptions.rst:856 +#: ../../c-api/exceptions.rst:866 msgid "" "If the :attr:`UnicodeError.object` is an empty sequence, the resulting " "*start* is ``0``. Otherwise, it is clipped to ``[0, len(object) - 1]``." msgstr "" -#: ../../c-api/exceptions.rst:859 +#: ../../c-api/exceptions.rst:869 msgid ":attr:`UnicodeError.start`" msgstr "" -#: ../../c-api/exceptions.rst:865 +#: ../../c-api/exceptions.rst:875 msgid "" "Set the *start* attribute of the given exception object to *start*. Return " "``0`` on success, ``-1`` on failure." msgstr "" -#: ../../c-api/exceptions.rst:870 +#: ../../c-api/exceptions.rst:880 msgid "" "While passing a negative *start* does not raise an exception, the " "corresponding getters will not consider it as a relative offset." msgstr "" -#: ../../c-api/exceptions.rst:878 +#: ../../c-api/exceptions.rst:888 msgid "" "Get the *end* attribute of the given exception object and place it into " "*\\*end*. *end* must not be ``NULL``. Return ``0`` on success, ``-1`` on " "failure." msgstr "" -#: ../../c-api/exceptions.rst:882 +#: ../../c-api/exceptions.rst:892 msgid "" "If the :attr:`UnicodeError.object` is an empty sequence, the resulting *end* " "is ``0``. Otherwise, it is clipped to ``[1, len(object)]``." msgstr "" -#: ../../c-api/exceptions.rst:889 +#: ../../c-api/exceptions.rst:899 msgid "" "Set the *end* attribute of the given exception object to *end*. Return " "``0`` on success, ``-1`` on failure." msgstr "" -#: ../../c-api/exceptions.rst:892 +#: ../../c-api/exceptions.rst:902 msgid ":attr:`UnicodeError.end`" msgstr "" -#: ../../c-api/exceptions.rst:898 +#: ../../c-api/exceptions.rst:908 msgid "Return the *reason* attribute of the given exception object." msgstr "" -#: ../../c-api/exceptions.rst:904 +#: ../../c-api/exceptions.rst:914 msgid "" "Set the *reason* attribute of the given exception object to *reason*. " "Return ``0`` on success, ``-1`` on failure." msgstr "" -#: ../../c-api/exceptions.rst:911 +#: ../../c-api/exceptions.rst:921 msgid "Recursion Control" msgstr "" -#: ../../c-api/exceptions.rst:913 +#: ../../c-api/exceptions.rst:923 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 " @@ -974,37 +985,37 @@ msgid "" "recursion handling." msgstr "" -#: ../../c-api/exceptions.rst:922 +#: ../../c-api/exceptions.rst:932 msgid "Marks a point where a recursive C-level call is about to be performed." msgstr "" -#: ../../c-api/exceptions.rst:924 +#: ../../c-api/exceptions.rst:934 msgid "" "The function then checks if the stack limit is reached. If this is the " "case, a :exc:`RecursionError` is set and a nonzero value is returned. " "Otherwise, zero is returned." msgstr "" -#: ../../c-api/exceptions.rst:928 +#: ../../c-api/exceptions.rst:938 msgid "" "*where* should be a UTF-8 encoded string such as ``\" in instance check\"`` " "to be concatenated to the :exc:`RecursionError` message caused by the " "recursion depth limit." msgstr "" -#: ../../c-api/exceptions.rst:932 ../../c-api/exceptions.rst:940 +#: ../../c-api/exceptions.rst:942 ../../c-api/exceptions.rst:950 msgid "" "This function is now also available in the :ref:`limited API `." msgstr "" -#: ../../c-api/exceptions.rst:937 +#: ../../c-api/exceptions.rst:947 msgid "" "Ends a :c:func:`Py_EnterRecursiveCall`. Must be called once for each " "*successful* invocation of :c:func:`Py_EnterRecursiveCall`." msgstr "" -#: ../../c-api/exceptions.rst:943 +#: ../../c-api/exceptions.rst:953 msgid "" "Properly implementing :c:member:`~PyTypeObject.tp_repr` for container types " "requires special recursion handling. In addition to protecting the stack, :" @@ -1013,13 +1024,13 @@ msgid "" "Effectively, these are the C equivalent to :func:`reprlib.recursive_repr`." msgstr "" -#: ../../c-api/exceptions.rst:951 +#: ../../c-api/exceptions.rst:961 msgid "" "Called at the beginning of the :c:member:`~PyTypeObject.tp_repr` " "implementation to detect cycles." msgstr "" -#: ../../c-api/exceptions.rst:954 +#: ../../c-api/exceptions.rst:964 msgid "" "If the object has already been processed, the function returns a positive " "integer. In that case the :c:member:`~PyTypeObject.tp_repr` implementation " @@ -1027,490 +1038,276 @@ msgid "" "`dict` objects return ``{...}`` and :class:`list` objects return ``[...]``." msgstr "" -#: ../../c-api/exceptions.rst:960 +#: ../../c-api/exceptions.rst:970 msgid "" "The function will return a negative integer if the recursion limit is " "reached. In that case the :c:member:`~PyTypeObject.tp_repr` implementation " "should typically return ``NULL``." msgstr "" -#: ../../c-api/exceptions.rst:964 +#: ../../c-api/exceptions.rst:974 msgid "" "Otherwise, the function returns zero and the :c:member:`~PyTypeObject." "tp_repr` implementation can continue normally." msgstr "" -#: ../../c-api/exceptions.rst:969 +#: ../../c-api/exceptions.rst:979 msgid "" "Ends a :c:func:`Py_ReprEnter`. Must be called once for each invocation of :" "c:func:`Py_ReprEnter` that returns zero." msgstr "" -#: ../../c-api/exceptions.rst:976 -msgid "Standard Exceptions" +#: ../../c-api/exceptions.rst:986 +msgid "Exception and warning types" msgstr "" -#: ../../c-api/exceptions.rst:978 +#: ../../c-api/exceptions.rst:988 msgid "" -"All standard Python exceptions 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. For completeness, here are " -"all the variables:" +"All standard Python exceptions and warning categories are available as " +"global variables whose names are ``PyExc_`` followed by the Python exception " +"name. These have the type :c:expr:`PyObject*`; they are all class objects." msgstr "" -#: ../../c-api/exceptions.rst:1040 ../../c-api/exceptions.rst:1175 -#: ../../c-api/exceptions.rst:1220 -msgid "C Name" +#: ../../c-api/exceptions.rst:992 +msgid "For completeness, here are all the variables:" msgstr "" -#: ../../c-api/exceptions.rst:1040 ../../c-api/exceptions.rst:1220 -msgid "Python Name" +#: ../../c-api/exceptions.rst:995 +msgid "Exception types" msgstr "" -#: ../../c-api/exceptions.rst:1040 ../../c-api/exceptions.rst:1175 -#: ../../c-api/exceptions.rst:1220 -msgid "Notes" +#: ../../c-api/exceptions.rst:1002 ../../c-api/exceptions.rst:1148 +#: ../../c-api/exceptions.rst:1178 +msgid "C name" msgstr "" -#: ../../c-api/exceptions.rst:1042 -msgid ":c:data:`PyExc_BaseException`" +#: ../../c-api/exceptions.rst:1003 ../../c-api/exceptions.rst:1149 +#: ../../c-api/exceptions.rst:1179 +msgid "Python name" msgstr "" -#: ../../c-api/exceptions.rst:1042 +#: ../../c-api/exceptions.rst:1005 msgid ":exc:`BaseException`" msgstr "" -#: ../../c-api/exceptions.rst:1042 ../../c-api/exceptions.rst:1044 -#: ../../c-api/exceptions.rst:1046 ../../c-api/exceptions.rst:1092 -#: ../../c-api/exceptions.rst:1104 -msgid "[1]_" +#: ../../c-api/exceptions.rst:1007 +msgid ":exc:`BaseExceptionGroup`" msgstr "" -#: ../../c-api/exceptions.rst:1044 -msgid ":c:data:`PyExc_Exception`" -msgstr "" - -#: ../../c-api/exceptions.rst:1044 +#: ../../c-api/exceptions.rst:1009 msgid ":exc:`Exception`" msgstr "" -#: ../../c-api/exceptions.rst:1046 -msgid ":c:data:`PyExc_ArithmeticError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1046 +#: ../../c-api/exceptions.rst:1011 msgid ":exc:`ArithmeticError`" msgstr "" -#: ../../c-api/exceptions.rst:1048 -msgid ":c:data:`PyExc_AssertionError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1048 +#: ../../c-api/exceptions.rst:1013 msgid ":exc:`AssertionError`" msgstr "" -#: ../../c-api/exceptions.rst:1050 -msgid ":c:data:`PyExc_AttributeError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1050 +#: ../../c-api/exceptions.rst:1015 msgid ":exc:`AttributeError`" msgstr "" -#: ../../c-api/exceptions.rst:1052 -msgid ":c:data:`PyExc_BlockingIOError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1052 +#: ../../c-api/exceptions.rst:1017 msgid ":exc:`BlockingIOError`" msgstr "" -#: ../../c-api/exceptions.rst:1054 -msgid ":c:data:`PyExc_BrokenPipeError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1054 +#: ../../c-api/exceptions.rst:1019 msgid ":exc:`BrokenPipeError`" msgstr "" -#: ../../c-api/exceptions.rst:1056 -msgid ":c:data:`PyExc_BufferError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1056 +#: ../../c-api/exceptions.rst:1021 msgid ":exc:`BufferError`" msgstr "" -#: ../../c-api/exceptions.rst:1058 -msgid ":c:data:`PyExc_ChildProcessError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1058 +#: ../../c-api/exceptions.rst:1023 msgid ":exc:`ChildProcessError`" msgstr "" -#: ../../c-api/exceptions.rst:1060 -msgid ":c:data:`PyExc_ConnectionAbortedError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1060 +#: ../../c-api/exceptions.rst:1025 msgid ":exc:`ConnectionAbortedError`" msgstr "" -#: ../../c-api/exceptions.rst:1062 -msgid ":c:data:`PyExc_ConnectionError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1062 +#: ../../c-api/exceptions.rst:1027 msgid ":exc:`ConnectionError`" msgstr "" -#: ../../c-api/exceptions.rst:1064 -msgid ":c:data:`PyExc_ConnectionRefusedError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1064 +#: ../../c-api/exceptions.rst:1029 msgid ":exc:`ConnectionRefusedError`" msgstr "" -#: ../../c-api/exceptions.rst:1066 -msgid ":c:data:`PyExc_ConnectionResetError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1066 +#: ../../c-api/exceptions.rst:1031 msgid ":exc:`ConnectionResetError`" msgstr "" -#: ../../c-api/exceptions.rst:1068 -msgid ":c:data:`PyExc_EOFError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1068 +#: ../../c-api/exceptions.rst:1033 msgid ":exc:`EOFError`" msgstr "" -#: ../../c-api/exceptions.rst:1070 -msgid ":c:data:`PyExc_FileExistsError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1070 +#: ../../c-api/exceptions.rst:1035 msgid ":exc:`FileExistsError`" msgstr "" -#: ../../c-api/exceptions.rst:1072 -msgid ":c:data:`PyExc_FileNotFoundError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1072 +#: ../../c-api/exceptions.rst:1037 msgid ":exc:`FileNotFoundError`" msgstr "" -#: ../../c-api/exceptions.rst:1074 -msgid ":c:data:`PyExc_FloatingPointError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1074 +#: ../../c-api/exceptions.rst:1039 msgid ":exc:`FloatingPointError`" msgstr "" -#: ../../c-api/exceptions.rst:1076 -msgid ":c:data:`PyExc_GeneratorExit`" -msgstr "" - -#: ../../c-api/exceptions.rst:1076 +#: ../../c-api/exceptions.rst:1041 msgid ":exc:`GeneratorExit`" msgstr "" -#: ../../c-api/exceptions.rst:1078 -msgid ":c:data:`PyExc_ImportError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1078 +#: ../../c-api/exceptions.rst:1043 msgid ":exc:`ImportError`" msgstr "" -#: ../../c-api/exceptions.rst:1080 -msgid ":c:data:`PyExc_IndentationError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1080 +#: ../../c-api/exceptions.rst:1045 msgid ":exc:`IndentationError`" msgstr "" -#: ../../c-api/exceptions.rst:1082 -msgid ":c:data:`PyExc_IndexError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1082 +#: ../../c-api/exceptions.rst:1047 msgid ":exc:`IndexError`" msgstr "" -#: ../../c-api/exceptions.rst:1084 -msgid ":c:data:`PyExc_InterruptedError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1084 +#: ../../c-api/exceptions.rst:1049 msgid ":exc:`InterruptedError`" msgstr "" -#: ../../c-api/exceptions.rst:1086 -msgid ":c:data:`PyExc_IsADirectoryError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1086 +#: ../../c-api/exceptions.rst:1051 msgid ":exc:`IsADirectoryError`" msgstr "" -#: ../../c-api/exceptions.rst:1088 -msgid ":c:data:`PyExc_KeyError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1088 +#: ../../c-api/exceptions.rst:1053 msgid ":exc:`KeyError`" msgstr "" -#: ../../c-api/exceptions.rst:1090 -msgid ":c:data:`PyExc_KeyboardInterrupt`" -msgstr "" - -#: ../../c-api/exceptions.rst:1090 +#: ../../c-api/exceptions.rst:1055 msgid ":exc:`KeyboardInterrupt`" msgstr "" -#: ../../c-api/exceptions.rst:1092 -msgid ":c:data:`PyExc_LookupError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1092 +#: ../../c-api/exceptions.rst:1057 msgid ":exc:`LookupError`" msgstr "" -#: ../../c-api/exceptions.rst:1094 -msgid ":c:data:`PyExc_MemoryError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1094 +#: ../../c-api/exceptions.rst:1059 msgid ":exc:`MemoryError`" msgstr "" -#: ../../c-api/exceptions.rst:1096 -msgid ":c:data:`PyExc_ModuleNotFoundError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1096 +#: ../../c-api/exceptions.rst:1061 msgid ":exc:`ModuleNotFoundError`" msgstr "" -#: ../../c-api/exceptions.rst:1098 -msgid ":c:data:`PyExc_NameError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1098 +#: ../../c-api/exceptions.rst:1063 msgid ":exc:`NameError`" msgstr "" -#: ../../c-api/exceptions.rst:1100 -msgid ":c:data:`PyExc_NotADirectoryError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1100 +#: ../../c-api/exceptions.rst:1065 msgid ":exc:`NotADirectoryError`" msgstr "" -#: ../../c-api/exceptions.rst:1102 -msgid ":c:data:`PyExc_NotImplementedError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1102 +#: ../../c-api/exceptions.rst:1067 msgid ":exc:`NotImplementedError`" msgstr "" -#: ../../c-api/exceptions.rst:1104 -msgid ":c:data:`PyExc_OSError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1104 +#: ../../c-api/exceptions.rst:1069 ../../c-api/exceptions.rst:1152 +#: ../../c-api/exceptions.rst:1155 ../../c-api/exceptions.rst:1158 msgid ":exc:`OSError`" msgstr "" -#: ../../c-api/exceptions.rst:1106 -msgid ":c:data:`PyExc_OverflowError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1106 +#: ../../c-api/exceptions.rst:1071 msgid ":exc:`OverflowError`" msgstr "" -#: ../../c-api/exceptions.rst:1108 -msgid ":c:data:`PyExc_PermissionError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1108 +#: ../../c-api/exceptions.rst:1073 msgid ":exc:`PermissionError`" msgstr "" -#: ../../c-api/exceptions.rst:1110 -msgid ":c:data:`PyExc_ProcessLookupError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1110 +#: ../../c-api/exceptions.rst:1075 msgid ":exc:`ProcessLookupError`" msgstr "" -#: ../../c-api/exceptions.rst:1112 -msgid ":c:data:`PyExc_PythonFinalizationError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1112 +#: ../../c-api/exceptions.rst:1077 msgid ":exc:`PythonFinalizationError`" msgstr "" -#: ../../c-api/exceptions.rst:1114 -msgid ":c:data:`PyExc_RecursionError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1114 +#: ../../c-api/exceptions.rst:1079 msgid ":exc:`RecursionError`" msgstr "" -#: ../../c-api/exceptions.rst:1116 -msgid ":c:data:`PyExc_ReferenceError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1116 +#: ../../c-api/exceptions.rst:1081 msgid ":exc:`ReferenceError`" msgstr "" -#: ../../c-api/exceptions.rst:1118 -msgid ":c:data:`PyExc_RuntimeError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1118 +#: ../../c-api/exceptions.rst:1083 msgid ":exc:`RuntimeError`" msgstr "" -#: ../../c-api/exceptions.rst:1120 -msgid ":c:data:`PyExc_StopAsyncIteration`" -msgstr "" - -#: ../../c-api/exceptions.rst:1120 +#: ../../c-api/exceptions.rst:1085 msgid ":exc:`StopAsyncIteration`" msgstr "" -#: ../../c-api/exceptions.rst:1122 -msgid ":c:data:`PyExc_StopIteration`" -msgstr "" - -#: ../../c-api/exceptions.rst:1122 +#: ../../c-api/exceptions.rst:1087 msgid ":exc:`StopIteration`" msgstr "" -#: ../../c-api/exceptions.rst:1124 -msgid ":c:data:`PyExc_SyntaxError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1124 +#: ../../c-api/exceptions.rst:1089 msgid ":exc:`SyntaxError`" msgstr "" -#: ../../c-api/exceptions.rst:1126 -msgid ":c:data:`PyExc_SystemError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1126 +#: ../../c-api/exceptions.rst:1091 msgid ":exc:`SystemError`" msgstr "" -#: ../../c-api/exceptions.rst:1128 -msgid ":c:data:`PyExc_SystemExit`" -msgstr "" - -#: ../../c-api/exceptions.rst:1128 +#: ../../c-api/exceptions.rst:1093 msgid ":exc:`SystemExit`" msgstr "" -#: ../../c-api/exceptions.rst:1130 -msgid ":c:data:`PyExc_TabError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1130 +#: ../../c-api/exceptions.rst:1095 msgid ":exc:`TabError`" msgstr "" -#: ../../c-api/exceptions.rst:1132 -msgid ":c:data:`PyExc_TimeoutError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1132 +#: ../../c-api/exceptions.rst:1097 msgid ":exc:`TimeoutError`" msgstr "" -#: ../../c-api/exceptions.rst:1134 -msgid ":c:data:`PyExc_TypeError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1134 +#: ../../c-api/exceptions.rst:1099 msgid ":exc:`TypeError`" msgstr "" -#: ../../c-api/exceptions.rst:1136 -msgid ":c:data:`PyExc_UnboundLocalError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1136 +#: ../../c-api/exceptions.rst:1101 msgid ":exc:`UnboundLocalError`" msgstr "" -#: ../../c-api/exceptions.rst:1138 -msgid ":c:data:`PyExc_UnicodeDecodeError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1138 +#: ../../c-api/exceptions.rst:1103 msgid ":exc:`UnicodeDecodeError`" msgstr "" -#: ../../c-api/exceptions.rst:1140 -msgid ":c:data:`PyExc_UnicodeEncodeError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1140 +#: ../../c-api/exceptions.rst:1105 msgid ":exc:`UnicodeEncodeError`" msgstr "" -#: ../../c-api/exceptions.rst:1142 -msgid ":c:data:`PyExc_UnicodeError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1142 +#: ../../c-api/exceptions.rst:1107 msgid ":exc:`UnicodeError`" msgstr "" -#: ../../c-api/exceptions.rst:1144 -msgid ":c:data:`PyExc_UnicodeTranslateError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1144 +#: ../../c-api/exceptions.rst:1109 msgid ":exc:`UnicodeTranslateError`" msgstr "" -#: ../../c-api/exceptions.rst:1146 -msgid ":c:data:`PyExc_ValueError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1146 +#: ../../c-api/exceptions.rst:1111 msgid ":exc:`ValueError`" msgstr "" -#: ../../c-api/exceptions.rst:1148 -msgid ":c:data:`PyExc_ZeroDivisionError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1148 +#: ../../c-api/exceptions.rst:1113 msgid ":exc:`ZeroDivisionError`" msgstr "" -#: ../../c-api/exceptions.rst:1151 +#: ../../c-api/exceptions.rst:1115 msgid "" ":c:data:`PyExc_BlockingIOError`, :c:data:`PyExc_BrokenPipeError`, :c:data:" "`PyExc_ChildProcessError`, :c:data:`PyExc_ConnectionError`, :c:data:" @@ -1522,162 +1319,106 @@ msgid "" "`PyExc_TimeoutError` were introduced following :pep:`3151`." msgstr "" -#: ../../c-api/exceptions.rst:1161 +#: ../../c-api/exceptions.rst:1125 msgid ":c:data:`PyExc_StopAsyncIteration` and :c:data:`PyExc_RecursionError`." msgstr "" -#: ../../c-api/exceptions.rst:1164 +#: ../../c-api/exceptions.rst:1128 msgid ":c:data:`PyExc_ModuleNotFoundError`." msgstr "" -#: ../../c-api/exceptions.rst:1167 -msgid "These are compatibility aliases to :c:data:`PyExc_OSError`:" -msgstr "" - -#: ../../c-api/exceptions.rst:1177 -msgid ":c:data:`!PyExc_EnvironmentError`" +#: ../../c-api/exceptions.rst:1131 +msgid ":c:data:`PyExc_BaseExceptionGroup`." msgstr "" -#: ../../c-api/exceptions.rst:1179 -msgid ":c:data:`!PyExc_IOError`" -msgstr "" - -#: ../../c-api/exceptions.rst:1181 -msgid ":c:data:`!PyExc_WindowsError`" +#: ../../c-api/exceptions.rst:1136 +msgid "OSError aliases" msgstr "" -#: ../../c-api/exceptions.rst:1181 -msgid "[2]_" +#: ../../c-api/exceptions.rst:1138 +msgid "The following are a compatibility aliases to :c:data:`PyExc_OSError`." msgstr "" -#: ../../c-api/exceptions.rst:1184 +#: ../../c-api/exceptions.rst:1140 msgid "These aliases used to be separate exception types." msgstr "" -#: ../../c-api/exceptions.rst:1187 ../../c-api/exceptions.rst:1248 -msgid "Notes:" -msgstr "" - -#: ../../c-api/exceptions.rst:1190 -msgid "This is a base class for other standard exceptions." +#: ../../c-api/exceptions.rst:1150 +msgid "Notes" msgstr "" -#: ../../c-api/exceptions.rst:1193 -msgid "" -"Only defined on Windows; protect code that uses this by testing that the " -"preprocessor macro ``MS_WINDOWS`` is defined." +#: ../../c-api/exceptions.rst:1159 +msgid "[win]_" msgstr "" -#: ../../c-api/exceptions.rst:1199 -msgid "Standard Warning Categories" +#: ../../c-api/exceptions.rst:1161 +msgid "Notes:" msgstr "" -#: ../../c-api/exceptions.rst:1201 +#: ../../c-api/exceptions.rst:1164 msgid "" -"All standard Python 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. For completeness, " -"here are all the variables:" +":c:var:`!PyExc_WindowsError` is only defined on Windows; protect code that " +"uses this by testing that the preprocessor macro ``MS_WINDOWS`` is defined." msgstr "" -#: ../../c-api/exceptions.rst:1222 -msgid ":c:data:`PyExc_Warning`" +#: ../../c-api/exceptions.rst:1171 +msgid "Warning types" msgstr "" -#: ../../c-api/exceptions.rst:1222 +#: ../../c-api/exceptions.rst:1181 msgid ":exc:`Warning`" msgstr "" -#: ../../c-api/exceptions.rst:1222 -msgid "[3]_" -msgstr "" - -#: ../../c-api/exceptions.rst:1224 -msgid ":c:data:`PyExc_BytesWarning`" -msgstr "" - -#: ../../c-api/exceptions.rst:1224 +#: ../../c-api/exceptions.rst:1183 msgid ":exc:`BytesWarning`" msgstr "" -#: ../../c-api/exceptions.rst:1226 -msgid ":c:data:`PyExc_DeprecationWarning`" -msgstr "" - -#: ../../c-api/exceptions.rst:1226 +#: ../../c-api/exceptions.rst:1185 msgid ":exc:`DeprecationWarning`" msgstr "" -#: ../../c-api/exceptions.rst:1228 -msgid ":c:data:`PyExc_FutureWarning`" +#: ../../c-api/exceptions.rst:1187 +msgid ":exc:`EncodingWarning`" msgstr "" -#: ../../c-api/exceptions.rst:1228 +#: ../../c-api/exceptions.rst:1189 msgid ":exc:`FutureWarning`" msgstr "" -#: ../../c-api/exceptions.rst:1230 -msgid ":c:data:`PyExc_ImportWarning`" -msgstr "" - -#: ../../c-api/exceptions.rst:1230 +#: ../../c-api/exceptions.rst:1191 msgid ":exc:`ImportWarning`" msgstr "" -#: ../../c-api/exceptions.rst:1232 -msgid ":c:data:`PyExc_PendingDeprecationWarning`" -msgstr "" - -#: ../../c-api/exceptions.rst:1232 +#: ../../c-api/exceptions.rst:1193 msgid ":exc:`PendingDeprecationWarning`" msgstr "" -#: ../../c-api/exceptions.rst:1234 -msgid ":c:data:`PyExc_ResourceWarning`" -msgstr "" - -#: ../../c-api/exceptions.rst:1234 +#: ../../c-api/exceptions.rst:1195 msgid ":exc:`ResourceWarning`" msgstr "" -#: ../../c-api/exceptions.rst:1236 -msgid ":c:data:`PyExc_RuntimeWarning`" -msgstr "" - -#: ../../c-api/exceptions.rst:1236 +#: ../../c-api/exceptions.rst:1197 msgid ":exc:`RuntimeWarning`" msgstr "" -#: ../../c-api/exceptions.rst:1238 -msgid ":c:data:`PyExc_SyntaxWarning`" -msgstr "" - -#: ../../c-api/exceptions.rst:1238 +#: ../../c-api/exceptions.rst:1199 msgid ":exc:`SyntaxWarning`" msgstr "" -#: ../../c-api/exceptions.rst:1240 -msgid ":c:data:`PyExc_UnicodeWarning`" -msgstr "" - -#: ../../c-api/exceptions.rst:1240 +#: ../../c-api/exceptions.rst:1201 msgid ":exc:`UnicodeWarning`" msgstr "" -#: ../../c-api/exceptions.rst:1242 -msgid ":c:data:`PyExc_UserWarning`" -msgstr "" - -#: ../../c-api/exceptions.rst:1242 +#: ../../c-api/exceptions.rst:1203 msgid ":exc:`UserWarning`" msgstr "" -#: ../../c-api/exceptions.rst:1245 +#: ../../c-api/exceptions.rst:1205 msgid ":c:data:`PyExc_ResourceWarning`." msgstr "" -#: ../../c-api/exceptions.rst:1251 -msgid "This is a base class for other standard warning categories." +#: ../../c-api/exceptions.rst:1208 +msgid ":c:data:`PyExc_EncodingWarning`." msgstr "" #: ../../c-api/exceptions.rst:183 @@ -1702,275 +1443,3 @@ msgstr "" #: ../../c-api/exceptions.rst:683 msgid "KeyboardInterrupt (built-in exception)" msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_BaseException (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_Exception (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_ArithmeticError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_AssertionError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_AttributeError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_BlockingIOError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_BrokenPipeError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_BufferError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_ChildProcessError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_ConnectionAbortedError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_ConnectionError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_ConnectionRefusedError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_ConnectionResetError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_EOFError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_FileExistsError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_FileNotFoundError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_FloatingPointError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_GeneratorExit (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_ImportError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_IndentationError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_IndexError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_InterruptedError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_IsADirectoryError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_KeyError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_KeyboardInterrupt (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_LookupError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_MemoryError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_ModuleNotFoundError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_NameError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_NotADirectoryError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_NotImplementedError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_OSError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_OverflowError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_PermissionError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_ProcessLookupError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_PythonFinalizationError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_RecursionError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_ReferenceError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_RuntimeError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_StopAsyncIteration (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_StopIteration (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_SyntaxError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_SystemError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_SystemExit (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_TabError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_TimeoutError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_TypeError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_UnboundLocalError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_UnicodeDecodeError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_UnicodeEncodeError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_UnicodeError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_UnicodeTranslateError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_ValueError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:983 -msgid "PyExc_ZeroDivisionError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:1169 -msgid "PyExc_EnvironmentError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:1169 -msgid "PyExc_IOError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:1169 -msgid "PyExc_WindowsError (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:1206 -msgid "PyExc_Warning (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:1206 -msgid "PyExc_BytesWarning (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:1206 -msgid "PyExc_DeprecationWarning (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:1206 -msgid "PyExc_FutureWarning (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:1206 -msgid "PyExc_ImportWarning (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:1206 -msgid "PyExc_PendingDeprecationWarning (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:1206 -msgid "PyExc_ResourceWarning (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:1206 -msgid "PyExc_RuntimeWarning (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:1206 -msgid "PyExc_SyntaxWarning (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:1206 -msgid "PyExc_UnicodeWarning (C var)" -msgstr "" - -#: ../../c-api/exceptions.rst:1206 -msgid "PyExc_UserWarning (C var)" -msgstr "" diff --git a/c-api/file.po b/c-api/file.po index 8a443158f..d2bb35523 100644 --- a/c-api/file.po +++ b/c-api/file.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:48+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/float.po b/c-api/float.po index d4a495b73..edc77bb66 100644 --- a/c-api/float.po +++ b/c-api/float.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 00:48+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/frame.po b/c-api/frame.po index 9af2130de..ceb942f9f 100644 --- a/c-api/frame.po +++ b/c-api/frame.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2022-11-05 19:48+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/c-api/function.po b/c-api/function.po index 91eda24ed..9f75ebc8f 100644 --- a/c-api/function.po +++ b/c-api/function.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:48+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -105,8 +106,8 @@ msgid "" "must be ``Py_None`` or a tuple." msgstr "" -#: ../../c-api/function.rst:86 ../../c-api/function.rst:109 -#: ../../c-api/function.rst:123 +#: ../../c-api/function.rst:86 ../../c-api/function.rst:116 +#: ../../c-api/function.rst:130 msgid "Raises :exc:`SystemError` and returns ``-1`` on failure." msgstr "" @@ -120,31 +121,44 @@ msgid "" "unaltered (default) vectorcall function!" msgstr "" -#: ../../c-api/function.rst:100 +#: ../../c-api/function.rst:101 +msgid "" +"Return the keyword-only argument default values of the function object *op*. " +"This can be a dictionary of arguments or ``NULL``." +msgstr "" + +#: ../../c-api/function.rst:107 msgid "" "Return the closure associated with the function object *op*. This can be " "``NULL`` or a tuple of cell objects." msgstr "" -#: ../../c-api/function.rst:106 +#: ../../c-api/function.rst:113 msgid "" "Set the closure associated with the function object *op*. *closure* must be " "``Py_None`` or a tuple of cell objects." msgstr "" -#: ../../c-api/function.rst:114 +#: ../../c-api/function.rst:121 msgid "" "Return the annotations of the function object *op*. This can be a mutable " "dictionary or ``NULL``." msgstr "" -#: ../../c-api/function.rst:120 +#: ../../c-api/function.rst:127 msgid "" "Set the annotations for the function object *op*. *annotations* must be a " "dictionary or ``Py_None``." msgstr "" -#: ../../c-api/function.rst:128 +#: ../../c-api/function.rst:141 +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 "" + +#: ../../c-api/function.rst:148 msgid "" "Register *callback* as a function watcher for the current interpreter. " "Return an ID which may be passed to :c:func:`PyFunction_ClearWatcher`. In " @@ -152,7 +166,7 @@ msgid "" "exception." msgstr "" -#: ../../c-api/function.rst:138 +#: ../../c-api/function.rst:158 msgid "" "Clear watcher identified by *watcher_id* previously returned from :c:func:" "`PyFunction_AddWatcher` for the current interpreter. Return ``0`` on " @@ -160,35 +174,35 @@ msgid "" "*watcher_id* was never registered.)" msgstr "" -#: ../../c-api/function.rst:148 +#: ../../c-api/function.rst:168 msgid "Enumeration of possible function watcher events:" msgstr "" -#: ../../c-api/function.rst:150 +#: ../../c-api/function.rst:170 msgid "``PyFunction_EVENT_CREATE``" msgstr "" -#: ../../c-api/function.rst:151 +#: ../../c-api/function.rst:171 msgid "``PyFunction_EVENT_DESTROY``" msgstr "" -#: ../../c-api/function.rst:152 +#: ../../c-api/function.rst:172 msgid "``PyFunction_EVENT_MODIFY_CODE``" msgstr "" -#: ../../c-api/function.rst:153 +#: ../../c-api/function.rst:173 msgid "``PyFunction_EVENT_MODIFY_DEFAULTS``" msgstr "" -#: ../../c-api/function.rst:154 +#: ../../c-api/function.rst:174 msgid "``PyFunction_EVENT_MODIFY_KWDEFAULTS``" msgstr "" -#: ../../c-api/function.rst:161 +#: ../../c-api/function.rst:181 msgid "Type of a function watcher callback function." msgstr "" -#: ../../c-api/function.rst:163 +#: ../../c-api/function.rst:183 msgid "" "If *event* is ``PyFunction_EVENT_CREATE`` or ``PyFunction_EVENT_DESTROY`` " "then *new_value* will be ``NULL``. Otherwise, *new_value* will hold a :term:" @@ -196,16 +210,16 @@ msgid "" "for the attribute that is being modified." msgstr "" -#: ../../c-api/function.rst:168 +#: ../../c-api/function.rst:188 msgid "" "The callback may inspect but must not modify *func*; doing so could have " "unpredictable effects, including infinite recursion." msgstr "" -#: ../../c-api/function.rst:171 +#: ../../c-api/function.rst:191 msgid "" "If *event* is ``PyFunction_EVENT_CREATE``, then the callback is invoked " -"after `func` has been fully initialized. Otherwise, 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. " @@ -214,7 +228,7 @@ msgid "" "semantics of the Python code being executed." msgstr "" -#: ../../c-api/function.rst:180 +#: ../../c-api/function.rst:200 msgid "" "If *event* is ``PyFunction_EVENT_DESTROY``, Taking a reference in the " "callback to the about-to-be-destroyed function will resurrect it, preventing " @@ -222,14 +236,14 @@ msgid "" "later, any watcher callbacks active at that time will be called again." msgstr "" -#: ../../c-api/function.rst:185 +#: ../../c-api/function.rst:205 msgid "" "If the callback sets an exception, it must return ``-1``; this exception " "will be printed as an unraisable exception using :c:func:" "`PyErr_WriteUnraisable`. Otherwise it should return ``0``." msgstr "" -#: ../../c-api/function.rst:189 +#: ../../c-api/function.rst:209 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 " diff --git a/c-api/gcsupport.po b/c-api/gcsupport.po index 47b241fb0..7956a95d0 100644 --- a/c-api/gcsupport.po +++ b/c-api/gcsupport.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:48+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -109,13 +113,53 @@ msgid "" "macro:`Py_TPFLAGS_HAVE_GC` flag set." msgstr "" -#: ../../c-api/gcsupport.rst:62 +#: ../../c-api/gcsupport.rst:60 ../../c-api/gcsupport.rst:84 +msgid "" +"Do not call this directly to allocate memory for an object; call the type's :" +"c:member:`~PyTypeObject.tp_alloc` slot instead." +msgstr "" + +#: ../../c-api/gcsupport.rst:63 ../../c-api/gcsupport.rst:87 +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 "" + +#: ../../c-api/gcsupport.rst:67 ../../c-api/gcsupport.rst:91 +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 "" + +#: ../../c-api/gcsupport.rst:73 ../../c-api/gcsupport.rst:97 +msgid ":c:func:`PyObject_GC_Del`" +msgstr "" + +#: ../../c-api/gcsupport.rst:74 +msgid ":c:macro:`PyObject_New`" +msgstr "" + +#: ../../c-api/gcsupport.rst:75 ../../c-api/gcsupport.rst:99 +#: ../../c-api/gcsupport.rst:193 +msgid ":c:func:`PyType_GenericAlloc`" +msgstr "" + +#: ../../c-api/gcsupport.rst:76 ../../c-api/gcsupport.rst:100 +msgid ":c:member:`~PyTypeObject.tp_alloc`" +msgstr "" + +#: ../../c-api/gcsupport.rst:81 msgid "" "Analogous to :c:macro:`PyObject_NewVar` but for container objects with the :" "c:macro:`Py_TPFLAGS_HAVE_GC` flag set." msgstr "" -#: ../../c-api/gcsupport.rst:67 +#: ../../c-api/gcsupport.rst:98 +msgid ":c:macro:`PyObject_NewVar`" +msgstr "" + +#: ../../c-api/gcsupport.rst:105 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`). " @@ -123,13 +167,20 @@ msgid "" "object header `." msgstr "" -#: ../../c-api/gcsupport.rst:73 +#: ../../c-api/gcsupport.rst:111 msgid "" "The extra data will be deallocated with the object, but otherwise it is not " "managed by Python." msgstr "" -#: ../../c-api/gcsupport.rst:77 +#: ../../c-api/gcsupport.rst:114 +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 "" + +#: ../../c-api/gcsupport.rst:119 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 " @@ -137,20 +188,20 @@ msgid "" "`~PyTypeObject.tp_itemsize` instead." msgstr "" -#: ../../c-api/gcsupport.rst:88 +#: ../../c-api/gcsupport.rst:130 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 "" -#: ../../c-api/gcsupport.rst:92 +#: ../../c-api/gcsupport.rst:134 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 "" -#: ../../c-api/gcsupport.rst:99 +#: ../../c-api/gcsupport.rst:141 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 " @@ -159,45 +210,74 @@ msgid "" "usually near the end of the constructor." msgstr "" -#: ../../c-api/gcsupport.rst:108 +#: ../../c-api/gcsupport.rst:150 msgid "" "Returns non-zero if the object implements the garbage collector protocol, " "otherwise returns 0." msgstr "" -#: ../../c-api/gcsupport.rst:111 +#: ../../c-api/gcsupport.rst:153 msgid "" "The object cannot be tracked by the garbage collector if this function " "returns 0." msgstr "" -#: ../../c-api/gcsupport.rst:116 +#: ../../c-api/gcsupport.rst:158 msgid "" "Returns 1 if the object type of *op* implements the GC protocol and *op* is " "being currently tracked by the garbage collector and 0 otherwise." msgstr "" -#: ../../c-api/gcsupport.rst:119 +#: ../../c-api/gcsupport.rst:161 msgid "This is analogous to the Python function :func:`gc.is_tracked`." msgstr "" -#: ../../c-api/gcsupport.rst:126 +#: ../../c-api/gcsupport.rst:168 msgid "" "Returns 1 if the object type of *op* implements the GC protocol and *op* has " "been already finalized by the garbage collector and 0 otherwise." msgstr "" -#: ../../c-api/gcsupport.rst:129 +#: ../../c-api/gcsupport.rst:171 msgid "This is analogous to the Python function :func:`gc.is_finalized`." msgstr "" -#: ../../c-api/gcsupport.rst:136 +#: ../../c-api/gcsupport.rst:178 msgid "" "Releases memory allocated to an object using :c:macro:`PyObject_GC_New` or :" "c:macro:`PyObject_GC_NewVar`." msgstr "" -#: ../../c-api/gcsupport.rst:142 +#: ../../c-api/gcsupport.rst:181 +msgid "" +"Do not call this directly to free an object's memory; call the type's :c:" +"member:`~PyTypeObject.tp_free` slot instead." +msgstr "" + +#: ../../c-api/gcsupport.rst:184 +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 "" + +#: ../../c-api/gcsupport.rst:190 +msgid ":c:func:`PyObject_Free` is the non-GC equivalent of this function." +msgstr "" + +#: ../../c-api/gcsupport.rst:191 +msgid ":c:macro:`PyObject_GC_New`" +msgstr "" + +#: ../../c-api/gcsupport.rst:192 +msgid ":c:macro:`PyObject_GC_NewVar`" +msgstr "" + +#: ../../c-api/gcsupport.rst:194 +msgid ":c:member:`~PyTypeObject.tp_free`" +msgstr "" + +#: ../../c-api/gcsupport.rst:199 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 " @@ -207,19 +287,19 @@ msgid "" "handler become invalid." msgstr "" -#: ../../c-api/gcsupport.rst:151 +#: ../../c-api/gcsupport.rst:208 msgid "" "The :c:func:`!_PyObject_GC_TRACK` and :c:func:`!_PyObject_GC_UNTRACK` macros " "have been removed from the public C API." msgstr "" -#: ../../c-api/gcsupport.rst:154 +#: ../../c-api/gcsupport.rst:211 msgid "" "The :c:member:`~PyTypeObject.tp_traverse` handler accepts a function " "parameter of this type:" msgstr "" -#: ../../c-api/gcsupport.rst:159 +#: ../../c-api/gcsupport.rst:216 msgid "" "Type of the visitor function passed to the :c:member:`~PyTypeObject." "tp_traverse` handler. The function should be called with an object to " @@ -229,13 +309,13 @@ msgid "" "users will need to write their own visitor functions." msgstr "" -#: ../../c-api/gcsupport.rst:166 +#: ../../c-api/gcsupport.rst:223 msgid "" "The :c:member:`~PyTypeObject.tp_traverse` handler must have the following " "type:" msgstr "" -#: ../../c-api/gcsupport.rst:171 +#: ../../c-api/gcsupport.rst:228 msgid "" "Traversal function for a container object. Implementations must call the " "*visit* function for each object directly contained by *self*, with the " @@ -245,7 +325,7 @@ msgid "" "returned immediately." msgstr "" -#: ../../c-api/gcsupport.rst:178 +#: ../../c-api/gcsupport.rst:235 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:" @@ -253,14 +333,15 @@ msgid "" "exactly *visit* and *arg*:" msgstr "" -#: ../../c-api/gcsupport.rst:185 +#: ../../c-api/gcsupport.rst:242 msgid "" -"If *o* is not ``NULL``, call the *visit* callback, with arguments *o* and " -"*arg*. If *visit* returns a non-zero value, then return it. Using this " -"macro, :c:member:`~PyTypeObject.tp_traverse` handlers look like::" +"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. Using this macro, :c:member:`~PyTypeObject.tp_traverse` handlers " +"look like::" msgstr "" -#: ../../c-api/gcsupport.rst:190 +#: ../../c-api/gcsupport.rst:247 msgid "" "static int\n" "my_traverse(Noddy *self, visitproc visit, void *arg)\n" @@ -271,13 +352,13 @@ msgid "" "}" msgstr "" -#: ../../c-api/gcsupport.rst:198 +#: ../../c-api/gcsupport.rst:255 msgid "" "The :c:member:`~PyTypeObject.tp_clear` handler must be of the :c:type:" "`inquiry` type, or ``NULL`` if the object is immutable." msgstr "" -#: ../../c-api/gcsupport.rst:204 +#: ../../c-api/gcsupport.rst:261 msgid "" "Drop references that may have created reference cycles. Immutable objects " "do not have to define this method since they can never directly create " @@ -287,23 +368,23 @@ msgid "" "in a reference cycle." msgstr "" -#: ../../c-api/gcsupport.rst:213 +#: ../../c-api/gcsupport.rst:270 msgid "Controlling the Garbage Collector State" msgstr "" -#: ../../c-api/gcsupport.rst:215 +#: ../../c-api/gcsupport.rst:272 msgid "" "The C-API provides the following functions for controlling garbage " "collection runs." msgstr "" -#: ../../c-api/gcsupport.rst:220 +#: ../../c-api/gcsupport.rst:277 msgid "" "Perform a full garbage collection, if the garbage collector is enabled. " "(Note that :func:`gc.collect` runs it unconditionally.)" msgstr "" -#: ../../c-api/gcsupport.rst:223 +#: ../../c-api/gcsupport.rst:280 msgid "" "Returns the number of collected + unreachable objects which cannot be " "collected. If the garbage collector is disabled or already collecting, " @@ -311,54 +392,54 @@ msgid "" "data:`sys.unraisablehook`. This function does not raise exceptions." msgstr "" -#: ../../c-api/gcsupport.rst:233 +#: ../../c-api/gcsupport.rst:290 msgid "" "Enable the garbage collector: similar to :func:`gc.enable`. Returns the " "previous state, 0 for disabled and 1 for enabled." msgstr "" -#: ../../c-api/gcsupport.rst:241 +#: ../../c-api/gcsupport.rst:298 msgid "" "Disable the garbage collector: similar to :func:`gc.disable`. Returns the " "previous state, 0 for disabled and 1 for enabled." msgstr "" -#: ../../c-api/gcsupport.rst:249 +#: ../../c-api/gcsupport.rst:306 msgid "" "Query the state of the garbage collector: similar to :func:`gc.isenabled`. " "Returns the current state, 0 for disabled and 1 for enabled." msgstr "" -#: ../../c-api/gcsupport.rst:256 +#: ../../c-api/gcsupport.rst:313 msgid "Querying Garbage Collector State" msgstr "" -#: ../../c-api/gcsupport.rst:258 +#: ../../c-api/gcsupport.rst:315 msgid "" "The C-API provides the following interface for querying information about " "the garbage collector." msgstr "" -#: ../../c-api/gcsupport.rst:263 +#: ../../c-api/gcsupport.rst:320 msgid "" "Run supplied *callback* on all live GC-capable objects. *arg* is passed " "through to all invocations of *callback*." msgstr "" -#: ../../c-api/gcsupport.rst:267 +#: ../../c-api/gcsupport.rst:324 msgid "" "If new objects are (de)allocated by the callback it is undefined if they " "will be visited." msgstr "" -#: ../../c-api/gcsupport.rst:270 +#: ../../c-api/gcsupport.rst:327 msgid "" "Garbage collection is disabled during operation. Explicitly running a " "collection in the callback may lead to undefined behaviour e.g. visiting the " "same objects multiple times or not at all." msgstr "" -#: ../../c-api/gcsupport.rst:278 +#: ../../c-api/gcsupport.rst:335 msgid "" "Type of the visitor function to be passed to :c:func:" "`PyUnstable_GC_VisitObjects`. *arg* is the same as the *arg* passed to " diff --git a/c-api/gen.po b/c-api/gen.po index 091a21de4..7c0d30ee9 100644 --- a/c-api/gen.po +++ b/c-api/gen.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:48+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/c-api/hash.po b/c-api/hash.po index 4b1c9ac1b..e9e191b12 100644 --- a/c-api/hash.po +++ b/c-api/hash.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2024-02-23 14:15+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/c-api/import.po b/c-api/import.po index a72907ff4..db068150f 100644 --- a/c-api/import.po +++ b/c-api/import.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 00:48+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/index.po b/c-api/index.po index f1ce045ca..2fa511fe7 100644 --- a/c-api/index.po +++ b/c-api/index.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:48+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/c-api/init.po b/c-api/init.po index 52c558482..806c7d2b9 100644 --- a/c-api/init.po +++ b/c-api/init.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:49+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -723,29 +724,18 @@ msgstr "" #: ../../c-api/init.rst:501 msgid "" -"The return value will be ``0`` if the interpreter exits normally (i.e., " -"without an exception), ``1`` if the interpreter exits due to an exception, " -"or ``2`` if the argument list does not represent a valid Python command line." +"The return value is ``2`` if the argument list does not represent a valid " +"Python command line, and otherwise the same as :c:func:`Py_RunMain`." msgstr "" -#: ../../c-api/init.rst:506 -msgid "" -"Note that if an otherwise unhandled :exc:`SystemExit` is raised, this " -"function will not return ``1``, but exit the process, as long as " -"``Py_InspectFlag`` is not set. If ``Py_InspectFlag`` is set, execution will " -"drop into the interactive Python prompt, at which point a second otherwise " -"unhandled :exc:`SystemExit` will still exit the process, while any other " -"means of exiting will set the return value as described above." -msgstr "" - -#: ../../c-api/init.rst:513 +#: ../../c-api/init.rst:504 msgid "" "In terms of the CPython runtime configuration APIs documented in the :ref:" "`runtime configuration ` section (and without accounting for " "error handling), ``Py_Main`` is approximately equivalent to::" msgstr "" -#: ../../c-api/init.rst:517 +#: ../../c-api/init.rst:508 msgid "" "PyConfig config;\n" "PyConfig_InitPythonConfig(&config);\n" @@ -756,7 +746,7 @@ msgid "" "Py_RunMain();" msgstr "" -#: ../../c-api/init.rst:525 +#: ../../c-api/init.rst:516 msgid "" "In normal usage, an embedding application will call this function *instead* " "of calling :c:func:`Py_Initialize`, :c:func:`Py_InitializeEx` or :c:func:" @@ -769,11 +759,11 @@ msgid "" "first initialized)." msgstr "" -#: ../../c-api/init.rst:538 +#: ../../c-api/init.rst:529 msgid "Executes the main module in a fully configured CPython runtime." msgstr "" -#: ../../c-api/init.rst:540 +#: ../../c-api/init.rst:531 msgid "" "Executes the command (:c:member:`PyConfig.run_command`), the script (:c:" "member:`PyConfig.run_filename`) or the module (:c:member:`PyConfig." @@ -782,65 +772,60 @@ msgid "" "``__main__`` module's global namespace." msgstr "" -#: ../../c-api/init.rst:546 +#: ../../c-api/init.rst:537 msgid "" "If :c:member:`PyConfig.inspect` is not set (the default), the return value " "will be ``0`` if the interpreter exits normally (that is, without raising an " -"exception), or ``1`` if the interpreter exits due to an exception. If an " -"otherwise unhandled :exc:`SystemExit` is raised, the function will " -"immediately exit the process instead of returning ``1``." +"exception), the exit status of an unhandled :exc:`SystemExit`, or ``1`` for " +"any other unhandled exception." msgstr "" -#: ../../c-api/init.rst:552 +#: ../../c-api/init.rst:542 msgid "" "If :c:member:`PyConfig.inspect` is set (such as when the :option:`-i` option " "is used), rather than returning when the interpreter exits, execution will " "instead resume in an interactive Python prompt (REPL) using the ``__main__`` " "module's global namespace. If the interpreter exited with an exception, it " "is immediately raised in the REPL session. The function return value is then " -"determined by the way the *REPL session* terminates: returning ``0`` if the " -"session terminates without raising an unhandled exception, exiting " -"immediately for an unhandled :exc:`SystemExit`, and returning ``1`` for any " -"other unhandled exception." +"determined by the way the *REPL session* terminates: ``0``, ``1``, or the " +"status of a :exc:`SystemExit`, as specified above." msgstr "" -#: ../../c-api/init.rst:562 +#: ../../c-api/init.rst:550 msgid "" -"This function always finalizes the Python interpreter regardless of whether " -"it returns a value or immediately exits the process due to an unhandled :exc:" -"`SystemExit` exception." +"This function always finalizes the Python interpreter before it returns." msgstr "" -#: ../../c-api/init.rst:566 +#: ../../c-api/init.rst:552 msgid "" "See :ref:`Python Configuration ` for an example of a " "customized Python that always runs in isolated mode using :c:func:" "`Py_RunMain`." msgstr "" -#: ../../c-api/init.rst:572 +#: ../../c-api/init.rst:558 msgid "" "Register an :mod:`atexit` callback for the target interpreter *interp*. This " "is similar to :c:func:`Py_AtExit`, but takes an explicit interpreter and " "data pointer for the callback." msgstr "" -#: ../../c-api/init.rst:576 +#: ../../c-api/init.rst:562 msgid "There must be an :term:`attached thread state` for *interp*." msgstr "" -#: ../../c-api/init.rst:581 +#: ../../c-api/init.rst:567 msgid "Process-wide parameters" msgstr "" -#: ../../c-api/init.rst:591 +#: ../../c-api/init.rst:577 msgid "" "This API is kept for backward compatibility: setting :c:member:`PyConfig." "program_name` should be used instead, see :ref:`Python Initialization " "Configuration `." msgstr "" -#: ../../c-api/init.rst:595 +#: ../../c-api/init.rst:581 msgid "" "This function should be called before :c:func:`Py_Initialize` is called for " "the first time, if it is called at all. It tells the interpreter the value " @@ -854,39 +839,39 @@ msgid "" "this storage." msgstr "" -#: ../../c-api/init.rst:606 ../../c-api/init.rst:854 ../../c-api/init.rst:890 -#: ../../c-api/init.rst:916 +#: ../../c-api/init.rst:592 ../../c-api/init.rst:840 ../../c-api/init.rst:876 +#: ../../c-api/init.rst:902 msgid "" "Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a :c:expr:" "`wchar_t*` string." msgstr "" -#: ../../c-api/init.rst:614 +#: ../../c-api/init.rst:600 msgid "" "Return the program name set with :c:member:`PyConfig.program_name`, or the " "default. The returned string points into static storage; the caller should " "not modify its value." msgstr "" -#: ../../c-api/init.rst:618 ../../c-api/init.rst:641 ../../c-api/init.rst:689 -#: ../../c-api/init.rst:713 ../../c-api/init.rst:740 ../../c-api/init.rst:928 +#: ../../c-api/init.rst:604 ../../c-api/init.rst:627 ../../c-api/init.rst:675 +#: ../../c-api/init.rst:699 ../../c-api/init.rst:726 ../../c-api/init.rst:914 msgid "" "This function should not be called before :c:func:`Py_Initialize`, otherwise " "it returns ``NULL``." msgstr "" -#: ../../c-api/init.rst:621 ../../c-api/init.rst:644 ../../c-api/init.rst:692 -#: ../../c-api/init.rst:716 ../../c-api/init.rst:745 ../../c-api/init.rst:931 +#: ../../c-api/init.rst:607 ../../c-api/init.rst:630 ../../c-api/init.rst:678 +#: ../../c-api/init.rst:702 ../../c-api/init.rst:731 ../../c-api/init.rst:917 msgid "It now returns ``NULL`` if called before :c:func:`Py_Initialize`." msgstr "" -#: ../../c-api/init.rst:624 ../../c-api/init.rst:719 +#: ../../c-api/init.rst:610 ../../c-api/init.rst:705 msgid "" "Use :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys." "executable`) instead." msgstr "" -#: ../../c-api/init.rst:631 +#: ../../c-api/init.rst:617 msgid "" "Return the *prefix* for installed platform-independent files. This is " "derived through a number of complicated rules from the program name set " @@ -900,7 +885,7 @@ msgid "" "See also the next function." msgstr "" -#: ../../c-api/init.rst:647 +#: ../../c-api/init.rst:633 msgid "" "Use :c:func:`PyConfig_Get(\"base_prefix\") ` (:data:`sys." "base_prefix`) instead. Use :c:func:`PyConfig_Get(\"prefix\") ` " @@ -908,7 +893,7 @@ msgid "" "handled." msgstr "" -#: ../../c-api/init.rst:656 +#: ../../c-api/init.rst:642 msgid "" "Return the *exec-prefix* for installed platform-*dependent* files. This is " "derived through a number of complicated rules from the program name set " @@ -922,7 +907,7 @@ msgid "" "useful on Unix." msgstr "" -#: ../../c-api/init.rst:667 +#: ../../c-api/init.rst:653 msgid "" "Background: The exec-prefix differs from the prefix when platform dependent " "files (such as executables and shared libraries) are installed in a " @@ -931,7 +916,7 @@ msgid "" "independent may be installed in :file:`/usr/local`." msgstr "" -#: ../../c-api/init.rst:673 +#: ../../c-api/init.rst:659 msgid "" "Generally speaking, a platform is a combination of hardware and software " "families, e.g. Sparc machines running the Solaris 2.x operating system are " @@ -945,7 +930,7 @@ msgid "" "independent from the Python version by which they were compiled!)." msgstr "" -#: ../../c-api/init.rst:684 +#: ../../c-api/init.rst:670 msgid "" "System administrators will know how to configure the :program:`mount` or :" "program:`automount` programs to share :file:`/usr/local` between platforms " @@ -953,7 +938,7 @@ msgid "" "platform." msgstr "" -#: ../../c-api/init.rst:695 +#: ../../c-api/init.rst:681 msgid "" "Use :c:func:`PyConfig_Get(\"base_exec_prefix\") ` (:data:`sys." "base_exec_prefix`) instead. Use :c:func:`PyConfig_Get(\"exec_prefix\") " @@ -961,7 +946,7 @@ msgid "" "` need to be handled." msgstr "" -#: ../../c-api/init.rst:707 +#: ../../c-api/init.rst:693 msgid "" "Return the full program name of the Python executable; this is computed as " "a side-effect of deriving the default module search path from the program " @@ -970,7 +955,7 @@ msgid "" "available to Python code as ``sys.executable``." msgstr "" -#: ../../c-api/init.rst:730 +#: ../../c-api/init.rst:716 msgid "" "Return the default module search path; this is computed from the program " "name (set by :c:member:`PyConfig.program_name`) and some environment " @@ -983,23 +968,23 @@ msgid "" "for loading modules." msgstr "" -#: ../../c-api/init.rst:748 +#: ../../c-api/init.rst:734 msgid "" "Use :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:" "`sys.path`) instead." msgstr "" -#: ../../c-api/init.rst:754 +#: ../../c-api/init.rst:740 msgid "" "Return the version of this Python interpreter. This is a string that looks " "something like ::" msgstr "" -#: ../../c-api/init.rst:757 +#: ../../c-api/init.rst:743 msgid "\"3.0a5+ (py3k:63103M, May 12 2008, 00:53:55) \\n[GCC 4.2.3]\"" msgstr "" -#: ../../c-api/init.rst:761 +#: ../../c-api/init.rst:747 msgid "" "The first word (up to the first space character) is the current Python " "version; the first characters are the major and minor version separated by a " @@ -1008,11 +993,11 @@ msgid "" "version`." msgstr "" -#: ../../c-api/init.rst:766 +#: ../../c-api/init.rst:752 msgid "See also the :c:var:`Py_Version` constant." msgstr "" -#: ../../c-api/init.rst:773 +#: ../../c-api/init.rst:759 msgid "" "Return the platform identifier for the current platform. On Unix, this is " "formed from the \"official\" name of the operating system, converted to " @@ -1023,50 +1008,50 @@ msgid "" "available to Python code as ``sys.platform``." msgstr "" -#: ../../c-api/init.rst:784 +#: ../../c-api/init.rst:770 msgid "" "Return the official copyright string for the current Python version, for " "example" msgstr "" -#: ../../c-api/init.rst:786 +#: ../../c-api/init.rst:772 msgid "``'Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam'``" msgstr "" -#: ../../c-api/init.rst:790 +#: ../../c-api/init.rst:776 msgid "" "The returned string points into static storage; the caller should not modify " "its value. The value is available to Python code as ``sys.copyright``." msgstr "" -#: ../../c-api/init.rst:796 +#: ../../c-api/init.rst:782 msgid "" "Return an indication of the compiler used to build the current Python " "version, in square brackets, for example::" msgstr "" -#: ../../c-api/init.rst:799 +#: ../../c-api/init.rst:785 msgid "\"[GCC 2.7.2.2]\"" msgstr "" -#: ../../c-api/init.rst:803 ../../c-api/init.rst:817 +#: ../../c-api/init.rst:789 ../../c-api/init.rst:803 msgid "" "The returned string points into static storage; the caller should not modify " "its value. The value is available to Python code as part of the variable " "``sys.version``." msgstr "" -#: ../../c-api/init.rst:810 +#: ../../c-api/init.rst:796 msgid "" "Return information about the sequence number and build date and time of the " "current Python interpreter instance, for example ::" msgstr "" -#: ../../c-api/init.rst:813 +#: ../../c-api/init.rst:799 msgid "\"#67, Aug 1 1997, 22:34:28\"" msgstr "" -#: ../../c-api/init.rst:829 +#: ../../c-api/init.rst:815 msgid "" "This API is kept for backward compatibility: setting :c:member:`PyConfig." "argv`, :c:member:`PyConfig.parse_argv` and :c:member:`PyConfig.safe_path` " @@ -1074,7 +1059,7 @@ msgid "" "config>`." msgstr "" -#: ../../c-api/init.rst:834 +#: ../../c-api/init.rst:820 msgid "" "Set :data:`sys.argv` based on *argc* and *argv*. These parameters are " "similar to those passed to the program's :c:func:`main` function with the " @@ -1085,84 +1070,84 @@ msgid "" "fatal condition is signalled using :c:func:`Py_FatalError`." msgstr "" -#: ../../c-api/init.rst:842 +#: ../../c-api/init.rst:828 msgid "" "If *updatepath* is zero, this is all the function does. If *updatepath* is " "non-zero, the function also modifies :data:`sys.path` according to the " "following algorithm:" msgstr "" -#: ../../c-api/init.rst:846 +#: ../../c-api/init.rst:832 msgid "" "If the name of an existing script is passed in ``argv[0]``, the absolute " "path of the directory where the script is located is prepended to :data:`sys." "path`." msgstr "" -#: ../../c-api/init.rst:849 +#: ../../c-api/init.rst:835 msgid "" "Otherwise (that is, if *argc* is ``0`` or ``argv[0]`` doesn't point to an " "existing file name), an empty string is prepended to :data:`sys.path`, which " "is the same as prepending the current working directory (``\".\"``)." msgstr "" -#: ../../c-api/init.rst:857 ../../c-api/init.rst:893 +#: ../../c-api/init.rst:843 ../../c-api/init.rst:879 msgid "" "See also :c:member:`PyConfig.orig_argv` and :c:member:`PyConfig.argv` " "members of the :ref:`Python Initialization Configuration `." msgstr "" -#: ../../c-api/init.rst:861 +#: ../../c-api/init.rst:847 msgid "" "It is recommended that applications embedding the Python interpreter for " "purposes other than executing a single script pass ``0`` as *updatepath*, " "and update :data:`sys.path` themselves if desired. See :cve:`2008-5983`." msgstr "" -#: ../../c-api/init.rst:866 +#: ../../c-api/init.rst:852 msgid "" "On versions before 3.1.3, you can achieve the same effect by manually " "popping the first :data:`sys.path` element after having called :c:func:" "`PySys_SetArgv`, for example using::" msgstr "" -#: ../../c-api/init.rst:870 +#: ../../c-api/init.rst:856 msgid "PyRun_SimpleString(\"import sys; sys.path.pop(0)\\n\");" msgstr "" -#: ../../c-api/init.rst:882 +#: ../../c-api/init.rst:868 msgid "" "This API is kept for backward compatibility: setting :c:member:`PyConfig." "argv` and :c:member:`PyConfig.parse_argv` should be used instead, see :ref:" "`Python Initialization Configuration `." msgstr "" -#: ../../c-api/init.rst:886 +#: ../../c-api/init.rst:872 msgid "" "This function works like :c:func:`PySys_SetArgvEx` with *updatepath* set to " "``1`` unless the :program:`python` interpreter was started with the :option:" "`-I`." msgstr "" -#: ../../c-api/init.rst:896 +#: ../../c-api/init.rst:882 msgid "The *updatepath* value depends on :option:`-I`." msgstr "" -#: ../../c-api/init.rst:903 +#: ../../c-api/init.rst:889 msgid "" "This API is kept for backward compatibility: setting :c:member:`PyConfig." "home` should be used instead, see :ref:`Python Initialization Configuration " "`." msgstr "" -#: ../../c-api/init.rst:907 +#: ../../c-api/init.rst:893 msgid "" "Set the default \"home\" directory, that is, the location of the standard " "Python libraries. See :envvar:`PYTHONHOME` for the meaning of the argument " "string." msgstr "" -#: ../../c-api/init.rst:911 +#: ../../c-api/init.rst:897 msgid "" "The argument should point to a zero-terminated character string in static " "storage whose contents will not change for the duration of the program's " @@ -1170,24 +1155,24 @@ msgid "" "this storage." msgstr "" -#: ../../c-api/init.rst:924 +#: ../../c-api/init.rst:910 msgid "" "Return the default \"home\", that is, the value set by :c:member:`PyConfig." "home`, or the value of the :envvar:`PYTHONHOME` environment variable if it " "is set." msgstr "" -#: ../../c-api/init.rst:934 +#: ../../c-api/init.rst:920 msgid "" "Use :c:func:`PyConfig_Get(\"home\") ` or the :envvar:" "`PYTHONHOME` environment variable instead." msgstr "" -#: ../../c-api/init.rst:942 +#: ../../c-api/init.rst:928 msgid "Thread State and the Global Interpreter Lock" msgstr "" -#: ../../c-api/init.rst:949 +#: ../../c-api/init.rst:935 msgid "" "Unless on a :term:`free-threaded ` build of :term:`CPython`, " "the Python interpreter is not fully thread-safe. In order to support multi-" @@ -1200,7 +1185,7 @@ msgid "" "once instead of twice." msgstr "" -#: ../../c-api/init.rst:960 +#: ../../c-api/init.rst:946 msgid "" "Therefore, the rule exists that only the thread that has acquired the :term:" "`GIL` may operate on Python objects or call Python/C API functions. In order " @@ -1210,7 +1195,7 @@ msgid "" "a file, so that other Python threads can run in the meantime." msgstr "" -#: ../../c-api/init.rst:970 +#: ../../c-api/init.rst:956 msgid "" "The Python interpreter keeps some thread-specific bookkeeping information " "inside a data structure called :c:type:`PyThreadState`, known as a :term:" @@ -1219,7 +1204,7 @@ msgid "" "be :term:`attached `." msgstr "" -#: ../../c-api/init.rst:975 +#: ../../c-api/init.rst:961 msgid "" "A thread can only have one :term:`attached thread state` at a time. An " "attached thread state is typically analogous with holding the :term:`GIL`, " @@ -1230,7 +1215,7 @@ msgid "" "attached thread state to call most of the C API." msgstr "" -#: ../../c-api/init.rst:982 +#: ../../c-api/init.rst:968 msgid "" "In general, there will always be an :term:`attached thread state` when using " "Python's C API. Only in some specific cases (such as in a :c:macro:" @@ -1239,46 +1224,46 @@ msgid "" "``NULL``." msgstr "" -#: ../../c-api/init.rst:988 +#: ../../c-api/init.rst:974 msgid "Detaching the thread state from extension code" msgstr "" -#: ../../c-api/init.rst:990 +#: ../../c-api/init.rst:976 msgid "" "Most extension code manipulating the :term:`thread state` has the following " "simple structure::" msgstr "" -#: ../../c-api/init.rst:993 +#: ../../c-api/init.rst:979 msgid "" "Save the thread state in a local variable.\n" "... Do some blocking I/O operation ...\n" "Restore the thread state from the local variable." msgstr "" -#: ../../c-api/init.rst:997 +#: ../../c-api/init.rst:983 msgid "This is so common that a pair of macros exists to simplify it::" msgstr "" -#: ../../c-api/init.rst:999 +#: ../../c-api/init.rst:985 msgid "" "Py_BEGIN_ALLOW_THREADS\n" "... Do some blocking I/O operation ...\n" "Py_END_ALLOW_THREADS" msgstr "" -#: ../../c-api/init.rst:1007 +#: ../../c-api/init.rst:993 msgid "" "The :c:macro:`Py_BEGIN_ALLOW_THREADS` macro opens a new block and declares a " "hidden local variable; the :c:macro:`Py_END_ALLOW_THREADS` macro closes the " "block." msgstr "" -#: ../../c-api/init.rst:1011 +#: ../../c-api/init.rst:997 msgid "The block above expands to the following code::" msgstr "" -#: ../../c-api/init.rst:1013 +#: ../../c-api/init.rst:999 msgid "" "PyThreadState *_save;\n" "\n" @@ -1287,11 +1272,11 @@ msgid "" "PyEval_RestoreThread(_save);" msgstr "" -#: ../../c-api/init.rst:1023 +#: ../../c-api/init.rst:1009 msgid "Here is how these functions work:" msgstr "" -#: ../../c-api/init.rst:1025 +#: ../../c-api/init.rst:1011 msgid "" "The :term:`attached thread state` holds the :term:`GIL` for the entire " "interpreter. When detaching the :term:`attached thread state`, the :term:" @@ -1306,7 +1291,7 @@ msgid "" "can be called again." msgstr "" -#: ../../c-api/init.rst:1035 +#: ../../c-api/init.rst:1021 msgid "" "For :term:`free-threaded ` builds, the :term:`GIL` is " "normally out of the question, but detaching the :term:`thread state " @@ -1316,7 +1301,7 @@ msgid "" "parallelism." msgstr "" -#: ../../c-api/init.rst:1041 +#: ../../c-api/init.rst:1027 msgid "" "Calling system I/O functions is the most common use case for detaching the :" "term:`thread state `, but it can also be useful " @@ -1327,11 +1312,11 @@ msgid "" "compressing or hashing data." msgstr "" -#: ../../c-api/init.rst:1052 +#: ../../c-api/init.rst:1038 msgid "Non-Python created threads" msgstr "" -#: ../../c-api/init.rst:1054 +#: ../../c-api/init.rst:1040 msgid "" "When threads are created using the dedicated Python APIs (such as the :mod:" "`threading` module), a thread state is automatically associated to them and " @@ -1341,7 +1326,7 @@ msgid "" "term:`attached thread state`." msgstr "" -#: ../../c-api/init.rst:1061 +#: ../../c-api/init.rst:1047 msgid "" "If you need to call Python code from these threads (often this will be part " "of a callback API provided by the aforementioned third-party library), you " @@ -1351,14 +1336,14 @@ msgid "" "state>`, and finally free it." msgstr "" -#: ../../c-api/init.rst:1068 +#: ../../c-api/init.rst:1054 msgid "" "The :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release` functions " "do all of the above automatically. The typical idiom for calling into " "Python from a C thread is::" msgstr "" -#: ../../c-api/init.rst:1072 +#: ../../c-api/init.rst:1058 msgid "" "PyGILState_STATE gstate;\n" "gstate = PyGILState_Ensure();\n" @@ -1371,20 +1356,60 @@ msgid "" "PyGILState_Release(gstate);" msgstr "" -#: ../../c-api/init.rst:1082 +#: ../../c-api/init.rst:1068 msgid "" "Note that the ``PyGILState_*`` functions assume there is only one global " "interpreter (created automatically by :c:func:`Py_Initialize`). Python " "supports the creation of additional interpreters (using :c:func:" "`Py_NewInterpreter`), but mixing multiple interpreters and the " -"``PyGILState_*`` API is unsupported." +"``PyGILState_*`` API is unsupported. This is because :c:func:" +"`PyGILState_Ensure` and similar functions default to :term:`attaching " +"` a :term:`thread state` for the main interpreter, " +"meaning that the thread can't safely interact with the calling " +"subinterpreter." +msgstr "" + +#: ../../c-api/init.rst:1078 +msgid "Supporting subinterpreters in non-Python threads" +msgstr "" + +#: ../../c-api/init.rst:1080 +msgid "" +"If you would like to support subinterpreters with non-Python created " +"threads, you must use the ``PyThreadState_*`` API instead of the traditional " +"``PyGILState_*`` API." +msgstr "" + +#: ../../c-api/init.rst:1084 +msgid "" +"In particular, you must store the interpreter state from the calling " +"function and pass it to :c:func:`PyThreadState_New`, which will ensure that " +"the :term:`thread state` is targeting the correct interpreter::" +msgstr "" + +#: ../../c-api/init.rst:1088 +msgid "" +"/* The return value of PyInterpreterState_Get() from the\n" +" function that created this thread. */\n" +"PyInterpreterState *interp = ThreadData->interp;\n" +"PyThreadState *tstate = PyThreadState_New(interp);\n" +"PyThreadState_Swap(tstate);\n" +"\n" +"/* GIL of the subinterpreter is now held.\n" +" Perform Python actions here. */\n" +"result = CallSomeFunction();\n" +"/* evaluate result or handle exception */\n" +"\n" +"/* Destroy the thread state. No Python API allowed beyond this point. */\n" +"PyThreadState_Clear(tstate);\n" +"PyThreadState_DeleteCurrent();" msgstr "" -#: ../../c-api/init.rst:1092 +#: ../../c-api/init.rst:1106 msgid "Cautions about fork()" msgstr "" -#: ../../c-api/init.rst:1094 +#: ../../c-api/init.rst:1108 msgid "" "Another important thing to note about threads is their behaviour in the face " "of the C :c:func:`fork` call. On most systems with :c:func:`fork`, after a " @@ -1393,7 +1418,7 @@ msgid "" "CPython's runtime." msgstr "" -#: ../../c-api/init.rst:1100 +#: ../../c-api/init.rst:1114 msgid "" "The fact that only the \"current\" thread remains means any locks held by " "other threads will never be released. Python solves this for :func:`os.fork` " @@ -1410,7 +1435,7 @@ msgid "" "locks, but is not always able to." msgstr "" -#: ../../c-api/init.rst:1115 +#: ../../c-api/init.rst:1129 msgid "" "The fact that all other threads go away also means that CPython's runtime " "state there must be cleaned up properly, which :func:`os.fork` does. This " @@ -1423,11 +1448,11 @@ msgid "" "called immediately after." msgstr "" -#: ../../c-api/init.rst:1129 +#: ../../c-api/init.rst:1143 msgid "Cautions regarding runtime finalization" msgstr "" -#: ../../c-api/init.rst:1131 +#: ../../c-api/init.rst:1145 msgid "" "In the late stage of :term:`interpreter shutdown`, after attempting to wait " "for non-daemon threads to exit (though this can be interrupted by :class:" @@ -1438,7 +1463,7 @@ msgid "" "acquire the :term:`GIL`." msgstr "" -#: ../../c-api/init.rst:1139 +#: ../../c-api/init.rst:1153 msgid "" "If any thread, other than the finalization thread, attempts to attach a :" "term:`thread state` during finalization, either explicitly or implicitly, " @@ -1448,7 +1473,7 @@ msgid "" "by the blocked thread, or otherwise waits on the blocked thread." msgstr "" -#: ../../c-api/init.rst:1146 +#: ../../c-api/init.rst:1160 msgid "" "Gross? Yes. This prevents random crashes and/or unexpectedly skipped C++ " "finalizations further up the call stack when such threads were forcibly " @@ -1460,17 +1485,17 @@ msgid "" "error handling." msgstr "" -#: ../../c-api/init.rst:1156 +#: ../../c-api/init.rst:1170 msgid "High-level API" msgstr "" -#: ../../c-api/init.rst:1158 +#: ../../c-api/init.rst:1172 msgid "" "These are the most commonly used types and functions when writing C " "extension code, or when embedding the Python interpreter:" msgstr "" -#: ../../c-api/init.rst:1163 +#: ../../c-api/init.rst:1177 msgid "" "This data structure represents the state shared by a number of cooperating " "threads. Threads belonging to the same interpreter share their module " @@ -1478,7 +1503,7 @@ msgid "" "in this structure." msgstr "" -#: ../../c-api/init.rst:1168 +#: ../../c-api/init.rst:1182 msgid "" "Threads belonging to different interpreters initially share nothing, except " "process state like available memory, open file descriptors and such. The " @@ -1486,55 +1511,54 @@ msgid "" "which interpreter they belong." msgstr "" -#: ../../c-api/init.rst:1176 +#: ../../c-api/init.rst:1190 msgid "" "This data structure represents the state of a single thread. The only " "public data member is:" msgstr "" -#: ../../c-api/init.rst:1181 +#: ../../c-api/init.rst:1195 msgid "This thread's interpreter state." msgstr "" -#: ../../c-api/init.rst:1192 +#: ../../c-api/init.rst:1206 msgid "Deprecated function which does nothing." msgstr "" -#: ../../c-api/init.rst:1194 +#: ../../c-api/init.rst:1208 msgid "" "In Python 3.6 and older, this function created the GIL if it didn't exist." msgstr "" -#: ../../c-api/init.rst:1196 +#: ../../c-api/init.rst:1210 msgid "The function now does nothing." msgstr "" -#: ../../c-api/init.rst:1199 +#: ../../c-api/init.rst:1213 msgid "" "This function is now called by :c:func:`Py_Initialize()`, so you don't have " "to call it yourself anymore." msgstr "" -#: ../../c-api/init.rst:1203 +#: ../../c-api/init.rst:1217 msgid "" "This function cannot be called before :c:func:`Py_Initialize()` anymore." msgstr "" -#: ../../c-api/init.rst:1213 +#: ../../c-api/init.rst:1227 msgid "" "Detach the :term:`attached thread state` and return it. The thread will have " "no :term:`thread state` upon returning." msgstr "" -#: ../../c-api/init.rst:1219 +#: ../../c-api/init.rst:1233 msgid "" "Set the :term:`attached thread state` to *tstate*. The passed :term:`thread " "state` **should not** be :term:`attached `, otherwise " "deadlock ensues. *tstate* will be attached upon returning." msgstr "" -#: ../../c-api/init.rst:1224 ../../c-api/init.rst:1291 -#: ../../c-api/init.rst:1582 +#: ../../c-api/init.rst:1238 ../../c-api/init.rst:1609 msgid "" "Calling this function from a thread when the runtime is finalizing will hang " "the thread until the program exits, even if the thread was not created by " @@ -1542,14 +1566,14 @@ msgid "" "details." msgstr "" -#: ../../c-api/init.rst:1229 ../../c-api/init.rst:1296 -#: ../../c-api/init.rst:1592 +#: ../../c-api/init.rst:1243 ../../c-api/init.rst:1314 +#: ../../c-api/init.rst:1619 msgid "" "Hangs the current thread, rather than terminating it, if called while the " "interpreter is finalizing." msgstr "" -#: ../../c-api/init.rst:1235 +#: ../../c-api/init.rst:1249 msgid "" "Return the :term:`attached thread state`. If the thread has no attached " "thread state, (such as when inside of :c:macro:`Py_BEGIN_ALLOW_THREADS` " @@ -1557,42 +1581,48 @@ msgid "" "``NULL``)." msgstr "" -#: ../../c-api/init.rst:1240 +#: ../../c-api/init.rst:1254 msgid "See also :c:func:`PyThreadState_GetUnchecked`." msgstr "" -#: ../../c-api/init.rst:1244 +#: ../../c-api/init.rst:1258 msgid "" "Similar to :c:func:`PyThreadState_Get`, but don't kill the process with a " "fatal error if it is NULL. The caller is responsible to check if the result " "is NULL." msgstr "" -#: ../../c-api/init.rst:1248 +#: ../../c-api/init.rst:1262 msgid "" "In Python 3.5 to 3.12, the function was private and known as " "``_PyThreadState_UncheckedGet()``." msgstr "" -#: ../../c-api/init.rst:1255 +#: ../../c-api/init.rst:1269 msgid "" "Set the :term:`attached thread state` to *tstate*, and return the :term:" "`thread state` that was attached prior to calling." msgstr "" -#: ../../c-api/init.rst:1258 +#: ../../c-api/init.rst:1272 msgid "" "This function is safe to call without an :term:`attached thread state`; it " "will simply return ``NULL`` indicating that there was no prior thread state." msgstr "" -#: ../../c-api/init.rst:1265 +#: ../../c-api/init.rst:1279 +msgid "" +"Similar to :c:func:`PyGILState_Ensure`, this function will hang the thread " +"if the runtime is finalizing." +msgstr "" + +#: ../../c-api/init.rst:1283 msgid "" "The following functions use thread-local storage, and are not compatible " "with sub-interpreters:" msgstr "" -#: ../../c-api/init.rst:1270 +#: ../../c-api/init.rst:1288 msgid "" "Ensure that the current thread is ready to call the Python C API regardless " "of the current state of Python, or of the :term:`attached thread state`. " @@ -1605,7 +1635,7 @@ msgid "" "is acceptable." msgstr "" -#: ../../c-api/init.rst:1280 +#: ../../c-api/init.rst:1298 msgid "" "The return value is an opaque \"handle\" to the :term:`attached thread " "state` when :c:func:`PyGILState_Ensure` was called, and must be passed to :c:" @@ -1615,14 +1645,22 @@ msgid "" "to :c:func:`PyGILState_Release`." msgstr "" -#: ../../c-api/init.rst:1287 +#: ../../c-api/init.rst:1305 msgid "" "When the function returns, there will be an :term:`attached thread state` " "and the thread will be able to call arbitrary Python code. Failure is a " "fatal error." msgstr "" -#: ../../c-api/init.rst:1302 +#: ../../c-api/init.rst:1309 +msgid "" +"Calling this function when the runtime is finalizing is unsafe. Doing so " +"will either hang the thread until the program ends, or fully crash the " +"interpreter in rare cases. Refer to :ref:`cautions-regarding-runtime-" +"finalization` for more details." +msgstr "" + +#: ../../c-api/init.rst:1320 msgid "" "Release any resources previously acquired. After this call, Python's state " "will be the same as it was prior to the corresponding :c:func:" @@ -1630,13 +1668,13 @@ msgid "" "caller, hence the use of the GILState API)." msgstr "" -#: ../../c-api/init.rst:1307 +#: ../../c-api/init.rst:1325 msgid "" "Every call to :c:func:`PyGILState_Ensure` must be matched by a call to :c:" "func:`PyGILState_Release` on the same thread." msgstr "" -#: ../../c-api/init.rst:1313 +#: ../../c-api/init.rst:1330 msgid "" "Get the :term:`attached thread state` for this thread. May return ``NULL`` " "if no GILState API has been used on the current thread. Note that the main " @@ -1644,24 +1682,40 @@ msgid "" "been made on the main thread. This is mainly a helper/diagnostic function." msgstr "" -#: ../../c-api/init.rst:1323 +#: ../../c-api/init.rst:1336 +msgid "" +"This function does not account for :term:`thread states ` " +"created by something other than :c:func:`PyGILState_Ensure` (such as :c:func:" +"`PyThreadState_New`). Prefer :c:func:`PyThreadState_Get` or :c:func:" +"`PyThreadState_GetUnchecked` for most cases." +msgstr "" + +#: ../../c-api/init.rst:1345 msgid "" "Return ``1`` if the current thread is holding the :term:`GIL` and ``0`` " "otherwise. This function can be called from any thread at any time. Only if " -"it has had its Python thread state initialized and currently is holding the :" -"term:`GIL` will it return ``1``. This is mainly a helper/diagnostic " -"function. It can be useful for example in callback contexts or memory " -"allocation functions when knowing that the :term:`GIL` is locked can allow " -"the caller to perform sensitive actions or otherwise behave differently." +"it has had its :term:`thread state ` initialized via :" +"c:func:`PyGILState_Ensure` will it return ``1``. This is mainly a helper/" +"diagnostic function. It can be useful for example in callback contexts or " +"memory allocation functions when knowing that the :term:`GIL` is locked can " +"allow the caller to perform sensitive actions or otherwise behave " +"differently." +msgstr "" + +#: ../../c-api/init.rst:1355 +msgid "" +"If the current Python process has ever created a subinterpreter, this " +"function will *always* return ``1``. Prefer :c:func:" +"`PyThreadState_GetUnchecked` for most cases." msgstr "" -#: ../../c-api/init.rst:1335 +#: ../../c-api/init.rst:1362 msgid "" "The following macros are normally used without a trailing semicolon; look " "for example usage in the Python source distribution." msgstr "" -#: ../../c-api/init.rst:1341 +#: ../../c-api/init.rst:1368 msgid "" "This macro expands to ``{ PyThreadState *_save; _save = PyEval_SaveThread();" "``. Note that it contains an opening brace; it must be matched with a " @@ -1669,7 +1723,7 @@ msgid "" "discussion of this macro." msgstr "" -#: ../../c-api/init.rst:1349 +#: ../../c-api/init.rst:1376 msgid "" "This macro expands to ``PyEval_RestoreThread(_save); }``. Note that it " "contains a closing brace; it must be matched with an earlier :c:macro:" @@ -1677,60 +1731,60 @@ msgid "" "macro." msgstr "" -#: ../../c-api/init.rst:1357 +#: ../../c-api/init.rst:1384 msgid "" "This macro expands to ``PyEval_RestoreThread(_save);``: it is equivalent to :" "c:macro:`Py_END_ALLOW_THREADS` without the closing brace." msgstr "" -#: ../../c-api/init.rst:1363 +#: ../../c-api/init.rst:1390 msgid "" "This macro expands to ``_save = PyEval_SaveThread();``: it is equivalent to :" "c:macro:`Py_BEGIN_ALLOW_THREADS` without the opening brace and variable " "declaration." msgstr "" -#: ../../c-api/init.rst:1369 +#: ../../c-api/init.rst:1396 msgid "Low-level API" msgstr "" -#: ../../c-api/init.rst:1371 +#: ../../c-api/init.rst:1398 msgid "" "All of the following functions must be called after :c:func:`Py_Initialize`." msgstr "" -#: ../../c-api/init.rst:1373 +#: ../../c-api/init.rst:1400 msgid "" ":c:func:`Py_Initialize()` now initializes the :term:`GIL` and sets an :term:" "`attached thread state`." msgstr "" -#: ../../c-api/init.rst:1380 +#: ../../c-api/init.rst:1407 msgid "" "Create a new interpreter state object. An :term:`attached thread state` is " "not needed, but may optionally exist if it is necessary to serialize calls " "to this function." msgstr "" -#: ../../c-api/init.rst:1384 +#: ../../c-api/init.rst:1411 msgid "" "Raises an :ref:`auditing event ` ``cpython." "PyInterpreterState_New`` with no arguments." msgstr "" -#: ../../c-api/init.rst:1389 +#: ../../c-api/init.rst:1416 msgid "" "Reset all information in an interpreter state object. There must be an :" -"term:`attached thread state` for the the interpreter." +"term:`attached thread state` for the interpreter." msgstr "" -#: ../../c-api/init.rst:1392 +#: ../../c-api/init.rst:1419 msgid "" "Raises an :ref:`auditing event ` ``cpython." "PyInterpreterState_Clear`` with no arguments." msgstr "" -#: ../../c-api/init.rst:1397 +#: ../../c-api/init.rst:1424 msgid "" "Destroy an interpreter state object. There **should not** be an :term:" "`attached thread state` for the target interpreter. The interpreter state " @@ -1738,165 +1792,165 @@ msgid "" "`PyInterpreterState_Clear`." msgstr "" -#: ../../c-api/init.rst:1404 +#: ../../c-api/init.rst:1431 msgid "" "Create a new thread state object belonging to the given interpreter object. " "An :term:`attached thread state` is not needed." msgstr "" -#: ../../c-api/init.rst:1409 +#: ../../c-api/init.rst:1436 msgid "" "Reset all information in a :term:`thread state` object. *tstate* must be :" "term:`attached `" msgstr "" -#: ../../c-api/init.rst:1412 +#: ../../c-api/init.rst:1439 msgid "" "This function now calls the :c:member:`PyThreadState.on_delete` callback. " "Previously, that happened in :c:func:`PyThreadState_Delete`." msgstr "" -#: ../../c-api/init.rst:1416 +#: ../../c-api/init.rst:1443 msgid "The :c:member:`PyThreadState.on_delete` callback was removed." msgstr "" -#: ../../c-api/init.rst:1422 +#: ../../c-api/init.rst:1449 msgid "" "Destroy a :term:`thread state` object. *tstate* should not be :term:" "`attached ` to any thread. *tstate* must have been " "reset with a previous call to :c:func:`PyThreadState_Clear`." msgstr "" -#: ../../c-api/init.rst:1430 +#: ../../c-api/init.rst:1457 msgid "" "Detach the :term:`attached thread state` (which must have been reset with a " "previous call to :c:func:`PyThreadState_Clear`) and then destroy it." msgstr "" -#: ../../c-api/init.rst:1433 +#: ../../c-api/init.rst:1460 msgid "" "No :term:`thread state` will be :term:`attached ` " "upon returning." msgstr "" -#: ../../c-api/init.rst:1438 +#: ../../c-api/init.rst:1465 msgid "Get the current frame of the Python thread state *tstate*." msgstr "" -#: ../../c-api/init.rst:1440 +#: ../../c-api/init.rst:1467 msgid "" "Return a :term:`strong reference`. Return ``NULL`` if no frame is currently " "executing." msgstr "" -#: ../../c-api/init.rst:1443 +#: ../../c-api/init.rst:1470 msgid "See also :c:func:`PyEval_GetFrame`." msgstr "" -#: ../../c-api/init.rst:1445 ../../c-api/init.rst:1454 -#: ../../c-api/init.rst:1463 +#: ../../c-api/init.rst:1472 ../../c-api/init.rst:1481 +#: ../../c-api/init.rst:1490 msgid "" "*tstate* must not be ``NULL``, and must be :term:`attached `." msgstr "" -#: ../../c-api/init.rst:1452 +#: ../../c-api/init.rst:1479 msgid "" "Get the unique :term:`thread state` identifier of the Python thread state " "*tstate*." msgstr "" -#: ../../c-api/init.rst:1461 +#: ../../c-api/init.rst:1488 msgid "Get the interpreter of the Python thread state *tstate*." msgstr "" -#: ../../c-api/init.rst:1470 +#: ../../c-api/init.rst:1497 msgid "Suspend tracing and profiling in the Python thread state *tstate*." msgstr "" -#: ../../c-api/init.rst:1472 +#: ../../c-api/init.rst:1499 msgid "Resume them using the :c:func:`PyThreadState_LeaveTracing` function." msgstr "" -#: ../../c-api/init.rst:1479 +#: ../../c-api/init.rst:1506 msgid "" "Resume tracing and profiling in the Python thread state *tstate* suspended " "by the :c:func:`PyThreadState_EnterTracing` function." msgstr "" -#: ../../c-api/init.rst:1482 +#: ../../c-api/init.rst:1509 msgid "" "See also :c:func:`PyEval_SetTrace` and :c:func:`PyEval_SetProfile` functions." msgstr "" -#: ../../c-api/init.rst:1490 +#: ../../c-api/init.rst:1517 msgid "Get the current interpreter." msgstr "" -#: ../../c-api/init.rst:1492 +#: ../../c-api/init.rst:1519 msgid "" "Issue a fatal error if there no :term:`attached thread state`. It cannot " "return NULL." msgstr "" -#: ../../c-api/init.rst:1500 +#: ../../c-api/init.rst:1527 msgid "" "Return the interpreter's unique ID. If there was any error in doing so then " "``-1`` is returned and an error is set." msgstr "" -#: ../../c-api/init.rst:1503 ../../c-api/init.rst:2090 -#: ../../c-api/init.rst:2097 ../../c-api/init.rst:2116 -#: ../../c-api/init.rst:2123 +#: ../../c-api/init.rst:1530 ../../c-api/init.rst:2117 +#: ../../c-api/init.rst:2124 ../../c-api/init.rst:2143 +#: ../../c-api/init.rst:2150 msgid "The caller must have an :term:`attached thread state`." msgstr "" -#: ../../c-api/init.rst:1510 +#: ../../c-api/init.rst:1537 msgid "" "Return a dictionary in which interpreter-specific data may be stored. If " "this function returns ``NULL`` then no exception has been raised and the " "caller should assume no interpreter-specific dict is available." msgstr "" -#: ../../c-api/init.rst:1514 +#: ../../c-api/init.rst:1541 msgid "" "This is not a replacement for :c:func:`PyModule_GetState()`, which " "extensions should use to store interpreter-specific state information." msgstr "" -#: ../../c-api/init.rst:1522 +#: ../../c-api/init.rst:1549 msgid "Type of a frame evaluation function." msgstr "" -#: ../../c-api/init.rst:1524 +#: ../../c-api/init.rst:1551 msgid "" "The *throwflag* parameter is used by the ``throw()`` method of generators: " "if non-zero, handle the current exception." msgstr "" -#: ../../c-api/init.rst:1527 +#: ../../c-api/init.rst:1554 msgid "The function now takes a *tstate* parameter." msgstr "" -#: ../../c-api/init.rst:1530 +#: ../../c-api/init.rst:1557 msgid "" "The *frame* parameter changed from ``PyFrameObject*`` to " "``_PyInterpreterFrame*``." msgstr "" -#: ../../c-api/init.rst:1535 +#: ../../c-api/init.rst:1562 msgid "Get the frame evaluation function." msgstr "" -#: ../../c-api/init.rst:1537 ../../c-api/init.rst:1545 +#: ../../c-api/init.rst:1564 ../../c-api/init.rst:1572 msgid "See the :pep:`523` \"Adding a frame evaluation API to CPython\"." msgstr "" -#: ../../c-api/init.rst:1543 +#: ../../c-api/init.rst:1570 msgid "Set the frame evaluation function." msgstr "" -#: ../../c-api/init.rst:1552 +#: ../../c-api/init.rst:1579 msgid "" "Return a dictionary in which extensions can store thread-specific state " "information. Each extension should use a unique key to use to store state " @@ -1906,7 +1960,7 @@ msgid "" "thread state is attached." msgstr "" -#: ../../c-api/init.rst:1562 +#: ../../c-api/init.rst:1589 msgid "" "Asynchronously raise an exception in a thread. The *id* argument is the " "thread id of the target thread; *exc* is the exception object to be raised. " @@ -1918,54 +1972,54 @@ msgid "" "is cleared. This raises no exceptions." msgstr "" -#: ../../c-api/init.rst:1570 +#: ../../c-api/init.rst:1597 msgid "" "The type of the *id* parameter changed from :c:expr:`long` to :c:expr:" "`unsigned long`." msgstr "" -#: ../../c-api/init.rst:1576 +#: ../../c-api/init.rst:1603 msgid "" ":term:`Attach ` *tstate* to the current thread, which " "must not be ``NULL`` or already :term:`attached `." msgstr "" -#: ../../c-api/init.rst:1579 +#: ../../c-api/init.rst:1606 msgid "" "The calling thread must not already have an :term:`attached thread state`." msgstr "" -#: ../../c-api/init.rst:1587 +#: ../../c-api/init.rst:1614 msgid "" "Updated to be consistent with :c:func:`PyEval_RestoreThread`, :c:func:" "`Py_END_ALLOW_THREADS`, and :c:func:`PyGILState_Ensure`, and terminate the " "current thread if called while the interpreter is finalizing." msgstr "" -#: ../../c-api/init.rst:1596 +#: ../../c-api/init.rst:1623 msgid "" ":c:func:`PyEval_RestoreThread` is a higher-level function which is always " "available (even when threads have not been initialized)." msgstr "" -#: ../../c-api/init.rst:1602 +#: ../../c-api/init.rst:1629 msgid "" "Detach the :term:`attached thread state`. The *tstate* argument, which must " "not be ``NULL``, is only used to check that it represents the :term:" "`attached thread state` --- if it isn't, a fatal error is reported." msgstr "" -#: ../../c-api/init.rst:1607 +#: ../../c-api/init.rst:1634 msgid "" ":c:func:`PyEval_SaveThread` is a higher-level function which is always " "available (even when threads have not been initialized)." msgstr "" -#: ../../c-api/init.rst:1614 +#: ../../c-api/init.rst:1641 msgid "Sub-interpreter support" msgstr "" -#: ../../c-api/init.rst:1616 +#: ../../c-api/init.rst:1643 msgid "" "While in most uses, you will only embed a single Python interpreter, there " "are cases where you need to create several independent interpreters in the " @@ -1973,7 +2027,7 @@ msgid "" "to do that." msgstr "" -#: ../../c-api/init.rst:1621 +#: ../../c-api/init.rst:1648 msgid "" "The \"main\" interpreter is the first one created when the runtime " "initializes. It is usually the only Python interpreter in a process. Unlike " @@ -1984,31 +2038,31 @@ msgid "" "returns a pointer to its state." msgstr "" -#: ../../c-api/init.rst:1628 +#: ../../c-api/init.rst:1655 msgid "" "You can switch between sub-interpreters using the :c:func:" "`PyThreadState_Swap` function. You can create and destroy them using the " "following functions:" msgstr "" -#: ../../c-api/init.rst:1634 +#: ../../c-api/init.rst:1661 msgid "" "Structure containing most parameters to configure a sub-interpreter. Its " "values are used only in :c:func:`Py_NewInterpreterFromConfig` and never " "modified by the runtime." msgstr "" -#: ../../c-api/init.rst:1640 +#: ../../c-api/init.rst:1667 msgid "Structure fields:" msgstr "" -#: ../../c-api/init.rst:1644 +#: ../../c-api/init.rst:1671 msgid "" "If this is ``0`` then the sub-interpreter will use its own \"object\" " "allocator state. Otherwise it will use (share) the main interpreter's." msgstr "" -#: ../../c-api/init.rst:1648 +#: ../../c-api/init.rst:1675 msgid "" "If this is ``0`` then :c:member:`~PyInterpreterConfig." "check_multi_interp_extensions` must be ``1`` (non-zero). If this is ``1`` " @@ -2016,44 +2070,44 @@ msgid "" "`PyInterpreterConfig_OWN_GIL`." msgstr "" -#: ../../c-api/init.rst:1656 +#: ../../c-api/init.rst:1683 msgid "" "If this is ``0`` then the runtime will not support forking the process in " "any thread where the sub-interpreter is currently active. Otherwise fork is " "unrestricted." msgstr "" -#: ../../c-api/init.rst:1660 +#: ../../c-api/init.rst:1687 msgid "" "Note that the :mod:`subprocess` module still works when fork is disallowed." msgstr "" -#: ../../c-api/init.rst:1665 +#: ../../c-api/init.rst:1692 msgid "" "If this is ``0`` then the runtime will not support replacing the current " "process via exec (e.g. :func:`os.execv`) in any thread where the sub-" "interpreter is currently active. Otherwise exec is unrestricted." msgstr "" -#: ../../c-api/init.rst:1670 +#: ../../c-api/init.rst:1697 msgid "" "Note that the :mod:`subprocess` module still works when exec is disallowed." msgstr "" -#: ../../c-api/init.rst:1675 +#: ../../c-api/init.rst:1702 msgid "" "If this is ``0`` then the sub-interpreter's :mod:`threading` module won't " "create threads. Otherwise threads are allowed." msgstr "" -#: ../../c-api/init.rst:1681 +#: ../../c-api/init.rst:1708 msgid "" "If this is ``0`` then the sub-interpreter's :mod:`threading` module won't " "create daemon threads. Otherwise daemon threads are allowed (as long as :c:" "member:`~PyInterpreterConfig.allow_threads` is non-zero)." msgstr "" -#: ../../c-api/init.rst:1688 +#: ../../c-api/init.rst:1715 msgid "" "If this is ``0`` then all extension modules may be imported, including " "legacy (single-phase init) modules, in any thread where the sub-interpreter " @@ -2062,37 +2116,37 @@ msgid "" "`Py_mod_multiple_interpreters`.)" msgstr "" -#: ../../c-api/init.rst:1695 +#: ../../c-api/init.rst:1722 msgid "" "This must be ``1`` (non-zero) if :c:member:`~PyInterpreterConfig." "use_main_obmalloc` is ``0``." msgstr "" -#: ../../c-api/init.rst:1700 +#: ../../c-api/init.rst:1727 msgid "" "This determines the operation of the GIL for the sub-interpreter. It may be " "one of the following:" msgstr "" -#: ../../c-api/init.rst:1707 +#: ../../c-api/init.rst:1734 msgid "Use the default selection (:c:macro:`PyInterpreterConfig_SHARED_GIL`)." msgstr "" -#: ../../c-api/init.rst:1711 +#: ../../c-api/init.rst:1738 msgid "Use (share) the main interpreter's GIL." msgstr "" -#: ../../c-api/init.rst:1715 +#: ../../c-api/init.rst:1742 msgid "Use the sub-interpreter's own GIL." msgstr "" -#: ../../c-api/init.rst:1717 +#: ../../c-api/init.rst:1744 msgid "" "If this is :c:macro:`PyInterpreterConfig_OWN_GIL` then :c:member:" "`PyInterpreterConfig.use_main_obmalloc` must be ``0``." msgstr "" -#: ../../c-api/init.rst:1731 +#: ../../c-api/init.rst:1758 msgid "" "Create a new sub-interpreter. This is an (almost) totally separate " "environment for the execution of Python code. In particular, the new " @@ -2105,13 +2159,13 @@ msgid "" "underlying file descriptors)." msgstr "" -#: ../../c-api/init.rst:1741 +#: ../../c-api/init.rst:1768 msgid "" "The given *config* controls the options with which the interpreter is " "initialized." msgstr "" -#: ../../c-api/init.rst:1744 +#: ../../c-api/init.rst:1771 msgid "" "Upon success, *tstate_p* will be set to the first :term:`thread state` " "created in the new sub-interpreter. This thread state is :term:`attached " @@ -2122,7 +2176,7 @@ msgid "" "not exist." msgstr "" -#: ../../c-api/init.rst:1753 +#: ../../c-api/init.rst:1780 msgid "" "Like all other Python/C API functions, an :term:`attached thread state` must " "be present before calling this function, but it might be detached upon " @@ -2135,13 +2189,13 @@ msgid "" "will remain detached." msgstr "" -#: ../../c-api/init.rst:1764 +#: ../../c-api/init.rst:1791 msgid "" "Sub-interpreters are most effective when isolated from each other, with " "certain functionality restricted::" msgstr "" -#: ../../c-api/init.rst:1767 +#: ../../c-api/init.rst:1794 msgid "" "PyInterpreterConfig config = {\n" " .use_main_obmalloc = 0,\n" @@ -2159,7 +2213,7 @@ msgid "" "}" msgstr "" -#: ../../c-api/init.rst:1782 +#: ../../c-api/init.rst:1809 msgid "" "Note that the config is used only briefly and does not get modified. During " "initialization the config's values are converted into various :c:type:" @@ -2167,11 +2221,11 @@ msgid "" "internally on the :c:type:`PyInterpreterState`." msgstr "" -#: ../../c-api/init.rst:1791 +#: ../../c-api/init.rst:1818 msgid "Extension modules are shared between (sub-)interpreters as follows:" msgstr "" -#: ../../c-api/init.rst:1793 +#: ../../c-api/init.rst:1820 msgid "" "For modules using multi-phase initialization, e.g. :c:func:" "`PyModule_FromDefAndSpec`, a separate module object is created and " @@ -2179,7 +2233,7 @@ msgid "" "are shared between these module objects." msgstr "" -#: ../../c-api/init.rst:1799 +#: ../../c-api/init.rst:1826 msgid "" "For modules using single-phase initialization, e.g. :c:func:" "`PyModule_Create`, the first time a particular extension is imported, it is " @@ -2191,7 +2245,7 @@ msgid "" "might cause unwanted behavior (see `Bugs and caveats`_ below)." msgstr "" -#: ../../c-api/init.rst:1810 +#: ../../c-api/init.rst:1837 msgid "" "Note that this is different from what happens when an extension is imported " "after the interpreter has been completely re-initialized by calling :c:func:" @@ -2201,7 +2255,7 @@ msgid "" "shared between these modules." msgstr "" -#: ../../c-api/init.rst:1830 +#: ../../c-api/init.rst:1857 msgid "" "Create a new sub-interpreter. This is essentially just a wrapper around :c:" "func:`Py_NewInterpreterFromConfig` with a config that preserves the existing " @@ -2210,7 +2264,7 @@ msgid "" "single-phase init modules." msgstr "" -#: ../../c-api/init.rst:1842 +#: ../../c-api/init.rst:1869 msgid "" "Destroy the (sub-)interpreter represented by the given :term:`thread state`. " "The given thread state must be :term:`attached `. " @@ -2218,17 +2272,17 @@ msgid "" "thread states associated with this interpreter are destroyed." msgstr "" -#: ../../c-api/init.rst:1847 +#: ../../c-api/init.rst:1874 msgid "" ":c:func:`Py_FinalizeEx` will destroy all sub-interpreters that haven't been " "explicitly destroyed at that point." msgstr "" -#: ../../c-api/init.rst:1852 +#: ../../c-api/init.rst:1879 msgid "A Per-Interpreter GIL" msgstr "" -#: ../../c-api/init.rst:1854 +#: ../../c-api/init.rst:1881 msgid "" "Using :c:func:`Py_NewInterpreterFromConfig` you can create a sub-interpreter " "that is completely isolated from other interpreters, including having its " @@ -2240,7 +2294,7 @@ msgid "" "just using threads. (See :pep:`554`.)" msgstr "" -#: ../../c-api/init.rst:1864 +#: ../../c-api/init.rst:1891 msgid "" "Using an isolated interpreter requires vigilance in preserving that " "isolation. That especially means not sharing any objects or mutable state " @@ -2254,7 +2308,7 @@ msgid "" "builtin objects." msgstr "" -#: ../../c-api/init.rst:1875 +#: ../../c-api/init.rst:1902 msgid "" "If you preserve isolation then you will have access to proper multi-core " "computing without the complications that come with free-threading. Failure " @@ -2262,7 +2316,7 @@ msgid "" "threading, including races and hard-to-debug crashes." msgstr "" -#: ../../c-api/init.rst:1880 +#: ../../c-api/init.rst:1907 msgid "" "Aside from that, one of the main challenges of using multiple isolated " "interpreters is how to communicate between them safely (not break isolation) " @@ -2272,11 +2326,11 @@ msgid "" "sharing) data between interpreters." msgstr "" -#: ../../c-api/init.rst:1891 +#: ../../c-api/init.rst:1918 msgid "Bugs and caveats" msgstr "" -#: ../../c-api/init.rst:1893 +#: ../../c-api/init.rst:1920 msgid "" "Because sub-interpreters (and the main interpreter) are part of the same " "process, the insulation between them isn't perfect --- for example, using " @@ -2289,7 +2343,7 @@ msgid "" "should be avoided if possible." msgstr "" -#: ../../c-api/init.rst:1903 +#: ../../c-api/init.rst:1930 msgid "" "Special care should be taken to avoid sharing user-defined functions, " "methods, instances or classes between sub-interpreters, since import " @@ -2298,7 +2352,7 @@ msgid "" "objects from which the above are reachable." msgstr "" -#: ../../c-api/init.rst:1909 +#: ../../c-api/init.rst:1936 msgid "" "Also note that combining this functionality with ``PyGILState_*`` APIs is " "delicate, because these APIs assume a bijection between Python thread states " @@ -2310,25 +2364,25 @@ msgid "" "created threads will probably be broken when using sub-interpreters." msgstr "" -#: ../../c-api/init.rst:1920 +#: ../../c-api/init.rst:1947 msgid "Asynchronous Notifications" msgstr "" -#: ../../c-api/init.rst:1922 +#: ../../c-api/init.rst:1949 msgid "" "A mechanism is provided to make asynchronous notifications to the main " "interpreter thread. These notifications take the form of a function pointer " "and a void pointer argument." msgstr "" -#: ../../c-api/init.rst:1929 +#: ../../c-api/init.rst:1956 msgid "" "Schedule a function to be called from the main interpreter thread. On " "success, ``0`` is returned and *func* is queued for being called in the main " "thread. On failure, ``-1`` is returned without setting any exception." msgstr "" -#: ../../c-api/init.rst:1933 +#: ../../c-api/init.rst:1960 msgid "" "When successfully queued, *func* will be *eventually* called from the main " "interpreter thread with the argument *arg*. It will be called " @@ -2336,17 +2390,17 @@ msgid "" "these conditions met:" msgstr "" -#: ../../c-api/init.rst:1938 +#: ../../c-api/init.rst:1965 msgid "on a :term:`bytecode` boundary;" msgstr "" -#: ../../c-api/init.rst:1939 +#: ../../c-api/init.rst:1966 msgid "" "with the main thread holding an :term:`attached thread state` (*func* can " "therefore use the full C API)." msgstr "" -#: ../../c-api/init.rst:1942 +#: ../../c-api/init.rst:1969 msgid "" "*func* must return ``0`` on success, or ``-1`` on failure with an exception " "set. *func* won't be interrupted to perform another asynchronous " @@ -2354,7 +2408,7 @@ msgid "" "if the :term:`thread state ` is detached." msgstr "" -#: ../../c-api/init.rst:1947 +#: ../../c-api/init.rst:1974 msgid "" "This function doesn't need an :term:`attached thread state`. However, to " "call this function in a subinterpreter, the caller must have an :term:" @@ -2362,7 +2416,7 @@ msgid "" "be called from the wrong interpreter." msgstr "" -#: ../../c-api/init.rst:1952 +#: ../../c-api/init.rst:1979 msgid "" "This is a low-level function, only useful for very special cases. There is " "no guarantee that *func* will be called as quick as possible. If the main " @@ -2372,7 +2426,7 @@ msgid "" "`PyGILState API`." msgstr "" -#: ../../c-api/init.rst:1961 +#: ../../c-api/init.rst:1988 msgid "" "If this function is called in a subinterpreter, the function *func* is now " "scheduled to be called from the subinterpreter, rather than being called " @@ -2380,18 +2434,18 @@ msgid "" "scheduled calls." msgstr "" -#: ../../c-api/init.rst:1970 +#: ../../c-api/init.rst:1997 msgid "Profiling and Tracing" msgstr "" -#: ../../c-api/init.rst:1975 +#: ../../c-api/init.rst:2002 msgid "" "The Python interpreter provides some low-level support for attaching " "profiling and execution tracing facilities. These are used for profiling, " "debugging, and coverage analysis tools." msgstr "" -#: ../../c-api/init.rst:1979 +#: ../../c-api/init.rst:2006 msgid "" "This C interface allows the profiling or tracing code to avoid the overhead " "of calling through Python-level callable objects, making a direct C function " @@ -2401,7 +2455,7 @@ msgid "" "reported to the Python-level trace functions in previous versions." msgstr "" -#: ../../c-api/init.rst:1989 +#: ../../c-api/init.rst:2016 msgid "" "The type of the trace function registered using :c:func:`PyEval_SetProfile` " "and :c:func:`PyEval_SetTrace`. The first parameter is the object passed to " @@ -2413,66 +2467,66 @@ msgid "" "value of *what*:" msgstr "" -#: ../../c-api/init.rst:1998 +#: ../../c-api/init.rst:2025 msgid "Value of *what*" msgstr "" -#: ../../c-api/init.rst:1998 +#: ../../c-api/init.rst:2025 msgid "Meaning of *arg*" msgstr "" -#: ../../c-api/init.rst:2000 +#: ../../c-api/init.rst:2027 msgid ":c:data:`PyTrace_CALL`" msgstr "" -#: ../../c-api/init.rst:2000 ../../c-api/init.rst:2005 -#: ../../c-api/init.rst:2016 +#: ../../c-api/init.rst:2027 ../../c-api/init.rst:2032 +#: ../../c-api/init.rst:2043 msgid "Always :c:data:`Py_None`." msgstr "" -#: ../../c-api/init.rst:2002 +#: ../../c-api/init.rst:2029 msgid ":c:data:`PyTrace_EXCEPTION`" msgstr "" -#: ../../c-api/init.rst:2002 +#: ../../c-api/init.rst:2029 msgid "Exception information as returned by :func:`sys.exc_info`." msgstr "" -#: ../../c-api/init.rst:2005 +#: ../../c-api/init.rst:2032 msgid ":c:data:`PyTrace_LINE`" msgstr "" -#: ../../c-api/init.rst:2007 +#: ../../c-api/init.rst:2034 msgid ":c:data:`PyTrace_RETURN`" msgstr "" -#: ../../c-api/init.rst:2007 +#: ../../c-api/init.rst:2034 msgid "" "Value being returned to the caller, or ``NULL`` if caused by an exception." msgstr "" -#: ../../c-api/init.rst:2010 +#: ../../c-api/init.rst:2037 msgid ":c:data:`PyTrace_C_CALL`" msgstr "" -#: ../../c-api/init.rst:2010 ../../c-api/init.rst:2012 -#: ../../c-api/init.rst:2014 +#: ../../c-api/init.rst:2037 ../../c-api/init.rst:2039 +#: ../../c-api/init.rst:2041 msgid "Function object being called." msgstr "" -#: ../../c-api/init.rst:2012 +#: ../../c-api/init.rst:2039 msgid ":c:data:`PyTrace_C_EXCEPTION`" msgstr "" -#: ../../c-api/init.rst:2014 +#: ../../c-api/init.rst:2041 msgid ":c:data:`PyTrace_C_RETURN`" msgstr "" -#: ../../c-api/init.rst:2016 +#: ../../c-api/init.rst:2043 msgid ":c:data:`PyTrace_OPCODE`" msgstr "" -#: ../../c-api/init.rst:2021 +#: ../../c-api/init.rst:2048 msgid "" "The value of the *what* parameter to a :c:type:`Py_tracefunc` function when " "a new call to a function or method is being reported, or a new entry into a " @@ -2481,7 +2535,7 @@ msgid "" "the corresponding frame." msgstr "" -#: ../../c-api/init.rst:2030 +#: ../../c-api/init.rst:2057 msgid "" "The value of the *what* parameter to a :c:type:`Py_tracefunc` function when " "an exception has been raised. The callback function is called with this " @@ -2493,7 +2547,7 @@ msgid "" "profiler." msgstr "" -#: ../../c-api/init.rst:2041 +#: ../../c-api/init.rst:2068 msgid "" "The value passed as the *what* parameter to a :c:type:`Py_tracefunc` " "function (but not a profiling function) when a line-number event is being " @@ -2501,31 +2555,31 @@ msgid "" "f_trace_lines` to *0* on that frame." msgstr "" -#: ../../c-api/init.rst:2049 +#: ../../c-api/init.rst:2076 msgid "" "The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " "a call is about to return." msgstr "" -#: ../../c-api/init.rst:2055 +#: ../../c-api/init.rst:2082 msgid "" "The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " "a C function is about to be called." msgstr "" -#: ../../c-api/init.rst:2061 +#: ../../c-api/init.rst:2088 msgid "" "The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " "a C function has raised an exception." msgstr "" -#: ../../c-api/init.rst:2067 +#: ../../c-api/init.rst:2094 msgid "" "The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " "a C function has returned." msgstr "" -#: ../../c-api/init.rst:2073 +#: ../../c-api/init.rst:2100 msgid "" "The value for the *what* parameter to :c:type:`Py_tracefunc` functions (but " "not profiling functions) when a new opcode is about to be executed. This " @@ -2533,7 +2587,7 @@ msgid "" "attr:`~frame.f_trace_opcodes` to *1* on the frame." msgstr "" -#: ../../c-api/init.rst:2081 +#: ../../c-api/init.rst:2108 msgid "" "Set the profiler function to *func*. The *obj* parameter is passed to the " "function as its first parameter, and may be any Python object, or ``NULL``. " @@ -2543,24 +2597,24 @@ msgid "" "`PyTrace_LINE` :c:data:`PyTrace_OPCODE` and :c:data:`PyTrace_EXCEPTION`." msgstr "" -#: ../../c-api/init.rst:2088 +#: ../../c-api/init.rst:2115 msgid "See also the :func:`sys.setprofile` function." msgstr "" -#: ../../c-api/init.rst:2094 +#: ../../c-api/init.rst:2121 msgid "" "Like :c:func:`PyEval_SetProfile` but sets the profile function in all " "running threads belonging to the current interpreter instead of the setting " "it only on the current thread." msgstr "" -#: ../../c-api/init.rst:2099 +#: ../../c-api/init.rst:2126 msgid "" "As :c:func:`PyEval_SetProfile`, this function ignores any exceptions raised " "while setting the profile functions in all threads." msgstr "" -#: ../../c-api/init.rst:2107 +#: ../../c-api/init.rst:2134 msgid "" "Set the tracing function to *func*. This is similar to :c:func:" "`PyEval_SetProfile`, except the tracing function does receive line-number " @@ -2571,28 +2625,28 @@ msgid "" "*what* parameter." msgstr "" -#: ../../c-api/init.rst:2114 +#: ../../c-api/init.rst:2141 msgid "See also the :func:`sys.settrace` function." msgstr "" -#: ../../c-api/init.rst:2120 +#: ../../c-api/init.rst:2147 msgid "" "Like :c:func:`PyEval_SetTrace` but sets the tracing function in all running " "threads belonging to the current interpreter instead of the setting it only " "on the current thread." msgstr "" -#: ../../c-api/init.rst:2125 +#: ../../c-api/init.rst:2152 msgid "" "As :c:func:`PyEval_SetTrace`, this function ignores any exceptions raised " "while setting the trace functions in all threads." msgstr "" -#: ../../c-api/init.rst:2131 +#: ../../c-api/init.rst:2158 msgid "Reference tracing" msgstr "" -#: ../../c-api/init.rst:2137 +#: ../../c-api/init.rst:2164 msgid "" "The type of the trace function registered using :c:func:" "`PyRefTracer_SetTracer`. The first parameter is a Python object that has " @@ -2602,19 +2656,19 @@ msgid "" "provided when :c:func:`PyRefTracer_SetTracer` was called." msgstr "" -#: ../../c-api/init.rst:2147 +#: ../../c-api/init.rst:2174 msgid "" "The value for the *event* parameter to :c:type:`PyRefTracer` functions when " "a Python object has been created." msgstr "" -#: ../../c-api/init.rst:2152 +#: ../../c-api/init.rst:2179 msgid "" "The value for the *event* parameter to :c:type:`PyRefTracer` functions when " "a Python object has been destroyed." msgstr "" -#: ../../c-api/init.rst:2157 +#: ../../c-api/init.rst:2184 msgid "" "Register a reference tracer function. The function will be called when a new " "Python has been created or when an object is going to be destroyed. If " @@ -2623,7 +2677,7 @@ msgid "" "return ``-1`` on error." msgstr "" -#: ../../c-api/init.rst:2163 +#: ../../c-api/init.rst:2190 msgid "" "Not that tracer functions **must not** create Python objects inside or " "otherwise the call will be re-entrant. The tracer also **must not** clear " @@ -2631,12 +2685,12 @@ msgid "" "active every time the tracer function is called." msgstr "" -#: ../../c-api/init.rst:2168 ../../c-api/init.rst:2179 +#: ../../c-api/init.rst:2195 ../../c-api/init.rst:2206 msgid "" "There must be an :term:`attached thread state` when calling this function." msgstr "" -#: ../../c-api/init.rst:2174 +#: ../../c-api/init.rst:2201 msgid "" "Get the registered reference tracer function and the value of the opaque " "data pointer that was registered when :c:func:`PyRefTracer_SetTracer` was " @@ -2644,48 +2698,48 @@ msgid "" "set the **data** pointer to NULL." msgstr "" -#: ../../c-api/init.rst:2186 +#: ../../c-api/init.rst:2213 msgid "Advanced Debugger Support" msgstr "" -#: ../../c-api/init.rst:2191 +#: ../../c-api/init.rst:2218 msgid "" "These functions are only intended to be used by advanced debugging tools." msgstr "" -#: ../../c-api/init.rst:2196 +#: ../../c-api/init.rst:2223 msgid "" "Return the interpreter state object at the head of the list of all such " "objects." msgstr "" -#: ../../c-api/init.rst:2201 +#: ../../c-api/init.rst:2228 msgid "Return the main interpreter state object." msgstr "" -#: ../../c-api/init.rst:2206 +#: ../../c-api/init.rst:2233 msgid "" "Return the next interpreter state object after *interp* from the list of all " "such objects." msgstr "" -#: ../../c-api/init.rst:2212 +#: ../../c-api/init.rst:2239 msgid "" "Return the pointer to the first :c:type:`PyThreadState` object in the list " "of threads associated with the interpreter *interp*." msgstr "" -#: ../../c-api/init.rst:2218 +#: ../../c-api/init.rst:2245 msgid "" "Return the next thread state object after *tstate* from the list of all such " "objects belonging to the same :c:type:`PyInterpreterState` object." msgstr "" -#: ../../c-api/init.rst:2225 +#: ../../c-api/init.rst:2252 msgid "Thread Local Storage Support" msgstr "" -#: ../../c-api/init.rst:2229 +#: ../../c-api/init.rst:2256 msgid "" "The Python interpreter provides low-level support for thread-local storage " "(TLS) which wraps the underlying native TLS implementation to support the " @@ -2695,19 +2749,19 @@ msgid "" "thread." msgstr "" -#: ../../c-api/init.rst:2236 +#: ../../c-api/init.rst:2263 msgid "" "A :term:`thread state` does *not* need to be :term:`attached ` when calling these functions; they suppl their own locking." msgstr "" -#: ../../c-api/init.rst:2239 +#: ../../c-api/init.rst:2266 msgid "" "Note that :file:`Python.h` does not include the declaration of the TLS APIs, " "you need to include :file:`pythread.h` to use thread-local storage." msgstr "" -#: ../../c-api/init.rst:2243 +#: ../../c-api/init.rst:2270 msgid "" "None of these API functions handle memory management on behalf of the :c:" "expr:`void*` values. You need to allocate and deallocate them yourself. If " @@ -2715,22 +2769,22 @@ msgid "" "don't do refcount operations on them either." msgstr "" -#: ../../c-api/init.rst:2251 +#: ../../c-api/init.rst:2278 msgid "Thread Specific Storage (TSS) API" msgstr "" -#: ../../c-api/init.rst:2253 +#: ../../c-api/init.rst:2280 msgid "" "TSS API is introduced to supersede the use of the existing TLS API within " "the CPython interpreter. This API uses a new type :c:type:`Py_tss_t` " "instead of :c:expr:`int` to represent thread keys." msgstr "" -#: ../../c-api/init.rst:2259 +#: ../../c-api/init.rst:2286 msgid "\"A New C-API for Thread-Local Storage in CPython\" (:pep:`539`)" msgstr "" -#: ../../c-api/init.rst:2264 +#: ../../c-api/init.rst:2291 msgid "" "This data structure represents the state of a thread key, the definition of " "which may depend on the underlying TLS implementation, and it has an " @@ -2738,52 +2792,52 @@ msgid "" "public members in this structure." msgstr "" -#: ../../c-api/init.rst:2269 +#: ../../c-api/init.rst:2296 msgid "" "When :ref:`Py_LIMITED_API ` is not defined, static allocation of " "this type by :c:macro:`Py_tss_NEEDS_INIT` is allowed." msgstr "" -#: ../../c-api/init.rst:2275 +#: ../../c-api/init.rst:2302 msgid "" "This macro expands to the initializer for :c:type:`Py_tss_t` variables. Note " "that this macro won't be defined with :ref:`Py_LIMITED_API `." msgstr "" -#: ../../c-api/init.rst:2280 +#: ../../c-api/init.rst:2307 msgid "Dynamic Allocation" msgstr "" -#: ../../c-api/init.rst:2282 +#: ../../c-api/init.rst:2309 msgid "" "Dynamic allocation of the :c:type:`Py_tss_t`, required in extension modules " "built with :ref:`Py_LIMITED_API `, where static allocation of this " "type is not possible due to its implementation being opaque at build time." msgstr "" -#: ../../c-api/init.rst:2289 +#: ../../c-api/init.rst:2316 msgid "" "Return a value which is the same state as a value initialized with :c:macro:" "`Py_tss_NEEDS_INIT`, or ``NULL`` in the case of dynamic allocation failure." msgstr "" -#: ../../c-api/init.rst:2296 +#: ../../c-api/init.rst:2323 msgid "" "Free the given *key* allocated by :c:func:`PyThread_tss_alloc`, after first " "calling :c:func:`PyThread_tss_delete` to ensure any associated thread locals " "have been unassigned. This is a no-op if the *key* argument is ``NULL``." msgstr "" -#: ../../c-api/init.rst:2302 +#: ../../c-api/init.rst:2329 msgid "" "A freed key becomes a dangling pointer. You should reset the key to ``NULL``." msgstr "" -#: ../../c-api/init.rst:2307 +#: ../../c-api/init.rst:2334 msgid "Methods" msgstr "" -#: ../../c-api/init.rst:2309 +#: ../../c-api/init.rst:2336 msgid "" "The parameter *key* of these functions must not be ``NULL``. Moreover, the " "behaviors of :c:func:`PyThread_tss_set` and :c:func:`PyThread_tss_get` are " @@ -2791,13 +2845,13 @@ msgid "" "func:`PyThread_tss_create`." msgstr "" -#: ../../c-api/init.rst:2317 +#: ../../c-api/init.rst:2344 msgid "" "Return a non-zero value if the given :c:type:`Py_tss_t` has been initialized " "by :c:func:`PyThread_tss_create`." msgstr "" -#: ../../c-api/init.rst:2323 +#: ../../c-api/init.rst:2350 msgid "" "Return a zero value on successful initialization of a TSS key. The behavior " "is undefined if the value pointed to by the *key* argument is not " @@ -2806,7 +2860,7 @@ msgid "" "no-op and immediately returns success." msgstr "" -#: ../../c-api/init.rst:2332 +#: ../../c-api/init.rst:2359 msgid "" "Destroy a TSS key to forget the values associated with the key across all " "threads, and change the key's initialization state to uninitialized. A " @@ -2815,31 +2869,31 @@ msgid "" "key -- calling it on an already destroyed key is a no-op." msgstr "" -#: ../../c-api/init.rst:2341 +#: ../../c-api/init.rst:2368 msgid "" "Return a zero value to indicate successfully associating a :c:expr:`void*` " "value with a TSS key in the current thread. Each thread has a distinct " "mapping of the key to a :c:expr:`void*` value." msgstr "" -#: ../../c-api/init.rst:2348 +#: ../../c-api/init.rst:2375 msgid "" "Return the :c:expr:`void*` value associated with a TSS key in the current " "thread. This returns ``NULL`` if no value is associated with the key in the " "current thread." msgstr "" -#: ../../c-api/init.rst:2356 +#: ../../c-api/init.rst:2383 msgid "Thread Local Storage (TLS) API" msgstr "" -#: ../../c-api/init.rst:2358 +#: ../../c-api/init.rst:2385 msgid "" "This API is superseded by :ref:`Thread Specific Storage (TSS) API `." msgstr "" -#: ../../c-api/init.rst:2363 +#: ../../c-api/init.rst:2390 msgid "" "This version of the API does not support platforms where the native TLS key " "is defined in a way that cannot be safely cast to ``int``. On such " @@ -2848,45 +2902,45 @@ msgid "" "platforms." msgstr "" -#: ../../c-api/init.rst:2368 +#: ../../c-api/init.rst:2395 msgid "" "Due to the compatibility problem noted above, this version of the API should " "not be used in new code." msgstr "" -#: ../../c-api/init.rst:2379 +#: ../../c-api/init.rst:2406 msgid "Synchronization Primitives" msgstr "" -#: ../../c-api/init.rst:2381 +#: ../../c-api/init.rst:2408 msgid "The C-API provides a basic mutual exclusion lock." msgstr "" -#: ../../c-api/init.rst:2385 +#: ../../c-api/init.rst:2412 msgid "" "A mutual exclusion lock. The :c:type:`!PyMutex` should be initialized to " "zero to represent the unlocked state. For example::" msgstr "" -#: ../../c-api/init.rst:2388 +#: ../../c-api/init.rst:2415 msgid "PyMutex mutex = {0};" msgstr "" -#: ../../c-api/init.rst:2390 +#: ../../c-api/init.rst:2417 msgid "" "Instances of :c:type:`!PyMutex` should not be copied or moved. Both the " "contents and address of a :c:type:`!PyMutex` are meaningful, and it must " "remain at a fixed, writable location in memory." msgstr "" -#: ../../c-api/init.rst:2396 +#: ../../c-api/init.rst:2423 msgid "" "A :c:type:`!PyMutex` currently occupies one byte, but the size should be " "considered unstable. The size may change in future Python releases without " "a deprecation period." msgstr "" -#: ../../c-api/init.rst:2404 +#: ../../c-api/init.rst:2431 msgid "" "Lock mutex *m*. If another thread has already locked it, the calling thread " "will block until the mutex is unlocked. While blocked, the thread will " @@ -2894,17 +2948,17 @@ msgid "" "exists." msgstr "" -#: ../../c-api/init.rst:2412 +#: ../../c-api/init.rst:2439 msgid "" "Unlock mutex *m*. The mutex must be locked --- otherwise, the function will " "issue a fatal error." msgstr "" -#: ../../c-api/init.rst:2420 +#: ../../c-api/init.rst:2447 msgid "Python Critical Section API" msgstr "" -#: ../../c-api/init.rst:2422 +#: ../../c-api/init.rst:2449 msgid "" "The critical section API provides a deadlock avoidance layer on top of per-" "object locks for :term:`free-threaded ` CPython. They are " @@ -2912,7 +2966,7 @@ msgid "" "no-ops in versions of Python with the global interpreter lock." msgstr "" -#: ../../c-api/init.rst:2427 +#: ../../c-api/init.rst:2454 msgid "" "Critical sections avoid deadlocks by implicitly suspending active critical " "sections and releasing the locks during calls to :c:func:" @@ -2922,7 +2976,7 @@ msgid "" "-- they are useful because their behavior is similar to the :term:`GIL`." msgstr "" -#: ../../c-api/init.rst:2434 +#: ../../c-api/init.rst:2461 msgid "" "The functions and structs used by the macros are exposed for cases where C " "macros are not available. They should only be used as in the given macro " @@ -2930,7 +2984,7 @@ msgid "" "future Python versions." msgstr "" -#: ../../c-api/init.rst:2441 +#: ../../c-api/init.rst:2468 msgid "" "Operations that need to lock two objects at once must use :c:macro:" "`Py_BEGIN_CRITICAL_SECTION2`. You *cannot* use nested critical sections to " @@ -2939,11 +2993,11 @@ msgid "" "lock more than two objects at once." msgstr "" -#: ../../c-api/init.rst:2447 +#: ../../c-api/init.rst:2474 msgid "Example usage::" msgstr "" -#: ../../c-api/init.rst:2449 +#: ../../c-api/init.rst:2476 msgid "" "static PyObject *\n" "set_field(MyObject *self, PyObject *value)\n" @@ -2955,7 +3009,7 @@ msgid "" "}" msgstr "" -#: ../../c-api/init.rst:2458 +#: ../../c-api/init.rst:2485 msgid "" "In the above example, :c:macro:`Py_SETREF` calls :c:macro:`Py_DECREF`, which " "can call arbitrary code through an object's deallocation function. The " @@ -2965,61 +3019,61 @@ msgid "" "`PyEval_SaveThread`." msgstr "" -#: ../../c-api/init.rst:2466 +#: ../../c-api/init.rst:2493 msgid "" "Acquires the per-object lock for the object *op* and begins a critical " "section." msgstr "" -#: ../../c-api/init.rst:2469 ../../c-api/init.rst:2483 -#: ../../c-api/init.rst:2498 ../../c-api/init.rst:2512 +#: ../../c-api/init.rst:2496 ../../c-api/init.rst:2510 +#: ../../c-api/init.rst:2525 ../../c-api/init.rst:2539 msgid "In the free-threaded build, this macro expands to::" msgstr "" -#: ../../c-api/init.rst:2471 +#: ../../c-api/init.rst:2498 msgid "" "{\n" " PyCriticalSection _py_cs;\n" " PyCriticalSection_Begin(&_py_cs, (PyObject*)(op))" msgstr "" -#: ../../c-api/init.rst:2475 ../../c-api/init.rst:2504 +#: ../../c-api/init.rst:2502 ../../c-api/init.rst:2531 msgid "In the default build, this macro expands to ``{``." msgstr "" -#: ../../c-api/init.rst:2481 +#: ../../c-api/init.rst:2508 msgid "Ends the critical section and releases the per-object lock." msgstr "" -#: ../../c-api/init.rst:2485 +#: ../../c-api/init.rst:2512 msgid "" " PyCriticalSection_End(&_py_cs);\n" "}" msgstr "" -#: ../../c-api/init.rst:2488 ../../c-api/init.rst:2517 +#: ../../c-api/init.rst:2515 ../../c-api/init.rst:2544 msgid "In the default build, this macro expands to ``}``." msgstr "" -#: ../../c-api/init.rst:2494 +#: ../../c-api/init.rst:2521 msgid "" "Acquires the per-objects locks for the objects *a* and *b* and begins a " "critical section. The locks are acquired in a consistent order (lowest " "address first) to avoid lock ordering deadlocks." msgstr "" -#: ../../c-api/init.rst:2500 +#: ../../c-api/init.rst:2527 msgid "" "{\n" " PyCriticalSection2 _py_cs2;\n" " PyCriticalSection2_Begin(&_py_cs2, (PyObject*)(a), (PyObject*)(b))" msgstr "" -#: ../../c-api/init.rst:2510 +#: ../../c-api/init.rst:2537 msgid "Ends the critical section and releases the per-object locks." msgstr "" -#: ../../c-api/init.rst:2514 +#: ../../c-api/init.rst:2541 msgid "" " PyCriticalSection2_End(&_py_cs2);\n" "}" @@ -3033,147 +3087,147 @@ msgstr "" msgid "modules (in module sys)" msgstr "" -#: ../../c-api/init.rst:350 ../../c-api/init.rst:726 +#: ../../c-api/init.rst:350 ../../c-api/init.rst:712 msgid "path (in module sys)" msgstr "" -#: ../../c-api/init.rst:350 ../../c-api/init.rst:726 ../../c-api/init.rst:1208 -#: ../../c-api/init.rst:1723 ../../c-api/init.rst:1822 +#: ../../c-api/init.rst:350 ../../c-api/init.rst:712 ../../c-api/init.rst:1222 +#: ../../c-api/init.rst:1750 ../../c-api/init.rst:1849 msgid "module" msgstr "" -#: ../../c-api/init.rst:350 ../../c-api/init.rst:1723 ../../c-api/init.rst:1822 +#: ../../c-api/init.rst:350 ../../c-api/init.rst:1750 ../../c-api/init.rst:1849 msgid "builtins" msgstr "" -#: ../../c-api/init.rst:350 ../../c-api/init.rst:1723 ../../c-api/init.rst:1822 +#: ../../c-api/init.rst:350 ../../c-api/init.rst:1750 ../../c-api/init.rst:1849 msgid "__main__" msgstr "" -#: ../../c-api/init.rst:350 ../../c-api/init.rst:1723 ../../c-api/init.rst:1822 +#: ../../c-api/init.rst:350 ../../c-api/init.rst:1750 ../../c-api/init.rst:1849 msgid "sys" msgstr "" -#: ../../c-api/init.rst:350 ../../c-api/init.rst:726 +#: ../../c-api/init.rst:350 ../../c-api/init.rst:712 msgid "search" msgstr "" -#: ../../c-api/init.rst:350 ../../c-api/init.rst:726 +#: ../../c-api/init.rst:350 ../../c-api/init.rst:712 msgid "path" msgstr "" -#: ../../c-api/init.rst:350 ../../c-api/init.rst:1787 ../../c-api/init.rst:1840 +#: ../../c-api/init.rst:350 ../../c-api/init.rst:1814 ../../c-api/init.rst:1867 msgid "Py_FinalizeEx (C function)" msgstr "" -#: ../../c-api/init.rst:586 +#: ../../c-api/init.rst:572 msgid "Py_Initialize()" msgstr "" -#: ../../c-api/init.rst:586 ../../c-api/init.rst:824 +#: ../../c-api/init.rst:572 ../../c-api/init.rst:810 msgid "main()" msgstr "" -#: ../../c-api/init.rst:586 +#: ../../c-api/init.rst:572 msgid "Py_GetPath()" msgstr "" -#: ../../c-api/init.rst:704 +#: ../../c-api/init.rst:690 msgid "executable (in module sys)" msgstr "" -#: ../../c-api/init.rst:759 ../../c-api/init.rst:801 ../../c-api/init.rst:815 +#: ../../c-api/init.rst:745 ../../c-api/init.rst:787 ../../c-api/init.rst:801 msgid "version (in module sys)" msgstr "" -#: ../../c-api/init.rst:771 +#: ../../c-api/init.rst:757 msgid "platform (in module sys)" msgstr "" -#: ../../c-api/init.rst:788 +#: ../../c-api/init.rst:774 msgid "copyright (in module sys)" msgstr "" -#: ../../c-api/init.rst:824 +#: ../../c-api/init.rst:810 msgid "Py_FatalError()" msgstr "" -#: ../../c-api/init.rst:824 +#: ../../c-api/init.rst:810 msgid "argv (in module sys)" msgstr "" -#: ../../c-api/init.rst:944 +#: ../../c-api/init.rst:930 msgid "global interpreter lock" msgstr "" -#: ../../c-api/init.rst:944 +#: ../../c-api/init.rst:930 msgid "interpreter lock" msgstr "" -#: ../../c-api/init.rst:944 +#: ../../c-api/init.rst:930 msgid "lock, interpreter" msgstr "" -#: ../../c-api/init.rst:958 +#: ../../c-api/init.rst:944 msgid "setswitchinterval (in module sys)" msgstr "" -#: ../../c-api/init.rst:967 +#: ../../c-api/init.rst:953 msgid "PyThreadState (C type)" msgstr "" -#: ../../c-api/init.rst:1003 +#: ../../c-api/init.rst:989 msgid "Py_BEGIN_ALLOW_THREADS (C macro)" msgstr "" -#: ../../c-api/init.rst:1003 +#: ../../c-api/init.rst:989 msgid "Py_END_ALLOW_THREADS (C macro)" msgstr "" -#: ../../c-api/init.rst:1019 +#: ../../c-api/init.rst:1005 msgid "PyEval_RestoreThread (C function)" msgstr "" -#: ../../c-api/init.rst:1019 +#: ../../c-api/init.rst:1005 msgid "PyEval_SaveThread (C function)" msgstr "" -#: ../../c-api/init.rst:1186 +#: ../../c-api/init.rst:1200 msgid "PyEval_AcquireThread()" msgstr "" -#: ../../c-api/init.rst:1186 +#: ../../c-api/init.rst:1200 msgid "PyEval_ReleaseThread()" msgstr "" -#: ../../c-api/init.rst:1186 +#: ../../c-api/init.rst:1200 msgid "PyEval_SaveThread()" msgstr "" -#: ../../c-api/init.rst:1186 +#: ../../c-api/init.rst:1200 msgid "PyEval_RestoreThread()" msgstr "" -#: ../../c-api/init.rst:1208 +#: ../../c-api/init.rst:1222 msgid "_thread" msgstr "" -#: ../../c-api/init.rst:1723 ../../c-api/init.rst:1822 +#: ../../c-api/init.rst:1750 ../../c-api/init.rst:1849 msgid "stdout (in module sys)" msgstr "" -#: ../../c-api/init.rst:1723 ../../c-api/init.rst:1822 +#: ../../c-api/init.rst:1750 ../../c-api/init.rst:1849 msgid "stderr (in module sys)" msgstr "" -#: ../../c-api/init.rst:1723 ../../c-api/init.rst:1822 +#: ../../c-api/init.rst:1750 ../../c-api/init.rst:1849 msgid "stdin (in module sys)" msgstr "" -#: ../../c-api/init.rst:1787 +#: ../../c-api/init.rst:1814 msgid "Py_Initialize (C function)" msgstr "" -#: ../../c-api/init.rst:1817 +#: ../../c-api/init.rst:1844 msgid "close (in module os)" msgstr "" diff --git a/c-api/init_config.po b/c-api/init_config.po index ec92dd23e..e59674d15 100644 --- a/c-api/init_config.po +++ b/c-api/init_config.po @@ -4,17 +4,17 @@ # FIRST AUTHOR , YEAR. # # Translators: -# Rafael Fontenelle , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:49+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/c-api/intro.po b/c-api/intro.po index e3df94e71..7c0c04d48 100644 --- a/c-api/intro.po +++ b/c-api/intro.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:49+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -174,144 +175,114 @@ msgstr "" #: ../../c-api/intro.rst:113 msgid "" "Several useful macros are defined in the Python header files. Many are " -"defined closer to where they are useful (e.g. :c:macro:`Py_RETURN_NONE`). " -"Others of a more general utility are defined here. This is not necessarily " -"a complete listing." +"defined closer to where they are useful (for example, :c:macro:" +"`Py_RETURN_NONE`, :c:macro:`PyMODINIT_FUNC`). Others of a more general " +"utility are defined here. This is not necessarily a complete listing." msgstr "" -#: ../../c-api/intro.rst:120 -msgid "" -"Declare an extension module ``PyInit`` initialization function. The function " -"return type is :c:expr:`PyObject*`. The macro declares any special linkage " -"declarations required by the platform, and for C++ declares the function as " -"``extern \"C\"``." -msgstr "" - -#: ../../c-api/intro.rst:125 -msgid "" -"The initialization function must be named :samp:`PyInit_{name}`, where " -"*name* is the name of the module, and should be the only non-\\ ``static`` " -"item defined in the module file. Example::" -msgstr "" - -#: ../../c-api/intro.rst:129 -msgid "" -"static struct PyModuleDef spam_module = {\n" -" PyModuleDef_HEAD_INIT,\n" -" .m_name = \"spam\",\n" -" ...\n" -"};\n" -"\n" -"PyMODINIT_FUNC\n" -"PyInit_spam(void)\n" -"{\n" -" return PyModule_Create(&spam_module);\n" -"}" -msgstr "" - -#: ../../c-api/intro.rst:144 +#: ../../c-api/intro.rst:122 msgid "Return the absolute value of ``x``." msgstr "" -#: ../../c-api/intro.rst:150 +#: ../../c-api/intro.rst:128 msgid "" "Ask the compiler to always inline a static inline function. The compiler can " "ignore it and decide to not inline the function." msgstr "" -#: ../../c-api/intro.rst:153 +#: ../../c-api/intro.rst:131 msgid "" "It can be used to inline performance critical static inline functions when " "building Python in debug mode with function inlining disabled. For example, " "MSC disables function inlining when building in debug mode." msgstr "" -#: ../../c-api/intro.rst:157 +#: ../../c-api/intro.rst:135 msgid "" "Marking blindly a static inline function with Py_ALWAYS_INLINE can result in " "worse performances (due to increased code size for example). The compiler is " "usually smarter than the developer for the cost/benefit analysis." msgstr "" -#: ../../c-api/intro.rst:161 +#: ../../c-api/intro.rst:139 msgid "" "If Python is :ref:`built in debug mode ` (if the :c:macro:" "`Py_DEBUG` macro is defined), the :c:macro:`Py_ALWAYS_INLINE` macro does " "nothing." msgstr "" -#: ../../c-api/intro.rst:164 +#: ../../c-api/intro.rst:142 msgid "It must be specified before the function return type. Usage::" msgstr "" -#: ../../c-api/intro.rst:166 +#: ../../c-api/intro.rst:144 msgid "static inline Py_ALWAYS_INLINE int random(void) { return 4; }" msgstr "" -#: ../../c-api/intro.rst:172 +#: ../../c-api/intro.rst:150 msgid "" "Argument must be a character or an integer in the range [-128, 127] or [0, " "255]. This macro returns ``c`` cast to an ``unsigned char``." msgstr "" -#: ../../c-api/intro.rst:177 +#: ../../c-api/intro.rst:155 msgid "" "Use this for deprecated declarations. The macro must be placed before the " "symbol name." msgstr "" -#: ../../c-api/intro.rst:180 ../../c-api/intro.rst:266 -#: ../../c-api/intro.rst:284 +#: ../../c-api/intro.rst:158 ../../c-api/intro.rst:244 +#: ../../c-api/intro.rst:262 msgid "Example::" msgstr "" -#: ../../c-api/intro.rst:182 +#: ../../c-api/intro.rst:160 msgid "Py_DEPRECATED(3.8) PyAPI_FUNC(int) Py_OldFunction(void);" msgstr "" -#: ../../c-api/intro.rst:184 +#: ../../c-api/intro.rst:162 msgid "MSVC support was added." msgstr "" -#: ../../c-api/intro.rst:189 +#: ../../c-api/intro.rst:167 msgid "" "Like ``getenv(s)``, but returns ``NULL`` if :option:`-E` was passed on the " "command line (see :c:member:`PyConfig.use_environment`)." msgstr "" -#: ../../c-api/intro.rst:194 +#: ../../c-api/intro.rst:172 msgid "Return the maximum value between ``x`` and ``y``." msgstr "" -#: ../../c-api/intro.rst:200 +#: ../../c-api/intro.rst:178 msgid "Return the size of a structure (``type``) ``member`` in bytes." msgstr "" -#: ../../c-api/intro.rst:206 +#: ../../c-api/intro.rst:184 msgid "Return the minimum value between ``x`` and ``y``." msgstr "" -#: ../../c-api/intro.rst:212 +#: ../../c-api/intro.rst:190 msgid "" "Disable inlining on a function. For example, it reduces the C stack " "consumption: useful on LTO+PGO builds which heavily inline code (see :issue:" "`33720`)." msgstr "" -#: ../../c-api/intro.rst:216 +#: ../../c-api/intro.rst:194 msgid "Usage::" msgstr "" -#: ../../c-api/intro.rst:218 +#: ../../c-api/intro.rst:196 msgid "Py_NO_INLINE static int random(void) { return 4; }" msgstr "" -#: ../../c-api/intro.rst:224 +#: ../../c-api/intro.rst:202 msgid "" "Convert ``x`` to a C string. E.g. ``Py_STRINGIFY(123)`` returns ``\"123\"``." msgstr "" -#: ../../c-api/intro.rst:231 +#: ../../c-api/intro.rst:209 msgid "" "Use this when you have a code path that cannot be reached by design. For " "example, in the ``default:`` clause in a ``switch`` statement for which all " @@ -319,20 +290,20 @@ msgid "" "where you might be tempted to put an ``assert(0)`` or ``abort()`` call." msgstr "" -#: ../../c-api/intro.rst:236 +#: ../../c-api/intro.rst:214 msgid "" "In release mode, the macro helps the compiler to optimize the code, and " "avoids a warning about unreachable code. For example, the macro is " "implemented with ``__builtin_unreachable()`` on GCC in release mode." msgstr "" -#: ../../c-api/intro.rst:240 +#: ../../c-api/intro.rst:218 msgid "" "A use for ``Py_UNREACHABLE()`` is following a call a function that never " "returns but that is not declared :c:macro:`_Py_NO_RETURN`." msgstr "" -#: ../../c-api/intro.rst:243 +#: ../../c-api/intro.rst:221 msgid "" "If a code path is very unlikely code but can be reached under exceptional " "case, this macro must not be used. For example, under low memory condition " @@ -341,25 +312,25 @@ msgid "" "reported to caller, :c:func:`Py_FatalError` can be used." msgstr "" -#: ../../c-api/intro.rst:253 +#: ../../c-api/intro.rst:231 msgid "" "Use this for unused arguments in a function definition to silence compiler " "warnings. Example: ``int func(int a, int Py_UNUSED(b)) { return a; }``." msgstr "" -#: ../../c-api/intro.rst:260 +#: ../../c-api/intro.rst:238 msgid "" "Creates a variable with name ``name`` that can be used in docstrings. If " "Python is built without docstrings, the value will be empty." msgstr "" -#: ../../c-api/intro.rst:263 +#: ../../c-api/intro.rst:241 msgid "" "Use :c:macro:`PyDoc_STRVAR` for docstrings to support building Python " "without docstrings, as specified in :pep:`7`." msgstr "" -#: ../../c-api/intro.rst:268 +#: ../../c-api/intro.rst:246 msgid "" "PyDoc_STRVAR(pop_doc, \"Remove and return the rightmost element.\");\n" "\n" @@ -370,19 +341,19 @@ msgid "" "}" msgstr "" -#: ../../c-api/intro.rst:278 +#: ../../c-api/intro.rst:256 msgid "" "Creates a docstring for the given input string or an empty string if " "docstrings are disabled." msgstr "" -#: ../../c-api/intro.rst:281 +#: ../../c-api/intro.rst:259 msgid "" "Use :c:macro:`PyDoc_STR` in specifying docstrings to support building Python " "without docstrings, as specified in :pep:`7`." msgstr "" -#: ../../c-api/intro.rst:286 +#: ../../c-api/intro.rst:264 msgid "" "static PyMethodDef pysqlite_row_methods[] = {\n" " {\"keys\", (PyCFunction)pysqlite_row_keys, METH_NOARGS,\n" @@ -391,11 +362,11 @@ msgid "" "};" msgstr "" -#: ../../c-api/intro.rst:296 +#: ../../c-api/intro.rst:274 msgid "Objects, Types and Reference Counts" msgstr "" -#: ../../c-api/intro.rst:300 +#: ../../c-api/intro.rst:278 msgid "" "Most Python/C API functions have one or more arguments as well as a return " "value of type :c:expr:`PyObject*`. This type is a pointer to an opaque data " @@ -410,7 +381,7 @@ msgid "" "objects." msgstr "" -#: ../../c-api/intro.rst:311 +#: ../../c-api/intro.rst:289 msgid "" "All Python objects (even Python integers) have a :dfn:`type` and a :dfn:" "`reference count`. An object's type determines what kind of object it is (e." @@ -421,11 +392,11 @@ msgid "" "a Python list." msgstr "" -#: ../../c-api/intro.rst:322 +#: ../../c-api/intro.rst:300 msgid "Reference Counts" msgstr "" -#: ../../c-api/intro.rst:324 +#: ../../c-api/intro.rst:302 msgid "" "The reference count is important because today's computers have a finite " "(and often severely limited) memory size; it counts how many different " @@ -440,7 +411,7 @@ msgid "" "that.\")" msgstr "" -#: ../../c-api/intro.rst:341 +#: ../../c-api/intro.rst:319 msgid "" "Reference counts are always manipulated explicitly. The normal way is to " "use the macro :c:func:`Py_INCREF` to take a new reference to an object (i.e. " @@ -459,7 +430,7 @@ msgid "" "increment is a simple operation." msgstr "" -#: ../../c-api/intro.rst:357 +#: ../../c-api/intro.rst:335 msgid "" "It is not necessary to hold a :term:`strong reference` (i.e. increment the " "reference count) for every local variable that contains a pointer to an " @@ -477,7 +448,7 @@ msgid "" "reference to every argument for the duration of the call." msgstr "" -#: ../../c-api/intro.rst:373 +#: ../../c-api/intro.rst:351 msgid "" "However, a common pitfall is to extract an object from a list and hold on to " "it for a while without taking a new reference. Some other operation might " @@ -488,7 +459,7 @@ msgid "" "`Py_DECREF`, so almost any operation is potentially dangerous." msgstr "" -#: ../../c-api/intro.rst:381 +#: ../../c-api/intro.rst:359 msgid "" "A safe approach is to always use the generic operations (functions whose " "name begins with ``PyObject_``, ``PyNumber_``, ``PySequence_`` or " @@ -498,11 +469,11 @@ msgid "" "when they are done with the result; this soon becomes second nature." msgstr "" -#: ../../c-api/intro.rst:392 +#: ../../c-api/intro.rst:370 msgid "Reference Count Details" msgstr "" -#: ../../c-api/intro.rst:394 +#: ../../c-api/intro.rst:372 msgid "" "The reference count behavior of functions in the Python/C API is best " "explained in terms of *ownership of references*. Ownership pertains to " @@ -519,7 +490,7 @@ msgid "" "`borrowed reference`." msgstr "" -#: ../../c-api/intro.rst:407 +#: ../../c-api/intro.rst:385 msgid "" "Conversely, when a calling function passes in a reference to an object, " "there are two possibilities: the function *steals* a reference to the " @@ -528,7 +499,7 @@ msgid "" "reference, and you are not responsible for it any longer." msgstr "" -#: ../../c-api/intro.rst:417 +#: ../../c-api/intro.rst:395 msgid "" "Few functions steal references; the two notable exceptions are :c:func:" "`PyList_SetItem` and :c:func:`PyTuple_SetItem`, which steal a reference to " @@ -540,7 +511,7 @@ msgid "" "below)::" msgstr "" -#: ../../c-api/intro.rst:425 +#: ../../c-api/intro.rst:403 msgid "" "PyObject *t;\n" "\n" @@ -550,7 +521,7 @@ msgid "" "PyTuple_SetItem(t, 2, PyUnicode_FromString(\"three\"));" msgstr "" -#: ../../c-api/intro.rst:432 +#: ../../c-api/intro.rst:410 msgid "" "Here, :c:func:`PyLong_FromLong` returns a new reference which is immediately " "stolen by :c:func:`PyTuple_SetItem`. When you want to keep using an object " @@ -558,7 +529,7 @@ msgid "" "another reference before calling the reference-stealing function." msgstr "" -#: ../../c-api/intro.rst:437 +#: ../../c-api/intro.rst:415 msgid "" "Incidentally, :c:func:`PyTuple_SetItem` is the *only* way to set tuple " "items; :c:func:`PySequence_SetItem` and :c:func:`PyObject_SetItem` refuse to " @@ -566,13 +537,13 @@ msgid "" "func:`PyTuple_SetItem` for tuples that you are creating yourself." msgstr "" -#: ../../c-api/intro.rst:442 +#: ../../c-api/intro.rst:420 msgid "" "Equivalent code for populating a list can be written using :c:func:" "`PyList_New` and :c:func:`PyList_SetItem`." msgstr "" -#: ../../c-api/intro.rst:445 +#: ../../c-api/intro.rst:423 msgid "" "However, in practice, you will rarely use these ways of creating and " "populating a tuple or list. There's a generic function, :c:func:" @@ -581,7 +552,7 @@ msgid "" "be replaced by the following (which also takes care of the error checking)::" msgstr "" -#: ../../c-api/intro.rst:451 +#: ../../c-api/intro.rst:429 msgid "" "PyObject *tuple, *list;\n" "\n" @@ -589,7 +560,7 @@ msgid "" "list = Py_BuildValue(\"[iis]\", 1, 2, \"three\");" msgstr "" -#: ../../c-api/intro.rst:456 +#: ../../c-api/intro.rst:434 msgid "" "It is much more common to use :c:func:`PyObject_SetItem` and friends with " "items whose references you are only borrowing, like arguments that were " @@ -600,7 +571,7 @@ msgid "" "sequence) to a given item::" msgstr "" -#: ../../c-api/intro.rst:463 +#: ../../c-api/intro.rst:441 msgid "" "int\n" "set_all(PyObject *target, PyObject *item)\n" @@ -624,7 +595,7 @@ msgid "" "}" msgstr "" -#: ../../c-api/intro.rst:486 +#: ../../c-api/intro.rst:464 msgid "" "The situation is slightly different for function return values. While " "passing a reference to most functions does not change your ownership " @@ -637,7 +608,7 @@ msgid "" "becomes the owner of the reference)." msgstr "" -#: ../../c-api/intro.rst:495 +#: ../../c-api/intro.rst:473 msgid "" "It is important to realize that whether you own a reference returned by a " "function depends on which function you call only --- *the plumage* (the type " @@ -648,14 +619,14 @@ msgid "" "the same arguments), you do own a reference to the returned object." msgstr "" -#: ../../c-api/intro.rst:507 +#: ../../c-api/intro.rst:485 msgid "" "Here is an example of how you could write a function that computes the sum " "of the items in a list of integers; once using :c:func:`PyList_GetItem`, " "and once using :c:func:`PySequence_GetItem`. ::" msgstr "" -#: ../../c-api/intro.rst:511 +#: ../../c-api/intro.rst:489 msgid "" "long\n" "sum_list(PyObject *list)\n" @@ -680,7 +651,7 @@ msgid "" "}" msgstr "" -#: ../../c-api/intro.rst:537 +#: ../../c-api/intro.rst:515 msgid "" "long\n" "sum_sequence(PyObject *sequence)\n" @@ -711,11 +682,11 @@ msgid "" "}" msgstr "" -#: ../../c-api/intro.rst:571 +#: ../../c-api/intro.rst:549 msgid "Types" msgstr "" -#: ../../c-api/intro.rst:573 +#: ../../c-api/intro.rst:551 msgid "" "There are few other data types that play a significant role in the Python/C " "API; most are simple C types such as :c:expr:`int`, :c:expr:`long`, :c:expr:" @@ -726,7 +697,7 @@ msgid "" "that use them." msgstr "" -#: ../../c-api/intro.rst:583 +#: ../../c-api/intro.rst:561 msgid "" "A signed integral type such that ``sizeof(Py_ssize_t) == sizeof(size_t)``. " "C99 doesn't define such a thing directly (size_t is an unsigned integral " @@ -734,11 +705,11 @@ msgid "" "positive value of type :c:type:`Py_ssize_t`." msgstr "" -#: ../../c-api/intro.rst:592 +#: ../../c-api/intro.rst:570 msgid "Exceptions" msgstr "" -#: ../../c-api/intro.rst:594 +#: ../../c-api/intro.rst:572 msgid "" "The Python programmer only needs to deal with exceptions if specific error " "handling is required; unhandled exceptions are automatically propagated to " @@ -747,7 +718,7 @@ msgid "" "stack traceback." msgstr "" -#: ../../c-api/intro.rst:602 +#: ../../c-api/intro.rst:580 msgid "" "For C programmers, however, error checking always has to be explicit. All " "functions in the Python/C API can raise exceptions, unless an explicit claim " @@ -762,7 +733,7 @@ msgid "" "explicitly documented." msgstr "" -#: ../../c-api/intro.rst:617 +#: ../../c-api/intro.rst:595 msgid "" "Exception state is maintained in per-thread storage (this is equivalent to " "using global storage in an unthreaded application). A thread can be in one " @@ -775,7 +746,7 @@ msgid "" "clears the exception state." msgstr "" -#: ../../c-api/intro.rst:627 +#: ../../c-api/intro.rst:605 msgid "" "The full exception state consists of three objects (all of which can be " "``NULL``): the exception type, the corresponding exception value, and the " @@ -788,7 +759,7 @@ msgid "" "``sys.exc_info()`` and friends." msgstr "" -#: ../../c-api/intro.rst:639 +#: ../../c-api/intro.rst:617 msgid "" "Note that starting with Python 1.5, the preferred, thread-safe way to access " "the exception state from Python code is to call the function :func:`sys." @@ -802,7 +773,7 @@ msgid "" "referenced by the stack frames in the traceback." msgstr "" -#: ../../c-api/intro.rst:650 +#: ../../c-api/intro.rst:628 msgid "" "As a general principle, a function that calls another function to perform " "some task should check whether the called function raised an exception, and " @@ -813,7 +784,7 @@ msgid "" "of the error." msgstr "" -#: ../../c-api/intro.rst:659 +#: ../../c-api/intro.rst:637 msgid "" "A simple example of detecting exceptions and passing them on is shown in " "the :c:func:`!sum_sequence` example above. It so happens that this example " @@ -822,7 +793,7 @@ msgid "" "why you like Python, we show the equivalent Python code::" msgstr "" -#: ../../c-api/intro.rst:665 +#: ../../c-api/intro.rst:643 msgid "" "def incr_item(dict, key):\n" " try:\n" @@ -832,11 +803,11 @@ msgid "" " dict[key] = item + 1" msgstr "" -#: ../../c-api/intro.rst:674 +#: ../../c-api/intro.rst:652 msgid "Here is the corresponding C code, in all its glory::" msgstr "" -#: ../../c-api/intro.rst:676 +#: ../../c-api/intro.rst:654 msgid "" "int\n" "incr_item(PyObject *dict, PyObject *key)\n" @@ -882,7 +853,7 @@ msgid "" "}" msgstr "" -#: ../../c-api/intro.rst:726 +#: ../../c-api/intro.rst:704 msgid "" "This example represents an endorsed use of the ``goto`` statement in C! It " "illustrates the use of :c:func:`PyErr_ExceptionMatches` and :c:func:" @@ -895,11 +866,11 @@ msgid "" "success after the final call made is successful." msgstr "" -#: ../../c-api/intro.rst:740 +#: ../../c-api/intro.rst:718 msgid "Embedding Python" msgstr "" -#: ../../c-api/intro.rst:742 +#: ../../c-api/intro.rst:720 msgid "" "The one important task that only embedders (as opposed to extension writers) " "of the Python interpreter have to worry about is the initialization, and " @@ -907,7 +878,7 @@ msgid "" "the interpreter can only be used after the interpreter has been initialized." msgstr "" -#: ../../c-api/intro.rst:755 +#: ../../c-api/intro.rst:733 msgid "" "The basic initialization function is :c:func:`Py_Initialize`. This " "initializes the table of loaded modules, and creates the fundamental " @@ -915,7 +886,7 @@ msgid "" "initializes the module search path (``sys.path``)." msgstr "" -#: ../../c-api/intro.rst:760 +#: ../../c-api/intro.rst:738 msgid "" ":c:func:`Py_Initialize` does not set the \"script argument list\" (``sys." "argv``). If this variable is needed by Python code that will be executed " @@ -923,7 +894,7 @@ msgid "" "must be set: see :ref:`Python Initialization Configuration `." msgstr "" -#: ../../c-api/intro.rst:765 +#: ../../c-api/intro.rst:743 msgid "" "On most systems (in particular, on Unix and Windows, although the details " "are slightly different), :c:func:`Py_Initialize` calculates the module " @@ -935,7 +906,7 @@ msgid "" "on the shell command search path (the environment variable :envvar:`PATH`)." msgstr "" -#: ../../c-api/intro.rst:774 +#: ../../c-api/intro.rst:752 msgid "" "For instance, if the Python executable is found in :file:`/usr/local/bin/" "python`, it will assume that the libraries are in :file:`/usr/local/lib/" @@ -946,7 +917,7 @@ msgid "" "in front of the standard path by setting :envvar:`PYTHONPATH`." msgstr "" -#: ../../c-api/intro.rst:788 +#: ../../c-api/intro.rst:766 msgid "" "The embedding application can steer the search by setting :c:member:" "`PyConfig.program_name` *before* calling :c:func:`Py_InitializeFromConfig`. " @@ -957,7 +928,7 @@ msgid "" "func:`Py_GetProgramFullPath` (all defined in :file:`Modules/getpath.c`)." msgstr "" -#: ../../c-api/intro.rst:799 +#: ../../c-api/intro.rst:777 msgid "" "Sometimes, it is desirable to \"uninitialize\" Python. For instance, the " "application may want to start over (make another call to :c:func:" @@ -971,18 +942,18 @@ msgid "" "released." msgstr "" -#: ../../c-api/intro.rst:813 +#: ../../c-api/intro.rst:791 msgid "Debugging Builds" msgstr "" -#: ../../c-api/intro.rst:815 +#: ../../c-api/intro.rst:793 msgid "" "Python can be built with several macros to enable extra checks of the " "interpreter and extension modules. These checks tend to add a large amount " "of overhead to the runtime so they are not enabled by default." msgstr "" -#: ../../c-api/intro.rst:819 +#: ../../c-api/intro.rst:797 msgid "" "A full list of the various types of debugging builds is in the file :file:" "`Misc/SpecialBuilds.txt` in the Python source distribution. Builds are " @@ -992,7 +963,7 @@ msgid "" "section." msgstr "" -#: ../../c-api/intro.rst:827 +#: ../../c-api/intro.rst:805 msgid "" "Compiling the interpreter with the :c:macro:`!Py_DEBUG` macro defined " "produces what is generally meant by :ref:`a debug build of Python `." msgstr "" -#: ../../c-api/intro.rst:838 +#: ../../c-api/intro.rst:816 msgid "" "Defining :c:macro:`Py_TRACE_REFS` enables reference tracing (see the :option:" "`configure --with-trace-refs option <--with-trace-refs>`). When defined, a " @@ -1019,132 +990,206 @@ msgid "" "this happens after every statement run by the interpreter.)" msgstr "" -#: ../../c-api/intro.rst:845 +#: ../../c-api/intro.rst:823 msgid "" "Please refer to :file:`Misc/SpecialBuilds.txt` in the Python source " "distribution for more detailed information." msgstr "" -#: ../../c-api/intro.rst:298 +#: ../../c-api/intro.rst:830 +msgid "Recommended third party tools" +msgstr "" + +#: ../../c-api/intro.rst:832 +msgid "" +"The following third party tools offer both simpler and more sophisticated " +"approaches to creating C, C++ and Rust extensions for Python:" +msgstr "" + +#: ../../c-api/intro.rst:835 +msgid "`Cython `_" +msgstr "" + +#: ../../c-api/intro.rst:836 +msgid "`cffi `_" +msgstr "" + +#: ../../c-api/intro.rst:837 +msgid "`HPy `_" +msgstr "" + +#: ../../c-api/intro.rst:838 +msgid "`nanobind `_ (C++)" +msgstr "" + +#: ../../c-api/intro.rst:839 +msgid "`Numba `_" +msgstr "" + +#: ../../c-api/intro.rst:840 +msgid "`pybind11 `_ (C++)" +msgstr "" + +#: ../../c-api/intro.rst:841 +msgid "`PyO3 `_ (Rust)" +msgstr "" + +#: ../../c-api/intro.rst:842 +msgid "`SWIG `_" +msgstr "" + +#: ../../c-api/intro.rst:844 +msgid "" +"Using tools such as these can help avoid writing code that is tightly bound " +"to a particular version of CPython, avoid reference counting errors, and " +"focus more on your own code than on using the CPython API. In general, new " +"versions of Python can be supported by updating the tool, and your code will " +"often use newer and more efficient APIs automatically. Some tools also " +"support compiling for other implementations of Python from a single set of " +"sources." +msgstr "" + +#: ../../c-api/intro.rst:851 +msgid "" +"These projects are not supported by the same people who maintain Python, and " +"issues need to be raised with the projects directly. Remember to check that " +"the project is still maintained and supported, as the list above may become " +"outdated." +msgstr "" + +#: ../../c-api/intro.rst:858 +msgid "" +"`Python Packaging User Guide: Binary Extensions `_" +msgstr "" + +#: ../../c-api/intro.rst:859 +msgid "" +"The Python Packaging User Guide not only covers several available tools that " +"simplify the creation of binary extensions, but also discusses the various " +"reasons why creating an extension module may be desirable in the first place." +msgstr "" + +#: ../../c-api/intro.rst:276 msgid "object" msgstr "" -#: ../../c-api/intro.rst:298 +#: ../../c-api/intro.rst:276 msgid "type" msgstr "" -#: ../../c-api/intro.rst:337 +#: ../../c-api/intro.rst:315 msgid "Py_INCREF (C function)" msgstr "" -#: ../../c-api/intro.rst:337 +#: ../../c-api/intro.rst:315 msgid "Py_DECREF (C function)" msgstr "" -#: ../../c-api/intro.rst:413 +#: ../../c-api/intro.rst:391 msgid "PyList_SetItem (C function)" msgstr "" -#: ../../c-api/intro.rst:413 +#: ../../c-api/intro.rst:391 msgid "PyTuple_SetItem (C function)" msgstr "" -#: ../../c-api/intro.rst:484 +#: ../../c-api/intro.rst:462 msgid "set_all()" msgstr "" -#: ../../c-api/intro.rst:503 +#: ../../c-api/intro.rst:481 msgid "PyList_GetItem (C function)" msgstr "" -#: ../../c-api/intro.rst:503 +#: ../../c-api/intro.rst:481 msgid "PySequence_GetItem (C function)" msgstr "" -#: ../../c-api/intro.rst:533 +#: ../../c-api/intro.rst:511 msgid "sum_list()" msgstr "" -#: ../../c-api/intro.rst:565 ../../c-api/intro.rst:657 +#: ../../c-api/intro.rst:543 ../../c-api/intro.rst:635 msgid "sum_sequence()" msgstr "" -#: ../../c-api/intro.rst:600 +#: ../../c-api/intro.rst:578 msgid "PyErr_Occurred (C function)" msgstr "" -#: ../../c-api/intro.rst:613 +#: ../../c-api/intro.rst:591 msgid "PyErr_SetString (C function)" msgstr "" -#: ../../c-api/intro.rst:613 ../../c-api/intro.rst:721 +#: ../../c-api/intro.rst:591 ../../c-api/intro.rst:699 msgid "PyErr_Clear (C function)" msgstr "" -#: ../../c-api/intro.rst:637 +#: ../../c-api/intro.rst:615 msgid "exc_info (in module sys)" msgstr "" -#: ../../c-api/intro.rst:672 ../../c-api/intro.rst:719 +#: ../../c-api/intro.rst:650 ../../c-api/intro.rst:697 msgid "incr_item()" msgstr "" -#: ../../c-api/intro.rst:721 +#: ../../c-api/intro.rst:699 msgid "PyErr_ExceptionMatches (C function)" msgstr "" -#: ../../c-api/intro.rst:721 +#: ../../c-api/intro.rst:699 msgid "Py_XDECREF (C function)" msgstr "" -#: ../../c-api/intro.rst:747 +#: ../../c-api/intro.rst:725 msgid "Py_Initialize (C function)" msgstr "" -#: ../../c-api/intro.rst:747 +#: ../../c-api/intro.rst:725 msgid "module" msgstr "" -#: ../../c-api/intro.rst:747 +#: ../../c-api/intro.rst:725 msgid "builtins" msgstr "" -#: ../../c-api/intro.rst:747 +#: ../../c-api/intro.rst:725 msgid "__main__" msgstr "" -#: ../../c-api/intro.rst:747 +#: ../../c-api/intro.rst:725 msgid "sys" msgstr "" -#: ../../c-api/intro.rst:747 +#: ../../c-api/intro.rst:725 msgid "search" msgstr "" -#: ../../c-api/intro.rst:747 +#: ../../c-api/intro.rst:725 msgid "path" msgstr "" -#: ../../c-api/intro.rst:747 +#: ../../c-api/intro.rst:725 msgid "path (in module sys)" msgstr "" -#: ../../c-api/intro.rst:782 +#: ../../c-api/intro.rst:760 msgid "Py_GetPath (C function)" msgstr "" -#: ../../c-api/intro.rst:782 +#: ../../c-api/intro.rst:760 msgid "Py_GetPrefix (C function)" msgstr "" -#: ../../c-api/intro.rst:782 +#: ../../c-api/intro.rst:760 msgid "Py_GetExecPrefix (C function)" msgstr "" -#: ../../c-api/intro.rst:782 +#: ../../c-api/intro.rst:760 msgid "Py_GetProgramFullPath (C function)" msgstr "" -#: ../../c-api/intro.rst:797 +#: ../../c-api/intro.rst:775 msgid "Py_IsInitialized (C function)" msgstr "" diff --git a/c-api/iter.po b/c-api/iter.po index 57c82d080..91f71a55a 100644 --- a/c-api/iter.po +++ b/c-api/iter.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 00:49+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/c-api/iterator.po b/c-api/iterator.po index e490bec19..1ce506704 100644 --- a/c-api/iterator.po +++ b/c-api/iterator.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:49+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/c-api/list.po b/c-api/list.po index 92a425fe1..b9658a8a6 100644 --- a/c-api/list.po +++ b/c-api/list.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:49+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/long.po b/c-api/long.po index 72a3cd0d6..93fd76586 100644 --- a/c-api/long.po +++ b/c-api/long.po @@ -5,15 +5,17 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 +# Gigahertz ., 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:49+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Gigahertz ., 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -456,10 +458,10 @@ msgstr "" #: ../../c-api/long.rst:442 msgid "" -"If the returned value is greater than than *n_bytes*, the value was " -"truncated: as many of the lowest bits of the value as could fit are written, " -"and the higher bits are ignored. This matches the typical behavior of a C-" -"style downcast." +"If the returned value is greater than *n_bytes*, the value was truncated: as " +"many of the lowest bits of the value as could fit are written, and the " +"higher bits are ignored. This matches the typical behavior of a C-style " +"downcast." msgstr "" #: ../../c-api/long.rst:449 diff --git a/c-api/mapping.po b/c-api/mapping.po index 0f29d67c6..de7732484 100644 --- a/c-api/mapping.po +++ b/c-api/mapping.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:49+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/marshal.po b/c-api/marshal.po index 6bc5091b4..53a95386a 100644 --- a/c-api/marshal.po +++ b/c-api/marshal.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 00:49+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/c-api/memory.po b/c-api/memory.po index d9523f87e..65b875e76 100644 --- a/c-api/memory.po +++ b/c-api/memory.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:49+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -470,283 +471,317 @@ msgid "" "called before, undefined behavior occurs." msgstr "" -#: ../../c-api/memory.rst:383 +#: ../../c-api/memory.rst:379 +msgid "" +"Do not call this directly to free an object's memory; call the type's :c:" +"member:`~PyTypeObject.tp_free` slot instead." +msgstr "" + +#: ../../c-api/memory.rst:382 +msgid "" +"Do not use this for memory allocated by :c:macro:`PyObject_GC_New` or :c:" +"macro:`PyObject_GC_NewVar`; use :c:func:`PyObject_GC_Del` instead." +msgstr "" + +#: ../../c-api/memory.rst:387 +msgid "" +":c:func:`PyObject_GC_Del` is the equivalent of this function for memory " +"allocated by types that support garbage collection." +msgstr "" + +#: ../../c-api/memory.rst:389 ../../c-api/memory.rst:486 +msgid ":c:func:`PyObject_Malloc`" +msgstr "" + +#: ../../c-api/memory.rst:390 ../../c-api/memory.rst:487 +msgid ":c:func:`PyObject_Realloc`" +msgstr "" + +#: ../../c-api/memory.rst:391 ../../c-api/memory.rst:488 +msgid ":c:func:`PyObject_Calloc`" +msgstr "" + +#: ../../c-api/memory.rst:392 +msgid ":c:macro:`PyObject_New`" +msgstr "" + +#: ../../c-api/memory.rst:393 +msgid ":c:macro:`PyObject_NewVar`" +msgstr "" + +#: ../../c-api/memory.rst:394 +msgid ":c:func:`PyType_GenericAlloc`" +msgstr "" + +#: ../../c-api/memory.rst:395 +msgid ":c:member:`~PyTypeObject.tp_free`" +msgstr "" + +#: ../../c-api/memory.rst:401 msgid "Default Memory Allocators" msgstr "" -#: ../../c-api/memory.rst:385 +#: ../../c-api/memory.rst:403 msgid "Default memory allocators:" msgstr "" -#: ../../c-api/memory.rst:388 +#: ../../c-api/memory.rst:406 msgid "Configuration" msgstr "" -#: ../../c-api/memory.rst:388 +#: ../../c-api/memory.rst:406 msgid "Name" msgstr "" -#: ../../c-api/memory.rst:388 +#: ../../c-api/memory.rst:406 msgid "PyMem_RawMalloc" msgstr "" -#: ../../c-api/memory.rst:388 +#: ../../c-api/memory.rst:406 msgid "PyMem_Malloc" msgstr "" -#: ../../c-api/memory.rst:388 +#: ../../c-api/memory.rst:406 msgid "PyObject_Malloc" msgstr "" -#: ../../c-api/memory.rst:390 +#: ../../c-api/memory.rst:408 msgid "Release build" msgstr "" -#: ../../c-api/memory.rst:390 +#: ../../c-api/memory.rst:408 msgid "``\"pymalloc\"``" msgstr "" -#: ../../c-api/memory.rst:390 ../../c-api/memory.rst:392 +#: ../../c-api/memory.rst:408 ../../c-api/memory.rst:410 msgid "``malloc``" msgstr "" -#: ../../c-api/memory.rst:390 +#: ../../c-api/memory.rst:408 msgid "``pymalloc``" msgstr "" -#: ../../c-api/memory.rst:391 +#: ../../c-api/memory.rst:409 msgid "Debug build" msgstr "" -#: ../../c-api/memory.rst:391 +#: ../../c-api/memory.rst:409 msgid "``\"pymalloc_debug\"``" msgstr "" -#: ../../c-api/memory.rst:391 ../../c-api/memory.rst:393 +#: ../../c-api/memory.rst:409 ../../c-api/memory.rst:411 msgid "``malloc`` + debug" msgstr "" -#: ../../c-api/memory.rst:391 +#: ../../c-api/memory.rst:409 msgid "``pymalloc`` + debug" msgstr "" -#: ../../c-api/memory.rst:392 +#: ../../c-api/memory.rst:410 msgid "Release build, without pymalloc" msgstr "" -#: ../../c-api/memory.rst:392 +#: ../../c-api/memory.rst:410 msgid "``\"malloc\"``" msgstr "" -#: ../../c-api/memory.rst:393 +#: ../../c-api/memory.rst:411 msgid "Debug build, without pymalloc" msgstr "" -#: ../../c-api/memory.rst:393 +#: ../../c-api/memory.rst:411 msgid "``\"malloc_debug\"``" msgstr "" -#: ../../c-api/memory.rst:396 +#: ../../c-api/memory.rst:414 msgid "Legend:" msgstr "" -#: ../../c-api/memory.rst:398 +#: ../../c-api/memory.rst:416 msgid "Name: value for :envvar:`PYTHONMALLOC` environment variable." msgstr "" -#: ../../c-api/memory.rst:399 +#: ../../c-api/memory.rst:417 msgid "" "``malloc``: system allocators from the standard C library, C functions: :c:" "func:`malloc`, :c:func:`calloc`, :c:func:`realloc` and :c:func:`free`." msgstr "" -#: ../../c-api/memory.rst:401 +#: ../../c-api/memory.rst:419 msgid "``pymalloc``: :ref:`pymalloc memory allocator `." msgstr "" -#: ../../c-api/memory.rst:402 +#: ../../c-api/memory.rst:420 msgid "" "``mimalloc``: :ref:`mimalloc memory allocator `. The pymalloc " "allocator will be used if mimalloc support isn't available." msgstr "" -#: ../../c-api/memory.rst:404 +#: ../../c-api/memory.rst:422 msgid "" "\"+ debug\": with :ref:`debug hooks on the Python memory allocators `." msgstr "" -#: ../../c-api/memory.rst:406 +#: ../../c-api/memory.rst:424 msgid "\"Debug build\": :ref:`Python build in debug mode `." msgstr "" -#: ../../c-api/memory.rst:411 +#: ../../c-api/memory.rst:429 msgid "Customize Memory Allocators" msgstr "" -#: ../../c-api/memory.rst:417 +#: ../../c-api/memory.rst:435 msgid "" "Structure used to describe a memory block allocator. The structure has the " "following fields:" msgstr "" -#: ../../c-api/memory.rst:421 ../../c-api/memory.rst:668 +#: ../../c-api/memory.rst:439 ../../c-api/memory.rst:686 msgid "Field" msgstr "" -#: ../../c-api/memory.rst:421 ../../c-api/memory.rst:668 +#: ../../c-api/memory.rst:439 ../../c-api/memory.rst:686 msgid "Meaning" msgstr "" -#: ../../c-api/memory.rst:423 ../../c-api/memory.rst:670 +#: ../../c-api/memory.rst:441 ../../c-api/memory.rst:688 msgid "``void *ctx``" msgstr "" -#: ../../c-api/memory.rst:423 ../../c-api/memory.rst:670 +#: ../../c-api/memory.rst:441 ../../c-api/memory.rst:688 msgid "user context passed as first argument" msgstr "" -#: ../../c-api/memory.rst:425 +#: ../../c-api/memory.rst:443 msgid "``void* malloc(void *ctx, size_t size)``" msgstr "" -#: ../../c-api/memory.rst:425 +#: ../../c-api/memory.rst:443 msgid "allocate a memory block" msgstr "" -#: ../../c-api/memory.rst:427 +#: ../../c-api/memory.rst:445 msgid "``void* calloc(void *ctx, size_t nelem, size_t elsize)``" msgstr "" -#: ../../c-api/memory.rst:427 +#: ../../c-api/memory.rst:445 msgid "allocate a memory block initialized with zeros" msgstr "" -#: ../../c-api/memory.rst:430 +#: ../../c-api/memory.rst:448 msgid "``void* realloc(void *ctx, void *ptr, size_t new_size)``" msgstr "" -#: ../../c-api/memory.rst:430 +#: ../../c-api/memory.rst:448 msgid "allocate or resize a memory block" msgstr "" -#: ../../c-api/memory.rst:432 +#: ../../c-api/memory.rst:450 msgid "``void free(void *ctx, void *ptr)``" msgstr "" -#: ../../c-api/memory.rst:432 +#: ../../c-api/memory.rst:450 msgid "free a memory block" msgstr "" -#: ../../c-api/memory.rst:435 +#: ../../c-api/memory.rst:453 msgid "" "The :c:type:`!PyMemAllocator` structure was renamed to :c:type:" "`PyMemAllocatorEx` and a new ``calloc`` field was added." msgstr "" -#: ../../c-api/memory.rst:442 +#: ../../c-api/memory.rst:460 msgid "Enum used to identify an allocator domain. Domains:" msgstr "" -#: ../../c-api/memory.rst:448 ../../c-api/memory.rst:457 -#: ../../c-api/memory.rst:466 +#: ../../c-api/memory.rst:466 ../../c-api/memory.rst:475 +#: ../../c-api/memory.rst:484 msgid "Functions:" msgstr "" -#: ../../c-api/memory.rst:450 +#: ../../c-api/memory.rst:468 msgid ":c:func:`PyMem_RawMalloc`" msgstr "" -#: ../../c-api/memory.rst:451 +#: ../../c-api/memory.rst:469 msgid ":c:func:`PyMem_RawRealloc`" msgstr "" -#: ../../c-api/memory.rst:452 +#: ../../c-api/memory.rst:470 msgid ":c:func:`PyMem_RawCalloc`" msgstr "" -#: ../../c-api/memory.rst:453 +#: ../../c-api/memory.rst:471 msgid ":c:func:`PyMem_RawFree`" msgstr "" -#: ../../c-api/memory.rst:459 +#: ../../c-api/memory.rst:477 msgid ":c:func:`PyMem_Malloc`," msgstr "" -#: ../../c-api/memory.rst:460 +#: ../../c-api/memory.rst:478 msgid ":c:func:`PyMem_Realloc`" msgstr "" -#: ../../c-api/memory.rst:461 +#: ../../c-api/memory.rst:479 msgid ":c:func:`PyMem_Calloc`" msgstr "" -#: ../../c-api/memory.rst:462 +#: ../../c-api/memory.rst:480 msgid ":c:func:`PyMem_Free`" msgstr "" -#: ../../c-api/memory.rst:468 -msgid ":c:func:`PyObject_Malloc`" -msgstr "" - -#: ../../c-api/memory.rst:469 -msgid ":c:func:`PyObject_Realloc`" -msgstr "" - -#: ../../c-api/memory.rst:470 -msgid ":c:func:`PyObject_Calloc`" -msgstr "" - -#: ../../c-api/memory.rst:471 +#: ../../c-api/memory.rst:489 msgid ":c:func:`PyObject_Free`" msgstr "" -#: ../../c-api/memory.rst:475 +#: ../../c-api/memory.rst:493 msgid "Get the memory block allocator of the specified domain." msgstr "" -#: ../../c-api/memory.rst:480 +#: ../../c-api/memory.rst:498 msgid "Set the memory block allocator of the specified domain." msgstr "" -#: ../../c-api/memory.rst:482 +#: ../../c-api/memory.rst:500 msgid "" "The new allocator must return a distinct non-``NULL`` pointer when " "requesting zero bytes." msgstr "" -#: ../../c-api/memory.rst:485 +#: ../../c-api/memory.rst:503 msgid "" "For the :c:macro:`PYMEM_DOMAIN_RAW` domain, the allocator must be thread-" "safe: a :term:`thread state` is not :term:`attached ` " "when the allocator is called." msgstr "" -#: ../../c-api/memory.rst:489 +#: ../../c-api/memory.rst:507 msgid "" "For the remaining domains, the allocator must also be thread-safe: the " "allocator may be called in different interpreters that do not share a :term:" "`GIL`." msgstr "" -#: ../../c-api/memory.rst:493 +#: ../../c-api/memory.rst:511 msgid "" "If the new allocator is not a hook (does not call the previous allocator), " "the :c:func:`PyMem_SetupDebugHooks` function must be called to reinstall the " "debug hooks on top on the new allocator." msgstr "" -#: ../../c-api/memory.rst:497 +#: ../../c-api/memory.rst:515 msgid "" "See also :c:member:`PyPreConfig.allocator` and :ref:`Preinitialize Python " "with PyPreConfig `." msgstr "" -#: ../../c-api/memory.rst:502 +#: ../../c-api/memory.rst:520 msgid ":c:func:`PyMem_SetAllocator` does have the following contract:" msgstr "" -#: ../../c-api/memory.rst:504 +#: ../../c-api/memory.rst:522 msgid "" "It can be called after :c:func:`Py_PreInitialize` and before :c:func:" "`Py_InitializeFromConfig` to install a custom memory allocator. There are no " @@ -756,7 +791,7 @@ msgid "" "allocator domains ` for more information." msgstr "" -#: ../../c-api/memory.rst:512 +#: ../../c-api/memory.rst:530 msgid "" "If called after Python has finish initializing (after :c:func:" "`Py_InitializeFromConfig` has been called) the allocator **must** wrap the " @@ -764,21 +799,21 @@ msgid "" "arbitrary one is **not supported**." msgstr "" -#: ../../c-api/memory.rst:517 +#: ../../c-api/memory.rst:535 msgid "All allocators must be thread-safe." msgstr "" -#: ../../c-api/memory.rst:523 +#: ../../c-api/memory.rst:541 msgid "" "Setup :ref:`debug hooks in the Python memory allocators ` " "to detect memory errors." msgstr "" -#: ../../c-api/memory.rst:530 +#: ../../c-api/memory.rst:548 msgid "Debug hooks on the Python memory allocators" msgstr "" -#: ../../c-api/memory.rst:532 +#: ../../c-api/memory.rst:550 msgid "" "When :ref:`Python is built in debug mode `, the :c:func:" "`PyMem_SetupDebugHooks` function is called at the :ref:`Python " @@ -786,19 +821,19 @@ msgid "" "allocators to detect memory errors." msgstr "" -#: ../../c-api/memory.rst:537 +#: ../../c-api/memory.rst:555 msgid "" "The :envvar:`PYTHONMALLOC` environment variable can be used to install debug " "hooks on a Python compiled in release mode (ex: ``PYTHONMALLOC=debug``)." msgstr "" -#: ../../c-api/memory.rst:540 +#: ../../c-api/memory.rst:558 msgid "" "The :c:func:`PyMem_SetupDebugHooks` function can be used to set debug hooks " "after calling :c:func:`PyMem_SetAllocator`." msgstr "" -#: ../../c-api/memory.rst:543 +#: ../../c-api/memory.rst:561 msgid "" "These debug hooks fill dynamically allocated memory blocks with special, " "recognizable bit patterns. Newly allocated memory is filled with the byte " @@ -808,25 +843,25 @@ msgid "" "these bytes are unlikely to be valid addresses, floats, or ASCII strings." msgstr "" -#: ../../c-api/memory.rst:550 +#: ../../c-api/memory.rst:568 msgid "Runtime checks:" msgstr "" -#: ../../c-api/memory.rst:552 +#: ../../c-api/memory.rst:570 msgid "" "Detect API violations. For example, detect if :c:func:`PyObject_Free` is " "called on a memory block allocated by :c:func:`PyMem_Malloc`." msgstr "" -#: ../../c-api/memory.rst:554 +#: ../../c-api/memory.rst:572 msgid "Detect write before the start of the buffer (buffer underflow)." msgstr "" -#: ../../c-api/memory.rst:555 +#: ../../c-api/memory.rst:573 msgid "Detect write after the end of the buffer (buffer overflow)." msgstr "" -#: ../../c-api/memory.rst:556 +#: ../../c-api/memory.rst:574 msgid "" "Check that there is an :term:`attached thread state` when allocator " "functions of :c:macro:`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) " @@ -834,7 +869,7 @@ msgid "" "called." msgstr "" -#: ../../c-api/memory.rst:561 +#: ../../c-api/memory.rst:579 msgid "" "On error, the debug hooks use the :mod:`tracemalloc` module to get the " "traceback where a memory block was allocated. The traceback is only " @@ -842,7 +877,7 @@ msgid "" "memory block was traced." msgstr "" -#: ../../c-api/memory.rst:566 +#: ../../c-api/memory.rst:584 msgid "" "Let *S* = ``sizeof(size_t)``. ``2*S`` bytes are added at each end of each " "block of *N* bytes requested. The memory layout is like so, where p " @@ -852,49 +887,49 @@ msgid "" "from a Python slice):" msgstr "" -#: ../../c-api/memory.rst:572 +#: ../../c-api/memory.rst:590 msgid "``p[-2*S:-S]``" msgstr "" -#: ../../c-api/memory.rst:573 +#: ../../c-api/memory.rst:591 msgid "" "Number of bytes originally asked for. This is a size_t, big-endian (easier " "to read in a memory dump)." msgstr "" -#: ../../c-api/memory.rst:575 +#: ../../c-api/memory.rst:593 msgid "``p[-S]``" msgstr "" -#: ../../c-api/memory.rst:576 +#: ../../c-api/memory.rst:594 msgid "API identifier (ASCII character):" msgstr "" -#: ../../c-api/memory.rst:578 +#: ../../c-api/memory.rst:596 msgid "``'r'`` for :c:macro:`PYMEM_DOMAIN_RAW`." msgstr "" -#: ../../c-api/memory.rst:579 +#: ../../c-api/memory.rst:597 msgid "``'m'`` for :c:macro:`PYMEM_DOMAIN_MEM`." msgstr "" -#: ../../c-api/memory.rst:580 +#: ../../c-api/memory.rst:598 msgid "``'o'`` for :c:macro:`PYMEM_DOMAIN_OBJ`." msgstr "" -#: ../../c-api/memory.rst:582 +#: ../../c-api/memory.rst:600 msgid "``p[-S+1:0]``" msgstr "" -#: ../../c-api/memory.rst:583 +#: ../../c-api/memory.rst:601 msgid "Copies of PYMEM_FORBIDDENBYTE. Used to catch under- writes and reads." msgstr "" -#: ../../c-api/memory.rst:585 +#: ../../c-api/memory.rst:603 msgid "``p[0:N]``" msgstr "" -#: ../../c-api/memory.rst:586 +#: ../../c-api/memory.rst:604 msgid "" "The requested memory, filled with copies of PYMEM_CLEANBYTE, used to catch " "reference to uninitialized memory. When a realloc-like function is called " @@ -905,25 +940,25 @@ msgid "" "bytes are also filled with PYMEM_DEADBYTE." msgstr "" -#: ../../c-api/memory.rst:594 +#: ../../c-api/memory.rst:612 msgid "``p[N:N+S]``" msgstr "" -#: ../../c-api/memory.rst:595 +#: ../../c-api/memory.rst:613 msgid "Copies of PYMEM_FORBIDDENBYTE. Used to catch over- writes and reads." msgstr "" -#: ../../c-api/memory.rst:597 +#: ../../c-api/memory.rst:615 msgid "``p[N+S:N+2*S]``" msgstr "" -#: ../../c-api/memory.rst:598 +#: ../../c-api/memory.rst:616 msgid "" "Only used if the ``PYMEM_DEBUG_SERIALNO`` macro is defined (not defined by " "default)." msgstr "" -#: ../../c-api/memory.rst:601 +#: ../../c-api/memory.rst:619 msgid "" "A serial number, incremented by 1 on each call to a malloc-like or realloc-" "like function. Big-endian :c:type:`size_t`. If \"bad memory\" is detected " @@ -933,7 +968,7 @@ msgid "" "number is incremented, and exists so you can set such a breakpoint easily." msgstr "" -#: ../../c-api/memory.rst:608 +#: ../../c-api/memory.rst:626 msgid "" "A realloc-like or free-like function first checks that the " "PYMEM_FORBIDDENBYTE bytes at each end are intact. If they've been altered, " @@ -946,7 +981,7 @@ msgid "" "getting used)." msgstr "" -#: ../../c-api/memory.rst:617 +#: ../../c-api/memory.rst:635 msgid "" "The :c:func:`PyMem_SetupDebugHooks` function now also works on Python " "compiled in release mode. On error, the debug hooks now use :mod:" @@ -956,7 +991,7 @@ msgid "" "domains are called." msgstr "" -#: ../../c-api/memory.rst:625 +#: ../../c-api/memory.rst:643 msgid "" "Byte patterns ``0xCB`` (``PYMEM_CLEANBYTE``), ``0xDB`` (``PYMEM_DEADBYTE``) " "and ``0xFB`` (``PYMEM_FORBIDDENBYTE``) have been replaced with ``0xCD``, " @@ -964,11 +999,11 @@ msgid "" "``malloc()`` and ``free()``." msgstr "" -#: ../../c-api/memory.rst:635 +#: ../../c-api/memory.rst:653 msgid "The pymalloc allocator" msgstr "" -#: ../../c-api/memory.rst:637 +#: ../../c-api/memory.rst:655 msgid "" "Python has a *pymalloc* allocator optimized for small objects (smaller or " "equal to 512 bytes) with a short lifetime. It uses memory mappings called " @@ -977,75 +1012,75 @@ msgid "" "`PyMem_RawRealloc` for allocations larger than 512 bytes." msgstr "" -#: ../../c-api/memory.rst:643 +#: ../../c-api/memory.rst:661 msgid "" "*pymalloc* is the :ref:`default allocator ` of " "the :c:macro:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) and :c:macro:" "`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) domains." msgstr "" -#: ../../c-api/memory.rst:647 +#: ../../c-api/memory.rst:665 msgid "The arena allocator uses the following functions:" msgstr "" -#: ../../c-api/memory.rst:649 +#: ../../c-api/memory.rst:667 msgid ":c:func:`!VirtualAlloc` and :c:func:`!VirtualFree` on Windows," msgstr "" -#: ../../c-api/memory.rst:650 +#: ../../c-api/memory.rst:668 msgid ":c:func:`!mmap` and :c:func:`!munmap` if available," msgstr "" -#: ../../c-api/memory.rst:651 +#: ../../c-api/memory.rst:669 msgid ":c:func:`malloc` and :c:func:`free` otherwise." msgstr "" -#: ../../c-api/memory.rst:653 +#: ../../c-api/memory.rst:671 msgid "" "This allocator is disabled if Python is configured with the :option:`--" "without-pymalloc` option. It can also be disabled at runtime using the :" "envvar:`PYTHONMALLOC` environment variable (ex: ``PYTHONMALLOC=malloc``)." msgstr "" -#: ../../c-api/memory.rst:658 +#: ../../c-api/memory.rst:676 msgid "Customize pymalloc Arena Allocator" msgstr "" -#: ../../c-api/memory.rst:664 +#: ../../c-api/memory.rst:682 msgid "" "Structure used to describe an arena allocator. The structure has three " "fields:" msgstr "" -#: ../../c-api/memory.rst:672 +#: ../../c-api/memory.rst:690 msgid "``void* alloc(void *ctx, size_t size)``" msgstr "" -#: ../../c-api/memory.rst:672 +#: ../../c-api/memory.rst:690 msgid "allocate an arena of size bytes" msgstr "" -#: ../../c-api/memory.rst:674 +#: ../../c-api/memory.rst:692 msgid "``void free(void *ctx, void *ptr, size_t size)``" msgstr "" -#: ../../c-api/memory.rst:674 +#: ../../c-api/memory.rst:692 msgid "free an arena" msgstr "" -#: ../../c-api/memory.rst:679 +#: ../../c-api/memory.rst:697 msgid "Get the arena allocator." msgstr "" -#: ../../c-api/memory.rst:683 +#: ../../c-api/memory.rst:701 msgid "Set the arena allocator." msgstr "" -#: ../../c-api/memory.rst:688 +#: ../../c-api/memory.rst:706 msgid "The mimalloc allocator" msgstr "" -#: ../../c-api/memory.rst:692 +#: ../../c-api/memory.rst:710 msgid "" "Python supports the mimalloc allocator when the underlying platform support " "is available. mimalloc \"is a general purpose allocator with excellent " @@ -1053,46 +1088,46 @@ msgid "" "runtime systems of the Koka and Lean languages.\"" msgstr "" -#: ../../c-api/memory.rst:697 +#: ../../c-api/memory.rst:715 msgid "tracemalloc C API" msgstr "" -#: ../../c-api/memory.rst:703 +#: ../../c-api/memory.rst:721 msgid "Track an allocated memory block in the :mod:`tracemalloc` module." msgstr "" -#: ../../c-api/memory.rst:705 +#: ../../c-api/memory.rst:723 msgid "" "Return ``0`` on success, return ``-1`` on error (failed to allocate memory " "to store the trace). Return ``-2`` if tracemalloc is disabled." msgstr "" -#: ../../c-api/memory.rst:708 +#: ../../c-api/memory.rst:726 msgid "If memory block is already tracked, update the existing trace." msgstr "" -#: ../../c-api/memory.rst:712 +#: ../../c-api/memory.rst:730 msgid "" "Untrack an allocated memory block in the :mod:`tracemalloc` module. Do " "nothing if the block was not tracked." msgstr "" -#: ../../c-api/memory.rst:715 +#: ../../c-api/memory.rst:733 msgid "Return ``-2`` if tracemalloc is disabled, otherwise return ``0``." msgstr "" -#: ../../c-api/memory.rst:721 +#: ../../c-api/memory.rst:739 msgid "Examples" msgstr "" -#: ../../c-api/memory.rst:723 +#: ../../c-api/memory.rst:741 msgid "" "Here is the example from section :ref:`memoryoverview`, rewritten so that " "the I/O buffer is allocated from the Python heap by using the first function " "set::" msgstr "" -#: ../../c-api/memory.rst:726 +#: ../../c-api/memory.rst:744 msgid "" "PyObject *res;\n" "char *buf = (char *) PyMem_Malloc(BUFSIZ); /* for I/O */\n" @@ -1105,11 +1140,11 @@ msgid "" "return res;" msgstr "" -#: ../../c-api/memory.rst:736 +#: ../../c-api/memory.rst:754 msgid "The same code using the type-oriented function set::" msgstr "" -#: ../../c-api/memory.rst:738 +#: ../../c-api/memory.rst:756 msgid "" "PyObject *res;\n" "char *buf = PyMem_New(char, BUFSIZ); /* for I/O */\n" @@ -1122,7 +1157,7 @@ msgid "" "return res;" msgstr "" -#: ../../c-api/memory.rst:748 +#: ../../c-api/memory.rst:766 msgid "" "Note that in the two examples above, the buffer is always manipulated via " "functions belonging to the same set. Indeed, it is required to use the same " @@ -1132,7 +1167,7 @@ msgid "" "different allocators operating on different heaps. ::" msgstr "" -#: ../../c-api/memory.rst:755 +#: ../../c-api/memory.rst:773 msgid "" "char *buf1 = PyMem_New(char, BUFSIZ);\n" "char *buf2 = (char *) malloc(BUFSIZ);\n" @@ -1143,14 +1178,14 @@ msgid "" "free(buf1); /* Fatal -- should be PyMem_Free() */" msgstr "" -#: ../../c-api/memory.rst:763 +#: ../../c-api/memory.rst:781 msgid "" "In addition to the functions aimed at handling raw memory blocks from the " "Python heap, objects in Python are allocated and released with :c:macro:" "`PyObject_New`, :c:macro:`PyObject_NewVar` and :c:func:`PyObject_Free`." msgstr "" -#: ../../c-api/memory.rst:767 +#: ../../c-api/memory.rst:785 msgid "" "These will be explained in the next chapter on defining and implementing new " "object types in C." diff --git a/c-api/memoryview.po b/c-api/memoryview.po index 66c1861b8..1b1c3884a 100644 --- a/c-api/memoryview.po +++ b/c-api/memoryview.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:49+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/method.po b/c-api/method.po index 6e76460b6..5a3db2a8a 100644 --- a/c-api/method.po +++ b/c-api/method.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:49+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/c-api/module.po b/c-api/module.po index 555feddb6..3881676d2 100644 --- a/c-api/module.po +++ b/c-api/module.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:49+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -53,8 +54,8 @@ msgid "" "setting a :attr:`~module.__file__` attribute." msgstr "" -#: ../../c-api/module.rst:46 ../../c-api/module.rst:272 -#: ../../c-api/module.rst:474 +#: ../../c-api/module.rst:46 ../../c-api/module.rst:416 +#: ../../c-api/module.rst:443 msgid "Return ``NULL`` with an exception set on error." msgstr "" @@ -132,104 +133,120 @@ msgid "" msgstr "" #: ../../c-api/module.rst:133 -msgid "Initializing C modules" +msgid "Module definitions" msgstr "" #: ../../c-api/module.rst:135 msgid "" -"Modules objects are usually created from extension modules (shared libraries " -"which export an initialization function), or compiled-in modules (where the " -"initialization function is added using :c:func:`PyImport_AppendInittab`). " -"See :ref:`building` or :ref:`extending-with-embedding` for details." +"The functions in the previous section work on any module object, including " +"modules imported from Python code." msgstr "" -#: ../../c-api/module.rst:140 +#: ../../c-api/module.rst:138 msgid "" -"The initialization function can either pass a module definition instance to :" -"c:func:`PyModule_Create`, and return the resulting module object, or request " -"\"multi-phase initialization\" by returning the definition struct itself." +"Modules defined using the C API typically use a *module definition*, :c:type:" +"`PyModuleDef` -- a statically allocated, constant “description\" of how a " +"module should be created." msgstr "" -#: ../../c-api/module.rst:146 +#: ../../c-api/module.rst:142 +msgid "" +"The definition is usually used to define an extension's “main” module object " +"(see :ref:`extension-modules` for details). It is also used to :ref:`create " +"extension modules dynamically `." +msgstr "" + +#: ../../c-api/module.rst:147 +msgid "" +"Unlike :c:func:`PyModule_New`, the definition allows management of *module " +"state* -- a piece of memory that is allocated and cleared together with the " +"module object. Unlike the module's Python attributes, Python code cannot " +"replace or delete data stored in module state." +msgstr "" + +#: ../../c-api/module.rst:155 msgid "" "The module definition struct, which holds all information needed to create a " -"module object. There is usually only one statically initialized variable of " -"this type for each module." +"module object. This structure must be statically allocated (or be otherwise " +"guaranteed to be valid while any modules created from it exist). Usually, " +"there is only one variable of this type for each extension module." msgstr "" -#: ../../c-api/module.rst:152 +#: ../../c-api/module.rst:163 msgid "Always initialize this member to :c:macro:`PyModuleDef_HEAD_INIT`." msgstr "" -#: ../../c-api/module.rst:156 +#: ../../c-api/module.rst:167 msgid "Name for the new module." msgstr "" -#: ../../c-api/module.rst:160 +#: ../../c-api/module.rst:171 msgid "" "Docstring for the module; usually a docstring variable created with :c:macro:" "`PyDoc_STRVAR` is used." msgstr "" -#: ../../c-api/module.rst:165 +#: ../../c-api/module.rst:176 msgid "" "Module state may be kept in a per-module memory area that can be retrieved " "with :c:func:`PyModule_GetState`, rather than in static globals. This makes " "modules safe for use in multiple sub-interpreters." msgstr "" -#: ../../c-api/module.rst:169 +#: ../../c-api/module.rst:180 msgid "" "This memory area is allocated based on *m_size* on module creation, and " "freed when the module object is deallocated, after the :c:member:" "`~PyModuleDef.m_free` function has been called, if present." msgstr "" -#: ../../c-api/module.rst:173 +#: ../../c-api/module.rst:184 msgid "" -"Setting ``m_size`` to ``-1`` means that the module does not support sub-" -"interpreters, because it has global state." +"Setting it to a non-negative value means that the module can be re-" +"initialized and specifies the additional amount of memory it requires for " +"its state." msgstr "" -#: ../../c-api/module.rst:176 +#: ../../c-api/module.rst:188 msgid "" -"Setting it to a non-negative value means that the module can be re-" -"initialized and specifies the additional amount of memory it requires for " -"its state. Non-negative ``m_size`` is required for multi-phase " -"initialization." +"Setting ``m_size`` to ``-1`` means that the module does not support sub-" +"interpreters, because it has global state. Negative ``m_size`` is only " +"allowed when using :ref:`legacy single-phase initialization ` or when :ref:`creating modules dynamically `." msgstr "" -#: ../../c-api/module.rst:181 +#: ../../c-api/module.rst:194 msgid "See :PEP:`3121` for more details." msgstr "" -#: ../../c-api/module.rst:185 +#: ../../c-api/module.rst:198 msgid "" "A pointer to a table of module-level functions, described by :c:type:" "`PyMethodDef` values. Can be ``NULL`` if no functions are present." msgstr "" -#: ../../c-api/module.rst:190 +#: ../../c-api/module.rst:203 msgid "" "An array of slot definitions for multi-phase initialization, terminated by a " -"``{0, NULL}`` entry. When using single-phase initialization, *m_slots* must " -"be ``NULL``." +"``{0, NULL}`` entry. When using legacy single-phase initialization, " +"*m_slots* must be ``NULL``." msgstr "" -#: ../../c-api/module.rst:196 +#: ../../c-api/module.rst:209 msgid "" "Prior to version 3.5, this member was always set to ``NULL``, and was " "defined as:" msgstr "" -#: ../../c-api/module.rst:203 +#: ../../c-api/module.rst:216 msgid "" "A traversal function to call during GC traversal of the module object, or " "``NULL`` if not needed." msgstr "" -#: ../../c-api/module.rst:206 ../../c-api/module.rst:221 -#: ../../c-api/module.rst:242 +#: ../../c-api/module.rst:219 ../../c-api/module.rst:234 +#: ../../c-api/module.rst:255 msgid "" "This function is not called if the module state was requested but is not " "allocated yet. This is the case immediately after the module is created and " @@ -239,18 +256,18 @@ msgid "" "`PyModule_GetState`) is ``NULL``." msgstr "" -#: ../../c-api/module.rst:213 ../../c-api/module.rst:234 -#: ../../c-api/module.rst:249 +#: ../../c-api/module.rst:226 ../../c-api/module.rst:247 +#: ../../c-api/module.rst:262 msgid "No longer called before the module state is allocated." msgstr "" -#: ../../c-api/module.rst:218 +#: ../../c-api/module.rst:231 msgid "" "A clear function to call during GC clearing of the module object, or " "``NULL`` if not needed." msgstr "" -#: ../../c-api/module.rst:228 +#: ../../c-api/module.rst:241 msgid "" "Like :c:member:`PyTypeObject.tp_clear`, this function is not *always* called " "before a module is deallocated. For example, when reference counting is " @@ -259,151 +276,55 @@ msgid "" "directly." msgstr "" -#: ../../c-api/module.rst:239 +#: ../../c-api/module.rst:252 msgid "" "A function to call during deallocation of the module object, or ``NULL`` if " "not needed." msgstr "" -#: ../../c-api/module.rst:253 -msgid "Single-phase initialization" -msgstr "" - -#: ../../c-api/module.rst:255 -msgid "" -"The module initialization function may create and return the module object " -"directly. This is referred to as \"single-phase initialization\", and uses " -"one of the following two module creation functions:" -msgstr "" - -#: ../../c-api/module.rst:261 -msgid "" -"Create a new module object, given the definition in *def*. This behaves " -"like :c:func:`PyModule_Create2` with *module_api_version* set to :c:macro:" -"`PYTHON_API_VERSION`." -msgstr "" - -#: ../../c-api/module.rst:268 -msgid "" -"Create a new module object, given the definition in *def*, assuming the API " -"version *module_api_version*. If that version does not match the version of " -"the running interpreter, a :exc:`RuntimeWarning` is emitted." -msgstr "" - -#: ../../c-api/module.rst:276 -msgid "" -"Most uses of this function should be using :c:func:`PyModule_Create` " -"instead; only use this if you are sure you need it." +#: ../../c-api/module.rst:267 +msgid "Module slots" msgstr "" -#: ../../c-api/module.rst:279 -msgid "" -"Before it is returned from in the initialization function, the resulting " -"module object is typically populated using functions like :c:func:" -"`PyModule_AddObjectRef`." -msgstr "" - -#: ../../c-api/module.rst:285 -msgid "Multi-phase initialization" -msgstr "" - -#: ../../c-api/module.rst:287 -msgid "" -"An alternate way to specify extensions is to request \"multi-phase " -"initialization\". Extension modules created this way behave more like Python " -"modules: the initialization is split between the *creation phase*, when the " -"module object is created, and the *execution phase*, when it is populated. " -"The distinction is similar to the :py:meth:`!__new__` and :py:meth:`!" -"__init__` methods of classes." -msgstr "" - -#: ../../c-api/module.rst:294 -msgid "" -"Unlike modules created using single-phase initialization, these modules are " -"not singletons: if the *sys.modules* entry is removed and the module is re-" -"imported, a new module object is created, and the old module is subject to " -"normal garbage collection -- as with Python modules. By default, multiple " -"modules created from the same definition should be independent: changes to " -"one should not affect the others. This means that all state should be " -"specific to the module object (using e.g. using :c:func:" -"`PyModule_GetState`), or its contents (such as the module's :attr:`~object." -"__dict__` or individual classes created with :c:func:`PyType_FromSpec`)." -msgstr "" - -#: ../../c-api/module.rst:304 -msgid "" -"All modules created using multi-phase initialization are expected to " -"support :ref:`sub-interpreters `. Making sure " -"multiple modules are independent is typically enough to achieve this." -msgstr "" - -#: ../../c-api/module.rst:308 -msgid "" -"To request multi-phase initialization, the initialization function " -"(PyInit_modulename) returns a :c:type:`PyModuleDef` instance with non-empty :" -"c:member:`~PyModuleDef.m_slots`. Before it is returned, the ``PyModuleDef`` " -"instance must be initialized with the following function:" -msgstr "" - -#: ../../c-api/module.rst:315 -msgid "" -"Ensures a module definition is a properly initialized Python object that " -"correctly reports its type and reference count." -msgstr "" - -#: ../../c-api/module.rst:318 -msgid "Returns *def* cast to ``PyObject*``, or ``NULL`` if an error occurred." -msgstr "" - -#: ../../c-api/module.rst:322 -msgid "" -"The *m_slots* member of the module definition must point to an array of " -"``PyModuleDef_Slot`` structures:" -msgstr "" - -#: ../../c-api/module.rst:329 +#: ../../c-api/module.rst:273 msgid "A slot ID, chosen from the available values explained below." msgstr "" -#: ../../c-api/module.rst:333 +#: ../../c-api/module.rst:277 msgid "Value of the slot, whose meaning depends on the slot ID." msgstr "" -#: ../../c-api/module.rst:337 -msgid "The *m_slots* array must be terminated by a slot with id 0." -msgstr "" - -#: ../../c-api/module.rst:339 +#: ../../c-api/module.rst:281 msgid "The available slot types are:" msgstr "" -#: ../../c-api/module.rst:343 +#: ../../c-api/module.rst:285 msgid "" "Specifies a function that is called to create the module object itself. The " "*value* pointer of this slot must point to a function of the signature:" msgstr "" -#: ../../c-api/module.rst:350 +#: ../../c-api/module.rst:292 msgid "" "The function receives a :py:class:`~importlib.machinery.ModuleSpec` " "instance, as defined in :PEP:`451`, and the module definition. It should " "return a new module object, or set an error and return ``NULL``." msgstr "" -#: ../../c-api/module.rst:355 +#: ../../c-api/module.rst:297 msgid "" "This function should be kept minimal. In particular, it should not call " "arbitrary Python code, as trying to import the same module again may result " "in an infinite loop." msgstr "" -#: ../../c-api/module.rst:359 +#: ../../c-api/module.rst:301 msgid "" "Multiple ``Py_mod_create`` slots may not be specified in one module " "definition." msgstr "" -#: ../../c-api/module.rst:362 +#: ../../c-api/module.rst:304 msgid "" "If ``Py_mod_create`` is not specified, the import machinery will create a " "normal module object using :c:func:`PyModule_New`. The name is taken from " @@ -412,7 +333,7 @@ msgid "" "through symlinks, all while sharing a single module definition." msgstr "" -#: ../../c-api/module.rst:368 +#: ../../c-api/module.rst:310 msgid "" "There is no requirement for the returned object to be an instance of :c:type:" "`PyModule_Type`. Any type can be used, as long as it supports setting and " @@ -422,7 +343,7 @@ msgid "" "``Py_mod_create``." msgstr "" -#: ../../c-api/module.rst:377 +#: ../../c-api/module.rst:319 msgid "" "Specifies a function that is called to *execute* the module. This is " "equivalent to executing the code of a Python module: typically, this " @@ -430,61 +351,61 @@ msgid "" "function is:" msgstr "" -#: ../../c-api/module.rst:386 +#: ../../c-api/module.rst:328 msgid "" "If multiple ``Py_mod_exec`` slots are specified, they are processed in the " "order they appear in the *m_slots* array." msgstr "" -#: ../../c-api/module.rst:391 ../../c-api/module.rst:424 +#: ../../c-api/module.rst:333 ../../c-api/module.rst:366 msgid "Specifies one of the following values:" msgstr "" -#: ../../c-api/module.rst:397 +#: ../../c-api/module.rst:339 msgid "The module does not support being imported in subinterpreters." msgstr "" -#: ../../c-api/module.rst:401 +#: ../../c-api/module.rst:343 msgid "" "The module supports being imported in subinterpreters, but only when they " "share the main interpreter's GIL. (See :ref:`isolating-extensions-howto`.)" msgstr "" -#: ../../c-api/module.rst:407 +#: ../../c-api/module.rst:349 msgid "" "The module supports being imported in subinterpreters, even when they have " "their own GIL. (See :ref:`isolating-extensions-howto`.)" msgstr "" -#: ../../c-api/module.rst:411 +#: ../../c-api/module.rst:353 msgid "" "This slot determines whether or not importing this module in a " "subinterpreter will fail." msgstr "" -#: ../../c-api/module.rst:414 +#: ../../c-api/module.rst:356 msgid "" "Multiple ``Py_mod_multiple_interpreters`` slots may not be specified in one " "module definition." msgstr "" -#: ../../c-api/module.rst:417 +#: ../../c-api/module.rst:359 msgid "" "If ``Py_mod_multiple_interpreters`` is not specified, the import machinery " "defaults to ``Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED``." msgstr "" -#: ../../c-api/module.rst:430 +#: ../../c-api/module.rst:372 msgid "" "The module depends on the presence of the global interpreter lock (GIL), and " "may access global state without synchronization." msgstr "" -#: ../../c-api/module.rst:435 +#: ../../c-api/module.rst:377 msgid "The module is safe to run without an active GIL." msgstr "" -#: ../../c-api/module.rst:437 +#: ../../c-api/module.rst:379 msgid "" "This slot is ignored by Python builds not configured with :option:`--disable-" "gil`. Otherwise, it determines whether or not importing this module will " @@ -492,41 +413,64 @@ msgid "" "threaded-cpython` for more detail." msgstr "" -#: ../../c-api/module.rst:442 +#: ../../c-api/module.rst:384 msgid "" "Multiple ``Py_mod_gil`` slots may not be specified in one module definition." msgstr "" -#: ../../c-api/module.rst:444 +#: ../../c-api/module.rst:386 msgid "" "If ``Py_mod_gil`` is not specified, the import machinery defaults to " "``Py_MOD_GIL_USED``." msgstr "" -#: ../../c-api/module.rst:449 -msgid "See :PEP:`489` for more details on multi-phase initialization." +#: ../../c-api/module.rst:395 +msgid "Creating extension modules dynamically" msgstr "" -#: ../../c-api/module.rst:452 -msgid "Low-level module creation functions" +#: ../../c-api/module.rst:397 +msgid "" +"The following functions may be used to create a module outside of an " +"extension's :ref:`initialization function `. They are " +"also used in :ref:`single-phase initialization `." msgstr "" -#: ../../c-api/module.rst:454 +#: ../../c-api/module.rst:404 msgid "" -"The following functions are called under the hood when using multi-phase " -"initialization. They can be used directly, for example when creating module " -"objects dynamically. Note that both ``PyModule_FromDefAndSpec`` and " -"``PyModule_ExecDef`` must be called to fully initialize a module." +"Create a new module object, given the definition in *def*. This is a macro " +"that calls :c:func:`PyModule_Create2` with *module_api_version* set to :c:" +"macro:`PYTHON_API_VERSION`, or to :c:macro:`PYTHON_ABI_VERSION` if using " +"the :ref:`limited API `." msgstr "" -#: ../../c-api/module.rst:461 +#: ../../c-api/module.rst:412 msgid "" -"Create a new module object, given the definition in *def* and the ModuleSpec " -"*spec*. This behaves like :c:func:`PyModule_FromDefAndSpec2` with " -"*module_api_version* set to :c:macro:`PYTHON_API_VERSION`." +"Create a new module object, given the definition in *def*, assuming the API " +"version *module_api_version*. If that version does not match the version of " +"the running interpreter, a :exc:`RuntimeWarning` is emitted." msgstr "" -#: ../../c-api/module.rst:469 +#: ../../c-api/module.rst:418 +msgid "" +"This function does not support slots. The :c:member:`~PyModuleDef.m_slots` " +"member of *def* must be ``NULL``." +msgstr "" + +#: ../../c-api/module.rst:424 +msgid "" +"Most uses of this function should be using :c:func:`PyModule_Create` " +"instead; only use this if you are sure you need it." +msgstr "" + +#: ../../c-api/module.rst:429 +msgid "" +"This macro calls :c:func:`PyModule_FromDefAndSpec2` with " +"*module_api_version* set to :c:macro:`PYTHON_API_VERSION`, or to :c:macro:" +"`PYTHON_ABI_VERSION` if using the :ref:`limited API `." +msgstr "" + +#: ../../c-api/module.rst:438 msgid "" "Create a new module object, given the definition in *def* and the ModuleSpec " "*spec*, assuming the API version *module_api_version*. If that version does " @@ -534,64 +478,66 @@ msgid "" "emitted." msgstr "" -#: ../../c-api/module.rst:478 +#: ../../c-api/module.rst:445 +msgid "" +"Note that this does not process execution slots (:c:data:`Py_mod_exec`). " +"Both ``PyModule_FromDefAndSpec`` and ``PyModule_ExecDef`` must be called to " +"fully initialize a module." +msgstr "" + +#: ../../c-api/module.rst:451 msgid "" "Most uses of this function should be using :c:func:`PyModule_FromDefAndSpec` " "instead; only use this if you are sure you need it." msgstr "" -#: ../../c-api/module.rst:485 +#: ../../c-api/module.rst:458 msgid "Process any execution slots (:c:data:`Py_mod_exec`) given in *def*." msgstr "" -#: ../../c-api/module.rst:491 -msgid "" -"Set the docstring for *module* to *docstring*. This function is called " -"automatically when creating a module from ``PyModuleDef``, using either " -"``PyModule_Create`` or ``PyModule_FromDefAndSpec``." +#: ../../c-api/module.rst:464 +msgid "The C API version. Defined for backwards compatibility." msgstr "" -#: ../../c-api/module.rst:500 +#: ../../c-api/module.rst:466 ../../c-api/module.rst:473 msgid "" -"Add the functions from the ``NULL`` terminated *functions* array to " -"*module*. Refer to the :c:type:`PyMethodDef` documentation for details on " -"individual entries (due to the lack of a shared module namespace, module " -"level \"functions\" implemented in C typically receive the module as their " -"first parameter, making them similar to instance methods on Python classes). " -"This function is called automatically when creating a module from " -"``PyModuleDef``, using either ``PyModule_Create`` or " -"``PyModule_FromDefAndSpec``." +"Currently, this constant is not updated in new Python versions, and is not " +"useful for versioning. This may change in the future." msgstr "" -#: ../../c-api/module.rst:512 +#: ../../c-api/module.rst:471 +msgid "Defined as ``3`` for backwards compatibility." +msgstr "" + +#: ../../c-api/module.rst:478 msgid "Support functions" msgstr "" -#: ../../c-api/module.rst:514 +#: ../../c-api/module.rst:480 msgid "" -"The module initialization function (if using single phase initialization) or " -"a function called from a module execution slot (if using multi-phase " -"initialization), can use the following functions to help initialize the " -"module state:" +"The following functions are provided to help initialize a module state. They " +"are intended for a module's execution slots (:c:data:`Py_mod_exec`), the " +"initialization function for legacy :ref:`single-phase initialization `, or code that creates modules dynamically." msgstr "" -#: ../../c-api/module.rst:521 +#: ../../c-api/module.rst:488 msgid "" "Add an object to *module* as *name*. This is a convenience function which " "can be used from the module's initialization function." msgstr "" -#: ../../c-api/module.rst:524 +#: ../../c-api/module.rst:491 msgid "" "On success, return ``0``. On error, raise an exception and return ``-1``." msgstr "" -#: ../../c-api/module.rst:526 ../../c-api/module.rst:577 -#: ../../c-api/module.rst:604 +#: ../../c-api/module.rst:493 ../../c-api/module.rst:544 +#: ../../c-api/module.rst:571 msgid "Example usage::" msgstr "" -#: ../../c-api/module.rst:528 +#: ../../c-api/module.rst:495 msgid "" "static int\n" "add_spam(PyObject *module, int value)\n" @@ -606,20 +552,20 @@ msgid "" " }" msgstr "" -#: ../../c-api/module.rst:540 +#: ../../c-api/module.rst:507 msgid "" "To be convenient, the function accepts ``NULL`` *value* with an exception " "set. In this case, return ``-1`` and just leave the raised exception " "unchanged." msgstr "" -#: ../../c-api/module.rst:544 +#: ../../c-api/module.rst:511 msgid "" "The example can also be written without checking explicitly if *obj* is " "``NULL``::" msgstr "" -#: ../../c-api/module.rst:547 +#: ../../c-api/module.rst:514 msgid "" "static int\n" "add_spam(PyObject *module, int value)\n" @@ -631,13 +577,13 @@ msgid "" " }" msgstr "" -#: ../../c-api/module.rst:556 +#: ../../c-api/module.rst:523 msgid "" "Note that ``Py_XDECREF()`` should be used instead of ``Py_DECREF()`` in this " "case, since *obj* can be ``NULL``." msgstr "" -#: ../../c-api/module.rst:559 +#: ../../c-api/module.rst:526 msgid "" "The number of different *name* strings passed to this function should be " "kept small, usually by only using statically allocated strings as *name*. " @@ -647,7 +593,7 @@ msgid "" "internally to create a key object." msgstr "" -#: ../../c-api/module.rst:572 +#: ../../c-api/module.rst:539 msgid "" "Similar to :c:func:`PyModule_AddObjectRef`, but \"steals\" a reference to " "*value*. It can be called with a result of function that returns a new " @@ -655,39 +601,39 @@ msgid "" "variable." msgstr "" -#: ../../c-api/module.rst:579 +#: ../../c-api/module.rst:546 msgid "" "if (PyModule_Add(module, \"spam\", PyBytes_FromString(value)) < 0) {\n" " goto error;\n" "}" msgstr "" -#: ../../c-api/module.rst:588 +#: ../../c-api/module.rst:555 msgid "" "Similar to :c:func:`PyModule_AddObjectRef`, but steals a reference to " "*value* on success (if it returns ``0``)." msgstr "" -#: ../../c-api/module.rst:591 +#: ../../c-api/module.rst:558 msgid "" "The new :c:func:`PyModule_Add` or :c:func:`PyModule_AddObjectRef` functions " "are recommended, since it is easy to introduce reference leaks by misusing " "the :c:func:`PyModule_AddObject` function." msgstr "" -#: ../../c-api/module.rst:598 +#: ../../c-api/module.rst:565 msgid "" "Unlike other functions that steal references, ``PyModule_AddObject()`` only " "releases the reference to *value* **on success**." msgstr "" -#: ../../c-api/module.rst:601 +#: ../../c-api/module.rst:568 msgid "" "This means that its return value must be checked, and calling code must :c:" "func:`Py_XDECREF` *value* manually on error." msgstr "" -#: ../../c-api/module.rst:606 +#: ../../c-api/module.rst:573 msgid "" "PyObject *obj = PyBytes_FromString(value);\n" "if (PyModule_AddObject(module, \"spam\", obj) < 0) {\n" @@ -701,24 +647,24 @@ msgid "" "// Py_XDECREF(obj) is not needed here." msgstr "" -#: ../../c-api/module.rst:619 +#: ../../c-api/module.rst:586 msgid ":c:func:`PyModule_AddObject` is :term:`soft deprecated`." msgstr "" -#: ../../c-api/module.rst:624 +#: ../../c-api/module.rst:591 msgid "" "Add an integer constant to *module* as *name*. This convenience function " "can be used from the module's initialization function. Return ``-1`` with an " "exception set on error, ``0`` on success." msgstr "" -#: ../../c-api/module.rst:628 +#: ../../c-api/module.rst:595 msgid "" "This is a convenience function that calls :c:func:`PyLong_FromLong` and :c:" "func:`PyModule_AddObjectRef`; see their documentation for details." msgstr "" -#: ../../c-api/module.rst:634 +#: ../../c-api/module.rst:601 msgid "" "Add a string constant to *module* as *name*. This convenience function can " "be used from the module's initialization function. The string *value* must " @@ -726,14 +672,14 @@ msgid "" "on success." msgstr "" -#: ../../c-api/module.rst:639 +#: ../../c-api/module.rst:606 msgid "" "This is a convenience function that calls :c:func:" "`PyUnicode_InternFromString` and :c:func:`PyModule_AddObjectRef`; see their " "documentation for details." msgstr "" -#: ../../c-api/module.rst:646 +#: ../../c-api/module.rst:613 msgid "" "Add an int constant to *module*. The name and the value are taken from " "*macro*. For example ``PyModule_AddIntMacro(module, AF_INET)`` adds the int " @@ -741,11 +687,11 @@ msgid "" "with an exception set on error, ``0`` on success." msgstr "" -#: ../../c-api/module.rst:654 +#: ../../c-api/module.rst:621 msgid "Add a string constant to *module*." msgstr "" -#: ../../c-api/module.rst:658 +#: ../../c-api/module.rst:625 msgid "" "Add a type object to *module*. The type object is finalized by calling " "internally :c:func:`PyType_Ready`. The name of the type object is taken from " @@ -753,36 +699,64 @@ msgid "" "``-1`` with an exception set on error, ``0`` on success." msgstr "" -#: ../../c-api/module.rst:668 +#: ../../c-api/module.rst:635 +msgid "" +"Add the functions from the ``NULL`` terminated *functions* array to " +"*module*. Refer to the :c:type:`PyMethodDef` documentation for details on " +"individual entries (due to the lack of a shared module namespace, module " +"level \"functions\" implemented in C typically receive the module as their " +"first parameter, making them similar to instance methods on Python classes)." +msgstr "" + +#: ../../c-api/module.rst:641 +msgid "" +"This function is called automatically when creating a module from " +"``PyModuleDef`` (such as when using :ref:`multi-phase-initialization`, " +"``PyModule_Create``, or ``PyModule_FromDefAndSpec``). Some module authors " +"may prefer defining functions in multiple :c:type:`PyMethodDef` arrays; in " +"that case they should call this function directly." +msgstr "" + +#: ../../c-api/module.rst:652 +msgid "" +"Set the docstring for *module* to *docstring*. This function is called " +"automatically when creating a module from ``PyModuleDef`` (such as when " +"using :ref:`multi-phase-initialization`, ``PyModule_Create``, or " +"``PyModule_FromDefAndSpec``)." +msgstr "" + +#: ../../c-api/module.rst:661 msgid "" "Indicate that *module* does or does not support running without the global " "interpreter lock (GIL), using one of the values from :c:macro:`Py_mod_gil`. " -"It must be called during *module*'s initialization function. If this " -"function is not called during module initialization, the import machinery " -"assumes the module does not support running without the GIL. This function " -"is only available in Python builds configured with :option:`--disable-gil`. " -"Return ``-1`` with an exception set on error, ``0`` on success." +"It must be called during *module*'s initialization function when using :ref:" +"`single-phase-initialization`. If this function is not called during module " +"initialization, the import machinery assumes the module does not support " +"running without the GIL. This function is only available in Python builds " +"configured with :option:`--disable-gil`. Return ``-1`` with an exception set " +"on error, ``0`` on success." msgstr "" -#: ../../c-api/module.rst:681 -msgid "Module lookup" +#: ../../c-api/module.rst:675 +msgid "Module lookup (single-phase initialization)" msgstr "" -#: ../../c-api/module.rst:683 +#: ../../c-api/module.rst:677 msgid "" -"Single-phase initialization creates singleton modules that can be looked up " -"in the context of the current interpreter. This allows the module object to " -"be retrieved later with only a reference to the module definition." +"The legacy :ref:`single-phase initialization ` " +"initialization scheme creates singleton modules that can be looked up in the " +"context of the current interpreter. This allows the module object to be " +"retrieved later with only a reference to the module definition." msgstr "" -#: ../../c-api/module.rst:687 +#: ../../c-api/module.rst:682 msgid "" "These functions will not work on modules created using multi-phase " "initialization, since multiple such modules can be created from a single " "definition." msgstr "" -#: ../../c-api/module.rst:692 +#: ../../c-api/module.rst:687 msgid "" "Returns the module object that was created from *def* for the current " "interpreter. This method requires that the module object has been attached " @@ -791,20 +765,21 @@ msgid "" "to the interpreter state yet, it returns ``NULL``." msgstr "" -#: ../../c-api/module.rst:699 +#: ../../c-api/module.rst:694 msgid "" "Attaches the module object passed to the function to the interpreter state. " "This allows the module object to be accessible via :c:func:" "`PyState_FindModule`." msgstr "" -#: ../../c-api/module.rst:702 +#: ../../c-api/module.rst:697 msgid "Only effective on modules created using single-phase initialization." msgstr "" -#: ../../c-api/module.rst:704 +#: ../../c-api/module.rst:699 msgid "" -"Python calls ``PyState_AddModule`` automatically after importing a module, " +"Python calls ``PyState_AddModule`` automatically after importing a module " +"that uses :ref:`single-phase initialization `, " "so it is unnecessary (but harmless) to call it from module initialization " "code. An explicit call is needed only if the module's own init code " "subsequently calls ``PyState_FindModule``. The function is mainly intended " @@ -813,15 +788,21 @@ msgid "" "state updates)." msgstr "" -#: ../../c-api/module.rst:712 ../../c-api/module.rst:723 +#: ../../c-api/module.rst:708 +msgid "" +"If a module was attached previously using the same *def*, it is replaced by " +"the new *module*." +msgstr "" + +#: ../../c-api/module.rst:711 ../../c-api/module.rst:722 msgid "The caller must have an :term:`attached thread state`." msgstr "" -#: ../../c-api/module.rst:714 +#: ../../c-api/module.rst:713 msgid "Return ``-1`` with an exception set on error, ``0`` on success." msgstr "" -#: ../../c-api/module.rst:720 +#: ../../c-api/module.rst:719 msgid "" "Removes the module object created from *def* from the interpreter state. " "Return ``-1`` with an exception set on error, ``0`` on success." diff --git a/c-api/monitoring.po b/c-api/monitoring.po index 785c700f7..99c1a5d4a 100644 --- a/c-api/monitoring.po +++ b/c-api/monitoring.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-05-11 01:07+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/c-api/none.po b/c-api/none.po index b9c413b1e..8b1d0b787 100644 --- a/c-api/none.po +++ b/c-api/none.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:49+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/c-api/number.po b/c-api/number.po index 34fbc1d17..18f97bd49 100644 --- a/c-api/number.po +++ b/c-api/number.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:49+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/object.po b/c-api/object.po index ea4d03763..6b8683af3 100644 --- a/c-api/object.po +++ b/c-api/object.po @@ -5,15 +5,17 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 +# Gigahertz ., 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:49+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Gigahertz ., 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/c-api/objimpl.po b/c-api/objimpl.po index 733d478c0..5eb9c80f9 100644 --- a/c-api/objimpl.po +++ b/c-api/objimpl.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:49+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/c-api/perfmaps.po b/c-api/perfmaps.po index 3cc456098..2c0929df0 100644 --- a/c-api/perfmaps.po +++ b/c-api/perfmaps.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2023-05-24 13:07+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/c-api/refcounting.po b/c-api/refcounting.po index 23effe827..940bfe1f3 100644 --- a/c-api/refcounting.po +++ b/c-api/refcounting.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:50+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -291,7 +292,7 @@ msgstr "" #: ../../c-api/refcounting.rst:213 msgid "" -"That arranges to set *dst* to *src* _before_ releasing the reference to the " +"That arranges to set *dst* to *src* *before* releasing the reference to the " "old value of *dst*, so that any code triggered as a side-effect of *dst* " "getting torn down no longer believes *dst* points to a valid object." msgstr "" diff --git a/c-api/reflection.po b/c-api/reflection.po index 061a28529..7fc7159e9 100644 --- a/c-api/reflection.po +++ b/c-api/reflection.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:50+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/c-api/sequence.po b/c-api/sequence.po index 337ef43a0..d483d9729 100644 --- a/c-api/sequence.po +++ b/c-api/sequence.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 00:50+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/set.po b/c-api/set.po index 905e0619c..32f555d41 100644 --- a/c-api/set.po +++ b/c-api/set.po @@ -1,20 +1,21 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2025, Python Software Foundation +# Copyright (C) 2001 Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # # Translators: # Alireza Shabani (Revisto) , 2025 # khosro azimi, 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Python 3.13\n" +"Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-02 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:50+0000\n" -"Last-Translator: khosro azimi, 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/c-api/slice.po b/c-api/slice.po index 0594b63bc..f9cc5b4e4 100644 --- a/c-api/slice.po +++ b/c-api/slice.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:50+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/c-api/stable.po b/c-api/stable.po index 4e04e1027..24e8c06dc 100644 --- a/c-api/stable.po +++ b/c-api/stable.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:50+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" @@ -92,22 +92,22 @@ msgid "" "spend extra effort adjusting to changes." msgstr "" -#: ../../c-api/stable.rst:56 +#: ../../c-api/stable.rst:57 msgid "Stable Application Binary Interface" msgstr "" -#: ../../c-api/stable.rst:58 +#: ../../c-api/stable.rst:59 msgid "" "For simplicity, this document talks about *extensions*, but the Limited API " "and Stable ABI work the same way for all uses of the API – for example, " "embedding Python." msgstr "" -#: ../../c-api/stable.rst:65 +#: ../../c-api/stable.rst:66 msgid "Limited C API" msgstr "" -#: ../../c-api/stable.rst:67 +#: ../../c-api/stable.rst:68 msgid "" "Python 3.2 introduced the *Limited API*, a subset of Python's C API. " "Extensions that only use the Limited API can be compiled once and be loaded " @@ -115,13 +115,13 @@ msgid "" "below `." msgstr "" -#: ../../c-api/stable.rst:74 +#: ../../c-api/stable.rst:75 msgid "" "Define this macro before including ``Python.h`` to opt in to only use the " "Limited API, and to select the Limited API version." msgstr "" -#: ../../c-api/stable.rst:77 +#: ../../c-api/stable.rst:78 msgid "" "Define ``Py_LIMITED_API`` to the value of :c:macro:`PY_VERSION_HEX` " "corresponding to the lowest Python version your extension supports. The " @@ -129,30 +129,30 @@ msgid "" "specified one onward, and can use Limited API introduced up to that version." msgstr "" -#: ../../c-api/stable.rst:83 +#: ../../c-api/stable.rst:84 msgid "" "Rather than using the ``PY_VERSION_HEX`` macro directly, hardcode a minimum " "minor version (e.g. ``0x030A0000`` for Python 3.10) for stability when " "compiling with future Python versions." msgstr "" -#: ../../c-api/stable.rst:87 +#: ../../c-api/stable.rst:88 msgid "" "You can also define ``Py_LIMITED_API`` to ``3``. This works the same as " "``0x03020000`` (Python 3.2, the version that introduced Limited API)." msgstr "" -#: ../../c-api/stable.rst:94 +#: ../../c-api/stable.rst:95 msgid "Stable ABI" msgstr "" -#: ../../c-api/stable.rst:96 +#: ../../c-api/stable.rst:97 msgid "" "To enable this, Python provides a *Stable ABI*: a set of symbols that will " "remain ABI-compatible across Python 3.x versions." msgstr "" -#: ../../c-api/stable.rst:101 +#: ../../c-api/stable.rst:102 msgid "" "The Stable ABI prevents ABI issues, like linker errors due to missing " "symbols or data corruption due to changes in structure layouts or function " @@ -161,21 +161,21 @@ msgid "" "details." msgstr "" -#: ../../c-api/stable.rst:107 +#: ../../c-api/stable.rst:108 msgid "" "The Stable ABI contains symbols exposed in the :ref:`Limited API `, but also other ones – for example, functions necessary to support " "older versions of the Limited API." msgstr "" -#: ../../c-api/stable.rst:111 +#: ../../c-api/stable.rst:112 msgid "" "On Windows, extensions that use the Stable ABI should be linked against " "``python3.dll`` rather than a version-specific library such as ``python39." "dll``." msgstr "" -#: ../../c-api/stable.rst:115 +#: ../../c-api/stable.rst:116 msgid "" "On some platforms, Python will look for and load shared library files named " "with the ``abi3`` tag (e.g. ``mymodule.abi3.so``). It does not check if such " @@ -184,31 +184,31 @@ msgid "" "not installed for lower versions of Python." msgstr "" -#: ../../c-api/stable.rst:122 +#: ../../c-api/stable.rst:123 msgid "" "All functions in the Stable ABI are present as functions in Python's shared " "library, not solely as macros. This makes them usable from languages that " "don't use the C preprocessor." msgstr "" -#: ../../c-api/stable.rst:128 +#: ../../c-api/stable.rst:129 msgid "Limited API Scope and Performance" msgstr "" -#: ../../c-api/stable.rst:130 +#: ../../c-api/stable.rst:131 msgid "" "The goal for the Limited API is to allow everything that is possible with " "the full C API, but possibly with a performance penalty." msgstr "" -#: ../../c-api/stable.rst:133 +#: ../../c-api/stable.rst:134 msgid "" "For example, while :c:func:`PyList_GetItem` is available, its “unsafe” macro " "variant :c:func:`PyList_GET_ITEM` is not. The macro can be faster because it " "can rely on version-specific implementation details of the list object." msgstr "" -#: ../../c-api/stable.rst:138 +#: ../../c-api/stable.rst:139 msgid "" "Without ``Py_LIMITED_API`` defined, some C API functions are inlined or " "replaced by macros. Defining ``Py_LIMITED_API`` disables this inlining, " @@ -216,7 +216,7 @@ msgid "" "reducing performance." msgstr "" -#: ../../c-api/stable.rst:143 +#: ../../c-api/stable.rst:144 msgid "" "By leaving out the ``Py_LIMITED_API`` definition, it is possible to compile " "a Limited API extension with a version-specific ABI. This can improve " @@ -226,11 +226,11 @@ msgid "" "of an upcoming Python version." msgstr "" -#: ../../c-api/stable.rst:152 +#: ../../c-api/stable.rst:153 msgid "Limited API Caveats" msgstr "" -#: ../../c-api/stable.rst:154 +#: ../../c-api/stable.rst:155 msgid "" "Note that compiling with ``Py_LIMITED_API`` is *not* a complete guarantee " "that code conforms to the :ref:`Limited API ` or the :ref:" @@ -238,7 +238,7 @@ msgid "" "an API also includes other issues, such as expected semantics." msgstr "" -#: ../../c-api/stable.rst:159 +#: ../../c-api/stable.rst:160 msgid "" "One issue that ``Py_LIMITED_API`` does not guard against is calling a " "function with arguments that are invalid in a lower Python version. For " @@ -248,19 +248,19 @@ msgid "" "crash. A similar argument works for fields of structs." msgstr "" -#: ../../c-api/stable.rst:166 +#: ../../c-api/stable.rst:167 msgid "" "Another issue is that some struct fields are currently not hidden when " "``Py_LIMITED_API`` is defined, even though they're part of the Limited API." msgstr "" -#: ../../c-api/stable.rst:169 +#: ../../c-api/stable.rst:170 msgid "" "For these reasons, we recommend testing an extension with *all* minor Python " "versions it supports, and preferably to build with the *lowest* such version." msgstr "" -#: ../../c-api/stable.rst:172 +#: ../../c-api/stable.rst:173 msgid "" "We also recommend reviewing documentation of all used API to check if it is " "explicitly part of the Limited API. Even with ``Py_LIMITED_API`` defined, a " @@ -268,7 +268,7 @@ msgid "" "unintentionally, as bugs)." msgstr "" -#: ../../c-api/stable.rst:177 +#: ../../c-api/stable.rst:178 msgid "" "Also note that the Limited API is not necessarily stable: compiling with " "``Py_LIMITED_API`` with Python 3.8 means that the extension will run with " @@ -277,11 +277,11 @@ msgid "" "that the Stable ABI stays stable." msgstr "" -#: ../../c-api/stable.rst:187 +#: ../../c-api/stable.rst:188 msgid "Platform Considerations" msgstr "" -#: ../../c-api/stable.rst:189 +#: ../../c-api/stable.rst:190 msgid "" "ABI stability depends not only on Python, but also on the compiler used, " "lower-level libraries and compiler options. For the purposes of the :ref:" @@ -289,7 +289,7 @@ msgid "" "depend on the OS type and processor architecture" msgstr "" -#: ../../c-api/stable.rst:194 +#: ../../c-api/stable.rst:195 msgid "" "It is the responsibility of each particular distributor of Python to ensure " "that all Python versions on a particular platform are built in a way that " @@ -297,11 +297,11 @@ msgid "" "releases from ``python.org`` and many third-party distributors." msgstr "" -#: ../../c-api/stable.rst:204 +#: ../../c-api/stable.rst:205 msgid "Contents of Limited API" msgstr "" -#: ../../c-api/stable.rst:207 +#: ../../c-api/stable.rst:208 msgid "" "Currently, the :ref:`Limited API ` includes the following " "items:" diff --git a/c-api/structures.po b/c-api/structures.po index 2b72f49fe..7e45bb843 100644 --- a/c-api/structures.po +++ b/c-api/structures.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:50+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -56,152 +57,220 @@ msgid "" "In a normal \"release\" build, it contains only the object's reference count " "and a pointer to the corresponding type object. Nothing is actually declared " "to be a :c:type:`PyObject`, but every pointer to a Python object can be cast " -"to a :c:expr:`PyObject*`. Access to the members must be done by using the " -"macros :c:macro:`Py_REFCNT` and :c:macro:`Py_TYPE`." +"to a :c:expr:`PyObject*`." +msgstr "" + +#: ../../c-api/structures.rst:33 +msgid "" +"The members must not be accessed directly; instead use macros such as :c:" +"macro:`Py_REFCNT` and :c:macro:`Py_TYPE`." msgstr "" #: ../../c-api/structures.rst:38 msgid "" -"This is an extension of :c:type:`PyObject` that adds the :c:member:" -"`~PyVarObject.ob_size` field. This is only used for objects that have some " -"notion of *length*. This type does not often appear in the Python/C API. " -"Access to the members must be done by using the macros :c:macro:" -"`Py_REFCNT`, :c:macro:`Py_TYPE`, and :c:macro:`Py_SIZE`." +"The object's reference count, as returned by :c:macro:`Py_REFCNT`. Do not " +"use this field directly; instead use functions and macros such as :c:macro:`!" +"Py_REFCNT`, :c:func:`Py_INCREF` and :c:func:`Py_DecRef`." +msgstr "" + +#: ../../c-api/structures.rst:42 +msgid "" +"The field type may be different from ``Py_ssize_t``, depending on build " +"configuration and platform." msgstr "" #: ../../c-api/structures.rst:47 msgid "" +"The object's type. Do not use this field directly; use :c:macro:`Py_TYPE` " +"and :c:func:`Py_SET_TYPE` instead." +msgstr "" + +#: ../../c-api/structures.rst:54 +msgid "" +"An extension of :c:type:`PyObject` that adds the :c:member:`~PyVarObject." +"ob_size` field. This is intended for objects that have some notion of " +"*length*." +msgstr "" + +#: ../../c-api/structures.rst:58 +msgid "" +"As with :c:type:`!PyObject`, the members must not be accessed directly; " +"instead use macros such as :c:macro:`Py_SIZE`, :c:macro:`Py_REFCNT` and :c:" +"macro:`Py_TYPE`." +msgstr "" + +#: ../../c-api/structures.rst:64 +msgid "" +"A size field, whose contents should be considered an object's internal " +"implementation detail." +msgstr "" + +#: ../../c-api/structures.rst:67 +msgid "Do not use this field directly; use :c:macro:`Py_SIZE` instead." +msgstr "" + +#: ../../c-api/structures.rst:69 +msgid "" +"Object creation functions such as :c:func:`PyObject_NewVar` will generally " +"set this field to the requested size (number of items). After creation, " +"arbitrary values can be stored in :c:member:`!ob_size` using :c:macro:" +"`Py_SET_SIZE`." +msgstr "" + +#: ../../c-api/structures.rst:74 +msgid "" +"To get an object's publicly exposed length, as returned by the Python " +"function :py:func:`len`, use :c:func:`PyObject_Length` instead." +msgstr "" + +#: ../../c-api/structures.rst:81 +msgid "" "This is a macro used when declaring new types which represent objects " "without a varying length. The PyObject_HEAD macro expands to::" msgstr "" -#: ../../c-api/structures.rst:50 +#: ../../c-api/structures.rst:84 msgid "PyObject ob_base;" msgstr "" -#: ../../c-api/structures.rst:52 +#: ../../c-api/structures.rst:86 msgid "See documentation of :c:type:`PyObject` above." msgstr "" -#: ../../c-api/structures.rst:57 +#: ../../c-api/structures.rst:91 msgid "" "This is a macro used when declaring new types which represent objects with a " "length that varies from instance to instance. The PyObject_VAR_HEAD macro " "expands to::" msgstr "" -#: ../../c-api/structures.rst:61 +#: ../../c-api/structures.rst:95 msgid "PyVarObject ob_base;" msgstr "" -#: ../../c-api/structures.rst:63 +#: ../../c-api/structures.rst:97 msgid "See documentation of :c:type:`PyVarObject` above." msgstr "" -#: ../../c-api/structures.rst:68 +#: ../../c-api/structures.rst:102 msgid "" "The base class of all other objects, the same as :class:`object` in Python." msgstr "" -#: ../../c-api/structures.rst:73 +#: ../../c-api/structures.rst:107 msgid "" "Test if the *x* object is the *y* object, the same as ``x is y`` in Python." msgstr "" -#: ../../c-api/structures.rst:80 +#: ../../c-api/structures.rst:114 msgid "" "Test if an object is the ``None`` singleton, the same as ``x is None`` in " "Python." msgstr "" -#: ../../c-api/structures.rst:88 +#: ../../c-api/structures.rst:122 msgid "" "Test if an object is the ``True`` singleton, the same as ``x is True`` in " "Python." msgstr "" -#: ../../c-api/structures.rst:96 +#: ../../c-api/structures.rst:130 msgid "" "Test if an object is the ``False`` singleton, the same as ``x is False`` in " "Python." msgstr "" -#: ../../c-api/structures.rst:104 +#: ../../c-api/structures.rst:138 msgid "Get the type of the Python object *o*." msgstr "" -#: ../../c-api/structures.rst:106 -msgid "Return a :term:`borrowed reference`." -msgstr "" - -#: ../../c-api/structures.rst:108 -msgid "Use the :c:func:`Py_SET_TYPE` function to set an object type." +#: ../../c-api/structures.rst:140 +msgid "" +"The returned reference is :term:`borrowed ` from *o*. Do " +"not release it with :c:func:`Py_DECREF` or similar." msgstr "" -#: ../../c-api/structures.rst:110 +#: ../../c-api/structures.rst:143 msgid "" ":c:func:`Py_TYPE()` is changed to an inline static function. The parameter " "type is no longer :c:expr:`const PyObject*`." msgstr "" -#: ../../c-api/structures.rst:117 +#: ../../c-api/structures.rst:150 msgid "" "Return non-zero if the object *o* type is *type*. Return zero otherwise. " "Equivalent to: ``Py_TYPE(o) == type``." msgstr "" -#: ../../c-api/structures.rst:125 -msgid "Set the object *o* type to *type*." +#: ../../c-api/structures.rst:158 +msgid "" +"Set the type of object *o* to *type*, without any checking or reference " +"counting." +msgstr "" + +#: ../../c-api/structures.rst:161 +msgid "" +"This is a very low-level operation. Consider instead setting the Python " +"attribute :attr:`~object.__class__` using :c:func:`PyObject_SetAttrString` " +"or similar." +msgstr "" + +#: ../../c-api/structures.rst:165 +msgid "" +"Note that assigning an incompatible type can lead to undefined behavior." msgstr "" -#: ../../c-api/structures.rst:132 -msgid "Get the size of the Python object *o*." +#: ../../c-api/structures.rst:167 +msgid "" +"If *type* is a :ref:`heap type `, the caller must create a new " +"reference to it. Similarly, if the old type of *o* is a heap type, the " +"caller must release a reference to that type." msgstr "" -#: ../../c-api/structures.rst:134 -msgid "Use the :c:func:`Py_SET_SIZE` function to set an object size." +#: ../../c-api/structures.rst:177 +msgid "Get the :c:member:`~PyVarObject.ob_size` field of *o*." msgstr "" -#: ../../c-api/structures.rst:136 +#: ../../c-api/structures.rst:179 msgid "" ":c:func:`Py_SIZE()` is changed to an inline static function. The parameter " "type is no longer :c:expr:`const PyVarObject*`." msgstr "" -#: ../../c-api/structures.rst:143 -msgid "Set the object *o* size to *size*." +#: ../../c-api/structures.rst:186 +msgid "Set the :c:member:`~PyVarObject.ob_size` field of *o* to *size*." msgstr "" -#: ../../c-api/structures.rst:150 +#: ../../c-api/structures.rst:193 msgid "" "This is a macro which expands to initialization values for a new :c:type:" "`PyObject` type. This macro expands to::" msgstr "" -#: ../../c-api/structures.rst:153 +#: ../../c-api/structures.rst:196 msgid "" "_PyObject_EXTRA_INIT\n" "1, type," msgstr "" -#: ../../c-api/structures.rst:159 +#: ../../c-api/structures.rst:202 msgid "" "This is a macro which expands to initialization values for a new :c:type:" "`PyVarObject` type, including the :c:member:`~PyVarObject.ob_size` field. " "This macro expands to::" msgstr "" -#: ../../c-api/structures.rst:163 +#: ../../c-api/structures.rst:206 msgid "" "_PyObject_EXTRA_INIT\n" "1, type, size," msgstr "" -#: ../../c-api/structures.rst:168 +#: ../../c-api/structures.rst:211 msgid "Implementing functions and methods" msgstr "" -#: ../../c-api/structures.rst:172 +#: ../../c-api/structures.rst:215 msgid "" "Type of the functions used to implement most Python callables in C. " "Functions of this type take two :c:expr:`PyObject*` parameters and return " @@ -211,51 +280,51 @@ msgid "" "reference." msgstr "" -#: ../../c-api/structures.rst:179 +#: ../../c-api/structures.rst:222 msgid "The function signature is::" msgstr "" -#: ../../c-api/structures.rst:181 +#: ../../c-api/structures.rst:224 msgid "" "PyObject *PyCFunction(PyObject *self,\n" " PyObject *args);" msgstr "" -#: ../../c-api/structures.rst:186 +#: ../../c-api/structures.rst:229 msgid "" "Type of the functions used to implement Python callables in C with " "signature :ref:`METH_VARARGS | METH_KEYWORDS `. " "The function signature is::" msgstr "" -#: ../../c-api/structures.rst:190 +#: ../../c-api/structures.rst:233 msgid "" "PyObject *PyCFunctionWithKeywords(PyObject *self,\n" " PyObject *args,\n" " PyObject *kwargs);" msgstr "" -#: ../../c-api/structures.rst:197 +#: ../../c-api/structures.rst:240 msgid "" "Type of the functions used to implement Python callables in C with " "signature :c:macro:`METH_FASTCALL`. The function signature is::" msgstr "" -#: ../../c-api/structures.rst:201 +#: ../../c-api/structures.rst:244 msgid "" "PyObject *PyCFunctionFast(PyObject *self,\n" " PyObject *const *args,\n" " Py_ssize_t nargs);" msgstr "" -#: ../../c-api/structures.rst:207 +#: ../../c-api/structures.rst:250 msgid "" "Type of the functions used to implement Python callables in C with " "signature :ref:`METH_FASTCALL | METH_KEYWORDS `. The function signature is::" msgstr "" -#: ../../c-api/structures.rst:211 +#: ../../c-api/structures.rst:254 msgid "" "PyObject *PyCFunctionFastWithKeywords(PyObject *self,\n" " PyObject *const *args,\n" @@ -263,14 +332,14 @@ msgid "" " PyObject *kwnames);" msgstr "" -#: ../../c-api/structures.rst:218 +#: ../../c-api/structures.rst:261 msgid "" "Type of the functions used to implement Python callables in C with " "signature :ref:`METH_METHOD | METH_FASTCALL | METH_KEYWORDS `. The function signature is::" msgstr "" -#: ../../c-api/structures.rst:222 +#: ../../c-api/structures.rst:265 msgid "" "PyObject *PyCMethod(PyObject *self,\n" " PyTypeObject *defining_class,\n" @@ -279,29 +348,29 @@ msgid "" " PyObject *kwnames)" msgstr "" -#: ../../c-api/structures.rst:233 +#: ../../c-api/structures.rst:276 msgid "" "Structure used to describe a method of an extension type. This structure " "has four fields:" msgstr "" -#: ../../c-api/structures.rst:238 +#: ../../c-api/structures.rst:281 msgid "Name of the method." msgstr "" -#: ../../c-api/structures.rst:242 +#: ../../c-api/structures.rst:285 msgid "Pointer to the C implementation." msgstr "" -#: ../../c-api/structures.rst:246 +#: ../../c-api/structures.rst:289 msgid "Flags bits indicating how the call should be constructed." msgstr "" -#: ../../c-api/structures.rst:250 +#: ../../c-api/structures.rst:293 msgid "Points to the contents of the docstring." msgstr "" -#: ../../c-api/structures.rst:252 +#: ../../c-api/structures.rst:295 msgid "" "The :c:member:`~PyMethodDef.ml_meth` is a C function pointer. The functions " "may be of different types, but they always return :c:expr:`PyObject*`. If " @@ -311,18 +380,18 @@ msgid "" "implementation uses the specific C type of the *self* object." msgstr "" -#: ../../c-api/structures.rst:260 +#: ../../c-api/structures.rst:303 msgid "" "The :c:member:`~PyMethodDef.ml_flags` field is a bitfield which can include " "the following flags. The individual flags indicate either a calling " "convention or a binding convention." msgstr "" -#: ../../c-api/structures.rst:265 +#: ../../c-api/structures.rst:308 msgid "There are these calling conventions:" msgstr "" -#: ../../c-api/structures.rst:269 +#: ../../c-api/structures.rst:312 msgid "" "This is the typical calling convention, where the methods have the type :c:" "type:`PyCFunction`. The function expects two :c:expr:`PyObject*` values. The " @@ -332,7 +401,7 @@ msgid "" "func:`PyArg_ParseTuple` or :c:func:`PyArg_UnpackTuple`." msgstr "" -#: ../../c-api/structures.rst:279 +#: ../../c-api/structures.rst:322 msgid "" "Can only be used in certain combinations with other flags: :ref:" "`METH_VARARGS | METH_KEYWORDS `, :ref:" @@ -341,11 +410,11 @@ msgid "" "METH_KEYWORDS>`." msgstr "" -#: ../../c-api/structures.rst:287 +#: ../../c-api/structures.rst:330 msgid ":c:expr:`METH_VARARGS | METH_KEYWORDS`" msgstr "" -#: ../../c-api/structures.rst:288 +#: ../../c-api/structures.rst:331 msgid "" "Methods with these flags must be of type :c:type:`PyCFunctionWithKeywords`. " "The function expects three parameters: *self*, *args*, *kwargs* where " @@ -354,7 +423,7 @@ msgid "" "using :c:func:`PyArg_ParseTupleAndKeywords`." msgstr "" -#: ../../c-api/structures.rst:297 +#: ../../c-api/structures.rst:340 msgid "" "Fast calling convention supporting only positional arguments. The methods " "have the type :c:type:`PyCFunctionFast`. The first parameter is *self*, the " @@ -363,15 +432,15 @@ msgid "" "the array)." msgstr "" -#: ../../c-api/structures.rst:307 +#: ../../c-api/structures.rst:350 msgid "``METH_FASTCALL`` is now part of the :ref:`stable ABI `." msgstr "" -#: ../../c-api/structures.rst:312 +#: ../../c-api/structures.rst:355 msgid ":c:expr:`METH_FASTCALL | METH_KEYWORDS`" msgstr "" -#: ../../c-api/structures.rst:313 +#: ../../c-api/structures.rst:356 msgid "" "Extension of :c:macro:`METH_FASTCALL` supporting also keyword arguments, " "with methods of type :c:type:`PyCFunctionFastWithKeywords`. Keyword " @@ -383,17 +452,17 @@ msgid "" "the positional arguments." msgstr "" -#: ../../c-api/structures.rst:328 +#: ../../c-api/structures.rst:371 msgid "" "Can only be used in the combination with other flags: :ref:`METH_METHOD | " "METH_FASTCALL | METH_KEYWORDS `." msgstr "" -#: ../../c-api/structures.rst:334 +#: ../../c-api/structures.rst:377 msgid ":c:expr:`METH_METHOD | METH_FASTCALL | METH_KEYWORDS`" msgstr "" -#: ../../c-api/structures.rst:335 +#: ../../c-api/structures.rst:378 msgid "" "Extension of :ref:`METH_FASTCALL | METH_KEYWORDS ` supporting the *defining class*, that is, the class that " @@ -401,14 +470,14 @@ msgid "" "``Py_TYPE(self)``." msgstr "" -#: ../../c-api/structures.rst:340 +#: ../../c-api/structures.rst:383 msgid "" "The method needs to be of type :c:type:`PyCMethod`, the same as for " "``METH_FASTCALL | METH_KEYWORDS`` with ``defining_class`` argument added " "after ``self``." msgstr "" -#: ../../c-api/structures.rst:349 +#: ../../c-api/structures.rst:392 msgid "" "Methods without parameters don't need to check whether arguments are given " "if they are listed with the :c:macro:`METH_NOARGS` flag. They need to be of " @@ -417,13 +486,13 @@ msgid "" "the second parameter will be ``NULL``." msgstr "" -#: ../../c-api/structures.rst:355 +#: ../../c-api/structures.rst:398 msgid "" "The function must have 2 parameters. Since the second parameter is unused, :" "c:macro:`Py_UNUSED` can be used to prevent a compiler warning." msgstr "" -#: ../../c-api/structures.rst:361 +#: ../../c-api/structures.rst:404 msgid "" "Methods with a single object argument can be listed with the :c:macro:" "`METH_O` flag, instead of invoking :c:func:`PyArg_ParseTuple` with a " @@ -432,7 +501,7 @@ msgid "" "single argument." msgstr "" -#: ../../c-api/structures.rst:367 +#: ../../c-api/structures.rst:410 msgid "" "These two constants are not used to indicate the calling convention but the " "binding when use with methods of classes. These may not be used for " @@ -440,27 +509,27 @@ msgid "" "any given method." msgstr "" -#: ../../c-api/structures.rst:377 +#: ../../c-api/structures.rst:420 msgid "" "The method will be passed the type object as the first parameter rather than " "an instance of the type. This is used to create *class methods*, similar to " "what is created when using the :func:`classmethod` built-in function." msgstr "" -#: ../../c-api/structures.rst:387 +#: ../../c-api/structures.rst:430 msgid "" "The method will be passed ``NULL`` as the first parameter rather than an " "instance of the type. This is used to create *static methods*, similar to " "what is created when using the :func:`staticmethod` built-in function." msgstr "" -#: ../../c-api/structures.rst:391 +#: ../../c-api/structures.rst:434 msgid "" "One other constant controls whether a method is loaded in place of another " "definition with the same method name." msgstr "" -#: ../../c-api/structures.rst:397 +#: ../../c-api/structures.rst:440 msgid "" "The method will be loaded in place of existing definitions. Without " "*METH_COEXIST*, the default is to skip repeated definitions. Since slot " @@ -473,20 +542,20 @@ msgid "" "wrapper object calls." msgstr "" -#: ../../c-api/structures.rst:409 +#: ../../c-api/structures.rst:452 msgid "" "Turn *ml* into a Python :term:`callable` object. The caller must ensure that " "*ml* outlives the :term:`callable`. Typically, *ml* is defined as a static " "variable." msgstr "" -#: ../../c-api/structures.rst:413 +#: ../../c-api/structures.rst:456 msgid "" "The *self* parameter will be passed as the *self* argument to the C function " "in ``ml->ml_meth`` when invoked. *self* can be ``NULL``." msgstr "" -#: ../../c-api/structures.rst:417 +#: ../../c-api/structures.rst:460 msgid "" "The :term:`callable` object's ``__module__`` attribute can be set from the " "given *module* argument. *module* should be a Python string, which will be " @@ -494,71 +563,71 @@ msgid "" "can be set to :const:`None` or ``NULL``." msgstr "" -#: ../../c-api/structures.rst:423 +#: ../../c-api/structures.rst:466 msgid ":attr:`function.__module__`" msgstr "" -#: ../../c-api/structures.rst:425 +#: ../../c-api/structures.rst:468 msgid "" "The *cls* parameter will be passed as the *defining_class* argument to the C " "function. Must be set if :c:macro:`METH_METHOD` is set on ``ml->ml_flags``." msgstr "" -#: ../../c-api/structures.rst:434 +#: ../../c-api/structures.rst:477 msgid "Equivalent to ``PyCMethod_New(ml, self, module, NULL)``." msgstr "" -#: ../../c-api/structures.rst:439 +#: ../../c-api/structures.rst:482 msgid "Equivalent to ``PyCMethod_New(ml, self, NULL, NULL)``." msgstr "" -#: ../../c-api/structures.rst:443 +#: ../../c-api/structures.rst:486 msgid "Accessing attributes of extension types" msgstr "" -#: ../../c-api/structures.rst:447 +#: ../../c-api/structures.rst:490 msgid "" "Structure which describes an attribute of a type which corresponds to a C " "struct member. When defining a class, put a NULL-terminated array of these " "structures in the :c:member:`~PyTypeObject.tp_members` slot." msgstr "" -#: ../../c-api/structures.rst:452 +#: ../../c-api/structures.rst:495 msgid "Its fields are, in order:" msgstr "" -#: ../../c-api/structures.rst:456 +#: ../../c-api/structures.rst:499 msgid "" "Name of the member. A NULL value marks the end of a ``PyMemberDef[]`` array." msgstr "" -#: ../../c-api/structures.rst:459 +#: ../../c-api/structures.rst:502 msgid "The string should be static, no copy is made of it." msgstr "" -#: ../../c-api/structures.rst:463 +#: ../../c-api/structures.rst:506 msgid "" "The type of the member in the C struct. See :ref:`PyMemberDef-types` for the " "possible values." msgstr "" -#: ../../c-api/structures.rst:468 +#: ../../c-api/structures.rst:511 msgid "" "The offset in bytes that the member is located on the type’s object struct." msgstr "" -#: ../../c-api/structures.rst:472 +#: ../../c-api/structures.rst:515 msgid "" "Zero or more of the :ref:`PyMemberDef-flags`, combined using bitwise OR." msgstr "" -#: ../../c-api/structures.rst:476 +#: ../../c-api/structures.rst:519 msgid "" "The docstring, or NULL. The string should be static, no copy is made of it. " "Typically, it is defined using :c:macro:`PyDoc_STR`." msgstr "" -#: ../../c-api/structures.rst:480 +#: ../../c-api/structures.rst:523 msgid "" "By default (when :c:member:`~PyMemberDef.flags` is ``0``), members allow " "both read and write access. Use the :c:macro:`Py_READONLY` flag for read-" @@ -567,7 +636,7 @@ msgid "" "`T_OBJECT`) members can be deleted." msgstr "" -#: ../../c-api/structures.rst:489 +#: ../../c-api/structures.rst:532 msgid "" "For heap-allocated types (created using :c:func:`PyType_FromSpec` or " "similar), ``PyMemberDef`` may contain a definition for the special member " @@ -577,7 +646,7 @@ msgid "" "Py_RELATIVE_OFFSET``. For example::" msgstr "" -#: ../../c-api/structures.rst:496 +#: ../../c-api/structures.rst:539 msgid "" "static PyMemberDef spam_type_members[] = {\n" " {\"__vectorcalloffset__\", Py_T_PYSSIZET,\n" @@ -586,11 +655,11 @@ msgid "" "};" msgstr "" -#: ../../c-api/structures.rst:502 +#: ../../c-api/structures.rst:545 msgid "(You may need to ``#include `` for :c:func:`!offsetof`.)" msgstr "" -#: ../../c-api/structures.rst:504 +#: ../../c-api/structures.rst:547 msgid "" "The legacy offsets :c:member:`~PyTypeObject.tp_dictoffset` and :c:member:" "`~PyTypeObject.tp_weaklistoffset` can be defined similarly using " @@ -599,84 +668,84 @@ msgid "" "and :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` instead." msgstr "" -#: ../../c-api/structures.rst:512 +#: ../../c-api/structures.rst:555 msgid "" "``PyMemberDef`` is always available. Previously, it required including " "``\"structmember.h\"``." msgstr "" -#: ../../c-api/structures.rst:517 +#: ../../c-api/structures.rst:560 msgid "" ":c:macro:`Py_RELATIVE_OFFSET` is now allowed for " "``\"__vectorcalloffset__\"``, ``\"__dictoffset__\"`` and " "``\"__weaklistoffset__\"``." msgstr "" -#: ../../c-api/structures.rst:523 +#: ../../c-api/structures.rst:566 msgid "" "Get an attribute belonging to the object at address *obj_addr*. The " "attribute is described by ``PyMemberDef`` *m*. Returns ``NULL`` on error." msgstr "" -#: ../../c-api/structures.rst:529 +#: ../../c-api/structures.rst:572 msgid "" "``PyMember_GetOne`` is always available. Previously, it required including " "``\"structmember.h\"``." msgstr "" -#: ../../c-api/structures.rst:534 +#: ../../c-api/structures.rst:577 msgid "" "Set an attribute belonging to the object at address *obj_addr* to object " "*o*. The attribute to set is described by ``PyMemberDef`` *m*. Returns " "``0`` if successful and a negative value on failure." msgstr "" -#: ../../c-api/structures.rst:540 +#: ../../c-api/structures.rst:583 msgid "" "``PyMember_SetOne`` is always available. Previously, it required including " "``\"structmember.h\"``." msgstr "" -#: ../../c-api/structures.rst:546 +#: ../../c-api/structures.rst:589 msgid "Member flags" msgstr "" -#: ../../c-api/structures.rst:548 +#: ../../c-api/structures.rst:591 msgid "The following flags can be used with :c:member:`PyMemberDef.flags`:" msgstr "" -#: ../../c-api/structures.rst:552 +#: ../../c-api/structures.rst:595 msgid "Not writable." msgstr "" -#: ../../c-api/structures.rst:556 +#: ../../c-api/structures.rst:599 msgid "" "Emit an ``object.__getattr__`` :ref:`audit event ` before " "reading." msgstr "" -#: ../../c-api/structures.rst:561 +#: ../../c-api/structures.rst:604 msgid "" "Indicates that the :c:member:`~PyMemberDef.offset` of this ``PyMemberDef`` " "entry indicates an offset from the subclass-specific data, rather than from " "``PyObject``." msgstr "" -#: ../../c-api/structures.rst:565 +#: ../../c-api/structures.rst:608 msgid "" "Can only be used as part of :c:member:`Py_tp_members ` :c:type:`slot ` when creating a class using " "negative :c:member:`~PyType_Spec.basicsize`. It is mandatory in that case." msgstr "" -#: ../../c-api/structures.rst:570 +#: ../../c-api/structures.rst:613 msgid "" "This flag is only used in :c:type:`PyType_Slot`. When setting :c:member:" "`~PyTypeObject.tp_members` during class creation, Python clears it and sets :" "c:member:`PyMemberDef.offset` to the offset from the ``PyObject`` struct." msgstr "" -#: ../../c-api/structures.rst:582 +#: ../../c-api/structures.rst:625 msgid "" "The :c:macro:`!RESTRICTED`, :c:macro:`!READ_RESTRICTED` and :c:macro:`!" "WRITE_RESTRICTED` macros available with ``#include \"structmember.h\"`` are " @@ -685,7 +754,7 @@ msgid "" "nothing." msgstr "" -#: ../../c-api/structures.rst:593 +#: ../../c-api/structures.rst:636 msgid "" "The :c:macro:`!READONLY` macro was renamed to :c:macro:`Py_READONLY`. The :c:" "macro:`!PY_AUDIT_READ` macro was renamed with the ``Py_`` prefix. The new " @@ -694,11 +763,11 @@ msgid "" "names." msgstr "" -#: ../../c-api/structures.rst:602 +#: ../../c-api/structures.rst:645 msgid "Member types" msgstr "" -#: ../../c-api/structures.rst:604 +#: ../../c-api/structures.rst:647 msgid "" ":c:member:`PyMemberDef.type` can be one of the following macros " "corresponding to various C types. When the member is accessed in Python, it " @@ -707,147 +776,147 @@ msgid "" "exception such as :exc:`TypeError` or :exc:`ValueError` is raised." msgstr "" -#: ../../c-api/structures.rst:612 +#: ../../c-api/structures.rst:655 msgid "" "Unless marked (D), attributes defined this way cannot be deleted using e.g. :" "keyword:`del` or :py:func:`delattr`." msgstr "" -#: ../../c-api/structures.rst:616 +#: ../../c-api/structures.rst:659 msgid "Macro name" msgstr "" -#: ../../c-api/structures.rst:616 +#: ../../c-api/structures.rst:659 msgid "C type" msgstr "" -#: ../../c-api/structures.rst:616 +#: ../../c-api/structures.rst:659 msgid "Python type" msgstr "" -#: ../../c-api/structures.rst:618 +#: ../../c-api/structures.rst:661 msgid ":c:expr:`char`" msgstr "" -#: ../../c-api/structures.rst:618 ../../c-api/structures.rst:619 -#: ../../c-api/structures.rst:620 ../../c-api/structures.rst:621 -#: ../../c-api/structures.rst:622 ../../c-api/structures.rst:623 -#: ../../c-api/structures.rst:624 ../../c-api/structures.rst:625 -#: ../../c-api/structures.rst:626 ../../c-api/structures.rst:627 -#: ../../c-api/structures.rst:628 +#: ../../c-api/structures.rst:661 ../../c-api/structures.rst:662 +#: ../../c-api/structures.rst:663 ../../c-api/structures.rst:664 +#: ../../c-api/structures.rst:665 ../../c-api/structures.rst:666 +#: ../../c-api/structures.rst:667 ../../c-api/structures.rst:668 +#: ../../c-api/structures.rst:669 ../../c-api/structures.rst:670 +#: ../../c-api/structures.rst:671 msgid ":py:class:`int`" msgstr "" -#: ../../c-api/structures.rst:619 +#: ../../c-api/structures.rst:662 msgid ":c:expr:`short`" msgstr "" -#: ../../c-api/structures.rst:620 +#: ../../c-api/structures.rst:663 msgid ":c:expr:`int`" msgstr "" -#: ../../c-api/structures.rst:621 +#: ../../c-api/structures.rst:664 msgid ":c:expr:`long`" msgstr "" -#: ../../c-api/structures.rst:622 +#: ../../c-api/structures.rst:665 msgid ":c:expr:`long long`" msgstr "" -#: ../../c-api/structures.rst:623 +#: ../../c-api/structures.rst:666 msgid ":c:expr:`unsigned char`" msgstr "" -#: ../../c-api/structures.rst:624 +#: ../../c-api/structures.rst:667 msgid ":c:expr:`unsigned int`" msgstr "" -#: ../../c-api/structures.rst:625 +#: ../../c-api/structures.rst:668 msgid ":c:expr:`unsigned short`" msgstr "" -#: ../../c-api/structures.rst:626 +#: ../../c-api/structures.rst:669 msgid ":c:expr:`unsigned long`" msgstr "" -#: ../../c-api/structures.rst:627 +#: ../../c-api/structures.rst:670 msgid ":c:expr:`unsigned long long`" msgstr "" -#: ../../c-api/structures.rst:628 +#: ../../c-api/structures.rst:671 msgid ":c:expr:`Py_ssize_t`" msgstr "" -#: ../../c-api/structures.rst:629 +#: ../../c-api/structures.rst:672 msgid ":c:expr:`float`" msgstr "" -#: ../../c-api/structures.rst:629 ../../c-api/structures.rst:630 +#: ../../c-api/structures.rst:672 ../../c-api/structures.rst:673 msgid ":py:class:`float`" msgstr "" -#: ../../c-api/structures.rst:630 +#: ../../c-api/structures.rst:673 msgid ":c:expr:`double`" msgstr "" -#: ../../c-api/structures.rst:631 +#: ../../c-api/structures.rst:674 msgid ":c:expr:`char` (written as 0 or 1)" msgstr "" -#: ../../c-api/structures.rst:631 +#: ../../c-api/structures.rst:674 msgid ":py:class:`bool`" msgstr "" -#: ../../c-api/structures.rst:633 +#: ../../c-api/structures.rst:676 msgid ":c:expr:`const char *` (*)" msgstr "" -#: ../../c-api/structures.rst:633 ../../c-api/structures.rst:634 +#: ../../c-api/structures.rst:676 ../../c-api/structures.rst:677 msgid ":py:class:`str` (RO)" msgstr "" -#: ../../c-api/structures.rst:634 +#: ../../c-api/structures.rst:677 msgid ":c:expr:`const char[]` (*)" msgstr "" -#: ../../c-api/structures.rst:635 +#: ../../c-api/structures.rst:678 msgid ":c:expr:`char` (0-127)" msgstr "" -#: ../../c-api/structures.rst:635 +#: ../../c-api/structures.rst:678 msgid ":py:class:`str` (**)" msgstr "" -#: ../../c-api/structures.rst:636 +#: ../../c-api/structures.rst:679 msgid ":c:expr:`PyObject *`" msgstr "" -#: ../../c-api/structures.rst:636 +#: ../../c-api/structures.rst:679 msgid ":py:class:`object` (D)" msgstr "" -#: ../../c-api/structures.rst:639 +#: ../../c-api/structures.rst:682 msgid "" "(*): Zero-terminated, UTF8-encoded C string. With :c:macro:`!Py_T_STRING` " "the C representation is a pointer; with :c:macro:`!Py_T_STRING_INPLACE` the " "string is stored directly in the structure." msgstr "" -#: ../../c-api/structures.rst:644 +#: ../../c-api/structures.rst:687 msgid "(**): String of length 1. Only ASCII is accepted." msgstr "" -#: ../../c-api/structures.rst:646 +#: ../../c-api/structures.rst:689 msgid "(RO): Implies :c:macro:`Py_READONLY`." msgstr "" -#: ../../c-api/structures.rst:648 +#: ../../c-api/structures.rst:691 msgid "" "(D): Can be deleted, in which case the pointer is set to ``NULL``. Reading a " "``NULL`` pointer raises :py:exc:`AttributeError`." msgstr "" -#: ../../c-api/structures.rst:674 +#: ../../c-api/structures.rst:717 msgid "" "In previous versions, the macros were only available with ``#include " "\"structmember.h\"`` and were named without the ``Py_`` prefix (e.g. as " @@ -855,174 +924,174 @@ msgid "" "with the following deprecated types:" msgstr "" -#: ../../c-api/structures.rst:682 +#: ../../c-api/structures.rst:725 msgid "" "Like ``Py_T_OBJECT_EX``, but ``NULL`` is converted to ``None``. This results " "in surprising behavior in Python: deleting the attribute effectively sets it " "to ``None``." msgstr "" -#: ../../c-api/structures.rst:688 +#: ../../c-api/structures.rst:731 msgid "Always ``None``. Must be used with :c:macro:`Py_READONLY`." msgstr "" -#: ../../c-api/structures.rst:691 +#: ../../c-api/structures.rst:734 msgid "Defining Getters and Setters" msgstr "" -#: ../../c-api/structures.rst:695 +#: ../../c-api/structures.rst:738 msgid "" "Structure to define property-like access for a type. See also description of " "the :c:member:`PyTypeObject.tp_getset` slot." msgstr "" -#: ../../c-api/structures.rst:700 +#: ../../c-api/structures.rst:743 msgid "attribute name" msgstr "" -#: ../../c-api/structures.rst:704 +#: ../../c-api/structures.rst:747 msgid "C function to get the attribute." msgstr "" -#: ../../c-api/structures.rst:708 +#: ../../c-api/structures.rst:751 msgid "" "Optional C function to set or delete the attribute. If ``NULL``, the " "attribute is read-only." msgstr "" -#: ../../c-api/structures.rst:713 +#: ../../c-api/structures.rst:756 msgid "optional docstring" msgstr "" -#: ../../c-api/structures.rst:717 +#: ../../c-api/structures.rst:760 msgid "" "Optional user data pointer, providing additional data for getter and setter." msgstr "" -#: ../../c-api/structures.rst:721 +#: ../../c-api/structures.rst:764 msgid "" "The ``get`` function takes one :c:expr:`PyObject*` parameter (the instance) " "and a user data pointer (the associated ``closure``):" msgstr "" -#: ../../c-api/structures.rst:724 +#: ../../c-api/structures.rst:767 msgid "" "It should return a new reference on success or ``NULL`` with a set exception " "on failure." msgstr "" -#: ../../c-api/structures.rst:729 +#: ../../c-api/structures.rst:772 msgid "" "``set`` functions take two :c:expr:`PyObject*` parameters (the instance and " "the value to be set) and a user data pointer (the associated ``closure``):" msgstr "" -#: ../../c-api/structures.rst:732 +#: ../../c-api/structures.rst:775 msgid "" "In case the attribute should be deleted the second parameter is ``NULL``. " "Should return ``0`` on success or ``-1`` with a set exception on failure." msgstr "" -#: ../../c-api/structures.rst:375 ../../c-api/structures.rst:385 +#: ../../c-api/structures.rst:418 ../../c-api/structures.rst:428 msgid "built-in function" msgstr "" -#: ../../c-api/structures.rst:375 +#: ../../c-api/structures.rst:418 msgid "classmethod" msgstr "" -#: ../../c-api/structures.rst:385 +#: ../../c-api/structures.rst:428 msgid "staticmethod" msgstr "" -#: ../../c-api/structures.rst:575 +#: ../../c-api/structures.rst:618 msgid "READ_RESTRICTED (C macro)" msgstr "" -#: ../../c-api/structures.rst:575 +#: ../../c-api/structures.rst:618 msgid "WRITE_RESTRICTED (C macro)" msgstr "" -#: ../../c-api/structures.rst:575 +#: ../../c-api/structures.rst:618 msgid "RESTRICTED (C macro)" msgstr "" -#: ../../c-api/structures.rst:588 +#: ../../c-api/structures.rst:631 msgid "READONLY (C macro)" msgstr "" -#: ../../c-api/structures.rst:651 +#: ../../c-api/structures.rst:694 msgid "T_BYTE (C macro)" msgstr "" -#: ../../c-api/structures.rst:651 +#: ../../c-api/structures.rst:694 msgid "T_SHORT (C macro)" msgstr "" -#: ../../c-api/structures.rst:651 +#: ../../c-api/structures.rst:694 msgid "T_INT (C macro)" msgstr "" -#: ../../c-api/structures.rst:651 +#: ../../c-api/structures.rst:694 msgid "T_LONG (C macro)" msgstr "" -#: ../../c-api/structures.rst:651 +#: ../../c-api/structures.rst:694 msgid "T_LONGLONG (C macro)" msgstr "" -#: ../../c-api/structures.rst:651 +#: ../../c-api/structures.rst:694 msgid "T_UBYTE (C macro)" msgstr "" -#: ../../c-api/structures.rst:651 +#: ../../c-api/structures.rst:694 msgid "T_USHORT (C macro)" msgstr "" -#: ../../c-api/structures.rst:651 +#: ../../c-api/structures.rst:694 msgid "T_UINT (C macro)" msgstr "" -#: ../../c-api/structures.rst:651 +#: ../../c-api/structures.rst:694 msgid "T_ULONG (C macro)" msgstr "" -#: ../../c-api/structures.rst:651 +#: ../../c-api/structures.rst:694 msgid "T_ULONGULONG (C macro)" msgstr "" -#: ../../c-api/structures.rst:651 +#: ../../c-api/structures.rst:694 msgid "T_PYSSIZET (C macro)" msgstr "" -#: ../../c-api/structures.rst:651 +#: ../../c-api/structures.rst:694 msgid "T_FLOAT (C macro)" msgstr "" -#: ../../c-api/structures.rst:651 +#: ../../c-api/structures.rst:694 msgid "T_DOUBLE (C macro)" msgstr "" -#: ../../c-api/structures.rst:651 +#: ../../c-api/structures.rst:694 msgid "T_BOOL (C macro)" msgstr "" -#: ../../c-api/structures.rst:651 +#: ../../c-api/structures.rst:694 msgid "T_CHAR (C macro)" msgstr "" -#: ../../c-api/structures.rst:651 +#: ../../c-api/structures.rst:694 msgid "T_STRING (C macro)" msgstr "" -#: ../../c-api/structures.rst:651 +#: ../../c-api/structures.rst:694 msgid "T_STRING_INPLACE (C macro)" msgstr "" -#: ../../c-api/structures.rst:651 +#: ../../c-api/structures.rst:694 msgid "T_OBJECT_EX (C macro)" msgstr "" -#: ../../c-api/structures.rst:651 +#: ../../c-api/structures.rst:694 msgid "structmember.h" msgstr "" diff --git a/c-api/sys.po b/c-api/sys.po index 789c3f977..13d91c7f9 100644 --- a/c-api/sys.po +++ b/c-api/sys.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 00:50+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/c-api/time.po b/c-api/time.po index 068219549..46e907cb9 100644 --- a/c-api/time.po +++ b/c-api/time.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2024-05-11 01:07+0000\n" "Last-Translator: Danial Behzadi , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/tuple.po b/c-api/tuple.po index 52994bbbb..f34c0720f 100644 --- a/c-api/tuple.po +++ b/c-api/tuple.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:50+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/c-api/type.po b/c-api/type.po index bf183089c..67b6d9d84 100644 --- a/c-api/type.po +++ b/c-api/type.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:50+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -176,18 +177,37 @@ msgstr "" #: ../../c-api/type.rst:154 msgid "" "Generic handler for the :c:member:`~PyTypeObject.tp_alloc` slot of a type " -"object. Use Python's default memory allocation mechanism to allocate a new " -"instance and initialize all its contents to ``NULL``." +"object. Uses Python's default memory allocation mechanism to allocate " +"memory for a new instance, zeros the memory, then initializes the memory as " +"if by calling :c:func:`PyObject_Init` or :c:func:`PyObject_InitVar`." msgstr "" -#: ../../c-api/type.rst:160 +#: ../../c-api/type.rst:159 +msgid "" +"Do not call this directly to allocate memory for an object; call the type's :" +"c:member:`~PyTypeObject.tp_alloc` slot instead." +msgstr "" + +#: ../../c-api/type.rst:162 +msgid "" +"For types that support garbage collection (i.e., the :c:macro:" +"`Py_TPFLAGS_HAVE_GC` flag is set), this function behaves like :c:macro:" +"`PyObject_GC_New` or :c:macro:`PyObject_GC_NewVar` (except the memory is " +"guaranteed to be zeroed before initialization), and should be paired with :c:" +"func:`PyObject_GC_Del` in :c:member:`~PyTypeObject.tp_free`. Otherwise, it " +"behaves like :c:macro:`PyObject_New` or :c:macro:`PyObject_NewVar` (except " +"the memory is guaranteed to be zeroed before initialization) and should be " +"paired with :c:func:`PyObject_Free` in :c:member:`~PyTypeObject.tp_free`." +msgstr "" + +#: ../../c-api/type.rst:174 msgid "" "Generic handler for the :c:member:`~PyTypeObject.tp_new` slot of a type " -"object. Create a new instance using the type's :c:member:`~PyTypeObject." -"tp_alloc` slot." +"object. Creates a new instance using the type's :c:member:`~PyTypeObject." +"tp_alloc` slot and returns the resulting object." msgstr "" -#: ../../c-api/type.rst:165 +#: ../../c-api/type.rst:180 msgid "" "Finalize a type object. This should be called on all type objects to finish " "their initialization. This function is responsible for adding inherited " @@ -195,7 +215,7 @@ msgid "" "and sets an exception on error." msgstr "" -#: ../../c-api/type.rst:171 +#: ../../c-api/type.rst:186 msgid "" "If some of the base classes implements the GC protocol and the provided type " "does not include the :c:macro:`Py_TPFLAGS_HAVE_GC` in its flags, then the GC " @@ -206,32 +226,32 @@ msgid "" "handle." msgstr "" -#: ../../c-api/type.rst:181 +#: ../../c-api/type.rst:196 msgid "" "Return the type's name. Equivalent to getting the type's :attr:`~type." "__name__` attribute." msgstr "" -#: ../../c-api/type.rst:188 +#: ../../c-api/type.rst:203 msgid "" "Return the type's qualified name. Equivalent to getting the type's :attr:" "`~type.__qualname__` attribute." msgstr "" -#: ../../c-api/type.rst:195 +#: ../../c-api/type.rst:210 msgid "" "Return the type's fully qualified name. Equivalent to ``f\"{type.__module__}." "{type.__qualname__}\"``, or :attr:`type.__qualname__` if :attr:`type." "__module__` is not a string or is equal to ``\"builtins\"``." msgstr "" -#: ../../c-api/type.rst:203 +#: ../../c-api/type.rst:218 msgid "" "Return the type's module name. Equivalent to getting the :attr:`type." "__module__` attribute." msgstr "" -#: ../../c-api/type.rst:210 +#: ../../c-api/type.rst:225 msgid "" "Return the function pointer stored in the given slot. If the result is " "``NULL``, this indicates that either the slot is ``NULL``, or that the " @@ -239,30 +259,30 @@ msgid "" "result pointer into the appropriate function type." msgstr "" -#: ../../c-api/type.rst:216 +#: ../../c-api/type.rst:231 msgid "" "See :c:member:`PyType_Slot.slot` for possible values of the *slot* argument." msgstr "" -#: ../../c-api/type.rst:220 +#: ../../c-api/type.rst:235 msgid "" ":c:func:`PyType_GetSlot` can now accept all types. Previously, it was " "limited to :ref:`heap types `." msgstr "" -#: ../../c-api/type.rst:226 +#: ../../c-api/type.rst:241 msgid "" "Return the module object associated with the given type when the type was " "created using :c:func:`PyType_FromModuleAndSpec`." msgstr "" -#: ../../c-api/type.rst:229 ../../c-api/type.rst:249 +#: ../../c-api/type.rst:244 ../../c-api/type.rst:264 msgid "" "If no module is associated with the given type, sets :py:class:`TypeError` " "and returns ``NULL``." msgstr "" -#: ../../c-api/type.rst:232 +#: ../../c-api/type.rst:247 msgid "" "This function is usually used to get the module in which a method is " "defined. Note that in such a method, ``PyType_GetModule(Py_TYPE(self))`` may " @@ -273,31 +293,31 @@ msgid "" "type:`!PyCMethod` cannot be used." msgstr "" -#: ../../c-api/type.rst:245 +#: ../../c-api/type.rst:260 msgid "" "Return the state of the module object associated with the given type. This " "is a shortcut for calling :c:func:`PyModule_GetState()` on the result of :c:" "func:`PyType_GetModule`." msgstr "" -#: ../../c-api/type.rst:252 +#: ../../c-api/type.rst:267 msgid "" "If the *type* has an associated module but its state is ``NULL``, returns " "``NULL`` without setting an exception." msgstr "" -#: ../../c-api/type.rst:259 +#: ../../c-api/type.rst:274 msgid "" "Find the first superclass whose module was created from the given :c:type:" "`PyModuleDef` *def*, and return that module." msgstr "" -#: ../../c-api/type.rst:262 +#: ../../c-api/type.rst:277 msgid "" "If no module is found, raises a :py:class:`TypeError` and returns ``NULL``." msgstr "" -#: ../../c-api/type.rst:264 +#: ../../c-api/type.rst:279 msgid "" "This function is intended to be used together with :c:func:" "`PyModule_GetState()` to get module state from slot methods (such as :c:" @@ -306,78 +326,85 @@ msgid "" "type:`PyCMethod` calling convention." msgstr "" -#: ../../c-api/type.rst:274 +#: ../../c-api/type.rst:285 +msgid "" +"The returned reference is :term:`borrowed ` from *type*, " +"and will be valid as long as you hold a reference to *type*. Do not release " +"it with :c:func:`Py_DECREF` or similar." +msgstr "" + +#: ../../c-api/type.rst:293 msgid "" "Find the first superclass in *type*'s :term:`method resolution order` whose :" "c:macro:`Py_tp_token` token is equal to the given one." msgstr "" -#: ../../c-api/type.rst:277 +#: ../../c-api/type.rst:296 msgid "" "If found, set *\\*result* to a new :term:`strong reference` to it and return " "``1``." msgstr "" -#: ../../c-api/type.rst:279 +#: ../../c-api/type.rst:298 msgid "If not found, set *\\*result* to ``NULL`` and return ``0``." msgstr "" -#: ../../c-api/type.rst:280 +#: ../../c-api/type.rst:299 msgid "" "On error, set *\\*result* to ``NULL`` and return ``-1`` with an exception " "set." msgstr "" -#: ../../c-api/type.rst:283 +#: ../../c-api/type.rst:302 msgid "" "The *result* argument may be ``NULL``, in which case *\\*result* is not set. " "Use this if you need only the return value." msgstr "" -#: ../../c-api/type.rst:286 +#: ../../c-api/type.rst:305 msgid "The *token* argument may not be ``NULL``." msgstr "" -#: ../../c-api/type.rst:292 +#: ../../c-api/type.rst:311 msgid "Attempt to assign a version tag to the given type." msgstr "" -#: ../../c-api/type.rst:294 +#: ../../c-api/type.rst:313 msgid "" "Returns 1 if the type already had a valid version tag or a new one was " "assigned, or 0 if a new tag could not be assigned." msgstr "" -#: ../../c-api/type.rst:301 +#: ../../c-api/type.rst:320 msgid "Creating Heap-Allocated Types" msgstr "" -#: ../../c-api/type.rst:303 +#: ../../c-api/type.rst:322 msgid "" "The following functions and structs are used to create :ref:`heap types " "`." msgstr "" -#: ../../c-api/type.rst:308 +#: ../../c-api/type.rst:327 msgid "" "Create and return a :ref:`heap type ` from the *spec* (see :c:" "macro:`Py_TPFLAGS_HEAPTYPE`)." msgstr "" -#: ../../c-api/type.rst:311 +#: ../../c-api/type.rst:330 msgid "" "The metaclass *metaclass* is used to construct the resulting type object. " "When *metaclass* is ``NULL``, the metaclass is derived from *bases* (or " "*Py_tp_base[s]* slots if *bases* is ``NULL``, see below)." msgstr "" -#: ../../c-api/type.rst:315 +#: ../../c-api/type.rst:334 msgid "" "Metaclasses that override :c:member:`~PyTypeObject.tp_new` are not " "supported, except if ``tp_new`` is ``NULL``." msgstr "" -#: ../../c-api/type.rst:318 +#: ../../c-api/type.rst:337 msgid "" "The *bases* argument can be used to specify base classes; it can either be " "only one class or a tuple of classes. If *bases* is ``NULL``, the " @@ -386,7 +413,7 @@ msgid "" "derives from :class:`object`." msgstr "" -#: ../../c-api/type.rst:324 +#: ../../c-api/type.rst:343 msgid "" "The *module* argument can be used to record the module in which the new " "class is defined. It must be a module object or ``NULL``. If not ``NULL``, " @@ -395,11 +422,11 @@ msgid "" "subclasses; it must be specified for each class individually." msgstr "" -#: ../../c-api/type.rst:331 +#: ../../c-api/type.rst:350 msgid "This function calls :c:func:`PyType_Ready` on the new type." msgstr "" -#: ../../c-api/type.rst:333 +#: ../../c-api/type.rst:352 msgid "" "Note that this function does *not* fully match the behavior of calling :py:" "class:`type() ` or using the :keyword:`class` statement. With user-" @@ -408,108 +435,108 @@ msgid "" "Specifically:" msgstr "" -#: ../../c-api/type.rst:340 +#: ../../c-api/type.rst:359 msgid "" ":py:meth:`~object.__new__` is not called on the new class (and it must be " "set to ``type.__new__``)." msgstr "" -#: ../../c-api/type.rst:342 +#: ../../c-api/type.rst:361 msgid ":py:meth:`~object.__init__` is not called on the new class." msgstr "" -#: ../../c-api/type.rst:343 +#: ../../c-api/type.rst:362 msgid ":py:meth:`~object.__init_subclass__` is not called on any bases." msgstr "" -#: ../../c-api/type.rst:344 +#: ../../c-api/type.rst:363 msgid ":py:meth:`~object.__set_name__` is not called on new descriptors." msgstr "" -#: ../../c-api/type.rst:350 +#: ../../c-api/type.rst:369 msgid "Equivalent to ``PyType_FromMetaclass(NULL, module, spec, bases)``." msgstr "" -#: ../../c-api/type.rst:356 +#: ../../c-api/type.rst:375 msgid "" "The function now accepts a single class as the *bases* argument and ``NULL`` " "as the ``tp_doc`` slot." msgstr "" -#: ../../c-api/type.rst:361 ../../c-api/type.rst:382 +#: ../../c-api/type.rst:380 ../../c-api/type.rst:401 msgid "" "The function now finds and uses a metaclass corresponding to the provided " "base classes. Previously, only :class:`type` instances were returned." msgstr "" -#: ../../c-api/type.rst:364 ../../c-api/type.rst:385 ../../c-api/type.rst:405 +#: ../../c-api/type.rst:383 ../../c-api/type.rst:404 ../../c-api/type.rst:424 msgid "" "The :c:member:`~PyTypeObject.tp_new` of the metaclass is *ignored*. which " "may result in incomplete initialization. Creating classes whose metaclass " "overrides :c:member:`~PyTypeObject.tp_new` is deprecated." msgstr "" -#: ../../c-api/type.rst:371 ../../c-api/type.rst:392 ../../c-api/type.rst:412 +#: ../../c-api/type.rst:390 ../../c-api/type.rst:411 ../../c-api/type.rst:431 msgid "" "Creating classes whose metaclass overrides :c:member:`~PyTypeObject.tp_new` " "is no longer allowed." msgstr "" -#: ../../c-api/type.rst:376 +#: ../../c-api/type.rst:395 msgid "Equivalent to ``PyType_FromMetaclass(NULL, NULL, spec, bases)``." msgstr "" -#: ../../c-api/type.rst:397 +#: ../../c-api/type.rst:416 msgid "Equivalent to ``PyType_FromMetaclass(NULL, NULL, spec, NULL)``." msgstr "" -#: ../../c-api/type.rst:401 +#: ../../c-api/type.rst:420 msgid "" "The function now finds and uses a metaclass corresponding to the base " "classes provided in *Py_tp_base[s]* slots. Previously, only :class:`type` " "instances were returned." msgstr "" -#: ../../c-api/type.rst:417 +#: ../../c-api/type.rst:436 msgid "" "Make a type immutable: set the :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` flag." msgstr "" -#: ../../c-api/type.rst:419 +#: ../../c-api/type.rst:438 msgid "All base classes of *type* must be immutable." msgstr "" -#: ../../c-api/type.rst:421 +#: ../../c-api/type.rst:440 msgid "On success, return ``0``. On error, set an exception and return ``-1``." msgstr "" -#: ../../c-api/type.rst:424 +#: ../../c-api/type.rst:443 msgid "" "The type must not be used before it's made immutable. For example, type " "instances must not be created before the type is made immutable." msgstr "" -#: ../../c-api/type.rst:440 +#: ../../c-api/type.rst:459 msgid "Structure defining a type's behavior." msgstr "" -#: ../../c-api/type.rst:444 +#: ../../c-api/type.rst:463 msgid "Name of the type, used to set :c:member:`PyTypeObject.tp_name`." msgstr "" -#: ../../c-api/type.rst:448 +#: ../../c-api/type.rst:467 msgid "" "If positive, specifies the size of the instance in bytes. It is used to set :" "c:member:`PyTypeObject.tp_basicsize`." msgstr "" -#: ../../c-api/type.rst:451 +#: ../../c-api/type.rst:470 msgid "" "If zero, specifies that :c:member:`~PyTypeObject.tp_basicsize` should be " "inherited." msgstr "" -#: ../../c-api/type.rst:454 +#: ../../c-api/type.rst:473 msgid "" "If negative, the absolute value specifies how much space instances of the " "class need *in addition* to the superclass. Use :c:func:" @@ -519,17 +546,17 @@ msgid "" "requirements." msgstr "" -#: ../../c-api/type.rst:464 +#: ../../c-api/type.rst:483 msgid "Previously, this field could not be negative." msgstr "" -#: ../../c-api/type.rst:468 +#: ../../c-api/type.rst:487 msgid "" "Size of one element of a variable-size type, in bytes. Used to set :c:member:" "`PyTypeObject.tp_itemsize`. See ``tp_itemsize`` documentation for caveats." msgstr "" -#: ../../c-api/type.rst:472 +#: ../../c-api/type.rst:491 msgid "" "If zero, :c:member:`~PyTypeObject.tp_itemsize` is inherited. Extending " "arbitrary variable-sized classes is dangerous, since some types use a fixed " @@ -538,58 +565,58 @@ msgid "" "only possible in the following situations:" msgstr "" -#: ../../c-api/type.rst:479 +#: ../../c-api/type.rst:498 msgid "" "The base is not variable-sized (its :c:member:`~PyTypeObject.tp_itemsize`)." msgstr "" -#: ../../c-api/type.rst:481 +#: ../../c-api/type.rst:500 msgid "" "The requested :c:member:`PyType_Spec.basicsize` is positive, suggesting that " "the memory layout of the base class is known." msgstr "" -#: ../../c-api/type.rst:483 +#: ../../c-api/type.rst:502 msgid "" "The requested :c:member:`PyType_Spec.basicsize` is zero, suggesting that the " "subclass does not access the instance's memory directly." msgstr "" -#: ../../c-api/type.rst:486 +#: ../../c-api/type.rst:505 msgid "With the :c:macro:`Py_TPFLAGS_ITEMS_AT_END` flag." msgstr "" -#: ../../c-api/type.rst:490 +#: ../../c-api/type.rst:509 msgid "Type flags, used to set :c:member:`PyTypeObject.tp_flags`." msgstr "" -#: ../../c-api/type.rst:492 +#: ../../c-api/type.rst:511 msgid "" "If the ``Py_TPFLAGS_HEAPTYPE`` flag is not set, :c:func:" "`PyType_FromSpecWithBases` sets it automatically." msgstr "" -#: ../../c-api/type.rst:497 +#: ../../c-api/type.rst:516 msgid "" "Array of :c:type:`PyType_Slot` structures. Terminated by the special slot " "value ``{0, NULL}``." msgstr "" -#: ../../c-api/type.rst:500 +#: ../../c-api/type.rst:519 msgid "Each slot ID should be specified at most once." msgstr "" -#: ../../c-api/type.rst:510 +#: ../../c-api/type.rst:529 msgid "" "Structure defining optional functionality of a type, containing a slot ID " "and a value pointer." msgstr "" -#: ../../c-api/type.rst:515 +#: ../../c-api/type.rst:534 msgid "A slot ID." msgstr "" -#: ../../c-api/type.rst:517 +#: ../../c-api/type.rst:536 msgid "" "Slot IDs are named like the field names of the structures :c:type:" "`PyTypeObject`, :c:type:`PyNumberMethods`, :c:type:`PySequenceMethods`, :c:" @@ -597,52 +624,52 @@ msgid "" "prefix. For example, use:" msgstr "" -#: ../../c-api/type.rst:523 +#: ../../c-api/type.rst:542 msgid "``Py_tp_dealloc`` to set :c:member:`PyTypeObject.tp_dealloc`" msgstr "" -#: ../../c-api/type.rst:524 +#: ../../c-api/type.rst:543 msgid "``Py_nb_add`` to set :c:member:`PyNumberMethods.nb_add`" msgstr "" -#: ../../c-api/type.rst:525 +#: ../../c-api/type.rst:544 msgid "``Py_sq_length`` to set :c:member:`PySequenceMethods.sq_length`" msgstr "" -#: ../../c-api/type.rst:527 +#: ../../c-api/type.rst:546 msgid "" "An additional slot is supported that does not correspond to a :c:type:`!" "PyTypeObject` struct field:" msgstr "" -#: ../../c-api/type.rst:530 +#: ../../c-api/type.rst:549 msgid ":c:data:`Py_tp_token`" msgstr "" -#: ../../c-api/type.rst:532 +#: ../../c-api/type.rst:551 msgid "" "The following “offset” fields cannot be set using :c:type:`PyType_Slot`:" msgstr "" -#: ../../c-api/type.rst:534 +#: ../../c-api/type.rst:553 msgid "" ":c:member:`~PyTypeObject.tp_weaklistoffset` (use :c:macro:" "`Py_TPFLAGS_MANAGED_WEAKREF` instead if possible)" msgstr "" -#: ../../c-api/type.rst:536 +#: ../../c-api/type.rst:555 msgid "" ":c:member:`~PyTypeObject.tp_dictoffset` (use :c:macro:" "`Py_TPFLAGS_MANAGED_DICT` instead if possible)" msgstr "" -#: ../../c-api/type.rst:538 +#: ../../c-api/type.rst:557 msgid "" ":c:member:`~PyTypeObject.tp_vectorcall_offset` (use " "``\"__vectorcalloffset__\"`` in :ref:`PyMemberDef `)" msgstr "" -#: ../../c-api/type.rst:542 +#: ../../c-api/type.rst:561 msgid "" "If it is not possible to switch to a ``MANAGED`` flag (for example, for " "vectorcall or to support Python older than 3.12), specify the offset in :c:" @@ -650,109 +677,109 @@ msgid "" "documentation ` for details." msgstr "" -#: ../../c-api/type.rst:548 +#: ../../c-api/type.rst:567 msgid "" "The following internal fields cannot be set at all when creating a heap type:" msgstr "" -#: ../../c-api/type.rst:551 +#: ../../c-api/type.rst:570 msgid "" ":c:member:`~PyTypeObject.tp_dict`, :c:member:`~PyTypeObject.tp_mro`, :c:" "member:`~PyTypeObject.tp_cache`, :c:member:`~PyTypeObject.tp_subclasses`, " "and :c:member:`~PyTypeObject.tp_weaklist`." msgstr "" -#: ../../c-api/type.rst:557 +#: ../../c-api/type.rst:576 msgid "" "Setting :c:data:`Py_tp_bases` or :c:data:`Py_tp_base` may be problematic on " "some platforms. To avoid issues, use the *bases* argument of :c:func:" "`PyType_FromSpecWithBases` instead." msgstr "" -#: ../../c-api/type.rst:562 +#: ../../c-api/type.rst:581 msgid "Slots in :c:type:`PyBufferProcs` may be set in the unlimited API." msgstr "" -#: ../../c-api/type.rst:565 +#: ../../c-api/type.rst:584 msgid "" ":c:member:`~PyBufferProcs.bf_getbuffer` and :c:member:`~PyBufferProcs." "bf_releasebuffer` are now available under the :ref:`limited API `." msgstr "" -#: ../../c-api/type.rst:570 +#: ../../c-api/type.rst:589 msgid "" "The field :c:member:`~PyTypeObject.tp_vectorcall` can now set using " "``Py_tp_vectorcall``. See the field's documentation for details." msgstr "" -#: ../../c-api/type.rst:577 +#: ../../c-api/type.rst:596 msgid "" "The desired value of the slot. In most cases, this is a pointer to a " "function." msgstr "" -#: ../../c-api/type.rst:580 +#: ../../c-api/type.rst:599 msgid "*pfunc* values may not be ``NULL``, except for the following slots:" msgstr "" -#: ../../c-api/type.rst:582 +#: ../../c-api/type.rst:601 msgid "``Py_tp_doc``" msgstr "" -#: ../../c-api/type.rst:583 +#: ../../c-api/type.rst:602 msgid "" ":c:data:`Py_tp_token` (for clarity, prefer :c:data:`Py_TP_USE_SPEC` rather " "than ``NULL``)" msgstr "" -#: ../../c-api/type.rst:588 +#: ../../c-api/type.rst:607 msgid "" "A :c:member:`~PyType_Slot.slot` that records a static memory layout ID for a " "class." msgstr "" -#: ../../c-api/type.rst:591 +#: ../../c-api/type.rst:610 msgid "" "If the :c:type:`PyType_Spec` of the class is statically allocated, the token " "can be set to the spec using the special value :c:data:`Py_TP_USE_SPEC`:" msgstr "" -#: ../../c-api/type.rst:595 +#: ../../c-api/type.rst:614 msgid "" "static PyType_Slot foo_slots[] = {\n" " {Py_tp_token, Py_TP_USE_SPEC}," msgstr "" -#: ../../c-api/type.rst:600 +#: ../../c-api/type.rst:619 msgid "It can also be set to an arbitrary pointer, but you must ensure that:" msgstr "" -#: ../../c-api/type.rst:602 +#: ../../c-api/type.rst:621 msgid "" "The pointer outlives the class, so it's not reused for something else while " "the class exists." msgstr "" -#: ../../c-api/type.rst:604 +#: ../../c-api/type.rst:623 msgid "" "It \"belongs\" to the extension module where the class lives, so it will not " "clash with other extensions." msgstr "" -#: ../../c-api/type.rst:607 +#: ../../c-api/type.rst:626 msgid "" "Use :c:func:`PyType_GetBaseByToken` to check if a class's superclass has a " "given token -- that is, check whether the memory layout is compatible." msgstr "" -#: ../../c-api/type.rst:610 +#: ../../c-api/type.rst:629 msgid "" "To get the token for a given class (without considering superclasses), use :" "c:func:`PyType_GetSlot` with ``Py_tp_token``." msgstr "" -#: ../../c-api/type.rst:619 +#: ../../c-api/type.rst:638 msgid "" "Used as a value with :c:data:`Py_tp_token` to set the token to the class's :" "c:type:`PyType_Spec`. Expands to ``NULL``." diff --git a/c-api/typehints.po b/c-api/typehints.po index a4159284d..fac5d6011 100644 --- a/c-api/typehints.po +++ b/c-api/typehints.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:50+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/c-api/typeobj.po b/c-api/typeobj.po index bfda6b8fd..093b54ab4 100644 --- a/c-api/typeobj.po +++ b/c-api/typeobj.po @@ -4,17 +4,18 @@ # FIRST AUTHOR , YEAR. # # Translators: -# Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:50+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -134,7 +135,7 @@ msgstr "" #: ../../c-api/typeobj.rst:0 ../../c-api/typeobj.rst:46 #: ../../c-api/typeobj.rst:48 ../../c-api/typeobj.rst:52 #: ../../c-api/typeobj.rst:99 ../../c-api/typeobj.rst:120 -#: ../../c-api/typeobj.rst:416 +#: ../../c-api/typeobj.rst:417 msgid ":c:type:`Py_ssize_t`" msgstr "" @@ -147,7 +148,7 @@ msgid ":c:member:`~PyTypeObject.tp_dealloc`" msgstr "" #: ../../c-api/typeobj.rst:50 ../../c-api/typeobj.rst:142 -#: ../../c-api/typeobj.rst:146 ../../c-api/typeobj.rst:346 +#: ../../c-api/typeobj.rst:146 ../../c-api/typeobj.rst:347 msgid ":c:type:`destructor`" msgstr "" @@ -159,7 +160,7 @@ msgstr "" msgid "(:c:member:`~PyTypeObject.tp_getattr`)" msgstr "" -#: ../../c-api/typeobj.rst:54 ../../c-api/typeobj.rst:370 +#: ../../c-api/typeobj.rst:54 ../../c-api/typeobj.rst:371 msgid ":c:type:`getattrfunc`" msgstr "" @@ -178,7 +179,7 @@ msgstr "" msgid "(:c:member:`~PyTypeObject.tp_setattr`)" msgstr "" -#: ../../c-api/typeobj.rst:57 ../../c-api/typeobj.rst:375 +#: ../../c-api/typeobj.rst:57 ../../c-api/typeobj.rst:376 msgid ":c:type:`setattrfunc`" msgstr "" @@ -196,6 +197,7 @@ msgstr "" #: ../../c-api/typeobj.rst:60 ../../c-api/typeobj.rst:64 #: ../../c-api/typeobj.rst:66 ../../c-api/typeobj.rst:68 +#: ../../c-api/typeobj.rst:82 msgid ":ref:`sub-slots`" msgstr "" @@ -210,7 +212,7 @@ msgid ":c:member:`~PyTypeObject.tp_repr`" msgstr "" #: ../../c-api/typeobj.rst:62 ../../c-api/typeobj.rst:74 -#: ../../c-api/typeobj.rst:368 +#: ../../c-api/typeobj.rst:369 msgid ":c:type:`reprfunc`" msgstr "" @@ -246,7 +248,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_hash`" msgstr "" -#: ../../c-api/typeobj.rst:70 ../../c-api/typeobj.rst:404 +#: ../../c-api/typeobj.rst:70 ../../c-api/typeobj.rst:405 msgid ":c:type:`hashfunc`" msgstr "" @@ -259,7 +261,7 @@ msgid ":c:member:`~PyTypeObject.tp_call`" msgstr "" #: ../../c-api/typeobj.rst:72 ../../c-api/typeobj.rst:237 -#: ../../c-api/typeobj.rst:240 ../../c-api/typeobj.rst:440 +#: ../../c-api/typeobj.rst:240 ../../c-api/typeobj.rst:441 msgid ":c:type:`ternaryfunc`" msgstr "" @@ -279,7 +281,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_getattro`" msgstr "" -#: ../../c-api/typeobj.rst:76 ../../c-api/typeobj.rst:381 +#: ../../c-api/typeobj.rst:76 ../../c-api/typeobj.rst:382 msgid ":c:type:`getattrofunc`" msgstr "" @@ -287,7 +289,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_setattro`" msgstr "" -#: ../../c-api/typeobj.rst:79 ../../c-api/typeobj.rst:386 +#: ../../c-api/typeobj.rst:79 ../../c-api/typeobj.rst:387 msgid ":c:type:`setattrofunc`" msgstr "" @@ -326,7 +328,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_traverse`" msgstr "" -#: ../../c-api/typeobj.rst:88 ../../c-api/typeobj.rst:350 +#: ../../c-api/typeobj.rst:88 ../../c-api/typeobj.rst:351 msgid ":c:type:`traverseproc`" msgstr "" @@ -335,7 +337,7 @@ msgid ":c:member:`~PyTypeObject.tp_clear`" msgstr "" #: ../../c-api/typeobj.rst:90 ../../c-api/typeobj.rst:130 -#: ../../c-api/typeobj.rst:248 ../../c-api/typeobj.rst:429 +#: ../../c-api/typeobj.rst:248 ../../c-api/typeobj.rst:430 msgid ":c:type:`inquiry`" msgstr "" @@ -343,7 +345,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_richcompare`" msgstr "" -#: ../../c-api/typeobj.rst:92 ../../c-api/typeobj.rst:406 +#: ../../c-api/typeobj.rst:92 ../../c-api/typeobj.rst:407 msgid ":c:type:`richcmpfunc`" msgstr "" @@ -359,7 +361,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_iter`" msgstr "" -#: ../../c-api/typeobj.rst:101 ../../c-api/typeobj.rst:412 +#: ../../c-api/typeobj.rst:101 ../../c-api/typeobj.rst:413 msgid ":c:type:`getiterfunc`" msgstr "" @@ -371,7 +373,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_iternext`" msgstr "" -#: ../../c-api/typeobj.rst:103 ../../c-api/typeobj.rst:414 +#: ../../c-api/typeobj.rst:103 ../../c-api/typeobj.rst:415 msgid ":c:type:`iternextfunc`" msgstr "" @@ -422,15 +424,15 @@ msgstr "" #: ../../c-api/typeobj.rst:0 ../../c-api/typeobj.rst:113 #: ../../c-api/typeobj.rst:132 ../../c-api/typeobj.rst:134 #: ../../c-api/typeobj.rst:136 ../../c-api/typeobj.rst:140 -#: ../../c-api/typeobj.rst:341 ../../c-api/typeobj.rst:346 -#: ../../c-api/typeobj.rst:356 ../../c-api/typeobj.rst:368 -#: ../../c-api/typeobj.rst:370 ../../c-api/typeobj.rst:381 -#: ../../c-api/typeobj.rst:392 ../../c-api/typeobj.rst:404 -#: ../../c-api/typeobj.rst:406 ../../c-api/typeobj.rst:412 -#: ../../c-api/typeobj.rst:414 ../../c-api/typeobj.rst:416 -#: ../../c-api/typeobj.rst:429 ../../c-api/typeobj.rst:431 -#: ../../c-api/typeobj.rst:435 ../../c-api/typeobj.rst:440 -#: ../../c-api/typeobj.rst:446 +#: ../../c-api/typeobj.rst:342 ../../c-api/typeobj.rst:347 +#: ../../c-api/typeobj.rst:357 ../../c-api/typeobj.rst:369 +#: ../../c-api/typeobj.rst:371 ../../c-api/typeobj.rst:382 +#: ../../c-api/typeobj.rst:393 ../../c-api/typeobj.rst:405 +#: ../../c-api/typeobj.rst:407 ../../c-api/typeobj.rst:413 +#: ../../c-api/typeobj.rst:415 ../../c-api/typeobj.rst:417 +#: ../../c-api/typeobj.rst:430 ../../c-api/typeobj.rst:432 +#: ../../c-api/typeobj.rst:436 ../../c-api/typeobj.rst:441 +#: ../../c-api/typeobj.rst:447 msgid ":c:type:`PyObject` *" msgstr "" @@ -442,7 +444,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_descr_get`" msgstr "" -#: ../../c-api/typeobj.rst:115 ../../c-api/typeobj.rst:392 +#: ../../c-api/typeobj.rst:115 ../../c-api/typeobj.rst:393 msgid ":c:type:`descrgetfunc`" msgstr "" @@ -454,7 +456,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_descr_set`" msgstr "" -#: ../../c-api/typeobj.rst:117 ../../c-api/typeobj.rst:398 +#: ../../c-api/typeobj.rst:117 ../../c-api/typeobj.rst:399 msgid ":c:type:`descrsetfunc`" msgstr "" @@ -470,7 +472,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_init`" msgstr "" -#: ../../c-api/typeobj.rst:122 ../../c-api/typeobj.rst:362 +#: ../../c-api/typeobj.rst:122 ../../c-api/typeobj.rst:363 msgid ":c:type:`initproc`" msgstr "" @@ -482,7 +484,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_alloc`" msgstr "" -#: ../../c-api/typeobj.rst:124 ../../c-api/typeobj.rst:341 +#: ../../c-api/typeobj.rst:124 ../../c-api/typeobj.rst:342 msgid ":c:type:`allocfunc`" msgstr "" @@ -490,7 +492,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_new`" msgstr "" -#: ../../c-api/typeobj.rst:126 ../../c-api/typeobj.rst:356 +#: ../../c-api/typeobj.rst:126 ../../c-api/typeobj.rst:357 msgid ":c:type:`newfunc`" msgstr "" @@ -502,7 +504,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_free`" msgstr "" -#: ../../c-api/typeobj.rst:128 ../../c-api/typeobj.rst:348 +#: ../../c-api/typeobj.rst:128 ../../c-api/typeobj.rst:349 msgid ":c:type:`freefunc`" msgstr "" @@ -539,7 +541,7 @@ msgid "[:c:member:`~PyTypeObject.tp_subclasses`]" msgstr "" #: ../../c-api/typeobj.rst:0 ../../c-api/typeobj.rst:138 -#: ../../c-api/typeobj.rst:279 ../../c-api/typeobj.rst:348 +#: ../../c-api/typeobj.rst:279 ../../c-api/typeobj.rst:349 msgid "void *" msgstr "" @@ -673,7 +675,7 @@ msgstr "" #: ../../c-api/typeobj.rst:244 ../../c-api/typeobj.rst:246 #: ../../c-api/typeobj.rst:250 ../../c-api/typeobj.rst:277 #: ../../c-api/typeobj.rst:281 ../../c-api/typeobj.rst:291 -#: ../../c-api/typeobj.rst:431 +#: ../../c-api/typeobj.rst:432 msgid ":c:type:`unaryfunc`" msgstr "" @@ -723,7 +725,7 @@ msgstr "" #: ../../c-api/typeobj.rst:289 ../../c-api/typeobj.rst:293 #: ../../c-api/typeobj.rst:296 ../../c-api/typeobj.rst:302 #: ../../c-api/typeobj.rst:311 ../../c-api/typeobj.rst:322 -#: ../../c-api/typeobj.rst:435 +#: ../../c-api/typeobj.rst:436 msgid ":c:type:`binaryfunc`" msgstr "" @@ -1012,7 +1014,7 @@ msgid ":c:member:`~PyMappingMethods.mp_length`" msgstr "" #: ../../c-api/typeobj.rst:300 ../../c-api/typeobj.rst:309 -#: ../../c-api/typeobj.rst:416 +#: ../../c-api/typeobj.rst:417 msgid ":c:type:`lenfunc`" msgstr "" @@ -1032,7 +1034,7 @@ msgstr "" msgid ":c:member:`~PyMappingMethods.mp_ass_subscript`" msgstr "" -#: ../../c-api/typeobj.rst:304 ../../c-api/typeobj.rst:462 +#: ../../c-api/typeobj.rst:304 ../../c-api/typeobj.rst:463 msgid ":c:type:`objobjargproc`" msgstr "" @@ -1057,7 +1059,7 @@ msgid ":c:member:`~PySequenceMethods.sq_repeat`" msgstr "" #: ../../c-api/typeobj.rst:313 ../../c-api/typeobj.rst:315 -#: ../../c-api/typeobj.rst:324 ../../c-api/typeobj.rst:446 +#: ../../c-api/typeobj.rst:324 ../../c-api/typeobj.rst:447 msgid ":c:type:`ssizeargfunc`" msgstr "" @@ -1073,7 +1075,7 @@ msgstr "" msgid ":c:member:`~PySequenceMethods.sq_ass_item`" msgstr "" -#: ../../c-api/typeobj.rst:317 ../../c-api/typeobj.rst:451 +#: ../../c-api/typeobj.rst:317 ../../c-api/typeobj.rst:452 msgid ":c:type:`ssizeobjargproc`" msgstr "" @@ -1085,7 +1087,7 @@ msgstr "" msgid ":c:member:`~PySequenceMethods.sq_contains`" msgstr "" -#: ../../c-api/typeobj.rst:320 ../../c-api/typeobj.rst:457 +#: ../../c-api/typeobj.rst:320 ../../c-api/typeobj.rst:458 msgid ":c:type:`objobjproc`" msgstr "" @@ -1109,6 +1111,10 @@ msgstr "" msgid ":c:func:`getbufferproc`" msgstr "" +#: ../../c-api/typeobj.rst:328 +msgid "__buffer__" +msgstr "" + #: ../../c-api/typeobj.rst:330 msgid ":c:member:`~PyBufferProcs.bf_releasebuffer`" msgstr "" @@ -1117,24 +1123,28 @@ msgstr "" msgid ":c:func:`releasebufferproc`" msgstr "" -#: ../../c-api/typeobj.rst:336 +#: ../../c-api/typeobj.rst:330 +msgid "__release_\\ buffer\\__" +msgstr "" + +#: ../../c-api/typeobj.rst:337 msgid "slot typedefs" msgstr "" -#: ../../c-api/typeobj.rst:339 +#: ../../c-api/typeobj.rst:340 msgid "typedef" msgstr "" -#: ../../c-api/typeobj.rst:339 +#: ../../c-api/typeobj.rst:340 msgid "Parameter Types" msgstr "" -#: ../../c-api/typeobj.rst:339 +#: ../../c-api/typeobj.rst:340 msgid "Return Type" msgstr "" -#: ../../c-api/typeobj.rst:346 ../../c-api/typeobj.rst:348 -#: ../../c-api/typeobj.rst:424 +#: ../../c-api/typeobj.rst:347 ../../c-api/typeobj.rst:349 +#: ../../c-api/typeobj.rst:425 msgid "void" msgstr "" @@ -1142,20 +1152,20 @@ msgstr "" msgid ":c:type:`visitproc`" msgstr "" -#: ../../c-api/typeobj.rst:0 ../../c-api/typeobj.rst:350 -#: ../../c-api/typeobj.rst:362 ../../c-api/typeobj.rst:375 -#: ../../c-api/typeobj.rst:386 ../../c-api/typeobj.rst:398 -#: ../../c-api/typeobj.rst:418 ../../c-api/typeobj.rst:429 -#: ../../c-api/typeobj.rst:451 ../../c-api/typeobj.rst:457 -#: ../../c-api/typeobj.rst:462 +#: ../../c-api/typeobj.rst:0 ../../c-api/typeobj.rst:351 +#: ../../c-api/typeobj.rst:363 ../../c-api/typeobj.rst:376 +#: ../../c-api/typeobj.rst:387 ../../c-api/typeobj.rst:399 +#: ../../c-api/typeobj.rst:419 ../../c-api/typeobj.rst:430 +#: ../../c-api/typeobj.rst:452 ../../c-api/typeobj.rst:458 +#: ../../c-api/typeobj.rst:463 msgid "int" msgstr "" -#: ../../c-api/typeobj.rst:404 +#: ../../c-api/typeobj.rst:405 msgid "Py_hash_t" msgstr "" -#: ../../c-api/typeobj.rst:418 +#: ../../c-api/typeobj.rst:419 msgid ":c:type:`getbufferproc`" msgstr "" @@ -1163,26 +1173,26 @@ msgstr "" msgid ":c:type:`Py_buffer` *" msgstr "" -#: ../../c-api/typeobj.rst:424 +#: ../../c-api/typeobj.rst:425 msgid ":c:type:`releasebufferproc`" msgstr "" -#: ../../c-api/typeobj.rst:469 +#: ../../c-api/typeobj.rst:470 msgid "See :ref:`slot-typedefs` below for more detail." msgstr "" -#: ../../c-api/typeobj.rst:473 +#: ../../c-api/typeobj.rst:474 msgid "PyTypeObject Definition" msgstr "" -#: ../../c-api/typeobj.rst:475 +#: ../../c-api/typeobj.rst:476 msgid "" "The structure definition for :c:type:`PyTypeObject` can be found in :file:" "`Include/cpython/object.h`. For convenience of reference, this repeats the " "definition found there:" msgstr "" -#: ../../c-api/typeobj.rst:481 +#: ../../c-api/typeobj.rst:482 msgid "" "typedef struct _typeobject {\n" " PyObject_VAR_HEAD\n" @@ -1281,11 +1291,11 @@ msgid "" "} PyTypeObject;\n" msgstr "" -#: ../../c-api/typeobj.rst:485 +#: ../../c-api/typeobj.rst:486 msgid "PyObject Slots" msgstr "" -#: ../../c-api/typeobj.rst:487 +#: ../../c-api/typeobj.rst:488 msgid "" "The type object structure extends the :c:type:`PyVarObject` structure. The :" "c:member:`~PyVarObject.ob_size` field is used for dynamic types (created by :" @@ -1295,9 +1305,13 @@ msgid "" "the :c:member:`~PyVarObject.ob_size` field." msgstr "" -#: ../../c-api/typeobj.rst:496 +#: ../../c-api/typeobj.rst:495 +msgid ":c:member:`PyObject.ob_refcnt`" +msgstr "" + +#: ../../c-api/typeobj.rst:497 msgid "" -"This is the type object's reference count, initialized to ``1`` by the " +"The type object's reference count is initialized to ``1`` by the " "``PyObject_HEAD_INIT`` macro. Note that for :ref:`statically allocated type " "objects `, the type's instances (objects whose :c:member:" "`~PyObject.ob_type` points back to the type) do *not* count as references. " @@ -1305,47 +1319,51 @@ msgid "" "instances *do* count as references." msgstr "" -#: ../../c-api/typeobj.rst:503 ../../c-api/typeobj.rst:526 +#: ../../c-api/typeobj.rst:504 ../../c-api/typeobj.rst:527 #: ../../c-api/typeobj.rst:543 ../../c-api/typeobj.rst:587 -#: ../../c-api/typeobj.rst:665 ../../c-api/typeobj.rst:746 -#: ../../c-api/typeobj.rst:787 ../../c-api/typeobj.rst:804 -#: ../../c-api/typeobj.rst:821 ../../c-api/typeobj.rst:839 -#: ../../c-api/typeobj.rst:863 ../../c-api/typeobj.rst:880 -#: ../../c-api/typeobj.rst:892 ../../c-api/typeobj.rst:904 -#: ../../c-api/typeobj.rst:937 ../../c-api/typeobj.rst:959 -#: ../../c-api/typeobj.rst:979 ../../c-api/typeobj.rst:1000 -#: ../../c-api/typeobj.rst:1026 ../../c-api/typeobj.rst:1045 -#: ../../c-api/typeobj.rst:1061 ../../c-api/typeobj.rst:1101 -#: ../../c-api/typeobj.rst:1112 ../../c-api/typeobj.rst:1122 -#: ../../c-api/typeobj.rst:1132 ../../c-api/typeobj.rst:1146 -#: ../../c-api/typeobj.rst:1164 ../../c-api/typeobj.rst:1187 -#: ../../c-api/typeobj.rst:1205 ../../c-api/typeobj.rst:1218 -#: ../../c-api/typeobj.rst:1240 ../../c-api/typeobj.rst:1284 -#: ../../c-api/typeobj.rst:1305 ../../c-api/typeobj.rst:1324 -#: ../../c-api/typeobj.rst:1354 ../../c-api/typeobj.rst:1376 -#: ../../c-api/typeobj.rst:1402 ../../c-api/typeobj.rst:1488 -#: ../../c-api/typeobj.rst:1563 ../../c-api/typeobj.rst:1624 -#: ../../c-api/typeobj.rst:1660 ../../c-api/typeobj.rst:1685 -#: ../../c-api/typeobj.rst:1708 ../../c-api/typeobj.rst:1721 -#: ../../c-api/typeobj.rst:1736 ../../c-api/typeobj.rst:1750 -#: ../../c-api/typeobj.rst:1780 ../../c-api/typeobj.rst:1812 -#: ../../c-api/typeobj.rst:1838 ../../c-api/typeobj.rst:1856 -#: ../../c-api/typeobj.rst:1885 ../../c-api/typeobj.rst:1929 -#: ../../c-api/typeobj.rst:1946 ../../c-api/typeobj.rst:1987 -#: ../../c-api/typeobj.rst:2009 ../../c-api/typeobj.rst:2041 -#: ../../c-api/typeobj.rst:2069 ../../c-api/typeobj.rst:2082 -#: ../../c-api/typeobj.rst:2092 ../../c-api/typeobj.rst:2109 -#: ../../c-api/typeobj.rst:2126 ../../c-api/typeobj.rst:2140 -#: ../../c-api/typeobj.rst:2173 ../../c-api/typeobj.rst:2225 +#: ../../c-api/typeobj.rst:665 ../../c-api/typeobj.rst:807 +#: ../../c-api/typeobj.rst:852 ../../c-api/typeobj.rst:869 +#: ../../c-api/typeobj.rst:886 ../../c-api/typeobj.rst:904 +#: ../../c-api/typeobj.rst:928 ../../c-api/typeobj.rst:945 +#: ../../c-api/typeobj.rst:957 ../../c-api/typeobj.rst:969 +#: ../../c-api/typeobj.rst:1002 ../../c-api/typeobj.rst:1024 +#: ../../c-api/typeobj.rst:1044 ../../c-api/typeobj.rst:1065 +#: ../../c-api/typeobj.rst:1091 ../../c-api/typeobj.rst:1110 +#: ../../c-api/typeobj.rst:1126 ../../c-api/typeobj.rst:1166 +#: ../../c-api/typeobj.rst:1177 ../../c-api/typeobj.rst:1187 +#: ../../c-api/typeobj.rst:1197 ../../c-api/typeobj.rst:1211 +#: ../../c-api/typeobj.rst:1229 ../../c-api/typeobj.rst:1252 +#: ../../c-api/typeobj.rst:1270 ../../c-api/typeobj.rst:1283 +#: ../../c-api/typeobj.rst:1305 ../../c-api/typeobj.rst:1349 +#: ../../c-api/typeobj.rst:1370 ../../c-api/typeobj.rst:1389 +#: ../../c-api/typeobj.rst:1419 ../../c-api/typeobj.rst:1441 +#: ../../c-api/typeobj.rst:1467 ../../c-api/typeobj.rst:1558 +#: ../../c-api/typeobj.rst:1702 ../../c-api/typeobj.rst:1767 +#: ../../c-api/typeobj.rst:1803 ../../c-api/typeobj.rst:1828 +#: ../../c-api/typeobj.rst:1851 ../../c-api/typeobj.rst:1864 +#: ../../c-api/typeobj.rst:1879 ../../c-api/typeobj.rst:1893 +#: ../../c-api/typeobj.rst:1923 ../../c-api/typeobj.rst:1955 +#: ../../c-api/typeobj.rst:1981 ../../c-api/typeobj.rst:1999 +#: ../../c-api/typeobj.rst:2028 ../../c-api/typeobj.rst:2072 +#: ../../c-api/typeobj.rst:2089 ../../c-api/typeobj.rst:2129 +#: ../../c-api/typeobj.rst:2152 ../../c-api/typeobj.rst:2190 +#: ../../c-api/typeobj.rst:2218 ../../c-api/typeobj.rst:2231 +#: ../../c-api/typeobj.rst:2241 ../../c-api/typeobj.rst:2258 +#: ../../c-api/typeobj.rst:2275 ../../c-api/typeobj.rst:2289 +#: ../../c-api/typeobj.rst:2431 ../../c-api/typeobj.rst:2489 msgid "**Inheritance:**" msgstr "" -#: ../../c-api/typeobj.rst:505 ../../c-api/typeobj.rst:545 +#: ../../c-api/typeobj.rst:506 ../../c-api/typeobj.rst:545 #: ../../c-api/typeobj.rst:589 msgid "This field is not inherited by subtypes." msgstr "" -#: ../../c-api/typeobj.rst:510 +#: ../../c-api/typeobj.rst:509 +msgid ":c:member:`PyObject.ob_type`" +msgstr "" + +#: ../../c-api/typeobj.rst:511 msgid "" "This is the type's type, in other words its metatype. It is initialized by " "the argument to the ``PyObject_HEAD_INIT`` macro, and its value should " @@ -1357,11 +1375,11 @@ msgid "" "doing anything else. This is typically done like this::" msgstr "" -#: ../../c-api/typeobj.rst:519 +#: ../../c-api/typeobj.rst:520 msgid "Foo_Type.ob_type = &PyType_Type;" msgstr "" -#: ../../c-api/typeobj.rst:521 +#: ../../c-api/typeobj.rst:522 msgid "" "This should be done before any instances of the type are created. :c:func:" "`PyType_Ready` checks if :c:member:`~PyObject.ob_type` is ``NULL``, and if " @@ -1369,30 +1387,32 @@ msgid "" "class. :c:func:`PyType_Ready` will not change this field if it is non-zero." msgstr "" -#: ../../c-api/typeobj.rst:528 ../../c-api/typeobj.rst:748 -#: ../../c-api/typeobj.rst:865 ../../c-api/typeobj.rst:961 -#: ../../c-api/typeobj.rst:981 ../../c-api/typeobj.rst:1687 -#: ../../c-api/typeobj.rst:1710 ../../c-api/typeobj.rst:1840 -#: ../../c-api/typeobj.rst:1858 ../../c-api/typeobj.rst:1931 -#: ../../c-api/typeobj.rst:2043 ../../c-api/typeobj.rst:2175 +#: ../../c-api/typeobj.rst:529 ../../c-api/typeobj.rst:809 +#: ../../c-api/typeobj.rst:930 ../../c-api/typeobj.rst:1026 +#: ../../c-api/typeobj.rst:1046 ../../c-api/typeobj.rst:1830 +#: ../../c-api/typeobj.rst:1853 ../../c-api/typeobj.rst:1983 +#: ../../c-api/typeobj.rst:2001 ../../c-api/typeobj.rst:2074 +#: ../../c-api/typeobj.rst:2192 ../../c-api/typeobj.rst:2433 msgid "This field is inherited by subtypes." msgstr "" -#: ../../c-api/typeobj.rst:532 +#: ../../c-api/typeobj.rst:533 msgid "PyVarObject Slots" msgstr "" -#: ../../c-api/typeobj.rst:536 +#: ../../c-api/typeobj.rst:535 +msgid ":c:member:`PyVarObject.ob_size`" +msgstr "" + +#: ../../c-api/typeobj.rst:537 msgid "" "For :ref:`statically allocated type objects `, this should be " "initialized to zero. For :ref:`dynamically allocated type objects `, this field has a special internal meaning." msgstr "" -#: ../../c-api/typeobj.rst:540 -msgid "" -"This field should be accessed using the :c:func:`Py_SIZE()` and :c:func:" -"`Py_SET_SIZE()` macros." +#: ../../c-api/typeobj.rst:541 +msgid "This field should be accessed using the :c:func:`Py_SIZE()` macro." msgstr "" #: ../../c-api/typeobj.rst:549 @@ -1575,108 +1595,210 @@ msgstr "" #: ../../c-api/typeobj.rst:679 msgid "" -"A pointer to the instance destructor function. This function must be " -"defined unless the type guarantees that its instances will never be " -"deallocated (as is the case for the singletons ``None`` and ``Ellipsis``). " -"The function signature is::" +"A pointer to the instance destructor function. The function signature is::" msgstr "" -#: ../../c-api/typeobj.rst:683 +#: ../../c-api/typeobj.rst:681 msgid "void tp_dealloc(PyObject *self);" msgstr "" -#: ../../c-api/typeobj.rst:685 +#: ../../c-api/typeobj.rst:683 msgid "" -"The destructor function is called by the :c:func:`Py_DECREF` and :c:func:" -"`Py_XDECREF` macros when the new reference count is zero. At this point, " -"the instance is still in existence, but there are no references to it. The " -"destructor function should free all references which the instance owns, free " -"all memory buffers owned by the instance (using the freeing function " -"corresponding to the allocation function used to allocate the buffer), and " -"call the type's :c:member:`~PyTypeObject.tp_free` function. If the type is " -"not subtypable (doesn't have the :c:macro:`Py_TPFLAGS_BASETYPE` flag bit " -"set), it is permissible to call the object deallocator directly instead of " -"via :c:member:`~PyTypeObject.tp_free`. The object deallocator should be the " -"one used to allocate the instance; this is normally :c:func:`PyObject_Free` " -"if the instance was allocated using :c:macro:`PyObject_New` or :c:macro:" -"`PyObject_NewVar`, or :c:func:`PyObject_GC_Del` if the instance was " -"allocated using :c:macro:`PyObject_GC_New` or :c:macro:`PyObject_GC_NewVar`." +"The destructor function should remove all references which the instance owns " +"(e.g., call :c:func:`Py_CLEAR`), free all memory buffers owned by the " +"instance, and call the type's :c:member:`~PyTypeObject.tp_free` function to " +"free the object itself." msgstr "" -#: ../../c-api/typeobj.rst:700 +#: ../../c-api/typeobj.rst:688 msgid "" -"If the type supports garbage collection (has the :c:macro:" -"`Py_TPFLAGS_HAVE_GC` flag bit set), the destructor should call :c:func:" -"`PyObject_GC_UnTrack` before clearing any member fields." +"If you may call functions that may set the error indicator, you must use :c:" +"func:`PyErr_GetRaisedException` and :c:func:`PyErr_SetRaisedException` to " +"ensure you don't clobber a preexisting error indicator (the deallocation " +"could have occurred while processing a different error):" msgstr "" -#: ../../c-api/typeobj.rst:704 +#: ../../c-api/typeobj.rst:693 msgid "" "static void\n" -"foo_dealloc(PyObject *op)\n" +"foo_dealloc(foo_object *self)\n" "{\n" -" foo_object *self = (foo_object *) op;\n" -" PyObject_GC_UnTrack(self);\n" -" Py_CLEAR(self->ref);\n" -" Py_TYPE(self)->tp_free(self);\n" +" PyObject *et, *ev, *etb;\n" +" PyObject *exc = PyErr_GetRaisedException();\n" +" ...\n" +" PyErr_SetRaisedException(exc);\n" "}" msgstr "" -#: ../../c-api/typeobj.rst:715 +#: ../../c-api/typeobj.rst:704 +msgid "" +"The dealloc handler itself must not raise an exception; if it hits an error " +"case it should call :c:func:`PyErr_FormatUnraisable` to log (and clear) an " +"unraisable exception." +msgstr "" + +#: ../../c-api/typeobj.rst:708 +msgid "No guarantees are made about when an object is destroyed, except:" +msgstr "" + +#: ../../c-api/typeobj.rst:710 +msgid "" +"Python will destroy an object immediately or some time after the final " +"reference to the object is deleted, unless its finalizer (:c:member:" +"`~PyTypeObject.tp_finalize`) subsequently resurrects the object." +msgstr "" + +#: ../../c-api/typeobj.rst:714 +msgid "" +"An object will not be destroyed while it is being automatically finalized (:" +"c:member:`~PyTypeObject.tp_finalize`) or automatically cleared (:c:member:" +"`~PyTypeObject.tp_clear`)." +msgstr "" + +#: ../../c-api/typeobj.rst:718 +msgid "" +"CPython currently destroys an object immediately from :c:func:`Py_DECREF` " +"when the new reference count is zero, but this may change in a future " +"version." +msgstr "" + +#: ../../c-api/typeobj.rst:722 +msgid "" +"It is recommended to call :c:func:`PyObject_CallFinalizerFromDealloc` at the " +"beginning of :c:member:`!tp_dealloc` to guarantee that the object is always " +"finalized before destruction." +msgstr "" + +#: ../../c-api/typeobj.rst:726 +msgid "" +"If the type supports garbage collection (the :c:macro:`Py_TPFLAGS_HAVE_GC` " +"flag is set), the destructor should call :c:func:`PyObject_GC_UnTrack` " +"before clearing any member fields." +msgstr "" + +#: ../../c-api/typeobj.rst:730 msgid "" -"Finally, if the type is heap allocated (:c:macro:`Py_TPFLAGS_HEAPTYPE`), the " +"It is permissible to call :c:member:`~PyTypeObject.tp_clear` from :c:member:" +"`!tp_dealloc` to reduce code duplication and to guarantee that the object is " +"always cleared before destruction. Beware that :c:member:`!tp_clear` might " +"have already been called." +msgstr "" + +#: ../../c-api/typeobj.rst:735 +msgid "" +"If the type is heap allocated (:c:macro:`Py_TPFLAGS_HEAPTYPE`), the " "deallocator should release the owned reference to its type object (via :c:" -"func:`Py_DECREF`) after calling the type deallocator. In order to avoid " -"dangling pointers, the recommended way to achieve this is:" +"func:`Py_DECREF`) after calling the type deallocator. See the example code " +"below.::" msgstr "" -#: ../../c-api/typeobj.rst:721 +#: ../../c-api/typeobj.rst:740 msgid "" "static void\n" "foo_dealloc(PyObject *op)\n" "{\n" -" PyTypeObject *tp = Py_TYPE(op);\n" -" // free references and buffers here\n" -" tp->tp_free(op);\n" -" Py_DECREF(tp);\n" +" foo_object *self = (foo_object *) op;\n" +" PyObject_GC_UnTrack(self);\n" +" Py_CLEAR(self->ref);\n" +" Py_TYPE(self)->tp_free(self);\n" "}" msgstr "" -#: ../../c-api/typeobj.rst:734 +#: ../../c-api/typeobj.rst:749 msgid "" -"In a garbage collected Python, :c:member:`!tp_dealloc` may be called from " -"any Python thread, not just the thread which created the object (if the " -"object becomes part of a refcount cycle, that cycle might be collected by a " -"garbage collection on any thread). This is not a problem for Python API " -"calls, since the thread on which :c:member:`!tp_dealloc` is called with an :" -"term:`attached thread state`. However, if the object being destroyed in " -"turn destroys objects from some other C or C++ library, care should be taken " -"to ensure that destroying those objects on the thread which called :c:member:" -"`!tp_dealloc` will not violate any assumptions of the library." +":c:member:`!tp_dealloc` must leave the exception status unchanged. If it " +"needs to call something that might raise an exception, the exception state " +"must be backed up first and restored later (after logging any exceptions " +"with :c:func:`PyErr_WriteUnraisable`)." +msgstr "" + +#: ../../c-api/typeobj.rst:754 +msgid "Example::" +msgstr "" + +#: ../../c-api/typeobj.rst:756 +msgid "" +"static void\n" +"foo_dealloc(PyObject *self)\n" +"{\n" +" PyObject *exc = PyErr_GetRaisedException();\n" +"\n" +" if (PyObject_CallFinalizerFromDealloc(self) < 0) {\n" +" // self was resurrected.\n" +" goto done;\n" +" }\n" +"\n" +" PyTypeObject *tp = Py_TYPE(self);\n" +"\n" +" if (tp->tp_flags & Py_TPFLAGS_HAVE_GC) {\n" +" PyObject_GC_UnTrack(self);\n" +" }\n" +"\n" +" // Optional, but convenient to avoid code duplication.\n" +" if (tp->tp_clear && tp->tp_clear(self) < 0) {\n" +" PyErr_WriteUnraisable(self);\n" +" }\n" +"\n" +" // Any additional destruction goes here.\n" +"\n" +" tp->tp_free(self);\n" +" self = NULL; // In case PyErr_WriteUnraisable() is called below.\n" +"\n" +" if (tp->tp_flags & Py_TPFLAGS_HEAPTYPE) {\n" +" Py_CLEAR(tp);\n" +" }\n" +"\n" +"done:\n" +" // Optional, if something was called that might have raised an\n" +" // exception.\n" +" if (PyErr_Occurred()) {\n" +" PyErr_WriteUnraisable(self);\n" +" }\n" +" PyErr_SetRaisedException(exc);\n" +"}" msgstr "" -#: ../../c-api/typeobj.rst:753 +#: ../../c-api/typeobj.rst:795 +msgid "" +":c:member:`!tp_dealloc` may be called from any Python thread, not just the " +"thread which created the object (if the object becomes part of a refcount " +"cycle, that cycle might be collected by a garbage collection on any " +"thread). This is not a problem for Python API calls, since the thread on " +"which :c:member:`!tp_dealloc` is called with an :term:`attached thread " +"state`. However, if the object being destroyed in turn destroys objects " +"from some other C library, care should be taken to ensure that destroying " +"those objects on the thread which called :c:member:`!tp_dealloc` will not " +"violate any assumptions of the library." +msgstr "" + +#: ../../c-api/typeobj.rst:813 ../../c-api/typeobj.rst:1713 +#: ../../c-api/typeobj.rst:2446 +msgid "" +":ref:`life-cycle` for details about how this slot relates to other slots." +msgstr "" + +#: ../../c-api/typeobj.rst:818 msgid "" "An optional offset to a per-instance function that implements calling the " "object using the :ref:`vectorcall protocol `, a more efficient " "alternative of the simpler :c:member:`~PyTypeObject.tp_call`." msgstr "" -#: ../../c-api/typeobj.rst:758 +#: ../../c-api/typeobj.rst:823 msgid "" "This field is only used if the flag :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` is " "set. If so, this must be a positive integer containing the offset in the " "instance of a :c:type:`vectorcallfunc` pointer." msgstr "" -#: ../../c-api/typeobj.rst:762 +#: ../../c-api/typeobj.rst:827 msgid "" "The *vectorcallfunc* pointer may be ``NULL``, in which case the instance " "behaves as if :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` was not set: calling the " "instance falls back to :c:member:`~PyTypeObject.tp_call`." msgstr "" -#: ../../c-api/typeobj.rst:766 +#: ../../c-api/typeobj.rst:831 msgid "" "Any class that sets ``Py_TPFLAGS_HAVE_VECTORCALL`` must also set :c:member:" "`~PyTypeObject.tp_call` and make sure its behaviour is consistent with the " @@ -1684,13 +1806,13 @@ msgid "" "`PyVectorcall_Call`." msgstr "" -#: ../../c-api/typeobj.rst:773 +#: ../../c-api/typeobj.rst:838 msgid "" "Before version 3.8, this slot was named ``tp_print``. In Python 2.x, it was " "used for printing to a file. In Python 3.0 to 3.7, it was unused." msgstr "" -#: ../../c-api/typeobj.rst:779 +#: ../../c-api/typeobj.rst:844 msgid "" "Before version 3.12, it was not recommended for :ref:`mutable heap types " "` to implement the vectorcall protocol. When a user sets :attr:" @@ -1700,7 +1822,7 @@ msgid "" "`Py_TPFLAGS_HAVE_VECTORCALL` flag." msgstr "" -#: ../../c-api/typeobj.rst:789 +#: ../../c-api/typeobj.rst:854 msgid "" "This field is always inherited. However, the :c:macro:" "`Py_TPFLAGS_HAVE_VECTORCALL` flag is not always inherited. If it's not set, " @@ -1708,11 +1830,11 @@ msgid "" "func:`PyVectorcall_Call` is explicitly called." msgstr "" -#: ../../c-api/typeobj.rst:798 +#: ../../c-api/typeobj.rst:863 msgid "An optional pointer to the get-attribute-string function." msgstr "" -#: ../../c-api/typeobj.rst:800 +#: ../../c-api/typeobj.rst:865 msgid "" "This field is deprecated. When it is defined, it should point to a function " "that acts the same as the :c:member:`~PyTypeObject.tp_getattro` function, " @@ -1720,13 +1842,13 @@ msgid "" "attribute name." msgstr "" -#: ../../c-api/typeobj.rst:806 ../../c-api/typeobj.rst:1002 +#: ../../c-api/typeobj.rst:871 ../../c-api/typeobj.rst:1067 msgid "" "Group: :c:member:`~PyTypeObject.tp_getattr`, :c:member:`~PyTypeObject." "tp_getattro`" msgstr "" -#: ../../c-api/typeobj.rst:808 +#: ../../c-api/typeobj.rst:873 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_getattro`: a subtype inherits both :c:member:`~PyTypeObject.tp_getattr` " @@ -1735,12 +1857,12 @@ msgid "" "tp_getattro` are both ``NULL``." msgstr "" -#: ../../c-api/typeobj.rst:815 ../../c-api/typeobj.rst:1015 +#: ../../c-api/typeobj.rst:880 ../../c-api/typeobj.rst:1080 msgid "" "An optional pointer to the function for setting and deleting attributes." msgstr "" -#: ../../c-api/typeobj.rst:817 +#: ../../c-api/typeobj.rst:882 msgid "" "This field is deprecated. When it is defined, it should point to a function " "that acts the same as the :c:member:`~PyTypeObject.tp_setattro` function, " @@ -1748,13 +1870,13 @@ msgid "" "attribute name." msgstr "" -#: ../../c-api/typeobj.rst:823 ../../c-api/typeobj.rst:1028 +#: ../../c-api/typeobj.rst:888 ../../c-api/typeobj.rst:1093 msgid "" "Group: :c:member:`~PyTypeObject.tp_setattr`, :c:member:`~PyTypeObject." "tp_setattro`" msgstr "" -#: ../../c-api/typeobj.rst:825 +#: ../../c-api/typeobj.rst:890 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_setattro`: a subtype inherits both :c:member:`~PyTypeObject.tp_setattr` " @@ -1763,38 +1885,38 @@ msgid "" "tp_setattro` are both ``NULL``." msgstr "" -#: ../../c-api/typeobj.rst:832 +#: ../../c-api/typeobj.rst:897 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement :term:`awaitable` and :term:`asynchronous iterator` " "protocols at the C-level. See :ref:`async-structs` for details." msgstr "" -#: ../../c-api/typeobj.rst:836 +#: ../../c-api/typeobj.rst:901 msgid "Formerly known as ``tp_compare`` and ``tp_reserved``." msgstr "" -#: ../../c-api/typeobj.rst:841 +#: ../../c-api/typeobj.rst:906 msgid "" "The :c:member:`~PyTypeObject.tp_as_async` field is not inherited, but the " "contained fields are inherited individually." msgstr "" -#: ../../c-api/typeobj.rst:849 +#: ../../c-api/typeobj.rst:914 msgid "" "An optional pointer to a function that implements the built-in function :" "func:`repr`." msgstr "" -#: ../../c-api/typeobj.rst:852 +#: ../../c-api/typeobj.rst:917 msgid "The signature is the same as for :c:func:`PyObject_Repr`::" msgstr "" -#: ../../c-api/typeobj.rst:854 +#: ../../c-api/typeobj.rst:919 msgid "PyObject *tp_repr(PyObject *self);" msgstr "" -#: ../../c-api/typeobj.rst:856 +#: ../../c-api/typeobj.rst:921 msgid "" "The function must return a string or a Unicode object. Ideally, this " "function should return a string that, when passed to :func:`eval`, given a " @@ -1803,85 +1925,85 @@ msgid "" "``'>'`` from which both the type and the value of the object can be deduced." msgstr "" -#: ../../c-api/typeobj.rst:867 ../../c-api/typeobj.rst:946 -#: ../../c-api/typeobj.rst:983 ../../c-api/typeobj.rst:1008 -#: ../../c-api/typeobj.rst:1034 ../../c-api/typeobj.rst:1076 -#: ../../c-api/typeobj.rst:1633 ../../c-api/typeobj.rst:1667 -#: ../../c-api/typeobj.rst:1784 ../../c-api/typeobj.rst:1817 -#: ../../c-api/typeobj.rst:1892 ../../c-api/typeobj.rst:1933 -#: ../../c-api/typeobj.rst:1951 ../../c-api/typeobj.rst:1993 -#: ../../c-api/typeobj.rst:2014 ../../c-api/typeobj.rst:2045 +#: ../../c-api/typeobj.rst:932 ../../c-api/typeobj.rst:1011 +#: ../../c-api/typeobj.rst:1048 ../../c-api/typeobj.rst:1073 +#: ../../c-api/typeobj.rst:1099 ../../c-api/typeobj.rst:1141 +#: ../../c-api/typeobj.rst:1776 ../../c-api/typeobj.rst:1810 +#: ../../c-api/typeobj.rst:1927 ../../c-api/typeobj.rst:1960 +#: ../../c-api/typeobj.rst:2035 ../../c-api/typeobj.rst:2076 +#: ../../c-api/typeobj.rst:2096 ../../c-api/typeobj.rst:2135 +#: ../../c-api/typeobj.rst:2163 ../../c-api/typeobj.rst:2194 msgid "**Default:**" msgstr "" -#: ../../c-api/typeobj.rst:869 +#: ../../c-api/typeobj.rst:934 msgid "" "When this field is not set, a string of the form ``<%s object at %p>`` is " "returned, where ``%s`` is replaced by the type name, and ``%p`` by the " "object's memory address." msgstr "" -#: ../../c-api/typeobj.rst:876 +#: ../../c-api/typeobj.rst:941 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement the number protocol. These fields are documented " "in :ref:`number-structs`." msgstr "" -#: ../../c-api/typeobj.rst:882 +#: ../../c-api/typeobj.rst:947 msgid "" "The :c:member:`~PyTypeObject.tp_as_number` field is not inherited, but the " "contained fields are inherited individually." msgstr "" -#: ../../c-api/typeobj.rst:888 +#: ../../c-api/typeobj.rst:953 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement the sequence protocol. These fields are documented " "in :ref:`sequence-structs`." msgstr "" -#: ../../c-api/typeobj.rst:894 +#: ../../c-api/typeobj.rst:959 msgid "" "The :c:member:`~PyTypeObject.tp_as_sequence` field is not inherited, but the " "contained fields are inherited individually." msgstr "" -#: ../../c-api/typeobj.rst:900 +#: ../../c-api/typeobj.rst:965 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement the mapping protocol. These fields are documented " "in :ref:`mapping-structs`." msgstr "" -#: ../../c-api/typeobj.rst:906 +#: ../../c-api/typeobj.rst:971 msgid "" "The :c:member:`~PyTypeObject.tp_as_mapping` field is not inherited, but the " "contained fields are inherited individually." msgstr "" -#: ../../c-api/typeobj.rst:914 +#: ../../c-api/typeobj.rst:979 msgid "" "An optional pointer to a function that implements the built-in function :" "func:`hash`." msgstr "" -#: ../../c-api/typeobj.rst:917 +#: ../../c-api/typeobj.rst:982 msgid "The signature is the same as for :c:func:`PyObject_Hash`::" msgstr "" -#: ../../c-api/typeobj.rst:919 +#: ../../c-api/typeobj.rst:984 msgid "Py_hash_t tp_hash(PyObject *);" msgstr "" -#: ../../c-api/typeobj.rst:921 +#: ../../c-api/typeobj.rst:986 msgid "" "The value ``-1`` should not be returned as a normal return value; when an " "error occurs during the computation of the hash value, the function should " "set an exception and return ``-1``." msgstr "" -#: ../../c-api/typeobj.rst:925 +#: ../../c-api/typeobj.rst:990 msgid "" "When this field is not set (*and* :c:member:`~PyTypeObject.tp_richcompare` " "is not set), an attempt to take the hash of the object raises :exc:" @@ -1889,7 +2011,7 @@ msgid "" "`PyObject_HashNotImplemented`." msgstr "" -#: ../../c-api/typeobj.rst:929 +#: ../../c-api/typeobj.rst:994 msgid "" "This field can be set explicitly to :c:func:`PyObject_HashNotImplemented` to " "block inheritance of the hash method from a parent type. This is interpreted " @@ -1900,13 +2022,13 @@ msgid "" "`PyObject_HashNotImplemented`." msgstr "" -#: ../../c-api/typeobj.rst:939 ../../c-api/typeobj.rst:1626 +#: ../../c-api/typeobj.rst:1004 ../../c-api/typeobj.rst:1769 msgid "" "Group: :c:member:`~PyTypeObject.tp_hash`, :c:member:`~PyTypeObject." "tp_richcompare`" msgstr "" -#: ../../c-api/typeobj.rst:941 +#: ../../c-api/typeobj.rst:1006 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_richcompare`: a subtype inherits both of :c:member:`~PyTypeObject." @@ -1915,22 +2037,22 @@ msgid "" "are both ``NULL``." msgstr "" -#: ../../c-api/typeobj.rst:948 +#: ../../c-api/typeobj.rst:1013 msgid ":c:data:`PyBaseObject_Type` uses :c:func:`PyObject_GenericHash`." msgstr "" -#: ../../c-api/typeobj.rst:953 +#: ../../c-api/typeobj.rst:1018 msgid "" "An optional pointer to a function that implements calling the object. This " "should be ``NULL`` if the object is not callable. The signature is the same " "as for :c:func:`PyObject_Call`::" msgstr "" -#: ../../c-api/typeobj.rst:957 +#: ../../c-api/typeobj.rst:1022 msgid "PyObject *tp_call(PyObject *self, PyObject *args, PyObject *kwargs);" msgstr "" -#: ../../c-api/typeobj.rst:966 +#: ../../c-api/typeobj.rst:1031 msgid "" "An optional pointer to a function that implements the built-in operation :" "func:`str`. (Note that :class:`str` is a type now, and :func:`str` calls " @@ -1939,15 +2061,15 @@ msgid "" "this handler.)" msgstr "" -#: ../../c-api/typeobj.rst:971 +#: ../../c-api/typeobj.rst:1036 msgid "The signature is the same as for :c:func:`PyObject_Str`::" msgstr "" -#: ../../c-api/typeobj.rst:973 +#: ../../c-api/typeobj.rst:1038 msgid "PyObject *tp_str(PyObject *self);" msgstr "" -#: ../../c-api/typeobj.rst:975 +#: ../../c-api/typeobj.rst:1040 msgid "" "The function must return a string or a Unicode object. It should be a " "\"friendly\" string representation of the object, as this is the " @@ -1955,32 +2077,32 @@ msgid "" "function." msgstr "" -#: ../../c-api/typeobj.rst:985 +#: ../../c-api/typeobj.rst:1050 msgid "" "When this field is not set, :c:func:`PyObject_Repr` is called to return a " "string representation." msgstr "" -#: ../../c-api/typeobj.rst:991 +#: ../../c-api/typeobj.rst:1056 msgid "An optional pointer to the get-attribute function." msgstr "" -#: ../../c-api/typeobj.rst:993 +#: ../../c-api/typeobj.rst:1058 msgid "The signature is the same as for :c:func:`PyObject_GetAttr`::" msgstr "" -#: ../../c-api/typeobj.rst:995 +#: ../../c-api/typeobj.rst:1060 msgid "PyObject *tp_getattro(PyObject *self, PyObject *attr);" msgstr "" -#: ../../c-api/typeobj.rst:997 +#: ../../c-api/typeobj.rst:1062 msgid "" "It is usually convenient to set this field to :c:func:" "`PyObject_GenericGetAttr`, which implements the normal way of looking for " "object attributes." msgstr "" -#: ../../c-api/typeobj.rst:1004 +#: ../../c-api/typeobj.rst:1069 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_getattr`: a subtype inherits both :c:member:`~PyTypeObject.tp_getattr` " @@ -1989,19 +2111,19 @@ msgid "" "tp_getattro` are both ``NULL``." msgstr "" -#: ../../c-api/typeobj.rst:1010 +#: ../../c-api/typeobj.rst:1075 msgid ":c:data:`PyBaseObject_Type` uses :c:func:`PyObject_GenericGetAttr`." msgstr "" -#: ../../c-api/typeobj.rst:1017 +#: ../../c-api/typeobj.rst:1082 msgid "The signature is the same as for :c:func:`PyObject_SetAttr`::" msgstr "" -#: ../../c-api/typeobj.rst:1019 +#: ../../c-api/typeobj.rst:1084 msgid "int tp_setattro(PyObject *self, PyObject *attr, PyObject *value);" msgstr "" -#: ../../c-api/typeobj.rst:1021 +#: ../../c-api/typeobj.rst:1086 msgid "" "In addition, setting *value* to ``NULL`` to delete an attribute must be " "supported. It is usually convenient to set this field to :c:func:" @@ -2009,7 +2131,7 @@ msgid "" "attributes." msgstr "" -#: ../../c-api/typeobj.rst:1030 +#: ../../c-api/typeobj.rst:1095 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_setattr`: a subtype inherits both :c:member:`~PyTypeObject.tp_setattr` " @@ -2018,24 +2140,24 @@ msgid "" "tp_setattro` are both ``NULL``." msgstr "" -#: ../../c-api/typeobj.rst:1036 +#: ../../c-api/typeobj.rst:1101 msgid ":c:data:`PyBaseObject_Type` uses :c:func:`PyObject_GenericSetAttr`." msgstr "" -#: ../../c-api/typeobj.rst:1041 +#: ../../c-api/typeobj.rst:1106 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement the buffer interface. These fields are documented " "in :ref:`buffer-structs`." msgstr "" -#: ../../c-api/typeobj.rst:1047 +#: ../../c-api/typeobj.rst:1112 msgid "" "The :c:member:`~PyTypeObject.tp_as_buffer` field is not inherited, but the " "contained fields are inherited individually." msgstr "" -#: ../../c-api/typeobj.rst:1053 +#: ../../c-api/typeobj.rst:1118 msgid "" "This field is a bit mask of various flags. Some flags indicate variant " "semantics for certain situations; others are used to indicate that certain " @@ -2047,7 +2169,7 @@ msgid "" "accessed and must be considered to have a zero or ``NULL`` value instead." msgstr "" -#: ../../c-api/typeobj.rst:1063 +#: ../../c-api/typeobj.rst:1128 msgid "" "Inheritance of this field is complicated. Most flag bits are inherited " "individually, i.e. if the base type has a flag bit set, the subtype inherits " @@ -2062,17 +2184,17 @@ msgid "" "the subtype exist and have ``NULL`` values." msgstr "" -#: ../../c-api/typeobj.rst:1078 +#: ../../c-api/typeobj.rst:1143 msgid "" ":c:data:`PyBaseObject_Type` uses ``Py_TPFLAGS_DEFAULT | " "Py_TPFLAGS_BASETYPE``." msgstr "" -#: ../../c-api/typeobj.rst:1081 +#: ../../c-api/typeobj.rst:1146 msgid "**Bit Masks:**" msgstr "" -#: ../../c-api/typeobj.rst:1085 +#: ../../c-api/typeobj.rst:1150 msgid "" "The following bit masks are currently defined; these can be ORed together " "using the ``|`` operator to form the value of the :c:member:`~PyTypeObject." @@ -2081,7 +2203,7 @@ msgid "" "zero." msgstr "" -#: ../../c-api/typeobj.rst:1092 +#: ../../c-api/typeobj.rst:1157 msgid "" "This bit is set when the type object itself is allocated on the heap, for " "example, types created dynamically using :c:func:`PyType_FromSpec`. In this " @@ -2094,49 +2216,49 @@ msgid "" "reference cycle with their own module object." msgstr "" -#: ../../c-api/typeobj.rst:1103 ../../c-api/typeobj.rst:1114 -#: ../../c-api/typeobj.rst:1124 ../../c-api/typeobj.rst:1134 -#: ../../c-api/typeobj.rst:1166 +#: ../../c-api/typeobj.rst:1168 ../../c-api/typeobj.rst:1179 +#: ../../c-api/typeobj.rst:1189 ../../c-api/typeobj.rst:1199 +#: ../../c-api/typeobj.rst:1231 msgid "???" msgstr "" -#: ../../c-api/typeobj.rst:1108 +#: ../../c-api/typeobj.rst:1173 msgid "" "This bit is set when the type can be used as the base type of another type. " "If this bit is clear, the type cannot be subtyped (similar to a \"final\" " "class in Java)." msgstr "" -#: ../../c-api/typeobj.rst:1119 +#: ../../c-api/typeobj.rst:1184 msgid "" "This bit is set when the type object has been fully initialized by :c:func:" "`PyType_Ready`." msgstr "" -#: ../../c-api/typeobj.rst:1129 +#: ../../c-api/typeobj.rst:1194 msgid "" "This bit is set while :c:func:`PyType_Ready` is in the process of " "initializing the type object." msgstr "" -#: ../../c-api/typeobj.rst:1139 +#: ../../c-api/typeobj.rst:1204 msgid "" "This bit is set when the object supports garbage collection. If this bit is " -"set, instances must be created using :c:macro:`PyObject_GC_New` and " -"destroyed using :c:func:`PyObject_GC_Del`. More information in section :ref:" -"`supporting-cycle-detection`. This bit also implies that the GC-related " -"fields :c:member:`~PyTypeObject.tp_traverse` and :c:member:`~PyTypeObject." -"tp_clear` are present in the type object." +"set, memory for new instances (see :c:member:`~PyTypeObject.tp_alloc`) must " +"be allocated using :c:macro:`PyObject_GC_New` or :c:func:" +"`PyType_GenericAlloc` and deallocated (see :c:member:`~PyTypeObject." +"tp_free`) using :c:func:`PyObject_GC_Del`. More information in section :ref:" +"`supporting-cycle-detection`." msgstr "" -#: ../../c-api/typeobj.rst:1148 ../../c-api/typeobj.rst:1490 -#: ../../c-api/typeobj.rst:1565 +#: ../../c-api/typeobj.rst:1213 ../../c-api/typeobj.rst:1560 +#: ../../c-api/typeobj.rst:1704 msgid "" "Group: :c:macro:`Py_TPFLAGS_HAVE_GC`, :c:member:`~PyTypeObject." "tp_traverse`, :c:member:`~PyTypeObject.tp_clear`" msgstr "" -#: ../../c-api/typeobj.rst:1150 +#: ../../c-api/typeobj.rst:1215 msgid "" "The :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is inherited together with the :c:" "member:`~PyTypeObject.tp_traverse` and :c:member:`~PyTypeObject.tp_clear` " @@ -2146,105 +2268,106 @@ msgid "" "values." msgstr "" -#: ../../c-api/typeobj.rst:1160 +#: ../../c-api/typeobj.rst:1225 msgid "" "This is a bitmask of all the bits that pertain to the existence of certain " "fields in the type object and its extension structures. Currently, it " "includes the following bits: :c:macro:`Py_TPFLAGS_HAVE_STACKLESS_EXTENSION`." msgstr "" -#: ../../c-api/typeobj.rst:1171 +#: ../../c-api/typeobj.rst:1236 msgid "This bit indicates that objects behave like unbound methods." msgstr "" -#: ../../c-api/typeobj.rst:1173 +#: ../../c-api/typeobj.rst:1238 msgid "If this flag is set for ``type(meth)``, then:" msgstr "" -#: ../../c-api/typeobj.rst:1175 +#: ../../c-api/typeobj.rst:1240 msgid "" "``meth.__get__(obj, cls)(*args, **kwds)`` (with ``obj`` not None) must be " "equivalent to ``meth(obj, *args, **kwds)``." msgstr "" -#: ../../c-api/typeobj.rst:1178 +#: ../../c-api/typeobj.rst:1243 msgid "" "``meth.__get__(None, cls)(*args, **kwds)`` must be equivalent to " "``meth(*args, **kwds)``." msgstr "" -#: ../../c-api/typeobj.rst:1181 +#: ../../c-api/typeobj.rst:1246 msgid "" "This flag enables an optimization for typical method calls like ``obj." "meth()``: it avoids creating a temporary \"bound method\" object for ``obj." "meth``." msgstr "" -#: ../../c-api/typeobj.rst:1189 +#: ../../c-api/typeobj.rst:1254 msgid "" "This flag is never inherited by types without the :c:macro:" "`Py_TPFLAGS_IMMUTABLETYPE` flag set. For extension types, it is inherited " "whenever :c:member:`~PyTypeObject.tp_descr_get` is inherited." msgstr "" -#: ../../c-api/typeobj.rst:1195 +#: ../../c-api/typeobj.rst:1260 msgid "" -"This bit indicates that instances of the class have a `~object.__dict__` " -"attribute, and that the space for the dictionary is managed by the VM." +"This bit indicates that instances of the class have a :attr:`~object." +"__dict__` attribute, and that the space for the dictionary is managed by the " +"VM." msgstr "" -#: ../../c-api/typeobj.rst:1198 +#: ../../c-api/typeobj.rst:1263 msgid "If this flag is set, :c:macro:`Py_TPFLAGS_HAVE_GC` should also be set." msgstr "" -#: ../../c-api/typeobj.rst:1200 +#: ../../c-api/typeobj.rst:1265 msgid "" "The type traverse function must call :c:func:`PyObject_VisitManagedDict` and " "its clear function must call :c:func:`PyObject_ClearManagedDict`." msgstr "" -#: ../../c-api/typeobj.rst:1207 +#: ../../c-api/typeobj.rst:1272 msgid "" "This flag is inherited unless the :c:member:`~PyTypeObject.tp_dictoffset` " "field is set in a superclass." msgstr "" -#: ../../c-api/typeobj.rst:1213 +#: ../../c-api/typeobj.rst:1278 msgid "" "This bit indicates that instances of the class should be weakly " "referenceable." msgstr "" -#: ../../c-api/typeobj.rst:1220 +#: ../../c-api/typeobj.rst:1285 msgid "" "This flag is inherited unless the :c:member:`~PyTypeObject." "tp_weaklistoffset` field is set in a superclass." msgstr "" -#: ../../c-api/typeobj.rst:1226 +#: ../../c-api/typeobj.rst:1291 msgid "" "Only usable with variable-size types, i.e. ones with non-zero :c:member:" "`~PyTypeObject.tp_itemsize`." msgstr "" -#: ../../c-api/typeobj.rst:1229 +#: ../../c-api/typeobj.rst:1294 msgid "" "Indicates that the variable-sized portion of an instance of this type is at " "the end of the instance's memory area, at an offset of ``Py_TYPE(obj)-" ">tp_basicsize`` (which may be different in each subclass)." msgstr "" -#: ../../c-api/typeobj.rst:1234 +#: ../../c-api/typeobj.rst:1299 msgid "" "When setting this flag, be sure that all superclasses either use this memory " "layout, or are not variable-sized. Python does not check this." msgstr "" -#: ../../c-api/typeobj.rst:1242 +#: ../../c-api/typeobj.rst:1307 msgid "This flag is inherited." msgstr "" -#: ../../c-api/typeobj.rst:1256 +#: ../../c-api/typeobj.rst:1321 msgid "" "These flags are used by functions such as :c:func:`PyLong_Check` to quickly " "determine if a type is a subclass of a built-in type; such specific checks " @@ -2254,90 +2377,90 @@ msgid "" "behave differently depending on what kind of check is used." msgstr "" -#: ../../c-api/typeobj.rst:1267 +#: ../../c-api/typeobj.rst:1332 msgid "" "This bit is set when the :c:member:`~PyTypeObject.tp_finalize` slot is " "present in the type structure." msgstr "" -#: ../../c-api/typeobj.rst:1272 +#: ../../c-api/typeobj.rst:1337 msgid "" "This flag isn't necessary anymore, as the interpreter assumes the :c:member:" "`~PyTypeObject.tp_finalize` slot is always present in the type structure." msgstr "" -#: ../../c-api/typeobj.rst:1280 +#: ../../c-api/typeobj.rst:1345 msgid "" "This bit is set when the class implements the :ref:`vectorcall protocol " "`. See :c:member:`~PyTypeObject.tp_vectorcall_offset` for " "details." msgstr "" -#: ../../c-api/typeobj.rst:1286 +#: ../../c-api/typeobj.rst:1351 msgid "" "This bit is inherited if :c:member:`~PyTypeObject.tp_call` is also inherited." msgstr "" -#: ../../c-api/typeobj.rst:1293 +#: ../../c-api/typeobj.rst:1358 msgid "" "This flag is now removed from a class when the class's :py:meth:`~object." "__call__` method is reassigned." msgstr "" -#: ../../c-api/typeobj.rst:1296 +#: ../../c-api/typeobj.rst:1361 msgid "This flag can now be inherited by mutable classes." msgstr "" -#: ../../c-api/typeobj.rst:1300 +#: ../../c-api/typeobj.rst:1365 msgid "" "This bit is set for type objects that are immutable: type attributes cannot " "be set nor deleted." msgstr "" -#: ../../c-api/typeobj.rst:1302 +#: ../../c-api/typeobj.rst:1367 msgid "" ":c:func:`PyType_Ready` automatically applies this flag to :ref:`static types " "`." msgstr "" -#: ../../c-api/typeobj.rst:1307 +#: ../../c-api/typeobj.rst:1372 msgid "This flag is not inherited." msgstr "" -#: ../../c-api/typeobj.rst:1313 +#: ../../c-api/typeobj.rst:1378 msgid "" "Disallow creating instances of the type: set :c:member:`~PyTypeObject." "tp_new` to NULL and don't create the ``__new__`` key in the type dictionary." msgstr "" -#: ../../c-api/typeobj.rst:1317 +#: ../../c-api/typeobj.rst:1382 msgid "" "The flag must be set before creating the type, not after. For example, it " "must be set before :c:func:`PyType_Ready` is called on the type." msgstr "" -#: ../../c-api/typeobj.rst:1320 +#: ../../c-api/typeobj.rst:1385 msgid "" "The flag is set automatically on :ref:`static types ` if :c:" "member:`~PyTypeObject.tp_base` is NULL or ``&PyBaseObject_Type`` and :c:" "member:`~PyTypeObject.tp_new` is NULL." msgstr "" -#: ../../c-api/typeobj.rst:1326 +#: ../../c-api/typeobj.rst:1391 msgid "" "This flag is not inherited. However, subclasses will not be instantiable " "unless they provide a non-NULL :c:member:`~PyTypeObject.tp_new` (which is " "only possible via the C API)." msgstr "" -#: ../../c-api/typeobj.rst:1333 +#: ../../c-api/typeobj.rst:1398 msgid "" "To disallow instantiating a class directly but allow instantiating its " "subclasses (e.g. for an :term:`abstract base class`), do not use this flag. " "Instead, make :c:member:`~PyTypeObject.tp_new` only succeed for subclasses." msgstr "" -#: ../../c-api/typeobj.rst:1344 +#: ../../c-api/typeobj.rst:1409 msgid "" "This bit indicates that instances of the class may match mapping patterns " "when used as the subject of a :keyword:`match` block. It is automatically " @@ -2345,23 +2468,23 @@ msgid "" "unset when registering :class:`collections.abc.Sequence`." msgstr "" -#: ../../c-api/typeobj.rst:1351 ../../c-api/typeobj.rst:1373 +#: ../../c-api/typeobj.rst:1416 ../../c-api/typeobj.rst:1438 msgid "" ":c:macro:`Py_TPFLAGS_MAPPING` and :c:macro:`Py_TPFLAGS_SEQUENCE` are " "mutually exclusive; it is an error to enable both flags simultaneously." msgstr "" -#: ../../c-api/typeobj.rst:1356 +#: ../../c-api/typeobj.rst:1421 msgid "" "This flag is inherited by types that do not already set :c:macro:" "`Py_TPFLAGS_SEQUENCE`." msgstr "" -#: ../../c-api/typeobj.rst:1359 ../../c-api/typeobj.rst:1381 +#: ../../c-api/typeobj.rst:1424 ../../c-api/typeobj.rst:1446 msgid ":pep:`634` -- Structural Pattern Matching: Specification" msgstr "" -#: ../../c-api/typeobj.rst:1366 +#: ../../c-api/typeobj.rst:1431 msgid "" "This bit indicates that instances of the class may match sequence patterns " "when used as the subject of a :keyword:`match` block. It is automatically " @@ -2369,53 +2492,53 @@ msgid "" "unset when registering :class:`collections.abc.Mapping`." msgstr "" -#: ../../c-api/typeobj.rst:1378 +#: ../../c-api/typeobj.rst:1443 msgid "" "This flag is inherited by types that do not already set :c:macro:" "`Py_TPFLAGS_MAPPING`." msgstr "" -#: ../../c-api/typeobj.rst:1388 +#: ../../c-api/typeobj.rst:1453 msgid "" "Internal. Do not set or unset this flag. To indicate that a class has " "changed call :c:func:`PyType_Modified`" msgstr "" -#: ../../c-api/typeobj.rst:1392 +#: ../../c-api/typeobj.rst:1457 msgid "" "This flag is present in header files, but is not be used. It will be removed " "in a future version of CPython" msgstr "" -#: ../../c-api/typeobj.rst:1398 +#: ../../c-api/typeobj.rst:1463 msgid "" "An optional pointer to a NUL-terminated C string giving the docstring for " "this type object. This is exposed as the :attr:`~type.__doc__` attribute on " "the type and instances of the type." msgstr "" -#: ../../c-api/typeobj.rst:1404 +#: ../../c-api/typeobj.rst:1469 msgid "This field is *not* inherited by subtypes." msgstr "" -#: ../../c-api/typeobj.rst:1409 +#: ../../c-api/typeobj.rst:1474 msgid "" "An optional pointer to a traversal function for the garbage collector. This " "is only used if the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is set. The " "signature is::" msgstr "" -#: ../../c-api/typeobj.rst:1412 +#: ../../c-api/typeobj.rst:1477 msgid "int tp_traverse(PyObject *self, visitproc visit, void *arg);" msgstr "" -#: ../../c-api/typeobj.rst:1414 ../../c-api/typeobj.rst:1560 +#: ../../c-api/typeobj.rst:1479 ../../c-api/typeobj.rst:1699 msgid "" "More information about Python's garbage collection scheme can be found in " "section :ref:`supporting-cycle-detection`." msgstr "" -#: ../../c-api/typeobj.rst:1417 +#: ../../c-api/typeobj.rst:1482 msgid "" "The :c:member:`~PyTypeObject.tp_traverse` pointer is used by the garbage " "collector to detect reference cycles. A typical implementation of a :c:" @@ -2425,7 +2548,7 @@ msgid "" "`!_thread` extension module::" msgstr "" -#: ../../c-api/typeobj.rst:1423 +#: ../../c-api/typeobj.rst:1488 msgid "" "static int\n" "local_traverse(PyObject *op, visitproc visit, void *arg)\n" @@ -2438,7 +2561,7 @@ msgid "" "}" msgstr "" -#: ../../c-api/typeobj.rst:1433 +#: ../../c-api/typeobj.rst:1498 msgid "" "Note that :c:func:`Py_VISIT` is called only on those members that can " "participate in reference cycles. Although there is also a ``self->key`` " @@ -2446,47 +2569,47 @@ msgid "" "part of a reference cycle." msgstr "" -#: ../../c-api/typeobj.rst:1437 +#: ../../c-api/typeobj.rst:1502 msgid "" "On the other hand, even if you know a member can never be part of a cycle, " "as a debugging aid you may want to visit it anyway just so the :mod:`gc` " "module's :func:`~gc.get_referents` function will include it." msgstr "" -#: ../../c-api/typeobj.rst:1441 +#: ../../c-api/typeobj.rst:1506 msgid "" "Heap types (:c:macro:`Py_TPFLAGS_HEAPTYPE`) must visit their type with::" msgstr "" -#: ../../c-api/typeobj.rst:1443 +#: ../../c-api/typeobj.rst:1508 msgid "Py_VISIT(Py_TYPE(self));" msgstr "" -#: ../../c-api/typeobj.rst:1445 +#: ../../c-api/typeobj.rst:1510 msgid "" "It is only needed since Python 3.9. To support Python 3.8 and older, this " "line must be conditional::" msgstr "" -#: ../../c-api/typeobj.rst:1448 +#: ../../c-api/typeobj.rst:1513 msgid "" "#if PY_VERSION_HEX >= 0x03090000\n" " Py_VISIT(Py_TYPE(self));\n" "#endif" msgstr "" -#: ../../c-api/typeobj.rst:1452 +#: ../../c-api/typeobj.rst:1517 msgid "" "If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit is set in the :c:member:" "`~PyTypeObject.tp_flags` field, the traverse function must call :c:func:" "`PyObject_VisitManagedDict` like this::" msgstr "" -#: ../../c-api/typeobj.rst:1456 +#: ../../c-api/typeobj.rst:1521 msgid "PyObject_VisitManagedDict((PyObject*)self, visit, arg);" msgstr "" -#: ../../c-api/typeobj.rst:1459 +#: ../../c-api/typeobj.rst:1524 msgid "" "When implementing :c:member:`~PyTypeObject.tp_traverse`, only the members " "that the instance *owns* (by having :term:`strong references ` hold a reference to " "their type. Their traversal function must therefore either visit :c:func:" @@ -2515,14 +2638,20 @@ msgid "" "superclass). If they do not, the type object may not be garbage-collected." msgstr "" -#: ../../c-api/typeobj.rst:1483 +#: ../../c-api/typeobj.rst:1548 +msgid "" +"The :c:member:`~PyTypeObject.tp_traverse` function can be called from any " +"thread." +msgstr "" + +#: ../../c-api/typeobj.rst:1553 msgid "" "Heap-allocated types are expected to visit ``Py_TYPE(self)`` in " "``tp_traverse``. In earlier versions of Python, due to `bug 40217 `_, doing this may lead to crashes in subclasses." msgstr "" -#: ../../c-api/typeobj.rst:1492 +#: ../../c-api/typeobj.rst:1562 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_clear` and the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit: the flag bit, :c:" @@ -2530,33 +2659,161 @@ msgid "" "are all inherited from the base type if they are all zero in the subtype." msgstr "" -#: ../../c-api/typeobj.rst:1500 -msgid "" -"An optional pointer to a clear function for the garbage collector. This is " -"only used if the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is set. The " -"signature is::" +#: ../../c-api/typeobj.rst:1570 +msgid "An optional pointer to a clear function. The signature is::" msgstr "" -#: ../../c-api/typeobj.rst:1503 +#: ../../c-api/typeobj.rst:1572 msgid "int tp_clear(PyObject *);" msgstr "" -#: ../../c-api/typeobj.rst:1505 +#: ../../c-api/typeobj.rst:1574 +msgid "" +"The purpose of this function is to break reference cycles that are causing " +"a :term:`cyclic isolate` so that the objects can be safely destroyed. A " +"cleared object is a partially destroyed object; the object is not obligated " +"to satisfy design invariants held during normal use." +msgstr "" + +#: ../../c-api/typeobj.rst:1579 +msgid "" +":c:member:`!tp_clear` does not need to delete references to objects that " +"can't participate in reference cycles, such as Python strings or Python " +"integers. However, it may be convenient to clear all references, and write " +"the type's :c:member:`~PyTypeObject.tp_dealloc` function to invoke :c:member:" +"`!tp_clear` to avoid code duplication. (Beware that :c:member:`!tp_clear` " +"might have already been called. Prefer calling idempotent functions like :c:" +"func:`Py_CLEAR`.)" +msgstr "" + +#: ../../c-api/typeobj.rst:1587 +msgid "" +"Any non-trivial cleanup should be performed in :c:member:`~PyTypeObject." +"tp_finalize` instead of :c:member:`!tp_clear`." +msgstr "" + +#: ../../c-api/typeobj.rst:1592 +msgid "" +"If :c:member:`!tp_clear` fails to break a reference cycle then the objects " +"in the :term:`cyclic isolate` may remain indefinitely uncollectable " +"(\"leak\"). See :data:`gc.garbage`." +msgstr "" + +#: ../../c-api/typeobj.rst:1598 +msgid "" +"Referents (direct and indirect) might have already been cleared; they are " +"not guaranteed to be in a consistent state." +msgstr "" + +#: ../../c-api/typeobj.rst:1603 +msgid "" +"The :c:member:`~PyTypeObject.tp_clear` function can be called from any " +"thread." +msgstr "" + +#: ../../c-api/typeobj.rst:1608 +msgid "" +"An object is not guaranteed to be automatically cleared before its " +"destructor (:c:member:`~PyTypeObject.tp_dealloc`) is called." +msgstr "" + +#: ../../c-api/typeobj.rst:1611 +msgid "" +"This function differs from the destructor (:c:member:`~PyTypeObject." +"tp_dealloc`) in the following ways:" +msgstr "" + +#: ../../c-api/typeobj.rst:1614 +msgid "" +"The purpose of clearing an object is to remove references to other objects " +"that might participate in a reference cycle. The purpose of the destructor, " +"on the other hand, is a superset: it must release *all* resources it owns, " +"including references to objects that cannot participate in a reference cycle " +"(e.g., integers) as well as the object's own memory (by calling :c:member:" +"`~PyTypeObject.tp_free`)." +msgstr "" + +#: ../../c-api/typeobj.rst:1620 +msgid "" +"When :c:member:`!tp_clear` is called, other objects might still hold " +"references to the object being cleared. Because of this, :c:member:`!" +"tp_clear` must not deallocate the object's own memory (:c:member:" +"`~PyTypeObject.tp_free`). The destructor, on the other hand, is only called " +"when no (strong) references exist, and as such, must safely destroy the " +"object itself by deallocating it." +msgstr "" + +#: ../../c-api/typeobj.rst:1626 msgid "" -"The :c:member:`~PyTypeObject.tp_clear` member function is used to break " -"reference cycles in cyclic garbage detected by the garbage collector. Taken " -"together, all :c:member:`~PyTypeObject.tp_clear` functions in the system " -"must combine to break all reference cycles. This is subtle, and if in any " -"doubt supply a :c:member:`~PyTypeObject.tp_clear` function. For example, " -"the tuple type does not implement a :c:member:`~PyTypeObject.tp_clear` " -"function, because it's possible to prove that no reference cycle can be " -"composed entirely of tuples. Therefore the :c:member:`~PyTypeObject." -"tp_clear` functions of other types must be sufficient to break any cycle " +":c:member:`!tp_clear` might never be automatically called. An object's " +"destructor, on the other hand, will be automatically called some time after " +"the object becomes unreachable (i.e., either there are no references to the " +"object or the object is a member of a :term:`cyclic isolate`)." +msgstr "" + +#: ../../c-api/typeobj.rst:1631 +msgid "" +"No guarantees are made about when, if, or how often Python automatically " +"clears an object, except:" +msgstr "" + +#: ../../c-api/typeobj.rst:1634 +msgid "" +"Python will not automatically clear an object if it is reachable, i.e., " +"there is a reference to it and it is not a member of a :term:`cyclic " +"isolate`." +msgstr "" + +#: ../../c-api/typeobj.rst:1637 +msgid "" +"Python will not automatically clear an object if it has not been " +"automatically finalized (see :c:member:`~PyTypeObject.tp_finalize`). (If " +"the finalizer resurrected the object, the object may or may not be " +"automatically finalized again before it is cleared.)" +msgstr "" + +#: ../../c-api/typeobj.rst:1641 +msgid "" +"If an object is a member of a :term:`cyclic isolate`, Python will not " +"automatically clear it if any member of the cyclic isolate has not yet been " +"automatically finalized (:c:member:`~PyTypeObject.tp_finalize`)." +msgstr "" + +#: ../../c-api/typeobj.rst:1644 +msgid "" +"Python will not destroy an object until after any automatic calls to its :c:" +"member:`!tp_clear` function have returned. This ensures that the act of " +"breaking a reference cycle does not invalidate the ``self`` pointer while :c:" +"member:`!tp_clear` is still executing." +msgstr "" + +#: ../../c-api/typeobj.rst:1648 +msgid "" +"Python will not automatically call :c:member:`!tp_clear` multiple times " +"concurrently." +msgstr "" + +#: ../../c-api/typeobj.rst:1651 +msgid "" +"CPython currently only automatically clears objects as needed to break " +"reference cycles in a :term:`cyclic isolate`, but future versions might " +"clear objects regularly before their destruction." +msgstr "" + +#: ../../c-api/typeobj.rst:1655 +msgid "" +"Taken together, all :c:member:`~PyTypeObject.tp_clear` functions in the " +"system must combine to break all reference cycles. This is subtle, and if " +"in any doubt supply a :c:member:`~PyTypeObject.tp_clear` function. For " +"example, the tuple type does not implement a :c:member:`~PyTypeObject." +"tp_clear` function, because it's possible to prove that no reference cycle " +"can be composed entirely of tuples. Therefore the :c:member:`~PyTypeObject." +"tp_clear` functions of other types are responsible for breaking any cycle " "containing a tuple. This isn't immediately obvious, and there's rarely a " "good reason to avoid implementing :c:member:`~PyTypeObject.tp_clear`." msgstr "" -#: ../../c-api/typeobj.rst:1515 +#: ../../c-api/typeobj.rst:1666 msgid "" "Implementations of :c:member:`~PyTypeObject.tp_clear` should drop the " "instance's references to those of its members that may be Python objects, " @@ -2564,7 +2821,7 @@ msgid "" "example::" msgstr "" -#: ../../c-api/typeobj.rst:1519 +#: ../../c-api/typeobj.rst:1670 msgid "" "static int\n" "local_clear(PyObject *op)\n" @@ -2578,7 +2835,7 @@ msgid "" "}" msgstr "" -#: ../../c-api/typeobj.rst:1530 +#: ../../c-api/typeobj.rst:1681 msgid "" "The :c:func:`Py_CLEAR` macro should be used, because clearing references is " "delicate: the reference to the contained object must not be released (via :" @@ -2593,36 +2850,18 @@ msgid "" "performs the operations in a safe order." msgstr "" -#: ../../c-api/typeobj.rst:1542 +#: ../../c-api/typeobj.rst:1693 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_ClearManagedDict` like this::" msgstr "" -#: ../../c-api/typeobj.rst:1546 +#: ../../c-api/typeobj.rst:1697 msgid "PyObject_ClearManagedDict((PyObject*)self);" msgstr "" -#: ../../c-api/typeobj.rst:1548 -msgid "" -"Note that :c:member:`~PyTypeObject.tp_clear` is not *always* called before " -"an instance is deallocated. For example, when reference counting is enough " -"to determine that an object is no longer used, the cyclic garbage collector " -"is not involved and :c:member:`~PyTypeObject.tp_dealloc` is called directly." -msgstr "" - -#: ../../c-api/typeobj.rst:1554 -msgid "" -"Because the goal of :c:member:`~PyTypeObject.tp_clear` functions is to break " -"reference cycles, it's not necessary to clear contained objects like Python " -"strings or Python integers, which can't participate in reference cycles. On " -"the other hand, it may be convenient to clear all contained Python objects, " -"and write the type's :c:member:`~PyTypeObject.tp_dealloc` function to " -"invoke :c:member:`~PyTypeObject.tp_clear`." -msgstr "" - -#: ../../c-api/typeobj.rst:1567 +#: ../../c-api/typeobj.rst:1706 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_traverse` and the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit: the flag bit, :" @@ -2630,22 +2869,22 @@ msgid "" "are all inherited from the base type if they are all zero in the subtype." msgstr "" -#: ../../c-api/typeobj.rst:1575 +#: ../../c-api/typeobj.rst:1718 msgid "" "An optional pointer to the rich comparison function, whose signature is::" msgstr "" -#: ../../c-api/typeobj.rst:1577 +#: ../../c-api/typeobj.rst:1720 msgid "PyObject *tp_richcompare(PyObject *self, PyObject *other, int op);" msgstr "" -#: ../../c-api/typeobj.rst:1579 +#: ../../c-api/typeobj.rst:1722 msgid "" "The first parameter is guaranteed to be an instance of the type that is " "defined by :c:type:`PyTypeObject`." msgstr "" -#: ../../c-api/typeobj.rst:1582 +#: ../../c-api/typeobj.rst:1725 msgid "" "The function should return the result of the comparison (usually ``Py_True`` " "or ``Py_False``). If the comparison is undefined, it must return " @@ -2653,50 +2892,50 @@ msgid "" "set an exception condition." msgstr "" -#: ../../c-api/typeobj.rst:1587 +#: ../../c-api/typeobj.rst:1730 msgid "" "The following constants are defined to be used as the third argument for :c:" "member:`~PyTypeObject.tp_richcompare` and for :c:func:`PyObject_RichCompare`:" msgstr "" -#: ../../c-api/typeobj.rst:1593 +#: ../../c-api/typeobj.rst:1736 msgid "Constant" msgstr "" -#: ../../c-api/typeobj.rst:1593 +#: ../../c-api/typeobj.rst:1736 msgid "Comparison" msgstr "" -#: ../../c-api/typeobj.rst:1595 +#: ../../c-api/typeobj.rst:1738 msgid "``<``" msgstr "" -#: ../../c-api/typeobj.rst:1597 +#: ../../c-api/typeobj.rst:1740 msgid "``<=``" msgstr "" -#: ../../c-api/typeobj.rst:1599 +#: ../../c-api/typeobj.rst:1742 msgid "``==``" msgstr "" -#: ../../c-api/typeobj.rst:1601 +#: ../../c-api/typeobj.rst:1744 msgid "``!=``" msgstr "" -#: ../../c-api/typeobj.rst:1603 +#: ../../c-api/typeobj.rst:1746 msgid "``>``" msgstr "" -#: ../../c-api/typeobj.rst:1605 +#: ../../c-api/typeobj.rst:1748 msgid "``>=``" msgstr "" -#: ../../c-api/typeobj.rst:1608 +#: ../../c-api/typeobj.rst:1751 msgid "" "The following macro is defined to ease writing rich comparison functions:" msgstr "" -#: ../../c-api/typeobj.rst:1612 +#: ../../c-api/typeobj.rst:1755 msgid "" "Return ``Py_True`` or ``Py_False`` from the function, depending on the " "result of a comparison. VAL_A and VAL_B must be orderable by C comparison " @@ -2704,15 +2943,15 @@ msgid "" "specifies the requested operation, as for :c:func:`PyObject_RichCompare`." msgstr "" -#: ../../c-api/typeobj.rst:1618 +#: ../../c-api/typeobj.rst:1761 msgid "The returned value is a new :term:`strong reference`." msgstr "" -#: ../../c-api/typeobj.rst:1620 +#: ../../c-api/typeobj.rst:1763 msgid "On error, sets an exception and returns ``NULL`` from the function." msgstr "" -#: ../../c-api/typeobj.rst:1628 +#: ../../c-api/typeobj.rst:1771 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_hash`: a subtype inherits :c:member:`~PyTypeObject.tp_richcompare` and :c:" @@ -2720,7 +2959,7 @@ msgid "" "tp_richcompare` and :c:member:`~PyTypeObject.tp_hash` are both ``NULL``." msgstr "" -#: ../../c-api/typeobj.rst:1635 +#: ../../c-api/typeobj.rst:1778 msgid "" ":c:data:`PyBaseObject_Type` provides a :c:member:`~PyTypeObject." "tp_richcompare` implementation, which may be inherited. However, if only :c:" @@ -2729,13 +2968,13 @@ msgid "" "comparisons." msgstr "" -#: ../../c-api/typeobj.rst:1644 +#: ../../c-api/typeobj.rst:1787 msgid "" "While this field is still supported, :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` " "should be used instead, if at all possible." msgstr "" -#: ../../c-api/typeobj.rst:1647 +#: ../../c-api/typeobj.rst:1790 msgid "" "If the instances of this type are weakly referenceable, this field is " "greater than zero and contains the offset in the instance structure of the " @@ -2745,19 +2984,19 @@ msgid "" "`PyObject*` which is initialized to ``NULL``." msgstr "" -#: ../../c-api/typeobj.rst:1654 +#: ../../c-api/typeobj.rst:1797 msgid "" "Do not confuse this field with :c:member:`~PyTypeObject.tp_weaklist`; that " "is the list head for weak references to the type object itself." msgstr "" -#: ../../c-api/typeobj.rst:1657 +#: ../../c-api/typeobj.rst:1800 msgid "" "It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit " "and :c:member:`~PyTypeObject.tp_weaklistoffset`." msgstr "" -#: ../../c-api/typeobj.rst:1662 +#: ../../c-api/typeobj.rst:1805 msgid "" "This field is inherited by subtypes, but see the rules listed below. A " "subtype may override this offset; this means that the subtype uses a " @@ -2766,7 +3005,7 @@ msgid "" "not be a problem." msgstr "" -#: ../../c-api/typeobj.rst:1669 +#: ../../c-api/typeobj.rst:1812 msgid "" "If the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit is set in the :c:member:" "`~PyTypeObject.tp_flags` field, then :c:member:`~PyTypeObject." @@ -2774,32 +3013,32 @@ msgid "" "unsafe to use this field." msgstr "" -#: ../../c-api/typeobj.rst:1677 +#: ../../c-api/typeobj.rst:1820 msgid "" "An optional pointer to a function that returns an :term:`iterator` for the " "object. Its presence normally signals that the instances of this type are :" "term:`iterable` (although sequences may be iterable without this function)." msgstr "" -#: ../../c-api/typeobj.rst:1681 +#: ../../c-api/typeobj.rst:1824 msgid "This function has the same signature as :c:func:`PyObject_GetIter`::" msgstr "" -#: ../../c-api/typeobj.rst:1683 +#: ../../c-api/typeobj.rst:1826 msgid "PyObject *tp_iter(PyObject *self);" msgstr "" -#: ../../c-api/typeobj.rst:1692 +#: ../../c-api/typeobj.rst:1835 msgid "" "An optional pointer to a function that returns the next item in an :term:" "`iterator`. The signature is::" msgstr "" -#: ../../c-api/typeobj.rst:1695 +#: ../../c-api/typeobj.rst:1838 msgid "PyObject *tp_iternext(PyObject *self);" msgstr "" -#: ../../c-api/typeobj.rst:1697 +#: ../../c-api/typeobj.rst:1840 msgid "" "When the iterator is exhausted, it must return ``NULL``; a :exc:" "`StopIteration` exception may or may not be set. When another error occurs, " @@ -2807,74 +3046,74 @@ msgid "" "this type are iterators." msgstr "" -#: ../../c-api/typeobj.rst:1702 +#: ../../c-api/typeobj.rst:1845 msgid "" "Iterator types should also define the :c:member:`~PyTypeObject.tp_iter` " "function, and that function should return the iterator instance itself (not " "a new iterator instance)." msgstr "" -#: ../../c-api/typeobj.rst:1706 +#: ../../c-api/typeobj.rst:1849 msgid "This function has the same signature as :c:func:`PyIter_Next`." msgstr "" -#: ../../c-api/typeobj.rst:1715 +#: ../../c-api/typeobj.rst:1858 msgid "" "An optional pointer to a static ``NULL``-terminated array of :c:type:" "`PyMethodDef` structures, declaring regular methods of this type." msgstr "" -#: ../../c-api/typeobj.rst:1718 +#: ../../c-api/typeobj.rst:1861 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a method descriptor." msgstr "" -#: ../../c-api/typeobj.rst:1723 +#: ../../c-api/typeobj.rst:1866 msgid "" "This field is not inherited by subtypes (methods are inherited through a " "different mechanism)." msgstr "" -#: ../../c-api/typeobj.rst:1729 +#: ../../c-api/typeobj.rst:1872 msgid "" "An optional pointer to a static ``NULL``-terminated array of :c:type:" "`PyMemberDef` structures, declaring regular data members (fields or slots) " "of instances of this type." msgstr "" -#: ../../c-api/typeobj.rst:1733 +#: ../../c-api/typeobj.rst:1876 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a member descriptor." msgstr "" -#: ../../c-api/typeobj.rst:1738 +#: ../../c-api/typeobj.rst:1881 msgid "" "This field is not inherited by subtypes (members are inherited through a " "different mechanism)." msgstr "" -#: ../../c-api/typeobj.rst:1744 +#: ../../c-api/typeobj.rst:1887 msgid "" "An optional pointer to a static ``NULL``-terminated array of :c:type:" "`PyGetSetDef` structures, declaring computed attributes of instances of this " "type." msgstr "" -#: ../../c-api/typeobj.rst:1747 +#: ../../c-api/typeobj.rst:1890 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a getset descriptor." msgstr "" -#: ../../c-api/typeobj.rst:1752 +#: ../../c-api/typeobj.rst:1895 msgid "" "This field is not inherited by subtypes (computed attributes are inherited " "through a different mechanism)." msgstr "" -#: ../../c-api/typeobj.rst:1758 +#: ../../c-api/typeobj.rst:1901 msgid "" "An optional pointer to a base type from which type properties are " "inherited. At this level, only single inheritance is supported; multiple " @@ -2882,7 +3121,7 @@ msgid "" "metatype." msgstr "" -#: ../../c-api/typeobj.rst:1766 +#: ../../c-api/typeobj.rst:1909 msgid "" "Slot initialization is subject to the rules of initializing globals. C99 " "requires the initializers to be \"address constants\". Function designators " @@ -2890,7 +3129,7 @@ msgid "" "valid C99 address constants." msgstr "" -#: ../../c-api/typeobj.rst:1771 +#: ../../c-api/typeobj.rst:1914 msgid "" "However, the unary '&' operator applied to a non-static variable like :c:" "data:`PyBaseObject_Type` is not required to produce an address constant. " @@ -2898,27 +3137,27 @@ msgid "" "strictly standard conforming in this particular behavior." msgstr "" -#: ../../c-api/typeobj.rst:1777 +#: ../../c-api/typeobj.rst:1920 msgid "" "Consequently, :c:member:`~PyTypeObject.tp_base` should be set in the " "extension module's init function." msgstr "" -#: ../../c-api/typeobj.rst:1782 +#: ../../c-api/typeobj.rst:1925 msgid "This field is not inherited by subtypes (obviously)." msgstr "" -#: ../../c-api/typeobj.rst:1786 +#: ../../c-api/typeobj.rst:1929 msgid "" "This field defaults to ``&PyBaseObject_Type`` (which to Python programmers " "is known as the type :class:`object`)." msgstr "" -#: ../../c-api/typeobj.rst:1792 +#: ../../c-api/typeobj.rst:1935 msgid "The type's dictionary is stored here by :c:func:`PyType_Ready`." msgstr "" -#: ../../c-api/typeobj.rst:1794 +#: ../../c-api/typeobj.rst:1937 msgid "" "This field should normally be initialized to ``NULL`` before PyType_Ready is " "called; it may also be initialized to a dictionary containing initial " @@ -2929,72 +3168,72 @@ msgid "" "be treated as read-only." msgstr "" -#: ../../c-api/typeobj.rst:1802 +#: ../../c-api/typeobj.rst:1945 msgid "" "Some types may not store their dictionary in this slot. Use :c:func:" "`PyType_GetDict` to retrieve the dictionary for an arbitrary type." msgstr "" -#: ../../c-api/typeobj.rst:1808 +#: ../../c-api/typeobj.rst:1951 msgid "" "Internals detail: For static builtin types, this is always ``NULL``. " "Instead, the dict for such types is stored on ``PyInterpreterState``. Use :c:" "func:`PyType_GetDict` to get the dict for an arbitrary type." msgstr "" -#: ../../c-api/typeobj.rst:1814 +#: ../../c-api/typeobj.rst:1957 msgid "" "This field is not inherited by subtypes (though the attributes defined in " "here are inherited through a different mechanism)." msgstr "" -#: ../../c-api/typeobj.rst:1819 +#: ../../c-api/typeobj.rst:1962 msgid "" "If this field is ``NULL``, :c:func:`PyType_Ready` will assign a new " "dictionary to it." msgstr "" -#: ../../c-api/typeobj.rst:1824 +#: ../../c-api/typeobj.rst:1967 msgid "" "It is not safe to use :c:func:`PyDict_SetItem` on or otherwise modify :c:" "member:`~PyTypeObject.tp_dict` with the dictionary C-API." msgstr "" -#: ../../c-api/typeobj.rst:1830 +#: ../../c-api/typeobj.rst:1973 msgid "An optional pointer to a \"descriptor get\" function." msgstr "" -#: ../../c-api/typeobj.rst:1832 ../../c-api/typeobj.rst:1848 -#: ../../c-api/typeobj.rst:1912 ../../c-api/typeobj.rst:1942 -#: ../../c-api/typeobj.rst:1966 +#: ../../c-api/typeobj.rst:1975 ../../c-api/typeobj.rst:1991 +#: ../../c-api/typeobj.rst:2055 ../../c-api/typeobj.rst:2085 +#: ../../c-api/typeobj.rst:2108 msgid "The function signature is::" msgstr "" -#: ../../c-api/typeobj.rst:1834 +#: ../../c-api/typeobj.rst:1977 msgid "PyObject * tp_descr_get(PyObject *self, PyObject *obj, PyObject *type);" msgstr "" -#: ../../c-api/typeobj.rst:1845 +#: ../../c-api/typeobj.rst:1988 msgid "" "An optional pointer to a function for setting and deleting a descriptor's " "value." msgstr "" -#: ../../c-api/typeobj.rst:1850 +#: ../../c-api/typeobj.rst:1993 msgid "int tp_descr_set(PyObject *self, PyObject *obj, PyObject *value);" msgstr "" -#: ../../c-api/typeobj.rst:1852 +#: ../../c-api/typeobj.rst:1995 msgid "The *value* argument is set to ``NULL`` to delete the value." msgstr "" -#: ../../c-api/typeobj.rst:1863 +#: ../../c-api/typeobj.rst:2006 msgid "" "While this field is still supported, :c:macro:`Py_TPFLAGS_MANAGED_DICT` " "should be used instead, if at all possible." msgstr "" -#: ../../c-api/typeobj.rst:1866 +#: ../../c-api/typeobj.rst:2009 msgid "" "If the instances of this type have a dictionary containing instance " "variables, this field is non-zero and contains the offset in the instances " @@ -3002,19 +3241,19 @@ msgid "" "func:`PyObject_GenericGetAttr`." msgstr "" -#: ../../c-api/typeobj.rst:1871 +#: ../../c-api/typeobj.rst:2014 msgid "" "Do not confuse this field with :c:member:`~PyTypeObject.tp_dict`; that is " "the dictionary for attributes of the type object itself." msgstr "" -#: ../../c-api/typeobj.rst:1874 +#: ../../c-api/typeobj.rst:2017 msgid "" "The value specifies the offset of the dictionary from the start of the " "instance structure." msgstr "" -#: ../../c-api/typeobj.rst:1876 +#: ../../c-api/typeobj.rst:2019 msgid "" "The :c:member:`~PyTypeObject.tp_dictoffset` should be regarded as write-" "only. To get the pointer to the dictionary call :c:func:" @@ -3023,13 +3262,13 @@ msgid "" "to call :c:func:`PyObject_GetAttr` when accessing an attribute on the object." msgstr "" -#: ../../c-api/typeobj.rst:1882 +#: ../../c-api/typeobj.rst:2025 msgid "" "It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit and :c:" "member:`~PyTypeObject.tp_dictoffset`." msgstr "" -#: ../../c-api/typeobj.rst:1887 +#: ../../c-api/typeobj.rst:2030 msgid "" "This field is inherited by subtypes. A subtype should not override this " "offset; doing so could be unsafe, if C code tries to access the dictionary " @@ -3037,25 +3276,25 @@ msgid "" "`Py_TPFLAGS_MANAGED_DICT`." msgstr "" -#: ../../c-api/typeobj.rst:1894 +#: ../../c-api/typeobj.rst:2037 msgid "" "This slot has no default. For :ref:`static types `, if the " "field is ``NULL`` then no :attr:`~object.__dict__` gets created for " "instances." msgstr "" -#: ../../c-api/typeobj.rst:1897 +#: ../../c-api/typeobj.rst:2040 msgid "" "If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit is set in the :c:member:" "`~PyTypeObject.tp_flags` field, then :c:member:`~PyTypeObject.tp_dictoffset` " "will be set to ``-1``, to indicate that it is unsafe to use this field." msgstr "" -#: ../../c-api/typeobj.rst:1905 +#: ../../c-api/typeobj.rst:2048 msgid "An optional pointer to an instance initialization function." msgstr "" -#: ../../c-api/typeobj.rst:1907 +#: ../../c-api/typeobj.rst:2050 msgid "" "This function corresponds to the :meth:`~object.__init__` method of " "classes. Like :meth:`!__init__`, it is possible to create an instance " @@ -3063,18 +3302,18 @@ msgid "" "instance by calling its :meth:`!__init__` method again." msgstr "" -#: ../../c-api/typeobj.rst:1914 +#: ../../c-api/typeobj.rst:2057 msgid "int tp_init(PyObject *self, PyObject *args, PyObject *kwds);" msgstr "" -#: ../../c-api/typeobj.rst:1916 +#: ../../c-api/typeobj.rst:2059 msgid "" "The self argument is the instance to be initialized; the *args* and *kwds* " "arguments represent positional and keyword arguments of the call to :meth:" "`~object.__init__`." msgstr "" -#: ../../c-api/typeobj.rst:1920 +#: ../../c-api/typeobj.rst:2063 msgid "" "The :c:member:`~PyTypeObject.tp_init` function, if not ``NULL``, is called " "when an instance is created normally by calling its type, after the type's :" @@ -3086,52 +3325,52 @@ msgid "" "subtype's :c:member:`~PyTypeObject.tp_init` is called." msgstr "" -#: ../../c-api/typeobj.rst:1927 +#: ../../c-api/typeobj.rst:2070 msgid "Returns ``0`` on success, ``-1`` and sets an exception on error." msgstr "" -#: ../../c-api/typeobj.rst:1935 +#: ../../c-api/typeobj.rst:2078 msgid "" "For :ref:`static types ` this field does not have a default." msgstr "" -#: ../../c-api/typeobj.rst:1940 +#: ../../c-api/typeobj.rst:2083 msgid "An optional pointer to an instance allocation function." msgstr "" -#: ../../c-api/typeobj.rst:1944 +#: ../../c-api/typeobj.rst:2087 msgid "PyObject *tp_alloc(PyTypeObject *self, Py_ssize_t nitems);" msgstr "" -#: ../../c-api/typeobj.rst:1948 +#: ../../c-api/typeobj.rst:2091 msgid "" -"This field is inherited by static subtypes, but not by dynamic subtypes " -"(subtypes created by a class statement)." +"Static subtypes inherit this slot, which will be :c:func:" +"`PyType_GenericAlloc` if inherited from :class:`object`." msgstr "" -#: ../../c-api/typeobj.rst:1953 -msgid "" -"For dynamic subtypes, this field is always set to :c:func:" -"`PyType_GenericAlloc`, to force a standard heap allocation strategy." +#: ../../c-api/typeobj.rst:2094 ../../c-api/typeobj.rst:2161 +msgid ":ref:`Heap subtypes ` do not inherit this slot." msgstr "" -#: ../../c-api/typeobj.rst:1957 +#: ../../c-api/typeobj.rst:2098 msgid "" -"For static subtypes, :c:data:`PyBaseObject_Type` uses :c:func:" -"`PyType_GenericAlloc`. That is the recommended value for all statically " -"defined types." +"For heap subtypes, this field is always set to :c:func:`PyType_GenericAlloc`." +msgstr "" + +#: ../../c-api/typeobj.rst:2101 ../../c-api/typeobj.rst:2169 +msgid "For static subtypes, this slot is inherited (see above)." msgstr "" -#: ../../c-api/typeobj.rst:1964 +#: ../../c-api/typeobj.rst:2106 msgid "An optional pointer to an instance creation function." msgstr "" -#: ../../c-api/typeobj.rst:1968 +#: ../../c-api/typeobj.rst:2110 msgid "" "PyObject *tp_new(PyTypeObject *subtype, PyObject *args, PyObject *kwds);" msgstr "" -#: ../../c-api/typeobj.rst:1970 +#: ../../c-api/typeobj.rst:2112 msgid "" "The *subtype* argument is the type of the object being created; the *args* " "and *kwds* arguments represent positional and keyword arguments of the call " @@ -3140,7 +3379,7 @@ msgid "" "that type (but not an unrelated type)." msgstr "" -#: ../../c-api/typeobj.rst:1976 +#: ../../c-api/typeobj.rst:2118 msgid "" "The :c:member:`~PyTypeObject.tp_new` function should call ``subtype-" ">tp_alloc(subtype, nitems)`` to allocate space for the object, and then do " @@ -3152,20 +3391,20 @@ msgid "" "be deferred to :c:member:`~PyTypeObject.tp_init`." msgstr "" -#: ../../c-api/typeobj.rst:1984 +#: ../../c-api/typeobj.rst:2126 msgid "" "Set the :c:macro:`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag to disallow " "creating instances of the type in Python." msgstr "" -#: ../../c-api/typeobj.rst:1989 +#: ../../c-api/typeobj.rst:2131 msgid "" "This field is inherited by subtypes, except it is not inherited by :ref:" "`static types ` whose :c:member:`~PyTypeObject.tp_base` is " "``NULL`` or ``&PyBaseObject_Type``." msgstr "" -#: ../../c-api/typeobj.rst:1995 +#: ../../c-api/typeobj.rst:2137 msgid "" "For :ref:`static types ` this field has no default. This means " "if the slot is defined as ``NULL``, the type cannot be called to create new " @@ -3173,45 +3412,42 @@ msgid "" "factory function." msgstr "" -#: ../../c-api/typeobj.rst:2003 +#: ../../c-api/typeobj.rst:2145 msgid "" "An optional pointer to an instance deallocation function. Its signature is::" msgstr "" -#: ../../c-api/typeobj.rst:2005 +#: ../../c-api/typeobj.rst:2147 msgid "void tp_free(void *self);" msgstr "" -#: ../../c-api/typeobj.rst:2007 -msgid "" -"An initializer that is compatible with this signature is :c:func:" -"`PyObject_Free`." -msgstr "" - -#: ../../c-api/typeobj.rst:2011 +#: ../../c-api/typeobj.rst:2149 msgid "" -"This field is inherited by static subtypes, but not by dynamic subtypes " -"(subtypes created by a class statement)" +"This function must free the memory allocated by :c:member:`~PyTypeObject." +"tp_alloc`." msgstr "" -#: ../../c-api/typeobj.rst:2016 +#: ../../c-api/typeobj.rst:2154 msgid "" -"In dynamic subtypes, this field is set to a deallocator suitable to match :c:" -"func:`PyType_GenericAlloc` and the value of the :c:macro:" -"`Py_TPFLAGS_HAVE_GC` flag bit." +"Static subtypes inherit this slot, which will be :c:func:`PyObject_Free` if " +"inherited from :class:`object`. Exception: If the type supports garbage " +"collection (i.e., the :c:macro:`Py_TPFLAGS_HAVE_GC` flag is set in :c:member:" +"`~PyTypeObject.tp_flags`) and it would inherit :c:func:`PyObject_Free`, then " +"this slot is not inherited but instead defaults to :c:func:`PyObject_GC_Del`." msgstr "" -#: ../../c-api/typeobj.rst:2020 +#: ../../c-api/typeobj.rst:2165 msgid "" -"For static subtypes, :c:data:`PyBaseObject_Type` uses :c:func:" -"`PyObject_Free`." +"For :ref:`heap subtypes `, this slot defaults to a deallocator " +"suitable to match :c:func:`PyType_GenericAlloc` and the value of the :c:" +"macro:`Py_TPFLAGS_HAVE_GC` flag." msgstr "" -#: ../../c-api/typeobj.rst:2025 +#: ../../c-api/typeobj.rst:2174 msgid "An optional pointer to a function called by the garbage collector." msgstr "" -#: ../../c-api/typeobj.rst:2027 +#: ../../c-api/typeobj.rst:2176 msgid "" "The garbage collector needs to know whether a particular object is " "collectible or not. Normally, it is sufficient to look at the object's " @@ -3223,93 +3459,93 @@ msgid "" "instance. The signature is::" msgstr "" -#: ../../c-api/typeobj.rst:2035 +#: ../../c-api/typeobj.rst:2184 msgid "int tp_is_gc(PyObject *self);" msgstr "" -#: ../../c-api/typeobj.rst:2037 +#: ../../c-api/typeobj.rst:2186 msgid "" "(The only example of this are types themselves. The metatype, :c:data:" "`PyType_Type`, defines this function to distinguish between statically and :" "ref:`dynamically allocated types `.)" msgstr "" -#: ../../c-api/typeobj.rst:2047 +#: ../../c-api/typeobj.rst:2196 msgid "" "This slot has no default. If this field is ``NULL``, :c:macro:" "`Py_TPFLAGS_HAVE_GC` is used as the functional equivalent." msgstr "" -#: ../../c-api/typeobj.rst:2053 +#: ../../c-api/typeobj.rst:2202 msgid "Tuple of base types." msgstr "" -#: ../../c-api/typeobj.rst:2055 ../../c-api/typeobj.rst:2079 +#: ../../c-api/typeobj.rst:2204 ../../c-api/typeobj.rst:2228 msgid "" "This field should be set to ``NULL`` and treated as read-only. Python will " "fill it in when the type is :c:func:`initialized `." msgstr "" -#: ../../c-api/typeobj.rst:2058 +#: ../../c-api/typeobj.rst:2207 msgid "" "For dynamically created classes, the ``Py_tp_bases`` :c:type:`slot " "` can be used instead of the *bases* argument of :c:func:" "`PyType_FromSpecWithBases`. The argument form is preferred." msgstr "" -#: ../../c-api/typeobj.rst:2065 +#: ../../c-api/typeobj.rst:2214 msgid "" "Multiple inheritance does not work well for statically defined types. If you " "set ``tp_bases`` to a tuple, Python will not raise an error, but some slots " "will only be inherited from the first base." msgstr "" -#: ../../c-api/typeobj.rst:2071 ../../c-api/typeobj.rst:2094 -#: ../../c-api/typeobj.rst:2111 ../../c-api/typeobj.rst:2128 -#: ../../c-api/typeobj.rst:2142 +#: ../../c-api/typeobj.rst:2220 ../../c-api/typeobj.rst:2243 +#: ../../c-api/typeobj.rst:2260 ../../c-api/typeobj.rst:2277 +#: ../../c-api/typeobj.rst:2291 msgid "This field is not inherited." msgstr "" -#: ../../c-api/typeobj.rst:2076 +#: ../../c-api/typeobj.rst:2225 msgid "" "Tuple containing the expanded set of base types, starting with the type " "itself and ending with :class:`object`, in Method Resolution Order." msgstr "" -#: ../../c-api/typeobj.rst:2084 +#: ../../c-api/typeobj.rst:2233 msgid "" "This field is not inherited; it is calculated fresh by :c:func:" "`PyType_Ready`." msgstr "" -#: ../../c-api/typeobj.rst:2090 +#: ../../c-api/typeobj.rst:2239 msgid "Unused. Internal use only." msgstr "" -#: ../../c-api/typeobj.rst:2099 +#: ../../c-api/typeobj.rst:2248 msgid "" "A collection of subclasses. Internal use only. May be an invalid pointer." msgstr "" -#: ../../c-api/typeobj.rst:2101 +#: ../../c-api/typeobj.rst:2250 msgid "" "To get a list of subclasses, call the Python method :py:meth:`~type." "__subclasses__`." msgstr "" -#: ../../c-api/typeobj.rst:2106 +#: ../../c-api/typeobj.rst:2255 msgid "" "For some types, this field does not hold a valid :c:expr:`PyObject*`. The " "type was changed to :c:expr:`void*` to indicate this." msgstr "" -#: ../../c-api/typeobj.rst:2116 +#: ../../c-api/typeobj.rst:2265 msgid "" "Weak reference list head, for weak references to this type object. Not " "inherited. Internal use only." msgstr "" -#: ../../c-api/typeobj.rst:2121 +#: ../../c-api/typeobj.rst:2270 msgid "" "Internals detail: For the static builtin types this is always ``NULL``, even " "if weakrefs are added. Instead, the weakrefs for each are stored on " @@ -3317,68 +3553,242 @@ msgid "" "``_PyObject_GET_WEAKREFS_LISTPTR()`` macro to avoid the distinction." msgstr "" -#: ../../c-api/typeobj.rst:2133 +#: ../../c-api/typeobj.rst:2282 msgid "" "This field is deprecated. Use :c:member:`~PyTypeObject.tp_finalize` instead." msgstr "" -#: ../../c-api/typeobj.rst:2138 +#: ../../c-api/typeobj.rst:2287 msgid "Used to index into the method cache. Internal use only." msgstr "" -#: ../../c-api/typeobj.rst:2147 +#: ../../c-api/typeobj.rst:2296 msgid "" -"An optional pointer to an instance finalization function. Its signature is::" +"An optional pointer to an instance finalization function. This is the C " +"implementation of the :meth:`~object.__del__` special method. Its signature " +"is::" msgstr "" -#: ../../c-api/typeobj.rst:2149 +#: ../../c-api/typeobj.rst:2300 msgid "void tp_finalize(PyObject *self);" msgstr "" -#: ../../c-api/typeobj.rst:2151 +#: ../../c-api/typeobj.rst:2302 +msgid "" +"The primary purpose of finalization is to perform any non-trivial cleanup " +"that must be performed before the object is destroyed, while the object and " +"any other objects it directly or indirectly references are still in a " +"consistent state. The finalizer is allowed to execute arbitrary Python code." +msgstr "" + +#: ../../c-api/typeobj.rst:2308 +msgid "" +"Before Python automatically finalizes an object, some of the object's direct " +"or indirect referents might have themselves been automatically finalized. " +"However, none of the referents will have been automatically cleared (:c:" +"member:`~PyTypeObject.tp_clear`) yet." +msgstr "" + +#: ../../c-api/typeobj.rst:2313 +msgid "" +"Other non-finalized objects might still be using a finalized object, so the " +"finalizer must leave the object in a sane state (e.g., invariants are still " +"met)." +msgstr "" + +#: ../../c-api/typeobj.rst:2319 +msgid "" +"After Python automatically finalizes an object, Python might start " +"automatically clearing (:c:member:`~PyTypeObject.tp_clear`) the object and " +"its referents (direct and indirect). Cleared objects are not guaranteed to " +"be in a consistent state; a finalized object must be able to tolerate " +"cleared referents." +msgstr "" + +#: ../../c-api/typeobj.rst:2327 +msgid "" +"An object is not guaranteed to be automatically finalized before its " +"destructor (:c:member:`~PyTypeObject.tp_dealloc`) is called. It is " +"recommended to call :c:func:`PyObject_CallFinalizerFromDealloc` at the " +"beginning of :c:member:`!tp_dealloc` to guarantee that the object is always " +"finalized before destruction." +msgstr "" + +#: ../../c-api/typeobj.rst:2335 msgid "" -"If :c:member:`~PyTypeObject.tp_finalize` is set, the interpreter calls it " -"once when finalizing an instance. It is called either from the garbage " -"collector (if the instance is part of an isolated reference cycle) or just " -"before the object is deallocated. Either way, it is guaranteed to be called " -"before attempting to break reference cycles, ensuring that it finds the " -"object in a sane state." +"The :c:member:`~PyTypeObject.tp_finalize` function can be called from any " +"thread, although the :term:`GIL` will be held." msgstr "" -#: ../../c-api/typeobj.rst:2158 +#: ../../c-api/typeobj.rst:2340 msgid "" -":c:member:`~PyTypeObject.tp_finalize` should not mutate the current " -"exception status; therefore, a recommended way to write a non-trivial " -"finalizer is::" +"The :c:member:`!tp_finalize` function can be called during shutdown, after " +"some global variables have been deleted. See the documentation of the :meth:" +"`~object.__del__` method for details." msgstr "" -#: ../../c-api/typeobj.rst:2161 +#: ../../c-api/typeobj.rst:2344 +msgid "" +"When Python finalizes an object, it behaves like the following algorithm:" +msgstr "" + +#: ../../c-api/typeobj.rst:2346 +msgid "" +"Python might mark the object as *finalized*. Currently, Python always marks " +"objects whose type supports garbage collection (i.e., the :c:macro:" +"`Py_TPFLAGS_HAVE_GC` flag is set in :c:member:`~PyTypeObject.tp_flags`) and " +"never marks other types of objects; this might change in a future version." +msgstr "" + +#: ../../c-api/typeobj.rst:2351 +msgid "" +"If the object is not marked as *finalized* and its :c:member:`!tp_finalize` " +"finalizer function is non-``NULL``, the finalizer function is called." +msgstr "" + +#: ../../c-api/typeobj.rst:2354 +msgid "" +"If the finalizer function was called and the finalizer made the object " +"reachable (i.e., there is a reference to the object and it is not a member " +"of a :term:`cyclic isolate`), then the finalizer is said to have " +"*resurrected* the object. It is unspecified whether the finalizer can also " +"resurrect the object by adding a new reference to the object that does not " +"make it reachable, i.e., the object is (still) a member of a cyclic isolate." +msgstr "" + +#: ../../c-api/typeobj.rst:2361 +msgid "" +"If the finalizer resurrected the object, the object's pending destruction is " +"canceled and the object's *finalized* mark might be removed if present. " +"Currently, Python never removes the *finalized* mark; this might change in a " +"future version." +msgstr "" + +#: ../../c-api/typeobj.rst:2366 +msgid "" +"*Automatic finalization* refers to any finalization performed by Python " +"except via calls to :c:func:`PyObject_CallFinalizer` or :c:func:" +"`PyObject_CallFinalizerFromDealloc`. No guarantees are made about when, if, " +"or how often an object is automatically finalized, except:" +msgstr "" + +#: ../../c-api/typeobj.rst:2371 +msgid "" +"Python will not automatically finalize an object if it is reachable, i.e., " +"there is a reference to it and it is not a member of a :term:`cyclic " +"isolate`." +msgstr "" + +#: ../../c-api/typeobj.rst:2374 +msgid "" +"Python will not automatically finalize an object if finalizing it would not " +"mark the object as *finalized*. Currently, this applies to objects whose " +"type does not support garbage collection, i.e., the :c:macro:" +"`Py_TPFLAGS_HAVE_GC` flag is not set. Such objects can still be manually " +"finalized by calling :c:func:`PyObject_CallFinalizer` or :c:func:" +"`PyObject_CallFinalizerFromDealloc`." +msgstr "" + +#: ../../c-api/typeobj.rst:2380 +msgid "" +"Python will not automatically finalize any two members of a :term:`cyclic " +"isolate` concurrently." +msgstr "" + +#: ../../c-api/typeobj.rst:2382 +msgid "" +"Python will not automatically finalize an object after it has automatically " +"cleared (:c:member:`~PyTypeObject.tp_clear`) the object." +msgstr "" + +#: ../../c-api/typeobj.rst:2384 +msgid "" +"If an object is a member of a :term:`cyclic isolate`, Python will not " +"automatically finalize it after automatically clearing (see :c:member:" +"`~PyTypeObject.tp_clear`) any other member." +msgstr "" + +#: ../../c-api/typeobj.rst:2387 +msgid "" +"Python will automatically finalize every member of a :term:`cyclic isolate` " +"before it automatically clears (see :c:member:`~PyTypeObject.tp_clear`) any " +"of them." +msgstr "" + +#: ../../c-api/typeobj.rst:2390 +msgid "" +"If Python is going to automatically clear an object (:c:member:" +"`~PyTypeObject.tp_clear`), it will automatically finalize the object first." +msgstr "" + +#: ../../c-api/typeobj.rst:2394 +msgid "" +"Python currently only automatically finalizes objects that are members of a :" +"term:`cyclic isolate`, but future versions might finalize objects regularly " +"before their destruction." +msgstr "" + +#: ../../c-api/typeobj.rst:2398 +msgid "" +"To manually finalize an object, do not call this function directly; call :c:" +"func:`PyObject_CallFinalizer` or :c:func:`PyObject_CallFinalizerFromDealloc` " +"instead." +msgstr "" + +#: ../../c-api/typeobj.rst:2402 +msgid "" +":c:member:`~PyTypeObject.tp_finalize` should leave the current exception " +"status unchanged. The recommended way to write a non-trivial finalizer is " +"to back up the exception at the beginning by calling :c:func:" +"`PyErr_GetRaisedException` and restore the exception at the end by calling :" +"c:func:`PyErr_SetRaisedException`. If an exception is encountered in the " +"middle of the finalizer, log and clear it with :c:func:" +"`PyErr_WriteUnraisable` or :c:func:`PyErr_FormatUnraisable`. For example::" +msgstr "" + +#: ../../c-api/typeobj.rst:2411 msgid "" "static void\n" -"local_finalize(PyObject *self)\n" +"foo_finalize(PyObject *self)\n" "{\n" -" /* Save the current exception, if any. */\n" +" // Save the current exception, if any.\n" " PyObject *exc = PyErr_GetRaisedException();\n" "\n" -" /* ... */\n" +" // ...\n" "\n" -" /* Restore the saved exception. */\n" +" if (do_something_that_might_raise() != success_indicator) {\n" +" PyErr_WriteUnraisable(self);\n" +" goto done;\n" +" }\n" +"\n" +"done:\n" +" // Restore the saved exception. This silently discards any exception\n" +" // raised above, so be sure to call PyErr_WriteUnraisable first if\n" +" // necessary.\n" " PyErr_SetRaisedException(exc);\n" "}" msgstr "" -#: ../../c-api/typeobj.rst:2181 +#: ../../c-api/typeobj.rst:2439 msgid "" "Before version 3.8 it was necessary to set the :c:macro:" "`Py_TPFLAGS_HAVE_FINALIZE` flags bit in order for this field to be used. " "This is no longer required." msgstr "" -#: ../../c-api/typeobj.rst:2185 -msgid "\"Safe object finalization\" (:pep:`442`)" +#: ../../c-api/typeobj.rst:2445 +msgid ":pep:`442`: \"Safe object finalization\"" msgstr "" -#: ../../c-api/typeobj.rst:2190 +#: ../../c-api/typeobj.rst:2448 +msgid ":c:func:`PyObject_CallFinalizer`" +msgstr "" + +#: ../../c-api/typeobj.rst:2449 +msgid ":c:func:`PyObject_CallFinalizerFromDealloc`" +msgstr "" + +#: ../../c-api/typeobj.rst:2454 msgid "" "A :ref:`vectorcall function ` to use for calls of this type " "object (rather than instances). In other words, ``tp_vectorcall`` can be " @@ -3386,13 +3796,13 @@ msgid "" "of *type*." msgstr "" -#: ../../c-api/typeobj.rst:2195 +#: ../../c-api/typeobj.rst:2459 msgid "" "As with any vectorcall function, if ``tp_vectorcall`` is ``NULL``, the " "*tp_call* protocol (``Py_TYPE(type)->tp_call``) is used instead." msgstr "" -#: ../../c-api/typeobj.rst:2200 +#: ../../c-api/typeobj.rst:2464 msgid "" "The :ref:`vectorcall protocol ` requires that the vectorcall " "function has the same behavior as the corresponding ``tp_call``. This means " @@ -3400,27 +3810,27 @@ msgid "" ">tp_call``." msgstr "" -#: ../../c-api/typeobj.rst:2205 +#: ../../c-api/typeobj.rst:2469 msgid "" "Specifically, if *type* uses the default metaclass, ``type->tp_vectorcall`` " "must behave the same as :c:expr:`PyType_Type->tp_call`, which:" msgstr "" -#: ../../c-api/typeobj.rst:2209 +#: ../../c-api/typeobj.rst:2473 msgid "calls ``type->tp_new``," msgstr "" -#: ../../c-api/typeobj.rst:2211 +#: ../../c-api/typeobj.rst:2475 msgid "" "if the result is a subclass of *type*, calls ``type->tp_init`` on the result " "of ``tp_new``, and" msgstr "" -#: ../../c-api/typeobj.rst:2214 +#: ../../c-api/typeobj.rst:2478 msgid "returns the result of ``tp_new``." msgstr "" -#: ../../c-api/typeobj.rst:2216 +#: ../../c-api/typeobj.rst:2480 msgid "" "Typically, ``tp_vectorcall`` is overridden to optimize this process for " "specific :c:member:`~PyTypeObject.tp_new` and :c:member:`~PyTypeObject." @@ -3429,65 +3839,65 @@ msgid "" "__init__`, respectively)." msgstr "" -#: ../../c-api/typeobj.rst:2227 +#: ../../c-api/typeobj.rst:2491 msgid "This field is never inherited." msgstr "" -#: ../../c-api/typeobj.rst:2229 +#: ../../c-api/typeobj.rst:2493 msgid "(the field exists since 3.8 but it's only used since 3.9)" msgstr "" -#: ../../c-api/typeobj.rst:2234 +#: ../../c-api/typeobj.rst:2498 msgid "Internal. Do not use." msgstr "" -#: ../../c-api/typeobj.rst:2242 +#: ../../c-api/typeobj.rst:2506 msgid "Static Types" msgstr "" -#: ../../c-api/typeobj.rst:2244 +#: ../../c-api/typeobj.rst:2508 msgid "" "Traditionally, types defined in C code are *static*, that is, a static :c:" "type:`PyTypeObject` structure is defined directly in code and initialized " "using :c:func:`PyType_Ready`." msgstr "" -#: ../../c-api/typeobj.rst:2248 +#: ../../c-api/typeobj.rst:2512 msgid "" "This results in types that are limited relative to types defined in Python:" msgstr "" -#: ../../c-api/typeobj.rst:2250 +#: ../../c-api/typeobj.rst:2514 msgid "" "Static types are limited to one base, i.e. they cannot use multiple " "inheritance." msgstr "" -#: ../../c-api/typeobj.rst:2252 +#: ../../c-api/typeobj.rst:2516 msgid "" "Static type objects (but not necessarily their instances) are immutable. It " "is not possible to add or modify the type object's attributes from Python." msgstr "" -#: ../../c-api/typeobj.rst:2254 +#: ../../c-api/typeobj.rst:2518 msgid "" "Static type objects are shared across :ref:`sub-interpreters `, so they should not include any subinterpreter-" "specific state." msgstr "" -#: ../../c-api/typeobj.rst:2258 +#: ../../c-api/typeobj.rst:2522 msgid "" "Also, since :c:type:`PyTypeObject` is only part of the :ref:`Limited API " "` as an opaque struct, any extension modules using static " "types must be compiled for a specific Python minor version." msgstr "" -#: ../../c-api/typeobj.rst:2266 +#: ../../c-api/typeobj.rst:2530 msgid "Heap Types" msgstr "" -#: ../../c-api/typeobj.rst:2268 +#: ../../c-api/typeobj.rst:2532 msgid "" "An alternative to :ref:`static types ` is *heap-allocated " "types*, or *heap types* for short, which correspond closely to classes " @@ -3495,29 +3905,29 @@ msgid "" "`Py_TPFLAGS_HEAPTYPE` flag set." msgstr "" -#: ../../c-api/typeobj.rst:2273 +#: ../../c-api/typeobj.rst:2537 msgid "" "This is done by filling a :c:type:`PyType_Spec` structure and calling :c:" "func:`PyType_FromSpec`, :c:func:`PyType_FromSpecWithBases`, :c:func:" "`PyType_FromModuleAndSpec`, or :c:func:`PyType_FromMetaclass`." msgstr "" -#: ../../c-api/typeobj.rst:2281 +#: ../../c-api/typeobj.rst:2545 msgid "Number Object Structures" msgstr "" -#: ../../c-api/typeobj.rst:2288 +#: ../../c-api/typeobj.rst:2552 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the number protocol. Each function is used by the function of " "similar name documented in the :ref:`number` section." msgstr "" -#: ../../c-api/typeobj.rst:2294 ../../c-api/typeobj.rst:2618 +#: ../../c-api/typeobj.rst:2558 ../../c-api/typeobj.rst:2882 msgid "Here is the structure definition::" msgstr "" -#: ../../c-api/typeobj.rst:2296 +#: ../../c-api/typeobj.rst:2560 msgid "" "typedef struct {\n" " binaryfunc nb_add;\n" @@ -3563,7 +3973,7 @@ msgid "" "} PyNumberMethods;" msgstr "" -#: ../../c-api/typeobj.rst:2341 +#: ../../c-api/typeobj.rst:2605 msgid "" "Binary and ternary functions must check the type of all their operands, and " "implement the necessary conversions (at least one of the operands is an " @@ -3573,31 +3983,31 @@ msgid "" "and set an exception." msgstr "" -#: ../../c-api/typeobj.rst:2350 +#: ../../c-api/typeobj.rst:2614 msgid "" "The :c:member:`~PyNumberMethods.nb_reserved` field should always be " "``NULL``. It was previously called :c:member:`!nb_long`, and was renamed in " "Python 3.0.1." msgstr "" -#: ../../c-api/typeobj.rst:2395 +#: ../../c-api/typeobj.rst:2659 msgid "Mapping Object Structures" msgstr "" -#: ../../c-api/typeobj.rst:2402 +#: ../../c-api/typeobj.rst:2666 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the mapping protocol. It has three members:" msgstr "" -#: ../../c-api/typeobj.rst:2407 +#: ../../c-api/typeobj.rst:2671 msgid "" "This function is used by :c:func:`PyMapping_Size` and :c:func:" "`PyObject_Size`, and has the same signature. This slot may be set to " "``NULL`` if the object has no defined length." msgstr "" -#: ../../c-api/typeobj.rst:2413 +#: ../../c-api/typeobj.rst:2677 msgid "" "This function is used by :c:func:`PyObject_GetItem` and :c:func:" "`PySequence_GetSlice`, and has the same signature as :c:func:`!" @@ -3605,7 +4015,7 @@ msgid "" "`PyMapping_Check` function to return ``1``, it can be ``NULL`` otherwise." msgstr "" -#: ../../c-api/typeobj.rst:2421 +#: ../../c-api/typeobj.rst:2685 msgid "" "This function is used by :c:func:`PyObject_SetItem`, :c:func:" "`PyObject_DelItem`, :c:func:`PySequence_SetSlice` and :c:func:" @@ -3615,17 +4025,17 @@ msgid "" "deletion." msgstr "" -#: ../../c-api/typeobj.rst:2432 +#: ../../c-api/typeobj.rst:2696 msgid "Sequence Object Structures" msgstr "" -#: ../../c-api/typeobj.rst:2439 +#: ../../c-api/typeobj.rst:2703 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the sequence protocol." msgstr "" -#: ../../c-api/typeobj.rst:2444 +#: ../../c-api/typeobj.rst:2708 msgid "" "This function is used by :c:func:`PySequence_Size` and :c:func:" "`PyObject_Size`, and has the same signature. It is also used for handling " @@ -3633,21 +4043,21 @@ msgid "" "member:`~PySequenceMethods.sq_ass_item` slots." msgstr "" -#: ../../c-api/typeobj.rst:2451 +#: ../../c-api/typeobj.rst:2715 msgid "" "This function is used by :c:func:`PySequence_Concat` and has the same " "signature. It is also used by the ``+`` operator, after trying the numeric " "addition via the :c:member:`~PyNumberMethods.nb_add` slot." msgstr "" -#: ../../c-api/typeobj.rst:2457 +#: ../../c-api/typeobj.rst:2721 msgid "" "This function is used by :c:func:`PySequence_Repeat` and has the same " "signature. It is also used by the ``*`` operator, after trying numeric " "multiplication via the :c:member:`~PyNumberMethods.nb_multiply` slot." msgstr "" -#: ../../c-api/typeobj.rst:2463 +#: ../../c-api/typeobj.rst:2727 msgid "" "This function is used by :c:func:`PySequence_GetItem` and has the same " "signature. It is also used by :c:func:`PyObject_GetItem`, after trying the " @@ -3656,7 +4066,7 @@ msgid "" "``1``, it can be ``NULL`` otherwise." msgstr "" -#: ../../c-api/typeobj.rst:2469 +#: ../../c-api/typeobj.rst:2733 msgid "" "Negative indexes are handled as follows: if the :c:member:" "`~PySequenceMethods.sq_length` slot is filled, it is called and the sequence " @@ -3665,7 +4075,7 @@ msgid "" "index is passed as is to the function." msgstr "" -#: ../../c-api/typeobj.rst:2476 +#: ../../c-api/typeobj.rst:2740 msgid "" "This function is used by :c:func:`PySequence_SetItem` and has the same " "signature. It is also used by :c:func:`PyObject_SetItem` and :c:func:" @@ -3674,14 +4084,14 @@ msgid "" "``NULL`` if the object does not support item assignment and deletion." msgstr "" -#: ../../c-api/typeobj.rst:2485 +#: ../../c-api/typeobj.rst:2749 msgid "" "This function may be used by :c:func:`PySequence_Contains` and has the same " "signature. This slot may be left to ``NULL``, in this case :c:func:`!" "PySequence_Contains` simply traverses the sequence until it finds a match." msgstr "" -#: ../../c-api/typeobj.rst:2492 +#: ../../c-api/typeobj.rst:2756 msgid "" "This function is used by :c:func:`PySequence_InPlaceConcat` and has the same " "signature. It should modify its first operand, and return it. This slot " @@ -3691,7 +4101,7 @@ msgid "" "c:member:`~PyNumberMethods.nb_inplace_add` slot." msgstr "" -#: ../../c-api/typeobj.rst:2501 +#: ../../c-api/typeobj.rst:2765 msgid "" "This function is used by :c:func:`PySequence_InPlaceRepeat` and has the same " "signature. It should modify its first operand, and return it. This slot " @@ -3701,76 +4111,76 @@ msgid "" "via the :c:member:`~PyNumberMethods.nb_inplace_multiply` slot." msgstr "" -#: ../../c-api/typeobj.rst:2512 +#: ../../c-api/typeobj.rst:2776 msgid "Buffer Object Structures" msgstr "" -#: ../../c-api/typeobj.rst:2520 +#: ../../c-api/typeobj.rst:2784 msgid "" "This structure holds pointers to the functions required by the :ref:`Buffer " "protocol `. The protocol defines how an exporter object can " "expose its internal data to consumer objects." msgstr "" -#: ../../c-api/typeobj.rst:2526 ../../c-api/typeobj.rst:2575 -#: ../../c-api/typeobj.rst:2629 ../../c-api/typeobj.rst:2640 -#: ../../c-api/typeobj.rst:2652 ../../c-api/typeobj.rst:2662 +#: ../../c-api/typeobj.rst:2790 ../../c-api/typeobj.rst:2839 +#: ../../c-api/typeobj.rst:2893 ../../c-api/typeobj.rst:2904 +#: ../../c-api/typeobj.rst:2916 ../../c-api/typeobj.rst:2926 msgid "The signature of this function is::" msgstr "" -#: ../../c-api/typeobj.rst:2528 +#: ../../c-api/typeobj.rst:2792 msgid "int (PyObject *exporter, Py_buffer *view, int flags);" msgstr "" -#: ../../c-api/typeobj.rst:2530 +#: ../../c-api/typeobj.rst:2794 msgid "" "Handle a request to *exporter* to fill in *view* as specified by *flags*. " "Except for point (3), an implementation of this function MUST take these " "steps:" msgstr "" -#: ../../c-api/typeobj.rst:2534 +#: ../../c-api/typeobj.rst:2798 msgid "" "Check if the request can be met. If not, raise :exc:`BufferError`, set :c:" "expr:`view->obj` to ``NULL`` and return ``-1``." msgstr "" -#: ../../c-api/typeobj.rst:2537 +#: ../../c-api/typeobj.rst:2801 msgid "Fill in the requested fields." msgstr "" -#: ../../c-api/typeobj.rst:2539 +#: ../../c-api/typeobj.rst:2803 msgid "Increment an internal counter for the number of exports." msgstr "" -#: ../../c-api/typeobj.rst:2541 +#: ../../c-api/typeobj.rst:2805 msgid "" "Set :c:expr:`view->obj` to *exporter* and increment :c:expr:`view->obj`." msgstr "" -#: ../../c-api/typeobj.rst:2543 +#: ../../c-api/typeobj.rst:2807 msgid "Return ``0``." msgstr "" -#: ../../c-api/typeobj.rst:2545 +#: ../../c-api/typeobj.rst:2809 msgid "" "If *exporter* is part of a chain or tree of buffer providers, two main " "schemes can be used:" msgstr "" -#: ../../c-api/typeobj.rst:2548 +#: ../../c-api/typeobj.rst:2812 msgid "" "Re-export: Each member of the tree acts as the exporting object and sets :c:" "expr:`view->obj` to a new reference to itself." msgstr "" -#: ../../c-api/typeobj.rst:2551 +#: ../../c-api/typeobj.rst:2815 msgid "" "Redirect: The buffer request is redirected to the root object of the tree. " "Here, :c:expr:`view->obj` will be a new reference to the root object." msgstr "" -#: ../../c-api/typeobj.rst:2555 +#: ../../c-api/typeobj.rst:2819 msgid "" "The individual fields of *view* are described in section :ref:`Buffer " "structure `, the rules how an exporter must react to " @@ -3778,7 +4188,7 @@ msgid "" "types>`." msgstr "" -#: ../../c-api/typeobj.rst:2560 +#: ../../c-api/typeobj.rst:2824 msgid "" "All memory pointed to in the :c:type:`Py_buffer` structure belongs to the " "exporter and must remain valid until there are no consumers left. :c:member:" @@ -3787,23 +4197,23 @@ msgid "" "internal` are read-only for the consumer." msgstr "" -#: ../../c-api/typeobj.rst:2567 +#: ../../c-api/typeobj.rst:2831 msgid "" ":c:func:`PyBuffer_FillInfo` provides an easy way of exposing a simple bytes " "buffer while dealing correctly with all request types." msgstr "" -#: ../../c-api/typeobj.rst:2570 +#: ../../c-api/typeobj.rst:2834 msgid "" ":c:func:`PyObject_GetBuffer` is the interface for the consumer that wraps " "this function." msgstr "" -#: ../../c-api/typeobj.rst:2577 +#: ../../c-api/typeobj.rst:2841 msgid "void (PyObject *exporter, Py_buffer *view);" msgstr "" -#: ../../c-api/typeobj.rst:2579 +#: ../../c-api/typeobj.rst:2843 msgid "" "Handle a request to release the resources of the buffer. If no resources " "need to be released, :c:member:`PyBufferProcs.bf_releasebuffer` may be " @@ -3811,15 +4221,15 @@ msgid "" "these optional steps:" msgstr "" -#: ../../c-api/typeobj.rst:2584 +#: ../../c-api/typeobj.rst:2848 msgid "Decrement an internal counter for the number of exports." msgstr "" -#: ../../c-api/typeobj.rst:2586 +#: ../../c-api/typeobj.rst:2850 msgid "If the counter is ``0``, free all memory associated with *view*." msgstr "" -#: ../../c-api/typeobj.rst:2588 +#: ../../c-api/typeobj.rst:2852 msgid "" "The exporter MUST use the :c:member:`~Py_buffer.internal` field to keep " "track of buffer-specific resources. This field is guaranteed to remain " @@ -3827,30 +4237,30 @@ msgid "" "*view* argument." msgstr "" -#: ../../c-api/typeobj.rst:2594 +#: ../../c-api/typeobj.rst:2858 msgid "" "This function MUST NOT decrement :c:expr:`view->obj`, since that is done " "automatically in :c:func:`PyBuffer_Release` (this scheme is useful for " "breaking reference cycles)." msgstr "" -#: ../../c-api/typeobj.rst:2599 +#: ../../c-api/typeobj.rst:2863 msgid "" ":c:func:`PyBuffer_Release` is the interface for the consumer that wraps this " "function." msgstr "" -#: ../../c-api/typeobj.rst:2607 +#: ../../c-api/typeobj.rst:2871 msgid "Async Object Structures" msgstr "" -#: ../../c-api/typeobj.rst:2615 +#: ../../c-api/typeobj.rst:2879 msgid "" "This structure holds pointers to the functions required to implement :term:" "`awaitable` and :term:`asynchronous iterator` objects." msgstr "" -#: ../../c-api/typeobj.rst:2620 +#: ../../c-api/typeobj.rst:2884 msgid "" "typedef struct {\n" " unaryfunc am_await;\n" @@ -3860,61 +4270,61 @@ msgid "" "} PyAsyncMethods;" msgstr "" -#: ../../c-api/typeobj.rst:2631 +#: ../../c-api/typeobj.rst:2895 msgid "PyObject *am_await(PyObject *self);" msgstr "" -#: ../../c-api/typeobj.rst:2633 +#: ../../c-api/typeobj.rst:2897 msgid "" "The returned object must be an :term:`iterator`, i.e. :c:func:`PyIter_Check` " "must return ``1`` for it." msgstr "" -#: ../../c-api/typeobj.rst:2636 +#: ../../c-api/typeobj.rst:2900 msgid "" "This slot may be set to ``NULL`` if an object is not an :term:`awaitable`." msgstr "" -#: ../../c-api/typeobj.rst:2642 +#: ../../c-api/typeobj.rst:2906 msgid "PyObject *am_aiter(PyObject *self);" msgstr "" -#: ../../c-api/typeobj.rst:2644 +#: ../../c-api/typeobj.rst:2908 msgid "" "Must return an :term:`asynchronous iterator` object. See :meth:`~object." "__anext__` for details." msgstr "" -#: ../../c-api/typeobj.rst:2647 +#: ../../c-api/typeobj.rst:2911 msgid "" "This slot may be set to ``NULL`` if an object does not implement " "asynchronous iteration protocol." msgstr "" -#: ../../c-api/typeobj.rst:2654 +#: ../../c-api/typeobj.rst:2918 msgid "PyObject *am_anext(PyObject *self);" msgstr "" -#: ../../c-api/typeobj.rst:2656 +#: ../../c-api/typeobj.rst:2920 msgid "" "Must return an :term:`awaitable` object. See :meth:`~object.__anext__` for " "details. This slot may be set to ``NULL``." msgstr "" -#: ../../c-api/typeobj.rst:2664 +#: ../../c-api/typeobj.rst:2928 msgid "PySendResult am_send(PyObject *self, PyObject *arg, PyObject **result);" msgstr "" -#: ../../c-api/typeobj.rst:2666 +#: ../../c-api/typeobj.rst:2930 msgid "" "See :c:func:`PyIter_Send` for details. This slot may be set to ``NULL``." msgstr "" -#: ../../c-api/typeobj.rst:2675 +#: ../../c-api/typeobj.rst:2939 msgid "Slot Type typedefs" msgstr "" -#: ../../c-api/typeobj.rst:2679 +#: ../../c-api/typeobj.rst:2943 msgid "" "The purpose of this function is to separate memory allocation from memory " "initialization. It should return a pointer to a block of memory of adequate " @@ -3928,80 +4338,80 @@ msgid "" "length of the block should be :c:member:`~PyTypeObject.tp_basicsize`." msgstr "" -#: ../../c-api/typeobj.rst:2689 +#: ../../c-api/typeobj.rst:2953 msgid "" "This function should not do any other instance initialization, not even to " "allocate additional memory; that should be done by :c:member:`~PyTypeObject." "tp_new`." msgstr "" -#: ../../c-api/typeobj.rst:2696 +#: ../../c-api/typeobj.rst:2960 msgid "See :c:member:`~PyTypeObject.tp_free`." msgstr "" -#: ../../c-api/typeobj.rst:2700 +#: ../../c-api/typeobj.rst:2964 msgid "See :c:member:`~PyTypeObject.tp_new`." msgstr "" -#: ../../c-api/typeobj.rst:2704 +#: ../../c-api/typeobj.rst:2968 msgid "See :c:member:`~PyTypeObject.tp_init`." msgstr "" -#: ../../c-api/typeobj.rst:2708 +#: ../../c-api/typeobj.rst:2972 msgid "See :c:member:`~PyTypeObject.tp_repr`." msgstr "" -#: ../../c-api/typeobj.rst:2712 ../../c-api/typeobj.rst:2721 +#: ../../c-api/typeobj.rst:2976 ../../c-api/typeobj.rst:2985 msgid "Return the value of the named attribute for the object." msgstr "" -#: ../../c-api/typeobj.rst:2716 ../../c-api/typeobj.rst:2727 +#: ../../c-api/typeobj.rst:2980 ../../c-api/typeobj.rst:2991 msgid "" "Set the value of the named attribute for the object. The value argument is " "set to ``NULL`` to delete the attribute." msgstr "" -#: ../../c-api/typeobj.rst:2723 +#: ../../c-api/typeobj.rst:2987 msgid "See :c:member:`~PyTypeObject.tp_getattro`." msgstr "" -#: ../../c-api/typeobj.rst:2730 +#: ../../c-api/typeobj.rst:2994 msgid "See :c:member:`~PyTypeObject.tp_setattro`." msgstr "" -#: ../../c-api/typeobj.rst:2734 +#: ../../c-api/typeobj.rst:2998 msgid "See :c:member:`~PyTypeObject.tp_descr_get`." msgstr "" -#: ../../c-api/typeobj.rst:2738 +#: ../../c-api/typeobj.rst:3002 msgid "See :c:member:`~PyTypeObject.tp_descr_set`." msgstr "" -#: ../../c-api/typeobj.rst:2742 +#: ../../c-api/typeobj.rst:3006 msgid "See :c:member:`~PyTypeObject.tp_hash`." msgstr "" -#: ../../c-api/typeobj.rst:2746 +#: ../../c-api/typeobj.rst:3010 msgid "See :c:member:`~PyTypeObject.tp_richcompare`." msgstr "" -#: ../../c-api/typeobj.rst:2750 +#: ../../c-api/typeobj.rst:3014 msgid "See :c:member:`~PyTypeObject.tp_iter`." msgstr "" -#: ../../c-api/typeobj.rst:2754 +#: ../../c-api/typeobj.rst:3018 msgid "See :c:member:`~PyTypeObject.tp_iternext`." msgstr "" -#: ../../c-api/typeobj.rst:2768 +#: ../../c-api/typeobj.rst:3032 msgid "See :c:member:`~PyAsyncMethods.am_send`." msgstr "" -#: ../../c-api/typeobj.rst:2784 +#: ../../c-api/typeobj.rst:3048 msgid "Examples" msgstr "" -#: ../../c-api/typeobj.rst:2786 +#: ../../c-api/typeobj.rst:3050 msgid "" "The following are simple examples of Python type definitions. They include " "common usage you may encounter. Some demonstrate tricky corner cases. For " @@ -4009,11 +4419,11 @@ msgid "" "and :ref:`new-types-topics`." msgstr "" -#: ../../c-api/typeobj.rst:2791 +#: ../../c-api/typeobj.rst:3055 msgid "A basic :ref:`static type `::" msgstr "" -#: ../../c-api/typeobj.rst:2793 +#: ../../c-api/typeobj.rst:3057 msgid "" "typedef struct {\n" " PyObject_HEAD\n" @@ -4031,13 +4441,13 @@ msgid "" "};" msgstr "" -#: ../../c-api/typeobj.rst:2808 +#: ../../c-api/typeobj.rst:3072 msgid "" "You may also find older code (especially in the CPython code base) with a " "more verbose initializer::" msgstr "" -#: ../../c-api/typeobj.rst:2811 +#: ../../c-api/typeobj.rst:3075 msgid "" "static PyTypeObject MyObject_Type = {\n" " PyVarObject_HEAD_INIT(NULL, 0)\n" @@ -4081,11 +4491,11 @@ msgid "" "};" msgstr "" -#: ../../c-api/typeobj.rst:2852 +#: ../../c-api/typeobj.rst:3116 msgid "A type that supports weakrefs, instance dicts, and hashing::" msgstr "" -#: ../../c-api/typeobj.rst:2854 +#: ../../c-api/typeobj.rst:3118 msgid "" "typedef struct {\n" " PyObject_HEAD\n" @@ -4111,14 +4521,14 @@ msgid "" "};" msgstr "" -#: ../../c-api/typeobj.rst:2877 +#: ../../c-api/typeobj.rst:3141 msgid "" "A str subclass that cannot be subclassed and cannot be called to create " "instances (e.g. uses a separate factory func) using :c:macro:" "`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag::" msgstr "" -#: ../../c-api/typeobj.rst:2881 +#: ../../c-api/typeobj.rst:3145 msgid "" "typedef struct {\n" " PyUnicodeObject raw;\n" @@ -4136,12 +4546,12 @@ msgid "" "};" msgstr "" -#: ../../c-api/typeobj.rst:2896 +#: ../../c-api/typeobj.rst:3160 msgid "" "The simplest :ref:`static type ` with fixed-length instances::" msgstr "" -#: ../../c-api/typeobj.rst:2898 +#: ../../c-api/typeobj.rst:3162 msgid "" "typedef struct {\n" " PyObject_HEAD\n" @@ -4153,13 +4563,13 @@ msgid "" "};" msgstr "" -#: ../../c-api/typeobj.rst:2907 +#: ../../c-api/typeobj.rst:3171 msgid "" "The simplest :ref:`static type ` with variable-length " "instances::" msgstr "" -#: ../../c-api/typeobj.rst:2909 +#: ../../c-api/typeobj.rst:3173 msgid "" "typedef struct {\n" " PyObject_VAR_HEAD\n" @@ -4174,14 +4584,14 @@ msgid "" "};" msgstr "" -#: ../../c-api/typeobj.rst:847 ../../c-api/typeobj.rst:912 +#: ../../c-api/typeobj.rst:912 ../../c-api/typeobj.rst:977 msgid "built-in function" msgstr "" -#: ../../c-api/typeobj.rst:847 +#: ../../c-api/typeobj.rst:912 msgid "repr" msgstr "" -#: ../../c-api/typeobj.rst:912 +#: ../../c-api/typeobj.rst:977 msgid "hash" msgstr "" diff --git a/c-api/unicode.po b/c-api/unicode.po index df0fd43da..dc46aa3e5 100644 --- a/c-api/unicode.po +++ b/c-api/unicode.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:50+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -1794,30 +1795,26 @@ msgid "" "c:macro:`!CP_ACP` code page to get the MBCS encoder." msgstr "" -#: ../../c-api/unicode.rst:1465 -msgid "Methods & Slots" -msgstr "" - -#: ../../c-api/unicode.rst:1471 +#: ../../c-api/unicode.rst:1467 msgid "Methods and Slot Functions" msgstr "" -#: ../../c-api/unicode.rst:1473 +#: ../../c-api/unicode.rst:1469 msgid "" "The following APIs are capable of handling Unicode objects and strings on " "input (we refer to them as strings in the descriptions) and return Unicode " "objects or integers as appropriate." msgstr "" -#: ../../c-api/unicode.rst:1477 +#: ../../c-api/unicode.rst:1473 msgid "They all return ``NULL`` or ``-1`` if an exception occurs." msgstr "" -#: ../../c-api/unicode.rst:1482 +#: ../../c-api/unicode.rst:1478 msgid "Concat two strings giving a new Unicode string." msgstr "" -#: ../../c-api/unicode.rst:1487 +#: ../../c-api/unicode.rst:1483 msgid "" "Split a string giving a list of Unicode strings. If *sep* is ``NULL``, " "splitting will be done at all whitespace substrings. Otherwise, splits " @@ -1826,33 +1823,33 @@ msgid "" "list." msgstr "" -#: ../../c-api/unicode.rst:1492 ../../c-api/unicode.rst:1502 -#: ../../c-api/unicode.rst:1523 ../../c-api/unicode.rst:1536 +#: ../../c-api/unicode.rst:1488 ../../c-api/unicode.rst:1498 +#: ../../c-api/unicode.rst:1519 ../../c-api/unicode.rst:1532 msgid "On error, return ``NULL`` with an exception set." msgstr "" -#: ../../c-api/unicode.rst:1494 +#: ../../c-api/unicode.rst:1490 msgid "Equivalent to :py:meth:`str.split`." msgstr "" -#: ../../c-api/unicode.rst:1499 +#: ../../c-api/unicode.rst:1495 msgid "" "Similar to :c:func:`PyUnicode_Split`, but splitting will be done beginning " "at the end of the string." msgstr "" -#: ../../c-api/unicode.rst:1504 +#: ../../c-api/unicode.rst:1500 msgid "Equivalent to :py:meth:`str.rsplit`." msgstr "" -#: ../../c-api/unicode.rst:1509 +#: ../../c-api/unicode.rst:1505 msgid "" "Split a Unicode string at line breaks, returning a list of Unicode strings. " "CRLF is considered to be one line break. If *keepends* is ``0``, the Line " "break characters are not included in the resulting strings." msgstr "" -#: ../../c-api/unicode.rst:1516 +#: ../../c-api/unicode.rst:1512 msgid "" "Split a Unicode string at the first occurrence of *sep*, and return a 3-" "tuple containing the part before the separator, the separator itself, and " @@ -1860,39 +1857,39 @@ msgid "" "tuple containing the string itself, followed by two empty strings." msgstr "" -#: ../../c-api/unicode.rst:1521 ../../c-api/unicode.rst:1534 +#: ../../c-api/unicode.rst:1517 ../../c-api/unicode.rst:1530 msgid "*sep* must not be empty." msgstr "" -#: ../../c-api/unicode.rst:1525 +#: ../../c-api/unicode.rst:1521 msgid "Equivalent to :py:meth:`str.partition`." msgstr "" -#: ../../c-api/unicode.rst:1530 +#: ../../c-api/unicode.rst:1526 msgid "" "Similar to :c:func:`PyUnicode_Partition`, but split a Unicode string at the " "last occurrence of *sep*. If the separator is not found, return a 3-tuple " "containing two empty strings, followed by the string itself." msgstr "" -#: ../../c-api/unicode.rst:1538 +#: ../../c-api/unicode.rst:1534 msgid "Equivalent to :py:meth:`str.rpartition`." msgstr "" -#: ../../c-api/unicode.rst:1543 +#: ../../c-api/unicode.rst:1539 msgid "" "Join a sequence of strings using the given *separator* and return the " "resulting Unicode string." msgstr "" -#: ../../c-api/unicode.rst:1550 +#: ../../c-api/unicode.rst:1546 msgid "" "Return ``1`` if *substr* matches ``unicode[start:end]`` at the given tail " "end (*direction* == ``-1`` means to do a prefix match, *direction* == ``1`` " "a suffix match), ``0`` otherwise. Return ``-1`` if an error occurred." msgstr "" -#: ../../c-api/unicode.rst:1558 +#: ../../c-api/unicode.rst:1554 msgid "" "Return the first position of *substr* in ``unicode[start:end]`` using the " "given *direction* (*direction* == ``1`` means to do a forward search, " @@ -1901,7 +1898,7 @@ msgid "" "``-2`` indicates that an error occurred and an exception has been set." msgstr "" -#: ../../c-api/unicode.rst:1568 +#: ../../c-api/unicode.rst:1564 msgid "" "Return the first position of the character *ch* in ``unicode[start:end]`` " "using the given *direction* (*direction* == ``1`` means to do a forward " @@ -1911,73 +1908,73 @@ msgid "" "set." msgstr "" -#: ../../c-api/unicode.rst:1576 +#: ../../c-api/unicode.rst:1572 msgid "" "*start* and *end* are now adjusted to behave like ``unicode[start:end]``." msgstr "" -#: ../../c-api/unicode.rst:1583 +#: ../../c-api/unicode.rst:1579 msgid "" "Return the number of non-overlapping occurrences of *substr* in " "``unicode[start:end]``. Return ``-1`` if an error occurred." msgstr "" -#: ../../c-api/unicode.rst:1590 +#: ../../c-api/unicode.rst:1586 msgid "" "Replace at most *maxcount* occurrences of *substr* in *unicode* with " "*replstr* and return the resulting Unicode object. *maxcount* == ``-1`` " "means replace all occurrences." msgstr "" -#: ../../c-api/unicode.rst:1597 +#: ../../c-api/unicode.rst:1593 msgid "" "Compare two strings and return ``-1``, ``0``, ``1`` for less than, equal, " "and greater than, respectively." msgstr "" -#: ../../c-api/unicode.rst:1600 +#: ../../c-api/unicode.rst:1596 msgid "" "This function returns ``-1`` upon failure, so one should call :c:func:" "`PyErr_Occurred` to check for errors." msgstr "" -#: ../../c-api/unicode.rst:1605 +#: ../../c-api/unicode.rst:1601 msgid "The :c:func:`PyUnicode_Equal` function." msgstr "" -#: ../../c-api/unicode.rst:1610 +#: ../../c-api/unicode.rst:1606 msgid "Test if two strings are equal:" msgstr "" -#: ../../c-api/unicode.rst:1612 +#: ../../c-api/unicode.rst:1608 msgid "Return ``1`` if *a* is equal to *b*." msgstr "" -#: ../../c-api/unicode.rst:1613 +#: ../../c-api/unicode.rst:1609 msgid "Return ``0`` if *a* is not equal to *b*." msgstr "" -#: ../../c-api/unicode.rst:1614 +#: ../../c-api/unicode.rst:1610 msgid "" "Set a :exc:`TypeError` exception and return ``-1`` if *a* or *b* is not a :" "class:`str` object." msgstr "" -#: ../../c-api/unicode.rst:1617 +#: ../../c-api/unicode.rst:1613 msgid "The function always succeeds if *a* and *b* are :class:`str` objects." msgstr "" -#: ../../c-api/unicode.rst:1619 +#: ../../c-api/unicode.rst:1615 msgid "" "The function works for :class:`str` subclasses, but does not honor custom " "``__eq__()`` method." msgstr "" -#: ../../c-api/unicode.rst:1624 +#: ../../c-api/unicode.rst:1620 msgid "The :c:func:`PyUnicode_Compare` function." msgstr "" -#: ../../c-api/unicode.rst:1631 +#: ../../c-api/unicode.rst:1627 msgid "" "Compare a Unicode object with a char buffer which is interpreted as being " "UTF-8 or ASCII encoded and return true (``1``) if they are equal, or false " @@ -1986,18 +1983,18 @@ msgid "" "is returned." msgstr "" -#: ../../c-api/unicode.rst:1638 ../../c-api/unicode.rst:1659 +#: ../../c-api/unicode.rst:1634 ../../c-api/unicode.rst:1655 msgid "This function does not raise exceptions." msgstr "" -#: ../../c-api/unicode.rst:1645 +#: ../../c-api/unicode.rst:1641 msgid "" "Similar to :c:func:`PyUnicode_EqualToUTF8AndSize`, but compute *string* " "length using :c:func:`!strlen`. If the Unicode object contains null " "characters, false (``0``) is returned." msgstr "" -#: ../../c-api/unicode.rst:1654 +#: ../../c-api/unicode.rst:1650 msgid "" "Compare a Unicode object, *unicode*, with *string* and return ``-1``, ``0``, " "``1`` for less than, equal, and greater than, respectively. It is best to " @@ -2005,47 +2002,47 @@ msgid "" "string as ISO-8859-1 if it contains non-ASCII characters." msgstr "" -#: ../../c-api/unicode.rst:1664 +#: ../../c-api/unicode.rst:1660 msgid "Rich compare two Unicode strings and return one of the following:" msgstr "" -#: ../../c-api/unicode.rst:1666 +#: ../../c-api/unicode.rst:1662 msgid "``NULL`` in case an exception was raised" msgstr "" -#: ../../c-api/unicode.rst:1667 +#: ../../c-api/unicode.rst:1663 msgid ":c:data:`Py_True` or :c:data:`Py_False` for successful comparisons" msgstr "" -#: ../../c-api/unicode.rst:1668 +#: ../../c-api/unicode.rst:1664 msgid ":c:data:`Py_NotImplemented` in case the type combination is unknown" msgstr "" -#: ../../c-api/unicode.rst:1670 +#: ../../c-api/unicode.rst:1666 msgid "" "Possible values for *op* are :c:macro:`Py_GT`, :c:macro:`Py_GE`, :c:macro:" "`Py_EQ`, :c:macro:`Py_NE`, :c:macro:`Py_LT`, and :c:macro:`Py_LE`." msgstr "" -#: ../../c-api/unicode.rst:1676 +#: ../../c-api/unicode.rst:1672 msgid "" "Return a new string object from *format* and *args*; this is analogous to " "``format % args``." msgstr "" -#: ../../c-api/unicode.rst:1682 +#: ../../c-api/unicode.rst:1678 msgid "" "Check whether *substr* is contained in *unicode* and return true or false " "accordingly." msgstr "" -#: ../../c-api/unicode.rst:1685 +#: ../../c-api/unicode.rst:1681 msgid "" "*substr* has to coerce to a one element Unicode string. ``-1`` is returned " "if there was an error." msgstr "" -#: ../../c-api/unicode.rst:1691 +#: ../../c-api/unicode.rst:1687 msgid "" "Intern the argument :c:expr:`*p_unicode` in place. The argument must be the " "address of a pointer variable pointing to a Python Unicode string object. " @@ -2056,7 +2053,7 @@ msgid "" "interns it." msgstr "" -#: ../../c-api/unicode.rst:1698 +#: ../../c-api/unicode.rst:1694 msgid "" "(Clarification: even though there is a lot of talk about references, think " "of this function as reference-neutral. You must own the object you pass in; " @@ -2064,39 +2061,39 @@ msgid "" "the result.)" msgstr "" -#: ../../c-api/unicode.rst:1703 +#: ../../c-api/unicode.rst:1699 msgid "" "This function never raises an exception. On error, it leaves its argument " "unchanged without interning it." msgstr "" -#: ../../c-api/unicode.rst:1706 +#: ../../c-api/unicode.rst:1702 msgid "" "Instances of subclasses of :py:class:`str` may not be interned, that is, :c:" "expr:`PyUnicode_CheckExact(*p_unicode)` must be true. If it is not, then -- " "as with any other error -- the argument is left unchanged." msgstr "" -#: ../../c-api/unicode.rst:1710 +#: ../../c-api/unicode.rst:1706 msgid "" "Note that interned strings are not “immortal”. You must keep a reference to " "the result to benefit from interning." msgstr "" -#: ../../c-api/unicode.rst:1716 +#: ../../c-api/unicode.rst:1712 msgid "" "A combination of :c:func:`PyUnicode_FromString` and :c:func:" "`PyUnicode_InternInPlace`, meant for statically allocated strings." msgstr "" -#: ../../c-api/unicode.rst:1719 +#: ../../c-api/unicode.rst:1715 msgid "" "Return a new (\"owned\") reference to either a new Unicode string object " "that has been interned, or an earlier interned string object with the same " "value." msgstr "" -#: ../../c-api/unicode.rst:1723 +#: ../../c-api/unicode.rst:1719 msgid "" "Python may keep a reference to the result, or make it :term:`immortal`, " "preventing it from being garbage-collected promptly. For interning an " @@ -2105,18 +2102,14 @@ msgid "" "`PyUnicode_InternInPlace` directly." msgstr "" -#: ../../c-api/unicode.rst:1731 -msgid "Strings interned this way are made :term:`immortal`." -msgstr "" - -#: ../../c-api/unicode.rst:1736 +#: ../../c-api/unicode.rst:1728 msgid "" "Return a non-zero value if *str* is interned, zero if not. The *str* " "argument must be a string; this is not checked. This function always " "succeeds." msgstr "" -#: ../../c-api/unicode.rst:1742 +#: ../../c-api/unicode.rst:1734 msgid "" "A non-zero return value may carry additional information about *how* the " "string is interned. The meaning of such non-zero values, as well as each " @@ -2124,201 +2117,212 @@ msgid "" "versions." msgstr "" -#: ../../c-api/unicode.rst:1749 +#: ../../c-api/unicode.rst:1741 msgid "PyUnicodeWriter" msgstr "" -#: ../../c-api/unicode.rst:1751 +#: ../../c-api/unicode.rst:1743 msgid "" "The :c:type:`PyUnicodeWriter` API can be used to create a Python :class:" "`str` object." msgstr "" -#: ../../c-api/unicode.rst:1758 +#: ../../c-api/unicode.rst:1750 msgid "A Unicode writer instance." msgstr "" -#: ../../c-api/unicode.rst:1760 +#: ../../c-api/unicode.rst:1752 msgid "" "The instance must be destroyed by :c:func:`PyUnicodeWriter_Finish` on " "success, or :c:func:`PyUnicodeWriter_Discard` on error." msgstr "" -#: ../../c-api/unicode.rst:1765 +#: ../../c-api/unicode.rst:1757 msgid "Create a Unicode writer instance." msgstr "" -#: ../../c-api/unicode.rst:1767 +#: ../../c-api/unicode.rst:1759 msgid "*length* must be greater than or equal to ``0``." msgstr "" -#: ../../c-api/unicode.rst:1769 +#: ../../c-api/unicode.rst:1761 msgid "" "If *length* is greater than ``0``, preallocate an internal buffer of " "*length* characters." msgstr "" -#: ../../c-api/unicode.rst:1772 ../../c-api/unicode.rst:1778 +#: ../../c-api/unicode.rst:1764 ../../c-api/unicode.rst:1770 msgid "Set an exception and return ``NULL`` on error." msgstr "" -#: ../../c-api/unicode.rst:1776 +#: ../../c-api/unicode.rst:1768 msgid "" "Return the final Python :class:`str` object and destroy the writer instance." msgstr "" -#: ../../c-api/unicode.rst:1780 ../../c-api/unicode.rst:1788 +#: ../../c-api/unicode.rst:1772 ../../c-api/unicode.rst:1780 msgid "The writer instance is invalid after this call." msgstr "" -#: ../../c-api/unicode.rst:1784 +#: ../../c-api/unicode.rst:1776 msgid "Discard the internal Unicode buffer and destroy the writer instance." msgstr "" -#: ../../c-api/unicode.rst:1786 +#: ../../c-api/unicode.rst:1778 msgid "If *writer* is ``NULL``, no operation is performed." msgstr "" -#: ../../c-api/unicode.rst:1792 +#: ../../c-api/unicode.rst:1784 msgid "Write the single Unicode character *ch* into *writer*." msgstr "" -#: ../../c-api/unicode.rst:1794 ../../c-api/unicode.rst:1804 -#: ../../c-api/unicode.rst:1816 ../../c-api/unicode.rst:1825 +#: ../../c-api/unicode.rst:1786 ../../c-api/unicode.rst:1796 +#: ../../c-api/unicode.rst:1811 ../../c-api/unicode.rst:1823 #: ../../c-api/unicode.rst:1832 ../../c-api/unicode.rst:1839 -#: ../../c-api/unicode.rst:1850 ../../c-api/unicode.rst:1857 -#: ../../c-api/unicode.rst:1876 +#: ../../c-api/unicode.rst:1846 ../../c-api/unicode.rst:1857 +#: ../../c-api/unicode.rst:1864 ../../c-api/unicode.rst:1883 msgid "" "On success, return ``0``. On error, set an exception, leave the writer " "unchanged, and return ``-1``." msgstr "" -#: ../../c-api/unicode.rst:1799 +#: ../../c-api/unicode.rst:1791 msgid "" "Decode the string *str* from UTF-8 in strict mode and write the output into " "*writer*." msgstr "" -#: ../../c-api/unicode.rst:1801 ../../c-api/unicode.rst:1865 +#: ../../c-api/unicode.rst:1793 ../../c-api/unicode.rst:1805 +#: ../../c-api/unicode.rst:1872 msgid "" "*size* is the string length in bytes. If *size* is equal to ``-1``, call " "``strlen(str)`` to get the string length." msgstr "" -#: ../../c-api/unicode.rst:1807 +#: ../../c-api/unicode.rst:1799 msgid "See also :c:func:`PyUnicodeWriter_DecodeUTF8Stateful`." msgstr "" -#: ../../c-api/unicode.rst:1811 -msgid "Writer the wide string *str* into *writer*." +#: ../../c-api/unicode.rst:1803 +msgid "Write the ASCII string *str* into *writer*." +msgstr "" + +#: ../../c-api/unicode.rst:1808 +msgid "" +"*str* must only contain ASCII characters. The behavior is undefined if *str* " +"contains non-ASCII characters." +msgstr "" + +#: ../../c-api/unicode.rst:1818 +msgid "Write the wide string *str* into *writer*." msgstr "" -#: ../../c-api/unicode.rst:1813 +#: ../../c-api/unicode.rst:1820 msgid "" "*size* is a number of wide characters. If *size* is equal to ``-1``, call " "``wcslen(str)`` to get the string length." msgstr "" -#: ../../c-api/unicode.rst:1821 +#: ../../c-api/unicode.rst:1828 msgid "Writer the UCS4 string *str* into *writer*." msgstr "" -#: ../../c-api/unicode.rst:1823 +#: ../../c-api/unicode.rst:1830 msgid "*size* is a number of UCS4 characters." msgstr "" -#: ../../c-api/unicode.rst:1830 +#: ../../c-api/unicode.rst:1837 msgid "" "Call :c:func:`PyObject_Str` on *obj* and write the output into *writer*." msgstr "" -#: ../../c-api/unicode.rst:1837 +#: ../../c-api/unicode.rst:1844 msgid "" "Call :c:func:`PyObject_Repr` on *obj* and write the output into *writer*." msgstr "" -#: ../../c-api/unicode.rst:1844 +#: ../../c-api/unicode.rst:1851 msgid "Write the substring ``str[start:end]`` into *writer*." msgstr "" -#: ../../c-api/unicode.rst:1846 +#: ../../c-api/unicode.rst:1853 msgid "" "*str* must be Python :class:`str` object. *start* must be greater than or " "equal to 0, and less than or equal to *end*. *end* must be less than or " "equal to *str* length." msgstr "" -#: ../../c-api/unicode.rst:1855 +#: ../../c-api/unicode.rst:1862 msgid "" "Similar to :c:func:`PyUnicode_FromFormat`, but write the output directly " "into *writer*." msgstr "" -#: ../../c-api/unicode.rst:1862 +#: ../../c-api/unicode.rst:1869 msgid "" "Decode the string *str* from UTF-8 with *errors* error handler and write the " "output into *writer*." msgstr "" -#: ../../c-api/unicode.rst:1868 +#: ../../c-api/unicode.rst:1875 msgid "" "*errors* is an :ref:`error handler ` name, such as " "``\"replace\"``. If *errors* is ``NULL``, use the strict error handler." msgstr "" -#: ../../c-api/unicode.rst:1871 +#: ../../c-api/unicode.rst:1878 msgid "" "If *consumed* is not ``NULL``, set *\\*consumed* to the number of decoded " "bytes on success. If *consumed* is ``NULL``, treat trailing incomplete UTF-8 " "byte sequences as an error." msgstr "" -#: ../../c-api/unicode.rst:1879 +#: ../../c-api/unicode.rst:1886 msgid "See also :c:func:`PyUnicodeWriter_WriteUTF8`." msgstr "" -#: ../../c-api/unicode.rst:1882 +#: ../../c-api/unicode.rst:1889 msgid "Deprecated API" msgstr "" -#: ../../c-api/unicode.rst:1884 +#: ../../c-api/unicode.rst:1891 msgid "The following API is deprecated." msgstr "" -#: ../../c-api/unicode.rst:1888 +#: ../../c-api/unicode.rst:1895 msgid "" "This is a typedef of :c:type:`wchar_t`, which is a 16-bit type or 32-bit " "type depending on the platform. Please use :c:type:`wchar_t` directly " "instead." msgstr "" -#: ../../c-api/unicode.rst:1892 +#: ../../c-api/unicode.rst:1899 msgid "" "In previous versions, this was a 16-bit type or a 32-bit type depending on " "whether you selected a \"narrow\" or \"wide\" Unicode version of Python at " "build time." msgstr "" -#: ../../c-api/unicode.rst:1902 +#: ../../c-api/unicode.rst:1909 msgid "" "Do nothing and return ``0``. This API is kept only for backward " "compatibility, but there are no plans to remove it." msgstr "" -#: ../../c-api/unicode.rst:1908 +#: ../../c-api/unicode.rst:1915 msgid "" "This API does nothing since Python 3.12. Previously, this needed to be " "called for each string created using the old API (:c:func:`!" "PyUnicode_FromUnicode` or similar)." msgstr "" -#: ../../c-api/unicode.rst:1916 +#: ../../c-api/unicode.rst:1923 msgid "" "Do nothing and return ``1``. This API is kept only for backward " "compatibility, but there are no plans to remove it." msgstr "" -#: ../../c-api/unicode.rst:1922 +#: ../../c-api/unicode.rst:1929 msgid "" "This API does nothing since Python 3.12. Previously, this could be called to " "check if :c:func:`PyUnicode_READY` is necessary." diff --git a/c-api/utilities.po b/c-api/utilities.po index 0b24dbdf0..ffcf5e810 100644 --- a/c-api/utilities.po +++ b/c-api/utilities.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:50+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/c-api/veryhigh.po b/c-api/veryhigh.po index 50a8ab0d7..29aee9319 100644 --- a/c-api/veryhigh.po +++ b/c-api/veryhigh.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:50+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" @@ -400,10 +400,12 @@ msgid "" "mod:`!ast` Python module, which exports these constants under the same names." msgstr "" -#: ../../c-api/veryhigh.rst:366 +#: ../../c-api/veryhigh.rst:364 msgid "" -"This bit can be set in *flags* to cause division operator ``/`` to be " -"interpreted as \"true division\" according to :pep:`238`." +"The \"``PyCF``\" flags above can be combined with \"``CO_FUTURE``\" flags " +"such as :c:macro:`CO_FUTURE_ANNOTATIONS` to enable features normally " +"selectable using :ref:`future statements `. See :ref:" +"`c_codeobject_flags` for a complete list." msgstr "" #: ../../c-api/veryhigh.rst:301 ../../c-api/veryhigh.rst:309 diff --git a/c-api/weakref.po b/c-api/weakref.po index 99ec15aa0..60556bdcb 100644 --- a/c-api/weakref.po +++ b/c-api/weakref.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:50+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/contents.po b/contents.po index e775f16f5..c5af27074 100644 --- a/contents.po +++ b/contents.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:47+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/copyright.po b/copyright.po index 356591f8b..273092abb 100644 --- a/copyright.po +++ b/copyright.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:47+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/deprecations/c-api-pending-removal-in-3.14.po b/deprecations/c-api-pending-removal-in-3.14.po index b65fdf83f..7dcf25a06 100644 --- a/deprecations/c-api-pending-removal-in-3.14.po +++ b/deprecations/c-api-pending-removal-in-3.14.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2024-08-02 14:17+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/deprecations/c-api-pending-removal-in-3.15.po b/deprecations/c-api-pending-removal-in-3.15.po index 1904c1dbc..02bfa73cc 100644 --- a/deprecations/c-api-pending-removal-in-3.15.po +++ b/deprecations/c-api-pending-removal-in-3.15.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2024-08-02 14:17+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" @@ -23,16 +23,12 @@ msgid "Pending removal in Python 3.15" msgstr "" #: ../../deprecations/c-api-pending-removal-in-3.15.rst:4 -msgid "The bundled copy of ``libmpdecimal``." -msgstr "" - -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:5 msgid "" "The :c:func:`PyImport_ImportModuleNoBlock`: Use :c:func:" "`PyImport_ImportModule` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:7 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:6 msgid "" ":c:func:`PyWeakref_GetObject` and :c:func:`PyWeakref_GET_OBJECT`: Use :c:" "func:`PyWeakref_GetRef` instead. The `pythoncapi-compat project ` (:data:`sys.path`) instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:28 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:27 msgid "" ":c:func:`Py_GetPrefix`: Use :c:func:`PyConfig_Get(\"base_prefix\") " "` (:data:`sys.base_prefix`) instead. Use :c:func:" @@ -88,7 +84,7 @@ msgid "" "`virtual environments ` need to be handled." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:33 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:32 msgid "" ":c:func:`Py_GetExecPrefix`: Use :c:func:`PyConfig_Get(\"base_exec_prefix\") " "` (:data:`sys.base_exec_prefix`) instead. Use :c:func:" @@ -96,176 +92,176 @@ msgid "" "ref:`virtual environments ` need to be handled." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:39 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:38 msgid "" ":c:func:`Py_GetProgramFullPath`: Use :c:func:`PyConfig_Get(\"executable\") " "` (:data:`sys.executable`) instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:42 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:41 msgid "" ":c:func:`Py_GetProgramName`: Use :c:func:`PyConfig_Get(\"executable\") " "` (:data:`sys.executable`) instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:45 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:44 msgid "" ":c:func:`Py_GetPythonHome`: Use :c:func:`PyConfig_Get(\"home\") " "` or the :envvar:`PYTHONHOME` environment variable instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:49 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:48 msgid "" "The `pythoncapi-compat project `__ can be used to get :c:func:`PyConfig_Get` on Python 3.13 and older." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:53 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:52 msgid "" "Functions to configure Python's initialization, deprecated in Python 3.11:" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:55 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:54 msgid ":c:func:`!PySys_SetArgvEx()`: Set :c:member:`PyConfig.argv` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:57 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:56 msgid ":c:func:`!PySys_SetArgv()`: Set :c:member:`PyConfig.argv` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:59 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:58 msgid "" ":c:func:`!Py_SetProgramName()`: Set :c:member:`PyConfig.program_name` " "instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:61 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:60 msgid ":c:func:`!Py_SetPythonHome()`: Set :c:member:`PyConfig.home` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:63 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:62 msgid "" ":c:func:`PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!" "warnings.filters` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:66 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:65 msgid "" "The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:" "`PyConfig` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:69 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:68 msgid "Global configuration variables:" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:71 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:70 msgid "" ":c:var:`Py_DebugFlag`: Use :c:member:`PyConfig.parser_debug` or :c:func:" "`PyConfig_Get(\"parser_debug\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:74 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:73 msgid "" ":c:var:`Py_VerboseFlag`: Use :c:member:`PyConfig.verbose` or :c:func:" "`PyConfig_Get(\"verbose\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:77 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:76 msgid "" ":c:var:`Py_QuietFlag`: Use :c:member:`PyConfig.quiet` or :c:func:" "`PyConfig_Get(\"quiet\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:80 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:79 msgid "" ":c:var:`Py_InteractiveFlag`: Use :c:member:`PyConfig.interactive` or :c:func:" "`PyConfig_Get(\"interactive\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:83 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:82 msgid "" ":c:var:`Py_InspectFlag`: Use :c:member:`PyConfig.inspect` or :c:func:" "`PyConfig_Get(\"inspect\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:86 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:85 msgid "" ":c:var:`Py_OptimizeFlag`: Use :c:member:`PyConfig.optimization_level` or :c:" "func:`PyConfig_Get(\"optimization_level\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:89 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:88 msgid "" ":c:var:`Py_NoSiteFlag`: Use :c:member:`PyConfig.site_import` or :c:func:" "`PyConfig_Get(\"site_import\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:92 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:91 msgid "" ":c:var:`Py_BytesWarningFlag`: Use :c:member:`PyConfig.bytes_warning` or :c:" "func:`PyConfig_Get(\"bytes_warning\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:95 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:94 msgid "" ":c:var:`Py_FrozenFlag`: Use :c:member:`PyConfig.pathconfig_warnings` or :c:" "func:`PyConfig_Get(\"pathconfig_warnings\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:98 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:97 msgid "" ":c:var:`Py_IgnoreEnvironmentFlag`: Use :c:member:`PyConfig.use_environment` " "or :c:func:`PyConfig_Get(\"use_environment\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:101 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:100 msgid "" ":c:var:`Py_DontWriteBytecodeFlag`: Use :c:member:`PyConfig.write_bytecode` " "or :c:func:`PyConfig_Get(\"write_bytecode\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:104 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:103 msgid "" ":c:var:`Py_NoUserSiteDirectory`: Use :c:member:`PyConfig." "user_site_directory` or :c:func:`PyConfig_Get(\"user_site_directory\") " "` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:107 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:106 msgid "" ":c:var:`Py_UnbufferedStdioFlag`: Use :c:member:`PyConfig.buffered_stdio` or :" "c:func:`PyConfig_Get(\"buffered_stdio\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:110 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:109 msgid "" ":c:var:`Py_HashRandomizationFlag`: Use :c:member:`PyConfig.use_hash_seed` " "and :c:member:`PyConfig.hash_seed` or :c:func:`PyConfig_Get(\"hash_seed\") " "` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:114 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:113 msgid "" ":c:var:`Py_IsolatedFlag`: Use :c:member:`PyConfig.isolated` or :c:func:" "`PyConfig_Get(\"isolated\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:117 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:116 msgid "" ":c:var:`Py_LegacyWindowsFSEncodingFlag`: Use :c:member:`PyPreConfig." "legacy_windows_fs_encoding` or :c:func:" "`PyConfig_Get(\"legacy_windows_fs_encoding\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:120 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:119 msgid "" ":c:var:`Py_LegacyWindowsStdioFlag`: Use :c:member:`PyConfig." "legacy_windows_stdio` or :c:func:`PyConfig_Get(\"legacy_windows_stdio\") " "` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:123 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:122 msgid "" ":c:var:`!Py_FileSystemDefaultEncoding`, :c:var:`!" "Py_HasFileSystemDefaultEncoding`: Use :c:member:`PyConfig." @@ -273,21 +269,21 @@ msgid "" "` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:126 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:125 msgid "" ":c:var:`!Py_FileSystemDefaultEncodeErrors`: Use :c:member:`PyConfig." "filesystem_errors` or :c:func:`PyConfig_Get(\"filesystem_errors\") " "` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:129 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:128 msgid "" ":c:var:`!Py_UTF8Mode`: Use :c:member:`PyPreConfig.utf8_mode` or :c:func:" "`PyConfig_Get(\"utf8_mode\") ` instead. (see :c:func:" "`Py_PreInitialize`)" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:134 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:133 msgid "" "The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:" "`PyConfig` to set these options. Or :c:func:`PyConfig_Get` can be used to " diff --git a/deprecations/c-api-pending-removal-in-future.po b/deprecations/c-api-pending-removal-in-future.po index 8990200ec..feb1e0e76 100644 --- a/deprecations/c-api-pending-removal-in-future.po +++ b/deprecations/c-api-pending-removal-in-future.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2024-08-02 14:17+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/deprecations/index.po b/deprecations/index.po index 7031a8b8d..f5eee9829 100644 --- a/deprecations/index.po +++ b/deprecations/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2024-07-29 04:07+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" @@ -782,16 +782,12 @@ msgid "C API deprecations" msgstr "" #: ../../deprecations/c-api-pending-removal-in-3.15.rst:4 -msgid "The bundled copy of ``libmpdecimal``." -msgstr "" - -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:5 msgid "" "The :c:func:`PyImport_ImportModuleNoBlock`: Use :c:func:" "`PyImport_ImportModule` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:7 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:6 msgid "" ":c:func:`PyWeakref_GetObject` and :c:func:`PyWeakref_GET_OBJECT`: Use :c:" "func:`PyWeakref_GetRef` instead. The `pythoncapi-compat project ` (:data:`sys.path`) instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:28 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:27 msgid "" ":c:func:`Py_GetPrefix`: Use :c:func:`PyConfig_Get(\"base_prefix\") " "` (:data:`sys.base_prefix`) instead. Use :c:func:" @@ -847,7 +843,7 @@ msgid "" "`virtual environments ` need to be handled." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:33 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:32 msgid "" ":c:func:`Py_GetExecPrefix`: Use :c:func:`PyConfig_Get(\"base_exec_prefix\") " "` (:data:`sys.base_exec_prefix`) instead. Use :c:func:" @@ -855,176 +851,176 @@ msgid "" "ref:`virtual environments ` need to be handled." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:39 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:38 msgid "" ":c:func:`Py_GetProgramFullPath`: Use :c:func:`PyConfig_Get(\"executable\") " "` (:data:`sys.executable`) instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:42 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:41 msgid "" ":c:func:`Py_GetProgramName`: Use :c:func:`PyConfig_Get(\"executable\") " "` (:data:`sys.executable`) instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:45 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:44 msgid "" ":c:func:`Py_GetPythonHome`: Use :c:func:`PyConfig_Get(\"home\") " "` or the :envvar:`PYTHONHOME` environment variable instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:49 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:48 msgid "" "The `pythoncapi-compat project `__ can be used to get :c:func:`PyConfig_Get` on Python 3.13 and older." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:53 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:52 msgid "" "Functions to configure Python's initialization, deprecated in Python 3.11:" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:55 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:54 msgid ":c:func:`!PySys_SetArgvEx()`: Set :c:member:`PyConfig.argv` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:57 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:56 msgid ":c:func:`!PySys_SetArgv()`: Set :c:member:`PyConfig.argv` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:59 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:58 msgid "" ":c:func:`!Py_SetProgramName()`: Set :c:member:`PyConfig.program_name` " "instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:61 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:60 msgid ":c:func:`!Py_SetPythonHome()`: Set :c:member:`PyConfig.home` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:63 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:62 msgid "" ":c:func:`PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!" "warnings.filters` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:66 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:65 msgid "" "The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:" "`PyConfig` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:69 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:68 msgid "Global configuration variables:" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:71 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:70 msgid "" ":c:var:`Py_DebugFlag`: Use :c:member:`PyConfig.parser_debug` or :c:func:" "`PyConfig_Get(\"parser_debug\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:74 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:73 msgid "" ":c:var:`Py_VerboseFlag`: Use :c:member:`PyConfig.verbose` or :c:func:" "`PyConfig_Get(\"verbose\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:77 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:76 msgid "" ":c:var:`Py_QuietFlag`: Use :c:member:`PyConfig.quiet` or :c:func:" "`PyConfig_Get(\"quiet\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:80 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:79 msgid "" ":c:var:`Py_InteractiveFlag`: Use :c:member:`PyConfig.interactive` or :c:func:" "`PyConfig_Get(\"interactive\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:83 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:82 msgid "" ":c:var:`Py_InspectFlag`: Use :c:member:`PyConfig.inspect` or :c:func:" "`PyConfig_Get(\"inspect\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:86 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:85 msgid "" ":c:var:`Py_OptimizeFlag`: Use :c:member:`PyConfig.optimization_level` or :c:" "func:`PyConfig_Get(\"optimization_level\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:89 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:88 msgid "" ":c:var:`Py_NoSiteFlag`: Use :c:member:`PyConfig.site_import` or :c:func:" "`PyConfig_Get(\"site_import\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:92 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:91 msgid "" ":c:var:`Py_BytesWarningFlag`: Use :c:member:`PyConfig.bytes_warning` or :c:" "func:`PyConfig_Get(\"bytes_warning\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:95 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:94 msgid "" ":c:var:`Py_FrozenFlag`: Use :c:member:`PyConfig.pathconfig_warnings` or :c:" "func:`PyConfig_Get(\"pathconfig_warnings\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:98 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:97 msgid "" ":c:var:`Py_IgnoreEnvironmentFlag`: Use :c:member:`PyConfig.use_environment` " "or :c:func:`PyConfig_Get(\"use_environment\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:101 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:100 msgid "" ":c:var:`Py_DontWriteBytecodeFlag`: Use :c:member:`PyConfig.write_bytecode` " "or :c:func:`PyConfig_Get(\"write_bytecode\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:104 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:103 msgid "" ":c:var:`Py_NoUserSiteDirectory`: Use :c:member:`PyConfig." "user_site_directory` or :c:func:`PyConfig_Get(\"user_site_directory\") " "` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:107 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:106 msgid "" ":c:var:`Py_UnbufferedStdioFlag`: Use :c:member:`PyConfig.buffered_stdio` or :" "c:func:`PyConfig_Get(\"buffered_stdio\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:110 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:109 msgid "" ":c:var:`Py_HashRandomizationFlag`: Use :c:member:`PyConfig.use_hash_seed` " "and :c:member:`PyConfig.hash_seed` or :c:func:`PyConfig_Get(\"hash_seed\") " "` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:114 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:113 msgid "" ":c:var:`Py_IsolatedFlag`: Use :c:member:`PyConfig.isolated` or :c:func:" "`PyConfig_Get(\"isolated\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:117 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:116 msgid "" ":c:var:`Py_LegacyWindowsFSEncodingFlag`: Use :c:member:`PyPreConfig." "legacy_windows_fs_encoding` or :c:func:" "`PyConfig_Get(\"legacy_windows_fs_encoding\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:120 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:119 msgid "" ":c:var:`Py_LegacyWindowsStdioFlag`: Use :c:member:`PyConfig." "legacy_windows_stdio` or :c:func:`PyConfig_Get(\"legacy_windows_stdio\") " "` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:123 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:122 msgid "" ":c:var:`!Py_FileSystemDefaultEncoding`, :c:var:`!" "Py_HasFileSystemDefaultEncoding`: Use :c:member:`PyConfig." @@ -1032,21 +1028,21 @@ msgid "" "` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:126 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:125 msgid "" ":c:var:`!Py_FileSystemDefaultEncodeErrors`: Use :c:member:`PyConfig." "filesystem_errors` or :c:func:`PyConfig_Get(\"filesystem_errors\") " "` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:129 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:128 msgid "" ":c:var:`!Py_UTF8Mode`: Use :c:member:`PyPreConfig.utf8_mode` or :c:func:" "`PyConfig_Get(\"utf8_mode\") ` instead. (see :c:func:" "`Py_PreInitialize`)" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:134 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:133 msgid "" "The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:" "`PyConfig` to set these options. Or :c:func:`PyConfig_Get` can be used to " diff --git a/deprecations/pending-removal-in-3.13.po b/deprecations/pending-removal-in-3.13.po index bcf75895c..e6609fb89 100644 --- a/deprecations/pending-removal-in-3.13.po +++ b/deprecations/pending-removal-in-3.13.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2024-07-26 14:16+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/deprecations/pending-removal-in-3.14.po b/deprecations/pending-removal-in-3.14.po index d3bfb8f84..f9fb5c795 100644 --- a/deprecations/pending-removal-in-3.14.po +++ b/deprecations/pending-removal-in-3.14.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2024-07-20 00:54+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/deprecations/pending-removal-in-3.15.po b/deprecations/pending-removal-in-3.15.po index 8f320ee63..17a0d2103 100644 --- a/deprecations/pending-removal-in-3.15.po +++ b/deprecations/pending-removal-in-3.15.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-07-20 00:54+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/deprecations/pending-removal-in-3.16.po b/deprecations/pending-removal-in-3.16.po index 69173ca1b..ed9f9d6f3 100644 --- a/deprecations/pending-removal-in-3.16.po +++ b/deprecations/pending-removal-in-3.16.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2024-07-20 00:54+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/deprecations/pending-removal-in-future.po b/deprecations/pending-removal-in-future.po index c70e29a1e..9b4dd65b6 100644 --- a/deprecations/pending-removal-in-future.po +++ b/deprecations/pending-removal-in-future.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2024-07-20 00:54+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/distributing/index.po b/distributing/index.po index 51ea4be8e..08a69d6c3 100644 --- a/distributing/index.po +++ b/distributing/index.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:50+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/extending/building.po b/extending/building.po index 9cb433bc2..dc1e4c570 100644 --- a/extending/building.po +++ b/extending/building.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 00:51+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" @@ -24,65 +24,28 @@ msgstr "" #: ../../extending/building.rst:9 msgid "" -"A C extension for CPython is a shared library (e.g. a ``.so`` file on Linux, " -"``.pyd`` on Windows), which exports an *initialization function*." +"A C extension for CPython is a shared library (for example, a ``.so`` file " +"on Linux, ``.pyd`` on Windows), which exports an *initialization function*." msgstr "" #: ../../extending/building.rst:12 -msgid "" -"To be importable, the shared library must be available on :envvar:" -"`PYTHONPATH`, and must be named after the module name, with an appropriate " -"extension. When using setuptools, the correct filename is generated " -"automatically." -msgstr "" - -#: ../../extending/building.rst:16 -msgid "The initialization function has the signature:" -msgstr "" - -#: ../../extending/building.rst:20 -msgid "" -"It returns either a fully initialized module, or a :c:type:`PyModuleDef` " -"instance. See :ref:`initializing-modules` for details." -msgstr "" - -#: ../../extending/building.rst:25 -msgid "" -"For modules with ASCII-only names, the function must be named " -"``PyInit_``, with ```` replaced by the name of the " -"module. When using :ref:`multi-phase-initialization`, non-ASCII module names " -"are allowed. In this case, the initialization function name is " -"``PyInitU_``, with ```` encoded using Python's " -"*punycode* encoding with hyphens replaced by underscores. In Python::" +msgid "See :ref:`extension-modules` for details." msgstr "" -#: ../../extending/building.rst:32 -msgid "" -"def initfunc_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'PyInit' + suffix" +#: ../../extending/building.rst:21 +msgid "Building C and C++ Extensions with setuptools" msgstr "" -#: ../../extending/building.rst:39 +#: ../../extending/building.rst:24 msgid "" -"It is possible to export multiple modules from a single shared library by " -"defining multiple initialization functions. However, importing them requires " -"using symbolic links or a custom importer, because by default only the " -"function corresponding to the filename is found. See the *\"Multiple modules " -"in one library\"* section in :pep:`489` for details." -msgstr "" - -#: ../../extending/building.rst:52 -msgid "Building C and C++ Extensions with setuptools" +"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 "" -#: ../../extending/building.rst:54 +#: ../../extending/building.rst:29 msgid "" -"Python 3.12 and newer no longer come with distutils. Please refer to the " -"``setuptools`` documentation at https://setuptools.readthedocs.io/en/latest/" -"setuptools.html to learn more about how build and distribute C/C++ " -"extensions with setuptools." +"The :mod:`distutils` module, which was included in the standard library " +"until Python 3.12, is now maintained as part of Setuptools." msgstr "" diff --git a/extending/embedding.po b/extending/embedding.po index efd0aea43..c0f24611a 100644 --- a/extending/embedding.po +++ b/extending/embedding.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:51+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -423,60 +424,62 @@ msgid "" " return PyLong_FromLong(numargs);\n" "}\n" "\n" -"static PyMethodDef EmbMethods[] = {\n" +"static PyMethodDef emb_module_methods[] = {\n" " {\"numargs\", emb_numargs, METH_VARARGS,\n" " \"Return the number of arguments received by the process.\"},\n" " {NULL, NULL, 0, NULL}\n" "};\n" "\n" -"static PyModuleDef EmbModule = {\n" -" PyModuleDef_HEAD_INIT, \"emb\", NULL, -1, EmbMethods,\n" -" NULL, NULL, NULL, NULL\n" +"static struct PyModuleDef emb_module = {\n" +" .m_base = PyModuleDef_HEAD_INIT,\n" +" .m_name = \"emb\",\n" +" .m_size = 0,\n" +" .m_methods = emb_module_methods,\n" "};\n" "\n" "static PyObject*\n" "PyInit_emb(void)\n" "{\n" -" return PyModule_Create(&EmbModule);\n" +" return PyModuleDef_Init(&emb_module);\n" "}" msgstr "" -#: ../../extending/embedding.rst:265 +#: ../../extending/embedding.rst:267 msgid "" "Insert the above code just above the :c:func:`main` function. Also, insert " "the following two statements before the call to :c:func:`Py_Initialize`::" msgstr "" -#: ../../extending/embedding.rst:268 +#: ../../extending/embedding.rst:270 msgid "" "numargs = argc;\n" "PyImport_AppendInittab(\"emb\", &PyInit_emb);" msgstr "" -#: ../../extending/embedding.rst:271 +#: ../../extending/embedding.rst:273 msgid "" "These two lines initialize the ``numargs`` variable, and make the :func:`!" "emb.numargs` function accessible to the embedded Python interpreter. With " "these extensions, the Python script can do things like" msgstr "" -#: ../../extending/embedding.rst:275 +#: ../../extending/embedding.rst:277 msgid "" "import emb\n" "print(\"Number of arguments\", emb.numargs())" msgstr "" -#: ../../extending/embedding.rst:280 +#: ../../extending/embedding.rst:282 msgid "" "In a real application, the methods will expose an API of the application to " "Python." msgstr "" -#: ../../extending/embedding.rst:290 +#: ../../extending/embedding.rst:292 msgid "Embedding Python in C++" msgstr "" -#: ../../extending/embedding.rst:292 +#: ../../extending/embedding.rst:294 msgid "" "It is also possible to embed Python in a C++ program; precisely how this is " "done will depend on the details of the C++ system used; in general you will " @@ -485,11 +488,11 @@ msgid "" "+." msgstr "" -#: ../../extending/embedding.rst:301 +#: ../../extending/embedding.rst:303 msgid "Compiling and Linking under Unix-like systems" msgstr "" -#: ../../extending/embedding.rst:303 +#: ../../extending/embedding.rst:305 msgid "" "It is not necessarily trivial to find the right flags to pass to your " "compiler (and linker) in order to embed the Python interpreter into your " @@ -497,7 +500,7 @@ msgid "" "implemented as C dynamic extensions (:file:`.so` files) linked against it." msgstr "" -#: ../../extending/embedding.rst:309 +#: ../../extending/embedding.rst:311 msgid "" "To find out the required compiler and linker flags, you can execute the :" "file:`python{X.Y}-config` script which is generated as part of the " @@ -506,33 +509,33 @@ msgid "" "directly useful to you:" msgstr "" -#: ../../extending/embedding.rst:315 +#: ../../extending/embedding.rst:317 msgid "" "``pythonX.Y-config --cflags`` will give you the recommended flags when " "compiling:" msgstr "" -#: ../../extending/embedding.rst:318 +#: ../../extending/embedding.rst:320 msgid "" "$ /opt/bin/python3.11-config --cflags\n" "-I/opt/include/python3.11 -I/opt/include/python3.11 -Wsign-compare -DNDEBUG " "-g -fwrapv -O3 -Wall" msgstr "" -#: ../../extending/embedding.rst:323 +#: ../../extending/embedding.rst:325 msgid "" "``pythonX.Y-config --ldflags --embed`` will give you the recommended flags " "when linking:" msgstr "" -#: ../../extending/embedding.rst:326 +#: ../../extending/embedding.rst:328 msgid "" "$ /opt/bin/python3.11-config --ldflags --embed\n" "-L/opt/lib/python3.11/config-3.11-x86_64-linux-gnu -L/opt/lib -lpython3.11 -" "lpthread -ldl -lutil -lm" msgstr "" -#: ../../extending/embedding.rst:332 +#: ../../extending/embedding.rst:334 msgid "" "To avoid confusion between several Python installations (and especially " "between the system Python and your own compiled Python), it is recommended " @@ -540,7 +543,7 @@ msgid "" "above example." msgstr "" -#: ../../extending/embedding.rst:337 +#: ../../extending/embedding.rst:339 msgid "" "If this procedure doesn't work for you (it is not guaranteed to work for all " "Unix-like platforms; however, we welcome :ref:`bug reports >> import sysconfig\n" ">>> sysconfig.get_config_var('LIBS')\n" diff --git a/extending/extending.po b/extending/extending.po index c74e52853..d93c00545 100644 --- a/extending/extending.po +++ b/extending/extending.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:51+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -92,7 +93,7 @@ msgstr "" msgid "The first two lines of our file can be::" msgstr "" -#: ../../extending/extending.rst:60 ../../extending/extending.rst:663 +#: ../../extending/extending.rst:60 ../../extending/extending.rst:681 msgid "" "#define PY_SSIZE_T_CLEAN\n" "#include " @@ -308,43 +309,78 @@ msgstr "" #: ../../extending/extending.rst:206 msgid "" -"You can also define a new exception that is unique to your module. For this, " -"you usually declare a static object variable at the beginning of your file::" +"You can also define a new exception that is unique to your module. The " +"simplest way to do this is to declare a static global object variable at the " +"beginning of the file::" msgstr "" -#: ../../extending/extending.rst:209 -msgid "static PyObject *SpamError;" +#: ../../extending/extending.rst:210 +msgid "static PyObject *SpamError = NULL;" msgstr "" -#: ../../extending/extending.rst:211 +#: ../../extending/extending.rst:212 msgid "" -"and initialize it in your module's initialization function (:c:func:`!" -"PyInit_spam`) with an exception object::" +"and initialize it by calling :c:func:`PyErr_NewException` in the module's :c:" +"data:`Py_mod_exec` function (:c:func:`!spam_module_exec`)::" msgstr "" -#: ../../extending/extending.rst:214 +#: ../../extending/extending.rst:215 +msgid "SpamError = PyErr_NewException(\"spam.error\", NULL, NULL);" +msgstr "" + +#: ../../extending/extending.rst:217 msgid "" -"PyMODINIT_FUNC\n" -"PyInit_spam(void)\n" -"{\n" -" PyObject *m;\n" -"\n" -" m = PyModule_Create(&spammodule);\n" -" if (m == NULL)\n" -" return NULL;\n" +"Since :c:data:`!SpamError` is a global variable, it will be overwitten every " +"time the module is reinitialized, when the :c:data:`Py_mod_exec` function is " +"called." +msgstr "" + +#: ../../extending/extending.rst:220 +msgid "" +"For now, let's avoid the issue: we will block repeated initialization by " +"raising an :py:exc:`ImportError`::" +msgstr "" + +#: ../../extending/extending.rst:223 +msgid "" +"static PyObject *SpamError = NULL;\n" "\n" +"static int\n" +"spam_module_exec(PyObject *m)\n" +"{\n" +" if (SpamError != NULL) {\n" +" PyErr_SetString(PyExc_ImportError,\n" +" \"cannot initialize spam module more than once\");\n" +" return -1;\n" +" }\n" " SpamError = PyErr_NewException(\"spam.error\", NULL, NULL);\n" -" if (PyModule_AddObjectRef(m, \"error\", SpamError) < 0) {\n" -" Py_CLEAR(SpamError);\n" -" Py_DECREF(m);\n" -" return NULL;\n" +" if (PyModule_AddObjectRef(m, \"SpamError\", SpamError) < 0) {\n" +" return -1;\n" " }\n" "\n" -" return m;\n" +" return 0;\n" +"}\n" +"\n" +"static PyModuleDef_Slot spam_module_slots[] = {\n" +" {Py_mod_exec, spam_module_exec},\n" +" {0, NULL}\n" +"};\n" +"\n" +"static struct PyModuleDef spam_module = {\n" +" .m_base = PyModuleDef_HEAD_INIT,\n" +" .m_name = \"spam\",\n" +" .m_size = 0, // non-negative\n" +" .m_slots = spam_module_slots,\n" +"};\n" +"\n" +"PyMODINIT_FUNC\n" +"PyInit_spam(void)\n" +"{\n" +" return PyModuleDef_Init(&spam_module);\n" "}" msgstr "" -#: ../../extending/extending.rst:233 +#: ../../extending/extending.rst:259 msgid "" "Note that the Python name for the exception object is :exc:`!spam.error`. " "The :c:func:`PyErr_NewException` function may create a class with the base " @@ -352,7 +388,7 @@ msgid "" "``NULL``), described in :ref:`bltin-exceptions`." msgstr "" -#: ../../extending/extending.rst:238 +#: ../../extending/extending.rst:264 msgid "" "Note also that the :c:data:`!SpamError` variable retains a reference to the " "newly created exception class; this is intentional! Since the exception " @@ -363,19 +399,27 @@ msgid "" "unintended side effects." msgstr "" -#: ../../extending/extending.rst:245 +#: ../../extending/extending.rst:271 +msgid "" +"For now, the :c:func:`Py_DECREF` call to remove this reference is missing. " +"Even when the Python interpreter shuts down, the global :c:data:`!SpamError` " +"variable will not be garbage-collected. It will \"leak\". We did, however, " +"ensure that this will happen at most once per process." +msgstr "" + +#: ../../extending/extending.rst:276 msgid "" "We discuss the use of :c:macro:`PyMODINIT_FUNC` as a function return type " "later in this sample." msgstr "" -#: ../../extending/extending.rst:248 +#: ../../extending/extending.rst:279 msgid "" "The :exc:`!spam.error` exception can be raised in your extension module " "using a call to :c:func:`PyErr_SetString` as shown below::" msgstr "" -#: ../../extending/extending.rst:251 +#: ../../extending/extending.rst:282 msgid "" "static PyObject *\n" "spam_system(PyObject *self, PyObject *args)\n" @@ -394,23 +438,23 @@ msgid "" "}" msgstr "" -#: ../../extending/extending.rst:271 +#: ../../extending/extending.rst:302 msgid "Back to the Example" msgstr "" -#: ../../extending/extending.rst:273 +#: ../../extending/extending.rst:304 msgid "" "Going back to our example function, you should now be able to understand " "this statement::" msgstr "" -#: ../../extending/extending.rst:276 +#: ../../extending/extending.rst:307 msgid "" "if (!PyArg_ParseTuple(args, \"s\", &command))\n" " return NULL;" msgstr "" -#: ../../extending/extending.rst:279 +#: ../../extending/extending.rst:310 msgid "" "It returns ``NULL`` (the error indicator for functions returning object " "pointers) if an error is detected in the argument list, relying on the " @@ -421,34 +465,34 @@ msgid "" "properly be declared as ``const char *command``)." msgstr "" -#: ../../extending/extending.rst:287 +#: ../../extending/extending.rst:318 msgid "" "The next statement is a call to the Unix function :c:func:`system`, passing " "it the string we just got from :c:func:`PyArg_ParseTuple`::" msgstr "" -#: ../../extending/extending.rst:290 +#: ../../extending/extending.rst:321 msgid "sts = system(command);" msgstr "" -#: ../../extending/extending.rst:292 +#: ../../extending/extending.rst:323 msgid "" "Our :func:`!spam.system` function must return the value of :c:data:`!sts` as " "a Python object. This is done using the function :c:func:" "`PyLong_FromLong`. ::" msgstr "" -#: ../../extending/extending.rst:295 +#: ../../extending/extending.rst:326 msgid "return PyLong_FromLong(sts);" msgstr "" -#: ../../extending/extending.rst:297 +#: ../../extending/extending.rst:328 msgid "" "In this case, it will return an integer object. (Yes, even integers are " "objects on the heap in Python!)" msgstr "" -#: ../../extending/extending.rst:300 +#: ../../extending/extending.rst:331 msgid "" "If you have a C function that returns no useful argument (a function " "returning :c:expr:`void`), the corresponding Python function must return " @@ -456,32 +500,32 @@ msgid "" "macro:`Py_RETURN_NONE` macro)::" msgstr "" -#: ../../extending/extending.rst:305 +#: ../../extending/extending.rst:336 msgid "" "Py_INCREF(Py_None);\n" "return Py_None;" msgstr "" -#: ../../extending/extending.rst:308 +#: ../../extending/extending.rst:339 msgid "" ":c:data:`Py_None` is the C name for the special Python object ``None``. It " "is a genuine Python object rather than a ``NULL`` pointer, which means " "\"error\" in most contexts, as we have seen." msgstr "" -#: ../../extending/extending.rst:316 +#: ../../extending/extending.rst:347 msgid "The Module's Method Table and Initialization Function" msgstr "" -#: ../../extending/extending.rst:318 +#: ../../extending/extending.rst:349 msgid "" "I promised to show how :c:func:`!spam_system` is called from Python " "programs. First, we need to list its name and address in a \"method table\"::" msgstr "" -#: ../../extending/extending.rst:321 +#: ../../extending/extending.rst:352 msgid "" -"static PyMethodDef SpamMethods[] = {\n" +"static PyMethodDef spam_methods[] = {\n" " ...\n" " {\"system\", spam_system, METH_VARARGS,\n" " \"Execute a shell command.\"},\n" @@ -490,7 +534,7 @@ msgid "" "};" msgstr "" -#: ../../extending/extending.rst:329 +#: ../../extending/extending.rst:360 msgid "" "Note the third entry (``METH_VARARGS``). This is a flag telling the " "interpreter the calling convention to be used for the C function. It should " @@ -499,14 +543,14 @@ msgid "" "is used." msgstr "" -#: ../../extending/extending.rst:334 +#: ../../extending/extending.rst:365 msgid "" "When using only ``METH_VARARGS``, the function should expect the Python-" "level parameters to be passed in as a tuple acceptable for parsing via :c:" "func:`PyArg_ParseTuple`; more information on this function is provided below." msgstr "" -#: ../../extending/extending.rst:338 +#: ../../extending/extending.rst:369 msgid "" "The :c:macro:`METH_KEYWORDS` bit may be set in the third field if keyword " "arguments should be passed to the function. In this case, the C function " @@ -515,24 +559,21 @@ msgid "" "to such a function." msgstr "" -#: ../../extending/extending.rst:344 +#: ../../extending/extending.rst:375 msgid "" "The method table must be referenced in the module definition structure::" msgstr "" -#: ../../extending/extending.rst:346 +#: ../../extending/extending.rst:377 msgid "" -"static struct PyModuleDef spammodule = {\n" -" PyModuleDef_HEAD_INIT,\n" -" \"spam\", /* name of module */\n" -" spam_doc, /* module documentation, may be NULL */\n" -" -1, /* size of per-interpreter state of the module,\n" -" or -1 if the module keeps state in global variables. */\n" -" SpamMethods\n" +"static struct PyModuleDef spam_module = {\n" +" ...\n" +" .m_methods = spam_methods,\n" +" ...\n" "};" msgstr "" -#: ../../extending/extending.rst:355 +#: ../../extending/extending.rst:383 msgid "" "This structure, in turn, must be passed to the interpreter in the module's " "initialization function. The initialization function must be named :c:func:" @@ -540,37 +581,32 @@ msgid "" "only non-\\ ``static`` item defined in the module file::" msgstr "" -#: ../../extending/extending.rst:360 +#: ../../extending/extending.rst:388 msgid "" "PyMODINIT_FUNC\n" "PyInit_spam(void)\n" "{\n" -" return PyModule_Create(&spammodule);\n" +" return PyModuleDef_Init(&spam_module);\n" "}" msgstr "" -#: ../../extending/extending.rst:366 +#: ../../extending/extending.rst:394 msgid "" "Note that :c:macro:`PyMODINIT_FUNC` declares the function as ``PyObject *`` " "return type, declares any special linkage declarations required by the " "platform, and for C++ declares the function as ``extern \"C\"``." msgstr "" -#: ../../extending/extending.rst:370 +#: ../../extending/extending.rst:398 msgid "" -"When the Python program imports module :mod:`!spam` for the first time, :c:" -"func:`!PyInit_spam` is called. (See below for comments about embedding " -"Python.) It calls :c:func:`PyModule_Create`, which returns a module object, " -"and inserts built-in function objects into the newly created module based " -"upon the table (an array of :c:type:`PyMethodDef` structures) found in the " -"module definition. :c:func:`PyModule_Create` returns a pointer to the module " -"object that it creates. It may abort with a fatal error for certain errors, " -"or return ``NULL`` if the module could not be initialized satisfactorily. " -"The init function must return the module object to its caller, so that it " -"then gets inserted into ``sys.modules``." +":c:func:`!PyInit_spam` is called when each interpreter imports its module :" +"mod:`!spam` for the first time. (See below for comments about embedding " +"Python.) A pointer to the module definition must be returned via :c:func:" +"`PyModuleDef_Init`, so that the import machinery can create the module and " +"store it in ``sys.modules``." msgstr "" -#: ../../extending/extending.rst:381 +#: ../../extending/extending.rst:403 msgid "" "When embedding Python, the :c:func:`!PyInit_spam` function is not called " "automatically unless there's an entry in the :c:data:`PyImport_Inittab` " @@ -578,7 +614,7 @@ msgid "" "`PyImport_AppendInittab`, optionally followed by an import of the module::" msgstr "" -#: ../../extending/extending.rst:386 +#: ../../extending/extending.rst:408 msgid "" "#define PY_SSIZE_T_CLEAN\n" "#include \n" @@ -631,35 +667,30 @@ msgid "" "}" msgstr "" -#: ../../extending/extending.rst:436 +#: ../../extending/extending.rst:458 msgid "" -"Removing entries from ``sys.modules`` or importing compiled modules into " +"If you declare a global variable or a local static one, the module may " +"experience unintended side-effects on re-initialisation, for example when " +"removing entries from ``sys.modules`` or importing compiled modules into " "multiple interpreters within a process (or following a :c:func:`fork` " -"without an intervening :c:func:`exec`) can create problems for some " -"extension modules. Extension module authors should exercise caution when " -"initializing internal data structures." +"without an intervening :c:func:`exec`). If module state is not yet fully :" +"ref:`isolated `, authors should consider marking " +"the module as having no support for subinterpreters (via :c:macro:" +"`Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED`)." msgstr "" -#: ../../extending/extending.rst:442 +#: ../../extending/extending.rst:467 msgid "" "A more substantial example module is included in the Python source " -"distribution as :file:`Modules/xxmodule.c`. This file may be used as a " +"distribution as :file:`Modules/xxlimited.c`. This file may be used as a " "template or simply read as an example." msgstr "" -#: ../../extending/extending.rst:448 -msgid "" -"Unlike our ``spam`` example, ``xxmodule`` uses *multi-phase initialization* " -"(new in Python 3.5), where a PyModuleDef structure is returned from " -"``PyInit_spam``, and creation of the module is left to the import machinery. " -"For details on multi-phase initialization, see :PEP:`489`." -msgstr "" - -#: ../../extending/extending.rst:457 +#: ../../extending/extending.rst:475 msgid "Compilation and Linkage" msgstr "" -#: ../../extending/extending.rst:459 +#: ../../extending/extending.rst:477 msgid "" "There are two more things to do before you can use your new extension: " "compiling and linking it with the Python system. If you use dynamic " @@ -669,7 +700,7 @@ msgid "" "Windows (chapter :ref:`building-on-windows`) for more information about this." msgstr "" -#: ../../extending/extending.rst:466 +#: ../../extending/extending.rst:484 msgid "" "If you can't use dynamic loading, or if you want to make your module a " "permanent part of the Python interpreter, you will have to change the " @@ -679,11 +710,11 @@ msgid "" "line to the file :file:`Modules/Setup.local` describing your file:" msgstr "" -#: ../../extending/extending.rst:473 +#: ../../extending/extending.rst:491 msgid "spam spammodule.o" msgstr "" -#: ../../extending/extending.rst:477 +#: ../../extending/extending.rst:495 msgid "" "and rebuild the interpreter by running :program:`make` in the toplevel " "directory. You can also run :program:`make` in the :file:`Modules/` " @@ -692,21 +723,21 @@ msgid "" "the :file:`Setup` file.)" msgstr "" -#: ../../extending/extending.rst:483 +#: ../../extending/extending.rst:501 msgid "" "If your module requires additional libraries to link with, these can be " "listed on the line in the configuration file as well, for instance:" msgstr "" -#: ../../extending/extending.rst:486 +#: ../../extending/extending.rst:504 msgid "spam spammodule.o -lX11" msgstr "" -#: ../../extending/extending.rst:494 +#: ../../extending/extending.rst:512 msgid "Calling Python Functions from C" msgstr "" -#: ../../extending/extending.rst:496 +#: ../../extending/extending.rst:514 msgid "" "So far we have concentrated on making C functions callable from Python. The " "reverse is also useful: calling Python functions from C. This is especially " @@ -717,7 +748,7 @@ msgid "" "uses are also imaginable." msgstr "" -#: ../../extending/extending.rst:504 +#: ../../extending/extending.rst:522 msgid "" "Fortunately, the Python interpreter is easily called recursively, and there " "is a standard interface to call a Python function. (I won't dwell on how to " @@ -726,7 +757,7 @@ msgid "" "line option in :file:`Modules/main.c` from the Python source code.)" msgstr "" -#: ../../extending/extending.rst:510 +#: ../../extending/extending.rst:528 msgid "" "Calling a Python function is easy. First, the Python program must somehow " "pass you the Python function object. You should provide a function (or some " @@ -736,7 +767,7 @@ msgid "" "function might be part of a module definition::" msgstr "" -#: ../../extending/extending.rst:517 +#: ../../extending/extending.rst:535 msgid "" "static PyObject *my_callback = NULL;\n" "\n" @@ -763,7 +794,7 @@ msgid "" "}" msgstr "" -#: ../../extending/extending.rst:540 +#: ../../extending/extending.rst:558 msgid "" "This function must be registered with the interpreter using the :c:macro:" "`METH_VARARGS` flag; this is described in section :ref:`methodtable`. The :" @@ -771,7 +802,7 @@ msgid "" "section :ref:`parsetuple`." msgstr "" -#: ../../extending/extending.rst:545 +#: ../../extending/extending.rst:563 msgid "" "The macros :c:func:`Py_XINCREF` and :c:func:`Py_XDECREF` increment/decrement " "the reference count of an object and are safe in the presence of ``NULL`` " @@ -779,7 +810,7 @@ msgid "" "info on them in section :ref:`refcounts`." msgstr "" -#: ../../extending/extending.rst:552 +#: ../../extending/extending.rst:570 msgid "" "Later, when it is time to call the function, you call the C function :c:func:" "`PyObject_CallObject`. This function has two arguments, both pointers to " @@ -791,7 +822,7 @@ msgid "" "or more format codes between parentheses. For example::" msgstr "" -#: ../../extending/extending.rst:561 +#: ../../extending/extending.rst:579 msgid "" "int arg;\n" "PyObject *arglist;\n" @@ -805,7 +836,7 @@ msgid "" "Py_DECREF(arglist);" msgstr "" -#: ../../extending/extending.rst:572 +#: ../../extending/extending.rst:590 msgid "" ":c:func:`PyObject_CallObject` returns a Python object pointer: this is the " "return value of the Python function. :c:func:`PyObject_CallObject` is " @@ -814,7 +845,7 @@ msgid "" "`Py_DECREF`\\ -ed immediately after the :c:func:`PyObject_CallObject` call." msgstr "" -#: ../../extending/extending.rst:579 +#: ../../extending/extending.rst:597 msgid "" "The return value of :c:func:`PyObject_CallObject` is \"new\": either it is a " "brand new object, or it is an existing object whose reference count has been " @@ -823,7 +854,7 @@ msgid "" "not interested in its value." msgstr "" -#: ../../extending/extending.rst:585 +#: ../../extending/extending.rst:603 msgid "" "Before you do this, however, it is important to check that the return value " "isn't ``NULL``. If it is, the Python function terminated by raising an " @@ -834,7 +865,7 @@ msgid "" "should be cleared by calling :c:func:`PyErr_Clear`. For example::" msgstr "" -#: ../../extending/extending.rst:593 +#: ../../extending/extending.rst:611 msgid "" "if (result == NULL)\n" " return NULL; /* Pass error back */\n" @@ -842,7 +873,7 @@ msgid "" "Py_DECREF(result);" msgstr "" -#: ../../extending/extending.rst:598 +#: ../../extending/extending.rst:616 msgid "" "Depending on the desired interface to the Python callback function, you may " "also have to provide an argument list to :c:func:`PyObject_CallObject`. In " @@ -854,7 +885,7 @@ msgid "" "you want to pass an integral event code, you might use the following code::" msgstr "" -#: ../../extending/extending.rst:607 +#: ../../extending/extending.rst:625 msgid "" "PyObject *arglist;\n" "...\n" @@ -867,7 +898,7 @@ msgid "" "Py_DECREF(result);" msgstr "" -#: ../../extending/extending.rst:617 +#: ../../extending/extending.rst:635 msgid "" "Note the placement of ``Py_DECREF(arglist)`` immediately after the call, " "before the error check! Also note that strictly speaking this code is not " @@ -875,14 +906,14 @@ msgid "" "checked." msgstr "" -#: ../../extending/extending.rst:621 +#: ../../extending/extending.rst:639 msgid "" "You may also call a function with keyword arguments by using :c:func:" "`PyObject_Call`, which supports arguments and keyword arguments. As in the " "above example, we use :c:func:`Py_BuildValue` to construct the dictionary. ::" msgstr "" -#: ../../extending/extending.rst:625 +#: ../../extending/extending.rst:643 msgid "" "PyObject *dict;\n" "...\n" @@ -895,19 +926,19 @@ msgid "" "Py_DECREF(result);" msgstr "" -#: ../../extending/extending.rst:639 +#: ../../extending/extending.rst:657 msgid "Extracting Parameters in Extension Functions" msgstr "" -#: ../../extending/extending.rst:643 +#: ../../extending/extending.rst:661 msgid "The :c:func:`PyArg_ParseTuple` function is declared as follows::" msgstr "" -#: ../../extending/extending.rst:645 +#: ../../extending/extending.rst:663 msgid "int PyArg_ParseTuple(PyObject *arg, const char *format, ...);" msgstr "" -#: ../../extending/extending.rst:647 +#: ../../extending/extending.rst:665 msgid "" "The *arg* argument must be a tuple object containing an argument list passed " "from Python to a C function. The *format* argument must be a format string, " @@ -916,7 +947,7 @@ msgid "" "whose type is determined by the format string." msgstr "" -#: ../../extending/extending.rst:653 +#: ../../extending/extending.rst:671 msgid "" "Note that while :c:func:`PyArg_ParseTuple` checks that the Python arguments " "have the required types, it cannot check the validity of the addresses of C " @@ -924,17 +955,17 @@ msgid "" "probably crash or at least overwrite random bits in memory. So be careful!" msgstr "" -#: ../../extending/extending.rst:658 +#: ../../extending/extending.rst:676 msgid "" "Note that any Python object references which are provided to the caller are " "*borrowed* references; do not decrement their reference count!" msgstr "" -#: ../../extending/extending.rst:661 +#: ../../extending/extending.rst:679 msgid "Some example calls::" msgstr "" -#: ../../extending/extending.rst:668 +#: ../../extending/extending.rst:686 msgid "" "int ok;\n" "int i, j;\n" @@ -946,27 +977,27 @@ msgid "" " /* Python call: f() */" msgstr "" -#: ../../extending/extending.rst:679 +#: ../../extending/extending.rst:697 msgid "" "ok = PyArg_ParseTuple(args, \"s\", &s); /* A string */\n" " /* Possible Python call: f('whoops!') */" msgstr "" -#: ../../extending/extending.rst:684 +#: ../../extending/extending.rst:702 msgid "" "ok = PyArg_ParseTuple(args, \"lls\", &k, &l, &s); /* Two longs and a string " "*/\n" " /* Possible Python call: f(1, 2, 'three') */" msgstr "" -#: ../../extending/extending.rst:689 +#: ../../extending/extending.rst:707 msgid "" "ok = PyArg_ParseTuple(args, \"(ii)s#\", &i, &j, &s, &size);\n" " /* A pair of ints and a string, whose size is also returned */\n" " /* Possible Python call: f((1, 2), 'three') */" msgstr "" -#: ../../extending/extending.rst:695 +#: ../../extending/extending.rst:713 msgid "" "{\n" " const char *file;\n" @@ -981,7 +1012,7 @@ msgid "" "}" msgstr "" -#: ../../extending/extending.rst:709 +#: ../../extending/extending.rst:727 msgid "" "{\n" " int left, top, right, bottom, h, v;\n" @@ -993,7 +1024,7 @@ msgid "" "}" msgstr "" -#: ../../extending/extending.rst:720 +#: ../../extending/extending.rst:738 msgid "" "{\n" " Py_complex c;\n" @@ -1003,23 +1034,23 @@ msgid "" "}" msgstr "" -#: ../../extending/extending.rst:731 +#: ../../extending/extending.rst:749 msgid "Keyword Parameters for Extension Functions" msgstr "" -#: ../../extending/extending.rst:735 +#: ../../extending/extending.rst:753 msgid "" "The :c:func:`PyArg_ParseTupleAndKeywords` function is declared as follows::" msgstr "" -#: ../../extending/extending.rst:737 +#: ../../extending/extending.rst:755 msgid "" "int PyArg_ParseTupleAndKeywords(PyObject *arg, PyObject *kwdict,\n" " const char *format, char * const " "*kwlist, ...);" msgstr "" -#: ../../extending/extending.rst:740 +#: ../../extending/extending.rst:758 msgid "" "The *arg* and *format* parameters are identical to those of the :c:func:" "`PyArg_ParseTuple` function. The *kwdict* parameter is the dictionary of " @@ -1031,20 +1062,20 @@ msgid "" "raises an appropriate exception." msgstr "" -#: ../../extending/extending.rst:750 +#: ../../extending/extending.rst:768 msgid "" "Nested tuples cannot be parsed when using keyword arguments! Keyword " "parameters passed in which are not present in the *kwlist* will cause :exc:" "`TypeError` to be raised." msgstr "" -#: ../../extending/extending.rst:756 +#: ../../extending/extending.rst:774 msgid "" "Here is an example module which uses keywords, based on an example by Geoff " "Philbrick (philbrick@hks.com)::" msgstr "" -#: ../../extending/extending.rst:759 +#: ../../extending/extending.rst:777 msgid "" "#define PY_SSIZE_T_CLEAN\n" "#include \n" @@ -1083,36 +1114,35 @@ msgid "" " {NULL, NULL, 0, NULL} /* sentinel */\n" "};\n" "\n" -"static struct PyModuleDef keywdargmodule = {\n" -" PyModuleDef_HEAD_INIT,\n" -" \"keywdarg\",\n" -" NULL,\n" -" -1,\n" -" keywdarg_methods\n" +"static struct PyModuleDef keywdarg_module = {\n" +" .m_base = PyModuleDef_HEAD_INIT,\n" +" .m_name = \"keywdarg\",\n" +" .m_size = 0,\n" +" .m_methods = keywdarg_methods,\n" "};\n" "\n" "PyMODINIT_FUNC\n" "PyInit_keywdarg(void)\n" "{\n" -" return PyModule_Create(&keywdargmodule);\n" +" return PyModuleDef_Init(&keywdarg_module);\n" "}" msgstr "" -#: ../../extending/extending.rst:811 +#: ../../extending/extending.rst:828 msgid "Building Arbitrary Values" msgstr "" -#: ../../extending/extending.rst:813 +#: ../../extending/extending.rst:830 msgid "" "This function is the counterpart to :c:func:`PyArg_ParseTuple`. It is " "declared as follows::" msgstr "" -#: ../../extending/extending.rst:816 +#: ../../extending/extending.rst:833 msgid "PyObject *Py_BuildValue(const char *format, ...);" msgstr "" -#: ../../extending/extending.rst:818 +#: ../../extending/extending.rst:835 msgid "" "It recognizes a set of format units similar to the ones recognized by :c:" "func:`PyArg_ParseTuple`, but the arguments (which are input to the function, " @@ -1120,7 +1150,7 @@ msgid "" "object, suitable for returning from a C function called from Python." msgstr "" -#: ../../extending/extending.rst:823 +#: ../../extending/extending.rst:840 msgid "" "One difference with :c:func:`PyArg_ParseTuple`: while the latter requires " "its first argument to be a tuple (since Python argument lists are always " @@ -1132,12 +1162,12 @@ msgid "" "parenthesize the format string." msgstr "" -#: ../../extending/extending.rst:831 +#: ../../extending/extending.rst:848 msgid "" "Examples (to the left the call, to the right the resulting Python value):" msgstr "" -#: ../../extending/extending.rst:833 +#: ../../extending/extending.rst:850 msgid "" "Py_BuildValue(\"\") None\n" "Py_BuildValue(\"i\", 123) 123\n" @@ -1158,11 +1188,11 @@ msgid "" " 1, 2, 3, 4, 5, 6) (((1, 2), (3, 4)), (5, 6))" msgstr "" -#: ../../extending/extending.rst:857 +#: ../../extending/extending.rst:874 msgid "Reference Counts" msgstr "" -#: ../../extending/extending.rst:859 +#: ../../extending/extending.rst:876 msgid "" "In languages like C or C++, the programmer is responsible for dynamic " "allocation and deallocation of memory on the heap. In C, this is done using " @@ -1171,7 +1201,7 @@ msgid "" "restrict the following discussion to the C case." msgstr "" -#: ../../extending/extending.rst:865 +#: ../../extending/extending.rst:882 msgid "" "Every block of memory allocated with :c:func:`malloc` should eventually be " "returned to the pool of available memory by exactly one call to :c:func:" @@ -1186,7 +1216,7 @@ msgid "" "crashes." msgstr "" -#: ../../extending/extending.rst:876 +#: ../../extending/extending.rst:893 msgid "" "Common causes of memory leaks are unusual paths through the code. For " "instance, a function may allocate a block of memory, do some calculation, " @@ -1203,7 +1233,7 @@ msgid "" "of errors." msgstr "" -#: ../../extending/extending.rst:889 +#: ../../extending/extending.rst:906 msgid "" "Since Python makes heavy use of :c:func:`malloc` and :c:func:`free`, it " "needs a strategy to avoid memory leaks as well as the use of freed memory. " @@ -1214,7 +1244,7 @@ msgid "" "reference to the object has been deleted and the object is freed." msgstr "" -#: ../../extending/extending.rst:897 +#: ../../extending/extending.rst:914 msgid "" "An alternative strategy is called :dfn:`automatic garbage collection`. " "(Sometimes, reference counting is also referred to as a garbage collection " @@ -1230,7 +1260,7 @@ msgid "" "with reference counts." msgstr "" -#: ../../extending/extending.rst:909 +#: ../../extending/extending.rst:926 msgid "" "While Python uses the traditional reference counting implementation, it also " "offers a cycle detector that works to detect reference cycles. This allows " @@ -1244,7 +1274,7 @@ msgid "" "though there are no further references to the cycle itself." msgstr "" -#: ../../extending/extending.rst:920 +#: ../../extending/extending.rst:937 msgid "" "The cycle detector is able to detect garbage cycles and can reclaim them. " "The :mod:`gc` module exposes a way to run the detector (the :func:`~gc." @@ -1252,11 +1282,11 @@ msgid "" "disable the detector at runtime." msgstr "" -#: ../../extending/extending.rst:929 +#: ../../extending/extending.rst:946 msgid "Reference Counting in Python" msgstr "" -#: ../../extending/extending.rst:931 +#: ../../extending/extending.rst:948 msgid "" "There are two macros, ``Py_INCREF(x)`` and ``Py_DECREF(x)``, which handle " "the incrementing and decrementing of the reference count. :c:func:" @@ -1267,7 +1297,7 @@ msgid "" "object." msgstr "" -#: ../../extending/extending.rst:938 +#: ../../extending/extending.rst:955 msgid "" "The big question now remains: when to use ``Py_INCREF(x)`` and " "``Py_DECREF(x)``? Let's first introduce some terms. Nobody \"owns\" an " @@ -1280,7 +1310,7 @@ msgid "" "reference creates a memory leak." msgstr "" -#: ../../extending/extending.rst:947 +#: ../../extending/extending.rst:964 msgid "" "It is also possible to :dfn:`borrow` [#]_ a reference to an object. The " "borrower of a reference should not call :c:func:`Py_DECREF`. The borrower " @@ -1289,7 +1319,7 @@ msgid "" "risks using freed memory and should be avoided completely [#]_." msgstr "" -#: ../../extending/extending.rst:953 +#: ../../extending/extending.rst:970 msgid "" "The advantage of borrowing over owning a reference is that you don't need to " "take care of disposing of the reference on all possible paths through the " @@ -1300,7 +1330,7 @@ msgid "" "borrowed has in fact disposed of it." msgstr "" -#: ../../extending/extending.rst:961 +#: ../../extending/extending.rst:978 msgid "" "A borrowed reference can be changed into an owned reference by calling :c:" "func:`Py_INCREF`. This does not affect the status of the owner from which " @@ -1309,18 +1339,18 @@ msgid "" "properly, as well as the previous owner)." msgstr "" -#: ../../extending/extending.rst:971 +#: ../../extending/extending.rst:988 msgid "Ownership Rules" msgstr "" -#: ../../extending/extending.rst:973 +#: ../../extending/extending.rst:990 msgid "" "Whenever an object reference is passed into or out of a function, it is part " "of the function's interface specification whether ownership is transferred " "with the reference or not." msgstr "" -#: ../../extending/extending.rst:977 +#: ../../extending/extending.rst:994 msgid "" "Most functions that return a reference to an object pass on ownership with " "the reference. In particular, all functions whose function it is to create " @@ -1331,7 +1361,7 @@ msgid "" "reference to a cached item." msgstr "" -#: ../../extending/extending.rst:985 +#: ../../extending/extending.rst:1002 msgid "" "Many functions that extract objects from other objects also transfer " "ownership with the reference, for instance :c:func:" @@ -1342,14 +1372,14 @@ msgid "" "list or dictionary." msgstr "" -#: ../../extending/extending.rst:992 +#: ../../extending/extending.rst:1009 msgid "" "The function :c:func:`PyImport_AddModule` also returns a borrowed reference, " "even though it may actually create the object it returns: this is possible " "because an owned reference to the object is stored in ``sys.modules``." msgstr "" -#: ../../extending/extending.rst:996 +#: ../../extending/extending.rst:1013 msgid "" "When you pass an object reference into another function, in general, the " "function borrows the reference from you --- if it needs to store it, it will " @@ -1360,7 +1390,7 @@ msgid "" "don't take over ownership --- they are \"normal.\")" msgstr "" -#: ../../extending/extending.rst:1004 +#: ../../extending/extending.rst:1021 msgid "" "When a C function is called from Python, it borrows references to its " "arguments from the caller. The caller owns a reference to the object, so " @@ -1369,18 +1399,18 @@ msgid "" "turned into an owned reference by calling :c:func:`Py_INCREF`." msgstr "" -#: ../../extending/extending.rst:1010 +#: ../../extending/extending.rst:1027 msgid "" "The object reference returned from a C function that is called from Python " "must be an owned reference --- ownership is transferred from the function to " "its caller." msgstr "" -#: ../../extending/extending.rst:1018 +#: ../../extending/extending.rst:1035 msgid "Thin Ice" msgstr "" -#: ../../extending/extending.rst:1020 +#: ../../extending/extending.rst:1037 msgid "" "There are a few situations where seemingly harmless use of a borrowed " "reference can lead to problems. These all have to do with implicit " @@ -1388,14 +1418,14 @@ msgid "" "dispose of it." msgstr "" -#: ../../extending/extending.rst:1024 +#: ../../extending/extending.rst:1041 msgid "" "The first and most important case to know about is using :c:func:`Py_DECREF` " "on an unrelated object while borrowing a reference to a list item. For " "instance::" msgstr "" -#: ../../extending/extending.rst:1027 +#: ../../extending/extending.rst:1044 msgid "" "void\n" "bug(PyObject *list)\n" @@ -1407,14 +1437,14 @@ msgid "" "}" msgstr "" -#: ../../extending/extending.rst:1036 +#: ../../extending/extending.rst:1053 msgid "" "This function first borrows a reference to ``list[0]``, then replaces " "``list[1]`` with the value ``0``, and finally prints the borrowed reference. " "Looks harmless, right? But it's not!" msgstr "" -#: ../../extending/extending.rst:1040 +#: ../../extending/extending.rst:1057 msgid "" "Let's follow the control flow into :c:func:`PyList_SetItem`. The list owns " "references to all its items, so when item 1 is replaced, it has to dispose " @@ -1424,7 +1454,7 @@ msgid "" "count of 1, disposing of it will call its :meth:`!__del__` method." msgstr "" -#: ../../extending/extending.rst:1047 +#: ../../extending/extending.rst:1064 msgid "" "Since it is written in Python, the :meth:`!__del__` method can execute " "arbitrary Python code. Could it perhaps do something to invalidate the " @@ -1435,13 +1465,13 @@ msgid "" "associated with it, thereby invalidating ``item``." msgstr "" -#: ../../extending/extending.rst:1055 +#: ../../extending/extending.rst:1072 msgid "" "The solution, once you know the source of the problem, is easy: temporarily " "increment the reference count. The correct version of the function reads::" msgstr "" -#: ../../extending/extending.rst:1058 +#: ../../extending/extending.rst:1075 msgid "" "void\n" "no_bug(PyObject *list)\n" @@ -1455,27 +1485,27 @@ msgid "" "}" msgstr "" -#: ../../extending/extending.rst:1069 +#: ../../extending/extending.rst:1086 msgid "" "This is a true story. An older version of Python contained variants of this " "bug and someone spent a considerable amount of time in a C debugger to " "figure out why his :meth:`!__del__` methods would fail..." msgstr "" -#: ../../extending/extending.rst:1073 +#: ../../extending/extending.rst:1090 msgid "" "The second case of problems with a borrowed reference is a variant involving " "threads. Normally, multiple threads in the Python interpreter can't get in " -"each other's way, because there is a global lock protecting Python's entire " -"object space. However, it is possible to temporarily release this lock " -"using the macro :c:macro:`Py_BEGIN_ALLOW_THREADS`, and to re-acquire it " -"using :c:macro:`Py_END_ALLOW_THREADS`. This is common around blocking I/O " -"calls, to let other threads use the processor while waiting for the I/O to " -"complete. Obviously, the following function has the same problem as the " -"previous one::" +"each other's way, because there is a :term:`global lock ` protecting Python's entire object space. However, it is possible to " +"temporarily release this lock using the macro :c:macro:" +"`Py_BEGIN_ALLOW_THREADS`, and to re-acquire it using :c:macro:" +"`Py_END_ALLOW_THREADS`. This is common around blocking I/O calls, to let " +"other threads use the processor while waiting for the I/O to complete. " +"Obviously, the following function has the same problem as the previous one::" msgstr "" -#: ../../extending/extending.rst:1082 +#: ../../extending/extending.rst:1100 msgid "" "void\n" "bug(PyObject *list)\n" @@ -1488,11 +1518,11 @@ msgid "" "}" msgstr "" -#: ../../extending/extending.rst:1096 +#: ../../extending/extending.rst:1114 msgid "NULL Pointers" msgstr "" -#: ../../extending/extending.rst:1098 +#: ../../extending/extending.rst:1116 msgid "" "In general, functions that take object references as arguments do not expect " "you to pass them ``NULL`` pointers, and will dump core (or cause later core " @@ -1504,21 +1534,21 @@ msgid "" "more slowly." msgstr "" -#: ../../extending/extending.rst:1106 +#: ../../extending/extending.rst:1124 msgid "" "It is better to test for ``NULL`` only at the \"source:\" when a pointer " "that may be ``NULL`` is received, for example, from :c:func:`malloc` or from " "a function that may raise an exception." msgstr "" -#: ../../extending/extending.rst:1110 +#: ../../extending/extending.rst:1128 msgid "" "The macros :c:func:`Py_INCREF` and :c:func:`Py_DECREF` do not check for " "``NULL`` pointers --- however, their variants :c:func:`Py_XINCREF` and :c:" "func:`Py_XDECREF` do." msgstr "" -#: ../../extending/extending.rst:1114 +#: ../../extending/extending.rst:1132 msgid "" "The macros for checking for a particular object type (``Pytype_Check()``) " "don't check for ``NULL`` pointers --- again, there is much code that calls " @@ -1527,24 +1557,24 @@ msgid "" "variants with ``NULL`` checking." msgstr "" -#: ../../extending/extending.rst:1120 +#: ../../extending/extending.rst:1138 msgid "" "The C function calling mechanism guarantees that the argument list passed to " "C functions (``args`` in the examples) is never ``NULL`` --- in fact it " "guarantees that it is always a tuple [#]_." msgstr "" -#: ../../extending/extending.rst:1124 +#: ../../extending/extending.rst:1142 msgid "" "It is a severe error to ever let a ``NULL`` pointer \"escape\" to the Python " "user." msgstr "" -#: ../../extending/extending.rst:1135 +#: ../../extending/extending.rst:1153 msgid "Writing Extensions in C++" msgstr "" -#: ../../extending/extending.rst:1137 +#: ../../extending/extending.rst:1155 msgid "" "It is possible to write extension modules in C++. Some restrictions apply. " "If the main program (the Python interpreter) is compiled and linked by the C " @@ -1557,11 +1587,11 @@ msgid "" "(all recent C++ compilers define this symbol)." msgstr "" -#: ../../extending/extending.rst:1151 +#: ../../extending/extending.rst:1169 msgid "Providing a C API for an Extension Module" msgstr "" -#: ../../extending/extending.rst:1156 +#: ../../extending/extending.rst:1174 msgid "" "Many extension modules just provide new functions and types to be used from " "Python, but sometimes the code in an extension module can be useful for " @@ -1572,7 +1602,7 @@ msgid "" "functions for direct manipulation from other extension modules." msgstr "" -#: ../../extending/extending.rst:1164 +#: ../../extending/extending.rst:1182 msgid "" "At first sight this seems easy: just write the functions (without declaring " "them ``static``, of course), provide an appropriate header file, and " @@ -1588,7 +1618,7 @@ msgid "" "call might not have been loaded yet!" msgstr "" -#: ../../extending/extending.rst:1176 +#: ../../extending/extending.rst:1194 msgid "" "Portability therefore requires not to make any assumptions about symbol " "visibility. This means that all symbols in extension modules should be " @@ -1598,7 +1628,7 @@ msgid "" "accessible from other extension modules must be exported in a different way." msgstr "" -#: ../../extending/extending.rst:1183 +#: ../../extending/extending.rst:1201 msgid "" "Python provides a special mechanism to pass C-level information (pointers) " "from one extension module to another one: Capsules. A Capsule is a Python " @@ -1610,7 +1640,7 @@ msgid "" "the Capsule." msgstr "" -#: ../../extending/extending.rst:1191 +#: ../../extending/extending.rst:1209 msgid "" "There are many ways in which Capsules can be used to export the C API of an " "extension module. Each function could get its own Capsule, or all C API " @@ -1620,7 +1650,7 @@ msgid "" "client modules." msgstr "" -#: ../../extending/extending.rst:1197 +#: ../../extending/extending.rst:1215 msgid "" "Whichever method you choose, it's important to name your Capsules properly. " "The function :c:func:`PyCapsule_New` takes a name parameter (:c:expr:`const " @@ -1630,17 +1660,17 @@ msgid "" "from another." msgstr "" -#: ../../extending/extending.rst:1204 +#: ../../extending/extending.rst:1222 msgid "" "In particular, Capsules used to expose C APIs should be given a name " "following this convention::" msgstr "" -#: ../../extending/extending.rst:1207 +#: ../../extending/extending.rst:1225 msgid "modulename.attributename" msgstr "" -#: ../../extending/extending.rst:1209 +#: ../../extending/extending.rst:1227 msgid "" "The convenience function :c:func:`PyCapsule_Import` makes it easy to load a " "C API provided via a Capsule, but only if the Capsule's name matches this " @@ -1648,7 +1678,7 @@ msgid "" "the Capsule they load contains the correct C API." msgstr "" -#: ../../extending/extending.rst:1214 +#: ../../extending/extending.rst:1232 msgid "" "The following example demonstrates an approach that puts most of the burden " "on the writer of the exporting module, which is appropriate for commonly " @@ -1659,7 +1689,7 @@ msgid "" "modules only have to call this macro before accessing the C API." msgstr "" -#: ../../extending/extending.rst:1222 +#: ../../extending/extending.rst:1240 msgid "" "The exporting module is a modification of the :mod:`!spam` module from " "section :ref:`extending-simpleexample`. The function :func:`!spam.system` " @@ -1670,13 +1700,13 @@ msgid "" "modules." msgstr "" -#: ../../extending/extending.rst:1229 +#: ../../extending/extending.rst:1247 msgid "" "The function :c:func:`!PySpam_System` is a plain C function, declared " "``static`` like everything else::" msgstr "" -#: ../../extending/extending.rst:1232 +#: ../../extending/extending.rst:1250 msgid "" "static int\n" "PySpam_System(const char *command)\n" @@ -1685,11 +1715,11 @@ msgid "" "}" msgstr "" -#: ../../extending/extending.rst:1238 +#: ../../extending/extending.rst:1256 msgid "The function :c:func:`!spam_system` is modified in a trivial way::" msgstr "" -#: ../../extending/extending.rst:1240 +#: ../../extending/extending.rst:1258 msgid "" "static PyObject *\n" "spam_system(PyObject *self, PyObject *args)\n" @@ -1704,45 +1734,40 @@ msgid "" "}" msgstr "" -#: ../../extending/extending.rst:1252 +#: ../../extending/extending.rst:1270 msgid "In the beginning of the module, right after the line ::" msgstr "" -#: ../../extending/extending.rst:1254 +#: ../../extending/extending.rst:1272 msgid "#include " msgstr "" -#: ../../extending/extending.rst:1256 +#: ../../extending/extending.rst:1274 msgid "two more lines must be added::" msgstr "" -#: ../../extending/extending.rst:1258 +#: ../../extending/extending.rst:1276 msgid "" "#define SPAM_MODULE\n" "#include \"spammodule.h\"" msgstr "" -#: ../../extending/extending.rst:1261 +#: ../../extending/extending.rst:1279 msgid "" "The ``#define`` is used to tell the header file that it is being included in " -"the exporting module, not a client module. Finally, the module's " -"initialization function must take care of initializing the C API pointer " -"array::" +"the exporting module, not a client module. Finally, the module's :c:data:" +"`mod_exec ` function must take care of initializing the C API " +"pointer array::" msgstr "" -#: ../../extending/extending.rst:1265 +#: ../../extending/extending.rst:1283 msgid "" -"PyMODINIT_FUNC\n" -"PyInit_spam(void)\n" +"static int\n" +"spam_module_exec(PyObject *m)\n" "{\n" -" PyObject *m;\n" " static void *PySpam_API[PySpam_API_pointers];\n" " PyObject *c_api_object;\n" "\n" -" m = PyModule_Create(&spammodule);\n" -" if (m == NULL)\n" -" return NULL;\n" -"\n" " /* Initialize the C API pointer array */\n" " PySpam_API[PySpam_System_NUM] = (void *)PySpam_System;\n" "\n" @@ -1751,27 +1776,26 @@ msgid "" "NULL);\n" "\n" " if (PyModule_Add(m, \"_C_API\", c_api_object) < 0) {\n" -" Py_DECREF(m);\n" -" return NULL;\n" +" return -1;\n" " }\n" "\n" -" return m;\n" +" return 0;\n" "}" msgstr "" -#: ../../extending/extending.rst:1290 +#: ../../extending/extending.rst:1302 msgid "" "Note that ``PySpam_API`` is declared ``static``; otherwise the pointer array " "would disappear when :c:func:`!PyInit_spam` terminates!" msgstr "" -#: ../../extending/extending.rst:1293 +#: ../../extending/extending.rst:1305 msgid "" "The bulk of the work is in the header file :file:`spammodule.h`, which looks " "like this::" msgstr "" -#: ../../extending/extending.rst:1296 +#: ../../extending/extending.rst:1308 msgid "" "#ifndef Py_SPAMMODULE_H\n" "#define Py_SPAMMODULE_H\n" @@ -1823,38 +1847,34 @@ msgid "" "#endif /* !defined(Py_SPAMMODULE_H) */" msgstr "" -#: ../../extending/extending.rst:1344 +#: ../../extending/extending.rst:1356 msgid "" "All that a client module must do in order to have access to the function :c:" "func:`!PySpam_System` is to call the function (or rather macro) :c:func:`!" -"import_spam` in its initialization function::" +"import_spam` in its :c:data:`mod_exec ` function::" msgstr "" -#: ../../extending/extending.rst:1348 +#: ../../extending/extending.rst:1360 msgid "" -"PyMODINIT_FUNC\n" -"PyInit_client(void)\n" +"static int\n" +"client_module_exec(PyObject *m)\n" "{\n" -" PyObject *m;\n" -"\n" -" m = PyModule_Create(&clientmodule);\n" -" if (m == NULL)\n" -" return NULL;\n" -" if (import_spam() < 0)\n" -" return NULL;\n" +" if (import_spam() < 0) {\n" +" return -1;\n" +" }\n" " /* additional initialization can happen here */\n" -" return m;\n" +" return 0;\n" "}" msgstr "" -#: ../../extending/extending.rst:1362 +#: ../../extending/extending.rst:1370 msgid "" "The main disadvantage of this approach is that the file :file:`spammodule.h` " "is rather complicated. However, the basic structure is the same for each " "function that is exported, so it has to be learned only once." msgstr "" -#: ../../extending/extending.rst:1366 +#: ../../extending/extending.rst:1374 msgid "" "Finally it should be mentioned that Capsules offer additional functionality, " "which is especially useful for memory allocation and deallocation of the " @@ -1864,47 +1884,47 @@ msgid "" "in the Python source code distribution)." msgstr "" -#: ../../extending/extending.rst:1374 +#: ../../extending/extending.rst:1382 msgid "Footnotes" msgstr "" -#: ../../extending/extending.rst:1375 +#: ../../extending/extending.rst:1383 msgid "" "An interface for this function already exists in the standard module :mod:" "`os` --- it was chosen as a simple and straightforward example." msgstr "" -#: ../../extending/extending.rst:1378 +#: ../../extending/extending.rst:1386 msgid "" "The metaphor of \"borrowing\" a reference is not completely correct: the " "owner still has a copy of the reference." msgstr "" -#: ../../extending/extending.rst:1381 +#: ../../extending/extending.rst:1389 msgid "" "Checking that the reference count is at least 1 **does not work** --- the " "reference count itself could be in freed memory and may thus be reused for " "another object!" msgstr "" -#: ../../extending/extending.rst:1385 +#: ../../extending/extending.rst:1393 msgid "" "These guarantees don't hold when you use the \"old\" style calling " "convention --- this is still found in much existing code." msgstr "" -#: ../../extending/extending.rst:550 +#: ../../extending/extending.rst:568 msgid "PyObject_CallObject (C function)" msgstr "" -#: ../../extending/extending.rst:641 +#: ../../extending/extending.rst:659 msgid "PyArg_ParseTuple (C function)" msgstr "" -#: ../../extending/extending.rst:733 +#: ../../extending/extending.rst:751 msgid "PyArg_ParseTupleAndKeywords (C function)" msgstr "" -#: ../../extending/extending.rst:754 +#: ../../extending/extending.rst:772 msgid "Philbrick, Geoff" msgstr "" diff --git a/extending/index.po b/extending/index.po index ce21cec75..107352adb 100644 --- a/extending/index.po +++ b/extending/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 00:52+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" @@ -55,30 +55,16 @@ msgstr "" #: ../../extending/index.rst:28 msgid "" "This guide only covers the basic tools for creating extensions provided as " -"part of this version of CPython. Third party tools like `Cython `_, `cffi `_, `SWIG `_ and `Numba `_ offer both simpler and " -"more sophisticated approaches to creating C and C++ extensions for Python." +"part of this version of CPython. Some :ref:`third party tools ` " +"offer both simpler and more sophisticated approaches to creating C and C++ " +"extensions for Python." msgstr "" -#: ../../extending/index.rst:37 -msgid "" -"`Python Packaging User Guide: Binary Extensions `_" -msgstr "" - -#: ../../extending/index.rst:38 -msgid "" -"The Python Packaging User Guide not only covers several available tools that " -"simplify the creation of binary extensions, but also discusses the various " -"reasons why creating an extension module may be desirable in the first place." -msgstr "" - -#: ../../extending/index.rst:45 +#: ../../extending/index.rst:35 msgid "Creating extensions without third party tools" msgstr "" -#: ../../extending/index.rst:47 +#: ../../extending/index.rst:37 msgid "" "This section of the guide covers creating C and C++ extensions without " "assistance from third party tools. It is intended primarily for creators of " @@ -86,11 +72,15 @@ msgid "" "extensions." msgstr "" -#: ../../extending/index.rst:63 +#: ../../extending/index.rst:44 +msgid ":pep:`489` -- Multi-phase extension module initialization" +msgstr "" + +#: ../../extending/index.rst:57 msgid "Embedding the CPython runtime in a larger application" msgstr "" -#: ../../extending/index.rst:65 +#: ../../extending/index.rst:59 msgid "" "Sometimes, rather than creating an extension that runs inside the Python " "interpreter as the main application, it is desirable to instead embed the " diff --git a/extending/newtypes.po b/extending/newtypes.po index a29e4cf34..b0dc7e05d 100644 --- a/extending/newtypes.po +++ b/extending/newtypes.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:52+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/extending/newtypes_tutorial.po b/extending/newtypes_tutorial.po index 45361efd7..198c837cc 100644 --- a/extending/newtypes_tutorial.po +++ b/extending/newtypes_tutorial.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Ariyan Bolandi, 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:52+0000\n" -"Last-Translator: Ariyan Bolandi, 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -93,31 +94,41 @@ msgid "" " .tp_new = PyType_GenericNew,\n" "};\n" "\n" -"static PyModuleDef custommodule = {\n" +"static int\n" +"custom_module_exec(PyObject *m)\n" +"{\n" +" if (PyType_Ready(&CustomType) < 0) {\n" +" return -1;\n" +" }\n" +"\n" +" if (PyModule_AddObjectRef(m, \"Custom\", (PyObject *) &CustomType) < 0) " +"{\n" +" return -1;\n" +" }\n" +"\n" +" return 0;\n" +"}\n" +"\n" +"static PyModuleDef_Slot custom_module_slots[] = {\n" +" {Py_mod_exec, custom_module_exec},\n" +" // Just use this while using static types\n" +" {Py_mod_multiple_interpreters, " +"Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},\n" +" {0, NULL}\n" +"};\n" +"\n" +"static PyModuleDef custom_module = {\n" " .m_base = PyModuleDef_HEAD_INIT,\n" " .m_name = \"custom\",\n" " .m_doc = \"Example module that creates an extension type.\",\n" -" .m_size = -1,\n" +" .m_size = 0,\n" +" .m_slots = custom_module_slots,\n" "};\n" "\n" "PyMODINIT_FUNC\n" "PyInit_custom(void)\n" "{\n" -" PyObject *m;\n" -" if (PyType_Ready(&CustomType) < 0)\n" -" return NULL;\n" -"\n" -" m = PyModule_Create(&custommodule);\n" -" if (m == NULL)\n" -" return NULL;\n" -"\n" -" if (PyModule_AddObjectRef(m, \"Custom\", (PyObject *) &CustomType) < 0) " -"{\n" -" Py_DECREF(m);\n" -" return NULL;\n" -" }\n" -"\n" -" return m;\n" +" return PyModuleDef_Init(&custom_module);\n" "}\n" msgstr "" @@ -142,22 +153,24 @@ msgstr "" #: ../../extending/newtypes_tutorial.rst:58 msgid "" -"How to initialize the :mod:`!custom` module: this is the ``PyInit_custom`` " -"function and the associated ``custommodule`` struct." +"How to define and execute the :mod:`!custom` module: this is the " +"``PyInit_custom`` function and the associated ``custom_module`` struct for " +"defining the module, and the ``custom_module_exec`` function to set up a " +"fresh module object." msgstr "" -#: ../../extending/newtypes_tutorial.rst:61 +#: ../../extending/newtypes_tutorial.rst:63 msgid "The first bit is::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:63 +#: ../../extending/newtypes_tutorial.rst:65 msgid "" "typedef struct {\n" " PyObject_HEAD\n" "} CustomObject;" msgstr "" -#: ../../extending/newtypes_tutorial.rst:67 +#: ../../extending/newtypes_tutorial.rst:69 msgid "" "This is what a Custom object will contain. ``PyObject_HEAD`` is mandatory " "at the start of each object struct and defines a field called ``ob_base`` of " @@ -168,20 +181,20 @@ msgid "" "builds `." msgstr "" -#: ../../extending/newtypes_tutorial.rst:76 +#: ../../extending/newtypes_tutorial.rst:78 msgid "" "There is no semicolon above after the :c:macro:`PyObject_HEAD` macro. Be " "wary of adding one by accident: some compilers will complain." msgstr "" -#: ../../extending/newtypes_tutorial.rst:79 +#: ../../extending/newtypes_tutorial.rst:81 msgid "" "Of course, objects generally store additional data besides the standard " "``PyObject_HEAD`` boilerplate; for example, here is the definition for " "standard Python floats::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:83 +#: ../../extending/newtypes_tutorial.rst:85 msgid "" "typedef struct {\n" " PyObject_HEAD\n" @@ -189,11 +202,11 @@ msgid "" "} PyFloatObject;" msgstr "" -#: ../../extending/newtypes_tutorial.rst:88 +#: ../../extending/newtypes_tutorial.rst:90 msgid "The second bit is the definition of the type object. ::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:90 +#: ../../extending/newtypes_tutorial.rst:92 msgid "" "static PyTypeObject CustomType = {\n" " .ob_base = PyVarObject_HEAD_INIT(NULL, 0)\n" @@ -206,14 +219,14 @@ msgid "" "};" msgstr "" -#: ../../extending/newtypes_tutorial.rst:101 +#: ../../extending/newtypes_tutorial.rst:103 msgid "" "We recommend using C99-style designated initializers as above, to avoid " "listing all the :c:type:`PyTypeObject` fields that you don't care about and " "also to avoid caring about the fields' declaration order." msgstr "" -#: ../../extending/newtypes_tutorial.rst:105 +#: ../../extending/newtypes_tutorial.rst:107 msgid "" "The actual definition of :c:type:`PyTypeObject` in :file:`object.h` has many " "more :ref:`fields ` than the definition above. The remaining " @@ -221,31 +234,31 @@ msgid "" "to not specify them explicitly unless you need them." msgstr "" -#: ../../extending/newtypes_tutorial.rst:110 +#: ../../extending/newtypes_tutorial.rst:112 msgid "We're going to pick it apart, one field at a time::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:112 +#: ../../extending/newtypes_tutorial.rst:114 msgid ".ob_base = PyVarObject_HEAD_INIT(NULL, 0)" msgstr "" -#: ../../extending/newtypes_tutorial.rst:114 +#: ../../extending/newtypes_tutorial.rst:116 msgid "" "This line is mandatory boilerplate to initialize the ``ob_base`` field " "mentioned above. ::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:117 +#: ../../extending/newtypes_tutorial.rst:119 msgid ".tp_name = \"custom.Custom\"," msgstr "" -#: ../../extending/newtypes_tutorial.rst:119 +#: ../../extending/newtypes_tutorial.rst:121 msgid "" "The name of our type. This will appear in the default textual " "representation of our objects and in some error messages, for example:" msgstr "" -#: ../../extending/newtypes_tutorial.rst:122 +#: ../../extending/newtypes_tutorial.rst:124 msgid "" ">>> \"\" + custom.Custom()\n" "Traceback (most recent call last):\n" @@ -253,7 +266,7 @@ msgid "" "TypeError: can only concatenate str (not \"custom.Custom\") to str" msgstr "" -#: ../../extending/newtypes_tutorial.rst:129 +#: ../../extending/newtypes_tutorial.rst:131 msgid "" "Note that the name is a dotted name that includes both the module name and " "the name of the type within the module. The module in this case is :mod:`!" @@ -262,20 +275,20 @@ msgid "" "your type compatible with the :mod:`pydoc` and :mod:`pickle` modules. ::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:135 +#: ../../extending/newtypes_tutorial.rst:137 msgid "" ".tp_basicsize = sizeof(CustomObject),\n" ".tp_itemsize = 0," msgstr "" -#: ../../extending/newtypes_tutorial.rst:138 +#: ../../extending/newtypes_tutorial.rst:140 msgid "" "This is so that Python knows how much memory to allocate when creating new :" "class:`!Custom` instances. :c:member:`~PyTypeObject.tp_itemsize` is only " "used for variable-sized objects and should otherwise be zero." msgstr "" -#: ../../extending/newtypes_tutorial.rst:144 +#: ../../extending/newtypes_tutorial.rst:146 msgid "" "If you want your type to be subclassable from Python, and your type has the " "same :c:member:`~PyTypeObject.tp_basicsize` as its base type, you may have " @@ -289,31 +302,31 @@ msgid "" "your base type, and therefore increasing its size." msgstr "" -#: ../../extending/newtypes_tutorial.rst:154 +#: ../../extending/newtypes_tutorial.rst:156 msgid "We set the class flags to :c:macro:`Py_TPFLAGS_DEFAULT`. ::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:156 +#: ../../extending/newtypes_tutorial.rst:158 msgid ".tp_flags = Py_TPFLAGS_DEFAULT," msgstr "" -#: ../../extending/newtypes_tutorial.rst:158 +#: ../../extending/newtypes_tutorial.rst:160 msgid "" "All types should include this constant in their flags. It enables all of " "the members defined until at least Python 3.3. If you need further members, " "you will need to OR the corresponding flags." msgstr "" -#: ../../extending/newtypes_tutorial.rst:162 +#: ../../extending/newtypes_tutorial.rst:164 msgid "" "We provide a doc string for the type in :c:member:`~PyTypeObject.tp_doc`. ::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:164 +#: ../../extending/newtypes_tutorial.rst:166 msgid ".tp_doc = PyDoc_STR(\"Custom objects\")," msgstr "" -#: ../../extending/newtypes_tutorial.rst:166 +#: ../../extending/newtypes_tutorial.rst:168 msgid "" "To enable object creation, we have to provide a :c:member:`~PyTypeObject." "tp_new` handler. This is the equivalent of the Python method :meth:`~object." @@ -322,56 +335,56 @@ msgid "" "`PyType_GenericNew`. ::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:171 +#: ../../extending/newtypes_tutorial.rst:173 msgid ".tp_new = PyType_GenericNew," msgstr "" -#: ../../extending/newtypes_tutorial.rst:173 +#: ../../extending/newtypes_tutorial.rst:175 msgid "" "Everything else in the file should be familiar, except for some code in :c:" -"func:`!PyInit_custom`::" +"func:`!custom_module_exec`::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:176 +#: ../../extending/newtypes_tutorial.rst:178 msgid "" -"if (PyType_Ready(&CustomType) < 0)\n" -" return;" +"if (PyType_Ready(&CustomType) < 0) {\n" +" return -1;\n" +"}" msgstr "" -#: ../../extending/newtypes_tutorial.rst:179 +#: ../../extending/newtypes_tutorial.rst:182 msgid "" "This initializes the :class:`!Custom` type, filling in a number of members " "to the appropriate default values, including :c:member:`~PyObject.ob_type` " "that we initially set to ``NULL``. ::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:183 +#: ../../extending/newtypes_tutorial.rst:186 msgid "" "if (PyModule_AddObjectRef(m, \"Custom\", (PyObject *) &CustomType) < 0) {\n" -" Py_DECREF(m);\n" -" return NULL;\n" +" return -1;\n" "}" msgstr "" -#: ../../extending/newtypes_tutorial.rst:188 +#: ../../extending/newtypes_tutorial.rst:190 msgid "" "This adds the type to the module dictionary. This allows us to create :" "class:`!Custom` instances by calling the :class:`!Custom` class:" msgstr "" -#: ../../extending/newtypes_tutorial.rst:191 +#: ../../extending/newtypes_tutorial.rst:193 msgid "" ">>> import custom\n" ">>> mycustom = custom.Custom()" msgstr "" -#: ../../extending/newtypes_tutorial.rst:196 +#: ../../extending/newtypes_tutorial.rst:198 msgid "" "That's it! All that remains is to build it; put the above code in a file " "called :file:`custom.c`," msgstr "" -#: ../../extending/newtypes_tutorial.rst:199 +#: ../../extending/newtypes_tutorial.rst:201 msgid "" "[build-system]\n" "requires = [\"setuptools\"]\n" @@ -382,54 +395,54 @@ msgid "" "version = \"1\"\n" msgstr "" -#: ../../extending/newtypes_tutorial.rst:201 +#: ../../extending/newtypes_tutorial.rst:203 msgid "in a file called :file:`pyproject.toml`, and" msgstr "" -#: ../../extending/newtypes_tutorial.rst:203 +#: ../../extending/newtypes_tutorial.rst:205 msgid "" "from setuptools import Extension, setup\n" "setup(ext_modules=[Extension(\"custom\", [\"custom.c\"])])" msgstr "" -#: ../../extending/newtypes_tutorial.rst:208 +#: ../../extending/newtypes_tutorial.rst:210 msgid "in a file called :file:`setup.py`; then typing" msgstr "" -#: ../../extending/newtypes_tutorial.rst:210 -#: ../../extending/newtypes_tutorial.rst:548 +#: ../../extending/newtypes_tutorial.rst:212 +#: ../../extending/newtypes_tutorial.rst:550 msgid "$ python -m pip install ." msgstr "" -#: ../../extending/newtypes_tutorial.rst:214 +#: ../../extending/newtypes_tutorial.rst:216 msgid "" "in a shell should produce a file :file:`custom.so` in a subdirectory and " "install it; now fire up Python --- you should be able to ``import custom`` " "and play around with ``Custom`` objects." msgstr "" -#: ../../extending/newtypes_tutorial.rst:218 +#: ../../extending/newtypes_tutorial.rst:220 msgid "That wasn't so hard, was it?" msgstr "" -#: ../../extending/newtypes_tutorial.rst:220 +#: ../../extending/newtypes_tutorial.rst:222 msgid "" "Of course, the current Custom type is pretty uninteresting. It has no data " "and doesn't do anything. It can't even be subclassed." msgstr "" -#: ../../extending/newtypes_tutorial.rst:225 +#: ../../extending/newtypes_tutorial.rst:227 msgid "Adding data and methods to the Basic example" msgstr "" -#: ../../extending/newtypes_tutorial.rst:227 +#: ../../extending/newtypes_tutorial.rst:229 msgid "" "Let's extend the basic example to add some data and methods. Let's also " "make the type usable as a base class. We'll create a new module, :mod:`!" "custom2` that adds these capabilities:" msgstr "" -#: ../../extending/newtypes_tutorial.rst:231 +#: ../../extending/newtypes_tutorial.rst:233 msgid "" "#define PY_SSIZE_T_CLEAN\n" "#include \n" @@ -539,39 +552,48 @@ msgid "" " .tp_methods = Custom_methods,\n" "};\n" "\n" -"static PyModuleDef custommodule = {\n" -" .m_base =PyModuleDef_HEAD_INIT,\n" +"static int\n" +"custom_module_exec(PyObject *m)\n" +"{\n" +" if (PyType_Ready(&CustomType) < 0) {\n" +" return -1;\n" +" }\n" +"\n" +" if (PyModule_AddObjectRef(m, \"Custom\", (PyObject *) &CustomType) < 0) " +"{\n" +" return -1;\n" +" }\n" +"\n" +" return 0;\n" +"}\n" +"\n" +"static PyModuleDef_Slot custom_module_slots[] = {\n" +" {Py_mod_exec, custom_module_exec},\n" +" {Py_mod_multiple_interpreters, " +"Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},\n" +" {0, NULL}\n" +"};\n" +"\n" +"static PyModuleDef custom_module = {\n" +" .m_base = PyModuleDef_HEAD_INIT,\n" " .m_name = \"custom2\",\n" " .m_doc = \"Example module that creates an extension type.\",\n" -" .m_size = -1,\n" +" .m_size = 0,\n" +" .m_slots = custom_module_slots,\n" "};\n" "\n" "PyMODINIT_FUNC\n" "PyInit_custom2(void)\n" "{\n" -" PyObject *m;\n" -" if (PyType_Ready(&CustomType) < 0)\n" -" return NULL;\n" -"\n" -" m = PyModule_Create(&custommodule);\n" -" if (m == NULL)\n" -" return NULL;\n" -"\n" -" if (PyModule_AddObjectRef(m, \"Custom\", (PyObject *) &CustomType) < 0) " -"{\n" -" Py_DECREF(m);\n" -" return NULL;\n" -" }\n" -"\n" -" return m;\n" +" return PyModuleDef_Init(&custom_module);\n" "}\n" msgstr "" -#: ../../extending/newtypes_tutorial.rst:234 +#: ../../extending/newtypes_tutorial.rst:236 msgid "This version of the module has a number of changes." msgstr "" -#: ../../extending/newtypes_tutorial.rst:236 +#: ../../extending/newtypes_tutorial.rst:238 msgid "" "The :class:`!Custom` type now has three data attributes in its C struct, " "*first*, *last*, and *number*. The *first* and *last* variables are Python " @@ -579,11 +601,11 @@ msgid "" "integer." msgstr "" -#: ../../extending/newtypes_tutorial.rst:240 +#: ../../extending/newtypes_tutorial.rst:242 msgid "The object structure is updated accordingly::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:242 +#: ../../extending/newtypes_tutorial.rst:244 msgid "" "typedef struct {\n" " PyObject_HEAD\n" @@ -593,13 +615,13 @@ msgid "" "} CustomObject;" msgstr "" -#: ../../extending/newtypes_tutorial.rst:249 +#: ../../extending/newtypes_tutorial.rst:251 msgid "" "Because we now have data to manage, we have to be more careful about object " "allocation and deallocation. At a minimum, we need a deallocation method::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:252 +#: ../../extending/newtypes_tutorial.rst:254 msgid "" "static void\n" "Custom_dealloc(PyObject *op)\n" @@ -611,15 +633,15 @@ msgid "" "}" msgstr "" -#: ../../extending/newtypes_tutorial.rst:261 +#: ../../extending/newtypes_tutorial.rst:263 msgid "which is assigned to the :c:member:`~PyTypeObject.tp_dealloc` member::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:263 +#: ../../extending/newtypes_tutorial.rst:265 msgid ".tp_dealloc = Custom_dealloc," msgstr "" -#: ../../extending/newtypes_tutorial.rst:265 +#: ../../extending/newtypes_tutorial.rst:267 msgid "" "This method first clears the reference counts of the two Python attributes. :" "c:func:`Py_XDECREF` correctly handles the case where its argument is " @@ -630,24 +652,24 @@ msgid "" "an instance of a subclass." msgstr "" -#: ../../extending/newtypes_tutorial.rst:275 +#: ../../extending/newtypes_tutorial.rst:277 msgid "" "The explicit cast to ``CustomObject *`` above is needed because we defined " "``Custom_dealloc`` to take a ``PyObject *`` argument, as the ``tp_dealloc`` " "function pointer expects to receive a ``PyObject *`` argument. By assigning " -"to the the ``tp_dealloc`` slot of a type, we declare that it can only be " -"called with instances of our ``CustomObject`` class, so the cast to " -"``(CustomObject *)`` is safe. This is object-oriented polymorphism, in C!" +"to the ``tp_dealloc`` slot of a type, we declare that it can only be called " +"with instances of our ``CustomObject`` class, so the cast to ``(CustomObject " +"*)`` is safe. This is object-oriented polymorphism, in C!" msgstr "" -#: ../../extending/newtypes_tutorial.rst:283 +#: ../../extending/newtypes_tutorial.rst:285 msgid "" "In existing code, or in previous versions of this tutorial, you might see " "similar functions take a pointer to the subtype object structure " "(``CustomObject*``) directly, like this::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:287 +#: ../../extending/newtypes_tutorial.rst:289 msgid "" "Custom_dealloc(CustomObject *self)\n" "{\n" @@ -659,19 +681,19 @@ msgid "" ".tp_dealloc = (destructor) Custom_dealloc," msgstr "" -#: ../../extending/newtypes_tutorial.rst:296 +#: ../../extending/newtypes_tutorial.rst:298 msgid "" "This does the same thing on all architectures that CPython supports, but " "according to the C standard, it invokes undefined behavior." msgstr "" -#: ../../extending/newtypes_tutorial.rst:300 +#: ../../extending/newtypes_tutorial.rst:302 msgid "" "We want to make sure that the first and last names are initialized to empty " "strings, so we provide a ``tp_new`` implementation::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:303 +#: ../../extending/newtypes_tutorial.rst:305 msgid "" "static PyObject *\n" "Custom_new(PyTypeObject *type, PyObject *args, PyObject *kwds)\n" @@ -695,15 +717,15 @@ msgid "" "}" msgstr "" -#: ../../extending/newtypes_tutorial.rst:324 +#: ../../extending/newtypes_tutorial.rst:326 msgid "and install it in the :c:member:`~PyTypeObject.tp_new` member::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:326 +#: ../../extending/newtypes_tutorial.rst:328 msgid ".tp_new = Custom_new," msgstr "" -#: ../../extending/newtypes_tutorial.rst:328 +#: ../../extending/newtypes_tutorial.rst:330 msgid "" "The ``tp_new`` handler is responsible for creating (as opposed to " "initializing) objects of the type. It is exposed in Python as the :meth:" @@ -714,7 +736,7 @@ msgid "" "``first`` and ``last`` attributes to non-``NULL`` default values." msgstr "" -#: ../../extending/newtypes_tutorial.rst:336 +#: ../../extending/newtypes_tutorial.rst:338 msgid "" "``tp_new`` is passed the type being instantiated (not necessarily " "``CustomType``, if a subclass is instantiated) and any arguments passed when " @@ -724,29 +746,29 @@ msgid "" "k.a. ``tp_init`` in C or ``__init__`` in Python) methods." msgstr "" -#: ../../extending/newtypes_tutorial.rst:344 +#: ../../extending/newtypes_tutorial.rst:346 msgid "" "``tp_new`` shouldn't call ``tp_init`` explicitly, as the interpreter will do " "it itself." msgstr "" -#: ../../extending/newtypes_tutorial.rst:347 +#: ../../extending/newtypes_tutorial.rst:349 msgid "" "The ``tp_new`` implementation calls the :c:member:`~PyTypeObject.tp_alloc` " "slot to allocate memory::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:350 +#: ../../extending/newtypes_tutorial.rst:352 msgid "self = (CustomObject *) type->tp_alloc(type, 0);" msgstr "" -#: ../../extending/newtypes_tutorial.rst:352 +#: ../../extending/newtypes_tutorial.rst:354 msgid "" "Since memory allocation may fail, we must check the :c:member:`~PyTypeObject." "tp_alloc` result against ``NULL`` before proceeding." msgstr "" -#: ../../extending/newtypes_tutorial.rst:356 +#: ../../extending/newtypes_tutorial.rst:358 msgid "" "We didn't fill the :c:member:`~PyTypeObject.tp_alloc` slot ourselves. " "Rather :c:func:`PyType_Ready` fills it for us by inheriting it from our base " @@ -754,7 +776,7 @@ msgid "" "allocation strategy." msgstr "" -#: ../../extending/newtypes_tutorial.rst:362 +#: ../../extending/newtypes_tutorial.rst:364 msgid "" "If you are creating a co-operative :c:member:`~PyTypeObject.tp_new` (one " "that calls a base type's :c:member:`~PyTypeObject.tp_new` or :meth:`~object." @@ -767,13 +789,13 @@ msgid "" "subclasses without getting a :exc:`TypeError`.)" msgstr "" -#: ../../extending/newtypes_tutorial.rst:372 +#: ../../extending/newtypes_tutorial.rst:374 msgid "" "We also define an initialization function which accepts arguments to provide " "initial values for our instance::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:375 +#: ../../extending/newtypes_tutorial.rst:377 msgid "" "static int\n" "Custom_init(PyObject *op, PyObject *args, PyObject *kwds)\n" @@ -803,15 +825,15 @@ msgid "" "}" msgstr "" -#: ../../extending/newtypes_tutorial.rst:402 +#: ../../extending/newtypes_tutorial.rst:404 msgid "by filling the :c:member:`~PyTypeObject.tp_init` slot. ::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:404 +#: ../../extending/newtypes_tutorial.rst:406 msgid ".tp_init = Custom_init," msgstr "" -#: ../../extending/newtypes_tutorial.rst:406 +#: ../../extending/newtypes_tutorial.rst:408 msgid "" "The :c:member:`~PyTypeObject.tp_init` slot is exposed in Python as the :meth:" "`~object.__init__` method. It is used to initialize an object after it's " @@ -819,7 +841,7 @@ msgid "" "they should return either ``0`` on success or ``-1`` on error." msgstr "" -#: ../../extending/newtypes_tutorial.rst:411 +#: ../../extending/newtypes_tutorial.rst:413 msgid "" "Unlike the ``tp_new`` handler, there is no guarantee that ``tp_init`` is " "called at all (for example, the :mod:`pickle` module by default doesn't " @@ -830,7 +852,7 @@ msgid "" "``first`` member like this::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:419 +#: ../../extending/newtypes_tutorial.rst:421 msgid "" "if (first) {\n" " Py_XDECREF(self->first);\n" @@ -839,7 +861,7 @@ msgid "" "}" msgstr "" -#: ../../extending/newtypes_tutorial.rst:425 +#: ../../extending/newtypes_tutorial.rst:427 msgid "" "But this would be risky. Our type doesn't restrict the type of the " "``first`` member, so it could be any kind of object. It could have a " @@ -849,38 +871,38 @@ msgid "" "accesses and modifies our object." msgstr "" -#: ../../extending/newtypes_tutorial.rst:432 +#: ../../extending/newtypes_tutorial.rst:434 msgid "" "To be paranoid and protect ourselves against this possibility, we almost " "always reassign members before decrementing their reference counts. When " "don't we have to do this?" msgstr "" -#: ../../extending/newtypes_tutorial.rst:436 +#: ../../extending/newtypes_tutorial.rst:438 msgid "when we absolutely know that the reference count is greater than 1;" msgstr "" -#: ../../extending/newtypes_tutorial.rst:438 +#: ../../extending/newtypes_tutorial.rst:440 msgid "" "when we know that deallocation of the object [#]_ will neither detach the :" "term:`thread state ` nor cause any calls back into " "our type's code;" msgstr "" -#: ../../extending/newtypes_tutorial.rst:441 +#: ../../extending/newtypes_tutorial.rst:443 msgid "" "when decrementing a reference count in a :c:member:`~PyTypeObject." "tp_dealloc` handler on a type which doesn't support cyclic garbage " "collection [#]_." msgstr "" -#: ../../extending/newtypes_tutorial.rst:444 +#: ../../extending/newtypes_tutorial.rst:446 msgid "" "We want to expose our instance variables as attributes. There are a number " "of ways to do that. The simplest way is to define member definitions::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:447 +#: ../../extending/newtypes_tutorial.rst:449 msgid "" "static PyMemberDef Custom_members[] = {\n" " {\"first\", Py_T_OBJECT_EX, offsetof(CustomObject, first), 0,\n" @@ -893,23 +915,23 @@ msgid "" "};" msgstr "" -#: ../../extending/newtypes_tutorial.rst:457 +#: ../../extending/newtypes_tutorial.rst:459 msgid "" "and put the definitions in the :c:member:`~PyTypeObject.tp_members` slot::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:459 +#: ../../extending/newtypes_tutorial.rst:461 msgid ".tp_members = Custom_members," msgstr "" -#: ../../extending/newtypes_tutorial.rst:461 +#: ../../extending/newtypes_tutorial.rst:463 msgid "" "Each member definition has a member name, type, offset, access flags and " "documentation string. See the :ref:`Generic-Attribute-Management` section " "below for details." msgstr "" -#: ../../extending/newtypes_tutorial.rst:465 +#: ../../extending/newtypes_tutorial.rst:467 msgid "" "A disadvantage of this approach is that it doesn't provide a way to restrict " "the types of objects that can be assigned to the Python attributes. We " @@ -920,13 +942,13 @@ msgid "" "deleted." msgstr "" -#: ../../extending/newtypes_tutorial.rst:472 +#: ../../extending/newtypes_tutorial.rst:474 msgid "" "We define a single method, :meth:`!Custom.name`, that outputs the objects " "name as the concatenation of the first and last names. ::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:475 +#: ../../extending/newtypes_tutorial.rst:477 msgid "" "static PyObject *\n" "Custom_name(PyObject *op, PyObject *Py_UNUSED(dummy))\n" @@ -944,7 +966,7 @@ msgid "" "}" msgstr "" -#: ../../extending/newtypes_tutorial.rst:490 +#: ../../extending/newtypes_tutorial.rst:492 msgid "" "The method is implemented as a C function that takes a :class:`!Custom` (or :" "class:`!Custom` subclass) instance as the first argument. Methods always " @@ -954,13 +976,13 @@ msgid "" "method is equivalent to the Python method:" msgstr "" -#: ../../extending/newtypes_tutorial.rst:497 +#: ../../extending/newtypes_tutorial.rst:499 msgid "" "def name(self):\n" " return \"%s %s\" % (self.first, self.last)" msgstr "" -#: ../../extending/newtypes_tutorial.rst:502 +#: ../../extending/newtypes_tutorial.rst:504 msgid "" "Note that we have to check for the possibility that our :attr:`!first` and :" "attr:`!last` members are ``NULL``. This is because they can be deleted, in " @@ -969,13 +991,13 @@ msgid "" "We'll see how to do that in the next section." msgstr "" -#: ../../extending/newtypes_tutorial.rst:508 +#: ../../extending/newtypes_tutorial.rst:510 msgid "" "Now that we've defined the method, we need to create an array of method " "definitions::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:511 +#: ../../extending/newtypes_tutorial.rst:513 msgid "" "static PyMethodDef Custom_methods[] = {\n" " {\"name\", Custom_name, METH_NOARGS,\n" @@ -985,21 +1007,21 @@ msgid "" "};" msgstr "" -#: ../../extending/newtypes_tutorial.rst:518 +#: ../../extending/newtypes_tutorial.rst:520 msgid "" "(note that we used the :c:macro:`METH_NOARGS` flag to indicate that the " "method is expecting no arguments other than *self*)" msgstr "" -#: ../../extending/newtypes_tutorial.rst:521 +#: ../../extending/newtypes_tutorial.rst:523 msgid "and assign it to the :c:member:`~PyTypeObject.tp_methods` slot::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:523 +#: ../../extending/newtypes_tutorial.rst:525 msgid ".tp_methods = Custom_methods," msgstr "" -#: ../../extending/newtypes_tutorial.rst:525 +#: ../../extending/newtypes_tutorial.rst:527 msgid "" "Finally, we'll make our type usable as a base class for subclassing. We've " "written our methods carefully so far so that they don't make any assumptions " @@ -1007,22 +1029,22 @@ msgid "" "to add the :c:macro:`Py_TPFLAGS_BASETYPE` to our class flag definition::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:530 +#: ../../extending/newtypes_tutorial.rst:532 msgid ".tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE," msgstr "" -#: ../../extending/newtypes_tutorial.rst:532 +#: ../../extending/newtypes_tutorial.rst:534 msgid "" "We rename :c:func:`!PyInit_custom` to :c:func:`!PyInit_custom2`, update the " "module name in the :c:type:`PyModuleDef` struct, and update the full class " "name in the :c:type:`PyTypeObject` struct." msgstr "" -#: ../../extending/newtypes_tutorial.rst:536 +#: ../../extending/newtypes_tutorial.rst:538 msgid "Finally, we update our :file:`setup.py` file to include the new module," msgstr "" -#: ../../extending/newtypes_tutorial.rst:538 +#: ../../extending/newtypes_tutorial.rst:540 msgid "" "from setuptools import Extension, setup\n" "setup(ext_modules=[\n" @@ -1031,15 +1053,15 @@ msgid "" "])" msgstr "" -#: ../../extending/newtypes_tutorial.rst:546 +#: ../../extending/newtypes_tutorial.rst:548 msgid "and then we re-install so that we can ``import custom2``:" msgstr "" -#: ../../extending/newtypes_tutorial.rst:553 +#: ../../extending/newtypes_tutorial.rst:555 msgid "Providing finer control over data attributes" msgstr "" -#: ../../extending/newtypes_tutorial.rst:555 +#: ../../extending/newtypes_tutorial.rst:557 msgid "" "In this section, we'll provide finer control over how the :attr:`!first` " "and :attr:`!last` attributes are set in the :class:`!Custom` example. In the " @@ -1048,7 +1070,7 @@ msgid "" "make sure that these attributes always contain strings." msgstr "" -#: ../../extending/newtypes_tutorial.rst:561 +#: ../../extending/newtypes_tutorial.rst:563 msgid "" "#define PY_SSIZE_T_CLEAN\n" "#include \n" @@ -1205,42 +1227,51 @@ msgid "" " .tp_getset = Custom_getsetters,\n" "};\n" "\n" -"static PyModuleDef custommodule = {\n" +"static int\n" +"custom_module_exec(PyObject *m)\n" +"{\n" +" if (PyType_Ready(&CustomType) < 0) {\n" +" return -1;\n" +" }\n" +"\n" +" if (PyModule_AddObjectRef(m, \"Custom\", (PyObject *) &CustomType) < 0) " +"{\n" +" return -1;\n" +" }\n" +"\n" +" return 0;\n" +"}\n" +"\n" +"static PyModuleDef_Slot custom_module_slots[] = {\n" +" {Py_mod_exec, custom_module_exec},\n" +" {Py_mod_multiple_interpreters, " +"Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},\n" +" {0, NULL}\n" +"};\n" +"\n" +"static PyModuleDef custom_module = {\n" " .m_base = PyModuleDef_HEAD_INIT,\n" " .m_name = \"custom3\",\n" " .m_doc = \"Example module that creates an extension type.\",\n" -" .m_size = -1,\n" +" .m_size = 0,\n" +" .m_slots = custom_module_slots,\n" "};\n" "\n" "PyMODINIT_FUNC\n" "PyInit_custom3(void)\n" "{\n" -" PyObject *m;\n" -" if (PyType_Ready(&CustomType) < 0)\n" -" return NULL;\n" -"\n" -" m = PyModule_Create(&custommodule);\n" -" if (m == NULL)\n" -" return NULL;\n" -"\n" -" if (PyModule_AddObjectRef(m, \"Custom\", (PyObject *) &CustomType) < 0) " -"{\n" -" Py_DECREF(m);\n" -" return NULL;\n" -" }\n" -"\n" -" return m;\n" +" return PyModuleDef_Init(&custom_module);\n" "}\n" msgstr "" -#: ../../extending/newtypes_tutorial.rst:564 +#: ../../extending/newtypes_tutorial.rst:566 msgid "" "To provide greater control, over the :attr:`!first` and :attr:`!last` " "attributes, we'll use custom getter and setter functions. Here are the " "functions for getting and setting the :attr:`!first` attribute::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:568 +#: ../../extending/newtypes_tutorial.rst:570 msgid "" "static PyObject *\n" "Custom_getfirst(PyObject *op, void *closure)\n" @@ -1273,7 +1304,7 @@ msgid "" "}" msgstr "" -#: ../../extending/newtypes_tutorial.rst:597 +#: ../../extending/newtypes_tutorial.rst:599 msgid "" "The getter function is passed a :class:`!Custom` object and a \"closure\", " "which is a void pointer. In this case, the closure is ignored. (The " @@ -1283,7 +1314,7 @@ msgid "" "data in the closure.)" msgstr "" -#: ../../extending/newtypes_tutorial.rst:603 +#: ../../extending/newtypes_tutorial.rst:605 msgid "" "The setter function is passed the :class:`!Custom` object, the new value, " "and the closure. The new value may be ``NULL``, in which case the attribute " @@ -1291,11 +1322,11 @@ msgid "" "deleted or if its new value is not a string." msgstr "" -#: ../../extending/newtypes_tutorial.rst:608 +#: ../../extending/newtypes_tutorial.rst:610 msgid "We create an array of :c:type:`PyGetSetDef` structures::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:610 +#: ../../extending/newtypes_tutorial.rst:612 msgid "" "static PyGetSetDef Custom_getsetters[] = {\n" " {\"first\", Custom_getfirst, Custom_setfirst,\n" @@ -1306,26 +1337,26 @@ msgid "" "};" msgstr "" -#: ../../extending/newtypes_tutorial.rst:618 +#: ../../extending/newtypes_tutorial.rst:620 msgid "and register it in the :c:member:`~PyTypeObject.tp_getset` slot::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:620 +#: ../../extending/newtypes_tutorial.rst:622 msgid ".tp_getset = Custom_getsetters," msgstr "" -#: ../../extending/newtypes_tutorial.rst:622 +#: ../../extending/newtypes_tutorial.rst:624 msgid "" "The last item in a :c:type:`PyGetSetDef` structure is the \"closure\" " "mentioned above. In this case, we aren't using a closure, so we just pass " "``NULL``." msgstr "" -#: ../../extending/newtypes_tutorial.rst:625 +#: ../../extending/newtypes_tutorial.rst:627 msgid "We also remove the member definitions for these attributes::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:627 +#: ../../extending/newtypes_tutorial.rst:629 msgid "" "static PyMemberDef Custom_members[] = {\n" " {\"number\", Py_T_INT, offsetof(CustomObject, number), 0,\n" @@ -1334,13 +1365,13 @@ msgid "" "};" msgstr "" -#: ../../extending/newtypes_tutorial.rst:633 +#: ../../extending/newtypes_tutorial.rst:635 msgid "" "We also need to update the :c:member:`~PyTypeObject.tp_init` handler to only " "allow strings [#]_ to be passed::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:636 +#: ../../extending/newtypes_tutorial.rst:638 msgid "" "static int\n" "Custom_init(PyObject *op, PyObject *args, PyObject *kwds)\n" @@ -1370,7 +1401,7 @@ msgid "" "}" msgstr "" -#: ../../extending/newtypes_tutorial.rst:663 +#: ../../extending/newtypes_tutorial.rst:665 msgid "" "With these changes, we can assure that the ``first`` and ``last`` members " "are never ``NULL`` so we can remove checks for ``NULL`` values in almost all " @@ -1380,32 +1411,32 @@ msgid "" "possibility that the initialization of these members failed in ``tp_new``." msgstr "" -#: ../../extending/newtypes_tutorial.rst:670 +#: ../../extending/newtypes_tutorial.rst:672 msgid "" "We also rename the module initialization function and module name in the " "initialization function, as we did before, and we add an extra definition to " "the :file:`setup.py` file." msgstr "" -#: ../../extending/newtypes_tutorial.rst:676 +#: ../../extending/newtypes_tutorial.rst:678 msgid "Supporting cyclic garbage collection" msgstr "" -#: ../../extending/newtypes_tutorial.rst:678 +#: ../../extending/newtypes_tutorial.rst:680 msgid "" "Python has a :term:`cyclic garbage collector (GC) ` that " "can identify unneeded objects even when their reference counts are not zero. " "This can happen when objects are involved in cycles. For example, consider:" msgstr "" -#: ../../extending/newtypes_tutorial.rst:682 +#: ../../extending/newtypes_tutorial.rst:684 msgid "" ">>> l = []\n" ">>> l.append(l)\n" ">>> del l" msgstr "" -#: ../../extending/newtypes_tutorial.rst:688 +#: ../../extending/newtypes_tutorial.rst:690 msgid "" "In this example, we create a list that contains itself. When we delete it, " "it still has a reference from itself. Its reference count doesn't drop to " @@ -1413,7 +1444,7 @@ msgid "" "out that the list is garbage and free it." msgstr "" -#: ../../extending/newtypes_tutorial.rst:693 +#: ../../extending/newtypes_tutorial.rst:695 msgid "" "In the second version of the :class:`!Custom` example, we allowed any kind " "of object to be stored in the :attr:`!first` or :attr:`!last` attributes " @@ -1422,7 +1453,7 @@ msgid "" "those two reasons, :class:`!Custom` objects can participate in cycles:" msgstr "" -#: ../../extending/newtypes_tutorial.rst:699 +#: ../../extending/newtypes_tutorial.rst:701 msgid "" ">>> import custom3\n" ">>> class Derived(custom3.Custom): pass\n" @@ -1431,7 +1462,7 @@ msgid "" ">>> n.some_attribute = n" msgstr "" -#: ../../extending/newtypes_tutorial.rst:707 +#: ../../extending/newtypes_tutorial.rst:709 msgid "" "To allow a :class:`!Custom` instance participating in a reference cycle to " "be properly detected and collected by the cyclic GC, our :class:`!Custom` " @@ -1439,7 +1470,7 @@ msgid "" "these slots:" msgstr "" -#: ../../extending/newtypes_tutorial.rst:711 +#: ../../extending/newtypes_tutorial.rst:713 msgid "" "#define PY_SSIZE_T_CLEAN\n" "#include \n" @@ -1616,41 +1647,50 @@ msgid "" " .tp_getset = Custom_getsetters,\n" "};\n" "\n" -"static PyModuleDef custommodule = {\n" +"static int\n" +"custom_module_exec(PyObject *m)\n" +"{\n" +" if (PyType_Ready(&CustomType) < 0) {\n" +" return -1;\n" +" }\n" +"\n" +" if (PyModule_AddObjectRef(m, \"Custom\", (PyObject *) &CustomType) < 0) " +"{\n" +" return -1;\n" +" }\n" +"\n" +" return 0;\n" +"}\n" +"\n" +"static PyModuleDef_Slot custom_module_slots[] = {\n" +" {Py_mod_exec, custom_module_exec},\n" +" {Py_mod_multiple_interpreters, " +"Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},\n" +" {0, NULL}\n" +"};\n" +"\n" +"static PyModuleDef custom_module = {\n" " .m_base = PyModuleDef_HEAD_INIT,\n" " .m_name = \"custom4\",\n" " .m_doc = \"Example module that creates an extension type.\",\n" -" .m_size = -1,\n" +" .m_size = 0,\n" +" .m_slots = custom_module_slots,\n" "};\n" "\n" "PyMODINIT_FUNC\n" "PyInit_custom4(void)\n" "{\n" -" PyObject *m;\n" -" if (PyType_Ready(&CustomType) < 0)\n" -" return NULL;\n" -"\n" -" m = PyModule_Create(&custommodule);\n" -" if (m == NULL)\n" -" return NULL;\n" -"\n" -" if (PyModule_AddObjectRef(m, \"Custom\", (PyObject *) &CustomType) < 0) " -"{\n" -" Py_DECREF(m);\n" -" return NULL;\n" -" }\n" -"\n" -" return m;\n" +" return PyModuleDef_Init(&custom_module);\n" "}\n" msgstr "" -#: ../../extending/newtypes_tutorial.rst:714 +#: ../../extending/newtypes_tutorial.rst:716 msgid "" "First, the traversal method lets the cyclic GC know about subobjects that " "could participate in cycles::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:717 +#: ../../extending/newtypes_tutorial.rst:719 msgid "" "static int\n" "Custom_traverse(PyObject *op, visitproc visit, void *arg)\n" @@ -1671,7 +1711,7 @@ msgid "" "}" msgstr "" -#: ../../extending/newtypes_tutorial.rst:735 +#: ../../extending/newtypes_tutorial.rst:737 msgid "" "For each subobject that can participate in cycles, we need to call the :c:" "func:`!visit` function, which is passed to the traversal method. The :c:func:" @@ -1680,14 +1720,14 @@ msgid "" "be returned if it is non-zero." msgstr "" -#: ../../extending/newtypes_tutorial.rst:741 +#: ../../extending/newtypes_tutorial.rst:743 msgid "" "Python provides a :c:func:`Py_VISIT` macro that automates calling visit " "functions. With :c:func:`Py_VISIT`, we can minimize the amount of " "boilerplate in ``Custom_traverse``::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:745 +#: ../../extending/newtypes_tutorial.rst:747 msgid "" "static int\n" "Custom_traverse(PyObject *op, visitproc visit, void *arg)\n" @@ -1699,19 +1739,19 @@ msgid "" "}" msgstr "" -#: ../../extending/newtypes_tutorial.rst:755 +#: ../../extending/newtypes_tutorial.rst:757 msgid "" "The :c:member:`~PyTypeObject.tp_traverse` implementation must name its " "arguments exactly *visit* and *arg* in order to use :c:func:`Py_VISIT`." msgstr "" -#: ../../extending/newtypes_tutorial.rst:758 +#: ../../extending/newtypes_tutorial.rst:760 msgid "" "Second, we need to provide a method for clearing any subobjects that can " "participate in cycles::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:761 +#: ../../extending/newtypes_tutorial.rst:763 msgid "" "static int\n" "Custom_clear(PyObject *op)\n" @@ -1723,7 +1763,7 @@ msgid "" "}" msgstr "" -#: ../../extending/newtypes_tutorial.rst:770 +#: ../../extending/newtypes_tutorial.rst:772 msgid "" "Notice the use of the :c:func:`Py_CLEAR` macro. It is the recommended and " "safe way to clear data attributes of arbitrary types while decrementing " @@ -1733,11 +1773,11 @@ msgid "" "again (*especially* if there is a reference cycle)." msgstr "" -#: ../../extending/newtypes_tutorial.rst:778 +#: ../../extending/newtypes_tutorial.rst:780 msgid "You could emulate :c:func:`Py_CLEAR` by writing::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:780 +#: ../../extending/newtypes_tutorial.rst:782 msgid "" "PyObject *tmp;\n" "tmp = self->first;\n" @@ -1745,14 +1785,14 @@ msgid "" "Py_XDECREF(tmp);" msgstr "" -#: ../../extending/newtypes_tutorial.rst:785 +#: ../../extending/newtypes_tutorial.rst:787 msgid "" "Nevertheless, it is much easier and less error-prone to always use :c:func:" "`Py_CLEAR` when deleting an attribute. Don't try to micro-optimize at the " "expense of robustness!" msgstr "" -#: ../../extending/newtypes_tutorial.rst:789 +#: ../../extending/newtypes_tutorial.rst:791 msgid "" "The deallocator ``Custom_dealloc`` may call arbitrary code when clearing " "attributes. It means the circular GC can be triggered inside the function. " @@ -1762,7 +1802,7 @@ msgid "" "`PyObject_GC_UnTrack` and ``Custom_clear``::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:796 +#: ../../extending/newtypes_tutorial.rst:798 msgid "" "static void\n" "Custom_dealloc(PyObject *op)\n" @@ -1773,17 +1813,17 @@ msgid "" "}" msgstr "" -#: ../../extending/newtypes_tutorial.rst:804 +#: ../../extending/newtypes_tutorial.rst:806 msgid "" "Finally, we add the :c:macro:`Py_TPFLAGS_HAVE_GC` flag to the class flags::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:806 +#: ../../extending/newtypes_tutorial.rst:808 msgid "" ".tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC," msgstr "" -#: ../../extending/newtypes_tutorial.rst:808 +#: ../../extending/newtypes_tutorial.rst:810 msgid "" "That's pretty much it. If we had written custom :c:member:`~PyTypeObject." "tp_alloc` or :c:member:`~PyTypeObject.tp_free` handlers, we'd need to modify " @@ -1791,11 +1831,11 @@ msgid "" "automatically provided." msgstr "" -#: ../../extending/newtypes_tutorial.rst:814 +#: ../../extending/newtypes_tutorial.rst:816 msgid "Subclassing other types" msgstr "" -#: ../../extending/newtypes_tutorial.rst:816 +#: ../../extending/newtypes_tutorial.rst:818 msgid "" "It is possible to create new extension types that are derived from existing " "types. It is easiest to inherit from the built in types, since an extension " @@ -1803,7 +1843,7 @@ msgid "" "share these :c:type:`PyTypeObject` structures between extension modules." msgstr "" -#: ../../extending/newtypes_tutorial.rst:821 +#: ../../extending/newtypes_tutorial.rst:823 msgid "" "In this example we will create a :class:`!SubList` type that inherits from " "the built-in :class:`list` type. The new type will be completely compatible " @@ -1811,7 +1851,7 @@ msgid "" "that increases an internal counter:" msgstr "" -#: ../../extending/newtypes_tutorial.rst:826 +#: ../../extending/newtypes_tutorial.rst:828 msgid "" ">>> import sublist\n" ">>> s = sublist.SubList(range(3))\n" @@ -1824,7 +1864,7 @@ msgid "" "2" msgstr "" -#: ../../extending/newtypes_tutorial.rst:838 +#: ../../extending/newtypes_tutorial.rst:840 msgid "" "#define PY_SSIZE_T_CLEAN\n" "#include \n" @@ -1859,7 +1899,7 @@ msgid "" "}\n" "\n" "static PyTypeObject SubListType = {\n" -" PyVarObject_HEAD_INIT(NULL, 0)\n" +" .ob_base = PyVarObject_HEAD_INIT(NULL, 0)\n" " .tp_name = \"sublist.SubList\",\n" " .tp_doc = PyDoc_STR(\"SubList objects\"),\n" " .tp_basicsize = sizeof(SubListObject),\n" @@ -1869,43 +1909,52 @@ msgid "" " .tp_methods = SubList_methods,\n" "};\n" "\n" -"static PyModuleDef sublistmodule = {\n" -" PyModuleDef_HEAD_INIT,\n" -" .m_name = \"sublist\",\n" -" .m_doc = \"Example module that creates an extension type.\",\n" -" .m_size = -1,\n" -"};\n" -"\n" -"PyMODINIT_FUNC\n" -"PyInit_sublist(void)\n" +"static int\n" +"sublist_module_exec(PyObject *m)\n" "{\n" -" PyObject *m;\n" " SubListType.tp_base = &PyList_Type;\n" -" if (PyType_Ready(&SubListType) < 0)\n" -" return NULL;\n" -"\n" -" m = PyModule_Create(&sublistmodule);\n" -" if (m == NULL)\n" -" return NULL;\n" +" if (PyType_Ready(&SubListType) < 0) {\n" +" return -1;\n" +" }\n" "\n" " if (PyModule_AddObjectRef(m, \"SubList\", (PyObject *) &SubListType) < " "0) {\n" -" Py_DECREF(m);\n" -" return NULL;\n" +" return -1;\n" " }\n" "\n" -" return m;\n" +" return 0;\n" +"}\n" +"\n" +"static PyModuleDef_Slot sublist_module_slots[] = {\n" +" {Py_mod_exec, sublist_module_exec},\n" +" {Py_mod_multiple_interpreters, " +"Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},\n" +" {0, NULL}\n" +"};\n" +"\n" +"static PyModuleDef sublist_module = {\n" +" .m_base = PyModuleDef_HEAD_INIT,\n" +" .m_name = \"sublist\",\n" +" .m_doc = \"Example module that creates an extension type.\",\n" +" .m_size = 0,\n" +" .m_slots = sublist_module_slots,\n" +"};\n" +"\n" +"PyMODINIT_FUNC\n" +"PyInit_sublist(void)\n" +"{\n" +" return PyModuleDef_Init(&sublist_module);\n" "}\n" msgstr "" -#: ../../extending/newtypes_tutorial.rst:841 +#: ../../extending/newtypes_tutorial.rst:843 msgid "" "As you can see, the source code closely resembles the :class:`!Custom` " "examples in previous sections. We will break down the main differences " "between them. ::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:844 +#: ../../extending/newtypes_tutorial.rst:846 msgid "" "typedef struct {\n" " PyListObject list;\n" @@ -1913,21 +1962,21 @@ msgid "" "} SubListObject;" msgstr "" -#: ../../extending/newtypes_tutorial.rst:849 +#: ../../extending/newtypes_tutorial.rst:851 msgid "" "The primary difference for derived type objects is that the base type's " "object structure must be the first value. The base type will already " "include the :c:func:`PyObject_HEAD` at the beginning of its structure." msgstr "" -#: ../../extending/newtypes_tutorial.rst:853 +#: ../../extending/newtypes_tutorial.rst:855 msgid "" "When a Python object is a :class:`!SubList` instance, its ``PyObject *`` " "pointer can be safely cast to both ``PyListObject *`` and ``SubListObject " "*``::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:856 +#: ../../extending/newtypes_tutorial.rst:858 msgid "" "static int\n" "SubList_init(PyObject *op, PyObject *args, PyObject *kwds)\n" @@ -1940,13 +1989,13 @@ msgid "" "}" msgstr "" -#: ../../extending/newtypes_tutorial.rst:866 +#: ../../extending/newtypes_tutorial.rst:868 msgid "" "We see above how to call through to the :meth:`~object.__init__` method of " "the base type." msgstr "" -#: ../../extending/newtypes_tutorial.rst:869 +#: ../../extending/newtypes_tutorial.rst:871 msgid "" "This pattern is important when writing a type with custom :c:member:" "`~PyTypeObject.tp_new` and :c:member:`~PyTypeObject.tp_dealloc` members. " @@ -1955,40 +2004,34 @@ msgid "" "the base class handle it by calling its own :c:member:`~PyTypeObject.tp_new`." msgstr "" -#: ../../extending/newtypes_tutorial.rst:875 +#: ../../extending/newtypes_tutorial.rst:877 msgid "" "The :c:type:`PyTypeObject` struct supports a :c:member:`~PyTypeObject." "tp_base` specifying the type's concrete base class. Due to cross-platform " "compiler issues, you can't fill that field directly with a reference to :c:" -"type:`PyList_Type`; it should be done later in the module initialization " -"function::" +"type:`PyList_Type`; it should be done in the :c:data:`Py_mod_exec` function::" msgstr "" -#: ../../extending/newtypes_tutorial.rst:881 +#: ../../extending/newtypes_tutorial.rst:883 msgid "" -"PyMODINIT_FUNC\n" -"PyInit_sublist(void)\n" +"static int\n" +"sublist_module_exec(PyObject *m)\n" "{\n" -" PyObject* m;\n" " SubListType.tp_base = &PyList_Type;\n" -" if (PyType_Ready(&SubListType) < 0)\n" -" return NULL;\n" -"\n" -" m = PyModule_Create(&sublistmodule);\n" -" if (m == NULL)\n" -" return NULL;\n" +" if (PyType_Ready(&SubListType) < 0) {\n" +" return -1;\n" +" }\n" "\n" " if (PyModule_AddObjectRef(m, \"SubList\", (PyObject *) &SubListType) < " "0) {\n" -" Py_DECREF(m);\n" -" return NULL;\n" +" return -1;\n" " }\n" "\n" -" return m;\n" +" return 0;\n" "}" msgstr "" -#: ../../extending/newtypes_tutorial.rst:901 +#: ../../extending/newtypes_tutorial.rst:898 msgid "" "Before calling :c:func:`PyType_Ready`, the type structure must have the :c:" "member:`~PyTypeObject.tp_base` slot filled in. When we are deriving an " @@ -1997,29 +2040,29 @@ msgid "" "from the base type will be inherited." msgstr "" -#: ../../extending/newtypes_tutorial.rst:907 +#: ../../extending/newtypes_tutorial.rst:904 msgid "" "After that, calling :c:func:`PyType_Ready` and adding the type object to the " "module is the same as with the basic :class:`!Custom` examples." msgstr "" -#: ../../extending/newtypes_tutorial.rst:912 +#: ../../extending/newtypes_tutorial.rst:909 msgid "Footnotes" msgstr "" -#: ../../extending/newtypes_tutorial.rst:913 +#: ../../extending/newtypes_tutorial.rst:910 msgid "" "This is true when we know that the object is a basic type, like a string or " "a float." msgstr "" -#: ../../extending/newtypes_tutorial.rst:916 +#: ../../extending/newtypes_tutorial.rst:913 msgid "" "We relied on this in the :c:member:`~PyTypeObject.tp_dealloc` handler in " "this example, because our type doesn't support garbage collection." msgstr "" -#: ../../extending/newtypes_tutorial.rst:919 +#: ../../extending/newtypes_tutorial.rst:916 msgid "" "We now know that the first and last members are strings, so perhaps we could " "be less careful about decrementing their reference counts, however, we " @@ -2029,7 +2072,7 @@ msgid "" "objects." msgstr "" -#: ../../extending/newtypes_tutorial.rst:925 +#: ../../extending/newtypes_tutorial.rst:922 msgid "" "Also, even with our attributes restricted to strings instances, the user " "could pass arbitrary :class:`str` subclasses and therefore still create " diff --git a/extending/windows.po b/extending/windows.po index 2e0d73258..2fd167244 100644 --- a/extending/windows.po +++ b/extending/windows.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:52+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" @@ -166,8 +166,8 @@ msgid "" "By default, inclusion of :file:`PC/pyconfig.h` directly or via :file:`Python." "h` triggers an implicit, configure-aware link with the library. The header " "file chooses :file:`pythonXY_d.lib` for Debug, :file:`pythonXY.lib` for " -"Release, and :file:`pythonX.lib` for Release with the `Limited API `_ enabled." +"Release, and :file:`pythonX.lib` for Release with the :ref:`Limited API " +"` enabled." msgstr "" #: ../../extending/windows.rst:126 ../../extending/windows.rst:144 diff --git a/faq/design.po b/faq/design.po index a70d04d24..816de6242 100644 --- a/faq/design.po +++ b/faq/design.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:52+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/faq/extending.po b/faq/extending.po index eebf3ba6f..cf9c64163 100644 --- a/faq/extending.po +++ b/faq/extending.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:52+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -64,34 +65,16 @@ msgstr "" #: ../../faq/extending.rst:39 msgid "" "There are a number of alternatives to writing your own C extensions, " -"depending on what you're trying to do." +"depending on what you're trying to do. :ref:`Recommended third party tools " +"` offer both simpler and more sophisticated approaches to " +"creating C and C++ extensions for Python." msgstr "" -#: ../../faq/extending.rst:44 -msgid "" -"`Cython `_ and its relative `Pyrex `_ are compilers that accept a " -"slightly modified form of Python and generate the corresponding C code. " -"Cython and Pyrex make it possible to write an extension without having to " -"learn Python's C API." -msgstr "" - -#: ../../faq/extending.rst:50 -msgid "" -"If you need to interface to some C or C++ library for which no Python " -"extension currently exists, you can try wrapping the library's data types " -"and functions with a tool such as `SWIG `_. `SIP " -"`__, `CXX `_ `Boost `_, or `Weave " -"`_ are also alternatives for wrapping C++ " -"libraries." -msgstr "" - -#: ../../faq/extending.rst:61 +#: ../../faq/extending.rst:46 msgid "How can I execute arbitrary Python statements from C?" msgstr "" -#: ../../faq/extending.rst:63 +#: ../../faq/extending.rst:48 msgid "" "The highest-level function to do this is :c:func:`PyRun_SimpleString` which " "takes a single string argument to be executed in the context of the module " @@ -101,22 +84,22 @@ msgid "" "``Python/pythonrun.c``." msgstr "" -#: ../../faq/extending.rst:72 +#: ../../faq/extending.rst:57 msgid "How can I evaluate an arbitrary Python expression from C?" msgstr "" -#: ../../faq/extending.rst:74 +#: ../../faq/extending.rst:59 msgid "" "Call the function :c:func:`PyRun_String` from the previous question with the " "start symbol :c:data:`Py_eval_input`; it parses an expression, evaluates it " "and returns its value." msgstr "" -#: ../../faq/extending.rst:80 +#: ../../faq/extending.rst:65 msgid "How do I extract C values from a Python object?" msgstr "" -#: ../../faq/extending.rst:82 +#: ../../faq/extending.rst:67 msgid "" "That depends on the object's type. If it's a tuple, :c:func:`PyTuple_Size` " "returns its length and :c:func:`PyTuple_GetItem` returns the item at a " @@ -124,7 +107,7 @@ msgid "" "func:`PyList_GetItem`." msgstr "" -#: ../../faq/extending.rst:87 +#: ../../faq/extending.rst:72 msgid "" "For bytes, :c:func:`PyBytes_Size` returns its length and :c:func:" "`PyBytes_AsStringAndSize` provides a pointer to its value and its length. " @@ -132,14 +115,14 @@ msgid "" "strlen` should not be used." msgstr "" -#: ../../faq/extending.rst:92 +#: ../../faq/extending.rst:77 msgid "" "To test the type of an object, first make sure it isn't ``NULL``, and then " "use :c:func:`PyBytes_Check`, :c:func:`PyTuple_Check`, :c:func:" "`PyList_Check`, etc." msgstr "" -#: ../../faq/extending.rst:95 +#: ../../faq/extending.rst:80 msgid "" "There is also a high-level API to Python objects which is provided by the so-" "called 'abstract' interface -- read ``Include/abstract.h`` for further " @@ -149,19 +132,19 @@ msgid "" "al.) and mappings in the PyMapping APIs." msgstr "" -#: ../../faq/extending.rst:104 +#: ../../faq/extending.rst:89 msgid "How do I use Py_BuildValue() to create a tuple of arbitrary length?" msgstr "" -#: ../../faq/extending.rst:106 +#: ../../faq/extending.rst:91 msgid "You can't. Use :c:func:`PyTuple_Pack` instead." msgstr "" -#: ../../faq/extending.rst:110 +#: ../../faq/extending.rst:95 msgid "How do I call an object's method from C?" msgstr "" -#: ../../faq/extending.rst:112 +#: ../../faq/extending.rst:97 msgid "" "The :c:func:`PyObject_CallMethod` function can be used to call an arbitrary " "method of an object. The parameters are the object, the name of the method " @@ -169,27 +152,27 @@ msgid "" "the argument values::" msgstr "" -#: ../../faq/extending.rst:117 +#: ../../faq/extending.rst:102 msgid "" "PyObject *\n" "PyObject_CallMethod(PyObject *object, const char *method_name,\n" " const char *arg_format, ...);" msgstr "" -#: ../../faq/extending.rst:121 +#: ../../faq/extending.rst:106 msgid "" "This works for any object that has methods -- whether built-in or user-" "defined. You are responsible for eventually :c:func:`Py_DECREF`\\ 'ing the " "return value." msgstr "" -#: ../../faq/extending.rst:124 +#: ../../faq/extending.rst:109 msgid "" "To call, e.g., a file object's \"seek\" method with arguments 10, 0 " "(assuming the file object pointer is \"f\")::" msgstr "" -#: ../../faq/extending.rst:127 +#: ../../faq/extending.rst:112 msgid "" "res = PyObject_CallMethod(f, \"seek\", \"(ii)\", 10, 0);\n" "if (res == NULL) {\n" @@ -200,7 +183,7 @@ msgid "" "}" msgstr "" -#: ../../faq/extending.rst:135 +#: ../../faq/extending.rst:120 msgid "" "Note that since :c:func:`PyObject_CallObject` *always* wants a tuple for the " "argument list, to call a function without arguments, pass \"()\" for the " @@ -208,13 +191,13 @@ msgid "" "parentheses, e.g. \"(i)\"." msgstr "" -#: ../../faq/extending.rst:142 +#: ../../faq/extending.rst:127 msgid "" "How do I catch the output from PyErr_Print() (or anything that prints to " "stdout/stderr)?" msgstr "" -#: ../../faq/extending.rst:144 +#: ../../faq/extending.rst:129 msgid "" "In Python code, define an object that supports the ``write()`` method. " "Assign this object to :data:`sys.stdout` and :data:`sys.stderr`. Call " @@ -222,11 +205,11 @@ msgid "" "the output will go wherever your ``write()`` method sends it." msgstr "" -#: ../../faq/extending.rst:149 +#: ../../faq/extending.rst:134 msgid "The easiest way to do this is to use the :class:`io.StringIO` class:" msgstr "" -#: ../../faq/extending.rst:151 +#: ../../faq/extending.rst:136 msgid "" ">>> import io, sys\n" ">>> sys.stdout = io.StringIO()\n" @@ -237,11 +220,11 @@ msgid "" "hello world!" msgstr "" -#: ../../faq/extending.rst:161 +#: ../../faq/extending.rst:146 msgid "A custom object to do the same would look like this:" msgstr "" -#: ../../faq/extending.rst:163 +#: ../../faq/extending.rst:148 msgid "" ">>> import io, sys\n" ">>> class StdoutCatcher(io.TextIOBase):\n" @@ -259,19 +242,19 @@ msgid "" "hello world!" msgstr "" -#: ../../faq/extending.rst:182 +#: ../../faq/extending.rst:167 msgid "How do I access a module written in Python from C?" msgstr "" -#: ../../faq/extending.rst:184 +#: ../../faq/extending.rst:169 msgid "You can get a pointer to the module object as follows::" msgstr "" -#: ../../faq/extending.rst:186 +#: ../../faq/extending.rst:171 msgid "module = PyImport_ImportModule(\"\");" msgstr "" -#: ../../faq/extending.rst:188 +#: ../../faq/extending.rst:173 msgid "" "If the module hasn't been imported yet (i.e. it is not yet present in :data:" "`sys.modules`), this initializes the module; otherwise it simply returns the " @@ -280,27 +263,27 @@ msgid "" "stored in :data:`sys.modules`." msgstr "" -#: ../../faq/extending.rst:194 +#: ../../faq/extending.rst:179 msgid "" "You can then access the module's attributes (i.e. any name defined in the " "module) as follows::" msgstr "" -#: ../../faq/extending.rst:197 +#: ../../faq/extending.rst:182 msgid "attr = PyObject_GetAttrString(module, \"\");" msgstr "" -#: ../../faq/extending.rst:199 +#: ../../faq/extending.rst:184 msgid "" "Calling :c:func:`PyObject_SetAttrString` to assign to variables in the " "module also works." msgstr "" -#: ../../faq/extending.rst:204 +#: ../../faq/extending.rst:189 msgid "How do I interface to C++ objects from Python?" msgstr "" -#: ../../faq/extending.rst:206 +#: ../../faq/extending.rst:191 msgid "" "Depending on your requirements, there are many approaches. To do this " "manually, begin by reading :ref:`the \"Extending and Embedding\" document " @@ -310,44 +293,44 @@ msgid "" "work for C++ objects." msgstr "" -#: ../../faq/extending.rst:212 +#: ../../faq/extending.rst:197 msgid "For C++ libraries, see :ref:`c-wrapper-software`." msgstr "" -#: ../../faq/extending.rst:216 +#: ../../faq/extending.rst:201 msgid "I added a module using the Setup file and the make fails; why?" msgstr "" -#: ../../faq/extending.rst:218 +#: ../../faq/extending.rst:203 msgid "" "Setup must end in a newline, if there is no newline there, the build process " "fails. (Fixing this requires some ugly shell script hackery, and this bug " "is so minor that it doesn't seem worth the effort.)" msgstr "" -#: ../../faq/extending.rst:224 +#: ../../faq/extending.rst:209 msgid "How do I debug an extension?" msgstr "" -#: ../../faq/extending.rst:226 +#: ../../faq/extending.rst:211 msgid "" "When using GDB with dynamically loaded extensions, you can't set a " "breakpoint in your extension until your extension is loaded." msgstr "" -#: ../../faq/extending.rst:229 +#: ../../faq/extending.rst:214 msgid "In your ``.gdbinit`` file (or interactively), add the command:" msgstr "" -#: ../../faq/extending.rst:231 +#: ../../faq/extending.rst:216 msgid "br _PyImport_LoadDynamicModule" msgstr "" -#: ../../faq/extending.rst:235 +#: ../../faq/extending.rst:220 msgid "Then, when you run GDB:" msgstr "" -#: ../../faq/extending.rst:237 +#: ../../faq/extending.rst:222 msgid "" "$ gdb /local/bin/python\n" "gdb) run myscript.py\n" @@ -357,31 +340,31 @@ msgid "" "gdb) continue" msgstr "" -#: ../../faq/extending.rst:247 +#: ../../faq/extending.rst:232 msgid "" "I want to compile a Python module on my Linux system, but some files are " "missing. Why?" msgstr "" -#: ../../faq/extending.rst:249 +#: ../../faq/extending.rst:234 msgid "" "Most packaged versions of Python omit some files required for compiling " "Python extensions." msgstr "" -#: ../../faq/extending.rst:252 +#: ../../faq/extending.rst:237 msgid "For Red Hat, install the python3-devel RPM to get the necessary files." msgstr "" -#: ../../faq/extending.rst:254 +#: ../../faq/extending.rst:239 msgid "For Debian, run ``apt-get install python3-dev``." msgstr "" -#: ../../faq/extending.rst:257 +#: ../../faq/extending.rst:242 msgid "How do I tell \"incomplete input\" from \"invalid input\"?" msgstr "" -#: ../../faq/extending.rst:259 +#: ../../faq/extending.rst:244 msgid "" "Sometimes you want to emulate the Python interactive interpreter's behavior, " "where it gives you a continuation prompt when the input is incomplete (e.g. " @@ -390,13 +373,13 @@ msgid "" "message immediately when the input is invalid." msgstr "" -#: ../../faq/extending.rst:265 +#: ../../faq/extending.rst:250 msgid "" "In Python you can use the :mod:`codeop` module, which approximates the " "parser's behavior sufficiently. IDLE uses this, for example." msgstr "" -#: ../../faq/extending.rst:268 +#: ../../faq/extending.rst:253 msgid "" "The easiest way to do it in C is to call :c:func:`PyRun_InteractiveLoop` " "(perhaps in a separate thread) and let the Python interpreter handle the " @@ -405,30 +388,30 @@ msgid "" "``Parser/myreadline.c`` for more hints." msgstr "" -#: ../../faq/extending.rst:275 +#: ../../faq/extending.rst:260 msgid "How do I find undefined g++ symbols __builtin_new or __pure_virtual?" msgstr "" -#: ../../faq/extending.rst:277 +#: ../../faq/extending.rst:262 msgid "" "To dynamically load g++ extension modules, you must recompile Python, relink " "it using g++ (change LINKCC in the Python Modules Makefile), and link your " "extension module using g++ (e.g., ``g++ -shared -o mymodule.so mymodule.o``)." msgstr "" -#: ../../faq/extending.rst:283 +#: ../../faq/extending.rst:268 msgid "" "Can I create an object class with some methods implemented in C and others " "in Python (e.g. through inheritance)?" msgstr "" -#: ../../faq/extending.rst:285 +#: ../../faq/extending.rst:270 msgid "" "Yes, you can inherit from built-in classes such as :class:`int`, :class:" "`list`, :class:`dict`, etc." msgstr "" -#: ../../faq/extending.rst:288 +#: ../../faq/extending.rst:273 msgid "" "The Boost Python Library (BPL, https://www.boost.org/libs/python/doc/index." "html) provides a way of doing this from C++ (i.e. you can inherit from an " diff --git a/faq/general.po b/faq/general.po index c3375b183..ae14da5ef 100644 --- a/faq/general.po +++ b/faq/general.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:52+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/faq/gui.po b/faq/gui.po index a09ae5783..53be8fffc 100644 --- a/faq/gui.po +++ b/faq/gui.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:52+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/faq/index.po b/faq/index.po index 197726d9a..664386794 100644 --- a/faq/index.po +++ b/faq/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:52+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/faq/installed.po b/faq/installed.po index 6a28d482c..d719ea568 100644 --- a/faq/installed.po +++ b/faq/installed.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:52+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/faq/library.po b/faq/library.po index e9bb2cdeb..d44e48a55 100644 --- a/faq/library.po +++ b/faq/library.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:52+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/faq/programming.po b/faq/programming.po index 7aff75134..e1b11ed36 100644 --- a/faq/programming.po +++ b/faq/programming.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:52+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/faq/windows.po b/faq/windows.po index 7dadeef52..85551c582 100644 --- a/faq/windows.po +++ b/faq/windows.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:52+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/glossary.po b/glossary.po index 594ef6edf..9eecf7f96 100644 --- a/glossary.po +++ b/glossary.po @@ -8,15 +8,16 @@ # Alireza Feyzabadi Farahani, 2025 # Danial Behzadi , 2025 # taha haghgoo, 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:47+0000\n" -"Last-Translator: taha haghgoo, 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -648,23 +649,36 @@ msgid "" msgstr "" #: ../../glossary.rst:357 -msgid "decorator" +msgid "cyclic isolate" msgstr "" #: ../../glossary.rst:359 msgid "" +"A subgroup of one or more objects that reference each other in a reference " +"cycle, but are not referenced by objects outside the group. The goal of " +"the :term:`cyclic garbage collector ` is to identify " +"these groups and break the reference cycles so that the memory can be " +"reclaimed." +msgstr "" + +#: ../../glossary.rst:363 +msgid "decorator" +msgstr "" + +#: ../../glossary.rst:365 +msgid "" "A function returning another function, usually applied as a function " "transformation using the ``@wrapper`` syntax. Common examples for " "decorators are :func:`classmethod` and :func:`staticmethod`." msgstr "" -#: ../../glossary.rst:363 +#: ../../glossary.rst:369 msgid "" "The decorator syntax is merely syntactic sugar, the following two function " "definitions are semantically equivalent::" msgstr "" -#: ../../glossary.rst:366 +#: ../../glossary.rst:372 msgid "" "def f(arg):\n" " ...\n" @@ -675,18 +689,18 @@ msgid "" " ..." msgstr "" -#: ../../glossary.rst:374 +#: ../../glossary.rst:380 msgid "" "The same concept exists for classes, but is less commonly used there. See " "the documentation for :ref:`function definitions ` and :ref:`class " "definitions ` for more about decorators." msgstr "" -#: ../../glossary.rst:377 +#: ../../glossary.rst:383 msgid "descriptor" msgstr "" -#: ../../glossary.rst:379 +#: ../../glossary.rst:385 msgid "" "Any object which defines the methods :meth:`~object.__get__`, :meth:`~object." "__set__`, or :meth:`~object.__delete__`. When a class attribute is a " @@ -699,28 +713,28 @@ msgid "" "methods, static methods, and reference to super classes." msgstr "" -#: ../../glossary.rst:390 +#: ../../glossary.rst:396 msgid "" "For more information about descriptors' methods, see :ref:`descriptors` or " "the :ref:`Descriptor How To Guide `." msgstr "" -#: ../../glossary.rst:392 +#: ../../glossary.rst:398 msgid "dictionary" msgstr "" -#: ../../glossary.rst:394 +#: ../../glossary.rst:400 msgid "" "An associative array, where arbitrary keys are mapped to values. The keys " "can be any object with :meth:`~object.__hash__` and :meth:`~object.__eq__` " "methods. Called a hash in Perl." msgstr "" -#: ../../glossary.rst:398 +#: ../../glossary.rst:404 msgid "dictionary comprehension" msgstr "" -#: ../../glossary.rst:400 +#: ../../glossary.rst:406 msgid "" "A compact way to process all or part of the elements in an iterable and " "return a dictionary with the results. ``results = {n: n ** 2 for n in " @@ -728,11 +742,11 @@ msgid "" "** 2``. See :ref:`comprehensions`." msgstr "" -#: ../../glossary.rst:404 +#: ../../glossary.rst:410 msgid "dictionary view" msgstr "" -#: ../../glossary.rst:406 +#: ../../glossary.rst:412 msgid "" "The objects returned from :meth:`dict.keys`, :meth:`dict.values`, and :meth:" "`dict.items` are called dictionary views. They provide a dynamic view on the " @@ -741,11 +755,11 @@ msgid "" "use ``list(dictview)``. See :ref:`dict-views`." msgstr "" -#: ../../glossary.rst:412 +#: ../../glossary.rst:418 msgid "docstring" msgstr "" -#: ../../glossary.rst:414 +#: ../../glossary.rst:420 msgid "" "A string literal which appears as the first expression in a class, function " "or module. While ignored when the suite is executed, it is recognized by " @@ -754,11 +768,11 @@ msgid "" "introspection, it is the canonical place for documentation of the object." msgstr "" -#: ../../glossary.rst:420 +#: ../../glossary.rst:426 msgid "duck-typing" msgstr "" -#: ../../glossary.rst:422 +#: ../../glossary.rst:428 msgid "" "A programming style which does not look at an object's type to determine if " "it has the right interface; instead, the method or attribute is simply " @@ -771,11 +785,11 @@ msgid "" "employs :func:`hasattr` tests or :term:`EAFP` programming." msgstr "" -#: ../../glossary.rst:431 +#: ../../glossary.rst:437 msgid "EAFP" msgstr "" -#: ../../glossary.rst:433 +#: ../../glossary.rst:439 msgid "" "Easier to ask for forgiveness than permission. This common Python coding " "style assumes the existence of valid keys or attributes and catches " @@ -785,22 +799,22 @@ msgid "" "many other languages such as C." msgstr "" -#: ../../glossary.rst:439 +#: ../../glossary.rst:445 msgid "evaluate function" msgstr "" -#: ../../glossary.rst:441 +#: ../../glossary.rst:447 msgid "" "A function that can be called to evaluate a lazily evaluated attribute of an " "object, such as the value of type aliases created with the :keyword:`type` " "statement." msgstr "" -#: ../../glossary.rst:444 +#: ../../glossary.rst:450 msgid "expression" msgstr "" -#: ../../glossary.rst:446 +#: ../../glossary.rst:452 msgid "" "A piece of syntax which can be evaluated to some value. In other words, an " "expression is an accumulation of expression elements like literals, names, " @@ -811,32 +825,32 @@ msgid "" "expressions." msgstr "" -#: ../../glossary.rst:453 +#: ../../glossary.rst:459 msgid "extension module" msgstr "" -#: ../../glossary.rst:455 +#: ../../glossary.rst:461 msgid "" "A module written in C or C++, using Python's C API to interact with the core " "and with user code." msgstr "" -#: ../../glossary.rst:457 +#: ../../glossary.rst:463 msgid "f-string" msgstr "" -#: ../../glossary.rst:459 +#: ../../glossary.rst:465 msgid "" "String literals prefixed with ``'f'`` or ``'F'`` are commonly called \"f-" "strings\" which is short for :ref:`formatted string literals `. " "See also :pep:`498`." msgstr "" -#: ../../glossary.rst:462 +#: ../../glossary.rst:468 msgid "file object" msgstr "" -#: ../../glossary.rst:464 +#: ../../glossary.rst:470 msgid "" "An object exposing a file-oriented API (with methods such as :meth:`!read` " "or :meth:`!write`) to an underlying resource. Depending on the way it was " @@ -846,7 +860,7 @@ msgid "" "called :dfn:`file-like objects` or :dfn:`streams`." msgstr "" -#: ../../glossary.rst:472 +#: ../../glossary.rst:478 msgid "" "There are actually three categories of file objects: raw :term:`binary files " "`, buffered :term:`binary files ` and :term:`text " @@ -855,39 +869,39 @@ msgid "" "function." msgstr "" -#: ../../glossary.rst:477 +#: ../../glossary.rst:483 msgid "file-like object" msgstr "" -#: ../../glossary.rst:479 +#: ../../glossary.rst:485 msgid "A synonym for :term:`file object`." msgstr "" -#: ../../glossary.rst:480 +#: ../../glossary.rst:486 msgid "filesystem encoding and error handler" msgstr "" -#: ../../glossary.rst:482 +#: ../../glossary.rst:488 msgid "" "Encoding and error handler used by Python to decode bytes from the operating " "system and encode Unicode to the operating system." msgstr "" -#: ../../glossary.rst:485 +#: ../../glossary.rst:491 msgid "" "The filesystem encoding must guarantee to successfully decode all bytes " "below 128. If the file system encoding fails to provide this guarantee, API " "functions can raise :exc:`UnicodeError`." msgstr "" -#: ../../glossary.rst:489 +#: ../../glossary.rst:495 msgid "" "The :func:`sys.getfilesystemencoding` and :func:`sys." "getfilesystemencodeerrors` functions can be used to get the filesystem " "encoding and error handler." msgstr "" -#: ../../glossary.rst:493 +#: ../../glossary.rst:499 msgid "" "The :term:`filesystem encoding and error handler` are configured at Python " "startup by the :c:func:`PyConfig_Read` function: see :c:member:`~PyConfig." @@ -895,37 +909,37 @@ msgid "" "c:type:`PyConfig`." msgstr "" -#: ../../glossary.rst:498 +#: ../../glossary.rst:504 msgid "See also the :term:`locale encoding`." msgstr "" -#: ../../glossary.rst:499 +#: ../../glossary.rst:505 msgid "finder" msgstr "" -#: ../../glossary.rst:501 +#: ../../glossary.rst:507 msgid "" "An object that tries to find the :term:`loader` for a module that is being " "imported." msgstr "" -#: ../../glossary.rst:504 +#: ../../glossary.rst:510 msgid "" "There are two types of finder: :term:`meta path finders ` " "for use with :data:`sys.meta_path`, and :term:`path entry finders ` for use with :data:`sys.path_hooks`." msgstr "" -#: ../../glossary.rst:508 +#: ../../glossary.rst:514 msgid "" "See :ref:`finders-and-loaders` and :mod:`importlib` for much more detail." msgstr "" -#: ../../glossary.rst:509 +#: ../../glossary.rst:515 msgid "floor division" msgstr "" -#: ../../glossary.rst:511 +#: ../../glossary.rst:517 msgid "" "Mathematical division that rounds down to nearest integer. The floor " "division operator is ``//``. For example, the expression ``11 // 4`` " @@ -934,11 +948,11 @@ msgid "" "rounded *downward*. See :pep:`238`." msgstr "" -#: ../../glossary.rst:516 +#: ../../glossary.rst:522 msgid "free threading" msgstr "" -#: ../../glossary.rst:518 +#: ../../glossary.rst:524 msgid "" "A threading model where multiple threads can run Python bytecode " "simultaneously within the same interpreter. This is in contrast to the :" @@ -946,11 +960,11 @@ msgid "" "Python bytecode at a time. See :pep:`703`." msgstr "" -#: ../../glossary.rst:522 +#: ../../glossary.rst:528 msgid "free variable" msgstr "" -#: ../../glossary.rst:524 +#: ../../glossary.rst:530 msgid "" "Formally, as defined in the :ref:`language execution model `, a " "free variable is any variable used in a namespace which is not a local " @@ -960,11 +974,11 @@ msgid "" "variable`." msgstr "" -#: ../../glossary.rst:529 +#: ../../glossary.rst:535 msgid "function" msgstr "" -#: ../../glossary.rst:531 +#: ../../glossary.rst:537 msgid "" "A series of statements which returns some value to a caller. It can also be " "passed zero or more :term:`arguments ` which may be used in the " @@ -972,43 +986,43 @@ msgid "" "ref:`function` section." msgstr "" -#: ../../glossary.rst:535 +#: ../../glossary.rst:541 msgid "function annotation" msgstr "" -#: ../../glossary.rst:537 +#: ../../glossary.rst:543 msgid "An :term:`annotation` of a function parameter or return value." msgstr "" -#: ../../glossary.rst:539 +#: ../../glossary.rst:545 msgid "" "Function annotations are usually used for :term:`type hints `: " "for example, this function is expected to take two :class:`int` arguments " "and is also expected to have an :class:`int` return value::" msgstr "" -#: ../../glossary.rst:544 +#: ../../glossary.rst:550 msgid "" "def sum_two_numbers(a: int, b: int) -> int:\n" " return a + b" msgstr "" -#: ../../glossary.rst:547 +#: ../../glossary.rst:553 msgid "Function annotation syntax is explained in section :ref:`function`." msgstr "" -#: ../../glossary.rst:549 +#: ../../glossary.rst:555 msgid "" "See :term:`variable annotation` and :pep:`484`, which describe this " "functionality. Also see :ref:`annotations-howto` for best practices on " "working with annotations." msgstr "" -#: ../../glossary.rst:553 +#: ../../glossary.rst:559 msgid "__future__" msgstr "" -#: ../../glossary.rst:555 +#: ../../glossary.rst:561 msgid "" "A :ref:`future statement `, ``from __future__ import ``, " "directs the compiler to compile the current module using syntax or semantics " @@ -1019,18 +1033,18 @@ msgid "" "default::" msgstr "" -#: ../../glossary.rst:563 +#: ../../glossary.rst:569 msgid "" ">>> import __future__\n" ">>> __future__.division\n" "_Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)" msgstr "" -#: ../../glossary.rst:566 +#: ../../glossary.rst:572 msgid "garbage collection" msgstr "" -#: ../../glossary.rst:568 +#: ../../glossary.rst:574 msgid "" "The process of freeing memory when it is not used anymore. Python performs " "garbage collection via reference counting and a cyclic garbage collector " @@ -1038,11 +1052,11 @@ msgid "" "can be controlled using the :mod:`gc` module." msgstr "" -#: ../../glossary.rst:573 ../../glossary.rst:574 +#: ../../glossary.rst:579 ../../glossary.rst:580 msgid "generator" msgstr "" -#: ../../glossary.rst:576 +#: ../../glossary.rst:582 msgid "" "A function which returns a :term:`generator iterator`. It looks like a " "normal function except that it contains :keyword:`yield` expressions for " @@ -1050,22 +1064,22 @@ msgid "" "one at a time with the :func:`next` function." msgstr "" -#: ../../glossary.rst:581 +#: ../../glossary.rst:587 msgid "" "Usually refers to a generator function, but may refer to a *generator " "iterator* in some contexts. In cases where the intended meaning isn't " "clear, using the full terms avoids ambiguity." msgstr "" -#: ../../glossary.rst:584 +#: ../../glossary.rst:590 msgid "generator iterator" msgstr "" -#: ../../glossary.rst:586 +#: ../../glossary.rst:592 msgid "An object created by a :term:`generator` function." msgstr "" -#: ../../glossary.rst:588 +#: ../../glossary.rst:594 msgid "" "Each :keyword:`yield` temporarily suspends processing, remembering the " "execution state (including local variables and pending try-statements). " @@ -1073,11 +1087,11 @@ msgid "" "contrast to functions which start fresh on every invocation)." msgstr "" -#: ../../glossary.rst:594 ../../glossary.rst:595 +#: ../../glossary.rst:600 ../../glossary.rst:601 msgid "generator expression" msgstr "" -#: ../../glossary.rst:597 +#: ../../glossary.rst:603 msgid "" "An :term:`expression` that returns an :term:`iterator`. It looks like a " "normal expression followed by a :keyword:`!for` clause defining a loop " @@ -1085,59 +1099,59 @@ msgid "" "expression generates values for an enclosing function::" msgstr "" -#: ../../glossary.rst:602 +#: ../../glossary.rst:608 msgid "" ">>> sum(i*i for i in range(10)) # sum of squares 0, 1, 4, ... 81\n" "285" msgstr "" -#: ../../glossary.rst:604 +#: ../../glossary.rst:610 msgid "generic function" msgstr "" -#: ../../glossary.rst:606 +#: ../../glossary.rst:612 msgid "" "A function composed of multiple functions implementing the same operation " "for different types. Which implementation should be used during a call is " "determined by the dispatch algorithm." msgstr "" -#: ../../glossary.rst:610 +#: ../../glossary.rst:616 msgid "" "See also the :term:`single dispatch` glossary entry, the :func:`functools." "singledispatch` decorator, and :pep:`443`." msgstr "" -#: ../../glossary.rst:612 +#: ../../glossary.rst:618 msgid "generic type" msgstr "" -#: ../../glossary.rst:614 +#: ../../glossary.rst:620 msgid "" "A :term:`type` that can be parameterized; typically a :ref:`container " "class` such as :class:`list` or :class:`dict`. Used for :" "term:`type hints ` and :term:`annotations `." msgstr "" -#: ../../glossary.rst:619 +#: ../../glossary.rst:625 msgid "" "For more details, see :ref:`generic alias types`, :pep:" "`483`, :pep:`484`, :pep:`585`, and the :mod:`typing` module." msgstr "" -#: ../../glossary.rst:621 +#: ../../glossary.rst:627 msgid "GIL" msgstr "" -#: ../../glossary.rst:623 +#: ../../glossary.rst:629 msgid "See :term:`global interpreter lock`." msgstr "" -#: ../../glossary.rst:624 +#: ../../glossary.rst:630 msgid "global interpreter lock" msgstr "" -#: ../../glossary.rst:626 +#: ../../glossary.rst:632 msgid "" "The mechanism used by the :term:`CPython` interpreter to assure that only " "one thread executes Python :term:`bytecode` at a time. This simplifies the " @@ -1148,7 +1162,7 @@ msgid "" "processor machines." msgstr "" -#: ../../glossary.rst:635 +#: ../../glossary.rst:641 msgid "" "However, some extension modules, either standard or third-party, are " "designed so as to release the GIL when doing computationally intensive tasks " @@ -1156,7 +1170,7 @@ msgid "" "I/O." msgstr "" -#: ../../glossary.rst:640 +#: ../../glossary.rst:646 msgid "" "As of Python 3.13, the GIL can be disabled using the :option:`--disable-gil` " "build configuration. After building Python with this option, code must be " @@ -1166,29 +1180,29 @@ msgid "" "core CPUs efficiently. For more details, see :pep:`703`." msgstr "" -#: ../../glossary.rst:647 +#: ../../glossary.rst:653 msgid "" "In prior versions of Python's C API, a function might declare that it " "requires the GIL to be held in order to use it. This refers to having an :" "term:`attached thread state`." msgstr "" -#: ../../glossary.rst:650 +#: ../../glossary.rst:656 msgid "hash-based pyc" msgstr "" -#: ../../glossary.rst:652 +#: ../../glossary.rst:658 msgid "" "A bytecode cache file that uses the hash rather than the last-modified time " "of the corresponding source file to determine its validity. See :ref:`pyc-" "invalidation`." msgstr "" -#: ../../glossary.rst:655 +#: ../../glossary.rst:661 msgid "hashable" msgstr "" -#: ../../glossary.rst:657 +#: ../../glossary.rst:663 msgid "" "An object is *hashable* if it has a hash value which never changes during " "its lifetime (it needs a :meth:`~object.__hash__` method), and can be " @@ -1196,13 +1210,13 @@ msgid "" "Hashable objects which compare equal must have the same hash value." msgstr "" -#: ../../glossary.rst:663 +#: ../../glossary.rst:669 msgid "" "Hashability makes an object usable as a dictionary key and a set member, " "because these data structures use the hash value internally." msgstr "" -#: ../../glossary.rst:666 +#: ../../glossary.rst:672 msgid "" "Most of Python's immutable built-in objects are hashable; mutable containers " "(such as lists or dictionaries) are not; immutable containers (such as " @@ -1212,45 +1226,45 @@ msgid "" "value is derived from their :func:`id`." msgstr "" -#: ../../glossary.rst:673 +#: ../../glossary.rst:679 msgid "IDLE" msgstr "" -#: ../../glossary.rst:675 +#: ../../glossary.rst:681 msgid "" "An Integrated Development and Learning Environment for Python. :ref:`idle` " "is a basic editor and interpreter environment which ships with the standard " "distribution of Python." msgstr "" -#: ../../glossary.rst:678 +#: ../../glossary.rst:684 msgid "immortal" msgstr "" -#: ../../glossary.rst:680 +#: ../../glossary.rst:686 msgid "" "*Immortal objects* are a CPython implementation detail introduced in :pep:" "`683`." msgstr "" -#: ../../glossary.rst:683 +#: ../../glossary.rst:689 msgid "" "If an object is immortal, its :term:`reference count` is never modified, and " "therefore it is never deallocated while the interpreter is running. For " "example, :const:`True` and :const:`None` are immortal in CPython." msgstr "" -#: ../../glossary.rst:687 +#: ../../glossary.rst:693 msgid "" "Immortal objects can be identified via :func:`sys._is_immortal`, or via :c:" "func:`PyUnstable_IsImmortal` in the C API." msgstr "" -#: ../../glossary.rst:689 +#: ../../glossary.rst:695 msgid "immutable" msgstr "" -#: ../../glossary.rst:691 +#: ../../glossary.rst:697 msgid "" "An object with a fixed value. Immutable objects include numbers, strings " "and tuples. Such an object cannot be altered. A new object has to be " @@ -1259,11 +1273,11 @@ msgid "" "dictionary." msgstr "" -#: ../../glossary.rst:696 +#: ../../glossary.rst:702 msgid "import path" msgstr "" -#: ../../glossary.rst:698 +#: ../../glossary.rst:704 msgid "" "A list of locations (or :term:`path entries `) that are searched " "by the :term:`path based finder` for modules to import. During import, this " @@ -1271,31 +1285,31 @@ msgid "" "it may also come from the parent package's ``__path__`` attribute." msgstr "" -#: ../../glossary.rst:703 +#: ../../glossary.rst:709 msgid "importing" msgstr "" -#: ../../glossary.rst:705 +#: ../../glossary.rst:711 msgid "" "The process by which Python code in one module is made available to Python " "code in another module." msgstr "" -#: ../../glossary.rst:707 +#: ../../glossary.rst:713 msgid "importer" msgstr "" -#: ../../glossary.rst:709 +#: ../../glossary.rst:715 msgid "" "An object that both finds and loads a module; both a :term:`finder` and :" "term:`loader` object." msgstr "" -#: ../../glossary.rst:711 +#: ../../glossary.rst:717 msgid "interactive" msgstr "" -#: ../../glossary.rst:713 +#: ../../glossary.rst:719 msgid "" "Python has an interactive interpreter which means you can enter statements " "and expressions at the interpreter prompt, immediately execute them and see " @@ -1305,11 +1319,11 @@ msgid "" "For more on interactive mode, see :ref:`tut-interac`." msgstr "" -#: ../../glossary.rst:720 +#: ../../glossary.rst:726 msgid "interpreted" msgstr "" -#: ../../glossary.rst:722 +#: ../../glossary.rst:728 msgid "" "Python is an interpreted language, as opposed to a compiled one, though the " "distinction can be blurry because of the presence of the bytecode compiler. " @@ -1319,11 +1333,11 @@ msgid "" "generally also run more slowly. See also :term:`interactive`." msgstr "" -#: ../../glossary.rst:729 +#: ../../glossary.rst:735 msgid "interpreter shutdown" msgstr "" -#: ../../glossary.rst:731 +#: ../../glossary.rst:737 msgid "" "When asked to shut down, the Python interpreter enters a special phase where " "it gradually releases all allocated resources, such as modules and various " @@ -1335,17 +1349,17 @@ msgid "" "the warnings machinery)." msgstr "" -#: ../../glossary.rst:740 +#: ../../glossary.rst:746 msgid "" "The main reason for interpreter shutdown is that the ``__main__`` module or " "the script being run has finished executing." msgstr "" -#: ../../glossary.rst:742 +#: ../../glossary.rst:748 msgid "iterable" msgstr "" -#: ../../glossary.rst:744 +#: ../../glossary.rst:750 msgid "" "An object capable of returning its members one at a time. Examples of " "iterables include all sequence types (such as :class:`list`, :class:`str`, " @@ -1355,7 +1369,7 @@ msgid "" "that implements :term:`sequence` semantics." msgstr "" -#: ../../glossary.rst:752 +#: ../../glossary.rst:758 msgid "" "Iterables can be used in a :keyword:`for` loop and in many other places " "where a sequence is needed (:func:`zip`, :func:`map`, ...). When an " @@ -1368,11 +1382,11 @@ msgid "" "loop. See also :term:`iterator`, :term:`sequence`, and :term:`generator`." msgstr "" -#: ../../glossary.rst:762 +#: ../../glossary.rst:768 msgid "iterator" msgstr "" -#: ../../glossary.rst:764 +#: ../../glossary.rst:770 msgid "" "An object representing a stream of data. Repeated calls to the iterator's :" "meth:`~iterator.__next__` method (or passing it to the built-in function :" @@ -1390,29 +1404,29 @@ msgid "" "the previous iteration pass, making it appear like an empty container." msgstr "" -#: ../../glossary.rst:779 +#: ../../glossary.rst:785 msgid "More information can be found in :ref:`typeiter`." msgstr "" -#: ../../glossary.rst:783 +#: ../../glossary.rst:789 msgid "" "CPython does not consistently apply the requirement that an iterator define :" "meth:`~iterator.__iter__`. And also please note that the free-threading " "CPython does not guarantee the thread-safety of iterator operations." msgstr "" -#: ../../glossary.rst:788 +#: ../../glossary.rst:794 msgid "key function" msgstr "" -#: ../../glossary.rst:790 +#: ../../glossary.rst:796 msgid "" "A key function or collation function is a callable that returns a value used " "for sorting or ordering. For example, :func:`locale.strxfrm` is used to " "produce a sort key that is aware of locale specific sort conventions." msgstr "" -#: ../../glossary.rst:795 +#: ../../glossary.rst:801 msgid "" "A number of tools in Python accept key functions to control how elements are " "ordered or grouped. They include :func:`min`, :func:`max`, :func:`sorted`, :" @@ -1420,7 +1434,7 @@ msgid "" "nlargest`, and :func:`itertools.groupby`." msgstr "" -#: ../../glossary.rst:801 +#: ../../glossary.rst:807 msgid "" "There are several ways to create a key function. For example. the :meth:" "`str.lower` method can serve as a key function for case insensitive sorts. " @@ -1431,30 +1445,30 @@ msgid "" "` for examples of how to create and use key functions." msgstr "" -#: ../../glossary.rst:808 +#: ../../glossary.rst:814 msgid "keyword argument" msgstr "" -#: ../../glossary.rst:810 ../../glossary.rst:1125 +#: ../../glossary.rst:816 ../../glossary.rst:1131 msgid "See :term:`argument`." msgstr "" -#: ../../glossary.rst:811 +#: ../../glossary.rst:817 msgid "lambda" msgstr "" -#: ../../glossary.rst:813 +#: ../../glossary.rst:819 msgid "" "An anonymous inline function consisting of a single :term:`expression` which " "is evaluated when the function is called. The syntax to create a lambda " "function is ``lambda [parameters]: expression``" msgstr "" -#: ../../glossary.rst:816 +#: ../../glossary.rst:822 msgid "LBYL" msgstr "" -#: ../../glossary.rst:818 +#: ../../glossary.rst:824 msgid "" "Look before you leap. This coding style explicitly tests for pre-conditions " "before making calls or lookups. This style contrasts with the :term:`EAFP` " @@ -1462,7 +1476,7 @@ msgid "" "statements." msgstr "" -#: ../../glossary.rst:823 +#: ../../glossary.rst:829 msgid "" "In a multi-threaded environment, the LBYL approach can risk introducing a " "race condition between \"the looking\" and \"the leaping\". For example, " @@ -1471,30 +1485,30 @@ msgid "" "This issue can be solved with locks or by using the EAFP approach." msgstr "" -#: ../../glossary.rst:828 +#: ../../glossary.rst:834 msgid "lexical analyzer" msgstr "" -#: ../../glossary.rst:831 +#: ../../glossary.rst:837 msgid "Formal name for the *tokenizer*; see :term:`token`." msgstr "" -#: ../../glossary.rst:832 +#: ../../glossary.rst:838 msgid "list" msgstr "" -#: ../../glossary.rst:834 +#: ../../glossary.rst:840 msgid "" "A built-in Python :term:`sequence`. Despite its name it is more akin to an " "array in other languages than to a linked list since access to elements is " "*O*\\ (1)." msgstr "" -#: ../../glossary.rst:837 +#: ../../glossary.rst:843 msgid "list comprehension" msgstr "" -#: ../../glossary.rst:839 +#: ../../glossary.rst:845 msgid "" "A compact way to process all or part of the elements in a sequence and " "return a list with the results. ``result = ['{:#04x}'.format(x) for x in " @@ -1503,11 +1517,11 @@ msgid "" "optional. If omitted, all elements in ``range(256)`` are processed." msgstr "" -#: ../../glossary.rst:845 +#: ../../glossary.rst:851 msgid "loader" msgstr "" -#: ../../glossary.rst:847 +#: ../../glossary.rst:853 msgid "" "An object that loads a module. It must define the :meth:`!exec_module` and :" "meth:`!create_module` methods to implement the :class:`~importlib.abc." @@ -1515,58 +1529,58 @@ msgid "" "also:" msgstr "" -#: ../../glossary.rst:853 +#: ../../glossary.rst:859 msgid ":ref:`finders-and-loaders`" msgstr "" -#: ../../glossary.rst:854 +#: ../../glossary.rst:860 msgid ":class:`importlib.abc.Loader`" msgstr "" -#: ../../glossary.rst:855 +#: ../../glossary.rst:861 msgid ":pep:`302`" msgstr "" -#: ../../glossary.rst:856 +#: ../../glossary.rst:862 msgid "locale encoding" msgstr "" -#: ../../glossary.rst:858 +#: ../../glossary.rst:864 msgid "" "On Unix, it is the encoding of the LC_CTYPE locale. It can be set with :func:" "`locale.setlocale(locale.LC_CTYPE, new_locale) `." msgstr "" -#: ../../glossary.rst:861 +#: ../../glossary.rst:867 msgid "On Windows, it is the ANSI code page (ex: ``\"cp1252\"``)." msgstr "" -#: ../../glossary.rst:863 +#: ../../glossary.rst:869 msgid "" "On Android and VxWorks, Python uses ``\"utf-8\"`` as the locale encoding." msgstr "" -#: ../../glossary.rst:865 +#: ../../glossary.rst:871 msgid ":func:`locale.getencoding` can be used to get the locale encoding." msgstr "" -#: ../../glossary.rst:867 +#: ../../glossary.rst:873 msgid "See also the :term:`filesystem encoding and error handler`." msgstr "" -#: ../../glossary.rst:868 +#: ../../glossary.rst:874 msgid "magic method" msgstr "" -#: ../../glossary.rst:872 +#: ../../glossary.rst:878 msgid "An informal synonym for :term:`special method`." msgstr "" -#: ../../glossary.rst:873 +#: ../../glossary.rst:879 msgid "mapping" msgstr "" -#: ../../glossary.rst:875 +#: ../../glossary.rst:881 msgid "" "A container object that supports arbitrary key lookups and implements the " "methods specified in the :class:`collections.abc.Mapping` or :class:" @@ -1576,28 +1590,28 @@ msgid "" "`collections.Counter`." msgstr "" -#: ../../glossary.rst:881 +#: ../../glossary.rst:887 msgid "meta path finder" msgstr "" -#: ../../glossary.rst:883 +#: ../../glossary.rst:889 msgid "" "A :term:`finder` returned by a search of :data:`sys.meta_path`. Meta path " "finders are related to, but different from :term:`path entry finders `." msgstr "" -#: ../../glossary.rst:887 +#: ../../glossary.rst:893 msgid "" "See :class:`importlib.abc.MetaPathFinder` for the methods that meta path " "finders implement." msgstr "" -#: ../../glossary.rst:889 +#: ../../glossary.rst:895 msgid "metaclass" msgstr "" -#: ../../glossary.rst:891 +#: ../../glossary.rst:897 msgid "" "The class of a class. Class definitions create a class name, a class " "dictionary, and a list of base classes. The metaclass is responsible for " @@ -1610,15 +1624,15 @@ msgid "" "singletons, and many other tasks." msgstr "" -#: ../../glossary.rst:901 +#: ../../glossary.rst:907 msgid "More information can be found in :ref:`metaclasses`." msgstr "" -#: ../../glossary.rst:870 ../../glossary.rst:902 ../../glossary.rst:1270 +#: ../../glossary.rst:876 ../../glossary.rst:908 ../../glossary.rst:1276 msgid "method" msgstr "" -#: ../../glossary.rst:904 +#: ../../glossary.rst:910 msgid "" "A function which is defined inside a class body. If called as an attribute " "of an instance of that class, the method will get the instance object as its " @@ -1626,83 +1640,83 @@ msgid "" "`function` and :term:`nested scope`." msgstr "" -#: ../../glossary.rst:908 +#: ../../glossary.rst:914 msgid "method resolution order" msgstr "" -#: ../../glossary.rst:910 +#: ../../glossary.rst:916 msgid "" "Method Resolution Order is the order in which base classes are searched for " "a member during lookup. See :ref:`python_2.3_mro` for details of the " "algorithm used by the Python interpreter since the 2.3 release." msgstr "" -#: ../../glossary.rst:913 +#: ../../glossary.rst:919 msgid "module" msgstr "" -#: ../../glossary.rst:915 +#: ../../glossary.rst:921 msgid "" "An object that serves as an organizational unit of Python code. Modules " "have a namespace containing arbitrary Python objects. Modules are loaded " "into Python by the process of :term:`importing`." msgstr "" -#: ../../glossary.rst:919 +#: ../../glossary.rst:925 msgid "See also :term:`package`." msgstr "" -#: ../../glossary.rst:920 +#: ../../glossary.rst:926 msgid "module spec" msgstr "" -#: ../../glossary.rst:922 +#: ../../glossary.rst:928 msgid "" "A namespace containing the import-related information used to load a module. " "An instance of :class:`importlib.machinery.ModuleSpec`." msgstr "" -#: ../../glossary.rst:925 +#: ../../glossary.rst:931 msgid "See also :ref:`module-specs`." msgstr "" -#: ../../glossary.rst:926 +#: ../../glossary.rst:932 msgid "MRO" msgstr "" -#: ../../glossary.rst:928 +#: ../../glossary.rst:934 msgid "See :term:`method resolution order`." msgstr "" -#: ../../glossary.rst:929 +#: ../../glossary.rst:935 msgid "mutable" msgstr "" -#: ../../glossary.rst:931 +#: ../../glossary.rst:937 msgid "" "Mutable objects can change their value but keep their :func:`id`. See also :" "term:`immutable`." msgstr "" -#: ../../glossary.rst:933 +#: ../../glossary.rst:939 msgid "named tuple" msgstr "" -#: ../../glossary.rst:935 +#: ../../glossary.rst:941 msgid "" "The term \"named tuple\" applies to any type or class that inherits from " "tuple and whose indexable elements are also accessible using named " "attributes. The type or class may have other features as well." msgstr "" -#: ../../glossary.rst:939 +#: ../../glossary.rst:945 msgid "" "Several built-in types are named tuples, including the values returned by :" "func:`time.localtime` and :func:`os.stat`. Another example is :data:`sys." "float_info`::" msgstr "" -#: ../../glossary.rst:943 +#: ../../glossary.rst:949 msgid "" ">>> sys.float_info[1] # indexed access\n" "1024\n" @@ -1712,7 +1726,7 @@ msgid "" "True" msgstr "" -#: ../../glossary.rst:950 +#: ../../glossary.rst:956 msgid "" "Some named tuples are built-in types (such as the above examples). " "Alternatively, a named tuple can be created from a regular class definition " @@ -1723,11 +1737,11 @@ msgid "" "be found in hand-written or built-in named tuples." msgstr "" -#: ../../glossary.rst:958 +#: ../../glossary.rst:964 msgid "namespace" msgstr "" -#: ../../glossary.rst:960 +#: ../../glossary.rst:966 msgid "" "The place where a variable is stored. Namespaces are implemented as " "dictionaries. There are the local, global and built-in namespaces as well " @@ -1740,38 +1754,38 @@ msgid "" "by the :mod:`random` and :mod:`itertools` modules, respectively." msgstr "" -#: ../../glossary.rst:970 +#: ../../glossary.rst:976 msgid "namespace package" msgstr "" -#: ../../glossary.rst:972 +#: ../../glossary.rst:978 msgid "" "A :term:`package` which serves only as a container for subpackages. " "Namespace packages may have no physical representation, and specifically are " "not like a :term:`regular package` because they have no ``__init__.py`` file." msgstr "" -#: ../../glossary.rst:977 +#: ../../glossary.rst:983 msgid "" "Namespace packages allow several individually installable packages to have a " "common parent package. Otherwise, it is recommended to use a :term:`regular " "package`." msgstr "" -#: ../../glossary.rst:980 +#: ../../glossary.rst:986 msgid "" "For more information, see :pep:`420` and :ref:`reference-namespace-package`." msgstr "" -#: ../../glossary.rst:982 +#: ../../glossary.rst:988 msgid "See also :term:`module`." msgstr "" -#: ../../glossary.rst:983 +#: ../../glossary.rst:989 msgid "nested scope" msgstr "" -#: ../../glossary.rst:985 +#: ../../glossary.rst:991 msgid "" "The ability to refer to a variable in an enclosing definition. For " "instance, a function defined inside another function can refer to variables " @@ -1781,11 +1795,11 @@ msgid "" "global namespace. The :keyword:`nonlocal` allows writing to outer scopes." msgstr "" -#: ../../glossary.rst:992 +#: ../../glossary.rst:998 msgid "new-style class" msgstr "" -#: ../../glossary.rst:994 +#: ../../glossary.rst:1000 msgid "" "Old name for the flavor of classes now used for all class objects. In " "earlier Python versions, only new-style classes could use Python's newer, " @@ -1793,21 +1807,21 @@ msgid "" "meth:`~object.__getattribute__`, class methods, and static methods." msgstr "" -#: ../../glossary.rst:999 +#: ../../glossary.rst:1005 msgid "object" msgstr "" -#: ../../glossary.rst:1001 +#: ../../glossary.rst:1007 msgid "" "Any data with state (attributes or value) and defined behavior (methods). " "Also the ultimate base class of any :term:`new-style class`." msgstr "" -#: ../../glossary.rst:1004 +#: ../../glossary.rst:1010 msgid "optimized scope" msgstr "" -#: ../../glossary.rst:1006 +#: ../../glossary.rst:1012 msgid "" "A scope where target local variable names are reliably known to the compiler " "when the code is compiled, allowing optimization of read and write access to " @@ -1818,33 +1832,33 @@ msgid "" "to optimized scopes." msgstr "" -#: ../../glossary.rst:1013 +#: ../../glossary.rst:1019 msgid "package" msgstr "" -#: ../../glossary.rst:1015 +#: ../../glossary.rst:1021 msgid "" "A Python :term:`module` which can contain submodules or recursively, " "subpackages. Technically, a package is a Python module with a ``__path__`` " "attribute." msgstr "" -#: ../../glossary.rst:1019 +#: ../../glossary.rst:1025 msgid "See also :term:`regular package` and :term:`namespace package`." msgstr "" -#: ../../glossary.rst:1020 +#: ../../glossary.rst:1026 msgid "parameter" msgstr "" -#: ../../glossary.rst:1022 +#: ../../glossary.rst:1028 msgid "" "A named entity in a :term:`function` (or method) definition that specifies " "an :term:`argument` (or in some cases, arguments) that the function can " "accept. There are five kinds of parameter:" msgstr "" -#: ../../glossary.rst:1026 +#: ../../glossary.rst:1032 msgid "" ":dfn:`positional-or-keyword`: specifies an argument that can be passed " "either :term:`positionally ` or as a :term:`keyword argument " @@ -1852,11 +1866,11 @@ msgid "" "*bar* in the following::" msgstr "" -#: ../../glossary.rst:1031 +#: ../../glossary.rst:1037 msgid "def func(foo, bar=None): ..." msgstr "" -#: ../../glossary.rst:1035 +#: ../../glossary.rst:1041 msgid "" ":dfn:`positional-only`: specifies an argument that can be supplied only by " "position. Positional-only parameters can be defined by including a ``/`` " @@ -1864,11 +1878,11 @@ msgid "" "example *posonly1* and *posonly2* in the following::" msgstr "" -#: ../../glossary.rst:1040 +#: ../../glossary.rst:1046 msgid "def func(posonly1, posonly2, /, positional_or_keyword): ..." msgstr "" -#: ../../glossary.rst:1044 +#: ../../glossary.rst:1050 msgid "" ":dfn:`keyword-only`: specifies an argument that can be supplied only by " "keyword. Keyword-only parameters can be defined by including a single var-" @@ -1877,11 +1891,11 @@ msgid "" "following::" msgstr "" -#: ../../glossary.rst:1050 +#: ../../glossary.rst:1056 msgid "def func(arg, *, kw_only1, kw_only2): ..." msgstr "" -#: ../../glossary.rst:1052 +#: ../../glossary.rst:1058 msgid "" ":dfn:`var-positional`: specifies that an arbitrary sequence of positional " "arguments can be provided (in addition to any positional arguments already " @@ -1890,11 +1904,11 @@ msgid "" "following::" msgstr "" -#: ../../glossary.rst:1058 +#: ../../glossary.rst:1064 msgid "def func(*args, **kwargs): ..." msgstr "" -#: ../../glossary.rst:1060 +#: ../../glossary.rst:1066 msgid "" ":dfn:`var-keyword`: specifies that arbitrarily many keyword arguments can be " "provided (in addition to any keyword arguments already accepted by other " @@ -1902,13 +1916,13 @@ msgid "" "name with ``**``, for example *kwargs* in the example above." msgstr "" -#: ../../glossary.rst:1066 +#: ../../glossary.rst:1072 msgid "" "Parameters can specify both optional and required arguments, as well as " "default values for some optional arguments." msgstr "" -#: ../../glossary.rst:1069 +#: ../../glossary.rst:1075 msgid "" "See also the :term:`argument` glossary entry, the FAQ question on :ref:`the " "difference between arguments and parameters `, " @@ -1916,59 +1930,59 @@ msgid "" "`362`." msgstr "" -#: ../../glossary.rst:1073 +#: ../../glossary.rst:1079 msgid "path entry" msgstr "" -#: ../../glossary.rst:1075 +#: ../../glossary.rst:1081 msgid "" "A single location on the :term:`import path` which the :term:`path based " "finder` consults to find modules for importing." msgstr "" -#: ../../glossary.rst:1077 +#: ../../glossary.rst:1083 msgid "path entry finder" msgstr "" -#: ../../glossary.rst:1079 +#: ../../glossary.rst:1085 msgid "" "A :term:`finder` returned by a callable on :data:`sys.path_hooks` (i.e. a :" "term:`path entry hook`) which knows how to locate modules given a :term:" "`path entry`." msgstr "" -#: ../../glossary.rst:1083 +#: ../../glossary.rst:1089 msgid "" "See :class:`importlib.abc.PathEntryFinder` for the methods that path entry " "finders implement." msgstr "" -#: ../../glossary.rst:1085 +#: ../../glossary.rst:1091 msgid "path entry hook" msgstr "" -#: ../../glossary.rst:1087 +#: ../../glossary.rst:1093 msgid "" "A callable on the :data:`sys.path_hooks` list which returns a :term:`path " "entry finder` if it knows how to find modules on a specific :term:`path " "entry`." msgstr "" -#: ../../glossary.rst:1090 +#: ../../glossary.rst:1096 msgid "path based finder" msgstr "" -#: ../../glossary.rst:1092 +#: ../../glossary.rst:1098 msgid "" "One of the default :term:`meta path finders ` which " "searches an :term:`import path` for modules." msgstr "" -#: ../../glossary.rst:1094 +#: ../../glossary.rst:1100 msgid "path-like object" msgstr "" -#: ../../glossary.rst:1096 +#: ../../glossary.rst:1102 msgid "" "An object representing a file system path. A path-like object is either a :" "class:`str` or :class:`bytes` object representing a path, or an object " @@ -1980,11 +1994,11 @@ msgid "" "`519`." msgstr "" -#: ../../glossary.rst:1104 +#: ../../glossary.rst:1110 msgid "PEP" msgstr "" -#: ../../glossary.rst:1106 +#: ../../glossary.rst:1112 msgid "" "Python Enhancement Proposal. A PEP is a design document providing " "information to the Python community, or describing a new feature for Python " @@ -1992,7 +2006,7 @@ msgid "" "specification and a rationale for proposed features." msgstr "" -#: ../../glossary.rst:1112 +#: ../../glossary.rst:1118 msgid "" "PEPs are intended to be the primary mechanisms for proposing major new " "features, for collecting community input on an issue, and for documenting " @@ -2001,29 +2015,29 @@ msgid "" "dissenting opinions." msgstr "" -#: ../../glossary.rst:1118 +#: ../../glossary.rst:1124 msgid "See :pep:`1`." msgstr "" -#: ../../glossary.rst:1119 +#: ../../glossary.rst:1125 msgid "portion" msgstr "" -#: ../../glossary.rst:1121 +#: ../../glossary.rst:1127 msgid "" "A set of files in a single directory (possibly stored in a zip file) that " "contribute to a namespace package, as defined in :pep:`420`." msgstr "" -#: ../../glossary.rst:1123 +#: ../../glossary.rst:1129 msgid "positional argument" msgstr "" -#: ../../glossary.rst:1126 +#: ../../glossary.rst:1132 msgid "provisional API" msgstr "" -#: ../../glossary.rst:1128 +#: ../../glossary.rst:1134 msgid "" "A provisional API is one which has been deliberately excluded from the " "standard library's backwards compatibility guarantees. While major changes " @@ -2034,44 +2048,44 @@ msgid "" "flaws are uncovered that were missed prior to the inclusion of the API." msgstr "" -#: ../../glossary.rst:1137 +#: ../../glossary.rst:1143 msgid "" "Even for provisional APIs, backwards incompatible changes are seen as a " "\"solution of last resort\" - every attempt will still be made to find a " "backwards compatible resolution to any identified problems." msgstr "" -#: ../../glossary.rst:1141 +#: ../../glossary.rst:1147 msgid "" "This process allows the standard library to continue to evolve over time, " "without locking in problematic design errors for extended periods of time. " "See :pep:`411` for more details." msgstr "" -#: ../../glossary.rst:1144 +#: ../../glossary.rst:1150 msgid "provisional package" msgstr "" -#: ../../glossary.rst:1146 +#: ../../glossary.rst:1152 msgid "See :term:`provisional API`." msgstr "" -#: ../../glossary.rst:1147 +#: ../../glossary.rst:1153 msgid "Python 3000" msgstr "" -#: ../../glossary.rst:1149 +#: ../../glossary.rst:1155 msgid "" "Nickname for the Python 3.x release line (coined long ago when the release " "of version 3 was something in the distant future.) This is also abbreviated " "\"Py3k\"." msgstr "" -#: ../../glossary.rst:1152 +#: ../../glossary.rst:1158 msgid "Pythonic" msgstr "" -#: ../../glossary.rst:1154 +#: ../../glossary.rst:1160 msgid "" "An idea or piece of code which closely follows the most common idioms of the " "Python language, rather than implementing code using concepts common to " @@ -2081,27 +2095,27 @@ msgid "" "Python sometimes use a numerical counter instead::" msgstr "" -#: ../../glossary.rst:1161 +#: ../../glossary.rst:1167 msgid "" "for i in range(len(food)):\n" " print(food[i])" msgstr "" -#: ../../glossary.rst:1164 +#: ../../glossary.rst:1170 msgid "As opposed to the cleaner, Pythonic method::" msgstr "" -#: ../../glossary.rst:1166 +#: ../../glossary.rst:1172 msgid "" "for piece in food:\n" " print(piece)" msgstr "" -#: ../../glossary.rst:1168 +#: ../../glossary.rst:1174 msgid "qualified name" msgstr "" -#: ../../glossary.rst:1170 +#: ../../glossary.rst:1176 msgid "" "A dotted name showing the \"path\" from a module's global scope to a class, " "function or method defined in that module, as defined in :pep:`3155`. For " @@ -2109,7 +2123,7 @@ msgid "" "object's name::" msgstr "" -#: ../../glossary.rst:1175 +#: ../../glossary.rst:1181 msgid "" ">>> class C:\n" "... class D:\n" @@ -2124,25 +2138,25 @@ msgid "" "'C.D.meth'" msgstr "" -#: ../../glossary.rst:1187 +#: ../../glossary.rst:1193 msgid "" "When used to refer to modules, the *fully qualified name* means the entire " "dotted path to the module, including any parent packages, e.g. ``email.mime." "text``::" msgstr "" -#: ../../glossary.rst:1191 +#: ../../glossary.rst:1197 msgid "" ">>> import email.mime.text\n" ">>> email.mime.text.__name__\n" "'email.mime.text'" msgstr "" -#: ../../glossary.rst:1194 +#: ../../glossary.rst:1200 msgid "reference count" msgstr "" -#: ../../glossary.rst:1196 +#: ../../glossary.rst:1202 msgid "" "The number of references to an object. When the reference count of an " "object drops to zero, it is deallocated. Some objects are :term:`immortal` " @@ -2153,35 +2167,35 @@ msgid "" "reference count for a particular object." msgstr "" -#: ../../glossary.rst:1204 +#: ../../glossary.rst:1210 msgid "regular package" msgstr "" -#: ../../glossary.rst:1206 +#: ../../glossary.rst:1212 msgid "" "A traditional :term:`package`, such as a directory containing an ``__init__." "py`` file." msgstr "" -#: ../../glossary.rst:1209 +#: ../../glossary.rst:1215 msgid "See also :term:`namespace package`." msgstr "" -#: ../../glossary.rst:1210 +#: ../../glossary.rst:1216 msgid "REPL" msgstr "" -#: ../../glossary.rst:1212 +#: ../../glossary.rst:1218 msgid "" "An acronym for the \"read–eval–print loop\", another name for the :term:" "`interactive` interpreter shell." msgstr "" -#: ../../glossary.rst:1214 +#: ../../glossary.rst:1220 msgid "__slots__" msgstr "" -#: ../../glossary.rst:1216 +#: ../../glossary.rst:1222 msgid "" "A declaration inside a class that saves memory by pre-declaring space for " "instance attributes and eliminating instance dictionaries. Though popular, " @@ -2190,11 +2204,11 @@ msgid "" "application." msgstr "" -#: ../../glossary.rst:1221 +#: ../../glossary.rst:1227 msgid "sequence" msgstr "" -#: ../../glossary.rst:1223 +#: ../../glossary.rst:1229 msgid "" "An :term:`iterable` which supports efficient element access using integer " "indices via the :meth:`~object.__getitem__` special method and defines a :" @@ -2206,7 +2220,7 @@ msgid "" "integers." msgstr "" -#: ../../glossary.rst:1232 +#: ../../glossary.rst:1238 msgid "" "The :class:`collections.abc.Sequence` abstract base class defines a much " "richer interface that goes beyond just :meth:`~object.__getitem__` and :meth:" @@ -2217,11 +2231,11 @@ msgid "" "`Common Sequence Operations `." msgstr "" -#: ../../glossary.rst:1241 +#: ../../glossary.rst:1247 msgid "set comprehension" msgstr "" -#: ../../glossary.rst:1243 +#: ../../glossary.rst:1249 msgid "" "A compact way to process all or part of the elements in an iterable and " "return a set with the results. ``results = {c for c in 'abracadabra' if c " @@ -2229,21 +2243,21 @@ msgid "" "`comprehensions`." msgstr "" -#: ../../glossary.rst:1247 +#: ../../glossary.rst:1253 msgid "single dispatch" msgstr "" -#: ../../glossary.rst:1249 +#: ../../glossary.rst:1255 msgid "" "A form of :term:`generic function` dispatch where the implementation is " "chosen based on the type of a single argument." msgstr "" -#: ../../glossary.rst:1251 +#: ../../glossary.rst:1257 msgid "slice" msgstr "" -#: ../../glossary.rst:1253 +#: ../../glossary.rst:1259 msgid "" "An object usually containing a portion of a :term:`sequence`. A slice is " "created using the subscript notation, ``[]`` with colons between numbers " @@ -2251,34 +2265,34 @@ msgid "" "(subscript) notation uses :class:`slice` objects internally." msgstr "" -#: ../../glossary.rst:1257 +#: ../../glossary.rst:1263 msgid "soft deprecated" msgstr "" -#: ../../glossary.rst:1259 +#: ../../glossary.rst:1265 msgid "" "A soft deprecated API should not be used in new code, but it is safe for " "already existing code to use it. The API remains documented and tested, but " "will not be enhanced further." msgstr "" -#: ../../glossary.rst:1263 +#: ../../glossary.rst:1269 msgid "" "Soft deprecation, unlike normal deprecation, does not plan on removing the " "API and will not emit warnings." msgstr "" -#: ../../glossary.rst:1266 +#: ../../glossary.rst:1272 msgid "" "See `PEP 387: Soft Deprecation `_." msgstr "" -#: ../../glossary.rst:1268 +#: ../../glossary.rst:1274 msgid "special method" msgstr "" -#: ../../glossary.rst:1272 +#: ../../glossary.rst:1278 msgid "" "A method that is called implicitly by Python to execute a certain operation " "on a type, such as addition. Such methods have names starting and ending " @@ -2286,33 +2300,60 @@ msgid "" "`specialnames`." msgstr "" -#: ../../glossary.rst:1276 +#: ../../glossary.rst:1282 +msgid "standard library" +msgstr "" + +#: ../../glossary.rst:1284 +msgid "" +"The collection of :term:`packages `, :term:`modules ` and :" +"term:`extension modules ` distributed as a part of the " +"official Python interpreter package. The exact membership of the collection " +"may vary based on platform, available system libraries, or other criteria. " +"Documentation can be found at :ref:`library-index`." +msgstr "" + +#: ../../glossary.rst:1290 +msgid "" +"See also :data:`sys.stdlib_module_names` for a list of all possible standard " +"library module names." +msgstr "" + +#: ../../glossary.rst:1292 msgid "statement" msgstr "" -#: ../../glossary.rst:1278 +#: ../../glossary.rst:1294 msgid "" "A statement is part of a suite (a \"block\" of code). A statement is either " "an :term:`expression` or one of several constructs with a keyword, such as :" "keyword:`if`, :keyword:`while` or :keyword:`for`." msgstr "" -#: ../../glossary.rst:1281 +#: ../../glossary.rst:1297 msgid "static type checker" msgstr "" -#: ../../glossary.rst:1283 +#: ../../glossary.rst:1299 msgid "" "An external tool that reads Python code and analyzes it, looking for issues " "such as incorrect types. See also :term:`type hints ` and the :" "mod:`typing` module." msgstr "" -#: ../../glossary.rst:1286 +#: ../../glossary.rst:1302 +msgid "stdlib" +msgstr "" + +#: ../../glossary.rst:1304 +msgid "An abbreviation of :term:`standard library`." +msgstr "" + +#: ../../glossary.rst:1305 msgid "strong reference" msgstr "" -#: ../../glossary.rst:1288 +#: ../../glossary.rst:1307 msgid "" "In Python's C API, a strong reference is a reference to an object which is " "owned by the code holding the reference. The strong reference is taken by " @@ -2320,7 +2361,7 @@ msgid "" "c:func:`Py_DECREF` when the reference is deleted." msgstr "" -#: ../../glossary.rst:1294 +#: ../../glossary.rst:1313 msgid "" "The :c:func:`Py_NewRef` function can be used to create a strong reference to " "an object. Usually, the :c:func:`Py_DECREF` function must be called on the " @@ -2328,38 +2369,38 @@ msgid "" "leaking one reference." msgstr "" -#: ../../glossary.rst:1299 +#: ../../glossary.rst:1318 msgid "See also :term:`borrowed reference`." msgstr "" -#: ../../glossary.rst:1300 +#: ../../glossary.rst:1319 msgid "text encoding" msgstr "" -#: ../../glossary.rst:1302 +#: ../../glossary.rst:1321 msgid "" "A string in Python is a sequence of Unicode code points (in range " "``U+0000``--``U+10FFFF``). To store or transfer a string, it needs to be " "serialized as a sequence of bytes." msgstr "" -#: ../../glossary.rst:1306 +#: ../../glossary.rst:1325 msgid "" "Serializing a string into a sequence of bytes is known as \"encoding\", and " "recreating the string from the sequence of bytes is known as \"decoding\"." msgstr "" -#: ../../glossary.rst:1309 +#: ../../glossary.rst:1328 msgid "" "There are a variety of different text serialization :ref:`codecs `, which are collectively referred to as \"text encodings\"." msgstr "" -#: ../../glossary.rst:1312 +#: ../../glossary.rst:1331 msgid "text file" msgstr "" -#: ../../glossary.rst:1314 +#: ../../glossary.rst:1333 msgid "" "A :term:`file object` able to read and write :class:`str` objects. Often, a " "text file actually accesses a byte-oriented datastream and handles the :term:" @@ -2368,38 +2409,38 @@ msgid "" "instances of :class:`io.StringIO`." msgstr "" -#: ../../glossary.rst:1321 +#: ../../glossary.rst:1340 msgid "" "See also :term:`binary file` for a file object able to read and write :term:" "`bytes-like objects `." msgstr "" -#: ../../glossary.rst:1323 +#: ../../glossary.rst:1342 msgid "thread state" msgstr "" -#: ../../glossary.rst:1326 +#: ../../glossary.rst:1345 msgid "" "The information used by the :term:`CPython` runtime to run in an OS thread. " "For example, this includes the current exception, if any, and the state of " "the bytecode interpreter." msgstr "" -#: ../../glossary.rst:1330 +#: ../../glossary.rst:1349 msgid "" "Each thread state is bound to a single OS thread, but threads may have many " "thread states available. At most, one of them may be :term:`attached " "` at once." msgstr "" -#: ../../glossary.rst:1334 +#: ../../glossary.rst:1353 msgid "" "An :term:`attached thread state` is required to call most of Python's C API, " "unless a function explicitly documents otherwise. The bytecode interpreter " "only runs under an attached thread state." msgstr "" -#: ../../glossary.rst:1338 +#: ../../glossary.rst:1357 msgid "" "Each thread state belongs to a single interpreter, but each interpreter may " "have many thread states, including multiple for the same OS thread. Thread " @@ -2408,34 +2449,34 @@ msgid "" "given moment." msgstr "" -#: ../../glossary.rst:1344 +#: ../../glossary.rst:1363 msgid "" "See :ref:`Thread State and the Global Interpreter Lock ` for more " "information." msgstr "" -#: ../../glossary.rst:1346 +#: ../../glossary.rst:1365 msgid "token" msgstr "" -#: ../../glossary.rst:1349 +#: ../../glossary.rst:1368 msgid "" "A small unit of source code, generated by the :ref:`lexical analyzer " "` (also called the *tokenizer*). Names, numbers, strings, " "operators, newlines and similar are represented by tokens." msgstr "" -#: ../../glossary.rst:1354 +#: ../../glossary.rst:1373 msgid "" "The :mod:`tokenize` module exposes Python's lexical analyzer. The :mod:" "`token` module contains information on the various types of tokens." msgstr "" -#: ../../glossary.rst:1357 +#: ../../glossary.rst:1376 msgid "triple-quoted string" msgstr "" -#: ../../glossary.rst:1359 +#: ../../glossary.rst:1378 msgid "" "A string which is bound by three instances of either a quotation mark (\") " "or an apostrophe ('). While they don't provide any functionality not " @@ -2446,43 +2487,43 @@ msgid "" "docstrings." msgstr "" -#: ../../glossary.rst:1366 +#: ../../glossary.rst:1385 msgid "type" msgstr "" -#: ../../glossary.rst:1368 +#: ../../glossary.rst:1387 msgid "" "The type of a Python object determines what kind of object it is; every " "object has a type. An object's type is accessible as its :attr:`~object." "__class__` attribute or can be retrieved with ``type(obj)``." msgstr "" -#: ../../glossary.rst:1372 +#: ../../glossary.rst:1391 msgid "type alias" msgstr "" -#: ../../glossary.rst:1374 +#: ../../glossary.rst:1393 msgid "A synonym for a type, created by assigning the type to an identifier." msgstr "" -#: ../../glossary.rst:1376 +#: ../../glossary.rst:1395 msgid "" "Type aliases are useful for simplifying :term:`type hints `. For " "example::" msgstr "" -#: ../../glossary.rst:1379 +#: ../../glossary.rst:1398 msgid "" "def remove_gray_shades(\n" " colors: list[tuple[int, int, int]]) -> list[tuple[int, int, int]]:\n" " pass" msgstr "" -#: ../../glossary.rst:1383 +#: ../../glossary.rst:1402 msgid "could be made more readable like this::" msgstr "" -#: ../../glossary.rst:1385 +#: ../../glossary.rst:1404 msgid "" "Color = tuple[int, int, int]\n" "\n" @@ -2490,38 +2531,38 @@ msgid "" " pass" msgstr "" -#: ../../glossary.rst:1390 ../../glossary.rst:1404 +#: ../../glossary.rst:1409 ../../glossary.rst:1423 msgid "See :mod:`typing` and :pep:`484`, which describe this functionality." msgstr "" -#: ../../glossary.rst:1391 +#: ../../glossary.rst:1410 msgid "type hint" msgstr "" -#: ../../glossary.rst:1393 +#: ../../glossary.rst:1412 msgid "" "An :term:`annotation` that specifies the expected type for a variable, a " "class attribute, or a function parameter or return value." msgstr "" -#: ../../glossary.rst:1396 +#: ../../glossary.rst:1415 msgid "" "Type hints are optional and are not enforced by Python but they are useful " "to :term:`static type checkers `. They can also aid " "IDEs with code completion and refactoring." msgstr "" -#: ../../glossary.rst:1400 +#: ../../glossary.rst:1419 msgid "" "Type hints of global variables, class attributes, and functions, but not " "local variables, can be accessed using :func:`typing.get_type_hints`." msgstr "" -#: ../../glossary.rst:1405 +#: ../../glossary.rst:1424 msgid "universal newlines" msgstr "" -#: ../../glossary.rst:1407 +#: ../../glossary.rst:1426 msgid "" "A manner of interpreting text streams in which all of the following are " "recognized as ending a line: the Unix end-of-line convention ``'\\n'``, the " @@ -2530,51 +2571,51 @@ msgid "" "splitlines` for an additional use." msgstr "" -#: ../../glossary.rst:1412 +#: ../../glossary.rst:1431 msgid "variable annotation" msgstr "" -#: ../../glossary.rst:1414 +#: ../../glossary.rst:1433 msgid "An :term:`annotation` of a variable or a class attribute." msgstr "" -#: ../../glossary.rst:1416 +#: ../../glossary.rst:1435 msgid "" "When annotating a variable or a class attribute, assignment is optional::" msgstr "" -#: ../../glossary.rst:1418 +#: ../../glossary.rst:1437 msgid "" "class C:\n" " field: 'annotation'" msgstr "" -#: ../../glossary.rst:1421 +#: ../../glossary.rst:1440 msgid "" "Variable annotations are usually used for :term:`type hints `: " "for example this variable is expected to take :class:`int` values::" msgstr "" -#: ../../glossary.rst:1425 +#: ../../glossary.rst:1444 msgid "count: int = 0" msgstr "" -#: ../../glossary.rst:1427 +#: ../../glossary.rst:1446 msgid "Variable annotation syntax is explained in section :ref:`annassign`." msgstr "" -#: ../../glossary.rst:1429 +#: ../../glossary.rst:1448 msgid "" "See :term:`function annotation`, :pep:`484` and :pep:`526`, which describe " "this functionality. Also see :ref:`annotations-howto` for best practices on " "working with annotations." msgstr "" -#: ../../glossary.rst:1433 +#: ../../glossary.rst:1452 msgid "virtual environment" msgstr "" -#: ../../glossary.rst:1435 +#: ../../glossary.rst:1454 msgid "" "A cooperatively isolated runtime environment that allows Python users and " "applications to install and upgrade Python distribution packages without " @@ -2582,25 +2623,25 @@ msgid "" "same system." msgstr "" -#: ../../glossary.rst:1440 +#: ../../glossary.rst:1459 msgid "See also :mod:`venv`." msgstr "" -#: ../../glossary.rst:1441 +#: ../../glossary.rst:1460 msgid "virtual machine" msgstr "" -#: ../../glossary.rst:1443 +#: ../../glossary.rst:1462 msgid "" "A computer defined entirely in software. Python's virtual machine executes " "the :term:`bytecode` emitted by the bytecode compiler." msgstr "" -#: ../../glossary.rst:1445 +#: ../../glossary.rst:1464 msgid "Zen of Python" msgstr "" -#: ../../glossary.rst:1447 +#: ../../glossary.rst:1466 msgid "" "Listing of Python design principles and philosophies that are helpful in " "understanding and using the language. The listing can be found by typing " @@ -2615,10 +2656,10 @@ msgstr "" msgid "Fortran contiguous" msgstr "" -#: ../../glossary.rst:870 +#: ../../glossary.rst:876 msgid "magic" msgstr "" -#: ../../glossary.rst:1270 +#: ../../glossary.rst:1276 msgid "special" msgstr "" diff --git a/howto/annotations.po b/howto/annotations.po index 6cc7ea321..ba10e38e7 100644 --- a/howto/annotations.po +++ b/howto/annotations.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:52+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -380,5 +381,14 @@ msgid "" "`annotationlib.get_annotations` on Python 3.14+ or :func:`inspect." "get_annotations` on Python 3.10+. On earlier versions of Python, you can " "avoid these bugs by accessing the annotations from the class's :attr:`~type." -"__dict__` (e.g., ``cls.__dict__.get('__annotations__', None)``)." +"__dict__` (for example, ``cls.__dict__.get('__annotations__', None)``)." +msgstr "" + +#: ../../howto/annotations.rst:253 +msgid "" +"In some versions of Python, instances of classes may have an " +"``__annotations__`` attribute. However, this is not supported functionality. " +"If you need the annotations of an instance, you can use :func:`type` to " +"access its class (for example, ``annotationlib." +"get_annotations(type(myinstance))`` on Python 3.14+)." msgstr "" diff --git a/howto/argparse-optparse.po b/howto/argparse-optparse.po index b454a6a4b..913bdba4b 100644 --- a/howto/argparse-optparse.po +++ b/howto/argparse-optparse.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-10-11 14:19+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/howto/argparse.po b/howto/argparse.po index e3ee9cf4f..beaa1e154 100644 --- a/howto/argparse.po +++ b/howto/argparse.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:52+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/howto/clinic.po b/howto/clinic.po index 5871d04b9..2ef8c11f6 100644 --- a/howto/clinic.po +++ b/howto/clinic.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:52+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/howto/cporting.po b/howto/cporting.po index 8f80061ab..197d19e0a 100644 --- a/howto/cporting.po +++ b/howto/cporting.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 00:52+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" @@ -43,8 +43,8 @@ msgstr "" #: ../../howto/cporting.rst:17 msgid "" -"The `Cython`_ and `CFFI`_ libraries offer abstractions over Python's C API. " -"Extensions generally need to be re-written to use one of them, but the " -"library then handles differences between various Python versions and " -"implementations." +":ref:`Recommended third party tools ` offer abstractions over " +"the Python's C API. Extensions generally need to be re-written to use one of " +"them, but the library then handles differences between various Python " +"versions and implementations." msgstr "" diff --git a/howto/curses.po b/howto/curses.po index cfac22078..59cbdea11 100644 --- a/howto/curses.po +++ b/howto/curses.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:53+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/howto/descriptor.po b/howto/descriptor.po index 43954943a..ff65ddebf 100644 --- a/howto/descriptor.po +++ b/howto/descriptor.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:53+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/howto/enum.po b/howto/enum.po index 14ad62ddb..5a529cf95 100644 --- a/howto/enum.po +++ b/howto/enum.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:53+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/howto/free-threading-extensions.po b/howto/free-threading-extensions.po index cbf48b964..602ec4f7e 100644 --- a/howto/free-threading-extensions.po +++ b/howto/free-threading-extensions.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-06-20 06:42+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -24,9 +28,9 @@ msgstr "" #: ../../howto/free-threading-extensions.rst:9 msgid "" -"Starting with the 3.13 release, CPython has experimental support for running " -"with the :term:`global interpreter lock` (GIL) disabled in a configuration " -"called :term:`free threading`. This document describes how to adapt C API " +"Starting with the 3.13 release, CPython has support for running with the :" +"term:`global interpreter lock` (GIL) disabled in a configuration called :" +"term:`free threading`. This document describes how to adapt C API " "extensions to support free threading." msgstr "" @@ -49,29 +53,37 @@ msgid "" "#endif" msgstr "" -#: ../../howto/free-threading-extensions.rst:27 +#: ../../howto/free-threading-extensions.rst:28 +msgid "" +"On Windows, this macro is not defined automatically, but must be specified " +"to the compiler when building. The :func:`sysconfig.get_config_var` function " +"can be used to determine whether the current running interpreter had the " +"macro defined." +msgstr "" + +#: ../../howto/free-threading-extensions.rst:35 msgid "Module Initialization" msgstr "" -#: ../../howto/free-threading-extensions.rst:29 +#: ../../howto/free-threading-extensions.rst:37 msgid "" "Extension modules need to explicitly indicate that they support running with " "the GIL disabled; otherwise importing the extension will raise a warning and " "enable the GIL at runtime." msgstr "" -#: ../../howto/free-threading-extensions.rst:33 +#: ../../howto/free-threading-extensions.rst:41 msgid "" "There are two ways to indicate that an extension module supports running " "with the GIL disabled depending on whether the extension uses multi-phase or " "single-phase initialization." msgstr "" -#: ../../howto/free-threading-extensions.rst:38 +#: ../../howto/free-threading-extensions.rst:46 msgid "Multi-Phase Initialization" msgstr "" -#: ../../howto/free-threading-extensions.rst:40 +#: ../../howto/free-threading-extensions.rst:48 msgid "" "Extensions that use multi-phase initialization (i.e., :c:func:" "`PyModuleDef_Init`) should add a :c:data:`Py_mod_gil` slot in the module " @@ -79,7 +91,7 @@ msgid "" "should guard the slot with a :c:data:`PY_VERSION_HEX` check." msgstr "" -#: ../../howto/free-threading-extensions.rst:47 +#: ../../howto/free-threading-extensions.rst:55 msgid "" "static struct PyModuleDef_Slot module_slots[] = {\n" " ...\n" @@ -96,11 +108,11 @@ msgid "" "};" msgstr "" -#: ../../howto/free-threading-extensions.rst:63 +#: ../../howto/free-threading-extensions.rst:71 msgid "Single-Phase Initialization" msgstr "" -#: ../../howto/free-threading-extensions.rst:65 +#: ../../howto/free-threading-extensions.rst:73 msgid "" "Extensions that use single-phase initialization (i.e., :c:func:" "`PyModule_Create`) should call :c:func:`PyUnstable_Module_SetGIL` to " @@ -109,7 +121,7 @@ msgid "" "``#ifdef Py_GIL_DISABLED`` to avoid compilation errors in the regular build." msgstr "" -#: ../../howto/free-threading-extensions.rst:73 +#: ../../howto/free-threading-extensions.rst:81 msgid "" "static struct PyModuleDef moduledef = {\n" " PyModuleDef_HEAD_INIT,\n" @@ -130,21 +142,21 @@ msgid "" "}" msgstr "" -#: ../../howto/free-threading-extensions.rst:93 +#: ../../howto/free-threading-extensions.rst:101 msgid "General API Guidelines" msgstr "" -#: ../../howto/free-threading-extensions.rst:95 +#: ../../howto/free-threading-extensions.rst:103 msgid "Most of the C API is thread-safe, but there are some exceptions." msgstr "" -#: ../../howto/free-threading-extensions.rst:97 +#: ../../howto/free-threading-extensions.rst:105 msgid "" "**Struct Fields**: Accessing fields in Python C API objects or structs " "directly is not thread-safe if the field may be concurrently modified." msgstr "" -#: ../../howto/free-threading-extensions.rst:99 +#: ../../howto/free-threading-extensions.rst:107 msgid "" "**Macros**: Accessor macros like :c:macro:`PyList_GET_ITEM`, :c:macro:" "`PyList_SET_ITEM`, and macros like :c:macro:`PySequence_Fast_GET_SIZE` that " @@ -153,7 +165,7 @@ msgid "" "object may be modified concurrently." msgstr "" -#: ../../howto/free-threading-extensions.rst:105 +#: ../../howto/free-threading-extensions.rst:113 msgid "" "**Borrowed References**: C API functions that return :term:`borrowed " "references ` may not be thread-safe if the containing " @@ -161,11 +173,11 @@ msgid "" "references ` for more information." msgstr "" -#: ../../howto/free-threading-extensions.rst:112 +#: ../../howto/free-threading-extensions.rst:120 msgid "Container Thread Safety" msgstr "" -#: ../../howto/free-threading-extensions.rst:114 +#: ../../howto/free-threading-extensions.rst:122 msgid "" "Containers like :c:struct:`PyListObject`, :c:struct:`PyDictObject`, and :c:" "struct:`PySetObject` perform internal locking in the free-threaded build. " @@ -173,11 +185,11 @@ msgid "" "an item." msgstr "" -#: ../../howto/free-threading-extensions.rst:122 +#: ../../howto/free-threading-extensions.rst:130 msgid "``PyDict_Next``" msgstr "" -#: ../../howto/free-threading-extensions.rst:124 +#: ../../howto/free-threading-extensions.rst:132 msgid "" "A notable exception is :c:func:`PyDict_Next`, which does not lock the " "dictionary. You should use :c:macro:`Py_BEGIN_CRITICAL_SECTION` to protect " @@ -185,7 +197,7 @@ msgid "" "modified::" msgstr "" -#: ../../howto/free-threading-extensions.rst:129 +#: ../../howto/free-threading-extensions.rst:137 msgid "" "Py_BEGIN_CRITICAL_SECTION(dict);\n" "PyObject *key, *value;\n" @@ -196,11 +208,11 @@ msgid "" "Py_END_CRITICAL_SECTION();" msgstr "" -#: ../../howto/free-threading-extensions.rst:139 +#: ../../howto/free-threading-extensions.rst:147 msgid "Borrowed References" msgstr "" -#: ../../howto/free-threading-extensions.rst:143 +#: ../../howto/free-threading-extensions.rst:151 msgid "" "Some C API functions return :term:`borrowed references `. These APIs are not thread-safe if the containing object is " @@ -208,95 +220,95 @@ msgid "" "`PyList_GetItem` if the list may be modified concurrently." msgstr "" -#: ../../howto/free-threading-extensions.rst:148 +#: ../../howto/free-threading-extensions.rst:156 msgid "" "The following table lists some borrowed reference APIs and their " "replacements that return :term:`strong references `." msgstr "" -#: ../../howto/free-threading-extensions.rst:152 +#: ../../howto/free-threading-extensions.rst:160 msgid "Borrowed reference API" msgstr "" -#: ../../howto/free-threading-extensions.rst:152 +#: ../../howto/free-threading-extensions.rst:160 msgid "Strong reference API" msgstr "" -#: ../../howto/free-threading-extensions.rst:154 +#: ../../howto/free-threading-extensions.rst:162 msgid ":c:func:`PyList_GetItem`" msgstr "" -#: ../../howto/free-threading-extensions.rst:154 +#: ../../howto/free-threading-extensions.rst:162 msgid ":c:func:`PyList_GetItemRef`" msgstr "" -#: ../../howto/free-threading-extensions.rst:156 +#: ../../howto/free-threading-extensions.rst:164 msgid ":c:func:`PyDict_GetItem`" msgstr "" -#: ../../howto/free-threading-extensions.rst:156 -#: ../../howto/free-threading-extensions.rst:158 +#: ../../howto/free-threading-extensions.rst:164 +#: ../../howto/free-threading-extensions.rst:166 msgid ":c:func:`PyDict_GetItemRef`" msgstr "" -#: ../../howto/free-threading-extensions.rst:158 +#: ../../howto/free-threading-extensions.rst:166 msgid ":c:func:`PyDict_GetItemWithError`" msgstr "" -#: ../../howto/free-threading-extensions.rst:160 +#: ../../howto/free-threading-extensions.rst:168 msgid ":c:func:`PyDict_GetItemString`" msgstr "" -#: ../../howto/free-threading-extensions.rst:160 +#: ../../howto/free-threading-extensions.rst:168 msgid ":c:func:`PyDict_GetItemStringRef`" msgstr "" -#: ../../howto/free-threading-extensions.rst:162 +#: ../../howto/free-threading-extensions.rst:170 msgid ":c:func:`PyDict_SetDefault`" msgstr "" -#: ../../howto/free-threading-extensions.rst:162 +#: ../../howto/free-threading-extensions.rst:170 msgid ":c:func:`PyDict_SetDefaultRef`" msgstr "" -#: ../../howto/free-threading-extensions.rst:164 +#: ../../howto/free-threading-extensions.rst:172 msgid ":c:func:`PyDict_Next`" msgstr "" -#: ../../howto/free-threading-extensions.rst:164 +#: ../../howto/free-threading-extensions.rst:172 msgid "none (see :ref:`PyDict_Next`)" msgstr "" -#: ../../howto/free-threading-extensions.rst:166 +#: ../../howto/free-threading-extensions.rst:174 msgid ":c:func:`PyWeakref_GetObject`" msgstr "" -#: ../../howto/free-threading-extensions.rst:166 -#: ../../howto/free-threading-extensions.rst:168 +#: ../../howto/free-threading-extensions.rst:174 +#: ../../howto/free-threading-extensions.rst:176 msgid ":c:func:`PyWeakref_GetRef`" msgstr "" -#: ../../howto/free-threading-extensions.rst:168 +#: ../../howto/free-threading-extensions.rst:176 msgid ":c:func:`PyWeakref_GET_OBJECT`" msgstr "" -#: ../../howto/free-threading-extensions.rst:170 +#: ../../howto/free-threading-extensions.rst:178 msgid ":c:func:`PyImport_AddModule`" msgstr "" -#: ../../howto/free-threading-extensions.rst:170 +#: ../../howto/free-threading-extensions.rst:178 msgid ":c:func:`PyImport_AddModuleRef`" msgstr "" -#: ../../howto/free-threading-extensions.rst:172 +#: ../../howto/free-threading-extensions.rst:180 msgid ":c:func:`PyCell_GET`" msgstr "" -#: ../../howto/free-threading-extensions.rst:172 +#: ../../howto/free-threading-extensions.rst:180 msgid ":c:func:`PyCell_Get`" msgstr "" -#: ../../howto/free-threading-extensions.rst:175 +#: ../../howto/free-threading-extensions.rst:183 msgid "" "Not all APIs that return borrowed references are problematic. For example, :" "c:func:`PyTuple_GetItem` is safe because tuples are immutable. Similarly, " @@ -307,18 +319,18 @@ msgid "" "context is safe." msgstr "" -#: ../../howto/free-threading-extensions.rst:183 +#: ../../howto/free-threading-extensions.rst:191 msgid "" "Some of these functions were added in Python 3.13. You can use the " "`pythoncapi-compat `_ package " "to provide implementations of these functions for older Python versions." msgstr "" -#: ../../howto/free-threading-extensions.rst:191 +#: ../../howto/free-threading-extensions.rst:199 msgid "Memory Allocation APIs" msgstr "" -#: ../../howto/free-threading-extensions.rst:193 +#: ../../howto/free-threading-extensions.rst:201 msgid "" "Python's memory management C API provides functions in three different :ref:" "`allocation domains `: \"raw\", \"mem\", and \"object\". " @@ -328,36 +340,36 @@ msgid "" "where this was only a best practice and not a hard requirement." msgstr "" -#: ../../howto/free-threading-extensions.rst:202 +#: ../../howto/free-threading-extensions.rst:210 msgid "" "Search for uses of :c:func:`PyObject_Malloc` in your extension and check " "that the allocated memory is used for Python objects. Use :c:func:" "`PyMem_Malloc` to allocate buffers instead of :c:func:`PyObject_Malloc`." msgstr "" -#: ../../howto/free-threading-extensions.rst:209 +#: ../../howto/free-threading-extensions.rst:217 msgid "Thread State and GIL APIs" msgstr "" -#: ../../howto/free-threading-extensions.rst:211 +#: ../../howto/free-threading-extensions.rst:219 msgid "" "Python provides a set of functions and macros to manage thread state and the " "GIL, such as:" msgstr "" -#: ../../howto/free-threading-extensions.rst:214 +#: ../../howto/free-threading-extensions.rst:222 msgid ":c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release`" msgstr "" -#: ../../howto/free-threading-extensions.rst:215 +#: ../../howto/free-threading-extensions.rst:223 msgid ":c:func:`PyEval_SaveThread` and :c:func:`PyEval_RestoreThread`" msgstr "" -#: ../../howto/free-threading-extensions.rst:216 +#: ../../howto/free-threading-extensions.rst:224 msgid ":c:macro:`Py_BEGIN_ALLOW_THREADS` and :c:macro:`Py_END_ALLOW_THREADS`" msgstr "" -#: ../../howto/free-threading-extensions.rst:218 +#: ../../howto/free-threading-extensions.rst:226 msgid "" "These functions should still be used in the free-threaded build to manage " "thread state even when the :term:`GIL` is disabled. For example, if you " @@ -366,7 +378,7 @@ msgid "" "Python thread state." msgstr "" -#: ../../howto/free-threading-extensions.rst:224 +#: ../../howto/free-threading-extensions.rst:232 msgid "" "You should continue to call :c:func:`PyEval_SaveThread` or :c:macro:" "`Py_BEGIN_ALLOW_THREADS` around blocking operations, such as I/O or lock " @@ -374,25 +386,25 @@ msgid "" "collector `." msgstr "" -#: ../../howto/free-threading-extensions.rst:231 +#: ../../howto/free-threading-extensions.rst:239 msgid "Protecting Internal Extension State" msgstr "" -#: ../../howto/free-threading-extensions.rst:233 +#: ../../howto/free-threading-extensions.rst:241 msgid "" "Your extension may have internal state that was previously protected by the " "GIL. You may need to add locking to protect this state. The approach will " "depend on your extension, but some common patterns include:" msgstr "" -#: ../../howto/free-threading-extensions.rst:237 +#: ../../howto/free-threading-extensions.rst:245 msgid "" "**Caches**: global caches are a common source of shared state. Consider " "using a lock to protect the cache or disabling it in the free-threaded build " "if the cache is not critical for performance." msgstr "" -#: ../../howto/free-threading-extensions.rst:240 +#: ../../howto/free-threading-extensions.rst:248 msgid "" "**Global State**: global state may need to be protected by a lock or moved " "to thread local storage. C11 and C++11 provide the ``thread_local`` or " @@ -400,11 +412,11 @@ msgid "" "language/storage_duration>`_." msgstr "" -#: ../../howto/free-threading-extensions.rst:247 +#: ../../howto/free-threading-extensions.rst:255 msgid "Critical Sections" msgstr "" -#: ../../howto/free-threading-extensions.rst:251 +#: ../../howto/free-threading-extensions.rst:259 msgid "" "In the free-threaded build, CPython provides a mechanism called \"critical " "sections\" to protect data that would otherwise be protected by the GIL. " @@ -413,11 +425,11 @@ msgid "" "certain C API functions or managing shared state in the free-threaded build." msgstr "" -#: ../../howto/free-threading-extensions.rst:258 +#: ../../howto/free-threading-extensions.rst:266 msgid "What Are Critical Sections?" msgstr "" -#: ../../howto/free-threading-extensions.rst:260 +#: ../../howto/free-threading-extensions.rst:268 msgid "" "Conceptually, critical sections act as a deadlock avoidance layer built on " "top of simple mutexes. Each thread maintains a stack of active critical " @@ -427,27 +439,27 @@ msgid "" "the underlying mutex." msgstr "" -#: ../../howto/free-threading-extensions.rst:268 +#: ../../howto/free-threading-extensions.rst:276 msgid "Using Critical Sections" msgstr "" -#: ../../howto/free-threading-extensions.rst:270 +#: ../../howto/free-threading-extensions.rst:278 msgid "The primary APIs for using critical sections are:" msgstr "" -#: ../../howto/free-threading-extensions.rst:272 +#: ../../howto/free-threading-extensions.rst:280 msgid "" ":c:macro:`Py_BEGIN_CRITICAL_SECTION` and :c:macro:`Py_END_CRITICAL_SECTION` " "- For locking a single object" msgstr "" -#: ../../howto/free-threading-extensions.rst:275 +#: ../../howto/free-threading-extensions.rst:283 msgid "" ":c:macro:`Py_BEGIN_CRITICAL_SECTION2` and :c:macro:" "`Py_END_CRITICAL_SECTION2` - For locking two objects simultaneously" msgstr "" -#: ../../howto/free-threading-extensions.rst:278 +#: ../../howto/free-threading-extensions.rst:286 msgid "" "These macros must be used in matching pairs and must appear in the same C " "scope, since they establish a new local scope. These macros are no-ops in " @@ -455,7 +467,7 @@ msgid "" "support both build types." msgstr "" -#: ../../howto/free-threading-extensions.rst:283 +#: ../../howto/free-threading-extensions.rst:291 msgid "" "A common use of a critical section would be to lock an object while " "accessing an internal attribute of it. For example, if an extension type " @@ -463,7 +475,7 @@ msgid "" "or writing that field::" msgstr "" -#: ../../howto/free-threading-extensions.rst:288 +#: ../../howto/free-threading-extensions.rst:296 msgid "" "// read the count, returns new reference to internal count value\n" "PyObject *result;\n" @@ -478,11 +490,11 @@ msgid "" "Py_END_CRITICAL_SECTION();" msgstr "" -#: ../../howto/free-threading-extensions.rst:302 +#: ../../howto/free-threading-extensions.rst:310 msgid "How Critical Sections Work" msgstr "" -#: ../../howto/free-threading-extensions.rst:304 +#: ../../howto/free-threading-extensions.rst:312 msgid "" "Unlike traditional locks, critical sections do not guarantee exclusive " "access throughout their entire duration. If a thread would block while " @@ -491,51 +503,51 @@ msgid "" "then resumed when the blocking operation completes." msgstr "" -#: ../../howto/free-threading-extensions.rst:310 +#: ../../howto/free-threading-extensions.rst:318 msgid "" "This behavior is similar to what happens with the GIL when a thread makes a " "blocking call. The key differences are:" msgstr "" -#: ../../howto/free-threading-extensions.rst:313 +#: ../../howto/free-threading-extensions.rst:321 msgid "Critical sections operate on a per-object basis rather than globally" msgstr "" -#: ../../howto/free-threading-extensions.rst:315 +#: ../../howto/free-threading-extensions.rst:323 msgid "" "Critical sections follow a stack discipline within each thread (the " "\"begin\" and \"end\" macros enforce this since they must be paired and " "within the same scope)" msgstr "" -#: ../../howto/free-threading-extensions.rst:318 +#: ../../howto/free-threading-extensions.rst:326 msgid "" "Critical sections automatically release and reacquire locks around potential " "blocking operations" msgstr "" -#: ../../howto/free-threading-extensions.rst:322 +#: ../../howto/free-threading-extensions.rst:330 msgid "Deadlock Avoidance" msgstr "" -#: ../../howto/free-threading-extensions.rst:324 +#: ../../howto/free-threading-extensions.rst:332 msgid "Critical sections help avoid deadlocks in two ways:" msgstr "" -#: ../../howto/free-threading-extensions.rst:326 +#: ../../howto/free-threading-extensions.rst:334 msgid "" "If a thread tries to acquire a lock that's already held by another thread, " "it first suspends all of its active critical sections, temporarily releasing " "their locks" msgstr "" -#: ../../howto/free-threading-extensions.rst:330 +#: ../../howto/free-threading-extensions.rst:338 msgid "" "When the blocking operation completes, only the top-most critical section is " "reacquired first" msgstr "" -#: ../../howto/free-threading-extensions.rst:333 +#: ../../howto/free-threading-extensions.rst:341 msgid "" "This means you cannot rely on nested critical sections to lock multiple " "objects at once, as the inner critical section may suspend the outer ones. " @@ -543,7 +555,7 @@ msgid "" "simultaneously." msgstr "" -#: ../../howto/free-threading-extensions.rst:337 +#: ../../howto/free-threading-extensions.rst:345 msgid "" "Note that the locks described above are only :c:type:`!PyMutex` based locks. " "The critical section implementation does not know about or affect other " @@ -554,18 +566,18 @@ msgid "" "not be released and therefore does not get the same deadlock avoidance." msgstr "" -#: ../../howto/free-threading-extensions.rst:346 +#: ../../howto/free-threading-extensions.rst:354 msgid "Important Considerations" msgstr "" -#: ../../howto/free-threading-extensions.rst:348 +#: ../../howto/free-threading-extensions.rst:356 msgid "" "Critical sections may temporarily release their locks, allowing other " "threads to modify the protected data. Be careful about making assumptions " "about the state of the data after operations that might block." msgstr "" -#: ../../howto/free-threading-extensions.rst:352 +#: ../../howto/free-threading-extensions.rst:360 msgid "" "Because locks can be temporarily released (suspended), entering a critical " "section does not guarantee exclusive access to the protected resource " @@ -575,34 +587,34 @@ msgid "" "This is similar to how the GIL can be released during blocking calls." msgstr "" -#: ../../howto/free-threading-extensions.rst:359 +#: ../../howto/free-threading-extensions.rst:367 msgid "" "Only the lock(s) associated with the most recently entered (top-most) " "critical section are guaranteed to be held at any given time. Locks for " "outer, nested critical sections might have been suspended." msgstr "" -#: ../../howto/free-threading-extensions.rst:363 +#: ../../howto/free-threading-extensions.rst:371 msgid "" "You can lock at most two objects simultaneously with these APIs. If you need " "to lock more objects, you'll need to restructure your code." msgstr "" -#: ../../howto/free-threading-extensions.rst:366 +#: ../../howto/free-threading-extensions.rst:374 msgid "" "While critical sections will not deadlock if you attempt to lock the same " "object twice, they are less efficient than purpose-built reentrant locks for " "this use case." msgstr "" -#: ../../howto/free-threading-extensions.rst:370 +#: ../../howto/free-threading-extensions.rst:378 msgid "" "When using :c:macro:`Py_BEGIN_CRITICAL_SECTION2`, the order of the objects " "doesn't affect correctness (the implementation handles deadlock avoidance), " "but it's good practice to always lock objects in a consistent order." msgstr "" -#: ../../howto/free-threading-extensions.rst:374 +#: ../../howto/free-threading-extensions.rst:382 msgid "" "Remember that the critical section macros are primarily for protecting " "access to *Python objects* that might be involved in internal CPython " @@ -611,34 +623,34 @@ msgid "" "synchronization primitives might be more appropriate." msgstr "" -#: ../../howto/free-threading-extensions.rst:382 +#: ../../howto/free-threading-extensions.rst:390 msgid "Building Extensions for the Free-Threaded Build" msgstr "" -#: ../../howto/free-threading-extensions.rst:384 +#: ../../howto/free-threading-extensions.rst:392 msgid "" "C API extensions need to be built specifically for the free-threaded build. " "The wheels, shared libraries, and binaries are indicated by a ``t`` suffix." msgstr "" -#: ../../howto/free-threading-extensions.rst:387 +#: ../../howto/free-threading-extensions.rst:395 msgid "" "`pypa/manylinux `_ supports the free-" "threaded build, with the ``t`` suffix, such as ``python3.13t``." msgstr "" -#: ../../howto/free-threading-extensions.rst:389 +#: ../../howto/free-threading-extensions.rst:397 msgid "" "`pypa/cibuildwheel `_ supports the " -"free-threaded build if you set `CIBW_FREE_THREADED_SUPPORT `_." +"free-threaded build if you set `CIBW_ENABLE to cpython-freethreading " +"`_." msgstr "" -#: ../../howto/free-threading-extensions.rst:394 +#: ../../howto/free-threading-extensions.rst:402 msgid "Limited C API and Stable ABI" msgstr "" -#: ../../howto/free-threading-extensions.rst:396 +#: ../../howto/free-threading-extensions.rst:404 msgid "" "The free-threaded build does not currently support the :ref:`Limited C API " "` or the stable ABI. If you use `setuptools `_: A community-maintained porting guide for " diff --git a/howto/free-threading-python.po b/howto/free-threading-python.po index 7eb1e897b..18e161270 100644 --- a/howto/free-threading-python.po +++ b/howto/free-threading-python.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-10-04 14:19+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -23,76 +24,79 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #: ../../howto/free-threading-python.rst:5 -msgid "Python experimental support for free threading" +msgid "Python support for free threading" msgstr "" #: ../../howto/free-threading-python.rst:7 msgid "" -"Starting with the 3.13 release, CPython has experimental support for a build " -"of Python called :term:`free threading` where the :term:`global interpreter " -"lock` (GIL) is disabled. Free-threaded execution allows for full " -"utilization of the available processing power by running threads in parallel " -"on available CPU cores. While not all software will benefit from this " -"automatically, programs designed with threading in mind will run faster on " -"multi-core hardware." +"Starting with the 3.13 release, CPython has support for a build of Python " +"called :term:`free threading` where the :term:`global interpreter lock` " +"(GIL) is disabled. Free-threaded execution allows for full utilization of " +"the available processing power by running threads in parallel on available " +"CPU cores. While not all software will benefit from this automatically, " +"programs designed with threading in mind will run faster on multi-core " +"hardware." msgstr "" #: ../../howto/free-threading-python.rst:14 msgid "" -"**The free-threaded mode is experimental** and work is ongoing to improve " -"it: expect some bugs and a substantial single-threaded performance hit." +"The free-threaded mode is working and continues to be improved, but there is " +"some additional overhead in single-threaded workloads compared to the " +"regular build. Additionally, third-party packages, in particular ones with " +"an :term:`extension module`, may not be ready for use in a free-threaded " +"build, and will re-enable the :term:`GIL`." msgstr "" -#: ../../howto/free-threading-python.rst:17 +#: ../../howto/free-threading-python.rst:20 msgid "" "This document describes the implications of free threading for Python code. " "See :ref:`freethreading-extensions-howto` for information on how to write C " "extensions that support the free-threaded build." msgstr "" -#: ../../howto/free-threading-python.rst:23 +#: ../../howto/free-threading-python.rst:26 msgid "" ":pep:`703` – Making the Global Interpreter Lock Optional in CPython for an " "overall description of free-threaded Python." msgstr "" -#: ../../howto/free-threading-python.rst:28 +#: ../../howto/free-threading-python.rst:31 msgid "Installation" msgstr "" -#: ../../howto/free-threading-python.rst:30 +#: ../../howto/free-threading-python.rst:33 msgid "" "Starting with Python 3.13, the official macOS and Windows installers " "optionally support installing free-threaded Python binaries. The installers " "are available at https://www.python.org/downloads/." msgstr "" -#: ../../howto/free-threading-python.rst:34 +#: ../../howto/free-threading-python.rst:37 msgid "" "For information on other platforms, see the `Installing a Free-Threaded " -"Python `_, a " +"Python `_, a " "community-maintained installation guide for installing free-threaded Python." msgstr "" -#: ../../howto/free-threading-python.rst:38 +#: ../../howto/free-threading-python.rst:41 msgid "" "When building CPython from source, the :option:`--disable-gil` configure " "option should be used to build a free-threaded Python interpreter." msgstr "" -#: ../../howto/free-threading-python.rst:43 +#: ../../howto/free-threading-python.rst:46 msgid "Identifying free-threaded Python" msgstr "" -#: ../../howto/free-threading-python.rst:45 +#: ../../howto/free-threading-python.rst:48 msgid "" "To check if the current interpreter supports free-threading, :option:`python " -"-VV <-V>` and :data:`sys.version` contain \"experimental free-threading " -"build\". The new :func:`sys._is_gil_enabled` function can be used to check " -"whether the GIL is actually disabled in the running process." +"-VV <-V>` and :data:`sys.version` contain \"free-threading build\". The new :" +"func:`sys._is_gil_enabled` function can be used to check whether the GIL is " +"actually disabled in the running process." msgstr "" -#: ../../howto/free-threading-python.rst:50 +#: ../../howto/free-threading-python.rst:53 msgid "" "The ``sysconfig.get_config_var(\"Py_GIL_DISABLED\")`` configuration variable " "can be used to determine whether the build supports free threading. If the " @@ -100,43 +104,43 @@ msgid "" "the recommended mechanism for decisions related to the build configuration." msgstr "" -#: ../../howto/free-threading-python.rst:57 +#: ../../howto/free-threading-python.rst:60 msgid "The global interpreter lock in free-threaded Python" msgstr "" -#: ../../howto/free-threading-python.rst:59 +#: ../../howto/free-threading-python.rst:62 msgid "" "Free-threaded builds of CPython support optionally running with the GIL " "enabled at runtime using the environment variable :envvar:`PYTHON_GIL` or " "the command-line option :option:`-X gil`." msgstr "" -#: ../../howto/free-threading-python.rst:63 +#: ../../howto/free-threading-python.rst:66 msgid "" "The GIL may also automatically be enabled when importing a C-API extension " "module that is not explicitly marked as supporting free threading. A " "warning will be printed in this case." msgstr "" -#: ../../howto/free-threading-python.rst:67 +#: ../../howto/free-threading-python.rst:70 msgid "" "In addition to individual package documentation, the following websites " "track the status of popular packages support for free threading:" msgstr "" -#: ../../howto/free-threading-python.rst:70 +#: ../../howto/free-threading-python.rst:73 msgid "https://py-free-threading.github.io/tracking/" msgstr "" -#: ../../howto/free-threading-python.rst:71 +#: ../../howto/free-threading-python.rst:74 msgid "https://hugovk.github.io/free-threaded-wheels/" msgstr "" -#: ../../howto/free-threading-python.rst:75 +#: ../../howto/free-threading-python.rst:78 msgid "Thread safety" msgstr "" -#: ../../howto/free-threading-python.rst:77 +#: ../../howto/free-threading-python.rst:80 msgid "" "The free-threaded build of CPython aims to provide similar thread-safety " "behavior at the Python level to the default GIL-enabled build. Built-in " @@ -148,27 +152,27 @@ msgid "" "current or future behavior." msgstr "" -#: ../../howto/free-threading-python.rst:88 +#: ../../howto/free-threading-python.rst:91 msgid "" "It's recommended to use the :class:`threading.Lock` or other synchronization " "primitives instead of relying on the internal locks of built-in types, when " "possible." msgstr "" -#: ../../howto/free-threading-python.rst:94 +#: ../../howto/free-threading-python.rst:97 msgid "Known limitations" msgstr "" -#: ../../howto/free-threading-python.rst:96 +#: ../../howto/free-threading-python.rst:99 msgid "" "This section describes known limitations of the free-threaded CPython build." msgstr "" -#: ../../howto/free-threading-python.rst:99 +#: ../../howto/free-threading-python.rst:102 msgid "Immortalization" msgstr "" -#: ../../howto/free-threading-python.rst:101 +#: ../../howto/free-threading-python.rst:104 msgid "" "The free-threaded build of the 3.13 release makes some objects :term:" "`immortal`. Immortal objects are not deallocated and have reference counts " @@ -176,53 +180,53 @@ msgid "" "that would prevent efficient multi-threaded scaling." msgstr "" -#: ../../howto/free-threading-python.rst:106 +#: ../../howto/free-threading-python.rst:109 msgid "" "An object will be made immortal when a new thread is started for the first " "time after the main thread is running. The following objects are " "immortalized:" msgstr "" -#: ../../howto/free-threading-python.rst:109 +#: ../../howto/free-threading-python.rst:112 msgid "" ":ref:`function ` objects declared at the module level" msgstr "" -#: ../../howto/free-threading-python.rst:110 +#: ../../howto/free-threading-python.rst:113 msgid ":ref:`method ` descriptors" msgstr "" -#: ../../howto/free-threading-python.rst:111 +#: ../../howto/free-threading-python.rst:114 msgid ":ref:`code ` objects" msgstr "" -#: ../../howto/free-threading-python.rst:112 +#: ../../howto/free-threading-python.rst:115 msgid ":term:`module` objects and their dictionaries" msgstr "" -#: ../../howto/free-threading-python.rst:113 +#: ../../howto/free-threading-python.rst:116 msgid ":ref:`classes ` (type objects)" msgstr "" -#: ../../howto/free-threading-python.rst:115 +#: ../../howto/free-threading-python.rst:118 msgid "" "Because immortal objects are never deallocated, applications that create " "many objects of these types may see increased memory usage. This is " "expected to be addressed in the 3.14 release." msgstr "" -#: ../../howto/free-threading-python.rst:119 +#: ../../howto/free-threading-python.rst:122 msgid "" "Additionally, numeric and string literals in the code as well as strings " "returned by :func:`sys.intern` are also immortalized. This behavior is " "expected to remain in the 3.14 free-threaded build." msgstr "" -#: ../../howto/free-threading-python.rst:125 +#: ../../howto/free-threading-python.rst:128 msgid "Frame objects" msgstr "" -#: ../../howto/free-threading-python.rst:127 +#: ../../howto/free-threading-python.rst:130 msgid "" "It is not safe to access :ref:`frame ` objects from other " "threads and doing so may cause your program to crash . This means that :" @@ -232,22 +236,22 @@ msgid "" "passed to another thread." msgstr "" -#: ../../howto/free-threading-python.rst:135 +#: ../../howto/free-threading-python.rst:138 msgid "Iterators" msgstr "" -#: ../../howto/free-threading-python.rst:137 +#: ../../howto/free-threading-python.rst:140 msgid "" "Sharing the same iterator object between multiple threads is generally not " "safe and threads may see duplicate or missing elements when iterating or " "crash the interpreter." msgstr "" -#: ../../howto/free-threading-python.rst:143 +#: ../../howto/free-threading-python.rst:146 msgid "Single-threaded performance" msgstr "" -#: ../../howto/free-threading-python.rst:145 +#: ../../howto/free-threading-python.rst:148 msgid "" "The free-threaded build has additional overhead when executing Python code " "compared to the default GIL-enabled build. In 3.13, this overhead is about " @@ -261,21 +265,21 @@ msgid "" "GIL-enabled build." msgstr "" -#: ../../howto/free-threading-python.rst:158 +#: ../../howto/free-threading-python.rst:161 msgid "Behavioral changes" msgstr "" -#: ../../howto/free-threading-python.rst:160 +#: ../../howto/free-threading-python.rst:163 msgid "" "This section describes CPython behavioural changes with the free-threaded " "build." msgstr "" -#: ../../howto/free-threading-python.rst:165 +#: ../../howto/free-threading-python.rst:168 msgid "Context variables" msgstr "" -#: ../../howto/free-threading-python.rst:167 +#: ../../howto/free-threading-python.rst:170 msgid "" "In the free-threaded build, the flag :data:`~sys.flags." "thread_inherit_context` is set to true by default which causes threads " @@ -285,11 +289,11 @@ msgid "" "start with an empty :class:`~contextvars.Context()`." msgstr "" -#: ../../howto/free-threading-python.rst:177 +#: ../../howto/free-threading-python.rst:180 msgid "Warning filters" msgstr "" -#: ../../howto/free-threading-python.rst:179 +#: ../../howto/free-threading-python.rst:182 msgid "" "In the free-threaded build, the flag :data:`~sys.flags." "context_aware_warnings` is set to true by default. In the default GIL-" diff --git a/howto/functional.po b/howto/functional.po index 3c65fc5ab..8c3052217 100644 --- a/howto/functional.po +++ b/howto/functional.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:53+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -828,7 +829,7 @@ msgstr "" #: ../../howto/functional.rst:605 msgid "" -":meth:`~generator.close` raises a :exc:`GeneratorExit` exception inside the " +":meth:`~generator.close` sends a :exc:`GeneratorExit` exception to the " "generator to terminate the iteration. On receiving this exception, the " "generator's code must either raise :exc:`GeneratorExit` or :exc:" "`StopIteration`; catching the exception and doing anything else is illegal " @@ -1761,7 +1762,7 @@ msgstr "" #: ../../howto/functional.rst:1220 msgid "" -"https://www.defmacro.org/ramblings/fp.html: A general introduction to " +"https://defmacro.org/2006/06/19/fp.html: A general introduction to " "functional programming that uses Java examples and has a lengthy historical " "introduction." msgstr "" diff --git a/howto/gdb_helpers.po b/howto/gdb_helpers.po index b9c5c0538..63ad26f90 100644 --- a/howto/gdb_helpers.po +++ b/howto/gdb_helpers.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-02-25 01:11+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/howto/index.po b/howto/index.po index fba68a4c0..b25416ee8 100644 --- a/howto/index.po +++ b/howto/index.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:53+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/howto/instrumentation.po b/howto/instrumentation.po index 75d9538c4..a1c266f5e 100644 --- a/howto/instrumentation.po +++ b/howto/instrumentation.po @@ -6,15 +6,16 @@ # Translators: # Danial Behzadi , 2025 # Parham Forati, 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:53+0000\n" -"Last-Translator: Parham Forati, 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/howto/ipaddress.po b/howto/ipaddress.po index 35704d9a4..b0a35be06 100644 --- a/howto/ipaddress.po +++ b/howto/ipaddress.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:53+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/howto/isolating-extensions.po b/howto/isolating-extensions.po index 343652d2a..1624607c1 100644 --- a/howto/isolating-extensions.po +++ b/howto/isolating-extensions.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2022-11-05 19:48+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -260,8 +261,8 @@ msgstr "" msgid "" "If it is necessary to use process-global state, the simplest way to avoid " "issues with multiple interpreters is to explicitly prevent a module from " -"being loaded more than once per process—see `Opt-Out: Limiting to One Module " -"Object per Process`_." +"being loaded more than once per process—see :ref:`isolating-extensions-" +"optout`." msgstr "" #: ../../howto/isolating-extensions.rst:175 @@ -317,11 +318,11 @@ msgid "" "c>`__; example module initialization shown at the bottom of the file." msgstr "" -#: ../../howto/isolating-extensions.rst:211 +#: ../../howto/isolating-extensions.rst:213 msgid "Opt-Out: Limiting to One Module Object per Process" msgstr "" -#: ../../howto/isolating-extensions.rst:213 +#: ../../howto/isolating-extensions.rst:215 msgid "" "A non-negative ``PyModuleDef.m_size`` signals that a module supports " "multiple interpreters correctly. If this is not yet the case for your " @@ -329,35 +330,51 @@ msgid "" "For example::" msgstr "" -#: ../../howto/isolating-extensions.rst:218 +#: ../../howto/isolating-extensions.rst:220 msgid "" +"// A process-wide flag\n" "static int loaded = 0;\n" "\n" +"// Mutex to provide thread safety (only needed for free-threaded Python)\n" +"static PyMutex modinit_mutex = {0};\n" +"\n" "static int\n" "exec_module(PyObject* module)\n" "{\n" +" PyMutex_Lock(&modinit_mutex);\n" " if (loaded) {\n" +" PyMutex_Unlock(&modinit_mutex);\n" " PyErr_SetString(PyExc_ImportError,\n" " \"cannot load module more than once per process\");\n" " return -1;\n" " }\n" " loaded = 1;\n" +" PyMutex_Unlock(&modinit_mutex);\n" " // ... rest of initialization\n" "}" msgstr "" -#: ../../howto/isolating-extensions.rst:234 +#: ../../howto/isolating-extensions.rst:242 +msgid "" +"If your module's :c:member:`PyModuleDef.m_clear` function is able to prepare " +"for future re-initialization, it should clear the ``loaded`` flag. In this " +"case, your module won't support multiple instances existing *concurrently*, " +"but it will, for example, support being loaded after Python runtime shutdown " +"(:c:func:`Py_FinalizeEx`) and re-initialization (:c:func:`Py_Initialize`)." +msgstr "" + +#: ../../howto/isolating-extensions.rst:251 msgid "Module State Access from Functions" msgstr "" -#: ../../howto/isolating-extensions.rst:236 +#: ../../howto/isolating-extensions.rst:253 msgid "" "Accessing the state from module-level functions is straightforward. " "Functions get the module object as their first argument; for extracting the " "state, you can use ``PyModule_GetState``::" msgstr "" -#: ../../howto/isolating-extensions.rst:240 +#: ../../howto/isolating-extensions.rst:257 msgid "" "static PyObject *\n" "func(PyObject *module, PyObject *args)\n" @@ -370,25 +387,25 @@ msgid "" "}" msgstr "" -#: ../../howto/isolating-extensions.rst:251 +#: ../../howto/isolating-extensions.rst:268 msgid "" "``PyModule_GetState`` may return ``NULL`` without setting an exception if " "there is no module state, i.e. ``PyModuleDef.m_size`` was zero. In your own " "module, you're in control of ``m_size``, so this is easy to prevent." msgstr "" -#: ../../howto/isolating-extensions.rst:258 +#: ../../howto/isolating-extensions.rst:275 msgid "Heap Types" msgstr "" -#: ../../howto/isolating-extensions.rst:260 +#: ../../howto/isolating-extensions.rst:277 msgid "" "Traditionally, types defined in C code are *static*; that is, ``static " "PyTypeObject`` structures defined directly in code and initialized using " "``PyType_Ready()``." msgstr "" -#: ../../howto/isolating-extensions.rst:264 +#: ../../howto/isolating-extensions.rst:281 msgid "" "Such types are necessarily shared across the process. Sharing them between " "module objects requires paying attention to any state they own or access. To " @@ -396,7 +413,7 @@ msgid "" "for example, you can't set ``str.myattribute = 123``." msgstr "" -#: ../../howto/isolating-extensions.rst:270 +#: ../../howto/isolating-extensions.rst:287 msgid "" "Sharing truly immutable objects between interpreters is fine, as long as " "they don't provide access to mutable objects. However, in CPython, every " @@ -406,7 +423,7 @@ msgid "" "process-wide GIL." msgstr "" -#: ../../howto/isolating-extensions.rst:277 +#: ../../howto/isolating-extensions.rst:294 msgid "" "Because they are immutable and process-global, static types cannot access " "\"their\" module state. If any method of such a type requires access to " @@ -415,15 +432,15 @@ msgid "" "Python's ``class`` statement." msgstr "" -#: ../../howto/isolating-extensions.rst:284 +#: ../../howto/isolating-extensions.rst:301 msgid "For new modules, using heap types by default is a good rule of thumb." msgstr "" -#: ../../howto/isolating-extensions.rst:288 +#: ../../howto/isolating-extensions.rst:305 msgid "Changing Static Types to Heap Types" msgstr "" -#: ../../howto/isolating-extensions.rst:290 +#: ../../howto/isolating-extensions.rst:307 msgid "" "Static types can be converted to heap types, but note that the heap type API " "was not designed for \"lossless\" conversion from static types—that is, " @@ -433,101 +450,101 @@ msgid "" "slots). Always test the details that are important to you." msgstr "" -#: ../../howto/isolating-extensions.rst:299 +#: ../../howto/isolating-extensions.rst:316 msgid "" "Watch out for the following two points in particular (but note that this is " "not a comprehensive list):" msgstr "" -#: ../../howto/isolating-extensions.rst:302 +#: ../../howto/isolating-extensions.rst:319 msgid "" "Unlike static types, heap type objects are mutable by default. Use the :c:" "macro:`Py_TPFLAGS_IMMUTABLETYPE` flag to prevent mutability." msgstr "" -#: ../../howto/isolating-extensions.rst:304 +#: ../../howto/isolating-extensions.rst:321 msgid "" "Heap types inherit :c:member:`~PyTypeObject.tp_new` by default, so it may " "become possible to instantiate them from Python code. You can prevent this " "with the :c:macro:`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag." msgstr "" -#: ../../howto/isolating-extensions.rst:310 +#: ../../howto/isolating-extensions.rst:327 msgid "Defining Heap Types" msgstr "" -#: ../../howto/isolating-extensions.rst:312 +#: ../../howto/isolating-extensions.rst:329 msgid "" "Heap types can be created by filling a :c:struct:`PyType_Spec` structure, a " "description or \"blueprint\" of a class, and calling :c:func:" "`PyType_FromModuleAndSpec` to construct a new class object." msgstr "" -#: ../../howto/isolating-extensions.rst:317 +#: ../../howto/isolating-extensions.rst:334 msgid "" "Other functions, like :c:func:`PyType_FromSpec`, can also create heap types, " "but :c:func:`PyType_FromModuleAndSpec` associates the module with the class, " "allowing access to the module state from methods." msgstr "" -#: ../../howto/isolating-extensions.rst:321 +#: ../../howto/isolating-extensions.rst:338 msgid "" "The class should generally be stored in *both* the module state (for safe " "access from C) and the module's ``__dict__`` (for access from Python code)." msgstr "" -#: ../../howto/isolating-extensions.rst:327 +#: ../../howto/isolating-extensions.rst:344 msgid "Garbage-Collection Protocol" msgstr "" -#: ../../howto/isolating-extensions.rst:329 +#: ../../howto/isolating-extensions.rst:346 msgid "" "Instances of heap types hold a reference to their type. This ensures that " "the type isn't destroyed before all its instances are, but may result in " "reference cycles that need to be broken by the garbage collector." msgstr "" -#: ../../howto/isolating-extensions.rst:334 +#: ../../howto/isolating-extensions.rst:351 msgid "" "To avoid memory leaks, instances of heap types must implement the garbage " "collection protocol. That is, heap types should:" msgstr "" -#: ../../howto/isolating-extensions.rst:338 +#: ../../howto/isolating-extensions.rst:355 msgid "Have the :c:macro:`Py_TPFLAGS_HAVE_GC` flag." msgstr "" -#: ../../howto/isolating-extensions.rst:339 +#: ../../howto/isolating-extensions.rst:356 msgid "" "Define a traverse function using ``Py_tp_traverse``, which visits the type " "(e.g. using ``Py_VISIT(Py_TYPE(self))``)." msgstr "" -#: ../../howto/isolating-extensions.rst:342 +#: ../../howto/isolating-extensions.rst:359 msgid "" "Please refer to the documentation of :c:macro:`Py_TPFLAGS_HAVE_GC` and :c:" "member:`~PyTypeObject.tp_traverse` for additional considerations." msgstr "" -#: ../../howto/isolating-extensions.rst:346 +#: ../../howto/isolating-extensions.rst:363 msgid "" "The API for defining heap types grew organically, leaving it somewhat " "awkward to use in its current state. The following sections will guide you " "through common issues." msgstr "" -#: ../../howto/isolating-extensions.rst:352 +#: ../../howto/isolating-extensions.rst:369 msgid "``tp_traverse`` in Python 3.8 and lower" msgstr "" -#: ../../howto/isolating-extensions.rst:354 +#: ../../howto/isolating-extensions.rst:371 msgid "" "The requirement to visit the type from ``tp_traverse`` was added in Python " "3.9. If you support Python 3.8 and lower, the traverse function must *not* " "visit the type, so it must be more complicated::" msgstr "" -#: ../../howto/isolating-extensions.rst:358 +#: ../../howto/isolating-extensions.rst:375 msgid "" "static int my_traverse(PyObject *self, visitproc visit, void *arg)\n" "{\n" @@ -538,27 +555,27 @@ msgid "" "}" msgstr "" -#: ../../howto/isolating-extensions.rst:366 +#: ../../howto/isolating-extensions.rst:383 msgid "" "Unfortunately, :c:data:`Py_Version` was only added in Python 3.11. As a " "replacement, use:" msgstr "" -#: ../../howto/isolating-extensions.rst:369 +#: ../../howto/isolating-extensions.rst:386 msgid ":c:macro:`PY_VERSION_HEX`, if not using the stable ABI, or" msgstr "" -#: ../../howto/isolating-extensions.rst:370 +#: ../../howto/isolating-extensions.rst:387 msgid "" ":py:data:`sys.version_info` (via :c:func:`PySys_GetObject` and :c:func:" "`PyArg_ParseTuple`)." msgstr "" -#: ../../howto/isolating-extensions.rst:375 +#: ../../howto/isolating-extensions.rst:392 msgid "Delegating ``tp_traverse``" msgstr "" -#: ../../howto/isolating-extensions.rst:377 +#: ../../howto/isolating-extensions.rst:394 msgid "" "If your traverse function delegates to the :c:member:`~PyTypeObject." "tp_traverse` of its base class (or another type), ensure that " @@ -566,19 +583,19 @@ msgid "" "expected to visit the type in ``tp_traverse``." msgstr "" -#: ../../howto/isolating-extensions.rst:382 +#: ../../howto/isolating-extensions.rst:399 msgid "For example, if your traverse function includes::" msgstr "" -#: ../../howto/isolating-extensions.rst:384 +#: ../../howto/isolating-extensions.rst:401 msgid "base->tp_traverse(self, visit, arg)" msgstr "" -#: ../../howto/isolating-extensions.rst:386 +#: ../../howto/isolating-extensions.rst:403 msgid "...and ``base`` may be a static type, then it should also include::" msgstr "" -#: ../../howto/isolating-extensions.rst:388 +#: ../../howto/isolating-extensions.rst:405 msgid "" "if (base->tp_flags & Py_TPFLAGS_HEAPTYPE) {\n" " // a heap type's tp_traverse already visited Py_TYPE(self)\n" @@ -589,38 +606,38 @@ msgid "" "}" msgstr "" -#: ../../howto/isolating-extensions.rst:396 +#: ../../howto/isolating-extensions.rst:413 msgid "" "It is not necessary to handle the type's reference count in :c:member:" "`~PyTypeObject.tp_new` and :c:member:`~PyTypeObject.tp_clear`." msgstr "" -#: ../../howto/isolating-extensions.rst:401 +#: ../../howto/isolating-extensions.rst:418 msgid "Defining ``tp_dealloc``" msgstr "" -#: ../../howto/isolating-extensions.rst:403 +#: ../../howto/isolating-extensions.rst:420 msgid "" "If your type has a custom :c:member:`~PyTypeObject.tp_dealloc` function, it " "needs to:" msgstr "" -#: ../../howto/isolating-extensions.rst:406 +#: ../../howto/isolating-extensions.rst:423 msgid "" "call :c:func:`PyObject_GC_UnTrack` before any fields are invalidated, and" msgstr "" -#: ../../howto/isolating-extensions.rst:407 +#: ../../howto/isolating-extensions.rst:424 msgid "decrement the reference count of the type." msgstr "" -#: ../../howto/isolating-extensions.rst:409 +#: ../../howto/isolating-extensions.rst:426 msgid "" "To keep the type valid while ``tp_free`` is called, the type's refcount " "needs to be decremented *after* the instance is deallocated. For example::" msgstr "" -#: ../../howto/isolating-extensions.rst:412 +#: ../../howto/isolating-extensions.rst:429 msgid "" "static void my_dealloc(PyObject *self)\n" "{\n" @@ -632,81 +649,81 @@ msgid "" "}" msgstr "" -#: ../../howto/isolating-extensions.rst:421 +#: ../../howto/isolating-extensions.rst:438 msgid "" "The default ``tp_dealloc`` function does this, so if your type does *not* " "override ``tp_dealloc`` you don't need to add it." msgstr "" -#: ../../howto/isolating-extensions.rst:427 +#: ../../howto/isolating-extensions.rst:444 msgid "Not overriding ``tp_free``" msgstr "" -#: ../../howto/isolating-extensions.rst:429 +#: ../../howto/isolating-extensions.rst:446 msgid "" "The :c:member:`~PyTypeObject.tp_free` slot of a heap type must be set to :c:" "func:`PyObject_GC_Del`. This is the default; do not override it." msgstr "" -#: ../../howto/isolating-extensions.rst:435 +#: ../../howto/isolating-extensions.rst:452 msgid "Avoiding ``PyObject_New``" msgstr "" -#: ../../howto/isolating-extensions.rst:437 +#: ../../howto/isolating-extensions.rst:454 msgid "GC-tracked objects need to be allocated using GC-aware functions." msgstr "" -#: ../../howto/isolating-extensions.rst:439 -msgid "If you use use :c:func:`PyObject_New` or :c:func:`PyObject_NewVar`:" +#: ../../howto/isolating-extensions.rst:456 +msgid "If you use :c:func:`PyObject_New` or :c:func:`PyObject_NewVar`:" msgstr "" -#: ../../howto/isolating-extensions.rst:441 +#: ../../howto/isolating-extensions.rst:458 msgid "" "Get and call type's :c:member:`~PyTypeObject.tp_alloc` slot, if possible. " "That is, replace ``TYPE *o = PyObject_New(TYPE, typeobj)`` with::" msgstr "" -#: ../../howto/isolating-extensions.rst:444 +#: ../../howto/isolating-extensions.rst:461 msgid "TYPE *o = typeobj->tp_alloc(typeobj, 0);" msgstr "" -#: ../../howto/isolating-extensions.rst:446 +#: ../../howto/isolating-extensions.rst:463 msgid "" "Replace ``o = PyObject_NewVar(TYPE, typeobj, size)`` with the same, but use " "size instead of the 0." msgstr "" -#: ../../howto/isolating-extensions.rst:449 +#: ../../howto/isolating-extensions.rst:466 msgid "" "If the above is not possible (e.g. inside a custom ``tp_alloc``), call :c:" "func:`PyObject_GC_New` or :c:func:`PyObject_GC_NewVar`::" msgstr "" -#: ../../howto/isolating-extensions.rst:452 +#: ../../howto/isolating-extensions.rst:469 msgid "" "TYPE *o = PyObject_GC_New(TYPE, typeobj);\n" "\n" "TYPE *o = PyObject_GC_NewVar(TYPE, typeobj, size);" msgstr "" -#: ../../howto/isolating-extensions.rst:458 +#: ../../howto/isolating-extensions.rst:475 msgid "Module State Access from Classes" msgstr "" -#: ../../howto/isolating-extensions.rst:460 +#: ../../howto/isolating-extensions.rst:477 msgid "" "If you have a type object defined with :c:func:`PyType_FromModuleAndSpec`, " "you can call :c:func:`PyType_GetModule` to get the associated module, and " "then :c:func:`PyModule_GetState` to get the module's state." msgstr "" -#: ../../howto/isolating-extensions.rst:464 +#: ../../howto/isolating-extensions.rst:481 msgid "" "To save a some tedious error-handling boilerplate code, you can combine " "these two steps with :c:func:`PyType_GetModuleState`, resulting in::" msgstr "" -#: ../../howto/isolating-extensions.rst:467 +#: ../../howto/isolating-extensions.rst:484 msgid "" "my_struct *state = (my_struct*)PyType_GetModuleState(type);\n" "if (state == NULL) {\n" @@ -714,11 +731,11 @@ msgid "" "}" msgstr "" -#: ../../howto/isolating-extensions.rst:474 +#: ../../howto/isolating-extensions.rst:491 msgid "Module State Access from Regular Methods" msgstr "" -#: ../../howto/isolating-extensions.rst:476 +#: ../../howto/isolating-extensions.rst:493 msgid "" "Accessing the module-level state from methods of a class is somewhat more " "complicated, but is possible thanks to API introduced in Python 3.9. To get " @@ -726,27 +743,27 @@ msgid "" "module state from it." msgstr "" -#: ../../howto/isolating-extensions.rst:481 +#: ../../howto/isolating-extensions.rst:498 msgid "" "The largest roadblock is getting *the class a method was defined in*, or " "that method's \"defining class\" for short. The defining class can have a " "reference to the module it is part of." msgstr "" -#: ../../howto/isolating-extensions.rst:485 +#: ../../howto/isolating-extensions.rst:502 msgid "" "Do not confuse the defining class with ``Py_TYPE(self)``. If the method is " "called on a *subclass* of your type, ``Py_TYPE(self)`` will refer to that " "subclass, which may be defined in different module than yours." msgstr "" -#: ../../howto/isolating-extensions.rst:490 +#: ../../howto/isolating-extensions.rst:507 msgid "" "The following Python code can illustrate the concept. ``Base." "get_defining_class`` returns ``Base`` even if ``type(self) == Sub``:" msgstr "" -#: ../../howto/isolating-extensions.rst:494 +#: ../../howto/isolating-extensions.rst:511 msgid "" "class Base:\n" " def get_type_of_self(self):\n" @@ -759,7 +776,7 @@ msgid "" " pass" msgstr "" -#: ../../howto/isolating-extensions.rst:506 +#: ../../howto/isolating-extensions.rst:523 msgid "" "For a method to get its \"defining class\", it must use the :ref:" "`METH_METHOD | METH_FASTCALL | METH_KEYWORDS `__." +"Discussions about improving the situation are best held on the `discuss " +"forum under c-api tag `__." msgstr "" -#: ../../howto/isolating-extensions.rst:617 +#: ../../howto/isolating-extensions.rst:633 msgid "Per-Class Scope" msgstr "" -#: ../../howto/isolating-extensions.rst:619 +#: ../../howto/isolating-extensions.rst:635 msgid "" "It is currently (as of Python 3.11) not possible to attach state to " "individual *types* without relying on CPython implementation details (which " @@ -910,11 +926,11 @@ msgid "" "per-class scope)." msgstr "" -#: ../../howto/isolating-extensions.rst:626 +#: ../../howto/isolating-extensions.rst:642 msgid "Lossless Conversion to Heap Types" msgstr "" -#: ../../howto/isolating-extensions.rst:628 +#: ../../howto/isolating-extensions.rst:644 msgid "" "The heap type API was not designed for \"lossless\" conversion from static " "types; that is, creating a type that works exactly like a given static type." diff --git a/howto/logging-cookbook.po b/howto/logging-cookbook.po index 0bce0867f..8022b4944 100644 --- a/howto/logging-cookbook.po +++ b/howto/logging-cookbook.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:53+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -5079,11 +5080,137 @@ msgid "" "WARNING:demo:ZeroDivisionError: division by zero" msgstr "" -#: ../../howto/logging-cookbook.rst:4085 +#: ../../howto/logging-cookbook.rst:4082 +msgid "How to uniformly handle newlines in logging output" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4084 +msgid "" +"Usually, messages that are logged (say to console or file) consist of a " +"single line of text. However, sometimes there is a need to handle messages " +"with multiple lines - whether because a logging format string contains " +"newlines, or logged data contains newlines. If you want to handle such " +"messages uniformly, so that each line in the logged message appears " +"uniformly formatted as if it was logged separately, you can do this using a " +"handler mixin, as in the following snippet:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4092 +msgid "" +"# Assume this is in a module mymixins.py\n" +"import copy\n" +"\n" +"class MultilineMixin:\n" +" def emit(self, record):\n" +" s = record.getMessage()\n" +" if '\\n' not in s:\n" +" super().emit(record)\n" +" else:\n" +" lines = s.splitlines()\n" +" rec = copy.copy(record)\n" +" rec.args = None\n" +" for line in lines:\n" +" rec.msg = line\n" +" super().emit(rec)" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4110 +msgid "You can use the mixin as in the following script:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4112 +msgid "" +"import logging\n" +"\n" +"from mymixins import MultilineMixin\n" +"\n" +"logger = logging.getLogger(__name__)\n" +"\n" +"class StreamHandler(MultilineMixin, logging.StreamHandler):\n" +" pass\n" +"\n" +"if __name__ == '__main__':\n" +" logging.basicConfig(level=logging.DEBUG, format='%(asctime)s " +"%(levelname)-9s %(message)s',\n" +" handlers = [StreamHandler()])\n" +" logger.debug('Single line')\n" +" logger.debug('Multiple lines:\\nfool me once ...')\n" +" logger.debug('Another single line')\n" +" logger.debug('Multiple lines:\\n%s', 'fool me ...\\ncan\\'t get fooled " +"again')" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4131 +msgid "The script, when run, prints something like:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4133 +msgid "" +"2025-07-02 13:54:47,234 DEBUG Single line\n" +"2025-07-02 13:54:47,234 DEBUG Multiple lines:\n" +"2025-07-02 13:54:47,234 DEBUG fool me once ...\n" +"2025-07-02 13:54:47,234 DEBUG Another single line\n" +"2025-07-02 13:54:47,234 DEBUG Multiple lines:\n" +"2025-07-02 13:54:47,234 DEBUG fool me ...\n" +"2025-07-02 13:54:47,234 DEBUG can't get fooled again" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4143 +msgid "" +"If, on the other hand, you are concerned about `log injection `_, you can use a formatter which " +"escapes newlines, as per the following example:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4147 +msgid "" +"import logging\n" +"\n" +"logger = logging.getLogger(__name__)\n" +"\n" +"class EscapingFormatter(logging.Formatter):\n" +" def format(self, record):\n" +" s = super().format(record)\n" +" return s.replace('\\n', r'\\n')\n" +"\n" +"if __name__ == '__main__':\n" +" h = logging.StreamHandler()\n" +" h.setFormatter(EscapingFormatter('%(asctime)s %(levelname)-9s " +"%(message)s'))\n" +" logging.basicConfig(level=logging.DEBUG, handlers = [h])\n" +" logger.debug('Single line')\n" +" logger.debug('Multiple lines:\\nfool me once ...')\n" +" logger.debug('Another single line')\n" +" logger.debug('Multiple lines:\\n%s', 'fool me ...\\ncan\\'t get fooled " +"again')" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4167 +msgid "" +"You can, of course, use whatever escaping scheme makes the most sense for " +"you. The script, when run, should produce output like this:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4170 +msgid "" +"2025-07-09 06:47:33,783 DEBUG Single line\n" +"2025-07-09 06:47:33,783 DEBUG Multiple lines:\\nfool me once ...\n" +"2025-07-09 06:47:33,783 DEBUG Another single line\n" +"2025-07-09 06:47:33,783 DEBUG Multiple lines:\\nfool me ...\\ncan't get " +"fooled again" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4177 +msgid "" +"Escaping behaviour can't be the stdlib default , as it would break backwards " +"compatibility." +msgstr "" + +#: ../../howto/logging-cookbook.rst:4183 msgid "Patterns to avoid" msgstr "" -#: ../../howto/logging-cookbook.rst:4087 +#: ../../howto/logging-cookbook.rst:4185 msgid "" "Although the preceding sections have described ways of doing things you " "might need to do or deal with, it is worth mentioning some usage patterns " @@ -5091,11 +5218,11 @@ msgid "" "The following sections are in no particular order." msgstr "" -#: ../../howto/logging-cookbook.rst:4093 +#: ../../howto/logging-cookbook.rst:4191 msgid "Opening the same log file multiple times" msgstr "" -#: ../../howto/logging-cookbook.rst:4095 +#: ../../howto/logging-cookbook.rst:4193 msgid "" "On Windows, you will generally not be able to open the same file multiple " "times as this will lead to a \"file is in use by another process\" error. " @@ -5103,32 +5230,32 @@ msgid "" "file multiple times. This could be done accidentally, for example by:" msgstr "" -#: ../../howto/logging-cookbook.rst:4100 +#: ../../howto/logging-cookbook.rst:4198 msgid "" "Adding a file handler more than once which references the same file (e.g. by " "a copy/paste/forget-to-change error)." msgstr "" -#: ../../howto/logging-cookbook.rst:4103 +#: ../../howto/logging-cookbook.rst:4201 msgid "" "Opening two files that look different, as they have different names, but are " "the same because one is a symbolic link to the other." msgstr "" -#: ../../howto/logging-cookbook.rst:4106 +#: ../../howto/logging-cookbook.rst:4204 msgid "" "Forking a process, following which both parent and child have a reference to " "the same file. This might be through use of the :mod:`multiprocessing` " "module, for example." msgstr "" -#: ../../howto/logging-cookbook.rst:4110 +#: ../../howto/logging-cookbook.rst:4208 msgid "" "Opening a file multiple times might *appear* to work most of the time, but " "can lead to a number of problems in practice:" msgstr "" -#: ../../howto/logging-cookbook.rst:4113 +#: ../../howto/logging-cookbook.rst:4211 msgid "" "Logging output can be garbled because multiple threads or processes try to " "write to the same file. Although logging guards against concurrent use of " @@ -5137,7 +5264,7 @@ msgid "" "different handler instances which happen to point to the same file." msgstr "" -#: ../../howto/logging-cookbook.rst:4119 +#: ../../howto/logging-cookbook.rst:4217 msgid "" "An attempt to delete a file (e.g. during file rotation) silently fails, " "because there is another reference pointing to it. This can lead to " @@ -5147,17 +5274,17 @@ msgid "" "being supposedly in place." msgstr "" -#: ../../howto/logging-cookbook.rst:4126 +#: ../../howto/logging-cookbook.rst:4224 msgid "" "Use the techniques outlined in :ref:`multiple-processes` to circumvent such " "issues." msgstr "" -#: ../../howto/logging-cookbook.rst:4130 +#: ../../howto/logging-cookbook.rst:4228 msgid "Using loggers as attributes in a class or passing them as parameters" msgstr "" -#: ../../howto/logging-cookbook.rst:4132 +#: ../../howto/logging-cookbook.rst:4230 msgid "" "While there might be unusual cases where you'll need to do this, in general " "there is no point because loggers are singletons. Code can always access a " @@ -5168,13 +5295,13 @@ msgid "" "module (and not the class) is the unit of software decomposition." msgstr "" -#: ../../howto/logging-cookbook.rst:4141 +#: ../../howto/logging-cookbook.rst:4239 msgid "" "Adding handlers other than :class:`~logging.NullHandler` to a logger in a " "library" msgstr "" -#: ../../howto/logging-cookbook.rst:4143 +#: ../../howto/logging-cookbook.rst:4241 msgid "" "Configuring logging by adding handlers, formatters and filters is the " "responsibility of the application developer, not the library developer. If " @@ -5182,11 +5309,11 @@ msgid "" "your loggers other than a :class:`~logging.NullHandler` instance." msgstr "" -#: ../../howto/logging-cookbook.rst:4149 +#: ../../howto/logging-cookbook.rst:4247 msgid "Creating a lot of loggers" msgstr "" -#: ../../howto/logging-cookbook.rst:4151 +#: ../../howto/logging-cookbook.rst:4249 msgid "" "Loggers are singletons that are never freed during a script execution, and " "so creating lots of loggers will use up memory which can't then be freed. " @@ -5197,38 +5324,38 @@ msgid "" "occasionally slightly more fine-grained than that)." msgstr "" -#: ../../howto/logging-cookbook.rst:4162 +#: ../../howto/logging-cookbook.rst:4260 msgid "Other resources" msgstr "" -#: ../../howto/logging-cookbook.rst:4166 +#: ../../howto/logging-cookbook.rst:4264 msgid "Module :mod:`logging`" msgstr "" -#: ../../howto/logging-cookbook.rst:4167 +#: ../../howto/logging-cookbook.rst:4265 msgid "API reference for the logging module." msgstr "" -#: ../../howto/logging-cookbook.rst:4169 +#: ../../howto/logging-cookbook.rst:4267 msgid "Module :mod:`logging.config`" msgstr "" -#: ../../howto/logging-cookbook.rst:4170 +#: ../../howto/logging-cookbook.rst:4268 msgid "Configuration API for the logging module." msgstr "" -#: ../../howto/logging-cookbook.rst:4172 +#: ../../howto/logging-cookbook.rst:4270 msgid "Module :mod:`logging.handlers`" msgstr "" -#: ../../howto/logging-cookbook.rst:4173 +#: ../../howto/logging-cookbook.rst:4271 msgid "Useful handlers included with the logging module." msgstr "" -#: ../../howto/logging-cookbook.rst:4175 +#: ../../howto/logging-cookbook.rst:4273 msgid ":ref:`Basic Tutorial `" msgstr "" -#: ../../howto/logging-cookbook.rst:4177 +#: ../../howto/logging-cookbook.rst:4275 msgid ":ref:`Advanced Tutorial `" msgstr "" diff --git a/howto/logging.po b/howto/logging.po index 624c7966b..3d6f4d9e6 100644 --- a/howto/logging.po +++ b/howto/logging.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:53+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/howto/mro.po b/howto/mro.po index d597c70c7..0cbc341c9 100644 --- a/howto/mro.po +++ b/howto/mro.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-04-19 14:15+0000\n" "Last-Translator: Danial Behzadi , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/howto/perf_profiling.po b/howto/perf_profiling.po index 3c2453481..ce3f75891 100644 --- a/howto/perf_profiling.po +++ b/howto/perf_profiling.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2023-05-24 13:07+0000\n" "Last-Translator: Danial Behzadi , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/howto/pyporting.po b/howto/pyporting.po index 8ecc42860..0b6615a53 100644 --- a/howto/pyporting.po +++ b/howto/pyporting.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:53+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/howto/regex.po b/howto/regex.po index a3e5cddf1..9b2b9021f 100644 --- a/howto/regex.po +++ b/howto/regex.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:53+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -652,12 +653,12 @@ msgid "" msgstr "" #: ../../howto/regex.rst:363 ../../howto/regex.rst:417 -#: ../../howto/regex.rst:1068 +#: ../../howto/regex.rst:1072 msgid "Method/Attribute" msgstr "" #: ../../howto/regex.rst:363 ../../howto/regex.rst:417 -#: ../../howto/regex.rst:1068 +#: ../../howto/regex.rst:1072 msgid "Purpose" msgstr "" @@ -1703,17 +1704,21 @@ msgid "" msgstr "" #: ../../howto/regex.rst:1019 +msgid "``.*[.][^b].*$``" +msgstr "" + +#: ../../howto/regex.rst:1021 msgid "" -"``.*[.][^b].*$`` The first attempt above tries to exclude ``bat`` by " -"requiring that the first character of the extension is not a ``b``. This is " -"wrong, because the pattern also doesn't match ``foo.bar``." +"The first attempt above tries to exclude ``bat`` by requiring that the first " +"character of the extension is not a ``b``. This is wrong, because the " +"pattern also doesn't match ``foo.bar``." msgstr "" -#: ../../howto/regex.rst:1023 +#: ../../howto/regex.rst:1025 msgid "``.*[.]([^b]..|.[^a].|..[^t])$``" msgstr "" -#: ../../howto/regex.rst:1025 +#: ../../howto/regex.rst:1027 msgid "" "The expression gets messier when you try to patch up the first solution by " "requiring one of the following cases to match: the first character of the " @@ -1724,18 +1729,18 @@ msgid "" "pattern again in an effort to fix it." msgstr "" -#: ../../howto/regex.rst:1033 +#: ../../howto/regex.rst:1035 msgid "``.*[.]([^b].?.?|.[^a]?.?|..?[^t]?)$``" msgstr "" -#: ../../howto/regex.rst:1035 +#: ../../howto/regex.rst:1037 msgid "" "In the third attempt, the second and third letters are all made optional in " "order to allow matching extensions shorter than three characters, such as " "``sendmail.cf``." msgstr "" -#: ../../howto/regex.rst:1039 +#: ../../howto/regex.rst:1041 msgid "" "The pattern's getting really complicated now, which makes it hard to read " "and understand. Worse, if the problem changes and you want to exclude both " @@ -1743,75 +1748,79 @@ msgid "" "complicated and confusing." msgstr "" -#: ../../howto/regex.rst:1044 +#: ../../howto/regex.rst:1046 msgid "A negative lookahead cuts through all this confusion:" msgstr "" -#: ../../howto/regex.rst:1046 +#: ../../howto/regex.rst:1048 +msgid "``.*[.](?!bat$)[^.]*$``" +msgstr "" + +#: ../../howto/regex.rst:1050 msgid "" -"``.*[.](?!bat$)[^.]*$`` The negative lookahead means: if the expression " -"``bat`` doesn't match at this point, try the rest of the pattern; if " -"``bat$`` does match, the whole pattern will fail. The trailing ``$`` is " -"required to ensure that something like ``sample.batch``, where the extension " -"only starts with ``bat``, will be allowed. The ``[^.]*`` makes sure that " -"the pattern works when there are multiple dots in the filename." +"The negative lookahead means: if the expression ``bat`` doesn't match at " +"this point, try the rest of the pattern; if ``bat$`` does match, the whole " +"pattern will fail. The trailing ``$`` is required to ensure that something " +"like ``sample.batch``, where the extension only starts with ``bat``, will be " +"allowed. The ``[^.]*`` makes sure that the pattern works when there are " +"multiple dots in the filename." msgstr "" -#: ../../howto/regex.rst:1053 +#: ../../howto/regex.rst:1057 msgid "" "Excluding another filename extension is now easy; simply add it as an " "alternative inside the assertion. The following pattern excludes filenames " "that end in either ``bat`` or ``exe``:" msgstr "" -#: ../../howto/regex.rst:1057 +#: ../../howto/regex.rst:1061 msgid "``.*[.](?!bat$|exe$)[^.]*$``" msgstr "" -#: ../../howto/regex.rst:1061 +#: ../../howto/regex.rst:1065 msgid "Modifying Strings" msgstr "" -#: ../../howto/regex.rst:1063 +#: ../../howto/regex.rst:1067 msgid "" "Up to this point, we've simply performed searches against a static string. " "Regular expressions are also commonly used to modify strings in various " "ways, using the following pattern methods:" msgstr "" -#: ../../howto/regex.rst:1070 +#: ../../howto/regex.rst:1074 msgid "``split()``" msgstr "" -#: ../../howto/regex.rst:1070 +#: ../../howto/regex.rst:1074 msgid "Split the string into a list, splitting it wherever the RE matches" msgstr "" -#: ../../howto/regex.rst:1073 +#: ../../howto/regex.rst:1077 msgid "``sub()``" msgstr "" -#: ../../howto/regex.rst:1073 +#: ../../howto/regex.rst:1077 msgid "" "Find all substrings where the RE matches, and replace them with a different " "string" msgstr "" -#: ../../howto/regex.rst:1076 +#: ../../howto/regex.rst:1080 msgid "``subn()``" msgstr "" -#: ../../howto/regex.rst:1076 +#: ../../howto/regex.rst:1080 msgid "" "Does the same thing as :meth:`!sub`, but returns the new string and the " "number of replacements" msgstr "" -#: ../../howto/regex.rst:1083 +#: ../../howto/regex.rst:1087 msgid "Splitting Strings" msgstr "" -#: ../../howto/regex.rst:1085 +#: ../../howto/regex.rst:1089 msgid "" "The :meth:`~re.Pattern.split` method of a pattern splits a string apart " "wherever the RE matches, returning a list of the pieces. It's similar to " @@ -1821,7 +1830,7 @@ msgid "" "module-level :func:`re.split` function, too." msgstr "" -#: ../../howto/regex.rst:1096 +#: ../../howto/regex.rst:1100 msgid "" "Split *string* by the matches of the regular expression. If capturing " "parentheses are used in the RE, then their contents will also be returned as " @@ -1829,7 +1838,7 @@ msgid "" "splits are performed." msgstr "" -#: ../../howto/regex.rst:1101 +#: ../../howto/regex.rst:1105 msgid "" "You can limit the number of splits made, by passing a value for *maxsplit*. " "When *maxsplit* is nonzero, at most *maxsplit* splits will be made, and the " @@ -1838,7 +1847,7 @@ msgid "" "characters. ::" msgstr "" -#: ../../howto/regex.rst:1107 +#: ../../howto/regex.rst:1111 msgid "" ">>> p = re.compile(r'\\W+')\n" ">>> p.split('This is a test, short and sweet, of split().')\n" @@ -1847,7 +1856,7 @@ msgid "" "['This', 'is', 'a', 'test, short and sweet, of split().']" msgstr "" -#: ../../howto/regex.rst:1113 +#: ../../howto/regex.rst:1117 msgid "" "Sometimes you're not only interested in what the text between delimiters is, " "but also need to know what the delimiter was. If capturing parentheses are " @@ -1855,7 +1864,7 @@ msgid "" "Compare the following calls::" msgstr "" -#: ../../howto/regex.rst:1118 +#: ../../howto/regex.rst:1122 msgid "" ">>> p = re.compile(r'\\W+')\n" ">>> p2 = re.compile(r'(\\W+)')\n" @@ -1865,13 +1874,13 @@ msgid "" "['This', '... ', 'is', ' ', 'a', ' ', 'test', '.', '']" msgstr "" -#: ../../howto/regex.rst:1125 +#: ../../howto/regex.rst:1129 msgid "" "The module-level function :func:`re.split` adds the RE to be used as the " "first argument, but is otherwise the same. ::" msgstr "" -#: ../../howto/regex.rst:1128 +#: ../../howto/regex.rst:1132 msgid "" ">>> re.split(r'[\\W]+', 'Words, words, words.')\n" "['Words', 'words', 'words', '']\n" @@ -1881,11 +1890,11 @@ msgid "" "['Words', 'words, words.']" msgstr "" -#: ../../howto/regex.rst:1137 +#: ../../howto/regex.rst:1141 msgid "Search and Replace" msgstr "" -#: ../../howto/regex.rst:1139 +#: ../../howto/regex.rst:1143 msgid "" "Another common task is to find all the matches for a pattern, and replace " "them with a different string. The :meth:`~re.Pattern.sub` method takes a " @@ -1893,27 +1902,27 @@ msgid "" "string to be processed." msgstr "" -#: ../../howto/regex.rst:1146 +#: ../../howto/regex.rst:1150 msgid "" "Returns the string obtained by replacing the leftmost non-overlapping " "occurrences of the RE in *string* by the replacement *replacement*. If the " "pattern isn't found, *string* is returned unchanged." msgstr "" -#: ../../howto/regex.rst:1150 +#: ../../howto/regex.rst:1154 msgid "" "The optional argument *count* is the maximum number of pattern occurrences " "to be replaced; *count* must be a non-negative integer. The default value " "of 0 means to replace all occurrences." msgstr "" -#: ../../howto/regex.rst:1154 +#: ../../howto/regex.rst:1158 msgid "" "Here's a simple example of using the :meth:`~re.Pattern.sub` method. It " "replaces colour names with the word ``colour``::" msgstr "" -#: ../../howto/regex.rst:1157 +#: ../../howto/regex.rst:1161 msgid "" ">>> p = re.compile('(blue|white|red)')\n" ">>> p.sub('colour', 'blue socks and red shoes')\n" @@ -1922,14 +1931,14 @@ msgid "" "'colour socks and red shoes'" msgstr "" -#: ../../howto/regex.rst:1163 +#: ../../howto/regex.rst:1167 msgid "" "The :meth:`~re.Pattern.subn` method does the same work, but returns a 2-" "tuple containing the new string value and the number of replacements that " "were performed::" msgstr "" -#: ../../howto/regex.rst:1166 +#: ../../howto/regex.rst:1170 msgid "" ">>> p = re.compile('(blue|white|red)')\n" ">>> p.subn('colour', 'blue socks and red shoes')\n" @@ -1938,20 +1947,20 @@ msgid "" "('no colours at all', 0)" msgstr "" -#: ../../howto/regex.rst:1172 +#: ../../howto/regex.rst:1176 msgid "" "Empty matches are replaced only when they're not adjacent to a previous " "empty match. ::" msgstr "" -#: ../../howto/regex.rst:1175 +#: ../../howto/regex.rst:1179 msgid "" ">>> p = re.compile('x*')\n" ">>> p.sub('-', 'abxd')\n" "'-a-b--d-'" msgstr "" -#: ../../howto/regex.rst:1179 +#: ../../howto/regex.rst:1183 msgid "" "If *replacement* is a string, any backslash escapes in it are processed. " "That is, ``\\n`` is converted to a single newline character, ``\\r`` is " @@ -1962,20 +1971,20 @@ msgid "" "string." msgstr "" -#: ../../howto/regex.rst:1186 +#: ../../howto/regex.rst:1190 msgid "" "This example matches the word ``section`` followed by a string enclosed in " "``{``, ``}``, and changes ``section`` to ``subsection``::" msgstr "" -#: ../../howto/regex.rst:1189 +#: ../../howto/regex.rst:1193 msgid "" ">>> p = re.compile('section{ ( [^}]* ) }', re.VERBOSE)\n" ">>> p.sub(r'subsection{\\1}','section{First} section{second}')\n" "'subsection{First} subsection{second}'" msgstr "" -#: ../../howto/regex.rst:1193 +#: ../../howto/regex.rst:1197 msgid "" "There's also a syntax for referring to named groups as defined by the ``(?" "P...)`` syntax. ``\\g`` will use the substring matched by the " @@ -1987,7 +1996,7 @@ msgid "" "but use all three variations of the replacement string. ::" msgstr "" -#: ../../howto/regex.rst:1202 +#: ../../howto/regex.rst:1206 msgid "" ">>> p = re.compile('section{ (?P [^}]* ) }', re.VERBOSE)\n" ">>> p.sub(r'subsection{\\1}','section{First}')\n" @@ -1998,7 +2007,7 @@ msgid "" "'subsection{First}'" msgstr "" -#: ../../howto/regex.rst:1210 +#: ../../howto/regex.rst:1214 msgid "" "*replacement* can also be a function, which gives you even more control. If " "*replacement* is a function, the function is called for every non-" @@ -2007,13 +2016,13 @@ msgid "" "this information to compute the desired replacement string and return it." msgstr "" -#: ../../howto/regex.rst:1216 +#: ../../howto/regex.rst:1220 msgid "" "In the following example, the replacement function translates decimals into " "hexadecimal::" msgstr "" -#: ../../howto/regex.rst:1219 +#: ../../howto/regex.rst:1223 msgid "" ">>> def hexrepl(match):\n" "... \"Return the hex string for a decimal number\"\n" @@ -2025,7 +2034,7 @@ msgid "" "'Call 0xffd2 for printing, 0xc000 for user code.'" msgstr "" -#: ../../howto/regex.rst:1228 +#: ../../howto/regex.rst:1232 msgid "" "When using the module-level :func:`re.sub` function, the pattern is passed " "as the first argument. The pattern may be provided as an object or as a " @@ -2035,11 +2044,11 @@ msgid "" "x'``." msgstr "" -#: ../../howto/regex.rst:1236 +#: ../../howto/regex.rst:1240 msgid "Common Problems" msgstr "" -#: ../../howto/regex.rst:1238 +#: ../../howto/regex.rst:1242 msgid "" "Regular expressions are a powerful tool for some applications, but in some " "ways their behaviour isn't intuitive and at times they don't behave the way " @@ -2047,11 +2056,11 @@ msgid "" "pitfalls." msgstr "" -#: ../../howto/regex.rst:1244 +#: ../../howto/regex.rst:1248 msgid "Use String Methods" msgstr "" -#: ../../howto/regex.rst:1246 +#: ../../howto/regex.rst:1250 msgid "" "Sometimes using the :mod:`re` module is a mistake. If you're matching a " "fixed string, or a single character class, and you're not using any :mod:" @@ -2063,7 +2072,7 @@ msgid "" "engine." msgstr "" -#: ../../howto/regex.rst:1254 +#: ../../howto/regex.rst:1258 msgid "" "One example might be replacing a single fixed string with another one; for " "example, you might replace ``word`` with ``deed``. :func:`re.sub` seems " @@ -2076,7 +2085,7 @@ msgid "" "meth:`!replace`'s abilities.)" msgstr "" -#: ../../howto/regex.rst:1263 +#: ../../howto/regex.rst:1267 msgid "" "Another common task is deleting every occurrence of a single character from " "a string or replacing it with another single character. You might do this " @@ -2085,17 +2094,17 @@ msgid "" "operation can be." msgstr "" -#: ../../howto/regex.rst:1269 +#: ../../howto/regex.rst:1273 msgid "" "In short, before turning to the :mod:`re` module, consider whether your " "problem can be solved with a faster and simpler string method." msgstr "" -#: ../../howto/regex.rst:1274 +#: ../../howto/regex.rst:1278 msgid "match() versus search()" msgstr "" -#: ../../howto/regex.rst:1276 +#: ../../howto/regex.rst:1280 msgid "" "The :func:`~re.match` function only checks if the RE matches at the " "beginning of the string while :func:`~re.search` will scan forward through " @@ -2105,7 +2114,7 @@ msgid "" "report it. ::" msgstr "" -#: ../../howto/regex.rst:1282 +#: ../../howto/regex.rst:1286 msgid "" ">>> print(re.match('super', 'superstition').span())\n" "(0, 5)\n" @@ -2113,13 +2122,13 @@ msgid "" "None" msgstr "" -#: ../../howto/regex.rst:1287 +#: ../../howto/regex.rst:1291 msgid "" "On the other hand, :func:`~re.search` will scan forward through the string, " "reporting the first match it finds. ::" msgstr "" -#: ../../howto/regex.rst:1290 +#: ../../howto/regex.rst:1294 msgid "" ">>> print(re.search('super', 'superstition').span())\n" "(0, 5)\n" @@ -2127,7 +2136,7 @@ msgid "" "(2, 7)" msgstr "" -#: ../../howto/regex.rst:1295 +#: ../../howto/regex.rst:1299 msgid "" "Sometimes you'll be tempted to keep using :func:`re.match`, and just add ``." "*`` to the front of your RE. Resist this temptation and use :func:`re." @@ -2139,18 +2148,18 @@ msgid "" "starting character, only trying the full match if a ``'C'`` is found." msgstr "" -#: ../../howto/regex.rst:1304 +#: ../../howto/regex.rst:1308 msgid "" "Adding ``.*`` defeats this optimization, requiring scanning to the end of " "the string and then backtracking to find a match for the rest of the RE. " "Use :func:`re.search` instead." msgstr "" -#: ../../howto/regex.rst:1310 +#: ../../howto/regex.rst:1314 msgid "Greedy versus Non-Greedy" msgstr "" -#: ../../howto/regex.rst:1312 +#: ../../howto/regex.rst:1316 msgid "" "When repeating a regular expression, as in ``a*``, the resulting action is " "to consume as much of the pattern as possible. This fact often bites you " @@ -2159,7 +2168,7 @@ msgid "" "HTML tag doesn't work because of the greedy nature of ``.*``. ::" msgstr "" -#: ../../howto/regex.rst:1318 +#: ../../howto/regex.rst:1322 msgid "" ">>> s = 'Title'\n" ">>> len(s)\n" @@ -2170,7 +2179,7 @@ msgid "" "Title" msgstr "" -#: ../../howto/regex.rst:1326 +#: ../../howto/regex.rst:1330 msgid "" "The RE matches the ``'<'`` in ``''``, and the ``.*`` consumes the rest " "of the string. There's still more left in the RE, though, and the ``>`` " @@ -2180,7 +2189,7 @@ msgid "" "``''``, which isn't what you want." msgstr "" -#: ../../howto/regex.rst:1333 +#: ../../howto/regex.rst:1337 msgid "" "In this case, the solution is to use the non-greedy quantifiers ``*?``, ``+?" "``, ``??``, or ``{m,n}?``, which match as *little* text as possible. In the " @@ -2189,13 +2198,13 @@ msgid "" "retrying the ``'>'`` at every step. This produces just the right result::" msgstr "" -#: ../../howto/regex.rst:1339 +#: ../../howto/regex.rst:1343 msgid "" ">>> print(re.match('<.*?>', s).group())\n" "" msgstr "" -#: ../../howto/regex.rst:1342 +#: ../../howto/regex.rst:1346 msgid "" "(Note that parsing HTML or XML with regular expressions is painful. Quick-" "and-dirty patterns will handle common cases, but HTML and XML have special " @@ -2205,11 +2214,11 @@ msgid "" "such tasks.)" msgstr "" -#: ../../howto/regex.rst:1350 +#: ../../howto/regex.rst:1354 msgid "Using re.VERBOSE" msgstr "" -#: ../../howto/regex.rst:1352 +#: ../../howto/regex.rst:1356 msgid "" "By now you've probably noticed that regular expressions are a very compact " "notation, but they're not terribly readable. REs of moderate complexity can " @@ -2217,14 +2226,14 @@ msgid "" "making them difficult to read and understand." msgstr "" -#: ../../howto/regex.rst:1357 +#: ../../howto/regex.rst:1361 msgid "" "For such REs, specifying the :const:`re.VERBOSE` flag when compiling the " "regular expression can be helpful, because it allows you to format the " "regular expression more clearly." msgstr "" -#: ../../howto/regex.rst:1361 +#: ../../howto/regex.rst:1365 msgid "" "The ``re.VERBOSE`` flag has several effects. Whitespace in the regular " "expression that *isn't* inside a character class is ignored. This means " @@ -2235,7 +2244,7 @@ msgid "" "quoted strings, this enables REs to be formatted more neatly::" msgstr "" -#: ../../howto/regex.rst:1369 +#: ../../howto/regex.rst:1373 msgid "" "pat = re.compile(r\"\"\"\n" " \\s* # Skip leading whitespace\n" @@ -2247,19 +2256,19 @@ msgid "" "\"\"\", re.VERBOSE)" msgstr "" -#: ../../howto/regex.rst:1378 +#: ../../howto/regex.rst:1382 msgid "This is far more readable than::" msgstr "" -#: ../../howto/regex.rst:1380 +#: ../../howto/regex.rst:1384 msgid "pat = re.compile(r\"\\s*(?P
[^:]+)\\s*:(?P.*?)\\s*$\")" msgstr "" -#: ../../howto/regex.rst:1384 +#: ../../howto/regex.rst:1388 msgid "Feedback" msgstr "" -#: ../../howto/regex.rst:1386 +#: ../../howto/regex.rst:1390 msgid "" "Regular expressions are a complicated topic. Did this document help you " "understand them? Were there parts that were unclear, or Problems you " @@ -2267,7 +2276,7 @@ msgid "" "improvements to the author." msgstr "" -#: ../../howto/regex.rst:1391 +#: ../../howto/regex.rst:1395 msgid "" "The most complete book on regular expressions is almost certainly Jeffrey " "Friedl's Mastering Regular Expressions, published by O'Reilly. " diff --git a/howto/sockets.po b/howto/sockets.po index 291de3b40..fcb0e18cf 100644 --- a/howto/sockets.po +++ b/howto/sockets.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:53+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/howto/sorting.po b/howto/sorting.po index 4596b6adc..2ac22c0c4 100644 --- a/howto/sorting.po +++ b/howto/sorting.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:53+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/howto/timerfd.po b/howto/timerfd.po index 050f7a8ce..850a3db38 100644 --- a/howto/timerfd.po +++ b/howto/timerfd.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-05-11 01:08+0000\n" "Last-Translator: Danial Behzadi , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/howto/unicode.po b/howto/unicode.po index db41261cb..20575f62a 100644 --- a/howto/unicode.po +++ b/howto/unicode.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:53+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/howto/urllib2.po b/howto/urllib2.po index 9ded2af1c..07d016188 100644 --- a/howto/urllib2.po +++ b/howto/urllib2.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:53+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -386,82 +387,37 @@ msgstr "" #: ../../howto/urllib2.rst:247 msgid "" ":attr:`http.server.BaseHTTPRequestHandler.responses` is a useful dictionary " -"of response codes in that shows all the response codes used by :rfc:`2616`. " -"The dictionary is reproduced here for convenience ::" +"of response codes that shows all the response codes used by :rfc:`2616`. An " +"excerpt from the dictionary is shown below ::" msgstr "" #: ../../howto/urllib2.rst:251 msgid "" -"# Table mapping response codes to messages; entries have the\n" -"# form {code: (shortmessage, longmessage)}.\n" "responses = {\n" -" 100: ('Continue', 'Request received, please continue'),\n" -" 101: ('Switching Protocols',\n" -" 'Switching to new protocol; obey Upgrade header'),\n" -"\n" -" 200: ('OK', 'Request fulfilled, document follows'),\n" -" 201: ('Created', 'Document created, URL follows'),\n" -" 202: ('Accepted',\n" -" 'Request accepted, processing continues off-line'),\n" -" 203: ('Non-Authoritative Information', 'Request fulfilled from cache'),\n" -" 204: ('No Content', 'Request fulfilled, nothing follows'),\n" -" 205: ('Reset Content', 'Clear input form for further input.'),\n" -" 206: ('Partial Content', 'Partial content follows.'),\n" -"\n" -" 300: ('Multiple Choices',\n" -" 'Object has several resources -- see URI list'),\n" -" 301: ('Moved Permanently', 'Object moved permanently -- see URI list'),\n" -" 302: ('Found', 'Object moved temporarily -- see URI list'),\n" -" 303: ('See Other', 'Object moved -- see Method and URL list'),\n" -" 304: ('Not Modified',\n" -" 'Document has not changed since given time'),\n" -" 305: ('Use Proxy',\n" -" 'You must use proxy specified in Location to access this '\n" -" 'resource.'),\n" -" 307: ('Temporary Redirect',\n" -" 'Object moved temporarily -- see URI list'),\n" -"\n" -" 400: ('Bad Request',\n" -" 'Bad request syntax or unsupported method'),\n" -" 401: ('Unauthorized',\n" -" 'No permission -- see authorization schemes'),\n" -" 402: ('Payment Required',\n" -" 'No payment -- see charging schemes'),\n" -" 403: ('Forbidden',\n" -" 'Request forbidden -- authorization will not help'),\n" -" 404: ('Not Found', 'Nothing matches the given URI'),\n" -" 405: ('Method Not Allowed',\n" -" 'Specified method is invalid for this server.'),\n" -" 406: ('Not Acceptable', 'URI not available in preferred format.'),\n" -" 407: ('Proxy Authentication Required', 'You must authenticate with '\n" -" 'this proxy before proceeding.'),\n" -" 408: ('Request Timeout', 'Request timed out; try again later.'),\n" -" 409: ('Conflict', 'Request conflict.'),\n" -" 410: ('Gone',\n" -" 'URI no longer exists and has been permanently removed.'),\n" -" 411: ('Length Required', 'Client must specify Content-Length.'),\n" -" 412: ('Precondition Failed', 'Precondition in headers is false.'),\n" -" 413: ('Request Entity Too Large', 'Entity is too large.'),\n" -" 414: ('Request-URI Too Long', 'URI is too long.'),\n" -" 415: ('Unsupported Media Type', 'Entity body in unsupported format.'),\n" -" 416: ('Requested Range Not Satisfiable',\n" -" 'Cannot satisfy request range.'),\n" -" 417: ('Expectation Failed',\n" -" 'Expect condition could not be satisfied.'),\n" -"\n" -" 500: ('Internal Server Error', 'Server got itself in trouble'),\n" -" 501: ('Not Implemented',\n" -" 'Server does not support this operation'),\n" -" 502: ('Bad Gateway', 'Invalid responses from another server/proxy.'),\n" -" 503: ('Service Unavailable',\n" -" 'The server cannot process the request due to a high load'),\n" -" 504: ('Gateway Timeout',\n" -" 'The gateway server did not receive a timely response'),\n" -" 505: ('HTTP Version Not Supported', 'Cannot fulfill request.'),\n" +" ...\n" +" : ('OK', 'Request fulfilled, document follows'),\n" +" ...\n" +" : ('Forbidden',\n" +" 'Request forbidden -- authorization will " +"'\n" +" 'not help'),\n" +" : ('Not Found',\n" +" 'Nothing matches the given URI'),\n" +" ...\n" +" : (\"I'm a Teapot\",\n" +" 'Server refuses to brew coffee because " +"'\n" +" 'it is a teapot'),\n" +" ...\n" +" : ('Service Unavailable',\n" +" 'The server cannot process the " +"'\n" +" 'request due to a high load'),\n" +" ...\n" " }" msgstr "" -#: ../../howto/urllib2.rst:319 +#: ../../howto/urllib2.rst:271 msgid "" "When an error is raised the server responds by returning an HTTP error code " "*and* an error page. You can use the :exc:`~urllib.error.HTTPError` instance " @@ -470,7 +426,7 @@ msgid "" "``urllib.response`` module::" msgstr "" -#: ../../howto/urllib2.rst:324 +#: ../../howto/urllib2.rst:276 msgid "" ">>> req = urllib.request.Request('http://www.python.org/fish.html')\n" ">>> try:\n" @@ -488,22 +444,22 @@ msgid "" " ..." msgstr "" -#: ../../howto/urllib2.rst:339 +#: ../../howto/urllib2.rst:291 msgid "Wrapping it Up" msgstr "" -#: ../../howto/urllib2.rst:341 +#: ../../howto/urllib2.rst:293 msgid "" "So if you want to be prepared for :exc:`~urllib.error.HTTPError` *or* :exc:" "`~urllib.error.URLError` there are two basic approaches. I prefer the second " "approach." msgstr "" -#: ../../howto/urllib2.rst:345 +#: ../../howto/urllib2.rst:297 msgid "Number 1" msgstr "" -#: ../../howto/urllib2.rst:350 +#: ../../howto/urllib2.rst:302 msgid "" "from urllib.request import Request, urlopen\n" "from urllib.error import URLError, HTTPError\n" @@ -520,17 +476,17 @@ msgid "" " # everything is fine" msgstr "" -#: ../../howto/urllib2.rst:367 +#: ../../howto/urllib2.rst:319 msgid "" "The ``except HTTPError`` *must* come first, otherwise ``except URLError`` " "will *also* catch an :exc:`~urllib.error.HTTPError`." msgstr "" -#: ../../howto/urllib2.rst:371 +#: ../../howto/urllib2.rst:323 msgid "Number 2" msgstr "" -#: ../../howto/urllib2.rst:375 +#: ../../howto/urllib2.rst:327 msgid "" "from urllib.request import Request, urlopen\n" "from urllib.error import URLError\n" @@ -548,18 +504,18 @@ msgid "" " # everything is fine" msgstr "" -#: ../../howto/urllib2.rst:392 +#: ../../howto/urllib2.rst:344 msgid "info and geturl" msgstr "" -#: ../../howto/urllib2.rst:394 +#: ../../howto/urllib2.rst:346 msgid "" "The response returned by urlopen (or the :exc:`~urllib.error.HTTPError` " "instance) has two useful methods :meth:`!info` and :meth:`!geturl` and is " "defined in the module :mod:`urllib.response`." msgstr "" -#: ../../howto/urllib2.rst:398 +#: ../../howto/urllib2.rst:350 msgid "" "**geturl** - this returns the real URL of the page fetched. This is useful " "because ``urlopen`` (or the opener object used) may have followed a " @@ -567,14 +523,14 @@ msgid "" "requested." msgstr "" -#: ../../howto/urllib2.rst:402 +#: ../../howto/urllib2.rst:354 msgid "" "**info** - this returns a dictionary-like object that describes the page " "fetched, particularly the headers sent by the server. It is currently an :" "class:`http.client.HTTPMessage` instance." msgstr "" -#: ../../howto/urllib2.rst:406 +#: ../../howto/urllib2.rst:358 msgid "" "Typical headers include 'Content-length', 'Content-type', and so on. See the " "`Quick Reference to HTTP Headers `_ for a " @@ -582,11 +538,11 @@ msgid "" "use." msgstr "" -#: ../../howto/urllib2.rst:413 +#: ../../howto/urllib2.rst:365 msgid "Openers and Handlers" msgstr "" -#: ../../howto/urllib2.rst:415 +#: ../../howto/urllib2.rst:367 msgid "" "When you fetch a URL you use an opener (an instance of the perhaps " "confusingly named :class:`urllib.request.OpenerDirector`). Normally we have " @@ -597,20 +553,20 @@ msgid "" "HTTP redirections or HTTP cookies." msgstr "" -#: ../../howto/urllib2.rst:423 +#: ../../howto/urllib2.rst:375 msgid "" "You will want to create openers if you want to fetch URLs with specific " "handlers installed, for example to get an opener that handles cookies, or to " "get an opener that does not handle redirections." msgstr "" -#: ../../howto/urllib2.rst:427 +#: ../../howto/urllib2.rst:379 msgid "" "To create an opener, instantiate an ``OpenerDirector``, and then call ``." "add_handler(some_handler_instance)`` repeatedly." msgstr "" -#: ../../howto/urllib2.rst:430 +#: ../../howto/urllib2.rst:382 msgid "" "Alternatively, you can use ``build_opener``, which is a convenience function " "for creating opener objects with a single function call. ``build_opener`` " @@ -618,31 +574,31 @@ msgid "" "or override the default handlers." msgstr "" -#: ../../howto/urllib2.rst:435 +#: ../../howto/urllib2.rst:387 msgid "" "Other sorts of handlers you might want to can handle proxies, " "authentication, and other common but slightly specialised situations." msgstr "" -#: ../../howto/urllib2.rst:438 +#: ../../howto/urllib2.rst:390 msgid "" "``install_opener`` can be used to make an ``opener`` object the (global) " "default opener. This means that calls to ``urlopen`` will use the opener you " "have installed." msgstr "" -#: ../../howto/urllib2.rst:442 +#: ../../howto/urllib2.rst:394 msgid "" "Opener objects have an ``open`` method, which can be called directly to " "fetch urls in the same way as the ``urlopen`` function: there's no need to " "call ``install_opener``, except as a convenience." msgstr "" -#: ../../howto/urllib2.rst:448 +#: ../../howto/urllib2.rst:400 msgid "Basic Authentication" msgstr "" -#: ../../howto/urllib2.rst:450 +#: ../../howto/urllib2.rst:402 msgid "" "To illustrate creating and installing a handler we will use the " "``HTTPBasicAuthHandler``. For a more detailed discussion of this subject -- " @@ -651,7 +607,7 @@ msgid "" "www.voidspace.org.uk/python/articles/authentication.shtml>`__." msgstr "" -#: ../../howto/urllib2.rst:456 +#: ../../howto/urllib2.rst:408 msgid "" "When authentication is required, the server sends a header (as well as the " "401 error code) requesting authentication. This specifies the " @@ -659,15 +615,15 @@ msgid "" "Authenticate: SCHEME realm=\"REALM\"``." msgstr "" -#: ../../howto/urllib2.rst:461 +#: ../../howto/urllib2.rst:413 msgid "e.g." msgstr "" -#: ../../howto/urllib2.rst:463 +#: ../../howto/urllib2.rst:415 msgid "WWW-Authenticate: Basic realm=\"cPanel Users\"" msgstr "" -#: ../../howto/urllib2.rst:468 +#: ../../howto/urllib2.rst:420 msgid "" "The client should then retry the request with the appropriate name and " "password for the realm included as a header in the request. This is 'basic " @@ -675,7 +631,7 @@ msgid "" "of ``HTTPBasicAuthHandler`` and an opener to use this handler." msgstr "" -#: ../../howto/urllib2.rst:473 +#: ../../howto/urllib2.rst:425 msgid "" "The ``HTTPBasicAuthHandler`` uses an object called a password manager to " "handle the mapping of URLs and realms to passwords and usernames. If you " @@ -688,13 +644,13 @@ msgid "" "by providing ``None`` as the realm argument to the ``add_password`` method." msgstr "" -#: ../../howto/urllib2.rst:483 +#: ../../howto/urllib2.rst:435 msgid "" "The top-level URL is the first URL that requires authentication. URLs " "\"deeper\" than the URL you pass to .add_password() will also match. ::" msgstr "" -#: ../../howto/urllib2.rst:486 +#: ../../howto/urllib2.rst:438 msgid "" "# create a password manager\n" "password_mgr = urllib.request.HTTPPasswordMgrWithDefaultRealm()\n" @@ -717,7 +673,7 @@ msgid "" "urllib.request.install_opener(opener)" msgstr "" -#: ../../howto/urllib2.rst:508 +#: ../../howto/urllib2.rst:460 msgid "" "In the above example we only supplied our ``HTTPBasicAuthHandler`` to " "``build_opener``. By default openers have the handlers for normal situations " @@ -727,7 +683,7 @@ msgid "" "``FileHandler``, ``DataHandler``, ``HTTPErrorProcessor``." msgstr "" -#: ../../howto/urllib2.rst:515 +#: ../../howto/urllib2.rst:467 msgid "" "``top_level_url`` is in fact *either* a full URL (including the 'http:' " "scheme component and the hostname and optionally the port number) e.g. " @@ -738,11 +694,11 @@ msgid "" "example ``\"joe:password@example.com\"`` is not correct." msgstr "" -#: ../../howto/urllib2.rst:525 +#: ../../howto/urllib2.rst:477 msgid "Proxies" msgstr "" -#: ../../howto/urllib2.rst:527 +#: ../../howto/urllib2.rst:479 msgid "" "**urllib** will auto-detect your proxy settings and use those. This is " "through the ``ProxyHandler``, which is part of the normal handler chain when " @@ -752,37 +708,37 @@ msgid "" "similar steps to setting up a `Basic Authentication`_ handler: ::" msgstr "" -#: ../../howto/urllib2.rst:534 +#: ../../howto/urllib2.rst:486 msgid "" ">>> proxy_support = urllib.request.ProxyHandler({})\n" ">>> opener = urllib.request.build_opener(proxy_support)\n" ">>> urllib.request.install_opener(opener)" msgstr "" -#: ../../howto/urllib2.rst:540 +#: ../../howto/urllib2.rst:492 msgid "" "Currently ``urllib.request`` *does not* support fetching of ``https`` " "locations through a proxy. However, this can be enabled by extending urllib." "request as shown in the recipe [#]_." msgstr "" -#: ../../howto/urllib2.rst:546 +#: ../../howto/urllib2.rst:498 msgid "" "``HTTP_PROXY`` will be ignored if a variable ``REQUEST_METHOD`` is set; see " "the documentation on :func:`~urllib.request.getproxies`." msgstr "" -#: ../../howto/urllib2.rst:551 +#: ../../howto/urllib2.rst:503 msgid "Sockets and Layers" msgstr "" -#: ../../howto/urllib2.rst:553 +#: ../../howto/urllib2.rst:505 msgid "" "The Python support for fetching resources from the web is layered. urllib " "uses the :mod:`http.client` library, which in turn uses the socket library." msgstr "" -#: ../../howto/urllib2.rst:556 +#: ../../howto/urllib2.rst:508 msgid "" "As of Python 2.3 you can specify how long a socket should wait for a " "response before timing out. This can be useful in applications which have to " @@ -792,7 +748,7 @@ msgid "" "sockets using ::" msgstr "" -#: ../../howto/urllib2.rst:562 +#: ../../howto/urllib2.rst:514 msgid "" "import socket\n" "import urllib.request\n" @@ -807,38 +763,38 @@ msgid "" "response = urllib.request.urlopen(req)" msgstr "" -#: ../../howto/urllib2.rst:579 +#: ../../howto/urllib2.rst:531 msgid "Footnotes" msgstr "" -#: ../../howto/urllib2.rst:581 +#: ../../howto/urllib2.rst:533 msgid "This document was reviewed and revised by John Lee." msgstr "" -#: ../../howto/urllib2.rst:583 +#: ../../howto/urllib2.rst:535 msgid "Google for example." msgstr "" -#: ../../howto/urllib2.rst:584 +#: ../../howto/urllib2.rst:536 msgid "" "Browser sniffing is a very bad practice for website design - building sites " "using web standards is much more sensible. Unfortunately a lot of sites " "still send different versions to different browsers." msgstr "" -#: ../../howto/urllib2.rst:587 +#: ../../howto/urllib2.rst:539 msgid "" "The user agent for MSIE 6 is *'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT " "5.1; SV1; .NET CLR 1.1.4322)'*" msgstr "" -#: ../../howto/urllib2.rst:589 +#: ../../howto/urllib2.rst:541 msgid "" "For details of more HTTP request headers, see `Quick Reference to HTTP " "Headers`_." msgstr "" -#: ../../howto/urllib2.rst:591 +#: ../../howto/urllib2.rst:543 msgid "" "In my case I have to use a proxy to access the internet at work. If you " "attempt to fetch *localhost* URLs through this proxy it blocks them. IE is " @@ -846,7 +802,7 @@ msgid "" "with a localhost server, I have to prevent urllib from using the proxy." msgstr "" -#: ../../howto/urllib2.rst:596 +#: ../../howto/urllib2.rst:548 msgid "" "urllib opener for SSL proxy (CONNECT method): `ASPN Cookbook Recipe , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# Gigahertz ., 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:54+0000\n" +"Last-Translator: Gigahertz ., 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/__future__.po b/library/__future__.po index 642034912..8ba40b92b 100644 --- a/library/__future__.po +++ b/library/__future__.po @@ -4,16 +4,16 @@ # FIRST AUTHOR , YEAR. # # Translators: -# Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:54+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -79,166 +79,130 @@ msgid "" "into the language using this mechanism:" msgstr "" -#: ../../library/__future__.rst:41 +#: ../../library/__future__.rst:45 msgid "feature" msgstr "" -#: ../../library/__future__.rst:41 +#: ../../library/__future__.rst:46 msgid "optional in" msgstr "" -#: ../../library/__future__.rst:41 +#: ../../library/__future__.rst:47 msgid "mandatory in" msgstr "" -#: ../../library/__future__.rst:41 +#: ../../library/__future__.rst:48 msgid "effect" msgstr "" -#: ../../library/__future__.rst:43 -msgid "nested_scopes" -msgstr "" - -#: ../../library/__future__.rst:43 +#: ../../library/__future__.rst:50 msgid "2.1.0b1" msgstr "" -#: ../../library/__future__.rst:43 +#: ../../library/__future__.rst:51 msgid "2.2" msgstr "" -#: ../../library/__future__.rst:43 +#: ../../library/__future__.rst:52 msgid ":pep:`227`: *Statically Nested Scopes*" msgstr "" -#: ../../library/__future__.rst:46 -msgid "generators" -msgstr "" - -#: ../../library/__future__.rst:46 +#: ../../library/__future__.rst:54 msgid "2.2.0a1" msgstr "" -#: ../../library/__future__.rst:46 +#: ../../library/__future__.rst:55 msgid "2.3" msgstr "" -#: ../../library/__future__.rst:46 +#: ../../library/__future__.rst:56 msgid ":pep:`255`: *Simple Generators*" msgstr "" -#: ../../library/__future__.rst:49 -msgid "division" -msgstr "" - -#: ../../library/__future__.rst:49 +#: ../../library/__future__.rst:58 msgid "2.2.0a2" msgstr "" -#: ../../library/__future__.rst:49 ../../library/__future__.rst:52 -#: ../../library/__future__.rst:58 ../../library/__future__.rst:61 +#: ../../library/__future__.rst:59 ../../library/__future__.rst:63 +#: ../../library/__future__.rst:71 ../../library/__future__.rst:75 msgid "3.0" msgstr "" -#: ../../library/__future__.rst:49 +#: ../../library/__future__.rst:60 msgid ":pep:`238`: *Changing the Division Operator*" msgstr "" -#: ../../library/__future__.rst:52 -msgid "absolute_import" -msgstr "" - -#: ../../library/__future__.rst:52 ../../library/__future__.rst:55 +#: ../../library/__future__.rst:62 ../../library/__future__.rst:66 msgid "2.5.0a1" msgstr "" -#: ../../library/__future__.rst:52 +#: ../../library/__future__.rst:64 msgid ":pep:`328`: *Imports: Multi-Line and Absolute/Relative*" msgstr "" -#: ../../library/__future__.rst:55 -msgid "with_statement" -msgstr "" - -#: ../../library/__future__.rst:55 +#: ../../library/__future__.rst:67 msgid "2.6" msgstr "" -#: ../../library/__future__.rst:55 -msgid ":pep:`343`: *The \"with\" Statement*" +#: ../../library/__future__.rst:68 +msgid ":pep:`343`: *The “with” Statement*" msgstr "" -#: ../../library/__future__.rst:58 -msgid "print_function" -msgstr "" - -#: ../../library/__future__.rst:58 ../../library/__future__.rst:61 +#: ../../library/__future__.rst:70 ../../library/__future__.rst:74 msgid "2.6.0a2" msgstr "" -#: ../../library/__future__.rst:58 +#: ../../library/__future__.rst:72 msgid ":pep:`3105`: *Make print a function*" msgstr "" -#: ../../library/__future__.rst:61 -msgid "unicode_literals" -msgstr "" - -#: ../../library/__future__.rst:61 +#: ../../library/__future__.rst:76 msgid ":pep:`3112`: *Bytes literals in Python 3000*" msgstr "" -#: ../../library/__future__.rst:64 -msgid "generator_stop" -msgstr "" - -#: ../../library/__future__.rst:64 +#: ../../library/__future__.rst:78 msgid "3.5.0b1" msgstr "" -#: ../../library/__future__.rst:64 +#: ../../library/__future__.rst:79 msgid "3.7" msgstr "" -#: ../../library/__future__.rst:64 +#: ../../library/__future__.rst:80 msgid ":pep:`479`: *StopIteration handling inside generators*" msgstr "" -#: ../../library/__future__.rst:67 -msgid "annotations" -msgstr "" - -#: ../../library/__future__.rst:67 +#: ../../library/__future__.rst:82 msgid "3.7.0b1" msgstr "" -#: ../../library/__future__.rst:67 +#: ../../library/__future__.rst:83 msgid "Never [1]_" msgstr "" -#: ../../library/__future__.rst:67 +#: ../../library/__future__.rst:84 msgid "" ":pep:`563`: *Postponed evaluation of annotations*, :pep:`649`: *Deferred " "evaluation of annotations using descriptors*" msgstr "" -#: ../../library/__future__.rst:79 +#: ../../library/__future__.rst:93 msgid "Each statement in :file:`__future__.py` is of the form::" msgstr "" -#: ../../library/__future__.rst:81 +#: ../../library/__future__.rst:95 msgid "" "FeatureName = _Feature(OptionalRelease, MandatoryRelease,\n" " CompilerFlag)" msgstr "" -#: ../../library/__future__.rst:84 +#: ../../library/__future__.rst:98 msgid "" "where, normally, *OptionalRelease* is less than *MandatoryRelease*, and both " "are 5-tuples of the same form as :data:`sys.version_info`::" msgstr "" -#: ../../library/__future__.rst:87 +#: ../../library/__future__.rst:101 msgid "" "(PY_MAJOR_VERSION, # the 2 in 2.1.0a3; an int\n" " PY_MINOR_VERSION, # the 1; an int\n" @@ -249,20 +213,20 @@ msgid "" ")" msgstr "" -#: ../../library/__future__.rst:96 +#: ../../library/__future__.rst:110 msgid "" "*OptionalRelease* records the first release in which the feature was " "accepted." msgstr "" -#: ../../library/__future__.rst:100 +#: ../../library/__future__.rst:114 msgid "" "In the case of a *MandatoryRelease* that has not yet occurred, " "*MandatoryRelease* predicts the release in which the feature will become " "part of the language." msgstr "" -#: ../../library/__future__.rst:104 +#: ../../library/__future__.rst:118 msgid "" "Else *MandatoryRelease* records when the feature became part of the " "language; in releases at or after that, modules no longer need a future " @@ -270,13 +234,13 @@ msgid "" "imports." msgstr "" -#: ../../library/__future__.rst:108 +#: ../../library/__future__.rst:122 msgid "" "*MandatoryRelease* may also be ``None``, meaning that a planned feature got " "dropped or that it is not yet decided." msgstr "" -#: ../../library/__future__.rst:113 +#: ../../library/__future__.rst:127 msgid "" "*CompilerFlag* is the (bitfield) flag that should be passed in the fourth " "argument to the built-in function :func:`compile` to enable the feature in " @@ -284,7 +248,7 @@ msgid "" "compiler_flag` attribute on :class:`_Feature` instances." msgstr "" -#: ../../library/__future__.rst:119 +#: ../../library/__future__.rst:133 msgid "" "``from __future__ import annotations`` was previously scheduled to become " "mandatory in Python 3.10, but the change was delayed and ultimately " @@ -292,18 +256,18 @@ msgid "" "`649` and :pep:`749`." msgstr "" -#: ../../library/__future__.rst:127 +#: ../../library/__future__.rst:141 msgid ":ref:`future`" msgstr "" -#: ../../library/__future__.rst:128 +#: ../../library/__future__.rst:142 msgid "How the compiler treats future imports." msgstr "" -#: ../../library/__future__.rst:130 +#: ../../library/__future__.rst:144 msgid ":pep:`236` - Back to the __future__" msgstr "" -#: ../../library/__future__.rst:131 +#: ../../library/__future__.rst:145 msgid "The original proposal for the __future__ mechanism." msgstr "" diff --git a/library/__main__.po b/library/__main__.po index 6f272827b..29a143db5 100644 --- a/library/__main__.po +++ b/library/__main__.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 00:54+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/_thread.po b/library/_thread.po index ce71f1f41..f133e1fa7 100644 --- a/library/_thread.po +++ b/library/_thread.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 00:54+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/abc.po b/library/abc.po index de91d4e86..329268f04 100644 --- a/library/abc.po +++ b/library/abc.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:54+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/aifc.po b/library/aifc.po index ee8e804bc..572c1ba3f 100644 --- a/library/aifc.po +++ b/library/aifc.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-11-19 01:02+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/allos.po b/library/allos.po index 043a6677b..daf7cd68c 100644 --- a/library/allos.po +++ b/library/allos.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:54+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/archiving.po b/library/archiving.po index 2b462d6eb..9d0c1438d 100644 --- a/library/archiving.po +++ b/library/archiving.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-06-27 14:20+0000\n" "PO-Revision-Date: 2021-06-28 00:54+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" @@ -25,7 +25,7 @@ msgstr "" #: ../../library/archiving.rst:7 msgid "" "The modules described in this chapter support data compression with the " -"zlib, gzip, bzip2 and lzma algorithms, and the creation of ZIP- and tar-" -"format archives. See also :ref:`archiving-operations` provided by the :mod:" -"`shutil` module." +"zlib, gzip, bzip2, lzma, and zstd algorithms, and the creation of ZIP- and " +"tar-format archives. See also :ref:`archiving-operations` provided by the :" +"mod:`shutil` module." msgstr "" diff --git a/library/argparse.po b/library/argparse.po index 8907431a8..c017a0842 100644 --- a/library/argparse.po +++ b/library/argparse.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:54+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -1229,28 +1230,14 @@ msgstr "" #: ../../library/argparse.rst:842 msgid "" -"Only actions that consume command-line arguments (e.g. ``'store'``, " -"``'append'`` or ``'extend'``) can be used with positional arguments." -msgstr "" - -#: ../../library/argparse.rst:847 -msgid "" "You may also specify an arbitrary action by passing an :class:`Action` " -"subclass or other object that implements the same interface. The :class:`!" -"BooleanOptionalAction` is available in :mod:`!argparse` and adds support for " -"boolean actions such as ``--foo`` and ``--no-foo``::" +"subclass (e.g. :class:`BooleanOptionalAction`) or other object that " +"implements the same interface. Only actions that consume command-line " +"arguments (e.g. ``'store'``, ``'append'``, ``'extend'``, or custom actions " +"with non-zero ``nargs``) can be used with positional arguments." msgstr "" -#: ../../library/argparse.rst:852 -msgid "" -">>> import argparse\n" -">>> parser = argparse.ArgumentParser()\n" -">>> parser.add_argument('--foo', action=argparse.BooleanOptionalAction)\n" -">>> parser.parse_args(['--no-foo'])\n" -"Namespace(foo=False)" -msgstr "" - -#: ../../library/argparse.rst:860 +#: ../../library/argparse.rst:848 msgid "" "The recommended way to create a custom action is to extend :class:`Action`, " "overriding the :meth:`!__call__` method and optionally the :meth:`!__init__` " @@ -1259,11 +1246,11 @@ msgid "" "their registered name." msgstr "" -#: ../../library/argparse.rst:865 +#: ../../library/argparse.rst:853 msgid "An example of a custom action::" msgstr "" -#: ../../library/argparse.rst:867 +#: ../../library/argparse.rst:855 msgid "" ">>> class FooAction(argparse.Action):\n" "... def __init__(self, option_strings, dest, nargs=None, **kwargs):\n" @@ -1284,15 +1271,15 @@ msgid "" "Namespace(bar='1', foo='2')" msgstr "" -#: ../../library/argparse.rst:885 +#: ../../library/argparse.rst:873 msgid "For more details, see :class:`Action`." msgstr "" -#: ../../library/argparse.rst:891 +#: ../../library/argparse.rst:879 msgid "nargs" msgstr "" -#: ../../library/argparse.rst:893 +#: ../../library/argparse.rst:881 msgid "" ":class:`ArgumentParser` objects usually associate a single command-line " "argument with a single action to be taken. The ``nargs`` keyword argument " @@ -1301,13 +1288,13 @@ msgid "" "are:" msgstr "" -#: ../../library/argparse.rst:898 +#: ../../library/argparse.rst:886 msgid "" "``N`` (an integer). ``N`` arguments from the command line will be gathered " "together into a list. For example::" msgstr "" -#: ../../library/argparse.rst:901 +#: ../../library/argparse.rst:889 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', nargs=2)\n" @@ -1316,13 +1303,13 @@ msgid "" "Namespace(bar=['c'], foo=['a', 'b'])" msgstr "" -#: ../../library/argparse.rst:907 +#: ../../library/argparse.rst:895 msgid "" "Note that ``nargs=1`` produces a list of one item. This is different from " "the default, in which the item is produced by itself." msgstr "" -#: ../../library/argparse.rst:912 +#: ../../library/argparse.rst:900 msgid "" "``'?'``. One argument will be consumed from the command line if possible, " "and produced as a single item. If no command-line argument is present, the " @@ -1332,7 +1319,7 @@ msgid "" "produced. Some examples to illustrate this::" msgstr "" -#: ../../library/argparse.rst:919 +#: ../../library/argparse.rst:907 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', nargs='?', const='c', default='d')\n" @@ -1345,13 +1332,13 @@ msgid "" "Namespace(bar='d', foo='d')" msgstr "" -#: ../../library/argparse.rst:929 +#: ../../library/argparse.rst:917 msgid "" "One of the more common uses of ``nargs='?'`` is to allow optional input and " "output files::" msgstr "" -#: ../../library/argparse.rst:932 +#: ../../library/argparse.rst:920 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('infile', nargs='?')\n" @@ -1364,7 +1351,7 @@ msgid "" "Namespace(infile=None, outfile=None)" msgstr "" -#: ../../library/argparse.rst:944 +#: ../../library/argparse.rst:932 msgid "" "``'*'``. All command-line arguments present are gathered into a list. Note " "that it generally doesn't make much sense to have more than one positional " @@ -1372,7 +1359,7 @@ msgid "" "``nargs='*'`` is possible. For example::" msgstr "" -#: ../../library/argparse.rst:949 +#: ../../library/argparse.rst:937 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', nargs='*')\n" @@ -1382,14 +1369,14 @@ msgid "" "Namespace(bar=['1', '2'], baz=['a', 'b'], foo=['x', 'y'])" msgstr "" -#: ../../library/argparse.rst:958 +#: ../../library/argparse.rst:946 msgid "" -"``'+'``. Just like ``'*'``, all command-line args present are gathered into " -"a list. Additionally, an error message will be generated if there wasn't at " -"least one command-line argument present. For example::" +"``'+'``. Just like ``'*'``, all command-line arguments present are gathered " +"into a list. Additionally, an error message will be generated if there " +"wasn't at least one command-line argument present. For example::" msgstr "" -#: ../../library/argparse.rst:962 +#: ../../library/argparse.rst:950 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('foo', nargs='+')\n" @@ -1400,7 +1387,7 @@ msgid "" "PROG: error: the following arguments are required: foo" msgstr "" -#: ../../library/argparse.rst:970 +#: ../../library/argparse.rst:958 msgid "" "If the ``nargs`` keyword argument is not provided, the number of arguments " "consumed is determined by the action_. Generally this means a single " @@ -1409,11 +1396,11 @@ msgid "" "``'store_const'``) set ``nargs=0``." msgstr "" -#: ../../library/argparse.rst:980 +#: ../../library/argparse.rst:968 msgid "const" msgstr "" -#: ../../library/argparse.rst:982 +#: ../../library/argparse.rst:970 msgid "" "The ``const`` argument of :meth:`~ArgumentParser.add_argument` is used to " "hold constant values that are not read from the command line but are " @@ -1421,7 +1408,7 @@ msgid "" "common uses of it are:" msgstr "" -#: ../../library/argparse.rst:986 +#: ../../library/argparse.rst:974 msgid "" "When :meth:`~ArgumentParser.add_argument` is called with " "``action='store_const'`` or ``action='append_const'``. These actions add " @@ -1431,7 +1418,7 @@ msgid "" "receive a default value of ``None``." msgstr "" -#: ../../library/argparse.rst:994 +#: ../../library/argparse.rst:982 msgid "" "When :meth:`~ArgumentParser.add_argument` is called with option strings " "(like ``-f`` or ``--foo``) and ``nargs='?'``. This creates an optional " @@ -1441,17 +1428,17 @@ msgid "" "to be ``None`` instead. See the nargs_ description for examples." msgstr "" -#: ../../library/argparse.rst:1001 +#: ../../library/argparse.rst:989 msgid "" "``const=None`` by default, including when ``action='append_const'`` or " "``action='store_const'``." msgstr "" -#: ../../library/argparse.rst:1008 +#: ../../library/argparse.rst:996 msgid "default" msgstr "" -#: ../../library/argparse.rst:1010 +#: ../../library/argparse.rst:998 msgid "" "All optional arguments and some positional arguments may be omitted at the " "command line. The ``default`` keyword argument of :meth:`~ArgumentParser." @@ -1461,7 +1448,7 @@ msgid "" "command line::" msgstr "" -#: ../../library/argparse.rst:1017 +#: ../../library/argparse.rst:1005 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', default=42)\n" @@ -1471,13 +1458,13 @@ msgid "" "Namespace(foo=42)" msgstr "" -#: ../../library/argparse.rst:1024 +#: ../../library/argparse.rst:1012 msgid "" "If the target namespace already has an attribute set, the action *default* " "will not overwrite it::" msgstr "" -#: ../../library/argparse.rst:1027 +#: ../../library/argparse.rst:1015 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', default=42)\n" @@ -1485,7 +1472,7 @@ msgid "" "Namespace(foo=101)" msgstr "" -#: ../../library/argparse.rst:1032 +#: ../../library/argparse.rst:1020 msgid "" "If the ``default`` value is a string, the parser parses the value as if it " "were a command-line argument. In particular, the parser applies any type_ " @@ -1493,7 +1480,7 @@ msgid "" "`Namespace` return value. Otherwise, the parser uses the value as is::" msgstr "" -#: ../../library/argparse.rst:1037 +#: ../../library/argparse.rst:1025 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--length', default='10', type=int)\n" @@ -1502,13 +1489,13 @@ msgid "" "Namespace(length=10, width=10.5)" msgstr "" -#: ../../library/argparse.rst:1043 +#: ../../library/argparse.rst:1031 msgid "" "For positional arguments with nargs_ equal to ``?`` or ``*``, the " "``default`` value is used when no command-line argument was present::" msgstr "" -#: ../../library/argparse.rst:1046 +#: ../../library/argparse.rst:1034 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('foo', nargs='?', default=42)\n" @@ -1518,20 +1505,20 @@ msgid "" "Namespace(foo=42)" msgstr "" -#: ../../library/argparse.rst:1053 +#: ../../library/argparse.rst:1041 msgid "" "For required_ arguments, the ``default`` value is ignored. For example, this " "applies to positional arguments with nargs_ values other than ``?`` or " "``*``, or optional arguments marked as ``required=True``." msgstr "" -#: ../../library/argparse.rst:1057 +#: ../../library/argparse.rst:1045 msgid "" "Providing ``default=argparse.SUPPRESS`` causes no attribute to be added if " "the command-line argument was not present::" msgstr "" -#: ../../library/argparse.rst:1060 +#: ../../library/argparse.rst:1048 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', default=argparse.SUPPRESS)\n" @@ -1541,11 +1528,11 @@ msgid "" "Namespace(foo='1')" msgstr "" -#: ../../library/argparse.rst:1071 +#: ../../library/argparse.rst:1059 msgid "type" msgstr "" -#: ../../library/argparse.rst:1073 +#: ../../library/argparse.rst:1061 msgid "" "By default, the parser reads command-line arguments in as simple strings. " "However, quite often the command-line string should instead be interpreted " @@ -1554,13 +1541,13 @@ msgid "" "checking and type conversions to be performed." msgstr "" -#: ../../library/argparse.rst:1079 +#: ../../library/argparse.rst:1067 msgid "" "If the type_ keyword is used with the default_ keyword, the type converter " "is only applied if the default is a string." msgstr "" -#: ../../library/argparse.rst:1082 +#: ../../library/argparse.rst:1070 msgid "" "The argument to ``type`` can be a callable that accepts a single string or " "the name of a registered type (see :meth:`~ArgumentParser.register`) If the " @@ -1569,11 +1556,11 @@ msgid "" "is displayed. Other exception types are not handled." msgstr "" -#: ../../library/argparse.rst:1088 +#: ../../library/argparse.rst:1076 msgid "Common built-in types and functions can be used as type converters:" msgstr "" -#: ../../library/argparse.rst:1090 +#: ../../library/argparse.rst:1078 msgid "" "import argparse\n" "import pathlib\n" @@ -1586,11 +1573,11 @@ msgid "" "parser.add_argument('datapath', type=pathlib.Path)" msgstr "" -#: ../../library/argparse.rst:1102 +#: ../../library/argparse.rst:1090 msgid "User defined functions can be used as well:" msgstr "" -#: ../../library/argparse.rst:1104 +#: ../../library/argparse.rst:1092 msgid "" ">>> def hyphenated(string):\n" "... return '-'.join([word[:4] for word in string.casefold().split()])\n" @@ -1601,14 +1588,14 @@ msgid "" "Namespace(short_title='\"the-tale-of-two-citi')" msgstr "" -#: ../../library/argparse.rst:1114 +#: ../../library/argparse.rst:1102 msgid "" "The :func:`bool` function is not recommended as a type converter. All it " "does is convert empty strings to ``False`` and non-empty strings to " "``True``. This is usually not what is desired." msgstr "" -#: ../../library/argparse.rst:1118 +#: ../../library/argparse.rst:1106 msgid "" "In general, the ``type`` keyword is a convenience that should only be used " "for simple conversions that can only raise one of the three supported " @@ -1616,7 +1603,7 @@ msgid "" "management should be done downstream after the arguments are parsed." msgstr "" -#: ../../library/argparse.rst:1123 +#: ../../library/argparse.rst:1111 msgid "" "For example, JSON or YAML conversions have complex error cases that require " "better reporting than can be given by the ``type`` keyword. A :exc:`~json." @@ -1624,7 +1611,7 @@ msgid "" "exception would not be handled at all." msgstr "" -#: ../../library/argparse.rst:1128 +#: ../../library/argparse.rst:1116 msgid "" "Even :class:`~argparse.FileType` has its limitations for use with the " "``type`` keyword. If one argument uses :class:`~argparse.FileType` and then " @@ -1634,17 +1621,17 @@ msgid "" "files." msgstr "" -#: ../../library/argparse.rst:1135 +#: ../../library/argparse.rst:1123 msgid "" "For type checkers that simply check against a fixed set of values, consider " "using the choices_ keyword instead." msgstr "" -#: ../../library/argparse.rst:1142 +#: ../../library/argparse.rst:1130 msgid "choices" msgstr "" -#: ../../library/argparse.rst:1144 +#: ../../library/argparse.rst:1132 msgid "" "Some command-line arguments should be selected from a restricted set of " "values. These can be handled by passing a sequence object as the *choices* " @@ -1653,7 +1640,7 @@ msgid "" "be displayed if the argument was not one of the acceptable values::" msgstr "" -#: ../../library/argparse.rst:1150 +#: ../../library/argparse.rst:1138 msgid "" ">>> parser = argparse.ArgumentParser(prog='game.py')\n" ">>> parser.add_argument('move', choices=['rock', 'paper', 'scissors'])\n" @@ -1665,26 +1652,26 @@ msgid "" "'paper', 'scissors')" msgstr "" -#: ../../library/argparse.rst:1159 +#: ../../library/argparse.rst:1147 msgid "" "Note that inclusion in the *choices* sequence is checked after any type_ " "conversions have been performed, so the type of the objects in the *choices* " "sequence should match the type_ specified." msgstr "" -#: ../../library/argparse.rst:1163 +#: ../../library/argparse.rst:1151 msgid "" "Any sequence can be passed as the *choices* value, so :class:`list` " "objects, :class:`tuple` objects, and custom sequences are all supported." msgstr "" -#: ../../library/argparse.rst:1166 +#: ../../library/argparse.rst:1154 msgid "" "Use of :class:`enum.Enum` is not recommended because it is difficult to " "control its appearance in usage, help, and error messages." msgstr "" -#: ../../library/argparse.rst:1169 +#: ../../library/argparse.rst:1157 msgid "" "Formatted choices override the default *metavar* which is normally derived " "from *dest*. This is usually what you want because the user never sees the " @@ -1692,11 +1679,11 @@ msgid "" "are many choices), just specify an explicit metavar_." msgstr "" -#: ../../library/argparse.rst:1178 +#: ../../library/argparse.rst:1166 msgid "required" msgstr "" -#: ../../library/argparse.rst:1180 +#: ../../library/argparse.rst:1168 msgid "" "In general, the :mod:`!argparse` module assumes that flags like ``-f`` and " "``--bar`` indicate *optional* arguments, which can always be omitted at the " @@ -1704,7 +1691,7 @@ msgid "" "the ``required=`` keyword argument to :meth:`~ArgumentParser.add_argument`::" msgstr "" -#: ../../library/argparse.rst:1185 +#: ../../library/argparse.rst:1173 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', required=True)\n" @@ -1715,24 +1702,24 @@ msgid "" ": error: the following arguments are required: --foo" msgstr "" -#: ../../library/argparse.rst:1193 +#: ../../library/argparse.rst:1181 msgid "" "As the example shows, if an option is marked as ``required``, :meth:" "`~ArgumentParser.parse_args` will report an error if that option is not " "present at the command line." msgstr "" -#: ../../library/argparse.rst:1199 +#: ../../library/argparse.rst:1187 msgid "" "Required options are generally considered bad form because users expect " "*options* to be *optional*, and thus they should be avoided when possible." msgstr "" -#: ../../library/argparse.rst:1206 +#: ../../library/argparse.rst:1194 msgid "help" msgstr "" -#: ../../library/argparse.rst:1208 +#: ../../library/argparse.rst:1196 msgid "" "The ``help`` value is a string containing a brief description of the " "argument. When a user requests help (usually by using ``-h`` or ``--help`` " @@ -1740,7 +1727,7 @@ msgid "" "each argument." msgstr "" -#: ../../library/argparse.rst:1213 +#: ../../library/argparse.rst:1201 msgid "" "The ``help`` strings can include various format specifiers to avoid " "repetition of things like the program name or the argument default_. The " @@ -1749,7 +1736,7 @@ msgid "" "``%(type)s``, etc.::" msgstr "" -#: ../../library/argparse.rst:1218 +#: ../../library/argparse.rst:1206 msgid "" ">>> parser = argparse.ArgumentParser(prog='frobble')\n" ">>> parser.add_argument('bar', nargs='?', type=int, default=42,\n" @@ -1764,19 +1751,19 @@ msgid "" " -h, --help show this help message and exit" msgstr "" -#: ../../library/argparse.rst:1230 +#: ../../library/argparse.rst:1218 msgid "" "As the help string supports %-formatting, if you want a literal ``%`` to " "appear in the help string, you must escape it as ``%%``." msgstr "" -#: ../../library/argparse.rst:1233 +#: ../../library/argparse.rst:1221 msgid "" ":mod:`!argparse` supports silencing the help entry for certain options, by " "setting the ``help`` value to ``argparse.SUPPRESS``::" msgstr "" -#: ../../library/argparse.rst:1236 +#: ../../library/argparse.rst:1224 msgid "" ">>> parser = argparse.ArgumentParser(prog='frobble')\n" ">>> parser.add_argument('--foo', help=argparse.SUPPRESS)\n" @@ -1787,11 +1774,11 @@ msgid "" " -h, --help show this help message and exit" msgstr "" -#: ../../library/argparse.rst:1248 +#: ../../library/argparse.rst:1236 msgid "metavar" msgstr "" -#: ../../library/argparse.rst:1250 +#: ../../library/argparse.rst:1238 msgid "" "When :class:`ArgumentParser` generates help messages, it needs some way to " "refer to each expected argument. By default, :class:`!ArgumentParser` " @@ -1803,7 +1790,7 @@ msgid "" "command-line argument will be referred to as ``FOO``. An example::" msgstr "" -#: ../../library/argparse.rst:1259 +#: ../../library/argparse.rst:1247 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo')\n" @@ -1821,11 +1808,11 @@ msgid "" " --foo FOO" msgstr "" -#: ../../library/argparse.rst:1274 +#: ../../library/argparse.rst:1262 msgid "An alternative name can be specified with ``metavar``::" msgstr "" -#: ../../library/argparse.rst:1276 +#: ../../library/argparse.rst:1264 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', metavar='YYY')\n" @@ -1843,21 +1830,21 @@ msgid "" " --foo YYY" msgstr "" -#: ../../library/argparse.rst:1291 +#: ../../library/argparse.rst:1279 msgid "" "Note that ``metavar`` only changes the *displayed* name - the name of the " "attribute on the :meth:`~ArgumentParser.parse_args` object is still " "determined by the dest_ value." msgstr "" -#: ../../library/argparse.rst:1295 +#: ../../library/argparse.rst:1283 msgid "" "Different values of ``nargs`` may cause the metavar to be used multiple " "times. Providing a tuple to ``metavar`` specifies a different display for " "each of the arguments::" msgstr "" -#: ../../library/argparse.rst:1299 +#: ../../library/argparse.rst:1287 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('-x', nargs=2)\n" @@ -1871,11 +1858,11 @@ msgid "" " --foo bar baz" msgstr "" -#: ../../library/argparse.rst:1314 +#: ../../library/argparse.rst:1302 msgid "dest" msgstr "" -#: ../../library/argparse.rst:1316 +#: ../../library/argparse.rst:1304 msgid "" "Most :class:`ArgumentParser` actions add some value as an attribute of the " "object returned by :meth:`~ArgumentParser.parse_args`. The name of this " @@ -1885,7 +1872,7 @@ msgid "" "add_argument`::" msgstr "" -#: ../../library/argparse.rst:1323 +#: ../../library/argparse.rst:1311 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('bar')\n" @@ -1893,7 +1880,7 @@ msgid "" "Namespace(bar='XXX')" msgstr "" -#: ../../library/argparse.rst:1328 +#: ../../library/argparse.rst:1316 msgid "" "For optional argument actions, the value of ``dest`` is normally inferred " "from the option strings. :class:`ArgumentParser` generates the value of " @@ -1905,7 +1892,7 @@ msgid "" "below illustrate this behavior::" msgstr "" -#: ../../library/argparse.rst:1337 +#: ../../library/argparse.rst:1325 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('-f', '--foo-bar', '--foo')\n" @@ -1916,11 +1903,11 @@ msgid "" "Namespace(foo_bar='1', x='2')" msgstr "" -#: ../../library/argparse.rst:1345 +#: ../../library/argparse.rst:1333 msgid "``dest`` allows a custom attribute name to be provided::" msgstr "" -#: ../../library/argparse.rst:1347 +#: ../../library/argparse.rst:1335 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', dest='bar')\n" @@ -1928,11 +1915,11 @@ msgid "" "Namespace(bar='XXX')" msgstr "" -#: ../../library/argparse.rst:1356 +#: ../../library/argparse.rst:1344 msgid "deprecated" msgstr "" -#: ../../library/argparse.rst:1358 +#: ../../library/argparse.rst:1346 msgid "" "During a project's lifetime, some arguments may need to be removed from the " "command line. Before removing them, you should inform your users that the " @@ -1943,7 +1930,7 @@ msgid "" "will be printed to :data:`sys.stderr` when the argument is used::" msgstr "" -#: ../../library/argparse.rst:1368 +#: ../../library/argparse.rst:1356 msgid "" ">>> import argparse\n" ">>> parser = argparse.ArgumentParser(prog='snake.py')\n" @@ -1955,11 +1942,11 @@ msgid "" "Namespace(legs=4)" msgstr "" -#: ../../library/argparse.rst:1381 +#: ../../library/argparse.rst:1369 msgid "Action classes" msgstr "" -#: ../../library/argparse.rst:1383 +#: ../../library/argparse.rst:1371 msgid "" ":class:`!Action` classes implement the Action API, a callable which returns " "a callable which processes arguments from the command-line. Any object which " @@ -1967,7 +1954,7 @@ msgid "" "`~ArgumentParser.add_argument`." msgstr "" -#: ../../library/argparse.rst:1392 +#: ../../library/argparse.rst:1380 msgid "" ":class:`!Action` objects are used by an :class:`ArgumentParser` to represent " "the information needed to parse a single argument from one or more strings " @@ -1976,7 +1963,7 @@ msgid "" "`ArgumentParser.add_argument` except for the ``action`` itself." msgstr "" -#: ../../library/argparse.rst:1398 +#: ../../library/argparse.rst:1386 msgid "" "Instances of :class:`!Action` (or return value of any callable to the " "``action`` parameter) should have attributes :attr:`!dest`, :attr:`!" @@ -1985,46 +1972,46 @@ msgid "" "is to call :meth:`!Action.__init__`." msgstr "" -#: ../../library/argparse.rst:1406 +#: ../../library/argparse.rst:1394 msgid "" ":class:`!Action` instances should be callable, so subclasses must override " "the :meth:`!__call__` method, which should accept four parameters:" msgstr "" -#: ../../library/argparse.rst:1409 +#: ../../library/argparse.rst:1397 msgid "" "*parser* - The :class:`ArgumentParser` object which contains this action." msgstr "" -#: ../../library/argparse.rst:1411 +#: ../../library/argparse.rst:1399 msgid "" "*namespace* - The :class:`Namespace` object that will be returned by :meth:" "`~ArgumentParser.parse_args`. Most actions add an attribute to this object " "using :func:`setattr`." msgstr "" -#: ../../library/argparse.rst:1415 +#: ../../library/argparse.rst:1403 msgid "" "*values* - The associated command-line arguments, with any type conversions " "applied. Type conversions are specified with the type_ keyword argument to :" "meth:`~ArgumentParser.add_argument`." msgstr "" -#: ../../library/argparse.rst:1419 +#: ../../library/argparse.rst:1407 msgid "" "*option_string* - The option string that was used to invoke this action. The " "``option_string`` argument is optional, and will be absent if the action is " "associated with a positional argument." msgstr "" -#: ../../library/argparse.rst:1423 +#: ../../library/argparse.rst:1411 msgid "" "The :meth:`!__call__` method may perform arbitrary actions, but will " "typically set attributes on the ``namespace`` based on ``dest`` and " "``values``." msgstr "" -#: ../../library/argparse.rst:1428 +#: ../../library/argparse.rst:1416 msgid "" ":class:`!Action` subclasses can define a :meth:`!format_usage` method that " "takes no argument and return a string which will be used when printing the " @@ -2032,47 +2019,64 @@ msgid "" "will be used." msgstr "" -#: ../../library/argparse.rst:1434 +#: ../../library/argparse.rst:1422 +msgid "" +"A subclass of :class:`Action` for handling boolean flags with positive and " +"negative options. Adding a single argument such as ``--foo`` automatically " +"creates both ``--foo`` and ``--no-foo`` options, storing ``True`` and " +"``False`` respectively::" +msgstr "" + +#: ../../library/argparse.rst:1427 +msgid "" +">>> import argparse\n" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('--foo', action=argparse.BooleanOptionalAction)\n" +">>> parser.parse_args(['--no-foo'])\n" +"Namespace(foo=False)" +msgstr "" + +#: ../../library/argparse.rst:1437 msgid "The parse_args() method" msgstr "" -#: ../../library/argparse.rst:1438 +#: ../../library/argparse.rst:1441 msgid "" "Convert argument strings to objects and assign them as attributes of the " "namespace. Return the populated namespace." msgstr "" -#: ../../library/argparse.rst:1441 +#: ../../library/argparse.rst:1444 msgid "" "Previous calls to :meth:`add_argument` determine exactly what objects are " "created and how they are assigned. See the documentation for :meth:`!" "add_argument` for details." msgstr "" -#: ../../library/argparse.rst:1445 +#: ../../library/argparse.rst:1448 msgid "" "args_ - List of strings to parse. The default is taken from :data:`sys." "argv`." msgstr "" -#: ../../library/argparse.rst:1448 +#: ../../library/argparse.rst:1451 msgid "" "namespace_ - An object to take the attributes. The default is a new empty :" "class:`Namespace` object." msgstr "" -#: ../../library/argparse.rst:1453 +#: ../../library/argparse.rst:1456 msgid "Option value syntax" msgstr "" -#: ../../library/argparse.rst:1455 +#: ../../library/argparse.rst:1458 msgid "" "The :meth:`~ArgumentParser.parse_args` method supports several ways of " "specifying the value of an option (if it takes one). In the simplest case, " "the option and its value are passed as two separate arguments::" msgstr "" -#: ../../library/argparse.rst:1459 +#: ../../library/argparse.rst:1462 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('-x')\n" @@ -2083,38 +2087,38 @@ msgid "" "Namespace(foo='FOO', x=None)" msgstr "" -#: ../../library/argparse.rst:1467 +#: ../../library/argparse.rst:1470 msgid "" "For long options (options with names longer than a single character), the " "option and value can also be passed as a single command-line argument, using " "``=`` to separate them::" msgstr "" -#: ../../library/argparse.rst:1471 +#: ../../library/argparse.rst:1474 msgid "" ">>> parser.parse_args(['--foo=FOO'])\n" "Namespace(foo='FOO', x=None)" msgstr "" -#: ../../library/argparse.rst:1474 +#: ../../library/argparse.rst:1477 msgid "" "For short options (options only one character long), the option and its " "value can be concatenated::" msgstr "" -#: ../../library/argparse.rst:1477 +#: ../../library/argparse.rst:1480 msgid "" ">>> parser.parse_args(['-xX'])\n" "Namespace(foo=None, x='X')" msgstr "" -#: ../../library/argparse.rst:1480 +#: ../../library/argparse.rst:1483 msgid "" "Several short options can be joined together, using only a single ``-`` " "prefix, as long as only the last option (or none of them) requires a value::" msgstr "" -#: ../../library/argparse.rst:1483 +#: ../../library/argparse.rst:1486 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('-x', action='store_true')\n" @@ -2124,11 +2128,11 @@ msgid "" "Namespace(x=True, y=True, z='Z')" msgstr "" -#: ../../library/argparse.rst:1492 +#: ../../library/argparse.rst:1495 msgid "Invalid arguments" msgstr "" -#: ../../library/argparse.rst:1494 +#: ../../library/argparse.rst:1497 msgid "" "While parsing the command line, :meth:`~ArgumentParser.parse_args` checks " "for a variety of errors, including ambiguous options, invalid types, invalid " @@ -2136,7 +2140,7 @@ msgid "" "an error, it exits and prints the error along with a usage message::" msgstr "" -#: ../../library/argparse.rst:1499 +#: ../../library/argparse.rst:1502 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('--foo', type=int)\n" @@ -2158,11 +2162,11 @@ msgid "" "PROG: error: extra arguments found: badger" msgstr "" -#: ../../library/argparse.rst:1520 +#: ../../library/argparse.rst:1523 msgid "Arguments containing ``-``" msgstr "" -#: ../../library/argparse.rst:1522 +#: ../../library/argparse.rst:1525 msgid "" "The :meth:`~ArgumentParser.parse_args` method attempts to give errors " "whenever the user has clearly made a mistake, but some situations are " @@ -2174,7 +2178,7 @@ msgid "" "negative numbers::" msgstr "" -#: ../../library/argparse.rst:1530 +#: ../../library/argparse.rst:1533 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('-x')\n" @@ -2207,7 +2211,7 @@ msgid "" "PROG: error: argument -1: expected one argument" msgstr "" -#: ../../library/argparse.rst:1560 +#: ../../library/argparse.rst:1563 msgid "" "If you have positional arguments that must begin with ``-`` and don't look " "like negative numbers, you can insert the pseudo-argument ``'--'`` which " @@ -2215,30 +2219,30 @@ msgid "" "positional argument::" msgstr "" -#: ../../library/argparse.rst:1565 +#: ../../library/argparse.rst:1568 msgid "" ">>> parser.parse_args(['--', '-f'])\n" "Namespace(foo='-f', one=None)" msgstr "" -#: ../../library/argparse.rst:1568 +#: ../../library/argparse.rst:1571 msgid "" "See also :ref:`the argparse howto on ambiguous arguments ` for more details." msgstr "" -#: ../../library/argparse.rst:1574 +#: ../../library/argparse.rst:1577 msgid "Argument abbreviations (prefix matching)" msgstr "" -#: ../../library/argparse.rst:1576 +#: ../../library/argparse.rst:1579 msgid "" "The :meth:`~ArgumentParser.parse_args` method :ref:`by default " "` allows long options to be abbreviated to a prefix, if the " "abbreviation is unambiguous (the prefix matches a unique option)::" msgstr "" -#: ../../library/argparse.rst:1580 +#: ../../library/argparse.rst:1583 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('-bacon')\n" @@ -2252,17 +2256,17 @@ msgid "" "PROG: error: ambiguous option: -ba could match -badger, -bacon" msgstr "" -#: ../../library/argparse.rst:1591 +#: ../../library/argparse.rst:1594 msgid "" "An error is produced for arguments that could produce more than one options. " "This feature can be disabled by setting :ref:`allow_abbrev` to ``False``." msgstr "" -#: ../../library/argparse.rst:1597 +#: ../../library/argparse.rst:1600 msgid "Beyond ``sys.argv``" msgstr "" -#: ../../library/argparse.rst:1599 +#: ../../library/argparse.rst:1602 msgid "" "Sometimes it may be useful to have an :class:`ArgumentParser` parse " "arguments other than those of :data:`sys.argv`. This can be accomplished by " @@ -2270,7 +2274,7 @@ msgid "" "useful for testing at the interactive prompt::" msgstr "" -#: ../../library/argparse.rst:1604 +#: ../../library/argparse.rst:1607 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument(\n" @@ -2285,24 +2289,24 @@ msgid "" "Namespace(accumulate=, integers=[1, 2, 3, 4])" msgstr "" -#: ../../library/argparse.rst:1619 +#: ../../library/argparse.rst:1622 msgid "The Namespace object" msgstr "" -#: ../../library/argparse.rst:1623 +#: ../../library/argparse.rst:1626 msgid "" "Simple class used by default by :meth:`~ArgumentParser.parse_args` to create " "an object holding attributes and return it." msgstr "" -#: ../../library/argparse.rst:1626 +#: ../../library/argparse.rst:1629 msgid "" "This class is deliberately simple, just an :class:`object` subclass with a " "readable string representation. If you prefer to have dict-like view of the " "attributes, you can use the standard Python idiom, :func:`vars`::" msgstr "" -#: ../../library/argparse.rst:1630 +#: ../../library/argparse.rst:1633 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo')\n" @@ -2311,14 +2315,14 @@ msgid "" "{'foo': 'BAR'}" msgstr "" -#: ../../library/argparse.rst:1636 +#: ../../library/argparse.rst:1639 msgid "" "It may also be useful to have an :class:`ArgumentParser` assign attributes " "to an already existing object, rather than a new :class:`Namespace` object. " "This can be achieved by specifying the ``namespace=`` keyword argument::" msgstr "" -#: ../../library/argparse.rst:1640 +#: ../../library/argparse.rst:1643 msgid "" ">>> class C:\n" "... pass\n" @@ -2331,15 +2335,15 @@ msgid "" "'BAR'" msgstr "" -#: ../../library/argparse.rst:1652 +#: ../../library/argparse.rst:1655 msgid "Other utilities" msgstr "" -#: ../../library/argparse.rst:1655 +#: ../../library/argparse.rst:1658 msgid "Sub-commands" msgstr "" -#: ../../library/argparse.rst:1662 +#: ../../library/argparse.rst:1665 msgid "" "Many programs split up their functionality into a number of subcommands, for " "example, the ``svn`` program can invoke subcommands like ``svn checkout``, " @@ -2354,69 +2358,69 @@ msgid "" "returns an :class:`!ArgumentParser` object that can be modified as usual." msgstr "" -#: ../../library/argparse.rst:1674 +#: ../../library/argparse.rst:1677 msgid "Description of parameters:" msgstr "" -#: ../../library/argparse.rst:1676 +#: ../../library/argparse.rst:1679 msgid "" "*title* - title for the sub-parser group in help output; by default " "\"subcommands\" if description is provided, otherwise uses title for " "positional arguments" msgstr "" -#: ../../library/argparse.rst:1680 +#: ../../library/argparse.rst:1683 msgid "" "*description* - description for the sub-parser group in help output, by " "default ``None``" msgstr "" -#: ../../library/argparse.rst:1683 +#: ../../library/argparse.rst:1686 msgid "" "*prog* - usage information that will be displayed with sub-command help, by " "default the name of the program and any positional arguments before the " "subparser argument" msgstr "" -#: ../../library/argparse.rst:1687 +#: ../../library/argparse.rst:1690 msgid "" "*parser_class* - class which will be used to create sub-parser instances, by " "default the class of the current parser (e.g. :class:`ArgumentParser`)" msgstr "" -#: ../../library/argparse.rst:1690 +#: ../../library/argparse.rst:1693 msgid "" "action_ - the basic type of action to be taken when this argument is " "encountered at the command line" msgstr "" -#: ../../library/argparse.rst:1693 +#: ../../library/argparse.rst:1696 msgid "" "dest_ - name of the attribute under which sub-command name will be stored; " "by default ``None`` and no value is stored" msgstr "" -#: ../../library/argparse.rst:1696 +#: ../../library/argparse.rst:1699 msgid "" "required_ - Whether or not a subcommand must be provided, by default " "``False`` (added in 3.7)" msgstr "" -#: ../../library/argparse.rst:1699 +#: ../../library/argparse.rst:1702 msgid "help_ - help for sub-parser group in help output, by default ``None``" msgstr "" -#: ../../library/argparse.rst:1701 +#: ../../library/argparse.rst:1704 msgid "" "metavar_ - string presenting available subcommands in help; by default it is " "``None`` and presents subcommands in form {cmd1, cmd2, ..}" msgstr "" -#: ../../library/argparse.rst:1704 +#: ../../library/argparse.rst:1707 msgid "Some example usage::" msgstr "" -#: ../../library/argparse.rst:1706 +#: ../../library/argparse.rst:1709 msgid "" ">>> # create the top-level parser\n" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" @@ -2439,7 +2443,7 @@ msgid "" "Namespace(baz='Z', foo=True)" msgstr "" -#: ../../library/argparse.rst:1725 +#: ../../library/argparse.rst:1728 msgid "" "Note that the object returned by :meth:`parse_args` will only contain " "attributes for the main parser and the subparser that was selected by the " @@ -2449,7 +2453,7 @@ msgid "" "``baz`` attributes are present." msgstr "" -#: ../../library/argparse.rst:1732 +#: ../../library/argparse.rst:1735 msgid "" "Similarly, when a help message is requested from a subparser, only the help " "for that particular parser will be printed. The help message will not " @@ -2458,7 +2462,7 @@ msgid "" "to :meth:`~_SubParsersAction.add_parser` as above.)" msgstr "" -#: ../../library/argparse.rst:1740 +#: ../../library/argparse.rst:1743 msgid "" ">>> parser.parse_args(['--help'])\n" "usage: PROG [-h] [--foo] {a,b} ...\n" @@ -2489,14 +2493,14 @@ msgid "" " --baz {X,Y,Z} baz help" msgstr "" -#: ../../library/argparse.rst:1768 +#: ../../library/argparse.rst:1771 msgid "" "The :meth:`add_subparsers` method also supports ``title`` and " "``description`` keyword arguments. When either is present, the subparser's " "commands will appear in their own group in the help output. For example::" msgstr "" -#: ../../library/argparse.rst:1772 +#: ../../library/argparse.rst:1775 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> subparsers = parser.add_subparsers(title='subcommands',\n" @@ -2516,7 +2520,7 @@ msgid "" " {foo,bar} additional help" msgstr "" -#: ../../library/argparse.rst:1789 +#: ../../library/argparse.rst:1792 msgid "" "Furthermore, :meth:`~_SubParsersAction.add_parser` supports an additional " "*aliases* argument, which allows multiple strings to refer to the same " @@ -2524,7 +2528,7 @@ msgid "" "``checkout``::" msgstr "" -#: ../../library/argparse.rst:1794 +#: ../../library/argparse.rst:1797 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> subparsers = parser.add_subparsers()\n" @@ -2534,13 +2538,13 @@ msgid "" "Namespace(foo='bar')" msgstr "" -#: ../../library/argparse.rst:1801 +#: ../../library/argparse.rst:1804 msgid "" ":meth:`~_SubParsersAction.add_parser` supports also an additional " "*deprecated* argument, which allows to deprecate the subparser." msgstr "" -#: ../../library/argparse.rst:1815 +#: ../../library/argparse.rst:1818 msgid "" "One particularly effective way of handling subcommands is to combine the use " "of the :meth:`add_subparsers` method with calls to :meth:`set_defaults` so " @@ -2548,7 +2552,7 @@ msgid "" "example::" msgstr "" -#: ../../library/argparse.rst:1820 +#: ../../library/argparse.rst:1823 msgid "" ">>> # subcommand functions\n" ">>> def foo(args):\n" @@ -2583,7 +2587,7 @@ msgid "" "((XYZYX))" msgstr "" -#: ../../library/argparse.rst:1852 +#: ../../library/argparse.rst:1855 msgid "" "This way, you can let :meth:`parse_args` do the job of calling the " "appropriate function after argument parsing is complete. Associating " @@ -2593,7 +2597,7 @@ msgid "" "argument to the :meth:`add_subparsers` call will work::" msgstr "" -#: ../../library/argparse.rst:1859 +#: ../../library/argparse.rst:1862 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> subparsers = parser.add_subparsers(dest='subparser_name')\n" @@ -2605,21 +2609,21 @@ msgid "" "Namespace(subparser_name='2', y='frobble')" msgstr "" -#: ../../library/argparse.rst:1868 +#: ../../library/argparse.rst:1871 msgid "New *required* keyword-only parameter." msgstr "" -#: ../../library/argparse.rst:1871 +#: ../../library/argparse.rst:1874 msgid "" "Subparser's *prog* is no longer affected by a custom usage message in the " "main parser." msgstr "" -#: ../../library/argparse.rst:1877 +#: ../../library/argparse.rst:1880 msgid "FileType objects" msgstr "" -#: ../../library/argparse.rst:1881 +#: ../../library/argparse.rst:1884 msgid "" "The :class:`FileType` factory creates objects that can be passed to the type " "argument of :meth:`ArgumentParser.add_argument`. Arguments that have :class:" @@ -2628,7 +2632,7 @@ msgid "" "the :func:`open` function for more details)::" msgstr "" -#: ../../library/argparse.rst:1887 +#: ../../library/argparse.rst:1890 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--raw', type=argparse.FileType('wb', 0))\n" @@ -2639,14 +2643,14 @@ msgid "" "raw=<_io.FileIO name='raw.dat' mode='wb'>)" msgstr "" -#: ../../library/argparse.rst:1893 +#: ../../library/argparse.rst:1896 msgid "" "FileType objects understand the pseudo-argument ``'-'`` and automatically " "convert this into :data:`sys.stdin` for readable :class:`FileType` objects " "and :data:`sys.stdout` for writable :class:`FileType` objects::" msgstr "" -#: ../../library/argparse.rst:1897 +#: ../../library/argparse.rst:1900 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('infile', type=argparse.FileType('r'))\n" @@ -2654,7 +2658,7 @@ msgid "" "Namespace(infile=<_io.TextIOWrapper name='' encoding='UTF-8'>)" msgstr "" -#: ../../library/argparse.rst:1904 +#: ../../library/argparse.rst:1907 msgid "" "If one argument uses *FileType* and then a subsequent argument fails, an " "error is reported but the file is not automatically closed. This can also " @@ -2663,15 +2667,15 @@ msgid "" "manage the files." msgstr "" -#: ../../library/argparse.rst:1910 +#: ../../library/argparse.rst:1913 msgid "Added the *encodings* and *errors* parameters." msgstr "" -#: ../../library/argparse.rst:1917 +#: ../../library/argparse.rst:1920 msgid "Argument groups" msgstr "" -#: ../../library/argparse.rst:1922 +#: ../../library/argparse.rst:1925 msgid "" "By default, :class:`ArgumentParser` groups command-line arguments into " "\"positional arguments\" and \"options\" when displaying help messages. When " @@ -2680,7 +2684,7 @@ msgid "" "method::" msgstr "" -#: ../../library/argparse.rst:1928 +#: ../../library/argparse.rst:1931 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG', add_help=False)\n" ">>> group = parser.add_argument_group('group')\n" @@ -2694,7 +2698,7 @@ msgid "" " --foo FOO foo help" msgstr "" -#: ../../library/argparse.rst:1939 +#: ../../library/argparse.rst:1942 msgid "" "The :meth:`add_argument_group` method returns an argument group object which " "has an :meth:`~ArgumentParser.add_argument` method just like a regular :" @@ -2705,7 +2709,7 @@ msgid "" "this display::" msgstr "" -#: ../../library/argparse.rst:1947 +#: ../../library/argparse.rst:1950 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG', add_help=False)\n" ">>> group1 = parser.add_argument_group('group1', 'group1 description')\n" @@ -2726,7 +2730,7 @@ msgid "" " --bar BAR bar help" msgstr "" -#: ../../library/argparse.rst:1965 +#: ../../library/argparse.rst:1968 msgid "" "The optional, keyword-only parameters argument_default_ and " "conflict_handler_ allow for finer-grained control of the behavior of the " @@ -2735,35 +2739,35 @@ msgid "" "rather than the entire parser." msgstr "" -#: ../../library/argparse.rst:1970 +#: ../../library/argparse.rst:1973 msgid "" "Note that any arguments not in your user-defined groups will end up back in " "the usual \"positional arguments\" and \"optional arguments\" sections." msgstr "" -#: ../../library/argparse.rst:1973 +#: ../../library/argparse.rst:1976 msgid "" "Calling :meth:`add_argument_group` on an argument group now raises an " "exception. This nesting was never supported, often failed to work correctly, " "and was unintentionally exposed through inheritance." msgstr "" -#: ../../library/argparse.rst:1978 +#: ../../library/argparse.rst:1981 msgid "Passing prefix_chars_ to :meth:`add_argument_group` is now deprecated." msgstr "" -#: ../../library/argparse.rst:1984 +#: ../../library/argparse.rst:1987 msgid "Mutual exclusion" msgstr "" -#: ../../library/argparse.rst:1988 +#: ../../library/argparse.rst:1991 msgid "" "Create a mutually exclusive group. :mod:`!argparse` will make sure that only " "one of the arguments in the mutually exclusive group was present on the " "command line::" msgstr "" -#: ../../library/argparse.rst:1992 +#: ../../library/argparse.rst:1995 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> group = parser.add_mutually_exclusive_group()\n" @@ -2778,14 +2782,14 @@ msgid "" "PROG: error: argument --bar: not allowed with argument --foo" msgstr "" -#: ../../library/argparse.rst:2004 +#: ../../library/argparse.rst:2007 msgid "" "The :meth:`add_mutually_exclusive_group` method also accepts a *required* " "argument, to indicate that at least one of the mutually exclusive arguments " "is required::" msgstr "" -#: ../../library/argparse.rst:2008 +#: ../../library/argparse.rst:2011 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> group = parser.add_mutually_exclusive_group(required=True)\n" @@ -2796,7 +2800,7 @@ msgid "" "PROG: error: one of the arguments --foo --bar is required" msgstr "" -#: ../../library/argparse.rst:2016 +#: ../../library/argparse.rst:2019 msgid "" "Note that currently mutually exclusive argument groups do not support the " "*title* and *description* arguments of :meth:`~ArgumentParser." @@ -2804,7 +2808,7 @@ msgid "" "argument group that has a title and description. For example::" msgstr "" -#: ../../library/argparse.rst:2022 +#: ../../library/argparse.rst:2025 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> group = parser.add_argument_group('Group title', 'Group description')\n" @@ -2824,7 +2828,7 @@ msgid "" " --bar BAR bar help" msgstr "" -#: ../../library/argparse.rst:2039 +#: ../../library/argparse.rst:2042 msgid "" "Calling :meth:`add_argument_group` or :meth:`add_mutually_exclusive_group` " "on a mutually exclusive group now raises an exception. This nesting was " @@ -2832,11 +2836,11 @@ msgid "" "exposed through inheritance." msgstr "" -#: ../../library/argparse.rst:2047 +#: ../../library/argparse.rst:2050 msgid "Parser defaults" msgstr "" -#: ../../library/argparse.rst:2051 +#: ../../library/argparse.rst:2054 msgid "" "Most of the time, the attributes of the object returned by :meth:" "`parse_args` will be fully determined by inspecting the command-line " @@ -2845,7 +2849,7 @@ msgid "" "command line to be added::" msgstr "" -#: ../../library/argparse.rst:2057 +#: ../../library/argparse.rst:2060 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('foo', type=int)\n" @@ -2854,12 +2858,12 @@ msgid "" "Namespace(bar=42, baz='badger', foo=736)" msgstr "" -#: ../../library/argparse.rst:2063 +#: ../../library/argparse.rst:2066 msgid "" "Note that parser-level defaults always override argument-level defaults::" msgstr "" -#: ../../library/argparse.rst:2065 +#: ../../library/argparse.rst:2068 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', default='bar')\n" @@ -2868,20 +2872,20 @@ msgid "" "Namespace(foo='spam')" msgstr "" -#: ../../library/argparse.rst:2071 +#: ../../library/argparse.rst:2074 msgid "" "Parser-level defaults can be particularly useful when working with multiple " "parsers. See the :meth:`~ArgumentParser.add_subparsers` method for an " "example of this type." msgstr "" -#: ../../library/argparse.rst:2077 +#: ../../library/argparse.rst:2080 msgid "" "Get the default value for a namespace attribute, as set by either :meth:" "`~ArgumentParser.add_argument` or by :meth:`~ArgumentParser.set_defaults`::" msgstr "" -#: ../../library/argparse.rst:2081 +#: ../../library/argparse.rst:2084 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', default='badger')\n" @@ -2889,65 +2893,70 @@ msgid "" "'badger'" msgstr "" -#: ../../library/argparse.rst:2088 +#: ../../library/argparse.rst:2091 msgid "Printing help" msgstr "" -#: ../../library/argparse.rst:2090 +#: ../../library/argparse.rst:2093 msgid "" "In most typical applications, :meth:`~ArgumentParser.parse_args` will take " "care of formatting and printing any usage or error messages. However, " "several formatting methods are available:" msgstr "" -#: ../../library/argparse.rst:2096 +#: ../../library/argparse.rst:2099 msgid "" "Print a brief description of how the :class:`ArgumentParser` should be " "invoked on the command line. If *file* is ``None``, :data:`sys.stdout` is " "assumed." msgstr "" -#: ../../library/argparse.rst:2102 +#: ../../library/argparse.rst:2105 msgid "" "Print a help message, including the program usage and information about the " "arguments registered with the :class:`ArgumentParser`. If *file* is " "``None``, :data:`sys.stdout` is assumed." msgstr "" -#: ../../library/argparse.rst:2106 +#: ../../library/argparse.rst:2109 msgid "" "There are also variants of these methods that simply return a string instead " "of printing it:" msgstr "" -#: ../../library/argparse.rst:2111 +#: ../../library/argparse.rst:2114 msgid "" "Return a string containing a brief description of how the :class:" "`ArgumentParser` should be invoked on the command line." msgstr "" -#: ../../library/argparse.rst:2116 +#: ../../library/argparse.rst:2119 msgid "" "Return a string containing a help message, including the program usage and " "information about the arguments registered with the :class:`ArgumentParser`." msgstr "" -#: ../../library/argparse.rst:2121 +#: ../../library/argparse.rst:2124 msgid "Partial parsing" msgstr "" -#: ../../library/argparse.rst:2125 +#: ../../library/argparse.rst:2128 msgid "" -"Sometimes a script may only parse a few of the command-line arguments, " -"passing the remaining arguments on to another script or program. In these " -"cases, the :meth:`~ArgumentParser.parse_known_args` method can be useful. " -"It works much like :meth:`~ArgumentParser.parse_args` except that it does " -"not produce an error when extra arguments are present. Instead, it returns " -"a two item tuple containing the populated namespace and the list of " -"remaining argument strings." +"Sometimes a script only needs to handle a specific set of command-line " +"arguments, leaving any unrecognized arguments for another script or program. " +"In these cases, the :meth:`~ArgumentParser.parse_known_args` method can be " +"useful." msgstr "" -#: ../../library/argparse.rst:2134 +#: ../../library/argparse.rst:2133 +msgid "" +"This method works similarly to :meth:`~ArgumentParser.parse_args`, but it " +"does not raise an error for extra, unrecognized arguments. Instead, it " +"parses the known arguments and returns a two item tuple that contains the " +"populated namespace and the list of any unrecognized arguments." +msgstr "" + +#: ../../library/argparse.rst:2140 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', action='store_true')\n" @@ -2956,7 +2965,7 @@ msgid "" "(Namespace(bar='BAR', foo=True), ['--badger', 'spam'])" msgstr "" -#: ../../library/argparse.rst:2141 +#: ../../library/argparse.rst:2147 msgid "" ":ref:`Prefix matching ` rules apply to :meth:" "`~ArgumentParser.parse_known_args`. The parser may consume an option even if " @@ -2964,11 +2973,11 @@ msgid "" "remaining arguments list." msgstr "" -#: ../../library/argparse.rst:2148 +#: ../../library/argparse.rst:2154 msgid "Customizing file parsing" msgstr "" -#: ../../library/argparse.rst:2152 +#: ../../library/argparse.rst:2158 msgid "" "Arguments that are read from a file (see the *fromfile_prefix_chars* keyword " "argument to the :class:`ArgumentParser` constructor) are read one argument " @@ -2976,38 +2985,38 @@ msgid "" "reading." msgstr "" -#: ../../library/argparse.rst:2157 +#: ../../library/argparse.rst:2163 msgid "" "This method takes a single argument *arg_line* which is a string read from " "the argument file. It returns a list of arguments parsed from this string. " "The method is called once per line read from the argument file, in order." msgstr "" -#: ../../library/argparse.rst:2161 +#: ../../library/argparse.rst:2167 msgid "" "A useful override of this method is one that treats each space-separated " "word as an argument. The following example demonstrates how to do this::" msgstr "" -#: ../../library/argparse.rst:2164 +#: ../../library/argparse.rst:2170 msgid "" "class MyArgumentParser(argparse.ArgumentParser):\n" " def convert_arg_line_to_args(self, arg_line):\n" " return arg_line.split()" msgstr "" -#: ../../library/argparse.rst:2170 +#: ../../library/argparse.rst:2176 msgid "Exiting methods" msgstr "" -#: ../../library/argparse.rst:2174 +#: ../../library/argparse.rst:2180 msgid "" "This method terminates the program, exiting with the specified *status* and, " "if given, it prints a *message* to :data:`sys.stderr` before that. The user " "can override this method to handle these steps differently::" msgstr "" -#: ../../library/argparse.rst:2178 +#: ../../library/argparse.rst:2184 msgid "" "class ErrorCatchingArgumentParser(argparse.ArgumentParser):\n" " def exit(self, status=0, message=None):\n" @@ -3016,17 +3025,17 @@ msgid "" " exit(status)" msgstr "" -#: ../../library/argparse.rst:2186 +#: ../../library/argparse.rst:2192 msgid "" "This method prints a usage message, including the *message*, to :data:`sys." "stderr` and terminates the program with a status code of 2." msgstr "" -#: ../../library/argparse.rst:2191 +#: ../../library/argparse.rst:2197 msgid "Intermixed parsing" msgstr "" -#: ../../library/argparse.rst:2196 +#: ../../library/argparse.rst:2202 msgid "" "A number of Unix commands allow the user to intermix optional arguments with " "positional arguments. The :meth:`~ArgumentParser.parse_intermixed_args` " @@ -3034,7 +3043,7 @@ msgid "" "parsing style." msgstr "" -#: ../../library/argparse.rst:2201 +#: ../../library/argparse.rst:2207 msgid "" "These parsers do not support all the :mod:`!argparse` features, and will " "raise exceptions if unsupported features are used. In particular, " @@ -3042,7 +3051,7 @@ msgid "" "positionals are not supported." msgstr "" -#: ../../library/argparse.rst:2206 +#: ../../library/argparse.rst:2212 msgid "" "The following example shows the difference between :meth:`~ArgumentParser." "parse_known_args` and :meth:`~ArgumentParser.parse_intermixed_args`: the " @@ -3050,7 +3059,7 @@ msgid "" "collects all the positionals into ``rest``. ::" msgstr "" -#: ../../library/argparse.rst:2212 +#: ../../library/argparse.rst:2218 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo')\n" @@ -3062,7 +3071,7 @@ msgid "" "Namespace(cmd='doit', foo='bar', rest=[1, 2, 3])" msgstr "" -#: ../../library/argparse.rst:2221 +#: ../../library/argparse.rst:2227 msgid "" ":meth:`~ArgumentParser.parse_known_intermixed_args` returns a two item tuple " "containing the populated namespace and the list of remaining argument " @@ -3070,11 +3079,11 @@ msgid "" "there are any remaining unparsed argument strings." msgstr "" -#: ../../library/argparse.rst:2230 +#: ../../library/argparse.rst:2236 msgid "Registering custom types or actions" msgstr "" -#: ../../library/argparse.rst:2234 +#: ../../library/argparse.rst:2240 msgid "" "Sometimes it's desirable to use a custom string in error messages to provide " "more user-friendly output. In these cases, :meth:`!register` can be used to " @@ -3082,7 +3091,7 @@ msgid "" "the type by their registered name instead of their callable name." msgstr "" -#: ../../library/argparse.rst:2239 +#: ../../library/argparse.rst:2245 msgid "" "The :meth:`!register` method accepts three arguments - a *registry_name*, " "specifying the internal registry where the object will be stored (e.g., " @@ -3090,12 +3099,12 @@ msgid "" "be registered, and object, the callable to be registered." msgstr "" -#: ../../library/argparse.rst:2244 +#: ../../library/argparse.rst:2250 msgid "" "The following example shows how to register a custom type with a parser::" msgstr "" -#: ../../library/argparse.rst:2246 +#: ../../library/argparse.rst:2252 msgid "" ">>> import argparse\n" ">>> parser = argparse.ArgumentParser()\n" @@ -3111,42 +3120,42 @@ msgid "" "PROG: error: argument --foo: invalid 'hexadecimal integer' value: '1.2'" msgstr "" -#: ../../library/argparse.rst:2258 +#: ../../library/argparse.rst:2264 msgid "Exceptions" msgstr "" -#: ../../library/argparse.rst:2262 +#: ../../library/argparse.rst:2268 msgid "An error from creating or using an argument (optional or positional)." msgstr "" -#: ../../library/argparse.rst:2264 +#: ../../library/argparse.rst:2270 msgid "" "The string value of this exception is the message, augmented with " "information about the argument that caused it." msgstr "" -#: ../../library/argparse.rst:2269 +#: ../../library/argparse.rst:2275 msgid "" "Raised when something goes wrong converting a command line string to a type." msgstr "" -#: ../../library/argparse.rst:2273 +#: ../../library/argparse.rst:2279 msgid "Guides and Tutorials" msgstr "" -#: ../../library/argparse.rst:910 +#: ../../library/argparse.rst:898 msgid "? (question mark)" msgstr "" -#: ../../library/argparse.rst:910 ../../library/argparse.rst:942 -#: ../../library/argparse.rst:956 +#: ../../library/argparse.rst:898 ../../library/argparse.rst:930 +#: ../../library/argparse.rst:944 msgid "in argparse module" msgstr "" -#: ../../library/argparse.rst:942 +#: ../../library/argparse.rst:930 msgid "* (asterisk)" msgstr "" -#: ../../library/argparse.rst:956 +#: ../../library/argparse.rst:944 msgid "+ (plus)" msgstr "" diff --git a/library/array.po b/library/array.po index 76a0d980b..0f0583219 100644 --- a/library/array.po +++ b/library/array.po @@ -7,15 +7,16 @@ # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 # Ariyan Bolandi, 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:54+0000\n" -"Last-Translator: Ariyan Bolandi, 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/ast.po b/library/ast.po index 4b8e518df..7dc4d3677 100644 --- a/library/ast.po +++ b/library/ast.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:54+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -521,9 +522,9 @@ msgstr "" msgid "" "A constant value. The ``value`` attribute of the ``Constant`` literal " "contains the Python object it represents. The values represented can be " -"simple types such as a number, string or ``None``, but also immutable " -"container types (tuples and frozensets) if all of their elements are " -"constant." +"instances of :class:`str`, :class:`bytes`, :class:`int`, :class:`float`, :" +"class:`complex`, and :class:`bool`, and the constants :data:`None` and :data:" +"`Ellipsis`." msgstr "" #: ../../library/ast.rst:284 @@ -2908,19 +2909,19 @@ msgstr "" #: ../../library/ast.rst:2448 msgid "" -"If *show_empty* is ``False`` (the default), empty lists and fields that are " -"``None`` will be omitted from the output." +"If *show_empty* is false (the default), optional empty lists will be omitted " +"from the output. Optional ``None`` values are always omitted." msgstr "" -#: ../../library/ast.rst:2451 +#: ../../library/ast.rst:2452 msgid "Added the *indent* option." msgstr "" -#: ../../library/ast.rst:2454 +#: ../../library/ast.rst:2455 msgid "Added the *show_empty* option." msgstr "" -#: ../../library/ast.rst:2457 +#: ../../library/ast.rst:2458 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\\\n" "... async def f():\n" @@ -2948,45 +2949,45 @@ msgid "" " type_ignores=[])" msgstr "" -#: ../../library/ast.rst:2488 +#: ../../library/ast.rst:2489 msgid "Compiler flags" msgstr "" -#: ../../library/ast.rst:2490 +#: ../../library/ast.rst:2491 msgid "" "The following flags may be passed to :func:`compile` in order to change " "effects on the compilation of a program:" msgstr "" -#: ../../library/ast.rst:2495 +#: ../../library/ast.rst:2496 msgid "" "Enables support for top-level ``await``, ``async for``, ``async with`` and " "async comprehensions." msgstr "" -#: ../../library/ast.rst:2502 +#: ../../library/ast.rst:2503 msgid "" "Generates and returns an abstract syntax tree instead of returning a " "compiled code object." msgstr "" -#: ../../library/ast.rst:2507 +#: ../../library/ast.rst:2508 msgid "" "The returned AST is optimized according to the *optimize* argument in :func:" "`compile` or :func:`ast.parse`." msgstr "" -#: ../../library/ast.rst:2514 +#: ../../library/ast.rst:2515 msgid "" "Enables support for :pep:`484` and :pep:`526` style type comments (``# type: " "``, ``# type: ignore ``)." msgstr "" -#: ../../library/ast.rst:2522 +#: ../../library/ast.rst:2523 msgid "Recursively compares two ASTs." msgstr "" -#: ../../library/ast.rst:2524 +#: ../../library/ast.rst:2525 msgid "" "*compare_attributes* affects whether AST attributes are considered in the " "comparison. If *compare_attributes* is ``False`` (default), then attributes " @@ -2995,75 +2996,75 @@ msgid "" "similar details. Attributes include line numbers and column offsets." msgstr "" -#: ../../library/ast.rst:2537 +#: ../../library/ast.rst:2538 msgid "Command-line usage" msgstr "" -#: ../../library/ast.rst:2541 +#: ../../library/ast.rst:2542 msgid "" "The :mod:`ast` module can be executed as a script from the command line. It " "is as simple as:" msgstr "" -#: ../../library/ast.rst:2544 +#: ../../library/ast.rst:2545 msgid "python -m ast [-m ] [-a] [infile]" msgstr "" -#: ../../library/ast.rst:2548 +#: ../../library/ast.rst:2549 msgid "The following options are accepted:" msgstr "" -#: ../../library/ast.rst:2554 +#: ../../library/ast.rst:2555 msgid "Show the help message and exit." msgstr "" -#: ../../library/ast.rst:2559 +#: ../../library/ast.rst:2560 msgid "" "Specify what kind of code must be compiled, like the *mode* argument in :" "func:`parse`." msgstr "" -#: ../../library/ast.rst:2564 +#: ../../library/ast.rst:2565 msgid "Don't parse type comments." msgstr "" -#: ../../library/ast.rst:2568 +#: ../../library/ast.rst:2569 msgid "Include attributes such as line numbers and column offsets." msgstr "" -#: ../../library/ast.rst:2573 +#: ../../library/ast.rst:2574 msgid "Indentation of nodes in AST (number of spaces)." msgstr "" -#: ../../library/ast.rst:2577 +#: ../../library/ast.rst:2578 msgid "" "Python version in the format 3.x (for example, 3.10). Defaults to the " "current version of the interpreter." msgstr "" -#: ../../library/ast.rst:2585 +#: ../../library/ast.rst:2586 msgid "Optimization level for parser. Defaults to no optimization." msgstr "" -#: ../../library/ast.rst:2591 +#: ../../library/ast.rst:2592 msgid "" "Show empty lists and fields that are ``None``. Defaults to not showing empty " "objects." msgstr "" -#: ../../library/ast.rst:2597 +#: ../../library/ast.rst:2598 msgid "" "If :file:`infile` is specified its contents are parsed to AST and dumped to " "stdout. Otherwise, the content is read from stdin." msgstr "" -#: ../../library/ast.rst:2603 +#: ../../library/ast.rst:2604 msgid "" "`Green Tree Snakes `_, an external " "documentation resource, has good details on working with Python ASTs." msgstr "" -#: ../../library/ast.rst:2606 +#: ../../library/ast.rst:2607 msgid "" "`ASTTokens `_ " "annotates Python ASTs with the positions of tokens and text in the source " @@ -3071,21 +3072,21 @@ msgid "" "transformations." msgstr "" -#: ../../library/ast.rst:2611 +#: ../../library/ast.rst:2612 msgid "" "`leoAst.py `_ unifies the token-based and parse-tree-based views of python programs " "by inserting two-way links between tokens and ast nodes." msgstr "" -#: ../../library/ast.rst:2616 +#: ../../library/ast.rst:2617 msgid "" "`LibCST `_ parses code as a Concrete Syntax " "Tree that looks like an ast tree and keeps all formatting details. It's " "useful for building automated refactoring (codemod) applications and linters." msgstr "" -#: ../../library/ast.rst:2621 +#: ../../library/ast.rst:2622 msgid "" "`Parso `_ is a Python parser that supports " "error recovery and round-trip parsing for different Python versions (in " diff --git a/library/asynchat.po b/library/asynchat.po index 86c12d95a..3f7fa50c7 100644 --- a/library/asynchat.po +++ b/library/asynchat.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-11-19 01:02+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/asyncio-api-index.po b/library/asyncio-api-index.po index 1285e1e5c..e41942b1e 100644 --- a/library/asyncio-api-index.po +++ b/library/asyncio-api-index.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:54+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/asyncio-dev.po b/library/asyncio-dev.po index 27be9a33f..25f6f29d2 100644 --- a/library/asyncio-dev.po +++ b/library/asyncio-dev.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:54+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -95,36 +96,29 @@ msgstr "" #: ../../library/asyncio-dev.rst:49 msgid "" -"asyncio checks for :ref:`coroutines that were not awaited ` and logs them; this mitigates the \"forgotten await\" " -"pitfall." -msgstr "" - -#: ../../library/asyncio-dev.rst:53 -msgid "" "Many non-threadsafe asyncio APIs (such as :meth:`loop.call_soon` and :meth:" "`loop.call_at` methods) raise an exception if they are called from a wrong " "thread." msgstr "" -#: ../../library/asyncio-dev.rst:57 +#: ../../library/asyncio-dev.rst:53 msgid "" "The execution time of the I/O selector is logged if it takes too long to " "perform an I/O operation." msgstr "" -#: ../../library/asyncio-dev.rst:60 +#: ../../library/asyncio-dev.rst:56 msgid "" "Callbacks taking longer than 100 milliseconds are logged. The :attr:`loop." "slow_callback_duration` attribute can be used to set the minimum execution " "duration in seconds that is considered \"slow\"." msgstr "" -#: ../../library/asyncio-dev.rst:68 +#: ../../library/asyncio-dev.rst:64 msgid "Concurrency and Multithreading" msgstr "" -#: ../../library/asyncio-dev.rst:70 +#: ../../library/asyncio-dev.rst:66 msgid "" "An event loop runs in a thread (typically the main thread) and executes all " "callbacks and Tasks in its thread. While a Task is running in the event " @@ -133,17 +127,17 @@ msgid "" "executes the next Task." msgstr "" -#: ../../library/asyncio-dev.rst:76 +#: ../../library/asyncio-dev.rst:72 msgid "" "To schedule a :term:`callback` from another OS thread, the :meth:`loop." "call_soon_threadsafe` method should be used. Example::" msgstr "" -#: ../../library/asyncio-dev.rst:79 +#: ../../library/asyncio-dev.rst:75 msgid "loop.call_soon_threadsafe(callback, *args)" msgstr "" -#: ../../library/asyncio-dev.rst:81 +#: ../../library/asyncio-dev.rst:77 msgid "" "Almost all asyncio objects are not thread safe, which is typically not a " "problem unless there is code that works with them from outside of a Task or " @@ -151,18 +145,18 @@ msgid "" "API, the :meth:`loop.call_soon_threadsafe` method should be used, e.g.::" msgstr "" -#: ../../library/asyncio-dev.rst:87 +#: ../../library/asyncio-dev.rst:83 msgid "loop.call_soon_threadsafe(fut.cancel)" msgstr "" -#: ../../library/asyncio-dev.rst:89 +#: ../../library/asyncio-dev.rst:85 msgid "" "To schedule a coroutine object from a different OS thread, the :func:" "`run_coroutine_threadsafe` function should be used. It returns a :class:" "`concurrent.futures.Future` to access the result::" msgstr "" -#: ../../library/asyncio-dev.rst:93 +#: ../../library/asyncio-dev.rst:89 msgid "" "async def coro_func():\n" " return await asyncio.sleep(1, 42)\n" @@ -174,11 +168,11 @@ msgid "" "result = future.result()" msgstr "" -#: ../../library/asyncio-dev.rst:102 +#: ../../library/asyncio-dev.rst:98 msgid "To handle signals the event loop must be run in the main thread." msgstr "" -#: ../../library/asyncio-dev.rst:105 +#: ../../library/asyncio-dev.rst:101 msgid "" "The :meth:`loop.run_in_executor` method can be used with a :class:" "`concurrent.futures.ThreadPoolExecutor` or :class:`~concurrent.futures." @@ -186,7 +180,7 @@ msgid "" "without blocking the OS thread that the event loop runs in." msgstr "" -#: ../../library/asyncio-dev.rst:111 +#: ../../library/asyncio-dev.rst:107 msgid "" "There is currently no way to schedule coroutines or callbacks directly from " "a different process (such as one started with :mod:`multiprocessing`). The :" @@ -199,18 +193,18 @@ msgid "" "different process." msgstr "" -#: ../../library/asyncio-dev.rst:125 +#: ../../library/asyncio-dev.rst:121 msgid "Running Blocking Code" msgstr "" -#: ../../library/asyncio-dev.rst:127 +#: ../../library/asyncio-dev.rst:123 msgid "" "Blocking (CPU-bound) code should not be called directly. For example, if a " "function performs a CPU-intensive calculation for 1 second, all concurrent " "asyncio Tasks and IO operations would be delayed by 1 second." msgstr "" -#: ../../library/asyncio-dev.rst:132 +#: ../../library/asyncio-dev.rst:128 msgid "" "An executor can be used to run a task in a different thread, including in a " "different interpreter, or even in a different process to avoid blocking the " @@ -218,45 +212,45 @@ msgid "" "for more details." msgstr "" -#: ../../library/asyncio-dev.rst:142 +#: ../../library/asyncio-dev.rst:138 msgid "Logging" msgstr "" -#: ../../library/asyncio-dev.rst:144 +#: ../../library/asyncio-dev.rst:140 msgid "" "asyncio uses the :mod:`logging` module and all logging is performed via the " "``\"asyncio\"`` logger." msgstr "" -#: ../../library/asyncio-dev.rst:147 +#: ../../library/asyncio-dev.rst:143 msgid "" "The default log level is :py:const:`logging.INFO`, which can be easily " "adjusted::" msgstr "" -#: ../../library/asyncio-dev.rst:150 +#: ../../library/asyncio-dev.rst:146 msgid "logging.getLogger(\"asyncio\").setLevel(logging.WARNING)" msgstr "" -#: ../../library/asyncio-dev.rst:153 +#: ../../library/asyncio-dev.rst:149 msgid "" "Network logging can block the event loop. It is recommended to use a " "separate thread for handling logs or use non-blocking IO. For example, see :" "ref:`blocking-handlers`." msgstr "" -#: ../../library/asyncio-dev.rst:161 +#: ../../library/asyncio-dev.rst:157 msgid "Detect never-awaited coroutines" msgstr "" -#: ../../library/asyncio-dev.rst:163 +#: ../../library/asyncio-dev.rst:159 msgid "" "When a coroutine function is called, but not awaited (e.g. ``coro()`` " "instead of ``await coro()``) or the coroutine is not scheduled with :meth:" "`asyncio.create_task`, asyncio will emit a :exc:`RuntimeWarning`::" msgstr "" -#: ../../library/asyncio-dev.rst:168 +#: ../../library/asyncio-dev.rst:164 msgid "" "import asyncio\n" "\n" @@ -269,21 +263,21 @@ msgid "" "asyncio.run(main())" msgstr "" -#: ../../library/asyncio-dev.rst:178 ../../library/asyncio-dev.rst:223 +#: ../../library/asyncio-dev.rst:174 ../../library/asyncio-dev.rst:219 msgid "Output::" msgstr "" -#: ../../library/asyncio-dev.rst:180 +#: ../../library/asyncio-dev.rst:176 msgid "" "test.py:7: RuntimeWarning: coroutine 'test' was never awaited\n" " test()" msgstr "" -#: ../../library/asyncio-dev.rst:183 ../../library/asyncio-dev.rst:239 +#: ../../library/asyncio-dev.rst:179 ../../library/asyncio-dev.rst:235 msgid "Output in debug mode::" msgstr "" -#: ../../library/asyncio-dev.rst:185 +#: ../../library/asyncio-dev.rst:181 msgid "" "test.py:7: RuntimeWarning: coroutine 'test' was never awaited\n" "Coroutine created at (most recent call last)\n" @@ -297,23 +291,23 @@ msgid "" " test()" msgstr "" -#: ../../library/asyncio-dev.rst:196 +#: ../../library/asyncio-dev.rst:192 msgid "" "The usual fix is to either await the coroutine or call the :meth:`asyncio." "create_task` function::" msgstr "" -#: ../../library/asyncio-dev.rst:199 +#: ../../library/asyncio-dev.rst:195 msgid "" "async def main():\n" " await test()" msgstr "" -#: ../../library/asyncio-dev.rst:204 +#: ../../library/asyncio-dev.rst:200 msgid "Detect never-retrieved exceptions" msgstr "" -#: ../../library/asyncio-dev.rst:206 +#: ../../library/asyncio-dev.rst:202 msgid "" "If a :meth:`Future.set_exception` is called but the Future object is never " "awaited on, the exception would never be propagated to the user code. In " @@ -321,11 +315,11 @@ msgid "" "garbage collected." msgstr "" -#: ../../library/asyncio-dev.rst:211 +#: ../../library/asyncio-dev.rst:207 msgid "Example of an unhandled exception::" msgstr "" -#: ../../library/asyncio-dev.rst:213 +#: ../../library/asyncio-dev.rst:209 msgid "" "import asyncio\n" "\n" @@ -338,7 +332,7 @@ msgid "" "asyncio.run(main())" msgstr "" -#: ../../library/asyncio-dev.rst:225 +#: ../../library/asyncio-dev.rst:221 msgid "" "Task exception was never retrieved\n" "future: \n" @@ -350,17 +344,17 @@ msgid "" "Exception: not consumed" msgstr "" -#: ../../library/asyncio-dev.rst:234 +#: ../../library/asyncio-dev.rst:230 msgid "" ":ref:`Enable the debug mode ` to get the traceback where " "the task was created::" msgstr "" -#: ../../library/asyncio-dev.rst:237 +#: ../../library/asyncio-dev.rst:233 msgid "asyncio.run(main(), debug=True)" msgstr "" -#: ../../library/asyncio-dev.rst:241 +#: ../../library/asyncio-dev.rst:237 msgid "" "Task exception was never retrieved\n" "future: \n" diff --git a/library/asyncio-eventloop.po b/library/asyncio-eventloop.po index cdc5d91e7..616db0519 100644 --- a/library/asyncio-eventloop.po +++ b/library/asyncio-eventloop.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:54+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -266,8 +267,8 @@ msgid "" msgstr "" #: ../../library/asyncio-eventloop.rst:183 -#: ../../library/asyncio-eventloop.rst:1315 -#: ../../library/asyncio-eventloop.rst:1771 +#: ../../library/asyncio-eventloop.rst:1336 +#: ../../library/asyncio-eventloop.rst:1792 msgid "Example::" msgstr "" @@ -510,18 +511,25 @@ msgstr "" #: ../../library/asyncio-eventloop.rst:373 msgid "" +"The full function signature is largely the same as that of the :class:`Task` " +"constructor (or factory) - all of the keyword arguments to this function are " +"passed through to that interface." +msgstr "" + +#: ../../library/asyncio-eventloop.rst:377 +msgid "" "If the *name* argument is provided and not ``None``, it is set as the name " "of the task using :meth:`Task.set_name`." msgstr "" -#: ../../library/asyncio-eventloop.rst:376 +#: ../../library/asyncio-eventloop.rst:380 msgid "" "An optional keyword-only *context* argument allows specifying a custom :" "class:`contextvars.Context` for the *coro* to run in. The current context " "copy is created when no *context* is provided." msgstr "" -#: ../../library/asyncio-eventloop.rst:380 +#: ../../library/asyncio-eventloop.rst:384 msgid "" "An optional keyword-only *eager_start* argument allows specifying if the " "task should execute eagerly during the call to create_task, or be scheduled " @@ -529,23 +537,38 @@ msgid "" "set_task_factory` will be used." msgstr "" -#: ../../library/asyncio-eventloop.rst:385 +#: ../../library/asyncio-eventloop.rst:389 msgid "Added the *name* parameter." msgstr "" -#: ../../library/asyncio-eventloop.rst:388 +#: ../../library/asyncio-eventloop.rst:392 msgid "Added the *context* parameter." msgstr "" -#: ../../library/asyncio-eventloop.rst:391 -msgid "Added the *eager_start* parameter." +#: ../../library/asyncio-eventloop.rst:395 +msgid "" +"Added ``kwargs`` which passes on arbitrary extra parameters, including " +"``name`` and ``context``." +msgstr "" + +#: ../../library/asyncio-eventloop.rst:398 +msgid "" +"Rolled back the change that passes on *name* and *context* (if it is None), " +"while still passing on other arbitrary keyword arguments (to avoid breaking " +"backwards compatibility with 3.13.3)." +msgstr "" + +#: ../../library/asyncio-eventloop.rst:402 +msgid "" +"All *kwargs* are now passed on. The *eager_start* parameter works with eager " +"task factories." msgstr "" -#: ../../library/asyncio-eventloop.rst:396 +#: ../../library/asyncio-eventloop.rst:407 msgid "Set a task factory that will be used by :meth:`loop.create_task`." msgstr "" -#: ../../library/asyncio-eventloop.rst:399 +#: ../../library/asyncio-eventloop.rst:410 msgid "" "If *factory* is ``None`` the default task factory will be set. Otherwise, " "*factory* must be a *callable* with the signature matching ``(loop, coro, " @@ -554,82 +577,98 @@ msgid "" "return a :class:`asyncio.Task`-compatible object." msgstr "" -#: ../../library/asyncio-eventloop.rst:407 +#: ../../library/asyncio-eventloop.rst:416 +msgid "Required that all *kwargs* are passed on to :class:`asyncio.Task`." +msgstr "" + +#: ../../library/asyncio-eventloop.rst:419 +msgid "" +"*name* is no longer passed to task factories. *context* is no longer passed " +"to task factories if it is ``None``." +msgstr "" + +#: ../../library/asyncio-eventloop.rst:423 +msgid "" +"*name* and *context* are now unconditionally passed on to task factories " +"again." +msgstr "" + +#: ../../library/asyncio-eventloop.rst:428 msgid "Return a task factory or ``None`` if the default one is in use." msgstr "" -#: ../../library/asyncio-eventloop.rst:411 +#: ../../library/asyncio-eventloop.rst:432 msgid "Opening network connections" msgstr "" -#: ../../library/asyncio-eventloop.rst:423 +#: ../../library/asyncio-eventloop.rst:444 msgid "" "Open a streaming transport connection to a given address specified by *host* " "and *port*." msgstr "" -#: ../../library/asyncio-eventloop.rst:426 +#: ../../library/asyncio-eventloop.rst:447 msgid "" "The socket family can be either :py:const:`~socket.AF_INET` or :py:const:" "`~socket.AF_INET6` depending on *host* (or the *family* argument, if " "provided)." msgstr "" -#: ../../library/asyncio-eventloop.rst:430 +#: ../../library/asyncio-eventloop.rst:451 msgid "The socket type will be :py:const:`~socket.SOCK_STREAM`." msgstr "" -#: ../../library/asyncio-eventloop.rst:432 -#: ../../library/asyncio-eventloop.rst:1225 -#: ../../library/asyncio-eventloop.rst:1242 +#: ../../library/asyncio-eventloop.rst:453 +#: ../../library/asyncio-eventloop.rst:1246 +#: ../../library/asyncio-eventloop.rst:1263 msgid "" "*protocol_factory* must be a callable returning an :ref:`asyncio protocol " "` implementation." msgstr "" -#: ../../library/asyncio-eventloop.rst:435 +#: ../../library/asyncio-eventloop.rst:456 msgid "" "This method will try to establish the connection in the background. When " "successful, it returns a ``(transport, protocol)`` pair." msgstr "" -#: ../../library/asyncio-eventloop.rst:438 +#: ../../library/asyncio-eventloop.rst:459 msgid "The chronological synopsis of the underlying operation is as follows:" msgstr "" -#: ../../library/asyncio-eventloop.rst:440 +#: ../../library/asyncio-eventloop.rst:461 msgid "" "The connection is established and a :ref:`transport ` is " "created for it." msgstr "" -#: ../../library/asyncio-eventloop.rst:443 +#: ../../library/asyncio-eventloop.rst:464 msgid "" "*protocol_factory* is called without arguments and is expected to return a :" "ref:`protocol ` instance." msgstr "" -#: ../../library/asyncio-eventloop.rst:446 +#: ../../library/asyncio-eventloop.rst:467 msgid "" "The protocol instance is coupled with the transport by calling its :meth:" "`~BaseProtocol.connection_made` method." msgstr "" -#: ../../library/asyncio-eventloop.rst:449 +#: ../../library/asyncio-eventloop.rst:470 msgid "A ``(transport, protocol)`` tuple is returned on success." msgstr "" -#: ../../library/asyncio-eventloop.rst:451 +#: ../../library/asyncio-eventloop.rst:472 msgid "" "The created transport is an implementation-dependent bidirectional stream." msgstr "" -#: ../../library/asyncio-eventloop.rst:454 -#: ../../library/asyncio-eventloop.rst:587 +#: ../../library/asyncio-eventloop.rst:475 +#: ../../library/asyncio-eventloop.rst:608 msgid "Other arguments:" msgstr "" -#: ../../library/asyncio-eventloop.rst:456 +#: ../../library/asyncio-eventloop.rst:477 msgid "" "*ssl*: if given and not false, a SSL/TLS transport is created (by default a " "plain TCP transport is created). If *ssl* is a :class:`ssl.SSLContext` " @@ -638,11 +677,11 @@ msgid "" "is used." msgstr "" -#: ../../library/asyncio-eventloop.rst:462 +#: ../../library/asyncio-eventloop.rst:483 msgid ":ref:`SSL/TLS security considerations `" msgstr "" -#: ../../library/asyncio-eventloop.rst:464 +#: ../../library/asyncio-eventloop.rst:485 msgid "" "*server_hostname* sets or overrides the hostname that the target server's " "certificate will be matched against. Should only be passed if *ssl* is not " @@ -653,7 +692,7 @@ msgid "" "potential man-in-the-middle attacks)." msgstr "" -#: ../../library/asyncio-eventloop.rst:472 +#: ../../library/asyncio-eventloop.rst:493 msgid "" "*family*, *proto*, *flags* are the optional address family, protocol and " "flags to be passed through to getaddrinfo() for *host* resolution. If given, " @@ -661,7 +700,7 @@ msgid "" "constants." msgstr "" -#: ../../library/asyncio-eventloop.rst:477 +#: ../../library/asyncio-eventloop.rst:498 msgid "" "*happy_eyeballs_delay*, if given, enables Happy Eyeballs for this " "connection. It should be a floating-point number representing the amount of " @@ -671,7 +710,7 @@ msgid "" "the RFC is ``0.25`` (250 milliseconds)." msgstr "" -#: ../../library/asyncio-eventloop.rst:485 +#: ../../library/asyncio-eventloop.rst:506 msgid "" "*interleave* controls address reordering when a host name resolves to " "multiple IP addresses. If ``0`` or unspecified, no reordering is done, and " @@ -682,7 +721,7 @@ msgid "" "*happy_eyeballs_delay* is not specified, and ``1`` if it is." msgstr "" -#: ../../library/asyncio-eventloop.rst:494 +#: ../../library/asyncio-eventloop.rst:515 msgid "" "*sock*, if given, should be an existing, already connected :class:`socket." "socket` object to be used by the transport. If *sock* is given, none of " @@ -690,41 +729,41 @@ msgid "" "*interleave* and *local_addr* should be specified." msgstr "" -#: ../../library/asyncio-eventloop.rst:502 -#: ../../library/asyncio-eventloop.rst:618 -#: ../../library/asyncio-eventloop.rst:866 +#: ../../library/asyncio-eventloop.rst:523 +#: ../../library/asyncio-eventloop.rst:639 +#: ../../library/asyncio-eventloop.rst:887 msgid "" "The *sock* argument transfers ownership of the socket to the transport " "created. To close the socket, call the transport's :meth:`~asyncio." "BaseTransport.close` method." msgstr "" -#: ../../library/asyncio-eventloop.rst:506 +#: ../../library/asyncio-eventloop.rst:527 msgid "" "*local_addr*, if given, is a ``(local_host, local_port)`` tuple used to bind " "the socket locally. The *local_host* and *local_port* are looked up using " "``getaddrinfo()``, similarly to *host* and *port*." msgstr "" -#: ../../library/asyncio-eventloop.rst:510 -#: ../../library/asyncio-eventloop.rst:962 +#: ../../library/asyncio-eventloop.rst:531 +#: ../../library/asyncio-eventloop.rst:983 msgid "" "*ssl_handshake_timeout* is (for a TLS connection) the time in seconds to " "wait for the TLS handshake to complete before aborting the connection. " "``60.0`` seconds if ``None`` (default)." msgstr "" -#: ../../library/asyncio-eventloop.rst:514 -#: ../../library/asyncio-eventloop.rst:773 -#: ../../library/asyncio-eventloop.rst:877 -#: ../../library/asyncio-eventloop.rst:966 +#: ../../library/asyncio-eventloop.rst:535 +#: ../../library/asyncio-eventloop.rst:794 +#: ../../library/asyncio-eventloop.rst:898 +#: ../../library/asyncio-eventloop.rst:987 msgid "" "*ssl_shutdown_timeout* is the time in seconds to wait for the SSL shutdown " "to complete before aborting the connection. ``30.0`` seconds if ``None`` " "(default)." msgstr "" -#: ../../library/asyncio-eventloop.rst:518 +#: ../../library/asyncio-eventloop.rst:539 msgid "" "*all_errors* determines what exceptions are raised when a connection cannot " "be created. By default, only a single ``Exception`` is raised: the first " @@ -734,27 +773,27 @@ msgid "" "(even if there is only one)." msgstr "" -#: ../../library/asyncio-eventloop.rst:528 -#: ../../library/asyncio-eventloop.rst:785 +#: ../../library/asyncio-eventloop.rst:549 +#: ../../library/asyncio-eventloop.rst:806 msgid "Added support for SSL/TLS in :class:`ProactorEventLoop`." msgstr "" -#: ../../library/asyncio-eventloop.rst:532 +#: ../../library/asyncio-eventloop.rst:553 msgid "" "The socket option :ref:`socket.TCP_NODELAY ` is set " "by default for all TCP connections." msgstr "" -#: ../../library/asyncio-eventloop.rst:537 -#: ../../library/asyncio-eventloop.rst:887 +#: ../../library/asyncio-eventloop.rst:558 +#: ../../library/asyncio-eventloop.rst:908 msgid "Added the *ssl_handshake_timeout* parameter." msgstr "" -#: ../../library/asyncio-eventloop.rst:541 +#: ../../library/asyncio-eventloop.rst:562 msgid "Added the *happy_eyeballs_delay* and *interleave* parameters." msgstr "" -#: ../../library/asyncio-eventloop.rst:543 +#: ../../library/asyncio-eventloop.rst:564 msgid "" "Happy Eyeballs Algorithm: Success with Dual-Stack Hosts. When a server's " "IPv4 path and protocol are working, but the server's IPv6 path and protocol " @@ -765,73 +804,73 @@ msgid "" "visible delay and provides an algorithm." msgstr "" -#: ../../library/asyncio-eventloop.rst:552 +#: ../../library/asyncio-eventloop.rst:573 msgid "For more information: https://datatracker.ietf.org/doc/html/rfc6555" msgstr "" -#: ../../library/asyncio-eventloop.rst:556 -#: ../../library/asyncio-eventloop.rst:682 -#: ../../library/asyncio-eventloop.rst:799 -#: ../../library/asyncio-eventloop.rst:839 -#: ../../library/asyncio-eventloop.rst:891 -#: ../../library/asyncio-eventloop.rst:974 +#: ../../library/asyncio-eventloop.rst:577 +#: ../../library/asyncio-eventloop.rst:703 +#: ../../library/asyncio-eventloop.rst:820 +#: ../../library/asyncio-eventloop.rst:860 +#: ../../library/asyncio-eventloop.rst:912 +#: ../../library/asyncio-eventloop.rst:995 msgid "Added the *ssl_shutdown_timeout* parameter." msgstr "" -#: ../../library/asyncio-eventloop.rst:558 +#: ../../library/asyncio-eventloop.rst:579 msgid "*all_errors* was added." msgstr "" -#: ../../library/asyncio-eventloop.rst:563 +#: ../../library/asyncio-eventloop.rst:584 msgid "" "The :func:`open_connection` function is a high-level alternative API. It " "returns a pair of (:class:`StreamReader`, :class:`StreamWriter`) that can be " "used directly in async/await code." msgstr "" -#: ../../library/asyncio-eventloop.rst:574 +#: ../../library/asyncio-eventloop.rst:595 msgid "Create a datagram connection." msgstr "" -#: ../../library/asyncio-eventloop.rst:576 +#: ../../library/asyncio-eventloop.rst:597 msgid "" "The socket family can be either :py:const:`~socket.AF_INET`, :py:const:" "`~socket.AF_INET6`, or :py:const:`~socket.AF_UNIX`, depending on *host* (or " "the *family* argument, if provided)." msgstr "" -#: ../../library/asyncio-eventloop.rst:580 +#: ../../library/asyncio-eventloop.rst:601 msgid "The socket type will be :py:const:`~socket.SOCK_DGRAM`." msgstr "" -#: ../../library/asyncio-eventloop.rst:582 -#: ../../library/asyncio-eventloop.rst:709 -#: ../../library/asyncio-eventloop.rst:858 +#: ../../library/asyncio-eventloop.rst:603 +#: ../../library/asyncio-eventloop.rst:730 +#: ../../library/asyncio-eventloop.rst:879 msgid "" "*protocol_factory* must be a callable returning a :ref:`protocol ` implementation." msgstr "" -#: ../../library/asyncio-eventloop.rst:585 -#: ../../library/asyncio-eventloop.rst:664 +#: ../../library/asyncio-eventloop.rst:606 +#: ../../library/asyncio-eventloop.rst:685 msgid "A tuple of ``(transport, protocol)`` is returned on success." msgstr "" -#: ../../library/asyncio-eventloop.rst:589 +#: ../../library/asyncio-eventloop.rst:610 msgid "" "*local_addr*, if given, is a ``(local_host, local_port)`` tuple used to bind " "the socket locally. The *local_host* and *local_port* are looked up using :" "meth:`getaddrinfo`." msgstr "" -#: ../../library/asyncio-eventloop.rst:593 +#: ../../library/asyncio-eventloop.rst:614 msgid "" "*remote_addr*, if given, is a ``(remote_host, remote_port)`` tuple used to " "connect the socket to a remote address. The *remote_host* and *remote_port* " "are looked up using :meth:`getaddrinfo`." msgstr "" -#: ../../library/asyncio-eventloop.rst:597 +#: ../../library/asyncio-eventloop.rst:618 msgid "" "*family*, *proto*, *flags* are the optional address family, protocol and " "flags to be passed through to :meth:`getaddrinfo` for *host* resolution. If " @@ -839,7 +878,7 @@ msgid "" "module constants." msgstr "" -#: ../../library/asyncio-eventloop.rst:602 +#: ../../library/asyncio-eventloop.rst:623 msgid "" "*reuse_port* tells the kernel to allow this endpoint to be bound to the same " "port as other existing endpoints are bound to, so long as they all set this " @@ -848,13 +887,13 @@ msgid "" "is not defined then this capability is unsupported." msgstr "" -#: ../../library/asyncio-eventloop.rst:608 +#: ../../library/asyncio-eventloop.rst:629 msgid "" "*allow_broadcast* tells the kernel to allow this endpoint to send messages " "to the broadcast address." msgstr "" -#: ../../library/asyncio-eventloop.rst:611 +#: ../../library/asyncio-eventloop.rst:632 msgid "" "*sock* can optionally be specified in order to use a preexisting, already " "connected, :class:`socket.socket` object to be used by the transport. If " @@ -862,37 +901,37 @@ msgid "" "`None`)." msgstr "" -#: ../../library/asyncio-eventloop.rst:622 +#: ../../library/asyncio-eventloop.rst:643 msgid "" "See :ref:`UDP echo client protocol ` and :" "ref:`UDP echo server protocol ` examples." msgstr "" -#: ../../library/asyncio-eventloop.rst:625 +#: ../../library/asyncio-eventloop.rst:646 msgid "" "The *family*, *proto*, *flags*, *reuse_address*, *reuse_port*, " "*allow_broadcast*, and *sock* parameters were added." msgstr "" -#: ../../library/asyncio-eventloop.rst:629 +#: ../../library/asyncio-eventloop.rst:650 msgid "Added support for Windows." msgstr "" -#: ../../library/asyncio-eventloop.rst:632 +#: ../../library/asyncio-eventloop.rst:653 msgid "" "The *reuse_address* parameter is no longer supported, as using :ref:`socket." "SO_REUSEADDR ` poses a significant security concern " "for UDP. Explicitly passing ``reuse_address=True`` will raise an exception." msgstr "" -#: ../../library/asyncio-eventloop.rst:638 +#: ../../library/asyncio-eventloop.rst:659 msgid "" "When multiple processes with differing UIDs assign sockets to an identical " "UDP socket address with ``SO_REUSEADDR``, incoming packets can become " "randomly distributed among the sockets." msgstr "" -#: ../../library/asyncio-eventloop.rst:642 +#: ../../library/asyncio-eventloop.rst:663 msgid "" "For supported platforms, *reuse_port* can be used as a replacement for " "similar functionality. With *reuse_port*, :ref:`socket.SO_REUSEPORT ` is set by default " "for all TCP connections." msgstr "" -#: ../../library/asyncio-eventloop.rst:803 +#: ../../library/asyncio-eventloop.rst:824 msgid "" "The :func:`start_server` function is a higher-level alternative API that " "returns a pair of :class:`StreamReader` and :class:`StreamWriter` that can " "be used in an async/await code." msgstr "" -#: ../../library/asyncio-eventloop.rst:815 +#: ../../library/asyncio-eventloop.rst:836 msgid "" "Similar to :meth:`loop.create_server` but works with the :py:const:`~socket." "AF_UNIX` socket family." msgstr "" -#: ../../library/asyncio-eventloop.rst:818 +#: ../../library/asyncio-eventloop.rst:839 msgid "" "*path* is the name of a Unix domain socket, and is required, unless a *sock* " "argument is provided. Abstract Unix sockets, :class:`str`, :class:`bytes`, " "and :class:`~pathlib.Path` paths are supported." msgstr "" -#: ../../library/asyncio-eventloop.rst:823 +#: ../../library/asyncio-eventloop.rst:844 msgid "" "If *cleanup_socket* is true then the Unix socket will automatically be " "removed from the filesystem when the server is closed, unless the socket has " "been replaced after the server has been created." msgstr "" -#: ../../library/asyncio-eventloop.rst:827 +#: ../../library/asyncio-eventloop.rst:848 msgid "" "See the documentation of the :meth:`loop.create_server` method for " "information about arguments to this method." msgstr "" -#: ../../library/asyncio-eventloop.rst:834 +#: ../../library/asyncio-eventloop.rst:855 msgid "" "Added the *ssl_handshake_timeout* and *start_serving* parameters. The *path* " "parameter can now be a :class:`~pathlib.Path` object." msgstr "" -#: ../../library/asyncio-eventloop.rst:843 +#: ../../library/asyncio-eventloop.rst:864 msgid "Added the *cleanup_socket* parameter." msgstr "" -#: ../../library/asyncio-eventloop.rst:851 +#: ../../library/asyncio-eventloop.rst:872 msgid "Wrap an already accepted connection into a transport/protocol pair." msgstr "" -#: ../../library/asyncio-eventloop.rst:853 +#: ../../library/asyncio-eventloop.rst:874 msgid "" "This method can be used by servers that accept connections outside of " "asyncio but that use asyncio to handle them." msgstr "" -#: ../../library/asyncio-eventloop.rst:856 -#: ../../library/asyncio-eventloop.rst:948 +#: ../../library/asyncio-eventloop.rst:877 +#: ../../library/asyncio-eventloop.rst:969 msgid "Parameters:" msgstr "" -#: ../../library/asyncio-eventloop.rst:861 +#: ../../library/asyncio-eventloop.rst:882 msgid "" "*sock* is a preexisting socket object returned from :meth:`socket.accept " "`." msgstr "" -#: ../../library/asyncio-eventloop.rst:870 +#: ../../library/asyncio-eventloop.rst:891 msgid "" "*ssl* can be set to an :class:`~ssl.SSLContext` to enable SSL over the " "accepted connections." msgstr "" -#: ../../library/asyncio-eventloop.rst:873 +#: ../../library/asyncio-eventloop.rst:894 msgid "" "*ssl_handshake_timeout* is (for an SSL connection) the time in seconds to " "wait for the SSL handshake to complete before aborting the connection. " "``60.0`` seconds if ``None`` (default)." msgstr "" -#: ../../library/asyncio-eventloop.rst:881 +#: ../../library/asyncio-eventloop.rst:902 msgid "Returns a ``(transport, protocol)`` pair." msgstr "" -#: ../../library/asyncio-eventloop.rst:895 +#: ../../library/asyncio-eventloop.rst:916 msgid "Transferring files" msgstr "" -#: ../../library/asyncio-eventloop.rst:901 +#: ../../library/asyncio-eventloop.rst:922 msgid "" "Send a *file* over a *transport*. Return the total number of bytes sent." msgstr "" -#: ../../library/asyncio-eventloop.rst:904 +#: ../../library/asyncio-eventloop.rst:925 msgid "The method uses high-performance :meth:`os.sendfile` if available." msgstr "" -#: ../../library/asyncio-eventloop.rst:906 +#: ../../library/asyncio-eventloop.rst:927 msgid "*file* must be a regular file object opened in binary mode." msgstr "" -#: ../../library/asyncio-eventloop.rst:908 -#: ../../library/asyncio-eventloop.rst:1169 +#: ../../library/asyncio-eventloop.rst:929 +#: ../../library/asyncio-eventloop.rst:1190 msgid "" "*offset* tells from where to start reading the file. If specified, *count* " "is the total number of bytes to transmit as opposed to sending the file " @@ -1187,35 +1226,35 @@ msgid "" "obtain the actual number of bytes sent." msgstr "" -#: ../../library/asyncio-eventloop.rst:915 +#: ../../library/asyncio-eventloop.rst:936 msgid "" "*fallback* set to ``True`` makes asyncio to manually read and send the file " "when the platform does not support the sendfile system call (e.g. Windows or " "SSL socket on Unix)." msgstr "" -#: ../../library/asyncio-eventloop.rst:919 +#: ../../library/asyncio-eventloop.rst:940 msgid "" "Raise :exc:`SendfileNotAvailableError` if the system does not support the " "*sendfile* syscall and *fallback* is ``False``." msgstr "" -#: ../../library/asyncio-eventloop.rst:926 +#: ../../library/asyncio-eventloop.rst:947 msgid "TLS Upgrade" msgstr "" -#: ../../library/asyncio-eventloop.rst:934 +#: ../../library/asyncio-eventloop.rst:955 msgid "Upgrade an existing transport-based connection to TLS." msgstr "" -#: ../../library/asyncio-eventloop.rst:936 +#: ../../library/asyncio-eventloop.rst:957 msgid "" "Create a TLS coder/decoder instance and insert it between the *transport* " "and the *protocol*. The coder/decoder implements both *transport*-facing " "protocol and *protocol*-facing transport." msgstr "" -#: ../../library/asyncio-eventloop.rst:940 +#: ../../library/asyncio-eventloop.rst:961 msgid "" "Return the created two-interface instance. After *await*, the *protocol* " "must stop using the original *transport* and communicate with the returned " @@ -1223,87 +1262,87 @@ msgid "" "exchanges extra TLS session packets with *transport*." msgstr "" -#: ../../library/asyncio-eventloop.rst:945 +#: ../../library/asyncio-eventloop.rst:966 msgid "" "In some situations (e.g. when the passed transport is already closing) this " "may return ``None``." msgstr "" -#: ../../library/asyncio-eventloop.rst:950 +#: ../../library/asyncio-eventloop.rst:971 msgid "" "*transport* and *protocol* instances that methods like :meth:`~loop." "create_server` and :meth:`~loop.create_connection` return." msgstr "" -#: ../../library/asyncio-eventloop.rst:954 +#: ../../library/asyncio-eventloop.rst:975 msgid "*sslcontext*: a configured instance of :class:`~ssl.SSLContext`." msgstr "" -#: ../../library/asyncio-eventloop.rst:956 +#: ../../library/asyncio-eventloop.rst:977 msgid "" "*server_side* pass ``True`` when a server-side connection is being upgraded " "(like the one created by :meth:`~loop.create_server`)." msgstr "" -#: ../../library/asyncio-eventloop.rst:959 +#: ../../library/asyncio-eventloop.rst:980 msgid "" "*server_hostname*: sets or overrides the host name that the target server's " "certificate will be matched against." msgstr "" -#: ../../library/asyncio-eventloop.rst:979 +#: ../../library/asyncio-eventloop.rst:1000 msgid "Watching file descriptors" msgstr "" -#: ../../library/asyncio-eventloop.rst:983 +#: ../../library/asyncio-eventloop.rst:1004 msgid "" "Start monitoring the *fd* file descriptor for read availability and invoke " "*callback* with the specified arguments once *fd* is available for reading." msgstr "" -#: ../../library/asyncio-eventloop.rst:987 -#: ../../library/asyncio-eventloop.rst:1001 +#: ../../library/asyncio-eventloop.rst:1008 +#: ../../library/asyncio-eventloop.rst:1022 msgid "" "Any preexisting callback registered for *fd* is cancelled and replaced by " "*callback*." msgstr "" -#: ../../library/asyncio-eventloop.rst:992 +#: ../../library/asyncio-eventloop.rst:1013 msgid "" "Stop monitoring the *fd* file descriptor for read availability. Returns " "``True`` if *fd* was previously being monitored for reads." msgstr "" -#: ../../library/asyncio-eventloop.rst:997 +#: ../../library/asyncio-eventloop.rst:1018 msgid "" "Start monitoring the *fd* file descriptor for write availability and invoke " "*callback* with the specified arguments once *fd* is available for writing." msgstr "" -#: ../../library/asyncio-eventloop.rst:1004 -#: ../../library/asyncio-eventloop.rst:1282 +#: ../../library/asyncio-eventloop.rst:1025 +#: ../../library/asyncio-eventloop.rst:1303 msgid "" "Use :func:`functools.partial` :ref:`to pass keyword arguments ` to *callback*." msgstr "" -#: ../../library/asyncio-eventloop.rst:1009 +#: ../../library/asyncio-eventloop.rst:1030 msgid "" "Stop monitoring the *fd* file descriptor for write availability. Returns " "``True`` if *fd* was previously being monitored for writes." msgstr "" -#: ../../library/asyncio-eventloop.rst:1012 +#: ../../library/asyncio-eventloop.rst:1033 msgid "" "See also :ref:`Platform Support ` section for some " "limitations of these methods." msgstr "" -#: ../../library/asyncio-eventloop.rst:1017 +#: ../../library/asyncio-eventloop.rst:1038 msgid "Working with socket objects directly" msgstr "" -#: ../../library/asyncio-eventloop.rst:1019 +#: ../../library/asyncio-eventloop.rst:1040 msgid "" "In general, protocol implementations that use transport-based APIs such as :" "meth:`loop.create_connection` and :meth:`loop.create_server` are faster than " @@ -1312,72 +1351,72 @@ msgid "" "socket` objects directly is more convenient." msgstr "" -#: ../../library/asyncio-eventloop.rst:1029 +#: ../../library/asyncio-eventloop.rst:1050 msgid "" "Receive up to *nbytes* from *sock*. Asynchronous version of :meth:`socket." "recv() `." msgstr "" -#: ../../library/asyncio-eventloop.rst:1032 +#: ../../library/asyncio-eventloop.rst:1053 msgid "Return the received data as a bytes object." msgstr "" -#: ../../library/asyncio-eventloop.rst:1034 -#: ../../library/asyncio-eventloop.rst:1049 -#: ../../library/asyncio-eventloop.rst:1061 -#: ../../library/asyncio-eventloop.rst:1074 -#: ../../library/asyncio-eventloop.rst:1090 -#: ../../library/asyncio-eventloop.rst:1106 -#: ../../library/asyncio-eventloop.rst:1117 -#: ../../library/asyncio-eventloop.rst:1144 -#: ../../library/asyncio-eventloop.rst:1183 +#: ../../library/asyncio-eventloop.rst:1055 +#: ../../library/asyncio-eventloop.rst:1070 +#: ../../library/asyncio-eventloop.rst:1082 +#: ../../library/asyncio-eventloop.rst:1095 +#: ../../library/asyncio-eventloop.rst:1111 +#: ../../library/asyncio-eventloop.rst:1127 +#: ../../library/asyncio-eventloop.rst:1138 +#: ../../library/asyncio-eventloop.rst:1165 +#: ../../library/asyncio-eventloop.rst:1204 msgid "*sock* must be a non-blocking socket." msgstr "" -#: ../../library/asyncio-eventloop.rst:1036 +#: ../../library/asyncio-eventloop.rst:1057 msgid "" "Even though this method was always documented as a coroutine method, " "releases before Python 3.7 returned a :class:`Future`. Since Python 3.7 this " "is an ``async def`` method." msgstr "" -#: ../../library/asyncio-eventloop.rst:1044 +#: ../../library/asyncio-eventloop.rst:1065 msgid "" "Receive data from *sock* into the *buf* buffer. Modeled after the blocking :" "meth:`socket.recv_into() ` method." msgstr "" -#: ../../library/asyncio-eventloop.rst:1047 +#: ../../library/asyncio-eventloop.rst:1068 msgid "Return the number of bytes written to the buffer." msgstr "" -#: ../../library/asyncio-eventloop.rst:1056 +#: ../../library/asyncio-eventloop.rst:1077 msgid "" "Receive a datagram of up to *bufsize* from *sock*. Asynchronous version of :" "meth:`socket.recvfrom() `." msgstr "" -#: ../../library/asyncio-eventloop.rst:1059 +#: ../../library/asyncio-eventloop.rst:1080 msgid "Return a tuple of (received data, remote address)." msgstr "" -#: ../../library/asyncio-eventloop.rst:1068 +#: ../../library/asyncio-eventloop.rst:1089 msgid "" "Receive a datagram of up to *nbytes* from *sock* into *buf*. Asynchronous " "version of :meth:`socket.recvfrom_into() `." msgstr "" -#: ../../library/asyncio-eventloop.rst:1072 +#: ../../library/asyncio-eventloop.rst:1093 msgid "Return a tuple of (number of bytes received, remote address)." msgstr "" -#: ../../library/asyncio-eventloop.rst:1081 +#: ../../library/asyncio-eventloop.rst:1102 msgid "" "Send *data* to the *sock* socket. Asynchronous version of :meth:`socket." "sendall() `." msgstr "" -#: ../../library/asyncio-eventloop.rst:1084 +#: ../../library/asyncio-eventloop.rst:1105 msgid "" "This method continues to send to the socket until either all data in *data* " "has been sent or an error occurs. ``None`` is returned on success. On " @@ -1386,34 +1425,34 @@ msgid "" "the connection." msgstr "" -#: ../../library/asyncio-eventloop.rst:1092 -#: ../../library/asyncio-eventloop.rst:1146 +#: ../../library/asyncio-eventloop.rst:1113 +#: ../../library/asyncio-eventloop.rst:1167 msgid "" "Even though the method was always documented as a coroutine method, before " "Python 3.7 it returned a :class:`Future`. Since Python 3.7, this is an " "``async def`` method." msgstr "" -#: ../../library/asyncio-eventloop.rst:1100 +#: ../../library/asyncio-eventloop.rst:1121 msgid "" "Send a datagram from *sock* to *address*. Asynchronous version of :meth:" "`socket.sendto() `." msgstr "" -#: ../../library/asyncio-eventloop.rst:1104 +#: ../../library/asyncio-eventloop.rst:1125 msgid "Return the number of bytes sent." msgstr "" -#: ../../library/asyncio-eventloop.rst:1113 +#: ../../library/asyncio-eventloop.rst:1134 msgid "Connect *sock* to a remote socket at *address*." msgstr "" -#: ../../library/asyncio-eventloop.rst:1115 +#: ../../library/asyncio-eventloop.rst:1136 msgid "" "Asynchronous version of :meth:`socket.connect() `." msgstr "" -#: ../../library/asyncio-eventloop.rst:1119 +#: ../../library/asyncio-eventloop.rst:1140 msgid "" "``address`` no longer needs to be resolved. ``sock_connect`` will try to " "check if the *address* is already resolved by calling :func:`socket." @@ -1421,19 +1460,19 @@ msgid "" "*address*." msgstr "" -#: ../../library/asyncio-eventloop.rst:1128 +#: ../../library/asyncio-eventloop.rst:1149 msgid "" ":meth:`loop.create_connection` and :func:`asyncio.open_connection() " "`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1135 +#: ../../library/asyncio-eventloop.rst:1156 msgid "" "Accept a connection. Modeled after the blocking :meth:`socket.accept() " "` method." msgstr "" -#: ../../library/asyncio-eventloop.rst:1138 +#: ../../library/asyncio-eventloop.rst:1159 msgid "" "The socket must be bound to an address and listening for connections. The " "return value is a pair ``(conn, address)`` where *conn* is a *new* socket " @@ -1441,57 +1480,57 @@ msgid "" "the address bound to the socket on the other end of the connection." msgstr "" -#: ../../library/asyncio-eventloop.rst:1153 +#: ../../library/asyncio-eventloop.rst:1174 msgid ":meth:`loop.create_server` and :func:`start_server`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1159 +#: ../../library/asyncio-eventloop.rst:1180 msgid "" "Send a file using high-performance :mod:`os.sendfile` if possible. Return " "the total number of bytes sent." msgstr "" -#: ../../library/asyncio-eventloop.rst:1162 +#: ../../library/asyncio-eventloop.rst:1183 msgid "" "Asynchronous version of :meth:`socket.sendfile() `." msgstr "" -#: ../../library/asyncio-eventloop.rst:1164 +#: ../../library/asyncio-eventloop.rst:1185 msgid "" "*sock* must be a non-blocking :const:`socket.SOCK_STREAM` :class:`~socket." "socket`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1167 +#: ../../library/asyncio-eventloop.rst:1188 msgid "*file* must be a regular file object open in binary mode." msgstr "" -#: ../../library/asyncio-eventloop.rst:1176 +#: ../../library/asyncio-eventloop.rst:1197 msgid "" "*fallback*, when set to ``True``, makes asyncio manually read and send the " "file when the platform does not support the sendfile syscall (e.g. Windows " "or SSL socket on Unix)." msgstr "" -#: ../../library/asyncio-eventloop.rst:1180 +#: ../../library/asyncio-eventloop.rst:1201 msgid "" "Raise :exc:`SendfileNotAvailableError` if the system does not support " "*sendfile* syscall and *fallback* is ``False``." msgstr "" -#: ../../library/asyncio-eventloop.rst:1189 +#: ../../library/asyncio-eventloop.rst:1210 msgid "DNS" msgstr "" -#: ../../library/asyncio-eventloop.rst:1195 +#: ../../library/asyncio-eventloop.rst:1216 msgid "Asynchronous version of :meth:`socket.getaddrinfo`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1200 +#: ../../library/asyncio-eventloop.rst:1221 msgid "Asynchronous version of :meth:`socket.getnameinfo`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1203 +#: ../../library/asyncio-eventloop.rst:1224 msgid "" "Both *getaddrinfo* and *getnameinfo* internally utilize their synchronous " "versions through the loop's default thread pool executor. When this executor " @@ -1501,7 +1540,7 @@ msgid "" "executor with a larger number of workers." msgstr "" -#: ../../library/asyncio-eventloop.rst:1210 +#: ../../library/asyncio-eventloop.rst:1231 msgid "" "Both *getaddrinfo* and *getnameinfo* methods were always documented to " "return a coroutine, but prior to Python 3.7 they were, in fact, returning :" @@ -1509,67 +1548,67 @@ msgid "" "coroutines." msgstr "" -#: ../../library/asyncio-eventloop.rst:1218 +#: ../../library/asyncio-eventloop.rst:1239 msgid "Working with pipes" msgstr "" -#: ../../library/asyncio-eventloop.rst:1223 +#: ../../library/asyncio-eventloop.rst:1244 msgid "Register the read end of *pipe* in the event loop." msgstr "" -#: ../../library/asyncio-eventloop.rst:1228 +#: ../../library/asyncio-eventloop.rst:1249 msgid "*pipe* is a :term:`file-like object `." msgstr "" -#: ../../library/asyncio-eventloop.rst:1230 +#: ../../library/asyncio-eventloop.rst:1251 msgid "" "Return pair ``(transport, protocol)``, where *transport* supports the :class:" "`ReadTransport` interface and *protocol* is an object instantiated by the " "*protocol_factory*." msgstr "" -#: ../../library/asyncio-eventloop.rst:1234 -#: ../../library/asyncio-eventloop.rst:1251 +#: ../../library/asyncio-eventloop.rst:1255 +#: ../../library/asyncio-eventloop.rst:1272 msgid "" "With :class:`SelectorEventLoop` event loop, the *pipe* is set to non-" "blocking mode." msgstr "" -#: ../../library/asyncio-eventloop.rst:1240 +#: ../../library/asyncio-eventloop.rst:1261 msgid "Register the write end of *pipe* in the event loop." msgstr "" -#: ../../library/asyncio-eventloop.rst:1245 +#: ../../library/asyncio-eventloop.rst:1266 msgid "*pipe* is :term:`file-like object `." msgstr "" -#: ../../library/asyncio-eventloop.rst:1247 +#: ../../library/asyncio-eventloop.rst:1268 msgid "" "Return pair ``(transport, protocol)``, where *transport* supports :class:" "`WriteTransport` interface and *protocol* is an object instantiated by the " "*protocol_factory*." msgstr "" -#: ../../library/asyncio-eventloop.rst:1256 +#: ../../library/asyncio-eventloop.rst:1277 msgid "" ":class:`SelectorEventLoop` does not support the above methods on Windows. " "Use :class:`ProactorEventLoop` instead for Windows." msgstr "" -#: ../../library/asyncio-eventloop.rst:1261 +#: ../../library/asyncio-eventloop.rst:1282 msgid "" "The :meth:`loop.subprocess_exec` and :meth:`loop.subprocess_shell` methods." msgstr "" -#: ../../library/asyncio-eventloop.rst:1266 +#: ../../library/asyncio-eventloop.rst:1287 msgid "Unix signals" msgstr "" -#: ../../library/asyncio-eventloop.rst:1272 +#: ../../library/asyncio-eventloop.rst:1293 msgid "Set *callback* as the handler for the *signum* signal." msgstr "" -#: ../../library/asyncio-eventloop.rst:1274 +#: ../../library/asyncio-eventloop.rst:1295 msgid "" "The callback will be invoked by *loop*, along with other queued callbacks " "and runnable coroutines of that event loop. Unlike signal handlers " @@ -1577,40 +1616,40 @@ msgid "" "function is allowed to interact with the event loop." msgstr "" -#: ../../library/asyncio-eventloop.rst:1279 +#: ../../library/asyncio-eventloop.rst:1300 msgid "" "Raise :exc:`ValueError` if the signal number is invalid or uncatchable. " "Raise :exc:`RuntimeError` if there is a problem setting up the handler." msgstr "" -#: ../../library/asyncio-eventloop.rst:1285 +#: ../../library/asyncio-eventloop.rst:1306 msgid "" "Like :func:`signal.signal`, this function must be invoked in the main thread." msgstr "" -#: ../../library/asyncio-eventloop.rst:1290 +#: ../../library/asyncio-eventloop.rst:1311 msgid "Remove the handler for the *sig* signal." msgstr "" -#: ../../library/asyncio-eventloop.rst:1292 +#: ../../library/asyncio-eventloop.rst:1313 msgid "" "Return ``True`` if the signal handler was removed, or ``False`` if no " "handler was set for the given signal." msgstr "" -#: ../../library/asyncio-eventloop.rst:1299 +#: ../../library/asyncio-eventloop.rst:1320 msgid "The :mod:`signal` module." msgstr "" -#: ../../library/asyncio-eventloop.rst:1303 +#: ../../library/asyncio-eventloop.rst:1324 msgid "Executing code in thread or process pools" msgstr "" -#: ../../library/asyncio-eventloop.rst:1307 +#: ../../library/asyncio-eventloop.rst:1328 msgid "Arrange for *func* to be called in the specified executor." msgstr "" -#: ../../library/asyncio-eventloop.rst:1309 +#: ../../library/asyncio-eventloop.rst:1330 msgid "" "The *executor* argument should be an :class:`concurrent.futures.Executor` " "instance. The default executor is used if *executor* is ``None``. The " @@ -1619,7 +1658,7 @@ msgid "" "and used by :func:`run_in_executor` if needed." msgstr "" -#: ../../library/asyncio-eventloop.rst:1317 +#: ../../library/asyncio-eventloop.rst:1338 msgid "" "import asyncio\n" "import concurrent.futures\n" @@ -1668,7 +1707,7 @@ msgid "" " asyncio.run(main())" msgstr "" -#: ../../library/asyncio-eventloop.rst:1363 +#: ../../library/asyncio-eventloop.rst:1384 msgid "" "Note that the entry point guard (``if __name__ == '__main__'``) is required " "for option 3 due to the peculiarities of :mod:`multiprocessing`, which is " @@ -1676,17 +1715,17 @@ msgid "" "importing of main module `." msgstr "" -#: ../../library/asyncio-eventloop.rst:1368 +#: ../../library/asyncio-eventloop.rst:1389 msgid "This method returns a :class:`asyncio.Future` object." msgstr "" -#: ../../library/asyncio-eventloop.rst:1370 +#: ../../library/asyncio-eventloop.rst:1391 msgid "" "Use :func:`functools.partial` :ref:`to pass keyword arguments ` to *func*." msgstr "" -#: ../../library/asyncio-eventloop.rst:1373 +#: ../../library/asyncio-eventloop.rst:1394 msgid "" ":meth:`loop.run_in_executor` no longer configures the ``max_workers`` of the " "thread pool executor it creates, instead leaving it up to the thread pool " @@ -1694,7 +1733,7 @@ msgid "" "default." msgstr "" -#: ../../library/asyncio-eventloop.rst:1382 +#: ../../library/asyncio-eventloop.rst:1403 msgid "" "Set *executor* as the default executor used by :meth:`run_in_executor`. " "*executor* must be an instance of :class:`~concurrent.futures." @@ -1702,25 +1741,25 @@ msgid "" "InterpreterPoolExecutor`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1387 +#: ../../library/asyncio-eventloop.rst:1408 msgid "" "*executor* must be an instance of :class:`~concurrent.futures." "ThreadPoolExecutor`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1393 +#: ../../library/asyncio-eventloop.rst:1414 msgid "Error Handling API" msgstr "" -#: ../../library/asyncio-eventloop.rst:1395 +#: ../../library/asyncio-eventloop.rst:1416 msgid "Allows customizing how exceptions are handled in the event loop." msgstr "" -#: ../../library/asyncio-eventloop.rst:1399 +#: ../../library/asyncio-eventloop.rst:1420 msgid "Set *handler* as the new event loop exception handler." msgstr "" -#: ../../library/asyncio-eventloop.rst:1401 +#: ../../library/asyncio-eventloop.rst:1422 msgid "" "If *handler* is ``None``, the default exception handler will be set. " "Otherwise, *handler* must be a callable with the signature matching ``(loop, " @@ -1729,190 +1768,190 @@ msgid "" "(see :meth:`call_exception_handler` documentation for details about context)." msgstr "" -#: ../../library/asyncio-eventloop.rst:1409 +#: ../../library/asyncio-eventloop.rst:1430 msgid "" "If the handler is called on behalf of a :class:`~asyncio.Task` or :class:" "`~asyncio.Handle`, it is run in the :class:`contextvars.Context` of that " "task or callback handle." msgstr "" -#: ../../library/asyncio-eventloop.rst:1415 +#: ../../library/asyncio-eventloop.rst:1436 msgid "" "The handler may be called in the :class:`~contextvars.Context` of the task " "or handle where the exception originated." msgstr "" -#: ../../library/asyncio-eventloop.rst:1420 +#: ../../library/asyncio-eventloop.rst:1441 msgid "" "Return the current exception handler, or ``None`` if no custom exception " "handler was set." msgstr "" -#: ../../library/asyncio-eventloop.rst:1427 +#: ../../library/asyncio-eventloop.rst:1448 msgid "Default exception handler." msgstr "" -#: ../../library/asyncio-eventloop.rst:1429 +#: ../../library/asyncio-eventloop.rst:1450 msgid "" "This is called when an exception occurs and no exception handler is set. " "This can be called by a custom exception handler that wants to defer to the " "default handler behavior." msgstr "" -#: ../../library/asyncio-eventloop.rst:1433 +#: ../../library/asyncio-eventloop.rst:1454 msgid "" "*context* parameter has the same meaning as in :meth:" "`call_exception_handler`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1438 +#: ../../library/asyncio-eventloop.rst:1459 msgid "Call the current event loop exception handler." msgstr "" -#: ../../library/asyncio-eventloop.rst:1440 +#: ../../library/asyncio-eventloop.rst:1461 msgid "" "*context* is a ``dict`` object containing the following keys (new keys may " "be introduced in future Python versions):" msgstr "" -#: ../../library/asyncio-eventloop.rst:1443 +#: ../../library/asyncio-eventloop.rst:1464 msgid "'message': Error message;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1444 +#: ../../library/asyncio-eventloop.rst:1465 msgid "'exception' (optional): Exception object;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1445 +#: ../../library/asyncio-eventloop.rst:1466 msgid "'future' (optional): :class:`asyncio.Future` instance;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1446 +#: ../../library/asyncio-eventloop.rst:1467 msgid "'task' (optional): :class:`asyncio.Task` instance;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1447 +#: ../../library/asyncio-eventloop.rst:1468 msgid "'handle' (optional): :class:`asyncio.Handle` instance;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1448 +#: ../../library/asyncio-eventloop.rst:1469 msgid "'protocol' (optional): :ref:`Protocol ` instance;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1449 +#: ../../library/asyncio-eventloop.rst:1470 msgid "'transport' (optional): :ref:`Transport ` instance;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1450 +#: ../../library/asyncio-eventloop.rst:1471 msgid "'socket' (optional): :class:`socket.socket` instance;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1451 +#: ../../library/asyncio-eventloop.rst:1472 msgid "'source_traceback' (optional): Traceback of the source;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1452 +#: ../../library/asyncio-eventloop.rst:1473 msgid "'handle_traceback' (optional): Traceback of the handle;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1453 +#: ../../library/asyncio-eventloop.rst:1474 msgid "'asyncgen' (optional): Asynchronous generator that caused" msgstr "" -#: ../../library/asyncio-eventloop.rst:1454 +#: ../../library/asyncio-eventloop.rst:1475 msgid "the exception." msgstr "" -#: ../../library/asyncio-eventloop.rst:1458 +#: ../../library/asyncio-eventloop.rst:1479 msgid "" "This method should not be overloaded in subclassed event loops. For custom " "exception handling, use the :meth:`set_exception_handler` method." msgstr "" -#: ../../library/asyncio-eventloop.rst:1463 +#: ../../library/asyncio-eventloop.rst:1484 msgid "Enabling debug mode" msgstr "" -#: ../../library/asyncio-eventloop.rst:1467 +#: ../../library/asyncio-eventloop.rst:1488 msgid "Get the debug mode (:class:`bool`) of the event loop." msgstr "" -#: ../../library/asyncio-eventloop.rst:1469 +#: ../../library/asyncio-eventloop.rst:1490 msgid "" "The default value is ``True`` if the environment variable :envvar:" "`PYTHONASYNCIODEBUG` is set to a non-empty string, ``False`` otherwise." msgstr "" -#: ../../library/asyncio-eventloop.rst:1475 +#: ../../library/asyncio-eventloop.rst:1496 msgid "Set the debug mode of the event loop." msgstr "" -#: ../../library/asyncio-eventloop.rst:1479 +#: ../../library/asyncio-eventloop.rst:1500 msgid "" "The new :ref:`Python Development Mode ` can now also be used to " "enable the debug mode." msgstr "" -#: ../../library/asyncio-eventloop.rst:1484 +#: ../../library/asyncio-eventloop.rst:1505 msgid "" "This attribute can be used to set the minimum execution duration in seconds " "that is considered \"slow\". When debug mode is enabled, \"slow\" callbacks " "are logged." msgstr "" -#: ../../library/asyncio-eventloop.rst:1488 +#: ../../library/asyncio-eventloop.rst:1509 msgid "Default value is 100 milliseconds." msgstr "" -#: ../../library/asyncio-eventloop.rst:1492 +#: ../../library/asyncio-eventloop.rst:1513 msgid "The :ref:`debug mode of asyncio `." msgstr "" -#: ../../library/asyncio-eventloop.rst:1496 +#: ../../library/asyncio-eventloop.rst:1517 msgid "Running Subprocesses" msgstr "" -#: ../../library/asyncio-eventloop.rst:1498 +#: ../../library/asyncio-eventloop.rst:1519 msgid "" "Methods described in this subsections are low-level. In regular async/await " "code consider using the high-level :func:`asyncio.create_subprocess_shell` " "and :func:`asyncio.create_subprocess_exec` convenience functions instead." msgstr "" -#: ../../library/asyncio-eventloop.rst:1505 +#: ../../library/asyncio-eventloop.rst:1526 msgid "" "On Windows, the default event loop :class:`ProactorEventLoop` supports " "subprocesses, whereas :class:`SelectorEventLoop` does not. See :ref:" "`Subprocess Support on Windows ` for details." msgstr "" -#: ../../library/asyncio-eventloop.rst:1517 +#: ../../library/asyncio-eventloop.rst:1538 msgid "" "Create a subprocess from one or more string arguments specified by *args*." msgstr "" -#: ../../library/asyncio-eventloop.rst:1520 +#: ../../library/asyncio-eventloop.rst:1541 msgid "*args* must be a list of strings represented by:" msgstr "" -#: ../../library/asyncio-eventloop.rst:1522 +#: ../../library/asyncio-eventloop.rst:1543 msgid ":class:`str`;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1523 +#: ../../library/asyncio-eventloop.rst:1544 msgid "" "or :class:`bytes`, encoded to the :ref:`filesystem encoding `." msgstr "" -#: ../../library/asyncio-eventloop.rst:1526 +#: ../../library/asyncio-eventloop.rst:1547 msgid "" "The first string specifies the program executable, and the remaining strings " "specify the arguments. Together, string arguments form the ``argv`` of the " "program." msgstr "" -#: ../../library/asyncio-eventloop.rst:1530 +#: ../../library/asyncio-eventloop.rst:1551 msgid "" "This is similar to the standard library :class:`subprocess.Popen` class " "called with ``shell=False`` and the list of strings passed as the first " @@ -1920,85 +1959,85 @@ msgid "" "which is list of strings, *subprocess_exec* takes multiple string arguments." msgstr "" -#: ../../library/asyncio-eventloop.rst:1536 +#: ../../library/asyncio-eventloop.rst:1557 msgid "" "The *protocol_factory* must be a callable returning a subclass of the :class:" "`asyncio.SubprocessProtocol` class." msgstr "" -#: ../../library/asyncio-eventloop.rst:1539 +#: ../../library/asyncio-eventloop.rst:1560 msgid "Other parameters:" msgstr "" -#: ../../library/asyncio-eventloop.rst:1541 +#: ../../library/asyncio-eventloop.rst:1562 msgid "*stdin* can be any of these:" msgstr "" -#: ../../library/asyncio-eventloop.rst:1543 -#: ../../library/asyncio-eventloop.rst:1554 #: ../../library/asyncio-eventloop.rst:1564 +#: ../../library/asyncio-eventloop.rst:1575 +#: ../../library/asyncio-eventloop.rst:1585 msgid "a file-like object" msgstr "" -#: ../../library/asyncio-eventloop.rst:1544 +#: ../../library/asyncio-eventloop.rst:1565 msgid "" "an existing file descriptor (a positive integer), for example those created " "with :meth:`os.pipe`" msgstr "" -#: ../../library/asyncio-eventloop.rst:1545 -#: ../../library/asyncio-eventloop.rst:1555 -#: ../../library/asyncio-eventloop.rst:1565 +#: ../../library/asyncio-eventloop.rst:1566 +#: ../../library/asyncio-eventloop.rst:1576 +#: ../../library/asyncio-eventloop.rst:1586 msgid "" "the :const:`subprocess.PIPE` constant (default) which will create a new pipe " "and connect it," msgstr "" -#: ../../library/asyncio-eventloop.rst:1547 -#: ../../library/asyncio-eventloop.rst:1557 -#: ../../library/asyncio-eventloop.rst:1567 +#: ../../library/asyncio-eventloop.rst:1568 +#: ../../library/asyncio-eventloop.rst:1578 +#: ../../library/asyncio-eventloop.rst:1588 msgid "" "the value ``None`` which will make the subprocess inherit the file " "descriptor from this process" msgstr "" -#: ../../library/asyncio-eventloop.rst:1549 -#: ../../library/asyncio-eventloop.rst:1559 -#: ../../library/asyncio-eventloop.rst:1569 +#: ../../library/asyncio-eventloop.rst:1570 +#: ../../library/asyncio-eventloop.rst:1580 +#: ../../library/asyncio-eventloop.rst:1590 msgid "" "the :const:`subprocess.DEVNULL` constant which indicates that the special :" "data:`os.devnull` file will be used" msgstr "" -#: ../../library/asyncio-eventloop.rst:1552 +#: ../../library/asyncio-eventloop.rst:1573 msgid "*stdout* can be any of these:" msgstr "" -#: ../../library/asyncio-eventloop.rst:1562 +#: ../../library/asyncio-eventloop.rst:1583 msgid "*stderr* can be any of these:" msgstr "" -#: ../../library/asyncio-eventloop.rst:1571 +#: ../../library/asyncio-eventloop.rst:1592 msgid "" "the :const:`subprocess.STDOUT` constant which will connect the standard " "error stream to the process' standard output stream" msgstr "" -#: ../../library/asyncio-eventloop.rst:1574 +#: ../../library/asyncio-eventloop.rst:1595 msgid "" "All other keyword arguments are passed to :class:`subprocess.Popen` without " "interpretation, except for *bufsize*, *universal_newlines*, *shell*, *text*, " "*encoding* and *errors*, which should not be specified at all." msgstr "" -#: ../../library/asyncio-eventloop.rst:1579 +#: ../../library/asyncio-eventloop.rst:1600 msgid "" "The ``asyncio`` subprocess API does not support decoding the streams as " "text. :func:`bytes.decode` can be used to convert the bytes returned from " "the stream to text." msgstr "" -#: ../../library/asyncio-eventloop.rst:1583 +#: ../../library/asyncio-eventloop.rst:1604 msgid "" "If a file-like object passed as *stdin*, *stdout* or *stderr* represents a " "pipe, then the other side of this pipe should be registered with :meth:" @@ -2006,52 +2045,52 @@ msgid "" "the event loop." msgstr "" -#: ../../library/asyncio-eventloop.rst:1588 +#: ../../library/asyncio-eventloop.rst:1609 msgid "" "See the constructor of the :class:`subprocess.Popen` class for documentation " "on other arguments." msgstr "" -#: ../../library/asyncio-eventloop.rst:1591 +#: ../../library/asyncio-eventloop.rst:1612 msgid "" "Returns a pair of ``(transport, protocol)``, where *transport* conforms to " "the :class:`asyncio.SubprocessTransport` base class and *protocol* is an " "object instantiated by the *protocol_factory*." msgstr "" -#: ../../library/asyncio-eventloop.rst:1600 +#: ../../library/asyncio-eventloop.rst:1621 msgid "" "Create a subprocess from *cmd*, which can be a :class:`str` or a :class:" "`bytes` string encoded to the :ref:`filesystem encoding `, using the platform's \"shell\" syntax." msgstr "" -#: ../../library/asyncio-eventloop.rst:1605 +#: ../../library/asyncio-eventloop.rst:1626 msgid "" "This is similar to the standard library :class:`subprocess.Popen` class " "called with ``shell=True``." msgstr "" -#: ../../library/asyncio-eventloop.rst:1608 +#: ../../library/asyncio-eventloop.rst:1629 msgid "" "The *protocol_factory* must be a callable returning a subclass of the :class:" "`SubprocessProtocol` class." msgstr "" -#: ../../library/asyncio-eventloop.rst:1611 +#: ../../library/asyncio-eventloop.rst:1632 msgid "" "See :meth:`~loop.subprocess_exec` for more details about the remaining " "arguments." msgstr "" -#: ../../library/asyncio-eventloop.rst:1614 +#: ../../library/asyncio-eventloop.rst:1635 msgid "" "Returns a pair of ``(transport, protocol)``, where *transport* conforms to " "the :class:`SubprocessTransport` base class and *protocol* is an object " "instantiated by the *protocol_factory*." msgstr "" -#: ../../library/asyncio-eventloop.rst:1619 +#: ../../library/asyncio-eventloop.rst:1640 msgid "" "It is the application's responsibility to ensure that all whitespace and " "special characters are quoted appropriately to avoid `shell injection " @@ -2061,74 +2100,74 @@ msgid "" "used to construct shell commands." msgstr "" -#: ../../library/asyncio-eventloop.rst:1628 +#: ../../library/asyncio-eventloop.rst:1649 msgid "Callback Handles" msgstr "" -#: ../../library/asyncio-eventloop.rst:1632 +#: ../../library/asyncio-eventloop.rst:1653 msgid "" "A callback wrapper object returned by :meth:`loop.call_soon`, :meth:`loop." "call_soon_threadsafe`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1637 +#: ../../library/asyncio-eventloop.rst:1658 msgid "" "Return the :class:`contextvars.Context` object associated with the handle." msgstr "" -#: ../../library/asyncio-eventloop.rst:1644 +#: ../../library/asyncio-eventloop.rst:1665 msgid "" "Cancel the callback. If the callback has already been canceled or executed, " "this method has no effect." msgstr "" -#: ../../library/asyncio-eventloop.rst:1649 +#: ../../library/asyncio-eventloop.rst:1670 msgid "Return ``True`` if the callback was cancelled." msgstr "" -#: ../../library/asyncio-eventloop.rst:1655 +#: ../../library/asyncio-eventloop.rst:1676 msgid "" "A callback wrapper object returned by :meth:`loop.call_later`, and :meth:" "`loop.call_at`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1658 +#: ../../library/asyncio-eventloop.rst:1679 msgid "This class is a subclass of :class:`Handle`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1662 +#: ../../library/asyncio-eventloop.rst:1683 msgid "Return a scheduled callback time as :class:`float` seconds." msgstr "" -#: ../../library/asyncio-eventloop.rst:1664 +#: ../../library/asyncio-eventloop.rst:1685 msgid "" "The time is an absolute timestamp, using the same time reference as :meth:" "`loop.time`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1671 +#: ../../library/asyncio-eventloop.rst:1692 msgid "Server Objects" msgstr "" -#: ../../library/asyncio-eventloop.rst:1673 +#: ../../library/asyncio-eventloop.rst:1694 msgid "" "Server objects are created by :meth:`loop.create_server`, :meth:`loop." "create_unix_server`, :func:`start_server`, and :func:`start_unix_server` " "functions." msgstr "" -#: ../../library/asyncio-eventloop.rst:1677 +#: ../../library/asyncio-eventloop.rst:1698 msgid "Do not instantiate the :class:`Server` class directly." msgstr "" -#: ../../library/asyncio-eventloop.rst:1681 +#: ../../library/asyncio-eventloop.rst:1702 msgid "" "*Server* objects are asynchronous context managers. When used in an ``async " "with`` statement, it's guaranteed that the Server object is closed and not " "accepting new connections when the ``async with`` statement is completed::" msgstr "" -#: ../../library/asyncio-eventloop.rst:1686 +#: ../../library/asyncio-eventloop.rst:1707 msgid "" "srv = await loop.create_server(...)\n" "\n" @@ -2138,81 +2177,81 @@ msgid "" "# At this point, srv is closed and no longer accepts new connections." msgstr "" -#: ../../library/asyncio-eventloop.rst:1694 +#: ../../library/asyncio-eventloop.rst:1715 msgid "Server object is an asynchronous context manager since Python 3.7." msgstr "" -#: ../../library/asyncio-eventloop.rst:1697 +#: ../../library/asyncio-eventloop.rst:1718 msgid "" "This class was exposed publicly as ``asyncio.Server`` in Python 3.9.11, " "3.10.3 and 3.11." msgstr "" -#: ../../library/asyncio-eventloop.rst:1702 +#: ../../library/asyncio-eventloop.rst:1723 msgid "" "Stop serving: close listening sockets and set the :attr:`sockets` attribute " "to ``None``." msgstr "" -#: ../../library/asyncio-eventloop.rst:1705 +#: ../../library/asyncio-eventloop.rst:1726 msgid "" "The sockets that represent existing incoming client connections are left " "open." msgstr "" -#: ../../library/asyncio-eventloop.rst:1708 +#: ../../library/asyncio-eventloop.rst:1729 msgid "" "The server is closed asynchronously; use the :meth:`wait_closed` coroutine " "to wait until the server is closed (and no more connections are active)." msgstr "" -#: ../../library/asyncio-eventloop.rst:1714 +#: ../../library/asyncio-eventloop.rst:1735 msgid "Close all existing incoming client connections." msgstr "" -#: ../../library/asyncio-eventloop.rst:1716 +#: ../../library/asyncio-eventloop.rst:1737 msgid "" "Calls :meth:`~asyncio.BaseTransport.close` on all associated transports." msgstr "" -#: ../../library/asyncio-eventloop.rst:1719 +#: ../../library/asyncio-eventloop.rst:1740 msgid "" ":meth:`close` should be called before :meth:`close_clients` when closing the " "server to avoid races with new clients connecting." msgstr "" -#: ../../library/asyncio-eventloop.rst:1726 +#: ../../library/asyncio-eventloop.rst:1747 msgid "" "Close all existing incoming client connections immediately, without waiting " "for pending operations to complete." msgstr "" -#: ../../library/asyncio-eventloop.rst:1729 +#: ../../library/asyncio-eventloop.rst:1750 msgid "" "Calls :meth:`~asyncio.WriteTransport.abort` on all associated transports." msgstr "" -#: ../../library/asyncio-eventloop.rst:1732 +#: ../../library/asyncio-eventloop.rst:1753 msgid "" ":meth:`close` should be called before :meth:`abort_clients` when closing the " "server to avoid races with new clients connecting." msgstr "" -#: ../../library/asyncio-eventloop.rst:1739 +#: ../../library/asyncio-eventloop.rst:1760 msgid "Return the event loop associated with the server object." msgstr "" -#: ../../library/asyncio-eventloop.rst:1746 +#: ../../library/asyncio-eventloop.rst:1767 msgid "Start accepting connections." msgstr "" -#: ../../library/asyncio-eventloop.rst:1748 +#: ../../library/asyncio-eventloop.rst:1769 msgid "" "This method is idempotent, so it can be called when the server is already " "serving." msgstr "" -#: ../../library/asyncio-eventloop.rst:1751 +#: ../../library/asyncio-eventloop.rst:1772 msgid "" "The *start_serving* keyword-only parameter to :meth:`loop.create_server` " "and :meth:`asyncio.start_server` allows creating a Server object that is not " @@ -2221,19 +2260,19 @@ msgid "" "accepting connections." msgstr "" -#: ../../library/asyncio-eventloop.rst:1763 +#: ../../library/asyncio-eventloop.rst:1784 msgid "" "Start accepting connections until the coroutine is cancelled. Cancellation " "of ``serve_forever`` task causes the server to be closed." msgstr "" -#: ../../library/asyncio-eventloop.rst:1767 +#: ../../library/asyncio-eventloop.rst:1788 msgid "" "This method can be called if the server is already accepting connections. " "Only one ``serve_forever`` task can exist per one *Server* object." msgstr "" -#: ../../library/asyncio-eventloop.rst:1773 +#: ../../library/asyncio-eventloop.rst:1794 msgid "" "async def client_connected(reader, writer):\n" " # Communicate with the client with\n" @@ -2248,56 +2287,56 @@ msgid "" "asyncio.run(main('127.0.0.1', 0))" msgstr "" -#: ../../library/asyncio-eventloop.rst:1789 +#: ../../library/asyncio-eventloop.rst:1810 msgid "Return ``True`` if the server is accepting new connections." msgstr "" -#: ../../library/asyncio-eventloop.rst:1796 +#: ../../library/asyncio-eventloop.rst:1817 msgid "" "Wait until the :meth:`close` method completes and all active connections " "have finished." msgstr "" -#: ../../library/asyncio-eventloop.rst:1801 +#: ../../library/asyncio-eventloop.rst:1822 msgid "" "List of socket-like objects, ``asyncio.trsock.TransportSocket``, which the " "server is listening on." msgstr "" -#: ../../library/asyncio-eventloop.rst:1804 +#: ../../library/asyncio-eventloop.rst:1825 msgid "" "Prior to Python 3.7 ``Server.sockets`` used to return an internal list of " "server sockets directly. In 3.7 a copy of that list is returned." msgstr "" -#: ../../library/asyncio-eventloop.rst:1814 +#: ../../library/asyncio-eventloop.rst:1835 msgid "Event Loop Implementations" msgstr "" -#: ../../library/asyncio-eventloop.rst:1816 +#: ../../library/asyncio-eventloop.rst:1837 msgid "" "asyncio ships with two different event loop implementations: :class:" "`SelectorEventLoop` and :class:`ProactorEventLoop`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1819 +#: ../../library/asyncio-eventloop.rst:1840 msgid "By default asyncio is configured to use :class:`EventLoop`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1824 +#: ../../library/asyncio-eventloop.rst:1845 msgid "" "A subclass of :class:`AbstractEventLoop` based on the :mod:`selectors` " "module." msgstr "" -#: ../../library/asyncio-eventloop.rst:1827 +#: ../../library/asyncio-eventloop.rst:1848 msgid "" "Uses the most efficient *selector* available for the given platform. It is " "also possible to manually configure the exact selector implementation to be " "used::" msgstr "" -#: ../../library/asyncio-eventloop.rst:1831 +#: ../../library/asyncio-eventloop.rst:1852 msgid "" "import asyncio\n" "import selectors\n" @@ -2310,45 +2349,45 @@ msgid "" "asyncio.run(main(), loop_factory=loop_factory)" msgstr "" -#: ../../library/asyncio-eventloop.rst:1846 +#: ../../library/asyncio-eventloop.rst:1867 msgid "" "A subclass of :class:`AbstractEventLoop` for Windows that uses \"I/O " "Completion Ports\" (IOCP)." msgstr "" -#: ../../library/asyncio-eventloop.rst:1852 +#: ../../library/asyncio-eventloop.rst:1873 msgid "" "`MSDN documentation on I/O Completion Ports `_." msgstr "" -#: ../../library/asyncio-eventloop.rst:1857 +#: ../../library/asyncio-eventloop.rst:1878 msgid "" "An alias to the most efficient available subclass of :class:" "`AbstractEventLoop` for the given platform." msgstr "" -#: ../../library/asyncio-eventloop.rst:1860 +#: ../../library/asyncio-eventloop.rst:1881 msgid "" "It is an alias to :class:`SelectorEventLoop` on Unix and :class:" "`ProactorEventLoop` on Windows." msgstr "" -#: ../../library/asyncio-eventloop.rst:1866 +#: ../../library/asyncio-eventloop.rst:1887 msgid "Abstract base class for asyncio-compliant event loops." msgstr "" -#: ../../library/asyncio-eventloop.rst:1868 +#: ../../library/asyncio-eventloop.rst:1889 msgid "" "The :ref:`asyncio-event-loop-methods` section lists all methods that an " "alternative implementation of ``AbstractEventLoop`` should have defined." msgstr "" -#: ../../library/asyncio-eventloop.rst:1874 +#: ../../library/asyncio-eventloop.rst:1895 msgid "Examples" msgstr "" -#: ../../library/asyncio-eventloop.rst:1876 +#: ../../library/asyncio-eventloop.rst:1897 msgid "" "Note that all examples in this section **purposefully** show how to use the " "low-level event loop APIs, such as :meth:`loop.run_forever` and :meth:`loop." @@ -2356,17 +2395,17 @@ msgid "" "consider using the high-level functions like :func:`asyncio.run`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1886 +#: ../../library/asyncio-eventloop.rst:1907 msgid "Hello World with call_soon()" msgstr "" -#: ../../library/asyncio-eventloop.rst:1888 +#: ../../library/asyncio-eventloop.rst:1909 msgid "" "An example using the :meth:`loop.call_soon` method to schedule a callback. " "The callback displays ``\"Hello World\"`` and then stops the event loop::" msgstr "" -#: ../../library/asyncio-eventloop.rst:1892 +#: ../../library/asyncio-eventloop.rst:1913 msgid "" "import asyncio\n" "\n" @@ -2387,24 +2426,24 @@ msgid "" " loop.close()" msgstr "" -#: ../../library/asyncio-eventloop.rst:1912 +#: ../../library/asyncio-eventloop.rst:1933 msgid "" "A similar :ref:`Hello World ` example created with a coroutine " "and the :func:`run` function." msgstr "" -#: ../../library/asyncio-eventloop.rst:1919 +#: ../../library/asyncio-eventloop.rst:1940 msgid "Display the current date with call_later()" msgstr "" -#: ../../library/asyncio-eventloop.rst:1921 +#: ../../library/asyncio-eventloop.rst:1942 msgid "" "An example of a callback displaying the current date every second. The " "callback uses the :meth:`loop.call_later` method to reschedule itself after " "5 seconds, and then stops the event loop::" msgstr "" -#: ../../library/asyncio-eventloop.rst:1925 +#: ../../library/asyncio-eventloop.rst:1946 msgid "" "import asyncio\n" "import datetime\n" @@ -2429,23 +2468,23 @@ msgid "" " loop.close()" msgstr "" -#: ../../library/asyncio-eventloop.rst:1949 +#: ../../library/asyncio-eventloop.rst:1970 msgid "" "A similar :ref:`current date ` example created with a " "coroutine and the :func:`run` function." msgstr "" -#: ../../library/asyncio-eventloop.rst:1956 +#: ../../library/asyncio-eventloop.rst:1977 msgid "Watch a file descriptor for read events" msgstr "" -#: ../../library/asyncio-eventloop.rst:1958 +#: ../../library/asyncio-eventloop.rst:1979 msgid "" "Wait until a file descriptor received some data using the :meth:`loop." "add_reader` method and then close the event loop::" msgstr "" -#: ../../library/asyncio-eventloop.rst:1961 +#: ../../library/asyncio-eventloop.rst:1982 msgid "" "import asyncio\n" "from socket import socketpair\n" @@ -2481,33 +2520,33 @@ msgid "" " loop.close()" msgstr "" -#: ../../library/asyncio-eventloop.rst:1996 +#: ../../library/asyncio-eventloop.rst:2017 msgid "" "A similar :ref:`example ` using " "transports, protocols, and the :meth:`loop.create_connection` method." msgstr "" -#: ../../library/asyncio-eventloop.rst:2000 +#: ../../library/asyncio-eventloop.rst:2021 msgid "" "Another similar :ref:`example ` " "using the high-level :func:`asyncio.open_connection` function and streams." msgstr "" -#: ../../library/asyncio-eventloop.rst:2008 +#: ../../library/asyncio-eventloop.rst:2029 msgid "Set signal handlers for SIGINT and SIGTERM" msgstr "" -#: ../../library/asyncio-eventloop.rst:2010 +#: ../../library/asyncio-eventloop.rst:2031 msgid "(This ``signals`` example only works on Unix.)" msgstr "" -#: ../../library/asyncio-eventloop.rst:2012 +#: ../../library/asyncio-eventloop.rst:2033 msgid "" "Register handlers for signals :const:`~signal.SIGINT` and :const:`~signal." "SIGTERM` using the :meth:`loop.add_signal_handler` method::" msgstr "" -#: ../../library/asyncio-eventloop.rst:2015 +#: ../../library/asyncio-eventloop.rst:2036 msgid "" "import asyncio\n" "import functools\n" diff --git a/library/asyncio-exceptions.po b/library/asyncio-exceptions.po index 793f54a2c..09251a6cb 100644 --- a/library/asyncio-exceptions.po +++ b/library/asyncio-exceptions.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:54+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/asyncio-extending.po b/library/asyncio-extending.po index 8aeea15cc..67fac05fc 100644 --- a/library/asyncio-extending.po +++ b/library/asyncio-extending.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2022-11-05 19:48+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/asyncio-future.po b/library/asyncio-future.po index cfc92b05b..9ef841ca4 100644 --- a/library/asyncio-future.po +++ b/library/asyncio-future.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:55+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/asyncio-llapi-index.po b/library/asyncio-llapi-index.po index e3ba69342..cdbb78797 100644 --- a/library/asyncio-llapi-index.po +++ b/library/asyncio-llapi-index.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:55+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/asyncio-platforms.po b/library/asyncio-platforms.po index d5b5db572..d63bed280 100644 --- a/library/asyncio-platforms.po +++ b/library/asyncio-platforms.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:55+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/asyncio-policy.po b/library/asyncio-policy.po index c6253e74a..f485a6428 100644 --- a/library/asyncio-policy.po +++ b/library/asyncio-policy.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:55+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/asyncio-protocol.po b/library/asyncio-protocol.po index 75a0ddd69..244ba0194 100644 --- a/library/asyncio-protocol.po +++ b/library/asyncio-protocol.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:55+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/asyncio-queue.po b/library/asyncio-queue.po index 4ee7d42ce..909ddc1ff 100644 --- a/library/asyncio-queue.po +++ b/library/asyncio-queue.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:55+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/asyncio-runner.po b/library/asyncio-runner.po index 091221e85..7fb35a224 100644 --- a/library/asyncio-runner.po +++ b/library/asyncio-runner.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2022-11-05 19:48+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/asyncio-stream.po b/library/asyncio-stream.po index f8bd3d146..57f1b3a58 100644 --- a/library/asyncio-stream.po +++ b/library/asyncio-stream.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:55+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -41,7 +42,7 @@ msgstr "" msgid "Here is an example of a TCP echo client written using asyncio streams::" msgstr "" -#: ../../library/asyncio-stream.rst:22 ../../library/asyncio-stream.rst:430 +#: ../../library/asyncio-stream.rst:22 ../../library/asyncio-stream.rst:437 msgid "" "import asyncio\n" "\n" @@ -117,13 +118,13 @@ msgid "Added the *happy_eyeballs_delay* and *interleave* parameters." msgstr "" #: ../../library/asyncio-stream.rst:84 ../../library/asyncio-stream.rst:128 -#: ../../library/asyncio-stream.rst:164 ../../library/asyncio-stream.rst:195 +#: ../../library/asyncio-stream.rst:164 ../../library/asyncio-stream.rst:199 msgid "Removed the *loop* parameter." msgstr "" #: ../../library/asyncio-stream.rst:87 ../../library/asyncio-stream.rst:131 -#: ../../library/asyncio-stream.rst:167 ../../library/asyncio-stream.rst:198 -#: ../../library/asyncio-stream.rst:397 +#: ../../library/asyncio-stream.rst:167 ../../library/asyncio-stream.rst:202 +#: ../../library/asyncio-stream.rst:404 msgid "Added the *ssl_shutdown_timeout* parameter." msgstr "" @@ -151,7 +152,7 @@ msgid "" "The rest of the arguments are passed directly to :meth:`loop.create_server`." msgstr "" -#: ../../library/asyncio-stream.rst:121 ../../library/asyncio-stream.rst:185 +#: ../../library/asyncio-stream.rst:121 ../../library/asyncio-stream.rst:189 msgid "" "The *sock* argument transfers ownership of the socket to the server created. " "To close the socket, call the server's :meth:`~asyncio.Server.close` method." @@ -182,7 +183,7 @@ msgstr "" msgid "See also the documentation of :meth:`loop.create_unix_connection`." msgstr "" -#: ../../library/asyncio-stream.rst:158 ../../library/asyncio-stream.rst:189 +#: ../../library/asyncio-stream.rst:158 ../../library/asyncio-stream.rst:193 msgid "Availability" msgstr "" @@ -201,104 +202,115 @@ msgid "Similar to :func:`start_server` but works with Unix sockets." msgstr "" #: ../../library/asyncio-stream.rst:181 +msgid "" +"If *cleanup_socket* is true then the Unix socket will automatically be " +"removed from the filesystem when the server is closed, unless the socket has " +"been replaced after the server has been created." +msgstr "" + +#: ../../library/asyncio-stream.rst:185 msgid "See also the documentation of :meth:`loop.create_unix_server`." msgstr "" -#: ../../library/asyncio-stream.rst:191 +#: ../../library/asyncio-stream.rst:195 msgid "" "Added the *ssl_handshake_timeout* and *start_serving* parameters. The *path* " "parameter can now be a :term:`path-like object`." msgstr "" -#: ../../library/asyncio-stream.rst:203 +#: ../../library/asyncio-stream.rst:205 +msgid "Added the *cleanup_socket* parameter." +msgstr "" + +#: ../../library/asyncio-stream.rst:210 msgid "StreamReader" msgstr "" -#: ../../library/asyncio-stream.rst:207 +#: ../../library/asyncio-stream.rst:214 msgid "" "Represents a reader object that provides APIs to read data from the IO " "stream. As an :term:`asynchronous iterable`, the object supports the :" "keyword:`async for` statement." msgstr "" -#: ../../library/asyncio-stream.rst:211 +#: ../../library/asyncio-stream.rst:218 msgid "" "It is not recommended to instantiate *StreamReader* objects directly; use :" "func:`open_connection` and :func:`start_server` instead." msgstr "" -#: ../../library/asyncio-stream.rst:217 +#: ../../library/asyncio-stream.rst:224 msgid "Acknowledge the EOF." msgstr "" -#: ../../library/asyncio-stream.rst:222 +#: ../../library/asyncio-stream.rst:229 msgid "Read up to *n* bytes from the stream." msgstr "" -#: ../../library/asyncio-stream.rst:224 +#: ../../library/asyncio-stream.rst:231 msgid "" "If *n* is not provided or set to ``-1``, read until EOF, then return all " "read :class:`bytes`. If EOF was received and the internal buffer is empty, " "return an empty ``bytes`` object." msgstr "" -#: ../../library/asyncio-stream.rst:229 +#: ../../library/asyncio-stream.rst:236 msgid "If *n* is ``0``, return an empty ``bytes`` object immediately." msgstr "" -#: ../../library/asyncio-stream.rst:231 +#: ../../library/asyncio-stream.rst:238 msgid "" "If *n* is positive, return at most *n* available ``bytes`` as soon as at " "least 1 byte is available in the internal buffer. If EOF is received before " "any byte is read, return an empty ``bytes`` object." msgstr "" -#: ../../library/asyncio-stream.rst:239 +#: ../../library/asyncio-stream.rst:246 msgid "" "Read one line, where \"line\" is a sequence of bytes ending with ``\\n``." msgstr "" -#: ../../library/asyncio-stream.rst:242 +#: ../../library/asyncio-stream.rst:249 msgid "" "If EOF is received and ``\\n`` was not found, the method returns partially " "read data." msgstr "" -#: ../../library/asyncio-stream.rst:245 +#: ../../library/asyncio-stream.rst:252 msgid "" "If EOF is received and the internal buffer is empty, return an empty " "``bytes`` object." msgstr "" -#: ../../library/asyncio-stream.rst:251 +#: ../../library/asyncio-stream.rst:258 msgid "Read exactly *n* bytes." msgstr "" -#: ../../library/asyncio-stream.rst:253 +#: ../../library/asyncio-stream.rst:260 msgid "" "Raise an :exc:`IncompleteReadError` if EOF is reached before *n* can be " "read. Use the :attr:`IncompleteReadError.partial` attribute to get the " "partially read data." msgstr "" -#: ../../library/asyncio-stream.rst:260 +#: ../../library/asyncio-stream.rst:267 msgid "Read data from the stream until *separator* is found." msgstr "" -#: ../../library/asyncio-stream.rst:262 +#: ../../library/asyncio-stream.rst:269 msgid "" "On success, the data and separator will be removed from the internal buffer " "(consumed). Returned data will include the separator at the end." msgstr "" -#: ../../library/asyncio-stream.rst:266 +#: ../../library/asyncio-stream.rst:273 msgid "" "If the amount of data read exceeds the configured stream limit, a :exc:" "`LimitOverrunError` exception is raised, and the data is left in the " "internal buffer and can be read again." msgstr "" -#: ../../library/asyncio-stream.rst:270 +#: ../../library/asyncio-stream.rst:277 msgid "" "If EOF is reached before the complete separator is found, an :exc:" "`IncompleteReadError` exception is raised, and the internal buffer is " @@ -306,7 +318,7 @@ msgid "" "portion of the separator." msgstr "" -#: ../../library/asyncio-stream.rst:275 +#: ../../library/asyncio-stream.rst:282 msgid "" "The *separator* may also be a tuple of separators. In this case the return " "value will be the shortest possible that has any separator as the suffix. " @@ -314,107 +326,107 @@ msgid "" "separator is considered to be the one that matched." msgstr "" -#: ../../library/asyncio-stream.rst:285 +#: ../../library/asyncio-stream.rst:292 msgid "The *separator* parameter may now be a :class:`tuple` of separators." msgstr "" -#: ../../library/asyncio-stream.rst:290 +#: ../../library/asyncio-stream.rst:297 msgid "Return ``True`` if the buffer is empty and :meth:`feed_eof` was called." msgstr "" -#: ../../library/asyncio-stream.rst:295 +#: ../../library/asyncio-stream.rst:302 msgid "StreamWriter" msgstr "" -#: ../../library/asyncio-stream.rst:299 +#: ../../library/asyncio-stream.rst:306 msgid "" "Represents a writer object that provides APIs to write data to the IO stream." msgstr "" -#: ../../library/asyncio-stream.rst:302 +#: ../../library/asyncio-stream.rst:309 msgid "" "It is not recommended to instantiate *StreamWriter* objects directly; use :" "func:`open_connection` and :func:`start_server` instead." msgstr "" -#: ../../library/asyncio-stream.rst:308 +#: ../../library/asyncio-stream.rst:315 msgid "" "The method attempts to write the *data* to the underlying socket " "immediately. If that fails, the data is queued in an internal write buffer " "until it can be sent." msgstr "" -#: ../../library/asyncio-stream.rst:312 ../../library/asyncio-stream.rst:324 +#: ../../library/asyncio-stream.rst:319 ../../library/asyncio-stream.rst:331 msgid "The method should be used along with the ``drain()`` method::" msgstr "" -#: ../../library/asyncio-stream.rst:314 +#: ../../library/asyncio-stream.rst:321 msgid "" "stream.write(data)\n" "await stream.drain()" msgstr "" -#: ../../library/asyncio-stream.rst:319 +#: ../../library/asyncio-stream.rst:326 msgid "" "The method writes a list (or any iterable) of bytes to the underlying socket " "immediately. If that fails, the data is queued in an internal write buffer " "until it can be sent." msgstr "" -#: ../../library/asyncio-stream.rst:326 +#: ../../library/asyncio-stream.rst:333 msgid "" "stream.writelines(lines)\n" "await stream.drain()" msgstr "" -#: ../../library/asyncio-stream.rst:331 +#: ../../library/asyncio-stream.rst:338 msgid "The method closes the stream and the underlying socket." msgstr "" -#: ../../library/asyncio-stream.rst:333 +#: ../../library/asyncio-stream.rst:340 msgid "" "The method should be used, though not mandatory, along with the " "``wait_closed()`` method::" msgstr "" -#: ../../library/asyncio-stream.rst:336 +#: ../../library/asyncio-stream.rst:343 msgid "" "stream.close()\n" "await stream.wait_closed()" msgstr "" -#: ../../library/asyncio-stream.rst:341 +#: ../../library/asyncio-stream.rst:348 msgid "" "Return ``True`` if the underlying transport supports the :meth:`write_eof` " "method, ``False`` otherwise." msgstr "" -#: ../../library/asyncio-stream.rst:346 +#: ../../library/asyncio-stream.rst:353 msgid "" "Close the write end of the stream after the buffered write data is flushed." msgstr "" -#: ../../library/asyncio-stream.rst:351 +#: ../../library/asyncio-stream.rst:358 msgid "Return the underlying asyncio transport." msgstr "" -#: ../../library/asyncio-stream.rst:355 +#: ../../library/asyncio-stream.rst:362 msgid "" "Access optional transport information; see :meth:`BaseTransport." "get_extra_info` for details." msgstr "" -#: ../../library/asyncio-stream.rst:361 +#: ../../library/asyncio-stream.rst:368 msgid "Wait until it is appropriate to resume writing to the stream. Example::" msgstr "" -#: ../../library/asyncio-stream.rst:364 +#: ../../library/asyncio-stream.rst:371 msgid "" "writer.write(data)\n" "await writer.drain()" msgstr "" -#: ../../library/asyncio-stream.rst:367 +#: ../../library/asyncio-stream.rst:374 msgid "" "This is a flow control method that interacts with the underlying IO write " "buffer. When the size of the buffer reaches the high watermark, *drain()* " @@ -423,82 +435,82 @@ msgid "" "`drain` returns immediately." msgstr "" -#: ../../library/asyncio-stream.rst:378 +#: ../../library/asyncio-stream.rst:385 msgid "Upgrade an existing stream-based connection to TLS." msgstr "" -#: ../../library/asyncio-stream.rst:380 +#: ../../library/asyncio-stream.rst:387 msgid "Parameters:" msgstr "" -#: ../../library/asyncio-stream.rst:382 +#: ../../library/asyncio-stream.rst:389 msgid "*sslcontext*: a configured instance of :class:`~ssl.SSLContext`." msgstr "" -#: ../../library/asyncio-stream.rst:384 +#: ../../library/asyncio-stream.rst:391 msgid "" "*server_hostname*: sets or overrides the host name that the target server's " "certificate will be matched against." msgstr "" -#: ../../library/asyncio-stream.rst:387 +#: ../../library/asyncio-stream.rst:394 msgid "" "*ssl_handshake_timeout* is the time in seconds to wait for the TLS handshake " "to complete before aborting the connection. ``60.0`` seconds if ``None`` " "(default)." msgstr "" -#: ../../library/asyncio-stream.rst:391 +#: ../../library/asyncio-stream.rst:398 msgid "" "*ssl_shutdown_timeout* is the time in seconds to wait for the SSL shutdown " "to complete before aborting the connection. ``30.0`` seconds if ``None`` " "(default)." msgstr "" -#: ../../library/asyncio-stream.rst:403 +#: ../../library/asyncio-stream.rst:410 msgid "" "Return ``True`` if the stream is closed or in the process of being closed." msgstr "" -#: ../../library/asyncio-stream.rst:411 +#: ../../library/asyncio-stream.rst:418 msgid "Wait until the stream is closed." msgstr "" -#: ../../library/asyncio-stream.rst:413 +#: ../../library/asyncio-stream.rst:420 msgid "" "Should be called after :meth:`close` to wait until the underlying connection " "is closed, ensuring that all data has been flushed before e.g. exiting the " "program." msgstr "" -#: ../../library/asyncio-stream.rst:421 +#: ../../library/asyncio-stream.rst:428 msgid "Examples" msgstr "" -#: ../../library/asyncio-stream.rst:426 +#: ../../library/asyncio-stream.rst:433 msgid "TCP echo client using streams" msgstr "" -#: ../../library/asyncio-stream.rst:428 +#: ../../library/asyncio-stream.rst:435 msgid "TCP echo client using the :func:`asyncio.open_connection` function::" msgstr "" -#: ../../library/asyncio-stream.rst:452 +#: ../../library/asyncio-stream.rst:459 msgid "" "The :ref:`TCP echo client protocol " "` example uses the low-level :meth:" "`loop.create_connection` method." msgstr "" -#: ../../library/asyncio-stream.rst:459 +#: ../../library/asyncio-stream.rst:466 msgid "TCP echo server using streams" msgstr "" -#: ../../library/asyncio-stream.rst:461 +#: ../../library/asyncio-stream.rst:468 msgid "TCP echo server using the :func:`asyncio.start_server` function::" msgstr "" -#: ../../library/asyncio-stream.rst:463 +#: ../../library/asyncio-stream.rst:470 msgid "" "import asyncio\n" "\n" @@ -530,23 +542,23 @@ msgid "" "asyncio.run(main())" msgstr "" -#: ../../library/asyncio-stream.rst:495 +#: ../../library/asyncio-stream.rst:502 msgid "" "The :ref:`TCP echo server protocol " "` example uses the :meth:`loop." "create_server` method." msgstr "" -#: ../../library/asyncio-stream.rst:500 +#: ../../library/asyncio-stream.rst:507 msgid "Get HTTP headers" msgstr "" -#: ../../library/asyncio-stream.rst:502 +#: ../../library/asyncio-stream.rst:509 msgid "" "Simple example querying HTTP headers of the URL passed on the command line::" msgstr "" -#: ../../library/asyncio-stream.rst:504 +#: ../../library/asyncio-stream.rst:511 msgid "" "import asyncio\n" "import urllib.parse\n" @@ -585,33 +597,33 @@ msgid "" "asyncio.run(print_http_headers(url))" msgstr "" -#: ../../library/asyncio-stream.rst:541 +#: ../../library/asyncio-stream.rst:548 msgid "Usage::" msgstr "" -#: ../../library/asyncio-stream.rst:543 +#: ../../library/asyncio-stream.rst:550 msgid "python example.py http://example.com/path/page.html" msgstr "" -#: ../../library/asyncio-stream.rst:545 +#: ../../library/asyncio-stream.rst:552 msgid "or with HTTPS::" msgstr "" -#: ../../library/asyncio-stream.rst:547 +#: ../../library/asyncio-stream.rst:554 msgid "python example.py https://example.com/path/page.html" msgstr "" -#: ../../library/asyncio-stream.rst:553 +#: ../../library/asyncio-stream.rst:560 msgid "Register an open socket to wait for data using streams" msgstr "" -#: ../../library/asyncio-stream.rst:555 +#: ../../library/asyncio-stream.rst:562 msgid "" "Coroutine waiting until a socket receives data using the :func:" "`open_connection` function::" msgstr "" -#: ../../library/asyncio-stream.rst:558 +#: ../../library/asyncio-stream.rst:565 msgid "" "import asyncio\n" "import socket\n" @@ -644,14 +656,14 @@ msgid "" "asyncio.run(wait_for_data())" msgstr "" -#: ../../library/asyncio-stream.rst:590 +#: ../../library/asyncio-stream.rst:597 msgid "" "The :ref:`register an open socket to wait for data using a protocol " "` example uses a low-level protocol and " "the :meth:`loop.create_connection` method." msgstr "" -#: ../../library/asyncio-stream.rst:594 +#: ../../library/asyncio-stream.rst:601 msgid "" "The :ref:`watch a file descriptor for read events " "` example uses the low-level :meth:`loop." diff --git a/library/asyncio-subprocess.po b/library/asyncio-subprocess.po index a9d1544a2..16d4289a1 100644 --- a/library/asyncio-subprocess.po +++ b/library/asyncio-subprocess.po @@ -6,15 +6,16 @@ # Translators: # Danial Behzadi , 2025 # Parham Forati, 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:55+0000\n" -"Last-Translator: Parham Forati, 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/asyncio-sync.po b/library/asyncio-sync.po index 098e47dc1..594444330 100644 --- a/library/asyncio-sync.po +++ b/library/asyncio-sync.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:55+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/asyncio-task.po b/library/asyncio-task.po index 7f5d00e51..d016376f4 100644 --- a/library/asyncio-task.po +++ b/library/asyncio-task.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:55+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -355,31 +356,40 @@ msgstr "" #: ../../library/asyncio-task.rst:246 msgid "" -"If *name* is not ``None``, it is set as the name of the task using :meth:" -"`Task.set_name`." +"The full function signature is largely the same as that of the :class:`Task` " +"constructor (or factory) - all of the keyword arguments to this function are " +"passed through to that interface." msgstr "" -#: ../../library/asyncio-task.rst:249 +#: ../../library/asyncio-task.rst:250 msgid "" "An optional keyword-only *context* argument allows specifying a custom :" "class:`contextvars.Context` for the *coro* to run in. The current context " "copy is created when no *context* is provided." msgstr "" -#: ../../library/asyncio-task.rst:253 +#: ../../library/asyncio-task.rst:254 +msgid "" +"An optional keyword-only *eager_start* argument allows specifying if the " +"task should execute eagerly during the call to create_task, or be scheduled " +"later. If *eager_start* is not passed the mode set by :meth:`loop." +"set_task_factory` will be used." +msgstr "" + +#: ../../library/asyncio-task.rst:259 msgid "" "The task is executed in the loop returned by :func:`get_running_loop`, :exc:" "`RuntimeError` is raised if there is no running loop in current thread." msgstr "" -#: ../../library/asyncio-task.rst:259 +#: ../../library/asyncio-task.rst:265 msgid "" ":meth:`asyncio.TaskGroup.create_task` is a new alternative leveraging " "structural concurrency; it allows for waiting for a group of related tasks " "with strong safety guarantees." msgstr "" -#: ../../library/asyncio-task.rst:265 +#: ../../library/asyncio-task.rst:271 msgid "" "Save a reference to the result of this function, to avoid a task " "disappearing mid-execution. The event loop only keeps weak references to " @@ -388,7 +398,7 @@ msgid "" "tasks, gather them in a collection::" msgstr "" -#: ../../library/asyncio-task.rst:272 +#: ../../library/asyncio-task.rst:278 msgid "" "background_tasks = set()\n" "\n" @@ -404,25 +414,29 @@ msgid "" " task.add_done_callback(background_tasks.discard)" msgstr "" -#: ../../library/asyncio-task.rst:287 ../../library/asyncio-task.rst:1237 +#: ../../library/asyncio-task.rst:293 ../../library/asyncio-task.rst:1250 msgid "Added the *name* parameter." msgstr "" -#: ../../library/asyncio-task.rst:290 ../../library/asyncio-task.rst:1244 +#: ../../library/asyncio-task.rst:296 ../../library/asyncio-task.rst:1257 msgid "Added the *context* parameter." msgstr "" -#: ../../library/asyncio-task.rst:295 +#: ../../library/asyncio-task.rst:299 +msgid "Added the *eager_start* parameter by passing on all *kwargs*." +msgstr "" + +#: ../../library/asyncio-task.rst:304 msgid "Task Cancellation" msgstr "" -#: ../../library/asyncio-task.rst:297 +#: ../../library/asyncio-task.rst:306 msgid "" "Tasks can easily and safely be cancelled. When a task is cancelled, :exc:" "`asyncio.CancelledError` will be raised in the task at the next opportunity." msgstr "" -#: ../../library/asyncio-task.rst:301 +#: ../../library/asyncio-task.rst:310 msgid "" "It is recommended that coroutines use ``try/finally`` blocks to robustly " "perform clean-up logic. In case :exc:`asyncio.CancelledError` is explicitly " @@ -431,7 +445,7 @@ msgid "" "code will not need to be aware of it." msgstr "" -#: ../../library/asyncio-task.rst:307 +#: ../../library/asyncio-task.rst:316 msgid "" "The asyncio components that enable structured concurrency, like :class:" "`asyncio.TaskGroup` and :func:`asyncio.timeout`, are implemented using " @@ -442,24 +456,24 @@ msgid "" "``uncancel()`` to completely remove the cancellation state." msgstr "" -#: ../../library/asyncio-task.rst:319 +#: ../../library/asyncio-task.rst:328 msgid "Task Groups" msgstr "" -#: ../../library/asyncio-task.rst:321 +#: ../../library/asyncio-task.rst:330 msgid "" "Task groups combine a task creation API with a convenient and reliable way " "to wait for all tasks in the group to finish." msgstr "" -#: ../../library/asyncio-task.rst:326 +#: ../../library/asyncio-task.rst:335 msgid "" "An :ref:`asynchronous context manager ` holding a " "group of tasks. Tasks can be added to the group using :meth:`create_task`. " "All tasks are awaited when the context manager exits." msgstr "" -#: ../../library/asyncio-task.rst:335 +#: ../../library/asyncio-task.rst:344 msgid "" "Create a task in this task group. The signature matches that of :func:" "`asyncio.create_task`. If the task group is inactive (e.g. not yet entered, " @@ -467,17 +481,21 @@ msgid "" "given ``coro``." msgstr "" -#: ../../library/asyncio-task.rst:343 +#: ../../library/asyncio-task.rst:352 msgid "Close the given coroutine if the task group is not active." msgstr "" -#: ../../library/asyncio-task.rst:345 ../../library/asyncio-task.rst:551 -#: ../../library/asyncio-task.rst:724 ../../library/asyncio-task.rst:782 -#: ../../library/asyncio-task.rst:808 ../../library/asyncio-task.rst:849 +#: ../../library/asyncio-task.rst:356 +msgid "Passes on all *kwargs* to :meth:`loop.create_task`" +msgstr "" + +#: ../../library/asyncio-task.rst:358 ../../library/asyncio-task.rst:564 +#: ../../library/asyncio-task.rst:737 ../../library/asyncio-task.rst:795 +#: ../../library/asyncio-task.rst:821 ../../library/asyncio-task.rst:862 msgid "Example::" msgstr "" -#: ../../library/asyncio-task.rst:347 +#: ../../library/asyncio-task.rst:360 msgid "" "async def main():\n" " async with asyncio.TaskGroup() as tg:\n" @@ -487,7 +505,7 @@ msgid "" "result()}\")" msgstr "" -#: ../../library/asyncio-task.rst:353 +#: ../../library/asyncio-task.rst:366 msgid "" "The ``async with`` statement will wait for all tasks in the group to finish. " "While waiting, new tasks may still be added to the group (for example, by " @@ -496,7 +514,7 @@ msgid "" "block is exited, no new tasks may be added to the group." msgstr "" -#: ../../library/asyncio-task.rst:360 +#: ../../library/asyncio-task.rst:373 msgid "" "The first time any of the tasks belonging to the group fails with an " "exception other than :exc:`asyncio.CancelledError`, the remaining tasks in " @@ -508,7 +526,7 @@ msgid "" "bubble out of the containing ``async with`` statement." msgstr "" -#: ../../library/asyncio-task.rst:370 +#: ../../library/asyncio-task.rst:383 msgid "" "Once all tasks have finished, if any tasks have failed with an exception " "other than :exc:`asyncio.CancelledError`, those exceptions are combined in " @@ -516,7 +534,7 @@ msgid "" "their documentation) which is then raised." msgstr "" -#: ../../library/asyncio-task.rst:377 +#: ../../library/asyncio-task.rst:390 msgid "" "Two base exceptions are treated specially: If any task fails with :exc:" "`KeyboardInterrupt` or :exc:`SystemExit`, the task group still cancels the " @@ -525,7 +543,7 @@ msgid "" "`ExceptionGroup` or :exc:`BaseExceptionGroup`." msgstr "" -#: ../../library/asyncio-task.rst:383 +#: ../../library/asyncio-task.rst:396 msgid "" "If the body of the ``async with`` statement exits with an exception (so :" "meth:`~object.__aexit__` is called with an exception set), this is treated " @@ -537,7 +555,7 @@ msgid "" "`KeyboardInterrupt` and :exc:`SystemExit` as in the previous paragraph." msgstr "" -#: ../../library/asyncio-task.rst:395 +#: ../../library/asyncio-task.rst:408 msgid "" "Task groups are careful not to mix up the internal cancellation used to " "\"wake up\" their :meth:`~object.__aexit__` with cancellation requests for " @@ -548,7 +566,7 @@ msgid "" "receive another cancellation and process its own exceptions." msgstr "" -#: ../../library/asyncio-task.rst:403 +#: ../../library/asyncio-task.rst:416 msgid "" "In the case where a task group is cancelled externally and also must raise " "an :exc:`ExceptionGroup`, it will call the parent task's :meth:`~asyncio." @@ -556,30 +574,30 @@ msgid "" "be raised at the next :keyword:`await`, so the cancellation is not lost." msgstr "" -#: ../../library/asyncio-task.rst:409 +#: ../../library/asyncio-task.rst:422 msgid "" "Task groups preserve the cancellation count reported by :meth:`asyncio.Task." "cancelling`." msgstr "" -#: ../../library/asyncio-task.rst:414 +#: ../../library/asyncio-task.rst:427 msgid "" "Improved handling of simultaneous internal and external cancellations and " "correct preservation of cancellation counts." msgstr "" -#: ../../library/asyncio-task.rst:418 +#: ../../library/asyncio-task.rst:431 msgid "Terminating a Task Group" msgstr "" -#: ../../library/asyncio-task.rst:420 +#: ../../library/asyncio-task.rst:433 msgid "" "While terminating a task group is not natively supported by the standard " "library, termination can be achieved by adding an exception-raising task to " "the task group and ignoring the raised exception:" msgstr "" -#: ../../library/asyncio-task.rst:424 +#: ../../library/asyncio-task.rst:437 msgid "" "import asyncio\n" "from asyncio import TaskGroup\n" @@ -612,49 +630,49 @@ msgid "" "asyncio.run(main())" msgstr "" -#: ../../library/asyncio-task.rst:456 +#: ../../library/asyncio-task.rst:469 msgid "Expected output:" msgstr "" -#: ../../library/asyncio-task.rst:458 +#: ../../library/asyncio-task.rst:471 msgid "" "Task 1: start\n" "Task 2: start\n" "Task 1: done" msgstr "" -#: ../../library/asyncio-task.rst:465 +#: ../../library/asyncio-task.rst:478 msgid "Sleeping" msgstr "" -#: ../../library/asyncio-task.rst:470 +#: ../../library/asyncio-task.rst:483 msgid "Block for *delay* seconds." msgstr "" -#: ../../library/asyncio-task.rst:472 +#: ../../library/asyncio-task.rst:485 msgid "" "If *result* is provided, it is returned to the caller when the coroutine " "completes." msgstr "" -#: ../../library/asyncio-task.rst:475 +#: ../../library/asyncio-task.rst:488 msgid "" "``sleep()`` always suspends the current task, allowing other tasks to run." msgstr "" -#: ../../library/asyncio-task.rst:478 +#: ../../library/asyncio-task.rst:491 msgid "" "Setting the delay to 0 provides an optimized path to allow other tasks to " "run. This can be used by long-running functions to avoid blocking the event " "loop for the full duration of the function call." msgstr "" -#: ../../library/asyncio-task.rst:484 +#: ../../library/asyncio-task.rst:497 msgid "" "Example of coroutine displaying the current date every second for 5 seconds::" msgstr "" -#: ../../library/asyncio-task.rst:487 +#: ../../library/asyncio-task.rst:500 msgid "" "import asyncio\n" "import datetime\n" @@ -671,40 +689,40 @@ msgid "" "asyncio.run(display_date())" msgstr "" -#: ../../library/asyncio-task.rst:502 ../../library/asyncio-task.rst:600 -#: ../../library/asyncio-task.rst:699 ../../library/asyncio-task.rst:874 -#: ../../library/asyncio-task.rst:929 ../../library/asyncio-task.rst:986 +#: ../../library/asyncio-task.rst:515 ../../library/asyncio-task.rst:613 +#: ../../library/asyncio-task.rst:712 ../../library/asyncio-task.rst:887 +#: ../../library/asyncio-task.rst:942 ../../library/asyncio-task.rst:999 msgid "Removed the *loop* parameter." msgstr "" -#: ../../library/asyncio-task.rst:505 +#: ../../library/asyncio-task.rst:518 msgid "Raises :exc:`ValueError` if *delay* is :data:`~math.nan`." msgstr "" -#: ../../library/asyncio-task.rst:510 +#: ../../library/asyncio-task.rst:523 msgid "Running Tasks Concurrently" msgstr "" -#: ../../library/asyncio-task.rst:514 +#: ../../library/asyncio-task.rst:527 msgid "" "Run :ref:`awaitable objects ` in the *aws* sequence " "*concurrently*." msgstr "" -#: ../../library/asyncio-task.rst:517 +#: ../../library/asyncio-task.rst:530 msgid "" "If any awaitable in *aws* is a coroutine, it is automatically scheduled as a " "Task." msgstr "" -#: ../../library/asyncio-task.rst:520 +#: ../../library/asyncio-task.rst:533 msgid "" "If all awaitables are completed successfully, the result is an aggregate " "list of returned values. The order of result values corresponds to the " "order of awaitables in *aws*." msgstr "" -#: ../../library/asyncio-task.rst:524 +#: ../../library/asyncio-task.rst:537 msgid "" "If *return_exceptions* is ``False`` (default), the first raised exception is " "immediately propagated to the task that awaits on ``gather()``. Other " @@ -712,19 +730,19 @@ msgid "" "run." msgstr "" -#: ../../library/asyncio-task.rst:529 +#: ../../library/asyncio-task.rst:542 msgid "" "If *return_exceptions* is ``True``, exceptions are treated the same as " "successful results, and aggregated in the result list." msgstr "" -#: ../../library/asyncio-task.rst:532 +#: ../../library/asyncio-task.rst:545 msgid "" "If ``gather()`` is *cancelled*, all submitted awaitables (that have not " "completed yet) are also *cancelled*." msgstr "" -#: ../../library/asyncio-task.rst:535 +#: ../../library/asyncio-task.rst:548 msgid "" "If any Task or Future from the *aws* sequence is *cancelled*, it is treated " "as if it raised :exc:`CancelledError` -- the ``gather()`` call is **not** " @@ -732,7 +750,7 @@ msgid "" "submitted Task/Future to cause other Tasks/Futures to be cancelled." msgstr "" -#: ../../library/asyncio-task.rst:542 +#: ../../library/asyncio-task.rst:555 msgid "" "A new alternative to create and run tasks concurrently and wait for their " "completion is :class:`asyncio.TaskGroup`. *TaskGroup* provides stronger " @@ -742,7 +760,7 @@ msgid "" "tasks)." msgstr "" -#: ../../library/asyncio-task.rst:553 +#: ../../library/asyncio-task.rst:566 msgid "" "import asyncio\n" "\n" @@ -781,7 +799,7 @@ msgid "" "# [2, 6, 24]" msgstr "" -#: ../../library/asyncio-task.rst:589 +#: ../../library/asyncio-task.rst:602 msgid "" "If *return_exceptions* is false, cancelling gather() after it has been " "marked done won't cancel any submitted awaitables. For instance, gather can " @@ -790,28 +808,28 @@ msgid "" "the awaitables) from gather won't cancel any other awaitables." msgstr "" -#: ../../library/asyncio-task.rst:596 +#: ../../library/asyncio-task.rst:609 msgid "" "If the *gather* itself is cancelled, the cancellation is propagated " "regardless of *return_exceptions*." msgstr "" -#: ../../library/asyncio-task.rst:603 +#: ../../library/asyncio-task.rst:616 msgid "" "Deprecation warning is emitted if no positional arguments are provided or " "not all positional arguments are Future-like objects and there is no running " "event loop." msgstr "" -#: ../../library/asyncio-task.rst:612 +#: ../../library/asyncio-task.rst:625 msgid "Eager Task Factory" msgstr "" -#: ../../library/asyncio-task.rst:616 +#: ../../library/asyncio-task.rst:629 msgid "A task factory for eager task execution." msgstr "" -#: ../../library/asyncio-task.rst:618 +#: ../../library/asyncio-task.rst:631 msgid "" "When using this factory (via :meth:`loop.set_task_factory(asyncio." "eager_task_factory) `), coroutines begin execution " @@ -821,13 +839,13 @@ msgid "" "synchronously." msgstr "" -#: ../../library/asyncio-task.rst:624 +#: ../../library/asyncio-task.rst:637 msgid "" "A common example where this is beneficial is coroutines which employ caching " "or memoization to avoid actual I/O when possible." msgstr "" -#: ../../library/asyncio-task.rst:629 +#: ../../library/asyncio-task.rst:642 msgid "" "Immediate execution of the coroutine is a semantic change. If the coroutine " "returns or raises, the task is never scheduled to the event loop. If the " @@ -836,60 +854,60 @@ msgid "" "the application's task execution order is likely to change." msgstr "" -#: ../../library/asyncio-task.rst:640 +#: ../../library/asyncio-task.rst:653 msgid "" "Create an eager task factory, similar to :func:`eager_task_factory`, using " "the provided *custom_task_constructor* when creating a new task instead of " "the default :class:`Task`." msgstr "" -#: ../../library/asyncio-task.rst:644 +#: ../../library/asyncio-task.rst:657 msgid "" "*custom_task_constructor* must be a *callable* with the signature matching " "the signature of :class:`Task.__init__ `. The callable must return a :" "class:`asyncio.Task`-compatible object." msgstr "" -#: ../../library/asyncio-task.rst:648 +#: ../../library/asyncio-task.rst:661 msgid "" "This function returns a *callable* intended to be used as a task factory of " "an event loop via :meth:`loop.set_task_factory(factory) `)." msgstr "" -#: ../../library/asyncio-task.rst:655 +#: ../../library/asyncio-task.rst:668 msgid "Shielding From Cancellation" msgstr "" -#: ../../library/asyncio-task.rst:659 +#: ../../library/asyncio-task.rst:672 msgid "" "Protect an :ref:`awaitable object ` from being :meth:" "`cancelled `." msgstr "" -#: ../../library/asyncio-task.rst:662 ../../library/asyncio-task.rst:829 +#: ../../library/asyncio-task.rst:675 ../../library/asyncio-task.rst:842 msgid "If *aw* is a coroutine it is automatically scheduled as a Task." msgstr "" -#: ../../library/asyncio-task.rst:664 +#: ../../library/asyncio-task.rst:677 msgid "The statement::" msgstr "" -#: ../../library/asyncio-task.rst:666 +#: ../../library/asyncio-task.rst:679 msgid "" "task = asyncio.create_task(something())\n" "res = await shield(task)" msgstr "" -#: ../../library/asyncio-task.rst:669 +#: ../../library/asyncio-task.rst:682 msgid "is equivalent to::" msgstr "" -#: ../../library/asyncio-task.rst:671 +#: ../../library/asyncio-task.rst:684 msgid "res = await something()" msgstr "" -#: ../../library/asyncio-task.rst:673 +#: ../../library/asyncio-task.rst:686 msgid "" "*except* that if the coroutine containing it is cancelled, the Task running " "in ``something()`` is not cancelled. From the point of view of " @@ -898,20 +916,20 @@ msgid "" "`CancelledError`." msgstr "" -#: ../../library/asyncio-task.rst:679 +#: ../../library/asyncio-task.rst:692 msgid "" "If ``something()`` is cancelled by other means (i.e. from within itself) " "that would also cancel ``shield()``." msgstr "" -#: ../../library/asyncio-task.rst:682 +#: ../../library/asyncio-task.rst:695 msgid "" "If it is desired to completely ignore cancellation (not recommended) the " "``shield()`` function should be combined with a try/except clause, as " "follows::" msgstr "" -#: ../../library/asyncio-task.rst:686 +#: ../../library/asyncio-task.rst:699 msgid "" "task = asyncio.create_task(something())\n" "try:\n" @@ -920,7 +938,7 @@ msgid "" " res = None" msgstr "" -#: ../../library/asyncio-task.rst:694 +#: ../../library/asyncio-task.rst:707 msgid "" "Save a reference to tasks passed to this function, to avoid a task " "disappearing mid-execution. The event loop only keeps weak references to " @@ -928,43 +946,43 @@ msgid "" "any time, even before it's done." msgstr "" -#: ../../library/asyncio-task.rst:702 +#: ../../library/asyncio-task.rst:715 msgid "" "Deprecation warning is emitted if *aw* is not Future-like object and there " "is no running event loop." msgstr "" -#: ../../library/asyncio-task.rst:708 +#: ../../library/asyncio-task.rst:721 msgid "Timeouts" msgstr "" -#: ../../library/asyncio-task.rst:712 +#: ../../library/asyncio-task.rst:725 msgid "" "Return an :ref:`asynchronous context manager ` that " "can be used to limit the amount of time spent waiting on something." msgstr "" -#: ../../library/asyncio-task.rst:716 +#: ../../library/asyncio-task.rst:729 msgid "" "*delay* can either be ``None``, or a float/int number of seconds to wait. If " "*delay* is ``None``, no time limit will be applied; this can be useful if " "the delay is unknown when the context manager is created." msgstr "" -#: ../../library/asyncio-task.rst:721 +#: ../../library/asyncio-task.rst:734 msgid "" "In either case, the context manager can be rescheduled after creation using :" "meth:`Timeout.reschedule`." msgstr "" -#: ../../library/asyncio-task.rst:726 +#: ../../library/asyncio-task.rst:739 msgid "" "async def main():\n" " async with asyncio.timeout(10):\n" " await long_running_task()" msgstr "" -#: ../../library/asyncio-task.rst:730 +#: ../../library/asyncio-task.rst:743 msgid "" "If ``long_running_task`` takes more than 10 seconds to complete, the context " "manager will cancel the current task and handle the resulting :exc:`asyncio." @@ -972,18 +990,18 @@ msgid "" "can be caught and handled." msgstr "" -#: ../../library/asyncio-task.rst:737 +#: ../../library/asyncio-task.rst:750 msgid "" "The :func:`asyncio.timeout` context manager is what transforms the :exc:" "`asyncio.CancelledError` into a :exc:`TimeoutError`, which means the :exc:" "`TimeoutError` can only be caught *outside* of the context manager." msgstr "" -#: ../../library/asyncio-task.rst:742 +#: ../../library/asyncio-task.rst:755 msgid "Example of catching :exc:`TimeoutError`::" msgstr "" -#: ../../library/asyncio-task.rst:744 +#: ../../library/asyncio-task.rst:757 msgid "" "async def main():\n" " try:\n" @@ -995,48 +1013,48 @@ msgid "" " print(\"This statement will run regardless.\")" msgstr "" -#: ../../library/asyncio-task.rst:753 +#: ../../library/asyncio-task.rst:766 msgid "" "The context manager produced by :func:`asyncio.timeout` can be rescheduled " "to a different deadline and inspected." msgstr "" -#: ../../library/asyncio-task.rst:758 +#: ../../library/asyncio-task.rst:771 msgid "" "An :ref:`asynchronous context manager ` for " "cancelling overdue coroutines." msgstr "" -#: ../../library/asyncio-task.rst:761 +#: ../../library/asyncio-task.rst:774 msgid "" "``when`` should be an absolute time at which the context should time out, as " "measured by the event loop's clock:" msgstr "" -#: ../../library/asyncio-task.rst:764 +#: ../../library/asyncio-task.rst:777 msgid "If ``when`` is ``None``, the timeout will never trigger." msgstr "" -#: ../../library/asyncio-task.rst:765 +#: ../../library/asyncio-task.rst:778 msgid "" "If ``when < loop.time()``, the timeout will trigger on the next iteration of " "the event loop." msgstr "" -#: ../../library/asyncio-task.rst:770 +#: ../../library/asyncio-task.rst:783 msgid "" "Return the current deadline, or ``None`` if the current deadline is not set." msgstr "" -#: ../../library/asyncio-task.rst:775 +#: ../../library/asyncio-task.rst:788 msgid "Reschedule the timeout." msgstr "" -#: ../../library/asyncio-task.rst:779 +#: ../../library/asyncio-task.rst:792 msgid "Return whether the context manager has exceeded its deadline (expired)." msgstr "" -#: ../../library/asyncio-task.rst:784 +#: ../../library/asyncio-task.rst:797 msgid "" "async def main():\n" " try:\n" @@ -1054,17 +1072,17 @@ msgid "" " print(\"Looks like we haven't finished on time.\")" msgstr "" -#: ../../library/asyncio-task.rst:799 +#: ../../library/asyncio-task.rst:812 msgid "Timeout context managers can be safely nested." msgstr "" -#: ../../library/asyncio-task.rst:805 +#: ../../library/asyncio-task.rst:818 msgid "" "Similar to :func:`asyncio.timeout`, except *when* is the absolute time to " "stop waiting, or ``None``." msgstr "" -#: ../../library/asyncio-task.rst:810 +#: ../../library/asyncio-task.rst:823 msgid "" "async def main():\n" " loop = get_running_loop()\n" @@ -1078,41 +1096,41 @@ msgid "" " print(\"This statement will run regardless.\")" msgstr "" -#: ../../library/asyncio-task.rst:826 +#: ../../library/asyncio-task.rst:839 msgid "" "Wait for the *aw* :ref:`awaitable ` to complete with a " "timeout." msgstr "" -#: ../../library/asyncio-task.rst:831 +#: ../../library/asyncio-task.rst:844 msgid "" "*timeout* can either be ``None`` or a float or int number of seconds to wait " "for. If *timeout* is ``None``, block until the future completes." msgstr "" -#: ../../library/asyncio-task.rst:835 +#: ../../library/asyncio-task.rst:848 msgid "" "If a timeout occurs, it cancels the task and raises :exc:`TimeoutError`." msgstr "" -#: ../../library/asyncio-task.rst:838 +#: ../../library/asyncio-task.rst:851 msgid "" "To avoid the task :meth:`cancellation `, wrap it in :func:" "`shield`." msgstr "" -#: ../../library/asyncio-task.rst:841 +#: ../../library/asyncio-task.rst:854 msgid "" "The function will wait until the future is actually cancelled, so the total " "wait time may exceed the *timeout*. If an exception happens during " "cancellation, it is propagated." msgstr "" -#: ../../library/asyncio-task.rst:845 +#: ../../library/asyncio-task.rst:858 msgid "If the wait is cancelled, the future *aw* is also cancelled." msgstr "" -#: ../../library/asyncio-task.rst:851 +#: ../../library/asyncio-task.rst:864 msgid "" "async def eternity():\n" " # Sleep for one hour\n" @@ -1133,107 +1151,107 @@ msgid "" "# timeout!" msgstr "" -#: ../../library/asyncio-task.rst:869 +#: ../../library/asyncio-task.rst:882 msgid "" "When *aw* is cancelled due to a timeout, ``wait_for`` waits for *aw* to be " "cancelled. Previously, it raised :exc:`TimeoutError` immediately." msgstr "" -#: ../../library/asyncio-task.rst:877 +#: ../../library/asyncio-task.rst:890 msgid "Raises :exc:`TimeoutError` instead of :exc:`asyncio.TimeoutError`." msgstr "" -#: ../../library/asyncio-task.rst:882 +#: ../../library/asyncio-task.rst:895 msgid "Waiting Primitives" msgstr "" -#: ../../library/asyncio-task.rst:887 +#: ../../library/asyncio-task.rst:900 msgid "" "Run :class:`~asyncio.Future` and :class:`~asyncio.Task` instances in the " "*aws* iterable concurrently and block until the condition specified by " "*return_when*." msgstr "" -#: ../../library/asyncio-task.rst:891 +#: ../../library/asyncio-task.rst:904 msgid "The *aws* iterable must not be empty." msgstr "" -#: ../../library/asyncio-task.rst:893 +#: ../../library/asyncio-task.rst:906 msgid "Returns two sets of Tasks/Futures: ``(done, pending)``." msgstr "" -#: ../../library/asyncio-task.rst:895 +#: ../../library/asyncio-task.rst:908 msgid "Usage::" msgstr "" -#: ../../library/asyncio-task.rst:897 +#: ../../library/asyncio-task.rst:910 msgid "done, pending = await asyncio.wait(aws)" msgstr "" -#: ../../library/asyncio-task.rst:899 +#: ../../library/asyncio-task.rst:912 msgid "" "*timeout* (a float or int), if specified, can be used to control the maximum " "number of seconds to wait before returning." msgstr "" -#: ../../library/asyncio-task.rst:902 +#: ../../library/asyncio-task.rst:915 msgid "" "Note that this function does not raise :exc:`TimeoutError`. Futures or Tasks " "that aren't done when the timeout occurs are simply returned in the second " "set." msgstr "" -#: ../../library/asyncio-task.rst:906 +#: ../../library/asyncio-task.rst:919 msgid "" "*return_when* indicates when this function should return. It must be one of " "the following constants:" msgstr "" -#: ../../library/asyncio-task.rst:912 +#: ../../library/asyncio-task.rst:925 msgid "Constant" msgstr "" -#: ../../library/asyncio-task.rst:913 +#: ../../library/asyncio-task.rst:926 msgid "Description" msgstr "" -#: ../../library/asyncio-task.rst:916 +#: ../../library/asyncio-task.rst:929 msgid "The function will return when any future finishes or is cancelled." msgstr "" -#: ../../library/asyncio-task.rst:919 +#: ../../library/asyncio-task.rst:932 msgid "" "The function will return when any future finishes by raising an exception. " "If no future raises an exception then it is equivalent to :const:" "`ALL_COMPLETED`." msgstr "" -#: ../../library/asyncio-task.rst:924 +#: ../../library/asyncio-task.rst:937 msgid "The function will return when all futures finish or are cancelled." msgstr "" -#: ../../library/asyncio-task.rst:926 +#: ../../library/asyncio-task.rst:939 msgid "" "Unlike :func:`~asyncio.wait_for`, ``wait()`` does not cancel the futures " "when a timeout occurs." msgstr "" -#: ../../library/asyncio-task.rst:932 +#: ../../library/asyncio-task.rst:945 msgid "Passing coroutine objects to ``wait()`` directly is forbidden." msgstr "" -#: ../../library/asyncio-task.rst:935 ../../library/asyncio-task.rst:993 +#: ../../library/asyncio-task.rst:948 ../../library/asyncio-task.rst:1006 msgid "Added support for generators yielding tasks." msgstr "" -#: ../../library/asyncio-task.rst:941 +#: ../../library/asyncio-task.rst:954 msgid "" "Run :ref:`awaitable objects ` in the *aws* iterable " "concurrently. The returned object can be iterated to obtain the results of " "the awaitables as they finish." msgstr "" -#: ../../library/asyncio-task.rst:945 +#: ../../library/asyncio-task.rst:958 msgid "" "The object returned by ``as_completed()`` can be iterated as an :term:" "`asynchronous iterator` or a plain :term:`iterator`. When asynchronous " @@ -1242,7 +1260,7 @@ msgid "" "tasks with their results. Example::" msgstr "" -#: ../../library/asyncio-task.rst:951 +#: ../../library/asyncio-task.rst:964 msgid "" "ipv4_connect = create_task(open_connection(\"127.0.0.1\", 80))\n" "ipv6_connect = create_task(open_connection(\"::1\", 80))\n" @@ -1259,20 +1277,20 @@ msgid "" " print(\"IPv4 connection established.\")" msgstr "" -#: ../../library/asyncio-task.rst:965 +#: ../../library/asyncio-task.rst:978 msgid "" "During asynchronous iteration, implicitly-created tasks will be yielded for " "supplied awaitables that aren't tasks or futures." msgstr "" -#: ../../library/asyncio-task.rst:968 +#: ../../library/asyncio-task.rst:981 msgid "" "When used as a plain iterator, each iteration yields a new coroutine that " "returns the result or raises the exception of the next completed awaitable. " "This pattern is compatible with Python versions older than 3.13::" msgstr "" -#: ../../library/asyncio-task.rst:972 +#: ../../library/asyncio-task.rst:985 msgid "" "ipv4_connect = create_task(open_connection(\"127.0.0.1\", 80))\n" "ipv6_connect = create_task(open_connection(\"::1\", 80))\n" @@ -1285,34 +1303,34 @@ msgid "" " reader, writer = await next_connect" msgstr "" -#: ../../library/asyncio-task.rst:982 +#: ../../library/asyncio-task.rst:995 msgid "" "A :exc:`TimeoutError` is raised if the timeout occurs before all awaitables " "are done. This is raised by the ``async for`` loop during asynchronous " "iteration or by the coroutines yielded during plain iteration." msgstr "" -#: ../../library/asyncio-task.rst:989 +#: ../../library/asyncio-task.rst:1002 msgid "" "Deprecation warning is emitted if not all awaitable objects in the *aws* " "iterable are Future-like objects and there is no running event loop." msgstr "" -#: ../../library/asyncio-task.rst:996 +#: ../../library/asyncio-task.rst:1009 msgid "" "The result can now be used as either an :term:`asynchronous iterator` or as " "a plain :term:`iterator` (previously it was only a plain iterator)." msgstr "" -#: ../../library/asyncio-task.rst:1002 +#: ../../library/asyncio-task.rst:1015 msgid "Running in Threads" msgstr "" -#: ../../library/asyncio-task.rst:1007 +#: ../../library/asyncio-task.rst:1020 msgid "Asynchronously run function *func* in a separate thread." msgstr "" -#: ../../library/asyncio-task.rst:1009 +#: ../../library/asyncio-task.rst:1022 msgid "" "Any \\*args and \\*\\*kwargs supplied for this function are directly passed " "to *func*. Also, the current :class:`contextvars.Context` is propagated, " @@ -1320,19 +1338,19 @@ msgid "" "separate thread." msgstr "" -#: ../../library/asyncio-task.rst:1014 +#: ../../library/asyncio-task.rst:1027 msgid "" "Return a coroutine that can be awaited to get the eventual result of *func*." msgstr "" -#: ../../library/asyncio-task.rst:1016 +#: ../../library/asyncio-task.rst:1029 msgid "" "This coroutine function is primarily intended to be used for executing IO-" "bound functions/methods that would otherwise block the event loop if they " "were run in the main thread. For example::" msgstr "" -#: ../../library/asyncio-task.rst:1020 +#: ../../library/asyncio-task.rst:1033 msgid "" "def blocking_io():\n" " print(f\"start blocking_io at {time.strftime('%X')}\")\n" @@ -1361,7 +1379,7 @@ msgid "" "# finished main at 19:50:54" msgstr "" -#: ../../library/asyncio-task.rst:1046 +#: ../../library/asyncio-task.rst:1059 msgid "" "Directly calling ``blocking_io()`` in any coroutine would block the event " "loop for its duration, resulting in an additional 1 second of run time. " @@ -1369,7 +1387,7 @@ msgid "" "thread without blocking the event loop." msgstr "" -#: ../../library/asyncio-task.rst:1053 +#: ../../library/asyncio-task.rst:1066 msgid "" "Due to the :term:`GIL`, ``asyncio.to_thread()`` can typically only be used " "to make IO-bound functions non-blocking. However, for extension modules that " @@ -1377,27 +1395,27 @@ msgid "" "``asyncio.to_thread()`` can also be used for CPU-bound functions." msgstr "" -#: ../../library/asyncio-task.rst:1062 +#: ../../library/asyncio-task.rst:1075 msgid "Scheduling From Other Threads" msgstr "" -#: ../../library/asyncio-task.rst:1066 +#: ../../library/asyncio-task.rst:1079 msgid "Submit a coroutine to the given event loop. Thread-safe." msgstr "" -#: ../../library/asyncio-task.rst:1068 +#: ../../library/asyncio-task.rst:1081 msgid "" "Return a :class:`concurrent.futures.Future` to wait for the result from " "another OS thread." msgstr "" -#: ../../library/asyncio-task.rst:1071 +#: ../../library/asyncio-task.rst:1084 msgid "" "This function is meant to be called from a different OS thread than the one " "where the event loop is running. Example::" msgstr "" -#: ../../library/asyncio-task.rst:1074 +#: ../../library/asyncio-task.rst:1087 msgid "" "def in_thread(loop: asyncio.AbstractEventLoop) -> None:\n" " # Run some blocking IO\n" @@ -1421,11 +1439,11 @@ msgid "" " await asyncio.to_thread(in_thread, loop)" msgstr "" -#: ../../library/asyncio-task.rst:1094 +#: ../../library/asyncio-task.rst:1107 msgid "It's also possible to run the other way around. Example::" msgstr "" -#: ../../library/asyncio-task.rst:1096 +#: ../../library/asyncio-task.rst:1109 msgid "" "@contextlib.contextmanager\n" "def loop_in_thread() -> Generator[asyncio.AbstractEventLoop]:\n" @@ -1461,13 +1479,13 @@ msgid "" " assert future.result(timeout=2) == 3" msgstr "" -#: ../../library/asyncio-task.rst:1128 +#: ../../library/asyncio-task.rst:1141 msgid "" "If an exception is raised in the coroutine, the returned Future will be " "notified. It can also be used to cancel the task in the event loop::" msgstr "" -#: ../../library/asyncio-task.rst:1132 +#: ../../library/asyncio-task.rst:1145 msgid "" "try:\n" " result = future.result(timeout)\n" @@ -1480,59 +1498,59 @@ msgid "" " print(f'The coroutine returned: {result!r}')" msgstr "" -#: ../../library/asyncio-task.rst:1142 +#: ../../library/asyncio-task.rst:1155 msgid "" "See the :ref:`concurrency and multithreading ` " "section of the documentation." msgstr "" -#: ../../library/asyncio-task.rst:1145 +#: ../../library/asyncio-task.rst:1158 msgid "" "Unlike other asyncio functions this function requires the *loop* argument to " "be passed explicitly." msgstr "" -#: ../../library/asyncio-task.rst:1152 +#: ../../library/asyncio-task.rst:1165 msgid "Introspection" msgstr "" -#: ../../library/asyncio-task.rst:1157 +#: ../../library/asyncio-task.rst:1170 msgid "" "Return the currently running :class:`Task` instance, or ``None`` if no task " "is running." msgstr "" -#: ../../library/asyncio-task.rst:1160 +#: ../../library/asyncio-task.rst:1173 msgid "" "If *loop* is ``None`` :func:`get_running_loop` is used to get the current " "loop." msgstr "" -#: ../../library/asyncio-task.rst:1168 +#: ../../library/asyncio-task.rst:1181 msgid "Return a set of not yet finished :class:`Task` objects run by the loop." msgstr "" -#: ../../library/asyncio-task.rst:1171 +#: ../../library/asyncio-task.rst:1184 msgid "" "If *loop* is ``None``, :func:`get_running_loop` is used for getting current " "loop." msgstr "" -#: ../../library/asyncio-task.rst:1179 +#: ../../library/asyncio-task.rst:1192 msgid "Return ``True`` if *obj* is a coroutine object." msgstr "" -#: ../../library/asyncio-task.rst:1185 +#: ../../library/asyncio-task.rst:1198 msgid "Task Object" msgstr "" -#: ../../library/asyncio-task.rst:1189 +#: ../../library/asyncio-task.rst:1202 msgid "" "A :class:`Future-like ` object that runs a Python :ref:`coroutine " "`. Not thread-safe." msgstr "" -#: ../../library/asyncio-task.rst:1192 +#: ../../library/asyncio-task.rst:1205 msgid "" "Tasks are used to run coroutines in event loops. If a coroutine awaits on a " "Future, the Task suspends the execution of the coroutine and waits for the " @@ -1540,21 +1558,21 @@ msgid "" "wrapped coroutine resumes." msgstr "" -#: ../../library/asyncio-task.rst:1198 +#: ../../library/asyncio-task.rst:1211 msgid "" "Event loops use cooperative scheduling: an event loop runs one Task at a " "time. While a Task awaits for the completion of a Future, the event loop " "runs other Tasks, callbacks, or performs IO operations." msgstr "" -#: ../../library/asyncio-task.rst:1203 +#: ../../library/asyncio-task.rst:1216 msgid "" "Use the high-level :func:`asyncio.create_task` function to create Tasks, or " "the low-level :meth:`loop.create_task` or :func:`ensure_future` functions. " "Manual instantiation of Tasks is discouraged." msgstr "" -#: ../../library/asyncio-task.rst:1208 +#: ../../library/asyncio-task.rst:1221 msgid "" "To cancel a running Task use the :meth:`cancel` method. Calling it will " "cause the Task to throw a :exc:`CancelledError` exception into the wrapped " @@ -1562,20 +1580,20 @@ msgid "" "cancellation, the Future object will be cancelled." msgstr "" -#: ../../library/asyncio-task.rst:1213 +#: ../../library/asyncio-task.rst:1226 msgid "" ":meth:`cancelled` can be used to check if the Task was cancelled. The method " "returns ``True`` if the wrapped coroutine did not suppress the :exc:" "`CancelledError` exception and was actually cancelled." msgstr "" -#: ../../library/asyncio-task.rst:1218 +#: ../../library/asyncio-task.rst:1231 msgid "" ":class:`asyncio.Task` inherits from :class:`Future` all of its APIs except :" "meth:`Future.set_result` and :meth:`Future.set_exception`." msgstr "" -#: ../../library/asyncio-task.rst:1222 +#: ../../library/asyncio-task.rst:1235 msgid "" "An optional keyword-only *context* argument allows specifying a custom :" "class:`contextvars.Context` for the *coro* to run in. If no *context* is " @@ -1583,7 +1601,7 @@ msgid "" "in the copied context." msgstr "" -#: ../../library/asyncio-task.rst:1227 +#: ../../library/asyncio-task.rst:1240 msgid "" "An optional keyword-only *eager_start* argument allows eagerly starting the " "execution of the :class:`asyncio.Task` at task creation time. If set to " @@ -1593,96 +1611,96 @@ msgid "" "eagerly and will skip scheduling to the event loop." msgstr "" -#: ../../library/asyncio-task.rst:1234 +#: ../../library/asyncio-task.rst:1247 msgid "Added support for the :mod:`contextvars` module." msgstr "" -#: ../../library/asyncio-task.rst:1240 +#: ../../library/asyncio-task.rst:1253 msgid "" "Deprecation warning is emitted if *loop* is not specified and there is no " "running event loop." msgstr "" -#: ../../library/asyncio-task.rst:1247 +#: ../../library/asyncio-task.rst:1260 msgid "Added the *eager_start* parameter." msgstr "" -#: ../../library/asyncio-task.rst:1252 +#: ../../library/asyncio-task.rst:1265 msgid "Return ``True`` if the Task is *done*." msgstr "" -#: ../../library/asyncio-task.rst:1254 +#: ../../library/asyncio-task.rst:1267 msgid "" "A Task is *done* when the wrapped coroutine either returned a value, raised " "an exception, or the Task was cancelled." msgstr "" -#: ../../library/asyncio-task.rst:1259 +#: ../../library/asyncio-task.rst:1272 msgid "Return the result of the Task." msgstr "" -#: ../../library/asyncio-task.rst:1261 +#: ../../library/asyncio-task.rst:1274 msgid "" "If the Task is *done*, the result of the wrapped coroutine is returned (or " "if the coroutine raised an exception, that exception is re-raised.)" msgstr "" -#: ../../library/asyncio-task.rst:1265 ../../library/asyncio-task.rst:1279 +#: ../../library/asyncio-task.rst:1278 ../../library/asyncio-task.rst:1292 msgid "" "If the Task has been *cancelled*, this method raises a :exc:`CancelledError` " "exception." msgstr "" -#: ../../library/asyncio-task.rst:1268 +#: ../../library/asyncio-task.rst:1281 msgid "" "If the Task's result isn't yet available, this method raises an :exc:" "`InvalidStateError` exception." msgstr "" -#: ../../library/asyncio-task.rst:1273 +#: ../../library/asyncio-task.rst:1286 msgid "Return the exception of the Task." msgstr "" -#: ../../library/asyncio-task.rst:1275 +#: ../../library/asyncio-task.rst:1288 msgid "" "If the wrapped coroutine raised an exception that exception is returned. If " "the wrapped coroutine returned normally this method returns ``None``." msgstr "" -#: ../../library/asyncio-task.rst:1282 +#: ../../library/asyncio-task.rst:1295 msgid "" "If the Task isn't *done* yet, this method raises an :exc:`InvalidStateError` " "exception." msgstr "" -#: ../../library/asyncio-task.rst:1287 +#: ../../library/asyncio-task.rst:1300 msgid "Add a callback to be run when the Task is *done*." msgstr "" -#: ../../library/asyncio-task.rst:1289 ../../library/asyncio-task.rst:1298 +#: ../../library/asyncio-task.rst:1302 ../../library/asyncio-task.rst:1311 msgid "This method should only be used in low-level callback-based code." msgstr "" -#: ../../library/asyncio-task.rst:1291 +#: ../../library/asyncio-task.rst:1304 msgid "" "See the documentation of :meth:`Future.add_done_callback` for more details." msgstr "" -#: ../../library/asyncio-task.rst:1296 +#: ../../library/asyncio-task.rst:1309 msgid "Remove *callback* from the callbacks list." msgstr "" -#: ../../library/asyncio-task.rst:1300 +#: ../../library/asyncio-task.rst:1313 msgid "" "See the documentation of :meth:`Future.remove_done_callback` for more " "details." msgstr "" -#: ../../library/asyncio-task.rst:1305 +#: ../../library/asyncio-task.rst:1318 msgid "Return the list of stack frames for this Task." msgstr "" -#: ../../library/asyncio-task.rst:1307 +#: ../../library/asyncio-task.rst:1320 msgid "" "If the wrapped coroutine is not done, this returns the stack where it is " "suspended. If the coroutine has completed successfully or was cancelled, " @@ -1690,15 +1708,15 @@ msgid "" "this returns the list of traceback frames." msgstr "" -#: ../../library/asyncio-task.rst:1313 +#: ../../library/asyncio-task.rst:1326 msgid "The frames are always ordered from oldest to newest." msgstr "" -#: ../../library/asyncio-task.rst:1315 +#: ../../library/asyncio-task.rst:1328 msgid "Only one stack frame is returned for a suspended coroutine." msgstr "" -#: ../../library/asyncio-task.rst:1317 +#: ../../library/asyncio-task.rst:1330 msgid "" "The optional *limit* argument sets the maximum number of frames to return; " "by default all available frames are returned. The ordering of the returned " @@ -1707,87 +1725,87 @@ msgid "" "are returned. (This matches the behavior of the traceback module.)" msgstr "" -#: ../../library/asyncio-task.rst:1326 +#: ../../library/asyncio-task.rst:1339 msgid "Print the stack or traceback for this Task." msgstr "" -#: ../../library/asyncio-task.rst:1328 +#: ../../library/asyncio-task.rst:1341 msgid "" "This produces output similar to that of the traceback module for the frames " "retrieved by :meth:`get_stack`." msgstr "" -#: ../../library/asyncio-task.rst:1331 +#: ../../library/asyncio-task.rst:1344 msgid "The *limit* argument is passed to :meth:`get_stack` directly." msgstr "" -#: ../../library/asyncio-task.rst:1333 +#: ../../library/asyncio-task.rst:1346 msgid "" "The *file* argument is an I/O stream to which the output is written; by " "default output is written to :data:`sys.stdout`." msgstr "" -#: ../../library/asyncio-task.rst:1338 +#: ../../library/asyncio-task.rst:1351 msgid "Return the coroutine object wrapped by the :class:`Task`." msgstr "" -#: ../../library/asyncio-task.rst:1342 +#: ../../library/asyncio-task.rst:1355 msgid "" "This will return ``None`` for Tasks which have already completed eagerly. " "See the :ref:`Eager Task Factory `." msgstr "" -#: ../../library/asyncio-task.rst:1349 +#: ../../library/asyncio-task.rst:1362 msgid "Newly added eager task execution means result may be ``None``." msgstr "" -#: ../../library/asyncio-task.rst:1353 +#: ../../library/asyncio-task.rst:1366 msgid "" "Return the :class:`contextvars.Context` object associated with the task." msgstr "" -#: ../../library/asyncio-task.rst:1360 +#: ../../library/asyncio-task.rst:1373 msgid "Return the name of the Task." msgstr "" -#: ../../library/asyncio-task.rst:1362 +#: ../../library/asyncio-task.rst:1375 msgid "" "If no name has been explicitly assigned to the Task, the default asyncio " "Task implementation generates a default name during instantiation." msgstr "" -#: ../../library/asyncio-task.rst:1370 +#: ../../library/asyncio-task.rst:1383 msgid "Set the name of the Task." msgstr "" -#: ../../library/asyncio-task.rst:1372 +#: ../../library/asyncio-task.rst:1385 msgid "" "The *value* argument can be any object, which is then converted to a string." msgstr "" -#: ../../library/asyncio-task.rst:1375 +#: ../../library/asyncio-task.rst:1388 msgid "" "In the default Task implementation, the name will be visible in the :func:" "`repr` output of a task object." msgstr "" -#: ../../library/asyncio-task.rst:1382 +#: ../../library/asyncio-task.rst:1395 msgid "Request the Task to be cancelled." msgstr "" -#: ../../library/asyncio-task.rst:1384 +#: ../../library/asyncio-task.rst:1397 msgid "" "If the Task is already *done* or *cancelled*, return ``False``, otherwise, " "return ``True``." msgstr "" -#: ../../library/asyncio-task.rst:1387 +#: ../../library/asyncio-task.rst:1400 msgid "" "The method arranges for a :exc:`CancelledError` exception to be thrown into " "the wrapped coroutine on the next cycle of the event loop." msgstr "" -#: ../../library/asyncio-task.rst:1390 +#: ../../library/asyncio-task.rst:1403 msgid "" "The coroutine then has a chance to clean up or even deny the request by " "suppressing the exception with a :keyword:`try` ... ... ``except " @@ -1799,21 +1817,21 @@ msgid "" "addition to catching the exception." msgstr "" -#: ../../library/asyncio-task.rst:1400 +#: ../../library/asyncio-task.rst:1413 msgid "Added the *msg* parameter." msgstr "" -#: ../../library/asyncio-task.rst:1403 +#: ../../library/asyncio-task.rst:1416 msgid "The ``msg`` parameter is propagated from cancelled task to its awaiter." msgstr "" -#: ../../library/asyncio-task.rst:1408 +#: ../../library/asyncio-task.rst:1421 msgid "" "The following example illustrates how coroutines can intercept the " "cancellation request::" msgstr "" -#: ../../library/asyncio-task.rst:1411 +#: ../../library/asyncio-task.rst:1424 msgid "" "async def cancel_me():\n" " print('cancel_me(): before sleep')\n" @@ -1850,32 +1868,32 @@ msgid "" "# main(): cancel_me is cancelled now" msgstr "" -#: ../../library/asyncio-task.rst:1447 +#: ../../library/asyncio-task.rst:1460 msgid "Return ``True`` if the Task is *cancelled*." msgstr "" -#: ../../library/asyncio-task.rst:1449 +#: ../../library/asyncio-task.rst:1462 msgid "" "The Task is *cancelled* when the cancellation was requested with :meth:" "`cancel` and the wrapped coroutine propagated the :exc:`CancelledError` " "exception thrown into it." msgstr "" -#: ../../library/asyncio-task.rst:1455 +#: ../../library/asyncio-task.rst:1468 msgid "Decrement the count of cancellation requests to this Task." msgstr "" -#: ../../library/asyncio-task.rst:1457 +#: ../../library/asyncio-task.rst:1470 msgid "Returns the remaining number of cancellation requests." msgstr "" -#: ../../library/asyncio-task.rst:1459 +#: ../../library/asyncio-task.rst:1472 msgid "" "Note that once execution of a cancelled task completed, further calls to :" "meth:`uncancel` are ineffective." msgstr "" -#: ../../library/asyncio-task.rst:1464 +#: ../../library/asyncio-task.rst:1477 msgid "" "This method is used by asyncio's internals and isn't expected to be used by " "end-user code. In particular, if a Task gets successfully uncancelled, this " @@ -1884,7 +1902,7 @@ msgid "" "respective structured block. For example::" msgstr "" -#: ../../library/asyncio-task.rst:1471 +#: ../../library/asyncio-task.rst:1484 msgid "" "async def make_request_with_timeout():\n" " try:\n" @@ -1898,7 +1916,7 @@ msgid "" " await unrelated_code()" msgstr "" -#: ../../library/asyncio-task.rst:1482 +#: ../../library/asyncio-task.rst:1495 msgid "" "While the block with ``make_request()`` and ``make_another_request()`` might " "get cancelled due to the timeout, ``unrelated_code()`` should continue " @@ -1907,14 +1925,14 @@ msgid "" "similar fashion." msgstr "" -#: ../../library/asyncio-task.rst:1488 +#: ../../library/asyncio-task.rst:1501 msgid "" "If end-user code is, for some reason, suppressing cancellation by catching :" "exc:`CancelledError`, it needs to call this method to remove the " "cancellation state." msgstr "" -#: ../../library/asyncio-task.rst:1492 +#: ../../library/asyncio-task.rst:1505 msgid "" "When this method decrements the cancellation count to zero, the method " "checks if a previous :meth:`cancel` call had arranged for :exc:" @@ -1923,17 +1941,17 @@ msgid "" "``_must_cancel`` flag)." msgstr "" -#: ../../library/asyncio-task.rst:1498 +#: ../../library/asyncio-task.rst:1511 msgid "Changed to rescind pending cancellation requests upon reaching zero." msgstr "" -#: ../../library/asyncio-task.rst:1503 +#: ../../library/asyncio-task.rst:1516 msgid "" "Return the number of pending cancellation requests to this Task, i.e., the " "number of calls to :meth:`cancel` less the number of :meth:`uncancel` calls." msgstr "" -#: ../../library/asyncio-task.rst:1507 +#: ../../library/asyncio-task.rst:1520 msgid "" "Note that if this number is greater than zero but the Task is still " "executing, :meth:`cancelled` will still return ``False``. This is because " @@ -1942,7 +1960,7 @@ msgid "" "to zero." msgstr "" -#: ../../library/asyncio-task.rst:1513 +#: ../../library/asyncio-task.rst:1526 msgid "" "This method is used by asyncio's internals and isn't expected to be used by " "end-user code. See :meth:`uncancel` for more details." diff --git a/library/asyncio.po b/library/asyncio.po index 8b5e5111f..5a61f018e 100644 --- a/library/asyncio.po +++ b/library/asyncio.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:55+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/asyncore.po b/library/asyncore.po index 4f0d7aa0c..fa5f9717b 100644 --- a/library/asyncore.po +++ b/library/asyncore.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-11-19 01:02+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/atexit.po b/library/atexit.po index c411113ca..8af1be040 100644 --- a/library/atexit.po +++ b/library/atexit.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:55+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/audioop.po b/library/audioop.po index 872ea5502..bdda7320c 100644 --- a/library/audioop.po +++ b/library/audioop.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-11-19 01:02+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/audit_events.po b/library/audit_events.po index 25e16821e..d8d8232e7 100644 --- a/library/audit_events.po +++ b/library/audit_events.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:55+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/base64.po b/library/base64.po index df5109a14..770d7a52b 100644 --- a/library/base64.po +++ b/library/base64.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:55+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -29,22 +33,14 @@ msgstr "" #: ../../library/base64.rst:16 msgid "" "This module provides functions for encoding binary data to printable ASCII " -"characters and decoding such encodings back to binary data. It provides " -"encoding and decoding functions for the encodings specified in :rfc:`4648`, " -"which defines the Base16, Base32, and Base64 algorithms, and for the de-" -"facto standard Ascii85 and Base85 encodings." +"characters and decoding such encodings back to binary data. This includes " +"the :ref:`encodings specified in ` :rfc:`4648` (Base64, " +"Base32 and Base16) and the non-standard :ref:`Base85 encodings `." msgstr "" #: ../../library/base64.rst:22 msgid "" -"The :rfc:`4648` encodings are suitable for encoding binary data so that it " -"can be safely sent by email, used as parts of URLs, or included as part of " -"an HTTP POST request. The encoding algorithm is not the same as the :" -"program:`uuencode` program." -msgstr "" - -#: ../../library/base64.rst:27 -msgid "" "There are two interfaces provided by this module. The modern interface " "supports encoding :term:`bytes-like objects ` to ASCII :" "class:`bytes`, and decoding :term:`bytes-like objects ` " @@ -52,40 +48,47 @@ msgid "" "defined in :rfc:`4648` (normal, and URL- and filesystem-safe) are supported." msgstr "" -#: ../../library/base64.rst:33 +#: ../../library/base64.rst:28 msgid "" -"The legacy interface does not support decoding from strings, but it does " -"provide functions for encoding and decoding to and from :term:`file objects " -"`. It only supports the Base64 standard alphabet, and it adds " -"newlines every 76 characters as per :rfc:`2045`. Note that if you are " -"looking for :rfc:`2045` support you probably want to be looking at the :mod:" -"`email` package instead." +"The :ref:`legacy interface ` does not support decoding from " +"strings, but it does provide functions for encoding and decoding to and " +"from :term:`file objects `. It only supports the Base64 " +"standard alphabet, and it adds newlines every 76 characters as per :rfc:" +"`2045`. Note that if you are looking for :rfc:`2045` support you probably " +"want to be looking at the :mod:`email` package instead." msgstr "" -#: ../../library/base64.rst:41 +#: ../../library/base64.rst:36 msgid "" "ASCII-only Unicode strings are now accepted by the decoding functions of the " "modern interface." msgstr "" -#: ../../library/base64.rst:45 +#: ../../library/base64.rst:40 msgid "" "Any :term:`bytes-like objects ` are now accepted by all " "encoding and decoding functions in this module. Ascii85/Base85 support " "added." msgstr "" -#: ../../library/base64.rst:49 -msgid "The modern interface provides:" +#: ../../library/base64.rst:48 +msgid "RFC 4648 Encodings" msgstr "" -#: ../../library/base64.rst:53 +#: ../../library/base64.rst:50 +msgid "" +"The :rfc:`4648` encodings are suitable for encoding binary data so that it " +"can be safely sent by email, used as parts of URLs, or included as part of " +"an HTTP POST request." +msgstr "" + +#: ../../library/base64.rst:56 msgid "" "Encode the :term:`bytes-like object` *s* using Base64 and return the " "encoded :class:`bytes`." msgstr "" -#: ../../library/base64.rst:56 +#: ../../library/base64.rst:59 msgid "" "Optional *altchars* must be a :term:`bytes-like object` of length 2 which " "specifies an alternative alphabet for the ``+`` and ``/`` characters. This " @@ -94,32 +97,32 @@ msgid "" "used." msgstr "" -#: ../../library/base64.rst:61 +#: ../../library/base64.rst:64 msgid "" "May assert or raise a :exc:`ValueError` if the length of *altchars* is not " "2. Raises a :exc:`TypeError` if *altchars* is not a :term:`bytes-like " "object`." msgstr "" -#: ../../library/base64.rst:67 +#: ../../library/base64.rst:70 msgid "" "Decode the Base64 encoded :term:`bytes-like object` or ASCII string *s* and " "return the decoded :class:`bytes`." msgstr "" -#: ../../library/base64.rst:70 +#: ../../library/base64.rst:73 msgid "" "Optional *altchars* must be a :term:`bytes-like object` or ASCII string of " "length 2 which specifies the alternative alphabet used instead of the ``+`` " "and ``/`` characters." msgstr "" -#: ../../library/base64.rst:74 +#: ../../library/base64.rst:77 msgid "" "A :exc:`binascii.Error` exception is raised if *s* is incorrectly padded." msgstr "" -#: ../../library/base64.rst:77 +#: ../../library/base64.rst:80 msgid "" "If *validate* is ``False`` (the default), characters that are neither in the " "normal base-64 alphabet nor the alternative alphabet are discarded prior to " @@ -127,30 +130,30 @@ msgid "" "in the input result in a :exc:`binascii.Error`." msgstr "" -#: ../../library/base64.rst:83 +#: ../../library/base64.rst:86 msgid "" "For more information about the strict base64 check, see :func:`binascii." "a2b_base64`" msgstr "" -#: ../../library/base64.rst:85 +#: ../../library/base64.rst:88 msgid "" "May assert or raise a :exc:`ValueError` if the length of *altchars* is not 2." msgstr "" -#: ../../library/base64.rst:89 +#: ../../library/base64.rst:92 msgid "" "Encode :term:`bytes-like object` *s* using the standard Base64 alphabet and " "return the encoded :class:`bytes`." msgstr "" -#: ../../library/base64.rst:95 +#: ../../library/base64.rst:98 msgid "" "Decode :term:`bytes-like object` or ASCII string *s* using the standard " "Base64 alphabet and return the decoded :class:`bytes`." msgstr "" -#: ../../library/base64.rst:101 +#: ../../library/base64.rst:104 msgid "" "Encode :term:`bytes-like object` *s* using the URL- and filesystem-safe " "alphabet, which substitutes ``-`` instead of ``+`` and ``_`` instead of ``/" @@ -158,7 +161,7 @@ msgid "" "The result can still contain ``=``." msgstr "" -#: ../../library/base64.rst:110 +#: ../../library/base64.rst:113 msgid "" "Decode :term:`bytes-like object` or ASCII string *s* using the URL- and " "filesystem-safe alphabet, which substitutes ``-`` instead of ``+`` and ``_`` " @@ -166,25 +169,25 @@ msgid "" "class:`bytes`." msgstr "" -#: ../../library/base64.rst:119 +#: ../../library/base64.rst:122 msgid "" "Encode the :term:`bytes-like object` *s* using Base32 and return the " "encoded :class:`bytes`." msgstr "" -#: ../../library/base64.rst:125 +#: ../../library/base64.rst:128 msgid "" "Decode the Base32 encoded :term:`bytes-like object` or ASCII string *s* and " "return the decoded :class:`bytes`." msgstr "" -#: ../../library/base64.rst:128 ../../library/base64.rst:176 +#: ../../library/base64.rst:131 ../../library/base64.rst:179 msgid "" "Optional *casefold* is a flag specifying whether a lowercase alphabet is " "acceptable as input. For security purposes, the default is ``False``." msgstr "" -#: ../../library/base64.rst:132 +#: ../../library/base64.rst:135 msgid "" ":rfc:`4648` allows for optional mapping of the digit 0 (zero) to the letter " "O (oh), and for optional mapping of the digit 1 (one) to either the letter I " @@ -195,25 +198,25 @@ msgid "" "input." msgstr "" -#: ../../library/base64.rst:139 ../../library/base64.rst:180 +#: ../../library/base64.rst:142 ../../library/base64.rst:183 msgid "" "A :exc:`binascii.Error` is raised if *s* is incorrectly padded or if there " "are non-alphabet characters present in the input." msgstr "" -#: ../../library/base64.rst:146 +#: ../../library/base64.rst:149 msgid "" "Similar to :func:`b32encode` but uses the Extended Hex Alphabet, as defined " "in :rfc:`4648`." msgstr "" -#: ../../library/base64.rst:154 +#: ../../library/base64.rst:157 msgid "" "Similar to :func:`b32decode` but uses the Extended Hex Alphabet, as defined " "in :rfc:`4648`." msgstr "" -#: ../../library/base64.rst:157 +#: ../../library/base64.rst:160 msgid "" "This version does not allow the digit 0 (zero) to the letter O (oh) and " "digit 1 (one) to either the letter I (eye) or letter L (el) mappings, all " @@ -221,70 +224,114 @@ msgid "" "interchangeable." msgstr "" -#: ../../library/base64.rst:167 +#: ../../library/base64.rst:170 msgid "" "Encode the :term:`bytes-like object` *s* using Base16 and return the " "encoded :class:`bytes`." msgstr "" -#: ../../library/base64.rst:173 +#: ../../library/base64.rst:176 msgid "" "Decode the Base16 encoded :term:`bytes-like object` or ASCII string *s* and " "return the decoded :class:`bytes`." msgstr "" -#: ../../library/base64.rst:187 +#: ../../library/base64.rst:190 +msgid "Base85 Encodings" +msgstr "" + +#: ../../library/base64.rst:192 +msgid "" +"Base85 encoding is not formally specified but rather a de facto standard, " +"thus different systems perform the encoding differently." +msgstr "" + +#: ../../library/base64.rst:195 +msgid "" +"The :func:`a85encode` and :func:`b85encode` functions in this module are two " +"implementations of the de facto standard. You should call the function with " +"the Base85 implementation used by the software you intend to work with." +msgstr "" + +#: ../../library/base64.rst:199 +msgid "" +"The two functions present in this module differ in how they handle the " +"following:" +msgstr "" + +#: ../../library/base64.rst:201 +msgid "Whether to include enclosing ``<~`` and ``~>`` markers" +msgstr "" + +#: ../../library/base64.rst:202 +msgid "Whether to include newline characters" +msgstr "" + +#: ../../library/base64.rst:203 +msgid "The set of ASCII characters used for encoding" +msgstr "" + +#: ../../library/base64.rst:204 +msgid "Handling of null bytes" +msgstr "" + +#: ../../library/base64.rst:206 +msgid "" +"Refer to the documentation of the individual functions for more information." +msgstr "" + +#: ../../library/base64.rst:210 msgid "" "Encode the :term:`bytes-like object` *b* using Ascii85 and return the " "encoded :class:`bytes`." msgstr "" -#: ../../library/base64.rst:190 +#: ../../library/base64.rst:213 msgid "" "*foldspaces* is an optional flag that uses the special short sequence 'y' " "instead of 4 consecutive spaces (ASCII 0x20) as supported by 'btoa'. This " "feature is not supported by the \"standard\" Ascii85 encoding." msgstr "" -#: ../../library/base64.rst:194 +#: ../../library/base64.rst:217 msgid "" "*wrapcol* controls whether the output should have newline (``b'\\n'``) " "characters added to it. If this is non-zero, each output line will be at " "most this many characters long, excluding the trailing newline." msgstr "" -#: ../../library/base64.rst:198 +#: ../../library/base64.rst:221 msgid "" "*pad* controls whether the input is padded to a multiple of 4 before " "encoding. Note that the ``btoa`` implementation always pads." msgstr "" -#: ../../library/base64.rst:201 +#: ../../library/base64.rst:224 msgid "" "*adobe* controls whether the encoded byte sequence is framed with ``<~`` and " "``~>``, which is used by the Adobe implementation." msgstr "" -#: ../../library/base64.rst:209 +#: ../../library/base64.rst:232 msgid "" "Decode the Ascii85 encoded :term:`bytes-like object` or ASCII string *b* and " "return the decoded :class:`bytes`." msgstr "" -#: ../../library/base64.rst:212 +#: ../../library/base64.rst:235 msgid "" "*foldspaces* is a flag that specifies whether the 'y' short sequence should " "be accepted as shorthand for 4 consecutive spaces (ASCII 0x20). This feature " "is not supported by the \"standard\" Ascii85 encoding." msgstr "" -#: ../../library/base64.rst:216 +#: ../../library/base64.rst:239 msgid "" "*adobe* controls whether the input sequence is in Adobe Ascii85 format (i.e. " "is framed with <~ and ~>)." msgstr "" -#: ../../library/base64.rst:219 +#: ../../library/base64.rst:242 msgid "" "*ignorechars* should be a :term:`bytes-like object` or ASCII string " "containing characters to ignore from the input. This should only contain " @@ -292,44 +339,44 @@ msgid "" "ASCII." msgstr "" -#: ../../library/base64.rst:229 +#: ../../library/base64.rst:252 msgid "" "Encode the :term:`bytes-like object` *b* using base85 (as used in e.g. git-" "style binary diffs) and return the encoded :class:`bytes`." msgstr "" -#: ../../library/base64.rst:232 +#: ../../library/base64.rst:255 msgid "" "If *pad* is true, the input is padded with ``b'\\0'`` so its length is a " "multiple of 4 bytes before encoding." msgstr "" -#: ../../library/base64.rst:240 +#: ../../library/base64.rst:263 msgid "" "Decode the base85-encoded :term:`bytes-like object` or ASCII string *b* and " "return the decoded :class:`bytes`. Padding is implicitly removed, if " "necessary." msgstr "" -#: ../../library/base64.rst:249 +#: ../../library/base64.rst:272 msgid "" "Encode the :term:`bytes-like object` *s* using Z85 (as used in ZeroMQ) and " "return the encoded :class:`bytes`. See `Z85 specification `_ for more information." msgstr "" -#: ../../library/base64.rst:258 +#: ../../library/base64.rst:281 msgid "" "Decode the Z85-encoded :term:`bytes-like object` or ASCII string *s* and " "return the decoded :class:`bytes`. See `Z85 specification `_ for more information." msgstr "" -#: ../../library/base64.rst:265 -msgid "The legacy interface:" +#: ../../library/base64.rst:291 +msgid "Legacy Interface" msgstr "" -#: ../../library/base64.rst:269 +#: ../../library/base64.rst:295 msgid "" "Decode the contents of the binary *input* file and write the resulting " "binary data to the *output* file. *input* and *output* must be :term:`file " @@ -337,13 +384,13 @@ msgid "" "returns an empty bytes object." msgstr "" -#: ../../library/base64.rst:277 +#: ../../library/base64.rst:303 msgid "" "Decode the :term:`bytes-like object` *s*, which must contain one or more " "lines of base64 encoded data, and return the decoded :class:`bytes`." msgstr "" -#: ../../library/base64.rst:285 +#: ../../library/base64.rst:311 msgid "" "Encode the contents of the binary *input* file and write the resulting " "base64 encoded data to the *output* file. *input* and *output* must be :term:" @@ -353,7 +400,7 @@ msgid "" "the output always ends with a newline, as per :rfc:`2045` (MIME)." msgstr "" -#: ../../library/base64.rst:295 +#: ../../library/base64.rst:321 msgid "" "Encode the :term:`bytes-like object` *s*, which can contain arbitrary binary " "data, and return :class:`bytes` containing the base64-encoded data, with " @@ -361,38 +408,38 @@ msgid "" "that there is a trailing newline, as per :rfc:`2045` (MIME)." msgstr "" -#: ../../library/base64.rst:303 +#: ../../library/base64.rst:329 msgid "An example usage of the module:" msgstr "" -#: ../../library/base64.rst:316 +#: ../../library/base64.rst:342 msgid "Security Considerations" msgstr "" -#: ../../library/base64.rst:318 +#: ../../library/base64.rst:344 msgid "" "A new security considerations section was added to :rfc:`4648` (section 12); " "it's recommended to review the security section for any code deployed to " "production." msgstr "" -#: ../../library/base64.rst:323 +#: ../../library/base64.rst:349 msgid "Module :mod:`binascii`" msgstr "" -#: ../../library/base64.rst:324 +#: ../../library/base64.rst:350 msgid "" "Support module containing ASCII-to-binary and binary-to-ASCII conversions." msgstr "" -#: ../../library/base64.rst:326 +#: ../../library/base64.rst:352 msgid "" ":rfc:`1521` - MIME (Multipurpose Internet Mail Extensions) Part One: " "Mechanisms for Specifying and Describing the Format of Internet Message " "Bodies" msgstr "" -#: ../../library/base64.rst:327 +#: ../../library/base64.rst:353 msgid "" "Section 5.2, \"Base64 Content-Transfer-Encoding,\" provides the definition " "of the base64 encoding." diff --git a/library/bdb.po b/library/bdb.po index 5ec34278e..3ecc91614 100644 --- a/library/bdb.po +++ b/library/bdb.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:55+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/binary.po b/library/binary.po index b4e23df35..04b8c4456 100644 --- a/library/binary.po +++ b/library/binary.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:56+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/binascii.po b/library/binascii.po index 0860a0656..acc0c6f56 100644 --- a/library/binascii.po +++ b/library/binascii.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:56+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/bisect.po b/library/bisect.po index e7e27ad2c..fca6c7452 100644 --- a/library/bisect.po +++ b/library/bisect.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:56+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/builtins.po b/library/builtins.po index ce1859220..54631a93d 100644 --- a/library/builtins.po +++ b/library/builtins.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:56+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/bz2.po b/library/bz2.po index 92ba3cadc..f6fc865a4 100644 --- a/library/bz2.po +++ b/library/bz2.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:56+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/calendar.po b/library/calendar.po index 819b6d428..b2960f469 100644 --- a/library/calendar.po +++ b/library/calendar.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:56+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/cgi.po b/library/cgi.po index da6452156..f23a7ede5 100644 --- a/library/cgi.po +++ b/library/cgi.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-11-19 01:02+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/cgitb.po b/library/cgitb.po index af286e815..2f32b1c2e 100644 --- a/library/cgitb.po +++ b/library/cgitb.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-11-19 01:02+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/chunk.po b/library/chunk.po index 060b4bf97..365781516 100644 --- a/library/chunk.po +++ b/library/chunk.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-11-19 01:02+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/cmath.po b/library/cmath.po index 8220c2c68..a384af98d 100644 --- a/library/cmath.po +++ b/library/cmath.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Parham Forati, 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:56+0000\n" -"Last-Translator: Parham Forati, 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/cmd.po b/library/cmd.po index d1c28ed7c..06b5a99e4 100644 --- a/library/cmd.po +++ b/library/cmd.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:56+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/cmdline.po b/library/cmdline.po index 7afaf6c61..21e705fce 100644 --- a/library/cmdline.po +++ b/library/cmdline.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2023-10-13 14:16+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/cmdlinelibs.po b/library/cmdlinelibs.po index 5d66ad0eb..3d12ba00d 100644 --- a/library/cmdlinelibs.po +++ b/library/cmdlinelibs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-12-27 14:18+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/code.po b/library/code.po index cff93b424..6e063cbe2 100644 --- a/library/code.po +++ b/library/code.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-06-27 14:20+0000\n" "PO-Revision-Date: 2021-06-28 00:56+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" @@ -43,7 +43,15 @@ msgid "" "``'__console__'`` and key ``'__doc__'`` set to ``None``." msgstr "" -#: ../../library/code.rst:28 +#: ../../library/code.rst:25 +msgid "" +"Note that functions and classes objects created under an :class:`!" +"InteractiveInterpreter` instance will belong to the namespace specified by " +"*locals*. They are only pickleable if *locals* is the namespace of an " +"existing module." +msgstr "" + +#: ../../library/code.rst:34 msgid "" "Closely emulate the behavior of the interactive Python interpreter. This " "class builds on :class:`InteractiveInterpreter` and adds prompting using the " @@ -52,11 +60,11 @@ msgid "" "`SystemExit`, but instead return to the calling code." msgstr "" -#: ../../library/code.rst:34 ../../library/code.rst:52 +#: ../../library/code.rst:40 ../../library/code.rst:58 msgid "Added *local_exit* parameter." msgstr "" -#: ../../library/code.rst:39 +#: ../../library/code.rst:45 msgid "" "Convenience function to run a read-eval-print loop. This creates a new " "instance of :class:`InteractiveConsole` and sets *readfunc* to be used as " @@ -69,11 +77,11 @@ msgid "" "provided. The console object is discarded after use." msgstr "" -#: ../../library/code.rst:49 +#: ../../library/code.rst:55 msgid "Added *exitmsg* parameter." msgstr "" -#: ../../library/code.rst:57 +#: ../../library/code.rst:63 msgid "" "This function is useful for programs that want to emulate Python's " "interpreter main loop (a.k.a. the read-eval-print loop). The tricky part is " @@ -83,7 +91,7 @@ msgid "" "real interpreter main loop." msgstr "" -#: ../../library/code.rst:64 +#: ../../library/code.rst:70 msgid "" "*source* is the source string; *filename* is the optional filename from " "which source was read, defaulting to ``''``; and *symbol* is the " @@ -91,7 +99,7 @@ msgid "" "``'eval'`` or ``'exec'``." msgstr "" -#: ../../library/code.rst:69 +#: ../../library/code.rst:75 msgid "" "Returns a code object (the same as ``compile(source, filename, symbol)``) if " "the command is complete and valid; ``None`` if the command is incomplete; " @@ -100,18 +108,18 @@ msgid "" "contains an invalid literal." msgstr "" -#: ../../library/code.rst:79 +#: ../../library/code.rst:85 msgid "Interactive Interpreter Objects" msgstr "" -#: ../../library/code.rst:84 +#: ../../library/code.rst:90 msgid "" "Compile and run some source in the interpreter. Arguments are the same as " "for :func:`compile_command`; the default for *filename* is ``''``, " "and for *symbol* is ``'single'``. One of several things can happen:" msgstr "" -#: ../../library/code.rst:88 +#: ../../library/code.rst:94 msgid "" "The input is incorrect; :func:`compile_command` raised an exception (:exc:" "`SyntaxError` or :exc:`OverflowError`). A syntax traceback will be printed " @@ -119,13 +127,13 @@ msgid "" "``False``." msgstr "" -#: ../../library/code.rst:93 +#: ../../library/code.rst:99 msgid "" "The input is incomplete, and more input is required; :func:`compile_command` " "returned ``None``. :meth:`runsource` returns ``True``." msgstr "" -#: ../../library/code.rst:96 +#: ../../library/code.rst:102 msgid "" "The input is complete; :func:`compile_command` returned a code object. The " "code is executed by calling the :meth:`runcode` (which also handles run-time " @@ -133,27 +141,27 @@ msgid "" "``False``." msgstr "" -#: ../../library/code.rst:100 +#: ../../library/code.rst:106 msgid "" "The return value can be used to decide whether to use ``sys.ps1`` or ``sys." "ps2`` to prompt the next line." msgstr "" -#: ../../library/code.rst:106 +#: ../../library/code.rst:112 msgid "" "Execute a code object. When an exception occurs, :meth:`showtraceback` is " "called to display a traceback. All exceptions are caught except :exc:" "`SystemExit`, which is allowed to propagate." msgstr "" -#: ../../library/code.rst:110 +#: ../../library/code.rst:116 msgid "" "A note about :exc:`KeyboardInterrupt`: this exception may occur elsewhere in " "this code, and may not always be caught. The caller should be prepared to " "deal with it." msgstr "" -#: ../../library/code.rst:117 +#: ../../library/code.rst:123 msgid "" "Display the syntax error that just occurred. This does not display a stack " "trace because there isn't one for syntax errors. If *filename* is given, it " @@ -162,38 +170,38 @@ msgid "" "string. The output is written by the :meth:`write` method." msgstr "" -#: ../../library/code.rst:126 +#: ../../library/code.rst:132 msgid "" "Display the exception that just occurred. We remove the first stack item " "because it is within the interpreter object implementation. The output is " "written by the :meth:`write` method." msgstr "" -#: ../../library/code.rst:130 +#: ../../library/code.rst:136 msgid "" "The full chained traceback is displayed instead of just the primary " "traceback." msgstr "" -#: ../../library/code.rst:136 +#: ../../library/code.rst:142 msgid "" "Write a string to the standard error stream (``sys.stderr``). Derived " "classes should override this to provide the appropriate output handling as " "needed." msgstr "" -#: ../../library/code.rst:143 +#: ../../library/code.rst:149 msgid "Interactive Console Objects" msgstr "" -#: ../../library/code.rst:145 +#: ../../library/code.rst:151 msgid "" "The :class:`InteractiveConsole` class is a subclass of :class:" "`InteractiveInterpreter`, and so offers all the methods of the interpreter " "objects as well as the following additions." msgstr "" -#: ../../library/code.rst:152 +#: ../../library/code.rst:158 msgid "" "Closely emulate the interactive Python console. The optional *banner* " "argument specify the banner to print before the first interaction; by " @@ -203,22 +211,22 @@ msgid "" "close!)." msgstr "" -#: ../../library/code.rst:158 +#: ../../library/code.rst:164 msgid "" "The optional *exitmsg* argument specifies an exit message printed when " "exiting. Pass the empty string to suppress the exit message. If *exitmsg* is " "not given or ``None``, a default message is printed." msgstr "" -#: ../../library/code.rst:162 +#: ../../library/code.rst:168 msgid "To suppress printing any banner, pass an empty string." msgstr "" -#: ../../library/code.rst:165 +#: ../../library/code.rst:171 msgid "Print an exit message when exiting." msgstr "" -#: ../../library/code.rst:171 +#: ../../library/code.rst:177 msgid "" "Push a line of source text to the interpreter. The line should not have a " "trailing newline; it may have internal newlines. The line is appended to a " @@ -231,11 +239,11 @@ msgid "" "same as :meth:`!runsource`)." msgstr "" -#: ../../library/code.rst:183 +#: ../../library/code.rst:189 msgid "Remove any unhandled source text from the input buffer." msgstr "" -#: ../../library/code.rst:188 +#: ../../library/code.rst:194 msgid "" "Write a prompt and read a line. The returned line does not include the " "trailing newline. When the user enters the EOF key sequence, :exc:" diff --git a/library/codecs.po b/library/codecs.po index bed46750b..3d181fbb8 100644 --- a/library/codecs.po +++ b/library/codecs.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:56+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -75,17 +76,26 @@ msgid "" "information on codec error handling." msgstr "" -#: ../../library/codecs.rst:56 +#: ../../library/codecs.rst:58 +msgid "" +"Return a mapping suitable for encoding with a custom single-byte encoding. " +"Given a :class:`str` *string* of up to 256 characters representing a " +"decoding table, returns either a compact internal mapping object " +"``EncodingMap`` or a :class:`dictionary ` mapping character ordinals " +"to byte values. Raises a :exc:`TypeError` on invalid input." +msgstr "" + +#: ../../library/codecs.rst:64 msgid "The full details for each codec can also be looked up directly:" msgstr "" -#: ../../library/codecs.rst:60 +#: ../../library/codecs.rst:68 msgid "" "Looks up the codec info in the Python codec registry and returns a :class:" "`CodecInfo` object as defined below." msgstr "" -#: ../../library/codecs.rst:63 +#: ../../library/codecs.rst:71 msgid "" "Encodings are first looked up in the registry's cache. If not found, the " "list of registered search functions is scanned. If no :class:`CodecInfo` " @@ -93,17 +103,17 @@ msgid "" "`CodecInfo` object is stored in the cache and returned to the caller." msgstr "" -#: ../../library/codecs.rst:70 +#: ../../library/codecs.rst:78 msgid "" "Codec details when looking up the codec registry. The constructor arguments " "are stored in attributes of the same name:" msgstr "" -#: ../../library/codecs.rst:76 +#: ../../library/codecs.rst:84 msgid "The name of the encoding." msgstr "" -#: ../../library/codecs.rst:82 +#: ../../library/codecs.rst:90 msgid "" "The stateless encoding and decoding functions. These must be functions or " "methods which have the same interface as the :meth:`~Codec.encode` and :meth:" @@ -112,7 +122,7 @@ msgid "" "mode." msgstr "" -#: ../../library/codecs.rst:92 +#: ../../library/codecs.rst:100 msgid "" "Incremental encoder and decoder classes or factory functions. These have to " "provide the interface defined by the base classes :class:" @@ -120,77 +130,77 @@ msgid "" "Incremental codecs can maintain state." msgstr "" -#: ../../library/codecs.rst:101 +#: ../../library/codecs.rst:109 msgid "" "Stream writer and reader classes or factory functions. These have to provide " "the interface defined by the base classes :class:`StreamWriter` and :class:" "`StreamReader`, respectively. Stream codecs can maintain state." msgstr "" -#: ../../library/codecs.rst:106 +#: ../../library/codecs.rst:114 msgid "" "To simplify access to the various codec components, the module provides " "these additional functions which use :func:`lookup` for the codec lookup:" msgstr "" -#: ../../library/codecs.rst:111 +#: ../../library/codecs.rst:119 msgid "" "Look up the codec for the given encoding and return its encoder function." msgstr "" -#: ../../library/codecs.rst:113 ../../library/codecs.rst:120 -#: ../../library/codecs.rst:146 ../../library/codecs.rst:154 +#: ../../library/codecs.rst:121 ../../library/codecs.rst:128 +#: ../../library/codecs.rst:154 ../../library/codecs.rst:162 msgid "Raises a :exc:`LookupError` in case the encoding cannot be found." msgstr "" -#: ../../library/codecs.rst:118 +#: ../../library/codecs.rst:126 msgid "" "Look up the codec for the given encoding and return its decoder function." msgstr "" -#: ../../library/codecs.rst:125 +#: ../../library/codecs.rst:133 msgid "" "Look up the codec for the given encoding and return its incremental encoder " "class or factory function." msgstr "" -#: ../../library/codecs.rst:128 +#: ../../library/codecs.rst:136 msgid "" "Raises a :exc:`LookupError` in case the encoding cannot be found or the " "codec doesn't support an incremental encoder." msgstr "" -#: ../../library/codecs.rst:134 +#: ../../library/codecs.rst:142 msgid "" "Look up the codec for the given encoding and return its incremental decoder " "class or factory function." msgstr "" -#: ../../library/codecs.rst:137 +#: ../../library/codecs.rst:145 msgid "" "Raises a :exc:`LookupError` in case the encoding cannot be found or the " "codec doesn't support an incremental decoder." msgstr "" -#: ../../library/codecs.rst:143 +#: ../../library/codecs.rst:151 msgid "" "Look up the codec for the given encoding and return its :class:" "`StreamReader` class or factory function." msgstr "" -#: ../../library/codecs.rst:151 +#: ../../library/codecs.rst:159 msgid "" "Look up the codec for the given encoding and return its :class:" "`StreamWriter` class or factory function." msgstr "" -#: ../../library/codecs.rst:156 +#: ../../library/codecs.rst:164 msgid "" "Custom codecs are made available by registering a suitable codec search " "function:" msgstr "" -#: ../../library/codecs.rst:161 +#: ../../library/codecs.rst:169 msgid "" "Register a codec search function. Search functions are expected to take one " "argument, being the encoding name in all lower case letters with hyphens and " @@ -199,17 +209,17 @@ msgid "" "``None``." msgstr "" -#: ../../library/codecs.rst:167 +#: ../../library/codecs.rst:175 msgid "Hyphens and spaces are converted to underscore." msgstr "" -#: ../../library/codecs.rst:173 +#: ../../library/codecs.rst:181 msgid "" "Unregister a codec search function and clear the registry's cache. If the " "search function is not registered, do nothing." msgstr "" -#: ../../library/codecs.rst:179 +#: ../../library/codecs.rst:187 msgid "" "While the builtin :func:`open` and the associated :mod:`io` module are the " "recommended approach for working with encoded text files, this module " @@ -217,14 +227,14 @@ msgid "" "wider range of codecs when working with binary files:" msgstr "" -#: ../../library/codecs.rst:186 +#: ../../library/codecs.rst:194 msgid "" "Open an encoded file using the given *mode* and return an instance of :class:" "`StreamReaderWriter`, providing transparent encoding/decoding. The default " "file mode is ``'r'``, meaning to open the file in read mode." msgstr "" -#: ../../library/codecs.rst:192 +#: ../../library/codecs.rst:200 msgid "" "If *encoding* is not ``None``, then the underlying encoded files are always " "opened in binary mode. No automatic conversion of ``'\\n'`` is done on " @@ -232,42 +242,42 @@ msgid "" "to the built-in :func:`open` function; the ``'b'`` is automatically added." msgstr "" -#: ../../library/codecs.rst:198 +#: ../../library/codecs.rst:206 msgid "" "*encoding* specifies the encoding which is to be used for the file. Any " "encoding that encodes to and decodes from bytes is allowed, and the data " "types supported by the file methods depend on the codec used." msgstr "" -#: ../../library/codecs.rst:202 +#: ../../library/codecs.rst:210 msgid "" "*errors* may be given to define the error handling. It defaults to " "``'strict'`` which causes a :exc:`ValueError` to be raised in case an " "encoding error occurs." msgstr "" -#: ../../library/codecs.rst:205 +#: ../../library/codecs.rst:213 msgid "" "*buffering* has the same meaning as for the built-in :func:`open` function. " "It defaults to -1 which means that the default buffer size will be used." msgstr "" -#: ../../library/codecs.rst:208 +#: ../../library/codecs.rst:216 msgid "The ``'U'`` mode has been removed." msgstr "" -#: ../../library/codecs.rst:213 +#: ../../library/codecs.rst:221 msgid ":func:`codecs.open` has been superseded by :func:`open`." msgstr "" -#: ../../library/codecs.rst:218 +#: ../../library/codecs.rst:226 msgid "" "Return a :class:`StreamRecoder` instance, a wrapped version of *file* which " "provides transparent transcoding. The original file is closed when the " "wrapped version is closed." msgstr "" -#: ../../library/codecs.rst:222 +#: ../../library/codecs.rst:230 msgid "" "Data written to the wrapped file is decoded according to the given " "*data_encoding* and then written to the original file as bytes using " @@ -275,41 +285,41 @@ msgid "" "*file_encoding*, and the result is encoded using *data_encoding*." msgstr "" -#: ../../library/codecs.rst:228 +#: ../../library/codecs.rst:236 msgid "If *file_encoding* is not given, it defaults to *data_encoding*." msgstr "" -#: ../../library/codecs.rst:230 +#: ../../library/codecs.rst:238 msgid "" "*errors* may be given to define the error handling. It defaults to " "``'strict'``, which causes :exc:`ValueError` to be raised in case an " "encoding error occurs." msgstr "" -#: ../../library/codecs.rst:237 +#: ../../library/codecs.rst:245 msgid "" "Uses an incremental encoder to iteratively encode the input provided by " -"*iterator*. This function is a :term:`generator`. The *errors* argument (as " -"well as any other keyword argument) is passed through to the incremental " -"encoder." +"*iterator*. *iterator* must yield :class:`str` objects. This function is a :" +"term:`generator`. The *errors* argument (as well as any other keyword " +"argument) is passed through to the incremental encoder." msgstr "" -#: ../../library/codecs.rst:242 +#: ../../library/codecs.rst:250 msgid "" "This function requires that the codec accept text :class:`str` objects to " "encode. Therefore it does not support bytes-to-bytes encoders such as " "``base64_codec``." msgstr "" -#: ../../library/codecs.rst:249 +#: ../../library/codecs.rst:257 msgid "" "Uses an incremental decoder to iteratively decode the input provided by " -"*iterator*. This function is a :term:`generator`. The *errors* argument (as " -"well as any other keyword argument) is passed through to the incremental " -"decoder." +"*iterator*. *iterator* must yield :class:`bytes` objects. This function is " +"a :term:`generator`. The *errors* argument (as well as any other keyword " +"argument) is passed through to the incremental decoder." msgstr "" -#: ../../library/codecs.rst:254 +#: ../../library/codecs.rst:262 msgid "" "This function requires that the codec accept :class:`bytes` objects to " "decode. Therefore it does not support text-to-text encoders such as " @@ -317,13 +327,30 @@ msgid "" "`iterencode`." msgstr "" -#: ../../library/codecs.rst:260 +#: ../../library/codecs.rst:270 +msgid "" +"Return a :class:`tuple` containing the raw bytes of *buffer*, a :ref:`buffer-" +"compatible object ` or :class:`str` (encoded to UTF-8 before " +"processing), and their length in bytes." +msgstr "" + +#: ../../library/codecs.rst:274 +msgid "The *errors* argument is ignored." +msgstr "" + +#: ../../library/codecs.rst:276 +msgid "" +">>> codecs.readbuffer_encode(b\"Zito\")\n" +"(b'Zito', 4)" +msgstr "" + +#: ../../library/codecs.rst:282 msgid "" "The module also provides the following constants which are useful for " "reading and writing to platform dependent files:" msgstr "" -#: ../../library/codecs.rst:275 +#: ../../library/codecs.rst:297 msgid "" "These constants define various byte sequences, being Unicode byte order " "marks (BOMs) for several encodings. They are used in UTF-16 and UTF-32 data " @@ -335,18 +362,18 @@ msgid "" "represent the BOM in UTF-8 and UTF-32 encodings." msgstr "" -#: ../../library/codecs.rst:289 +#: ../../library/codecs.rst:311 msgid "Codec Base Classes" msgstr "" -#: ../../library/codecs.rst:291 +#: ../../library/codecs.rst:313 msgid "" "The :mod:`codecs` module defines a set of base classes which define the " "interfaces for working with codec objects, and can also be used as the basis " "for custom codec implementations." msgstr "" -#: ../../library/codecs.rst:295 +#: ../../library/codecs.rst:317 msgid "" "Each codec has to define four interfaces to make it usable as codec in " "Python: stateless encoder, stateless decoder, stream reader and stream " @@ -355,69 +382,69 @@ msgid "" "how the codec will handle encoding and decoding errors." msgstr "" -#: ../../library/codecs.rst:306 +#: ../../library/codecs.rst:328 msgid "Error Handlers" msgstr "" -#: ../../library/codecs.rst:308 +#: ../../library/codecs.rst:330 msgid "" "To simplify and standardize error handling, codecs may implement different " "error handling schemes by accepting the *errors* string argument:" msgstr "" -#: ../../library/codecs.rst:328 +#: ../../library/codecs.rst:350 msgid "" "The following error handlers can be used with all Python :ref:`standard-" "encodings` codecs:" msgstr "" -#: ../../library/codecs.rst:334 ../../library/codecs.rst:377 -#: ../../library/codecs.rst:397 +#: ../../library/codecs.rst:356 ../../library/codecs.rst:399 +#: ../../library/codecs.rst:419 msgid "Value" msgstr "" -#: ../../library/codecs.rst:334 ../../library/codecs.rst:377 -#: ../../library/codecs.rst:397 ../../library/codecs.rst:1342 -#: ../../library/codecs.rst:1410 ../../library/codecs.rst:1465 +#: ../../library/codecs.rst:356 ../../library/codecs.rst:399 +#: ../../library/codecs.rst:419 ../../library/codecs.rst:1364 +#: ../../library/codecs.rst:1436 ../../library/codecs.rst:1491 msgid "Meaning" msgstr "" -#: ../../library/codecs.rst:336 +#: ../../library/codecs.rst:358 msgid "``'strict'``" msgstr "" -#: ../../library/codecs.rst:336 +#: ../../library/codecs.rst:358 msgid "" "Raise :exc:`UnicodeError` (or a subclass), this is the default. Implemented " "in :func:`strict_errors`." msgstr "" -#: ../../library/codecs.rst:340 +#: ../../library/codecs.rst:362 msgid "``'ignore'``" msgstr "" -#: ../../library/codecs.rst:340 +#: ../../library/codecs.rst:362 msgid "" "Ignore the malformed data and continue without further notice. Implemented " "in :func:`ignore_errors`." msgstr "" -#: ../../library/codecs.rst:344 +#: ../../library/codecs.rst:366 msgid "``'replace'``" msgstr "" -#: ../../library/codecs.rst:344 +#: ../../library/codecs.rst:366 msgid "" "Replace with a replacement marker. On encoding, use ``?`` (ASCII character). " "On decoding, use ``�`` (U+FFFD, the official REPLACEMENT CHARACTER). " "Implemented in :func:`replace_errors`." msgstr "" -#: ../../library/codecs.rst:350 +#: ../../library/codecs.rst:372 msgid "``'backslashreplace'``" msgstr "" -#: ../../library/codecs.rst:350 +#: ../../library/codecs.rst:372 msgid "" "Replace with backslashed escape sequences. On encoding, use hexadecimal form " "of Unicode code point with formats :samp:`\\\\x{hh}` :samp:`\\\\u{xxxx}` :" @@ -425,11 +452,11 @@ msgid "" "format :samp:`\\\\x{hh}`. Implemented in :func:`backslashreplace_errors`." msgstr "" -#: ../../library/codecs.rst:359 +#: ../../library/codecs.rst:381 msgid "``'surrogateescape'``" msgstr "" -#: ../../library/codecs.rst:359 +#: ../../library/codecs.rst:381 msgid "" "On decoding, replace byte with individual surrogate code ranging from " "``U+DC80`` to ``U+DCFF``. This code will then be turned back into the same " @@ -437,92 +464,92 @@ msgid "" "data. (See :pep:`383` for more.)" msgstr "" -#: ../../library/codecs.rst:373 +#: ../../library/codecs.rst:395 msgid "" "The following error handlers are only applicable to encoding (within :term:" "`text encodings `):" msgstr "" -#: ../../library/codecs.rst:379 +#: ../../library/codecs.rst:401 msgid "``'xmlcharrefreplace'``" msgstr "" -#: ../../library/codecs.rst:379 +#: ../../library/codecs.rst:401 msgid "" "Replace with XML/HTML numeric character reference, which is a decimal form " "of Unicode code point with format :samp:`&#{num};`. Implemented in :func:" "`xmlcharrefreplace_errors`." msgstr "" -#: ../../library/codecs.rst:385 +#: ../../library/codecs.rst:407 msgid "``'namereplace'``" msgstr "" -#: ../../library/codecs.rst:385 +#: ../../library/codecs.rst:407 msgid "" "Replace with ``\\N{...}`` escape sequences, what appears in the braces is " "the Name property from Unicode Character Database. Implemented in :func:" "`namereplace_errors`." msgstr "" -#: ../../library/codecs.rst:394 +#: ../../library/codecs.rst:416 msgid "" "In addition, the following error handler is specific to the given codecs:" msgstr "" -#: ../../library/codecs.rst:13 ../../library/codecs.rst:397 +#: ../../library/codecs.rst:13 ../../library/codecs.rst:419 msgid "Codecs" msgstr "" -#: ../../library/codecs.rst:399 +#: ../../library/codecs.rst:421 msgid "``'surrogatepass'``" msgstr "" -#: ../../library/codecs.rst:399 +#: ../../library/codecs.rst:421 msgid "utf-8, utf-16, utf-32, utf-16-be, utf-16-le, utf-32-be, utf-32-le" msgstr "" -#: ../../library/codecs.rst:399 +#: ../../library/codecs.rst:421 msgid "" "Allow encoding and decoding surrogate code point (``U+D800`` - ``U+DFFF``) " "as normal code point. Otherwise these codecs treat the presence of surrogate " "code point in :class:`str` as an error." msgstr "" -#: ../../library/codecs.rst:406 +#: ../../library/codecs.rst:428 msgid "The ``'surrogateescape'`` and ``'surrogatepass'`` error handlers." msgstr "" -#: ../../library/codecs.rst:409 +#: ../../library/codecs.rst:431 msgid "" "The ``'surrogatepass'`` error handler now works with utf-16\\* and utf-32\\* " "codecs." msgstr "" -#: ../../library/codecs.rst:413 +#: ../../library/codecs.rst:435 msgid "The ``'namereplace'`` error handler." msgstr "" -#: ../../library/codecs.rst:416 +#: ../../library/codecs.rst:438 msgid "" "The ``'backslashreplace'`` error handler now works with decoding and " "translating." msgstr "" -#: ../../library/codecs.rst:420 +#: ../../library/codecs.rst:442 msgid "" "The set of allowed values can be extended by registering a new named error " "handler:" msgstr "" -#: ../../library/codecs.rst:425 +#: ../../library/codecs.rst:447 msgid "" "Register the error handling function *error_handler* under the name *name*. " "The *error_handler* argument will be called during encoding and decoding in " "case of an error, when *name* is specified as the errors parameter." msgstr "" -#: ../../library/codecs.rst:429 +#: ../../library/codecs.rst:451 msgid "" "For encoding, *error_handler* will be called with a :exc:" "`UnicodeEncodeError` instance, which contains information about the location " @@ -537,66 +564,66 @@ msgid "" "position is out of bound an :exc:`IndexError` will be raised." msgstr "" -#: ../../library/codecs.rst:441 +#: ../../library/codecs.rst:463 msgid "" "Decoding and translating works similarly, except :exc:`UnicodeDecodeError` " "or :exc:`UnicodeTranslateError` will be passed to the handler and that the " "replacement from the error handler will be put into the output directly." msgstr "" -#: ../../library/codecs.rst:446 +#: ../../library/codecs.rst:468 msgid "" "Previously registered error handlers (including the standard error handlers) " "can be looked up by name:" msgstr "" -#: ../../library/codecs.rst:451 +#: ../../library/codecs.rst:473 msgid "Return the error handler previously registered under the name *name*." msgstr "" -#: ../../library/codecs.rst:453 +#: ../../library/codecs.rst:475 msgid "Raises a :exc:`LookupError` in case the handler cannot be found." msgstr "" -#: ../../library/codecs.rst:455 +#: ../../library/codecs.rst:477 msgid "" "The following standard error handlers are also made available as module " "level functions:" msgstr "" -#: ../../library/codecs.rst:460 +#: ../../library/codecs.rst:482 msgid "Implements the ``'strict'`` error handling." msgstr "" -#: ../../library/codecs.rst:462 +#: ../../library/codecs.rst:484 msgid "Each encoding or decoding error raises a :exc:`UnicodeError`." msgstr "" -#: ../../library/codecs.rst:467 +#: ../../library/codecs.rst:489 msgid "Implements the ``'ignore'`` error handling." msgstr "" -#: ../../library/codecs.rst:469 +#: ../../library/codecs.rst:491 msgid "" "Malformed data is ignored; encoding or decoding is continued without further " "notice." msgstr "" -#: ../../library/codecs.rst:475 +#: ../../library/codecs.rst:497 msgid "Implements the ``'replace'`` error handling." msgstr "" -#: ../../library/codecs.rst:477 +#: ../../library/codecs.rst:499 msgid "" "Substitutes ``?`` (ASCII character) for encoding errors or ``�`` (U+FFFD, " "the official REPLACEMENT CHARACTER) for decoding errors." msgstr "" -#: ../../library/codecs.rst:483 +#: ../../library/codecs.rst:505 msgid "Implements the ``'backslashreplace'`` error handling." msgstr "" -#: ../../library/codecs.rst:485 +#: ../../library/codecs.rst:507 msgid "" "Malformed data is replaced by a backslashed escape sequence. On encoding, " "use the hexadecimal form of Unicode code point with formats :samp:`\\\\x{hh}" @@ -604,30 +631,30 @@ msgid "" "hexadecimal form of byte value with format :samp:`\\\\x{hh}`." msgstr "" -#: ../../library/codecs.rst:491 +#: ../../library/codecs.rst:513 msgid "Works with decoding and translating." msgstr "" -#: ../../library/codecs.rst:497 +#: ../../library/codecs.rst:519 msgid "" "Implements the ``'xmlcharrefreplace'`` error handling (for encoding within :" "term:`text encoding` only)." msgstr "" -#: ../../library/codecs.rst:500 +#: ../../library/codecs.rst:522 msgid "" "The unencodable character is replaced by an appropriate XML/HTML numeric " "character reference, which is a decimal form of Unicode code point with " "format :samp:`&#{num};` ." msgstr "" -#: ../../library/codecs.rst:507 +#: ../../library/codecs.rst:529 msgid "" "Implements the ``'namereplace'`` error handling (for encoding within :term:" "`text encoding` only)." msgstr "" -#: ../../library/codecs.rst:510 +#: ../../library/codecs.rst:532 msgid "" "The unencodable character is replaced by a ``\\N{...}`` escape sequence. The " "set of characters that appear in the braces is the Name property from " @@ -635,17 +662,17 @@ msgid "" "will be converted to byte sequence ``\\N{LATIN SMALL LETTER SHARP S}`` ." msgstr "" -#: ../../library/codecs.rst:521 +#: ../../library/codecs.rst:543 msgid "Stateless Encoding and Decoding" msgstr "" -#: ../../library/codecs.rst:523 +#: ../../library/codecs.rst:545 msgid "" "The base :class:`Codec` class defines these methods which also define the " "function interfaces of the stateless encoder and decoder:" msgstr "" -#: ../../library/codecs.rst:531 +#: ../../library/codecs.rst:553 msgid "" "Encodes the object *input* and returns a tuple (output object, length " "consumed). For instance, :term:`text encoding` converts a string object to a " @@ -653,26 +680,26 @@ msgid "" "``iso-8859-1``)." msgstr "" -#: ../../library/codecs.rst:536 ../../library/codecs.rst:558 +#: ../../library/codecs.rst:558 ../../library/codecs.rst:580 msgid "" "The *errors* argument defines the error handling to apply. It defaults to " "``'strict'`` handling." msgstr "" -#: ../../library/codecs.rst:539 +#: ../../library/codecs.rst:561 msgid "" "The method may not store state in the :class:`Codec` instance. Use :class:" "`StreamWriter` for codecs which have to keep state in order to make encoding " "efficient." msgstr "" -#: ../../library/codecs.rst:543 +#: ../../library/codecs.rst:565 msgid "" "The encoder must be able to handle zero length input and return an empty " "object of the output object type in this situation." msgstr "" -#: ../../library/codecs.rst:549 +#: ../../library/codecs.rst:571 msgid "" "Decodes the object *input* and returns a tuple (output object, length " "consumed). For instance, for a :term:`text encoding`, decoding converts a " @@ -680,31 +707,31 @@ msgid "" "object." msgstr "" -#: ../../library/codecs.rst:554 +#: ../../library/codecs.rst:576 msgid "" "For text encodings and bytes-to-bytes codecs, *input* must be a bytes object " "or one which provides the read-only buffer interface -- for example, buffer " "objects and memory mapped files." msgstr "" -#: ../../library/codecs.rst:561 +#: ../../library/codecs.rst:583 msgid "" "The method may not store state in the :class:`Codec` instance. Use :class:" "`StreamReader` for codecs which have to keep state in order to make decoding " "efficient." msgstr "" -#: ../../library/codecs.rst:565 +#: ../../library/codecs.rst:587 msgid "" "The decoder must be able to handle zero length input and return an empty " "object of the output object type in this situation." msgstr "" -#: ../../library/codecs.rst:570 +#: ../../library/codecs.rst:592 msgid "Incremental Encoding and Decoding" msgstr "" -#: ../../library/codecs.rst:572 +#: ../../library/codecs.rst:594 msgid "" "The :class:`IncrementalEncoder` and :class:`IncrementalDecoder` classes " "provide the basic interface for incremental encoding and decoding. Encoding/" @@ -715,7 +742,7 @@ msgid "" "during method calls." msgstr "" -#: ../../library/codecs.rst:580 +#: ../../library/codecs.rst:602 msgid "" "The joined output of calls to the :meth:`~IncrementalEncoder.encode`/:meth:" "`~IncrementalDecoder.decode` method is the same as if all the single inputs " @@ -723,36 +750,36 @@ msgid "" "encoder/decoder." msgstr "" -#: ../../library/codecs.rst:589 +#: ../../library/codecs.rst:611 msgid "IncrementalEncoder Objects" msgstr "" -#: ../../library/codecs.rst:591 +#: ../../library/codecs.rst:613 msgid "" "The :class:`IncrementalEncoder` class is used for encoding an input in " "multiple steps. It defines the following methods which every incremental " "encoder must define in order to be compatible with the Python codec registry." msgstr "" -#: ../../library/codecs.rst:598 +#: ../../library/codecs.rst:620 msgid "Constructor for an :class:`IncrementalEncoder` instance." msgstr "" -#: ../../library/codecs.rst:600 +#: ../../library/codecs.rst:622 msgid "" "All incremental encoders must provide this constructor interface. They are " "free to add additional keyword arguments, but only the ones defined here are " "used by the Python codec registry." msgstr "" -#: ../../library/codecs.rst:604 +#: ../../library/codecs.rst:626 msgid "" "The :class:`IncrementalEncoder` may implement different error handling " "schemes by providing the *errors* keyword argument. See :ref:`error-" "handlers` for possible values." msgstr "" -#: ../../library/codecs.rst:608 +#: ../../library/codecs.rst:630 msgid "" "The *errors* argument will be assigned to an attribute of the same name. " "Assigning to this attribute makes it possible to switch between different " @@ -760,21 +787,21 @@ msgid "" "`IncrementalEncoder` object." msgstr "" -#: ../../library/codecs.rst:616 +#: ../../library/codecs.rst:638 msgid "" "Encodes *object* (taking the current state of the encoder into account) and " "returns the resulting encoded object. If this is the last call to :meth:" "`encode` *final* must be true (the default is false)." msgstr "" -#: ../../library/codecs.rst:623 +#: ../../library/codecs.rst:645 msgid "" "Reset the encoder to the initial state. The output is discarded: call ``." "encode(object, final=True)``, passing an empty byte or text string if " "necessary, to reset the encoder and to get the output." msgstr "" -#: ../../library/codecs.rst:630 +#: ../../library/codecs.rst:652 msgid "" "Return the current state of the encoder which must be an integer. The " "implementation should make sure that ``0`` is the most common state. (States " @@ -783,42 +810,42 @@ msgid "" "into an integer.)" msgstr "" -#: ../../library/codecs.rst:639 +#: ../../library/codecs.rst:661 msgid "" "Set the state of the encoder to *state*. *state* must be an encoder state " "returned by :meth:`getstate`." msgstr "" -#: ../../library/codecs.rst:646 +#: ../../library/codecs.rst:668 msgid "IncrementalDecoder Objects" msgstr "" -#: ../../library/codecs.rst:648 +#: ../../library/codecs.rst:670 msgid "" "The :class:`IncrementalDecoder` class is used for decoding an input in " "multiple steps. It defines the following methods which every incremental " "decoder must define in order to be compatible with the Python codec registry." msgstr "" -#: ../../library/codecs.rst:655 +#: ../../library/codecs.rst:677 msgid "Constructor for an :class:`IncrementalDecoder` instance." msgstr "" -#: ../../library/codecs.rst:657 +#: ../../library/codecs.rst:679 msgid "" "All incremental decoders must provide this constructor interface. They are " "free to add additional keyword arguments, but only the ones defined here are " "used by the Python codec registry." msgstr "" -#: ../../library/codecs.rst:661 +#: ../../library/codecs.rst:683 msgid "" "The :class:`IncrementalDecoder` may implement different error handling " "schemes by providing the *errors* keyword argument. See :ref:`error-" "handlers` for possible values." msgstr "" -#: ../../library/codecs.rst:665 +#: ../../library/codecs.rst:687 msgid "" "The *errors* argument will be assigned to an attribute of the same name. " "Assigning to this attribute makes it possible to switch between different " @@ -826,7 +853,7 @@ msgid "" "`IncrementalDecoder` object." msgstr "" -#: ../../library/codecs.rst:673 +#: ../../library/codecs.rst:695 msgid "" "Decodes *object* (taking the current state of the decoder into account) and " "returns the resulting decoded object. If this is the last call to :meth:" @@ -837,11 +864,11 @@ msgid "" "(which might raise an exception)." msgstr "" -#: ../../library/codecs.rst:684 +#: ../../library/codecs.rst:706 msgid "Reset the decoder to the initial state." msgstr "" -#: ../../library/codecs.rst:689 +#: ../../library/codecs.rst:711 msgid "" "Return the current state of the decoder. This must be a tuple with two " "items, the first must be the buffer containing the still undecoded input. " @@ -856,59 +883,59 @@ msgid "" "bytes of the resulting string into an integer.)" msgstr "" -#: ../../library/codecs.rst:704 +#: ../../library/codecs.rst:726 msgid "" "Set the state of the decoder to *state*. *state* must be a decoder state " "returned by :meth:`getstate`." msgstr "" -#: ../../library/codecs.rst:709 +#: ../../library/codecs.rst:731 msgid "Stream Encoding and Decoding" msgstr "" -#: ../../library/codecs.rst:712 +#: ../../library/codecs.rst:734 msgid "" "The :class:`StreamWriter` and :class:`StreamReader` classes provide generic " "working interfaces which can be used to implement new encoding submodules " "very easily. See :mod:`!encodings.utf_8` for an example of how this is done." msgstr "" -#: ../../library/codecs.rst:720 +#: ../../library/codecs.rst:742 msgid "StreamWriter Objects" msgstr "" -#: ../../library/codecs.rst:722 +#: ../../library/codecs.rst:744 msgid "" "The :class:`StreamWriter` class is a subclass of :class:`Codec` and defines " "the following methods which every stream writer must define in order to be " "compatible with the Python codec registry." msgstr "" -#: ../../library/codecs.rst:729 +#: ../../library/codecs.rst:751 msgid "Constructor for a :class:`StreamWriter` instance." msgstr "" -#: ../../library/codecs.rst:731 +#: ../../library/codecs.rst:753 msgid "" "All stream writers must provide this constructor interface. They are free to " "add additional keyword arguments, but only the ones defined here are used by " "the Python codec registry." msgstr "" -#: ../../library/codecs.rst:735 +#: ../../library/codecs.rst:757 msgid "" "The *stream* argument must be a file-like object open for writing text or " "binary data, as appropriate for the specific codec." msgstr "" -#: ../../library/codecs.rst:738 +#: ../../library/codecs.rst:760 msgid "" "The :class:`StreamWriter` may implement different error handling schemes by " "providing the *errors* keyword argument. See :ref:`error-handlers` for the " "standard error handlers the underlying stream codec may support." msgstr "" -#: ../../library/codecs.rst:742 +#: ../../library/codecs.rst:764 msgid "" "The *errors* argument will be assigned to an attribute of the same name. " "Assigning to this attribute makes it possible to switch between different " @@ -916,70 +943,70 @@ msgid "" "object." msgstr "" -#: ../../library/codecs.rst:748 +#: ../../library/codecs.rst:770 msgid "Writes the object's contents encoded to the stream." msgstr "" -#: ../../library/codecs.rst:753 +#: ../../library/codecs.rst:775 msgid "" "Writes the concatenated iterable of strings to the stream (possibly by " "reusing the :meth:`write` method). Infinite or very large iterables are not " "supported. The standard bytes-to-bytes codecs do not support this method." msgstr "" -#: ../../library/codecs.rst:761 ../../library/codecs.rst:856 +#: ../../library/codecs.rst:783 ../../library/codecs.rst:878 msgid "Resets the codec buffers used for keeping internal state." msgstr "" -#: ../../library/codecs.rst:763 +#: ../../library/codecs.rst:785 msgid "" "Calling this method should ensure that the data on the output is put into a " "clean state that allows appending of new fresh data without having to rescan " "the whole stream to recover state." msgstr "" -#: ../../library/codecs.rst:768 +#: ../../library/codecs.rst:790 msgid "" "In addition to the above methods, the :class:`StreamWriter` must also " "inherit all other methods and attributes from the underlying stream." msgstr "" -#: ../../library/codecs.rst:775 +#: ../../library/codecs.rst:797 msgid "StreamReader Objects" msgstr "" -#: ../../library/codecs.rst:777 +#: ../../library/codecs.rst:799 msgid "" "The :class:`StreamReader` class is a subclass of :class:`Codec` and defines " "the following methods which every stream reader must define in order to be " "compatible with the Python codec registry." msgstr "" -#: ../../library/codecs.rst:784 +#: ../../library/codecs.rst:806 msgid "Constructor for a :class:`StreamReader` instance." msgstr "" -#: ../../library/codecs.rst:786 +#: ../../library/codecs.rst:808 msgid "" "All stream readers must provide this constructor interface. They are free to " "add additional keyword arguments, but only the ones defined here are used by " "the Python codec registry." msgstr "" -#: ../../library/codecs.rst:790 +#: ../../library/codecs.rst:812 msgid "" "The *stream* argument must be a file-like object open for reading text or " "binary data, as appropriate for the specific codec." msgstr "" -#: ../../library/codecs.rst:793 +#: ../../library/codecs.rst:815 msgid "" "The :class:`StreamReader` may implement different error handling schemes by " "providing the *errors* keyword argument. See :ref:`error-handlers` for the " "standard error handlers the underlying stream codec may support." msgstr "" -#: ../../library/codecs.rst:797 +#: ../../library/codecs.rst:819 msgid "" "The *errors* argument will be assigned to an attribute of the same name. " "Assigning to this attribute makes it possible to switch between different " @@ -987,24 +1014,24 @@ msgid "" "object." msgstr "" -#: ../../library/codecs.rst:801 +#: ../../library/codecs.rst:823 msgid "" "The set of allowed values for the *errors* argument can be extended with :" "func:`register_error`." msgstr "" -#: ../../library/codecs.rst:807 +#: ../../library/codecs.rst:829 msgid "Decodes data from the stream and returns the resulting object." msgstr "" -#: ../../library/codecs.rst:809 +#: ../../library/codecs.rst:831 msgid "" "The *chars* argument indicates the number of decoded code points or bytes to " "return. The :func:`read` method will never return more data than requested, " "but it might return less, if there is not enough available." msgstr "" -#: ../../library/codecs.rst:814 +#: ../../library/codecs.rst:836 msgid "" "The *size* argument indicates the approximate maximum number of encoded " "bytes or code points to read for decoding. The decoder can modify this " @@ -1013,13 +1040,13 @@ msgid "" "huge files in one step." msgstr "" -#: ../../library/codecs.rst:821 +#: ../../library/codecs.rst:843 msgid "" "The *firstline* flag indicates that it would be sufficient to only return " "the first line, if there are decoding errors on later lines." msgstr "" -#: ../../library/codecs.rst:825 +#: ../../library/codecs.rst:847 msgid "" "The method should use a greedy read strategy meaning that it should read as " "much data as is allowed within the definition of the encoding and the given " @@ -1027,68 +1054,68 @@ msgid "" "the stream, these should be read too." msgstr "" -#: ../../library/codecs.rst:833 +#: ../../library/codecs.rst:855 msgid "Read one line from the input stream and return the decoded data." msgstr "" -#: ../../library/codecs.rst:835 +#: ../../library/codecs.rst:857 msgid "" "*size*, if given, is passed as size argument to the stream's :meth:`read` " "method." msgstr "" -#: ../../library/codecs.rst:838 +#: ../../library/codecs.rst:860 msgid "" "If *keepends* is false line-endings will be stripped from the lines returned." msgstr "" -#: ../../library/codecs.rst:844 +#: ../../library/codecs.rst:866 msgid "" "Read all lines available on the input stream and return them as a list of " "lines." msgstr "" -#: ../../library/codecs.rst:847 +#: ../../library/codecs.rst:869 msgid "" "Line-endings are implemented using the codec's :meth:`decode` method and are " "included in the list entries if *keepends* is true." msgstr "" -#: ../../library/codecs.rst:850 +#: ../../library/codecs.rst:872 msgid "" "*sizehint*, if given, is passed as the *size* argument to the stream's :meth:" "`read` method." msgstr "" -#: ../../library/codecs.rst:858 +#: ../../library/codecs.rst:880 msgid "" "Note that no stream repositioning should take place. This method is " "primarily intended to be able to recover from decoding errors." msgstr "" -#: ../../library/codecs.rst:862 +#: ../../library/codecs.rst:884 msgid "" "In addition to the above methods, the :class:`StreamReader` must also " "inherit all other methods and attributes from the underlying stream." msgstr "" -#: ../../library/codecs.rst:868 +#: ../../library/codecs.rst:890 msgid "StreamReaderWriter Objects" msgstr "" -#: ../../library/codecs.rst:870 +#: ../../library/codecs.rst:892 msgid "" "The :class:`StreamReaderWriter` is a convenience class that allows wrapping " "streams which work in both read and write modes." msgstr "" -#: ../../library/codecs.rst:873 ../../library/codecs.rst:897 +#: ../../library/codecs.rst:895 ../../library/codecs.rst:919 msgid "" "The design is such that one can use the factory functions returned by the :" "func:`lookup` function to construct the instance." msgstr "" -#: ../../library/codecs.rst:879 +#: ../../library/codecs.rst:901 msgid "" "Creates a :class:`StreamReaderWriter` instance. *stream* must be a file-like " "object. *Reader* and *Writer* must be factory functions or classes providing " @@ -1097,24 +1124,24 @@ msgid "" "writers." msgstr "" -#: ../../library/codecs.rst:884 +#: ../../library/codecs.rst:906 msgid "" ":class:`StreamReaderWriter` instances define the combined interfaces of :" "class:`StreamReader` and :class:`StreamWriter` classes. They inherit all " "other methods and attributes from the underlying stream." msgstr "" -#: ../../library/codecs.rst:892 +#: ../../library/codecs.rst:914 msgid "StreamRecoder Objects" msgstr "" -#: ../../library/codecs.rst:894 +#: ../../library/codecs.rst:916 msgid "" "The :class:`StreamRecoder` translates data from one encoding to another, " "which is sometimes useful when dealing with different encoding environments." msgstr "" -#: ../../library/codecs.rst:903 +#: ../../library/codecs.rst:925 msgid "" "Creates a :class:`StreamRecoder` instance which implements a two-way " "conversion: *encode* and *decode* work on the frontend — the data visible to " @@ -1122,17 +1149,17 @@ msgid "" "while *Reader* and *Writer* work on the backend — the data in *stream*." msgstr "" -#: ../../library/codecs.rst:909 +#: ../../library/codecs.rst:931 msgid "" "You can use these objects to do transparent transcodings, e.g., from Latin-1 " "to UTF-8 and back." msgstr "" -#: ../../library/codecs.rst:912 +#: ../../library/codecs.rst:934 msgid "The *stream* argument must be a file-like object." msgstr "" -#: ../../library/codecs.rst:914 +#: ../../library/codecs.rst:936 msgid "" "The *encode* and *decode* arguments must adhere to the :class:`Codec` " "interface. *Reader* and *Writer* must be factory functions or classes " @@ -1140,24 +1167,24 @@ msgid "" "interface respectively." msgstr "" -#: ../../library/codecs.rst:919 +#: ../../library/codecs.rst:941 msgid "" "Error handling is done in the same way as defined for the stream readers and " "writers." msgstr "" -#: ../../library/codecs.rst:923 +#: ../../library/codecs.rst:945 msgid "" ":class:`StreamRecoder` instances define the combined interfaces of :class:" "`StreamReader` and :class:`StreamWriter` classes. They inherit all other " "methods and attributes from the underlying stream." msgstr "" -#: ../../library/codecs.rst:931 +#: ../../library/codecs.rst:953 msgid "Encodings and Unicode" msgstr "" -#: ../../library/codecs.rst:933 +#: ../../library/codecs.rst:955 msgid "" "Strings are stored internally as sequences of code points in range " "``U+0000``--``U+10FFFF``. (See :pep:`393` for more details about the " @@ -1169,7 +1196,7 @@ msgid "" "which are collectivity referred to as :term:`text encodings `." msgstr "" -#: ../../library/codecs.rst:943 +#: ../../library/codecs.rst:965 msgid "" "The simplest text encoding (called ``'latin-1'`` or ``'iso-8859-1'``) maps " "the code points 0--255 to the bytes ``0x0``--``0xff``, which means that a " @@ -1180,7 +1207,7 @@ msgid "" "position 3: ordinal not in range(256)``." msgstr "" -#: ../../library/codecs.rst:951 +#: ../../library/codecs.rst:973 msgid "" "There's another group of encodings (the so called charmap encodings) that " "choose a different subset of all Unicode code points and how these code " @@ -1190,7 +1217,7 @@ msgid "" "that shows you which character is mapped to which byte value." msgstr "" -#: ../../library/codecs.rst:958 +#: ../../library/codecs.rst:980 msgid "" "All of these encodings can only encode 256 of the 1114112 code points " "defined in Unicode. A simple and straightforward way that can store each " @@ -1220,7 +1247,7 @@ msgid "" "normal character that will be decoded like any other." msgstr "" -#: ../../library/codecs.rst:984 +#: ../../library/codecs.rst:1006 msgid "" "There's another encoding that is able to encode the full range of Unicode " "characters: UTF-8. UTF-8 is an 8-bit encoding, which means there are no " @@ -1231,59 +1258,59 @@ msgid "" "which when concatenated give the Unicode character):" msgstr "" -#: ../../library/codecs.rst:993 +#: ../../library/codecs.rst:1015 msgid "Range" msgstr "" -#: ../../library/codecs.rst:993 +#: ../../library/codecs.rst:1015 msgid "Encoding" msgstr "" -#: ../../library/codecs.rst:995 +#: ../../library/codecs.rst:1017 msgid "``U-00000000`` ... ``U-0000007F``" msgstr "" -#: ../../library/codecs.rst:995 +#: ../../library/codecs.rst:1017 msgid "0xxxxxxx" msgstr "" -#: ../../library/codecs.rst:997 +#: ../../library/codecs.rst:1019 msgid "``U-00000080`` ... ``U-000007FF``" msgstr "" -#: ../../library/codecs.rst:997 +#: ../../library/codecs.rst:1019 msgid "110xxxxx 10xxxxxx" msgstr "" -#: ../../library/codecs.rst:999 +#: ../../library/codecs.rst:1021 msgid "``U-00000800`` ... ``U-0000FFFF``" msgstr "" -#: ../../library/codecs.rst:999 +#: ../../library/codecs.rst:1021 msgid "1110xxxx 10xxxxxx 10xxxxxx" msgstr "" -#: ../../library/codecs.rst:1001 +#: ../../library/codecs.rst:1023 msgid "``U-00010000`` ... ``U-0010FFFF``" msgstr "" -#: ../../library/codecs.rst:1001 +#: ../../library/codecs.rst:1023 msgid "11110xxx 10xxxxxx 10xxxxxx 10xxxxxx" msgstr "" -#: ../../library/codecs.rst:1004 +#: ../../library/codecs.rst:1026 msgid "" "The least significant bit of the Unicode character is the rightmost x bit." msgstr "" -#: ../../library/codecs.rst:1006 +#: ../../library/codecs.rst:1028 msgid "" "As UTF-8 is an 8-bit encoding no BOM is required and any ``U+FEFF`` " "character in the decoded string (even if it's the first character) is " "treated as a ``ZERO WIDTH NO-BREAK SPACE``." msgstr "" -#: ../../library/codecs.rst:1010 +#: ../../library/codecs.rst:1032 msgid "" "Without external information it's impossible to reliably determine which " "encoding was used for encoding a string. Each charmap encoding can decode " @@ -1309,7 +1336,7 @@ msgstr "" msgid "INVERTED QUESTION MARK" msgstr "" -#: ../../library/codecs.rst:1026 +#: ../../library/codecs.rst:1048 msgid "" "in iso-8859-1), this increases the probability that a ``utf-8-sig`` encoding " "can be correctly guessed from the byte sequence. So here the BOM is not used " @@ -1321,11 +1348,11 @@ msgid "" "the use of the BOM is discouraged and should generally be avoided." msgstr "" -#: ../../library/codecs.rst:1039 +#: ../../library/codecs.rst:1061 msgid "Standard Encodings" msgstr "" -#: ../../library/codecs.rst:1041 +#: ../../library/codecs.rst:1063 msgid "" "Python comes with a number of codecs built-in, either implemented as C " "functions or with dictionaries as mapping tables. The following table lists " @@ -1337,14 +1364,14 @@ msgid "" "alias for the ``'utf_8'`` codec." msgstr "" -#: ../../library/codecs.rst:1049 +#: ../../library/codecs.rst:1071 msgid "" "On Windows, ``cpXXX`` codecs are available for all code pages. But only " "codecs listed in the following table are guarantead to exist on other " "platforms." msgstr "" -#: ../../library/codecs.rst:1055 +#: ../../library/codecs.rst:1077 msgid "" "Some common encodings can bypass the codecs lookup machinery to improve " "performance. These optimization opportunities are only recognized by CPython " @@ -1354,11 +1381,11 @@ msgid "" "Using alternative aliases for these encodings may result in slower execution." msgstr "" -#: ../../library/codecs.rst:1063 +#: ../../library/codecs.rst:1085 msgid "Optimization opportunity recognized for us-ascii." msgstr "" -#: ../../library/codecs.rst:1066 +#: ../../library/codecs.rst:1088 msgid "" "Many of the character sets support the same languages. They vary in " "individual characters (e.g. whether the EURO SIGN is supported or not), and " @@ -1366,953 +1393,953 @@ msgid "" "languages in particular, the following variants typically exist:" msgstr "" -#: ../../library/codecs.rst:1071 +#: ../../library/codecs.rst:1093 msgid "an ISO 8859 codeset" msgstr "" -#: ../../library/codecs.rst:1073 +#: ../../library/codecs.rst:1095 msgid "" "a Microsoft Windows code page, which is typically derived from an 8859 " "codeset, but replaces control characters with additional graphic characters" msgstr "" -#: ../../library/codecs.rst:1076 +#: ../../library/codecs.rst:1098 msgid "an IBM EBCDIC code page" msgstr "" -#: ../../library/codecs.rst:1078 +#: ../../library/codecs.rst:1100 msgid "an IBM PC code page, which is ASCII compatible" msgstr "" -#: ../../library/codecs.rst:1083 ../../library/codecs.rst:1342 -#: ../../library/codecs.rst:1410 ../../library/codecs.rst:1465 +#: ../../library/codecs.rst:1105 ../../library/codecs.rst:1364 +#: ../../library/codecs.rst:1436 ../../library/codecs.rst:1491 msgid "Codec" msgstr "" -#: ../../library/codecs.rst:1083 ../../library/codecs.rst:1342 -#: ../../library/codecs.rst:1410 ../../library/codecs.rst:1465 +#: ../../library/codecs.rst:1105 ../../library/codecs.rst:1364 +#: ../../library/codecs.rst:1436 ../../library/codecs.rst:1491 msgid "Aliases" msgstr "" -#: ../../library/codecs.rst:1083 +#: ../../library/codecs.rst:1105 msgid "Languages" msgstr "" -#: ../../library/codecs.rst:1085 +#: ../../library/codecs.rst:1107 msgid "ascii" msgstr "" -#: ../../library/codecs.rst:1085 +#: ../../library/codecs.rst:1107 msgid "646, us-ascii" msgstr "" -#: ../../library/codecs.rst:1085 ../../library/codecs.rst:1091 -#: ../../library/codecs.rst:1099 +#: ../../library/codecs.rst:1107 ../../library/codecs.rst:1113 +#: ../../library/codecs.rst:1121 msgid "English" msgstr "" -#: ../../library/codecs.rst:1087 +#: ../../library/codecs.rst:1109 msgid "big5" msgstr "" -#: ../../library/codecs.rst:1087 +#: ../../library/codecs.rst:1109 msgid "big5-tw, csbig5" msgstr "" -#: ../../library/codecs.rst:1087 ../../library/codecs.rst:1089 -#: ../../library/codecs.rst:1148 +#: ../../library/codecs.rst:1109 ../../library/codecs.rst:1111 +#: ../../library/codecs.rst:1170 msgid "Traditional Chinese" msgstr "" -#: ../../library/codecs.rst:1089 +#: ../../library/codecs.rst:1111 msgid "big5hkscs" msgstr "" -#: ../../library/codecs.rst:1089 +#: ../../library/codecs.rst:1111 msgid "big5-hkscs, hkscs" msgstr "" -#: ../../library/codecs.rst:1091 +#: ../../library/codecs.rst:1113 msgid "cp037" msgstr "" -#: ../../library/codecs.rst:1091 +#: ../../library/codecs.rst:1113 msgid "IBM037, IBM039" msgstr "" -#: ../../library/codecs.rst:1093 +#: ../../library/codecs.rst:1115 msgid "cp273" msgstr "" -#: ../../library/codecs.rst:1093 +#: ../../library/codecs.rst:1115 msgid "273, IBM273, csIBM273" msgstr "" -#: ../../library/codecs.rst:1093 +#: ../../library/codecs.rst:1115 msgid "German" msgstr "" -#: ../../library/codecs.rst:1097 +#: ../../library/codecs.rst:1119 msgid "cp424" msgstr "" -#: ../../library/codecs.rst:1097 +#: ../../library/codecs.rst:1119 msgid "EBCDIC-CP-HE, IBM424" msgstr "" -#: ../../library/codecs.rst:1097 ../../library/codecs.rst:1117 -#: ../../library/codecs.rst:1127 ../../library/codecs.rst:1171 -#: ../../library/codecs.rst:1234 +#: ../../library/codecs.rst:1119 ../../library/codecs.rst:1139 +#: ../../library/codecs.rst:1149 ../../library/codecs.rst:1193 +#: ../../library/codecs.rst:1256 msgid "Hebrew" msgstr "" -#: ../../library/codecs.rst:1099 +#: ../../library/codecs.rst:1121 msgid "cp437" msgstr "" -#: ../../library/codecs.rst:1099 +#: ../../library/codecs.rst:1121 msgid "437, IBM437" msgstr "" -#: ../../library/codecs.rst:1101 +#: ../../library/codecs.rst:1123 msgid "cp500" msgstr "" -#: ../../library/codecs.rst:1101 +#: ../../library/codecs.rst:1123 msgid "EBCDIC-CP-BE, EBCDIC-CP-CH, IBM500" msgstr "" -#: ../../library/codecs.rst:1101 ../../library/codecs.rst:1110 -#: ../../library/codecs.rst:1121 ../../library/codecs.rst:1158 -#: ../../library/codecs.rst:1165 ../../library/codecs.rst:1218 -#: ../../library/codecs.rst:1246 ../../library/codecs.rst:1274 +#: ../../library/codecs.rst:1123 ../../library/codecs.rst:1132 +#: ../../library/codecs.rst:1143 ../../library/codecs.rst:1180 +#: ../../library/codecs.rst:1187 ../../library/codecs.rst:1240 +#: ../../library/codecs.rst:1268 ../../library/codecs.rst:1296 msgid "Western Europe" msgstr "" -#: ../../library/codecs.rst:1104 +#: ../../library/codecs.rst:1126 msgid "cp720" msgstr "" -#: ../../library/codecs.rst:1104 ../../library/codecs.rst:1131 -#: ../../library/codecs.rst:1173 ../../library/codecs.rst:1230 +#: ../../library/codecs.rst:1126 ../../library/codecs.rst:1153 +#: ../../library/codecs.rst:1195 ../../library/codecs.rst:1252 msgid "Arabic" msgstr "" -#: ../../library/codecs.rst:1106 +#: ../../library/codecs.rst:1128 msgid "cp737" msgstr "" -#: ../../library/codecs.rst:1106 ../../library/codecs.rst:1137 -#: ../../library/codecs.rst:1141 ../../library/codecs.rst:1167 -#: ../../library/codecs.rst:1232 ../../library/codecs.rst:1267 +#: ../../library/codecs.rst:1128 ../../library/codecs.rst:1159 +#: ../../library/codecs.rst:1163 ../../library/codecs.rst:1189 +#: ../../library/codecs.rst:1254 ../../library/codecs.rst:1289 msgid "Greek" msgstr "" -#: ../../library/codecs.rst:1108 +#: ../../library/codecs.rst:1130 msgid "cp775" msgstr "" -#: ../../library/codecs.rst:1108 +#: ../../library/codecs.rst:1130 msgid "IBM775" msgstr "" -#: ../../library/codecs.rst:1108 ../../library/codecs.rst:1175 -#: ../../library/codecs.rst:1225 ../../library/codecs.rst:1242 +#: ../../library/codecs.rst:1130 ../../library/codecs.rst:1197 +#: ../../library/codecs.rst:1247 ../../library/codecs.rst:1264 msgid "Baltic languages" msgstr "" -#: ../../library/codecs.rst:1110 +#: ../../library/codecs.rst:1132 msgid "cp850" msgstr "" -#: ../../library/codecs.rst:1110 +#: ../../library/codecs.rst:1132 msgid "850, IBM850" msgstr "" -#: ../../library/codecs.rst:1112 +#: ../../library/codecs.rst:1134 msgid "cp852" msgstr "" -#: ../../library/codecs.rst:1112 +#: ../../library/codecs.rst:1134 msgid "852, IBM852" msgstr "" -#: ../../library/codecs.rst:1112 ../../library/codecs.rst:1160 -#: ../../library/codecs.rst:1221 ../../library/codecs.rst:1271 +#: ../../library/codecs.rst:1134 ../../library/codecs.rst:1182 +#: ../../library/codecs.rst:1243 ../../library/codecs.rst:1293 msgid "Central and Eastern Europe" msgstr "" -#: ../../library/codecs.rst:1114 +#: ../../library/codecs.rst:1136 msgid "cp855" msgstr "" -#: ../../library/codecs.rst:1114 +#: ../../library/codecs.rst:1136 msgid "855, IBM855" msgstr "" -#: ../../library/codecs.rst:1114 ../../library/codecs.rst:1162 -#: ../../library/codecs.rst:1227 ../../library/codecs.rst:1264 +#: ../../library/codecs.rst:1136 ../../library/codecs.rst:1184 +#: ../../library/codecs.rst:1249 ../../library/codecs.rst:1286 msgid "Belarusian, Bulgarian, Macedonian, Russian, Serbian" msgstr "" -#: ../../library/codecs.rst:1117 +#: ../../library/codecs.rst:1139 msgid "cp856" msgstr "" -#: ../../library/codecs.rst:1119 +#: ../../library/codecs.rst:1141 msgid "cp857" msgstr "" -#: ../../library/codecs.rst:1119 +#: ../../library/codecs.rst:1141 msgid "857, IBM857" msgstr "" -#: ../../library/codecs.rst:1119 ../../library/codecs.rst:1152 -#: ../../library/codecs.rst:1169 ../../library/codecs.rst:1236 -#: ../../library/codecs.rst:1276 +#: ../../library/codecs.rst:1141 ../../library/codecs.rst:1174 +#: ../../library/codecs.rst:1191 ../../library/codecs.rst:1258 +#: ../../library/codecs.rst:1298 msgid "Turkish" msgstr "" -#: ../../library/codecs.rst:1121 +#: ../../library/codecs.rst:1143 msgid "cp858" msgstr "" -#: ../../library/codecs.rst:1121 +#: ../../library/codecs.rst:1143 msgid "858, IBM858" msgstr "" -#: ../../library/codecs.rst:1123 +#: ../../library/codecs.rst:1145 msgid "cp860" msgstr "" -#: ../../library/codecs.rst:1123 +#: ../../library/codecs.rst:1145 msgid "860, IBM860" msgstr "" -#: ../../library/codecs.rst:1123 +#: ../../library/codecs.rst:1145 msgid "Portuguese" msgstr "" -#: ../../library/codecs.rst:1125 +#: ../../library/codecs.rst:1147 msgid "cp861" msgstr "" -#: ../../library/codecs.rst:1125 +#: ../../library/codecs.rst:1147 msgid "861, CP-IS, IBM861" msgstr "" -#: ../../library/codecs.rst:1125 ../../library/codecs.rst:1269 +#: ../../library/codecs.rst:1147 ../../library/codecs.rst:1291 msgid "Icelandic" msgstr "" -#: ../../library/codecs.rst:1127 +#: ../../library/codecs.rst:1149 msgid "cp862" msgstr "" -#: ../../library/codecs.rst:1127 +#: ../../library/codecs.rst:1149 msgid "862, IBM862" msgstr "" -#: ../../library/codecs.rst:1129 +#: ../../library/codecs.rst:1151 msgid "cp863" msgstr "" -#: ../../library/codecs.rst:1129 +#: ../../library/codecs.rst:1151 msgid "863, IBM863" msgstr "" -#: ../../library/codecs.rst:1129 +#: ../../library/codecs.rst:1151 msgid "Canadian" msgstr "" -#: ../../library/codecs.rst:1131 +#: ../../library/codecs.rst:1153 msgid "cp864" msgstr "" -#: ../../library/codecs.rst:1131 +#: ../../library/codecs.rst:1153 msgid "IBM864" msgstr "" -#: ../../library/codecs.rst:1133 +#: ../../library/codecs.rst:1155 msgid "cp865" msgstr "" -#: ../../library/codecs.rst:1133 +#: ../../library/codecs.rst:1155 msgid "865, IBM865" msgstr "" -#: ../../library/codecs.rst:1133 +#: ../../library/codecs.rst:1155 msgid "Danish, Norwegian" msgstr "" -#: ../../library/codecs.rst:1135 +#: ../../library/codecs.rst:1157 msgid "cp866" msgstr "" -#: ../../library/codecs.rst:1135 +#: ../../library/codecs.rst:1157 msgid "866, IBM866" msgstr "" -#: ../../library/codecs.rst:1135 ../../library/codecs.rst:1252 +#: ../../library/codecs.rst:1157 ../../library/codecs.rst:1274 msgid "Russian" msgstr "" -#: ../../library/codecs.rst:1137 +#: ../../library/codecs.rst:1159 msgid "cp869" msgstr "" -#: ../../library/codecs.rst:1137 +#: ../../library/codecs.rst:1159 msgid "869, CP-GR, IBM869" msgstr "" -#: ../../library/codecs.rst:1139 +#: ../../library/codecs.rst:1161 msgid "cp874" msgstr "" -#: ../../library/codecs.rst:1139 +#: ../../library/codecs.rst:1161 msgid "Thai" msgstr "" -#: ../../library/codecs.rst:1141 +#: ../../library/codecs.rst:1163 msgid "cp875" msgstr "" -#: ../../library/codecs.rst:1143 +#: ../../library/codecs.rst:1165 msgid "cp932" msgstr "" -#: ../../library/codecs.rst:1143 +#: ../../library/codecs.rst:1165 msgid "932, ms932, mskanji, ms-kanji, windows-31j" msgstr "" -#: ../../library/codecs.rst:1143 ../../library/codecs.rst:1179 -#: ../../library/codecs.rst:1181 ../../library/codecs.rst:1183 -#: ../../library/codecs.rst:1200 ../../library/codecs.rst:1203 -#: ../../library/codecs.rst:1208 ../../library/codecs.rst:1211 -#: ../../library/codecs.rst:1213 ../../library/codecs.rst:1281 -#: ../../library/codecs.rst:1284 ../../library/codecs.rst:1287 +#: ../../library/codecs.rst:1165 ../../library/codecs.rst:1201 +#: ../../library/codecs.rst:1203 ../../library/codecs.rst:1205 +#: ../../library/codecs.rst:1222 ../../library/codecs.rst:1225 +#: ../../library/codecs.rst:1230 ../../library/codecs.rst:1233 +#: ../../library/codecs.rst:1235 ../../library/codecs.rst:1303 +#: ../../library/codecs.rst:1306 ../../library/codecs.rst:1309 msgid "Japanese" msgstr "" -#: ../../library/codecs.rst:1146 +#: ../../library/codecs.rst:1168 msgid "cp949" msgstr "" -#: ../../library/codecs.rst:1146 +#: ../../library/codecs.rst:1168 msgid "949, ms949, uhc" msgstr "" -#: ../../library/codecs.rst:1146 ../../library/codecs.rst:1185 -#: ../../library/codecs.rst:1215 ../../library/codecs.rst:1250 +#: ../../library/codecs.rst:1168 ../../library/codecs.rst:1207 +#: ../../library/codecs.rst:1237 ../../library/codecs.rst:1272 msgid "Korean" msgstr "" -#: ../../library/codecs.rst:1148 +#: ../../library/codecs.rst:1170 msgid "cp950" msgstr "" -#: ../../library/codecs.rst:1148 +#: ../../library/codecs.rst:1170 msgid "950, ms950" msgstr "" -#: ../../library/codecs.rst:1150 +#: ../../library/codecs.rst:1172 msgid "cp1006" msgstr "" -#: ../../library/codecs.rst:1150 +#: ../../library/codecs.rst:1172 msgid "Urdu" msgstr "" -#: ../../library/codecs.rst:1152 +#: ../../library/codecs.rst:1174 msgid "cp1026" msgstr "" -#: ../../library/codecs.rst:1152 +#: ../../library/codecs.rst:1174 msgid "ibm1026" msgstr "" -#: ../../library/codecs.rst:1154 +#: ../../library/codecs.rst:1176 msgid "cp1125" msgstr "" -#: ../../library/codecs.rst:1154 +#: ../../library/codecs.rst:1176 msgid "1125, ibm1125, cp866u, ruscii" msgstr "" -#: ../../library/codecs.rst:1154 ../../library/codecs.rst:1258 +#: ../../library/codecs.rst:1176 ../../library/codecs.rst:1280 msgid "Ukrainian" msgstr "" -#: ../../library/codecs.rst:1158 +#: ../../library/codecs.rst:1180 msgid "cp1140" msgstr "" -#: ../../library/codecs.rst:1158 +#: ../../library/codecs.rst:1180 msgid "ibm1140" msgstr "" -#: ../../library/codecs.rst:1160 +#: ../../library/codecs.rst:1182 msgid "cp1250" msgstr "" -#: ../../library/codecs.rst:1160 +#: ../../library/codecs.rst:1182 msgid "windows-1250" msgstr "" -#: ../../library/codecs.rst:1162 +#: ../../library/codecs.rst:1184 msgid "cp1251" msgstr "" -#: ../../library/codecs.rst:1162 +#: ../../library/codecs.rst:1184 msgid "windows-1251" msgstr "" -#: ../../library/codecs.rst:1165 +#: ../../library/codecs.rst:1187 msgid "cp1252" msgstr "" -#: ../../library/codecs.rst:1165 +#: ../../library/codecs.rst:1187 msgid "windows-1252" msgstr "" -#: ../../library/codecs.rst:1167 +#: ../../library/codecs.rst:1189 msgid "cp1253" msgstr "" -#: ../../library/codecs.rst:1167 +#: ../../library/codecs.rst:1189 msgid "windows-1253" msgstr "" -#: ../../library/codecs.rst:1169 +#: ../../library/codecs.rst:1191 msgid "cp1254" msgstr "" -#: ../../library/codecs.rst:1169 +#: ../../library/codecs.rst:1191 msgid "windows-1254" msgstr "" -#: ../../library/codecs.rst:1171 +#: ../../library/codecs.rst:1193 msgid "cp1255" msgstr "" -#: ../../library/codecs.rst:1171 +#: ../../library/codecs.rst:1193 msgid "windows-1255" msgstr "" -#: ../../library/codecs.rst:1173 +#: ../../library/codecs.rst:1195 msgid "cp1256" msgstr "" -#: ../../library/codecs.rst:1173 +#: ../../library/codecs.rst:1195 msgid "windows-1256" msgstr "" -#: ../../library/codecs.rst:1175 +#: ../../library/codecs.rst:1197 msgid "cp1257" msgstr "" -#: ../../library/codecs.rst:1175 +#: ../../library/codecs.rst:1197 msgid "windows-1257" msgstr "" -#: ../../library/codecs.rst:1177 +#: ../../library/codecs.rst:1199 msgid "cp1258" msgstr "" -#: ../../library/codecs.rst:1177 +#: ../../library/codecs.rst:1199 msgid "windows-1258" msgstr "" -#: ../../library/codecs.rst:1177 +#: ../../library/codecs.rst:1199 msgid "Vietnamese" msgstr "" -#: ../../library/codecs.rst:1179 +#: ../../library/codecs.rst:1201 msgid "euc_jp" msgstr "" -#: ../../library/codecs.rst:1179 +#: ../../library/codecs.rst:1201 msgid "eucjp, ujis, u-jis" msgstr "" -#: ../../library/codecs.rst:1181 +#: ../../library/codecs.rst:1203 msgid "euc_jis_2004" msgstr "" -#: ../../library/codecs.rst:1181 +#: ../../library/codecs.rst:1203 msgid "jisx0213, eucjis2004" msgstr "" -#: ../../library/codecs.rst:1183 +#: ../../library/codecs.rst:1205 msgid "euc_jisx0213" msgstr "" -#: ../../library/codecs.rst:1183 +#: ../../library/codecs.rst:1205 msgid "eucjisx0213" msgstr "" -#: ../../library/codecs.rst:1185 +#: ../../library/codecs.rst:1207 msgid "euc_kr" msgstr "" -#: ../../library/codecs.rst:1185 +#: ../../library/codecs.rst:1207 msgid "euckr, korean, ksc5601, ks_c-5601, ks_c-5601-1987, ksx1001, ks_x-1001" msgstr "" -#: ../../library/codecs.rst:1189 +#: ../../library/codecs.rst:1211 msgid "gb2312" msgstr "" -#: ../../library/codecs.rst:1189 +#: ../../library/codecs.rst:1211 msgid "" "chinese, csiso58gb231280, euc-cn, euccn, eucgb2312-cn, gb2312-1980, " "gb2312-80, iso-ir-58" msgstr "" -#: ../../library/codecs.rst:1189 ../../library/codecs.rst:1198 +#: ../../library/codecs.rst:1211 ../../library/codecs.rst:1220 msgid "Simplified Chinese" msgstr "" -#: ../../library/codecs.rst:1194 +#: ../../library/codecs.rst:1216 msgid "gbk" msgstr "" -#: ../../library/codecs.rst:1194 +#: ../../library/codecs.rst:1216 msgid "936, cp936, ms936" msgstr "" -#: ../../library/codecs.rst:1194 ../../library/codecs.rst:1196 +#: ../../library/codecs.rst:1216 ../../library/codecs.rst:1218 msgid "Unified Chinese" msgstr "" -#: ../../library/codecs.rst:1196 +#: ../../library/codecs.rst:1218 msgid "gb18030" msgstr "" -#: ../../library/codecs.rst:1196 +#: ../../library/codecs.rst:1218 msgid "gb18030-2000" msgstr "" -#: ../../library/codecs.rst:1198 +#: ../../library/codecs.rst:1220 msgid "hz" msgstr "" -#: ../../library/codecs.rst:1198 +#: ../../library/codecs.rst:1220 msgid "hzgb, hz-gb, hz-gb-2312" msgstr "" -#: ../../library/codecs.rst:1200 +#: ../../library/codecs.rst:1222 msgid "iso2022_jp" msgstr "" -#: ../../library/codecs.rst:1200 +#: ../../library/codecs.rst:1222 msgid "csiso2022jp, iso2022jp, iso-2022-jp" msgstr "" -#: ../../library/codecs.rst:1203 +#: ../../library/codecs.rst:1225 msgid "iso2022_jp_1" msgstr "" -#: ../../library/codecs.rst:1203 +#: ../../library/codecs.rst:1225 msgid "iso2022jp-1, iso-2022-jp-1" msgstr "" -#: ../../library/codecs.rst:1205 +#: ../../library/codecs.rst:1227 msgid "iso2022_jp_2" msgstr "" -#: ../../library/codecs.rst:1205 +#: ../../library/codecs.rst:1227 msgid "iso2022jp-2, iso-2022-jp-2" msgstr "" -#: ../../library/codecs.rst:1205 +#: ../../library/codecs.rst:1227 msgid "Japanese, Korean, Simplified Chinese, Western Europe, Greek" msgstr "" -#: ../../library/codecs.rst:1208 +#: ../../library/codecs.rst:1230 msgid "iso2022_jp_2004" msgstr "" -#: ../../library/codecs.rst:1208 +#: ../../library/codecs.rst:1230 msgid "iso2022jp-2004, iso-2022-jp-2004" msgstr "" -#: ../../library/codecs.rst:1211 +#: ../../library/codecs.rst:1233 msgid "iso2022_jp_3" msgstr "" -#: ../../library/codecs.rst:1211 +#: ../../library/codecs.rst:1233 msgid "iso2022jp-3, iso-2022-jp-3" msgstr "" -#: ../../library/codecs.rst:1213 +#: ../../library/codecs.rst:1235 msgid "iso2022_jp_ext" msgstr "" -#: ../../library/codecs.rst:1213 +#: ../../library/codecs.rst:1235 msgid "iso2022jp-ext, iso-2022-jp-ext" msgstr "" -#: ../../library/codecs.rst:1215 +#: ../../library/codecs.rst:1237 msgid "iso2022_kr" msgstr "" -#: ../../library/codecs.rst:1215 +#: ../../library/codecs.rst:1237 msgid "csiso2022kr, iso2022kr, iso-2022-kr" msgstr "" -#: ../../library/codecs.rst:1218 +#: ../../library/codecs.rst:1240 msgid "latin_1" msgstr "" -#: ../../library/codecs.rst:1218 +#: ../../library/codecs.rst:1240 msgid "iso-8859-1, iso8859-1, 8859, cp819, latin, latin1, L1" msgstr "" -#: ../../library/codecs.rst:1221 +#: ../../library/codecs.rst:1243 msgid "iso8859_2" msgstr "" -#: ../../library/codecs.rst:1221 +#: ../../library/codecs.rst:1243 msgid "iso-8859-2, latin2, L2" msgstr "" -#: ../../library/codecs.rst:1223 +#: ../../library/codecs.rst:1245 msgid "iso8859_3" msgstr "" -#: ../../library/codecs.rst:1223 +#: ../../library/codecs.rst:1245 msgid "iso-8859-3, latin3, L3" msgstr "" -#: ../../library/codecs.rst:1223 +#: ../../library/codecs.rst:1245 msgid "Esperanto, Maltese" msgstr "" -#: ../../library/codecs.rst:1225 +#: ../../library/codecs.rst:1247 msgid "iso8859_4" msgstr "" -#: ../../library/codecs.rst:1225 +#: ../../library/codecs.rst:1247 msgid "iso-8859-4, latin4, L4" msgstr "" -#: ../../library/codecs.rst:1227 +#: ../../library/codecs.rst:1249 msgid "iso8859_5" msgstr "" -#: ../../library/codecs.rst:1227 +#: ../../library/codecs.rst:1249 msgid "iso-8859-5, cyrillic" msgstr "" -#: ../../library/codecs.rst:1230 +#: ../../library/codecs.rst:1252 msgid "iso8859_6" msgstr "" -#: ../../library/codecs.rst:1230 +#: ../../library/codecs.rst:1252 msgid "iso-8859-6, arabic" msgstr "" -#: ../../library/codecs.rst:1232 +#: ../../library/codecs.rst:1254 msgid "iso8859_7" msgstr "" -#: ../../library/codecs.rst:1232 +#: ../../library/codecs.rst:1254 msgid "iso-8859-7, greek, greek8" msgstr "" -#: ../../library/codecs.rst:1234 +#: ../../library/codecs.rst:1256 msgid "iso8859_8" msgstr "" -#: ../../library/codecs.rst:1234 +#: ../../library/codecs.rst:1256 msgid "iso-8859-8, hebrew" msgstr "" -#: ../../library/codecs.rst:1236 +#: ../../library/codecs.rst:1258 msgid "iso8859_9" msgstr "" -#: ../../library/codecs.rst:1236 +#: ../../library/codecs.rst:1258 msgid "iso-8859-9, latin5, L5" msgstr "" -#: ../../library/codecs.rst:1238 +#: ../../library/codecs.rst:1260 msgid "iso8859_10" msgstr "" -#: ../../library/codecs.rst:1238 +#: ../../library/codecs.rst:1260 msgid "iso-8859-10, latin6, L6" msgstr "" -#: ../../library/codecs.rst:1238 +#: ../../library/codecs.rst:1260 msgid "Nordic languages" msgstr "" -#: ../../library/codecs.rst:1240 +#: ../../library/codecs.rst:1262 msgid "iso8859_11" msgstr "" -#: ../../library/codecs.rst:1240 +#: ../../library/codecs.rst:1262 msgid "iso-8859-11, thai" msgstr "" -#: ../../library/codecs.rst:1240 +#: ../../library/codecs.rst:1262 msgid "Thai languages" msgstr "" -#: ../../library/codecs.rst:1242 +#: ../../library/codecs.rst:1264 msgid "iso8859_13" msgstr "" -#: ../../library/codecs.rst:1242 +#: ../../library/codecs.rst:1264 msgid "iso-8859-13, latin7, L7" msgstr "" -#: ../../library/codecs.rst:1244 +#: ../../library/codecs.rst:1266 msgid "iso8859_14" msgstr "" -#: ../../library/codecs.rst:1244 +#: ../../library/codecs.rst:1266 msgid "iso-8859-14, latin8, L8" msgstr "" -#: ../../library/codecs.rst:1244 +#: ../../library/codecs.rst:1266 msgid "Celtic languages" msgstr "" -#: ../../library/codecs.rst:1246 +#: ../../library/codecs.rst:1268 msgid "iso8859_15" msgstr "" -#: ../../library/codecs.rst:1246 +#: ../../library/codecs.rst:1268 msgid "iso-8859-15, latin9, L9" msgstr "" -#: ../../library/codecs.rst:1248 +#: ../../library/codecs.rst:1270 msgid "iso8859_16" msgstr "" -#: ../../library/codecs.rst:1248 +#: ../../library/codecs.rst:1270 msgid "iso-8859-16, latin10, L10" msgstr "" -#: ../../library/codecs.rst:1248 +#: ../../library/codecs.rst:1270 msgid "South-Eastern Europe" msgstr "" -#: ../../library/codecs.rst:1250 +#: ../../library/codecs.rst:1272 msgid "johab" msgstr "" -#: ../../library/codecs.rst:1250 +#: ../../library/codecs.rst:1272 msgid "cp1361, ms1361" msgstr "" -#: ../../library/codecs.rst:1252 +#: ../../library/codecs.rst:1274 msgid "koi8_r" msgstr "" -#: ../../library/codecs.rst:1254 +#: ../../library/codecs.rst:1276 msgid "koi8_t" msgstr "" -#: ../../library/codecs.rst:1254 +#: ../../library/codecs.rst:1276 msgid "Tajik" msgstr "" -#: ../../library/codecs.rst:1258 +#: ../../library/codecs.rst:1280 msgid "koi8_u" msgstr "" -#: ../../library/codecs.rst:1260 +#: ../../library/codecs.rst:1282 msgid "kz1048" msgstr "" -#: ../../library/codecs.rst:1260 +#: ../../library/codecs.rst:1282 msgid "kz_1048, strk1048_2002, rk1048" msgstr "" -#: ../../library/codecs.rst:1260 ../../library/codecs.rst:1278 +#: ../../library/codecs.rst:1282 ../../library/codecs.rst:1300 msgid "Kazakh" msgstr "" -#: ../../library/codecs.rst:1264 +#: ../../library/codecs.rst:1286 msgid "mac_cyrillic" msgstr "" -#: ../../library/codecs.rst:1264 +#: ../../library/codecs.rst:1286 msgid "maccyrillic" msgstr "" -#: ../../library/codecs.rst:1267 +#: ../../library/codecs.rst:1289 msgid "mac_greek" msgstr "" -#: ../../library/codecs.rst:1267 +#: ../../library/codecs.rst:1289 msgid "macgreek" msgstr "" -#: ../../library/codecs.rst:1269 +#: ../../library/codecs.rst:1291 msgid "mac_iceland" msgstr "" -#: ../../library/codecs.rst:1269 +#: ../../library/codecs.rst:1291 msgid "maciceland" msgstr "" -#: ../../library/codecs.rst:1271 +#: ../../library/codecs.rst:1293 msgid "mac_latin2" msgstr "" -#: ../../library/codecs.rst:1271 +#: ../../library/codecs.rst:1293 msgid "maclatin2, maccentraleurope, mac_centeuro" msgstr "" -#: ../../library/codecs.rst:1274 +#: ../../library/codecs.rst:1296 msgid "mac_roman" msgstr "" -#: ../../library/codecs.rst:1274 +#: ../../library/codecs.rst:1296 msgid "macroman, macintosh" msgstr "" -#: ../../library/codecs.rst:1276 +#: ../../library/codecs.rst:1298 msgid "mac_turkish" msgstr "" -#: ../../library/codecs.rst:1276 +#: ../../library/codecs.rst:1298 msgid "macturkish" msgstr "" -#: ../../library/codecs.rst:1278 +#: ../../library/codecs.rst:1300 msgid "ptcp154" msgstr "" -#: ../../library/codecs.rst:1278 +#: ../../library/codecs.rst:1300 msgid "csptcp154, pt154, cp154, cyrillic-asian" msgstr "" -#: ../../library/codecs.rst:1281 +#: ../../library/codecs.rst:1303 msgid "shift_jis" msgstr "" -#: ../../library/codecs.rst:1281 +#: ../../library/codecs.rst:1303 msgid "csshiftjis, shiftjis, sjis, s_jis" msgstr "" -#: ../../library/codecs.rst:1284 +#: ../../library/codecs.rst:1306 msgid "shift_jis_2004" msgstr "" -#: ../../library/codecs.rst:1284 +#: ../../library/codecs.rst:1306 msgid "shiftjis2004, sjis_2004, sjis2004" msgstr "" -#: ../../library/codecs.rst:1287 +#: ../../library/codecs.rst:1309 msgid "shift_jisx0213" msgstr "" -#: ../../library/codecs.rst:1287 +#: ../../library/codecs.rst:1309 msgid "shiftjisx0213, sjisx0213, s_jisx0213" msgstr "" -#: ../../library/codecs.rst:1290 +#: ../../library/codecs.rst:1312 msgid "utf_32" msgstr "" -#: ../../library/codecs.rst:1290 +#: ../../library/codecs.rst:1312 msgid "U32, utf32" msgstr "" -#: ../../library/codecs.rst:1290 ../../library/codecs.rst:1292 -#: ../../library/codecs.rst:1294 ../../library/codecs.rst:1296 -#: ../../library/codecs.rst:1298 ../../library/codecs.rst:1300 -#: ../../library/codecs.rst:1302 ../../library/codecs.rst:1304 -#: ../../library/codecs.rst:1306 +#: ../../library/codecs.rst:1312 ../../library/codecs.rst:1314 +#: ../../library/codecs.rst:1316 ../../library/codecs.rst:1318 +#: ../../library/codecs.rst:1320 ../../library/codecs.rst:1322 +#: ../../library/codecs.rst:1324 ../../library/codecs.rst:1326 +#: ../../library/codecs.rst:1328 msgid "all languages" msgstr "" -#: ../../library/codecs.rst:1292 +#: ../../library/codecs.rst:1314 msgid "utf_32_be" msgstr "" -#: ../../library/codecs.rst:1292 +#: ../../library/codecs.rst:1314 msgid "UTF-32BE" msgstr "" -#: ../../library/codecs.rst:1294 +#: ../../library/codecs.rst:1316 msgid "utf_32_le" msgstr "" -#: ../../library/codecs.rst:1294 +#: ../../library/codecs.rst:1316 msgid "UTF-32LE" msgstr "" -#: ../../library/codecs.rst:1296 +#: ../../library/codecs.rst:1318 msgid "utf_16" msgstr "" -#: ../../library/codecs.rst:1296 +#: ../../library/codecs.rst:1318 msgid "U16, utf16" msgstr "" -#: ../../library/codecs.rst:1298 +#: ../../library/codecs.rst:1320 msgid "utf_16_be" msgstr "" -#: ../../library/codecs.rst:1298 +#: ../../library/codecs.rst:1320 msgid "UTF-16BE" msgstr "" -#: ../../library/codecs.rst:1300 +#: ../../library/codecs.rst:1322 msgid "utf_16_le" msgstr "" -#: ../../library/codecs.rst:1300 +#: ../../library/codecs.rst:1322 msgid "UTF-16LE" msgstr "" -#: ../../library/codecs.rst:1302 +#: ../../library/codecs.rst:1324 msgid "utf_7" msgstr "" -#: ../../library/codecs.rst:1302 +#: ../../library/codecs.rst:1324 msgid "U7, unicode-1-1-utf-7" msgstr "" -#: ../../library/codecs.rst:1304 +#: ../../library/codecs.rst:1326 msgid "utf_8" msgstr "" -#: ../../library/codecs.rst:1304 +#: ../../library/codecs.rst:1326 msgid "U8, UTF, utf8, cp65001" msgstr "" -#: ../../library/codecs.rst:1306 +#: ../../library/codecs.rst:1328 msgid "utf_8_sig" msgstr "" -#: ../../library/codecs.rst:1309 +#: ../../library/codecs.rst:1331 msgid "" "The utf-16\\* and utf-32\\* encoders no longer allow surrogate code points " "(``U+D800``--``U+DFFF``) to be encoded. The utf-32\\* decoders no longer " "decode byte sequences that correspond to surrogate code points." msgstr "" -#: ../../library/codecs.rst:1315 +#: ../../library/codecs.rst:1337 msgid "``cp65001`` is now an alias to ``utf_8``." msgstr "" -#: ../../library/codecs.rst:1318 +#: ../../library/codecs.rst:1340 msgid "On Windows, ``cpXXX`` codecs are now available for all code pages." msgstr "" -#: ../../library/codecs.rst:1323 +#: ../../library/codecs.rst:1345 msgid "Python Specific Encodings" msgstr "" -#: ../../library/codecs.rst:1325 +#: ../../library/codecs.rst:1347 msgid "" "A number of predefined codecs are specific to Python, so their codec names " "have no meaning outside Python. These are listed in the tables below based " @@ -2322,268 +2349,347 @@ msgid "" "asymmetric codecs, the stated meaning describes the encoding direction." msgstr "" -#: ../../library/codecs.rst:1333 +#: ../../library/codecs.rst:1355 msgid "Text Encodings" msgstr "" -#: ../../library/codecs.rst:1335 +#: ../../library/codecs.rst:1357 msgid "" "The following codecs provide :class:`str` to :class:`bytes` encoding and :" "term:`bytes-like object` to :class:`str` decoding, similar to the Unicode " "text encodings." msgstr "" -#: ../../library/codecs.rst:1344 +#: ../../library/codecs.rst:1366 msgid "idna" msgstr "" -#: ../../library/codecs.rst:1344 +#: ../../library/codecs.rst:1366 msgid "" "Implement :rfc:`3490`, see also :mod:`encodings.idna`. Only " "``errors='strict'`` is supported." msgstr "" -#: ../../library/codecs.rst:1350 +#: ../../library/codecs.rst:1372 msgid "mbcs" msgstr "" -#: ../../library/codecs.rst:1350 +#: ../../library/codecs.rst:1372 msgid "ansi, dbcs" msgstr "" -#: ../../library/codecs.rst:1350 +#: ../../library/codecs.rst:1372 msgid "" "Windows only: Encode the operand according to the ANSI codepage (CP_ACP)." msgstr "" -#: ../../library/codecs.rst:1354 +#: ../../library/codecs.rst:1376 msgid "oem" msgstr "" -#: ../../library/codecs.rst:1354 +#: ../../library/codecs.rst:1376 msgid "" "Windows only: Encode the operand according to the OEM codepage (CP_OEMCP)." msgstr "" -#: ../../library/codecs.rst:1360 +#: ../../library/codecs.rst:1382 msgid "palmos" msgstr "" -#: ../../library/codecs.rst:1360 +#: ../../library/codecs.rst:1382 msgid "Encoding of PalmOS 3.5." msgstr "" -#: ../../library/codecs.rst:1362 +#: ../../library/codecs.rst:1384 msgid "punycode" msgstr "" -#: ../../library/codecs.rst:1362 +#: ../../library/codecs.rst:1384 msgid "Implement :rfc:`3492`. Stateful codecs are not supported." msgstr "" -#: ../../library/codecs.rst:1366 +#: ../../library/codecs.rst:1388 msgid "raw_unicode_escape" msgstr "" -#: ../../library/codecs.rst:1366 +#: ../../library/codecs.rst:1388 msgid "" "Latin-1 encoding with :samp:`\\\\u{XXXX}` and :samp:`\\\\U{XXXXXXXX}` for " "other code points. Existing backslashes are not escaped in any way. It is " "used in the Python pickle protocol." msgstr "" -#: ../../library/codecs.rst:1376 +#: ../../library/codecs.rst:1398 msgid "undefined" msgstr "" -#: ../../library/codecs.rst:1376 +#: ../../library/codecs.rst:1398 +msgid "This Codec should only be used for testing purposes." +msgstr "" + +#: ../../library/codecs.rst:1402 msgid "" "Raise an exception for all conversions, even empty strings. The error " "handler is ignored." msgstr "" -#: ../../library/codecs.rst:1381 +#: ../../library/codecs.rst:1407 msgid "unicode_escape" msgstr "" -#: ../../library/codecs.rst:1381 +#: ../../library/codecs.rst:1407 msgid "" "Encoding suitable as the contents of a Unicode literal in ASCII-encoded " "Python source code, except that quotes are not escaped. Decode from Latin-1 " "source code. Beware that Python source code actually uses UTF-8 by default." msgstr "" -#: ../../library/codecs.rst:1393 +#: ../../library/codecs.rst:1419 msgid "\"unicode_internal\" codec is removed." msgstr "" -#: ../../library/codecs.rst:1400 +#: ../../library/codecs.rst:1426 msgid "Binary Transforms" msgstr "" -#: ../../library/codecs.rst:1402 +#: ../../library/codecs.rst:1428 msgid "" "The following codecs provide binary transforms: :term:`bytes-like object` " "to :class:`bytes` mappings. They are not supported by :meth:`bytes.decode` " "(which only produces :class:`str` output)." msgstr "" -#: ../../library/codecs.rst:1410 +#: ../../library/codecs.rst:1436 msgid "Encoder / decoder" msgstr "" -#: ../../library/codecs.rst:1412 +#: ../../library/codecs.rst:1438 msgid "base64_codec [#b64]_" msgstr "" -#: ../../library/codecs.rst:1412 +#: ../../library/codecs.rst:1438 msgid "base64, base_64" msgstr "" -#: ../../library/codecs.rst:1412 +#: ../../library/codecs.rst:1438 msgid "" "Convert the operand to multiline MIME base64 (the result always includes a " "trailing ``'\\n'``)." msgstr "" -#: ../../library/codecs.rst:1417 +#: ../../library/codecs.rst:1443 msgid "" "accepts any :term:`bytes-like object` as input for encoding and decoding" msgstr "" -#: ../../library/codecs.rst:1412 +#: ../../library/codecs.rst:1438 msgid ":meth:`base64.encodebytes` / :meth:`base64.decodebytes`" msgstr "" -#: ../../library/codecs.rst:1423 +#: ../../library/codecs.rst:1449 msgid "bz2_codec" msgstr "" -#: ../../library/codecs.rst:1423 +#: ../../library/codecs.rst:1449 msgid "bz2" msgstr "" -#: ../../library/codecs.rst:1423 +#: ../../library/codecs.rst:1449 msgid "Compress the operand using bz2." msgstr "" -#: ../../library/codecs.rst:1423 +#: ../../library/codecs.rst:1449 msgid ":meth:`bz2.compress` / :meth:`bz2.decompress`" msgstr "" -#: ../../library/codecs.rst:1426 +#: ../../library/codecs.rst:1452 msgid "hex_codec" msgstr "" -#: ../../library/codecs.rst:1426 +#: ../../library/codecs.rst:1452 msgid "hex" msgstr "" -#: ../../library/codecs.rst:1426 +#: ../../library/codecs.rst:1452 msgid "" "Convert the operand to hexadecimal representation, with two digits per byte." msgstr "" -#: ../../library/codecs.rst:1426 +#: ../../library/codecs.rst:1452 msgid ":meth:`binascii.b2a_hex` / :meth:`binascii.a2b_hex`" msgstr "" -#: ../../library/codecs.rst:1431 +#: ../../library/codecs.rst:1457 msgid "quopri_codec" msgstr "" -#: ../../library/codecs.rst:1431 +#: ../../library/codecs.rst:1457 msgid "quopri, quotedprintable, quoted_printable" msgstr "" -#: ../../library/codecs.rst:1431 +#: ../../library/codecs.rst:1457 msgid "Convert the operand to MIME quoted printable." msgstr "" -#: ../../library/codecs.rst:1431 +#: ../../library/codecs.rst:1457 msgid ":meth:`quopri.encode` with ``quotetabs=True`` / :meth:`quopri.decode`" msgstr "" -#: ../../library/codecs.rst:1435 +#: ../../library/codecs.rst:1461 msgid "uu_codec" msgstr "" -#: ../../library/codecs.rst:1435 +#: ../../library/codecs.rst:1461 msgid "uu" msgstr "" -#: ../../library/codecs.rst:1435 +#: ../../library/codecs.rst:1461 msgid "Convert the operand using uuencode." msgstr "" -#: ../../library/codecs.rst:1438 +#: ../../library/codecs.rst:1464 msgid "zlib_codec" msgstr "" -#: ../../library/codecs.rst:1438 +#: ../../library/codecs.rst:1464 msgid "zip, zlib" msgstr "" -#: ../../library/codecs.rst:1438 +#: ../../library/codecs.rst:1464 msgid "Compress the operand using gzip." msgstr "" -#: ../../library/codecs.rst:1438 +#: ../../library/codecs.rst:1464 msgid ":meth:`zlib.compress` / :meth:`zlib.decompress`" msgstr "" -#: ../../library/codecs.rst:1442 +#: ../../library/codecs.rst:1468 msgid "" "In addition to :term:`bytes-like objects `, " "``'base64_codec'`` also accepts ASCII-only instances of :class:`str` for " "decoding" msgstr "" -#: ../../library/codecs.rst:1446 +#: ../../library/codecs.rst:1472 msgid "Restoration of the binary transforms." msgstr "" -#: ../../library/codecs.rst:1449 +#: ../../library/codecs.rst:1475 msgid "Restoration of the aliases for the binary transforms." msgstr "" -#: ../../library/codecs.rst:1456 +#: ../../library/codecs.rst:1482 msgid "Text Transforms" msgstr "" -#: ../../library/codecs.rst:1458 +#: ../../library/codecs.rst:1484 msgid "" "The following codec provides a text transform: a :class:`str` to :class:" "`str` mapping. It is not supported by :meth:`str.encode` (which only " "produces :class:`bytes` output)." msgstr "" -#: ../../library/codecs.rst:1467 +#: ../../library/codecs.rst:1493 msgid "rot_13" msgstr "" -#: ../../library/codecs.rst:1467 +#: ../../library/codecs.rst:1493 msgid "rot13" msgstr "" -#: ../../library/codecs.rst:1467 +#: ../../library/codecs.rst:1493 msgid "Return the Caesar-cypher encryption of the operand." msgstr "" -#: ../../library/codecs.rst:1472 +#: ../../library/codecs.rst:1498 msgid "Restoration of the ``rot_13`` text transform." msgstr "" -#: ../../library/codecs.rst:1475 +#: ../../library/codecs.rst:1501 msgid "Restoration of the ``rot13`` alias." msgstr "" -#: ../../library/codecs.rst:1480 +#: ../../library/codecs.rst:1506 +msgid ":mod:`encodings` --- Encodings package" +msgstr "" + +#: ../../library/codecs.rst:1511 +msgid "This module implements the following functions:" +msgstr "" + +#: ../../library/codecs.rst:1515 +msgid "Normalize encoding name *encoding*." +msgstr "" + +#: ../../library/codecs.rst:1517 +msgid "" +"Normalization works as follows: all non-alphanumeric characters except the " +"dot used for Python package names are collapsed and replaced with a single " +"underscore, leading and trailing underscores are removed. For example, ``' " +"-;#'`` becomes ``'_'``." +msgstr "" + +#: ../../library/codecs.rst:1522 +msgid "Note that *encoding* should be ASCII only." +msgstr "" + +#: ../../library/codecs.rst:1526 +msgid "" +"The following functions should not be used directly, except for testing " +"purposes; :func:`codecs.lookup` should be used instead." +msgstr "" + +#: ../../library/codecs.rst:1532 +msgid "" +"Search for the codec module corresponding to the given encoding name " +"*encoding*." +msgstr "" + +#: ../../library/codecs.rst:1535 +msgid "" +"This function first normalizes the *encoding* using :func:" +"`normalize_encoding`, then looks for a corresponding alias. It attempts to " +"import a codec module from the encodings package using either the alias or " +"the normalized name. If the module is found and defines a valid " +"``getregentry()`` function that returns a :class:`codecs.CodecInfo` object, " +"the codec is cached and returned." +msgstr "" + +#: ../../library/codecs.rst:1542 +msgid "" +"If the codec module defines a ``getaliases()`` function any returned aliases " +"are registered for future use." +msgstr "" + +#: ../../library/codecs.rst:1548 +msgid "" +"Search for a Windows code page encoding *encoding* of the form ``cpXXXX``." +msgstr "" + +#: ../../library/codecs.rst:1550 +msgid "" +"If the code page is valid and supported, return a :class:`codecs.CodecInfo` " +"object for it." +msgstr "" + +#: ../../library/codecs.rst:1553 ../../library/codecs.rst:1639 +msgid "Availability" +msgstr "" + +#: ../../library/codecs.rst:1558 +msgid "This module implements the following exception:" +msgstr "" + +#: ../../library/codecs.rst:1562 +msgid "Raised when a codec is invalid or incompatible." +msgstr "" + +#: ../../library/codecs.rst:1566 msgid "" ":mod:`encodings.idna` --- Internationalized Domain Names in Applications" msgstr "" -#: ../../library/codecs.rst:1486 +#: ../../library/codecs.rst:1572 msgid "" "This module implements :rfc:`3490` (Internationalized Domain Names in " "Applications) and :rfc:`3492` (Nameprep: A Stringprep Profile for " @@ -2591,13 +2697,13 @@ msgid "" "encoding and :mod:`stringprep`." msgstr "" -#: ../../library/codecs.rst:1491 +#: ../../library/codecs.rst:1577 msgid "" "If you need the IDNA 2008 standard from :rfc:`5891` and :rfc:`5895`, use the " "third-party :pypi:`idna` module." msgstr "" -#: ../../library/codecs.rst:1494 +#: ../../library/codecs.rst:1580 msgid "" "These RFCs together define a protocol to support non-ASCII characters in " "domain names. A domain name containing non-ASCII characters (such as ``www." @@ -2611,7 +2717,7 @@ msgid "" "presenting them to the user." msgstr "" -#: ../../library/codecs.rst:1505 +#: ../../library/codecs.rst:1591 msgid "" "Python supports this conversion in several ways: the ``idna`` codec " "performs conversion between Unicode and ACE, separating an input string into " @@ -2628,14 +2734,14 @@ msgid "" "sends that field at all)." msgstr "" -#: ../../library/codecs.rst:1518 +#: ../../library/codecs.rst:1604 msgid "" "When receiving host names from the wire (such as in reverse name lookup), no " "automatic conversion to Unicode is performed: applications wishing to " "present such host names to the user should decode them to Unicode." msgstr "" -#: ../../library/codecs.rst:1522 +#: ../../library/codecs.rst:1608 msgid "" "The module :mod:`encodings.idna` also implements the nameprep procedure, " "which performs certain normalizations on host names, to achieve case-" @@ -2643,49 +2749,45 @@ msgid "" "characters. The nameprep functions can be used directly if desired." msgstr "" -#: ../../library/codecs.rst:1530 +#: ../../library/codecs.rst:1616 msgid "" "Return the nameprepped version of *label*. The implementation currently " "assumes query strings, so ``AllowUnassigned`` is true." msgstr "" -#: ../../library/codecs.rst:1536 +#: ../../library/codecs.rst:1622 msgid "" "Convert a label to ASCII, as specified in :rfc:`3490`. ``UseSTD3ASCIIRules`` " "is assumed to be false." msgstr "" -#: ../../library/codecs.rst:1542 +#: ../../library/codecs.rst:1628 msgid "Convert a label to Unicode, as specified in :rfc:`3490`." msgstr "" -#: ../../library/codecs.rst:1546 +#: ../../library/codecs.rst:1632 msgid ":mod:`encodings.mbcs` --- Windows ANSI codepage" msgstr "" -#: ../../library/codecs.rst:1551 +#: ../../library/codecs.rst:1637 msgid "This module implements the ANSI codepage (CP_ACP)." msgstr "" -#: ../../library/codecs.rst:1553 -msgid "Availability" -msgstr "" - -#: ../../library/codecs.rst:1555 +#: ../../library/codecs.rst:1641 msgid "" "Before 3.2, the *errors* argument was ignored; ``'replace'`` was always used " "to encode, and ``'ignore'`` to decode." msgstr "" -#: ../../library/codecs.rst:1559 +#: ../../library/codecs.rst:1645 msgid "Support any error handler." msgstr "" -#: ../../library/codecs.rst:1564 +#: ../../library/codecs.rst:1650 msgid ":mod:`encodings.utf_8_sig` --- UTF-8 codec with BOM signature" msgstr "" -#: ../../library/codecs.rst:1570 +#: ../../library/codecs.rst:1656 msgid "" "This module implements a variant of the UTF-8 codec. On encoding, a UTF-8 " "encoded BOM will be prepended to the UTF-8 encoded bytes. For the stateful " @@ -2714,67 +2816,67 @@ msgstr "" msgid "stackable" msgstr "" -#: ../../library/codecs.rst:316 +#: ../../library/codecs.rst:338 msgid "strict" msgstr "" -#: ../../library/codecs.rst:316 ../../library/codecs.rst:368 -#: ../../library/codecs.rst:391 +#: ../../library/codecs.rst:338 ../../library/codecs.rst:390 +#: ../../library/codecs.rst:413 msgid "error handler's name" msgstr "" -#: ../../library/codecs.rst:316 +#: ../../library/codecs.rst:338 msgid "ignore" msgstr "" -#: ../../library/codecs.rst:316 +#: ../../library/codecs.rst:338 msgid "replace" msgstr "" -#: ../../library/codecs.rst:316 +#: ../../library/codecs.rst:338 msgid "backslashreplace" msgstr "" -#: ../../library/codecs.rst:316 +#: ../../library/codecs.rst:338 msgid "surrogateescape" msgstr "" -#: ../../library/codecs.rst:316 +#: ../../library/codecs.rst:338 msgid "? (question mark)" msgstr "" -#: ../../library/codecs.rst:316 +#: ../../library/codecs.rst:338 msgid "replacement character" msgstr "" -#: ../../library/codecs.rst:316 +#: ../../library/codecs.rst:338 msgid "\\ (backslash)" msgstr "" -#: ../../library/codecs.rst:316 ../../library/codecs.rst:368 +#: ../../library/codecs.rst:338 ../../library/codecs.rst:390 msgid "escape sequence" msgstr "" -#: ../../library/codecs.rst:316 +#: ../../library/codecs.rst:338 msgid "\\x" msgstr "" -#: ../../library/codecs.rst:316 +#: ../../library/codecs.rst:338 msgid "\\u" msgstr "" -#: ../../library/codecs.rst:316 +#: ../../library/codecs.rst:338 msgid "\\U" msgstr "" -#: ../../library/codecs.rst:368 +#: ../../library/codecs.rst:390 msgid "xmlcharrefreplace" msgstr "" -#: ../../library/codecs.rst:368 +#: ../../library/codecs.rst:390 msgid "namereplace" msgstr "" -#: ../../library/codecs.rst:391 +#: ../../library/codecs.rst:413 msgid "surrogatepass" msgstr "" diff --git a/library/codeop.po b/library/codeop.po index 8baac6135..64ba2e2b9 100644 --- a/library/codeop.po +++ b/library/codeop.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:56+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/collections.abc.po b/library/collections.abc.po index ad0fc3b3a..26e6a4f6e 100644 --- a/library/collections.abc.po +++ b/library/collections.abc.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:56+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/collections.po b/library/collections.po index 0d9e861ec..8374c3b6f 100644 --- a/library/collections.po +++ b/library/collections.po @@ -1,19 +1,20 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2025, Python Software Foundation +# Copyright (C) 2001 Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Python 3.13\n" +"Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-02 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:56+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/colorsys.po b/library/colorsys.po index 67169dc19..050c3dfe2 100644 --- a/library/colorsys.po +++ b/library/colorsys.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:57+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/compileall.po b/library/compileall.po index 831aed9ca..85b0ab036 100644 --- a/library/compileall.po +++ b/library/compileall.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:57+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -87,26 +91,40 @@ msgid "" "executed." msgstr "" -#: ../../library/compileall.rst:61 +#: ../../library/compileall.rst:60 msgid "" -"Remove (``-s``) or append (``-p``) the given prefix of paths recorded in the " -"``.pyc`` files. Cannot be combined with ``-d``." +"Remove the given prefix from paths recorded in the ``.pyc`` files. Paths are " +"made relative to the prefix." +msgstr "" + +#: ../../library/compileall.rst:63 +msgid "This option can be used with ``-p`` but not with ``-d``." msgstr "" #: ../../library/compileall.rst:67 msgid "" +"Prepend the given prefix to paths recorded in the ``.pyc`` files. Use ``-p /" +"`` to make the paths absolute." +msgstr "" + +#: ../../library/compileall.rst:70 +msgid "This option can be used with ``-s`` but not with ``-d``." +msgstr "" + +#: ../../library/compileall.rst:74 +msgid "" "regex is used to search the full path to each file considered for " "compilation, and if the regex produces a match, the file is skipped." msgstr "" -#: ../../library/compileall.rst:72 +#: ../../library/compileall.rst:79 msgid "" "Read the file ``list`` and add each line that it contains to the list of " "files and directories to compile. If ``list`` is ``-``, read lines from " "``stdin``." msgstr "" -#: ../../library/compileall.rst:78 +#: ../../library/compileall.rst:85 msgid "" "Write the byte-code files to their legacy locations and names, which may " "overwrite byte-code files created by another version of Python. The default " @@ -114,7 +132,7 @@ msgid "" "byte-code files from multiple versions of Python to coexist." msgstr "" -#: ../../library/compileall.rst:85 +#: ../../library/compileall.rst:92 msgid "" "Control the maximum recursion level for subdirectories. If this is given, " "then ``-l`` option will not be taken into account. :program:`python -m " @@ -122,13 +140,13 @@ msgid "" " -l`." msgstr "" -#: ../../library/compileall.rst:92 +#: ../../library/compileall.rst:99 msgid "" "Use *N* workers to compile the files within the given directory. If ``0`` is " "used, then the result of :func:`os.process_cpu_count` will be used." msgstr "" -#: ../../library/compileall.rst:98 +#: ../../library/compileall.rst:105 msgid "" "Control how the generated byte-code files are invalidated at runtime. The " "``timestamp`` value, means that ``.pyc`` files with the source timestamp and " @@ -141,53 +159,53 @@ msgid "" "the ``SOURCE_DATE_EPOCH`` environment variable is set." msgstr "" -#: ../../library/compileall.rst:111 +#: ../../library/compileall.rst:118 msgid "" "Compile with the given optimization level. May be used multiple times to " "compile for multiple levels at a time (for example, ``compileall -o 1 -o " "2``)." msgstr "" -#: ../../library/compileall.rst:117 +#: ../../library/compileall.rst:124 msgid "Ignore symlinks pointing outside the given directory." msgstr "" -#: ../../library/compileall.rst:121 +#: ../../library/compileall.rst:128 msgid "" "If two ``.pyc`` files with different optimization level have the same " "content, use hard links to consolidate duplicate files." msgstr "" -#: ../../library/compileall.rst:124 +#: ../../library/compileall.rst:131 msgid "Added the ``-i``, ``-b`` and ``-h`` options." msgstr "" -#: ../../library/compileall.rst:127 +#: ../../library/compileall.rst:134 msgid "" "Added the ``-j``, ``-r``, and ``-qq`` options. ``-q`` option was changed " "to a multilevel value. ``-b`` will always produce a byte-code file ending " "in ``.pyc``, never ``.pyo``." msgstr "" -#: ../../library/compileall.rst:132 +#: ../../library/compileall.rst:139 msgid "Added the ``--invalidation-mode`` option." msgstr "" -#: ../../library/compileall.rst:135 +#: ../../library/compileall.rst:142 msgid "" "Added the ``-s``, ``-p``, ``-e`` and ``--hardlink-dupes`` options. Raised " "the default recursion limit from 10 to :py:func:`sys.getrecursionlimit()`. " "Added the possibility to specify the ``-o`` option multiple times." msgstr "" -#: ../../library/compileall.rst:142 +#: ../../library/compileall.rst:149 msgid "" "There is no command-line option to control the optimization level used by " "the :func:`compile` function, because the Python interpreter itself already " "provides the option: :program:`python -O -m compileall`." msgstr "" -#: ../../library/compileall.rst:146 +#: ../../library/compileall.rst:153 msgid "" "Similarly, the :func:`compile` function respects the :data:`sys." "pycache_prefix` setting. The generated bytecode cache will only be useful " @@ -195,24 +213,24 @@ msgid "" "that will be used at runtime." msgstr "" -#: ../../library/compileall.rst:152 +#: ../../library/compileall.rst:159 msgid "Public functions" msgstr "" -#: ../../library/compileall.rst:156 +#: ../../library/compileall.rst:163 msgid "" "Recursively descend the directory tree named by *dir*, compiling all :file:`." "py` files along the way. Return a true value if all the files compiled " "successfully, and a false value otherwise." msgstr "" -#: ../../library/compileall.rst:160 +#: ../../library/compileall.rst:167 msgid "" "The *maxlevels* parameter is used to limit the depth of the recursion; it " "defaults to ``sys.getrecursionlimit()``." msgstr "" -#: ../../library/compileall.rst:163 +#: ../../library/compileall.rst:170 msgid "" "If *ddir* is given, it is prepended to the path to each file being compiled " "for use in compilation time tracebacks, and is also compiled in to the byte-" @@ -221,13 +239,13 @@ msgid "" "executed." msgstr "" -#: ../../library/compileall.rst:169 +#: ../../library/compileall.rst:176 msgid "" "If *force* is true, modules are re-compiled even if the timestamps are up to " "date." msgstr "" -#: ../../library/compileall.rst:172 +#: ../../library/compileall.rst:179 msgid "" "If *rx* is given, its ``search`` method is called on the complete path to " "each file considered for compilation, and if it returns a true value, the " @@ -235,14 +253,14 @@ msgid "" "expression, given as a :ref:`re.Pattern ` object." msgstr "" -#: ../../library/compileall.rst:177 ../../library/compileall.rst:254 +#: ../../library/compileall.rst:184 ../../library/compileall.rst:261 msgid "" "If *quiet* is ``False`` or ``0`` (the default), the filenames and other " "information are printed to standard out. Set to ``1``, only errors are " "printed. Set to ``2``, all output is suppressed." msgstr "" -#: ../../library/compileall.rst:181 ../../library/compileall.rst:258 +#: ../../library/compileall.rst:188 ../../library/compileall.rst:265 msgid "" "If *legacy* is true, byte-code files are written to their legacy locations " "and names, which may overwrite byte-code files created by another version of " @@ -251,7 +269,7 @@ msgid "" "coexist." msgstr "" -#: ../../library/compileall.rst:187 ../../library/compileall.rst:264 +#: ../../library/compileall.rst:194 ../../library/compileall.rst:271 msgid "" "*optimize* specifies the optimization level for the compiler. It is passed " "to the built-in :func:`compile` function. Accepts also a sequence of " @@ -259,7 +277,7 @@ msgid "" "file in one call." msgstr "" -#: ../../library/compileall.rst:191 +#: ../../library/compileall.rst:198 msgid "" "The argument *workers* specifies how many workers are used to compile files " "in parallel. The default is to not use multiple workers. If the platform " @@ -269,80 +287,80 @@ msgid "" "`ValueError` will be raised." msgstr "" -#: ../../library/compileall.rst:198 ../../library/compileall.rst:268 +#: ../../library/compileall.rst:205 ../../library/compileall.rst:275 msgid "" "*invalidation_mode* should be a member of the :class:`py_compile." "PycInvalidationMode` enum and controls how the generated pycs are " "invalidated at runtime." msgstr "" -#: ../../library/compileall.rst:202 ../../library/compileall.rst:272 +#: ../../library/compileall.rst:209 ../../library/compileall.rst:279 msgid "" "The *stripdir*, *prependdir* and *limit_sl_dest* arguments correspond to the " "``-s``, ``-p`` and ``-e`` options described above. They may be specified as " "``str`` or :py:class:`os.PathLike`." msgstr "" -#: ../../library/compileall.rst:206 ../../library/compileall.rst:276 +#: ../../library/compileall.rst:213 ../../library/compileall.rst:283 msgid "" "If *hardlink_dupes* is true and two ``.pyc`` files with different " "optimization level have the same content, use hard links to consolidate " "duplicate files." msgstr "" -#: ../../library/compileall.rst:209 ../../library/compileall.rst:307 +#: ../../library/compileall.rst:216 ../../library/compileall.rst:314 msgid "Added the *legacy* and *optimize* parameter." msgstr "" -#: ../../library/compileall.rst:212 +#: ../../library/compileall.rst:219 msgid "Added the *workers* parameter." msgstr "" -#: ../../library/compileall.rst:215 ../../library/compileall.rst:281 -#: ../../library/compileall.rst:310 +#: ../../library/compileall.rst:222 ../../library/compileall.rst:288 +#: ../../library/compileall.rst:317 msgid "*quiet* parameter was changed to a multilevel value." msgstr "" -#: ../../library/compileall.rst:218 ../../library/compileall.rst:284 -#: ../../library/compileall.rst:313 +#: ../../library/compileall.rst:225 ../../library/compileall.rst:291 +#: ../../library/compileall.rst:320 msgid "" "The *legacy* parameter only writes out ``.pyc`` files, not ``.pyo`` files no " "matter what the value of *optimize* is." msgstr "" -#: ../../library/compileall.rst:222 +#: ../../library/compileall.rst:229 msgid "Accepts a :term:`path-like object`." msgstr "" -#: ../../library/compileall.rst:225 ../../library/compileall.rst:288 -#: ../../library/compileall.rst:317 +#: ../../library/compileall.rst:232 ../../library/compileall.rst:295 +#: ../../library/compileall.rst:324 msgid "The *invalidation_mode* parameter was added." msgstr "" -#: ../../library/compileall.rst:228 ../../library/compileall.rst:291 -#: ../../library/compileall.rst:320 +#: ../../library/compileall.rst:235 ../../library/compileall.rst:298 +#: ../../library/compileall.rst:327 msgid "" "The *invalidation_mode* parameter's default value is updated to ``None``." msgstr "" -#: ../../library/compileall.rst:231 +#: ../../library/compileall.rst:238 msgid "Setting *workers* to 0 now chooses the optimal number of cores." msgstr "" -#: ../../library/compileall.rst:234 +#: ../../library/compileall.rst:241 msgid "" "Added *stripdir*, *prependdir*, *limit_sl_dest* and *hardlink_dupes* " "arguments. Default value of *maxlevels* was changed from ``10`` to ``sys." "getrecursionlimit()``" msgstr "" -#: ../../library/compileall.rst:240 +#: ../../library/compileall.rst:247 msgid "" "Compile the file with path *fullname*. Return a true value if the file " "compiled successfully, and a false value otherwise." msgstr "" -#: ../../library/compileall.rst:243 +#: ../../library/compileall.rst:250 msgid "" "If *ddir* is given, it is prepended to the path to the file being compiled " "for use in compilation time tracebacks, and is also compiled in to the byte-" @@ -351,7 +369,7 @@ msgid "" "executed." msgstr "" -#: ../../library/compileall.rst:249 +#: ../../library/compileall.rst:256 msgid "" "If *rx* is given, its ``search`` method is passed the full path name to the " "file being compiled, and if it returns a true value, the file is not " @@ -360,20 +378,20 @@ msgid "" "object." msgstr "" -#: ../../library/compileall.rst:294 +#: ../../library/compileall.rst:301 msgid "" "Added *stripdir*, *prependdir*, *limit_sl_dest* and *hardlink_dupes* " "arguments." msgstr "" -#: ../../library/compileall.rst:299 +#: ../../library/compileall.rst:306 msgid "" "Byte-compile all the :file:`.py` files found along ``sys.path``. Return a " "true value if all the files compiled successfully, and a false value " "otherwise." msgstr "" -#: ../../library/compileall.rst:302 +#: ../../library/compileall.rst:309 msgid "" "If *skip_curdir* is true (the default), the current directory is not " "included in the search. All other parameters are passed to the :func:" @@ -381,13 +399,13 @@ msgid "" "``maxlevels`` defaults to ``0``." msgstr "" -#: ../../library/compileall.rst:323 +#: ../../library/compileall.rst:330 msgid "" "To force a recompile of all the :file:`.py` files in the :file:`Lib/` " "subdirectory and all its subdirectories::" msgstr "" -#: ../../library/compileall.rst:326 +#: ../../library/compileall.rst:333 msgid "" "import compileall\n" "\n" @@ -402,10 +420,10 @@ msgid "" "compileall.compile_dir(pathlib.Path('Lib/'), force=True)" msgstr "" -#: ../../library/compileall.rst:340 +#: ../../library/compileall.rst:347 msgid "Module :mod:`py_compile`" msgstr "" -#: ../../library/compileall.rst:341 +#: ../../library/compileall.rst:348 msgid "Byte-compile a single source file." msgstr "" diff --git a/library/concurrency.po b/library/concurrency.po index 71cdf247e..ec5d8548d 100644 --- a/library/concurrency.po +++ b/library/concurrency.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-06-27 14:20+0000\n" "PO-Revision-Date: 2021-06-28 00:57+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" @@ -31,6 +31,6 @@ msgid "" "an overview:" msgstr "" -#: ../../library/concurrency.rst:27 +#: ../../library/concurrency.rst:28 msgid "The following are support modules for some of the above services:" msgstr "" diff --git a/library/concurrent.futures.po b/library/concurrent.futures.po index 6c9513f86..053689764 100644 --- a/library/concurrent.futures.po +++ b/library/concurrent.futures.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:57+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -280,7 +281,7 @@ msgid "" msgstr "" #: ../../library/concurrent.futures.rst:188 -#: ../../library/concurrent.futures.rst:401 +#: ../../library/concurrent.futures.rst:386 msgid "Added the *initializer* and *initargs* arguments." msgstr "" @@ -379,7 +380,7 @@ msgid "" "Each worker's interpreter is isolated from all the other interpreters. " "\"Isolated\" means each interpreter has its own runtime state and operates " "completely independently. For example, if you redirect :data:`sys.stdout` " -"in one interpreter, it will not be automatically redirected any other " +"in one interpreter, it will not be automatically redirected to any other " "interpreter. If you import a module in one interpreter, it is not " "automatically imported in any other. You would need to import the module " "separately in interpreter where you need it. In fact, each module imported " @@ -427,32 +428,16 @@ msgid "" msgstr "" #: ../../library/concurrent.futures.rst:308 -#: ../../library/concurrent.futures.rst:330 -msgid "" -"Functions defined in the ``__main__`` module cannot be pickled and thus " -"cannot be used." -msgstr "" - -#: ../../library/concurrent.futures.rst:312 msgid "" "The executor may replace uncaught exceptions from *initializer* with :class:" "`~concurrent.futures.interpreter.ExecutionFailed`." msgstr "" -#: ../../library/concurrent.futures.rst:315 -msgid "" -"The optional *shared* argument is a :class:`dict` of objects that all " -"interpreters in the pool share. The *shared* items are added to each " -"interpreter's ``__main__`` module. Not all objects are shareable. Shareable " -"objects include the builtin singletons, :class:`str` and :class:`bytes`, " -"and :class:`memoryview`. See :pep:`734` for more info." -msgstr "" - -#: ../../library/concurrent.futures.rst:322 +#: ../../library/concurrent.futures.rst:311 msgid "Other caveats from parent :class:`ThreadPoolExecutor` apply here." msgstr "" -#: ../../library/concurrent.futures.rst:324 +#: ../../library/concurrent.futures.rst:313 msgid "" ":meth:`~Executor.submit` and :meth:`~Executor.map` work like normal, except " "the worker serializes the callable and arguments using :mod:`pickle` when " @@ -460,7 +445,7 @@ msgid "" "value when sending it back." msgstr "" -#: ../../library/concurrent.futures.rst:333 +#: ../../library/concurrent.futures.rst:318 msgid "" "When a worker's current task raises an uncaught exception, the worker always " "tries to preserve the exception as-is. If that is successful then it also " @@ -471,11 +456,11 @@ msgid "" "class:`~concurrent.futures.interpreter.ExecutionFailed` instance instead." msgstr "" -#: ../../library/concurrent.futures.rst:345 +#: ../../library/concurrent.futures.rst:330 msgid "ProcessPoolExecutor" msgstr "" -#: ../../library/concurrent.futures.rst:347 +#: ../../library/concurrent.futures.rst:332 msgid "" "The :class:`ProcessPoolExecutor` class is an :class:`Executor` subclass that " "uses a pool of processes to execute calls asynchronously. :class:" @@ -485,20 +470,20 @@ msgid "" "returned." msgstr "" -#: ../../library/concurrent.futures.rst:354 +#: ../../library/concurrent.futures.rst:339 msgid "" "The ``__main__`` module must be importable by worker subprocesses. This " "means that :class:`ProcessPoolExecutor` will not work in the interactive " "interpreter." msgstr "" -#: ../../library/concurrent.futures.rst:357 +#: ../../library/concurrent.futures.rst:342 msgid "" "Calling :class:`Executor` or :class:`Future` methods from a callable " "submitted to a :class:`ProcessPoolExecutor` will result in deadlock." msgstr "" -#: ../../library/concurrent.futures.rst:362 +#: ../../library/concurrent.futures.rst:347 msgid "" "An :class:`Executor` subclass that executes calls asynchronously using a " "pool of at most *max_workers* processes. If *max_workers* is ``None`` or " @@ -513,7 +498,7 @@ msgid "" "`multiprocessing-start-methods`." msgstr "" -#: ../../library/concurrent.futures.rst:376 +#: ../../library/concurrent.futures.rst:361 msgid "" "*initializer* is an optional callable that is called at the start of each " "worker process; *initargs* is a tuple of arguments passed to the " @@ -522,7 +507,7 @@ msgid "" "well as any attempt to submit more jobs to the pool." msgstr "" -#: ../../library/concurrent.futures.rst:382 +#: ../../library/concurrent.futures.rst:367 msgid "" "*max_tasks_per_child* is an optional argument that specifies the maximum " "number of tasks a single process can execute before it will exit and be " @@ -533,7 +518,7 @@ msgid "" "with the \"fork\" start method." msgstr "" -#: ../../library/concurrent.futures.rst:390 +#: ../../library/concurrent.futures.rst:375 msgid "" "When one of the worker processes terminates abruptly, a :exc:`~concurrent." "futures.process.BrokenProcessPool` error is now raised. Previously, " @@ -541,19 +526,19 @@ msgid "" "often freeze or deadlock." msgstr "" -#: ../../library/concurrent.futures.rst:397 +#: ../../library/concurrent.futures.rst:382 msgid "" "The *mp_context* argument was added to allow users to control the " "start_method for worker processes created by the pool." msgstr "" -#: ../../library/concurrent.futures.rst:403 +#: ../../library/concurrent.futures.rst:388 msgid "" "The *max_tasks_per_child* argument was added to allow users to control the " "lifetime of workers in the pool." msgstr "" -#: ../../library/concurrent.futures.rst:407 +#: ../../library/concurrent.futures.rst:392 msgid "" "On POSIX systems, if your application has multiple threads and the :mod:" "`multiprocessing` context uses the ``\"fork\"`` start method: The :func:`os." @@ -562,13 +547,13 @@ msgid "" "start method. See the :func:`os.fork` documentation for further explanation." msgstr "" -#: ../../library/concurrent.futures.rst:415 +#: ../../library/concurrent.futures.rst:400 msgid "" "*max_workers* uses :func:`os.process_cpu_count` by default, instead of :func:" "`os.cpu_count`." msgstr "" -#: ../../library/concurrent.futures.rst:419 +#: ../../library/concurrent.futures.rst:404 msgid "" "The default process start method (see :ref:`multiprocessing-start-methods`) " "changed away from *fork*. If you require the *fork* start method for :class:" @@ -576,7 +561,7 @@ msgid "" "get_context(\"fork\")``." msgstr "" -#: ../../library/concurrent.futures.rst:427 +#: ../../library/concurrent.futures.rst:412 msgid "" "Attempt to terminate all living worker processes immediately by calling :" "meth:`Process.terminate ` on each of " @@ -584,14 +569,14 @@ msgid "" "all other resources associated with the executor are freed." msgstr "" -#: ../../library/concurrent.futures.rst:432 -#: ../../library/concurrent.futures.rst:444 +#: ../../library/concurrent.futures.rst:417 +#: ../../library/concurrent.futures.rst:429 msgid "" "After calling this method the caller should no longer submit tasks to the " "executor." msgstr "" -#: ../../library/concurrent.futures.rst:439 +#: ../../library/concurrent.futures.rst:424 msgid "" "Attempt to kill all living worker processes immediately by calling :meth:" "`Process.kill ` on each of them. Internally, " @@ -599,11 +584,11 @@ msgid "" "resources associated with the executor are freed." msgstr "" -#: ../../library/concurrent.futures.rst:452 +#: ../../library/concurrent.futures.rst:437 msgid "ProcessPoolExecutor Example" msgstr "" -#: ../../library/concurrent.futures.rst:455 +#: ../../library/concurrent.futures.rst:440 msgid "" "import concurrent.futures\n" "import math\n" @@ -639,24 +624,24 @@ msgid "" " main()" msgstr "" -#: ../../library/concurrent.futures.rst:490 +#: ../../library/concurrent.futures.rst:475 msgid "Future Objects" msgstr "" -#: ../../library/concurrent.futures.rst:492 +#: ../../library/concurrent.futures.rst:477 msgid "" "The :class:`Future` class encapsulates the asynchronous execution of a " "callable. :class:`Future` instances are created by :meth:`Executor.submit`." msgstr "" -#: ../../library/concurrent.futures.rst:497 +#: ../../library/concurrent.futures.rst:482 msgid "" "Encapsulates the asynchronous execution of a callable. :class:`Future` " "instances are created by :meth:`Executor.submit` and should not be created " "directly except for testing." msgstr "" -#: ../../library/concurrent.futures.rst:503 +#: ../../library/concurrent.futures.rst:488 msgid "" "Attempt to cancel the call. If the call is currently being executed or " "finished running and cannot be cancelled then the method will return " @@ -664,22 +649,22 @@ msgid "" "``True``." msgstr "" -#: ../../library/concurrent.futures.rst:510 +#: ../../library/concurrent.futures.rst:495 msgid "Return ``True`` if the call was successfully cancelled." msgstr "" -#: ../../library/concurrent.futures.rst:514 +#: ../../library/concurrent.futures.rst:499 msgid "" "Return ``True`` if the call is currently being executed and cannot be " "cancelled." msgstr "" -#: ../../library/concurrent.futures.rst:519 +#: ../../library/concurrent.futures.rst:504 msgid "" "Return ``True`` if the call was successfully cancelled or finished running." msgstr "" -#: ../../library/concurrent.futures.rst:524 +#: ../../library/concurrent.futures.rst:509 msgid "" "Return the value returned by the call. If the call hasn't yet completed then " "this method will wait up to *timeout* seconds. If the call hasn't completed " @@ -688,19 +673,19 @@ msgid "" "no limit to the wait time." msgstr "" -#: ../../library/concurrent.futures.rst:531 -#: ../../library/concurrent.futures.rst:545 +#: ../../library/concurrent.futures.rst:516 +#: ../../library/concurrent.futures.rst:530 msgid "" "If the future is cancelled before completing then :exc:`.CancelledError` " "will be raised." msgstr "" -#: ../../library/concurrent.futures.rst:534 +#: ../../library/concurrent.futures.rst:519 msgid "" "If the call raised an exception, this method will raise the same exception." msgstr "" -#: ../../library/concurrent.futures.rst:538 +#: ../../library/concurrent.futures.rst:523 msgid "" "Return the exception raised by the call. If the call hasn't yet completed " "then this method will wait up to *timeout* seconds. If the call hasn't " @@ -709,18 +694,18 @@ msgid "" "``None``, there is no limit to the wait time." msgstr "" -#: ../../library/concurrent.futures.rst:548 +#: ../../library/concurrent.futures.rst:533 msgid "If the call completed without raising, ``None`` is returned." msgstr "" -#: ../../library/concurrent.futures.rst:552 +#: ../../library/concurrent.futures.rst:537 msgid "" "Attaches the callable *fn* to the future. *fn* will be called, with the " "future as its only argument, when the future is cancelled or finishes " "running." msgstr "" -#: ../../library/concurrent.futures.rst:556 +#: ../../library/concurrent.futures.rst:541 msgid "" "Added callables are called in the order that they were added and are always " "called in a thread belonging to the process that added them. If the " @@ -729,26 +714,26 @@ msgid "" "behavior is undefined." msgstr "" -#: ../../library/concurrent.futures.rst:562 +#: ../../library/concurrent.futures.rst:547 msgid "" "If the future has already completed or been cancelled, *fn* will be called " "immediately." msgstr "" -#: ../../library/concurrent.futures.rst:565 +#: ../../library/concurrent.futures.rst:550 msgid "" "The following :class:`Future` methods are meant for use in unit tests and :" "class:`Executor` implementations." msgstr "" -#: ../../library/concurrent.futures.rst:570 +#: ../../library/concurrent.futures.rst:555 msgid "" "This method should only be called by :class:`Executor` implementations " "before executing the work associated with the :class:`Future` and by unit " "tests." msgstr "" -#: ../../library/concurrent.futures.rst:574 +#: ../../library/concurrent.futures.rst:559 msgid "" "If the method returns ``False`` then the :class:`Future` was cancelled, i." "e. :meth:`Future.cancel` was called and returned ``True``. Any threads " @@ -756,49 +741,49 @@ msgid "" "or :func:`wait`) will be woken up." msgstr "" -#: ../../library/concurrent.futures.rst:579 +#: ../../library/concurrent.futures.rst:564 msgid "" "If the method returns ``True`` then the :class:`Future` was not cancelled " "and has been put in the running state, i.e. calls to :meth:`Future.running` " "will return ``True``." msgstr "" -#: ../../library/concurrent.futures.rst:583 +#: ../../library/concurrent.futures.rst:568 msgid "" "This method can only be called once and cannot be called after :meth:`Future." "set_result` or :meth:`Future.set_exception` have been called." msgstr "" -#: ../../library/concurrent.futures.rst:589 +#: ../../library/concurrent.futures.rst:574 msgid "" "Sets the result of the work associated with the :class:`Future` to *result*." msgstr "" -#: ../../library/concurrent.futures.rst:592 -#: ../../library/concurrent.futures.rst:605 +#: ../../library/concurrent.futures.rst:577 +#: ../../library/concurrent.futures.rst:590 msgid "" "This method should only be used by :class:`Executor` implementations and " "unit tests." msgstr "" -#: ../../library/concurrent.futures.rst:595 -#: ../../library/concurrent.futures.rst:608 +#: ../../library/concurrent.futures.rst:580 +#: ../../library/concurrent.futures.rst:593 msgid "" "This method raises :exc:`concurrent.futures.InvalidStateError` if the :class:" "`Future` is already done." msgstr "" -#: ../../library/concurrent.futures.rst:602 +#: ../../library/concurrent.futures.rst:587 msgid "" "Sets the result of the work associated with the :class:`Future` to the :" "class:`Exception` *exception*." msgstr "" -#: ../../library/concurrent.futures.rst:614 +#: ../../library/concurrent.futures.rst:599 msgid "Module Functions" msgstr "" -#: ../../library/concurrent.futures.rst:618 +#: ../../library/concurrent.futures.rst:603 msgid "" "Wait for the :class:`Future` instances (possibly created by different :class:" "`Executor` instances) given by *fs* to complete. Duplicate futures given to " @@ -809,43 +794,43 @@ msgid "" "running futures)." msgstr "" -#: ../../library/concurrent.futures.rst:626 +#: ../../library/concurrent.futures.rst:611 msgid "" "*timeout* can be used to control the maximum number of seconds to wait " "before returning. *timeout* can be an int or float. If *timeout* is not " "specified or ``None``, there is no limit to the wait time." msgstr "" -#: ../../library/concurrent.futures.rst:630 +#: ../../library/concurrent.futures.rst:615 msgid "" "*return_when* indicates when this function should return. It must be one of " "the following constants:" msgstr "" -#: ../../library/concurrent.futures.rst:636 +#: ../../library/concurrent.futures.rst:621 msgid "Constant" msgstr "" -#: ../../library/concurrent.futures.rst:637 +#: ../../library/concurrent.futures.rst:622 msgid "Description" msgstr "" -#: ../../library/concurrent.futures.rst:640 +#: ../../library/concurrent.futures.rst:625 msgid "The function will return when any future finishes or is cancelled." msgstr "" -#: ../../library/concurrent.futures.rst:643 +#: ../../library/concurrent.futures.rst:628 msgid "" "The function will return when any future finishes by raising an exception. " "If no future raises an exception then it is equivalent to :const:" "`ALL_COMPLETED`." msgstr "" -#: ../../library/concurrent.futures.rst:648 +#: ../../library/concurrent.futures.rst:633 msgid "The function will return when all futures finish or are cancelled." msgstr "" -#: ../../library/concurrent.futures.rst:652 +#: ../../library/concurrent.futures.rst:637 msgid "" "Returns an iterator over the :class:`Future` instances (possibly created by " "different :class:`Executor` instances) given by *fs* that yields futures as " @@ -858,69 +843,69 @@ msgid "" "*timeout* is not specified or ``None``, there is no limit to the wait time." msgstr "" -#: ../../library/concurrent.futures.rst:665 +#: ../../library/concurrent.futures.rst:650 msgid ":pep:`3148` -- futures - execute computations asynchronously" msgstr "" -#: ../../library/concurrent.futures.rst:666 +#: ../../library/concurrent.futures.rst:651 msgid "" "The proposal which described this feature for inclusion in the Python " "standard library." msgstr "" -#: ../../library/concurrent.futures.rst:671 +#: ../../library/concurrent.futures.rst:656 msgid "Exception classes" msgstr "" -#: ../../library/concurrent.futures.rst:677 +#: ../../library/concurrent.futures.rst:662 msgid "Raised when a future is cancelled." msgstr "" -#: ../../library/concurrent.futures.rst:681 +#: ../../library/concurrent.futures.rst:666 msgid "" "A deprecated alias of :exc:`TimeoutError`, raised when a future operation " "exceeds the given timeout." msgstr "" -#: ../../library/concurrent.futures.rst:686 +#: ../../library/concurrent.futures.rst:671 msgid "This class was made an alias of :exc:`TimeoutError`." msgstr "" -#: ../../library/concurrent.futures.rst:691 +#: ../../library/concurrent.futures.rst:676 msgid "" "Derived from :exc:`RuntimeError`, this exception class is raised when an " "executor is broken for some reason, and cannot be used to submit or execute " "new tasks." msgstr "" -#: ../../library/concurrent.futures.rst:699 +#: ../../library/concurrent.futures.rst:684 msgid "" "Raised when an operation is performed on a future that is not allowed in the " "current state." msgstr "" -#: ../../library/concurrent.futures.rst:708 +#: ../../library/concurrent.futures.rst:693 msgid "" "Derived from :exc:`~concurrent.futures.BrokenExecutor`, this exception class " "is raised when one of the workers of a :class:`~concurrent.futures." "ThreadPoolExecutor` has failed initializing." msgstr "" -#: ../../library/concurrent.futures.rst:719 +#: ../../library/concurrent.futures.rst:704 msgid "" "Derived from :exc:`~concurrent.futures.thread.BrokenThreadPool`, this " "exception class is raised when one of the workers of a :class:`~concurrent." "futures.InterpreterPoolExecutor` has failed initializing." msgstr "" -#: ../../library/concurrent.futures.rst:728 +#: ../../library/concurrent.futures.rst:713 msgid "" "Raised from :class:`~concurrent.futures.InterpreterPoolExecutor` when the " "given initializer fails or from :meth:`~concurrent.futures.Executor.submit` " "when there's an uncaught exception from the submitted task." msgstr "" -#: ../../library/concurrent.futures.rst:739 +#: ../../library/concurrent.futures.rst:724 msgid "" "Derived from :exc:`~concurrent.futures.BrokenExecutor` (formerly :exc:" "`RuntimeError`), this exception class is raised when one of the workers of " diff --git a/library/concurrent.po b/library/concurrent.po index ff891990a..2c4edf3e6 100644 --- a/library/concurrent.po +++ b/library/concurrent.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-06-27 14:20+0000\n" "PO-Revision-Date: 2021-06-28 00:57+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" @@ -23,9 +23,14 @@ msgid "The :mod:`!concurrent` package" msgstr "" #: ../../library/concurrent.rst:4 -msgid "Currently, there is only one module in this package:" +msgid "This package contains the following modules:" msgstr "" #: ../../library/concurrent.rst:6 msgid ":mod:`concurrent.futures` -- Launching parallel tasks" msgstr "" + +#: ../../library/concurrent.rst:7 +msgid "" +":mod:`concurrent.interpreters` -- Multiple interpreters in the same process" +msgstr "" diff --git a/library/configparser.po b/library/configparser.po index ff64761f7..cd7d13964 100644 --- a/library/configparser.po +++ b/library/configparser.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:57+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/constants.po b/library/constants.po index b8daee52a..1515fd7e1 100644 --- a/library/constants.po +++ b/library/constants.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 00:57+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/contextlib.po b/library/contextlib.po index 794613a57..099e51c3c 100644 --- a/library/contextlib.po +++ b/library/contextlib.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:57+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/contextvars.po b/library/contextvars.po index cd437e2a5..4e41df025 100644 --- a/library/contextvars.po +++ b/library/contextvars.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:57+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/copy.po b/library/copy.po index 2d5313426..c332fdeba 100644 --- a/library/copy.po +++ b/library/copy.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:03+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -173,11 +174,11 @@ msgid "" "with values from *changes*." msgstr "" -#: ../../library/copy.rst:128 +#: ../../library/copy.rst:130 msgid "Module :mod:`pickle`" msgstr "" -#: ../../library/copy.rst:129 +#: ../../library/copy.rst:131 msgid "" "Discussion of the special methods used to support object state retrieval and " "restoration." diff --git a/library/copyreg.po b/library/copyreg.po index 478ced299..1c5340822 100644 --- a/library/copyreg.po +++ b/library/copyreg.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:03+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/crypt.po b/library/crypt.po index 79b4ccaf2..b8782f90a 100644 --- a/library/crypt.po +++ b/library/crypt.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-11-19 01:02+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/crypto.po b/library/crypto.po index 9f86a3b50..4280632f7 100644 --- a/library/crypto.po +++ b/library/crypto.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:03+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/csv.po b/library/csv.po index 64846d895..ac2b0b666 100644 --- a/library/csv.po +++ b/library/csv.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:03+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -96,9 +97,9 @@ msgstr "" #: ../../library/csv.rst:72 msgid "" "Each row read from the csv file is returned as a list of strings. No " -"automatic data type conversion is performed unless the ``QUOTE_NONNUMERIC`` " -"format option is specified (in which case unquoted fields are transformed " -"into floats)." +"automatic data type conversion is performed unless the :data:" +"`QUOTE_NONNUMERIC` format option is specified (in which case unquoted fields " +"are transformed into floats)." msgstr "" #: ../../library/csv.rst:76 ../../library/csv.rst:106 ../../library/csv.rst:181 @@ -393,8 +394,8 @@ msgstr "" #: ../../library/csv.rst:325 msgid "" "Instructs :class:`writer` objects to only quote those fields which contain " -"special characters such as *delimiter*, *quotechar* or any of the characters " -"in *lineterminator*." +"special characters such as *delimiter*, *quotechar*, ``'\\r'``, ``'\\n'`` or " +"any of the characters in *lineterminator*." msgstr "" #: ../../library/csv.rst:332 @@ -403,63 +404,73 @@ msgstr "" #: ../../library/csv.rst:334 msgid "" -"Instructs :class:`reader` objects to convert all non-quoted fields to type " -"*float*." +"Instructs :class:`reader` objects to convert all non-quoted fields to type :" +"class:`float`." msgstr "" -#: ../../library/csv.rst:339 +#: ../../library/csv.rst:337 msgid "" -"Instructs :class:`writer` objects to never quote fields. When the current " -"*delimiter* occurs in output data it is preceded by the current *escapechar* " -"character. If *escapechar* is not set, the writer will raise :exc:`Error` " -"if any characters that require escaping are encountered." +"Some numeric types, such as :class:`bool`, :class:`~fractions.Fraction`, or :" +"class:`~enum.IntEnum`, have a string representation that cannot be converted " +"to :class:`float`. They cannot be read in the :data:`QUOTE_NONNUMERIC` and :" +"data:`QUOTE_STRINGS` modes." msgstr "" -#: ../../library/csv.rst:344 +#: ../../library/csv.rst:345 +msgid "" +"Instructs :class:`writer` objects to never quote fields. When the current " +"*delimiter*, *quotechar*, *escapechar*, ``'\\r'``, ``'\\n'`` or any of the " +"characters in *lineterminator* occurs in output data it is preceded by the " +"current *escapechar* character. If *escapechar* is not set, the writer will " +"raise :exc:`Error` if any characters that require escaping are encountered. " +"Set *quotechar* to ``None`` to prevent its escaping." +msgstr "" + +#: ../../library/csv.rst:353 msgid "" "Instructs :class:`reader` objects to perform no special processing of quote " "characters." msgstr "" -#: ../../library/csv.rst:348 +#: ../../library/csv.rst:357 msgid "" "Instructs :class:`writer` objects to quote all fields which are not " "``None``. This is similar to :data:`QUOTE_ALL`, except that if a field " "value is ``None`` an empty (unquoted) string is written." msgstr "" -#: ../../library/csv.rst:352 +#: ../../library/csv.rst:361 msgid "" "Instructs :class:`reader` objects to interpret an empty (unquoted) field as " "``None`` and to otherwise behave as :data:`QUOTE_ALL`." msgstr "" -#: ../../library/csv.rst:359 +#: ../../library/csv.rst:368 msgid "" "Instructs :class:`writer` objects to always place quotes around fields which " "are strings. This is similar to :data:`QUOTE_NONNUMERIC`, except that if a " "field value is ``None`` an empty (unquoted) string is written." msgstr "" -#: ../../library/csv.rst:363 +#: ../../library/csv.rst:372 msgid "" "Instructs :class:`reader` objects to interpret an empty (unquoted) string as " "``None`` and to otherwise behave as :data:`QUOTE_NONNUMERIC`." msgstr "" -#: ../../library/csv.rst:368 +#: ../../library/csv.rst:377 msgid "The :mod:`csv` module defines the following exception:" msgstr "" -#: ../../library/csv.rst:373 +#: ../../library/csv.rst:382 msgid "Raised by any of the functions when an error is detected." msgstr "" -#: ../../library/csv.rst:378 +#: ../../library/csv.rst:387 msgid "Dialects and Formatting Parameters" msgstr "" -#: ../../library/csv.rst:380 +#: ../../library/csv.rst:389 msgid "" "To make it easier to specify the format of input and output records, " "specific formatting parameters are grouped together into dialects. A " @@ -472,16 +483,16 @@ msgid "" "attributes defined below for the :class:`Dialect` class." msgstr "" -#: ../../library/csv.rst:390 +#: ../../library/csv.rst:399 msgid "Dialects support the following attributes:" msgstr "" -#: ../../library/csv.rst:395 +#: ../../library/csv.rst:404 msgid "" "A one-character string used to separate fields. It defaults to ``','``." msgstr "" -#: ../../library/csv.rst:400 +#: ../../library/csv.rst:409 msgid "" "Controls how instances of *quotechar* appearing inside a field should " "themselves be quoted. When :const:`True`, the character is doubled. When :" @@ -489,79 +500,100 @@ msgid "" "defaults to :const:`True`." msgstr "" -#: ../../library/csv.rst:405 +#: ../../library/csv.rst:414 msgid "" "On output, if *doublequote* is :const:`False` and no *escapechar* is set, :" "exc:`Error` is raised if a *quotechar* is found in a field." msgstr "" -#: ../../library/csv.rst:411 +#: ../../library/csv.rst:420 +msgid "" +"A one-character string used by the writer to escape characters that require " +"escaping:" +msgstr "" + +#: ../../library/csv.rst:423 msgid "" -"A one-character string used by the writer to escape the *delimiter* if " -"*quoting* is set to :const:`QUOTE_NONE` and the *quotechar* if *doublequote* " -"is :const:`False`. On reading, the *escapechar* removes any special meaning " -"from the following character. It defaults to :const:`None`, which disables " -"escaping." +"the *delimiter*, the *quotechar*, ``'\\r'``, ``'\\n'`` and any of the " +"characters in *lineterminator* are escaped if *quoting* is set to :const:" +"`QUOTE_NONE`;" +msgstr "" + +#: ../../library/csv.rst:426 +msgid "the *quotechar* is escaped if *doublequote* is :const:`False`;" msgstr "" -#: ../../library/csv.rst:416 +#: ../../library/csv.rst:427 +msgid "the *escapechar* itself." +msgstr "" + +#: ../../library/csv.rst:429 +msgid "" +"On reading, the *escapechar* removes any special meaning from the following " +"character. It defaults to :const:`None`, which disables escaping." +msgstr "" + +#: ../../library/csv.rst:432 msgid "An empty *escapechar* is not allowed." msgstr "" -#: ../../library/csv.rst:421 +#: ../../library/csv.rst:437 msgid "" "The string used to terminate lines produced by the :class:`writer`. It " "defaults to ``'\\r\\n'``." msgstr "" -#: ../../library/csv.rst:426 +#: ../../library/csv.rst:442 msgid "" "The :class:`reader` is hard-coded to recognise either ``'\\r'`` or ``'\\n'`` " "as end-of-line, and ignores *lineterminator*. This behavior may change in " "the future." msgstr "" -#: ../../library/csv.rst:433 +#: ../../library/csv.rst:449 msgid "" "A one-character string used to quote fields containing special characters, " -"such as the *delimiter* or *quotechar*, or which contain new-line " -"characters. It defaults to ``'\"'``." +"such as the *delimiter* or the *quotechar*, or which contain new-line " +"characters (``'\\r'``, ``'\\n'`` or any of the characters in " +"*lineterminator*). It defaults to ``'\"'``. Can be set to ``None`` to " +"prevent escaping ``'\"'`` if *quoting* is set to :const:`QUOTE_NONE`." msgstr "" -#: ../../library/csv.rst:437 +#: ../../library/csv.rst:456 msgid "An empty *quotechar* is not allowed." msgstr "" -#: ../../library/csv.rst:442 +#: ../../library/csv.rst:461 msgid "" "Controls when quotes should be generated by the writer and recognised by the " "reader. It can take on any of the :ref:`QUOTE_\\* constants ` and defaults to :const:`QUOTE_MINIMAL`." +"constants>` and defaults to :const:`QUOTE_MINIMAL` if *quotechar* is not " +"``None``, and :const:`QUOTE_NONE` otherwise." msgstr "" -#: ../../library/csv.rst:449 +#: ../../library/csv.rst:469 msgid "" "When :const:`True`, spaces immediately following the *delimiter* are " "ignored. The default is :const:`False`." msgstr "" -#: ../../library/csv.rst:455 +#: ../../library/csv.rst:475 msgid "" "When ``True``, raise exception :exc:`Error` on bad CSV input. The default is " "``False``." msgstr "" -#: ../../library/csv.rst:461 +#: ../../library/csv.rst:481 msgid "Reader Objects" msgstr "" -#: ../../library/csv.rst:463 +#: ../../library/csv.rst:483 msgid "" "Reader objects (:class:`DictReader` instances and objects returned by the :" "func:`reader` function) have the following public methods:" msgstr "" -#: ../../library/csv.rst:468 +#: ../../library/csv.rst:488 msgid "" "Return the next row of the reader's iterable object as a list (if the object " "was returned from :func:`reader`) or a dict (if it is a :class:`DictReader` " @@ -569,35 +601,35 @@ msgid "" "should call this as ``next(reader)``." msgstr "" -#: ../../library/csv.rst:474 +#: ../../library/csv.rst:494 msgid "Reader objects have the following public attributes:" msgstr "" -#: ../../library/csv.rst:478 +#: ../../library/csv.rst:498 msgid "A read-only description of the dialect in use by the parser." msgstr "" -#: ../../library/csv.rst:483 +#: ../../library/csv.rst:503 msgid "" "The number of lines read from the source iterator. This is not the same as " "the number of records returned, as records can span multiple lines." msgstr "" -#: ../../library/csv.rst:487 +#: ../../library/csv.rst:507 msgid "DictReader objects have the following public attribute:" msgstr "" -#: ../../library/csv.rst:491 +#: ../../library/csv.rst:511 msgid "" "If not passed as a parameter when creating the object, this attribute is " "initialized upon first access or when the first record is read from the file." msgstr "" -#: ../../library/csv.rst:498 +#: ../../library/csv.rst:518 msgid "Writer Objects" msgstr "" -#: ../../library/csv.rst:500 +#: ../../library/csv.rst:520 msgid "" ":class:`writer` objects (:class:`DictWriter` instances and objects returned " "by the :func:`writer` function) have the following public methods. A *row* " @@ -609,58 +641,58 @@ msgid "" "complex numbers at all)." msgstr "" -#: ../../library/csv.rst:511 +#: ../../library/csv.rst:531 msgid "" "Write the *row* parameter to the writer's file object, formatted according " "to the current :class:`Dialect`. Return the return value of the call to the " "*write* method of the underlying file object." msgstr "" -#: ../../library/csv.rst:515 +#: ../../library/csv.rst:535 msgid "Added support of arbitrary iterables." msgstr "" -#: ../../library/csv.rst:520 +#: ../../library/csv.rst:540 msgid "" "Write all elements in *rows* (an iterable of *row* objects as described " "above) to the writer's file object, formatted according to the current " "dialect." msgstr "" -#: ../../library/csv.rst:524 +#: ../../library/csv.rst:544 msgid "Writer objects have the following public attribute:" msgstr "" -#: ../../library/csv.rst:529 +#: ../../library/csv.rst:549 msgid "A read-only description of the dialect in use by the writer." msgstr "" -#: ../../library/csv.rst:532 +#: ../../library/csv.rst:552 msgid "DictWriter objects have the following public method:" msgstr "" -#: ../../library/csv.rst:537 +#: ../../library/csv.rst:557 msgid "" "Write a row with the field names (as specified in the constructor) to the " "writer's file object, formatted according to the current dialect. Return the " "return value of the :meth:`csvwriter.writerow` call used internally." msgstr "" -#: ../../library/csv.rst:542 +#: ../../library/csv.rst:562 msgid "" ":meth:`writeheader` now also returns the value returned by the :meth:" "`csvwriter.writerow` method it uses internally." msgstr "" -#: ../../library/csv.rst:550 +#: ../../library/csv.rst:570 msgid "Examples" msgstr "" -#: ../../library/csv.rst:552 +#: ../../library/csv.rst:572 msgid "The simplest example of reading a CSV file::" msgstr "" -#: ../../library/csv.rst:554 +#: ../../library/csv.rst:574 msgid "" "import csv\n" "with open('some.csv', newline='') as f:\n" @@ -669,11 +701,11 @@ msgid "" " print(row)" msgstr "" -#: ../../library/csv.rst:560 +#: ../../library/csv.rst:580 msgid "Reading a file with an alternate format::" msgstr "" -#: ../../library/csv.rst:562 +#: ../../library/csv.rst:582 msgid "" "import csv\n" "with open('passwd', newline='') as f:\n" @@ -682,11 +714,11 @@ msgid "" " print(row)" msgstr "" -#: ../../library/csv.rst:568 +#: ../../library/csv.rst:588 msgid "The corresponding simplest possible writing example is::" msgstr "" -#: ../../library/csv.rst:570 +#: ../../library/csv.rst:590 msgid "" "import csv\n" "with open('some.csv', 'w', newline='') as f:\n" @@ -694,7 +726,7 @@ msgid "" " writer.writerows(someiterable)" msgstr "" -#: ../../library/csv.rst:575 +#: ../../library/csv.rst:595 msgid "" "Since :func:`open` is used to open a CSV file for reading, the file will by " "default be decoded into unicode using the system default encoding (see :func:" @@ -702,7 +734,7 @@ msgid "" "``encoding`` argument of open::" msgstr "" -#: ../../library/csv.rst:580 +#: ../../library/csv.rst:600 msgid "" "import csv\n" "with open('some.csv', newline='', encoding='utf-8') as f:\n" @@ -711,17 +743,17 @@ msgid "" " print(row)" msgstr "" -#: ../../library/csv.rst:586 +#: ../../library/csv.rst:606 msgid "" "The same applies to writing in something other than the system default " "encoding: specify the encoding argument when opening the output file." msgstr "" -#: ../../library/csv.rst:589 +#: ../../library/csv.rst:609 msgid "Registering a new dialect::" msgstr "" -#: ../../library/csv.rst:591 +#: ../../library/csv.rst:611 msgid "" "import csv\n" "csv.register_dialect('unixpwd', delimiter=':', quoting=csv.QUOTE_NONE)\n" @@ -729,13 +761,13 @@ msgid "" " reader = csv.reader(f, 'unixpwd')" msgstr "" -#: ../../library/csv.rst:596 +#: ../../library/csv.rst:616 msgid "" "A slightly more advanced use of the reader --- catching and reporting " "errors::" msgstr "" -#: ../../library/csv.rst:598 +#: ../../library/csv.rst:618 msgid "" "import csv, sys\n" "filename = 'some.csv'\n" @@ -745,27 +777,27 @@ msgid "" " for row in reader:\n" " print(row)\n" " except csv.Error as e:\n" -" sys.exit('file {}, line {}: {}'.format(filename, reader.line_num, e))" +" sys.exit(f'file {filename}, line {reader.line_num}: {e}')" msgstr "" -#: ../../library/csv.rst:608 +#: ../../library/csv.rst:628 msgid "" "And while the module doesn't directly support parsing strings, it can easily " "be done::" msgstr "" -#: ../../library/csv.rst:611 +#: ../../library/csv.rst:631 msgid "" "import csv\n" "for row in csv.reader(['one,two,three']):\n" " print(row)" msgstr "" -#: ../../library/csv.rst:617 +#: ../../library/csv.rst:637 msgid "Footnotes" msgstr "" -#: ../../library/csv.rst:618 +#: ../../library/csv.rst:638 msgid "" "If ``newline=''`` is not specified, newlines embedded inside quoted fields " "will not be interpreted correctly, and on platforms that use ``\\r\\n`` " diff --git a/library/ctypes.po b/library/ctypes.po index b54b424ef..705a484ef 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -5,17 +5,17 @@ # # Translators: # Danial Behzadi , 2025 -# Rafael Fontenelle , 2025 # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:03+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -318,7 +318,7 @@ msgid "" "learn more about :mod:`ctypes` data types." msgstr "" -#: ../../library/ctypes.rst:212 ../../library/ctypes.rst:2388 +#: ../../library/ctypes.rst:212 ../../library/ctypes.rst:2414 msgid "Fundamental data types" msgstr "" @@ -1188,39 +1188,47 @@ msgid "" "... (\"second_16\", c_int, 16)]\n" "...\n" ">>> print(Int.first_16)\n" -"\n" +"\n" ">>> print(Int.second_16)\n" -"\n" -">>>" +"" +msgstr "" + +#: ../../library/ctypes.rst:721 +msgid "" +"It is important to note that bit field allocation and layout in memory are " +"not defined as a C standard; their implementation is compiler-specific. By " +"default, Python will attempt to match the behavior of a \"native\" compiler " +"for the current platform. See the :attr:`~Structure._layout_` attribute for " +"details on the default behavior and how to change it." msgstr "" -#: ../../library/ctypes.rst:726 +#: ../../library/ctypes.rst:732 msgid "Arrays" msgstr "" -#: ../../library/ctypes.rst:728 +#: ../../library/ctypes.rst:734 msgid "" "Arrays are sequences, containing a fixed number of instances of the same " "type." msgstr "" -#: ../../library/ctypes.rst:730 +#: ../../library/ctypes.rst:736 msgid "" "The recommended way to create array types is by multiplying a data type with " "a positive integer::" msgstr "" -#: ../../library/ctypes.rst:733 +#: ../../library/ctypes.rst:739 msgid "TenPointsArrayType = POINT * 10" msgstr "" -#: ../../library/ctypes.rst:735 +#: ../../library/ctypes.rst:741 msgid "" "Here is an example of a somewhat artificial data type, a structure " "containing 4 POINTs among other stuff::" msgstr "" -#: ../../library/ctypes.rst:738 +#: ../../library/ctypes.rst:744 msgid "" ">>> from ctypes import *\n" ">>> class POINT(Structure):\n" @@ -1236,28 +1244,28 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:751 +#: ../../library/ctypes.rst:757 msgid "Instances are created in the usual way, by calling the class::" msgstr "" -#: ../../library/ctypes.rst:753 +#: ../../library/ctypes.rst:759 msgid "" "arr = TenPointsArrayType()\n" "for pt in arr:\n" " print(pt.x, pt.y)" msgstr "" -#: ../../library/ctypes.rst:757 +#: ../../library/ctypes.rst:763 msgid "" "The above code print a series of ``0 0`` lines, because the array contents " "is initialized to zeros." msgstr "" -#: ../../library/ctypes.rst:760 +#: ../../library/ctypes.rst:766 msgid "Initializers of the correct type can also be specified::" msgstr "" -#: ../../library/ctypes.rst:762 +#: ../../library/ctypes.rst:768 msgid "" ">>> from ctypes import *\n" ">>> TenIntegers = c_int * 10\n" @@ -1270,17 +1278,17 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:776 +#: ../../library/ctypes.rst:782 msgid "Pointers" msgstr "" -#: ../../library/ctypes.rst:778 +#: ../../library/ctypes.rst:784 msgid "" "Pointer instances are created by calling the :func:`pointer` function on a :" "mod:`ctypes` type::" msgstr "" -#: ../../library/ctypes.rst:781 +#: ../../library/ctypes.rst:787 msgid "" ">>> from ctypes import *\n" ">>> i = c_int(42)\n" @@ -1288,26 +1296,26 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:786 +#: ../../library/ctypes.rst:792 msgid "" "Pointer instances have a :attr:`~_Pointer.contents` attribute which returns " "the object to which the pointer points, the ``i`` object above::" msgstr "" -#: ../../library/ctypes.rst:789 +#: ../../library/ctypes.rst:795 msgid "" ">>> pi.contents\n" "c_long(42)\n" ">>>" msgstr "" -#: ../../library/ctypes.rst:793 +#: ../../library/ctypes.rst:799 msgid "" "Note that :mod:`ctypes` does not have OOR (original object return), it " "constructs a new, equivalent object each time you retrieve an attribute::" msgstr "" -#: ../../library/ctypes.rst:796 +#: ../../library/ctypes.rst:802 msgid "" ">>> pi.contents is i\n" "False\n" @@ -1316,14 +1324,14 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:802 +#: ../../library/ctypes.rst:808 msgid "" "Assigning another :class:`c_int` instance to the pointer's contents " "attribute would cause the pointer to point to the memory location where this " "is stored::" msgstr "" -#: ../../library/ctypes.rst:805 +#: ../../library/ctypes.rst:811 msgid "" ">>> i = c_int(99)\n" ">>> pi.contents = i\n" @@ -1332,22 +1340,22 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:814 +#: ../../library/ctypes.rst:820 msgid "Pointer instances can also be indexed with integers::" msgstr "" -#: ../../library/ctypes.rst:816 +#: ../../library/ctypes.rst:822 msgid "" ">>> pi[0]\n" "99\n" ">>>" msgstr "" -#: ../../library/ctypes.rst:820 +#: ../../library/ctypes.rst:826 msgid "Assigning to an integer index changes the pointed to value::" msgstr "" -#: ../../library/ctypes.rst:822 +#: ../../library/ctypes.rst:828 msgid "" ">>> print(i)\n" "c_long(99)\n" @@ -1357,7 +1365,7 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:829 +#: ../../library/ctypes.rst:835 msgid "" "It is also possible to use indexes different from 0, but you must know what " "you're doing, just as in C: You can access or change arbitrary memory " @@ -1366,7 +1374,7 @@ msgid "" "instead of a single item." msgstr "" -#: ../../library/ctypes.rst:835 +#: ../../library/ctypes.rst:841 msgid "" "Behind the scenes, the :func:`pointer` function does more than simply create " "pointer instances, it has to create pointer *types* first. This is done with " @@ -1374,7 +1382,7 @@ msgid "" "returns a new type::" msgstr "" -#: ../../library/ctypes.rst:840 +#: ../../library/ctypes.rst:846 msgid "" ">>> PI = POINTER(c_int)\n" ">>> PI\n" @@ -1388,13 +1396,13 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:851 +#: ../../library/ctypes.rst:857 msgid "" "Calling the pointer type without an argument creates a ``NULL`` pointer. " "``NULL`` pointers have a ``False`` boolean value::" msgstr "" -#: ../../library/ctypes.rst:854 +#: ../../library/ctypes.rst:860 msgid "" ">>> null_ptr = POINTER(c_int)()\n" ">>> print(bool(null_ptr))\n" @@ -1402,13 +1410,13 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:859 +#: ../../library/ctypes.rst:865 msgid "" ":mod:`ctypes` checks for ``NULL`` when dereferencing pointers (but " "dereferencing invalid non-\\ ``NULL`` pointers would crash Python)::" msgstr "" -#: ../../library/ctypes.rst:862 +#: ../../library/ctypes.rst:868 msgid "" ">>> null_ptr[0]\n" "Traceback (most recent call last):\n" @@ -1423,25 +1431,25 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:877 +#: ../../library/ctypes.rst:883 msgid "Thread safety without the GIL" msgstr "" -#: ../../library/ctypes.rst:879 +#: ../../library/ctypes.rst:885 msgid "" -"In Python 3.13, the :term:`GIL` may be disabled on :term:`experimental free " +"From Python 3.13 onward, the :term:`GIL` can be disabled on :term:`free " "threaded ` builds. In ctypes, reads and writes to a single " "object concurrently is safe, but not across multiple objects:" msgstr "" -#: ../../library/ctypes.rst:882 +#: ../../library/ctypes.rst:888 msgid "" ">>> number = c_int(42)\n" ">>> pointer_a = pointer(number)\n" ">>> pointer_b = pointer(number)" msgstr "" -#: ../../library/ctypes.rst:888 +#: ../../library/ctypes.rst:894 msgid "" "In the above, it's only safe for one object to read and write to the address " "at once if the GIL is disabled. So, ``pointer_a`` can be shared and written " @@ -1450,7 +1458,7 @@ msgid "" "Lock` to synchronize access to memory:" msgstr "" -#: ../../library/ctypes.rst:893 +#: ../../library/ctypes.rst:899 msgid "" ">>> import threading\n" ">>> lock = threading.Lock()\n" @@ -1462,11 +1470,11 @@ msgid "" "... pointer_b.contents = 42" msgstr "" -#: ../../library/ctypes.rst:908 +#: ../../library/ctypes.rst:914 msgid "Type conversions" msgstr "" -#: ../../library/ctypes.rst:910 +#: ../../library/ctypes.rst:916 msgid "" "Usually, ctypes does strict type checking. This means, if you have " "``POINTER(c_int)`` in the :attr:`~_CFuncPtr.argtypes` list of a function or " @@ -1477,7 +1485,7 @@ msgid "" "ctypes accepts an array of c_int::" msgstr "" -#: ../../library/ctypes.rst:917 +#: ../../library/ctypes.rst:923 msgid "" ">>> class Bar(Structure):\n" "... _fields_ = [(\"count\", c_int), (\"values\", POINTER(c_int))]\n" @@ -1494,7 +1502,7 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:931 +#: ../../library/ctypes.rst:937 msgid "" "In addition, if a function argument is explicitly declared to be a pointer " "type (such as ``POINTER(c_int)``) in :attr:`~_CFuncPtr.argtypes`, an object " @@ -1503,17 +1511,17 @@ msgid "" "automatically." msgstr "" -#: ../../library/ctypes.rst:936 +#: ../../library/ctypes.rst:942 msgid "To set a POINTER type field to ``NULL``, you can assign ``None``::" msgstr "" -#: ../../library/ctypes.rst:938 +#: ../../library/ctypes.rst:944 msgid "" ">>> bar.values = None\n" ">>>" msgstr "" -#: ../../library/ctypes.rst:943 +#: ../../library/ctypes.rst:949 msgid "" "Sometimes you have instances of incompatible types. In C, you can cast one " "type into another type. :mod:`ctypes` provides a :func:`cast` function " @@ -1522,7 +1530,7 @@ msgid "" "``values`` field, but not instances of other types::" msgstr "" -#: ../../library/ctypes.rst:949 +#: ../../library/ctypes.rst:955 msgid "" ">>> bar.values = (c_byte * 4)()\n" "Traceback (most recent call last):\n" @@ -1532,11 +1540,11 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:955 +#: ../../library/ctypes.rst:961 msgid "For these cases, the :func:`cast` function is handy." msgstr "" -#: ../../library/ctypes.rst:957 +#: ../../library/ctypes.rst:963 msgid "" "The :func:`cast` function can be used to cast a ctypes instance into a " "pointer to a different ctypes data type. :func:`cast` takes two parameters, " @@ -1545,7 +1553,7 @@ msgid "" "references the same memory block as the first argument::" msgstr "" -#: ../../library/ctypes.rst:963 +#: ../../library/ctypes.rst:969 msgid "" ">>> a = (c_byte * 4)()\n" ">>> cast(a, POINTER(c_int))\n" @@ -1553,13 +1561,13 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:968 +#: ../../library/ctypes.rst:974 msgid "" "So, :func:`cast` can be used to assign to the ``values`` field of ``Bar`` " "the structure::" msgstr "" -#: ../../library/ctypes.rst:971 +#: ../../library/ctypes.rst:977 msgid "" ">>> bar = Bar()\n" ">>> bar.values = cast((c_byte * 4)(), POINTER(c_int))\n" @@ -1568,18 +1576,18 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:981 +#: ../../library/ctypes.rst:987 msgid "Incomplete Types" msgstr "" -#: ../../library/ctypes.rst:983 +#: ../../library/ctypes.rst:989 msgid "" "*Incomplete Types* are structures, unions or arrays whose members are not " "yet specified. In C, they are specified by forward declarations, which are " "defined later::" msgstr "" -#: ../../library/ctypes.rst:987 +#: ../../library/ctypes.rst:993 msgid "" "struct cell; /* forward declaration */\n" "\n" @@ -1589,13 +1597,13 @@ msgid "" "};" msgstr "" -#: ../../library/ctypes.rst:994 +#: ../../library/ctypes.rst:1000 msgid "" "The straightforward translation into ctypes code would be this, but it does " "not work::" msgstr "" -#: ../../library/ctypes.rst:997 +#: ../../library/ctypes.rst:1003 msgid "" ">>> class cell(Structure):\n" "... _fields_ = [(\"name\", c_char_p),\n" @@ -1608,14 +1616,14 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:1007 +#: ../../library/ctypes.rst:1013 msgid "" "because the new ``class cell`` is not available in the class statement " "itself. In :mod:`ctypes`, we can define the ``cell`` class and set the :attr:" "`~Structure._fields_` attribute later, after the class statement::" msgstr "" -#: ../../library/ctypes.rst:1011 +#: ../../library/ctypes.rst:1017 msgid "" ">>> from ctypes import *\n" ">>> class cell(Structure):\n" @@ -1626,13 +1634,13 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:1019 +#: ../../library/ctypes.rst:1025 msgid "" "Let's try it. We create two instances of ``cell``, and let them point to " "each other, and finally follow the pointer chain a few times::" msgstr "" -#: ../../library/ctypes.rst:1022 +#: ../../library/ctypes.rst:1028 msgid "" ">>> c1 = cell()\n" ">>> c1.name = b\"foo\"\n" @@ -1649,24 +1657,24 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:1040 +#: ../../library/ctypes.rst:1046 msgid "Callback functions" msgstr "" -#: ../../library/ctypes.rst:1042 +#: ../../library/ctypes.rst:1048 msgid "" ":mod:`ctypes` allows creating C callable function pointers from Python " "callables. These are sometimes called *callback functions*." msgstr "" -#: ../../library/ctypes.rst:1045 +#: ../../library/ctypes.rst:1051 msgid "" "First, you must create a class for the callback function. The class knows " "the calling convention, the return type, and the number and types of " "arguments this function will receive." msgstr "" -#: ../../library/ctypes.rst:1049 +#: ../../library/ctypes.rst:1055 msgid "" "The :func:`CFUNCTYPE` factory function creates types for callback functions " "using the ``cdecl`` calling convention. On Windows, the :func:`WINFUNCTYPE` " @@ -1674,21 +1682,21 @@ msgid "" "calling convention." msgstr "" -#: ../../library/ctypes.rst:1054 +#: ../../library/ctypes.rst:1060 msgid "" "Both of these factory functions are called with the result type as first " "argument, and the callback functions expected argument types as the " "remaining arguments." msgstr "" -#: ../../library/ctypes.rst:1058 +#: ../../library/ctypes.rst:1064 msgid "" "I will present an example here which uses the standard C library's :c:func:`!" "qsort` function, that is used to sort items with the help of a callback " "function. :c:func:`!qsort` will be used to sort an array of integers::" msgstr "" -#: ../../library/ctypes.rst:1062 +#: ../../library/ctypes.rst:1068 msgid "" ">>> IntArray5 = c_int * 5\n" ">>> ia = IntArray5(5, 1, 7, 33, 99)\n" @@ -1697,7 +1705,7 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:1068 +#: ../../library/ctypes.rst:1074 msgid "" ":func:`!qsort` must be called with a pointer to the data to sort, the number " "of items in the data array, the size of one item, and a pointer to the " @@ -1707,25 +1715,25 @@ msgid "" "otherwise." msgstr "" -#: ../../library/ctypes.rst:1074 +#: ../../library/ctypes.rst:1080 msgid "" "So our callback function receives pointers to integers, and must return an " "integer. First we create the ``type`` for the callback function::" msgstr "" -#: ../../library/ctypes.rst:1077 +#: ../../library/ctypes.rst:1083 msgid "" ">>> CMPFUNC = CFUNCTYPE(c_int, POINTER(c_int), POINTER(c_int))\n" ">>>" msgstr "" -#: ../../library/ctypes.rst:1080 +#: ../../library/ctypes.rst:1086 msgid "" "To get started, here is a simple callback that shows the values it gets " "passed::" msgstr "" -#: ../../library/ctypes.rst:1083 +#: ../../library/ctypes.rst:1089 msgid "" ">>> def py_cmp_func(a, b):\n" "... print(\"py_cmp_func\", a[0], b[0])\n" @@ -1735,11 +1743,11 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:1090 +#: ../../library/ctypes.rst:1096 msgid "The result::" msgstr "" -#: ../../library/ctypes.rst:1092 +#: ../../library/ctypes.rst:1098 msgid "" ">>> qsort(ia, len(ia), sizeof(c_int), cmp_func)\n" "py_cmp_func 5 1\n" @@ -1750,11 +1758,11 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:1100 +#: ../../library/ctypes.rst:1106 msgid "Now we can actually compare the two items and return a useful result::" msgstr "" -#: ../../library/ctypes.rst:1102 +#: ../../library/ctypes.rst:1108 msgid "" ">>> def py_cmp_func(a, b):\n" "... print(\"py_cmp_func\", a[0], b[0])\n" @@ -1770,11 +1778,11 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:1115 +#: ../../library/ctypes.rst:1121 msgid "As we can easily check, our array is sorted now::" msgstr "" -#: ../../library/ctypes.rst:1117 +#: ../../library/ctypes.rst:1123 msgid "" ">>> for i in ia: print(i, end=\" \")\n" "...\n" @@ -1782,13 +1790,13 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:1122 +#: ../../library/ctypes.rst:1128 msgid "" "The function factories can be used as decorator factories, so we may as well " "write::" msgstr "" -#: ../../library/ctypes.rst:1125 +#: ../../library/ctypes.rst:1131 msgid "" ">>> @CFUNCTYPE(c_int, POINTER(c_int), POINTER(c_int))\n" "... def py_cmp_func(a, b):\n" @@ -1804,14 +1812,14 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:1140 +#: ../../library/ctypes.rst:1146 msgid "" "Make sure you keep references to :func:`CFUNCTYPE` objects as long as they " "are used from C code. :mod:`ctypes` doesn't, and if you don't, they may be " "garbage collected, crashing your program when a callback is made." msgstr "" -#: ../../library/ctypes.rst:1144 +#: ../../library/ctypes.rst:1150 msgid "" "Also, note that if the callback function is called in a thread created " "outside of Python's control (e.g. by the foreign code that calls the " @@ -1821,42 +1829,42 @@ msgid "" "even when those calls are made from the same C thread." msgstr "" -#: ../../library/ctypes.rst:1154 +#: ../../library/ctypes.rst:1160 msgid "Accessing values exported from dlls" msgstr "" -#: ../../library/ctypes.rst:1156 +#: ../../library/ctypes.rst:1162 msgid "" "Some shared libraries not only export functions, they also export variables. " "An example in the Python library itself is the :c:data:`Py_Version`, Python " "runtime version number encoded in a single constant integer." msgstr "" -#: ../../library/ctypes.rst:1160 +#: ../../library/ctypes.rst:1166 msgid "" ":mod:`ctypes` can access values like this with the :meth:`~_CData.in_dll` " "class methods of the type. *pythonapi* is a predefined symbol giving access " "to the Python C api::" msgstr "" -#: ../../library/ctypes.rst:1164 +#: ../../library/ctypes.rst:1170 msgid "" ">>> version = ctypes.c_int.in_dll(ctypes.pythonapi, \"Py_Version\")\n" ">>> print(hex(version.value))\n" "0x30c00a0" msgstr "" -#: ../../library/ctypes.rst:1168 +#: ../../library/ctypes.rst:1174 msgid "" "An extended example which also demonstrates the use of pointers accesses " "the :c:data:`PyImport_FrozenModules` pointer exported by Python." msgstr "" -#: ../../library/ctypes.rst:1171 +#: ../../library/ctypes.rst:1177 msgid "Quoting the docs for that value:" msgstr "" -#: ../../library/ctypes.rst:1173 +#: ../../library/ctypes.rst:1179 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 " @@ -1865,13 +1873,13 @@ msgid "" "frozen modules." msgstr "" -#: ../../library/ctypes.rst:1178 +#: ../../library/ctypes.rst:1184 msgid "" "So manipulating this pointer could even prove useful. To restrict the " "example size, we show only how this table can be read with :mod:`ctypes`::" msgstr "" -#: ../../library/ctypes.rst:1181 +#: ../../library/ctypes.rst:1187 msgid "" ">>> from ctypes import *\n" ">>>\n" @@ -1885,20 +1893,20 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:1192 +#: ../../library/ctypes.rst:1198 msgid "" "We have defined the :c:struct:`_frozen` data type, so we can get the pointer " "to the table::" msgstr "" -#: ../../library/ctypes.rst:1195 +#: ../../library/ctypes.rst:1201 msgid "" ">>> FrozenTable = POINTER(struct_frozen)\n" ">>> table = FrozenTable.in_dll(pythonapi, \"_PyImport_FrozenBootstrap\")\n" ">>>" msgstr "" -#: ../../library/ctypes.rst:1199 +#: ../../library/ctypes.rst:1205 msgid "" "Since ``table`` is a ``pointer`` to the array of ``struct_frozen`` records, " "we can iterate over it, but we just have to make sure that our loop " @@ -1907,7 +1915,7 @@ msgid "" "the loop when we hit the ``NULL`` entry::" msgstr "" -#: ../../library/ctypes.rst:1205 +#: ../../library/ctypes.rst:1211 msgid "" ">>> for item in table:\n" "... if item.name is None:\n" @@ -1920,28 +1928,28 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:1215 +#: ../../library/ctypes.rst:1221 msgid "" "The fact that standard Python has a frozen module and a frozen package " "(indicated by the negative ``size`` member) is not well known, it is only " "used for testing. Try it out with ``import __hello__`` for example." msgstr "" -#: ../../library/ctypes.rst:1223 +#: ../../library/ctypes.rst:1229 msgid "Surprises" msgstr "" -#: ../../library/ctypes.rst:1225 +#: ../../library/ctypes.rst:1231 msgid "" "There are some edges in :mod:`ctypes` where you might expect something other " "than what actually happens." msgstr "" -#: ../../library/ctypes.rst:1228 +#: ../../library/ctypes.rst:1234 msgid "Consider the following example::" msgstr "" -#: ../../library/ctypes.rst:1230 +#: ../../library/ctypes.rst:1236 msgid "" ">>> from ctypes import *\n" ">>> class POINT(Structure):\n" @@ -1962,13 +1970,13 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:1248 +#: ../../library/ctypes.rst:1254 msgid "" "Hm. We certainly expected the last statement to print ``3 4 1 2``. What " "happened? Here are the steps of the ``rc.a, rc.b = rc.b, rc.a`` line above::" msgstr "" -#: ../../library/ctypes.rst:1251 +#: ../../library/ctypes.rst:1257 msgid "" ">>> temp0, temp1 = rc.b, rc.a\n" ">>> rc.a = temp0\n" @@ -1976,7 +1984,7 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:1256 +#: ../../library/ctypes.rst:1262 msgid "" "Note that ``temp0`` and ``temp1`` are objects still using the internal " "buffer of the ``rc`` object above. So executing ``rc.a = temp0`` copies the " @@ -1985,20 +1993,20 @@ msgid "" "have the expected effect." msgstr "" -#: ../../library/ctypes.rst:1262 +#: ../../library/ctypes.rst:1268 msgid "" "Keep in mind that retrieving sub-objects from Structure, Unions, and Arrays " "doesn't *copy* the sub-object, instead it retrieves a wrapper object " "accessing the root-object's underlying buffer." msgstr "" -#: ../../library/ctypes.rst:1266 +#: ../../library/ctypes.rst:1272 msgid "" "Another example that may behave differently from what one would expect is " "this::" msgstr "" -#: ../../library/ctypes.rst:1268 +#: ../../library/ctypes.rst:1274 msgid "" ">>> s = c_char_p()\n" ">>> s.value = b\"abc def ghi\"\n" @@ -2009,13 +2017,13 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:1278 +#: ../../library/ctypes.rst:1284 msgid "" "Objects instantiated from :class:`c_char_p` can only have their value set to " "bytes or integers." msgstr "" -#: ../../library/ctypes.rst:1281 +#: ../../library/ctypes.rst:1287 msgid "" "Why is it printing ``False``? ctypes instances are objects containing a " "memory block plus some :term:`descriptor`\\s accessing the contents of the " @@ -2024,16 +2032,16 @@ msgid "" "the contents again constructs a new Python object each time!" msgstr "" -#: ../../library/ctypes.rst:1291 +#: ../../library/ctypes.rst:1297 msgid "Variable-sized data types" msgstr "" -#: ../../library/ctypes.rst:1293 +#: ../../library/ctypes.rst:1299 msgid "" ":mod:`ctypes` provides some support for variable-sized arrays and structures." msgstr "" -#: ../../library/ctypes.rst:1295 +#: ../../library/ctypes.rst:1301 msgid "" "The :func:`resize` function can be used to resize the memory buffer of an " "existing ctypes object. The function takes the object as first argument, " @@ -2042,7 +2050,7 @@ msgid "" "objects type, a :exc:`ValueError` is raised if this is tried::" msgstr "" -#: ../../library/ctypes.rst:1301 +#: ../../library/ctypes.rst:1307 msgid "" ">>> short_array = (c_short * 4)()\n" ">>> print(sizeof(short_array))\n" @@ -2059,14 +2067,14 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:1315 +#: ../../library/ctypes.rst:1321 msgid "" "This is nice and fine, but how would one access the additional elements " "contained in this array? Since the type still only knows about 4 elements, " "we get errors accessing other elements::" msgstr "" -#: ../../library/ctypes.rst:1319 +#: ../../library/ctypes.rst:1325 msgid "" ">>> short_array[:]\n" "[0, 0, 0, 0]\n" @@ -2077,28 +2085,28 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:1327 +#: ../../library/ctypes.rst:1333 msgid "" "Another way to use variable-sized data types with :mod:`ctypes` is to use " "the dynamic nature of Python, and (re-)define the data type after the " "required size is already known, on a case by case basis." msgstr "" -#: ../../library/ctypes.rst:1335 +#: ../../library/ctypes.rst:1341 msgid "ctypes reference" msgstr "" -#: ../../library/ctypes.rst:1341 +#: ../../library/ctypes.rst:1347 msgid "Finding shared libraries" msgstr "" -#: ../../library/ctypes.rst:1343 +#: ../../library/ctypes.rst:1349 msgid "" "When programming in a compiled language, shared libraries are accessed when " "compiling/linking a program, and when the program is run." msgstr "" -#: ../../library/ctypes.rst:1346 +#: ../../library/ctypes.rst:1352 msgid "" "The purpose of the :func:`~ctypes.util.find_library` function is to locate a " "library in a way similar to what the compiler or runtime loader does (on " @@ -2107,13 +2115,13 @@ msgid "" "and call the runtime loader directly." msgstr "" -#: ../../library/ctypes.rst:1352 +#: ../../library/ctypes.rst:1358 msgid "" "The :mod:`!ctypes.util` module provides a function which can help to " "determine the library to load." msgstr "" -#: ../../library/ctypes.rst:1360 +#: ../../library/ctypes.rst:1366 msgid "" "Try to find a library and return a pathname. *name* is the library name " "without any prefix like *lib*, suffix like ``.so``, ``.dylib`` or version " @@ -2121,29 +2129,29 @@ msgid "" "If no library can be found, returns ``None``." msgstr "" -#: ../../library/ctypes.rst:1365 ../../library/ctypes.rst:2093 +#: ../../library/ctypes.rst:1371 ../../library/ctypes.rst:2119 msgid "The exact functionality is system dependent." msgstr "" -#: ../../library/ctypes.rst:1367 +#: ../../library/ctypes.rst:1373 msgid "" "On Linux, :func:`~ctypes.util.find_library` tries to run external programs " "(``/sbin/ldconfig``, ``gcc``, ``objdump`` and ``ld``) to find the library " "file. It returns the filename of the library file." msgstr "" -#: ../../library/ctypes.rst:1371 +#: ../../library/ctypes.rst:1377 msgid "" "On Linux, the value of the environment variable ``LD_LIBRARY_PATH`` is used " "when searching for libraries, if a library cannot be found by any other " "means." msgstr "" -#: ../../library/ctypes.rst:1375 +#: ../../library/ctypes.rst:1381 msgid "Here are some examples::" msgstr "" -#: ../../library/ctypes.rst:1377 +#: ../../library/ctypes.rst:1383 msgid "" ">>> from ctypes.util import find_library\n" ">>> find_library(\"m\")\n" @@ -2155,14 +2163,14 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:1386 +#: ../../library/ctypes.rst:1392 msgid "" "On macOS and Android, :func:`~ctypes.util.find_library` uses the system's " "standard naming schemes and paths to locate the library, and returns a full " "pathname if successful::" msgstr "" -#: ../../library/ctypes.rst:1390 +#: ../../library/ctypes.rst:1396 msgid "" ">>> from ctypes.util import find_library\n" ">>> find_library(\"c\")\n" @@ -2176,7 +2184,7 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:1401 +#: ../../library/ctypes.rst:1407 msgid "" "On Windows, :func:`~ctypes.util.find_library` searches along the system " "search path, and returns the full pathname, but since there is no predefined " @@ -2184,7 +2192,7 @@ msgid "" "``None``." msgstr "" -#: ../../library/ctypes.rst:1405 +#: ../../library/ctypes.rst:1411 msgid "" "If wrapping a shared library with :mod:`ctypes`, it *may* be better to " "determine the shared library name at development time, and hardcode that " @@ -2192,18 +2200,18 @@ msgid "" "to locate the library at runtime." msgstr "" -#: ../../library/ctypes.rst:1413 +#: ../../library/ctypes.rst:1419 msgid "Listing loaded shared libraries" msgstr "" -#: ../../library/ctypes.rst:1415 +#: ../../library/ctypes.rst:1421 msgid "" "When writing code that relies on code loaded from shared libraries, it can " "be useful to know which shared libraries have already been loaded into the " "current process." msgstr "" -#: ../../library/ctypes.rst:1419 +#: ../../library/ctypes.rst:1425 msgid "" "The :mod:`!ctypes.util` module provides the :func:`~ctypes.util.dllist` " "function, which calls the different APIs provided by the various platforms " @@ -2211,7 +2219,7 @@ msgid "" "current process." msgstr "" -#: ../../library/ctypes.rst:1423 +#: ../../library/ctypes.rst:1429 msgid "" "The exact output of this function will be system dependent. On most " "platforms, the first entry of this list represents the current process " @@ -2219,7 +2227,7 @@ msgid "" "return may look like::" msgstr "" -#: ../../library/ctypes.rst:1428 +#: ../../library/ctypes.rst:1434 msgid "" ">>> from ctypes.util import dllist\n" ">>> dllist()\n" @@ -2227,24 +2235,24 @@ msgid "" "linux-gnu/libc.so.6', ... ]" msgstr "" -#: ../../library/ctypes.rst:1435 +#: ../../library/ctypes.rst:1441 msgid "Loading shared libraries" msgstr "" -#: ../../library/ctypes.rst:1437 +#: ../../library/ctypes.rst:1443 msgid "" "There are several ways to load shared libraries into the Python process. " "One way is to instantiate one of the following classes:" msgstr "" -#: ../../library/ctypes.rst:1443 +#: ../../library/ctypes.rst:1449 msgid "" "Instances of this class represent loaded shared libraries. Functions in " "these libraries use the standard C calling convention, and are assumed to " "return :c:expr:`int`." msgstr "" -#: ../../library/ctypes.rst:1447 +#: ../../library/ctypes.rst:1453 msgid "" "On Windows creating a :class:`CDLL` instance may fail even if the DLL name " "exists. When a dependent DLL of the loaded DLL is not found, a :exc:" @@ -2256,18 +2264,18 @@ msgid "" "determine which one is not found using Windows debugging and tracing tools." msgstr "" -#: ../../library/ctypes.rst:1459 ../../library/ctypes.rst:1484 -#: ../../library/ctypes.rst:1497 ../../library/ctypes.rst:1515 +#: ../../library/ctypes.rst:1465 ../../library/ctypes.rst:1490 +#: ../../library/ctypes.rst:1503 ../../library/ctypes.rst:1521 msgid "The *name* parameter can now be a :term:`path-like object`." msgstr "" -#: ../../library/ctypes.rst:1463 +#: ../../library/ctypes.rst:1469 msgid "" "`Microsoft DUMPBIN tool `_ -- A tool to find DLL dependents." msgstr "" -#: ../../library/ctypes.rst:1469 +#: ../../library/ctypes.rst:1475 msgid "" "Instances of this class represent loaded shared libraries, functions in " "these libraries use the ``stdcall`` calling convention, and are assumed to " @@ -2277,38 +2285,38 @@ msgid "" "a failure, an :class:`OSError` is automatically raised." msgstr "" -#: ../../library/ctypes.rst:1476 ../../library/ctypes.rst:1493 -#: ../../library/ctypes.rst:1637 ../../library/ctypes.rst:1645 -#: ../../library/ctypes.rst:1817 ../../library/ctypes.rst:1869 -#: ../../library/ctypes.rst:2021 ../../library/ctypes.rst:2073 -#: ../../library/ctypes.rst:2082 ../../library/ctypes.rst:2107 -#: ../../library/ctypes.rst:2121 ../../library/ctypes.rst:2130 -#: ../../library/ctypes.rst:2139 ../../library/ctypes.rst:2154 -#: ../../library/ctypes.rst:2221 ../../library/ctypes.rst:2248 -#: ../../library/ctypes.rst:2648 ../../library/ctypes.rst:3046 +#: ../../library/ctypes.rst:1482 ../../library/ctypes.rst:1499 +#: ../../library/ctypes.rst:1643 ../../library/ctypes.rst:1651 +#: ../../library/ctypes.rst:1823 ../../library/ctypes.rst:1875 +#: ../../library/ctypes.rst:2027 ../../library/ctypes.rst:2099 +#: ../../library/ctypes.rst:2108 ../../library/ctypes.rst:2133 +#: ../../library/ctypes.rst:2147 ../../library/ctypes.rst:2156 +#: ../../library/ctypes.rst:2165 ../../library/ctypes.rst:2180 +#: ../../library/ctypes.rst:2247 ../../library/ctypes.rst:2274 +#: ../../library/ctypes.rst:2674 ../../library/ctypes.rst:3072 msgid "Availability" msgstr "" -#: ../../library/ctypes.rst:1478 +#: ../../library/ctypes.rst:1484 msgid "" ":exc:`WindowsError` used to be raised, which is now an alias of :exc:" "`OSError`." msgstr "" -#: ../../library/ctypes.rst:1489 +#: ../../library/ctypes.rst:1495 msgid "" "Instances of this class represent loaded shared libraries, functions in " "these libraries use the ``stdcall`` calling convention, and are assumed to " "return :c:expr:`int` by default." msgstr "" -#: ../../library/ctypes.rst:1500 +#: ../../library/ctypes.rst:1506 msgid "" "The Python :term:`global interpreter lock` is released before calling any " "function exported by these libraries, and reacquired afterwards." msgstr "" -#: ../../library/ctypes.rst:1506 +#: ../../library/ctypes.rst:1512 msgid "" "Instances of this class behave like :class:`CDLL` instances, except that the " "Python GIL is *not* released during the function call, and after the " @@ -2316,11 +2324,11 @@ msgid "" "set, a Python exception is raised." msgstr "" -#: ../../library/ctypes.rst:1511 +#: ../../library/ctypes.rst:1517 msgid "Thus, this is only useful to call Python C api functions directly." msgstr "" -#: ../../library/ctypes.rst:1517 +#: ../../library/ctypes.rst:1523 msgid "" "All these classes can be instantiated by calling them with at least one " "argument, the pathname of the shared library. If you have an existing " @@ -2330,7 +2338,7 @@ msgid "" "the process, and to get a handle to it." msgstr "" -#: ../../library/ctypes.rst:1524 +#: ../../library/ctypes.rst:1530 msgid "" "The *mode* parameter can be used to specify how the library is loaded. For " "details, consult the :manpage:`dlopen(3)` manpage. On Windows, *mode* is " @@ -2338,7 +2346,7 @@ msgid "" "configurable." msgstr "" -#: ../../library/ctypes.rst:1529 +#: ../../library/ctypes.rst:1535 msgid "" "The *use_errno* parameter, when set to true, enables a ctypes mechanism that " "allows accessing the system :data:`errno` error number in a safe way. :mod:" @@ -2348,14 +2356,14 @@ msgid "" "private copy, the same happens immediately after the function call." msgstr "" -#: ../../library/ctypes.rst:1536 +#: ../../library/ctypes.rst:1542 msgid "" "The function :func:`ctypes.get_errno` returns the value of the ctypes " "private copy, and the function :func:`ctypes.set_errno` changes the ctypes " "private copy to a new value and returns the former value." msgstr "" -#: ../../library/ctypes.rst:1540 +#: ../../library/ctypes.rst:1546 msgid "" "The *use_last_error* parameter, when set to true, enables the same mechanism " "for the Windows error code which is managed by the :func:`GetLastError` and :" @@ -2364,7 +2372,7 @@ msgid "" "private copy of the windows error code." msgstr "" -#: ../../library/ctypes.rst:1546 +#: ../../library/ctypes.rst:1552 msgid "" "The *winmode* parameter is used on Windows to specify how the library is " "loaded (since *mode* is ignored). It takes any value that is valid for the " @@ -2374,29 +2382,29 @@ msgid "" "ensure the correct library and dependencies are loaded." msgstr "" -#: ../../library/ctypes.rst:1553 +#: ../../library/ctypes.rst:1559 msgid "Added *winmode* parameter." msgstr "" -#: ../../library/ctypes.rst:1560 +#: ../../library/ctypes.rst:1566 msgid "" "Flag to use as *mode* parameter. On platforms where this flag is not " "available, it is defined as the integer zero." msgstr "" -#: ../../library/ctypes.rst:1567 +#: ../../library/ctypes.rst:1573 msgid "" "Flag to use as *mode* parameter. On platforms where this is not available, " "it is the same as *RTLD_GLOBAL*." msgstr "" -#: ../../library/ctypes.rst:1574 +#: ../../library/ctypes.rst:1580 msgid "" "The default mode which is used to load shared libraries. On OSX 10.3, this " "is *RTLD_GLOBAL*, otherwise it is the same as *RTLD_LOCAL*." msgstr "" -#: ../../library/ctypes.rst:1577 +#: ../../library/ctypes.rst:1583 msgid "" "Instances of these classes have no public methods. Functions exported by " "the shared library can be accessed as attributes or by index. Please note " @@ -2405,7 +2413,7 @@ msgid "" "other hand, accessing it through an index returns a new object each time::" msgstr "" -#: ../../library/ctypes.rst:1583 +#: ../../library/ctypes.rst:1589 msgid "" ">>> from ctypes import CDLL\n" ">>> libc = CDLL(\"libc.so.6\") # On Linux\n" @@ -2415,21 +2423,21 @@ msgid "" "False" msgstr "" -#: ../../library/ctypes.rst:1590 +#: ../../library/ctypes.rst:1596 msgid "" "The following public attributes are available, their name starts with an " "underscore to not clash with exported function names:" msgstr "" -#: ../../library/ctypes.rst:1596 +#: ../../library/ctypes.rst:1602 msgid "The system handle used to access the library." msgstr "" -#: ../../library/ctypes.rst:1601 +#: ../../library/ctypes.rst:1607 msgid "The name of the library passed in the constructor." msgstr "" -#: ../../library/ctypes.rst:1603 +#: ../../library/ctypes.rst:1609 msgid "" "Shared libraries can also be loaded by using one of the prefabricated " "objects, which are instances of the :class:`LibraryLoader` class, either by " @@ -2437,13 +2445,13 @@ msgid "" "library as attribute of the loader instance." msgstr "" -#: ../../library/ctypes.rst:1611 +#: ../../library/ctypes.rst:1617 msgid "" "Class which loads shared libraries. *dlltype* should be one of the :class:" "`CDLL`, :class:`PyDLL`, :class:`WinDLL`, or :class:`OleDLL` types." msgstr "" -#: ../../library/ctypes.rst:1614 +#: ../../library/ctypes.rst:1620 msgid "" ":meth:`!__getattr__` has special behavior: It allows loading a shared " "library by accessing it as attribute of a library loader instance. The " @@ -2451,39 +2459,39 @@ msgid "" "each time." msgstr "" -#: ../../library/ctypes.rst:1620 +#: ../../library/ctypes.rst:1626 msgid "" "Load a shared library into the process and return it. This method always " "returns a new instance of the library." msgstr "" -#: ../../library/ctypes.rst:1624 +#: ../../library/ctypes.rst:1630 msgid "These prefabricated library loaders are available:" msgstr "" -#: ../../library/ctypes.rst:1629 +#: ../../library/ctypes.rst:1635 msgid "Creates :class:`CDLL` instances." msgstr "" -#: ../../library/ctypes.rst:1635 +#: ../../library/ctypes.rst:1641 msgid "Creates :class:`WinDLL` instances." msgstr "" -#: ../../library/ctypes.rst:1643 +#: ../../library/ctypes.rst:1649 msgid "Creates :class:`OleDLL` instances." msgstr "" -#: ../../library/ctypes.rst:1651 +#: ../../library/ctypes.rst:1657 msgid "Creates :class:`PyDLL` instances." msgstr "" -#: ../../library/ctypes.rst:1654 +#: ../../library/ctypes.rst:1660 msgid "" "For accessing the C Python api directly, a ready-to-use Python shared " "library object is available:" msgstr "" -#: ../../library/ctypes.rst:1660 +#: ../../library/ctypes.rst:1666 msgid "" "An instance of :class:`PyDLL` that exposes Python C API functions as " "attributes. Note that all these functions are assumed to return C :c:expr:" @@ -2491,32 +2499,32 @@ msgid "" "correct :attr:`!restype` attribute to use these functions." msgstr "" -#: ../../library/ctypes.rst:1665 ../../library/ctypes.rst:1667 +#: ../../library/ctypes.rst:1671 ../../library/ctypes.rst:1673 msgid "" "Loading a library through any of these objects raises an :ref:`auditing " "event ` ``ctypes.dlopen`` with string argument ``name``, the name " "used to load the library." msgstr "" -#: ../../library/ctypes.rst:1671 ../../library/ctypes.rst:1673 +#: ../../library/ctypes.rst:1677 ../../library/ctypes.rst:1679 msgid "" "Accessing a function on a loaded library raises an auditing event ``ctypes." "dlsym`` with arguments ``library`` (the library object) and ``name`` (the " "symbol's name as a string or integer)." msgstr "" -#: ../../library/ctypes.rst:1677 ../../library/ctypes.rst:1679 +#: ../../library/ctypes.rst:1683 ../../library/ctypes.rst:1685 msgid "" "In cases when only the library handle is available rather than the object, " "accessing a function raises an auditing event ``ctypes.dlsym/handle`` with " "arguments ``handle`` (the raw library handle) and ``name``." msgstr "" -#: ../../library/ctypes.rst:1686 +#: ../../library/ctypes.rst:1692 msgid "Foreign functions" msgstr "" -#: ../../library/ctypes.rst:1688 +#: ../../library/ctypes.rst:1694 msgid "" "As explained in the previous section, foreign functions can be accessed as " "attributes of loaded shared libraries. The function objects created in this " @@ -2525,13 +2533,13 @@ msgid "" "library loader." msgstr "" -#: ../../library/ctypes.rst:1693 +#: ../../library/ctypes.rst:1699 msgid "" "They are instances of a private local class :class:`!_FuncPtr` (not exposed " "in :mod:`!ctypes`) which inherits from the private :class:`_CFuncPtr` class:" msgstr "" -#: ../../library/ctypes.rst:1696 +#: ../../library/ctypes.rst:1702 msgid "" ">>> import ctypes\n" ">>> lib = ctypes.CDLL(None)\n" @@ -2541,29 +2549,29 @@ msgid "" "False" msgstr "" -#: ../../library/ctypes.rst:1707 +#: ../../library/ctypes.rst:1713 msgid "Base class for C callable foreign functions." msgstr "" -#: ../../library/ctypes.rst:1709 +#: ../../library/ctypes.rst:1715 msgid "" "Instances of foreign functions are also C compatible data types; they " "represent C function pointers." msgstr "" -#: ../../library/ctypes.rst:1712 +#: ../../library/ctypes.rst:1718 msgid "" "This behavior can be customized by assigning to special attributes of the " "foreign function object." msgstr "" -#: ../../library/ctypes.rst:1717 +#: ../../library/ctypes.rst:1723 msgid "" "Assign a ctypes type to specify the result type of the foreign function. Use " "``None`` for :c:expr:`void`, a function not returning anything." msgstr "" -#: ../../library/ctypes.rst:1720 +#: ../../library/ctypes.rst:1726 msgid "" "It is possible to assign a callable Python object that is not a ctypes type, " "in this case the function is assumed to return a C :c:expr:`int`, and the " @@ -2573,7 +2581,7 @@ msgid "" "callable to the :attr:`errcheck` attribute." msgstr "" -#: ../../library/ctypes.rst:1729 +#: ../../library/ctypes.rst:1735 msgid "" "Assign a tuple of ctypes types to specify the argument types that the " "function accepts. Functions using the ``stdcall`` calling convention can " @@ -2582,7 +2590,7 @@ msgid "" "unspecified arguments as well." msgstr "" -#: ../../library/ctypes.rst:1735 +#: ../../library/ctypes.rst:1741 msgid "" "When a foreign function is called, each actual argument is passed to the :" "meth:`~_CData.from_param` class method of the items in the :attr:`argtypes` " @@ -2592,7 +2600,7 @@ msgid "" "object using ctypes conversion rules." msgstr "" -#: ../../library/ctypes.rst:1742 +#: ../../library/ctypes.rst:1748 msgid "" "New: It is now possible to put items in argtypes which are not ctypes types, " "but each item must have a :meth:`~_CData.from_param` method which returns a " @@ -2600,38 +2608,38 @@ msgid "" "defining adapters that can adapt custom objects as function parameters." msgstr "" -#: ../../library/ctypes.rst:1749 +#: ../../library/ctypes.rst:1755 msgid "" "Assign a Python function or another callable to this attribute. The callable " "will be called with three or more arguments:" msgstr "" -#: ../../library/ctypes.rst:1756 +#: ../../library/ctypes.rst:1762 msgid "" "*result* is what the foreign function returns, as specified by the :attr:`!" "restype` attribute." msgstr "" -#: ../../library/ctypes.rst:1759 +#: ../../library/ctypes.rst:1765 msgid "" "*func* is the foreign function object itself, this allows reusing the same " "callable object to check or post process the results of several functions." msgstr "" -#: ../../library/ctypes.rst:1763 +#: ../../library/ctypes.rst:1769 msgid "" "*arguments* is a tuple containing the parameters originally passed to the " "function call, this allows specializing the behavior on the arguments used." msgstr "" -#: ../../library/ctypes.rst:1767 +#: ../../library/ctypes.rst:1773 msgid "" "The object that this function returns will be returned from the foreign " "function call, but it can also check the result value and raise an exception " "if the foreign function call failed." msgstr "" -#: ../../library/ctypes.rst:1772 ../../library/ctypes.rst:1774 +#: ../../library/ctypes.rst:1778 ../../library/ctypes.rst:1780 msgid "" "On Windows, when a foreign function call raises a system exception (for " "example, due to an access violation), it will be captured and replaced with " @@ -2640,18 +2648,18 @@ msgid "" "hook to replace the exception with its own." msgstr "" -#: ../../library/ctypes.rst:1780 ../../library/ctypes.rst:1782 +#: ../../library/ctypes.rst:1786 ../../library/ctypes.rst:1788 msgid "" "Some ways to invoke foreign function calls as well as some of the functions " "in this module may raise an auditing event ``ctypes.call_function`` with " "arguments ``function pointer`` and ``arguments``." msgstr "" -#: ../../library/ctypes.rst:1789 +#: ../../library/ctypes.rst:1795 msgid "Function prototypes" msgstr "" -#: ../../library/ctypes.rst:1791 +#: ../../library/ctypes.rst:1797 msgid "" "Foreign functions can also be created by instantiating function prototypes. " "Function prototypes are similar to function prototypes in C; they describe a " @@ -2662,7 +2670,7 @@ msgid "" "``@wrapper`` syntax. See :ref:`ctypes-callback-functions` for examples." msgstr "" -#: ../../library/ctypes.rst:1802 +#: ../../library/ctypes.rst:1808 msgid "" "The returned function prototype creates functions that use the standard C " "calling convention. The function will release the GIL during the call. If " @@ -2671,37 +2679,37 @@ msgid "" "after the call; *use_last_error* does the same for the Windows error code." msgstr "" -#: ../../library/ctypes.rst:1812 +#: ../../library/ctypes.rst:1818 msgid "" "The returned function prototype creates functions that use the ``stdcall`` " "calling convention. The function will release the GIL during the call. " "*use_errno* and *use_last_error* have the same meaning as above." msgstr "" -#: ../../library/ctypes.rst:1822 +#: ../../library/ctypes.rst:1828 msgid "" "The returned function prototype creates functions that use the Python " "calling convention. The function will *not* release the GIL during the call." msgstr "" -#: ../../library/ctypes.rst:1825 +#: ../../library/ctypes.rst:1831 msgid "" "Function prototypes created by these factory functions can be instantiated " "in different ways, depending on the type and number of the parameters in the " "call:" msgstr "" -#: ../../library/ctypes.rst:1832 +#: ../../library/ctypes.rst:1838 msgid "" "Returns a foreign function at the specified address which must be an integer." msgstr "" -#: ../../library/ctypes.rst:1839 +#: ../../library/ctypes.rst:1845 msgid "" "Create a C callable function (a callback function) from a Python *callable*." msgstr "" -#: ../../library/ctypes.rst:1846 +#: ../../library/ctypes.rst:1852 msgid "" "Returns a foreign function exported by a shared library. *func_spec* must be " "a 2-tuple ``(name_or_ordinal, library)``. The first item is the name of the " @@ -2709,7 +2717,7 @@ msgid "" "small integer. The second item is the shared library instance." msgstr "" -#: ../../library/ctypes.rst:1856 +#: ../../library/ctypes.rst:1862 msgid "" "Returns a foreign function that will call a COM method. *vtbl_index* is the " "index into the virtual function table, a small non-negative integer. *name* " @@ -2717,86 +2725,86 @@ msgid "" "identifier which is used in extended error reporting." msgstr "" -#: ../../library/ctypes.rst:1861 +#: ../../library/ctypes.rst:1867 msgid "" "If *iid* is not specified, an :exc:`OSError` is raised if the COM method " "call fails. If *iid* is specified, a :exc:`~ctypes.COMError` is raised " "instead." msgstr "" -#: ../../library/ctypes.rst:1865 +#: ../../library/ctypes.rst:1871 msgid "" "COM methods use a special calling convention: They require a pointer to the " "COM interface as first argument, in addition to those parameters that are " "specified in the :attr:`!argtypes` tuple." msgstr "" -#: ../../library/ctypes.rst:1872 +#: ../../library/ctypes.rst:1878 msgid "" "The optional *paramflags* parameter creates foreign function wrappers with " "much more functionality than the features described above." msgstr "" -#: ../../library/ctypes.rst:1875 +#: ../../library/ctypes.rst:1881 msgid "" "*paramflags* must be a tuple of the same length as :attr:`~_CFuncPtr." "argtypes`." msgstr "" -#: ../../library/ctypes.rst:1877 +#: ../../library/ctypes.rst:1883 msgid "" "Each item in this tuple contains further information about a parameter, it " "must be a tuple containing one, two, or three items." msgstr "" -#: ../../library/ctypes.rst:1880 +#: ../../library/ctypes.rst:1886 msgid "" "The first item is an integer containing a combination of direction flags for " "the parameter:" msgstr "" -#: ../../library/ctypes.rst:1883 +#: ../../library/ctypes.rst:1889 msgid "1" msgstr "" -#: ../../library/ctypes.rst:1884 +#: ../../library/ctypes.rst:1890 msgid "Specifies an input parameter to the function." msgstr "" -#: ../../library/ctypes.rst:1886 +#: ../../library/ctypes.rst:1892 msgid "2" msgstr "" -#: ../../library/ctypes.rst:1887 +#: ../../library/ctypes.rst:1893 msgid "Output parameter. The foreign function fills in a value." msgstr "" -#: ../../library/ctypes.rst:1889 +#: ../../library/ctypes.rst:1895 msgid "4" msgstr "" -#: ../../library/ctypes.rst:1890 +#: ../../library/ctypes.rst:1896 msgid "Input parameter which defaults to the integer zero." msgstr "" -#: ../../library/ctypes.rst:1892 +#: ../../library/ctypes.rst:1898 msgid "" "The optional second item is the parameter name as string. If this is " "specified, the foreign function can be called with named parameters." msgstr "" -#: ../../library/ctypes.rst:1895 +#: ../../library/ctypes.rst:1901 msgid "The optional third item is the default value for this parameter." msgstr "" -#: ../../library/ctypes.rst:1898 +#: ../../library/ctypes.rst:1904 msgid "" "The following example demonstrates how to wrap the Windows ``MessageBoxW`` " "function so that it supports default parameters and named arguments. The C " "declaration from the windows header file is this::" msgstr "" -#: ../../library/ctypes.rst:1902 +#: ../../library/ctypes.rst:1908 msgid "" "WINUSERAPI int WINAPI\n" "MessageBoxW(\n" @@ -2806,11 +2814,11 @@ msgid "" " UINT uType);" msgstr "" -#: ../../library/ctypes.rst:1909 ../../library/ctypes.rst:1932 +#: ../../library/ctypes.rst:1915 ../../library/ctypes.rst:1938 msgid "Here is the wrapping with :mod:`ctypes`::" msgstr "" -#: ../../library/ctypes.rst:1911 +#: ../../library/ctypes.rst:1917 msgid "" ">>> from ctypes import c_int, WINFUNCTYPE, windll\n" ">>> from ctypes.wintypes import HWND, LPCWSTR, UINT\n" @@ -2820,18 +2828,18 @@ msgid "" ">>> MessageBox = prototype((\"MessageBoxW\", windll.user32), paramflags)" msgstr "" -#: ../../library/ctypes.rst:1917 +#: ../../library/ctypes.rst:1923 msgid "The ``MessageBox`` foreign function can now be called in these ways::" msgstr "" -#: ../../library/ctypes.rst:1919 +#: ../../library/ctypes.rst:1925 msgid "" ">>> MessageBox()\n" ">>> MessageBox(text=\"Spam, spam, spam\")\n" ">>> MessageBox(flags=2, text=\"foo bar\")" msgstr "" -#: ../../library/ctypes.rst:1923 +#: ../../library/ctypes.rst:1929 msgid "" "A second example demonstrates output parameters. The win32 " "``GetWindowRect`` function retrieves the dimensions of a specified window by " @@ -2839,7 +2847,7 @@ msgid "" "the C declaration::" msgstr "" -#: ../../library/ctypes.rst:1927 +#: ../../library/ctypes.rst:1933 msgid "" "WINUSERAPI BOOL WINAPI\n" "GetWindowRect(\n" @@ -2847,7 +2855,7 @@ msgid "" " LPRECT lpRect);" msgstr "" -#: ../../library/ctypes.rst:1934 +#: ../../library/ctypes.rst:1940 msgid "" ">>> from ctypes import POINTER, WINFUNCTYPE, windll, WinError\n" ">>> from ctypes.wintypes import BOOL, HWND, RECT\n" @@ -2858,7 +2866,7 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:1941 +#: ../../library/ctypes.rst:1947 msgid "" "Functions with output parameters will automatically return the output " "parameter value if there is a single one, or a tuple containing the output " @@ -2866,7 +2874,7 @@ msgid "" "now returns a RECT instance, when called." msgstr "" -#: ../../library/ctypes.rst:1946 +#: ../../library/ctypes.rst:1952 msgid "" "Output parameters can be combined with the :attr:`~_CFuncPtr.errcheck` " "protocol to do further output processing and error checking. The win32 " @@ -2875,7 +2883,7 @@ msgid "" "exception when the api call failed::" msgstr "" -#: ../../library/ctypes.rst:1951 +#: ../../library/ctypes.rst:1957 msgid "" ">>> def errcheck(result, func, args):\n" "... if not result:\n" @@ -2886,7 +2894,7 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:1959 +#: ../../library/ctypes.rst:1965 msgid "" "If the :attr:`~_CFuncPtr.errcheck` function returns the argument tuple it " "receives unchanged, :mod:`ctypes` continues the normal processing it does on " @@ -2895,7 +2903,7 @@ msgid "" "and return them instead, the normal processing will no longer take place::" msgstr "" -#: ../../library/ctypes.rst:1965 +#: ../../library/ctypes.rst:1971 msgid "" ">>> def errcheck(result, func, args):\n" "... if not result:\n" @@ -2907,62 +2915,62 @@ msgid "" ">>>" msgstr "" -#: ../../library/ctypes.rst:1978 +#: ../../library/ctypes.rst:1984 msgid "Utility functions" msgstr "" -#: ../../library/ctypes.rst:1982 +#: ../../library/ctypes.rst:1988 msgid "" "Returns the address of the memory buffer as integer. *obj* must be an " "instance of a ctypes type." msgstr "" -#: ../../library/ctypes.rst:1985 +#: ../../library/ctypes.rst:1991 msgid "" "Raises an :ref:`auditing event ` ``ctypes.addressof`` with " "argument ``obj``." msgstr "" -#: ../../library/ctypes.rst:1990 +#: ../../library/ctypes.rst:1996 msgid "" "Returns the alignment requirements of a ctypes type. *obj_or_type* must be a " "ctypes type or instance." msgstr "" -#: ../../library/ctypes.rst:1996 +#: ../../library/ctypes.rst:2002 msgid "" "Returns a light-weight pointer to *obj*, which must be an instance of a " "ctypes type. *offset* defaults to zero, and must be an integer that will be " "added to the internal pointer value." msgstr "" -#: ../../library/ctypes.rst:2000 +#: ../../library/ctypes.rst:2006 msgid "``byref(obj, offset)`` corresponds to this C code::" msgstr "" -#: ../../library/ctypes.rst:2002 +#: ../../library/ctypes.rst:2008 msgid "(((char *)&obj) + offset)" msgstr "" -#: ../../library/ctypes.rst:2004 +#: ../../library/ctypes.rst:2010 msgid "" "The returned object can only be used as a foreign function call parameter. " "It behaves similar to ``pointer(obj)``, but the construction is a lot faster." msgstr "" -#: ../../library/ctypes.rst:2010 +#: ../../library/ctypes.rst:2016 msgid "" "Copies a COM pointer from *src* to *dst* and returns the Windows specific :c:" "type:`!HRESULT` value." msgstr "" -#: ../../library/ctypes.rst:2013 +#: ../../library/ctypes.rst:2019 msgid "" "If *src* is not ``NULL``, its ``AddRef`` method is called, incrementing the " "reference count." msgstr "" -#: ../../library/ctypes.rst:2016 +#: ../../library/ctypes.rst:2022 msgid "" "In contrast, the reference count of *dst* will not be decremented before " "assigning the new value. Unless *dst* is ``NULL``, the caller is responsible " @@ -2970,7 +2978,7 @@ msgid "" "necessary." msgstr "" -#: ../../library/ctypes.rst:2028 +#: ../../library/ctypes.rst:2034 msgid "" "This function is similar to the cast operator in C. It returns a new " "instance of *type* which points to the same memory block as *obj*. *type* " @@ -2978,75 +2986,101 @@ msgid "" "as a pointer." msgstr "" -#: ../../library/ctypes.rst:2036 +#: ../../library/ctypes.rst:2043 msgid "" "This function creates a mutable character buffer. The returned object is a " "ctypes array of :class:`c_char`." msgstr "" -#: ../../library/ctypes.rst:2039 +#: ../../library/ctypes.rst:2046 +msgid "" +"If *size* is given (and not ``None``), it must be an :class:`int`. It " +"specifies the size of the returned array." +msgstr "" + +#: ../../library/ctypes.rst:2049 +msgid "" +"If the *init* argument is given, it must be :class:`bytes`. It is used to " +"initialize the array items. Bytes not initialized this way are set to zero " +"(NUL)." +msgstr "" + +#: ../../library/ctypes.rst:2053 msgid "" -"*init_or_size* must be an integer which specifies the size of the array, or " -"a bytes object which will be used to initialize the array items." +"If *size* is not given (or if it is ``None``), the buffer is made one " +"element larger than *init*, effectively adding a NUL terminator." msgstr "" -#: ../../library/ctypes.rst:2042 +#: ../../library/ctypes.rst:2056 msgid "" -"If a bytes object is specified as first argument, the buffer is made one " -"item larger than its length so that the last element in the array is a NUL " -"termination character. An integer can be passed as second argument which " -"allows specifying the size of the array if the length of the bytes should " -"not be used." +"If both arguments are given, *size* must not be less than ``len(init)``." msgstr "" -#: ../../library/ctypes.rst:2047 +#: ../../library/ctypes.rst:2060 +msgid "" +"If *size* is equal to ``len(init)``, a NUL terminator is not added. Do not " +"treat such a buffer as a C string." +msgstr "" + +#: ../../library/ctypes.rst:2063 +msgid "For example::" +msgstr "" + +#: ../../library/ctypes.rst:2065 +msgid "" +">>> bytes(create_string_buffer(2))\n" +"b'\\x00\\x00'\n" +">>> bytes(create_string_buffer(b'ab'))\n" +"b'ab\\x00'\n" +">>> bytes(create_string_buffer(b'ab', 2))\n" +"b'ab'\n" +">>> bytes(create_string_buffer(b'ab', 4))\n" +"b'ab\\x00\\x00'\n" +">>> bytes(create_string_buffer(b'abcdef', 2))\n" +"Traceback (most recent call last):\n" +" ...\n" +"ValueError: byte string too long" +msgstr "" + +#: ../../library/ctypes.rst:2078 msgid "" "Raises an :ref:`auditing event ` ``ctypes.create_string_buffer`` " "with arguments ``init``, ``size``." msgstr "" -#: ../../library/ctypes.rst:2052 +#: ../../library/ctypes.rst:2084 msgid "" "This function creates a mutable unicode character buffer. The returned " "object is a ctypes array of :class:`c_wchar`." msgstr "" -#: ../../library/ctypes.rst:2055 -msgid "" -"*init_or_size* must be an integer which specifies the size of the array, or " -"a string which will be used to initialize the array items." -msgstr "" - -#: ../../library/ctypes.rst:2058 +#: ../../library/ctypes.rst:2087 msgid "" -"If a string is specified as first argument, the buffer is made one item " -"larger than the length of the string so that the last element in the array " -"is a NUL termination character. An integer can be passed as second argument " -"which allows specifying the size of the array if the length of the string " -"should not be used." +"The function takes the same arguments as :func:`~create_string_buffer` " +"except *init* must be a string and *size* counts :class:`c_wchar`." msgstr "" -#: ../../library/ctypes.rst:2064 +#: ../../library/ctypes.rst:2090 msgid "" "Raises an :ref:`auditing event ` ``ctypes.create_unicode_buffer`` " "with arguments ``init``, ``size``." msgstr "" -#: ../../library/ctypes.rst:2069 +#: ../../library/ctypes.rst:2095 msgid "" "This function is a hook which allows implementing in-process COM servers " "with ctypes. It is called from the DllCanUnloadNow function that the " "_ctypes extension dll exports." msgstr "" -#: ../../library/ctypes.rst:2078 +#: ../../library/ctypes.rst:2104 msgid "" "This function is a hook which allows implementing in-process COM servers " "with ctypes. It is called from the DllGetClassObject function that the " "``_ctypes`` extension dll exports." msgstr "" -#: ../../library/ctypes.rst:2088 +#: ../../library/ctypes.rst:2114 msgid "" "Try to find a library and return a pathname. *name* is the library name " "without any prefix like ``lib``, suffix like ``.so``, ``.dylib`` or version " @@ -3054,21 +3088,21 @@ msgid "" "If no library can be found, returns ``None``." msgstr "" -#: ../../library/ctypes.rst:2099 +#: ../../library/ctypes.rst:2125 msgid "" "Returns the filename of the VC runtime library used by Python, and by the " "extension modules. If the name of the library cannot be determined, " "``None`` is returned." msgstr "" -#: ../../library/ctypes.rst:2103 +#: ../../library/ctypes.rst:2129 msgid "" "If you need to free memory, for example, allocated by an extension module " "with a call to the ``free(void *)``, it is important that you use the " "function in the same library that allocated the memory." msgstr "" -#: ../../library/ctypes.rst:2113 +#: ../../library/ctypes.rst:2139 msgid "" "Try to provide a list of paths of the shared libraries loaded into the " "current process. These paths are not normalized or processed in any way. " @@ -3076,72 +3110,72 @@ msgid "" "The exact functionality is system dependent." msgstr "" -#: ../../library/ctypes.rst:2118 +#: ../../library/ctypes.rst:2144 msgid "" "On most platforms, the first element of the list represents the current " "executable file. It may be an empty string." msgstr "" -#: ../../library/ctypes.rst:2126 +#: ../../library/ctypes.rst:2152 msgid "" "Returns a textual description of the error code *code*. If no error code is " "specified, the last error code is used by calling the Windows API function :" "func:`GetLastError`." msgstr "" -#: ../../library/ctypes.rst:2135 +#: ../../library/ctypes.rst:2161 msgid "" "Returns the last error code set by Windows in the calling thread. This " "function calls the Windows ``GetLastError()`` function directly, it does not " "return the ctypes-private copy of the error code." msgstr "" -#: ../../library/ctypes.rst:2144 +#: ../../library/ctypes.rst:2170 msgid "" "Returns the current value of the ctypes-private copy of the system :data:" "`errno` variable in the calling thread." msgstr "" -#: ../../library/ctypes.rst:2147 +#: ../../library/ctypes.rst:2173 msgid "" "Raises an :ref:`auditing event ` ``ctypes.get_errno`` with no " "arguments." msgstr "" -#: ../../library/ctypes.rst:2151 +#: ../../library/ctypes.rst:2177 msgid "" "Returns the current value of the ctypes-private copy of the system :data:`!" "LastError` variable in the calling thread." msgstr "" -#: ../../library/ctypes.rst:2156 +#: ../../library/ctypes.rst:2182 msgid "" "Raises an :ref:`auditing event ` ``ctypes.get_last_error`` with no " "arguments." msgstr "" -#: ../../library/ctypes.rst:2161 +#: ../../library/ctypes.rst:2187 msgid "" "Same as the standard C memmove library function: copies *count* bytes from " "*src* to *dst*. *dst* and *src* must be integers or ctypes instances that " "can be converted to pointers." msgstr "" -#: ../../library/ctypes.rst:2168 +#: ../../library/ctypes.rst:2194 msgid "" "Same as the standard C memset library function: fills the memory block at " "address *dst* with *count* bytes of value *c*. *dst* must be an integer " "specifying an address, or a ctypes instance." msgstr "" -#: ../../library/ctypes.rst:2175 +#: ../../library/ctypes.rst:2201 msgid "" "Create or return a ctypes pointer type. Pointer types are cached and reused " "internally, so calling this function repeatedly is cheap. *type* must be a " "ctypes type." msgstr "" -#: ../../library/ctypes.rst:2181 +#: ../../library/ctypes.rst:2207 msgid "" "The resulting pointer type is cached in the ``__pointer_type__`` attribute " "of *type*. It is possible to set this attribute before the first call to " @@ -3150,19 +3184,19 @@ msgid "" "relying on implementation details that may change in future Python versions." msgstr "" -#: ../../library/ctypes.rst:2192 +#: ../../library/ctypes.rst:2218 msgid "" "Create a new pointer instance, pointing to *obj*. The returned object is of " "the type ``POINTER(type(obj))``." msgstr "" -#: ../../library/ctypes.rst:2195 +#: ../../library/ctypes.rst:2221 msgid "" "Note: If you just want to pass a pointer to an object to a foreign function " "call, you should use ``byref(obj)`` which is much faster." msgstr "" -#: ../../library/ctypes.rst:2201 +#: ../../library/ctypes.rst:2227 msgid "" "This function resizes the internal memory buffer of *obj*, which must be an " "instance of a ctypes type. It is not possible to make the buffer smaller " @@ -3170,50 +3204,50 @@ msgid "" "but it is possible to enlarge the buffer." msgstr "" -#: ../../library/ctypes.rst:2209 +#: ../../library/ctypes.rst:2235 msgid "" "Set the current value of the ctypes-private copy of the system :data:`errno` " "variable in the calling thread to *value* and return the previous value." msgstr "" -#: ../../library/ctypes.rst:2212 +#: ../../library/ctypes.rst:2238 msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_errno`` with " "argument ``errno``." msgstr "" -#: ../../library/ctypes.rst:2217 +#: ../../library/ctypes.rst:2243 msgid "" "Sets the current value of the ctypes-private copy of the system :data:`!" "LastError` variable in the calling thread to *value* and return the previous " "value." msgstr "" -#: ../../library/ctypes.rst:2223 +#: ../../library/ctypes.rst:2249 msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_last_error`` with " "argument ``error``." msgstr "" -#: ../../library/ctypes.rst:2228 +#: ../../library/ctypes.rst:2254 msgid "" "Returns the size in bytes of a ctypes type or instance memory buffer. Does " "the same as the C ``sizeof`` operator." msgstr "" -#: ../../library/ctypes.rst:2234 +#: ../../library/ctypes.rst:2260 msgid "" "Return the byte string at *void \\*ptr*. If *size* is specified, it is used " "as size, otherwise the string is assumed to be zero-terminated." msgstr "" -#: ../../library/ctypes.rst:2238 +#: ../../library/ctypes.rst:2264 msgid "" "Raises an :ref:`auditing event ` ``ctypes.string_at`` with " "arguments ``ptr``, ``size``." msgstr "" -#: ../../library/ctypes.rst:2243 +#: ../../library/ctypes.rst:2269 msgid "" "Creates an instance of :exc:`OSError`. If *code* is not specified, :func:" "`GetLastError` is called to determine the error code. If *descr* is not " @@ -3221,39 +3255,39 @@ msgid "" "error." msgstr "" -#: ../../library/ctypes.rst:2250 +#: ../../library/ctypes.rst:2276 msgid "" "An instance of :exc:`WindowsError` used to be created, which is now an alias " "of :exc:`OSError`." msgstr "" -#: ../../library/ctypes.rst:2257 +#: ../../library/ctypes.rst:2283 msgid "" "Return the wide-character string at *void \\*ptr*. If *size* is specified, " "it is used as the number of characters of the string, otherwise the string " "is assumed to be zero-terminated." msgstr "" -#: ../../library/ctypes.rst:2262 +#: ../../library/ctypes.rst:2288 msgid "" "Raises an :ref:`auditing event ` ``ctypes.wstring_at`` with " "arguments ``ptr``, ``size``." msgstr "" -#: ../../library/ctypes.rst:2267 +#: ../../library/ctypes.rst:2293 msgid "" "Return a :class:`memoryview` object of length *size* that references memory " "starting at *void \\*ptr*." msgstr "" -#: ../../library/ctypes.rst:2270 +#: ../../library/ctypes.rst:2296 msgid "" "If *readonly* is true, the returned :class:`!memoryview` object can not be " "used to modify the underlying memory. (Changes made by other means will " "still be reflected in the returned object.)" msgstr "" -#: ../../library/ctypes.rst:2275 +#: ../../library/ctypes.rst:2301 msgid "" "This function is similar to :func:`string_at` with the key difference of not " "making a copy of the specified memory. It is a semantically equivalent (but " @@ -3263,17 +3297,17 @@ msgid "" "`~ctypes.byref` object.)" msgstr "" -#: ../../library/ctypes.rst:2282 +#: ../../library/ctypes.rst:2308 msgid "" "Raises an :ref:`auditing event ` ``ctypes.memoryview_at`` with " "arguments ``address``, ``size``, ``readonly``." msgstr "" -#: ../../library/ctypes.rst:2290 +#: ../../library/ctypes.rst:2316 msgid "Data types" msgstr "" -#: ../../library/ctypes.rst:2295 +#: ../../library/ctypes.rst:2321 msgid "" "This non-public class is the common base class of all ctypes data types. " "Among other things, all ctypes type instances contain a memory block that " @@ -3283,13 +3317,13 @@ msgid "" "alive in case the memory block contains pointers." msgstr "" -#: ../../library/ctypes.rst:2302 +#: ../../library/ctypes.rst:2328 msgid "" "Common methods of ctypes data types, these are all class methods (to be " "exact, they are methods of the :term:`metaclass`):" msgstr "" -#: ../../library/ctypes.rst:2307 +#: ../../library/ctypes.rst:2333 msgid "" "This method returns a ctypes instance that shares the buffer of the *source* " "object. The *source* object must support the writeable buffer interface. " @@ -3298,13 +3332,13 @@ msgid "" "exc:`ValueError` is raised." msgstr "" -#: ../../library/ctypes.rst:2313 ../../library/ctypes.rst:2323 +#: ../../library/ctypes.rst:2339 ../../library/ctypes.rst:2349 msgid "" "Raises an :ref:`auditing event ` ``ctypes.cdata/buffer`` with " "arguments ``pointer``, ``size``, ``offset``." msgstr "" -#: ../../library/ctypes.rst:2317 +#: ../../library/ctypes.rst:2343 msgid "" "This method creates a ctypes instance, copying the buffer from the *source* " "object buffer which must be readable. The optional *offset* parameter " @@ -3312,19 +3346,19 @@ msgid "" "If the source buffer is not large enough a :exc:`ValueError` is raised." msgstr "" -#: ../../library/ctypes.rst:2327 +#: ../../library/ctypes.rst:2353 msgid "" "This method returns a ctypes type instance using the memory specified by " "*address* which must be an integer." msgstr "" -#: ../../library/ctypes.rst:2330 ../../library/ctypes.rst:2332 +#: ../../library/ctypes.rst:2356 ../../library/ctypes.rst:2358 msgid "" "This method, and others that indirectly call this method, raises an :ref:" "`auditing event ` ``ctypes.cdata`` with argument ``address``." msgstr "" -#: ../../library/ctypes.rst:2338 +#: ../../library/ctypes.rst:2364 msgid "" "This method adapts *obj* to a ctypes type. It is called with the actual " "object used in a foreign function call when the type is present in the " @@ -3332,36 +3366,36 @@ msgid "" "object that can be used as a function call parameter." msgstr "" -#: ../../library/ctypes.rst:2343 +#: ../../library/ctypes.rst:2369 msgid "" "All ctypes data types have a default implementation of this classmethod that " "normally returns *obj* if that is an instance of the type. Some types " "accept other objects as well." msgstr "" -#: ../../library/ctypes.rst:2349 +#: ../../library/ctypes.rst:2375 msgid "" "This method returns a ctypes type instance exported by a shared library. " "*name* is the name of the symbol that exports the data, *library* is the " "loaded shared library." msgstr "" -#: ../../library/ctypes.rst:2353 +#: ../../library/ctypes.rst:2379 msgid "Common class variables of ctypes data types:" msgstr "" -#: ../../library/ctypes.rst:2357 +#: ../../library/ctypes.rst:2383 msgid "" "The pointer type that was created by calling :func:`POINTER` for " "corresponding ctypes data type. If a pointer type was not yet created, the " "attribute is missing." msgstr "" -#: ../../library/ctypes.rst:2363 +#: ../../library/ctypes.rst:2389 msgid "Common instance variables of ctypes data types:" msgstr "" -#: ../../library/ctypes.rst:2367 +#: ../../library/ctypes.rst:2393 msgid "" "Sometimes ctypes data instances do not own the memory block they contain, " "instead they share part of the memory block of a base object. The :attr:" @@ -3369,13 +3403,13 @@ msgid "" "block." msgstr "" -#: ../../library/ctypes.rst:2374 +#: ../../library/ctypes.rst:2400 msgid "" "This read-only variable is true when the ctypes data instance has allocated " "the memory block itself, false otherwise." msgstr "" -#: ../../library/ctypes.rst:2379 +#: ../../library/ctypes.rst:2405 msgid "" "This member is either ``None`` or a dictionary containing Python objects " "that need to be kept alive so that the memory block contents is kept valid. " @@ -3383,7 +3417,7 @@ msgid "" "dictionary." msgstr "" -#: ../../library/ctypes.rst:2392 +#: ../../library/ctypes.rst:2418 msgid "" "This non-public class is the base class of all fundamental ctypes data " "types. It is mentioned here because it contains the common attributes of the " @@ -3392,11 +3426,11 @@ msgid "" "types that are not and do not contain pointers can now be pickled." msgstr "" -#: ../../library/ctypes.rst:2398 +#: ../../library/ctypes.rst:2424 msgid "Instances have a single attribute:" msgstr "" -#: ../../library/ctypes.rst:2402 +#: ../../library/ctypes.rst:2428 msgid "" "This attribute contains the actual value of the instance. For integer and " "pointer types, it is an integer, for character types, it is a single " @@ -3404,7 +3438,7 @@ msgid "" "bytes object or string." msgstr "" -#: ../../library/ctypes.rst:2407 +#: ../../library/ctypes.rst:2433 msgid "" "When the ``value`` attribute is retrieved from a ctypes instance, usually a " "new object is returned each time. :mod:`ctypes` does *not* implement " @@ -3412,7 +3446,7 @@ msgid "" "true for all other ctypes object instances." msgstr "" -#: ../../library/ctypes.rst:2413 +#: ../../library/ctypes.rst:2439 msgid "" "Fundamental data types, when returned as foreign function call results, or, " "for example, by retrieving structure field members or array items, are " @@ -3422,7 +3456,7 @@ msgid "" "instance." msgstr "" -#: ../../library/ctypes.rst:2421 +#: ../../library/ctypes.rst:2447 msgid "" "Subclasses of fundamental data types do *not* inherit this behavior. So, if " "a foreign functions :attr:`!restype` is a subclass of :class:`c_void_p`, you " @@ -3430,25 +3464,25 @@ msgid "" "you can get the value of the pointer by accessing the ``value`` attribute." msgstr "" -#: ../../library/ctypes.rst:2426 +#: ../../library/ctypes.rst:2452 msgid "These are the fundamental ctypes data types:" msgstr "" -#: ../../library/ctypes.rst:2430 +#: ../../library/ctypes.rst:2456 msgid "" "Represents the C :c:expr:`signed char` datatype, and interprets the value as " "small integer. The constructor accepts an optional integer initializer; no " "overflow checking is done." msgstr "" -#: ../../library/ctypes.rst:2437 +#: ../../library/ctypes.rst:2463 msgid "" "Represents the C :c:expr:`char` datatype, and interprets the value as a " "single character. The constructor accepts an optional string initializer, " "the length of the string must be exactly one character." msgstr "" -#: ../../library/ctypes.rst:2444 +#: ../../library/ctypes.rst:2470 msgid "" "Represents the C :c:expr:`char *` datatype when it points to a zero-" "terminated string. For a general character pointer that may also point to " @@ -3456,204 +3490,204 @@ msgid "" "integer address, or a bytes object." msgstr "" -#: ../../library/ctypes.rst:2452 +#: ../../library/ctypes.rst:2478 msgid "" "Represents the C :c:expr:`double` datatype. The constructor accepts an " "optional float initializer." msgstr "" -#: ../../library/ctypes.rst:2458 +#: ../../library/ctypes.rst:2484 msgid "" "Represents the C :c:expr:`long double` datatype. The constructor accepts an " "optional float initializer. On platforms where ``sizeof(long double) == " "sizeof(double)`` it is an alias to :class:`c_double`." msgstr "" -#: ../../library/ctypes.rst:2464 +#: ../../library/ctypes.rst:2490 msgid "" "Represents the C :c:expr:`float` datatype. The constructor accepts an " "optional float initializer." msgstr "" -#: ../../library/ctypes.rst:2470 +#: ../../library/ctypes.rst:2496 msgid "" "Represents the C :c:expr:`double complex` datatype, if available. The " "constructor accepts an optional :class:`complex` initializer." msgstr "" -#: ../../library/ctypes.rst:2478 +#: ../../library/ctypes.rst:2504 msgid "" "Represents the C :c:expr:`float complex` datatype, if available. The " "constructor accepts an optional :class:`complex` initializer." msgstr "" -#: ../../library/ctypes.rst:2486 +#: ../../library/ctypes.rst:2512 msgid "" "Represents the C :c:expr:`long double complex` datatype, if available. The " "constructor accepts an optional :class:`complex` initializer." msgstr "" -#: ../../library/ctypes.rst:2494 +#: ../../library/ctypes.rst:2520 msgid "" "Represents the C :c:expr:`signed int` datatype. The constructor accepts an " "optional integer initializer; no overflow checking is done. On platforms " "where ``sizeof(int) == sizeof(long)`` it is an alias to :class:`c_long`." msgstr "" -#: ../../library/ctypes.rst:2501 +#: ../../library/ctypes.rst:2527 msgid "" "Represents the C 8-bit :c:expr:`signed int` datatype. Usually an alias for :" "class:`c_byte`." msgstr "" -#: ../../library/ctypes.rst:2507 +#: ../../library/ctypes.rst:2533 msgid "" "Represents the C 16-bit :c:expr:`signed int` datatype. Usually an alias " "for :class:`c_short`." msgstr "" -#: ../../library/ctypes.rst:2513 +#: ../../library/ctypes.rst:2539 msgid "" "Represents the C 32-bit :c:expr:`signed int` datatype. Usually an alias " "for :class:`c_int`." msgstr "" -#: ../../library/ctypes.rst:2519 +#: ../../library/ctypes.rst:2545 msgid "" "Represents the C 64-bit :c:expr:`signed int` datatype. Usually an alias " "for :class:`c_longlong`." msgstr "" -#: ../../library/ctypes.rst:2525 +#: ../../library/ctypes.rst:2551 msgid "" "Represents the C :c:expr:`signed long` datatype. The constructor accepts an " "optional integer initializer; no overflow checking is done." msgstr "" -#: ../../library/ctypes.rst:2531 +#: ../../library/ctypes.rst:2557 msgid "" "Represents the C :c:expr:`signed long long` datatype. The constructor " "accepts an optional integer initializer; no overflow checking is done." msgstr "" -#: ../../library/ctypes.rst:2537 +#: ../../library/ctypes.rst:2563 msgid "" "Represents the C :c:expr:`signed short` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" -#: ../../library/ctypes.rst:2543 +#: ../../library/ctypes.rst:2569 msgid "Represents the C :c:type:`size_t` datatype." msgstr "" -#: ../../library/ctypes.rst:2548 +#: ../../library/ctypes.rst:2574 msgid "Represents the C :c:type:`ssize_t` datatype." msgstr "" -#: ../../library/ctypes.rst:2555 +#: ../../library/ctypes.rst:2581 msgid "Represents the C :c:type:`time_t` datatype." msgstr "" -#: ../../library/ctypes.rst:2562 +#: ../../library/ctypes.rst:2588 msgid "" "Represents the C :c:expr:`unsigned char` datatype, it interprets the value " "as small integer. The constructor accepts an optional integer initializer; " "no overflow checking is done." msgstr "" -#: ../../library/ctypes.rst:2569 +#: ../../library/ctypes.rst:2595 msgid "" "Represents the C :c:expr:`unsigned int` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done. On platforms " "where ``sizeof(int) == sizeof(long)`` it is an alias for :class:`c_ulong`." msgstr "" -#: ../../library/ctypes.rst:2576 +#: ../../library/ctypes.rst:2602 msgid "" "Represents the C 8-bit :c:expr:`unsigned int` datatype. Usually an alias " "for :class:`c_ubyte`." msgstr "" -#: ../../library/ctypes.rst:2582 +#: ../../library/ctypes.rst:2608 msgid "" "Represents the C 16-bit :c:expr:`unsigned int` datatype. Usually an alias " "for :class:`c_ushort`." msgstr "" -#: ../../library/ctypes.rst:2588 +#: ../../library/ctypes.rst:2614 msgid "" "Represents the C 32-bit :c:expr:`unsigned int` datatype. Usually an alias " "for :class:`c_uint`." msgstr "" -#: ../../library/ctypes.rst:2594 +#: ../../library/ctypes.rst:2620 msgid "" "Represents the C 64-bit :c:expr:`unsigned int` datatype. Usually an alias " "for :class:`c_ulonglong`." msgstr "" -#: ../../library/ctypes.rst:2600 +#: ../../library/ctypes.rst:2626 msgid "" "Represents the C :c:expr:`unsigned long` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" -#: ../../library/ctypes.rst:2606 +#: ../../library/ctypes.rst:2632 msgid "" "Represents the C :c:expr:`unsigned long long` datatype. The constructor " "accepts an optional integer initializer; no overflow checking is done." msgstr "" -#: ../../library/ctypes.rst:2612 +#: ../../library/ctypes.rst:2638 msgid "" "Represents the C :c:expr:`unsigned short` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" -#: ../../library/ctypes.rst:2618 +#: ../../library/ctypes.rst:2644 msgid "" "Represents the C :c:expr:`void *` type. The value is represented as " "integer. The constructor accepts an optional integer initializer." msgstr "" -#: ../../library/ctypes.rst:2624 +#: ../../library/ctypes.rst:2650 msgid "" "Represents the C :c:type:`wchar_t` datatype, and interprets the value as a " "single character unicode string. The constructor accepts an optional string " "initializer, the length of the string must be exactly one character." msgstr "" -#: ../../library/ctypes.rst:2631 +#: ../../library/ctypes.rst:2657 msgid "" "Represents the C :c:expr:`wchar_t *` datatype, which must be a pointer to a " "zero-terminated wide character string. The constructor accepts an integer " "address, or a string." msgstr "" -#: ../../library/ctypes.rst:2638 +#: ../../library/ctypes.rst:2664 msgid "" "Represent the C :c:expr:`bool` datatype (more accurately, :c:expr:`_Bool` " "from C99). Its value can be ``True`` or ``False``, and the constructor " "accepts any object that has a truth value." msgstr "" -#: ../../library/ctypes.rst:2645 +#: ../../library/ctypes.rst:2671 msgid "" "Represents a :c:type:`!HRESULT` value, which contains success or error " "information for a function or method call." msgstr "" -#: ../../library/ctypes.rst:2653 +#: ../../library/ctypes.rst:2679 msgid "" "Represents the C :c:expr:`PyObject *` datatype. Calling this without an " "argument creates a ``NULL`` :c:expr:`PyObject *` pointer." msgstr "" -#: ../../library/ctypes.rst:2656 +#: ../../library/ctypes.rst:2682 msgid ":class:`!py_object` is now a :term:`generic type`." msgstr "" -#: ../../library/ctypes.rst:2659 +#: ../../library/ctypes.rst:2685 msgid "" "The :mod:`!ctypes.wintypes` module provides quite some other Windows " "specific data types, for example :c:type:`!HWND`, :c:type:`!WPARAM`, or :c:" @@ -3661,47 +3695,47 @@ msgid "" "are also defined." msgstr "" -#: ../../library/ctypes.rst:2667 +#: ../../library/ctypes.rst:2693 msgid "Structured data types" msgstr "" -#: ../../library/ctypes.rst:2672 +#: ../../library/ctypes.rst:2698 msgid "Abstract base class for unions in native byte order." msgstr "" -#: ../../library/ctypes.rst:2674 +#: ../../library/ctypes.rst:2700 msgid "" "Unions share common attributes and behavior with structures; see :class:" "`Structure` documentation for details." msgstr "" -#: ../../library/ctypes.rst:2679 +#: ../../library/ctypes.rst:2705 msgid "Abstract base class for unions in *big endian* byte order." msgstr "" -#: ../../library/ctypes.rst:2685 +#: ../../library/ctypes.rst:2711 msgid "Abstract base class for unions in *little endian* byte order." msgstr "" -#: ../../library/ctypes.rst:2691 +#: ../../library/ctypes.rst:2717 msgid "Abstract base class for structures in *big endian* byte order." msgstr "" -#: ../../library/ctypes.rst:2696 +#: ../../library/ctypes.rst:2722 msgid "Abstract base class for structures in *little endian* byte order." msgstr "" -#: ../../library/ctypes.rst:2698 +#: ../../library/ctypes.rst:2724 msgid "" "Structures and unions with non-native byte order cannot contain pointer type " "fields, or any other data types containing pointer type fields." msgstr "" -#: ../../library/ctypes.rst:2704 +#: ../../library/ctypes.rst:2730 msgid "Abstract base class for structures in *native* byte order." msgstr "" -#: ../../library/ctypes.rst:2706 +#: ../../library/ctypes.rst:2732 msgid "" "Concrete structure and union types must be created by subclassing one of " "these types, and at least define a :attr:`_fields_` class variable. :mod:" @@ -3709,34 +3743,34 @@ msgid "" "the fields by direct attribute accesses. These are the" msgstr "" -#: ../../library/ctypes.rst:2714 +#: ../../library/ctypes.rst:2740 msgid "" "A sequence defining the structure fields. The items must be 2-tuples or 3-" "tuples. The first item is the name of the field, the second item specifies " "the type of the field; it can be any ctypes data type." msgstr "" -#: ../../library/ctypes.rst:2718 +#: ../../library/ctypes.rst:2744 msgid "" "For integer type fields like :class:`c_int`, a third optional item can be " "given. It must be a small positive integer defining the bit width of the " "field." msgstr "" -#: ../../library/ctypes.rst:2722 +#: ../../library/ctypes.rst:2748 msgid "" "Field names must be unique within one structure or union. This is not " "checked, only one field can be accessed when names are repeated." msgstr "" -#: ../../library/ctypes.rst:2725 +#: ../../library/ctypes.rst:2751 msgid "" "It is possible to define the :attr:`_fields_` class variable *after* the " "class statement that defines the Structure subclass, this allows creating " "data types that directly or indirectly reference themselves::" msgstr "" -#: ../../library/ctypes.rst:2729 +#: ../../library/ctypes.rst:2755 msgid "" "class List(Structure):\n" " pass\n" @@ -3745,13 +3779,13 @@ msgid "" " ]" msgstr "" -#: ../../library/ctypes.rst:2735 +#: ../../library/ctypes.rst:2761 msgid "" "The :attr:`!_fields_` class variable can only be set once. Later assignments " "will raise an :exc:`AttributeError`." msgstr "" -#: ../../library/ctypes.rst:2738 +#: ../../library/ctypes.rst:2764 msgid "" "Additionally, the :attr:`!_fields_` class variable must be defined before " "the structure or union type is first used: an instance or subclass is " @@ -3761,13 +3795,13 @@ msgid "" "fields, as if :attr:`!_fields_` was empty." msgstr "" -#: ../../library/ctypes.rst:2746 +#: ../../library/ctypes.rst:2772 msgid "" "Sub-subclasses of structure types inherit the fields of the base class plus " "the :attr:`_fields_` defined in the sub-subclass, if any." msgstr "" -#: ../../library/ctypes.rst:2752 +#: ../../library/ctypes.rst:2778 msgid "" "An optional small integer that allows overriding the alignment of structure " "fields in the instance. :attr:`_pack_` must already be defined when :attr:" @@ -3775,11 +3809,11 @@ msgid "" "attribute to 0 is the same as not setting it at all." msgstr "" -#: ../../library/ctypes.rst:2757 +#: ../../library/ctypes.rst:2783 msgid "This is only implemented for the MSVC-compatible memory layout." msgstr "" -#: ../../library/ctypes.rst:2761 +#: ../../library/ctypes.rst:2787 msgid "" "For historical reasons, if :attr:`!_pack_` is non-zero, the MSVC-compatible " "layout will be used by default. On non-Windows platforms, this default is " @@ -3787,33 +3821,33 @@ msgid "" "intended, set :attr:`~Structure._layout_` to ``'ms'`` explicitly." msgstr "" -#: ../../library/ctypes.rst:2770 +#: ../../library/ctypes.rst:2796 msgid "" "An optional small integer that allows overriding the alignment of the " "structure when being packed or unpacked to/from memory. Setting this " "attribute to 0 is the same as not setting it at all." msgstr "" -#: ../../library/ctypes.rst:2778 +#: ../../library/ctypes.rst:2804 msgid "" "An optional string naming the struct/union layout. It can currently be set " "to:" msgstr "" -#: ../../library/ctypes.rst:2781 +#: ../../library/ctypes.rst:2807 msgid "" "``\"ms\"``: the layout used by the Microsoft compiler (MSVC). On GCC and " "Clang, this layout can be selected with ``__attribute__((ms_struct))``." msgstr "" -#: ../../library/ctypes.rst:2784 +#: ../../library/ctypes.rst:2810 msgid "" "``\"gcc-sysv\"``: the layout used by GCC with the System V or “SysV-like” " "data model, as used on Linux and macOS. With this layout, :attr:`~Structure." "_pack_` must be unset or zero." msgstr "" -#: ../../library/ctypes.rst:2788 +#: ../../library/ctypes.rst:2814 msgid "" "If not set explicitly, ``ctypes`` will use a default that matches the " "platform conventions. This default may change in future Python releases (for " @@ -3821,34 +3855,34 @@ msgid "" "between similar platforms is found). Currently the default will be:" msgstr "" -#: ../../library/ctypes.rst:2794 +#: ../../library/ctypes.rst:2820 msgid "On Windows: ``\"ms\"``" msgstr "" -#: ../../library/ctypes.rst:2795 +#: ../../library/ctypes.rst:2821 msgid "" "When :attr:`~Structure._pack_` is specified: ``\"ms\"``. (This is " "deprecated; see :attr:`~Structure._pack_` documentation.)" msgstr "" -#: ../../library/ctypes.rst:2797 +#: ../../library/ctypes.rst:2823 msgid "Otherwise: ``\"gcc-sysv\"``" msgstr "" -#: ../../library/ctypes.rst:2799 +#: ../../library/ctypes.rst:2825 msgid "" ":attr:`!_layout_` must already be defined when :attr:`~Structure._fields_` " "is assigned, otherwise it will have no effect." msgstr "" -#: ../../library/ctypes.rst:2806 +#: ../../library/ctypes.rst:2832 msgid "" "An optional sequence that lists the names of unnamed (anonymous) fields. :" "attr:`_anonymous_` must be already defined when :attr:`_fields_` is " "assigned, otherwise it will have no effect." msgstr "" -#: ../../library/ctypes.rst:2810 +#: ../../library/ctypes.rst:2836 msgid "" "The fields listed in this variable must be structure or union type fields. :" "mod:`ctypes` will create descriptors in the structure type that allows " @@ -3856,11 +3890,11 @@ msgid "" "structure or union field." msgstr "" -#: ../../library/ctypes.rst:2815 +#: ../../library/ctypes.rst:2841 msgid "Here is an example type (Windows)::" msgstr "" -#: ../../library/ctypes.rst:2817 +#: ../../library/ctypes.rst:2843 msgid "" "class _U(Union):\n" " _fields_ = [(\"lptdesc\", POINTER(TYPEDESC)),\n" @@ -3873,7 +3907,7 @@ msgid "" " (\"vt\", VARTYPE)]" msgstr "" -#: ../../library/ctypes.rst:2828 +#: ../../library/ctypes.rst:2854 msgid "" "The ``TYPEDESC`` structure describes a COM data type, the ``vt`` field " "specifies which one of the union fields is valid. Since the ``u`` field is " @@ -3883,7 +3917,7 @@ msgid "" "temporary union instance::" msgstr "" -#: ../../library/ctypes.rst:2835 +#: ../../library/ctypes.rst:2861 msgid "" "td = TYPEDESC()\n" "td.vt = VT_PTR\n" @@ -3891,7 +3925,7 @@ msgid "" "td.u.lptdesc = POINTER(some_type)" msgstr "" -#: ../../library/ctypes.rst:2840 +#: ../../library/ctypes.rst:2866 msgid "" "It is possible to define sub-subclasses of structures, they inherit the " "fields of the base class. If the subclass definition has a separate :attr:" @@ -3899,7 +3933,7 @@ msgid "" "of the base class." msgstr "" -#: ../../library/ctypes.rst:2845 +#: ../../library/ctypes.rst:2871 msgid "" "Structure and union constructors accept both positional and keyword " "arguments. Positional arguments are used to initialize member fields in the " @@ -3909,13 +3943,13 @@ msgid "" "names not present in :attr:`_fields_`." msgstr "" -#: ../../library/ctypes.rst:2855 +#: ../../library/ctypes.rst:2881 msgid "" "Descriptor for fields of a :class:`Structure` and :class:`Union`. For " "example::" msgstr "" -#: ../../library/ctypes.rst:2858 +#: ../../library/ctypes.rst:2884 msgid "" ">>> class Color(Structure):\n" "... _fields_ = (\n" @@ -3938,100 +3972,100 @@ msgid "" "1" msgstr "" -#: ../../library/ctypes.rst:2878 +#: ../../library/ctypes.rst:2904 msgid "All attributes are read-only." msgstr "" -#: ../../library/ctypes.rst:2880 +#: ../../library/ctypes.rst:2906 msgid "" ":class:`!CField` objects are created via :attr:`~Structure._fields_`; do not " "instantiate the class directly." msgstr "" -#: ../../library/ctypes.rst:2885 +#: ../../library/ctypes.rst:2911 msgid "" "Previously, descriptors only had ``offset`` and ``size`` attributes and a " "readable string representation; the :class:`!CField` class was not available " "directly." msgstr "" -#: ../../library/ctypes.rst:2891 +#: ../../library/ctypes.rst:2917 msgid "Name of the field, as a string." msgstr "" -#: ../../library/ctypes.rst:2895 +#: ../../library/ctypes.rst:2921 msgid "Type of the field, as a :ref:`ctypes class `." msgstr "" -#: ../../library/ctypes.rst:2900 +#: ../../library/ctypes.rst:2926 msgid "Offset of the field, in bytes." msgstr "" -#: ../../library/ctypes.rst:2902 +#: ../../library/ctypes.rst:2928 msgid "" "For bitfields, this is the offset of the underlying byte-aligned *storage " "unit*; see :attr:`~CField.bit_offset`." msgstr "" -#: ../../library/ctypes.rst:2907 +#: ../../library/ctypes.rst:2933 msgid "Size of the field, in bytes." msgstr "" -#: ../../library/ctypes.rst:2909 +#: ../../library/ctypes.rst:2935 msgid "" "For bitfields, this is the size of the underlying *storage unit*. Typically, " "it has the same size as the bitfield's type." msgstr "" -#: ../../library/ctypes.rst:2914 +#: ../../library/ctypes.rst:2940 msgid "For non-bitfields, equivalent to :attr:`~CField.byte_size`." msgstr "" -#: ../../library/ctypes.rst:2916 +#: ../../library/ctypes.rst:2942 msgid "" "For bitfields, this contains a backwards-compatible bit-packed value that " "combines :attr:`~CField.bit_size` and :attr:`~CField.bit_offset`. Prefer " "using the explicit attributes instead." msgstr "" -#: ../../library/ctypes.rst:2923 +#: ../../library/ctypes.rst:2949 msgid "True if this is a bitfield." msgstr "" -#: ../../library/ctypes.rst:2928 +#: ../../library/ctypes.rst:2954 msgid "" "The location of a bitfield within its *storage unit*, that is, within :attr:" "`~CField.byte_size` bytes of memory starting at :attr:`~CField.byte_offset`." msgstr "" -#: ../../library/ctypes.rst:2932 +#: ../../library/ctypes.rst:2958 msgid "" "To get the field's value, read the storage unit as an integer, :ref:`shift " "left ` by :attr:`!bit_offset` and take the :attr:`!bit_size` least " "significant bits." msgstr "" -#: ../../library/ctypes.rst:2936 +#: ../../library/ctypes.rst:2962 msgid "" "For non-bitfields, :attr:`!bit_offset` is zero and :attr:`!bit_size` is " "equal to ``byte_size * 8``." msgstr "" -#: ../../library/ctypes.rst:2941 +#: ../../library/ctypes.rst:2967 msgid "" "True if this field is anonymous, that is, it contains nested sub-fields that " -"should be be merged into a containing structure or union." +"should be merged into a containing structure or union." msgstr "" -#: ../../library/ctypes.rst:2948 +#: ../../library/ctypes.rst:2974 msgid "Arrays and pointers" msgstr "" -#: ../../library/ctypes.rst:2952 +#: ../../library/ctypes.rst:2978 msgid "Abstract base class for arrays." msgstr "" -#: ../../library/ctypes.rst:2954 +#: ../../library/ctypes.rst:2980 msgid "" "The recommended way to create concrete array types is by multiplying any :" "mod:`ctypes` data type with a non-negative integer. Alternatively, you can " @@ -4041,46 +4075,46 @@ msgid "" "an :class:`Array`." msgstr "" -#: ../../library/ctypes.rst:2964 +#: ../../library/ctypes.rst:2990 msgid "" "A positive integer specifying the number of elements in the array. Out-of-" "range subscripts result in an :exc:`IndexError`. Will be returned by :func:" "`len`." msgstr "" -#: ../../library/ctypes.rst:2971 +#: ../../library/ctypes.rst:2997 msgid "Specifies the type of each element in the array." msgstr "" -#: ../../library/ctypes.rst:2974 +#: ../../library/ctypes.rst:3000 msgid "" "Array subclass constructors accept positional arguments, used to initialize " "the elements in order." msgstr "" -#: ../../library/ctypes.rst:2979 +#: ../../library/ctypes.rst:3005 msgid "" "Create an array. Equivalent to ``type * length``, where *type* is a :mod:" "`ctypes` data type and *length* an integer." msgstr "" -#: ../../library/ctypes.rst:2983 +#: ../../library/ctypes.rst:3009 msgid "" "This function is :term:`soft deprecated` in favor of multiplication. There " "are no plans to remove it." msgstr "" -#: ../../library/ctypes.rst:2989 +#: ../../library/ctypes.rst:3015 msgid "Private, abstract base class for pointers." msgstr "" -#: ../../library/ctypes.rst:2991 +#: ../../library/ctypes.rst:3017 msgid "" "Concrete pointer types are created by calling :func:`POINTER` with the type " "that will be pointed to; this is done automatically by :func:`pointer`." msgstr "" -#: ../../library/ctypes.rst:2995 +#: ../../library/ctypes.rst:3021 msgid "" "If a pointer points to an array, its elements can be read and written using " "standard subscript and slice accesses. Pointer objects have no size, so :" @@ -4089,43 +4123,43 @@ msgid "" "probably crash with an access violation (if you're lucky)." msgstr "" -#: ../../library/ctypes.rst:3005 +#: ../../library/ctypes.rst:3031 msgid "Specifies the type pointed to." msgstr "" -#: ../../library/ctypes.rst:3009 +#: ../../library/ctypes.rst:3035 msgid "" "Returns the object to which to pointer points. Assigning to this attribute " "changes the pointer to point to the assigned object." msgstr "" -#: ../../library/ctypes.rst:3016 +#: ../../library/ctypes.rst:3042 msgid "Exceptions" msgstr "" -#: ../../library/ctypes.rst:3020 +#: ../../library/ctypes.rst:3046 msgid "" "This exception is raised when a foreign function call cannot convert one of " "the passed arguments." msgstr "" -#: ../../library/ctypes.rst:3026 +#: ../../library/ctypes.rst:3052 msgid "This exception is raised when a COM method call failed." msgstr "" -#: ../../library/ctypes.rst:3030 +#: ../../library/ctypes.rst:3056 msgid "The integer value representing the error code." msgstr "" -#: ../../library/ctypes.rst:3034 +#: ../../library/ctypes.rst:3060 msgid "The error message." msgstr "" -#: ../../library/ctypes.rst:3038 +#: ../../library/ctypes.rst:3064 msgid "The 5-tuple ``(descr, source, helpfile, helpcontext, progid)``." msgstr "" -#: ../../library/ctypes.rst:3040 +#: ../../library/ctypes.rst:3066 msgid "" "*descr* is the textual description. *source* is the language-dependent " "``ProgID`` for the class or application that raised the error. *helpfile* " diff --git a/library/curses.ascii.po b/library/curses.ascii.po index 4228f5290..d1811f41e 100644 --- a/library/curses.ascii.po +++ b/library/curses.ascii.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:03+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/curses.panel.po b/library/curses.panel.po index 4dfa49e57..2a917afe1 100644 --- a/library/curses.panel.po +++ b/library/curses.panel.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:03+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/curses.po b/library/curses.po index 07dad7f88..9be705c7a 100644 --- a/library/curses.po +++ b/library/curses.po @@ -7,15 +7,16 @@ # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 # Parham Forati, 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:03+0000\n" -"Last-Translator: Parham Forati, 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -297,7 +298,7 @@ msgid "" "const:`BUTTON_ALT`." msgstr "" -#: ../../library/curses.rst:230 ../../library/curses.rst:1789 +#: ../../library/curses.rst:230 ../../library/curses.rst:1797 msgid "" "The ``BUTTON5_*`` constants are now exposed if they are provided by the " "underlying curses library." @@ -1144,22 +1145,27 @@ msgstr "" #: ../../library/curses.rst:990 msgid "" -"Read a bytes object from the user, with primitive line editing capacity." +"Read a bytes object from the user, with primitive line editing capacity. The " +"maximum value for *n* is 2047." msgstr "" -#: ../../library/curses.rst:995 +#: ../../library/curses.rst:993 ../../library/curses.rst:1088 +msgid "The maximum value for *n* was increased from 1023 to 2047." +msgstr "" + +#: ../../library/curses.rst:999 msgid "" "Return a tuple ``(y, x)`` of current cursor position relative to the " "window's upper-left corner." msgstr "" -#: ../../library/curses.rst:1002 +#: ../../library/curses.rst:1006 msgid "" "Display a horizontal line starting at ``(y, x)`` with length *n* consisting " "of the character *ch*." msgstr "" -#: ../../library/curses.rst:1008 +#: ../../library/curses.rst:1012 msgid "" "If *flag* is ``False``, curses no longer considers using the hardware insert/" "delete character feature of the terminal; if *flag* is ``True``, use of " @@ -1167,13 +1173,13 @@ msgid "" "initialized, use of character insert/delete is enabled by default." msgstr "" -#: ../../library/curses.rst:1016 +#: ../../library/curses.rst:1020 msgid "" "If *flag* is ``True``, :mod:`curses` will try and use hardware line editing " "facilities. Otherwise, line insertion/deletion are disabled." msgstr "" -#: ../../library/curses.rst:1022 +#: ../../library/curses.rst:1026 msgid "" "If *flag* is ``True``, any change in the window image automatically causes " "the window to be refreshed; you no longer have to call :meth:`refresh` " @@ -1181,19 +1187,19 @@ msgid "" "calls to wrefresh. This option is disabled by default." msgstr "" -#: ../../library/curses.rst:1030 +#: ../../library/curses.rst:1034 msgid "" "Return the character at the given position in the window. The bottom 8 bits " "are the character proper, and upper bits are the attributes." msgstr "" -#: ../../library/curses.rst:1037 +#: ../../library/curses.rst:1041 msgid "" "Paint character *ch* at ``(y, x)`` with attributes *attr*, moving the line " "from position *x* right by one character." msgstr "" -#: ../../library/curses.rst:1043 +#: ../../library/curses.rst:1047 msgid "" "Insert *nlines* lines into the specified window above the current line. The " "*nlines* bottom lines are lost. For negative *nlines*, delete *nlines* " @@ -1202,13 +1208,13 @@ msgid "" "remains the same." msgstr "" -#: ../../library/curses.rst:1052 +#: ../../library/curses.rst:1056 msgid "" "Insert a blank line under the cursor. All following lines are moved down by " "one line." msgstr "" -#: ../../library/curses.rst:1059 +#: ../../library/curses.rst:1063 msgid "" "Insert a character string (as many characters as will fit on the line) " "before the character under the cursor, up to *n* characters. If *n* is " @@ -1218,7 +1224,7 @@ msgid "" "if specified)." msgstr "" -#: ../../library/curses.rst:1069 +#: ../../library/curses.rst:1073 msgid "" "Insert a character string (as many characters as will fit on the line) " "before the character under the cursor. All characters to the right of the " @@ -1227,84 +1233,85 @@ msgid "" "specified)." msgstr "" -#: ../../library/curses.rst:1078 +#: ../../library/curses.rst:1082 msgid "" "Return a bytes object of characters, extracted from the window starting at " "the current cursor position, or at *y*, *x* if specified. Attributes are " "stripped from the characters. If *n* is specified, :meth:`instr` returns a " -"string at most *n* characters long (exclusive of the trailing NUL)." +"string at most *n* characters long (exclusive of the trailing NUL). The " +"maximum value for *n* is 2047." msgstr "" -#: ../../library/curses.rst:1086 +#: ../../library/curses.rst:1094 msgid "" "Return ``True`` if the specified line was modified since the last call to :" "meth:`refresh`; otherwise return ``False``. Raise a :exc:`curses.error` " "exception if *line* is not valid for the given window." msgstr "" -#: ../../library/curses.rst:1093 +#: ../../library/curses.rst:1101 msgid "" "Return ``True`` if the specified window was modified since the last call to :" "meth:`refresh`; otherwise return ``False``." msgstr "" -#: ../../library/curses.rst:1099 +#: ../../library/curses.rst:1107 msgid "" "If *flag* is ``True``, escape sequences generated by some keys (keypad, " "function keys) will be interpreted by :mod:`curses`. If *flag* is ``False``, " "escape sequences will be left as is in the input stream." msgstr "" -#: ../../library/curses.rst:1106 +#: ../../library/curses.rst:1114 msgid "" "If *flag* is ``True``, cursor is left where it is on update, instead of " "being at \"cursor position.\" This reduces cursor movement where possible. " "If possible the cursor will be made invisible." msgstr "" -#: ../../library/curses.rst:1110 +#: ../../library/curses.rst:1118 msgid "" "If *flag* is ``False``, cursor will always be at \"cursor position\" after " "an update." msgstr "" -#: ../../library/curses.rst:1115 +#: ../../library/curses.rst:1123 msgid "Move cursor to ``(new_y, new_x)``." msgstr "" -#: ../../library/curses.rst:1120 +#: ../../library/curses.rst:1128 msgid "" "Move the window inside its parent window. The screen-relative parameters of " "the window are not changed. This routine is used to display different parts " "of the parent window at the same physical position on the screen." msgstr "" -#: ../../library/curses.rst:1127 +#: ../../library/curses.rst:1135 msgid "Move the window so its upper-left corner is at ``(new_y, new_x)``." msgstr "" -#: ../../library/curses.rst:1132 +#: ../../library/curses.rst:1140 msgid "If *flag* is ``True``, :meth:`getch` will be non-blocking." msgstr "" -#: ../../library/curses.rst:1137 +#: ../../library/curses.rst:1145 msgid "If *flag* is ``True``, escape sequences will not be timed out." msgstr "" -#: ../../library/curses.rst:1139 +#: ../../library/curses.rst:1147 msgid "" "If *flag* is ``False``, after a few milliseconds, an escape sequence will " "not be interpreted, and will be left in the input stream as is." msgstr "" -#: ../../library/curses.rst:1145 +#: ../../library/curses.rst:1153 msgid "" "Mark for refresh but wait. This function updates the data structure " "representing the desired state of the window, but does not force an update " "of the physical screen. To accomplish that, call :func:`doupdate`." msgstr "" -#: ../../library/curses.rst:1152 +#: ../../library/curses.rst:1160 msgid "" "Overlay the window on top of *destwin*. The windows need not be the same " "size, only the overlapping region is copied. This copy is non-destructive, " @@ -1312,7 +1319,7 @@ msgid "" "contents of *destwin*." msgstr "" -#: ../../library/curses.rst:1157 +#: ../../library/curses.rst:1165 msgid "" "To get fine-grained control over the copied region, the second form of :meth:" "`overlay` can be used. *sminrow* and *smincol* are the upper-left " @@ -1320,7 +1327,7 @@ msgid "" "in the destination window." msgstr "" -#: ../../library/curses.rst:1165 +#: ../../library/curses.rst:1173 msgid "" "Overwrite the window on top of *destwin*. The windows need not be the same " "size, in which case only the overlapping region is copied. This copy is " @@ -1328,7 +1335,7 @@ msgid "" "the old contents of *destwin*." msgstr "" -#: ../../library/curses.rst:1170 +#: ../../library/curses.rst:1178 msgid "" "To get fine-grained control over the copied region, the second form of :meth:" "`overwrite` can be used. *sminrow* and *smincol* are the upper-left " @@ -1336,31 +1343,31 @@ msgid "" "the destination window." msgstr "" -#: ../../library/curses.rst:1178 +#: ../../library/curses.rst:1186 msgid "" "Write all data associated with the window into the provided file object. " "This information can be later retrieved using the :func:`getwin` function." msgstr "" -#: ../../library/curses.rst:1184 +#: ../../library/curses.rst:1192 msgid "" "Indicate that the *num* screen lines, starting at line *beg*, are corrupted " "and should be completely redrawn on the next :meth:`refresh` call." msgstr "" -#: ../../library/curses.rst:1190 +#: ../../library/curses.rst:1198 msgid "" "Touch the entire window, causing it to be completely redrawn on the next :" "meth:`refresh` call." msgstr "" -#: ../../library/curses.rst:1196 +#: ../../library/curses.rst:1204 msgid "" "Update the display immediately (sync actual screen with previous drawing/" "deleting methods)." msgstr "" -#: ../../library/curses.rst:1199 +#: ../../library/curses.rst:1207 msgid "" "The 6 optional arguments can only be specified when the window is a pad " "created with :func:`newpad`. The additional parameters are needed to " @@ -1375,7 +1382,7 @@ msgid "" "*smincol* are treated as if they were zero." msgstr "" -#: ../../library/curses.rst:1213 +#: ../../library/curses.rst:1221 msgid "" "Reallocate storage for a curses window to adjust its dimensions to the " "specified values. If either dimension is larger than the current values, " @@ -1383,11 +1390,11 @@ msgid "" "rendition (as set by :meth:`bkgdset`) merged into them." msgstr "" -#: ../../library/curses.rst:1221 +#: ../../library/curses.rst:1229 msgid "Scroll the screen or scrolling region upward by *lines* lines." msgstr "" -#: ../../library/curses.rst:1226 +#: ../../library/curses.rst:1234 msgid "" "Control what happens when the cursor of a window is moved off the edge of " "the window or scrolling region, either as a result of a newline action on " @@ -1397,54 +1404,54 @@ msgid "" "scrolling effect on the terminal, it is also necessary to call :meth:`idlok`." msgstr "" -#: ../../library/curses.rst:1236 +#: ../../library/curses.rst:1244 msgid "" "Set the scrolling region from line *top* to line *bottom*. All scrolling " "actions will take place in this region." msgstr "" -#: ../../library/curses.rst:1242 +#: ../../library/curses.rst:1250 msgid "" "Turn off the standout attribute. On some terminals this has the side effect " "of turning off all attributes." msgstr "" -#: ../../library/curses.rst:1248 +#: ../../library/curses.rst:1256 msgid "Turn on attribute *A_STANDOUT*." msgstr "" -#: ../../library/curses.rst:1254 ../../library/curses.rst:1261 +#: ../../library/curses.rst:1262 ../../library/curses.rst:1269 msgid "" "Return a sub-window, whose upper-left corner is at ``(begin_y, begin_x)``, " "and whose width/height is *ncols*/*nlines*." msgstr "" -#: ../../library/curses.rst:1264 +#: ../../library/curses.rst:1272 msgid "" "By default, the sub-window will extend from the specified position to the " "lower right corner of the window." msgstr "" -#: ../../library/curses.rst:1270 +#: ../../library/curses.rst:1278 msgid "" "Touch each location in the window that has been touched in any of its " "ancestor windows. This routine is called by :meth:`refresh`, so it should " "almost never be necessary to call it manually." msgstr "" -#: ../../library/curses.rst:1277 +#: ../../library/curses.rst:1285 msgid "" "If *flag* is ``True``, then :meth:`syncup` is called automatically whenever " "there is a change in the window." msgstr "" -#: ../../library/curses.rst:1283 +#: ../../library/curses.rst:1291 msgid "" "Touch all locations in ancestors of the window that have been changed in " "the window." msgstr "" -#: ../../library/curses.rst:1289 +#: ../../library/curses.rst:1297 msgid "" "Set blocking or non-blocking read behavior for the window. If *delay* is " "negative, blocking read is used (which will wait indefinitely for input). " @@ -1454,7 +1461,7 @@ msgid "" "still no input at the end of that time." msgstr "" -#: ../../library/curses.rst:1299 +#: ../../library/curses.rst:1307 msgid "" "Pretend *count* lines have been changed, starting with line *start*. If " "*changed* is supplied, it specifies whether the affected lines are marked as " @@ -1462,49 +1469,49 @@ msgid "" "``=False``)." msgstr "" -#: ../../library/curses.rst:1306 +#: ../../library/curses.rst:1314 msgid "" "Pretend the whole window has been changed, for purposes of drawing " "optimizations." msgstr "" -#: ../../library/curses.rst:1312 +#: ../../library/curses.rst:1320 msgid "" "Mark all lines in the window as unchanged since the last call to :meth:" "`refresh`." msgstr "" -#: ../../library/curses.rst:1319 +#: ../../library/curses.rst:1327 msgid "" "Display a vertical line starting at ``(y, x)`` with length *n* consisting of " "the character *ch* with attributes *attr*." msgstr "" -#: ../../library/curses.rst:1324 +#: ../../library/curses.rst:1332 msgid "Constants" msgstr "" -#: ../../library/curses.rst:1326 +#: ../../library/curses.rst:1334 msgid "The :mod:`curses` module defines the following data members:" msgstr "" -#: ../../library/curses.rst:1331 +#: ../../library/curses.rst:1339 msgid "" "Some curses routines that return an integer, such as :meth:`~window." "getch`, return :const:`ERR` upon failure." msgstr "" -#: ../../library/curses.rst:1337 +#: ../../library/curses.rst:1345 msgid "" "Some curses routines that return an integer, such as :func:`napms`, " "return :const:`OK` upon success." msgstr "" -#: ../../library/curses.rst:1344 +#: ../../library/curses.rst:1352 msgid "A bytes object representing the current version of the module." msgstr "" -#: ../../library/curses.rst:1349 +#: ../../library/curses.rst:1357 msgid "" "A named tuple containing the three components of the ncurses library " "version: *major*, *minor*, and *patch*. All values are integers. The " @@ -1512,536 +1519,536 @@ msgid "" "is equivalent to ``curses.ncurses_version.major`` and so on." msgstr "" -#: ../../library/curses.rst:1354 +#: ../../library/curses.rst:1362 msgid "Availability: if the ncurses library is used." msgstr "" -#: ../../library/curses.rst:1360 +#: ../../library/curses.rst:1368 msgid "" "The maximum number of colors the terminal can support. It is defined only " "after the call to :func:`start_color`." msgstr "" -#: ../../library/curses.rst:1365 +#: ../../library/curses.rst:1373 msgid "" "The maximum number of color pairs the terminal can support. It is defined " "only after the call to :func:`start_color`." msgstr "" -#: ../../library/curses.rst:1370 +#: ../../library/curses.rst:1378 msgid "" "The width of the screen, i.e., the number of columns. It is defined only " "after the call to :func:`initscr`. Updated by :func:`update_lines_cols`, :" "func:`resizeterm` and :func:`resize_term`." msgstr "" -#: ../../library/curses.rst:1377 +#: ../../library/curses.rst:1385 msgid "" "The height of the screen, i.e., the number of lines. It is defined only " "after the call to :func:`initscr`. Updated by :func:`update_lines_cols`, :" "func:`resizeterm` and :func:`resize_term`." msgstr "" -#: ../../library/curses.rst:1383 +#: ../../library/curses.rst:1391 msgid "" "Some constants are available to specify character cell attributes. The exact " "constants available are system dependent." msgstr "" -#: ../../library/curses.rst:1387 +#: ../../library/curses.rst:1395 msgid "Attribute" msgstr "" -#: ../../library/curses.rst:1387 ../../library/curses.rst:1432 -#: ../../library/curses.rst:1678 ../../library/curses.rst:1770 +#: ../../library/curses.rst:1395 ../../library/curses.rst:1440 +#: ../../library/curses.rst:1686 ../../library/curses.rst:1778 msgid "Meaning" msgstr "" -#: ../../library/curses.rst:1389 +#: ../../library/curses.rst:1397 msgid "Alternate character set mode" msgstr "" -#: ../../library/curses.rst:1391 +#: ../../library/curses.rst:1399 msgid "Blink mode" msgstr "" -#: ../../library/curses.rst:1393 +#: ../../library/curses.rst:1401 msgid "Bold mode" msgstr "" -#: ../../library/curses.rst:1395 +#: ../../library/curses.rst:1403 msgid "Dim mode" msgstr "" -#: ../../library/curses.rst:1397 +#: ../../library/curses.rst:1405 msgid "Invisible or blank mode" msgstr "" -#: ../../library/curses.rst:1399 +#: ../../library/curses.rst:1407 msgid "Italic mode" msgstr "" -#: ../../library/curses.rst:1401 +#: ../../library/curses.rst:1409 msgid "Normal attribute" msgstr "" -#: ../../library/curses.rst:1403 +#: ../../library/curses.rst:1411 msgid "Protected mode" msgstr "" -#: ../../library/curses.rst:1405 +#: ../../library/curses.rst:1413 msgid "Reverse background and foreground colors" msgstr "" -#: ../../library/curses.rst:1408 +#: ../../library/curses.rst:1416 msgid "Standout mode" msgstr "" -#: ../../library/curses.rst:1410 +#: ../../library/curses.rst:1418 msgid "Underline mode" msgstr "" -#: ../../library/curses.rst:1412 +#: ../../library/curses.rst:1420 msgid "Horizontal highlight" msgstr "" -#: ../../library/curses.rst:1414 +#: ../../library/curses.rst:1422 msgid "Left highlight" msgstr "" -#: ../../library/curses.rst:1416 +#: ../../library/curses.rst:1424 msgid "Low highlight" msgstr "" -#: ../../library/curses.rst:1418 +#: ../../library/curses.rst:1426 msgid "Right highlight" msgstr "" -#: ../../library/curses.rst:1420 +#: ../../library/curses.rst:1428 msgid "Top highlight" msgstr "" -#: ../../library/curses.rst:1422 +#: ../../library/curses.rst:1430 msgid "Vertical highlight" msgstr "" -#: ../../library/curses.rst:1425 +#: ../../library/curses.rst:1433 msgid "``A_ITALIC`` was added." msgstr "" -#: ../../library/curses.rst:1428 +#: ../../library/curses.rst:1436 msgid "" "Several constants are available to extract corresponding attributes returned " "by some methods." msgstr "" -#: ../../library/curses.rst:1432 +#: ../../library/curses.rst:1440 msgid "Bit-mask" msgstr "" -#: ../../library/curses.rst:1434 +#: ../../library/curses.rst:1442 msgid "Bit-mask to extract attributes" msgstr "" -#: ../../library/curses.rst:1437 +#: ../../library/curses.rst:1445 msgid "Bit-mask to extract a character" msgstr "" -#: ../../library/curses.rst:1440 +#: ../../library/curses.rst:1448 msgid "Bit-mask to extract color-pair field information" msgstr "" -#: ../../library/curses.rst:1444 +#: ../../library/curses.rst:1452 msgid "" "Keys are referred to by integer constants with names starting with " "``KEY_``. The exact keycaps available are system dependent." msgstr "" -#: ../../library/curses.rst:1450 +#: ../../library/curses.rst:1458 msgid "Key constant" msgstr "" -#: ../../library/curses.rst:1450 +#: ../../library/curses.rst:1458 msgid "Key" msgstr "" -#: ../../library/curses.rst:1452 +#: ../../library/curses.rst:1460 msgid "Minimum key value" msgstr "" -#: ../../library/curses.rst:1454 +#: ../../library/curses.rst:1462 msgid "Break key (unreliable)" msgstr "" -#: ../../library/curses.rst:1456 +#: ../../library/curses.rst:1464 msgid "Down-arrow" msgstr "" -#: ../../library/curses.rst:1458 +#: ../../library/curses.rst:1466 msgid "Up-arrow" msgstr "" -#: ../../library/curses.rst:1460 +#: ../../library/curses.rst:1468 msgid "Left-arrow" msgstr "" -#: ../../library/curses.rst:1462 +#: ../../library/curses.rst:1470 msgid "Right-arrow" msgstr "" -#: ../../library/curses.rst:1464 +#: ../../library/curses.rst:1472 msgid "Home key (upward+left arrow)" msgstr "" -#: ../../library/curses.rst:1466 +#: ../../library/curses.rst:1474 msgid "Backspace (unreliable)" msgstr "" -#: ../../library/curses.rst:1468 +#: ../../library/curses.rst:1476 msgid "Function keys. Up to 64 function keys are supported." msgstr "" -#: ../../library/curses.rst:1471 +#: ../../library/curses.rst:1479 msgid "Value of function key *n*" msgstr "" -#: ../../library/curses.rst:1473 +#: ../../library/curses.rst:1481 msgid "Delete line" msgstr "" -#: ../../library/curses.rst:1475 +#: ../../library/curses.rst:1483 msgid "Insert line" msgstr "" -#: ../../library/curses.rst:1477 +#: ../../library/curses.rst:1485 msgid "Delete character" msgstr "" -#: ../../library/curses.rst:1479 +#: ../../library/curses.rst:1487 msgid "Insert char or enter insert mode" msgstr "" -#: ../../library/curses.rst:1481 +#: ../../library/curses.rst:1489 msgid "Exit insert char mode" msgstr "" -#: ../../library/curses.rst:1483 +#: ../../library/curses.rst:1491 msgid "Clear screen" msgstr "" -#: ../../library/curses.rst:1485 +#: ../../library/curses.rst:1493 msgid "Clear to end of screen" msgstr "" -#: ../../library/curses.rst:1487 +#: ../../library/curses.rst:1495 msgid "Clear to end of line" msgstr "" -#: ../../library/curses.rst:1489 +#: ../../library/curses.rst:1497 msgid "Scroll 1 line forward" msgstr "" -#: ../../library/curses.rst:1491 +#: ../../library/curses.rst:1499 msgid "Scroll 1 line backward (reverse)" msgstr "" -#: ../../library/curses.rst:1493 +#: ../../library/curses.rst:1501 msgid "Next page" msgstr "" -#: ../../library/curses.rst:1495 +#: ../../library/curses.rst:1503 msgid "Previous page" msgstr "" -#: ../../library/curses.rst:1497 +#: ../../library/curses.rst:1505 msgid "Set tab" msgstr "" -#: ../../library/curses.rst:1499 +#: ../../library/curses.rst:1507 msgid "Clear tab" msgstr "" -#: ../../library/curses.rst:1501 +#: ../../library/curses.rst:1509 msgid "Clear all tabs" msgstr "" -#: ../../library/curses.rst:1503 +#: ../../library/curses.rst:1511 msgid "Enter or send (unreliable)" msgstr "" -#: ../../library/curses.rst:1505 +#: ../../library/curses.rst:1513 msgid "Soft (partial) reset (unreliable)" msgstr "" -#: ../../library/curses.rst:1507 +#: ../../library/curses.rst:1515 msgid "Reset or hard reset (unreliable)" msgstr "" -#: ../../library/curses.rst:1509 +#: ../../library/curses.rst:1517 msgid "Print" msgstr "" -#: ../../library/curses.rst:1511 +#: ../../library/curses.rst:1519 msgid "Home down or bottom (lower left)" msgstr "" -#: ../../library/curses.rst:1513 +#: ../../library/curses.rst:1521 msgid "Upper left of keypad" msgstr "" -#: ../../library/curses.rst:1515 +#: ../../library/curses.rst:1523 msgid "Upper right of keypad" msgstr "" -#: ../../library/curses.rst:1517 +#: ../../library/curses.rst:1525 msgid "Center of keypad" msgstr "" -#: ../../library/curses.rst:1519 +#: ../../library/curses.rst:1527 msgid "Lower left of keypad" msgstr "" -#: ../../library/curses.rst:1521 +#: ../../library/curses.rst:1529 msgid "Lower right of keypad" msgstr "" -#: ../../library/curses.rst:1523 +#: ../../library/curses.rst:1531 msgid "Back tab" msgstr "" -#: ../../library/curses.rst:1525 +#: ../../library/curses.rst:1533 msgid "Beg (beginning)" msgstr "" -#: ../../library/curses.rst:1527 +#: ../../library/curses.rst:1535 msgid "Cancel" msgstr "" -#: ../../library/curses.rst:1529 +#: ../../library/curses.rst:1537 msgid "Close" msgstr "" -#: ../../library/curses.rst:1531 +#: ../../library/curses.rst:1539 msgid "Cmd (command)" msgstr "" -#: ../../library/curses.rst:1533 +#: ../../library/curses.rst:1541 msgid "Copy" msgstr "" -#: ../../library/curses.rst:1535 +#: ../../library/curses.rst:1543 msgid "Create" msgstr "" -#: ../../library/curses.rst:1537 +#: ../../library/curses.rst:1545 msgid "End" msgstr "" -#: ../../library/curses.rst:1539 +#: ../../library/curses.rst:1547 msgid "Exit" msgstr "" -#: ../../library/curses.rst:1541 +#: ../../library/curses.rst:1549 msgid "Find" msgstr "" -#: ../../library/curses.rst:1543 +#: ../../library/curses.rst:1551 msgid "Help" msgstr "" -#: ../../library/curses.rst:1545 +#: ../../library/curses.rst:1553 msgid "Mark" msgstr "" -#: ../../library/curses.rst:1547 +#: ../../library/curses.rst:1555 msgid "Message" msgstr "" -#: ../../library/curses.rst:1549 +#: ../../library/curses.rst:1557 msgid "Move" msgstr "" -#: ../../library/curses.rst:1551 +#: ../../library/curses.rst:1559 msgid "Next" msgstr "" -#: ../../library/curses.rst:1553 +#: ../../library/curses.rst:1561 msgid "Open" msgstr "" -#: ../../library/curses.rst:1555 +#: ../../library/curses.rst:1563 msgid "Options" msgstr "" -#: ../../library/curses.rst:1557 +#: ../../library/curses.rst:1565 msgid "Prev (previous)" msgstr "" -#: ../../library/curses.rst:1559 +#: ../../library/curses.rst:1567 msgid "Redo" msgstr "" -#: ../../library/curses.rst:1561 +#: ../../library/curses.rst:1569 msgid "Ref (reference)" msgstr "" -#: ../../library/curses.rst:1563 +#: ../../library/curses.rst:1571 msgid "Refresh" msgstr "" -#: ../../library/curses.rst:1565 +#: ../../library/curses.rst:1573 msgid "Replace" msgstr "" -#: ../../library/curses.rst:1567 +#: ../../library/curses.rst:1575 msgid "Restart" msgstr "" -#: ../../library/curses.rst:1569 +#: ../../library/curses.rst:1577 msgid "Resume" msgstr "" -#: ../../library/curses.rst:1571 +#: ../../library/curses.rst:1579 msgid "Save" msgstr "" -#: ../../library/curses.rst:1573 +#: ../../library/curses.rst:1581 msgid "Shifted Beg (beginning)" msgstr "" -#: ../../library/curses.rst:1575 +#: ../../library/curses.rst:1583 msgid "Shifted Cancel" msgstr "" -#: ../../library/curses.rst:1577 +#: ../../library/curses.rst:1585 msgid "Shifted Command" msgstr "" -#: ../../library/curses.rst:1579 +#: ../../library/curses.rst:1587 msgid "Shifted Copy" msgstr "" -#: ../../library/curses.rst:1581 +#: ../../library/curses.rst:1589 msgid "Shifted Create" msgstr "" -#: ../../library/curses.rst:1583 +#: ../../library/curses.rst:1591 msgid "Shifted Delete char" msgstr "" -#: ../../library/curses.rst:1585 +#: ../../library/curses.rst:1593 msgid "Shifted Delete line" msgstr "" -#: ../../library/curses.rst:1587 +#: ../../library/curses.rst:1595 msgid "Select" msgstr "" -#: ../../library/curses.rst:1589 +#: ../../library/curses.rst:1597 msgid "Shifted End" msgstr "" -#: ../../library/curses.rst:1591 +#: ../../library/curses.rst:1599 msgid "Shifted Clear line" msgstr "" -#: ../../library/curses.rst:1593 +#: ../../library/curses.rst:1601 msgid "Shifted Exit" msgstr "" -#: ../../library/curses.rst:1595 +#: ../../library/curses.rst:1603 msgid "Shifted Find" msgstr "" -#: ../../library/curses.rst:1597 +#: ../../library/curses.rst:1605 msgid "Shifted Help" msgstr "" -#: ../../library/curses.rst:1599 +#: ../../library/curses.rst:1607 msgid "Shifted Home" msgstr "" -#: ../../library/curses.rst:1601 +#: ../../library/curses.rst:1609 msgid "Shifted Input" msgstr "" -#: ../../library/curses.rst:1603 +#: ../../library/curses.rst:1611 msgid "Shifted Left arrow" msgstr "" -#: ../../library/curses.rst:1605 +#: ../../library/curses.rst:1613 msgid "Shifted Message" msgstr "" -#: ../../library/curses.rst:1607 +#: ../../library/curses.rst:1615 msgid "Shifted Move" msgstr "" -#: ../../library/curses.rst:1609 +#: ../../library/curses.rst:1617 msgid "Shifted Next" msgstr "" -#: ../../library/curses.rst:1611 +#: ../../library/curses.rst:1619 msgid "Shifted Options" msgstr "" -#: ../../library/curses.rst:1613 +#: ../../library/curses.rst:1621 msgid "Shifted Prev" msgstr "" -#: ../../library/curses.rst:1615 +#: ../../library/curses.rst:1623 msgid "Shifted Print" msgstr "" -#: ../../library/curses.rst:1617 +#: ../../library/curses.rst:1625 msgid "Shifted Redo" msgstr "" -#: ../../library/curses.rst:1619 +#: ../../library/curses.rst:1627 msgid "Shifted Replace" msgstr "" -#: ../../library/curses.rst:1621 +#: ../../library/curses.rst:1629 msgid "Shifted Right arrow" msgstr "" -#: ../../library/curses.rst:1623 +#: ../../library/curses.rst:1631 msgid "Shifted Resume" msgstr "" -#: ../../library/curses.rst:1625 +#: ../../library/curses.rst:1633 msgid "Shifted Save" msgstr "" -#: ../../library/curses.rst:1627 +#: ../../library/curses.rst:1635 msgid "Shifted Suspend" msgstr "" -#: ../../library/curses.rst:1629 +#: ../../library/curses.rst:1637 msgid "Shifted Undo" msgstr "" -#: ../../library/curses.rst:1631 +#: ../../library/curses.rst:1639 msgid "Suspend" msgstr "" -#: ../../library/curses.rst:1633 +#: ../../library/curses.rst:1641 msgid "Undo" msgstr "" -#: ../../library/curses.rst:1635 +#: ../../library/curses.rst:1643 msgid "Mouse event has occurred" msgstr "" -#: ../../library/curses.rst:1637 +#: ../../library/curses.rst:1645 msgid "Terminal resize event" msgstr "" -#: ../../library/curses.rst:1639 +#: ../../library/curses.rst:1647 msgid "Maximum key value" msgstr "" -#: ../../library/curses.rst:1642 +#: ../../library/curses.rst:1650 msgid "" "On VT100s and their software emulations, such as X terminal emulators, there " "are normally at least four function keys (:const:`KEY_F1 `, :const:" @@ -2053,64 +2060,64 @@ msgid "" "keypad mappings are standard:" msgstr "" -#: ../../library/curses.rst:1651 +#: ../../library/curses.rst:1659 msgid "Keycap" msgstr "" -#: ../../library/curses.rst:1651 ../../library/curses.rst:1796 -#: ../../library/curses.rst:1920 +#: ../../library/curses.rst:1659 ../../library/curses.rst:1804 +#: ../../library/curses.rst:1928 msgid "Constant" msgstr "" -#: ../../library/curses.rst:1653 +#: ../../library/curses.rst:1661 msgid ":kbd:`Insert`" msgstr "" -#: ../../library/curses.rst:1653 +#: ../../library/curses.rst:1661 msgid "KEY_IC" msgstr "" -#: ../../library/curses.rst:1655 +#: ../../library/curses.rst:1663 msgid ":kbd:`Delete`" msgstr "" -#: ../../library/curses.rst:1655 +#: ../../library/curses.rst:1663 msgid "KEY_DC" msgstr "" -#: ../../library/curses.rst:1657 +#: ../../library/curses.rst:1665 msgid ":kbd:`Home`" msgstr "" -#: ../../library/curses.rst:1657 +#: ../../library/curses.rst:1665 msgid "KEY_HOME" msgstr "" -#: ../../library/curses.rst:1659 +#: ../../library/curses.rst:1667 msgid ":kbd:`End`" msgstr "" -#: ../../library/curses.rst:1659 +#: ../../library/curses.rst:1667 msgid "KEY_END" msgstr "" -#: ../../library/curses.rst:1661 +#: ../../library/curses.rst:1669 msgid ":kbd:`Page Up`" msgstr "" -#: ../../library/curses.rst:1661 +#: ../../library/curses.rst:1669 msgid "KEY_PPAGE" msgstr "" -#: ../../library/curses.rst:1663 +#: ../../library/curses.rst:1671 msgid ":kbd:`Page Down`" msgstr "" -#: ../../library/curses.rst:1663 +#: ../../library/curses.rst:1671 msgid "KEY_NPAGE" msgstr "" -#: ../../library/curses.rst:1668 +#: ../../library/curses.rst:1676 msgid "" "The following table lists characters from the alternate character set. These " "are inherited from the VT100 terminal, and will generally be available on " @@ -2118,268 +2125,268 @@ msgid "" "available, curses falls back on a crude printable ASCII approximation." msgstr "" -#: ../../library/curses.rst:1675 +#: ../../library/curses.rst:1683 msgid "These are available only after :func:`initscr` has been called." msgstr "" -#: ../../library/curses.rst:1678 +#: ../../library/curses.rst:1686 msgid "ACS code" msgstr "" -#: ../../library/curses.rst:1680 +#: ../../library/curses.rst:1688 msgid "alternate name for upper right corner" msgstr "" -#: ../../library/curses.rst:1682 +#: ../../library/curses.rst:1690 msgid "solid square block" msgstr "" -#: ../../library/curses.rst:1684 +#: ../../library/curses.rst:1692 msgid "board of squares" msgstr "" -#: ../../library/curses.rst:1686 +#: ../../library/curses.rst:1694 msgid "alternate name for horizontal line" msgstr "" -#: ../../library/curses.rst:1688 +#: ../../library/curses.rst:1696 msgid "alternate name for upper left corner" msgstr "" -#: ../../library/curses.rst:1690 +#: ../../library/curses.rst:1698 msgid "alternate name for top tee" msgstr "" -#: ../../library/curses.rst:1692 +#: ../../library/curses.rst:1700 msgid "bottom tee" msgstr "" -#: ../../library/curses.rst:1694 +#: ../../library/curses.rst:1702 msgid "bullet" msgstr "" -#: ../../library/curses.rst:1696 +#: ../../library/curses.rst:1704 msgid "checker board (stipple)" msgstr "" -#: ../../library/curses.rst:1698 +#: ../../library/curses.rst:1706 msgid "arrow pointing down" msgstr "" -#: ../../library/curses.rst:1700 +#: ../../library/curses.rst:1708 msgid "degree symbol" msgstr "" -#: ../../library/curses.rst:1702 +#: ../../library/curses.rst:1710 msgid "diamond" msgstr "" -#: ../../library/curses.rst:1704 +#: ../../library/curses.rst:1712 msgid "greater-than-or-equal-to" msgstr "" -#: ../../library/curses.rst:1706 +#: ../../library/curses.rst:1714 msgid "horizontal line" msgstr "" -#: ../../library/curses.rst:1708 +#: ../../library/curses.rst:1716 msgid "lantern symbol" msgstr "" -#: ../../library/curses.rst:1710 +#: ../../library/curses.rst:1718 msgid "left arrow" msgstr "" -#: ../../library/curses.rst:1712 +#: ../../library/curses.rst:1720 msgid "less-than-or-equal-to" msgstr "" -#: ../../library/curses.rst:1714 +#: ../../library/curses.rst:1722 msgid "lower left-hand corner" msgstr "" -#: ../../library/curses.rst:1716 +#: ../../library/curses.rst:1724 msgid "lower right-hand corner" msgstr "" -#: ../../library/curses.rst:1718 +#: ../../library/curses.rst:1726 msgid "left tee" msgstr "" -#: ../../library/curses.rst:1720 +#: ../../library/curses.rst:1728 msgid "not-equal sign" msgstr "" -#: ../../library/curses.rst:1722 +#: ../../library/curses.rst:1730 msgid "letter pi" msgstr "" -#: ../../library/curses.rst:1724 +#: ../../library/curses.rst:1732 msgid "plus-or-minus sign" msgstr "" -#: ../../library/curses.rst:1726 +#: ../../library/curses.rst:1734 msgid "big plus sign" msgstr "" -#: ../../library/curses.rst:1728 +#: ../../library/curses.rst:1736 msgid "right arrow" msgstr "" -#: ../../library/curses.rst:1730 +#: ../../library/curses.rst:1738 msgid "right tee" msgstr "" -#: ../../library/curses.rst:1732 +#: ../../library/curses.rst:1740 msgid "scan line 1" msgstr "" -#: ../../library/curses.rst:1734 +#: ../../library/curses.rst:1742 msgid "scan line 3" msgstr "" -#: ../../library/curses.rst:1736 +#: ../../library/curses.rst:1744 msgid "scan line 7" msgstr "" -#: ../../library/curses.rst:1738 +#: ../../library/curses.rst:1746 msgid "scan line 9" msgstr "" -#: ../../library/curses.rst:1740 +#: ../../library/curses.rst:1748 msgid "alternate name for lower right corner" msgstr "" -#: ../../library/curses.rst:1742 +#: ../../library/curses.rst:1750 msgid "alternate name for vertical line" msgstr "" -#: ../../library/curses.rst:1744 +#: ../../library/curses.rst:1752 msgid "alternate name for right tee" msgstr "" -#: ../../library/curses.rst:1746 +#: ../../library/curses.rst:1754 msgid "alternate name for lower left corner" msgstr "" -#: ../../library/curses.rst:1748 +#: ../../library/curses.rst:1756 msgid "alternate name for bottom tee" msgstr "" -#: ../../library/curses.rst:1750 +#: ../../library/curses.rst:1758 msgid "alternate name for left tee" msgstr "" -#: ../../library/curses.rst:1752 +#: ../../library/curses.rst:1760 msgid "alternate name for crossover or big plus" msgstr "" -#: ../../library/curses.rst:1754 +#: ../../library/curses.rst:1762 msgid "pound sterling" msgstr "" -#: ../../library/curses.rst:1756 +#: ../../library/curses.rst:1764 msgid "top tee" msgstr "" -#: ../../library/curses.rst:1758 +#: ../../library/curses.rst:1766 msgid "up arrow" msgstr "" -#: ../../library/curses.rst:1760 +#: ../../library/curses.rst:1768 msgid "upper left corner" msgstr "" -#: ../../library/curses.rst:1762 +#: ../../library/curses.rst:1770 msgid "upper right corner" msgstr "" -#: ../../library/curses.rst:1764 +#: ../../library/curses.rst:1772 msgid "vertical line" msgstr "" -#: ../../library/curses.rst:1767 +#: ../../library/curses.rst:1775 msgid "" "The following table lists mouse button constants used by :meth:`getmouse`:" msgstr "" -#: ../../library/curses.rst:1770 +#: ../../library/curses.rst:1778 msgid "Mouse button constant" msgstr "" -#: ../../library/curses.rst:1772 +#: ../../library/curses.rst:1780 msgid "Mouse button *n* pressed" msgstr "" -#: ../../library/curses.rst:1774 +#: ../../library/curses.rst:1782 msgid "Mouse button *n* released" msgstr "" -#: ../../library/curses.rst:1776 +#: ../../library/curses.rst:1784 msgid "Mouse button *n* clicked" msgstr "" -#: ../../library/curses.rst:1778 +#: ../../library/curses.rst:1786 msgid "Mouse button *n* double clicked" msgstr "" -#: ../../library/curses.rst:1780 +#: ../../library/curses.rst:1788 msgid "Mouse button *n* triple clicked" msgstr "" -#: ../../library/curses.rst:1782 +#: ../../library/curses.rst:1790 msgid "Shift was down during button state change" msgstr "" -#: ../../library/curses.rst:1784 ../../library/curses.rst:1786 +#: ../../library/curses.rst:1792 ../../library/curses.rst:1794 msgid "Control was down during button state change" msgstr "" -#: ../../library/curses.rst:1793 +#: ../../library/curses.rst:1801 msgid "The following table lists the predefined colors:" msgstr "" -#: ../../library/curses.rst:1796 +#: ../../library/curses.rst:1804 msgid "Color" msgstr "" -#: ../../library/curses.rst:1798 +#: ../../library/curses.rst:1806 msgid "Black" msgstr "" -#: ../../library/curses.rst:1800 +#: ../../library/curses.rst:1808 msgid "Blue" msgstr "" -#: ../../library/curses.rst:1802 +#: ../../library/curses.rst:1810 msgid "Cyan (light greenish blue)" msgstr "" -#: ../../library/curses.rst:1804 +#: ../../library/curses.rst:1812 msgid "Green" msgstr "" -#: ../../library/curses.rst:1806 +#: ../../library/curses.rst:1814 msgid "Magenta (purplish red)" msgstr "" -#: ../../library/curses.rst:1808 +#: ../../library/curses.rst:1816 msgid "Red" msgstr "" -#: ../../library/curses.rst:1810 +#: ../../library/curses.rst:1818 msgid "White" msgstr "" -#: ../../library/curses.rst:1812 +#: ../../library/curses.rst:1820 msgid "Yellow" msgstr "" -#: ../../library/curses.rst:1817 +#: ../../library/curses.rst:1825 msgid ":mod:`curses.textpad` --- Text input widget for curses programs" msgstr "" -#: ../../library/curses.rst:1825 +#: ../../library/curses.rst:1833 msgid "" "The :mod:`curses.textpad` module provides a :class:`Textbox` class that " "handles elementary text editing in a curses window, supporting a set of " @@ -2389,11 +2396,11 @@ msgid "" "purposes." msgstr "" -#: ../../library/curses.rst:1831 +#: ../../library/curses.rst:1839 msgid "The module :mod:`curses.textpad` defines the following function:" msgstr "" -#: ../../library/curses.rst:1836 +#: ../../library/curses.rst:1844 msgid "" "Draw a rectangle. The first argument must be a window object; the remaining " "arguments are coordinates relative to that window. The second and third " @@ -2405,15 +2412,15 @@ msgid "" "will be drawn with ASCII dashes, vertical bars, and plus signs." msgstr "" -#: ../../library/curses.rst:1849 +#: ../../library/curses.rst:1857 msgid "Textbox objects" msgstr "" -#: ../../library/curses.rst:1851 +#: ../../library/curses.rst:1859 msgid "You can instantiate a :class:`Textbox` object as follows:" msgstr "" -#: ../../library/curses.rst:1856 +#: ../../library/curses.rst:1864 msgid "" "Return a textbox widget object. The *win* argument should be a curses :ref:" "`window ` object in which the textbox is to be " @@ -2422,11 +2429,11 @@ msgid "" "instance's :attr:`stripspaces` flag is initially on." msgstr "" -#: ../../library/curses.rst:1862 +#: ../../library/curses.rst:1870 msgid ":class:`Textbox` objects have the following methods:" msgstr "" -#: ../../library/curses.rst:1867 +#: ../../library/curses.rst:1875 msgid "" "This is the entry point you will normally use. It accepts editing " "keystrokes until one of the termination keystrokes is entered. If " @@ -2437,167 +2444,167 @@ msgid "" "`stripspaces` attribute." msgstr "" -#: ../../library/curses.rst:1878 +#: ../../library/curses.rst:1886 msgid "" "Process a single command keystroke. Here are the supported special " "keystrokes:" msgstr "" -#: ../../library/curses.rst:1882 ../../library/curses.rst:1920 +#: ../../library/curses.rst:1890 ../../library/curses.rst:1928 msgid "Keystroke" msgstr "" -#: ../../library/curses.rst:1882 +#: ../../library/curses.rst:1890 msgid "Action" msgstr "" -#: ../../library/curses.rst:1884 +#: ../../library/curses.rst:1892 msgid ":kbd:`Control-A`" msgstr "" -#: ../../library/curses.rst:1884 +#: ../../library/curses.rst:1892 msgid "Go to left edge of window." msgstr "" -#: ../../library/curses.rst:1886 ../../library/curses.rst:1922 +#: ../../library/curses.rst:1894 ../../library/curses.rst:1930 msgid ":kbd:`Control-B`" msgstr "" -#: ../../library/curses.rst:1886 +#: ../../library/curses.rst:1894 msgid "Cursor left, wrapping to previous line if appropriate." msgstr "" -#: ../../library/curses.rst:1889 +#: ../../library/curses.rst:1897 msgid ":kbd:`Control-D`" msgstr "" -#: ../../library/curses.rst:1889 +#: ../../library/curses.rst:1897 msgid "Delete character under cursor." msgstr "" -#: ../../library/curses.rst:1891 +#: ../../library/curses.rst:1899 msgid ":kbd:`Control-E`" msgstr "" -#: ../../library/curses.rst:1891 +#: ../../library/curses.rst:1899 msgid "Go to right edge (stripspaces off) or end of line (stripspaces on)." msgstr "" -#: ../../library/curses.rst:1894 ../../library/curses.rst:1924 +#: ../../library/curses.rst:1902 ../../library/curses.rst:1932 msgid ":kbd:`Control-F`" msgstr "" -#: ../../library/curses.rst:1894 +#: ../../library/curses.rst:1902 msgid "Cursor right, wrapping to next line when appropriate." msgstr "" -#: ../../library/curses.rst:1897 +#: ../../library/curses.rst:1905 msgid ":kbd:`Control-G`" msgstr "" -#: ../../library/curses.rst:1897 +#: ../../library/curses.rst:1905 msgid "Terminate, returning the window contents." msgstr "" -#: ../../library/curses.rst:1899 +#: ../../library/curses.rst:1907 msgid ":kbd:`Control-H`" msgstr "" -#: ../../library/curses.rst:1899 +#: ../../library/curses.rst:1907 msgid "Delete character backward." msgstr "" -#: ../../library/curses.rst:1901 +#: ../../library/curses.rst:1909 msgid ":kbd:`Control-J`" msgstr "" -#: ../../library/curses.rst:1901 +#: ../../library/curses.rst:1909 msgid "Terminate if the window is 1 line, otherwise insert newline." msgstr "" -#: ../../library/curses.rst:1904 +#: ../../library/curses.rst:1912 msgid ":kbd:`Control-K`" msgstr "" -#: ../../library/curses.rst:1904 +#: ../../library/curses.rst:1912 msgid "If line is blank, delete it, otherwise clear to end of line." msgstr "" -#: ../../library/curses.rst:1907 +#: ../../library/curses.rst:1915 msgid ":kbd:`Control-L`" msgstr "" -#: ../../library/curses.rst:1907 +#: ../../library/curses.rst:1915 msgid "Refresh screen." msgstr "" -#: ../../library/curses.rst:1909 ../../library/curses.rst:1928 +#: ../../library/curses.rst:1917 ../../library/curses.rst:1936 msgid ":kbd:`Control-N`" msgstr "" -#: ../../library/curses.rst:1909 +#: ../../library/curses.rst:1917 msgid "Cursor down; move down one line." msgstr "" -#: ../../library/curses.rst:1911 +#: ../../library/curses.rst:1919 msgid ":kbd:`Control-O`" msgstr "" -#: ../../library/curses.rst:1911 +#: ../../library/curses.rst:1919 msgid "Insert a blank line at cursor location." msgstr "" -#: ../../library/curses.rst:1913 ../../library/curses.rst:1926 +#: ../../library/curses.rst:1921 ../../library/curses.rst:1934 msgid ":kbd:`Control-P`" msgstr "" -#: ../../library/curses.rst:1913 +#: ../../library/curses.rst:1921 msgid "Cursor up; move up one line." msgstr "" -#: ../../library/curses.rst:1916 +#: ../../library/curses.rst:1924 msgid "" "Move operations do nothing if the cursor is at an edge where the movement is " "not possible. The following synonyms are supported where possible:" msgstr "" -#: ../../library/curses.rst:1922 +#: ../../library/curses.rst:1930 msgid ":const:`~curses.KEY_LEFT`" msgstr "" -#: ../../library/curses.rst:1924 +#: ../../library/curses.rst:1932 msgid ":const:`~curses.KEY_RIGHT`" msgstr "" -#: ../../library/curses.rst:1926 +#: ../../library/curses.rst:1934 msgid ":const:`~curses.KEY_UP`" msgstr "" -#: ../../library/curses.rst:1928 +#: ../../library/curses.rst:1936 msgid ":const:`~curses.KEY_DOWN`" msgstr "" -#: ../../library/curses.rst:1930 +#: ../../library/curses.rst:1938 msgid ":const:`~curses.KEY_BACKSPACE`" msgstr "" -#: ../../library/curses.rst:1930 +#: ../../library/curses.rst:1938 msgid ":kbd:`Control-h`" msgstr "" -#: ../../library/curses.rst:1933 +#: ../../library/curses.rst:1941 msgid "" "All other keystrokes are treated as a command to insert the given character " "and move right (with line wrapping)." msgstr "" -#: ../../library/curses.rst:1939 +#: ../../library/curses.rst:1947 msgid "" "Return the window contents as a string; whether blanks in the window are " "included is affected by the :attr:`stripspaces` member." msgstr "" -#: ../../library/curses.rst:1945 +#: ../../library/curses.rst:1953 msgid "" "This attribute is a flag which controls the interpretation of blanks in the " "window. When it is on, trailing blanks on each line are ignored; any cursor " diff --git a/library/custominterp.po b/library/custominterp.po index a9e35727e..0b08dc02d 100644 --- a/library/custominterp.po +++ b/library/custominterp.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:03+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/dataclasses.po b/library/dataclasses.po index e269b7c0e..fcb74b838 100644 --- a/library/dataclasses.po +++ b/library/dataclasses.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:03+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -195,11 +196,13 @@ msgstr "" #: ../../library/dataclasses.rst:124 msgid "" -"*unsafe_hash*: If ``False`` (the default), a :meth:`~object.__hash__` method " -"is generated according to how *eq* and *frozen* are set." +"*unsafe_hash*: If true, force ``dataclasses`` to create a :meth:`~object." +"__hash__` method, even though it may not be safe to do so. Otherwise, " +"generate a :meth:`~object.__hash__` method according to how *eq* and " +"*frozen* are set. The default value is ``False``." msgstr "" -#: ../../library/dataclasses.rst:127 +#: ../../library/dataclasses.rst:130 msgid "" ":meth:`!__hash__` is used by built-in :meth:`hash`, and when objects are " "added to hashed collections such as dictionaries and sets. Having a :meth:`!" @@ -209,7 +212,7 @@ msgid "" "flags in the ``@dataclass`` decorator." msgstr "" -#: ../../library/dataclasses.rst:134 +#: ../../library/dataclasses.rst:137 msgid "" "By default, ``@dataclass`` will not implicitly add a :meth:`~object." "__hash__` method unless it is safe to do so. Neither will it add or change " @@ -218,7 +221,7 @@ msgid "" "in the :meth:`!__hash__` documentation." msgstr "" -#: ../../library/dataclasses.rst:140 +#: ../../library/dataclasses.rst:143 msgid "" "If :meth:`!__hash__` is not explicitly defined, or if it is set to ``None``, " "then ``@dataclass`` *may* add an implicit :meth:`!__hash__` method. Although " @@ -228,7 +231,7 @@ msgid "" "and should be considered carefully." msgstr "" -#: ../../library/dataclasses.rst:147 +#: ../../library/dataclasses.rst:150 msgid "" "Here are the rules governing implicit creation of a :meth:`!__hash__` " "method. Note that you cannot both have an explicit :meth:`!__hash__` method " @@ -236,7 +239,7 @@ msgid "" "`TypeError`." msgstr "" -#: ../../library/dataclasses.rst:152 +#: ../../library/dataclasses.rst:155 msgid "" "If *eq* and *frozen* are both true, by default ``@dataclass`` will generate " "a :meth:`!__hash__` method for you. If *eq* is true and *frozen* is false, :" @@ -247,7 +250,7 @@ msgid "" "id-based hashing)." msgstr "" -#: ../../library/dataclasses.rst:160 +#: ../../library/dataclasses.rst:163 msgid "" "*frozen*: If true (the default is ``False``), assigning to fields will " "generate an exception. This emulates read-only frozen instances. If :meth:" @@ -255,7 +258,7 @@ msgid "" "class, then :exc:`TypeError` is raised. See the discussion below." msgstr "" -#: ../../library/dataclasses.rst:165 +#: ../../library/dataclasses.rst:168 msgid "" "*match_args*: If true (the default is ``True``), the :attr:`~object." "__match_args__` tuple will be created from the list of non keyword-only " @@ -265,7 +268,7 @@ msgid "" "__match_args__` will not be generated." msgstr "" -#: ../../library/dataclasses.rst:174 +#: ../../library/dataclasses.rst:177 msgid "" "*kw_only*: If true (the default value is ``False``), then all fields will be " "marked as keyword-only. If a field is marked as keyword-only, then the only " @@ -275,11 +278,11 @@ msgid "" "the :const:`KW_ONLY` section." msgstr "" -#: ../../library/dataclasses.rst:182 +#: ../../library/dataclasses.rst:185 msgid "Keyword-only fields are not included in :attr:`!__match_args__`." msgstr "" -#: ../../library/dataclasses.rst:186 +#: ../../library/dataclasses.rst:189 msgid "" "*slots*: If true (the default is ``False``), :attr:`~object.__slots__` " "attribute will be generated and new class will be returned instead of the " @@ -287,7 +290,7 @@ msgid "" "exc:`TypeError` is raised." msgstr "" -#: ../../library/dataclasses.rst:192 +#: ../../library/dataclasses.rst:195 msgid "" "Passing parameters to a base class :meth:`~object.__init_subclass__` when " "using ``slots=True`` will result in a :exc:`TypeError`. Either use " @@ -295,7 +298,7 @@ msgid "" "workaround. See :gh:`91126` for full details." msgstr "" -#: ../../library/dataclasses.rst:200 +#: ../../library/dataclasses.rst:203 msgid "" "If a field name is already included in the :attr:`!__slots__` of a base " "class, it will not be included in the generated :attr:`!__slots__` to " @@ -305,7 +308,7 @@ msgid "" "`!__slots__` may be any iterable, but *not* an iterator." msgstr "" -#: ../../library/dataclasses.rst:210 +#: ../../library/dataclasses.rst:213 msgid "" "*weakref_slot*: If true (the default is ``False``), add a slot named " "\"__weakref__\", which is required to make an instance :func:`weakref-able " @@ -313,13 +316,13 @@ msgid "" "specifying ``slots=True``." msgstr "" -#: ../../library/dataclasses.rst:218 +#: ../../library/dataclasses.rst:221 msgid "" "``field``\\s may optionally specify a default value, using normal Python " "syntax::" msgstr "" -#: ../../library/dataclasses.rst:221 +#: ../../library/dataclasses.rst:224 msgid "" "@dataclass\n" "class C:\n" @@ -327,24 +330,24 @@ msgid "" " b: int = 0 # assign a default value for 'b'" msgstr "" -#: ../../library/dataclasses.rst:226 +#: ../../library/dataclasses.rst:229 msgid "" "In this example, both :attr:`!a` and :attr:`!b` will be included in the " "added :meth:`~object.__init__` method, which will be defined as::" msgstr "" -#: ../../library/dataclasses.rst:229 +#: ../../library/dataclasses.rst:232 msgid "def __init__(self, a: int, b: int = 0):" msgstr "" -#: ../../library/dataclasses.rst:231 +#: ../../library/dataclasses.rst:234 msgid "" ":exc:`TypeError` will be raised if a field without a default value follows a " "field with a default value. This is true whether this occurs in a single " "class, or as a result of class inheritance." msgstr "" -#: ../../library/dataclasses.rst:237 +#: ../../library/dataclasses.rst:240 msgid "" "For common and simple use cases, no other functionality is required. There " "are, however, some dataclass features that require additional per-field " @@ -353,7 +356,7 @@ msgid "" "function. For example::" msgstr "" -#: ../../library/dataclasses.rst:243 +#: ../../library/dataclasses.rst:246 msgid "" "@dataclass\n" "class C:\n" @@ -363,7 +366,7 @@ msgid "" "c.mylist += [1, 2, 3]" msgstr "" -#: ../../library/dataclasses.rst:250 +#: ../../library/dataclasses.rst:253 msgid "" "As shown above, the :const:`MISSING` value is a sentinel object used to " "detect if some parameters are provided by the user. This sentinel is used " @@ -371,18 +374,18 @@ msgid "" "meaning. No code should directly use the :const:`MISSING` value." msgstr "" -#: ../../library/dataclasses.rst:255 +#: ../../library/dataclasses.rst:258 msgid "The parameters to :func:`!field` are:" msgstr "" -#: ../../library/dataclasses.rst:257 +#: ../../library/dataclasses.rst:260 msgid "" "*default*: If provided, this will be the default value for this field. This " "is needed because the :func:`!field` call itself replaces the normal " "position of the default value." msgstr "" -#: ../../library/dataclasses.rst:261 +#: ../../library/dataclasses.rst:264 msgid "" "*default_factory*: If provided, it must be a zero-argument callable that " "will be called when a default value is needed for this field. Among other " @@ -391,19 +394,19 @@ msgid "" "*default_factory*." msgstr "" -#: ../../library/dataclasses.rst:267 +#: ../../library/dataclasses.rst:270 msgid "" "*init*: If true (the default), this field is included as a parameter to the " "generated :meth:`~object.__init__` method." msgstr "" -#: ../../library/dataclasses.rst:270 +#: ../../library/dataclasses.rst:273 msgid "" "*repr*: If true (the default), this field is included in the string returned " "by the generated :meth:`~object.__repr__` method." msgstr "" -#: ../../library/dataclasses.rst:273 +#: ../../library/dataclasses.rst:276 msgid "" "*hash*: This can be a bool or ``None``. If true, this field is included in " "the generated :meth:`~object.__hash__` method. If false, this field is " @@ -414,7 +417,7 @@ msgid "" "discouraged." msgstr "" -#: ../../library/dataclasses.rst:281 +#: ../../library/dataclasses.rst:284 msgid "" "One possible reason to set ``hash=False`` but ``compare=True`` would be if a " "field is expensive to compute a hash value for, that field is needed for " @@ -423,14 +426,14 @@ msgid "" "used for comparisons." msgstr "" -#: ../../library/dataclasses.rst:287 +#: ../../library/dataclasses.rst:290 msgid "" "*compare*: If true (the default), this field is included in the generated " "equality and comparison methods (:meth:`~object.__eq__`, :meth:`~object." "__gt__`, et al.)." msgstr "" -#: ../../library/dataclasses.rst:291 +#: ../../library/dataclasses.rst:294 msgid "" "*metadata*: This can be a mapping or ``None``. ``None`` is treated as an " "empty dict. This value is wrapped in :func:`~types.MappingProxyType` to " @@ -440,21 +443,21 @@ msgid "" "namespace in the metadata." msgstr "" -#: ../../library/dataclasses.rst:299 +#: ../../library/dataclasses.rst:302 msgid "" "*kw_only*: If true, this field will be marked as keyword-only. This is used " "when the generated :meth:`~object.__init__` method's parameters are computed." msgstr "" -#: ../../library/dataclasses.rst:303 +#: ../../library/dataclasses.rst:306 msgid "Keyword-only fields are also not included in :attr:`!__match_args__`." msgstr "" -#: ../../library/dataclasses.rst:307 -msgid "``doc``: optional docstring for this field." +#: ../../library/dataclasses.rst:310 +msgid "*doc*: optional docstring for this field." msgstr "" -#: ../../library/dataclasses.rst:311 +#: ../../library/dataclasses.rst:314 msgid "" "If the default value of a field is specified by a call to :func:`!field`, " "then the class attribute for this field will be replaced by the specified " @@ -465,7 +468,7 @@ msgid "" "specified. For example, after::" msgstr "" -#: ../../library/dataclasses.rst:320 +#: ../../library/dataclasses.rst:323 msgid "" "@dataclass\n" "class C:\n" @@ -475,14 +478,14 @@ msgid "" " t: int = 20" msgstr "" -#: ../../library/dataclasses.rst:327 +#: ../../library/dataclasses.rst:330 msgid "" "The class attribute :attr:`!C.z` will be ``10``, the class attribute :attr:`!" "C.t` will be ``20``, and the class attributes :attr:`!C.x` and :attr:`!C.y` " "will not be set." msgstr "" -#: ../../library/dataclasses.rst:333 +#: ../../library/dataclasses.rst:336 msgid "" ":class:`!Field` objects describe each defined field. These objects are " "created internally, and are returned by the :func:`fields` module-level " @@ -490,28 +493,28 @@ msgid "" "directly. Its documented attributes are:" msgstr "" -#: ../../library/dataclasses.rst:338 +#: ../../library/dataclasses.rst:341 msgid ":attr:`!name`: The name of the field." msgstr "" -#: ../../library/dataclasses.rst:339 +#: ../../library/dataclasses.rst:342 msgid ":attr:`!type`: The type of the field." msgstr "" -#: ../../library/dataclasses.rst:340 +#: ../../library/dataclasses.rst:343 msgid "" ":attr:`!default`, :attr:`!default_factory`, :attr:`!init`, :attr:`!repr`, :" "attr:`!hash`, :attr:`!compare`, :attr:`!metadata`, and :attr:`!kw_only` have " "the identical meaning and values as they do in the :func:`field` function." msgstr "" -#: ../../library/dataclasses.rst:344 +#: ../../library/dataclasses.rst:347 msgid "" "Other attributes may exist, but they are private and must not be inspected " "or relied on." msgstr "" -#: ../../library/dataclasses.rst:349 +#: ../../library/dataclasses.rst:352 msgid "" "``InitVar[T]`` type annotations describe variables that are :ref:`init-only " "`. Fields annotated with :class:`!InitVar` " @@ -520,7 +523,7 @@ msgid "" "meth:`~object.__init__` and an optional :meth:`__post_init__`." msgstr "" -#: ../../library/dataclasses.rst:358 +#: ../../library/dataclasses.rst:361 msgid "" "Returns a tuple of :class:`Field` objects that define the fields for this " "dataclass. Accepts either a dataclass, or an instance of a dataclass. " @@ -528,7 +531,7 @@ msgid "" "not return pseudo-fields which are ``ClassVar`` or ``InitVar``." msgstr "" -#: ../../library/dataclasses.rst:365 +#: ../../library/dataclasses.rst:368 msgid "" "Converts the dataclass *obj* to a dict (by using the factory function " "*dict_factory*). Each dataclass is converted to a dict of its fields, as " @@ -536,11 +539,11 @@ msgid "" "into. Other objects are copied with :func:`copy.deepcopy`." msgstr "" -#: ../../library/dataclasses.rst:371 +#: ../../library/dataclasses.rst:374 msgid "Example of using :func:`!asdict` on nested dataclasses::" msgstr "" -#: ../../library/dataclasses.rst:373 +#: ../../library/dataclasses.rst:376 msgid "" "@dataclass\n" "class Point:\n" @@ -558,20 +561,20 @@ msgid "" "assert asdict(c) == {'mylist': [{'x': 0, 'y': 0}, {'x': 10, 'y': 4}]}" msgstr "" -#: ../../library/dataclasses.rst:388 ../../library/dataclasses.rst:408 +#: ../../library/dataclasses.rst:391 ../../library/dataclasses.rst:411 msgid "To create a shallow copy, the following workaround may be used::" msgstr "" -#: ../../library/dataclasses.rst:390 +#: ../../library/dataclasses.rst:393 msgid "{field.name: getattr(obj, field.name) for field in fields(obj)}" msgstr "" -#: ../../library/dataclasses.rst:392 +#: ../../library/dataclasses.rst:395 msgid "" ":func:`!asdict` raises :exc:`TypeError` if *obj* is not a dataclass instance." msgstr "" -#: ../../library/dataclasses.rst:397 +#: ../../library/dataclasses.rst:400 msgid "" "Converts the dataclass *obj* to a tuple (by using the factory function " "*tuple_factory*). Each dataclass is converted to a tuple of its field " @@ -579,27 +582,27 @@ msgid "" "objects are copied with :func:`copy.deepcopy`." msgstr "" -#: ../../library/dataclasses.rst:403 +#: ../../library/dataclasses.rst:406 msgid "Continuing from the previous example::" msgstr "" -#: ../../library/dataclasses.rst:405 +#: ../../library/dataclasses.rst:408 msgid "" "assert astuple(p) == (10, 20)\n" "assert astuple(c) == ([(0, 0), (10, 4)],)" msgstr "" -#: ../../library/dataclasses.rst:410 +#: ../../library/dataclasses.rst:413 msgid "tuple(getattr(obj, field.name) for field in dataclasses.fields(obj))" msgstr "" -#: ../../library/dataclasses.rst:412 +#: ../../library/dataclasses.rst:415 msgid "" ":func:`!astuple` raises :exc:`TypeError` if *obj* is not a dataclass " "instance." msgstr "" -#: ../../library/dataclasses.rst:417 +#: ../../library/dataclasses.rst:420 msgid "" "Creates a new dataclass with name *cls_name*, fields as defined in *fields*, " "base classes as given in *bases*, and initialized with a namespace as given " @@ -611,13 +614,13 @@ msgid "" "`@dataclass `." msgstr "" -#: ../../library/dataclasses.rst:427 +#: ../../library/dataclasses.rst:430 msgid "" "If *module* is defined, the :attr:`!__module__` attribute of the dataclass " "is set to that value. By default, it is set to the module name of the caller." msgstr "" -#: ../../library/dataclasses.rst:431 +#: ../../library/dataclasses.rst:434 msgid "" "The *decorator* parameter is a callable that will be used to create the " "dataclass. It should take the class object as a first argument and the same " @@ -625,7 +628,7 @@ msgid "" "`@dataclass ` function is used." msgstr "" -#: ../../library/dataclasses.rst:436 +#: ../../library/dataclasses.rst:439 msgid "" "This function is not strictly required, because any Python mechanism for " "creating a new class with :attr:`!__annotations__` can then apply the :func:" @@ -633,7 +636,7 @@ msgid "" "This function is provided as a convenience. For example::" msgstr "" -#: ../../library/dataclasses.rst:442 +#: ../../library/dataclasses.rst:445 msgid "" "C = make_dataclass('C',\n" " [('x', int),\n" @@ -642,11 +645,11 @@ msgid "" " namespace={'add_one': lambda self: self.x + 1})" msgstr "" -#: ../../library/dataclasses.rst:448 +#: ../../library/dataclasses.rst:451 msgid "Is equivalent to::" msgstr "" -#: ../../library/dataclasses.rst:450 +#: ../../library/dataclasses.rst:453 msgid "" "@dataclass\n" "class C:\n" @@ -658,11 +661,11 @@ msgid "" " return self.x + 1" msgstr "" -#: ../../library/dataclasses.rst:459 +#: ../../library/dataclasses.rst:462 msgid "Added the *decorator* parameter." msgstr "" -#: ../../library/dataclasses.rst:464 +#: ../../library/dataclasses.rst:467 msgid "" "Creates a new object of the same type as *obj*, replacing fields with values " "from *changes*. If *obj* is not a Data Class, raises :exc:`TypeError`. If " @@ -670,27 +673,27 @@ msgid "" "`TypeError`." msgstr "" -#: ../../library/dataclasses.rst:469 +#: ../../library/dataclasses.rst:472 msgid "" "The newly returned object is created by calling the :meth:`~object.__init__` " "method of the dataclass. This ensures that :meth:`__post_init__`, if " "present, is also called." msgstr "" -#: ../../library/dataclasses.rst:473 +#: ../../library/dataclasses.rst:476 msgid "" "Init-only variables without default values, if any exist, must be specified " "on the call to :func:`!replace` so that they can be passed to :meth:`!" "__init__` and :meth:`__post_init__`." msgstr "" -#: ../../library/dataclasses.rst:477 +#: ../../library/dataclasses.rst:480 msgid "" "It is an error for *changes* to contain any fields that are defined as " "having ``init=False``. A :exc:`ValueError` will be raised in this case." msgstr "" -#: ../../library/dataclasses.rst:481 +#: ../../library/dataclasses.rst:484 msgid "" "Be forewarned about how ``init=False`` fields work during a call to :func:`!" "replace`. They are not copied from the source object, but rather are " @@ -701,36 +704,36 @@ msgid "" "instance copying." msgstr "" -#: ../../library/dataclasses.rst:490 +#: ../../library/dataclasses.rst:493 msgid "" "Dataclass instances are also supported by generic function :func:`copy." "replace`." msgstr "" -#: ../../library/dataclasses.rst:494 +#: ../../library/dataclasses.rst:497 msgid "" "Return ``True`` if its parameter is a dataclass (including subclasses of a " "dataclass) or an instance of one, otherwise return ``False``." msgstr "" -#: ../../library/dataclasses.rst:497 +#: ../../library/dataclasses.rst:500 msgid "" "If you need to know if a class is an instance of a dataclass (and not a " "dataclass itself), then add a further check for ``not isinstance(obj, " "type)``::" msgstr "" -#: ../../library/dataclasses.rst:501 +#: ../../library/dataclasses.rst:504 msgid "" "def is_dataclass_instance(obj):\n" " return is_dataclass(obj) and not isinstance(obj, type)" msgstr "" -#: ../../library/dataclasses.rst:506 +#: ../../library/dataclasses.rst:509 msgid "A sentinel value signifying a missing default or default_factory." msgstr "" -#: ../../library/dataclasses.rst:510 +#: ../../library/dataclasses.rst:513 msgid "" "A sentinel value used as a type annotation. Any fields after a pseudo-field " "with the type of :const:`!KW_ONLY` are marked as keyword-only fields. Note " @@ -741,13 +744,13 @@ msgid "" "the class is instantiated." msgstr "" -#: ../../library/dataclasses.rst:519 +#: ../../library/dataclasses.rst:522 msgid "" "In this example, the fields ``y`` and ``z`` will be marked as keyword-only " "fields::" msgstr "" -#: ../../library/dataclasses.rst:521 +#: ../../library/dataclasses.rst:524 msgid "" "@dataclass\n" "class Point:\n" @@ -759,24 +762,24 @@ msgid "" "p = Point(0, y=1.5, z=2.0)" msgstr "" -#: ../../library/dataclasses.rst:530 +#: ../../library/dataclasses.rst:533 msgid "" "In a single dataclass, it is an error to specify more than one field whose " "type is :const:`!KW_ONLY`." msgstr "" -#: ../../library/dataclasses.rst:537 +#: ../../library/dataclasses.rst:540 msgid "" "Raised when an implicitly defined :meth:`~object.__setattr__` or :meth:" "`~object.__delattr__` is called on a dataclass which was defined with " "``frozen=True``. It is a subclass of :exc:`AttributeError`." msgstr "" -#: ../../library/dataclasses.rst:544 +#: ../../library/dataclasses.rst:547 msgid "Post-init processing" msgstr "" -#: ../../library/dataclasses.rst:548 +#: ../../library/dataclasses.rst:551 msgid "" "When defined on the class, it will be called by the generated :meth:`~object." "__init__`, normally as :meth:`!self.__post_init__`. However, if any " @@ -786,13 +789,13 @@ msgid "" "automatically be called." msgstr "" -#: ../../library/dataclasses.rst:555 +#: ../../library/dataclasses.rst:558 msgid "" "Among other uses, this allows for initializing field values that depend on " "one or more other fields. For example::" msgstr "" -#: ../../library/dataclasses.rst:558 +#: ../../library/dataclasses.rst:561 msgid "" "@dataclass\n" "class C:\n" @@ -804,7 +807,7 @@ msgid "" " self.c = self.a + self.b" msgstr "" -#: ../../library/dataclasses.rst:567 +#: ../../library/dataclasses.rst:570 msgid "" "The :meth:`~object.__init__` method generated by :func:`@dataclass " "` does not call base class :meth:`!__init__` methods. If the base " @@ -812,7 +815,7 @@ msgid "" "call this method in a :meth:`__post_init__` method::" msgstr "" -#: ../../library/dataclasses.rst:572 +#: ../../library/dataclasses.rst:575 msgid "" "class Rectangle:\n" " def __init__(self, height, width):\n" @@ -827,25 +830,25 @@ msgid "" " super().__init__(self.side, self.side)" msgstr "" -#: ../../library/dataclasses.rst:584 +#: ../../library/dataclasses.rst:587 msgid "" "Note, however, that in general the dataclass-generated :meth:`!__init__` " "methods don't need to be called, since the derived dataclass will take care " "of initializing all fields of any base class that is a dataclass itself." msgstr "" -#: ../../library/dataclasses.rst:588 +#: ../../library/dataclasses.rst:591 msgid "" "See the section below on init-only variables for ways to pass parameters to :" "meth:`!__post_init__`. Also see the warning about how :func:`replace` " "handles ``init=False`` fields." msgstr "" -#: ../../library/dataclasses.rst:595 +#: ../../library/dataclasses.rst:598 msgid "Class variables" msgstr "" -#: ../../library/dataclasses.rst:597 +#: ../../library/dataclasses.rst:600 msgid "" "One of the few places where :func:`@dataclass ` actually inspects " "the type of a field is to determine if a field is a class variable as " @@ -856,11 +859,11 @@ msgid "" "`fields` function." msgstr "" -#: ../../library/dataclasses.rst:608 +#: ../../library/dataclasses.rst:611 msgid "Init-only variables" msgstr "" -#: ../../library/dataclasses.rst:610 +#: ../../library/dataclasses.rst:613 msgid "" "Another place where :func:`@dataclass ` inspects a type " "annotation is to determine if a field is an init-only variable. It does " @@ -873,13 +876,13 @@ msgid "" "dataclasses." msgstr "" -#: ../../library/dataclasses.rst:620 +#: ../../library/dataclasses.rst:623 msgid "" "For example, suppose a field will be initialized from a database, if a value " "is not provided when creating the class::" msgstr "" -#: ../../library/dataclasses.rst:623 +#: ../../library/dataclasses.rst:626 msgid "" "@dataclass\n" "class C:\n" @@ -894,17 +897,17 @@ msgid "" "c = C(10, database=my_database)" msgstr "" -#: ../../library/dataclasses.rst:635 +#: ../../library/dataclasses.rst:638 msgid "" "In this case, :func:`fields` will return :class:`Field` objects for :attr:`!" "i` and :attr:`!j`, but not for :attr:`!database`." msgstr "" -#: ../../library/dataclasses.rst:641 +#: ../../library/dataclasses.rst:644 msgid "Frozen instances" msgstr "" -#: ../../library/dataclasses.rst:643 +#: ../../library/dataclasses.rst:646 msgid "" "It is not possible to create truly immutable Python objects. However, by " "passing ``frozen=True`` to the :func:`@dataclass ` decorator you " @@ -913,18 +916,18 @@ msgid "" "methods will raise a :exc:`FrozenInstanceError` when invoked." msgstr "" -#: ../../library/dataclasses.rst:649 +#: ../../library/dataclasses.rst:652 msgid "" "There is a tiny performance penalty when using ``frozen=True``: :meth:" "`~object.__init__` cannot use simple assignment to initialize fields, and " "must use :meth:`!object.__setattr__`." msgstr "" -#: ../../library/dataclasses.rst:658 +#: ../../library/dataclasses.rst:661 msgid "Inheritance" msgstr "" -#: ../../library/dataclasses.rst:660 +#: ../../library/dataclasses.rst:663 msgid "" "When the dataclass is being created by the :func:`@dataclass ` " "decorator, it looks through all of the class's base classes in reverse MRO " @@ -936,7 +939,7 @@ msgid "" "order, derived classes override base classes. An example::" msgstr "" -#: ../../library/dataclasses.rst:670 +#: ../../library/dataclasses.rst:673 msgid "" "@dataclass\n" "class Base:\n" @@ -949,28 +952,28 @@ msgid "" " x: int = 15" msgstr "" -#: ../../library/dataclasses.rst:680 +#: ../../library/dataclasses.rst:683 msgid "" "The final list of fields is, in order, :attr:`!x`, :attr:`!y`, :attr:`!z`. " "The final type of :attr:`!x` is :class:`int`, as specified in class :class:`!" "C`." msgstr "" -#: ../../library/dataclasses.rst:683 +#: ../../library/dataclasses.rst:686 msgid "" "The generated :meth:`~object.__init__` method for :class:`!C` will look " "like::" msgstr "" -#: ../../library/dataclasses.rst:685 +#: ../../library/dataclasses.rst:688 msgid "def __init__(self, x: int = 15, y: int = 0, z: int = 10):" msgstr "" -#: ../../library/dataclasses.rst:688 +#: ../../library/dataclasses.rst:691 msgid "Re-ordering of keyword-only parameters in :meth:`!__init__`" msgstr "" -#: ../../library/dataclasses.rst:690 +#: ../../library/dataclasses.rst:693 msgid "" "After the parameters needed for :meth:`~object.__init__` are computed, any " "keyword-only parameters are moved to come after all regular (non-keyword-" @@ -978,14 +981,14 @@ msgid "" "implemented in Python: they must come after non-keyword-only parameters." msgstr "" -#: ../../library/dataclasses.rst:696 +#: ../../library/dataclasses.rst:699 msgid "" "In this example, :attr:`!Base.y`, :attr:`!Base.w`, and :attr:`!D.t` are " "keyword-only fields, and :attr:`!Base.x` and :attr:`!D.z` are regular " "fields::" msgstr "" -#: ../../library/dataclasses.rst:699 +#: ../../library/dataclasses.rst:702 msgid "" "@dataclass\n" "class Base:\n" @@ -1000,45 +1003,45 @@ msgid "" " t: int = field(kw_only=True, default=0)" msgstr "" -#: ../../library/dataclasses.rst:711 +#: ../../library/dataclasses.rst:714 msgid "The generated :meth:`!__init__` method for :class:`!D` will look like::" msgstr "" -#: ../../library/dataclasses.rst:713 +#: ../../library/dataclasses.rst:716 msgid "" "def __init__(self, x: Any = 15.0, z: int = 10, *, y: int = 0, w: int = 1, t: " "int = 0):" msgstr "" -#: ../../library/dataclasses.rst:715 +#: ../../library/dataclasses.rst:718 msgid "" "Note that the parameters have been re-ordered from how they appear in the " "list of fields: parameters derived from regular fields are followed by " "parameters derived from keyword-only fields." msgstr "" -#: ../../library/dataclasses.rst:719 +#: ../../library/dataclasses.rst:722 msgid "" "The relative ordering of keyword-only parameters is maintained in the re-" "ordered :meth:`!__init__` parameter list." msgstr "" -#: ../../library/dataclasses.rst:724 +#: ../../library/dataclasses.rst:727 msgid "Default factory functions" msgstr "" -#: ../../library/dataclasses.rst:726 +#: ../../library/dataclasses.rst:729 msgid "" "If a :func:`field` specifies a *default_factory*, it is called with zero " "arguments when a default value for the field is needed. For example, to " "create a new instance of a list, use::" msgstr "" -#: ../../library/dataclasses.rst:730 +#: ../../library/dataclasses.rst:733 msgid "mylist: list = field(default_factory=list)" msgstr "" -#: ../../library/dataclasses.rst:732 +#: ../../library/dataclasses.rst:735 msgid "" "If a field is excluded from :meth:`~object.__init__` (using ``init=False``) " "and the field also specifies *default_factory*, then the default factory " @@ -1047,17 +1050,17 @@ msgid "" "initial value." msgstr "" -#: ../../library/dataclasses.rst:739 +#: ../../library/dataclasses.rst:742 msgid "Mutable default values" msgstr "" -#: ../../library/dataclasses.rst:741 +#: ../../library/dataclasses.rst:744 msgid "" "Python stores default member variable values in class attributes. Consider " "this example, not using dataclasses::" msgstr "" -#: ../../library/dataclasses.rst:744 +#: ../../library/dataclasses.rst:747 msgid "" "class C:\n" " x = []\n" @@ -1072,17 +1075,17 @@ msgid "" "assert o1.x is o2.x" msgstr "" -#: ../../library/dataclasses.rst:756 +#: ../../library/dataclasses.rst:759 msgid "" "Note that the two instances of class :class:`!C` share the same class " "variable :attr:`!x`, as expected." msgstr "" -#: ../../library/dataclasses.rst:759 +#: ../../library/dataclasses.rst:762 msgid "Using dataclasses, *if* this code was valid::" msgstr "" -#: ../../library/dataclasses.rst:761 +#: ../../library/dataclasses.rst:764 msgid "" "@dataclass\n" "class D:\n" @@ -1091,11 +1094,11 @@ msgid "" " self.x.append(element)" msgstr "" -#: ../../library/dataclasses.rst:767 +#: ../../library/dataclasses.rst:770 msgid "it would generate code similar to::" msgstr "" -#: ../../library/dataclasses.rst:769 +#: ../../library/dataclasses.rst:772 msgid "" "class D:\n" " x = []\n" @@ -1107,7 +1110,7 @@ msgid "" "assert D().x is D().x" msgstr "" -#: ../../library/dataclasses.rst:778 +#: ../../library/dataclasses.rst:781 msgid "" "This has the same issue as the original example using class :class:`!C`. " "That is, two instances of class :class:`!D` that do not specify a value for :" @@ -1120,13 +1123,13 @@ msgid "" "partial solution, but it does protect against many common errors." msgstr "" -#: ../../library/dataclasses.rst:789 +#: ../../library/dataclasses.rst:792 msgid "" "Using default factory functions is a way to create new instances of mutable " "types as default values for fields::" msgstr "" -#: ../../library/dataclasses.rst:792 +#: ../../library/dataclasses.rst:795 msgid "" "@dataclass\n" "class D:\n" @@ -1135,38 +1138,38 @@ msgid "" "assert D().x is not D().x" msgstr "" -#: ../../library/dataclasses.rst:798 +#: ../../library/dataclasses.rst:801 msgid "" "Instead of looking for and disallowing objects of type :class:`list`, :class:" "`dict`, or :class:`set`, unhashable objects are now not allowed as default " "values. Unhashability is used to approximate mutability." msgstr "" -#: ../../library/dataclasses.rst:805 +#: ../../library/dataclasses.rst:808 msgid "Descriptor-typed fields" msgstr "" -#: ../../library/dataclasses.rst:807 +#: ../../library/dataclasses.rst:810 msgid "" "Fields that are assigned :ref:`descriptor objects ` as their " "default value have the following special behaviors:" msgstr "" -#: ../../library/dataclasses.rst:810 +#: ../../library/dataclasses.rst:813 msgid "" "The value for the field passed to the dataclass's :meth:`~object.__init__` " "method is passed to the descriptor's :meth:`~object.__set__` method rather " "than overwriting the descriptor object." msgstr "" -#: ../../library/dataclasses.rst:814 +#: ../../library/dataclasses.rst:817 msgid "" "Similarly, when getting or setting the field, the descriptor's :meth:" "`~object.__get__` or :meth:`!__set__` method is called rather than returning " "or overwriting the descriptor object." msgstr "" -#: ../../library/dataclasses.rst:818 +#: ../../library/dataclasses.rst:821 msgid "" "To determine whether a field contains a default value, :func:`@dataclass " "` will call the descriptor's :meth:`!__get__` method using its " @@ -1176,7 +1179,7 @@ msgid "" "in this situation, no default value will be provided for the field." msgstr "" -#: ../../library/dataclasses.rst:828 +#: ../../library/dataclasses.rst:831 msgid "" "class IntConversionDescriptor:\n" " def __init__(self, *, default):\n" @@ -1205,7 +1208,7 @@ msgid "" "print(i.quantity_on_hand) # 2" msgstr "" -#: ../../library/dataclasses.rst:853 +#: ../../library/dataclasses.rst:856 msgid "" "Note that if a field is annotated with a descriptor type, but is not " "assigned a descriptor object as its default value, the field will act like a " diff --git a/library/datatypes.po b/library/datatypes.po index 147d6817a..6cd1735d8 100644 --- a/library/datatypes.po +++ b/library/datatypes.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:04+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/datetime.po b/library/datetime.po index 0ef2918fa..b67942408 100644 --- a/library/datetime.po +++ b/library/datetime.po @@ -7,15 +7,16 @@ # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 # Parham Forati, 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:04+0000\n" -"Last-Translator: Parham Forati, 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/dbm.po b/library/dbm.po index afa8f7e48..3790edb3f 100644 --- a/library/dbm.po +++ b/library/dbm.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:04+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/debug.po b/library/debug.po index 22c0ccf98..bc6e0f808 100644 --- a/library/debug.po +++ b/library/debug.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:04+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/decimal.po b/library/decimal.po index a6b2c49ff..a75bfb3f2 100644 --- a/library/decimal.po +++ b/library/decimal.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Parham Forati, 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:04+0000\n" -"Last-Translator: Parham Forati, 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -151,7 +152,7 @@ msgid "" msgstr "" #: ../../library/decimal.rst:125 -msgid "Quick-start Tutorial" +msgid "Quick-start tutorial" msgstr "" #: ../../library/decimal.rst:127 @@ -1087,12 +1088,12 @@ msgstr "" msgid "Return the square root of the argument to full precision." msgstr "" -#: ../../library/decimal.rst:892 ../../library/decimal.rst:1537 +#: ../../library/decimal.rst:892 ../../library/decimal.rst:1549 msgid "" "Convert to a string, using engineering notation if an exponent is needed." msgstr "" -#: ../../library/decimal.rst:894 ../../library/decimal.rst:1539 +#: ../../library/decimal.rst:894 ../../library/decimal.rst:1551 msgid "" "Engineering notation has an exponent which is a multiple of 3. This can " "leave up to 3 digits to the left of the decimal place and may require the " @@ -1366,65 +1367,62 @@ msgid "" "field is not specified or is :const:`None`, all flags are cleared." msgstr "" -#: ../../library/decimal.rst:1099 +#: ../../library/decimal.rst:1101 msgid "" -"*prec* is an integer in the range [``1``, :const:`MAX_PREC`] that sets the " -"precision for arithmetic operations in the context." +"An integer in the range [``1``, :const:`MAX_PREC`] that sets the precision " +"for arithmetic operations in the context." msgstr "" -#: ../../library/decimal.rst:1102 -msgid "" -"The *rounding* option is one of the constants listed in the section " -"`Rounding Modes`_." +#: ../../library/decimal.rst:1106 +msgid "One of the constants listed in the section `Rounding Modes`_." msgstr "" -#: ../../library/decimal.rst:1105 +#: ../../library/decimal.rst:1111 msgid "" -"The *traps* and *flags* fields list any signals to be set. Generally, new " -"contexts should only set traps and leave the flags clear." +"Lists of any signals to be set. Generally, new contexts should only set " +"traps and leave the flags clear." msgstr "" -#: ../../library/decimal.rst:1108 +#: ../../library/decimal.rst:1117 msgid "" -"The *Emin* and *Emax* fields are integers specifying the outer limits " -"allowable for exponents. *Emin* must be in the range [:const:`MIN_EMIN`, " -"``0``], *Emax* in the range [``0``, :const:`MAX_EMAX`]." +"Integers specifying the outer limits allowable for exponents. *Emin* must be " +"in the range [:const:`MIN_EMIN`, ``0``], *Emax* in the range [``0``, :const:" +"`MAX_EMAX`]." msgstr "" -#: ../../library/decimal.rst:1112 +#: ../../library/decimal.rst:1123 msgid "" -"The *capitals* field is either ``0`` or ``1`` (the default). If set to " -"``1``, exponents are printed with a capital ``E``; otherwise, a lowercase " -"``e`` is used: ``Decimal('6.02e+23')``." +"Either ``0`` or ``1`` (the default). If set to ``1``, exponents are printed " +"with a capital ``E``; otherwise, a lowercase ``e`` is used: " +"``Decimal('6.02e+23')``." msgstr "" -#: ../../library/decimal.rst:1116 +#: ../../library/decimal.rst:1129 msgid "" -"The *clamp* field is either ``0`` (the default) or ``1``. If set to ``1``, " -"the exponent ``e`` of a :class:`Decimal` instance representable in this " -"context is strictly limited to the range ``Emin - prec + 1 <= e <= Emax - " -"prec + 1``. If *clamp* is ``0`` then a weaker condition holds: the adjusted " -"exponent of the :class:`Decimal` instance is at most :attr:`~Context.Emax`. " -"When *clamp* is ``1``, a large normal number will, where possible, have its " -"exponent reduced and a corresponding number of zeros added to its " -"coefficient, in order to fit the exponent constraints; this preserves the " -"value of the number but loses information about significant trailing zeros. " -"For example::" +"Either ``0`` (the default) or ``1``. If set to ``1``, the exponent ``e`` of " +"a :class:`Decimal` instance representable in this context is strictly " +"limited to the range ``Emin - prec + 1 <= e <= Emax - prec + 1``. If *clamp* " +"is ``0`` then a weaker condition holds: the adjusted exponent of the :class:" +"`Decimal` instance is at most :attr:`~Context.Emax`. When *clamp* is ``1``, " +"a large normal number will, where possible, have its exponent reduced and a " +"corresponding number of zeros added to its coefficient, in order to fit the " +"exponent constraints; this preserves the value of the number but loses " +"information about significant trailing zeros. For example::" msgstr "" -#: ../../library/decimal.rst:1128 +#: ../../library/decimal.rst:1140 msgid "" ">>> Context(prec=6, Emax=999, clamp=1).create_decimal('1.23e999')\n" "Decimal('1.23000E+999')" msgstr "" -#: ../../library/decimal.rst:1131 +#: ../../library/decimal.rst:1143 msgid "" "A *clamp* value of ``1`` allows compatibility with the fixed-width decimal " "interchange formats specified in IEEE 754." msgstr "" -#: ../../library/decimal.rst:1134 +#: ../../library/decimal.rst:1146 msgid "" "The :class:`Context` class defines several general purpose methods as well " "as a large number of methods for doing arithmetic directly in a given " @@ -1437,30 +1435,30 @@ msgid "" "instance of :class:`int`) anywhere that a Decimal instance is accepted." msgstr "" -#: ../../library/decimal.rst:1147 +#: ../../library/decimal.rst:1159 msgid "Resets all of the flags to ``0``." msgstr "" -#: ../../library/decimal.rst:1151 +#: ../../library/decimal.rst:1163 msgid "Resets all of the traps to ``0``." msgstr "" -#: ../../library/decimal.rst:1157 +#: ../../library/decimal.rst:1169 msgid "Return a duplicate of the context." msgstr "" -#: ../../library/decimal.rst:1161 +#: ../../library/decimal.rst:1173 msgid "Return a copy of the Decimal instance num." msgstr "" -#: ../../library/decimal.rst:1165 +#: ../../library/decimal.rst:1177 msgid "" "Creates a new Decimal instance from *num* but using *self* as context. " "Unlike the :class:`Decimal` constructor, the context precision, rounding " "method, flags, and traps are applied to the conversion." msgstr "" -#: ../../library/decimal.rst:1169 +#: ../../library/decimal.rst:1181 msgid "" "This is useful because constants are often given to a greater precision than " "is needed by the application. Another benefit is that rounding immediately " @@ -1469,7 +1467,7 @@ msgid "" "sum can change the result:" msgstr "" -#: ../../library/decimal.rst:1175 +#: ../../library/decimal.rst:1187 msgid "" ">>> getcontext().prec = 3\n" ">>> Decimal('3.4445') + Decimal('1.0023')\n" @@ -1478,14 +1476,14 @@ msgid "" "Decimal('4.44')" msgstr "" -#: ../../library/decimal.rst:1183 +#: ../../library/decimal.rst:1195 msgid "" "This method implements the to-number operation of the IBM specification. If " "the argument is a string, no leading or trailing whitespace or underscores " "are permitted." msgstr "" -#: ../../library/decimal.rst:1189 +#: ../../library/decimal.rst:1201 msgid "" "Creates a new Decimal instance from a float *f* but rounding using *self* as " "the context. Unlike the :meth:`Decimal.from_float` class method, the " @@ -1493,7 +1491,7 @@ msgid "" "conversion." msgstr "" -#: ../../library/decimal.rst:1194 +#: ../../library/decimal.rst:1206 msgid "" ">>> context = Context(prec=5, rounding=ROUND_DOWN)\n" ">>> context.create_decimal_from_float(math.pi)\n" @@ -1505,18 +1503,18 @@ msgid "" "decimal.Inexact: None" msgstr "" -#: ../../library/decimal.rst:1209 +#: ../../library/decimal.rst:1221 msgid "" "Returns a value equal to ``Emin - prec + 1`` which is the minimum exponent " "value for subnormal results. When underflow occurs, the exponent is set to :" "const:`Etiny`." msgstr "" -#: ../../library/decimal.rst:1215 +#: ../../library/decimal.rst:1227 msgid "Returns a value equal to ``Emax - prec + 1``." msgstr "" -#: ../../library/decimal.rst:1217 +#: ../../library/decimal.rst:1229 msgid "" "The usual approach to working with decimals is to create :class:`Decimal` " "instances and then apply arithmetic operations which take place within the " @@ -1526,189 +1524,189 @@ msgid "" "recounted here." msgstr "" -#: ../../library/decimal.rst:1227 +#: ../../library/decimal.rst:1239 msgid "Returns the absolute value of *x*." msgstr "" -#: ../../library/decimal.rst:1232 +#: ../../library/decimal.rst:1244 msgid "Return the sum of *x* and *y*." msgstr "" -#: ../../library/decimal.rst:1237 +#: ../../library/decimal.rst:1249 msgid "Returns the same Decimal object *x*." msgstr "" -#: ../../library/decimal.rst:1242 +#: ../../library/decimal.rst:1254 msgid "Compares *x* and *y* numerically." msgstr "" -#: ../../library/decimal.rst:1247 +#: ../../library/decimal.rst:1259 msgid "Compares the values of the two operands numerically." msgstr "" -#: ../../library/decimal.rst:1252 +#: ../../library/decimal.rst:1264 msgid "Compares two operands using their abstract representation." msgstr "" -#: ../../library/decimal.rst:1257 +#: ../../library/decimal.rst:1269 msgid "" "Compares two operands using their abstract representation, ignoring sign." msgstr "" -#: ../../library/decimal.rst:1262 +#: ../../library/decimal.rst:1274 msgid "Returns a copy of *x* with the sign set to 0." msgstr "" -#: ../../library/decimal.rst:1267 +#: ../../library/decimal.rst:1279 msgid "Returns a copy of *x* with the sign inverted." msgstr "" -#: ../../library/decimal.rst:1272 +#: ../../library/decimal.rst:1284 msgid "Copies the sign from *y* to *x*." msgstr "" -#: ../../library/decimal.rst:1277 +#: ../../library/decimal.rst:1289 msgid "Return *x* divided by *y*." msgstr "" -#: ../../library/decimal.rst:1282 +#: ../../library/decimal.rst:1294 msgid "Return *x* divided by *y*, truncated to an integer." msgstr "" -#: ../../library/decimal.rst:1287 +#: ../../library/decimal.rst:1299 msgid "Divides two numbers and returns the integer part of the result." msgstr "" -#: ../../library/decimal.rst:1292 +#: ../../library/decimal.rst:1304 msgid "Returns ``e ** x``." msgstr "" -#: ../../library/decimal.rst:1297 +#: ../../library/decimal.rst:1309 msgid "Returns *x* multiplied by *y*, plus *z*." msgstr "" -#: ../../library/decimal.rst:1302 +#: ../../library/decimal.rst:1314 msgid "Returns ``True`` if *x* is canonical; otherwise returns ``False``." msgstr "" -#: ../../library/decimal.rst:1307 +#: ../../library/decimal.rst:1319 msgid "Returns ``True`` if *x* is finite; otherwise returns ``False``." msgstr "" -#: ../../library/decimal.rst:1312 +#: ../../library/decimal.rst:1324 msgid "Returns ``True`` if *x* is infinite; otherwise returns ``False``." msgstr "" -#: ../../library/decimal.rst:1317 +#: ../../library/decimal.rst:1329 msgid "Returns ``True`` if *x* is a qNaN or sNaN; otherwise returns ``False``." msgstr "" -#: ../../library/decimal.rst:1322 +#: ../../library/decimal.rst:1334 msgid "" "Returns ``True`` if *x* is a normal number; otherwise returns ``False``." msgstr "" -#: ../../library/decimal.rst:1327 +#: ../../library/decimal.rst:1339 msgid "Returns ``True`` if *x* is a quiet NaN; otherwise returns ``False``." msgstr "" -#: ../../library/decimal.rst:1332 +#: ../../library/decimal.rst:1344 msgid "Returns ``True`` if *x* is negative; otherwise returns ``False``." msgstr "" -#: ../../library/decimal.rst:1337 +#: ../../library/decimal.rst:1349 msgid "" "Returns ``True`` if *x* is a signaling NaN; otherwise returns ``False``." msgstr "" -#: ../../library/decimal.rst:1342 +#: ../../library/decimal.rst:1354 msgid "Returns ``True`` if *x* is subnormal; otherwise returns ``False``." msgstr "" -#: ../../library/decimal.rst:1347 +#: ../../library/decimal.rst:1359 msgid "Returns ``True`` if *x* is a zero; otherwise returns ``False``." msgstr "" -#: ../../library/decimal.rst:1352 +#: ../../library/decimal.rst:1364 msgid "Returns the natural (base e) logarithm of *x*." msgstr "" -#: ../../library/decimal.rst:1357 +#: ../../library/decimal.rst:1369 msgid "Returns the base 10 logarithm of *x*." msgstr "" -#: ../../library/decimal.rst:1362 +#: ../../library/decimal.rst:1374 msgid "Returns the exponent of the magnitude of the operand's MSD." msgstr "" -#: ../../library/decimal.rst:1367 +#: ../../library/decimal.rst:1379 msgid "Applies the logical operation *and* between each operand's digits." msgstr "" -#: ../../library/decimal.rst:1372 +#: ../../library/decimal.rst:1384 msgid "Invert all the digits in *x*." msgstr "" -#: ../../library/decimal.rst:1377 +#: ../../library/decimal.rst:1389 msgid "Applies the logical operation *or* between each operand's digits." msgstr "" -#: ../../library/decimal.rst:1382 +#: ../../library/decimal.rst:1394 msgid "Applies the logical operation *xor* between each operand's digits." msgstr "" -#: ../../library/decimal.rst:1387 +#: ../../library/decimal.rst:1399 msgid "Compares two values numerically and returns the maximum." msgstr "" -#: ../../library/decimal.rst:1392 ../../library/decimal.rst:1402 +#: ../../library/decimal.rst:1404 ../../library/decimal.rst:1414 msgid "Compares the values numerically with their sign ignored." msgstr "" -#: ../../library/decimal.rst:1397 +#: ../../library/decimal.rst:1409 msgid "Compares two values numerically and returns the minimum." msgstr "" -#: ../../library/decimal.rst:1407 +#: ../../library/decimal.rst:1419 msgid "Minus corresponds to the unary prefix minus operator in Python." msgstr "" -#: ../../library/decimal.rst:1412 +#: ../../library/decimal.rst:1424 msgid "Return the product of *x* and *y*." msgstr "" -#: ../../library/decimal.rst:1417 +#: ../../library/decimal.rst:1429 msgid "Returns the largest representable number smaller than *x*." msgstr "" -#: ../../library/decimal.rst:1422 +#: ../../library/decimal.rst:1434 msgid "Returns the smallest representable number larger than *x*." msgstr "" -#: ../../library/decimal.rst:1427 +#: ../../library/decimal.rst:1439 msgid "Returns the number closest to *x*, in direction towards *y*." msgstr "" -#: ../../library/decimal.rst:1432 +#: ../../library/decimal.rst:1444 msgid "Reduces *x* to its simplest form." msgstr "" -#: ../../library/decimal.rst:1437 +#: ../../library/decimal.rst:1449 msgid "Returns an indication of the class of *x*." msgstr "" -#: ../../library/decimal.rst:1442 +#: ../../library/decimal.rst:1454 msgid "" "Plus corresponds to the unary prefix plus operator in Python. This " "operation applies the context precision and rounding, so it is *not* an " "identity operation." msgstr "" -#: ../../library/decimal.rst:1449 +#: ../../library/decimal.rst:1461 msgid "Return ``x`` to the power of ``y``, reduced modulo ``modulo`` if given." msgstr "" -#: ../../library/decimal.rst:1451 +#: ../../library/decimal.rst:1463 msgid "" "With two arguments, compute ``x**y``. If ``x`` is negative then ``y`` must " "be integral. The result will be inexact unless ``y`` is integral and the " @@ -1717,42 +1715,42 @@ msgid "" "in the Python version." msgstr "" -#: ../../library/decimal.rst:1457 +#: ../../library/decimal.rst:1469 msgid "" "``Decimal(0) ** Decimal(0)`` results in ``InvalidOperation``, and if " "``InvalidOperation`` is not trapped, then results in ``Decimal('NaN')``." msgstr "" -#: ../../library/decimal.rst:1460 +#: ../../library/decimal.rst:1472 msgid "" "The C module computes :meth:`power` in terms of the correctly rounded :meth:" "`exp` and :meth:`ln` functions. The result is well-defined but only \"almost " "always correctly rounded\"." msgstr "" -#: ../../library/decimal.rst:1465 +#: ../../library/decimal.rst:1477 msgid "" "With three arguments, compute ``(x**y) % modulo``. For the three argument " "form, the following restrictions on the arguments hold:" msgstr "" -#: ../../library/decimal.rst:1468 +#: ../../library/decimal.rst:1480 msgid "all three arguments must be integral" msgstr "" -#: ../../library/decimal.rst:1469 +#: ../../library/decimal.rst:1481 msgid "``y`` must be nonnegative" msgstr "" -#: ../../library/decimal.rst:1470 +#: ../../library/decimal.rst:1482 msgid "at least one of ``x`` or ``y`` must be nonzero" msgstr "" -#: ../../library/decimal.rst:1471 +#: ../../library/decimal.rst:1483 msgid "``modulo`` must be nonzero and have at most 'precision' digits" msgstr "" -#: ../../library/decimal.rst:1473 +#: ../../library/decimal.rst:1485 msgid "" "The value resulting from ``Context.power(x, y, modulo)`` is equal to the " "value that would be obtained by computing ``(x**y) % modulo`` with unbounded " @@ -1761,118 +1759,118 @@ msgid "" "result is always exact." msgstr "" -#: ../../library/decimal.rst:1483 +#: ../../library/decimal.rst:1495 msgid "Returns a value equal to *x* (rounded), having the exponent of *y*." msgstr "" -#: ../../library/decimal.rst:1488 +#: ../../library/decimal.rst:1500 msgid "Just returns 10, as this is Decimal, :)" msgstr "" -#: ../../library/decimal.rst:1493 +#: ../../library/decimal.rst:1505 msgid "Returns the remainder from integer division." msgstr "" -#: ../../library/decimal.rst:1495 +#: ../../library/decimal.rst:1507 msgid "" "The sign of the result, if non-zero, is the same as that of the original " "dividend." msgstr "" -#: ../../library/decimal.rst:1501 +#: ../../library/decimal.rst:1513 msgid "" "Returns ``x - y * n``, where *n* is the integer nearest the exact value of " "``x / y`` (if the result is 0 then its sign will be the sign of *x*)." msgstr "" -#: ../../library/decimal.rst:1507 +#: ../../library/decimal.rst:1519 msgid "Returns a rotated copy of *x*, *y* times." msgstr "" -#: ../../library/decimal.rst:1512 +#: ../../library/decimal.rst:1524 msgid "Returns ``True`` if the two operands have the same exponent." msgstr "" -#: ../../library/decimal.rst:1517 +#: ../../library/decimal.rst:1529 msgid "Returns the first operand after adding the second value its exp." msgstr "" -#: ../../library/decimal.rst:1522 +#: ../../library/decimal.rst:1534 msgid "Returns a shifted copy of *x*, *y* times." msgstr "" -#: ../../library/decimal.rst:1527 +#: ../../library/decimal.rst:1539 msgid "Square root of a non-negative number to context precision." msgstr "" -#: ../../library/decimal.rst:1532 +#: ../../library/decimal.rst:1544 msgid "Return the difference between *x* and *y*." msgstr "" -#: ../../library/decimal.rst:1546 +#: ../../library/decimal.rst:1558 msgid "Rounds to an integer." msgstr "" -#: ../../library/decimal.rst:1551 +#: ../../library/decimal.rst:1563 msgid "Converts a number to a string using scientific notation." msgstr "" -#: ../../library/decimal.rst:1558 +#: ../../library/decimal.rst:1570 msgid "Constants" msgstr "" -#: ../../library/decimal.rst:1560 +#: ../../library/decimal.rst:1572 msgid "" "The constants in this section are only relevant for the C module. They are " "also included in the pure Python version for compatibility." msgstr "" -#: ../../library/decimal.rst:1564 +#: ../../library/decimal.rst:1576 msgid "32-bit" msgstr "" -#: ../../library/decimal.rst:1564 +#: ../../library/decimal.rst:1576 msgid "64-bit" msgstr "" -#: ../../library/decimal.rst:1566 ../../library/decimal.rst:1568 +#: ../../library/decimal.rst:1578 ../../library/decimal.rst:1580 msgid "``425000000``" msgstr "" -#: ../../library/decimal.rst:1566 ../../library/decimal.rst:1568 +#: ../../library/decimal.rst:1578 ../../library/decimal.rst:1580 msgid "``999999999999999999``" msgstr "" -#: ../../library/decimal.rst:1570 +#: ../../library/decimal.rst:1582 msgid "``-425000000``" msgstr "" -#: ../../library/decimal.rst:1570 +#: ../../library/decimal.rst:1582 msgid "``-999999999999999999``" msgstr "" -#: ../../library/decimal.rst:1572 +#: ../../library/decimal.rst:1584 msgid "``-849999999``" msgstr "" -#: ../../library/decimal.rst:1572 +#: ../../library/decimal.rst:1584 msgid "``-1999999999999999997``" msgstr "" -#: ../../library/decimal.rst:1574 +#: ../../library/decimal.rst:1586 msgid "``256``" msgstr "" -#: ../../library/decimal.rst:1574 +#: ../../library/decimal.rst:1586 msgid "``512``" msgstr "" -#: ../../library/decimal.rst:1579 +#: ../../library/decimal.rst:1591 msgid "" "The value is ``True``. Deprecated, because Python now always has threads." msgstr "" -#: ../../library/decimal.rst:1585 +#: ../../library/decimal.rst:1597 msgid "" "The default value is ``True``. If Python is :option:`configured using the --" "without-decimal-contextvar option <--without-decimal-contextvar>`, the C " @@ -1881,55 +1879,55 @@ msgid "" "scenarios." msgstr "" -#: ../../library/decimal.rst:1594 +#: ../../library/decimal.rst:1606 msgid "Rounding modes" msgstr "" -#: ../../library/decimal.rst:1598 +#: ../../library/decimal.rst:1610 msgid "Round towards ``Infinity``." msgstr "" -#: ../../library/decimal.rst:1602 +#: ../../library/decimal.rst:1614 msgid "Round towards zero." msgstr "" -#: ../../library/decimal.rst:1606 +#: ../../library/decimal.rst:1618 msgid "Round towards ``-Infinity``." msgstr "" -#: ../../library/decimal.rst:1610 +#: ../../library/decimal.rst:1622 msgid "Round to nearest with ties going towards zero." msgstr "" -#: ../../library/decimal.rst:1614 +#: ../../library/decimal.rst:1626 msgid "Round to nearest with ties going to nearest even integer." msgstr "" -#: ../../library/decimal.rst:1618 +#: ../../library/decimal.rst:1630 msgid "Round to nearest with ties going away from zero." msgstr "" -#: ../../library/decimal.rst:1622 +#: ../../library/decimal.rst:1634 msgid "Round away from zero." msgstr "" -#: ../../library/decimal.rst:1626 +#: ../../library/decimal.rst:1638 msgid "" "Round away from zero if last digit after rounding towards zero would have " "been 0 or 5; otherwise round towards zero." msgstr "" -#: ../../library/decimal.rst:1633 +#: ../../library/decimal.rst:1645 msgid "Signals" msgstr "" -#: ../../library/decimal.rst:1635 +#: ../../library/decimal.rst:1647 msgid "" "Signals represent conditions that arise during computation. Each corresponds " "to one context flag and one context trap enabler." msgstr "" -#: ../../library/decimal.rst:1638 +#: ../../library/decimal.rst:1650 msgid "" "The context flag is set whenever the condition is encountered. After the " "computation, flags may be checked for informational purposes (for instance, " @@ -1937,7 +1935,7 @@ msgid "" "sure to clear all flags before starting the next computation." msgstr "" -#: ../../library/decimal.rst:1643 +#: ../../library/decimal.rst:1655 msgid "" "If the context's trap enabler is set for the signal, then the condition " "causes a Python exception to be raised. For example, if the :class:" @@ -1945,54 +1943,54 @@ msgid "" "raised upon encountering the condition." msgstr "" -#: ../../library/decimal.rst:1651 +#: ../../library/decimal.rst:1663 msgid "Altered an exponent to fit representation constraints." msgstr "" -#: ../../library/decimal.rst:1653 +#: ../../library/decimal.rst:1665 msgid "" "Typically, clamping occurs when an exponent falls outside the context's :" "attr:`~Context.Emin` and :attr:`~Context.Emax` limits. If possible, the " "exponent is reduced to fit by adding zeros to the coefficient." msgstr "" -#: ../../library/decimal.rst:1660 +#: ../../library/decimal.rst:1672 msgid "Base class for other signals and a subclass of :exc:`ArithmeticError`." msgstr "" -#: ../../library/decimal.rst:1665 +#: ../../library/decimal.rst:1677 msgid "Signals the division of a non-infinite number by zero." msgstr "" -#: ../../library/decimal.rst:1667 +#: ../../library/decimal.rst:1679 msgid "" "Can occur with division, modulo division, or when raising a number to a " "negative power. If this signal is not trapped, returns ``Infinity`` or ``-" "Infinity`` with the sign determined by the inputs to the calculation." msgstr "" -#: ../../library/decimal.rst:1674 +#: ../../library/decimal.rst:1686 msgid "Indicates that rounding occurred and the result is not exact." msgstr "" -#: ../../library/decimal.rst:1676 +#: ../../library/decimal.rst:1688 msgid "" "Signals when non-zero digits were discarded during rounding. The rounded " "result is returned. The signal flag or trap is used to detect when results " "are inexact." msgstr "" -#: ../../library/decimal.rst:1683 +#: ../../library/decimal.rst:1695 msgid "An invalid operation was performed." msgstr "" -#: ../../library/decimal.rst:1685 +#: ../../library/decimal.rst:1697 msgid "" "Indicates that an operation was requested that does not make sense. If not " "trapped, returns ``NaN``. Possible causes include::" msgstr "" -#: ../../library/decimal.rst:1688 +#: ../../library/decimal.rst:1700 msgid "" "Infinity - Infinity\n" "0 * Infinity\n" @@ -2005,11 +2003,11 @@ msgid "" "x ** Infinity" msgstr "" -#: ../../library/decimal.rst:1701 +#: ../../library/decimal.rst:1713 msgid "Numerical overflow." msgstr "" -#: ../../library/decimal.rst:1703 +#: ../../library/decimal.rst:1715 msgid "" "Indicates the exponent is larger than :attr:`Context.Emax` after rounding " "has occurred. If not trapped, the result depends on the rounding mode, " @@ -2018,42 +2016,42 @@ msgid "" "`Rounded` are also signaled." msgstr "" -#: ../../library/decimal.rst:1712 +#: ../../library/decimal.rst:1724 msgid "Rounding occurred though possibly no information was lost." msgstr "" -#: ../../library/decimal.rst:1714 +#: ../../library/decimal.rst:1726 msgid "" "Signaled whenever rounding discards digits; even if those digits are zero " "(such as rounding ``5.00`` to ``5.0``). If not trapped, returns the result " "unchanged. This signal is used to detect loss of significant digits." msgstr "" -#: ../../library/decimal.rst:1722 +#: ../../library/decimal.rst:1734 msgid "Exponent was lower than :attr:`~Context.Emin` prior to rounding." msgstr "" -#: ../../library/decimal.rst:1724 +#: ../../library/decimal.rst:1736 msgid "" "Occurs when an operation result is subnormal (the exponent is too small). If " "not trapped, returns the result unchanged." msgstr "" -#: ../../library/decimal.rst:1730 +#: ../../library/decimal.rst:1742 msgid "Numerical underflow with result rounded to zero." msgstr "" -#: ../../library/decimal.rst:1732 +#: ../../library/decimal.rst:1744 msgid "" "Occurs when a subnormal result is pushed to zero by rounding. :class:" "`Inexact` and :class:`Subnormal` are also signaled." msgstr "" -#: ../../library/decimal.rst:1738 +#: ../../library/decimal.rst:1750 msgid "Enable stricter semantics for mixing floats and Decimals." msgstr "" -#: ../../library/decimal.rst:1740 +#: ../../library/decimal.rst:1752 msgid "" "If the signal is not trapped (default), mixing floats and Decimals is " "permitted in the :class:`~decimal.Decimal` constructor, :meth:`~decimal." @@ -2064,18 +2062,18 @@ msgid "" "Context.create_decimal_from_float` do not set the flag." msgstr "" -#: ../../library/decimal.rst:1748 +#: ../../library/decimal.rst:1760 msgid "" "Otherwise (the signal is trapped), only equality comparisons and explicit " "conversions are silent. All other mixed operations raise :exc:" "`FloatOperation`." msgstr "" -#: ../../library/decimal.rst:1752 +#: ../../library/decimal.rst:1764 msgid "The following table summarizes the hierarchy of signals::" msgstr "" -#: ../../library/decimal.rst:1754 +#: ../../library/decimal.rst:1766 msgid "" "exceptions.ArithmeticError(exceptions.Exception)\n" " DecimalException\n" @@ -2090,15 +2088,15 @@ msgid "" " FloatOperation(DecimalException, exceptions.TypeError)" msgstr "" -#: ../../library/decimal.rst:1773 -msgid "Floating-Point Notes" +#: ../../library/decimal.rst:1785 +msgid "Floating-point notes" msgstr "" -#: ../../library/decimal.rst:1777 +#: ../../library/decimal.rst:1789 msgid "Mitigating round-off error with increased precision" msgstr "" -#: ../../library/decimal.rst:1779 +#: ../../library/decimal.rst:1791 msgid "" "The use of decimal floating point eliminates decimal representation error " "(making it possible to represent ``0.1`` exactly); however, some operations " @@ -2106,7 +2104,7 @@ msgid "" "precision." msgstr "" -#: ../../library/decimal.rst:1783 +#: ../../library/decimal.rst:1795 msgid "" "The effects of round-off error can be amplified by the addition or " "subtraction of nearly offsetting quantities resulting in loss of " @@ -2115,7 +2113,7 @@ msgid "" "of the associative and distributive properties of addition:" msgstr "" -#: ../../library/decimal.rst:1789 +#: ../../library/decimal.rst:1801 msgid "" "# Examples from Seminumerical Algorithms, Section 4.2.2.\n" ">>> from decimal import Decimal, getcontext\n" @@ -2134,13 +2132,13 @@ msgid "" "Decimal('0.0060000')" msgstr "" -#: ../../library/decimal.rst:1807 +#: ../../library/decimal.rst:1819 msgid "" "The :mod:`decimal` module makes it possible to restore the identities by " "expanding the precision sufficiently to avoid loss of significance:" msgstr "" -#: ../../library/decimal.rst:1810 +#: ../../library/decimal.rst:1822 msgid "" ">>> getcontext().prec = 20\n" ">>> u, v, w = Decimal(11111113), Decimal(-11111111), Decimal('7.51111111')\n" @@ -2156,18 +2154,18 @@ msgid "" "Decimal('0.0060000')" msgstr "" -#: ../../library/decimal.rst:1827 +#: ../../library/decimal.rst:1839 msgid "Special values" msgstr "" -#: ../../library/decimal.rst:1829 +#: ../../library/decimal.rst:1841 msgid "" "The number system for the :mod:`decimal` module provides special values " "including ``NaN``, ``sNaN``, ``-Infinity``, ``Infinity``, and two zeros, " "``+0`` and ``-0``." msgstr "" -#: ../../library/decimal.rst:1833 +#: ../../library/decimal.rst:1845 msgid "" "Infinities can be constructed directly with: ``Decimal('Infinity')``. Also, " "they can arise from dividing by zero when the :exc:`DivisionByZero` signal " @@ -2176,14 +2174,14 @@ msgid "" "representable number." msgstr "" -#: ../../library/decimal.rst:1838 +#: ../../library/decimal.rst:1850 msgid "" "The infinities are signed (affine) and can be used in arithmetic operations " "where they get treated as very large, indeterminate numbers. For instance, " "adding a constant to infinity gives another infinite result." msgstr "" -#: ../../library/decimal.rst:1842 +#: ../../library/decimal.rst:1854 msgid "" "Some operations are indeterminate and return ``NaN``, or if the :exc:" "`InvalidOperation` signal is trapped, raise an exception. For example, " @@ -2194,14 +2192,14 @@ msgid "" "the calculation to proceed while flagging specific results as invalid." msgstr "" -#: ../../library/decimal.rst:1850 +#: ../../library/decimal.rst:1862 msgid "" "A variant is ``sNaN`` which signals rather than remaining quiet after every " "operation. This is a useful return value when an invalid result needs to " "interrupt a calculation for special handling." msgstr "" -#: ../../library/decimal.rst:1854 +#: ../../library/decimal.rst:1866 msgid "" "The behavior of Python's comparison operators can be a little surprising " "where a ``NaN`` is involved. A test for equality where one of the operands " @@ -2218,7 +2216,7 @@ msgid "" "compare_signal` methods instead." msgstr "" -#: ../../library/decimal.rst:1867 +#: ../../library/decimal.rst:1879 msgid "" "The signed zeros can result from calculations that underflow. They keep the " "sign that would have resulted if the calculation had been carried out to " @@ -2226,7 +2224,7 @@ msgid "" "negative zeros are treated as equal and their sign is informational." msgstr "" -#: ../../library/decimal.rst:1872 +#: ../../library/decimal.rst:1884 msgid "" "In addition to the two signed zeros which are distinct yet equal, there are " "various representations of zero with differing precisions yet equivalent in " @@ -2235,11 +2233,11 @@ msgid "" "that the following calculation returns a value equal to zero:" msgstr "" -#: ../../library/decimal.rst:1887 +#: ../../library/decimal.rst:1899 msgid "Working with threads" msgstr "" -#: ../../library/decimal.rst:1889 +#: ../../library/decimal.rst:1901 msgid "" "The :func:`getcontext` function accesses a different :class:`Context` object " "for each thread. Having separate thread contexts means that threads may " @@ -2247,13 +2245,13 @@ msgid "" "other threads." msgstr "" -#: ../../library/decimal.rst:1893 +#: ../../library/decimal.rst:1905 msgid "" "Likewise, the :func:`setcontext` function automatically assigns its target " "to the current thread." msgstr "" -#: ../../library/decimal.rst:1896 +#: ../../library/decimal.rst:1908 msgid "" "If :func:`setcontext` has not been called before :func:`getcontext`, then :" "func:`getcontext` will automatically create a new context for use in the " @@ -2261,7 +2259,7 @@ msgid "" "`decimal.DefaultContext` object." msgstr "" -#: ../../library/decimal.rst:1901 +#: ../../library/decimal.rst:1913 msgid "" "The :data:`sys.flags.thread_inherit_context` flag affects the context for " "new threads. If the flag is false, new threads will start with an empty " @@ -2271,7 +2269,7 @@ msgid "" "meth:`threading.Thread.start`." msgstr "" -#: ../../library/decimal.rst:1908 +#: ../../library/decimal.rst:1920 msgid "" "To control the defaults so that each thread will use the same values " "throughout the application, directly modify the *DefaultContext* object. " @@ -2279,7 +2277,7 @@ msgid "" "a race condition between threads calling :func:`getcontext`. For example::" msgstr "" -#: ../../library/decimal.rst:1913 +#: ../../library/decimal.rst:1925 msgid "" "# Set applicationwide defaults for all threads about to be launched\n" "DefaultContext.prec = 12\n" @@ -2295,17 +2293,17 @@ msgid "" " . . ." msgstr "" -#: ../../library/decimal.rst:1932 +#: ../../library/decimal.rst:1944 msgid "Recipes" msgstr "" -#: ../../library/decimal.rst:1934 +#: ../../library/decimal.rst:1946 msgid "" "Here are a few recipes that serve as utility functions and that demonstrate " "ways to work with the :class:`Decimal` class::" msgstr "" -#: ../../library/decimal.rst:1937 +#: ../../library/decimal.rst:1949 msgid "" "def moneyfmt(value, places=2, curr='', sep=',', dp='.',\n" " pos='', neg='-', trailneg=''):\n" @@ -2454,41 +2452,41 @@ msgid "" " return +s" msgstr "" -#: ../../library/decimal.rst:2089 +#: ../../library/decimal.rst:2101 msgid "Decimal FAQ" msgstr "" -#: ../../library/decimal.rst:2091 +#: ../../library/decimal.rst:2103 msgid "" "Q. It is cumbersome to type ``decimal.Decimal('1234.5')``. Is there a way " "to minimize typing when using the interactive interpreter?" msgstr "" -#: ../../library/decimal.rst:2094 +#: ../../library/decimal.rst:2106 msgid "A. Some users abbreviate the constructor to just a single letter:" msgstr "" -#: ../../library/decimal.rst:2100 +#: ../../library/decimal.rst:2112 msgid "" "Q. In a fixed-point application with two decimal places, some inputs have " "many places and need to be rounded. Others are not supposed to have excess " "digits and need to be validated. What methods should be used?" msgstr "" -#: ../../library/decimal.rst:2104 +#: ../../library/decimal.rst:2116 msgid "" "A. The :meth:`~Decimal.quantize` method rounds to a fixed number of decimal " "places. If the :const:`Inexact` trap is set, it is also useful for " "validation:" msgstr "" -#: ../../library/decimal.rst:2122 +#: ../../library/decimal.rst:2134 msgid "" "Q. Once I have valid two place inputs, how do I maintain that invariant " "throughout an application?" msgstr "" -#: ../../library/decimal.rst:2125 +#: ../../library/decimal.rst:2137 msgid "" "A. Some operations like addition, subtraction, and multiplication by an " "integer will automatically preserve fixed point. Others operations, like " @@ -2496,13 +2494,13 @@ msgid "" "places and need to be followed-up with a :meth:`~Decimal.quantize` step:" msgstr "" -#: ../../library/decimal.rst:2143 +#: ../../library/decimal.rst:2155 msgid "" "In developing fixed-point applications, it is convenient to define functions " "to handle the :meth:`~Decimal.quantize` step:" msgstr "" -#: ../../library/decimal.rst:2157 +#: ../../library/decimal.rst:2169 msgid "" "Q. There are many ways to express the same value. The numbers ``200``, " "``200.000``, ``2E2``, and ``.02E+4`` all have the same value at various " @@ -2510,17 +2508,17 @@ msgid "" "canonical value?" msgstr "" -#: ../../library/decimal.rst:2162 +#: ../../library/decimal.rst:2174 msgid "" "A. The :meth:`~Decimal.normalize` method maps all equivalent values to a " "single representative:" msgstr "" -#: ../../library/decimal.rst:2169 +#: ../../library/decimal.rst:2181 msgid "Q. When does rounding occur in a computation?" msgstr "" -#: ../../library/decimal.rst:2171 +#: ../../library/decimal.rst:2183 msgid "" "A. It occurs *after* the computation. The philosophy of the decimal " "specification is that numbers are considered exact and are created " @@ -2530,7 +2528,7 @@ msgid "" "computation::" msgstr "" -#: ../../library/decimal.rst:2178 +#: ../../library/decimal.rst:2190 msgid "" ">>> getcontext().prec = 5\n" ">>> pi = Decimal('3.1415926535') # More than 5 digits\n" @@ -2544,13 +2542,13 @@ msgid "" "Decimal('3.1416')" msgstr "" -#: ../../library/decimal.rst:2189 +#: ../../library/decimal.rst:2201 msgid "" "Q. Some decimal values always print with exponential notation. Is there a " "way to get a non-exponential representation?" msgstr "" -#: ../../library/decimal.rst:2192 +#: ../../library/decimal.rst:2204 msgid "" "A. For some values, exponential notation is the only way to express the " "number of significant places in the coefficient. For example, expressing " @@ -2558,37 +2556,37 @@ msgid "" "original's two-place significance." msgstr "" -#: ../../library/decimal.rst:2197 +#: ../../library/decimal.rst:2209 msgid "" "If an application does not care about tracking significance, it is easy to " "remove the exponent and trailing zeroes, losing significance, but keeping " "the value unchanged:" msgstr "" -#: ../../library/decimal.rst:2207 +#: ../../library/decimal.rst:2219 msgid "Q. Is there a way to convert a regular float to a :class:`Decimal`?" msgstr "" -#: ../../library/decimal.rst:2209 +#: ../../library/decimal.rst:2221 msgid "" "A. Yes, any binary floating-point number can be exactly expressed as a " "Decimal though an exact conversion may take more precision than intuition " "would suggest:" msgstr "" -#: ../../library/decimal.rst:2213 +#: ../../library/decimal.rst:2225 msgid "" ">>> Decimal(math.pi)\n" "Decimal('3.141592653589793115997963468544185161590576171875')" msgstr "" -#: ../../library/decimal.rst:2218 +#: ../../library/decimal.rst:2230 msgid "" "Q. Within a complex calculation, how can I make sure that I haven't gotten a " "spurious result because of insufficient precision or rounding anomalies." msgstr "" -#: ../../library/decimal.rst:2221 +#: ../../library/decimal.rst:2233 msgid "" "A. The decimal module makes it easy to test results. A best practice is to " "re-run calculations using greater precision and with various rounding modes. " @@ -2596,14 +2594,14 @@ msgid "" "issues, ill-conditioned inputs, or a numerically unstable algorithm." msgstr "" -#: ../../library/decimal.rst:2226 +#: ../../library/decimal.rst:2238 msgid "" "Q. I noticed that context precision is applied to the results of operations " "but not to the inputs. Is there anything to watch out for when mixing " "values of different precisions?" msgstr "" -#: ../../library/decimal.rst:2230 +#: ../../library/decimal.rst:2242 msgid "" "A. Yes. The principle is that all values are considered to be exact and so " "is the arithmetic on those values. Only the results are rounded. The " @@ -2612,7 +2610,7 @@ msgid "" "haven't been rounded:" msgstr "" -#: ../../library/decimal.rst:2235 +#: ../../library/decimal.rst:2247 msgid "" ">>> getcontext().prec = 3\n" ">>> Decimal('3.104') + Decimal('2.104')\n" @@ -2621,30 +2619,30 @@ msgid "" "Decimal('5.20')" msgstr "" -#: ../../library/decimal.rst:2243 +#: ../../library/decimal.rst:2255 msgid "" "The solution is either to increase precision or to force rounding of inputs " "using the unary plus operation:" msgstr "" -#: ../../library/decimal.rst:2246 +#: ../../library/decimal.rst:2258 msgid "" ">>> getcontext().prec = 3\n" ">>> +Decimal('1.23456789') # unary plus triggers rounding\n" "Decimal('1.23')" msgstr "" -#: ../../library/decimal.rst:2252 +#: ../../library/decimal.rst:2264 msgid "" "Alternatively, inputs can be rounded upon creation using the :meth:`Context." "create_decimal` method:" msgstr "" -#: ../../library/decimal.rst:2258 +#: ../../library/decimal.rst:2270 msgid "Q. Is the CPython implementation fast for large numbers?" msgstr "" -#: ../../library/decimal.rst:2260 +#: ../../library/decimal.rst:2272 msgid "" "A. Yes. In the CPython and PyPy3 implementations, the C/CFFI versions of " "the decimal module integrate the high speed `libmpdec >> setcontext(Context(prec=MAX_PREC, Emax=MAX_EMAX, Emin=MIN_EMIN))\n" ">>> x = Decimal(2) ** 256\n" @@ -2679,13 +2677,13 @@ msgid "" "Decimal('904625697166532776746648320380374280103671755200316906558262375061821325312')" msgstr "" -#: ../../library/decimal.rst:2283 +#: ../../library/decimal.rst:2295 msgid "" "For inexact results, :const:`MAX_PREC` is far too large on 64-bit platforms " "and the available memory will be insufficient::" msgstr "" -#: ../../library/decimal.rst:2286 +#: ../../library/decimal.rst:2298 msgid "" ">>> Decimal(1) / 3\n" "Traceback (most recent call last):\n" @@ -2693,7 +2691,7 @@ msgid "" "MemoryError" msgstr "" -#: ../../library/decimal.rst:2291 +#: ../../library/decimal.rst:2303 msgid "" "On systems with overallocation (e.g. Linux), a more sophisticated approach " "is to adjust :attr:`~Context.prec` to the amount of available RAM. Suppose " @@ -2701,7 +2699,7 @@ msgid "" "of 500MB each::" msgstr "" -#: ../../library/decimal.rst:2295 +#: ../../library/decimal.rst:2307 msgid "" ">>> import sys\n" ">>>\n" @@ -2725,14 +2723,14 @@ msgid "" " decimal.Inexact: []" msgstr "" -#: ../../library/decimal.rst:2315 +#: ../../library/decimal.rst:2327 msgid "" "In general (and especially on systems without overallocation), it is " "recommended to estimate even tighter bounds and set the :attr:`Inexact` trap " "if all calculations are expected to be exact." msgstr "" -#: ../../library/decimal.rst:2324 +#: ../../library/decimal.rst:2336 msgid "" "This approach now works for all exact results except for non-integer powers." msgstr "" diff --git a/library/development.po b/library/development.po index 1f362e929..d05ebde54 100644 --- a/library/development.po +++ b/library/development.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:04+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/devmode.po b/library/devmode.po index 49cce1cd3..6c6765597 100644 --- a/library/devmode.po +++ b/library/devmode.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:04+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/dialog.po b/library/dialog.po index 4741580b6..35dd907b8 100644 --- a/library/dialog.po +++ b/library/dialog.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:04+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/difflib.po b/library/difflib.po index f68402609..d36a67b8e 100644 --- a/library/difflib.po +++ b/library/difflib.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:04+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/dis.po b/library/dis.po index 266aa31ed..9242db355 100644 --- a/library/dis.po +++ b/library/dis.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:04+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -747,8 +748,8 @@ msgstr "" msgid "Implements ``STACK[-1] = not STACK[-1]``." msgstr "" -#: ../../library/dis.rst:665 ../../library/dis.rst:1333 -#: ../../library/dis.rst:1349 +#: ../../library/dis.rst:665 ../../library/dis.rst:1325 +#: ../../library/dis.rst:1341 msgid "This instruction now requires an exact :class:`bool` operand." msgstr "" @@ -811,8 +812,8 @@ msgstr "" #: ../../library/dis.rst:738 ../../library/dis.rst:750 #: ../../library/dis.rst:828 ../../library/dis.rst:838 #: ../../library/dis.rst:848 ../../library/dis.rst:1054 -#: ../../library/dis.rst:1065 ../../library/dis.rst:1176 -#: ../../library/dis.rst:1188 ../../library/dis.rst:1200 +#: ../../library/dis.rst:1065 ../../library/dis.rst:1168 +#: ../../library/dis.rst:1180 ../../library/dis.rst:1192 msgid "Implements::" msgstr "" @@ -1092,7 +1093,7 @@ msgid "" "class:`tuple` containing the corresponding values. Otherwise, push ``None``." msgstr "" -#: ../../library/dis.rst:1006 ../../library/dis.rst:1714 +#: ../../library/dis.rst:1006 ../../library/dis.rst:1706 msgid "" "Previously, this instruction also pushed a boolean value indicating success " "(``True``) or failure (``False``)." @@ -1195,24 +1196,18 @@ msgstr "" #: ../../library/dis.rst:1099 msgid "" -"Pushes ``co_consts[consti]`` onto the stack. Can be used when the constant " -"value is known to be immortal." -msgstr "" - -#: ../../library/dis.rst:1107 -msgid "" "Pushes the value associated with ``co_names[namei]`` onto the stack. The " "name is looked up within the locals, then the globals, then the builtins." msgstr "" -#: ../../library/dis.rst:1113 +#: ../../library/dis.rst:1105 msgid "" "Pushes a reference to the locals dictionary onto the stack. This is used to " "prepare namespace dictionaries for :opcode:`LOAD_FROM_DICT_OR_DEREF` and :" "opcode:`LOAD_FROM_DICT_OR_GLOBALS`." msgstr "" -#: ../../library/dis.rst:1122 +#: ../../library/dis.rst:1114 msgid "" "Pops a mapping off the stack and looks up the value for ``co_names[namei]``. " "If the name is not found there, looks it up in the globals and then the " @@ -1221,13 +1216,13 @@ msgid "" "bodies." msgstr "" -#: ../../library/dis.rst:1133 +#: ../../library/dis.rst:1125 msgid "" "Creates a tuple consuming *count* items from the stack, and pushes the " "resulting tuple onto the stack::" msgstr "" -#: ../../library/dis.rst:1136 +#: ../../library/dis.rst:1128 msgid "" "if count == 0:\n" " value = ()\n" @@ -1238,74 +1233,74 @@ msgid "" "STACK.append(value)" msgstr "" -#: ../../library/dis.rst:1147 +#: ../../library/dis.rst:1139 msgid "Works as :opcode:`BUILD_TUPLE`, but creates a list." msgstr "" -#: ../../library/dis.rst:1152 +#: ../../library/dis.rst:1144 msgid "Works as :opcode:`BUILD_TUPLE`, but creates a set." msgstr "" -#: ../../library/dis.rst:1157 +#: ../../library/dis.rst:1149 msgid "" "Pushes a new dictionary object onto the stack. Pops ``2 * count`` items so " "that the dictionary holds *count* entries: ``{..., STACK[-4]: STACK[-3], " "STACK[-2]: STACK[-1]}``." msgstr "" -#: ../../library/dis.rst:1161 +#: ../../library/dis.rst:1153 msgid "" "The dictionary is created from stack items instead of creating an empty " "dictionary pre-sized to hold *count* items." msgstr "" -#: ../../library/dis.rst:1168 +#: ../../library/dis.rst:1160 msgid "" "Concatenates *count* strings from the stack and pushes the resulting string " "onto the stack." msgstr "" -#: ../../library/dis.rst:1178 +#: ../../library/dis.rst:1170 msgid "" "seq = STACK.pop()\n" "list.extend(STACK[-i], seq)" msgstr "" -#: ../../library/dis.rst:1181 +#: ../../library/dis.rst:1173 msgid "Used to build lists." msgstr "" -#: ../../library/dis.rst:1190 +#: ../../library/dis.rst:1182 msgid "" "seq = STACK.pop()\n" "set.update(STACK[-i], seq)" msgstr "" -#: ../../library/dis.rst:1193 +#: ../../library/dis.rst:1185 msgid "Used to build sets." msgstr "" -#: ../../library/dis.rst:1202 +#: ../../library/dis.rst:1194 msgid "" "map = STACK.pop()\n" "dict.update(STACK[-i], map)" msgstr "" -#: ../../library/dis.rst:1205 +#: ../../library/dis.rst:1197 msgid "Used to build dicts." msgstr "" -#: ../../library/dis.rst:1212 +#: ../../library/dis.rst:1204 msgid "Like :opcode:`DICT_UPDATE` but raises an exception for duplicate keys." msgstr "" -#: ../../library/dis.rst:1219 +#: ../../library/dis.rst:1211 msgid "" "If the low bit of ``namei`` is not set, this replaces ``STACK[-1]`` with " "``getattr(STACK[-1], co_names[namei>>1])``." msgstr "" -#: ../../library/dis.rst:1222 +#: ../../library/dis.rst:1214 msgid "" "If the low bit of ``namei`` is set, this will attempt to load a method named " "``co_names[namei>>1]`` from the ``STACK[-1]`` object. ``STACK[-1]`` is " @@ -1317,76 +1312,76 @@ msgid "" "pushed." msgstr "" -#: ../../library/dis.rst:1231 +#: ../../library/dis.rst:1223 msgid "" "If the low bit of ``namei`` is set, then a ``NULL`` or ``self`` is pushed to " "the stack before the attribute or unbound method respectively." msgstr "" -#: ../../library/dis.rst:1238 +#: ../../library/dis.rst:1230 msgid "" "This opcode implements :func:`super`, both in its zero-argument and two-" "argument forms (e.g. ``super().method()``, ``super().attr`` and ``super(cls, " "self).method()``, ``super(cls, self).attr``)." msgstr "" -#: ../../library/dis.rst:1242 +#: ../../library/dis.rst:1234 msgid "It pops three values from the stack (from top of stack down):" msgstr "" -#: ../../library/dis.rst:1244 +#: ../../library/dis.rst:1236 msgid "``self``: the first argument to the current method" msgstr "" -#: ../../library/dis.rst:1245 +#: ../../library/dis.rst:1237 msgid "``cls``: the class within which the current method was defined" msgstr "" -#: ../../library/dis.rst:1246 +#: ../../library/dis.rst:1238 msgid "the global ``super``" msgstr "" -#: ../../library/dis.rst:1248 +#: ../../library/dis.rst:1240 msgid "" "With respect to its argument, it works similarly to :opcode:`LOAD_ATTR`, " "except that ``namei`` is shifted left by 2 bits instead of 1." msgstr "" -#: ../../library/dis.rst:1251 +#: ../../library/dis.rst:1243 msgid "" "The low bit of ``namei`` signals to attempt a method load, as with :opcode:" "`LOAD_ATTR`, which results in pushing ``NULL`` and the loaded method. When " "it is unset a single value is pushed to the stack." msgstr "" -#: ../../library/dis.rst:1255 +#: ../../library/dis.rst:1247 msgid "" "The second-low bit of ``namei``, if set, means that this was a two-argument " "call to :func:`super` (unset means zero-argument)." msgstr "" -#: ../../library/dis.rst:1263 +#: ../../library/dis.rst:1255 msgid "" "Performs a Boolean operation. The operation name can be found in " "``cmp_op[opname >> 5]``. If the fifth-lowest bit of ``opname`` is set " "(``opname & 16``), the result should be coerced to ``bool``." msgstr "" -#: ../../library/dis.rst:1267 +#: ../../library/dis.rst:1259 msgid "" "The fifth-lowest bit of the oparg now indicates a forced conversion to :" "class:`bool`." msgstr "" -#: ../../library/dis.rst:1274 +#: ../../library/dis.rst:1266 msgid "Performs ``is`` comparison, or ``is not`` if ``invert`` is 1." msgstr "" -#: ../../library/dis.rst:1281 +#: ../../library/dis.rst:1273 msgid "Performs ``in`` comparison, or ``not in`` if ``invert`` is 1." msgstr "" -#: ../../library/dis.rst:1288 +#: ../../library/dis.rst:1280 msgid "" "Imports the module ``co_names[namei]``. ``STACK[-1]`` and ``STACK[-2]`` are " "popped and provide the *fromlist* and *level* arguments of :func:" @@ -1395,62 +1390,62 @@ msgid "" "opcode:`STORE_FAST` instruction modifies the namespace." msgstr "" -#: ../../library/dis.rst:1296 +#: ../../library/dis.rst:1288 msgid "" "Loads the attribute ``co_names[namei]`` from the module found in " "``STACK[-1]``. The resulting object is pushed onto the stack, to be " "subsequently stored by a :opcode:`STORE_FAST` instruction." msgstr "" -#: ../../library/dis.rst:1303 +#: ../../library/dis.rst:1295 msgid "Increments bytecode counter by *delta*." msgstr "" -#: ../../library/dis.rst:1308 +#: ../../library/dis.rst:1300 msgid "Decrements bytecode counter by *delta*. Checks for interrupts." msgstr "" -#: ../../library/dis.rst:1315 +#: ../../library/dis.rst:1307 msgid "Decrements bytecode counter by *delta*. Does not check for interrupts." msgstr "" -#: ../../library/dis.rst:1322 +#: ../../library/dis.rst:1314 msgid "" "If ``STACK[-1]`` is true, increments the bytecode counter by *delta*. " "``STACK[-1]`` is popped." msgstr "" -#: ../../library/dis.rst:1325 ../../library/dis.rst:1341 +#: ../../library/dis.rst:1317 ../../library/dis.rst:1333 msgid "" "The oparg is now a relative delta rather than an absolute target. This " "opcode is a pseudo-instruction, replaced in final bytecode by the directed " "versions (forward/backward)." msgstr "" -#: ../../library/dis.rst:1330 ../../library/dis.rst:1346 -#: ../../library/dis.rst:1359 ../../library/dis.rst:1370 +#: ../../library/dis.rst:1322 ../../library/dis.rst:1338 +#: ../../library/dis.rst:1351 ../../library/dis.rst:1362 msgid "This is no longer a pseudo-instruction." msgstr "" -#: ../../library/dis.rst:1338 +#: ../../library/dis.rst:1330 msgid "" "If ``STACK[-1]`` is false, increments the bytecode counter by *delta*. " "``STACK[-1]`` is popped." msgstr "" -#: ../../library/dis.rst:1354 +#: ../../library/dis.rst:1346 msgid "" "If ``STACK[-1]`` is not ``None``, increments the bytecode counter by " "*delta*. ``STACK[-1]`` is popped." msgstr "" -#: ../../library/dis.rst:1365 +#: ../../library/dis.rst:1357 msgid "" "If ``STACK[-1]`` is ``None``, increments the bytecode counter by *delta*. " "``STACK[-1]`` is popped." msgstr "" -#: ../../library/dis.rst:1375 +#: ../../library/dis.rst:1367 msgid "" "``STACK[-1]`` is an :term:`iterator`. Call its :meth:`~iterator.__next__` " "method. If this yields a new value, push it on the stack (leaving the " @@ -1458,103 +1453,103 @@ msgid "" "code counter is incremented by *delta*." msgstr "" -#: ../../library/dis.rst:1380 +#: ../../library/dis.rst:1372 msgid "Up until 3.11 the iterator was popped when it was exhausted." msgstr "" -#: ../../library/dis.rst:1385 +#: ../../library/dis.rst:1377 msgid "Loads the global named ``co_names[namei>>1]`` onto the stack." msgstr "" -#: ../../library/dis.rst:1387 +#: ../../library/dis.rst:1379 msgid "" "If the low bit of ``namei`` is set, then a ``NULL`` is pushed to the stack " "before the global variable." msgstr "" -#: ../../library/dis.rst:1393 +#: ../../library/dis.rst:1385 msgid "" "Pushes a reference to the local ``co_varnames[var_num]`` onto the stack." msgstr "" -#: ../../library/dis.rst:1395 +#: ../../library/dis.rst:1387 msgid "" "This opcode is now only used in situations where the local variable is " "guaranteed to be initialized. It cannot raise :exc:`UnboundLocalError`." msgstr "" -#: ../../library/dis.rst:1401 +#: ../../library/dis.rst:1393 msgid "" "Pushes a borrowed reference to the local ``co_varnames[var_num]`` onto the " "stack." msgstr "" -#: ../../library/dis.rst:1408 +#: ../../library/dis.rst:1400 msgid "" "Pushes references to ``co_varnames[var_nums >> 4]`` and " "``co_varnames[var_nums & 15]`` onto the stack." msgstr "" -#: ../../library/dis.rst:1416 +#: ../../library/dis.rst:1408 msgid "" "Pushes borrowed references to ``co_varnames[var_nums >> 4]`` and " "``co_varnames[var_nums & 15]`` onto the stack." msgstr "" -#: ../../library/dis.rst:1423 +#: ../../library/dis.rst:1415 msgid "" "Pushes a reference to the local ``co_varnames[var_num]`` onto the stack, " "raising an :exc:`UnboundLocalError` if the local variable has not been " "initialized." msgstr "" -#: ../../library/dis.rst:1431 +#: ../../library/dis.rst:1423 msgid "" "Pushes a reference to the local ``co_varnames[var_num]`` onto the stack (or " "pushes ``NULL`` onto the stack if the local variable has not been " "initialized) and sets ``co_varnames[var_num]`` to ``NULL``." msgstr "" -#: ../../library/dis.rst:1439 +#: ../../library/dis.rst:1431 msgid "Stores ``STACK.pop()`` into the local ``co_varnames[var_num]``." msgstr "" -#: ../../library/dis.rst:1443 +#: ../../library/dis.rst:1435 msgid "" "Stores ``STACK[-1]`` into ``co_varnames[var_nums >> 4]`` and ``STACK[-2]`` " "into ``co_varnames[var_nums & 15]``." msgstr "" -#: ../../library/dis.rst:1450 +#: ../../library/dis.rst:1442 msgid "" "Stores ``STACK.pop()`` into the local ``co_varnames[var_nums >> 4]`` and " "pushes a reference to the local ``co_varnames[var_nums & 15]`` onto the " "stack." msgstr "" -#: ../../library/dis.rst:1458 +#: ../../library/dis.rst:1450 msgid "Deletes local ``co_varnames[var_num]``." msgstr "" -#: ../../library/dis.rst:1463 +#: ../../library/dis.rst:1455 msgid "" "Creates a new cell in slot ``i``. If that slot is nonempty then that value " "is stored into the new cell." msgstr "" -#: ../../library/dis.rst:1471 +#: ../../library/dis.rst:1463 msgid "" "Loads the cell contained in slot ``i`` of the \"fast locals\" storage. " "Pushes a reference to the object the cell contains on the stack." msgstr "" -#: ../../library/dis.rst:1474 ../../library/dis.rst:1496 -#: ../../library/dis.rst:1507 +#: ../../library/dis.rst:1466 ../../library/dis.rst:1488 +#: ../../library/dis.rst:1499 msgid "" "``i`` is no longer offset by the length of :attr:`~codeobject.co_varnames`." msgstr "" -#: ../../library/dis.rst:1480 +#: ../../library/dis.rst:1472 msgid "" "Pops a mapping off the stack and looks up the name associated with slot " "``i`` of the \"fast locals\" storage in this mapping. If the name is not " @@ -1565,112 +1560,112 @@ msgid "" "class bodies." msgstr "" -#: ../../library/dis.rst:1493 +#: ../../library/dis.rst:1485 msgid "" "Stores ``STACK.pop()`` into the cell contained in slot ``i`` of the \"fast " "locals\" storage." msgstr "" -#: ../../library/dis.rst:1502 +#: ../../library/dis.rst:1494 msgid "" "Empties the cell contained in slot ``i`` of the \"fast locals\" storage. " "Used by the :keyword:`del` statement." msgstr "" -#: ../../library/dis.rst:1513 +#: ../../library/dis.rst:1505 msgid "" "Copies the ``n`` :term:`free (closure) variables ` from " "the closure into the frame. Removes the need for special code on the " "caller's side when calling closures." msgstr "" -#: ../../library/dis.rst:1522 +#: ../../library/dis.rst:1514 msgid "" "Raises an exception using one of the 3 forms of the ``raise`` statement, " "depending on the value of *argc*:" msgstr "" -#: ../../library/dis.rst:1525 +#: ../../library/dis.rst:1517 msgid "0: ``raise`` (re-raise previous exception)" msgstr "" -#: ../../library/dis.rst:1526 +#: ../../library/dis.rst:1518 msgid "" "1: ``raise STACK[-1]`` (raise exception instance or type at ``STACK[-1]``)" msgstr "" -#: ../../library/dis.rst:1527 +#: ../../library/dis.rst:1519 msgid "" "2: ``raise STACK[-2] from STACK[-1]`` (raise exception instance or type at " "``STACK[-2]`` with ``__cause__`` set to ``STACK[-1]``)" msgstr "" -#: ../../library/dis.rst:1533 +#: ../../library/dis.rst:1525 msgid "" "Calls a callable object with the number of arguments specified by ``argc``. " "On the stack are (in ascending order):" msgstr "" -#: ../../library/dis.rst:1536 ../../library/dis.rst:1560 +#: ../../library/dis.rst:1528 ../../library/dis.rst:1552 msgid "The callable" msgstr "" -#: ../../library/dis.rst:1537 ../../library/dis.rst:1561 +#: ../../library/dis.rst:1529 ../../library/dis.rst:1553 msgid "``self`` or ``NULL``" msgstr "" -#: ../../library/dis.rst:1538 ../../library/dis.rst:1562 +#: ../../library/dis.rst:1530 ../../library/dis.rst:1554 msgid "The remaining positional arguments" msgstr "" -#: ../../library/dis.rst:1540 +#: ../../library/dis.rst:1532 msgid "``argc`` is the total of the positional arguments, excluding ``self``." msgstr "" -#: ../../library/dis.rst:1542 +#: ../../library/dis.rst:1534 msgid "" "``CALL`` pops all arguments and the callable object off the stack, calls the " "callable object with those arguments, and pushes the return value returned " "by the callable object." msgstr "" -#: ../../library/dis.rst:1548 +#: ../../library/dis.rst:1540 msgid "The callable now always appears at the same position on the stack." msgstr "" -#: ../../library/dis.rst:1551 +#: ../../library/dis.rst:1543 msgid "Calls with keyword arguments are now handled by :opcode:`CALL_KW`." msgstr "" -#: ../../library/dis.rst:1557 +#: ../../library/dis.rst:1549 msgid "" "Calls a callable object with the number of arguments specified by ``argc``, " "including one or more named arguments. On the stack are (in ascending order):" msgstr "" -#: ../../library/dis.rst:1563 +#: ../../library/dis.rst:1555 msgid "The named arguments" msgstr "" -#: ../../library/dis.rst:1564 +#: ../../library/dis.rst:1556 msgid "A :class:`tuple` of keyword argument names" msgstr "" -#: ../../library/dis.rst:1566 +#: ../../library/dis.rst:1558 msgid "" "``argc`` is the total of the positional and named arguments, excluding " "``self``. The length of the tuple of keyword argument names is the number of " "named arguments." msgstr "" -#: ../../library/dis.rst:1569 +#: ../../library/dis.rst:1561 msgid "" "``CALL_KW`` pops all arguments, the keyword names, and the callable object " "off the stack, calls the callable object with those arguments, and pushes " "the return value returned by the callable object." msgstr "" -#: ../../library/dis.rst:1578 +#: ../../library/dis.rst:1570 msgid "" "Calls a callable object with variable set of positional and keyword " "arguments. If the lowest bit of *flags* is set, the top of the stack " @@ -1682,33 +1677,33 @@ msgid "" "arguments, and pushes the return value returned by the callable object." msgstr "" -#: ../../library/dis.rst:1593 +#: ../../library/dis.rst:1585 msgid "" "Pushes a ``NULL`` to the stack. Used in the call sequence to match the " "``NULL`` pushed by :opcode:`LOAD_METHOD` for non-method calls." msgstr "" -#: ../../library/dis.rst:1602 +#: ../../library/dis.rst:1594 msgid "" "Pushes a new function object on the stack built from the code object at " "``STACK[-1]``." msgstr "" -#: ../../library/dis.rst:1604 +#: ../../library/dis.rst:1596 msgid "Flag value ``0x04`` is a tuple of strings instead of dictionary" msgstr "" -#: ../../library/dis.rst:1607 +#: ../../library/dis.rst:1599 msgid "Qualified name at ``STACK[-1]`` was removed." msgstr "" -#: ../../library/dis.rst:1610 +#: ../../library/dis.rst:1602 msgid "" "Extra function attributes on the stack, signaled by oparg flags, were " "removed. They now use :opcode:`SET_FUNCTION_ATTRIBUTE`." msgstr "" -#: ../../library/dis.rst:1617 +#: ../../library/dis.rst:1609 msgid "" "Sets an attribute on a function object. Expects the function at " "``STACK[-1]`` and the attribute value to set at ``STACK[-2]``; consumes both " @@ -1716,42 +1711,42 @@ msgid "" "attribute to set:" msgstr "" -#: ../../library/dis.rst:1621 +#: ../../library/dis.rst:1613 msgid "" "``0x01`` a tuple of default values for positional-only and positional-or-" "keyword parameters in positional order" msgstr "" -#: ../../library/dis.rst:1623 +#: ../../library/dis.rst:1615 msgid "``0x02`` a dictionary of keyword-only parameters' default values" msgstr "" -#: ../../library/dis.rst:1624 +#: ../../library/dis.rst:1616 msgid "``0x04`` a tuple of strings containing parameters' annotations" msgstr "" -#: ../../library/dis.rst:1625 +#: ../../library/dis.rst:1617 msgid "``0x08`` a tuple containing cells for free variables, making a closure" msgstr "" -#: ../../library/dis.rst:1634 +#: ../../library/dis.rst:1626 msgid "" "Pushes a slice object on the stack. *argc* must be 2 or 3. If it is 2, " "implements::" msgstr "" -#: ../../library/dis.rst:1636 +#: ../../library/dis.rst:1628 msgid "" "end = STACK.pop()\n" "start = STACK.pop()\n" "STACK.append(slice(start, end))" msgstr "" -#: ../../library/dis.rst:1640 +#: ../../library/dis.rst:1632 msgid "if it is 3, implements::" msgstr "" -#: ../../library/dis.rst:1642 +#: ../../library/dis.rst:1634 msgid "" "step = STACK.pop()\n" "end = STACK.pop()\n" @@ -1759,11 +1754,11 @@ msgid "" "STACK.append(slice(start, end, step))" msgstr "" -#: ../../library/dis.rst:1647 +#: ../../library/dis.rst:1639 msgid "See the :func:`slice` built-in function for more information." msgstr "" -#: ../../library/dis.rst:1652 +#: ../../library/dis.rst:1644 msgid "" "Prefixes any opcode which has an argument too big to fit into the default " "one byte. *ext* holds an additional byte which act as higher bits in the " @@ -1771,50 +1766,50 @@ msgid "" "allowed, forming an argument from two-byte to four-byte." msgstr "" -#: ../../library/dis.rst:1660 +#: ../../library/dis.rst:1652 msgid "Convert value to a string, depending on ``oparg``::" msgstr "" -#: ../../library/dis.rst:1662 +#: ../../library/dis.rst:1654 msgid "" "value = STACK.pop()\n" "result = func(value)\n" "STACK.append(result)" msgstr "" -#: ../../library/dis.rst:1666 +#: ../../library/dis.rst:1658 msgid "``oparg == 1``: call :func:`str` on *value*" msgstr "" -#: ../../library/dis.rst:1667 +#: ../../library/dis.rst:1659 msgid "``oparg == 2``: call :func:`repr` on *value*" msgstr "" -#: ../../library/dis.rst:1668 +#: ../../library/dis.rst:1660 msgid "``oparg == 3``: call :func:`ascii` on *value*" msgstr "" -#: ../../library/dis.rst:1670 ../../library/dis.rst:1683 -#: ../../library/dis.rst:1696 +#: ../../library/dis.rst:1662 ../../library/dis.rst:1675 +#: ../../library/dis.rst:1688 msgid "Used for implementing formatted string literals (f-strings)." msgstr "" -#: ../../library/dis.rst:1677 +#: ../../library/dis.rst:1669 msgid "Formats the value on top of stack::" msgstr "" -#: ../../library/dis.rst:1679 +#: ../../library/dis.rst:1671 msgid "" "value = STACK.pop()\n" "result = value.__format__(\"\")\n" "STACK.append(result)" msgstr "" -#: ../../library/dis.rst:1689 +#: ../../library/dis.rst:1681 msgid "Formats the given value with the given format spec::" msgstr "" -#: ../../library/dis.rst:1691 +#: ../../library/dis.rst:1683 msgid "" "spec = STACK.pop()\n" "value = STACK.pop()\n" @@ -1822,14 +1817,14 @@ msgid "" "STACK.append(result)" msgstr "" -#: ../../library/dis.rst:1703 +#: ../../library/dis.rst:1695 msgid "" "``STACK[-1]`` is a tuple of keyword attribute names, ``STACK[-2]`` is the " "class being matched against, and ``STACK[-3]`` is the match subject. " "*count* is the number of positional sub-patterns." msgstr "" -#: ../../library/dis.rst:1707 +#: ../../library/dis.rst:1699 msgid "" "Pop ``STACK[-1]``, ``STACK[-2]``, and ``STACK[-3]``. If ``STACK[-3]`` is an " "instance of ``STACK[-2]`` and has the positional and keyword attributes " @@ -1837,219 +1832,219 @@ msgid "" "Otherwise, push ``None``." msgstr "" -#: ../../library/dis.rst:1721 +#: ../../library/dis.rst:1713 msgid "A no-op. Performs internal tracing, debugging and optimization checks." msgstr "" -#: ../../library/dis.rst:1723 +#: ../../library/dis.rst:1715 msgid "" "The ``context`` operand consists of two parts. The lowest two bits indicate " "where the ``RESUME`` occurs:" msgstr "" -#: ../../library/dis.rst:1726 +#: ../../library/dis.rst:1718 msgid "" "``0`` The start of a function, which is neither a generator, coroutine nor " "an async generator" msgstr "" -#: ../../library/dis.rst:1728 +#: ../../library/dis.rst:1720 msgid "``1`` After a ``yield`` expression" msgstr "" -#: ../../library/dis.rst:1729 +#: ../../library/dis.rst:1721 msgid "``2`` After a ``yield from`` expression" msgstr "" -#: ../../library/dis.rst:1730 +#: ../../library/dis.rst:1722 msgid "``3`` After an ``await`` expression" msgstr "" -#: ../../library/dis.rst:1732 +#: ../../library/dis.rst:1724 msgid "" "The next bit is ``1`` if the RESUME is at except-depth ``1``, and ``0`` " "otherwise." msgstr "" -#: ../../library/dis.rst:1737 +#: ../../library/dis.rst:1729 msgid "The oparg value changed to include information about except-depth" msgstr "" -#: ../../library/dis.rst:1743 +#: ../../library/dis.rst:1735 msgid "" "Create a generator, coroutine, or async generator from the current frame. " "Used as first opcode of in code object for the above mentioned callables. " "Clear the current frame and return the newly created generator." msgstr "" -#: ../../library/dis.rst:1752 +#: ../../library/dis.rst:1744 msgid "" "Equivalent to ``STACK[-1] = STACK[-2].send(STACK[-1])``. Used in ``yield " "from`` and ``await`` statements." msgstr "" -#: ../../library/dis.rst:1755 +#: ../../library/dis.rst:1747 msgid "" "If the call raises :exc:`StopIteration`, pop the top value from the stack, " "push the exception's ``value`` attribute, and increment the bytecode counter " "by *delta*." msgstr "" -#: ../../library/dis.rst:1764 +#: ../../library/dis.rst:1756 msgid "" "This is not really an opcode. It identifies the dividing line between " "opcodes in the range [0,255] which don't use their argument and those that " "do (``< HAVE_ARGUMENT`` and ``>= HAVE_ARGUMENT``, respectively)." msgstr "" -#: ../../library/dis.rst:1768 +#: ../../library/dis.rst:1760 msgid "" "If your application uses pseudo instructions or specialized instructions, " "use the :data:`hasarg` collection instead." msgstr "" -#: ../../library/dis.rst:1771 +#: ../../library/dis.rst:1763 msgid "" "Now every instruction has an argument, but opcodes ``< HAVE_ARGUMENT`` " "ignore it. Before, only opcodes ``>= HAVE_ARGUMENT`` had an argument." msgstr "" -#: ../../library/dis.rst:1775 +#: ../../library/dis.rst:1767 msgid "" "Pseudo instructions were added to the :mod:`dis` module, and for them it is " "not true that comparison with ``HAVE_ARGUMENT`` indicates whether they use " "their arg." msgstr "" -#: ../../library/dis.rst:1780 +#: ../../library/dis.rst:1772 msgid "Use :data:`hasarg` instead." msgstr "" -#: ../../library/dis.rst:1785 +#: ../../library/dis.rst:1777 msgid "" "Calls an intrinsic function with one argument. Passes ``STACK[-1]`` as the " "argument and sets ``STACK[-1]`` to the result. Used to implement " "functionality that is not performance critical." msgstr "" -#: ../../library/dis.rst:1789 ../../library/dis.rst:1843 +#: ../../library/dis.rst:1781 ../../library/dis.rst:1835 msgid "The operand determines which intrinsic function is called:" msgstr "" -#: ../../library/dis.rst:1792 ../../library/dis.rst:1846 +#: ../../library/dis.rst:1784 ../../library/dis.rst:1838 msgid "Operand" msgstr "" -#: ../../library/dis.rst:1792 ../../library/dis.rst:1846 +#: ../../library/dis.rst:1784 ../../library/dis.rst:1838 msgid "Description" msgstr "" -#: ../../library/dis.rst:1794 +#: ../../library/dis.rst:1786 msgid "``INTRINSIC_1_INVALID``" msgstr "" -#: ../../library/dis.rst:1794 ../../library/dis.rst:1848 +#: ../../library/dis.rst:1786 ../../library/dis.rst:1840 msgid "Not valid" msgstr "" -#: ../../library/dis.rst:1796 +#: ../../library/dis.rst:1788 msgid "``INTRINSIC_PRINT``" msgstr "" -#: ../../library/dis.rst:1796 +#: ../../library/dis.rst:1788 msgid "Prints the argument to standard out. Used in the REPL." msgstr "" -#: ../../library/dis.rst:1799 +#: ../../library/dis.rst:1791 msgid "``INTRINSIC_IMPORT_STAR``" msgstr "" -#: ../../library/dis.rst:1799 +#: ../../library/dis.rst:1791 msgid "Performs ``import *`` for the named module." msgstr "" -#: ../../library/dis.rst:1802 +#: ../../library/dis.rst:1794 msgid "``INTRINSIC_STOPITERATION_ERROR``" msgstr "" -#: ../../library/dis.rst:1802 +#: ../../library/dis.rst:1794 msgid "Extracts the return value from a ``StopIteration`` exception." msgstr "" -#: ../../library/dis.rst:1805 +#: ../../library/dis.rst:1797 msgid "``INTRINSIC_ASYNC_GEN_WRAP``" msgstr "" -#: ../../library/dis.rst:1805 +#: ../../library/dis.rst:1797 msgid "Wraps an async generator value" msgstr "" -#: ../../library/dis.rst:1807 +#: ../../library/dis.rst:1799 msgid "``INTRINSIC_UNARY_POSITIVE``" msgstr "" -#: ../../library/dis.rst:1807 +#: ../../library/dis.rst:1799 msgid "Performs the unary ``+`` operation" msgstr "" -#: ../../library/dis.rst:1810 +#: ../../library/dis.rst:1802 msgid "``INTRINSIC_LIST_TO_TUPLE``" msgstr "" -#: ../../library/dis.rst:1810 +#: ../../library/dis.rst:1802 msgid "Converts a list to a tuple" msgstr "" -#: ../../library/dis.rst:1812 +#: ../../library/dis.rst:1804 msgid "``INTRINSIC_TYPEVAR``" msgstr "" -#: ../../library/dis.rst:1812 +#: ../../library/dis.rst:1804 msgid "Creates a :class:`typing.TypeVar`" msgstr "" -#: ../../library/dis.rst:1814 +#: ../../library/dis.rst:1806 msgid "``INTRINSIC_PARAMSPEC``" msgstr "" -#: ../../library/dis.rst:1814 +#: ../../library/dis.rst:1806 msgid "Creates a :class:`typing.ParamSpec`" msgstr "" -#: ../../library/dis.rst:1817 +#: ../../library/dis.rst:1809 msgid "``INTRINSIC_TYPEVARTUPLE``" msgstr "" -#: ../../library/dis.rst:1817 +#: ../../library/dis.rst:1809 msgid "Creates a :class:`typing.TypeVarTuple`" msgstr "" -#: ../../library/dis.rst:1820 +#: ../../library/dis.rst:1812 msgid "``INTRINSIC_SUBSCRIPT_GENERIC``" msgstr "" -#: ../../library/dis.rst:1820 +#: ../../library/dis.rst:1812 msgid "Returns :class:`typing.Generic` subscripted with the argument" msgstr "" -#: ../../library/dis.rst:1823 +#: ../../library/dis.rst:1815 msgid "``INTRINSIC_TYPEALIAS``" msgstr "" -#: ../../library/dis.rst:1823 +#: ../../library/dis.rst:1815 msgid "" "Creates a :class:`typing.TypeAliasType`; used in the :keyword:`type` " "statement. The argument is a tuple of the type alias's name, type " "parameters, and value." msgstr "" -#: ../../library/dis.rst:1835 +#: ../../library/dis.rst:1827 msgid "" "Calls an intrinsic function with two arguments. Used to implement " "functionality that is not performance critical::" msgstr "" -#: ../../library/dis.rst:1838 +#: ../../library/dis.rst:1830 msgid "" "arg2 = STACK.pop()\n" "arg1 = STACK.pop()\n" @@ -2057,43 +2052,43 @@ msgid "" "STACK.append(result)" msgstr "" -#: ../../library/dis.rst:1848 +#: ../../library/dis.rst:1840 msgid "``INTRINSIC_2_INVALID``" msgstr "" -#: ../../library/dis.rst:1850 +#: ../../library/dis.rst:1842 msgid "``INTRINSIC_PREP_RERAISE_STAR``" msgstr "" -#: ../../library/dis.rst:1850 +#: ../../library/dis.rst:1842 msgid "Calculates the :exc:`ExceptionGroup` to raise from a ``try-except*``." msgstr "" -#: ../../library/dis.rst:1854 +#: ../../library/dis.rst:1846 msgid "``INTRINSIC_TYPEVAR_WITH_BOUND``" msgstr "" -#: ../../library/dis.rst:1854 +#: ../../library/dis.rst:1846 msgid "Creates a :class:`typing.TypeVar` with a bound." msgstr "" -#: ../../library/dis.rst:1857 +#: ../../library/dis.rst:1849 msgid "``INTRINSIC_TYPEVAR_WITH_CONSTRAINTS``" msgstr "" -#: ../../library/dis.rst:1857 +#: ../../library/dis.rst:1849 msgid "Creates a :class:`typing.TypeVar` with constraints." msgstr "" -#: ../../library/dis.rst:1861 +#: ../../library/dis.rst:1853 msgid "``INTRINSIC_SET_FUNCTION_TYPE_PARAMS``" msgstr "" -#: ../../library/dis.rst:1861 +#: ../../library/dis.rst:1853 msgid "Sets the ``__type_params__`` attribute of a function." msgstr "" -#: ../../library/dis.rst:1870 +#: ../../library/dis.rst:1862 msgid "" "Performs special method lookup on ``STACK[-1]``. If ``type(STACK[-1])." "__xxx__`` is a method, leave ``type(STACK[-1]).__xxx__; STACK[-1]`` on the " @@ -2101,25 +2096,25 @@ msgid "" "__xxx__; NULL`` on the stack." msgstr "" -#: ../../library/dis.rst:1879 +#: ../../library/dis.rst:1871 msgid "**Pseudo-instructions**" msgstr "" -#: ../../library/dis.rst:1881 +#: ../../library/dis.rst:1873 msgid "" "These opcodes do not appear in Python bytecode. They are used by the " "compiler but are replaced by real opcodes or removed before bytecode is " "generated." msgstr "" -#: ../../library/dis.rst:1886 +#: ../../library/dis.rst:1878 msgid "" "Set up an exception handler for the following code block. If an exception " "occurs, the value stack level is restored to its current state and control " "is transferred to the exception handler at ``target``." msgstr "" -#: ../../library/dis.rst:1893 +#: ../../library/dis.rst:1885 msgid "" "Like ``SETUP_FINALLY``, but in case of an exception also pushes the last " "instruction (``lasti``) to the stack so that ``RERAISE`` can restore it. If " @@ -2128,97 +2123,97 @@ msgid "" "exception handler at ``target``." msgstr "" -#: ../../library/dis.rst:1902 +#: ../../library/dis.rst:1894 msgid "" "Like ``SETUP_CLEANUP``, but in case of an exception one more item is popped " "from the stack before control is transferred to the exception handler at " "``target``." msgstr "" -#: ../../library/dis.rst:1906 +#: ../../library/dis.rst:1898 msgid "" "This variant is used in :keyword:`with` and :keyword:`async with` " "constructs, which push the return value of the context manager's :meth:" "`~object.__enter__` or :meth:`~object.__aenter__` to the stack." msgstr "" -#: ../../library/dis.rst:1913 +#: ../../library/dis.rst:1905 msgid "" "Marks the end of the code block associated with the last ``SETUP_FINALLY``, " "``SETUP_CLEANUP`` or ``SETUP_WITH``." msgstr "" -#: ../../library/dis.rst:1919 +#: ../../library/dis.rst:1911 msgid "" "Undirected relative jump instructions which are replaced by their directed " "(forward/backward) counterparts by the assembler." msgstr "" -#: ../../library/dis.rst:1925 +#: ../../library/dis.rst:1917 msgid "" "Conditional jumps which do not impact the stack. Replaced by the sequence " "``COPY 1``, ``TO_BOOL``, ``POP_JUMP_IF_TRUE/FALSE``." msgstr "" -#: ../../library/dis.rst:1930 +#: ../../library/dis.rst:1922 msgid "" "Pushes a reference to the cell contained in slot ``i`` of the \"fast " "locals\" storage." msgstr "" -#: ../../library/dis.rst:1933 +#: ../../library/dis.rst:1925 msgid "" "Note that ``LOAD_CLOSURE`` is replaced with ``LOAD_FAST`` in the assembler." msgstr "" -#: ../../library/dis.rst:1935 +#: ../../library/dis.rst:1927 msgid "This opcode is now a pseudo-instruction." msgstr "" -#: ../../library/dis.rst:1941 +#: ../../library/dis.rst:1933 msgid "" "Optimized unbound method lookup. Emitted as a ``LOAD_ATTR`` opcode with a " "flag set in the arg." msgstr "" -#: ../../library/dis.rst:1948 +#: ../../library/dis.rst:1940 msgid "Opcode collections" msgstr "" -#: ../../library/dis.rst:1950 +#: ../../library/dis.rst:1942 msgid "" "These collections are provided for automatic introspection of bytecode " "instructions:" msgstr "" -#: ../../library/dis.rst:1953 +#: ../../library/dis.rst:1945 msgid "" "The collections now contain pseudo instructions and instrumented " "instructions as well. These are opcodes with values ``>= MIN_PSEUDO_OPCODE`` " "and ``>= MIN_INSTRUMENTED_OPCODE``." msgstr "" -#: ../../library/dis.rst:1960 +#: ../../library/dis.rst:1952 msgid "Sequence of operation names, indexable using the bytecode." msgstr "" -#: ../../library/dis.rst:1965 +#: ../../library/dis.rst:1957 msgid "Dictionary mapping operation names to bytecodes." msgstr "" -#: ../../library/dis.rst:1970 +#: ../../library/dis.rst:1962 msgid "Sequence of all compare operation names." msgstr "" -#: ../../library/dis.rst:1975 +#: ../../library/dis.rst:1967 msgid "Sequence of bytecodes that use their argument." msgstr "" -#: ../../library/dis.rst:1982 +#: ../../library/dis.rst:1974 msgid "Sequence of bytecodes that access a constant." msgstr "" -#: ../../library/dis.rst:1987 +#: ../../library/dis.rst:1979 msgid "" "Sequence of bytecodes that access a :term:`free (closure) variable `. 'free' in this context refers to names in the current scope that " @@ -2227,46 +2222,46 @@ msgid "" "scopes." msgstr "" -#: ../../library/dis.rst:1995 +#: ../../library/dis.rst:1987 msgid "Sequence of bytecodes that access an attribute by name." msgstr "" -#: ../../library/dis.rst:2000 +#: ../../library/dis.rst:1992 msgid "Sequence of bytecodes that have a jump target. All jumps are relative." msgstr "" -#: ../../library/dis.rst:2007 +#: ../../library/dis.rst:1999 msgid "Sequence of bytecodes that access a local variable." msgstr "" -#: ../../library/dis.rst:2012 +#: ../../library/dis.rst:2004 msgid "Sequence of bytecodes of Boolean operations." msgstr "" -#: ../../library/dis.rst:2016 +#: ../../library/dis.rst:2008 msgid "Sequence of bytecodes that set an exception handler." msgstr "" -#: ../../library/dis.rst:2023 +#: ../../library/dis.rst:2015 msgid "Sequence of bytecodes that have a relative jump target." msgstr "" -#: ../../library/dis.rst:2025 +#: ../../library/dis.rst:2017 msgid "All jumps are now relative. Use :data:`hasjump`." msgstr "" -#: ../../library/dis.rst:2031 +#: ../../library/dis.rst:2023 msgid "Sequence of bytecodes that have an absolute jump target." msgstr "" -#: ../../library/dis.rst:2033 +#: ../../library/dis.rst:2025 msgid "All jumps are now relative. This list is empty." msgstr "" -#: ../../library/dis.rst:1632 +#: ../../library/dis.rst:1624 msgid "built-in function" msgstr "" -#: ../../library/dis.rst:1632 +#: ../../library/dis.rst:1624 msgid "slice" msgstr "" diff --git a/library/distribution.po b/library/distribution.po index 3e93ed4e9..a95c26674 100644 --- a/library/distribution.po +++ b/library/distribution.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:04+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/distutils.po b/library/distutils.po index b67b23623..ef6858075 100644 --- a/library/distutils.po +++ b/library/distutils.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-11-19 01:02+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/doctest.po b/library/doctest.po index 4ccc3bb1a..67abb75f1 100644 --- a/library/doctest.po +++ b/library/doctest.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:04+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -246,8 +247,8 @@ msgstr "" #: ../../library/doctest.rst:175 msgid "" "You can force verbose mode by passing ``verbose=True`` to :func:`testmod`, " -"or prohibit it by passing ``verbose=False``. In either of those cases, " -"``sys.argv`` is not examined by :func:`testmod` (so passing ``-v`` or not " +"or prohibit it by passing ``verbose=False``. In either of those cases, :" +"data:`sys.argv` is not examined by :func:`testmod` (so passing ``-v`` or not " "has no effect)." msgstr "" @@ -328,7 +329,7 @@ msgid "" "As with :func:`testmod`, :func:`testfile` won't display anything unless an " "example fails. If an example does fail, then the failing example(s) and the " "cause(s) of the failure(s) are printed to stdout, using the same format as :" -"func:`testmod`." +"func:`!testmod`." msgstr "" #: ../../library/doctest.rst:236 @@ -431,7 +432,7 @@ msgid "" "searched. Objects imported into the module are not searched." msgstr "" -#: ../../library/doctest.rst:314 +#: ../../library/doctest.rst:317 msgid "" "In addition, there are cases when you want tests to be part of a module but " "not part of the help text, which requires that the tests not be included in " @@ -444,11 +445,11 @@ msgid "" "__test__.K``." msgstr "" -#: ../../library/doctest.rst:323 +#: ../../library/doctest.rst:326 msgid "For example, place this block of code at the top of :file:`example.py`:" msgstr "" -#: ../../library/doctest.rst:325 +#: ../../library/doctest.rst:328 msgid "" "__test__ = {\n" " 'numbers': \"\"\"\n" @@ -461,7 +462,7 @@ msgid "" "}" msgstr "" -#: ../../library/doctest.rst:337 +#: ../../library/doctest.rst:340 msgid "" "The value of ``example.__test__[\"numbers\"]`` will be treated as a " "docstring and all the tests inside it will be run. It is important to note " @@ -470,24 +471,24 @@ msgid "" "scanned for tests." msgstr "" -#: ../../library/doctest.rst:343 +#: ../../library/doctest.rst:346 msgid "" "Any classes found are recursively searched similarly, to test docstrings in " "their contained methods and nested classes." msgstr "" -#: ../../library/doctest.rst:350 +#: ../../library/doctest.rst:353 msgid "How are Docstring Examples Recognized?" msgstr "" -#: ../../library/doctest.rst:352 +#: ../../library/doctest.rst:355 msgid "" "In most cases a copy-and-paste of an interactive console session works fine, " "but doctest isn't trying to do an exact emulation of any specific Python " "shell." msgstr "" -#: ../../library/doctest.rst:357 +#: ../../library/doctest.rst:360 msgid "" ">>> # comments are ignored\n" ">>> x = 12\n" @@ -506,18 +507,18 @@ msgid "" ">>>" msgstr "" -#: ../../library/doctest.rst:377 +#: ../../library/doctest.rst:380 msgid "" "Any expected output must immediately follow the final ``'>>> '`` or ``'... " "'`` line containing the code, and the expected output (if any) extends to " "the next ``'>>> '`` or all-whitespace line." msgstr "" -#: ../../library/doctest.rst:381 +#: ../../library/doctest.rst:384 msgid "The fine print:" msgstr "" -#: ../../library/doctest.rst:383 +#: ../../library/doctest.rst:386 msgid "" "Expected output cannot contain an all-whitespace line, since such a line is " "taken to signal the end of expected output. If expected output does contain " @@ -525,7 +526,7 @@ msgid "" "line is expected." msgstr "" -#: ../../library/doctest.rst:388 +#: ../../library/doctest.rst:391 msgid "" "All hard tab characters are expanded to spaces, using 8-column tab stops. " "Tabs in output generated by the tested code are not modified. Because any " @@ -540,20 +541,20 @@ msgid "" "`DocTestParser` class." msgstr "" -#: ../../library/doctest.rst:400 +#: ../../library/doctest.rst:403 msgid "" "Output to stdout is captured, but not output to stderr (exception tracebacks " "are captured via a different means)." msgstr "" -#: ../../library/doctest.rst:403 +#: ../../library/doctest.rst:406 msgid "" "If you continue a line via backslashing in an interactive session, or for " "any other reason use a backslash, you should use a raw docstring, which will " "preserve your backslashes exactly as you type them::" msgstr "" -#: ../../library/doctest.rst:407 +#: ../../library/doctest.rst:410 msgid "" ">>> def f(x):\n" "... r'''Backslashes in a raw docstring: m\\n'''\n" @@ -562,7 +563,7 @@ msgid "" "Backslashes in a raw docstring: m\\n" msgstr "" -#: ../../library/doctest.rst:413 +#: ../../library/doctest.rst:416 msgid "" "Otherwise, the backslash will be interpreted as part of the string. For " "example, the ``\\n`` above would be interpreted as a newline character. " @@ -570,7 +571,7 @@ msgid "" "use a raw string)::" msgstr "" -#: ../../library/doctest.rst:417 +#: ../../library/doctest.rst:420 msgid "" ">>> def f(x):\n" "... '''Backslashes in a raw docstring: m\\\\n'''\n" @@ -579,11 +580,11 @@ msgid "" "Backslashes in a raw docstring: m\\n" msgstr "" -#: ../../library/doctest.rst:423 +#: ../../library/doctest.rst:426 msgid "The starting column doesn't matter::" msgstr "" -#: ../../library/doctest.rst:425 +#: ../../library/doctest.rst:428 msgid "" ">>> assert \"Easy!\"\n" " >>> import math\n" @@ -591,17 +592,17 @@ msgid "" " 1" msgstr "" -#: ../../library/doctest.rst:430 +#: ../../library/doctest.rst:433 msgid "" "and as many leading whitespace characters are stripped from the expected " "output as appeared in the initial ``'>>> '`` line that started the example." msgstr "" -#: ../../library/doctest.rst:437 +#: ../../library/doctest.rst:440 msgid "What's the Execution Context?" msgstr "" -#: ../../library/doctest.rst:439 +#: ../../library/doctest.rst:442 msgid "" "By default, each time :mod:`doctest` finds a docstring to test, it uses a " "*shallow copy* of :mod:`!M`'s globals, so that running tests doesn't change " @@ -612,17 +613,17 @@ msgid "" "defined in other docstrings." msgstr "" -#: ../../library/doctest.rst:447 +#: ../../library/doctest.rst:450 msgid "" "You can force use of your own dict as the execution context by passing " "``globs=your_dict`` to :func:`testmod` or :func:`testfile` instead." msgstr "" -#: ../../library/doctest.rst:454 +#: ../../library/doctest.rst:457 msgid "What About Exceptions?" msgstr "" -#: ../../library/doctest.rst:456 +#: ../../library/doctest.rst:459 msgid "" "No problem, provided that the traceback is the only output produced by the " "example: just paste in the traceback. [#]_ Since tracebacks contain details " @@ -631,11 +632,11 @@ msgid "" "it accepts." msgstr "" -#: ../../library/doctest.rst:462 +#: ../../library/doctest.rst:465 msgid "Simple example::" msgstr "" -#: ../../library/doctest.rst:464 +#: ../../library/doctest.rst:467 msgid "" ">>> [1, 2, 3].remove(42)\n" "Traceback (most recent call last):\n" @@ -643,33 +644,33 @@ msgid "" "ValueError: list.remove(x): x not in list" msgstr "" -#: ../../library/doctest.rst:469 +#: ../../library/doctest.rst:472 msgid "" "That doctest succeeds if :exc:`ValueError` is raised, with the ``list." "remove(x): x not in list`` detail as shown." msgstr "" -#: ../../library/doctest.rst:472 +#: ../../library/doctest.rst:475 msgid "" "The expected output for an exception must start with a traceback header, " "which may be either of the following two lines, indented the same as the " "first line of the example::" msgstr "" -#: ../../library/doctest.rst:476 +#: ../../library/doctest.rst:479 msgid "" "Traceback (most recent call last):\n" "Traceback (innermost last):" msgstr "" -#: ../../library/doctest.rst:479 +#: ../../library/doctest.rst:482 msgid "" "The traceback header is followed by an optional traceback stack, whose " "contents are ignored by doctest. The traceback stack is typically omitted, " "or copied verbatim from an interactive session." msgstr "" -#: ../../library/doctest.rst:483 +#: ../../library/doctest.rst:486 msgid "" "The traceback stack is followed by the most interesting part: the line(s) " "containing the exception type and detail. This is usually the last line of " @@ -677,7 +678,7 @@ msgid "" "multi-line detail::" msgstr "" -#: ../../library/doctest.rst:488 +#: ../../library/doctest.rst:491 msgid "" ">>> raise ValueError('multi\\n line\\ndetail')\n" "Traceback (most recent call last):\n" @@ -687,20 +688,20 @@ msgid "" "detail" msgstr "" -#: ../../library/doctest.rst:495 +#: ../../library/doctest.rst:498 msgid "" "The last three lines (starting with :exc:`ValueError`) are compared against " "the exception's type and detail, and the rest are ignored." msgstr "" -#: ../../library/doctest.rst:498 +#: ../../library/doctest.rst:501 msgid "" "Best practice is to omit the traceback stack, unless it adds significant " "documentation value to the example. So the last example is probably better " "as::" msgstr "" -#: ../../library/doctest.rst:501 +#: ../../library/doctest.rst:504 msgid "" ">>> raise ValueError('multi\\n line\\ndetail')\n" "Traceback (most recent call last):\n" @@ -710,7 +711,7 @@ msgid "" "detail" msgstr "" -#: ../../library/doctest.rst:508 +#: ../../library/doctest.rst:511 msgid "" "Note that tracebacks are treated very specially. In particular, in the " "rewritten example, the use of ``...`` is independent of doctest's :const:" @@ -719,11 +720,11 @@ msgid "" "transcript of a Monty Python skit." msgstr "" -#: ../../library/doctest.rst:514 +#: ../../library/doctest.rst:517 msgid "Some details you should read once, but won't need to remember:" msgstr "" -#: ../../library/doctest.rst:516 +#: ../../library/doctest.rst:519 msgid "" "Doctest can't guess whether your expected output came from an exception " "traceback or from ordinary printing. So, e.g., an example that expects " @@ -733,7 +734,7 @@ msgid "" "create real problems." msgstr "" -#: ../../library/doctest.rst:523 +#: ../../library/doctest.rst:526 msgid "" "Each line of the traceback stack (if present) must be indented further than " "the first line of the example, *or* start with a non-alphanumeric character. " @@ -742,29 +743,29 @@ msgid "" "course this does the right thing for genuine tracebacks." msgstr "" -#: ../../library/doctest.rst:529 +#: ../../library/doctest.rst:532 msgid "" "When the :const:`IGNORE_EXCEPTION_DETAIL` doctest option is specified, " "everything following the leftmost colon and any module information in the " "exception name is ignored." msgstr "" -#: ../../library/doctest.rst:533 +#: ../../library/doctest.rst:536 msgid "" "The interactive shell omits the traceback header line for some :exc:" "`SyntaxError`\\ s. But doctest uses the traceback header line to " "distinguish exceptions from non-exceptions. So in the rare case where you " -"need to test a :exc:`SyntaxError` that omits the traceback header, you will " +"need to test a :exc:`!SyntaxError` that omits the traceback header, you will " "need to manually add the traceback header line to your test example." msgstr "" -#: ../../library/doctest.rst:541 +#: ../../library/doctest.rst:544 msgid "" "For some exceptions, Python displays the position of the error using ``^`` " "markers and tildes::" msgstr "" -#: ../../library/doctest.rst:544 +#: ../../library/doctest.rst:547 msgid "" ">>> 1 + None\n" " File \"\", line 1\n" @@ -773,7 +774,7 @@ msgid "" "TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'" msgstr "" -#: ../../library/doctest.rst:550 +#: ../../library/doctest.rst:553 msgid "" "Since the lines showing the position of the error come before the exception " "type and detail, they are not checked by doctest. For example, the " @@ -781,7 +782,7 @@ msgid "" "location::" msgstr "" -#: ../../library/doctest.rst:554 +#: ../../library/doctest.rst:557 msgid "" ">>> 1 + None\n" " File \"\", line 1\n" @@ -790,11 +791,11 @@ msgid "" "TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'" msgstr "" -#: ../../library/doctest.rst:565 +#: ../../library/doctest.rst:568 msgid "Option Flags" msgstr "" -#: ../../library/doctest.rst:567 +#: ../../library/doctest.rst:570 msgid "" "A number of option flags control various aspects of doctest's behavior. " "Symbolic names for the flags are supplied as module constants, which can be :" @@ -804,13 +805,13 @@ msgid "" "option." msgstr "" -#: ../../library/doctest.rst:573 +#: ../../library/doctest.rst:576 msgid "" "The first group of options define test semantics, controlling aspects of how " "doctest decides whether actual output matches an example's expected output:" msgstr "" -#: ../../library/doctest.rst:579 +#: ../../library/doctest.rst:582 msgid "" "By default, if an expected output block contains just ``1``, an actual " "output block containing just ``1`` or just ``True`` is considered to be a " @@ -822,7 +823,7 @@ msgid "" "not for several years." msgstr "" -#: ../../library/doctest.rst:591 +#: ../../library/doctest.rst:594 msgid "" "By default, if an expected output block contains a line containing only the " "string ````, then that line will match a blank line in the actual " @@ -831,7 +832,7 @@ msgid "" "`DONT_ACCEPT_BLANKLINE` is specified, this substitution is not allowed." msgstr "" -#: ../../library/doctest.rst:600 +#: ../../library/doctest.rst:603 msgid "" "When specified, all sequences of whitespace (blanks and newlines) are " "treated as equal. Any sequence of whitespace within the expected output " @@ -841,7 +842,7 @@ msgid "" "across multiple lines in your source." msgstr "" -#: ../../library/doctest.rst:611 +#: ../../library/doctest.rst:614 msgid "" "When specified, an ellipsis marker (``...``) in the expected output can " "match any substring in the actual output. This includes substrings that " @@ -850,14 +851,14 @@ msgid "" "matched too much!\" surprises that ``.*`` is prone to in regular expressions." msgstr "" -#: ../../library/doctest.rst:620 +#: ../../library/doctest.rst:623 msgid "" "When specified, doctests expecting exceptions pass so long as an exception " "of the expected type is raised, even if the details (message and fully " "qualified exception name) don't match." msgstr "" -#: ../../library/doctest.rst:624 +#: ../../library/doctest.rst:627 msgid "" "For example, an example expecting ``ValueError: 42`` will pass if the actual " "exception raised is ``ValueError: 3*14``, but will fail if, say, a :exc:" @@ -867,7 +868,7 @@ msgid "" "these variations will work with the flag specified:" msgstr "" -#: ../../library/doctest.rst:632 +#: ../../library/doctest.rst:635 msgid "" ">>> raise Exception('message')\n" "Traceback (most recent call last):\n" @@ -882,20 +883,20 @@ msgid "" "__main__.Exception: message" msgstr "" -#: ../../library/doctest.rst:646 +#: ../../library/doctest.rst:649 msgid "" "Note that :const:`ELLIPSIS` can also be used to ignore the details of the " "exception message, but such a test may still fail based on whether the " "module name is present or matches exactly." msgstr "" -#: ../../library/doctest.rst:650 +#: ../../library/doctest.rst:653 msgid "" ":const:`IGNORE_EXCEPTION_DETAIL` now also ignores any information relating " "to the module containing the exception under test." msgstr "" -#: ../../library/doctest.rst:657 +#: ../../library/doctest.rst:660 msgid "" "When specified, do not run the example at all. This can be useful in " "contexts where doctest examples serve as both documentation and test cases, " @@ -904,32 +905,32 @@ msgid "" "might depend on resources which would be unavailable to the test driver." msgstr "" -#: ../../library/doctest.rst:663 +#: ../../library/doctest.rst:666 msgid "" "The SKIP flag can also be used for temporarily \"commenting out\" examples." msgstr "" -#: ../../library/doctest.rst:668 +#: ../../library/doctest.rst:671 msgid "A bitmask or'ing together all the comparison flags above." msgstr "" -#: ../../library/doctest.rst:670 +#: ../../library/doctest.rst:673 msgid "The second group of options controls how test failures are reported:" msgstr "" -#: ../../library/doctest.rst:675 +#: ../../library/doctest.rst:678 msgid "" "When specified, failures that involve multi-line expected and actual outputs " "are displayed using a unified diff." msgstr "" -#: ../../library/doctest.rst:681 +#: ../../library/doctest.rst:684 msgid "" "When specified, failures that involve multi-line expected and actual outputs " "will be displayed using a context diff." msgstr "" -#: ../../library/doctest.rst:687 +#: ../../library/doctest.rst:690 msgid "" "When specified, differences are computed by ``difflib.Differ``, using the " "same algorithm as the popular :file:`ndiff.py` utility. This is the only " @@ -939,7 +940,7 @@ msgid "" "mismatching column positions." msgstr "" -#: ../../library/doctest.rst:696 +#: ../../library/doctest.rst:699 msgid "" "When specified, display the first failing example in each doctest, but " "suppress output for all remaining examples. This will prevent doctest from " @@ -950,7 +951,7 @@ msgid "" "of failures reported; only the output is suppressed." msgstr "" -#: ../../library/doctest.rst:707 +#: ../../library/doctest.rst:710 msgid "" "When specified, exit after the first failing example and don't attempt to " "run the remaining examples. Thus, the number of failures reported will be at " @@ -958,17 +959,17 @@ msgid "" "first failure won't even produce debugging output." msgstr "" -#: ../../library/doctest.rst:715 +#: ../../library/doctest.rst:718 msgid "A bitmask or'ing together all the reporting flags above." msgstr "" -#: ../../library/doctest.rst:718 +#: ../../library/doctest.rst:721 msgid "" "There is also a way to register new option flag names, though this isn't " "useful unless you intend to extend :mod:`doctest` internals via subclassing:" msgstr "" -#: ../../library/doctest.rst:724 +#: ../../library/doctest.rst:727 msgid "" "Create a new option flag with a given name, and return the new flag's " "integer value. :func:`register_optionflag` can be used when subclassing :" @@ -977,46 +978,46 @@ msgid "" "be called using the following idiom::" msgstr "" -#: ../../library/doctest.rst:730 +#: ../../library/doctest.rst:733 msgid "MY_FLAG = register_optionflag('MY_FLAG')" msgstr "" -#: ../../library/doctest.rst:740 +#: ../../library/doctest.rst:743 msgid "Directives" msgstr "" -#: ../../library/doctest.rst:742 +#: ../../library/doctest.rst:745 msgid "" "Doctest directives may be used to modify the :ref:`option flags ` for an individual example. Doctest directives are special Python " "comments following an example's source code:" msgstr "" -#: ../../library/doctest.rst:753 +#: ../../library/doctest.rst:756 msgid "" "Whitespace is not allowed between the ``+`` or ``-`` and the directive " "option name. The directive option name can be any of the option flag names " "explained above." msgstr "" -#: ../../library/doctest.rst:757 +#: ../../library/doctest.rst:760 msgid "" "An example's doctest directives modify doctest's behavior for that single " "example. Use ``+`` to enable the named behavior, or ``-`` to disable it." msgstr "" -#: ../../library/doctest.rst:760 +#: ../../library/doctest.rst:763 msgid "For example, this test passes:" msgstr "" -#: ../../library/doctest.rst:762 +#: ../../library/doctest.rst:765 msgid "" ">>> print(list(range(20))) # doctest: +NORMALIZE_WHITESPACE\n" "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9,\n" "10, 11, 12, 13, 14, 15, 16, 17, 18, 19]" msgstr "" -#: ../../library/doctest.rst:769 +#: ../../library/doctest.rst:772 msgid "" "Without the directive it would fail, both because the actual output doesn't " "have two blanks before the single-digit list elements, and because the " @@ -1024,52 +1025,52 @@ msgid "" "a directive to do so:" msgstr "" -#: ../../library/doctest.rst:774 +#: ../../library/doctest.rst:777 msgid "" ">>> print(list(range(20))) # doctest: +ELLIPSIS\n" "[0, 1, ..., 18, 19]" msgstr "" -#: ../../library/doctest.rst:780 +#: ../../library/doctest.rst:783 msgid "" "Multiple directives can be used on a single physical line, separated by " "commas:" msgstr "" -#: ../../library/doctest.rst:783 +#: ../../library/doctest.rst:786 msgid "" ">>> print(list(range(20))) # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE\n" "[0, 1, ..., 18, 19]" msgstr "" -#: ../../library/doctest.rst:789 +#: ../../library/doctest.rst:792 msgid "" "If multiple directive comments are used for a single example, then they are " "combined:" msgstr "" -#: ../../library/doctest.rst:792 +#: ../../library/doctest.rst:795 msgid "" ">>> print(list(range(20))) # doctest: +ELLIPSIS\n" "... # doctest: +NORMALIZE_WHITESPACE\n" "[0, 1, ..., 18, 19]" msgstr "" -#: ../../library/doctest.rst:799 +#: ../../library/doctest.rst:802 msgid "" "As the previous example shows, you can add ``...`` lines to your example " "containing only directives. This can be useful when an example is too long " "for a directive to comfortably fit on the same line:" msgstr "" -#: ../../library/doctest.rst:803 +#: ../../library/doctest.rst:806 msgid "" ">>> print(list(range(5)) + list(range(10, 20)) + list(range(30, 40)))\n" "... # doctest: +ELLIPSIS\n" "[0, ..., 4, 10, ..., 19, 30, ..., 39]" msgstr "" -#: ../../library/doctest.rst:810 +#: ../../library/doctest.rst:813 msgid "" "Note that since all options are disabled by default, and directives apply " "only to the example they appear in, enabling options (via ``+`` in a " @@ -1079,11 +1080,11 @@ msgid "" "be useful." msgstr "" -#: ../../library/doctest.rst:820 +#: ../../library/doctest.rst:823 msgid "Warnings" msgstr "" -#: ../../library/doctest.rst:822 +#: ../../library/doctest.rst:825 msgid "" ":mod:`doctest` is serious about requiring exact matches in expected output. " "If even a single character doesn't match, the test fails. This will " @@ -1093,42 +1094,42 @@ msgid "" "test like ::" msgstr "" -#: ../../library/doctest.rst:828 +#: ../../library/doctest.rst:831 msgid "" ">>> foo()\n" "{\"spam\", \"eggs\"}" msgstr "" -#: ../../library/doctest.rst:831 +#: ../../library/doctest.rst:834 msgid "is vulnerable! One workaround is to do ::" msgstr "" -#: ../../library/doctest.rst:833 +#: ../../library/doctest.rst:836 msgid "" ">>> foo() == {\"spam\", \"eggs\"}\n" "True" msgstr "" -#: ../../library/doctest.rst:836 +#: ../../library/doctest.rst:839 msgid "instead. Another is to do ::" msgstr "" -#: ../../library/doctest.rst:838 +#: ../../library/doctest.rst:841 msgid "" ">>> d = sorted(foo())\n" ">>> d\n" "['eggs', 'spam']" msgstr "" -#: ../../library/doctest.rst:842 +#: ../../library/doctest.rst:845 msgid "There are others, but you get the idea." msgstr "" -#: ../../library/doctest.rst:844 +#: ../../library/doctest.rst:847 msgid "Another bad idea is to print things that embed an object address, like" msgstr "" -#: ../../library/doctest.rst:846 +#: ../../library/doctest.rst:849 msgid "" ">>> id(1.0) # certain to fail some of the time\n" "7948648\n" @@ -1137,57 +1138,57 @@ msgid "" "" msgstr "" -#: ../../library/doctest.rst:854 +#: ../../library/doctest.rst:857 msgid "" "The :const:`ELLIPSIS` directive gives a nice approach for the last example:" msgstr "" -#: ../../library/doctest.rst:856 +#: ../../library/doctest.rst:859 msgid "" ">>> C() # doctest: +ELLIPSIS\n" "" msgstr "" -#: ../../library/doctest.rst:862 +#: ../../library/doctest.rst:865 msgid "" "Floating-point numbers are also subject to small output variations across " -"platforms, because Python defers to the platform C library for float " -"formatting, and C libraries vary widely in quality here. ::" +"platforms, because Python defers to the platform C library for some floating-" +"point calculations, and C libraries vary widely in quality here. ::" msgstr "" -#: ../../library/doctest.rst:866 +#: ../../library/doctest.rst:869 msgid "" -">>> 1./7 # risky\n" -"0.14285714285714285\n" -">>> print(1./7) # safer\n" -"0.142857142857\n" -">>> print(round(1./7, 6)) # much safer\n" -"0.142857" +">>> 1000**0.1 # risky\n" +"1.9952623149688797\n" +">>> round(1000**0.1, 9) # safer\n" +"1.995262315\n" +">>> print(f'{1000**0.1:.4f}') # much safer\n" +"1.9953" msgstr "" -#: ../../library/doctest.rst:873 +#: ../../library/doctest.rst:876 msgid "" "Numbers of the form ``I/2.**J`` are safe across all platforms, and I often " "contrive doctest examples to produce numbers of that form::" msgstr "" -#: ../../library/doctest.rst:876 +#: ../../library/doctest.rst:879 msgid "" ">>> 3./4 # utterly safe\n" "0.75" msgstr "" -#: ../../library/doctest.rst:879 +#: ../../library/doctest.rst:882 msgid "" "Simple fractions are also easier for people to understand, and that makes " "for better documentation." msgstr "" -#: ../../library/doctest.rst:886 +#: ../../library/doctest.rst:889 msgid "Basic API" msgstr "" -#: ../../library/doctest.rst:888 +#: ../../library/doctest.rst:891 msgid "" "The functions :func:`testmod` and :func:`testfile` provide a simple " "interface to doctest that should be sufficient for most basic uses. For a " @@ -1195,25 +1196,25 @@ msgid "" "simple-testmod` and :ref:`doctest-simple-testfile`." msgstr "" -#: ../../library/doctest.rst:896 +#: ../../library/doctest.rst:899 msgid "" "All arguments except *filename* are optional, and should be specified in " "keyword form." msgstr "" -#: ../../library/doctest.rst:899 +#: ../../library/doctest.rst:902 msgid "" "Test examples in the file named *filename*. Return ``(failure_count, " "test_count)``." msgstr "" -#: ../../library/doctest.rst:902 +#: ../../library/doctest.rst:905 msgid "" "Optional argument *module_relative* specifies how the filename should be " "interpreted:" msgstr "" -#: ../../library/doctest.rst:905 +#: ../../library/doctest.rst:908 msgid "" "If *module_relative* is ``True`` (the default), then *filename* specifies an " "OS-independent module-relative path. By default, this path is relative to " @@ -1223,20 +1224,20 @@ msgid "" "absolute path (i.e., it may not begin with ``/``)." msgstr "" -#: ../../library/doctest.rst:912 +#: ../../library/doctest.rst:915 msgid "" "If *module_relative* is ``False``, then *filename* specifies an OS-specific " "path. The path may be absolute or relative; relative paths are resolved " "with respect to the current working directory." msgstr "" -#: ../../library/doctest.rst:916 +#: ../../library/doctest.rst:919 msgid "" "Optional argument *name* gives the name of the test; by default, or if " "``None``, ``os.path.basename(filename)`` is used." msgstr "" -#: ../../library/doctest.rst:919 +#: ../../library/doctest.rst:922 msgid "" "Optional argument *package* is a Python package or the name of a Python " "package whose directory should be used as the base directory for a module-" @@ -1245,7 +1246,7 @@ msgid "" "is an error to specify *package* if *module_relative* is ``False``." msgstr "" -#: ../../library/doctest.rst:925 +#: ../../library/doctest.rst:928 msgid "" "Optional argument *globs* gives a dict to be used as the globals when " "executing examples. A new shallow copy of this dict is created for the " @@ -1253,7 +1254,7 @@ msgid "" "``None``, a new empty dict is used." msgstr "" -#: ../../library/doctest.rst:930 +#: ../../library/doctest.rst:933 msgid "" "Optional argument *extraglobs* gives a dict merged into the globals used to " "execute examples. This works like :meth:`dict.update`: if *globs* and " @@ -1266,27 +1267,27 @@ msgid "" "tested." msgstr "" -#: ../../library/doctest.rst:939 +#: ../../library/doctest.rst:942 msgid "" "Optional argument *verbose* prints lots of stuff if true, and prints only " "failures if false; by default, or if ``None``, it's true if and only if ``'-" -"v'`` is in ``sys.argv``." +"v'`` is in :data:`sys.argv`." msgstr "" -#: ../../library/doctest.rst:943 +#: ../../library/doctest.rst:946 msgid "" "Optional argument *report* prints a summary at the end when true, else " "prints nothing at the end. In verbose mode, the summary is detailed, else " "the summary is very brief (in fact, empty if all tests passed)." msgstr "" -#: ../../library/doctest.rst:947 +#: ../../library/doctest.rst:950 msgid "" -"Optional argument *optionflags* (default value 0) takes the :ref:`bitwise OR " -"` of option flags. See section :ref:`doctest-options`." +"Optional argument *optionflags* (default value ``0``) takes the :ref:" +"`bitwise OR ` of option flags. See section :ref:`doctest-options`." msgstr "" -#: ../../library/doctest.rst:951 +#: ../../library/doctest.rst:954 msgid "" "Optional argument *raise_on_error* defaults to false. If true, an exception " "is raised upon the first failure or unexpected exception in an example. " @@ -1294,33 +1295,33 @@ msgid "" "continue running examples." msgstr "" -#: ../../library/doctest.rst:956 ../../library/doctest.rst:1098 +#: ../../library/doctest.rst:959 ../../library/doctest.rst:1102 msgid "" "Optional argument *parser* specifies a :class:`DocTestParser` (or subclass) " "that should be used to extract tests from the files. It defaults to a " "normal parser (i.e., ``DocTestParser()``)." msgstr "" -#: ../../library/doctest.rst:960 ../../library/doctest.rst:1102 +#: ../../library/doctest.rst:963 ../../library/doctest.rst:1106 msgid "" "Optional argument *encoding* specifies an encoding that should be used to " "convert the file to unicode." msgstr "" -#: ../../library/doctest.rst:966 +#: ../../library/doctest.rst:969 msgid "" "All arguments are optional, and all except for *m* should be specified in " "keyword form." msgstr "" -#: ../../library/doctest.rst:969 +#: ../../library/doctest.rst:972 msgid "" "Test examples in docstrings in functions and classes reachable from module " "*m* (or module :mod:`__main__` if *m* is not supplied or is ``None``), " "starting with ``m.__doc__``." msgstr "" -#: ../../library/doctest.rst:973 +#: ../../library/doctest.rst:976 msgid "" "Also test examples reachable from dict ``m.__test__``, if it exists. ``m." "__test__`` maps names (strings) to functions, classes and strings; function " @@ -1328,22 +1329,22 @@ msgid "" "directly, as if they were docstrings." msgstr "" -#: ../../library/doctest.rst:978 +#: ../../library/doctest.rst:981 msgid "" "Only docstrings attached to objects belonging to module *m* are searched." msgstr "" -#: ../../library/doctest.rst:980 +#: ../../library/doctest.rst:983 msgid "Return ``(failure_count, test_count)``." msgstr "" -#: ../../library/doctest.rst:982 +#: ../../library/doctest.rst:985 msgid "" "Optional argument *name* gives the name of the module; by default, or if " "``None``, ``m.__name__`` is used." msgstr "" -#: ../../library/doctest.rst:985 +#: ../../library/doctest.rst:988 msgid "" "Optional argument *exclude_empty* defaults to false. If true, objects for " "which no doctests are found are excluded from consideration. The default is " @@ -1354,39 +1355,39 @@ msgid "" "defaults to true." msgstr "" -#: ../../library/doctest.rst:993 +#: ../../library/doctest.rst:996 msgid "" "Optional arguments *extraglobs*, *verbose*, *report*, *optionflags*, " "*raise_on_error*, and *globs* are the same as for function :func:`testfile` " "above, except that *globs* defaults to ``m.__dict__``." msgstr "" -#: ../../library/doctest.rst:1000 +#: ../../library/doctest.rst:1003 msgid "" "Test examples associated with object *f*; for example, *f* may be a string, " "a module, a function, or a class object." msgstr "" -#: ../../library/doctest.rst:1003 +#: ../../library/doctest.rst:1006 msgid "" "A shallow copy of dictionary argument *globs* is used for the execution " "context." msgstr "" -#: ../../library/doctest.rst:1005 +#: ../../library/doctest.rst:1008 msgid "" "Optional argument *name* is used in failure messages, and defaults to " "``\"NoName\"``." msgstr "" -#: ../../library/doctest.rst:1008 +#: ../../library/doctest.rst:1011 msgid "" "If optional argument *verbose* is true, output is generated even if there " "are no failures. By default, output is generated only in case of an example " "failure." msgstr "" -#: ../../library/doctest.rst:1011 +#: ../../library/doctest.rst:1014 msgid "" "Optional argument *compileflags* gives the set of flags that should be used " "by the Python compiler when running the examples. By default, or if " @@ -1394,16 +1395,16 @@ msgid "" "found in *globs*." msgstr "" -#: ../../library/doctest.rst:1015 +#: ../../library/doctest.rst:1018 msgid "" "Optional argument *optionflags* works as for function :func:`testfile` above." msgstr "" -#: ../../library/doctest.rst:1021 +#: ../../library/doctest.rst:1024 msgid "Unittest API" msgstr "" -#: ../../library/doctest.rst:1023 +#: ../../library/doctest.rst:1026 msgid "" "As your collection of doctest'ed modules grows, you'll want a way to run all " "their doctests systematically. :mod:`doctest` provides two functions that " @@ -1413,7 +1414,7 @@ msgid "" "your test module::" msgstr "" -#: ../../library/doctest.rst:1029 +#: ../../library/doctest.rst:1032 msgid "" "import unittest\n" "import doctest\n" @@ -1424,44 +1425,44 @@ msgid "" " return tests" msgstr "" -#: ../../library/doctest.rst:1037 +#: ../../library/doctest.rst:1040 msgid "" "There are two main functions for creating :class:`unittest.TestSuite` " "instances from text files and modules with doctests:" msgstr "" -#: ../../library/doctest.rst:1043 +#: ../../library/doctest.rst:1046 msgid "" "Convert doctest tests from one or more text files to a :class:`unittest." "TestSuite`." msgstr "" -#: ../../library/doctest.rst:1046 +#: ../../library/doctest.rst:1049 msgid "" "The returned :class:`unittest.TestSuite` is to be run by the unittest " "framework and runs the interactive examples in each file. If an example in " -"any file fails, then the synthesized unit test fails, and a :exc:" -"`failureException` exception is raised showing the name of the file " +"any file fails, then the synthesized unit test fails, and a :exc:`~unittest." +"TestCase.failureException` exception is raised showing the name of the file " "containing the test and a (sometimes approximate) line number. If all the " "examples in a file are skipped, then the synthesized unit test is also " "marked as skipped." msgstr "" -#: ../../library/doctest.rst:1053 +#: ../../library/doctest.rst:1056 msgid "Pass one or more paths (as strings) to text files to be examined." msgstr "" -#: ../../library/doctest.rst:1055 +#: ../../library/doctest.rst:1058 msgid "Options may be provided as keyword arguments:" msgstr "" -#: ../../library/doctest.rst:1057 +#: ../../library/doctest.rst:1060 msgid "" "Optional argument *module_relative* specifies how the filenames in *paths* " "should be interpreted:" msgstr "" -#: ../../library/doctest.rst:1060 +#: ../../library/doctest.rst:1063 msgid "" "If *module_relative* is ``True`` (the default), then each filename in " "*paths* specifies an OS-independent module-relative path. By default, this " @@ -1472,14 +1473,14 @@ msgid "" "``)." msgstr "" -#: ../../library/doctest.rst:1068 +#: ../../library/doctest.rst:1071 msgid "" "If *module_relative* is ``False``, then each filename in *paths* specifies " "an OS-specific path. The path may be absolute or relative; relative paths " "are resolved with respect to the current working directory." msgstr "" -#: ../../library/doctest.rst:1072 +#: ../../library/doctest.rst:1075 msgid "" "Optional argument *package* is a Python package or the name of a Python " "package whose directory should be used as the base directory for module-" @@ -1489,30 +1490,31 @@ msgid "" "``False``." msgstr "" -#: ../../library/doctest.rst:1079 +#: ../../library/doctest.rst:1082 msgid "" "Optional argument *setUp* specifies a set-up function for the test suite. " "This is called before running the tests in each file. The *setUp* function " -"will be passed a :class:`DocTest` object. The setUp function can access the " -"test globals as the *globs* attribute of the test passed." +"will be passed a :class:`DocTest` object. The *setUp* function can access " +"the test globals as the :attr:`~DocTest.globs` attribute of the test passed." msgstr "" -#: ../../library/doctest.rst:1084 +#: ../../library/doctest.rst:1087 msgid "" "Optional argument *tearDown* specifies a tear-down function for the test " "suite. This is called after running the tests in each file. The *tearDown* " -"function will be passed a :class:`DocTest` object. The setUp function can " -"access the test globals as the *globs* attribute of the test passed." +"function will be passed a :class:`DocTest` object. The *tearDown* function " +"can access the test globals as the :attr:`~DocTest.globs` attribute of the " +"test passed." msgstr "" -#: ../../library/doctest.rst:1089 ../../library/doctest.rst:1124 +#: ../../library/doctest.rst:1093 msgid "" "Optional argument *globs* is a dictionary containing the initial global " "variables for the tests. A new copy of this dictionary is created for each " "test. By default, *globs* is a new empty dictionary." msgstr "" -#: ../../library/doctest.rst:1093 +#: ../../library/doctest.rst:1097 msgid "" "Optional argument *optionflags* specifies the default doctest options for " "the tests, created by or-ing together individual option flags. See section :" @@ -1520,70 +1522,71 @@ msgid "" "for a better way to set reporting options." msgstr "" -#: ../../library/doctest.rst:1105 +#: ../../library/doctest.rst:1109 msgid "" "The global ``__file__`` is added to the globals provided to doctests loaded " "from a text file using :func:`DocFileSuite`." msgstr "" -#: ../../library/doctest.rst:1111 +#: ../../library/doctest.rst:1115 msgid "Convert doctest tests for a module to a :class:`unittest.TestSuite`." msgstr "" -#: ../../library/doctest.rst:1113 +#: ../../library/doctest.rst:1117 msgid "" "The returned :class:`unittest.TestSuite` is to be run by the unittest " -"framework and runs each doctest in the module. If any of the doctests fail, " -"then the synthesized unit test fails, and a :exc:`failureException` " -"exception is raised showing the name of the file containing the test and a " -"(sometimes approximate) line number. If all the examples in a docstring are " -"skipped, then the synthesized unit test is also marked as skipped." +"framework and runs each doctest in the module. Each docstring is run as a " +"separate unit test. If any of the doctests fail, then the synthesized unit " +"test fails, and a :exc:`unittest.TestCase.failureException` exception is " +"raised showing the name of the file containing the test and a (sometimes " +"approximate) line number. If all the examples in a docstring are skipped, " +"then the" msgstr "" -#: ../../library/doctest.rst:1120 +#: ../../library/doctest.rst:1125 msgid "" "Optional argument *module* provides the module to be tested. It can be a " "module object or a (possibly dotted) module name. If not specified, the " "module calling this function is used." msgstr "" -#: ../../library/doctest.rst:1128 +#: ../../library/doctest.rst:1129 +msgid "" +"Optional argument *globs* is a dictionary containing the initial global " +"variables for the tests. A new copy of this dictionary is created for each " +"test. By default, *globs* is the module's :attr:`~module.__dict__`." +msgstr "" + +#: ../../library/doctest.rst:1133 msgid "" "Optional argument *extraglobs* specifies an extra set of global variables, " "which is merged into *globs*. By default, no extra globals are used." msgstr "" -#: ../../library/doctest.rst:1131 +#: ../../library/doctest.rst:1136 msgid "" "Optional argument *test_finder* is the :class:`DocTestFinder` object (or a " "drop-in replacement) that is used to extract doctests from the module." msgstr "" -#: ../../library/doctest.rst:1134 +#: ../../library/doctest.rst:1139 msgid "" "Optional arguments *setUp*, *tearDown*, and *optionflags* are the same as " -"for function :func:`DocFileSuite` above." +"for function :func:`DocFileSuite` above, but they are called for each " +"docstring." msgstr "" -#: ../../library/doctest.rst:1137 +#: ../../library/doctest.rst:1142 msgid "This function uses the same search technique as :func:`testmod`." msgstr "" -#: ../../library/doctest.rst:1139 +#: ../../library/doctest.rst:1144 msgid "" ":func:`DocTestSuite` returns an empty :class:`unittest.TestSuite` if " "*module* contains no docstrings instead of raising :exc:`ValueError`." msgstr "" -#: ../../library/doctest.rst:1145 -msgid "" -"When doctests which have been converted to unit tests by :func:" -"`DocFileSuite` or :func:`DocTestSuite` fail, this exception is raised " -"showing the name of the file containing the test and a (sometimes " -"approximate) line number." -msgstr "" - -#: ../../library/doctest.rst:1149 +#: ../../library/doctest.rst:1148 msgid "" "Under the covers, :func:`DocTestSuite` creates a :class:`unittest.TestSuite` " "out of :class:`!doctest.DocTestCase` instances, and :class:`!DocTestCase` is " @@ -1592,67 +1595,67 @@ msgid "" "questions about the exact details of :mod:`unittest` integration." msgstr "" -#: ../../library/doctest.rst:1155 +#: ../../library/doctest.rst:1154 msgid "" "Similarly, :func:`DocFileSuite` creates a :class:`unittest.TestSuite` out " "of :class:`!doctest.DocFileCase` instances, and :class:`!DocFileCase` is a " "subclass of :class:`!DocTestCase`." msgstr "" -#: ../../library/doctest.rst:1159 +#: ../../library/doctest.rst:1158 msgid "" "So both ways of creating a :class:`unittest.TestSuite` run instances of :" "class:`!DocTestCase`. This is important for a subtle reason: when you run :" -"mod:`doctest` functions yourself, you can control the :mod:`doctest` options " -"in use directly, by passing option flags to :mod:`doctest` functions. " -"However, if you're writing a :mod:`unittest` framework, :mod:`unittest` " -"ultimately controls when and how tests get run. The framework author " -"typically wants to control :mod:`doctest` reporting options (perhaps, e.g., " -"specified by command line options), but there's no way to pass options " -"through :mod:`unittest` to :mod:`doctest` test runners." +"mod:`doctest` functions yourself, you can control the :mod:`!doctest` " +"options in use directly, by passing option flags to :mod:`!doctest` " +"functions. However, if you're writing a :mod:`unittest` framework, :mod:`!" +"unittest` ultimately controls when and how tests get run. The framework " +"author typically wants to control :mod:`!doctest` reporting options " +"(perhaps, e.g., specified by command line options), but there's no way to " +"pass options through :mod:`!unittest` to :mod:`!doctest` test runners." msgstr "" -#: ../../library/doctest.rst:1169 +#: ../../library/doctest.rst:1168 msgid "" -"For this reason, :mod:`doctest` also supports a notion of :mod:`doctest` " +"For this reason, :mod:`doctest` also supports a notion of :mod:`!doctest` " "reporting flags specific to :mod:`unittest` support, via this function:" msgstr "" -#: ../../library/doctest.rst:1175 +#: ../../library/doctest.rst:1174 msgid "Set the :mod:`doctest` reporting flags to use." msgstr "" -#: ../../library/doctest.rst:1177 +#: ../../library/doctest.rst:1176 msgid "" "Argument *flags* takes the :ref:`bitwise OR ` of option flags. See " "section :ref:`doctest-options`. Only \"reporting flags\" can be used." msgstr "" -#: ../../library/doctest.rst:1180 +#: ../../library/doctest.rst:1179 msgid "" "This is a module-global setting, and affects all future doctests run by " "module :mod:`unittest`: the :meth:`!runTest` method of :class:`!" "DocTestCase` looks at the option flags specified for the test case when the :" "class:`!DocTestCase` instance was constructed. If no reporting flags were " -"specified (which is the typical and expected case), :mod:`!doctest`'s :mod:" -"`unittest` reporting flags are :ref:`bitwise ORed ` into the option " +"specified (which is the typical and expected case), :mod:`!doctest`'s :mod:`!" +"unittest` reporting flags are :ref:`bitwise ORed ` into the option " "flags, and the option flags so augmented are passed to the :class:" "`DocTestRunner` instance created to run the doctest. If any reporting flags " "were specified when the :class:`!DocTestCase` instance was constructed, :mod:" -"`!doctest`'s :mod:`unittest` reporting flags are ignored." +"`!doctest`'s :mod:`!unittest` reporting flags are ignored." msgstr "" -#: ../../library/doctest.rst:1191 +#: ../../library/doctest.rst:1190 msgid "" "The value of the :mod:`unittest` reporting flags in effect before the " "function was called is returned by the function." msgstr "" -#: ../../library/doctest.rst:1198 +#: ../../library/doctest.rst:1197 msgid "Advanced API" msgstr "" -#: ../../library/doctest.rst:1200 +#: ../../library/doctest.rst:1199 msgid "" "The basic API is a simple wrapper that's intended to make doctest easy to " "use. It is fairly flexible, and should meet most users' needs; however, if " @@ -1660,62 +1663,62 @@ msgid "" "doctest's capabilities, then you should use the advanced API." msgstr "" -#: ../../library/doctest.rst:1205 +#: ../../library/doctest.rst:1204 msgid "" "The advanced API revolves around two container classes, which are used to " "store the interactive examples extracted from doctest cases:" msgstr "" -#: ../../library/doctest.rst:1208 +#: ../../library/doctest.rst:1207 msgid "" ":class:`Example`: A single Python :term:`statement`, paired with its " "expected output." msgstr "" -#: ../../library/doctest.rst:1211 +#: ../../library/doctest.rst:1210 msgid "" ":class:`DocTest`: A collection of :class:`Example`\\ s, typically extracted " "from a single docstring or text file." msgstr "" -#: ../../library/doctest.rst:1214 +#: ../../library/doctest.rst:1213 msgid "" "Additional processing classes are defined to find, parse, and run, and check " "doctest examples:" msgstr "" -#: ../../library/doctest.rst:1217 +#: ../../library/doctest.rst:1216 msgid "" ":class:`DocTestFinder`: Finds all docstrings in a given module, and uses a :" "class:`DocTestParser` to create a :class:`DocTest` from every docstring that " "contains interactive examples." msgstr "" -#: ../../library/doctest.rst:1221 +#: ../../library/doctest.rst:1220 msgid "" ":class:`DocTestParser`: Creates a :class:`DocTest` object from a string " "(such as an object's docstring)." msgstr "" -#: ../../library/doctest.rst:1224 +#: ../../library/doctest.rst:1223 msgid "" ":class:`DocTestRunner`: Executes the examples in a :class:`DocTest`, and " "uses an :class:`OutputChecker` to verify their output." msgstr "" -#: ../../library/doctest.rst:1227 +#: ../../library/doctest.rst:1226 msgid "" ":class:`OutputChecker`: Compares the actual output from a doctest example " "with the expected output, and decides whether they match." msgstr "" -#: ../../library/doctest.rst:1230 +#: ../../library/doctest.rst:1229 msgid "" "The relationships among these processing classes are summarized in the " "following diagram::" msgstr "" -#: ../../library/doctest.rst:1233 +#: ../../library/doctest.rst:1232 msgid "" " list of:\n" "+------+ +---------+\n" @@ -1727,30 +1730,30 @@ msgid "" " +---------+" msgstr "" -#: ../../library/doctest.rst:1246 +#: ../../library/doctest.rst:1245 msgid "DocTest Objects" msgstr "" -#: ../../library/doctest.rst:1251 +#: ../../library/doctest.rst:1250 msgid "" "A collection of doctest examples that should be run in a single namespace. " "The constructor arguments are used to initialize the attributes of the same " "names." msgstr "" -#: ../../library/doctest.rst:1255 +#: ../../library/doctest.rst:1254 msgid "" ":class:`DocTest` defines the following attributes. They are initialized by " "the constructor, and should not be modified directly." msgstr "" -#: ../../library/doctest.rst:1261 +#: ../../library/doctest.rst:1260 msgid "" "A list of :class:`Example` objects encoding the individual interactive " "Python examples that should be run by this test." msgstr "" -#: ../../library/doctest.rst:1267 +#: ../../library/doctest.rst:1266 msgid "" "The namespace (aka globals) that the examples should be run in. This is a " "dictionary mapping names to values. Any changes to the namespace made by " @@ -1758,57 +1761,57 @@ msgid "" "`globs` after the test is run." msgstr "" -#: ../../library/doctest.rst:1275 +#: ../../library/doctest.rst:1274 msgid "" "A string name identifying the :class:`DocTest`. Typically, this is the name " "of the object or file that the test was extracted from." msgstr "" -#: ../../library/doctest.rst:1281 +#: ../../library/doctest.rst:1280 msgid "" "The name of the file that this :class:`DocTest` was extracted from; or " -"``None`` if the filename is unknown, or if the :class:`DocTest` was not " +"``None`` if the filename is unknown, or if the :class:`!DocTest` was not " "extracted from a file." msgstr "" -#: ../../library/doctest.rst:1288 +#: ../../library/doctest.rst:1287 msgid "" "The line number within :attr:`filename` where this :class:`DocTest` begins, " "or ``None`` if the line number is unavailable. This line number is zero-" "based with respect to the beginning of the file." msgstr "" -#: ../../library/doctest.rst:1295 +#: ../../library/doctest.rst:1294 msgid "" "The string that the test was extracted from, or ``None`` if the string is " "unavailable, or if the test was not extracted from a string." msgstr "" -#: ../../library/doctest.rst:1302 +#: ../../library/doctest.rst:1301 msgid "Example Objects" msgstr "" -#: ../../library/doctest.rst:1307 +#: ../../library/doctest.rst:1306 msgid "" "A single interactive example, consisting of a Python statement and its " "expected output. The constructor arguments are used to initialize the " "attributes of the same names." msgstr "" -#: ../../library/doctest.rst:1312 +#: ../../library/doctest.rst:1311 msgid "" ":class:`Example` defines the following attributes. They are initialized by " "the constructor, and should not be modified directly." msgstr "" -#: ../../library/doctest.rst:1318 +#: ../../library/doctest.rst:1317 msgid "" "A string containing the example's source code. This source code consists of " "a single Python statement, and always ends with a newline; the constructor " "adds a newline when necessary." msgstr "" -#: ../../library/doctest.rst:1325 +#: ../../library/doctest.rst:1324 msgid "" "The expected output from running the example's source code (either from " "stdout, or a traceback in case of exception). :attr:`want` ends with a " @@ -1816,7 +1819,7 @@ msgid "" "The constructor adds a newline when necessary." msgstr "" -#: ../../library/doctest.rst:1333 +#: ../../library/doctest.rst:1332 msgid "" "The exception message generated by the example, if the example is expected " "to generate an exception; or ``None`` if it is not expected to generate an " @@ -1825,20 +1828,20 @@ msgid "" "unless it's ``None``. The constructor adds a newline if needed." msgstr "" -#: ../../library/doctest.rst:1342 +#: ../../library/doctest.rst:1341 msgid "" "The line number within the string containing this example where the example " "begins. This line number is zero-based with respect to the beginning of the " "containing string." msgstr "" -#: ../../library/doctest.rst:1349 +#: ../../library/doctest.rst:1348 msgid "" "The example's indentation in the containing string, i.e., the number of " "space characters that precede the example's first prompt." msgstr "" -#: ../../library/doctest.rst:1355 +#: ../../library/doctest.rst:1354 msgid "" "A dictionary mapping from option flags to ``True`` or ``False``, which is " "used to override default options for this example. Any option flags not " @@ -1847,11 +1850,11 @@ msgid "" "default, no options are set." msgstr "" -#: ../../library/doctest.rst:1365 +#: ../../library/doctest.rst:1364 msgid "DocTestFinder objects" msgstr "" -#: ../../library/doctest.rst:1370 +#: ../../library/doctest.rst:1369 msgid "" "A processing class used to extract the :class:`DocTest`\\ s that are " "relevant to a given object, from its docstring and the docstrings of its " @@ -1859,48 +1862,48 @@ msgid "" "classes, functions, methods, staticmethods, classmethods, and properties." msgstr "" -#: ../../library/doctest.rst:1375 +#: ../../library/doctest.rst:1374 msgid "" "The optional argument *verbose* can be used to display the objects searched " "by the finder. It defaults to ``False`` (no output)." msgstr "" -#: ../../library/doctest.rst:1378 +#: ../../library/doctest.rst:1377 msgid "" "The optional argument *parser* specifies the :class:`DocTestParser` object " "(or a drop-in replacement) that is used to extract doctests from docstrings." msgstr "" -#: ../../library/doctest.rst:1381 +#: ../../library/doctest.rst:1380 msgid "" "If the optional argument *recurse* is false, then :meth:`DocTestFinder.find` " "will only examine the given object, and not any contained objects." msgstr "" -#: ../../library/doctest.rst:1384 +#: ../../library/doctest.rst:1383 msgid "" "If the optional argument *exclude_empty* is false, then :meth:`DocTestFinder." "find` will include tests for objects with empty docstrings." msgstr "" -#: ../../library/doctest.rst:1388 +#: ../../library/doctest.rst:1387 msgid ":class:`DocTestFinder` defines the following method:" msgstr "" -#: ../../library/doctest.rst:1393 +#: ../../library/doctest.rst:1392 msgid "" "Return a list of the :class:`DocTest`\\ s that are defined by *obj*'s " "docstring, or by any of its contained objects' docstrings." msgstr "" -#: ../../library/doctest.rst:1396 +#: ../../library/doctest.rst:1395 msgid "" "The optional argument *name* specifies the object's name; this name will be " "used to construct names for the returned :class:`DocTest`\\ s. If *name* is " "not specified, then ``obj.__name__`` is used." msgstr "" -#: ../../library/doctest.rst:1400 +#: ../../library/doctest.rst:1399 msgid "" "The optional parameter *module* is the module that contains the given " "object. If the module is not specified or is ``None``, then the test finder " @@ -1908,26 +1911,26 @@ msgid "" "module is used:" msgstr "" -#: ../../library/doctest.rst:1404 +#: ../../library/doctest.rst:1403 msgid "As a default namespace, if *globs* is not specified." msgstr "" -#: ../../library/doctest.rst:1406 +#: ../../library/doctest.rst:1405 msgid "" "To prevent the DocTestFinder from extracting DocTests from objects that are " "imported from other modules. (Contained objects with modules other than " "*module* are ignored.)" msgstr "" -#: ../../library/doctest.rst:1410 +#: ../../library/doctest.rst:1409 msgid "To find the name of the file containing the object." msgstr "" -#: ../../library/doctest.rst:1412 +#: ../../library/doctest.rst:1411 msgid "To help find the line number of the object within its file." msgstr "" -#: ../../library/doctest.rst:1414 +#: ../../library/doctest.rst:1413 msgid "" "If *module* is ``False``, no attempt to find the module will be made. This " "is obscure, of use mostly in testing doctest itself: if *module* is " @@ -1936,44 +1939,44 @@ msgid "" "contained objects will (recursively) be searched for doctests." msgstr "" -#: ../../library/doctest.rst:1420 +#: ../../library/doctest.rst:1419 msgid "" "The globals for each :class:`DocTest` is formed by combining *globs* and " "*extraglobs* (bindings in *extraglobs* override bindings in *globs*). A new " -"shallow copy of the globals dictionary is created for each :class:`DocTest`. " -"If *globs* is not specified, then it defaults to the module's *__dict__*, if " -"specified, or ``{}`` otherwise. If *extraglobs* is not specified, then it " -"defaults to ``{}``." +"shallow copy of the globals dictionary is created for each :class:`!" +"DocTest`. If *globs* is not specified, then it defaults to the module's :" +"attr:`~module.__dict__`, if specified, or ``{}`` otherwise. If *extraglobs* " +"is not specified, then it defaults to ``{}``." msgstr "" -#: ../../library/doctest.rst:1431 +#: ../../library/doctest.rst:1430 msgid "DocTestParser objects" msgstr "" -#: ../../library/doctest.rst:1436 +#: ../../library/doctest.rst:1435 msgid "" "A processing class used to extract interactive examples from a string, and " "use them to create a :class:`DocTest` object." msgstr "" -#: ../../library/doctest.rst:1440 +#: ../../library/doctest.rst:1439 msgid ":class:`DocTestParser` defines the following methods:" msgstr "" -#: ../../library/doctest.rst:1445 +#: ../../library/doctest.rst:1444 msgid "" "Extract all doctest examples from the given string, and collect them into a :" "class:`DocTest` object." msgstr "" -#: ../../library/doctest.rst:1448 +#: ../../library/doctest.rst:1447 msgid "" "*globs*, *name*, *filename*, and *lineno* are attributes for the new :class:" -"`DocTest` object. See the documentation for :class:`DocTest` for more " +"`!DocTest` object. See the documentation for :class:`DocTest` for more " "information." msgstr "" -#: ../../library/doctest.rst:1455 +#: ../../library/doctest.rst:1454 msgid "" "Extract all doctest examples from the given string, and return them as a " "list of :class:`Example` objects. Line numbers are 0-based. The optional " @@ -1981,51 +1984,51 @@ msgid "" "error messages." msgstr "" -#: ../../library/doctest.rst:1462 +#: ../../library/doctest.rst:1461 msgid "" "Divide the given string into examples and intervening text, and return them " "as a list of alternating :class:`Example`\\ s and strings. Line numbers for " -"the :class:`Example`\\ s are 0-based. The optional argument *name* is a " +"the :class:`!Example`\\ s are 0-based. The optional argument *name* is a " "name identifying this string, and is only used for error messages." msgstr "" -#: ../../library/doctest.rst:1469 +#: ../../library/doctest.rst:1468 msgid "TestResults objects" msgstr "" -#: ../../library/doctest.rst:1476 +#: ../../library/doctest.rst:1475 msgid "Number of failed tests." msgstr "" -#: ../../library/doctest.rst:1480 +#: ../../library/doctest.rst:1479 msgid "Number of attempted tests." msgstr "" -#: ../../library/doctest.rst:1484 +#: ../../library/doctest.rst:1483 msgid "Number of skipped tests." msgstr "" -#: ../../library/doctest.rst:1492 +#: ../../library/doctest.rst:1491 msgid "DocTestRunner objects" msgstr "" -#: ../../library/doctest.rst:1497 +#: ../../library/doctest.rst:1496 msgid "" "A processing class used to execute and verify the interactive examples in a :" "class:`DocTest`." msgstr "" -#: ../../library/doctest.rst:1500 +#: ../../library/doctest.rst:1499 msgid "" "The comparison between expected outputs and actual outputs is done by an :" "class:`OutputChecker`. This comparison may be customized with a number of " "option flags; see section :ref:`doctest-options` for more information. If " "the option flags are insufficient, then the comparison may also be " -"customized by passing a subclass of :class:`OutputChecker` to the " +"customized by passing a subclass of :class:`!OutputChecker` to the " "constructor." msgstr "" -#: ../../library/doctest.rst:1506 +#: ../../library/doctest.rst:1505 msgid "" "The test runner's display output can be controlled in two ways. First, an " "output function can be passed to :meth:`run`; this function will be called " @@ -2036,14 +2039,14 @@ msgid "" "`report_unexpected_exception`, and :meth:`report_failure`." msgstr "" -#: ../../library/doctest.rst:1514 +#: ../../library/doctest.rst:1513 msgid "" "The optional keyword argument *checker* specifies the :class:`OutputChecker` " "object (or drop-in replacement) that should be used to compare the expected " "outputs to the actual outputs of doctest examples." msgstr "" -#: ../../library/doctest.rst:1518 +#: ../../library/doctest.rst:1517 msgid "" "The optional keyword argument *verbose* controls the :class:" "`DocTestRunner`'s verbosity. If *verbose* is ``True``, then information is " @@ -2052,14 +2055,14 @@ msgid "" "verbose output is used iff the command-line switch ``-v`` is used." msgstr "" -#: ../../library/doctest.rst:1524 +#: ../../library/doctest.rst:1523 msgid "" "The optional keyword argument *optionflags* can be used to control how the " "test runner compares expected output to actual output, and how it displays " "failures. For more information, see section :ref:`doctest-options`." msgstr "" -#: ../../library/doctest.rst:1528 +#: ../../library/doctest.rst:1527 msgid "" "The test runner accumulates statistics. The aggregated number of attempted, " "failed and skipped examples is also available via the :attr:`tries`, :attr:" @@ -2067,53 +2070,53 @@ msgid "" "`summarize` methods return a :class:`TestResults` instance." msgstr "" -#: ../../library/doctest.rst:1533 +#: ../../library/doctest.rst:1532 msgid ":class:`DocTestRunner` defines the following methods:" msgstr "" -#: ../../library/doctest.rst:1538 +#: ../../library/doctest.rst:1537 msgid "" "Report that the test runner is about to process the given example. This " "method is provided to allow subclasses of :class:`DocTestRunner` to " "customize their output; it should not be called directly." msgstr "" -#: ../../library/doctest.rst:1542 +#: ../../library/doctest.rst:1541 msgid "" "*example* is the example about to be processed. *test* is the test " -"*containing example*. *out* is the output function that was passed to :meth:" +"containing *example*. *out* is the output function that was passed to :meth:" "`DocTestRunner.run`." msgstr "" -#: ../../library/doctest.rst:1549 +#: ../../library/doctest.rst:1548 msgid "" "Report that the given example ran successfully. This method is provided to " "allow subclasses of :class:`DocTestRunner` to customize their output; it " "should not be called directly." msgstr "" -#: ../../library/doctest.rst:1553 ../../library/doctest.rst:1564 +#: ../../library/doctest.rst:1552 ../../library/doctest.rst:1563 msgid "" "*example* is the example about to be processed. *got* is the actual output " "from the example. *test* is the test containing *example*. *out* is the " "output function that was passed to :meth:`DocTestRunner.run`." msgstr "" -#: ../../library/doctest.rst:1560 +#: ../../library/doctest.rst:1559 msgid "" "Report that the given example failed. This method is provided to allow " "subclasses of :class:`DocTestRunner` to customize their output; it should " "not be called directly." msgstr "" -#: ../../library/doctest.rst:1571 +#: ../../library/doctest.rst:1570 msgid "" "Report that the given example raised an unexpected exception. This method is " "provided to allow subclasses of :class:`DocTestRunner` to customize their " "output; it should not be called directly." msgstr "" -#: ../../library/doctest.rst:1575 +#: ../../library/doctest.rst:1574 msgid "" "*example* is the example about to be processed. *exc_info* is a tuple " "containing information about the unexpected exception (as returned by :func:" @@ -2121,14 +2124,14 @@ msgid "" "output function that was passed to :meth:`DocTestRunner.run`." msgstr "" -#: ../../library/doctest.rst:1583 +#: ../../library/doctest.rst:1582 msgid "" "Run the examples in *test* (a :class:`DocTest` object), and display the " "results using the writer function *out*. Return a :class:`TestResults` " "instance." msgstr "" -#: ../../library/doctest.rst:1587 +#: ../../library/doctest.rst:1586 msgid "" "The examples are run in the namespace ``test.globs``. If *clear_globs* is " "true (the default), then this namespace will be cleared after the test runs, " @@ -2136,54 +2139,54 @@ msgid "" "after the test completes, then use *clear_globs=False*." msgstr "" -#: ../../library/doctest.rst:1592 +#: ../../library/doctest.rst:1591 msgid "" "*compileflags* gives the set of flags that should be used by the Python " "compiler when running the examples. If not specified, then it will default " "to the set of future-import flags that apply to *globs*." msgstr "" -#: ../../library/doctest.rst:1596 +#: ../../library/doctest.rst:1595 msgid "" "The output of each example is checked using the :class:`DocTestRunner`'s " "output checker, and the results are formatted by the :meth:`!DocTestRunner." "report_\\*` methods." msgstr "" -#: ../../library/doctest.rst:1603 +#: ../../library/doctest.rst:1602 msgid "" "Print a summary of all the test cases that have been run by this " "DocTestRunner, and return a :class:`TestResults` instance." msgstr "" -#: ../../library/doctest.rst:1606 +#: ../../library/doctest.rst:1605 msgid "" "The optional *verbose* argument controls how detailed the summary is. If " "the verbosity is not specified, then the :class:`DocTestRunner`'s verbosity " "is used." msgstr "" -#: ../../library/doctest.rst:1610 +#: ../../library/doctest.rst:1609 msgid ":class:`DocTestParser` has the following attributes:" msgstr "" -#: ../../library/doctest.rst:1614 +#: ../../library/doctest.rst:1613 msgid "Number of attempted examples." msgstr "" -#: ../../library/doctest.rst:1618 +#: ../../library/doctest.rst:1617 msgid "Number of failed examples." msgstr "" -#: ../../library/doctest.rst:1622 +#: ../../library/doctest.rst:1621 msgid "Number of skipped examples." msgstr "" -#: ../../library/doctest.rst:1630 +#: ../../library/doctest.rst:1629 msgid "OutputChecker objects" msgstr "" -#: ../../library/doctest.rst:1635 +#: ../../library/doctest.rst:1634 msgid "" "A class used to check the whether the actual output from a doctest example " "matches the expected output. :class:`OutputChecker` defines two methods: :" @@ -2192,11 +2195,11 @@ msgid "" "string describing the differences between two outputs." msgstr "" -#: ../../library/doctest.rst:1642 +#: ../../library/doctest.rst:1641 msgid ":class:`OutputChecker` defines the following methods:" msgstr "" -#: ../../library/doctest.rst:1646 +#: ../../library/doctest.rst:1645 msgid "" "Return ``True`` iff the actual output from an example (*got*) matches the " "expected output (*want*). These strings are always considered to match if " @@ -2205,28 +2208,28 @@ msgid "" "`doctest-options` for more information about option flags." msgstr "" -#: ../../library/doctest.rst:1655 +#: ../../library/doctest.rst:1654 msgid "" "Return a string describing the differences between the expected output for a " "given example (*example*) and the actual output (*got*). *optionflags* is " "the set of option flags used to compare *want* and *got*." msgstr "" -#: ../../library/doctest.rst:1663 +#: ../../library/doctest.rst:1662 msgid "Debugging" msgstr "" -#: ../../library/doctest.rst:1665 +#: ../../library/doctest.rst:1664 msgid "Doctest provides several mechanisms for debugging doctest examples:" msgstr "" -#: ../../library/doctest.rst:1667 +#: ../../library/doctest.rst:1666 msgid "" "Several functions convert doctests to executable Python programs, which can " "be run under the Python debugger, :mod:`pdb`." msgstr "" -#: ../../library/doctest.rst:1670 +#: ../../library/doctest.rst:1669 msgid "" "The :class:`DebugRunner` class is a subclass of :class:`DocTestRunner` that " "raises an exception for the first failing example, containing information " @@ -2234,13 +2237,13 @@ msgid "" "debugging on the example." msgstr "" -#: ../../library/doctest.rst:1675 +#: ../../library/doctest.rst:1674 msgid "" "The :mod:`unittest` cases generated by :func:`DocTestSuite` support the :" "meth:`debug` method defined by :class:`unittest.TestCase`." msgstr "" -#: ../../library/doctest.rst:1678 +#: ../../library/doctest.rst:1677 msgid "" "You can add a call to :func:`pdb.set_trace` in a doctest example, and you'll " "drop into the Python debugger when that line is executed. Then you can " @@ -2248,7 +2251,7 @@ msgid "" "`a.py` contains just this module docstring::" msgstr "" -#: ../../library/doctest.rst:1683 +#: ../../library/doctest.rst:1682 msgid "" "\"\"\"\n" ">>> def f(x):\n" @@ -2261,11 +2264,11 @@ msgid "" "\"\"\"" msgstr "" -#: ../../library/doctest.rst:1693 +#: ../../library/doctest.rst:1692 msgid "Then an interactive Python session may look like this::" msgstr "" -#: ../../library/doctest.rst:1695 +#: ../../library/doctest.rst:1694 msgid "" ">>> import a, doctest\n" ">>> doctest.testmod(a)\n" @@ -2298,17 +2301,17 @@ msgid "" ">>>" msgstr "" -#: ../../library/doctest.rst:1726 +#: ../../library/doctest.rst:1725 msgid "" "Functions that convert doctests to Python code, and possibly run the " "synthesized code under the debugger:" msgstr "" -#: ../../library/doctest.rst:1732 +#: ../../library/doctest.rst:1731 msgid "Convert text with examples to a script." msgstr "" -#: ../../library/doctest.rst:1734 +#: ../../library/doctest.rst:1733 msgid "" "Argument *s* is a string containing doctest examples. The string is " "converted to a Python script, where doctest examples in *s* are converted to " @@ -2316,7 +2319,7 @@ msgid "" "generated script is returned as a string. For example, ::" msgstr "" -#: ../../library/doctest.rst:1739 +#: ../../library/doctest.rst:1738 msgid "" "import doctest\n" "print(doctest.script_from_examples(r\"\"\"\n" @@ -2329,11 +2332,11 @@ msgid "" "\"\"\"))" msgstr "" -#: ../../library/doctest.rst:1749 +#: ../../library/doctest.rst:1748 msgid "displays::" msgstr "" -#: ../../library/doctest.rst:1751 +#: ../../library/doctest.rst:1750 msgid "" "# Set x and y to 1 and 2.\n" "x, y = 1, 2\n" @@ -2344,18 +2347,18 @@ msgid "" "## 3" msgstr "" -#: ../../library/doctest.rst:1759 +#: ../../library/doctest.rst:1758 msgid "" "This function is used internally by other functions (see below), but can " "also be useful when you want to transform an interactive Python session into " "a Python script." msgstr "" -#: ../../library/doctest.rst:1766 +#: ../../library/doctest.rst:1765 msgid "Convert the doctest for an object to a script." msgstr "" -#: ../../library/doctest.rst:1768 +#: ../../library/doctest.rst:1767 msgid "" "Argument *module* is a module object, or dotted name of a module, containing " "the object whose doctests are of interest. Argument *name* is the name " @@ -2365,23 +2368,23 @@ msgid "" "module :file:`a.py` contains a top-level function :func:`!f`, then ::" msgstr "" -#: ../../library/doctest.rst:1775 +#: ../../library/doctest.rst:1774 msgid "" "import a, doctest\n" "print(doctest.testsource(a, \"a.f\"))" msgstr "" -#: ../../library/doctest.rst:1778 +#: ../../library/doctest.rst:1777 msgid "" "prints a script version of function :func:`!f`'s docstring, with doctests " "converted to code, and the rest placed in comments." msgstr "" -#: ../../library/doctest.rst:1784 +#: ../../library/doctest.rst:1783 msgid "Debug the doctests for an object." msgstr "" -#: ../../library/doctest.rst:1786 +#: ../../library/doctest.rst:1785 msgid "" "The *module* and *name* arguments are the same as for function :func:" "`testsource` above. The synthesized Python script for the named object's " @@ -2389,13 +2392,13 @@ msgid "" "the control of the Python debugger, :mod:`pdb`." msgstr "" -#: ../../library/doctest.rst:1791 +#: ../../library/doctest.rst:1790 msgid "" "A shallow copy of ``module.__dict__`` is used for both local and global " "execution context." msgstr "" -#: ../../library/doctest.rst:1794 +#: ../../library/doctest.rst:1793 msgid "" "Optional argument *pm* controls whether post-mortem debugging is used. If " "*pm* has a true value, the script file is run directly, and the debugger " @@ -2407,30 +2410,30 @@ msgid "" "to :func:`pdb.run`." msgstr "" -#: ../../library/doctest.rst:1805 +#: ../../library/doctest.rst:1804 msgid "Debug the doctests in a string." msgstr "" -#: ../../library/doctest.rst:1807 +#: ../../library/doctest.rst:1806 msgid "" "This is like function :func:`debug` above, except that a string containing " "doctest examples is specified directly, via the *src* argument." msgstr "" -#: ../../library/doctest.rst:1810 +#: ../../library/doctest.rst:1809 msgid "" "Optional argument *pm* has the same meaning as in function :func:`debug` " "above." msgstr "" -#: ../../library/doctest.rst:1812 +#: ../../library/doctest.rst:1811 msgid "" "Optional argument *globs* gives a dictionary to use as both local and global " "execution context. If not specified, or ``None``, an empty dictionary is " "used. If specified, a shallow copy of the dictionary is used." msgstr "" -#: ../../library/doctest.rst:1817 +#: ../../library/doctest.rst:1816 msgid "" "The :class:`DebugRunner` class, and the special exceptions it may raise, are " "of most interest to testing framework authors, and will only be sketched " @@ -2438,7 +2441,7 @@ msgid "" "(which is a doctest!) for more details:" msgstr "" -#: ../../library/doctest.rst:1825 +#: ../../library/doctest.rst:1824 msgid "" "A subclass of :class:`DocTestRunner` that raises an exception as soon as a " "failure is encountered. If an unexpected exception occurs, an :exc:" @@ -2448,89 +2451,89 @@ msgid "" "the actual output." msgstr "" -#: ../../library/doctest.rst:1832 +#: ../../library/doctest.rst:1831 msgid "" "For information about the constructor parameters and methods, see the " "documentation for :class:`DocTestRunner` in section :ref:`doctest-advanced-" "api`." msgstr "" -#: ../../library/doctest.rst:1835 +#: ../../library/doctest.rst:1834 msgid "" "There are two exceptions that may be raised by :class:`DebugRunner` " "instances:" msgstr "" -#: ../../library/doctest.rst:1840 +#: ../../library/doctest.rst:1839 msgid "" "An exception raised by :class:`DocTestRunner` to signal that a doctest " "example's actual output did not match its expected output. The constructor " "arguments are used to initialize the attributes of the same names." msgstr "" -#: ../../library/doctest.rst:1844 +#: ../../library/doctest.rst:1843 msgid ":exc:`DocTestFailure` defines the following attributes:" msgstr "" -#: ../../library/doctest.rst:1849 ../../library/doctest.rst:1873 +#: ../../library/doctest.rst:1848 ../../library/doctest.rst:1872 msgid "The :class:`DocTest` object that was being run when the example failed." msgstr "" -#: ../../library/doctest.rst:1854 ../../library/doctest.rst:1878 +#: ../../library/doctest.rst:1853 ../../library/doctest.rst:1877 msgid "The :class:`Example` that failed." msgstr "" -#: ../../library/doctest.rst:1859 +#: ../../library/doctest.rst:1858 msgid "The example's actual output." msgstr "" -#: ../../library/doctest.rst:1864 +#: ../../library/doctest.rst:1863 msgid "" "An exception raised by :class:`DocTestRunner` to signal that a doctest " "example raised an unexpected exception. The constructor arguments are used " "to initialize the attributes of the same names." msgstr "" -#: ../../library/doctest.rst:1868 +#: ../../library/doctest.rst:1867 msgid ":exc:`UnexpectedException` defines the following attributes:" msgstr "" -#: ../../library/doctest.rst:1883 +#: ../../library/doctest.rst:1882 msgid "" "A tuple containing information about the unexpected exception, as returned " "by :func:`sys.exc_info`." msgstr "" -#: ../../library/doctest.rst:1890 +#: ../../library/doctest.rst:1889 msgid "Soapbox" msgstr "" -#: ../../library/doctest.rst:1892 +#: ../../library/doctest.rst:1891 msgid "" "As mentioned in the introduction, :mod:`doctest` has grown to have three " "primary uses:" msgstr "" -#: ../../library/doctest.rst:1895 +#: ../../library/doctest.rst:1894 msgid "Checking examples in docstrings." msgstr "" -#: ../../library/doctest.rst:1897 +#: ../../library/doctest.rst:1896 msgid "Regression testing." msgstr "" -#: ../../library/doctest.rst:1899 +#: ../../library/doctest.rst:1898 msgid "Executable documentation / literate testing." msgstr "" -#: ../../library/doctest.rst:1901 +#: ../../library/doctest.rst:1900 msgid "" "These uses have different requirements, and it is important to distinguish " "them. In particular, filling your docstrings with obscure test cases makes " "for bad documentation." msgstr "" -#: ../../library/doctest.rst:1905 +#: ../../library/doctest.rst:1904 msgid "" "When writing a docstring, choose docstring examples with care. There's an " "art to this that needs to be learned---it may not be natural at first. " @@ -2542,7 +2545,7 @@ msgid "" "\"harmless\" change." msgstr "" -#: ../../library/doctest.rst:1913 +#: ../../library/doctest.rst:1912 msgid "" "Doctest also makes an excellent tool for regression testing, especially if " "you don't skimp on explanatory text. By interleaving prose and examples, it " @@ -2563,13 +2566,13 @@ msgid "" "different results, blurring the distinction between testing and explaining." msgstr "" -#: ../../library/doctest.rst:1931 +#: ../../library/doctest.rst:1930 msgid "" "Regression testing is best confined to dedicated objects or files. There " "are several options for organizing tests:" msgstr "" -#: ../../library/doctest.rst:1934 +#: ../../library/doctest.rst:1933 msgid "" "Write text files containing test cases as interactive examples, and test the " "files using :func:`testfile` or :func:`DocFileSuite`. This is recommended, " @@ -2577,7 +2580,7 @@ msgid "" "doctest." msgstr "" -#: ../../library/doctest.rst:1939 +#: ../../library/doctest.rst:1938 msgid "" "Define functions named ``_regrtest_topic`` that consist of single " "docstrings, containing test cases for the named topics. These functions can " @@ -2585,13 +2588,13 @@ msgid "" "test file." msgstr "" -#: ../../library/doctest.rst:1943 +#: ../../library/doctest.rst:1942 msgid "" -"Define a ``__test__`` dictionary mapping from regression test topics to " -"docstrings containing test cases." +"Define a :attr:`~module.__test__` dictionary mapping from regression test " +"topics to docstrings containing test cases." msgstr "" -#: ../../library/doctest.rst:1946 +#: ../../library/doctest.rst:1945 msgid "" "When you have placed your tests in a module, the module can itself be the " "test runner. When a test fails, you can arrange for your test runner to re-" @@ -2599,7 +2602,7 @@ msgid "" "example of such a test runner::" msgstr "" -#: ../../library/doctest.rst:1951 +#: ../../library/doctest.rst:1950 msgid "" "if __name__ == '__main__':\n" " import doctest\n" @@ -2617,53 +2620,53 @@ msgid "" " print(f\"{fail} failures out of {total} tests\")" msgstr "" -#: ../../library/doctest.rst:1968 +#: ../../library/doctest.rst:1967 msgid "Footnotes" msgstr "" -#: ../../library/doctest.rst:1969 +#: ../../library/doctest.rst:1968 msgid "" "Examples containing both expected output and an exception are not supported. " "Trying to guess where one ends and the other begins is too error-prone, and " "that also makes for a confusing test." msgstr "" -#: ../../library/doctest.rst:373 +#: ../../library/doctest.rst:376 msgid ">>>" msgstr "" -#: ../../library/doctest.rst:373 +#: ../../library/doctest.rst:376 msgid "interpreter prompt" msgstr "" -#: ../../library/doctest.rst:373 ../../library/doctest.rst:608 +#: ../../library/doctest.rst:376 ../../library/doctest.rst:611 msgid "..." msgstr "" -#: ../../library/doctest.rst:539 +#: ../../library/doctest.rst:542 msgid "^ (caret)" msgstr "" -#: ../../library/doctest.rst:539 +#: ../../library/doctest.rst:542 msgid "marker" msgstr "" -#: ../../library/doctest.rst:588 +#: ../../library/doctest.rst:591 msgid "" msgstr "" -#: ../../library/doctest.rst:608 ../../library/doctest.rst:733 +#: ../../library/doctest.rst:611 ../../library/doctest.rst:736 msgid "in doctests" msgstr "" -#: ../../library/doctest.rst:733 +#: ../../library/doctest.rst:736 msgid "# (hash)" msgstr "" -#: ../../library/doctest.rst:733 +#: ../../library/doctest.rst:736 msgid "+ (plus)" msgstr "" -#: ../../library/doctest.rst:733 +#: ../../library/doctest.rst:736 msgid "- (minus)" msgstr "" diff --git a/library/email.charset.po b/library/email.charset.po index 7add85ac8..9d9379341 100644 --- a/library/email.charset.po +++ b/library/email.charset.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:04+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/email.compat32-message.po b/library/email.compat32-message.po index 549838c4d..914d058b2 100644 --- a/library/email.compat32-message.po +++ b/library/email.compat32-message.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:04+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" @@ -228,8 +228,8 @@ msgstr "" #: ../../library/email.compat32-message.rst:183 msgid "" -"This is a legacy method. On the :class:`~email.emailmessage.EmailMessage` " -"class its functionality is replaced by :meth:`~email.message.EmailMessage." +"This is a legacy method. On the :class:`~email.message.EmailMessage` class " +"its functionality is replaced by :meth:`~email.message.EmailMessage." "set_content` and the related ``make`` and ``add`` methods." msgstr "" @@ -280,8 +280,8 @@ msgstr "" #: ../../library/email.compat32-message.rst:226 msgid "" -"This is a legacy method. On the :class:`~email.emailmessage.EmailMessage` " -"class its functionality is replaced by :meth:`~email.message.EmailMessage." +"This is a legacy method. On the :class:`~email.message.EmailMessage` class " +"its functionality is replaced by :meth:`~email.message.EmailMessage." "get_content` and :meth:`~email.message.EmailMessage.iter_parts`." msgstr "" @@ -294,8 +294,8 @@ msgstr "" #: ../../library/email.compat32-message.rst:238 msgid "" -"This is a legacy method. On the :class:`~email.emailmessage.EmailMessage` " -"class its functionality is replaced by :meth:`~email.message.EmailMessage." +"This is a legacy method. On the :class:`~email.message.EmailMessage` class " +"its functionality is replaced by :meth:`~email.message.EmailMessage." "set_content`." msgstr "" @@ -329,9 +329,9 @@ msgstr "" #: ../../library/email.compat32-message.rst:267 msgid "" -"This is a legacy method. On the :class:`~email.emailmessage.EmailMessage` " -"class its functionality is replaced by the *charset* parameter of the :meth:" -"`email.emailmessage.EmailMessage.set_content` method." +"This is a legacy method. On the :class:`~email.message.EmailMessage` class " +"its functionality is replaced by the *charset* parameter of the :meth:`email." +"message.EmailMessage.set_content` method." msgstr "" #: ../../library/email.compat32-message.rst:275 @@ -342,8 +342,8 @@ msgstr "" #: ../../library/email.compat32-message.rst:278 msgid "" -"This is a legacy method. On the :class:`~email.emailmessage.EmailMessage` " -"class it always returns ``None``." +"This is a legacy method. On the :class:`~email.message.EmailMessage` class " +"it always returns ``None``." msgstr "" #: ../../library/email.compat32-message.rst:283 @@ -602,9 +602,9 @@ msgstr "" #: ../../library/email.compat32-message.rst:488 #: ../../library/email.compat32-message.rst:526 msgid "" -"This is a legacy method. On the :class:`~email.emailmessage.EmailMessage` " -"class its functionality is replaced by the *params* property of the " -"individual header objects returned by the header access methods." +"This is a legacy method. On the :class:`~email.message.EmailMessage` class " +"its functionality is replaced by the *params* property of the individual " +"header objects returned by the header access methods." msgstr "" #: ../../library/email.compat32-message.rst:496 @@ -721,8 +721,8 @@ msgstr "" #: ../../library/email.compat32-message.rst:581 msgid "" -"This is a legacy method. On the :class:`~email.emailmessage.EmailMessage` " -"class its functionality is replaced by the ``make_`` and ``add_`` methods." +"This is a legacy method. On the :class:`~email.message.EmailMessage` class " +"its functionality is replaced by the ``make_`` and ``add_`` methods." msgstr "" #: ../../library/email.compat32-message.rst:588 diff --git a/library/email.contentmanager.po b/library/email.contentmanager.po index 6385deeec..d863f8acb 100644 --- a/library/email.contentmanager.po +++ b/library/email.contentmanager.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:04+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/email.encoders.po b/library/email.encoders.po index 936f0cf4e..4d955d535 100644 --- a/library/email.encoders.po +++ b/library/email.encoders.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:04+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/email.errors.po b/library/email.errors.po index e46ef1110..f30555f89 100644 --- a/library/email.errors.po +++ b/library/email.errors.po @@ -1,14 +1,14 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2025, Python Software Foundation +# 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.13\n" +"Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-02 14:19+0000\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 01:05+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/email.examples.po b/library/email.examples.po index 4b57469e8..024af606c 100644 --- a/library/email.examples.po +++ b/library/email.examples.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:05+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/email.generator.po b/library/email.generator.po index b02a85387..d879b6759 100644 --- a/library/email.generator.po +++ b/library/email.generator.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:05+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/email.header.po b/library/email.header.po index e2f318847..4235aae12 100644 --- a/library/email.header.po +++ b/library/email.header.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:05+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -267,40 +271,68 @@ msgid "" msgstr "" #: ../../library/email.header.rst:181 +msgid "For historical reasons, this function may return either:" +msgstr "" + +#: ../../library/email.header.rst:183 +msgid "" +"A list of pairs containing each of the decoded parts of the header, " +"``(decoded_bytes, charset)``, where *decoded_bytes* is always an instance " +"of :class:`bytes`, and *charset* is either:" +msgstr "" + +#: ../../library/email.header.rst:187 +msgid "A lower case string containing the name of the character set specified." +msgstr "" + +#: ../../library/email.header.rst:189 +msgid "``None`` for non-encoded parts of the header." +msgstr "" + +#: ../../library/email.header.rst:191 +msgid "" +"A list of length 1 containing a pair ``(string, None)``, where *string* is " +"always an instance of :class:`str`." +msgstr "" + +#: ../../library/email.header.rst:194 msgid "" -"This function returns a list of ``(decoded_string, charset)`` pairs " -"containing each of the decoded parts of the header. *charset* is ``None`` " -"for non-encoded parts of the header, otherwise a lower case string " -"containing the name of the character set specified in the encoded string." +"An :exc:`email.errors.HeaderParseError` may be raised when certain decoding " +"errors occur (e.g. a base64 decoding exception)." msgstr "" -#: ../../library/email.header.rst:186 -msgid "Here's an example::" +#: ../../library/email.header.rst:197 +msgid "Here are examples:" msgstr "" -#: ../../library/email.header.rst:188 +#: ../../library/email.header.rst:209 msgid "" -">>> from email.header import decode_header\n" -">>> decode_header('=?iso-8859-1?q?p=F6stal?=')\n" -"[(b'p\\xf6stal', 'iso-8859-1')]" +"This function exists for backwards compatibility only. For new code, we " +"recommend using :class:`email.headerregistry.HeaderRegistry`." msgstr "" -#: ../../library/email.header.rst:195 +#: ../../library/email.header.rst:215 msgid "" "Create a :class:`Header` instance from a sequence of pairs as returned by :" "func:`decode_header`." msgstr "" -#: ../../library/email.header.rst:198 +#: ../../library/email.header.rst:218 msgid "" ":func:`decode_header` takes a header value string and returns a sequence of " "pairs of the format ``(decoded_string, charset)`` where *charset* is the " "name of the character set." msgstr "" -#: ../../library/email.header.rst:202 +#: ../../library/email.header.rst:222 msgid "" "This function takes one of those sequence of pairs and returns a :class:" "`Header` instance. Optional *maxlinelen*, *header_name*, and " "*continuation_ws* are as in the :class:`Header` constructor." msgstr "" + +#: ../../library/email.header.rst:228 +msgid "" +"This function exists for backwards compatibility only, and is not " +"recommended for use in new code." +msgstr "" diff --git a/library/email.headerregistry.po b/library/email.headerregistry.po index 0bc9a823b..c116d9a17 100644 --- a/library/email.headerregistry.po +++ b/library/email.headerregistry.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Parham Forati, 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:05+0000\n" -"Last-Translator: Parham Forati, 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/email.iterators.po b/library/email.iterators.po index 8ff863346..80bab645a 100644 --- a/library/email.iterators.po +++ b/library/email.iterators.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:05+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/email.message.po b/library/email.message.po index cdf1be5c7..1a3c14027 100644 --- a/library/email.message.po +++ b/library/email.message.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:05+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/email.mime.po b/library/email.mime.po index 65fe54a6d..452ddc12b 100644 --- a/library/email.mime.po +++ b/library/email.mime.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:05+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/email.parser.po b/library/email.parser.po index 21cf6cfcc..f450dd40c 100644 --- a/library/email.parser.po +++ b/library/email.parser.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:05+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -81,10 +85,10 @@ msgstr "" #: ../../library/email.parser.rst:51 msgid "" -"The :class:`BytesFeedParser`, imported from the :mod:`email.feedparser` " -"module, provides an API that is conducive to incremental parsing of email " -"messages, such as would be necessary when reading the text of an email " -"message from a source that can block (such as a socket). The :class:" +"The :class:`BytesFeedParser`, imported from the :mod:`email.parser." +"FeedParser` module, provides an API that is conducive to incremental parsing " +"of email messages, such as would be necessary when reading the text of an " +"email message from a source that can block (such as a socket). The :class:" "`BytesFeedParser` can of course be used to parse an email message fully " "contained in a :term:`bytes-like object`, string, or file, but the :class:" "`BytesParser` API may be more convenient for such use cases. The semantics " @@ -163,7 +167,7 @@ msgid "" "Works like :class:`BytesFeedParser` except that the input to the :meth:" "`~BytesFeedParser.feed` method must be a string. This is of limited " "utility, since the only way for such a message to be valid is for it to " -"contain only ASCII text or, if :attr:`~email.policy.Policy.utf8` is " +"contain only ASCII text or, if :attr:`~email.policy.EmailPolicy.utf8` is " "``True``, no binary attachments." msgstr "" @@ -207,17 +211,17 @@ msgstr "" msgid "" "Read all the data from the binary file-like object *fp*, parse the resulting " "bytes, and return the message object. *fp* must support both the :meth:`~io." -"IOBase.readline` and the :meth:`~io.IOBase.read` methods." +"IOBase.readline` and the :meth:`~io.TextIOBase.read` methods." msgstr "" #: ../../library/email.parser.rst:161 msgid "" "The bytes contained in *fp* must be formatted as a block of :rfc:`5322` (or, " -"if :attr:`~email.policy.Policy.utf8` is ``True``, :rfc:`6532`) style headers " -"and header continuation lines, optionally preceded by an envelope header. " -"The header block is terminated either by the end of the data or by a blank " -"line. Following the header block is the body of the message (which may " -"contain MIME-encoded subparts, including subparts with a :mailheader:" +"if :attr:`~email.policy.EmailPolicy.utf8` is ``True``, :rfc:`6532`) style " +"headers and header continuation lines, optionally preceded by an envelope " +"header. The header block is terminated either by the end of the data or by " +"a blank line. Following the header block is the body of the message (which " +"may contain MIME-encoded subparts, including subparts with a :mailheader:" "`Content-Transfer-Encoding` of ``8bit``)." msgstr "" diff --git a/library/email.po b/library/email.po index a3d05f4e6..32c720cc9 100644 --- a/library/email.po +++ b/library/email.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:05+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/email.policy.po b/library/email.policy.po index a9eb02590..24b560c14 100644 --- a/library/email.policy.po +++ b/library/email.policy.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:05+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/email.utils.po b/library/email.utils.po index 89f8f7212..bb5a43c59 100644 --- a/library/email.utils.po +++ b/library/email.utils.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:05+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/ensurepip.po b/library/ensurepip.po index 9ee6ddf25..6136109b7 100644 --- a/library/ensurepip.po +++ b/library/ensurepip.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:05+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/enum.po b/library/enum.po index 2f30f35f4..77a965c5c 100644 --- a/library/enum.po +++ b/library/enum.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:05+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/errno.po b/library/errno.po index a0ca2cdd3..8ef38c92b 100644 --- a/library/errno.po +++ b/library/errno.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 01:05+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/exceptions.po b/library/exceptions.po index 987c946ae..5a0a79dff 100644 --- a/library/exceptions.po +++ b/library/exceptions.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:05+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" @@ -257,28 +257,34 @@ msgstr "" #: ../../library/exceptions.rst:207 msgid "" -"The :attr:`name` and :attr:`obj` attributes can be set using keyword-only " -"arguments to the constructor. When set they represent the name of the " -"attribute that was attempted to be accessed and the object that was accessed " -"for said attribute, respectively." +"The optional *name* and *obj* keyword-only arguments set the corresponding " +"attributes:" msgstr "" #: ../../library/exceptions.rst:212 +msgid "The name of the attribute that was attempted to be accessed." +msgstr "" + +#: ../../library/exceptions.rst:216 +msgid "The object that was accessed for the named attribute." +msgstr "" + +#: ../../library/exceptions.rst:218 msgid "Added the :attr:`name` and :attr:`obj` attributes." msgstr "" -#: ../../library/exceptions.rst:217 +#: ../../library/exceptions.rst:223 msgid "" "Raised when the :func:`input` function hits an end-of-file condition (EOF) " -"without reading any data. (N.B.: the :meth:`io.IOBase.read` and :meth:`io." +"without reading any data. (Note: the :meth:`!io.IOBase.read` and :meth:`io." "IOBase.readline` methods return an empty string when they hit EOF.)" msgstr "" -#: ../../library/exceptions.rst:224 +#: ../../library/exceptions.rst:230 msgid "Not currently used." msgstr "" -#: ../../library/exceptions.rst:229 +#: ../../library/exceptions.rst:235 msgid "" "Raised when a :term:`generator` or :term:`coroutine` is closed; see :meth:" "`generator.close` and :meth:`coroutine.close`. It directly inherits from :" @@ -286,52 +292,52 @@ msgid "" "an error." msgstr "" -#: ../../library/exceptions.rst:237 +#: ../../library/exceptions.rst:243 msgid "" "Raised when the :keyword:`import` statement has troubles trying to load a " "module. Also raised when the \"from list\" in ``from ... import`` has a " "name that cannot be found." msgstr "" -#: ../../library/exceptions.rst:241 +#: ../../library/exceptions.rst:247 msgid "" "The optional *name* and *path* keyword-only arguments set the corresponding " "attributes:" msgstr "" -#: ../../library/exceptions.rst:246 +#: ../../library/exceptions.rst:252 msgid "The name of the module that was attempted to be imported." msgstr "" -#: ../../library/exceptions.rst:250 +#: ../../library/exceptions.rst:256 msgid "The path to any file which triggered the exception." msgstr "" -#: ../../library/exceptions.rst:252 +#: ../../library/exceptions.rst:258 msgid "Added the :attr:`name` and :attr:`path` attributes." msgstr "" -#: ../../library/exceptions.rst:257 +#: ../../library/exceptions.rst:263 msgid "" "A subclass of :exc:`ImportError` which is raised by :keyword:`import` when a " "module could not be located. It is also raised when ``None`` is found in :" "data:`sys.modules`." msgstr "" -#: ../../library/exceptions.rst:266 +#: ../../library/exceptions.rst:272 msgid "" "Raised when a sequence subscript is out of range. (Slice indices are " "silently truncated to fall in the allowed range; if an index is not an " "integer, :exc:`TypeError` is raised.)" msgstr "" -#: ../../library/exceptions.rst:275 +#: ../../library/exceptions.rst:281 msgid "" "Raised when a mapping (dictionary) key is not found in the set of existing " "keys." msgstr "" -#: ../../library/exceptions.rst:282 +#: ../../library/exceptions.rst:288 msgid "" "Raised when the user hits the interrupt key (normally :kbd:`Control-C` or :" "kbd:`Delete`). During execution, a check for interrupts is made regularly. " @@ -340,7 +346,7 @@ msgid "" "the interpreter from exiting." msgstr "" -#: ../../library/exceptions.rst:290 +#: ../../library/exceptions.rst:296 msgid "" "Catching a :exc:`KeyboardInterrupt` requires special consideration. Because " "it can be raised at unpredictable points, it may, in some circumstances, " @@ -349,7 +355,7 @@ msgid "" "avoid raising it entirely. (See :ref:`handlers-and-exceptions`.)" msgstr "" -#: ../../library/exceptions.rst:300 +#: ../../library/exceptions.rst:306 msgid "" "Raised when an operation runs out of memory but the situation may still be " "rescued (by deleting some objects). The associated value is a string " @@ -360,25 +366,26 @@ msgid "" "stack traceback can be printed, in case a run-away program was the cause." msgstr "" -#: ../../library/exceptions.rst:311 +#: ../../library/exceptions.rst:317 msgid "" "Raised when a local or global name is not found. This applies only to " "unqualified names. The associated value is an error message that includes " "the name that could not be found." msgstr "" -#: ../../library/exceptions.rst:315 -msgid "" -"The :attr:`name` attribute can be set using a keyword-only argument to the " -"constructor. When set it represent the name of the variable that was " -"attempted to be accessed." +#: ../../library/exceptions.rst:321 +msgid "The optional *name* keyword-only argument sets the attribute:" msgstr "" -#: ../../library/exceptions.rst:319 +#: ../../library/exceptions.rst:325 +msgid "The name of the variable that was attempted to be accessed." +msgstr "" + +#: ../../library/exceptions.rst:327 msgid "Added the :attr:`name` attribute." msgstr "" -#: ../../library/exceptions.rst:325 +#: ../../library/exceptions.rst:333 msgid "" "This exception is derived from :exc:`RuntimeError`. In user defined base " "classes, abstract methods should raise this exception when they require " @@ -386,28 +393,28 @@ msgid "" "developed to indicate that the real implementation still needs to be added." msgstr "" -#: ../../library/exceptions.rst:332 +#: ../../library/exceptions.rst:340 msgid "" "It should not be used to indicate that an operator or method is not meant to " "be supported at all -- in that case either leave the operator / method " "undefined or, if a subclass, set it to :data:`None`." msgstr "" -#: ../../library/exceptions.rst:338 +#: ../../library/exceptions.rst:346 msgid "" ":exc:`!NotImplementedError` and :data:`!NotImplemented` are not " "interchangeable. This exception should only be used as described above; see :" "data:`NotImplemented` for details on correct usage of the built-in constant." msgstr "" -#: ../../library/exceptions.rst:349 +#: ../../library/exceptions.rst:357 msgid "" "This exception is raised when a system function returns a system-related " "error, including I/O failures such as \"file not found\" or \"disk " "full\" (not for illegal argument types or other incidental errors)." msgstr "" -#: ../../library/exceptions.rst:353 +#: ../../library/exceptions.rst:361 msgid "" "The second form of the constructor sets the corresponding attributes, " "described below. The attributes default to :const:`None` if not specified. " @@ -416,7 +423,7 @@ msgid "" "constructor arguments." msgstr "" -#: ../../library/exceptions.rst:359 +#: ../../library/exceptions.rst:367 msgid "" "The constructor often actually returns a subclass of :exc:`OSError`, as " "described in `OS exceptions`_ below. The particular subclass depends on the " @@ -425,18 +432,18 @@ msgid "" "subclassing." msgstr "" -#: ../../library/exceptions.rst:367 +#: ../../library/exceptions.rst:375 msgid "A numeric error code from the C variable :c:data:`errno`." msgstr "" -#: ../../library/exceptions.rst:371 +#: ../../library/exceptions.rst:379 msgid "" "Under Windows, this gives you the native Windows error code. The :attr:`." "errno` attribute is then an approximate translation, in POSIX terms, of that " "native error code." msgstr "" -#: ../../library/exceptions.rst:375 +#: ../../library/exceptions.rst:383 msgid "" "Under Windows, if the *winerror* constructor argument is an integer, the :" "attr:`.errno` attribute is determined from the Windows error code, and the " @@ -444,14 +451,14 @@ msgid "" "ignored, and the :attr:`winerror` attribute does not exist." msgstr "" -#: ../../library/exceptions.rst:383 +#: ../../library/exceptions.rst:391 msgid "" "The corresponding error message, as provided by the operating system. It is " -"formatted by the C functions :c:func:`perror` under POSIX, and :c:func:" -"`FormatMessage` under Windows." +"formatted by the C functions :c:func:`!perror` under POSIX, and :c:func:`!" +"FormatMessage` under Windows." msgstr "" -#: ../../library/exceptions.rst:391 +#: ../../library/exceptions.rst:399 msgid "" "For exceptions that involve a file system path (such as :func:`open` or :" "func:`os.unlink`), :attr:`filename` is the file name passed to the function. " @@ -460,14 +467,14 @@ msgid "" "the function." msgstr "" -#: ../../library/exceptions.rst:398 +#: ../../library/exceptions.rst:406 msgid "" ":exc:`EnvironmentError`, :exc:`IOError`, :exc:`WindowsError`, :exc:`socket." -"error`, :exc:`select.error` and :exc:`mmap.error` have been merged into :exc:" -"`OSError`, and the constructor may return a subclass." +"error`, :exc:`select.error` and :exc:`!mmap.error` have been merged into :" +"exc:`OSError`, and the constructor may return a subclass." msgstr "" -#: ../../library/exceptions.rst:404 +#: ../../library/exceptions.rst:412 msgid "" "The :attr:`filename` attribute is now the original file name passed to the " "function, instead of the name encoded to or decoded from the :term:" @@ -475,7 +482,7 @@ msgid "" "argument and attribute was added." msgstr "" -#: ../../library/exceptions.rst:413 +#: ../../library/exceptions.rst:421 msgid "" "Raised when the result of an arithmetic operation is too large to be " "represented. This cannot occur for integers (which would rather raise :exc:" @@ -485,51 +492,51 @@ msgid "" "in C, most floating-point operations are not checked." msgstr "" -#: ../../library/exceptions.rst:423 +#: ../../library/exceptions.rst:431 msgid "" "This exception is derived from :exc:`RuntimeError`. It is raised when an " "operation is blocked during interpreter shutdown also known as :term:`Python " "finalization `." msgstr "" -#: ../../library/exceptions.rst:427 +#: ../../library/exceptions.rst:435 msgid "" "Examples of operations which can be blocked with a :exc:" "`PythonFinalizationError` during the Python finalization:" msgstr "" -#: ../../library/exceptions.rst:430 +#: ../../library/exceptions.rst:438 msgid "Creating a new Python thread." msgstr "" -#: ../../library/exceptions.rst:431 +#: ../../library/exceptions.rst:439 msgid ":meth:`Joining ` a running daemon thread." msgstr "" -#: ../../library/exceptions.rst:432 +#: ../../library/exceptions.rst:440 msgid ":func:`os.fork`." msgstr "" -#: ../../library/exceptions.rst:434 +#: ../../library/exceptions.rst:442 msgid "See also the :func:`sys.is_finalizing` function." msgstr "" -#: ../../library/exceptions.rst:436 ../../library/exceptions.rst:449 +#: ../../library/exceptions.rst:444 ../../library/exceptions.rst:457 msgid "Previously, a plain :exc:`RuntimeError` was raised." msgstr "" -#: ../../library/exceptions.rst:441 +#: ../../library/exceptions.rst:449 msgid ":meth:`threading.Thread.join` can now raise this exception." msgstr "" -#: ../../library/exceptions.rst:445 +#: ../../library/exceptions.rst:453 msgid "" "This exception is derived from :exc:`RuntimeError`. It is raised when the " "interpreter detects that the maximum recursion depth (see :func:`sys." "getrecursionlimit`) is exceeded." msgstr "" -#: ../../library/exceptions.rst:455 +#: ../../library/exceptions.rst:463 msgid "" "This exception is raised when a weak reference proxy, created by the :func:" "`weakref.proxy` function, is used to access an attribute of the referent " @@ -537,66 +544,66 @@ msgid "" "references, see the :mod:`weakref` module." msgstr "" -#: ../../library/exceptions.rst:463 +#: ../../library/exceptions.rst:471 msgid "" "Raised when an error is detected that doesn't fall in any of the other " "categories. The associated value is a string indicating what precisely went " "wrong." msgstr "" -#: ../../library/exceptions.rst:470 +#: ../../library/exceptions.rst:478 msgid "" "Raised by built-in function :func:`next` and an :term:`iterator`\\'s :meth:" "`~iterator.__next__` method to signal that there are no further items " "produced by the iterator." msgstr "" -#: ../../library/exceptions.rst:476 +#: ../../library/exceptions.rst:484 msgid "" "The exception object has a single attribute :attr:`!value`, which is given " "as an argument when constructing the exception, and defaults to :const:" "`None`." msgstr "" -#: ../../library/exceptions.rst:480 +#: ../../library/exceptions.rst:488 msgid "" "When a :term:`generator` or :term:`coroutine` function returns, a new :exc:" "`StopIteration` instance is raised, and the value returned by the function " "is used as the :attr:`value` parameter to the constructor of the exception." msgstr "" -#: ../../library/exceptions.rst:485 +#: ../../library/exceptions.rst:493 msgid "" "If a generator code directly or indirectly raises :exc:`StopIteration`, it " "is converted into a :exc:`RuntimeError` (retaining the :exc:`StopIteration` " "as the new exception's cause)." msgstr "" -#: ../../library/exceptions.rst:489 +#: ../../library/exceptions.rst:497 msgid "" "Added ``value`` attribute and the ability for generator functions to use it " "to return a value." msgstr "" -#: ../../library/exceptions.rst:493 +#: ../../library/exceptions.rst:501 msgid "" "Introduced the RuntimeError transformation via ``from __future__ import " "generator_stop``, see :pep:`479`." msgstr "" -#: ../../library/exceptions.rst:497 +#: ../../library/exceptions.rst:505 msgid "" "Enable :pep:`479` for all code by default: a :exc:`StopIteration` error " "raised in a generator is transformed into a :exc:`RuntimeError`." msgstr "" -#: ../../library/exceptions.rst:503 +#: ../../library/exceptions.rst:511 msgid "" "Must be raised by :meth:`~object.__anext__` method of an :term:`asynchronous " "iterator` object to stop the iteration." msgstr "" -#: ../../library/exceptions.rst:510 +#: ../../library/exceptions.rst:518 msgid "" "Raised when the parser encounters a syntax error. This may occur in an :" "keyword:`import` statement, in a call to the built-in functions :func:" @@ -604,45 +611,45 @@ msgid "" "or standard input (also interactively)." msgstr "" -#: ../../library/exceptions.rst:516 +#: ../../library/exceptions.rst:524 msgid "" "The :func:`str` of the exception instance returns only the error message. " "Details is a tuple whose members are also available as separate attributes." msgstr "" -#: ../../library/exceptions.rst:521 +#: ../../library/exceptions.rst:529 msgid "The name of the file the syntax error occurred in." msgstr "" -#: ../../library/exceptions.rst:525 +#: ../../library/exceptions.rst:533 msgid "" "Which line number in the file the error occurred in. This is 1-indexed: the " "first line in the file has a ``lineno`` of 1." msgstr "" -#: ../../library/exceptions.rst:530 +#: ../../library/exceptions.rst:538 msgid "" "The column in the line where the error occurred. This is 1-indexed: the " "first character in the line has an ``offset`` of 1." msgstr "" -#: ../../library/exceptions.rst:535 +#: ../../library/exceptions.rst:543 msgid "The source code text involved in the error." msgstr "" -#: ../../library/exceptions.rst:539 +#: ../../library/exceptions.rst:547 msgid "" "Which line number in the file the error occurred ends in. This is 1-indexed: " "the first line in the file has a ``lineno`` of 1." msgstr "" -#: ../../library/exceptions.rst:544 +#: ../../library/exceptions.rst:552 msgid "" "The column in the end line where the error occurred finishes. This is 1-" "indexed: the first character in the line has an ``offset`` of 1." msgstr "" -#: ../../library/exceptions.rst:547 +#: ../../library/exceptions.rst:555 msgid "" "For errors in f-string fields, the message is prefixed by \"f-string: \" and " "the offsets are offsets in a text constructed from the replacement " @@ -650,23 +657,23 @@ msgid "" "attribute: ('f-string: ...', ('', 1, 2, '(a b)\\n', 1, 5))." msgstr "" -#: ../../library/exceptions.rst:552 +#: ../../library/exceptions.rst:560 msgid "Added the :attr:`end_lineno` and :attr:`end_offset` attributes." msgstr "" -#: ../../library/exceptions.rst:557 +#: ../../library/exceptions.rst:565 msgid "" "Base class for syntax errors related to incorrect indentation. This is a " "subclass of :exc:`SyntaxError`." msgstr "" -#: ../../library/exceptions.rst:563 +#: ../../library/exceptions.rst:571 msgid "" "Raised when indentation contains an inconsistent use of tabs and spaces. " "This is a subclass of :exc:`IndentationError`." msgstr "" -#: ../../library/exceptions.rst:569 +#: ../../library/exceptions.rst:577 msgid "" "Raised when the interpreter finds an internal error, but the situation does " "not look so serious to cause it to abandon all hope. The associated value is " @@ -675,7 +682,7 @@ msgid "" "returning a ``NULL`` value without an exception set." msgstr "" -#: ../../library/exceptions.rst:575 +#: ../../library/exceptions.rst:583 msgid "" "If you're confident that this exception wasn't your fault, or the fault of a " "package you're using, you should report this to the author or maintainer of " @@ -686,7 +693,7 @@ msgid "" "the error." msgstr "" -#: ../../library/exceptions.rst:586 +#: ../../library/exceptions.rst:594 msgid "" "This exception is raised by the :func:`sys.exit` function. It inherits " "from :exc:`BaseException` instead of :exc:`Exception` so that it is not " @@ -695,12 +702,12 @@ msgid "" "it is not handled, the Python interpreter exits; no stack traceback is " "printed. The constructor accepts the same optional argument passed to :func:" "`sys.exit`. If the value is an integer, it specifies the system exit status " -"(passed to C's :c:func:`exit` function); if it is ``None``, the exit status " +"(passed to C's :c:func:`!exit` function); if it is ``None``, the exit status " "is zero; if it has another type (such as a string), the object's value is " "printed and the exit status is one." msgstr "" -#: ../../library/exceptions.rst:597 +#: ../../library/exceptions.rst:605 msgid "" "A call to :func:`sys.exit` is translated into an exception so that clean-up " "handlers (:keyword:`finally` clauses of :keyword:`try` statements) can be " @@ -710,20 +717,20 @@ msgid "" "child process after a call to :func:`os.fork`)." msgstr "" -#: ../../library/exceptions.rst:606 +#: ../../library/exceptions.rst:614 msgid "" "The exit status or error message that is passed to the constructor. " "(Defaults to ``None``.)" msgstr "" -#: ../../library/exceptions.rst:612 +#: ../../library/exceptions.rst:620 msgid "" "Raised when an operation or function is applied to an object of " "inappropriate type. The associated value is a string giving details about " "the type mismatch." msgstr "" -#: ../../library/exceptions.rst:615 +#: ../../library/exceptions.rst:623 msgid "" "This exception may be raised by user code to indicate that an attempted " "operation on an object is not supported, and is not meant to be. If an " @@ -731,7 +738,7 @@ msgid "" "implementation, :exc:`NotImplementedError` is the proper exception to raise." msgstr "" -#: ../../library/exceptions.rst:620 +#: ../../library/exceptions.rst:628 msgid "" "Passing arguments of the wrong type (e.g. passing a :class:`list` when an :" "class:`int` is expected) should result in a :exc:`TypeError`, but passing " @@ -739,105 +746,105 @@ msgid "" "should result in a :exc:`ValueError`." msgstr "" -#: ../../library/exceptions.rst:627 +#: ../../library/exceptions.rst:635 msgid "" "Raised when a reference is made to a local variable in a function or method, " "but no value has been bound to that variable. This is a subclass of :exc:" "`NameError`." msgstr "" -#: ../../library/exceptions.rst:634 +#: ../../library/exceptions.rst:642 msgid "" "Raised when a Unicode-related encoding or decoding error occurs. It is a " "subclass of :exc:`ValueError`." msgstr "" -#: ../../library/exceptions.rst:637 +#: ../../library/exceptions.rst:645 msgid "" ":exc:`UnicodeError` has attributes that describe the encoding or decoding " "error. For example, ``err.object[err.start:err.end]`` gives the particular " "invalid input that the codec failed on." msgstr "" -#: ../../library/exceptions.rst:643 +#: ../../library/exceptions.rst:651 msgid "The name of the encoding that raised the error." msgstr "" -#: ../../library/exceptions.rst:647 +#: ../../library/exceptions.rst:655 msgid "A string describing the specific codec error." msgstr "" -#: ../../library/exceptions.rst:651 +#: ../../library/exceptions.rst:659 msgid "The object the codec was attempting to encode or decode." msgstr "" -#: ../../library/exceptions.rst:655 +#: ../../library/exceptions.rst:663 msgid "The first index of invalid data in :attr:`object`." msgstr "" -#: ../../library/exceptions.rst:657 ../../library/exceptions.rst:664 +#: ../../library/exceptions.rst:665 ../../library/exceptions.rst:672 msgid "" "This value should not be negative as it is interpreted as an absolute offset " "but this constraint is not enforced at runtime." msgstr "" -#: ../../library/exceptions.rst:662 +#: ../../library/exceptions.rst:670 msgid "The index after the last invalid data in :attr:`object`." msgstr "" -#: ../../library/exceptions.rst:670 +#: ../../library/exceptions.rst:678 msgid "" "Raised when a Unicode-related error occurs during encoding. It is a " "subclass of :exc:`UnicodeError`." msgstr "" -#: ../../library/exceptions.rst:676 +#: ../../library/exceptions.rst:684 msgid "" "Raised when a Unicode-related error occurs during decoding. It is a " "subclass of :exc:`UnicodeError`." msgstr "" -#: ../../library/exceptions.rst:682 +#: ../../library/exceptions.rst:690 msgid "" "Raised when a Unicode-related error occurs during translating. It is a " "subclass of :exc:`UnicodeError`." msgstr "" -#: ../../library/exceptions.rst:688 +#: ../../library/exceptions.rst:696 msgid "" "Raised when an operation or function receives an argument that has the right " "type but an inappropriate value, and the situation is not described by a " "more precise exception such as :exc:`IndexError`." msgstr "" -#: ../../library/exceptions.rst:695 +#: ../../library/exceptions.rst:703 msgid "" "Raised when the second argument of a division or modulo operation is zero. " "The associated value is a string indicating the type of the operands and the " "operation." msgstr "" -#: ../../library/exceptions.rst:700 +#: ../../library/exceptions.rst:708 msgid "" "The following exceptions are kept for compatibility with previous versions; " "starting from Python 3.3, they are aliases of :exc:`OSError`." msgstr "" -#: ../../library/exceptions.rst:709 +#: ../../library/exceptions.rst:717 msgid "Only available on Windows." msgstr "" -#: ../../library/exceptions.rst:713 +#: ../../library/exceptions.rst:721 msgid "OS exceptions" msgstr "" -#: ../../library/exceptions.rst:715 +#: ../../library/exceptions.rst:723 msgid "" "The following exceptions are subclasses of :exc:`OSError`, they get raised " "depending on the system error code." msgstr "" -#: ../../library/exceptions.rst:720 +#: ../../library/exceptions.rst:728 msgid "" "Raised when an operation would block on an object (e.g. socket) set for non-" "blocking operation. Corresponds to :c:data:`errno` :py:const:`~errno." @@ -845,36 +852,36 @@ msgid "" "const:`~errno.EINPROGRESS`." msgstr "" -#: ../../library/exceptions.rst:725 +#: ../../library/exceptions.rst:733 msgid "" "In addition to those of :exc:`OSError`, :exc:`BlockingIOError` can have one " "more attribute:" msgstr "" -#: ../../library/exceptions.rst:730 +#: ../../library/exceptions.rst:738 msgid "" "An integer containing the number of characters written to the stream before " "it blocked. This attribute is available when using the buffered I/O classes " "from the :mod:`io` module." msgstr "" -#: ../../library/exceptions.rst:736 +#: ../../library/exceptions.rst:744 msgid "" "Raised when an operation on a child process failed. Corresponds to :c:data:" "`errno` :py:const:`~errno.ECHILD`." msgstr "" -#: ../../library/exceptions.rst:741 +#: ../../library/exceptions.rst:749 msgid "A base class for connection-related issues." msgstr "" -#: ../../library/exceptions.rst:743 +#: ../../library/exceptions.rst:751 msgid "" "Subclasses are :exc:`BrokenPipeError`, :exc:`ConnectionAbortedError`, :exc:" "`ConnectionRefusedError` and :exc:`ConnectionResetError`." msgstr "" -#: ../../library/exceptions.rst:748 +#: ../../library/exceptions.rst:756 msgid "" "A subclass of :exc:`ConnectionError`, raised when trying to write on a pipe " "while the other end has been closed, or trying to write on a socket which " @@ -882,58 +889,58 @@ msgid "" "`~errno.EPIPE` and :py:const:`~errno.ESHUTDOWN`." msgstr "" -#: ../../library/exceptions.rst:755 +#: ../../library/exceptions.rst:763 msgid "" "A subclass of :exc:`ConnectionError`, raised when a connection attempt is " "aborted by the peer. Corresponds to :c:data:`errno` :py:const:`~errno." "ECONNABORTED`." msgstr "" -#: ../../library/exceptions.rst:761 +#: ../../library/exceptions.rst:769 msgid "" "A subclass of :exc:`ConnectionError`, raised when a connection attempt is " "refused by the peer. Corresponds to :c:data:`errno` :py:const:`~errno." "ECONNREFUSED`." msgstr "" -#: ../../library/exceptions.rst:767 +#: ../../library/exceptions.rst:775 msgid "" "A subclass of :exc:`ConnectionError`, raised when a connection is reset by " "the peer. Corresponds to :c:data:`errno` :py:const:`~errno.ECONNRESET`." msgstr "" -#: ../../library/exceptions.rst:773 +#: ../../library/exceptions.rst:781 msgid "" "Raised when trying to create a file or directory which already exists. " "Corresponds to :c:data:`errno` :py:const:`~errno.EEXIST`." msgstr "" -#: ../../library/exceptions.rst:778 +#: ../../library/exceptions.rst:786 msgid "" "Raised when a file or directory is requested but doesn't exist. Corresponds " "to :c:data:`errno` :py:const:`~errno.ENOENT`." msgstr "" -#: ../../library/exceptions.rst:783 +#: ../../library/exceptions.rst:791 msgid "" "Raised when a system call is interrupted by an incoming signal. Corresponds " "to :c:data:`errno` :py:const:`~errno.EINTR`." msgstr "" -#: ../../library/exceptions.rst:786 +#: ../../library/exceptions.rst:794 msgid "" "Python now retries system calls when a syscall is interrupted by a signal, " "except if the signal handler raises an exception (see :pep:`475` for the " "rationale), instead of raising :exc:`InterruptedError`." msgstr "" -#: ../../library/exceptions.rst:793 +#: ../../library/exceptions.rst:801 msgid "" "Raised when a file operation (such as :func:`os.remove`) is requested on a " "directory. Corresponds to :c:data:`errno` :py:const:`~errno.EISDIR`." msgstr "" -#: ../../library/exceptions.rst:799 +#: ../../library/exceptions.rst:807 msgid "" "Raised when a directory operation (such as :func:`os.listdir`) is requested " "on something which is not a directory. On most POSIX platforms, it may also " @@ -942,7 +949,7 @@ msgid "" "ENOTDIR`." msgstr "" -#: ../../library/exceptions.rst:807 +#: ../../library/exceptions.rst:815 msgid "" "Raised when trying to run an operation without the adequate access rights - " "for example filesystem permissions. Corresponds to :c:data:`errno` :py:const:" @@ -950,131 +957,131 @@ msgid "" "ENOTCAPABLE`." msgstr "" -#: ../../library/exceptions.rst:812 +#: ../../library/exceptions.rst:820 msgid "" "WASI's :py:const:`~errno.ENOTCAPABLE` is now mapped to :exc:" "`PermissionError`." msgstr "" -#: ../../library/exceptions.rst:818 +#: ../../library/exceptions.rst:826 msgid "" "Raised when a given process doesn't exist. Corresponds to :c:data:`errno` :" "py:const:`~errno.ESRCH`." msgstr "" -#: ../../library/exceptions.rst:823 +#: ../../library/exceptions.rst:831 msgid "" "Raised when a system function timed out at the system level. Corresponds to :" "c:data:`errno` :py:const:`~errno.ETIMEDOUT`." msgstr "" -#: ../../library/exceptions.rst:826 +#: ../../library/exceptions.rst:834 msgid "All the above :exc:`OSError` subclasses were added." msgstr "" -#: ../../library/exceptions.rst:832 +#: ../../library/exceptions.rst:840 msgid ":pep:`3151` - Reworking the OS and IO exception hierarchy" msgstr "" -#: ../../library/exceptions.rst:838 +#: ../../library/exceptions.rst:846 msgid "Warnings" msgstr "" -#: ../../library/exceptions.rst:840 +#: ../../library/exceptions.rst:848 msgid "" "The following exceptions are used as warning categories; see the :ref:" "`warning-categories` documentation for more details." msgstr "" -#: ../../library/exceptions.rst:845 +#: ../../library/exceptions.rst:853 msgid "Base class for warning categories." msgstr "" -#: ../../library/exceptions.rst:850 +#: ../../library/exceptions.rst:858 msgid "Base class for warnings generated by user code." msgstr "" -#: ../../library/exceptions.rst:855 +#: ../../library/exceptions.rst:863 msgid "" "Base class for warnings about deprecated features when those warnings are " "intended for other Python developers." msgstr "" -#: ../../library/exceptions.rst:858 +#: ../../library/exceptions.rst:866 msgid "" "Ignored by the default warning filters, except in the ``__main__`` module (:" "pep:`565`). Enabling the :ref:`Python Development Mode ` shows this " "warning." msgstr "" -#: ../../library/exceptions.rst:862 ../../library/exceptions.rst:878 +#: ../../library/exceptions.rst:870 ../../library/exceptions.rst:886 msgid "The deprecation policy is described in :pep:`387`." msgstr "" -#: ../../library/exceptions.rst:867 +#: ../../library/exceptions.rst:875 msgid "" "Base class for warnings about features which are obsolete and expected to be " "deprecated in the future, but are not deprecated at the moment." msgstr "" -#: ../../library/exceptions.rst:871 +#: ../../library/exceptions.rst:879 msgid "" "This class is rarely used as emitting a warning about a possible upcoming " "deprecation is unusual, and :exc:`DeprecationWarning` is preferred for " "already active deprecations." msgstr "" -#: ../../library/exceptions.rst:875 ../../library/exceptions.rst:901 -#: ../../library/exceptions.rst:928 +#: ../../library/exceptions.rst:883 ../../library/exceptions.rst:909 +#: ../../library/exceptions.rst:936 msgid "" "Ignored by the default warning filters. Enabling the :ref:`Python " "Development Mode ` shows this warning." msgstr "" -#: ../../library/exceptions.rst:883 +#: ../../library/exceptions.rst:891 msgid "Base class for warnings about dubious syntax." msgstr "" -#: ../../library/exceptions.rst:888 +#: ../../library/exceptions.rst:896 msgid "Base class for warnings about dubious runtime behavior." msgstr "" -#: ../../library/exceptions.rst:893 +#: ../../library/exceptions.rst:901 msgid "" "Base class for warnings about deprecated features when those warnings are " "intended for end users of applications that are written in Python." msgstr "" -#: ../../library/exceptions.rst:899 +#: ../../library/exceptions.rst:907 msgid "Base class for warnings about probable mistakes in module imports." msgstr "" -#: ../../library/exceptions.rst:907 +#: ../../library/exceptions.rst:915 msgid "Base class for warnings related to Unicode." msgstr "" -#: ../../library/exceptions.rst:912 +#: ../../library/exceptions.rst:920 msgid "Base class for warnings related to encodings." msgstr "" -#: ../../library/exceptions.rst:914 +#: ../../library/exceptions.rst:922 msgid "See :ref:`io-encoding-warning` for details." msgstr "" -#: ../../library/exceptions.rst:921 +#: ../../library/exceptions.rst:929 msgid "" "Base class for warnings related to :class:`bytes` and :class:`bytearray`." msgstr "" -#: ../../library/exceptions.rst:926 +#: ../../library/exceptions.rst:934 msgid "Base class for warnings related to resource usage." msgstr "" -#: ../../library/exceptions.rst:937 +#: ../../library/exceptions.rst:945 msgid "Exception groups" msgstr "" -#: ../../library/exceptions.rst:939 +#: ../../library/exceptions.rst:947 msgid "" "The following are used when it is necessary to raise multiple unrelated " "exceptions. They are part of the exception hierarchy so they can be handled " @@ -1083,7 +1090,7 @@ msgid "" "based on the types of the contained exceptions." msgstr "" -#: ../../library/exceptions.rst:948 +#: ../../library/exceptions.rst:956 msgid "" "Both of these exception types wrap the exceptions in the sequence ``excs``. " "The ``msg`` parameter must be a string. The difference between the two " @@ -1094,7 +1101,7 @@ msgid "" "exc:`BaseExceptionGroup`." msgstr "" -#: ../../library/exceptions.rst:956 +#: ../../library/exceptions.rst:964 msgid "" "The :exc:`BaseExceptionGroup` constructor returns an :exc:`ExceptionGroup` " "rather than a :exc:`BaseExceptionGroup` if all contained exceptions are :exc:" @@ -1103,23 +1110,23 @@ msgid "" "`TypeError` if any contained exception is not an :exc:`Exception` subclass." msgstr "" -#: ../../library/exceptions.rst:965 +#: ../../library/exceptions.rst:973 msgid "The ``msg`` argument to the constructor. This is a read-only attribute." msgstr "" -#: ../../library/exceptions.rst:969 +#: ../../library/exceptions.rst:977 msgid "" "A tuple of the exceptions in the ``excs`` sequence given to the constructor. " "This is a read-only attribute." msgstr "" -#: ../../library/exceptions.rst:974 +#: ../../library/exceptions.rst:982 msgid "" "Returns an exception group that contains only the exceptions from the " "current group that match *condition*, or ``None`` if the result is empty." msgstr "" -#: ../../library/exceptions.rst:977 +#: ../../library/exceptions.rst:985 msgid "" "The condition can be an exception type or tuple of exception types, in which " "case each exception is checked for a match using the same check that is used " @@ -1128,7 +1135,7 @@ msgid "" "true for the exceptions that should be in the subgroup." msgstr "" -#: ../../library/exceptions.rst:983 +#: ../../library/exceptions.rst:991 msgid "" "The nesting structure of the current exception is preserved in the result, " "as are the values of its :attr:`message`, :attr:`~BaseException." @@ -1137,31 +1144,31 @@ msgid "" "groups are omitted from the result." msgstr "" -#: ../../library/exceptions.rst:990 +#: ../../library/exceptions.rst:998 msgid "" "The condition is checked for all exceptions in the nested exception group, " "including the top-level and any nested exception groups. If the condition is " "true for such an exception group, it is included in the result in full." msgstr "" -#: ../../library/exceptions.rst:994 +#: ../../library/exceptions.rst:1002 msgid "``condition`` can be any callable which is not a type object." msgstr "" -#: ../../library/exceptions.rst:999 +#: ../../library/exceptions.rst:1007 msgid "" "Like :meth:`subgroup`, but returns the pair ``(match, rest)`` where " "``match`` is ``subgroup(condition)`` and ``rest`` is the remaining non-" "matching part." msgstr "" -#: ../../library/exceptions.rst:1005 +#: ../../library/exceptions.rst:1013 msgid "" "Returns an exception group with the same :attr:`message`, but which wraps " "the exceptions in ``excs``." msgstr "" -#: ../../library/exceptions.rst:1008 +#: ../../library/exceptions.rst:1016 msgid "" "This method is used by :meth:`subgroup` and :meth:`split`, which are used in " "various contexts to break up an exception group. A subclass needs to " @@ -1169,7 +1176,7 @@ msgid "" "instances of the subclass rather than :exc:`ExceptionGroup`." msgstr "" -#: ../../library/exceptions.rst:1014 +#: ../../library/exceptions.rst:1022 msgid "" ":meth:`subgroup` and :meth:`split` copy the :attr:`~BaseException." "__traceback__`, :attr:`~BaseException.__cause__`, :attr:`~BaseException." @@ -1178,7 +1185,7 @@ msgid "" "not need to be updated by :meth:`derive`." msgstr "" -#: ../../library/exceptions.rst:1021 +#: ../../library/exceptions.rst:1029 msgid "" ">>> class MyGroup(ExceptionGroup):\n" "... def derive(self, excs):\n" @@ -1207,16 +1214,16 @@ msgid "" "True" msgstr "" -#: ../../library/exceptions.rst:1047 +#: ../../library/exceptions.rst:1055 msgid "" "Note that :exc:`BaseExceptionGroup` defines :meth:`~object.__new__`, so " "subclasses that need a different constructor signature need to override that " "rather than :meth:`~object.__init__`. For example, the following defines an " -"exception group subclass which accepts an exit_code and and constructs the " +"exception group subclass which accepts an exit_code and constructs the " "group's message from it. ::" msgstr "" -#: ../../library/exceptions.rst:1053 +#: ../../library/exceptions.rst:1061 msgid "" "class Errors(ExceptionGroup):\n" " def __new__(cls, errors, exit_code):\n" @@ -1228,22 +1235,22 @@ msgid "" " return Errors(excs, self.exit_code)" msgstr "" -#: ../../library/exceptions.rst:1062 +#: ../../library/exceptions.rst:1070 msgid "" "Like :exc:`ExceptionGroup`, any subclass of :exc:`BaseExceptionGroup` which " "is also a subclass of :exc:`Exception` can only wrap instances of :exc:" "`Exception`." msgstr "" -#: ../../library/exceptions.rst:1070 +#: ../../library/exceptions.rst:1078 msgid "Exception hierarchy" msgstr "" -#: ../../library/exceptions.rst:1072 +#: ../../library/exceptions.rst:1080 msgid "The class hierarchy for built-in exceptions is:" msgstr "" -#: ../../library/exceptions.rst:1074 +#: ../../library/exceptions.rst:1082 msgid "" "BaseException\n" " ├── BaseExceptionGroup\n" @@ -1356,10 +1363,10 @@ msgstr "" msgid "assert" msgstr "" -#: ../../library/exceptions.rst:347 +#: ../../library/exceptions.rst:355 msgid "module" msgstr "" -#: ../../library/exceptions.rst:347 +#: ../../library/exceptions.rst:355 msgid "errno" msgstr "" diff --git a/library/faulthandler.po b/library/faulthandler.po index b42b38bee..dde70e6ec 100644 --- a/library/faulthandler.po +++ b/library/faulthandler.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:05+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -164,8 +165,8 @@ msgstr "" msgid "" "Additionally, some compilers do not support :term:`CPython's ` " "implementation of C stack dumps. As a result, a different error may be " -"printed instead of the stack, even if the the operating system supports " -"dumping stacks." +"printed instead of the stack, even if the operating system supports dumping " +"stacks." msgstr "" #: ../../library/faulthandler.rst:97 @@ -326,8 +327,53 @@ msgid "" "Fatal Python error: Segmentation fault\n" "\n" "Current thread 0x00007fb899f39700 (most recent call first):\n" -" File \"/home/python/cpython/Lib/ctypes/__init__.py\", line 486 in " -"string_at\n" +" File \"/opt/python/Lib/ctypes/__init__.py\", line 486 in string_at\n" " File \"\", line 1 in \n" +"\n" +"Current thread's C stack trace (most recent call first):\n" +" Binary file \"/opt/python/python\", at _Py_DumpStack+0x42 " +"[0x5b27f7d7147e]\n" +" Binary file \"/opt/python/python\", at +0x32dcbd [0x5b27f7d85cbd]\n" +" Binary file \"/opt/python/python\", at +0x32df8a [0x5b27f7d85f8a]\n" +" Binary file \"/usr/lib/libc.so.6\", at +0x3def0 [0x77b73226bef0]\n" +" Binary file \"/usr/lib/libc.so.6\", at +0x17ef9c [0x77b7323acf9c]\n" +" Binary file \"/opt/python/build/lib.linux-x86_64-3.14/_ctypes.cpython-314d-" +"x86_64-linux-gnu.so\", at +0xcdf6 [0x77b7315dddf6]\n" +" Binary file \"/usr/lib/libffi.so.8\", at +0x7976 [0x77b73158f976]\n" +" Binary file \"/usr/lib/libffi.so.8\", at +0x413c [0x77b73158c13c]\n" +" Binary file \"/usr/lib/libffi.so.8\", at ffi_call+0x12e [0x77b73158ef0e]\n" +" Binary file \"/opt/python/build/lib.linux-x86_64-3.14/_ctypes.cpython-314d-" +"x86_64-linux-gnu.so\", at +0x15a33 [0x77b7315e6a33]\n" +" Binary file \"/opt/python/build/lib.linux-x86_64-3.14/_ctypes.cpython-314d-" +"x86_64-linux-gnu.so\", at +0x164fa [0x77b7315e74fa]\n" +" Binary file \"/opt/python/build/lib.linux-x86_64-3.14/_ctypes.cpython-314d-" +"x86_64-linux-gnu.so\", at +0xc624 [0x77b7315dd624]\n" +" Binary file \"/opt/python/python\", at _PyObject_MakeTpCall+0xce " +"[0x5b27f7b73883]\n" +" Binary file \"/opt/python/python\", at +0x11bab6 [0x5b27f7b73ab6]\n" +" Binary file \"/opt/python/python\", at PyObject_Vectorcall+0x23 " +"[0x5b27f7b73b04]\n" +" Binary file \"/opt/python/python\", at _PyEval_EvalFrameDefault+0x490c " +"[0x5b27f7cbb302]\n" +" Binary file \"/opt/python/python\", at +0x2818e6 [0x5b27f7cd98e6]\n" +" Binary file \"/opt/python/python\", at +0x281aab [0x5b27f7cd9aab]\n" +" Binary file \"/opt/python/python\", at PyEval_EvalCode+0xc5 " +"[0x5b27f7cd9ba3]\n" +" Binary file \"/opt/python/python\", at +0x255957 [0x5b27f7cad957]\n" +" Binary file \"/opt/python/python\", at +0x255ab4 [0x5b27f7cadab4]\n" +" Binary file \"/opt/python/python\", at _PyEval_EvalFrameDefault+0x6c3e " +"[0x5b27f7cbd634]\n" +" Binary file \"/opt/python/python\", at +0x2818e6 [0x5b27f7cd98e6]\n" +" Binary file \"/opt/python/python\", at +0x281aab [0x5b27f7cd9aab]\n" +" Binary file \"/opt/python/python\", at +0x11b6e1 [0x5b27f7b736e1]\n" +" Binary file \"/opt/python/python\", at +0x11d348 [0x5b27f7b75348]\n" +" Binary file \"/opt/python/python\", at +0x11d626 [0x5b27f7b75626]\n" +" Binary file \"/opt/python/python\", at PyObject_Call+0x20 " +"[0x5b27f7b7565e]\n" +" Binary file \"/opt/python/python\", at +0x32a67a [0x5b27f7d8267a]\n" +" Binary file \"/opt/python/python\", at +0x32a7f8 [0x5b27f7d827f8]\n" +" Binary file \"/opt/python/python\", at +0x32ac1b [0x5b27f7d82c1b]\n" +" Binary file \"/opt/python/python\", at Py_RunMain+0x31 [0x5b27f7d82ebe]\n" +" \n" "Segmentation fault" msgstr "" diff --git a/library/fcntl.po b/library/fcntl.po index 2406f68d4..c3f807020 100644 --- a/library/fcntl.po +++ b/library/fcntl.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:06+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/filecmp.po b/library/filecmp.po index 253b35653..6b34cc6c6 100644 --- a/library/filecmp.po +++ b/library/filecmp.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:06+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/fileformats.po b/library/fileformats.po index a3a80faf2..e162cf233 100644 --- a/library/fileformats.po +++ b/library/fileformats.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:06+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/fileinput.po b/library/fileinput.po index e3e69d88a..8627e694e 100644 --- a/library/fileinput.po +++ b/library/fileinput.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:06+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/filesys.po b/library/filesys.po index 1ebc9341b..c648d89fa 100644 --- a/library/filesys.po +++ b/library/filesys.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:06+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/fnmatch.po b/library/fnmatch.po index 505760e2a..32d087a81 100644 --- a/library/fnmatch.po +++ b/library/fnmatch.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:06+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/fractions.po b/library/fractions.po index 6d918558a..30fb5727d 100644 --- a/library/fractions.po +++ b/library/fractions.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:06+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/frameworks.po b/library/frameworks.po index 696cd6ded..804dfe24b 100644 --- a/library/frameworks.po +++ b/library/frameworks.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:06+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/ftplib.po b/library/ftplib.po index 4d76d9bf3..b88d0e7b8 100644 --- a/library/ftplib.po +++ b/library/ftplib.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:06+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/functional.po b/library/functional.po index 133872eea..e31fe6e17 100644 --- a/library/functional.po +++ b/library/functional.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:06+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/functions.po b/library/functions.po index a45509bff..5c8daf19b 100644 --- a/library/functions.po +++ b/library/functions.po @@ -7,17 +7,18 @@ # AmirHossein SAMIMI, 2025 # taha haghgoo, 2025 # sadra nobari, 2025 -# Alireza Shabani (Revisto) , 2025 # Ramiz karimian, 2025 +# Alireza Shabani (Revisto) , 2025 +# khosro azimi, 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:06+0000\n" -"Last-Translator: Ramiz karimian, 2025\n" +"Last-Translator: khosro azimi, 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -452,11 +453,15 @@ msgid "" "When awaited, return the next item from the given :term:`asynchronous " "iterator`, or *default* if given and the iterator is exhausted." msgstr "" +"هنگام اِنتظار (await)، عنصر بعدی را از :term:`asynchronous iterator` داده شده " +"برمی‌گرداند، یا اگر آرگومان *default* ارائه شده و تکرارکننده به پایان رسیده " +"باشد، مقدار *default* را برمی‌گرداند." #: ../../library/functions.rst:92 msgid "" "This is the async variant of the :func:`next` builtin, and behaves similarly." -msgstr "این نسخه ناهمگام از :func:`next` داخلی است، و به طور مشابه عمل می کند." +msgstr "" +"این، نسخه ناهمگامِ تابع داخلی :func:`next` است و به طور مشابه عمل می‌کند." #: ../../library/functions.rst:95 msgid "" @@ -499,6 +504,11 @@ msgid "" "`repr` using ``\\x``, ``\\u``, or ``\\U`` escapes. This generates a string " "similar to that returned by :func:`repr` in Python 2." msgstr "" +"مانند تابع :func:`repr`، رشته‌ای حاوی نمایش قابل چاپ یک شیء را برمی‌گرداند، " +"اما کاراکترهای غیر اَسکی (non-ASCII) را در رشته‌ی بازگردانده‌شده توسط تابع :" +"func:`repr`، با استفاده از توالی‌های گریز (escapes) ``\\x``، ``\\u`` یا " +"``\\U`` اِسکِیپ (escape) می‌کند. این عمل، رشته‌ای مشابه آنچه تابع :func:`repr` " +"در پایتون ۲ بازمی‌گرداند، تولید می‌کند." #: ../../library/functions.rst:124 msgid "" @@ -517,11 +527,13 @@ msgid "" "If the prefix \"0b\" is desired or not, you can use either of the following " "ways." msgstr "" +"چنانچه پیشوند \"0b\" مطلوب باشد یا نباشد، می‌توانید از یکی از روش‌های زیر " +"استفاده کنید." #: ../../library/functions.rst:141 ../../library/functions.rst:950 #: ../../library/functions.rst:1335 msgid "See also :func:`format` for more information." -msgstr "" +msgstr "همچنین برای اطلاعات بیشتر، به تابع :func:`format` مراجعه کنید." #: ../../library/functions.rst:146 msgid "" @@ -532,10 +544,17 @@ msgid "" "`typesnumeric`). It cannot be subclassed further. Its only instances are " "``False`` and ``True`` (see :ref:`typebool`)." msgstr "" +"یک مقدار بولی، یعنی یکی از ``True`` یا ``False`` را برگردانید. آرگومان با " +"استفاده از استاندارد :ref:`truth testing procedure ` تبدیل می شود. " +"اگر آرگومان نادرست یا حذف شده باشد، ``False`` را برمی گرداند. در غیر این " +"صورت، ``True`` را برمی گرداند. کلاس :class:`bool` یک زیر کلاس از :class:" +"`int` است (به :ref:`typesnumeric` مراجعه کنید). این کلاس دیگر قابل " +"زیرکلاس‌بندی نیست. تنها نمونه های آن ``False`` و ``True`` هستند (به :ref:" +"`typebool` مراجعه کنید)." #: ../../library/functions.rst:156 ../../library/functions.rst:815 msgid "The parameter is now positional-only." -msgstr "" +msgstr "این آرگومان اکنون صرفاً جایگاهی (positional-only) است." #: ../../library/functions.rst:161 msgid "" @@ -549,6 +568,18 @@ msgid "" "you to drop into the debugger of choice. If :func:`sys.breakpointhook` is " "not accessible, this function will raise :exc:`RuntimeError`." msgstr "" +"این تابع، اجرای برنامه را در محل فراخوانی متوقف کرده و شما را وارد محیط " +"اشکال‌زدا (debugger) می‌کند. به طور خاص، این تابع، :func:`sys.breakpointhook` " +"را فراخوانی کرده و مقادیر ``args`` و ``kws`` مستقیماً به آن ارسال (pass) " +"می‌کند. به طور پیش‌فرض، تابع ``sys.breakpointhook()`` بدون نیاز به هیچ " +"آرگومانی :func:`pdb.set_trace` را فراخوانی می کند. در این حالت، این صرفاً یک " +"تابع کمکی (convenience function) است تا مجبور نباشید ماژول :mod:`pdb` را به " +"صراحت ایمپورت (import) کنید یا برای ورود به اشکال‌زدا، کد زیادی بنویسید. با " +"این حال، می‌توان :func:`sys.breakpointhook` را روی تابع دیگری تنظیم کرد و در " +"این صورت، :func:`breakpoint` به طور خودکار آن را فراخوانی می کند و به شما " +"این امکان را می دهد که به اشکال‌زدای مورد نظر خود وارد شوید. اگر :func:`sys." +"breakpointhook` قابل دسترسی نباشد، این تابع، استثنای :exc:`RuntimeError` را " +"ایجاد خواهد کرد." #: ../../library/functions.rst:173 msgid "" @@ -556,18 +587,25 @@ msgid "" "envvar:`PYTHONBREAKPOINT` environment variable. See :func:`sys." "breakpointhook` for usage details." msgstr "" +"به طور پیش‌فرض، رفتار تابع :func:`breakpoint` را می‌توان با متغیر محیطی :" +"envvar:`PYTHONBREAKPOINT` تغییر داد. برای جزئیات استفاده، به تابع :func:`sys." +"breakpointhook` مراجعه کنید." #: ../../library/functions.rst:177 msgid "" "Note that this is not guaranteed if :func:`sys.breakpointhook` has been " "replaced." msgstr "" +"توجه داشته باشید که این امر تضمین نمی‌شود اگر تابع :func:`sys.breakpointhook` " +"جایگزین شده باشد." #: ../../library/functions.rst:180 msgid "" "Raises an :ref:`auditing event ` ``builtins.breakpoint`` with " "argument ``breakpointhook``." msgstr "" +"یک :ref:`auditing event ` ``builtins.breakpoint`` با آرگومان " +"``breakpointhook`` ایجاد می کند." #: ../../library/functions.rst:190 msgid "" @@ -576,12 +614,19 @@ msgid "" "methods of mutable sequences, described in :ref:`typesseq-mutable`, as well " "as most methods that the :class:`bytes` type has, see :ref:`bytes-methods`." msgstr "" +"یک آرایه بایتی جدید برمی گرداند. کلاس :class:`bytearray` یک دنباله قابل " +"تغییر از اعداد صحیح در محدوده 0 <= x < 256 است. این کلاس اکثر روش های معمول " +"دنباله های قابل تغییر را دارد که در :ref:`typesseq-mutable` توضیح داده شده " +"اند و همچنین بیشتر روش هایی که نوع :class:`bytes` دارد را داراست، به :ref:" +"`bytes-methods` مراجعه کنید." #: ../../library/functions.rst:195 msgid "" "The optional *source* parameter can be used to initialize the array in a few " "different ways:" msgstr "" +"از پارامتر اختیاری *source* می‌توان برای مقداردهی اولیه آرایه به چند روش " +"مختلف استفاده کرد:" #: ../../library/functions.rst:198 msgid "" @@ -589,12 +634,17 @@ msgid "" "*errors*) parameters; :func:`bytearray` then converts the string to bytes " "using :meth:`str.encode`." msgstr "" +"اگر *source* یک *رشته* «*string*» باشد، باید پارامترهای *encoding* و (به‌صورت " +"اختیاری) *errors* را نیز مشخص کنید؛ سپس تابع :func:`bytearray` آن رشته را با " +"استفاده از متد :meth:`str.encode` به بایت‌ها تبدیل می‌کند." #: ../../library/functions.rst:202 msgid "" "If it is an *integer*, the array will have that size and will be initialized " "with null bytes." msgstr "" +"اگر «*source*» یک *عدد صحیح* «integer» باشد، آرایه به اندازه همان عدد ایجاد " +"شده و با بایت‌های تهی «null byte» مقداردهی اولیه خواهد شد." #: ../../library/functions.rst:205 msgid "" @@ -608,14 +658,17 @@ msgid "" "If it is an *iterable*, it must be an iterable of integers in the range ``0 " "<= x < 256``, which are used as the initial contents of the array." msgstr "" +"اگر «*source*» یک *تکرارپذیر* «iterable» باشد، باید یک تکرارپذیر از اعداد " +"صحیح در بازه ``0 <= x < 256`` باشد، که این اعداد به عنوان محتویات اولیه " +"آرایه استفاده می‌شوند." #: ../../library/functions.rst:211 msgid "Without an argument, an array of size 0 is created." -msgstr "" +msgstr "بدون آرگومان، یک آرایه با اندازه صفر «0» ایجاد می شود." #: ../../library/functions.rst:213 msgid "See also :ref:`binaryseq` and :ref:`typebytearray`." -msgstr "" +msgstr "همچنین به :ref:`binaryseq` و :ref:`typebytearray` مراجعه کنید." #: ../../library/functions.rst:222 msgid "" @@ -2571,7 +2624,7 @@ msgid "" "``None``." msgstr "" -#: ../../library/functions.rst:1846 +#: ../../library/functions.rst:1842 msgid "" "Slice objects have read-only data attributes :attr:`!start`, :attr:`!stop`, " "and :attr:`!step` which merely return the argument values (or their " diff --git a/library/functools.po b/library/functools.po index 98dbf8d3f..58162de42 100644 --- a/library/functools.po +++ b/library/functools.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:06+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/gc.po b/library/gc.po index 32c499ffb..87a206dfa 100644 --- a/library/gc.po +++ b/library/gc.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 01:06+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/getopt.po b/library/getopt.po index 4279e3c64..690081c97 100644 --- a/library/getopt.po +++ b/library/getopt.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 01:06+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/getpass.po b/library/getpass.po index 34bf7e25a..0ffb6edb0 100644 --- a/library/getpass.po +++ b/library/getpass.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 01:06+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/gettext.po b/library/gettext.po index 2ee317d37..64a00ddcc 100644 --- a/library/gettext.po +++ b/library/gettext.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:06+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/glob.po b/library/glob.po index c0daa8ace..f7cc146f6 100644 --- a/library/glob.po +++ b/library/glob.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:06+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/graphlib.po b/library/graphlib.po index 38651f0e7..16592faf4 100644 --- a/library/graphlib.po +++ b/library/graphlib.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:06+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/grp.po b/library/grp.po index 60bac1998..3643ed649 100644 --- a/library/grp.po +++ b/library/grp.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:07+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/gzip.po b/library/gzip.po index 3f85a6690..28e82ccdb 100644 --- a/library/gzip.po +++ b/library/gzip.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:07+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/hashlib.po b/library/hashlib.po index d267359d6..6293d5465 100644 --- a/library/hashlib.po +++ b/library/hashlib.po @@ -8,15 +8,16 @@ # Danial Behzadi , 2025 # Parham Forati, 2025 # Ariyan Bolandi, 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:07+0000\n" -"Last-Translator: Ariyan Bolandi, 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/heapq.po b/library/heapq.po index 84bb89461..d3c4e73e4 100644 --- a/library/heapq.po +++ b/library/heapq.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:07+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/hmac.po b/library/hmac.po index 351446ba7..9dd5c9cf3 100644 --- a/library/hmac.po +++ b/library/hmac.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:07+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/html.entities.po b/library/html.entities.po index c99284d7c..5593cb03c 100644 --- a/library/html.entities.po +++ b/library/html.entities.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:07+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/html.parser.po b/library/html.parser.po index 675fdd7ba..386b772ff 100644 --- a/library/html.parser.po +++ b/library/html.parser.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:07+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/html.po b/library/html.po index 279be1ef2..a55e5d86c 100644 --- a/library/html.po +++ b/library/html.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:07+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/http.client.po b/library/http.client.po index 9fae4c1c2..8ae297398 100644 --- a/library/http.client.po +++ b/library/http.client.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:07+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/http.cookiejar.po b/library/http.cookiejar.po index 6bd2e0aed..ecdbdfa56 100644 --- a/library/http.cookiejar.po +++ b/library/http.cookiejar.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:07+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -757,8 +758,8 @@ msgstr "" #: ../../library/http.cookiejar.rst:573 msgid "" -":attr:`strict_ns_domain` is a collection of flags. Its value is constructed " -"by or-ing together (for example, ``DomainStrictNoDots|" +":attr:`~DefaultCookiePolicy.strict_ns_domain` is a collection of flags. Its " +"value is constructed by or-ing together (for example, ``DomainStrictNoDots|" "DomainStrictNonDomain`` means both flags are set)." msgstr "" diff --git a/library/http.cookies.po b/library/http.cookies.po index d6cbd5321..0ef381024 100644 --- a/library/http.cookies.po +++ b/library/http.cookies.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:07+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/http.po b/library/http.po index 958275d2b..9bbd1d72f 100644 --- a/library/http.po +++ b/library/http.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:07+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/http.server.po b/library/http.server.po index d9bd5a6a5..8d8b2ff6a 100644 --- a/library/http.server.po +++ b/library/http.server.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:07+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -534,28 +535,27 @@ msgstr "" #: ../../library/http.server.rst:431 msgid "" "Then follows a blank line signifying the end of the headers, and then the " -"contents of the file are output. If the file's MIME type starts with ``text/" -"`` the file is opened in text mode; otherwise binary mode is used." +"contents of the file are output." msgstr "" -#: ../../library/http.server.rst:435 +#: ../../library/http.server.rst:434 msgid "" "For example usage, see the implementation of the ``test`` function in :" "source:`Lib/http/server.py`." msgstr "" -#: ../../library/http.server.rst:438 +#: ../../library/http.server.rst:437 msgid "Support of the ``'If-Modified-Since'`` header." msgstr "" -#: ../../library/http.server.rst:441 +#: ../../library/http.server.rst:440 msgid "" "The :class:`SimpleHTTPRequestHandler` class can be used in the following " "manner in order to create a very basic webserver serving files relative to " "the current directory::" msgstr "" -#: ../../library/http.server.rst:445 +#: ../../library/http.server.rst:444 msgid "" "import http.server\n" "import socketserver\n" @@ -569,28 +569,28 @@ msgid "" " httpd.serve_forever()" msgstr "" -#: ../../library/http.server.rst:457 +#: ../../library/http.server.rst:456 msgid "" ":class:`SimpleHTTPRequestHandler` can also be subclassed to enhance " "behavior, such as using different index file names by overriding the class " "attribute :attr:`index_pages`." msgstr "" -#: ../../library/http.server.rst:464 +#: ../../library/http.server.rst:463 msgid "" "This class is used to serve either files or output of CGI scripts from the " "current directory and below. Note that mapping HTTP hierarchic structure to " "local directory structure is exactly as in :class:`SimpleHTTPRequestHandler`." msgstr "" -#: ../../library/http.server.rst:470 +#: ../../library/http.server.rst:469 msgid "" "CGI scripts run by the :class:`CGIHTTPRequestHandler` class cannot execute " "redirects (HTTP code 302), because code 200 (script output follows) is sent " "prior to execution of the CGI script. This pre-empts the status code." msgstr "" -#: ../../library/http.server.rst:475 +#: ../../library/http.server.rst:474 msgid "" "The class will however, run the CGI script, instead of serving it as a file, " "if it guesses it to be a CGI script. Only directory-based CGI are used --- " @@ -598,41 +598,41 @@ msgid "" "denoting CGI scripts." msgstr "" -#: ../../library/http.server.rst:480 +#: ../../library/http.server.rst:479 msgid "" "The :func:`do_GET` and :func:`do_HEAD` functions are modified to run CGI " "scripts and serve the output, instead of serving files, if the request leads " "to somewhere below the ``cgi_directories`` path." msgstr "" -#: ../../library/http.server.rst:484 +#: ../../library/http.server.rst:483 msgid "The :class:`CGIHTTPRequestHandler` defines the following data member:" msgstr "" -#: ../../library/http.server.rst:488 +#: ../../library/http.server.rst:487 msgid "" "This defaults to ``['/cgi-bin', '/htbin']`` and describes directories to " "treat as containing CGI scripts." msgstr "" -#: ../../library/http.server.rst:491 +#: ../../library/http.server.rst:490 msgid "The :class:`CGIHTTPRequestHandler` defines the following method:" msgstr "" -#: ../../library/http.server.rst:495 +#: ../../library/http.server.rst:494 msgid "" "This method serves the ``'POST'`` request type, only allowed for CGI " "scripts. Error 501, \"Can only POST to CGI scripts\", is output when trying " "to POST to a non-CGI url." msgstr "" -#: ../../library/http.server.rst:499 +#: ../../library/http.server.rst:498 msgid "" "Note that CGI scripts will be run with UID of user nobody, for security " "reasons. Problems with the CGI script will be translated to error 403." msgstr "" -#: ../../library/http.server.rst:504 +#: ../../library/http.server.rst:503 msgid "" ":class:`CGIHTTPRequestHandler` is being removed in 3.15. CGI has not been " "considered a good way to do things for well over a decade. This code has " @@ -641,36 +641,36 @@ msgid "" "server-security>`." msgstr "" -#: ../../library/http.server.rst:514 +#: ../../library/http.server.rst:513 msgid "Command-line interface" msgstr "" -#: ../../library/http.server.rst:516 +#: ../../library/http.server.rst:515 msgid "" ":mod:`http.server` can also be invoked directly using the :option:`-m` " "switch of the interpreter. The following example illustrates how to serve " "files relative to the current directory::" msgstr "" -#: ../../library/http.server.rst:520 +#: ../../library/http.server.rst:519 msgid "python -m http.server [OPTIONS] [port]" msgstr "" -#: ../../library/http.server.rst:522 +#: ../../library/http.server.rst:521 msgid "The following options are accepted:" msgstr "" -#: ../../library/http.server.rst:528 +#: ../../library/http.server.rst:527 msgid "" "The server listens to port 8000 by default. The default can be overridden by " "passing the desired port number as an argument::" msgstr "" -#: ../../library/http.server.rst:531 +#: ../../library/http.server.rst:530 msgid "python -m http.server 9000" msgstr "" -#: ../../library/http.server.rst:535 +#: ../../library/http.server.rst:534 msgid "" "Specifies a specific address to which it should bind. Both IPv4 and IPv6 " "addresses are supported. By default, the server binds itself to all " @@ -678,80 +678,80 @@ msgid "" "localhost only::" msgstr "" -#: ../../library/http.server.rst:540 +#: ../../library/http.server.rst:539 msgid "python -m http.server --bind 127.0.0.1" msgstr "" -#: ../../library/http.server.rst:544 +#: ../../library/http.server.rst:543 msgid "Support IPv6 in the ``--bind`` option." msgstr "" -#: ../../library/http.server.rst:549 +#: ../../library/http.server.rst:548 msgid "" "Specifies a directory to which it should serve the files. By default, the " "server uses the current directory. For example, the following command uses a " "specific directory::" msgstr "" -#: ../../library/http.server.rst:553 +#: ../../library/http.server.rst:552 msgid "python -m http.server --directory /tmp/" msgstr "" -#: ../../library/http.server.rst:559 +#: ../../library/http.server.rst:558 msgid "" "Specifies the HTTP version to which the server is conformant. By default, " "the server is conformant to HTTP/1.0. For example, the following command " "runs an HTTP/1.1 conformant server::" msgstr "" -#: ../../library/http.server.rst:563 +#: ../../library/http.server.rst:562 msgid "python -m http.server --protocol HTTP/1.1" msgstr "" -#: ../../library/http.server.rst:569 +#: ../../library/http.server.rst:568 msgid "" ":class:`CGIHTTPRequestHandler` can be enabled in the command line by passing " "the ``--cgi`` option::" msgstr "" -#: ../../library/http.server.rst:572 +#: ../../library/http.server.rst:571 msgid "python -m http.server --cgi" msgstr "" -#: ../../library/http.server.rst:576 +#: ../../library/http.server.rst:575 msgid "" ":mod:`http.server` command line ``--cgi`` support is being removed because :" "class:`CGIHTTPRequestHandler` is being removed." msgstr "" -#: ../../library/http.server.rst:581 +#: ../../library/http.server.rst:580 msgid "" ":class:`CGIHTTPRequestHandler` and the ``--cgi`` command-line option are not " "intended for use by untrusted clients and may be vulnerable to exploitation. " "Always use within a secure environment." msgstr "" -#: ../../library/http.server.rst:587 +#: ../../library/http.server.rst:586 msgid "Specifies a TLS certificate chain for HTTPS connections::" msgstr "" -#: ../../library/http.server.rst:589 +#: ../../library/http.server.rst:588 msgid "python -m http.server --tls-cert fullchain.pem" msgstr "" -#: ../../library/http.server.rst:595 +#: ../../library/http.server.rst:594 msgid "Specifies a private key file for HTTPS connections." msgstr "" -#: ../../library/http.server.rst:597 +#: ../../library/http.server.rst:596 msgid "This option requires ``--tls-cert`` to be specified." msgstr "" -#: ../../library/http.server.rst:603 +#: ../../library/http.server.rst:602 msgid "Specifies the password file for password-protected private keys::" msgstr "" -#: ../../library/http.server.rst:605 +#: ../../library/http.server.rst:604 msgid "" "python -m http.server \\\n" " --tls-cert cert.pem \\\n" @@ -759,22 +759,22 @@ msgid "" " --tls-password-file password.txt" msgstr "" -#: ../../library/http.server.rst:610 +#: ../../library/http.server.rst:609 msgid "This option requires `--tls-cert`` to be specified." msgstr "" -#: ../../library/http.server.rst:618 +#: ../../library/http.server.rst:617 msgid "Security considerations" msgstr "" -#: ../../library/http.server.rst:622 +#: ../../library/http.server.rst:621 msgid "" ":class:`SimpleHTTPRequestHandler` will follow symbolic links when handling " "requests, this makes it possible for files outside of the specified " "directory to be served." msgstr "" -#: ../../library/http.server.rst:626 +#: ../../library/http.server.rst:625 msgid "" "Earlier versions of Python did not scrub control characters from the log " "messages emitted to stderr from ``python -m http.server`` or the default :" @@ -783,7 +783,7 @@ msgid "" "codes to your terminal." msgstr "" -#: ../../library/http.server.rst:632 +#: ../../library/http.server.rst:631 msgid "Control characters are scrubbed in stderr logs." msgstr "" @@ -811,10 +811,10 @@ msgstr "" msgid "httpd" msgstr "" -#: ../../library/http.server.rst:620 +#: ../../library/http.server.rst:619 msgid "http.server" msgstr "" -#: ../../library/http.server.rst:620 +#: ../../library/http.server.rst:619 msgid "security" msgstr "" diff --git a/library/i18n.po b/library/i18n.po index 254c35634..919262f6a 100644 --- a/library/i18n.po +++ b/library/i18n.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:07+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/idle.po b/library/idle.po index 6b4e20236..45e4d27dc 100644 --- a/library/idle.po +++ b/library/idle.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:07+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/imaplib.po b/library/imaplib.po index cc86df51c..d15a5044c 100644 --- a/library/imaplib.po +++ b/library/imaplib.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:07+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/imghdr.po b/library/imghdr.po index 00ca0d393..574f6f640 100644 --- a/library/imghdr.po +++ b/library/imghdr.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-11-19 01:02+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/imp.po b/library/imp.po index 1ea68b161..7eb4698d8 100644 --- a/library/imp.po +++ b/library/imp.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-11-19 01:02+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/importlib.metadata.po b/library/importlib.metadata.po index 731676707..2bbdd5d47 100644 --- a/library/importlib.metadata.po +++ b/library/importlib.metadata.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:08+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/importlib.po b/library/importlib.po index f8977b930..7402bde77 100644 --- a/library/importlib.po +++ b/library/importlib.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:08+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/importlib.resources.abc.po b/library/importlib.resources.abc.po index dbdbe83d9..de299e425 100644 --- a/library/importlib.resources.abc.po +++ b/library/importlib.resources.abc.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-06-27 14:20+0000\n" "PO-Revision-Date: 2022-11-05 19:49+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/importlib.resources.po b/library/importlib.resources.po index b11874aec..e2909072c 100644 --- a/library/importlib.resources.po +++ b/library/importlib.resources.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2022-11-05 19:49+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/index.po b/library/index.po index 70d4e08e6..4d757acf1 100644 --- a/library/index.po +++ b/library/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:08+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/inspect.po b/library/inspect.po index 49a740608..3b0845a3c 100644 --- a/library/inspect.po +++ b/library/inspect.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:08+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/internet.po b/library/internet.po index c05ce1d18..25b6f1272 100644 --- a/library/internet.po +++ b/library/internet.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:08+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/intro.po b/library/intro.po index 92c75f38a..3ac4eac7c 100644 --- a/library/intro.po +++ b/library/intro.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:08+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/io.po b/library/io.po index a017ff13d..db730a33a 100644 --- a/library/io.po +++ b/library/io.po @@ -6,15 +6,16 @@ # Translators: # Danial Behzadi , 2025 # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:08+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -68,7 +69,7 @@ msgid "" "since :exc:`IOError` is now an alias of :exc:`OSError`." msgstr "" -#: ../../library/io.rst:51 ../../library/io.rst:870 ../../library/io.rst:1219 +#: ../../library/io.rst:51 ../../library/io.rst:867 ../../library/io.rst:1217 msgid "Text I/O" msgstr "" @@ -112,7 +113,7 @@ msgid "" "`TextIOBase`." msgstr "" -#: ../../library/io.rst:78 ../../library/io.rst:1207 +#: ../../library/io.rst:78 ../../library/io.rst:1205 msgid "Binary I/O" msgstr "" @@ -657,7 +658,7 @@ msgid "" "negative" msgstr "" -#: ../../library/io.rst:426 ../../library/io.rst:945 +#: ../../library/io.rst:426 ../../library/io.rst:943 msgid "The :data:`!SEEK_*` constants." msgstr "" @@ -783,109 +784,117 @@ msgstr "" msgid "" "The main difference with :class:`RawIOBase` is that methods :meth:`read`, :" "meth:`readinto` and :meth:`write` will try (respectively) to read as much " -"input as requested or to consume all given output, at the expense of making " -"perhaps more than one system call." +"input as requested or to emit all provided data." msgstr "" -#: ../../library/io.rst:535 +#: ../../library/io.rst:534 msgid "" -"In addition, those methods can raise :exc:`BlockingIOError` if the " -"underlying raw stream is in non-blocking mode and cannot take or give enough " -"data; unlike their :class:`RawIOBase` counterparts, they will never return " -"``None``." +"In addition, if the underlying raw stream is in non-blocking mode, when the " +"system returns would block :meth:`write` will raise :exc:`BlockingIOError` " +"with :attr:`BlockingIOError.characters_written` and :meth:`read` will return " +"data read so far or ``None`` if no data is available." msgstr "" -#: ../../library/io.rst:540 +#: ../../library/io.rst:539 msgid "" "Besides, the :meth:`read` method does not have a default implementation that " "defers to :meth:`readinto`." msgstr "" -#: ../../library/io.rst:543 +#: ../../library/io.rst:542 msgid "" "A typical :class:`BufferedIOBase` implementation should not inherit from a :" "class:`RawIOBase` implementation, but wrap one, like :class:`BufferedWriter` " "and :class:`BufferedReader` do." msgstr "" -#: ../../library/io.rst:547 +#: ../../library/io.rst:546 msgid "" ":class:`BufferedIOBase` provides or overrides these data attributes and " "methods in addition to those from :class:`IOBase`:" msgstr "" -#: ../../library/io.rst:552 +#: ../../library/io.rst:551 msgid "" "The underlying raw stream (a :class:`RawIOBase` instance) that :class:" "`BufferedIOBase` deals with. This is not part of the :class:" "`BufferedIOBase` API and may not exist on some implementations." msgstr "" -#: ../../library/io.rst:558 +#: ../../library/io.rst:557 msgid "Separate the underlying raw stream from the buffer and return it." msgstr "" -#: ../../library/io.rst:560 +#: ../../library/io.rst:559 msgid "" "After the raw stream has been detached, the buffer is in an unusable state." msgstr "" -#: ../../library/io.rst:563 +#: ../../library/io.rst:562 msgid "" "Some buffers, like :class:`BytesIO`, do not have the concept of a single raw " "stream to return from this method. They raise :exc:`UnsupportedOperation`." msgstr "" -#: ../../library/io.rst:571 +#: ../../library/io.rst:570 msgid "" -"Read and return up to *size* bytes. If the argument is omitted, ``None``, " -"or negative, data is read and returned until EOF is reached. An empty :" -"class:`bytes` object is returned if the stream is already at EOF." +"Read and return up to *size* bytes. If the argument is omitted, ``None``, or " +"negative read as much as possible." msgstr "" -#: ../../library/io.rst:575 +#: ../../library/io.rst:573 msgid "" -"If the argument is positive, and the underlying raw stream is not " -"interactive, multiple raw reads may be issued to satisfy the byte count " -"(unless EOF is reached first). But for interactive raw streams, at most one " -"raw read will be issued, and a short result does not imply that EOF is " -"imminent." +"Fewer bytes may be returned than requested. An empty :class:`bytes` object " +"is returned if the stream is already at EOF. More than one read may be made " +"and calls may be retried if specific errors are encountered, see :meth:`os." +"read` and :pep:`475` for more details. Less than size bytes being returned " +"does not imply that EOF is imminent." msgstr "" -#: ../../library/io.rst:581 ../../library/io.rst:604 ../../library/io.rst:614 +#: ../../library/io.rst:579 msgid "" -"A :exc:`BlockingIOError` is raised if the underlying raw stream is in non " -"blocking-mode, and has no data available at the moment." +"When reading as much as possible the default implementation will use ``raw." +"readall`` if available (which should implement :meth:`RawIOBase.readall`), " +"otherwise will read in a loop until read returns ``None``, an empty :class:" +"`bytes`, or a non-retryable error. For most streams this is to EOF, but for " +"non-blocking streams more data may become available." msgstr "" -#: ../../library/io.rst:586 +#: ../../library/io.rst:588 ../../library/io.rst:601 msgid "" -"Read and return up to *size* bytes, with at most one call to the underlying " -"raw stream's :meth:`~RawIOBase.read` (or :meth:`~RawIOBase.readinto`) " -"method. This can be useful if you are implementing your own buffering on " -"top of a :class:`BufferedIOBase` object." +"When the underlying raw stream is non-blocking, implementations may either " +"raise :exc:`BlockingIOError` or return ``None`` if no data is available. :" +"mod:`io` implementations return ``None``." msgstr "" -#: ../../library/io.rst:592 +#: ../../library/io.rst:594 msgid "" -"If *size* is ``-1`` (the default), an arbitrary number of bytes are returned " -"(more than zero unless EOF is reached)." +"Read and return up to *size* bytes, calling :meth:`~RawIOBase.readinto` " +"which may retry if :py:const:`~errno.EINTR` is encountered per :pep:`475`. " +"If *size* is ``-1`` or not provided, the implementation will choose an " +"arbitrary value for *size*." msgstr "" -#: ../../library/io.rst:597 +#: ../../library/io.rst:607 msgid "" "Read bytes into a pre-allocated, writable :term:`bytes-like object` *b* and " "return the number of bytes read. For example, *b* might be a :class:" "`bytearray`." msgstr "" -#: ../../library/io.rst:601 +#: ../../library/io.rst:611 msgid "" "Like :meth:`read`, multiple reads may be issued to the underlying raw " "stream, unless the latter is interactive." msgstr "" -#: ../../library/io.rst:609 +#: ../../library/io.rst:614 ../../library/io.rst:624 +msgid "" +"A :exc:`BlockingIOError` is raised if the underlying raw stream is in non " +"blocking-mode, and has no data available at the moment." +msgstr "" + +#: ../../library/io.rst:619 msgid "" "Read bytes into a pre-allocated, writable :term:`bytes-like object` *b*, " "using at most one call to the underlying raw stream's :meth:`~RawIOBase." @@ -893,7 +902,7 @@ msgid "" "read." msgstr "" -#: ../../library/io.rst:621 +#: ../../library/io.rst:631 msgid "" "Write the given :term:`bytes-like object`, *b*, and return the number of " "bytes written (always equal to the length of *b* in bytes, since if the " @@ -902,41 +911,41 @@ msgid "" "or held in a buffer for performance and latency reasons." msgstr "" -#: ../../library/io.rst:628 +#: ../../library/io.rst:638 msgid "" "When in non-blocking mode, a :exc:`BlockingIOError` is raised if the data " "needed to be written to the raw stream but it couldn't accept all the data " "without blocking." msgstr "" -#: ../../library/io.rst:632 +#: ../../library/io.rst:642 msgid "" "The caller may release or mutate *b* after this method returns, so the " "implementation should only access *b* during the method call." msgstr "" -#: ../../library/io.rst:637 +#: ../../library/io.rst:647 msgid "Raw File I/O" msgstr "" -#: ../../library/io.rst:641 +#: ../../library/io.rst:651 msgid "" "A raw binary stream representing an OS-level file containing bytes data. It " "inherits from :class:`RawIOBase`." msgstr "" -#: ../../library/io.rst:644 +#: ../../library/io.rst:654 msgid "The *name* can be one of two things:" msgstr "" -#: ../../library/io.rst:646 +#: ../../library/io.rst:656 msgid "" "a character string or :class:`bytes` object representing the path to the " "file which will be opened. In this case closefd must be ``True`` (the " "default) otherwise an error will be raised." msgstr "" -#: ../../library/io.rst:649 +#: ../../library/io.rst:659 msgid "" "an integer representing the number of an existing OS-level file descriptor " "to which the resulting :class:`FileIO` object will give access. When the " @@ -944,7 +953,7 @@ msgid "" "set to ``False``." msgstr "" -#: ../../library/io.rst:654 +#: ../../library/io.rst:664 msgid "" "The *mode* can be ``'r'``, ``'w'``, ``'x'`` or ``'a'`` for reading " "(default), writing, exclusive creation or appending. The file will be " @@ -955,14 +964,14 @@ msgid "" "``'+'`` to the mode to allow simultaneous reading and writing." msgstr "" -#: ../../library/io.rst:662 +#: ../../library/io.rst:672 msgid "" "The :meth:`~RawIOBase.read` (when called with a positive argument), :meth:" "`~RawIOBase.readinto` and :meth:`~RawIOBase.write` methods on this class " "will only make one system call." msgstr "" -#: ../../library/io.rst:666 +#: ../../library/io.rst:676 msgid "" "A custom opener can be used by passing a callable as *opener*. The " "underlying file descriptor for the file object is then obtained by calling " @@ -971,77 +980,77 @@ msgid "" "similar to passing ``None``)." msgstr "" -#: ../../library/io.rst:672 +#: ../../library/io.rst:682 msgid "The newly created file is :ref:`non-inheritable `." msgstr "" -#: ../../library/io.rst:674 +#: ../../library/io.rst:684 msgid "" "See the :func:`open` built-in function for examples on using the *opener* " "parameter." msgstr "" -#: ../../library/io.rst:677 +#: ../../library/io.rst:687 msgid "The *opener* parameter was added. The ``'x'`` mode was added." msgstr "" -#: ../../library/io.rst:681 +#: ../../library/io.rst:691 msgid "The file is now non-inheritable." msgstr "" -#: ../../library/io.rst:684 +#: ../../library/io.rst:694 msgid "" ":class:`FileIO` provides these data attributes in addition to those from :" "class:`RawIOBase` and :class:`IOBase`:" msgstr "" -#: ../../library/io.rst:689 +#: ../../library/io.rst:699 msgid "The mode as given in the constructor." msgstr "" -#: ../../library/io.rst:693 +#: ../../library/io.rst:703 msgid "" "The file name. This is the file descriptor of the file when no name is " "given in the constructor." msgstr "" -#: ../../library/io.rst:698 +#: ../../library/io.rst:708 msgid "Buffered Streams" msgstr "" -#: ../../library/io.rst:700 +#: ../../library/io.rst:710 msgid "" "Buffered I/O streams provide a higher-level interface to an I/O device than " "raw I/O does." msgstr "" -#: ../../library/io.rst:705 +#: ../../library/io.rst:715 msgid "" "A binary stream using an in-memory bytes buffer. It inherits from :class:" "`BufferedIOBase`. The buffer is discarded when the :meth:`~IOBase.close` " "method is called." msgstr "" -#: ../../library/io.rst:709 +#: ../../library/io.rst:719 msgid "" "The optional argument *initial_bytes* is a :term:`bytes-like object` that " "contains initial data." msgstr "" -#: ../../library/io.rst:712 +#: ../../library/io.rst:722 msgid "" ":class:`BytesIO` provides or overrides these methods in addition to those " "from :class:`BufferedIOBase` and :class:`IOBase`:" msgstr "" -#: ../../library/io.rst:717 +#: ../../library/io.rst:727 msgid "" "Return a readable and writable view over the contents of the buffer without " "copying them. Also, mutating the view will transparently update the " "contents of the buffer::" msgstr "" -#: ../../library/io.rst:721 +#: ../../library/io.rst:731 msgid "" ">>> b = io.BytesIO(b\"abcdef\")\n" ">>> view = b.getbuffer()\n" @@ -1050,309 +1059,302 @@ msgid "" "b'ab56ef'" msgstr "" -#: ../../library/io.rst:728 +#: ../../library/io.rst:738 msgid "" "As long as the view exists, the :class:`BytesIO` object cannot be resized or " "closed." msgstr "" -#: ../../library/io.rst:735 +#: ../../library/io.rst:745 msgid "Return :class:`bytes` containing the entire contents of the buffer." msgstr "" -#: ../../library/io.rst:740 +#: ../../library/io.rst:750 msgid "In :class:`BytesIO`, this is the same as :meth:`~BufferedIOBase.read`." msgstr "" -#: ../../library/io.rst:742 ../../library/io.rst:790 +#: ../../library/io.rst:752 ../../library/io.rst:792 msgid "The *size* argument is now optional." msgstr "" -#: ../../library/io.rst:747 +#: ../../library/io.rst:757 msgid "" "In :class:`BytesIO`, this is the same as :meth:`~BufferedIOBase.readinto`." msgstr "" -#: ../../library/io.rst:753 +#: ../../library/io.rst:763 msgid "" "A buffered binary stream providing higher-level access to a readable, non " "seekable :class:`RawIOBase` raw binary stream. It inherits from :class:" "`BufferedIOBase`." msgstr "" -#: ../../library/io.rst:757 +#: ../../library/io.rst:767 msgid "" "When reading data from this object, a larger amount of data may be requested " "from the underlying raw stream, and kept in an internal buffer. The buffered " "data can then be returned directly on subsequent reads." msgstr "" -#: ../../library/io.rst:761 +#: ../../library/io.rst:771 msgid "" "The constructor creates a :class:`BufferedReader` for the given readable " "*raw* stream and *buffer_size*. If *buffer_size* is omitted, :data:" "`DEFAULT_BUFFER_SIZE` is used." msgstr "" -#: ../../library/io.rst:765 +#: ../../library/io.rst:775 msgid "" ":class:`BufferedReader` provides or overrides these methods in addition to " "those from :class:`BufferedIOBase` and :class:`IOBase`:" msgstr "" -#: ../../library/io.rst:770 -msgid "" -"Return bytes from the stream without advancing the position. At most one " -"single read on the raw stream is done to satisfy the call. The number of " -"bytes returned may be less or more than requested." -msgstr "" - -#: ../../library/io.rst:776 +#: ../../library/io.rst:780 msgid "" -"Read and return *size* bytes, or if *size* is not given or negative, until " -"EOF or if the read call would block in non-blocking mode." +"Return bytes from the stream without advancing the position. The number of " +"bytes returned may be less or more than requested. If the underlying raw " +"stream is non-blocking and the operation would block, returns empty bytes." msgstr "" -#: ../../library/io.rst:781 ../../library/io.rst:795 ../../library/io.rst:1028 +#: ../../library/io.rst:786 msgid "" -"When the underlying raw stream is non-blocking, a :exc:`BlockingIOError` may " -"be raised if a read operation cannot be completed immediately." +"In :class:`BufferedReader` this is the same as :meth:`io.BufferedIOBase.read`" msgstr "" -#: ../../library/io.rst:786 +#: ../../library/io.rst:790 msgid "" -"Read and return up to *size* bytes with only one call on the raw stream. If " -"at least one byte is buffered, only buffered bytes are returned. Otherwise, " -"one raw stream read call is made." +"In :class:`BufferedReader` this is the same as :meth:`io.BufferedIOBase." +"read1`" msgstr "" -#: ../../library/io.rst:800 +#: ../../library/io.rst:797 msgid "" "A buffered binary stream providing higher-level access to a writeable, non " "seekable :class:`RawIOBase` raw binary stream. It inherits from :class:" "`BufferedIOBase`." msgstr "" -#: ../../library/io.rst:804 +#: ../../library/io.rst:801 msgid "" "When writing to this object, data is normally placed into an internal " "buffer. The buffer will be written out to the underlying :class:`RawIOBase` " "object under various conditions, including:" msgstr "" -#: ../../library/io.rst:808 +#: ../../library/io.rst:805 msgid "when the buffer gets too small for all pending data;" msgstr "" -#: ../../library/io.rst:809 +#: ../../library/io.rst:806 msgid "when :meth:`flush` is called;" msgstr "" -#: ../../library/io.rst:810 +#: ../../library/io.rst:807 msgid "" "when a :meth:`~IOBase.seek` is requested (for :class:`BufferedRandom` " "objects);" msgstr "" -#: ../../library/io.rst:811 +#: ../../library/io.rst:808 msgid "when the :class:`BufferedWriter` object is closed or destroyed." msgstr "" -#: ../../library/io.rst:813 +#: ../../library/io.rst:810 msgid "" "The constructor creates a :class:`BufferedWriter` for the given writeable " "*raw* stream. If the *buffer_size* is not given, it defaults to :data:" "`DEFAULT_BUFFER_SIZE`." msgstr "" -#: ../../library/io.rst:817 +#: ../../library/io.rst:814 msgid "" ":class:`BufferedWriter` provides or overrides these methods in addition to " "those from :class:`BufferedIOBase` and :class:`IOBase`:" msgstr "" -#: ../../library/io.rst:822 +#: ../../library/io.rst:819 msgid "" "Force bytes held in the buffer into the raw stream. A :exc:" "`BlockingIOError` should be raised if the raw stream blocks." msgstr "" -#: ../../library/io.rst:827 +#: ../../library/io.rst:824 msgid "" "Write the :term:`bytes-like object`, *b*, and return the number of bytes " -"written. When in non-blocking mode, a :exc:`BlockingIOError` is raised if " -"the buffer needs to be written out but the raw stream blocks." +"written. When in non-blocking mode, a :exc:`BlockingIOError` with :attr:" +"`BlockingIOError.characters_written` set is raised if the buffer needs to be " +"written out but the raw stream blocks." msgstr "" -#: ../../library/io.rst:835 +#: ../../library/io.rst:832 msgid "" "A buffered binary stream providing higher-level access to a seekable :class:" "`RawIOBase` raw binary stream. It inherits from :class:`BufferedReader` " "and :class:`BufferedWriter`." msgstr "" -#: ../../library/io.rst:839 +#: ../../library/io.rst:836 msgid "" "The constructor creates a reader and writer for a seekable raw stream, given " "in the first argument. If the *buffer_size* is omitted it defaults to :data:" "`DEFAULT_BUFFER_SIZE`." msgstr "" -#: ../../library/io.rst:843 +#: ../../library/io.rst:840 msgid "" ":class:`BufferedRandom` is capable of anything :class:`BufferedReader` or :" "class:`BufferedWriter` can do. In addition, :meth:`~IOBase.seek` and :meth:" "`~IOBase.tell` are guaranteed to be implemented." msgstr "" -#: ../../library/io.rst:850 +#: ../../library/io.rst:847 msgid "" "A buffered binary stream providing higher-level access to two non seekable :" "class:`RawIOBase` raw binary streams---one readable, the other writeable. It " "inherits from :class:`BufferedIOBase`." msgstr "" -#: ../../library/io.rst:854 +#: ../../library/io.rst:851 msgid "" "*reader* and *writer* are :class:`RawIOBase` objects that are readable and " "writeable respectively. If the *buffer_size* is omitted it defaults to :" "data:`DEFAULT_BUFFER_SIZE`." msgstr "" -#: ../../library/io.rst:858 +#: ../../library/io.rst:855 msgid "" ":class:`BufferedRWPair` implements all of :class:`BufferedIOBase`\\'s " "methods except for :meth:`~BufferedIOBase.detach`, which raises :exc:" "`UnsupportedOperation`." msgstr "" -#: ../../library/io.rst:864 +#: ../../library/io.rst:861 msgid "" ":class:`BufferedRWPair` does not attempt to synchronize accesses to its " "underlying raw streams. You should not pass it the same object as reader " "and writer; use :class:`BufferedRandom` instead." msgstr "" -#: ../../library/io.rst:874 +#: ../../library/io.rst:871 msgid "" "Base class for text streams. This class provides a character and line based " "interface to stream I/O. It inherits from :class:`IOBase`." msgstr "" -#: ../../library/io.rst:877 +#: ../../library/io.rst:874 msgid "" ":class:`TextIOBase` provides or overrides these data attributes and methods " "in addition to those from :class:`IOBase`:" msgstr "" -#: ../../library/io.rst:882 +#: ../../library/io.rst:879 msgid "" "The name of the encoding used to decode the stream's bytes into strings, and " "to encode strings into bytes." msgstr "" -#: ../../library/io.rst:887 +#: ../../library/io.rst:884 msgid "The error setting of the decoder or encoder." msgstr "" -#: ../../library/io.rst:891 +#: ../../library/io.rst:888 msgid "" "A string, a tuple of strings, or ``None``, indicating the newlines " "translated so far. Depending on the implementation and the initial " "constructor flags, this may not be available." msgstr "" -#: ../../library/io.rst:897 +#: ../../library/io.rst:894 msgid "" -"The underlying binary buffer (a :class:`BufferedIOBase` instance) that :" -"class:`TextIOBase` deals with. This is not part of the :class:`TextIOBase` " -"API and may not exist in some implementations." +"The underlying binary buffer (a :class:`BufferedIOBase` or :class:" +"`RawIOBase` instance) that :class:`TextIOBase` deals with. This is not part " +"of the :class:`TextIOBase` API and may not exist in some implementations." msgstr "" -#: ../../library/io.rst:903 +#: ../../library/io.rst:901 msgid "" "Separate the underlying binary buffer from the :class:`TextIOBase` and " "return it." msgstr "" -#: ../../library/io.rst:906 +#: ../../library/io.rst:904 msgid "" "After the underlying buffer has been detached, the :class:`TextIOBase` is in " "an unusable state." msgstr "" -#: ../../library/io.rst:909 +#: ../../library/io.rst:907 msgid "" "Some :class:`TextIOBase` implementations, like :class:`StringIO`, may not " "have the concept of an underlying buffer and calling this method will raise :" "exc:`UnsupportedOperation`." msgstr "" -#: ../../library/io.rst:917 +#: ../../library/io.rst:915 msgid "" "Read and return at most *size* characters from the stream as a single :class:" "`str`. If *size* is negative or ``None``, reads until EOF." msgstr "" -#: ../../library/io.rst:922 +#: ../../library/io.rst:920 msgid "" "Read until newline or EOF and return a single :class:`str`. If the stream " "is already at EOF, an empty string is returned." msgstr "" -#: ../../library/io.rst:925 +#: ../../library/io.rst:923 msgid "If *size* is specified, at most *size* characters will be read." msgstr "" -#: ../../library/io.rst:929 +#: ../../library/io.rst:927 msgid "" "Change the stream position to the given *offset*. Behaviour depends on the " "*whence* parameter. The default value for *whence* is :data:`!SEEK_SET`." msgstr "" -#: ../../library/io.rst:933 +#: ../../library/io.rst:931 msgid "" ":data:`!SEEK_SET` or ``0``: seek from the start of the stream (the default); " "*offset* must either be a number returned by :meth:`TextIOBase.tell`, or " "zero. Any other *offset* value produces undefined behaviour." msgstr "" -#: ../../library/io.rst:937 +#: ../../library/io.rst:935 msgid "" ":data:`!SEEK_CUR` or ``1``: \"seek\" to the current position; *offset* must " "be zero, which is a no-operation (all other values are unsupported)." msgstr "" -#: ../../library/io.rst:940 +#: ../../library/io.rst:938 msgid "" ":data:`!SEEK_END` or ``2``: seek to the end of the stream; *offset* must be " "zero (all other values are unsupported)." msgstr "" -#: ../../library/io.rst:943 +#: ../../library/io.rst:941 msgid "Return the new absolute position as an opaque number." msgstr "" -#: ../../library/io.rst:950 +#: ../../library/io.rst:948 msgid "" "Return the current stream position as an opaque number. The number does not " "usually represent a number of bytes in the underlying binary storage." msgstr "" -#: ../../library/io.rst:956 +#: ../../library/io.rst:954 msgid "" "Write the string *s* to the stream and return the number of characters " "written." msgstr "" -#: ../../library/io.rst:963 +#: ../../library/io.rst:961 msgid "" "A buffered text stream providing higher-level access to a :class:" "`BufferedIOBase` buffered binary stream. It inherits from :class:" "`TextIOBase`." msgstr "" -#: ../../library/io.rst:967 +#: ../../library/io.rst:965 msgid "" "*encoding* gives the name of the encoding that the stream will be decoded or " "encoded with. In :ref:`UTF-8 Mode `, this defaults to UTF-8. " @@ -1361,7 +1363,7 @@ msgid "" "explicitly. See :ref:`io-text-encoding` for more information." msgstr "" -#: ../../library/io.rst:973 +#: ../../library/io.rst:971 msgid "" "*errors* is an optional string that specifies how encoding and decoding " "errors are to be handled. Pass ``'strict'`` to raise a :exc:`ValueError` " @@ -1376,13 +1378,13 @@ msgid "" "that has been registered with :func:`codecs.register_error` is also valid." msgstr "" -#: ../../library/io.rst:989 +#: ../../library/io.rst:987 msgid "" "*newline* controls how line endings are handled. It can be ``None``, " "``''``, ``'\\n'``, ``'\\r'``, and ``'\\r\\n'``. It works as follows:" msgstr "" -#: ../../library/io.rst:992 +#: ../../library/io.rst:990 msgid "" "When reading input from the stream, if *newline* is ``None``, :term:" "`universal newlines` mode is enabled. Lines in the input can end in " @@ -1394,7 +1396,7 @@ msgid "" "returned to the caller untranslated." msgstr "" -#: ../../library/io.rst:1001 +#: ../../library/io.rst:999 msgid "" "When writing output to the stream, if *newline* is ``None``, any ``'\\n'`` " "characters written are translated to the system default line separator, :" @@ -1403,13 +1405,13 @@ msgid "" "characters written are translated to the given string." msgstr "" -#: ../../library/io.rst:1007 +#: ../../library/io.rst:1005 msgid "" "If *line_buffering* is ``True``, :meth:`~IOBase.flush` is implied when a " "call to write contains a newline character or a carriage return." msgstr "" -#: ../../library/io.rst:1010 +#: ../../library/io.rst:1008 msgid "" "If *write_through* is ``True``, calls to :meth:`~BufferedIOBase.write` are " "guaranteed not to be buffered: any data written on the :class:" @@ -1417,11 +1419,11 @@ msgid "" "*buffer*." msgstr "" -#: ../../library/io.rst:1014 +#: ../../library/io.rst:1012 msgid "The *write_through* argument has been added." msgstr "" -#: ../../library/io.rst:1017 +#: ../../library/io.rst:1015 msgid "" "The default *encoding* is now ``locale.getpreferredencoding(False)`` instead " "of ``locale.getpreferredencoding()``. Don't change temporary the locale " @@ -1429,108 +1431,114 @@ msgid "" "instead of the user preferred encoding." msgstr "" -#: ../../library/io.rst:1023 +#: ../../library/io.rst:1021 msgid "" "The *encoding* argument now supports the ``\"locale\"`` dummy encoding name." msgstr "" -#: ../../library/io.rst:1031 +#: ../../library/io.rst:1026 +msgid "" +"When the underlying raw stream is non-blocking, a :exc:`BlockingIOError` may " +"be raised if a read operation cannot be completed immediately." +msgstr "" + +#: ../../library/io.rst:1029 msgid "" ":class:`TextIOWrapper` provides these data attributes and methods in " "addition to those from :class:`TextIOBase` and :class:`IOBase`:" msgstr "" -#: ../../library/io.rst:1036 +#: ../../library/io.rst:1034 msgid "Whether line buffering is enabled." msgstr "" -#: ../../library/io.rst:1040 +#: ../../library/io.rst:1038 msgid "Whether writes are passed immediately to the underlying binary buffer." msgstr "" -#: ../../library/io.rst:1048 +#: ../../library/io.rst:1046 msgid "" "Reconfigure this text stream using new settings for *encoding*, *errors*, " "*newline*, *line_buffering* and *write_through*." msgstr "" -#: ../../library/io.rst:1051 +#: ../../library/io.rst:1049 msgid "" "Parameters not specified keep current settings, except ``errors='strict'`` " "is used when *encoding* is specified but *errors* is not specified." msgstr "" -#: ../../library/io.rst:1055 +#: ../../library/io.rst:1053 msgid "" "It is not possible to change the encoding or newline if some data has " "already been read from the stream. On the other hand, changing encoding " "after write is possible." msgstr "" -#: ../../library/io.rst:1059 +#: ../../library/io.rst:1057 msgid "" "This method does an implicit stream flush before setting the new parameters." msgstr "" -#: ../../library/io.rst:1064 +#: ../../library/io.rst:1062 msgid "The method supports ``encoding=\"locale\"`` option." msgstr "" -#: ../../library/io.rst:1069 +#: ../../library/io.rst:1067 msgid "" "Set the stream position. Return the new stream position as an :class:`int`." msgstr "" -#: ../../library/io.rst:1072 +#: ../../library/io.rst:1070 msgid "" "Four operations are supported, given by the following argument combinations:" msgstr "" -#: ../../library/io.rst:1075 +#: ../../library/io.rst:1073 msgid "``seek(0, SEEK_SET)``: Rewind to the start of the stream." msgstr "" -#: ../../library/io.rst:1076 +#: ../../library/io.rst:1074 msgid "" "``seek(cookie, SEEK_SET)``: Restore a previous position; *cookie* **must " "be** a number returned by :meth:`tell`." msgstr "" -#: ../../library/io.rst:1078 +#: ../../library/io.rst:1076 msgid "``seek(0, SEEK_END)``: Fast-forward to the end of the stream." msgstr "" -#: ../../library/io.rst:1079 +#: ../../library/io.rst:1077 msgid "``seek(0, SEEK_CUR)``: Leave the current stream position unchanged." msgstr "" -#: ../../library/io.rst:1081 +#: ../../library/io.rst:1079 msgid "Any other argument combinations are invalid, and may raise exceptions." msgstr "" -#: ../../library/io.rst:1086 +#: ../../library/io.rst:1084 msgid ":data:`os.SEEK_SET`, :data:`os.SEEK_CUR`, and :data:`os.SEEK_END`." msgstr "" -#: ../../library/io.rst:1090 +#: ../../library/io.rst:1088 msgid "" "Return the stream position as an opaque number. The return value of :meth:`!" "tell` can be given as input to :meth:`seek`, to restore a previous stream " "position." msgstr "" -#: ../../library/io.rst:1097 +#: ../../library/io.rst:1095 msgid "" "A text stream using an in-memory text buffer. It inherits from :class:" "`TextIOBase`." msgstr "" -#: ../../library/io.rst:1100 +#: ../../library/io.rst:1098 msgid "" "The text buffer is discarded when the :meth:`~IOBase.close` method is called." msgstr "" -#: ../../library/io.rst:1103 +#: ../../library/io.rst:1101 msgid "" "The initial value of the buffer can be set by providing *initial_value*. If " "newline translation is enabled, newlines will be encoded as if by :meth:" @@ -1542,31 +1550,31 @@ msgid "" "at the end of the buffer." msgstr "" -#: ../../library/io.rst:1112 +#: ../../library/io.rst:1110 msgid "" "The *newline* argument works like that of :class:`TextIOWrapper`, except " "that when writing output to the stream, if *newline* is ``None``, newlines " "are written as ``\\n`` on all platforms." msgstr "" -#: ../../library/io.rst:1116 +#: ../../library/io.rst:1114 msgid "" ":class:`StringIO` provides this method in addition to those from :class:" "`TextIOBase` and :class:`IOBase`:" msgstr "" -#: ../../library/io.rst:1121 +#: ../../library/io.rst:1119 msgid "" "Return a :class:`str` containing the entire contents of the buffer. Newlines " "are decoded as if by :meth:`~TextIOBase.read`, although the stream position " "is not changed." msgstr "" -#: ../../library/io.rst:1125 +#: ../../library/io.rst:1123 msgid "Example usage::" msgstr "" -#: ../../library/io.rst:1127 +#: ../../library/io.rst:1125 msgid "" "import io\n" "\n" @@ -1583,84 +1591,84 @@ msgid "" "output.close()" msgstr "" -#: ../../library/io.rst:1147 +#: ../../library/io.rst:1145 msgid "" "A helper codec that decodes newlines for :term:`universal newlines` mode. It " "inherits from :class:`codecs.IncrementalDecoder`." msgstr "" -#: ../../library/io.rst:1152 +#: ../../library/io.rst:1150 msgid "Static Typing" msgstr "" -#: ../../library/io.rst:1154 +#: ../../library/io.rst:1152 msgid "" "The following protocols can be used for annotating function and method " "arguments for simple stream reading or writing operations. They are " "decorated with :deco:`typing.runtime_checkable`." msgstr "" -#: ../../library/io.rst:1160 +#: ../../library/io.rst:1158 msgid "" "Generic protocol for reading from a file or other input stream. ``T`` will " "usually be :class:`str` or :class:`bytes`, but can be any type that is read " "from the stream." msgstr "" -#: ../../library/io.rst:1169 +#: ../../library/io.rst:1167 msgid "" "Read data from the input stream and return it. If *size* is specified, it " "should be an integer, and at most *size* items (bytes/characters) will be " "read." msgstr "" -#: ../../library/io.rst:1173 ../../library/io.rst:1192 +#: ../../library/io.rst:1171 ../../library/io.rst:1190 msgid "For example::" msgstr "" -#: ../../library/io.rst:1175 +#: ../../library/io.rst:1173 msgid "" "def read_it(reader: Reader[str]):\n" " data = reader.read(11)\n" " assert isinstance(data, str)" msgstr "" -#: ../../library/io.rst:1181 +#: ../../library/io.rst:1179 msgid "" "Generic protocol for writing to a file or other output stream. ``T`` will " "usually be :class:`str` or :class:`bytes`, but can be any type that can be " "written to the stream." msgstr "" -#: ../../library/io.rst:1189 +#: ../../library/io.rst:1187 msgid "" "Write *data* to the output stream and return the number of items (bytes/" "characters) written." msgstr "" -#: ../../library/io.rst:1194 +#: ../../library/io.rst:1192 msgid "" "def write_binary(writer: Writer[bytes]):\n" " writer.write(b\"Hello world!\\n\")" msgstr "" -#: ../../library/io.rst:1197 +#: ../../library/io.rst:1195 msgid "" "See :ref:`typing-io` for other I/O related protocols and classes that can be " "used for static type checking." msgstr "" -#: ../../library/io.rst:1201 +#: ../../library/io.rst:1199 msgid "Performance" msgstr "" -#: ../../library/io.rst:1203 +#: ../../library/io.rst:1201 msgid "" "This section discusses the performance of the provided concrete I/O " "implementations." msgstr "" -#: ../../library/io.rst:1209 +#: ../../library/io.rst:1207 msgid "" "By reading and writing only large chunks of data even when the user asks for " "a single byte, buffered I/O hides any inefficiency in calling and executing " @@ -1673,7 +1681,7 @@ msgid "" "data." msgstr "" -#: ../../library/io.rst:1221 +#: ../../library/io.rst:1219 msgid "" "Text I/O over a binary storage (such as a file) is significantly slower than " "binary I/O over the same storage, because it requires conversions between " @@ -1683,24 +1691,24 @@ msgid "" "the reconstruction algorithm used." msgstr "" -#: ../../library/io.rst:1228 +#: ../../library/io.rst:1226 msgid "" ":class:`StringIO`, however, is a native in-memory unicode container and will " "exhibit similar speed to :class:`BytesIO`." msgstr "" -#: ../../library/io.rst:1232 +#: ../../library/io.rst:1230 msgid "Multi-threading" msgstr "" -#: ../../library/io.rst:1234 +#: ../../library/io.rst:1232 msgid "" ":class:`FileIO` objects are thread-safe to the extent that the operating " "system calls (such as :manpage:`read(2)` under Unix) they wrap are thread-" "safe too." msgstr "" -#: ../../library/io.rst:1237 +#: ../../library/io.rst:1235 msgid "" "Binary buffered objects (instances of :class:`BufferedReader`, :class:" "`BufferedWriter`, :class:`BufferedRandom` and :class:`BufferedRWPair`) " @@ -1708,15 +1716,15 @@ msgid "" "them from multiple threads at once." msgstr "" -#: ../../library/io.rst:1242 +#: ../../library/io.rst:1240 msgid ":class:`TextIOWrapper` objects are not thread-safe." msgstr "" -#: ../../library/io.rst:1245 +#: ../../library/io.rst:1243 msgid "Reentrancy" msgstr "" -#: ../../library/io.rst:1247 +#: ../../library/io.rst:1245 msgid "" "Binary buffered objects (instances of :class:`BufferedReader`, :class:" "`BufferedWriter`, :class:`BufferedRandom` and :class:`BufferedRWPair`) are " @@ -1727,7 +1735,7 @@ msgid "" "from entering the buffered object." msgstr "" -#: ../../library/io.rst:1255 +#: ../../library/io.rst:1253 msgid "" "The above implicitly extends to text files, since the :func:`open` function " "will wrap a buffered object inside a :class:`TextIOWrapper`. This includes " @@ -1743,14 +1751,14 @@ msgstr "" msgid "io module" msgstr "" -#: ../../library/io.rst:986 ../../library/io.rst:1142 +#: ../../library/io.rst:984 ../../library/io.rst:1140 msgid "universal newlines" msgstr "" -#: ../../library/io.rst:986 +#: ../../library/io.rst:984 msgid "io.TextIOWrapper class" msgstr "" -#: ../../library/io.rst:1142 +#: ../../library/io.rst:1140 msgid "io.IncrementalNewlineDecoder class" msgstr "" diff --git a/library/ipaddress.po b/library/ipaddress.po index 93632e7b6..de8f4525e 100644 --- a/library/ipaddress.po +++ b/library/ipaddress.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:08+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/ipc.po b/library/ipc.po index 4ec4f6eb7..37f1a9298 100644 --- a/library/ipc.po +++ b/library/ipc.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:08+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/itertools.po b/library/itertools.po index 5ee676474..18eecea12 100644 --- a/library/itertools.po +++ b/library/itertools.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:08+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/json.po b/library/json.po index 4596fee83..8714a216b 100644 --- a/library/json.po +++ b/library/json.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:08+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -42,22 +43,29 @@ msgstr "" #: ../../library/json.rst:22 msgid "" +"The term \"object\" in the context of JSON processing in Python can be " +"ambiguous. All values in Python are objects. In JSON, an object refers to " +"any data wrapped in curly braces, similar to a Python dictionary." +msgstr "" + +#: ../../library/json.rst:27 +msgid "" "Be cautious when parsing JSON data from untrusted sources. A malicious JSON " "string may cause the decoder to consume considerable CPU and memory " "resources. Limiting the size of data to be parsed is recommended." msgstr "" -#: ../../library/json.rst:26 +#: ../../library/json.rst:31 msgid "" -":mod:`json` exposes an API familiar to users of the standard library :mod:" +"This module exposes an API familiar to users of the standard library :mod:" "`marshal` and :mod:`pickle` modules." msgstr "" -#: ../../library/json.rst:29 +#: ../../library/json.rst:34 msgid "Encoding basic Python object hierarchies::" msgstr "" -#: ../../library/json.rst:31 +#: ../../library/json.rst:36 msgid "" ">>> import json\n" ">>> json.dumps(['foo', {'bar': ('baz', None, 1.0, 2)}])\n" @@ -77,22 +85,22 @@ msgid "" "'[\"streaming API\"]'" msgstr "" -#: ../../library/json.rst:48 +#: ../../library/json.rst:53 msgid "Compact encoding::" msgstr "" -#: ../../library/json.rst:50 +#: ../../library/json.rst:55 msgid "" ">>> import json\n" ">>> json.dumps([1, 2, 3, {'4': 5, '6': 7}], separators=(',', ':'))\n" "'[1,2,3,{\"4\":5,\"6\":7}]'" msgstr "" -#: ../../library/json.rst:54 +#: ../../library/json.rst:59 msgid "Pretty printing::" msgstr "" -#: ../../library/json.rst:56 +#: ../../library/json.rst:61 msgid "" ">>> import json\n" ">>> print(json.dumps({'6': 7, '4': 5}, sort_keys=True, indent=4))\n" @@ -102,11 +110,11 @@ msgid "" "}" msgstr "" -#: ../../library/json.rst:63 -msgid "Specializing JSON object encoding::" +#: ../../library/json.rst:68 +msgid "Customizing JSON object encoding::" msgstr "" -#: ../../library/json.rst:65 +#: ../../library/json.rst:70 msgid "" ">>> import json\n" ">>> def custom_json(obj):\n" @@ -119,11 +127,11 @@ msgid "" "'{\"__complex__\": true, \"real\": 1.0, \"imag\": 2.0}'" msgstr "" -#: ../../library/json.rst:74 +#: ../../library/json.rst:79 msgid "Decoding JSON::" msgstr "" -#: ../../library/json.rst:76 +#: ../../library/json.rst:81 msgid "" ">>> import json\n" ">>> json.loads('[\"foo\", {\"bar\":[\"baz\", null, 1.0, 2]}]')\n" @@ -136,11 +144,11 @@ msgid "" "['streaming API']" msgstr "" -#: ../../library/json.rst:86 -msgid "Specializing JSON object decoding::" +#: ../../library/json.rst:91 +msgid "Customizing JSON object decoding::" msgstr "" -#: ../../library/json.rst:88 +#: ../../library/json.rst:93 msgid "" ">>> import json\n" ">>> def as_complex(dct):\n" @@ -156,11 +164,11 @@ msgid "" "Decimal('1.1')" msgstr "" -#: ../../library/json.rst:101 +#: ../../library/json.rst:106 msgid "Extending :class:`JSONEncoder`::" msgstr "" -#: ../../library/json.rst:103 +#: ../../library/json.rst:108 msgid "" ">>> import json\n" ">>> class ComplexEncoder(json.JSONEncoder):\n" @@ -178,11 +186,11 @@ msgid "" "['[2.0', ', 1.0', ']']" msgstr "" -#: ../../library/json.rst:119 +#: ../../library/json.rst:124 msgid "Using :mod:`json` from the shell to validate and pretty-print:" msgstr "" -#: ../../library/json.rst:121 +#: ../../library/json.rst:126 msgid "" "$ echo '{\"json\":\"obj\"}' | python -m json\n" "{\n" @@ -192,11 +200,11 @@ msgid "" "Expecting property name enclosed in double quotes: line 1 column 2 (char 1)" msgstr "" -#: ../../library/json.rst:130 +#: ../../library/json.rst:135 msgid "See :ref:`json-commandline` for detailed documentation." msgstr "" -#: ../../library/json.rst:134 +#: ../../library/json.rst:139 msgid "" "JSON is a subset of `YAML `_ 1.2. The JSON produced by " "this module's default settings (in particular, the default *separators* " @@ -204,24 +212,24 @@ msgid "" "used as a YAML serializer." msgstr "" -#: ../../library/json.rst:141 +#: ../../library/json.rst:146 msgid "" "This module's encoders and decoders preserve input and output order by " "default. Order is only lost if the underlying containers are unordered." msgstr "" -#: ../../library/json.rst:146 +#: ../../library/json.rst:151 msgid "Basic Usage" msgstr "" -#: ../../library/json.rst:153 +#: ../../library/json.rst:158 msgid "" "Serialize *obj* as a JSON formatted stream to *fp* (a ``.write()``-" "supporting :term:`file-like object`) using this :ref:`Python-to-JSON " "conversion table `." msgstr "" -#: ../../library/json.rst:159 +#: ../../library/json.rst:164 msgid "" "Unlike :mod:`pickle` and :mod:`marshal`, JSON is not a framed protocol, so " "trying to serialize multiple objects with repeated calls to :func:`dump` " @@ -232,39 +240,39 @@ msgstr "" msgid "Parameters" msgstr "" -#: ../../library/json.rst:163 +#: ../../library/json.rst:168 msgid "The Python object to be serialized." msgstr "" -#: ../../library/json.rst:166 +#: ../../library/json.rst:171 msgid "" "The file-like object *obj* will be serialized to. The :mod:`!json` module " "always produces :class:`str` objects, not :class:`bytes` objects, therefore " "``fp.write()`` must support :class:`str` input." msgstr "" -#: ../../library/json.rst:173 +#: ../../library/json.rst:178 msgid "" "If ``True``, keys that are not of a basic type (:class:`str`, :class:`int`, :" "class:`float`, :class:`bool`, ``None``) will be skipped instead of raising " "a :exc:`TypeError`. Default ``False``." msgstr "" -#: ../../library/json.rst:179 +#: ../../library/json.rst:184 msgid "" "If ``True`` (the default), the output is guaranteed to have all incoming non-" "ASCII characters escaped. If ``False``, these characters will be outputted " "as-is." msgstr "" -#: ../../library/json.rst:184 +#: ../../library/json.rst:189 msgid "" "If ``False``, the circular reference check for container types is skipped " "and a circular reference will result in a :exc:`RecursionError` (or worse). " "Default ``True``." msgstr "" -#: ../../library/json.rst:189 +#: ../../library/json.rst:194 msgid "" "If ``False``, serialization of out-of-range :class:`float` values (``nan``, " "``inf``, ``-inf``) will result in a :exc:`ValueError`, in strict compliance " @@ -272,14 +280,14 @@ msgid "" "equivalents (``NaN``, ``Infinity``, ``-Infinity``) are used." msgstr "" -#: ../../library/json.rst:196 +#: ../../library/json.rst:201 msgid "" "If set, a custom JSON encoder with the :meth:`~JSONEncoder.default` method " "overridden, for serializing into custom datatypes. If ``None`` (the " "default), :class:`!JSONEncoder` is used." msgstr "" -#: ../../library/json.rst:203 +#: ../../library/json.rst:208 msgid "" "If a positive integer or string, JSON array elements and object members will " "be pretty-printed with that indent level. A positive integer indents that " @@ -288,7 +296,7 @@ msgid "" "inserted. If ``None`` (the default), the most compact representation is used." msgstr "" -#: ../../library/json.rst:213 +#: ../../library/json.rst:218 msgid "" "A two-tuple: ``(item_separator, key_separator)``. If ``None`` (the default), " "*separators* defaults to ``(', ', ': ')`` if *indent* is ``None``, and " @@ -296,39 +304,39 @@ msgid "" "to eliminate whitespace." msgstr "" -#: ../../library/json.rst:222 +#: ../../library/json.rst:227 msgid "" "A function that is called for objects that can't otherwise be serialized. It " "should return a JSON encodable version of the object or raise a :exc:" "`TypeError`. If ``None`` (the default), :exc:`!TypeError` is raised." msgstr "" -#: ../../library/json.rst:229 +#: ../../library/json.rst:234 msgid "" "If ``True``, dictionaries will be outputted sorted by key. Default ``False``." msgstr "" -#: ../../library/json.rst:233 ../../library/json.rst:518 +#: ../../library/json.rst:238 ../../library/json.rst:523 msgid "Allow strings for *indent* in addition to integers." msgstr "" -#: ../../library/json.rst:236 ../../library/json.rst:526 +#: ../../library/json.rst:241 ../../library/json.rst:531 msgid "Use ``(',', ': ')`` as default if *indent* is not ``None``." msgstr "" -#: ../../library/json.rst:239 ../../library/json.rst:338 +#: ../../library/json.rst:244 ../../library/json.rst:343 msgid "" "All optional parameters are now :ref:`keyword-only `." msgstr "" -#: ../../library/json.rst:248 +#: ../../library/json.rst:253 msgid "" "Serialize *obj* to a JSON formatted :class:`str` using this :ref:`conversion " "table `. The arguments have the same meaning as in :func:" "`dump`." msgstr "" -#: ../../library/json.rst:254 +#: ../../library/json.rst:259 msgid "" "Keys in key/value pairs of JSON are always of the type :class:`str`. When a " "dictionary is converted into JSON, all the keys of the dictionary are " @@ -337,44 +345,44 @@ msgid "" "original one. That is, ``loads(dumps(x)) != x`` if x has non-string keys." msgstr "" -#: ../../library/json.rst:265 +#: ../../library/json.rst:270 msgid "" "Deserialize *fp* to a Python object using the :ref:`JSON-to-Python " "conversion table `." msgstr "" -#: ../../library/json.rst:268 +#: ../../library/json.rst:273 msgid "" "A ``.read()``-supporting :term:`text file` or :term:`binary file` containing " "the JSON document to be deserialized." msgstr "" -#: ../../library/json.rst:273 +#: ../../library/json.rst:278 msgid "" "If set, a custom JSON decoder. Additional keyword arguments to :func:`!load` " "will be passed to the constructor of *cls*. If ``None`` (the default), :" "class:`!JSONDecoder` is used." msgstr "" -#: ../../library/json.rst:280 +#: ../../library/json.rst:285 msgid "" -"If set, a function that is called with the result of any object literal " +"If set, a function that is called with the result of any JSON object literal " "decoded (a :class:`dict`). The return value of this function will be used " "instead of the :class:`dict`. This feature can be used to implement custom " "decoders, for example `JSON-RPC `_ class hinting. " "Default ``None``." msgstr "" -#: ../../library/json.rst:290 +#: ../../library/json.rst:295 msgid "" -"If set, a function that is called with the result of any object literal " +"If set, a function that is called with the result of any JSON object literal " "decoded with an ordered list of pairs. The return value of this function " "will be used instead of the :class:`dict`. This feature can be used to " "implement custom decoders. If *object_hook* is also set, *object_pairs_hook* " "takes priority. Default ``None``." msgstr "" -#: ../../library/json.rst:300 +#: ../../library/json.rst:305 msgid "" "If set, a function that is called with the string of every JSON float to be " "decoded. If ``None`` (the default), it is equivalent to ``float(num_str)``. " @@ -382,7 +390,7 @@ msgid "" "class:`decimal.Decimal`." msgstr "" -#: ../../library/json.rst:308 +#: ../../library/json.rst:313 msgid "" "If set, a function that is called with the string of every JSON int to be " "decoded. If ``None`` (the default), it is equivalent to ``int(num_str)``. " @@ -390,7 +398,7 @@ msgid "" "class:`float`." msgstr "" -#: ../../library/json.rst:316 +#: ../../library/json.rst:321 msgid "" "If set, a function that is called with one of the following strings: ``'-" "Infinity'``, ``'Infinity'``, or ``'NaN'``. This can be used to raise an " @@ -401,38 +409,38 @@ msgstr "" msgid "Raises" msgstr "" -#: ../../library/json.rst:324 +#: ../../library/json.rst:329 msgid "When the data being deserialized is not a valid JSON document." msgstr "" -#: ../../library/json.rst:327 +#: ../../library/json.rst:332 msgid "" "When the data being deserialized does not contain UTF-8, UTF-16 or UTF-32 " "encoded data." msgstr "" -#: ../../library/json.rst:333 +#: ../../library/json.rst:338 msgid "Added the optional *object_pairs_hook* parameter." msgstr "" -#: ../../library/json.rst:334 +#: ../../library/json.rst:339 msgid "*parse_constant* doesn't get called on 'null', 'true', 'false' anymore." msgstr "" -#: ../../library/json.rst:339 +#: ../../library/json.rst:344 msgid "" "*fp* can now be a :term:`binary file`. The input encoding should be UTF-8, " "UTF-16 or UTF-32." msgstr "" -#: ../../library/json.rst:342 +#: ../../library/json.rst:347 msgid "" "The default *parse_int* of :func:`int` now limits the maximum length of the " "integer string via the interpreter's :ref:`integer string conversion length " "limitation ` to help avoid denial of service attacks." msgstr "" -#: ../../library/json.rst:350 +#: ../../library/json.rst:355 msgid "" "Identical to :func:`load`, but instead of a file-like object, deserialize " "*s* (a :class:`str`, :class:`bytes` or :class:`bytearray` instance " @@ -440,107 +448,107 @@ msgid "" "table `." msgstr "" -#: ../../library/json.rst:355 +#: ../../library/json.rst:360 msgid "" "*s* can now be of type :class:`bytes` or :class:`bytearray`. The input " "encoding should be UTF-8, UTF-16 or UTF-32." msgstr "" -#: ../../library/json.rst:359 +#: ../../library/json.rst:364 msgid "The keyword argument *encoding* has been removed." msgstr "" -#: ../../library/json.rst:364 +#: ../../library/json.rst:369 msgid "Encoders and Decoders" msgstr "" -#: ../../library/json.rst:368 +#: ../../library/json.rst:373 msgid "Simple JSON decoder." msgstr "" -#: ../../library/json.rst:370 +#: ../../library/json.rst:375 msgid "Performs the following translations in decoding by default:" msgstr "" -#: ../../library/json.rst:375 ../../library/json.rst:463 +#: ../../library/json.rst:380 ../../library/json.rst:468 msgid "JSON" msgstr "" -#: ../../library/json.rst:375 ../../library/json.rst:463 +#: ../../library/json.rst:380 ../../library/json.rst:468 msgid "Python" msgstr "" -#: ../../library/json.rst:377 ../../library/json.rst:465 +#: ../../library/json.rst:382 ../../library/json.rst:470 msgid "object" msgstr "" -#: ../../library/json.rst:377 ../../library/json.rst:465 +#: ../../library/json.rst:382 ../../library/json.rst:470 msgid "dict" msgstr "" -#: ../../library/json.rst:379 ../../library/json.rst:467 +#: ../../library/json.rst:384 ../../library/json.rst:472 msgid "array" msgstr "" -#: ../../library/json.rst:379 +#: ../../library/json.rst:384 msgid "list" msgstr "" -#: ../../library/json.rst:381 ../../library/json.rst:469 +#: ../../library/json.rst:386 ../../library/json.rst:474 msgid "string" msgstr "" -#: ../../library/json.rst:381 ../../library/json.rst:469 +#: ../../library/json.rst:386 ../../library/json.rst:474 msgid "str" msgstr "" -#: ../../library/json.rst:383 +#: ../../library/json.rst:388 msgid "number (int)" msgstr "" -#: ../../library/json.rst:383 +#: ../../library/json.rst:388 msgid "int" msgstr "" -#: ../../library/json.rst:385 +#: ../../library/json.rst:390 msgid "number (real)" msgstr "" -#: ../../library/json.rst:385 +#: ../../library/json.rst:390 msgid "float" msgstr "" -#: ../../library/json.rst:387 ../../library/json.rst:473 +#: ../../library/json.rst:392 ../../library/json.rst:478 msgid "true" msgstr "" -#: ../../library/json.rst:387 ../../library/json.rst:473 +#: ../../library/json.rst:392 ../../library/json.rst:478 msgid "True" msgstr "" -#: ../../library/json.rst:389 ../../library/json.rst:475 +#: ../../library/json.rst:394 ../../library/json.rst:480 msgid "false" msgstr "نادرست" -#: ../../library/json.rst:389 ../../library/json.rst:475 +#: ../../library/json.rst:394 ../../library/json.rst:480 msgid "False" msgstr "نادرست" -#: ../../library/json.rst:391 ../../library/json.rst:477 +#: ../../library/json.rst:396 ../../library/json.rst:482 msgid "null" msgstr "" -#: ../../library/json.rst:391 ../../library/json.rst:477 +#: ../../library/json.rst:396 ../../library/json.rst:482 msgid "None" msgstr "" -#: ../../library/json.rst:394 +#: ../../library/json.rst:399 msgid "" "It also understands ``NaN``, ``Infinity``, and ``-Infinity`` as their " "corresponding ``float`` values, which is outside the JSON spec." msgstr "" -#: ../../library/json.rst:397 +#: ../../library/json.rst:402 msgid "" "*object_hook* is an optional function that will be called with the result of " "every JSON object decoded and its return value will be used in place of the " @@ -548,7 +556,7 @@ msgid "" "g. to support `JSON-RPC `_ class hinting)." msgstr "" -#: ../../library/json.rst:402 +#: ../../library/json.rst:407 msgid "" "*object_pairs_hook* is an optional function that will be called with the " "result of every JSON object decoded with an ordered list of pairs. The " @@ -557,11 +565,11 @@ msgid "" "*object_hook* is also defined, the *object_pairs_hook* takes priority." msgstr "" -#: ../../library/json.rst:408 +#: ../../library/json.rst:413 msgid "Added support for *object_pairs_hook*." msgstr "" -#: ../../library/json.rst:411 +#: ../../library/json.rst:416 msgid "" "*parse_float* is an optional function that will be called with the string of " "every JSON float to be decoded. By default, this is equivalent to " @@ -569,7 +577,7 @@ msgid "" "JSON floats (e.g. :class:`decimal.Decimal`)." msgstr "" -#: ../../library/json.rst:416 +#: ../../library/json.rst:421 msgid "" "*parse_int* is an optional function that will be called with the string of " "every JSON int to be decoded. By default, this is equivalent to " @@ -577,14 +585,14 @@ msgid "" "JSON integers (e.g. :class:`float`)." msgstr "" -#: ../../library/json.rst:421 +#: ../../library/json.rst:426 msgid "" "*parse_constant* is an optional function that will be called with one of the " "following strings: ``'-Infinity'``, ``'Infinity'``, ``'NaN'``. This can be " "used to raise an exception if invalid JSON numbers are encountered." msgstr "" -#: ../../library/json.rst:425 +#: ../../library/json.rst:430 msgid "" "If *strict* is false (``True`` is the default), then control characters will " "be allowed inside strings. Control characters in this context are those " @@ -592,66 +600,66 @@ msgid "" "``'\\n'``, ``'\\r'`` and ``'\\0'``." msgstr "" -#: ../../library/json.rst:430 +#: ../../library/json.rst:435 msgid "" "If the data being deserialized is not a valid JSON document, a :exc:" "`JSONDecodeError` will be raised." msgstr "" -#: ../../library/json.rst:433 ../../library/json.rst:534 +#: ../../library/json.rst:438 ../../library/json.rst:539 msgid "All parameters are now :ref:`keyword-only `." msgstr "" -#: ../../library/json.rst:438 +#: ../../library/json.rst:443 msgid "" "Return the Python representation of *s* (a :class:`str` instance containing " "a JSON document)." msgstr "" -#: ../../library/json.rst:441 +#: ../../library/json.rst:446 msgid "" ":exc:`JSONDecodeError` will be raised if the given JSON document is not " "valid." msgstr "" -#: ../../library/json.rst:446 +#: ../../library/json.rst:451 msgid "" "Decode a JSON document from *s* (a :class:`str` beginning with a JSON " "document) and return a 2-tuple of the Python representation and the index in " "*s* where the document ended." msgstr "" -#: ../../library/json.rst:450 +#: ../../library/json.rst:455 msgid "" "This can be used to decode a JSON document from a string that may have " "extraneous data at the end." msgstr "" -#: ../../library/json.rst:456 +#: ../../library/json.rst:461 msgid "Extensible JSON encoder for Python data structures." msgstr "" -#: ../../library/json.rst:458 +#: ../../library/json.rst:463 msgid "Supports the following objects and types by default:" msgstr "" -#: ../../library/json.rst:467 +#: ../../library/json.rst:472 msgid "list, tuple" msgstr "" -#: ../../library/json.rst:471 +#: ../../library/json.rst:476 msgid "int, float, int- & float-derived Enums" msgstr "" -#: ../../library/json.rst:471 +#: ../../library/json.rst:476 msgid "number" msgstr "" -#: ../../library/json.rst:480 +#: ../../library/json.rst:485 msgid "Added support for int- and float-derived Enum classes." msgstr "" -#: ../../library/json.rst:483 +#: ../../library/json.rst:488 msgid "" "To extend this to recognize other objects, subclass and implement a :meth:" "`~JSONEncoder.default` method with another method that returns a " @@ -659,7 +667,7 @@ msgid "" "superclass implementation (to raise :exc:`TypeError`)." msgstr "" -#: ../../library/json.rst:488 +#: ../../library/json.rst:493 msgid "" "If *skipkeys* is false (the default), a :exc:`TypeError` will be raised when " "trying to encode keys that are not :class:`str`, :class:`int`, :class:" @@ -667,14 +675,14 @@ msgid "" "simply skipped." msgstr "" -#: ../../library/json.rst:492 +#: ../../library/json.rst:497 msgid "" "If *ensure_ascii* is true (the default), the output is guaranteed to have " "all incoming non-ASCII characters escaped. If *ensure_ascii* is false, " "these characters will be output as-is." msgstr "" -#: ../../library/json.rst:496 +#: ../../library/json.rst:501 msgid "" "If *check_circular* is true (the default), then lists, dicts, and custom " "encoded objects will be checked for circular references during encoding to " @@ -682,7 +690,7 @@ msgid "" "Otherwise, no such check takes place." msgstr "" -#: ../../library/json.rst:501 +#: ../../library/json.rst:506 msgid "" "If *allow_nan* is true (the default), then ``NaN``, ``Infinity``, and ``-" "Infinity`` will be encoded as such. This behavior is not JSON specification " @@ -690,14 +698,14 @@ msgid "" "decoders. Otherwise, it will be a :exc:`ValueError` to encode such floats." msgstr "" -#: ../../library/json.rst:507 +#: ../../library/json.rst:512 msgid "" "If *sort_keys* is true (default: ``False``), then the output of dictionaries " "will be sorted by key; this is useful for regression tests to ensure that " "JSON serializations can be compared on a day-to-day basis." msgstr "" -#: ../../library/json.rst:511 +#: ../../library/json.rst:516 msgid "" "If *indent* is a non-negative integer or string, then JSON array elements " "and object members will be pretty-printed with that indent level. An indent " @@ -707,7 +715,7 @@ msgid "" "``\"\\t\"``), that string is used to indent each level." msgstr "" -#: ../../library/json.rst:521 +#: ../../library/json.rst:526 msgid "" "If specified, *separators* should be an ``(item_separator, key_separator)`` " "tuple. The default is ``(', ', ': ')`` if *indent* is ``None`` and ``(',', " @@ -715,7 +723,7 @@ msgid "" "specify ``(',', ':')`` to eliminate whitespace." msgstr "" -#: ../../library/json.rst:529 +#: ../../library/json.rst:534 msgid "" "If specified, *default* should be a function that gets called for objects " "that can't otherwise be serialized. It should return a JSON encodable " @@ -723,20 +731,20 @@ msgid "" "`TypeError` is raised." msgstr "" -#: ../../library/json.rst:540 +#: ../../library/json.rst:545 msgid "" "Implement this method in a subclass such that it returns a serializable " "object for *o*, or calls the base implementation (to raise a :exc:" "`TypeError`)." msgstr "" -#: ../../library/json.rst:544 +#: ../../library/json.rst:549 msgid "" "For example, to support arbitrary iterators, you could implement :meth:" "`~JSONEncoder.default` like this::" msgstr "" -#: ../../library/json.rst:547 +#: ../../library/json.rst:552 msgid "" "def default(self, o):\n" " try:\n" @@ -749,63 +757,63 @@ msgid "" " return super().default(o)" msgstr "" -#: ../../library/json.rst:560 +#: ../../library/json.rst:565 msgid "" "Return a JSON string representation of a Python data structure, *o*. For " "example::" msgstr "" -#: ../../library/json.rst:563 +#: ../../library/json.rst:568 msgid "" ">>> json.JSONEncoder().encode({\"foo\": [\"bar\", \"baz\"]})\n" "'{\"foo\": [\"bar\", \"baz\"]}'" msgstr "" -#: ../../library/json.rst:569 +#: ../../library/json.rst:574 msgid "" "Encode the given object, *o*, and yield each string representation as " "available. For example::" msgstr "" -#: ../../library/json.rst:572 +#: ../../library/json.rst:577 msgid "" "for chunk in json.JSONEncoder().iterencode(bigobject):\n" " mysocket.write(chunk)" msgstr "" -#: ../../library/json.rst:577 +#: ../../library/json.rst:582 msgid "Exceptions" msgstr "" -#: ../../library/json.rst:581 +#: ../../library/json.rst:586 msgid "Subclass of :exc:`ValueError` with the following additional attributes:" msgstr "" -#: ../../library/json.rst:585 +#: ../../library/json.rst:590 msgid "The unformatted error message." msgstr "" -#: ../../library/json.rst:589 +#: ../../library/json.rst:594 msgid "The JSON document being parsed." msgstr "" -#: ../../library/json.rst:593 +#: ../../library/json.rst:598 msgid "The start index of *doc* where parsing failed." msgstr "" -#: ../../library/json.rst:597 +#: ../../library/json.rst:602 msgid "The line corresponding to *pos*." msgstr "" -#: ../../library/json.rst:601 +#: ../../library/json.rst:606 msgid "The column corresponding to *pos*." msgstr "" -#: ../../library/json.rst:607 +#: ../../library/json.rst:612 msgid "Standard Compliance and Interoperability" msgstr "" -#: ../../library/json.rst:609 +#: ../../library/json.rst:614 msgid "" "The JSON format is specified by :rfc:`7159` and by `ECMA-404 `_. This " @@ -814,48 +822,48 @@ msgid "" "parameters other than those explicitly mentioned, are not considered." msgstr "" -#: ../../library/json.rst:615 +#: ../../library/json.rst:620 msgid "" "This module does not comply with the RFC in a strict fashion, implementing " "some extensions that are valid JavaScript but not valid JSON. In particular:" msgstr "" -#: ../../library/json.rst:618 +#: ../../library/json.rst:623 msgid "Infinite and NaN number values are accepted and output;" msgstr "" -#: ../../library/json.rst:619 +#: ../../library/json.rst:624 msgid "" "Repeated names within an object are accepted, and only the value of the last " "name-value pair is used." msgstr "" -#: ../../library/json.rst:622 +#: ../../library/json.rst:627 msgid "" "Since the RFC permits RFC-compliant parsers to accept input texts that are " "not RFC-compliant, this module's deserializer is technically RFC-compliant " "under default settings." msgstr "" -#: ../../library/json.rst:627 +#: ../../library/json.rst:632 msgid "Character Encodings" msgstr "" -#: ../../library/json.rst:629 +#: ../../library/json.rst:634 msgid "" "The RFC requires that JSON be represented using either UTF-8, UTF-16, or " "UTF-32, with UTF-8 being the recommended default for maximum " "interoperability." msgstr "" -#: ../../library/json.rst:632 +#: ../../library/json.rst:637 msgid "" "As permitted, though not required, by the RFC, this module's serializer sets " "*ensure_ascii=True* by default, thus escaping the output so that the " "resulting strings only contain ASCII characters." msgstr "" -#: ../../library/json.rst:636 +#: ../../library/json.rst:641 msgid "" "Other than the *ensure_ascii* parameter, this module is defined strictly in " "terms of conversion between Python objects and :class:`Unicode strings " @@ -863,7 +871,7 @@ msgid "" "encodings." msgstr "" -#: ../../library/json.rst:641 +#: ../../library/json.rst:646 msgid "" "The RFC prohibits adding a byte order mark (BOM) to the start of a JSON " "text, and this module's serializer does not add a BOM to its output. The RFC " @@ -872,7 +880,7 @@ msgid "" "an initial BOM is present." msgstr "" -#: ../../library/json.rst:647 +#: ../../library/json.rst:652 msgid "" "The RFC does not explicitly forbid JSON strings which contain byte sequences " "that don't correspond to valid Unicode characters (e.g. unpaired UTF-16 " @@ -881,18 +889,18 @@ msgid "" "class:`str`) code points for such sequences." msgstr "" -#: ../../library/json.rst:655 +#: ../../library/json.rst:660 msgid "Infinite and NaN Number Values" msgstr "" -#: ../../library/json.rst:657 +#: ../../library/json.rst:662 msgid "" "The RFC does not permit the representation of infinite or NaN number values. " "Despite that, by default, this module accepts and outputs ``Infinity``, ``-" "Infinity``, and ``NaN`` as if they were valid JSON number literal values::" msgstr "" -#: ../../library/json.rst:661 +#: ../../library/json.rst:666 msgid "" ">>> # Neither of these calls raises an exception, but the results are not " "valid JSON\n" @@ -907,18 +915,18 @@ msgid "" "nan" msgstr "" -#: ../../library/json.rst:672 +#: ../../library/json.rst:677 msgid "" "In the serializer, the *allow_nan* parameter can be used to alter this " "behavior. In the deserializer, the *parse_constant* parameter can be used " "to alter this behavior." msgstr "" -#: ../../library/json.rst:678 +#: ../../library/json.rst:683 msgid "Repeated Names Within an Object" msgstr "" -#: ../../library/json.rst:680 +#: ../../library/json.rst:685 msgid "" "The RFC specifies that the names within a JSON object should be unique, but " "does not mandate how repeated names in JSON objects should be handled. By " @@ -926,22 +934,22 @@ msgid "" "but the last name-value pair for a given name::" msgstr "" -#: ../../library/json.rst:685 +#: ../../library/json.rst:690 msgid "" ">>> weird_json = '{\"x\": 1, \"x\": 2, \"x\": 3}'\n" ">>> json.loads(weird_json)\n" "{'x': 3}" msgstr "" -#: ../../library/json.rst:689 +#: ../../library/json.rst:694 msgid "The *object_pairs_hook* parameter can be used to alter this behavior." msgstr "" -#: ../../library/json.rst:693 +#: ../../library/json.rst:698 msgid "Top-level Non-Object, Non-Array Values" msgstr "" -#: ../../library/json.rst:695 +#: ../../library/json.rst:700 msgid "" "The old version of JSON specified by the obsolete :rfc:`4627` required that " "the top-level value of a JSON text must be either a JSON object or array " @@ -951,43 +959,43 @@ msgid "" "its serializer or its deserializer." msgstr "" -#: ../../library/json.rst:702 +#: ../../library/json.rst:707 msgid "" "Regardless, for maximum interoperability, you may wish to voluntarily adhere " "to the restriction yourself." msgstr "" -#: ../../library/json.rst:707 +#: ../../library/json.rst:712 msgid "Implementation Limitations" msgstr "" -#: ../../library/json.rst:709 +#: ../../library/json.rst:714 msgid "Some JSON deserializer implementations may set limits on:" msgstr "" -#: ../../library/json.rst:711 +#: ../../library/json.rst:716 msgid "the size of accepted JSON texts" msgstr "" -#: ../../library/json.rst:712 +#: ../../library/json.rst:717 msgid "the maximum level of nesting of JSON objects and arrays" msgstr "" -#: ../../library/json.rst:713 +#: ../../library/json.rst:718 msgid "the range and precision of JSON numbers" msgstr "" -#: ../../library/json.rst:714 +#: ../../library/json.rst:719 msgid "the content and maximum length of JSON strings" msgstr "" -#: ../../library/json.rst:716 +#: ../../library/json.rst:721 msgid "" "This module does not impose any such limits beyond those of the relevant " "Python datatypes themselves or the Python interpreter itself." msgstr "" -#: ../../library/json.rst:719 +#: ../../library/json.rst:724 msgid "" "When serializing to JSON, beware any such limitations in applications that " "may consume your JSON. In particular, it is common for JSON numbers to be " @@ -998,28 +1006,28 @@ msgid "" "as :class:`decimal.Decimal`." msgstr "" -#: ../../library/json.rst:732 +#: ../../library/json.rst:737 msgid "Command-line interface" msgstr "" -#: ../../library/json.rst:737 +#: ../../library/json.rst:742 msgid "**Source code:** :source:`Lib/json/tool.py`" msgstr "" -#: ../../library/json.rst:741 +#: ../../library/json.rst:746 msgid "" "The :mod:`json` module can be invoked as a script via ``python -m json`` to " "validate and pretty-print JSON objects. The :mod:`json.tool` submodule " "implements this interface." msgstr "" -#: ../../library/json.rst:745 +#: ../../library/json.rst:750 msgid "" "If the optional ``infile`` and ``outfile`` arguments are not specified, :" "data:`sys.stdin` and :data:`sys.stdout` will be used respectively:" msgstr "" -#: ../../library/json.rst:748 +#: ../../library/json.rst:753 msgid "" "$ echo '{\"json\": \"obj\"}' | python -m json\n" "{\n" @@ -1029,28 +1037,28 @@ msgid "" "Expecting property name enclosed in double quotes: line 1 column 2 (char 1)" msgstr "" -#: ../../library/json.rst:757 +#: ../../library/json.rst:762 msgid "" "The output is now in the same order as the input. Use the :option:`--sort-" "keys` option to sort the output of dictionaries alphabetically by key." msgstr "" -#: ../../library/json.rst:762 +#: ../../library/json.rst:767 msgid "" "The :mod:`json` module may now be directly executed as ``python -m json``. " "For backwards compatibility, invoking the CLI as ``python -m json.tool`` " "remains supported." msgstr "" -#: ../../library/json.rst:769 +#: ../../library/json.rst:774 msgid "Command-line options" msgstr "" -#: ../../library/json.rst:773 +#: ../../library/json.rst:778 msgid "The JSON file to be validated or pretty-printed:" msgstr "" -#: ../../library/json.rst:775 +#: ../../library/json.rst:780 msgid "" "$ python -m json mp_films.json\n" "[\n" @@ -1065,43 +1073,43 @@ msgid "" "]" msgstr "" -#: ../../library/json.rst:789 +#: ../../library/json.rst:794 msgid "If *infile* is not specified, read from :data:`sys.stdin`." msgstr "" -#: ../../library/json.rst:793 +#: ../../library/json.rst:798 msgid "" "Write the output of the *infile* to the given *outfile*. Otherwise, write it " "to :data:`sys.stdout`." msgstr "" -#: ../../library/json.rst:798 +#: ../../library/json.rst:803 msgid "Sort the output of dictionaries alphabetically by key." msgstr "" -#: ../../library/json.rst:804 +#: ../../library/json.rst:809 msgid "" "Disable escaping of non-ascii characters, see :func:`json.dumps` for more " "information." msgstr "" -#: ../../library/json.rst:810 +#: ../../library/json.rst:815 msgid "Parse every input line as separate JSON object." msgstr "" -#: ../../library/json.rst:816 +#: ../../library/json.rst:821 msgid "Mutually exclusive options for whitespace control." msgstr "" -#: ../../library/json.rst:822 +#: ../../library/json.rst:827 msgid "Show the help message." msgstr "" -#: ../../library/json.rst:826 +#: ../../library/json.rst:831 msgid "Footnotes" msgstr "" -#: ../../library/json.rst:827 +#: ../../library/json.rst:832 msgid "" "As noted in `the errata for RFC 7159 `_, JSON permits literal U+2028 (LINE SEPARATOR) " diff --git a/library/keyword.po b/library/keyword.po index 199d57f54..755bb4ba7 100644 --- a/library/keyword.po +++ b/library/keyword.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:08+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/language.po b/library/language.po index 1398dff20..3df6454ed 100644 --- a/library/language.po +++ b/library/language.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:08+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/linecache.po b/library/linecache.po index ae003f857..ad660a6ed 100644 --- a/library/linecache.po +++ b/library/linecache.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:08+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/locale.po b/library/locale.po index 71c0b0fca..7a234e7a7 100644 --- a/library/locale.po +++ b/library/locale.po @@ -5,15 +5,17 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 +# Gigahertz ., 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:08+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Gigahertz ., 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/logging.config.po b/library/logging.config.po index 5d2d1b05e..ee6ee584c 100644 --- a/library/logging.config.po +++ b/library/logging.config.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:09+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -770,10 +771,10 @@ msgstr "" #: ../../library/logging.config.rst:551 msgid "" -"You can also specify a special key ``'.'`` whose value is a dictionary is a " -"mapping of attribute names to values. If found, the specified attributes " -"will be set on the user-defined object before it is returned. Thus, with the " -"following configuration::" +"You can also specify a special key ``'.'`` whose value is a mapping of " +"attribute names to values. If found, the specified attributes will be set on " +"the user-defined object before it is returned. Thus, with the following " +"configuration::" msgstr "" #: ../../library/logging.config.rst:556 @@ -818,7 +819,7 @@ msgid "" "handler has been configured) it points to the configured handler instance. " "Thus, ``cfg://handlers.foo`` could resolve to either a dictionary or a " "handler instance. In general, it is wise to name handlers in a way such that " -"dependent handlers are configured _after_ any handlers they depend on; that " +"dependent handlers are configured *after* any handlers they depend on; that " "allows something like ``cfg://handlers.foo`` to be used in configuring a " "handler that depends on handler ``foo``. If that dependent handler were " "named ``bar``, problems would result, because the configuration of ``bar`` " diff --git a/library/logging.handlers.po b/library/logging.handlers.po index ac6c1d80c..8e7d0def9 100644 --- a/library/logging.handlers.po +++ b/library/logging.handlers.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:09+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -152,7 +153,7 @@ msgstr "" #: ../../library/logging.handlers.rst:105 #: ../../library/logging.handlers.rst:190 #: ../../library/logging.handlers.rst:338 -#: ../../library/logging.handlers.rst:444 +#: ../../library/logging.handlers.rst:448 msgid "" "As well as string values, :class:`~pathlib.Path` objects are also accepted " "for the *filename* argument." @@ -161,7 +162,7 @@ msgstr "" #: ../../library/logging.handlers.rst:109 #: ../../library/logging.handlers.rst:194 #: ../../library/logging.handlers.rst:342 -#: ../../library/logging.handlers.rst:448 +#: ../../library/logging.handlers.rst:452 msgid "The *errors* parameter was added." msgstr "" @@ -424,7 +425,7 @@ msgid "" msgstr "" #: ../../library/logging.handlers.rst:347 -#: ../../library/logging.handlers.rst:453 +#: ../../library/logging.handlers.rst:457 msgid "Does a rollover, as described above." msgstr "" @@ -434,18 +435,24 @@ msgid "" "previously." msgstr "" -#: ../../library/logging.handlers.rst:358 +#: ../../library/logging.handlers.rst:357 +msgid "" +"See if the supplied record would cause the file to exceed the configured " +"size limit." +msgstr "" + +#: ../../library/logging.handlers.rst:362 msgid "TimedRotatingFileHandler" msgstr "" -#: ../../library/logging.handlers.rst:360 +#: ../../library/logging.handlers.rst:364 msgid "" "The :class:`TimedRotatingFileHandler` class, located in the :mod:`logging." "handlers` module, supports rotation of disk log files at certain timed " "intervals." msgstr "" -#: ../../library/logging.handlers.rst:367 +#: ../../library/logging.handlers.rst:371 msgid "" "Returns a new instance of the :class:`TimedRotatingFileHandler` class. The " "specified file is opened and used as the stream for logging. On rotating it " @@ -453,92 +460,92 @@ msgid "" "*when* and *interval*." msgstr "" -#: ../../library/logging.handlers.rst:372 +#: ../../library/logging.handlers.rst:376 msgid "" "You can use the *when* to specify the type of *interval*. The list of " "possible values is below. Note that they are not case sensitive." msgstr "" -#: ../../library/logging.handlers.rst:376 +#: ../../library/logging.handlers.rst:380 msgid "Value" msgstr "" -#: ../../library/logging.handlers.rst:376 +#: ../../library/logging.handlers.rst:380 msgid "Type of interval" msgstr "" -#: ../../library/logging.handlers.rst:376 +#: ../../library/logging.handlers.rst:380 msgid "If/how *atTime* is used" msgstr "" -#: ../../library/logging.handlers.rst:378 +#: ../../library/logging.handlers.rst:382 msgid "``'S'``" msgstr "" -#: ../../library/logging.handlers.rst:378 +#: ../../library/logging.handlers.rst:382 msgid "Seconds" msgstr "" -#: ../../library/logging.handlers.rst:378 -#: ../../library/logging.handlers.rst:380 #: ../../library/logging.handlers.rst:382 #: ../../library/logging.handlers.rst:384 +#: ../../library/logging.handlers.rst:386 +#: ../../library/logging.handlers.rst:388 msgid "Ignored" msgstr "" -#: ../../library/logging.handlers.rst:380 +#: ../../library/logging.handlers.rst:384 msgid "``'M'``" msgstr "" -#: ../../library/logging.handlers.rst:380 +#: ../../library/logging.handlers.rst:384 msgid "Minutes" msgstr "" -#: ../../library/logging.handlers.rst:382 +#: ../../library/logging.handlers.rst:386 msgid "``'H'``" msgstr "" -#: ../../library/logging.handlers.rst:382 +#: ../../library/logging.handlers.rst:386 msgid "Hours" msgstr "" -#: ../../library/logging.handlers.rst:384 +#: ../../library/logging.handlers.rst:388 msgid "``'D'``" msgstr "" -#: ../../library/logging.handlers.rst:384 +#: ../../library/logging.handlers.rst:388 msgid "Days" msgstr "" -#: ../../library/logging.handlers.rst:386 +#: ../../library/logging.handlers.rst:390 msgid "``'W0'-'W6'``" msgstr "" -#: ../../library/logging.handlers.rst:386 +#: ../../library/logging.handlers.rst:390 msgid "Weekday (0=Monday)" msgstr "" -#: ../../library/logging.handlers.rst:386 -#: ../../library/logging.handlers.rst:389 +#: ../../library/logging.handlers.rst:390 +#: ../../library/logging.handlers.rst:393 msgid "Used to compute initial rollover time" msgstr "" -#: ../../library/logging.handlers.rst:389 +#: ../../library/logging.handlers.rst:393 msgid "``'midnight'``" msgstr "" -#: ../../library/logging.handlers.rst:389 +#: ../../library/logging.handlers.rst:393 msgid "Roll over at midnight, if *atTime* not specified, else at time *atTime*" msgstr "" -#: ../../library/logging.handlers.rst:394 +#: ../../library/logging.handlers.rst:398 msgid "" "When using weekday-based rotation, specify 'W0' for Monday, 'W1' for " "Tuesday, and so on up to 'W6' for Sunday. In this case, the value passed for " "*interval* isn't used." msgstr "" -#: ../../library/logging.handlers.rst:398 +#: ../../library/logging.handlers.rst:402 msgid "" "The system will save old log files by appending extensions to the filename. " "The extensions are date-and-time based, using the strftime format ``%Y-%m-" @@ -546,20 +553,20 @@ msgid "" "interval." msgstr "" -#: ../../library/logging.handlers.rst:403 +#: ../../library/logging.handlers.rst:407 msgid "" "When computing the next rollover time for the first time (when the handler " "is created), the last modification time of an existing log file, or else the " "current time, is used to compute when the next rotation will occur." msgstr "" -#: ../../library/logging.handlers.rst:407 +#: ../../library/logging.handlers.rst:411 msgid "" "If the *utc* argument is true, times in UTC will be used; otherwise local " "time is used." msgstr "" -#: ../../library/logging.handlers.rst:410 +#: ../../library/logging.handlers.rst:414 msgid "" "If *backupCount* is nonzero, at most *backupCount* files will be kept, and " "if more would be created when rollover occurs, the oldest one is deleted. " @@ -567,13 +574,13 @@ msgid "" "changing the interval may leave old files lying around." msgstr "" -#: ../../library/logging.handlers.rst:415 +#: ../../library/logging.handlers.rst:419 msgid "" "If *delay* is true, then file opening is deferred until the first call to :" "meth:`emit`." msgstr "" -#: ../../library/logging.handlers.rst:418 +#: ../../library/logging.handlers.rst:422 msgid "" "If *atTime* is not ``None``, it must be a ``datetime.time`` instance which " "specifies the time of day when rollover occurs, for the cases where rollover " @@ -583,13 +590,13 @@ msgid "" "normal interval calculation." msgstr "" -#: ../../library/logging.handlers.rst:425 +#: ../../library/logging.handlers.rst:429 msgid "" "If *errors* is specified, it's used to determine how encoding errors are " "handled." msgstr "" -#: ../../library/logging.handlers.rst:428 +#: ../../library/logging.handlers.rst:432 msgid "" "Calculation of the initial rollover time is done when the handler is " "initialised. Calculation of subsequent rollover times is done only when " @@ -604,51 +611,56 @@ msgid "" "to the minutes where no output (and hence no rollover) occurred." msgstr "" -#: ../../library/logging.handlers.rst:441 +#: ../../library/logging.handlers.rst:445 msgid "*atTime* parameter was added." msgstr "" -#: ../../library/logging.handlers.rst:457 +#: ../../library/logging.handlers.rst:461 msgid "" "Outputs the record to the file, catering for rollover as described above." msgstr "" -#: ../../library/logging.handlers.rst:461 +#: ../../library/logging.handlers.rst:465 msgid "" "Returns a list of filenames which should be deleted as part of rollover. " -"These are the absolute paths of the oldest backup log files written by the " -"handler." +"These" +msgstr "" + +#: ../../library/logging.handlers.rst:469 +msgid "" +"See if enough time has passed for a rollover to occur and if it has, compute " +"the next rollover time." msgstr "" -#: ../../library/logging.handlers.rst:467 +#: ../../library/logging.handlers.rst:475 msgid "SocketHandler" msgstr "" -#: ../../library/logging.handlers.rst:469 +#: ../../library/logging.handlers.rst:477 msgid "" "The :class:`SocketHandler` class, located in the :mod:`logging.handlers` " "module, sends logging output to a network socket. The base class uses a TCP " "socket." msgstr "" -#: ../../library/logging.handlers.rst:475 +#: ../../library/logging.handlers.rst:483 msgid "" "Returns a new instance of the :class:`SocketHandler` class intended to " "communicate with a remote machine whose address is given by *host* and " "*port*." msgstr "" -#: ../../library/logging.handlers.rst:478 +#: ../../library/logging.handlers.rst:486 msgid "" "If ``port`` is specified as ``None``, a Unix domain socket is created using " "the value in ``host`` - otherwise, a TCP socket is created." msgstr "" -#: ../../library/logging.handlers.rst:484 +#: ../../library/logging.handlers.rst:492 msgid "Closes the socket." msgstr "" -#: ../../library/logging.handlers.rst:489 +#: ../../library/logging.handlers.rst:497 msgid "" "Pickles the record's attribute dictionary and writes it to the socket in " "binary format. If there is an error with the socket, silently drops the " @@ -657,35 +669,35 @@ msgid "" "`~logging.LogRecord`, use the :func:`~logging.makeLogRecord` function." msgstr "" -#: ../../library/logging.handlers.rst:499 +#: ../../library/logging.handlers.rst:507 msgid "" "Handles an error which has occurred during :meth:`emit`. The most likely " "cause is a lost connection. Closes the socket so that we can retry on the " "next event." msgstr "" -#: ../../library/logging.handlers.rst:506 +#: ../../library/logging.handlers.rst:514 msgid "" "This is a factory method which allows subclasses to define the precise type " "of socket they want. The default implementation creates a TCP socket (:const:" "`socket.SOCK_STREAM`)." msgstr "" -#: ../../library/logging.handlers.rst:513 +#: ../../library/logging.handlers.rst:521 msgid "" "Pickles the record's attribute dictionary in binary format with a length " "prefix, and returns it ready for transmission across the socket. The details " "of this operation are equivalent to::" msgstr "" -#: ../../library/logging.handlers.rst:517 +#: ../../library/logging.handlers.rst:525 msgid "" "data = pickle.dumps(record_attr_dict, 1)\n" "datalen = struct.pack('>L', len(data))\n" "return datalen + data" msgstr "" -#: ../../library/logging.handlers.rst:521 +#: ../../library/logging.handlers.rst:529 msgid "" "Note that pickles aren't completely secure. If you are concerned about " "security, you may want to override this method to implement a more secure " @@ -694,20 +706,20 @@ msgid "" "objects on the receiving end." msgstr "" -#: ../../library/logging.handlers.rst:530 +#: ../../library/logging.handlers.rst:538 msgid "" "Send a pickled byte-string *packet* to the socket. The format of the sent " "byte-string is as described in the documentation for :meth:`~SocketHandler." "makePickle`." msgstr "" -#: ../../library/logging.handlers.rst:534 +#: ../../library/logging.handlers.rst:542 msgid "" "This function allows for partial sends, which can happen when the network is " "busy." msgstr "" -#: ../../library/logging.handlers.rst:540 +#: ../../library/logging.handlers.rst:548 msgid "" "Tries to create a socket; on failure, uses an exponential back-off " "algorithm. On initial failure, the handler will drop the message it was " @@ -718,23 +730,23 @@ msgid "" "each time up to a maximum of 30 seconds." msgstr "" -#: ../../library/logging.handlers.rst:548 +#: ../../library/logging.handlers.rst:556 msgid "This behaviour is controlled by the following handler attributes:" msgstr "" -#: ../../library/logging.handlers.rst:550 +#: ../../library/logging.handlers.rst:558 msgid "``retryStart`` (initial delay, defaulting to 1.0 seconds)." msgstr "" -#: ../../library/logging.handlers.rst:551 +#: ../../library/logging.handlers.rst:559 msgid "``retryFactor`` (multiplier, defaulting to 2.0)." msgstr "" -#: ../../library/logging.handlers.rst:552 +#: ../../library/logging.handlers.rst:560 msgid "``retryMax`` (maximum delay, defaulting to 30.0 seconds)." msgstr "" -#: ../../library/logging.handlers.rst:554 +#: ../../library/logging.handlers.rst:562 msgid "" "This means that if the remote listener starts up *after* the handler has " "been used, you could lose messages (since the handler won't even attempt a " @@ -742,25 +754,25 @@ msgid "" "during the delay period)." msgstr "" -#: ../../library/logging.handlers.rst:563 +#: ../../library/logging.handlers.rst:571 msgid "DatagramHandler" msgstr "" -#: ../../library/logging.handlers.rst:565 +#: ../../library/logging.handlers.rst:573 msgid "" "The :class:`DatagramHandler` class, located in the :mod:`logging.handlers` " "module, inherits from :class:`SocketHandler` to support sending logging " "messages over UDP sockets." msgstr "" -#: ../../library/logging.handlers.rst:572 +#: ../../library/logging.handlers.rst:580 msgid "" "Returns a new instance of the :class:`DatagramHandler` class intended to " "communicate with a remote machine whose address is given by *host* and " "*port*." msgstr "" -#: ../../library/logging.handlers.rst:575 +#: ../../library/logging.handlers.rst:583 msgid "" "As UDP is not a streaming protocol, there is no persistent connection " "between an instance of this handler and *host*. For this reason, when using " @@ -770,13 +782,13 @@ msgid "" "looked-up IP address rather than the hostname." msgstr "" -#: ../../library/logging.handlers.rst:582 +#: ../../library/logging.handlers.rst:590 msgid "" "If ``port`` is specified as ``None``, a Unix domain socket is created using " "the value in ``host`` - otherwise, a UDP socket is created." msgstr "" -#: ../../library/logging.handlers.rst:588 +#: ../../library/logging.handlers.rst:596 msgid "" "Pickles the record's attribute dictionary and writes it to the socket in " "binary format. If there is an error with the socket, silently drops the " @@ -784,29 +796,29 @@ msgid "" "LogRecord`, use the :func:`~logging.makeLogRecord` function." msgstr "" -#: ../../library/logging.handlers.rst:597 +#: ../../library/logging.handlers.rst:605 msgid "" "The factory method of :class:`SocketHandler` is here overridden to create a " "UDP socket (:const:`socket.SOCK_DGRAM`)." msgstr "" -#: ../../library/logging.handlers.rst:603 +#: ../../library/logging.handlers.rst:611 msgid "" "Send a pickled byte-string to a socket. The format of the sent byte-string " "is as described in the documentation for :meth:`SocketHandler.makePickle`." msgstr "" -#: ../../library/logging.handlers.rst:610 +#: ../../library/logging.handlers.rst:618 msgid "SysLogHandler" msgstr "" -#: ../../library/logging.handlers.rst:612 +#: ../../library/logging.handlers.rst:620 msgid "" "The :class:`SysLogHandler` class, located in the :mod:`logging.handlers` " "module, supports sending logging messages to a remote or local Unix syslog." msgstr "" -#: ../../library/logging.handlers.rst:618 +#: ../../library/logging.handlers.rst:626 msgid "" "Returns a new instance of the :class:`SysLogHandler` class intended to " "communicate with a remote Unix machine whose address is given by *address* " @@ -825,7 +837,7 @@ msgid "" "applied." msgstr "" -#: ../../library/logging.handlers.rst:635 +#: ../../library/logging.handlers.rst:643 msgid "" "Note that if your server is not listening on UDP port 514, :class:" "`SysLogHandler` may appear not to work. In that case, check what address you " @@ -836,30 +848,30 @@ msgid "" "platforms). On Windows, you pretty much have to use the UDP option." msgstr "" -#: ../../library/logging.handlers.rst:644 +#: ../../library/logging.handlers.rst:652 msgid "" "On macOS 12.x (Monterey), Apple has changed the behaviour of their syslog " "daemon - it no longer listens on a domain socket. Therefore, you cannot " "expect :class:`SysLogHandler` to work on this system." msgstr "" -#: ../../library/logging.handlers.rst:648 +#: ../../library/logging.handlers.rst:656 msgid "See :gh:`91070` for more information." msgstr "" -#: ../../library/logging.handlers.rst:650 +#: ../../library/logging.handlers.rst:658 msgid "*socktype* was added." msgstr "" -#: ../../library/logging.handlers.rst:653 +#: ../../library/logging.handlers.rst:661 msgid "*timeout* was added." msgstr "" -#: ../../library/logging.handlers.rst:658 +#: ../../library/logging.handlers.rst:666 msgid "Closes the socket to the remote host." msgstr "" -#: ../../library/logging.handlers.rst:662 +#: ../../library/logging.handlers.rst:670 msgid "" "Tries to create a socket and, if it's not a datagram socket, connect it to " "the other end. This method is called during handler initialization, but it's " @@ -868,13 +880,13 @@ msgid "" "socket at that point." msgstr "" -#: ../../library/logging.handlers.rst:672 +#: ../../library/logging.handlers.rst:680 msgid "" "The record is formatted, and then sent to the syslog server. If exception " "information is present, it is *not* sent to the server." msgstr "" -#: ../../library/logging.handlers.rst:675 +#: ../../library/logging.handlers.rst:683 msgid "" "(See: :issue:`12168`.) In earlier versions, the message sent to the syslog " "daemons was always terminated with a NUL byte, because early versions of " @@ -885,7 +897,7 @@ msgid "" "byte on as part of the message." msgstr "" -#: ../../library/logging.handlers.rst:684 +#: ../../library/logging.handlers.rst:692 msgid "" "To enable easier handling of syslog messages in the face of all these " "differing daemon behaviours, the appending of the NUL byte has been made " @@ -895,7 +907,7 @@ msgid "" "*not* append the NUL terminator." msgstr "" -#: ../../library/logging.handlers.rst:691 +#: ../../library/logging.handlers.rst:699 msgid "" "(See: :issue:`12419`.) In earlier versions, there was no facility for an " "\"ident\" or \"tag\" prefix to identify the source of the message. This can " @@ -906,262 +918,262 @@ msgid "" "bytes, and is prepended to the message exactly as is." msgstr "" -#: ../../library/logging.handlers.rst:702 +#: ../../library/logging.handlers.rst:710 msgid "" "Encodes the facility and priority into an integer. You can pass in strings " "or integers - if strings are passed, internal mapping dictionaries are used " "to convert them to integers." msgstr "" -#: ../../library/logging.handlers.rst:706 +#: ../../library/logging.handlers.rst:714 msgid "" "The symbolic ``LOG_`` values are defined in :class:`SysLogHandler` and " "mirror the values defined in the ``sys/syslog.h`` header file." msgstr "" -#: ../../library/logging.handlers.rst:709 +#: ../../library/logging.handlers.rst:717 msgid "**Priorities**" msgstr "" -#: ../../library/logging.handlers.rst:712 -#: ../../library/logging.handlers.rst:734 +#: ../../library/logging.handlers.rst:720 +#: ../../library/logging.handlers.rst:742 msgid "Name (string)" msgstr "" -#: ../../library/logging.handlers.rst:712 -#: ../../library/logging.handlers.rst:734 +#: ../../library/logging.handlers.rst:720 +#: ../../library/logging.handlers.rst:742 msgid "Symbolic value" msgstr "" -#: ../../library/logging.handlers.rst:714 +#: ../../library/logging.handlers.rst:722 msgid "``alert``" msgstr "" -#: ../../library/logging.handlers.rst:714 +#: ../../library/logging.handlers.rst:722 msgid "LOG_ALERT" msgstr "" -#: ../../library/logging.handlers.rst:716 +#: ../../library/logging.handlers.rst:724 msgid "``crit`` or ``critical``" msgstr "" -#: ../../library/logging.handlers.rst:716 +#: ../../library/logging.handlers.rst:724 msgid "LOG_CRIT" msgstr "" -#: ../../library/logging.handlers.rst:718 +#: ../../library/logging.handlers.rst:726 msgid "``debug``" msgstr "" -#: ../../library/logging.handlers.rst:718 +#: ../../library/logging.handlers.rst:726 msgid "LOG_DEBUG" msgstr "" -#: ../../library/logging.handlers.rst:720 +#: ../../library/logging.handlers.rst:728 msgid "``emerg`` or ``panic``" msgstr "" -#: ../../library/logging.handlers.rst:720 +#: ../../library/logging.handlers.rst:728 msgid "LOG_EMERG" msgstr "" -#: ../../library/logging.handlers.rst:722 +#: ../../library/logging.handlers.rst:730 msgid "``err`` or ``error``" msgstr "" -#: ../../library/logging.handlers.rst:722 +#: ../../library/logging.handlers.rst:730 msgid "LOG_ERR" msgstr "" -#: ../../library/logging.handlers.rst:724 +#: ../../library/logging.handlers.rst:732 msgid "``info``" msgstr "" -#: ../../library/logging.handlers.rst:724 +#: ../../library/logging.handlers.rst:732 msgid "LOG_INFO" msgstr "" -#: ../../library/logging.handlers.rst:726 +#: ../../library/logging.handlers.rst:734 msgid "``notice``" msgstr "" -#: ../../library/logging.handlers.rst:726 +#: ../../library/logging.handlers.rst:734 msgid "LOG_NOTICE" msgstr "" -#: ../../library/logging.handlers.rst:728 +#: ../../library/logging.handlers.rst:736 msgid "``warn`` or ``warning``" msgstr "" -#: ../../library/logging.handlers.rst:728 +#: ../../library/logging.handlers.rst:736 msgid "LOG_WARNING" msgstr "" -#: ../../library/logging.handlers.rst:731 +#: ../../library/logging.handlers.rst:739 msgid "**Facilities**" msgstr "" -#: ../../library/logging.handlers.rst:736 +#: ../../library/logging.handlers.rst:744 msgid "``auth``" msgstr "" -#: ../../library/logging.handlers.rst:736 +#: ../../library/logging.handlers.rst:744 msgid "LOG_AUTH" msgstr "" -#: ../../library/logging.handlers.rst:738 +#: ../../library/logging.handlers.rst:746 msgid "``authpriv``" msgstr "" -#: ../../library/logging.handlers.rst:738 +#: ../../library/logging.handlers.rst:746 msgid "LOG_AUTHPRIV" msgstr "" -#: ../../library/logging.handlers.rst:740 +#: ../../library/logging.handlers.rst:748 msgid "``cron``" msgstr "" -#: ../../library/logging.handlers.rst:740 +#: ../../library/logging.handlers.rst:748 msgid "LOG_CRON" msgstr "" -#: ../../library/logging.handlers.rst:742 +#: ../../library/logging.handlers.rst:750 msgid "``daemon``" msgstr "" -#: ../../library/logging.handlers.rst:742 +#: ../../library/logging.handlers.rst:750 msgid "LOG_DAEMON" msgstr "" -#: ../../library/logging.handlers.rst:744 +#: ../../library/logging.handlers.rst:752 msgid "``ftp``" msgstr "" -#: ../../library/logging.handlers.rst:744 +#: ../../library/logging.handlers.rst:752 msgid "LOG_FTP" msgstr "" -#: ../../library/logging.handlers.rst:746 +#: ../../library/logging.handlers.rst:754 msgid "``kern``" msgstr "" -#: ../../library/logging.handlers.rst:746 +#: ../../library/logging.handlers.rst:754 msgid "LOG_KERN" msgstr "" -#: ../../library/logging.handlers.rst:748 +#: ../../library/logging.handlers.rst:756 msgid "``lpr``" msgstr "" -#: ../../library/logging.handlers.rst:748 +#: ../../library/logging.handlers.rst:756 msgid "LOG_LPR" msgstr "" -#: ../../library/logging.handlers.rst:750 +#: ../../library/logging.handlers.rst:758 msgid "``mail``" msgstr "" -#: ../../library/logging.handlers.rst:750 +#: ../../library/logging.handlers.rst:758 msgid "LOG_MAIL" msgstr "" -#: ../../library/logging.handlers.rst:752 +#: ../../library/logging.handlers.rst:760 msgid "``news``" msgstr "" -#: ../../library/logging.handlers.rst:752 +#: ../../library/logging.handlers.rst:760 msgid "LOG_NEWS" msgstr "" -#: ../../library/logging.handlers.rst:754 +#: ../../library/logging.handlers.rst:762 msgid "``syslog``" msgstr "" -#: ../../library/logging.handlers.rst:754 +#: ../../library/logging.handlers.rst:762 msgid "LOG_SYSLOG" msgstr "" -#: ../../library/logging.handlers.rst:756 +#: ../../library/logging.handlers.rst:764 msgid "``user``" msgstr "" -#: ../../library/logging.handlers.rst:756 +#: ../../library/logging.handlers.rst:764 msgid "LOG_USER" msgstr "" -#: ../../library/logging.handlers.rst:758 +#: ../../library/logging.handlers.rst:766 msgid "``uucp``" msgstr "" -#: ../../library/logging.handlers.rst:758 +#: ../../library/logging.handlers.rst:766 msgid "LOG_UUCP" msgstr "" -#: ../../library/logging.handlers.rst:760 +#: ../../library/logging.handlers.rst:768 msgid "``local0``" msgstr "" -#: ../../library/logging.handlers.rst:760 +#: ../../library/logging.handlers.rst:768 msgid "LOG_LOCAL0" msgstr "" -#: ../../library/logging.handlers.rst:762 +#: ../../library/logging.handlers.rst:770 msgid "``local1``" msgstr "" -#: ../../library/logging.handlers.rst:762 +#: ../../library/logging.handlers.rst:770 msgid "LOG_LOCAL1" msgstr "" -#: ../../library/logging.handlers.rst:764 +#: ../../library/logging.handlers.rst:772 msgid "``local2``" msgstr "" -#: ../../library/logging.handlers.rst:764 +#: ../../library/logging.handlers.rst:772 msgid "LOG_LOCAL2" msgstr "" -#: ../../library/logging.handlers.rst:766 +#: ../../library/logging.handlers.rst:774 msgid "``local3``" msgstr "" -#: ../../library/logging.handlers.rst:766 +#: ../../library/logging.handlers.rst:774 msgid "LOG_LOCAL3" msgstr "" -#: ../../library/logging.handlers.rst:768 +#: ../../library/logging.handlers.rst:776 msgid "``local4``" msgstr "" -#: ../../library/logging.handlers.rst:768 +#: ../../library/logging.handlers.rst:776 msgid "LOG_LOCAL4" msgstr "" -#: ../../library/logging.handlers.rst:770 +#: ../../library/logging.handlers.rst:778 msgid "``local5``" msgstr "" -#: ../../library/logging.handlers.rst:770 +#: ../../library/logging.handlers.rst:778 msgid "LOG_LOCAL5" msgstr "" -#: ../../library/logging.handlers.rst:772 +#: ../../library/logging.handlers.rst:780 msgid "``local6``" msgstr "" -#: ../../library/logging.handlers.rst:772 +#: ../../library/logging.handlers.rst:780 msgid "LOG_LOCAL6" msgstr "" -#: ../../library/logging.handlers.rst:774 +#: ../../library/logging.handlers.rst:782 msgid "``local7``" msgstr "" -#: ../../library/logging.handlers.rst:774 +#: ../../library/logging.handlers.rst:782 msgid "LOG_LOCAL7" msgstr "" -#: ../../library/logging.handlers.rst:779 +#: ../../library/logging.handlers.rst:787 msgid "" "Maps a logging level name to a syslog priority name. You may need to " "override this if you are using custom levels, or if the default algorithm is " @@ -1170,11 +1182,11 @@ msgid "" "all other level names to 'warning'." msgstr "" -#: ../../library/logging.handlers.rst:789 +#: ../../library/logging.handlers.rst:797 msgid "NTEventLogHandler" msgstr "" -#: ../../library/logging.handlers.rst:791 +#: ../../library/logging.handlers.rst:799 msgid "" "The :class:`NTEventLogHandler` class, located in the :mod:`logging.handlers` " "module, supports sending logging messages to a local Windows NT, Windows " @@ -1182,7 +1194,7 @@ msgid "" "Win32 extensions for Python installed." msgstr "" -#: ../../library/logging.handlers.rst:799 +#: ../../library/logging.handlers.rst:807 msgid "" "Returns a new instance of the :class:`NTEventLogHandler` class. The " "*appname* is used to define the application name as it appears in the event " @@ -1198,7 +1210,7 @@ msgid "" "or ``'Security'``, and defaults to ``'Application'``." msgstr "" -#: ../../library/logging.handlers.rst:815 +#: ../../library/logging.handlers.rst:823 msgid "" "At this point, you can remove the application name from the registry as a " "source of event log entries. However, if you do this, you will not be able " @@ -1207,19 +1219,19 @@ msgid "" "not do this." msgstr "" -#: ../../library/logging.handlers.rst:824 +#: ../../library/logging.handlers.rst:832 msgid "" "Determines the message ID, event category and event type, and then logs the " "message in the NT event log." msgstr "" -#: ../../library/logging.handlers.rst:830 +#: ../../library/logging.handlers.rst:838 msgid "" "Returns the event category for the record. Override this if you want to " "specify your own categories. This version returns 0." msgstr "" -#: ../../library/logging.handlers.rst:836 +#: ../../library/logging.handlers.rst:844 msgid "" "Returns the event type for the record. Override this if you want to specify " "your own types. This version does a mapping using the handler's typemap " @@ -1230,7 +1242,7 @@ msgid "" "the handler's *typemap* attribute." msgstr "" -#: ../../library/logging.handlers.rst:847 +#: ../../library/logging.handlers.rst:855 msgid "" "Returns the message ID for the record. If you are using your own messages, " "you could do this by having the *msg* passed to the logger being an ID " @@ -1239,17 +1251,17 @@ msgid "" "message ID in :file:`win32service.pyd`." msgstr "" -#: ../../library/logging.handlers.rst:856 +#: ../../library/logging.handlers.rst:864 msgid "SMTPHandler" msgstr "" -#: ../../library/logging.handlers.rst:858 +#: ../../library/logging.handlers.rst:866 msgid "" "The :class:`SMTPHandler` class, located in the :mod:`logging.handlers` " "module, supports sending logging messages to an email address via SMTP." msgstr "" -#: ../../library/logging.handlers.rst:864 +#: ../../library/logging.handlers.rst:872 msgid "" "Returns a new instance of the :class:`SMTPHandler` class. The instance is " "initialized with the from and to addresses and subject line of the email. " @@ -1260,7 +1272,7 @@ msgid "" "*credentials* argument." msgstr "" -#: ../../library/logging.handlers.rst:871 +#: ../../library/logging.handlers.rst:879 msgid "" "To specify the use of a secure protocol (TLS), pass in a tuple to the " "*secure* argument. This will only be used when authentication credentials " @@ -1270,31 +1282,31 @@ msgid "" "SMTP.starttls` method.)" msgstr "" -#: ../../library/logging.handlers.rst:878 +#: ../../library/logging.handlers.rst:886 msgid "" "A timeout can be specified for communication with the SMTP server using the " "*timeout* argument." msgstr "" -#: ../../library/logging.handlers.rst:881 +#: ../../library/logging.handlers.rst:889 msgid "Added the *timeout* parameter." msgstr "" -#: ../../library/logging.handlers.rst:886 +#: ../../library/logging.handlers.rst:894 msgid "Formats the record and sends it to the specified addressees." msgstr "" -#: ../../library/logging.handlers.rst:891 +#: ../../library/logging.handlers.rst:899 msgid "" "If you want to specify a subject line which is record-dependent, override " "this method." msgstr "" -#: ../../library/logging.handlers.rst:897 +#: ../../library/logging.handlers.rst:905 msgid "MemoryHandler" msgstr "" -#: ../../library/logging.handlers.rst:899 +#: ../../library/logging.handlers.rst:907 msgid "" "The :class:`MemoryHandler` class, located in the :mod:`logging.handlers` " "module, supports buffering of logging records in memory, periodically " @@ -1302,7 +1314,7 @@ msgid "" "buffer is full, or when an event of a certain severity or greater is seen." msgstr "" -#: ../../library/logging.handlers.rst:904 +#: ../../library/logging.handlers.rst:912 msgid "" ":class:`MemoryHandler` is a subclass of the more general :class:" "`BufferingHandler`, which is an abstract class. This buffers logging records " @@ -1311,32 +1323,32 @@ msgid "" "should, then :meth:`flush` is expected to do the flushing." msgstr "" -#: ../../library/logging.handlers.rst:913 +#: ../../library/logging.handlers.rst:921 msgid "" "Initializes the handler with a buffer of the specified capacity. Here, " "*capacity* means the number of logging records buffered." msgstr "" -#: ../../library/logging.handlers.rst:919 +#: ../../library/logging.handlers.rst:927 msgid "" "Append the record to the buffer. If :meth:`shouldFlush` returns true, call :" "meth:`flush` to process the buffer." msgstr "" -#: ../../library/logging.handlers.rst:925 +#: ../../library/logging.handlers.rst:933 msgid "" "For a :class:`BufferingHandler` instance, flushing means that it sets the " "buffer to an empty list. This method can be overwritten to implement more " "useful flushing behavior." msgstr "" -#: ../../library/logging.handlers.rst:932 +#: ../../library/logging.handlers.rst:940 msgid "" "Return ``True`` if the buffer is up to capacity. This method can be " "overridden to implement custom flushing strategies." msgstr "" -#: ../../library/logging.handlers.rst:938 +#: ../../library/logging.handlers.rst:946 msgid "" "Returns a new instance of the :class:`MemoryHandler` class. The instance is " "initialized with a buffer size of *capacity* (number of records buffered). " @@ -1348,15 +1360,15 @@ msgid "" "the buffer will occur when the handler is closed." msgstr "" -#: ../../library/logging.handlers.rst:947 +#: ../../library/logging.handlers.rst:955 msgid "The *flushOnClose* parameter was added." msgstr "" -#: ../../library/logging.handlers.rst:953 +#: ../../library/logging.handlers.rst:961 msgid "Calls :meth:`flush`, sets the target to ``None`` and clears the buffer." msgstr "" -#: ../../library/logging.handlers.rst:959 +#: ../../library/logging.handlers.rst:967 msgid "" "For a :class:`MemoryHandler` instance, flushing means just sending the " "buffered records to the target, if there is one. The buffer is also cleared " @@ -1364,26 +1376,26 @@ msgid "" "behavior." msgstr "" -#: ../../library/logging.handlers.rst:966 +#: ../../library/logging.handlers.rst:974 msgid "Sets the target handler for this handler." msgstr "" -#: ../../library/logging.handlers.rst:971 +#: ../../library/logging.handlers.rst:979 msgid "Checks for buffer full or a record at the *flushLevel* or higher." msgstr "" -#: ../../library/logging.handlers.rst:977 +#: ../../library/logging.handlers.rst:985 msgid "HTTPHandler" msgstr "" -#: ../../library/logging.handlers.rst:979 +#: ../../library/logging.handlers.rst:987 msgid "" "The :class:`HTTPHandler` class, located in the :mod:`logging.handlers` " "module, supports sending logging messages to a web server, using either " "``GET`` or ``POST`` semantics." msgstr "" -#: ../../library/logging.handlers.rst:986 +#: ../../library/logging.handlers.rst:994 msgid "" "Returns a new instance of the :class:`HTTPHandler` class. The *host* can be " "of the form ``host:port``, should you need to use a specific port number. " @@ -1397,11 +1409,11 @@ msgid "" "cleartext across the wire." msgstr "" -#: ../../library/logging.handlers.rst:997 +#: ../../library/logging.handlers.rst:1005 msgid "The *context* parameter was added." msgstr "" -#: ../../library/logging.handlers.rst:1002 +#: ../../library/logging.handlers.rst:1010 msgid "" "Provides a dictionary, based on ``record``, which is to be URL-encoded and " "sent to the web server. The default implementation just returns ``record." @@ -1410,14 +1422,14 @@ msgid "" "customization of what's sent to the server is required." msgstr "" -#: ../../library/logging.handlers.rst:1010 +#: ../../library/logging.handlers.rst:1018 msgid "" "Sends the record to the web server as a URL-encoded dictionary. The :meth:" "`mapLogRecord` method is used to convert the record to the dictionary to be " "sent." msgstr "" -#: ../../library/logging.handlers.rst:1014 +#: ../../library/logging.handlers.rst:1022 msgid "" "Since preparing a record for sending it to a web server is not the same as a " "generic formatting operation, using :meth:`~logging.Handler.setFormatter` to " @@ -1427,18 +1439,18 @@ msgid "" "the dictionary in a form suitable for sending to a web server." msgstr "" -#: ../../library/logging.handlers.rst:1027 +#: ../../library/logging.handlers.rst:1035 msgid "QueueHandler" msgstr "" -#: ../../library/logging.handlers.rst:1031 +#: ../../library/logging.handlers.rst:1039 msgid "" "The :class:`QueueHandler` class, located in the :mod:`logging.handlers` " "module, supports sending logging messages to a queue, such as those " "implemented in the :mod:`queue` or :mod:`multiprocessing` modules." msgstr "" -#: ../../library/logging.handlers.rst:1035 +#: ../../library/logging.handlers.rst:1043 msgid "" "Along with the :class:`QueueListener` class, :class:`QueueHandler` can be " "used to let handlers do their work on a separate thread from the one which " @@ -1448,7 +1460,7 @@ msgid "" "an email via :class:`SMTPHandler`) are done on a separate thread." msgstr "" -#: ../../library/logging.handlers.rst:1044 +#: ../../library/logging.handlers.rst:1052 msgid "" "Returns a new instance of the :class:`QueueHandler` class. The instance is " "initialized with the queue to send messages to. The *queue* can be any queue-" @@ -1458,14 +1470,24 @@ msgid "" "instances for *queue*." msgstr "" -#: ../../library/logging.handlers.rst:1051 -#: ../../library/logging.handlers.rst:1140 +#: ../../library/logging.handlers.rst:1059 +#: ../../library/logging.handlers.rst:1157 msgid "" "If you are using :mod:`multiprocessing`, you should avoid using :class:" "`~queue.SimpleQueue` and instead use :class:`multiprocessing.Queue`." msgstr "" -#: ../../library/logging.handlers.rst:1056 +#: ../../library/logging.handlers.rst:1064 +msgid "" +"The :mod:`multiprocessing` module uses an internal logger created and " +"accessed via :meth:`~multiprocessing.get_logger`. :class:`multiprocessing." +"Queue` will log ``DEBUG`` level messages upon items being queued. If those " +"log messages are processed by a :class:`QueueHandler` using the same :class:" +"`multiprocessing.Queue` instance, it will cause a deadlock or infinite " +"recursion." +msgstr "" + +#: ../../library/logging.handlers.rst:1073 msgid "" "Enqueues the result of preparing the LogRecord. Should an exception occur (e." "g. because a bounded queue has filled up), the :meth:`~logging.Handler." @@ -1475,13 +1497,13 @@ msgid "" "raiseExceptions` is ``True``)." msgstr "" -#: ../../library/logging.handlers.rst:1065 +#: ../../library/logging.handlers.rst:1082 msgid "" "Prepares a record for queuing. The object returned by this method is " "enqueued." msgstr "" -#: ../../library/logging.handlers.rst:1068 +#: ../../library/logging.handlers.rst:1085 msgid "" "The base implementation formats the record to merge the message, arguments, " "exception and stack information, if present. It also removes unpickleable " @@ -1491,14 +1513,14 @@ msgid "" "attr:`exc_info` and :attr:`exc_text` attributes to ``None``." msgstr "" -#: ../../library/logging.handlers.rst:1076 +#: ../../library/logging.handlers.rst:1093 msgid "" "You might want to override this method if you want to convert the record to " "a dict or JSON string, or send a modified copy of the record while leaving " "the original intact." msgstr "" -#: ../../library/logging.handlers.rst:1080 +#: ../../library/logging.handlers.rst:1097 msgid "" "The base implementation formats the message with arguments, sets the " "``message`` and ``msg`` attributes to the formatted message and sets the " @@ -1514,25 +1536,25 @@ msgid "" "libraries that you use.)" msgstr "" -#: ../../library/logging.handlers.rst:1096 +#: ../../library/logging.handlers.rst:1113 msgid "" "Enqueues the record on the queue using ``put_nowait()``; you may want to " "override this if you want to use blocking behaviour, or a timeout, or a " "customized queue implementation." msgstr "" -#: ../../library/logging.handlers.rst:1102 +#: ../../library/logging.handlers.rst:1119 msgid "" "When created via configuration using :func:`~logging.config.dictConfig`, " "this attribute will contain a :class:`QueueListener` instance for use with " "this handler. Otherwise, it will be ``None``." msgstr "" -#: ../../library/logging.handlers.rst:1111 +#: ../../library/logging.handlers.rst:1128 msgid "QueueListener" msgstr "" -#: ../../library/logging.handlers.rst:1115 +#: ../../library/logging.handlers.rst:1132 msgid "" "The :class:`QueueListener` class, located in the :mod:`logging.handlers` " "module, supports receiving logging messages from a queue, such as those " @@ -1543,7 +1565,7 @@ msgid "" "works hand-in-hand with :class:`QueueHandler`." msgstr "" -#: ../../library/logging.handlers.rst:1123 +#: ../../library/logging.handlers.rst:1140 msgid "" "Along with the :class:`QueueHandler` class, :class:`QueueListener` can be " "used to let handlers do their work on a separate thread from the one which " @@ -1553,7 +1575,7 @@ msgid "" "an email via :class:`SMTPHandler`) are done on a separate thread." msgstr "" -#: ../../library/logging.handlers.rst:1132 +#: ../../library/logging.handlers.rst:1149 msgid "" "Returns a new instance of the :class:`QueueListener` class. The instance is " "initialized with the queue to send messages to and a list of handlers which " @@ -1564,7 +1586,7 @@ msgid "" "class:`~queue.SimpleQueue` instances for *queue*." msgstr "" -#: ../../library/logging.handlers.rst:1143 +#: ../../library/logging.handlers.rst:1160 msgid "" "If ``respect_handler_level`` is ``True``, a handler's level is respected " "(compared with the level for the message) when deciding whether to pass " @@ -1572,11 +1594,11 @@ msgid "" "versions - to always pass each message to each handler." msgstr "" -#: ../../library/logging.handlers.rst:1148 +#: ../../library/logging.handlers.rst:1165 msgid "The ``respect_handler_level`` argument was added." msgstr "" -#: ../../library/logging.handlers.rst:1151 +#: ../../library/logging.handlers.rst:1168 msgid "" ":class:`QueueListener` can now be used as a context manager via :keyword:" "`with`. When entering the context, the listener is started. When exiting the " @@ -1584,83 +1606,83 @@ msgid "" "the :class:`QueueListener` object." msgstr "" -#: ../../library/logging.handlers.rst:1160 +#: ../../library/logging.handlers.rst:1177 msgid "Dequeues a record and return it, optionally blocking." msgstr "" -#: ../../library/logging.handlers.rst:1162 +#: ../../library/logging.handlers.rst:1179 msgid "" "The base implementation uses ``get()``. You may want to override this method " "if you want to use timeouts or work with custom queue implementations." msgstr "" -#: ../../library/logging.handlers.rst:1168 +#: ../../library/logging.handlers.rst:1185 msgid "Prepare a record for handling." msgstr "" -#: ../../library/logging.handlers.rst:1170 +#: ../../library/logging.handlers.rst:1187 msgid "" "This implementation just returns the passed-in record. You may want to " "override this method if you need to do any custom marshalling or " "manipulation of the record before passing it to the handlers." msgstr "" -#: ../../library/logging.handlers.rst:1176 +#: ../../library/logging.handlers.rst:1193 msgid "Handle a record." msgstr "" -#: ../../library/logging.handlers.rst:1178 +#: ../../library/logging.handlers.rst:1195 msgid "" "This just loops through the handlers offering them the record to handle. The " "actual object passed to the handlers is that which is returned from :meth:" "`prepare`." msgstr "" -#: ../../library/logging.handlers.rst:1184 +#: ../../library/logging.handlers.rst:1201 msgid "Starts the listener." msgstr "" -#: ../../library/logging.handlers.rst:1186 +#: ../../library/logging.handlers.rst:1203 msgid "" "This starts up a background thread to monitor the queue for LogRecords to " "process." msgstr "" -#: ../../library/logging.handlers.rst:1189 +#: ../../library/logging.handlers.rst:1206 msgid "" "Raises :exc:`RuntimeError` if called and the listener is already running." msgstr "" -#: ../../library/logging.handlers.rst:1195 +#: ../../library/logging.handlers.rst:1212 msgid "Stops the listener." msgstr "" -#: ../../library/logging.handlers.rst:1197 +#: ../../library/logging.handlers.rst:1214 msgid "" "This asks the thread to terminate, and then waits for it to do so. Note that " "if you don't call this before your application exits, there may be some " "records still left on the queue, which won't be processed." msgstr "" -#: ../../library/logging.handlers.rst:1203 +#: ../../library/logging.handlers.rst:1220 msgid "" "Writes a sentinel to the queue to tell the listener to quit. This " "implementation uses ``put_nowait()``. You may want to override this method " "if you want to use timeouts or work with custom queue implementations." msgstr "" -#: ../../library/logging.handlers.rst:1213 +#: ../../library/logging.handlers.rst:1230 msgid "Module :mod:`logging`" msgstr "" -#: ../../library/logging.handlers.rst:1214 +#: ../../library/logging.handlers.rst:1231 msgid "API reference for the logging module." msgstr "" -#: ../../library/logging.handlers.rst:1216 +#: ../../library/logging.handlers.rst:1233 msgid "Module :mod:`logging.config`" msgstr "" -#: ../../library/logging.handlers.rst:1217 +#: ../../library/logging.handlers.rst:1234 msgid "Configuration API for the logging module." msgstr "" diff --git a/library/logging.po b/library/logging.po index c3896569d..b0a4c5ccb 100644 --- a/library/logging.po +++ b/library/logging.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:09+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/lzma.po b/library/lzma.po index e77752765..210f267f1 100644 --- a/library/lzma.po +++ b/library/lzma.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:09+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/mailbox.po b/library/mailbox.po index dfa9f6fc8..6eb854b64 100644 --- a/library/mailbox.po +++ b/library/mailbox.po @@ -1,20 +1,21 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2025, Python Software Foundation +# Copyright (C) 2001 Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Python 3.13\n" +"Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-02 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:09+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/mailcap.po b/library/mailcap.po index 81ae623be..2c180098c 100644 --- a/library/mailcap.po +++ b/library/mailcap.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-11-19 01:03+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/markup.po b/library/markup.po index 13a74d343..34cbf5552 100644 --- a/library/markup.po +++ b/library/markup.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:09+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/marshal.po b/library/marshal.po index 523f741af..4f54aeb61 100644 --- a/library/marshal.po +++ b/library/marshal.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Mehdi Batani, 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:09+0000\n" -"Last-Translator: Mehdi Batani, 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/math.po b/library/math.po index 81f899c09..0ba9f6c5b 100644 --- a/library/math.po +++ b/library/math.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Parham Forati, 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:09+0000\n" -"Last-Translator: Parham Forati, 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -29,8 +30,8 @@ msgstr "" #: ../../library/math.rst:13 msgid "" -"This module provides access to the mathematical functions defined by the C " -"standard." +"This module provides access to common mathematical functions and constants, " +"including those defined by the C standard." msgstr "" #: ../../library/math.rst:16 @@ -1320,8 +1321,8 @@ msgid "" "The mathematical constant *τ* = 6.283185..., to available precision. Tau is " "a circle constant equal to 2\\ *π*, the ratio of a circle's circumference to " "its radius. To learn more about Tau, check out Vi Hart's video `Pi is " -"(still) Wrong `_, and start " -"celebrating `Tau day `_ by eating twice as much pie!" +"(still) Wrong `_, and start celebrating `Tau " +"day `_ by eating twice as much pie!" msgstr "" #: ../../library/math.rst:785 diff --git a/library/mimetypes.po b/library/mimetypes.po index 08b3c2324..d67c9135b 100644 --- a/library/mimetypes.po +++ b/library/mimetypes.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:09+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/mm.po b/library/mm.po index eb4f663b4..9a7f213ce 100644 --- a/library/mm.po +++ b/library/mm.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:09+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/mmap.po b/library/mmap.po index d128b0652..f40c4bdd3 100644 --- a/library/mmap.po +++ b/library/mmap.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:09+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -360,7 +364,7 @@ msgstr "" msgid "" "Resizing a map created with *access* of :const:`ACCESS_READ` or :const:" "`ACCESS_COPY`, will raise a :exc:`TypeError` exception. Resizing a map " -"created with with *trackfd* set to ``False``, will raise a :exc:`ValueError` " +"created with *trackfd* set to ``False``, will raise a :exc:`ValueError` " "exception." msgstr "" diff --git a/library/modulefinder.po b/library/modulefinder.po index 195b376dd..984bdee3d 100644 --- a/library/modulefinder.po +++ b/library/modulefinder.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:09+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/modules.po b/library/modules.po index ae28a4b9b..6c1221a7c 100644 --- a/library/modules.po +++ b/library/modules.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:09+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/msilib.po b/library/msilib.po index 48c847a27..d179e9412 100644 --- a/library/msilib.po +++ b/library/msilib.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-11-19 01:03+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/msvcrt.po b/library/msvcrt.po index 05c7aaa39..39331af32 100644 --- a/library/msvcrt.po +++ b/library/msvcrt.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:09+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/multiprocessing.po b/library/multiprocessing.po index 2b4969e78..61bba0187 100644 --- a/library/multiprocessing.po +++ b/library/multiprocessing.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:10+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -1476,7 +1477,7 @@ msgstr "" #: ../../library/multiprocessing.rst:1083 msgid "" "Add support for when a program which uses :mod:`multiprocessing` has been " -"frozen to produce a Windows executable. (Has been tested with **py2exe**, " +"frozen to produce an executable. (Has been tested with **py2exe**, " "**PyInstaller** and **cx_Freeze**.)" msgstr "" @@ -1506,10 +1507,10 @@ msgstr "" #: ../../library/multiprocessing.rst:1102 msgid "" -"Calling ``freeze_support()`` has no effect when invoked on any operating " -"system other than Windows. In addition, if the module is being run normally " -"by the Python interpreter on Windows (the program has not been frozen), then " -"``freeze_support()`` has no effect." +"Calling ``freeze_support()`` has no effect when the start method is not " +"*spawn*. In addition, if the module is being run normally by the Python " +"interpreter (the program has not been frozen), then ``freeze_support()`` has " +"no effect." msgstr "" #: ../../library/multiprocessing.rst:1109 @@ -1528,60 +1529,62 @@ msgstr "" #: ../../library/multiprocessing.rst:1121 msgid "" -"If *method* is ``None`` then the default context is returned. Otherwise " -"*method* should be ``'fork'``, ``'spawn'``, ``'forkserver'``. :exc:" -"`ValueError` is raised if the specified start method is not available. See :" -"ref:`multiprocessing-start-methods`." +"If *method* is ``None`` then the default context is returned. Note that if " +"the global start method has not been set, this will set it to the default " +"method. Otherwise *method* should be ``'fork'``, ``'spawn'``, " +"``'forkserver'``. :exc:`ValueError` is raised if the specified start method " +"is not available. See :ref:`multiprocessing-start-methods`." msgstr "" -#: ../../library/multiprocessing.rst:1130 +#: ../../library/multiprocessing.rst:1132 msgid "Return the name of start method used for starting processes." msgstr "" -#: ../../library/multiprocessing.rst:1132 +#: ../../library/multiprocessing.rst:1134 msgid "" -"If the start method has not been fixed and *allow_none* is false, then the " -"start method is fixed to the default and the name is returned. If the start " -"method has not been fixed and *allow_none* is true then ``None`` is returned." +"If the global start method has not been set and *allow_none* is ``False``, " +"then the start method is set to the default and the name is returned. If the " +"start method has not been set and *allow_none* is ``True`` then ``None`` is " +"returned." msgstr "" -#: ../../library/multiprocessing.rst:1137 +#: ../../library/multiprocessing.rst:1139 msgid "" "The return value can be ``'fork'``, ``'spawn'``, ``'forkserver'`` or " "``None``. See :ref:`multiprocessing-start-methods`." msgstr "" -#: ../../library/multiprocessing.rst:1144 +#: ../../library/multiprocessing.rst:1146 msgid "" "On macOS, the *spawn* start method is now the default. The *fork* start " "method should be considered unsafe as it can lead to crashes of the " "subprocess. See :issue:`33725`." msgstr "" -#: ../../library/multiprocessing.rst:1150 +#: ../../library/multiprocessing.rst:1152 msgid "" "Set the path of the Python interpreter to use when starting a child process. " "(By default :data:`sys.executable` is used). Embedders will probably need " "to do some thing like ::" msgstr "" -#: ../../library/multiprocessing.rst:1154 +#: ../../library/multiprocessing.rst:1156 msgid "set_executable(os.path.join(sys.exec_prefix, 'pythonw.exe'))" msgstr "" -#: ../../library/multiprocessing.rst:1156 +#: ../../library/multiprocessing.rst:1158 msgid "before they can create child processes." msgstr "" -#: ../../library/multiprocessing.rst:1158 +#: ../../library/multiprocessing.rst:1160 msgid "Now supported on POSIX when the ``'spawn'`` start method is used." msgstr "" -#: ../../library/multiprocessing.rst:1161 +#: ../../library/multiprocessing.rst:1163 msgid "Accepts a :term:`path-like object`." msgstr "" -#: ../../library/multiprocessing.rst:1166 +#: ../../library/multiprocessing.rst:1168 msgid "" "Set a list of module names for the forkserver main process to attempt to " "import so that their already imported state is inherited by forked " @@ -1590,19 +1593,19 @@ msgid "" "process." msgstr "" -#: ../../library/multiprocessing.rst:1172 +#: ../../library/multiprocessing.rst:1174 msgid "" "For this to work, it must be called before the forkserver process has been " "launched (before creating a :class:`Pool` or starting a :class:`Process`)." msgstr "" -#: ../../library/multiprocessing.rst:1175 +#: ../../library/multiprocessing.rst:1177 msgid "" "Only meaningful when using the ``'forkserver'`` start method. See :ref:" "`multiprocessing-start-methods`." msgstr "" -#: ../../library/multiprocessing.rst:1182 +#: ../../library/multiprocessing.rst:1184 msgid "" "Set the method which should be used to start child processes. The *method* " "argument can be ``'fork'``, ``'spawn'`` or ``'forkserver'``. Raises :exc:" @@ -1612,17 +1615,17 @@ msgid "" "then the context is set to the default context." msgstr "" -#: ../../library/multiprocessing.rst:1189 +#: ../../library/multiprocessing.rst:1191 msgid "" "Note that this should be called at most once, and it should be protected " "inside the ``if __name__ == '__main__'`` clause of the main module." msgstr "" -#: ../../library/multiprocessing.rst:1193 +#: ../../library/multiprocessing.rst:1195 msgid "See :ref:`multiprocessing-start-methods`." msgstr "" -#: ../../library/multiprocessing.rst:1199 +#: ../../library/multiprocessing.rst:1201 msgid "" ":mod:`multiprocessing` contains no analogues of :func:`threading." "active_count`, :func:`threading.enumerate`, :func:`threading.settrace`, :" @@ -1630,75 +1633,75 @@ msgid "" "local`." msgstr "" -#: ../../library/multiprocessing.rst:1206 +#: ../../library/multiprocessing.rst:1208 msgid "Connection Objects" msgstr "" -#: ../../library/multiprocessing.rst:1210 +#: ../../library/multiprocessing.rst:1212 msgid "" "Connection objects allow the sending and receiving of picklable objects or " "strings. They can be thought of as message oriented connected sockets." msgstr "" -#: ../../library/multiprocessing.rst:1213 +#: ../../library/multiprocessing.rst:1215 msgid "" "Connection objects are usually created using :func:`Pipe ` -- see also :ref:`multiprocessing-listeners-clients`." msgstr "" -#: ../../library/multiprocessing.rst:1221 +#: ../../library/multiprocessing.rst:1223 msgid "" "Send an object to the other end of the connection which should be read " "using :meth:`recv`." msgstr "" -#: ../../library/multiprocessing.rst:1224 +#: ../../library/multiprocessing.rst:1226 msgid "" "The object must be picklable. Very large pickles (approximately 32 MiB+, " "though it depends on the OS) may raise a :exc:`ValueError` exception." msgstr "" -#: ../../library/multiprocessing.rst:1229 +#: ../../library/multiprocessing.rst:1231 msgid "" "Return an object sent from the other end of the connection using :meth:" "`send`. Blocks until there is something to receive. Raises :exc:`EOFError` " "if there is nothing left to receive and the other end was closed." msgstr "" -#: ../../library/multiprocessing.rst:1236 +#: ../../library/multiprocessing.rst:1238 msgid "Return the file descriptor or handle used by the connection." msgstr "" -#: ../../library/multiprocessing.rst:1240 +#: ../../library/multiprocessing.rst:1242 msgid "Close the connection." msgstr "" -#: ../../library/multiprocessing.rst:1242 +#: ../../library/multiprocessing.rst:1244 msgid "This is called automatically when the connection is garbage collected." msgstr "" -#: ../../library/multiprocessing.rst:1246 +#: ../../library/multiprocessing.rst:1248 msgid "Return whether there is any data available to be read." msgstr "" -#: ../../library/multiprocessing.rst:1248 +#: ../../library/multiprocessing.rst:1250 msgid "" "If *timeout* is not specified then it will return immediately. If *timeout* " "is a number then this specifies the maximum time in seconds to block. If " "*timeout* is ``None`` then an infinite timeout is used." msgstr "" -#: ../../library/multiprocessing.rst:1252 +#: ../../library/multiprocessing.rst:1254 msgid "" "Note that multiple connection objects may be polled at once by using :func:" "`multiprocessing.connection.wait`." msgstr "" -#: ../../library/multiprocessing.rst:1257 +#: ../../library/multiprocessing.rst:1259 msgid "Send byte data from a :term:`bytes-like object` as a complete message." msgstr "" -#: ../../library/multiprocessing.rst:1259 +#: ../../library/multiprocessing.rst:1261 msgid "" "If *offset* is given then data is read from that position in *buffer*. If " "*size* is given then that many bytes will be read from buffer. Very large " @@ -1706,7 +1709,7 @@ msgid "" "exc:`ValueError` exception" msgstr "" -#: ../../library/multiprocessing.rst:1266 +#: ../../library/multiprocessing.rst:1268 msgid "" "Return a complete message of byte data sent from the other end of the " "connection as a string. Blocks until there is something to receive. Raises :" @@ -1714,19 +1717,19 @@ msgid "" "closed." msgstr "" -#: ../../library/multiprocessing.rst:1271 +#: ../../library/multiprocessing.rst:1273 msgid "" "If *maxlength* is specified and the message is longer than *maxlength* then :" "exc:`OSError` is raised and the connection will no longer be readable." msgstr "" -#: ../../library/multiprocessing.rst:1275 +#: ../../library/multiprocessing.rst:1277 msgid "" "This function used to raise :exc:`IOError`, which is now an alias of :exc:" "`OSError`." msgstr "" -#: ../../library/multiprocessing.rst:1282 +#: ../../library/multiprocessing.rst:1284 msgid "" "Read into *buffer* a complete message of byte data sent from the other end " "of the connection and return the number of bytes in the message. Blocks " @@ -1734,38 +1737,38 @@ msgid "" "nothing left to receive and the other end was closed." msgstr "" -#: ../../library/multiprocessing.rst:1288 +#: ../../library/multiprocessing.rst:1290 msgid "" "*buffer* must be a writable :term:`bytes-like object`. If *offset* is given " "then the message will be written into the buffer from that position. Offset " "must be a non-negative integer less than the length of *buffer* (in bytes)." msgstr "" -#: ../../library/multiprocessing.rst:1293 +#: ../../library/multiprocessing.rst:1295 msgid "" "If the buffer is too short then a :exc:`BufferTooShort` exception is raised " "and the complete message is available as ``e.args[0]`` where ``e`` is the " "exception instance." msgstr "" -#: ../../library/multiprocessing.rst:1297 +#: ../../library/multiprocessing.rst:1299 msgid "" "Connection objects themselves can now be transferred between processes " "using :meth:`Connection.send` and :meth:`Connection.recv`." msgstr "" -#: ../../library/multiprocessing.rst:1301 +#: ../../library/multiprocessing.rst:1303 msgid "" "Connection objects also now support the context management protocol -- see :" "ref:`typecontextmanager`. :meth:`~contextmanager.__enter__` returns the " "connection object, and :meth:`~contextmanager.__exit__` calls :meth:`close`." msgstr "" -#: ../../library/multiprocessing.rst:1305 +#: ../../library/multiprocessing.rst:1307 msgid "For example:" msgstr "" -#: ../../library/multiprocessing.rst:1307 +#: ../../library/multiprocessing.rst:1309 msgid "" ">>> from multiprocessing import Pipe\n" ">>> a, b = Pipe()\n" @@ -1785,14 +1788,14 @@ msgid "" "array('i', [0, 1, 2, 3, 4, 0, 0, 0, 0, 0])" msgstr "" -#: ../../library/multiprocessing.rst:1330 +#: ../../library/multiprocessing.rst:1332 msgid "" "The :meth:`Connection.recv` method automatically unpickles the data it " "receives, which can be a security risk unless you can trust the process " "which sent the message." msgstr "" -#: ../../library/multiprocessing.rst:1334 +#: ../../library/multiprocessing.rst:1336 msgid "" "Therefore, unless the connection object was produced using :func:`Pipe` you " "should only use the :meth:`~Connection.recv` and :meth:`~Connection.send` " @@ -1800,73 +1803,73 @@ msgid "" "`multiprocessing-auth-keys`." msgstr "" -#: ../../library/multiprocessing.rst:1341 +#: ../../library/multiprocessing.rst:1343 msgid "" "If a process is killed while it is trying to read or write to a pipe then " "the data in the pipe is likely to become corrupted, because it may become " "impossible to be sure where the message boundaries lie." msgstr "" -#: ../../library/multiprocessing.rst:1347 +#: ../../library/multiprocessing.rst:1349 msgid "Synchronization primitives" msgstr "" -#: ../../library/multiprocessing.rst:1351 +#: ../../library/multiprocessing.rst:1353 msgid "" "Generally synchronization primitives are not as necessary in a multiprocess " "program as they are in a multithreaded program. See the documentation for :" "mod:`threading` module." msgstr "" -#: ../../library/multiprocessing.rst:1355 +#: ../../library/multiprocessing.rst:1357 msgid "" "Note that one can also create synchronization primitives by using a manager " "object -- see :ref:`multiprocessing-managers`." msgstr "" -#: ../../library/multiprocessing.rst:1360 +#: ../../library/multiprocessing.rst:1362 msgid "A barrier object: a clone of :class:`threading.Barrier`." msgstr "" -#: ../../library/multiprocessing.rst:1366 +#: ../../library/multiprocessing.rst:1368 msgid "" "A bounded semaphore object: a close analog of :class:`threading." "BoundedSemaphore`." msgstr "" -#: ../../library/multiprocessing.rst:1369 -#: ../../library/multiprocessing.rst:1521 +#: ../../library/multiprocessing.rst:1371 +#: ../../library/multiprocessing.rst:1523 msgid "" "A solitary difference from its close analog exists: its ``acquire`` method's " "first argument is named *block*, as is consistent with :meth:`Lock.acquire`." msgstr "" -#: ../../library/multiprocessing.rst:1373 +#: ../../library/multiprocessing.rst:1375 msgid "" "On macOS, this is indistinguishable from :class:`Semaphore` because " "``sem_getvalue()`` is not implemented on that platform." msgstr "" -#: ../../library/multiprocessing.rst:1378 +#: ../../library/multiprocessing.rst:1380 msgid "A condition variable: an alias for :class:`threading.Condition`." msgstr "" -#: ../../library/multiprocessing.rst:1380 +#: ../../library/multiprocessing.rst:1382 msgid "" "If *lock* is specified then it should be a :class:`Lock` or :class:`RLock` " "object from :mod:`multiprocessing`." msgstr "" -#: ../../library/multiprocessing.rst:1383 -#: ../../library/multiprocessing.rst:1935 +#: ../../library/multiprocessing.rst:1385 +#: ../../library/multiprocessing.rst:1937 msgid "The :meth:`~threading.Condition.wait_for` method was added." msgstr "" -#: ../../library/multiprocessing.rst:1388 +#: ../../library/multiprocessing.rst:1390 msgid "A clone of :class:`threading.Event`." msgstr "" -#: ../../library/multiprocessing.rst:1393 +#: ../../library/multiprocessing.rst:1395 msgid "" "A non-recursive lock object: a close analog of :class:`threading.Lock`. Once " "a process or thread has acquired a lock, subsequent attempts to acquire it " @@ -1877,25 +1880,25 @@ msgid "" "as noted." msgstr "" -#: ../../library/multiprocessing.rst:1401 +#: ../../library/multiprocessing.rst:1403 msgid "" "Note that :class:`Lock` is actually a factory function which returns an " "instance of ``multiprocessing.synchronize.Lock`` initialized with a default " "context." msgstr "" -#: ../../library/multiprocessing.rst:1405 +#: ../../library/multiprocessing.rst:1407 msgid "" ":class:`Lock` supports the :term:`context manager` protocol and thus may be " "used in :keyword:`with` statements." msgstr "" -#: ../../library/multiprocessing.rst:1410 -#: ../../library/multiprocessing.rst:1468 +#: ../../library/multiprocessing.rst:1412 +#: ../../library/multiprocessing.rst:1470 msgid "Acquire a lock, blocking or non-blocking." msgstr "" -#: ../../library/multiprocessing.rst:1412 +#: ../../library/multiprocessing.rst:1414 msgid "" "With the *block* argument set to ``True`` (the default), the method call " "will block until the lock is in an unlocked state, then set it to locked and " @@ -1903,14 +1906,14 @@ msgid "" "that in :meth:`threading.Lock.acquire`." msgstr "" -#: ../../library/multiprocessing.rst:1417 +#: ../../library/multiprocessing.rst:1419 msgid "" "With the *block* argument set to ``False``, the method call does not block. " "If the lock is currently in a locked state, return ``False``; otherwise set " "the lock to a locked state and return ``True``." msgstr "" -#: ../../library/multiprocessing.rst:1421 +#: ../../library/multiprocessing.rst:1423 msgid "" "When invoked with a positive, floating-point value for *timeout*, block for " "at most the number of seconds specified by *timeout* as long as the lock can " @@ -1924,24 +1927,24 @@ msgid "" "acquired or ``False`` if the timeout period has elapsed." msgstr "" -#: ../../library/multiprocessing.rst:1436 +#: ../../library/multiprocessing.rst:1438 msgid "" "Release a lock. This can be called from any process or thread, not only the " "process or thread which originally acquired the lock." msgstr "" -#: ../../library/multiprocessing.rst:1439 +#: ../../library/multiprocessing.rst:1441 msgid "" "Behavior is the same as in :meth:`threading.Lock.release` except that when " "invoked on an unlocked lock, a :exc:`ValueError` is raised." msgstr "" -#: ../../library/multiprocessing.rst:1445 -#: ../../library/multiprocessing.rst:1512 +#: ../../library/multiprocessing.rst:1447 +#: ../../library/multiprocessing.rst:1514 msgid "Return a boolean indicating whether this object is locked right now." msgstr "" -#: ../../library/multiprocessing.rst:1452 +#: ../../library/multiprocessing.rst:1454 msgid "" "A recursive lock object: a close analog of :class:`threading.RLock`. A " "recursive lock must be released by the process or thread that acquired it. " @@ -1950,20 +1953,20 @@ msgid "" "release it once for each time it has been acquired." msgstr "" -#: ../../library/multiprocessing.rst:1458 +#: ../../library/multiprocessing.rst:1460 msgid "" "Note that :class:`RLock` is actually a factory function which returns an " "instance of ``multiprocessing.synchronize.RLock`` initialized with a default " "context." msgstr "" -#: ../../library/multiprocessing.rst:1462 +#: ../../library/multiprocessing.rst:1464 msgid "" ":class:`RLock` supports the :term:`context manager` protocol and thus may be " "used in :keyword:`with` statements." msgstr "" -#: ../../library/multiprocessing.rst:1470 +#: ../../library/multiprocessing.rst:1472 msgid "" "When invoked with the *block* argument set to ``True``, block until the lock " "is in an unlocked state (not owned by any process or thread) unless the lock " @@ -1976,7 +1979,7 @@ msgid "" "itself." msgstr "" -#: ../../library/multiprocessing.rst:1480 +#: ../../library/multiprocessing.rst:1482 msgid "" "When invoked with the *block* argument set to ``False``, do not block. If " "the lock has already been acquired (and thus is owned) by another process or " @@ -1987,14 +1990,14 @@ msgid "" "a return value of ``True``." msgstr "" -#: ../../library/multiprocessing.rst:1488 +#: ../../library/multiprocessing.rst:1490 msgid "" "Use and behaviors of the *timeout* argument are the same as in :meth:`Lock." "acquire`. Note that some of these behaviors of *timeout* differ from the " "implemented behaviors in :meth:`threading.RLock.acquire`." msgstr "" -#: ../../library/multiprocessing.rst:1495 +#: ../../library/multiprocessing.rst:1497 msgid "" "Release a lock, decrementing the recursion level. If after the decrement " "the recursion level is zero, reset the lock to unlocked (not owned by any " @@ -2004,7 +2007,7 @@ msgid "" "locked and owned by the calling process or thread." msgstr "" -#: ../../library/multiprocessing.rst:1503 +#: ../../library/multiprocessing.rst:1505 msgid "" "Only call this method when the calling process or thread owns the lock. An :" "exc:`AssertionError` is raised if this method is called by a process or " @@ -2013,17 +2016,17 @@ msgid "" "from the implemented behavior in :meth:`threading.RLock.release`." msgstr "" -#: ../../library/multiprocessing.rst:1519 +#: ../../library/multiprocessing.rst:1521 msgid "A semaphore object: a close analog of :class:`threading.Semaphore`." msgstr "" -#: ../../library/multiprocessing.rst:1526 +#: ../../library/multiprocessing.rst:1528 msgid "" "On macOS, ``sem_timedwait`` is unsupported, so calling ``acquire()`` with a " "timeout will emulate that function's behavior using a sleeping loop." msgstr "" -#: ../../library/multiprocessing.rst:1531 +#: ../../library/multiprocessing.rst:1533 msgid "" "Some of this package's functionality requires a functioning shared semaphore " "implementation on the host operating system. Without one, the :mod:" @@ -2032,32 +2035,32 @@ msgid "" "additional information." msgstr "" -#: ../../library/multiprocessing.rst:1539 +#: ../../library/multiprocessing.rst:1541 msgid "Shared :mod:`ctypes` Objects" msgstr "" -#: ../../library/multiprocessing.rst:1541 +#: ../../library/multiprocessing.rst:1543 msgid "" "It is possible to create shared objects using shared memory which can be " "inherited by child processes." msgstr "" -#: ../../library/multiprocessing.rst:1546 +#: ../../library/multiprocessing.rst:1548 msgid "" "Return a :mod:`ctypes` object allocated from shared memory. By default the " "return value is actually a synchronized wrapper for the object. The object " "itself can be accessed via the *value* attribute of a :class:`Value`." msgstr "" -#: ../../library/multiprocessing.rst:1550 -#: ../../library/multiprocessing.rst:1637 +#: ../../library/multiprocessing.rst:1552 +#: ../../library/multiprocessing.rst:1639 msgid "" "*typecode_or_type* determines the type of the returned object: it is either " "a ctypes type or a one character typecode of the kind used by the :mod:" "`array` module. *\\*args* is passed on to the constructor for the type." msgstr "" -#: ../../library/multiprocessing.rst:1554 +#: ../../library/multiprocessing.rst:1556 msgid "" "If *lock* is ``True`` (the default) then a new recursive lock object is " "created to synchronize access to the value. If *lock* is a :class:`Lock` " @@ -2067,42 +2070,42 @@ msgid "" "\"process-safe\"." msgstr "" -#: ../../library/multiprocessing.rst:1561 +#: ../../library/multiprocessing.rst:1563 msgid "" "Operations like ``+=`` which involve a read and write are not atomic. So " "if, for instance, you want to atomically increment a shared value it is " "insufficient to just do ::" msgstr "" -#: ../../library/multiprocessing.rst:1565 +#: ../../library/multiprocessing.rst:1567 msgid "counter.value += 1" msgstr "" -#: ../../library/multiprocessing.rst:1567 +#: ../../library/multiprocessing.rst:1569 msgid "" "Assuming the associated lock is recursive (which it is by default) you can " "instead do ::" msgstr "" -#: ../../library/multiprocessing.rst:1570 +#: ../../library/multiprocessing.rst:1572 msgid "" "with counter.get_lock():\n" " counter.value += 1" msgstr "" -#: ../../library/multiprocessing.rst:1573 -#: ../../library/multiprocessing.rst:1663 -#: ../../library/multiprocessing.rst:1678 +#: ../../library/multiprocessing.rst:1575 +#: ../../library/multiprocessing.rst:1665 +#: ../../library/multiprocessing.rst:1680 msgid "Note that *lock* is a keyword-only argument." msgstr "" -#: ../../library/multiprocessing.rst:1577 +#: ../../library/multiprocessing.rst:1579 msgid "" "Return a ctypes array allocated from shared memory. By default the return " "value is actually a synchronized wrapper for the array." msgstr "" -#: ../../library/multiprocessing.rst:1580 +#: ../../library/multiprocessing.rst:1582 msgid "" "*typecode_or_type* determines the type of the elements of the returned " "array: it is either a ctypes type or a one character typecode of the kind " @@ -2112,7 +2115,7 @@ msgid "" "initialize the array and whose length determines the length of the array." msgstr "" -#: ../../library/multiprocessing.rst:1587 +#: ../../library/multiprocessing.rst:1589 msgid "" "If *lock* is ``True`` (the default) then a new lock object is created to " "synchronize access to the value. If *lock* is a :class:`Lock` or :class:" @@ -2122,28 +2125,28 @@ msgid "" "safe\"." msgstr "" -#: ../../library/multiprocessing.rst:1594 +#: ../../library/multiprocessing.rst:1596 msgid "Note that *lock* is a keyword only argument." msgstr "" -#: ../../library/multiprocessing.rst:1596 +#: ../../library/multiprocessing.rst:1598 msgid "" "Note that an array of :data:`ctypes.c_char` has *value* and *raw* attributes " "which allow one to use it to store and retrieve strings." msgstr "" -#: ../../library/multiprocessing.rst:1601 +#: ../../library/multiprocessing.rst:1603 msgid "The :mod:`multiprocessing.sharedctypes` module" msgstr "" -#: ../../library/multiprocessing.rst:1606 +#: ../../library/multiprocessing.rst:1608 msgid "" "The :mod:`multiprocessing.sharedctypes` module provides functions for " "allocating :mod:`ctypes` objects from shared memory which can be inherited " "by child processes." msgstr "" -#: ../../library/multiprocessing.rst:1612 +#: ../../library/multiprocessing.rst:1614 msgid "" "Although it is possible to store a pointer in shared memory remember that " "this will refer to a location in the address space of a specific process. " @@ -2152,11 +2155,11 @@ msgid "" "may cause a crash." msgstr "" -#: ../../library/multiprocessing.rst:1620 +#: ../../library/multiprocessing.rst:1622 msgid "Return a ctypes array allocated from shared memory." msgstr "" -#: ../../library/multiprocessing.rst:1622 +#: ../../library/multiprocessing.rst:1624 msgid "" "*typecode_or_type* determines the type of the elements of the returned " "array: it is either a ctypes type or a one character typecode of the kind " @@ -2166,40 +2169,40 @@ msgid "" "initialize the array and whose length determines the length of the array." msgstr "" -#: ../../library/multiprocessing.rst:1629 +#: ../../library/multiprocessing.rst:1631 msgid "" "Note that setting and getting an element is potentially non-atomic -- use :" "func:`Array` instead to make sure that access is automatically synchronized " "using a lock." msgstr "" -#: ../../library/multiprocessing.rst:1635 +#: ../../library/multiprocessing.rst:1637 msgid "Return a ctypes object allocated from shared memory." msgstr "" -#: ../../library/multiprocessing.rst:1641 +#: ../../library/multiprocessing.rst:1643 msgid "" "Note that setting and getting the value is potentially non-atomic -- use :" "func:`Value` instead to make sure that access is automatically synchronized " "using a lock." msgstr "" -#: ../../library/multiprocessing.rst:1645 +#: ../../library/multiprocessing.rst:1647 msgid "" "Note that an array of :data:`ctypes.c_char` has ``value`` and ``raw`` " "attributes which allow one to use it to store and retrieve strings -- see " "documentation for :mod:`ctypes`." msgstr "" -#: ../../library/multiprocessing.rst:1651 +#: ../../library/multiprocessing.rst:1653 msgid "" "The same as :func:`RawArray` except that depending on the value of *lock* a " "process-safe synchronization wrapper may be returned instead of a raw ctypes " "array." msgstr "" -#: ../../library/multiprocessing.rst:1655 -#: ../../library/multiprocessing.rst:1671 +#: ../../library/multiprocessing.rst:1657 +#: ../../library/multiprocessing.rst:1673 msgid "" "If *lock* is ``True`` (the default) then a new lock object is created to " "synchronize access to the value. If *lock* is a :class:`~multiprocessing." @@ -2209,113 +2212,113 @@ msgid "" "not necessarily be \"process-safe\"." msgstr "" -#: ../../library/multiprocessing.rst:1667 +#: ../../library/multiprocessing.rst:1669 msgid "" "The same as :func:`RawValue` except that depending on the value of *lock* a " "process-safe synchronization wrapper may be returned instead of a raw ctypes " "object." msgstr "" -#: ../../library/multiprocessing.rst:1682 +#: ../../library/multiprocessing.rst:1684 msgid "" "Return a ctypes object allocated from shared memory which is a copy of the " "ctypes object *obj*." msgstr "" -#: ../../library/multiprocessing.rst:1687 +#: ../../library/multiprocessing.rst:1689 msgid "" "Return a process-safe wrapper object for a ctypes object which uses *lock* " "to synchronize access. If *lock* is ``None`` (the default) then a :class:" "`multiprocessing.RLock` object is created automatically." msgstr "" -#: ../../library/multiprocessing.rst:1691 +#: ../../library/multiprocessing.rst:1693 msgid "" "A synchronized wrapper will have two methods in addition to those of the " "object it wraps: :meth:`get_obj` returns the wrapped object and :meth:" "`get_lock` returns the lock object used for synchronization." msgstr "" -#: ../../library/multiprocessing.rst:1695 +#: ../../library/multiprocessing.rst:1697 msgid "" "Note that accessing the ctypes object through the wrapper can be a lot " "slower than accessing the raw ctypes object." msgstr "" -#: ../../library/multiprocessing.rst:1698 +#: ../../library/multiprocessing.rst:1700 msgid "Synchronized objects support the :term:`context manager` protocol." msgstr "" -#: ../../library/multiprocessing.rst:1702 +#: ../../library/multiprocessing.rst:1704 msgid "" "The table below compares the syntax for creating shared ctypes objects from " "shared memory with the normal ctypes syntax. (In the table ``MyStruct`` is " "some subclass of :class:`ctypes.Structure`.)" msgstr "" -#: ../../library/multiprocessing.rst:1707 +#: ../../library/multiprocessing.rst:1709 msgid "ctypes" msgstr "" -#: ../../library/multiprocessing.rst:1707 +#: ../../library/multiprocessing.rst:1709 msgid "sharedctypes using type" msgstr "" -#: ../../library/multiprocessing.rst:1707 +#: ../../library/multiprocessing.rst:1709 msgid "sharedctypes using typecode" msgstr "" -#: ../../library/multiprocessing.rst:1709 +#: ../../library/multiprocessing.rst:1711 msgid "c_double(2.4)" msgstr "" -#: ../../library/multiprocessing.rst:1709 +#: ../../library/multiprocessing.rst:1711 msgid "RawValue(c_double, 2.4)" msgstr "" -#: ../../library/multiprocessing.rst:1709 +#: ../../library/multiprocessing.rst:1711 msgid "RawValue('d', 2.4)" msgstr "" -#: ../../library/multiprocessing.rst:1710 +#: ../../library/multiprocessing.rst:1712 msgid "MyStruct(4, 6)" msgstr "" -#: ../../library/multiprocessing.rst:1710 +#: ../../library/multiprocessing.rst:1712 msgid "RawValue(MyStruct, 4, 6)" msgstr "" -#: ../../library/multiprocessing.rst:1711 +#: ../../library/multiprocessing.rst:1713 msgid "(c_short * 7)()" msgstr "" -#: ../../library/multiprocessing.rst:1711 +#: ../../library/multiprocessing.rst:1713 msgid "RawArray(c_short, 7)" msgstr "" -#: ../../library/multiprocessing.rst:1711 +#: ../../library/multiprocessing.rst:1713 msgid "RawArray('h', 7)" msgstr "" -#: ../../library/multiprocessing.rst:1712 +#: ../../library/multiprocessing.rst:1714 msgid "(c_int * 3)(9, 2, 8)" msgstr "" -#: ../../library/multiprocessing.rst:1712 +#: ../../library/multiprocessing.rst:1714 msgid "RawArray(c_int, (9, 2, 8))" msgstr "" -#: ../../library/multiprocessing.rst:1712 +#: ../../library/multiprocessing.rst:1714 msgid "RawArray('i', (9, 2, 8))" msgstr "" -#: ../../library/multiprocessing.rst:1716 +#: ../../library/multiprocessing.rst:1718 msgid "" "Below is an example where a number of ctypes objects are modified by a child " "process::" msgstr "" -#: ../../library/multiprocessing.rst:1719 +#: ../../library/multiprocessing.rst:1721 msgid "" "from multiprocessing import Process, Lock\n" "from multiprocessing.sharedctypes import Value, Array\n" @@ -2350,11 +2353,11 @@ msgid "" " print([(a.x, a.y) for a in A])" msgstr "" -#: ../../library/multiprocessing.rst:1754 +#: ../../library/multiprocessing.rst:1756 msgid "The results printed are ::" msgstr "" -#: ../../library/multiprocessing.rst:1756 +#: ../../library/multiprocessing.rst:1758 msgid "" "49\n" "0.1111111111111111\n" @@ -2362,11 +2365,11 @@ msgid "" "[(3.515625, 39.0625), (33.0625, 4.0), (5.640625, 90.25)]" msgstr "" -#: ../../library/multiprocessing.rst:1767 +#: ../../library/multiprocessing.rst:1769 msgid "Managers" msgstr "" -#: ../../library/multiprocessing.rst:1769 +#: ../../library/multiprocessing.rst:1771 msgid "" "Managers provide a way to create data which can be shared between different " "processes, including sharing over a network between processes running on " @@ -2375,7 +2378,7 @@ msgid "" "proxies." msgstr "" -#: ../../library/multiprocessing.rst:1778 +#: ../../library/multiprocessing.rst:1780 msgid "" "Returns a started :class:`~multiprocessing.managers.SyncManager` object " "which can be used for sharing objects between processes. The returned " @@ -2383,31 +2386,31 @@ msgid "" "will create shared objects and return corresponding proxies." msgstr "" -#: ../../library/multiprocessing.rst:1786 +#: ../../library/multiprocessing.rst:1788 msgid "" "Manager processes will be shutdown as soon as they are garbage collected or " "their parent process exits. The manager classes are defined in the :mod:" "`multiprocessing.managers` module:" msgstr "" -#: ../../library/multiprocessing.rst:1792 +#: ../../library/multiprocessing.rst:1794 msgid "Create a BaseManager object." msgstr "" -#: ../../library/multiprocessing.rst:1794 +#: ../../library/multiprocessing.rst:1796 msgid "" "Once created one should call :meth:`start` or ``get_server()." "serve_forever()`` to ensure that the manager object refers to a started " "manager process." msgstr "" -#: ../../library/multiprocessing.rst:1797 +#: ../../library/multiprocessing.rst:1799 msgid "" "*address* is the address on which the manager process listens for new " "connections. If *address* is ``None`` then an arbitrary one is chosen." msgstr "" -#: ../../library/multiprocessing.rst:1800 +#: ../../library/multiprocessing.rst:1802 msgid "" "*authkey* is the authentication key which will be used to check the validity " "of incoming connections to the server process. If *authkey* is ``None`` " @@ -2415,19 +2418,19 @@ msgid "" "it must be a byte string." msgstr "" -#: ../../library/multiprocessing.rst:1805 +#: ../../library/multiprocessing.rst:1807 msgid "" "*serializer* must be ``'pickle'`` (use :mod:`pickle` serialization) or " "``'xmlrpclib'`` (use :mod:`xmlrpc.client` serialization)." msgstr "" -#: ../../library/multiprocessing.rst:1808 +#: ../../library/multiprocessing.rst:1810 msgid "" "*ctx* is a context object, or ``None`` (use the current context). See the :" "func:`get_context` function." msgstr "" -#: ../../library/multiprocessing.rst:1811 +#: ../../library/multiprocessing.rst:1813 msgid "" "*shutdown_timeout* is a timeout in seconds used to wait until the process " "used by the manager completes in the :meth:`shutdown` method. If the " @@ -2435,24 +2438,24 @@ msgid "" "also times out, the process is killed." msgstr "" -#: ../../library/multiprocessing.rst:1816 +#: ../../library/multiprocessing.rst:1818 msgid "Added the *shutdown_timeout* parameter." msgstr "" -#: ../../library/multiprocessing.rst:1821 +#: ../../library/multiprocessing.rst:1823 msgid "" "Start a subprocess to start the manager. If *initializer* is not ``None`` " "then the subprocess will call ``initializer(*initargs)`` when it starts." msgstr "" -#: ../../library/multiprocessing.rst:1826 +#: ../../library/multiprocessing.rst:1828 msgid "" "Returns a :class:`Server` object which represents the actual server under " "the control of the Manager. The :class:`Server` object supports the :meth:" "`serve_forever` method::" msgstr "" -#: ../../library/multiprocessing.rst:1830 +#: ../../library/multiprocessing.rst:1832 msgid "" ">>> from multiprocessing.managers import BaseManager\n" ">>> manager = BaseManager(address=('', 50000), authkey=b'abc')\n" @@ -2460,44 +2463,44 @@ msgid "" ">>> server.serve_forever()" msgstr "" -#: ../../library/multiprocessing.rst:1835 +#: ../../library/multiprocessing.rst:1837 msgid ":class:`Server` additionally has an :attr:`address` attribute." msgstr "" -#: ../../library/multiprocessing.rst:1839 +#: ../../library/multiprocessing.rst:1841 msgid "Connect a local manager object to a remote manager process::" msgstr "" -#: ../../library/multiprocessing.rst:1841 +#: ../../library/multiprocessing.rst:1843 msgid "" ">>> from multiprocessing.managers import BaseManager\n" ">>> m = BaseManager(address=('127.0.0.1', 50000), authkey=b'abc')\n" ">>> m.connect()" msgstr "" -#: ../../library/multiprocessing.rst:1847 +#: ../../library/multiprocessing.rst:1849 msgid "" "Stop the process used by the manager. This is only available if :meth:" "`start` has been used to start the server process." msgstr "" -#: ../../library/multiprocessing.rst:1850 +#: ../../library/multiprocessing.rst:1852 msgid "This can be called multiple times." msgstr "" -#: ../../library/multiprocessing.rst:1854 +#: ../../library/multiprocessing.rst:1856 msgid "" "A classmethod which can be used for registering a type or callable with the " "manager class." msgstr "" -#: ../../library/multiprocessing.rst:1857 +#: ../../library/multiprocessing.rst:1859 msgid "" "*typeid* is a \"type identifier\" which is used to identify a particular " "type of shared object. This must be a string." msgstr "" -#: ../../library/multiprocessing.rst:1860 +#: ../../library/multiprocessing.rst:1862 msgid "" "*callable* is a callable used for creating objects for this type " "identifier. If a manager instance will be connected to the server using " @@ -2505,14 +2508,14 @@ msgid "" "then this can be left as ``None``." msgstr "" -#: ../../library/multiprocessing.rst:1866 +#: ../../library/multiprocessing.rst:1868 msgid "" "*proxytype* is a subclass of :class:`BaseProxy` which is used to create " "proxies for shared objects with this *typeid*. If ``None`` then a proxy " "class is created automatically." msgstr "" -#: ../../library/multiprocessing.rst:1870 +#: ../../library/multiprocessing.rst:1872 msgid "" "*exposed* is used to specify a sequence of method names which proxies for " "this typeid should be allowed to access using :meth:`BaseProxy." @@ -2523,7 +2526,7 @@ msgid "" "method and whose name does not begin with ``'_'``.)" msgstr "" -#: ../../library/multiprocessing.rst:1879 +#: ../../library/multiprocessing.rst:1881 msgid "" "*method_to_typeid* is a mapping used to specify the return type of those " "exposed methods which should return a proxy. It maps method names to typeid " @@ -2533,22 +2536,22 @@ msgid "" "returned by the method will be copied by value." msgstr "" -#: ../../library/multiprocessing.rst:1886 +#: ../../library/multiprocessing.rst:1888 msgid "" "*create_method* determines whether a method should be created with name " "*typeid* which can be used to tell the server process to create a new shared " "object and return a proxy for it. By default it is ``True``." msgstr "" -#: ../../library/multiprocessing.rst:1890 +#: ../../library/multiprocessing.rst:1892 msgid ":class:`BaseManager` instances also have one read-only property:" msgstr "" -#: ../../library/multiprocessing.rst:1894 +#: ../../library/multiprocessing.rst:1896 msgid "The address used by the manager." msgstr "" -#: ../../library/multiprocessing.rst:1896 +#: ../../library/multiprocessing.rst:1898 msgid "" "Manager objects support the context management protocol -- see :ref:" "`typecontextmanager`. :meth:`~contextmanager.__enter__` starts the server " @@ -2556,129 +2559,129 @@ msgid "" "object. :meth:`~contextmanager.__exit__` calls :meth:`shutdown`." msgstr "" -#: ../../library/multiprocessing.rst:1902 +#: ../../library/multiprocessing.rst:1904 msgid "" "In previous versions :meth:`~contextmanager.__enter__` did not start the " "manager's server process if it was not already started." msgstr "" -#: ../../library/multiprocessing.rst:1907 +#: ../../library/multiprocessing.rst:1909 msgid "" "A subclass of :class:`BaseManager` which can be used for the synchronization " "of processes. Objects of this type are returned by :func:`multiprocessing." "Manager`." msgstr "" -#: ../../library/multiprocessing.rst:1911 +#: ../../library/multiprocessing.rst:1913 msgid "" "Its methods create and return :ref:`multiprocessing-proxy_objects` for a " "number of commonly used data types to be synchronized across processes. This " "notably includes shared lists and dictionaries." msgstr "" -#: ../../library/multiprocessing.rst:1917 +#: ../../library/multiprocessing.rst:1919 msgid "" "Create a shared :class:`threading.Barrier` object and return a proxy for it." msgstr "" -#: ../../library/multiprocessing.rst:1924 +#: ../../library/multiprocessing.rst:1926 msgid "" "Create a shared :class:`threading.BoundedSemaphore` object and return a " "proxy for it." msgstr "" -#: ../../library/multiprocessing.rst:1929 +#: ../../library/multiprocessing.rst:1931 msgid "" "Create a shared :class:`threading.Condition` object and return a proxy for " "it." msgstr "" -#: ../../library/multiprocessing.rst:1932 +#: ../../library/multiprocessing.rst:1934 msgid "" "If *lock* is supplied then it should be a proxy for a :class:`threading." "Lock` or :class:`threading.RLock` object." msgstr "" -#: ../../library/multiprocessing.rst:1940 +#: ../../library/multiprocessing.rst:1942 msgid "" "Create a shared :class:`threading.Event` object and return a proxy for it." msgstr "" -#: ../../library/multiprocessing.rst:1944 +#: ../../library/multiprocessing.rst:1946 msgid "" "Create a shared :class:`threading.Lock` object and return a proxy for it." msgstr "" -#: ../../library/multiprocessing.rst:1948 +#: ../../library/multiprocessing.rst:1950 msgid "Create a shared :class:`Namespace` object and return a proxy for it." msgstr "" -#: ../../library/multiprocessing.rst:1952 +#: ../../library/multiprocessing.rst:1954 msgid "Create a shared :class:`queue.Queue` object and return a proxy for it." msgstr "" -#: ../../library/multiprocessing.rst:1956 +#: ../../library/multiprocessing.rst:1958 msgid "" "Create a shared :class:`threading.RLock` object and return a proxy for it." msgstr "" -#: ../../library/multiprocessing.rst:1960 +#: ../../library/multiprocessing.rst:1962 msgid "" "Create a shared :class:`threading.Semaphore` object and return a proxy for " "it." msgstr "" -#: ../../library/multiprocessing.rst:1965 +#: ../../library/multiprocessing.rst:1967 msgid "Create an array and return a proxy for it." msgstr "" -#: ../../library/multiprocessing.rst:1969 +#: ../../library/multiprocessing.rst:1971 msgid "" "Create an object with a writable ``value`` attribute and return a proxy for " "it." msgstr "" -#: ../../library/multiprocessing.rst:1976 +#: ../../library/multiprocessing.rst:1978 msgid "Create a shared :class:`dict` object and return a proxy for it." msgstr "" -#: ../../library/multiprocessing.rst:1981 +#: ../../library/multiprocessing.rst:1983 msgid "Create a shared :class:`list` object and return a proxy for it." msgstr "" -#: ../../library/multiprocessing.rst:1987 +#: ../../library/multiprocessing.rst:1989 msgid "Create a shared :class:`set` object and return a proxy for it." msgstr "" -#: ../../library/multiprocessing.rst:1989 +#: ../../library/multiprocessing.rst:1991 msgid ":class:`set` support was added." msgstr "" -#: ../../library/multiprocessing.rst:1992 +#: ../../library/multiprocessing.rst:1994 msgid "" "Shared objects are capable of being nested. For example, a shared container " "object such as a shared list can contain other shared objects which will all " "be managed and synchronized by the :class:`SyncManager`." msgstr "" -#: ../../library/multiprocessing.rst:1999 +#: ../../library/multiprocessing.rst:2001 msgid "A type that can register with :class:`SyncManager`." msgstr "" -#: ../../library/multiprocessing.rst:2001 +#: ../../library/multiprocessing.rst:2003 msgid "" "A namespace object has no public methods, but does have writable attributes. " "Its representation shows the values of its attributes." msgstr "" -#: ../../library/multiprocessing.rst:2004 +#: ../../library/multiprocessing.rst:2006 msgid "" "However, when using a proxy for a namespace object, an attribute beginning " "with ``'_'`` will be an attribute of the proxy and not an attribute of the " "referent:" msgstr "" -#: ../../library/multiprocessing.rst:2008 +#: ../../library/multiprocessing.rst:2010 msgid "" ">>> mp_context = multiprocessing.get_context('spawn')\n" ">>> manager = mp_context.Manager()\n" @@ -2690,18 +2693,18 @@ msgid "" "Namespace(x=10, y='hello')" msgstr "" -#: ../../library/multiprocessing.rst:2021 +#: ../../library/multiprocessing.rst:2023 msgid "Customized managers" msgstr "" -#: ../../library/multiprocessing.rst:2023 +#: ../../library/multiprocessing.rst:2025 msgid "" "To create one's own manager, one creates a subclass of :class:`BaseManager` " "and uses the :meth:`~BaseManager.register` classmethod to register new types " "or callables with the manager class. For example::" msgstr "" -#: ../../library/multiprocessing.rst:2027 +#: ../../library/multiprocessing.rst:2029 msgid "" "from multiprocessing.managers import BaseManager\n" "\n" @@ -2723,23 +2726,23 @@ msgid "" " print(maths.mul(7, 8)) # prints 56" msgstr "" -#: ../../library/multiprocessing.rst:2048 +#: ../../library/multiprocessing.rst:2050 msgid "Using a remote manager" msgstr "" -#: ../../library/multiprocessing.rst:2050 +#: ../../library/multiprocessing.rst:2052 msgid "" "It is possible to run a manager server on one machine and have clients use " "it from other machines (assuming that the firewalls involved allow it)." msgstr "" -#: ../../library/multiprocessing.rst:2053 +#: ../../library/multiprocessing.rst:2055 msgid "" "Running the following commands creates a server for a single shared queue " "which remote clients can access::" msgstr "" -#: ../../library/multiprocessing.rst:2056 +#: ../../library/multiprocessing.rst:2058 msgid "" ">>> from multiprocessing.managers import BaseManager\n" ">>> from queue import Queue\n" @@ -2751,11 +2754,11 @@ msgid "" ">>> s.serve_forever()" msgstr "" -#: ../../library/multiprocessing.rst:2065 +#: ../../library/multiprocessing.rst:2067 msgid "One client can access the server as follows::" msgstr "" -#: ../../library/multiprocessing.rst:2067 +#: ../../library/multiprocessing.rst:2069 msgid "" ">>> from multiprocessing.managers import BaseManager\n" ">>> class QueueManager(BaseManager): pass\n" @@ -2767,11 +2770,11 @@ msgid "" ">>> queue.put('hello')" msgstr "" -#: ../../library/multiprocessing.rst:2075 +#: ../../library/multiprocessing.rst:2077 msgid "Another client can also use it::" msgstr "" -#: ../../library/multiprocessing.rst:2077 +#: ../../library/multiprocessing.rst:2079 msgid "" ">>> from multiprocessing.managers import BaseManager\n" ">>> class QueueManager(BaseManager): pass\n" @@ -2784,13 +2787,13 @@ msgid "" "'hello'" msgstr "" -#: ../../library/multiprocessing.rst:2086 +#: ../../library/multiprocessing.rst:2088 msgid "" "Local processes can also access that queue, using the code from above on the " "client to access it remotely::" msgstr "" -#: ../../library/multiprocessing.rst:2089 +#: ../../library/multiprocessing.rst:2091 msgid "" ">>> from multiprocessing import Process, Queue\n" ">>> from multiprocessing.managers import BaseManager\n" @@ -2812,18 +2815,18 @@ msgid "" ">>> s.serve_forever()" msgstr "" -#: ../../library/multiprocessing.rst:2111 +#: ../../library/multiprocessing.rst:2113 msgid "Proxy Objects" msgstr "" -#: ../../library/multiprocessing.rst:2113 +#: ../../library/multiprocessing.rst:2115 msgid "" "A proxy is an object which *refers* to a shared object which lives " "(presumably) in a different process. The shared object is said to be the " "*referent* of the proxy. Multiple proxy objects may have the same referent." msgstr "" -#: ../../library/multiprocessing.rst:2117 +#: ../../library/multiprocessing.rst:2119 msgid "" "A proxy object has methods which invoke corresponding methods of its " "referent (although not every method of the referent will necessarily be " @@ -2831,7 +2834,7 @@ msgid "" "its referent can:" msgstr "" -#: ../../library/multiprocessing.rst:2121 +#: ../../library/multiprocessing.rst:2123 msgid "" ">>> mp_context = multiprocessing.get_context('spawn')\n" ">>> manager = mp_context.Manager()\n" @@ -2846,14 +2849,14 @@ msgid "" "[4, 9, 16]" msgstr "" -#: ../../library/multiprocessing.rst:2135 +#: ../../library/multiprocessing.rst:2137 msgid "" "Notice that applying :func:`str` to a proxy will return the representation " "of the referent, whereas applying :func:`repr` will return the " "representation of the proxy." msgstr "" -#: ../../library/multiprocessing.rst:2139 +#: ../../library/multiprocessing.rst:2141 msgid "" "An important feature of proxy objects is that they are picklable so they can " "be passed between processes. As such, a referent can contain :ref:" @@ -2861,7 +2864,7 @@ msgid "" "lists, dicts, and other :ref:`multiprocessing-proxy_objects`:" msgstr "" -#: ../../library/multiprocessing.rst:2144 +#: ../../library/multiprocessing.rst:2146 msgid "" ">>> a = manager.list()\n" ">>> b = manager.list()\n" @@ -2873,11 +2876,11 @@ msgid "" "['hello'] ['hello']" msgstr "" -#: ../../library/multiprocessing.rst:2155 +#: ../../library/multiprocessing.rst:2157 msgid "Similarly, dict and list proxies may be nested inside one another::" msgstr "" -#: ../../library/multiprocessing.rst:2157 +#: ../../library/multiprocessing.rst:2159 msgid "" ">>> l_outer = manager.list([ manager.dict() for i in range(2) ])\n" ">>> d_first_inner = l_outer[0]\n" @@ -2891,7 +2894,7 @@ msgid "" "{'c': 3, 'z': 26}" msgstr "" -#: ../../library/multiprocessing.rst:2168 +#: ../../library/multiprocessing.rst:2170 msgid "" "If standard (non-proxy) :class:`list` or :class:`dict` objects are contained " "in a referent, modifications to those mutable values will not be propagated " @@ -2902,7 +2905,7 @@ msgid "" "assign the modified value to the container proxy::" msgstr "" -#: ../../library/multiprocessing.rst:2176 +#: ../../library/multiprocessing.rst:2178 msgid "" "# create a list proxy and append a mutable object (a dictionary)\n" "lproxy = manager.list()\n" @@ -2916,67 +2919,67 @@ msgid "" "lproxy[0] = d" msgstr "" -#: ../../library/multiprocessing.rst:2187 +#: ../../library/multiprocessing.rst:2189 msgid "" "This approach is perhaps less convenient than employing nested :ref:" "`multiprocessing-proxy_objects` for most use cases but also demonstrates a " "level of control over the synchronization." msgstr "" -#: ../../library/multiprocessing.rst:2193 +#: ../../library/multiprocessing.rst:2195 msgid "" "The proxy types in :mod:`multiprocessing` do nothing to support comparisons " "by value. So, for instance, we have:" msgstr "" -#: ../../library/multiprocessing.rst:2196 +#: ../../library/multiprocessing.rst:2198 msgid "" ">>> manager.list([1,2,3]) == [1,2,3]\n" "False" msgstr "" -#: ../../library/multiprocessing.rst:2201 +#: ../../library/multiprocessing.rst:2203 msgid "" "One should just use a copy of the referent instead when making comparisons." msgstr "" -#: ../../library/multiprocessing.rst:2205 +#: ../../library/multiprocessing.rst:2207 msgid "Proxy objects are instances of subclasses of :class:`BaseProxy`." msgstr "" -#: ../../library/multiprocessing.rst:2209 +#: ../../library/multiprocessing.rst:2211 msgid "Call and return the result of a method of the proxy's referent." msgstr "" -#: ../../library/multiprocessing.rst:2211 +#: ../../library/multiprocessing.rst:2213 msgid "" "If ``proxy`` is a proxy whose referent is ``obj`` then the expression ::" msgstr "" -#: ../../library/multiprocessing.rst:2213 +#: ../../library/multiprocessing.rst:2215 msgid "proxy._callmethod(methodname, args, kwds)" msgstr "" -#: ../../library/multiprocessing.rst:2215 +#: ../../library/multiprocessing.rst:2217 msgid "will evaluate the expression ::" msgstr "" -#: ../../library/multiprocessing.rst:2217 +#: ../../library/multiprocessing.rst:2219 msgid "getattr(obj, methodname)(*args, **kwds)" msgstr "" -#: ../../library/multiprocessing.rst:2219 +#: ../../library/multiprocessing.rst:2221 msgid "in the manager's process." msgstr "" -#: ../../library/multiprocessing.rst:2221 +#: ../../library/multiprocessing.rst:2223 msgid "" "The returned value will be a copy of the result of the call or a proxy to a " "new shared object -- see documentation for the *method_to_typeid* argument " "of :meth:`BaseManager.register`." msgstr "" -#: ../../library/multiprocessing.rst:2225 +#: ../../library/multiprocessing.rst:2227 msgid "" "If an exception is raised by the call, then is re-raised by :meth:" "`_callmethod`. If some other exception is raised in the manager's process " @@ -2984,17 +2987,17 @@ msgid "" "meth:`_callmethod`." msgstr "" -#: ../../library/multiprocessing.rst:2230 +#: ../../library/multiprocessing.rst:2232 msgid "" "Note in particular that an exception will be raised if *methodname* has not " "been *exposed*." msgstr "" -#: ../../library/multiprocessing.rst:2233 +#: ../../library/multiprocessing.rst:2235 msgid "An example of the usage of :meth:`_callmethod`:" msgstr "" -#: ../../library/multiprocessing.rst:2235 +#: ../../library/multiprocessing.rst:2237 msgid "" ">>> l = manager.list(range(10))\n" ">>> l._callmethod('__len__')\n" @@ -3007,69 +3010,69 @@ msgid "" "IndexError: list index out of range" msgstr "" -#: ../../library/multiprocessing.rst:2249 +#: ../../library/multiprocessing.rst:2251 msgid "Return a copy of the referent." msgstr "" -#: ../../library/multiprocessing.rst:2251 +#: ../../library/multiprocessing.rst:2253 msgid "If the referent is unpicklable then this will raise an exception." msgstr "" -#: ../../library/multiprocessing.rst:2255 +#: ../../library/multiprocessing.rst:2257 msgid "Return a representation of the proxy object." msgstr "" -#: ../../library/multiprocessing.rst:2259 +#: ../../library/multiprocessing.rst:2261 msgid "Return the representation of the referent." msgstr "" -#: ../../library/multiprocessing.rst:2263 +#: ../../library/multiprocessing.rst:2265 msgid "Cleanup" msgstr "" -#: ../../library/multiprocessing.rst:2265 +#: ../../library/multiprocessing.rst:2267 msgid "" "A proxy object uses a weakref callback so that when it gets garbage " "collected it deregisters itself from the manager which owns its referent." msgstr "" -#: ../../library/multiprocessing.rst:2268 +#: ../../library/multiprocessing.rst:2270 msgid "" "A shared object gets deleted from the manager process when there are no " "longer any proxies referring to it." msgstr "" -#: ../../library/multiprocessing.rst:2273 +#: ../../library/multiprocessing.rst:2275 msgid "Process Pools" msgstr "" -#: ../../library/multiprocessing.rst:2278 +#: ../../library/multiprocessing.rst:2280 msgid "" "One can create a pool of processes which will carry out tasks submitted to " "it with the :class:`Pool` class." msgstr "" -#: ../../library/multiprocessing.rst:2283 +#: ../../library/multiprocessing.rst:2285 msgid "" "A process pool object which controls a pool of worker processes to which " "jobs can be submitted. It supports asynchronous results with timeouts and " "callbacks and has a parallel map implementation." msgstr "" -#: ../../library/multiprocessing.rst:2287 +#: ../../library/multiprocessing.rst:2289 msgid "" "*processes* is the number of worker processes to use. If *processes* is " "``None`` then the number returned by :func:`os.process_cpu_count` is used." msgstr "" -#: ../../library/multiprocessing.rst:2290 -#: ../../library/multiprocessing.rst:2854 +#: ../../library/multiprocessing.rst:2292 +#: ../../library/multiprocessing.rst:2856 msgid "" "If *initializer* is not ``None`` then each worker process will call " "``initializer(*initargs)`` when it starts." msgstr "" -#: ../../library/multiprocessing.rst:2293 +#: ../../library/multiprocessing.rst:2295 msgid "" "*maxtasksperchild* is the number of tasks a worker process can complete " "before it will exit and be replaced with a fresh worker process, to enable " @@ -3077,7 +3080,7 @@ msgid "" "which means worker processes will live as long as the pool." msgstr "" -#: ../../library/multiprocessing.rst:2298 +#: ../../library/multiprocessing.rst:2300 msgid "" "*context* can be used to specify the context used for starting the worker " "processes. Usually a pool is created using the function :func:" @@ -3085,13 +3088,13 @@ msgid "" "both cases *context* is set appropriately." msgstr "" -#: ../../library/multiprocessing.rst:2304 +#: ../../library/multiprocessing.rst:2306 msgid "" "Note that the methods of the pool object should only be called by the " "process which created the pool." msgstr "" -#: ../../library/multiprocessing.rst:2308 +#: ../../library/multiprocessing.rst:2310 msgid "" ":class:`multiprocessing.pool` objects have internal resources that need to " "be properly managed (like any other resource) by using the pool as a context " @@ -3099,28 +3102,28 @@ msgid "" "to do this can lead to the process hanging on finalization." msgstr "" -#: ../../library/multiprocessing.rst:2313 +#: ../../library/multiprocessing.rst:2315 msgid "" "Note that it is **not correct** to rely on the garbage collector to destroy " "the pool as CPython does not assure that the finalizer of the pool will be " "called (see :meth:`object.__del__` for more information)." msgstr "" -#: ../../library/multiprocessing.rst:2317 +#: ../../library/multiprocessing.rst:2319 msgid "Added the *maxtasksperchild* parameter." msgstr "" -#: ../../library/multiprocessing.rst:2320 +#: ../../library/multiprocessing.rst:2322 msgid "Added the *context* parameter." msgstr "" -#: ../../library/multiprocessing.rst:2323 +#: ../../library/multiprocessing.rst:2325 msgid "" "*processes* uses :func:`os.process_cpu_count` by default, instead of :func:" "`os.cpu_count`." msgstr "" -#: ../../library/multiprocessing.rst:2329 +#: ../../library/multiprocessing.rst:2331 msgid "" "Worker processes within a :class:`Pool` typically live for the complete " "duration of the Pool's work queue. A frequent pattern found in other systems " @@ -3131,7 +3134,7 @@ msgid "" "ability to the end user." msgstr "" -#: ../../library/multiprocessing.rst:2339 +#: ../../library/multiprocessing.rst:2341 msgid "" "Call *func* with arguments *args* and keyword arguments *kwds*. It blocks " "until the result is ready. Given this blocks, :meth:`apply_async` is better " @@ -3139,14 +3142,14 @@ msgid "" "executed in one of the workers of the pool." msgstr "" -#: ../../library/multiprocessing.rst:2346 +#: ../../library/multiprocessing.rst:2348 msgid "" "A variant of the :meth:`apply` method which returns a :class:" "`~multiprocessing.pool.AsyncResult` object." msgstr "" -#: ../../library/multiprocessing.rst:2349 -#: ../../library/multiprocessing.rst:2380 +#: ../../library/multiprocessing.rst:2351 +#: ../../library/multiprocessing.rst:2382 msgid "" "If *callback* is specified then it should be a callable which accepts a " "single argument. When the result becomes ready *callback* is applied to it, " @@ -3154,60 +3157,60 @@ msgid "" "applied instead." msgstr "" -#: ../../library/multiprocessing.rst:2354 -#: ../../library/multiprocessing.rst:2385 +#: ../../library/multiprocessing.rst:2356 +#: ../../library/multiprocessing.rst:2387 msgid "" "If *error_callback* is specified then it should be a callable which accepts " "a single argument. If the target function fails, then the *error_callback* " "is called with the exception instance." msgstr "" -#: ../../library/multiprocessing.rst:2358 -#: ../../library/multiprocessing.rst:2389 +#: ../../library/multiprocessing.rst:2360 +#: ../../library/multiprocessing.rst:2391 msgid "" "Callbacks should complete immediately since otherwise the thread which " "handles the results will get blocked." msgstr "" -#: ../../library/multiprocessing.rst:2363 +#: ../../library/multiprocessing.rst:2365 msgid "" "A parallel equivalent of the :func:`map` built-in function (it supports only " "one *iterable* argument though, for multiple iterables see :meth:`starmap`). " "It blocks until the result is ready." msgstr "" -#: ../../library/multiprocessing.rst:2367 +#: ../../library/multiprocessing.rst:2369 msgid "" "This method chops the iterable into a number of chunks which it submits to " "the process pool as separate tasks. The (approximate) size of these chunks " "can be specified by setting *chunksize* to a positive integer." msgstr "" -#: ../../library/multiprocessing.rst:2371 +#: ../../library/multiprocessing.rst:2373 msgid "" "Note that it may cause high memory usage for very long iterables. Consider " "using :meth:`imap` or :meth:`imap_unordered` with explicit *chunksize* " "option for better efficiency." msgstr "" -#: ../../library/multiprocessing.rst:2377 +#: ../../library/multiprocessing.rst:2379 msgid "" "A variant of the :meth:`.map` method which returns a :class:" "`~multiprocessing.pool.AsyncResult` object." msgstr "" -#: ../../library/multiprocessing.rst:2394 +#: ../../library/multiprocessing.rst:2396 msgid "A lazier version of :meth:`.map`." msgstr "" -#: ../../library/multiprocessing.rst:2396 +#: ../../library/multiprocessing.rst:2398 msgid "" "The *chunksize* argument is the same as the one used by the :meth:`.map` " "method. For very long iterables using a large value for *chunksize* can " "make the job complete **much** faster than using the default value of ``1``." msgstr "" -#: ../../library/multiprocessing.rst:2401 +#: ../../library/multiprocessing.rst:2403 msgid "" "Also if *chunksize* is ``1`` then the :meth:`!next` method of the iterator " "returned by the :meth:`imap` method has an optional *timeout* parameter: " @@ -3215,65 +3218,65 @@ msgid "" "result cannot be returned within *timeout* seconds." msgstr "" -#: ../../library/multiprocessing.rst:2408 +#: ../../library/multiprocessing.rst:2410 msgid "" "The same as :meth:`imap` except that the ordering of the results from the " "returned iterator should be considered arbitrary. (Only when there is only " "one worker process is the order guaranteed to be \"correct\".)" msgstr "" -#: ../../library/multiprocessing.rst:2414 +#: ../../library/multiprocessing.rst:2416 msgid "" "Like :meth:`~multiprocessing.pool.Pool.map` except that the elements of the " "*iterable* are expected to be iterables that are unpacked as arguments." msgstr "" -#: ../../library/multiprocessing.rst:2418 +#: ../../library/multiprocessing.rst:2420 msgid "" "Hence an *iterable* of ``[(1,2), (3, 4)]`` results in ``[func(1,2), " "func(3,4)]``." msgstr "" -#: ../../library/multiprocessing.rst:2425 +#: ../../library/multiprocessing.rst:2427 msgid "" "A combination of :meth:`starmap` and :meth:`map_async` that iterates over " "*iterable* of iterables and calls *func* with the iterables unpacked. " "Returns a result object." msgstr "" -#: ../../library/multiprocessing.rst:2433 +#: ../../library/multiprocessing.rst:2435 msgid "" "Prevents any more tasks from being submitted to the pool. Once all the " "tasks have been completed the worker processes will exit." msgstr "" -#: ../../library/multiprocessing.rst:2438 +#: ../../library/multiprocessing.rst:2440 msgid "" "Stops the worker processes immediately without completing outstanding work. " "When the pool object is garbage collected :meth:`terminate` will be called " "immediately." msgstr "" -#: ../../library/multiprocessing.rst:2444 +#: ../../library/multiprocessing.rst:2446 msgid "" "Wait for the worker processes to exit. One must call :meth:`close` or :meth:" "`terminate` before using :meth:`join`." msgstr "" -#: ../../library/multiprocessing.rst:2447 +#: ../../library/multiprocessing.rst:2449 msgid "" "Pool objects now support the context management protocol -- see :ref:" "`typecontextmanager`. :meth:`~contextmanager.__enter__` returns the pool " "object, and :meth:`~contextmanager.__exit__` calls :meth:`terminate`." msgstr "" -#: ../../library/multiprocessing.rst:2455 +#: ../../library/multiprocessing.rst:2457 msgid "" "The class of the result returned by :meth:`Pool.apply_async` and :meth:`Pool." "map_async`." msgstr "" -#: ../../library/multiprocessing.rst:2460 +#: ../../library/multiprocessing.rst:2462 msgid "" "Return the result when it arrives. If *timeout* is not ``None`` and the " "result does not arrive within *timeout* seconds then :exc:`multiprocessing." @@ -3281,31 +3284,31 @@ msgid "" "exception will be reraised by :meth:`get`." msgstr "" -#: ../../library/multiprocessing.rst:2467 +#: ../../library/multiprocessing.rst:2469 msgid "Wait until the result is available or until *timeout* seconds pass." msgstr "" -#: ../../library/multiprocessing.rst:2471 +#: ../../library/multiprocessing.rst:2473 msgid "Return whether the call has completed." msgstr "" -#: ../../library/multiprocessing.rst:2475 +#: ../../library/multiprocessing.rst:2477 msgid "" "Return whether the call completed without raising an exception. Will raise :" "exc:`ValueError` if the result is not ready." msgstr "" -#: ../../library/multiprocessing.rst:2478 +#: ../../library/multiprocessing.rst:2480 msgid "" "If the result is not ready, :exc:`ValueError` is raised instead of :exc:" "`AssertionError`." msgstr "" -#: ../../library/multiprocessing.rst:2482 +#: ../../library/multiprocessing.rst:2484 msgid "The following example demonstrates the use of a pool::" msgstr "" -#: ../../library/multiprocessing.rst:2484 +#: ../../library/multiprocessing.rst:2486 msgid "" "from multiprocessing import Pool\n" "import time\n" @@ -3333,17 +3336,17 @@ msgid "" "TimeoutError" msgstr "" -#: ../../library/multiprocessing.rst:2509 +#: ../../library/multiprocessing.rst:2511 msgid "Listeners and Clients" msgstr "" -#: ../../library/multiprocessing.rst:2514 +#: ../../library/multiprocessing.rst:2516 msgid "" "Usually message passing between processes is done using queues or by using :" "class:`~Connection` objects returned by :func:`~multiprocessing.Pipe`." msgstr "" -#: ../../library/multiprocessing.rst:2518 +#: ../../library/multiprocessing.rst:2520 msgid "" "However, the :mod:`multiprocessing.connection` module allows some extra " "flexibility. It basically gives a high level message oriented API for " @@ -3352,46 +3355,46 @@ msgid "" "multiple connections at the same time." msgstr "" -#: ../../library/multiprocessing.rst:2527 +#: ../../library/multiprocessing.rst:2529 msgid "" "Send a randomly generated message to the other end of the connection and " "wait for a reply." msgstr "" -#: ../../library/multiprocessing.rst:2530 +#: ../../library/multiprocessing.rst:2532 msgid "" "If the reply matches the digest of the message using *authkey* as the key " "then a welcome message is sent to the other end of the connection. " "Otherwise :exc:`~multiprocessing.AuthenticationError` is raised." msgstr "" -#: ../../library/multiprocessing.rst:2536 +#: ../../library/multiprocessing.rst:2538 msgid "" "Receive a message, calculate the digest of the message using *authkey* as " "the key, and then send the digest back." msgstr "" -#: ../../library/multiprocessing.rst:2539 +#: ../../library/multiprocessing.rst:2541 msgid "" "If a welcome message is not received, then :exc:`~multiprocessing." "AuthenticationError` is raised." msgstr "" -#: ../../library/multiprocessing.rst:2544 +#: ../../library/multiprocessing.rst:2546 msgid "" "Attempt to set up a connection to the listener which is using address " "*address*, returning a :class:`~Connection`." msgstr "" -#: ../../library/multiprocessing.rst:2547 +#: ../../library/multiprocessing.rst:2549 msgid "" "The type of the connection is determined by *family* argument, but this can " "generally be omitted since it can usually be inferred from the format of " "*address*. (See :ref:`multiprocessing-address-formats`)" msgstr "" -#: ../../library/multiprocessing.rst:2551 -#: ../../library/multiprocessing.rst:2586 +#: ../../library/multiprocessing.rst:2553 +#: ../../library/multiprocessing.rst:2588 msgid "" "If *authkey* is given and not ``None``, it should be a byte string and will " "be used as the secret key for an HMAC-based authentication challenge. No " @@ -3400,26 +3403,26 @@ msgid "" "`multiprocessing-auth-keys`." msgstr "" -#: ../../library/multiprocessing.rst:2559 +#: ../../library/multiprocessing.rst:2561 msgid "" "A wrapper for a bound socket or Windows named pipe which is 'listening' for " "connections." msgstr "" -#: ../../library/multiprocessing.rst:2562 +#: ../../library/multiprocessing.rst:2564 msgid "" "*address* is the address to be used by the bound socket or named pipe of the " "listener object." msgstr "" -#: ../../library/multiprocessing.rst:2567 +#: ../../library/multiprocessing.rst:2569 msgid "" "If an address of '0.0.0.0' is used, the address will not be a connectable " "end point on Windows. If you require a connectable end-point, you should use " "'127.0.0.1'." msgstr "" -#: ../../library/multiprocessing.rst:2571 +#: ../../library/multiprocessing.rst:2573 msgid "" "*family* is the type of socket (or named pipe) to use. This can be one of " "the strings ``'AF_INET'`` (for a TCP socket), ``'AF_UNIX'`` (for a Unix " @@ -3433,49 +3436,49 @@ msgid "" "using :func:`tempfile.mkstemp`." msgstr "" -#: ../../library/multiprocessing.rst:2582 +#: ../../library/multiprocessing.rst:2584 msgid "" "If the listener object uses a socket then *backlog* (1 by default) is passed " "to the :meth:`~socket.socket.listen` method of the socket once it has been " "bound." msgstr "" -#: ../../library/multiprocessing.rst:2594 +#: ../../library/multiprocessing.rst:2596 msgid "" "Accept a connection on the bound socket or named pipe of the listener object " "and return a :class:`~Connection` object. If authentication is attempted and " "fails, then :exc:`~multiprocessing.AuthenticationError` is raised." msgstr "" -#: ../../library/multiprocessing.rst:2601 +#: ../../library/multiprocessing.rst:2603 msgid "" "Close the bound socket or named pipe of the listener object. This is called " "automatically when the listener is garbage collected. However it is " "advisable to call it explicitly." msgstr "" -#: ../../library/multiprocessing.rst:2605 +#: ../../library/multiprocessing.rst:2607 msgid "Listener objects have the following read-only properties:" msgstr "" -#: ../../library/multiprocessing.rst:2609 +#: ../../library/multiprocessing.rst:2611 msgid "The address which is being used by the Listener object." msgstr "" -#: ../../library/multiprocessing.rst:2613 +#: ../../library/multiprocessing.rst:2615 msgid "" "The address from which the last accepted connection came. If this is " "unavailable then it is ``None``." msgstr "" -#: ../../library/multiprocessing.rst:2616 +#: ../../library/multiprocessing.rst:2618 msgid "" "Listener objects now support the context management protocol -- see :ref:" "`typecontextmanager`. :meth:`~contextmanager.__enter__` returns the " "listener object, and :meth:`~contextmanager.__exit__` calls :meth:`close`." msgstr "" -#: ../../library/multiprocessing.rst:2623 +#: ../../library/multiprocessing.rst:2625 msgid "" "Wait till an object in *object_list* is ready. Returns the list of those " "objects in *object_list* which are ready. If *timeout* is a float then the " @@ -3484,32 +3487,32 @@ msgid "" "zero timeout." msgstr "" -#: ../../library/multiprocessing.rst:2629 +#: ../../library/multiprocessing.rst:2631 msgid "" "For both POSIX and Windows, an object can appear in *object_list* if it is" msgstr "" -#: ../../library/multiprocessing.rst:2632 +#: ../../library/multiprocessing.rst:2634 msgid "a readable :class:`~multiprocessing.connection.Connection` object;" msgstr "" -#: ../../library/multiprocessing.rst:2633 +#: ../../library/multiprocessing.rst:2635 msgid "a connected and readable :class:`socket.socket` object; or" msgstr "" -#: ../../library/multiprocessing.rst:2634 +#: ../../library/multiprocessing.rst:2636 msgid "" "the :attr:`~multiprocessing.Process.sentinel` attribute of a :class:" "`~multiprocessing.Process` object." msgstr "" -#: ../../library/multiprocessing.rst:2637 +#: ../../library/multiprocessing.rst:2639 msgid "" "A connection or socket object is ready when there is data available to be " "read from it, or the other end has been closed." msgstr "" -#: ../../library/multiprocessing.rst:2640 +#: ../../library/multiprocessing.rst:2642 msgid "" "**POSIX**: ``wait(object_list, timeout)`` almost equivalent ``select." "select(object_list, [], [], timeout)``. The difference is that, if :func:" @@ -3517,7 +3520,7 @@ msgid "" "an error number of ``EINTR``, whereas :func:`wait` will not." msgstr "" -#: ../../library/multiprocessing.rst:2646 +#: ../../library/multiprocessing.rst:2648 msgid "" "**Windows**: An item in *object_list* must either be an integer handle which " "is waitable (according to the definition used by the documentation of the " @@ -3527,18 +3530,18 @@ msgid "" "handles.)" msgstr "" -#: ../../library/multiprocessing.rst:2656 +#: ../../library/multiprocessing.rst:2658 msgid "**Examples**" msgstr "" -#: ../../library/multiprocessing.rst:2658 +#: ../../library/multiprocessing.rst:2660 msgid "" "The following server code creates a listener which uses ``'secret " "password'`` as an authentication key. It then waits for a connection and " "sends some data to the client::" msgstr "" -#: ../../library/multiprocessing.rst:2662 +#: ../../library/multiprocessing.rst:2664 msgid "" "from multiprocessing.connection import Listener\n" "from array import array\n" @@ -3556,13 +3559,13 @@ msgid "" " conn.send_bytes(array('i', [42, 1729]))" msgstr "" -#: ../../library/multiprocessing.rst:2677 +#: ../../library/multiprocessing.rst:2679 msgid "" "The following code connects to the server and receives some data from the " "server::" msgstr "" -#: ../../library/multiprocessing.rst:2680 +#: ../../library/multiprocessing.rst:2682 msgid "" "from multiprocessing.connection import Client\n" "from array import array\n" @@ -3579,13 +3582,13 @@ msgid "" " print(arr) # => array('i', [42, 1729, 0, 0, 0])" msgstr "" -#: ../../library/multiprocessing.rst:2694 +#: ../../library/multiprocessing.rst:2696 msgid "" "The following code uses :func:`~multiprocessing.connection.wait` to wait for " "messages from multiple processes at once::" msgstr "" -#: ../../library/multiprocessing.rst:2697 +#: ../../library/multiprocessing.rst:2699 msgid "" "from multiprocessing import Process, Pipe, current_process\n" "from multiprocessing.connection import wait\n" @@ -3619,23 +3622,23 @@ msgid "" " print(msg)" msgstr "" -#: ../../library/multiprocessing.rst:2732 +#: ../../library/multiprocessing.rst:2734 msgid "Address Formats" msgstr "" -#: ../../library/multiprocessing.rst:2734 +#: ../../library/multiprocessing.rst:2736 msgid "" "An ``'AF_INET'`` address is a tuple of the form ``(hostname, port)`` where " "*hostname* is a string and *port* is an integer." msgstr "" -#: ../../library/multiprocessing.rst:2737 +#: ../../library/multiprocessing.rst:2739 msgid "" "An ``'AF_UNIX'`` address is a string representing a filename on the " "filesystem." msgstr "" -#: ../../library/multiprocessing.rst:2740 +#: ../../library/multiprocessing.rst:2742 msgid "" "An ``'AF_PIPE'`` address is a string of the form :samp:`r'\\\\\\\\\\\\.\\" "\\pipe\\\\\\\\{PipeName}'`. To use :func:`Client` to connect to a named " @@ -3644,17 +3647,17 @@ msgid "" "instead." msgstr "" -#: ../../library/multiprocessing.rst:2745 +#: ../../library/multiprocessing.rst:2747 msgid "" "Note that any string beginning with two backslashes is assumed by default to " "be an ``'AF_PIPE'`` address rather than an ``'AF_UNIX'`` address." msgstr "" -#: ../../library/multiprocessing.rst:2752 +#: ../../library/multiprocessing.rst:2754 msgid "Authentication keys" msgstr "" -#: ../../library/multiprocessing.rst:2754 +#: ../../library/multiprocessing.rst:2756 msgid "" "When one uses :meth:`Connection.recv `, the data received " "is automatically unpickled. Unfortunately unpickling data from an untrusted " @@ -3662,7 +3665,7 @@ msgid "" "use the :mod:`hmac` module to provide digest authentication." msgstr "" -#: ../../library/multiprocessing.rst:2760 +#: ../../library/multiprocessing.rst:2762 msgid "" "An authentication key is a byte string which can be thought of as a " "password: once a connection is established both ends will demand proof that " @@ -3670,7 +3673,7 @@ msgid "" "using the same key does **not** involve sending the key over the connection.)" msgstr "" -#: ../../library/multiprocessing.rst:2766 +#: ../../library/multiprocessing.rst:2768 msgid "" "If authentication is requested but no authentication key is specified then " "the return value of ``current_process().authkey`` is used (see :class:" @@ -3681,17 +3684,17 @@ msgid "" "setting up connections between themselves." msgstr "" -#: ../../library/multiprocessing.rst:2774 +#: ../../library/multiprocessing.rst:2776 msgid "" "Suitable authentication keys can also be generated by using :func:`os." "urandom`." msgstr "" -#: ../../library/multiprocessing.rst:2778 +#: ../../library/multiprocessing.rst:2780 msgid "Logging" msgstr "" -#: ../../library/multiprocessing.rst:2780 +#: ../../library/multiprocessing.rst:2782 msgid "" "Some support for logging is available. Note, however, that the :mod:" "`logging` package does not use process shared locks so it is possible " @@ -3699,27 +3702,27 @@ msgid "" "mixed up." msgstr "" -#: ../../library/multiprocessing.rst:2787 +#: ../../library/multiprocessing.rst:2789 msgid "" "Returns the logger used by :mod:`multiprocessing`. If necessary, a new one " "will be created." msgstr "" -#: ../../library/multiprocessing.rst:2790 +#: ../../library/multiprocessing.rst:2792 msgid "" "When first created the logger has level :const:`logging.NOTSET` and no " "default handler. Messages sent to this logger will not by default propagate " "to the root logger." msgstr "" -#: ../../library/multiprocessing.rst:2794 +#: ../../library/multiprocessing.rst:2796 msgid "" "Note that on Windows child processes will only inherit the level of the " "parent process's logger -- any other customization of the logger will not be " "inherited." msgstr "" -#: ../../library/multiprocessing.rst:2801 +#: ../../library/multiprocessing.rst:2803 msgid "" "This function performs a call to :func:`get_logger` but in addition to " "returning the logger created by get_logger, it adds a handler which sends " @@ -3728,11 +3731,11 @@ msgid "" "``level`` argument." msgstr "" -#: ../../library/multiprocessing.rst:2807 +#: ../../library/multiprocessing.rst:2809 msgid "Below is an example session with logging turned on::" msgstr "" -#: ../../library/multiprocessing.rst:2809 +#: ../../library/multiprocessing.rst:2811 msgid "" ">>> import multiprocessing, logging\n" ">>> logger = multiprocessing.log_to_stderr()\n" @@ -3748,21 +3751,21 @@ msgid "" "[INFO/SyncManager-...] manager exiting with exitcode 0" msgstr "" -#: ../../library/multiprocessing.rst:2822 +#: ../../library/multiprocessing.rst:2824 msgid "For a full table of logging levels, see the :mod:`logging` module." msgstr "" -#: ../../library/multiprocessing.rst:2826 +#: ../../library/multiprocessing.rst:2828 msgid "The :mod:`multiprocessing.dummy` module" msgstr "" -#: ../../library/multiprocessing.rst:2831 +#: ../../library/multiprocessing.rst:2833 msgid "" ":mod:`multiprocessing.dummy` replicates the API of :mod:`multiprocessing` " "but is no more than a wrapper around the :mod:`threading` module." msgstr "" -#: ../../library/multiprocessing.rst:2836 +#: ../../library/multiprocessing.rst:2838 msgid "" "In particular, the ``Pool`` function provided by :mod:`multiprocessing." "dummy` returns an instance of :class:`ThreadPool`, which is a subclass of :" @@ -3770,7 +3773,7 @@ msgid "" "worker threads rather than worker processes." msgstr "" -#: ../../library/multiprocessing.rst:2844 +#: ../../library/multiprocessing.rst:2846 msgid "" "A thread pool object which controls a pool of worker threads to which jobs " "can be submitted. :class:`ThreadPool` instances are fully interface " @@ -3780,18 +3783,18 @@ msgid "" "pool.Pool.terminate` manually." msgstr "" -#: ../../library/multiprocessing.rst:2851 +#: ../../library/multiprocessing.rst:2853 msgid "" "*processes* is the number of worker threads to use. If *processes* is " "``None`` then the number returned by :func:`os.process_cpu_count` is used." msgstr "" -#: ../../library/multiprocessing.rst:2857 +#: ../../library/multiprocessing.rst:2859 msgid "" "Unlike :class:`Pool`, *maxtasksperchild* and *context* cannot be provided." msgstr "" -#: ../../library/multiprocessing.rst:2861 +#: ../../library/multiprocessing.rst:2863 msgid "" "A :class:`ThreadPool` shares the same interface as :class:`Pool`, which is " "designed around a pool of processes and predates the introduction of the :" @@ -3801,7 +3804,7 @@ msgid "" "is not understood by any other libraries." msgstr "" -#: ../../library/multiprocessing.rst:2868 +#: ../../library/multiprocessing.rst:2870 msgid "" "Users should generally prefer to use :class:`concurrent.futures." "ThreadPoolExecutor`, which has a simpler interface that was designed around " @@ -3810,69 +3813,69 @@ msgid "" "`asyncio`." msgstr "" -#: ../../library/multiprocessing.rst:2878 +#: ../../library/multiprocessing.rst:2880 msgid "Programming guidelines" msgstr "" -#: ../../library/multiprocessing.rst:2880 +#: ../../library/multiprocessing.rst:2882 msgid "" "There are certain guidelines and idioms which should be adhered to when " "using :mod:`multiprocessing`." msgstr "" -#: ../../library/multiprocessing.rst:2885 +#: ../../library/multiprocessing.rst:2887 msgid "All start methods" msgstr "" -#: ../../library/multiprocessing.rst:2887 +#: ../../library/multiprocessing.rst:2889 msgid "The following applies to all start methods." msgstr "" -#: ../../library/multiprocessing.rst:2889 +#: ../../library/multiprocessing.rst:2891 msgid "Avoid shared state" msgstr "" -#: ../../library/multiprocessing.rst:2891 +#: ../../library/multiprocessing.rst:2893 msgid "" "As far as possible one should try to avoid shifting large amounts of data " "between processes." msgstr "" -#: ../../library/multiprocessing.rst:2894 +#: ../../library/multiprocessing.rst:2896 msgid "" "It is probably best to stick to using queues or pipes for communication " "between processes rather than using the lower level synchronization " "primitives." msgstr "" -#: ../../library/multiprocessing.rst:2898 +#: ../../library/multiprocessing.rst:2900 msgid "Picklability" msgstr "" -#: ../../library/multiprocessing.rst:2900 +#: ../../library/multiprocessing.rst:2902 msgid "Ensure that the arguments to the methods of proxies are picklable." msgstr "" -#: ../../library/multiprocessing.rst:2902 +#: ../../library/multiprocessing.rst:2904 msgid "Thread safety of proxies" msgstr "" -#: ../../library/multiprocessing.rst:2904 +#: ../../library/multiprocessing.rst:2906 msgid "" "Do not use a proxy object from more than one thread unless you protect it " "with a lock." msgstr "" -#: ../../library/multiprocessing.rst:2907 +#: ../../library/multiprocessing.rst:2909 msgid "" "(There is never a problem with different processes using the *same* proxy.)" msgstr "" -#: ../../library/multiprocessing.rst:2909 +#: ../../library/multiprocessing.rst:2911 msgid "Joining zombie processes" msgstr "" -#: ../../library/multiprocessing.rst:2911 +#: ../../library/multiprocessing.rst:2913 msgid "" "On POSIX when a process finishes but has not been joined it becomes a " "zombie. There should never be very many because each time a new process " @@ -3883,11 +3886,11 @@ msgid "" "explicitly join all the processes that you start." msgstr "" -#: ../../library/multiprocessing.rst:2919 +#: ../../library/multiprocessing.rst:2921 msgid "Better to inherit than pickle/unpickle" msgstr "" -#: ../../library/multiprocessing.rst:2921 +#: ../../library/multiprocessing.rst:2923 msgid "" "When using the *spawn* or *forkserver* start methods many types from :mod:" "`multiprocessing` need to be picklable so that child processes can use " @@ -3897,11 +3900,11 @@ msgid "" "inherit it from an ancestor process." msgstr "" -#: ../../library/multiprocessing.rst:2929 +#: ../../library/multiprocessing.rst:2931 msgid "Avoid terminating processes" msgstr "" -#: ../../library/multiprocessing.rst:2931 +#: ../../library/multiprocessing.rst:2933 msgid "" "Using the :meth:`Process.terminate ` " "method to stop a process is liable to cause any shared resources (such as " @@ -3909,18 +3912,18 @@ msgid "" "become broken or unavailable to other processes." msgstr "" -#: ../../library/multiprocessing.rst:2937 +#: ../../library/multiprocessing.rst:2939 msgid "" "Therefore it is probably best to only consider using :meth:`Process." "terminate ` on processes which never use " "any shared resources." msgstr "" -#: ../../library/multiprocessing.rst:2941 +#: ../../library/multiprocessing.rst:2943 msgid "Joining processes that use queues" msgstr "" -#: ../../library/multiprocessing.rst:2943 +#: ../../library/multiprocessing.rst:2945 msgid "" "Bear in mind that a process that has put items in a queue will wait before " "terminating until all the buffered items are fed by the \"feeder\" thread to " @@ -3929,7 +3932,7 @@ msgid "" "queue to avoid this behaviour.)" msgstr "" -#: ../../library/multiprocessing.rst:2949 +#: ../../library/multiprocessing.rst:2951 msgid "" "This means that whenever you use a queue you need to make sure that all " "items which have been put on the queue will eventually be removed before the " @@ -3938,11 +3941,11 @@ msgid "" "processes will be joined automatically." msgstr "" -#: ../../library/multiprocessing.rst:2955 +#: ../../library/multiprocessing.rst:2957 msgid "An example which will deadlock is the following::" msgstr "" -#: ../../library/multiprocessing.rst:2957 +#: ../../library/multiprocessing.rst:2959 msgid "" "from multiprocessing import Process, Queue\n" "\n" @@ -3957,17 +3960,17 @@ msgid "" " obj = queue.get()" msgstr "" -#: ../../library/multiprocessing.rst:2969 +#: ../../library/multiprocessing.rst:2971 msgid "" "A fix here would be to swap the last two lines (or simply remove the ``p." "join()`` line)." msgstr "" -#: ../../library/multiprocessing.rst:2972 +#: ../../library/multiprocessing.rst:2974 msgid "Explicitly pass resources to child processes" msgstr "" -#: ../../library/multiprocessing.rst:2974 +#: ../../library/multiprocessing.rst:2976 msgid "" "On POSIX using the *fork* start method, a child process can make use of a " "shared resource created in a parent process using a global resource. " @@ -3975,7 +3978,7 @@ msgid "" "for the child process." msgstr "" -#: ../../library/multiprocessing.rst:2979 +#: ../../library/multiprocessing.rst:2981 msgid "" "Apart from making the code (potentially) compatible with Windows and the " "other start methods this also ensures that as long as the child process is " @@ -3984,11 +3987,11 @@ msgid "" "collected in the parent process." msgstr "" -#: ../../library/multiprocessing.rst:2986 +#: ../../library/multiprocessing.rst:2988 msgid "So for instance ::" msgstr "" -#: ../../library/multiprocessing.rst:2988 +#: ../../library/multiprocessing.rst:2990 msgid "" "from multiprocessing import Process, Lock\n" "\n" @@ -4001,11 +4004,11 @@ msgid "" " Process(target=f).start()" msgstr "" -#: ../../library/multiprocessing.rst:2998 +#: ../../library/multiprocessing.rst:3000 msgid "should be rewritten as ::" msgstr "" -#: ../../library/multiprocessing.rst:3000 +#: ../../library/multiprocessing.rst:3002 msgid "" "from multiprocessing import Process, Lock\n" "\n" @@ -4018,31 +4021,31 @@ msgid "" " Process(target=f, args=(lock,)).start()" msgstr "" -#: ../../library/multiprocessing.rst:3010 +#: ../../library/multiprocessing.rst:3012 msgid "Beware of replacing :data:`sys.stdin` with a \"file like object\"" msgstr "" -#: ../../library/multiprocessing.rst:3012 +#: ../../library/multiprocessing.rst:3014 msgid ":mod:`multiprocessing` originally unconditionally called::" msgstr "" -#: ../../library/multiprocessing.rst:3014 +#: ../../library/multiprocessing.rst:3016 msgid "os.close(sys.stdin.fileno())" msgstr "" -#: ../../library/multiprocessing.rst:3016 +#: ../../library/multiprocessing.rst:3018 msgid "" "in the :meth:`multiprocessing.Process._bootstrap` method --- this resulted " "in issues with processes-in-processes. This has been changed to::" msgstr "" -#: ../../library/multiprocessing.rst:3019 +#: ../../library/multiprocessing.rst:3021 msgid "" "sys.stdin.close()\n" "sys.stdin = open(os.open(os.devnull, os.O_RDONLY), closefd=False)" msgstr "" -#: ../../library/multiprocessing.rst:3022 +#: ../../library/multiprocessing.rst:3024 msgid "" "Which solves the fundamental issue of processes colliding with each other " "resulting in a bad file descriptor error, but introduces a potential danger " @@ -4052,14 +4055,14 @@ msgid "" "data being flushed to the object multiple times, resulting in corruption." msgstr "" -#: ../../library/multiprocessing.rst:3029 +#: ../../library/multiprocessing.rst:3031 msgid "" "If you write a file-like object and implement your own caching, you can make " "it fork-safe by storing the pid whenever you append to the cache, and " "discarding the cache when the pid changes. For example::" msgstr "" -#: ../../library/multiprocessing.rst:3033 +#: ../../library/multiprocessing.rst:3035 msgid "" "@property\n" "def cache(self):\n" @@ -4070,26 +4073,26 @@ msgid "" " return self._cache" msgstr "" -#: ../../library/multiprocessing.rst:3041 +#: ../../library/multiprocessing.rst:3043 msgid "" "For more information, see :issue:`5155`, :issue:`5313` and :issue:`5331`" msgstr "" -#: ../../library/multiprocessing.rst:3047 +#: ../../library/multiprocessing.rst:3049 msgid "The *spawn* and *forkserver* start methods" msgstr "" -#: ../../library/multiprocessing.rst:3049 +#: ../../library/multiprocessing.rst:3051 msgid "" "There are a few extra restrictions which don't apply to the *fork* start " "method." msgstr "" -#: ../../library/multiprocessing.rst:3052 +#: ../../library/multiprocessing.rst:3054 msgid "More picklability" msgstr "" -#: ../../library/multiprocessing.rst:3054 +#: ../../library/multiprocessing.rst:3056 msgid "" "Ensure that all arguments to :meth:`Process.__init__` are picklable. Also, " "if you subclass :class:`~multiprocessing.Process` then make sure that " @@ -4097,11 +4100,11 @@ msgid "" "Process.start>` method is called." msgstr "" -#: ../../library/multiprocessing.rst:3059 +#: ../../library/multiprocessing.rst:3061 msgid "Global variables" msgstr "" -#: ../../library/multiprocessing.rst:3061 +#: ../../library/multiprocessing.rst:3063 msgid "" "Bear in mind that if code run in a child process tries to access a global " "variable, then the value it sees (if any) may not be the same as the value " @@ -4109,30 +4112,30 @@ msgid "" "Process.start>` was called." msgstr "" -#: ../../library/multiprocessing.rst:3066 +#: ../../library/multiprocessing.rst:3068 msgid "" "However, global variables which are just module level constants cause no " "problems." msgstr "" -#: ../../library/multiprocessing.rst:3071 +#: ../../library/multiprocessing.rst:3073 msgid "Safe importing of main module" msgstr "" -#: ../../library/multiprocessing.rst:3073 +#: ../../library/multiprocessing.rst:3075 msgid "" "Make sure that the main module can be safely imported by a new Python " "interpreter without causing unintended side effects (such as starting a new " "process)." msgstr "" -#: ../../library/multiprocessing.rst:3077 +#: ../../library/multiprocessing.rst:3079 msgid "" "For example, using the *spawn* or *forkserver* start method running the " "following module would fail with a :exc:`RuntimeError`::" msgstr "" -#: ../../library/multiprocessing.rst:3081 +#: ../../library/multiprocessing.rst:3083 msgid "" "from multiprocessing import Process\n" "\n" @@ -4143,13 +4146,13 @@ msgid "" "p.start()" msgstr "" -#: ../../library/multiprocessing.rst:3089 +#: ../../library/multiprocessing.rst:3091 msgid "" "Instead one should protect the \"entry point\" of the program by using ``if " "__name__ == '__main__':`` as follows::" msgstr "" -#: ../../library/multiprocessing.rst:3092 +#: ../../library/multiprocessing.rst:3094 msgid "" "from multiprocessing import Process, freeze_support, set_start_method\n" "\n" @@ -4163,33 +4166,33 @@ msgid "" " p.start()" msgstr "" -#: ../../library/multiprocessing.rst:3103 +#: ../../library/multiprocessing.rst:3105 msgid "" "(The ``freeze_support()`` line can be omitted if the program will be run " "normally instead of frozen.)" msgstr "" -#: ../../library/multiprocessing.rst:3106 +#: ../../library/multiprocessing.rst:3108 msgid "" "This allows the newly spawned Python interpreter to safely import the module " "and then run the module's ``foo()`` function." msgstr "" -#: ../../library/multiprocessing.rst:3109 +#: ../../library/multiprocessing.rst:3111 msgid "" "Similar restrictions apply if a pool or manager is created in the main " "module." msgstr "" -#: ../../library/multiprocessing.rst:3116 +#: ../../library/multiprocessing.rst:3118 msgid "Examples" msgstr "" -#: ../../library/multiprocessing.rst:3118 +#: ../../library/multiprocessing.rst:3120 msgid "Demonstration of how to create and use customized managers and proxies:" msgstr "" -#: ../../library/multiprocessing.rst:3120 +#: ../../library/multiprocessing.rst:3122 msgid "" "from multiprocessing import freeze_support\n" "from multiprocessing.managers import BaseManager, BaseProxy\n" @@ -4283,11 +4286,11 @@ msgid "" " test()\n" msgstr "" -#: ../../library/multiprocessing.rst:3124 +#: ../../library/multiprocessing.rst:3126 msgid "Using :class:`~multiprocessing.pool.Pool`:" msgstr "" -#: ../../library/multiprocessing.rst:3126 +#: ../../library/multiprocessing.rst:3128 msgid "" "import multiprocessing\n" "import time\n" @@ -4447,13 +4450,13 @@ msgid "" " test()\n" msgstr "" -#: ../../library/multiprocessing.rst:3130 +#: ../../library/multiprocessing.rst:3132 msgid "" "An example showing how to use queues to feed tasks to a collection of worker " "processes and collect the results:" msgstr "" -#: ../../library/multiprocessing.rst:3133 +#: ../../library/multiprocessing.rst:3135 msgid "" "import time\n" "import random\n" diff --git a/library/multiprocessing.shared_memory.po b/library/multiprocessing.shared_memory.po index 96d5e8454..a8de82116 100644 --- a/library/multiprocessing.shared_memory.po +++ b/library/multiprocessing.shared_memory.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:10+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/netdata.po b/library/netdata.po index 1127f42ea..de84bd8e8 100644 --- a/library/netdata.po +++ b/library/netdata.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:10+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/netrc.po b/library/netrc.po index 3318d950a..ab8d9b09e 100644 --- a/library/netrc.po +++ b/library/netrc.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:10+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" @@ -40,26 +40,31 @@ msgid "" "user's home directory -- as determined by :func:`os.path.expanduser` -- will " "be read. Otherwise, a :exc:`FileNotFoundError` exception will be raised. " "Parse errors will raise :exc:`NetrcParseError` with diagnostic information " -"including the file name, line number, and terminating token. If no argument " -"is specified on a POSIX system, the presence of passwords in the :file:`." -"netrc` file will raise a :exc:`NetrcParseError` if the file ownership or " -"permissions are insecure (owned by a user other than the user running the " -"process, or accessible for read or write by any other user). This implements " -"security behavior equivalent to that of ftp and other programs that use :" -"file:`.netrc`." +"including the file name, line number, and terminating token." msgstr "" -#: ../../library/netrc.rst:34 -msgid "Added the POSIX permission check." +#: ../../library/netrc.rst:28 +msgid "" +"If no argument is specified on a POSIX system, the presence of passwords in " +"the :file:`.netrc` file will raise a :exc:`NetrcParseError` if the file " +"ownership or permissions are insecure (owned by a user other than the user " +"running the process, or accessible for read or write by any other user). " +"This implements security behavior equivalent to that of ftp and other " +"programs that use :file:`.netrc`. Such security checks are not available on " +"platforms that do not support :func:`os.getuid`." msgstr "" #: ../../library/netrc.rst:36 +msgid "Added the POSIX permission check." +msgstr "" + +#: ../../library/netrc.rst:38 msgid "" ":func:`os.path.expanduser` is used to find the location of the :file:`." "netrc` file when *file* is not passed as argument." msgstr "" -#: ../../library/netrc.rst:40 +#: ../../library/netrc.rst:42 msgid "" ":class:`netrc` try UTF-8 encoding before using locale specific encoding. The " "entry in the netrc file no longer needs to contain all tokens. The missing " @@ -69,34 +74,34 @@ msgid "" "check." msgstr "" -#: ../../library/netrc.rst:51 +#: ../../library/netrc.rst:53 msgid "" "Exception raised by the :class:`~netrc.netrc` class when syntactical errors " "are encountered in source text. Instances of this exception provide three " "interesting attributes:" msgstr "" -#: ../../library/netrc.rst:57 +#: ../../library/netrc.rst:59 msgid "Textual explanation of the error." msgstr "" -#: ../../library/netrc.rst:61 +#: ../../library/netrc.rst:63 msgid "The name of the source file." msgstr "" -#: ../../library/netrc.rst:65 +#: ../../library/netrc.rst:67 msgid "The line number on which the error was found." msgstr "" -#: ../../library/netrc.rst:71 +#: ../../library/netrc.rst:73 msgid "netrc Objects" msgstr "" -#: ../../library/netrc.rst:73 +#: ../../library/netrc.rst:75 msgid "A :class:`~netrc.netrc` instance has the following methods:" msgstr "" -#: ../../library/netrc.rst:78 +#: ../../library/netrc.rst:80 msgid "" "Return a 3-tuple ``(login, account, password)`` of authenticators for " "*host*. If the netrc file did not contain an entry for the given host, " @@ -104,22 +109,22 @@ msgid "" "host nor default entry is available, return ``None``." msgstr "" -#: ../../library/netrc.rst:86 +#: ../../library/netrc.rst:88 msgid "" "Dump the class data as a string in the format of a netrc file. (This " "discards comments and may reorder the entries.)" msgstr "" -#: ../../library/netrc.rst:89 +#: ../../library/netrc.rst:91 msgid "Instances of :class:`~netrc.netrc` have public instance variables:" msgstr "" -#: ../../library/netrc.rst:94 +#: ../../library/netrc.rst:96 msgid "" "Dictionary mapping host names to ``(login, account, password)`` tuples. The " "'default' entry, if any, is represented as a pseudo-host by that name." msgstr "" -#: ../../library/netrc.rst:100 +#: ../../library/netrc.rst:102 msgid "Dictionary mapping macro names to string lists." msgstr "" diff --git a/library/nis.po b/library/nis.po index 12e488896..049e84ae9 100644 --- a/library/nis.po +++ b/library/nis.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-11-19 01:03+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/nntplib.po b/library/nntplib.po index 5e845fa72..d45d638be 100644 --- a/library/nntplib.po +++ b/library/nntplib.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-11-19 01:03+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/numbers.po b/library/numbers.po index 37b38342a..388a89b03 100644 --- a/library/numbers.po +++ b/library/numbers.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-06-27 14:20+0000\n" "PO-Revision-Date: 2021-06-28 01:10+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/numeric.po b/library/numeric.po index 038fb0f7f..d44d9b734 100644 --- a/library/numeric.po +++ b/library/numeric.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:10+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/operator.po b/library/operator.po index 2ab26bde9..fa452cce0 100644 --- a/library/operator.po +++ b/library/operator.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:10+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/optparse.po b/library/optparse.po index 001f6bdaa..0fd25a724 100644 --- a/library/optparse.po +++ b/library/optparse.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:10+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/os.path.po b/library/os.path.po index 9609366b5..18b159482 100644 --- a/library/os.path.po +++ b/library/os.path.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:10+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -100,12 +101,12 @@ msgstr "" #: ../../library/os.path.rst:215 ../../library/os.path.rst:227 #: ../../library/os.path.rst:236 ../../library/os.path.rst:246 #: ../../library/os.path.rst:260 ../../library/os.path.rst:270 -#: ../../library/os.path.rst:289 ../../library/os.path.rst:308 -#: ../../library/os.path.rst:380 ../../library/os.path.rst:400 -#: ../../library/os.path.rst:423 ../../library/os.path.rst:443 -#: ../../library/os.path.rst:459 ../../library/os.path.rst:470 -#: ../../library/os.path.rst:484 ../../library/os.path.rst:500 -#: ../../library/os.path.rst:525 ../../library/os.path.rst:589 +#: ../../library/os.path.rst:289 ../../library/os.path.rst:309 +#: ../../library/os.path.rst:381 ../../library/os.path.rst:401 +#: ../../library/os.path.rst:441 ../../library/os.path.rst:470 +#: ../../library/os.path.rst:486 ../../library/os.path.rst:497 +#: ../../library/os.path.rst:511 ../../library/os.path.rst:527 +#: ../../library/os.path.rst:552 ../../library/os.path.rst:616 msgid "Accepts a :term:`path-like object`." msgstr "" @@ -311,16 +312,18 @@ msgid "" "different device than *path*, or whether :file:`{path}/..` and *path* point " "to the same i-node on the same device --- this should detect mount points " "for all Unix and POSIX variants. It is not able to reliably detect bind " -"mounts on the same filesystem. On Windows, a drive letter root and a share " -"UNC are always mount points, and for any other path ``GetVolumePathName`` is " -"called to see if it is different from the input path." +"mounts on the same filesystem. On Linux systems, it will always return " +"``True`` for btrfs subvolumes, even if they aren't mount points. On Windows, " +"a drive letter root and a share UNC are always mount points, and for any " +"other path ``GetVolumePathName`` is called to see if it is different from " +"the input path." msgstr "" -#: ../../library/os.path.rst:305 +#: ../../library/os.path.rst:306 msgid "Added support for detecting non-root mount points on Windows." msgstr "" -#: ../../library/os.path.rst:314 +#: ../../library/os.path.rst:315 msgid "" "Return ``True`` if pathname *path* is located on a Windows Dev Drive. A Dev " "Drive is optimized for developer scenarios, and offers faster performance " @@ -329,7 +332,7 @@ msgid "" "operations." msgstr "" -#: ../../library/os.path.rst:320 +#: ../../library/os.path.rst:321 msgid "" "May raise an error for an invalid path, for example, one without a " "recognizable drive, but returns ``False`` on platforms that do not support " @@ -337,17 +340,17 @@ msgid "" "windows/dev-drive/>`_ for information on enabling and creating Dev Drives." msgstr "" -#: ../../library/os.path.rst:327 +#: ../../library/os.path.rst:328 msgid "" "The function is now available on all platforms, and will always return " "``False`` on those that have no support for Dev Drives" msgstr "" -#: ../../library/os.path.rst:333 +#: ../../library/os.path.rst:334 msgid "Return ``True`` if *path* is a reserved pathname on the current system." msgstr "" -#: ../../library/os.path.rst:335 +#: ../../library/os.path.rst:336 msgid "" "On Windows, reserved filenames include those that end with a space or dot; " "those that contain colons (i.e. file streams such as \"name:stream\"), " @@ -356,7 +359,7 @@ msgid "" "\", \"AUX\", \"PRN\", \"COM1\", and \"LPT1\"." msgstr "" -#: ../../library/os.path.rst:343 +#: ../../library/os.path.rst:344 msgid "" "This function approximates rules for reserved paths on most Windows systems. " "These rules change over time in various Windows releases. This function may " @@ -364,11 +367,11 @@ msgid "" "available." msgstr "" -#: ../../library/os.path.rst:348 +#: ../../library/os.path.rst:349 msgid "Availability" msgstr "" -#: ../../library/os.path.rst:355 +#: ../../library/os.path.rst:356 msgid "" "Join one or more path segments intelligently. The return value is the " "concatenation of *path* and all members of *\\*paths*, with exactly one " @@ -379,7 +382,7 @@ msgid "" "and joining continues from the absolute path segment." msgstr "" -#: ../../library/os.path.rst:363 +#: ../../library/os.path.rst:364 msgid "" "On Windows, the drive is not reset when a rooted path segment (e.g., " "``r'\\foo'``) is encountered. If a segment is on a different drive or is an " @@ -389,18 +392,18 @@ msgid "" "on drive :file:`C:` (:file:`c:foo`), not :file:`c:\\\\foo`." msgstr "" -#: ../../library/os.path.rst:370 +#: ../../library/os.path.rst:371 msgid "Accepts a :term:`path-like object` for *path* and *paths*." msgstr "" -#: ../../library/os.path.rst:376 +#: ../../library/os.path.rst:377 msgid "" "Normalize the case of a pathname. On Windows, convert all characters in the " "pathname to lowercase, and also convert forward slashes to backward slashes. " "On other operating systems, return the path unchanged." msgstr "" -#: ../../library/os.path.rst:386 +#: ../../library/os.path.rst:387 msgid "" "Normalize a pathname by collapsing redundant separators and up-level " "references so that ``A//B``, ``A/B/``, ``A/./B`` and ``A/foo/../B`` all " @@ -409,7 +412,7 @@ msgid "" "backward slashes. To normalize case, use :func:`normcase`." msgstr "" -#: ../../library/os.path.rst:393 +#: ../../library/os.path.rst:394 msgid "" "On POSIX systems, in accordance with `IEEE Std 1003.1 2013 Edition; 4.13 " "Pathname Resolution >> splitdrive(\"c:/dir\")\n" "(\"c:\", \"/dir\")" msgstr "" -#: ../../library/os.path.rst:519 +#: ../../library/os.path.rst:546 msgid "" "If the path contains a UNC path, drive will contain the host name and share::" msgstr "" -#: ../../library/os.path.rst:522 +#: ../../library/os.path.rst:549 msgid "" ">>> splitdrive(\"//host/computer/dir\")\n" "(\"//host/computer\", \"/dir\")" msgstr "" -#: ../../library/os.path.rst:531 +#: ../../library/os.path.rst:558 msgid "" "Split the pathname *path* into a 3-item tuple ``(drive, root, tail)`` where " "*drive* is a device name or mount point, *root* is a string of separators " @@ -557,7 +598,7 @@ msgid "" "same as *path*." msgstr "" -#: ../../library/os.path.rst:537 +#: ../../library/os.path.rst:564 msgid "" "On POSIX systems, *drive* is always empty. The *root* may be empty (if " "*path* is relative), a single forward slash (if *path* is absolute), or two " @@ -566,7 +607,7 @@ msgid "" "basedefs/V1_chap04.html#tag_04_13>`_.) For example::" msgstr "" -#: ../../library/os.path.rst:543 +#: ../../library/os.path.rst:570 msgid "" ">>> splitroot('/home/sam')\n" "('', '/', 'home/sam')\n" @@ -576,14 +617,14 @@ msgid "" "('', '/', '//home/sam')" msgstr "" -#: ../../library/os.path.rst:550 +#: ../../library/os.path.rst:577 msgid "" "On Windows, *drive* may be empty, a drive-letter name, a UNC share, or a " "device name. The *root* may be empty, a forward slash, or a backward slash. " "For example::" msgstr "" -#: ../../library/os.path.rst:554 +#: ../../library/os.path.rst:581 msgid "" ">>> splitroot('C:/Users/Sam')\n" "('C:', '/', 'Users/Sam')\n" @@ -591,30 +632,30 @@ msgid "" "('//Server/Share', '/', 'Users/Sam')" msgstr "" -#: ../../library/os.path.rst:564 +#: ../../library/os.path.rst:591 msgid "" "Split the pathname *path* into a pair ``(root, ext)`` such that ``root + " "ext == path``, and the extension, *ext*, is empty or begins with a period " "and contains at most one period." msgstr "" -#: ../../library/os.path.rst:568 +#: ../../library/os.path.rst:595 msgid "If the path contains no extension, *ext* will be ``''``::" msgstr "" -#: ../../library/os.path.rst:570 +#: ../../library/os.path.rst:597 msgid "" ">>> splitext('bar')\n" "('bar', '')" msgstr "" -#: ../../library/os.path.rst:573 +#: ../../library/os.path.rst:600 msgid "" "If the path contains an extension, then *ext* will be set to this extension, " "including the leading period. Note that previous periods will be ignored::" msgstr "" -#: ../../library/os.path.rst:576 +#: ../../library/os.path.rst:603 msgid "" ">>> splitext('foo.bar.exe')\n" "('foo.bar', '.exe')\n" @@ -622,13 +663,13 @@ msgid "" "('/foo/bar', '.exe')" msgstr "" -#: ../../library/os.path.rst:581 +#: ../../library/os.path.rst:608 msgid "" "Leading periods of the last component of the path are considered to be part " "of the root::" msgstr "" -#: ../../library/os.path.rst:584 +#: ../../library/os.path.rst:611 msgid "" ">>> splitext('.cshrc')\n" "('.cshrc', '')\n" @@ -636,7 +677,7 @@ msgid "" "('/foo/....jpg', '')" msgstr "" -#: ../../library/os.path.rst:595 +#: ../../library/os.path.rst:622 msgid "" "``True`` if arbitrary Unicode strings can be used as file names (within " "limitations imposed by the file system)." diff --git a/library/os.po b/library/os.po index 42a1f571e..10e2b9b15 100644 --- a/library/os.po +++ b/library/os.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:10+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/ossaudiodev.po b/library/ossaudiodev.po index 741a6207f..629b3e273 100644 --- a/library/ossaudiodev.po +++ b/library/ossaudiodev.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-11-19 01:03+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/pathlib.po b/library/pathlib.po index f19bc210b..cbcc0cc2c 100644 --- a/library/pathlib.po +++ b/library/pathlib.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:11+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -2247,135 +2248,141 @@ msgid "``[seq]``" msgstr "" #: ../../library/pathlib.rst:1784 -msgid "Matches one character in *seq*." +msgid "" +"Matches one character in *seq*, where *seq* is a sequence of characters. " +"Range expressions are supported; for example, ``[a-z]`` matches any " +"lowercase ASCII letter. Multiple ranges can be combined: ``[a-zA-Z0-9_]`` " +"matches any ASCII letter, digit, or underscore." msgstr "" -#: ../../library/pathlib.rst:1785 +#: ../../library/pathlib.rst:1788 msgid "``[!seq]``" msgstr "" -#: ../../library/pathlib.rst:1786 -msgid "Matches one character not in *seq*." +#: ../../library/pathlib.rst:1789 +msgid "" +"Matches one character not in *seq*, where *seq* follows the same rules as " +"above." msgstr "" -#: ../../library/pathlib.rst:1788 +#: ../../library/pathlib.rst:1791 msgid "" "For a literal match, wrap the meta-characters in brackets. For example, " "``\"[?]\"`` matches the character ``\"?\"``." msgstr "" -#: ../../library/pathlib.rst:1791 +#: ../../library/pathlib.rst:1794 msgid "The \"``**``\" wildcard enables recursive globbing. A few examples:" msgstr "" -#: ../../library/pathlib.rst:1794 +#: ../../library/pathlib.rst:1797 msgid "Pattern" msgstr "" -#: ../../library/pathlib.rst:1794 +#: ../../library/pathlib.rst:1797 msgid "Meaning" msgstr "" -#: ../../library/pathlib.rst:1796 +#: ../../library/pathlib.rst:1799 msgid "\"``**/*``\"" msgstr "" -#: ../../library/pathlib.rst:1796 +#: ../../library/pathlib.rst:1799 msgid "Any path with at least one segment." msgstr "" -#: ../../library/pathlib.rst:1797 +#: ../../library/pathlib.rst:1800 msgid "\"``**/*.py``\"" msgstr "" -#: ../../library/pathlib.rst:1797 +#: ../../library/pathlib.rst:1800 msgid "Any path with a final segment ending \"``.py``\"." msgstr "" -#: ../../library/pathlib.rst:1798 +#: ../../library/pathlib.rst:1801 msgid "\"``assets/**``\"" msgstr "" -#: ../../library/pathlib.rst:1798 +#: ../../library/pathlib.rst:1801 msgid "Any path starting with \"``assets/``\"." msgstr "" -#: ../../library/pathlib.rst:1799 +#: ../../library/pathlib.rst:1802 msgid "\"``assets/**/*``\"" msgstr "" -#: ../../library/pathlib.rst:1799 +#: ../../library/pathlib.rst:1802 msgid "" "Any path starting with \"``assets/``\", excluding \"``assets/``\" itself." msgstr "" -#: ../../library/pathlib.rst:1803 +#: ../../library/pathlib.rst:1806 msgid "" "Globbing with the \"``**``\" wildcard visits every directory in the tree. " "Large directory trees may take a long time to search." msgstr "" -#: ../../library/pathlib.rst:1806 +#: ../../library/pathlib.rst:1809 msgid "" "Globbing with a pattern that ends with \"``**``\" returns both files and " "directories. In previous versions, only directories were returned." msgstr "" -#: ../../library/pathlib.rst:1810 +#: ../../library/pathlib.rst:1813 msgid "" "In :meth:`Path.glob` and :meth:`~Path.rglob`, a trailing slash may be added " "to the pattern to match only directories." msgstr "" -#: ../../library/pathlib.rst:1813 +#: ../../library/pathlib.rst:1816 msgid "" "Globbing with a pattern that ends with a pathname components separator (:" "data:`~os.sep` or :data:`~os.altsep`) returns only directories." msgstr "" -#: ../../library/pathlib.rst:1819 +#: ../../library/pathlib.rst:1822 msgid "Comparison to the :mod:`glob` module" msgstr "" -#: ../../library/pathlib.rst:1821 +#: ../../library/pathlib.rst:1824 msgid "" "The patterns accepted and results generated by :meth:`Path.glob` and :meth:" "`Path.rglob` differ slightly from those by the :mod:`glob` module:" msgstr "" -#: ../../library/pathlib.rst:1824 +#: ../../library/pathlib.rst:1827 msgid "" "Files beginning with a dot are not special in pathlib. This is like passing " "``include_hidden=True`` to :func:`glob.glob`." msgstr "" -#: ../../library/pathlib.rst:1826 +#: ../../library/pathlib.rst:1829 msgid "" "\"``**``\" pattern components are always recursive in pathlib. This is like " "passing ``recursive=True`` to :func:`glob.glob`." msgstr "" -#: ../../library/pathlib.rst:1828 +#: ../../library/pathlib.rst:1831 msgid "" "\"``**``\" pattern components do not follow symlinks by default in pathlib. " "This behaviour has no equivalent in :func:`glob.glob`, but you can pass " "``recurse_symlinks=True`` to :meth:`Path.glob` for compatible behaviour." msgstr "" -#: ../../library/pathlib.rst:1831 +#: ../../library/pathlib.rst:1834 msgid "" "Like all :class:`PurePath` and :class:`Path` objects, the values returned " "from :meth:`Path.glob` and :meth:`Path.rglob` don't include trailing slashes." msgstr "" -#: ../../library/pathlib.rst:1834 +#: ../../library/pathlib.rst:1837 msgid "" "The values returned from pathlib's ``path.glob()`` and ``path.rglob()`` " "include the *path* as a prefix, unlike the results of ``glob." "glob(root_dir=path)``." msgstr "" -#: ../../library/pathlib.rst:1837 +#: ../../library/pathlib.rst:1840 msgid "" "The values returned from pathlib's ``path.glob()`` and ``path.rglob()`` may " "include *path* itself, for example when globbing \"``**``\", whereas the " @@ -2383,11 +2390,11 @@ msgid "" "would correspond to *path*." msgstr "" -#: ../../library/pathlib.rst:1844 +#: ../../library/pathlib.rst:1847 msgid "Comparison to the :mod:`os` and :mod:`os.path` modules" msgstr "" -#: ../../library/pathlib.rst:1846 +#: ../../library/pathlib.rst:1849 msgid "" "pathlib implements path operations using :class:`PurePath` and :class:`Path` " "objects, and so it's said to be *object-oriented*. On the other hand, the :" @@ -2396,21 +2403,21 @@ msgid "" "Some users consider the object-oriented style to be more readable." msgstr "" -#: ../../library/pathlib.rst:1852 +#: ../../library/pathlib.rst:1855 msgid "" "Many functions in :mod:`os` and :mod:`os.path` support ``bytes`` paths and :" "ref:`paths relative to directory descriptors `. These features " "aren't available in pathlib." msgstr "" -#: ../../library/pathlib.rst:1856 +#: ../../library/pathlib.rst:1859 msgid "" "Python's ``str`` and ``bytes`` types, and portions of the :mod:`os` and :mod:" "`os.path` modules, are written in C and are very speedy. pathlib is written " "in pure Python and is often slower, but rarely slow enough to matter." msgstr "" -#: ../../library/pathlib.rst:1860 +#: ../../library/pathlib.rst:1863 msgid "" "pathlib's path normalization is slightly more opinionated and consistent " "than :mod:`os.path`. For example, whereas :func:`os.path.abspath` eliminates " @@ -2419,12 +2426,12 @@ msgid "" "safety." msgstr "" -#: ../../library/pathlib.rst:1865 +#: ../../library/pathlib.rst:1868 msgid "" "pathlib's path normalization may render it unsuitable for some applications:" msgstr "" -#: ../../library/pathlib.rst:1867 +#: ../../library/pathlib.rst:1870 msgid "" "pathlib normalizes ``Path(\"my_folder/\")`` to ``Path(\"my_folder\")``, " "which changes a path's meaning when supplied to various operating system " @@ -2433,7 +2440,7 @@ msgid "" "rather than a directory only." msgstr "" -#: ../../library/pathlib.rst:1872 +#: ../../library/pathlib.rst:1875 msgid "" "pathlib normalizes ``Path(\"./my_program\")`` to ``Path(\"my_program\")``, " "which changes a path's meaning when used as an executable search path, such " @@ -2442,283 +2449,283 @@ msgid "" "rather than the current directory." msgstr "" -#: ../../library/pathlib.rst:1878 +#: ../../library/pathlib.rst:1881 msgid "" "As a consequence of these differences, pathlib is not a drop-in replacement " "for :mod:`os.path`." msgstr "" -#: ../../library/pathlib.rst:1883 +#: ../../library/pathlib.rst:1886 msgid "Corresponding tools" msgstr "" -#: ../../library/pathlib.rst:1885 +#: ../../library/pathlib.rst:1888 msgid "" "Below is a table mapping various :mod:`os` functions to their corresponding :" "class:`PurePath`/:class:`Path` equivalent." msgstr "" -#: ../../library/pathlib.rst:1889 +#: ../../library/pathlib.rst:1892 msgid ":mod:`os` and :mod:`os.path`" msgstr "" -#: ../../library/pathlib.rst:1889 +#: ../../library/pathlib.rst:1892 msgid ":mod:`pathlib`" msgstr "" -#: ../../library/pathlib.rst:1891 +#: ../../library/pathlib.rst:1894 msgid ":func:`os.path.dirname`" msgstr "" -#: ../../library/pathlib.rst:1891 +#: ../../library/pathlib.rst:1894 msgid ":attr:`PurePath.parent`" msgstr "" -#: ../../library/pathlib.rst:1892 +#: ../../library/pathlib.rst:1895 msgid ":func:`os.path.basename`" msgstr "" -#: ../../library/pathlib.rst:1892 +#: ../../library/pathlib.rst:1895 msgid ":attr:`PurePath.name`" msgstr "" -#: ../../library/pathlib.rst:1893 +#: ../../library/pathlib.rst:1896 msgid ":func:`os.path.splitext`" msgstr "" -#: ../../library/pathlib.rst:1893 +#: ../../library/pathlib.rst:1896 msgid ":attr:`PurePath.stem`, :attr:`PurePath.suffix`" msgstr "" -#: ../../library/pathlib.rst:1894 +#: ../../library/pathlib.rst:1897 msgid ":func:`os.path.join`" msgstr "" -#: ../../library/pathlib.rst:1894 +#: ../../library/pathlib.rst:1897 msgid ":meth:`PurePath.joinpath`" msgstr "" -#: ../../library/pathlib.rst:1895 +#: ../../library/pathlib.rst:1898 msgid ":func:`os.path.isabs`" msgstr "" -#: ../../library/pathlib.rst:1895 +#: ../../library/pathlib.rst:1898 msgid ":meth:`PurePath.is_absolute`" msgstr "" -#: ../../library/pathlib.rst:1896 +#: ../../library/pathlib.rst:1899 msgid ":func:`os.path.relpath`" msgstr "" -#: ../../library/pathlib.rst:1896 +#: ../../library/pathlib.rst:1899 msgid ":meth:`PurePath.relative_to` [1]_" msgstr "" -#: ../../library/pathlib.rst:1897 +#: ../../library/pathlib.rst:1900 msgid ":func:`os.path.expanduser`" msgstr "" -#: ../../library/pathlib.rst:1897 +#: ../../library/pathlib.rst:1900 msgid ":meth:`Path.expanduser` [2]_" msgstr "" -#: ../../library/pathlib.rst:1898 +#: ../../library/pathlib.rst:1901 msgid ":func:`os.path.realpath`" msgstr "" -#: ../../library/pathlib.rst:1898 +#: ../../library/pathlib.rst:1901 msgid ":meth:`Path.resolve`" msgstr "" -#: ../../library/pathlib.rst:1899 +#: ../../library/pathlib.rst:1902 msgid ":func:`os.path.abspath`" msgstr "" -#: ../../library/pathlib.rst:1899 +#: ../../library/pathlib.rst:1902 msgid ":meth:`Path.absolute` [3]_" msgstr "" -#: ../../library/pathlib.rst:1900 +#: ../../library/pathlib.rst:1903 msgid ":func:`os.path.exists`" msgstr "" -#: ../../library/pathlib.rst:1900 +#: ../../library/pathlib.rst:1903 msgid ":meth:`Path.exists`" msgstr "" -#: ../../library/pathlib.rst:1901 +#: ../../library/pathlib.rst:1904 msgid ":func:`os.path.isfile`" msgstr "" -#: ../../library/pathlib.rst:1901 +#: ../../library/pathlib.rst:1904 msgid ":meth:`Path.is_file`" msgstr "" -#: ../../library/pathlib.rst:1902 +#: ../../library/pathlib.rst:1905 msgid ":func:`os.path.isdir`" msgstr "" -#: ../../library/pathlib.rst:1902 +#: ../../library/pathlib.rst:1905 msgid ":meth:`Path.is_dir`" msgstr "" -#: ../../library/pathlib.rst:1903 +#: ../../library/pathlib.rst:1906 msgid ":func:`os.path.islink`" msgstr "" -#: ../../library/pathlib.rst:1903 +#: ../../library/pathlib.rst:1906 msgid ":meth:`Path.is_symlink`" msgstr "" -#: ../../library/pathlib.rst:1904 +#: ../../library/pathlib.rst:1907 msgid ":func:`os.path.isjunction`" msgstr "" -#: ../../library/pathlib.rst:1904 +#: ../../library/pathlib.rst:1907 msgid ":meth:`Path.is_junction`" msgstr "" -#: ../../library/pathlib.rst:1905 +#: ../../library/pathlib.rst:1908 msgid ":func:`os.path.ismount`" msgstr "" -#: ../../library/pathlib.rst:1905 +#: ../../library/pathlib.rst:1908 msgid ":meth:`Path.is_mount`" msgstr "" -#: ../../library/pathlib.rst:1906 +#: ../../library/pathlib.rst:1909 msgid ":func:`os.path.samefile`" msgstr "" -#: ../../library/pathlib.rst:1906 +#: ../../library/pathlib.rst:1909 msgid ":meth:`Path.samefile`" msgstr "" -#: ../../library/pathlib.rst:1907 +#: ../../library/pathlib.rst:1910 msgid ":func:`os.getcwd`" msgstr "" -#: ../../library/pathlib.rst:1907 +#: ../../library/pathlib.rst:1910 msgid ":meth:`Path.cwd`" msgstr "" -#: ../../library/pathlib.rst:1908 +#: ../../library/pathlib.rst:1911 msgid ":func:`os.stat`" msgstr "" -#: ../../library/pathlib.rst:1908 +#: ../../library/pathlib.rst:1911 msgid ":meth:`Path.stat`" msgstr "" -#: ../../library/pathlib.rst:1909 +#: ../../library/pathlib.rst:1912 msgid ":func:`os.lstat`" msgstr "" -#: ../../library/pathlib.rst:1909 +#: ../../library/pathlib.rst:1912 msgid ":meth:`Path.lstat`" msgstr "" -#: ../../library/pathlib.rst:1910 +#: ../../library/pathlib.rst:1913 msgid ":func:`os.listdir`" msgstr "" -#: ../../library/pathlib.rst:1910 +#: ../../library/pathlib.rst:1913 msgid ":meth:`Path.iterdir`" msgstr "" -#: ../../library/pathlib.rst:1911 +#: ../../library/pathlib.rst:1914 msgid ":func:`os.walk`" msgstr "" -#: ../../library/pathlib.rst:1911 +#: ../../library/pathlib.rst:1914 msgid ":meth:`Path.walk` [4]_" msgstr "" -#: ../../library/pathlib.rst:1912 +#: ../../library/pathlib.rst:1915 msgid ":func:`os.mkdir`, :func:`os.makedirs`" msgstr "" -#: ../../library/pathlib.rst:1912 +#: ../../library/pathlib.rst:1915 msgid ":meth:`Path.mkdir`" msgstr "" -#: ../../library/pathlib.rst:1913 +#: ../../library/pathlib.rst:1916 msgid ":func:`os.link`" msgstr "" -#: ../../library/pathlib.rst:1913 +#: ../../library/pathlib.rst:1916 msgid ":meth:`Path.hardlink_to`" msgstr "" -#: ../../library/pathlib.rst:1914 +#: ../../library/pathlib.rst:1917 msgid ":func:`os.symlink`" msgstr "" -#: ../../library/pathlib.rst:1914 +#: ../../library/pathlib.rst:1917 msgid ":meth:`Path.symlink_to`" msgstr "" -#: ../../library/pathlib.rst:1915 +#: ../../library/pathlib.rst:1918 msgid ":func:`os.readlink`" msgstr "" -#: ../../library/pathlib.rst:1915 +#: ../../library/pathlib.rst:1918 msgid ":meth:`Path.readlink`" msgstr "" -#: ../../library/pathlib.rst:1916 +#: ../../library/pathlib.rst:1919 msgid ":func:`os.rename`" msgstr "" -#: ../../library/pathlib.rst:1916 +#: ../../library/pathlib.rst:1919 msgid ":meth:`Path.rename`" msgstr "" -#: ../../library/pathlib.rst:1917 +#: ../../library/pathlib.rst:1920 msgid ":func:`os.replace`" msgstr "" -#: ../../library/pathlib.rst:1917 +#: ../../library/pathlib.rst:1920 msgid ":meth:`Path.replace`" msgstr "" -#: ../../library/pathlib.rst:1918 +#: ../../library/pathlib.rst:1921 msgid ":func:`os.remove`, :func:`os.unlink`" msgstr "" -#: ../../library/pathlib.rst:1918 +#: ../../library/pathlib.rst:1921 msgid ":meth:`Path.unlink`" msgstr "" -#: ../../library/pathlib.rst:1919 +#: ../../library/pathlib.rst:1922 msgid ":func:`os.rmdir`" msgstr "" -#: ../../library/pathlib.rst:1919 +#: ../../library/pathlib.rst:1922 msgid ":meth:`Path.rmdir`" msgstr "" -#: ../../library/pathlib.rst:1920 +#: ../../library/pathlib.rst:1923 msgid ":func:`os.chmod`" msgstr "" -#: ../../library/pathlib.rst:1920 +#: ../../library/pathlib.rst:1923 msgid ":meth:`Path.chmod`" msgstr "" -#: ../../library/pathlib.rst:1921 +#: ../../library/pathlib.rst:1924 msgid ":func:`os.lchmod`" msgstr "" -#: ../../library/pathlib.rst:1921 +#: ../../library/pathlib.rst:1924 msgid ":meth:`Path.lchmod`" msgstr "" -#: ../../library/pathlib.rst:1925 +#: ../../library/pathlib.rst:1928 msgid "Footnotes" msgstr "" -#: ../../library/pathlib.rst:1926 +#: ../../library/pathlib.rst:1929 msgid "" ":func:`os.path.relpath` calls :func:`~os.path.abspath` to make paths " "absolute and remove \"``..``\" parts, whereas :meth:`PurePath.relative_to` " @@ -2726,84 +2733,84 @@ msgid "" "anchors differ (e.g. if one path is absolute and the other relative.)" msgstr "" -#: ../../library/pathlib.rst:1930 +#: ../../library/pathlib.rst:1933 msgid "" ":func:`os.path.expanduser` returns the path unchanged if the home directory " "can't be resolved, whereas :meth:`Path.expanduser` raises :exc:" "`RuntimeError`." msgstr "" -#: ../../library/pathlib.rst:1933 +#: ../../library/pathlib.rst:1936 msgid "" ":func:`os.path.abspath` removes \"``..``\" components without resolving " "symlinks, which may change the meaning of the path, whereas :meth:`Path." "absolute` leaves any \"``..``\" components in the path." msgstr "" -#: ../../library/pathlib.rst:1936 +#: ../../library/pathlib.rst:1939 msgid "" ":func:`os.walk` always follows symlinks when categorizing paths into " "*dirnames* and *filenames*, whereas :meth:`Path.walk` categorizes all " "symlinks into *filenames* when *follow_symlinks* is false (the default.)" msgstr "" -#: ../../library/pathlib.rst:1942 +#: ../../library/pathlib.rst:1945 msgid "Protocols" msgstr "" -#: ../../library/pathlib.rst:1948 +#: ../../library/pathlib.rst:1951 msgid "" "The :mod:`pathlib.types` module provides types for static type checking." msgstr "" -#: ../../library/pathlib.rst:1955 +#: ../../library/pathlib.rst:1958 msgid "" "A :class:`typing.Protocol` describing the :attr:`Path.info ` attribute. Implementations may return cached results from their " "methods." msgstr "" -#: ../../library/pathlib.rst:1961 +#: ../../library/pathlib.rst:1964 msgid "" "Return ``True`` if the path is an existing file or directory, or any other " "kind of file; return ``False`` if the path doesn't exist." msgstr "" -#: ../../library/pathlib.rst:1964 +#: ../../library/pathlib.rst:1967 msgid "" "If *follow_symlinks* is ``False``, return ``True`` for symlinks without " "checking if their targets exist." msgstr "" -#: ../../library/pathlib.rst:1969 +#: ../../library/pathlib.rst:1972 msgid "" "Return ``True`` if the path is a directory, or a symbolic link pointing to a " "directory; return ``False`` if the path is (or points to) any other kind of " "file, or if it doesn't exist." msgstr "" -#: ../../library/pathlib.rst:1973 +#: ../../library/pathlib.rst:1976 msgid "" "If *follow_symlinks* is ``False``, return ``True`` only if the path is a " "directory (without following symlinks); return ``False`` if the path is any " "other kind of file, or if it doesn't exist." msgstr "" -#: ../../library/pathlib.rst:1979 +#: ../../library/pathlib.rst:1982 msgid "" "Return ``True`` if the path is a file, or a symbolic link pointing to a " "file; return ``False`` if the path is (or points to) a directory or other " "non-file, or if it doesn't exist." msgstr "" -#: ../../library/pathlib.rst:1983 +#: ../../library/pathlib.rst:1986 msgid "" "If *follow_symlinks* is ``False``, return ``True`` only if the path is a " "file (without following symlinks); return ``False`` if the path is a " -"directory or other other non-file, or if it doesn't exist." +"directory or other non-file, or if it doesn't exist." msgstr "" -#: ../../library/pathlib.rst:1989 +#: ../../library/pathlib.rst:1992 msgid "" "Return ``True`` if the path is a symbolic link (even if broken); return " "``False`` if the path is a directory or any kind of file, or if it doesn't " diff --git a/library/pdb.po b/library/pdb.po index f76b87559..102d576e0 100644 --- a/library/pdb.po +++ b/library/pdb.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:11+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -135,7 +136,7 @@ msgid "" msgstr "" #: ../../library/pdb.rst:83 -msgid "python -m pdb [-c command] (-m module | pyfile) [args ...]" +msgid "python -m pdb [-c command] (-m module | -p pid | pyfile) [args ...]" msgstr "" #: ../../library/pdb.rst:85 @@ -167,11 +168,32 @@ msgstr "" msgid "Added the ``-m`` option." msgstr "" -#: ../../library/pdb.rst:107 +#: ../../library/pdb.rst:109 +msgid "Attach to the process with the specified PID." +msgstr "" + +#: ../../library/pdb.rst:114 +msgid "" +"To attach to a running Python process for remote debugging, use the ``-p`` " +"or ``--pid`` option with the target process's PID::" +msgstr "" + +#: ../../library/pdb.rst:117 +msgid "python -m pdb -p 1234" +msgstr "" + +#: ../../library/pdb.rst:121 +msgid "" +"Attaching to a process that is blocked in a system call or waiting for I/O " +"will only work once the next bytecode instruction is executed or when the " +"process receives a signal." +msgstr "" + +#: ../../library/pdb.rst:125 msgid "Typical usage to execute a statement under control of the debugger is::" msgstr "" -#: ../../library/pdb.rst:109 +#: ../../library/pdb.rst:127 msgid "" ">>> import pdb\n" ">>> def f(x):\n" @@ -183,11 +205,11 @@ msgid "" ">>>" msgstr "" -#: ../../library/pdb.rst:118 +#: ../../library/pdb.rst:136 msgid "The typical usage to inspect a crashed program is::" msgstr "" -#: ../../library/pdb.rst:120 +#: ../../library/pdb.rst:138 msgid "" ">>> import pdb\n" ">>> def f(x):\n" @@ -205,20 +227,20 @@ msgid "" "(Pdb)" msgstr "" -#: ../../library/pdb.rst:135 +#: ../../library/pdb.rst:153 msgid "" "The implementation of :pep:`667` means that name assignments made via " "``pdb`` will immediately affect the active scope, even when running inside " "an :term:`optimized scope`." msgstr "" -#: ../../library/pdb.rst:141 +#: ../../library/pdb.rst:159 msgid "" "The module defines the following functions; each enters the debugger in a " "slightly different way:" msgstr "" -#: ../../library/pdb.rst:146 +#: ../../library/pdb.rst:164 msgid "" "Execute the *statement* (given as a string or a code object) under debugger " "control. The debugger prompt appears before any code is executed; you can " @@ -230,14 +252,14 @@ msgid "" "`exec` or :func:`eval` functions.)" msgstr "" -#: ../../library/pdb.rst:158 +#: ../../library/pdb.rst:176 msgid "" "Evaluate the *expression* (given as a string or a code object) under " "debugger control. When :func:`runeval` returns, it returns the value of the " "*expression*. Otherwise this function is similar to :func:`run`." msgstr "" -#: ../../library/pdb.rst:165 +#: ../../library/pdb.rst:183 msgid "" "Call the *function* (a function or method object, not a string) with the " "given arguments. When :func:`runcall` returns, it returns whatever the " @@ -245,7 +267,7 @@ msgid "" "is entered." msgstr "" -#: ../../library/pdb.rst:173 +#: ../../library/pdb.rst:191 msgid "" "Enter the debugger at the calling stack frame. This is useful to hard-code " "a breakpoint at a given point in a program, even if the code is not " @@ -255,55 +277,55 @@ msgid "" "starts." msgstr "" -#: ../../library/pdb.rst:181 +#: ../../library/pdb.rst:199 msgid "The keyword-only argument *header*." msgstr "" -#: ../../library/pdb.rst:184 +#: ../../library/pdb.rst:202 msgid "" ":func:`set_trace` will enter the debugger immediately, rather than on the " "next line of code to be executed." msgstr "" -#: ../../library/pdb.rst:188 +#: ../../library/pdb.rst:206 msgid "The *commands* argument." msgstr "" -#: ../../library/pdb.rst:194 +#: ../../library/pdb.rst:212 msgid "" "async version of :func:`set_trace`. This function should be used inside an " "async function with :keyword:`await`." msgstr "" -#: ../../library/pdb.rst:197 +#: ../../library/pdb.rst:215 msgid "" "async def f():\n" " await pdb.set_trace_async()" msgstr "" -#: ../../library/pdb.rst:202 +#: ../../library/pdb.rst:220 msgid "" ":keyword:`await` statements are supported if the debugger is invoked by this " "function." msgstr "" -#: ../../library/pdb.rst:208 +#: ../../library/pdb.rst:226 msgid "" "Enter post-mortem debugging of the given exception or :ref:`traceback object " "`. If no value is given, it uses the exception that is " "currently being handled, or raises ``ValueError`` if there isn’t one." msgstr "" -#: ../../library/pdb.rst:213 +#: ../../library/pdb.rst:231 msgid "Support for exception objects was added." msgstr "" -#: ../../library/pdb.rst:218 +#: ../../library/pdb.rst:236 msgid "" "Enter post-mortem debugging of the exception found in :data:`sys.last_exc`." msgstr "" -#: ../../library/pdb.rst:223 +#: ../../library/pdb.rst:241 msgid "" "There are two supported backends for pdb: ``'settrace'`` and " "``'monitoring'``. See :class:`bdb.Bdb` for details. The user can set the " @@ -311,41 +333,41 @@ msgid "" "If no backend is specified, the default is ``'settrace'``." msgstr "" -#: ../../library/pdb.rst:230 +#: ../../library/pdb.rst:248 msgid "" ":func:`breakpoint` and :func:`set_trace` will not be affected by this " "function. They always use ``'monitoring'`` backend." msgstr "" -#: ../../library/pdb.rst:237 +#: ../../library/pdb.rst:255 msgid "Returns the default backend for pdb." msgstr "" -#: ../../library/pdb.rst:241 +#: ../../library/pdb.rst:259 msgid "" "The ``run*`` functions and :func:`set_trace` are aliases for instantiating " "the :class:`Pdb` class and calling the method of the same name. If you want " "to access further features, you have to do this yourself:" msgstr "" -#: ../../library/pdb.rst:248 +#: ../../library/pdb.rst:266 msgid ":class:`Pdb` is the debugger class." msgstr "" -#: ../../library/pdb.rst:250 +#: ../../library/pdb.rst:268 msgid "" "The *completekey*, *stdin* and *stdout* arguments are passed to the " "underlying :class:`cmd.Cmd` class; see the description there." msgstr "" -#: ../../library/pdb.rst:253 +#: ../../library/pdb.rst:271 msgid "" "The *skip* argument, if given, must be an iterable of glob-style module name " "patterns. The debugger will not step into frames that originate in a module " "that matches one of these patterns. [1]_" msgstr "" -#: ../../library/pdb.rst:257 +#: ../../library/pdb.rst:275 msgid "" "By default, Pdb sets a handler for the SIGINT signal (which is sent when the " "user presses :kbd:`Ctrl-C` on the console) when you give a :pdbcmd:" @@ -354,13 +376,13 @@ msgid "" "set *nosigint* to true." msgstr "" -#: ../../library/pdb.rst:262 +#: ../../library/pdb.rst:280 msgid "" "The *readrc* argument defaults to true and controls whether Pdb will load ." "pdbrc files from the filesystem." msgstr "" -#: ../../library/pdb.rst:265 +#: ../../library/pdb.rst:283 msgid "" "The *mode* argument specifies how the debugger was invoked. It impacts the " "workings of some debugger commands. Valid values are ``'inline'`` (used by " @@ -369,7 +391,7 @@ msgid "" "argument was added)." msgstr "" -#: ../../library/pdb.rst:272 +#: ../../library/pdb.rst:290 msgid "" "The *backend* argument specifies the backend to use for the debugger. If " "``None`` is passed, the default backend will be used. See :func:" @@ -377,68 +399,68 @@ msgid "" "and ``'monitoring'``." msgstr "" -#: ../../library/pdb.rst:276 +#: ../../library/pdb.rst:294 msgid "" "The *colorize* argument, if set to ``True``, will enable colorized output in " "the debugger, if color is supported. This will highlight source code " "displayed in pdb." msgstr "" -#: ../../library/pdb.rst:279 +#: ../../library/pdb.rst:297 msgid "Example call to enable tracing with *skip*::" msgstr "" -#: ../../library/pdb.rst:281 +#: ../../library/pdb.rst:299 msgid "import pdb; pdb.Pdb(skip=['django.*']).set_trace()" msgstr "" -#: ../../library/pdb.rst:283 +#: ../../library/pdb.rst:301 msgid "" "Raises an :ref:`auditing event ` ``pdb.Pdb`` with no arguments." msgstr "" -#: ../../library/pdb.rst:285 +#: ../../library/pdb.rst:303 msgid "Added the *skip* parameter." msgstr "" -#: ../../library/pdb.rst:288 +#: ../../library/pdb.rst:306 msgid "" "Added the *nosigint* parameter. Previously, a SIGINT handler was never set " "by Pdb." msgstr "" -#: ../../library/pdb.rst:292 +#: ../../library/pdb.rst:310 msgid "The *readrc* argument." msgstr "" -#: ../../library/pdb.rst:295 +#: ../../library/pdb.rst:313 msgid "Added the *mode* argument." msgstr "" -#: ../../library/pdb.rst:298 +#: ../../library/pdb.rst:316 msgid "Added the *backend* argument." msgstr "" -#: ../../library/pdb.rst:301 +#: ../../library/pdb.rst:319 msgid "Added the *colorize* argument." msgstr "" -#: ../../library/pdb.rst:304 +#: ../../library/pdb.rst:322 msgid "" "Inline breakpoints like :func:`breakpoint` or :func:`pdb.set_trace` will " "always stop the program at calling frame, ignoring the *skip* pattern (if " "any)." msgstr "" -#: ../../library/pdb.rst:313 +#: ../../library/pdb.rst:331 msgid "See the documentation for the functions explained above." msgstr "" -#: ../../library/pdb.rst:319 +#: ../../library/pdb.rst:337 msgid "Debugger Commands" msgstr "" -#: ../../library/pdb.rst:321 +#: ../../library/pdb.rst:339 msgid "" "The commands recognized by the debugger are listed below. Most commands can " "be abbreviated to one or two letters as indicated; e.g. ``h(elp)`` means " @@ -450,13 +472,13 @@ msgid "" "are separated by a vertical bar (``|``)." msgstr "" -#: ../../library/pdb.rst:330 +#: ../../library/pdb.rst:348 msgid "" "Entering a blank line repeats the last command entered. Exception: if the " "last command was a :pdbcmd:`list` command, the next 11 lines are listed." msgstr "" -#: ../../library/pdb.rst:333 +#: ../../library/pdb.rst:351 msgid "" "Commands that the debugger doesn't recognize are assumed to be Python " "statements and are executed in the context of the program being debugged. " @@ -467,20 +489,20 @@ msgid "" "is not changed." msgstr "" -#: ../../library/pdb.rst:341 +#: ../../library/pdb.rst:359 msgid "" "Expressions/Statements whose prefix is a pdb command are now correctly " "identified and executed." msgstr "" -#: ../../library/pdb.rst:345 +#: ../../library/pdb.rst:363 msgid "" "The debugger supports :ref:`aliases `. Aliases can have " "parameters which allows one a certain level of adaptability to the context " "under examination." msgstr "" -#: ../../library/pdb.rst:349 +#: ../../library/pdb.rst:367 msgid "" "Multiple commands may be entered on a single line, separated by ``;;``. (A " "single ``;`` is not used as it is the separator for multiple commands in a " @@ -491,7 +513,7 @@ msgid "" "\"\";\"``." msgstr "" -#: ../../library/pdb.rst:356 +#: ../../library/pdb.rst:374 msgid "" "To set a temporary global variable, use a *convenience variable*. A " "*convenience variable* is a variable whose name starts with ``$``. For " @@ -501,35 +523,35 @@ msgid "" "compared to using normal variables like ``foo = 1``." msgstr "" -#: ../../library/pdb.rst:363 +#: ../../library/pdb.rst:381 msgid "There are four preset *convenience variables*:" msgstr "" -#: ../../library/pdb.rst:365 +#: ../../library/pdb.rst:383 msgid "``$_frame``: the current frame you are debugging" msgstr "" -#: ../../library/pdb.rst:366 +#: ../../library/pdb.rst:384 msgid "``$_retval``: the return value if the frame is returning" msgstr "" -#: ../../library/pdb.rst:367 +#: ../../library/pdb.rst:385 msgid "``$_exception``: the exception if the frame is raising an exception" msgstr "" -#: ../../library/pdb.rst:368 +#: ../../library/pdb.rst:386 msgid "``$_asynctask``: the asyncio task if pdb stops in an async function" msgstr "" -#: ../../library/pdb.rst:372 +#: ../../library/pdb.rst:390 msgid "Added the *convenience variable* feature." msgstr "" -#: ../../library/pdb.rst:374 +#: ../../library/pdb.rst:392 msgid "Added the ``$_asynctask`` convenience variable." msgstr "" -#: ../../library/pdb.rst:381 +#: ../../library/pdb.rst:399 msgid "" "If a file :file:`.pdbrc` exists in the user's home directory or in the " "current directory, it is read with ``'utf-8'`` encoding and executed as if " @@ -539,20 +561,20 @@ msgid "" "read first and aliases defined there can be overridden by the local file." msgstr "" -#: ../../library/pdb.rst:388 +#: ../../library/pdb.rst:406 msgid "" ":file:`.pdbrc` can now contain commands that continue debugging, such as :" "pdbcmd:`continue` or :pdbcmd:`next`. Previously, these commands had no " "effect." msgstr "" -#: ../../library/pdb.rst:393 +#: ../../library/pdb.rst:411 msgid "" ":file:`.pdbrc` is now read with ``'utf-8'`` encoding. Previously, it was " "read with the system locale encoding." msgstr "" -#: ../../library/pdb.rst:400 +#: ../../library/pdb.rst:418 msgid "" "Without argument, print the list of available commands. With a *command* as " "argument, print help about that command. ``help pdb`` displays the full " @@ -561,7 +583,7 @@ msgid "" "the ``!`` command." msgstr "" -#: ../../library/pdb.rst:408 +#: ../../library/pdb.rst:426 msgid "" "Print a stack trace, with the most recent frame at the bottom. if *count* " "is 0, print the current frame entry. If *count* is negative, print the least " @@ -570,23 +592,23 @@ msgid "" "determines the context of most commands." msgstr "" -#: ../../library/pdb.rst:414 +#: ../../library/pdb.rst:432 msgid "*count* argument is added." msgstr "" -#: ../../library/pdb.rst:419 +#: ../../library/pdb.rst:437 msgid "" "Move the current frame *count* (default one) levels down in the stack trace " "(to a newer frame)." msgstr "" -#: ../../library/pdb.rst:424 +#: ../../library/pdb.rst:442 msgid "" "Move the current frame *count* (default one) levels up in the stack trace " "(to an older frame)." msgstr "" -#: ../../library/pdb.rst:429 +#: ../../library/pdb.rst:447 msgid "" "With a *lineno* argument, set a break at line *lineno* in the current file. " "The line number may be prefixed with a *filename* and a colon, to specify a " @@ -595,46 +617,46 @@ msgid "" "abspath/to/file.py``, ``relpath/file.py``, ``module`` and ``package.module``." msgstr "" -#: ../../library/pdb.rst:436 +#: ../../library/pdb.rst:454 msgid "" "With a *function* argument, set a break at the first executable statement " "within that function. *function* can be any expression that evaluates to a " "function in the current namespace." msgstr "" -#: ../../library/pdb.rst:440 +#: ../../library/pdb.rst:458 msgid "" "If a second argument is present, it is an expression which must evaluate to " "true before the breakpoint is honored." msgstr "" -#: ../../library/pdb.rst:443 +#: ../../library/pdb.rst:461 msgid "" "Without argument, list all breaks, including for each breakpoint, the number " "of times that breakpoint has been hit, the current ignore count, and the " "associated condition if any." msgstr "" -#: ../../library/pdb.rst:447 +#: ../../library/pdb.rst:465 msgid "" "Each breakpoint is assigned a number to which all the other breakpoint " "commands refer." msgstr "" -#: ../../library/pdb.rst:452 +#: ../../library/pdb.rst:470 msgid "" "Temporary breakpoint, which is removed automatically when it is first hit. " "The arguments are the same as for :pdbcmd:`break`." msgstr "" -#: ../../library/pdb.rst:457 +#: ../../library/pdb.rst:475 msgid "" "With a *filename:lineno* argument, clear all the breakpoints at this line. " "With a space separated list of breakpoint numbers, clear those breakpoints. " "Without argument, clear all breaks (but first ask confirmation)." msgstr "" -#: ../../library/pdb.rst:463 +#: ../../library/pdb.rst:481 msgid "" "Disable the breakpoints given as a space separated list of breakpoint " "numbers. Disabling a breakpoint means it cannot cause the program to stop " @@ -642,11 +664,11 @@ msgid "" "breakpoints and can be (re-)enabled." msgstr "" -#: ../../library/pdb.rst:470 +#: ../../library/pdb.rst:488 msgid "Enable the breakpoints specified." msgstr "" -#: ../../library/pdb.rst:474 +#: ../../library/pdb.rst:492 msgid "" "Set the ignore count for the given breakpoint number. If *count* is " "omitted, the ignore count is set to 0. A breakpoint becomes active when the " @@ -655,21 +677,21 @@ msgid "" "associated condition evaluates to true." msgstr "" -#: ../../library/pdb.rst:482 +#: ../../library/pdb.rst:500 msgid "" "Set a new *condition* for the breakpoint, an expression which must evaluate " "to true before the breakpoint is honored. If *condition* is absent, any " "existing condition is removed; i.e., the breakpoint is made unconditional." msgstr "" -#: ../../library/pdb.rst:488 +#: ../../library/pdb.rst:506 msgid "" "Specify a list of commands for breakpoint number *bpnumber*. The commands " "themselves appear on the following lines. Type a line containing just " "``end`` to terminate the commands. An example::" msgstr "" -#: ../../library/pdb.rst:492 +#: ../../library/pdb.rst:510 msgid "" "(Pdb) commands 1\n" "(com) p some_variable\n" @@ -677,25 +699,25 @@ msgid "" "(Pdb)" msgstr "" -#: ../../library/pdb.rst:497 +#: ../../library/pdb.rst:515 msgid "" "To remove all commands from a breakpoint, type ``commands`` and follow it " "immediately with ``end``; that is, give no commands." msgstr "" -#: ../../library/pdb.rst:500 +#: ../../library/pdb.rst:518 msgid "" "With no *bpnumber* argument, ``commands`` refers to the last breakpoint set." msgstr "" -#: ../../library/pdb.rst:502 +#: ../../library/pdb.rst:520 msgid "" "You can use breakpoint commands to start your program up again. Simply use " "the :pdbcmd:`continue` command, or :pdbcmd:`step`, or any other command that " "resumes execution." msgstr "" -#: ../../library/pdb.rst:506 +#: ../../library/pdb.rst:524 msgid "" "Specifying any command resuming execution (currently :pdbcmd:`continue`, :" "pdbcmd:`step`, :pdbcmd:`next`, :pdbcmd:`return`, :pdbcmd:`until`, :pdbcmd:" @@ -706,26 +728,26 @@ msgid "" "to ambiguities about which list to execute." msgstr "" -#: ../../library/pdb.rst:515 +#: ../../library/pdb.rst:533 msgid "" "If the list of commands contains the ``silent`` command, or a command that " "resumes execution, then the breakpoint message containing information about " "the frame is not displayed." msgstr "" -#: ../../library/pdb.rst:519 +#: ../../library/pdb.rst:537 msgid "" "Frame information will not be displayed if a command that resumes execution " "is present in the command list." msgstr "" -#: ../../library/pdb.rst:525 +#: ../../library/pdb.rst:543 msgid "" "Execute the current line, stop at the first possible occasion (either in a " "function that is called or on the next line in the current function)." msgstr "" -#: ../../library/pdb.rst:530 +#: ../../library/pdb.rst:548 msgid "" "Continue execution until the next line in the current function is reached or " "it returns. (The difference between :pdbcmd:`next` and :pdbcmd:`step` is " @@ -734,46 +756,46 @@ msgid "" "line in the current function.)" msgstr "" -#: ../../library/pdb.rst:538 +#: ../../library/pdb.rst:556 msgid "" "Without argument, continue execution until the line with a number greater " "than the current one is reached." msgstr "" -#: ../../library/pdb.rst:541 +#: ../../library/pdb.rst:559 msgid "" "With *lineno*, continue execution until a line with a number greater or " "equal to *lineno* is reached. In both cases, also stop when the current " "frame returns." msgstr "" -#: ../../library/pdb.rst:545 +#: ../../library/pdb.rst:563 msgid "Allow giving an explicit line number." msgstr "" -#: ../../library/pdb.rst:550 +#: ../../library/pdb.rst:568 msgid "Continue execution until the current function returns." msgstr "" -#: ../../library/pdb.rst:554 +#: ../../library/pdb.rst:572 msgid "Continue execution, only stop when a breakpoint is encountered." msgstr "" -#: ../../library/pdb.rst:558 +#: ../../library/pdb.rst:576 msgid "" "Set the next line that will be executed. Only available in the bottom-most " "frame. This lets you jump back and execute code again, or jump forward to " "skip code that you don't want to run." msgstr "" -#: ../../library/pdb.rst:562 +#: ../../library/pdb.rst:580 msgid "" "It should be noted that not all jumps are allowed -- for instance it is not " "possible to jump into the middle of a :keyword:`for` loop or out of a :" "keyword:`finally` clause." msgstr "" -#: ../../library/pdb.rst:568 +#: ../../library/pdb.rst:586 msgid "" "List source code for the current file. Without arguments, list 11 lines " "around the current line or continue the previous listing. With ``.`` as " @@ -782,7 +804,7 @@ msgid "" "second argument is less than the first, it is interpreted as a count." msgstr "" -#: ../../library/pdb.rst:574 +#: ../../library/pdb.rst:592 msgid "" "The current line in the current frame is indicated by ``->``. If an " "exception is being debugged, the line where the exception was originally " @@ -790,67 +812,67 @@ msgid "" "line." msgstr "" -#: ../../library/pdb.rst:579 +#: ../../library/pdb.rst:597 msgid "Added the ``>>`` marker." msgstr "" -#: ../../library/pdb.rst:584 +#: ../../library/pdb.rst:602 msgid "" "List all source code for the current function or frame. Interesting lines " "are marked as for :pdbcmd:`list`." msgstr "" -#: ../../library/pdb.rst:591 +#: ../../library/pdb.rst:609 msgid "Print the arguments of the current function and their current values." msgstr "" -#: ../../library/pdb.rst:595 +#: ../../library/pdb.rst:613 msgid "Evaluate *expression* in the current context and print its value." msgstr "" -#: ../../library/pdb.rst:599 +#: ../../library/pdb.rst:617 msgid "" "``print()`` can also be used, but is not a debugger command --- this " "executes the Python :func:`print` function." msgstr "" -#: ../../library/pdb.rst:605 +#: ../../library/pdb.rst:623 msgid "" "Like the :pdbcmd:`p` command, except the value of *expression* is pretty-" "printed using the :mod:`pprint` module." msgstr "" -#: ../../library/pdb.rst:610 +#: ../../library/pdb.rst:628 msgid "Print the type of *expression*." msgstr "" -#: ../../library/pdb.rst:614 +#: ../../library/pdb.rst:632 msgid "Try to get source code of *expression* and display it." msgstr "" -#: ../../library/pdb.rst:620 +#: ../../library/pdb.rst:638 msgid "" "Display the value of *expression* if it changed, each time execution stops " "in the current frame." msgstr "" -#: ../../library/pdb.rst:623 +#: ../../library/pdb.rst:641 msgid "" "Without *expression*, list all display expressions for the current frame." msgstr "" -#: ../../library/pdb.rst:627 +#: ../../library/pdb.rst:645 msgid "" "Display evaluates *expression* and compares to the result of the previous " "evaluation of *expression*, so when the result is mutable, display may not " "be able to pick up the changes." msgstr "" -#: ../../library/pdb.rst:631 ../../library/pdb.rst:796 +#: ../../library/pdb.rst:649 ../../library/pdb.rst:814 msgid "Example::" msgstr "" -#: ../../library/pdb.rst:633 +#: ../../library/pdb.rst:651 msgid "" "lst = []\n" "breakpoint()\n" @@ -859,13 +881,13 @@ msgid "" "print(lst)" msgstr "" -#: ../../library/pdb.rst:639 +#: ../../library/pdb.rst:657 msgid "" "Display won't realize ``lst`` has been changed because the result of " "evaluation is modified in place by ``lst.append(1)`` before being compared::" msgstr "" -#: ../../library/pdb.rst:642 +#: ../../library/pdb.rst:660 msgid "" "> example.py(3)()\n" "-> pass\n" @@ -880,11 +902,11 @@ msgid "" "(Pdb)" msgstr "" -#: ../../library/pdb.rst:654 +#: ../../library/pdb.rst:672 msgid "You can do some tricks with copy mechanism to make it work::" msgstr "" -#: ../../library/pdb.rst:656 +#: ../../library/pdb.rst:674 msgid "" "> example.py(3)()\n" "-> pass\n" @@ -900,13 +922,13 @@ msgid "" "(Pdb)" msgstr "" -#: ../../library/pdb.rst:673 +#: ../../library/pdb.rst:691 msgid "" "Do not display *expression* anymore in the current frame. Without " "*expression*, clear all display expressions for the current frame." msgstr "" -#: ../../library/pdb.rst:680 +#: ../../library/pdb.rst:698 msgid "" "Start an interactive interpreter (using the :mod:`code` module) in a new " "global namespace initialised from the local and global namespaces for the " @@ -914,7 +936,7 @@ msgid "" "return to the debugger." msgstr "" -#: ../../library/pdb.rst:687 +#: ../../library/pdb.rst:705 msgid "" "As ``interact`` creates a new dedicated namespace for code execution, " "assignments to variables will not affect the original namespaces. However, " @@ -922,18 +944,18 @@ msgid "" "original namespaces as usual." msgstr "" -#: ../../library/pdb.rst:694 +#: ../../library/pdb.rst:712 msgid "" "``exit()`` and ``quit()`` can be used to exit the :pdbcmd:`interact` command." msgstr "" -#: ../../library/pdb.rst:698 +#: ../../library/pdb.rst:716 msgid "" ":pdbcmd:`interact` directs its output to the debugger's output channel " "rather than :data:`sys.stderr`." msgstr "" -#: ../../library/pdb.rst:706 +#: ../../library/pdb.rst:724 msgid "" "Create an alias called *name* that executes *command*. The *command* must " "*not* be enclosed in quotes. Replaceable parameters can be indicated by " @@ -942,7 +964,7 @@ msgid "" "If no arguments are given, all aliases are listed." msgstr "" -#: ../../library/pdb.rst:712 +#: ../../library/pdb.rst:730 msgid "" "Aliases may be nested and can contain anything that can be legally typed at " "the pdb prompt. Note that internal pdb commands *can* be overridden by " @@ -951,13 +973,13 @@ msgid "" "other words in the line are left alone." msgstr "" -#: ../../library/pdb.rst:718 +#: ../../library/pdb.rst:736 msgid "" "As an example, here are two useful aliases (especially when placed in the :" "file:`.pdbrc` file)::" msgstr "" -#: ../../library/pdb.rst:721 +#: ../../library/pdb.rst:739 msgid "" "# Print instance variables (usage \"pi classInst\")\n" "alias pi for k in %1.__dict__.keys(): print(f\"%1.{k} = {%1.__dict__[k]}\")\n" @@ -965,36 +987,36 @@ msgid "" "alias ps pi self" msgstr "" -#: ../../library/pdb.rst:728 +#: ../../library/pdb.rst:746 msgid "Delete the specified alias *name*." msgstr "" -#: ../../library/pdb.rst:732 +#: ../../library/pdb.rst:750 msgid "" "Execute the (one-line) *statement* in the context of the current stack " "frame. The exclamation point can be omitted unless the first word of the " "statement resembles a debugger command, e.g.:" msgstr "" -#: ../../library/pdb.rst:736 +#: ../../library/pdb.rst:754 msgid "" "(Pdb) ! n=42\n" "(Pdb)" msgstr "" -#: ../../library/pdb.rst:741 +#: ../../library/pdb.rst:759 msgid "" "To set a global variable, you can prefix the assignment command with a :" "keyword:`global` statement on the same line, e.g.:" msgstr "" -#: ../../library/pdb.rst:744 +#: ../../library/pdb.rst:762 msgid "" "(Pdb) global list_options; list_options = ['-l']\n" "(Pdb)" msgstr "" -#: ../../library/pdb.rst:752 +#: ../../library/pdb.rst:770 msgid "" "Restart the debugged Python program. If *args* is supplied, it is split " "with :mod:`shlex` and the result is used as the new :data:`sys.argv`. " @@ -1002,26 +1024,26 @@ msgid "" "`restart` is an alias for :pdbcmd:`run`." msgstr "" -#: ../../library/pdb.rst:757 +#: ../../library/pdb.rst:775 msgid "" ":pdbcmd:`run` and :pdbcmd:`restart` commands are disabled when the debugger " "is invoked in ``'inline'`` mode." msgstr "" -#: ../../library/pdb.rst:763 +#: ../../library/pdb.rst:781 msgid "" "Quit from the debugger. The program being executed is aborted. An end-of-" "file input is equivalent to :pdbcmd:`quit`." msgstr "" -#: ../../library/pdb.rst:766 +#: ../../library/pdb.rst:784 msgid "" "A confirmation prompt will be shown if the debugger is invoked in " "``'inline'`` mode. Either ``y``, ``Y``, ```` or ``EOF`` will confirm " "the quit." msgstr "" -#: ../../library/pdb.rst:770 +#: ../../library/pdb.rst:788 msgid "" "A confirmation prompt will be shown if the debugger is invoked in " "``'inline'`` mode. After the confirmation, the debugger will call :func:`sys." @@ -1029,21 +1051,21 @@ msgid "" "event." msgstr "" -#: ../../library/pdb.rst:778 +#: ../../library/pdb.rst:796 msgid "" "Enter a recursive debugger that steps through *code* (which is an arbitrary " "expression or statement to be executed in the current environment)." msgstr "" -#: ../../library/pdb.rst:784 +#: ../../library/pdb.rst:802 msgid "Print the return value for the last return of the current function." msgstr "" -#: ../../library/pdb.rst:788 +#: ../../library/pdb.rst:806 msgid "List or jump between chained exceptions." msgstr "" -#: ../../library/pdb.rst:790 +#: ../../library/pdb.rst:808 msgid "" "When using ``pdb.pm()`` or ``Pdb.post_mortem(...)`` with a chained " "exception instead of a traceback, it allows the user to move between the " @@ -1051,7 +1073,7 @@ msgid "" "``exceptions `` to switch to that exception." msgstr "" -#: ../../library/pdb.rst:798 +#: ../../library/pdb.rst:816 msgid "" "def out():\n" " try:\n" @@ -1071,11 +1093,11 @@ msgid "" " out()" msgstr "" -#: ../../library/pdb.rst:815 +#: ../../library/pdb.rst:833 msgid "calling ``pdb.pm()`` will allow to move between exceptions::" msgstr "" -#: ../../library/pdb.rst:817 +#: ../../library/pdb.rst:835 msgid "" "> example.py(5)out()\n" "-> raise ValueError(\"reraise middle() error\") from e\n" @@ -1094,11 +1116,11 @@ msgid "" "-> return inner(0)" msgstr "" -#: ../../library/pdb.rst:836 +#: ../../library/pdb.rst:854 msgid "Footnotes" msgstr "" -#: ../../library/pdb.rst:837 +#: ../../library/pdb.rst:855 msgid "" "Whether a frame is considered to originate in a certain module is determined " "by the ``__name__`` in the frame globals." @@ -1124,18 +1146,18 @@ msgstr "" msgid "cmd" msgstr "" -#: ../../library/pdb.rst:377 +#: ../../library/pdb.rst:395 msgid ".pdbrc" msgstr "" -#: ../../library/pdb.rst:377 +#: ../../library/pdb.rst:395 msgid "file" msgstr "" -#: ../../library/pdb.rst:377 +#: ../../library/pdb.rst:395 msgid "debugger" msgstr "" -#: ../../library/pdb.rst:377 +#: ../../library/pdb.rst:395 msgid "configuration" msgstr "" diff --git a/library/persistence.po b/library/persistence.po index 3f8f91324..257107af5 100644 --- a/library/persistence.po +++ b/library/persistence.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:11+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/pickle.po b/library/pickle.po index 8a3549f26..fc9b2882e 100644 --- a/library/pickle.po +++ b/library/pickle.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:11+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/pickletools.po b/library/pickletools.po index a21031d69..19da0118a 100644 --- a/library/pickletools.po +++ b/library/pickletools.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:11+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/pipes.po b/library/pipes.po index 18f13832b..455d491dd 100644 --- a/library/pipes.po +++ b/library/pipes.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-11-19 01:03+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/pkgutil.po b/library/pkgutil.po index ddaf07cf8..fd20559a3 100644 --- a/library/pkgutil.po +++ b/library/pkgutil.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:11+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -116,9 +117,10 @@ msgstr "" #: ../../library/pkgutil.rst:72 msgid "" -"If fullname contains a ``'.'``, the finders will be for the package " -"containing fullname, otherwise they will be all registered top level finders " -"(i.e. those on both :data:`sys.meta_path` and :data:`sys.path_hooks`)." +"If *fullname* contains a ``'.'``, the finders will be for the package " +"containing *fullname*, otherwise they will be all registered top level " +"finders (i.e. those on both :data:`sys.meta_path` and :data:`sys." +"path_hooks`)." msgstr "" #: ../../library/pkgutil.rst:76 diff --git a/library/platform.po b/library/platform.po index 6df583b73..41f9a50b8 100644 --- a/library/platform.po +++ b/library/platform.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:11+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/plistlib.po b/library/plistlib.po index 45276d3a8..94a8ae3c4 100644 --- a/library/plistlib.po +++ b/library/plistlib.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:11+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/poplib.po b/library/poplib.po index 3eada9ad6..ec04117c2 100644 --- a/library/poplib.po +++ b/library/poplib.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:11+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/posix.po b/library/posix.po index 152520382..130d38b04 100644 --- a/library/posix.po +++ b/library/posix.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:11+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/pprint.po b/library/pprint.po index e20dd3129..0fca6287b 100644 --- a/library/pprint.po +++ b/library/pprint.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:11+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/profile.po b/library/profile.po index 7f2b472ac..d267fb25e 100644 --- a/library/profile.po +++ b/library/profile.po @@ -1,19 +1,20 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2025, Python Software Foundation +# Copyright (C) 2001 Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Python 3.13\n" +"Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-02 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:11+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/pty.po b/library/pty.po index a6bdbf6c2..a9ce7ac99 100644 --- a/library/pty.po +++ b/library/pty.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:11+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/pwd.po b/library/pwd.po index 07819286d..6067f8dfb 100644 --- a/library/pwd.po +++ b/library/pwd.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:11+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/py_compile.po b/library/py_compile.po index 299c2afb9..176a21a32 100644 --- a/library/py_compile.po +++ b/library/py_compile.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:11+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/pyclbr.po b/library/pyclbr.po index 7e8bde19d..37915b061 100644 --- a/library/pyclbr.po +++ b/library/pyclbr.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:11+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/pydoc.po b/library/pydoc.po index a7046a4a1..ba2e1835a 100644 --- a/library/pydoc.po +++ b/library/pydoc.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:12+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/pyexpat.po b/library/pyexpat.po index c53516ca8..0f170a734 100644 --- a/library/pyexpat.po +++ b/library/pyexpat.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:12+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -29,12 +30,11 @@ msgstr "" #: ../../library/pyexpat.rst:21 msgid "" -"The :mod:`pyexpat` module is not secure against maliciously constructed " -"data. If you need to parse untrusted or unauthenticated data see :ref:`xml-" -"vulnerabilities`." +"If you need to parse untrusted or unauthenticated data, see :ref:`xml-" +"security`." msgstr "" -#: ../../library/pyexpat.rst:28 +#: ../../library/pyexpat.rst:27 msgid "" "The :mod:`xml.parsers.expat` module is a Python interface to the Expat non-" "validating XML parser. The module provides a single extension type, :class:" @@ -45,39 +45,39 @@ msgid "" "in the XML document." msgstr "" -#: ../../library/pyexpat.rst:38 +#: ../../library/pyexpat.rst:37 msgid "" "This module uses the :mod:`pyexpat` module to provide access to the Expat " "parser. Direct use of the :mod:`pyexpat` module is deprecated." msgstr "" -#: ../../library/pyexpat.rst:41 +#: ../../library/pyexpat.rst:40 msgid "This module provides one exception and one type object:" msgstr "" -#: ../../library/pyexpat.rst:46 +#: ../../library/pyexpat.rst:45 msgid "" "The exception raised when Expat reports an error. See section :ref:" "`expaterror-objects` for more information on interpreting Expat errors." msgstr "" -#: ../../library/pyexpat.rst:52 +#: ../../library/pyexpat.rst:51 msgid "Alias for :exc:`ExpatError`." msgstr "" -#: ../../library/pyexpat.rst:57 +#: ../../library/pyexpat.rst:56 msgid "The type of the return values from the :func:`ParserCreate` function." msgstr "" -#: ../../library/pyexpat.rst:59 +#: ../../library/pyexpat.rst:58 msgid "The :mod:`xml.parsers.expat` module contains two functions:" msgstr "" -#: ../../library/pyexpat.rst:64 +#: ../../library/pyexpat.rst:63 msgid "Returns an explanatory string for a given error number *errno*." msgstr "" -#: ../../library/pyexpat.rst:69 +#: ../../library/pyexpat.rst:68 msgid "" "Creates and returns a new :class:`xmlparser` object. *encoding*, if " "specified, must be a string naming the encoding used by the XML data. " @@ -87,7 +87,7 @@ msgid "" "implicit or explicit encoding of the document." msgstr "" -#: ../../library/pyexpat.rst:76 +#: ../../library/pyexpat.rst:75 msgid "" "Expat can optionally do XML namespace processing for you, enabled by " "providing a value for *namespace_separator*. The value must be a one-" @@ -102,13 +102,13 @@ msgid "" "concatenated without any separator." msgstr "" -#: ../../library/pyexpat.rst:88 +#: ../../library/pyexpat.rst:87 msgid "" "For example, if *namespace_separator* is set to a space character (``' '``) " "and the following document is parsed:" msgstr "" -#: ../../library/pyexpat.rst:91 +#: ../../library/pyexpat.rst:90 msgid "" "\n" "" msgstr "" -#: ../../library/pyexpat.rst:100 +#: ../../library/pyexpat.rst:99 msgid "" ":attr:`StartElementHandler` will receive the following strings for each " "element::" msgstr "" -#: ../../library/pyexpat.rst:103 +#: ../../library/pyexpat.rst:102 msgid "" "http://default-namespace.org/ root\n" "http://www.python.org/ns/ elem1\n" "elem2" msgstr "" -#: ../../library/pyexpat.rst:107 +#: ../../library/pyexpat.rst:106 msgid "" "Due to limitations in the ``Expat`` library used by :mod:`pyexpat`, the :" "class:`xmlparser` instance returned can only be used to parse a single XML " @@ -139,23 +139,23 @@ msgid "" "instances." msgstr "" -#: ../../library/pyexpat.rst:115 +#: ../../library/pyexpat.rst:114 msgid "`The Expat XML Parser `_" msgstr "" -#: ../../library/pyexpat.rst:116 +#: ../../library/pyexpat.rst:115 msgid "Home page of the Expat project." msgstr "" -#: ../../library/pyexpat.rst:122 +#: ../../library/pyexpat.rst:121 msgid "XMLParser Objects" msgstr "" -#: ../../library/pyexpat.rst:124 +#: ../../library/pyexpat.rst:123 msgid ":class:`xmlparser` objects have the following methods:" msgstr "" -#: ../../library/pyexpat.rst:129 +#: ../../library/pyexpat.rst:128 msgid "" "Parses the contents of the string *data*, calling the appropriate handler " "functions to process the parsed data. *isfinal* must be true on the final " @@ -164,14 +164,14 @@ msgid "" "time." msgstr "" -#: ../../library/pyexpat.rst:138 +#: ../../library/pyexpat.rst:137 msgid "" "Parse XML data reading from the object *file*. *file* only needs to provide " "the ``read(nbytes)`` method, returning the empty string when there's no more " "data." msgstr "" -#: ../../library/pyexpat.rst:145 +#: ../../library/pyexpat.rst:144 msgid "" "Sets the base to be used for resolving relative URIs in system identifiers " "in declarations. Resolving relative identifiers is left to the application: " @@ -180,20 +180,20 @@ msgid "" "`UnparsedEntityDeclHandler` functions." msgstr "" -#: ../../library/pyexpat.rst:154 +#: ../../library/pyexpat.rst:153 msgid "" "Returns a string containing the base set by a previous call to :meth:" "`SetBase`, or ``None`` if :meth:`SetBase` hasn't been called." msgstr "" -#: ../../library/pyexpat.rst:160 +#: ../../library/pyexpat.rst:159 msgid "" "Returns the input data that generated the current event as a string. The " "data is in the encoding of the entity which contains the text. When called " "while an event handler is not active, the return value is ``None``." msgstr "" -#: ../../library/pyexpat.rst:167 +#: ../../library/pyexpat.rst:166 msgid "" "Create a \"child\" parser which can be used to parse an external parsed " "entity referred to by content parsed by the parent parser. The *context* " @@ -203,7 +203,7 @@ msgid "" "`specified_attributes` set to the values of this parser." msgstr "" -#: ../../library/pyexpat.rst:176 +#: ../../library/pyexpat.rst:175 msgid "" "Control parsing of parameter entities (including the external DTD subset). " "Possible *flag* values are :const:`XML_PARAM_ENTITY_PARSING_NEVER`, :const:" @@ -212,7 +212,7 @@ msgid "" "successful." msgstr "" -#: ../../library/pyexpat.rst:184 +#: ../../library/pyexpat.rst:183 msgid "" "Calling this with a true value for *flag* (the default) will cause Expat to " "call the :attr:`ExternalEntityRefHandler` with :const:`None` for all " @@ -222,13 +222,13 @@ msgid "" "`EndDoctypeDeclHandler` will not be called." msgstr "" -#: ../../library/pyexpat.rst:191 +#: ../../library/pyexpat.rst:190 msgid "" "Passing a false value for *flag* will cancel a previous call that passed a " "true value, but otherwise has no effect." msgstr "" -#: ../../library/pyexpat.rst:194 +#: ../../library/pyexpat.rst:193 msgid "" "This method can only be called before the :meth:`Parse` or :meth:`ParseFile` " "methods are called; calling it after either of those have been called " @@ -236,14 +236,14 @@ msgid "" "``errors.codes[errors.XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING]``." msgstr "" -#: ../../library/pyexpat.rst:203 +#: ../../library/pyexpat.rst:202 msgid "" "Calling ``SetReparseDeferralEnabled(False)`` has security implications, as " "detailed below; please make sure to understand these consequences prior to " "using the ``SetReparseDeferralEnabled`` method." msgstr "" -#: ../../library/pyexpat.rst:207 +#: ../../library/pyexpat.rst:206 msgid "" "Expat 2.6.0 introduced a security mechanism called \"reparse deferral\" " "where instead of causing denial of service through quadratic runtime from " @@ -258,7 +258,7 @@ msgid "" "``SetReparseDeferralEnabled(True)`` allows re-enabling reparse deferral." msgstr "" -#: ../../library/pyexpat.rst:220 +#: ../../library/pyexpat.rst:219 msgid "" "Note that :meth:`SetReparseDeferralEnabled` has been backported to some " "prior releases of CPython as a security fix. Check for availability of :" @@ -266,24 +266,24 @@ msgid "" "running across a variety of Python versions." msgstr "" -#: ../../library/pyexpat.rst:229 +#: ../../library/pyexpat.rst:228 msgid "" "Returns whether reparse deferral is currently enabled for the given Expat " "parser instance." msgstr "" -#: ../../library/pyexpat.rst:235 +#: ../../library/pyexpat.rst:234 msgid ":class:`xmlparser` objects have the following attributes:" msgstr "" -#: ../../library/pyexpat.rst:240 +#: ../../library/pyexpat.rst:239 msgid "" "The size of the buffer used when :attr:`buffer_text` is true. A new buffer " "size can be set by assigning a new integer value to this attribute. When the " "size is changed, the buffer will be flushed." msgstr "" -#: ../../library/pyexpat.rst:248 +#: ../../library/pyexpat.rst:247 msgid "" "Setting this to true causes the :class:`xmlparser` object to buffer textual " "content returned by Expat to avoid multiple calls to the :meth:" @@ -294,14 +294,14 @@ msgid "" "newlines may be chunked too." msgstr "" -#: ../../library/pyexpat.rst:259 +#: ../../library/pyexpat.rst:258 msgid "" "If :attr:`buffer_text` is enabled, the number of bytes stored in the buffer. " "These bytes represent UTF-8 encoded text. This attribute has no meaningful " "interpretation when :attr:`buffer_text` is false." msgstr "" -#: ../../library/pyexpat.rst:266 +#: ../../library/pyexpat.rst:265 msgid "" "Setting this attribute to a non-zero integer causes the attributes to be " "reported as a list rather than a dictionary. The attributes are presented " @@ -311,7 +311,7 @@ msgid "" "is false; it may be changed at any time." msgstr "" -#: ../../library/pyexpat.rst:276 +#: ../../library/pyexpat.rst:275 msgid "" "If set to a non-zero integer, the parser will report only those attributes " "which were specified in the document instance and not those which were " @@ -322,7 +322,7 @@ msgid "" "time." msgstr "" -#: ../../library/pyexpat.rst:284 +#: ../../library/pyexpat.rst:283 msgid "" "The following attributes contain values relating to the most recent error " "encountered by an :class:`xmlparser` object, and will only have correct " @@ -330,26 +330,26 @@ msgid "" "`xml.parsers.expat.ExpatError` exception." msgstr "" -#: ../../library/pyexpat.rst:292 +#: ../../library/pyexpat.rst:291 msgid "Byte index at which an error occurred." msgstr "" -#: ../../library/pyexpat.rst:297 +#: ../../library/pyexpat.rst:296 msgid "" "Numeric code specifying the problem. This value can be passed to the :func:" "`ErrorString` function, or compared to one of the constants defined in the " "``errors`` object." msgstr "" -#: ../../library/pyexpat.rst:304 +#: ../../library/pyexpat.rst:303 msgid "Column number at which an error occurred." msgstr "" -#: ../../library/pyexpat.rst:309 +#: ../../library/pyexpat.rst:308 msgid "Line number at which an error occurred." msgstr "" -#: ../../library/pyexpat.rst:311 +#: ../../library/pyexpat.rst:310 msgid "" "The following attributes contain values relating to the current parse " "location in an :class:`xmlparser` object. During a callback reporting a " @@ -359,19 +359,19 @@ msgid "" "whether there was an associated callback)." msgstr "" -#: ../../library/pyexpat.rst:321 +#: ../../library/pyexpat.rst:320 msgid "Current byte index in the parser input." msgstr "" -#: ../../library/pyexpat.rst:326 +#: ../../library/pyexpat.rst:325 msgid "Current column number in the parser input." msgstr "" -#: ../../library/pyexpat.rst:331 +#: ../../library/pyexpat.rst:330 msgid "Current line number in the parser input." msgstr "" -#: ../../library/pyexpat.rst:333 +#: ../../library/pyexpat.rst:332 msgid "" "Here is the list of handlers that can be set. To set a handler on an :class:" "`xmlparser` object *o*, use ``o.handlername = func``. *handlername* must be " @@ -380,7 +380,7 @@ msgid "" "unless otherwise stated." msgstr "" -#: ../../library/pyexpat.rst:342 +#: ../../library/pyexpat.rst:341 msgid "" "Called when the XML declaration is parsed. The XML declaration is the " "(optional) declaration of the applicable version of the XML recommendation, " @@ -391,7 +391,7 @@ msgid "" "only available with Expat version 1.95.0 or newer." msgstr "" -#: ../../library/pyexpat.rst:353 +#: ../../library/pyexpat.rst:352 msgid "" "Called when Expat begins parsing the document type declaration (``'``." msgstr "" -#: ../../library/pyexpat.rst:470 +#: ../../library/pyexpat.rst:469 msgid "" "Called at the start of a CDATA section. This and :attr:" "`EndCdataSectionHandler` are needed to be able to identify the syntactical " "start and end for CDATA sections." msgstr "" -#: ../../library/pyexpat.rst:477 +#: ../../library/pyexpat.rst:476 msgid "Called at the end of a CDATA section." msgstr "" -#: ../../library/pyexpat.rst:482 +#: ../../library/pyexpat.rst:481 msgid "" "Called for any characters in the XML document for which no applicable " "handler has been specified. This means characters that are part of a " @@ -525,14 +525,14 @@ msgid "" "supplied." msgstr "" -#: ../../library/pyexpat.rst:489 +#: ../../library/pyexpat.rst:488 msgid "" "This is the same as the :func:`DefaultHandler`, but doesn't inhibit " "expansion of internal entities. The entity reference will not be passed to " "the default handler." msgstr "" -#: ../../library/pyexpat.rst:496 +#: ../../library/pyexpat.rst:495 msgid "" "Called if the XML document hasn't been declared as being a standalone " "document. This happens when there is an external subset or a reference to a " @@ -542,7 +542,7 @@ msgid "" "set, no exception is raised by the parser for this condition." msgstr "" -#: ../../library/pyexpat.rst:506 +#: ../../library/pyexpat.rst:505 msgid "" "Called for references to external entities. *base* is the current base, as " "set by a previous call to :meth:`SetBase`. The public and system " @@ -551,7 +551,7 @@ msgid "" "is opaque and should only be used as described below." msgstr "" -#: ../../library/pyexpat.rst:512 +#: ../../library/pyexpat.rst:511 msgid "" "For external entities to be parsed, this handler must be implemented. It is " "responsible for creating the sub-parser using " @@ -561,28 +561,28 @@ msgid "" "`XML_ERROR_EXTERNAL_ENTITY_HANDLING` error, otherwise parsing will continue." msgstr "" -#: ../../library/pyexpat.rst:520 +#: ../../library/pyexpat.rst:519 msgid "" "If this handler is not provided, external entities are reported by the :attr:" "`DefaultHandler` callback, if provided." msgstr "" -#: ../../library/pyexpat.rst:527 +#: ../../library/pyexpat.rst:526 msgid "ExpatError Exceptions" msgstr "" -#: ../../library/pyexpat.rst:532 +#: ../../library/pyexpat.rst:531 msgid ":exc:`ExpatError` exceptions have a number of interesting attributes:" msgstr "" -#: ../../library/pyexpat.rst:537 +#: ../../library/pyexpat.rst:536 msgid "" "Expat's internal error number for the specific error. The :data:`errors." "messages ` dictionary maps these error " "numbers to Expat's error messages. For example::" msgstr "" -#: ../../library/pyexpat.rst:541 +#: ../../library/pyexpat.rst:540 msgid "" "from xml.parsers.expat import ParserCreate, ExpatError, errors\n" "\n" @@ -593,36 +593,36 @@ msgid "" " print(\"Error:\", errors.messages[err.code])" msgstr "" -#: ../../library/pyexpat.rst:549 +#: ../../library/pyexpat.rst:548 msgid "" "The :mod:`~xml.parsers.expat.errors` module also provides error message " "constants and a dictionary :data:`~xml.parsers.expat.errors.codes` mapping " "these messages back to the error codes, see below." msgstr "" -#: ../../library/pyexpat.rst:556 +#: ../../library/pyexpat.rst:555 msgid "" "Line number on which the error was detected. The first line is numbered " "``1``." msgstr "" -#: ../../library/pyexpat.rst:561 +#: ../../library/pyexpat.rst:560 msgid "" "Character offset into the line where the error occurred. The first column " "is numbered ``0``." msgstr "" -#: ../../library/pyexpat.rst:568 +#: ../../library/pyexpat.rst:567 msgid "Example" msgstr "" -#: ../../library/pyexpat.rst:570 +#: ../../library/pyexpat.rst:569 msgid "" "The following program defines three handlers that just print out their " "arguments. ::" msgstr "" -#: ../../library/pyexpat.rst:573 +#: ../../library/pyexpat.rst:572 msgid "" "import xml.parsers.expat\n" "\n" @@ -646,11 +646,11 @@ msgid "" "\"\"\", 1)" msgstr "" -#: ../../library/pyexpat.rst:594 +#: ../../library/pyexpat.rst:593 msgid "The output from this program is::" msgstr "" -#: ../../library/pyexpat.rst:596 +#: ../../library/pyexpat.rst:595 msgid "" "Start element: parent {'id': 'top'}\n" "Start element: child1 {'name': 'paul'}\n" @@ -664,76 +664,76 @@ msgid "" "End element: parent" msgstr "" -#: ../../library/pyexpat.rst:611 +#: ../../library/pyexpat.rst:610 msgid "Content Model Descriptions" msgstr "" -#: ../../library/pyexpat.rst:617 +#: ../../library/pyexpat.rst:616 msgid "" "Content models are described using nested tuples. Each tuple contains four " "values: the type, the quantifier, the name, and a tuple of children. " "Children are simply additional content model descriptions." msgstr "" -#: ../../library/pyexpat.rst:621 +#: ../../library/pyexpat.rst:620 msgid "" "The values of the first two fields are constants defined in the :mod:`xml." "parsers.expat.model` module. These constants can be collected in two " "groups: the model type group and the quantifier group." msgstr "" -#: ../../library/pyexpat.rst:625 +#: ../../library/pyexpat.rst:624 msgid "The constants in the model type group are:" msgstr "" -#: ../../library/pyexpat.rst:631 +#: ../../library/pyexpat.rst:630 msgid "" "The element named by the model name was declared to have a content model of " "``ANY``." msgstr "" -#: ../../library/pyexpat.rst:638 +#: ../../library/pyexpat.rst:637 msgid "" "The named element allows a choice from a number of options; this is used for " "content models such as ``(A | B | C)``." msgstr "" -#: ../../library/pyexpat.rst:645 +#: ../../library/pyexpat.rst:644 msgid "Elements which are declared to be ``EMPTY`` have this model type." msgstr "" -#: ../../library/pyexpat.rst:659 +#: ../../library/pyexpat.rst:658 msgid "" "Models which represent a series of models which follow one after the other " "are indicated with this model type. This is used for models such as ``(A, " "B, C)``." msgstr "" -#: ../../library/pyexpat.rst:662 +#: ../../library/pyexpat.rst:661 msgid "The constants in the quantifier group are:" msgstr "" -#: ../../library/pyexpat.rst:668 +#: ../../library/pyexpat.rst:667 msgid "No modifier is given, so it can appear exactly once, as for ``A``." msgstr "" -#: ../../library/pyexpat.rst:674 +#: ../../library/pyexpat.rst:673 msgid "The model is optional: it can appear once or not at all, as for ``A?``." msgstr "" -#: ../../library/pyexpat.rst:680 +#: ../../library/pyexpat.rst:679 msgid "The model must occur one or more times (like ``A+``)." msgstr "" -#: ../../library/pyexpat.rst:686 +#: ../../library/pyexpat.rst:685 msgid "The model must occur zero or more times, as for ``A*``." msgstr "" -#: ../../library/pyexpat.rst:692 +#: ../../library/pyexpat.rst:691 msgid "Expat error constants" msgstr "" -#: ../../library/pyexpat.rst:696 +#: ../../library/pyexpat.rst:695 msgid "" "The following constants are provided in the :mod:`xml.parsers.expat.errors` " "module. These constants are useful in interpreting some of the attributes " @@ -744,210 +744,210 @@ msgid "" "XML_ERROR_{CONSTANT_NAME}]`." msgstr "" -#: ../../library/pyexpat.rst:704 +#: ../../library/pyexpat.rst:703 msgid "The ``errors`` module has the following attributes:" msgstr "" -#: ../../library/pyexpat.rst:708 +#: ../../library/pyexpat.rst:707 msgid "A dictionary mapping string descriptions to their error codes." msgstr "" -#: ../../library/pyexpat.rst:715 +#: ../../library/pyexpat.rst:714 msgid "A dictionary mapping numeric error codes to their string descriptions." msgstr "" -#: ../../library/pyexpat.rst:725 +#: ../../library/pyexpat.rst:724 msgid "" "An entity reference in an attribute value referred to an external entity " "instead of an internal entity." msgstr "" -#: ../../library/pyexpat.rst:731 +#: ../../library/pyexpat.rst:730 msgid "" "A character reference referred to a character which is illegal in XML (for " "example, character ``0``, or '``�``')." msgstr "" -#: ../../library/pyexpat.rst:737 +#: ../../library/pyexpat.rst:736 msgid "" "An entity reference referred to an entity which was declared with a " "notation, so cannot be parsed." msgstr "" -#: ../../library/pyexpat.rst:743 +#: ../../library/pyexpat.rst:742 msgid "An attribute was used more than once in a start tag." msgstr "" -#: ../../library/pyexpat.rst:751 +#: ../../library/pyexpat.rst:750 msgid "" "Raised when an input byte could not properly be assigned to a character; for " "example, a NUL byte (value ``0``) in a UTF-8 input stream." msgstr "" -#: ../../library/pyexpat.rst:757 +#: ../../library/pyexpat.rst:756 msgid "Something other than whitespace occurred after the document element." msgstr "" -#: ../../library/pyexpat.rst:762 +#: ../../library/pyexpat.rst:761 msgid "" "An XML declaration was found somewhere other than the start of the input " "data." msgstr "" -#: ../../library/pyexpat.rst:767 +#: ../../library/pyexpat.rst:766 msgid "" "The document contains no elements (XML requires all documents to contain " "exactly one top-level element).." msgstr "" -#: ../../library/pyexpat.rst:773 +#: ../../library/pyexpat.rst:772 msgid "Expat was not able to allocate memory internally." msgstr "" -#: ../../library/pyexpat.rst:778 +#: ../../library/pyexpat.rst:777 msgid "A parameter entity reference was found where it was not allowed." msgstr "" -#: ../../library/pyexpat.rst:783 +#: ../../library/pyexpat.rst:782 msgid "An incomplete character was found in the input." msgstr "" -#: ../../library/pyexpat.rst:788 +#: ../../library/pyexpat.rst:787 msgid "" "An entity reference contained another reference to the same entity; possibly " "via a different name, and possibly indirectly." msgstr "" -#: ../../library/pyexpat.rst:794 +#: ../../library/pyexpat.rst:793 msgid "Some unspecified syntax error was encountered." msgstr "" -#: ../../library/pyexpat.rst:799 +#: ../../library/pyexpat.rst:798 msgid "An end tag did not match the innermost open start tag." msgstr "" -#: ../../library/pyexpat.rst:804 +#: ../../library/pyexpat.rst:803 msgid "" "Some token (such as a start tag) was not closed before the end of the stream " "or the next token was encountered." msgstr "" -#: ../../library/pyexpat.rst:810 +#: ../../library/pyexpat.rst:809 msgid "A reference was made to an entity which was not defined." msgstr "" -#: ../../library/pyexpat.rst:815 +#: ../../library/pyexpat.rst:814 msgid "The document encoding is not supported by Expat." msgstr "" -#: ../../library/pyexpat.rst:820 +#: ../../library/pyexpat.rst:819 msgid "A CDATA marked section was not closed." msgstr "" -#: ../../library/pyexpat.rst:828 +#: ../../library/pyexpat.rst:827 msgid "" "The parser determined that the document was not \"standalone\" though it " "declared itself to be in the XML declaration, and the :attr:" "`NotStandaloneHandler` was set and returned ``0``." msgstr "" -#: ../../library/pyexpat.rst:841 +#: ../../library/pyexpat.rst:840 msgid "" "An operation was requested that requires DTD support to be compiled in, but " "Expat was configured without DTD support. This should never be reported by " "a standard build of the :mod:`xml.parsers.expat` module." msgstr "" -#: ../../library/pyexpat.rst:848 +#: ../../library/pyexpat.rst:847 msgid "" "A behavioral change was requested after parsing started that can only be " "changed before parsing has started. This is (currently) only raised by :" "meth:`UseForeignDTD`." msgstr "" -#: ../../library/pyexpat.rst:855 +#: ../../library/pyexpat.rst:854 msgid "An undeclared prefix was found when namespace processing was enabled." msgstr "" -#: ../../library/pyexpat.rst:860 +#: ../../library/pyexpat.rst:859 msgid "" "The document attempted to remove the namespace declaration associated with a " "prefix." msgstr "" -#: ../../library/pyexpat.rst:866 +#: ../../library/pyexpat.rst:865 msgid "A parameter entity contained incomplete markup." msgstr "" -#: ../../library/pyexpat.rst:871 +#: ../../library/pyexpat.rst:870 msgid "The document contained no document element at all." msgstr "" -#: ../../library/pyexpat.rst:876 +#: ../../library/pyexpat.rst:875 msgid "There was an error parsing a text declaration in an external entity." msgstr "" -#: ../../library/pyexpat.rst:881 +#: ../../library/pyexpat.rst:880 msgid "Characters were found in the public id that are not allowed." msgstr "" -#: ../../library/pyexpat.rst:886 +#: ../../library/pyexpat.rst:885 msgid "" "The requested operation was made on a suspended parser, but isn't allowed. " "This includes attempts to provide additional input or to stop the parser." msgstr "" -#: ../../library/pyexpat.rst:892 +#: ../../library/pyexpat.rst:891 msgid "" "An attempt to resume the parser was made when the parser had not been " "suspended." msgstr "" -#: ../../library/pyexpat.rst:897 ../../library/pyexpat.rst:930 -#: ../../library/pyexpat.rst:935 +#: ../../library/pyexpat.rst:896 ../../library/pyexpat.rst:929 +#: ../../library/pyexpat.rst:934 msgid "This should not be reported to Python applications." msgstr "" -#: ../../library/pyexpat.rst:902 +#: ../../library/pyexpat.rst:901 msgid "" "The requested operation was made on a parser which was finished parsing " "input, but isn't allowed. This includes attempts to provide additional " "input or to stop the parser." msgstr "" -#: ../../library/pyexpat.rst:912 +#: ../../library/pyexpat.rst:911 msgid "" "An attempt was made to undeclare reserved namespace prefix ``xml`` or to " "bind it to another namespace URI." msgstr "" -#: ../../library/pyexpat.rst:919 +#: ../../library/pyexpat.rst:918 msgid "" "An attempt was made to declare or undeclare reserved namespace prefix " "``xmlns``." msgstr "" -#: ../../library/pyexpat.rst:924 +#: ../../library/pyexpat.rst:923 msgid "" "An attempt was made to bind the URI of one the reserved namespace prefixes " "``xml`` and ``xmlns`` to another namespace prefix." msgstr "" -#: ../../library/pyexpat.rst:940 +#: ../../library/pyexpat.rst:939 msgid "" "The limit on input amplification factor (from DTD and entities) has been " "breached." msgstr "" -#: ../../library/pyexpat.rst:946 +#: ../../library/pyexpat.rst:945 msgid "The parser was tried to be stopped or suspended before it started." msgstr "" -#: ../../library/pyexpat.rst:952 +#: ../../library/pyexpat.rst:951 msgid "Footnotes" msgstr "" -#: ../../library/pyexpat.rst:953 +#: ../../library/pyexpat.rst:952 msgid "" "The encoding string included in XML output should conform to the appropriate " "standards. For example, \"UTF-8\" is valid, but \"UTF8\" is not. See https://" @@ -955,14 +955,14 @@ msgid "" "org/assignments/character-sets/character-sets.xhtml." msgstr "" -#: ../../library/pyexpat.rst:26 +#: ../../library/pyexpat.rst:25 msgid "Expat" msgstr "" -#: ../../library/pyexpat.rst:36 +#: ../../library/pyexpat.rst:35 msgid "module" msgstr "" -#: ../../library/pyexpat.rst:36 +#: ../../library/pyexpat.rst:35 msgid "pyexpat" msgstr "" diff --git a/library/python.po b/library/python.po index 7041893c3..1fcbdf5a8 100644 --- a/library/python.po +++ b/library/python.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-06-27 14:20+0000\n" "PO-Revision-Date: 2021-06-28 01:12+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" @@ -28,3 +28,9 @@ msgid "" "related to the Python interpreter and its interaction with its environment. " "Here's an overview:" msgstr "" + +#: ../../library/python.rst:33 +msgid "" +"See the :mod:`concurrent.interpreters` module, which similarly exposes core " +"runtime functionality." +msgstr "" diff --git a/library/queue.po b/library/queue.po index 0439fb72a..bcdd9aa78 100644 --- a/library/queue.po +++ b/library/queue.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:12+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/quopri.po b/library/quopri.po index e34cee6bb..338a28234 100644 --- a/library/quopri.po +++ b/library/quopri.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:12+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/random.po b/library/random.po index f2ea23d2c..82c240efc 100644 --- a/library/random.po +++ b/library/random.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:12+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -591,7 +592,13 @@ msgid "" "getrandbits` behaviour of :class:`!Random` instances." msgstr "" -#: ../../library/random.rst:453 +#: ../../library/random.rst:452 +msgid "" +"Override this method in subclasses to customise the :meth:`~random." +"randbytes` behaviour of :class:`!Random` instances." +msgstr "" + +#: ../../library/random.rst:458 msgid "" "Class that uses the :func:`os.urandom` function for generating random " "numbers from sources provided by the operating system. Not available on all " @@ -601,11 +608,11 @@ msgid "" "`NotImplementedError` if called." msgstr "" -#: ../../library/random.rst:462 +#: ../../library/random.rst:467 msgid "Notes on Reproducibility" msgstr "" -#: ../../library/random.rst:464 +#: ../../library/random.rst:469 msgid "" "Sometimes it is useful to be able to reproduce the sequences given by a " "pseudo-random number generator. By reusing a seed value, the same sequence " @@ -613,33 +620,33 @@ msgid "" "running." msgstr "" -#: ../../library/random.rst:468 +#: ../../library/random.rst:473 msgid "" "Most of the random module's algorithms and seeding functions are subject to " "change across Python versions, but two aspects are guaranteed not to change:" msgstr "" -#: ../../library/random.rst:471 +#: ../../library/random.rst:476 msgid "" "If a new seeding method is added, then a backward compatible seeder will be " "offered." msgstr "" -#: ../../library/random.rst:474 +#: ../../library/random.rst:479 msgid "" "The generator's :meth:`~Random.random` method will continue to produce the " "same sequence when the compatible seeder is given the same seed." msgstr "" -#: ../../library/random.rst:480 +#: ../../library/random.rst:485 msgid "Examples" msgstr "" -#: ../../library/random.rst:482 +#: ../../library/random.rst:487 msgid "Basic examples::" msgstr "" -#: ../../library/random.rst:484 +#: ../../library/random.rst:489 msgid "" ">>> random() # Random float: 0.0 <= x < 1.0\n" "0.37444887175646646\n" @@ -671,11 +678,11 @@ msgid "" "[40, 10, 50, 30]" msgstr "" -#: ../../library/random.rst:510 +#: ../../library/random.rst:515 msgid "Simulations::" msgstr "" -#: ../../library/random.rst:512 +#: ../../library/random.rst:517 msgid "" ">>> # Six roulette wheel spins (weighted sampling with replacement)\n" ">>> choices(['red', 'black', 'green'], [18, 18, 2], k=6)\n" @@ -701,14 +708,14 @@ msgid "" "0.7958" msgstr "" -#: ../../library/random.rst:535 +#: ../../library/random.rst:540 msgid "" "Example of `statistical bootstrapping `_ using resampling with replacement to estimate " "a confidence interval for the mean of a sample::" msgstr "" -#: ../../library/random.rst:539 +#: ../../library/random.rst:544 msgid "" "# https://www.thoughtco.com/example-of-bootstrapping-3126155\n" "from statistics import fmean as mean\n" @@ -720,7 +727,7 @@ msgid "" " f'interval from {means[5]:.1f} to {means[94]:.1f}')" msgstr "" -#: ../../library/random.rst:548 +#: ../../library/random.rst:553 msgid "" "Example of a `resampling permutation test `_ to determine the statistical " @@ -728,7 +735,7 @@ msgid "" "observed difference between the effects of a drug versus a placebo::" msgstr "" -#: ../../library/random.rst:554 +#: ../../library/random.rst:559 msgid "" "# Example from \"Statistics is Easy\" by Dennis Shasha and Manda Wilson\n" "from statistics import fmean as mean\n" @@ -756,12 +763,12 @@ msgid "" "placebo.')" msgstr "" -#: ../../library/random.rst:575 +#: ../../library/random.rst:580 msgid "" "Simulation of arrival times and service deliveries for a multiserver queue::" msgstr "" -#: ../../library/random.rst:577 +#: ../../library/random.rst:582 msgid "" "from heapq import heapify, heapreplace\n" "from random import expovariate, gauss\n" @@ -790,7 +797,7 @@ msgid "" "print('Quartiles:', [round(q, 1) for q in quantiles(waits)])" msgstr "" -#: ../../library/random.rst:604 +#: ../../library/random.rst:609 msgid "" "`Statistics for Hackers `_ a " "video tutorial by `Jake Vanderplas `_ a simulation of a marketplace by `Peter Norvig `_ a tutorial by `Peter Norvig " @@ -815,17 +822,17 @@ msgid "" "how to write simulations, and how to perform data analysis using Python." msgstr "" -#: ../../library/random.rst:625 +#: ../../library/random.rst:630 msgid "Recipes" msgstr "" -#: ../../library/random.rst:627 +#: ../../library/random.rst:632 msgid "" "These recipes show how to efficiently make random selections from the " "combinatoric iterators in the :mod:`itertools` module:" msgstr "" -#: ../../library/random.rst:630 +#: ../../library/random.rst:635 msgid "" "def random_product(*args, repeat=1):\n" " \"Random selection from itertools.product(*args, **kwds)\"\n" @@ -856,7 +863,7 @@ msgid "" " return tuple(pool[i] for i in indices)" msgstr "" -#: ../../library/random.rst:659 +#: ../../library/random.rst:664 msgid "" "The default :func:`.random` returns multiples of 2⁻⁵³ in the range *0.0 ≤ x " "< 1.0*. All such numbers are evenly spaced and are exactly representable as " @@ -865,7 +872,7 @@ msgid "" "integer multiple of 2⁻⁵³." msgstr "" -#: ../../library/random.rst:665 +#: ../../library/random.rst:670 msgid "" "The following recipe takes a different approach. All floats in the interval " "are possible selections. The mantissa comes from a uniform distribution of " @@ -874,7 +881,7 @@ msgid "" "often as the next larger exponent." msgstr "" -#: ../../library/random.rst:673 +#: ../../library/random.rst:678 msgid "" "from random import Random\n" "from math import ldexp\n" @@ -891,13 +898,13 @@ msgid "" " return ldexp(mantissa, exponent)" msgstr "" -#: ../../library/random.rst:687 +#: ../../library/random.rst:692 msgid "" "All :ref:`real valued distributions ` in the " "class will use the new method::" msgstr "" -#: ../../library/random.rst:690 +#: ../../library/random.rst:695 msgid "" ">>> fr = FullRandom()\n" ">>> fr.random()\n" @@ -906,7 +913,7 @@ msgid "" "8.87925541791544" msgstr "" -#: ../../library/random.rst:696 +#: ../../library/random.rst:701 msgid "" "The recipe is conceptually equivalent to an algorithm that chooses from all " "the multiples of 2⁻¹⁰⁷⁴ in the range *0.0 ≤ x < 1.0*. All such numbers are " @@ -915,7 +922,7 @@ msgid "" "and is equal to ``math.ulp(0.0)``.)" msgstr "" -#: ../../library/random.rst:705 +#: ../../library/random.rst:710 msgid "" "`Generating Pseudo-random Floating-Point Values `_ a paper by Allen B. Downey describing " @@ -923,67 +930,67 @@ msgid "" "random`." msgstr "" -#: ../../library/random.rst:713 +#: ../../library/random.rst:718 msgid "Command-line usage" msgstr "" -#: ../../library/random.rst:717 +#: ../../library/random.rst:722 msgid "The :mod:`!random` module can be executed from the command line." msgstr "" -#: ../../library/random.rst:719 +#: ../../library/random.rst:724 msgid "" "python -m random [-h] [-c CHOICE [CHOICE ...] | -i N | -f N] [input ...]" msgstr "" -#: ../../library/random.rst:723 +#: ../../library/random.rst:728 msgid "The following options are accepted:" msgstr "" -#: ../../library/random.rst:729 +#: ../../library/random.rst:734 msgid "Show the help message and exit." msgstr "" -#: ../../library/random.rst:734 +#: ../../library/random.rst:739 msgid "Print a random choice, using :meth:`choice`." msgstr "" -#: ../../library/random.rst:739 +#: ../../library/random.rst:744 msgid "" "Print a random integer between 1 and N inclusive, using :meth:`randint`." msgstr "" -#: ../../library/random.rst:744 +#: ../../library/random.rst:749 msgid "" "Print a random floating-point number between 0 and N inclusive, using :meth:" "`uniform`." msgstr "" -#: ../../library/random.rst:747 +#: ../../library/random.rst:752 msgid "If no options are given, the output depends on the input:" msgstr "" -#: ../../library/random.rst:749 +#: ../../library/random.rst:754 msgid "String or multiple: same as :option:`--choice`." msgstr "" -#: ../../library/random.rst:750 +#: ../../library/random.rst:755 msgid "Integer: same as :option:`--integer`." msgstr "" -#: ../../library/random.rst:751 +#: ../../library/random.rst:756 msgid "Float: same as :option:`--float`." msgstr "" -#: ../../library/random.rst:756 +#: ../../library/random.rst:761 msgid "Command-line example" msgstr "" -#: ../../library/random.rst:758 +#: ../../library/random.rst:763 msgid "Here are some examples of the :mod:`!random` command-line interface:" msgstr "" -#: ../../library/random.rst:760 +#: ../../library/random.rst:765 msgid "" "$ # Choose one at random\n" "$ python -m random egg bacon sausage spam \"Lobster Thermidor aux crevettes " diff --git a/library/re.po b/library/re.po index bd29d9b8f..4410b1e37 100644 --- a/library/re.po +++ b/library/re.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:12+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -151,7 +152,7 @@ msgstr "" msgid "The special characters are:" msgstr "" -#: ../../library/re.rst:101 ../../library/re.rst:1661 +#: ../../library/re.rst:101 ../../library/re.rst:1663 msgid "``.``" msgstr "" @@ -1221,8 +1222,8 @@ msgstr "" #: ../../library/re.rst:899 ../../library/re.rst:931 ../../library/re.rst:949 #: ../../library/re.rst:960 ../../library/re.rst:1006 ../../library/re.rst:1040 -#: ../../library/re.rst:1055 ../../library/re.rst:1114 -#: ../../library/re.rst:1150 +#: ../../library/re.rst:1055 ../../library/re.rst:1117 +#: ../../library/re.rst:1152 msgid "" "The expression's behaviour can be modified by specifying a *flags* value. " "Values can be any of the `flags`_ variables, combined using bitwise OR (the " @@ -1340,8 +1341,8 @@ msgstr "" #: ../../library/re.rst:994 msgid "" -"Empty matches for the pattern split the string only when not adjacent to a " -"previous empty match." +"Adjacent empty matches are not possible, but an empty match can occur " +"immediately after a non-empty match." msgstr "" #: ../../library/re.rst:997 @@ -1355,7 +1356,7 @@ msgid "" "'']" msgstr "" -#: ../../library/re.rst:1010 ../../library/re.rst:1118 +#: ../../library/re.rst:1010 ../../library/re.rst:1121 msgid "Added the optional flags argument." msgstr "" @@ -1450,12 +1451,17 @@ msgstr "" msgid "" "The optional argument *count* is the maximum number of pattern occurrences " "to be replaced; *count* must be a non-negative integer. If omitted or zero, " -"all occurrences will be replaced. Empty matches for the pattern are replaced " -"only when not adjacent to a previous empty match, so ``sub('x*', '-', " -"'abxd')`` returns ``'-a-b--d-'``." +"all occurrences will be replaced." msgstr "" -#: ../../library/re.rst:1104 +#: ../../library/re.rst:1100 +msgid "" +"Adjacent empty matches are not possible, but an empty match can occur " +"immediately after a non-empty match. As a result, ``sub('x*', '-', 'abxd')`` " +"returns ``'-a-b--d-'`` instead of ``'-a-b-d-'``." +msgstr "" + +#: ../../library/re.rst:1107 msgid "" "In string-type *repl* arguments, in addition to the character escapes and " "backreferences described above, ``\\g`` will use the substring matched " @@ -1468,51 +1474,50 @@ msgid "" "RE." msgstr "" -#: ../../library/re.rst:1121 ../../library/re.rst:1399 +#: ../../library/re.rst:1124 ../../library/re.rst:1401 msgid "Unmatched groups are replaced with an empty string." msgstr "" -#: ../../library/re.rst:1124 +#: ../../library/re.rst:1127 msgid "" "Unknown escapes in *pattern* consisting of ``'\\'`` and an ASCII letter now " "are errors." msgstr "" -#: ../../library/re.rst:1128 +#: ../../library/re.rst:1131 msgid "" "Unknown escapes in *repl* consisting of ``'\\'`` and an ASCII letter now are " -"errors. Empty matches for the pattern are replaced when adjacent to a " -"previous non-empty match." +"errors. An empty match can occur immediately after a non-empty match." msgstr "" -#: ../../library/re.rst:1134 +#: ../../library/re.rst:1136 msgid "" "Group *id* can only contain ASCII digits. In :class:`bytes` replacement " "strings, group *name* can only contain bytes in the ASCII range " "(``b'\\x00'``-``b'\\x7f'``)." msgstr "" -#: ../../library/re.rst:1139 +#: ../../library/re.rst:1141 msgid "" "Passing *count* and *flags* as positional arguments is deprecated. In future " "Python versions they will be :ref:`keyword-only parameters `." msgstr "" -#: ../../library/re.rst:1147 +#: ../../library/re.rst:1149 msgid "" "Perform the same operation as :func:`sub`, but return a tuple ``(new_string, " "number_of_subs_made)``." msgstr "" -#: ../../library/re.rst:1157 +#: ../../library/re.rst:1159 msgid "" "Escape special characters in *pattern*. This is useful if you want to match " "an arbitrary literal string that may have regular expression metacharacters " "in it. For example::" msgstr "" -#: ../../library/re.rst:1161 +#: ../../library/re.rst:1163 msgid "" ">>> print(re.escape('https://www.python.org'))\n" "https://www\\.python\\.org\n" @@ -1527,13 +1532,13 @@ msgid "" "/|\\-|\\+|\\*\\*|\\*" msgstr "" -#: ../../library/re.rst:1172 +#: ../../library/re.rst:1174 msgid "" "This function must not be used for the replacement string in :func:`sub` " "and :func:`subn`, only backslashes should be escaped. For example::" msgstr "" -#: ../../library/re.rst:1175 +#: ../../library/re.rst:1177 msgid "" ">>> digits_re = r'\\d+'\n" ">>> sample = '/usr/sbin/sendmail - 0 errors, 12 warnings'\n" @@ -1541,11 +1546,11 @@ msgid "" "/usr/sbin/sendmail - \\d+ errors, \\d+ warnings" msgstr "" -#: ../../library/re.rst:1180 +#: ../../library/re.rst:1182 msgid "The ``'_'`` character is no longer escaped." msgstr "" -#: ../../library/re.rst:1183 +#: ../../library/re.rst:1185 msgid "" "Only characters that can have special meaning in a regular expression are " "escaped. As a result, ``'!'``, ``'\"'``, ``'%'``, ``\"'\"``, ``','``, " @@ -1553,15 +1558,15 @@ msgid "" "are no longer escaped." msgstr "" -#: ../../library/re.rst:1192 +#: ../../library/re.rst:1194 msgid "Clear the regular expression cache." msgstr "" -#: ../../library/re.rst:1196 +#: ../../library/re.rst:1198 msgid "Exceptions" msgstr "" -#: ../../library/re.rst:1200 +#: ../../library/re.rst:1202 msgid "" "Exception raised when a string passed to one of the functions here is not a " "valid regular expression (for example, it might contain unmatched " @@ -1571,51 +1576,51 @@ msgid "" "attributes:" msgstr "" -#: ../../library/re.rst:1208 +#: ../../library/re.rst:1210 msgid "The unformatted error message." msgstr "" -#: ../../library/re.rst:1212 +#: ../../library/re.rst:1214 msgid "The regular expression pattern." msgstr "" -#: ../../library/re.rst:1216 +#: ../../library/re.rst:1218 msgid "The index in *pattern* where compilation failed (may be ``None``)." msgstr "" -#: ../../library/re.rst:1220 +#: ../../library/re.rst:1222 msgid "The line corresponding to *pos* (may be ``None``)." msgstr "" -#: ../../library/re.rst:1224 +#: ../../library/re.rst:1226 msgid "The column corresponding to *pos* (may be ``None``)." msgstr "" -#: ../../library/re.rst:1226 +#: ../../library/re.rst:1228 msgid "Added additional attributes." msgstr "" -#: ../../library/re.rst:1229 +#: ../../library/re.rst:1231 msgid "" "``PatternError`` was originally named ``error``; the latter is kept as an " "alias for backward compatibility." msgstr "" -#: ../../library/re.rst:1236 +#: ../../library/re.rst:1238 msgid "Regular Expression Objects" msgstr "" -#: ../../library/re.rst:1240 +#: ../../library/re.rst:1242 msgid "Compiled regular expression object returned by :func:`re.compile`." msgstr "" -#: ../../library/re.rst:1242 +#: ../../library/re.rst:1244 msgid "" ":py:class:`re.Pattern` supports ``[]`` to indicate a Unicode (str) or bytes " "pattern. See :ref:`types-genericalias`." msgstr "" -#: ../../library/re.rst:1248 +#: ../../library/re.rst:1250 msgid "" "Scan through *string* looking for the first location where this regular " "expression produces a match, and return a corresponding :class:`~re.Match`. " @@ -1624,7 +1629,7 @@ msgid "" "string." msgstr "" -#: ../../library/re.rst:1253 +#: ../../library/re.rst:1255 msgid "" "The optional second parameter *pos* gives an index in the string where the " "search is to start; it defaults to ``0``. This is not completely equivalent " @@ -1633,7 +1638,7 @@ msgid "" "necessarily at the index where the search is to start." msgstr "" -#: ../../library/re.rst:1259 +#: ../../library/re.rst:1261 msgid "" "The optional parameter *endpos* limits how far the string will be searched; " "it will be as if the string is *endpos* characters long, so only the " @@ -1643,7 +1648,7 @@ msgid "" "equivalent to ``rx.search(string[:50], 0)``. ::" msgstr "" -#: ../../library/re.rst:1266 +#: ../../library/re.rst:1268 msgid "" ">>> pattern = re.compile(\"d\")\n" ">>> pattern.search(\"dog\") # Match at index 0\n" @@ -1651,7 +1656,7 @@ msgid "" ">>> pattern.search(\"dog\", 1) # No match; search doesn't include the \"d\"" msgstr "" -#: ../../library/re.rst:1274 +#: ../../library/re.rst:1276 msgid "" "If zero or more characters at the *beginning* of *string* match this regular " "expression, return a corresponding :class:`~re.Match`. Return ``None`` if " @@ -1659,13 +1664,13 @@ msgid "" "zero-length match." msgstr "" -#: ../../library/re.rst:1279 ../../library/re.rst:1297 +#: ../../library/re.rst:1281 ../../library/re.rst:1299 msgid "" "The optional *pos* and *endpos* parameters have the same meaning as for the :" "meth:`~Pattern.search` method. ::" msgstr "" -#: ../../library/re.rst:1282 +#: ../../library/re.rst:1284 msgid "" ">>> pattern = re.compile(\"o\")\n" ">>> pattern.match(\"dog\") # No match as \"o\" is not at the start of " @@ -1675,20 +1680,20 @@ msgid "" "" msgstr "" -#: ../../library/re.rst:1287 +#: ../../library/re.rst:1289 msgid "" "If you want to locate a match anywhere in *string*, use :meth:`~Pattern." "search` instead (see also :ref:`search-vs-match`)." msgstr "" -#: ../../library/re.rst:1293 +#: ../../library/re.rst:1295 msgid "" "If the whole *string* matches this regular expression, return a " "corresponding :class:`~re.Match`. Return ``None`` if the string does not " "match the pattern; note that this is different from a zero-length match." msgstr "" -#: ../../library/re.rst:1300 +#: ../../library/re.rst:1302 msgid "" ">>> pattern = re.compile(\"o[gh]\")\n" ">>> pattern.fullmatch(\"dog\") # No match as \"o\" is not at the start " @@ -1699,89 +1704,89 @@ msgid "" "" msgstr "" -#: ../../library/re.rst:1311 +#: ../../library/re.rst:1313 msgid "Identical to the :func:`split` function, using the compiled pattern." msgstr "" -#: ../../library/re.rst:1316 +#: ../../library/re.rst:1318 msgid "" "Similar to the :func:`findall` function, using the compiled pattern, but " "also accepts optional *pos* and *endpos* parameters that limit the search " "region like for :meth:`search`." msgstr "" -#: ../../library/re.rst:1323 +#: ../../library/re.rst:1325 msgid "" "Similar to the :func:`finditer` function, using the compiled pattern, but " "also accepts optional *pos* and *endpos* parameters that limit the search " "region like for :meth:`search`." msgstr "" -#: ../../library/re.rst:1330 +#: ../../library/re.rst:1332 msgid "Identical to the :func:`sub` function, using the compiled pattern." msgstr "" -#: ../../library/re.rst:1335 +#: ../../library/re.rst:1337 msgid "Identical to the :func:`subn` function, using the compiled pattern." msgstr "" -#: ../../library/re.rst:1340 +#: ../../library/re.rst:1342 msgid "" "The regex matching flags. This is a combination of the flags given to :func:" "`.compile`, any ``(?...)`` inline flags in the pattern, and implicit flags " "such as :py:const:`~re.UNICODE` if the pattern is a Unicode string." msgstr "" -#: ../../library/re.rst:1347 +#: ../../library/re.rst:1349 msgid "The number of capturing groups in the pattern." msgstr "" -#: ../../library/re.rst:1352 +#: ../../library/re.rst:1354 msgid "" "A dictionary mapping any symbolic group names defined by ``(?P)`` to " "group numbers. The dictionary is empty if no symbolic groups were used in " "the pattern." msgstr "" -#: ../../library/re.rst:1359 +#: ../../library/re.rst:1361 msgid "The pattern string from which the pattern object was compiled." msgstr "" -#: ../../library/re.rst:1362 +#: ../../library/re.rst:1364 msgid "" "Added support of :func:`copy.copy` and :func:`copy.deepcopy`. Compiled " "regular expression objects are considered atomic." msgstr "" -#: ../../library/re.rst:1370 +#: ../../library/re.rst:1372 msgid "Match Objects" msgstr "" -#: ../../library/re.rst:1372 +#: ../../library/re.rst:1374 msgid "" "Match objects always have a boolean value of ``True``. Since :meth:`~Pattern." "match` and :meth:`~Pattern.search` return ``None`` when there is no match, " "you can test whether there was a match with a simple ``if`` statement::" msgstr "" -#: ../../library/re.rst:1377 +#: ../../library/re.rst:1379 msgid "" "match = re.search(pattern, string)\n" "if match:\n" " process(match)" msgstr "" -#: ../../library/re.rst:1383 +#: ../../library/re.rst:1385 msgid "Match object returned by successful ``match``\\ es and ``search``\\ es." msgstr "" -#: ../../library/re.rst:1385 +#: ../../library/re.rst:1387 msgid "" ":py:class:`re.Match` supports ``[]`` to indicate a Unicode (str) or bytes " "match. See :ref:`types-genericalias`." msgstr "" -#: ../../library/re.rst:1391 +#: ../../library/re.rst:1393 msgid "" "Return the string obtained by doing backslash substitution on the template " "string *template*, as done by the :meth:`~Pattern.sub` method. Escapes such " @@ -1791,7 +1796,7 @@ msgid "" "backreference ``\\g<0>`` will be replaced by the entire match." msgstr "" -#: ../../library/re.rst:1404 +#: ../../library/re.rst:1406 msgid "" "Returns one or more subgroups of the match. If there is a single argument, " "the result is a single string; if there are multiple arguments, the result " @@ -1806,7 +1811,7 @@ msgid "" "the pattern that matched multiple times, the last match is returned. ::" msgstr "" -#: ../../library/re.rst:1416 +#: ../../library/re.rst:1418 msgid "" ">>> m = re.match(r\"(\\w+) (\\w+)\", \"Isaac Newton, physicist\")\n" ">>> m.group(0) # The entire match\n" @@ -1819,7 +1824,7 @@ msgid "" "('Isaac', 'Newton')" msgstr "" -#: ../../library/re.rst:1426 +#: ../../library/re.rst:1428 msgid "" "If the regular expression uses the ``(?P...)`` syntax, the *groupN* " "arguments may also be strings identifying groups by their group name. If a " @@ -1827,11 +1832,11 @@ msgid "" "`IndexError` exception is raised." msgstr "" -#: ../../library/re.rst:1431 +#: ../../library/re.rst:1433 msgid "A moderately complicated example::" msgstr "" -#: ../../library/re.rst:1433 +#: ../../library/re.rst:1435 msgid "" ">>> m = re.match(r\"(?P\\w+) (?P\\w+)\", \"Malcolm " "Reynolds\")\n" @@ -1841,11 +1846,11 @@ msgid "" "'Reynolds'" msgstr "" -#: ../../library/re.rst:1439 +#: ../../library/re.rst:1441 msgid "Named groups can also be referred to by their index::" msgstr "" -#: ../../library/re.rst:1441 +#: ../../library/re.rst:1443 msgid "" ">>> m.group(1)\n" "'Malcolm'\n" @@ -1853,24 +1858,24 @@ msgid "" "'Reynolds'" msgstr "" -#: ../../library/re.rst:1446 +#: ../../library/re.rst:1448 msgid "If a group matches multiple times, only the last match is accessible::" msgstr "" -#: ../../library/re.rst:1448 +#: ../../library/re.rst:1450 msgid "" ">>> m = re.match(r\"(..)+\", \"a1b2c3\") # Matches 3 times.\n" ">>> m.group(1) # Returns only the last match.\n" "'c3'" msgstr "" -#: ../../library/re.rst:1455 +#: ../../library/re.rst:1457 msgid "" "This is identical to ``m.group(g)``. This allows easier access to an " "individual group from a match::" msgstr "" -#: ../../library/re.rst:1458 +#: ../../library/re.rst:1460 msgid "" ">>> m = re.match(r\"(\\w+) (\\w+)\", \"Isaac Newton, physicist\")\n" ">>> m[0] # The entire match\n" @@ -1881,11 +1886,11 @@ msgid "" "'Newton'" msgstr "" -#: ../../library/re.rst:1466 +#: ../../library/re.rst:1468 msgid "Named groups are supported as well::" msgstr "" -#: ../../library/re.rst:1468 +#: ../../library/re.rst:1470 msgid "" ">>> m = re.match(r\"(?P\\w+) (?P\\w+)\", \"Isaac " "Newton\")\n" @@ -1895,32 +1900,32 @@ msgid "" "'Newton'" msgstr "" -#: ../../library/re.rst:1479 +#: ../../library/re.rst:1481 msgid "" "Return a tuple containing all the subgroups of the match, from 1 up to " "however many groups are in the pattern. The *default* argument is used for " "groups that did not participate in the match; it defaults to ``None``." msgstr "" -#: ../../library/re.rst:1483 ../../library/re.rst:1708 +#: ../../library/re.rst:1485 ../../library/re.rst:1710 msgid "For example::" msgstr "" -#: ../../library/re.rst:1485 +#: ../../library/re.rst:1487 msgid "" ">>> m = re.match(r\"(\\d+)\\.(\\d+)\", \"24.1632\")\n" ">>> m.groups()\n" "('24', '1632')" msgstr "" -#: ../../library/re.rst:1489 +#: ../../library/re.rst:1491 msgid "" "If we make the decimal place and everything after it optional, not all " "groups might participate in the match. These groups will default to " "``None`` unless the *default* argument is given::" msgstr "" -#: ../../library/re.rst:1493 +#: ../../library/re.rst:1495 msgid "" ">>> m = re.match(r\"(\\d+)\\.?(\\d+)?\", \"24\")\n" ">>> m.groups() # Second group defaults to None.\n" @@ -1929,14 +1934,14 @@ msgid "" "('24', '0')" msgstr "" -#: ../../library/re.rst:1502 +#: ../../library/re.rst:1504 msgid "" "Return a dictionary containing all the *named* subgroups of the match, keyed " "by the subgroup name. The *default* argument is used for groups that did " "not participate in the match; it defaults to ``None``. For example::" msgstr "" -#: ../../library/re.rst:1506 +#: ../../library/re.rst:1508 msgid "" ">>> m = re.match(r\"(?P\\w+) (?P\\w+)\", \"Malcolm " "Reynolds\")\n" @@ -1944,7 +1949,7 @@ msgid "" "{'first_name': 'Malcolm', 'last_name': 'Reynolds'}" msgstr "" -#: ../../library/re.rst:1514 +#: ../../library/re.rst:1516 msgid "" "Return the indices of the start and end of the substring matched by *group*; " "*group* defaults to zero (meaning the whole matched substring). Return " @@ -1953,11 +1958,11 @@ msgid "" "matched by group *g* (equivalent to ``m.group(g)``) is ::" msgstr "" -#: ../../library/re.rst:1520 +#: ../../library/re.rst:1522 msgid "m.string[m.start(g):m.end(g)]" msgstr "" -#: ../../library/re.rst:1522 +#: ../../library/re.rst:1524 msgid "" "Note that ``m.start(group)`` will equal ``m.end(group)`` if *group* matched " "a null string. For example, after ``m = re.search('b(c?)', 'cba')``, ``m." @@ -1965,11 +1970,11 @@ msgid "" "2, and ``m.start(2)`` raises an :exc:`IndexError` exception." msgstr "" -#: ../../library/re.rst:1527 +#: ../../library/re.rst:1529 msgid "An example that will remove *remove_this* from email addresses::" msgstr "" -#: ../../library/re.rst:1529 +#: ../../library/re.rst:1531 msgid "" ">>> email = \"tony@tiremove_thisger.net\"\n" ">>> m = re.search(\"remove_this\", email)\n" @@ -1977,28 +1982,28 @@ msgid "" "'tony@tiger.net'" msgstr "" -#: ../../library/re.rst:1537 +#: ../../library/re.rst:1539 msgid "" "For a match *m*, return the 2-tuple ``(m.start(group), m.end(group))``. Note " "that if *group* did not contribute to the match, this is ``(-1, -1)``. " "*group* defaults to zero, the entire match." msgstr "" -#: ../../library/re.rst:1544 +#: ../../library/re.rst:1546 msgid "" "The value of *pos* which was passed to the :meth:`~Pattern.search` or :meth:" "`~Pattern.match` method of a :ref:`regex object `. This is the " "index into the string at which the RE engine started looking for a match." msgstr "" -#: ../../library/re.rst:1551 +#: ../../library/re.rst:1553 msgid "" "The value of *endpos* which was passed to the :meth:`~Pattern.search` or :" "meth:`~Pattern.match` method of a :ref:`regex object `. This is " "the index into the string beyond which the RE engine will not go." msgstr "" -#: ../../library/re.rst:1558 +#: ../../library/re.rst:1560 msgid "" "The integer index of the last matched capturing group, or ``None`` if no " "group was matched at all. For example, the expressions ``(a)b``, ``((a)" @@ -2007,43 +2012,43 @@ msgid "" "applied to the same string." msgstr "" -#: ../../library/re.rst:1567 +#: ../../library/re.rst:1569 msgid "" "The name of the last matched capturing group, or ``None`` if the group " "didn't have a name, or if no group was matched at all." msgstr "" -#: ../../library/re.rst:1573 +#: ../../library/re.rst:1575 msgid "" "The :ref:`regular expression object ` whose :meth:`~Pattern." "match` or :meth:`~Pattern.search` method produced this match instance." msgstr "" -#: ../../library/re.rst:1579 +#: ../../library/re.rst:1581 msgid "The string passed to :meth:`~Pattern.match` or :meth:`~Pattern.search`." msgstr "" -#: ../../library/re.rst:1582 +#: ../../library/re.rst:1584 msgid "" "Added support of :func:`copy.copy` and :func:`copy.deepcopy`. Match objects " "are considered atomic." msgstr "" -#: ../../library/re.rst:1590 +#: ../../library/re.rst:1592 msgid "Regular Expression Examples" msgstr "" -#: ../../library/re.rst:1594 +#: ../../library/re.rst:1596 msgid "Checking for a Pair" msgstr "" -#: ../../library/re.rst:1596 +#: ../../library/re.rst:1598 msgid "" "In this example, we'll use the following helper function to display match " "objects a little more gracefully::" msgstr "" -#: ../../library/re.rst:1599 +#: ../../library/re.rst:1601 msgid "" "def displaymatch(match):\n" " if match is None:\n" @@ -2051,7 +2056,7 @@ msgid "" " return '' % (match.group(), match.groups())" msgstr "" -#: ../../library/re.rst:1604 +#: ../../library/re.rst:1606 msgid "" "Suppose you are writing a poker program where a player's hand is represented " "as a 5-character string with each character representing a card, \"a\" for " @@ -2059,11 +2064,11 @@ msgid "" "\"2\" through \"9\" representing the card with that value." msgstr "" -#: ../../library/re.rst:1609 +#: ../../library/re.rst:1611 msgid "To see if a given string is a valid hand, one could do the following::" msgstr "" -#: ../../library/re.rst:1611 +#: ../../library/re.rst:1613 msgid "" ">>> valid = re.compile(r\"^[a2-9tjqk]{5}$\")\n" ">>> displaymatch(valid.match(\"akt5q\")) # Valid.\n" @@ -2074,14 +2079,14 @@ msgid "" "\"\"" msgstr "" -#: ../../library/re.rst:1619 +#: ../../library/re.rst:1621 msgid "" "That last hand, ``\"727ak\"``, contained a pair, or two of the same valued " "cards. To match this with a regular expression, one could use backreferences " "as such::" msgstr "" -#: ../../library/re.rst:1622 +#: ../../library/re.rst:1624 msgid "" ">>> pair = re.compile(r\".*(.).*\\1\")\n" ">>> displaymatch(pair.match(\"717ak\")) # Pair of 7s.\n" @@ -2091,13 +2096,13 @@ msgid "" "\"\"" msgstr "" -#: ../../library/re.rst:1629 +#: ../../library/re.rst:1631 msgid "" "To find out what card the pair consists of, one could use the :meth:`~Match." "group` method of the match object in the following manner::" msgstr "" -#: ../../library/re.rst:1632 +#: ../../library/re.rst:1634 msgid "" ">>> pair = re.compile(r\".*(.).*\\1\")\n" ">>> pair.match(\"717ak\").group(1)\n" @@ -2115,11 +2120,11 @@ msgid "" "'a'" msgstr "" -#: ../../library/re.rst:1648 +#: ../../library/re.rst:1650 msgid "Simulating scanf()" msgstr "" -#: ../../library/re.rst:1652 +#: ../../library/re.rst:1654 msgid "" "Python does not currently have an equivalent to :c:func:`!scanf`. Regular " "expressions are generally more powerful, though also more verbose, than :c:" @@ -2128,130 +2133,130 @@ msgid "" "expressions." msgstr "" -#: ../../library/re.rst:1659 +#: ../../library/re.rst:1661 msgid ":c:func:`!scanf` Token" msgstr "" -#: ../../library/re.rst:1659 +#: ../../library/re.rst:1661 msgid "Regular Expression" msgstr "" -#: ../../library/re.rst:1661 +#: ../../library/re.rst:1663 msgid "``%c``" msgstr "" -#: ../../library/re.rst:1663 +#: ../../library/re.rst:1665 msgid "``%5c``" msgstr "" -#: ../../library/re.rst:1663 +#: ../../library/re.rst:1665 msgid "``.{5}``" msgstr "" -#: ../../library/re.rst:1665 +#: ../../library/re.rst:1667 msgid "``%d``" msgstr "" -#: ../../library/re.rst:1665 +#: ../../library/re.rst:1667 msgid "``[-+]?\\d+``" msgstr "" -#: ../../library/re.rst:1667 +#: ../../library/re.rst:1669 msgid "``%e``, ``%E``, ``%f``, ``%g``" msgstr "" -#: ../../library/re.rst:1667 +#: ../../library/re.rst:1669 msgid "``[-+]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?``" msgstr "" -#: ../../library/re.rst:1669 +#: ../../library/re.rst:1671 msgid "``%i``" msgstr "" -#: ../../library/re.rst:1669 +#: ../../library/re.rst:1671 msgid "``[-+]?(0[xX][\\dA-Fa-f]+|0[0-7]*|\\d+)``" msgstr "" -#: ../../library/re.rst:1671 +#: ../../library/re.rst:1673 msgid "``%o``" msgstr "" -#: ../../library/re.rst:1671 +#: ../../library/re.rst:1673 msgid "``[-+]?[0-7]+``" msgstr "" -#: ../../library/re.rst:1673 +#: ../../library/re.rst:1675 msgid "``%s``" msgstr "" -#: ../../library/re.rst:1673 +#: ../../library/re.rst:1675 msgid "``\\S+``" msgstr "" -#: ../../library/re.rst:1675 +#: ../../library/re.rst:1677 msgid "``%u``" msgstr "" -#: ../../library/re.rst:1675 +#: ../../library/re.rst:1677 msgid "``\\d+``" msgstr "" -#: ../../library/re.rst:1677 +#: ../../library/re.rst:1679 msgid "``%x``, ``%X``" msgstr "" -#: ../../library/re.rst:1677 +#: ../../library/re.rst:1679 msgid "``[-+]?(0[xX])?[\\dA-Fa-f]+``" msgstr "" -#: ../../library/re.rst:1680 +#: ../../library/re.rst:1682 msgid "To extract the filename and numbers from a string like ::" msgstr "" -#: ../../library/re.rst:1682 +#: ../../library/re.rst:1684 msgid "/usr/sbin/sendmail - 0 errors, 4 warnings" msgstr "" -#: ../../library/re.rst:1684 +#: ../../library/re.rst:1686 msgid "you would use a :c:func:`!scanf` format like ::" msgstr "" -#: ../../library/re.rst:1686 +#: ../../library/re.rst:1688 msgid "%s - %d errors, %d warnings" msgstr "" -#: ../../library/re.rst:1688 +#: ../../library/re.rst:1690 msgid "The equivalent regular expression would be ::" msgstr "" -#: ../../library/re.rst:1690 +#: ../../library/re.rst:1692 msgid "(\\S+) - (\\d+) errors, (\\d+) warnings" msgstr "" -#: ../../library/re.rst:1696 +#: ../../library/re.rst:1698 msgid "search() vs. match()" msgstr "" -#: ../../library/re.rst:1700 +#: ../../library/re.rst:1702 msgid "" "Python offers different primitive operations based on regular expressions:" msgstr "" -#: ../../library/re.rst:1702 +#: ../../library/re.rst:1704 msgid ":func:`re.match` checks for a match only at the beginning of the string" msgstr "" -#: ../../library/re.rst:1703 +#: ../../library/re.rst:1705 msgid "" ":func:`re.search` checks for a match anywhere in the string (this is what " "Perl does by default)" msgstr "" -#: ../../library/re.rst:1705 +#: ../../library/re.rst:1707 msgid ":func:`re.fullmatch` checks for entire string to be a match" msgstr "" -#: ../../library/re.rst:1710 +#: ../../library/re.rst:1712 msgid "" ">>> re.match(\"c\", \"abcdef\") # No match\n" ">>> re.search(\"c\", \"abcdef\") # Match\n" @@ -2261,13 +2266,13 @@ msgid "" ">>> re.fullmatch(\"r.*n\", \"python\") # No match" msgstr "" -#: ../../library/re.rst:1717 +#: ../../library/re.rst:1719 msgid "" "Regular expressions beginning with ``'^'`` can be used with :func:`search` " "to restrict the match at the beginning of the string::" msgstr "" -#: ../../library/re.rst:1720 +#: ../../library/re.rst:1722 msgid "" ">>> re.match(\"c\", \"abcdef\") # No match\n" ">>> re.search(\"^c\", \"abcdef\") # No match\n" @@ -2275,7 +2280,7 @@ msgid "" "" msgstr "" -#: ../../library/re.rst:1725 +#: ../../library/re.rst:1727 msgid "" "Note however that in :const:`MULTILINE` mode :func:`match` only matches at " "the beginning of the string, whereas using :func:`search` with a regular " @@ -2283,18 +2288,18 @@ msgid "" "line. ::" msgstr "" -#: ../../library/re.rst:1729 +#: ../../library/re.rst:1731 msgid "" ">>> re.match(\"X\", \"A\\nB\\nX\", re.MULTILINE) # No match\n" ">>> re.search(\"^X\", \"A\\nB\\nX\", re.MULTILINE) # Match\n" "" msgstr "" -#: ../../library/re.rst:1735 +#: ../../library/re.rst:1737 msgid "Making a Phonebook" msgstr "" -#: ../../library/re.rst:1737 +#: ../../library/re.rst:1739 msgid "" ":func:`split` splits a string into a list delimited by the passed pattern. " "The method is invaluable for converting textual data into data structures " @@ -2302,13 +2307,13 @@ msgid "" "following example that creates a phonebook." msgstr "" -#: ../../library/re.rst:1742 +#: ../../library/re.rst:1744 msgid "" "First, here is the input. Normally it may come from a file, here we are " "using triple-quoted string syntax" msgstr "" -#: ../../library/re.rst:1745 +#: ../../library/re.rst:1747 msgid "" ">>> text = \"\"\"Ross McFluff: 834.345.1254 155 Elm Street\n" "...\n" @@ -2319,13 +2324,13 @@ msgid "" "... Heather Albrecht: 548.326.4584 919 Park Place\"\"\"" msgstr "" -#: ../../library/re.rst:1755 +#: ../../library/re.rst:1757 msgid "" "The entries are separated by one or more newlines. Now we convert the string " "into a list with each nonempty line having its own entry:" msgstr "" -#: ../../library/re.rst:1758 +#: ../../library/re.rst:1760 msgid "" ">>> entries = re.split(\"\\n+\", text)\n" ">>> entries\n" @@ -2335,14 +2340,14 @@ msgid "" "'Heather Albrecht: 548.326.4584 919 Park Place']" msgstr "" -#: ../../library/re.rst:1768 +#: ../../library/re.rst:1770 msgid "" "Finally, split each entry into a list with first name, last name, telephone " "number, and address. We use the ``maxsplit`` parameter of :func:`split` " "because the address has spaces, our splitting pattern, in it:" msgstr "" -#: ../../library/re.rst:1772 +#: ../../library/re.rst:1774 msgid "" ">>> [re.split(\":? \", entry, maxsplit=3) for entry in entries]\n" "[['Ross', 'McFluff', '834.345.1254', '155 Elm Street'],\n" @@ -2351,14 +2356,14 @@ msgid "" "['Heather', 'Albrecht', '548.326.4584', '919 Park Place']]" msgstr "" -#: ../../library/re.rst:1781 +#: ../../library/re.rst:1783 msgid "" "The ``:?`` pattern matches the colon after the last name, so that it does " "not occur in the result list. With a ``maxsplit`` of ``4``, we could " "separate the house number from the street name:" msgstr "" -#: ../../library/re.rst:1785 +#: ../../library/re.rst:1787 msgid "" ">>> [re.split(\":? \", entry, maxsplit=4) for entry in entries]\n" "[['Ross', 'McFluff', '834.345.1254', '155', 'Elm Street'],\n" @@ -2367,11 +2372,11 @@ msgid "" "['Heather', 'Albrecht', '548.326.4584', '919', 'Park Place']]" msgstr "" -#: ../../library/re.rst:1796 +#: ../../library/re.rst:1798 msgid "Text Munging" msgstr "" -#: ../../library/re.rst:1798 +#: ../../library/re.rst:1800 msgid "" ":func:`sub` replaces every occurrence of a pattern with a string or the " "result of a function. This example demonstrates using :func:`sub` with a " @@ -2379,7 +2384,7 @@ msgid "" "each word of a sentence except for the first and last characters::" msgstr "" -#: ../../library/re.rst:1803 +#: ../../library/re.rst:1805 msgid "" ">>> def repl(m):\n" "... inner_word = list(m.group(2))\n" @@ -2393,11 +2398,11 @@ msgid "" "'Pofsroser Aodlambelk, plasee reoprt yuor asnebces potlmrpy.'" msgstr "" -#: ../../library/re.rst:1816 +#: ../../library/re.rst:1818 msgid "Finding all Adverbs" msgstr "" -#: ../../library/re.rst:1818 +#: ../../library/re.rst:1820 msgid "" ":func:`findall` matches *all* occurrences of a pattern, not just the first " "one as :func:`search` does. For example, if a writer wanted to find all of " @@ -2405,18 +2410,18 @@ msgid "" "manner::" msgstr "" -#: ../../library/re.rst:1823 +#: ../../library/re.rst:1825 msgid "" ">>> text = \"He was carefully disguised but captured quickly by police.\"\n" ">>> re.findall(r\"\\w+ly\\b\", text)\n" "['carefully', 'quickly']" msgstr "" -#: ../../library/re.rst:1829 +#: ../../library/re.rst:1831 msgid "Finding all Adverbs and their Positions" msgstr "" -#: ../../library/re.rst:1831 +#: ../../library/re.rst:1833 msgid "" "If one wants more information about all matches of a pattern than the " "matched text, :func:`finditer` is useful as it provides :class:`~re.Match` " @@ -2425,7 +2430,7 @@ msgid "" "they would use :func:`finditer` in the following manner::" msgstr "" -#: ../../library/re.rst:1837 +#: ../../library/re.rst:1839 msgid "" ">>> text = \"He was carefully disguised but captured quickly by police.\"\n" ">>> for m in re.finditer(r\"\\w+ly\\b\", text):\n" @@ -2434,11 +2439,11 @@ msgid "" "40-47: quickly" msgstr "" -#: ../../library/re.rst:1845 +#: ../../library/re.rst:1847 msgid "Raw String Notation" msgstr "" -#: ../../library/re.rst:1847 +#: ../../library/re.rst:1849 msgid "" "Raw string notation (``r\"text\"``) keeps regular expressions sane. Without " "it, every backslash (``'\\'``) in a regular expression would have to be " @@ -2446,7 +2451,7 @@ msgid "" "lines of code are functionally identical::" msgstr "" -#: ../../library/re.rst:1852 +#: ../../library/re.rst:1854 msgid "" ">>> re.match(r\"\\W(.)\\1\\W\", \" ff \")\n" "\n" @@ -2454,7 +2459,7 @@ msgid "" "" msgstr "" -#: ../../library/re.rst:1857 +#: ../../library/re.rst:1859 msgid "" "When one wants to match a literal backslash, it must be escaped in the " "regular expression. With raw string notation, this means ``r\"\\\\\"``. " @@ -2462,7 +2467,7 @@ msgid "" "following lines of code functionally identical::" msgstr "" -#: ../../library/re.rst:1862 +#: ../../library/re.rst:1864 msgid "" ">>> re.match(r\"\\\\\", r\"\\\\\")\n" "\n" @@ -2470,25 +2475,25 @@ msgid "" "" msgstr "" -#: ../../library/re.rst:1869 +#: ../../library/re.rst:1871 msgid "Writing a Tokenizer" msgstr "" -#: ../../library/re.rst:1871 +#: ../../library/re.rst:1873 msgid "" "A `tokenizer or scanner `_ " "analyzes a string to categorize groups of characters. This is a useful " "first step in writing a compiler or interpreter." msgstr "" -#: ../../library/re.rst:1875 +#: ../../library/re.rst:1877 msgid "" "The text categories are specified with regular expressions. The technique " "is to combine those into a single master regular expression and to loop over " "successive matches::" msgstr "" -#: ../../library/re.rst:1879 +#: ../../library/re.rst:1881 msgid "" "from typing import NamedTuple\n" "import re\n" @@ -2544,11 +2549,11 @@ msgid "" " print(token)" msgstr "" -#: ../../library/re.rst:1931 +#: ../../library/re.rst:1933 msgid "The tokenizer produces the following output::" msgstr "" -#: ../../library/re.rst:1933 +#: ../../library/re.rst:1935 msgid "" "Token(type='IF', value='IF', line=2, column=4)\n" "Token(type='ID', value='quantity', line=2, column=7)\n" @@ -2571,7 +2576,7 @@ msgid "" "Token(type='END', value=';', line=5, column=9)" msgstr "" -#: ../../library/re.rst:1954 +#: ../../library/re.rst:1956 msgid "" "Friedl, Jeffrey. Mastering Regular Expressions. 3rd ed., O'Reilly Media, " "2009. The third edition of the book no longer covers Python at all, but the " @@ -2596,7 +2601,7 @@ msgstr "" #: ../../library/re.rst:587 ../../library/re.rst:603 ../../library/re.rst:611 #: ../../library/re.rst:625 ../../library/re.rst:633 ../../library/re.rst:650 #: ../../library/re.rst:664 ../../library/re.rst:675 ../../library/re.rst:866 -#: ../../library/re.rst:1102 +#: ../../library/re.rst:1105 msgid "in regular expressions" msgstr "" @@ -2796,10 +2801,10 @@ msgstr "" msgid "# (hash)" msgstr "" -#: ../../library/re.rst:1102 +#: ../../library/re.rst:1105 msgid "\\g" msgstr "" -#: ../../library/re.rst:1650 +#: ../../library/re.rst:1652 msgid "scanf (C function)" msgstr "" diff --git a/library/readline.po b/library/readline.po index 4b761f43b..55f822d4d 100644 --- a/library/readline.po +++ b/library/readline.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:12+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/removed.po b/library/removed.po index f5e4b7e53..e66be0bb4 100644 --- a/library/removed.po +++ b/library/removed.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-11-19 01:03+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/reprlib.po b/library/reprlib.po index 9b6234f15..ae3e838a1 100644 --- a/library/reprlib.po +++ b/library/reprlib.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:12+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/resource.po b/library/resource.po index fd7745ff2..2b9389169 100644 --- a/library/resource.po +++ b/library/resource.po @@ -5,15 +5,17 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 +# Gigahertz ., 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:12+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Gigahertz ., 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/rlcompleter.po b/library/rlcompleter.po index 0ebabaee8..7104dfba1 100644 --- a/library/rlcompleter.po +++ b/library/rlcompleter.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:12+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/runpy.po b/library/runpy.po index 0224d3022..c601f2815 100644 --- a/library/runpy.po +++ b/library/runpy.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:12+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/sched.po b/library/sched.po index 0b3c8214a..d97d19c62 100644 --- a/library/sched.po +++ b/library/sched.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:12+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/secrets.po b/library/secrets.po index c1ee4a6d6..d742f3655 100644 --- a/library/secrets.po +++ b/library/secrets.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:12+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/security_warnings.po b/library/security_warnings.po index b64723b5f..aceff1770 100644 --- a/library/security_warnings.po +++ b/library/security_warnings.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-08-10 13:22+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -91,7 +95,7 @@ msgid "" msgstr "" #: ../../library/security_warnings.rst:31 -msgid ":mod:`xml`: :ref:`XML vulnerabilities `" +msgid ":mod:`xml`: :ref:`XML security `" msgstr "" #: ../../library/security_warnings.rst:32 diff --git a/library/select.po b/library/select.po index ea2ec0319..c38e49738 100644 --- a/library/select.po +++ b/library/select.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:12+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/selectors.po b/library/selectors.po index 40cd92202..f7f1b73b5 100644 --- a/library/selectors.po +++ b/library/selectors.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:12+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/shelve.po b/library/shelve.po index b4b47d882..18454e020 100644 --- a/library/shelve.po +++ b/library/shelve.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:12+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/shlex.po b/library/shlex.po index 950ddf657..3a178d367 100644 --- a/library/shlex.po +++ b/library/shlex.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:13+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/shutil.po b/library/shutil.po index ce76500b4..89384efe5 100644 --- a/library/shutil.po +++ b/library/shutil.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 01:13+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" @@ -68,7 +68,18 @@ msgid "" "current file position to the end of the file will be copied." msgstr "" -#: ../../library/shutil.rst:53 +#: ../../library/shutil.rst:50 +msgid "" +":func:`copyfileobj` will *not* guarantee that the destination stream has " +"been flushed on completion of the copy. If you want to read from the " +"destination at the completion of the copy operation (for example, reading " +"the contents of a temporary file that has been copied from a HTTP stream), " +"you must ensure that you have called :func:`~io.IOBase.flush` or :func:`~io." +"IOBase.close` on the file-like object before attempting to read the " +"destination file." +msgstr "" + +#: ../../library/shutil.rst:60 msgid "" "Copy the contents (no metadata) of the file named *src* to a file named " "*dst* and return *dst* in the most efficient way possible. *src* and *dst* " @@ -76,14 +87,14 @@ msgid "" "strings." msgstr "" -#: ../../library/shutil.rst:57 +#: ../../library/shutil.rst:64 msgid "" "*dst* must be the complete target file name; look at :func:`~shutil.copy` " "for a copy that accepts a target directory path. If *src* and *dst* specify " "the same file, :exc:`SameFileError` is raised." msgstr "" -#: ../../library/shutil.rst:61 +#: ../../library/shutil.rst:68 msgid "" "The destination location must be writable; otherwise, an :exc:`OSError` " "exception will be raised. If *dst* already exists, it will be replaced. " @@ -91,47 +102,47 @@ msgid "" "with this function." msgstr "" -#: ../../library/shutil.rst:66 +#: ../../library/shutil.rst:73 msgid "" "If *follow_symlinks* is false and *src* is a symbolic link, a new symbolic " "link will be created instead of copying the file *src* points to." msgstr "" -#: ../../library/shutil.rst:70 ../../library/shutil.rst:177 -#: ../../library/shutil.rst:208 +#: ../../library/shutil.rst:77 ../../library/shutil.rst:184 +#: ../../library/shutil.rst:215 msgid "" "Raises an :ref:`auditing event ` ``shutil.copyfile`` with " "arguments ``src``, ``dst``." msgstr "" -#: ../../library/shutil.rst:72 +#: ../../library/shutil.rst:79 msgid "" ":exc:`IOError` used to be raised instead of :exc:`OSError`. Added " "*follow_symlinks* argument. Now returns *dst*." msgstr "" -#: ../../library/shutil.rst:77 +#: ../../library/shutil.rst:84 msgid "" "Raise :exc:`SameFileError` instead of :exc:`Error`. Since the former is a " "subclass of the latter, this change is backward compatible." msgstr "" -#: ../../library/shutil.rst:81 ../../library/shutil.rst:185 -#: ../../library/shutil.rst:217 ../../library/shutil.rst:287 -#: ../../library/shutil.rst:396 +#: ../../library/shutil.rst:88 ../../library/shutil.rst:192 +#: ../../library/shutil.rst:224 ../../library/shutil.rst:294 +#: ../../library/shutil.rst:407 msgid "" "Platform-specific fast-copy syscalls may be used internally in order to copy " "the file more efficiently. See :ref:`shutil-platform-dependent-efficient-" "copy-operations` section." msgstr "" -#: ../../library/shutil.rst:88 +#: ../../library/shutil.rst:95 msgid "" "This exception is raised if source and destination in :func:`copyfile` are " "the same file." msgstr "" -#: ../../library/shutil.rst:96 +#: ../../library/shutil.rst:103 msgid "" "Copy the permission bits from *src* to *dst*. The file contents, owner, and " "group are unaffected. *src* and *dst* are :term:`path-like objects ` ``shutil.copymode`` with " "arguments ``src``, ``dst``." msgstr "" -#: ../../library/shutil.rst:108 +#: ../../library/shutil.rst:115 msgid "Added *follow_symlinks* argument." msgstr "" -#: ../../library/shutil.rst:113 +#: ../../library/shutil.rst:120 msgid "" "Copy the permission bits, last access time, last modification time, and " "flags from *src* to *dst*. On Linux, :func:`copystat` also copies the " @@ -163,7 +174,7 @@ msgid "" "object>` or path names given as strings." msgstr "" -#: ../../library/shutil.rst:119 +#: ../../library/shutil.rst:126 msgid "" "If *follow_symlinks* is false, and *src* and *dst* both refer to symbolic " "links, :func:`copystat` will operate on the symbolic links themselves rather " @@ -171,54 +182,54 @@ msgid "" "*src* symbolic link, and writing the information to the *dst* symbolic link." msgstr "" -#: ../../library/shutil.rst:128 +#: ../../library/shutil.rst:135 msgid "" "Not all platforms provide the ability to examine and modify symbolic links. " "Python itself can tell you what functionality is locally available." msgstr "" -#: ../../library/shutil.rst:132 +#: ../../library/shutil.rst:139 msgid "" "If ``os.chmod in os.supports_follow_symlinks`` is ``True``, :func:`copystat` " "can modify the permission bits of a symbolic link." msgstr "" -#: ../../library/shutil.rst:136 +#: ../../library/shutil.rst:143 msgid "" "If ``os.utime in os.supports_follow_symlinks`` is ``True``, :func:`copystat` " "can modify the last access and modification times of a symbolic link." msgstr "" -#: ../../library/shutil.rst:140 +#: ../../library/shutil.rst:147 msgid "" "If ``os.chflags in os.supports_follow_symlinks`` is ``True``, :func:" "`copystat` can modify the flags of a symbolic link. (``os.chflags`` is not " "available on all platforms.)" msgstr "" -#: ../../library/shutil.rst:145 +#: ../../library/shutil.rst:152 msgid "" "On platforms where some or all of this functionality is unavailable, when " "asked to modify a symbolic link, :func:`copystat` will copy everything it " "can. :func:`copystat` never returns failure." msgstr "" -#: ../../library/shutil.rst:150 +#: ../../library/shutil.rst:157 msgid "Please see :data:`os.supports_follow_symlinks` for more information." msgstr "" -#: ../../library/shutil.rst:153 ../../library/shutil.rst:210 +#: ../../library/shutil.rst:160 ../../library/shutil.rst:217 msgid "" "Raises an :ref:`auditing event ` ``shutil.copystat`` with " "arguments ``src``, ``dst``." msgstr "" -#: ../../library/shutil.rst:155 +#: ../../library/shutil.rst:162 msgid "" "Added *follow_symlinks* argument and support for Linux extended attributes." msgstr "" -#: ../../library/shutil.rst:160 +#: ../../library/shutil.rst:167 msgid "" "Copies the file *src* to the file or directory *dst*. *src* and *dst* " "should be :term:`path-like objects ` or strings. If *dst* " @@ -227,14 +238,14 @@ msgid "" "be replaced. Returns the path to the newly created file." msgstr "" -#: ../../library/shutil.rst:166 +#: ../../library/shutil.rst:173 msgid "" "If *follow_symlinks* is false, and *src* is a symbolic link, *dst* will be " "created as a symbolic link. If *follow_symlinks* is true and *src* is a " "symbolic link, *dst* will be a copy of the file *src* refers to." msgstr "" -#: ../../library/shutil.rst:171 +#: ../../library/shutil.rst:178 msgid "" ":func:`~shutil.copy` copies the file data and the file's permission mode " "(see :func:`os.chmod`). Other metadata, like the file's creation and " @@ -242,18 +253,18 @@ msgid "" "original, use :func:`~shutil.copy2` instead." msgstr "" -#: ../../library/shutil.rst:181 +#: ../../library/shutil.rst:188 msgid "" "Added *follow_symlinks* argument. Now returns path to the newly created file." msgstr "" -#: ../../library/shutil.rst:192 +#: ../../library/shutil.rst:199 msgid "" "Identical to :func:`~shutil.copy` except that :func:`copy2` also attempts to " "preserve file metadata." msgstr "" -#: ../../library/shutil.rst:195 +#: ../../library/shutil.rst:202 msgid "" "When *follow_symlinks* is false, and *src* is a symbolic link, :func:`copy2` " "attempts to copy all metadata from the *src* symbolic link to the newly " @@ -263,41 +274,41 @@ msgid "" "`copy2` never raises an exception because it cannot preserve file metadata." msgstr "" -#: ../../library/shutil.rst:204 +#: ../../library/shutil.rst:211 msgid "" ":func:`copy2` uses :func:`copystat` to copy the file metadata. Please see :" "func:`copystat` for more information about platform support for modifying " "symbolic link metadata." msgstr "" -#: ../../library/shutil.rst:212 +#: ../../library/shutil.rst:219 msgid "" "Added *follow_symlinks* argument, try to copy extended file system " "attributes too (currently Linux only). Now returns path to the newly created " "file." msgstr "" -#: ../../library/shutil.rst:224 +#: ../../library/shutil.rst:231 msgid "" "This factory function creates a function that can be used as a callable for :" "func:`copytree`\\'s *ignore* argument, ignoring files and directories that " "match one of the glob-style *patterns* provided. See the example below." msgstr "" -#: ../../library/shutil.rst:233 +#: ../../library/shutil.rst:240 msgid "" "Recursively copy an entire directory tree rooted at *src* to a directory " "named *dst* and return the destination directory. All intermediate " "directories needed to contain *dst* will also be created by default." msgstr "" -#: ../../library/shutil.rst:237 +#: ../../library/shutil.rst:244 msgid "" "Permissions and times of directories are copied with :func:`copystat`, " "individual files are copied using :func:`~shutil.copy2`." msgstr "" -#: ../../library/shutil.rst:240 +#: ../../library/shutil.rst:247 msgid "" "If *symlinks* is true, symbolic links in the source tree are represented as " "symbolic links in the new tree and the metadata of the original links will " @@ -305,7 +316,7 @@ msgid "" "and metadata of the linked files are copied to the new tree." msgstr "" -#: ../../library/shutil.rst:245 +#: ../../library/shutil.rst:252 msgid "" "When *symlinks* is false, if the file pointed to by the symlink doesn't " "exist, an exception will be added in the list of errors raised in an :exc:" @@ -315,7 +326,7 @@ msgid "" "support :func:`os.symlink`." msgstr "" -#: ../../library/shutil.rst:252 +#: ../../library/shutil.rst:259 msgid "" "If *ignore* is given, it must be a callable that will receive as its " "arguments the directory being visited by :func:`copytree`, and a list of its " @@ -328,12 +339,12 @@ msgid "" "ignores names based on glob-style patterns." msgstr "" -#: ../../library/shutil.rst:262 +#: ../../library/shutil.rst:269 msgid "" "If exception(s) occur, an :exc:`Error` is raised with a list of reasons." msgstr "" -#: ../../library/shutil.rst:264 +#: ../../library/shutil.rst:271 msgid "" "If *copy_function* is given, it must be a callable that will be used to copy " "each file. It will be called with the source path and the destination path " @@ -341,7 +352,7 @@ msgid "" "that supports the same signature (like :func:`~shutil.copy`) can be used." msgstr "" -#: ../../library/shutil.rst:269 +#: ../../library/shutil.rst:276 msgid "" "If *dirs_exist_ok* is false (the default) and *dst* already exists, a :exc:" "`FileExistsError` is raised. If *dirs_exist_ok* is true, the copying " @@ -350,28 +361,28 @@ msgid "" "*src* tree." msgstr "" -#: ../../library/shutil.rst:275 +#: ../../library/shutil.rst:282 msgid "" "Raises an :ref:`auditing event ` ``shutil.copytree`` with " "arguments ``src``, ``dst``." msgstr "" -#: ../../library/shutil.rst:277 +#: ../../library/shutil.rst:284 msgid "" "Added the *copy_function* argument to be able to provide a custom copy " "function. Added the *ignore_dangling_symlinks* argument to silence dangling " "symlinks errors when *symlinks* is false." msgstr "" -#: ../../library/shutil.rst:283 +#: ../../library/shutil.rst:290 msgid "Copy metadata when *symlinks* is false. Now returns *dst*." msgstr "" -#: ../../library/shutil.rst:292 +#: ../../library/shutil.rst:299 msgid "Added the *dirs_exist_ok* parameter." msgstr "" -#: ../../library/shutil.rst:299 +#: ../../library/shutil.rst:306 msgid "" "Delete an entire directory tree; *path* must point to a directory (but not a " "symbolic link to a directory). If *ignore_errors* is true, errors resulting " @@ -380,13 +391,13 @@ msgid "" "are omitted, exceptions are propagated to the caller." msgstr "" -#: ../../library/shutil.rst:305 +#: ../../library/shutil.rst:312 msgid "" "This function can support :ref:`paths relative to directory descriptors " "`." msgstr "" -#: ../../library/shutil.rst:310 +#: ../../library/shutil.rst:317 msgid "" "On platforms that support the necessary fd-based functions a symlink attack " "resistant version of :func:`rmtree` is used by default. On other platforms, " @@ -397,13 +408,13 @@ msgid "" "attribute to determine which case applies." msgstr "" -#: ../../library/shutil.rst:318 +#: ../../library/shutil.rst:325 msgid "" "If *onexc* is provided, it must be a callable that accepts three parameters: " "*function*, *path*, and *excinfo*." msgstr "" -#: ../../library/shutil.rst:321 +#: ../../library/shutil.rst:328 msgid "" "The first parameter, *function*, is the function which raised the exception; " "it depends on the platform and implementation. The second parameter, " @@ -412,72 +423,78 @@ msgid "" "will not be caught." msgstr "" -#: ../../library/shutil.rst:327 +#: ../../library/shutil.rst:334 msgid "" "The deprecated *onerror* is similar to *onexc*, except that the third " "parameter it receives is the tuple returned from :func:`sys.exc_info`." msgstr "" -#: ../../library/shutil.rst:330 +#: ../../library/shutil.rst:338 +msgid "" +":ref:`shutil-rmtree-example` for an example of handling the removal of a " +"directory tree that contains read-only files." +msgstr "" + +#: ../../library/shutil.rst:341 msgid "" "Raises an :ref:`auditing event ` ``shutil.rmtree`` with arguments " "``path``, ``dir_fd``." msgstr "" -#: ../../library/shutil.rst:332 +#: ../../library/shutil.rst:343 msgid "" "Added a symlink attack resistant version that is used automatically if " "platform supports fd-based functions." msgstr "" -#: ../../library/shutil.rst:336 +#: ../../library/shutil.rst:347 msgid "" "On Windows, will no longer delete the contents of a directory junction " "before removing the junction." msgstr "" -#: ../../library/shutil.rst:340 +#: ../../library/shutil.rst:351 msgid "Added the *dir_fd* parameter." msgstr "" -#: ../../library/shutil.rst:343 +#: ../../library/shutil.rst:354 msgid "Added the *onexc* parameter, deprecated *onerror*." msgstr "" -#: ../../library/shutil.rst:346 +#: ../../library/shutil.rst:357 msgid "" ":func:`!rmtree` now ignores :exc:`FileNotFoundError` exceptions for all but " "the top-level path. Exceptions other than :exc:`OSError` and subclasses of :" "exc:`!OSError` are now always propagated to the caller." msgstr "" -#: ../../library/shutil.rst:354 +#: ../../library/shutil.rst:365 msgid "" "Indicates whether the current platform and implementation provides a symlink " "attack resistant version of :func:`rmtree`. Currently this is only true for " "platforms supporting fd-based directory access functions." msgstr "" -#: ../../library/shutil.rst:363 +#: ../../library/shutil.rst:374 msgid "" "Recursively move a file or directory (*src*) to another location and return " "the destination." msgstr "" -#: ../../library/shutil.rst:366 +#: ../../library/shutil.rst:377 msgid "" "If *dst* is an existing directory or a symlink to a directory, then *src* is " "moved inside that directory. The destination path in that directory must not " "already exist." msgstr "" -#: ../../library/shutil.rst:370 +#: ../../library/shutil.rst:381 msgid "" "If *dst* already exists but is not a directory, it may be overwritten " "depending on :func:`os.rename` semantics." msgstr "" -#: ../../library/shutil.rst:373 +#: ../../library/shutil.rst:384 msgid "" "If the destination is on the current filesystem, then :func:`os.rename` is " "used. Otherwise, *src* is copied to the destination using *copy_function* " @@ -485,7 +502,7 @@ msgid "" "of *src* will be created as the destination and *src* will be removed." msgstr "" -#: ../../library/shutil.rst:378 +#: ../../library/shutil.rst:389 msgid "" "If *copy_function* is given, it must be a callable that takes two arguments, " "*src* and the destination, and will be used to copy *src* to the destination " @@ -496,85 +513,85 @@ msgid "" "copy the metadata, at the expense of not copying any of the metadata." msgstr "" -#: ../../library/shutil.rst:386 +#: ../../library/shutil.rst:397 msgid "" "Raises an :ref:`auditing event ` ``shutil.move`` with arguments " "``src``, ``dst``." msgstr "" -#: ../../library/shutil.rst:388 +#: ../../library/shutil.rst:399 msgid "" "Added explicit symlink handling for foreign filesystems, thus adapting it to " "the behavior of GNU's :program:`mv`. Now returns *dst*." msgstr "" -#: ../../library/shutil.rst:393 +#: ../../library/shutil.rst:404 msgid "Added the *copy_function* keyword argument." msgstr "" -#: ../../library/shutil.rst:401 +#: ../../library/shutil.rst:412 msgid "Accepts a :term:`path-like object` for both *src* and *dst*." msgstr "" -#: ../../library/shutil.rst:406 +#: ../../library/shutil.rst:417 msgid "" "Return disk usage statistics about the given path as a :term:`named tuple` " "with the attributes *total*, *used* and *free*, which are the amount of " "total, used and free space, in bytes. *path* may be a file or a directory." msgstr "" -#: ../../library/shutil.rst:413 +#: ../../library/shutil.rst:424 msgid "" "On Unix filesystems, *path* must point to a path within a **mounted** " "filesystem partition. On those platforms, CPython doesn't attempt to " "retrieve disk usage information from non-mounted filesystems." msgstr "" -#: ../../library/shutil.rst:419 +#: ../../library/shutil.rst:430 msgid "On Windows, *path* can now be a file or directory." msgstr "" -#: ../../library/shutil.rst:422 ../../library/shutil.rst:436 +#: ../../library/shutil.rst:433 ../../library/shutil.rst:447 msgid "Availability" msgstr "" -#: ../../library/shutil.rst:427 +#: ../../library/shutil.rst:438 msgid "Change owner *user* and/or *group* of the given *path*." msgstr "" -#: ../../library/shutil.rst:429 +#: ../../library/shutil.rst:440 msgid "" "*user* can be a system user name or a uid; the same applies to *group*. At " "least one argument is required." msgstr "" -#: ../../library/shutil.rst:432 +#: ../../library/shutil.rst:443 msgid "See also :func:`os.chown`, the underlying function." msgstr "" -#: ../../library/shutil.rst:434 +#: ../../library/shutil.rst:445 msgid "" "Raises an :ref:`auditing event ` ``shutil.chown`` with arguments " "``path``, ``user``, ``group``." msgstr "" -#: ../../library/shutil.rst:440 +#: ../../library/shutil.rst:451 msgid "Added *dir_fd* and *follow_symlinks* parameters." msgstr "" -#: ../../library/shutil.rst:446 +#: ../../library/shutil.rst:457 msgid "" "Return the path to an executable which would be run if the given *cmd* was " "called. If no *cmd* would be called, return ``None``." msgstr "" -#: ../../library/shutil.rst:449 +#: ../../library/shutil.rst:460 msgid "" "*mode* is a permission mask passed to :func:`os.access`, by default " "determining if the file exists and is executable." msgstr "" -#: ../../library/shutil.rst:452 +#: ../../library/shutil.rst:463 msgid "" "*path* is a \"``PATH`` string\" specifying the directories to look in, " "delimited by :data:`os.pathsep`. When no *path* is specified, the :envvar:" @@ -582,14 +599,14 @@ msgid "" "to :data:`os.defpath` if it is not set." msgstr "" -#: ../../library/shutil.rst:457 +#: ../../library/shutil.rst:468 msgid "" "If *cmd* contains a directory component, :func:`!which` only checks the " "specified path directly and does not search the directories listed in *path* " "or in the system's :envvar:`PATH` environment variable." msgstr "" -#: ../../library/shutil.rst:461 +#: ../../library/shutil.rst:472 msgid "" "On Windows, the current directory is prepended to the *path* if *mode* does " "not include ``os.X_OK``. When the *mode* does include ``os.X_OK``, the " @@ -599,7 +616,7 @@ msgid "" "environment variable ``NoDefaultCurrentDirectoryInExePath``." msgstr "" -#: ../../library/shutil.rst:468 +#: ../../library/shutil.rst:479 msgid "" "Also on Windows, the :envvar:`PATHEXT` environment variable is used to " "resolve commands that may not already include an extension. For example, if " @@ -608,31 +625,31 @@ msgid "" "directories. For example, on Windows::" msgstr "" -#: ../../library/shutil.rst:474 +#: ../../library/shutil.rst:485 msgid "" ">>> shutil.which(\"python\")\n" "'C:\\\\Python33\\\\python.EXE'" msgstr "" -#: ../../library/shutil.rst:477 +#: ../../library/shutil.rst:488 msgid "" "This is also applied when *cmd* is a path that contains a directory " "component::" msgstr "" -#: ../../library/shutil.rst:480 +#: ../../library/shutil.rst:491 msgid "" ">>> shutil.which(\"C:\\\\Python33\\\\python\")\n" "'C:\\\\Python33\\\\python.EXE'" msgstr "" -#: ../../library/shutil.rst:485 +#: ../../library/shutil.rst:496 msgid "" "The :class:`bytes` type is now accepted. If *cmd* type is :class:`bytes`, " "the result type is also :class:`bytes`." msgstr "" -#: ../../library/shutil.rst:489 +#: ../../library/shutil.rst:500 msgid "" "On Windows, the current directory is no longer prepended to the search path " "if *mode* includes ``os.X_OK`` and WinAPI " @@ -643,18 +660,18 @@ msgid "" "now be found." msgstr "" -#: ../../library/shutil.rst:500 +#: ../../library/shutil.rst:511 msgid "" "This exception collects exceptions that are raised during a multi-file " "operation. For :func:`copytree`, the exception argument is a list of 3-" "tuples (*srcname*, *dstname*, *exception*)." msgstr "" -#: ../../library/shutil.rst:507 +#: ../../library/shutil.rst:518 msgid "Platform-dependent efficient copy operations" msgstr "" -#: ../../library/shutil.rst:509 +#: ../../library/shutil.rst:520 msgid "" "Starting from Python 3.8, all functions involving a file copy (:func:" "`copyfile`, :func:`~shutil.copy`, :func:`copy2`, :func:`copytree`, and :func:" @@ -664,68 +681,68 @@ msgid "" "buffers in Python as in \"``outfd.write(infd.read())``\"." msgstr "" -#: ../../library/shutil.rst:517 +#: ../../library/shutil.rst:528 msgid "On macOS `fcopyfile`_ is used to copy the file content (not metadata)." msgstr "" -#: ../../library/shutil.rst:519 +#: ../../library/shutil.rst:530 msgid "On Linux :func:`os.copy_file_range` or :func:`os.sendfile` is used." msgstr "" -#: ../../library/shutil.rst:521 +#: ../../library/shutil.rst:532 msgid "On Solaris :func:`os.sendfile` is used." msgstr "" -#: ../../library/shutil.rst:523 +#: ../../library/shutil.rst:534 msgid "" "On Windows :func:`shutil.copyfile` uses a bigger default buffer size (1 MiB " "instead of 64 KiB) and a :func:`memoryview`-based variant of :func:`shutil." "copyfileobj` is used." msgstr "" -#: ../../library/shutil.rst:527 +#: ../../library/shutil.rst:538 msgid "" "If the fast-copy operation fails and no data was written in the destination " "file then shutil will silently fallback on using less efficient :func:" "`copyfileobj` function internally." msgstr "" -#: ../../library/shutil.rst:533 +#: ../../library/shutil.rst:544 msgid "Solaris now uses :func:`os.sendfile`." msgstr "" -#: ../../library/shutil.rst:536 +#: ../../library/shutil.rst:547 msgid "" "Copy-on-write or server-side copy may be used internally via :func:`os." "copy_file_range` on supported Linux filesystems." msgstr "" -#: ../../library/shutil.rst:543 +#: ../../library/shutil.rst:554 msgid "copytree example" msgstr "" -#: ../../library/shutil.rst:545 +#: ../../library/shutil.rst:556 msgid "An example that uses the :func:`ignore_patterns` helper::" msgstr "" -#: ../../library/shutil.rst:547 +#: ../../library/shutil.rst:558 msgid "" "from shutil import copytree, ignore_patterns\n" "\n" "copytree(source, destination, ignore=ignore_patterns('*.pyc', 'tmp*'))" msgstr "" -#: ../../library/shutil.rst:551 +#: ../../library/shutil.rst:562 msgid "" "This will copy everything except ``.pyc`` files and files or directories " "whose name starts with ``tmp``." msgstr "" -#: ../../library/shutil.rst:554 +#: ../../library/shutil.rst:565 msgid "Another example that uses the *ignore* argument to add a logging call::" msgstr "" -#: ../../library/shutil.rst:556 +#: ../../library/shutil.rst:567 msgid "" "from shutil import copytree\n" "import logging\n" @@ -737,11 +754,11 @@ msgid "" "copytree(source, destination, ignore=_logpath)" msgstr "" -#: ../../library/shutil.rst:569 +#: ../../library/shutil.rst:580 msgid "rmtree example" msgstr "" -#: ../../library/shutil.rst:571 +#: ../../library/shutil.rst:582 msgid "" "This example shows how to remove a directory tree on Windows where some of " "the files have their read-only bit set. It uses the onexc callback to clear " @@ -749,7 +766,7 @@ msgid "" "propagate. ::" msgstr "" -#: ../../library/shutil.rst:576 +#: ../../library/shutil.rst:587 msgid "" "import os, stat\n" "import shutil\n" @@ -762,46 +779,47 @@ msgid "" "shutil.rmtree(directory, onexc=remove_readonly)" msgstr "" -#: ../../library/shutil.rst:589 +#: ../../library/shutil.rst:600 msgid "Archiving operations" msgstr "" -#: ../../library/shutil.rst:593 +#: ../../library/shutil.rst:604 msgid "Added support for the *xztar* format." msgstr "" -#: ../../library/shutil.rst:597 +#: ../../library/shutil.rst:608 msgid "" "High-level utilities to create and read compressed and archived files are " "also provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules." msgstr "" -#: ../../library/shutil.rst:602 +#: ../../library/shutil.rst:613 msgid "Create an archive file (such as zip or tar) and return its name." msgstr "" -#: ../../library/shutil.rst:604 +#: ../../library/shutil.rst:615 msgid "" "*base_name* is the name of the file to create, including the path, minus any " "format-specific extension." msgstr "" -#: ../../library/shutil.rst:607 +#: ../../library/shutil.rst:618 msgid "" "*format* is the archive format: one of \"zip\" (if the :mod:`zlib` module is " "available), \"tar\", \"gztar\" (if the :mod:`zlib` module is available), " -"\"bztar\" (if the :mod:`bz2` module is available), or \"xztar\" (if the :mod:" -"`lzma` module is available)." +"\"bztar\" (if the :mod:`bz2` module is available), \"xztar\" (if the :mod:" +"`lzma` module is available), or \"zstdtar\" (if the :mod:`compression.zstd` " +"module is available)." msgstr "" -#: ../../library/shutil.rst:612 +#: ../../library/shutil.rst:624 msgid "" "*root_dir* is a directory that will be the root directory of the archive, " "all paths in the archive will be relative to it; for example, we typically " "chdir into *root_dir* before creating the archive." msgstr "" -#: ../../library/shutil.rst:616 +#: ../../library/shutil.rst:628 msgid "" "*base_dir* is the directory where we start archiving from; i.e. *base_dir* " "will be the common prefix of all files and directories in the archive. " @@ -809,39 +827,39 @@ msgid "" "example-with-basedir` for how to use *base_dir* and *root_dir* together." msgstr "" -#: ../../library/shutil.rst:622 +#: ../../library/shutil.rst:634 msgid "*root_dir* and *base_dir* both default to the current directory." msgstr "" -#: ../../library/shutil.rst:624 +#: ../../library/shutil.rst:636 msgid "" "If *dry_run* is true, no archive is created, but the operations that would " "be executed are logged to *logger*." msgstr "" -#: ../../library/shutil.rst:627 +#: ../../library/shutil.rst:639 msgid "" "*owner* and *group* are used when creating a tar archive. By default, uses " "the current owner and group." msgstr "" -#: ../../library/shutil.rst:630 +#: ../../library/shutil.rst:642 msgid "" "*logger* must be an object compatible with :pep:`282`, usually an instance " "of :class:`logging.Logger`." msgstr "" -#: ../../library/shutil.rst:633 +#: ../../library/shutil.rst:645 msgid "The *verbose* argument is unused and deprecated." msgstr "" -#: ../../library/shutil.rst:635 +#: ../../library/shutil.rst:647 msgid "" "Raises an :ref:`auditing event ` ``shutil.make_archive`` with " "arguments ``base_name``, ``format``, ``root_dir``, ``base_dir``." msgstr "" -#: ../../library/shutil.rst:639 +#: ../../library/shutil.rst:651 msgid "" "This function is not thread-safe when custom archivers registered with :func:" "`register_archive_format` do not support the *root_dir* argument. In this " @@ -849,60 +867,66 @@ msgid "" "*root_dir* to perform archiving." msgstr "" -#: ../../library/shutil.rst:645 +#: ../../library/shutil.rst:657 msgid "" "The modern pax (POSIX.1-2001) format is now used instead of the legacy GNU " "format for archives created with ``format=\"tar\"``." msgstr "" -#: ../../library/shutil.rst:649 +#: ../../library/shutil.rst:661 msgid "" "This function is now made thread-safe during creation of standard ``.zip`` " "and tar archives." msgstr "" -#: ../../library/shutil.rst:655 +#: ../../library/shutil.rst:667 msgid "" "Return a list of supported formats for archiving. Each element of the " "returned sequence is a tuple ``(name, description)``." msgstr "" -#: ../../library/shutil.rst:658 ../../library/shutil.rst:773 +#: ../../library/shutil.rst:670 ../../library/shutil.rst:787 msgid "By default :mod:`shutil` provides these formats:" msgstr "" -#: ../../library/shutil.rst:660 +#: ../../library/shutil.rst:672 msgid "*zip*: ZIP file (if the :mod:`zlib` module is available)." msgstr "" -#: ../../library/shutil.rst:661 +#: ../../library/shutil.rst:673 msgid "" "*tar*: Uncompressed tar file. Uses POSIX.1-2001 pax format for new archives." msgstr "" -#: ../../library/shutil.rst:662 ../../library/shutil.rst:778 +#: ../../library/shutil.rst:674 ../../library/shutil.rst:792 msgid "*gztar*: gzip'ed tar-file (if the :mod:`zlib` module is available)." msgstr "" -#: ../../library/shutil.rst:663 ../../library/shutil.rst:779 +#: ../../library/shutil.rst:675 ../../library/shutil.rst:793 msgid "*bztar*: bzip2'ed tar-file (if the :mod:`bz2` module is available)." msgstr "" -#: ../../library/shutil.rst:664 ../../library/shutil.rst:780 +#: ../../library/shutil.rst:676 ../../library/shutil.rst:794 msgid "*xztar*: xz'ed tar-file (if the :mod:`lzma` module is available)." msgstr "" -#: ../../library/shutil.rst:666 +#: ../../library/shutil.rst:677 ../../library/shutil.rst:795 +msgid "" +"*zstdtar*: Zstandard compressed tar-file (if the :mod:`compression.zstd` " +"module is available)." +msgstr "" + +#: ../../library/shutil.rst:680 msgid "" "You can register new formats or provide your own archiver for any existing " "formats, by using :func:`register_archive_format`." msgstr "" -#: ../../library/shutil.rst:672 +#: ../../library/shutil.rst:686 msgid "Register an archiver for the format *name*." msgstr "" -#: ../../library/shutil.rst:674 +#: ../../library/shutil.rst:688 msgid "" "*function* is the callable that will be used to unpack archives. The " "callable will receive the *base_name* of the file to create, followed by the " @@ -911,7 +935,7 @@ msgid "" "*dry_run* and *logger* (as passed in :func:`make_archive`)." msgstr "" -#: ../../library/shutil.rst:680 +#: ../../library/shutil.rst:694 msgid "" "If *function* has the custom attribute ``function.supports_root_dir`` set to " "``True``, the *root_dir* argument is passed as a keyword argument. Otherwise " @@ -920,46 +944,46 @@ msgid "" "not thread-safe." msgstr "" -#: ../../library/shutil.rst:686 +#: ../../library/shutil.rst:700 msgid "" "If given, *extra_args* is a sequence of ``(name, value)`` pairs that will be " "used as extra keywords arguments when the archiver callable is used." msgstr "" -#: ../../library/shutil.rst:689 +#: ../../library/shutil.rst:703 msgid "" "*description* is used by :func:`get_archive_formats` which returns the list " "of archivers. Defaults to an empty string." msgstr "" -#: ../../library/shutil.rst:692 +#: ../../library/shutil.rst:706 msgid "Added support for functions supporting the *root_dir* argument." msgstr "" -#: ../../library/shutil.rst:698 +#: ../../library/shutil.rst:712 msgid "Remove the archive format *name* from the list of supported formats." msgstr "" -#: ../../library/shutil.rst:703 +#: ../../library/shutil.rst:717 msgid "Unpack an archive. *filename* is the full path of the archive." msgstr "" -#: ../../library/shutil.rst:705 +#: ../../library/shutil.rst:719 msgid "" "*extract_dir* is the name of the target directory where the archive is " "unpacked. If not provided, the current working directory is used." msgstr "" -#: ../../library/shutil.rst:708 +#: ../../library/shutil.rst:722 msgid "" "*format* is the archive format: one of \"zip\", \"tar\", \"gztar\", " -"\"bztar\", or \"xztar\". Or any other format registered with :func:" -"`register_unpack_format`. If not provided, :func:`unpack_archive` will use " -"the archive file name extension and see if an unpacker was registered for " -"that extension. In case none is found, a :exc:`ValueError` is raised." +"\"bztar\", \"xztar\", or \"zstdtar\". Or any other format registered with :" +"func:`register_unpack_format`. If not provided, :func:`unpack_archive` will " +"use the archive file name extension and see if an unpacker was registered " +"for that extension. In case none is found, a :exc:`ValueError` is raised." msgstr "" -#: ../../library/shutil.rst:715 +#: ../../library/shutil.rst:729 msgid "" "The keyword-only *filter* argument is passed to the underlying unpacking " "function. For zip files, *filter* is not accepted. For tar files, it is " @@ -968,13 +992,13 @@ msgid "" "extraction-filter` for details.)" msgstr "" -#: ../../library/shutil.rst:721 +#: ../../library/shutil.rst:735 msgid "" "Raises an :ref:`auditing event ` ``shutil.unpack_archive`` with " "arguments ``filename``, ``extract_dir``, ``format``." msgstr "" -#: ../../library/shutil.rst:725 +#: ../../library/shutil.rst:739 msgid "" "Never extract archives from untrusted sources without prior inspection. It " "is possible that files are created outside of the path specified in the " @@ -982,7 +1006,7 @@ msgid "" "with \"/\" or filenames with two dots \"..\"." msgstr "" -#: ../../library/shutil.rst:730 +#: ../../library/shutil.rst:744 msgid "" "Since Python 3.14, the defaults for both built-in formats (zip and tar " "files) will prevent the most dangerous of such security issues, but will not " @@ -990,91 +1014,91 @@ msgid "" "verification` section for tar-specific details." msgstr "" -#: ../../library/shutil.rst:736 +#: ../../library/shutil.rst:750 msgid "Accepts a :term:`path-like object` for *filename* and *extract_dir*." msgstr "" -#: ../../library/shutil.rst:739 +#: ../../library/shutil.rst:753 msgid "Added the *filter* argument." msgstr "" -#: ../../library/shutil.rst:744 +#: ../../library/shutil.rst:758 msgid "" "Registers an unpack format. *name* is the name of the format and " "*extensions* is a list of extensions corresponding to the format, like ``." "zip`` for Zip files." msgstr "" -#: ../../library/shutil.rst:748 +#: ../../library/shutil.rst:762 msgid "" "*function* is the callable that will be used to unpack archives. The " "callable will receive:" msgstr "" -#: ../../library/shutil.rst:751 +#: ../../library/shutil.rst:765 msgid "the path of the archive, as a positional argument;" msgstr "" -#: ../../library/shutil.rst:752 +#: ../../library/shutil.rst:766 msgid "" "the directory the archive must be extracted to, as a positional argument;" msgstr "" -#: ../../library/shutil.rst:753 +#: ../../library/shutil.rst:767 msgid "" "possibly a *filter* keyword argument, if it was given to :func:" "`unpack_archive`;" msgstr "" -#: ../../library/shutil.rst:755 +#: ../../library/shutil.rst:769 msgid "" "additional keyword arguments, specified by *extra_args* as a sequence of " "``(name, value)`` tuples." msgstr "" -#: ../../library/shutil.rst:758 +#: ../../library/shutil.rst:772 msgid "" "*description* can be provided to describe the format, and will be returned " "by the :func:`get_unpack_formats` function." msgstr "" -#: ../../library/shutil.rst:764 +#: ../../library/shutil.rst:778 msgid "Unregister an unpack format. *name* is the name of the format." msgstr "" -#: ../../library/shutil.rst:769 +#: ../../library/shutil.rst:783 msgid "" "Return a list of all registered formats for unpacking. Each element of the " "returned sequence is a tuple ``(name, extensions, description)``." msgstr "" -#: ../../library/shutil.rst:775 +#: ../../library/shutil.rst:789 msgid "" "*zip*: ZIP file (unpacking compressed files works only if the corresponding " "module is available)." msgstr "" -#: ../../library/shutil.rst:777 +#: ../../library/shutil.rst:791 msgid "*tar*: uncompressed tar file." msgstr "" -#: ../../library/shutil.rst:782 +#: ../../library/shutil.rst:798 msgid "" "You can register new formats or provide your own unpacker for any existing " "formats, by using :func:`register_unpack_format`." msgstr "" -#: ../../library/shutil.rst:789 +#: ../../library/shutil.rst:805 msgid "Archiving example" msgstr "" -#: ../../library/shutil.rst:791 +#: ../../library/shutil.rst:807 msgid "" "In this example, we create a gzip'ed tar-file archive containing all files " "found in the :file:`.ssh` directory of the user::" msgstr "" -#: ../../library/shutil.rst:794 +#: ../../library/shutil.rst:810 msgid "" ">>> from shutil import make_archive\n" ">>> import os\n" @@ -1084,11 +1108,11 @@ msgid "" "'/Users/tarek/myarchive.tar.gz'" msgstr "" -#: ../../library/shutil.rst:801 +#: ../../library/shutil.rst:817 msgid "The resulting archive contains:" msgstr "" -#: ../../library/shutil.rst:803 +#: ../../library/shutil.rst:819 msgid "" "$ tar -tzvf /Users/tarek/myarchive.tar.gz\n" "drwx------ tarek/staff 0 2010-02-01 16:23:40 ./\n" @@ -1101,18 +1125,18 @@ msgid "" "-rw-r--r-- tarek/staff 37192 2010-02-06 18:23:10 ./known_hosts" msgstr "" -#: ../../library/shutil.rst:819 +#: ../../library/shutil.rst:835 msgid "Archiving example with *base_dir*" msgstr "" -#: ../../library/shutil.rst:821 +#: ../../library/shutil.rst:837 msgid "" "In this example, similar to the `one above `_, we " "show how to use :func:`make_archive`, but this time with the usage of " "*base_dir*. We now have the following directory structure:" msgstr "" -#: ../../library/shutil.rst:825 +#: ../../library/shutil.rst:841 msgid "" "$ tree tmp\n" "tmp\n" @@ -1123,13 +1147,13 @@ msgid "" " └── do_not_add.txt" msgstr "" -#: ../../library/shutil.rst:835 +#: ../../library/shutil.rst:851 msgid "" "In the final archive, :file:`please_add.txt` should be included, but :file:" "`do_not_add.txt` should not. Therefore we use the following::" msgstr "" -#: ../../library/shutil.rst:838 +#: ../../library/shutil.rst:854 msgid "" ">>> from shutil import make_archive\n" ">>> import os\n" @@ -1143,40 +1167,40 @@ msgid "" "'/Users/tarek/my_archive.tar'" msgstr "" -#: ../../library/shutil.rst:849 +#: ../../library/shutil.rst:865 msgid "Listing the files in the resulting archive gives us:" msgstr "" -#: ../../library/shutil.rst:851 +#: ../../library/shutil.rst:867 msgid "" "$ python -m tarfile -l /Users/tarek/myarchive.tar\n" "structure/content/\n" "structure/content/please_add.txt" msgstr "" -#: ../../library/shutil.rst:859 +#: ../../library/shutil.rst:875 msgid "Querying the size of the output terminal" msgstr "" -#: ../../library/shutil.rst:863 +#: ../../library/shutil.rst:879 msgid "Get the size of the terminal window." msgstr "" -#: ../../library/shutil.rst:865 +#: ../../library/shutil.rst:881 msgid "" "For each of the two dimensions, the environment variable, ``COLUMNS`` and " "``LINES`` respectively, is checked. If the variable is defined and the value " "is a positive integer, it is used." msgstr "" -#: ../../library/shutil.rst:869 +#: ../../library/shutil.rst:885 msgid "" "When ``COLUMNS`` or ``LINES`` is not defined, which is the common case, the " "terminal connected to :data:`sys.__stdout__` is queried by invoking :func:" "`os.get_terminal_size`." msgstr "" -#: ../../library/shutil.rst:873 +#: ../../library/shutil.rst:889 msgid "" "If the terminal size cannot be successfully queried, either because the " "system doesn't support querying, or because we are not connected to a " @@ -1185,17 +1209,17 @@ msgid "" "emulators." msgstr "" -#: ../../library/shutil.rst:879 +#: ../../library/shutil.rst:895 msgid "The value returned is a named tuple of type :class:`os.terminal_size`." msgstr "" -#: ../../library/shutil.rst:881 +#: ../../library/shutil.rst:897 msgid "" "See also: The Single UNIX Specification, Version 2, `Other Environment " "Variables`_." msgstr "" -#: ../../library/shutil.rst:886 +#: ../../library/shutil.rst:902 msgid "" "The ``fallback`` values are also used if :func:`os.get_terminal_size` " "returns zeroes." @@ -1213,10 +1237,10 @@ msgstr "" msgid "copying files" msgstr "" -#: ../../library/shutil.rst:297 +#: ../../library/shutil.rst:304 msgid "directory" msgstr "" -#: ../../library/shutil.rst:297 +#: ../../library/shutil.rst:304 msgid "deleting" msgstr "" diff --git a/library/signal.po b/library/signal.po index 77e3210af..0ca4d6734 100644 --- a/library/signal.po +++ b/library/signal.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:13+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/site.po b/library/site.po index 0f031b984..c099fce79 100644 --- a/library/site.po +++ b/library/site.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:13+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/smtpd.po b/library/smtpd.po index 1ffd4ea31..fa10dbb3a 100644 --- a/library/smtpd.po +++ b/library/smtpd.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-11-19 01:03+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/smtplib.po b/library/smtplib.po index 5c4ba81b3..925701b84 100644 --- a/library/smtplib.po +++ b/library/smtplib.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:13+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/sndhdr.po b/library/sndhdr.po index 872de5823..11748f339 100644 --- a/library/sndhdr.po +++ b/library/sndhdr.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-11-19 01:03+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/socket.po b/library/socket.po index 8b30d1d28..3798ae767 100644 --- a/library/socket.po +++ b/library/socket.po @@ -7,15 +7,16 @@ # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 # Parham Forati, 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:13+0000\n" -"Last-Translator: Parham Forati, 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -1678,7 +1679,7 @@ msgid "" "`~socket.sendmsg` for the documentation of these parameters." msgstr "" -#: ../../library/socket.rst:1497 ../../library/socket.rst:1511 +#: ../../library/socket.rst:1497 msgid "" "Unix platforms supporting :meth:`~socket.sendmsg` and :const:`SCM_RIGHTS` " "mechanism." @@ -1691,6 +1692,12 @@ msgid "" "recvmsg` for the documentation of these parameters." msgstr "" +#: ../../library/socket.rst:1511 +msgid "" +"Unix platforms supporting :meth:`~socket.recvmsg` and :const:`SCM_RIGHTS` " +"mechanism." +msgstr "" + #: ../../library/socket.rst:1518 msgid "Any truncated integers at the end of the list of file descriptors." msgstr "" diff --git a/library/socketserver.po b/library/socketserver.po index 27afa6c63..873fb496f 100644 --- a/library/socketserver.po +++ b/library/socketserver.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:13+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -630,7 +631,7 @@ msgstr "" msgid "" "The difference is that the ``readline()`` call in the second handler will " "call ``recv()`` multiple times until it encounters a newline character, " -"while the the first handler had to use a ``recv()`` loop to accumulate data " +"while the first handler had to use a ``recv()`` loop to accumulate data " "until a newline itself. If it had just used a single ``recv()`` without the " "loop it would just have returned what has been received so far from the " "client. TCP is stream based: data arrives in the order it was sent, but " diff --git a/library/spwd.po b/library/spwd.po index d63636ce8..1ddf124da 100644 --- a/library/spwd.po +++ b/library/spwd.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-11-19 01:03+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/sqlite3.po b/library/sqlite3.po index a6788f0df..2e4db5713 100644 --- a/library/sqlite3.po +++ b/library/sqlite3.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:13+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -921,7 +922,7 @@ msgstr "" #: ../../library/sqlite3.rst:722 ../../library/sqlite3.rst:766 #: ../../library/sqlite3.rst:834 ../../library/sqlite3.rst:1113 -#: ../../library/sqlite3.rst:1535 ../../library/sqlite3.rst:1578 +#: ../../library/sqlite3.rst:1537 ../../library/sqlite3.rst:1578 msgid "Example:" msgstr "" @@ -1771,10 +1772,13 @@ msgid "" msgstr "" #: ../../library/sqlite3.rst:1494 -msgid "If *sql* contains more than one SQL statement." +msgid "" +"When *sql* contains more than one SQL statement. When :ref:`named " +"placeholders ` are used and *parameters* is a sequence " +"instead of a :class:`dict`." msgstr "" -#: ../../library/sqlite3.rst:1497 +#: ../../library/sqlite3.rst:1499 msgid "" "If :attr:`~Connection.autocommit` is :data:`LEGACY_TRANSACTION_CONTROL`, :" "attr:`~Connection.isolation_level` is not ``None``, *sql* is an ``INSERT``, " @@ -1782,12 +1786,11 @@ msgid "" "transaction, a transaction is implicitly opened before executing *sql*." msgstr "" -#: ../../library/sqlite3.rst:1506 +#: ../../library/sqlite3.rst:1508 msgid "" -":exc:`DeprecationWarning` is emitted if :ref:`named placeholders ` are used and *parameters* is a sequence instead of a :class:" -"`dict`. Starting with Python 3.14, :exc:`ProgrammingError` will be raised " -"instead." +"`dict`." msgstr "" #: ../../library/sqlite3.rst:1512 @@ -1817,10 +1820,12 @@ msgstr "" #: ../../library/sqlite3.rst:1531 msgid "" -"If *sql* contains more than one SQL statement, or is not a DML statement." +"When *sql* contains more than one SQL statement or is not a DML statement, " +"When :ref:`named placeholders ` are used and the items " +"in *parameters* are sequences instead of :class:`dict`\\s." msgstr "" -#: ../../library/sqlite3.rst:1537 +#: ../../library/sqlite3.rst:1539 msgid "" "rows = [\n" " (\"row1\",),\n" @@ -1830,18 +1835,17 @@ msgid "" "cur.executemany(\"INSERT INTO data VALUES(?)\", rows)" msgstr "" -#: ../../library/sqlite3.rst:1552 +#: ../../library/sqlite3.rst:1554 msgid "" "Any resulting rows are discarded, including DML statements with `RETURNING " "clauses`_." msgstr "" -#: ../../library/sqlite3.rst:1559 +#: ../../library/sqlite3.rst:1561 msgid "" -":exc:`DeprecationWarning` is emitted if :ref:`named placeholders ` are used and the items in *parameters* are sequences instead " -"of :class:`dict`\\s. Starting with Python 3.14, :exc:`ProgrammingError` will " -"be raised instead." +"of :class:`dict`\\s." msgstr "" #: ../../library/sqlite3.rst:1568 @@ -2651,7 +2655,7 @@ msgid "" "\n" "def adapt_datetime_iso(val):\n" " \"\"\"Adapt datetime.datetime to timezone-naive ISO 8601 date.\"\"\"\n" -" return val.isoformat()\n" +" return val.replace(tzinfo=None).isoformat()\n" "\n" "def adapt_datetime_epoch(val):\n" " \"\"\"Adapt datetime.datetime to Unix timestamp.\"\"\"\n" diff --git a/library/ssl.po b/library/ssl.po index c497aed2f..4f9ef7190 100644 --- a/library/ssl.po +++ b/library/ssl.po @@ -7,15 +7,16 @@ # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 # Parham Forati, 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:13+0000\n" -"Last-Translator: Parham Forati, 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/stat.po b/library/stat.po index 1127c77a3..b8a396fff 100644 --- a/library/stat.po +++ b/library/stat.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:13+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/statistics.po b/library/statistics.po index bee4eca14..7bbf87840 100644 --- a/library/statistics.po +++ b/library/statistics.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:13+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/stdtypes.po b/library/stdtypes.po index e15de4491..c705615d7 100644 --- a/library/stdtypes.po +++ b/library/stdtypes.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:13+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -107,20 +108,20 @@ msgstr "" #: ../../library/stdtypes.rst:86 ../../library/stdtypes.rst:144 #: ../../library/stdtypes.rst:282 ../../library/stdtypes.rst:372 #: ../../library/stdtypes.rst:422 ../../library/stdtypes.rst:1007 -#: ../../library/stdtypes.rst:1212 +#: ../../library/stdtypes.rst:1215 msgid "Operation" msgstr "" #: ../../library/stdtypes.rst:86 ../../library/stdtypes.rst:282 #: ../../library/stdtypes.rst:372 ../../library/stdtypes.rst:422 -#: ../../library/stdtypes.rst:1007 ../../library/stdtypes.rst:1212 +#: ../../library/stdtypes.rst:1007 ../../library/stdtypes.rst:1215 msgid "Result" msgstr "" #: ../../library/stdtypes.rst:86 ../../library/stdtypes.rst:282 #: ../../library/stdtypes.rst:422 ../../library/stdtypes.rst:1007 -#: ../../library/stdtypes.rst:1212 ../../library/stdtypes.rst:2726 -#: ../../library/stdtypes.rst:3985 +#: ../../library/stdtypes.rst:1215 ../../library/stdtypes.rst:2770 +#: ../../library/stdtypes.rst:4029 msgid "Notes" msgstr "" @@ -133,8 +134,8 @@ msgid "if *x* is true, then *x*, else *y*" msgstr "" #: ../../library/stdtypes.rst:88 ../../library/stdtypes.rst:1009 -#: ../../library/stdtypes.rst:1012 ../../library/stdtypes.rst:1223 -#: ../../library/stdtypes.rst:2732 ../../library/stdtypes.rst:3991 +#: ../../library/stdtypes.rst:1012 ../../library/stdtypes.rst:1228 +#: ../../library/stdtypes.rst:2776 ../../library/stdtypes.rst:4035 msgid "\\(1)" msgstr "" @@ -147,9 +148,9 @@ msgid "if *x* is false, then *x*, else *y*" msgstr "" #: ../../library/stdtypes.rst:91 ../../library/stdtypes.rst:295 -#: ../../library/stdtypes.rst:315 ../../library/stdtypes.rst:1251 -#: ../../library/stdtypes.rst:2736 ../../library/stdtypes.rst:2738 -#: ../../library/stdtypes.rst:3995 ../../library/stdtypes.rst:3997 +#: ../../library/stdtypes.rst:315 ../../library/stdtypes.rst:1256 +#: ../../library/stdtypes.rst:2780 ../../library/stdtypes.rst:2782 +#: ../../library/stdtypes.rst:4039 ../../library/stdtypes.rst:4041 msgid "\\(2)" msgstr "" @@ -161,19 +162,18 @@ msgstr "" msgid "if *x* is false, then ``True``, else ``False``" msgstr "" -#: ../../library/stdtypes.rst:94 ../../library/stdtypes.rst:1021 -#: ../../library/stdtypes.rst:1254 ../../library/stdtypes.rst:2740 -#: ../../library/stdtypes.rst:2742 ../../library/stdtypes.rst:2744 -#: ../../library/stdtypes.rst:2746 ../../library/stdtypes.rst:3999 -#: ../../library/stdtypes.rst:4001 ../../library/stdtypes.rst:4003 -#: ../../library/stdtypes.rst:4005 +#: ../../library/stdtypes.rst:94 ../../library/stdtypes.rst:1259 +#: ../../library/stdtypes.rst:2784 ../../library/stdtypes.rst:2786 +#: ../../library/stdtypes.rst:2788 ../../library/stdtypes.rst:2790 +#: ../../library/stdtypes.rst:4043 ../../library/stdtypes.rst:4045 +#: ../../library/stdtypes.rst:4047 ../../library/stdtypes.rst:4049 msgid "\\(3)" msgstr "" #: ../../library/stdtypes.rst:103 ../../library/stdtypes.rst:326 #: ../../library/stdtypes.rst:440 ../../library/stdtypes.rst:1058 -#: ../../library/stdtypes.rst:1263 ../../library/stdtypes.rst:2772 -#: ../../library/stdtypes.rst:4035 +#: ../../library/stdtypes.rst:1268 ../../library/stdtypes.rst:2816 +#: ../../library/stdtypes.rst:4079 msgid "Notes:" msgstr "" @@ -212,9 +212,9 @@ msgstr "" msgid "This table summarizes the comparison operations:" msgstr "" -#: ../../library/stdtypes.rst:144 ../../library/stdtypes.rst:2558 -#: ../../library/stdtypes.rst:2703 ../../library/stdtypes.rst:2726 -#: ../../library/stdtypes.rst:3962 ../../library/stdtypes.rst:3985 +#: ../../library/stdtypes.rst:144 ../../library/stdtypes.rst:2602 +#: ../../library/stdtypes.rst:2747 ../../library/stdtypes.rst:2770 +#: ../../library/stdtypes.rst:4006 ../../library/stdtypes.rst:4029 msgid "Meaning" msgstr "" @@ -511,8 +511,8 @@ msgid "" "zero." msgstr "" -#: ../../library/stdtypes.rst:308 ../../library/stdtypes.rst:1244 -#: ../../library/stdtypes.rst:2734 ../../library/stdtypes.rst:4022 +#: ../../library/stdtypes.rst:308 ../../library/stdtypes.rst:1249 +#: ../../library/stdtypes.rst:2778 ../../library/stdtypes.rst:4066 msgid "\\(6)" msgstr "" @@ -549,10 +549,10 @@ msgid "*x* to the power *y*" msgstr "" #: ../../library/stdtypes.rst:317 ../../library/stdtypes.rst:319 -#: ../../library/stdtypes.rst:1233 ../../library/stdtypes.rst:1236 -#: ../../library/stdtypes.rst:2759 ../../library/stdtypes.rst:2762 -#: ../../library/stdtypes.rst:2765 ../../library/stdtypes.rst:4018 -#: ../../library/stdtypes.rst:4025 +#: ../../library/stdtypes.rst:1238 ../../library/stdtypes.rst:1241 +#: ../../library/stdtypes.rst:2803 ../../library/stdtypes.rst:2806 +#: ../../library/stdtypes.rst:2809 ../../library/stdtypes.rst:4062 +#: ../../library/stdtypes.rst:4069 msgid "\\(5)" msgstr "" @@ -690,9 +690,9 @@ msgid "bitwise :dfn:`or` of *x* and *y*" msgstr "" #: ../../library/stdtypes.rst:424 ../../library/stdtypes.rst:427 -#: ../../library/stdtypes.rst:430 ../../library/stdtypes.rst:1258 -#: ../../library/stdtypes.rst:2748 ../../library/stdtypes.rst:2752 -#: ../../library/stdtypes.rst:4007 ../../library/stdtypes.rst:4011 +#: ../../library/stdtypes.rst:430 ../../library/stdtypes.rst:1263 +#: ../../library/stdtypes.rst:2792 ../../library/stdtypes.rst:2796 +#: ../../library/stdtypes.rst:4051 ../../library/stdtypes.rst:4055 msgid "\\(4)" msgstr "" @@ -1445,6 +1445,10 @@ msgstr "" msgid "*i*\\ th item of *s*, origin 0" msgstr "" +#: ../../library/stdtypes.rst:1021 +msgid "(3)(9)" +msgstr "" + #: ../../library/stdtypes.rst:1023 msgid "``s[i:j]``" msgstr "" @@ -1503,7 +1507,7 @@ msgid "" "before index *j*)" msgstr "" -#: ../../library/stdtypes.rst:1034 ../../library/stdtypes.rst:3993 +#: ../../library/stdtypes.rst:1034 ../../library/stdtypes.rst:4037 msgid "\\(8)" msgstr "" @@ -1666,42 +1670,46 @@ msgid "" "start of the sequence rather than the start of the slice." msgstr "" -#: ../../library/stdtypes.rst:1157 +#: ../../library/stdtypes.rst:1154 +msgid "An :exc:`IndexError` is raised if *i* is outside the sequence range." +msgstr "" + +#: ../../library/stdtypes.rst:1160 msgid "Immutable Sequence Types" msgstr "" -#: ../../library/stdtypes.rst:1164 +#: ../../library/stdtypes.rst:1167 msgid "" "The only operation that immutable sequence types generally implement that is " "not also implemented by mutable sequence types is support for the :func:" "`hash` built-in." msgstr "" -#: ../../library/stdtypes.rst:1168 +#: ../../library/stdtypes.rst:1171 msgid "" "This support allows immutable sequences, such as :class:`tuple` instances, " "to be used as :class:`dict` keys and stored in :class:`set` and :class:" "`frozenset` instances." msgstr "" -#: ../../library/stdtypes.rst:1172 +#: ../../library/stdtypes.rst:1175 msgid "" "Attempting to hash an immutable sequence that contains unhashable values " "will result in :exc:`TypeError`." msgstr "" -#: ../../library/stdtypes.rst:1179 +#: ../../library/stdtypes.rst:1182 msgid "Mutable Sequence Types" msgstr "" -#: ../../library/stdtypes.rst:1186 +#: ../../library/stdtypes.rst:1189 msgid "" "The operations in the following table are defined on mutable sequence types. " "The :class:`collections.abc.MutableSequence` ABC is provided to make it " "easier to correctly implement these operations on custom sequence types." msgstr "" -#: ../../library/stdtypes.rst:1190 +#: ../../library/stdtypes.rst:1193 msgid "" "In the table *s* is an instance of a mutable sequence type, *t* is any " "iterable object and *x* is an arbitrary object that meets any type and value " @@ -1709,147 +1717,155 @@ msgid "" "integers that meet the value restriction ``0 <= x <= 255``)." msgstr "" -#: ../../library/stdtypes.rst:1214 +#: ../../library/stdtypes.rst:1217 msgid "``s[i] = x``" msgstr "" -#: ../../library/stdtypes.rst:1214 +#: ../../library/stdtypes.rst:1217 msgid "item *i* of *s* is replaced by *x*" msgstr "" -#: ../../library/stdtypes.rst:1217 +#: ../../library/stdtypes.rst:1220 +msgid "``del s[i]``" +msgstr "" + +#: ../../library/stdtypes.rst:1220 +msgid "removes item *i* of *s*" +msgstr "" + +#: ../../library/stdtypes.rst:1222 msgid "``s[i:j] = t``" msgstr "" -#: ../../library/stdtypes.rst:1217 +#: ../../library/stdtypes.rst:1222 msgid "" "slice of *s* from *i* to *j* is replaced by the contents of the iterable *t*" msgstr "" -#: ../../library/stdtypes.rst:1221 +#: ../../library/stdtypes.rst:1226 msgid "``del s[i:j]``" msgstr "" -#: ../../library/stdtypes.rst:1221 +#: ../../library/stdtypes.rst:1226 msgid "same as ``s[i:j] = []``" msgstr "" -#: ../../library/stdtypes.rst:1223 +#: ../../library/stdtypes.rst:1228 msgid "``s[i:j:k] = t``" msgstr "" -#: ../../library/stdtypes.rst:1223 +#: ../../library/stdtypes.rst:1228 msgid "the elements of ``s[i:j:k]`` are replaced by those of *t*" msgstr "" -#: ../../library/stdtypes.rst:1226 +#: ../../library/stdtypes.rst:1231 msgid "``del s[i:j:k]``" msgstr "" -#: ../../library/stdtypes.rst:1226 +#: ../../library/stdtypes.rst:1231 msgid "removes the elements of ``s[i:j:k]`` from the list" msgstr "" -#: ../../library/stdtypes.rst:1229 +#: ../../library/stdtypes.rst:1234 msgid "``s.append(x)``" msgstr "" -#: ../../library/stdtypes.rst:1229 +#: ../../library/stdtypes.rst:1234 msgid "" "appends *x* to the end of the sequence (same as ``s[len(s):len(s)] = [x]``)" msgstr "" -#: ../../library/stdtypes.rst:1233 +#: ../../library/stdtypes.rst:1238 msgid "``s.clear()``" msgstr "" -#: ../../library/stdtypes.rst:1233 +#: ../../library/stdtypes.rst:1238 msgid "removes all items from *s* (same as ``del s[:]``)" msgstr "" -#: ../../library/stdtypes.rst:1236 +#: ../../library/stdtypes.rst:1241 msgid "``s.copy()``" msgstr "" -#: ../../library/stdtypes.rst:1236 +#: ../../library/stdtypes.rst:1241 msgid "creates a shallow copy of *s* (same as ``s[:]``)" msgstr "" -#: ../../library/stdtypes.rst:1239 +#: ../../library/stdtypes.rst:1244 msgid "``s.extend(t)`` or ``s += t``" msgstr "" -#: ../../library/stdtypes.rst:1239 +#: ../../library/stdtypes.rst:1244 msgid "" "extends *s* with the contents of *t* (for the most part the same as " "``s[len(s):len(s)] = t``)" msgstr "" -#: ../../library/stdtypes.rst:1244 +#: ../../library/stdtypes.rst:1249 msgid "``s *= n``" msgstr "" -#: ../../library/stdtypes.rst:1244 +#: ../../library/stdtypes.rst:1249 msgid "updates *s* with its contents repeated *n* times" msgstr "" -#: ../../library/stdtypes.rst:1247 +#: ../../library/stdtypes.rst:1252 msgid "``s.insert(i, x)``" msgstr "" -#: ../../library/stdtypes.rst:1247 +#: ../../library/stdtypes.rst:1252 msgid "" "inserts *x* into *s* at the index given by *i* (same as ``s[i:i] = [x]``)" msgstr "" -#: ../../library/stdtypes.rst:1251 +#: ../../library/stdtypes.rst:1256 msgid "``s.pop()`` or ``s.pop(i)``" msgstr "" -#: ../../library/stdtypes.rst:1251 +#: ../../library/stdtypes.rst:1256 msgid "retrieves the item at *i* and also removes it from *s*" msgstr "" -#: ../../library/stdtypes.rst:1254 +#: ../../library/stdtypes.rst:1259 msgid "``s.remove(x)``" msgstr "" -#: ../../library/stdtypes.rst:1254 +#: ../../library/stdtypes.rst:1259 msgid "removes the first item from *s* where ``s[i]`` is equal to *x*" msgstr "" -#: ../../library/stdtypes.rst:1258 +#: ../../library/stdtypes.rst:1263 msgid "``s.reverse()``" msgstr "" -#: ../../library/stdtypes.rst:1258 +#: ../../library/stdtypes.rst:1263 msgid "reverses the items of *s* in place" msgstr "" -#: ../../library/stdtypes.rst:1266 +#: ../../library/stdtypes.rst:1271 msgid "" "If *k* is not equal to ``1``, *t* must have the same length as the slice it " "is replacing." msgstr "" -#: ../../library/stdtypes.rst:1269 +#: ../../library/stdtypes.rst:1274 msgid "" "The optional argument *i* defaults to ``-1``, so that by default the last " "item is removed and returned." msgstr "" -#: ../../library/stdtypes.rst:1273 +#: ../../library/stdtypes.rst:1278 msgid ":meth:`remove` raises :exc:`ValueError` when *x* is not found in *s*." msgstr "" -#: ../../library/stdtypes.rst:1276 +#: ../../library/stdtypes.rst:1281 msgid "" "The :meth:`reverse` method modifies the sequence in place for economy of " "space when reversing a large sequence. To remind users that it operates by " "side effect, it does not return the reversed sequence." msgstr "" -#: ../../library/stdtypes.rst:1281 +#: ../../library/stdtypes.rst:1286 msgid "" ":meth:`clear` and :meth:`!copy` are included for consistency with the " "interfaces of mutable containers that don't support slicing operations (such " @@ -1858,11 +1874,11 @@ msgid "" "classes provide it." msgstr "" -#: ../../library/stdtypes.rst:1287 +#: ../../library/stdtypes.rst:1292 msgid ":meth:`clear` and :meth:`!copy` methods." msgstr "" -#: ../../library/stdtypes.rst:1291 +#: ../../library/stdtypes.rst:1296 msgid "" "The value *n* is an integer, or an object implementing :meth:`~object." "__index__`. Zero and negative values of *n* clear the sequence. Items in " @@ -1870,39 +1886,39 @@ msgid "" "explained for ``s * n`` under :ref:`typesseq-common`." msgstr "" -#: ../../library/stdtypes.rst:1300 +#: ../../library/stdtypes.rst:1305 msgid "Lists" msgstr "" -#: ../../library/stdtypes.rst:1304 +#: ../../library/stdtypes.rst:1309 msgid "" "Lists are mutable sequences, typically used to store collections of " "homogeneous items (where the precise degree of similarity will vary by " "application)." msgstr "" -#: ../../library/stdtypes.rst:1310 +#: ../../library/stdtypes.rst:1315 msgid "Lists may be constructed in several ways:" msgstr "" -#: ../../library/stdtypes.rst:1312 +#: ../../library/stdtypes.rst:1317 msgid "Using a pair of square brackets to denote the empty list: ``[]``" msgstr "" -#: ../../library/stdtypes.rst:1313 +#: ../../library/stdtypes.rst:1318 msgid "" "Using square brackets, separating items with commas: ``[a]``, ``[a, b, c]``" msgstr "" -#: ../../library/stdtypes.rst:1314 +#: ../../library/stdtypes.rst:1319 msgid "Using a list comprehension: ``[x for x in iterable]``" msgstr "" -#: ../../library/stdtypes.rst:1315 +#: ../../library/stdtypes.rst:1320 msgid "Using the type constructor: ``list()`` or ``list(iterable)``" msgstr "" -#: ../../library/stdtypes.rst:1317 +#: ../../library/stdtypes.rst:1322 msgid "" "The constructor builds a list whose items are the same and in the same order " "as *iterable*'s items. *iterable* may be either a sequence, a container " @@ -1913,20 +1929,20 @@ msgid "" "new empty list, ``[]``." msgstr "" -#: ../../library/stdtypes.rst:1326 +#: ../../library/stdtypes.rst:1331 msgid "" "Many other operations also produce lists, including the :func:`sorted` built-" "in." msgstr "" -#: ../../library/stdtypes.rst:1329 +#: ../../library/stdtypes.rst:1334 msgid "" "Lists implement all of the :ref:`common ` and :ref:`mutable " "` sequence operations. Lists also provide the following " "additional method:" msgstr "" -#: ../../library/stdtypes.rst:1335 +#: ../../library/stdtypes.rst:1340 msgid "" "This method sorts the list in place, using only ``<`` comparisons between " "items. Exceptions are not suppressed - if any comparison operations fail, " @@ -1934,13 +1950,13 @@ msgid "" "partially modified state)." msgstr "" -#: ../../library/stdtypes.rst:1340 +#: ../../library/stdtypes.rst:1345 msgid "" ":meth:`sort` accepts two arguments that can only be passed by keyword (:ref:" "`keyword-only arguments `):" msgstr "" -#: ../../library/stdtypes.rst:1343 +#: ../../library/stdtypes.rst:1348 msgid "" "*key* specifies a function of one argument that is used to extract a " "comparison key from each list element (for example, ``key=str.lower``). The " @@ -1949,19 +1965,19 @@ msgid "" "list items are sorted directly without calculating a separate key value." msgstr "" -#: ../../library/stdtypes.rst:1350 +#: ../../library/stdtypes.rst:1355 msgid "" "The :func:`functools.cmp_to_key` utility is available to convert a 2.x style " "*cmp* function to a *key* function." msgstr "" -#: ../../library/stdtypes.rst:1353 +#: ../../library/stdtypes.rst:1358 msgid "" "*reverse* is a boolean value. If set to ``True``, then the list elements " "are sorted as if each comparison were reversed." msgstr "" -#: ../../library/stdtypes.rst:1356 +#: ../../library/stdtypes.rst:1361 msgid "" "This method modifies the sequence in place for economy of space when sorting " "a large sequence. To remind users that it operates by side effect, it does " @@ -1969,7 +1985,7 @@ msgid "" "new sorted list instance)." msgstr "" -#: ../../library/stdtypes.rst:1361 +#: ../../library/stdtypes.rst:1366 msgid "" "The :meth:`sort` method is guaranteed to be stable. A sort is stable if it " "guarantees not to change the relative order of elements that compare equal " @@ -1977,12 +1993,12 @@ msgid "" "department, then by salary grade)." msgstr "" -#: ../../library/stdtypes.rst:1366 +#: ../../library/stdtypes.rst:1371 msgid "" "For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`." msgstr "" -#: ../../library/stdtypes.rst:1370 +#: ../../library/stdtypes.rst:1375 msgid "" "While a list is being sorted, the effect of attempting to mutate, or even " "inspect, the list is undefined. The C implementation of Python makes the " @@ -1990,11 +2006,11 @@ msgid "" "detect that the list has been mutated during a sort." msgstr "" -#: ../../library/stdtypes.rst:1379 +#: ../../library/stdtypes.rst:1384 msgid "Tuples" msgstr "" -#: ../../library/stdtypes.rst:1383 +#: ../../library/stdtypes.rst:1388 msgid "" "Tuples are immutable sequences, typically used to store collections of " "heterogeneous data (such as the 2-tuples produced by the :func:`enumerate` " @@ -2003,27 +2019,27 @@ msgid "" "class:`dict` instance)." msgstr "" -#: ../../library/stdtypes.rst:1391 +#: ../../library/stdtypes.rst:1396 msgid "Tuples may be constructed in a number of ways:" msgstr "" -#: ../../library/stdtypes.rst:1393 +#: ../../library/stdtypes.rst:1398 msgid "Using a pair of parentheses to denote the empty tuple: ``()``" msgstr "" -#: ../../library/stdtypes.rst:1394 +#: ../../library/stdtypes.rst:1399 msgid "Using a trailing comma for a singleton tuple: ``a,`` or ``(a,)``" msgstr "" -#: ../../library/stdtypes.rst:1395 +#: ../../library/stdtypes.rst:1400 msgid "Separating items with commas: ``a, b, c`` or ``(a, b, c)``" msgstr "" -#: ../../library/stdtypes.rst:1396 +#: ../../library/stdtypes.rst:1401 msgid "Using the :func:`tuple` built-in: ``tuple()`` or ``tuple(iterable)``" msgstr "" -#: ../../library/stdtypes.rst:1398 +#: ../../library/stdtypes.rst:1403 msgid "" "The constructor builds a tuple whose items are the same and in the same " "order as *iterable*'s items. *iterable* may be either a sequence, a " @@ -2034,7 +2050,7 @@ msgid "" "``()``." msgstr "" -#: ../../library/stdtypes.rst:1406 +#: ../../library/stdtypes.rst:1411 msgid "" "Note that it is actually the comma which makes a tuple, not the parentheses. " "The parentheses are optional, except in the empty tuple case, or when they " @@ -2043,30 +2059,30 @@ msgid "" "call with a 3-tuple as the sole argument." msgstr "" -#: ../../library/stdtypes.rst:1412 +#: ../../library/stdtypes.rst:1417 msgid "" "Tuples implement all of the :ref:`common ` sequence " "operations." msgstr "" -#: ../../library/stdtypes.rst:1415 +#: ../../library/stdtypes.rst:1420 msgid "" "For heterogeneous collections of data where access by name is clearer than " "access by index, :func:`collections.namedtuple` may be a more appropriate " "choice than a simple tuple object." msgstr "" -#: ../../library/stdtypes.rst:1423 +#: ../../library/stdtypes.rst:1428 msgid "Ranges" msgstr "" -#: ../../library/stdtypes.rst:1427 +#: ../../library/stdtypes.rst:1432 msgid "" "The :class:`range` type represents an immutable sequence of numbers and is " "commonly used for looping a specific number of times in :keyword:`for` loops." msgstr "" -#: ../../library/stdtypes.rst:1434 +#: ../../library/stdtypes.rst:1439 msgid "" "The arguments to the range constructor must be integers (either built-in :" "class:`int` or any object that implements the :meth:`~object.__index__` " @@ -2075,38 +2091,38 @@ msgid "" "zero, :exc:`ValueError` is raised." msgstr "" -#: ../../library/stdtypes.rst:1440 +#: ../../library/stdtypes.rst:1445 msgid "" "For a positive *step*, the contents of a range ``r`` are determined by the " "formula ``r[i] = start + step*i`` where ``i >= 0`` and ``r[i] < stop``." msgstr "" -#: ../../library/stdtypes.rst:1444 +#: ../../library/stdtypes.rst:1449 msgid "" "For a negative *step*, the contents of the range are still determined by the " "formula ``r[i] = start + step*i``, but the constraints are ``i >= 0`` and " "``r[i] > stop``." msgstr "" -#: ../../library/stdtypes.rst:1448 +#: ../../library/stdtypes.rst:1453 msgid "" "A range object will be empty if ``r[0]`` does not meet the value constraint. " "Ranges do support negative indices, but these are interpreted as indexing " "from the end of the sequence determined by the positive indices." msgstr "" -#: ../../library/stdtypes.rst:1453 +#: ../../library/stdtypes.rst:1458 msgid "" "Ranges containing absolute values larger than :data:`sys.maxsize` are " "permitted but some features (such as :func:`len`) may raise :exc:" "`OverflowError`." msgstr "" -#: ../../library/stdtypes.rst:1457 +#: ../../library/stdtypes.rst:1462 msgid "Range examples::" msgstr "" -#: ../../library/stdtypes.rst:1459 +#: ../../library/stdtypes.rst:1464 msgid "" ">>> list(range(10))\n" "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n" @@ -2124,7 +2140,7 @@ msgid "" "[]" msgstr "" -#: ../../library/stdtypes.rst:1474 +#: ../../library/stdtypes.rst:1479 msgid "" "Ranges implement all of the :ref:`common ` sequence " "operations except concatenation and repetition (due to the fact that range " @@ -2132,23 +2148,23 @@ msgid "" "repetition and concatenation will usually violate that pattern)." msgstr "" -#: ../../library/stdtypes.rst:1481 +#: ../../library/stdtypes.rst:1486 msgid "" "The value of the *start* parameter (or ``0`` if the parameter was not " "supplied)" msgstr "" -#: ../../library/stdtypes.rst:1486 +#: ../../library/stdtypes.rst:1491 msgid "The value of the *stop* parameter" msgstr "" -#: ../../library/stdtypes.rst:1490 +#: ../../library/stdtypes.rst:1495 msgid "" "The value of the *step* parameter (or ``1`` if the parameter was not " "supplied)" msgstr "" -#: ../../library/stdtypes.rst:1493 +#: ../../library/stdtypes.rst:1498 msgid "" "The advantage of the :class:`range` type over a regular :class:`list` or :" "class:`tuple` is that a :class:`range` object will always take the same " @@ -2157,14 +2173,14 @@ msgid "" "individual items and subranges as needed)." msgstr "" -#: ../../library/stdtypes.rst:1499 +#: ../../library/stdtypes.rst:1504 msgid "" "Range objects implement the :class:`collections.abc.Sequence` ABC, and " "provide features such as containment tests, element index lookup, slicing " "and support for negative indices (see :ref:`typesseq`):" msgstr "" -#: ../../library/stdtypes.rst:1519 +#: ../../library/stdtypes.rst:1524 msgid "" "Testing range objects for equality with ``==`` and ``!=`` compares them as " "sequences. That is, two range objects are considered equal if they " @@ -2174,489 +2190,489 @@ msgid "" "3)`` or ``range(0, 3, 2) == range(0, 4, 2)``.)" msgstr "" -#: ../../library/stdtypes.rst:1526 +#: ../../library/stdtypes.rst:1531 msgid "" "Implement the Sequence ABC. Support slicing and negative indices. Test :" "class:`int` objects for membership in constant time instead of iterating " "through all items." msgstr "" -#: ../../library/stdtypes.rst:1532 +#: ../../library/stdtypes.rst:1537 msgid "" "Define '==' and '!=' to compare range objects based on the sequence of " "values they define (instead of comparing based on object identity)." msgstr "" -#: ../../library/stdtypes.rst:1537 +#: ../../library/stdtypes.rst:1542 msgid "" "Added the :attr:`~range.start`, :attr:`~range.stop` and :attr:`~range.step` " "attributes." msgstr "" -#: ../../library/stdtypes.rst:1542 +#: ../../library/stdtypes.rst:1547 msgid "" "The `linspace recipe `_ shows how to implement a lazy version of range " "suitable for floating-point applications." msgstr "" -#: ../../library/stdtypes.rst:1554 +#: ../../library/stdtypes.rst:1559 msgid "Text and Binary Sequence Type Methods Summary" msgstr "" -#: ../../library/stdtypes.rst:1555 +#: ../../library/stdtypes.rst:1560 msgid "" "The following table summarizes the text and binary sequence types methods by " "category." msgstr "" -#: ../../library/stdtypes.rst:1560 +#: ../../library/stdtypes.rst:1565 msgid "Category" msgstr "" -#: ../../library/stdtypes.rst:1560 +#: ../../library/stdtypes.rst:1565 msgid ":class:`str` methods" msgstr "" -#: ../../library/stdtypes.rst:1560 +#: ../../library/stdtypes.rst:1565 msgid ":class:`bytes` and :class:`bytearray` methods" msgstr "" -#: ../../library/stdtypes.rst:1562 +#: ../../library/stdtypes.rst:1567 msgid "Formatting" msgstr "" -#: ../../library/stdtypes.rst:1562 +#: ../../library/stdtypes.rst:1567 msgid ":meth:`str.format`" msgstr "" -#: ../../library/stdtypes.rst:1564 +#: ../../library/stdtypes.rst:1569 msgid ":meth:`str.format_map`" msgstr "" -#: ../../library/stdtypes.rst:1566 +#: ../../library/stdtypes.rst:1571 msgid ":ref:`f-strings`" msgstr "" -#: ../../library/stdtypes.rst:1568 +#: ../../library/stdtypes.rst:1573 msgid ":ref:`old-string-formatting`" msgstr "" -#: ../../library/stdtypes.rst:1568 +#: ../../library/stdtypes.rst:1573 msgid ":ref:`bytes-formatting`" msgstr "" -#: ../../library/stdtypes.rst:1570 +#: ../../library/stdtypes.rst:1575 msgid "Searching and Replacing" msgstr "" -#: ../../library/stdtypes.rst:1570 +#: ../../library/stdtypes.rst:1575 msgid ":meth:`str.find`" msgstr "" -#: ../../library/stdtypes.rst:1570 +#: ../../library/stdtypes.rst:1575 msgid ":meth:`str.rfind`" msgstr "" -#: ../../library/stdtypes.rst:1570 +#: ../../library/stdtypes.rst:1575 msgid ":meth:`bytes.find`" msgstr "" -#: ../../library/stdtypes.rst:1570 +#: ../../library/stdtypes.rst:1575 msgid ":meth:`bytes.rfind`" msgstr "" -#: ../../library/stdtypes.rst:1572 +#: ../../library/stdtypes.rst:1577 msgid ":meth:`str.index`" msgstr "" -#: ../../library/stdtypes.rst:1572 +#: ../../library/stdtypes.rst:1577 msgid ":meth:`str.rindex`" msgstr "" -#: ../../library/stdtypes.rst:1572 +#: ../../library/stdtypes.rst:1577 msgid ":meth:`bytes.index`" msgstr "" -#: ../../library/stdtypes.rst:1572 +#: ../../library/stdtypes.rst:1577 msgid ":meth:`bytes.rindex`" msgstr "" -#: ../../library/stdtypes.rst:1574 +#: ../../library/stdtypes.rst:1579 msgid ":meth:`str.startswith`" msgstr "" -#: ../../library/stdtypes.rst:1574 +#: ../../library/stdtypes.rst:1579 msgid ":meth:`bytes.startswith`" msgstr "" -#: ../../library/stdtypes.rst:1576 +#: ../../library/stdtypes.rst:1581 msgid ":meth:`str.endswith`" msgstr "" -#: ../../library/stdtypes.rst:1576 +#: ../../library/stdtypes.rst:1581 msgid ":meth:`bytes.endswith`" msgstr "" -#: ../../library/stdtypes.rst:1578 +#: ../../library/stdtypes.rst:1583 msgid ":meth:`str.count`" msgstr "" -#: ../../library/stdtypes.rst:1578 +#: ../../library/stdtypes.rst:1583 msgid ":meth:`bytes.count`" msgstr "" -#: ../../library/stdtypes.rst:1580 +#: ../../library/stdtypes.rst:1585 msgid ":meth:`str.replace`" msgstr "" -#: ../../library/stdtypes.rst:1580 +#: ../../library/stdtypes.rst:1585 msgid ":meth:`bytes.replace`" msgstr "" -#: ../../library/stdtypes.rst:1582 +#: ../../library/stdtypes.rst:1587 msgid "Splitting and Joining" msgstr "" -#: ../../library/stdtypes.rst:1582 +#: ../../library/stdtypes.rst:1587 msgid ":meth:`str.split`" msgstr "" -#: ../../library/stdtypes.rst:1582 +#: ../../library/stdtypes.rst:1587 msgid ":meth:`str.rsplit`" msgstr "" -#: ../../library/stdtypes.rst:1582 +#: ../../library/stdtypes.rst:1587 msgid ":meth:`bytes.split`" msgstr "" -#: ../../library/stdtypes.rst:1582 +#: ../../library/stdtypes.rst:1587 msgid ":meth:`bytes.rsplit`" msgstr "" -#: ../../library/stdtypes.rst:1584 +#: ../../library/stdtypes.rst:1589 msgid ":meth:`str.splitlines`" msgstr "" -#: ../../library/stdtypes.rst:1584 +#: ../../library/stdtypes.rst:1589 msgid ":meth:`bytes.splitlines`" msgstr "" -#: ../../library/stdtypes.rst:1586 +#: ../../library/stdtypes.rst:1591 msgid ":meth:`str.partition`" msgstr "" -#: ../../library/stdtypes.rst:1586 +#: ../../library/stdtypes.rst:1591 msgid ":meth:`bytes.partition`" msgstr "" -#: ../../library/stdtypes.rst:1588 +#: ../../library/stdtypes.rst:1593 msgid ":meth:`str.rpartition`" msgstr "" -#: ../../library/stdtypes.rst:1588 +#: ../../library/stdtypes.rst:1593 msgid ":meth:`bytes.rpartition`" msgstr "" -#: ../../library/stdtypes.rst:1590 +#: ../../library/stdtypes.rst:1595 msgid ":meth:`str.join`" msgstr "" -#: ../../library/stdtypes.rst:1590 +#: ../../library/stdtypes.rst:1595 msgid ":meth:`bytes.join`" msgstr "" -#: ../../library/stdtypes.rst:1592 +#: ../../library/stdtypes.rst:1597 msgid "String Classification" msgstr "" -#: ../../library/stdtypes.rst:1592 +#: ../../library/stdtypes.rst:1597 msgid ":meth:`str.isalpha`" msgstr "" -#: ../../library/stdtypes.rst:1592 +#: ../../library/stdtypes.rst:1597 msgid ":meth:`bytes.isalpha`" msgstr "" -#: ../../library/stdtypes.rst:1594 +#: ../../library/stdtypes.rst:1599 msgid ":meth:`str.isdecimal`" msgstr "" -#: ../../library/stdtypes.rst:1596 +#: ../../library/stdtypes.rst:1601 msgid ":meth:`str.isdigit`" msgstr "" -#: ../../library/stdtypes.rst:1596 +#: ../../library/stdtypes.rst:1601 msgid ":meth:`bytes.isdigit`" msgstr "" -#: ../../library/stdtypes.rst:1598 +#: ../../library/stdtypes.rst:1603 msgid ":meth:`str.isnumeric`" msgstr "" -#: ../../library/stdtypes.rst:1600 +#: ../../library/stdtypes.rst:1605 msgid ":meth:`str.isalnum`" msgstr "" -#: ../../library/stdtypes.rst:1600 +#: ../../library/stdtypes.rst:1605 msgid ":meth:`bytes.isalnum`" msgstr "" -#: ../../library/stdtypes.rst:1602 +#: ../../library/stdtypes.rst:1607 msgid ":meth:`str.isidentifier`" msgstr "" -#: ../../library/stdtypes.rst:1604 +#: ../../library/stdtypes.rst:1609 msgid ":meth:`str.islower`" msgstr "" -#: ../../library/stdtypes.rst:1604 +#: ../../library/stdtypes.rst:1609 msgid ":meth:`bytes.islower`" msgstr "" -#: ../../library/stdtypes.rst:1606 +#: ../../library/stdtypes.rst:1611 msgid ":meth:`str.isupper`" msgstr "" -#: ../../library/stdtypes.rst:1606 +#: ../../library/stdtypes.rst:1611 msgid ":meth:`bytes.isupper`" msgstr "" -#: ../../library/stdtypes.rst:1608 +#: ../../library/stdtypes.rst:1613 msgid ":meth:`str.istitle`" msgstr "" -#: ../../library/stdtypes.rst:1608 +#: ../../library/stdtypes.rst:1613 msgid ":meth:`bytes.istitle`" msgstr "" -#: ../../library/stdtypes.rst:1610 +#: ../../library/stdtypes.rst:1615 msgid ":meth:`str.isspace`" msgstr "" -#: ../../library/stdtypes.rst:1610 +#: ../../library/stdtypes.rst:1615 msgid ":meth:`bytes.isspace`" msgstr "" -#: ../../library/stdtypes.rst:1612 +#: ../../library/stdtypes.rst:1617 msgid ":meth:`str.isprintable`" msgstr "" -#: ../../library/stdtypes.rst:1614 +#: ../../library/stdtypes.rst:1619 msgid "Case Manipulation" msgstr "" -#: ../../library/stdtypes.rst:1614 +#: ../../library/stdtypes.rst:1619 msgid ":meth:`str.lower`" msgstr "" -#: ../../library/stdtypes.rst:1614 +#: ../../library/stdtypes.rst:1619 msgid ":meth:`bytes.lower`" msgstr "" -#: ../../library/stdtypes.rst:1616 +#: ../../library/stdtypes.rst:1621 msgid ":meth:`str.upper`" msgstr "" -#: ../../library/stdtypes.rst:1616 +#: ../../library/stdtypes.rst:1621 msgid ":meth:`bytes.upper`" msgstr "" -#: ../../library/stdtypes.rst:1618 +#: ../../library/stdtypes.rst:1623 msgid ":meth:`str.casefold`" msgstr "" -#: ../../library/stdtypes.rst:1620 +#: ../../library/stdtypes.rst:1625 msgid ":meth:`str.capitalize`" msgstr "" -#: ../../library/stdtypes.rst:1620 +#: ../../library/stdtypes.rst:1625 msgid ":meth:`bytes.capitalize`" msgstr "" -#: ../../library/stdtypes.rst:1622 +#: ../../library/stdtypes.rst:1627 msgid ":meth:`str.title`" msgstr "" -#: ../../library/stdtypes.rst:1622 +#: ../../library/stdtypes.rst:1627 msgid ":meth:`bytes.title`" msgstr "" -#: ../../library/stdtypes.rst:1624 +#: ../../library/stdtypes.rst:1629 msgid ":meth:`str.swapcase`" msgstr "" -#: ../../library/stdtypes.rst:1624 +#: ../../library/stdtypes.rst:1629 msgid ":meth:`bytes.swapcase`" msgstr "" -#: ../../library/stdtypes.rst:1626 +#: ../../library/stdtypes.rst:1631 msgid "Padding and Stripping" msgstr "" -#: ../../library/stdtypes.rst:1626 +#: ../../library/stdtypes.rst:1631 msgid ":meth:`str.ljust`" msgstr "" -#: ../../library/stdtypes.rst:1626 +#: ../../library/stdtypes.rst:1631 msgid ":meth:`str.rjust`" msgstr "" -#: ../../library/stdtypes.rst:1626 +#: ../../library/stdtypes.rst:1631 msgid ":meth:`bytes.ljust`" msgstr "" -#: ../../library/stdtypes.rst:1626 +#: ../../library/stdtypes.rst:1631 msgid ":meth:`bytes.rjust`" msgstr "" -#: ../../library/stdtypes.rst:1628 +#: ../../library/stdtypes.rst:1633 msgid ":meth:`str.center`" msgstr "" -#: ../../library/stdtypes.rst:1628 +#: ../../library/stdtypes.rst:1633 msgid ":meth:`bytes.center`" msgstr "" -#: ../../library/stdtypes.rst:1630 +#: ../../library/stdtypes.rst:1635 msgid ":meth:`str.expandtabs`" msgstr "" -#: ../../library/stdtypes.rst:1630 +#: ../../library/stdtypes.rst:1635 msgid ":meth:`bytes.expandtabs`" msgstr "" -#: ../../library/stdtypes.rst:1632 +#: ../../library/stdtypes.rst:1637 msgid ":meth:`str.strip`" msgstr "" -#: ../../library/stdtypes.rst:1632 +#: ../../library/stdtypes.rst:1637 msgid ":meth:`bytes.strip`" msgstr "" -#: ../../library/stdtypes.rst:1634 +#: ../../library/stdtypes.rst:1639 msgid ":meth:`str.lstrip`" msgstr "" -#: ../../library/stdtypes.rst:1634 +#: ../../library/stdtypes.rst:1639 msgid ":meth:`str.rstrip`" msgstr "" -#: ../../library/stdtypes.rst:1634 +#: ../../library/stdtypes.rst:1639 msgid ":meth:`bytes.lstrip`" msgstr "" -#: ../../library/stdtypes.rst:1634 +#: ../../library/stdtypes.rst:1639 msgid ":meth:`bytes.rstrip`" msgstr "" -#: ../../library/stdtypes.rst:1636 +#: ../../library/stdtypes.rst:1641 msgid "Translation and Encoding" msgstr "" -#: ../../library/stdtypes.rst:1636 +#: ../../library/stdtypes.rst:1641 msgid ":meth:`str.translate`" msgstr "" -#: ../../library/stdtypes.rst:1636 +#: ../../library/stdtypes.rst:1641 msgid ":meth:`bytes.translate`" msgstr "" -#: ../../library/stdtypes.rst:1638 +#: ../../library/stdtypes.rst:1643 msgid ":meth:`str.maketrans`" msgstr "" -#: ../../library/stdtypes.rst:1638 +#: ../../library/stdtypes.rst:1643 msgid ":meth:`bytes.maketrans`" msgstr "" -#: ../../library/stdtypes.rst:1640 +#: ../../library/stdtypes.rst:1645 msgid ":meth:`str.encode`" msgstr "" -#: ../../library/stdtypes.rst:1642 +#: ../../library/stdtypes.rst:1647 msgid ":meth:`bytes.decode`" msgstr "" -#: ../../library/stdtypes.rst:1648 +#: ../../library/stdtypes.rst:1653 msgid "Text Sequence Type --- :class:`str`" msgstr "" -#: ../../library/stdtypes.rst:1650 +#: ../../library/stdtypes.rst:1655 msgid "" "Textual data in Python is handled with :class:`str` objects, or :dfn:" "`strings`. Strings are immutable :ref:`sequences ` of Unicode code " "points. String literals are written in a variety of ways:" msgstr "" -#: ../../library/stdtypes.rst:1655 +#: ../../library/stdtypes.rst:1660 msgid "Single quotes: ``'allows embedded \"double\" quotes'``" msgstr "" -#: ../../library/stdtypes.rst:1656 +#: ../../library/stdtypes.rst:1661 msgid "Double quotes: ``\"allows embedded 'single' quotes\"``" msgstr "" -#: ../../library/stdtypes.rst:1657 +#: ../../library/stdtypes.rst:1662 msgid "" "Triple quoted: ``'''Three single quotes'''``, ``\"\"\"Three double " "quotes\"\"\"``" msgstr "" -#: ../../library/stdtypes.rst:1659 +#: ../../library/stdtypes.rst:1664 msgid "" "Triple quoted strings may span multiple lines - all associated whitespace " "will be included in the string literal." msgstr "" -#: ../../library/stdtypes.rst:1662 +#: ../../library/stdtypes.rst:1667 msgid "" "String literals that are part of a single expression and have only " "whitespace between them will be implicitly converted to a single string " "literal. That is, ``(\"spam \" \"eggs\") == \"spam eggs\"``." msgstr "" -#: ../../library/stdtypes.rst:1666 +#: ../../library/stdtypes.rst:1671 msgid "" "See :ref:`strings` for more about the various forms of string literal, " "including supported :ref:`escape sequences `, and the " "``r`` (\"raw\") prefix that disables most escape sequence processing." msgstr "" -#: ../../library/stdtypes.rst:1670 +#: ../../library/stdtypes.rst:1675 msgid "" "Strings may also be created from other objects using the :class:`str` " "constructor." msgstr "" -#: ../../library/stdtypes.rst:1673 +#: ../../library/stdtypes.rst:1678 msgid "" "Since there is no separate \"character\" type, indexing a string produces " "strings of length 1. That is, for a non-empty string *s*, ``s[0] == s[0:1]``." msgstr "" -#: ../../library/stdtypes.rst:1679 +#: ../../library/stdtypes.rst:1684 msgid "" "There is also no mutable string type, but :meth:`str.join` or :class:`io." "StringIO` can be used to efficiently construct strings from multiple " "fragments." msgstr "" -#: ../../library/stdtypes.rst:1683 +#: ../../library/stdtypes.rst:1688 msgid "" "For backwards compatibility with the Python 2 series, the ``u`` prefix is " "once again permitted on string literals. It has no effect on the meaning of " "string literals and cannot be combined with the ``r`` prefix." msgstr "" -#: ../../library/stdtypes.rst:1695 +#: ../../library/stdtypes.rst:1700 msgid "" "Return a :ref:`string ` version of *object*. If *object* is not " "provided, returns the empty string. Otherwise, the behavior of ``str()`` " "depends on whether *encoding* or *errors* is given, as follows." msgstr "" -#: ../../library/stdtypes.rst:1699 +#: ../../library/stdtypes.rst:1704 msgid "" "If neither *encoding* nor *errors* is given, ``str(object)`` returns :meth:" "`type(object).__str__(object) `, which is the \"informal\" " @@ -2666,7 +2682,7 @@ msgid "" "`repr(object) `." msgstr "" -#: ../../library/stdtypes.rst:1711 +#: ../../library/stdtypes.rst:1716 msgid "" "If at least one of *encoding* or *errors* is given, *object* should be a :" "term:`bytes-like object` (e.g. :class:`bytes` or :class:`bytearray`). In " @@ -2678,7 +2694,7 @@ msgid "" "buffer objects." msgstr "" -#: ../../library/stdtypes.rst:1720 +#: ../../library/stdtypes.rst:1725 msgid "" "Passing a :class:`bytes` object to :func:`str` without the *encoding* or " "*errors* arguments falls under the first case of returning the informal " @@ -2686,13 +2702,13 @@ msgid "" "Python). For example::" msgstr "" -#: ../../library/stdtypes.rst:1725 +#: ../../library/stdtypes.rst:1730 msgid "" ">>> str(b'Zoot!')\n" "\"b'Zoot!'\"" msgstr "" -#: ../../library/stdtypes.rst:1728 +#: ../../library/stdtypes.rst:1733 msgid "" "For more information on the ``str`` class and its methods, see :ref:" "`textseq` and the :ref:`string-methods` section below. To output formatted " @@ -2700,17 +2716,17 @@ msgid "" "addition, see the :ref:`stringservices` section." msgstr "" -#: ../../library/stdtypes.rst:1740 +#: ../../library/stdtypes.rst:1745 msgid "String Methods" msgstr "" -#: ../../library/stdtypes.rst:1745 +#: ../../library/stdtypes.rst:1750 msgid "" "Strings implement all of the :ref:`common ` sequence " "operations, along with the additional methods described below." msgstr "" -#: ../../library/stdtypes.rst:1748 +#: ../../library/stdtypes.rst:1753 msgid "" "Strings also support two styles of string formatting, one providing a large " "degree of flexibility and customization (see :meth:`str.format`, :ref:" @@ -2720,33 +2736,33 @@ msgid "" "handle (:ref:`old-string-formatting`)." msgstr "" -#: ../../library/stdtypes.rst:1755 +#: ../../library/stdtypes.rst:1760 msgid "" "The :ref:`textservices` section of the standard library covers a number of " "other modules that provide various text related utilities (including regular " "expression support in the :mod:`re` module)." msgstr "" -#: ../../library/stdtypes.rst:1761 +#: ../../library/stdtypes.rst:1766 msgid "" "Return a copy of the string with its first character capitalized and the " "rest lowercased." msgstr "" -#: ../../library/stdtypes.rst:1764 +#: ../../library/stdtypes.rst:1769 msgid "" "The first character is now put into titlecase rather than uppercase. This " "means that characters like digraphs will only have their first letter " "capitalized, instead of the full character." msgstr "" -#: ../../library/stdtypes.rst:1771 +#: ../../library/stdtypes.rst:1776 msgid "" "Return a casefolded copy of the string. Casefolded strings may be used for " "caseless matching." msgstr "" -#: ../../library/stdtypes.rst:1774 +#: ../../library/stdtypes.rst:1779 msgid "" "Casefolding is similar to lowercasing but more aggressive because it is " "intended to remove all case distinctions in a string. For example, the " @@ -2755,44 +2771,68 @@ msgid "" "`casefold` converts it to ``\"ss\"``." msgstr "" -#: ../../library/stdtypes.rst:1780 +#: ../../library/stdtypes.rst:1785 msgid "" "The casefolding algorithm is `described in section 3.13 'Default Case " "Folding' of the Unicode Standard `__." msgstr "" -#: ../../library/stdtypes.rst:1789 +#: ../../library/stdtypes.rst:1794 msgid "" "Return centered in a string of length *width*. Padding is done using the " "specified *fillchar* (default is an ASCII space). The original string is " -"returned if *width* is less than or equal to ``len(s)``." +"returned if *width* is less than or equal to ``len(s)``. For example::" +msgstr "" + +#: ../../library/stdtypes.rst:1798 +msgid "" +">>> 'Python'.center(10)\n" +"' Python '\n" +">>> 'Python'.center(10, '-')\n" +"'--Python--'\n" +">>> 'Python'.center(4)\n" +"'Python'" msgstr "" -#: ../../library/stdtypes.rst:1797 +#: ../../library/stdtypes.rst:1808 msgid "" "Return the number of non-overlapping occurrences of substring *sub* in the " "range [*start*, *end*]. Optional arguments *start* and *end* are " "interpreted as in slice notation." msgstr "" -#: ../../library/stdtypes.rst:1801 +#: ../../library/stdtypes.rst:1812 msgid "" "If *sub* is empty, returns the number of empty strings between characters " -"which is the length of the string plus one." +"which is the length of the string plus one. For example::" msgstr "" -#: ../../library/stdtypes.rst:1807 +#: ../../library/stdtypes.rst:1815 +msgid "" +">>> 'spam, spam, spam'.count('spam')\n" +"3\n" +">>> 'spam, spam, spam'.count('spam', 5)\n" +"2\n" +">>> 'spam, spam, spam'.count('spam', 5, 10)\n" +"1\n" +">>> 'spam, spam, spam'.count('eggs')\n" +"0\n" +">>> 'spam, spam, spam'.count('')\n" +"17" +msgstr "" + +#: ../../library/stdtypes.rst:1828 msgid "Return the string encoded to :class:`bytes`." msgstr "" -#: ../../library/stdtypes.rst:1809 ../../library/stdtypes.rst:3158 +#: ../../library/stdtypes.rst:1830 ../../library/stdtypes.rst:3202 msgid "" "*encoding* defaults to ``'utf-8'``; see :ref:`standard-encodings` for " "possible values." msgstr "" -#: ../../library/stdtypes.rst:1812 +#: ../../library/stdtypes.rst:1833 msgid "" "*errors* controls how encoding errors are handled. If ``'strict'`` (the " "default), a :exc:`UnicodeError` exception is raised. Other possible values " @@ -2801,32 +2841,58 @@ msgid "" "register_error`. See :ref:`error-handlers` for details." msgstr "" -#: ../../library/stdtypes.rst:1819 +#: ../../library/stdtypes.rst:1840 msgid "" "For performance reasons, the value of *errors* is not checked for validity " "unless an encoding error actually occurs, :ref:`devmode` is enabled or a :" -"ref:`debug build ` is used." +"ref:`debug build ` is used. For example::" msgstr "" -#: ../../library/stdtypes.rst:1824 ../../library/stdtypes.rst:3177 +#: ../../library/stdtypes.rst:1846 +msgid "" +">>> encoded_str_to_bytes = 'Python'.encode()\n" +">>> type(encoded_str_to_bytes)\n" +"\n" +">>> encoded_str_to_bytes\n" +"b'Python'" +msgstr "" + +#: ../../library/stdtypes.rst:1853 ../../library/stdtypes.rst:3221 msgid "Added support for keyword arguments." msgstr "" -#: ../../library/stdtypes.rst:1827 ../../library/stdtypes.rst:3180 +#: ../../library/stdtypes.rst:1856 ../../library/stdtypes.rst:3224 msgid "" "The value of the *errors* argument is now checked in :ref:`devmode` and in :" "ref:`debug mode `." msgstr "" -#: ../../library/stdtypes.rst:1834 +#: ../../library/stdtypes.rst:1863 msgid "" "Return ``True`` if the string ends with the specified *suffix*, otherwise " "return ``False``. *suffix* can also be a tuple of suffixes to look for. " "With optional *start*, test beginning at that position. With optional " -"*end*, stop comparing at that position." +"*end*, stop comparing at that position. Using *start* and *end* is " +"equivalent to ``str[start:end].endswith(suffix)``. For example::" msgstr "" -#: ../../library/stdtypes.rst:1842 +#: ../../library/stdtypes.rst:1869 +msgid "" +">>> 'Python'.endswith('on')\n" +"True\n" +">>> 'a tuple of suffixes'.endswith(('at', 'in'))\n" +"False\n" +">>> 'a tuple of suffixes'.endswith(('at', 'es'))\n" +"True\n" +">>> 'Python is amazing'.endswith('is', 0, 9)\n" +"True" +msgstr "" + +#: ../../library/stdtypes.rst:1878 +msgid "See also :meth:`startswith` and :meth:`removesuffix`." +msgstr "" + +#: ../../library/stdtypes.rst:1883 msgid "" "Return a copy of the string where all tab characters are replaced by one or " "more spaces, depending on the current column and the given tab size. Tab " @@ -2839,30 +2905,41 @@ msgid "" "(``\\n``) or return (``\\r``), it is copied and the current column is reset " "to zero. Any other character is copied unchanged and the current column is " "incremented by one regardless of how the character is represented when " -"printed." +"printed. For example::" msgstr "" -#: ../../library/stdtypes.rst:1863 +#: ../../library/stdtypes.rst:1896 +msgid "" +">>> '01\\t012\\t0123\\t01234'.expandtabs()\n" +"'01 012 0123 01234'\n" +">>> '01\\t012\\t0123\\t01234'.expandtabs(4)\n" +"'01 012 0123 01234'\n" +">>> print('01\\t012\\n0123\\t01234'.expandtabs(4))\n" +"01 012\n" +"0123 01234" +msgstr "" + +#: ../../library/stdtypes.rst:1907 msgid "" "Return the lowest index in the string where substring *sub* is found within " "the slice ``s[start:end]``. Optional arguments *start* and *end* are " "interpreted as in slice notation. Return ``-1`` if *sub* is not found." msgstr "" -#: ../../library/stdtypes.rst:1869 +#: ../../library/stdtypes.rst:1913 msgid "" "The :meth:`~str.find` method should be used only if you need to know the " "position of *sub*. To check if *sub* is a substring or not, use the :" "keyword:`in` operator::" msgstr "" -#: ../../library/stdtypes.rst:1873 +#: ../../library/stdtypes.rst:1917 msgid "" ">>> 'Py' in 'Python'\n" "True" msgstr "" -#: ../../library/stdtypes.rst:1879 +#: ../../library/stdtypes.rst:1923 msgid "" "Perform a string formatting operation. The string on which this method is " "called can contain literal text or replacement fields delimited by braces " @@ -2872,13 +2949,13 @@ msgid "" "the corresponding argument." msgstr "" -#: ../../library/stdtypes.rst:1889 +#: ../../library/stdtypes.rst:1933 msgid "" "See :ref:`formatstrings` for a description of the various formatting options " "that can be specified in format strings." msgstr "" -#: ../../library/stdtypes.rst:1893 +#: ../../library/stdtypes.rst:1937 msgid "" "When formatting a number (:class:`int`, :class:`float`, :class:`complex`, :" "class:`decimal.Decimal` and subclasses) with the ``n`` type (ex: ``'{:n}'." @@ -2889,26 +2966,26 @@ msgid "" "This temporary change affects other threads." msgstr "" -#: ../../library/stdtypes.rst:1902 +#: ../../library/stdtypes.rst:1946 msgid "" "When formatting a number with the ``n`` type, the function sets temporarily " "the ``LC_CTYPE`` locale to the ``LC_NUMERIC`` locale in some cases." msgstr "" -#: ../../library/stdtypes.rst:1910 +#: ../../library/stdtypes.rst:1954 msgid "" "Similar to ``str.format(**mapping)``, except that ``mapping`` is used " "directly and not copied to a :class:`dict`. This is useful if for example " "``mapping`` is a dict subclass:" msgstr "" -#: ../../library/stdtypes.rst:1926 +#: ../../library/stdtypes.rst:1970 msgid "" "Like :meth:`~str.find`, but raise :exc:`ValueError` when the substring is " "not found." msgstr "" -#: ../../library/stdtypes.rst:1932 +#: ../../library/stdtypes.rst:1976 msgid "" "Return ``True`` if all characters in the string are alphanumeric and there " "is at least one character, ``False`` otherwise. A character ``c`` is " @@ -2916,7 +2993,7 @@ msgid "" "isdecimal()``, ``c.isdigit()``, or ``c.isnumeric()``." msgstr "" -#: ../../library/stdtypes.rst:1940 +#: ../../library/stdtypes.rst:1984 msgid "" "Return ``True`` if all characters in the string are alphabetic and there is " "at least one character, ``False`` otherwise. Alphabetic characters are " @@ -2928,14 +3005,14 @@ msgid "" "spec/chapter-4/#G91002>`_." msgstr "" -#: ../../library/stdtypes.rst:1951 +#: ../../library/stdtypes.rst:1995 msgid "" "Return ``True`` if the string is empty or all characters in the string are " "ASCII, ``False`` otherwise. ASCII characters have code points in the range " "U+0000-U+007F." msgstr "" -#: ../../library/stdtypes.rst:1960 +#: ../../library/stdtypes.rst:2004 msgid "" "Return ``True`` if all characters in the string are decimal characters and " "there is at least one character, ``False`` otherwise. Decimal characters are " @@ -2944,7 +3021,7 @@ msgid "" "General Category \"Nd\"." msgstr "" -#: ../../library/stdtypes.rst:1970 +#: ../../library/stdtypes.rst:2014 msgid "" "Return ``True`` if all characters in the string are digits and there is at " "least one character, ``False`` otherwise. Digits include decimal characters " @@ -2954,23 +3031,23 @@ msgid "" "property value Numeric_Type=Digit or Numeric_Type=Decimal." msgstr "" -#: ../../library/stdtypes.rst:1980 +#: ../../library/stdtypes.rst:2024 msgid "" "Return ``True`` if the string is a valid identifier according to the " "language definition, section :ref:`identifiers`." msgstr "" -#: ../../library/stdtypes.rst:1983 +#: ../../library/stdtypes.rst:2027 msgid "" ":func:`keyword.iskeyword` can be used to test whether string ``s`` is a " "reserved identifier, such as :keyword:`def` and :keyword:`class`." msgstr "" -#: ../../library/stdtypes.rst:1986 +#: ../../library/stdtypes.rst:2030 msgid "Example: ::" msgstr "" -#: ../../library/stdtypes.rst:1989 +#: ../../library/stdtypes.rst:2033 msgid "" ">>> from keyword import iskeyword\n" "\n" @@ -2980,13 +3057,13 @@ msgid "" "(True, True)" msgstr "" -#: ../../library/stdtypes.rst:1999 +#: ../../library/stdtypes.rst:2043 msgid "" "Return ``True`` if all cased characters [4]_ in the string are lowercase and " "there is at least one cased character, ``False`` otherwise." msgstr "" -#: ../../library/stdtypes.rst:2005 +#: ../../library/stdtypes.rst:2049 msgid "" "Return ``True`` if all characters in the string are numeric characters, and " "there is at least one character, ``False`` otherwise. Numeric characters " @@ -2996,13 +3073,13 @@ msgid "" "Numeric_Type=Decimal or Numeric_Type=Numeric." msgstr "" -#: ../../library/stdtypes.rst:2015 +#: ../../library/stdtypes.rst:2059 msgid "" "Return ``True`` if all characters in the string are printable, ``False`` if " "it contains at least one non-printable character." msgstr "" -#: ../../library/stdtypes.rst:2018 +#: ../../library/stdtypes.rst:2062 msgid "" "Here \"printable\" means the character is suitable for :func:`repr` to use " "in its output; \"non-printable\" means that :func:`repr` on built-in types " @@ -3010,7 +3087,7 @@ msgid "" "written to :data:`sys.stdout` or :data:`sys.stderr`." msgstr "" -#: ../../library/stdtypes.rst:2023 +#: ../../library/stdtypes.rst:2067 msgid "" "The printable characters are those which in the Unicode character database " "(see :mod:`unicodedata`) have a general category in group Letter, Mark, " @@ -3019,20 +3096,20 @@ msgid "" "C), except the ASCII space." msgstr "" -#: ../../library/stdtypes.rst:2032 +#: ../../library/stdtypes.rst:2076 msgid "" "Return ``True`` if there are only whitespace characters in the string and " "there is at least one character, ``False`` otherwise." msgstr "" -#: ../../library/stdtypes.rst:2035 +#: ../../library/stdtypes.rst:2079 msgid "" "A character is *whitespace* if in the Unicode character database (see :mod:" "`unicodedata`), either its general category is ``Zs`` (\"Separator, " "space\"), or its bidirectional class is one of ``WS``, ``B``, or ``S``." msgstr "" -#: ../../library/stdtypes.rst:2043 +#: ../../library/stdtypes.rst:2087 msgid "" "Return ``True`` if the string is a titlecased string and there is at least " "one character, for example uppercase characters may only follow uncased " @@ -3040,13 +3117,13 @@ msgid "" "otherwise." msgstr "" -#: ../../library/stdtypes.rst:2050 +#: ../../library/stdtypes.rst:2094 msgid "" "Return ``True`` if all cased characters [4]_ in the string are uppercase and " "there is at least one cased character, ``False`` otherwise." msgstr "" -#: ../../library/stdtypes.rst:2068 +#: ../../library/stdtypes.rst:2112 msgid "" "Return a string which is the concatenation of the strings in *iterable*. A :" "exc:`TypeError` will be raised if there are any non-string values in " @@ -3054,27 +3131,27 @@ msgid "" "elements is the string providing this method." msgstr "" -#: ../../library/stdtypes.rst:2076 +#: ../../library/stdtypes.rst:2120 msgid "" "Return the string left justified in a string of length *width*. Padding is " "done using the specified *fillchar* (default is an ASCII space). The " "original string is returned if *width* is less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:2083 +#: ../../library/stdtypes.rst:2127 msgid "" "Return a copy of the string with all the cased characters [4]_ converted to " "lowercase." msgstr "" -#: ../../library/stdtypes.rst:2086 +#: ../../library/stdtypes.rst:2130 msgid "" "The lowercasing algorithm used is `described in section 3.13 'Default Case " "Folding' of the Unicode Standard `__." msgstr "" -#: ../../library/stdtypes.rst:2093 +#: ../../library/stdtypes.rst:2137 msgid "" "Return a copy of the string with leading characters removed. The *chars* " "argument is a string specifying the set of characters to be removed. If " @@ -3083,7 +3160,7 @@ msgid "" "are stripped::" msgstr "" -#: ../../library/stdtypes.rst:2098 +#: ../../library/stdtypes.rst:2142 msgid "" ">>> ' spacious '.lstrip()\n" "'spacious '\n" @@ -3091,13 +3168,13 @@ msgid "" "'example.com'" msgstr "" -#: ../../library/stdtypes.rst:2103 +#: ../../library/stdtypes.rst:2147 msgid "" "See :meth:`str.removeprefix` for a method that will remove a single prefix " "string rather than all of a set of characters. For example::" msgstr "" -#: ../../library/stdtypes.rst:2106 +#: ../../library/stdtypes.rst:2150 msgid "" ">>> 'Arthur: three!'.lstrip('Arthur: ')\n" "'ee!'\n" @@ -3105,13 +3182,13 @@ msgid "" "'three!'" msgstr "" -#: ../../library/stdtypes.rst:2114 +#: ../../library/stdtypes.rst:2158 msgid "" "This static method returns a translation table usable for :meth:`str." "translate`." msgstr "" -#: ../../library/stdtypes.rst:2116 +#: ../../library/stdtypes.rst:2160 msgid "" "If there is only one argument, it must be a dictionary mapping Unicode " "ordinals (integers) or characters (strings of length 1) to Unicode ordinals, " @@ -3119,7 +3196,7 @@ msgid "" "converted to ordinals." msgstr "" -#: ../../library/stdtypes.rst:2121 +#: ../../library/stdtypes.rst:2165 msgid "" "If there are two arguments, they must be strings of equal length, and in the " "resulting dictionary, each character in x will be mapped to the character at " @@ -3127,7 +3204,7 @@ msgid "" "whose characters will be mapped to ``None`` in the result." msgstr "" -#: ../../library/stdtypes.rst:2129 +#: ../../library/stdtypes.rst:2173 msgid "" "Split the string at the first occurrence of *sep*, and return a 3-tuple " "containing the part before the separator, the separator itself, and the part " @@ -3135,13 +3212,13 @@ msgid "" "containing the string itself, followed by two empty strings." msgstr "" -#: ../../library/stdtypes.rst:2137 +#: ../../library/stdtypes.rst:2181 msgid "" "If the string starts with the *prefix* string, return " "``string[len(prefix):]``. Otherwise, return a copy of the original string::" msgstr "" -#: ../../library/stdtypes.rst:2141 +#: ../../library/stdtypes.rst:2185 msgid "" ">>> 'TestHook'.removeprefix('Test')\n" "'Hook'\n" @@ -3149,14 +3226,14 @@ msgid "" "'BaseTestCase'" msgstr "" -#: ../../library/stdtypes.rst:2151 +#: ../../library/stdtypes.rst:2195 msgid "" "If the string ends with the *suffix* string and that *suffix* is not empty, " "return ``string[:-len(suffix)]``. Otherwise, return a copy of the original " "string::" msgstr "" -#: ../../library/stdtypes.rst:2155 +#: ../../library/stdtypes.rst:2199 msgid "" ">>> 'MiscTests'.removesuffix('Tests')\n" "'Misc'\n" @@ -3164,7 +3241,7 @@ msgid "" "'TmpDirMixin'" msgstr "" -#: ../../library/stdtypes.rst:2165 +#: ../../library/stdtypes.rst:2209 msgid "" "Return a copy of the string with all occurrences of substring *old* replaced " "by *new*. If *count* is given, only the first *count* occurrences are " @@ -3172,31 +3249,31 @@ msgid "" "replaced." msgstr "" -#: ../../library/stdtypes.rst:2169 +#: ../../library/stdtypes.rst:2213 msgid "*count* is now supported as a keyword argument." msgstr "" -#: ../../library/stdtypes.rst:2175 +#: ../../library/stdtypes.rst:2219 msgid "" "Return the highest index in the string where substring *sub* is found, such " "that *sub* is contained within ``s[start:end]``. Optional arguments *start* " "and *end* are interpreted as in slice notation. Return ``-1`` on failure." msgstr "" -#: ../../library/stdtypes.rst:2182 +#: ../../library/stdtypes.rst:2226 msgid "" "Like :meth:`rfind` but raises :exc:`ValueError` when the substring *sub* is " "not found." msgstr "" -#: ../../library/stdtypes.rst:2188 +#: ../../library/stdtypes.rst:2232 msgid "" "Return the string right justified in a string of length *width*. Padding is " "done using the specified *fillchar* (default is an ASCII space). The " "original string is returned if *width* is less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:2195 +#: ../../library/stdtypes.rst:2239 msgid "" "Split the string at the last occurrence of *sep*, and return a 3-tuple " "containing the part before the separator, the separator itself, and the part " @@ -3204,7 +3281,7 @@ msgid "" "containing two empty strings, followed by the string itself." msgstr "" -#: ../../library/stdtypes.rst:2203 +#: ../../library/stdtypes.rst:2247 msgid "" "Return a list of the words in the string, using *sep* as the delimiter " "string. If *maxsplit* is given, at most *maxsplit* splits are done, the " @@ -3213,7 +3290,7 @@ msgid "" "behaves like :meth:`split` which is described in detail below." msgstr "" -#: ../../library/stdtypes.rst:2212 +#: ../../library/stdtypes.rst:2256 msgid "" "Return a copy of the string with trailing characters removed. The *chars* " "argument is a string specifying the set of characters to be removed. If " @@ -3222,7 +3299,7 @@ msgid "" "are stripped::" msgstr "" -#: ../../library/stdtypes.rst:2217 +#: ../../library/stdtypes.rst:2261 msgid "" ">>> ' spacious '.rstrip()\n" "' spacious'\n" @@ -3230,13 +3307,13 @@ msgid "" "'mississ'" msgstr "" -#: ../../library/stdtypes.rst:2222 +#: ../../library/stdtypes.rst:2266 msgid "" "See :meth:`str.removesuffix` for a method that will remove a single suffix " "string rather than all of a set of characters. For example::" msgstr "" -#: ../../library/stdtypes.rst:2225 +#: ../../library/stdtypes.rst:2269 msgid "" ">>> 'Monty Python'.rstrip(' Python')\n" "'M'\n" @@ -3244,7 +3321,7 @@ msgid "" "'Monty'" msgstr "" -#: ../../library/stdtypes.rst:2232 +#: ../../library/stdtypes.rst:2276 msgid "" "Return a list of the words in the string, using *sep* as the delimiter " "string. If *maxsplit* is given, at most *maxsplit* splits are done (thus, " @@ -3253,7 +3330,7 @@ msgid "" "possible splits are made)." msgstr "" -#: ../../library/stdtypes.rst:2238 +#: ../../library/stdtypes.rst:2282 msgid "" "If *sep* is given, consecutive delimiters are not grouped together and are " "deemed to delimit empty strings (for example, ``'1,,2'.split(',')`` returns " @@ -3263,20 +3340,20 @@ msgid "" "``['']``." msgstr "" -#: ../../library/stdtypes.rst:2245 ../../library/stdtypes.rst:2263 -#: ../../library/stdtypes.rst:2275 ../../library/stdtypes.rst:2327 -#: ../../library/stdtypes.rst:2395 ../../library/stdtypes.rst:2463 -#: ../../library/stdtypes.rst:3495 ../../library/stdtypes.rst:3513 -#: ../../library/stdtypes.rst:3604 ../../library/stdtypes.rst:3620 -#: ../../library/stdtypes.rst:3645 ../../library/stdtypes.rst:3659 -#: ../../library/stdtypes.rst:3687 ../../library/stdtypes.rst:3701 -#: ../../library/stdtypes.rst:3719 ../../library/stdtypes.rst:3746 -#: ../../library/stdtypes.rst:3769 ../../library/stdtypes.rst:3796 -#: ../../library/stdtypes.rst:3838 ../../library/stdtypes.rst:3862 +#: ../../library/stdtypes.rst:2289 ../../library/stdtypes.rst:2307 +#: ../../library/stdtypes.rst:2319 ../../library/stdtypes.rst:2371 +#: ../../library/stdtypes.rst:2439 ../../library/stdtypes.rst:2507 +#: ../../library/stdtypes.rst:3539 ../../library/stdtypes.rst:3557 +#: ../../library/stdtypes.rst:3648 ../../library/stdtypes.rst:3664 +#: ../../library/stdtypes.rst:3689 ../../library/stdtypes.rst:3703 +#: ../../library/stdtypes.rst:3731 ../../library/stdtypes.rst:3745 +#: ../../library/stdtypes.rst:3763 ../../library/stdtypes.rst:3790 +#: ../../library/stdtypes.rst:3813 ../../library/stdtypes.rst:3840 +#: ../../library/stdtypes.rst:3882 ../../library/stdtypes.rst:3906 msgid "For example::" msgstr "" -#: ../../library/stdtypes.rst:2247 +#: ../../library/stdtypes.rst:2291 msgid "" ">>> '1,2,3'.split(',')\n" "['1', '2', '3']\n" @@ -3288,7 +3365,7 @@ msgid "" "['1', '2', '3<4']" msgstr "" -#: ../../library/stdtypes.rst:2256 +#: ../../library/stdtypes.rst:2300 msgid "" "If *sep* is not specified or is ``None``, a different splitting algorithm is " "applied: runs of consecutive whitespace are regarded as a single separator, " @@ -3298,7 +3375,7 @@ msgid "" "returns ``[]``." msgstr "" -#: ../../library/stdtypes.rst:2265 +#: ../../library/stdtypes.rst:2309 msgid "" ">>> '1 2 3'.split()\n" "['1', '2', '3']\n" @@ -3308,13 +3385,13 @@ msgid "" "['1', '2', '3']" msgstr "" -#: ../../library/stdtypes.rst:2272 +#: ../../library/stdtypes.rst:2316 msgid "" "If *sep* is not specified or is ``None`` and *maxsplit* is ``0``, only " "leading runs of consecutive whitespace are considered." msgstr "" -#: ../../library/stdtypes.rst:2277 +#: ../../library/stdtypes.rst:2321 msgid "" ">>> \"\".split(None, 0)\n" "[]\n" @@ -3324,120 +3401,120 @@ msgid "" "['foo ']" msgstr "" -#: ../../library/stdtypes.rst:2290 +#: ../../library/stdtypes.rst:2334 msgid "" "Return a list of the lines in the string, breaking at line boundaries. Line " "breaks are not included in the resulting list unless *keepends* is given and " "true." msgstr "" -#: ../../library/stdtypes.rst:2294 +#: ../../library/stdtypes.rst:2338 msgid "" "This method splits on the following line boundaries. In particular, the " "boundaries are a superset of :term:`universal newlines`." msgstr "" -#: ../../library/stdtypes.rst:2298 +#: ../../library/stdtypes.rst:2342 msgid "Representation" msgstr "" -#: ../../library/stdtypes.rst:2298 +#: ../../library/stdtypes.rst:2342 msgid "Description" msgstr "" -#: ../../library/stdtypes.rst:2300 +#: ../../library/stdtypes.rst:2344 msgid "``\\n``" msgstr "" -#: ../../library/stdtypes.rst:2300 +#: ../../library/stdtypes.rst:2344 msgid "Line Feed" msgstr "" -#: ../../library/stdtypes.rst:2302 +#: ../../library/stdtypes.rst:2346 msgid "``\\r``" msgstr "" -#: ../../library/stdtypes.rst:2302 +#: ../../library/stdtypes.rst:2346 msgid "Carriage Return" msgstr "" -#: ../../library/stdtypes.rst:2304 +#: ../../library/stdtypes.rst:2348 msgid "``\\r\\n``" msgstr "" -#: ../../library/stdtypes.rst:2304 +#: ../../library/stdtypes.rst:2348 msgid "Carriage Return + Line Feed" msgstr "" -#: ../../library/stdtypes.rst:2306 +#: ../../library/stdtypes.rst:2350 msgid "``\\v`` or ``\\x0b``" msgstr "" -#: ../../library/stdtypes.rst:2306 +#: ../../library/stdtypes.rst:2350 msgid "Line Tabulation" msgstr "" -#: ../../library/stdtypes.rst:2308 +#: ../../library/stdtypes.rst:2352 msgid "``\\f`` or ``\\x0c``" msgstr "" -#: ../../library/stdtypes.rst:2308 +#: ../../library/stdtypes.rst:2352 msgid "Form Feed" msgstr "" -#: ../../library/stdtypes.rst:2310 +#: ../../library/stdtypes.rst:2354 msgid "``\\x1c``" msgstr "" -#: ../../library/stdtypes.rst:2310 +#: ../../library/stdtypes.rst:2354 msgid "File Separator" msgstr "" -#: ../../library/stdtypes.rst:2312 +#: ../../library/stdtypes.rst:2356 msgid "``\\x1d``" msgstr "" -#: ../../library/stdtypes.rst:2312 +#: ../../library/stdtypes.rst:2356 msgid "Group Separator" msgstr "" -#: ../../library/stdtypes.rst:2314 +#: ../../library/stdtypes.rst:2358 msgid "``\\x1e``" msgstr "" -#: ../../library/stdtypes.rst:2314 +#: ../../library/stdtypes.rst:2358 msgid "Record Separator" msgstr "" -#: ../../library/stdtypes.rst:2316 +#: ../../library/stdtypes.rst:2360 msgid "``\\x85``" msgstr "" -#: ../../library/stdtypes.rst:2316 +#: ../../library/stdtypes.rst:2360 msgid "Next Line (C1 Control Code)" msgstr "" -#: ../../library/stdtypes.rst:2318 +#: ../../library/stdtypes.rst:2362 msgid "``\\u2028``" msgstr "" -#: ../../library/stdtypes.rst:2318 +#: ../../library/stdtypes.rst:2362 msgid "Line Separator" msgstr "" -#: ../../library/stdtypes.rst:2320 +#: ../../library/stdtypes.rst:2364 msgid "``\\u2029``" msgstr "" -#: ../../library/stdtypes.rst:2320 +#: ../../library/stdtypes.rst:2364 msgid "Paragraph Separator" msgstr "" -#: ../../library/stdtypes.rst:2325 +#: ../../library/stdtypes.rst:2369 msgid "``\\v`` and ``\\f`` added to list of line boundaries." msgstr "" -#: ../../library/stdtypes.rst:2329 +#: ../../library/stdtypes.rst:2373 msgid "" ">>> 'ab c\\n\\nde fg\\rkl\\r\\n'.splitlines()\n" "['ab c', '', 'de fg', 'kl']\n" @@ -3445,14 +3522,14 @@ msgid "" "['ab c\\n', '\\n', 'de fg\\r', 'kl\\r\\n']" msgstr "" -#: ../../library/stdtypes.rst:2334 +#: ../../library/stdtypes.rst:2378 msgid "" "Unlike :meth:`~str.split` when a delimiter string *sep* is given, this " "method returns an empty list for the empty string, and a terminal line break " "does not result in an extra line::" msgstr "" -#: ../../library/stdtypes.rst:2338 +#: ../../library/stdtypes.rst:2382 msgid "" ">>> \"\".splitlines()\n" "[]\n" @@ -3460,11 +3537,11 @@ msgid "" "['One line']" msgstr "" -#: ../../library/stdtypes.rst:2343 +#: ../../library/stdtypes.rst:2387 msgid "For comparison, ``split('\\n')`` gives::" msgstr "" -#: ../../library/stdtypes.rst:2345 +#: ../../library/stdtypes.rst:2389 msgid "" ">>> ''.split('\\n')\n" "['']\n" @@ -3472,7 +3549,7 @@ msgid "" "['Two lines', '']" msgstr "" -#: ../../library/stdtypes.rst:2353 +#: ../../library/stdtypes.rst:2397 msgid "" "Return ``True`` if string starts with the *prefix*, otherwise return " "``False``. *prefix* can also be a tuple of prefixes to look for. With " @@ -3480,7 +3557,7 @@ msgid "" "*end*, stop comparing string at that position." msgstr "" -#: ../../library/stdtypes.rst:2361 +#: ../../library/stdtypes.rst:2405 msgid "" "Return a copy of the string with the leading and trailing characters " "removed. The *chars* argument is a string specifying the set of characters " @@ -3489,7 +3566,7 @@ msgid "" "all combinations of its values are stripped::" msgstr "" -#: ../../library/stdtypes.rst:2367 +#: ../../library/stdtypes.rst:2411 msgid "" ">>> ' spacious '.strip()\n" "'spacious'\n" @@ -3497,7 +3574,7 @@ msgid "" "'example'" msgstr "" -#: ../../library/stdtypes.rst:2372 +#: ../../library/stdtypes.rst:2416 msgid "" "The outermost leading and trailing *chars* argument values are stripped from " "the string. Characters are removed from the leading end until reaching a " @@ -3505,33 +3582,33 @@ msgid "" "A similar action takes place on the trailing end. For example::" msgstr "" -#: ../../library/stdtypes.rst:2378 +#: ../../library/stdtypes.rst:2422 msgid "" ">>> comment_string = '#....... Section 3.2.1 Issue #32 .......'\n" ">>> comment_string.strip('.#! ')\n" "'Section 3.2.1 Issue #32'" msgstr "" -#: ../../library/stdtypes.rst:2385 +#: ../../library/stdtypes.rst:2429 msgid "" "Return a copy of the string with uppercase characters converted to lowercase " "and vice versa. Note that it is not necessarily true that ``s.swapcase()." "swapcase() == s``." msgstr "" -#: ../../library/stdtypes.rst:2392 +#: ../../library/stdtypes.rst:2436 msgid "" "Return a titlecased version of the string where words start with an " "uppercase character and the remaining characters are lowercase." msgstr "" -#: ../../library/stdtypes.rst:2397 +#: ../../library/stdtypes.rst:2441 msgid "" ">>> 'Hello world'.title()\n" "'Hello World'" msgstr "" -#: ../../library/stdtypes.rst:2400 ../../library/stdtypes.rst:3806 +#: ../../library/stdtypes.rst:2444 ../../library/stdtypes.rst:3850 msgid "" "The algorithm uses a simple language-independent definition of a word as " "groups of consecutive letters. The definition works in many contexts but it " @@ -3539,25 +3616,25 @@ msgid "" "which may not be the desired result::" msgstr "" -#: ../../library/stdtypes.rst:2405 +#: ../../library/stdtypes.rst:2449 msgid "" ">>> \"they're bill's friends from the UK\".title()\n" "\"They'Re Bill'S Friends From The Uk\"" msgstr "" -#: ../../library/stdtypes.rst:2408 +#: ../../library/stdtypes.rst:2452 msgid "" "The :func:`string.capwords` function does not have this problem, as it " "splits words on spaces only." msgstr "" -#: ../../library/stdtypes.rst:2411 +#: ../../library/stdtypes.rst:2455 msgid "" "Alternatively, a workaround for apostrophes can be constructed using regular " "expressions::" msgstr "" -#: ../../library/stdtypes.rst:2414 +#: ../../library/stdtypes.rst:2458 msgid "" ">>> import re\n" ">>> def titlecase(s):\n" @@ -3569,7 +3646,7 @@ msgid "" "\"They're Bill's Friends.\"" msgstr "" -#: ../../library/stdtypes.rst:2426 +#: ../../library/stdtypes.rst:2470 msgid "" "Return a copy of the string in which each character has been mapped through " "the given translation table. The table must be an object that implements " @@ -3581,19 +3658,19 @@ msgid "" "exception, to map the character to itself." msgstr "" -#: ../../library/stdtypes.rst:2435 +#: ../../library/stdtypes.rst:2479 msgid "" "You can use :meth:`str.maketrans` to create a translation map from character-" "to-character mappings in different formats." msgstr "" -#: ../../library/stdtypes.rst:2438 +#: ../../library/stdtypes.rst:2482 msgid "" "See also the :mod:`codecs` module for a more flexible approach to custom " "character mappings." msgstr "" -#: ../../library/stdtypes.rst:2444 +#: ../../library/stdtypes.rst:2488 msgid "" "Return a copy of the string with all the cased characters [4]_ converted to " "uppercase. Note that ``s.upper().isupper()`` might be ``False`` if ``s`` " @@ -3602,14 +3679,14 @@ msgid "" "titlecase)." msgstr "" -#: ../../library/stdtypes.rst:2450 +#: ../../library/stdtypes.rst:2494 msgid "" "The uppercasing algorithm used is `described in section 3.13 'Default Case " "Folding' of the Unicode Standard `__." msgstr "" -#: ../../library/stdtypes.rst:2457 +#: ../../library/stdtypes.rst:2501 msgid "" "Return a copy of the string left filled with ASCII ``'0'`` digits to make a " "string of length *width*. A leading sign prefix (``'+'``/``'-'``) is handled " @@ -3617,7 +3694,7 @@ msgid "" "original string is returned if *width* is less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:2465 +#: ../../library/stdtypes.rst:2509 msgid "" ">>> \"42\".zfill(5)\n" "'00042'\n" @@ -3625,27 +3702,27 @@ msgid "" "'-0042'" msgstr "" -#: ../../library/stdtypes.rst:2486 +#: ../../library/stdtypes.rst:2530 msgid "Formatted String Literals (f-strings)" msgstr "" -#: ../../library/stdtypes.rst:2489 +#: ../../library/stdtypes.rst:2533 msgid "" "The :keyword:`await` and :keyword:`async for` can be used in expressions " "within f-strings." msgstr "" -#: ../../library/stdtypes.rst:2492 +#: ../../library/stdtypes.rst:2536 msgid "Added the debugging operator (``=``)" msgstr "" -#: ../../library/stdtypes.rst:2494 +#: ../../library/stdtypes.rst:2538 msgid "" "Many restrictions on expressions within f-strings have been removed. " "Notably, nested strings, comments, and backslashes are now permitted." msgstr "" -#: ../../library/stdtypes.rst:2498 +#: ../../library/stdtypes.rst:2542 msgid "" "An :dfn:`f-string` (formally a :dfn:`formatted string literal`) is a string " "literal that is prefixed with ``f`` or ``F``. This type of string literal " @@ -3655,7 +3732,7 @@ msgid "" "into regular :class:`str` objects. For example:" msgstr "" -#: ../../library/stdtypes.rst:2506 +#: ../../library/stdtypes.rst:2550 msgid "" ">>> who = 'nobody'\n" ">>> nationality = 'Spanish'\n" @@ -3663,104 +3740,104 @@ msgid "" "'Nobody expects the Spanish Inquisition!'" msgstr "" -#: ../../library/stdtypes.rst:2513 +#: ../../library/stdtypes.rst:2557 msgid "It is also possible to use a multi line f-string:" msgstr "" -#: ../../library/stdtypes.rst:2515 +#: ../../library/stdtypes.rst:2559 msgid "" ">>> f'''This is a string\n" "... on two lines'''\n" "'This is a string\\non two lines'" msgstr "" -#: ../../library/stdtypes.rst:2521 +#: ../../library/stdtypes.rst:2565 msgid "" "A single opening curly bracket, ``'{'``, marks a *replacement field* that " "can contain any Python expression:" msgstr "" -#: ../../library/stdtypes.rst:2524 +#: ../../library/stdtypes.rst:2568 msgid "" ">>> nationality = 'Spanish'\n" ">>> f'The {nationality} Inquisition!'\n" "'The Spanish Inquisition!'" msgstr "" -#: ../../library/stdtypes.rst:2530 +#: ../../library/stdtypes.rst:2574 msgid "To include a literal ``{`` or ``}``, use a double bracket:" msgstr "" -#: ../../library/stdtypes.rst:2532 +#: ../../library/stdtypes.rst:2576 msgid "" ">>> x = 42\n" ">>> f'{{x}} is {x}'\n" "'{x} is 42'" msgstr "" -#: ../../library/stdtypes.rst:2538 +#: ../../library/stdtypes.rst:2582 msgid "" "Functions can also be used, and :ref:`format specifiers `:" msgstr "" -#: ../../library/stdtypes.rst:2540 +#: ../../library/stdtypes.rst:2584 msgid "" ">>> from math import sqrt\n" ">>> f'√2 \\N{ALMOST EQUAL TO} {sqrt(2):.5f}'\n" "'√2 ≈ 1.41421'" msgstr "" -#: ../../library/stdtypes.rst:2546 +#: ../../library/stdtypes.rst:2590 msgid "Any non-string expression is converted using :func:`str`, by default:" msgstr "" -#: ../../library/stdtypes.rst:2548 +#: ../../library/stdtypes.rst:2592 msgid "" ">>> from fractions import Fraction\n" ">>> f'{Fraction(1, 3)}'\n" "'1/3'" msgstr "" -#: ../../library/stdtypes.rst:2554 +#: ../../library/stdtypes.rst:2598 msgid "" "To use an explicit conversion, use the ``!`` (exclamation mark) operator, " "followed by any of the valid formats, which are:" msgstr "" -#: ../../library/stdtypes.rst:2558 ../../library/stdtypes.rst:2726 -#: ../../library/stdtypes.rst:3985 +#: ../../library/stdtypes.rst:2602 ../../library/stdtypes.rst:2770 +#: ../../library/stdtypes.rst:4029 msgid "Conversion" msgstr "" -#: ../../library/stdtypes.rst:2560 +#: ../../library/stdtypes.rst:2604 msgid "``!a``" msgstr "" -#: ../../library/stdtypes.rst:2560 +#: ../../library/stdtypes.rst:2604 msgid ":func:`ascii`" msgstr "" -#: ../../library/stdtypes.rst:2561 +#: ../../library/stdtypes.rst:2605 msgid "``!r``" msgstr "" -#: ../../library/stdtypes.rst:2561 +#: ../../library/stdtypes.rst:2605 msgid ":func:`repr`" msgstr "" -#: ../../library/stdtypes.rst:2562 +#: ../../library/stdtypes.rst:2606 msgid "``!s``" msgstr "" -#: ../../library/stdtypes.rst:2562 +#: ../../library/stdtypes.rst:2606 msgid ":func:`str`" msgstr "" -#: ../../library/stdtypes.rst:2565 +#: ../../library/stdtypes.rst:2609 msgid "For example:" msgstr "" -#: ../../library/stdtypes.rst:2567 +#: ../../library/stdtypes.rst:2611 msgid "" ">>> from fractions import Fraction\n" ">>> f'{Fraction(1, 3)!s}'\n" @@ -3772,7 +3849,7 @@ msgid "" "'\\xbfD\\xf3nde est\\xe1 el Presidente?'" msgstr "" -#: ../../library/stdtypes.rst:2578 +#: ../../library/stdtypes.rst:2622 msgid "" "While debugging it may be helpful to see both the expression and its value, " "by using the equals sign (``=``) after the expression. This preserves spaces " @@ -3780,7 +3857,7 @@ msgid "" "debugging operator uses the :func:`repr` (``!r``) conversion. For example:" msgstr "" -#: ../../library/stdtypes.rst:2584 +#: ../../library/stdtypes.rst:2628 msgid "" ">>> from fractions import Fraction\n" ">>> calculation = Fraction(1, 3)\n" @@ -3792,7 +3869,7 @@ msgid "" "'calculation = 1/3'" msgstr "" -#: ../../library/stdtypes.rst:2595 +#: ../../library/stdtypes.rst:2639 msgid "" "Once the output has been evaluated, it can be formatted using a :ref:`format " "specifier ` following a colon (``':'``). After the expression " @@ -3802,7 +3879,7 @@ msgid "" "used as the final value for the replacement field. For example:" msgstr "" -#: ../../library/stdtypes.rst:2603 +#: ../../library/stdtypes.rst:2647 msgid "" ">>> from fractions import Fraction\n" ">>> f'{Fraction(1, 7):.6f}'\n" @@ -3811,11 +3888,11 @@ msgid "" "'___+1/7___'" msgstr "" -#: ../../library/stdtypes.rst:2615 +#: ../../library/stdtypes.rst:2659 msgid "``printf``-style String Formatting" msgstr "" -#: ../../library/stdtypes.rst:2628 +#: ../../library/stdtypes.rst:2672 msgid "" "The formatting operations described here exhibit a variety of quirks that " "lead to a number of common errors (such as failing to display tuples and " @@ -3826,7 +3903,7 @@ msgid "" "or extensibility." msgstr "" -#: ../../library/stdtypes.rst:2636 +#: ../../library/stdtypes.rst:2680 msgid "" "String objects have one unique built-in operation: the ``%`` operator " "(modulo). This is also known as the string *formatting* or *interpolation* " @@ -3836,13 +3913,13 @@ msgid "" "function in the C language. For example:" msgstr "" -#: ../../library/stdtypes.rst:2643 +#: ../../library/stdtypes.rst:2687 msgid "" ">>> print('%s has %d quote types.' % ('Python', 2))\n" "Python has 2 quote types." msgstr "" -#: ../../library/stdtypes.rst:2648 +#: ../../library/stdtypes.rst:2692 msgid "" "If *format* requires a single argument, *values* may be a single non-tuple " "object. [5]_ Otherwise, *values* must be a tuple with exactly the number of " @@ -3850,36 +3927,36 @@ msgid "" "example, a dictionary)." msgstr "" -#: ../../library/stdtypes.rst:2658 ../../library/stdtypes.rst:3917 +#: ../../library/stdtypes.rst:2702 ../../library/stdtypes.rst:3961 msgid "" "A conversion specifier contains two or more characters and has the following " "components, which must occur in this order:" msgstr "" -#: ../../library/stdtypes.rst:2661 ../../library/stdtypes.rst:3920 +#: ../../library/stdtypes.rst:2705 ../../library/stdtypes.rst:3964 msgid "The ``'%'`` character, which marks the start of the specifier." msgstr "" -#: ../../library/stdtypes.rst:2663 ../../library/stdtypes.rst:3922 +#: ../../library/stdtypes.rst:2707 ../../library/stdtypes.rst:3966 msgid "" "Mapping key (optional), consisting of a parenthesised sequence of characters " "(for example, ``(somename)``)." msgstr "" -#: ../../library/stdtypes.rst:2666 ../../library/stdtypes.rst:3925 +#: ../../library/stdtypes.rst:2710 ../../library/stdtypes.rst:3969 msgid "" "Conversion flags (optional), which affect the result of some conversion " "types." msgstr "" -#: ../../library/stdtypes.rst:2669 ../../library/stdtypes.rst:3928 +#: ../../library/stdtypes.rst:2713 ../../library/stdtypes.rst:3972 msgid "" "Minimum field width (optional). If specified as an ``'*'`` (asterisk), the " "actual width is read from the next element of the tuple in *values*, and the " "object to convert comes after the minimum field width and optional precision." msgstr "" -#: ../../library/stdtypes.rst:2673 ../../library/stdtypes.rst:3932 +#: ../../library/stdtypes.rst:2717 ../../library/stdtypes.rst:3976 msgid "" "Precision (optional), given as a ``'.'`` (dot) followed by the precision. " "If specified as ``'*'`` (an asterisk), the actual precision is read from the " @@ -3887,15 +3964,15 @@ msgid "" "the precision." msgstr "" -#: ../../library/stdtypes.rst:2678 ../../library/stdtypes.rst:3937 +#: ../../library/stdtypes.rst:2722 ../../library/stdtypes.rst:3981 msgid "Length modifier (optional)." msgstr "" -#: ../../library/stdtypes.rst:2680 ../../library/stdtypes.rst:3939 +#: ../../library/stdtypes.rst:2724 ../../library/stdtypes.rst:3983 msgid "Conversion type." msgstr "" -#: ../../library/stdtypes.rst:2682 +#: ../../library/stdtypes.rst:2726 msgid "" "When the right argument is a dictionary (or other mapping type), then the " "formats in the string *must* include a parenthesised mapping key into that " @@ -3903,275 +3980,275 @@ msgid "" "selects the value to be formatted from the mapping. For example:" msgstr "" -#: ../../library/stdtypes.rst:2691 ../../library/stdtypes.rst:3950 +#: ../../library/stdtypes.rst:2735 ../../library/stdtypes.rst:3994 msgid "" "In this case no ``*`` specifiers may occur in a format (since they require a " "sequential parameter list)." msgstr "" -#: ../../library/stdtypes.rst:2694 ../../library/stdtypes.rst:3953 +#: ../../library/stdtypes.rst:2738 ../../library/stdtypes.rst:3997 msgid "The conversion flag characters are:" msgstr "" -#: ../../library/stdtypes.rst:2703 ../../library/stdtypes.rst:3962 +#: ../../library/stdtypes.rst:2747 ../../library/stdtypes.rst:4006 msgid "Flag" msgstr "" -#: ../../library/stdtypes.rst:2705 ../../library/stdtypes.rst:3964 +#: ../../library/stdtypes.rst:2749 ../../library/stdtypes.rst:4008 msgid "``'#'``" msgstr "" -#: ../../library/stdtypes.rst:2705 ../../library/stdtypes.rst:3964 +#: ../../library/stdtypes.rst:2749 ../../library/stdtypes.rst:4008 msgid "" "The value conversion will use the \"alternate form\" (where defined below)." msgstr "" -#: ../../library/stdtypes.rst:2708 ../../library/stdtypes.rst:3967 +#: ../../library/stdtypes.rst:2752 ../../library/stdtypes.rst:4011 msgid "``'0'``" msgstr "" -#: ../../library/stdtypes.rst:2708 ../../library/stdtypes.rst:3967 +#: ../../library/stdtypes.rst:2752 ../../library/stdtypes.rst:4011 msgid "The conversion will be zero padded for numeric values." msgstr "" -#: ../../library/stdtypes.rst:2710 ../../library/stdtypes.rst:3969 +#: ../../library/stdtypes.rst:2754 ../../library/stdtypes.rst:4013 msgid "``'-'``" msgstr "" -#: ../../library/stdtypes.rst:2710 ../../library/stdtypes.rst:3969 +#: ../../library/stdtypes.rst:2754 ../../library/stdtypes.rst:4013 msgid "" "The converted value is left adjusted (overrides the ``'0'`` conversion if " "both are given)." msgstr "" -#: ../../library/stdtypes.rst:2713 ../../library/stdtypes.rst:3972 +#: ../../library/stdtypes.rst:2757 ../../library/stdtypes.rst:4016 msgid "``' '``" msgstr "" -#: ../../library/stdtypes.rst:2713 ../../library/stdtypes.rst:3972 +#: ../../library/stdtypes.rst:2757 ../../library/stdtypes.rst:4016 msgid "" "(a space) A blank should be left before a positive number (or empty string) " "produced by a signed conversion." msgstr "" -#: ../../library/stdtypes.rst:2716 ../../library/stdtypes.rst:3975 +#: ../../library/stdtypes.rst:2760 ../../library/stdtypes.rst:4019 msgid "``'+'``" msgstr "" -#: ../../library/stdtypes.rst:2716 ../../library/stdtypes.rst:3975 +#: ../../library/stdtypes.rst:2760 ../../library/stdtypes.rst:4019 msgid "" "A sign character (``'+'`` or ``'-'``) will precede the conversion (overrides " "a \"space\" flag)." msgstr "" -#: ../../library/stdtypes.rst:2720 ../../library/stdtypes.rst:3979 +#: ../../library/stdtypes.rst:2764 ../../library/stdtypes.rst:4023 msgid "" "A length modifier (``h``, ``l``, or ``L``) may be present, but is ignored as " "it is not necessary for Python -- so e.g. ``%ld`` is identical to ``%d``." msgstr "" -#: ../../library/stdtypes.rst:2723 ../../library/stdtypes.rst:3982 +#: ../../library/stdtypes.rst:2767 ../../library/stdtypes.rst:4026 msgid "The conversion types are:" msgstr "" -#: ../../library/stdtypes.rst:2728 ../../library/stdtypes.rst:3987 +#: ../../library/stdtypes.rst:2772 ../../library/stdtypes.rst:4031 msgid "``'d'``" msgstr "" -#: ../../library/stdtypes.rst:2728 ../../library/stdtypes.rst:2730 -#: ../../library/stdtypes.rst:3987 ../../library/stdtypes.rst:3989 +#: ../../library/stdtypes.rst:2772 ../../library/stdtypes.rst:2774 +#: ../../library/stdtypes.rst:4031 ../../library/stdtypes.rst:4033 msgid "Signed integer decimal." msgstr "" -#: ../../library/stdtypes.rst:2730 ../../library/stdtypes.rst:3989 +#: ../../library/stdtypes.rst:2774 ../../library/stdtypes.rst:4033 msgid "``'i'``" msgstr "" -#: ../../library/stdtypes.rst:2732 ../../library/stdtypes.rst:3991 +#: ../../library/stdtypes.rst:2776 ../../library/stdtypes.rst:4035 msgid "``'o'``" msgstr "" -#: ../../library/stdtypes.rst:2732 ../../library/stdtypes.rst:3991 +#: ../../library/stdtypes.rst:2776 ../../library/stdtypes.rst:4035 msgid "Signed octal value." msgstr "" -#: ../../library/stdtypes.rst:2734 ../../library/stdtypes.rst:3993 +#: ../../library/stdtypes.rst:2778 ../../library/stdtypes.rst:4037 msgid "``'u'``" msgstr "" -#: ../../library/stdtypes.rst:2734 ../../library/stdtypes.rst:3993 +#: ../../library/stdtypes.rst:2778 ../../library/stdtypes.rst:4037 msgid "Obsolete type -- it is identical to ``'d'``." msgstr "" -#: ../../library/stdtypes.rst:2736 ../../library/stdtypes.rst:3995 +#: ../../library/stdtypes.rst:2780 ../../library/stdtypes.rst:4039 msgid "``'x'``" msgstr "" -#: ../../library/stdtypes.rst:2736 ../../library/stdtypes.rst:3995 +#: ../../library/stdtypes.rst:2780 ../../library/stdtypes.rst:4039 msgid "Signed hexadecimal (lowercase)." msgstr "" -#: ../../library/stdtypes.rst:2738 ../../library/stdtypes.rst:3997 +#: ../../library/stdtypes.rst:2782 ../../library/stdtypes.rst:4041 msgid "``'X'``" msgstr "" -#: ../../library/stdtypes.rst:2738 ../../library/stdtypes.rst:3997 +#: ../../library/stdtypes.rst:2782 ../../library/stdtypes.rst:4041 msgid "Signed hexadecimal (uppercase)." msgstr "" -#: ../../library/stdtypes.rst:2740 ../../library/stdtypes.rst:3999 +#: ../../library/stdtypes.rst:2784 ../../library/stdtypes.rst:4043 msgid "``'e'``" msgstr "" -#: ../../library/stdtypes.rst:2740 ../../library/stdtypes.rst:3999 +#: ../../library/stdtypes.rst:2784 ../../library/stdtypes.rst:4043 msgid "Floating-point exponential format (lowercase)." msgstr "" -#: ../../library/stdtypes.rst:2742 ../../library/stdtypes.rst:4001 +#: ../../library/stdtypes.rst:2786 ../../library/stdtypes.rst:4045 msgid "``'E'``" msgstr "" -#: ../../library/stdtypes.rst:2742 ../../library/stdtypes.rst:4001 +#: ../../library/stdtypes.rst:2786 ../../library/stdtypes.rst:4045 msgid "Floating-point exponential format (uppercase)." msgstr "" -#: ../../library/stdtypes.rst:2744 ../../library/stdtypes.rst:4003 +#: ../../library/stdtypes.rst:2788 ../../library/stdtypes.rst:4047 msgid "``'f'``" msgstr "" -#: ../../library/stdtypes.rst:2744 ../../library/stdtypes.rst:2746 -#: ../../library/stdtypes.rst:4003 ../../library/stdtypes.rst:4005 +#: ../../library/stdtypes.rst:2788 ../../library/stdtypes.rst:2790 +#: ../../library/stdtypes.rst:4047 ../../library/stdtypes.rst:4049 msgid "Floating-point decimal format." msgstr "" -#: ../../library/stdtypes.rst:2746 ../../library/stdtypes.rst:4005 +#: ../../library/stdtypes.rst:2790 ../../library/stdtypes.rst:4049 msgid "``'F'``" msgstr "" -#: ../../library/stdtypes.rst:2748 ../../library/stdtypes.rst:4007 +#: ../../library/stdtypes.rst:2792 ../../library/stdtypes.rst:4051 msgid "``'g'``" msgstr "" -#: ../../library/stdtypes.rst:2748 ../../library/stdtypes.rst:4007 +#: ../../library/stdtypes.rst:2792 ../../library/stdtypes.rst:4051 msgid "" "Floating-point format. Uses lowercase exponential format if exponent is less " "than -4 or not less than precision, decimal format otherwise." msgstr "" -#: ../../library/stdtypes.rst:2752 ../../library/stdtypes.rst:4011 +#: ../../library/stdtypes.rst:2796 ../../library/stdtypes.rst:4055 msgid "``'G'``" msgstr "" -#: ../../library/stdtypes.rst:2752 ../../library/stdtypes.rst:4011 +#: ../../library/stdtypes.rst:2796 ../../library/stdtypes.rst:4055 msgid "" "Floating-point format. Uses uppercase exponential format if exponent is less " "than -4 or not less than precision, decimal format otherwise." msgstr "" -#: ../../library/stdtypes.rst:2756 ../../library/stdtypes.rst:4015 +#: ../../library/stdtypes.rst:2800 ../../library/stdtypes.rst:4059 msgid "``'c'``" msgstr "" -#: ../../library/stdtypes.rst:2756 +#: ../../library/stdtypes.rst:2800 msgid "Single character (accepts integer or single character string)." msgstr "" -#: ../../library/stdtypes.rst:2759 ../../library/stdtypes.rst:4028 +#: ../../library/stdtypes.rst:2803 ../../library/stdtypes.rst:4072 msgid "``'r'``" msgstr "" -#: ../../library/stdtypes.rst:2759 +#: ../../library/stdtypes.rst:2803 msgid "String (converts any Python object using :func:`repr`)." msgstr "" -#: ../../library/stdtypes.rst:2762 ../../library/stdtypes.rst:4022 +#: ../../library/stdtypes.rst:2806 ../../library/stdtypes.rst:4066 msgid "``'s'``" msgstr "" -#: ../../library/stdtypes.rst:2762 +#: ../../library/stdtypes.rst:2806 msgid "String (converts any Python object using :func:`str`)." msgstr "" -#: ../../library/stdtypes.rst:2765 ../../library/stdtypes.rst:4025 +#: ../../library/stdtypes.rst:2809 ../../library/stdtypes.rst:4069 msgid "``'a'``" msgstr "" -#: ../../library/stdtypes.rst:2765 +#: ../../library/stdtypes.rst:2809 msgid "String (converts any Python object using :func:`ascii`)." msgstr "" -#: ../../library/stdtypes.rst:2768 ../../library/stdtypes.rst:4031 +#: ../../library/stdtypes.rst:2812 ../../library/stdtypes.rst:4075 msgid "``'%'``" msgstr "" -#: ../../library/stdtypes.rst:2768 ../../library/stdtypes.rst:4031 +#: ../../library/stdtypes.rst:2812 ../../library/stdtypes.rst:4075 msgid "No argument is converted, results in a ``'%'`` character in the result." msgstr "" -#: ../../library/stdtypes.rst:2775 ../../library/stdtypes.rst:4038 +#: ../../library/stdtypes.rst:2819 ../../library/stdtypes.rst:4082 msgid "" "The alternate form causes a leading octal specifier (``'0o'``) to be " "inserted before the first digit." msgstr "" -#: ../../library/stdtypes.rst:2779 ../../library/stdtypes.rst:4042 +#: ../../library/stdtypes.rst:2823 ../../library/stdtypes.rst:4086 msgid "" "The alternate form causes a leading ``'0x'`` or ``'0X'`` (depending on " "whether the ``'x'`` or ``'X'`` format was used) to be inserted before the " "first digit." msgstr "" -#: ../../library/stdtypes.rst:2783 ../../library/stdtypes.rst:4046 +#: ../../library/stdtypes.rst:2827 ../../library/stdtypes.rst:4090 msgid "" "The alternate form causes the result to always contain a decimal point, even " "if no digits follow it." msgstr "" -#: ../../library/stdtypes.rst:2786 ../../library/stdtypes.rst:4049 +#: ../../library/stdtypes.rst:2830 ../../library/stdtypes.rst:4093 msgid "" "The precision determines the number of digits after the decimal point and " "defaults to 6." msgstr "" -#: ../../library/stdtypes.rst:2790 ../../library/stdtypes.rst:4053 +#: ../../library/stdtypes.rst:2834 ../../library/stdtypes.rst:4097 msgid "" "The alternate form causes the result to always contain a decimal point, and " "trailing zeroes are not removed as they would otherwise be." msgstr "" -#: ../../library/stdtypes.rst:2793 ../../library/stdtypes.rst:4056 +#: ../../library/stdtypes.rst:2837 ../../library/stdtypes.rst:4100 msgid "" "The precision determines the number of significant digits before and after " "the decimal point and defaults to 6." msgstr "" -#: ../../library/stdtypes.rst:2797 ../../library/stdtypes.rst:4060 +#: ../../library/stdtypes.rst:2841 ../../library/stdtypes.rst:4104 msgid "If precision is ``N``, the output is truncated to ``N`` characters." msgstr "" -#: ../../library/stdtypes.rst:2800 ../../library/stdtypes.rst:4069 +#: ../../library/stdtypes.rst:2844 ../../library/stdtypes.rst:4113 msgid "See :pep:`237`." msgstr "" -#: ../../library/stdtypes.rst:2802 +#: ../../library/stdtypes.rst:2846 msgid "" "Since Python strings have an explicit length, ``%s`` conversions do not " "assume that ``'\\0'`` is the end of the string." msgstr "" -#: ../../library/stdtypes.rst:2807 +#: ../../library/stdtypes.rst:2851 msgid "" "``%f`` conversions for numbers whose absolute value is over 1e50 are no " "longer replaced by ``%g`` conversions." msgstr "" -#: ../../library/stdtypes.rst:2818 +#: ../../library/stdtypes.rst:2862 msgid "" "Binary Sequence Types --- :class:`bytes`, :class:`bytearray`, :class:" "`memoryview`" msgstr "" -#: ../../library/stdtypes.rst:2826 +#: ../../library/stdtypes.rst:2870 msgid "" "The core built-in types for manipulating binary data are :class:`bytes` and :" "class:`bytearray`. They are supported by :class:`memoryview` which uses the :" @@ -4179,17 +4256,17 @@ msgid "" "objects without needing to make a copy." msgstr "" -#: ../../library/stdtypes.rst:2831 +#: ../../library/stdtypes.rst:2875 msgid "" "The :mod:`array` module supports efficient storage of basic data types like " "32-bit integers and IEEE754 double-precision floating values." msgstr "" -#: ../../library/stdtypes.rst:2837 +#: ../../library/stdtypes.rst:2881 msgid "Bytes Objects" msgstr "" -#: ../../library/stdtypes.rst:2841 +#: ../../library/stdtypes.rst:2885 msgid "" "Bytes objects are immutable sequences of single bytes. Since many major " "binary protocols are based on the ASCII text encoding, bytes objects offer " @@ -4197,40 +4274,40 @@ msgid "" "and are closely related to string objects in a variety of other ways." msgstr "" -#: ../../library/stdtypes.rst:2848 +#: ../../library/stdtypes.rst:2892 msgid "" "Firstly, the syntax for bytes literals is largely the same as that for " "string literals, except that a ``b`` prefix is added:" msgstr "" -#: ../../library/stdtypes.rst:2851 +#: ../../library/stdtypes.rst:2895 msgid "Single quotes: ``b'still allows embedded \"double\" quotes'``" msgstr "" -#: ../../library/stdtypes.rst:2852 +#: ../../library/stdtypes.rst:2896 msgid "Double quotes: ``b\"still allows embedded 'single' quotes\"``" msgstr "" -#: ../../library/stdtypes.rst:2853 +#: ../../library/stdtypes.rst:2897 msgid "" "Triple quoted: ``b'''3 single quotes'''``, ``b\"\"\"3 double quotes\"\"\"``" msgstr "" -#: ../../library/stdtypes.rst:2855 +#: ../../library/stdtypes.rst:2899 msgid "" "Only ASCII characters are permitted in bytes literals (regardless of the " "declared source code encoding). Any binary values over 127 must be entered " "into bytes literals using the appropriate escape sequence." msgstr "" -#: ../../library/stdtypes.rst:2859 +#: ../../library/stdtypes.rst:2903 msgid "" "As with string literals, bytes literals may also use a ``r`` prefix to " "disable processing of escape sequences. See :ref:`strings` for more about " "the various forms of bytes literal, including supported escape sequences." msgstr "" -#: ../../library/stdtypes.rst:2863 +#: ../../library/stdtypes.rst:2907 msgid "" "While bytes literals and representations are based on ASCII text, bytes " "objects actually behave like immutable sequences of integers, with each " @@ -4243,29 +4320,29 @@ msgid "" "compatible will usually lead to data corruption)." msgstr "" -#: ../../library/stdtypes.rst:2873 +#: ../../library/stdtypes.rst:2917 msgid "" "In addition to the literal forms, bytes objects can be created in a number " "of other ways:" msgstr "" -#: ../../library/stdtypes.rst:2876 +#: ../../library/stdtypes.rst:2920 msgid "A zero-filled bytes object of a specified length: ``bytes(10)``" msgstr "" -#: ../../library/stdtypes.rst:2877 +#: ../../library/stdtypes.rst:2921 msgid "From an iterable of integers: ``bytes(range(20))``" msgstr "" -#: ../../library/stdtypes.rst:2878 +#: ../../library/stdtypes.rst:2922 msgid "Copying existing binary data via the buffer protocol: ``bytes(obj)``" msgstr "" -#: ../../library/stdtypes.rst:2880 +#: ../../library/stdtypes.rst:2924 msgid "Also see the :ref:`bytes ` built-in." msgstr "" -#: ../../library/stdtypes.rst:2882 +#: ../../library/stdtypes.rst:2926 msgid "" "Since 2 hexadecimal digits correspond precisely to a single byte, " "hexadecimal numbers are a commonly used format for describing binary data. " @@ -4273,38 +4350,38 @@ msgid "" "that format:" msgstr "" -#: ../../library/stdtypes.rst:2888 +#: ../../library/stdtypes.rst:2932 msgid "" "This :class:`bytes` class method returns a bytes object, decoding the given " "string object. The string must contain two hexadecimal digits per byte, " "with ASCII whitespace being ignored." msgstr "" -#: ../../library/stdtypes.rst:2895 +#: ../../library/stdtypes.rst:2939 msgid "" ":meth:`bytes.fromhex` now skips all ASCII whitespace in the string, not just " "spaces." msgstr "" -#: ../../library/stdtypes.rst:2899 +#: ../../library/stdtypes.rst:2943 msgid "" ":meth:`bytes.fromhex` now accepts ASCII :class:`bytes` and :term:`bytes-like " "objects ` as input." msgstr "" -#: ../../library/stdtypes.rst:2903 +#: ../../library/stdtypes.rst:2947 msgid "" "A reverse conversion function exists to transform a bytes object into its " "hexadecimal representation." msgstr "" -#: ../../library/stdtypes.rst:2908 ../../library/stdtypes.rst:2997 +#: ../../library/stdtypes.rst:2952 ../../library/stdtypes.rst:3041 msgid "" "Return a string object containing two hexadecimal digits for each byte in " "the instance." msgstr "" -#: ../../library/stdtypes.rst:2914 +#: ../../library/stdtypes.rst:2958 msgid "" "If you want to make the hex string easier to read, you can specify a single " "character separator *sep* parameter to include in the output. By default, " @@ -4313,13 +4390,13 @@ msgid "" "the separator position from the right, negative values from the left." msgstr "" -#: ../../library/stdtypes.rst:2931 +#: ../../library/stdtypes.rst:2975 msgid "" ":meth:`bytes.hex` now supports optional *sep* and *bytes_per_sep* parameters " "to insert separators between bytes in the hex output." msgstr "" -#: ../../library/stdtypes.rst:2935 +#: ../../library/stdtypes.rst:2979 msgid "" "Since bytes objects are sequences of integers (akin to a tuple), for a bytes " "object *b*, ``b[0]`` will be an integer, while ``b[0:1]`` will be a bytes " @@ -4327,58 +4404,58 @@ msgid "" "and slicing will produce a string of length 1)" msgstr "" -#: ../../library/stdtypes.rst:2940 +#: ../../library/stdtypes.rst:2984 msgid "" "The representation of bytes objects uses the literal format (``b'...'``) " "since it is often more useful than e.g. ``bytes([46, 46, 46])``. You can " "always convert a bytes object into a list of integers using ``list(b)``." msgstr "" -#: ../../library/stdtypes.rst:2948 +#: ../../library/stdtypes.rst:2992 msgid "Bytearray Objects" msgstr "" -#: ../../library/stdtypes.rst:2952 +#: ../../library/stdtypes.rst:2996 msgid "" ":class:`bytearray` objects are a mutable counterpart to :class:`bytes` " "objects." msgstr "" -#: ../../library/stdtypes.rst:2957 +#: ../../library/stdtypes.rst:3001 msgid "" "There is no dedicated literal syntax for bytearray objects, instead they are " "always created by calling the constructor:" msgstr "" -#: ../../library/stdtypes.rst:2960 +#: ../../library/stdtypes.rst:3004 msgid "Creating an empty instance: ``bytearray()``" msgstr "" -#: ../../library/stdtypes.rst:2961 +#: ../../library/stdtypes.rst:3005 msgid "Creating a zero-filled instance with a given length: ``bytearray(10)``" msgstr "" -#: ../../library/stdtypes.rst:2962 +#: ../../library/stdtypes.rst:3006 msgid "From an iterable of integers: ``bytearray(range(20))``" msgstr "" -#: ../../library/stdtypes.rst:2963 +#: ../../library/stdtypes.rst:3007 msgid "" "Copying existing binary data via the buffer protocol: ``bytearray(b'Hi!')``" msgstr "" -#: ../../library/stdtypes.rst:2965 +#: ../../library/stdtypes.rst:3009 msgid "" "As bytearray objects are mutable, they support the :ref:`mutable ` sequence operations in addition to the common bytes and bytearray " "operations described in :ref:`bytes-methods`." msgstr "" -#: ../../library/stdtypes.rst:2969 +#: ../../library/stdtypes.rst:3013 msgid "Also see the :ref:`bytearray ` built-in." msgstr "" -#: ../../library/stdtypes.rst:2971 +#: ../../library/stdtypes.rst:3015 msgid "" "Since 2 hexadecimal digits correspond precisely to a single byte, " "hexadecimal numbers are a commonly used format for describing binary data. " @@ -4386,64 +4463,64 @@ msgid "" "in that format:" msgstr "" -#: ../../library/stdtypes.rst:2977 +#: ../../library/stdtypes.rst:3021 msgid "" "This :class:`bytearray` class method returns bytearray object, decoding the " "given string object. The string must contain two hexadecimal digits per " "byte, with ASCII whitespace being ignored." msgstr "" -#: ../../library/stdtypes.rst:2984 +#: ../../library/stdtypes.rst:3028 msgid "" ":meth:`bytearray.fromhex` now skips all ASCII whitespace in the string, not " "just spaces." msgstr "" -#: ../../library/stdtypes.rst:2988 +#: ../../library/stdtypes.rst:3032 msgid "" ":meth:`bytearray.fromhex` now accepts ASCII :class:`bytes` and :term:`bytes-" "like objects ` as input." msgstr "" -#: ../../library/stdtypes.rst:2992 +#: ../../library/stdtypes.rst:3036 msgid "" "A reverse conversion function exists to transform a bytearray object into " "its hexadecimal representation." msgstr "" -#: ../../library/stdtypes.rst:3005 +#: ../../library/stdtypes.rst:3049 msgid "" "Similar to :meth:`bytes.hex`, :meth:`bytearray.hex` now supports optional " "*sep* and *bytes_per_sep* parameters to insert separators between bytes in " "the hex output." msgstr "" -#: ../../library/stdtypes.rst:3012 +#: ../../library/stdtypes.rst:3056 msgid "" "Resize the :class:`bytearray` to contain *size* bytes. *size* must be " "greater than or equal to 0." msgstr "" -#: ../../library/stdtypes.rst:3015 +#: ../../library/stdtypes.rst:3059 msgid "" "If the :class:`bytearray` needs to shrink, bytes beyond *size* are truncated." msgstr "" -#: ../../library/stdtypes.rst:3017 +#: ../../library/stdtypes.rst:3061 msgid "" "If the :class:`bytearray` needs to grow, all new bytes, those beyond *size*, " "will be set to null bytes." msgstr "" -#: ../../library/stdtypes.rst:3021 +#: ../../library/stdtypes.rst:3065 msgid "This is equivalent to:" msgstr "" -#: ../../library/stdtypes.rst:3029 +#: ../../library/stdtypes.rst:3073 msgid "Examples:" msgstr "" -#: ../../library/stdtypes.rst:3042 +#: ../../library/stdtypes.rst:3086 msgid "" "Since bytearray objects are sequences of integers (akin to a list), for a " "bytearray object *b*, ``b[0]`` will be an integer, while ``b[0:1]`` will be " @@ -4451,7 +4528,7 @@ msgid "" "both indexing and slicing will produce a string of length 1)" msgstr "" -#: ../../library/stdtypes.rst:3047 +#: ../../library/stdtypes.rst:3091 msgid "" "The representation of bytearray objects uses the bytes literal format " "(``bytearray(b'...')``) since it is often more useful than e.g. " @@ -4459,11 +4536,11 @@ msgid "" "a list of integers using ``list(b)``." msgstr "" -#: ../../library/stdtypes.rst:3056 +#: ../../library/stdtypes.rst:3100 msgid "Bytes and Bytearray Operations" msgstr "" -#: ../../library/stdtypes.rst:3061 +#: ../../library/stdtypes.rst:3105 msgid "" "Both bytes and bytearray objects support the :ref:`common ` " "sequence operations. They interoperate not just with operands of the same " @@ -4472,83 +4549,83 @@ msgid "" "return type of the result may depend on the order of operands." msgstr "" -#: ../../library/stdtypes.rst:3069 +#: ../../library/stdtypes.rst:3113 msgid "" "The methods on bytes and bytearray objects don't accept strings as their " "arguments, just as the methods on strings don't accept bytes as their " "arguments. For example, you have to write::" msgstr "" -#: ../../library/stdtypes.rst:3073 +#: ../../library/stdtypes.rst:3117 msgid "" "a = \"abc\"\n" "b = a.replace(\"a\", \"f\")" msgstr "" -#: ../../library/stdtypes.rst:3076 +#: ../../library/stdtypes.rst:3120 msgid "and::" msgstr "" -#: ../../library/stdtypes.rst:3078 +#: ../../library/stdtypes.rst:3122 msgid "" "a = b\"abc\"\n" "b = a.replace(b\"a\", b\"f\")" msgstr "" -#: ../../library/stdtypes.rst:3081 +#: ../../library/stdtypes.rst:3125 msgid "" "Some bytes and bytearray operations assume the use of ASCII compatible " "binary formats, and hence should be avoided when working with arbitrary " "binary data. These restrictions are covered below." msgstr "" -#: ../../library/stdtypes.rst:3086 +#: ../../library/stdtypes.rst:3130 msgid "" "Using these ASCII based operations to manipulate binary data that is not " "stored in an ASCII based format may lead to data corruption." msgstr "" -#: ../../library/stdtypes.rst:3089 +#: ../../library/stdtypes.rst:3133 msgid "" "The following methods on bytes and bytearray objects can be used with " "arbitrary binary data." msgstr "" -#: ../../library/stdtypes.rst:3095 +#: ../../library/stdtypes.rst:3139 msgid "" "Return the number of non-overlapping occurrences of subsequence *sub* in the " "range [*start*, *end*]. Optional arguments *start* and *end* are " "interpreted as in slice notation." msgstr "" -#: ../../library/stdtypes.rst:3099 ../../library/stdtypes.rst:3204 -#: ../../library/stdtypes.rst:3226 ../../library/stdtypes.rst:3292 -#: ../../library/stdtypes.rst:3305 +#: ../../library/stdtypes.rst:3143 ../../library/stdtypes.rst:3248 +#: ../../library/stdtypes.rst:3270 ../../library/stdtypes.rst:3336 +#: ../../library/stdtypes.rst:3349 msgid "" "The subsequence to search for may be any :term:`bytes-like object` or an " "integer in the range 0 to 255." msgstr "" -#: ../../library/stdtypes.rst:3102 +#: ../../library/stdtypes.rst:3146 msgid "" "If *sub* is empty, returns the number of empty slices between characters " "which is the length of the bytes object plus one." msgstr "" -#: ../../library/stdtypes.rst:3105 ../../library/stdtypes.rst:3216 -#: ../../library/stdtypes.rst:3229 ../../library/stdtypes.rst:3295 -#: ../../library/stdtypes.rst:3308 +#: ../../library/stdtypes.rst:3149 ../../library/stdtypes.rst:3260 +#: ../../library/stdtypes.rst:3273 ../../library/stdtypes.rst:3339 +#: ../../library/stdtypes.rst:3352 msgid "Also accept an integer in the range 0 to 255 as the subsequence." msgstr "" -#: ../../library/stdtypes.rst:3112 +#: ../../library/stdtypes.rst:3156 msgid "" "If the binary data starts with the *prefix* string, return " "``bytes[len(prefix):]``. Otherwise, return a copy of the original binary " "data::" msgstr "" -#: ../../library/stdtypes.rst:3116 +#: ../../library/stdtypes.rst:3160 msgid "" ">>> b'TestHook'.removeprefix(b'Test')\n" "b'Hook'\n" @@ -4556,32 +4633,32 @@ msgid "" "b'BaseTestCase'" msgstr "" -#: ../../library/stdtypes.rst:3121 +#: ../../library/stdtypes.rst:3165 msgid "The *prefix* may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:3125 ../../library/stdtypes.rst:3147 -#: ../../library/stdtypes.rst:3280 ../../library/stdtypes.rst:3373 -#: ../../library/stdtypes.rst:3387 ../../library/stdtypes.rst:3418 -#: ../../library/stdtypes.rst:3432 ../../library/stdtypes.rst:3474 -#: ../../library/stdtypes.rst:3545 ../../library/stdtypes.rst:3563 -#: ../../library/stdtypes.rst:3591 ../../library/stdtypes.rst:3730 -#: ../../library/stdtypes.rst:3785 ../../library/stdtypes.rst:3828 -#: ../../library/stdtypes.rst:3849 ../../library/stdtypes.rst:3871 -#: ../../library/stdtypes.rst:4073 +#: ../../library/stdtypes.rst:3169 ../../library/stdtypes.rst:3191 +#: ../../library/stdtypes.rst:3324 ../../library/stdtypes.rst:3417 +#: ../../library/stdtypes.rst:3431 ../../library/stdtypes.rst:3462 +#: ../../library/stdtypes.rst:3476 ../../library/stdtypes.rst:3518 +#: ../../library/stdtypes.rst:3589 ../../library/stdtypes.rst:3607 +#: ../../library/stdtypes.rst:3635 ../../library/stdtypes.rst:3774 +#: ../../library/stdtypes.rst:3829 ../../library/stdtypes.rst:3872 +#: ../../library/stdtypes.rst:3893 ../../library/stdtypes.rst:3915 +#: ../../library/stdtypes.rst:4117 msgid "" "The bytearray version of this method does *not* operate in place - it always " "produces a new object, even if no changes were made." msgstr "" -#: ../../library/stdtypes.rst:3134 +#: ../../library/stdtypes.rst:3178 msgid "" "If the binary data ends with the *suffix* string and that *suffix* is not " "empty, return ``bytes[:-len(suffix)]``. Otherwise, return a copy of the " "original binary data::" msgstr "" -#: ../../library/stdtypes.rst:3138 +#: ../../library/stdtypes.rst:3182 msgid "" ">>> b'MiscTests'.removesuffix(b'Tests')\n" "b'Misc'\n" @@ -4589,15 +4666,15 @@ msgid "" "b'TmpDirMixin'" msgstr "" -#: ../../library/stdtypes.rst:3143 +#: ../../library/stdtypes.rst:3187 msgid "The *suffix* may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:3156 +#: ../../library/stdtypes.rst:3200 msgid "Return the bytes decoded to a :class:`str`." msgstr "" -#: ../../library/stdtypes.rst:3161 +#: ../../library/stdtypes.rst:3205 msgid "" "*errors* controls how decoding errors are handled. If ``'strict'`` (the " "default), a :exc:`UnicodeError` exception is raised. Other possible values " @@ -4605,21 +4682,21 @@ msgid "" "`codecs.register_error`. See :ref:`error-handlers` for details." msgstr "" -#: ../../library/stdtypes.rst:3167 +#: ../../library/stdtypes.rst:3211 msgid "" "For performance reasons, the value of *errors* is not checked for validity " "unless a decoding error actually occurs, :ref:`devmode` is enabled or a :ref:" "`debug build ` is used." msgstr "" -#: ../../library/stdtypes.rst:3173 +#: ../../library/stdtypes.rst:3217 msgid "" "Passing the *encoding* argument to :class:`str` allows decoding any :term:" "`bytes-like object` directly, without needing to make a temporary :class:`!" "bytes` or :class:`!bytearray` object." msgstr "" -#: ../../library/stdtypes.rst:3188 +#: ../../library/stdtypes.rst:3232 msgid "" "Return ``True`` if the binary data ends with the specified *suffix*, " "otherwise return ``False``. *suffix* can also be a tuple of suffixes to " @@ -4627,11 +4704,11 @@ msgid "" "optional *end*, stop comparing at that position." msgstr "" -#: ../../library/stdtypes.rst:3193 +#: ../../library/stdtypes.rst:3237 msgid "The suffix(es) to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:3199 +#: ../../library/stdtypes.rst:3243 msgid "" "Return the lowest index in the data where the subsequence *sub* is found, " "such that *sub* is contained in the slice ``s[start:end]``. Optional " @@ -4639,26 +4716,26 @@ msgid "" "``-1`` if *sub* is not found." msgstr "" -#: ../../library/stdtypes.rst:3209 +#: ../../library/stdtypes.rst:3253 msgid "" "The :meth:`~bytes.find` method should be used only if you need to know the " "position of *sub*. To check if *sub* is a substring or not, use the :" "keyword:`in` operator::" msgstr "" -#: ../../library/stdtypes.rst:3213 +#: ../../library/stdtypes.rst:3257 msgid "" ">>> b'Py' in b'Python'\n" "True" msgstr "" -#: ../../library/stdtypes.rst:3223 +#: ../../library/stdtypes.rst:3267 msgid "" "Like :meth:`~bytes.find`, but raise :exc:`ValueError` when the subsequence " "is not found." msgstr "" -#: ../../library/stdtypes.rst:3236 +#: ../../library/stdtypes.rst:3280 msgid "" "Return a bytes or bytearray object which is the concatenation of the binary " "data sequences in *iterable*. A :exc:`TypeError` will be raised if there " @@ -4668,7 +4745,7 @@ msgid "" "method." msgstr "" -#: ../../library/stdtypes.rst:3247 +#: ../../library/stdtypes.rst:3291 msgid "" "This static method returns a translation table usable for :meth:`bytes." "translate` that will map each character in *from* into the character at the " @@ -4676,7 +4753,7 @@ msgid "" "objects ` and have the same length." msgstr "" -#: ../../library/stdtypes.rst:3258 +#: ../../library/stdtypes.rst:3302 msgid "" "Split the sequence at the first occurrence of *sep*, and return a 3-tuple " "containing the part before the separator, the separator itself or its " @@ -4685,24 +4762,24 @@ msgid "" "by two empty bytes or bytearray objects." msgstr "" -#: ../../library/stdtypes.rst:3265 ../../library/stdtypes.rst:3322 +#: ../../library/stdtypes.rst:3309 ../../library/stdtypes.rst:3366 msgid "The separator to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:3271 +#: ../../library/stdtypes.rst:3315 msgid "" "Return a copy of the sequence with all occurrences of subsequence *old* " "replaced by *new*. If the optional argument *count* is given, only the " "first *count* occurrences are replaced." msgstr "" -#: ../../library/stdtypes.rst:3275 +#: ../../library/stdtypes.rst:3319 msgid "" "The subsequence to search for and its replacement may be any :term:`bytes-" "like object`." msgstr "" -#: ../../library/stdtypes.rst:3287 +#: ../../library/stdtypes.rst:3331 msgid "" "Return the highest index in the sequence where the subsequence *sub* is " "found, such that *sub* is contained within ``s[start:end]``. Optional " @@ -4710,13 +4787,13 @@ msgid "" "``-1`` on failure." msgstr "" -#: ../../library/stdtypes.rst:3302 +#: ../../library/stdtypes.rst:3346 msgid "" "Like :meth:`~bytes.rfind` but raises :exc:`ValueError` when the subsequence " "*sub* is not found." msgstr "" -#: ../../library/stdtypes.rst:3315 +#: ../../library/stdtypes.rst:3359 msgid "" "Split the sequence at the last occurrence of *sep*, and return a 3-tuple " "containing the part before the separator, the separator itself or its " @@ -4725,7 +4802,7 @@ msgid "" "followed by a copy of the original sequence." msgstr "" -#: ../../library/stdtypes.rst:3328 +#: ../../library/stdtypes.rst:3372 msgid "" "Return ``True`` if the binary data starts with the specified *prefix*, " "otherwise return ``False``. *prefix* can also be a tuple of prefixes to " @@ -4733,11 +4810,11 @@ msgid "" "optional *end*, stop comparing at that position." msgstr "" -#: ../../library/stdtypes.rst:3333 +#: ../../library/stdtypes.rst:3377 msgid "The prefix(es) to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../library/stdtypes.rst:3339 +#: ../../library/stdtypes.rst:3383 msgid "" "Return a copy of the bytes or bytearray object where all bytes occurring in " "the optional argument *delete* are removed, and the remaining bytes have " @@ -4745,28 +4822,28 @@ msgid "" "object of length 256." msgstr "" -#: ../../library/stdtypes.rst:3344 +#: ../../library/stdtypes.rst:3388 msgid "" "You can use the :func:`bytes.maketrans` method to create a translation table." msgstr "" -#: ../../library/stdtypes.rst:3347 +#: ../../library/stdtypes.rst:3391 msgid "" "Set the *table* argument to ``None`` for translations that only delete " "characters::" msgstr "" -#: ../../library/stdtypes.rst:3350 +#: ../../library/stdtypes.rst:3394 msgid "" ">>> b'read this short text'.translate(None, b'aeiou')\n" "b'rd ths shrt txt'" msgstr "" -#: ../../library/stdtypes.rst:3353 +#: ../../library/stdtypes.rst:3397 msgid "*delete* is now supported as a keyword argument." msgstr "" -#: ../../library/stdtypes.rst:3357 +#: ../../library/stdtypes.rst:3401 msgid "" "The following methods on bytes and bytearray objects have default behaviours " "that assume the use of ASCII compatible binary formats, but can still be " @@ -4775,7 +4852,7 @@ msgid "" "instead produce new objects." msgstr "" -#: ../../library/stdtypes.rst:3366 +#: ../../library/stdtypes.rst:3410 msgid "" "Return a copy of the object centered in a sequence of length *width*. " "Padding is done using the specified *fillbyte* (default is an ASCII space). " @@ -4783,7 +4860,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:3380 +#: ../../library/stdtypes.rst:3424 msgid "" "Return a copy of the object left justified in a sequence of length *width*. " "Padding is done using the specified *fillbyte* (default is an ASCII space). " @@ -4791,7 +4868,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:3394 +#: ../../library/stdtypes.rst:3438 msgid "" "Return a copy of the sequence with specified leading bytes removed. The " "*chars* argument is a binary sequence specifying the set of byte values to " @@ -4801,7 +4878,7 @@ msgid "" "all combinations of its values are stripped::" msgstr "" -#: ../../library/stdtypes.rst:3401 +#: ../../library/stdtypes.rst:3445 msgid "" ">>> b' spacious '.lstrip()\n" "b'spacious '\n" @@ -4809,14 +4886,14 @@ msgid "" "b'example.com'" msgstr "" -#: ../../library/stdtypes.rst:3406 +#: ../../library/stdtypes.rst:3450 msgid "" "The binary sequence of byte values to remove may be any :term:`bytes-like " "object`. See :meth:`~bytes.removeprefix` for a method that will remove a " "single prefix string rather than all of a set of characters. For example::" msgstr "" -#: ../../library/stdtypes.rst:3411 +#: ../../library/stdtypes.rst:3455 msgid "" ">>> b'Arthur: three!'.lstrip(b'Arthur: ')\n" "b'ee!'\n" @@ -4824,7 +4901,7 @@ msgid "" "b'three!'" msgstr "" -#: ../../library/stdtypes.rst:3425 +#: ../../library/stdtypes.rst:3469 msgid "" "Return a copy of the object right justified in a sequence of length *width*. " "Padding is done using the specified *fillbyte* (default is an ASCII space). " @@ -4832,7 +4909,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../library/stdtypes.rst:3439 +#: ../../library/stdtypes.rst:3483 msgid "" "Split the binary sequence into subsequences of the same type, using *sep* as " "the delimiter string. If *maxsplit* is given, at most *maxsplit* splits are " @@ -4842,7 +4919,7 @@ msgid "" "described in detail below." msgstr "" -#: ../../library/stdtypes.rst:3450 +#: ../../library/stdtypes.rst:3494 msgid "" "Return a copy of the sequence with specified trailing bytes removed. The " "*chars* argument is a binary sequence specifying the set of byte values to " @@ -4852,7 +4929,7 @@ msgid "" "all combinations of its values are stripped::" msgstr "" -#: ../../library/stdtypes.rst:3457 +#: ../../library/stdtypes.rst:3501 msgid "" ">>> b' spacious '.rstrip()\n" "b' spacious'\n" @@ -4860,14 +4937,14 @@ msgid "" "b'mississ'" msgstr "" -#: ../../library/stdtypes.rst:3462 +#: ../../library/stdtypes.rst:3506 msgid "" "The binary sequence of byte values to remove may be any :term:`bytes-like " "object`. See :meth:`~bytes.removesuffix` for a method that will remove a " "single suffix string rather than all of a set of characters. For example::" msgstr "" -#: ../../library/stdtypes.rst:3467 +#: ../../library/stdtypes.rst:3511 msgid "" ">>> b'Monty Python'.rstrip(b' Python')\n" "b'M'\n" @@ -4875,7 +4952,7 @@ msgid "" "b'Monty'" msgstr "" -#: ../../library/stdtypes.rst:3481 +#: ../../library/stdtypes.rst:3525 msgid "" "Split the binary sequence into subsequences of the same type, using *sep* as " "the delimiter string. If *maxsplit* is given and non-negative, at most " @@ -4884,7 +4961,7 @@ msgid "" "limit on the number of splits (all possible splits are made)." msgstr "" -#: ../../library/stdtypes.rst:3487 +#: ../../library/stdtypes.rst:3531 msgid "" "If *sep* is given, consecutive delimiters are not grouped together and are " "deemed to delimit empty subsequences (for example, ``b'1,,2'.split(b',')`` " @@ -4895,7 +4972,7 @@ msgid "" "like object`." msgstr "" -#: ../../library/stdtypes.rst:3497 +#: ../../library/stdtypes.rst:3541 msgid "" ">>> b'1,2,3'.split(b',')\n" "[b'1', b'2', b'3']\n" @@ -4907,7 +4984,7 @@ msgid "" "[b'1', b'2', b'3<4']" msgstr "" -#: ../../library/stdtypes.rst:3506 +#: ../../library/stdtypes.rst:3550 msgid "" "If *sep* is not specified or is ``None``, a different splitting algorithm is " "applied: runs of consecutive ASCII whitespace are regarded as a single " @@ -4917,7 +4994,7 @@ msgid "" "without a specified separator returns ``[]``." msgstr "" -#: ../../library/stdtypes.rst:3516 +#: ../../library/stdtypes.rst:3560 msgid "" ">>> b'1 2 3'.split()\n" "[b'1', b'2', b'3']\n" @@ -4927,7 +5004,7 @@ msgid "" "[b'1', b'2', b'3']" msgstr "" -#: ../../library/stdtypes.rst:3527 +#: ../../library/stdtypes.rst:3571 msgid "" "Return a copy of the sequence with specified leading and trailing bytes " "removed. The *chars* argument is a binary sequence specifying the set of " @@ -4937,7 +5014,7 @@ msgid "" "a prefix or suffix; rather, all combinations of its values are stripped::" msgstr "" -#: ../../library/stdtypes.rst:3535 +#: ../../library/stdtypes.rst:3579 msgid "" ">>> b' spacious '.strip()\n" "b'spacious'\n" @@ -4945,13 +5022,13 @@ msgid "" "b'example'" msgstr "" -#: ../../library/stdtypes.rst:3540 +#: ../../library/stdtypes.rst:3584 msgid "" "The binary sequence of byte values to remove may be any :term:`bytes-like " "object`." msgstr "" -#: ../../library/stdtypes.rst:3549 +#: ../../library/stdtypes.rst:3593 msgid "" "The following methods on bytes and bytearray objects assume the use of ASCII " "compatible binary formats and should not be applied to arbitrary binary " @@ -4959,14 +5036,14 @@ msgid "" "operate in place, and instead produce new objects." msgstr "" -#: ../../library/stdtypes.rst:3557 +#: ../../library/stdtypes.rst:3601 msgid "" "Return a copy of the sequence with each byte interpreted as an ASCII " "character, and the first byte capitalized and the rest lowercased. Non-ASCII " "byte values are passed through unchanged." msgstr "" -#: ../../library/stdtypes.rst:3570 +#: ../../library/stdtypes.rst:3614 msgid "" "Return a copy of the sequence where all ASCII tab characters are replaced by " "one or more ASCII spaces, depending on the current column and the given tab " @@ -4982,7 +5059,7 @@ msgid "" "by one regardless of how the byte value is represented when printed::" msgstr "" -#: ../../library/stdtypes.rst:3584 +#: ../../library/stdtypes.rst:3628 msgid "" ">>> b'01\\t012\\t0123\\t01234'.expandtabs()\n" "b'01 012 0123 01234'\n" @@ -4990,7 +5067,7 @@ msgid "" "b'01 012 0123 01234'" msgstr "" -#: ../../library/stdtypes.rst:3598 +#: ../../library/stdtypes.rst:3642 msgid "" "Return ``True`` if all bytes in the sequence are alphabetical ASCII " "characters or ASCII decimal digits and the sequence is not empty, ``False`` " @@ -4999,7 +5076,7 @@ msgid "" "digits are those byte values in the sequence ``b'0123456789'``." msgstr "" -#: ../../library/stdtypes.rst:3606 +#: ../../library/stdtypes.rst:3650 msgid "" ">>> b'ABCabc1'.isalnum()\n" "True\n" @@ -5007,7 +5084,7 @@ msgid "" "False" msgstr "" -#: ../../library/stdtypes.rst:3615 +#: ../../library/stdtypes.rst:3659 msgid "" "Return ``True`` if all bytes in the sequence are alphabetic ASCII characters " "and the sequence is not empty, ``False`` otherwise. Alphabetic ASCII " @@ -5015,7 +5092,7 @@ msgid "" "``b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'``." msgstr "" -#: ../../library/stdtypes.rst:3622 +#: ../../library/stdtypes.rst:3666 msgid "" ">>> b'ABCabc'.isalpha()\n" "True\n" @@ -5023,20 +5100,20 @@ msgid "" "False" msgstr "" -#: ../../library/stdtypes.rst:3631 +#: ../../library/stdtypes.rst:3675 msgid "" "Return ``True`` if the sequence is empty or all bytes in the sequence are " "ASCII, ``False`` otherwise. ASCII bytes are in the range 0-0x7F." msgstr "" -#: ../../library/stdtypes.rst:3641 +#: ../../library/stdtypes.rst:3685 msgid "" "Return ``True`` if all bytes in the sequence are ASCII decimal digits and " "the sequence is not empty, ``False`` otherwise. ASCII decimal digits are " "those byte values in the sequence ``b'0123456789'``." msgstr "" -#: ../../library/stdtypes.rst:3647 +#: ../../library/stdtypes.rst:3691 msgid "" ">>> b'1234'.isdigit()\n" "True\n" @@ -5044,13 +5121,13 @@ msgid "" "False" msgstr "" -#: ../../library/stdtypes.rst:3656 +#: ../../library/stdtypes.rst:3700 msgid "" "Return ``True`` if there is at least one lowercase ASCII character in the " "sequence and no uppercase ASCII characters, ``False`` otherwise." msgstr "" -#: ../../library/stdtypes.rst:3661 +#: ../../library/stdtypes.rst:3705 msgid "" ">>> b'hello world'.islower()\n" "True\n" @@ -5058,16 +5135,16 @@ msgid "" "False" msgstr "" -#: ../../library/stdtypes.rst:3666 ../../library/stdtypes.rst:3708 -#: ../../library/stdtypes.rst:3724 ../../library/stdtypes.rst:3774 -#: ../../library/stdtypes.rst:3843 +#: ../../library/stdtypes.rst:3710 ../../library/stdtypes.rst:3752 +#: ../../library/stdtypes.rst:3768 ../../library/stdtypes.rst:3818 +#: ../../library/stdtypes.rst:3887 msgid "" "Lowercase ASCII characters are those byte values in the sequence " "``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte " "values in the sequence ``b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``." msgstr "" -#: ../../library/stdtypes.rst:3674 +#: ../../library/stdtypes.rst:3718 msgid "" "Return ``True`` if all bytes in the sequence are ASCII whitespace and the " "sequence is not empty, ``False`` otherwise. ASCII whitespace characters are " @@ -5075,14 +5152,14 @@ msgid "" "newline, carriage return, vertical tab, form feed)." msgstr "" -#: ../../library/stdtypes.rst:3683 +#: ../../library/stdtypes.rst:3727 msgid "" "Return ``True`` if the sequence is ASCII titlecase and the sequence is not " "empty, ``False`` otherwise. See :meth:`bytes.title` for more details on the " "definition of \"titlecase\"." msgstr "" -#: ../../library/stdtypes.rst:3689 +#: ../../library/stdtypes.rst:3733 msgid "" ">>> b'Hello World'.istitle()\n" "True\n" @@ -5090,14 +5167,14 @@ msgid "" "False" msgstr "" -#: ../../library/stdtypes.rst:3698 +#: ../../library/stdtypes.rst:3742 msgid "" "Return ``True`` if there is at least one uppercase alphabetic ASCII " "character in the sequence and no lowercase ASCII characters, ``False`` " "otherwise." msgstr "" -#: ../../library/stdtypes.rst:3703 +#: ../../library/stdtypes.rst:3747 msgid "" ">>> b'HELLO WORLD'.isupper()\n" "True\n" @@ -5105,19 +5182,19 @@ msgid "" "False" msgstr "" -#: ../../library/stdtypes.rst:3716 +#: ../../library/stdtypes.rst:3760 msgid "" "Return a copy of the sequence with all the uppercase ASCII characters " "converted to their corresponding lowercase counterpart." msgstr "" -#: ../../library/stdtypes.rst:3721 +#: ../../library/stdtypes.rst:3765 msgid "" ">>> b'Hello World'.lower()\n" "b'hello world'" msgstr "" -#: ../../library/stdtypes.rst:3741 +#: ../../library/stdtypes.rst:3785 msgid "" "Return a list of the lines in the binary sequence, breaking at ASCII line " "boundaries. This method uses the :term:`universal newlines` approach to " @@ -5125,7 +5202,7 @@ msgid "" "*keepends* is given and true." msgstr "" -#: ../../library/stdtypes.rst:3748 +#: ../../library/stdtypes.rst:3792 msgid "" ">>> b'ab c\\n\\nde fg\\rkl\\r\\n'.splitlines()\n" "[b'ab c', b'', b'de fg', b'kl']\n" @@ -5133,14 +5210,14 @@ msgid "" "[b'ab c\\n', b'\\n', b'de fg\\r', b'kl\\r\\n']" msgstr "" -#: ../../library/stdtypes.rst:3753 +#: ../../library/stdtypes.rst:3797 msgid "" "Unlike :meth:`~bytes.split` when a delimiter string *sep* is given, this " "method returns an empty list for the empty string, and a terminal line break " "does not result in an extra line::" msgstr "" -#: ../../library/stdtypes.rst:3757 +#: ../../library/stdtypes.rst:3801 msgid "" ">>> b\"\".split(b'\\n'), b\"Two lines\\n\".split(b'\\n')\n" "([b''], [b'Two lines', b''])\n" @@ -5148,19 +5225,19 @@ msgid "" "([], [b'One line'])" msgstr "" -#: ../../library/stdtypes.rst:3766 +#: ../../library/stdtypes.rst:3810 msgid "" "Return a copy of the sequence with all the lowercase ASCII characters " "converted to their corresponding uppercase counterpart and vice-versa." msgstr "" -#: ../../library/stdtypes.rst:3771 +#: ../../library/stdtypes.rst:3815 msgid "" ">>> b'Hello World'.swapcase()\n" "b'hELLO wORLD'" msgstr "" -#: ../../library/stdtypes.rst:3778 +#: ../../library/stdtypes.rst:3822 msgid "" "Unlike :func:`str.swapcase`, it is always the case that ``bin.swapcase()." "swapcase() == bin`` for the binary versions. Case conversions are " @@ -5168,20 +5245,20 @@ msgid "" "Unicode code points." msgstr "" -#: ../../library/stdtypes.rst:3792 +#: ../../library/stdtypes.rst:3836 msgid "" "Return a titlecased version of the binary sequence where words start with an " "uppercase ASCII character and the remaining characters are lowercase. " "Uncased byte values are left unmodified." msgstr "" -#: ../../library/stdtypes.rst:3798 +#: ../../library/stdtypes.rst:3842 msgid "" ">>> b'Hello world'.title()\n" "b'Hello World'" msgstr "" -#: ../../library/stdtypes.rst:3801 +#: ../../library/stdtypes.rst:3845 msgid "" "Lowercase ASCII characters are those byte values in the sequence " "``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte " @@ -5189,18 +5266,18 @@ msgid "" "values are uncased." msgstr "" -#: ../../library/stdtypes.rst:3811 +#: ../../library/stdtypes.rst:3855 msgid "" ">>> b\"they're bill's friends from the UK\".title()\n" "b\"They'Re Bill'S Friends From The Uk\"" msgstr "" -#: ../../library/stdtypes.rst:3814 +#: ../../library/stdtypes.rst:3858 msgid "" "A workaround for apostrophes can be constructed using regular expressions::" msgstr "" -#: ../../library/stdtypes.rst:3816 +#: ../../library/stdtypes.rst:3860 msgid "" ">>> import re\n" ">>> def titlecase(s):\n" @@ -5213,19 +5290,19 @@ msgid "" "b\"They're Bill's Friends.\"" msgstr "" -#: ../../library/stdtypes.rst:3835 +#: ../../library/stdtypes.rst:3879 msgid "" "Return a copy of the sequence with all the lowercase ASCII characters " "converted to their corresponding uppercase counterpart." msgstr "" -#: ../../library/stdtypes.rst:3840 +#: ../../library/stdtypes.rst:3884 msgid "" ">>> b'Hello World'.upper()\n" "b'HELLO WORLD'" msgstr "" -#: ../../library/stdtypes.rst:3856 +#: ../../library/stdtypes.rst:3900 msgid "" "Return a copy of the sequence left filled with ASCII ``b'0'`` digits to make " "a sequence of length *width*. A leading sign prefix (``b'+'``/ ``b'-'``) is " @@ -5234,7 +5311,7 @@ msgid "" "*width* is less than or equal to ``len(seq)``." msgstr "" -#: ../../library/stdtypes.rst:3864 +#: ../../library/stdtypes.rst:3908 msgid "" ">>> b\"42\".zfill(5)\n" "b'00042'\n" @@ -5242,11 +5319,11 @@ msgid "" "b'-0042'" msgstr "" -#: ../../library/stdtypes.rst:3878 +#: ../../library/stdtypes.rst:3922 msgid "``printf``-style Bytes Formatting" msgstr "" -#: ../../library/stdtypes.rst:3895 +#: ../../library/stdtypes.rst:3939 msgid "" "The formatting operations described here exhibit a variety of quirks that " "lead to a number of common errors (such as failing to display tuples and " @@ -5254,7 +5331,7 @@ msgid "" "dictionary, wrap it in a tuple." msgstr "" -#: ../../library/stdtypes.rst:3900 +#: ../../library/stdtypes.rst:3944 msgid "" "Bytes objects (``bytes``/``bytearray``) have one unique built-in operation: " "the ``%`` operator (modulo). This is also known as the bytes *formatting* or " @@ -5264,7 +5341,7 @@ msgid "" "func:`sprintf` in the C language." msgstr "" -#: ../../library/stdtypes.rst:3907 +#: ../../library/stdtypes.rst:3951 msgid "" "If *format* requires a single argument, *values* may be a single non-tuple " "object. [5]_ Otherwise, *values* must be a tuple with exactly the number of " @@ -5272,7 +5349,7 @@ msgid "" "example, a dictionary)." msgstr "" -#: ../../library/stdtypes.rst:3941 +#: ../../library/stdtypes.rst:3985 msgid "" "When the right argument is a dictionary (or other mapping type), then the " "formats in the bytes object *must* include a parenthesised mapping key into " @@ -5280,73 +5357,73 @@ msgid "" "mapping key selects the value to be formatted from the mapping. For example:" msgstr "" -#: ../../library/stdtypes.rst:4015 +#: ../../library/stdtypes.rst:4059 msgid "Single byte (accepts integer or single byte objects)." msgstr "" -#: ../../library/stdtypes.rst:4018 +#: ../../library/stdtypes.rst:4062 msgid "``'b'``" msgstr "" -#: ../../library/stdtypes.rst:4018 +#: ../../library/stdtypes.rst:4062 msgid "" "Bytes (any object that follows the :ref:`buffer protocol ` or " "has :meth:`~object.__bytes__`)." msgstr "" -#: ../../library/stdtypes.rst:4022 +#: ../../library/stdtypes.rst:4066 msgid "" "``'s'`` is an alias for ``'b'`` and should only be used for Python2/3 code " "bases." msgstr "" -#: ../../library/stdtypes.rst:4025 +#: ../../library/stdtypes.rst:4069 msgid "" "Bytes (converts any Python object using ``repr(obj).encode('ascii', " "'backslashreplace')``)." msgstr "" -#: ../../library/stdtypes.rst:4028 +#: ../../library/stdtypes.rst:4072 msgid "" "``'r'`` is an alias for ``'a'`` and should only be used for Python2/3 code " "bases." msgstr "" -#: ../../library/stdtypes.rst:4028 +#: ../../library/stdtypes.rst:4072 msgid "\\(7)" msgstr "" -#: ../../library/stdtypes.rst:4063 +#: ../../library/stdtypes.rst:4107 msgid "``b'%s'`` is deprecated, but will not be removed during the 3.x series." msgstr "" -#: ../../library/stdtypes.rst:4066 +#: ../../library/stdtypes.rst:4110 msgid "``b'%r'`` is deprecated, but will not be removed during the 3.x series." msgstr "" -#: ../../library/stdtypes.rst:4078 +#: ../../library/stdtypes.rst:4122 msgid ":pep:`461` - Adding % formatting to bytes and bytearray" msgstr "" -#: ../../library/stdtypes.rst:4085 +#: ../../library/stdtypes.rst:4129 msgid "Memory Views" msgstr "" -#: ../../library/stdtypes.rst:4087 +#: ../../library/stdtypes.rst:4131 msgid "" ":class:`memoryview` objects allow Python code to access the internal data of " "an object that supports the :ref:`buffer protocol ` without " "copying." msgstr "" -#: ../../library/stdtypes.rst:4093 +#: ../../library/stdtypes.rst:4137 msgid "" "Create a :class:`memoryview` that references *object*. *object* must " "support the buffer protocol. Built-in objects that support the buffer " "protocol include :class:`bytes` and :class:`bytearray`." msgstr "" -#: ../../library/stdtypes.rst:4097 +#: ../../library/stdtypes.rst:4141 msgid "" "A :class:`memoryview` has the notion of an *element*, which is the atomic " "memory unit handled by the originating *object*. For many simple types such " @@ -5354,32 +5431,32 @@ msgid "" "other types such as :class:`array.array` may have bigger elements." msgstr "" -#: ../../library/stdtypes.rst:4102 +#: ../../library/stdtypes.rst:4146 msgid "" "``len(view)`` is equal to the length of :class:`~memoryview.tolist`, which " "is the nested list representation of the view. If ``view.ndim = 1``, this is " "equal to the number of elements in the view." msgstr "" -#: ../../library/stdtypes.rst:4106 +#: ../../library/stdtypes.rst:4150 msgid "" "If ``view.ndim == 0``, ``len(view)`` now raises :exc:`TypeError` instead of " "returning 1." msgstr "" -#: ../../library/stdtypes.rst:4109 +#: ../../library/stdtypes.rst:4153 msgid "" "The :class:`~memoryview.itemsize` attribute will give you the number of " "bytes in a single element." msgstr "" -#: ../../library/stdtypes.rst:4112 +#: ../../library/stdtypes.rst:4156 msgid "" "A :class:`memoryview` supports slicing and indexing to expose its data. One-" "dimensional slicing will result in a subview::" msgstr "" -#: ../../library/stdtypes.rst:4115 +#: ../../library/stdtypes.rst:4159 msgid "" ">>> v = memoryview(b'abcefg')\n" ">>> v[1]\n" @@ -5392,7 +5469,7 @@ msgid "" "b'bce'" msgstr "" -#: ../../library/stdtypes.rst:4125 +#: ../../library/stdtypes.rst:4169 msgid "" "If :class:`~memoryview.format` is one of the native format specifiers from " "the :mod:`struct` module, indexing with an integer or a tuple of integers is " @@ -5403,11 +5480,11 @@ msgid "" "memoryviews can be indexed with the empty tuple." msgstr "" -#: ../../library/stdtypes.rst:4134 +#: ../../library/stdtypes.rst:4178 msgid "Here is an example with a non-byte format::" msgstr "" -#: ../../library/stdtypes.rst:4136 +#: ../../library/stdtypes.rst:4180 msgid "" ">>> import array\n" ">>> a = array.array('l', [-11111111, 22222222, -33333333, 44444444])\n" @@ -5420,13 +5497,13 @@ msgid "" "[-11111111, -33333333]" msgstr "" -#: ../../library/stdtypes.rst:4146 +#: ../../library/stdtypes.rst:4190 msgid "" "If the underlying object is writable, the memoryview supports one-" "dimensional slice assignment. Resizing is not allowed::" msgstr "" -#: ../../library/stdtypes.rst:4149 +#: ../../library/stdtypes.rst:4193 msgid "" ">>> data = bytearray(b'abcefg')\n" ">>> v = memoryview(data)\n" @@ -5448,14 +5525,14 @@ msgid "" "bytearray(b'z1spam')" msgstr "" -#: ../../library/stdtypes.rst:4167 +#: ../../library/stdtypes.rst:4211 msgid "" "One-dimensional memoryviews of :term:`hashable` (read-only) types with " "formats 'B', 'b' or 'c' are also hashable. The hash is defined as ``hash(m) " "== hash(m.tobytes())``::" msgstr "" -#: ../../library/stdtypes.rst:4171 +#: ../../library/stdtypes.rst:4215 msgid "" ">>> v = memoryview(b'abcefg')\n" ">>> hash(v) == hash(b'abcefg')\n" @@ -5466,44 +5543,44 @@ msgid "" "True" msgstr "" -#: ../../library/stdtypes.rst:4179 +#: ../../library/stdtypes.rst:4223 msgid "" "One-dimensional memoryviews can now be sliced. One-dimensional memoryviews " "with formats 'B', 'b' or 'c' are now :term:`hashable`." msgstr "" -#: ../../library/stdtypes.rst:4183 +#: ../../library/stdtypes.rst:4227 msgid "" "memoryview is now registered automatically with :class:`collections.abc." "Sequence`" msgstr "" -#: ../../library/stdtypes.rst:4187 +#: ../../library/stdtypes.rst:4231 msgid "memoryviews can now be indexed with tuple of integers." msgstr "" -#: ../../library/stdtypes.rst:4190 +#: ../../library/stdtypes.rst:4234 msgid "memoryview is now a :term:`generic type`." msgstr "" -#: ../../library/stdtypes.rst:4193 +#: ../../library/stdtypes.rst:4237 msgid ":class:`memoryview` has several methods:" msgstr "" -#: ../../library/stdtypes.rst:4197 +#: ../../library/stdtypes.rst:4241 msgid "" "A memoryview and a :pep:`3118` exporter are equal if their shapes are " "equivalent and if all corresponding values are equal when the operands' " "respective format codes are interpreted using :mod:`struct` syntax." msgstr "" -#: ../../library/stdtypes.rst:4201 +#: ../../library/stdtypes.rst:4245 msgid "" "For the subset of :mod:`struct` format strings currently supported by :meth:" "`tolist`, ``v`` and ``w`` are equal if ``v.tolist() == w.tolist()``::" msgstr "" -#: ../../library/stdtypes.rst:4204 +#: ../../library/stdtypes.rst:4248 msgid "" ">>> import array\n" ">>> a = array.array('I', [1, 2, 3, 4, 5])\n" @@ -5522,14 +5599,14 @@ msgid "" "True" msgstr "" -#: ../../library/stdtypes.rst:4220 +#: ../../library/stdtypes.rst:4264 msgid "" "If either format string is not supported by the :mod:`struct` module, then " "the objects will always compare as unequal (even if the format strings and " "buffer contents are identical)::" msgstr "" -#: ../../library/stdtypes.rst:4224 +#: ../../library/stdtypes.rst:4268 msgid "" ">>> from ctypes import BigEndianStructure, c_long\n" ">>> class BEPoint(BigEndianStructure):\n" @@ -5544,25 +5621,25 @@ msgid "" "False" msgstr "" -#: ../../library/stdtypes.rst:4236 +#: ../../library/stdtypes.rst:4280 msgid "" "Note that, as with floating-point numbers, ``v is w`` does *not* imply ``v " "== w`` for memoryview objects." msgstr "" -#: ../../library/stdtypes.rst:4239 +#: ../../library/stdtypes.rst:4283 msgid "" "Previous versions compared the raw memory disregarding the item format and " "the logical array structure." msgstr "" -#: ../../library/stdtypes.rst:4245 +#: ../../library/stdtypes.rst:4289 msgid "" "Return the data in the buffer as a bytestring. This is equivalent to " "calling the :class:`bytes` constructor on the memoryview. ::" msgstr "" -#: ../../library/stdtypes.rst:4248 +#: ../../library/stdtypes.rst:4292 msgid "" ">>> m = memoryview(b\"abc\")\n" ">>> m.tobytes()\n" @@ -5571,7 +5648,7 @@ msgid "" "b'abc'" msgstr "" -#: ../../library/stdtypes.rst:4254 +#: ../../library/stdtypes.rst:4298 msgid "" "For non-contiguous arrays the result is equal to the flattened list " "representation with all elements converted to bytes. :meth:`tobytes` " @@ -5579,7 +5656,7 @@ msgid "" "module syntax." msgstr "" -#: ../../library/stdtypes.rst:4259 +#: ../../library/stdtypes.rst:4303 msgid "" "*order* can be {'C', 'F', 'A'}. When *order* is 'C' or 'F', the data of the " "original array is converted to C or Fortran order. For contiguous views, 'A' " @@ -5588,31 +5665,31 @@ msgid "" "to C first. *order=None* is the same as *order='C'*." msgstr "" -#: ../../library/stdtypes.rst:4268 +#: ../../library/stdtypes.rst:4312 msgid "" "Return a string object containing two hexadecimal digits for each byte in " "the buffer. ::" msgstr "" -#: ../../library/stdtypes.rst:4271 +#: ../../library/stdtypes.rst:4315 msgid "" ">>> m = memoryview(b\"abc\")\n" ">>> m.hex()\n" "'616263'" msgstr "" -#: ../../library/stdtypes.rst:4277 +#: ../../library/stdtypes.rst:4321 msgid "" "Similar to :meth:`bytes.hex`, :meth:`memoryview.hex` now supports optional " "*sep* and *bytes_per_sep* parameters to insert separators between bytes in " "the hex output." msgstr "" -#: ../../library/stdtypes.rst:4284 +#: ../../library/stdtypes.rst:4328 msgid "Return the data in the buffer as a list of elements. ::" msgstr "" -#: ../../library/stdtypes.rst:4286 +#: ../../library/stdtypes.rst:4330 msgid "" ">>> memoryview(b'abc').tolist()\n" "[97, 98, 99]\n" @@ -5623,19 +5700,19 @@ msgid "" "[1.1, 2.2, 3.3]" msgstr "" -#: ../../library/stdtypes.rst:4294 +#: ../../library/stdtypes.rst:4338 msgid "" ":meth:`tolist` now supports all single character native formats in :mod:" "`struct` module syntax as well as multi-dimensional representations." msgstr "" -#: ../../library/stdtypes.rst:4301 +#: ../../library/stdtypes.rst:4345 msgid "" "Return a readonly version of the memoryview object. The original memoryview " "object is unchanged. ::" msgstr "" -#: ../../library/stdtypes.rst:4304 +#: ../../library/stdtypes.rst:4348 msgid "" ">>> m = memoryview(bytearray(b'abc'))\n" ">>> mm = m.toreadonly()\n" @@ -5650,7 +5727,7 @@ msgid "" "[43, 98, 99]" msgstr "" -#: ../../library/stdtypes.rst:4320 +#: ../../library/stdtypes.rst:4364 msgid "" "Release the underlying buffer exposed by the memoryview object. Many " "objects take special actions when a view is held on them (for example, a :" @@ -5659,14 +5736,14 @@ msgid "" "resources) as soon as possible." msgstr "" -#: ../../library/stdtypes.rst:4326 +#: ../../library/stdtypes.rst:4370 msgid "" "After this method has been called, any further operation on the view raises " "a :class:`ValueError` (except :meth:`release` itself which can be called " "multiple times)::" msgstr "" -#: ../../library/stdtypes.rst:4330 +#: ../../library/stdtypes.rst:4374 msgid "" ">>> m = memoryview(b'abc')\n" ">>> m.release()\n" @@ -5676,13 +5753,13 @@ msgid "" "ValueError: operation forbidden on released memoryview object" msgstr "" -#: ../../library/stdtypes.rst:4337 +#: ../../library/stdtypes.rst:4381 msgid "" "The context management protocol can be used for a similar effect, using the " "``with`` statement::" msgstr "" -#: ../../library/stdtypes.rst:4340 +#: ../../library/stdtypes.rst:4384 msgid "" ">>> with memoryview(b'abc') as m:\n" "... m[0]\n" @@ -5694,7 +5771,7 @@ msgid "" "ValueError: operation forbidden on released memoryview object" msgstr "" -#: ../../library/stdtypes.rst:4353 +#: ../../library/stdtypes.rst:4397 msgid "" "Cast a memoryview to a new format or shape. *shape* defaults to " "``[byte_length//new_itemsize]``, which means that the result view will be " @@ -5703,7 +5780,7 @@ msgid "" "contiguous -> 1D." msgstr "" -#: ../../library/stdtypes.rst:4359 +#: ../../library/stdtypes.rst:4403 msgid "" "The destination format is restricted to a single element native format in :" "mod:`struct` syntax. One of the formats must be a byte format ('B', 'b' or " @@ -5711,11 +5788,11 @@ msgid "" "Note that all byte lengths may depend on the operating system." msgstr "" -#: ../../library/stdtypes.rst:4365 +#: ../../library/stdtypes.rst:4409 msgid "Cast 1D/long to 1D/unsigned bytes::" msgstr "" -#: ../../library/stdtypes.rst:4367 +#: ../../library/stdtypes.rst:4411 msgid "" ">>> import array\n" ">>> a = array.array('l', [1,2,3])\n" @@ -5739,11 +5816,11 @@ msgid "" "24" msgstr "" -#: ../../library/stdtypes.rst:4388 +#: ../../library/stdtypes.rst:4432 msgid "Cast 1D/unsigned bytes to 1D/char::" msgstr "" -#: ../../library/stdtypes.rst:4390 +#: ../../library/stdtypes.rst:4434 msgid "" ">>> b = bytearray(b'zyz')\n" ">>> x = memoryview(b)\n" @@ -5757,11 +5834,11 @@ msgid "" "bytearray(b'ayz')" msgstr "" -#: ../../library/stdtypes.rst:4401 +#: ../../library/stdtypes.rst:4445 msgid "Cast 1D/bytes to 3D/ints to 1D/signed char::" msgstr "" -#: ../../library/stdtypes.rst:4403 +#: ../../library/stdtypes.rst:4447 msgid "" ">>> import struct\n" ">>> buf = struct.pack(\"i\"*12, *list(range(12)))\n" @@ -5788,11 +5865,11 @@ msgid "" "48" msgstr "" -#: ../../library/stdtypes.rst:4427 +#: ../../library/stdtypes.rst:4471 msgid "Cast 1D/unsigned long to 2D/unsigned long::" msgstr "" -#: ../../library/stdtypes.rst:4429 +#: ../../library/stdtypes.rst:4473 msgid "" ">>> buf = struct.pack(\"L\"*6, *list(range(6)))\n" ">>> x = memoryview(buf)\n" @@ -5805,33 +5882,33 @@ msgid "" "[[0, 1, 2], [3, 4, 5]]" msgstr "" -#: ../../library/stdtypes.rst:4441 +#: ../../library/stdtypes.rst:4485 msgid "The source format is no longer restricted when casting to a byte view." msgstr "" -#: ../../library/stdtypes.rst:4446 +#: ../../library/stdtypes.rst:4490 msgid "Count the number of occurrences of *value*." msgstr "" -#: ../../library/stdtypes.rst:4452 +#: ../../library/stdtypes.rst:4496 msgid "" "Return the index of the first occurrence of *value* (at or after index " "*start* and before index *stop*)." msgstr "" -#: ../../library/stdtypes.rst:4455 +#: ../../library/stdtypes.rst:4499 msgid "Raises a :exc:`ValueError` if *value* cannot be found." msgstr "" -#: ../../library/stdtypes.rst:4459 +#: ../../library/stdtypes.rst:4503 msgid "There are also several readonly attributes available:" msgstr "" -#: ../../library/stdtypes.rst:4463 +#: ../../library/stdtypes.rst:4507 msgid "The underlying object of the memoryview::" msgstr "" -#: ../../library/stdtypes.rst:4465 +#: ../../library/stdtypes.rst:4509 msgid "" ">>> b = bytearray(b'xyz')\n" ">>> m = memoryview(b)\n" @@ -5839,14 +5916,14 @@ msgid "" "True" msgstr "" -#: ../../library/stdtypes.rst:4474 +#: ../../library/stdtypes.rst:4518 msgid "" "``nbytes == product(shape) * itemsize == len(m.tobytes())``. This is the " "amount of space in bytes that the array would use in a contiguous " "representation. It is not necessarily equal to ``len(m)``::" msgstr "" -#: ../../library/stdtypes.rst:4478 +#: ../../library/stdtypes.rst:4522 msgid "" ">>> import array\n" ">>> a = array.array('i', [1,2,3,4,5])\n" @@ -5864,11 +5941,11 @@ msgid "" "12" msgstr "" -#: ../../library/stdtypes.rst:4493 +#: ../../library/stdtypes.rst:4537 msgid "Multi-dimensional arrays::" msgstr "" -#: ../../library/stdtypes.rst:4495 +#: ../../library/stdtypes.rst:4539 msgid "" ">>> import struct\n" ">>> buf = struct.pack(\"d\"*12, *[1.5*x for x in range(12)])\n" @@ -5882,11 +5959,11 @@ msgid "" "96" msgstr "" -#: ../../library/stdtypes.rst:4510 +#: ../../library/stdtypes.rst:4554 msgid "A bool indicating whether the memory is read only." msgstr "" -#: ../../library/stdtypes.rst:4514 +#: ../../library/stdtypes.rst:4558 msgid "" "A string containing the format (in :mod:`struct` module style) for each " "element in the view. A memoryview can be created from exporters with " @@ -5894,17 +5971,17 @@ msgid "" "restricted to native single element formats." msgstr "" -#: ../../library/stdtypes.rst:4519 +#: ../../library/stdtypes.rst:4563 msgid "" "format ``'B'`` is now handled according to the struct module syntax. This " "means that ``memoryview(b'abc')[0] == b'abc'[0] == 97``." msgstr "" -#: ../../library/stdtypes.rst:4525 +#: ../../library/stdtypes.rst:4569 msgid "The size in bytes of each element of the memoryview::" msgstr "" -#: ../../library/stdtypes.rst:4527 +#: ../../library/stdtypes.rst:4571 msgid "" ">>> import array, struct\n" ">>> m = memoryview(array.array('H', [32000, 32001, 32002]))\n" @@ -5916,49 +5993,49 @@ msgid "" "True" msgstr "" -#: ../../library/stdtypes.rst:4538 +#: ../../library/stdtypes.rst:4582 msgid "" "An integer indicating how many dimensions of a multi-dimensional array the " "memory represents." msgstr "" -#: ../../library/stdtypes.rst:4543 +#: ../../library/stdtypes.rst:4587 msgid "" "A tuple of integers the length of :attr:`ndim` giving the shape of the " "memory as an N-dimensional array." msgstr "" -#: ../../library/stdtypes.rst:4546 ../../library/stdtypes.rst:4554 +#: ../../library/stdtypes.rst:4590 ../../library/stdtypes.rst:4598 msgid "An empty tuple instead of ``None`` when ndim = 0." msgstr "" -#: ../../library/stdtypes.rst:4551 +#: ../../library/stdtypes.rst:4595 msgid "" "A tuple of integers the length of :attr:`ndim` giving the size in bytes to " "access each element for each dimension of the array." msgstr "" -#: ../../library/stdtypes.rst:4559 +#: ../../library/stdtypes.rst:4603 msgid "Used internally for PIL-style arrays. The value is informational only." msgstr "" -#: ../../library/stdtypes.rst:4563 +#: ../../library/stdtypes.rst:4607 msgid "A bool indicating whether the memory is C-:term:`contiguous`." msgstr "" -#: ../../library/stdtypes.rst:4569 +#: ../../library/stdtypes.rst:4613 msgid "A bool indicating whether the memory is Fortran :term:`contiguous`." msgstr "" -#: ../../library/stdtypes.rst:4575 +#: ../../library/stdtypes.rst:4619 msgid "A bool indicating whether the memory is :term:`contiguous`." msgstr "" -#: ../../library/stdtypes.rst:4583 +#: ../../library/stdtypes.rst:4627 msgid "Set Types --- :class:`set`, :class:`frozenset`" msgstr "" -#: ../../library/stdtypes.rst:4587 +#: ../../library/stdtypes.rst:4631 msgid "" "A :dfn:`set` object is an unordered collection of distinct :term:`hashable` " "objects. Common uses include membership testing, removing duplicates from a " @@ -5968,7 +6045,7 @@ msgid "" "`collections` module.)" msgstr "" -#: ../../library/stdtypes.rst:4594 +#: ../../library/stdtypes.rst:4638 msgid "" "Like other collections, sets support ``x in set``, ``len(set)``, and ``for x " "in set``. Being an unordered collection, sets do not record element " @@ -5976,7 +6053,7 @@ msgid "" "slicing, or other sequence-like behavior." msgstr "" -#: ../../library/stdtypes.rst:4599 +#: ../../library/stdtypes.rst:4643 msgid "" "There are currently two built-in set types, :class:`set` and :class:" "`frozenset`. The :class:`set` type is mutable --- the contents can be " @@ -5988,18 +6065,18 @@ msgid "" "of another set." msgstr "" -#: ../../library/stdtypes.rst:4607 +#: ../../library/stdtypes.rst:4651 msgid "" "Non-empty sets (not frozensets) can be created by placing a comma-separated " "list of elements within braces, for example: ``{'jack', 'sjoerd'}``, in " "addition to the :class:`set` constructor." msgstr "" -#: ../../library/stdtypes.rst:4611 +#: ../../library/stdtypes.rst:4655 msgid "The constructors for both classes work the same:" msgstr "" -#: ../../library/stdtypes.rst:4616 +#: ../../library/stdtypes.rst:4660 msgid "" "Return a new set or frozenset object whose elements are taken from " "*iterable*. The elements of a set must be :term:`hashable`. To represent " @@ -6007,92 +6084,92 @@ msgid "" "*iterable* is not specified, a new empty set is returned." msgstr "" -#: ../../library/stdtypes.rst:4622 +#: ../../library/stdtypes.rst:4666 msgid "Sets can be created by several means:" msgstr "" -#: ../../library/stdtypes.rst:4624 +#: ../../library/stdtypes.rst:4668 msgid "" "Use a comma-separated list of elements within braces: ``{'jack', 'sjoerd'}``" msgstr "" -#: ../../library/stdtypes.rst:4625 +#: ../../library/stdtypes.rst:4669 msgid "" "Use a set comprehension: ``{c for c in 'abracadabra' if c not in 'abc'}``" msgstr "" -#: ../../library/stdtypes.rst:4626 +#: ../../library/stdtypes.rst:4670 msgid "" "Use the type constructor: ``set()``, ``set('foobar')``, ``set(['a', 'b', " "'foo'])``" msgstr "" -#: ../../library/stdtypes.rst:4628 +#: ../../library/stdtypes.rst:4672 msgid "" "Instances of :class:`set` and :class:`frozenset` provide the following " "operations:" msgstr "" -#: ../../library/stdtypes.rst:4633 +#: ../../library/stdtypes.rst:4677 msgid "Return the number of elements in set *s* (cardinality of *s*)." msgstr "" -#: ../../library/stdtypes.rst:4637 +#: ../../library/stdtypes.rst:4681 msgid "Test *x* for membership in *s*." msgstr "" -#: ../../library/stdtypes.rst:4641 +#: ../../library/stdtypes.rst:4685 msgid "Test *x* for non-membership in *s*." msgstr "" -#: ../../library/stdtypes.rst:4645 +#: ../../library/stdtypes.rst:4689 msgid "" "Return ``True`` if the set has no elements in common with *other*. Sets are " "disjoint if and only if their intersection is the empty set." msgstr "" -#: ../../library/stdtypes.rst:4651 +#: ../../library/stdtypes.rst:4695 msgid "Test whether every element in the set is in *other*." msgstr "" -#: ../../library/stdtypes.rst:4655 +#: ../../library/stdtypes.rst:4699 msgid "" "Test whether the set is a proper subset of *other*, that is, ``set <= other " "and set != other``." msgstr "" -#: ../../library/stdtypes.rst:4661 +#: ../../library/stdtypes.rst:4705 msgid "Test whether every element in *other* is in the set." msgstr "" -#: ../../library/stdtypes.rst:4665 +#: ../../library/stdtypes.rst:4709 msgid "" "Test whether the set is a proper superset of *other*, that is, ``set >= " "other and set != other``." msgstr "" -#: ../../library/stdtypes.rst:4671 +#: ../../library/stdtypes.rst:4715 msgid "Return a new set with elements from the set and all others." msgstr "" -#: ../../library/stdtypes.rst:4676 +#: ../../library/stdtypes.rst:4720 msgid "Return a new set with elements common to the set and all others." msgstr "" -#: ../../library/stdtypes.rst:4681 +#: ../../library/stdtypes.rst:4725 msgid "Return a new set with elements in the set that are not in the others." msgstr "" -#: ../../library/stdtypes.rst:4686 +#: ../../library/stdtypes.rst:4730 msgid "" "Return a new set with elements in either the set or *other* but not both." msgstr "" -#: ../../library/stdtypes.rst:4690 +#: ../../library/stdtypes.rst:4734 msgid "Return a shallow copy of the set." msgstr "" -#: ../../library/stdtypes.rst:4693 +#: ../../library/stdtypes.rst:4737 msgid "" "Note, the non-operator versions of :meth:`union`, :meth:`intersection`, :" "meth:`difference`, :meth:`symmetric_difference`, :meth:`issubset`, and :meth:" @@ -6102,7 +6179,7 @@ msgid "" "the more readable ``set('abc').intersection('cbs')``." msgstr "" -#: ../../library/stdtypes.rst:4700 +#: ../../library/stdtypes.rst:4744 msgid "" "Both :class:`set` and :class:`frozenset` support set to set comparisons. Two " "sets are equal if and only if every element of each set is contained in the " @@ -6112,14 +6189,14 @@ msgid "" "set is a proper superset of the second set (is a superset, but is not equal)." msgstr "" -#: ../../library/stdtypes.rst:4707 +#: ../../library/stdtypes.rst:4751 msgid "" "Instances of :class:`set` are compared to instances of :class:`frozenset` " "based on their members. For example, ``set('abc') == frozenset('abc')`` " "returns ``True`` and so does ``set('abc') in set([frozenset('abc')])``." msgstr "" -#: ../../library/stdtypes.rst:4711 +#: ../../library/stdtypes.rst:4755 msgid "" "The subset and equality comparisons do not generalize to a total ordering " "function. For example, any two nonempty disjoint sets are not equal and are " @@ -6127,71 +6204,71 @@ msgid "" "``ab``." msgstr "" -#: ../../library/stdtypes.rst:4716 +#: ../../library/stdtypes.rst:4760 msgid "" "Since sets only define partial ordering (subset relationships), the output " "of the :meth:`list.sort` method is undefined for lists of sets." msgstr "" -#: ../../library/stdtypes.rst:4719 +#: ../../library/stdtypes.rst:4763 msgid "Set elements, like dictionary keys, must be :term:`hashable`." msgstr "" -#: ../../library/stdtypes.rst:4721 +#: ../../library/stdtypes.rst:4765 msgid "" "Binary operations that mix :class:`set` instances with :class:`frozenset` " "return the type of the first operand. For example: ``frozenset('ab') | " "set('bc')`` returns an instance of :class:`frozenset`." msgstr "" -#: ../../library/stdtypes.rst:4725 +#: ../../library/stdtypes.rst:4769 msgid "" "The following table lists operations available for :class:`set` that do not " "apply to immutable instances of :class:`frozenset`:" msgstr "" -#: ../../library/stdtypes.rst:4731 +#: ../../library/stdtypes.rst:4775 msgid "Update the set, adding elements from all others." msgstr "" -#: ../../library/stdtypes.rst:4736 +#: ../../library/stdtypes.rst:4780 msgid "Update the set, keeping only elements found in it and all others." msgstr "" -#: ../../library/stdtypes.rst:4741 +#: ../../library/stdtypes.rst:4785 msgid "Update the set, removing elements found in others." msgstr "" -#: ../../library/stdtypes.rst:4746 +#: ../../library/stdtypes.rst:4790 msgid "" "Update the set, keeping only elements found in either set, but not in both." msgstr "" -#: ../../library/stdtypes.rst:4750 +#: ../../library/stdtypes.rst:4794 msgid "Add element *elem* to the set." msgstr "" -#: ../../library/stdtypes.rst:4754 +#: ../../library/stdtypes.rst:4798 msgid "" "Remove element *elem* from the set. Raises :exc:`KeyError` if *elem* is not " "contained in the set." msgstr "" -#: ../../library/stdtypes.rst:4759 +#: ../../library/stdtypes.rst:4803 msgid "Remove element *elem* from the set if it is present." msgstr "" -#: ../../library/stdtypes.rst:4763 +#: ../../library/stdtypes.rst:4807 msgid "" "Remove and return an arbitrary element from the set. Raises :exc:`KeyError` " "if the set is empty." msgstr "" -#: ../../library/stdtypes.rst:4768 +#: ../../library/stdtypes.rst:4812 msgid "Remove all elements from the set." msgstr "" -#: ../../library/stdtypes.rst:4771 +#: ../../library/stdtypes.rst:4815 msgid "" "Note, the non-operator versions of the :meth:`update`, :meth:" "`intersection_update`, :meth:`difference_update`, and :meth:" @@ -6199,18 +6276,18 @@ msgid "" "argument." msgstr "" -#: ../../library/stdtypes.rst:4776 +#: ../../library/stdtypes.rst:4820 msgid "" "Note, the *elem* argument to the :meth:`~object.__contains__`, :meth:" "`remove`, and :meth:`discard` methods may be a set. To support searching " "for an equivalent frozenset, a temporary one is created from *elem*." msgstr "" -#: ../../library/stdtypes.rst:4785 +#: ../../library/stdtypes.rst:4829 msgid "Mapping Types --- :class:`dict`" msgstr "" -#: ../../library/stdtypes.rst:4795 +#: ../../library/stdtypes.rst:4839 msgid "" "A :term:`mapping` object maps :term:`hashable` values to arbitrary objects. " "Mappings are mutable objects. There is currently only one standard mapping " @@ -6219,7 +6296,7 @@ msgid "" "module.)" msgstr "" -#: ../../library/stdtypes.rst:4801 +#: ../../library/stdtypes.rst:4845 msgid "" "A dictionary's keys are *almost* arbitrary values. Values that are not :" "term:`hashable`, that is, values containing lists, dictionaries or other " @@ -6228,33 +6305,33 @@ msgid "" "and ``True``) can be used interchangeably to index the same dictionary entry." msgstr "" -#: ../../library/stdtypes.rst:4812 +#: ../../library/stdtypes.rst:4856 msgid "" "Return a new dictionary initialized from an optional positional argument and " "a possibly empty set of keyword arguments." msgstr "" -#: ../../library/stdtypes.rst:4815 +#: ../../library/stdtypes.rst:4859 msgid "Dictionaries can be created by several means:" msgstr "" -#: ../../library/stdtypes.rst:4817 +#: ../../library/stdtypes.rst:4861 msgid "" "Use a comma-separated list of ``key: value`` pairs within braces: ``{'jack': " "4098, 'sjoerd': 4127}`` or ``{4098: 'jack', 4127: 'sjoerd'}``" msgstr "" -#: ../../library/stdtypes.rst:4819 +#: ../../library/stdtypes.rst:4863 msgid "Use a dict comprehension: ``{}``, ``{x: x ** 2 for x in range(10)}``" msgstr "" -#: ../../library/stdtypes.rst:4820 +#: ../../library/stdtypes.rst:4864 msgid "" "Use the type constructor: ``dict()``, ``dict([('foo', 100), ('bar', " "200)])``, ``dict(foo=100, bar=200)``" msgstr "" -#: ../../library/stdtypes.rst:4823 +#: ../../library/stdtypes.rst:4867 msgid "" "If no positional argument is given, an empty dictionary is created. If a " "positional argument is given and it defines a ``keys()`` method, a " @@ -6267,7 +6344,7 @@ msgid "" "that key becomes the corresponding value in the new dictionary." msgstr "" -#: ../../library/stdtypes.rst:4833 +#: ../../library/stdtypes.rst:4877 msgid "" "If keyword arguments are given, the keyword arguments and their values are " "added to the dictionary created from the positional argument. If a key " @@ -6275,13 +6352,13 @@ msgid "" "the value from the positional argument." msgstr "" -#: ../../library/stdtypes.rst:4838 ../../library/stdtypes.rst:4856 +#: ../../library/stdtypes.rst:4882 ../../library/stdtypes.rst:4900 msgid "" "Providing keyword arguments as in the first example only works for keys that " "are valid Python identifiers. Otherwise, any valid keys can be used." msgstr "" -#: ../../library/stdtypes.rst:4841 +#: ../../library/stdtypes.rst:4885 msgid "" "Dictionaries compare equal if and only if they have the same ``(key, " "value)`` pairs (regardless of ordering). Order comparisons ('<', '<=', '>=', " @@ -6290,7 +6367,7 @@ msgid "" "``{\"one\": 1, \"two\": 2, \"three\": 3}``::" msgstr "" -#: ../../library/stdtypes.rst:4847 +#: ../../library/stdtypes.rst:4891 msgid "" ">>> a = dict(one=1, two=2, three=3)\n" ">>> b = {'one': 1, 'two': 2, 'three': 3}\n" @@ -6302,13 +6379,13 @@ msgid "" "True" msgstr "" -#: ../../library/stdtypes.rst:4859 +#: ../../library/stdtypes.rst:4903 msgid "" "Dictionaries preserve insertion order. Note that updating a key does not " "affect the order. Keys added after deletion are inserted at the end. ::" msgstr "" -#: ../../library/stdtypes.rst:4862 +#: ../../library/stdtypes.rst:4906 msgid "" ">>> d = {\"one\": 1, \"two\": 2, \"three\": 3, \"four\": 4}\n" ">>> d\n" @@ -6326,33 +6403,33 @@ msgid "" "{'one': 42, 'three': 3, 'four': 4, 'two': None}" msgstr "" -#: ../../library/stdtypes.rst:4877 +#: ../../library/stdtypes.rst:4921 msgid "" "Dictionary order is guaranteed to be insertion order. This behavior was an " "implementation detail of CPython from 3.6." msgstr "" -#: ../../library/stdtypes.rst:4881 +#: ../../library/stdtypes.rst:4925 msgid "" "These are the operations that dictionaries support (and therefore, custom " "mapping types should support too):" msgstr "" -#: ../../library/stdtypes.rst:4886 +#: ../../library/stdtypes.rst:4930 msgid "Return a list of all the keys used in the dictionary *d*." msgstr "" -#: ../../library/stdtypes.rst:4890 +#: ../../library/stdtypes.rst:4934 msgid "Return the number of items in the dictionary *d*." msgstr "" -#: ../../library/stdtypes.rst:4894 +#: ../../library/stdtypes.rst:4938 msgid "" "Return the item of *d* with key *key*. Raises a :exc:`KeyError` if *key* is " "not in the map." msgstr "" -#: ../../library/stdtypes.rst:4899 +#: ../../library/stdtypes.rst:4943 msgid "" "If a subclass of dict defines a method :meth:`__missing__` and *key* is not " "present, the ``d[key]`` operation calls that method with the key *key* as " @@ -6363,7 +6440,7 @@ msgid "" "an instance variable::" msgstr "" -#: ../../library/stdtypes.rst:4907 +#: ../../library/stdtypes.rst:4951 msgid "" ">>> class Counter(dict):\n" "... def __missing__(self, key):\n" @@ -6377,51 +6454,51 @@ msgid "" "1" msgstr "" -#: ../../library/stdtypes.rst:4918 +#: ../../library/stdtypes.rst:4962 msgid "" "The example above shows part of the implementation of :class:`collections." "Counter`. A different ``__missing__`` method is used by :class:`collections." "defaultdict`." msgstr "" -#: ../../library/stdtypes.rst:4924 +#: ../../library/stdtypes.rst:4968 msgid "Set ``d[key]`` to *value*." msgstr "" -#: ../../library/stdtypes.rst:4928 +#: ../../library/stdtypes.rst:4972 msgid "" "Remove ``d[key]`` from *d*. Raises a :exc:`KeyError` if *key* is not in the " "map." msgstr "" -#: ../../library/stdtypes.rst:4933 +#: ../../library/stdtypes.rst:4977 msgid "Return ``True`` if *d* has a key *key*, else ``False``." msgstr "" -#: ../../library/stdtypes.rst:4937 +#: ../../library/stdtypes.rst:4981 msgid "Equivalent to ``not key in d``." msgstr "" -#: ../../library/stdtypes.rst:4941 +#: ../../library/stdtypes.rst:4985 msgid "" "Return an iterator over the keys of the dictionary. This is a shortcut for " "``iter(d.keys())``." msgstr "" -#: ../../library/stdtypes.rst:4946 +#: ../../library/stdtypes.rst:4990 msgid "Remove all items from the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4950 +#: ../../library/stdtypes.rst:4994 msgid "Return a shallow copy of the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4954 +#: ../../library/stdtypes.rst:4998 msgid "" "Create a new dictionary with keys from *iterable* and values set to *value*." msgstr "" -#: ../../library/stdtypes.rst:4956 +#: ../../library/stdtypes.rst:5000 msgid "" ":meth:`fromkeys` is a class method that returns a new dictionary. *value* " "defaults to ``None``. All of the values refer to just a single instance, so " @@ -6430,70 +6507,70 @@ msgid "" "` instead." msgstr "" -#: ../../library/stdtypes.rst:4964 +#: ../../library/stdtypes.rst:5008 msgid "" "Return the value for *key* if *key* is in the dictionary, else *default*. If " "*default* is not given, it defaults to ``None``, so that this method never " "raises a :exc:`KeyError`." msgstr "" -#: ../../library/stdtypes.rst:4970 +#: ../../library/stdtypes.rst:5014 msgid "" "Return a new view of the dictionary's items (``(key, value)`` pairs). See " "the :ref:`documentation of view objects `." msgstr "" -#: ../../library/stdtypes.rst:4975 +#: ../../library/stdtypes.rst:5019 msgid "" "Return a new view of the dictionary's keys. See the :ref:`documentation of " "view objects `." msgstr "" -#: ../../library/stdtypes.rst:4980 +#: ../../library/stdtypes.rst:5024 msgid "" "If *key* is in the dictionary, remove it and return its value, else return " "*default*. If *default* is not given and *key* is not in the dictionary, a :" "exc:`KeyError` is raised." msgstr "" -#: ../../library/stdtypes.rst:4986 +#: ../../library/stdtypes.rst:5030 msgid "" "Remove and return a ``(key, value)`` pair from the dictionary. Pairs are " "returned in :abbr:`LIFO (last-in, first-out)` order." msgstr "" -#: ../../library/stdtypes.rst:4989 +#: ../../library/stdtypes.rst:5033 msgid "" ":meth:`popitem` is useful to destructively iterate over a dictionary, as " "often used in set algorithms. If the dictionary is empty, calling :meth:" "`popitem` raises a :exc:`KeyError`." msgstr "" -#: ../../library/stdtypes.rst:4993 +#: ../../library/stdtypes.rst:5037 msgid "" "LIFO order is now guaranteed. In prior versions, :meth:`popitem` would " "return an arbitrary key/value pair." msgstr "" -#: ../../library/stdtypes.rst:4999 +#: ../../library/stdtypes.rst:5043 msgid "" "Return a reverse iterator over the keys of the dictionary. This is a " "shortcut for ``reversed(d.keys())``." msgstr "" -#: ../../library/stdtypes.rst:5006 +#: ../../library/stdtypes.rst:5050 msgid "" "If *key* is in the dictionary, return its value. If not, insert *key* with " "a value of *default* and return *default*. *default* defaults to ``None``." msgstr "" -#: ../../library/stdtypes.rst:5012 +#: ../../library/stdtypes.rst:5056 msgid "" "Update the dictionary with the key/value pairs from *other*, overwriting " "existing keys. Return ``None``." msgstr "" -#: ../../library/stdtypes.rst:5015 +#: ../../library/stdtypes.rst:5059 msgid "" ":meth:`update` accepts either another object with a ``keys()`` method (in " "which case :meth:`~object.__getitem__` is called with every key returned " @@ -6502,45 +6579,45 @@ msgid "" "is then updated with those key/value pairs: ``d.update(red=1, blue=2)``." msgstr "" -#: ../../library/stdtypes.rst:5023 +#: ../../library/stdtypes.rst:5067 msgid "" "Return a new view of the dictionary's values. See the :ref:`documentation " "of view objects `." msgstr "" -#: ../../library/stdtypes.rst:5026 +#: ../../library/stdtypes.rst:5070 msgid "" "An equality comparison between one ``dict.values()`` view and another will " "always return ``False``. This also applies when comparing ``dict.values()`` " "to itself::" msgstr "" -#: ../../library/stdtypes.rst:5030 +#: ../../library/stdtypes.rst:5074 msgid "" ">>> d = {'a': 1}\n" ">>> d.values() == d.values()\n" "False" msgstr "" -#: ../../library/stdtypes.rst:5036 +#: ../../library/stdtypes.rst:5080 msgid "" "Create a new dictionary with the merged keys and values of *d* and *other*, " "which must both be dictionaries. The values of *other* take priority when " "*d* and *other* share keys." msgstr "" -#: ../../library/stdtypes.rst:5044 +#: ../../library/stdtypes.rst:5088 msgid "" "Update the dictionary *d* with keys and values from *other*, which may be " "either a :term:`mapping` or an :term:`iterable` of key/value pairs. The " "values of *other* take priority when *d* and *other* share keys." msgstr "" -#: ../../library/stdtypes.rst:5050 +#: ../../library/stdtypes.rst:5094 msgid "Dictionaries and dictionary views are reversible. ::" msgstr "" -#: ../../library/stdtypes.rst:5052 +#: ../../library/stdtypes.rst:5096 msgid "" ">>> d = {\"one\": 1, \"two\": 2, \"three\": 3, \"four\": 4}\n" ">>> d\n" @@ -6553,21 +6630,21 @@ msgid "" "[('four', 4), ('three', 3), ('two', 2), ('one', 1)]" msgstr "" -#: ../../library/stdtypes.rst:5062 +#: ../../library/stdtypes.rst:5106 msgid "Dictionaries are now reversible." msgstr "" -#: ../../library/stdtypes.rst:5067 +#: ../../library/stdtypes.rst:5111 msgid "" ":class:`types.MappingProxyType` can be used to create a read-only view of a :" "class:`dict`." msgstr "" -#: ../../library/stdtypes.rst:5074 +#: ../../library/stdtypes.rst:5118 msgid "Dictionary view objects" msgstr "" -#: ../../library/stdtypes.rst:5076 +#: ../../library/stdtypes.rst:5120 msgid "" "The objects returned by :meth:`dict.keys`, :meth:`dict.values` and :meth:" "`dict.items` are *view objects*. They provide a dynamic view on the " @@ -6575,23 +6652,23 @@ msgid "" "reflects these changes." msgstr "" -#: ../../library/stdtypes.rst:5081 +#: ../../library/stdtypes.rst:5125 msgid "" "Dictionary views can be iterated over to yield their respective data, and " "support membership tests:" msgstr "" -#: ../../library/stdtypes.rst:5086 +#: ../../library/stdtypes.rst:5130 msgid "Return the number of entries in the dictionary." msgstr "" -#: ../../library/stdtypes.rst:5090 +#: ../../library/stdtypes.rst:5134 msgid "" "Return an iterator over the keys, values or items (represented as tuples of " "``(key, value)``) in the dictionary." msgstr "" -#: ../../library/stdtypes.rst:5093 +#: ../../library/stdtypes.rst:5137 msgid "" "Keys and values are iterated over in insertion order. This allows the " "creation of ``(value, key)`` pairs using :func:`zip`: ``pairs = zip(d." @@ -6599,39 +6676,39 @@ msgid "" "[(v, k) for (k, v) in d.items()]``." msgstr "" -#: ../../library/stdtypes.rst:5098 +#: ../../library/stdtypes.rst:5142 msgid "" "Iterating views while adding or deleting entries in the dictionary may raise " "a :exc:`RuntimeError` or fail to iterate over all entries." msgstr "" -#: ../../library/stdtypes.rst:5101 +#: ../../library/stdtypes.rst:5145 msgid "Dictionary order is guaranteed to be insertion order." msgstr "" -#: ../../library/stdtypes.rst:5106 +#: ../../library/stdtypes.rst:5150 msgid "" "Return ``True`` if *x* is in the underlying dictionary's keys, values or " "items (in the latter case, *x* should be a ``(key, value)`` tuple)." msgstr "" -#: ../../library/stdtypes.rst:5111 +#: ../../library/stdtypes.rst:5155 msgid "" "Return a reverse iterator over the keys, values or items of the dictionary. " "The view will be iterated in reverse order of the insertion." msgstr "" -#: ../../library/stdtypes.rst:5114 +#: ../../library/stdtypes.rst:5158 msgid "Dictionary views are now reversible." msgstr "" -#: ../../library/stdtypes.rst:5119 +#: ../../library/stdtypes.rst:5163 msgid "" "Return a :class:`types.MappingProxyType` that wraps the original dictionary " "to which the view refers." msgstr "" -#: ../../library/stdtypes.rst:5124 +#: ../../library/stdtypes.rst:5168 msgid "" "Keys views are set-like since their entries are unique and :term:`hashable`. " "Items views also have set-like operations since the (key, value) pairs are " @@ -6645,11 +6722,11 @@ msgid "" "input." msgstr "" -#: ../../library/stdtypes.rst:5136 +#: ../../library/stdtypes.rst:5180 msgid "An example of dictionary view usage::" msgstr "" -#: ../../library/stdtypes.rst:5138 +#: ../../library/stdtypes.rst:5182 msgid "" ">>> dishes = {'eggs': 2, 'sausage': 1, 'bacon': 1, 'spam': 500}\n" ">>> keys = dishes.keys()\n" @@ -6690,11 +6767,11 @@ msgid "" "500" msgstr "" -#: ../../library/stdtypes.rst:5180 +#: ../../library/stdtypes.rst:5224 msgid "Context Manager Types" msgstr "" -#: ../../library/stdtypes.rst:5187 +#: ../../library/stdtypes.rst:5231 msgid "" "Python's :keyword:`with` statement supports the concept of a runtime context " "defined by a context manager. This is implemented using a pair of methods " @@ -6702,7 +6779,7 @@ msgid "" "before the statement body is executed and exited when the statement ends:" msgstr "" -#: ../../library/stdtypes.rst:5195 +#: ../../library/stdtypes.rst:5239 msgid "" "Enter the runtime context and return either this object or another object " "related to the runtime context. The value returned by this method is bound " @@ -6710,14 +6787,14 @@ msgid "" "using this context manager." msgstr "" -#: ../../library/stdtypes.rst:5200 +#: ../../library/stdtypes.rst:5244 msgid "" "An example of a context manager that returns itself is a :term:`file " "object`. File objects return themselves from __enter__() to allow :func:" "`open` to be used as the context expression in a :keyword:`with` statement." msgstr "" -#: ../../library/stdtypes.rst:5204 +#: ../../library/stdtypes.rst:5248 msgid "" "An example of a context manager that returns a related object is the one " "returned by :func:`decimal.localcontext`. These managers set the active " @@ -6727,7 +6804,7 @@ msgid "" "the :keyword:`!with` statement." msgstr "" -#: ../../library/stdtypes.rst:5214 +#: ../../library/stdtypes.rst:5258 msgid "" "Exit the runtime context and return a Boolean flag indicating if any " "exception that occurred should be suppressed. If an exception occurred while " @@ -6736,7 +6813,7 @@ msgid "" "arguments are ``None``." msgstr "" -#: ../../library/stdtypes.rst:5219 +#: ../../library/stdtypes.rst:5263 msgid "" "Returning a true value from this method will cause the :keyword:`with` " "statement to suppress the exception and continue execution with the " @@ -6747,7 +6824,7 @@ msgid "" "statement." msgstr "" -#: ../../library/stdtypes.rst:5226 +#: ../../library/stdtypes.rst:5270 msgid "" "The exception passed in should never be reraised explicitly - instead, this " "method should return a false value to indicate that the method completed " @@ -6756,7 +6833,7 @@ msgid "" "__exit__` method has actually failed." msgstr "" -#: ../../library/stdtypes.rst:5232 +#: ../../library/stdtypes.rst:5276 msgid "" "Python defines several context managers to support easy thread " "synchronisation, prompt closure of files or other objects, and simpler " @@ -6765,7 +6842,7 @@ msgid "" "management protocol. See the :mod:`contextlib` module for some examples." msgstr "" -#: ../../library/stdtypes.rst:5238 +#: ../../library/stdtypes.rst:5282 msgid "" "Python's :term:`generator`\\s and the :class:`contextlib.contextmanager` " "decorator provide a convenient way to implement these protocols. If a " @@ -6775,7 +6852,7 @@ msgid "" "rather than the iterator produced by an undecorated generator function." msgstr "" -#: ../../library/stdtypes.rst:5245 +#: ../../library/stdtypes.rst:5289 msgid "" "Note that there is no specific slot for any of these methods in the type " "structure for Python objects in the Python/C API. Extension types wanting to " @@ -6784,23 +6861,23 @@ msgid "" "a single class dictionary lookup is negligible." msgstr "" -#: ../../library/stdtypes.rst:5253 +#: ../../library/stdtypes.rst:5297 msgid "" "Type Annotation Types --- :ref:`Generic Alias `, :ref:" "`Union `" msgstr "" -#: ../../library/stdtypes.rst:5258 +#: ../../library/stdtypes.rst:5302 msgid "" "The core built-in types for :term:`type annotations ` are :ref:" "`Generic Alias ` and :ref:`Union `." msgstr "" -#: ../../library/stdtypes.rst:5265 +#: ../../library/stdtypes.rst:5309 msgid "Generic Alias Type" msgstr "" -#: ../../library/stdtypes.rst:5271 +#: ../../library/stdtypes.rst:5315 msgid "" "``GenericAlias`` objects are generally created by :ref:`subscripting " "` a class. They are most often used with :ref:`container " @@ -6810,19 +6887,19 @@ msgid "" "are intended primarily for use with :term:`type annotations `." msgstr "" -#: ../../library/stdtypes.rst:5281 +#: ../../library/stdtypes.rst:5325 msgid "" "It is generally only possible to subscript a class if the class implements " "the special method :meth:`~object.__class_getitem__`." msgstr "" -#: ../../library/stdtypes.rst:5284 +#: ../../library/stdtypes.rst:5328 msgid "" "A ``GenericAlias`` object acts as a proxy for a :term:`generic type`, " "implementing *parameterized generics*." msgstr "" -#: ../../library/stdtypes.rst:5287 +#: ../../library/stdtypes.rst:5331 msgid "" "For a container class, the argument(s) supplied to a :ref:`subscription " "` of the class may indicate the type(s) of the elements an " @@ -6831,7 +6908,7 @@ msgid "" "`bytes`." msgstr "" -#: ../../library/stdtypes.rst:5293 +#: ../../library/stdtypes.rst:5337 msgid "" "For a class which defines :meth:`~object.__class_getitem__` but is not a " "container, the argument(s) supplied to a subscription of the class will " @@ -6840,7 +6917,7 @@ msgid "" "the :class:`str` data type and the :class:`bytes` data type:" msgstr "" -#: ../../library/stdtypes.rst:5299 +#: ../../library/stdtypes.rst:5343 msgid "" "If ``x = re.search('foo', 'foo')``, ``x`` will be a :ref:`re.Match ` object where the return values of ``x.group(0)`` and ``x[0]`` will " @@ -6848,7 +6925,7 @@ msgid "" "annotations with the ``GenericAlias`` ``re.Match[str]``." msgstr "" -#: ../../library/stdtypes.rst:5305 +#: ../../library/stdtypes.rst:5349 msgid "" "If ``y = re.search(b'bar', b'bar')``, (note the ``b`` for :class:`bytes`), " "``y`` will also be an instance of ``re.Match``, but the return values of ``y." @@ -6857,27 +6934,27 @@ msgid "" "objects>` objects with ``re.Match[bytes]``." msgstr "" -#: ../../library/stdtypes.rst:5311 +#: ../../library/stdtypes.rst:5355 msgid "" "``GenericAlias`` objects are instances of the class :class:`types." "GenericAlias`, which can also be used to create ``GenericAlias`` objects " "directly." msgstr "" -#: ../../library/stdtypes.rst:5317 +#: ../../library/stdtypes.rst:5361 msgid "" "Creates a ``GenericAlias`` representing a type ``T`` parameterized by types " "*X*, *Y*, and more depending on the ``T`` used. For example, a function " "expecting a :class:`list` containing :class:`float` elements::" msgstr "" -#: ../../library/stdtypes.rst:5322 +#: ../../library/stdtypes.rst:5366 msgid "" "def average(values: list[float]) -> float:\n" " return sum(values) / len(values)" msgstr "" -#: ../../library/stdtypes.rst:5325 +#: ../../library/stdtypes.rst:5369 msgid "" "Another example for :term:`mapping` objects, using a :class:`dict`, which is " "a generic type expecting two type parameters representing the key type and " @@ -6885,19 +6962,19 @@ msgid "" "of type :class:`str` and values of type :class:`int`::" msgstr "" -#: ../../library/stdtypes.rst:5330 +#: ../../library/stdtypes.rst:5374 msgid "" "def send_post_request(url: str, body: dict[str, int]) -> None:\n" " ..." msgstr "" -#: ../../library/stdtypes.rst:5333 +#: ../../library/stdtypes.rst:5377 msgid "" "The builtin functions :func:`isinstance` and :func:`issubclass` do not " "accept ``GenericAlias`` types for their second argument::" msgstr "" -#: ../../library/stdtypes.rst:5336 +#: ../../library/stdtypes.rst:5380 msgid "" ">>> isinstance([1, 2], list[str])\n" "Traceback (most recent call last):\n" @@ -6905,7 +6982,7 @@ msgid "" "TypeError: isinstance() argument 2 cannot be a parameterized generic" msgstr "" -#: ../../library/stdtypes.rst:5341 +#: ../../library/stdtypes.rst:5385 msgid "" "The Python runtime does not enforce :term:`type annotations `. " "This extends to generic types and their type parameters. When creating a " @@ -6914,20 +6991,20 @@ msgid "" "discouraged, but will run without errors::" msgstr "" -#: ../../library/stdtypes.rst:5347 +#: ../../library/stdtypes.rst:5391 msgid "" ">>> t = list[str]\n" ">>> t([1, 2, 3])\n" "[1, 2, 3]" msgstr "" -#: ../../library/stdtypes.rst:5351 +#: ../../library/stdtypes.rst:5395 msgid "" "Furthermore, parameterized generics erase type parameters during object " "creation::" msgstr "" -#: ../../library/stdtypes.rst:5354 +#: ../../library/stdtypes.rst:5398 msgid "" ">>> t = list[str]\n" ">>> type(t)\n" @@ -6938,13 +7015,13 @@ msgid "" "" msgstr "" -#: ../../library/stdtypes.rst:5362 +#: ../../library/stdtypes.rst:5406 msgid "" "Calling :func:`repr` or :func:`str` on a generic shows the parameterized " "type::" msgstr "" -#: ../../library/stdtypes.rst:5364 +#: ../../library/stdtypes.rst:5408 msgid "" ">>> repr(list[int])\n" "'list[int]'\n" @@ -6953,13 +7030,13 @@ msgid "" "'list[int]'" msgstr "" -#: ../../library/stdtypes.rst:5370 +#: ../../library/stdtypes.rst:5414 msgid "" "The :meth:`~object.__getitem__` method of generic containers will raise an " "exception to disallow mistakes like ``dict[str][str]``::" msgstr "" -#: ../../library/stdtypes.rst:5373 +#: ../../library/stdtypes.rst:5417 msgid "" ">>> dict[str][str]\n" "Traceback (most recent call last):\n" @@ -6967,14 +7044,14 @@ msgid "" "TypeError: dict[str] is not a generic class" msgstr "" -#: ../../library/stdtypes.rst:5378 +#: ../../library/stdtypes.rst:5422 msgid "" "However, such expressions are valid when :ref:`type variables ` " "are used. The index must have as many elements as there are type variable " "items in the ``GenericAlias`` object's :attr:`~genericalias.__args__`. ::" msgstr "" -#: ../../library/stdtypes.rst:5382 +#: ../../library/stdtypes.rst:5426 msgid "" ">>> from typing import TypeVar\n" ">>> Y = TypeVar('Y')\n" @@ -6982,274 +7059,274 @@ msgid "" "dict[str, int]" msgstr "" -#: ../../library/stdtypes.rst:5389 +#: ../../library/stdtypes.rst:5433 msgid "Standard Generic Classes" msgstr "" -#: ../../library/stdtypes.rst:5391 +#: ../../library/stdtypes.rst:5435 msgid "" "The following standard library classes support parameterized generics. This " "list is non-exhaustive." msgstr "" -#: ../../library/stdtypes.rst:5394 +#: ../../library/stdtypes.rst:5438 msgid ":class:`tuple`" msgstr "" -#: ../../library/stdtypes.rst:5395 +#: ../../library/stdtypes.rst:5439 msgid ":class:`list`" msgstr "" -#: ../../library/stdtypes.rst:5396 +#: ../../library/stdtypes.rst:5440 msgid ":class:`dict`" msgstr "" -#: ../../library/stdtypes.rst:5397 +#: ../../library/stdtypes.rst:5441 msgid ":class:`set`" msgstr "" -#: ../../library/stdtypes.rst:5398 +#: ../../library/stdtypes.rst:5442 msgid ":class:`frozenset`" msgstr "" -#: ../../library/stdtypes.rst:5399 +#: ../../library/stdtypes.rst:5443 msgid ":class:`type`" msgstr "" -#: ../../library/stdtypes.rst:5400 +#: ../../library/stdtypes.rst:5444 msgid ":class:`asyncio.Future`" msgstr "" -#: ../../library/stdtypes.rst:5401 +#: ../../library/stdtypes.rst:5445 msgid ":class:`asyncio.Task`" msgstr "" -#: ../../library/stdtypes.rst:5402 +#: ../../library/stdtypes.rst:5446 msgid ":class:`collections.deque`" msgstr "" -#: ../../library/stdtypes.rst:5403 +#: ../../library/stdtypes.rst:5447 msgid ":class:`collections.defaultdict`" msgstr "" -#: ../../library/stdtypes.rst:5404 +#: ../../library/stdtypes.rst:5448 msgid ":class:`collections.OrderedDict`" msgstr "" -#: ../../library/stdtypes.rst:5405 +#: ../../library/stdtypes.rst:5449 msgid ":class:`collections.Counter`" msgstr "" -#: ../../library/stdtypes.rst:5406 +#: ../../library/stdtypes.rst:5450 msgid ":class:`collections.ChainMap`" msgstr "" -#: ../../library/stdtypes.rst:5407 +#: ../../library/stdtypes.rst:5451 msgid ":class:`collections.abc.Awaitable`" msgstr "" -#: ../../library/stdtypes.rst:5408 +#: ../../library/stdtypes.rst:5452 msgid ":class:`collections.abc.Coroutine`" msgstr "" -#: ../../library/stdtypes.rst:5409 +#: ../../library/stdtypes.rst:5453 msgid ":class:`collections.abc.AsyncIterable`" msgstr "" -#: ../../library/stdtypes.rst:5410 +#: ../../library/stdtypes.rst:5454 msgid ":class:`collections.abc.AsyncIterator`" msgstr "" -#: ../../library/stdtypes.rst:5411 +#: ../../library/stdtypes.rst:5455 msgid ":class:`collections.abc.AsyncGenerator`" msgstr "" -#: ../../library/stdtypes.rst:5412 +#: ../../library/stdtypes.rst:5456 msgid ":class:`collections.abc.Iterable`" msgstr "" -#: ../../library/stdtypes.rst:5413 +#: ../../library/stdtypes.rst:5457 msgid ":class:`collections.abc.Iterator`" msgstr "" -#: ../../library/stdtypes.rst:5414 +#: ../../library/stdtypes.rst:5458 msgid ":class:`collections.abc.Generator`" msgstr "" -#: ../../library/stdtypes.rst:5415 +#: ../../library/stdtypes.rst:5459 msgid ":class:`collections.abc.Reversible`" msgstr "" -#: ../../library/stdtypes.rst:5416 +#: ../../library/stdtypes.rst:5460 msgid ":class:`collections.abc.Container`" msgstr "" -#: ../../library/stdtypes.rst:5417 +#: ../../library/stdtypes.rst:5461 msgid ":class:`collections.abc.Collection`" msgstr "" -#: ../../library/stdtypes.rst:5418 +#: ../../library/stdtypes.rst:5462 msgid ":class:`collections.abc.Callable`" msgstr "" -#: ../../library/stdtypes.rst:5419 +#: ../../library/stdtypes.rst:5463 msgid ":class:`collections.abc.Set`" msgstr "" -#: ../../library/stdtypes.rst:5420 +#: ../../library/stdtypes.rst:5464 msgid ":class:`collections.abc.MutableSet`" msgstr "" -#: ../../library/stdtypes.rst:5421 +#: ../../library/stdtypes.rst:5465 msgid ":class:`collections.abc.Mapping`" msgstr "" -#: ../../library/stdtypes.rst:5422 +#: ../../library/stdtypes.rst:5466 msgid ":class:`collections.abc.MutableMapping`" msgstr "" -#: ../../library/stdtypes.rst:5423 +#: ../../library/stdtypes.rst:5467 msgid ":class:`collections.abc.Sequence`" msgstr "" -#: ../../library/stdtypes.rst:5424 +#: ../../library/stdtypes.rst:5468 msgid ":class:`collections.abc.MutableSequence`" msgstr "" -#: ../../library/stdtypes.rst:5425 +#: ../../library/stdtypes.rst:5469 msgid ":class:`collections.abc.MappingView`" msgstr "" -#: ../../library/stdtypes.rst:5426 +#: ../../library/stdtypes.rst:5470 msgid ":class:`collections.abc.KeysView`" msgstr "" -#: ../../library/stdtypes.rst:5427 +#: ../../library/stdtypes.rst:5471 msgid ":class:`collections.abc.ItemsView`" msgstr "" -#: ../../library/stdtypes.rst:5428 +#: ../../library/stdtypes.rst:5472 msgid ":class:`collections.abc.ValuesView`" msgstr "" -#: ../../library/stdtypes.rst:5429 +#: ../../library/stdtypes.rst:5473 msgid ":class:`contextlib.AbstractContextManager`" msgstr "" -#: ../../library/stdtypes.rst:5430 +#: ../../library/stdtypes.rst:5474 msgid ":class:`contextlib.AbstractAsyncContextManager`" msgstr "" -#: ../../library/stdtypes.rst:5431 +#: ../../library/stdtypes.rst:5475 msgid ":class:`dataclasses.Field`" msgstr "" -#: ../../library/stdtypes.rst:5432 +#: ../../library/stdtypes.rst:5476 msgid ":class:`functools.cached_property`" msgstr "" -#: ../../library/stdtypes.rst:5433 +#: ../../library/stdtypes.rst:5477 msgid ":class:`functools.partialmethod`" msgstr "" -#: ../../library/stdtypes.rst:5434 +#: ../../library/stdtypes.rst:5478 msgid ":class:`os.PathLike`" msgstr "" -#: ../../library/stdtypes.rst:5435 +#: ../../library/stdtypes.rst:5479 msgid ":class:`queue.LifoQueue`" msgstr "" -#: ../../library/stdtypes.rst:5436 +#: ../../library/stdtypes.rst:5480 msgid ":class:`queue.Queue`" msgstr "" -#: ../../library/stdtypes.rst:5437 +#: ../../library/stdtypes.rst:5481 msgid ":class:`queue.PriorityQueue`" msgstr "" -#: ../../library/stdtypes.rst:5438 +#: ../../library/stdtypes.rst:5482 msgid ":class:`queue.SimpleQueue`" msgstr "" -#: ../../library/stdtypes.rst:5439 +#: ../../library/stdtypes.rst:5483 msgid ":ref:`re.Pattern `" msgstr "" -#: ../../library/stdtypes.rst:5440 +#: ../../library/stdtypes.rst:5484 msgid ":ref:`re.Match `" msgstr "" -#: ../../library/stdtypes.rst:5441 +#: ../../library/stdtypes.rst:5485 msgid ":class:`shelve.BsdDbShelf`" msgstr "" -#: ../../library/stdtypes.rst:5442 +#: ../../library/stdtypes.rst:5486 msgid ":class:`shelve.DbfilenameShelf`" msgstr "" -#: ../../library/stdtypes.rst:5443 +#: ../../library/stdtypes.rst:5487 msgid ":class:`shelve.Shelf`" msgstr "" -#: ../../library/stdtypes.rst:5444 +#: ../../library/stdtypes.rst:5488 msgid ":class:`types.MappingProxyType`" msgstr "" -#: ../../library/stdtypes.rst:5445 +#: ../../library/stdtypes.rst:5489 msgid ":class:`weakref.WeakKeyDictionary`" msgstr "" -#: ../../library/stdtypes.rst:5446 +#: ../../library/stdtypes.rst:5490 msgid ":class:`weakref.WeakMethod`" msgstr "" -#: ../../library/stdtypes.rst:5447 +#: ../../library/stdtypes.rst:5491 msgid ":class:`weakref.WeakSet`" msgstr "" -#: ../../library/stdtypes.rst:5448 +#: ../../library/stdtypes.rst:5492 msgid ":class:`weakref.WeakValueDictionary`" msgstr "" -#: ../../library/stdtypes.rst:5453 +#: ../../library/stdtypes.rst:5497 msgid "Special Attributes of ``GenericAlias`` objects" msgstr "" -#: ../../library/stdtypes.rst:5455 +#: ../../library/stdtypes.rst:5499 msgid "All parameterized generics implement special read-only attributes." msgstr "" -#: ../../library/stdtypes.rst:5459 +#: ../../library/stdtypes.rst:5503 msgid "This attribute points at the non-parameterized generic class::" msgstr "" -#: ../../library/stdtypes.rst:5461 +#: ../../library/stdtypes.rst:5505 msgid "" ">>> list[int].__origin__\n" "" msgstr "" -#: ../../library/stdtypes.rst:5467 +#: ../../library/stdtypes.rst:5511 msgid "" "This attribute is a :class:`tuple` (possibly of length 1) of generic types " "passed to the original :meth:`~object.__class_getitem__` of the generic " "class::" msgstr "" -#: ../../library/stdtypes.rst:5471 +#: ../../library/stdtypes.rst:5515 msgid "" ">>> dict[str, list[int]].__args__\n" "(, list[int])" msgstr "" -#: ../../library/stdtypes.rst:5477 +#: ../../library/stdtypes.rst:5521 msgid "" "This attribute is a lazily computed tuple (possibly empty) of unique type " "variables found in ``__args__``::" msgstr "" -#: ../../library/stdtypes.rst:5480 +#: ../../library/stdtypes.rst:5524 msgid "" ">>> from typing import TypeVar\n" "\n" @@ -7258,55 +7335,55 @@ msgid "" "(~T,)" msgstr "" -#: ../../library/stdtypes.rst:5488 +#: ../../library/stdtypes.rst:5532 msgid "" "A ``GenericAlias`` object with :class:`typing.ParamSpec` parameters may not " "have correct ``__parameters__`` after substitution because :class:`typing." "ParamSpec` is intended primarily for static type checking." msgstr "" -#: ../../library/stdtypes.rst:5495 +#: ../../library/stdtypes.rst:5539 msgid "" "A boolean that is true if the alias has been unpacked using the ``*`` " "operator (see :data:`~typing.TypeVarTuple`)." msgstr "" -#: ../../library/stdtypes.rst:5503 +#: ../../library/stdtypes.rst:5547 msgid ":pep:`484` - Type Hints" msgstr "" -#: ../../library/stdtypes.rst:5504 +#: ../../library/stdtypes.rst:5548 msgid "Introducing Python's framework for type annotations." msgstr "" -#: ../../library/stdtypes.rst:5506 +#: ../../library/stdtypes.rst:5550 msgid ":pep:`585` - Type Hinting Generics In Standard Collections" msgstr "" -#: ../../library/stdtypes.rst:5507 +#: ../../library/stdtypes.rst:5551 msgid "" "Introducing the ability to natively parameterize standard-library classes, " "provided they implement the special class method :meth:`~object." "__class_getitem__`." msgstr "" -#: ../../library/stdtypes.rst:5511 +#: ../../library/stdtypes.rst:5555 msgid "" ":ref:`Generics`, :ref:`user-defined generics ` and :" "class:`typing.Generic`" msgstr "" -#: ../../library/stdtypes.rst:5512 +#: ../../library/stdtypes.rst:5556 msgid "" "Documentation on how to implement generic classes that can be parameterized " "at runtime and understood by static type-checkers." msgstr "" -#: ../../library/stdtypes.rst:5521 +#: ../../library/stdtypes.rst:5565 msgid "Union Type" msgstr "" -#: ../../library/stdtypes.rst:5527 +#: ../../library/stdtypes.rst:5571 msgid "" "A union object holds the value of the ``|`` (bitwise or) operation on " "multiple :ref:`type objects `. These types are intended " @@ -7315,7 +7392,7 @@ msgid "" "class:`typing.Union`." msgstr "" -#: ../../library/stdtypes.rst:5534 +#: ../../library/stdtypes.rst:5578 msgid "" "Defines a union object which holds types *X*, *Y*, and so forth. ``X | Y`` " "means either X or Y. It is equivalent to ``typing.Union[X, Y]``. For " @@ -7323,13 +7400,13 @@ msgid "" "class:`float`::" msgstr "" -#: ../../library/stdtypes.rst:5539 +#: ../../library/stdtypes.rst:5583 msgid "" "def square(number: int | float) -> int | float:\n" " return number ** 2" msgstr "" -#: ../../library/stdtypes.rst:5544 +#: ../../library/stdtypes.rst:5588 msgid "" "The ``|`` operand cannot be used at runtime to define unions where one or " "more members is a forward reference. For example, ``int | \"Foo\"``, where " @@ -7338,72 +7415,72 @@ msgid "" "a string, e.g. ``\"int | Foo\"``." msgstr "" -#: ../../library/stdtypes.rst:5552 +#: ../../library/stdtypes.rst:5596 msgid "" "Union objects can be tested for equality with other union objects. Details:" msgstr "" -#: ../../library/stdtypes.rst:5554 +#: ../../library/stdtypes.rst:5598 msgid "Unions of unions are flattened::" msgstr "" -#: ../../library/stdtypes.rst:5556 +#: ../../library/stdtypes.rst:5600 msgid "(int | str) | float == int | str | float" msgstr "" -#: ../../library/stdtypes.rst:5558 +#: ../../library/stdtypes.rst:5602 msgid "Redundant types are removed::" msgstr "" -#: ../../library/stdtypes.rst:5560 +#: ../../library/stdtypes.rst:5604 msgid "int | str | int == int | str" msgstr "" -#: ../../library/stdtypes.rst:5562 +#: ../../library/stdtypes.rst:5606 msgid "When comparing unions, the order is ignored::" msgstr "" -#: ../../library/stdtypes.rst:5564 +#: ../../library/stdtypes.rst:5608 msgid "int | str == str | int" msgstr "" -#: ../../library/stdtypes.rst:5566 +#: ../../library/stdtypes.rst:5610 msgid "It creates instances of :class:`typing.Union`::" msgstr "" -#: ../../library/stdtypes.rst:5568 +#: ../../library/stdtypes.rst:5612 msgid "" "int | str == typing.Union[int, str]\n" "type(int | str) is typing.Union" msgstr "" -#: ../../library/stdtypes.rst:5571 +#: ../../library/stdtypes.rst:5615 msgid "Optional types can be spelled as a union with ``None``::" msgstr "" -#: ../../library/stdtypes.rst:5573 +#: ../../library/stdtypes.rst:5617 msgid "str | None == typing.Optional[str]" msgstr "" -#: ../../library/stdtypes.rst:5578 +#: ../../library/stdtypes.rst:5622 msgid "" "Calls to :func:`isinstance` and :func:`issubclass` are also supported with a " "union object::" msgstr "" -#: ../../library/stdtypes.rst:5581 +#: ../../library/stdtypes.rst:5625 msgid "" ">>> isinstance(\"\", int | str)\n" "True" msgstr "" -#: ../../library/stdtypes.rst:5584 +#: ../../library/stdtypes.rst:5628 msgid "" "However, :ref:`parameterized generics ` in union objects " "cannot be checked::" msgstr "" -#: ../../library/stdtypes.rst:5587 +#: ../../library/stdtypes.rst:5631 msgid "" ">>> isinstance(1, int | list[int]) # short-circuit evaluation\n" "True\n" @@ -7413,13 +7490,13 @@ msgid "" "TypeError: isinstance() argument 2 cannot be a parameterized generic" msgstr "" -#: ../../library/stdtypes.rst:5594 +#: ../../library/stdtypes.rst:5638 msgid "" "The user-exposed type for the union object can be accessed from :class:" "`typing.Union` and used for :func:`isinstance` checks::" msgstr "" -#: ../../library/stdtypes.rst:5597 +#: ../../library/stdtypes.rst:5641 msgid "" ">>> import typing\n" ">>> isinstance(int | str, typing.Union)\n" @@ -7430,14 +7507,14 @@ msgid "" "TypeError: cannot create 'typing.Union' instances" msgstr "" -#: ../../library/stdtypes.rst:5606 +#: ../../library/stdtypes.rst:5650 msgid "" "The :meth:`!__or__` method for type objects was added to support the syntax " "``X | Y``. If a metaclass implements :meth:`!__or__`, the Union may " "override it:" msgstr "" -#: ../../library/stdtypes.rst:5610 +#: ../../library/stdtypes.rst:5654 msgid "" ">>> class M(type):\n" "... def __or__(self, other):\n" @@ -7452,32 +7529,32 @@ msgid "" "int | C" msgstr "" -#: ../../library/stdtypes.rst:5626 +#: ../../library/stdtypes.rst:5670 msgid ":pep:`604` -- PEP proposing the ``X | Y`` syntax and the Union type." msgstr "" -#: ../../library/stdtypes.rst:5632 +#: ../../library/stdtypes.rst:5676 msgid "" "Union objects are now instances of :class:`typing.Union`. Previously, they " "were instances of :class:`types.UnionType`, which remains an alias for :" "class:`typing.Union`." msgstr "" -#: ../../library/stdtypes.rst:5639 +#: ../../library/stdtypes.rst:5683 msgid "Other Built-in Types" msgstr "" -#: ../../library/stdtypes.rst:5641 +#: ../../library/stdtypes.rst:5685 msgid "" "The interpreter supports several other kinds of objects. Most of these " "support only one or two operations." msgstr "" -#: ../../library/stdtypes.rst:5648 +#: ../../library/stdtypes.rst:5692 msgid "Modules" msgstr "" -#: ../../library/stdtypes.rst:5650 +#: ../../library/stdtypes.rst:5694 msgid "" "The only special operation on a module is attribute access: ``m.name``, " "where *m* is a module and *name* accesses a name defined in *m*'s symbol " @@ -7488,7 +7565,7 @@ msgid "" "*foo* somewhere.)" msgstr "" -#: ../../library/stdtypes.rst:5657 +#: ../../library/stdtypes.rst:5701 msgid "" "A special attribute of every module is :attr:`~object.__dict__`. This is the " "dictionary containing the module's symbol table. Modifying this dictionary " @@ -7499,32 +7576,32 @@ msgid "" "recommended." msgstr "" -#: ../../library/stdtypes.rst:5665 +#: ../../library/stdtypes.rst:5709 msgid "" "Modules built into the interpreter are written like this: ````. If loaded from a file, they are written as ````." msgstr "" -#: ../../library/stdtypes.rst:5673 +#: ../../library/stdtypes.rst:5717 msgid "Classes and Class Instances" msgstr "" -#: ../../library/stdtypes.rst:5675 +#: ../../library/stdtypes.rst:5719 msgid "See :ref:`objects` and :ref:`class` for these." msgstr "" -#: ../../library/stdtypes.rst:5681 +#: ../../library/stdtypes.rst:5725 msgid "Functions" msgstr "" -#: ../../library/stdtypes.rst:5683 +#: ../../library/stdtypes.rst:5727 msgid "" "Function objects are created by function definitions. The only operation on " "a function object is to call it: ``func(argument-list)``." msgstr "" -#: ../../library/stdtypes.rst:5686 +#: ../../library/stdtypes.rst:5730 msgid "" "There are really two flavors of function objects: built-in functions and " "user-defined functions. Both support the same operation (to call the " @@ -7532,15 +7609,15 @@ msgid "" "types." msgstr "" -#: ../../library/stdtypes.rst:5690 +#: ../../library/stdtypes.rst:5734 msgid "See :ref:`function` for more information." msgstr "" -#: ../../library/stdtypes.rst:5696 +#: ../../library/stdtypes.rst:5740 msgid "Methods" msgstr "" -#: ../../library/stdtypes.rst:5700 +#: ../../library/stdtypes.rst:5744 msgid "" "Methods are functions that are called using the attribute notation. There " "are two flavors: :ref:`built-in methods ` (such as :meth:" @@ -7548,7 +7625,7 @@ msgid "" "Built-in methods are described with the types that support them." msgstr "" -#: ../../library/stdtypes.rst:5705 +#: ../../library/stdtypes.rst:5749 msgid "" "If you access a method (a function defined in a class namespace) through an " "instance, you get a special object: a :dfn:`bound method` (also called :ref:" @@ -7561,7 +7638,7 @@ msgid "" "arg-2, ..., arg-n)``." msgstr "" -#: ../../library/stdtypes.rst:5716 +#: ../../library/stdtypes.rst:5760 msgid "" "Like :ref:`function objects `, bound method objects " "support getting arbitrary attributes. However, since method attributes are " @@ -7572,7 +7649,7 @@ msgid "" "underlying function object:" msgstr "" -#: ../../library/stdtypes.rst:5724 +#: ../../library/stdtypes.rst:5768 msgid "" ">>> class C:\n" "... def method(self):\n" @@ -7588,15 +7665,15 @@ msgid "" "'my name is method'" msgstr "" -#: ../../library/stdtypes.rst:5739 +#: ../../library/stdtypes.rst:5783 msgid "See :ref:`instance-methods` for more information." msgstr "" -#: ../../library/stdtypes.rst:5747 +#: ../../library/stdtypes.rst:5791 msgid "Code Objects" msgstr "" -#: ../../library/stdtypes.rst:5753 +#: ../../library/stdtypes.rst:5797 msgid "" "Code objects are used by the implementation to represent \"pseudo-compiled\" " "executable Python code such as a function body. They differ from function " @@ -7606,28 +7683,28 @@ msgid "" "`~function.__code__` attribute. See also the :mod:`code` module." msgstr "" -#: ../../library/stdtypes.rst:5760 +#: ../../library/stdtypes.rst:5804 msgid "" "Accessing :attr:`~function.__code__` raises an :ref:`auditing event " "` ``object.__getattr__`` with arguments ``obj`` and " "``\"__code__\"``." msgstr "" -#: ../../library/stdtypes.rst:5767 +#: ../../library/stdtypes.rst:5811 msgid "" "A code object can be executed or evaluated by passing it (instead of a " "source string) to the :func:`exec` or :func:`eval` built-in functions." msgstr "" -#: ../../library/stdtypes.rst:5770 +#: ../../library/stdtypes.rst:5814 msgid "See :ref:`types` for more information." msgstr "" -#: ../../library/stdtypes.rst:5776 +#: ../../library/stdtypes.rst:5820 msgid "Type Objects" msgstr "" -#: ../../library/stdtypes.rst:5782 +#: ../../library/stdtypes.rst:5826 msgid "" "Type objects represent the various object types. An object's type is " "accessed by the built-in function :func:`type`. There are no special " @@ -7635,30 +7712,30 @@ msgid "" "standard built-in types." msgstr "" -#: ../../library/stdtypes.rst:5787 +#: ../../library/stdtypes.rst:5831 msgid "Types are written like this: ````." msgstr "" -#: ../../library/stdtypes.rst:5793 +#: ../../library/stdtypes.rst:5837 msgid "The Null Object" msgstr "" -#: ../../library/stdtypes.rst:5795 +#: ../../library/stdtypes.rst:5839 msgid "" "This object is returned by functions that don't explicitly return a value. " "It supports no special operations. There is exactly one null object, named " "``None`` (a built-in name). ``type(None)()`` produces the same singleton." msgstr "" -#: ../../library/stdtypes.rst:5799 +#: ../../library/stdtypes.rst:5843 msgid "It is written as ``None``." msgstr "" -#: ../../library/stdtypes.rst:5806 +#: ../../library/stdtypes.rst:5850 msgid "The Ellipsis Object" msgstr "" -#: ../../library/stdtypes.rst:5808 +#: ../../library/stdtypes.rst:5852 msgid "" "This object is commonly used by slicing (see :ref:`slicings`). It supports " "no special operations. There is exactly one ellipsis object, named :const:" @@ -7666,15 +7743,15 @@ msgid "" "`Ellipsis` singleton." msgstr "" -#: ../../library/stdtypes.rst:5813 +#: ../../library/stdtypes.rst:5857 msgid "It is written as ``Ellipsis`` or ``...``." msgstr "" -#: ../../library/stdtypes.rst:5819 +#: ../../library/stdtypes.rst:5863 msgid "The NotImplemented Object" msgstr "" -#: ../../library/stdtypes.rst:5821 +#: ../../library/stdtypes.rst:5865 msgid "" "This object is returned from comparisons and binary operations when they are " "asked to operate on types they don't support. See :ref:`comparisons` for " @@ -7682,64 +7759,64 @@ msgid "" "`type(NotImplemented)()` produces the singleton instance." msgstr "" -#: ../../library/stdtypes.rst:5826 +#: ../../library/stdtypes.rst:5870 msgid "It is written as :code:`NotImplemented`." msgstr "" -#: ../../library/stdtypes.rst:5832 +#: ../../library/stdtypes.rst:5876 msgid "Internal Objects" msgstr "" -#: ../../library/stdtypes.rst:5834 +#: ../../library/stdtypes.rst:5878 msgid "" "See :ref:`types` for this information. It describes :ref:`stack frame " "objects `, :ref:`traceback objects `, and " "slice objects." msgstr "" -#: ../../library/stdtypes.rst:5842 +#: ../../library/stdtypes.rst:5886 msgid "Special Attributes" msgstr "" -#: ../../library/stdtypes.rst:5844 +#: ../../library/stdtypes.rst:5888 msgid "" "The implementation adds a few special read-only attributes to several object " "types, where they are relevant. Some of these are not reported by the :func:" "`dir` built-in function." msgstr "" -#: ../../library/stdtypes.rst:5851 +#: ../../library/stdtypes.rst:5895 msgid "" "The name of the class, function, method, descriptor, or generator instance." msgstr "" -#: ../../library/stdtypes.rst:5857 +#: ../../library/stdtypes.rst:5901 msgid "" "The :term:`qualified name` of the class, function, method, descriptor, or " "generator instance." msgstr "" -#: ../../library/stdtypes.rst:5865 +#: ../../library/stdtypes.rst:5909 msgid "The name of the module in which a class or function was defined." msgstr "" -#: ../../library/stdtypes.rst:5870 +#: ../../library/stdtypes.rst:5914 msgid "" "The documentation string of a class or function, or ``None`` if undefined." msgstr "" -#: ../../library/stdtypes.rst:5875 +#: ../../library/stdtypes.rst:5919 msgid "" "The :ref:`type parameters ` of generic classes, functions, and :" "ref:`type aliases `. For classes and functions that are not " "generic, this will be an empty tuple." msgstr "" -#: ../../library/stdtypes.rst:5885 +#: ../../library/stdtypes.rst:5929 msgid "Integer string conversion length limitation" msgstr "" -#: ../../library/stdtypes.rst:5887 +#: ../../library/stdtypes.rst:5931 msgid "" "CPython has a global limit for converting between :class:`int` and :class:" "`str` to mitigate denial of service attacks. This limit *only* applies to " @@ -7747,7 +7824,7 @@ msgid "" "binary conversions are unlimited. The limit can be configured." msgstr "" -#: ../../library/stdtypes.rst:5892 +#: ../../library/stdtypes.rst:5936 msgid "" "The :class:`int` type in CPython is an arbitrary length number stored in " "binary form (commonly known as a \"bignum\"). There exists no algorithm that " @@ -7757,24 +7834,24 @@ msgid "" "value such as ``int('1' * 500_000)`` can take over a second on a fast CPU." msgstr "" -#: ../../library/stdtypes.rst:5899 +#: ../../library/stdtypes.rst:5943 msgid "" "Limiting conversion size offers a practical way to avoid :cve:`2020-10735`." msgstr "" -#: ../../library/stdtypes.rst:5901 +#: ../../library/stdtypes.rst:5945 msgid "" "The limit is applied to the number of digit characters in the input or " "output string when a non-linear conversion algorithm would be involved. " "Underscores and the sign are not counted towards the limit." msgstr "" -#: ../../library/stdtypes.rst:5905 +#: ../../library/stdtypes.rst:5949 msgid "" "When an operation would exceed the limit, a :exc:`ValueError` is raised:" msgstr "" -#: ../../library/stdtypes.rst:5907 +#: ../../library/stdtypes.rst:5951 msgid "" ">>> import sys\n" ">>> sys.set_int_max_str_digits(4300) # Illustrative, this is the default.\n" @@ -7798,7 +7875,7 @@ msgid "" ">>> assert int(hex(i_squared), base=16) == i*i # Hexadecimal is unlimited." msgstr "" -#: ../../library/stdtypes.rst:5927 +#: ../../library/stdtypes.rst:5971 msgid "" "The default limit is 4300 digits as provided in :data:`sys.int_info." "default_max_str_digits `. The lowest limit that can be " @@ -7806,11 +7883,11 @@ msgid "" "str_digits_check_threshold `." msgstr "" -#: ../../library/stdtypes.rst:5932 +#: ../../library/stdtypes.rst:5976 msgid "Verification:" msgstr "" -#: ../../library/stdtypes.rst:5934 +#: ../../library/stdtypes.rst:5978 msgid "" ">>> import sys\n" ">>> assert sys.int_info.default_max_str_digits == 4300, sys.int_info\n" @@ -7821,90 +7898,90 @@ msgid "" "..." msgstr "" -#: ../../library/stdtypes.rst:5947 +#: ../../library/stdtypes.rst:5991 msgid "Affected APIs" msgstr "" -#: ../../library/stdtypes.rst:5949 +#: ../../library/stdtypes.rst:5993 msgid "" "The limitation only applies to potentially slow conversions between :class:" "`int` and :class:`str` or :class:`bytes`:" msgstr "" -#: ../../library/stdtypes.rst:5952 +#: ../../library/stdtypes.rst:5996 msgid "``int(string)`` with default base 10." msgstr "" -#: ../../library/stdtypes.rst:5953 +#: ../../library/stdtypes.rst:5997 msgid "``int(string, base)`` for all bases that are not a power of 2." msgstr "" -#: ../../library/stdtypes.rst:5954 +#: ../../library/stdtypes.rst:5998 msgid "``str(integer)``." msgstr "" -#: ../../library/stdtypes.rst:5955 +#: ../../library/stdtypes.rst:5999 msgid "``repr(integer)``." msgstr "" -#: ../../library/stdtypes.rst:5956 +#: ../../library/stdtypes.rst:6000 msgid "" "any other string conversion to base 10, for example ``f\"{integer}\"``, " "``\"{}\".format(integer)``, or ``b\"%d\" % integer``." msgstr "" -#: ../../library/stdtypes.rst:5959 +#: ../../library/stdtypes.rst:6003 msgid "The limitations do not apply to functions with a linear algorithm:" msgstr "" -#: ../../library/stdtypes.rst:5961 +#: ../../library/stdtypes.rst:6005 msgid "``int(string, base)`` with base 2, 4, 8, 16, or 32." msgstr "" -#: ../../library/stdtypes.rst:5962 +#: ../../library/stdtypes.rst:6006 msgid ":func:`int.from_bytes` and :func:`int.to_bytes`." msgstr "" -#: ../../library/stdtypes.rst:5963 +#: ../../library/stdtypes.rst:6007 msgid ":func:`hex`, :func:`oct`, :func:`bin`." msgstr "" -#: ../../library/stdtypes.rst:5964 +#: ../../library/stdtypes.rst:6008 msgid ":ref:`formatspec` for hex, octal, and binary numbers." msgstr "" -#: ../../library/stdtypes.rst:5965 +#: ../../library/stdtypes.rst:6009 msgid ":class:`str` to :class:`float`." msgstr "" -#: ../../library/stdtypes.rst:5966 +#: ../../library/stdtypes.rst:6010 msgid ":class:`str` to :class:`decimal.Decimal`." msgstr "" -#: ../../library/stdtypes.rst:5969 +#: ../../library/stdtypes.rst:6013 msgid "Configuring the limit" msgstr "" -#: ../../library/stdtypes.rst:5971 +#: ../../library/stdtypes.rst:6015 msgid "" "Before Python starts up you can use an environment variable or an " "interpreter command line flag to configure the limit:" msgstr "" -#: ../../library/stdtypes.rst:5974 +#: ../../library/stdtypes.rst:6018 msgid "" ":envvar:`PYTHONINTMAXSTRDIGITS`, e.g. ``PYTHONINTMAXSTRDIGITS=640 python3`` " "to set the limit to 640 or ``PYTHONINTMAXSTRDIGITS=0 python3`` to disable " "the limitation." msgstr "" -#: ../../library/stdtypes.rst:5977 +#: ../../library/stdtypes.rst:6021 msgid "" ":option:`-X int_max_str_digits <-X>`, e.g. ``python3 -X " "int_max_str_digits=640``" msgstr "" -#: ../../library/stdtypes.rst:5979 +#: ../../library/stdtypes.rst:6023 msgid "" ":data:`sys.flags.int_max_str_digits` contains the value of :envvar:" "`PYTHONINTMAXSTRDIGITS` or :option:`-X int_max_str_digits <-X>`. If both the " @@ -7913,38 +7990,38 @@ msgid "" "int_info.default_max_str_digits` was used during initialization." msgstr "" -#: ../../library/stdtypes.rst:5985 +#: ../../library/stdtypes.rst:6029 msgid "" "From code, you can inspect the current limit and set a new one using these :" "mod:`sys` APIs:" msgstr "" -#: ../../library/stdtypes.rst:5988 +#: ../../library/stdtypes.rst:6032 msgid "" ":func:`sys.get_int_max_str_digits` and :func:`sys.set_int_max_str_digits` " "are a getter and setter for the interpreter-wide limit. Subinterpreters have " "their own limit." msgstr "" -#: ../../library/stdtypes.rst:5992 +#: ../../library/stdtypes.rst:6036 msgid "" "Information about the default and minimum can be found in :data:`sys." "int_info`:" msgstr "" -#: ../../library/stdtypes.rst:5994 +#: ../../library/stdtypes.rst:6038 msgid "" ":data:`sys.int_info.default_max_str_digits ` is the compiled-" "in default limit." msgstr "" -#: ../../library/stdtypes.rst:5996 +#: ../../library/stdtypes.rst:6040 msgid "" ":data:`sys.int_info.str_digits_check_threshold ` is the lowest " "accepted value for the limit (other than 0 which disables it)." msgstr "" -#: ../../library/stdtypes.rst:6003 +#: ../../library/stdtypes.rst:6047 msgid "" "Setting a low limit *can* lead to problems. While rare, code exists that " "contains integer constants in decimal in their source that exceed the " @@ -7956,7 +8033,7 @@ msgid "" "constants is to convert them to ``0x`` hexadecimal form as it has no limit." msgstr "" -#: ../../library/stdtypes.rst:6012 +#: ../../library/stdtypes.rst:6056 msgid "" "Test your application thoroughly if you use a low limit. Ensure your tests " "run with the limit set early via the environment or flag so that it applies " @@ -7964,11 +8041,11 @@ msgid "" "to precompile ``.py`` sources to ``.pyc`` files." msgstr "" -#: ../../library/stdtypes.rst:6018 +#: ../../library/stdtypes.rst:6062 msgid "Recommended configuration" msgstr "" -#: ../../library/stdtypes.rst:6020 +#: ../../library/stdtypes.rst:6064 msgid "" "The default :data:`sys.int_info.default_max_str_digits` is expected to be " "reasonable for most applications. If your application requires a different " @@ -7976,11 +8053,11 @@ msgid "" "as these APIs were added in security patch releases in versions before 3.12." msgstr "" -#: ../../library/stdtypes.rst:6025 +#: ../../library/stdtypes.rst:6069 msgid "Example::" msgstr "" -#: ../../library/stdtypes.rst:6027 +#: ../../library/stdtypes.rst:6071 msgid "" ">>> import sys\n" ">>> if hasattr(sys, \"set_int_max_str_digits\"):\n" @@ -7993,38 +8070,38 @@ msgid "" "... sys.set_int_max_str_digits(lower_bound)" msgstr "" -#: ../../library/stdtypes.rst:6037 +#: ../../library/stdtypes.rst:6081 msgid "If you need to disable it entirely, set it to ``0``." msgstr "" -#: ../../library/stdtypes.rst:6041 +#: ../../library/stdtypes.rst:6085 msgid "Footnotes" msgstr "" -#: ../../library/stdtypes.rst:6042 +#: ../../library/stdtypes.rst:6086 msgid "" "Additional information on these special methods may be found in the Python " "Reference Manual (:ref:`customization`)." msgstr "" -#: ../../library/stdtypes.rst:6045 +#: ../../library/stdtypes.rst:6089 msgid "" "As a consequence, the list ``[1, 2]`` is considered equal to ``[1.0, 2.0]``, " "and similarly for tuples." msgstr "" -#: ../../library/stdtypes.rst:6048 +#: ../../library/stdtypes.rst:6092 msgid "They must have since the parser can't tell the type of the operands." msgstr "" -#: ../../library/stdtypes.rst:6050 +#: ../../library/stdtypes.rst:6094 msgid "" "Cased characters are those with general category property being one of " "\"Lu\" (Letter, uppercase), \"Ll\" (Letter, lowercase), or \"Lt\" (Letter, " "titlecase)." msgstr "" -#: ../../library/stdtypes.rst:6053 +#: ../../library/stdtypes.rst:6097 msgid "" "To format only a tuple you should therefore provide a singleton tuple whose " "only element is the tuple to be formatted." @@ -8036,14 +8113,14 @@ msgstr "" #: ../../library/stdtypes.rst:13 ../../library/stdtypes.rst:322 #: ../../library/stdtypes.rst:399 ../../library/stdtypes.rst:992 -#: ../../library/stdtypes.rst:1159 ../../library/stdtypes.rst:1181 -#: ../../library/stdtypes.rst:1196 ../../library/stdtypes.rst:4787 -#: ../../library/stdtypes.rst:5778 +#: ../../library/stdtypes.rst:1162 ../../library/stdtypes.rst:1184 +#: ../../library/stdtypes.rst:1199 ../../library/stdtypes.rst:4831 +#: ../../library/stdtypes.rst:5822 msgid "types" msgstr "" -#: ../../library/stdtypes.rst:34 ../../library/stdtypes.rst:1196 -#: ../../library/stdtypes.rst:4787 +#: ../../library/stdtypes.rst:34 ../../library/stdtypes.rst:1199 +#: ../../library/stdtypes.rst:4831 msgid "statement" msgstr "" @@ -8161,15 +8238,15 @@ msgid "is not" msgstr "" #: ../../library/stdtypes.rst:163 ../../library/stdtypes.rst:208 -#: ../../library/stdtypes.rst:976 ../../library/stdtypes.rst:1159 -#: ../../library/stdtypes.rst:1181 ../../library/stdtypes.rst:1302 -#: ../../library/stdtypes.rst:1381 ../../library/stdtypes.rst:1425 -#: ../../library/stdtypes.rst:1546 ../../library/stdtypes.rst:1676 -#: ../../library/stdtypes.rst:2820 ../../library/stdtypes.rst:2839 -#: ../../library/stdtypes.rst:2950 ../../library/stdtypes.rst:4585 -#: ../../library/stdtypes.rst:4787 ../../library/stdtypes.rst:5267 -#: ../../library/stdtypes.rst:5523 ../../library/stdtypes.rst:5698 -#: ../../library/stdtypes.rst:5742 +#: ../../library/stdtypes.rst:976 ../../library/stdtypes.rst:1162 +#: ../../library/stdtypes.rst:1184 ../../library/stdtypes.rst:1307 +#: ../../library/stdtypes.rst:1386 ../../library/stdtypes.rst:1430 +#: ../../library/stdtypes.rst:1551 ../../library/stdtypes.rst:1681 +#: ../../library/stdtypes.rst:2864 ../../library/stdtypes.rst:2883 +#: ../../library/stdtypes.rst:2994 ../../library/stdtypes.rst:4629 +#: ../../library/stdtypes.rst:4831 ../../library/stdtypes.rst:5311 +#: ../../library/stdtypes.rst:5567 ../../library/stdtypes.rst:5742 +#: ../../library/stdtypes.rst:5786 msgid "object" msgstr "" @@ -8261,9 +8338,9 @@ msgid "arithmetic" msgstr "" #: ../../library/stdtypes.rst:249 ../../library/stdtypes.rst:992 -#: ../../library/stdtypes.rst:1159 ../../library/stdtypes.rst:4787 -#: ../../library/stdtypes.rst:5749 ../../library/stdtypes.rst:5763 -#: ../../library/stdtypes.rst:5778 +#: ../../library/stdtypes.rst:1162 ../../library/stdtypes.rst:4831 +#: ../../library/stdtypes.rst:5793 ../../library/stdtypes.rst:5807 +#: ../../library/stdtypes.rst:5822 msgid "built-in function" msgstr "" @@ -8279,8 +8356,8 @@ msgstr "" msgid "complex" msgstr "" -#: ../../library/stdtypes.rst:249 ../../library/stdtypes.rst:2696 -#: ../../library/stdtypes.rst:3955 +#: ../../library/stdtypes.rst:249 ../../library/stdtypes.rst:2740 +#: ../../library/stdtypes.rst:3999 msgid "+ (plus)" msgstr "" @@ -8292,13 +8369,13 @@ msgstr "" msgid "binary operator" msgstr "" -#: ../../library/stdtypes.rst:249 ../../library/stdtypes.rst:2696 -#: ../../library/stdtypes.rst:3955 +#: ../../library/stdtypes.rst:249 ../../library/stdtypes.rst:2740 +#: ../../library/stdtypes.rst:3999 msgid "- (minus)" msgstr "" -#: ../../library/stdtypes.rst:249 ../../library/stdtypes.rst:2653 -#: ../../library/stdtypes.rst:3912 +#: ../../library/stdtypes.rst:249 ../../library/stdtypes.rst:2697 +#: ../../library/stdtypes.rst:3956 msgid "* (asterisk)" msgstr "" @@ -8310,8 +8387,8 @@ msgstr "" msgid "//" msgstr "" -#: ../../library/stdtypes.rst:249 ../../library/stdtypes.rst:2617 -#: ../../library/stdtypes.rst:3880 +#: ../../library/stdtypes.rst:249 ../../library/stdtypes.rst:2661 +#: ../../library/stdtypes.rst:3924 msgid "% (percent)" msgstr "" @@ -8320,8 +8397,8 @@ msgid "**" msgstr "" #: ../../library/stdtypes.rst:322 ../../library/stdtypes.rst:399 -#: ../../library/stdtypes.rst:992 ../../library/stdtypes.rst:1196 -#: ../../library/stdtypes.rst:4787 +#: ../../library/stdtypes.rst:992 ../../library/stdtypes.rst:1199 +#: ../../library/stdtypes.rst:4831 msgid "operations on" msgstr "" @@ -8329,8 +8406,8 @@ msgstr "" msgid "conjugate() (complex number method)" msgstr "" -#: ../../library/stdtypes.rst:341 ../../library/stdtypes.rst:1742 -#: ../../library/stdtypes.rst:2820 ../../library/stdtypes.rst:5778 +#: ../../library/stdtypes.rst:341 ../../library/stdtypes.rst:1747 +#: ../../library/stdtypes.rst:2864 ../../library/stdtypes.rst:5822 msgid "module" msgstr "" @@ -8398,7 +8475,7 @@ msgstr "" msgid "iterator protocol" msgstr "" -#: ../../library/stdtypes.rst:889 ../../library/stdtypes.rst:5182 +#: ../../library/stdtypes.rst:889 ../../library/stdtypes.rst:5226 msgid "protocol" msgstr "" @@ -8407,8 +8484,8 @@ msgid "iterator" msgstr "" #: ../../library/stdtypes.rst:889 ../../library/stdtypes.rst:976 -#: ../../library/stdtypes.rst:992 ../../library/stdtypes.rst:1159 -#: ../../library/stdtypes.rst:1181 ../../library/stdtypes.rst:1196 +#: ../../library/stdtypes.rst:992 ../../library/stdtypes.rst:1162 +#: ../../library/stdtypes.rst:1184 ../../library/stdtypes.rst:1199 msgid "sequence" msgstr "" @@ -8424,7 +8501,7 @@ msgstr "" msgid "iteration over" msgstr "" -#: ../../library/stdtypes.rst:992 ../../library/stdtypes.rst:4787 +#: ../../library/stdtypes.rst:992 ../../library/stdtypes.rst:4831 msgid "len" msgstr "" @@ -8448,11 +8525,11 @@ msgstr "" msgid "repetition" msgstr "" -#: ../../library/stdtypes.rst:992 ../../library/stdtypes.rst:1196 +#: ../../library/stdtypes.rst:992 ../../library/stdtypes.rst:1199 msgid "subscript" msgstr "" -#: ../../library/stdtypes.rst:992 ../../library/stdtypes.rst:1196 +#: ../../library/stdtypes.rst:992 ../../library/stdtypes.rst:1199 msgid "slice" msgstr "" @@ -8480,356 +8557,356 @@ msgstr "" msgid "loop over" msgstr "" -#: ../../library/stdtypes.rst:1159 +#: ../../library/stdtypes.rst:1162 msgid "immutable" msgstr "" -#: ../../library/stdtypes.rst:1159 ../../library/stdtypes.rst:1381 +#: ../../library/stdtypes.rst:1162 ../../library/stdtypes.rst:1386 msgid "tuple" msgstr "" -#: ../../library/stdtypes.rst:1159 +#: ../../library/stdtypes.rst:1162 msgid "hash" msgstr "" -#: ../../library/stdtypes.rst:1181 +#: ../../library/stdtypes.rst:1184 msgid "mutable" msgstr "" -#: ../../library/stdtypes.rst:1181 ../../library/stdtypes.rst:1196 -#: ../../library/stdtypes.rst:1302 +#: ../../library/stdtypes.rst:1184 ../../library/stdtypes.rst:1199 +#: ../../library/stdtypes.rst:1307 msgid "list" msgstr "" -#: ../../library/stdtypes.rst:1181 ../../library/stdtypes.rst:2820 -#: ../../library/stdtypes.rst:2950 ../../library/stdtypes.rst:3058 -#: ../../library/stdtypes.rst:3880 +#: ../../library/stdtypes.rst:1184 ../../library/stdtypes.rst:2864 +#: ../../library/stdtypes.rst:2994 ../../library/stdtypes.rst:3102 +#: ../../library/stdtypes.rst:3924 msgid "bytearray" msgstr "" -#: ../../library/stdtypes.rst:1196 ../../library/stdtypes.rst:4787 -#: ../../library/stdtypes.rst:5523 ../../library/stdtypes.rst:5778 +#: ../../library/stdtypes.rst:1199 ../../library/stdtypes.rst:4831 +#: ../../library/stdtypes.rst:5567 ../../library/stdtypes.rst:5822 msgid "type" msgstr "" -#: ../../library/stdtypes.rst:1196 +#: ../../library/stdtypes.rst:1199 msgid "assignment" msgstr "" -#: ../../library/stdtypes.rst:1196 ../../library/stdtypes.rst:4787 +#: ../../library/stdtypes.rst:1199 ../../library/stdtypes.rst:4831 msgid "del" msgstr "" -#: ../../library/stdtypes.rst:1196 +#: ../../library/stdtypes.rst:1199 msgid "append() (sequence method)" msgstr "" -#: ../../library/stdtypes.rst:1196 +#: ../../library/stdtypes.rst:1199 msgid "clear() (sequence method)" msgstr "" -#: ../../library/stdtypes.rst:1196 +#: ../../library/stdtypes.rst:1199 msgid "copy() (sequence method)" msgstr "" -#: ../../library/stdtypes.rst:1196 +#: ../../library/stdtypes.rst:1199 msgid "extend() (sequence method)" msgstr "" -#: ../../library/stdtypes.rst:1196 +#: ../../library/stdtypes.rst:1199 msgid "insert() (sequence method)" msgstr "" -#: ../../library/stdtypes.rst:1196 +#: ../../library/stdtypes.rst:1199 msgid "pop() (sequence method)" msgstr "" -#: ../../library/stdtypes.rst:1196 +#: ../../library/stdtypes.rst:1199 msgid "remove() (sequence method)" msgstr "" -#: ../../library/stdtypes.rst:1196 +#: ../../library/stdtypes.rst:1199 msgid "reverse() (sequence method)" msgstr "" -#: ../../library/stdtypes.rst:1425 +#: ../../library/stdtypes.rst:1430 msgid "range" msgstr "" -#: ../../library/stdtypes.rst:1546 ../../library/stdtypes.rst:1689 -#: ../../library/stdtypes.rst:1734 ../../library/stdtypes.rst:2471 -#: ../../library/stdtypes.rst:2617 +#: ../../library/stdtypes.rst:1551 ../../library/stdtypes.rst:1694 +#: ../../library/stdtypes.rst:1739 ../../library/stdtypes.rst:2515 +#: ../../library/stdtypes.rst:2661 msgid "string" msgstr "" -#: ../../library/stdtypes.rst:1546 +#: ../../library/stdtypes.rst:1551 msgid "text sequence type" msgstr "" -#: ../../library/stdtypes.rst:1546 ../../library/stdtypes.rst:1689 -#: ../../library/stdtypes.rst:1707 +#: ../../library/stdtypes.rst:1551 ../../library/stdtypes.rst:1694 +#: ../../library/stdtypes.rst:1712 msgid "str (built-in class)" msgstr "" -#: ../../library/stdtypes.rst:1546 +#: ../../library/stdtypes.rst:1551 msgid "(see also string)" msgstr "" -#: ../../library/stdtypes.rst:1676 +#: ../../library/stdtypes.rst:1681 msgid "io.StringIO" msgstr "" -#: ../../library/stdtypes.rst:1707 ../../library/stdtypes.rst:2812 +#: ../../library/stdtypes.rst:1712 ../../library/stdtypes.rst:2856 msgid "buffer protocol" msgstr "" -#: ../../library/stdtypes.rst:1707 ../../library/stdtypes.rst:2820 -#: ../../library/stdtypes.rst:2839 ../../library/stdtypes.rst:3058 -#: ../../library/stdtypes.rst:3880 +#: ../../library/stdtypes.rst:1712 ../../library/stdtypes.rst:2864 +#: ../../library/stdtypes.rst:2883 ../../library/stdtypes.rst:3102 +#: ../../library/stdtypes.rst:3924 msgid "bytes" msgstr "" -#: ../../library/stdtypes.rst:1734 ../../library/stdtypes.rst:3058 +#: ../../library/stdtypes.rst:1739 ../../library/stdtypes.rst:3102 msgid "methods" msgstr "" -#: ../../library/stdtypes.rst:1742 +#: ../../library/stdtypes.rst:1747 msgid "re" msgstr "" -#: ../../library/stdtypes.rst:2285 ../../library/stdtypes.rst:3734 +#: ../../library/stdtypes.rst:2329 ../../library/stdtypes.rst:3778 msgid "universal newlines" msgstr "" -#: ../../library/stdtypes.rst:2285 +#: ../../library/stdtypes.rst:2329 msgid "str.splitlines method" msgstr "" -#: ../../library/stdtypes.rst:2471 +#: ../../library/stdtypes.rst:2515 msgid "! formatted string literal" msgstr "" -#: ../../library/stdtypes.rst:2471 +#: ../../library/stdtypes.rst:2515 msgid "formatted string literals" msgstr "" -#: ../../library/stdtypes.rst:2471 +#: ../../library/stdtypes.rst:2515 msgid "! f-string" msgstr "" -#: ../../library/stdtypes.rst:2471 +#: ../../library/stdtypes.rst:2515 msgid "f-strings" msgstr "" -#: ../../library/stdtypes.rst:2471 +#: ../../library/stdtypes.rst:2515 msgid "fstring" msgstr "" -#: ../../library/stdtypes.rst:2471 +#: ../../library/stdtypes.rst:2515 msgid "interpolated string literal" msgstr "" -#: ../../library/stdtypes.rst:2471 +#: ../../library/stdtypes.rst:2515 msgid "formatted literal" msgstr "" -#: ../../library/stdtypes.rst:2471 +#: ../../library/stdtypes.rst:2515 msgid "interpolated literal" msgstr "" -#: ../../library/stdtypes.rst:2471 +#: ../../library/stdtypes.rst:2515 msgid "{} (curly brackets)" msgstr "" -#: ../../library/stdtypes.rst:2471 +#: ../../library/stdtypes.rst:2515 msgid "in formatted string literal" msgstr "" -#: ../../library/stdtypes.rst:2471 +#: ../../library/stdtypes.rst:2515 msgid "! (exclamation mark)" msgstr "" -#: ../../library/stdtypes.rst:2471 +#: ../../library/stdtypes.rst:2515 msgid ": (colon)" msgstr "" -#: ../../library/stdtypes.rst:2471 +#: ../../library/stdtypes.rst:2515 msgid "= (equals)" msgstr "" -#: ../../library/stdtypes.rst:2471 +#: ../../library/stdtypes.rst:2515 msgid "for help in debugging using string literals" msgstr "" -#: ../../library/stdtypes.rst:2617 +#: ../../library/stdtypes.rst:2661 msgid "formatting, string (%)" msgstr "" -#: ../../library/stdtypes.rst:2617 +#: ../../library/stdtypes.rst:2661 msgid "interpolation, string (%)" msgstr "" -#: ../../library/stdtypes.rst:2617 +#: ../../library/stdtypes.rst:2661 msgid "formatting, printf" msgstr "" -#: ../../library/stdtypes.rst:2617 +#: ../../library/stdtypes.rst:2661 msgid "interpolation, printf" msgstr "" -#: ../../library/stdtypes.rst:2617 ../../library/stdtypes.rst:3880 +#: ../../library/stdtypes.rst:2661 ../../library/stdtypes.rst:3924 msgid "printf-style formatting" msgstr "" -#: ../../library/stdtypes.rst:2617 ../../library/stdtypes.rst:3880 +#: ../../library/stdtypes.rst:2661 ../../library/stdtypes.rst:3924 msgid "sprintf-style formatting" msgstr "" -#: ../../library/stdtypes.rst:2653 ../../library/stdtypes.rst:3912 +#: ../../library/stdtypes.rst:2697 ../../library/stdtypes.rst:3956 msgid "() (parentheses)" msgstr "" -#: ../../library/stdtypes.rst:2653 ../../library/stdtypes.rst:2696 -#: ../../library/stdtypes.rst:3912 ../../library/stdtypes.rst:3955 +#: ../../library/stdtypes.rst:2697 ../../library/stdtypes.rst:2740 +#: ../../library/stdtypes.rst:3956 ../../library/stdtypes.rst:3999 msgid "in printf-style formatting" msgstr "" -#: ../../library/stdtypes.rst:2653 ../../library/stdtypes.rst:3912 +#: ../../library/stdtypes.rst:2697 ../../library/stdtypes.rst:3956 msgid ". (dot)" msgstr "" -#: ../../library/stdtypes.rst:2696 ../../library/stdtypes.rst:3955 +#: ../../library/stdtypes.rst:2740 ../../library/stdtypes.rst:3999 msgid "# (hash)" msgstr "" -#: ../../library/stdtypes.rst:2696 ../../library/stdtypes.rst:3955 +#: ../../library/stdtypes.rst:2740 ../../library/stdtypes.rst:3999 msgid "space" msgstr "" -#: ../../library/stdtypes.rst:2812 +#: ../../library/stdtypes.rst:2856 msgid "binary sequence types" msgstr "" -#: ../../library/stdtypes.rst:2820 +#: ../../library/stdtypes.rst:2864 msgid "memoryview" msgstr "" -#: ../../library/stdtypes.rst:2820 +#: ../../library/stdtypes.rst:2864 msgid "array" msgstr "" -#: ../../library/stdtypes.rst:3734 +#: ../../library/stdtypes.rst:3778 msgid "bytes.splitlines method" msgstr "" -#: ../../library/stdtypes.rst:3734 +#: ../../library/stdtypes.rst:3778 msgid "bytearray.splitlines method" msgstr "" -#: ../../library/stdtypes.rst:3880 +#: ../../library/stdtypes.rst:3924 msgid "formatting" msgstr "" -#: ../../library/stdtypes.rst:3880 +#: ../../library/stdtypes.rst:3924 msgid "bytes (%)" msgstr "" -#: ../../library/stdtypes.rst:3880 +#: ../../library/stdtypes.rst:3924 msgid "bytearray (%)" msgstr "" -#: ../../library/stdtypes.rst:3880 +#: ../../library/stdtypes.rst:3924 msgid "interpolation" msgstr "" -#: ../../library/stdtypes.rst:4585 +#: ../../library/stdtypes.rst:4629 msgid "set" msgstr "" -#: ../../library/stdtypes.rst:4787 +#: ../../library/stdtypes.rst:4831 msgid "mapping" msgstr "" -#: ../../library/stdtypes.rst:4787 +#: ../../library/stdtypes.rst:4831 msgid "dictionary" msgstr "" -#: ../../library/stdtypes.rst:4897 +#: ../../library/stdtypes.rst:4941 msgid "__missing__()" msgstr "" -#: ../../library/stdtypes.rst:5182 +#: ../../library/stdtypes.rst:5226 msgid "context manager" msgstr "" -#: ../../library/stdtypes.rst:5182 +#: ../../library/stdtypes.rst:5226 msgid "context management protocol" msgstr "" -#: ../../library/stdtypes.rst:5182 +#: ../../library/stdtypes.rst:5226 msgid "context management" msgstr "" -#: ../../library/stdtypes.rst:5255 +#: ../../library/stdtypes.rst:5299 msgid "annotation" msgstr "" -#: ../../library/stdtypes.rst:5255 +#: ../../library/stdtypes.rst:5299 msgid "type annotation; type hint" msgstr "" -#: ../../library/stdtypes.rst:5267 +#: ../../library/stdtypes.rst:5311 msgid "GenericAlias" msgstr "" -#: ../../library/stdtypes.rst:5267 +#: ../../library/stdtypes.rst:5311 msgid "Generic" msgstr "" -#: ../../library/stdtypes.rst:5267 +#: ../../library/stdtypes.rst:5311 msgid "Alias" msgstr "" -#: ../../library/stdtypes.rst:5523 +#: ../../library/stdtypes.rst:5567 msgid "Union" msgstr "" -#: ../../library/stdtypes.rst:5523 +#: ../../library/stdtypes.rst:5567 msgid "union" msgstr "" -#: ../../library/stdtypes.rst:5698 +#: ../../library/stdtypes.rst:5742 msgid "method" msgstr "" -#: ../../library/stdtypes.rst:5742 +#: ../../library/stdtypes.rst:5786 msgid "code" msgstr "" -#: ../../library/stdtypes.rst:5742 +#: ../../library/stdtypes.rst:5786 msgid "code object" msgstr "" -#: ../../library/stdtypes.rst:5749 +#: ../../library/stdtypes.rst:5793 msgid "compile" msgstr "" -#: ../../library/stdtypes.rst:5749 +#: ../../library/stdtypes.rst:5793 msgid "__code__ (function object attribute)" msgstr "" -#: ../../library/stdtypes.rst:5763 +#: ../../library/stdtypes.rst:5807 msgid "exec" msgstr "" -#: ../../library/stdtypes.rst:5763 +#: ../../library/stdtypes.rst:5807 msgid "eval" msgstr "" -#: ../../library/stdtypes.rst:5802 +#: ../../library/stdtypes.rst:5846 msgid "..." msgstr "" -#: ../../library/stdtypes.rst:5802 +#: ../../library/stdtypes.rst:5846 msgid "ellipsis literal" msgstr "" diff --git a/library/string.po b/library/string.po index c660b808b..45c5bf914 100644 --- a/library/string.po +++ b/library/string.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:14+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/stringprep.po b/library/stringprep.po index 491bc5fdc..a739b08a9 100644 --- a/library/stringprep.po +++ b/library/stringprep.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:14+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/struct.po b/library/struct.po index 70fad9dd2..7836185a5 100644 --- a/library/struct.po +++ b/library/struct.po @@ -7,15 +7,16 @@ # Danial Behzadi , 2025 # Alireza Shabani (Revisto) , 2025 # Ariyan Bolandi, 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:14+0000\n" -"Last-Translator: Ariyan Bolandi, 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/subprocess.po b/library/subprocess.po index 91704088d..9d0fea329 100644 --- a/library/subprocess.po +++ b/library/subprocess.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:14+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/sunau.po b/library/sunau.po index cc13be781..0ad1ac7b7 100644 --- a/library/sunau.po +++ b/library/sunau.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-11-19 01:03+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/superseded.po b/library/superseded.po index 431a2be37..d8149a3ae 100644 --- a/library/superseded.po +++ b/library/superseded.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:14+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/symtable.po b/library/symtable.po index b16f61536..a185b01a5 100644 --- a/library/symtable.po +++ b/library/symtable.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:14+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/sys.monitoring.po b/library/sys.monitoring.po index 3b4f6a30c..5f986058f 100644 --- a/library/sys.monitoring.po +++ b/library/sys.monitoring.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2023-09-08 14:16+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" @@ -197,38 +197,41 @@ msgid "A Python function is resumed by a ``throw()`` call." msgstr "" #: ../../library/sys.monitoring.rst:140 -msgid "Exit from a Python function during exception unwinding." +msgid "" +"Exit from a Python function during exception unwinding. This includes " +"exceptions raised directly within the function and that are allowed to " +"continue to propagate." msgstr "" -#: ../../library/sys.monitoring.rst:144 +#: ../../library/sys.monitoring.rst:145 msgid "" "Yield from a Python function (occurs immediately before the yield, the " "callee's frame will be on the stack)." msgstr "" -#: ../../library/sys.monitoring.rst:148 +#: ../../library/sys.monitoring.rst:149 msgid "" "An exception is raised, except those that cause a :monitoring-event:" "`STOP_ITERATION` event." msgstr "" -#: ../../library/sys.monitoring.rst:152 +#: ../../library/sys.monitoring.rst:153 msgid "" "An exception is re-raised, for example at the end of a :keyword:`finally` " "block." msgstr "" -#: ../../library/sys.monitoring.rst:156 +#: ../../library/sys.monitoring.rst:157 msgid "" "An artificial :exc:`StopIteration` is raised; see `the STOP_ITERATION " "event`_." msgstr "" -#: ../../library/sys.monitoring.rst:159 +#: ../../library/sys.monitoring.rst:160 msgid "More events may be added in the future." msgstr "" -#: ../../library/sys.monitoring.rst:161 +#: ../../library/sys.monitoring.rst:162 msgid "" "These events are attributes of the :mod:`!sys.monitoring.events` namespace. " "Each event is represented as a power-of-2 integer constant. To define a set " @@ -237,109 +240,109 @@ msgid "" "events, use the expression ``PY_RETURN | PY_START``." msgstr "" -#: ../../library/sys.monitoring.rst:169 +#: ../../library/sys.monitoring.rst:170 msgid "An alias for ``0`` so users can do explicit comparisons like::" msgstr "" -#: ../../library/sys.monitoring.rst:171 +#: ../../library/sys.monitoring.rst:172 msgid "" "if get_events(DEBUGGER_ID) == NO_EVENTS:\n" " ..." msgstr "" -#: ../../library/sys.monitoring.rst:174 -msgid "Events are divided into three groups:" +#: ../../library/sys.monitoring.rst:175 +msgid "Setting this event deactivates all events." msgstr "" -#: ../../library/sys.monitoring.rst:179 +#: ../../library/sys.monitoring.rst:180 msgid "Local events" msgstr "" -#: ../../library/sys.monitoring.rst:181 +#: ../../library/sys.monitoring.rst:182 msgid "" "Local events are associated with normal execution of the program and happen " "at clearly defined locations. All local events can be disabled. The local " "events are:" msgstr "" -#: ../../library/sys.monitoring.rst:185 +#: ../../library/sys.monitoring.rst:186 msgid ":monitoring-event:`PY_START`" msgstr "" -#: ../../library/sys.monitoring.rst:186 +#: ../../library/sys.monitoring.rst:187 msgid ":monitoring-event:`PY_RESUME`" msgstr "" -#: ../../library/sys.monitoring.rst:187 +#: ../../library/sys.monitoring.rst:188 msgid ":monitoring-event:`PY_RETURN`" msgstr "" -#: ../../library/sys.monitoring.rst:188 +#: ../../library/sys.monitoring.rst:189 msgid ":monitoring-event:`PY_YIELD`" msgstr "" -#: ../../library/sys.monitoring.rst:189 +#: ../../library/sys.monitoring.rst:190 msgid ":monitoring-event:`CALL`" msgstr "" -#: ../../library/sys.monitoring.rst:190 +#: ../../library/sys.monitoring.rst:191 msgid ":monitoring-event:`LINE`" msgstr "" -#: ../../library/sys.monitoring.rst:191 +#: ../../library/sys.monitoring.rst:192 msgid ":monitoring-event:`INSTRUCTION`" msgstr "" -#: ../../library/sys.monitoring.rst:192 +#: ../../library/sys.monitoring.rst:193 msgid ":monitoring-event:`JUMP`" msgstr "" -#: ../../library/sys.monitoring.rst:193 +#: ../../library/sys.monitoring.rst:194 msgid ":monitoring-event:`BRANCH_LEFT`" msgstr "" -#: ../../library/sys.monitoring.rst:194 +#: ../../library/sys.monitoring.rst:195 msgid ":monitoring-event:`BRANCH_RIGHT`" msgstr "" -#: ../../library/sys.monitoring.rst:195 +#: ../../library/sys.monitoring.rst:196 msgid ":monitoring-event:`STOP_ITERATION`" msgstr "" -#: ../../library/sys.monitoring.rst:198 +#: ../../library/sys.monitoring.rst:199 msgid "Deprecated event" msgstr "" -#: ../../library/sys.monitoring.rst:200 +#: ../../library/sys.monitoring.rst:201 msgid "``BRANCH``" msgstr "" -#: ../../library/sys.monitoring.rst:202 +#: ../../library/sys.monitoring.rst:203 msgid "" "The ``BRANCH`` event is deprecated in 3.14. Using :monitoring-event:" "`BRANCH_LEFT` and :monitoring-event:`BRANCH_RIGHT` events will give much " "better performance as they can be disabled independently." msgstr "" -#: ../../library/sys.monitoring.rst:208 +#: ../../library/sys.monitoring.rst:209 msgid "Ancillary events" msgstr "" -#: ../../library/sys.monitoring.rst:210 +#: ../../library/sys.monitoring.rst:211 msgid "" "Ancillary events can be monitored like other events, but are controlled by " "another event:" msgstr "" -#: ../../library/sys.monitoring.rst:213 +#: ../../library/sys.monitoring.rst:214 msgid ":monitoring-event:`C_RAISE`" msgstr "" -#: ../../library/sys.monitoring.rst:214 +#: ../../library/sys.monitoring.rst:215 msgid ":monitoring-event:`C_RETURN`" msgstr "" -#: ../../library/sys.monitoring.rst:216 +#: ../../library/sys.monitoring.rst:217 msgid "" "The :monitoring-event:`C_RETURN` and :monitoring-event:`C_RAISE` events are " "controlled by the :monitoring-event:`CALL` event. :monitoring-event:" @@ -347,41 +350,41 @@ msgid "" "corresponding :monitoring-event:`CALL` event is being monitored." msgstr "" -#: ../../library/sys.monitoring.rst:222 +#: ../../library/sys.monitoring.rst:223 msgid "Other events" msgstr "" -#: ../../library/sys.monitoring.rst:224 +#: ../../library/sys.monitoring.rst:225 msgid "" "Other events are not necessarily tied to a specific location in the program " "and cannot be individually disabled." msgstr "" -#: ../../library/sys.monitoring.rst:227 +#: ../../library/sys.monitoring.rst:228 msgid "The other events that can be monitored are:" msgstr "" -#: ../../library/sys.monitoring.rst:229 +#: ../../library/sys.monitoring.rst:230 msgid ":monitoring-event:`PY_THROW`" msgstr "" -#: ../../library/sys.monitoring.rst:230 +#: ../../library/sys.monitoring.rst:231 msgid ":monitoring-event:`PY_UNWIND`" msgstr "" -#: ../../library/sys.monitoring.rst:231 +#: ../../library/sys.monitoring.rst:232 msgid ":monitoring-event:`RAISE`" msgstr "" -#: ../../library/sys.monitoring.rst:232 +#: ../../library/sys.monitoring.rst:233 msgid ":monitoring-event:`EXCEPTION_HANDLED`" msgstr "" -#: ../../library/sys.monitoring.rst:236 +#: ../../library/sys.monitoring.rst:237 msgid "The STOP_ITERATION event" msgstr "" -#: ../../library/sys.monitoring.rst:238 +#: ../../library/sys.monitoring.rst:239 msgid "" ":pep:`PEP 380 <380#use-of-stopiteration-to-return-values>` specifies that a :" "exc:`StopIteration` exception is raised when returning a value from a " @@ -390,7 +393,7 @@ msgid "" "an exception unless it would be visible to other code." msgstr "" -#: ../../library/sys.monitoring.rst:244 +#: ../../library/sys.monitoring.rst:245 msgid "" "To allow tools to monitor for real exceptions without slowing down " "generators and coroutines, the :monitoring-event:`STOP_ITERATION` event is " @@ -398,7 +401,7 @@ msgid "" "unlike :monitoring-event:`RAISE`." msgstr "" -#: ../../library/sys.monitoring.rst:248 +#: ../../library/sys.monitoring.rst:250 msgid "" "Note that the :monitoring-event:`STOP_ITERATION` event and the :monitoring-" "event:`RAISE` event for a :exc:`StopIteration` exception are equivalent, and " @@ -407,46 +410,47 @@ msgid "" "generate a :monitoring-event:`RAISE` event with a :exc:`StopIteration`." msgstr "" -#: ../../library/sys.monitoring.rst:254 +#: ../../library/sys.monitoring.rst:258 msgid "Turning events on and off" msgstr "" -#: ../../library/sys.monitoring.rst:256 +#: ../../library/sys.monitoring.rst:260 msgid "" "In order to monitor an event, it must be turned on and a corresponding " "callback must be registered. Events can be turned on or off by setting the " -"events either globally or for a particular code object." +"events either globally and/or for a particular code object. An event will " +"trigger only once, even if it is turned on both globally and locally." msgstr "" -#: ../../library/sys.monitoring.rst:263 +#: ../../library/sys.monitoring.rst:267 msgid "Setting events globally" msgstr "" -#: ../../library/sys.monitoring.rst:265 +#: ../../library/sys.monitoring.rst:269 msgid "" "Events can be controlled globally by modifying the set of events being " "monitored." msgstr "" -#: ../../library/sys.monitoring.rst:269 +#: ../../library/sys.monitoring.rst:273 msgid "Returns the ``int`` representing all the active events." msgstr "" -#: ../../library/sys.monitoring.rst:273 +#: ../../library/sys.monitoring.rst:277 msgid "" "Activates all events which are set in *event_set*. Raises a :exc:" "`ValueError` if *tool_id* is not in use." msgstr "" -#: ../../library/sys.monitoring.rst:276 +#: ../../library/sys.monitoring.rst:280 msgid "No events are active by default." msgstr "" -#: ../../library/sys.monitoring.rst:279 +#: ../../library/sys.monitoring.rst:283 msgid "Per code object events" msgstr "" -#: ../../library/sys.monitoring.rst:281 +#: ../../library/sys.monitoring.rst:285 msgid "" "Events can also be controlled on a per code object basis. The functions " "defined below which accept a :class:`types.CodeType` should be prepared to " @@ -454,22 +458,16 @@ msgid "" "(see :ref:`c-api-monitoring`)." msgstr "" -#: ../../library/sys.monitoring.rst:288 +#: ../../library/sys.monitoring.rst:292 msgid "Returns all the local events for *code*" msgstr "" -#: ../../library/sys.monitoring.rst:292 +#: ../../library/sys.monitoring.rst:296 msgid "" "Activates all the local events for *code* which are set in *event_set*. " "Raises a :exc:`ValueError` if *tool_id* is not in use." msgstr "" -#: ../../library/sys.monitoring.rst:295 -msgid "" -"Local events add to global events, but do not mask them. In other words, all " -"global events will trigger for a code object, regardless of the local events." -msgstr "" - #: ../../library/sys.monitoring.rst:301 msgid "Disabling events" msgstr "" @@ -505,126 +503,139 @@ msgstr "" msgid "Registering callback functions" msgstr "" -#: ../../library/sys.monitoring.rst:328 -msgid "To register a callable for events call" -msgstr "" - -#: ../../library/sys.monitoring.rst:332 +#: ../../library/sys.monitoring.rst:330 msgid "Registers the callable *func* for the *event* with the given *tool_id*" msgstr "" -#: ../../library/sys.monitoring.rst:334 +#: ../../library/sys.monitoring.rst:332 msgid "" "If another callback was registered for the given *tool_id* and *event*, it " "is unregistered and returned. Otherwise :func:`register_callback` returns " "``None``." msgstr "" -#: ../../library/sys.monitoring.rst:339 +#: ../../library/sys.monitoring.rst:336 msgid "" "Functions can be unregistered by calling ``sys.monitoring." "register_callback(tool_id, event, None)``." msgstr "" -#: ../../library/sys.monitoring.rst:342 +#: ../../library/sys.monitoring.rst:339 msgid "Callback functions can be registered and unregistered at any time." msgstr "" -#: ../../library/sys.monitoring.rst:344 +#: ../../library/sys.monitoring.rst:341 +msgid "" +"Callbacks are called only once regardless if the event is turned on both " +"globally and locally. As such, if an event could be turned on for both " +"global and local events by your code then the callback needs to be written " +"to handle either trigger." +msgstr "" + +#: ../../library/sys.monitoring.rst:346 msgid "" "Registering or unregistering a callback function will generate a :func:`sys." "audit` event." msgstr "" -#: ../../library/sys.monitoring.rst:348 +#: ../../library/sys.monitoring.rst:350 msgid "Callback function arguments" msgstr "" -#: ../../library/sys.monitoring.rst:352 +#: ../../library/sys.monitoring.rst:354 msgid "" "A special value that is passed to a callback function to indicate that there " "are no arguments to the call." msgstr "" -#: ../../library/sys.monitoring.rst:355 +#: ../../library/sys.monitoring.rst:357 msgid "" "When an active event occurs, the registered callback function is called. " -"Different events will provide the callback function with different " -"arguments, as follows:" +"Callback functions returning an object other than :data:`DISABLE` will have " +"no effect. Different events will provide the callback function with " +"different arguments, as follows:" msgstr "" -#: ../../library/sys.monitoring.rst:358 +#: ../../library/sys.monitoring.rst:361 msgid ":monitoring-event:`PY_START` and :monitoring-event:`PY_RESUME`::" msgstr "" -#: ../../library/sys.monitoring.rst:360 ../../library/sys.monitoring.rst:389 -msgid "func(code: CodeType, instruction_offset: int) -> DISABLE | Any" +#: ../../library/sys.monitoring.rst:363 ../../library/sys.monitoring.rst:400 +msgid "func(code: CodeType, instruction_offset: int) -> object" msgstr "" -#: ../../library/sys.monitoring.rst:362 +#: ../../library/sys.monitoring.rst:365 msgid ":monitoring-event:`PY_RETURN` and :monitoring-event:`PY_YIELD`::" msgstr "" -#: ../../library/sys.monitoring.rst:364 -msgid "" -"func(code: CodeType, instruction_offset: int, retval: object) -> DISABLE | " -"Any" +#: ../../library/sys.monitoring.rst:367 +msgid "func(code: CodeType, instruction_offset: int, retval: object) -> object" msgstr "" -#: ../../library/sys.monitoring.rst:366 +#: ../../library/sys.monitoring.rst:369 msgid "" ":monitoring-event:`CALL`, :monitoring-event:`C_RAISE` and :monitoring-event:" -"`C_RETURN`::" +"`C_RETURN` (*arg0* can be :data:`MISSING` specifically)::" msgstr "" -#: ../../library/sys.monitoring.rst:368 +#: ../../library/sys.monitoring.rst:372 msgid "" -"func(code: CodeType, instruction_offset: int, callable: object, arg0: object " -"| MISSING) -> DISABLE | Any" +"func(code: CodeType, instruction_offset: int, callable: object, arg0: " +"object) -> object" msgstr "" -#: ../../library/sys.monitoring.rst:370 +#: ../../library/sys.monitoring.rst:374 msgid "" -"If there are no arguments, *arg0* is set to :data:`sys.monitoring.MISSING`." +"*code* represents the code object where the call is being made, while " +"*callable* is the object that is about to be called (and thus triggered the " +"event). If there are no arguments, *arg0* is set to :data:`sys.monitoring." +"MISSING`." msgstr "" -#: ../../library/sys.monitoring.rst:372 +#: ../../library/sys.monitoring.rst:379 +msgid "" +"For instance methods, *callable* will be the function object as found on the " +"class with *arg0* set to the instance (i.e. the ``self`` argument to the " +"method)." +msgstr "" + +#: ../../library/sys.monitoring.rst:383 msgid "" ":monitoring-event:`RAISE`, :monitoring-event:`RERAISE`, :monitoring-event:" "`EXCEPTION_HANDLED`, :monitoring-event:`PY_UNWIND`, :monitoring-event:" "`PY_THROW` and :monitoring-event:`STOP_ITERATION`::" msgstr "" -#: ../../library/sys.monitoring.rst:375 +#: ../../library/sys.monitoring.rst:386 msgid "" "func(code: CodeType, instruction_offset: int, exception: BaseException) -> " -"DISABLE | Any" +"object" msgstr "" -#: ../../library/sys.monitoring.rst:377 +#: ../../library/sys.monitoring.rst:388 msgid ":monitoring-event:`LINE`::" msgstr "" -#: ../../library/sys.monitoring.rst:379 -msgid "func(code: CodeType, line_number: int) -> DISABLE | Any" +#: ../../library/sys.monitoring.rst:390 +msgid "func(code: CodeType, line_number: int) -> object" msgstr "" -#: ../../library/sys.monitoring.rst:381 +#: ../../library/sys.monitoring.rst:392 msgid "" ":monitoring-event:`BRANCH_LEFT`, :monitoring-event:`BRANCH_RIGHT` and :" "monitoring-event:`JUMP`::" msgstr "" -#: ../../library/sys.monitoring.rst:383 +#: ../../library/sys.monitoring.rst:394 msgid "" "func(code: CodeType, instruction_offset: int, destination_offset: int) -> " -"DISABLE | Any" +"object" msgstr "" -#: ../../library/sys.monitoring.rst:385 +#: ../../library/sys.monitoring.rst:396 msgid "Note that the *destination_offset* is where the code will next execute." msgstr "" -#: ../../library/sys.monitoring.rst:387 +#: ../../library/sys.monitoring.rst:398 msgid ":monitoring-event:`INSTRUCTION`::" msgstr "" diff --git a/library/sys.po b/library/sys.po index 849c2f07e..e268385cf 100644 --- a/library/sys.po +++ b/library/sys.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:14+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -49,10 +50,10 @@ msgstr "" #: ../../library/sys.rst:25 ../../library/sys.rst:298 ../../library/sys.rst:368 #: ../../library/sys.rst:789 ../../library/sys.rst:807 -#: ../../library/sys.rst:1054 ../../library/sys.rst:1648 -#: ../../library/sys.rst:1891 ../../library/sys.rst:1906 -#: ../../library/sys.rst:1914 ../../library/sys.rst:1936 -#: ../../library/sys.rst:1952 ../../library/sys.rst:2196 +#: ../../library/sys.rst:1056 ../../library/sys.rst:1662 +#: ../../library/sys.rst:1905 ../../library/sys.rst:1920 +#: ../../library/sys.rst:1928 ../../library/sys.rst:1966 +#: ../../library/sys.rst:1982 ../../library/sys.rst:2226 msgid "Availability" msgstr "" @@ -598,7 +599,7 @@ msgid "" "Refer to :ref:`sys-path-init-virtual-environments` for more information." msgstr "" -#: ../../library/sys.rst:492 ../../library/sys.rst:1613 +#: ../../library/sys.rst:492 ../../library/sys.rst:1627 msgid "" "When running under a :ref:`virtual environment `, :data:`prefix` " "and :data:`exec_prefix` are now set to the virtual environment prefix by " @@ -1213,20 +1214,20 @@ msgid "" "argument ``depth``." msgstr "" -#: ../../library/sys.rst:959 +#: ../../library/sys.rst:961 msgid "" "This function only exists if CPython was built using the specialized " "configure option :option:`--with-trace-refs`. It is intended only for " "debugging garbage-collection issues." msgstr "" -#: ../../library/sys.rst:963 +#: ../../library/sys.rst:965 msgid "" "Return a list of up to *limit* dynamically allocated Python objects. If " "*type* is given, only objects of that exact type (not subtypes) are included." msgstr "" -#: ../../library/sys.rst:967 +#: ../../library/sys.rst:969 msgid "" "Objects from the list are not safe to use. Specifically, the result will " "include objects from all interpreters that share their object allocator " @@ -1236,25 +1237,25 @@ msgid "" "different interpreters may lead to crashes or other unexpected behavior." msgstr "" -#: ../../library/sys.rst:978 ../../library/sys.rst:1370 +#: ../../library/sys.rst:980 ../../library/sys.rst:1384 msgid "" "This function should be used for specialized purposes only. It is not " "guaranteed to exist in all implementations of Python." msgstr "" -#: ../../library/sys.rst:983 +#: ../../library/sys.rst:985 msgid "The result may include objects from other interpreters." msgstr "" -#: ../../library/sys.rst:992 +#: ../../library/sys.rst:994 msgid "Get the profiler function as set by :func:`setprofile`." msgstr "" -#: ../../library/sys.rst:1001 +#: ../../library/sys.rst:1003 msgid "Get the trace function as set by :func:`settrace`." msgstr "" -#: ../../library/sys.rst:1005 +#: ../../library/sys.rst:1007 msgid "" "The :func:`gettrace` function is intended only for implementing debuggers, " "profilers, coverage tools and the like. Its behavior is part of the " @@ -1262,7 +1263,7 @@ msgid "" "thus may not be available in all Python implementations." msgstr "" -#: ../../library/sys.rst:1013 +#: ../../library/sys.rst:1015 msgid "" "Return a named tuple describing the Windows version currently running. The " "named elements are *major*, *minor*, *build*, *platform*, *service_pack*, " @@ -1274,54 +1275,54 @@ msgid "" "first 5 elements are retrievable by indexing." msgstr "" -#: ../../library/sys.rst:1024 +#: ../../library/sys.rst:1026 msgid "*platform* will be ``2`` (VER_PLATFORM_WIN32_NT)." msgstr "" -#: ../../library/sys.rst:1026 +#: ../../library/sys.rst:1028 msgid "*product_type* may be one of the following values:" msgstr "" -#: ../../library/sys.rst:1029 +#: ../../library/sys.rst:1031 msgid "Constant" msgstr "" -#: ../../library/sys.rst:1029 +#: ../../library/sys.rst:1031 msgid "Meaning" msgstr "" -#: ../../library/sys.rst:1031 +#: ../../library/sys.rst:1033 msgid "``1`` (VER_NT_WORKSTATION)" msgstr "" -#: ../../library/sys.rst:1031 +#: ../../library/sys.rst:1033 msgid "The system is a workstation." msgstr "" -#: ../../library/sys.rst:1033 +#: ../../library/sys.rst:1035 msgid "``2`` (VER_NT_DOMAIN_CONTROLLER)" msgstr "" -#: ../../library/sys.rst:1033 +#: ../../library/sys.rst:1035 msgid "The system is a domain controller." msgstr "" -#: ../../library/sys.rst:1036 +#: ../../library/sys.rst:1038 msgid "``3`` (VER_NT_SERVER)" msgstr "" -#: ../../library/sys.rst:1036 +#: ../../library/sys.rst:1038 msgid "The system is a server, but not a domain controller." msgstr "" -#: ../../library/sys.rst:1040 +#: ../../library/sys.rst:1042 msgid "" "This function wraps the Win32 :c:func:`!GetVersionEx` function; see the " "Microsoft documentation on :c:func:`!OSVERSIONINFOEX` for more information " "about these fields." msgstr "" -#: ../../library/sys.rst:1044 +#: ../../library/sys.rst:1046 msgid "" "*platform_version* returns the major version, minor version and build number " "of the current operating system, rather than the version that is being " @@ -1329,24 +1330,24 @@ msgid "" "feature detection." msgstr "" -#: ../../library/sys.rst:1050 +#: ../../library/sys.rst:1052 msgid "" "*platform_version* derives the version from kernel32.dll which can be of a " "different version than the OS version. Please use :mod:`platform` module for " "achieving accurate OS version." msgstr "" -#: ../../library/sys.rst:1056 +#: ../../library/sys.rst:1058 msgid "" "Changed to a named tuple and added *service_pack_minor*, " "*service_pack_major*, *suite_mask*, and *product_type*." msgstr "" -#: ../../library/sys.rst:1060 +#: ../../library/sys.rst:1062 msgid "Added *platform_version*" msgstr "" -#: ../../library/sys.rst:1066 +#: ../../library/sys.rst:1068 msgid "" "Returns an *asyncgen_hooks* object, which is similar to a :class:" "`~collections.namedtuple` of the form ``(firstiter, finalizer)``, where " @@ -1356,71 +1357,71 @@ msgid "" "loop." msgstr "" -#: ../../library/sys.rst:1073 +#: ../../library/sys.rst:1075 msgid "See :pep:`525` for more details." msgstr "" -#: ../../library/sys.rst:1077 ../../library/sys.rst:1860 +#: ../../library/sys.rst:1079 ../../library/sys.rst:1874 msgid "" "This function has been added on a provisional basis (see :pep:`411` for " "details.)" msgstr "" -#: ../../library/sys.rst:1083 +#: ../../library/sys.rst:1085 msgid "" "Get the current coroutine origin tracking depth, as set by :func:" "`set_coroutine_origin_tracking_depth`." msgstr "" -#: ../../library/sys.rst:1089 ../../library/sys.rst:1881 +#: ../../library/sys.rst:1091 ../../library/sys.rst:1895 msgid "" "This function has been added on a provisional basis (see :pep:`411` for " "details.) Use it only for debugging purposes." msgstr "" -#: ../../library/sys.rst:1095 +#: ../../library/sys.rst:1097 msgid "" "A :term:`named tuple` giving parameters of the numeric hash implementation. " "For more details about hashing of numeric types, see :ref:`numeric-hash`." msgstr "" -#: ../../library/sys.rst:1101 +#: ../../library/sys.rst:1103 msgid "The width in bits used for hash values" msgstr "" -#: ../../library/sys.rst:1105 +#: ../../library/sys.rst:1107 msgid "The prime modulus P used for numeric hash scheme" msgstr "" -#: ../../library/sys.rst:1109 +#: ../../library/sys.rst:1111 msgid "The hash value returned for a positive infinity" msgstr "" -#: ../../library/sys.rst:1113 +#: ../../library/sys.rst:1115 msgid "(This attribute is no longer used)" msgstr "" -#: ../../library/sys.rst:1117 +#: ../../library/sys.rst:1119 msgid "The multiplier used for the imaginary part of a complex number" msgstr "" -#: ../../library/sys.rst:1121 +#: ../../library/sys.rst:1123 msgid "The name of the algorithm for hashing of str, bytes, and memoryview" msgstr "" -#: ../../library/sys.rst:1125 +#: ../../library/sys.rst:1127 msgid "The internal output size of the hash algorithm" msgstr "" -#: ../../library/sys.rst:1129 +#: ../../library/sys.rst:1131 msgid "The size of the seed key of the hash algorithm" msgstr "" -#: ../../library/sys.rst:1133 +#: ../../library/sys.rst:1135 msgid "Added *algorithm*, *hash_bits* and *seed_bits*" msgstr "" -#: ../../library/sys.rst:1139 +#: ../../library/sys.rst:1141 msgid "" "The version number encoded as a single integer. This is guaranteed to " "increase with each version, including proper support for non-production " @@ -1428,7 +1429,7 @@ msgid "" "version 1.5.2, use::" msgstr "" -#: ../../library/sys.rst:1143 +#: ../../library/sys.rst:1145 msgid "" "if sys.hexversion >= 0x010502F0:\n" " # use some advanced feature\n" @@ -1438,7 +1439,7 @@ msgid "" " ..." msgstr "" -#: ../../library/sys.rst:1150 +#: ../../library/sys.rst:1152 msgid "" "This is called ``hexversion`` since it only really looks meaningful when " "viewed as the result of passing it to the built-in :func:`hex` function. " @@ -1446,25 +1447,25 @@ msgid "" "human-friendly encoding of the same information." msgstr "" -#: ../../library/sys.rst:1155 +#: ../../library/sys.rst:1157 msgid "More details of ``hexversion`` can be found at :ref:`apiabiversion`." msgstr "" -#: ../../library/sys.rst:1160 +#: ../../library/sys.rst:1162 msgid "" "An object containing information about the implementation of the currently " "running Python interpreter. The following attributes are required to exist " "in all Python implementations." msgstr "" -#: ../../library/sys.rst:1164 +#: ../../library/sys.rst:1166 msgid "" "*name* is the implementation's identifier, e.g. ``'cpython'``. The actual " "string is defined by the Python implementation, but it is guaranteed to be " "lower case." msgstr "" -#: ../../library/sys.rst:1168 +#: ../../library/sys.rst:1170 msgid "" "*version* is a named tuple, in the same format as :data:`sys.version_info`. " "It represents the version of the Python *implementation*. This has a " @@ -1476,13 +1477,13 @@ msgid "" "the same value, since it is the reference implementation." msgstr "" -#: ../../library/sys.rst:1178 +#: ../../library/sys.rst:1180 msgid "" "*hexversion* is the implementation version in hexadecimal format, like :data:" "`sys.hexversion`." msgstr "" -#: ../../library/sys.rst:1181 +#: ../../library/sys.rst:1183 msgid "" "*cache_tag* is the tag used by the import machinery in the filenames of " "cached modules. By convention, it would be a composite of the " @@ -1491,7 +1492,19 @@ msgid "" "set to ``None``, it indicates that module caching should be disabled." msgstr "" -#: ../../library/sys.rst:1188 +#: ../../library/sys.rst:1190 +msgid "" +"*supports_isolated_interpreters* is a boolean value, whether this " +"implementation supports multiple isolated interpreters. It is ``True`` for " +"CPython on most platforms. Platforms with this support implement the low-" +"level :mod:`!_interpreters` module." +msgstr "" + +#: ../../library/sys.rst:1197 +msgid ":pep:`684`, :pep:`734`, and :mod:`concurrent.interpreters`." +msgstr "" + +#: ../../library/sys.rst:1199 msgid "" ":data:`sys.implementation` may contain additional attributes specific to the " "Python implementation. These non-standard attributes must start with an " @@ -1501,47 +1514,51 @@ msgid "" "versions, however.) See :pep:`421` for more information." msgstr "" -#: ../../library/sys.rst:1199 +#: ../../library/sys.rst:1208 +msgid "Added ``supports_isolated_interpreters`` field." +msgstr "" + +#: ../../library/sys.rst:1213 msgid "" "The addition of new required attributes must go through the normal PEP " "process. See :pep:`421` for more information." msgstr "" -#: ../../library/sys.rst:1204 +#: ../../library/sys.rst:1218 msgid "" "A :term:`named tuple` that holds information about Python's internal " "representation of integers. The attributes are read only." msgstr "" -#: ../../library/sys.rst:1209 +#: ../../library/sys.rst:1223 msgid "" "The number of bits held in each digit. Python integers are stored internally " "in base ``2**int_info.bits_per_digit``." msgstr "" -#: ../../library/sys.rst:1214 +#: ../../library/sys.rst:1228 msgid "The size in bytes of the C type used to represent a digit." msgstr "" -#: ../../library/sys.rst:1218 +#: ../../library/sys.rst:1232 msgid "" "The default value for :func:`sys.get_int_max_str_digits` when it is not " "otherwise explicitly configured." msgstr "" -#: ../../library/sys.rst:1223 +#: ../../library/sys.rst:1237 msgid "" "The minimum non-zero value for :func:`sys.set_int_max_str_digits`, :envvar:" "`PYTHONINTMAXSTRDIGITS`, or :option:`-X int_max_str_digits <-X>`." msgstr "" -#: ../../library/sys.rst:1230 +#: ../../library/sys.rst:1244 msgid "" "Added :attr:`~int_info.default_max_str_digits` and :attr:`~int_info." "str_digits_check_threshold`." msgstr "" -#: ../../library/sys.rst:1236 +#: ../../library/sys.rst:1250 msgid "" "When this attribute exists, its value is automatically called (with no " "arguments) when the interpreter is launched in :ref:`interactive mode `." msgstr "" -#: ../../library/sys.rst:1242 ../../library/sys.rst:1244 +#: ../../library/sys.rst:1256 ../../library/sys.rst:1258 msgid "" "Raises an :ref:`auditing event ` ``cpython.run_interactivehook`` " "with the hook object as the argument when the hook is called on startup." msgstr "" -#: ../../library/sys.rst:1253 +#: ../../library/sys.rst:1267 msgid "" "Enter *string* in the table of \"interned\" strings and return the interned " "string -- which is *string* itself or a copy. Interning strings is useful to " @@ -1568,44 +1585,44 @@ msgid "" "attributes have interned keys." msgstr "" -#: ../../library/sys.rst:1261 +#: ../../library/sys.rst:1275 msgid "" "Interned strings are not :term:`immortal`; you must keep a reference to the " "return value of :func:`intern` around to benefit from it." msgstr "" -#: ../../library/sys.rst:1267 +#: ../../library/sys.rst:1281 msgid "" "Return :const:`True` if the :term:`GIL` is enabled and :const:`False` if it " "is disabled." msgstr "" -#: ../../library/sys.rst:1274 ../../library/sys.rst:1382 +#: ../../library/sys.rst:1288 ../../library/sys.rst:1396 msgid "It is not guaranteed to exist in all implementations of Python." msgstr "" -#: ../../library/sys.rst:1278 +#: ../../library/sys.rst:1292 msgid "" "Return :const:`True` if the main Python interpreter is :term:`shutting down " "`. Return :const:`False` otherwise." msgstr "" -#: ../../library/sys.rst:1281 +#: ../../library/sys.rst:1295 msgid "See also the :exc:`PythonFinalizationError` exception." msgstr "" -#: ../../library/sys.rst:1287 +#: ../../library/sys.rst:1301 msgid "Utilities for observing just-in-time compilation." msgstr "" -#: ../../library/sys.rst:1291 +#: ../../library/sys.rst:1305 msgid "" "JIT compilation is an *experimental implementation detail* of CPython. ``sys." "_jit`` is not guaranteed to exist or behave the same way in all Python " "implementations, versions, or build configurations." msgstr "" -#: ../../library/sys.rst:1299 +#: ../../library/sys.rst:1313 msgid "" "Return ``True`` if the current Python executable supports JIT compilation, " "and ``False`` otherwise. This can be controlled by building CPython with " @@ -1613,7 +1630,7 @@ msgid "" "experimental-jit` option on all other platforms." msgstr "" -#: ../../library/sys.rst:1306 +#: ../../library/sys.rst:1320 msgid "" "Return ``True`` if JIT compilation is enabled for the current Python process " "(implies :func:`sys._jit.is_available`), and ``False`` otherwise. If JIT " @@ -1622,19 +1639,19 @@ msgid "" "interpreter startup." msgstr "" -#: ../../library/sys.rst:1314 +#: ../../library/sys.rst:1328 msgid "" "Return ``True`` if the topmost Python frame is currently executing JIT code " "(implies :func:`sys._jit.is_enabled`), and ``False`` otherwise." msgstr "" -#: ../../library/sys.rst:1319 +#: ../../library/sys.rst:1333 msgid "" "This function is intended for testing and debugging the JIT itself. It " "should be avoided for any other purpose." msgstr "" -#: ../../library/sys.rst:1324 +#: ../../library/sys.rst:1338 msgid "" "Due to the nature of tracing JIT compilers, repeated calls to this function " "may give surprising results. For example, branching on its return value will " @@ -1642,7 +1659,7 @@ msgid "" "entered or exited):" msgstr "" -#: ../../library/sys.rst:1329 +#: ../../library/sys.rst:1343 msgid "" ">>> for warmup in range(BIG_NUMBER):\n" "... # This line is \"hot\", and is eventually JIT-compiled:\n" @@ -1657,7 +1674,7 @@ msgid "" "AssertionError" msgstr "" -#: ../../library/sys.rst:1345 +#: ../../library/sys.rst:1359 msgid "" "This variable is not always defined; it is set to the exception instance " "when an exception is not handled and the interpreter prints an error message " @@ -1668,53 +1685,53 @@ msgid "" "more information.)" msgstr "" -#: ../../library/sys.rst:1357 +#: ../../library/sys.rst:1371 msgid "" "Return :const:`True` if the given object is :term:`immortal`, :const:`False` " "otherwise." msgstr "" -#: ../../library/sys.rst:1362 +#: ../../library/sys.rst:1376 msgid "" "Objects that are immortal (and thus return ``True`` upon being passed to " "this function) are not guaranteed to be immortal in future versions, and " "vice versa for mortal objects." msgstr "" -#: ../../library/sys.rst:1375 +#: ../../library/sys.rst:1389 msgid "" "Return :const:`True` if the given string is \"interned\", :const:`False` " "otherwise." msgstr "" -#: ../../library/sys.rst:1389 +#: ../../library/sys.rst:1403 msgid "" "These three variables are deprecated; use :data:`sys.last_exc` instead. They " "hold the legacy representation of ``sys.last_exc``, as returned from :func:" "`exc_info` above." msgstr "" -#: ../../library/sys.rst:1395 +#: ../../library/sys.rst:1409 msgid "" "An integer giving the maximum value a variable of type :c:type:`Py_ssize_t` " "can take. It's usually ``2**31 - 1`` on a 32-bit platform and ``2**63 - 1`` " "on a 64-bit platform." msgstr "" -#: ../../library/sys.rst:1402 +#: ../../library/sys.rst:1416 msgid "" "An integer giving the value of the largest Unicode code point, i.e. " "``1114111`` (``0x10FFFF`` in hexadecimal)." msgstr "" -#: ../../library/sys.rst:1405 +#: ../../library/sys.rst:1419 msgid "" "Before :pep:`393`, ``sys.maxunicode`` used to be either ``0xFFFF`` or " "``0x10FFFF``, depending on the configuration option that specified whether " "Unicode characters were stored as UCS-2 or UCS-4." msgstr "" -#: ../../library/sys.rst:1413 +#: ../../library/sys.rst:1427 msgid "" "A list of :term:`meta path finder` objects that have their :meth:`~importlib." "abc.MetaPathFinder.find_spec` methods called to see if one of the objects " @@ -1727,40 +1744,40 @@ msgid "" "``None`` if the module cannot be found." msgstr "" -#: ../../library/sys.rst:1426 +#: ../../library/sys.rst:1440 msgid ":class:`importlib.abc.MetaPathFinder`" msgstr "" -#: ../../library/sys.rst:1427 +#: ../../library/sys.rst:1441 msgid "" "The abstract base class defining the interface of finder objects on :data:" "`meta_path`." msgstr "" -#: ../../library/sys.rst:1429 +#: ../../library/sys.rst:1443 msgid ":class:`importlib.machinery.ModuleSpec`" msgstr "" -#: ../../library/sys.rst:1430 +#: ../../library/sys.rst:1444 msgid "" "The concrete class which :meth:`~importlib.abc.MetaPathFinder.find_spec` " "should return instances of." msgstr "" -#: ../../library/sys.rst:1436 +#: ../../library/sys.rst:1450 msgid "" ":term:`Module specs ` were introduced in Python 3.4, by :pep:" "`451`." msgstr "" -#: ../../library/sys.rst:1441 +#: ../../library/sys.rst:1455 msgid "" "Removed the fallback that looked for a :meth:`!find_module` method if a :" "data:`meta_path` entry didn't have a :meth:`~importlib.abc.MetaPathFinder." "find_spec` method." msgstr "" -#: ../../library/sys.rst:1447 +#: ../../library/sys.rst:1461 msgid "" "This is a dictionary that maps module names to modules which have already " "been loaded. This can be manipulated to force reloading of modules and " @@ -1772,13 +1789,13 @@ msgid "" "other threads." msgstr "" -#: ../../library/sys.rst:1459 +#: ../../library/sys.rst:1473 msgid "" "The list of the original command line arguments passed to the Python " "executable." msgstr "" -#: ../../library/sys.rst:1462 +#: ../../library/sys.rst:1476 msgid "" "The elements of :data:`sys.orig_argv` are the arguments to the Python " "interpreter, while the elements of :data:`sys.argv` are the arguments to the " @@ -1786,68 +1803,68 @@ msgid "" "in :data:`sys.orig_argv` and missing from :data:`sys.argv`." msgstr "" -#: ../../library/sys.rst:1474 +#: ../../library/sys.rst:1488 msgid "" "A list of strings that specifies the search path for modules. Initialized " "from the environment variable :envvar:`PYTHONPATH`, plus an installation-" "dependent default." msgstr "" -#: ../../library/sys.rst:1478 +#: ../../library/sys.rst:1492 msgid "" "By default, as initialized upon program startup, a potentially unsafe path " "is prepended to :data:`sys.path` (*before* the entries inserted as a result " "of :envvar:`PYTHONPATH`):" msgstr "" -#: ../../library/sys.rst:1482 +#: ../../library/sys.rst:1496 msgid "" "``python -m module`` command line: prepend the current working directory." msgstr "" -#: ../../library/sys.rst:1484 +#: ../../library/sys.rst:1498 msgid "" "``python script.py`` command line: prepend the script's directory. If it's a " "symbolic link, resolve symbolic links." msgstr "" -#: ../../library/sys.rst:1486 +#: ../../library/sys.rst:1500 msgid "" "``python -c code`` and ``python`` (REPL) command lines: prepend an empty " "string, which means the current working directory." msgstr "" -#: ../../library/sys.rst:1489 +#: ../../library/sys.rst:1503 msgid "" "To not prepend this potentially unsafe path, use the :option:`-P` command " "line option or the :envvar:`PYTHONSAFEPATH` environment variable." msgstr "" -#: ../../library/sys.rst:1492 +#: ../../library/sys.rst:1506 msgid "" "A program is free to modify this list for its own purposes. Only strings " "should be added to :data:`sys.path`; all other data types are ignored during " "import." msgstr "" -#: ../../library/sys.rst:1498 +#: ../../library/sys.rst:1512 msgid "" "Module :mod:`site` This describes how to use .pth files to extend :data:`sys." "path`." msgstr "" -#: ../../library/sys.rst:1503 +#: ../../library/sys.rst:1517 msgid "" "A list of callables that take a path argument to try to create a :term:" "`finder` for the path. If a finder can be created, it is to be returned by " "the callable, else raise :exc:`ImportError`." msgstr "" -#: ../../library/sys.rst:1507 ../../library/sys.rst:1518 +#: ../../library/sys.rst:1521 ../../library/sys.rst:1532 msgid "Originally specified in :pep:`302`." msgstr "" -#: ../../library/sys.rst:1512 +#: ../../library/sys.rst:1526 msgid "" "A dictionary acting as a cache for :term:`finder` objects. The keys are " "paths that have been passed to :data:`sys.path_hooks` and the values are the " @@ -1855,99 +1872,99 @@ msgid "" "is found on :data:`sys.path_hooks` then ``None`` is stored." msgstr "" -#: ../../library/sys.rst:1523 +#: ../../library/sys.rst:1537 msgid "A string containing a platform identifier. Known values are:" msgstr "" -#: ../../library/sys.rst:1526 +#: ../../library/sys.rst:1540 msgid "System" msgstr "" -#: ../../library/sys.rst:1526 +#: ../../library/sys.rst:1540 msgid "``platform`` value" msgstr "" -#: ../../library/sys.rst:1528 +#: ../../library/sys.rst:1542 msgid "AIX" msgstr "" -#: ../../library/sys.rst:1528 +#: ../../library/sys.rst:1542 msgid "``'aix'``" msgstr "" -#: ../../library/sys.rst:1529 +#: ../../library/sys.rst:1543 msgid "Android" msgstr "" -#: ../../library/sys.rst:1529 +#: ../../library/sys.rst:1543 msgid "``'android'``" msgstr "" -#: ../../library/sys.rst:1530 +#: ../../library/sys.rst:1544 msgid "Emscripten" msgstr "" -#: ../../library/sys.rst:1530 +#: ../../library/sys.rst:1544 msgid "``'emscripten'``" msgstr "" -#: ../../library/sys.rst:1531 +#: ../../library/sys.rst:1545 msgid "FreeBSD" msgstr "" -#: ../../library/sys.rst:1531 +#: ../../library/sys.rst:1545 msgid "``'freebsd'``" msgstr "" -#: ../../library/sys.rst:1532 +#: ../../library/sys.rst:1546 msgid "iOS" msgstr "" -#: ../../library/sys.rst:1532 +#: ../../library/sys.rst:1546 msgid "``'ios'``" msgstr "" -#: ../../library/sys.rst:1533 +#: ../../library/sys.rst:1547 msgid "Linux" msgstr "" -#: ../../library/sys.rst:1533 +#: ../../library/sys.rst:1547 msgid "``'linux'``" msgstr "" -#: ../../library/sys.rst:1534 +#: ../../library/sys.rst:1548 msgid "macOS" msgstr "" -#: ../../library/sys.rst:1534 +#: ../../library/sys.rst:1548 msgid "``'darwin'``" msgstr "" -#: ../../library/sys.rst:1535 +#: ../../library/sys.rst:1549 msgid "Windows" msgstr "" -#: ../../library/sys.rst:1535 +#: ../../library/sys.rst:1549 msgid "``'win32'``" msgstr "" -#: ../../library/sys.rst:1536 +#: ../../library/sys.rst:1550 msgid "Windows/Cygwin" msgstr "" -#: ../../library/sys.rst:1536 +#: ../../library/sys.rst:1550 msgid "``'cygwin'``" msgstr "" -#: ../../library/sys.rst:1537 +#: ../../library/sys.rst:1551 msgid "WASI" msgstr "" -#: ../../library/sys.rst:1537 +#: ../../library/sys.rst:1551 msgid "``'wasi'``" msgstr "" -#: ../../library/sys.rst:1540 +#: ../../library/sys.rst:1554 msgid "" "On Unix systems not listed in the table, the value is the lowercased OS name " "as returned by ``uname -s``, with the first part of the version as returned " @@ -1956,87 +1973,87 @@ msgid "" "therefore recommended to use the following idiom::" msgstr "" -#: ../../library/sys.rst:1546 +#: ../../library/sys.rst:1560 msgid "" "if sys.platform.startswith('sunos'):\n" " # SunOS-specific code here..." msgstr "" -#: ../../library/sys.rst:1549 +#: ../../library/sys.rst:1563 msgid "" "On Linux, :data:`sys.platform` doesn't contain the major version anymore. It " "is always ``'linux'``, instead of ``'linux2'`` or ``'linux3'``." msgstr "" -#: ../../library/sys.rst:1553 +#: ../../library/sys.rst:1567 msgid "" "On AIX, :data:`sys.platform` doesn't contain the major version anymore. It " "is always ``'aix'``, instead of ``'aix5'`` or ``'aix7'``." msgstr "" -#: ../../library/sys.rst:1557 +#: ../../library/sys.rst:1571 msgid "" "On Android, :data:`sys.platform` now returns ``'android'`` rather than " "``'linux'``." msgstr "" -#: ../../library/sys.rst:1561 +#: ../../library/sys.rst:1575 msgid "" "On FreeBSD, :data:`sys.platform` doesn't contain the major version anymore. " "It is always ``'freebsd'``, instead of ``'freebsd13'`` or ``'freebsd14'``." msgstr "" -#: ../../library/sys.rst:1567 +#: ../../library/sys.rst:1581 msgid "" ":data:`os.name` has a coarser granularity. :func:`os.uname` gives system-" "dependent version information." msgstr "" -#: ../../library/sys.rst:1570 +#: ../../library/sys.rst:1584 msgid "" "The :mod:`platform` module provides detailed checks for the system's " "identity." msgstr "" -#: ../../library/sys.rst:1576 +#: ../../library/sys.rst:1590 msgid "" "Name of the platform-specific library directory. It is used to build the " "path of standard library and the paths of installed extension modules." msgstr "" -#: ../../library/sys.rst:1579 +#: ../../library/sys.rst:1593 msgid "" "It is equal to ``\"lib\"`` on most platforms. On Fedora and SuSE, it is " "equal to ``\"lib64\"`` on 64-bit platforms which gives the following ``sys." "path`` paths (where ``X.Y`` is the Python ``major.minor`` version):" msgstr "" -#: ../../library/sys.rst:1583 +#: ../../library/sys.rst:1597 msgid "" "``/usr/lib64/pythonX.Y/``: Standard library (like ``os.py`` of the :mod:`os` " "module)" msgstr "" -#: ../../library/sys.rst:1585 +#: ../../library/sys.rst:1599 msgid "" "``/usr/lib64/pythonX.Y/lib-dynload/``: C extension modules of the standard " "library (like the :mod:`errno` module, the exact filename is platform " "specific)" msgstr "" -#: ../../library/sys.rst:1588 +#: ../../library/sys.rst:1602 msgid "" "``/usr/lib/pythonX.Y/site-packages/`` (always use ``lib``, not :data:`sys." "platlibdir`): Third-party modules" msgstr "" -#: ../../library/sys.rst:1590 +#: ../../library/sys.rst:1604 msgid "" "``/usr/lib64/pythonX.Y/site-packages/``: C extension modules of third-party " "packages" msgstr "" -#: ../../library/sys.rst:1598 +#: ../../library/sys.rst:1612 msgid "" "A string giving the site-specific directory prefix where the platform " "independent Python files are installed; on Unix, the default is :file:`/usr/" @@ -2045,7 +2062,7 @@ msgid "" "derived paths." msgstr "" -#: ../../library/sys.rst:1606 +#: ../../library/sys.rst:1620 msgid "" "If a :ref:`virtual environment ` is in effect, this :data:`prefix` " "will point to the virtual environment. The value for the Python installation " @@ -2053,7 +2070,7 @@ msgid "" "init-virtual-environments` for more information." msgstr "" -#: ../../library/sys.rst:1630 +#: ../../library/sys.rst:1644 msgid "" "Strings specifying the primary and secondary prompt of the interpreter. " "These are only defined if the interpreter is in interactive mode. Their " @@ -2063,7 +2080,7 @@ msgid "" "used to implement a dynamic prompt." msgstr "" -#: ../../library/sys.rst:1640 +#: ../../library/sys.rst:1654 msgid "" "Set the flags used by the interpreter for :c:func:`dlopen` calls, such as " "when the interpreter loads extension modules. Among other things, this will " @@ -2074,14 +2091,14 @@ msgid "" "g. :const:`os.RTLD_LAZY`)." msgstr "" -#: ../../library/sys.rst:1652 +#: ../../library/sys.rst:1666 msgid "" "Set the :ref:`integer string conversion length limitation " "` used by this interpreter. See also :func:" "`get_int_max_str_digits`." msgstr "" -#: ../../library/sys.rst:1664 +#: ../../library/sys.rst:1678 msgid "" "Set the system's profile function, which allows you to implement a Python " "source code profiler in Python. See chapter :ref:`profile` for more " @@ -2096,14 +2113,14 @@ msgid "" "in the profile function will cause itself unset." msgstr "" -#: ../../library/sys.rst:1676 +#: ../../library/sys.rst:1690 msgid "" "The same tracing mechanism is used for :func:`!setprofile` as :func:" "`settrace`. To trace calls with :func:`!setprofile` inside a tracing " "function (e.g. in a debugger breakpoint), see :func:`call_tracing`." msgstr "" -#: ../../library/sys.rst:1680 +#: ../../library/sys.rst:1694 msgid "" "Profile functions should have three arguments: *frame*, *event*, and *arg*. " "*frame* is the current stack frame. *event* is a string: ``'call'``, " @@ -2111,71 +2128,71 @@ msgid "" "depends on the event type." msgstr "" -#: ../../library/sys.rst:1685 ../../library/sys.rst:1772 +#: ../../library/sys.rst:1699 ../../library/sys.rst:1786 msgid "The events have the following meaning:" msgstr "" -#: ../../library/sys.rst:1687 ../../library/sys.rst:1774 +#: ../../library/sys.rst:1701 ../../library/sys.rst:1788 msgid "``'call'``" msgstr "" -#: ../../library/sys.rst:1688 +#: ../../library/sys.rst:1702 msgid "" "A function is called (or some other code block entered). The profile " "function is called; *arg* is ``None``." msgstr "" -#: ../../library/sys.rst:1691 ../../library/sys.rst:1789 +#: ../../library/sys.rst:1705 ../../library/sys.rst:1803 msgid "``'return'``" msgstr "" -#: ../../library/sys.rst:1692 +#: ../../library/sys.rst:1706 msgid "" "A function (or other code block) is about to return. The profile function " "is called; *arg* is the value that will be returned, or ``None`` if the " "event is caused by an exception being raised." msgstr "" -#: ../../library/sys.rst:1696 +#: ../../library/sys.rst:1710 msgid "``'c_call'``" msgstr "" -#: ../../library/sys.rst:1697 +#: ../../library/sys.rst:1711 msgid "" "A C function is about to be called. This may be an extension function or a " "built-in. *arg* is the C function object." msgstr "" -#: ../../library/sys.rst:1700 +#: ../../library/sys.rst:1714 msgid "``'c_return'``" msgstr "" -#: ../../library/sys.rst:1701 +#: ../../library/sys.rst:1715 msgid "A C function has returned. *arg* is the C function object." msgstr "" -#: ../../library/sys.rst:1703 +#: ../../library/sys.rst:1717 msgid "``'c_exception'``" msgstr "" -#: ../../library/sys.rst:1704 +#: ../../library/sys.rst:1718 msgid "A C function has raised an exception. *arg* is the C function object." msgstr "" -#: ../../library/sys.rst:1706 +#: ../../library/sys.rst:1720 msgid "" "Raises an :ref:`auditing event ` ``sys.setprofile`` with no " "arguments." msgstr "" -#: ../../library/sys.rst:1711 +#: ../../library/sys.rst:1725 msgid "" "Set the maximum depth of the Python interpreter stack to *limit*. This " "limit prevents infinite recursion from causing an overflow of the C stack " "and crashing Python." msgstr "" -#: ../../library/sys.rst:1715 +#: ../../library/sys.rst:1729 msgid "" "The highest possible limit is platform-dependent. A user may need to set " "the limit higher when they have a program that requires deep recursion and a " @@ -2183,19 +2200,19 @@ msgid "" "because a too-high limit can lead to a crash." msgstr "" -#: ../../library/sys.rst:1720 +#: ../../library/sys.rst:1734 msgid "" "If the new limit is too low at the current recursion depth, a :exc:" "`RecursionError` exception is raised." msgstr "" -#: ../../library/sys.rst:1723 +#: ../../library/sys.rst:1737 msgid "" "A :exc:`RecursionError` exception is now raised if the new limit is too low " "at the current recursion depth." msgstr "" -#: ../../library/sys.rst:1730 +#: ../../library/sys.rst:1744 msgid "" "Set the interpreter's thread switch interval (in seconds). This floating-" "point value determines the ideal duration of the \"timeslices\" allocated to " @@ -2206,7 +2223,7 @@ msgid "" "scheduler." msgstr "" -#: ../../library/sys.rst:1747 +#: ../../library/sys.rst:1761 msgid "" "Set the system's trace function, which allows you to implement a Python " "source code debugger in Python. The function is thread-specific; for a " @@ -2215,7 +2232,7 @@ msgid "" "`threading.settrace`." msgstr "" -#: ../../library/sys.rst:1752 +#: ../../library/sys.rst:1766 msgid "" "Trace functions should have three arguments: *frame*, *event*, and *arg*. " "*frame* is the current stack frame. *event* is a string: ``'call'``, " @@ -2223,7 +2240,7 @@ msgid "" "the event type." msgstr "" -#: ../../library/sys.rst:1757 +#: ../../library/sys.rst:1771 msgid "" "The trace function is invoked (with *event* set to ``'call'``) whenever a " "new local scope is entered; it should return a reference to a local trace " @@ -2231,36 +2248,36 @@ msgid "" "traced." msgstr "" -#: ../../library/sys.rst:1762 +#: ../../library/sys.rst:1776 msgid "" "The local trace function should return a reference to itself, or to another " "function which would then be used as the local trace function for the scope." msgstr "" -#: ../../library/sys.rst:1765 +#: ../../library/sys.rst:1779 msgid "" "If there is any error occurred in the trace function, it will be unset, just " "like ``settrace(None)`` is called." msgstr "" -#: ../../library/sys.rst:1769 +#: ../../library/sys.rst:1783 msgid "" "Tracing is disabled while calling the trace function (e.g. a function set " "by :func:`!settrace`). For recursive tracing see :func:`call_tracing`." msgstr "" -#: ../../library/sys.rst:1775 +#: ../../library/sys.rst:1789 msgid "" "A function is called (or some other code block entered). The global trace " "function is called; *arg* is ``None``; the return value specifies the local " "trace function." msgstr "" -#: ../../library/sys.rst:1779 +#: ../../library/sys.rst:1793 msgid "``'line'``" msgstr "" -#: ../../library/sys.rst:1780 +#: ../../library/sys.rst:1794 msgid "" "The interpreter is about to execute a new line of code or re-execute the " "condition of a loop. The local trace function is called; *arg* is ``None``; " @@ -2270,7 +2287,7 @@ msgid "" "to :const:`False` on that :ref:`frame `." msgstr "" -#: ../../library/sys.rst:1790 +#: ../../library/sys.rst:1804 msgid "" "A function (or other code block) is about to return. The local trace " "function is called; *arg* is the value that will be returned, or ``None`` if " @@ -2278,22 +2295,22 @@ msgid "" "return value is ignored." msgstr "" -#: ../../library/sys.rst:1795 +#: ../../library/sys.rst:1809 msgid "``'exception'``" msgstr "" -#: ../../library/sys.rst:1796 +#: ../../library/sys.rst:1810 msgid "" "An exception has occurred. The local trace function is called; *arg* is a " "tuple ``(exception, value, traceback)``; the return value specifies the new " "local trace function." msgstr "" -#: ../../library/sys.rst:1800 +#: ../../library/sys.rst:1814 msgid "``'opcode'``" msgstr "" -#: ../../library/sys.rst:1801 +#: ../../library/sys.rst:1815 msgid "" "The interpreter is about to execute a new opcode (see :mod:`dis` for opcode " "details). The local trace function is called; *arg* is ``None``; the return " @@ -2303,13 +2320,13 @@ msgid "" "objects>`." msgstr "" -#: ../../library/sys.rst:1808 +#: ../../library/sys.rst:1822 msgid "" "Note that as an exception is propagated down the chain of callers, an " "``'exception'`` event is generated at each level." msgstr "" -#: ../../library/sys.rst:1811 +#: ../../library/sys.rst:1825 msgid "" "For more fine-grained usage, it's possible to set a trace function by " "assigning ``frame.f_trace = tracefunc`` explicitly, rather than relying on " @@ -2323,17 +2340,17 @@ msgid "" "on each frame)." msgstr "" -#: ../../library/sys.rst:1822 +#: ../../library/sys.rst:1836 msgid "For more information on code and frame objects, refer to :ref:`types`." msgstr "" -#: ../../library/sys.rst:1824 +#: ../../library/sys.rst:1838 msgid "" "Raises an :ref:`auditing event ` ``sys.settrace`` with no " "arguments." msgstr "" -#: ../../library/sys.rst:1828 +#: ../../library/sys.rst:1842 msgid "" "The :func:`settrace` function is intended only for implementing debuggers, " "profilers, coverage tools and the like. Its behavior is part of the " @@ -2341,13 +2358,13 @@ msgid "" "thus may not be available in all Python implementations." msgstr "" -#: ../../library/sys.rst:1835 +#: ../../library/sys.rst:1849 msgid "" "``'opcode'`` event type added; :attr:`~frame.f_trace_lines` and :attr:" "`~frame.f_trace_opcodes` attributes added to frames" msgstr "" -#: ../../library/sys.rst:1840 +#: ../../library/sys.rst:1854 msgid "" "Accepts two optional keyword arguments which are callables that accept an :" "term:`asynchronous generator iterator` as an argument. The *firstiter* " @@ -2356,32 +2373,32 @@ msgid "" "about to be garbage collected." msgstr "" -#: ../../library/sys.rst:1846 +#: ../../library/sys.rst:1860 msgid "" "Raises an :ref:`auditing event ` ``sys." "set_asyncgen_hooks_firstiter`` with no arguments." msgstr "" -#: ../../library/sys.rst:1848 +#: ../../library/sys.rst:1862 msgid "" "Raises an :ref:`auditing event ` ``sys." "set_asyncgen_hooks_finalizer`` with no arguments." msgstr "" -#: ../../library/sys.rst:1850 +#: ../../library/sys.rst:1864 msgid "" "Two auditing events are raised because the underlying API consists of two " "calls, each of which must raise its own event." msgstr "" -#: ../../library/sys.rst:1853 +#: ../../library/sys.rst:1867 msgid "" "See :pep:`525` for more details, and for a reference example of a " "*finalizer* method see the implementation of ``asyncio.Loop." "shutdown_asyncgens`` in :source:`Lib/asyncio/base_events.py`" msgstr "" -#: ../../library/sys.rst:1865 +#: ../../library/sys.rst:1879 msgid "" "Allows enabling or disabling coroutine origin tracking. When enabled, the " "``cr_origin`` attribute on coroutine objects will contain a tuple of " @@ -2390,53 +2407,53 @@ msgid "" "disabled, ``cr_origin`` will be ``None``." msgstr "" -#: ../../library/sys.rst:1872 +#: ../../library/sys.rst:1886 msgid "" "To enable, pass a *depth* value greater than zero; this sets the number of " "frames whose information will be captured. To disable, set *depth* to zero." msgstr "" -#: ../../library/sys.rst:1876 +#: ../../library/sys.rst:1890 msgid "This setting is thread-specific." msgstr "" -#: ../../library/sys.rst:1886 +#: ../../library/sys.rst:1900 msgid "" "Activate the stack profiler trampoline *backend*. The only supported backend " "is ``\"perf\"``." msgstr "" -#: ../../library/sys.rst:1889 +#: ../../library/sys.rst:1903 msgid "Stack trampolines cannot be activated if the JIT is active." msgstr "" -#: ../../library/sys.rst:1897 +#: ../../library/sys.rst:1911 msgid ":ref:`perf_profiling`" msgstr "" -#: ../../library/sys.rst:1898 +#: ../../library/sys.rst:1912 msgid "https://perf.wiki.kernel.org" msgstr "" -#: ../../library/sys.rst:1902 +#: ../../library/sys.rst:1916 msgid "Deactivate the current stack profiler trampoline backend." msgstr "" -#: ../../library/sys.rst:1904 +#: ../../library/sys.rst:1918 msgid "If no stack profiler is activated, this function has no effect." msgstr "" -#: ../../library/sys.rst:1912 +#: ../../library/sys.rst:1926 msgid "Return ``True`` if a stack profiler trampoline is active." msgstr "" -#: ../../library/sys.rst:1921 +#: ../../library/sys.rst:1935 msgid "" "Executes *script*, a file containing Python code in the remote process with " "the given *pid*." msgstr "" -#: ../../library/sys.rst:1924 +#: ../../library/sys.rst:1938 msgid "" "This function returns immediately, and the code will be executed by the " "target process's main thread at the next available opportunity, similarly to " @@ -2446,7 +2463,7 @@ msgid "" "been overwritten." msgstr "" -#: ../../library/sys.rst:1931 +#: ../../library/sys.rst:1945 msgid "" "The remote process must be running a CPython interpreter of the same major " "and minor version as the local process. If either the local or remote " @@ -2454,74 +2471,90 @@ msgid "" "local and remote interpreters must be the same exact version." msgstr "" -#: ../../library/sys.rst:1942 +#: ../../library/sys.rst:1950 ../../library/sys.rst:1952 +msgid "" +"When the code is executed in the remote process, an :ref:`auditing event " +"` ``sys.remote_exec`` is raised with the *pid* and the path to the " +"script file. This event is raised in the process that called :func:`sys." +"remote_exec`." +msgstr "" + +#: ../../library/sys.rst:1957 ../../library/sys.rst:1959 +msgid "" +"When the script is executed in the remote process, an :ref:`auditing event " +"` ``cpython.remote_debugger_script`` is raised with the path in " +"the remote process. This event is raised in the remote process, not the one " +"that called :func:`sys.remote_exec`." +msgstr "" + +#: ../../library/sys.rst:1972 msgid "" "Changes the :term:`filesystem encoding and error handler` to 'mbcs' and " "'replace' respectively, for consistency with versions of Python prior to 3.6." msgstr "" -#: ../../library/sys.rst:1946 +#: ../../library/sys.rst:1976 msgid "" "This is equivalent to defining the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` " "environment variable before launching Python." msgstr "" -#: ../../library/sys.rst:1949 +#: ../../library/sys.rst:1979 msgid "" "See also :func:`sys.getfilesystemencoding` and :func:`sys." "getfilesystemencodeerrors`." msgstr "" -#: ../../library/sys.rst:1955 +#: ../../library/sys.rst:1985 msgid "" "Changing the filesystem encoding after Python startup is risky because the " "old fsencoding or paths encoded by the old fsencoding may be cached " "somewhere. Use :envvar:`PYTHONLEGACYWINDOWSFSENCODING` instead." msgstr "" -#: ../../library/sys.rst:1959 +#: ../../library/sys.rst:1989 msgid "See :pep:`529` for more details." msgstr "" -#: ../../library/sys.rst:1962 +#: ../../library/sys.rst:1992 msgid "Use :envvar:`PYTHONLEGACYWINDOWSFSENCODING` instead." msgstr "" -#: ../../library/sys.rst:1969 +#: ../../library/sys.rst:1999 msgid "" ":term:`File objects ` used by the interpreter for standard " "input, output and errors:" msgstr "" -#: ../../library/sys.rst:1972 +#: ../../library/sys.rst:2002 msgid "" "``stdin`` is used for all interactive input (including calls to :func:" "`input`);" msgstr "" -#: ../../library/sys.rst:1974 +#: ../../library/sys.rst:2004 msgid "" "``stdout`` is used for the output of :func:`print` and :term:`expression` " "statements and for the prompts of :func:`input`;" msgstr "" -#: ../../library/sys.rst:1976 +#: ../../library/sys.rst:2006 msgid "The interpreter's own prompts and its error messages go to ``stderr``." msgstr "" -#: ../../library/sys.rst:1978 +#: ../../library/sys.rst:2008 msgid "" "These streams are regular :term:`text files ` like those returned " "by the :func:`open` function. Their parameters are chosen as follows:" msgstr "" -#: ../../library/sys.rst:1982 +#: ../../library/sys.rst:2012 msgid "" "The encoding and error handling are is initialized from :c:member:`PyConfig." "stdio_encoding` and :c:member:`PyConfig.stdio_errors`." msgstr "" -#: ../../library/sys.rst:1985 +#: ../../library/sys.rst:2015 msgid "" "On Windows, UTF-8 is used for the console device. Non-character devices " "such as disk files and pipes use the system locale encoding (i.e. the ANSI " @@ -2532,14 +2565,14 @@ msgid "" "initially attached to a console." msgstr "" -#: ../../library/sys.rst:1994 +#: ../../library/sys.rst:2024 msgid "" "The special behaviour of the console can be overridden by setting the " "environment variable PYTHONLEGACYWINDOWSSTDIO before starting Python. In " "that case, the console codepages are used as for any other character device." msgstr "" -#: ../../library/sys.rst:1999 +#: ../../library/sys.rst:2029 msgid "" "Under all platforms, you can override the character encoding by setting the :" "envvar:`PYTHONIOENCODING` environment variable before starting Python or by " @@ -2548,7 +2581,7 @@ msgid "" "only applies when :envvar:`PYTHONLEGACYWINDOWSSTDIO` is also set." msgstr "" -#: ../../library/sys.rst:2006 +#: ../../library/sys.rst:2036 msgid "" "When interactive, the ``stdout`` stream is line-buffered. Otherwise, it is " "block-buffered like regular text files. The ``stderr`` stream is line-" @@ -2557,19 +2590,19 @@ msgid "" "`PYTHONUNBUFFERED` environment variable." msgstr "" -#: ../../library/sys.rst:2012 +#: ../../library/sys.rst:2042 msgid "" "Non-interactive ``stderr`` is now line-buffered instead of fully buffered." msgstr "" -#: ../../library/sys.rst:2018 +#: ../../library/sys.rst:2048 msgid "" "To write or read binary data from/to the standard streams, use the " "underlying binary :data:`~io.TextIOBase.buffer` object. For example, to " "write bytes to :data:`stdout`, use ``sys.stdout.buffer.write(b'abc')``." msgstr "" -#: ../../library/sys.rst:2022 +#: ../../library/sys.rst:2052 msgid "" "However, if you are writing a library (and do not control in which context " "its code will be executed), be aware that the standard streams may be " @@ -2577,7 +2610,7 @@ msgid "" "support the :attr:`!buffer` attribute." msgstr "" -#: ../../library/sys.rst:2032 +#: ../../library/sys.rst:2062 msgid "" "These objects contain the original values of ``stdin``, ``stderr`` and " "``stdout`` at the start of the program. They are used during finalization, " @@ -2585,7 +2618,7 @@ msgid "" "``sys.std*`` object has been redirected." msgstr "" -#: ../../library/sys.rst:2037 +#: ../../library/sys.rst:2067 msgid "" "It can also be used to restore the actual files to known working file " "objects in case they have been overwritten with a broken object. However, " @@ -2593,7 +2626,7 @@ msgid "" "before replacing it, and restore the saved object." msgstr "" -#: ../../library/sys.rst:2043 +#: ../../library/sys.rst:2073 msgid "" "Under some conditions ``stdin``, ``stdout`` and ``stderr`` as well as the " "original values ``__stdin__``, ``__stdout__`` and ``__stderr__`` can be " @@ -2601,12 +2634,12 @@ msgid "" "to a console and Python apps started with :program:`pythonw`." msgstr "" -#: ../../library/sys.rst:2051 +#: ../../library/sys.rst:2081 msgid "" "A frozenset of strings containing the names of standard library modules." msgstr "" -#: ../../library/sys.rst:2053 +#: ../../library/sys.rst:2083 msgid "" "It is the same on all platforms. Modules which are not available on some " "platforms and modules disabled at Python build are also listed. All module " @@ -2614,7 +2647,7 @@ msgid "" "modules are excluded." msgstr "" -#: ../../library/sys.rst:2058 +#: ../../library/sys.rst:2088 msgid "" "For packages, only the main package is listed: sub-packages and sub-modules " "are not listed. For example, the ``email`` package is listed, but the " @@ -2622,60 +2655,60 @@ msgid "" "listed." msgstr "" -#: ../../library/sys.rst:2063 +#: ../../library/sys.rst:2093 msgid "See also the :data:`sys.builtin_module_names` list." msgstr "" -#: ../../library/sys.rst:2070 +#: ../../library/sys.rst:2100 msgid "" "A :term:`named tuple` holding information about the thread implementation." msgstr "" -#: ../../library/sys.rst:2075 +#: ../../library/sys.rst:2105 msgid "The name of the thread implementation:" msgstr "" -#: ../../library/sys.rst:2077 +#: ../../library/sys.rst:2107 msgid "``\"nt\"``: Windows threads" msgstr "" -#: ../../library/sys.rst:2078 +#: ../../library/sys.rst:2108 msgid "``\"pthread\"``: POSIX threads" msgstr "" -#: ../../library/sys.rst:2079 +#: ../../library/sys.rst:2109 msgid "" "``\"pthread-stubs\"``: stub POSIX threads (on WebAssembly platforms without " "threading support)" msgstr "" -#: ../../library/sys.rst:2081 +#: ../../library/sys.rst:2111 msgid "``\"solaris\"``: Solaris threads" msgstr "" -#: ../../library/sys.rst:2085 +#: ../../library/sys.rst:2115 msgid "The name of the lock implementation:" msgstr "" -#: ../../library/sys.rst:2087 +#: ../../library/sys.rst:2117 msgid "``\"semaphore\"``: a lock uses a semaphore" msgstr "" -#: ../../library/sys.rst:2088 +#: ../../library/sys.rst:2118 msgid "``\"mutex+cond\"``: a lock uses a mutex and a condition variable" msgstr "" -#: ../../library/sys.rst:2089 +#: ../../library/sys.rst:2119 msgid "``None`` if this information is unknown" msgstr "" -#: ../../library/sys.rst:2093 +#: ../../library/sys.rst:2123 msgid "" "The name and version of the thread library. It is a string, or ``None`` if " "this information is unknown." msgstr "" -#: ../../library/sys.rst:2101 +#: ../../library/sys.rst:2131 msgid "" "When this variable is set to an integer value, it determines the maximum " "number of levels of traceback information printed when an unhandled " @@ -2684,73 +2717,73 @@ msgid "" "are printed." msgstr "" -#: ../../library/sys.rst:2109 +#: ../../library/sys.rst:2139 msgid "Handle an unraisable exception." msgstr "" -#: ../../library/sys.rst:2111 +#: ../../library/sys.rst:2141 msgid "" "Called when an exception has occurred but there is no way for Python to " "handle it. For example, when a destructor raises an exception or during " "garbage collection (:func:`gc.collect`)." msgstr "" -#: ../../library/sys.rst:2115 +#: ../../library/sys.rst:2145 msgid "The *unraisable* argument has the following attributes:" msgstr "" -#: ../../library/sys.rst:2117 +#: ../../library/sys.rst:2147 msgid ":attr:`!exc_type`: Exception type." msgstr "" -#: ../../library/sys.rst:2118 +#: ../../library/sys.rst:2148 msgid ":attr:`!exc_value`: Exception value, can be ``None``." msgstr "" -#: ../../library/sys.rst:2119 +#: ../../library/sys.rst:2149 msgid ":attr:`!exc_traceback`: Exception traceback, can be ``None``." msgstr "" -#: ../../library/sys.rst:2120 +#: ../../library/sys.rst:2150 msgid ":attr:`!err_msg`: Error message, can be ``None``." msgstr "" -#: ../../library/sys.rst:2121 +#: ../../library/sys.rst:2151 msgid ":attr:`!object`: Object causing the exception, can be ``None``." msgstr "" -#: ../../library/sys.rst:2123 +#: ../../library/sys.rst:2153 msgid "" "The default hook formats :attr:`!err_msg` and :attr:`!object` as: " "``f'{err_msg}: {object!r}'``; use \"Exception ignored in\" error message if :" "attr:`!err_msg` is ``None``." msgstr "" -#: ../../library/sys.rst:2127 +#: ../../library/sys.rst:2157 msgid "" ":func:`sys.unraisablehook` can be overridden to control how unraisable " "exceptions are handled." msgstr "" -#: ../../library/sys.rst:2132 +#: ../../library/sys.rst:2162 msgid ":func:`excepthook` which handles uncaught exceptions." msgstr "" -#: ../../library/sys.rst:2136 +#: ../../library/sys.rst:2166 msgid "" "Storing :attr:`!exc_value` using a custom hook can create a reference cycle. " "It should be cleared explicitly to break the reference cycle when the " "exception is no longer needed." msgstr "" -#: ../../library/sys.rst:2140 +#: ../../library/sys.rst:2170 msgid "" "Storing :attr:`!object` using a custom hook can resurrect it if it is set to " "an object which is being finalized. Avoid storing :attr:`!object` after the " "custom hook completes to avoid resurrecting objects." msgstr "" -#: ../../library/sys.rst:2144 ../../library/sys.rst:2146 +#: ../../library/sys.rst:2174 ../../library/sys.rst:2176 msgid "" "Raise an auditing event ``sys.unraisablehook`` with arguments *hook*, " "*unraisable* when an exception that cannot be handled occurs. The " @@ -2758,7 +2791,7 @@ msgid "" "hook has been set, *hook* may be ``None``." msgstr "" -#: ../../library/sys.rst:2155 +#: ../../library/sys.rst:2185 msgid "" "A string containing the version number of the Python interpreter plus " "additional information on the build number and compiler used. This string " @@ -2767,13 +2800,13 @@ msgid "" "functions provided by the :mod:`platform` module." msgstr "" -#: ../../library/sys.rst:2164 +#: ../../library/sys.rst:2194 msgid "" "The C API version for this interpreter. Programmers may find this useful " "when debugging version conflicts between Python and extension modules." msgstr "" -#: ../../library/sys.rst:2170 +#: ../../library/sys.rst:2200 msgid "" "A tuple containing the five components of the version number: *major*, " "*minor*, *micro*, *releaselevel*, and *serial*. All values except " @@ -2784,18 +2817,18 @@ msgid "" "version_info.major`` and so on." msgstr "" -#: ../../library/sys.rst:2178 +#: ../../library/sys.rst:2208 msgid "Added named component attributes." msgstr "" -#: ../../library/sys.rst:2183 +#: ../../library/sys.rst:2213 msgid "" "This is an implementation detail of the warnings framework; do not modify " "this value. Refer to the :mod:`warnings` module for more information on the " "warnings framework." msgstr "" -#: ../../library/sys.rst:2190 +#: ../../library/sys.rst:2220 msgid "" "The version number used to form registry keys on Windows platforms. This is " "stored as string resource 1000 in the Python DLL. The value is normally the " @@ -2804,20 +2837,20 @@ msgid "" "has no effect on the registry keys used by Python." msgstr "" -#: ../../library/sys.rst:2202 +#: ../../library/sys.rst:2232 msgid "" "Namespace containing functions and constants for register callbacks and " "controlling monitoring events. See :mod:`sys.monitoring` for details." msgstr "" -#: ../../library/sys.rst:2208 +#: ../../library/sys.rst:2238 msgid "" "A dictionary of the various implementation-specific flags passed through " "the :option:`-X` command-line option. Option names are either mapped to " "their values, if given explicitly, or to :const:`True`. Example:" msgstr "" -#: ../../library/sys.rst:2212 +#: ../../library/sys.rst:2242 msgid "" "$ ./python -Xa=b -Xc\n" "Python 3.2a3+ (py3k, Oct 16 2010, 20:14:50)\n" @@ -2829,18 +2862,18 @@ msgid "" "{'a': 'b', 'c': True}" msgstr "" -#: ../../library/sys.rst:2224 +#: ../../library/sys.rst:2254 msgid "" "This is a CPython-specific way of accessing options passed through :option:`-" "X`. Other implementations may export them through other means, or not at " "all." msgstr "" -#: ../../library/sys.rst:2232 +#: ../../library/sys.rst:2262 msgid "Citations" msgstr "" -#: ../../library/sys.rst:2233 +#: ../../library/sys.rst:2263 msgid "" "ISO/IEC 9899:1999. \"Programming languages -- C.\" A public draft of this " "standard is available at https://www.open-std.org/jtc1/sc22/wg14/www/docs/" @@ -2859,50 +2892,50 @@ msgstr "" msgid "traceback" msgstr "" -#: ../../library/sys.rst:988 ../../library/sys.rst:1660 +#: ../../library/sys.rst:990 ../../library/sys.rst:1674 msgid "profile function" msgstr "" -#: ../../library/sys.rst:988 ../../library/sys.rst:1660 +#: ../../library/sys.rst:990 ../../library/sys.rst:1674 msgid "profiler" msgstr "" -#: ../../library/sys.rst:997 ../../library/sys.rst:1743 +#: ../../library/sys.rst:999 ../../library/sys.rst:1757 msgid "trace function" msgstr "" -#: ../../library/sys.rst:997 ../../library/sys.rst:1743 +#: ../../library/sys.rst:999 ../../library/sys.rst:1757 msgid "debugger" msgstr "" -#: ../../library/sys.rst:1472 +#: ../../library/sys.rst:1486 msgid "module" msgstr "" -#: ../../library/sys.rst:1472 +#: ../../library/sys.rst:1486 msgid "search" msgstr "" -#: ../../library/sys.rst:1472 +#: ../../library/sys.rst:1486 msgid "path" msgstr "" -#: ../../library/sys.rst:1624 +#: ../../library/sys.rst:1638 msgid "interpreter prompts" msgstr "" -#: ../../library/sys.rst:1624 +#: ../../library/sys.rst:1638 msgid "prompts, interpreter" msgstr "" -#: ../../library/sys.rst:1624 +#: ../../library/sys.rst:1638 msgid ">>>" msgstr "" -#: ../../library/sys.rst:1624 +#: ../../library/sys.rst:1638 msgid "interpreter prompt" msgstr "" -#: ../../library/sys.rst:1624 +#: ../../library/sys.rst:1638 msgid "..." msgstr "" diff --git a/library/sys_path_init.po b/library/sys_path_init.po index 93471c592..c5f09ffb8 100644 --- a/library/sys_path_init.po +++ b/library/sys_path_init.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2022-11-05 19:49+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/sysconfig.po b/library/sysconfig.po index 9fc740def..c19dabec2 100644 --- a/library/sysconfig.po +++ b/library/sysconfig.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:14+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/syslog.po b/library/syslog.po index edb94d83e..4a02c3df6 100644 --- a/library/syslog.po +++ b/library/syslog.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:14+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/tabnanny.po b/library/tabnanny.po index 2e766fb8e..bb7ecb0df 100644 --- a/library/tabnanny.po +++ b/library/tabnanny.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:14+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/tarfile.po b/library/tarfile.po index 57eb0fac2..ff54418c1 100644 --- a/library/tarfile.po +++ b/library/tarfile.po @@ -6,15 +6,16 @@ # Translators: # Danial Behzadi , 2025 # Parham Forati, 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:14+0000\n" -"Last-Translator: Parham Forati, 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -45,8 +46,8 @@ msgstr "" #: ../../library/tarfile.rst:21 msgid "" -"reads and writes :mod:`gzip`, :mod:`bz2` and :mod:`lzma` compressed archives " -"if the respective modules are available." +"reads and writes :mod:`gzip`, :mod:`bz2`, :mod:`compression.zstd`, and :mod:" +"`lzma` compressed archives if the respective modules are available." msgstr "" #: ../../library/tarfile.rst:24 @@ -91,149 +92,179 @@ msgid "" msgstr "" #: ../../library/tarfile.rst:52 +msgid "Added support for Zstandard compression using :mod:`compression.zstd`." +msgstr "" + +#: ../../library/tarfile.rst:56 msgid "" "Return a :class:`TarFile` object for the pathname *name*. For detailed " "information on :class:`TarFile` objects and the keyword arguments that are " "allowed, see :ref:`tarfile-objects`." msgstr "" -#: ../../library/tarfile.rst:56 +#: ../../library/tarfile.rst:60 msgid "" "*mode* has to be a string of the form ``'filemode[:compression]'``, it " "defaults to ``'r'``. Here is a full list of mode combinations:" msgstr "" -#: ../../library/tarfile.rst:60 +#: ../../library/tarfile.rst:64 msgid "mode" msgstr "" -#: ../../library/tarfile.rst:60 +#: ../../library/tarfile.rst:64 msgid "action" msgstr "" -#: ../../library/tarfile.rst:62 -msgid "``'r' or 'r:*'``" +#: ../../library/tarfile.rst:66 +msgid "``'r'`` or ``'r:*'``" msgstr "" -#: ../../library/tarfile.rst:62 +#: ../../library/tarfile.rst:66 msgid "Open for reading with transparent compression (recommended)." msgstr "" -#: ../../library/tarfile.rst:65 +#: ../../library/tarfile.rst:69 msgid "``'r:'``" msgstr "" -#: ../../library/tarfile.rst:65 +#: ../../library/tarfile.rst:69 msgid "Open for reading exclusively without compression." msgstr "" -#: ../../library/tarfile.rst:68 +#: ../../library/tarfile.rst:72 msgid "``'r:gz'``" msgstr "" -#: ../../library/tarfile.rst:68 +#: ../../library/tarfile.rst:72 msgid "Open for reading with gzip compression." msgstr "" -#: ../../library/tarfile.rst:70 +#: ../../library/tarfile.rst:74 msgid "``'r:bz2'``" msgstr "" -#: ../../library/tarfile.rst:70 +#: ../../library/tarfile.rst:74 msgid "Open for reading with bzip2 compression." msgstr "" -#: ../../library/tarfile.rst:72 +#: ../../library/tarfile.rst:76 msgid "``'r:xz'``" msgstr "" -#: ../../library/tarfile.rst:72 +#: ../../library/tarfile.rst:76 msgid "Open for reading with lzma compression." msgstr "" -#: ../../library/tarfile.rst:74 +#: ../../library/tarfile.rst:78 +msgid "``'r:zst'``" +msgstr "" + +#: ../../library/tarfile.rst:78 +msgid "Open for reading with Zstandard compression." +msgstr "" + +#: ../../library/tarfile.rst:80 msgid "``'x'`` or ``'x:'``" msgstr "" -#: ../../library/tarfile.rst:74 +#: ../../library/tarfile.rst:80 msgid "" "Create a tarfile exclusively without compression. Raise a :exc:" "`FileExistsError` exception if it already exists." msgstr "" -#: ../../library/tarfile.rst:79 +#: ../../library/tarfile.rst:85 msgid "``'x:gz'``" msgstr "" -#: ../../library/tarfile.rst:79 +#: ../../library/tarfile.rst:85 msgid "" "Create a tarfile with gzip compression. Raise a :exc:`FileExistsError` " "exception if it already exists." msgstr "" -#: ../../library/tarfile.rst:83 +#: ../../library/tarfile.rst:89 msgid "``'x:bz2'``" msgstr "" -#: ../../library/tarfile.rst:83 +#: ../../library/tarfile.rst:89 msgid "" "Create a tarfile with bzip2 compression. Raise a :exc:`FileExistsError` " "exception if it already exists." msgstr "" -#: ../../library/tarfile.rst:87 +#: ../../library/tarfile.rst:93 msgid "``'x:xz'``" msgstr "" -#: ../../library/tarfile.rst:87 +#: ../../library/tarfile.rst:93 msgid "" "Create a tarfile with lzma compression. Raise a :exc:`FileExistsError` " "exception if it already exists." msgstr "" -#: ../../library/tarfile.rst:91 -msgid "``'a' or 'a:'``" +#: ../../library/tarfile.rst:97 +msgid "``'x:zst'``" msgstr "" -#: ../../library/tarfile.rst:91 +#: ../../library/tarfile.rst:97 +msgid "" +"Create a tarfile with Zstandard compression. Raise a :exc:`FileExistsError` " +"exception if it already exists." +msgstr "" + +#: ../../library/tarfile.rst:101 +msgid "``'a'`` or ``'a:'``" +msgstr "" + +#: ../../library/tarfile.rst:101 msgid "" "Open for appending with no compression. The file is created if it does not " "exist." msgstr "" -#: ../../library/tarfile.rst:94 -msgid "``'w' or 'w:'``" +#: ../../library/tarfile.rst:104 +msgid "``'w'`` or ``'w:'``" msgstr "" -#: ../../library/tarfile.rst:94 +#: ../../library/tarfile.rst:104 msgid "Open for uncompressed writing." msgstr "" -#: ../../library/tarfile.rst:96 +#: ../../library/tarfile.rst:107 msgid "``'w:gz'``" msgstr "" -#: ../../library/tarfile.rst:96 +#: ../../library/tarfile.rst:107 msgid "Open for gzip compressed writing." msgstr "" -#: ../../library/tarfile.rst:98 +#: ../../library/tarfile.rst:109 msgid "``'w:bz2'``" msgstr "" -#: ../../library/tarfile.rst:98 +#: ../../library/tarfile.rst:109 msgid "Open for bzip2 compressed writing." msgstr "" -#: ../../library/tarfile.rst:100 +#: ../../library/tarfile.rst:111 msgid "``'w:xz'``" msgstr "" -#: ../../library/tarfile.rst:100 +#: ../../library/tarfile.rst:111 msgid "Open for lzma compressed writing." msgstr "" -#: ../../library/tarfile.rst:103 +#: ../../library/tarfile.rst:113 +msgid "``'w:zst'``" +msgstr "" + +#: ../../library/tarfile.rst:113 +msgid "Open for Zstandard compressed writing." +msgstr "" + +#: ../../library/tarfile.rst:116 msgid "" "Note that ``'a:gz'``, ``'a:bz2'`` or ``'a:xz'`` is not possible. If *mode* " "is not suitable to open a certain (compressed) file for reading, :exc:" @@ -241,27 +272,38 @@ msgid "" "method is not supported, :exc:`CompressionError` is raised." msgstr "" -#: ../../library/tarfile.rst:108 +#: ../../library/tarfile.rst:121 msgid "" "If *fileobj* is specified, it is used as an alternative to a :term:`file " "object` opened in binary mode for *name*. It is supposed to be at position 0." msgstr "" -#: ../../library/tarfile.rst:111 +#: ../../library/tarfile.rst:124 msgid "" "For modes ``'w:gz'``, ``'x:gz'``, ``'w|gz'``, ``'w:bz2'``, ``'x:bz2'``, ``'w|" "bz2'``, :func:`tarfile.open` accepts the keyword argument *compresslevel* " "(default ``9``) to specify the compression level of the file." msgstr "" -#: ../../library/tarfile.rst:115 +#: ../../library/tarfile.rst:128 msgid "" "For modes ``'w:xz'``, ``'x:xz'`` and ``'w|xz'``, :func:`tarfile.open` " "accepts the keyword argument *preset* to specify the compression level of " "the file." msgstr "" -#: ../../library/tarfile.rst:118 +#: ../../library/tarfile.rst:131 +msgid "" +"For modes ``'w:zst'``, ``'x:zst'`` and ``'w|zst'``, :func:`tarfile.open` " +"accepts the keyword argument *level* to specify the compression level of the " +"file. The keyword argument *options* may also be passed, providing advanced " +"Zstandard compression parameters described by :class:`~compression.zstd." +"CompressionParameter`. The keyword argument *zstd_dict* can be passed to " +"provide a :class:`~compression.zstd.ZstdDict`, a Zstandard dictionary used " +"to improve compression of smaller amounts of data." +msgstr "" + +#: ../../library/tarfile.rst:140 msgid "" "For special purposes, there is a second format for *mode*: ``'filemode|" "[compression]'``. :func:`tarfile.open` will return a :class:`TarFile` " @@ -275,307 +317,331 @@ msgid "" "random access, see :ref:`tar-examples`. The currently possible modes:" msgstr "" -#: ../../library/tarfile.rst:132 +#: ../../library/tarfile.rst:154 msgid "Mode" msgstr "" -#: ../../library/tarfile.rst:132 +#: ../../library/tarfile.rst:154 msgid "Action" msgstr "" -#: ../../library/tarfile.rst:134 +#: ../../library/tarfile.rst:156 msgid "``'r|*'``" msgstr "" -#: ../../library/tarfile.rst:134 +#: ../../library/tarfile.rst:156 msgid "Open a *stream* of tar blocks for reading with transparent compression." msgstr "" -#: ../../library/tarfile.rst:137 +#: ../../library/tarfile.rst:159 msgid "``'r|'``" msgstr "" -#: ../../library/tarfile.rst:137 +#: ../../library/tarfile.rst:159 msgid "Open a *stream* of uncompressed tar blocks for reading." msgstr "" -#: ../../library/tarfile.rst:140 +#: ../../library/tarfile.rst:162 msgid "``'r|gz'``" msgstr "" -#: ../../library/tarfile.rst:140 +#: ../../library/tarfile.rst:162 msgid "Open a gzip compressed *stream* for reading." msgstr "" -#: ../../library/tarfile.rst:143 +#: ../../library/tarfile.rst:165 msgid "``'r|bz2'``" msgstr "" -#: ../../library/tarfile.rst:143 +#: ../../library/tarfile.rst:165 msgid "Open a bzip2 compressed *stream* for reading." msgstr "" -#: ../../library/tarfile.rst:146 +#: ../../library/tarfile.rst:168 msgid "``'r|xz'``" msgstr "" -#: ../../library/tarfile.rst:146 +#: ../../library/tarfile.rst:168 msgid "Open an lzma compressed *stream* for reading." msgstr "" -#: ../../library/tarfile.rst:149 +#: ../../library/tarfile.rst:171 +msgid "``'r|zst'``" +msgstr "" + +#: ../../library/tarfile.rst:171 +msgid "Open a Zstandard compressed *stream* for reading." +msgstr "" + +#: ../../library/tarfile.rst:174 msgid "``'w|'``" msgstr "" -#: ../../library/tarfile.rst:149 +#: ../../library/tarfile.rst:174 msgid "Open an uncompressed *stream* for writing." msgstr "" -#: ../../library/tarfile.rst:151 +#: ../../library/tarfile.rst:176 msgid "``'w|gz'``" msgstr "" -#: ../../library/tarfile.rst:151 +#: ../../library/tarfile.rst:176 msgid "Open a gzip compressed *stream* for writing." msgstr "" -#: ../../library/tarfile.rst:154 +#: ../../library/tarfile.rst:179 msgid "``'w|bz2'``" msgstr "" -#: ../../library/tarfile.rst:154 +#: ../../library/tarfile.rst:179 msgid "Open a bzip2 compressed *stream* for writing." msgstr "" -#: ../../library/tarfile.rst:157 +#: ../../library/tarfile.rst:182 msgid "``'w|xz'``" msgstr "" -#: ../../library/tarfile.rst:157 +#: ../../library/tarfile.rst:182 msgid "Open an lzma compressed *stream* for writing." msgstr "" -#: ../../library/tarfile.rst:161 ../../library/tarfile.rst:431 +#: ../../library/tarfile.rst:185 +msgid "``'w|zst'``" +msgstr "" + +#: ../../library/tarfile.rst:185 +msgid "Open a Zstandard compressed *stream* for writing." +msgstr "" + +#: ../../library/tarfile.rst:189 ../../library/tarfile.rst:468 msgid "The ``'x'`` (exclusive creation) mode was added." msgstr "" -#: ../../library/tarfile.rst:164 ../../library/tarfile.rst:434 -#: ../../library/tarfile.rst:682 +#: ../../library/tarfile.rst:192 ../../library/tarfile.rst:471 +#: ../../library/tarfile.rst:719 msgid "The *name* parameter accepts a :term:`path-like object`." msgstr "" -#: ../../library/tarfile.rst:167 +#: ../../library/tarfile.rst:195 msgid "The *compresslevel* keyword argument also works for streams." msgstr "" -#: ../../library/tarfile.rst:170 +#: ../../library/tarfile.rst:198 msgid "The *preset* keyword argument also works for streams." msgstr "" -#: ../../library/tarfile.rst:177 +#: ../../library/tarfile.rst:205 msgid "" "Class for reading and writing tar archives. Do not use this class directly: " "use :func:`tarfile.open` instead. See :ref:`tarfile-objects`." msgstr "" -#: ../../library/tarfile.rst:183 +#: ../../library/tarfile.rst:211 msgid "" "Return :const:`True` if *name* is a tar archive file, that the :mod:" "`tarfile` module can read. *name* may be a :class:`str`, file, or file-like " "object." msgstr "" -#: ../../library/tarfile.rst:186 +#: ../../library/tarfile.rst:214 msgid "Support for file and file-like objects." msgstr "" -#: ../../library/tarfile.rst:190 +#: ../../library/tarfile.rst:218 msgid "The :mod:`tarfile` module defines the following exceptions:" msgstr "" -#: ../../library/tarfile.rst:195 +#: ../../library/tarfile.rst:223 msgid "Base class for all :mod:`tarfile` exceptions." msgstr "" -#: ../../library/tarfile.rst:200 +#: ../../library/tarfile.rst:228 msgid "" "Is raised when a tar archive is opened, that either cannot be handled by " "the :mod:`tarfile` module or is somehow invalid." msgstr "" -#: ../../library/tarfile.rst:206 +#: ../../library/tarfile.rst:234 msgid "" "Is raised when a compression method is not supported or when the data cannot " "be decoded properly." msgstr "" -#: ../../library/tarfile.rst:212 +#: ../../library/tarfile.rst:240 msgid "" "Is raised for the limitations that are typical for stream-like :class:" "`TarFile` objects." msgstr "" -#: ../../library/tarfile.rst:218 +#: ../../library/tarfile.rst:246 msgid "" "Is raised for *non-fatal* errors when using :meth:`TarFile.extract`, but " "only if :attr:`TarFile.errorlevel`\\ ``== 2``." msgstr "" -#: ../../library/tarfile.rst:224 +#: ../../library/tarfile.rst:252 msgid "Is raised by :meth:`TarInfo.frombuf` if the buffer it gets is invalid." msgstr "" -#: ../../library/tarfile.rst:229 +#: ../../library/tarfile.rst:257 msgid "" "Base class for members :ref:`refused ` by filters." msgstr "" -#: ../../library/tarfile.rst:234 +#: ../../library/tarfile.rst:262 msgid "" "Information about the member that the filter refused to extract, as :ref:" "`TarInfo `." msgstr "" -#: ../../library/tarfile.rst:239 +#: ../../library/tarfile.rst:267 msgid "Raised to refuse extracting a member with an absolute path." msgstr "" -#: ../../library/tarfile.rst:243 +#: ../../library/tarfile.rst:271 msgid "Raised to refuse extracting a member outside the destination directory." msgstr "" -#: ../../library/tarfile.rst:247 +#: ../../library/tarfile.rst:275 msgid "Raised to refuse extracting a special file (e.g. a device or pipe)." msgstr "" -#: ../../library/tarfile.rst:251 +#: ../../library/tarfile.rst:279 msgid "Raised to refuse extracting a symbolic link with an absolute path." msgstr "" -#: ../../library/tarfile.rst:255 +#: ../../library/tarfile.rst:283 msgid "" "Raised to refuse extracting a symbolic link pointing outside the destination " "directory." msgstr "" -#: ../../library/tarfile.rst:259 +#: ../../library/tarfile.rst:288 +msgid "" +"Raised to refuse emulating a link (hard or symbolic) by extracting another " +"archive member, when that member would be rejected by the filter location. " +"The exception that was raised to reject the replacement member is available " +"as :attr:`!BaseException.__context__`." +msgstr "" + +#: ../../library/tarfile.rst:296 msgid "The following constants are available at the module level:" msgstr "" -#: ../../library/tarfile.rst:263 +#: ../../library/tarfile.rst:300 msgid "" "The default character encoding: ``'utf-8'`` on Windows, the value returned " "by :func:`sys.getfilesystemencoding` otherwise." msgstr "" -#: ../../library/tarfile.rst:269 +#: ../../library/tarfile.rst:306 msgid "A regular file :attr:`~TarInfo.type`." msgstr "" -#: ../../library/tarfile.rst:273 +#: ../../library/tarfile.rst:310 msgid "A link (inside tarfile) :attr:`~TarInfo.type`." msgstr "" -#: ../../library/tarfile.rst:277 +#: ../../library/tarfile.rst:314 msgid "A symbolic link :attr:`~TarInfo.type`." msgstr "" -#: ../../library/tarfile.rst:281 +#: ../../library/tarfile.rst:318 msgid "A character special device :attr:`~TarInfo.type`." msgstr "" -#: ../../library/tarfile.rst:285 +#: ../../library/tarfile.rst:322 msgid "A block special device :attr:`~TarInfo.type`." msgstr "" -#: ../../library/tarfile.rst:289 +#: ../../library/tarfile.rst:326 msgid "A directory :attr:`~TarInfo.type`." msgstr "" -#: ../../library/tarfile.rst:293 +#: ../../library/tarfile.rst:330 msgid "A FIFO special device :attr:`~TarInfo.type`." msgstr "" -#: ../../library/tarfile.rst:297 +#: ../../library/tarfile.rst:334 msgid "A contiguous file :attr:`~TarInfo.type`." msgstr "" -#: ../../library/tarfile.rst:301 +#: ../../library/tarfile.rst:338 msgid "A GNU tar longname :attr:`~TarInfo.type`." msgstr "" -#: ../../library/tarfile.rst:305 +#: ../../library/tarfile.rst:342 msgid "A GNU tar longlink :attr:`~TarInfo.type`." msgstr "" -#: ../../library/tarfile.rst:309 +#: ../../library/tarfile.rst:346 msgid "A GNU tar sparse file :attr:`~TarInfo.type`." msgstr "" -#: ../../library/tarfile.rst:312 +#: ../../library/tarfile.rst:349 msgid "" "Each of the following constants defines a tar archive format that the :mod:" "`tarfile` module is able to create. See section :ref:`tar-formats` for " "details." msgstr "" -#: ../../library/tarfile.rst:319 +#: ../../library/tarfile.rst:356 msgid "POSIX.1-1988 (ustar) format." msgstr "" -#: ../../library/tarfile.rst:324 +#: ../../library/tarfile.rst:361 msgid "GNU tar format." msgstr "" -#: ../../library/tarfile.rst:329 +#: ../../library/tarfile.rst:366 msgid "POSIX.1-2001 (pax) format." msgstr "" -#: ../../library/tarfile.rst:334 +#: ../../library/tarfile.rst:371 msgid "" "The default format for creating archives. This is currently :const:" "`PAX_FORMAT`." msgstr "" -#: ../../library/tarfile.rst:336 +#: ../../library/tarfile.rst:373 msgid "" "The default format for new archives was changed to :const:`PAX_FORMAT` from :" "const:`GNU_FORMAT`." msgstr "" -#: ../../library/tarfile.rst:343 +#: ../../library/tarfile.rst:380 msgid "Module :mod:`zipfile`" msgstr "" -#: ../../library/tarfile.rst:344 +#: ../../library/tarfile.rst:381 msgid "Documentation of the :mod:`zipfile` standard module." msgstr "" -#: ../../library/tarfile.rst:346 +#: ../../library/tarfile.rst:383 msgid ":ref:`archiving-operations`" msgstr "" -#: ../../library/tarfile.rst:347 +#: ../../library/tarfile.rst:384 msgid "" "Documentation of the higher-level archiving facilities provided by the " "standard :mod:`shutil` module." msgstr "" -#: ../../library/tarfile.rst:350 +#: ../../library/tarfile.rst:387 msgid "" "`GNU tar manual, Basic Tar Format `_" msgstr "" -#: ../../library/tarfile.rst:351 +#: ../../library/tarfile.rst:388 msgid "Documentation for tar archive files, including GNU tar extensions." msgstr "" -#: ../../library/tarfile.rst:357 +#: ../../library/tarfile.rst:394 msgid "TarFile Objects" msgstr "" -#: ../../library/tarfile.rst:359 +#: ../../library/tarfile.rst:396 msgid "" "The :class:`TarFile` object provides an interface to a tar archive. A tar " "archive is a sequence of blocks. An archive member (a stored file) is made " @@ -584,7 +650,7 @@ msgid "" "class:`TarInfo` object, see :ref:`tarinfo-objects` for details." msgstr "" -#: ../../library/tarfile.rst:365 +#: ../../library/tarfile.rst:402 msgid "" "A :class:`TarFile` object can be used as a context manager in a :keyword:" "`with` statement. It will automatically be closed when the block is " @@ -593,24 +659,24 @@ msgid "" "be closed. See the :ref:`tar-examples` section for a use case." msgstr "" -#: ../../library/tarfile.rst:371 +#: ../../library/tarfile.rst:408 msgid "Added support for the context management protocol." msgstr "" -#: ../../library/tarfile.rst:376 +#: ../../library/tarfile.rst:413 msgid "" "All following arguments are optional and can be accessed as instance " "attributes as well." msgstr "" -#: ../../library/tarfile.rst:379 +#: ../../library/tarfile.rst:416 msgid "" "*name* is the pathname of the archive. *name* may be a :term:`path-like " "object`. It can be omitted if *fileobj* is given. In this case, the file " "object's :attr:`!name` attribute is used if it exists." msgstr "" -#: ../../library/tarfile.rst:383 +#: ../../library/tarfile.rst:420 msgid "" "*mode* is either ``'r'`` to read from an existing archive, ``'a'`` to append " "data to an existing file, ``'w'`` to create a new file overwriting an " @@ -618,18 +684,18 @@ msgid "" "exist." msgstr "" -#: ../../library/tarfile.rst:387 +#: ../../library/tarfile.rst:424 msgid "" "If *fileobj* is given, it is used for reading or writing data. If it can be " "determined, *mode* is overridden by *fileobj*'s mode. *fileobj* will be used " "from position 0." msgstr "" -#: ../../library/tarfile.rst:393 +#: ../../library/tarfile.rst:430 msgid "*fileobj* is not closed, when :class:`TarFile` is closed." msgstr "" -#: ../../library/tarfile.rst:395 +#: ../../library/tarfile.rst:432 msgid "" "*format* controls the archive format for writing. It must be one of the " "constants :const:`USTAR_FORMAT`, :const:`GNU_FORMAT` or :const:`PAX_FORMAT` " @@ -637,20 +703,20 @@ msgid "" "detected, even if different formats are present in a single archive." msgstr "" -#: ../../library/tarfile.rst:400 +#: ../../library/tarfile.rst:437 msgid "" "The *tarinfo* argument can be used to replace the default :class:`TarInfo` " "class with a different one." msgstr "" -#: ../../library/tarfile.rst:403 +#: ../../library/tarfile.rst:440 msgid "" "If *dereference* is :const:`False`, add symbolic and hard links to the " "archive. If it is :const:`True`, add the content of the target files to the " "archive. This has no effect on systems that do not support symbolic links." msgstr "" -#: ../../library/tarfile.rst:407 +#: ../../library/tarfile.rst:444 msgid "" "If *ignore_zeros* is :const:`False`, treat an empty block as the end of the " "archive. If it is :const:`True`, skip empty (and invalid) blocks and try to " @@ -658,19 +724,19 @@ msgid "" "concatenated or damaged archives." msgstr "" -#: ../../library/tarfile.rst:411 +#: ../../library/tarfile.rst:448 msgid "" "*debug* can be set from ``0`` (no debug messages) up to ``3`` (all debug " "messages). The messages are written to ``sys.stderr``." msgstr "" -#: ../../library/tarfile.rst:414 +#: ../../library/tarfile.rst:451 msgid "" "*errorlevel* controls how extraction errors are handled, see :attr:`the " "corresponding attribute `." msgstr "" -#: ../../library/tarfile.rst:417 +#: ../../library/tarfile.rst:454 msgid "" "The *encoding* and *errors* arguments define the character encoding to be " "used for reading or writing the archive and how conversion errors are going " @@ -678,57 +744,57 @@ msgid "" "ref:`tar-unicode` for in-depth information." msgstr "" -#: ../../library/tarfile.rst:422 +#: ../../library/tarfile.rst:459 msgid "" "The *pax_headers* argument is an optional dictionary of strings which will " "be added as a pax global header if *format* is :const:`PAX_FORMAT`." msgstr "" -#: ../../library/tarfile.rst:425 +#: ../../library/tarfile.rst:462 msgid "" "If *stream* is set to :const:`True` then while reading the archive info " "about files in the archive are not cached, saving memory." msgstr "" -#: ../../library/tarfile.rst:428 ../../library/tarfile.rst:751 +#: ../../library/tarfile.rst:465 ../../library/tarfile.rst:788 msgid "Use ``'surrogateescape'`` as the default for the *errors* argument." msgstr "" -#: ../../library/tarfile.rst:437 +#: ../../library/tarfile.rst:474 msgid "Add the *stream* parameter." msgstr "" -#: ../../library/tarfile.rst:442 +#: ../../library/tarfile.rst:479 msgid "" "Alternative constructor. The :func:`tarfile.open` function is actually a " "shortcut to this classmethod." msgstr "" -#: ../../library/tarfile.rst:448 +#: ../../library/tarfile.rst:485 msgid "" "Return a :class:`TarInfo` object for member *name*. If *name* can not be " "found in the archive, :exc:`KeyError` is raised." msgstr "" -#: ../../library/tarfile.rst:453 +#: ../../library/tarfile.rst:490 msgid "" "If a member occurs more than once in the archive, its last occurrence is " "assumed to be the most up-to-date version." msgstr "" -#: ../../library/tarfile.rst:459 +#: ../../library/tarfile.rst:496 msgid "" "Return the members of the archive as a list of :class:`TarInfo` objects. The " "list has the same order as the members in the archive." msgstr "" -#: ../../library/tarfile.rst:465 +#: ../../library/tarfile.rst:502 msgid "" "Return the members as a list of their names. It has the same order as the " "list returned by :meth:`getmembers`." msgstr "" -#: ../../library/tarfile.rst:471 +#: ../../library/tarfile.rst:508 msgid "" "Print a table of contents to ``sys.stdout``. If *verbose* is :const:`False`, " "only the names of the members are printed. If it is :const:`True`, output " @@ -736,18 +802,18 @@ msgid "" "given, it must be a subset of the list returned by :meth:`getmembers`." msgstr "" -#: ../../library/tarfile.rst:476 +#: ../../library/tarfile.rst:513 msgid "Added the *members* parameter." msgstr "" -#: ../../library/tarfile.rst:482 +#: ../../library/tarfile.rst:519 msgid "" "Return the next member of the archive as a :class:`TarInfo` object, when :" "class:`TarFile` is opened for reading. Return :const:`None` if there is no " "more available." msgstr "" -#: ../../library/tarfile.rst:489 +#: ../../library/tarfile.rst:526 msgid "" "Extract all members from the archive to the current working directory or " "directory *path*. If optional *members* is given, it must be a subset of the " @@ -759,14 +825,14 @@ msgid "" "fail." msgstr "" -#: ../../library/tarfile.rst:497 +#: ../../library/tarfile.rst:534 msgid "" "If *numeric_owner* is :const:`True`, the uid and gid numbers from the " "tarfile are used to set the owner/group for the extracted files. Otherwise, " "the named values from the tarfile are used." msgstr "" -#: ../../library/tarfile.rst:501 +#: ../../library/tarfile.rst:538 msgid "" "The *filter* argument specifies how ``members`` are modified or rejected " "before extraction. See :ref:`tarfile-extraction-filter` for details. It is " @@ -775,11 +841,11 @@ msgid "" "secure default (3.13 and lower)." msgstr "" -#: ../../library/tarfile.rst:510 +#: ../../library/tarfile.rst:547 msgid "Never extract archives from untrusted sources without prior inspection." msgstr "" -#: ../../library/tarfile.rst:512 +#: ../../library/tarfile.rst:549 msgid "" "Since Python 3.14, the default (:func:`data `) will prevent the " "most dangerous security issues. However, it will not prevent *all* " @@ -787,24 +853,24 @@ msgid "" "section for details." msgstr "" -#: ../../library/tarfile.rst:517 ../../library/tarfile.rst:554 +#: ../../library/tarfile.rst:554 ../../library/tarfile.rst:591 msgid "Added the *numeric_owner* parameter." msgstr "" -#: ../../library/tarfile.rst:520 ../../library/tarfile.rst:557 +#: ../../library/tarfile.rst:557 ../../library/tarfile.rst:594 msgid "The *path* parameter accepts a :term:`path-like object`." msgstr "" -#: ../../library/tarfile.rst:523 ../../library/tarfile.rst:560 -#: ../../library/tarfile.rst:644 +#: ../../library/tarfile.rst:560 ../../library/tarfile.rst:597 +#: ../../library/tarfile.rst:681 msgid "Added the *filter* parameter." msgstr "" -#: ../../library/tarfile.rst:526 +#: ../../library/tarfile.rst:563 msgid "The *filter* parameter now defaults to ``'data'``." msgstr "" -#: ../../library/tarfile.rst:532 +#: ../../library/tarfile.rst:569 msgid "" "Extract a member from the archive to the current working directory, using " "its full name. Its file information is extracted as accurately as possible. " @@ -813,29 +879,29 @@ msgid "" "File attributes (owner, mtime, mode) are set unless *set_attrs* is false." msgstr "" -#: ../../library/tarfile.rst:538 +#: ../../library/tarfile.rst:575 msgid "" "The *numeric_owner* and *filter* arguments are the same as for :meth:" "`extractall`." msgstr "" -#: ../../library/tarfile.rst:543 +#: ../../library/tarfile.rst:580 msgid "" "The :meth:`extract` method does not take care of several extraction issues. " "In most cases you should consider using the :meth:`extractall` method." msgstr "" -#: ../../library/tarfile.rst:548 +#: ../../library/tarfile.rst:585 msgid "" "Never extract archives from untrusted sources without prior inspection. See " "the warning for :meth:`extractall` for details." msgstr "" -#: ../../library/tarfile.rst:551 +#: ../../library/tarfile.rst:588 msgid "Added the *set_attrs* parameter." msgstr "" -#: ../../library/tarfile.rst:566 +#: ../../library/tarfile.rst:603 msgid "" "Extract a member from the archive as a file object. *member* may be a " "filename or a :class:`TarInfo` object. If *member* is a regular file or a " @@ -844,17 +910,17 @@ msgid "" "the archive, :exc:`KeyError` is raised." msgstr "" -#: ../../library/tarfile.rst:572 +#: ../../library/tarfile.rst:609 msgid "Return an :class:`io.BufferedReader` object." msgstr "" -#: ../../library/tarfile.rst:575 +#: ../../library/tarfile.rst:612 msgid "" "The returned :class:`io.BufferedReader` object has the :attr:`!mode` " "attribute which is always equal to ``'rb'``." msgstr "" -#: ../../library/tarfile.rst:582 +#: ../../library/tarfile.rst:619 msgid "" "If *errorlevel* is ``0``, errors are ignored when using :meth:`TarFile." "extract` and :meth:`TarFile.extractall`. Nevertheless, they appear as error " @@ -864,45 +930,45 @@ msgid "" "exc:`TarError` exceptions as well." msgstr "" -#: ../../library/tarfile.rst:590 +#: ../../library/tarfile.rst:627 msgid "" "Some exceptions, e.g. ones caused by wrong argument types or data " "corruption, are always raised." msgstr "" -#: ../../library/tarfile.rst:593 +#: ../../library/tarfile.rst:630 msgid "" "Custom :ref:`extraction filters ` should raise :" "exc:`FilterError` for *fatal* errors and :exc:`ExtractError` for *non-fatal* " "ones." msgstr "" -#: ../../library/tarfile.rst:597 +#: ../../library/tarfile.rst:634 msgid "" "Note that when an exception is raised, the archive may be partially " "extracted. It is the user’s responsibility to clean up." msgstr "" -#: ../../library/tarfile.rst:604 +#: ../../library/tarfile.rst:641 msgid "" "The :ref:`extraction filter ` used as a default " "for the *filter* argument of :meth:`~TarFile.extract` and :meth:`~TarFile." "extractall`." msgstr "" -#: ../../library/tarfile.rst:608 +#: ../../library/tarfile.rst:645 msgid "" "The attribute may be ``None`` or a callable. String names are not allowed " "for this attribute, unlike the *filter* argument to :meth:`~TarFile.extract`." msgstr "" -#: ../../library/tarfile.rst:612 +#: ../../library/tarfile.rst:649 msgid "" "If ``extraction_filter`` is ``None`` (the default), extraction methods will " "use the :func:`data ` filter by default." msgstr "" -#: ../../library/tarfile.rst:615 +#: ../../library/tarfile.rst:652 msgid "" "The attribute may be set on instances or overridden in subclasses. It also " "is possible to set it on the ``TarFile`` class itself to set a global " @@ -912,7 +978,7 @@ msgid "" "wrapped in :func:`staticmethod` to prevent injection of a ``self`` argument." msgstr "" -#: ../../library/tarfile.rst:625 +#: ../../library/tarfile.rst:662 msgid "" "The default filter is set to :func:`data `, which disallows " "some dangerous features such as links to absolute paths or paths outside of " @@ -920,7 +986,7 @@ msgid "" "`fully_trusted `." msgstr "" -#: ../../library/tarfile.rst:633 +#: ../../library/tarfile.rst:670 msgid "" "Add the file *name* to the archive. *name* may be any type of file " "(directory, fifo, symbolic link, etc.). If given, *arcname* specifies an " @@ -933,11 +999,11 @@ msgid "" "ref:`tar-examples` for an example." msgstr "" -#: ../../library/tarfile.rst:647 +#: ../../library/tarfile.rst:684 msgid "Recursion adds entries in sorted order." msgstr "" -#: ../../library/tarfile.rst:653 +#: ../../library/tarfile.rst:690 msgid "" "Add the :class:`TarInfo` object *tarinfo* to the archive. If *tarinfo* " "represents a non zero-size regular file, the *fileobj* argument should be a :" @@ -946,11 +1012,11 @@ msgid "" "meth:`gettarinfo`." msgstr "" -#: ../../library/tarfile.rst:660 +#: ../../library/tarfile.rst:697 msgid "*fileobj* must be given for non-zero-sized regular files." msgstr "" -#: ../../library/tarfile.rst:665 +#: ../../library/tarfile.rst:702 msgid "" "Create a :class:`TarInfo` object from the result of :func:`os.stat` or " "equivalent on an existing file. The file is either named by *name*, or " @@ -961,7 +1027,7 @@ msgid "" "The name should be a text string." msgstr "" -#: ../../library/tarfile.rst:674 +#: ../../library/tarfile.rst:711 msgid "" "You can modify some of the :class:`TarInfo`’s attributes before you add it " "using :meth:`addfile`. If the file object is not an ordinary file object " @@ -971,21 +1037,21 @@ msgid "" "case *arcname* could be a dummy string." msgstr "" -#: ../../library/tarfile.rst:688 +#: ../../library/tarfile.rst:725 msgid "" "Close the :class:`TarFile`. In write mode, two finishing zero blocks are " "appended to the archive." msgstr "" -#: ../../library/tarfile.rst:695 +#: ../../library/tarfile.rst:732 msgid "A dictionary containing key-value pairs of pax global headers." msgstr "" -#: ../../library/tarfile.rst:702 +#: ../../library/tarfile.rst:739 msgid "TarInfo Objects" msgstr "" -#: ../../library/tarfile.rst:704 +#: ../../library/tarfile.rst:741 msgid "" "A :class:`TarInfo` object represents one member in a :class:`TarFile`. Aside " "from storing all required attributes of a file (like file type, size, time, " @@ -993,14 +1059,14 @@ msgid "" "type. It does *not* contain the file's data itself." msgstr "" -#: ../../library/tarfile.rst:709 +#: ../../library/tarfile.rst:746 msgid "" ":class:`TarInfo` objects are returned by :class:`TarFile`'s methods :meth:" "`~TarFile.getmember`, :meth:`~TarFile.getmembers` and :meth:`~TarFile." "gettarinfo`." msgstr "" -#: ../../library/tarfile.rst:713 +#: ../../library/tarfile.rst:750 msgid "" "Modifying the objects returned by :meth:`~TarFile.getmember` or :meth:" "`~TarFile.getmembers` will affect all subsequent operations on the archive. " @@ -1009,82 +1075,82 @@ msgid "" "step." msgstr "" -#: ../../library/tarfile.rst:719 +#: ../../library/tarfile.rst:756 msgid "" "Several attributes can be set to ``None`` to indicate that a piece of " "metadata is unused or unknown. Different :class:`TarInfo` methods handle " "``None`` differently:" msgstr "" -#: ../../library/tarfile.rst:723 +#: ../../library/tarfile.rst:760 msgid "" "The :meth:`~TarFile.extract` or :meth:`~TarFile.extractall` methods will " "ignore the corresponding metadata, leaving it set to a default." msgstr "" -#: ../../library/tarfile.rst:725 +#: ../../library/tarfile.rst:762 msgid ":meth:`~TarFile.addfile` will fail." msgstr "" -#: ../../library/tarfile.rst:726 +#: ../../library/tarfile.rst:763 msgid ":meth:`~TarFile.list` will print a placeholder string." msgstr "" -#: ../../library/tarfile.rst:730 +#: ../../library/tarfile.rst:767 msgid "Create a :class:`TarInfo` object." msgstr "" -#: ../../library/tarfile.rst:735 +#: ../../library/tarfile.rst:772 msgid "Create and return a :class:`TarInfo` object from string buffer *buf*." msgstr "" -#: ../../library/tarfile.rst:737 +#: ../../library/tarfile.rst:774 msgid "Raises :exc:`HeaderError` if the buffer is invalid." msgstr "" -#: ../../library/tarfile.rst:742 +#: ../../library/tarfile.rst:779 msgid "" "Read the next member from the :class:`TarFile` object *tarfile* and return " "it as a :class:`TarInfo` object." msgstr "" -#: ../../library/tarfile.rst:748 +#: ../../library/tarfile.rst:785 msgid "" "Create a string buffer from a :class:`TarInfo` object. For information on " "the arguments see the constructor of the :class:`TarFile` class." msgstr "" -#: ../../library/tarfile.rst:755 +#: ../../library/tarfile.rst:792 msgid "A ``TarInfo`` object has the following public data attributes:" msgstr "" -#: ../../library/tarfile.rst:761 +#: ../../library/tarfile.rst:798 msgid "Name of the archive member." msgstr "" -#: ../../library/tarfile.rst:767 +#: ../../library/tarfile.rst:804 msgid "Size in bytes." msgstr "" -#: ../../library/tarfile.rst:773 +#: ../../library/tarfile.rst:810 msgid "" "Time of last modification in seconds since the :ref:`epoch `, as in :" "attr:`os.stat_result.st_mtime`." msgstr "" -#: ../../library/tarfile.rst:778 ../../library/tarfile.rst:789 -#: ../../library/tarfile.rst:821 ../../library/tarfile.rst:832 -#: ../../library/tarfile.rst:843 ../../library/tarfile.rst:854 +#: ../../library/tarfile.rst:815 ../../library/tarfile.rst:826 +#: ../../library/tarfile.rst:858 ../../library/tarfile.rst:869 +#: ../../library/tarfile.rst:880 ../../library/tarfile.rst:891 msgid "" "Can be set to ``None`` for :meth:`~TarFile.extract` and :meth:`~TarFile." "extractall`, causing extraction to skip applying this attribute." msgstr "" -#: ../../library/tarfile.rst:785 +#: ../../library/tarfile.rst:822 msgid "Permission bits, as for :func:`os.chmod`." msgstr "" -#: ../../library/tarfile.rst:795 +#: ../../library/tarfile.rst:832 msgid "" "File type. *type* is usually one of these constants: :const:`REGTYPE`, :" "const:`AREGTYPE`, :const:`LNKTYPE`, :const:`SYMTYPE`, :const:`DIRTYPE`, :" @@ -1093,128 +1159,128 @@ msgid "" "more conveniently, use the ``is*()`` methods below." msgstr "" -#: ../../library/tarfile.rst:805 +#: ../../library/tarfile.rst:842 msgid "" "Name of the target file name, which is only present in :class:`TarInfo` " "objects of type :const:`LNKTYPE` and :const:`SYMTYPE`." msgstr "" -#: ../../library/tarfile.rst:808 +#: ../../library/tarfile.rst:845 msgid "" "For symbolic links (``SYMTYPE``), the *linkname* is relative to the " "directory that contains the link. For hard links (``LNKTYPE``), the " "*linkname* is relative to the root of the archive." msgstr "" -#: ../../library/tarfile.rst:817 +#: ../../library/tarfile.rst:854 msgid "User ID of the user who originally stored this member." msgstr "" -#: ../../library/tarfile.rst:828 +#: ../../library/tarfile.rst:865 msgid "Group ID of the user who originally stored this member." msgstr "" -#: ../../library/tarfile.rst:839 +#: ../../library/tarfile.rst:876 msgid "User name." msgstr "" -#: ../../library/tarfile.rst:850 +#: ../../library/tarfile.rst:887 msgid "Group name." msgstr "" -#: ../../library/tarfile.rst:861 +#: ../../library/tarfile.rst:898 msgid "Header checksum." msgstr "" -#: ../../library/tarfile.rst:867 +#: ../../library/tarfile.rst:904 msgid "Device major number." msgstr "" -#: ../../library/tarfile.rst:873 +#: ../../library/tarfile.rst:910 msgid "Device minor number." msgstr "" -#: ../../library/tarfile.rst:879 +#: ../../library/tarfile.rst:916 msgid "The tar header starts here." msgstr "" -#: ../../library/tarfile.rst:885 +#: ../../library/tarfile.rst:922 msgid "The file's data starts here." msgstr "" -#: ../../library/tarfile.rst:890 +#: ../../library/tarfile.rst:927 msgid "Sparse member information." msgstr "" -#: ../../library/tarfile.rst:896 +#: ../../library/tarfile.rst:933 msgid "" "A dictionary containing key-value pairs of an associated pax extended header." msgstr "" -#: ../../library/tarfile.rst:904 +#: ../../library/tarfile.rst:941 msgid "" "Return a *new* copy of the :class:`!TarInfo` object with the given " "attributes changed. For example, to return a ``TarInfo`` with the group name " "set to ``'staff'``, use::" msgstr "" -#: ../../library/tarfile.rst:908 +#: ../../library/tarfile.rst:945 msgid "new_tarinfo = old_tarinfo.replace(gname='staff')" msgstr "" -#: ../../library/tarfile.rst:910 +#: ../../library/tarfile.rst:947 msgid "" "By default, a deep copy is made. If *deep* is false, the copy is shallow, i." "e. ``pax_headers`` and any custom attributes are shared with the original " "``TarInfo`` object." msgstr "" -#: ../../library/tarfile.rst:914 +#: ../../library/tarfile.rst:951 msgid "A :class:`TarInfo` object also provides some convenient query methods:" msgstr "" -#: ../../library/tarfile.rst:919 +#: ../../library/tarfile.rst:956 msgid "Return :const:`True` if the :class:`TarInfo` object is a regular file." msgstr "" -#: ../../library/tarfile.rst:924 +#: ../../library/tarfile.rst:961 msgid "Same as :meth:`isfile`." msgstr "" -#: ../../library/tarfile.rst:929 +#: ../../library/tarfile.rst:966 msgid "Return :const:`True` if it is a directory." msgstr "" -#: ../../library/tarfile.rst:934 +#: ../../library/tarfile.rst:971 msgid "Return :const:`True` if it is a symbolic link." msgstr "" -#: ../../library/tarfile.rst:939 +#: ../../library/tarfile.rst:976 msgid "Return :const:`True` if it is a hard link." msgstr "" -#: ../../library/tarfile.rst:944 +#: ../../library/tarfile.rst:981 msgid "Return :const:`True` if it is a character device." msgstr "" -#: ../../library/tarfile.rst:949 +#: ../../library/tarfile.rst:986 msgid "Return :const:`True` if it is a block device." msgstr "" -#: ../../library/tarfile.rst:954 +#: ../../library/tarfile.rst:991 msgid "Return :const:`True` if it is a FIFO." msgstr "" -#: ../../library/tarfile.rst:959 +#: ../../library/tarfile.rst:996 msgid "" "Return :const:`True` if it is one of character device, block device or FIFO." msgstr "" -#: ../../library/tarfile.rst:965 +#: ../../library/tarfile.rst:1002 msgid "Extraction filters" msgstr "" -#: ../../library/tarfile.rst:969 +#: ../../library/tarfile.rst:1006 msgid "" "The *tar* format is designed to capture all details of a UNIX-like " "filesystem, which makes it very powerful. Unfortunately, the features make " @@ -1224,71 +1290,71 @@ msgid "" "components, or symlinks that affect later members)." msgstr "" -#: ../../library/tarfile.rst:977 +#: ../../library/tarfile.rst:1014 msgid "" "In most cases, the full functionality is not needed. Therefore, *tarfile* " "supports extraction filters: a mechanism to limit functionality, and thus " "mitigate some of the security issues." msgstr "" -#: ../../library/tarfile.rst:983 +#: ../../library/tarfile.rst:1020 msgid "" "None of the available filters blocks *all* dangerous archive features. Never " "extract archives from untrusted sources without prior inspection. See also :" "ref:`tarfile-further-verification`." msgstr "" -#: ../../library/tarfile.rst:989 +#: ../../library/tarfile.rst:1026 msgid ":pep:`706`" msgstr "" -#: ../../library/tarfile.rst:990 +#: ../../library/tarfile.rst:1027 msgid "Contains further motivation and rationale behind the design." msgstr "" -#: ../../library/tarfile.rst:992 +#: ../../library/tarfile.rst:1029 msgid "" "The *filter* argument to :meth:`TarFile.extract` or :meth:`~TarFile." "extractall` can be:" msgstr "" -#: ../../library/tarfile.rst:995 +#: ../../library/tarfile.rst:1032 msgid "" "the string ``'fully_trusted'``: Honor all metadata as specified in the " "archive. Should be used if the user trusts the archive completely, or " "implements their own complex verification." msgstr "" -#: ../../library/tarfile.rst:1000 +#: ../../library/tarfile.rst:1037 msgid "" "the string ``'tar'``: Honor most *tar*-specific features (i.e. features of " "UNIX-like filesystems), but block features that are very likely to be " "surprising or malicious. See :func:`tar_filter` for details." msgstr "" -#: ../../library/tarfile.rst:1004 +#: ../../library/tarfile.rst:1041 msgid "" "the string ``'data'``: Ignore or block most features specific to UNIX-like " "filesystems. Intended for extracting cross-platform data archives. See :func:" "`data_filter` for details." msgstr "" -#: ../../library/tarfile.rst:1008 +#: ../../library/tarfile.rst:1045 msgid "``None`` (default): Use :attr:`TarFile.extraction_filter`." msgstr "" -#: ../../library/tarfile.rst:1010 +#: ../../library/tarfile.rst:1047 msgid "" "If that is also ``None`` (the default), the ``'data'`` filter will be used." msgstr "" -#: ../../library/tarfile.rst:1014 +#: ../../library/tarfile.rst:1051 msgid "" "The default filter is set to :func:`data `. Previously, the " "default was equivalent to :func:`fully_trusted `." msgstr "" -#: ../../library/tarfile.rst:1018 +#: ../../library/tarfile.rst:1055 msgid "" "A callable which will be called for each extracted member with a :ref:" "`TarInfo ` describing the member and the destination path " @@ -1296,27 +1362,27 @@ msgid "" "members)::" msgstr "" -#: ../../library/tarfile.rst:1023 +#: ../../library/tarfile.rst:1060 msgid "filter(member: TarInfo, path: str, /) -> TarInfo | None" msgstr "" -#: ../../library/tarfile.rst:1025 +#: ../../library/tarfile.rst:1062 msgid "" "The callable is called just before each member is extracted, so it can take " "the current state of the disk into account. It can:" msgstr "" -#: ../../library/tarfile.rst:1029 +#: ../../library/tarfile.rst:1066 msgid "" "return a :class:`TarInfo` object which will be used instead of the metadata " "in the archive, or" msgstr "" -#: ../../library/tarfile.rst:1031 +#: ../../library/tarfile.rst:1068 msgid "return ``None``, in which case the member will be skipped, or" msgstr "" -#: ../../library/tarfile.rst:1032 +#: ../../library/tarfile.rst:1069 msgid "" "raise an exception to abort the operation or skip the member, depending on :" "attr:`~TarFile.errorlevel`. Note that when extraction is aborted, :meth:" @@ -1324,124 +1390,136 @@ msgid "" "attempt to clean up." msgstr "" -#: ../../library/tarfile.rst:1038 +#: ../../library/tarfile.rst:1075 msgid "Default named filters" msgstr "" -#: ../../library/tarfile.rst:1040 +#: ../../library/tarfile.rst:1077 msgid "" "The pre-defined, named filters are available as functions, so they can be " "reused in custom filters:" msgstr "" -#: ../../library/tarfile.rst:1045 +#: ../../library/tarfile.rst:1082 msgid "Return *member* unchanged." msgstr "" -#: ../../library/tarfile.rst:1047 +#: ../../library/tarfile.rst:1084 msgid "This implements the ``'fully_trusted'`` filter." msgstr "" -#: ../../library/tarfile.rst:1051 +#: ../../library/tarfile.rst:1088 msgid "Implements the ``'tar'`` filter." msgstr "" -#: ../../library/tarfile.rst:1053 +#: ../../library/tarfile.rst:1090 msgid "Strip leading slashes (``/`` and :data:`os.sep`) from filenames." msgstr "" -#: ../../library/tarfile.rst:1054 +#: ../../library/tarfile.rst:1091 msgid "" ":ref:`Refuse ` to extract files with absolute " "paths (in case the name is absolute even after stripping slashes, e.g. ``C:/" "foo`` on Windows). This raises :class:`~tarfile.AbsolutePathError`." msgstr "" -#: ../../library/tarfile.rst:1058 +#: ../../library/tarfile.rst:1095 msgid "" ":ref:`Refuse ` to extract files whose absolute " "path (after following symlinks) would end up outside the destination. This " "raises :class:`~tarfile.OutsideDestinationError`." msgstr "" -#: ../../library/tarfile.rst:1061 +#: ../../library/tarfile.rst:1098 msgid "" "Clear high mode bits (setuid, setgid, sticky) and group/other write bits (:" "const:`~stat.S_IWGRP` | :const:`~stat.S_IWOTH`)." msgstr "" -#: ../../library/tarfile.rst:1064 ../../library/tarfile.rst:1097 +#: ../../library/tarfile.rst:1101 ../../library/tarfile.rst:1140 msgid "Return the modified ``TarInfo`` member." msgstr "" -#: ../../library/tarfile.rst:1068 +#: ../../library/tarfile.rst:1105 msgid "" "Implements the ``'data'`` filter. In addition to what ``tar_filter`` does:" msgstr "" -#: ../../library/tarfile.rst:1071 +#: ../../library/tarfile.rst:1108 +msgid "" +"Normalize link targets (:attr:`TarInfo.linkname`) using :func:`os.path." +"normpath`. Note that this removes internal ``..`` components, which may " +"change the meaning of the link if the path in :attr:`!TarInfo.linkname` " +"traverses symbolic links." +msgstr "" + +#: ../../library/tarfile.rst:1114 msgid "" ":ref:`Refuse ` to extract links (hard or soft) " "that link to absolute paths, or ones that link outside the destination." msgstr "" -#: ../../library/tarfile.rst:1074 +#: ../../library/tarfile.rst:1117 msgid "" "This raises :class:`~tarfile.AbsoluteLinkError` or :class:`~tarfile." "LinkOutsideDestinationError`." msgstr "" -#: ../../library/tarfile.rst:1077 +#: ../../library/tarfile.rst:1120 msgid "" "Note that such files are refused even on platforms that do not support " "symbolic links." msgstr "" -#: ../../library/tarfile.rst:1080 +#: ../../library/tarfile.rst:1123 msgid "" ":ref:`Refuse ` to extract device files (including " "pipes). This raises :class:`~tarfile.SpecialFileError`." msgstr "" -#: ../../library/tarfile.rst:1084 +#: ../../library/tarfile.rst:1127 msgid "For regular files, including hard links:" msgstr "" -#: ../../library/tarfile.rst:1086 +#: ../../library/tarfile.rst:1129 msgid "" "Set the owner read and write permissions (:const:`~stat.S_IRUSR` | :const:" "`~stat.S_IWUSR`)." msgstr "" -#: ../../library/tarfile.rst:1088 +#: ../../library/tarfile.rst:1131 msgid "" "Remove the group & other executable permission (:const:`~stat.S_IXGRP` | :" "const:`~stat.S_IXOTH`) if the owner doesn’t have it (:const:`~stat.S_IXUSR`)." msgstr "" -#: ../../library/tarfile.rst:1092 +#: ../../library/tarfile.rst:1135 msgid "" "For other files (directories), set ``mode`` to ``None``, so that extraction " "methods skip applying permission bits." msgstr "" -#: ../../library/tarfile.rst:1094 +#: ../../library/tarfile.rst:1137 msgid "" "Set user and group info (``uid``, ``gid``, ``uname``, ``gname``) to " "``None``, so that extraction methods skip setting it." msgstr "" -#: ../../library/tarfile.rst:1099 +#: ../../library/tarfile.rst:1142 msgid "" "Note that this filter does not block *all* dangerous archive features. See :" "ref:`tarfile-further-verification` for details." msgstr "" -#: ../../library/tarfile.rst:1106 +#: ../../library/tarfile.rst:1147 +msgid "Link targets are now normalized." +msgstr "" + +#: ../../library/tarfile.rst:1153 msgid "Filter errors" msgstr "" -#: ../../library/tarfile.rst:1108 +#: ../../library/tarfile.rst:1155 msgid "" "When a filter refuses to extract a file, it will raise an appropriate " "exception, a subclass of :class:`~tarfile.FilterError`. This will abort the " @@ -1450,11 +1528,11 @@ msgid "" "continue." msgstr "" -#: ../../library/tarfile.rst:1118 +#: ../../library/tarfile.rst:1165 msgid "Hints for further verification" msgstr "" -#: ../../library/tarfile.rst:1120 +#: ../../library/tarfile.rst:1167 msgid "" "Even with ``filter='data'``, *tarfile* is not suited for extracting " "untrusted files without prior inspection. Among other issues, the pre-" @@ -1462,69 +1540,73 @@ msgid "" "additional checks." msgstr "" -#: ../../library/tarfile.rst:1125 +#: ../../library/tarfile.rst:1172 msgid "Here is an incomplete list of things to consider:" msgstr "" -#: ../../library/tarfile.rst:1127 +#: ../../library/tarfile.rst:1174 msgid "" "Extract to a :func:`new temporary directory ` to prevent e." "g. exploiting pre-existing links, and to make it easier to clean up after a " "failed extraction." msgstr "" -#: ../../library/tarfile.rst:1130 +#: ../../library/tarfile.rst:1177 +msgid "Disallow symbolic links if you do not need the functionality." +msgstr "" + +#: ../../library/tarfile.rst:1178 msgid "" "When working with untrusted data, use external (e.g. OS-level) limits on " "disk, memory and CPU usage." msgstr "" -#: ../../library/tarfile.rst:1132 +#: ../../library/tarfile.rst:1180 msgid "" "Check filenames against an allow-list of characters (to filter out control " "characters, confusables, foreign path separators, and so on)." msgstr "" -#: ../../library/tarfile.rst:1135 +#: ../../library/tarfile.rst:1183 msgid "" "Check that filenames have expected extensions (discouraging files that " "execute when you “click on them”, or extension-less files like Windows " "special device names)." msgstr "" -#: ../../library/tarfile.rst:1138 +#: ../../library/tarfile.rst:1186 msgid "" "Limit the number of extracted files, total size of extracted data, filename " "length (including symlink length), and size of individual files." msgstr "" -#: ../../library/tarfile.rst:1140 +#: ../../library/tarfile.rst:1188 msgid "Check for files that would be shadowed on case-insensitive filesystems." msgstr "" -#: ../../library/tarfile.rst:1142 +#: ../../library/tarfile.rst:1190 msgid "Also note that:" msgstr "" -#: ../../library/tarfile.rst:1144 +#: ../../library/tarfile.rst:1192 msgid "" "Tar files may contain multiple versions of the same file. Later ones are " "expected to overwrite any earlier ones. This feature is crucial to allow " "updating tape archives, but can be abused maliciously." msgstr "" -#: ../../library/tarfile.rst:1148 +#: ../../library/tarfile.rst:1196 msgid "" "*tarfile* does not protect against issues with “live” data, e.g. an attacker " "tinkering with the destination (or source) directory while extraction (or " "archiving) is in progress." msgstr "" -#: ../../library/tarfile.rst:1154 +#: ../../library/tarfile.rst:1202 msgid "Supporting older Python versions" msgstr "" -#: ../../library/tarfile.rst:1156 +#: ../../library/tarfile.rst:1204 msgid "" "Extraction filters were added to Python 3.12, but may be backported to older " "versions as security updates. To check whether the feature is available, use " @@ -1532,59 +1614,59 @@ msgid "" "version." msgstr "" -#: ../../library/tarfile.rst:1161 +#: ../../library/tarfile.rst:1209 msgid "" "The following examples show how to support Python versions with and without " "the feature. Note that setting ``extraction_filter`` will affect any " "subsequent operations." msgstr "" -#: ../../library/tarfile.rst:1165 +#: ../../library/tarfile.rst:1213 msgid "Fully trusted archive::" msgstr "" -#: ../../library/tarfile.rst:1167 +#: ../../library/tarfile.rst:1215 msgid "" "my_tarfile.extraction_filter = (lambda member, path: member)\n" "my_tarfile.extractall()" msgstr "" -#: ../../library/tarfile.rst:1170 +#: ../../library/tarfile.rst:1218 msgid "" "Use the ``'data'`` filter if available, but revert to Python 3.11 behavior " "(``'fully_trusted'``) if this feature is not available::" msgstr "" -#: ../../library/tarfile.rst:1173 +#: ../../library/tarfile.rst:1221 msgid "" "my_tarfile.extraction_filter = getattr(tarfile, 'data_filter',\n" " (lambda member, path: member))\n" "my_tarfile.extractall()" msgstr "" -#: ../../library/tarfile.rst:1177 +#: ../../library/tarfile.rst:1225 msgid "Use the ``'data'`` filter; *fail* if it is not available::" msgstr "" -#: ../../library/tarfile.rst:1179 +#: ../../library/tarfile.rst:1227 msgid "my_tarfile.extractall(filter=tarfile.data_filter)" msgstr "" -#: ../../library/tarfile.rst:1181 +#: ../../library/tarfile.rst:1229 msgid "or::" msgstr "" -#: ../../library/tarfile.rst:1183 +#: ../../library/tarfile.rst:1231 msgid "" "my_tarfile.extraction_filter = tarfile.data_filter\n" "my_tarfile.extractall()" msgstr "" -#: ../../library/tarfile.rst:1186 +#: ../../library/tarfile.rst:1234 msgid "Use the ``'data'`` filter; *warn* if it is not available::" msgstr "" -#: ../../library/tarfile.rst:1188 +#: ../../library/tarfile.rst:1236 msgid "" "if hasattr(tarfile, 'data_filter'):\n" " my_tarfile.extractall(filter='data')\n" @@ -1594,28 +1676,28 @@ msgid "" " my_tarfile.extractall()" msgstr "" -#: ../../library/tarfile.rst:1197 +#: ../../library/tarfile.rst:1245 msgid "Stateful extraction filter example" msgstr "" -#: ../../library/tarfile.rst:1199 +#: ../../library/tarfile.rst:1247 msgid "" "While *tarfile*'s extraction methods take a simple *filter* callable, custom " "filters may be more complex objects with an internal state. It may be useful " "to write these as context managers, to be used like this::" msgstr "" -#: ../../library/tarfile.rst:1203 +#: ../../library/tarfile.rst:1251 msgid "" "with StatefulFilter() as filter_func:\n" " tar.extractall(path, filter=filter_func)" msgstr "" -#: ../../library/tarfile.rst:1206 +#: ../../library/tarfile.rst:1254 msgid "Such a filter can be written as, for example::" msgstr "" -#: ../../library/tarfile.rst:1208 +#: ../../library/tarfile.rst:1256 msgid "" "class StatefulFilter:\n" " def __init__(self):\n" @@ -1632,103 +1714,103 @@ msgid "" " print(f'{self.file_count} files extracted')" msgstr "" -#: ../../library/tarfile.rst:1228 +#: ../../library/tarfile.rst:1276 msgid "Command-Line Interface" msgstr "" -#: ../../library/tarfile.rst:1232 +#: ../../library/tarfile.rst:1280 msgid "" "The :mod:`tarfile` module provides a simple command-line interface to " "interact with tar archives." msgstr "" -#: ../../library/tarfile.rst:1235 +#: ../../library/tarfile.rst:1283 msgid "" "If you want to create a new tar archive, specify its name after the :option:" "`-c` option and then list the filename(s) that should be included:" msgstr "" -#: ../../library/tarfile.rst:1238 +#: ../../library/tarfile.rst:1286 msgid "$ python -m tarfile -c monty.tar spam.txt eggs.txt" msgstr "" -#: ../../library/tarfile.rst:1242 +#: ../../library/tarfile.rst:1290 msgid "Passing a directory is also acceptable:" msgstr "" -#: ../../library/tarfile.rst:1244 +#: ../../library/tarfile.rst:1292 msgid "$ python -m tarfile -c monty.tar life-of-brian_1979/" msgstr "" -#: ../../library/tarfile.rst:1248 +#: ../../library/tarfile.rst:1296 msgid "" "If you want to extract a tar archive into the current directory, use the :" "option:`-e` option:" msgstr "" -#: ../../library/tarfile.rst:1251 +#: ../../library/tarfile.rst:1299 msgid "$ python -m tarfile -e monty.tar" msgstr "" -#: ../../library/tarfile.rst:1255 +#: ../../library/tarfile.rst:1303 msgid "" "You can also extract a tar archive into a different directory by passing the " "directory's name:" msgstr "" -#: ../../library/tarfile.rst:1258 +#: ../../library/tarfile.rst:1306 msgid "$ python -m tarfile -e monty.tar other-dir/" msgstr "" -#: ../../library/tarfile.rst:1262 +#: ../../library/tarfile.rst:1310 msgid "For a list of the files in a tar archive, use the :option:`-l` option:" msgstr "" -#: ../../library/tarfile.rst:1264 +#: ../../library/tarfile.rst:1312 msgid "$ python -m tarfile -l monty.tar" msgstr "" -#: ../../library/tarfile.rst:1270 +#: ../../library/tarfile.rst:1318 msgid "Command-line options" msgstr "" -#: ../../library/tarfile.rst:1275 +#: ../../library/tarfile.rst:1323 msgid "List files in a tarfile." msgstr "" -#: ../../library/tarfile.rst:1280 +#: ../../library/tarfile.rst:1328 msgid "Create tarfile from source files." msgstr "" -#: ../../library/tarfile.rst:1285 +#: ../../library/tarfile.rst:1333 msgid "" "Extract tarfile into the current directory if *output_dir* is not specified." msgstr "" -#: ../../library/tarfile.rst:1290 +#: ../../library/tarfile.rst:1338 msgid "Test whether the tarfile is valid or not." msgstr "" -#: ../../library/tarfile.rst:1294 +#: ../../library/tarfile.rst:1342 msgid "Verbose output." msgstr "" -#: ../../library/tarfile.rst:1298 +#: ../../library/tarfile.rst:1346 msgid "" "Specifies the *filter* for ``--extract``. See :ref:`tarfile-extraction-" "filter` for details. Only string names are accepted (that is, " "``fully_trusted``, ``tar``, and ``data``)." msgstr "" -#: ../../library/tarfile.rst:1306 +#: ../../library/tarfile.rst:1354 msgid "Examples" msgstr "" -#: ../../library/tarfile.rst:1308 +#: ../../library/tarfile.rst:1356 msgid "How to extract an entire tar archive to the current working directory::" msgstr "" -#: ../../library/tarfile.rst:1310 +#: ../../library/tarfile.rst:1358 msgid "" "import tarfile\n" "tar = tarfile.open(\"sample.tar.gz\")\n" @@ -1736,13 +1818,13 @@ msgid "" "tar.close()" msgstr "" -#: ../../library/tarfile.rst:1315 +#: ../../library/tarfile.rst:1363 msgid "" "How to extract a subset of a tar archive with :meth:`TarFile.extractall` " "using a generator function instead of a list::" msgstr "" -#: ../../library/tarfile.rst:1318 +#: ../../library/tarfile.rst:1366 msgid "" "import os\n" "import tarfile\n" @@ -1757,11 +1839,11 @@ msgid "" "tar.close()" msgstr "" -#: ../../library/tarfile.rst:1330 +#: ../../library/tarfile.rst:1378 msgid "How to create an uncompressed tar archive from a list of filenames::" msgstr "" -#: ../../library/tarfile.rst:1332 +#: ../../library/tarfile.rst:1380 msgid "" "import tarfile\n" "tar = tarfile.open(\"sample.tar\", \"w\")\n" @@ -1770,11 +1852,11 @@ msgid "" "tar.close()" msgstr "" -#: ../../library/tarfile.rst:1338 +#: ../../library/tarfile.rst:1386 msgid "The same example using the :keyword:`with` statement::" msgstr "" -#: ../../library/tarfile.rst:1340 +#: ../../library/tarfile.rst:1388 msgid "" "import tarfile\n" "with tarfile.open(\"sample.tar\", \"w\") as tar:\n" @@ -1782,13 +1864,13 @@ msgid "" " tar.add(name)" msgstr "" -#: ../../library/tarfile.rst:1345 +#: ../../library/tarfile.rst:1393 msgid "" "How to read a gzip compressed tar archive and display some member " "information::" msgstr "" -#: ../../library/tarfile.rst:1347 +#: ../../library/tarfile.rst:1395 msgid "" "import tarfile\n" "tar = tarfile.open(\"sample.tar.gz\", \"r:gz\")\n" @@ -1804,13 +1886,13 @@ msgid "" "tar.close()" msgstr "" -#: ../../library/tarfile.rst:1359 +#: ../../library/tarfile.rst:1407 msgid "" "How to create an archive and reset the user information using the *filter* " "parameter in :meth:`TarFile.add`::" msgstr "" -#: ../../library/tarfile.rst:1362 +#: ../../library/tarfile.rst:1410 msgid "" "import tarfile\n" "def reset(tarinfo):\n" @@ -1822,17 +1904,17 @@ msgid "" "tar.close()" msgstr "" -#: ../../library/tarfile.rst:1375 +#: ../../library/tarfile.rst:1423 msgid "Supported tar formats" msgstr "" -#: ../../library/tarfile.rst:1377 +#: ../../library/tarfile.rst:1425 msgid "" "There are three tar formats that can be created with the :mod:`tarfile` " "module:" msgstr "" -#: ../../library/tarfile.rst:1379 +#: ../../library/tarfile.rst:1427 msgid "" "The POSIX.1-1988 ustar format (:const:`USTAR_FORMAT`). It supports filenames " "up to a length of at best 256 characters and linknames up to 100 characters. " @@ -1840,7 +1922,7 @@ msgid "" "supported format." msgstr "" -#: ../../library/tarfile.rst:1384 +#: ../../library/tarfile.rst:1432 msgid "" "The GNU tar format (:const:`GNU_FORMAT`). It supports long filenames and " "linknames, files bigger than 8 GiB and sparse files. It is the de facto " @@ -1848,7 +1930,7 @@ msgid "" "extensions for long names, sparse file support is read-only." msgstr "" -#: ../../library/tarfile.rst:1389 +#: ../../library/tarfile.rst:1437 msgid "" "The POSIX.1-2001 pax format (:const:`PAX_FORMAT`). It is the most flexible " "format with virtually no limits. It supports long filenames and linknames, " @@ -1859,7 +1941,7 @@ msgid "" "*ustar* format. It is the current default format for new archives." msgstr "" -#: ../../library/tarfile.rst:1397 +#: ../../library/tarfile.rst:1445 msgid "" "It extends the existing *ustar* format with extra headers for information " "that cannot be stored otherwise. There are two flavours of pax headers: " @@ -1868,13 +1950,13 @@ msgid "" "in a pax header is encoded in *UTF-8* for portability reasons." msgstr "" -#: ../../library/tarfile.rst:1403 +#: ../../library/tarfile.rst:1451 msgid "" "There are some more variants of the tar format which can be read, but not " "created:" msgstr "" -#: ../../library/tarfile.rst:1406 +#: ../../library/tarfile.rst:1454 msgid "" "The ancient V7 format. This is the first tar format from Unix Seventh " "Edition, storing only regular files and directories. Names must not be " @@ -1883,17 +1965,17 @@ msgid "" "ASCII characters." msgstr "" -#: ../../library/tarfile.rst:1411 +#: ../../library/tarfile.rst:1459 msgid "" "The SunOS tar extended format. This format is a variant of the POSIX.1-2001 " "pax format, but is not compatible." msgstr "" -#: ../../library/tarfile.rst:1417 +#: ../../library/tarfile.rst:1465 msgid "Unicode issues" msgstr "" -#: ../../library/tarfile.rst:1419 +#: ../../library/tarfile.rst:1467 msgid "" "The tar format was originally conceived to make backups on tape drives with " "the main focus on preserving file system information. Nowadays tar archives " @@ -1908,13 +1990,13 @@ msgid "" "It stores non-ASCII metadata using the universal character encoding *UTF-8*." msgstr "" -#: ../../library/tarfile.rst:1431 +#: ../../library/tarfile.rst:1479 msgid "" "The details of character conversion in :mod:`tarfile` are controlled by the " "*encoding* and *errors* keyword arguments of the :class:`TarFile` class." msgstr "" -#: ../../library/tarfile.rst:1434 +#: ../../library/tarfile.rst:1482 msgid "" "*encoding* defines the character encoding to use for the metadata in the " "archive. The default value is :func:`sys.getfilesystemencoding` or " @@ -1923,7 +2005,7 @@ msgid "" "not set appropriately, this conversion may fail." msgstr "" -#: ../../library/tarfile.rst:1440 +#: ../../library/tarfile.rst:1488 msgid "" "The *errors* argument defines how characters are treated that cannot be " "converted. Possible values are listed in section :ref:`error-handlers`. The " @@ -1931,7 +2013,7 @@ msgid "" "system calls, see :ref:`os-filenames`." msgstr "" -#: ../../library/tarfile.rst:1445 +#: ../../library/tarfile.rst:1493 msgid "" "For :const:`PAX_FORMAT` archives (the default), *encoding* is generally not " "needed because all the metadata is stored using *UTF-8*. *encoding* is only " diff --git a/library/telnetlib.po b/library/telnetlib.po index f49de5e4a..698e7bd35 100644 --- a/library/telnetlib.po +++ b/library/telnetlib.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-11-19 01:03+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/tempfile.po b/library/tempfile.po index 82814b5d1..6ad53ef23 100644 --- a/library/tempfile.po +++ b/library/tempfile.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:14+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/termios.po b/library/termios.po index 08365216f..09a1d9400 100644 --- a/library/termios.po +++ b/library/termios.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:14+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/test.po b/library/test.po index 6e0bb7138..b7e0fce6e 100644 --- a/library/test.po +++ b/library/test.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:14+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/text.po b/library/text.po index 68cd8f992..7c2f3d560 100644 --- a/library/text.po +++ b/library/text.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:15+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/textwrap.po b/library/textwrap.po index 2a012c849..7bc2e6b38 100644 --- a/library/textwrap.po +++ b/library/textwrap.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:15+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/threading.po b/library/threading.po index a936017bc..6f09d8d50 100644 --- a/library/threading.po +++ b/library/threading.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:15+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -161,9 +162,9 @@ msgstr "" #: ../../library/threading.rst:105 msgid "" -"As of Python 3.13, experimental :term:`free-threaded ` " -"builds can disable the GIL, enabling true parallel execution of threads, but " -"this feature is not available by default (see :pep:`703`)." +"As of Python 3.13, :term:`free-threaded ` builds can disable " +"the GIL, enabling true parallel execution of threads, but this feature is " +"not available by default (see :pep:`703`)." msgstr "" #: ../../library/threading.rst:112 @@ -867,9 +868,9 @@ msgstr "" #: ../../library/threading.rst:624 msgid "" -"If an attempt is made to join a running daemonic thread in in late stages " -"of :term:`Python finalization ` :meth:`!join` raises " -"a :exc:`PythonFinalizationError`." +"If an attempt is made to join a running daemonic thread in late stages of :" +"term:`Python finalization ` :meth:`!join` raises a :" +"exc:`PythonFinalizationError`." msgstr "" #: ../../library/threading.rst:630 diff --git a/library/time.po b/library/time.po index da54d511f..e95833315 100644 --- a/library/time.po +++ b/library/time.po @@ -7,15 +7,16 @@ # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 # Ariyan Bolandi, 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:15+0000\n" -"Last-Translator: Ariyan Bolandi, 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -227,14 +228,14 @@ msgstr "" #: ../../library/time.rst:153 ../../library/time.rst:165 #: ../../library/time.rst:178 ../../library/time.rst:187 #: ../../library/time.rst:200 ../../library/time.rst:209 -#: ../../library/time.rst:747 ../../library/time.rst:771 -#: ../../library/time.rst:867 ../../library/time.rst:878 -#: ../../library/time.rst:888 ../../library/time.rst:898 -#: ../../library/time.rst:907 ../../library/time.rst:916 -#: ../../library/time.rst:925 ../../library/time.rst:936 -#: ../../library/time.rst:944 ../../library/time.rst:955 -#: ../../library/time.rst:966 ../../library/time.rst:975 -#: ../../library/time.rst:988 +#: ../../library/time.rst:754 ../../library/time.rst:778 +#: ../../library/time.rst:874 ../../library/time.rst:885 +#: ../../library/time.rst:895 ../../library/time.rst:905 +#: ../../library/time.rst:914 ../../library/time.rst:923 +#: ../../library/time.rst:932 ../../library/time.rst:943 +#: ../../library/time.rst:951 ../../library/time.rst:962 +#: ../../library/time.rst:973 ../../library/time.rst:982 +#: ../../library/time.rst:995 msgid "Availability" msgstr "" @@ -396,7 +397,7 @@ msgid "" "only the difference between the results of two calls is valid." msgstr "" -#: ../../library/time.rst:294 ../../library/time.rst:713 +#: ../../library/time.rst:294 ../../library/time.rst:715 msgid "Clock:" msgstr "" @@ -429,51 +430,53 @@ msgid "" msgstr "" #: ../../library/time.rst:308 -msgid "The function is now always available and always system-wide." +msgid "" +"The function is now always available and the clock is now the same for all " +"processes." msgstr "" -#: ../../library/time.rst:311 -msgid "On macOS, the function is now system-wide." +#: ../../library/time.rst:312 +msgid "On macOS, the clock is now the same for all processes." msgstr "" -#: ../../library/time.rst:317 +#: ../../library/time.rst:318 msgid "Similar to :func:`monotonic`, but return time as nanoseconds." msgstr "" -#: ../../library/time.rst:326 +#: ../../library/time.rst:327 msgid "" "Return the value (in fractional seconds) of a performance counter, i.e. a " "clock with the highest available resolution to measure a short duration. It " -"does include time elapsed during sleep and is system-wide. The reference " -"point of the returned value is undefined, so that only the difference " -"between the results of two calls is valid." +"does include time elapsed during sleep. The clock is the same for all " +"processes. The reference point of the returned value is undefined, so that " +"only the difference between the results of two calls is valid." msgstr "" -#: ../../library/time.rst:334 +#: ../../library/time.rst:336 msgid "" "On CPython, use the same clock as :func:`time.monotonic` and is a monotonic " "clock, i.e. a clock that cannot go backwards." msgstr "" -#: ../../library/time.rst:337 +#: ../../library/time.rst:339 msgid "" "Use :func:`perf_counter_ns` to avoid the precision loss caused by the :class:" "`float` type." msgstr "" -#: ../../library/time.rst:342 -msgid "On Windows, the function is now system-wide." +#: ../../library/time.rst:344 +msgid "On Windows, the clock is now the same for all processes." msgstr "" -#: ../../library/time.rst:345 +#: ../../library/time.rst:347 msgid "Use the same clock as :func:`time.monotonic`." msgstr "" -#: ../../library/time.rst:351 +#: ../../library/time.rst:353 msgid "Similar to :func:`perf_counter`, but return time as nanoseconds." msgstr "" -#: ../../library/time.rst:363 +#: ../../library/time.rst:365 msgid "" "Return the value (in fractional seconds) of the sum of the system and user " "CPU time of the current process. It does not include time elapsed during " @@ -482,40 +485,40 @@ msgid "" "of two calls is valid." msgstr "" -#: ../../library/time.rst:369 +#: ../../library/time.rst:371 msgid "" "Use :func:`process_time_ns` to avoid the precision loss caused by the :class:" "`float` type." msgstr "" -#: ../../library/time.rst:376 +#: ../../library/time.rst:378 msgid "Similar to :func:`process_time` but return time as nanoseconds." msgstr "" -#: ../../library/time.rst:382 +#: ../../library/time.rst:384 msgid "" "Suspend execution of the calling thread for the given number of seconds. The " "argument may be a floating-point number to indicate a more precise sleep " "time." msgstr "" -#: ../../library/time.rst:386 +#: ../../library/time.rst:388 msgid "" "If the sleep is interrupted by a signal and no exception is raised by the " "signal handler, the sleep is restarted with a recomputed timeout." msgstr "" -#: ../../library/time.rst:389 +#: ../../library/time.rst:391 msgid "" "The suspension time may be longer than requested by an arbitrary amount, " "because of the scheduling of other activity in the system." msgstr "" -#: ../../library/time.rst:393 +#: ../../library/time.rst:395 msgid "Windows implementation" msgstr "" -#: ../../library/time.rst:394 +#: ../../library/time.rst:396 msgid "" "On Windows, if *secs* is zero, the thread relinquishes the remainder of its " "time slice to any other thread that is ready to run. If there are no other " @@ -526,57 +529,57 @@ msgid "" "nanoseconds. If *secs* is zero, ``Sleep(0)`` is used." msgstr "" -#: ../../library/time.rst:403 +#: ../../library/time.rst:405 msgid "Unix implementation" msgstr "" -#: ../../library/time.rst:404 +#: ../../library/time.rst:406 msgid "Use ``clock_nanosleep()`` if available (resolution: 1 nanosecond);" msgstr "" -#: ../../library/time.rst:405 +#: ../../library/time.rst:407 msgid "Or use ``nanosleep()`` if available (resolution: 1 nanosecond);" msgstr "" -#: ../../library/time.rst:406 +#: ../../library/time.rst:408 msgid "Or use ``select()`` (resolution: 1 microsecond)." msgstr "" -#: ../../library/time.rst:410 +#: ../../library/time.rst:412 msgid "" "To emulate a \"no-op\", use :keyword:`pass` instead of ``time.sleep(0)``." msgstr "" -#: ../../library/time.rst:412 +#: ../../library/time.rst:414 msgid "" "To voluntarily relinquish the CPU, specify a real-time :ref:`scheduling " "policy ` and use :func:`os.sched_yield` instead." msgstr "" -#: ../../library/time.rst:415 +#: ../../library/time.rst:417 msgid "" "Raises an :ref:`auditing event ` ``time.sleep`` with argument " "``secs``." msgstr "" -#: ../../library/time.rst:417 +#: ../../library/time.rst:419 msgid "" "The function now sleeps at least *secs* even if the sleep is interrupted by " "a signal, except if the signal handler raises an exception (see :pep:`475` " "for the rationale)." msgstr "" -#: ../../library/time.rst:422 +#: ../../library/time.rst:424 msgid "" "On Unix, the ``clock_nanosleep()`` and ``nanosleep()`` functions are now " "used if available. On Windows, a waitable timer is now used." msgstr "" -#: ../../library/time.rst:426 +#: ../../library/time.rst:428 msgid "Raises an auditing event." msgstr "" -#: ../../library/time.rst:434 +#: ../../library/time.rst:436 msgid "" "Convert a tuple or :class:`struct_time` representing a time as returned by :" "func:`gmtime` or :func:`localtime` to a string as specified by the *format* " @@ -585,287 +588,287 @@ msgid "" "raised if any field in *t* is outside of the allowed range." msgstr "" -#: ../../library/time.rst:440 +#: ../../library/time.rst:442 msgid "" "0 is a legal argument for any position in the time tuple; if it is normally " "illegal the value is forced to a correct one." msgstr "" -#: ../../library/time.rst:443 +#: ../../library/time.rst:445 msgid "" "The following directives can be embedded in the *format* string. They are " "shown without the optional field width and precision specification, and are " "replaced by the indicated characters in the :func:`strftime` result:" msgstr "" -#: ../../library/time.rst:448 +#: ../../library/time.rst:450 msgid "Directive" msgstr "" -#: ../../library/time.rst:448 +#: ../../library/time.rst:450 msgid "Meaning" msgstr "" -#: ../../library/time.rst:448 +#: ../../library/time.rst:450 msgid "Notes" msgstr "" -#: ../../library/time.rst:450 +#: ../../library/time.rst:452 msgid "``%a``" msgstr "" -#: ../../library/time.rst:450 +#: ../../library/time.rst:452 msgid "Locale's abbreviated weekday name." msgstr "" -#: ../../library/time.rst:453 +#: ../../library/time.rst:455 msgid "``%A``" msgstr "" -#: ../../library/time.rst:453 +#: ../../library/time.rst:455 msgid "Locale's full weekday name." msgstr "" -#: ../../library/time.rst:455 +#: ../../library/time.rst:457 msgid "``%b``" msgstr "" -#: ../../library/time.rst:455 +#: ../../library/time.rst:457 msgid "Locale's abbreviated month name." msgstr "" -#: ../../library/time.rst:458 +#: ../../library/time.rst:460 msgid "``%B``" msgstr "" -#: ../../library/time.rst:458 +#: ../../library/time.rst:460 msgid "Locale's full month name." msgstr "" -#: ../../library/time.rst:460 +#: ../../library/time.rst:462 msgid "``%c``" msgstr "" -#: ../../library/time.rst:460 +#: ../../library/time.rst:462 msgid "Locale's appropriate date and time representation." msgstr "" -#: ../../library/time.rst:463 +#: ../../library/time.rst:465 msgid "``%d``" msgstr "" -#: ../../library/time.rst:463 +#: ../../library/time.rst:465 msgid "Day of the month as a decimal number [01,31]." msgstr "" -#: ../../library/time.rst:466 +#: ../../library/time.rst:468 msgid "``%f``" msgstr "" -#: ../../library/time.rst:466 +#: ../../library/time.rst:468 msgid "Microseconds as a decimal number" msgstr "" -#: ../../library/time.rst:467 +#: ../../library/time.rst:469 msgid "[000000,999999]." msgstr "" -#: ../../library/time.rst:466 +#: ../../library/time.rst:468 msgid "\\(1)" msgstr "" -#: ../../library/time.rst:470 +#: ../../library/time.rst:472 msgid "``%H``" msgstr "" -#: ../../library/time.rst:470 +#: ../../library/time.rst:472 msgid "Hour (24-hour clock) as a decimal number [00,23]." msgstr "" -#: ../../library/time.rst:473 +#: ../../library/time.rst:475 msgid "``%I``" msgstr "" -#: ../../library/time.rst:473 +#: ../../library/time.rst:475 msgid "Hour (12-hour clock) as a decimal number [01,12]." msgstr "" -#: ../../library/time.rst:476 +#: ../../library/time.rst:478 msgid "``%j``" msgstr "" -#: ../../library/time.rst:476 +#: ../../library/time.rst:478 msgid "Day of the year as a decimal number [001,366]." msgstr "" -#: ../../library/time.rst:479 +#: ../../library/time.rst:481 msgid "``%m``" msgstr "" -#: ../../library/time.rst:479 +#: ../../library/time.rst:481 msgid "Month as a decimal number [01,12]." msgstr "" -#: ../../library/time.rst:482 +#: ../../library/time.rst:484 msgid "``%M``" msgstr "" -#: ../../library/time.rst:482 +#: ../../library/time.rst:484 msgid "Minute as a decimal number [00,59]." msgstr "" -#: ../../library/time.rst:485 +#: ../../library/time.rst:487 msgid "``%p``" msgstr "" -#: ../../library/time.rst:485 +#: ../../library/time.rst:487 msgid "Locale's equivalent of either AM or PM." msgstr "" -#: ../../library/time.rst:485 +#: ../../library/time.rst:487 msgid "\\(2)" msgstr "" -#: ../../library/time.rst:488 +#: ../../library/time.rst:490 msgid "``%S``" msgstr "" -#: ../../library/time.rst:488 +#: ../../library/time.rst:490 msgid "Second as a decimal number [00,61]." msgstr "" -#: ../../library/time.rst:488 +#: ../../library/time.rst:490 msgid "\\(3)" msgstr "" -#: ../../library/time.rst:491 +#: ../../library/time.rst:493 msgid "``%U``" msgstr "" -#: ../../library/time.rst:491 +#: ../../library/time.rst:493 msgid "" "Week number of the year (Sunday as the first day of the week) as a decimal " "number [00,53]. All days in a new year preceding the first Sunday are " "considered to be in week 0." msgstr "" -#: ../../library/time.rst:491 ../../library/time.rst:505 +#: ../../library/time.rst:493 ../../library/time.rst:507 msgid "\\(4)" msgstr "" -#: ../../library/time.rst:499 +#: ../../library/time.rst:501 msgid "``%u``" msgstr "" -#: ../../library/time.rst:499 +#: ../../library/time.rst:501 msgid "Day of the week (Monday is 1; Sunday is 7) as a decimal number [1, 7]." msgstr "" -#: ../../library/time.rst:502 +#: ../../library/time.rst:504 msgid "``%w``" msgstr "" -#: ../../library/time.rst:502 +#: ../../library/time.rst:504 msgid "Weekday as a decimal number [0(Sunday),6]." msgstr "" -#: ../../library/time.rst:505 +#: ../../library/time.rst:507 msgid "``%W``" msgstr "" -#: ../../library/time.rst:505 +#: ../../library/time.rst:507 msgid "" "Week number of the year (Monday as the first day of the week) as a decimal " "number [00,53]. All days in a new year preceding the first Monday are " "considered to be in week 0." msgstr "" -#: ../../library/time.rst:513 +#: ../../library/time.rst:515 msgid "``%x``" msgstr "" -#: ../../library/time.rst:513 +#: ../../library/time.rst:515 msgid "Locale's appropriate date representation." msgstr "" -#: ../../library/time.rst:516 +#: ../../library/time.rst:518 msgid "``%X``" msgstr "" -#: ../../library/time.rst:516 +#: ../../library/time.rst:518 msgid "Locale's appropriate time representation." msgstr "" -#: ../../library/time.rst:519 +#: ../../library/time.rst:521 msgid "``%y``" msgstr "" -#: ../../library/time.rst:519 +#: ../../library/time.rst:521 msgid "Year without century as a decimal number [00,99]." msgstr "" -#: ../../library/time.rst:522 +#: ../../library/time.rst:524 msgid "``%Y``" msgstr "" -#: ../../library/time.rst:522 +#: ../../library/time.rst:524 msgid "Year with century as a decimal number." msgstr "" -#: ../../library/time.rst:525 +#: ../../library/time.rst:527 msgid "``%z``" msgstr "" -#: ../../library/time.rst:525 +#: ../../library/time.rst:527 msgid "" "Time zone offset indicating a positive or negative time difference from UTC/" "GMT of the form +HHMM or -HHMM, where H represents decimal hour digits and M " "represents decimal minute digits [-23:59, +23:59]. [1]_" msgstr "" -#: ../../library/time.rst:531 +#: ../../library/time.rst:533 msgid "``%Z``" msgstr "" -#: ../../library/time.rst:531 +#: ../../library/time.rst:533 msgid "Time zone name (no characters if no time zone exists). Deprecated. [1]_" msgstr "" -#: ../../library/time.rst:534 +#: ../../library/time.rst:536 msgid "``%G``" msgstr "" -#: ../../library/time.rst:534 +#: ../../library/time.rst:536 msgid "" "ISO 8601 year (similar to ``%Y`` but follows the rules for the ISO 8601 " "calendar year). The year starts with the week that contains the first " "Thursday of the calendar year." msgstr "" -#: ../../library/time.rst:539 +#: ../../library/time.rst:541 msgid "``%V``" msgstr "" -#: ../../library/time.rst:539 +#: ../../library/time.rst:541 msgid "" "ISO 8601 week number (as a decimal number [01,53]). The first week of the " "year is the one that contains the first Thursday of the year. Weeks start on " "Monday." msgstr "" -#: ../../library/time.rst:544 +#: ../../library/time.rst:546 msgid "``%%``" msgstr "" -#: ../../library/time.rst:544 +#: ../../library/time.rst:546 msgid "A literal ``'%'`` character." msgstr "" -#: ../../library/time.rst:547 +#: ../../library/time.rst:549 msgid "Notes:" msgstr "" -#: ../../library/time.rst:550 +#: ../../library/time.rst:552 msgid "" "The ``%f`` format directive only applies to :func:`strptime`, not to :func:" "`strftime`. However, see also :meth:`datetime.datetime.strptime` and :meth:" @@ -873,40 +876,40 @@ msgid "" "to microseconds `." msgstr "" -#: ../../library/time.rst:556 +#: ../../library/time.rst:558 msgid "" "When used with the :func:`strptime` function, the ``%p`` directive only " "affects the output hour field if the ``%I`` directive is used to parse the " "hour." msgstr "" -#: ../../library/time.rst:562 +#: ../../library/time.rst:564 msgid "" "The range really is ``0`` to ``61``; value ``60`` is valid in timestamps " "representing `leap seconds`_ and value ``61`` is supported for historical " "reasons." msgstr "" -#: ../../library/time.rst:567 +#: ../../library/time.rst:569 msgid "" "When used with the :func:`strptime` function, ``%U`` and ``%W`` are only " "used in calculations when the day of the week and the year are specified." msgstr "" -#: ../../library/time.rst:570 +#: ../../library/time.rst:572 msgid "" "Here is an example, a format for dates compatible with that specified in " "the :rfc:`2822` Internet email standard. [1]_ ::" msgstr "" -#: ../../library/time.rst:573 +#: ../../library/time.rst:575 msgid "" ">>> from time import gmtime, strftime\n" ">>> strftime(\"%a, %d %b %Y %H:%M:%S +0000\", gmtime())\n" "'Thu, 28 Jun 2001 14:17:15 +0000'" msgstr "" -#: ../../library/time.rst:577 +#: ../../library/time.rst:579 msgid "" "Additional directives may be supported on certain platforms, but only the " "ones listed here have a meaning standardized by ANSI C. To see the full set " @@ -914,7 +917,7 @@ msgid "" "`strftime(3)` documentation." msgstr "" -#: ../../library/time.rst:582 +#: ../../library/time.rst:584 msgid "" "On some platforms, an optional field width and precision specification can " "immediately follow the initial ``'%'`` of a directive in the following " @@ -922,13 +925,13 @@ msgid "" "``%j`` where it is 3." msgstr "" -#: ../../library/time.rst:593 +#: ../../library/time.rst:595 msgid "" "Parse a string representing a time according to a format. The return value " "is a :class:`struct_time` as returned by :func:`gmtime` or :func:`localtime`." msgstr "" -#: ../../library/time.rst:597 +#: ../../library/time.rst:599 msgid "" "The *format* parameter uses the same directives as those used by :func:" "`strftime`; it defaults to ``\"%a %b %d %H:%M:%S %Y\"`` which matches the " @@ -939,11 +942,11 @@ msgid "" "Both *string* and *format* must be strings." msgstr "" -#: ../../library/time.rst:605 +#: ../../library/time.rst:607 msgid "For example:" msgstr "" -#: ../../library/time.rst:612 +#: ../../library/time.rst:614 msgid "" "Support for the ``%Z`` directive is based on the values contained in " "``tzname`` and whether ``daylight`` is true. Because of this, it is " @@ -951,7 +954,7 @@ msgid "" "(and are considered to be non-daylight savings timezones)." msgstr "" -#: ../../library/time.rst:617 +#: ../../library/time.rst:619 msgid "" "Only the directives specified in the documentation are supported. Because " "``strftime()`` is implemented per platform it can sometimes offer more " @@ -960,7 +963,7 @@ msgid "" "are not documented as supported." msgstr "" -#: ../../library/time.rst:626 +#: ../../library/time.rst:628 msgid "" "The type of the time value sequence returned by :func:`gmtime`, :func:" "`localtime`, and :func:`strptime`. It is an object with a :term:`named " @@ -968,109 +971,109 @@ msgid "" "The following values are present:" msgstr "" -#: ../../library/time.rst:633 +#: ../../library/time.rst:635 msgid "Index" msgstr "" -#: ../../library/time.rst:634 +#: ../../library/time.rst:636 msgid "Attribute" msgstr "" -#: ../../library/time.rst:635 +#: ../../library/time.rst:637 msgid "Values" msgstr "" -#: ../../library/time.rst:637 +#: ../../library/time.rst:639 msgid "0" msgstr "" -#: ../../library/time.rst:639 +#: ../../library/time.rst:641 msgid "(for example, 1993)" msgstr "" -#: ../../library/time.rst:641 +#: ../../library/time.rst:643 msgid "1" msgstr "" -#: ../../library/time.rst:643 +#: ../../library/time.rst:645 msgid "range [1, 12]" msgstr "" -#: ../../library/time.rst:645 +#: ../../library/time.rst:647 msgid "2" msgstr "" -#: ../../library/time.rst:647 +#: ../../library/time.rst:649 msgid "range [1, 31]" msgstr "" -#: ../../library/time.rst:649 +#: ../../library/time.rst:651 msgid "3" msgstr "" -#: ../../library/time.rst:651 +#: ../../library/time.rst:653 msgid "range [0, 23]" msgstr "" -#: ../../library/time.rst:653 +#: ../../library/time.rst:655 msgid "4" msgstr "" -#: ../../library/time.rst:655 +#: ../../library/time.rst:657 msgid "range [0, 59]" msgstr "" -#: ../../library/time.rst:657 +#: ../../library/time.rst:659 msgid "5" msgstr "" -#: ../../library/time.rst:659 +#: ../../library/time.rst:661 msgid "range [0, 61]; see :ref:`Note (2) ` in :func:`strftime`" msgstr "" -#: ../../library/time.rst:661 +#: ../../library/time.rst:663 msgid "6" msgstr "" -#: ../../library/time.rst:663 +#: ../../library/time.rst:665 msgid "range [0, 6]; Monday is 0" msgstr "" -#: ../../library/time.rst:665 +#: ../../library/time.rst:667 msgid "7" msgstr "" -#: ../../library/time.rst:667 +#: ../../library/time.rst:669 msgid "range [1, 366]" msgstr "" -#: ../../library/time.rst:669 +#: ../../library/time.rst:671 msgid "8" msgstr "" -#: ../../library/time.rst:671 +#: ../../library/time.rst:673 msgid "0, 1 or -1; see below" msgstr "" -#: ../../library/time.rst:673 ../../library/time.rst:677 +#: ../../library/time.rst:675 ../../library/time.rst:679 msgid "N/A" msgstr "" -#: ../../library/time.rst:675 +#: ../../library/time.rst:677 msgid "abbreviation of timezone name" msgstr "" -#: ../../library/time.rst:679 +#: ../../library/time.rst:681 msgid "offset east of UTC in seconds" msgstr "" -#: ../../library/time.rst:681 +#: ../../library/time.rst:683 msgid "" "Note that unlike the C structure, the month value is a range of [1, 12], not " "[0, 11]." msgstr "" -#: ../../library/time.rst:684 +#: ../../library/time.rst:686 msgid "" "In calls to :func:`mktime`, :attr:`tm_isdst` may be set to 1 when daylight " "savings time is in effect, and 0 when it is not. A value of -1 indicates " @@ -1078,14 +1081,14 @@ msgid "" "filled in." msgstr "" -#: ../../library/time.rst:688 +#: ../../library/time.rst:690 msgid "" "When a tuple with an incorrect length is passed to a function expecting a :" "class:`struct_time`, or having elements of the wrong type, a :exc:" "`TypeError` is raised." msgstr "" -#: ../../library/time.rst:694 +#: ../../library/time.rst:696 msgid "" "Return the time in seconds since the epoch_ as a floating-point number. The " "handling of `leap seconds`_ is platform dependent. On Windows and most Unix " @@ -1094,7 +1097,7 @@ msgid "" "org/wiki/Unix_time>`_." msgstr "" -#: ../../library/time.rst:700 +#: ../../library/time.rst:702 msgid "" "Note that even though the time is always returned as a floating-point " "number, not all systems provide time with a better precision than 1 second. " @@ -1103,7 +1106,7 @@ msgid "" "between the two calls." msgstr "" -#: ../../library/time.rst:706 +#: ../../library/time.rst:708 msgid "" "The number returned by :func:`.time` may be converted into a more common " "time format (i.e. year, month, day, hour, etc...) in UTC by passing it to :" @@ -1113,31 +1116,37 @@ msgid "" "attributes." msgstr "" -#: ../../library/time.rst:715 -msgid "On Windows, call ``GetSystemTimeAsFileTime()``." +#: ../../library/time.rst:717 +msgid "On Windows, call ``GetSystemTimePreciseAsFileTime()``." msgstr "" -#: ../../library/time.rst:716 +#: ../../library/time.rst:718 msgid "Call ``clock_gettime(CLOCK_REALTIME)`` if available." msgstr "" -#: ../../library/time.rst:717 +#: ../../library/time.rst:719 msgid "Otherwise, call ``gettimeofday()``." msgstr "" -#: ../../library/time.rst:719 +#: ../../library/time.rst:721 msgid "" "Use :func:`time_ns` to avoid the precision loss caused by the :class:`float` " "type." msgstr "" -#: ../../library/time.rst:725 +#: ../../library/time.rst:726 +msgid "" +"On Windows, calls ``GetSystemTimePreciseAsFileTime()`` instead of " +"``GetSystemTimeAsFileTime()``." +msgstr "" + +#: ../../library/time.rst:732 msgid "" "Similar to :func:`~time.time` but returns time as an integer number of " "nanoseconds since the epoch_." msgstr "" -#: ../../library/time.rst:738 +#: ../../library/time.rst:745 msgid "" "Return the value (in fractional seconds) of the sum of the system and user " "CPU time of the current thread. It does not include time elapsed during " @@ -1146,21 +1155,21 @@ msgid "" "of two calls in the same thread is valid." msgstr "" -#: ../../library/time.rst:744 +#: ../../library/time.rst:751 msgid "" "Use :func:`thread_time_ns` to avoid the precision loss caused by the :class:" "`float` type." msgstr "" -#: ../../library/time.rst:749 +#: ../../library/time.rst:756 msgid "Unix systems supporting ``CLOCK_THREAD_CPUTIME_ID``." msgstr "" -#: ../../library/time.rst:756 +#: ../../library/time.rst:763 msgid "Similar to :func:`thread_time` but return time as nanoseconds." msgstr "" -#: ../../library/time.rst:763 +#: ../../library/time.rst:770 msgid "" "Reset the time conversion rules used by the library routines. The " "environment variable :envvar:`TZ` specifies how this is done. It will also " @@ -1171,46 +1180,46 @@ msgid "" "when daylight saving time applies)." msgstr "" -#: ../../library/time.rst:775 +#: ../../library/time.rst:782 msgid "" "Although in many cases, changing the :envvar:`TZ` environment variable may " "affect the output of functions like :func:`localtime` without calling :func:" "`tzset`, this behavior should not be relied on." msgstr "" -#: ../../library/time.rst:779 +#: ../../library/time.rst:786 msgid "The :envvar:`TZ` environment variable should contain no whitespace." msgstr "" -#: ../../library/time.rst:781 +#: ../../library/time.rst:788 msgid "" "The standard format of the :envvar:`TZ` environment variable is (whitespace " "added for clarity)::" msgstr "" -#: ../../library/time.rst:784 +#: ../../library/time.rst:791 msgid "std offset [dst [offset [,start[/time], end[/time]]]]" msgstr "" -#: ../../library/time.rst:786 +#: ../../library/time.rst:793 msgid "Where the components are:" msgstr "" -#: ../../library/time.rst:788 +#: ../../library/time.rst:795 msgid "``std`` and ``dst``" msgstr "" -#: ../../library/time.rst:789 +#: ../../library/time.rst:796 msgid "" "Three or more alphanumerics giving the timezone abbreviations. These will be " "propagated into time.tzname" msgstr "" -#: ../../library/time.rst:792 +#: ../../library/time.rst:799 msgid "``offset``" msgstr "" -#: ../../library/time.rst:793 +#: ../../library/time.rst:800 msgid "" "The offset has the form: ``± hh[:mm[:ss]]``. This indicates the value added " "the local time to arrive at UTC. If preceded by a '-', the timezone is east " @@ -1218,41 +1227,41 @@ msgid "" "summer time is assumed to be one hour ahead of standard time." msgstr "" -#: ../../library/time.rst:798 +#: ../../library/time.rst:805 msgid "``start[/time], end[/time]``" msgstr "" -#: ../../library/time.rst:799 +#: ../../library/time.rst:806 msgid "" "Indicates when to change to and back from DST. The format of the start and " "end dates are one of the following:" msgstr "" -#: ../../library/time.rst:802 +#: ../../library/time.rst:809 msgid ":samp:`J{n}`" msgstr "" -#: ../../library/time.rst:803 +#: ../../library/time.rst:810 msgid "" "The Julian day *n* (1 <= *n* <= 365). Leap days are not counted, so in all " "years February 28 is day 59 and March 1 is day 60." msgstr "" -#: ../../library/time.rst:806 +#: ../../library/time.rst:813 msgid ":samp:`{n}`" msgstr "" -#: ../../library/time.rst:807 +#: ../../library/time.rst:814 msgid "" "The zero-based Julian day (0 <= *n* <= 365). Leap days are counted, and it " "is possible to refer to February 29." msgstr "" -#: ../../library/time.rst:810 +#: ../../library/time.rst:817 msgid ":samp:`M{m}.{n}.{d}`" msgstr "" -#: ../../library/time.rst:811 +#: ../../library/time.rst:818 msgid "" "The *d*'th day (0 <= *d* <= 6) of week *n* of month *m* of the year (1 <= " "*n* <= 5, 1 <= *m* <= 12, where week 5 means \"the last *d* day in month " @@ -1260,13 +1269,13 @@ msgid "" "first week in which the *d*'th day occurs. Day zero is a Sunday." msgstr "" -#: ../../library/time.rst:817 +#: ../../library/time.rst:824 msgid "" "``time`` has the same format as ``offset`` except that no leading sign ('-' " "or '+') is allowed. The default, if time is not given, is 02:00:00." msgstr "" -#: ../../library/time.rst:822 +#: ../../library/time.rst:829 msgid "" ">>> os.environ['TZ'] = 'EST+05EDT,M4.1.0,M10.5.0'\n" ">>> time.tzset()\n" @@ -1278,7 +1287,7 @@ msgid "" "'16:08:12 05/08/03 AEST'" msgstr "" -#: ../../library/time.rst:831 +#: ../../library/time.rst:838 msgid "" "On many Unix systems (including \\*BSD, Linux, Solaris, and Darwin), it is " "more convenient to use the system's zoneinfo (:manpage:`tzfile(5)`) " @@ -1289,7 +1298,7 @@ msgid "" "``'Australia/Melbourne'``, ``'Egypt'`` or ``'Europe/Amsterdam'``. ::" msgstr "" -#: ../../library/time.rst:839 +#: ../../library/time.rst:846 msgid "" ">>> os.environ['TZ'] = 'US/Eastern'\n" ">>> time.tzset()\n" @@ -1301,23 +1310,23 @@ msgid "" "('EET', 'EEST')" msgstr "" -#: ../../library/time.rst:852 +#: ../../library/time.rst:859 msgid "Clock ID Constants" msgstr "" -#: ../../library/time.rst:854 +#: ../../library/time.rst:861 msgid "" "These constants are used as parameters for :func:`clock_getres` and :func:" "`clock_gettime`." msgstr "" -#: ../../library/time.rst:859 +#: ../../library/time.rst:866 msgid "" "Identical to :data:`CLOCK_MONOTONIC`, except it also includes any time that " "the system is suspended." msgstr "" -#: ../../library/time.rst:862 +#: ../../library/time.rst:869 msgid "" "This allows applications to get a suspend-aware monotonic clock without " "having to deal with the complications of :data:`CLOCK_REALTIME`, which may " @@ -1325,87 +1334,87 @@ msgid "" "similar." msgstr "" -#: ../../library/time.rst:874 +#: ../../library/time.rst:881 msgid "" "The Solaris OS has a ``CLOCK_HIGHRES`` timer that attempts to use an optimal " "hardware source, and may give close to nanosecond resolution. " "``CLOCK_HIGHRES`` is the nonadjustable, high-resolution clock." msgstr "" -#: ../../library/time.rst:885 +#: ../../library/time.rst:892 msgid "" "Clock that cannot be set and represents monotonic time since some " "unspecified starting point." msgstr "" -#: ../../library/time.rst:895 +#: ../../library/time.rst:902 msgid "" "Similar to :data:`CLOCK_MONOTONIC`, but provides access to a raw hardware-" "based time that is not subject to NTP adjustments." msgstr "" -#: ../../library/time.rst:904 +#: ../../library/time.rst:911 msgid "" "Similar to :data:`CLOCK_MONOTONIC_RAW`, but reads a value cached by the " "system at context switch and hence has less accuracy." msgstr "" -#: ../../library/time.rst:914 ../../library/time.rst:923 +#: ../../library/time.rst:921 ../../library/time.rst:930 msgid "High-resolution per-process timer from the CPU." msgstr "" -#: ../../library/time.rst:931 +#: ../../library/time.rst:938 msgid "" "`International Atomic Time `_" msgstr "" -#: ../../library/time.rst:933 +#: ../../library/time.rst:940 msgid "" "The system must have a current leap second table in order for this to give " "the correct answer. PTP or NTP software can maintain a leap second table." msgstr "" -#: ../../library/time.rst:942 +#: ../../library/time.rst:949 msgid "Thread-specific CPU-time clock." msgstr "" -#: ../../library/time.rst:951 +#: ../../library/time.rst:958 msgid "" "Time whose absolute value is the time the system has been running and not " "suspended, providing accurate uptime measurement, both absolute and interval." msgstr "" -#: ../../library/time.rst:962 +#: ../../library/time.rst:969 msgid "" "Clock that increments monotonically, tracking the time since an arbitrary " "point, unaffected by frequency or time adjustments and not incremented while " "the system is asleep." msgstr "" -#: ../../library/time.rst:972 +#: ../../library/time.rst:979 msgid "" "Like :data:`CLOCK_UPTIME_RAW`, but the value is cached by the system at " "context switches and therefore has less accuracy." msgstr "" -#: ../../library/time.rst:979 +#: ../../library/time.rst:986 msgid "" "The following constant is the only parameter that can be sent to :func:" "`clock_settime`." msgstr "" -#: ../../library/time.rst:985 +#: ../../library/time.rst:992 msgid "" -"System-wide real-time clock. Setting this clock requires appropriate " -"privileges." +"Real-time clock. Setting this clock requires appropriate privileges. The " +"clock is the same for all processes." msgstr "" -#: ../../library/time.rst:996 +#: ../../library/time.rst:1003 msgid "Timezone Constants" msgstr "" -#: ../../library/time.rst:1000 +#: ../../library/time.rst:1007 msgid "" "The offset of the local DST timezone, in seconds west of UTC, if one is " "defined. This is negative if the local DST timezone is east of UTC (as in " @@ -1413,25 +1422,25 @@ msgid "" "nonzero. See note below." msgstr "" -#: ../../library/time.rst:1006 +#: ../../library/time.rst:1013 msgid "Nonzero if a DST timezone is defined. See note below." msgstr "" -#: ../../library/time.rst:1010 +#: ../../library/time.rst:1017 msgid "" "The offset of the local (non-DST) timezone, in seconds west of UTC (negative " "in most of Western Europe, positive in the US, zero in the UK). See note " "below." msgstr "" -#: ../../library/time.rst:1015 +#: ../../library/time.rst:1022 msgid "" "A tuple of two strings: the first is the name of the local non-DST timezone, " "the second is the name of the local DST timezone. If no DST timezone is " "defined, the second string should not be used. See note below." msgstr "" -#: ../../library/time.rst:1021 +#: ../../library/time.rst:1028 msgid "" "For the above Timezone constants (:data:`altzone`, :data:`daylight`, :data:" "`timezone`, and :data:`tzname`), the value is determined by the timezone " @@ -1441,40 +1450,40 @@ msgid "" "func:`localtime` to obtain timezone information." msgstr "" -#: ../../library/time.rst:1030 +#: ../../library/time.rst:1037 msgid "Module :mod:`datetime`" msgstr "" -#: ../../library/time.rst:1031 +#: ../../library/time.rst:1038 msgid "More object-oriented interface to dates and times." msgstr "" -#: ../../library/time.rst:1033 +#: ../../library/time.rst:1040 msgid "Module :mod:`locale`" msgstr "" -#: ../../library/time.rst:1034 +#: ../../library/time.rst:1041 msgid "" "Internationalization services. The locale setting affects the " "interpretation of many format specifiers in :func:`strftime` and :func:" "`strptime`." msgstr "" -#: ../../library/time.rst:1037 +#: ../../library/time.rst:1044 msgid "Module :mod:`calendar`" msgstr "" -#: ../../library/time.rst:1038 +#: ../../library/time.rst:1045 msgid "" "General calendar-related functions. :func:`~calendar.timegm` is the " "inverse of :func:`gmtime` from this module." msgstr "" -#: ../../library/time.rst:1042 +#: ../../library/time.rst:1049 msgid "Footnotes" msgstr "" -#: ../../library/time.rst:1043 +#: ../../library/time.rst:1050 msgid "" "The use of ``%Z`` is now deprecated, but the ``%z`` escape that expands to " "the preferred hour/minute offset is not supported by all ANSI C libraries. " @@ -1513,23 +1522,23 @@ msgstr "" msgid "Daylight Saving Time" msgstr "" -#: ../../library/time.rst:323 ../../library/time.rst:358 -#: ../../library/time.rst:733 +#: ../../library/time.rst:324 ../../library/time.rst:360 +#: ../../library/time.rst:740 msgid "benchmarking" msgstr "" -#: ../../library/time.rst:358 ../../library/time.rst:733 +#: ../../library/time.rst:360 ../../library/time.rst:740 msgid "CPU time" msgstr "" -#: ../../library/time.rst:358 ../../library/time.rst:733 +#: ../../library/time.rst:360 ../../library/time.rst:740 msgid "processor time" msgstr "" -#: ../../library/time.rst:429 ../../library/time.rst:588 +#: ../../library/time.rst:431 ../../library/time.rst:590 msgid "% (percent)" msgstr "" -#: ../../library/time.rst:429 ../../library/time.rst:588 +#: ../../library/time.rst:431 ../../library/time.rst:590 msgid "datetime format" msgstr "" diff --git a/library/timeit.po b/library/timeit.po index a6563f672..b9c695167 100644 --- a/library/timeit.po +++ b/library/timeit.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:15+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/tk.po b/library/tk.po index 5f89725b1..b2816939f 100644 --- a/library/tk.po +++ b/library/tk.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:15+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/tkinter.colorchooser.po b/library/tkinter.colorchooser.po index 75e62d1fb..a52a34672 100644 --- a/library/tkinter.colorchooser.po +++ b/library/tkinter.colorchooser.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:15+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/tkinter.dnd.po b/library/tkinter.dnd.po index b88b4aaf8..40e8b5b57 100644 --- a/library/tkinter.dnd.po +++ b/library/tkinter.dnd.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:15+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/tkinter.font.po b/library/tkinter.font.po index dad801a79..9458990bb 100644 --- a/library/tkinter.font.po +++ b/library/tkinter.font.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:15+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/tkinter.messagebox.po b/library/tkinter.messagebox.po index aa9c95922..19dfa9bf3 100644 --- a/library/tkinter.messagebox.po +++ b/library/tkinter.messagebox.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:15+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/tkinter.po b/library/tkinter.po index 20273ff21..7f862ff92 100644 --- a/library/tkinter.po +++ b/library/tkinter.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:15+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/tkinter.scrolledtext.po b/library/tkinter.scrolledtext.po index 578724324..ca74ce67a 100644 --- a/library/tkinter.scrolledtext.po +++ b/library/tkinter.scrolledtext.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:15+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/tkinter.ttk.po b/library/tkinter.ttk.po index 8cab2a374..4646a6c61 100644 --- a/library/tkinter.ttk.po +++ b/library/tkinter.ttk.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:15+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/token.po b/library/token.po index ee3024c98..2480fdd78 100644 --- a/library/token.po +++ b/library/token.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:15+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -74,7 +78,7 @@ msgstr "" #: ../../library/token.rst:53 msgid "" "Token value that indicates an :ref:`identifier `. Note that " -"keywords are also initially tokenized an ``NAME`` tokens." +"keywords are also initially tokenized as ``NAME`` tokens." msgstr "" #: ../../library/token.rst:58 diff --git a/library/tokenize.po b/library/tokenize.po index c36949a18..4775f55f3 100644 --- a/library/tokenize.po +++ b/library/tokenize.po @@ -6,15 +6,16 @@ # Translators: # Danial Behzadi , 2025 # Parham Forati, 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:16+0000\n" -"Last-Translator: Parham Forati, 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/tomllib.po b/library/tomllib.po index bafa7162b..a2457e325 100644 --- a/library/tomllib.po +++ b/library/tomllib.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2022-11-05 19:49+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/trace.po b/library/trace.po index 37316a588..b1d25aded 100644 --- a/library/trace.po +++ b/library/trace.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:16+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/traceback.po b/library/traceback.po index 9bd9d963e..07d61afeb 100644 --- a/library/traceback.po +++ b/library/traceback.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:16+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/tracemalloc.po b/library/tracemalloc.po index b84f415b1..af093bd9d 100644 --- a/library/tracemalloc.po +++ b/library/tracemalloc.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:16+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/tty.po b/library/tty.po index 27295d340..00b2bf383 100644 --- a/library/tty.po +++ b/library/tty.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:16+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/turtle.po b/library/turtle.po index 57f03d9cb..75a844f09 100644 --- a/library/turtle.po +++ b/library/turtle.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:16+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/types.po b/library/types.po index 1949b53c9..583d7fdfa 100644 --- a/library/types.po +++ b/library/types.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:16+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/typing.po b/library/typing.po index c737a636e..792fe0b50 100644 --- a/library/typing.po +++ b/library/typing.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:16+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -421,7 +422,7 @@ msgid "" "ReturnType]`` respectively." msgstr "" -#: ../../library/typing.rst:285 ../../library/typing.rst:3970 +#: ../../library/typing.rst:285 ../../library/typing.rst:3965 msgid "" "``Callable`` now supports :class:`ParamSpec` and :data:`Concatenate`. See :" "pep:`612` for more details." @@ -3256,7 +3257,7 @@ msgid "Typed version of :func:`collections.namedtuple`." msgstr "" #: ../../library/typing.rst:2355 ../../library/typing.rst:2451 -#: ../../library/typing.rst:3544 +#: ../../library/typing.rst:3545 msgid "Usage::" msgstr "" @@ -4807,46 +4808,24 @@ msgstr "" #: ../../library/typing.rst:3502 msgid "" "This is similar to calling :meth:`annotationlib.ForwardRef.evaluate`, but " -"unlike that method, :func:`!evaluate_forward_ref` also:" -msgstr "" - -#: ../../library/typing.rst:3505 -msgid "Recursively evaluates forward references nested within the type hint." +"unlike that method, :func:`!evaluate_forward_ref` also recursively evaluates " +"forward references nested within the type hint." msgstr "" #: ../../library/typing.rst:3506 msgid "" -"Raises :exc:`TypeError` when it encounters certain objects that are not " -"valid type hints." -msgstr "" - -#: ../../library/typing.rst:3508 -msgid "" -"Replaces type hints that evaluate to :const:`!None` with :class:`types." -"NoneType`." -msgstr "" - -#: ../../library/typing.rst:3510 -msgid "" -"Supports the :attr:`~annotationlib.Format.FORWARDREF` and :attr:" -"`~annotationlib.Format.STRING` formats." -msgstr "" - -#: ../../library/typing.rst:3513 -msgid "" "See the documentation for :meth:`annotationlib.ForwardRef.evaluate` for the " -"meaning of the *owner*, *globals*, *locals*, and *type_params* parameters. " -"*format* specifies the format of the annotation and is a member of the :" -"class:`annotationlib.Format` enum." +"meaning of the *owner*, *globals*, *locals*, *type_params*, and *format* " +"parameters." msgstr "" -#: ../../library/typing.rst:3522 +#: ../../library/typing.rst:3513 msgid "" "A sentinel object used to indicate that a type parameter has no default " "value. For example:" msgstr "" -#: ../../library/typing.rst:3525 +#: ../../library/typing.rst:3516 msgid "" ">>> T = TypeVar(\"T\")\n" ">>> T.__default__ is typing.NoDefault\n" @@ -4856,46 +4835,51 @@ msgid "" "True" msgstr "" -#: ../../library/typing.rst:3537 +#: ../../library/typing.rst:3528 msgid "Constant" msgstr "" -#: ../../library/typing.rst:3541 +#: ../../library/typing.rst:3532 msgid "" "A special constant that is assumed to be ``True`` by 3rd party static type " -"checkers. It is ``False`` at runtime." +"checkers. It's ``False`` at runtime." msgstr "" -#: ../../library/typing.rst:3546 +#: ../../library/typing.rst:3535 +msgid "" +"A module which is expensive to import, and which only contain types used for " +"typing annotations, can be safely imported inside an ``if TYPE_CHECKING:`` " +"block. This prevents the module from actually being imported at runtime; " +"annotations aren't eagerly evaluated (see :pep:`649`) so using undefined " +"symbols in annotations is harmless--as long as you don't later examine them. " +"Your static type analysis tool will set ``TYPE_CHECKING`` to ``True`` during " +"static type analysis, which means the module will be imported and the types " +"will be checked properly during such analysis." +msgstr "" + +#: ../../library/typing.rst:3547 msgid "" "if TYPE_CHECKING:\n" " import expensive_mod\n" "\n" -"def fun(arg: 'expensive_mod.SomeType') -> None:\n" +"def fun(arg: expensive_mod.SomeType) -> None:\n" " local_var: expensive_mod.AnotherType = other_fun()" msgstr "" -#: ../../library/typing.rst:3552 -msgid "" -"The first type annotation must be enclosed in quotes, making it a \"forward " -"reference\", to hide the ``expensive_mod`` reference from the interpreter " -"runtime. Type annotations for local variables are not evaluated, so the " -"second annotation does not need to be enclosed in quotes." -msgstr "" - -#: ../../library/typing.rst:3559 +#: ../../library/typing.rst:3553 msgid "" -"If ``from __future__ import annotations`` is used, annotations are not " -"evaluated at function definition time. Instead, they are stored as strings " -"in ``__annotations__``. This makes it unnecessary to use quotes around the " -"annotation (see :pep:`563`)." +"If you occasionally need to examine type annotations at runtime which may " +"contain undefined symbols, use :meth:`annotationlib.get_annotations` with a " +"``format`` parameter of :attr:`annotationlib.Format.STRING` or :attr:" +"`annotationlib.Format.FORWARDREF` to safely retrieve the annotations without " +"raising :exc:`NameError`." msgstr "" -#: ../../library/typing.rst:3571 +#: ../../library/typing.rst:3566 msgid "Deprecated aliases" msgstr "" -#: ../../library/typing.rst:3573 +#: ../../library/typing.rst:3568 msgid "" "This module defines several deprecated aliases to pre-existing standard " "library classes. These were originally included in the :mod:`!typing` module " @@ -4904,7 +4888,7 @@ msgid "" "pre-existing classes were enhanced to support ``[]`` (see :pep:`585`)." msgstr "" -#: ../../library/typing.rst:3580 +#: ../../library/typing.rst:3575 msgid "" "The redundant types are deprecated as of Python 3.9. However, while the " "aliases may be removed at some point, removal of these aliases is not " @@ -4912,7 +4896,7 @@ msgid "" "the interpreter for these aliases." msgstr "" -#: ../../library/typing.rst:3585 +#: ../../library/typing.rst:3580 msgid "" "If at some point it is decided to remove these deprecated aliases, a " "deprecation warning will be issued by the interpreter for at least two " @@ -4920,38 +4904,38 @@ msgid "" "`!typing` module without deprecation warnings until at least Python 3.14." msgstr "" -#: ../../library/typing.rst:3590 +#: ../../library/typing.rst:3585 msgid "" "Type checkers are encouraged to flag uses of the deprecated types if the " "program they are checking targets a minimum Python version of 3.9 or newer." msgstr "" -#: ../../library/typing.rst:3596 +#: ../../library/typing.rst:3591 msgid "Aliases to built-in types" msgstr "" -#: ../../library/typing.rst:3600 +#: ../../library/typing.rst:3595 msgid "Deprecated alias to :class:`dict`." msgstr "" -#: ../../library/typing.rst:3602 +#: ../../library/typing.rst:3597 msgid "" "Note that to annotate arguments, it is preferred to use an abstract " "collection type such as :class:`~collections.abc.Mapping` rather than to " "use :class:`dict` or :class:`!typing.Dict`." msgstr "" -#: ../../library/typing.rst:3606 +#: ../../library/typing.rst:3601 msgid "" ":class:`builtins.dict ` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3612 +#: ../../library/typing.rst:3607 msgid "Deprecated alias to :class:`list`." msgstr "" -#: ../../library/typing.rst:3614 +#: ../../library/typing.rst:3609 msgid "" "Note that to annotate arguments, it is preferred to use an abstract " "collection type such as :class:`~collections.abc.Sequence` or :class:" @@ -4959,136 +4943,136 @@ msgid "" "typing.List`." msgstr "" -#: ../../library/typing.rst:3619 +#: ../../library/typing.rst:3614 msgid "" ":class:`builtins.list ` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3625 +#: ../../library/typing.rst:3620 msgid "Deprecated alias to :class:`builtins.set `." msgstr "" -#: ../../library/typing.rst:3627 +#: ../../library/typing.rst:3622 msgid "" "Note that to annotate arguments, it is preferred to use an abstract " "collection type such as :class:`collections.abc.Set` rather than to use :" "class:`set` or :class:`typing.Set`." msgstr "" -#: ../../library/typing.rst:3631 +#: ../../library/typing.rst:3626 msgid "" ":class:`builtins.set ` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3637 +#: ../../library/typing.rst:3632 msgid "Deprecated alias to :class:`builtins.frozenset `." msgstr "" -#: ../../library/typing.rst:3639 +#: ../../library/typing.rst:3634 msgid "" ":class:`builtins.frozenset ` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3646 +#: ../../library/typing.rst:3641 msgid "Deprecated alias for :class:`tuple`." msgstr "" -#: ../../library/typing.rst:3648 +#: ../../library/typing.rst:3643 msgid "" ":class:`tuple` and ``Tuple`` are special-cased in the type system; see :ref:" "`annotating-tuples` for more details." msgstr "" -#: ../../library/typing.rst:3651 +#: ../../library/typing.rst:3646 msgid "" ":class:`builtins.tuple ` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3657 +#: ../../library/typing.rst:3652 msgid "Deprecated alias to :class:`type`." msgstr "" -#: ../../library/typing.rst:3659 +#: ../../library/typing.rst:3654 msgid "" "See :ref:`type-of-class-objects` for details on using :class:`type` or " "``typing.Type`` in type annotations." msgstr "" -#: ../../library/typing.rst:3664 +#: ../../library/typing.rst:3659 msgid "" ":class:`builtins.type ` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3671 +#: ../../library/typing.rst:3666 msgid "Aliases to types in :mod:`collections`" msgstr "" -#: ../../library/typing.rst:3675 +#: ../../library/typing.rst:3670 msgid "Deprecated alias to :class:`collections.defaultdict`." msgstr "" -#: ../../library/typing.rst:3679 +#: ../../library/typing.rst:3674 msgid "" ":class:`collections.defaultdict` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3685 +#: ../../library/typing.rst:3680 msgid "Deprecated alias to :class:`collections.OrderedDict`." msgstr "" -#: ../../library/typing.rst:3689 +#: ../../library/typing.rst:3684 msgid "" ":class:`collections.OrderedDict` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3695 +#: ../../library/typing.rst:3690 msgid "Deprecated alias to :class:`collections.ChainMap`." msgstr "" -#: ../../library/typing.rst:3699 +#: ../../library/typing.rst:3694 msgid "" ":class:`collections.ChainMap` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3705 +#: ../../library/typing.rst:3700 msgid "Deprecated alias to :class:`collections.Counter`." msgstr "" -#: ../../library/typing.rst:3709 +#: ../../library/typing.rst:3704 msgid "" ":class:`collections.Counter` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3715 +#: ../../library/typing.rst:3710 msgid "Deprecated alias to :class:`collections.deque`." msgstr "" -#: ../../library/typing.rst:3719 +#: ../../library/typing.rst:3714 msgid "" ":class:`collections.deque` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3726 +#: ../../library/typing.rst:3721 msgid "Aliases to other concrete types" msgstr "" -#: ../../library/typing.rst:3731 +#: ../../library/typing.rst:3726 msgid "" "Deprecated aliases corresponding to the return types from :func:`re.compile` " "and :func:`re.match`." msgstr "" -#: ../../library/typing.rst:3734 +#: ../../library/typing.rst:3729 msgid "" "These types (and the corresponding functions) are generic over :data:" "`AnyStr`. ``Pattern`` can be specialised as ``Pattern[str]`` or " @@ -5096,331 +5080,331 @@ msgid "" "``Match[bytes]``." msgstr "" -#: ../../library/typing.rst:3739 +#: ../../library/typing.rst:3734 msgid "" "Classes ``Pattern`` and ``Match`` from :mod:`re` now support ``[]``. See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3745 +#: ../../library/typing.rst:3740 msgid "Deprecated alias for :class:`str`." msgstr "" -#: ../../library/typing.rst:3747 +#: ../../library/typing.rst:3742 msgid "" "``Text`` is provided to supply a forward compatible path for Python 2 code: " "in Python 2, ``Text`` is an alias for ``unicode``." msgstr "" -#: ../../library/typing.rst:3751 +#: ../../library/typing.rst:3746 msgid "" "Use ``Text`` to indicate that a value must contain a unicode string in a " "manner that is compatible with both Python 2 and Python 3::" msgstr "" -#: ../../library/typing.rst:3754 +#: ../../library/typing.rst:3749 msgid "" "def add_unicode_checkmark(text: Text) -> Text:\n" " return text + u' \\u2713'" msgstr "" -#: ../../library/typing.rst:3759 +#: ../../library/typing.rst:3754 msgid "" "Python 2 is no longer supported, and most type checkers also no longer " "support type checking Python 2 code. Removal of the alias is not currently " "planned, but users are encouraged to use :class:`str` instead of ``Text``." msgstr "" -#: ../../library/typing.rst:3769 +#: ../../library/typing.rst:3764 msgid "Aliases to container ABCs in :mod:`collections.abc`" msgstr "" -#: ../../library/typing.rst:3773 +#: ../../library/typing.rst:3768 msgid "Deprecated alias to :class:`collections.abc.Set`." msgstr "" -#: ../../library/typing.rst:3775 +#: ../../library/typing.rst:3770 msgid "" ":class:`collections.abc.Set` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3781 +#: ../../library/typing.rst:3776 msgid "Deprecated alias to :class:`collections.abc.Collection`." msgstr "" -#: ../../library/typing.rst:3785 +#: ../../library/typing.rst:3780 msgid "" ":class:`collections.abc.Collection` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3791 +#: ../../library/typing.rst:3786 msgid "Deprecated alias to :class:`collections.abc.Container`." msgstr "" -#: ../../library/typing.rst:3793 +#: ../../library/typing.rst:3788 msgid "" ":class:`collections.abc.Container` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3799 +#: ../../library/typing.rst:3794 msgid "Deprecated alias to :class:`collections.abc.ItemsView`." msgstr "" -#: ../../library/typing.rst:3801 +#: ../../library/typing.rst:3796 msgid "" ":class:`collections.abc.ItemsView` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3807 +#: ../../library/typing.rst:3802 msgid "Deprecated alias to :class:`collections.abc.KeysView`." msgstr "" -#: ../../library/typing.rst:3809 +#: ../../library/typing.rst:3804 msgid "" ":class:`collections.abc.KeysView` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3815 +#: ../../library/typing.rst:3810 msgid "Deprecated alias to :class:`collections.abc.Mapping`." msgstr "" -#: ../../library/typing.rst:3817 +#: ../../library/typing.rst:3812 msgid "" ":class:`collections.abc.Mapping` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3823 +#: ../../library/typing.rst:3818 msgid "Deprecated alias to :class:`collections.abc.MappingView`." msgstr "" -#: ../../library/typing.rst:3825 +#: ../../library/typing.rst:3820 msgid "" ":class:`collections.abc.MappingView` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3831 +#: ../../library/typing.rst:3826 msgid "Deprecated alias to :class:`collections.abc.MutableMapping`." msgstr "" -#: ../../library/typing.rst:3833 +#: ../../library/typing.rst:3828 msgid "" ":class:`collections.abc.MutableMapping` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3840 +#: ../../library/typing.rst:3835 msgid "Deprecated alias to :class:`collections.abc.MutableSequence`." msgstr "" -#: ../../library/typing.rst:3842 +#: ../../library/typing.rst:3837 msgid "" ":class:`collections.abc.MutableSequence` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3849 +#: ../../library/typing.rst:3844 msgid "Deprecated alias to :class:`collections.abc.MutableSet`." msgstr "" -#: ../../library/typing.rst:3851 +#: ../../library/typing.rst:3846 msgid "" ":class:`collections.abc.MutableSet` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3857 +#: ../../library/typing.rst:3852 msgid "Deprecated alias to :class:`collections.abc.Sequence`." msgstr "" -#: ../../library/typing.rst:3859 +#: ../../library/typing.rst:3854 msgid "" ":class:`collections.abc.Sequence` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3865 +#: ../../library/typing.rst:3860 msgid "Deprecated alias to :class:`collections.abc.ValuesView`." msgstr "" -#: ../../library/typing.rst:3867 +#: ../../library/typing.rst:3862 msgid "" ":class:`collections.abc.ValuesView` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3874 +#: ../../library/typing.rst:3869 msgid "Aliases to asynchronous ABCs in :mod:`collections.abc`" msgstr "" -#: ../../library/typing.rst:3878 +#: ../../library/typing.rst:3873 msgid "Deprecated alias to :class:`collections.abc.Coroutine`." msgstr "" -#: ../../library/typing.rst:3880 +#: ../../library/typing.rst:3875 msgid "" "See :ref:`annotating-generators-and-coroutines` for details on using :class:" "`collections.abc.Coroutine` and ``typing.Coroutine`` in type annotations." msgstr "" -#: ../../library/typing.rst:3886 +#: ../../library/typing.rst:3881 msgid "" ":class:`collections.abc.Coroutine` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3892 +#: ../../library/typing.rst:3887 msgid "Deprecated alias to :class:`collections.abc.AsyncGenerator`." msgstr "" -#: ../../library/typing.rst:3894 +#: ../../library/typing.rst:3889 msgid "" "See :ref:`annotating-generators-and-coroutines` for details on using :class:" "`collections.abc.AsyncGenerator` and ``typing.AsyncGenerator`` in type " "annotations." msgstr "" -#: ../../library/typing.rst:3900 +#: ../../library/typing.rst:3895 msgid "" ":class:`collections.abc.AsyncGenerator` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3905 +#: ../../library/typing.rst:3900 msgid "The ``SendType`` parameter now has a default." msgstr "" -#: ../../library/typing.rst:3910 +#: ../../library/typing.rst:3905 msgid "Deprecated alias to :class:`collections.abc.AsyncIterable`." msgstr "" -#: ../../library/typing.rst:3914 +#: ../../library/typing.rst:3909 msgid "" ":class:`collections.abc.AsyncIterable` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3920 +#: ../../library/typing.rst:3915 msgid "Deprecated alias to :class:`collections.abc.AsyncIterator`." msgstr "" -#: ../../library/typing.rst:3924 +#: ../../library/typing.rst:3919 msgid "" ":class:`collections.abc.AsyncIterator` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3930 +#: ../../library/typing.rst:3925 msgid "Deprecated alias to :class:`collections.abc.Awaitable`." msgstr "" -#: ../../library/typing.rst:3934 +#: ../../library/typing.rst:3929 msgid "" ":class:`collections.abc.Awaitable` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3941 +#: ../../library/typing.rst:3936 msgid "Aliases to other ABCs in :mod:`collections.abc`" msgstr "" -#: ../../library/typing.rst:3945 +#: ../../library/typing.rst:3940 msgid "Deprecated alias to :class:`collections.abc.Iterable`." msgstr "" -#: ../../library/typing.rst:3947 +#: ../../library/typing.rst:3942 msgid "" ":class:`collections.abc.Iterable` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3953 +#: ../../library/typing.rst:3948 msgid "Deprecated alias to :class:`collections.abc.Iterator`." msgstr "" -#: ../../library/typing.rst:3955 +#: ../../library/typing.rst:3950 msgid "" ":class:`collections.abc.Iterator` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3961 +#: ../../library/typing.rst:3956 msgid "Deprecated alias to :class:`collections.abc.Callable`." msgstr "" -#: ../../library/typing.rst:3963 +#: ../../library/typing.rst:3958 msgid "" "See :ref:`annotating-callables` for details on how to use :class:" "`collections.abc.Callable` and ``typing.Callable`` in type annotations." msgstr "" -#: ../../library/typing.rst:3966 +#: ../../library/typing.rst:3961 msgid "" ":class:`collections.abc.Callable` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3976 +#: ../../library/typing.rst:3971 msgid "Deprecated alias to :class:`collections.abc.Generator`." msgstr "" -#: ../../library/typing.rst:3978 +#: ../../library/typing.rst:3973 msgid "" "See :ref:`annotating-generators-and-coroutines` for details on using :class:" "`collections.abc.Generator` and ``typing.Generator`` in type annotations." msgstr "" -#: ../../library/typing.rst:3982 +#: ../../library/typing.rst:3977 msgid "" ":class:`collections.abc.Generator` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3986 +#: ../../library/typing.rst:3981 msgid "Default values for the send and return types were added." msgstr "" -#: ../../library/typing.rst:3991 +#: ../../library/typing.rst:3986 msgid "Deprecated alias to :class:`collections.abc.Hashable`." msgstr "" -#: ../../library/typing.rst:3993 +#: ../../library/typing.rst:3988 msgid "Use :class:`collections.abc.Hashable` directly instead." msgstr "" -#: ../../library/typing.rst:3998 +#: ../../library/typing.rst:3993 msgid "Deprecated alias to :class:`collections.abc.Reversible`." msgstr "" -#: ../../library/typing.rst:4000 +#: ../../library/typing.rst:3995 msgid "" ":class:`collections.abc.Reversible` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:4006 +#: ../../library/typing.rst:4001 msgid "Deprecated alias to :class:`collections.abc.Sized`." msgstr "" -#: ../../library/typing.rst:4008 +#: ../../library/typing.rst:4003 msgid "Use :class:`collections.abc.Sized` directly instead." msgstr "" -#: ../../library/typing.rst:4014 +#: ../../library/typing.rst:4009 msgid "Aliases to :mod:`contextlib` ABCs" msgstr "" -#: ../../library/typing.rst:4018 +#: ../../library/typing.rst:4013 msgid "Deprecated alias to :class:`contextlib.AbstractContextManager`." msgstr "" -#: ../../library/typing.rst:4020 +#: ../../library/typing.rst:4015 msgid "" "The first type parameter, ``T_co``, represents the type returned by the :" "meth:`~object.__enter__` method. The optional second type parameter, " @@ -5428,21 +5412,21 @@ msgid "" "returned by the :meth:`~object.__exit__` method." msgstr "" -#: ../../library/typing.rst:4027 +#: ../../library/typing.rst:4022 msgid "" ":class:`contextlib.AbstractContextManager` now supports subscripting " "(``[]``). See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:4032 +#: ../../library/typing.rst:4027 msgid "Added the optional second type parameter, ``ExitT_co``." msgstr "" -#: ../../library/typing.rst:4037 +#: ../../library/typing.rst:4032 msgid "Deprecated alias to :class:`contextlib.AbstractAsyncContextManager`." msgstr "" -#: ../../library/typing.rst:4039 +#: ../../library/typing.rst:4034 msgid "" "The first type parameter, ``T_co``, represents the type returned by the :" "meth:`~object.__aenter__` method. The optional second type parameter, " @@ -5450,21 +5434,21 @@ msgid "" "returned by the :meth:`~object.__aexit__` method." msgstr "" -#: ../../library/typing.rst:4046 +#: ../../library/typing.rst:4041 msgid "" ":class:`contextlib.AbstractAsyncContextManager` now supports subscripting " "(``[]``). See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:4051 +#: ../../library/typing.rst:4046 msgid "Added the optional second type parameter, ``AExitT_co``." msgstr "" -#: ../../library/typing.rst:4055 +#: ../../library/typing.rst:4050 msgid "Deprecation Timeline of Major Features" msgstr "" -#: ../../library/typing.rst:4057 +#: ../../library/typing.rst:4052 msgid "" "Certain features in ``typing`` are deprecated and may be removed in a future " "version of Python. The following table summarizes major deprecations for " @@ -5472,99 +5456,99 @@ msgid "" "listed." msgstr "" -#: ../../library/typing.rst:4064 +#: ../../library/typing.rst:4059 msgid "Feature" msgstr "" -#: ../../library/typing.rst:4065 +#: ../../library/typing.rst:4060 msgid "Deprecated in" msgstr "" -#: ../../library/typing.rst:4066 +#: ../../library/typing.rst:4061 msgid "Projected removal" msgstr "" -#: ../../library/typing.rst:4067 +#: ../../library/typing.rst:4062 msgid "PEP/issue" msgstr "" -#: ../../library/typing.rst:4068 +#: ../../library/typing.rst:4063 msgid "``typing`` versions of standard collections" msgstr "" -#: ../../library/typing.rst:4069 +#: ../../library/typing.rst:4064 msgid "3.9" msgstr "" -#: ../../library/typing.rst:4070 +#: ../../library/typing.rst:4065 msgid "Undecided (see :ref:`deprecated-aliases` for more information)" msgstr "" -#: ../../library/typing.rst:4071 +#: ../../library/typing.rst:4066 msgid ":pep:`585`" msgstr "" -#: ../../library/typing.rst:4072 +#: ../../library/typing.rst:4067 msgid ":data:`typing.Text`" msgstr "" -#: ../../library/typing.rst:4073 +#: ../../library/typing.rst:4068 msgid "3.11" msgstr "" -#: ../../library/typing.rst:4074 ../../library/typing.rst:4078 -#: ../../library/typing.rst:4082 +#: ../../library/typing.rst:4069 ../../library/typing.rst:4073 +#: ../../library/typing.rst:4077 msgid "Undecided" msgstr "" -#: ../../library/typing.rst:4075 +#: ../../library/typing.rst:4070 msgid ":gh:`92332`" msgstr "" -#: ../../library/typing.rst:4076 +#: ../../library/typing.rst:4071 msgid ":class:`typing.Hashable` and :class:`typing.Sized`" msgstr "" -#: ../../library/typing.rst:4077 ../../library/typing.rst:4081 +#: ../../library/typing.rst:4072 ../../library/typing.rst:4076 msgid "3.12" msgstr "" -#: ../../library/typing.rst:4079 +#: ../../library/typing.rst:4074 msgid ":gh:`94309`" msgstr "" -#: ../../library/typing.rst:4080 +#: ../../library/typing.rst:4075 msgid ":data:`typing.TypeAlias`" msgstr "" -#: ../../library/typing.rst:4083 +#: ../../library/typing.rst:4078 msgid ":pep:`695`" msgstr "" -#: ../../library/typing.rst:4084 +#: ../../library/typing.rst:4079 msgid ":func:`@typing.no_type_check_decorator `" msgstr "" -#: ../../library/typing.rst:4085 ../../library/typing.rst:4089 +#: ../../library/typing.rst:4080 ../../library/typing.rst:4084 msgid "3.13" msgstr "" -#: ../../library/typing.rst:4086 +#: ../../library/typing.rst:4081 msgid "3.15" msgstr "" -#: ../../library/typing.rst:4087 +#: ../../library/typing.rst:4082 msgid ":gh:`106309`" msgstr "" -#: ../../library/typing.rst:4088 +#: ../../library/typing.rst:4083 msgid ":data:`typing.AnyStr`" msgstr "" -#: ../../library/typing.rst:4090 +#: ../../library/typing.rst:4085 msgid "3.18" msgstr "" -#: ../../library/typing.rst:4091 +#: ../../library/typing.rst:4086 msgid ":gh:`105578`" msgstr "" diff --git a/library/unicodedata.po b/library/unicodedata.po index ac65159f7..d0eaf830d 100644 --- a/library/unicodedata.po +++ b/library/unicodedata.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:16+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/unittest.mock-examples.po b/library/unittest.mock-examples.po index 5489c63aa..14b693aff 100644 --- a/library/unittest.mock-examples.po +++ b/library/unittest.mock-examples.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:16+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/unittest.mock.po b/library/unittest.mock.po index 53e50121f..7b9f3d6d1 100644 --- a/library/unittest.mock.po +++ b/library/unittest.mock.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:16+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/unittest.po b/library/unittest.po index 640cf04b3..b9cb42046 100644 --- a/library/unittest.po +++ b/library/unittest.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Parham Forati, 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:16+0000\n" -"Last-Translator: Parham Forati, 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -203,7 +204,7 @@ msgstr "" #: ../../library/unittest.rst:112 msgid "" -"A testcase is created by subclassing :class:`unittest.TestCase`. The three " +"A test case is created by subclassing :class:`unittest.TestCase`. The three " "individual tests are defined with methods whose names start with the letters " "``test``. This naming convention informs the test runner about which " "methods represent tests." diff --git a/library/unix.po b/library/unix.po index 9eebe281f..4787d7117 100644 --- a/library/unix.po +++ b/library/unix.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:16+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/urllib.error.po b/library/urllib.error.po index 3d809660f..b733d8381 100644 --- a/library/urllib.error.po +++ b/library/urllib.error.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:16+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/urllib.parse.po b/library/urllib.parse.po index b72a9dd31..95801a7ec 100644 --- a/library/urllib.parse.po +++ b/library/urllib.parse.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:17+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/urllib.po b/library/urllib.po index 899c6dde0..f0a6320a2 100644 --- a/library/urllib.po +++ b/library/urllib.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:17+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/urllib.request.po b/library/urllib.request.po index 017a6ad9d..f0054cfaa 100644 --- a/library/urllib.request.po +++ b/library/urllib.request.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:17+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/urllib.robotparser.po b/library/urllib.robotparser.po index 9cec8be58..709126dd1 100644 --- a/library/urllib.robotparser.po +++ b/library/urllib.robotparser.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:17+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/uu.po b/library/uu.po index 22abffb01..2442c099d 100644 --- a/library/uu.po +++ b/library/uu.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-11-19 01:03+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/uuid.po b/library/uuid.po index 62d0f6425..5bc92efca 100644 --- a/library/uuid.po +++ b/library/uuid.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:17+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -237,70 +238,74 @@ msgstr "" #: ../../library/uuid.rst:196 msgid "" -"Generate a UUID from a host ID, sequence number, and the current time. If " -"*node* is not given, :func:`getnode` is used to obtain the hardware address. " -"If *clock_seq* is given, it is used as the sequence number; otherwise a " -"random 14-bit sequence number is chosen." +"Generate a UUID from a host ID, sequence number, and the current time " +"according to :rfc:`RFC 9562, §5.1 <9562#section-5.1>`." msgstr "" -#: ../../library/uuid.rst:204 +#: ../../library/uuid.rst:199 ../../library/uuid.rst:236 msgid "" -"Generate a UUID based on the MD5 hash of a namespace identifier (which is a " -"UUID) and a name (which is a :class:`bytes` object or a string that will be " -"encoded using UTF-8)." +"When *node* is not specified, :func:`getnode` is used to obtain the hardware " +"address as a 48-bit positive integer. When a sequence number *clock_seq* is " +"not specified, a pseudo-random 14-bit positive integer is generated." msgstr "" -#: ../../library/uuid.rst:211 -msgid "Generate a random UUID." +#: ../../library/uuid.rst:203 ../../library/uuid.rst:240 +msgid "" +"If *node* or *clock_seq* exceed their expected bit count, only their least " +"significant bits are kept." msgstr "" -#: ../../library/uuid.rst:216 +#: ../../library/uuid.rst:209 msgid "" -"Generate a UUID based on the SHA-1 hash of a namespace identifier (which is " -"a UUID) and a name (which is a :class:`bytes` object or a string that will " -"be encoded using UTF-8)." +"Generate a UUID based on the MD5 hash of a namespace identifier (which is a " +"UUID) and a name (which is a :class:`bytes` object or a string that will be " +"encoded using UTF-8) according to :rfc:`RFC 9562, §5.3 <9562#section-5.3>`." msgstr "" -#: ../../library/uuid.rst:223 +#: ../../library/uuid.rst:217 msgid "" -"Generate a UUID from a sequence number and the current time according to :" -"rfc:`9562`. This is an alternative to :func:`uuid1` to improve database " -"locality." +"Generate a random UUID in a cryptographically-secure method according to :" +"rfc:`RFC 9562, §5.4 <9562#section-5.4>`." msgstr "" -#: ../../library/uuid.rst:227 +#: ../../library/uuid.rst:223 msgid "" -"When *node* is not specified, :func:`getnode` is used to obtain the hardware " -"address as a 48-bit positive integer. When a sequence number *clock_seq* is " -"not specified, a pseudo-random 14-bit positive integer is generated." +"Generate a UUID based on the SHA-1 hash of a namespace identifier (which is " +"a UUID) and a name (which is a :class:`bytes` object or a string that will " +"be encoded using UTF-8) according to :rfc:`RFC 9562, §5.5 " +"<9562#section-5.5>`." msgstr "" #: ../../library/uuid.rst:231 msgid "" -"If *node* or *clock_seq* exceed their expected bit count, only their least " -"significant bits are kept." +"Generate a UUID from a sequence number and the current time according to :" +"rfc:`RFC 9562, §5.6 <9562#section-5.6>`." msgstr "" -#: ../../library/uuid.rst:239 +#: ../../library/uuid.rst:234 +msgid "This is an alternative to :func:`uuid1` to improve database locality." +msgstr "" + +#: ../../library/uuid.rst:248 msgid "" "Generate a time-based UUID according to :rfc:`RFC 9562, §5.7 " "<9562#section-5.7>`." msgstr "" -#: ../../library/uuid.rst:242 +#: ../../library/uuid.rst:251 msgid "" "For portability across platforms lacking sub-millisecond precision, UUIDs " "produced by this function embed a 48-bit timestamp and use a 42-bit counter " "to guarantee monotonicity within a millisecond." msgstr "" -#: ../../library/uuid.rst:251 +#: ../../library/uuid.rst:260 msgid "" "Generate a pseudo-random UUID according to :rfc:`RFC 9562, §5.8 " "<9562#section-5.8>`." msgstr "" -#: ../../library/uuid.rst:254 +#: ../../library/uuid.rst:263 msgid "" "When specified, the parameters *a*, *b* and *c* are expected to be positive " "integers of 48, 12 and 62 bits respectively. If they exceed their expected " @@ -308,117 +313,124 @@ msgid "" "arguments are substituted for a pseudo-random integer of appropriate size." msgstr "" -#: ../../library/uuid.rst:263 +#: ../../library/uuid.rst:269 +msgid "" +"By default, *a*, *b* and *c* are not generated by a cryptographically secure " +"pseudo-random number generator (CSPRNG). Use :func:`uuid4` when a UUID needs " +"to be used in a security-sensitive context." +msgstr "" + +#: ../../library/uuid.rst:276 msgid "" "The :mod:`uuid` module defines the following namespace identifiers for use " "with :func:`uuid3` or :func:`uuid5`." msgstr "" -#: ../../library/uuid.rst:269 +#: ../../library/uuid.rst:282 msgid "" "When this namespace is specified, the *name* string is a fully qualified " "domain name." msgstr "" -#: ../../library/uuid.rst:275 +#: ../../library/uuid.rst:288 msgid "When this namespace is specified, the *name* string is a URL." msgstr "" -#: ../../library/uuid.rst:280 +#: ../../library/uuid.rst:293 msgid "When this namespace is specified, the *name* string is an ISO OID." msgstr "" -#: ../../library/uuid.rst:285 +#: ../../library/uuid.rst:298 msgid "" "When this namespace is specified, the *name* string is an X.500 DN in DER or " "a text output format." msgstr "" -#: ../../library/uuid.rst:288 +#: ../../library/uuid.rst:301 msgid "" "The :mod:`uuid` module defines the following constants for the possible " "values of the :attr:`~UUID.variant` attribute:" msgstr "" -#: ../../library/uuid.rst:294 +#: ../../library/uuid.rst:307 msgid "Reserved for NCS compatibility." msgstr "" -#: ../../library/uuid.rst:299 +#: ../../library/uuid.rst:312 msgid "" "Specifies the UUID layout given in :rfc:`4122`. This constant is kept for " "backward compatibility even though :rfc:`4122` has been superseded by :rfc:" "`9562`." msgstr "" -#: ../../library/uuid.rst:306 +#: ../../library/uuid.rst:319 msgid "Reserved for Microsoft compatibility." msgstr "" -#: ../../library/uuid.rst:311 +#: ../../library/uuid.rst:324 msgid "Reserved for future definition." msgstr "" -#: ../../library/uuid.rst:314 +#: ../../library/uuid.rst:327 msgid "The :mod:`uuid` module defines the special Nil and Max UUID values:" msgstr "" -#: ../../library/uuid.rst:319 +#: ../../library/uuid.rst:332 msgid "" "A special form of UUID that is specified to have all 128 bits set to zero " "according to :rfc:`RFC 9562, §5.9 <9562#section-5.9>`." msgstr "" -#: ../../library/uuid.rst:327 +#: ../../library/uuid.rst:340 msgid "" "A special form of UUID that is specified to have all 128 bits set to one " "according to :rfc:`RFC 9562, §5.10 <9562#section-5.10>`." msgstr "" -#: ../../library/uuid.rst:335 +#: ../../library/uuid.rst:348 msgid ":rfc:`9562` - A Universally Unique IDentifier (UUID) URN Namespace" msgstr "" -#: ../../library/uuid.rst:336 +#: ../../library/uuid.rst:349 msgid "" "This specification defines a Uniform Resource Name namespace for UUIDs, the " "internal format of UUIDs, and methods of generating UUIDs." msgstr "" -#: ../../library/uuid.rst:343 +#: ../../library/uuid.rst:356 msgid "Command-Line Usage" msgstr "" -#: ../../library/uuid.rst:347 +#: ../../library/uuid.rst:360 msgid "" "The :mod:`uuid` module can be executed as a script from the command line." msgstr "" -#: ../../library/uuid.rst:349 +#: ../../library/uuid.rst:362 msgid "" "python -m uuid [-h] [-u {uuid1,uuid3,uuid4,uuid5,uuid6,uuid7,uuid8}] [-n " "NAMESPACE] [-N NAME]" msgstr "" -#: ../../library/uuid.rst:353 +#: ../../library/uuid.rst:366 msgid "The following options are accepted:" msgstr "" -#: ../../library/uuid.rst:359 +#: ../../library/uuid.rst:372 msgid "Show the help message and exit." msgstr "" -#: ../../library/uuid.rst:364 +#: ../../library/uuid.rst:377 msgid "" "Specify the function name to use to generate the uuid. By default :func:" "`uuid4` is used." msgstr "" -#: ../../library/uuid.rst:367 +#: ../../library/uuid.rst:380 msgid "Allow generating UUID versions 6, 7 and 8." msgstr "" -#: ../../library/uuid.rst:373 +#: ../../library/uuid.rst:386 msgid "" "The namespace is a ``UUID``, or ``@ns`` where ``ns`` is a well-known " "predefined UUID addressed by namespace name. Such as ``@dns``, ``@url``, " @@ -426,25 +438,25 @@ msgid "" "functions." msgstr "" -#: ../../library/uuid.rst:380 +#: ../../library/uuid.rst:393 msgid "" "The name used as part of generating the uuid. Only required for :func:" "`uuid3` / :func:`uuid5` functions." msgstr "" -#: ../../library/uuid.rst:386 +#: ../../library/uuid.rst:399 msgid "Generate *num* fresh UUIDs." msgstr "" -#: ../../library/uuid.rst:394 +#: ../../library/uuid.rst:407 msgid "Example" msgstr "" -#: ../../library/uuid.rst:396 +#: ../../library/uuid.rst:409 msgid "Here are some examples of typical usage of the :mod:`uuid` module::" msgstr "" -#: ../../library/uuid.rst:398 +#: ../../library/uuid.rst:411 msgid "" ">>> import uuid\n" "\n" @@ -497,17 +509,17 @@ msgid "" "datetime.datetime(...)" msgstr "" -#: ../../library/uuid.rst:452 +#: ../../library/uuid.rst:465 msgid "Command-Line Example" msgstr "" -#: ../../library/uuid.rst:454 +#: ../../library/uuid.rst:467 msgid "" "Here are some examples of typical usage of the :mod:`uuid` command-line " "interface:" msgstr "" -#: ../../library/uuid.rst:456 +#: ../../library/uuid.rst:469 msgid "" "# generate a random UUID - by default uuid4() is used\n" "$ python -m uuid\n" diff --git a/library/venv.po b/library/venv.po index b046bf030..6543d7333 100644 --- a/library/venv.po +++ b/library/venv.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:17+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/warnings.po b/library/warnings.po index c6aff6587..d71b892f7 100644 --- a/library/warnings.po +++ b/library/warnings.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:17+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/wave.po b/library/wave.po index c742834d3..bacbc3126 100644 --- a/library/wave.po +++ b/library/wave.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:17+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/weakref.po b/library/weakref.po index 1c96c552b..04820dfc0 100644 --- a/library/weakref.po +++ b/library/weakref.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:17+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/webbrowser.po b/library/webbrowser.po index bb38d6fc2..7129b39ef 100644 --- a/library/webbrowser.po +++ b/library/webbrowser.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:17+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/windows.po b/library/windows.po index 298b7c005..aa0f49982 100644 --- a/library/windows.po +++ b/library/windows.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:17+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/winreg.po b/library/winreg.po index c7da002e2..22614a000 100644 --- a/library/winreg.po +++ b/library/winreg.po @@ -6,15 +6,17 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Parham Forati, 2025 +# Rafael Fontenelle , 2025 +# Gigahertz ., 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:17+0000\n" -"Last-Translator: Parham Forati, 2025\n" +"Last-Translator: Gigahertz ., 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/winsound.po b/library/winsound.po index 074a9eddc..92f61bc75 100644 --- a/library/winsound.po +++ b/library/winsound.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:17+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/wsgiref.po b/library/wsgiref.po index 3de9e6cce..a12634bc5 100644 --- a/library/wsgiref.po +++ b/library/wsgiref.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:17+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/xdrlib.po b/library/xdrlib.po index c341deb95..0f5eabf11 100644 --- a/library/xdrlib.po +++ b/library/xdrlib.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-11-19 01:03+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/xml.dom.minidom.po b/library/xml.dom.minidom.po index c773658c6..aa2cbe16e 100644 --- a/library/xml.dom.minidom.po +++ b/library/xml.dom.minidom.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:18+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -41,18 +42,17 @@ msgstr "" #: ../../library/xml.dom.minidom.rst:24 msgid "" -"The :mod:`xml.dom.minidom` module is not secure against maliciously " -"constructed data. If you need to parse untrusted or unauthenticated data " -"see :ref:`xml-vulnerabilities`." +"If you need to parse untrusted or unauthenticated data, see :ref:`xml-" +"security`." msgstr "" -#: ../../library/xml.dom.minidom.rst:29 +#: ../../library/xml.dom.minidom.rst:28 msgid "" "DOM applications typically start by parsing some XML into a DOM. With :mod:" "`xml.dom.minidom`, this is done through the parse functions::" msgstr "" -#: ../../library/xml.dom.minidom.rst:32 +#: ../../library/xml.dom.minidom.rst:31 msgid "" "from xml.dom.minidom import parse, parseString\n" "\n" @@ -64,12 +64,12 @@ msgid "" "dom3 = parseString('Some data some more data')" msgstr "" -#: ../../library/xml.dom.minidom.rst:41 +#: ../../library/xml.dom.minidom.rst:40 msgid "" "The :func:`parse` function can take either a filename or an open file object." msgstr "" -#: ../../library/xml.dom.minidom.rst:46 +#: ../../library/xml.dom.minidom.rst:45 msgid "" "Return a :class:`Document` from the given input. *filename_or_file* may be " "either a file name, or a file-like object. *parser*, if given, must be a " @@ -78,26 +78,26 @@ msgid "" "setting an entity resolver) must have been done in advance." msgstr "" -#: ../../library/xml.dom.minidom.rst:52 +#: ../../library/xml.dom.minidom.rst:51 msgid "" "If you have XML in a string, you can use the :func:`parseString` function " "instead:" msgstr "" -#: ../../library/xml.dom.minidom.rst:58 +#: ../../library/xml.dom.minidom.rst:57 msgid "" "Return a :class:`Document` that represents the *string*. This method creates " "an :class:`io.StringIO` object for the string and passes that on to :func:" "`parse`." msgstr "" -#: ../../library/xml.dom.minidom.rst:61 +#: ../../library/xml.dom.minidom.rst:60 msgid "" "Both functions return a :class:`Document` object representing the content of " "the document." msgstr "" -#: ../../library/xml.dom.minidom.rst:64 +#: ../../library/xml.dom.minidom.rst:63 msgid "" "What the :func:`parse` and :func:`parseString` functions do is connect an " "XML parser with a \"DOM builder\" that can accept parse events from any SAX " @@ -108,7 +108,7 @@ msgid "" "themselves." msgstr "" -#: ../../library/xml.dom.minidom.rst:71 +#: ../../library/xml.dom.minidom.rst:70 msgid "" "You can also create a :class:`Document` by calling a method on a \"DOM " "Implementation\" object. You can get this object either by calling the :" @@ -117,7 +117,7 @@ msgid "" "add child nodes to it to populate the DOM::" msgstr "" -#: ../../library/xml.dom.minidom.rst:77 +#: ../../library/xml.dom.minidom.rst:76 msgid "" "from xml.dom.minidom import getDOMImplementation\n" "\n" @@ -129,7 +129,7 @@ msgid "" "top_element.appendChild(text)" msgstr "" -#: ../../library/xml.dom.minidom.rst:86 +#: ../../library/xml.dom.minidom.rst:85 msgid "" "Once you have a DOM document object, you can access the parts of your XML " "document through its properties and methods. These properties are defined " @@ -138,13 +138,13 @@ msgid "" "document: the one that holds all others. Here is an example program::" msgstr "" -#: ../../library/xml.dom.minidom.rst:92 +#: ../../library/xml.dom.minidom.rst:91 msgid "" "dom3 = parseString(\"Some data\")\n" "assert dom3.documentElement.tagName == \"myxml\"" msgstr "" -#: ../../library/xml.dom.minidom.rst:95 +#: ../../library/xml.dom.minidom.rst:94 msgid "" "When you are finished with a DOM tree, you may optionally call the :meth:" "`unlink` method to encourage early cleanup of the now-unneeded objects. :" @@ -154,28 +154,28 @@ msgid "" "objects in the tree." msgstr "" -#: ../../library/xml.dom.minidom.rst:104 +#: ../../library/xml.dom.minidom.rst:103 msgid "" "`Document Object Model (DOM) Level 1 Specification `_" msgstr "" -#: ../../library/xml.dom.minidom.rst:105 +#: ../../library/xml.dom.minidom.rst:104 msgid "The W3C recommendation for the DOM supported by :mod:`xml.dom.minidom`." msgstr "" -#: ../../library/xml.dom.minidom.rst:111 +#: ../../library/xml.dom.minidom.rst:110 msgid "DOM Objects" msgstr "" -#: ../../library/xml.dom.minidom.rst:113 +#: ../../library/xml.dom.minidom.rst:112 msgid "" "The definition of the DOM API for Python is given as part of the :mod:`xml." "dom` module documentation. This section lists the differences between the " "API and :mod:`xml.dom.minidom`." msgstr "" -#: ../../library/xml.dom.minidom.rst:120 +#: ../../library/xml.dom.minidom.rst:119 msgid "" "Break internal references within the DOM so that it will be garbage " "collected on versions of Python without cyclic GC. Even when cyclic GC is " @@ -185,20 +185,20 @@ msgid "" "may be called on child nodes to discard children of that node." msgstr "" -#: ../../library/xml.dom.minidom.rst:127 +#: ../../library/xml.dom.minidom.rst:126 msgid "" "You can avoid calling this method explicitly by using the :keyword:`with` " "statement. The following code will automatically unlink *dom* when the :" "keyword:`!with` block is exited::" msgstr "" -#: ../../library/xml.dom.minidom.rst:131 +#: ../../library/xml.dom.minidom.rst:130 msgid "" "with xml.dom.minidom.parse(datasource) as dom:\n" " ... # Work with dom." msgstr "" -#: ../../library/xml.dom.minidom.rst:138 +#: ../../library/xml.dom.minidom.rst:137 msgid "" "Write XML to the writer object. The writer receives texts but not bytes as " "input, it should have a :meth:`write` method which matches that of the file " @@ -208,13 +208,13 @@ msgid "" "use to terminate newlines." msgstr "" -#: ../../library/xml.dom.minidom.rst:145 +#: ../../library/xml.dom.minidom.rst:144 msgid "" "For the :class:`Document` node, an additional keyword argument *encoding* " "can be used to specify the encoding field of the XML header." msgstr "" -#: ../../library/xml.dom.minidom.rst:148 +#: ../../library/xml.dom.minidom.rst:147 msgid "" "Similarly, explicitly stating the *standalone* argument causes the " "standalone document declarations to be added to the prologue of the XML " @@ -223,24 +223,24 @@ msgid "" "declaration from the document." msgstr "" -#: ../../library/xml.dom.minidom.rst:155 +#: ../../library/xml.dom.minidom.rst:154 msgid "" "The :meth:`writexml` method now preserves the attribute order specified by " "the user." msgstr "" -#: ../../library/xml.dom.minidom.rst:159 ../../library/xml.dom.minidom.rst:180 -#: ../../library/xml.dom.minidom.rst:199 +#: ../../library/xml.dom.minidom.rst:158 ../../library/xml.dom.minidom.rst:179 +#: ../../library/xml.dom.minidom.rst:198 msgid "The *standalone* parameter was added." msgstr "" -#: ../../library/xml.dom.minidom.rst:164 +#: ../../library/xml.dom.minidom.rst:163 msgid "" "Return a string or byte string containing the XML represented by the DOM " "node." msgstr "" -#: ../../library/xml.dom.minidom.rst:167 +#: ../../library/xml.dom.minidom.rst:166 msgid "" "With an explicit *encoding* [1]_ argument, the result is a byte string in " "the specified encoding. With no *encoding* argument, the result is a Unicode " @@ -249,47 +249,47 @@ msgid "" "incorrect, since UTF-8 is the default encoding of XML." msgstr "" -#: ../../library/xml.dom.minidom.rst:174 ../../library/xml.dom.minidom.rst:193 +#: ../../library/xml.dom.minidom.rst:173 ../../library/xml.dom.minidom.rst:192 msgid "The *standalone* argument behaves exactly as in :meth:`writexml`." msgstr "" -#: ../../library/xml.dom.minidom.rst:176 +#: ../../library/xml.dom.minidom.rst:175 msgid "" "The :meth:`toxml` method now preserves the attribute order specified by the " "user." msgstr "" -#: ../../library/xml.dom.minidom.rst:186 +#: ../../library/xml.dom.minidom.rst:185 msgid "" "Return a pretty-printed version of the document. *indent* specifies the " "indentation string and defaults to a tabulator; *newl* specifies the string " "emitted at the end of each line and defaults to ``\\n``." msgstr "" -#: ../../library/xml.dom.minidom.rst:190 +#: ../../library/xml.dom.minidom.rst:189 msgid "" "The *encoding* argument behaves like the corresponding argument of :meth:" "`toxml`." msgstr "" -#: ../../library/xml.dom.minidom.rst:195 +#: ../../library/xml.dom.minidom.rst:194 msgid "" "The :meth:`toprettyxml` method now preserves the attribute order specified " "by the user." msgstr "" -#: ../../library/xml.dom.minidom.rst:205 +#: ../../library/xml.dom.minidom.rst:204 msgid "DOM Example" msgstr "" -#: ../../library/xml.dom.minidom.rst:207 +#: ../../library/xml.dom.minidom.rst:206 msgid "" "This example program is a fairly realistic example of a simple program. In " "this particular case, we do not take much advantage of the flexibility of " "the DOM." msgstr "" -#: ../../library/xml.dom.minidom.rst:210 +#: ../../library/xml.dom.minidom.rst:209 msgid "" "import xml.dom.minidom\n" "\n" @@ -357,23 +357,23 @@ msgid "" "handleSlideshow(dom)\n" msgstr "" -#: ../../library/xml.dom.minidom.rst:216 +#: ../../library/xml.dom.minidom.rst:215 msgid "minidom and the DOM standard" msgstr "" -#: ../../library/xml.dom.minidom.rst:218 +#: ../../library/xml.dom.minidom.rst:217 msgid "" "The :mod:`xml.dom.minidom` module is essentially a DOM 1.0-compatible DOM " "with some DOM 2 features (primarily namespace features)." msgstr "" -#: ../../library/xml.dom.minidom.rst:221 +#: ../../library/xml.dom.minidom.rst:220 msgid "" "Usage of the DOM interface in Python is straight-forward. The following " "mapping rules apply:" msgstr "" -#: ../../library/xml.dom.minidom.rst:224 +#: ../../library/xml.dom.minidom.rst:223 msgid "" "Interfaces are accessed through instance objects. Applications should not " "instantiate the classes themselves; they should use the creator functions " @@ -382,14 +382,14 @@ msgid "" "operations." msgstr "" -#: ../../library/xml.dom.minidom.rst:229 +#: ../../library/xml.dom.minidom.rst:228 msgid "" "Operations are used as methods. Since the DOM uses only :keyword:`in` " "parameters, the arguments are passed in normal order (from left to right). " "There are no optional arguments. ``void`` operations return ``None``." msgstr "" -#: ../../library/xml.dom.minidom.rst:233 +#: ../../library/xml.dom.minidom.rst:232 msgid "" "IDL attributes map to instance attributes. For compatibility with the OMG " "IDL language mapping for Python, an attribute ``foo`` can also be accessed " @@ -397,13 +397,13 @@ msgid "" "``readonly`` attributes must not be changed; this is not enforced at runtime." msgstr "" -#: ../../library/xml.dom.minidom.rst:238 +#: ../../library/xml.dom.minidom.rst:237 msgid "" "The types ``short int``, ``unsigned int``, ``unsigned long long``, and " "``boolean`` all map to Python integer objects." msgstr "" -#: ../../library/xml.dom.minidom.rst:241 +#: ../../library/xml.dom.minidom.rst:240 msgid "" "The type ``DOMString`` maps to Python strings. :mod:`xml.dom.minidom` " "supports either bytes or strings, but will normally produce strings. Values " @@ -411,21 +411,21 @@ msgid "" "``null`` value by the DOM specification from the W3C." msgstr "" -#: ../../library/xml.dom.minidom.rst:246 +#: ../../library/xml.dom.minidom.rst:245 msgid "" "``const`` declarations map to variables in their respective scope (e.g. " "``xml.dom.minidom.Node.PROCESSING_INSTRUCTION_NODE``); they must not be " "changed." msgstr "" -#: ../../library/xml.dom.minidom.rst:249 +#: ../../library/xml.dom.minidom.rst:248 msgid "" "``DOMException`` is currently not supported in :mod:`xml.dom.minidom`. " "Instead, :mod:`xml.dom.minidom` uses standard Python exceptions such as :exc:" "`TypeError` and :exc:`AttributeError`." msgstr "" -#: ../../library/xml.dom.minidom.rst:253 +#: ../../library/xml.dom.minidom.rst:252 msgid "" ":class:`NodeList` objects are implemented using Python's built-in list type. " "These objects provide the interface defined in the DOM specification, but " @@ -434,30 +434,30 @@ msgid "" "recommendations." msgstr "" -#: ../../library/xml.dom.minidom.rst:259 +#: ../../library/xml.dom.minidom.rst:258 msgid "" "The following interfaces have no implementation in :mod:`xml.dom.minidom`:" msgstr "" -#: ../../library/xml.dom.minidom.rst:261 +#: ../../library/xml.dom.minidom.rst:260 msgid ":class:`DOMTimeStamp`" msgstr "" -#: ../../library/xml.dom.minidom.rst:263 +#: ../../library/xml.dom.minidom.rst:262 msgid ":class:`EntityReference`" msgstr "" -#: ../../library/xml.dom.minidom.rst:265 +#: ../../library/xml.dom.minidom.rst:264 msgid "" "Most of these reflect information in the XML document that is not of general " "utility to most DOM users." msgstr "" -#: ../../library/xml.dom.minidom.rst:269 +#: ../../library/xml.dom.minidom.rst:268 msgid "Footnotes" msgstr "" -#: ../../library/xml.dom.minidom.rst:270 +#: ../../library/xml.dom.minidom.rst:269 msgid "" "The encoding name included in the XML output should conform to the " "appropriate standards. For example, \"UTF-8\" is valid, but \"UTF8\" is not " diff --git a/library/xml.dom.po b/library/xml.dom.po index 335ede174..242b4e016 100644 --- a/library/xml.dom.po +++ b/library/xml.dom.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:18+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/xml.dom.pulldom.po b/library/xml.dom.pulldom.po index 37a198a26..45d31a44f 100644 --- a/library/xml.dom.pulldom.po +++ b/library/xml.dom.pulldom.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:18+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -44,19 +45,18 @@ msgstr "" #: ../../library/xml.dom.pulldom.rst:24 msgid "" -"The :mod:`xml.dom.pulldom` module is not secure against maliciously " -"constructed data. If you need to parse untrusted or unauthenticated data " -"see :ref:`xml-vulnerabilities`." +"If you need to parse untrusted or unauthenticated data, see :ref:`xml-" +"security`." msgstr "" -#: ../../library/xml.dom.pulldom.rst:30 +#: ../../library/xml.dom.pulldom.rst:29 msgid "" "The SAX parser no longer processes general external entities by default to " "increase security by default. To enable processing of external entities, " "pass a custom parser instance in::" msgstr "" -#: ../../library/xml.dom.pulldom.rst:34 +#: ../../library/xml.dom.pulldom.rst:33 msgid "" "from xml.dom.pulldom import parse\n" "from xml.sax import make_parser\n" @@ -67,11 +67,11 @@ msgid "" "parse(filename, parser=parser)" msgstr "" -#: ../../library/xml.dom.pulldom.rst:43 +#: ../../library/xml.dom.pulldom.rst:42 msgid "Example::" msgstr "" -#: ../../library/xml.dom.pulldom.rst:45 +#: ../../library/xml.dom.pulldom.rst:44 msgid "" "from xml.dom import pulldom\n" "\n" @@ -83,49 +83,49 @@ msgid "" " print(node.toxml())" msgstr "" -#: ../../library/xml.dom.pulldom.rst:54 +#: ../../library/xml.dom.pulldom.rst:53 msgid "``event`` is a constant and can be one of:" msgstr "" -#: ../../library/xml.dom.pulldom.rst:56 +#: ../../library/xml.dom.pulldom.rst:55 msgid ":data:`START_ELEMENT`" msgstr "" -#: ../../library/xml.dom.pulldom.rst:57 +#: ../../library/xml.dom.pulldom.rst:56 msgid ":data:`END_ELEMENT`" msgstr "" -#: ../../library/xml.dom.pulldom.rst:58 +#: ../../library/xml.dom.pulldom.rst:57 msgid ":data:`COMMENT`" msgstr "" -#: ../../library/xml.dom.pulldom.rst:59 +#: ../../library/xml.dom.pulldom.rst:58 msgid ":data:`START_DOCUMENT`" msgstr "" -#: ../../library/xml.dom.pulldom.rst:60 +#: ../../library/xml.dom.pulldom.rst:59 msgid ":data:`END_DOCUMENT`" msgstr "" -#: ../../library/xml.dom.pulldom.rst:61 +#: ../../library/xml.dom.pulldom.rst:60 msgid ":data:`CHARACTERS`" msgstr "" -#: ../../library/xml.dom.pulldom.rst:62 +#: ../../library/xml.dom.pulldom.rst:61 msgid ":data:`PROCESSING_INSTRUCTION`" msgstr "" -#: ../../library/xml.dom.pulldom.rst:63 +#: ../../library/xml.dom.pulldom.rst:62 msgid ":data:`IGNORABLE_WHITESPACE`" msgstr "" -#: ../../library/xml.dom.pulldom.rst:65 +#: ../../library/xml.dom.pulldom.rst:64 msgid "" "``node`` is an object of type :class:`xml.dom.minidom.Document`, :class:`xml." "dom.minidom.Element` or :class:`xml.dom.minidom.Text`." msgstr "" -#: ../../library/xml.dom.pulldom.rst:68 +#: ../../library/xml.dom.pulldom.rst:67 msgid "" "Since the document is treated as a \"flat\" stream of events, the document " "\"tree\" is implicitly traversed and the desired elements are found " @@ -137,11 +137,11 @@ msgid "" "`DOMEventStream.expandNode` method and switch to DOM-related processing." msgstr "" -#: ../../library/xml.dom.pulldom.rst:80 ../../library/xml.dom.pulldom.rst:85 +#: ../../library/xml.dom.pulldom.rst:79 ../../library/xml.dom.pulldom.rst:84 msgid "Subclass of :class:`xml.sax.handler.ContentHandler`." msgstr "" -#: ../../library/xml.dom.pulldom.rst:90 +#: ../../library/xml.dom.pulldom.rst:89 msgid "" "Return a :class:`DOMEventStream` from the given input. *stream_or_string* " "may be either a file name, or a file-like object. *parser*, if given, must " @@ -151,36 +151,36 @@ msgid "" "done in advance." msgstr "" -#: ../../library/xml.dom.pulldom.rst:97 +#: ../../library/xml.dom.pulldom.rst:96 msgid "" "If you have XML in a string, you can use the :func:`parseString` function " "instead:" msgstr "" -#: ../../library/xml.dom.pulldom.rst:101 +#: ../../library/xml.dom.pulldom.rst:100 msgid "" "Return a :class:`DOMEventStream` that represents the (Unicode) *string*." msgstr "" -#: ../../library/xml.dom.pulldom.rst:105 +#: ../../library/xml.dom.pulldom.rst:104 msgid "Default value for the *bufsize* parameter to :func:`parse`." msgstr "" -#: ../../library/xml.dom.pulldom.rst:107 +#: ../../library/xml.dom.pulldom.rst:106 msgid "" "The value of this variable can be changed before calling :func:`parse` and " "the new value will take effect." msgstr "" -#: ../../library/xml.dom.pulldom.rst:113 +#: ../../library/xml.dom.pulldom.rst:112 msgid "DOMEventStream Objects" msgstr "" -#: ../../library/xml.dom.pulldom.rst:117 +#: ../../library/xml.dom.pulldom.rst:116 msgid "Support for :meth:`~object.__getitem__` method has been removed." msgstr "" -#: ../../library/xml.dom.pulldom.rst:122 +#: ../../library/xml.dom.pulldom.rst:121 msgid "" "Return a tuple containing *event* and the current *node* as :class:`xml.dom." "minidom.Document` if event equals :data:`START_DOCUMENT`, :class:`xml.dom." @@ -190,11 +190,11 @@ msgid "" "children, unless :func:`expandNode` is called." msgstr "" -#: ../../library/xml.dom.pulldom.rst:132 +#: ../../library/xml.dom.pulldom.rst:131 msgid "Expands all children of *node* into *node*. Example::" msgstr "" -#: ../../library/xml.dom.pulldom.rst:134 +#: ../../library/xml.dom.pulldom.rst:133 msgid "" "from xml.dom import pulldom\n" "\n" diff --git a/library/xml.etree.elementtree.po b/library/xml.etree.elementtree.po index 85c07a433..e723502fc 100644 --- a/library/xml.etree.elementtree.po +++ b/library/xml.etree.elementtree.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:18+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -47,27 +48,26 @@ msgstr "" #: ../../library/xml.etree.elementtree.rst:25 msgid "" -"The :mod:`xml.etree.ElementTree` module is not secure against maliciously " -"constructed data. If you need to parse untrusted or unauthenticated data " -"see :ref:`xml-vulnerabilities`." +"If you need to parse untrusted or unauthenticated data, see :ref:`xml-" +"security`." msgstr "" -#: ../../library/xml.etree.elementtree.rst:30 +#: ../../library/xml.etree.elementtree.rst:29 msgid "Tutorial" msgstr "" -#: ../../library/xml.etree.elementtree.rst:32 +#: ../../library/xml.etree.elementtree.rst:31 msgid "" "This is a short tutorial for using :mod:`xml.etree.ElementTree` (``ET`` in " "short). The goal is to demonstrate some of the building blocks and basic " "concepts of the module." msgstr "" -#: ../../library/xml.etree.elementtree.rst:37 +#: ../../library/xml.etree.elementtree.rst:36 msgid "XML tree and elements" msgstr "" -#: ../../library/xml.etree.elementtree.rst:39 +#: ../../library/xml.etree.elementtree.rst:38 msgid "" "XML is an inherently hierarchical data format, and the most natural way to " "represent it is with a tree. ``ET`` has two classes for this purpose - :" @@ -78,17 +78,17 @@ msgid "" "sub-elements are done on the :class:`Element` level." msgstr "" -#: ../../library/xml.etree.elementtree.rst:50 +#: ../../library/xml.etree.elementtree.rst:49 msgid "Parsing XML" msgstr "" -#: ../../library/xml.etree.elementtree.rst:52 +#: ../../library/xml.etree.elementtree.rst:51 msgid "" "We'll be using the fictive :file:`country_data.xml` XML document as the " "sample data for this section:" msgstr "" -#: ../../library/xml.etree.elementtree.rst:54 +#: ../../library/xml.etree.elementtree.rst:53 msgid "" "\n" "\n" @@ -115,26 +115,26 @@ msgid "" "" msgstr "" -#: ../../library/xml.etree.elementtree.rst:80 +#: ../../library/xml.etree.elementtree.rst:79 msgid "We can import this data by reading from a file::" msgstr "" -#: ../../library/xml.etree.elementtree.rst:82 +#: ../../library/xml.etree.elementtree.rst:81 msgid "" "import xml.etree.ElementTree as ET\n" "tree = ET.parse('country_data.xml')\n" "root = tree.getroot()" msgstr "" -#: ../../library/xml.etree.elementtree.rst:86 +#: ../../library/xml.etree.elementtree.rst:85 msgid "Or directly from a string::" msgstr "" -#: ../../library/xml.etree.elementtree.rst:88 +#: ../../library/xml.etree.elementtree.rst:87 msgid "root = ET.fromstring(country_data_as_string)" msgstr "" -#: ../../library/xml.etree.elementtree.rst:90 +#: ../../library/xml.etree.elementtree.rst:89 msgid "" ":func:`fromstring` parses XML from a string directly into an :class:" "`Element`, which is the root element of the parsed tree. Other parsing " @@ -142,12 +142,12 @@ msgid "" "sure." msgstr "" -#: ../../library/xml.etree.elementtree.rst:94 +#: ../../library/xml.etree.elementtree.rst:93 msgid "" "As an :class:`Element`, ``root`` has a tag and a dictionary of attributes::" msgstr "" -#: ../../library/xml.etree.elementtree.rst:96 +#: ../../library/xml.etree.elementtree.rst:95 msgid "" ">>> root.tag\n" "'data'\n" @@ -155,11 +155,11 @@ msgid "" "{}" msgstr "" -#: ../../library/xml.etree.elementtree.rst:101 +#: ../../library/xml.etree.elementtree.rst:100 msgid "It also has children nodes over which we can iterate::" msgstr "" -#: ../../library/xml.etree.elementtree.rst:103 +#: ../../library/xml.etree.elementtree.rst:102 msgid "" ">>> for child in root:\n" "... print(child.tag, child.attrib)\n" @@ -169,17 +169,17 @@ msgid "" "country {'name': 'Panama'}" msgstr "" -#: ../../library/xml.etree.elementtree.rst:110 +#: ../../library/xml.etree.elementtree.rst:109 msgid "Children are nested, and we can access specific child nodes by index::" msgstr "" -#: ../../library/xml.etree.elementtree.rst:112 +#: ../../library/xml.etree.elementtree.rst:111 msgid "" ">>> root[0][1].text\n" "'2008'" msgstr "" -#: ../../library/xml.etree.elementtree.rst:118 +#: ../../library/xml.etree.elementtree.rst:117 msgid "" "Not all elements of the XML input will end up as elements of the parsed " "tree. Currently, this module skips over any XML comments, processing " @@ -191,11 +191,11 @@ msgid "" "constructor." msgstr "" -#: ../../library/xml.etree.elementtree.rst:132 +#: ../../library/xml.etree.elementtree.rst:131 msgid "Pull API for non-blocking parsing" msgstr "" -#: ../../library/xml.etree.elementtree.rst:134 +#: ../../library/xml.etree.elementtree.rst:133 msgid "" "Most parsing functions provided by this module require the whole document to " "be read at once before returning any result. It is possible to use an :" @@ -206,7 +206,7 @@ msgid "" "the convenience of fully constructed :class:`Element` objects." msgstr "" -#: ../../library/xml.etree.elementtree.rst:142 +#: ../../library/xml.etree.elementtree.rst:141 msgid "" "The most powerful tool for doing this is :class:`XMLPullParser`. It does " "not require a blocking read to obtain the XML data, and is instead fed with " @@ -214,7 +214,7 @@ msgid "" "XML elements, call :meth:`XMLPullParser.read_events`. Here is an example::" msgstr "" -#: ../../library/xml.etree.elementtree.rst:147 +#: ../../library/xml.etree.elementtree.rst:146 msgid "" ">>> parser = ET.XMLPullParser(['start', 'end'])\n" ">>> parser.feed('sometext')\n" @@ -229,14 +229,14 @@ msgid "" "mytag text= sometext more text" msgstr "" -#: ../../library/xml.etree.elementtree.rst:159 +#: ../../library/xml.etree.elementtree.rst:158 msgid "" "The obvious use case is applications that operate in a non-blocking fashion " "where the XML data is being received from a socket or read incrementally " "from some storage device. In such cases, blocking reads are unacceptable." msgstr "" -#: ../../library/xml.etree.elementtree.rst:163 +#: ../../library/xml.etree.elementtree.rst:162 msgid "" "Because it's so flexible, :class:`XMLPullParser` can be inconvenient to use " "for simpler use-cases. If you don't mind your application blocking on " @@ -246,25 +246,25 @@ msgid "" "memory." msgstr "" -#: ../../library/xml.etree.elementtree.rst:169 +#: ../../library/xml.etree.elementtree.rst:168 msgid "" "Where *immediate* feedback through events is wanted, calling method :meth:" "`XMLPullParser.flush` can help reduce delay; please make sure to study the " "related security notes." msgstr "" -#: ../../library/xml.etree.elementtree.rst:175 +#: ../../library/xml.etree.elementtree.rst:174 msgid "Finding interesting elements" msgstr "" -#: ../../library/xml.etree.elementtree.rst:177 +#: ../../library/xml.etree.elementtree.rst:176 msgid "" ":class:`Element` has some useful methods that help iterate recursively over " "all the sub-tree below it (its children, their children, and so on). For " "example, :meth:`Element.iter`::" msgstr "" -#: ../../library/xml.etree.elementtree.rst:181 +#: ../../library/xml.etree.elementtree.rst:180 msgid "" ">>> for neighbor in root.iter('neighbor'):\n" "... print(neighbor.attrib)\n" @@ -276,7 +276,7 @@ msgid "" "{'name': 'Colombia', 'direction': 'E'}" msgstr "" -#: ../../library/xml.etree.elementtree.rst:190 +#: ../../library/xml.etree.elementtree.rst:189 msgid "" ":meth:`Element.findall` finds only elements with a tag which are direct " "children of the current element. :meth:`Element.find` finds the *first* " @@ -284,7 +284,7 @@ msgid "" "text content. :meth:`Element.get` accesses the element's attributes::" msgstr "" -#: ../../library/xml.etree.elementtree.rst:195 +#: ../../library/xml.etree.elementtree.rst:194 msgid "" ">>> for country in root.findall('country'):\n" "... rank = country.find('rank').text\n" @@ -296,23 +296,23 @@ msgid "" "Panama 68" msgstr "" -#: ../../library/xml.etree.elementtree.rst:204 +#: ../../library/xml.etree.elementtree.rst:203 msgid "" "More sophisticated specification of which elements to look for is possible " "by using :ref:`XPath `." msgstr "" -#: ../../library/xml.etree.elementtree.rst:208 +#: ../../library/xml.etree.elementtree.rst:207 msgid "Modifying an XML File" msgstr "" -#: ../../library/xml.etree.elementtree.rst:210 +#: ../../library/xml.etree.elementtree.rst:209 msgid "" ":class:`ElementTree` provides a simple way to build XML documents and write " "them to files. The :meth:`ElementTree.write` method serves this purpose." msgstr "" -#: ../../library/xml.etree.elementtree.rst:213 +#: ../../library/xml.etree.elementtree.rst:212 msgid "" "Once created, an :class:`Element` object may be manipulated by directly " "changing its fields (such as :attr:`Element.text`), adding and modifying " @@ -320,13 +320,13 @@ msgid "" "example with :meth:`Element.append`)." msgstr "" -#: ../../library/xml.etree.elementtree.rst:218 +#: ../../library/xml.etree.elementtree.rst:217 msgid "" "Let's say we want to add one to each country's rank, and add an ``updated`` " "attribute to the rank element::" msgstr "" -#: ../../library/xml.etree.elementtree.rst:221 +#: ../../library/xml.etree.elementtree.rst:220 msgid "" ">>> for rank in root.iter('rank'):\n" "... new_rank = int(rank.text) + 1\n" @@ -336,12 +336,12 @@ msgid "" ">>> tree.write('output.xml')" msgstr "" -#: ../../library/xml.etree.elementtree.rst:228 -#: ../../library/xml.etree.elementtree.rst:272 +#: ../../library/xml.etree.elementtree.rst:227 +#: ../../library/xml.etree.elementtree.rst:271 msgid "Our XML now looks like this:" msgstr "" -#: ../../library/xml.etree.elementtree.rst:230 +#: ../../library/xml.etree.elementtree.rst:229 msgid "" "\n" "\n" @@ -368,13 +368,13 @@ msgid "" "" msgstr "" -#: ../../library/xml.etree.elementtree.rst:256 +#: ../../library/xml.etree.elementtree.rst:255 msgid "" "We can remove elements using :meth:`Element.remove`. Let's say we want to " "remove all countries with a rank higher than 50::" msgstr "" -#: ../../library/xml.etree.elementtree.rst:259 +#: ../../library/xml.etree.elementtree.rst:258 msgid "" ">>> for country in root.findall('country'):\n" "... # using root.findall() to avoid removal during traversal\n" @@ -385,7 +385,7 @@ msgid "" ">>> tree.write('output.xml')" msgstr "" -#: ../../library/xml.etree.elementtree.rst:267 +#: ../../library/xml.etree.elementtree.rst:266 msgid "" "Note that concurrent modification while iterating can lead to problems, just " "like when iterating and modifying Python lists or dicts. Therefore, the " @@ -393,7 +393,7 @@ msgid "" "only then iterates over the list of matches." msgstr "" -#: ../../library/xml.etree.elementtree.rst:274 +#: ../../library/xml.etree.elementtree.rst:273 msgid "" "\n" "\n" @@ -413,17 +413,17 @@ msgid "" "" msgstr "" -#: ../../library/xml.etree.elementtree.rst:294 +#: ../../library/xml.etree.elementtree.rst:293 msgid "Building XML documents" msgstr "" -#: ../../library/xml.etree.elementtree.rst:296 +#: ../../library/xml.etree.elementtree.rst:295 msgid "" "The :func:`SubElement` function also provides a convenient way to create new " "sub-elements for a given element::" msgstr "" -#: ../../library/xml.etree.elementtree.rst:299 +#: ../../library/xml.etree.elementtree.rst:298 msgid "" ">>> a = ET.Element('a')\n" ">>> b = ET.SubElement(a, 'b')\n" @@ -433,11 +433,11 @@ msgid "" "" msgstr "" -#: ../../library/xml.etree.elementtree.rst:307 +#: ../../library/xml.etree.elementtree.rst:306 msgid "Parsing XML with Namespaces" msgstr "" -#: ../../library/xml.etree.elementtree.rst:309 +#: ../../library/xml.etree.elementtree.rst:308 msgid "" "If the XML input has `namespaces `__, tags and attributes with prefixes in the form ``prefix:" @@ -447,13 +447,13 @@ msgid "" "prefixed tags." msgstr "" -#: ../../library/xml.etree.elementtree.rst:317 +#: ../../library/xml.etree.elementtree.rst:316 msgid "" "Here is an XML example that incorporates two namespaces, one with the prefix " "\"fictional\" and the other serving as the default namespace:" msgstr "" -#: ../../library/xml.etree.elementtree.rst:320 +#: ../../library/xml.etree.elementtree.rst:319 msgid "" "\n" "" msgstr "" -#: ../../library/xml.etree.elementtree.rst:338 +#: ../../library/xml.etree.elementtree.rst:337 msgid "" "One way to search and explore this XML example is to manually add the URI to " "every tag or attribute in the xpath of a :meth:`~Element.find` or :meth:" "`~Element.findall`::" msgstr "" -#: ../../library/xml.etree.elementtree.rst:342 +#: ../../library/xml.etree.elementtree.rst:341 msgid "" "root = fromstring(xml_text)\n" "for actor in root.findall('{http://people.example.com}actor'):\n" @@ -489,13 +489,13 @@ msgid "" " print(' |-->', char.text)" msgstr "" -#: ../../library/xml.etree.elementtree.rst:349 +#: ../../library/xml.etree.elementtree.rst:348 msgid "" "A better way to search the namespaced XML example is to create a dictionary " "with your own prefixes and use those in the search functions::" msgstr "" -#: ../../library/xml.etree.elementtree.rst:352 +#: ../../library/xml.etree.elementtree.rst:351 msgid "" "ns = {'real_person': 'http://people.example.com',\n" " 'role': 'http://characters.example.com'}\n" @@ -507,11 +507,11 @@ msgid "" " print(' |-->', char.text)" msgstr "" -#: ../../library/xml.etree.elementtree.rst:361 +#: ../../library/xml.etree.elementtree.rst:360 msgid "These two approaches both output::" msgstr "" -#: ../../library/xml.etree.elementtree.rst:363 +#: ../../library/xml.etree.elementtree.rst:362 msgid "" "John Cleese\n" " |--> Lancelot\n" @@ -522,11 +522,11 @@ msgid "" " |--> Commander Clement" msgstr "" -#: ../../library/xml.etree.elementtree.rst:375 +#: ../../library/xml.etree.elementtree.rst:374 msgid "XPath support" msgstr "" -#: ../../library/xml.etree.elementtree.rst:377 +#: ../../library/xml.etree.elementtree.rst:376 msgid "" "This module provides limited support for `XPath expressions `_ for locating elements in a tree. The goal is to support a " @@ -534,19 +534,19 @@ msgid "" "scope of the module." msgstr "" -#: ../../library/xml.etree.elementtree.rst:383 -#: ../../library/xml.etree.elementtree.rst:782 +#: ../../library/xml.etree.elementtree.rst:382 +#: ../../library/xml.etree.elementtree.rst:781 msgid "Example" msgstr "" -#: ../../library/xml.etree.elementtree.rst:385 +#: ../../library/xml.etree.elementtree.rst:384 msgid "" "Here's an example that demonstrates some of the XPath capabilities of the " "module. We'll be using the ``countrydata`` XML document from the :ref:" "`Parsing XML ` section::" msgstr "" -#: ../../library/xml.etree.elementtree.rst:389 +#: ../../library/xml.etree.elementtree.rst:388 msgid "" "import xml.etree.ElementTree as ET\n" "\n" @@ -569,35 +569,35 @@ msgid "" "root.findall(\".//neighbor[2]\")" msgstr "" -#: ../../library/xml.etree.elementtree.rst:409 +#: ../../library/xml.etree.elementtree.rst:408 msgid "" "For XML with namespaces, use the usual qualified ``{namespace}tag`` " "notation::" msgstr "" -#: ../../library/xml.etree.elementtree.rst:411 +#: ../../library/xml.etree.elementtree.rst:410 msgid "" "# All dublin-core \"title\" tags in the document\n" "root.findall(\".//{http://purl.org/dc/elements/1.1/}title\")" msgstr "" -#: ../../library/xml.etree.elementtree.rst:416 +#: ../../library/xml.etree.elementtree.rst:415 msgid "Supported XPath syntax" msgstr "" -#: ../../library/xml.etree.elementtree.rst:421 +#: ../../library/xml.etree.elementtree.rst:420 msgid "Syntax" msgstr "" -#: ../../library/xml.etree.elementtree.rst:421 +#: ../../library/xml.etree.elementtree.rst:420 msgid "Meaning" msgstr "" -#: ../../library/xml.etree.elementtree.rst:423 +#: ../../library/xml.etree.elementtree.rst:422 msgid "``tag``" msgstr "" -#: ../../library/xml.etree.elementtree.rst:423 +#: ../../library/xml.etree.elementtree.rst:422 msgid "" "Selects all child elements with the given tag. For example, ``spam`` selects " "all child elements named ``spam``, and ``spam/egg`` selects all " @@ -607,133 +607,133 @@ msgid "" "not in a namespace." msgstr "" -#: ../../library/xml.etree.elementtree.rst:432 +#: ../../library/xml.etree.elementtree.rst:431 msgid "Support for star-wildcards was added." msgstr "" -#: ../../library/xml.etree.elementtree.rst:435 +#: ../../library/xml.etree.elementtree.rst:434 msgid "``*``" msgstr "" -#: ../../library/xml.etree.elementtree.rst:435 +#: ../../library/xml.etree.elementtree.rst:434 msgid "" "Selects all child elements, including comments and processing instructions. " "For example, ``*/egg`` selects all grandchildren named ``egg``." msgstr "" -#: ../../library/xml.etree.elementtree.rst:439 +#: ../../library/xml.etree.elementtree.rst:438 msgid "``.``" msgstr "" -#: ../../library/xml.etree.elementtree.rst:439 +#: ../../library/xml.etree.elementtree.rst:438 msgid "" "Selects the current node. This is mostly useful at the beginning of the " "path, to indicate that it's a relative path." msgstr "" -#: ../../library/xml.etree.elementtree.rst:443 +#: ../../library/xml.etree.elementtree.rst:442 msgid "``//``" msgstr "" -#: ../../library/xml.etree.elementtree.rst:443 +#: ../../library/xml.etree.elementtree.rst:442 msgid "" "Selects all subelements, on all levels beneath the current element. For " "example, ``.//egg`` selects all ``egg`` elements in the entire tree." msgstr "" -#: ../../library/xml.etree.elementtree.rst:447 +#: ../../library/xml.etree.elementtree.rst:446 msgid "``..``" msgstr "" -#: ../../library/xml.etree.elementtree.rst:447 +#: ../../library/xml.etree.elementtree.rst:446 msgid "" "Selects the parent element. Returns ``None`` if the path attempts to reach " "the ancestors of the start element (the element ``find`` was called on)." msgstr "" -#: ../../library/xml.etree.elementtree.rst:451 +#: ../../library/xml.etree.elementtree.rst:450 msgid "``[@attrib]``" msgstr "" -#: ../../library/xml.etree.elementtree.rst:451 +#: ../../library/xml.etree.elementtree.rst:450 msgid "Selects all elements that have the given attribute." msgstr "" -#: ../../library/xml.etree.elementtree.rst:453 +#: ../../library/xml.etree.elementtree.rst:452 msgid "``[@attrib='value']``" msgstr "" -#: ../../library/xml.etree.elementtree.rst:453 +#: ../../library/xml.etree.elementtree.rst:452 msgid "" "Selects all elements for which the given attribute has the given value. The " "value cannot contain quotes." msgstr "" -#: ../../library/xml.etree.elementtree.rst:457 +#: ../../library/xml.etree.elementtree.rst:456 msgid "``[@attrib!='value']``" msgstr "" -#: ../../library/xml.etree.elementtree.rst:457 +#: ../../library/xml.etree.elementtree.rst:456 msgid "" "Selects all elements for which the given attribute does not have the given " "value. The value cannot contain quotes." msgstr "" -#: ../../library/xml.etree.elementtree.rst:463 +#: ../../library/xml.etree.elementtree.rst:462 msgid "``[tag]``" msgstr "" -#: ../../library/xml.etree.elementtree.rst:463 +#: ../../library/xml.etree.elementtree.rst:462 msgid "" "Selects all elements that have a child named ``tag``. Only immediate " "children are supported." msgstr "" -#: ../../library/xml.etree.elementtree.rst:466 +#: ../../library/xml.etree.elementtree.rst:465 msgid "``[.='text']``" msgstr "" -#: ../../library/xml.etree.elementtree.rst:466 +#: ../../library/xml.etree.elementtree.rst:465 msgid "" "Selects all elements whose complete text content, including descendants, " "equals the given ``text``." msgstr "" -#: ../../library/xml.etree.elementtree.rst:471 +#: ../../library/xml.etree.elementtree.rst:470 msgid "``[.!='text']``" msgstr "" -#: ../../library/xml.etree.elementtree.rst:471 +#: ../../library/xml.etree.elementtree.rst:470 msgid "" "Selects all elements whose complete text content, including descendants, " "does not equal the given ``text``." msgstr "" -#: ../../library/xml.etree.elementtree.rst:477 +#: ../../library/xml.etree.elementtree.rst:476 msgid "``[tag='text']``" msgstr "" -#: ../../library/xml.etree.elementtree.rst:477 +#: ../../library/xml.etree.elementtree.rst:476 msgid "" "Selects all elements that have a child named ``tag`` whose complete text " "content, including descendants, equals the given ``text``." msgstr "" -#: ../../library/xml.etree.elementtree.rst:481 +#: ../../library/xml.etree.elementtree.rst:480 msgid "``[tag!='text']``" msgstr "" -#: ../../library/xml.etree.elementtree.rst:481 +#: ../../library/xml.etree.elementtree.rst:480 msgid "" "Selects all elements that have a child named ``tag`` whose complete text " "content, including descendants, does not equal the given ``text``." msgstr "" -#: ../../library/xml.etree.elementtree.rst:487 +#: ../../library/xml.etree.elementtree.rst:486 msgid "``[position]``" msgstr "" -#: ../../library/xml.etree.elementtree.rst:487 +#: ../../library/xml.etree.elementtree.rst:486 msgid "" "Selects all elements that are located at the given position. The position " "can be either an integer (1 is the first position), the expression " @@ -741,28 +741,28 @@ msgid "" "position (e.g. ``last()-1``)." msgstr "" -#: ../../library/xml.etree.elementtree.rst:494 +#: ../../library/xml.etree.elementtree.rst:493 msgid "" "Predicates (expressions within square brackets) must be preceded by a tag " "name, an asterisk, or another predicate. ``position`` predicates must be " "preceded by a tag name." msgstr "" -#: ../../library/xml.etree.elementtree.rst:499 -#: ../../library/xml.etree.elementtree.rst:834 +#: ../../library/xml.etree.elementtree.rst:498 +#: ../../library/xml.etree.elementtree.rst:833 msgid "Reference" msgstr "" -#: ../../library/xml.etree.elementtree.rst:504 -#: ../../library/xml.etree.elementtree.rst:839 +#: ../../library/xml.etree.elementtree.rst:503 +#: ../../library/xml.etree.elementtree.rst:838 msgid "Functions" msgstr "" -#: ../../library/xml.etree.elementtree.rst:508 +#: ../../library/xml.etree.elementtree.rst:507 msgid "`C14N 2.0 `_ transformation function." msgstr "" -#: ../../library/xml.etree.elementtree.rst:510 +#: ../../library/xml.etree.elementtree.rst:509 msgid "" "Canonicalization is a way to normalise XML output in a way that allows byte-" "by-byte comparisons and digital signatures. It reduces the freedom that XML " @@ -771,7 +771,7 @@ msgid "" "declarations, the ordering of attributes, and ignorable whitespace." msgstr "" -#: ../../library/xml.etree.elementtree.rst:516 +#: ../../library/xml.etree.elementtree.rst:515 msgid "" "This function takes an XML data string (*xml_data*) or a file path or file-" "like object (*from_file*) as input, converts it to the canonical form, and " @@ -780,11 +780,11 @@ msgid "" "should therefore be opened in text mode with ``utf-8`` encoding." msgstr "" -#: ../../library/xml.etree.elementtree.rst:523 +#: ../../library/xml.etree.elementtree.rst:522 msgid "Typical uses::" msgstr "" -#: ../../library/xml.etree.elementtree.rst:525 +#: ../../library/xml.etree.elementtree.rst:524 msgid "" "xml_data = \"...\"\n" "print(canonicalize(xml_data))\n" @@ -796,59 +796,59 @@ msgid "" " canonicalize(from_file=\"inputfile.xml\", out=out_file)" msgstr "" -#: ../../library/xml.etree.elementtree.rst:534 +#: ../../library/xml.etree.elementtree.rst:533 msgid "The configuration *options* are as follows:" msgstr "" -#: ../../library/xml.etree.elementtree.rst:536 +#: ../../library/xml.etree.elementtree.rst:535 msgid "*with_comments*: set to true to include comments (default: false)" msgstr "" -#: ../../library/xml.etree.elementtree.rst:537 +#: ../../library/xml.etree.elementtree.rst:536 msgid "" "*strip_text*: set to true to strip whitespace before and after text content" msgstr "" -#: ../../library/xml.etree.elementtree.rst:538 -#: ../../library/xml.etree.elementtree.rst:540 +#: ../../library/xml.etree.elementtree.rst:537 +#: ../../library/xml.etree.elementtree.rst:539 msgid "(default: false)" msgstr "" -#: ../../library/xml.etree.elementtree.rst:539 +#: ../../library/xml.etree.elementtree.rst:538 msgid "" "*rewrite_prefixes*: set to true to replace namespace prefixes by " "\"n{number}\"" msgstr "" -#: ../../library/xml.etree.elementtree.rst:541 +#: ../../library/xml.etree.elementtree.rst:540 msgid "*qname_aware_tags*: a set of qname aware tag names in which prefixes" msgstr "" -#: ../../library/xml.etree.elementtree.rst:542 -#: ../../library/xml.etree.elementtree.rst:544 +#: ../../library/xml.etree.elementtree.rst:541 +#: ../../library/xml.etree.elementtree.rst:543 msgid "should be replaced in text content (default: empty)" msgstr "" -#: ../../library/xml.etree.elementtree.rst:543 +#: ../../library/xml.etree.elementtree.rst:542 msgid "" "*qname_aware_attrs*: a set of qname aware attribute names in which prefixes" msgstr "" -#: ../../library/xml.etree.elementtree.rst:545 +#: ../../library/xml.etree.elementtree.rst:544 msgid "*exclude_attrs*: a set of attribute names that should not be serialised" msgstr "" -#: ../../library/xml.etree.elementtree.rst:546 +#: ../../library/xml.etree.elementtree.rst:545 msgid "*exclude_tags*: a set of tag names that should not be serialised" msgstr "" -#: ../../library/xml.etree.elementtree.rst:548 +#: ../../library/xml.etree.elementtree.rst:547 msgid "" "In the option list above, \"a set\" refers to any collection or iterable of " "strings, no ordering is expected." msgstr "" -#: ../../library/xml.etree.elementtree.rst:556 +#: ../../library/xml.etree.elementtree.rst:555 msgid "" "Comment element factory. This factory function creates a special element " "that will be serialized as an XML comment by the standard serializer. The " @@ -857,7 +857,7 @@ msgid "" "representing a comment." msgstr "" -#: ../../library/xml.etree.elementtree.rst:562 +#: ../../library/xml.etree.elementtree.rst:561 msgid "" "Note that :class:`XMLParser` skips over comments in the input instead of " "creating comment objects for them. An :class:`ElementTree` will only contain " @@ -865,29 +865,29 @@ msgid "" "class:`Element` methods." msgstr "" -#: ../../library/xml.etree.elementtree.rst:569 +#: ../../library/xml.etree.elementtree.rst:568 msgid "" "Writes an element tree or element structure to sys.stdout. This function " "should be used for debugging only." msgstr "" -#: ../../library/xml.etree.elementtree.rst:572 +#: ../../library/xml.etree.elementtree.rst:571 msgid "" "The exact output format is implementation dependent. In this version, it's " "written as an ordinary XML file." msgstr "" -#: ../../library/xml.etree.elementtree.rst:575 +#: ../../library/xml.etree.elementtree.rst:574 msgid "*elem* is an element tree or an individual element." msgstr "" -#: ../../library/xml.etree.elementtree.rst:577 +#: ../../library/xml.etree.elementtree.rst:576 msgid "" "The :func:`dump` function now preserves the attribute order specified by the " "user." msgstr "" -#: ../../library/xml.etree.elementtree.rst:584 +#: ../../library/xml.etree.elementtree.rst:583 msgid "" "Parses an XML section from a string constant. Same as :func:`XML`. *text* " "is a string containing XML data. *parser* is an optional parser instance. " @@ -895,7 +895,7 @@ msgid "" "class:`Element` instance." msgstr "" -#: ../../library/xml.etree.elementtree.rst:592 +#: ../../library/xml.etree.elementtree.rst:591 msgid "" "Parses an XML document from a sequence of string fragments. *sequence* is a " "list or other sequence containing XML data fragments. *parser* is an " @@ -903,7 +903,7 @@ msgid "" "parser is used. Returns an :class:`Element` instance." msgstr "" -#: ../../library/xml.etree.elementtree.rst:602 +#: ../../library/xml.etree.elementtree.rst:601 msgid "" "Appends whitespace to the subtree to indent the tree visually. This can be " "used to generate pretty-printed XML output. *tree* can be an Element or " @@ -913,13 +913,13 @@ msgid "" "indentation level as *level*." msgstr "" -#: ../../library/xml.etree.elementtree.rst:614 +#: ../../library/xml.etree.elementtree.rst:613 msgid "" "Check if an object appears to be a valid element object. *element* is an " "element instance. Return ``True`` if this is an element object." msgstr "" -#: ../../library/xml.etree.elementtree.rst:620 +#: ../../library/xml.etree.elementtree.rst:619 msgid "" "Parses an XML section into an element tree incrementally, and reports what's " "going on to the user. *source* is a filename or :term:`file object` " @@ -937,7 +937,7 @@ msgid "" "file object if *source* is a filename." msgstr "" -#: ../../library/xml.etree.elementtree.rst:636 +#: ../../library/xml.etree.elementtree.rst:635 msgid "" "Note that while :func:`iterparse` builds the tree incrementally, it issues " "blocking reads on *source* (or the file it names). As such, it's unsuitable " @@ -945,7 +945,7 @@ msgid "" "parsing, see :class:`XMLPullParser`." msgstr "" -#: ../../library/xml.etree.elementtree.rst:643 +#: ../../library/xml.etree.elementtree.rst:642 msgid "" ":func:`iterparse` only guarantees that it has seen the \">\" character of a " "starting tag when it emits a \"start\" event, so the attributes are defined, " @@ -954,25 +954,25 @@ msgid "" "present." msgstr "" -#: ../../library/xml.etree.elementtree.rst:649 -#: ../../library/xml.etree.elementtree.rst:1522 +#: ../../library/xml.etree.elementtree.rst:648 +#: ../../library/xml.etree.elementtree.rst:1521 msgid "If you need a fully populated element, look for \"end\" events instead." msgstr "" -#: ../../library/xml.etree.elementtree.rst:651 +#: ../../library/xml.etree.elementtree.rst:650 msgid "The *parser* argument." msgstr "" -#: ../../library/xml.etree.elementtree.rst:654 -#: ../../library/xml.etree.elementtree.rst:1526 +#: ../../library/xml.etree.elementtree.rst:653 +#: ../../library/xml.etree.elementtree.rst:1525 msgid "The ``comment`` and ``pi`` events were added." msgstr "" -#: ../../library/xml.etree.elementtree.rst:657 +#: ../../library/xml.etree.elementtree.rst:656 msgid "Added the :meth:`!close` method." msgstr "" -#: ../../library/xml.etree.elementtree.rst:663 +#: ../../library/xml.etree.elementtree.rst:662 msgid "" "Parses an XML section into an element tree. *source* is a filename or file " "object containing XML data. *parser* is an optional parser instance. If " @@ -980,7 +980,7 @@ msgid "" "class:`ElementTree` instance." msgstr "" -#: ../../library/xml.etree.elementtree.rst:671 +#: ../../library/xml.etree.elementtree.rst:670 msgid "" "PI element factory. This factory function creates a special element that " "will be serialized as an XML processing instruction. *target* is a string " @@ -988,7 +988,7 @@ msgid "" "given. Returns an element instance, representing a processing instruction." msgstr "" -#: ../../library/xml.etree.elementtree.rst:676 +#: ../../library/xml.etree.elementtree.rst:675 msgid "" "Note that :class:`XMLParser` skips over processing instructions in the input " "instead of creating PI objects for them. An :class:`ElementTree` will only " @@ -996,7 +996,7 @@ msgid "" "tree using one of the :class:`Element` methods." msgstr "" -#: ../../library/xml.etree.elementtree.rst:684 +#: ../../library/xml.etree.elementtree.rst:683 msgid "" "Registers a namespace prefix. The registry is global, and any existing " "mapping for either the given prefix or the namespace URI will be removed. " @@ -1005,13 +1005,13 @@ msgid "" "all possible." msgstr "" -#: ../../library/xml.etree.elementtree.rst:695 +#: ../../library/xml.etree.elementtree.rst:694 msgid "" "Subelement factory. This function creates an element instance, and appends " "it to an existing element." msgstr "" -#: ../../library/xml.etree.elementtree.rst:698 +#: ../../library/xml.etree.elementtree.rst:697 msgid "" "The element name, attribute names, and attribute values can be either " "bytestrings or Unicode strings. *parent* is the parent element. *tag* is " @@ -1020,7 +1020,7 @@ msgid "" "arguments. Returns an element instance." msgstr "" -#: ../../library/xml.etree.elementtree.rst:709 +#: ../../library/xml.etree.elementtree.rst:708 msgid "" "Generates a string representation of an XML element, including all " "subelements. *element* is an :class:`Element` instance. *encoding* [1]_ is " @@ -1032,24 +1032,24 @@ msgid "" "Returns an (optionally) encoded string containing the XML data." msgstr "" -#: ../../library/xml.etree.elementtree.rst:718 -#: ../../library/xml.etree.elementtree.rst:745 -#: ../../library/xml.etree.elementtree.rst:1199 +#: ../../library/xml.etree.elementtree.rst:717 +#: ../../library/xml.etree.elementtree.rst:744 +#: ../../library/xml.etree.elementtree.rst:1198 msgid "Added the *short_empty_elements* parameter." msgstr "" -#: ../../library/xml.etree.elementtree.rst:721 -#: ../../library/xml.etree.elementtree.rst:748 +#: ../../library/xml.etree.elementtree.rst:720 +#: ../../library/xml.etree.elementtree.rst:747 msgid "Added the *xml_declaration* and *default_namespace* parameters." msgstr "" -#: ../../library/xml.etree.elementtree.rst:724 +#: ../../library/xml.etree.elementtree.rst:723 msgid "" "The :func:`tostring` function now preserves the attribute order specified by " "the user." msgstr "" -#: ../../library/xml.etree.elementtree.rst:733 +#: ../../library/xml.etree.elementtree.rst:732 msgid "" "Generates a string representation of an XML element, including all " "subelements. *element* is an :class:`Element` instance. *encoding* [1]_ is " @@ -1063,13 +1063,13 @@ msgid "" "join(tostringlist(element)) == tostring(element)``." msgstr "" -#: ../../library/xml.etree.elementtree.rst:751 +#: ../../library/xml.etree.elementtree.rst:750 msgid "" "The :func:`tostringlist` function now preserves the attribute order " "specified by the user." msgstr "" -#: ../../library/xml.etree.elementtree.rst:758 +#: ../../library/xml.etree.elementtree.rst:757 msgid "" "Parses an XML section from a string constant. This function can be used to " "embed \"XML literals\" in Python code. *text* is a string containing XML " @@ -1077,7 +1077,7 @@ msgid "" "class:`XMLParser` parser is used. Returns an :class:`Element` instance." msgstr "" -#: ../../library/xml.etree.elementtree.rst:766 +#: ../../library/xml.etree.elementtree.rst:765 msgid "" "Parses an XML section from a string constant, and also returns a dictionary " "which maps from element id:s to elements. *text* is a string containing XML " @@ -1086,11 +1086,11 @@ msgid "" "`Element` instance and a dictionary." msgstr "" -#: ../../library/xml.etree.elementtree.rst:776 +#: ../../library/xml.etree.elementtree.rst:775 msgid "XInclude support" msgstr "" -#: ../../library/xml.etree.elementtree.rst:778 +#: ../../library/xml.etree.elementtree.rst:777 msgid "" "This module provides limited support for `XInclude directives `_, via the :mod:`xml.etree.ElementInclude` helper " @@ -1098,7 +1098,7 @@ msgid "" "element trees, based on information in the tree." msgstr "" -#: ../../library/xml.etree.elementtree.rst:784 +#: ../../library/xml.etree.elementtree.rst:783 msgid "" "Here's an example that demonstrates use of the XInclude module. To include " "an XML document in the current document, use the ``{http://www.w3.org/2001/" @@ -1106,7 +1106,7 @@ msgid "" "and use the **href** attribute to specify the document to include." msgstr "" -#: ../../library/xml.etree.elementtree.rst:786 +#: ../../library/xml.etree.elementtree.rst:785 msgid "" "\n" "\n" @@ -1114,20 +1114,20 @@ msgid "" "" msgstr "" -#: ../../library/xml.etree.elementtree.rst:793 +#: ../../library/xml.etree.elementtree.rst:792 msgid "" "By default, the **href** attribute is treated as a file name. You can use " "custom loaders to override this behaviour. Also note that the standard " "helper does not support XPointer syntax." msgstr "" -#: ../../library/xml.etree.elementtree.rst:795 +#: ../../library/xml.etree.elementtree.rst:794 msgid "" "To process this file, load it as usual, and pass the root element to the :" "mod:`xml.etree.ElementTree` module:" msgstr "" -#: ../../library/xml.etree.elementtree.rst:797 +#: ../../library/xml.etree.elementtree.rst:796 msgid "" "from xml.etree import ElementTree, ElementInclude\n" "\n" @@ -1137,33 +1137,33 @@ msgid "" "ElementInclude.include(root)" msgstr "" -#: ../../library/xml.etree.elementtree.rst:806 +#: ../../library/xml.etree.elementtree.rst:805 msgid "" "The ElementInclude module replaces the ``{http://www.w3.org/2001/XInclude}" "include`` element with the root element from the **source.xml** document. " "The result might look something like this:" msgstr "" -#: ../../library/xml.etree.elementtree.rst:808 +#: ../../library/xml.etree.elementtree.rst:807 msgid "" "\n" " This is a paragraph.\n" "" msgstr "" -#: ../../library/xml.etree.elementtree.rst:814 +#: ../../library/xml.etree.elementtree.rst:813 msgid "" "If the **parse** attribute is omitted, it defaults to \"xml\". The href " "attribute is required." msgstr "" -#: ../../library/xml.etree.elementtree.rst:816 +#: ../../library/xml.etree.elementtree.rst:815 msgid "" "To include a text document, use the ``{http://www.w3.org/2001/XInclude}" "include`` element, and set the **parse** attribute to \"text\":" msgstr "" -#: ../../library/xml.etree.elementtree.rst:818 +#: ../../library/xml.etree.elementtree.rst:817 msgid "" "\n" "\n" @@ -1171,18 +1171,18 @@ msgid "" "" msgstr "" -#: ../../library/xml.etree.elementtree.rst:825 +#: ../../library/xml.etree.elementtree.rst:824 msgid "The result might look something like:" msgstr "" -#: ../../library/xml.etree.elementtree.rst:827 +#: ../../library/xml.etree.elementtree.rst:826 msgid "" "\n" " Copyright (c) 2003.\n" "" msgstr "" -#: ../../library/xml.etree.elementtree.rst:845 +#: ../../library/xml.etree.elementtree.rst:844 msgid "" "Default loader. This default loader reads an included resource from disk. " "*href* is a URL. *parse* is for parse mode either \"xml\" or \"text\". " @@ -1193,7 +1193,7 @@ msgid "" "``None`` or raise an exception." msgstr "" -#: ../../library/xml.etree.elementtree.rst:856 +#: ../../library/xml.etree.elementtree.rst:855 msgid "" "This function expands XInclude directives in-place in tree pointed by " "*elem*. *elem* is either the root :class:`~xml.etree.ElementTree.Element` or " @@ -1206,21 +1206,21 @@ msgid "" "malicious content explosion. Pass ``None`` to disable the limitation." msgstr "" -#: ../../library/xml.etree.elementtree.rst:866 +#: ../../library/xml.etree.elementtree.rst:865 msgid "Added the *base_url* and *max_depth* parameters." msgstr "" -#: ../../library/xml.etree.elementtree.rst:873 +#: ../../library/xml.etree.elementtree.rst:872 msgid "Element Objects" msgstr "" -#: ../../library/xml.etree.elementtree.rst:881 +#: ../../library/xml.etree.elementtree.rst:880 msgid "" "Element class. This class defines the Element interface, and provides a " "reference implementation of this interface." msgstr "" -#: ../../library/xml.etree.elementtree.rst:884 +#: ../../library/xml.etree.elementtree.rst:883 msgid "" "The element name, attribute names, and attribute values can be either " "bytestrings or Unicode strings. *tag* is the element name. *attrib* is an " @@ -1228,13 +1228,13 @@ msgid "" "additional attributes, given as keyword arguments." msgstr "" -#: ../../library/xml.etree.elementtree.rst:892 +#: ../../library/xml.etree.elementtree.rst:891 msgid "" "A string identifying what kind of data this element represents (the element " "type, in other words)." msgstr "" -#: ../../library/xml.etree.elementtree.rst:899 +#: ../../library/xml.etree.elementtree.rst:898 msgid "" "These attributes can be used to hold additional data associated with the " "element. Their values are usually strings but may be any application-" @@ -1245,11 +1245,11 @@ msgid "" "the XML data" msgstr "" -#: ../../library/xml.etree.elementtree.rst:907 +#: ../../library/xml.etree.elementtree.rst:906 msgid "1234" msgstr "" -#: ../../library/xml.etree.elementtree.rst:911 +#: ../../library/xml.etree.elementtree.rst:910 msgid "" "the *a* element has ``None`` for both *text* and *tail* attributes, the *b* " "element has *text* ``\"1\"`` and *tail* ``\"4\"``, the *c* element has " @@ -1257,17 +1257,17 @@ msgid "" "``None`` and *tail* ``\"3\"``." msgstr "" -#: ../../library/xml.etree.elementtree.rst:916 +#: ../../library/xml.etree.elementtree.rst:915 msgid "" "To collect the inner text of an element, see :meth:`itertext`, for example " "``\"\".join(element.itertext())``." msgstr "" -#: ../../library/xml.etree.elementtree.rst:919 +#: ../../library/xml.etree.elementtree.rst:918 msgid "Applications may store arbitrary objects in these attributes." msgstr "" -#: ../../library/xml.etree.elementtree.rst:924 +#: ../../library/xml.etree.elementtree.rst:923 msgid "" "A dictionary containing the element's attributes. Note that while the " "*attrib* value is always a real mutable Python dictionary, an ElementTree " @@ -1276,59 +1276,59 @@ msgid "" "implementations, use the dictionary methods below whenever possible." msgstr "" -#: ../../library/xml.etree.elementtree.rst:930 +#: ../../library/xml.etree.elementtree.rst:929 msgid "The following dictionary-like methods work on the element attributes." msgstr "" -#: ../../library/xml.etree.elementtree.rst:935 +#: ../../library/xml.etree.elementtree.rst:934 msgid "" "Resets an element. This function removes all subelements, clears all " "attributes, and sets the text and tail attributes to ``None``." msgstr "" -#: ../../library/xml.etree.elementtree.rst:941 +#: ../../library/xml.etree.elementtree.rst:940 msgid "Gets the element attribute named *key*." msgstr "" -#: ../../library/xml.etree.elementtree.rst:943 +#: ../../library/xml.etree.elementtree.rst:942 msgid "" "Returns the attribute value, or *default* if the attribute was not found." msgstr "" -#: ../../library/xml.etree.elementtree.rst:948 +#: ../../library/xml.etree.elementtree.rst:947 msgid "" "Returns the element attributes as a sequence of (name, value) pairs. The " "attributes are returned in an arbitrary order." msgstr "" -#: ../../library/xml.etree.elementtree.rst:954 +#: ../../library/xml.etree.elementtree.rst:953 msgid "" "Returns the elements attribute names as a list. The names are returned in " "an arbitrary order." msgstr "" -#: ../../library/xml.etree.elementtree.rst:960 +#: ../../library/xml.etree.elementtree.rst:959 msgid "Set the attribute *key* on the element to *value*." msgstr "" -#: ../../library/xml.etree.elementtree.rst:962 +#: ../../library/xml.etree.elementtree.rst:961 msgid "The following methods work on the element's children (subelements)." msgstr "" -#: ../../library/xml.etree.elementtree.rst:967 +#: ../../library/xml.etree.elementtree.rst:966 msgid "" "Adds the element *subelement* to the end of this element's internal list of " "subelements. Raises :exc:`TypeError` if *subelement* is not an :class:" "`Element`." msgstr "" -#: ../../library/xml.etree.elementtree.rst:974 +#: ../../library/xml.etree.elementtree.rst:973 msgid "" "Appends *subelements* from an iterable of elements. Raises :exc:`TypeError` " "if a subelement is not an :class:`Element`." msgstr "" -#: ../../library/xml.etree.elementtree.rst:982 +#: ../../library/xml.etree.elementtree.rst:981 msgid "" "Finds the first subelement matching *match*. *match* may be a tag name or " "a :ref:`path `. Returns an element instance or " @@ -1337,7 +1337,7 @@ msgid "" "expression into the given namespace." msgstr "" -#: ../../library/xml.etree.elementtree.rst:991 +#: ../../library/xml.etree.elementtree.rst:990 msgid "" "Finds all matching subelements, by tag name or :ref:`path `. Returns a list containing all matching elements in document " @@ -1346,7 +1346,7 @@ msgid "" "expression into the given namespace." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1000 +#: ../../library/xml.etree.elementtree.rst:999 msgid "" "Finds text for the first subelement matching *match*. *match* may be a tag " "name or a :ref:`path `. Returns the text content of the " @@ -1357,13 +1357,13 @@ msgid "" "into the given namespace." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1011 +#: ../../library/xml.etree.elementtree.rst:1010 msgid "" "Inserts *subelement* at the given position in this element. Raises :exc:" "`TypeError` if *subelement* is not an :class:`Element`." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1017 +#: ../../library/xml.etree.elementtree.rst:1016 msgid "" "Creates a tree :term:`iterator` with the current element as the root. The " "iterator iterates over this element and all elements below it, in document " @@ -1372,7 +1372,7 @@ msgid "" "structure is modified during iteration, the result is undefined." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1028 +#: ../../library/xml.etree.elementtree.rst:1027 msgid "" "Finds all matching subelements, by tag name or :ref:`path `. Returns an iterable yielding all matching elements in document " @@ -1380,33 +1380,33 @@ msgid "" "name." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1039 +#: ../../library/xml.etree.elementtree.rst:1038 msgid "" "Creates a text iterator. The iterator loops over this element and all " "subelements, in document order, and returns all inner text." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1047 +#: ../../library/xml.etree.elementtree.rst:1046 msgid "" "Creates a new element object of the same type as this element. Do not call " "this method, use the :func:`SubElement` factory function instead." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1053 +#: ../../library/xml.etree.elementtree.rst:1052 msgid "" "Removes *subelement* from the element. Unlike the find\\* methods this " "method compares elements based on the instance identity, not on tag value or " "contents." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1057 +#: ../../library/xml.etree.elementtree.rst:1056 msgid "" ":class:`Element` objects also support the following sequence type methods " "for working with subelements: :meth:`~object.__delitem__`, :meth:`~object." "__getitem__`, :meth:`~object.__setitem__`, :meth:`~object.__len__`." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1062 +#: ../../library/xml.etree.elementtree.rst:1061 msgid "" "Caution: Elements with no subelements will test as ``False``. In a future " "release of Python, all elements will test as ``True`` regardless of whether " @@ -1414,7 +1414,7 @@ msgid "" "None`` tests.::" msgstr "" -#: ../../library/xml.etree.elementtree.rst:1067 +#: ../../library/xml.etree.elementtree.rst:1066 msgid "" "element = root.find('foo')\n" "\n" @@ -1425,11 +1425,11 @@ msgid "" " print(\"element not found\")" msgstr "" -#: ../../library/xml.etree.elementtree.rst:1075 +#: ../../library/xml.etree.elementtree.rst:1074 msgid "Testing the truth value of an Element emits :exc:`DeprecationWarning`." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1078 +#: ../../library/xml.etree.elementtree.rst:1077 msgid "" "Prior to Python 3.8, the serialisation order of the XML attributes of " "elements was artificially made predictable by sorting the attributes by " @@ -1438,7 +1438,7 @@ msgid "" "attributes were originally parsed or created by user code." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1084 +#: ../../library/xml.etree.elementtree.rst:1083 msgid "" "In general, user code should try not to depend on a specific ordering of " "attributes, given that the `XML Information Set \n" " \n" @@ -1578,13 +1578,13 @@ msgid "" "" msgstr "" -#: ../../library/xml.etree.elementtree.rst:1219 +#: ../../library/xml.etree.elementtree.rst:1218 msgid "" "Example of changing the attribute \"target\" of every link in first " "paragraph::" msgstr "" -#: ../../library/xml.etree.elementtree.rst:1221 +#: ../../library/xml.etree.elementtree.rst:1220 msgid "" ">>> from xml.etree.ElementTree import ElementTree\n" ">>> tree = ElementTree()\n" @@ -1602,11 +1602,11 @@ msgid "" ">>> tree.write(\"output.xhtml\")" msgstr "" -#: ../../library/xml.etree.elementtree.rst:1239 +#: ../../library/xml.etree.elementtree.rst:1238 msgid "QName Objects" msgstr "" -#: ../../library/xml.etree.elementtree.rst:1244 +#: ../../library/xml.etree.elementtree.rst:1243 msgid "" "QName wrapper. This can be used to wrap a QName attribute value, in order " "to get proper namespace handling on output. *text_or_uri* is a string " @@ -1616,11 +1616,11 @@ msgid "" "class:`QName` instances are opaque." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1256 +#: ../../library/xml.etree.elementtree.rst:1255 msgid "TreeBuilder Objects" msgstr "" -#: ../../library/xml.etree.elementtree.rst:1262 +#: ../../library/xml.etree.elementtree.rst:1261 msgid "" "Generic element structure builder. This builder converts a sequence of " "start, data, end, comment and pi method calls to a well-formed element " @@ -1628,14 +1628,14 @@ msgid "" "custom XML parser, or a parser for some other XML-like format." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1267 +#: ../../library/xml.etree.elementtree.rst:1266 msgid "" "*element_factory*, when given, must be a callable accepting two positional " "arguments: a tag and a dict of attributes. It is expected to return a new " "element instance." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1271 +#: ../../library/xml.etree.elementtree.rst:1270 msgid "" "The *comment_factory* and *pi_factory* functions, when given, should behave " "like the :func:`Comment` and :func:`ProcessingInstruction` functions to " @@ -1645,56 +1645,56 @@ msgid "" "element (but not outside of it)." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1280 +#: ../../library/xml.etree.elementtree.rst:1279 msgid "" "Flushes the builder buffers, and returns the toplevel document element. " "Returns an :class:`Element` instance." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1286 +#: ../../library/xml.etree.elementtree.rst:1285 msgid "" "Adds text to the current element. *data* is a string. This should be " "either a bytestring, or a Unicode string." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1292 +#: ../../library/xml.etree.elementtree.rst:1291 msgid "" "Closes the current element. *tag* is the element name. Returns the closed " "element." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1298 +#: ../../library/xml.etree.elementtree.rst:1297 msgid "" "Opens a new element. *tag* is the element name. *attrs* is a dictionary " "containing element attributes. Returns the opened element." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1304 +#: ../../library/xml.etree.elementtree.rst:1303 msgid "" "Creates a comment with the given *text*. If ``insert_comments`` is true, " "this will also add it to the tree." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1312 +#: ../../library/xml.etree.elementtree.rst:1311 msgid "" "Creates a process instruction with the given *target* name and *text*. If " "``insert_pis`` is true, this will also add it to the tree." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1318 +#: ../../library/xml.etree.elementtree.rst:1317 msgid "" "In addition, a custom :class:`TreeBuilder` object can provide the following " "methods:" msgstr "" -#: ../../library/xml.etree.elementtree.rst:1323 +#: ../../library/xml.etree.elementtree.rst:1322 msgid "" "Handles a doctype declaration. *name* is the doctype name. *pubid* is the " "public identifier. *system* is the system identifier. This method does not " "exist on the default :class:`TreeBuilder` class." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1331 +#: ../../library/xml.etree.elementtree.rst:1330 msgid "" "Is called whenever the parser encounters a new namespace declaration, before " "the ``start()`` callback for the opening element that defines it. *prefix* " @@ -1702,14 +1702,14 @@ msgid "" "otherwise. *uri* is the namespace URI." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1340 +#: ../../library/xml.etree.elementtree.rst:1339 msgid "" "Is called after the ``end()`` callback of an element that declared a " "namespace prefix mapping, with the name of the *prefix* that went out of " "scope." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1352 +#: ../../library/xml.etree.elementtree.rst:1351 msgid "" "A `C14N 2.0 `_ writer. Arguments are the " "same as for the :func:`canonicalize` function. This class does not build a " @@ -1717,11 +1717,11 @@ msgid "" "using the *write* function." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1363 +#: ../../library/xml.etree.elementtree.rst:1362 msgid "XMLParser Objects" msgstr "" -#: ../../library/xml.etree.elementtree.rst:1368 +#: ../../library/xml.etree.elementtree.rst:1367 msgid "" "This class is the low-level building block of the module. It uses :mod:`xml." "parsers.expat` for efficient, event-based parsing of XML. It can be fed XML " @@ -1732,25 +1732,25 @@ msgid "" "XML file." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1376 +#: ../../library/xml.etree.elementtree.rst:1375 msgid "" "Parameters are now :ref:`keyword-only `. The *html* " "argument is no longer supported." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1383 +#: ../../library/xml.etree.elementtree.rst:1382 msgid "" "Finishes feeding data to the parser. Returns the result of calling the " "``close()`` method of the *target* passed during construction; by default, " "this is the toplevel document element." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1390 +#: ../../library/xml.etree.elementtree.rst:1389 msgid "Feeds data to the parser. *data* is encoded data." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1395 -#: ../../library/xml.etree.elementtree.rst:1473 +#: ../../library/xml.etree.elementtree.rst:1394 +#: ../../library/xml.etree.elementtree.rst:1472 msgid "" "Triggers parsing of any previously fed unparsed data, which can be used to " "ensure more immediate feedback, in particular with Expat >=2.6.0. The " @@ -1760,15 +1760,15 @@ msgid "" "xmlparser.SetReparseDeferralEnabled` for details." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1402 -#: ../../library/xml.etree.elementtree.rst:1480 +#: ../../library/xml.etree.elementtree.rst:1401 +#: ../../library/xml.etree.elementtree.rst:1479 msgid "" "Note that :meth:`flush` has been backported to some prior releases of " "CPython as a security fix. Check for availability of :meth:`flush` using :" "func:`hasattr` if used in code running across a variety of Python versions." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1410 +#: ../../library/xml.etree.elementtree.rst:1409 msgid "" ":meth:`XMLParser.feed` calls *target*\\'s ``start(tag, attrs_dict)`` method " "for each opening tag, its ``end(tag)`` method for each closing tag, and data " @@ -1779,7 +1779,7 @@ msgid "" "of an XML file::" msgstr "" -#: ../../library/xml.etree.elementtree.rst:1418 +#: ../../library/xml.etree.elementtree.rst:1417 msgid "" ">>> from xml.etree.ElementTree import XMLParser\n" ">>> class MaxDepth: # The target object of the parser\n" @@ -1814,11 +1814,11 @@ msgid "" "4" msgstr "" -#: ../../library/xml.etree.elementtree.rst:1454 +#: ../../library/xml.etree.elementtree.rst:1453 msgid "XMLPullParser Objects" msgstr "" -#: ../../library/xml.etree.elementtree.rst:1458 +#: ../../library/xml.etree.elementtree.rst:1457 msgid "" "A pull parser suitable for non-blocking applications. Its input-side API is " "similar to that of :class:`XMLParser`, but instead of pushing calls to a " @@ -1830,11 +1830,11 @@ msgid "" "If *events* is omitted, only ``\"end\"`` events are reported." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1469 +#: ../../library/xml.etree.elementtree.rst:1468 msgid "Feed the given bytes data to the parser." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1489 +#: ../../library/xml.etree.elementtree.rst:1488 msgid "" "Signal the parser that the data stream is terminated. Unlike :meth:" "`XMLParser.close`, this method always returns :const:`None`. Any events not " @@ -1842,7 +1842,7 @@ msgid "" "`read_events`." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1496 +#: ../../library/xml.etree.elementtree.rst:1495 msgid "" "Return an iterator over the events which have been encountered in the data " "fed to the parser. The iterator yields ``(event, elem)`` pairs, where " @@ -1851,25 +1851,25 @@ msgid "" "follows." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1502 +#: ../../library/xml.etree.elementtree.rst:1501 msgid "``start``, ``end``: the current Element." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1503 +#: ../../library/xml.etree.elementtree.rst:1502 msgid "``comment``, ``pi``: the current comment / processing instruction" msgstr "" -#: ../../library/xml.etree.elementtree.rst:1504 +#: ../../library/xml.etree.elementtree.rst:1503 msgid "" "``start-ns``: a tuple ``(prefix, uri)`` naming the declared namespace " "mapping." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1506 +#: ../../library/xml.etree.elementtree.rst:1505 msgid "``end-ns``: :const:`None` (this may change in a future version)" msgstr "" -#: ../../library/xml.etree.elementtree.rst:1508 +#: ../../library/xml.etree.elementtree.rst:1507 msgid "" "Events provided in a previous call to :meth:`read_events` will not be " "yielded again. Events are consumed from the internal queue only when they " @@ -1878,7 +1878,7 @@ msgid "" "results." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1516 +#: ../../library/xml.etree.elementtree.rst:1515 msgid "" ":class:`XMLPullParser` only guarantees that it has seen the \">\" character " "of a starting tag when it emits a \"start\" event, so the attributes are " @@ -1887,11 +1887,11 @@ msgid "" "be present." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1531 +#: ../../library/xml.etree.elementtree.rst:1530 msgid "Exceptions" msgstr "" -#: ../../library/xml.etree.elementtree.rst:1535 +#: ../../library/xml.etree.elementtree.rst:1534 msgid "" "XML parse error, raised by the various parsing methods in this module when " "parsing fails. The string representation of an instance of this exception " @@ -1899,22 +1899,22 @@ msgid "" "following attributes available:" msgstr "" -#: ../../library/xml.etree.elementtree.rst:1542 +#: ../../library/xml.etree.elementtree.rst:1541 msgid "" "A numeric error code from the expat parser. See the documentation of :mod:" "`xml.parsers.expat` for the list of error codes and their meanings." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1547 +#: ../../library/xml.etree.elementtree.rst:1546 msgid "" "A tuple of *line*, *column* numbers, specifying where the error occurred." msgstr "" -#: ../../library/xml.etree.elementtree.rst:1550 +#: ../../library/xml.etree.elementtree.rst:1549 msgid "Footnotes" msgstr "" -#: ../../library/xml.etree.elementtree.rst:1551 +#: ../../library/xml.etree.elementtree.rst:1550 msgid "" "The encoding string included in XML output should conform to the appropriate " "standards. For example, \"UTF-8\" is valid, but \"UTF8\" is not. See " diff --git a/library/xml.po b/library/xml.po index 772e48a1f..ad6529b00 100644 --- a/library/xml.po +++ b/library/xml.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:18+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" @@ -33,12 +33,11 @@ msgstr "" #: ../../library/xml.rst:20 msgid "" -"The XML modules are not secure against erroneous or maliciously constructed " -"data. If you need to parse untrusted or unauthenticated data see the :ref:" -"`xml-vulnerabilities` and :ref:`defusedxml-package` sections." +"If you need to parse untrusted or unauthenticated data, see :ref:`xml-" +"security`." msgstr "" -#: ../../library/xml.rst:25 +#: ../../library/xml.rst:23 msgid "" "It is important to note that modules in the :mod:`xml` package require that " "there be at least one SAX-compliant XML parser available. The Expat parser " @@ -46,183 +45,70 @@ msgid "" "be available." msgstr "" -#: ../../library/xml.rst:30 +#: ../../library/xml.rst:28 msgid "" "The documentation for the :mod:`xml.dom` and :mod:`xml.sax` packages are the " "definition of the Python bindings for the DOM and SAX interfaces." msgstr "" -#: ../../library/xml.rst:33 +#: ../../library/xml.rst:31 msgid "The XML handling submodules are:" msgstr "" -#: ../../library/xml.rst:35 +#: ../../library/xml.rst:33 msgid "" ":mod:`xml.etree.ElementTree`: the ElementTree API, a simple and lightweight " "XML processor" msgstr "" -#: ../../library/xml.rst:40 +#: ../../library/xml.rst:38 msgid ":mod:`xml.dom`: the DOM API definition" msgstr "" -#: ../../library/xml.rst:41 +#: ../../library/xml.rst:39 msgid ":mod:`xml.dom.minidom`: a minimal DOM implementation" msgstr "" -#: ../../library/xml.rst:42 +#: ../../library/xml.rst:40 msgid ":mod:`xml.dom.pulldom`: support for building partial DOM trees" msgstr "" -#: ../../library/xml.rst:46 +#: ../../library/xml.rst:44 msgid ":mod:`xml.sax`: SAX2 base classes and convenience functions" msgstr "" -#: ../../library/xml.rst:47 +#: ../../library/xml.rst:45 msgid ":mod:`xml.parsers.expat`: the Expat parser binding" msgstr "" -#: ../../library/xml.rst:53 -msgid "XML vulnerabilities" +#: ../../library/xml.rst:52 +msgid "XML security" msgstr "" -#: ../../library/xml.rst:55 +#: ../../library/xml.rst:54 msgid "" -"The XML processing modules are not secure against maliciously constructed " -"data. An attacker can abuse XML features to carry out denial of service " -"attacks, access local files, generate network connections to other machines, " -"or circumvent firewalls." +"An attacker can abuse XML features to carry out denial of service attacks, " +"access local files, generate network connections to other machines, or " +"circumvent firewalls." msgstr "" -#: ../../library/xml.rst:60 +#: ../../library/xml.rst:58 msgid "" -"The following table gives an overview of the known attacks and whether the " -"various modules are vulnerable to them." -msgstr "" - -#: ../../library/xml.rst:64 -msgid "kind" +"Expat versions lower that 2.6.0 may be vulnerable to \"billion laughs\", " +"\"quadratic blowup\" and \"large tokens\". Python may be vulnerable if it " +"uses such older versions of Expat as a system-provided library. Check :const:" +"`!pyexpat.EXPAT_VERSION`." msgstr "" -#: ../../library/xml.rst:64 -msgid "sax" -msgstr "" - -#: ../../library/xml.rst:64 -msgid "etree" -msgstr "" - -#: ../../library/xml.rst:64 -msgid "minidom" -msgstr "" - -#: ../../library/xml.rst:64 -msgid "pulldom" -msgstr "" - -#: ../../library/xml.rst:64 -msgid "xmlrpc" +#: ../../library/xml.rst:63 +msgid ":mod:`xmlrpc` is **vulnerable** to the \"decompression bomb\" attack." msgstr "" #: ../../library/xml.rst:66 -msgid "billion laughs" -msgstr "" - -#: ../../library/xml.rst:66 ../../library/xml.rst:67 -msgid "**Vulnerable** (1)" -msgstr "" - -#: ../../library/xml.rst:67 -msgid "quadratic blowup" -msgstr "" - -#: ../../library/xml.rst:68 ../../library/xml.rst:106 -msgid "external entity expansion" -msgstr "" - -#: ../../library/xml.rst:68 ../../library/xml.rst:69 -msgid "Safe (5)" -msgstr "" - -#: ../../library/xml.rst:68 -msgid "Safe (2)" -msgstr "" - -#: ../../library/xml.rst:68 -msgid "Safe (3)" -msgstr "" - -#: ../../library/xml.rst:68 -msgid "Safe (4)" -msgstr "" - -#: ../../library/xml.rst:69 ../../library/xml.rst:111 -msgid "`DTD`_ retrieval" -msgstr "" - -#: ../../library/xml.rst:69 ../../library/xml.rst:70 -msgid "Safe" -msgstr "" - -#: ../../library/xml.rst:70 ../../library/xml.rst:116 -msgid "decompression bomb" -msgstr "" - -#: ../../library/xml.rst:70 -msgid "**Vulnerable**" -msgstr "" - -#: ../../library/xml.rst:71 ../../library/xml.rst:123 -msgid "large tokens" -msgstr "" - -#: ../../library/xml.rst:71 -msgid "**Vulnerable** (6)" -msgstr "" - -#: ../../library/xml.rst:74 -msgid "" -"Expat 2.4.1 and newer is not vulnerable to the \"billion laughs\" and " -"\"quadratic blowup\" vulnerabilities. Items still listed as vulnerable due " -"to potential reliance on system-provided libraries. Check :const:`!pyexpat." -"EXPAT_VERSION`." -msgstr "" - -#: ../../library/xml.rst:78 -msgid "" -":mod:`xml.etree.ElementTree` doesn't expand external entities and raises a :" -"exc:`~xml.etree.ElementTree.ParseError` when an entity occurs." -msgstr "" - -#: ../../library/xml.rst:80 -msgid "" -":mod:`xml.dom.minidom` doesn't expand external entities and simply returns " -"the unexpanded entity verbatim." -msgstr "" - -#: ../../library/xml.rst:82 -msgid ":mod:`xmlrpc.client` doesn't expand external entities and omits them." -msgstr "" - -#: ../../library/xml.rst:83 -msgid "" -"Since Python 3.7.1, external general entities are no longer processed by " -"default." -msgstr "" - -#: ../../library/xml.rst:85 -msgid "" -"Expat 2.6.0 and newer is not vulnerable to denial of service through " -"quadratic runtime caused by parsing large tokens. Items still listed as " -"vulnerable due to potential reliance on system-provided libraries. Check :" -"const:`!pyexpat.EXPAT_VERSION`." -msgstr "" - -#: ../../library/xml.rst:92 msgid "billion laughs / exponential entity expansion" msgstr "" -#: ../../library/xml.rst:93 +#: ../../library/xml.rst:67 msgid "" "The `Billion Laughs`_ attack -- also known as exponential entity expansion " "-- uses multiple levels of nested entities. Each entity refers to another " @@ -231,11 +117,11 @@ msgid "" "consumes lots of memory and CPU time." msgstr "" -#: ../../library/xml.rst:99 +#: ../../library/xml.rst:73 msgid "quadratic blowup entity expansion" msgstr "" -#: ../../library/xml.rst:100 +#: ../../library/xml.rst:74 msgid "" "A quadratic blowup attack is similar to a `Billion Laughs`_ attack; it " "abuses entity expansion, too. Instead of nested entities it repeats one " @@ -244,21 +130,11 @@ msgid "" "countermeasures that forbid deeply nested entities." msgstr "" -#: ../../library/xml.rst:107 -msgid "" -"Entity declarations can contain more than just text for replacement. They " -"can also point to external resources or local files. The XML parser accesses " -"the resource and embeds the content into the XML document." -msgstr "" - -#: ../../library/xml.rst:112 -msgid "" -"Some XML libraries like Python's :mod:`xml.dom.pulldom` retrieve document " -"type definitions from remote or local locations. The feature has similar " -"implications as the external entity expansion issue." +#: ../../library/xml.rst:80 +msgid "decompression bomb" msgstr "" -#: ../../library/xml.rst:117 +#: ../../library/xml.rst:81 msgid "" "Decompression bombs (aka `ZIP bomb`_) apply to all XML libraries that can " "parse compressed XML streams such as gzipped HTTP streams or LZMA-compressed " @@ -266,29 +142,14 @@ msgid "" "magnitudes or more." msgstr "" -#: ../../library/xml.rst:124 +#: ../../library/xml.rst:87 +msgid "large tokens" +msgstr "" + +#: ../../library/xml.rst:88 msgid "" "Expat needs to re-parse unfinished tokens; without the protection introduced " "in Expat 2.6.0, this can lead to quadratic runtime that can be used to cause " "denial of service in the application parsing XML. The issue is known as :cve:" "`2023-52425`." msgstr "" - -#: ../../library/xml.rst:129 -msgid "" -"The documentation for :pypi:`defusedxml` on PyPI has further information " -"about all known attack vectors with examples and references." -msgstr "" - -#: ../../library/xml.rst:135 -msgid "The :mod:`!defusedxml` Package" -msgstr "" - -#: ../../library/xml.rst:137 -msgid "" -":pypi:`defusedxml` is a pure Python package with modified subclasses of all " -"stdlib XML parsers that prevent any potentially malicious operation. Use of " -"this package is recommended for any server code that parses untrusted XML " -"data. The package also ships with example exploits and extended " -"documentation on more XML exploits such as XPath injection." -msgstr "" diff --git a/library/xml.sax.handler.po b/library/xml.sax.handler.po index 1a916e440..e8584c34b 100644 --- a/library/xml.sax.handler.po +++ b/library/xml.sax.handler.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:18+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/xml.sax.po b/library/xml.sax.po index 6ba2ef1ff..43da07891 100644 --- a/library/xml.sax.po +++ b/library/xml.sax.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:18+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" @@ -36,12 +36,11 @@ msgstr "" #: ../../library/xml.sax.rst:23 msgid "" -"The :mod:`xml.sax` module is not secure against maliciously constructed " -"data. If you need to parse untrusted or unauthenticated data see :ref:`xml-" -"vulnerabilities`." +"If you need to parse untrusted or unauthenticated data, see :ref:`xml-" +"security`." msgstr "" -#: ../../library/xml.sax.rst:29 +#: ../../library/xml.sax.rst:28 msgid "" "The SAX parser no longer processes general external entities by default to " "increase security. Before, the parser created network connections to fetch " @@ -51,11 +50,11 @@ msgid "" "`~xml.sax.handler.feature_external_ges`." msgstr "" -#: ../../library/xml.sax.rst:36 +#: ../../library/xml.sax.rst:35 msgid "The convenience functions are:" msgstr "" -#: ../../library/xml.sax.rst:41 +#: ../../library/xml.sax.rst:40 msgid "" "Create and return a SAX :class:`~xml.sax.xmlreader.XMLReader` object. The " "first parser found will be used. If *parser_list* is provided, it must be " @@ -64,11 +63,11 @@ msgid "" "modules in the default list of parsers." msgstr "" -#: ../../library/xml.sax.rst:47 +#: ../../library/xml.sax.rst:46 msgid "The *parser_list* argument can be any iterable, not just a list." msgstr "" -#: ../../library/xml.sax.rst:53 +#: ../../library/xml.sax.rst:52 msgid "" "Create a SAX parser and use it to parse a document. The document, passed in " "as *filename_or_stream*, can be a filename or a file object. The *handler* " @@ -79,18 +78,18 @@ msgid "" "passed in." msgstr "" -#: ../../library/xml.sax.rst:64 +#: ../../library/xml.sax.rst:63 msgid "" "Similar to :func:`parse`, but parses from a buffer *string* received as a " "parameter. *string* must be a :class:`str` instance or a :term:`bytes-like " "object`." msgstr "" -#: ../../library/xml.sax.rst:68 +#: ../../library/xml.sax.rst:67 msgid "Added support of :class:`str` instances." msgstr "" -#: ../../library/xml.sax.rst:71 +#: ../../library/xml.sax.rst:70 msgid "" "A typical SAX application uses three kinds of objects: readers, handlers and " "input sources. \"Reader\" in this context is another term for parser, i.e. " @@ -104,7 +103,7 @@ msgid "" "structural and syntactic events from the input data." msgstr "" -#: ../../library/xml.sax.rst:82 +#: ../../library/xml.sax.rst:81 msgid "" "For these objects, only the interfaces are relevant; they are normally not " "instantiated by the application itself. Since Python does not have an " @@ -120,13 +119,13 @@ msgid "" "interfaces are described below." msgstr "" -#: ../../library/xml.sax.rst:95 +#: ../../library/xml.sax.rst:94 msgid "" "In addition to these classes, :mod:`xml.sax` provides the following " "exception classes." msgstr "" -#: ../../library/xml.sax.rst:101 +#: ../../library/xml.sax.rst:100 msgid "" "Encapsulate an XML error or warning. This class can contain basic error or " "warning information from either the XML parser or the application: it can be " @@ -137,7 +136,7 @@ msgid "" "container for information." msgstr "" -#: ../../library/xml.sax.rst:109 +#: ../../library/xml.sax.rst:108 msgid "" "When instantiated, *msg* should be a human-readable description of the " "error. The optional *exception* parameter, if given, should be ``None`` or " @@ -145,11 +144,11 @@ msgid "" "as information." msgstr "" -#: ../../library/xml.sax.rst:113 +#: ../../library/xml.sax.rst:112 msgid "This is the base class for the other SAX exception classes." msgstr "" -#: ../../library/xml.sax.rst:118 +#: ../../library/xml.sax.rst:117 msgid "" "Subclass of :exc:`SAXException` raised on parse errors. Instances of this " "class are passed to the methods of the SAX :class:`~xml.sax.handler." @@ -158,14 +157,14 @@ msgid "" "as the :class:`SAXException` interface." msgstr "" -#: ../../library/xml.sax.rst:128 +#: ../../library/xml.sax.rst:127 msgid "" "Subclass of :exc:`SAXException` raised when a SAX :class:`~xml.sax.xmlreader." "XMLReader` is confronted with an unrecognized feature or property. SAX " "applications and extensions may use this class for similar purposes." msgstr "" -#: ../../library/xml.sax.rst:136 +#: ../../library/xml.sax.rst:135 msgid "" "Subclass of :exc:`SAXException` raised when a SAX :class:`~xml.sax.xmlreader." "XMLReader` is asked to enable a feature that is not supported, or to set a " @@ -173,54 +172,54 @@ msgid "" "applications and extensions may use this class for similar purposes." msgstr "" -#: ../../library/xml.sax.rst:145 +#: ../../library/xml.sax.rst:144 msgid "`SAX: The Simple API for XML `_" msgstr "" -#: ../../library/xml.sax.rst:146 +#: ../../library/xml.sax.rst:145 msgid "" "This site is the focal point for the definition of the SAX API. It provides " "a Java implementation and online documentation. Links to implementations " "and historical information are also available." msgstr "" -#: ../../library/xml.sax.rst:150 +#: ../../library/xml.sax.rst:149 msgid "Module :mod:`xml.sax.handler`" msgstr "" -#: ../../library/xml.sax.rst:151 +#: ../../library/xml.sax.rst:150 msgid "Definitions of the interfaces for application-provided objects." msgstr "" -#: ../../library/xml.sax.rst:153 +#: ../../library/xml.sax.rst:152 msgid "Module :mod:`xml.sax.saxutils`" msgstr "" -#: ../../library/xml.sax.rst:154 +#: ../../library/xml.sax.rst:153 msgid "Convenience functions for use in SAX applications." msgstr "" -#: ../../library/xml.sax.rst:156 +#: ../../library/xml.sax.rst:155 msgid "Module :mod:`xml.sax.xmlreader`" msgstr "" -#: ../../library/xml.sax.rst:157 +#: ../../library/xml.sax.rst:156 msgid "Definitions of the interfaces for parser-provided objects." msgstr "" -#: ../../library/xml.sax.rst:163 +#: ../../library/xml.sax.rst:162 msgid "SAXException Objects" msgstr "" -#: ../../library/xml.sax.rst:165 +#: ../../library/xml.sax.rst:164 msgid "" "The :class:`SAXException` exception class supports the following methods:" msgstr "" -#: ../../library/xml.sax.rst:170 +#: ../../library/xml.sax.rst:169 msgid "Return a human-readable message describing the error condition." msgstr "" -#: ../../library/xml.sax.rst:175 +#: ../../library/xml.sax.rst:174 msgid "Return an encapsulated exception object, or ``None``." msgstr "" diff --git a/library/xml.sax.reader.po b/library/xml.sax.reader.po index c8c1693f3..1e64f5faf 100644 --- a/library/xml.sax.reader.po +++ b/library/xml.sax.reader.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:18+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/xml.sax.utils.po b/library/xml.sax.utils.po index 0ff98ab4b..d08b5c526 100644 --- a/library/xml.sax.utils.po +++ b/library/xml.sax.utils.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:18+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/xmlrpc.client.po b/library/xmlrpc.client.po index 7f825b22c..8cdf07403 100644 --- a/library/xmlrpc.client.po +++ b/library/xmlrpc.client.po @@ -1,19 +1,20 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2025, Python Software Foundation +# Copyright (C) 2001 Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Python 3.13\n" +"Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-02 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:18+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -42,8 +43,8 @@ msgstr "" #: ../../library/xmlrpc.client.rst:26 msgid "" "The :mod:`xmlrpc.client` module is not secure against maliciously " -"constructed data. If you need to parse untrusted or unauthenticated data " -"see :ref:`xml-vulnerabilities`." +"constructed data. If you need to parse untrusted or unauthenticated data, " +"see :ref:`xml-security`." msgstr "" #: ../../library/xmlrpc.client.rst:32 diff --git a/library/xmlrpc.po b/library/xmlrpc.po index 7e5f5f51b..a0aece4d3 100644 --- a/library/xmlrpc.po +++ b/library/xmlrpc.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:18+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/xmlrpc.server.po b/library/xmlrpc.server.po index 7d1de6954..801890333 100644 --- a/library/xmlrpc.server.po +++ b/library/xmlrpc.server.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:18+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -41,8 +42,8 @@ msgstr "" #: ../../library/xmlrpc.server.rst:22 msgid "" "The :mod:`xmlrpc.server` module is not secure against maliciously " -"constructed data. If you need to parse untrusted or unauthenticated data " -"see :ref:`xml-vulnerabilities`." +"constructed data. If you need to parse untrusted or unauthenticated data, " +"see :ref:`xml-security`." msgstr "" #: ../../includes/wasm-notavail.rst:3 diff --git a/library/zipapp.po b/library/zipapp.po index dbb696373..cd5911b76 100644 --- a/library/zipapp.po +++ b/library/zipapp.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:18+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/zipfile.po b/library/zipfile.po index 0fb1ad6fc..1d68f7844 100644 --- a/library/zipfile.po +++ b/library/zipfile.po @@ -3,13 +3,18 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# Gigahertz ., 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:18+0000\n" +"Last-Translator: Gigahertz ., 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -143,44 +148,59 @@ msgstr "" #: ../../library/zipfile.rst:134 msgid "" +"The numeric constant for Zstandard compression. This requires the :mod:" +"`compression.zstd` module." +msgstr "" + +#: ../../library/zipfile.rst:139 +msgid "" +"In APPNOTE 6.3.7, the method ID ``20`` was assigned to Zstandard " +"compression. This was changed in APPNOTE 6.3.8 to method ID ``93`` to avoid " +"conflicts, with method ID ``20`` being deprecated. For compatibility, the :" +"mod:`!zipfile` module reads both method IDs but will only write data with " +"method ID ``93``." +msgstr "" + +#: ../../library/zipfile.rst:149 +msgid "" "The ZIP file format specification has included support for bzip2 compression " -"since 2001, and for LZMA compression since 2006. However, some tools " -"(including older Python releases) do not support these compression methods, " -"and may either refuse to process the ZIP file altogether, or fail to extract " -"individual files." +"since 2001, for LZMA compression since 2006, and Zstandard compression since " +"2020. However, some tools (including older Python releases) do not support " +"these compression methods, and may either refuse to process the ZIP file " +"altogether, or fail to extract individual files." msgstr "" -#: ../../library/zipfile.rst:143 +#: ../../library/zipfile.rst:157 msgid "`PKZIP Application Note`_" msgstr "" -#: ../../library/zipfile.rst:144 +#: ../../library/zipfile.rst:158 msgid "" "Documentation on the ZIP file format by Phil Katz, the creator of the format " "and algorithms used." msgstr "" -#: ../../library/zipfile.rst:147 +#: ../../library/zipfile.rst:161 msgid "`Info-ZIP Home Page `_" msgstr "" -#: ../../library/zipfile.rst:148 +#: ../../library/zipfile.rst:162 msgid "" "Information about the Info-ZIP project's ZIP archive programs and " "development libraries." msgstr "" -#: ../../library/zipfile.rst:155 +#: ../../library/zipfile.rst:169 msgid "ZipFile Objects" msgstr "" -#: ../../library/zipfile.rst:162 +#: ../../library/zipfile.rst:176 msgid "" "Open a ZIP file, where *file* can be a path to a file (a string), a file-" "like object or a :term:`path-like object`." msgstr "" -#: ../../library/zipfile.rst:165 +#: ../../library/zipfile.rst:179 msgid "" "The *mode* parameter should be ``'r'`` to read an existing file, ``'w'`` to " "truncate and write a new file, ``'a'`` to append to an existing file, or " @@ -194,18 +214,19 @@ msgid "" "``'r'`` or ``'a'``, the file should be seekable." msgstr "" -#: ../../library/zipfile.rst:177 +#: ../../library/zipfile.rst:191 msgid "" "*compression* is the ZIP compression method to use when writing the archive, " -"and should be :const:`ZIP_STORED`, :const:`ZIP_DEFLATED`, :const:`ZIP_BZIP2` " -"or :const:`ZIP_LZMA`; unrecognized values will cause :exc:" -"`NotImplementedError` to be raised. If :const:`ZIP_DEFLATED`, :const:" -"`ZIP_BZIP2` or :const:`ZIP_LZMA` is specified but the corresponding module (:" -"mod:`zlib`, :mod:`bz2` or :mod:`lzma`) is not available, :exc:`RuntimeError` " -"is raised. The default is :const:`ZIP_STORED`." +"and should be :const:`ZIP_STORED`, :const:`ZIP_DEFLATED`, :const:" +"`ZIP_BZIP2`, :const:`ZIP_LZMA`, or :const:`ZIP_ZSTANDARD`; unrecognized " +"values will cause :exc:`NotImplementedError` to be raised. If :const:" +"`ZIP_DEFLATED`, :const:`ZIP_BZIP2`, :const:`ZIP_LZMA`, or :const:" +"`ZIP_ZSTANDARD` is specified but the corresponding module (:mod:`zlib`, :mod:" +"`bz2`, :mod:`lzma`, or :mod:`compression.zstd`) is not available, :exc:" +"`RuntimeError` is raised. The default is :const:`ZIP_STORED`." msgstr "" -#: ../../library/zipfile.rst:185 +#: ../../library/zipfile.rst:200 msgid "" "If *allowZip64* is ``True`` (the default) zipfile will create ZIP files that " "use the ZIP64 extensions when the zipfile is larger than 4 GiB. If it is " @@ -213,17 +234,21 @@ msgid "" "require ZIP64 extensions." msgstr "" -#: ../../library/zipfile.rst:190 +#: ../../library/zipfile.rst:205 msgid "" "The *compresslevel* parameter controls the compression level to use when " "writing files to the archive. When using :const:`ZIP_STORED` or :const:" "`ZIP_LZMA` it has no effect. When using :const:`ZIP_DEFLATED` integers ``0`` " "through ``9`` are accepted (see :class:`zlib ` for more " "information). When using :const:`ZIP_BZIP2` integers ``1`` through ``9`` are " -"accepted (see :class:`bz2 ` for more information)." +"accepted (see :class:`bz2 ` for more information). When using :" +"const:`ZIP_ZSTANDARD` integers ``-131072`` through ``22`` are commonly " +"accepted (see :attr:`CompressionParameter.compression_level ` for more on retrieving valid " +"values and their meaning)." msgstr "" -#: ../../library/zipfile.rst:198 ../../library/zipfile.rst:787 +#: ../../library/zipfile.rst:217 ../../library/zipfile.rst:807 msgid "" "The *strict_timestamps* argument, when set to ``False``, allows to zip files " "older than 1980-01-01 at the cost of setting the timestamp to 1980-01-01. " @@ -231,40 +256,40 @@ msgid "" "also set to the limit." msgstr "" -#: ../../library/zipfile.rst:204 +#: ../../library/zipfile.rst:223 msgid "" "When mode is ``'r'``, *metadata_encoding* may be set to the name of a codec, " "which will be used to decode metadata such as the names of members and ZIP " "comments." msgstr "" -#: ../../library/zipfile.rst:208 +#: ../../library/zipfile.rst:227 msgid "" "If the file is created with mode ``'w'``, ``'x'`` or ``'a'`` and then :meth:" "`closed ` without adding any files to the archive, the appropriate " "ZIP structures for an empty archive will be written to the file." msgstr "" -#: ../../library/zipfile.rst:212 +#: ../../library/zipfile.rst:231 msgid "" "ZipFile is also a context manager and therefore supports the :keyword:`with` " "statement. In the example, *myzip* is closed after the :keyword:`!with` " "statement's suite is finished---even if an exception occurs::" msgstr "" -#: ../../library/zipfile.rst:216 +#: ../../library/zipfile.rst:235 msgid "" "with ZipFile('spam.zip', 'w') as myzip:\n" " myzip.write('eggs.txt')" msgstr "" -#: ../../library/zipfile.rst:221 +#: ../../library/zipfile.rst:240 msgid "" "*metadata_encoding* is an instance-wide setting for the ZipFile. It is not " "currently possible to set this on a per-member basis." msgstr "" -#: ../../library/zipfile.rst:224 +#: ../../library/zipfile.rst:243 msgid "" "This attribute is a workaround for legacy implementations which produce " "archives with names in the current locale encoding or code page (mostly on " @@ -274,73 +299,73 @@ msgid "" "is a Python-specific extension." msgstr "" -#: ../../library/zipfile.rst:232 +#: ../../library/zipfile.rst:251 msgid "Added the ability to use :class:`ZipFile` as a context manager." msgstr "" -#: ../../library/zipfile.rst:235 +#: ../../library/zipfile.rst:254 msgid "Added support for :mod:`bzip2 ` and :mod:`lzma` compression." msgstr "" -#: ../../library/zipfile.rst:238 ../../library/zipfile.rst:700 +#: ../../library/zipfile.rst:257 ../../library/zipfile.rst:720 msgid "ZIP64 extensions are enabled by default." msgstr "" -#: ../../library/zipfile.rst:241 +#: ../../library/zipfile.rst:260 msgid "" "Added support for writing to unseekable streams. Added support for the " "``'x'`` mode." msgstr "" -#: ../../library/zipfile.rst:245 +#: ../../library/zipfile.rst:264 msgid "" "Previously, a plain :exc:`RuntimeError` was raised for unrecognized " "compression values." msgstr "" -#: ../../library/zipfile.rst:249 +#: ../../library/zipfile.rst:268 msgid "The *file* parameter accepts a :term:`path-like object`." msgstr "" -#: ../../library/zipfile.rst:252 +#: ../../library/zipfile.rst:271 msgid "Add the *compresslevel* parameter." msgstr "" -#: ../../library/zipfile.rst:255 +#: ../../library/zipfile.rst:274 msgid "The *strict_timestamps* keyword-only parameter." msgstr "" -#: ../../library/zipfile.rst:258 +#: ../../library/zipfile.rst:277 msgid "" "Added support for specifying member name encoding for reading metadata in " "the zipfile's directory and file headers." msgstr "" -#: ../../library/zipfile.rst:265 +#: ../../library/zipfile.rst:284 msgid "" "Close the archive file. You must call :meth:`close` before exiting your " "program or essential records will not be written." msgstr "" -#: ../../library/zipfile.rst:271 +#: ../../library/zipfile.rst:290 msgid "" "Return a :class:`ZipInfo` object with information about the archive member " "*name*. Calling :meth:`getinfo` for a name not currently contained in the " "archive will raise a :exc:`KeyError`." msgstr "" -#: ../../library/zipfile.rst:278 +#: ../../library/zipfile.rst:297 msgid "" "Return a list containing a :class:`ZipInfo` object for each member of the " "archive. The objects are in the same order as their entries in the actual " "ZIP file on disk if an existing archive was opened." msgstr "" -#: ../../library/zipfile.rst:285 +#: ../../library/zipfile.rst:304 msgid "Return a list of archive members by name." msgstr "" -#: ../../library/zipfile.rst:290 +#: ../../library/zipfile.rst:309 msgid "" "Access a member of the archive as a binary file-like object. *name* can be " "either the name of a file within the archive or a :class:`ZipInfo` object. " @@ -349,20 +374,20 @@ msgid "" "class:`bytes` object." msgstr "" -#: ../../library/zipfile.rst:296 +#: ../../library/zipfile.rst:315 msgid "" ":meth:`~ZipFile.open` is also a context manager and therefore supports the :" "keyword:`with` statement::" msgstr "" -#: ../../library/zipfile.rst:299 +#: ../../library/zipfile.rst:318 msgid "" "with ZipFile('spam.zip') as myzip:\n" " with myzip.open('eggs.txt') as myfile:\n" " print(myfile.read())" msgstr "" -#: ../../library/zipfile.rst:303 +#: ../../library/zipfile.rst:322 msgid "" "With *mode* ``'r'`` the file-like object (``ZipExtFile``) is read-only and " "provides the following methods: :meth:`~io.BufferedIOBase.read`, :meth:`~io." @@ -371,7 +396,7 @@ msgid "" "__next__`. These objects can operate independently of the ZipFile." msgstr "" -#: ../../library/zipfile.rst:310 +#: ../../library/zipfile.rst:329 msgid "" "With ``mode='w'``, a writable file handle is returned, which supports the :" "meth:`~io.BufferedIOBase.write` method. While a writable file handle is " @@ -379,14 +404,14 @@ msgid "" "exc:`ValueError`." msgstr "" -#: ../../library/zipfile.rst:315 +#: ../../library/zipfile.rst:334 msgid "" "In both cases the file-like object has also attributes :attr:`!name`, which " "is equivalent to the name of a file within the archive, and :attr:`!mode`, " "which is ``'rb'`` or ``'wb'`` depending on the input mode." msgstr "" -#: ../../library/zipfile.rst:319 +#: ../../library/zipfile.rst:338 msgid "" "When writing a file, if the file size is not known in advance but may exceed " "2 GiB, pass ``force_zip64=True`` to ensure that the header format is capable " @@ -395,39 +420,39 @@ msgid "" "as the *name* parameter." msgstr "" -#: ../../library/zipfile.rst:327 +#: ../../library/zipfile.rst:346 msgid "" "The :meth:`.open`, :meth:`read` and :meth:`extract` methods can take a " "filename or a :class:`ZipInfo` object. You will appreciate this when trying " "to read a ZIP file that contains members with duplicate names." msgstr "" -#: ../../library/zipfile.rst:331 +#: ../../library/zipfile.rst:350 msgid "" "Removed support of ``mode='U'``. Use :class:`io.TextIOWrapper` for reading " "compressed text files in :term:`universal newlines` mode." msgstr "" -#: ../../library/zipfile.rst:335 +#: ../../library/zipfile.rst:354 msgid "" ":meth:`ZipFile.open` can now be used to write files into the archive with " "the ``mode='w'`` option." msgstr "" -#: ../../library/zipfile.rst:339 +#: ../../library/zipfile.rst:358 msgid "" "Calling :meth:`.open` on a closed ZipFile will raise a :exc:`ValueError`. " "Previously, a :exc:`RuntimeError` was raised." msgstr "" -#: ../../library/zipfile.rst:343 +#: ../../library/zipfile.rst:362 msgid "" "Added attributes :attr:`!name` and :attr:`!mode` for the writeable file-like " "object. The value of the :attr:`!mode` attribute for the readable file-like " "object was changed from ``'r'`` to ``'rb'``." msgstr "" -#: ../../library/zipfile.rst:352 +#: ../../library/zipfile.rst:371 msgid "" "Extract a member from the archive to the current working directory; *member* " "must be its full name or a :class:`ZipInfo` object. Its file information is " @@ -436,11 +461,11 @@ msgid "" "*pwd* is the password used for encrypted files as a :class:`bytes` object." msgstr "" -#: ../../library/zipfile.rst:358 +#: ../../library/zipfile.rst:377 msgid "Returns the normalized path created (a directory or new file)." msgstr "" -#: ../../library/zipfile.rst:362 +#: ../../library/zipfile.rst:381 msgid "" "If a member filename is an absolute path, a drive/UNC sharepoint and leading " "(back)slashes will be stripped, e.g.: ``///foo/bar`` becomes ``foo/bar`` on " @@ -451,17 +476,17 @@ msgid "" "(``_``)." msgstr "" -#: ../../library/zipfile.rst:370 +#: ../../library/zipfile.rst:389 msgid "" "Calling :meth:`extract` on a closed ZipFile will raise a :exc:`ValueError`. " "Previously, a :exc:`RuntimeError` was raised." msgstr "" -#: ../../library/zipfile.rst:374 ../../library/zipfile.rst:397 +#: ../../library/zipfile.rst:393 ../../library/zipfile.rst:416 msgid "The *path* parameter accepts a :term:`path-like object`." msgstr "" -#: ../../library/zipfile.rst:380 +#: ../../library/zipfile.rst:399 msgid "" "Extract all members from the archive to the current working directory. " "*path* specifies a different directory to extract to. *members* is optional " @@ -469,7 +494,7 @@ msgid "" "password used for encrypted files as a :class:`bytes` object." msgstr "" -#: ../../library/zipfile.rst:387 +#: ../../library/zipfile.rst:406 msgid "" "Never extract archives from untrusted sources without prior inspection. It " "is possible that files are created outside of *path*, e.g. members that have " @@ -477,23 +502,23 @@ msgid "" "\"``. This module attempts to prevent that. See :meth:`extract` note." msgstr "" -#: ../../library/zipfile.rst:393 +#: ../../library/zipfile.rst:412 msgid "" "Calling :meth:`extractall` on a closed ZipFile will raise a :exc:" "`ValueError`. Previously, a :exc:`RuntimeError` was raised." msgstr "" -#: ../../library/zipfile.rst:403 +#: ../../library/zipfile.rst:422 msgid "Print a table of contents for the archive to ``sys.stdout``." msgstr "" -#: ../../library/zipfile.rst:408 +#: ../../library/zipfile.rst:427 msgid "" "Set *pwd* (a :class:`bytes` object) as default password to extract encrypted " "files." msgstr "" -#: ../../library/zipfile.rst:413 +#: ../../library/zipfile.rst:432 msgid "" "Return the bytes of the file *name* in the archive. *name* is the name of " "the file in the archive, or a :class:`ZipInfo` object. The archive must be " @@ -501,30 +526,30 @@ msgid "" "a :class:`bytes` object and, if specified, overrides the default password " "set with :meth:`setpassword`. Calling :meth:`read` on a ZipFile that uses a " "compression method other than :const:`ZIP_STORED`, :const:`ZIP_DEFLATED`, :" -"const:`ZIP_BZIP2` or :const:`ZIP_LZMA` will raise a :exc:" -"`NotImplementedError`. An error will also be raised if the corresponding " -"compression module is not available." +"const:`ZIP_BZIP2`, :const:`ZIP_LZMA`, or :const:`ZIP_ZSTANDARD` will raise " +"a :exc:`NotImplementedError`. An error will also be raised if the " +"corresponding compression module is not available." msgstr "" -#: ../../library/zipfile.rst:422 +#: ../../library/zipfile.rst:442 msgid "" "Calling :meth:`read` on a closed ZipFile will raise a :exc:`ValueError`. " "Previously, a :exc:`RuntimeError` was raised." msgstr "" -#: ../../library/zipfile.rst:429 +#: ../../library/zipfile.rst:449 msgid "" "Read all the files in the archive and check their CRC's and file headers. " "Return the name of the first bad file, or else return ``None``." msgstr "" -#: ../../library/zipfile.rst:432 +#: ../../library/zipfile.rst:452 msgid "" "Calling :meth:`testzip` on a closed ZipFile will raise a :exc:`ValueError`. " "Previously, a :exc:`RuntimeError` was raised." msgstr "" -#: ../../library/zipfile.rst:440 +#: ../../library/zipfile.rst:460 msgid "" "Write the file named *filename* to the archive, giving it the archive name " "*arcname* (by default, this will be the same as *filename*, but without a " @@ -535,7 +560,7 @@ msgid "" "``'x'`` or ``'a'``." msgstr "" -#: ../../library/zipfile.rst:450 +#: ../../library/zipfile.rst:470 msgid "" "The ZIP file standard historically did not specify a metadata encoding, but " "strongly recommended CP437 (the original IBM PC encoding) for " @@ -545,33 +570,33 @@ msgid "" "in any encoding other than ASCII or UTF-8." msgstr "" -#: ../../library/zipfile.rst:459 +#: ../../library/zipfile.rst:479 msgid "" "Archive names should be relative to the archive root, that is, they should " "not start with a path separator." msgstr "" -#: ../../library/zipfile.rst:464 +#: ../../library/zipfile.rst:484 msgid "" "If ``arcname`` (or ``filename``, if ``arcname`` is not given) contains a " "null byte, the name of the file in the archive will be truncated at the null " "byte." msgstr "" -#: ../../library/zipfile.rst:469 +#: ../../library/zipfile.rst:489 msgid "" "A leading slash in the filename may lead to the archive being impossible to " "open in some zip programs on Windows systems." msgstr "" -#: ../../library/zipfile.rst:472 +#: ../../library/zipfile.rst:492 msgid "" "Calling :meth:`write` on a ZipFile created with mode ``'r'`` or a closed " "ZipFile will raise a :exc:`ValueError`. Previously, a :exc:`RuntimeError` " "was raised." msgstr "" -#: ../../library/zipfile.rst:481 +#: ../../library/zipfile.rst:501 msgid "" "Write a file into the archive. The contents is *data*, which may be either " "a :class:`str` or a :class:`bytes` instance; if it is a :class:`str`, it is " @@ -582,7 +607,7 @@ msgid "" "must be opened with mode ``'w'``, ``'x'`` or ``'a'``." msgstr "" -#: ../../library/zipfile.rst:489 +#: ../../library/zipfile.rst:509 msgid "" "If given, *compress_type* overrides the value given for the *compression* " "parameter to the constructor for the new entry, or in the *zinfo_or_arcname* " @@ -590,7 +615,7 @@ msgid "" "override the constructor if given." msgstr "" -#: ../../library/zipfile.rst:496 +#: ../../library/zipfile.rst:516 msgid "" "When passing a :class:`ZipInfo` instance as the *zinfo_or_arcname* " "parameter, the compression method used will be that specified in the " @@ -598,18 +623,18 @@ msgid "" "the :class:`ZipInfo` constructor sets this member to :const:`ZIP_STORED`." msgstr "" -#: ../../library/zipfile.rst:501 +#: ../../library/zipfile.rst:521 msgid "The *compress_type* argument." msgstr "" -#: ../../library/zipfile.rst:504 +#: ../../library/zipfile.rst:524 msgid "" "Calling :meth:`writestr` on a ZipFile created with mode ``'r'`` or a closed " "ZipFile will raise a :exc:`ValueError`. Previously, a :exc:`RuntimeError` " "was raised." msgstr "" -#: ../../library/zipfile.rst:511 +#: ../../library/zipfile.rst:531 msgid "" "Create a directory inside the archive. If *zinfo_or_directory* is a string, " "a directory is created inside the archive with the mode that is specified in " @@ -617,26 +642,26 @@ msgid "" "instance then the *mode* argument is ignored." msgstr "" -#: ../../library/zipfile.rst:516 +#: ../../library/zipfile.rst:536 msgid "The archive must be opened with mode ``'w'``, ``'x'`` or ``'a'``." msgstr "" -#: ../../library/zipfile.rst:521 +#: ../../library/zipfile.rst:541 msgid "The following data attributes are also available:" msgstr "" -#: ../../library/zipfile.rst:525 +#: ../../library/zipfile.rst:545 msgid "Name of the ZIP file." msgstr "" -#: ../../library/zipfile.rst:529 +#: ../../library/zipfile.rst:549 msgid "" "The level of debug output to use. This may be set from ``0`` (the default, " "no output) to ``3`` (the most output). Debugging information is written to " "``sys.stdout``." msgstr "" -#: ../../library/zipfile.rst:535 +#: ../../library/zipfile.rst:555 msgid "" "The comment associated with the ZIP file as a :class:`bytes` object. If " "assigning a comment to a :class:`ZipFile` instance created with mode " @@ -644,7 +669,7 @@ msgid "" "Comments longer than this will be truncated." msgstr "" -#: ../../library/zipfile.rst:543 +#: ../../library/zipfile.rst:563 msgid "" "The offset to the start of ZIP data from the beginning of the file. When " "the :class:`ZipFile` is opened in either mode ``'w'`` or ``'x'`` and the " @@ -652,24 +677,24 @@ msgid "" "instead." msgstr "" -#: ../../library/zipfile.rst:553 +#: ../../library/zipfile.rst:573 msgid "Path Objects" msgstr "" -#: ../../library/zipfile.rst:557 +#: ../../library/zipfile.rst:577 msgid "" "Construct a Path object from a ``root`` zipfile (which may be a :class:" "`ZipFile` instance or ``file`` suitable for passing to the :class:`ZipFile` " "constructor)." msgstr "" -#: ../../library/zipfile.rst:561 +#: ../../library/zipfile.rst:581 msgid "" "``at`` specifies the location of this Path within the zipfile, e.g. 'dir/" "file.txt', 'dir/', or ''. Defaults to the empty string, indicating the root." msgstr "" -#: ../../library/zipfile.rst:566 +#: ../../library/zipfile.rst:586 msgid "" "The :class:`Path` class does not sanitize filenames within the ZIP archive. " "Unlike the :meth:`ZipFile.extract` and :meth:`ZipFile.extractall` methods, " @@ -680,20 +705,20 @@ msgid "" "directory with :func:`os.path.commonpath`." msgstr "" -#: ../../library/zipfile.rst:573 +#: ../../library/zipfile.rst:593 msgid "" "Path objects expose the following features of :mod:`pathlib.Path` objects:" msgstr "" -#: ../../library/zipfile.rst:576 +#: ../../library/zipfile.rst:596 msgid "Path objects are traversable using the ``/`` operator or ``joinpath``." msgstr "" -#: ../../library/zipfile.rst:580 +#: ../../library/zipfile.rst:600 msgid "The final path component." msgstr "" -#: ../../library/zipfile.rst:584 +#: ../../library/zipfile.rst:604 msgid "" "Invoke :meth:`ZipFile.open` on the current path. Allows opening for read or " "write, text or binary through supported modes: 'r', 'w', 'rb', 'wb'. " @@ -702,12 +727,12 @@ msgid "" "``pwd`` parameter to :meth:`ZipFile.open`." msgstr "" -#: ../../library/zipfile.rst:593 +#: ../../library/zipfile.rst:613 msgid "" "Added support for text and binary modes for open. Default mode is now text." msgstr "" -#: ../../library/zipfile.rst:597 ../../library/zipfile.rst:658 +#: ../../library/zipfile.rst:617 ../../library/zipfile.rst:678 msgid "" "The ``encoding`` parameter can be supplied as a positional argument without " "causing a :exc:`TypeError`. As it could in 3.9. Code needing to be " @@ -715,134 +740,134 @@ msgid "" "TextIOWrapper` arguments, ``encoding`` included, as keywords." msgstr "" -#: ../../library/zipfile.rst:605 +#: ../../library/zipfile.rst:625 msgid "Enumerate the children of the current directory." msgstr "" -#: ../../library/zipfile.rst:609 +#: ../../library/zipfile.rst:629 msgid "Return ``True`` if the current context references a directory." msgstr "" -#: ../../library/zipfile.rst:613 +#: ../../library/zipfile.rst:633 msgid "Return ``True`` if the current context references a file." msgstr "" -#: ../../library/zipfile.rst:617 +#: ../../library/zipfile.rst:637 msgid "Return ``True`` if the current context references a symbolic link." msgstr "" -#: ../../library/zipfile.rst:621 +#: ../../library/zipfile.rst:641 msgid "Previously, ``is_symlink`` would unconditionally return ``False``." msgstr "" -#: ../../library/zipfile.rst:626 +#: ../../library/zipfile.rst:646 msgid "" "Return ``True`` if the current context references a file or directory in the " "zip file." msgstr "" -#: ../../library/zipfile.rst:631 +#: ../../library/zipfile.rst:651 msgid "" "The last dot-separated portion of the final component, if any. This is " "commonly called the file extension." msgstr "" -#: ../../library/zipfile.rst:634 +#: ../../library/zipfile.rst:654 msgid "Added :data:`Path.suffix` property." msgstr "" -#: ../../library/zipfile.rst:639 +#: ../../library/zipfile.rst:659 msgid "The final path component, without its suffix." msgstr "" -#: ../../library/zipfile.rst:641 +#: ../../library/zipfile.rst:661 msgid "Added :data:`Path.stem` property." msgstr "" -#: ../../library/zipfile.rst:646 +#: ../../library/zipfile.rst:666 msgid "A list of the path’s suffixes, commonly called file extensions." msgstr "" -#: ../../library/zipfile.rst:648 +#: ../../library/zipfile.rst:668 msgid "Added :data:`Path.suffixes` property." msgstr "" -#: ../../library/zipfile.rst:653 +#: ../../library/zipfile.rst:673 msgid "" "Read the current file as unicode text. Positional and keyword arguments are " "passed through to :class:`io.TextIOWrapper` (except ``buffer``, which is " "implied by the context)." msgstr "" -#: ../../library/zipfile.rst:666 +#: ../../library/zipfile.rst:686 msgid "Read the current file as bytes." msgstr "" -#: ../../library/zipfile.rst:670 +#: ../../library/zipfile.rst:690 msgid "" "Return a new Path object with each of the *other* arguments joined. The " "following are equivalent::" msgstr "" -#: ../../library/zipfile.rst:673 +#: ../../library/zipfile.rst:693 msgid "" ">>> Path(...).joinpath('child').joinpath('grandchild')\n" ">>> Path(...).joinpath('child', 'grandchild')\n" ">>> Path(...) / 'child' / 'grandchild'" msgstr "" -#: ../../library/zipfile.rst:677 +#: ../../library/zipfile.rst:697 msgid "" "Prior to 3.10, ``joinpath`` was undocumented and accepted exactly one " "parameter." msgstr "" -#: ../../library/zipfile.rst:681 +#: ../../library/zipfile.rst:701 msgid "" "The :pypi:`zipp` project provides backports of the latest path object " "functionality to older Pythons. Use ``zipp.Path`` in place of ``zipfile." "Path`` for early access to changes." msgstr "" -#: ../../library/zipfile.rst:689 +#: ../../library/zipfile.rst:709 msgid "PyZipFile Objects" msgstr "" -#: ../../library/zipfile.rst:691 +#: ../../library/zipfile.rst:711 msgid "" "The :class:`PyZipFile` constructor takes the same parameters as the :class:" "`ZipFile` constructor, and one additional parameter, *optimize*." msgstr "" -#: ../../library/zipfile.rst:697 +#: ../../library/zipfile.rst:717 msgid "Added the *optimize* parameter." msgstr "" -#: ../../library/zipfile.rst:703 +#: ../../library/zipfile.rst:723 msgid "" "Instances have one method in addition to those of :class:`ZipFile` objects:" msgstr "" -#: ../../library/zipfile.rst:707 +#: ../../library/zipfile.rst:727 msgid "" "Search for files :file:`\\*.py` and add the corresponding file to the " "archive." msgstr "" -#: ../../library/zipfile.rst:710 +#: ../../library/zipfile.rst:730 msgid "" "If the *optimize* parameter to :class:`PyZipFile` was not given or ``-1``, " "the corresponding file is a :file:`\\*.pyc` file, compiling if necessary." msgstr "" -#: ../../library/zipfile.rst:713 +#: ../../library/zipfile.rst:733 msgid "" "If the *optimize* parameter to :class:`PyZipFile` was ``0``, ``1`` or ``2``, " "only files with that optimization level (see :func:`compile`) are added to " "the archive, compiling if necessary." msgstr "" -#: ../../library/zipfile.rst:717 +#: ../../library/zipfile.rst:737 msgid "" "If *pathname* is a file, the filename must end with :file:`.py`, and just " "the (corresponding :file:`\\*.pyc`) file is added at the top level (no path " @@ -855,11 +880,11 @@ msgid "" "in sorted order." msgstr "" -#: ../../library/zipfile.rst:727 +#: ../../library/zipfile.rst:747 msgid "*basename* is intended for internal use only." msgstr "" -#: ../../library/zipfile.rst:729 +#: ../../library/zipfile.rst:749 msgid "" "*filterfunc*, if given, must be a function taking a single string argument. " "It will be passed each path (including each individual full file path) " @@ -870,7 +895,7 @@ msgid "" "exclude them::" msgstr "" -#: ../../library/zipfile.rst:737 +#: ../../library/zipfile.rst:757 msgid "" ">>> zf = PyZipFile('myprog.zip')\n" ">>> def notests(s):\n" @@ -880,11 +905,11 @@ msgid "" ">>> zf.writepy('myprog', filterfunc=notests)" msgstr "" -#: ../../library/zipfile.rst:744 +#: ../../library/zipfile.rst:764 msgid "The :meth:`writepy` method makes archives with file names like this::" msgstr "" -#: ../../library/zipfile.rst:747 +#: ../../library/zipfile.rst:767 msgid "" "string.pyc # Top level name\n" "test/__init__.pyc # Package directory\n" @@ -893,302 +918,302 @@ msgid "" "test/bogus/myfile.pyc # Submodule test.bogus.myfile" msgstr "" -#: ../../library/zipfile.rst:753 +#: ../../library/zipfile.rst:773 msgid "Added the *filterfunc* parameter." msgstr "" -#: ../../library/zipfile.rst:756 +#: ../../library/zipfile.rst:776 msgid "The *pathname* parameter accepts a :term:`path-like object`." msgstr "" -#: ../../library/zipfile.rst:759 +#: ../../library/zipfile.rst:779 msgid "Recursion sorts directory entries." msgstr "" -#: ../../library/zipfile.rst:766 +#: ../../library/zipfile.rst:786 msgid "ZipInfo Objects" msgstr "" -#: ../../library/zipfile.rst:768 +#: ../../library/zipfile.rst:788 msgid "" "Instances of the :class:`ZipInfo` class are returned by the :meth:`.getinfo` " "and :meth:`.infolist` methods of :class:`ZipFile` objects. Each object " "stores information about a single member of the ZIP archive." msgstr "" -#: ../../library/zipfile.rst:772 +#: ../../library/zipfile.rst:792 msgid "" "There is one classmethod to make a :class:`ZipInfo` instance for a " "filesystem file:" msgstr "" -#: ../../library/zipfile.rst:778 +#: ../../library/zipfile.rst:798 msgid "" "Construct a :class:`ZipInfo` instance for a file on the filesystem, in " "preparation for adding it to a zip file." msgstr "" -#: ../../library/zipfile.rst:781 +#: ../../library/zipfile.rst:801 msgid "*filename* should be the path to a file or directory on the filesystem." msgstr "" -#: ../../library/zipfile.rst:783 +#: ../../library/zipfile.rst:803 msgid "" "If *arcname* is specified, it is used as the name within the archive. If " "*arcname* is not specified, the name will be the same as *filename*, but " "with any drive letter and leading path separators removed." msgstr "" -#: ../../library/zipfile.rst:795 +#: ../../library/zipfile.rst:815 msgid "The *filename* parameter accepts a :term:`path-like object`." msgstr "" -#: ../../library/zipfile.rst:798 +#: ../../library/zipfile.rst:818 msgid "Added the *strict_timestamps* keyword-only parameter." msgstr "" -#: ../../library/zipfile.rst:802 +#: ../../library/zipfile.rst:822 msgid "Instances have the following methods and attributes:" msgstr "" -#: ../../library/zipfile.rst:806 +#: ../../library/zipfile.rst:826 msgid "Return ``True`` if this archive member is a directory." msgstr "" -#: ../../library/zipfile.rst:808 +#: ../../library/zipfile.rst:828 msgid "This uses the entry's name: directories should always end with ``/``." msgstr "" -#: ../../library/zipfile.rst:815 +#: ../../library/zipfile.rst:835 msgid "Name of the file in the archive." msgstr "" -#: ../../library/zipfile.rst:820 +#: ../../library/zipfile.rst:840 msgid "" "The time and date of the last modification to the archive member. This is a " "tuple of six values:" msgstr "" -#: ../../library/zipfile.rst:824 +#: ../../library/zipfile.rst:844 msgid "Index" msgstr "" -#: ../../library/zipfile.rst:824 +#: ../../library/zipfile.rst:844 msgid "Value" msgstr "" -#: ../../library/zipfile.rst:826 +#: ../../library/zipfile.rst:846 msgid "``0``" msgstr "" -#: ../../library/zipfile.rst:826 +#: ../../library/zipfile.rst:846 msgid "Year (>= 1980)" msgstr "" -#: ../../library/zipfile.rst:828 +#: ../../library/zipfile.rst:848 msgid "``1``" msgstr "" -#: ../../library/zipfile.rst:828 +#: ../../library/zipfile.rst:848 msgid "Month (one-based)" msgstr "" -#: ../../library/zipfile.rst:830 +#: ../../library/zipfile.rst:850 msgid "``2``" msgstr "" -#: ../../library/zipfile.rst:830 +#: ../../library/zipfile.rst:850 msgid "Day of month (one-based)" msgstr "" -#: ../../library/zipfile.rst:832 +#: ../../library/zipfile.rst:852 msgid "``3``" msgstr "" -#: ../../library/zipfile.rst:832 +#: ../../library/zipfile.rst:852 msgid "Hours (zero-based)" msgstr "" -#: ../../library/zipfile.rst:834 +#: ../../library/zipfile.rst:854 msgid "``4``" msgstr "" -#: ../../library/zipfile.rst:834 +#: ../../library/zipfile.rst:854 msgid "Minutes (zero-based)" msgstr "" -#: ../../library/zipfile.rst:836 +#: ../../library/zipfile.rst:856 msgid "``5``" msgstr "" -#: ../../library/zipfile.rst:836 +#: ../../library/zipfile.rst:856 msgid "Seconds (zero-based)" msgstr "" -#: ../../library/zipfile.rst:841 +#: ../../library/zipfile.rst:861 msgid "The ZIP file format does not support timestamps before 1980." msgstr "" -#: ../../library/zipfile.rst:846 +#: ../../library/zipfile.rst:866 msgid "Type of compression for the archive member." msgstr "" -#: ../../library/zipfile.rst:851 +#: ../../library/zipfile.rst:871 msgid "Comment for the individual archive member as a :class:`bytes` object." msgstr "" -#: ../../library/zipfile.rst:856 +#: ../../library/zipfile.rst:876 msgid "" "Expansion field data. The `PKZIP Application Note`_ contains some comments " "on the internal structure of the data contained in this :class:`bytes` " "object." msgstr "" -#: ../../library/zipfile.rst:863 +#: ../../library/zipfile.rst:883 msgid "System which created ZIP archive." msgstr "" -#: ../../library/zipfile.rst:868 +#: ../../library/zipfile.rst:888 msgid "PKZIP version which created ZIP archive." msgstr "" -#: ../../library/zipfile.rst:873 +#: ../../library/zipfile.rst:893 msgid "PKZIP version needed to extract archive." msgstr "" -#: ../../library/zipfile.rst:878 +#: ../../library/zipfile.rst:898 msgid "Must be zero." msgstr "" -#: ../../library/zipfile.rst:883 +#: ../../library/zipfile.rst:903 msgid "ZIP flag bits." msgstr "" -#: ../../library/zipfile.rst:888 +#: ../../library/zipfile.rst:908 msgid "Volume number of file header." msgstr "" -#: ../../library/zipfile.rst:893 +#: ../../library/zipfile.rst:913 msgid "Internal attributes." msgstr "" -#: ../../library/zipfile.rst:898 +#: ../../library/zipfile.rst:918 msgid "External file attributes." msgstr "" -#: ../../library/zipfile.rst:903 +#: ../../library/zipfile.rst:923 msgid "Byte offset to the file header." msgstr "" -#: ../../library/zipfile.rst:908 +#: ../../library/zipfile.rst:928 msgid "CRC-32 of the uncompressed file." msgstr "" -#: ../../library/zipfile.rst:913 +#: ../../library/zipfile.rst:933 msgid "Size of the compressed data." msgstr "" -#: ../../library/zipfile.rst:918 +#: ../../library/zipfile.rst:938 msgid "Size of the uncompressed file." msgstr "" -#: ../../library/zipfile.rst:925 +#: ../../library/zipfile.rst:945 msgid "Command-Line Interface" msgstr "" -#: ../../library/zipfile.rst:927 +#: ../../library/zipfile.rst:947 msgid "" "The :mod:`zipfile` module provides a simple command-line interface to " "interact with ZIP archives." msgstr "" -#: ../../library/zipfile.rst:930 +#: ../../library/zipfile.rst:950 msgid "" "If you want to create a new ZIP archive, specify its name after the :option:" "`-c` option and then list the filename(s) that should be included:" msgstr "" -#: ../../library/zipfile.rst:933 +#: ../../library/zipfile.rst:953 msgid "$ python -m zipfile -c monty.zip spam.txt eggs.txt" msgstr "" -#: ../../library/zipfile.rst:937 +#: ../../library/zipfile.rst:957 msgid "Passing a directory is also acceptable:" msgstr "" -#: ../../library/zipfile.rst:939 +#: ../../library/zipfile.rst:959 msgid "$ python -m zipfile -c monty.zip life-of-brian_1979/" msgstr "" -#: ../../library/zipfile.rst:943 +#: ../../library/zipfile.rst:963 msgid "" "If you want to extract a ZIP archive into the specified directory, use the :" "option:`-e` option:" msgstr "" -#: ../../library/zipfile.rst:946 +#: ../../library/zipfile.rst:966 msgid "$ python -m zipfile -e monty.zip target-dir/" msgstr "" -#: ../../library/zipfile.rst:950 +#: ../../library/zipfile.rst:970 msgid "For a list of the files in a ZIP archive, use the :option:`-l` option:" msgstr "" -#: ../../library/zipfile.rst:952 +#: ../../library/zipfile.rst:972 msgid "$ python -m zipfile -l monty.zip" msgstr "" -#: ../../library/zipfile.rst:958 +#: ../../library/zipfile.rst:978 msgid "Command-line options" msgstr "" -#: ../../library/zipfile.rst:963 +#: ../../library/zipfile.rst:983 msgid "List files in a zipfile." msgstr "" -#: ../../library/zipfile.rst:968 +#: ../../library/zipfile.rst:988 msgid "Create zipfile from source files." msgstr "" -#: ../../library/zipfile.rst:973 +#: ../../library/zipfile.rst:993 msgid "Extract zipfile into target directory." msgstr "" -#: ../../library/zipfile.rst:978 +#: ../../library/zipfile.rst:998 msgid "Test whether the zipfile is valid or not." msgstr "" -#: ../../library/zipfile.rst:982 +#: ../../library/zipfile.rst:1002 msgid "" "Specify encoding of member names for :option:`-l`, :option:`-e` and :option:" "`-t`." msgstr "" -#: ../../library/zipfile.rst:989 +#: ../../library/zipfile.rst:1009 msgid "Decompression pitfalls" msgstr "" -#: ../../library/zipfile.rst:991 +#: ../../library/zipfile.rst:1011 msgid "" "The extraction in zipfile module might fail due to some pitfalls listed " "below." msgstr "" -#: ../../library/zipfile.rst:994 +#: ../../library/zipfile.rst:1014 msgid "From file itself" msgstr "" -#: ../../library/zipfile.rst:996 +#: ../../library/zipfile.rst:1016 msgid "" "Decompression may fail due to incorrect password / CRC checksum / ZIP format " "or unsupported compression method / decryption." msgstr "" -#: ../../library/zipfile.rst:1000 +#: ../../library/zipfile.rst:1020 msgid "File System limitations" msgstr "" -#: ../../library/zipfile.rst:1002 +#: ../../library/zipfile.rst:1022 msgid "" "Exceeding limitations on different file systems can cause decompression " "failed. Such as allowable characters in the directory entries, length of the " @@ -1196,33 +1221,33 @@ msgid "" "files, etc." msgstr "" -#: ../../library/zipfile.rst:1009 +#: ../../library/zipfile.rst:1029 msgid "Resources limitations" msgstr "" -#: ../../library/zipfile.rst:1011 +#: ../../library/zipfile.rst:1031 msgid "" "The lack of memory or disk volume would lead to decompression failed. For " "example, decompression bombs (aka `ZIP bomb`_) apply to zipfile library that " "can cause disk volume exhaustion." msgstr "" -#: ../../library/zipfile.rst:1016 +#: ../../library/zipfile.rst:1036 msgid "Interruption" msgstr "" -#: ../../library/zipfile.rst:1018 +#: ../../library/zipfile.rst:1038 msgid "" "Interruption during the decompression, such as pressing control-C or killing " "the decompression process may result in incomplete decompression of the " "archive." msgstr "" -#: ../../library/zipfile.rst:1022 +#: ../../library/zipfile.rst:1042 msgid "Default behaviors of extraction" msgstr "" -#: ../../library/zipfile.rst:1024 +#: ../../library/zipfile.rst:1044 msgid "" "Not knowing the default extraction behaviors can cause unexpected " "decompression results. For example, when extracting the same archive twice, " diff --git a/library/zipimport.po b/library/zipimport.po index 1d0c146c5..a5af05ee2 100644 --- a/library/zipimport.po +++ b/library/zipimport.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:18+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/library/zlib.po b/library/zlib.po index 7056c446d..5d0ff10a1 100644 --- a/library/zlib.po +++ b/library/zlib.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 01:18+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/library/zoneinfo.po b/library/zoneinfo.po index 366c824dd..625e844d3 100644 --- a/library/zoneinfo.po +++ b/library/zoneinfo.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:19+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -475,11 +476,12 @@ msgstr "" #: ../../library/zoneinfo.rst:328 msgid "" -"``ZoneInfo.from_file(fobj, /, key=None)``: When constructed from a file, the " -"``ZoneInfo`` object raises an exception on pickling. If an end user wants to " -"pickle a ``ZoneInfo`` constructed from a file, it is recommended that they " -"use a wrapper type or a custom serialization function: either serializing by " -"key or storing the contents of the file object and serializing that." +"``ZoneInfo.from_file(file_obj, /, key=None)``: When constructed from a file, " +"the ``ZoneInfo`` object raises an exception on pickling. If an end user " +"wants to pickle a ``ZoneInfo`` constructed from a file, it is recommended " +"that they use a wrapper type or a custom serialization function: either " +"serializing by key or storing the contents of the file object and " +"serializing that." msgstr "" #: ../../library/zoneinfo.rst:334 diff --git a/license.po b/license.po index 0e5cd378e..344ee5e4a 100644 --- a/license.po +++ b/license.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:47+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/reference/compound_stmts.po b/reference/compound_stmts.po index 428afb5d1..3269e615d 100644 --- a/reference/compound_stmts.po +++ b/reference/compound_stmts.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:19+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -150,13 +151,13 @@ msgstr "" #: ../../reference/compound_stmts.rst:160 msgid "" -"The ``starred_list`` expression is evaluated once; it should yield an :term:" -"`iterable` object. An :term:`iterator` is created for that iterable. The " -"first item provided by the iterator is then assigned to the target list " -"using the standard rules for assignments (see :ref:`assignment`), and the " -"suite is executed. This repeats for each item provided by the iterator. " -"When the iterator is exhausted, the suite in the :keyword:`!else` clause, if " -"present, is executed, and the loop terminates." +"The :token:`~python-grammar:starred_expression_list` expression is evaluated " +"once; it should yield an :term:`iterable` object. An :term:`iterator` is " +"created for that iterable. The first item provided by the iterator is then " +"assigned to the target list using the standard rules for assignments (see :" +"ref:`assignment`), and the suite is executed. This repeats for each item " +"provided by the iterator. When the iterator is exhausted, the suite in the :" +"keyword:`!else` clause, if present, is executed, and the loop terminates." msgstr "" #: ../../reference/compound_stmts.rst:173 diff --git a/reference/datamodel.po b/reference/datamodel.po index 5d13ca936..25de16ecb 100644 --- a/reference/datamodel.po +++ b/reference/datamodel.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:19+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -319,11 +320,11 @@ msgid "" "``\"True\"`` are returned, respectively." msgstr "" -#: ../../reference/datamodel.rst:266 +#: ../../reference/datamodel.rst:268 msgid ":class:`numbers.Real` (:class:`float`)" msgstr "" -#: ../../reference/datamodel.rst:274 +#: ../../reference/datamodel.rst:276 msgid "" "These represent machine-level double precision floating-point numbers. You " "are at the mercy of the underlying machine architecture (and C or Java " @@ -334,11 +335,11 @@ msgid "" "complicate the language with two kinds of floating-point numbers." msgstr "" -#: ../../reference/datamodel.rst:284 +#: ../../reference/datamodel.rst:286 msgid ":class:`numbers.Complex` (:class:`complex`)" msgstr "" -#: ../../reference/datamodel.rst:290 +#: ../../reference/datamodel.rst:292 msgid "" "These represent complex numbers as a pair of machine-level double precision " "floating-point numbers. The same caveats apply as for floating-point " @@ -346,11 +347,11 @@ msgid "" "retrieved through the read-only attributes ``z.real`` and ``z.imag``." msgstr "" -#: ../../reference/datamodel.rst:297 +#: ../../reference/datamodel.rst:299 msgid "Sequences" msgstr "" -#: ../../reference/datamodel.rst:306 +#: ../../reference/datamodel.rst:308 msgid "" "These represent finite ordered sets indexed by non-negative numbers. The " "built-in function :func:`len` returns the number of items of a sequence. " @@ -361,7 +362,7 @@ msgid "" "second to last item of sequence a with length ``n``." msgstr "" -#: ../../reference/datamodel.rst:316 +#: ../../reference/datamodel.rst:318 msgid "" "Sequences also support slicing: ``a[i:j]`` selects all items with index *k* " "such that *i* ``<=`` *k* ``<`` *j*. When used as an expression, a slice is " @@ -369,22 +370,22 @@ msgid "" "applies to negative slice positions." msgstr "" -#: ../../reference/datamodel.rst:321 +#: ../../reference/datamodel.rst:323 msgid "" "Some sequences also support \"extended slicing\" with a third \"step\" " "parameter: ``a[i:j:k]`` selects all items of *a* with index *x* where ``x = " "i + n*k``, *n* ``>=`` ``0`` and *i* ``<=`` *x* ``<`` *j*." msgstr "" -#: ../../reference/datamodel.rst:325 +#: ../../reference/datamodel.rst:327 msgid "Sequences are distinguished according to their mutability:" msgstr "" -#: ../../reference/datamodel.rst:329 +#: ../../reference/datamodel.rst:331 msgid "Immutable sequences" msgstr "" -#: ../../reference/datamodel.rst:335 +#: ../../reference/datamodel.rst:337 msgid "" "An object of an immutable sequence type cannot change once it is created. " "(If the object contains references to other objects, these other objects may " @@ -392,15 +393,15 @@ msgid "" "referenced by an immutable object cannot change.)" msgstr "" -#: ../../reference/datamodel.rst:340 +#: ../../reference/datamodel.rst:342 msgid "The following types are immutable sequences:" msgstr "" -#: ../../reference/datamodel.rst:345 +#: ../../reference/datamodel.rst:347 msgid "Strings" msgstr "" -#: ../../reference/datamodel.rst:353 +#: ../../reference/datamodel.rst:355 msgid "" "A string is a sequence of values that represent Unicode code points. All the " "code points in the range ``U+0000 - U+10FFFF`` can be represented in a " @@ -414,11 +415,11 @@ msgid "" "to achieve the opposite." msgstr "" -#: ../../reference/datamodel.rst:365 +#: ../../reference/datamodel.rst:367 msgid "Tuples" msgstr "" -#: ../../reference/datamodel.rst:371 +#: ../../reference/datamodel.rst:373 msgid "" "The items of a tuple are arbitrary Python objects. Tuples of two or more " "items are formed by comma-separated lists of expressions. A tuple of one " @@ -428,11 +429,11 @@ msgid "" "empty pair of parentheses." msgstr "" -#: ../../reference/datamodel.rst:378 +#: ../../reference/datamodel.rst:380 msgid "Bytes" msgstr "" -#: ../../reference/datamodel.rst:381 +#: ../../reference/datamodel.rst:383 msgid "" "A bytes object is an immutable array. The items are 8-bit bytes, " "represented by integers in the range 0 <= x < 256. Bytes literals (like " @@ -441,43 +442,43 @@ msgid "" "`~bytes.decode` method." msgstr "" -#: ../../reference/datamodel.rst:389 +#: ../../reference/datamodel.rst:391 msgid "Mutable sequences" msgstr "" -#: ../../reference/datamodel.rst:398 +#: ../../reference/datamodel.rst:400 msgid "" "Mutable sequences can be changed after they are created. The subscription " "and slicing notations can be used as the target of assignment and :keyword:" "`del` (delete) statements." msgstr "" -#: ../../reference/datamodel.rst:406 +#: ../../reference/datamodel.rst:408 msgid "" "The :mod:`collections` and :mod:`array` module provide additional examples " "of mutable sequence types." msgstr "" -#: ../../reference/datamodel.rst:409 +#: ../../reference/datamodel.rst:411 msgid "There are currently two intrinsic mutable sequence types:" msgstr "" -#: ../../reference/datamodel.rst:411 +#: ../../reference/datamodel.rst:413 msgid "Lists" msgstr "" -#: ../../reference/datamodel.rst:414 +#: ../../reference/datamodel.rst:416 msgid "" "The items of a list are arbitrary Python objects. Lists are formed by " "placing a comma-separated list of expressions in square brackets. (Note that " "there are no special cases needed to form lists of length 0 or 1.)" msgstr "" -#: ../../reference/datamodel.rst:418 +#: ../../reference/datamodel.rst:420 msgid "Byte Arrays" msgstr "" -#: ../../reference/datamodel.rst:421 +#: ../../reference/datamodel.rst:423 msgid "" "A bytearray object is a mutable array. They are created by the built-in :" "func:`bytearray` constructor. Aside from being mutable (and hence " @@ -485,11 +486,11 @@ msgid "" "functionality as immutable :class:`bytes` objects." msgstr "" -#: ../../reference/datamodel.rst:428 +#: ../../reference/datamodel.rst:430 msgid "Set types" msgstr "" -#: ../../reference/datamodel.rst:434 +#: ../../reference/datamodel.rst:436 msgid "" "These represent unordered, finite sets of unique, immutable objects. As " "such, they cannot be indexed by any subscript. However, they can be iterated " @@ -499,7 +500,7 @@ msgid "" "union, difference, and symmetric difference." msgstr "" -#: ../../reference/datamodel.rst:441 +#: ../../reference/datamodel.rst:443 msgid "" "For set elements, the same immutability rules apply as for dictionary keys. " "Note that numeric types obey the normal rules for numeric comparison: if two " @@ -507,37 +508,37 @@ msgid "" "contained in a set." msgstr "" -#: ../../reference/datamodel.rst:446 +#: ../../reference/datamodel.rst:448 msgid "There are currently two intrinsic set types:" msgstr "" -#: ../../reference/datamodel.rst:449 +#: ../../reference/datamodel.rst:451 msgid "Sets" msgstr "" -#: ../../reference/datamodel.rst:452 +#: ../../reference/datamodel.rst:454 msgid "" "These represent a mutable set. They are created by the built-in :func:`set` " "constructor and can be modified afterwards by several methods, such as :meth:" "`~set.add`." msgstr "" -#: ../../reference/datamodel.rst:457 +#: ../../reference/datamodel.rst:459 msgid "Frozen sets" msgstr "" -#: ../../reference/datamodel.rst:460 +#: ../../reference/datamodel.rst:462 msgid "" "These represent an immutable set. They are created by the built-in :func:" "`frozenset` constructor. As a frozenset is immutable and :term:`hashable`, " "it can be used again as an element of another set, or as a dictionary key." msgstr "" -#: ../../reference/datamodel.rst:467 +#: ../../reference/datamodel.rst:469 msgid "Mappings" msgstr "" -#: ../../reference/datamodel.rst:474 +#: ../../reference/datamodel.rst:476 msgid "" "These represent finite sets of objects indexed by arbitrary index sets. The " "subscript notation ``a[k]`` selects the item indexed by ``k`` from the " @@ -546,15 +547,15 @@ msgid "" "returns the number of items in a mapping." msgstr "" -#: ../../reference/datamodel.rst:480 +#: ../../reference/datamodel.rst:482 msgid "There is currently a single intrinsic mapping type:" msgstr "" -#: ../../reference/datamodel.rst:484 +#: ../../reference/datamodel.rst:486 msgid "Dictionaries" msgstr "" -#: ../../reference/datamodel.rst:488 +#: ../../reference/datamodel.rst:490 msgid "" "These represent finite sets of objects indexed by nearly arbitrary values. " "The only types of values not acceptable as keys are values containing lists " @@ -566,7 +567,7 @@ msgid "" "interchangeably to index the same dictionary entry." msgstr "" -#: ../../reference/datamodel.rst:497 +#: ../../reference/datamodel.rst:499 msgid "" "Dictionaries preserve insertion order, meaning that keys will be produced in " "the same order they were added sequentially over the dictionary. Replacing " @@ -574,131 +575,131 @@ msgid "" "inserting it will add it to the end instead of keeping its old place." msgstr "" -#: ../../reference/datamodel.rst:502 +#: ../../reference/datamodel.rst:504 msgid "" "Dictionaries are mutable; they can be created by the ``{}`` notation (see " "section :ref:`dict`)." msgstr "" -#: ../../reference/datamodel.rst:509 +#: ../../reference/datamodel.rst:511 msgid "" "The extension modules :mod:`dbm.ndbm` and :mod:`dbm.gnu` provide additional " "examples of mapping types, as does the :mod:`collections` module." msgstr "" -#: ../../reference/datamodel.rst:513 +#: ../../reference/datamodel.rst:515 msgid "" "Dictionaries did not preserve insertion order in versions of Python before " "3.6. In CPython 3.6, insertion order was preserved, but it was considered an " "implementation detail at that time rather than a language guarantee." msgstr "" -#: ../../reference/datamodel.rst:520 +#: ../../reference/datamodel.rst:522 msgid "Callable types" msgstr "" -#: ../../reference/datamodel.rst:528 +#: ../../reference/datamodel.rst:530 msgid "" "These are the types to which the function call operation (see section :ref:" "`calls`) can be applied:" msgstr "" -#: ../../reference/datamodel.rst:535 +#: ../../reference/datamodel.rst:537 msgid "User-defined functions" msgstr "" -#: ../../reference/datamodel.rst:542 +#: ../../reference/datamodel.rst:544 msgid "" "A user-defined function object is created by a function definition (see " "section :ref:`function`). It should be called with an argument list " "containing the same number of items as the function's formal parameter list." msgstr "" -#: ../../reference/datamodel.rst:548 ../../reference/datamodel.rst:1429 -#: ../../reference/datamodel.rst:1629 +#: ../../reference/datamodel.rst:550 ../../reference/datamodel.rst:1443 +#: ../../reference/datamodel.rst:1643 msgid "Special read-only attributes" msgstr "" -#: ../../reference/datamodel.rst:558 ../../reference/datamodel.rst:594 -#: ../../reference/datamodel.rst:1196 +#: ../../reference/datamodel.rst:560 ../../reference/datamodel.rst:596 +#: ../../reference/datamodel.rst:1198 msgid "Attribute" msgstr "" -#: ../../reference/datamodel.rst:559 ../../reference/datamodel.rst:595 -#: ../../reference/datamodel.rst:1197 +#: ../../reference/datamodel.rst:561 ../../reference/datamodel.rst:597 +#: ../../reference/datamodel.rst:1199 msgid "Meaning" msgstr "" -#: ../../reference/datamodel.rst:562 +#: ../../reference/datamodel.rst:564 msgid "" "A reference to the :class:`dictionary ` that holds the function's :ref:" "`global variables ` -- the global namespace of the module in which " "the function was defined." msgstr "" -#: ../../reference/datamodel.rst:567 +#: ../../reference/datamodel.rst:569 msgid "" "``None`` or a :class:`tuple` of cells that contain bindings for the names " "specified in the :attr:`~codeobject.co_freevars` attribute of the " "function's :attr:`code object `." msgstr "" -#: ../../reference/datamodel.rst:571 +#: ../../reference/datamodel.rst:573 msgid "" "A cell object has the attribute ``cell_contents``. This can be used to get " "the value of the cell, as well as set the value." msgstr "" -#: ../../reference/datamodel.rst:575 ../../reference/datamodel.rst:1671 +#: ../../reference/datamodel.rst:577 ../../reference/datamodel.rst:1685 msgid "Special writable attributes" msgstr "" -#: ../../reference/datamodel.rst:589 +#: ../../reference/datamodel.rst:591 msgid "Most of these attributes check the type of the assigned value:" msgstr "" -#: ../../reference/datamodel.rst:598 +#: ../../reference/datamodel.rst:600 msgid "The function's documentation string, or ``None`` if unavailable." msgstr "" -#: ../../reference/datamodel.rst:601 +#: ../../reference/datamodel.rst:603 msgid "" "The function's name. See also: :attr:`__name__ attributes `." msgstr "" -#: ../../reference/datamodel.rst:605 +#: ../../reference/datamodel.rst:607 msgid "" "The function's :term:`qualified name`. See also: :attr:`__qualname__ " "attributes `." msgstr "" -#: ../../reference/datamodel.rst:611 +#: ../../reference/datamodel.rst:613 msgid "" "The name of the module the function was defined in, or ``None`` if " "unavailable." msgstr "" -#: ../../reference/datamodel.rst:615 +#: ../../reference/datamodel.rst:617 msgid "" "A :class:`tuple` containing default :term:`parameter` values for those " "parameters that have defaults, or ``None`` if no parameters have a default " "value." msgstr "" -#: ../../reference/datamodel.rst:620 +#: ../../reference/datamodel.rst:622 msgid "" "The :ref:`code object ` representing the compiled function " "body." msgstr "" -#: ../../reference/datamodel.rst:624 +#: ../../reference/datamodel.rst:626 msgid "" "The namespace supporting arbitrary function attributes. See also: :attr:" "`__dict__ attributes `." msgstr "" -#: ../../reference/datamodel.rst:628 +#: ../../reference/datamodel.rst:630 msgid "" "A :class:`dictionary ` containing annotations of :term:`parameters " "`. The keys of the dictionary are the parameter names, and " @@ -706,101 +707,101 @@ msgid "" "__annotations__`." msgstr "" -#: ../../reference/datamodel.rst:634 ../../reference/datamodel.rst:1103 -#: ../../reference/datamodel.rst:1235 +#: ../../reference/datamodel.rst:636 ../../reference/datamodel.rst:1105 +#: ../../reference/datamodel.rst:1249 msgid "" "Annotations are now :ref:`lazily evaluated `. See :pep:" "`649`." msgstr "" -#: ../../reference/datamodel.rst:639 +#: ../../reference/datamodel.rst:641 msgid "" "The :term:`annotate function` for this function, or ``None`` if the function " "has no annotations. See :attr:`object.__annotate__`." msgstr "" -#: ../../reference/datamodel.rst:645 +#: ../../reference/datamodel.rst:647 msgid "" "A :class:`dictionary ` containing defaults for keyword-only :term:" "`parameters `." msgstr "" -#: ../../reference/datamodel.rst:649 +#: ../../reference/datamodel.rst:651 msgid "" "A :class:`tuple` containing the :ref:`type parameters ` of a :" "ref:`generic function `." msgstr "" -#: ../../reference/datamodel.rst:654 +#: ../../reference/datamodel.rst:656 msgid "" "Function objects also support getting and setting arbitrary attributes, " "which can be used, for example, to attach metadata to functions. Regular " "attribute dot-notation is used to get and set such attributes." msgstr "" -#: ../../reference/datamodel.rst:660 +#: ../../reference/datamodel.rst:662 msgid "" "CPython's current implementation only supports function attributes on user-" "defined functions. Function attributes on :ref:`built-in functions ` may be supported in the future." msgstr "" -#: ../../reference/datamodel.rst:665 +#: ../../reference/datamodel.rst:667 msgid "" "Additional information about a function's definition can be retrieved from " "its :ref:`code object ` (accessible via the :attr:`~function." "__code__` attribute)." msgstr "" -#: ../../reference/datamodel.rst:673 +#: ../../reference/datamodel.rst:675 msgid "Instance methods" msgstr "" -#: ../../reference/datamodel.rst:680 +#: ../../reference/datamodel.rst:682 msgid "" "An instance method object combines a class, a class instance and any " "callable object (normally a user-defined function)." msgstr "" -#: ../../reference/datamodel.rst:690 ../../reference/datamodel.rst:1767 +#: ../../reference/datamodel.rst:692 ../../reference/datamodel.rst:1781 msgid "Special read-only attributes:" msgstr "" -#: ../../reference/datamodel.rst:695 +#: ../../reference/datamodel.rst:697 msgid "" "Refers to the class instance object to which the method is :ref:`bound " "`" msgstr "" -#: ../../reference/datamodel.rst:699 +#: ../../reference/datamodel.rst:701 msgid "Refers to the original :ref:`function object `" msgstr "" -#: ../../reference/datamodel.rst:702 +#: ../../reference/datamodel.rst:704 msgid "" "The method's documentation (same as :attr:`method.__func__.__doc__ `). A :class:`string ` if the original function had a " "docstring, else ``None``." msgstr "" -#: ../../reference/datamodel.rst:708 +#: ../../reference/datamodel.rst:710 msgid "" "The name of the method (same as :attr:`method.__func__.__name__ `)" msgstr "" -#: ../../reference/datamodel.rst:712 +#: ../../reference/datamodel.rst:714 msgid "" "The name of the module the method was defined in, or ``None`` if unavailable." msgstr "" -#: ../../reference/datamodel.rst:715 +#: ../../reference/datamodel.rst:717 msgid "" "Methods also support accessing (but not setting) the arbitrary function " "attributes on the underlying :ref:`function object `." msgstr "" -#: ../../reference/datamodel.rst:718 +#: ../../reference/datamodel.rst:720 msgid "" "User-defined method objects may be created when getting an attribute of a " "class (perhaps via an instance of that class), if that attribute is a user-" @@ -808,7 +809,7 @@ msgid "" "`classmethod` object." msgstr "" -#: ../../reference/datamodel.rst:725 +#: ../../reference/datamodel.rst:727 msgid "" "When an instance method object is created by retrieving a user-defined :ref:" "`function object ` from a class via one of its " @@ -817,7 +818,7 @@ msgid "" "__func__` attribute is the original function object." msgstr "" -#: ../../reference/datamodel.rst:731 +#: ../../reference/datamodel.rst:733 msgid "" "When an instance method object is created by retrieving a :class:" "`classmethod` object from a class or instance, its :attr:`~method.__self__` " @@ -825,7 +826,7 @@ msgid "" "the function object underlying the class method." msgstr "" -#: ../../reference/datamodel.rst:736 +#: ../../reference/datamodel.rst:738 msgid "" "When an instance method object is called, the underlying function (:attr:" "`~method.__func__`) is called, inserting the class instance (:attr:`~method." @@ -835,7 +836,7 @@ msgid "" "f(x, 1)``." msgstr "" -#: ../../reference/datamodel.rst:743 +#: ../../reference/datamodel.rst:745 msgid "" "When an instance method object is derived from a :class:`classmethod` " "object, the \"class instance\" stored in :attr:`~method.__self__` will " @@ -844,18 +845,18 @@ msgid "" "function." msgstr "" -#: ../../reference/datamodel.rst:748 +#: ../../reference/datamodel.rst:750 msgid "" "It is important to note that user-defined functions which are attributes of " "a class instance are not converted to bound methods; this *only* happens " "when the function is an attribute of the class." msgstr "" -#: ../../reference/datamodel.rst:755 +#: ../../reference/datamodel.rst:757 msgid "Generator functions" msgstr "" -#: ../../reference/datamodel.rst:761 +#: ../../reference/datamodel.rst:763 msgid "" "A function or method which uses the :keyword:`yield` statement (see section :" "ref:`yield`) is called a :dfn:`generator function`. Such a function, when " @@ -868,11 +869,11 @@ msgid "" "values to be returned." msgstr "" -#: ../../reference/datamodel.rst:773 +#: ../../reference/datamodel.rst:775 msgid "Coroutine functions" msgstr "" -#: ../../reference/datamodel.rst:778 +#: ../../reference/datamodel.rst:780 msgid "" "A function or method which is defined using :keyword:`async def` is called " "a :dfn:`coroutine function`. Such a function, when called, returns a :term:" @@ -881,11 +882,11 @@ msgid "" "ref:`coroutine-objects` section." msgstr "" -#: ../../reference/datamodel.rst:786 +#: ../../reference/datamodel.rst:788 msgid "Asynchronous generator functions" msgstr "" -#: ../../reference/datamodel.rst:792 +#: ../../reference/datamodel.rst:794 msgid "" "A function or method which is defined using :keyword:`async def` and which " "uses the :keyword:`yield` statement is called a :dfn:`asynchronous generator " @@ -894,7 +895,7 @@ msgid "" "execute the body of the function." msgstr "" -#: ../../reference/datamodel.rst:798 +#: ../../reference/datamodel.rst:800 msgid "" "Calling the asynchronous iterator's :meth:`aiterator.__anext__ ` method will return an :term:`awaitable` which when awaited will " @@ -905,11 +906,11 @@ msgid "" "yielded." msgstr "" -#: ../../reference/datamodel.rst:811 +#: ../../reference/datamodel.rst:813 msgid "Built-in functions" msgstr "" -#: ../../reference/datamodel.rst:818 +#: ../../reference/datamodel.rst:820 msgid "" "A built-in function object is a wrapper around a C function. Examples of " "built-in functions are :func:`len` and :func:`math.sin` (:mod:`math` is a " @@ -917,32 +918,32 @@ msgid "" "determined by the C function. Special read-only attributes:" msgstr "" -#: ../../reference/datamodel.rst:823 +#: ../../reference/datamodel.rst:825 msgid "" ":attr:`!__doc__` is the function's documentation string, or ``None`` if " "unavailable. See :attr:`function.__doc__`." msgstr "" -#: ../../reference/datamodel.rst:825 +#: ../../reference/datamodel.rst:827 msgid "" ":attr:`!__name__` is the function's name. See :attr:`function.__name__`." msgstr "" -#: ../../reference/datamodel.rst:826 +#: ../../reference/datamodel.rst:828 msgid ":attr:`!__self__` is set to ``None`` (but see the next item)." msgstr "" -#: ../../reference/datamodel.rst:827 +#: ../../reference/datamodel.rst:829 msgid "" ":attr:`!__module__` is the name of the module the function was defined in or " "``None`` if unavailable. See :attr:`function.__module__`." msgstr "" -#: ../../reference/datamodel.rst:835 +#: ../../reference/datamodel.rst:837 msgid "Built-in methods" msgstr "" -#: ../../reference/datamodel.rst:842 +#: ../../reference/datamodel.rst:844 msgid "" "This is really a different disguise of a built-in function, this time " "containing an object passed to the C function as an implicit extra " @@ -953,11 +954,11 @@ msgid "" "__self__>`.)" msgstr "" -#: ../../reference/datamodel.rst:852 +#: ../../reference/datamodel.rst:854 msgid "Classes" msgstr "" -#: ../../reference/datamodel.rst:854 +#: ../../reference/datamodel.rst:856 msgid "" "Classes are callable. These objects normally act as factories for new " "instances of themselves, but variations are possible for class types that " @@ -966,21 +967,21 @@ msgid "" "initialize the new instance." msgstr "" -#: ../../reference/datamodel.rst:862 +#: ../../reference/datamodel.rst:864 msgid "Class Instances" msgstr "" -#: ../../reference/datamodel.rst:864 +#: ../../reference/datamodel.rst:866 msgid "" "Instances of arbitrary classes can be made callable by defining a :meth:" "`~object.__call__` method in their class." msgstr "" -#: ../../reference/datamodel.rst:871 +#: ../../reference/datamodel.rst:873 msgid "Modules" msgstr "" -#: ../../reference/datamodel.rst:877 +#: ../../reference/datamodel.rst:879 msgid "" "Modules are a basic organizational unit of Python code, and are created by " "the :ref:`import system ` as invoked either by the :keyword:" @@ -995,17 +996,17 @@ msgid "" "done)." msgstr "" -#: ../../reference/datamodel.rst:890 +#: ../../reference/datamodel.rst:892 msgid "" "Attribute assignment updates the module's namespace dictionary, e.g., ``m.x " "= 1`` is equivalent to ``m.__dict__[\"x\"] = 1``." msgstr "" -#: ../../reference/datamodel.rst:909 +#: ../../reference/datamodel.rst:911 msgid "Import-related attributes on module objects" msgstr "" -#: ../../reference/datamodel.rst:911 +#: ../../reference/datamodel.rst:913 msgid "" "Module objects have the following attributes that relate to the :ref:`import " "system `. When a module is created using the machinery " @@ -1014,7 +1015,7 @@ msgid "" "and loads the module." msgstr "" -#: ../../reference/datamodel.rst:917 +#: ../../reference/datamodel.rst:919 msgid "" "To create a module dynamically rather than using the import system, it's " "recommended to use :func:`importlib.util.module_from_spec`, which will set " @@ -1025,7 +1026,7 @@ msgid "" "approach." msgstr "" -#: ../../reference/datamodel.rst:927 +#: ../../reference/datamodel.rst:929 msgid "" "With the exception of :attr:`~module.__name__`, it is **strongly** " "recommended that you rely on :attr:`~module.__spec__` and its attributes " @@ -1034,7 +1035,7 @@ msgid "" "corresponding attribute on the module itself:" msgstr "" -#: ../../reference/datamodel.rst:933 +#: ../../reference/datamodel.rst:935 msgid "" ">>> import typing\n" ">>> typing.__name__, typing.__spec__.name\n" @@ -1047,34 +1048,34 @@ msgid "" "('keyboard_smashing', 'spelling')" msgstr "" -#: ../../reference/datamodel.rst:947 +#: ../../reference/datamodel.rst:949 msgid "" "The name used to uniquely identify the module in the import system. For a " "directly executed module, this will be set to ``\"__main__\"``." msgstr "" -#: ../../reference/datamodel.rst:950 +#: ../../reference/datamodel.rst:952 msgid "" "This attribute must be set to the fully qualified name of the module. It is " "expected to match the value of :attr:`module.__spec__.name `." msgstr "" -#: ../../reference/datamodel.rst:956 +#: ../../reference/datamodel.rst:958 msgid "A record of the module's import-system-related state." msgstr "" -#: ../../reference/datamodel.rst:958 +#: ../../reference/datamodel.rst:960 msgid "" "Set to the :class:`module spec ` that was " "used when importing the module. See :ref:`module-specs` for more details." msgstr "" -#: ../../reference/datamodel.rst:965 +#: ../../reference/datamodel.rst:967 msgid "The :term:`package` a module belongs to." msgstr "" -#: ../../reference/datamodel.rst:967 +#: ../../reference/datamodel.rst:969 msgid "" "If the module is top-level (that is, not a part of any specific package) " "then the attribute should be set to ``''`` (the empty string). Otherwise, it " @@ -1083,7 +1084,7 @@ msgid "" "for further details." msgstr "" -#: ../../reference/datamodel.rst:973 +#: ../../reference/datamodel.rst:975 msgid "" "This attribute is used instead of :attr:`~module.__name__` to calculate " "explicit relative imports for main modules. It defaults to ``None`` for " @@ -1092,7 +1093,7 @@ msgid "" "is set to a :class:`str`." msgstr "" -#: ../../reference/datamodel.rst:979 +#: ../../reference/datamodel.rst:981 msgid "" "It is **strongly** recommended that you use :attr:`module.__spec__.parent " "` instead of :attr:`!module." @@ -1100,14 +1101,14 @@ msgid "" "__spec__.parent` is not set, and this fallback path is deprecated." msgstr "" -#: ../../reference/datamodel.rst:985 ../../reference/datamodel.rst:1026 +#: ../../reference/datamodel.rst:987 ../../reference/datamodel.rst:1028 msgid "" "This attribute now defaults to ``None`` for modules created dynamically " "using the :class:`types.ModuleType` constructor. Previously the attribute " "was optional." msgstr "" -#: ../../reference/datamodel.rst:990 +#: ../../reference/datamodel.rst:992 msgid "" "The value of :attr:`!__package__` is expected to be the same as :attr:" "`__spec__.parent `. :attr:" @@ -1115,38 +1116,38 @@ msgid "" "attr:`!__spec__.parent` is not defined." msgstr "" -#: ../../reference/datamodel.rst:996 +#: ../../reference/datamodel.rst:998 msgid "" ":exc:`ImportWarning` is raised if an import resolution falls back to :attr:`!" "__package__` instead of :attr:`__spec__.parent `." msgstr "" -#: ../../reference/datamodel.rst:1001 +#: ../../reference/datamodel.rst:1003 msgid "" "Raise :exc:`DeprecationWarning` instead of :exc:`ImportWarning` when falling " "back to :attr:`!__package__` during import resolution." msgstr "" -#: ../../reference/datamodel.rst:1005 +#: ../../reference/datamodel.rst:1007 msgid "" ":attr:`!__package__` will cease to be set or taken into consideration by the " "import system or standard library." msgstr "" -#: ../../reference/datamodel.rst:1011 +#: ../../reference/datamodel.rst:1013 msgid "" "The :term:`loader` object that the import machinery used to load the module." msgstr "" -#: ../../reference/datamodel.rst:1013 +#: ../../reference/datamodel.rst:1015 msgid "" "This attribute is mostly useful for introspection, but can be used for " "additional loader-specific functionality, for example getting data " "associated with a loader." msgstr "" -#: ../../reference/datamodel.rst:1017 +#: ../../reference/datamodel.rst:1019 msgid "" ":attr:`!__loader__` defaults to ``None`` for modules created dynamically " "using the :class:`types.ModuleType` constructor; use :func:`importlib.util." @@ -1154,14 +1155,14 @@ msgid "" "object." msgstr "" -#: ../../reference/datamodel.rst:1022 +#: ../../reference/datamodel.rst:1024 msgid "" "It is **strongly** recommended that you use :attr:`module.__spec__.loader " "` instead of :attr:`!module." "__loader__`." msgstr "" -#: ../../reference/datamodel.rst:1031 +#: ../../reference/datamodel.rst:1033 msgid "" "Setting :attr:`!__loader__` on a module while failing to set :attr:`!" "__spec__.loader` is deprecated. In Python 3.16, :attr:`!__loader__` will " @@ -1169,7 +1170,7 @@ msgid "" "standard library." msgstr "" -#: ../../reference/datamodel.rst:1039 +#: ../../reference/datamodel.rst:1041 msgid "" "A (possibly empty) :term:`sequence` of strings enumerating the locations " "where the package's submodules will be found. Non-package modules should not " @@ -1177,21 +1178,21 @@ msgid "" "details." msgstr "" -#: ../../reference/datamodel.rst:1044 +#: ../../reference/datamodel.rst:1046 msgid "" "It is **strongly** recommended that you use :attr:`module.__spec__." "submodule_search_locations ` instead of :attr:`!module.__path__`." msgstr "" -#: ../../reference/datamodel.rst:1051 +#: ../../reference/datamodel.rst:1053 msgid "" ":attr:`!__file__` and :attr:`!__cached__` are both optional attributes that " "may or may not be set. Both attributes should be a :class:`str` when they " "are available." msgstr "" -#: ../../reference/datamodel.rst:1055 +#: ../../reference/datamodel.rst:1057 msgid "" ":attr:`!__file__` indicates the pathname of the file from which the module " "was loaded (if loaded from a file), or the pathname of the shared library " @@ -1202,7 +1203,7 @@ msgid "" "example, a module loaded from a database)." msgstr "" -#: ../../reference/datamodel.rst:1063 +#: ../../reference/datamodel.rst:1065 msgid "" "If :attr:`!__file__` is set then the :attr:`!__cached__` attribute might " "also be set, which is the path to any compiled version of the code (for " @@ -1211,7 +1212,7 @@ msgid "" "exist (see :pep:`3147`)." msgstr "" -#: ../../reference/datamodel.rst:1069 +#: ../../reference/datamodel.rst:1071 msgid "" "Note that :attr:`!__cached__` may be set even if :attr:`!__file__` is not " "set. However, that scenario is quite atypical. Ultimately, the :term:" @@ -1221,14 +1222,14 @@ msgid "" "file, that atypical scenario may be appropriate." msgstr "" -#: ../../reference/datamodel.rst:1076 +#: ../../reference/datamodel.rst:1078 msgid "" "It is **strongly** recommended that you use :attr:`module.__spec__.cached " "` instead of :attr:`!module." "__cached__`." msgstr "" -#: ../../reference/datamodel.rst:1080 +#: ../../reference/datamodel.rst:1082 msgid "" "Setting :attr:`!__cached__` on a module while failing to set :attr:`!" "__spec__.cached` is deprecated. In Python 3.15, :attr:`!__cached__` will " @@ -1236,51 +1237,51 @@ msgid "" "library." msgstr "" -#: ../../reference/datamodel.rst:1087 +#: ../../reference/datamodel.rst:1089 msgid "Other writable attributes on module objects" msgstr "" -#: ../../reference/datamodel.rst:1089 +#: ../../reference/datamodel.rst:1091 msgid "" "As well as the import-related attributes listed above, module objects also " "have the following writable attributes:" msgstr "" -#: ../../reference/datamodel.rst:1094 +#: ../../reference/datamodel.rst:1096 msgid "" "The module's documentation string, or ``None`` if unavailable. See also: :" "attr:`__doc__ attributes `." msgstr "" -#: ../../reference/datamodel.rst:1099 +#: ../../reference/datamodel.rst:1101 msgid "" "A dictionary containing :term:`variable annotations ` " "collected during module body execution. For best practices on working with :" "attr:`!__annotations__`, see :mod:`annotationlib`." msgstr "" -#: ../../reference/datamodel.rst:1109 +#: ../../reference/datamodel.rst:1111 msgid "" "The :term:`annotate function` for this module, or ``None`` if the module has " "no annotations. See also: :attr:`~object.__annotate__` attributes." msgstr "" -#: ../../reference/datamodel.rst:1115 +#: ../../reference/datamodel.rst:1117 msgid "Module dictionaries" msgstr "" -#: ../../reference/datamodel.rst:1117 +#: ../../reference/datamodel.rst:1119 msgid "Module objects also have the following special read-only attribute:" msgstr "" -#: ../../reference/datamodel.rst:1122 +#: ../../reference/datamodel.rst:1124 msgid "" "The module's namespace as a dictionary object. Uniquely among the attributes " "listed here, :attr:`!__dict__` cannot be accessed as a global variable from " "within a module; it can only be accessed as an attribute on module objects." msgstr "" -#: ../../reference/datamodel.rst:1128 +#: ../../reference/datamodel.rst:1130 msgid "" "Because of the way CPython clears module dictionaries, the module dictionary " "will be cleared when the module falls out of scope even if the dictionary " @@ -1288,11 +1289,11 @@ msgid "" "module around while using its dictionary directly." msgstr "" -#: ../../reference/datamodel.rst:1137 +#: ../../reference/datamodel.rst:1139 msgid "Custom classes" msgstr "" -#: ../../reference/datamodel.rst:1139 +#: ../../reference/datamodel.rst:1141 msgid "" "Custom class types are typically created by class definitions (see section :" "ref:`class`). A class has a namespace implemented by a dictionary object. " @@ -1307,7 +1308,7 @@ msgid "" "found at :ref:`python_2.3_mro`." msgstr "" -#: ../../reference/datamodel.rst:1160 +#: ../../reference/datamodel.rst:1162 msgid "" "When a class attribute reference (for class :class:`!C`, say) would yield a " "class method object, it is transformed into an instance method object whose :" @@ -1318,129 +1319,144 @@ msgid "" "contained in its :attr:`~object.__dict__`." msgstr "" -#: ../../reference/datamodel.rst:1171 +#: ../../reference/datamodel.rst:1173 msgid "" "Class attribute assignments update the class's dictionary, never the " "dictionary of a base class." msgstr "" -#: ../../reference/datamodel.rst:1176 +#: ../../reference/datamodel.rst:1178 msgid "" "A class object can be called (see above) to yield a class instance (see " "below)." msgstr "" -#: ../../reference/datamodel.rst:1179 ../../reference/datamodel.rst:1335 +#: ../../reference/datamodel.rst:1181 ../../reference/datamodel.rst:1349 msgid "Special attributes" msgstr "" -#: ../../reference/datamodel.rst:1200 +#: ../../reference/datamodel.rst:1202 msgid "" "The class's name. See also: :attr:`__name__ attributes `." msgstr "" -#: ../../reference/datamodel.rst:1204 +#: ../../reference/datamodel.rst:1206 msgid "" "The class's :term:`qualified name`. See also: :attr:`__qualname__ attributes " "`." msgstr "" -#: ../../reference/datamodel.rst:1208 +#: ../../reference/datamodel.rst:1210 msgid "The name of the module in which the class was defined." msgstr "" -#: ../../reference/datamodel.rst:1211 +#: ../../reference/datamodel.rst:1213 msgid "" "A :class:`mapping proxy ` providing a read-only view " "of the class's namespace. See also: :attr:`__dict__ attributes `." msgstr "" -#: ../../reference/datamodel.rst:1216 +#: ../../reference/datamodel.rst:1218 msgid "" "A :class:`tuple` containing the class's bases. In most cases, for a class " "defined as ``class X(A, B, C)``, ``X.__bases__`` will be exactly equal to " "``(A, B, C)``." msgstr "" -#: ../../reference/datamodel.rst:1221 +#: ../../reference/datamodel.rst:1223 msgid "" "The class's documentation string, or ``None`` if undefined. Not inherited by " "subclasses." msgstr "" -#: ../../reference/datamodel.rst:1225 +#: ../../reference/datamodel.rst:1227 msgid "" "A dictionary containing :term:`variable annotations ` " "collected during class body execution. See also: :attr:`__annotations__ " "attributes `." msgstr "" -#: ../../reference/datamodel.rst:1230 +#: ../../reference/datamodel.rst:1232 msgid "" "For best practices on working with :attr:`~object.__annotations__`, please " -"see :mod:`annotationlib`. Where possible, use :func:`annotationlib." -"get_annotations` instead of accessing this attribute directly." +"see :mod:`annotationlib`. Use :func:`annotationlib.get_annotations` instead " +"of accessing this attribute directly." msgstr "" -#: ../../reference/datamodel.rst:1240 +#: ../../reference/datamodel.rst:1239 +msgid "" +"Accessing the :attr:`!__annotations__` attribute directly on a class object " +"may return annotations for the wrong class, specifically in certain cases " +"where the class, its base class, or a metaclass is defined under ``from " +"__future__ import annotations``. See :pep:`749 <749#pep749-metaclasses>` for " +"details." +msgstr "" + +#: ../../reference/datamodel.rst:1245 +msgid "" +"This attribute does not exist on certain builtin classes. On user-defined " +"classes without ``__annotations__``, it is an empty dictionary." +msgstr "" + +#: ../../reference/datamodel.rst:1254 msgid "" "The :term:`annotate function` for this class, or ``None`` if the class has " "no annotations. See also: :attr:`__annotate__ attributes `." msgstr "" -#: ../../reference/datamodel.rst:1247 +#: ../../reference/datamodel.rst:1261 msgid "" "A :class:`tuple` containing the :ref:`type parameters ` of a :" "ref:`generic class `." msgstr "" -#: ../../reference/datamodel.rst:1253 +#: ../../reference/datamodel.rst:1267 msgid "" "A :class:`tuple` containing names of attributes of this class which are " "assigned through ``self.X`` from any function in its body." msgstr "" -#: ../../reference/datamodel.rst:1259 +#: ../../reference/datamodel.rst:1273 msgid "" "The line number of the first line of the class definition, including " "decorators. Setting the :attr:`__module__` attribute removes the :attr:`!" "__firstlineno__` item from the type's dictionary." msgstr "" -#: ../../reference/datamodel.rst:1267 +#: ../../reference/datamodel.rst:1281 msgid "" "The :class:`tuple` of classes that are considered when looking for base " "classes during method resolution." msgstr "" -#: ../../reference/datamodel.rst:1272 +#: ../../reference/datamodel.rst:1286 msgid "Special methods" msgstr "" -#: ../../reference/datamodel.rst:1274 +#: ../../reference/datamodel.rst:1288 msgid "" "In addition to the special attributes described above, all Python classes " "also have the following two methods available:" msgstr "" -#: ../../reference/datamodel.rst:1279 +#: ../../reference/datamodel.rst:1293 msgid "" "This method can be overridden by a metaclass to customize the method " "resolution order for its instances. It is called at class instantiation, " "and its result is stored in :attr:`~type.__mro__`." msgstr "" -#: ../../reference/datamodel.rst:1285 +#: ../../reference/datamodel.rst:1299 msgid "" "Each class keeps a list of weak references to its immediate subclasses. This " "method returns a list of all those references still alive. The list is in " "definition order. Example:" msgstr "" -#: ../../reference/datamodel.rst:1289 +#: ../../reference/datamodel.rst:1303 msgid "" ">>> class A: pass\n" ">>> class B(A): pass\n" @@ -1448,11 +1464,11 @@ msgid "" "[]" msgstr "" -#: ../../reference/datamodel.rst:1297 +#: ../../reference/datamodel.rst:1311 msgid "Class instances" msgstr "" -#: ../../reference/datamodel.rst:1305 +#: ../../reference/datamodel.rst:1319 msgid "" "A class instance is created by calling a class object (see above). A class " "instance has a namespace implemented as a dictionary which is the first " @@ -1469,7 +1485,7 @@ msgid "" "__getattr__` method, that is called to satisfy the lookup." msgstr "" -#: ../../reference/datamodel.rst:1321 +#: ../../reference/datamodel.rst:1335 msgid "" "Attribute assignments and deletions update the instance's dictionary, never " "a class's dictionary. If the class has a :meth:`~object.__setattr__` or :" @@ -1477,28 +1493,28 @@ msgid "" "instance dictionary directly." msgstr "" -#: ../../reference/datamodel.rst:1331 +#: ../../reference/datamodel.rst:1345 msgid "" "Class instances can pretend to be numbers, sequences, or mappings if they " "have methods with certain special names. See section :ref:`specialnames`." msgstr "" -#: ../../reference/datamodel.rst:1343 +#: ../../reference/datamodel.rst:1357 msgid "The class to which a class instance belongs." msgstr "" -#: ../../reference/datamodel.rst:1347 +#: ../../reference/datamodel.rst:1361 msgid "" "A dictionary or other mapping object used to store an object's (writable) " "attributes. Not all instances have a :attr:`!__dict__` attribute; see the " "section on :ref:`slots` for more details." msgstr "" -#: ../../reference/datamodel.rst:1353 +#: ../../reference/datamodel.rst:1367 msgid "I/O objects (also known as file objects)" msgstr "" -#: ../../reference/datamodel.rst:1368 +#: ../../reference/datamodel.rst:1382 msgid "" "A :term:`file object` represents an open file. Various shortcuts are " "available to create file objects: the :func:`open` built-in function, and " @@ -1507,7 +1523,7 @@ msgid "" "methods provided by extension modules)." msgstr "" -#: ../../reference/datamodel.rst:1374 +#: ../../reference/datamodel.rst:1388 msgid "" "The objects ``sys.stdin``, ``sys.stdout`` and ``sys.stderr`` are initialized " "to file objects corresponding to the interpreter's standard input, output " @@ -1515,22 +1531,22 @@ msgid "" "interface defined by the :class:`io.TextIOBase` abstract class." msgstr "" -#: ../../reference/datamodel.rst:1382 +#: ../../reference/datamodel.rst:1396 msgid "Internal types" msgstr "" -#: ../../reference/datamodel.rst:1388 +#: ../../reference/datamodel.rst:1402 msgid "" "A few types used internally by the interpreter are exposed to the user. " "Their definitions may change with future versions of the interpreter, but " "they are mentioned here for completeness." msgstr "" -#: ../../reference/datamodel.rst:1396 +#: ../../reference/datamodel.rst:1410 msgid "Code objects" msgstr "" -#: ../../reference/datamodel.rst:1400 +#: ../../reference/datamodel.rst:1414 msgid "" "Code objects represent *byte-compiled* executable Python code, or :term:" "`bytecode`. The difference between a code object and a function object is " @@ -1542,111 +1558,111 @@ msgid "" "no references (directly or indirectly) to mutable objects." msgstr "" -#: ../../reference/datamodel.rst:1434 +#: ../../reference/datamodel.rst:1448 msgid "The function name" msgstr "" -#: ../../reference/datamodel.rst:1437 +#: ../../reference/datamodel.rst:1451 msgid "The fully qualified function name" msgstr "" -#: ../../reference/datamodel.rst:1442 +#: ../../reference/datamodel.rst:1456 msgid "" "The total number of positional :term:`parameters ` (including " "positional-only parameters and parameters with default values) that the " "function has" msgstr "" -#: ../../reference/datamodel.rst:1447 +#: ../../reference/datamodel.rst:1461 msgid "" "The number of positional-only :term:`parameters ` (including " "arguments with default values) that the function has" msgstr "" -#: ../../reference/datamodel.rst:1451 +#: ../../reference/datamodel.rst:1465 msgid "" "The number of keyword-only :term:`parameters ` (including " "arguments with default values) that the function has" msgstr "" -#: ../../reference/datamodel.rst:1455 +#: ../../reference/datamodel.rst:1469 msgid "" "The number of :ref:`local variables ` used by the function " "(including parameters)" msgstr "" -#: ../../reference/datamodel.rst:1459 +#: ../../reference/datamodel.rst:1473 msgid "" "A :class:`tuple` containing the names of the local variables in the function " "(starting with the parameter names)" msgstr "" -#: ../../reference/datamodel.rst:1463 +#: ../../reference/datamodel.rst:1477 msgid "" "A :class:`tuple` containing the names of :ref:`local variables ` " "that are referenced from at least one :term:`nested scope` inside the " "function" msgstr "" -#: ../../reference/datamodel.rst:1467 +#: ../../reference/datamodel.rst:1481 msgid "" "A :class:`tuple` containing the names of :term:`free (closure) variables " "` that a :term:`nested scope` references in an outer " "scope. See also :attr:`function.__closure__`." msgstr "" -#: ../../reference/datamodel.rst:1471 +#: ../../reference/datamodel.rst:1485 msgid "Note: references to global and builtin names are *not* included." msgstr "" -#: ../../reference/datamodel.rst:1474 +#: ../../reference/datamodel.rst:1488 msgid "" "A string representing the sequence of :term:`bytecode` instructions in the " "function" msgstr "" -#: ../../reference/datamodel.rst:1478 +#: ../../reference/datamodel.rst:1492 msgid "" "A :class:`tuple` containing the literals used by the :term:`bytecode` in the " "function" msgstr "" -#: ../../reference/datamodel.rst:1482 +#: ../../reference/datamodel.rst:1496 msgid "" "A :class:`tuple` containing the names used by the :term:`bytecode` in the " "function" msgstr "" -#: ../../reference/datamodel.rst:1486 +#: ../../reference/datamodel.rst:1500 msgid "The name of the file from which the code was compiled" msgstr "" -#: ../../reference/datamodel.rst:1489 +#: ../../reference/datamodel.rst:1503 msgid "The line number of the first line of the function" msgstr "" -#: ../../reference/datamodel.rst:1492 +#: ../../reference/datamodel.rst:1506 msgid "" "A string encoding the mapping from :term:`bytecode` offsets to line numbers. " "For details, see the source code of the interpreter." msgstr "" -#: ../../reference/datamodel.rst:1495 +#: ../../reference/datamodel.rst:1509 msgid "" "This attribute of code objects is deprecated, and may be removed in Python " "3.15." msgstr "" -#: ../../reference/datamodel.rst:1500 +#: ../../reference/datamodel.rst:1514 msgid "The required stack size of the code object" msgstr "" -#: ../../reference/datamodel.rst:1503 +#: ../../reference/datamodel.rst:1517 msgid "" "An :class:`integer ` encoding a number of flags for the interpreter." msgstr "" -#: ../../reference/datamodel.rst:1508 +#: ../../reference/datamodel.rst:1522 msgid "" "The following flag bits are defined for :attr:`~codeobject.co_flags`: bit " "``0x04`` is set if the function uses the ``*arguments`` syntax to accept an " @@ -1657,7 +1673,7 @@ msgid "" "might be present." msgstr "" -#: ../../reference/datamodel.rst:1516 +#: ../../reference/datamodel.rst:1530 msgid "" "Future feature declarations (for example, ``from __future__ import " "division``) also use bits in :attr:`~codeobject.co_flags` to indicate " @@ -1665,12 +1681,12 @@ msgid "" "attr:`~__future__._Feature.compiler_flag`." msgstr "" -#: ../../reference/datamodel.rst:1520 +#: ../../reference/datamodel.rst:1534 msgid "" "Other bits in :attr:`~codeobject.co_flags` are reserved for internal use." msgstr "" -#: ../../reference/datamodel.rst:1524 +#: ../../reference/datamodel.rst:1538 msgid "" "If a code object represents a function and has a docstring, the :data:" "`~inspect.CO_HAS_DOCSTRING` bit is set in :attr:`~codeobject.co_flags` and " @@ -1678,17 +1694,17 @@ msgid "" "function." msgstr "" -#: ../../reference/datamodel.rst:1530 +#: ../../reference/datamodel.rst:1544 msgid "Methods on code objects" msgstr "" -#: ../../reference/datamodel.rst:1534 +#: ../../reference/datamodel.rst:1548 msgid "" "Returns an iterable over the source code positions of each :term:`bytecode` " "instruction in the code object." msgstr "" -#: ../../reference/datamodel.rst:1537 +#: ../../reference/datamodel.rst:1551 msgid "" "The iterator returns :class:`tuple`\\s containing the ``(start_line, " "end_line, start_column, end_column)``. The *i-th* tuple corresponds to the " @@ -1696,37 +1712,37 @@ msgid "" "information is 0-indexed utf-8 byte offsets on the given source line." msgstr "" -#: ../../reference/datamodel.rst:1543 +#: ../../reference/datamodel.rst:1557 msgid "" "This positional information can be missing. A non-exhaustive lists of cases " "where this may happen:" msgstr "" -#: ../../reference/datamodel.rst:1546 +#: ../../reference/datamodel.rst:1560 msgid "Running the interpreter with :option:`-X` ``no_debug_ranges``." msgstr "" -#: ../../reference/datamodel.rst:1547 +#: ../../reference/datamodel.rst:1561 msgid "" "Loading a pyc file compiled while using :option:`-X` ``no_debug_ranges``." msgstr "" -#: ../../reference/datamodel.rst:1548 +#: ../../reference/datamodel.rst:1562 msgid "Position tuples corresponding to artificial instructions." msgstr "" -#: ../../reference/datamodel.rst:1549 +#: ../../reference/datamodel.rst:1563 msgid "" "Line and column numbers that can't be represented due to implementation " "specific limitations." msgstr "" -#: ../../reference/datamodel.rst:1552 +#: ../../reference/datamodel.rst:1566 msgid "" "When this occurs, some or all of the tuple elements can be :const:`None`." msgstr "" -#: ../../reference/datamodel.rst:1558 +#: ../../reference/datamodel.rst:1572 msgid "" "This feature requires storing column positions in code objects which may " "result in a small increase of disk usage of compiled Python files or " @@ -1736,155 +1752,155 @@ msgid "" "environment variable can be used." msgstr "" -#: ../../reference/datamodel.rst:1567 +#: ../../reference/datamodel.rst:1581 msgid "" "Returns an iterator that yields information about successive ranges of :term:" "`bytecode`\\s. Each item yielded is a ``(start, end, lineno)`` :class:" "`tuple`:" msgstr "" -#: ../../reference/datamodel.rst:1571 +#: ../../reference/datamodel.rst:1585 msgid "" "``start`` (an :class:`int`) represents the offset (inclusive) of the start " "of the :term:`bytecode` range" msgstr "" -#: ../../reference/datamodel.rst:1573 +#: ../../reference/datamodel.rst:1587 msgid "" "``end`` (an :class:`int`) represents the offset (exclusive) of the end of " "the :term:`bytecode` range" msgstr "" -#: ../../reference/datamodel.rst:1575 +#: ../../reference/datamodel.rst:1589 msgid "" "``lineno`` is an :class:`int` representing the line number of the :term:" "`bytecode` range, or ``None`` if the bytecodes in the given range have no " "line number" msgstr "" -#: ../../reference/datamodel.rst:1579 +#: ../../reference/datamodel.rst:1593 msgid "The items yielded will have the following properties:" msgstr "" -#: ../../reference/datamodel.rst:1581 +#: ../../reference/datamodel.rst:1595 msgid "The first range yielded will have a ``start`` of 0." msgstr "" -#: ../../reference/datamodel.rst:1582 +#: ../../reference/datamodel.rst:1596 msgid "" "The ``(start, end)`` ranges will be non-decreasing and consecutive. That is, " "for any pair of :class:`tuple`\\s, the ``start`` of the second will be equal " "to the ``end`` of the first." msgstr "" -#: ../../reference/datamodel.rst:1585 +#: ../../reference/datamodel.rst:1599 msgid "No range will be backwards: ``end >= start`` for all triples." msgstr "" -#: ../../reference/datamodel.rst:1586 +#: ../../reference/datamodel.rst:1600 msgid "" "The last :class:`tuple` yielded will have ``end`` equal to the size of the :" "term:`bytecode`." msgstr "" -#: ../../reference/datamodel.rst:1589 +#: ../../reference/datamodel.rst:1603 msgid "" "Zero-width ranges, where ``start == end``, are allowed. Zero-width ranges " "are used for lines that are present in the source code, but have been " "eliminated by the :term:`bytecode` compiler." msgstr "" -#: ../../reference/datamodel.rst:1597 +#: ../../reference/datamodel.rst:1611 msgid ":pep:`626` - Precise line numbers for debugging and other tools." msgstr "" -#: ../../reference/datamodel.rst:1598 +#: ../../reference/datamodel.rst:1612 msgid "The PEP that introduced the :meth:`!co_lines` method." msgstr "" -#: ../../reference/datamodel.rst:1602 +#: ../../reference/datamodel.rst:1616 msgid "" "Return a copy of the code object with new values for the specified fields." msgstr "" -#: ../../reference/datamodel.rst:1604 +#: ../../reference/datamodel.rst:1618 msgid "" "Code objects are also supported by the generic function :func:`copy.replace`." msgstr "" -#: ../../reference/datamodel.rst:1612 +#: ../../reference/datamodel.rst:1626 msgid "Frame objects" msgstr "" -#: ../../reference/datamodel.rst:1616 +#: ../../reference/datamodel.rst:1630 msgid "" "Frame objects represent execution frames. They may occur in :ref:`traceback " "objects `, and are also passed to registered trace " "functions." msgstr "" -#: ../../reference/datamodel.rst:1634 +#: ../../reference/datamodel.rst:1648 msgid "" "Points to the previous stack frame (towards the caller), or ``None`` if this " "is the bottom stack frame" msgstr "" -#: ../../reference/datamodel.rst:1638 +#: ../../reference/datamodel.rst:1652 msgid "" "The :ref:`code object ` being executed in this frame. " "Accessing this attribute raises an :ref:`auditing event ` ``object." "__getattr__`` with arguments ``obj`` and ``\"f_code\"``." msgstr "" -#: ../../reference/datamodel.rst:1643 +#: ../../reference/datamodel.rst:1657 msgid "" "The mapping used by the frame to look up :ref:`local variables `. If " "the frame refers to an :term:`optimized scope`, this may return a write-" "through proxy object." msgstr "" -#: ../../reference/datamodel.rst:1648 +#: ../../reference/datamodel.rst:1662 msgid "Return a proxy for optimized scopes." msgstr "" -#: ../../reference/datamodel.rst:1652 +#: ../../reference/datamodel.rst:1666 msgid "" "The dictionary used by the frame to look up :ref:`global variables `" msgstr "" -#: ../../reference/datamodel.rst:1656 +#: ../../reference/datamodel.rst:1670 msgid "" "The dictionary used by the frame to look up :ref:`built-in (intrinsic) names " "`" msgstr "" -#: ../../reference/datamodel.rst:1660 +#: ../../reference/datamodel.rst:1674 msgid "" "The \"precise instruction\" of the frame object (this is an index into the :" "term:`bytecode` string of the :ref:`code object `)" msgstr "" -#: ../../reference/datamodel.rst:1676 +#: ../../reference/datamodel.rst:1690 msgid "" "If not ``None``, this is a function called for various events during code " "execution (this is used by debuggers). Normally an event is triggered for " "each new source line (see :attr:`~frame.f_trace_lines`)." msgstr "" -#: ../../reference/datamodel.rst:1681 +#: ../../reference/datamodel.rst:1695 msgid "" "Set this attribute to :const:`False` to disable triggering a tracing event " "for each source line." msgstr "" -#: ../../reference/datamodel.rst:1685 +#: ../../reference/datamodel.rst:1699 msgid "" "Set this attribute to :const:`True` to allow per-opcode events to be " "requested. Note that this may lead to undefined interpreter behaviour if " "exceptions raised by the trace function escape to the function being traced." msgstr "" -#: ../../reference/datamodel.rst:1691 +#: ../../reference/datamodel.rst:1705 msgid "" "The current line number of the frame -- writing to this from within a trace " "function jumps to the given line (only for the bottom-most frame). A " @@ -1892,15 +1908,15 @@ msgid "" "this attribute." msgstr "" -#: ../../reference/datamodel.rst:1697 +#: ../../reference/datamodel.rst:1711 msgid "Frame object methods" msgstr "" -#: ../../reference/datamodel.rst:1699 +#: ../../reference/datamodel.rst:1713 msgid "Frame objects support one method:" msgstr "" -#: ../../reference/datamodel.rst:1703 +#: ../../reference/datamodel.rst:1717 msgid "" "This method clears all references to :ref:`local variables ` held by " "the frame. Also, if the frame belonged to a :term:`generator`, the " @@ -1909,34 +1925,34 @@ msgid "" "and storing its :ref:`traceback ` for later use)." msgstr "" -#: ../../reference/datamodel.rst:1709 +#: ../../reference/datamodel.rst:1723 msgid "" ":exc:`RuntimeError` is raised if the frame is currently executing or " "suspended." msgstr "" -#: ../../reference/datamodel.rst:1714 +#: ../../reference/datamodel.rst:1728 msgid "" "Attempting to clear a suspended frame raises :exc:`RuntimeError` (as has " "always been the case for executing frames)." msgstr "" -#: ../../reference/datamodel.rst:1722 +#: ../../reference/datamodel.rst:1736 msgid "Traceback objects" msgstr "" -#: ../../reference/datamodel.rst:1735 +#: ../../reference/datamodel.rst:1749 msgid "" "Traceback objects represent the stack trace of an :ref:`exception `. A traceback object is implicitly created when an exception occurs, " "and may also be explicitly created by calling :class:`types.TracebackType`." msgstr "" -#: ../../reference/datamodel.rst:1740 +#: ../../reference/datamodel.rst:1754 msgid "Traceback objects can now be explicitly instantiated from Python code." msgstr "" -#: ../../reference/datamodel.rst:1743 +#: ../../reference/datamodel.rst:1757 msgid "" "For implicitly created tracebacks, when the search for an exception handler " "unwinds the execution stack, at each unwound level a traceback object is " @@ -1947,7 +1963,7 @@ msgid "" "the caught exception." msgstr "" -#: ../../reference/datamodel.rst:1752 +#: ../../reference/datamodel.rst:1766 msgid "" "When the program contains no suitable handler, the stack trace is written " "(nicely formatted) to the standard error stream; if the interpreter is " @@ -1955,33 +1971,33 @@ msgid "" "last_traceback`." msgstr "" -#: ../../reference/datamodel.rst:1757 +#: ../../reference/datamodel.rst:1771 msgid "" "For explicitly created tracebacks, it is up to the creator of the traceback " "to determine how the :attr:`~traceback.tb_next` attributes should be linked " "to form a full stack trace." msgstr "" -#: ../../reference/datamodel.rst:1772 +#: ../../reference/datamodel.rst:1786 msgid "" "Points to the execution :ref:`frame ` of the current level." msgstr "" -#: ../../reference/datamodel.rst:1775 +#: ../../reference/datamodel.rst:1789 msgid "" "Accessing this attribute raises an :ref:`auditing event ` ``object." "__getattr__`` with arguments ``obj`` and ``\"tb_frame\"``." msgstr "" -#: ../../reference/datamodel.rst:1780 +#: ../../reference/datamodel.rst:1794 msgid "Gives the line number where the exception occurred" msgstr "" -#: ../../reference/datamodel.rst:1783 +#: ../../reference/datamodel.rst:1797 msgid "Indicates the \"precise instruction\"." msgstr "" -#: ../../reference/datamodel.rst:1785 +#: ../../reference/datamodel.rst:1799 msgid "" "The line number and last instruction in the traceback may differ from the " "line number of its :ref:`frame object ` if the exception " @@ -1989,39 +2005,39 @@ msgid "" "with a :keyword:`finally` clause." msgstr "" -#: ../../reference/datamodel.rst:1796 +#: ../../reference/datamodel.rst:1810 msgid "" "The special writable attribute :attr:`!tb_next` is the next level in the " "stack trace (towards the frame where the exception occurred), or ``None`` if " "there is no next level." msgstr "" -#: ../../reference/datamodel.rst:1800 +#: ../../reference/datamodel.rst:1814 msgid "This attribute is now writable" msgstr "" -#: ../../reference/datamodel.rst:1805 +#: ../../reference/datamodel.rst:1819 msgid "Slice objects" msgstr "" -#: ../../reference/datamodel.rst:1809 +#: ../../reference/datamodel.rst:1823 msgid "" "Slice objects are used to represent slices for :meth:`~object.__getitem__` " "methods. They are also created by the built-in :func:`slice` function." msgstr "" -#: ../../reference/datamodel.rst:1818 +#: ../../reference/datamodel.rst:1832 msgid "" "Special read-only attributes: :attr:`~slice.start` is the lower bound; :attr:" "`~slice.stop` is the upper bound; :attr:`~slice.step` is the step value; " "each is ``None`` if omitted. These attributes can have any type." msgstr "" -#: ../../reference/datamodel.rst:1822 +#: ../../reference/datamodel.rst:1836 msgid "Slice objects support one method:" msgstr "" -#: ../../reference/datamodel.rst:1826 +#: ../../reference/datamodel.rst:1840 msgid "" "This method takes a single integer argument *length* and computes " "information about the slice that the slice object would describe if applied " @@ -2031,11 +2047,11 @@ msgid "" "a manner consistent with regular slices." msgstr "" -#: ../../reference/datamodel.rst:1835 +#: ../../reference/datamodel.rst:1849 msgid "Static method objects" msgstr "" -#: ../../reference/datamodel.rst:1837 +#: ../../reference/datamodel.rst:1851 msgid "" "Static method objects provide a way of defeating the transformation of " "function objects to method objects described above. A static method object " @@ -2046,11 +2062,11 @@ msgid "" "method objects are created by the built-in :func:`staticmethod` constructor." msgstr "" -#: ../../reference/datamodel.rst:1847 +#: ../../reference/datamodel.rst:1861 msgid "Class method objects" msgstr "" -#: ../../reference/datamodel.rst:1849 +#: ../../reference/datamodel.rst:1863 msgid "" "A class method object, like a static method object, is a wrapper around " "another object that alters the way in which that object is retrieved from " @@ -2060,11 +2076,11 @@ msgid "" "`classmethod` constructor." msgstr "" -#: ../../reference/datamodel.rst:1859 +#: ../../reference/datamodel.rst:1873 msgid "Special method names" msgstr "" -#: ../../reference/datamodel.rst:1865 +#: ../../reference/datamodel.rst:1879 msgid "" "A class can implement certain operations that are invoked by special syntax " "(such as arithmetic operations or subscripting and slicing) by defining " @@ -2078,7 +2094,7 @@ msgid "" "`TypeError`)." msgstr "" -#: ../../reference/datamodel.rst:1876 +#: ../../reference/datamodel.rst:1890 msgid "" "Setting a special method to ``None`` indicates that the corresponding " "operation is not available. For example, if a class sets :meth:`~object." @@ -2087,7 +2103,7 @@ msgid "" "`~object.__getitem__`). [#]_" msgstr "" -#: ../../reference/datamodel.rst:1882 +#: ../../reference/datamodel.rst:1896 msgid "" "When implementing a class that emulates any built-in type, it is important " "that the emulation only be implemented to the degree that it makes sense for " @@ -2097,11 +2113,11 @@ msgid "" "the W3C's Document Object Model.)" msgstr "" -#: ../../reference/datamodel.rst:1893 +#: ../../reference/datamodel.rst:1907 msgid "Basic customization" msgstr "" -#: ../../reference/datamodel.rst:1899 +#: ../../reference/datamodel.rst:1913 msgid "" "Called to create a new instance of class *cls*. :meth:`__new__` is a static " "method (special-cased so you need not declare it as such) that takes the " @@ -2111,7 +2127,7 @@ msgid "" "new object instance (usually an instance of *cls*)." msgstr "" -#: ../../reference/datamodel.rst:1906 +#: ../../reference/datamodel.rst:1920 msgid "" "Typical implementations create a new instance of the class by invoking the " "superclass's :meth:`__new__` method using ``super().__new__(cls[, ...])`` " @@ -2119,7 +2135,7 @@ msgid "" "necessary before returning it." msgstr "" -#: ../../reference/datamodel.rst:1911 +#: ../../reference/datamodel.rst:1925 msgid "" "If :meth:`__new__` is invoked during object construction and it returns an " "instance of *cls*, then the new instance’s :meth:`__init__` method will be " @@ -2128,13 +2144,13 @@ msgid "" "constructor." msgstr "" -#: ../../reference/datamodel.rst:1916 +#: ../../reference/datamodel.rst:1930 msgid "" "If :meth:`__new__` does not return an instance of *cls*, then the new " "instance's :meth:`__init__` method will not be invoked." msgstr "" -#: ../../reference/datamodel.rst:1919 +#: ../../reference/datamodel.rst:1933 msgid "" ":meth:`__new__` is intended mainly to allow subclasses of immutable types " "(like int, str, or tuple) to customize instance creation. It is also " @@ -2142,7 +2158,7 @@ msgid "" "creation." msgstr "" -#: ../../reference/datamodel.rst:1928 +#: ../../reference/datamodel.rst:1942 msgid "" "Called after the instance has been created (by :meth:`__new__`), but before " "it is returned to the caller. The arguments are those passed to the class " @@ -2152,7 +2168,7 @@ msgid "" "example: ``super().__init__([args...])``." msgstr "" -#: ../../reference/datamodel.rst:1935 +#: ../../reference/datamodel.rst:1949 msgid "" "Because :meth:`__new__` and :meth:`__init__` work together in constructing " "objects (:meth:`__new__` to create it, and :meth:`__init__` to customize " @@ -2160,7 +2176,7 @@ msgid "" "will cause a :exc:`TypeError` to be raised at runtime." msgstr "" -#: ../../reference/datamodel.rst:1948 +#: ../../reference/datamodel.rst:1962 msgid "" "Called when the instance is about to be destroyed. This is also called a " "finalizer or (improperly) a destructor. If a base class has a :meth:" @@ -2169,7 +2185,7 @@ msgid "" "instance." msgstr "" -#: ../../reference/datamodel.rst:1954 +#: ../../reference/datamodel.rst:1968 msgid "" "It is possible (though not recommended!) for the :meth:`__del__` method to " "postpone destruction of the instance by creating a new reference to it. " @@ -2179,7 +2195,7 @@ msgid "" "it once." msgstr "" -#: ../../reference/datamodel.rst:1961 +#: ../../reference/datamodel.rst:1975 msgid "" "It is not guaranteed that :meth:`__del__` methods are called for objects " "that still exist when the interpreter exits. :class:`weakref.finalize` " @@ -2187,14 +2203,14 @@ msgid "" "when an object is garbage collected." msgstr "" -#: ../../reference/datamodel.rst:1968 +#: ../../reference/datamodel.rst:1982 msgid "" "``del x`` doesn't directly call ``x.__del__()`` --- the former decrements " "the reference count for ``x`` by one, and the latter is only called when " "``x``'s reference count reaches zero." msgstr "" -#: ../../reference/datamodel.rst:1973 +#: ../../reference/datamodel.rst:1987 msgid "" "It is possible for a reference cycle to prevent the reference count of an " "object from going to zero. In this case, the cycle will be later detected " @@ -2205,18 +2221,18 @@ msgid "" "caught in the traceback." msgstr "" -#: ../../reference/datamodel.rst:1983 +#: ../../reference/datamodel.rst:1997 msgid "Documentation for the :mod:`gc` module." msgstr "" -#: ../../reference/datamodel.rst:1987 +#: ../../reference/datamodel.rst:2001 msgid "" "Due to the precarious circumstances under which :meth:`__del__` methods are " "invoked, exceptions that occur during their execution are ignored, and a " "warning is printed to ``sys.stderr`` instead. In particular:" msgstr "" -#: ../../reference/datamodel.rst:1991 +#: ../../reference/datamodel.rst:2005 msgid "" ":meth:`__del__` can be invoked when arbitrary code is being executed, " "including from any arbitrary thread. If :meth:`__del__` needs to take a " @@ -2225,7 +2241,7 @@ msgid "" "`__del__`." msgstr "" -#: ../../reference/datamodel.rst:1997 +#: ../../reference/datamodel.rst:2011 msgid "" ":meth:`__del__` can be executed during interpreter shutdown. As a " "consequence, the global variables it needs to access (including other " @@ -2236,7 +2252,7 @@ msgid "" "still available at the time when the :meth:`__del__` method is called." msgstr "" -#: ../../reference/datamodel.rst:2012 +#: ../../reference/datamodel.rst:2026 msgid "" "Called by the :func:`repr` built-in function to compute the \"official\" " "string representation of an object. If at all possible, this should look " @@ -2248,14 +2264,14 @@ msgid "" "an \"informal\" string representation of instances of that class is required." msgstr "" -#: ../../reference/datamodel.rst:2021 +#: ../../reference/datamodel.rst:2035 msgid "" "This is typically used for debugging, so it is important that the " "representation is information-rich and unambiguous. A default implementation " "is provided by the :class:`object` class itself." msgstr "" -#: ../../reference/datamodel.rst:2033 +#: ../../reference/datamodel.rst:2047 msgid "" "Called by :func:`str(object) `, the default :meth:`__format__` " "implementation, and the built-in function :func:`print`, to compute the " @@ -2263,27 +2279,27 @@ msgid "" "return value must be a :ref:`str ` object." msgstr "" -#: ../../reference/datamodel.rst:2038 +#: ../../reference/datamodel.rst:2052 msgid "" "This method differs from :meth:`object.__repr__` in that there is no " "expectation that :meth:`__str__` return a valid Python expression: a more " "convenient or concise representation can be used." msgstr "" -#: ../../reference/datamodel.rst:2042 +#: ../../reference/datamodel.rst:2056 msgid "" "The default implementation defined by the built-in type :class:`object` " "calls :meth:`object.__repr__`." msgstr "" -#: ../../reference/datamodel.rst:2052 +#: ../../reference/datamodel.rst:2066 msgid "" "Called by :ref:`bytes ` to compute a byte-string representation " "of an object. This should return a :class:`bytes` object. The :class:" "`object` class itself does not provide this method." msgstr "" -#: ../../reference/datamodel.rst:2064 +#: ../../reference/datamodel.rst:2078 msgid "" "Called by the :func:`format` built-in function, and by extension, evaluation " "of :ref:`formatted string literals ` and the :meth:`str.format` " @@ -2295,34 +2311,34 @@ msgid "" "formatting option syntax." msgstr "" -#: ../../reference/datamodel.rst:2074 +#: ../../reference/datamodel.rst:2088 msgid "" "See :ref:`formatspec` for a description of the standard formatting syntax." msgstr "" -#: ../../reference/datamodel.rst:2076 +#: ../../reference/datamodel.rst:2090 msgid "The return value must be a string object." msgstr "" -#: ../../reference/datamodel.rst:2078 +#: ../../reference/datamodel.rst:2092 msgid "" "The default implementation by the :class:`object` class should be given an " "empty *format_spec* string. It delegates to :meth:`__str__`." msgstr "" -#: ../../reference/datamodel.rst:2081 +#: ../../reference/datamodel.rst:2095 msgid "" "The __format__ method of ``object`` itself raises a :exc:`TypeError` if " "passed any non-empty string." msgstr "" -#: ../../reference/datamodel.rst:2085 +#: ../../reference/datamodel.rst:2099 msgid "" "``object.__format__(x, '')`` is now equivalent to ``str(x)`` rather than " "``format(str(x), '')``." msgstr "" -#: ../../reference/datamodel.rst:2101 +#: ../../reference/datamodel.rst:2115 msgid "" "These are the so-called \"rich comparison\" methods. The correspondence " "between operator symbols and method names is as follows: ``x.__hash__``." msgstr "" -#: ../../reference/datamodel.rst:2199 +#: ../../reference/datamodel.rst:2213 msgid "" "If a class that does not override :meth:`__eq__` wishes to suppress hash " "support, it should include ``__hash__ = None`` in the class definition. A " @@ -2464,7 +2480,7 @@ msgid "" "``isinstance(obj, collections.abc.Hashable)`` call." msgstr "" -#: ../../reference/datamodel.rst:2208 +#: ../../reference/datamodel.rst:2222 msgid "" "By default, the :meth:`__hash__` values of str and bytes objects are " "\"salted\" with an unpredictable random value. Although they remain " @@ -2472,7 +2488,7 @@ msgid "" "between repeated invocations of Python." msgstr "" -#: ../../reference/datamodel.rst:2213 +#: ../../reference/datamodel.rst:2227 msgid "" "This is intended to provide protection against a denial-of-service caused by " "carefully chosen inputs that exploit the worst case performance of a dict " @@ -2480,22 +2496,22 @@ msgid "" "advisories/ocert-2011-003.html for details." msgstr "" -#: ../../reference/datamodel.rst:2218 +#: ../../reference/datamodel.rst:2232 msgid "" "Changing hash values affects the iteration order of sets. Python has never " "made guarantees about this ordering (and it typically varies between 32-bit " "and 64-bit builds)." msgstr "" -#: ../../reference/datamodel.rst:2222 +#: ../../reference/datamodel.rst:2236 msgid "See also :envvar:`PYTHONHASHSEED`." msgstr "" -#: ../../reference/datamodel.rst:2224 +#: ../../reference/datamodel.rst:2238 msgid "Hash randomization is enabled by default." msgstr "" -#: ../../reference/datamodel.rst:2232 +#: ../../reference/datamodel.rst:2246 msgid "" "Called to implement truth value testing and the built-in operation " "``bool()``; should return ``False`` or ``True``. When this method is not " @@ -2505,18 +2521,18 @@ msgid "" "class itself), all its instances are considered true." msgstr "" -#: ../../reference/datamodel.rst:2243 +#: ../../reference/datamodel.rst:2257 msgid "Customizing attribute access" msgstr "" -#: ../../reference/datamodel.rst:2245 +#: ../../reference/datamodel.rst:2259 msgid "" "The following methods can be defined to customize the meaning of attribute " "access (use of, assignment to, or deletion of ``x.name``) for class " "instances." msgstr "" -#: ../../reference/datamodel.rst:2253 +#: ../../reference/datamodel.rst:2267 msgid "" "Called when the default attribute access fails with an :exc:`AttributeError` " "(either :meth:`__getattribute__` raises an :exc:`AttributeError` because " @@ -2527,7 +2543,7 @@ msgid "" "`object` class itself does not provide this method." msgstr "" -#: ../../reference/datamodel.rst:2261 +#: ../../reference/datamodel.rst:2275 msgid "" "Note that if the attribute is found through the normal mechanism, :meth:" "`__getattr__` is not called. (This is an intentional asymmetry between :" @@ -2540,7 +2556,7 @@ msgid "" "actually get total control over attribute access." msgstr "" -#: ../../reference/datamodel.rst:2274 +#: ../../reference/datamodel.rst:2288 msgid "" "Called unconditionally to implement attribute accesses for instances of the " "class. If the class also defines :meth:`__getattr__`, the latter will not be " @@ -2552,64 +2568,64 @@ msgid "" "example, ``object.__getattribute__(self, name)``." msgstr "" -#: ../../reference/datamodel.rst:2285 +#: ../../reference/datamodel.rst:2299 msgid "" "This method may still be bypassed when looking up special methods as the " "result of implicit invocation via language syntax or :ref:`built-in " "functions `. See :ref:`special-lookup`." msgstr "" -#: ../../reference/datamodel.rst:2290 ../../reference/datamodel.rst:2292 +#: ../../reference/datamodel.rst:2304 ../../reference/datamodel.rst:2306 msgid "" "For certain sensitive attribute accesses, raises an :ref:`auditing event " "` ``object.__getattr__`` with arguments ``obj`` and ``name``." msgstr "" -#: ../../reference/datamodel.rst:2299 +#: ../../reference/datamodel.rst:2313 msgid "" "Called when an attribute assignment is attempted. This is called instead of " "the normal mechanism (i.e. store the value in the instance dictionary). " "*name* is the attribute name, *value* is the value to be assigned to it." msgstr "" -#: ../../reference/datamodel.rst:2303 +#: ../../reference/datamodel.rst:2317 msgid "" "If :meth:`__setattr__` wants to assign to an instance attribute, it should " "call the base class method with the same name, for example, ``object." "__setattr__(self, name, value)``." msgstr "" -#: ../../reference/datamodel.rst:2307 ../../reference/datamodel.rst:2309 +#: ../../reference/datamodel.rst:2321 ../../reference/datamodel.rst:2323 msgid "" "For certain sensitive attribute assignments, raises an :ref:`auditing event " "` ``object.__setattr__`` with arguments ``obj``, ``name``, " "``value``." msgstr "" -#: ../../reference/datamodel.rst:2316 +#: ../../reference/datamodel.rst:2330 msgid "" "Like :meth:`__setattr__` but for attribute deletion instead of assignment. " "This should only be implemented if ``del obj.name`` is meaningful for the " "object." msgstr "" -#: ../../reference/datamodel.rst:2319 ../../reference/datamodel.rst:2321 +#: ../../reference/datamodel.rst:2333 ../../reference/datamodel.rst:2335 msgid "" "For certain sensitive attribute deletions, raises an :ref:`auditing event " "` ``object.__delattr__`` with arguments ``obj`` and ``name``." msgstr "" -#: ../../reference/datamodel.rst:2328 +#: ../../reference/datamodel.rst:2342 msgid "" "Called when :func:`dir` is called on the object. An iterable must be " "returned. :func:`dir` converts the returned iterable to a list and sorts it." msgstr "" -#: ../../reference/datamodel.rst:2333 +#: ../../reference/datamodel.rst:2347 msgid "Customizing module attribute access" msgstr "" -#: ../../reference/datamodel.rst:2340 +#: ../../reference/datamodel.rst:2354 msgid "" "Special names ``__getattr__`` and ``__dir__`` can be also used to customize " "access to module attributes. The ``__getattr__`` function at the module " @@ -2621,21 +2637,21 @@ msgid "" "with the attribute name and the result is returned." msgstr "" -#: ../../reference/datamodel.rst:2349 +#: ../../reference/datamodel.rst:2363 msgid "" "The ``__dir__`` function should accept no arguments, and return an iterable " "of strings that represents the names accessible on module. If present, this " "function overrides the standard :func:`dir` search on a module." msgstr "" -#: ../../reference/datamodel.rst:2353 +#: ../../reference/datamodel.rst:2367 msgid "" "For a more fine grained customization of the module behavior (setting " "attributes, properties, etc.), one can set the ``__class__`` attribute of a " "module object to a subclass of :class:`types.ModuleType`. For example::" msgstr "" -#: ../../reference/datamodel.rst:2357 +#: ../../reference/datamodel.rst:2371 msgid "" "import sys\n" "from types import ModuleType\n" @@ -2651,7 +2667,7 @@ msgid "" "sys.modules[__name__].__class__ = VerboseModule" msgstr "" -#: ../../reference/datamodel.rst:2371 +#: ../../reference/datamodel.rst:2385 msgid "" "Defining module ``__getattr__`` and setting module ``__class__`` only affect " "lookups made using the attribute access syntax -- directly accessing the " @@ -2659,27 +2675,27 @@ msgid "" "module's globals dictionary) is unaffected." msgstr "" -#: ../../reference/datamodel.rst:2376 +#: ../../reference/datamodel.rst:2390 msgid "``__class__`` module attribute is now writable." msgstr "" -#: ../../reference/datamodel.rst:2379 +#: ../../reference/datamodel.rst:2393 msgid "``__getattr__`` and ``__dir__`` module attributes." msgstr "" -#: ../../reference/datamodel.rst:2384 +#: ../../reference/datamodel.rst:2398 msgid ":pep:`562` - Module __getattr__ and __dir__" msgstr "" -#: ../../reference/datamodel.rst:2385 +#: ../../reference/datamodel.rst:2399 msgid "Describes the ``__getattr__`` and ``__dir__`` functions on modules." msgstr "" -#: ../../reference/datamodel.rst:2391 +#: ../../reference/datamodel.rst:2405 msgid "Implementing Descriptors" msgstr "" -#: ../../reference/datamodel.rst:2393 +#: ../../reference/datamodel.rst:2407 msgid "" "The following methods only apply when an instance of the class containing " "the method (a so-called *descriptor* class) appears in an *owner* class (the " @@ -2690,7 +2706,7 @@ msgid "" "does not implement any of these protocols." msgstr "" -#: ../../reference/datamodel.rst:2403 +#: ../../reference/datamodel.rst:2417 msgid "" "Called to get the attribute of the owner class (class attribute access) or " "of an instance of that class (instance attribute access). The optional " @@ -2699,13 +2715,13 @@ msgid "" "accessed through the *owner*." msgstr "" -#: ../../reference/datamodel.rst:2409 +#: ../../reference/datamodel.rst:2423 msgid "" "This method should return the computed attribute value or raise an :exc:" "`AttributeError` exception." msgstr "" -#: ../../reference/datamodel.rst:2412 +#: ../../reference/datamodel.rst:2426 msgid "" ":PEP:`252` specifies that :meth:`__get__` is callable with one or two " "arguments. Python's own built-in descriptors support this specification; " @@ -2715,31 +2731,31 @@ msgid "" "not." msgstr "" -#: ../../reference/datamodel.rst:2421 +#: ../../reference/datamodel.rst:2435 msgid "" "Called to set the attribute on an instance *instance* of the owner class to " "a new value, *value*." msgstr "" -#: ../../reference/datamodel.rst:2424 +#: ../../reference/datamodel.rst:2438 msgid "" "Note, adding :meth:`__set__` or :meth:`__delete__` changes the kind of " "descriptor to a \"data descriptor\". See :ref:`descriptor-invocation` for " "more details." msgstr "" -#: ../../reference/datamodel.rst:2430 +#: ../../reference/datamodel.rst:2444 msgid "" "Called to delete the attribute on an instance *instance* of the owner class." msgstr "" -#: ../../reference/datamodel.rst:2432 +#: ../../reference/datamodel.rst:2446 msgid "" "Instances of descriptors may also have the :attr:`!__objclass__` attribute " "present:" msgstr "" -#: ../../reference/datamodel.rst:2437 +#: ../../reference/datamodel.rst:2451 msgid "" "The attribute :attr:`!__objclass__` is interpreted by the :mod:`inspect` " "module as specifying the class where this object was defined (setting this " @@ -2750,11 +2766,11 @@ msgid "" "are implemented in C)." msgstr "" -#: ../../reference/datamodel.rst:2448 +#: ../../reference/datamodel.rst:2462 msgid "Invoking Descriptors" msgstr "" -#: ../../reference/datamodel.rst:2450 +#: ../../reference/datamodel.rst:2464 msgid "" "In general, a descriptor is an object attribute with \"binding behavior\", " "one whose attribute access has been overridden by methods in the descriptor " @@ -2763,7 +2779,7 @@ msgid "" "is said to be a descriptor." msgstr "" -#: ../../reference/datamodel.rst:2456 +#: ../../reference/datamodel.rst:2470 msgid "" "The default behavior for attribute access is to get, set, or delete the " "attribute from an object's dictionary. For instance, ``a.x`` has a lookup " @@ -2771,7 +2787,7 @@ msgid "" "continuing through the base classes of ``type(a)`` excluding metaclasses." msgstr "" -#: ../../reference/datamodel.rst:2461 +#: ../../reference/datamodel.rst:2475 msgid "" "However, if the looked-up value is an object defining one of the descriptor " "methods, then Python may override the default behavior and invoke the " @@ -2779,54 +2795,54 @@ msgid "" "depends on which descriptor methods were defined and how they were called." msgstr "" -#: ../../reference/datamodel.rst:2466 +#: ../../reference/datamodel.rst:2480 msgid "" "The starting point for descriptor invocation is a binding, ``a.x``. How the " "arguments are assembled depends on ``a``:" msgstr "" -#: ../../reference/datamodel.rst:2469 +#: ../../reference/datamodel.rst:2483 msgid "Direct Call" msgstr "" -#: ../../reference/datamodel.rst:2470 +#: ../../reference/datamodel.rst:2484 msgid "" "The simplest and least common call is when user code directly invokes a " "descriptor method: ``x.__get__(a)``." msgstr "" -#: ../../reference/datamodel.rst:2473 +#: ../../reference/datamodel.rst:2487 msgid "Instance Binding" msgstr "" -#: ../../reference/datamodel.rst:2474 +#: ../../reference/datamodel.rst:2488 msgid "" "If binding to an object instance, ``a.x`` is transformed into the call: " "``type(a).__dict__['x'].__get__(a, type(a))``." msgstr "" -#: ../../reference/datamodel.rst:2477 +#: ../../reference/datamodel.rst:2491 msgid "Class Binding" msgstr "" -#: ../../reference/datamodel.rst:2478 +#: ../../reference/datamodel.rst:2492 msgid "" "If binding to a class, ``A.x`` is transformed into the call: ``A." "__dict__['x'].__get__(None, A)``." msgstr "" -#: ../../reference/datamodel.rst:2481 +#: ../../reference/datamodel.rst:2495 msgid "Super Binding" msgstr "" -#: ../../reference/datamodel.rst:2482 +#: ../../reference/datamodel.rst:2496 msgid "" "A dotted lookup such as ``super(A, a).x`` searches ``a.__class__.__mro__`` " "for a base class ``B`` following ``A`` and then returns ``B.__dict__['x']." "__get__(a, A)``. If not a descriptor, ``x`` is returned unchanged." msgstr "" -#: ../../reference/datamodel.rst:2519 +#: ../../reference/datamodel.rst:2533 msgid "" "For instance bindings, the precedence of descriptor invocation depends on " "which descriptor methods are defined. A descriptor can define any " @@ -2844,7 +2860,7 @@ msgid "" "instances." msgstr "" -#: ../../reference/datamodel.rst:2534 +#: ../../reference/datamodel.rst:2548 msgid "" "Python methods (including those decorated with :func:`@staticmethod " "` and :func:`@classmethod `) are implemented as " @@ -2853,30 +2869,30 @@ msgid "" "from other instances of the same class." msgstr "" -#: ../../reference/datamodel.rst:2540 +#: ../../reference/datamodel.rst:2554 msgid "" "The :func:`property` function is implemented as a data descriptor. " "Accordingly, instances cannot override the behavior of a property." msgstr "" -#: ../../reference/datamodel.rst:2547 +#: ../../reference/datamodel.rst:2561 msgid "__slots__" msgstr "" -#: ../../reference/datamodel.rst:2549 +#: ../../reference/datamodel.rst:2563 msgid "" "*__slots__* allow us to explicitly declare data members (like properties) " "and deny the creation of :attr:`~object.__dict__` and *__weakref__* (unless " "explicitly declared in *__slots__* or available in a parent.)" msgstr "" -#: ../../reference/datamodel.rst:2553 +#: ../../reference/datamodel.rst:2567 msgid "" "The space saved over using :attr:`~object.__dict__` can be significant. " "Attribute lookup speed can be significantly improved as well." msgstr "" -#: ../../reference/datamodel.rst:2558 +#: ../../reference/datamodel.rst:2572 msgid "" "This class variable can be assigned a string, iterable, or sequence of " "strings with variable names used by instances. *__slots__* reserves space " @@ -2884,18 +2900,18 @@ msgid "" "`~object.__dict__` and *__weakref__* for each instance." msgstr "" -#: ../../reference/datamodel.rst:2567 +#: ../../reference/datamodel.rst:2581 msgid "Notes on using *__slots__*:" msgstr "" -#: ../../reference/datamodel.rst:2569 +#: ../../reference/datamodel.rst:2583 msgid "" "When inheriting from a class without *__slots__*, the :attr:`~object." "__dict__` and *__weakref__* attribute of the instances will always be " "accessible." msgstr "" -#: ../../reference/datamodel.rst:2573 +#: ../../reference/datamodel.rst:2587 msgid "" "Without a :attr:`~object.__dict__` variable, instances cannot be assigned " "new variables not listed in the *__slots__* definition. Attempts to assign " @@ -2904,7 +2920,7 @@ msgid "" "sequence of strings in the *__slots__* declaration." msgstr "" -#: ../../reference/datamodel.rst:2580 +#: ../../reference/datamodel.rst:2594 msgid "" "Without a *__weakref__* variable for each instance, classes defining " "*__slots__* do not support :mod:`weak references ` to its " @@ -2912,7 +2928,7 @@ msgid "" "to the sequence of strings in the *__slots__* declaration." msgstr "" -#: ../../reference/datamodel.rst:2586 +#: ../../reference/datamodel.rst:2600 msgid "" "*__slots__* are implemented at the class level by creating :ref:`descriptors " "` for each variable name. As a result, class attributes cannot " @@ -2920,7 +2936,7 @@ msgid "" "otherwise, the class attribute would overwrite the descriptor assignment." msgstr "" -#: ../../reference/datamodel.rst:2592 +#: ../../reference/datamodel.rst:2606 msgid "" "The action of a *__slots__* declaration is not limited to the class where it " "is defined. *__slots__* declared in parents are available in child classes. " @@ -2929,7 +2945,7 @@ msgid "" "only contain names of any *additional* slots)." msgstr "" -#: ../../reference/datamodel.rst:2598 +#: ../../reference/datamodel.rst:2612 msgid "" "If a class defines a slot also defined in a base class, the instance " "variable defined by the base class slot is inaccessible (except by " @@ -2938,7 +2954,7 @@ msgid "" "prevent this." msgstr "" -#: ../../reference/datamodel.rst:2603 +#: ../../reference/datamodel.rst:2617 msgid "" ":exc:`TypeError` will be raised if nonempty *__slots__* are defined for a " "class derived from a :c:member:`\"variable-length\" built-in type " @@ -2946,11 +2962,11 @@ msgid "" "`tuple`." msgstr "" -#: ../../reference/datamodel.rst:2608 +#: ../../reference/datamodel.rst:2622 msgid "Any non-string :term:`iterable` may be assigned to *__slots__*." msgstr "" -#: ../../reference/datamodel.rst:2610 +#: ../../reference/datamodel.rst:2624 msgid "" "If a :class:`dictionary ` is used to assign *__slots__*, the " "dictionary keys will be used as the slot names. The values of the dictionary " @@ -2958,13 +2974,13 @@ msgid "" "func:`inspect.getdoc` and displayed in the output of :func:`help`." msgstr "" -#: ../../reference/datamodel.rst:2615 +#: ../../reference/datamodel.rst:2629 msgid "" ":attr:`~object.__class__` assignment works only if both classes have the " "same *__slots__*." msgstr "" -#: ../../reference/datamodel.rst:2618 +#: ../../reference/datamodel.rst:2632 msgid "" ":ref:`Multiple inheritance ` with multiple slotted parent " "classes can be used, but only one parent is allowed to have attributes " @@ -2972,18 +2988,18 @@ msgid "" "raise :exc:`TypeError`." msgstr "" -#: ../../reference/datamodel.rst:2624 +#: ../../reference/datamodel.rst:2638 msgid "" "If an :term:`iterator` is used for *__slots__* then a :term:`descriptor` is " "created for each of the iterator's values. However, the *__slots__* " "attribute will be an empty iterator." msgstr "" -#: ../../reference/datamodel.rst:2632 +#: ../../reference/datamodel.rst:2646 msgid "Customizing class creation" msgstr "" -#: ../../reference/datamodel.rst:2634 +#: ../../reference/datamodel.rst:2648 msgid "" "Whenever a class inherits from another class, :meth:`~object." "__init_subclass__` is called on the parent class. This way, it is possible " @@ -2993,14 +3009,14 @@ msgid "" "future subclasses of the class defining the method." msgstr "" -#: ../../reference/datamodel.rst:2643 +#: ../../reference/datamodel.rst:2657 msgid "" "This method is called whenever the containing class is subclassed. *cls* is " "then the new subclass. If defined as a normal instance method, this method " "is implicitly converted to a class method." msgstr "" -#: ../../reference/datamodel.rst:2647 +#: ../../reference/datamodel.rst:2661 msgid "" "Keyword arguments which are given to a new class are passed to the parent " "class's ``__init_subclass__``. For compatibility with other classes using " @@ -3008,7 +3024,7 @@ msgid "" "pass the others over to the base class, as in::" msgstr "" -#: ../../reference/datamodel.rst:2653 +#: ../../reference/datamodel.rst:2667 msgid "" "class Philosopher:\n" " def __init_subclass__(cls, /, default_name, **kwargs):\n" @@ -3019,13 +3035,13 @@ msgid "" " pass" msgstr "" -#: ../../reference/datamodel.rst:2661 +#: ../../reference/datamodel.rst:2675 msgid "" "The default implementation ``object.__init_subclass__`` does nothing, but " "raises an error if it is called with any arguments." msgstr "" -#: ../../reference/datamodel.rst:2666 +#: ../../reference/datamodel.rst:2680 msgid "" "The metaclass hint ``metaclass`` is consumed by the rest of the type " "machinery, and is never passed to ``__init_subclass__`` implementations. The " @@ -3033,32 +3049,32 @@ msgid "" "``type(cls)``." msgstr "" -#: ../../reference/datamodel.rst:2674 +#: ../../reference/datamodel.rst:2688 msgid "" "When a class is created, :meth:`type.__new__` scans the class variables and " "makes callbacks to those with a :meth:`~object.__set_name__` hook." msgstr "" -#: ../../reference/datamodel.rst:2679 +#: ../../reference/datamodel.rst:2693 msgid "" "Automatically called at the time the owning class *owner* is created. The " "object has been assigned to *name* in that class::" msgstr "" -#: ../../reference/datamodel.rst:2682 +#: ../../reference/datamodel.rst:2696 msgid "" "class A:\n" " x = C() # Automatically calls: x.__set_name__(A, 'x')" msgstr "" -#: ../../reference/datamodel.rst:2685 +#: ../../reference/datamodel.rst:2699 msgid "" "If the class variable is assigned after the class is created, :meth:" "`__set_name__` will not be called automatically. If needed, :meth:" "`__set_name__` can be called directly::" msgstr "" -#: ../../reference/datamodel.rst:2689 +#: ../../reference/datamodel.rst:2703 msgid "" "class A:\n" " pass\n" @@ -3068,22 +3084,22 @@ msgid "" "c.__set_name__(A, 'x') # Manually invoke the hook" msgstr "" -#: ../../reference/datamodel.rst:2696 +#: ../../reference/datamodel.rst:2710 msgid "See :ref:`class-object-creation` for more details." msgstr "" -#: ../../reference/datamodel.rst:2704 +#: ../../reference/datamodel.rst:2718 msgid "Metaclasses" msgstr "" -#: ../../reference/datamodel.rst:2711 +#: ../../reference/datamodel.rst:2725 msgid "" "By default, classes are constructed using :func:`type`. The class body is " "executed in a new namespace and the class name is bound locally to the " "result of ``type(name, bases, namespace)``." msgstr "" -#: ../../reference/datamodel.rst:2715 +#: ../../reference/datamodel.rst:2729 msgid "" "The class creation process can be customized by passing the ``metaclass`` " "keyword argument in the class definition line, or by inheriting from an " @@ -3091,7 +3107,7 @@ msgid "" "both ``MyClass`` and ``MySubclass`` are instances of ``Meta``::" msgstr "" -#: ../../reference/datamodel.rst:2720 +#: ../../reference/datamodel.rst:2734 msgid "" "class Meta(type):\n" " pass\n" @@ -3103,41 +3119,41 @@ msgid "" " pass" msgstr "" -#: ../../reference/datamodel.rst:2729 +#: ../../reference/datamodel.rst:2743 msgid "" "Any other keyword arguments that are specified in the class definition are " "passed through to all metaclass operations described below." msgstr "" -#: ../../reference/datamodel.rst:2732 +#: ../../reference/datamodel.rst:2746 msgid "When a class definition is executed, the following steps occur:" msgstr "" -#: ../../reference/datamodel.rst:2734 +#: ../../reference/datamodel.rst:2748 msgid "MRO entries are resolved;" msgstr "" -#: ../../reference/datamodel.rst:2735 +#: ../../reference/datamodel.rst:2749 msgid "the appropriate metaclass is determined;" msgstr "" -#: ../../reference/datamodel.rst:2736 +#: ../../reference/datamodel.rst:2750 msgid "the class namespace is prepared;" msgstr "" -#: ../../reference/datamodel.rst:2737 +#: ../../reference/datamodel.rst:2751 msgid "the class body is executed;" msgstr "" -#: ../../reference/datamodel.rst:2738 +#: ../../reference/datamodel.rst:2752 msgid "the class object is created." msgstr "" -#: ../../reference/datamodel.rst:2742 +#: ../../reference/datamodel.rst:2756 msgid "Resolving MRO entries" msgstr "" -#: ../../reference/datamodel.rst:2746 +#: ../../reference/datamodel.rst:2760 msgid "" "If a base that appears in a class definition is not an instance of :class:" "`type`, then an :meth:`!__mro_entries__` method is searched on the base. If " @@ -3149,59 +3165,59 @@ msgid "" "is ignored." msgstr "" -#: ../../reference/datamodel.rst:2757 +#: ../../reference/datamodel.rst:2771 msgid ":func:`types.resolve_bases`" msgstr "" -#: ../../reference/datamodel.rst:2758 +#: ../../reference/datamodel.rst:2772 msgid "Dynamically resolve bases that are not instances of :class:`type`." msgstr "" -#: ../../reference/datamodel.rst:2760 +#: ../../reference/datamodel.rst:2774 msgid ":func:`types.get_original_bases`" msgstr "" -#: ../../reference/datamodel.rst:2761 +#: ../../reference/datamodel.rst:2775 msgid "" "Retrieve a class's \"original bases\" prior to modifications by :meth:" "`~object.__mro_entries__`." msgstr "" -#: ../../reference/datamodel.rst:2764 +#: ../../reference/datamodel.rst:2778 msgid ":pep:`560`" msgstr "" -#: ../../reference/datamodel.rst:2765 +#: ../../reference/datamodel.rst:2779 msgid "Core support for typing module and generic types." msgstr "" -#: ../../reference/datamodel.rst:2769 +#: ../../reference/datamodel.rst:2783 msgid "Determining the appropriate metaclass" msgstr "" -#: ../../reference/datamodel.rst:2773 +#: ../../reference/datamodel.rst:2787 msgid "" "The appropriate metaclass for a class definition is determined as follows:" msgstr "" -#: ../../reference/datamodel.rst:2775 +#: ../../reference/datamodel.rst:2789 msgid "" "if no bases and no explicit metaclass are given, then :func:`type` is used;" msgstr "" -#: ../../reference/datamodel.rst:2776 +#: ../../reference/datamodel.rst:2790 msgid "" "if an explicit metaclass is given and it is *not* an instance of :func:" "`type`, then it is used directly as the metaclass;" msgstr "" -#: ../../reference/datamodel.rst:2778 +#: ../../reference/datamodel.rst:2792 msgid "" "if an instance of :func:`type` is given as the explicit metaclass, or bases " "are defined, then the most derived metaclass is used." msgstr "" -#: ../../reference/datamodel.rst:2781 +#: ../../reference/datamodel.rst:2795 msgid "" "The most derived metaclass is selected from the explicitly specified " "metaclass (if any) and the metaclasses (i.e. ``type(cls)``) of all specified " @@ -3210,11 +3226,11 @@ msgid "" "that criterion, then the class definition will fail with ``TypeError``." msgstr "" -#: ../../reference/datamodel.rst:2791 +#: ../../reference/datamodel.rst:2805 msgid "Preparing the class namespace" msgstr "" -#: ../../reference/datamodel.rst:2796 +#: ../../reference/datamodel.rst:2810 msgid "" "Once the appropriate metaclass has been identified, then the class namespace " "is prepared. If the metaclass has a ``__prepare__`` attribute, it is called " @@ -3226,25 +3242,25 @@ msgid "" "copied into a new ``dict``." msgstr "" -#: ../../reference/datamodel.rst:2805 +#: ../../reference/datamodel.rst:2819 msgid "" "If the metaclass has no ``__prepare__`` attribute, then the class namespace " "is initialised as an empty ordered mapping." msgstr "" -#: ../../reference/datamodel.rst:2810 +#: ../../reference/datamodel.rst:2824 msgid ":pep:`3115` - Metaclasses in Python 3000" msgstr "" -#: ../../reference/datamodel.rst:2811 +#: ../../reference/datamodel.rst:2825 msgid "Introduced the ``__prepare__`` namespace hook" msgstr "" -#: ../../reference/datamodel.rst:2815 +#: ../../reference/datamodel.rst:2829 msgid "Executing the class body" msgstr "" -#: ../../reference/datamodel.rst:2820 +#: ../../reference/datamodel.rst:2834 msgid "" "The class body is executed (approximately) as ``exec(body, globals(), " "namespace)``. The key difference from a normal call to :func:`exec` is that " @@ -3253,7 +3269,7 @@ msgid "" "inside a function." msgstr "" -#: ../../reference/datamodel.rst:2826 +#: ../../reference/datamodel.rst:2840 msgid "" "However, even when the class definition occurs inside the function, methods " "defined inside the class still cannot see names defined at the class scope. " @@ -3262,11 +3278,11 @@ msgid "" "reference described in the next section." msgstr "" -#: ../../reference/datamodel.rst:2835 +#: ../../reference/datamodel.rst:2849 msgid "Creating the class object" msgstr "" -#: ../../reference/datamodel.rst:2842 +#: ../../reference/datamodel.rst:2856 msgid "" "Once the class namespace has been populated by executing the class body, the " "class object is created by calling ``metaclass(name, bases, namespace, " @@ -3274,7 +3290,7 @@ msgid "" "to ``__prepare__``)." msgstr "" -#: ../../reference/datamodel.rst:2847 +#: ../../reference/datamodel.rst:2861 msgid "" "This class object is the one that will be referenced by the zero-argument " "form of :func:`super`. ``__class__`` is an implicit closure reference " @@ -3285,7 +3301,7 @@ msgid "" "is identified based on the first argument passed to the method." msgstr "" -#: ../../reference/datamodel.rst:2857 +#: ../../reference/datamodel.rst:2871 msgid "" "In CPython 3.6 and later, the ``__class__`` cell is passed to the metaclass " "as a ``__classcell__`` entry in the class namespace. If present, this must " @@ -3294,39 +3310,39 @@ msgid "" "in Python 3.8." msgstr "" -#: ../../reference/datamodel.rst:2863 +#: ../../reference/datamodel.rst:2877 msgid "" "When using the default metaclass :class:`type`, or any metaclass that " "ultimately calls ``type.__new__``, the following additional customization " "steps are invoked after creating the class object:" msgstr "" -#: ../../reference/datamodel.rst:2867 +#: ../../reference/datamodel.rst:2881 msgid "" "The ``type.__new__`` method collects all of the attributes in the class " "namespace that define a :meth:`~object.__set_name__` method;" msgstr "" -#: ../../reference/datamodel.rst:2869 +#: ../../reference/datamodel.rst:2883 msgid "" "Those ``__set_name__`` methods are called with the class being defined and " "the assigned name of that particular attribute;" msgstr "" -#: ../../reference/datamodel.rst:2871 +#: ../../reference/datamodel.rst:2885 msgid "" "The :meth:`~object.__init_subclass__` hook is called on the immediate parent " "of the new class in its method resolution order." msgstr "" -#: ../../reference/datamodel.rst:2874 +#: ../../reference/datamodel.rst:2888 msgid "" "After the class object is created, it is passed to the class decorators " "included in the class definition (if any) and the resulting object is bound " "in the local namespace as the defined class." msgstr "" -#: ../../reference/datamodel.rst:2878 +#: ../../reference/datamodel.rst:2892 msgid "" "When a new class is created by ``type.__new__``, the object provided as the " "namespace parameter is copied to a new ordered mapping and the original " @@ -3334,19 +3350,19 @@ msgid "" "becomes the :attr:`~type.__dict__` attribute of the class object." msgstr "" -#: ../../reference/datamodel.rst:2885 +#: ../../reference/datamodel.rst:2899 msgid ":pep:`3135` - New super" msgstr "" -#: ../../reference/datamodel.rst:2886 +#: ../../reference/datamodel.rst:2900 msgid "Describes the implicit ``__class__`` closure reference" msgstr "" -#: ../../reference/datamodel.rst:2890 +#: ../../reference/datamodel.rst:2904 msgid "Uses for metaclasses" msgstr "" -#: ../../reference/datamodel.rst:2892 +#: ../../reference/datamodel.rst:2906 msgid "" "The potential uses for metaclasses are boundless. Some ideas that have been " "explored include enum, logging, interface checking, automatic delegation, " @@ -3354,17 +3370,17 @@ msgid "" "locking/synchronization." msgstr "" -#: ../../reference/datamodel.rst:2899 +#: ../../reference/datamodel.rst:2913 msgid "Customizing instance and subclass checks" msgstr "" -#: ../../reference/datamodel.rst:2901 +#: ../../reference/datamodel.rst:2915 msgid "" "The following methods are used to override the default behavior of the :func:" "`isinstance` and :func:`issubclass` built-in functions." msgstr "" -#: ../../reference/datamodel.rst:2904 +#: ../../reference/datamodel.rst:2918 msgid "" "In particular, the metaclass :class:`abc.ABCMeta` implements these methods " "in order to allow the addition of Abstract Base Classes (ABCs) as \"virtual " @@ -3372,21 +3388,21 @@ msgid "" "other ABCs." msgstr "" -#: ../../reference/datamodel.rst:2911 +#: ../../reference/datamodel.rst:2925 msgid "" "Return true if *instance* should be considered a (direct or indirect) " "instance of *class*. If defined, called to implement ``isinstance(instance, " "class)``." msgstr "" -#: ../../reference/datamodel.rst:2918 +#: ../../reference/datamodel.rst:2932 msgid "" "Return true if *subclass* should be considered a (direct or indirect) " "subclass of *class*. If defined, called to implement ``issubclass(subclass, " "class)``." msgstr "" -#: ../../reference/datamodel.rst:2923 +#: ../../reference/datamodel.rst:2937 msgid "" "Note that these methods are looked up on the type (metaclass) of a class. " "They cannot be defined as class methods in the actual class. This is " @@ -3394,11 +3410,11 @@ msgid "" "only in this case the instance is itself a class." msgstr "" -#: ../../reference/datamodel.rst:2930 +#: ../../reference/datamodel.rst:2944 msgid ":pep:`3119` - Introducing Abstract Base Classes" msgstr "" -#: ../../reference/datamodel.rst:2931 +#: ../../reference/datamodel.rst:2945 msgid "" "Includes the specification for customizing :func:`isinstance` and :func:" "`issubclass` behavior through :meth:`~type.__instancecheck__` and :meth:" @@ -3407,11 +3423,11 @@ msgid "" "language." msgstr "" -#: ../../reference/datamodel.rst:2939 +#: ../../reference/datamodel.rst:2953 msgid "Emulating generic types" msgstr "" -#: ../../reference/datamodel.rst:2941 +#: ../../reference/datamodel.rst:2955 msgid "" "When using :term:`type annotations`, it is often useful to " "*parameterize* a :term:`generic type` using Python's square-brackets " @@ -3419,65 +3435,65 @@ msgid "" "a :class:`list` in which all the elements are of type :class:`int`." msgstr "" -#: ../../reference/datamodel.rst:2948 +#: ../../reference/datamodel.rst:2962 msgid ":pep:`484` - Type Hints" msgstr "" -#: ../../reference/datamodel.rst:2949 +#: ../../reference/datamodel.rst:2963 msgid "Introducing Python's framework for type annotations" msgstr "" -#: ../../reference/datamodel.rst:2951 +#: ../../reference/datamodel.rst:2965 msgid ":ref:`Generic Alias Types`" msgstr "" -#: ../../reference/datamodel.rst:2952 +#: ../../reference/datamodel.rst:2966 msgid "Documentation for objects representing parameterized generic classes" msgstr "" -#: ../../reference/datamodel.rst:2954 +#: ../../reference/datamodel.rst:2968 msgid "" ":ref:`Generics`, :ref:`user-defined generics` and :" "class:`typing.Generic`" msgstr "" -#: ../../reference/datamodel.rst:2955 +#: ../../reference/datamodel.rst:2969 msgid "" "Documentation on how to implement generic classes that can be parameterized " "at runtime and understood by static type-checkers." msgstr "" -#: ../../reference/datamodel.rst:2958 +#: ../../reference/datamodel.rst:2972 msgid "" "A class can *generally* only be parameterized if it defines the special " "class method ``__class_getitem__()``." msgstr "" -#: ../../reference/datamodel.rst:2963 +#: ../../reference/datamodel.rst:2977 msgid "" "Return an object representing the specialization of a generic class by type " "arguments found in *key*." msgstr "" -#: ../../reference/datamodel.rst:2966 +#: ../../reference/datamodel.rst:2980 msgid "" "When defined on a class, ``__class_getitem__()`` is automatically a class " "method. As such, there is no need for it to be decorated with :func:" "`@classmethod` when it is defined." msgstr "" -#: ../../reference/datamodel.rst:2972 +#: ../../reference/datamodel.rst:2986 msgid "The purpose of *__class_getitem__*" msgstr "" -#: ../../reference/datamodel.rst:2974 +#: ../../reference/datamodel.rst:2988 msgid "" "The purpose of :meth:`~object.__class_getitem__` is to allow runtime " "parameterization of standard-library generic classes in order to more easily " "apply :term:`type hints` to these classes." msgstr "" -#: ../../reference/datamodel.rst:2978 +#: ../../reference/datamodel.rst:2992 msgid "" "To implement custom generic classes that can be parameterized at runtime and " "understood by static type-checkers, users should either inherit from a " @@ -3486,7 +3502,7 @@ msgid "" "own implementation of ``__class_getitem__()``." msgstr "" -#: ../../reference/datamodel.rst:2984 +#: ../../reference/datamodel.rst:2998 msgid "" "Custom implementations of :meth:`~object.__class_getitem__` on classes " "defined outside of the standard library may not be understood by third-party " @@ -3494,11 +3510,11 @@ msgid "" "purposes other than type hinting is discouraged." msgstr "" -#: ../../reference/datamodel.rst:2994 +#: ../../reference/datamodel.rst:3008 msgid "*__class_getitem__* versus *__getitem__*" msgstr "" -#: ../../reference/datamodel.rst:2996 +#: ../../reference/datamodel.rst:3010 msgid "" "Usually, the :ref:`subscription` of an object using square " "brackets will call the :meth:`~object.__getitem__` instance method defined " @@ -3508,14 +3524,14 @@ msgid "" "genericalias>` object if it is properly defined." msgstr "" -#: ../../reference/datamodel.rst:3003 +#: ../../reference/datamodel.rst:3017 msgid "" "Presented with the :term:`expression` ``obj[x]``, the Python interpreter " "follows something like the following process to decide whether :meth:" "`~object.__getitem__` or :meth:`~object.__class_getitem__` should be called::" msgstr "" -#: ../../reference/datamodel.rst:3008 +#: ../../reference/datamodel.rst:3022 msgid "" "from inspect import isclass\n" "\n" @@ -3541,7 +3557,7 @@ msgid "" " )" msgstr "" -#: ../../reference/datamodel.rst:3031 +#: ../../reference/datamodel.rst:3045 msgid "" "In Python, all classes are themselves instances of other classes. The class " "of a class is known as that class's :term:`metaclass`, and most classes have " @@ -3551,7 +3567,7 @@ msgid "" "__class_getitem__` being called::" msgstr "" -#: ../../reference/datamodel.rst:3038 +#: ../../reference/datamodel.rst:3052 msgid "" ">>> # list has class \"type\" as its metaclass, like most classes:\n" ">>> type(list)\n" @@ -3566,14 +3582,14 @@ msgid "" "" msgstr "" -#: ../../reference/datamodel.rst:3050 +#: ../../reference/datamodel.rst:3064 msgid "" "However, if a class has a custom metaclass that defines :meth:`~object." "__getitem__`, subscribing the class may result in different behaviour. An " "example of this can be found in the :mod:`enum` module::" msgstr "" -#: ../../reference/datamodel.rst:3054 +#: ../../reference/datamodel.rst:3068 msgid "" ">>> from enum import Enum\n" ">>> class Menu(Enum):\n" @@ -3593,33 +3609,33 @@ msgid "" "" msgstr "" -#: ../../reference/datamodel.rst:3073 +#: ../../reference/datamodel.rst:3087 msgid ":pep:`560` - Core Support for typing module and generic types" msgstr "" -#: ../../reference/datamodel.rst:3074 +#: ../../reference/datamodel.rst:3088 msgid "" "Introducing :meth:`~object.__class_getitem__`, and outlining when a :ref:" "`subscription` results in ``__class_getitem__()`` being " "called instead of :meth:`~object.__getitem__`" msgstr "" -#: ../../reference/datamodel.rst:3082 +#: ../../reference/datamodel.rst:3096 msgid "Emulating callable objects" msgstr "" -#: ../../reference/datamodel.rst:3089 +#: ../../reference/datamodel.rst:3103 msgid "" "Called when the instance is \"called\" as a function; if this method is " "defined, ``x(arg1, arg2, ...)`` roughly translates to ``type(x).__call__(x, " "arg1, ...)``. The :class:`object` class itself does not provide this method." msgstr "" -#: ../../reference/datamodel.rst:3097 +#: ../../reference/datamodel.rst:3111 msgid "Emulating container types" msgstr "" -#: ../../reference/datamodel.rst:3099 +#: ../../reference/datamodel.rst:3113 msgid "" "The following methods can be defined to implement container objects. None of " "them are provided by the :class:`object` class itself. Containers usually " @@ -3656,7 +3672,7 @@ msgid "" "should iterate through the values." msgstr "" -#: ../../reference/datamodel.rst:3141 +#: ../../reference/datamodel.rst:3155 msgid "" "Called to implement the built-in function :func:`len`. Should return the " "length of the object, an integer ``>=`` 0. Also, an object that doesn't " @@ -3664,7 +3680,7 @@ msgid "" "returns zero is considered to be false in a Boolean context." msgstr "" -#: ../../reference/datamodel.rst:3148 +#: ../../reference/datamodel.rst:3162 msgid "" "In CPython, the length is required to be at most :data:`sys.maxsize`. If the " "length is larger than :data:`!sys.maxsize` some features (such as :func:" @@ -3673,7 +3689,7 @@ msgid "" "`~object.__bool__` method." msgstr "" -#: ../../reference/datamodel.rst:3157 +#: ../../reference/datamodel.rst:3171 msgid "" "Called to implement :func:`operator.length_hint`. Should return an estimated " "length for the object (which may be greater or less than the actual length). " @@ -3683,28 +3699,28 @@ msgid "" "never required for correctness." msgstr "" -#: ../../reference/datamodel.rst:3171 +#: ../../reference/datamodel.rst:3185 msgid "" "Slicing is done exclusively with the following three methods. A call like ::" msgstr "" -#: ../../reference/datamodel.rst:3173 +#: ../../reference/datamodel.rst:3187 msgid "a[1:2] = b" msgstr "" -#: ../../reference/datamodel.rst:3175 +#: ../../reference/datamodel.rst:3189 msgid "is translated to ::" msgstr "" -#: ../../reference/datamodel.rst:3177 +#: ../../reference/datamodel.rst:3191 msgid "a[slice(1, 2, None)] = b" msgstr "" -#: ../../reference/datamodel.rst:3179 +#: ../../reference/datamodel.rst:3193 msgid "and so forth. Missing slice items are always filled in with ``None``." msgstr "" -#: ../../reference/datamodel.rst:3184 +#: ../../reference/datamodel.rst:3198 msgid "" "Called to implement evaluation of ``self[key]``. For :term:`sequence` types, " "the accepted keys should be integers. Optionally, they may support :class:" @@ -3716,20 +3732,20 @@ msgid "" "`KeyError` should be raised." msgstr "" -#: ../../reference/datamodel.rst:3196 +#: ../../reference/datamodel.rst:3210 msgid "" ":keyword:`for` loops expect that an :exc:`IndexError` will be raised for " "illegal indexes to allow proper detection of the end of the sequence." msgstr "" -#: ../../reference/datamodel.rst:3201 +#: ../../reference/datamodel.rst:3215 msgid "" "When :ref:`subscripting` a *class*, the special class method :" "meth:`~object.__class_getitem__` may be called instead of ``__getitem__()``. " "See :ref:`classgetitem-versus-getitem` for more details." msgstr "" -#: ../../reference/datamodel.rst:3209 +#: ../../reference/datamodel.rst:3223 msgid "" "Called to implement assignment to ``self[key]``. Same note as for :meth:" "`__getitem__`. This should only be implemented for mappings if the objects " @@ -3738,7 +3754,7 @@ msgid "" "for improper *key* values as for the :meth:`__getitem__` method." msgstr "" -#: ../../reference/datamodel.rst:3218 +#: ../../reference/datamodel.rst:3232 msgid "" "Called to implement deletion of ``self[key]``. Same note as for :meth:" "`__getitem__`. This should only be implemented for mappings if the objects " @@ -3747,13 +3763,13 @@ msgid "" "values as for the :meth:`__getitem__` method." msgstr "" -#: ../../reference/datamodel.rst:3227 +#: ../../reference/datamodel.rst:3241 msgid "" "Called by :class:`dict`\\ .\\ :meth:`__getitem__` to implement ``self[key]`` " "for dict subclasses when key is not in the dictionary." msgstr "" -#: ../../reference/datamodel.rst:3233 +#: ../../reference/datamodel.rst:3247 msgid "" "This method is called when an :term:`iterator` is required for a container. " "This method should return a new iterator object that can iterate over all " @@ -3761,14 +3777,14 @@ msgid "" "of the container." msgstr "" -#: ../../reference/datamodel.rst:3241 +#: ../../reference/datamodel.rst:3255 msgid "" "Called (if present) by the :func:`reversed` built-in to implement reverse " "iteration. It should return a new iterator object that iterates over all " "the objects in the container in reverse order." msgstr "" -#: ../../reference/datamodel.rst:3245 +#: ../../reference/datamodel.rst:3259 msgid "" "If the :meth:`__reversed__` method is not provided, the :func:`reversed` " "built-in will fall back to using the sequence protocol (:meth:`__len__` and :" @@ -3777,7 +3793,7 @@ msgid "" "more efficient than the one provided by :func:`reversed`." msgstr "" -#: ../../reference/datamodel.rst:3252 +#: ../../reference/datamodel.rst:3266 msgid "" "The membership test operators (:keyword:`in` and :keyword:`not in`) are " "normally implemented as an iteration through a container. However, container " @@ -3785,14 +3801,14 @@ msgid "" "implementation, which also does not require the object be iterable." msgstr "" -#: ../../reference/datamodel.rst:3259 +#: ../../reference/datamodel.rst:3273 msgid "" "Called to implement membership test operators. Should return true if *item* " "is in *self*, false otherwise. For mapping objects, this should consider " "the keys of the mapping rather than the values or the key-item pairs." msgstr "" -#: ../../reference/datamodel.rst:3263 +#: ../../reference/datamodel.rst:3277 msgid "" "For objects that don't define :meth:`__contains__`, the membership test " "first tries iteration via :meth:`__iter__`, then the old sequence iteration " @@ -3800,11 +3816,11 @@ msgid "" "reference `." msgstr "" -#: ../../reference/datamodel.rst:3272 +#: ../../reference/datamodel.rst:3286 msgid "Emulating numeric types" msgstr "" -#: ../../reference/datamodel.rst:3274 +#: ../../reference/datamodel.rst:3288 msgid "" "The following methods can be defined to emulate numeric objects. Methods " "corresponding to operations that are not supported by the particular kind of " @@ -3812,7 +3828,7 @@ msgid "" "should be left undefined." msgstr "" -#: ../../reference/datamodel.rst:3300 +#: ../../reference/datamodel.rst:3314 msgid "" "These methods are called to implement the binary arithmetic operations " "(``+``, ``-``, ``*``, ``@``, ``/``, ``//``, ``%``, :func:`divmod`, :func:" @@ -3826,13 +3842,13 @@ msgid "" "`pow` function is to be supported." msgstr "" -#: ../../reference/datamodel.rst:3311 +#: ../../reference/datamodel.rst:3325 msgid "" "If one of those methods does not support the operation with the supplied " "arguments, it should return :data:`NotImplemented`." msgstr "" -#: ../../reference/datamodel.rst:3334 +#: ../../reference/datamodel.rst:3348 msgid "" "These methods are called to implement the binary arithmetic operations " "(``+``, ``-``, ``*``, ``@``, ``/``, ``//``, ``%``, :func:`divmod`, :func:" @@ -3846,21 +3862,21 @@ msgid "" "`NotImplemented` or ``type(y)`` is a subclass of ``type(x)``. [#]_" msgstr "" -#: ../../reference/datamodel.rst:3345 +#: ../../reference/datamodel.rst:3359 msgid "" "Note that :meth:`__rpow__` should be defined to accept an optional third " "argument if the three-argument version of the built-in :func:`pow` function " "is to be supported." msgstr "" -#: ../../reference/datamodel.rst:3351 +#: ../../reference/datamodel.rst:3365 msgid "" "Three-argument :func:`pow` now try calling :meth:`~object.__rpow__` if " "necessary. Previously it was only called in two-argument :func:`!pow` and " "the binary power operator." msgstr "" -#: ../../reference/datamodel.rst:3357 +#: ../../reference/datamodel.rst:3371 msgid "" "If the right operand's type is a subclass of the left operand's type and " "that subclass provides a different implementation of the reflected method " @@ -3869,7 +3885,7 @@ msgid "" "ancestors' operations." msgstr "" -#: ../../reference/datamodel.rst:3377 +#: ../../reference/datamodel.rst:3391 msgid "" "These methods are called to implement the augmented arithmetic assignments " "(``+=``, ``-=``, ``*=``, ``@=``, ``/=``, ``//=``, ``%=``, ``**=``, ``<<=``, " @@ -3887,19 +3903,19 @@ msgid "" "data model." msgstr "" -#: ../../reference/datamodel.rst:3400 +#: ../../reference/datamodel.rst:3414 msgid "" "Called to implement the unary arithmetic operations (``-``, ``+``, :func:" "`abs` and ``~``)." msgstr "" -#: ../../reference/datamodel.rst:3413 +#: ../../reference/datamodel.rst:3427 msgid "" "Called to implement the built-in functions :func:`complex`, :func:`int` and :" "func:`float`. Should return a value of the appropriate type." msgstr "" -#: ../../reference/datamodel.rst:3420 +#: ../../reference/datamodel.rst:3434 msgid "" "Called to implement :func:`operator.index`, and whenever Python needs to " "losslessly convert the numeric object to an integer object (such as in " @@ -3908,14 +3924,14 @@ msgid "" "integer type. Must return an integer." msgstr "" -#: ../../reference/datamodel.rst:3426 +#: ../../reference/datamodel.rst:3440 msgid "" "If :meth:`__int__`, :meth:`__float__` and :meth:`__complex__` are not " "defined then corresponding built-in functions :func:`int`, :func:`float` " "and :func:`complex` fall back to :meth:`__index__`." msgstr "" -#: ../../reference/datamodel.rst:3438 +#: ../../reference/datamodel.rst:3452 msgid "" "Called to implement the built-in function :func:`round` and :mod:`math` " "functions :func:`~math.trunc`, :func:`~math.floor` and :func:`~math.ceil`. " @@ -3924,16 +3940,16 @@ msgid "" "(typically an :class:`int`)." msgstr "" -#: ../../reference/datamodel.rst:3444 +#: ../../reference/datamodel.rst:3458 msgid "" ":func:`int` no longer delegates to the :meth:`~object.__trunc__` method." msgstr "" -#: ../../reference/datamodel.rst:3451 +#: ../../reference/datamodel.rst:3465 msgid "With Statement Context Managers" msgstr "" -#: ../../reference/datamodel.rst:3453 +#: ../../reference/datamodel.rst:3467 msgid "" "A :dfn:`context manager` is an object that defines the runtime context to be " "established when executing a :keyword:`with` statement. The context manager " @@ -3943,34 +3959,34 @@ msgid "" "can also be used by directly invoking their methods." msgstr "" -#: ../../reference/datamodel.rst:3464 +#: ../../reference/datamodel.rst:3478 msgid "" "Typical uses of context managers include saving and restoring various kinds " "of global state, locking and unlocking resources, closing opened files, etc." msgstr "" -#: ../../reference/datamodel.rst:3467 +#: ../../reference/datamodel.rst:3481 msgid "" "For more information on context managers, see :ref:`typecontextmanager`. " "The :class:`object` class itself does not provide the context manager " "methods." msgstr "" -#: ../../reference/datamodel.rst:3473 +#: ../../reference/datamodel.rst:3487 msgid "" "Enter the runtime context related to this object. The :keyword:`with` " "statement will bind this method's return value to the target(s) specified in " "the :keyword:`!as` clause of the statement, if any." msgstr "" -#: ../../reference/datamodel.rst:3480 +#: ../../reference/datamodel.rst:3494 msgid "" "Exit the runtime context related to this object. The parameters describe the " "exception that caused the context to be exited. If the context was exited " "without an exception, all three arguments will be :const:`None`." msgstr "" -#: ../../reference/datamodel.rst:3484 +#: ../../reference/datamodel.rst:3498 msgid "" "If an exception is supplied, and the method wishes to suppress the exception " "(i.e., prevent it from being propagated), it should return a true value. " @@ -3978,27 +3994,27 @@ msgid "" "method." msgstr "" -#: ../../reference/datamodel.rst:3488 +#: ../../reference/datamodel.rst:3502 msgid "" "Note that :meth:`~object.__exit__` methods should not reraise the passed-in " "exception; this is the caller's responsibility." msgstr "" -#: ../../reference/datamodel.rst:3494 +#: ../../reference/datamodel.rst:3508 msgid ":pep:`343` - The \"with\" statement" msgstr "" -#: ../../reference/datamodel.rst:3495 +#: ../../reference/datamodel.rst:3509 msgid "" "The specification, background, and examples for the Python :keyword:`with` " "statement." msgstr "" -#: ../../reference/datamodel.rst:3502 +#: ../../reference/datamodel.rst:3516 msgid "Customizing positional arguments in class pattern matching" msgstr "" -#: ../../reference/datamodel.rst:3504 +#: ../../reference/datamodel.rst:3518 msgid "" "When using a class name in a pattern, positional arguments in the pattern " "are not allowed by default, i.e. ``case MyClass(x, y)`` is typically invalid " @@ -4006,7 +4022,7 @@ msgid "" "pattern, the class needs to define a *__match_args__* attribute." msgstr "" -#: ../../reference/datamodel.rst:3511 +#: ../../reference/datamodel.rst:3525 msgid "" "This class variable can be assigned a tuple of strings. When this class is " "used in a class pattern with positional arguments, each positional argument " @@ -4015,7 +4031,7 @@ msgid "" "to setting it to ``()``." msgstr "" -#: ../../reference/datamodel.rst:3517 +#: ../../reference/datamodel.rst:3531 msgid "" "For example, if ``MyClass.__match_args__`` is ``(\"left\", \"center\", " "\"right\")`` that means that ``case MyClass(x, y)`` is equivalent to ``case " @@ -4025,19 +4041,19 @@ msgid "" "exc:`TypeError`." msgstr "" -#: ../../reference/datamodel.rst:3527 +#: ../../reference/datamodel.rst:3541 msgid ":pep:`634` - Structural Pattern Matching" msgstr "" -#: ../../reference/datamodel.rst:3528 +#: ../../reference/datamodel.rst:3542 msgid "The specification for the Python ``match`` statement." msgstr "" -#: ../../reference/datamodel.rst:3534 +#: ../../reference/datamodel.rst:3548 msgid "Emulating buffer types" msgstr "" -#: ../../reference/datamodel.rst:3536 +#: ../../reference/datamodel.rst:3550 msgid "" "The :ref:`buffer protocol ` provides a way for Python objects " "to expose efficient access to a low-level memory array. This protocol is " @@ -4045,13 +4061,13 @@ msgid "" "and third-party libraries may define additional buffer types." msgstr "" -#: ../../reference/datamodel.rst:3541 +#: ../../reference/datamodel.rst:3555 msgid "" "While buffer types are usually implemented in C, it is also possible to " "implement the protocol in Python." msgstr "" -#: ../../reference/datamodel.rst:3546 +#: ../../reference/datamodel.rst:3560 msgid "" "Called when a buffer is requested from *self* (for example, by the :class:" "`memoryview` constructor). The *flags* argument is an integer representing " @@ -4061,7 +4077,7 @@ msgid "" "`memoryview` object." msgstr "" -#: ../../reference/datamodel.rst:3555 +#: ../../reference/datamodel.rst:3569 msgid "" "Called when a buffer is no longer needed. The *buffer* argument is a :class:" "`memoryview` object that was previously returned by :meth:`~object." @@ -4070,35 +4086,35 @@ msgid "" "to perform any cleanup are not required to implement this method." msgstr "" -#: ../../reference/datamodel.rst:3566 +#: ../../reference/datamodel.rst:3580 msgid ":pep:`688` - Making the buffer protocol accessible in Python" msgstr "" -#: ../../reference/datamodel.rst:3567 +#: ../../reference/datamodel.rst:3581 msgid "" "Introduces the Python ``__buffer__`` and ``__release_buffer__`` methods." msgstr "" -#: ../../reference/datamodel.rst:3569 +#: ../../reference/datamodel.rst:3583 msgid ":class:`collections.abc.Buffer`" msgstr "" -#: ../../reference/datamodel.rst:3570 +#: ../../reference/datamodel.rst:3584 msgid "ABC for buffer types." msgstr "" -#: ../../reference/datamodel.rst:3573 +#: ../../reference/datamodel.rst:3587 msgid "Annotations" msgstr "" -#: ../../reference/datamodel.rst:3575 +#: ../../reference/datamodel.rst:3589 msgid "" "Functions, classes, and modules may contain :term:`annotations " "`, which are a way to associate information (usually :term:`type " "hints `) with a symbol." msgstr "" -#: ../../reference/datamodel.rst:3581 +#: ../../reference/datamodel.rst:3595 msgid "" "This attribute contains the annotations for an object. It is :ref:`lazily " "evaluated `, so accessing the attribute may execute " @@ -4106,24 +4122,24 @@ msgid "" "attribute is set to a dictionary mapping from variable names to annotations." msgstr "" -#: ../../reference/datamodel.rst:3586 +#: ../../reference/datamodel.rst:3600 msgid "Annotations are now lazily evaluated." msgstr "" -#: ../../reference/datamodel.rst:3591 +#: ../../reference/datamodel.rst:3605 msgid "" "An :term:`annotate function`. Returns a new dictionary object mapping " "attribute/parameter names to their annotation values." msgstr "" -#: ../../reference/datamodel.rst:3594 +#: ../../reference/datamodel.rst:3608 msgid "" "Takes a format parameter specifying the format in which annotations values " "should be provided. It must be a member of the :class:`annotationlib.Format` " "enum, or an integer with a value corresponding to a member of the enum." msgstr "" -#: ../../reference/datamodel.rst:3598 +#: ../../reference/datamodel.rst:3612 msgid "" "If an annotate function doesn't support the requested format, it must raise :" "exc:`NotImplementedError`. Annotate functions must always support :attr:" @@ -4131,34 +4147,34 @@ msgid "" "`NotImplementedError()` when called with this format." msgstr "" -#: ../../reference/datamodel.rst:3603 +#: ../../reference/datamodel.rst:3617 msgid "" "When called with :attr:`~annotationlib.Format.VALUE` format, an annotate " "function may raise :exc:`NameError`; it must not raise :exc:`!NameError` " "when called requesting any other format." msgstr "" -#: ../../reference/datamodel.rst:3606 +#: ../../reference/datamodel.rst:3620 msgid "" "If an object does not have any annotations, :attr:`~object.__annotate__` " "should preferably be set to ``None`` (it can’t be deleted), rather than set " "to a function that returns an empty dict." msgstr "" -#: ../../reference/datamodel.rst:3613 +#: ../../reference/datamodel.rst:3627 msgid ":pep:`649` --- Deferred evaluation of annotation using descriptors" msgstr "" -#: ../../reference/datamodel.rst:3614 +#: ../../reference/datamodel.rst:3628 msgid "" "Introduces lazy evaluation of annotations and the ``__annotate__`` function." msgstr "" -#: ../../reference/datamodel.rst:3620 +#: ../../reference/datamodel.rst:3634 msgid "Special method lookup" msgstr "" -#: ../../reference/datamodel.rst:3622 +#: ../../reference/datamodel.rst:3636 msgid "" "For custom classes, implicit invocations of special methods are only " "guaranteed to work correctly if defined on an object's type, not in the " @@ -4166,7 +4182,7 @@ msgid "" "following code raises an exception::" msgstr "" -#: ../../reference/datamodel.rst:3627 +#: ../../reference/datamodel.rst:3641 msgid "" ">>> class C:\n" "... pass\n" @@ -4179,7 +4195,7 @@ msgid "" "TypeError: object of type 'C' has no len()" msgstr "" -#: ../../reference/datamodel.rst:3637 +#: ../../reference/datamodel.rst:3651 msgid "" "The rationale behind this behaviour lies with a number of special methods " "such as :meth:`~object.__hash__` and :meth:`~object.__repr__` that are " @@ -4188,7 +4204,7 @@ msgid "" "invoked on the type object itself::" msgstr "" -#: ../../reference/datamodel.rst:3644 +#: ../../reference/datamodel.rst:3658 msgid "" ">>> 1 .__hash__() == hash(1)\n" "True\n" @@ -4198,14 +4214,14 @@ msgid "" "TypeError: descriptor '__hash__' of 'int' object needs an argument" msgstr "" -#: ../../reference/datamodel.rst:3651 +#: ../../reference/datamodel.rst:3665 msgid "" "Incorrectly attempting to invoke an unbound method of a class in this way is " "sometimes referred to as 'metaclass confusion', and is avoided by bypassing " "the instance when looking up special methods::" msgstr "" -#: ../../reference/datamodel.rst:3655 +#: ../../reference/datamodel.rst:3669 msgid "" ">>> type(1).__hash__(1) == hash(1)\n" "True\n" @@ -4213,14 +4229,14 @@ msgid "" "True" msgstr "" -#: ../../reference/datamodel.rst:3660 +#: ../../reference/datamodel.rst:3674 msgid "" "In addition to bypassing any instance attributes in the interest of " "correctness, implicit special method lookup generally also bypasses the :" "meth:`~object.__getattribute__` method even of the object's metaclass::" msgstr "" -#: ../../reference/datamodel.rst:3664 +#: ../../reference/datamodel.rst:3678 msgid "" ">>> class Meta(type):\n" "... def __getattribute__(*args):\n" @@ -4245,7 +4261,7 @@ msgid "" "10" msgstr "" -#: ../../reference/datamodel.rst:3686 +#: ../../reference/datamodel.rst:3700 msgid "" "Bypassing the :meth:`~object.__getattribute__` machinery in this fashion " "provides significant scope for speed optimisations within the interpreter, " @@ -4254,29 +4270,29 @@ msgid "" "consistently invoked by the interpreter)." msgstr "" -#: ../../reference/datamodel.rst:3697 +#: ../../reference/datamodel.rst:3711 msgid "Coroutines" msgstr "" -#: ../../reference/datamodel.rst:3701 +#: ../../reference/datamodel.rst:3715 msgid "Awaitable Objects" msgstr "" -#: ../../reference/datamodel.rst:3703 +#: ../../reference/datamodel.rst:3717 msgid "" "An :term:`awaitable` object generally implements an :meth:`~object." "__await__` method. :term:`Coroutine objects ` returned from :" "keyword:`async def` functions are awaitable." msgstr "" -#: ../../reference/datamodel.rst:3709 +#: ../../reference/datamodel.rst:3723 msgid "" "The :term:`generator iterator` objects returned from generators decorated " "with :func:`types.coroutine` are also awaitable, but they do not implement :" "meth:`~object.__await__`." msgstr "" -#: ../../reference/datamodel.rst:3715 +#: ../../reference/datamodel.rst:3729 msgid "" "Must return an :term:`iterator`. Should be used to implement :term:" "`awaitable` objects. For instance, :class:`asyncio.Future` implements this " @@ -4284,7 +4300,7 @@ msgid "" "`object` class itself is not awaitable and does not provide this method." msgstr "" -#: ../../reference/datamodel.rst:3723 +#: ../../reference/datamodel.rst:3737 msgid "" "The language doesn't place any restriction on the type or value of the " "objects yielded by the iterator returned by ``__await__``, as this is " @@ -4292,15 +4308,15 @@ msgid "" "g. :mod:`asyncio`) that will be managing the :term:`awaitable` object." msgstr "" -#: ../../reference/datamodel.rst:3731 +#: ../../reference/datamodel.rst:3745 msgid ":pep:`492` for additional information about awaitable objects." msgstr "" -#: ../../reference/datamodel.rst:3737 +#: ../../reference/datamodel.rst:3751 msgid "Coroutine Objects" msgstr "" -#: ../../reference/datamodel.rst:3739 +#: ../../reference/datamodel.rst:3753 msgid "" ":term:`Coroutine objects ` are :term:`awaitable` objects. A " "coroutine's execution can be controlled by calling :meth:`~object.__await__` " @@ -4311,18 +4327,18 @@ msgid "" "should not directly raise unhandled :exc:`StopIteration` exceptions." msgstr "" -#: ../../reference/datamodel.rst:3747 +#: ../../reference/datamodel.rst:3761 msgid "" "Coroutines also have the methods listed below, which are analogous to those " "of generators (see :ref:`generator-methods`). However, unlike generators, " "coroutines do not directly support iteration." msgstr "" -#: ../../reference/datamodel.rst:3751 +#: ../../reference/datamodel.rst:3765 msgid "It is a :exc:`RuntimeError` to await on a coroutine more than once." msgstr "" -#: ../../reference/datamodel.rst:3757 +#: ../../reference/datamodel.rst:3771 msgid "" "Starts or resumes execution of the coroutine. If *value* is ``None``, this " "is equivalent to advancing the iterator returned by :meth:`~object." @@ -4333,7 +4349,7 @@ msgid "" "value, described above." msgstr "" -#: ../../reference/datamodel.rst:3768 +#: ../../reference/datamodel.rst:3782 msgid "" "Raises the specified exception in the coroutine. This method delegates to " "the :meth:`~generator.throw` method of the iterator that caused the " @@ -4344,13 +4360,13 @@ msgid "" "not caught in the coroutine, it propagates back to the caller." msgstr "" -#: ../../reference/datamodel.rst:3779 +#: ../../reference/datamodel.rst:3793 msgid "" "The second signature \\(type\\[, value\\[, traceback\\]\\]\\) is deprecated " "and may be removed in a future version of Python." msgstr "" -#: ../../reference/datamodel.rst:3784 +#: ../../reference/datamodel.rst:3798 msgid "" "Causes the coroutine to clean itself up and exit. If the coroutine is " "suspended, this method first delegates to the :meth:`~generator.close` " @@ -4360,46 +4376,46 @@ msgid "" "is marked as having finished executing, even if it was never started." msgstr "" -#: ../../reference/datamodel.rst:3792 +#: ../../reference/datamodel.rst:3806 msgid "" "Coroutine objects are automatically closed using the above process when they " "are about to be destroyed." msgstr "" -#: ../../reference/datamodel.rst:3798 +#: ../../reference/datamodel.rst:3812 msgid "Asynchronous Iterators" msgstr "" -#: ../../reference/datamodel.rst:3800 +#: ../../reference/datamodel.rst:3814 msgid "" "An *asynchronous iterator* can call asynchronous code in its ``__anext__`` " "method." msgstr "" -#: ../../reference/datamodel.rst:3803 +#: ../../reference/datamodel.rst:3817 msgid "" "Asynchronous iterators can be used in an :keyword:`async for` statement." msgstr "" -#: ../../reference/datamodel.rst:3805 ../../reference/datamodel.rst:3854 +#: ../../reference/datamodel.rst:3819 ../../reference/datamodel.rst:3868 msgid "The :class:`object` class itself does not provide these methods." msgstr "" -#: ../../reference/datamodel.rst:3810 +#: ../../reference/datamodel.rst:3824 msgid "Must return an *asynchronous iterator* object." msgstr "" -#: ../../reference/datamodel.rst:3814 +#: ../../reference/datamodel.rst:3828 msgid "" "Must return an *awaitable* resulting in a next value of the iterator. " "Should raise a :exc:`StopAsyncIteration` error when the iteration is over." msgstr "" -#: ../../reference/datamodel.rst:3817 +#: ../../reference/datamodel.rst:3831 msgid "An example of an asynchronous iterable object::" msgstr "" -#: ../../reference/datamodel.rst:3819 +#: ../../reference/datamodel.rst:3833 msgid "" "class Reader:\n" " async def readline(self):\n" @@ -4415,53 +4431,53 @@ msgid "" " return val" msgstr "" -#: ../../reference/datamodel.rst:3834 +#: ../../reference/datamodel.rst:3848 msgid "" "Prior to Python 3.7, :meth:`~object.__aiter__` could return an *awaitable* " "that would resolve to an :term:`asynchronous iterator `." msgstr "" -#: ../../reference/datamodel.rst:3839 +#: ../../reference/datamodel.rst:3853 msgid "" "Starting with Python 3.7, :meth:`~object.__aiter__` must return an " "asynchronous iterator object. Returning anything else will result in a :exc:" "`TypeError` error." msgstr "" -#: ../../reference/datamodel.rst:3847 +#: ../../reference/datamodel.rst:3861 msgid "Asynchronous Context Managers" msgstr "" -#: ../../reference/datamodel.rst:3849 +#: ../../reference/datamodel.rst:3863 msgid "" "An *asynchronous context manager* is a *context manager* that is able to " "suspend execution in its ``__aenter__`` and ``__aexit__`` methods." msgstr "" -#: ../../reference/datamodel.rst:3852 +#: ../../reference/datamodel.rst:3866 msgid "" "Asynchronous context managers can be used in an :keyword:`async with` " "statement." msgstr "" -#: ../../reference/datamodel.rst:3858 +#: ../../reference/datamodel.rst:3872 msgid "" "Semantically similar to :meth:`~object.__enter__`, the only difference being " "that it must return an *awaitable*." msgstr "" -#: ../../reference/datamodel.rst:3863 +#: ../../reference/datamodel.rst:3877 msgid "" "Semantically similar to :meth:`~object.__exit__`, the only difference being " "that it must return an *awaitable*." msgstr "" -#: ../../reference/datamodel.rst:3866 +#: ../../reference/datamodel.rst:3880 msgid "An example of an asynchronous context manager class::" msgstr "" -#: ../../reference/datamodel.rst:3868 +#: ../../reference/datamodel.rst:3882 msgid "" "class AsyncContextManager:\n" " async def __aenter__(self):\n" @@ -4471,18 +4487,18 @@ msgid "" " await log('exiting context')" msgstr "" -#: ../../reference/datamodel.rst:3879 +#: ../../reference/datamodel.rst:3893 msgid "Footnotes" msgstr "" -#: ../../reference/datamodel.rst:3880 +#: ../../reference/datamodel.rst:3894 msgid "" "It *is* possible in some cases to change an object's type, under certain " "controlled conditions. It generally isn't a good idea though, since it can " "lead to some very strange behaviour if it is handled incorrectly." msgstr "" -#: ../../reference/datamodel.rst:3884 +#: ../../reference/datamodel.rst:3898 msgid "" "The :meth:`~object.__hash__`, :meth:`~object.__iter__`, :meth:`~object." "__reversed__`, :meth:`~object.__contains__`, :meth:`~object." @@ -4491,7 +4507,7 @@ msgid "" "by relying on the behavior that ``None`` is not callable." msgstr "" -#: ../../reference/datamodel.rst:3891 +#: ../../reference/datamodel.rst:3905 msgid "" "\"Does not support\" here means that the class has no such method, or the " "method returns :data:`NotImplemented`. Do not set the method to ``None`` if " @@ -4499,14 +4515,14 @@ msgid "" "instead have the opposite effect of explicitly *blocking* such fallback." msgstr "" -#: ../../reference/datamodel.rst:3897 +#: ../../reference/datamodel.rst:3911 msgid "" "For operands of the same type, it is assumed that if the non-reflected " "method (such as :meth:`~object.__add__`) fails then the operation is not " "supported, which is why the reflected method is not called." msgstr "" -#: ../../reference/datamodel.rst:3901 +#: ../../reference/datamodel.rst:3915 msgid "" "If the right operand's type is a subclass of the left operand's type, the " "reflected method having precedence allows subclasses to override their " @@ -4516,20 +4532,20 @@ msgstr "" #: ../../reference/datamodel.rst:14 ../../reference/datamodel.rst:152 #: ../../reference/datamodel.rst:163 ../../reference/datamodel.rst:187 #: ../../reference/datamodel.rst:199 ../../reference/datamodel.rst:232 -#: ../../reference/datamodel.rst:253 ../../reference/datamodel.rst:268 -#: ../../reference/datamodel.rst:286 ../../reference/datamodel.rst:299 -#: ../../reference/datamodel.rst:331 ../../reference/datamodel.rst:366 -#: ../../reference/datamodel.rst:391 ../../reference/datamodel.rst:412 -#: ../../reference/datamodel.rst:430 ../../reference/datamodel.rst:450 -#: ../../reference/datamodel.rst:458 ../../reference/datamodel.rst:469 -#: ../../reference/datamodel.rst:486 ../../reference/datamodel.rst:522 -#: ../../reference/datamodel.rst:537 ../../reference/datamodel.rst:675 -#: ../../reference/datamodel.rst:813 ../../reference/datamodel.rst:837 -#: ../../reference/datamodel.rst:873 ../../reference/datamodel.rst:1151 -#: ../../reference/datamodel.rst:1299 ../../reference/datamodel.rst:1326 -#: ../../reference/datamodel.rst:1398 ../../reference/datamodel.rst:1506 -#: ../../reference/datamodel.rst:1614 ../../reference/datamodel.rst:1724 -#: ../../reference/datamodel.rst:2149 ../../reference/datamodel.rst:3167 +#: ../../reference/datamodel.rst:253 ../../reference/datamodel.rst:270 +#: ../../reference/datamodel.rst:288 ../../reference/datamodel.rst:301 +#: ../../reference/datamodel.rst:333 ../../reference/datamodel.rst:368 +#: ../../reference/datamodel.rst:393 ../../reference/datamodel.rst:414 +#: ../../reference/datamodel.rst:432 ../../reference/datamodel.rst:452 +#: ../../reference/datamodel.rst:460 ../../reference/datamodel.rst:471 +#: ../../reference/datamodel.rst:488 ../../reference/datamodel.rst:524 +#: ../../reference/datamodel.rst:539 ../../reference/datamodel.rst:677 +#: ../../reference/datamodel.rst:815 ../../reference/datamodel.rst:839 +#: ../../reference/datamodel.rst:875 ../../reference/datamodel.rst:1153 +#: ../../reference/datamodel.rst:1313 ../../reference/datamodel.rst:1340 +#: ../../reference/datamodel.rst:1412 ../../reference/datamodel.rst:1520 +#: ../../reference/datamodel.rst:1628 ../../reference/datamodel.rst:1738 +#: ../../reference/datamodel.rst:2163 ../../reference/datamodel.rst:3181 msgid "object" msgstr "" @@ -4537,15 +4553,15 @@ msgstr "" msgid "data" msgstr "" -#: ../../reference/datamodel.rst:23 ../../reference/datamodel.rst:299 -#: ../../reference/datamodel.rst:346 ../../reference/datamodel.rst:430 -#: ../../reference/datamodel.rst:469 ../../reference/datamodel.rst:813 -#: ../../reference/datamodel.rst:1355 ../../reference/datamodel.rst:1807 -#: ../../reference/datamodel.rst:2050 ../../reference/datamodel.rst:2056 -#: ../../reference/datamodel.rst:2149 ../../reference/datamodel.rst:2706 -#: ../../reference/datamodel.rst:3137 ../../reference/datamodel.rst:3295 -#: ../../reference/datamodel.rst:3330 ../../reference/datamodel.rst:3398 -#: ../../reference/datamodel.rst:3408 ../../reference/datamodel.rst:3436 +#: ../../reference/datamodel.rst:23 ../../reference/datamodel.rst:301 +#: ../../reference/datamodel.rst:348 ../../reference/datamodel.rst:432 +#: ../../reference/datamodel.rst:471 ../../reference/datamodel.rst:815 +#: ../../reference/datamodel.rst:1369 ../../reference/datamodel.rst:1821 +#: ../../reference/datamodel.rst:2064 ../../reference/datamodel.rst:2070 +#: ../../reference/datamodel.rst:2163 ../../reference/datamodel.rst:2720 +#: ../../reference/datamodel.rst:3151 ../../reference/datamodel.rst:3309 +#: ../../reference/datamodel.rst:3344 ../../reference/datamodel.rst:3412 +#: ../../reference/datamodel.rst:3422 ../../reference/datamodel.rst:3450 msgid "built-in function" msgstr "" @@ -4554,7 +4570,7 @@ msgid "id" msgstr "" #: ../../reference/datamodel.rst:23 ../../reference/datamodel.rst:126 -#: ../../reference/datamodel.rst:2706 +#: ../../reference/datamodel.rst:2720 msgid "type" msgstr "" @@ -4590,7 +4606,7 @@ msgstr "" msgid "unreachable object" msgstr "" -#: ../../reference/datamodel.rst:95 ../../reference/datamodel.rst:1151 +#: ../../reference/datamodel.rst:95 ../../reference/datamodel.rst:1153 msgid "container" msgstr "" @@ -4602,26 +4618,26 @@ msgstr "" msgid "extension" msgstr "" -#: ../../reference/datamodel.rst:126 ../../reference/datamodel.rst:403 -#: ../../reference/datamodel.rst:404 ../../reference/datamodel.rst:505 -#: ../../reference/datamodel.rst:873 ../../reference/datamodel.rst:893 -#: ../../reference/datamodel.rst:1355 +#: ../../reference/datamodel.rst:126 ../../reference/datamodel.rst:405 +#: ../../reference/datamodel.rst:406 ../../reference/datamodel.rst:507 +#: ../../reference/datamodel.rst:875 ../../reference/datamodel.rst:895 +#: ../../reference/datamodel.rst:1369 msgid "module" msgstr "" -#: ../../reference/datamodel.rst:126 ../../reference/datamodel.rst:268 -#: ../../reference/datamodel.rst:813 +#: ../../reference/datamodel.rst:126 ../../reference/datamodel.rst:270 +#: ../../reference/datamodel.rst:815 msgid "C" msgstr "" -#: ../../reference/datamodel.rst:126 ../../reference/datamodel.rst:268 -#: ../../reference/datamodel.rst:813 +#: ../../reference/datamodel.rst:126 ../../reference/datamodel.rst:270 +#: ../../reference/datamodel.rst:815 msgid "language" msgstr "" -#: ../../reference/datamodel.rst:139 ../../reference/datamodel.rst:1151 -#: ../../reference/datamodel.rst:1169 ../../reference/datamodel.rst:1299 -#: ../../reference/datamodel.rst:1319 +#: ../../reference/datamodel.rst:139 ../../reference/datamodel.rst:1153 +#: ../../reference/datamodel.rst:1171 ../../reference/datamodel.rst:1313 +#: ../../reference/datamodel.rst:1333 msgid "attribute" msgstr "" @@ -4641,12 +4657,12 @@ msgstr "" msgid "ellipsis literal" msgstr "" -#: ../../reference/datamodel.rst:199 ../../reference/datamodel.rst:1326 +#: ../../reference/datamodel.rst:199 ../../reference/datamodel.rst:1340 msgid "numeric" msgstr "" #: ../../reference/datamodel.rst:232 ../../reference/datamodel.rst:238 -#: ../../reference/datamodel.rst:346 +#: ../../reference/datamodel.rst:348 msgid "integer" msgstr "" @@ -4666,840 +4682,840 @@ msgstr "" msgid "True" msgstr "" -#: ../../reference/datamodel.rst:268 +#: ../../reference/datamodel.rst:270 msgid "floating-point" msgstr "" -#: ../../reference/datamodel.rst:268 ../../reference/datamodel.rst:286 +#: ../../reference/datamodel.rst:270 ../../reference/datamodel.rst:288 msgid "number" msgstr "" -#: ../../reference/datamodel.rst:268 +#: ../../reference/datamodel.rst:270 msgid "Java" msgstr "" -#: ../../reference/datamodel.rst:286 ../../reference/datamodel.rst:3408 +#: ../../reference/datamodel.rst:288 ../../reference/datamodel.rst:3422 msgid "complex" msgstr "" -#: ../../reference/datamodel.rst:299 ../../reference/datamodel.rst:430 -#: ../../reference/datamodel.rst:469 ../../reference/datamodel.rst:3137 +#: ../../reference/datamodel.rst:301 ../../reference/datamodel.rst:432 +#: ../../reference/datamodel.rst:471 ../../reference/datamodel.rst:3151 msgid "len" msgstr "" -#: ../../reference/datamodel.rst:299 ../../reference/datamodel.rst:1326 +#: ../../reference/datamodel.rst:301 ../../reference/datamodel.rst:1340 msgid "sequence" msgstr "" -#: ../../reference/datamodel.rst:299 +#: ../../reference/datamodel.rst:301 msgid "index operation" msgstr "" -#: ../../reference/datamodel.rst:299 +#: ../../reference/datamodel.rst:301 msgid "item selection" msgstr "" -#: ../../reference/datamodel.rst:299 ../../reference/datamodel.rst:391 -#: ../../reference/datamodel.rst:469 +#: ../../reference/datamodel.rst:301 ../../reference/datamodel.rst:393 +#: ../../reference/datamodel.rst:471 msgid "subscription" msgstr "" -#: ../../reference/datamodel.rst:314 ../../reference/datamodel.rst:391 +#: ../../reference/datamodel.rst:316 ../../reference/datamodel.rst:393 msgid "slicing" msgstr "" -#: ../../reference/datamodel.rst:331 +#: ../../reference/datamodel.rst:333 msgid "immutable sequence" msgstr "" -#: ../../reference/datamodel.rst:331 +#: ../../reference/datamodel.rst:333 msgid "immutable" msgstr "" -#: ../../reference/datamodel.rst:342 ../../reference/datamodel.rst:2025 -#: ../../reference/datamodel.rst:2056 +#: ../../reference/datamodel.rst:344 ../../reference/datamodel.rst:2039 +#: ../../reference/datamodel.rst:2070 msgid "string" msgstr "" -#: ../../reference/datamodel.rst:342 +#: ../../reference/datamodel.rst:344 msgid "immutable sequences" msgstr "" -#: ../../reference/datamodel.rst:346 +#: ../../reference/datamodel.rst:348 msgid "chr" msgstr "" -#: ../../reference/datamodel.rst:346 +#: ../../reference/datamodel.rst:348 msgid "ord" msgstr "" -#: ../../reference/datamodel.rst:346 +#: ../../reference/datamodel.rst:348 msgid "character" msgstr "" -#: ../../reference/datamodel.rst:346 +#: ../../reference/datamodel.rst:348 msgid "Unicode" msgstr "" -#: ../../reference/datamodel.rst:366 +#: ../../reference/datamodel.rst:368 msgid "tuple" msgstr "" -#: ../../reference/datamodel.rst:366 +#: ../../reference/datamodel.rst:368 msgid "singleton" msgstr "" -#: ../../reference/datamodel.rst:366 +#: ../../reference/datamodel.rst:368 msgid "empty" msgstr "" -#: ../../reference/datamodel.rst:379 ../../reference/datamodel.rst:2050 +#: ../../reference/datamodel.rst:381 ../../reference/datamodel.rst:2064 msgid "bytes" msgstr "" -#: ../../reference/datamodel.rst:379 +#: ../../reference/datamodel.rst:381 msgid "byte" msgstr "" -#: ../../reference/datamodel.rst:391 +#: ../../reference/datamodel.rst:393 msgid "mutable sequence" msgstr "" -#: ../../reference/datamodel.rst:391 +#: ../../reference/datamodel.rst:393 msgid "mutable" msgstr "" -#: ../../reference/datamodel.rst:391 ../../reference/datamodel.rst:1169 -#: ../../reference/datamodel.rst:1319 +#: ../../reference/datamodel.rst:393 ../../reference/datamodel.rst:1171 +#: ../../reference/datamodel.rst:1333 msgid "assignment" msgstr "" -#: ../../reference/datamodel.rst:391 ../../reference/datamodel.rst:873 -#: ../../reference/datamodel.rst:1761 ../../reference/datamodel.rst:1943 -#: ../../reference/datamodel.rst:3460 +#: ../../reference/datamodel.rst:393 ../../reference/datamodel.rst:875 +#: ../../reference/datamodel.rst:1775 ../../reference/datamodel.rst:1957 +#: ../../reference/datamodel.rst:3474 msgid "statement" msgstr "" -#: ../../reference/datamodel.rst:403 +#: ../../reference/datamodel.rst:405 msgid "array" msgstr "" -#: ../../reference/datamodel.rst:404 +#: ../../reference/datamodel.rst:406 msgid "collections" msgstr "" -#: ../../reference/datamodel.rst:412 +#: ../../reference/datamodel.rst:414 msgid "list" msgstr "" -#: ../../reference/datamodel.rst:419 +#: ../../reference/datamodel.rst:421 msgid "bytearray" msgstr "" -#: ../../reference/datamodel.rst:430 +#: ../../reference/datamodel.rst:432 msgid "set type" msgstr "" -#: ../../reference/datamodel.rst:450 +#: ../../reference/datamodel.rst:452 msgid "set" msgstr "" -#: ../../reference/datamodel.rst:458 +#: ../../reference/datamodel.rst:460 msgid "frozenset" msgstr "" -#: ../../reference/datamodel.rst:469 ../../reference/datamodel.rst:1326 +#: ../../reference/datamodel.rst:471 ../../reference/datamodel.rst:1340 msgid "mapping" msgstr "" -#: ../../reference/datamodel.rst:486 ../../reference/datamodel.rst:1151 -#: ../../reference/datamodel.rst:2149 +#: ../../reference/datamodel.rst:488 ../../reference/datamodel.rst:1153 +#: ../../reference/datamodel.rst:2163 msgid "dictionary" msgstr "" -#: ../../reference/datamodel.rst:505 +#: ../../reference/datamodel.rst:507 msgid "dbm.ndbm" msgstr "" -#: ../../reference/datamodel.rst:505 +#: ../../reference/datamodel.rst:507 msgid "dbm.gnu" msgstr "" -#: ../../reference/datamodel.rst:522 +#: ../../reference/datamodel.rst:524 msgid "callable" msgstr "" -#: ../../reference/datamodel.rst:522 ../../reference/datamodel.rst:537 -#: ../../reference/datamodel.rst:757 ../../reference/datamodel.rst:775 -#: ../../reference/datamodel.rst:788 ../../reference/datamodel.rst:813 +#: ../../reference/datamodel.rst:524 ../../reference/datamodel.rst:539 +#: ../../reference/datamodel.rst:759 ../../reference/datamodel.rst:777 +#: ../../reference/datamodel.rst:790 ../../reference/datamodel.rst:815 msgid "function" msgstr "" -#: ../../reference/datamodel.rst:522 ../../reference/datamodel.rst:1151 -#: ../../reference/datamodel.rst:1174 ../../reference/datamodel.rst:3087 +#: ../../reference/datamodel.rst:524 ../../reference/datamodel.rst:1153 +#: ../../reference/datamodel.rst:1176 ../../reference/datamodel.rst:3101 msgid "call" msgstr "" -#: ../../reference/datamodel.rst:522 +#: ../../reference/datamodel.rst:524 msgid "invocation" msgstr "" -#: ../../reference/datamodel.rst:522 +#: ../../reference/datamodel.rst:524 msgid "argument" msgstr "" -#: ../../reference/datamodel.rst:537 ../../reference/datamodel.rst:675 +#: ../../reference/datamodel.rst:539 ../../reference/datamodel.rst:677 msgid "user-defined" msgstr "" -#: ../../reference/datamodel.rst:537 +#: ../../reference/datamodel.rst:539 msgid "user-defined function" msgstr "" -#: ../../reference/datamodel.rst:550 +#: ../../reference/datamodel.rst:552 msgid "__closure__ (function attribute)" msgstr "" -#: ../../reference/datamodel.rst:550 +#: ../../reference/datamodel.rst:552 msgid "__globals__ (function attribute)" msgstr "" -#: ../../reference/datamodel.rst:550 +#: ../../reference/datamodel.rst:552 msgid "global" msgstr "" -#: ../../reference/datamodel.rst:550 ../../reference/datamodel.rst:893 +#: ../../reference/datamodel.rst:552 ../../reference/datamodel.rst:895 msgid "namespace" msgstr "" -#: ../../reference/datamodel.rst:577 +#: ../../reference/datamodel.rst:579 msgid "__doc__ (function attribute)" msgstr "" -#: ../../reference/datamodel.rst:577 +#: ../../reference/datamodel.rst:579 msgid "__name__ (function attribute)" msgstr "" -#: ../../reference/datamodel.rst:577 +#: ../../reference/datamodel.rst:579 msgid "__module__ (function attribute)" msgstr "" -#: ../../reference/datamodel.rst:577 +#: ../../reference/datamodel.rst:579 msgid "__dict__ (function attribute)" msgstr "" -#: ../../reference/datamodel.rst:577 +#: ../../reference/datamodel.rst:579 msgid "__defaults__ (function attribute)" msgstr "" -#: ../../reference/datamodel.rst:577 +#: ../../reference/datamodel.rst:579 msgid "__code__ (function attribute)" msgstr "" -#: ../../reference/datamodel.rst:577 +#: ../../reference/datamodel.rst:579 msgid "__annotations__ (function attribute)" msgstr "" -#: ../../reference/datamodel.rst:577 +#: ../../reference/datamodel.rst:579 msgid "__annotate__ (function attribute)" msgstr "" -#: ../../reference/datamodel.rst:577 +#: ../../reference/datamodel.rst:579 msgid "__kwdefaults__ (function attribute)" msgstr "" -#: ../../reference/datamodel.rst:577 +#: ../../reference/datamodel.rst:579 msgid "__type_params__ (function attribute)" msgstr "" -#: ../../reference/datamodel.rst:675 ../../reference/datamodel.rst:837 +#: ../../reference/datamodel.rst:677 ../../reference/datamodel.rst:839 msgid "method" msgstr "" -#: ../../reference/datamodel.rst:675 +#: ../../reference/datamodel.rst:677 msgid "user-defined method" msgstr "" -#: ../../reference/datamodel.rst:683 +#: ../../reference/datamodel.rst:685 msgid "__func__ (method attribute)" msgstr "" -#: ../../reference/datamodel.rst:683 +#: ../../reference/datamodel.rst:685 msgid "__self__ (method attribute)" msgstr "" -#: ../../reference/datamodel.rst:683 +#: ../../reference/datamodel.rst:685 msgid "__doc__ (method attribute)" msgstr "" -#: ../../reference/datamodel.rst:683 +#: ../../reference/datamodel.rst:685 msgid "__name__ (method attribute)" msgstr "" -#: ../../reference/datamodel.rst:683 +#: ../../reference/datamodel.rst:685 msgid "__module__ (method attribute)" msgstr "" -#: ../../reference/datamodel.rst:757 ../../reference/datamodel.rst:1506 +#: ../../reference/datamodel.rst:759 ../../reference/datamodel.rst:1520 msgid "generator" msgstr "" -#: ../../reference/datamodel.rst:757 +#: ../../reference/datamodel.rst:759 msgid "iterator" msgstr "" -#: ../../reference/datamodel.rst:775 ../../reference/datamodel.rst:3693 +#: ../../reference/datamodel.rst:777 ../../reference/datamodel.rst:3707 msgid "coroutine" msgstr "" -#: ../../reference/datamodel.rst:788 +#: ../../reference/datamodel.rst:790 msgid "asynchronous generator" msgstr "" -#: ../../reference/datamodel.rst:788 +#: ../../reference/datamodel.rst:790 msgid "asynchronous iterator" msgstr "" -#: ../../reference/datamodel.rst:837 +#: ../../reference/datamodel.rst:839 msgid "built-in method" msgstr "" -#: ../../reference/datamodel.rst:837 +#: ../../reference/datamodel.rst:839 msgid "built-in" msgstr "" -#: ../../reference/datamodel.rst:873 +#: ../../reference/datamodel.rst:875 msgid "import" msgstr "" -#: ../../reference/datamodel.rst:893 +#: ../../reference/datamodel.rst:895 msgid "__name__ (module attribute)" msgstr "" -#: ../../reference/datamodel.rst:893 +#: ../../reference/datamodel.rst:895 msgid "__spec__ (module attribute)" msgstr "" -#: ../../reference/datamodel.rst:893 +#: ../../reference/datamodel.rst:895 msgid "__package__ (module attribute)" msgstr "" -#: ../../reference/datamodel.rst:893 +#: ../../reference/datamodel.rst:895 msgid "__loader__ (module attribute)" msgstr "" -#: ../../reference/datamodel.rst:893 +#: ../../reference/datamodel.rst:895 msgid "__path__ (module attribute)" msgstr "" -#: ../../reference/datamodel.rst:893 +#: ../../reference/datamodel.rst:895 msgid "__file__ (module attribute)" msgstr "" -#: ../../reference/datamodel.rst:893 +#: ../../reference/datamodel.rst:895 msgid "__cached__ (module attribute)" msgstr "" -#: ../../reference/datamodel.rst:893 +#: ../../reference/datamodel.rst:895 msgid "__doc__ (module attribute)" msgstr "" -#: ../../reference/datamodel.rst:893 +#: ../../reference/datamodel.rst:895 msgid "__annotations__ (module attribute)" msgstr "" -#: ../../reference/datamodel.rst:893 +#: ../../reference/datamodel.rst:895 msgid "__annotate__ (module attribute)" msgstr "" -#: ../../reference/datamodel.rst:1119 +#: ../../reference/datamodel.rst:1121 msgid "__dict__ (module attribute)" msgstr "" -#: ../../reference/datamodel.rst:1151 ../../reference/datamodel.rst:1169 -#: ../../reference/datamodel.rst:1299 ../../reference/datamodel.rst:1926 -#: ../../reference/datamodel.rst:2817 +#: ../../reference/datamodel.rst:1153 ../../reference/datamodel.rst:1171 +#: ../../reference/datamodel.rst:1313 ../../reference/datamodel.rst:1940 +#: ../../reference/datamodel.rst:2831 msgid "class" msgstr "" -#: ../../reference/datamodel.rst:1151 ../../reference/datamodel.rst:1299 -#: ../../reference/datamodel.rst:1319 +#: ../../reference/datamodel.rst:1153 ../../reference/datamodel.rst:1313 +#: ../../reference/datamodel.rst:1333 msgid "class instance" msgstr "" -#: ../../reference/datamodel.rst:1151 ../../reference/datamodel.rst:1299 -#: ../../reference/datamodel.rst:3087 +#: ../../reference/datamodel.rst:1153 ../../reference/datamodel.rst:1313 +#: ../../reference/datamodel.rst:3101 msgid "instance" msgstr "" -#: ../../reference/datamodel.rst:1151 ../../reference/datamodel.rst:1174 +#: ../../reference/datamodel.rst:1153 ../../reference/datamodel.rst:1176 msgid "class object" msgstr "" -#: ../../reference/datamodel.rst:1181 +#: ../../reference/datamodel.rst:1183 msgid "__name__ (class attribute)" msgstr "" -#: ../../reference/datamodel.rst:1181 +#: ../../reference/datamodel.rst:1183 msgid "__module__ (class attribute)" msgstr "" -#: ../../reference/datamodel.rst:1181 +#: ../../reference/datamodel.rst:1183 msgid "__dict__ (class attribute)" msgstr "" -#: ../../reference/datamodel.rst:1181 +#: ../../reference/datamodel.rst:1183 msgid "__bases__ (class attribute)" msgstr "" -#: ../../reference/datamodel.rst:1181 +#: ../../reference/datamodel.rst:1183 msgid "__doc__ (class attribute)" msgstr "" -#: ../../reference/datamodel.rst:1181 +#: ../../reference/datamodel.rst:1183 msgid "__annotations__ (class attribute)" msgstr "" -#: ../../reference/datamodel.rst:1181 +#: ../../reference/datamodel.rst:1183 msgid "__annotate__ (class attribute)" msgstr "" -#: ../../reference/datamodel.rst:1181 +#: ../../reference/datamodel.rst:1183 msgid "__type_params__ (class attribute)" msgstr "" -#: ../../reference/datamodel.rst:1181 +#: ../../reference/datamodel.rst:1183 msgid "__static_attributes__ (class attribute)" msgstr "" -#: ../../reference/datamodel.rst:1181 +#: ../../reference/datamodel.rst:1183 msgid "__firstlineno__ (class attribute)" msgstr "" -#: ../../reference/datamodel.rst:1337 +#: ../../reference/datamodel.rst:1351 msgid "__dict__ (instance attribute)" msgstr "" -#: ../../reference/datamodel.rst:1337 +#: ../../reference/datamodel.rst:1351 msgid "__class__ (instance attribute)" msgstr "" -#: ../../reference/datamodel.rst:1355 +#: ../../reference/datamodel.rst:1369 msgid "open" msgstr "" -#: ../../reference/datamodel.rst:1355 +#: ../../reference/datamodel.rst:1369 msgid "io" msgstr "" -#: ../../reference/datamodel.rst:1355 +#: ../../reference/datamodel.rst:1369 msgid "popen() (in module os)" msgstr "" -#: ../../reference/datamodel.rst:1355 +#: ../../reference/datamodel.rst:1369 msgid "makefile() (socket method)" msgstr "" -#: ../../reference/datamodel.rst:1355 +#: ../../reference/datamodel.rst:1369 msgid "sys.stdin" msgstr "" -#: ../../reference/datamodel.rst:1355 +#: ../../reference/datamodel.rst:1369 msgid "sys.stdout" msgstr "" -#: ../../reference/datamodel.rst:1355 +#: ../../reference/datamodel.rst:1369 msgid "sys.stderr" msgstr "" -#: ../../reference/datamodel.rst:1355 +#: ../../reference/datamodel.rst:1369 msgid "stdio" msgstr "" -#: ../../reference/datamodel.rst:1355 +#: ../../reference/datamodel.rst:1369 msgid "stdin (in module sys)" msgstr "" -#: ../../reference/datamodel.rst:1355 +#: ../../reference/datamodel.rst:1369 msgid "stdout (in module sys)" msgstr "" -#: ../../reference/datamodel.rst:1355 +#: ../../reference/datamodel.rst:1369 msgid "stderr (in module sys)" msgstr "" -#: ../../reference/datamodel.rst:1384 +#: ../../reference/datamodel.rst:1398 msgid "internal type" msgstr "" -#: ../../reference/datamodel.rst:1384 +#: ../../reference/datamodel.rst:1398 msgid "types, internal" msgstr "" -#: ../../reference/datamodel.rst:1398 +#: ../../reference/datamodel.rst:1412 msgid "bytecode" msgstr "" -#: ../../reference/datamodel.rst:1398 +#: ../../reference/datamodel.rst:1412 msgid "code" msgstr "" -#: ../../reference/datamodel.rst:1398 +#: ../../reference/datamodel.rst:1412 msgid "code object" msgstr "" -#: ../../reference/datamodel.rst:1409 +#: ../../reference/datamodel.rst:1423 msgid "co_argcount (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1409 +#: ../../reference/datamodel.rst:1423 msgid "co_posonlyargcount (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1409 +#: ../../reference/datamodel.rst:1423 msgid "co_kwonlyargcount (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1409 +#: ../../reference/datamodel.rst:1423 msgid "co_code (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1409 +#: ../../reference/datamodel.rst:1423 msgid "co_consts (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1409 +#: ../../reference/datamodel.rst:1423 msgid "co_filename (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1409 +#: ../../reference/datamodel.rst:1423 msgid "co_firstlineno (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1409 +#: ../../reference/datamodel.rst:1423 msgid "co_flags (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1409 +#: ../../reference/datamodel.rst:1423 msgid "co_lnotab (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1409 +#: ../../reference/datamodel.rst:1423 msgid "co_name (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1409 +#: ../../reference/datamodel.rst:1423 msgid "co_names (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1409 +#: ../../reference/datamodel.rst:1423 msgid "co_nlocals (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1409 +#: ../../reference/datamodel.rst:1423 msgid "co_stacksize (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1409 +#: ../../reference/datamodel.rst:1423 msgid "co_varnames (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1409 +#: ../../reference/datamodel.rst:1423 msgid "co_cellvars (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1409 +#: ../../reference/datamodel.rst:1423 msgid "co_freevars (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1409 +#: ../../reference/datamodel.rst:1423 msgid "co_qualname (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1522 +#: ../../reference/datamodel.rst:1536 msgid "documentation string" msgstr "" -#: ../../reference/datamodel.rst:1614 +#: ../../reference/datamodel.rst:1628 msgid "frame" msgstr "" -#: ../../reference/datamodel.rst:1620 +#: ../../reference/datamodel.rst:1634 msgid "f_back (frame attribute)" msgstr "" -#: ../../reference/datamodel.rst:1620 +#: ../../reference/datamodel.rst:1634 msgid "f_code (frame attribute)" msgstr "" -#: ../../reference/datamodel.rst:1620 +#: ../../reference/datamodel.rst:1634 msgid "f_globals (frame attribute)" msgstr "" -#: ../../reference/datamodel.rst:1620 +#: ../../reference/datamodel.rst:1634 msgid "f_locals (frame attribute)" msgstr "" -#: ../../reference/datamodel.rst:1620 +#: ../../reference/datamodel.rst:1634 msgid "f_lasti (frame attribute)" msgstr "" -#: ../../reference/datamodel.rst:1620 +#: ../../reference/datamodel.rst:1634 msgid "f_builtins (frame attribute)" msgstr "" -#: ../../reference/datamodel.rst:1664 +#: ../../reference/datamodel.rst:1678 msgid "f_trace (frame attribute)" msgstr "" -#: ../../reference/datamodel.rst:1664 +#: ../../reference/datamodel.rst:1678 msgid "f_trace_lines (frame attribute)" msgstr "" -#: ../../reference/datamodel.rst:1664 +#: ../../reference/datamodel.rst:1678 msgid "f_trace_opcodes (frame attribute)" msgstr "" -#: ../../reference/datamodel.rst:1664 +#: ../../reference/datamodel.rst:1678 msgid "f_lineno (frame attribute)" msgstr "" -#: ../../reference/datamodel.rst:1724 +#: ../../reference/datamodel.rst:1738 msgid "traceback" msgstr "" -#: ../../reference/datamodel.rst:1724 +#: ../../reference/datamodel.rst:1738 msgid "stack" msgstr "" -#: ../../reference/datamodel.rst:1724 +#: ../../reference/datamodel.rst:1738 msgid "trace" msgstr "" -#: ../../reference/datamodel.rst:1724 +#: ../../reference/datamodel.rst:1738 msgid "exception" msgstr "" -#: ../../reference/datamodel.rst:1724 +#: ../../reference/datamodel.rst:1738 msgid "handler" msgstr "" -#: ../../reference/datamodel.rst:1724 +#: ../../reference/datamodel.rst:1738 msgid "execution" msgstr "" -#: ../../reference/datamodel.rst:1724 +#: ../../reference/datamodel.rst:1738 msgid "exc_info (in module sys)" msgstr "" -#: ../../reference/datamodel.rst:1724 +#: ../../reference/datamodel.rst:1738 msgid "last_traceback (in module sys)" msgstr "" -#: ../../reference/datamodel.rst:1724 +#: ../../reference/datamodel.rst:1738 msgid "sys.exc_info" msgstr "" -#: ../../reference/datamodel.rst:1724 +#: ../../reference/datamodel.rst:1738 msgid "sys.exception" msgstr "" -#: ../../reference/datamodel.rst:1724 +#: ../../reference/datamodel.rst:1738 msgid "sys.last_traceback" msgstr "" -#: ../../reference/datamodel.rst:1761 +#: ../../reference/datamodel.rst:1775 msgid "tb_frame (traceback attribute)" msgstr "" -#: ../../reference/datamodel.rst:1761 +#: ../../reference/datamodel.rst:1775 msgid "tb_lineno (traceback attribute)" msgstr "" -#: ../../reference/datamodel.rst:1761 +#: ../../reference/datamodel.rst:1775 msgid "tb_lasti (traceback attribute)" msgstr "" -#: ../../reference/datamodel.rst:1761 +#: ../../reference/datamodel.rst:1775 msgid "try" msgstr "" -#: ../../reference/datamodel.rst:1791 +#: ../../reference/datamodel.rst:1805 msgid "tb_next (traceback attribute)" msgstr "" -#: ../../reference/datamodel.rst:1807 ../../reference/datamodel.rst:3167 +#: ../../reference/datamodel.rst:1821 ../../reference/datamodel.rst:3181 msgid "slice" msgstr "" -#: ../../reference/datamodel.rst:1813 +#: ../../reference/datamodel.rst:1827 msgid "start (slice object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1813 +#: ../../reference/datamodel.rst:1827 msgid "stop (slice object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1813 +#: ../../reference/datamodel.rst:1827 msgid "step (slice object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1861 +#: ../../reference/datamodel.rst:1875 msgid "operator" msgstr "" -#: ../../reference/datamodel.rst:1861 +#: ../../reference/datamodel.rst:1875 msgid "overloading" msgstr "" -#: ../../reference/datamodel.rst:1861 +#: ../../reference/datamodel.rst:1875 msgid "__getitem__() (mapping object method)" msgstr "" -#: ../../reference/datamodel.rst:1897 +#: ../../reference/datamodel.rst:1911 msgid "subclassing" msgstr "" -#: ../../reference/datamodel.rst:1897 +#: ../../reference/datamodel.rst:1911 msgid "immutable types" msgstr "" -#: ../../reference/datamodel.rst:1926 +#: ../../reference/datamodel.rst:1940 msgid "constructor" msgstr "" -#: ../../reference/datamodel.rst:1943 +#: ../../reference/datamodel.rst:1957 msgid "destructor" msgstr "" -#: ../../reference/datamodel.rst:1943 +#: ../../reference/datamodel.rst:1957 msgid "finalizer" msgstr "" -#: ../../reference/datamodel.rst:1943 +#: ../../reference/datamodel.rst:1957 msgid "del" msgstr "" -#: ../../reference/datamodel.rst:2007 +#: ../../reference/datamodel.rst:2021 msgid "repr() (built-in function)" msgstr "" -#: ../../reference/datamodel.rst:2007 +#: ../../reference/datamodel.rst:2021 msgid "__repr__() (object method)" msgstr "" -#: ../../reference/datamodel.rst:2025 +#: ../../reference/datamodel.rst:2039 msgid "__str__() (object method)" msgstr "" -#: ../../reference/datamodel.rst:2025 +#: ../../reference/datamodel.rst:2039 msgid "format() (built-in function)" msgstr "" -#: ../../reference/datamodel.rst:2025 +#: ../../reference/datamodel.rst:2039 msgid "print() (built-in function)" msgstr "" -#: ../../reference/datamodel.rst:2056 +#: ../../reference/datamodel.rst:2070 msgid "__format__() (object method)" msgstr "" -#: ../../reference/datamodel.rst:2056 +#: ../../reference/datamodel.rst:2070 msgid "conversion" msgstr "" -#: ../../reference/datamodel.rst:2056 +#: ../../reference/datamodel.rst:2070 msgid "print" msgstr "" -#: ../../reference/datamodel.rst:2098 +#: ../../reference/datamodel.rst:2112 msgid "comparisons" msgstr "" -#: ../../reference/datamodel.rst:2149 +#: ../../reference/datamodel.rst:2163 msgid "hash" msgstr "" -#: ../../reference/datamodel.rst:2230 +#: ../../reference/datamodel.rst:2244 msgid "__len__() (mapping object method)" msgstr "" -#: ../../reference/datamodel.rst:2335 +#: ../../reference/datamodel.rst:2349 msgid "__getattr__ (module attribute)" msgstr "" -#: ../../reference/datamodel.rst:2335 +#: ../../reference/datamodel.rst:2349 msgid "__dir__ (module attribute)" msgstr "" -#: ../../reference/datamodel.rst:2335 +#: ../../reference/datamodel.rst:2349 msgid "__class__ (module attribute)" msgstr "" -#: ../../reference/datamodel.rst:2706 +#: ../../reference/datamodel.rst:2720 msgid "metaclass" msgstr "" -#: ../../reference/datamodel.rst:2706 +#: ../../reference/datamodel.rst:2720 msgid "= (equals)" msgstr "" -#: ../../reference/datamodel.rst:2706 +#: ../../reference/datamodel.rst:2720 msgid "class definition" msgstr "" -#: ../../reference/datamodel.rst:2770 +#: ../../reference/datamodel.rst:2784 msgid "metaclass hint" msgstr "" -#: ../../reference/datamodel.rst:2793 +#: ../../reference/datamodel.rst:2807 msgid "__prepare__ (metaclass method)" msgstr "" -#: ../../reference/datamodel.rst:2817 +#: ../../reference/datamodel.rst:2831 msgid "body" msgstr "" -#: ../../reference/datamodel.rst:2837 +#: ../../reference/datamodel.rst:2851 msgid "__class__ (method cell)" msgstr "" -#: ../../reference/datamodel.rst:2837 +#: ../../reference/datamodel.rst:2851 msgid "__classcell__ (class namespace entry)" msgstr "" -#: ../../reference/datamodel.rst:3137 +#: ../../reference/datamodel.rst:3151 msgid "__bool__() (object method)" msgstr "" -#: ../../reference/datamodel.rst:3295 ../../reference/datamodel.rst:3330 +#: ../../reference/datamodel.rst:3309 ../../reference/datamodel.rst:3344 msgid "divmod" msgstr "" -#: ../../reference/datamodel.rst:3295 ../../reference/datamodel.rst:3330 +#: ../../reference/datamodel.rst:3309 ../../reference/datamodel.rst:3344 msgid "pow" msgstr "" -#: ../../reference/datamodel.rst:3398 +#: ../../reference/datamodel.rst:3412 msgid "abs" msgstr "" -#: ../../reference/datamodel.rst:3408 +#: ../../reference/datamodel.rst:3422 msgid "int" msgstr "" -#: ../../reference/datamodel.rst:3408 +#: ../../reference/datamodel.rst:3422 msgid "float" msgstr "" -#: ../../reference/datamodel.rst:3436 +#: ../../reference/datamodel.rst:3450 msgid "round" msgstr "" -#: ../../reference/datamodel.rst:3460 +#: ../../reference/datamodel.rst:3474 msgid "with" msgstr "" -#: ../../reference/datamodel.rst:3460 +#: ../../reference/datamodel.rst:3474 msgid "context manager" msgstr "" diff --git a/reference/executionmodel.po b/reference/executionmodel.po index e7fe10092..98f05d033 100644 --- a/reference/executionmodel.po +++ b/reference/executionmodel.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:19+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/reference/expressions.po b/reference/expressions.po index fb486c6c9..d6dbf8ae5 100644 --- a/reference/expressions.po +++ b/reference/expressions.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:49+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -185,7 +186,7 @@ msgstr "" msgid "Python supports string and bytes literals and various numeric literals:" msgstr "" -#: ../../reference/expressions.rst:140 +#: ../../reference/expressions.rst:139 msgid "" "Evaluation of a literal yields an object of the given type (string, bytes, " "integer, floating-point number, complex number) with the given value. The " @@ -193,7 +194,7 @@ msgid "" "(complex) literals. See section :ref:`literals` for details." msgstr "" -#: ../../reference/expressions.rst:149 +#: ../../reference/expressions.rst:148 msgid "" "All literals correspond to immutable data types, and hence the object's " "identity is less important than its value. Multiple evaluations of literals " @@ -202,30 +203,30 @@ msgid "" "the same value." msgstr "" -#: ../../reference/expressions.rst:159 +#: ../../reference/expressions.rst:158 msgid "Parenthesized forms" msgstr "" -#: ../../reference/expressions.rst:165 +#: ../../reference/expressions.rst:164 msgid "" "A parenthesized form is an optional expression list enclosed in parentheses:" msgstr "" -#: ../../reference/expressions.rst:170 +#: ../../reference/expressions.rst:169 msgid "" "A parenthesized expression list yields whatever that expression list yields: " "if the list contains at least one comma, it yields a tuple; otherwise, it " "yields the single expression that makes up the expression list." msgstr "" -#: ../../reference/expressions.rst:176 +#: ../../reference/expressions.rst:175 msgid "" "An empty pair of parentheses yields an empty tuple object. Since tuples are " "immutable, the same rules as for literals apply (i.e., two occurrences of " "the empty tuple may or may not yield the same object)." msgstr "" -#: ../../reference/expressions.rst:184 +#: ../../reference/expressions.rst:183 msgid "" "Note that tuples are not formed by the parentheses, but rather by use of the " "comma. The exception is the empty tuple, for which parentheses *are* " @@ -233,31 +234,31 @@ msgid "" "ambiguities and allow common typos to pass uncaught." msgstr "" -#: ../../reference/expressions.rst:193 +#: ../../reference/expressions.rst:192 msgid "Displays for lists, sets and dictionaries" msgstr "" -#: ../../reference/expressions.rst:197 +#: ../../reference/expressions.rst:196 msgid "" "For constructing a list, a set or a dictionary Python provides special " "syntax called \"displays\", each of them in two flavors:" msgstr "" -#: ../../reference/expressions.rst:200 +#: ../../reference/expressions.rst:199 msgid "either the container contents are listed explicitly, or" msgstr "" -#: ../../reference/expressions.rst:202 +#: ../../reference/expressions.rst:201 msgid "" "they are computed via a set of looping and filtering instructions, called a :" "dfn:`comprehension`." msgstr "" -#: ../../reference/expressions.rst:210 +#: ../../reference/expressions.rst:209 msgid "Common syntax elements for comprehensions are:" msgstr "" -#: ../../reference/expressions.rst:218 +#: ../../reference/expressions.rst:217 msgid "" "The comprehension consists of a single expression followed by at least one :" "keyword:`!for` clause and zero or more :keyword:`!for` or :keyword:`!if` " @@ -267,7 +268,7 @@ msgid "" "expression to produce an element each time the innermost block is reached." msgstr "" -#: ../../reference/expressions.rst:225 +#: ../../reference/expressions.rst:224 msgid "" "However, aside from the iterable expression in the leftmost :keyword:`!for` " "clause, the comprehension is executed in a separate implicitly nested scope. " @@ -275,7 +276,7 @@ msgid "" "the enclosing scope." msgstr "" -#: ../../reference/expressions.rst:229 +#: ../../reference/expressions.rst:228 msgid "" "The iterable expression in the leftmost :keyword:`!for` clause is evaluated " "directly in the enclosing scope and then passed as an argument to the " @@ -285,14 +286,14 @@ msgid "" "iterable. For example: ``[x*y for x in range(10) for y in range(x, x+10)]``." msgstr "" -#: ../../reference/expressions.rst:236 +#: ../../reference/expressions.rst:235 msgid "" "To ensure the comprehension always results in a container of the appropriate " "type, ``yield`` and ``yield from`` expressions are prohibited in the " "implicitly nested scope." msgstr "" -#: ../../reference/expressions.rst:243 +#: ../../reference/expressions.rst:242 msgid "" "Since Python 3.6, in an :keyword:`async def` function, an :keyword:`!async " "for` clause may be used to iterate over a :term:`asynchronous iterator`. A " @@ -302,7 +303,7 @@ msgid "" "clauses, and may also use :keyword:`await` expressions." msgstr "" -#: ../../reference/expressions.rst:250 +#: ../../reference/expressions.rst:249 msgid "" "If a comprehension contains :keyword:`!async for` clauses, or if it " "contains :keyword:`!await` expressions or other asynchronous comprehensions " @@ -312,31 +313,31 @@ msgid "" "it appears. See also :pep:`530`." msgstr "" -#: ../../reference/expressions.rst:257 +#: ../../reference/expressions.rst:256 msgid "Asynchronous comprehensions were introduced." msgstr "" -#: ../../reference/expressions.rst:260 ../../reference/expressions.rst:438 +#: ../../reference/expressions.rst:259 ../../reference/expressions.rst:438 msgid "``yield`` and ``yield from`` prohibited in the implicitly nested scope." msgstr "" -#: ../../reference/expressions.rst:263 +#: ../../reference/expressions.rst:262 msgid "" "Asynchronous comprehensions are now allowed inside comprehensions in " "asynchronous functions. Outer comprehensions implicitly become asynchronous." msgstr "" -#: ../../reference/expressions.rst:272 +#: ../../reference/expressions.rst:271 msgid "List displays" msgstr "" -#: ../../reference/expressions.rst:282 +#: ../../reference/expressions.rst:281 msgid "" "A list display is a possibly empty series of expressions enclosed in square " "brackets:" msgstr "" -#: ../../reference/expressions.rst:288 +#: ../../reference/expressions.rst:287 msgid "" "A list display yields a new list object, the contents being specified by " "either a list of expressions or a comprehension. When a comma-separated " @@ -346,17 +347,17 @@ msgid "" "comprehension." msgstr "" -#: ../../reference/expressions.rst:298 +#: ../../reference/expressions.rst:297 msgid "Set displays" msgstr "" -#: ../../reference/expressions.rst:307 +#: ../../reference/expressions.rst:306 msgid "" "A set display is denoted by curly braces and distinguishable from dictionary " "displays by the lack of colons separating keys and values:" msgstr "" -#: ../../reference/expressions.rst:313 +#: ../../reference/expressions.rst:312 msgid "" "A set display yields a new mutable set object, the contents being specified " "by either a sequence of expressions or a comprehension. When a comma-" @@ -366,27 +367,27 @@ msgid "" "comprehension." msgstr "" -#: ../../reference/expressions.rst:319 +#: ../../reference/expressions.rst:318 msgid "" "An empty set cannot be constructed with ``{}``; this literal constructs an " "empty dictionary." msgstr "" -#: ../../reference/expressions.rst:326 +#: ../../reference/expressions.rst:325 msgid "Dictionary displays" msgstr "" -#: ../../reference/expressions.rst:337 +#: ../../reference/expressions.rst:336 msgid "" "A dictionary display is a possibly empty series of dict items (key/value " "pairs) enclosed in curly braces:" msgstr "" -#: ../../reference/expressions.rst:346 +#: ../../reference/expressions.rst:345 msgid "A dictionary display yields a new dictionary object." msgstr "" -#: ../../reference/expressions.rst:348 +#: ../../reference/expressions.rst:347 msgid "" "If a comma-separated sequence of dict items is given, they are evaluated " "from left to right to define the entries of the dictionary: each key object " @@ -396,7 +397,7 @@ msgid "" "given." msgstr "" -#: ../../reference/expressions.rst:358 +#: ../../reference/expressions.rst:357 msgid "" "A double asterisk ``**`` denotes :dfn:`dictionary unpacking`. Its operand " "must be a :term:`mapping`. Each mapping item is added to the new " @@ -404,11 +405,11 @@ msgid "" "and earlier dictionary unpackings." msgstr "" -#: ../../reference/expressions.rst:363 +#: ../../reference/expressions.rst:362 msgid "Unpacking into dictionary displays, originally proposed by :pep:`448`." msgstr "" -#: ../../reference/expressions.rst:366 +#: ../../reference/expressions.rst:365 msgid "" "A dict comprehension, in contrast to list and set comprehensions, needs two " "expressions separated with a colon followed by the usual \"for\" and \"if\" " @@ -416,7 +417,7 @@ msgid "" "are inserted in the new dictionary in the order they are produced." msgstr "" -#: ../../reference/expressions.rst:374 +#: ../../reference/expressions.rst:373 msgid "" "Restrictions on the types of the key values are listed earlier in section :" "ref:`types`. (To summarize, the key type should be :term:`hashable`, which " @@ -425,7 +426,7 @@ msgid "" "given key value prevails." msgstr "" -#: ../../reference/expressions.rst:380 +#: ../../reference/expressions.rst:379 msgid "" "Prior to Python 3.8, in dict comprehensions, the evaluation order of key and " "value was not well-defined. In CPython, the value was evaluated before the " @@ -433,33 +434,34 @@ msgid "" "by :pep:`572`." msgstr "" -#: ../../reference/expressions.rst:390 +#: ../../reference/expressions.rst:389 msgid "Generator expressions" msgstr "" -#: ../../reference/expressions.rst:397 +#: ../../reference/expressions.rst:396 msgid "A generator expression is a compact generator notation in parentheses:" msgstr "" -#: ../../reference/expressions.rst:402 +#: ../../reference/expressions.rst:401 msgid "" "A generator expression yields a new generator object. Its syntax is the " "same as for comprehensions, except that it is enclosed in parentheses " "instead of brackets or curly braces." msgstr "" -#: ../../reference/expressions.rst:406 +#: ../../reference/expressions.rst:405 msgid "" "Variables used in the generator expression are evaluated lazily when the :" "meth:`~generator.__next__` method is called for the generator object (in the " "same fashion as normal generators). However, the iterable expression in the " -"leftmost :keyword:`!for` clause is immediately evaluated, so that an error " -"produced by it will be emitted at the point where the generator expression " -"is defined, rather than at the point where the first value is retrieved. " -"Subsequent :keyword:`!for` clauses and any filter condition in the leftmost :" -"keyword:`!for` clause cannot be evaluated in the enclosing scope as they may " -"depend on the values obtained from the leftmost iterable. For example: " -"``(x*y for x in range(10) for y in range(x, x+10))``." +"leftmost :keyword:`!for` clause is immediately evaluated, and the :term:" +"`iterator` is immediately created for that iterable, so that an error " +"produced while creating the iterator will be emitted at the point where the " +"generator expression is defined, rather than at the point where the first " +"value is retrieved. Subsequent :keyword:`!for` clauses and any filter " +"condition in the leftmost :keyword:`!for` clause cannot be evaluated in the " +"enclosing scope as they may depend on the values obtained from the leftmost " +"iterable. For example: ``(x*y for x in range(10) for y in range(x, x+10))``." msgstr "" #: ../../reference/expressions.rst:417 @@ -719,7 +721,7 @@ msgid "" "*value* may be cleared." msgstr "" -#: ../../reference/expressions.rst:620 ../../reference/expressions.rst:804 +#: ../../reference/expressions.rst:620 ../../reference/expressions.rst:806 msgid "" "The second signature \\(type\\[, value\\[, traceback\\]\\]\\) is deprecated " "and may be removed in a future version of Python." @@ -727,34 +729,36 @@ msgstr "" #: ../../reference/expressions.rst:628 msgid "" -"Raises a :exc:`GeneratorExit` at the point where the generator function was " -"paused. If the generator function catches the exception and returns a " -"value, this value is returned from :meth:`close`. If the generator function " -"is already closed, or raises :exc:`GeneratorExit` (by not catching the " -"exception), :meth:`close` returns :const:`None`. If the generator yields a " -"value, a :exc:`RuntimeError` is raised. If the generator raises any other " -"exception, it is propagated to the caller. If the generator has already " -"exited due to an exception or normal exit, :meth:`close` returns :const:" -"`None` and has no other effect." +"Raises a :exc:`GeneratorExit` exception at the point where the generator " +"function was paused (equivalent to calling ``throw(GeneratorExit)``). The " +"exception is raised by the yield expression where the generator was paused. " +"If the generator function catches the exception and returns a value, this " +"value is returned from :meth:`close`. If the generator function is already " +"closed, or raises :exc:`GeneratorExit` (by not catching the exception), :" +"meth:`close` returns :const:`None`. If the generator yields a value, a :exc:" +"`RuntimeError` is raised. If the generator raises any other exception, it " +"is propagated to the caller. If the generator has already exited due to an " +"exception or normal exit, :meth:`close` returns :const:`None` and has no " +"other effect." msgstr "" -#: ../../reference/expressions.rst:640 +#: ../../reference/expressions.rst:642 msgid "" "If a generator returns a value upon being closed, the value is returned by :" "meth:`close`." msgstr "" -#: ../../reference/expressions.rst:646 +#: ../../reference/expressions.rst:648 msgid "Examples" msgstr "" -#: ../../reference/expressions.rst:648 +#: ../../reference/expressions.rst:650 msgid "" "Here is a simple example that demonstrates the behavior of generators and " "generator functions::" msgstr "" -#: ../../reference/expressions.rst:651 +#: ../../reference/expressions.rst:653 msgid "" ">>> def echo(value=None):\n" "... print(\"Execution starts when 'next()' is called for the first time." @@ -782,24 +786,24 @@ msgid "" "Don't forget to clean up when 'close()' is called." msgstr "" -#: ../../reference/expressions.rst:675 +#: ../../reference/expressions.rst:677 msgid "" "For examples using ``yield from``, see :ref:`pep-380` in \"What's New in " "Python.\"" msgstr "" -#: ../../reference/expressions.rst:681 +#: ../../reference/expressions.rst:683 msgid "Asynchronous generator functions" msgstr "" -#: ../../reference/expressions.rst:683 +#: ../../reference/expressions.rst:685 msgid "" "The presence of a yield expression in a function or method defined using :" "keyword:`async def` further defines the function as an :term:`asynchronous " "generator` function." msgstr "" -#: ../../reference/expressions.rst:687 +#: ../../reference/expressions.rst:689 msgid "" "When an asynchronous generator function is called, it returns an " "asynchronous iterator known as an asynchronous generator object. That object " @@ -809,7 +813,7 @@ msgid "" "keyword:`for` statement." msgstr "" -#: ../../reference/expressions.rst:694 +#: ../../reference/expressions.rst:696 msgid "" "Calling one of the asynchronous generator's methods returns an :term:" "`awaitable` object, and the execution starts when this object is awaited on. " @@ -827,7 +831,7 @@ msgid "" "then the result will be the value passed in to that method." msgstr "" -#: ../../reference/expressions.rst:709 +#: ../../reference/expressions.rst:711 msgid "" "If an asynchronous generator happens to exit early by :keyword:`break`, the " "caller task being cancelled, or other exceptions, the generator's async " @@ -839,7 +843,7 @@ msgid "" "generator and ultimately detach it from the event loop." msgstr "" -#: ../../reference/expressions.rst:719 +#: ../../reference/expressions.rst:721 msgid "" "In an asynchronous generator function, yield expressions are allowed " "anywhere in a :keyword:`try` construct. However, if an asynchronous " @@ -853,7 +857,7 @@ msgid "" "finally` clauses to execute." msgstr "" -#: ../../reference/expressions.rst:730 +#: ../../reference/expressions.rst:732 msgid "" "To take care of finalization upon event loop termination, an event loop " "should define a *finalizer* function which takes an asynchronous generator-" @@ -866,23 +870,23 @@ msgid "" "asyncio/base_events.py`." msgstr "" -#: ../../reference/expressions.rst:739 +#: ../../reference/expressions.rst:741 msgid "" "The expression ``yield from `` is a syntax error when used in an " "asynchronous generator function." msgstr "" -#: ../../reference/expressions.rst:746 +#: ../../reference/expressions.rst:748 msgid "Asynchronous generator-iterator methods" msgstr "" -#: ../../reference/expressions.rst:748 +#: ../../reference/expressions.rst:750 msgid "" "This subsection describes the methods of an asynchronous generator iterator, " "which are used to control the execution of a generator function." msgstr "" -#: ../../reference/expressions.rst:757 +#: ../../reference/expressions.rst:759 msgid "" "Returns an awaitable which when run starts to execute the asynchronous " "generator or resumes it at the last executed yield expression. When an " @@ -897,12 +901,12 @@ msgid "" "has completed." msgstr "" -#: ../../reference/expressions.rst:769 +#: ../../reference/expressions.rst:771 msgid "" "This method is normally called implicitly by a :keyword:`async for` loop." msgstr "" -#: ../../reference/expressions.rst:775 +#: ../../reference/expressions.rst:777 msgid "" "Returns an awaitable which when run resumes the execution of the " "asynchronous generator. As with the :meth:`~generator.send` method for a " @@ -917,7 +921,7 @@ msgid "" "receive the value." msgstr "" -#: ../../reference/expressions.rst:792 +#: ../../reference/expressions.rst:794 msgid "" "Returns an awaitable that raises an exception of type ``type`` at the point " "where the asynchronous generator was paused, and returns the next value " @@ -929,7 +933,7 @@ msgid "" "that exception propagates to the caller of the awaitable." msgstr "" -#: ../../reference/expressions.rst:813 +#: ../../reference/expressions.rst:815 msgid "" "Returns an awaitable that when run will throw a :exc:`GeneratorExit` into " "the asynchronous generator function at the point where it was paused. If the " @@ -945,25 +949,25 @@ msgid "" "will return an awaitable that does nothing." msgstr "" -#: ../../reference/expressions.rst:829 +#: ../../reference/expressions.rst:831 msgid "Primaries" msgstr "" -#: ../../reference/expressions.rst:833 +#: ../../reference/expressions.rst:835 msgid "" "Primaries represent the most tightly bound operations of the language. Their " "syntax is:" msgstr "" -#: ../../reference/expressions.rst:843 +#: ../../reference/expressions.rst:845 msgid "Attribute references" msgstr "" -#: ../../reference/expressions.rst:849 +#: ../../reference/expressions.rst:851 msgid "An attribute reference is a primary followed by a period and a name:" msgstr "" -#: ../../reference/expressions.rst:859 +#: ../../reference/expressions.rst:861 msgid "" "The primary must evaluate to an object of a type that supports attribute " "references, which most objects do. This object is then asked to produce the " @@ -972,7 +976,7 @@ msgid "" "reference may yield different objects." msgstr "" -#: ../../reference/expressions.rst:865 +#: ../../reference/expressions.rst:867 msgid "" "This production can be customized by overriding the :meth:`~object." "__getattribute__` method or the :meth:`~object.__getattr__` method. The :" @@ -980,17 +984,17 @@ msgid "" "or raises :exc:`AttributeError` if the attribute is not available." msgstr "" -#: ../../reference/expressions.rst:871 +#: ../../reference/expressions.rst:873 msgid "" "If an :exc:`AttributeError` is raised and the object has a :meth:`!" "__getattr__` method, that method is called as a fallback." msgstr "" -#: ../../reference/expressions.rst:877 +#: ../../reference/expressions.rst:879 msgid "Subscriptions" msgstr "" -#: ../../reference/expressions.rst:892 +#: ../../reference/expressions.rst:894 msgid "" "The subscription of an instance of a :ref:`container class ` " "will generally select an element from the container. The subscription of a :" @@ -998,13 +1002,13 @@ msgid "" "`GenericAlias ` object." msgstr "" -#: ../../reference/expressions.rst:900 +#: ../../reference/expressions.rst:902 msgid "" "When an object is subscripted, the interpreter will evaluate the primary and " "the expression list." msgstr "" -#: ../../reference/expressions.rst:903 +#: ../../reference/expressions.rst:905 msgid "" "The primary must evaluate to an object that supports subscription. An object " "may support subscription through defining one or both of :meth:`~object." @@ -1014,7 +1018,7 @@ msgid "" "called instead of ``__getitem__``, see :ref:`classgetitem-versus-getitem`." msgstr "" -#: ../../reference/expressions.rst:910 +#: ../../reference/expressions.rst:912 msgid "" "If the expression list contains at least one comma, or if any of the " "expressions are starred, the expression list will evaluate to a :class:" @@ -1022,17 +1026,17 @@ msgid "" "expression list will evaluate to the value of the list's sole member." msgstr "" -#: ../../reference/expressions.rst:915 +#: ../../reference/expressions.rst:917 msgid "Expressions in an expression list may be starred. See :pep:`646`." msgstr "" -#: ../../reference/expressions.rst:918 +#: ../../reference/expressions.rst:920 msgid "" "For built-in objects, there are two types of objects that support " "subscription via :meth:`~object.__getitem__`:" msgstr "" -#: ../../reference/expressions.rst:921 +#: ../../reference/expressions.rst:923 msgid "" "Mappings. If the primary is a :term:`mapping`, the expression list must " "evaluate to an object whose value is one of the keys of the mapping, and the " @@ -1040,7 +1044,7 @@ msgid "" "An example of a builtin mapping class is the :class:`dict` class." msgstr "" -#: ../../reference/expressions.rst:925 +#: ../../reference/expressions.rst:927 msgid "" "Sequences. If the primary is a :term:`sequence`, the expression list must " "evaluate to an :class:`int` or a :class:`slice` (as discussed in the " @@ -1048,7 +1052,7 @@ msgid "" "`str`, :class:`list` and :class:`tuple` classes." msgstr "" -#: ../../reference/expressions.rst:930 +#: ../../reference/expressions.rst:932 msgid "" "The formal syntax makes no special provision for negative indices in :term:" "`sequences `. However, built-in sequences all provide a :meth:" @@ -1062,25 +1066,25 @@ msgid "" "explicitly add that support." msgstr "" -#: ../../reference/expressions.rst:944 +#: ../../reference/expressions.rst:946 msgid "" "A :class:`string ` is a special kind of sequence whose items are " "*characters*. A character is not a separate data type but a string of " "exactly one character." msgstr "" -#: ../../reference/expressions.rst:952 +#: ../../reference/expressions.rst:954 msgid "Slicings" msgstr "" -#: ../../reference/expressions.rst:966 +#: ../../reference/expressions.rst:968 msgid "" "A slicing selects a range of items in a sequence object (e.g., a string, " "tuple or list). Slicings may be used as expressions or as targets in " "assignment or :keyword:`del` statements. The syntax for a slicing:" msgstr "" -#: ../../reference/expressions.rst:979 +#: ../../reference/expressions.rst:981 msgid "" "There is ambiguity in the formal syntax here: anything that looks like an " "expression list also looks like a slice list, so any subscription can be " @@ -1090,7 +1094,7 @@ msgid "" "the case if the slice list contains no proper slice)." msgstr "" -#: ../../reference/expressions.rst:991 +#: ../../reference/expressions.rst:993 msgid "" "The semantics for a slicing are as follows. The primary is indexed (using " "the same :meth:`~object.__getitem__` method as normal subscription) with a " @@ -1105,23 +1109,23 @@ msgid "" "missing expressions." msgstr "" -#: ../../reference/expressions.rst:1015 +#: ../../reference/expressions.rst:1017 msgid "Calls" msgstr "" -#: ../../reference/expressions.rst:1017 +#: ../../reference/expressions.rst:1019 msgid "" "A call calls a callable object (e.g., a :term:`function`) with a possibly " "empty series of :term:`arguments `:" msgstr "" -#: ../../reference/expressions.rst:1034 +#: ../../reference/expressions.rst:1036 msgid "" "An optional trailing comma may be present after the positional and keyword " "arguments but does not affect the semantics." msgstr "" -#: ../../reference/expressions.rst:1040 +#: ../../reference/expressions.rst:1042 msgid "" "The primary must evaluate to a callable object (user-defined functions, " "built-in functions, methods of built-in objects, class objects, methods of " @@ -1131,7 +1135,7 @@ msgid "" "formal :term:`parameter` lists." msgstr "" -#: ../../reference/expressions.rst:1048 +#: ../../reference/expressions.rst:1050 msgid "" "If keyword arguments are present, they are first converted to positional " "arguments, as follows. First, a list of unfilled slots is created for the " @@ -1152,7 +1156,7 @@ msgid "" "filled slots is used as the argument list for the call." msgstr "" -#: ../../reference/expressions.rst:1068 +#: ../../reference/expressions.rst:1070 msgid "" "An implementation may provide built-in functions whose positional parameters " "do not have names, even if they are 'named' for the purpose of " @@ -1161,7 +1165,7 @@ msgid "" "`PyArg_ParseTuple` to parse their arguments." msgstr "" -#: ../../reference/expressions.rst:1074 +#: ../../reference/expressions.rst:1076 msgid "" "If there are more positional arguments than there are formal parameter " "slots, a :exc:`TypeError` exception is raised, unless a formal parameter " @@ -1170,7 +1174,7 @@ msgid "" "empty tuple if there were no excess positional arguments)." msgstr "" -#: ../../reference/expressions.rst:1080 +#: ../../reference/expressions.rst:1082 msgid "" "If any keyword argument does not correspond to a formal parameter name, a :" "exc:`TypeError` exception is raised, unless a formal parameter using the " @@ -1180,7 +1184,7 @@ msgid "" "(new) empty dictionary if there were no excess keyword arguments." msgstr "" -#: ../../reference/expressions.rst:1091 +#: ../../reference/expressions.rst:1093 msgid "" "If the syntax ``*expression`` appears in the function call, ``expression`` " "must evaluate to an :term:`iterable`. Elements from these iterables are " @@ -1190,14 +1194,14 @@ msgid "" "*y1*, ..., *yM*, *x3*, *x4*." msgstr "" -#: ../../reference/expressions.rst:1098 +#: ../../reference/expressions.rst:1100 msgid "" "A consequence of this is that although the ``*expression`` syntax may appear " "*after* explicit keyword arguments, it is processed *before* the keyword " "arguments (and any ``**expression`` arguments -- see below). So::" msgstr "" -#: ../../reference/expressions.rst:1102 +#: ../../reference/expressions.rst:1104 msgid "" ">>> def f(a, b):\n" "... print(a, b)\n" @@ -1212,13 +1216,13 @@ msgid "" "1 2" msgstr "" -#: ../../reference/expressions.rst:1114 +#: ../../reference/expressions.rst:1116 msgid "" "It is unusual for both keyword arguments and the ``*expression`` syntax to " "be used in the same call, so in practice this confusion does not often arise." msgstr "" -#: ../../reference/expressions.rst:1120 +#: ../../reference/expressions.rst:1122 msgid "" "If the syntax ``**expression`` appears in the function call, ``expression`` " "must evaluate to a :term:`mapping`, the contents of which are treated as " @@ -1227,7 +1231,7 @@ msgid "" "a :exc:`TypeError` exception is raised." msgstr "" -#: ../../reference/expressions.rst:1126 +#: ../../reference/expressions.rst:1128 msgid "" "When ``**expression`` is used, each key in this mapping must be a string. " "Each value from the mapping is assigned to the first formal parameter " @@ -1239,35 +1243,35 @@ msgid "" "is raised." msgstr "" -#: ../../reference/expressions.rst:1136 +#: ../../reference/expressions.rst:1138 msgid "" "Formal parameters using the syntax ``*identifier`` or ``**identifier`` " "cannot be used as positional argument slots or as keyword argument names." msgstr "" -#: ../../reference/expressions.rst:1139 +#: ../../reference/expressions.rst:1141 msgid "" "Function calls accept any number of ``*`` and ``**`` unpackings, positional " "arguments may follow iterable unpackings (``*``), and keyword arguments may " "follow dictionary unpackings (``**``). Originally proposed by :pep:`448`." msgstr "" -#: ../../reference/expressions.rst:1145 +#: ../../reference/expressions.rst:1147 msgid "" "A call always returns some value, possibly ``None``, unless it raises an " "exception. How this value is computed depends on the type of the callable " "object." msgstr "" -#: ../../reference/expressions.rst:1149 +#: ../../reference/expressions.rst:1151 msgid "If it is---" msgstr "" -#: ../../reference/expressions.rst:1151 +#: ../../reference/expressions.rst:1153 msgid "a user-defined function:" msgstr "" -#: ../../reference/expressions.rst:1158 +#: ../../reference/expressions.rst:1160 msgid "" "The code block for the function is executed, passing it the argument list. " "The first thing the code block will do is bind the formal parameters to the " @@ -1278,73 +1282,73 @@ msgid "" "``None``." msgstr "" -#: ../../reference/expressions.rst:1165 +#: ../../reference/expressions.rst:1167 msgid "a built-in function or method:" msgstr "" -#: ../../reference/expressions.rst:1176 +#: ../../reference/expressions.rst:1178 msgid "" "The result is up to the interpreter; see :ref:`built-in-funcs` for the " "descriptions of built-in functions and methods." msgstr "" -#: ../../reference/expressions.rst:1179 +#: ../../reference/expressions.rst:1181 msgid "a class object:" msgstr "" -#: ../../reference/expressions.rst:1184 +#: ../../reference/expressions.rst:1186 msgid "A new instance of that class is returned." msgstr "" -#: ../../reference/expressions.rst:1186 +#: ../../reference/expressions.rst:1188 msgid "a class instance method:" msgstr "" -#: ../../reference/expressions.rst:1192 +#: ../../reference/expressions.rst:1194 msgid "" "The corresponding user-defined function is called, with an argument list " "that is one longer than the argument list of the call: the instance becomes " "the first argument." msgstr "" -#: ../../reference/expressions.rst:1196 +#: ../../reference/expressions.rst:1198 msgid "a class instance:" msgstr "" -#: ../../reference/expressions.rst:1201 +#: ../../reference/expressions.rst:1203 msgid "" "The class must define a :meth:`~object.__call__` method; the effect is then " "the same as if that method was called." msgstr "" -#: ../../reference/expressions.rst:1209 ../../reference/expressions.rst:2022 +#: ../../reference/expressions.rst:1211 ../../reference/expressions.rst:2024 msgid "Await expression" msgstr "" -#: ../../reference/expressions.rst:1211 +#: ../../reference/expressions.rst:1213 msgid "" "Suspend the execution of :term:`coroutine` on an :term:`awaitable` object. " "Can only be used inside a :term:`coroutine function`." msgstr "" -#: ../../reference/expressions.rst:1223 +#: ../../reference/expressions.rst:1225 msgid "The power operator" msgstr "" -#: ../../reference/expressions.rst:1229 +#: ../../reference/expressions.rst:1231 msgid "" "The power operator binds more tightly than unary operators on its left; it " "binds less tightly than unary operators on its right. The syntax is:" msgstr "" -#: ../../reference/expressions.rst:1235 +#: ../../reference/expressions.rst:1237 msgid "" "Thus, in an unparenthesized sequence of power and unary operators, the " "operators are evaluated from right to left (this does not constrain the " "evaluation order for the operands): ``-1**2`` results in ``-1``." msgstr "" -#: ../../reference/expressions.rst:1239 +#: ../../reference/expressions.rst:1241 msgid "" "The power operator has the same semantics as the built-in :func:`pow` " "function, when called with two arguments: it yields its left argument raised " @@ -1352,7 +1356,7 @@ msgid "" "converted to a common type, and the result is of that type." msgstr "" -#: ../../reference/expressions.rst:1244 +#: ../../reference/expressions.rst:1246 msgid "" "For int operands, the result has the same type as the operands unless the " "second argument is negative; in that case, all arguments are converted to " @@ -1360,41 +1364,41 @@ msgid "" "``100``, but ``10**-2`` returns ``0.01``." msgstr "" -#: ../../reference/expressions.rst:1249 +#: ../../reference/expressions.rst:1251 msgid "" "Raising ``0.0`` to a negative power results in a :exc:`ZeroDivisionError`. " "Raising a negative number to a fractional power results in a :class:" "`complex` number. (In earlier versions it raised a :exc:`ValueError`.)" msgstr "" -#: ../../reference/expressions.rst:1253 +#: ../../reference/expressions.rst:1255 msgid "" "This operation can be customized using the special :meth:`~object.__pow__` " "and :meth:`~object.__rpow__` methods." msgstr "" -#: ../../reference/expressions.rst:1259 +#: ../../reference/expressions.rst:1261 msgid "Unary arithmetic and bitwise operations" msgstr "" -#: ../../reference/expressions.rst:1265 +#: ../../reference/expressions.rst:1267 msgid "All unary arithmetic and bitwise operations have the same priority:" msgstr "" -#: ../../reference/expressions.rst:1276 +#: ../../reference/expressions.rst:1278 msgid "" "The unary ``-`` (minus) operator yields the negation of its numeric " "argument; the operation can be overridden with the :meth:`~object.__neg__` " "special method." msgstr "" -#: ../../reference/expressions.rst:1284 +#: ../../reference/expressions.rst:1286 msgid "" "The unary ``+`` (plus) operator yields its numeric argument unchanged; the " "operation can be overridden with the :meth:`~object.__pos__` special method." msgstr "" -#: ../../reference/expressions.rst:1291 +#: ../../reference/expressions.rst:1293 msgid "" "The unary ``~`` (invert) operator yields the bitwise inversion of its " "integer argument. The bitwise inversion of ``x`` is defined as ``-(x+1)``. " @@ -1402,17 +1406,17 @@ msgid "" "meth:`~object.__invert__` special method." msgstr "" -#: ../../reference/expressions.rst:1300 +#: ../../reference/expressions.rst:1302 msgid "" "In all three cases, if the argument does not have the proper type, a :exc:" "`TypeError` exception is raised." msgstr "" -#: ../../reference/expressions.rst:1307 +#: ../../reference/expressions.rst:1309 msgid "Binary arithmetic operations" msgstr "" -#: ../../reference/expressions.rst:1311 +#: ../../reference/expressions.rst:1313 msgid "" "The binary arithmetic operations have the conventional priority levels. " "Note that some of these operations also apply to certain non-numeric types. " @@ -1420,7 +1424,7 @@ msgid "" "multiplicative operators and one for additive operators:" msgstr "" -#: ../../reference/expressions.rst:1326 +#: ../../reference/expressions.rst:1328 msgid "" "The ``*`` (multiplication) operator yields the product of its arguments. " "The arguments must either both be numbers, or one argument must be an " @@ -1430,32 +1434,32 @@ msgid "" "yields an empty sequence." msgstr "" -#: ../../reference/expressions.rst:1332 +#: ../../reference/expressions.rst:1334 msgid "" "This operation can be customized using the special :meth:`~object.__mul__` " "and :meth:`~object.__rmul__` methods." msgstr "" -#: ../../reference/expressions.rst:1335 ../../reference/expressions.rst:1412 -#: ../../reference/expressions.rst:1427 +#: ../../reference/expressions.rst:1337 ../../reference/expressions.rst:1414 +#: ../../reference/expressions.rst:1429 msgid "" "If only one operand is a complex number, the other operand is converted to a " "floating-point number." msgstr "" -#: ../../reference/expressions.rst:1343 +#: ../../reference/expressions.rst:1345 msgid "" "The ``@`` (at) operator is intended to be used for matrix multiplication. " "No builtin Python types implement this operator." msgstr "" -#: ../../reference/expressions.rst:1346 +#: ../../reference/expressions.rst:1348 msgid "" "This operation can be customized using the special :meth:`~object." "__matmul__` and :meth:`~object.__rmatmul__` methods." msgstr "" -#: ../../reference/expressions.rst:1357 +#: ../../reference/expressions.rst:1359 msgid "" "The ``/`` (division) and ``//`` (floor division) operators yield the " "quotient of their arguments. The numeric arguments are first converted to a " @@ -1465,7 +1469,7 @@ msgid "" "the :exc:`ZeroDivisionError` exception." msgstr "" -#: ../../reference/expressions.rst:1364 +#: ../../reference/expressions.rst:1366 msgid "" "The division operation can be customized using the special :meth:`~object." "__truediv__` and :meth:`~object.__rtruediv__` methods. The floor division " @@ -1473,7 +1477,7 @@ msgid "" "and :meth:`~object.__rfloordiv__` methods." msgstr "" -#: ../../reference/expressions.rst:1373 +#: ../../reference/expressions.rst:1375 msgid "" "The ``%`` (modulo) operator yields the remainder from the division of the " "first argument by the second. The numeric arguments are first converted to " @@ -1485,7 +1489,7 @@ msgid "" "absolute value of the second operand [#]_." msgstr "" -#: ../../reference/expressions.rst:1382 +#: ../../reference/expressions.rst:1384 msgid "" "The floor division and modulo operators are connected by the following " "identity: ``x == (x//y)*y + (x%y)``. Floor division and modulo are also " @@ -1493,7 +1497,7 @@ msgid "" "y, x%y)``. [#]_." msgstr "" -#: ../../reference/expressions.rst:1387 +#: ../../reference/expressions.rst:1389 msgid "" "In addition to performing the modulo operation on numbers, the ``%`` " "operator is also overloaded by string objects to perform old-style string " @@ -1502,20 +1506,20 @@ msgid "" "formatting`." msgstr "" -#: ../../reference/expressions.rst:1392 +#: ../../reference/expressions.rst:1394 msgid "" "The *modulo* operation can be customized using the special :meth:`~object." "__mod__` and :meth:`~object.__rmod__` methods." msgstr "" -#: ../../reference/expressions.rst:1395 +#: ../../reference/expressions.rst:1397 msgid "" "The floor division operator, the modulo operator, and the :func:`divmod` " "function are not defined for complex numbers. Instead, convert to a " "floating-point number using the :func:`abs` function if appropriate." msgstr "" -#: ../../reference/expressions.rst:1404 +#: ../../reference/expressions.rst:1406 msgid "" "The ``+`` (addition) operator yields the sum of its arguments. The " "arguments must either both be numbers or both be sequences of the same " @@ -1523,40 +1527,40 @@ msgid "" "and then added together. In the latter case, the sequences are concatenated." msgstr "" -#: ../../reference/expressions.rst:1409 +#: ../../reference/expressions.rst:1411 msgid "" "This operation can be customized using the special :meth:`~object.__add__` " "and :meth:`~object.__radd__` methods." msgstr "" -#: ../../reference/expressions.rst:1421 +#: ../../reference/expressions.rst:1423 msgid "" "The ``-`` (subtraction) operator yields the difference of its arguments. " "The numeric arguments are first converted to a common real type." msgstr "" -#: ../../reference/expressions.rst:1424 +#: ../../reference/expressions.rst:1426 msgid "" "This operation can be customized using the special :meth:`~object.__sub__` " "and :meth:`~object.__rsub__` methods." msgstr "" -#: ../../reference/expressions.rst:1435 +#: ../../reference/expressions.rst:1437 msgid "Shifting operations" msgstr "" -#: ../../reference/expressions.rst:1442 +#: ../../reference/expressions.rst:1444 msgid "" "The shifting operations have lower priority than the arithmetic operations:" msgstr "" -#: ../../reference/expressions.rst:1447 +#: ../../reference/expressions.rst:1449 msgid "" "These operators accept integers as arguments. They shift the first argument " "to the left or right by the number of bits given by the second argument." msgstr "" -#: ../../reference/expressions.rst:1450 +#: ../../reference/expressions.rst:1452 msgid "" "The left shift operation can be customized using the special :meth:`~object." "__lshift__` and :meth:`~object.__rlshift__` methods. The right shift " @@ -1564,46 +1568,46 @@ msgid "" "and :meth:`~object.__rrshift__` methods." msgstr "" -#: ../../reference/expressions.rst:1457 +#: ../../reference/expressions.rst:1459 msgid "" "A right shift by *n* bits is defined as floor division by ``pow(2,n)``. A " "left shift by *n* bits is defined as multiplication with ``pow(2,n)``." msgstr "" -#: ../../reference/expressions.rst:1464 +#: ../../reference/expressions.rst:1466 msgid "Binary bitwise operations" msgstr "" -#: ../../reference/expressions.rst:1468 +#: ../../reference/expressions.rst:1470 msgid "Each of the three bitwise operations has a different priority level:" msgstr "" -#: ../../reference/expressions.rst:1479 +#: ../../reference/expressions.rst:1481 msgid "" "The ``&`` operator yields the bitwise AND of its arguments, which must be " "integers or one of them must be a custom object overriding :meth:`~object." "__and__` or :meth:`~object.__rand__` special methods." msgstr "" -#: ../../reference/expressions.rst:1488 +#: ../../reference/expressions.rst:1490 msgid "" "The ``^`` operator yields the bitwise XOR (exclusive OR) of its arguments, " "which must be integers or one of them must be a custom object overriding :" "meth:`~object.__xor__` or :meth:`~object.__rxor__` special methods." msgstr "" -#: ../../reference/expressions.rst:1497 +#: ../../reference/expressions.rst:1499 msgid "" "The ``|`` operator yields the bitwise (inclusive) OR of its arguments, which " "must be integers or one of them must be a custom object overriding :meth:" "`~object.__or__` or :meth:`~object.__ror__` special methods." msgstr "" -#: ../../reference/expressions.rst:1505 +#: ../../reference/expressions.rst:1507 msgid "Comparisons" msgstr "" -#: ../../reference/expressions.rst:1517 +#: ../../reference/expressions.rst:1519 msgid "" "Unlike C, all comparison operations in Python have the same priority, which " "is lower than that of any arithmetic, shifting or bitwise operation. Also " @@ -1611,14 +1615,14 @@ msgid "" "conventional in mathematics:" msgstr "" -#: ../../reference/expressions.rst:1527 +#: ../../reference/expressions.rst:1529 msgid "" "Comparisons yield boolean values: ``True`` or ``False``. Custom :dfn:`rich " "comparison methods` may return non-boolean values. In this case Python will " "call :func:`bool` on such value in boolean contexts." msgstr "" -#: ../../reference/expressions.rst:1533 +#: ../../reference/expressions.rst:1535 msgid "" "Comparisons can be chained arbitrarily, e.g., ``x < y <= z`` is equivalent " "to ``x < y and y <= z``, except that ``y`` is evaluated only once (but in " @@ -1626,7 +1630,7 @@ msgid "" "false)." msgstr "" -#: ../../reference/expressions.rst:1537 +#: ../../reference/expressions.rst:1539 msgid "" "Formally, if *a*, *b*, *c*, ..., *y*, *z* are expressions and *op1*, " "*op2*, ..., *opN* are comparison operators, then ``a op1 b op2 c ... y opN " @@ -1634,24 +1638,24 @@ msgid "" "each expression is evaluated at most once." msgstr "" -#: ../../reference/expressions.rst:1542 +#: ../../reference/expressions.rst:1544 msgid "" "Note that ``a op1 b op2 c`` doesn't imply any kind of comparison between *a* " "and *c*, so that, e.g., ``x < y > z`` is perfectly legal (though perhaps not " "pretty)." msgstr "" -#: ../../reference/expressions.rst:1549 +#: ../../reference/expressions.rst:1551 msgid "Value comparisons" msgstr "" -#: ../../reference/expressions.rst:1551 +#: ../../reference/expressions.rst:1553 msgid "" "The operators ``<``, ``>``, ``==``, ``>=``, ``<=``, and ``!=`` compare the " "values of two objects. The objects do not need to have the same type." msgstr "" -#: ../../reference/expressions.rst:1554 +#: ../../reference/expressions.rst:1556 msgid "" "Chapter :ref:`objects` states that objects have a value (in addition to type " "and identity). The value of an object is a rather abstract notion in " @@ -1663,7 +1667,7 @@ msgid "" "indirectly, by means of their comparison implementation." msgstr "" -#: ../../reference/expressions.rst:1563 +#: ../../reference/expressions.rst:1565 msgid "" "Because all types are (direct or indirect) subtypes of :class:`object`, they " "inherit the default comparison behavior from :class:`object`. Types can " @@ -1671,7 +1675,7 @@ msgid "" "methods` like :meth:`~object.__lt__`, described in :ref:`customization`." msgstr "" -#: ../../reference/expressions.rst:1569 +#: ../../reference/expressions.rst:1571 msgid "" "The default behavior for equality comparison (``==`` and ``!=``) is based on " "the identity of the objects. Hence, equality comparison of instances with " @@ -1681,14 +1685,14 @@ msgid "" "``x is y`` implies ``x == y``)." msgstr "" -#: ../../reference/expressions.rst:1576 +#: ../../reference/expressions.rst:1578 msgid "" "A default order comparison (``<``, ``>``, ``<=``, and ``>=``) is not " "provided; an attempt raises :exc:`TypeError`. A motivation for this default " "behavior is the lack of a similar invariant as for equality." msgstr "" -#: ../../reference/expressions.rst:1580 +#: ../../reference/expressions.rst:1582 msgid "" "The behavior of the default equality comparison, that instances with " "different identities are always unequal, may be in contrast to what types " @@ -1697,13 +1701,13 @@ msgid "" "in fact, a number of built-in types have done that." msgstr "" -#: ../../reference/expressions.rst:1586 +#: ../../reference/expressions.rst:1588 msgid "" "The following list describes the comparison behavior of the most important " "built-in types." msgstr "" -#: ../../reference/expressions.rst:1589 +#: ../../reference/expressions.rst:1591 msgid "" "Numbers of built-in numeric types (:ref:`typesnumeric`) and of the standard " "library types :class:`fractions.Fraction` and :class:`decimal.Decimal` can " @@ -1713,7 +1717,7 @@ msgid "" "of precision." msgstr "" -#: ../../reference/expressions.rst:1596 +#: ../../reference/expressions.rst:1598 msgid "" "The not-a-number values ``float('NaN')`` and ``decimal.Decimal('NaN')`` are " "special. Any ordered comparison of a number to a not-a-number value is " @@ -1723,32 +1727,32 @@ msgid "" "is compliant with IEEE 754." msgstr "" -#: ../../reference/expressions.rst:1603 +#: ../../reference/expressions.rst:1605 msgid "" "``None`` and :data:`NotImplemented` are singletons. :PEP:`8` advises that " "comparisons for singletons should always be done with ``is`` or ``is not``, " "never the equality operators." msgstr "" -#: ../../reference/expressions.rst:1607 +#: ../../reference/expressions.rst:1609 msgid "" "Binary sequences (instances of :class:`bytes` or :class:`bytearray`) can be " "compared within and across their types. They compare lexicographically " "using the numeric values of their elements." msgstr "" -#: ../../reference/expressions.rst:1611 +#: ../../reference/expressions.rst:1613 msgid "" "Strings (instances of :class:`str`) compare lexicographically using the " "numerical Unicode code points (the result of the built-in function :func:" "`ord`) of their characters. [#]_" msgstr "" -#: ../../reference/expressions.rst:1615 +#: ../../reference/expressions.rst:1617 msgid "Strings and binary sequences cannot be directly compared." msgstr "" -#: ../../reference/expressions.rst:1617 +#: ../../reference/expressions.rst:1619 msgid "" "Sequences (instances of :class:`tuple`, :class:`list`, or :class:`range`) " "can be compared only within each of their types, with the restriction that " @@ -1757,7 +1761,7 @@ msgid "" "raises :exc:`TypeError`." msgstr "" -#: ../../reference/expressions.rst:1623 +#: ../../reference/expressions.rst:1625 msgid "" "Sequences compare lexicographically using comparison of corresponding " "elements. The built-in containers typically assume identical objects are " @@ -1765,19 +1769,19 @@ msgid "" "objects to improve performance and to maintain their internal invariants." msgstr "" -#: ../../reference/expressions.rst:1628 +#: ../../reference/expressions.rst:1630 msgid "" "Lexicographical comparison between built-in collections works as follows:" msgstr "" -#: ../../reference/expressions.rst:1630 +#: ../../reference/expressions.rst:1632 msgid "" "For two collections to compare equal, they must be of the same type, have " "the same length, and each pair of corresponding elements must compare equal " "(for example, ``[1,2] == (1,2)`` is false because the type is not the same)." msgstr "" -#: ../../reference/expressions.rst:1635 +#: ../../reference/expressions.rst:1637 msgid "" "Collections that support order comparison are ordered the same as their " "first unequal elements (for example, ``[1,2,x] <= [1,2,y]`` has the same " @@ -1786,25 +1790,25 @@ msgid "" "true)." msgstr "" -#: ../../reference/expressions.rst:1641 +#: ../../reference/expressions.rst:1643 msgid "" "Mappings (instances of :class:`dict`) compare equal if and only if they have " "equal ``(key, value)`` pairs. Equality comparison of the keys and values " "enforces reflexivity." msgstr "" -#: ../../reference/expressions.rst:1645 +#: ../../reference/expressions.rst:1647 msgid "" "Order comparisons (``<``, ``>``, ``<=``, and ``>=``) raise :exc:`TypeError`." msgstr "" -#: ../../reference/expressions.rst:1647 +#: ../../reference/expressions.rst:1649 msgid "" "Sets (instances of :class:`set` or :class:`frozenset`) can be compared " "within and across their types." msgstr "" -#: ../../reference/expressions.rst:1650 +#: ../../reference/expressions.rst:1652 msgid "" "They define order comparison operators to mean subset and superset tests. " "Those relations do not define total orderings (for example, the two sets " @@ -1815,110 +1819,110 @@ msgid "" "sets as inputs)." msgstr "" -#: ../../reference/expressions.rst:1658 +#: ../../reference/expressions.rst:1660 msgid "Comparison of sets enforces reflexivity of its elements." msgstr "" -#: ../../reference/expressions.rst:1660 +#: ../../reference/expressions.rst:1662 msgid "" "Most other built-in types have no comparison methods implemented, so they " "inherit the default comparison behavior." msgstr "" -#: ../../reference/expressions.rst:1663 +#: ../../reference/expressions.rst:1665 msgid "" "User-defined classes that customize their comparison behavior should follow " "some consistency rules, if possible:" msgstr "" -#: ../../reference/expressions.rst:1666 +#: ../../reference/expressions.rst:1668 msgid "" "Equality comparison should be reflexive. In other words, identical objects " "should compare equal:" msgstr "" -#: ../../reference/expressions.rst:1669 +#: ../../reference/expressions.rst:1671 msgid "``x is y`` implies ``x == y``" msgstr "" -#: ../../reference/expressions.rst:1671 +#: ../../reference/expressions.rst:1673 msgid "" "Comparison should be symmetric. In other words, the following expressions " "should have the same result:" msgstr "" -#: ../../reference/expressions.rst:1674 +#: ../../reference/expressions.rst:1676 msgid "``x == y`` and ``y == x``" msgstr "" -#: ../../reference/expressions.rst:1676 +#: ../../reference/expressions.rst:1678 msgid "``x != y`` and ``y != x``" msgstr "" -#: ../../reference/expressions.rst:1678 +#: ../../reference/expressions.rst:1680 msgid "``x < y`` and ``y > x``" msgstr "" -#: ../../reference/expressions.rst:1680 +#: ../../reference/expressions.rst:1682 msgid "``x <= y`` and ``y >= x``" msgstr "" -#: ../../reference/expressions.rst:1682 +#: ../../reference/expressions.rst:1684 msgid "" "Comparison should be transitive. The following (non-exhaustive) examples " "illustrate that:" msgstr "" -#: ../../reference/expressions.rst:1685 +#: ../../reference/expressions.rst:1687 msgid "``x > y and y > z`` implies ``x > z``" msgstr "" -#: ../../reference/expressions.rst:1687 +#: ../../reference/expressions.rst:1689 msgid "``x < y and y <= z`` implies ``x < z``" msgstr "" -#: ../../reference/expressions.rst:1689 +#: ../../reference/expressions.rst:1691 msgid "" "Inverse comparison should result in the boolean negation. In other words, " "the following expressions should have the same result:" msgstr "" -#: ../../reference/expressions.rst:1692 +#: ../../reference/expressions.rst:1694 msgid "``x == y`` and ``not x != y``" msgstr "" -#: ../../reference/expressions.rst:1694 +#: ../../reference/expressions.rst:1696 msgid "``x < y`` and ``not x >= y`` (for total ordering)" msgstr "" -#: ../../reference/expressions.rst:1696 +#: ../../reference/expressions.rst:1698 msgid "``x > y`` and ``not x <= y`` (for total ordering)" msgstr "" -#: ../../reference/expressions.rst:1698 +#: ../../reference/expressions.rst:1700 msgid "" "The last two expressions apply to totally ordered collections (e.g. to " "sequences, but not to sets or mappings). See also the :func:`~functools." "total_ordering` decorator." msgstr "" -#: ../../reference/expressions.rst:1702 +#: ../../reference/expressions.rst:1704 msgid "" "The :func:`hash` result should be consistent with equality. Objects that are " "equal should either have the same hash value, or be marked as unhashable." msgstr "" -#: ../../reference/expressions.rst:1706 +#: ../../reference/expressions.rst:1708 msgid "" "Python does not enforce these consistency rules. In fact, the not-a-number " "values are an example for not following these rules." msgstr "" -#: ../../reference/expressions.rst:1715 +#: ../../reference/expressions.rst:1717 msgid "Membership test operations" msgstr "" -#: ../../reference/expressions.rst:1717 +#: ../../reference/expressions.rst:1719 msgid "" "The operators :keyword:`in` and :keyword:`not in` test for membership. ``x " "in s`` evaluates to ``True`` if *x* is a member of *s*, and ``False`` " @@ -1929,7 +1933,7 @@ msgid "" "expression ``x in y`` is equivalent to ``any(x is e or x == e for e in y)``." msgstr "" -#: ../../reference/expressions.rst:1725 +#: ../../reference/expressions.rst:1727 msgid "" "For the string and bytes types, ``x in y`` is ``True`` if and only if *x* is " "a substring of *y*. An equivalent test is ``y.find(x) != -1``. Empty " @@ -1937,14 +1941,14 @@ msgid "" "``\"\" in \"abc\"`` will return ``True``." msgstr "" -#: ../../reference/expressions.rst:1730 +#: ../../reference/expressions.rst:1732 msgid "" "For user-defined classes which define the :meth:`~object.__contains__` " "method, ``x in y`` returns ``True`` if ``y.__contains__(x)`` returns a true " "value, and ``False`` otherwise." msgstr "" -#: ../../reference/expressions.rst:1734 +#: ../../reference/expressions.rst:1736 msgid "" "For user-defined classes which do not define :meth:`~object.__contains__` " "but do define :meth:`~object.__iter__`, ``x in y`` is ``True`` if some value " @@ -1953,7 +1957,7 @@ msgid "" "it is as if :keyword:`in` raised that exception." msgstr "" -#: ../../reference/expressions.rst:1740 +#: ../../reference/expressions.rst:1742 msgid "" "Lastly, the old-style iteration protocol is tried: if a class defines :meth:" "`~object.__getitem__`, ``x in y`` is ``True`` if and only if there is a non-" @@ -1962,17 +1966,17 @@ msgid "" "exception is raised, it is as if :keyword:`in` raised that exception)." msgstr "" -#: ../../reference/expressions.rst:1752 +#: ../../reference/expressions.rst:1754 msgid "" "The operator :keyword:`not in` is defined to have the inverse truth value " "of :keyword:`in`." msgstr "" -#: ../../reference/expressions.rst:1765 +#: ../../reference/expressions.rst:1767 msgid "Identity comparisons" msgstr "" -#: ../../reference/expressions.rst:1767 +#: ../../reference/expressions.rst:1769 msgid "" "The operators :keyword:`is` and :keyword:`is not` test for an object's " "identity: ``x is y`` is true if and only if *x* and *y* are the same " @@ -1980,11 +1984,11 @@ msgid "" "``x is not y`` yields the inverse truth value. [#]_" msgstr "" -#: ../../reference/expressions.rst:1779 +#: ../../reference/expressions.rst:1781 msgid "Boolean operations" msgstr "" -#: ../../reference/expressions.rst:1790 +#: ../../reference/expressions.rst:1792 msgid "" "In the context of Boolean operations, and also when expressions are used by " "control flow statements, the following values are interpreted as false: " @@ -1995,25 +1999,25 @@ msgid "" "__bool__` method." msgstr "" -#: ../../reference/expressions.rst:1799 +#: ../../reference/expressions.rst:1801 msgid "" "The operator :keyword:`not` yields ``True`` if its argument is false, " "``False`` otherwise." msgstr "" -#: ../../reference/expressions.rst:1804 +#: ../../reference/expressions.rst:1806 msgid "" "The expression ``x and y`` first evaluates *x*; if *x* is false, its value " "is returned; otherwise, *y* is evaluated and the resulting value is returned." msgstr "" -#: ../../reference/expressions.rst:1809 +#: ../../reference/expressions.rst:1811 msgid "" "The expression ``x or y`` first evaluates *x*; if *x* is true, its value is " "returned; otherwise, *y* is evaluated and the resulting value is returned." msgstr "" -#: ../../reference/expressions.rst:1812 +#: ../../reference/expressions.rst:1814 msgid "" "Note that neither :keyword:`and` nor :keyword:`or` restrict the value and " "type they return to ``False`` and ``True``, but rather return the last " @@ -2024,11 +2028,11 @@ msgid "" "argument (for example, ``not 'foo'`` produces ``False`` rather than ``''``.)" msgstr "" -#: ../../reference/expressions.rst:1831 +#: ../../reference/expressions.rst:1833 msgid "Assignment expressions" msgstr "" -#: ../../reference/expressions.rst:1836 +#: ../../reference/expressions.rst:1838 msgid "" "An assignment expression (sometimes also called a \"named expression\" or " "\"walrus\") assigns an :token:`~python-grammar:expression` to an :token:" @@ -2036,27 +2040,27 @@ msgid "" "`~python-grammar:expression`." msgstr "" -#: ../../reference/expressions.rst:1841 +#: ../../reference/expressions.rst:1843 msgid "One common use case is when handling matched regular expressions:" msgstr "" -#: ../../reference/expressions.rst:1843 +#: ../../reference/expressions.rst:1845 msgid "" "if matching := pattern.search(data):\n" " do_something(matching)" msgstr "" -#: ../../reference/expressions.rst:1848 +#: ../../reference/expressions.rst:1850 msgid "Or, when processing a file stream in chunks:" msgstr "" -#: ../../reference/expressions.rst:1850 +#: ../../reference/expressions.rst:1852 msgid "" "while chunk := file.read(9000):\n" " process(chunk)" msgstr "" -#: ../../reference/expressions.rst:1855 +#: ../../reference/expressions.rst:1857 msgid "" "Assignment expressions must be surrounded by parentheses when used as " "expression statements and when used as sub-expressions in slicing, " @@ -2066,36 +2070,36 @@ msgid "" "and ``while`` statements." msgstr "" -#: ../../reference/expressions.rst:1863 +#: ../../reference/expressions.rst:1865 msgid "See :pep:`572` for more details about assignment expressions." msgstr "" -#: ../../reference/expressions.rst:1870 +#: ../../reference/expressions.rst:1872 msgid "Conditional expressions" msgstr "" -#: ../../reference/expressions.rst:1882 +#: ../../reference/expressions.rst:1884 msgid "" "Conditional expressions (sometimes called a \"ternary operator\") have the " "lowest priority of all Python operations." msgstr "" -#: ../../reference/expressions.rst:1885 +#: ../../reference/expressions.rst:1887 msgid "" "The expression ``x if C else y`` first evaluates the condition, *C* rather " "than *x*. If *C* is true, *x* is evaluated and its value is returned; " "otherwise, *y* is evaluated and its value is returned." msgstr "" -#: ../../reference/expressions.rst:1889 +#: ../../reference/expressions.rst:1891 msgid "See :pep:`308` for more details about conditional expressions." msgstr "" -#: ../../reference/expressions.rst:1896 +#: ../../reference/expressions.rst:1898 msgid "Lambdas" msgstr "" -#: ../../reference/expressions.rst:1907 +#: ../../reference/expressions.rst:1909 msgid "" "Lambda expressions (sometimes called lambda forms) are used to create " "anonymous functions. The expression ``lambda parameters: expression`` yields " @@ -2103,31 +2107,31 @@ msgid "" "defined with:" msgstr "" -#: ../../reference/expressions.rst:1911 +#: ../../reference/expressions.rst:1913 msgid "" "def (parameters):\n" " return expression" msgstr "" -#: ../../reference/expressions.rst:1916 +#: ../../reference/expressions.rst:1918 msgid "" "See section :ref:`function` for the syntax of parameter lists. Note that " "functions created with lambda expressions cannot contain statements or " "annotations." msgstr "" -#: ../../reference/expressions.rst:1924 +#: ../../reference/expressions.rst:1926 msgid "Expression lists" msgstr "" -#: ../../reference/expressions.rst:1940 +#: ../../reference/expressions.rst:1942 msgid "" "Except when part of a list or set display, an expression list containing at " "least one comma yields a tuple. The length of the tuple is the number of " "expressions in the list. The expressions are evaluated from left to right." msgstr "" -#: ../../reference/expressions.rst:1949 +#: ../../reference/expressions.rst:1951 msgid "" "An asterisk ``*`` denotes :dfn:`iterable unpacking`. Its operand must be " "an :term:`iterable`. The iterable is expanded into a sequence of items, " @@ -2135,16 +2139,16 @@ msgid "" "unpacking." msgstr "" -#: ../../reference/expressions.rst:1954 +#: ../../reference/expressions.rst:1956 msgid "" "Iterable unpacking in expression lists, originally proposed by :pep:`448`." msgstr "" -#: ../../reference/expressions.rst:1957 +#: ../../reference/expressions.rst:1959 msgid "Any item in an expression list may be starred. See :pep:`646`." msgstr "" -#: ../../reference/expressions.rst:1962 +#: ../../reference/expressions.rst:1964 msgid "" "A trailing comma is required only to create a one-item tuple, such as ``1," "``; it is optional in all other cases. A single expression without a " @@ -2153,24 +2157,24 @@ msgid "" "``()``.)" msgstr "" -#: ../../reference/expressions.rst:1973 +#: ../../reference/expressions.rst:1975 msgid "Evaluation order" msgstr "" -#: ../../reference/expressions.rst:1977 +#: ../../reference/expressions.rst:1979 msgid "" "Python evaluates expressions from left to right. Notice that while " "evaluating an assignment, the right-hand side is evaluated before the left-" "hand side." msgstr "" -#: ../../reference/expressions.rst:1980 +#: ../../reference/expressions.rst:1982 msgid "" "In the following lines, expressions will be evaluated in the arithmetic " "order of their suffixes::" msgstr "" -#: ../../reference/expressions.rst:1983 +#: ../../reference/expressions.rst:1985 msgid "" "expr1, expr2, expr3, expr4\n" "(expr1, expr2, expr3, expr4)\n" @@ -2180,11 +2184,11 @@ msgid "" "expr3, expr4 = expr1, expr2" msgstr "" -#: ../../reference/expressions.rst:1994 +#: ../../reference/expressions.rst:1996 msgid "Operator precedence" msgstr "" -#: ../../reference/expressions.rst:1999 +#: ../../reference/expressions.rst:2001 msgid "" "The following table summarizes the operator precedence in Python, from " "highest precedence (most binding) to lowest precedence (least binding). " @@ -2194,176 +2198,176 @@ msgid "" "group from right to left)." msgstr "" -#: ../../reference/expressions.rst:2005 +#: ../../reference/expressions.rst:2007 msgid "" "Note that comparisons, membership tests, and identity tests, all have the " "same precedence and have a left-to-right chaining feature as described in " "the :ref:`comparisons` section." msgstr "" -#: ../../reference/expressions.rst:2011 +#: ../../reference/expressions.rst:2013 msgid "Operator" msgstr "" -#: ../../reference/expressions.rst:2011 +#: ../../reference/expressions.rst:2013 msgid "Description" msgstr "" -#: ../../reference/expressions.rst:2013 +#: ../../reference/expressions.rst:2015 msgid "``(expressions...)``," msgstr "" -#: ../../reference/expressions.rst:2015 +#: ../../reference/expressions.rst:2017 msgid "``[expressions...]``, ``{key: value...}``, ``{expressions...}``" msgstr "" -#: ../../reference/expressions.rst:2013 +#: ../../reference/expressions.rst:2015 msgid "" "Binding or parenthesized expression, list display, dictionary display, set " "display" msgstr "" -#: ../../reference/expressions.rst:2019 +#: ../../reference/expressions.rst:2021 msgid "``x[index]``, ``x[index:index]``, ``x(arguments...)``, ``x.attribute``" msgstr "" -#: ../../reference/expressions.rst:2019 +#: ../../reference/expressions.rst:2021 msgid "Subscription, slicing, call, attribute reference" msgstr "" -#: ../../reference/expressions.rst:2022 +#: ../../reference/expressions.rst:2024 msgid ":keyword:`await x `" msgstr "" -#: ../../reference/expressions.rst:2024 +#: ../../reference/expressions.rst:2026 msgid "``**``" msgstr "" -#: ../../reference/expressions.rst:2024 +#: ../../reference/expressions.rst:2026 msgid "Exponentiation [#]_" msgstr "" -#: ../../reference/expressions.rst:2026 +#: ../../reference/expressions.rst:2028 msgid "``+x``, ``-x``, ``~x``" msgstr "" -#: ../../reference/expressions.rst:2026 +#: ../../reference/expressions.rst:2028 msgid "Positive, negative, bitwise NOT" msgstr "" -#: ../../reference/expressions.rst:2028 +#: ../../reference/expressions.rst:2030 msgid "``*``, ``@``, ``/``, ``//``, ``%``" msgstr "" -#: ../../reference/expressions.rst:2028 +#: ../../reference/expressions.rst:2030 msgid "" "Multiplication, matrix multiplication, division, floor division, remainder " "[#]_" msgstr "" -#: ../../reference/expressions.rst:2032 +#: ../../reference/expressions.rst:2034 msgid "``+``, ``-``" msgstr "" -#: ../../reference/expressions.rst:2032 +#: ../../reference/expressions.rst:2034 msgid "Addition and subtraction" msgstr "" -#: ../../reference/expressions.rst:2034 +#: ../../reference/expressions.rst:2036 msgid "``<<``, ``>>``" msgstr "" -#: ../../reference/expressions.rst:2034 +#: ../../reference/expressions.rst:2036 msgid "Shifts" msgstr "" -#: ../../reference/expressions.rst:2036 +#: ../../reference/expressions.rst:2038 msgid "``&``" msgstr "" -#: ../../reference/expressions.rst:2036 +#: ../../reference/expressions.rst:2038 msgid "Bitwise AND" msgstr "" -#: ../../reference/expressions.rst:2038 +#: ../../reference/expressions.rst:2040 msgid "``^``" msgstr "" -#: ../../reference/expressions.rst:2038 +#: ../../reference/expressions.rst:2040 msgid "Bitwise XOR" msgstr "" -#: ../../reference/expressions.rst:2040 +#: ../../reference/expressions.rst:2042 msgid "``|``" msgstr "" -#: ../../reference/expressions.rst:2040 +#: ../../reference/expressions.rst:2042 msgid "Bitwise OR" msgstr "" -#: ../../reference/expressions.rst:2042 +#: ../../reference/expressions.rst:2044 msgid "" ":keyword:`in`, :keyword:`not in`, :keyword:`is`, :keyword:`is not`, ``<``, " "``<=``, ``>``, ``>=``, ``!=``, ``==``" msgstr "" -#: ../../reference/expressions.rst:2042 +#: ../../reference/expressions.rst:2044 msgid "Comparisons, including membership tests and identity tests" msgstr "" -#: ../../reference/expressions.rst:2046 +#: ../../reference/expressions.rst:2048 msgid ":keyword:`not x `" msgstr "" -#: ../../reference/expressions.rst:2046 +#: ../../reference/expressions.rst:2048 msgid "Boolean NOT" msgstr "" -#: ../../reference/expressions.rst:2048 +#: ../../reference/expressions.rst:2050 msgid ":keyword:`and`" msgstr "" -#: ../../reference/expressions.rst:2048 +#: ../../reference/expressions.rst:2050 msgid "Boolean AND" msgstr "" -#: ../../reference/expressions.rst:2050 +#: ../../reference/expressions.rst:2052 msgid ":keyword:`or`" msgstr "" -#: ../../reference/expressions.rst:2050 +#: ../../reference/expressions.rst:2052 msgid "Boolean OR" msgstr "" -#: ../../reference/expressions.rst:2052 +#: ../../reference/expressions.rst:2054 msgid ":keyword:`if ` -- :keyword:`!else`" msgstr "" -#: ../../reference/expressions.rst:2052 +#: ../../reference/expressions.rst:2054 msgid "Conditional expression" msgstr "" -#: ../../reference/expressions.rst:2054 +#: ../../reference/expressions.rst:2056 msgid ":keyword:`lambda`" msgstr "" -#: ../../reference/expressions.rst:2054 +#: ../../reference/expressions.rst:2056 msgid "Lambda expression" msgstr "" -#: ../../reference/expressions.rst:2056 +#: ../../reference/expressions.rst:2058 msgid "``:=``" msgstr "" -#: ../../reference/expressions.rst:2056 +#: ../../reference/expressions.rst:2058 msgid "Assignment expression" msgstr "" -#: ../../reference/expressions.rst:2061 +#: ../../reference/expressions.rst:2063 msgid "Footnotes" msgstr "" -#: ../../reference/expressions.rst:2062 +#: ../../reference/expressions.rst:2064 msgid "" "While ``abs(x%y) < abs(y)`` is true mathematically, for floats it may not be " "true numerically due to roundoff. For example, and assuming a platform on " @@ -2375,7 +2379,7 @@ msgid "" "approach is more appropriate depends on the application." msgstr "" -#: ../../reference/expressions.rst:2071 +#: ../../reference/expressions.rst:2073 msgid "" "If x is very close to an exact integer multiple of y, it's possible for ``x//" "y`` to be one larger than ``(x-x%y)//y`` due to rounding. In such cases, " @@ -2383,7 +2387,7 @@ msgid "" "* y + x % y`` be very close to ``x``." msgstr "" -#: ../../reference/expressions.rst:2076 +#: ../../reference/expressions.rst:2078 msgid "" "The Unicode standard distinguishes between :dfn:`code points` (e.g. U+0041) " "and :dfn:`abstract characters` (e.g. \"LATIN CAPITAL LETTER A\"). While most " @@ -2397,7 +2401,7 @@ msgid "" "(COMBINING CEDILLA)." msgstr "" -#: ../../reference/expressions.rst:2087 +#: ../../reference/expressions.rst:2089 msgid "" "The comparison operators on strings compare at the level of Unicode code " "points. This may be counter-intuitive to humans. For example, ``\"\\u00C7\" " @@ -2405,13 +2409,13 @@ msgid "" "same abstract character \"LATIN CAPITAL LETTER C WITH CEDILLA\"." msgstr "" -#: ../../reference/expressions.rst:2092 +#: ../../reference/expressions.rst:2094 msgid "" "To compare strings at the level of abstract characters (that is, in a way " "intuitive to humans), use :func:`unicodedata.normalize`." msgstr "" -#: ../../reference/expressions.rst:2095 +#: ../../reference/expressions.rst:2097 msgid "" "Due to automatic garbage-collection, free lists, and the dynamic nature of " "descriptors, you may notice seemingly unusual behaviour in certain uses of " @@ -2419,22 +2423,22 @@ msgid "" "instance methods, or constants. Check their documentation for more info." msgstr "" -#: ../../reference/expressions.rst:2100 +#: ../../reference/expressions.rst:2102 msgid "" "The power operator ``**`` binds less tightly than an arithmetic or bitwise " "unary operator on its right, that is, ``2**-1`` is ``0.5``." msgstr "" -#: ../../reference/expressions.rst:2103 +#: ../../reference/expressions.rst:2105 msgid "" "The ``%`` operator is also used for string formatting; the same precedence " "applies." msgstr "" -#: ../../reference/expressions.rst:8 ../../reference/expressions.rst:392 -#: ../../reference/expressions.rst:447 ../../reference/expressions.rst:1781 -#: ../../reference/expressions.rst:1821 ../../reference/expressions.rst:1872 -#: ../../reference/expressions.rst:1898 ../../reference/expressions.rst:1926 +#: ../../reference/expressions.rst:8 ../../reference/expressions.rst:391 +#: ../../reference/expressions.rst:447 ../../reference/expressions.rst:1783 +#: ../../reference/expressions.rst:1823 ../../reference/expressions.rst:1874 +#: ../../reference/expressions.rst:1900 ../../reference/expressions.rst:1928 msgid "expression" msgstr "" @@ -2442,8 +2446,8 @@ msgstr "" msgid "BNF" msgstr "" -#: ../../reference/expressions.rst:28 ../../reference/expressions.rst:1261 -#: ../../reference/expressions.rst:1309 +#: ../../reference/expressions.rst:28 ../../reference/expressions.rst:1263 +#: ../../reference/expressions.rst:1311 msgid "arithmetic" msgstr "" @@ -2464,10 +2468,10 @@ msgid "identifier" msgstr "" #: ../../reference/expressions.rst:73 ../../reference/expressions.rst:568 -#: ../../reference/expressions.rst:623 ../../reference/expressions.rst:752 -#: ../../reference/expressions.rst:807 ../../reference/expressions.rst:854 -#: ../../reference/expressions.rst:1298 ../../reference/expressions.rst:1351 -#: ../../reference/expressions.rst:1455 +#: ../../reference/expressions.rst:623 ../../reference/expressions.rst:754 +#: ../../reference/expressions.rst:809 ../../reference/expressions.rst:856 +#: ../../reference/expressions.rst:1300 ../../reference/expressions.rst:1353 +#: ../../reference/expressions.rst:1457 msgid "exception" msgstr "" @@ -2491,186 +2495,186 @@ msgstr "" msgid "literal" msgstr "" -#: ../../reference/expressions.rst:145 ../../reference/expressions.rst:371 +#: ../../reference/expressions.rst:144 ../../reference/expressions.rst:370 msgid "immutable" msgstr "" -#: ../../reference/expressions.rst:145 +#: ../../reference/expressions.rst:144 msgid "data" msgstr "" -#: ../../reference/expressions.rst:145 +#: ../../reference/expressions.rst:144 msgid "type" msgstr "" -#: ../../reference/expressions.rst:145 ../../reference/expressions.rst:274 -#: ../../reference/expressions.rst:300 ../../reference/expressions.rst:328 -#: ../../reference/expressions.rst:371 ../../reference/expressions.rst:392 -#: ../../reference/expressions.rst:556 ../../reference/expressions.rst:742 -#: ../../reference/expressions.rst:854 ../../reference/expressions.rst:883 -#: ../../reference/expressions.rst:960 ../../reference/expressions.rst:1004 -#: ../../reference/expressions.rst:1152 ../../reference/expressions.rst:1166 -#: ../../reference/expressions.rst:1180 ../../reference/expressions.rst:1187 -#: ../../reference/expressions.rst:1746 ../../reference/expressions.rst:1938 +#: ../../reference/expressions.rst:144 ../../reference/expressions.rst:273 +#: ../../reference/expressions.rst:299 ../../reference/expressions.rst:327 +#: ../../reference/expressions.rst:370 ../../reference/expressions.rst:391 +#: ../../reference/expressions.rst:556 ../../reference/expressions.rst:744 +#: ../../reference/expressions.rst:856 ../../reference/expressions.rst:885 +#: ../../reference/expressions.rst:962 ../../reference/expressions.rst:1006 +#: ../../reference/expressions.rst:1154 ../../reference/expressions.rst:1168 +#: ../../reference/expressions.rst:1182 ../../reference/expressions.rst:1189 +#: ../../reference/expressions.rst:1748 ../../reference/expressions.rst:1940 msgid "object" msgstr "" -#: ../../reference/expressions.rst:161 +#: ../../reference/expressions.rst:160 msgid "parenthesized form" msgstr "" -#: ../../reference/expressions.rst:161 ../../reference/expressions.rst:392 -#: ../../reference/expressions.rst:1004 +#: ../../reference/expressions.rst:160 ../../reference/expressions.rst:391 +#: ../../reference/expressions.rst:1006 msgid "() (parentheses)" msgstr "" -#: ../../reference/expressions.rst:161 +#: ../../reference/expressions.rst:160 msgid "tuple display" msgstr "" -#: ../../reference/expressions.rst:174 ../../reference/expressions.rst:274 +#: ../../reference/expressions.rst:173 ../../reference/expressions.rst:273 msgid "empty" msgstr "" -#: ../../reference/expressions.rst:174 ../../reference/expressions.rst:883 -#: ../../reference/expressions.rst:960 ../../reference/expressions.rst:1938 +#: ../../reference/expressions.rst:173 ../../reference/expressions.rst:885 +#: ../../reference/expressions.rst:962 ../../reference/expressions.rst:1940 msgid "tuple" msgstr "" -#: ../../reference/expressions.rst:180 ../../reference/expressions.rst:1960 +#: ../../reference/expressions.rst:179 ../../reference/expressions.rst:1962 msgid "comma" msgstr "" -#: ../../reference/expressions.rst:180 ../../reference/expressions.rst:274 -#: ../../reference/expressions.rst:300 ../../reference/expressions.rst:328 -#: ../../reference/expressions.rst:954 ../../reference/expressions.rst:1004 -#: ../../reference/expressions.rst:1926 +#: ../../reference/expressions.rst:179 ../../reference/expressions.rst:273 +#: ../../reference/expressions.rst:299 ../../reference/expressions.rst:327 +#: ../../reference/expressions.rst:956 ../../reference/expressions.rst:1006 +#: ../../reference/expressions.rst:1928 msgid ", (comma)" msgstr "" -#: ../../reference/expressions.rst:195 ../../reference/expressions.rst:274 -#: ../../reference/expressions.rst:300 ../../reference/expressions.rst:328 +#: ../../reference/expressions.rst:194 ../../reference/expressions.rst:273 +#: ../../reference/expressions.rst:299 ../../reference/expressions.rst:327 msgid "comprehensions" msgstr "" -#: ../../reference/expressions.rst:205 +#: ../../reference/expressions.rst:204 msgid "for" msgstr "" -#: ../../reference/expressions.rst:205 ../../reference/expressions.rst:240 +#: ../../reference/expressions.rst:204 ../../reference/expressions.rst:239 msgid "in comprehensions" msgstr "" -#: ../../reference/expressions.rst:205 ../../reference/expressions.rst:1872 +#: ../../reference/expressions.rst:204 ../../reference/expressions.rst:1874 msgid "if" msgstr "" -#: ../../reference/expressions.rst:205 +#: ../../reference/expressions.rst:204 msgid "async for" msgstr "" -#: ../../reference/expressions.rst:240 ../../reference/expressions.rst:1205 +#: ../../reference/expressions.rst:239 ../../reference/expressions.rst:1207 msgid "await" msgstr "" -#: ../../reference/expressions.rst:274 ../../reference/expressions.rst:854 -#: ../../reference/expressions.rst:883 ../../reference/expressions.rst:960 -#: ../../reference/expressions.rst:1926 +#: ../../reference/expressions.rst:273 ../../reference/expressions.rst:856 +#: ../../reference/expressions.rst:885 ../../reference/expressions.rst:962 +#: ../../reference/expressions.rst:1928 msgid "list" msgstr "" -#: ../../reference/expressions.rst:274 ../../reference/expressions.rst:300 -#: ../../reference/expressions.rst:328 +#: ../../reference/expressions.rst:273 ../../reference/expressions.rst:299 +#: ../../reference/expressions.rst:327 msgid "display" msgstr "" -#: ../../reference/expressions.rst:274 ../../reference/expressions.rst:879 +#: ../../reference/expressions.rst:273 ../../reference/expressions.rst:881 msgid "[] (square brackets)" msgstr "" -#: ../../reference/expressions.rst:274 +#: ../../reference/expressions.rst:273 msgid "list expression" msgstr "" -#: ../../reference/expressions.rst:274 ../../reference/expressions.rst:300 -#: ../../reference/expressions.rst:1926 +#: ../../reference/expressions.rst:273 ../../reference/expressions.rst:299 +#: ../../reference/expressions.rst:1928 msgid "expression list" msgstr "" -#: ../../reference/expressions.rst:300 +#: ../../reference/expressions.rst:299 msgid "set" msgstr "" -#: ../../reference/expressions.rst:300 ../../reference/expressions.rst:328 +#: ../../reference/expressions.rst:299 ../../reference/expressions.rst:327 msgid "{} (curly brackets)" msgstr "" -#: ../../reference/expressions.rst:300 +#: ../../reference/expressions.rst:299 msgid "set expression" msgstr "" -#: ../../reference/expressions.rst:328 ../../reference/expressions.rst:354 -#: ../../reference/expressions.rst:883 +#: ../../reference/expressions.rst:327 ../../reference/expressions.rst:353 +#: ../../reference/expressions.rst:885 msgid "dictionary" msgstr "" -#: ../../reference/expressions.rst:328 +#: ../../reference/expressions.rst:327 msgid "key" msgstr "" -#: ../../reference/expressions.rst:328 +#: ../../reference/expressions.rst:327 msgid "value" msgstr "" -#: ../../reference/expressions.rst:328 +#: ../../reference/expressions.rst:327 msgid "key/value pair" msgstr "" -#: ../../reference/expressions.rst:328 +#: ../../reference/expressions.rst:327 msgid "dictionary expression" msgstr "" -#: ../../reference/expressions.rst:328 ../../reference/expressions.rst:954 -#: ../../reference/expressions.rst:1898 +#: ../../reference/expressions.rst:327 ../../reference/expressions.rst:956 +#: ../../reference/expressions.rst:1900 msgid ": (colon)" msgstr "" -#: ../../reference/expressions.rst:328 +#: ../../reference/expressions.rst:327 msgid "in dictionary expressions" msgstr "" -#: ../../reference/expressions.rst:328 ../../reference/expressions.rst:354 +#: ../../reference/expressions.rst:327 ../../reference/expressions.rst:353 msgid "in dictionary displays" msgstr "" -#: ../../reference/expressions.rst:354 ../../reference/expressions.rst:1087 -#: ../../reference/expressions.rst:1945 +#: ../../reference/expressions.rst:353 ../../reference/expressions.rst:1089 +#: ../../reference/expressions.rst:1947 msgid "unpacking" msgstr "" -#: ../../reference/expressions.rst:354 ../../reference/expressions.rst:1117 -#: ../../reference/expressions.rst:1225 +#: ../../reference/expressions.rst:353 ../../reference/expressions.rst:1119 +#: ../../reference/expressions.rst:1227 msgid "**" msgstr "" -#: ../../reference/expressions.rst:371 +#: ../../reference/expressions.rst:370 msgid "hashable" msgstr "" -#: ../../reference/expressions.rst:392 ../../reference/expressions.rst:447 +#: ../../reference/expressions.rst:391 ../../reference/expressions.rst:447 #: ../../reference/expressions.rst:556 msgid "generator" msgstr "" -#: ../../reference/expressions.rst:392 +#: ../../reference/expressions.rst:391 msgid "generator expression" msgstr "" -#: ../../reference/expressions.rst:447 ../../reference/expressions.rst:1205 +#: ../../reference/expressions.rst:447 ../../reference/expressions.rst:1207 msgid "keyword" msgstr "" -#: ../../reference/expressions.rst:447 ../../reference/expressions.rst:643 +#: ../../reference/expressions.rst:447 ../../reference/expressions.rst:645 msgid "yield" msgstr "" @@ -2678,8 +2682,8 @@ msgstr "" msgid "from" msgstr "" -#: ../../reference/expressions.rst:447 ../../reference/expressions.rst:1152 -#: ../../reference/expressions.rst:1166 ../../reference/expressions.rst:1898 +#: ../../reference/expressions.rst:447 ../../reference/expressions.rst:1154 +#: ../../reference/expressions.rst:1168 ../../reference/expressions.rst:1900 msgid "function" msgstr "" @@ -2695,503 +2699,503 @@ msgstr "" msgid "StopIteration" msgstr "" -#: ../../reference/expressions.rst:623 ../../reference/expressions.rst:807 +#: ../../reference/expressions.rst:623 ../../reference/expressions.rst:809 msgid "GeneratorExit" msgstr "" -#: ../../reference/expressions.rst:643 +#: ../../reference/expressions.rst:645 msgid "examples" msgstr "" -#: ../../reference/expressions.rst:742 +#: ../../reference/expressions.rst:744 msgid "asynchronous-generator" msgstr "" -#: ../../reference/expressions.rst:752 +#: ../../reference/expressions.rst:754 msgid "StopAsyncIteration" msgstr "" -#: ../../reference/expressions.rst:831 +#: ../../reference/expressions.rst:833 msgid "primary" msgstr "" -#: ../../reference/expressions.rst:845 +#: ../../reference/expressions.rst:847 msgid "attribute" msgstr "" -#: ../../reference/expressions.rst:845 +#: ../../reference/expressions.rst:847 msgid "reference" msgstr "" -#: ../../reference/expressions.rst:845 +#: ../../reference/expressions.rst:847 msgid ". (dot)" msgstr "" -#: ../../reference/expressions.rst:845 +#: ../../reference/expressions.rst:847 msgid "attribute reference" msgstr "" -#: ../../reference/expressions.rst:854 +#: ../../reference/expressions.rst:856 msgid "AttributeError" msgstr "" -#: ../../reference/expressions.rst:854 +#: ../../reference/expressions.rst:856 msgid "module" msgstr "" -#: ../../reference/expressions.rst:879 +#: ../../reference/expressions.rst:881 msgid "subscription" msgstr "" -#: ../../reference/expressions.rst:883 ../../reference/expressions.rst:960 -#: ../../reference/expressions.rst:1746 +#: ../../reference/expressions.rst:885 ../../reference/expressions.rst:962 +#: ../../reference/expressions.rst:1748 msgid "sequence" msgstr "" -#: ../../reference/expressions.rst:883 +#: ../../reference/expressions.rst:885 msgid "mapping" msgstr "" -#: ../../reference/expressions.rst:883 ../../reference/expressions.rst:940 -#: ../../reference/expressions.rst:960 +#: ../../reference/expressions.rst:885 ../../reference/expressions.rst:942 +#: ../../reference/expressions.rst:962 msgid "string" msgstr "" -#: ../../reference/expressions.rst:883 ../../reference/expressions.rst:940 +#: ../../reference/expressions.rst:885 ../../reference/expressions.rst:942 msgid "item" msgstr "" -#: ../../reference/expressions.rst:940 +#: ../../reference/expressions.rst:942 msgid "character" msgstr "" -#: ../../reference/expressions.rst:954 +#: ../../reference/expressions.rst:956 msgid "slicing" msgstr "" -#: ../../reference/expressions.rst:954 +#: ../../reference/expressions.rst:956 msgid "slice" msgstr "" -#: ../../reference/expressions.rst:986 +#: ../../reference/expressions.rst:988 msgid "start (slice object attribute)" msgstr "" -#: ../../reference/expressions.rst:986 +#: ../../reference/expressions.rst:988 msgid "stop (slice object attribute)" msgstr "" -#: ../../reference/expressions.rst:986 +#: ../../reference/expressions.rst:988 msgid "step (slice object attribute)" msgstr "" -#: ../../reference/expressions.rst:1004 +#: ../../reference/expressions.rst:1006 msgid "callable" msgstr "" -#: ../../reference/expressions.rst:1004 ../../reference/expressions.rst:1152 -#: ../../reference/expressions.rst:1166 ../../reference/expressions.rst:1180 -#: ../../reference/expressions.rst:1187 ../../reference/expressions.rst:1197 +#: ../../reference/expressions.rst:1006 ../../reference/expressions.rst:1154 +#: ../../reference/expressions.rst:1168 ../../reference/expressions.rst:1182 +#: ../../reference/expressions.rst:1189 ../../reference/expressions.rst:1199 msgid "call" msgstr "" -#: ../../reference/expressions.rst:1004 +#: ../../reference/expressions.rst:1006 msgid "argument" msgstr "" -#: ../../reference/expressions.rst:1004 ../../reference/expressions.rst:1037 +#: ../../reference/expressions.rst:1006 ../../reference/expressions.rst:1039 msgid "call semantics" msgstr "" -#: ../../reference/expressions.rst:1004 +#: ../../reference/expressions.rst:1006 msgid "argument list" msgstr "" -#: ../../reference/expressions.rst:1004 +#: ../../reference/expressions.rst:1006 msgid "= (equals)" msgstr "" -#: ../../reference/expressions.rst:1004 ../../reference/expressions.rst:1087 -#: ../../reference/expressions.rst:1117 +#: ../../reference/expressions.rst:1006 ../../reference/expressions.rst:1089 +#: ../../reference/expressions.rst:1119 msgid "in function calls" msgstr "" -#: ../../reference/expressions.rst:1037 +#: ../../reference/expressions.rst:1039 msgid "parameter" msgstr "" -#: ../../reference/expressions.rst:1087 ../../reference/expressions.rst:1322 -#: ../../reference/expressions.rst:1945 +#: ../../reference/expressions.rst:1089 ../../reference/expressions.rst:1324 +#: ../../reference/expressions.rst:1947 msgid "* (asterisk)" msgstr "" -#: ../../reference/expressions.rst:1152 +#: ../../reference/expressions.rst:1154 msgid "user-defined" msgstr "" -#: ../../reference/expressions.rst:1152 +#: ../../reference/expressions.rst:1154 msgid "user-defined function" msgstr "" -#: ../../reference/expressions.rst:1166 +#: ../../reference/expressions.rst:1168 msgid "built-in function" msgstr "" -#: ../../reference/expressions.rst:1166 +#: ../../reference/expressions.rst:1168 msgid "method" msgstr "" -#: ../../reference/expressions.rst:1166 +#: ../../reference/expressions.rst:1168 msgid "built-in method" msgstr "" -#: ../../reference/expressions.rst:1180 +#: ../../reference/expressions.rst:1182 msgid "class" msgstr "" -#: ../../reference/expressions.rst:1180 +#: ../../reference/expressions.rst:1182 msgid "class object" msgstr "" -#: ../../reference/expressions.rst:1187 +#: ../../reference/expressions.rst:1189 msgid "class instance" msgstr "" -#: ../../reference/expressions.rst:1187 ../../reference/expressions.rst:1197 +#: ../../reference/expressions.rst:1189 ../../reference/expressions.rst:1199 msgid "instance" msgstr "" -#: ../../reference/expressions.rst:1197 +#: ../../reference/expressions.rst:1199 msgid "__call__() (object method)" msgstr "" -#: ../../reference/expressions.rst:1225 +#: ../../reference/expressions.rst:1227 msgid "power" msgstr "" -#: ../../reference/expressions.rst:1225 ../../reference/expressions.rst:1261 -#: ../../reference/expressions.rst:1309 ../../reference/expressions.rst:1437 -#: ../../reference/expressions.rst:1466 ../../reference/expressions.rst:1781 +#: ../../reference/expressions.rst:1227 ../../reference/expressions.rst:1263 +#: ../../reference/expressions.rst:1311 ../../reference/expressions.rst:1439 +#: ../../reference/expressions.rst:1468 ../../reference/expressions.rst:1783 msgid "operation" msgstr "" -#: ../../reference/expressions.rst:1225 ../../reference/expressions.rst:1270 -#: ../../reference/expressions.rst:1279 ../../reference/expressions.rst:1287 -#: ../../reference/expressions.rst:1322 ../../reference/expressions.rst:1339 -#: ../../reference/expressions.rst:1351 ../../reference/expressions.rst:1369 -#: ../../reference/expressions.rst:1399 ../../reference/expressions.rst:1416 -#: ../../reference/expressions.rst:1437 ../../reference/expressions.rst:1475 -#: ../../reference/expressions.rst:1483 ../../reference/expressions.rst:1492 -#: ../../reference/expressions.rst:1507 ../../reference/expressions.rst:1746 -#: ../../reference/expressions.rst:1755 ../../reference/expressions.rst:1797 -#: ../../reference/expressions.rst:1802 ../../reference/expressions.rst:1807 -#: ../../reference/expressions.rst:1872 ../../reference/expressions.rst:1996 +#: ../../reference/expressions.rst:1227 ../../reference/expressions.rst:1272 +#: ../../reference/expressions.rst:1281 ../../reference/expressions.rst:1289 +#: ../../reference/expressions.rst:1324 ../../reference/expressions.rst:1341 +#: ../../reference/expressions.rst:1353 ../../reference/expressions.rst:1371 +#: ../../reference/expressions.rst:1401 ../../reference/expressions.rst:1418 +#: ../../reference/expressions.rst:1439 ../../reference/expressions.rst:1477 +#: ../../reference/expressions.rst:1485 ../../reference/expressions.rst:1494 +#: ../../reference/expressions.rst:1509 ../../reference/expressions.rst:1748 +#: ../../reference/expressions.rst:1757 ../../reference/expressions.rst:1799 +#: ../../reference/expressions.rst:1804 ../../reference/expressions.rst:1809 +#: ../../reference/expressions.rst:1874 ../../reference/expressions.rst:1998 msgid "operator" msgstr "" -#: ../../reference/expressions.rst:1261 +#: ../../reference/expressions.rst:1263 msgid "unary" msgstr "" -#: ../../reference/expressions.rst:1261 ../../reference/expressions.rst:1466 -#: ../../reference/expressions.rst:1475 ../../reference/expressions.rst:1483 -#: ../../reference/expressions.rst:1492 +#: ../../reference/expressions.rst:1263 ../../reference/expressions.rst:1468 +#: ../../reference/expressions.rst:1477 ../../reference/expressions.rst:1485 +#: ../../reference/expressions.rst:1494 msgid "bitwise" msgstr "" -#: ../../reference/expressions.rst:1270 +#: ../../reference/expressions.rst:1272 msgid "negation" msgstr "" -#: ../../reference/expressions.rst:1270 +#: ../../reference/expressions.rst:1272 msgid "minus" msgstr "" -#: ../../reference/expressions.rst:1270 ../../reference/expressions.rst:1416 +#: ../../reference/expressions.rst:1272 ../../reference/expressions.rst:1418 msgid "- (minus)" msgstr "" -#: ../../reference/expressions.rst:1270 ../../reference/expressions.rst:1279 +#: ../../reference/expressions.rst:1272 ../../reference/expressions.rst:1281 msgid "unary operator" msgstr "" -#: ../../reference/expressions.rst:1279 +#: ../../reference/expressions.rst:1281 msgid "plus" msgstr "" -#: ../../reference/expressions.rst:1279 ../../reference/expressions.rst:1399 +#: ../../reference/expressions.rst:1281 ../../reference/expressions.rst:1401 msgid "+ (plus)" msgstr "" -#: ../../reference/expressions.rst:1287 +#: ../../reference/expressions.rst:1289 msgid "inversion" msgstr "" -#: ../../reference/expressions.rst:1287 +#: ../../reference/expressions.rst:1289 msgid "~ (tilde)" msgstr "" -#: ../../reference/expressions.rst:1298 +#: ../../reference/expressions.rst:1300 msgid "TypeError" msgstr "" -#: ../../reference/expressions.rst:1309 ../../reference/expressions.rst:1466 +#: ../../reference/expressions.rst:1311 ../../reference/expressions.rst:1468 msgid "binary" msgstr "" -#: ../../reference/expressions.rst:1322 +#: ../../reference/expressions.rst:1324 msgid "multiplication" msgstr "" -#: ../../reference/expressions.rst:1339 +#: ../../reference/expressions.rst:1341 msgid "matrix multiplication" msgstr "" -#: ../../reference/expressions.rst:1339 +#: ../../reference/expressions.rst:1341 msgid "@ (at)" msgstr "" -#: ../../reference/expressions.rst:1351 +#: ../../reference/expressions.rst:1353 msgid "ZeroDivisionError" msgstr "" -#: ../../reference/expressions.rst:1351 +#: ../../reference/expressions.rst:1353 msgid "division" msgstr "" -#: ../../reference/expressions.rst:1351 +#: ../../reference/expressions.rst:1353 msgid "/ (slash)" msgstr "" -#: ../../reference/expressions.rst:1351 +#: ../../reference/expressions.rst:1353 msgid "//" msgstr "" -#: ../../reference/expressions.rst:1369 +#: ../../reference/expressions.rst:1371 msgid "modulo" msgstr "" -#: ../../reference/expressions.rst:1369 +#: ../../reference/expressions.rst:1371 msgid "% (percent)" msgstr "" -#: ../../reference/expressions.rst:1399 +#: ../../reference/expressions.rst:1401 msgid "addition" msgstr "" -#: ../../reference/expressions.rst:1399 ../../reference/expressions.rst:1416 +#: ../../reference/expressions.rst:1401 ../../reference/expressions.rst:1418 msgid "binary operator" msgstr "" -#: ../../reference/expressions.rst:1416 +#: ../../reference/expressions.rst:1418 msgid "subtraction" msgstr "" -#: ../../reference/expressions.rst:1437 +#: ../../reference/expressions.rst:1439 msgid "shifting" msgstr "" -#: ../../reference/expressions.rst:1437 +#: ../../reference/expressions.rst:1439 msgid "<<" msgstr "" -#: ../../reference/expressions.rst:1437 +#: ../../reference/expressions.rst:1439 msgid ">>" msgstr "" -#: ../../reference/expressions.rst:1455 +#: ../../reference/expressions.rst:1457 msgid "ValueError" msgstr "" -#: ../../reference/expressions.rst:1475 ../../reference/expressions.rst:1802 +#: ../../reference/expressions.rst:1477 ../../reference/expressions.rst:1804 msgid "and" msgstr "" -#: ../../reference/expressions.rst:1475 +#: ../../reference/expressions.rst:1477 msgid "& (ampersand)" msgstr "" -#: ../../reference/expressions.rst:1483 +#: ../../reference/expressions.rst:1485 msgid "xor" msgstr "" -#: ../../reference/expressions.rst:1483 +#: ../../reference/expressions.rst:1485 msgid "exclusive" msgstr "" -#: ../../reference/expressions.rst:1483 ../../reference/expressions.rst:1492 -#: ../../reference/expressions.rst:1807 +#: ../../reference/expressions.rst:1485 ../../reference/expressions.rst:1494 +#: ../../reference/expressions.rst:1809 msgid "or" msgstr "" -#: ../../reference/expressions.rst:1483 +#: ../../reference/expressions.rst:1485 msgid "^ (caret)" msgstr "" -#: ../../reference/expressions.rst:1492 +#: ../../reference/expressions.rst:1494 msgid "inclusive" msgstr "" -#: ../../reference/expressions.rst:1492 +#: ../../reference/expressions.rst:1494 msgid "| (vertical bar)" msgstr "" -#: ../../reference/expressions.rst:1507 +#: ../../reference/expressions.rst:1509 msgid "comparison" msgstr "" -#: ../../reference/expressions.rst:1507 +#: ../../reference/expressions.rst:1509 msgid "C" msgstr "" -#: ../../reference/expressions.rst:1507 +#: ../../reference/expressions.rst:1509 msgid "language" msgstr "" -#: ../../reference/expressions.rst:1507 +#: ../../reference/expressions.rst:1509 msgid "< (less)" msgstr "" -#: ../../reference/expressions.rst:1507 +#: ../../reference/expressions.rst:1509 msgid "> (greater)" msgstr "" -#: ../../reference/expressions.rst:1507 +#: ../../reference/expressions.rst:1509 msgid "<=" msgstr "" -#: ../../reference/expressions.rst:1507 +#: ../../reference/expressions.rst:1509 msgid ">=" msgstr "" -#: ../../reference/expressions.rst:1507 +#: ../../reference/expressions.rst:1509 msgid "==" msgstr "" -#: ../../reference/expressions.rst:1507 +#: ../../reference/expressions.rst:1509 msgid "!=" msgstr "" -#: ../../reference/expressions.rst:1531 +#: ../../reference/expressions.rst:1533 msgid "chaining" msgstr "" -#: ../../reference/expressions.rst:1531 +#: ../../reference/expressions.rst:1533 msgid "comparisons" msgstr "" -#: ../../reference/expressions.rst:1746 +#: ../../reference/expressions.rst:1748 msgid "in" msgstr "" -#: ../../reference/expressions.rst:1746 +#: ../../reference/expressions.rst:1748 msgid "not in" msgstr "" -#: ../../reference/expressions.rst:1746 +#: ../../reference/expressions.rst:1748 msgid "membership" msgstr "" -#: ../../reference/expressions.rst:1746 ../../reference/expressions.rst:1755 +#: ../../reference/expressions.rst:1748 ../../reference/expressions.rst:1757 msgid "test" msgstr "" -#: ../../reference/expressions.rst:1755 +#: ../../reference/expressions.rst:1757 msgid "is" msgstr "" -#: ../../reference/expressions.rst:1755 +#: ../../reference/expressions.rst:1757 msgid "is not" msgstr "" -#: ../../reference/expressions.rst:1755 +#: ../../reference/expressions.rst:1757 msgid "identity" msgstr "" -#: ../../reference/expressions.rst:1781 +#: ../../reference/expressions.rst:1783 msgid "Conditional" msgstr "" -#: ../../reference/expressions.rst:1781 +#: ../../reference/expressions.rst:1783 msgid "Boolean" msgstr "" -#: ../../reference/expressions.rst:1797 +#: ../../reference/expressions.rst:1799 msgid "not" msgstr "" -#: ../../reference/expressions.rst:1821 +#: ../../reference/expressions.rst:1823 msgid ":= (colon equals)" msgstr "" -#: ../../reference/expressions.rst:1821 +#: ../../reference/expressions.rst:1823 msgid "assignment expression" msgstr "" -#: ../../reference/expressions.rst:1821 +#: ../../reference/expressions.rst:1823 msgid "walrus operator" msgstr "" -#: ../../reference/expressions.rst:1821 +#: ../../reference/expressions.rst:1823 msgid "named expression" msgstr "" -#: ../../reference/expressions.rst:1821 +#: ../../reference/expressions.rst:1823 msgid "assignment" msgstr "" -#: ../../reference/expressions.rst:1872 +#: ../../reference/expressions.rst:1874 msgid "conditional" msgstr "" -#: ../../reference/expressions.rst:1872 +#: ../../reference/expressions.rst:1874 msgid "ternary" msgstr "" -#: ../../reference/expressions.rst:1872 +#: ../../reference/expressions.rst:1874 msgid "conditional expression" msgstr "" -#: ../../reference/expressions.rst:1872 +#: ../../reference/expressions.rst:1874 msgid "else" msgstr "" -#: ../../reference/expressions.rst:1898 +#: ../../reference/expressions.rst:1900 msgid "lambda" msgstr "" -#: ../../reference/expressions.rst:1898 +#: ../../reference/expressions.rst:1900 msgid "form" msgstr "" -#: ../../reference/expressions.rst:1898 +#: ../../reference/expressions.rst:1900 msgid "anonymous" msgstr "" -#: ../../reference/expressions.rst:1898 +#: ../../reference/expressions.rst:1900 msgid "lambda expression" msgstr "" -#: ../../reference/expressions.rst:1945 +#: ../../reference/expressions.rst:1947 msgid "iterable" msgstr "" -#: ../../reference/expressions.rst:1945 +#: ../../reference/expressions.rst:1947 msgid "in expression lists" msgstr "" -#: ../../reference/expressions.rst:1960 +#: ../../reference/expressions.rst:1962 msgid "trailing" msgstr "" -#: ../../reference/expressions.rst:1975 +#: ../../reference/expressions.rst:1977 msgid "evaluation" msgstr "" -#: ../../reference/expressions.rst:1975 +#: ../../reference/expressions.rst:1977 msgid "order" msgstr "" -#: ../../reference/expressions.rst:1996 +#: ../../reference/expressions.rst:1998 msgid "precedence" msgstr "" diff --git a/reference/grammar.po b/reference/grammar.po index 960fd5c0e..f43d8a9eb 100644 --- a/reference/grammar.po +++ b/reference/grammar.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-06-27 14:20+0000\n" "PO-Revision-Date: 2021-06-28 01:49+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" @@ -31,14 +31,26 @@ msgstr "" #: ../../reference/grammar.rst:11 msgid "" -"The notation is a mixture of `EBNF `_ and `PEG `_. In particular, ``&`` followed by a symbol, " -"token or parenthesized group indicates a positive lookahead (i.e., is " -"required to match but not consumed), while ``!`` indicates a negative " -"lookahead (i.e., is required *not* to match). We use the ``|`` separator to " -"mean PEG's \"ordered choice\" (written as ``/`` in traditional PEG " -"grammars). See :pep:`617` for more details on the grammar's syntax." +"The notation used here is the same as in the preceding docs, and is " +"described in the :ref:`notation ` section, except for a few extra " +"complications:" +msgstr "" + +#: ../../reference/grammar.rst:15 +msgid "" +"``&e``: a positive lookahead (that is, ``e`` is required to match but not " +"consumed)" +msgstr "" + +#: ../../reference/grammar.rst:17 +msgid "" +"``!e``: a negative lookahead (that is, ``e`` is required *not* to match)" +msgstr "" + +#: ../../reference/grammar.rst:18 +msgid "" +"``~`` (\"cut\"): commit to the current alternative and fail the rule even if " +"this fails to parse" msgstr "" #: ../../reference/grammar.rst:21 @@ -1741,7 +1753,7 @@ msgid "" " | a='except' expression ['as' NAME ] NEWLINE " "{ RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" " | a='except' NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" -" | 'except' expression 'as' a=expression {\n" +" | 'except' expression 'as' a=expression ':' block {\n" " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(\n" " a, \"cannot use except statement with %s\", " "_PyPegen_get_expr_name(a)) }\n" @@ -1753,7 +1765,7 @@ msgid "" "{ RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" " | a='except' '*' (NEWLINE | ':') { RAISE_SYNTAX_ERROR(\"expected one or " "more exception types\") }\n" -" | 'except' '*' expression 'as' a=expression {\n" +" | 'except' '*' expression 'as' a=expression ':' block {\n" " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(\n" " a, \"cannot use except* statement with %s\", " "_PyPegen_get_expr_name(a)) }\n" diff --git a/reference/import.po b/reference/import.po index fb04e9653..0dd32893e 100644 --- a/reference/import.po +++ b/reference/import.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:49+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/reference/index.po b/reference/index.po index 73c3d38fb..d02332350 100644 --- a/reference/index.po +++ b/reference/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:49+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/reference/introduction.po b/reference/introduction.po index 4ef694970..bc4153d21 100644 --- a/reference/introduction.po +++ b/reference/introduction.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:49+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -161,54 +162,174 @@ msgstr "" #: ../../reference/introduction.rst:93 msgid "" -"The descriptions of lexical analysis and syntax use a modified `Backus–Naur " -"form (BNF) `_ " -"grammar notation. This uses the following style of definition:" +"The descriptions of lexical analysis and syntax use a grammar notation that " +"is a mixture of `EBNF `_ and `PEG `_. For example:" msgstr "" -#: ../../reference/introduction.rst:101 +#: ../../reference/introduction.rst:106 msgid "" -"The first line says that a ``name`` is an ``lc_letter`` followed by a " -"sequence of zero or more ``lc_letter``\\ s and underscores. An " -"``lc_letter`` in turn is any of the single characters ``'a'`` through " -"``'z'``. (This rule is actually adhered to for the names defined in lexical " -"and grammar rules in this document.)" +"In this example, the first line says that a ``name`` is a ``letter`` " +"followed by a sequence of zero or more ``letter``\\ s, ``digit``\\ s, and " +"underscores. A ``letter`` in turn is any of the single characters ``'a'`` " +"through ``'z'`` and ``A`` through ``Z``; a ``digit`` is a single character " +"from ``0`` to ``9``." msgstr "" -#: ../../reference/introduction.rst:106 +#: ../../reference/introduction.rst:112 +msgid "" +"Each rule begins with a name (which identifies the rule that's being " +"defined) followed by a colon, ``:``. The definition to the right of the " +"colon uses the following syntax elements:" +msgstr "" + +#: ../../reference/introduction.rst:116 +msgid "" +"``name``: A name refers to another rule. Where possible, it is a link to the " +"rule's definition." +msgstr "" + +#: ../../reference/introduction.rst:119 msgid "" -"Each rule begins with a name (which is the name defined by the rule) and ``::" -"=``. A vertical bar (``|``) is used to separate alternatives; it is the " -"least binding operator in this notation. A star (``*``) means zero or more " -"repetitions of the preceding item; likewise, a plus (``+``) means one or " -"more repetitions, and a phrase enclosed in square brackets (``[ ]``) means " -"zero or one occurrences (in other words, the enclosed phrase is optional). " -"The ``*`` and ``+`` operators bind as tightly as possible; parentheses are " -"used for grouping. Literal strings are enclosed in quotes. White space is " -"only meaningful to separate tokens. Rules are normally contained on a single " -"line; rules with many alternatives may be formatted alternatively with each " -"line after the first beginning with a vertical bar." +"``TOKEN``: An uppercase name refers to a :term:`token`. For the purposes of " +"grammar definitions, tokens are the same as rules." msgstr "" -#: ../../reference/introduction.rst:120 +#: ../../reference/introduction.rst:122 msgid "" -"In lexical definitions (as the example above), two more conventions are " -"used: Two literal characters separated by three dots mean a choice of any " -"single character in the given (inclusive) range of ASCII characters. A " -"phrase between angular brackets (``<...>``) gives an informal description of " -"the symbol defined; e.g., this could be used to describe the notion of " -"'control character' if needed." +"``\"text\"``, ``'text'``: Text in single or double quotes must match " +"literally (without the quotes). The type of quote is chosen according to the " +"meaning of ``text``:" +msgstr "" + +#: ../../reference/introduction.rst:126 +msgid "``'if'``: A name in single quotes denotes a :ref:`keyword `." msgstr "" #: ../../reference/introduction.rst:127 msgid "" -"Even though the notation used is almost the same, there is a big difference " -"between the meaning of lexical and syntactic definitions: a lexical " -"definition operates on the individual characters of the input source, while " -"a syntax definition operates on the stream of tokens generated by the " -"lexical analysis. All uses of BNF in the next chapter (\"Lexical Analysis\") " -"are lexical definitions; uses in subsequent chapters are syntactic " -"definitions." +"``\"case\"``: A name in double quotes denotes a :ref:`soft-keyword `." +msgstr "" + +#: ../../reference/introduction.rst:129 +msgid "" +"``'@'``: A non-letter symbol in single quotes denotes an :py:data:`~token." +"OP` token, that is, a :ref:`delimiter ` or :ref:`operator " +"`." +msgstr "" + +#: ../../reference/introduction.rst:133 +msgid "" +"``e1 e2``: Items separated only by whitespace denote a sequence. Here, " +"``e1`` must be followed by ``e2``." +msgstr "" + +#: ../../reference/introduction.rst:135 +msgid "" +"``e1 | e2``: A vertical bar is used to separate alternatives. It denotes " +"PEG's \"ordered choice\": if ``e1`` matches, ``e2`` is not considered. In " +"traditional PEG grammars, this is written as a slash, ``/``, rather than a " +"vertical bar. See :pep:`617` for more background and details." +msgstr "" + +#: ../../reference/introduction.rst:141 +msgid "``e*``: A star means zero or more repetitions of the preceding item." +msgstr "" + +#: ../../reference/introduction.rst:142 +msgid "``e+``: Likewise, a plus means one or more repetitions." +msgstr "" + +#: ../../reference/introduction.rst:143 +msgid "" +"``[e]``: A phrase enclosed in square brackets means zero or one occurrences. " +"In other words, the enclosed phrase is optional." +msgstr "" + +#: ../../reference/introduction.rst:145 +msgid "" +"``e?``: A question mark has exactly the same meaning as square brackets: the " +"preceding item is optional." +msgstr "" + +#: ../../reference/introduction.rst:147 +msgid "``(e)``: Parentheses are used for grouping." +msgstr "" + +#: ../../reference/introduction.rst:148 +msgid "" +"``\"a\"...\"z\"``: Two literal characters separated by three dots mean a " +"choice of any single character in the given (inclusive) range of ASCII " +"characters. This notation is only used in :ref:`lexical definitions " +"`." +msgstr "" + +#: ../../reference/introduction.rst:152 +msgid "" +"``<...>``: A phrase between angular brackets gives an informal description " +"of the matched symbol (for example, ````), or an abbreviation that is defined in nearby text (for example, " +"````). This notation is only used in :ref:`lexical definitions `." +msgstr "" + +#: ../../reference/introduction.rst:158 +msgid "" +"The unary operators (``*``, ``+``, ``?``) bind as tightly as possible; the " +"vertical bar (``|``) binds most loosely." +msgstr "" + +#: ../../reference/introduction.rst:161 +msgid "White space is only meaningful to separate tokens." +msgstr "" + +#: ../../reference/introduction.rst:163 +msgid "" +"Rules are normally contained on a single line, but rules that are too long " +"may be wrapped:" +msgstr "" + +#: ../../reference/introduction.rst:172 +msgid "" +"Alternatively, rules may be formatted with the first line ending at the " +"colon, and each alternative beginning with a vertical bar on a new line. For " +"example:" +msgstr "" + +#: ../../reference/introduction.rst:187 +msgid "This does *not* mean that there is an empty first alternative." +msgstr "" + +#: ../../reference/introduction.rst:194 +msgid "Lexical and Syntactic definitions" +msgstr "" + +#: ../../reference/introduction.rst:196 +msgid "" +"There is some difference between *lexical* and *syntactic* analysis: the :" +"term:`lexical analyzer` operates on the individual characters of the input " +"source, while the *parser* (syntactic analyzer) operates on the stream of :" +"term:`tokens ` generated by the lexical analysis. However, in some " +"cases the exact boundary between the two phases is a CPython implementation " +"detail." +msgstr "" + +#: ../../reference/introduction.rst:203 +msgid "" +"The practical difference between the two is that in *lexical* definitions, " +"all whitespace is significant. The lexical analyzer :ref:`discards " +"` all whitespace that is not converted to tokens like :data:" +"`token.INDENT` or :data:`~token.NEWLINE`. *Syntactic* definitions then use " +"these tokens, rather than source characters." +msgstr "" + +#: ../../reference/introduction.rst:209 +msgid "" +"This documentation uses the same BNF grammar for both styles of definitions. " +"All uses of BNF in the next chapter (:ref:`lexical`) are lexical " +"definitions; uses in subsequent chapters are syntactic definitions." msgstr "" #: ../../reference/introduction.rst:91 @@ -227,10 +348,6 @@ msgstr "" msgid "notation" msgstr "" -#: ../../reference/introduction.rst:118 +#: ../../reference/introduction.rst:189 msgid "lexical definitions" msgstr "" - -#: ../../reference/introduction.rst:118 -msgid "ASCII" -msgstr "" diff --git a/reference/lexical_analysis.po b/reference/lexical_analysis.po index 1ed7f9b57..9dee32b03 100644 --- a/reference/lexical_analysis.po +++ b/reference/lexical_analysis.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:49+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -365,117 +366,150 @@ msgid "" msgstr "" #: ../../reference/lexical_analysis.rst:292 -msgid "Identifiers and keywords" +msgid "Names (identifiers and keywords)" msgstr "" #: ../../reference/lexical_analysis.rst:296 msgid "" -"Identifiers (also referred to as *names*) are described by the following " -"lexical definitions." +":data:`~token.NAME` tokens represent *identifiers*, *keywords*, and *soft " +"keywords*." msgstr "" #: ../../reference/lexical_analysis.rst:299 msgid "" -"The syntax of identifiers in Python is based on the Unicode standard annex " -"UAX-31, with elaboration and changes as defined below; see also :pep:`3131` " -"for further details." +"Within the ASCII range (U+0001..U+007F), the valid characters for names " +"include the uppercase and lowercase letters (``A-Z`` and ``a-z``), the " +"underscore ``_`` and, except for the first character, the digits ``0`` " +"through ``9``." msgstr "" -#: ../../reference/lexical_analysis.rst:303 +#: ../../reference/lexical_analysis.rst:304 msgid "" -"Within the ASCII range (U+0001..U+007F), the valid characters for " -"identifiers include the uppercase and lowercase letters ``A`` through ``Z``, " -"the underscore ``_`` and, except for the first character, the digits ``0`` " -"through ``9``. Python 3.0 introduced additional characters from outside the " -"ASCII range (see :pep:`3131`). For these characters, the classification " -"uses the version of the Unicode Character Database as included in the :mod:" -"`unicodedata` module." +"Names must contain at least one character, but have no upper length limit. " +"Case is significant." msgstr "" -#: ../../reference/lexical_analysis.rst:311 -msgid "Identifiers are unlimited in length. Case is significant." +#: ../../reference/lexical_analysis.rst:307 +msgid "" +"Besides ``A-Z``, ``a-z``, ``_`` and ``0-9``, names can also use \"letter-" +"like\" and \"number-like\" characters from outside the ASCII range, as " +"detailed below." msgstr "" -#: ../../reference/lexical_analysis.rst:320 -msgid "The Unicode category codes mentioned above stand for:" +#: ../../reference/lexical_analysis.rst:310 +msgid "" +"All identifiers are converted into the `normalization form`_ NFKC while " +"parsing; comparison of identifiers is based on NFKC." msgstr "" -#: ../../reference/lexical_analysis.rst:322 -msgid "*Lu* - uppercase letters" +#: ../../reference/lexical_analysis.rst:313 +msgid "" +"Formally, the first character of a normalized identifier must belong to the " +"set ``id_start``, which is the union of:" msgstr "" -#: ../../reference/lexical_analysis.rst:323 -msgid "*Ll* - lowercase letters" +#: ../../reference/lexical_analysis.rst:316 +msgid "Unicode category ```` - uppercase letters (includes ``A`` to ``Z``)" msgstr "" -#: ../../reference/lexical_analysis.rst:324 -msgid "*Lt* - titlecase letters" +#: ../../reference/lexical_analysis.rst:317 +msgid "Unicode category ```` - lowercase letters (includes ``a`` to ``z``)" msgstr "" -#: ../../reference/lexical_analysis.rst:325 -msgid "*Lm* - modifier letters" +#: ../../reference/lexical_analysis.rst:318 +msgid "Unicode category ```` - titlecase letters" msgstr "" -#: ../../reference/lexical_analysis.rst:326 -msgid "*Lo* - other letters" +#: ../../reference/lexical_analysis.rst:319 +msgid "Unicode category ```` - modifier letters" msgstr "" -#: ../../reference/lexical_analysis.rst:327 -msgid "*Nl* - letter numbers" +#: ../../reference/lexical_analysis.rst:320 +msgid "Unicode category ```` - other letters" +msgstr "" + +#: ../../reference/lexical_analysis.rst:321 +msgid "Unicode category ```` - letter numbers" msgstr "" -#: ../../reference/lexical_analysis.rst:328 -msgid "*Mn* - nonspacing marks" +#: ../../reference/lexical_analysis.rst:322 +msgid "{``\"_\"``} - the underscore" +msgstr "" + +#: ../../reference/lexical_analysis.rst:323 +msgid "" +"```` - an explicit set of characters in `PropList.txt`_ to " +"support backwards compatibility" +msgstr "" + +#: ../../reference/lexical_analysis.rst:326 +msgid "" +"The remaining characters must belong to the set ``id_continue``, which is " +"the union of:" msgstr "" #: ../../reference/lexical_analysis.rst:329 -msgid "*Mc* - spacing combining marks" +msgid "all characters in ``id_start``" msgstr "" #: ../../reference/lexical_analysis.rst:330 -msgid "*Nd* - decimal numbers" +msgid "Unicode category ```` - decimal numbers (includes ``0`` to ``9``)" msgstr "" #: ../../reference/lexical_analysis.rst:331 -msgid "*Pc* - connector punctuations" +msgid "Unicode category ```` - connector punctuations" msgstr "" #: ../../reference/lexical_analysis.rst:332 -msgid "" -"*Other_ID_Start* - explicit list of characters in `PropList.txt `_ to support backwards " -"compatibility" +msgid "Unicode category ```` - nonspacing marks" +msgstr "" + +#: ../../reference/lexical_analysis.rst:333 +msgid "Unicode category ```` - spacing combining marks" msgstr "" -#: ../../reference/lexical_analysis.rst:335 -msgid "*Other_ID_Continue* - likewise" +#: ../../reference/lexical_analysis.rst:334 +msgid "" +"```` - another explicit set of characters in `PropList." +"txt`_ to support backwards compatibility" msgstr "" #: ../../reference/lexical_analysis.rst:337 msgid "" -"All identifiers are converted into the normal form NFKC while parsing; " -"comparison of identifiers is based on NFKC." +"Unicode categories use the version of the Unicode Character Database as " +"included in the :mod:`unicodedata` module." msgstr "" #: ../../reference/lexical_analysis.rst:340 msgid "" -"A non-normative HTML file listing all valid identifier characters for " -"Unicode 16.0.0 can be found at https://www.unicode.org/Public/16.0.0/ucd/" -"DerivedCoreProperties.txt" +"These sets are based on the Unicode standard annex `UAX-31`_. See also :pep:" +"`3131` for further details." +msgstr "" + +#: ../../reference/lexical_analysis.rst:343 +msgid "" +"Even more formally, names are described by the following lexical definitions:" +msgstr "" + +#: ../../reference/lexical_analysis.rst:357 +msgid "" +"A non-normative listing of all valid identifier characters as defined by " +"Unicode is available in the `DerivedCoreProperties.txt`_ file in the Unicode " +"Character Database." msgstr "" -#: ../../reference/lexical_analysis.rst:348 +#: ../../reference/lexical_analysis.rst:371 msgid "Keywords" msgstr "" -#: ../../reference/lexical_analysis.rst:354 +#: ../../reference/lexical_analysis.rst:377 msgid "" -"The following identifiers are used as reserved words, or *keywords* of the " +"The following names are used as reserved words, or *keywords* of the " "language, and cannot be used as ordinary identifiers. They must be spelled " "exactly as written here:" msgstr "" -#: ../../reference/lexical_analysis.rst:358 +#: ../../reference/lexical_analysis.rst:381 msgid "" "False await else import pass\n" "None break except in raise\n" @@ -486,94 +520,101 @@ msgid "" "async elif if or yield" msgstr "" -#: ../../reference/lexical_analysis.rst:372 +#: ../../reference/lexical_analysis.rst:395 msgid "Soft Keywords" msgstr "" -#: ../../reference/lexical_analysis.rst:378 +#: ../../reference/lexical_analysis.rst:401 msgid "" -"Some identifiers are only reserved under specific contexts. These are known " -"as *soft keywords*. The identifiers ``match``, ``case``, ``type`` and ``_`` " -"can syntactically act as keywords in certain contexts, but this distinction " -"is done at the parser level, not when tokenizing." +"Some names are only reserved under specific contexts. These are known as " +"*soft keywords*:" msgstr "" -#: ../../reference/lexical_analysis.rst:383 +#: ../../reference/lexical_analysis.rst:404 msgid "" -"As soft keywords, their use in the grammar is possible while still " -"preserving compatibility with existing code that uses these names as " -"identifier names." +"``match``, ``case``, and ``_``, when used in the :keyword:`match` statement." +msgstr "" + +#: ../../reference/lexical_analysis.rst:405 +msgid "``type``, when used in the :keyword:`type` statement." msgstr "" -#: ../../reference/lexical_analysis.rst:387 +#: ../../reference/lexical_analysis.rst:407 msgid "" -"``match``, ``case``, and ``_`` are used in the :keyword:`match` statement. " -"``type`` is used in the :keyword:`type` statement." +"These syntactically act as keywords in their specific contexts, but this " +"distinction is done at the parser level, not when tokenizing." msgstr "" -#: ../../reference/lexical_analysis.rst:390 +#: ../../reference/lexical_analysis.rst:410 +msgid "" +"As soft keywords, their use in the grammar is possible while still " +"preserving compatibility with existing code that uses these names as " +"identifier names." +msgstr "" + +#: ../../reference/lexical_analysis.rst:414 msgid "``type`` is now a soft keyword." msgstr "" -#: ../../reference/lexical_analysis.rst:399 +#: ../../reference/lexical_analysis.rst:423 msgid "Reserved classes of identifiers" msgstr "" -#: ../../reference/lexical_analysis.rst:401 +#: ../../reference/lexical_analysis.rst:425 msgid "" "Certain classes of identifiers (besides keywords) have special meanings. " "These classes are identified by the patterns of leading and trailing " "underscore characters:" msgstr "" -#: ../../reference/lexical_analysis.rst:405 +#: ../../reference/lexical_analysis.rst:429 msgid "``_*``" msgstr "" -#: ../../reference/lexical_analysis.rst:406 +#: ../../reference/lexical_analysis.rst:430 msgid "Not imported by ``from module import *``." msgstr "" -#: ../../reference/lexical_analysis.rst:408 +#: ../../reference/lexical_analysis.rst:432 msgid "``_``" msgstr "" -#: ../../reference/lexical_analysis.rst:409 +#: ../../reference/lexical_analysis.rst:433 msgid "" "In a ``case`` pattern within a :keyword:`match` statement, ``_`` is a :ref:" "`soft keyword ` that denotes a :ref:`wildcard `." msgstr "" -#: ../../reference/lexical_analysis.rst:413 +#: ../../reference/lexical_analysis.rst:437 msgid "" "Separately, the interactive interpreter makes the result of the last " "evaluation available in the variable ``_``. (It is stored in the :mod:" "`builtins` module, alongside built-in functions like ``print``.)" msgstr "" -#: ../../reference/lexical_analysis.rst:418 +#: ../../reference/lexical_analysis.rst:442 msgid "" "Elsewhere, ``_`` is a regular identifier. It is often used to name " "\"special\" items, but it is not special to Python itself." msgstr "" -#: ../../reference/lexical_analysis.rst:423 +#: ../../reference/lexical_analysis.rst:447 msgid "" "The name ``_`` is often used in conjunction with internationalization; refer " "to the documentation for the :mod:`gettext` module for more information on " "this convention." msgstr "" -#: ../../reference/lexical_analysis.rst:427 +#: ../../reference/lexical_analysis.rst:451 msgid "It is also commonly used for unused variables." msgstr "" -#: ../../reference/lexical_analysis.rst:429 +#: ../../reference/lexical_analysis.rst:453 msgid "``__*__``" msgstr "" -#: ../../reference/lexical_analysis.rst:430 +#: ../../reference/lexical_analysis.rst:454 msgid "" "System-defined names, informally known as \"dunder\" names. These names are " "defined by the interpreter and its implementation (including the standard " @@ -583,11 +624,11 @@ msgid "" "explicitly documented use, is subject to breakage without warning." msgstr "" -#: ../../reference/lexical_analysis.rst:437 +#: ../../reference/lexical_analysis.rst:461 msgid "``__*``" msgstr "" -#: ../../reference/lexical_analysis.rst:438 +#: ../../reference/lexical_analysis.rst:462 msgid "" "Class-private names. Names in this category, when used within the context " "of a class definition, are re-written to use a mangled form to help avoid " @@ -595,23 +636,23 @@ msgid "" "section :ref:`atom-identifiers`." msgstr "" -#: ../../reference/lexical_analysis.rst:447 +#: ../../reference/lexical_analysis.rst:471 msgid "Literals" msgstr "" -#: ../../reference/lexical_analysis.rst:451 +#: ../../reference/lexical_analysis.rst:475 msgid "Literals are notations for constant values of some built-in types." msgstr "" -#: ../../reference/lexical_analysis.rst:462 +#: ../../reference/lexical_analysis.rst:486 msgid "String and Bytes literals" msgstr "" -#: ../../reference/lexical_analysis.rst:464 +#: ../../reference/lexical_analysis.rst:488 msgid "String literals are described by the following lexical definitions:" msgstr "" -#: ../../reference/lexical_analysis.rst:489 +#: ../../reference/lexical_analysis.rst:514 msgid "" "One syntactic restriction not indicated by these productions is that " "whitespace is not allowed between the :token:`~python-grammar:stringprefix` " @@ -621,7 +662,7 @@ msgid "" "`encodings`." msgstr "" -#: ../../reference/lexical_analysis.rst:499 +#: ../../reference/lexical_analysis.rst:524 msgid "" "In plain English: Both types of literals can be enclosed in matching single " "quotes (``'``) or double quotes (``\"``). They can also be enclosed in " @@ -634,7 +675,7 @@ msgid "" "sequences>` below for examples." msgstr "" -#: ../../reference/lexical_analysis.rst:512 +#: ../../reference/lexical_analysis.rst:537 msgid "" "Bytes literals are always prefixed with ``'b'`` or ``'B'``; they produce an " "instance of the :class:`bytes` type instead of the :class:`str` type. They " @@ -642,7 +683,7 @@ msgid "" "greater must be expressed with escapes." msgstr "" -#: ../../reference/lexical_analysis.rst:521 +#: ../../reference/lexical_analysis.rst:546 msgid "" "Both string and bytes literals may optionally be prefixed with a letter " "``'r'`` or ``'R'``; such constructs are called :dfn:`raw string literals` " @@ -651,20 +692,20 @@ msgid "" "escapes are not treated specially." msgstr "" -#: ../../reference/lexical_analysis.rst:527 +#: ../../reference/lexical_analysis.rst:552 msgid "" "The ``'rb'`` prefix of raw bytes literals has been added as a synonym of " "``'br'``." msgstr "" -#: ../../reference/lexical_analysis.rst:531 +#: ../../reference/lexical_analysis.rst:556 msgid "" "Support for the unicode legacy literal (``u'value'``) was reintroduced to " "simplify the maintenance of dual Python 2.x and 3.x codebases. See :pep:" "`414` for more information." msgstr "" -#: ../../reference/lexical_analysis.rst:539 +#: ../../reference/lexical_analysis.rst:564 msgid "" "A string literal with ``'f'`` or ``'F'`` in its prefix is a :dfn:`formatted " "string literal`; see :ref:`f-strings`. The ``'f'`` may be combined with " @@ -672,7 +713,7 @@ msgid "" "are possible, but formatted bytes literals are not." msgstr "" -#: ../../reference/lexical_analysis.rst:544 +#: ../../reference/lexical_analysis.rst:569 msgid "" "In triple-quoted literals, unescaped newlines and quotes are allowed (and " "are retained), except that three unescaped quotes in a row terminate the " @@ -680,253 +721,253 @@ msgid "" "either ``'`` or ``\"``.)" msgstr "" -#: ../../reference/lexical_analysis.rst:567 +#: ../../reference/lexical_analysis.rst:592 msgid "Escape sequences" msgstr "" -#: ../../reference/lexical_analysis.rst:569 +#: ../../reference/lexical_analysis.rst:594 msgid "" "Unless an ``'r'`` or ``'R'`` prefix is present, escape sequences in string " "and bytes literals are interpreted according to rules similar to those used " "by Standard C. The recognized escape sequences are:" msgstr "" -#: ../../reference/lexical_analysis.rst:574 -#: ../../reference/lexical_analysis.rst:607 +#: ../../reference/lexical_analysis.rst:599 +#: ../../reference/lexical_analysis.rst:632 msgid "Escape Sequence" msgstr "" -#: ../../reference/lexical_analysis.rst:574 -#: ../../reference/lexical_analysis.rst:607 +#: ../../reference/lexical_analysis.rst:599 +#: ../../reference/lexical_analysis.rst:632 msgid "Meaning" msgstr "" -#: ../../reference/lexical_analysis.rst:574 -#: ../../reference/lexical_analysis.rst:607 +#: ../../reference/lexical_analysis.rst:599 +#: ../../reference/lexical_analysis.rst:632 msgid "Notes" msgstr "" -#: ../../reference/lexical_analysis.rst:576 +#: ../../reference/lexical_analysis.rst:601 msgid "``\\``\\ " msgstr "" -#: ../../reference/lexical_analysis.rst:576 +#: ../../reference/lexical_analysis.rst:601 msgid "Backslash and newline ignored" msgstr "" -#: ../../reference/lexical_analysis.rst:576 +#: ../../reference/lexical_analysis.rst:601 msgid "\\(1)" msgstr "" -#: ../../reference/lexical_analysis.rst:578 +#: ../../reference/lexical_analysis.rst:603 msgid "``\\\\``" msgstr "" -#: ../../reference/lexical_analysis.rst:578 +#: ../../reference/lexical_analysis.rst:603 msgid "Backslash (``\\``)" msgstr "" -#: ../../reference/lexical_analysis.rst:580 +#: ../../reference/lexical_analysis.rst:605 msgid "``\\'``" msgstr "" -#: ../../reference/lexical_analysis.rst:580 +#: ../../reference/lexical_analysis.rst:605 msgid "Single quote (``'``)" msgstr "" -#: ../../reference/lexical_analysis.rst:582 +#: ../../reference/lexical_analysis.rst:607 msgid "``\\\"``" msgstr "" -#: ../../reference/lexical_analysis.rst:582 +#: ../../reference/lexical_analysis.rst:607 msgid "Double quote (``\"``)" msgstr "" -#: ../../reference/lexical_analysis.rst:584 +#: ../../reference/lexical_analysis.rst:609 msgid "``\\a``" msgstr "" -#: ../../reference/lexical_analysis.rst:584 +#: ../../reference/lexical_analysis.rst:609 msgid "ASCII Bell (BEL)" msgstr "" -#: ../../reference/lexical_analysis.rst:586 +#: ../../reference/lexical_analysis.rst:611 msgid "``\\b``" msgstr "" -#: ../../reference/lexical_analysis.rst:586 +#: ../../reference/lexical_analysis.rst:611 msgid "ASCII Backspace (BS)" msgstr "" -#: ../../reference/lexical_analysis.rst:588 +#: ../../reference/lexical_analysis.rst:613 msgid "``\\f``" msgstr "" -#: ../../reference/lexical_analysis.rst:588 +#: ../../reference/lexical_analysis.rst:613 msgid "ASCII Formfeed (FF)" msgstr "" -#: ../../reference/lexical_analysis.rst:590 +#: ../../reference/lexical_analysis.rst:615 msgid "``\\n``" msgstr "" -#: ../../reference/lexical_analysis.rst:590 +#: ../../reference/lexical_analysis.rst:615 msgid "ASCII Linefeed (LF)" msgstr "" -#: ../../reference/lexical_analysis.rst:592 +#: ../../reference/lexical_analysis.rst:617 msgid "``\\r``" msgstr "" -#: ../../reference/lexical_analysis.rst:592 +#: ../../reference/lexical_analysis.rst:617 msgid "ASCII Carriage Return (CR)" msgstr "" -#: ../../reference/lexical_analysis.rst:594 +#: ../../reference/lexical_analysis.rst:619 msgid "``\\t``" msgstr "" -#: ../../reference/lexical_analysis.rst:594 +#: ../../reference/lexical_analysis.rst:619 msgid "ASCII Horizontal Tab (TAB)" msgstr "" -#: ../../reference/lexical_analysis.rst:596 +#: ../../reference/lexical_analysis.rst:621 msgid "``\\v``" msgstr "" -#: ../../reference/lexical_analysis.rst:596 +#: ../../reference/lexical_analysis.rst:621 msgid "ASCII Vertical Tab (VT)" msgstr "" -#: ../../reference/lexical_analysis.rst:598 +#: ../../reference/lexical_analysis.rst:623 msgid ":samp:`\\\\\\\\{ooo}`" msgstr "" -#: ../../reference/lexical_analysis.rst:598 +#: ../../reference/lexical_analysis.rst:623 msgid "Character with octal value *ooo*" msgstr "" -#: ../../reference/lexical_analysis.rst:598 +#: ../../reference/lexical_analysis.rst:623 msgid "(2,4)" msgstr "" -#: ../../reference/lexical_analysis.rst:601 +#: ../../reference/lexical_analysis.rst:626 msgid ":samp:`\\\\x{hh}`" msgstr "" -#: ../../reference/lexical_analysis.rst:601 +#: ../../reference/lexical_analysis.rst:626 msgid "Character with hex value *hh*" msgstr "" -#: ../../reference/lexical_analysis.rst:601 +#: ../../reference/lexical_analysis.rst:626 msgid "(3,4)" msgstr "" -#: ../../reference/lexical_analysis.rst:604 +#: ../../reference/lexical_analysis.rst:629 msgid "Escape sequences only recognized in string literals are:" msgstr "" -#: ../../reference/lexical_analysis.rst:609 +#: ../../reference/lexical_analysis.rst:634 msgid ":samp:`\\\\N\\\\{{name}\\\\}`" msgstr "" -#: ../../reference/lexical_analysis.rst:609 +#: ../../reference/lexical_analysis.rst:634 msgid "Character named *name* in the Unicode database" msgstr "" -#: ../../reference/lexical_analysis.rst:609 +#: ../../reference/lexical_analysis.rst:634 msgid "\\(5)" msgstr "" -#: ../../reference/lexical_analysis.rst:612 +#: ../../reference/lexical_analysis.rst:637 msgid ":samp:`\\\\u{xxxx}`" msgstr "" -#: ../../reference/lexical_analysis.rst:612 +#: ../../reference/lexical_analysis.rst:637 msgid "Character with 16-bit hex value *xxxx*" msgstr "" -#: ../../reference/lexical_analysis.rst:612 +#: ../../reference/lexical_analysis.rst:637 msgid "\\(6)" msgstr "" -#: ../../reference/lexical_analysis.rst:615 +#: ../../reference/lexical_analysis.rst:640 msgid ":samp:`\\\\U{xxxxxxxx}`" msgstr "" -#: ../../reference/lexical_analysis.rst:615 +#: ../../reference/lexical_analysis.rst:640 msgid "Character with 32-bit hex value *xxxxxxxx*" msgstr "" -#: ../../reference/lexical_analysis.rst:615 +#: ../../reference/lexical_analysis.rst:640 msgid "\\(7)" msgstr "" -#: ../../reference/lexical_analysis.rst:619 +#: ../../reference/lexical_analysis.rst:644 msgid "Notes:" msgstr "" -#: ../../reference/lexical_analysis.rst:622 +#: ../../reference/lexical_analysis.rst:647 msgid "A backslash can be added at the end of a line to ignore the newline::" msgstr "" -#: ../../reference/lexical_analysis.rst:624 +#: ../../reference/lexical_analysis.rst:649 msgid "" ">>> 'This string will not include \\\n" "... backslashes or newline characters.'\n" "'This string will not include backslashes or newline characters.'" msgstr "" -#: ../../reference/lexical_analysis.rst:628 +#: ../../reference/lexical_analysis.rst:653 msgid "" "The same result can be achieved using :ref:`triple-quoted strings " "`, or parentheses and :ref:`string literal concatenation `." msgstr "" -#: ../../reference/lexical_analysis.rst:633 +#: ../../reference/lexical_analysis.rst:658 msgid "As in Standard C, up to three octal digits are accepted." msgstr "" -#: ../../reference/lexical_analysis.rst:635 +#: ../../reference/lexical_analysis.rst:660 msgid "" "Octal escapes with value larger than ``0o377`` produce a :exc:" "`DeprecationWarning`." msgstr "" -#: ../../reference/lexical_analysis.rst:639 +#: ../../reference/lexical_analysis.rst:664 msgid "" "Octal escapes with value larger than ``0o377`` produce a :exc:" "`SyntaxWarning`. In a future Python version they will be eventually a :exc:" "`SyntaxError`." msgstr "" -#: ../../reference/lexical_analysis.rst:645 +#: ../../reference/lexical_analysis.rst:670 msgid "Unlike in Standard C, exactly two hex digits are required." msgstr "" -#: ../../reference/lexical_analysis.rst:648 +#: ../../reference/lexical_analysis.rst:673 msgid "" "In a bytes literal, hexadecimal and octal escapes denote the byte with the " "given value. In a string literal, these escapes denote a Unicode character " "with the given value." msgstr "" -#: ../../reference/lexical_analysis.rst:653 +#: ../../reference/lexical_analysis.rst:678 msgid "Support for name aliases [#]_ has been added." msgstr "" -#: ../../reference/lexical_analysis.rst:657 +#: ../../reference/lexical_analysis.rst:682 msgid "Exactly four hex digits are required." msgstr "" -#: ../../reference/lexical_analysis.rst:660 +#: ../../reference/lexical_analysis.rst:685 msgid "" "Any Unicode character can be encoded this way. Exactly eight hex digits are " "required." msgstr "" -#: ../../reference/lexical_analysis.rst:666 +#: ../../reference/lexical_analysis.rst:691 msgid "" "Unlike Standard C, all unrecognized escape sequences are left in the string " "unchanged, i.e., *the backslash is left in the result*. (This behavior is " @@ -936,17 +977,17 @@ msgid "" "category of unrecognized escapes for bytes literals." msgstr "" -#: ../../reference/lexical_analysis.rst:673 +#: ../../reference/lexical_analysis.rst:698 msgid "Unrecognized escape sequences produce a :exc:`DeprecationWarning`." msgstr "" -#: ../../reference/lexical_analysis.rst:676 +#: ../../reference/lexical_analysis.rst:701 msgid "" "Unrecognized escape sequences produce a :exc:`SyntaxWarning`. In a future " "Python version they will be eventually a :exc:`SyntaxError`." msgstr "" -#: ../../reference/lexical_analysis.rst:680 +#: ../../reference/lexical_analysis.rst:705 msgid "" "Even in a raw literal, quotes can be escaped with a backslash, but the " "backslash remains in the result; for example, ``r\"\\\"\"`` is a valid " @@ -959,11 +1000,11 @@ msgid "" "continuation." msgstr "" -#: ../../reference/lexical_analysis.rst:693 +#: ../../reference/lexical_analysis.rst:718 msgid "String literal concatenation" msgstr "" -#: ../../reference/lexical_analysis.rst:695 +#: ../../reference/lexical_analysis.rst:720 msgid "" "Multiple adjacent string or bytes literals (delimited by whitespace), " "possibly using different quoting conventions, are allowed, and their meaning " @@ -973,14 +1014,14 @@ msgid "" "lines, or even to add comments to parts of strings, for example::" msgstr "" -#: ../../reference/lexical_analysis.rst:702 +#: ../../reference/lexical_analysis.rst:727 msgid "" "re.compile(\"[A-Za-z_]\" # letter or underscore\n" " \"[A-Za-z0-9_]*\" # letter, digit or underscore\n" " )" msgstr "" -#: ../../reference/lexical_analysis.rst:706 +#: ../../reference/lexical_analysis.rst:731 msgid "" "Note that this feature is defined at the syntactical level, but implemented " "at compile time. The '+' operator must be used to concatenate string " @@ -990,11 +1031,11 @@ msgid "" "with plain string literals." msgstr "" -#: ../../reference/lexical_analysis.rst:729 +#: ../../reference/lexical_analysis.rst:754 msgid "f-strings" msgstr "" -#: ../../reference/lexical_analysis.rst:733 +#: ../../reference/lexical_analysis.rst:758 msgid "" "A :dfn:`formatted string literal` or :dfn:`f-string` is a string literal " "that is prefixed with ``'f'`` or ``'F'``. These strings may contain " @@ -1003,14 +1044,14 @@ msgid "" "are really expressions evaluated at run time." msgstr "" -#: ../../reference/lexical_analysis.rst:739 +#: ../../reference/lexical_analysis.rst:764 msgid "" "Escape sequences are decoded like in ordinary string literals (except when a " "literal is also marked as a raw string). After decoding, the grammar for " "the contents of the string is:" msgstr "" -#: ../../reference/lexical_analysis.rst:753 +#: ../../reference/lexical_analysis.rst:778 msgid "" "The parts of the string outside curly braces are treated literally, except " "that any doubled curly braces ``'{{'`` or ``'}}'`` are replaced with the " @@ -1023,7 +1064,7 @@ msgid "" "replacement field ends with a closing curly bracket ``'}'``." msgstr "" -#: ../../reference/lexical_analysis.rst:763 +#: ../../reference/lexical_analysis.rst:788 msgid "" "Expressions in formatted string literals are treated like regular Python " "expressions surrounded by parentheses, with a few exceptions. An empty " @@ -1037,27 +1078,27 @@ msgid "" "replacement fields must be closed in a different line." msgstr "" -#: ../../reference/lexical_analysis.rst:774 +#: ../../reference/lexical_analysis.rst:799 msgid "" ">>> f\"abc{a # This is a comment }\"\n" "... + 3}\"\n" "'abc5'" msgstr "" -#: ../../reference/lexical_analysis.rst:780 +#: ../../reference/lexical_analysis.rst:805 msgid "" "Prior to Python 3.7, an :keyword:`await` expression and comprehensions " "containing an :keyword:`async for` clause were illegal in the expressions in " "formatted string literals due to a problem with the implementation." msgstr "" -#: ../../reference/lexical_analysis.rst:785 +#: ../../reference/lexical_analysis.rst:810 msgid "" "Prior to Python 3.12, comments were not allowed inside f-string replacement " "fields." msgstr "" -#: ../../reference/lexical_analysis.rst:789 +#: ../../reference/lexical_analysis.rst:814 msgid "" "When the equal sign ``'='`` is provided, the output will have the expression " "text, the ``'='`` and the evaluated value. Spaces after the opening brace " @@ -1068,18 +1109,18 @@ msgid "" "r'`` is declared." msgstr "" -#: ../../reference/lexical_analysis.rst:797 +#: ../../reference/lexical_analysis.rst:822 msgid "The equal sign ``'='``." msgstr "" -#: ../../reference/lexical_analysis.rst:800 +#: ../../reference/lexical_analysis.rst:825 msgid "" "If a conversion is specified, the result of evaluating the expression is " "converted before formatting. Conversion ``'!s'`` calls :func:`str` on the " "result, ``'!r'`` calls :func:`repr`, and ``'!a'`` calls :func:`ascii`." msgstr "" -#: ../../reference/lexical_analysis.rst:804 +#: ../../reference/lexical_analysis.rst:829 msgid "" "The result is then formatted using the :func:`format` protocol. The format " "specifier is passed to the :meth:`~object.__format__` method of the " @@ -1088,7 +1129,7 @@ msgid "" "value of the whole string." msgstr "" -#: ../../reference/lexical_analysis.rst:810 +#: ../../reference/lexical_analysis.rst:835 msgid "" "Top-level format specifiers may include nested replacement fields. These " "nested fields may include their own conversion fields and :ref:`format " @@ -1097,17 +1138,17 @@ msgid "" "as that used by the :meth:`str.format` method." msgstr "" -#: ../../reference/lexical_analysis.rst:816 +#: ../../reference/lexical_analysis.rst:841 msgid "" "Formatted string literals may be concatenated, but replacement fields cannot " "be split across literals." msgstr "" -#: ../../reference/lexical_analysis.rst:819 +#: ../../reference/lexical_analysis.rst:844 msgid "Some examples of formatted string literals::" msgstr "" -#: ../../reference/lexical_analysis.rst:821 +#: ../../reference/lexical_analysis.rst:846 msgid "" ">>> name = \"Fred\"\n" ">>> f\"He said his name is {name!r}.\"\n" @@ -1139,32 +1180,32 @@ msgid "" "'line = \"The mill\\'s closed\" '" msgstr "" -#: ../../reference/lexical_analysis.rst:851 +#: ../../reference/lexical_analysis.rst:876 msgid "" "Reusing the outer f-string quoting type inside a replacement field is " "permitted::" msgstr "" -#: ../../reference/lexical_analysis.rst:854 +#: ../../reference/lexical_analysis.rst:879 msgid "" ">>> a = dict(x=2)\n" ">>> f\"abc {a[\"x\"]} def\"\n" "'abc 2 def'" msgstr "" -#: ../../reference/lexical_analysis.rst:858 +#: ../../reference/lexical_analysis.rst:883 msgid "" "Prior to Python 3.12, reuse of the same quoting type of the outer f-string " "inside a replacement field was not possible." msgstr "" -#: ../../reference/lexical_analysis.rst:862 +#: ../../reference/lexical_analysis.rst:887 msgid "" "Backslashes are also allowed in replacement fields and are evaluated the " "same way as in any other context::" msgstr "" -#: ../../reference/lexical_analysis.rst:865 +#: ../../reference/lexical_analysis.rst:890 msgid "" ">>> a = [\"a\", \"b\", \"c\"]\n" ">>> print(f\"List a contains:\\n{\"\\n\".join(a)}\")\n" @@ -1174,19 +1215,19 @@ msgid "" "c" msgstr "" -#: ../../reference/lexical_analysis.rst:872 +#: ../../reference/lexical_analysis.rst:897 msgid "" "Prior to Python 3.12, backslashes were not permitted inside an f-string " "replacement field." msgstr "" -#: ../../reference/lexical_analysis.rst:876 +#: ../../reference/lexical_analysis.rst:901 msgid "" "Formatted string literals cannot be used as docstrings, even if they do not " "include expressions." msgstr "" -#: ../../reference/lexical_analysis.rst:881 +#: ../../reference/lexical_analysis.rst:906 msgid "" ">>> def foo():\n" "... f\"Not a docstring\"\n" @@ -1195,145 +1236,316 @@ msgid "" "True" msgstr "" -#: ../../reference/lexical_analysis.rst:887 +#: ../../reference/lexical_analysis.rst:912 msgid "" "See also :pep:`498` for the proposal that added formatted string literals, " "and :meth:`str.format`, which uses a related format string mechanism." msgstr "" -#: ../../reference/lexical_analysis.rst:894 +#: ../../reference/lexical_analysis.rst:919 msgid "Numeric literals" msgstr "" -#: ../../reference/lexical_analysis.rst:900 +#: ../../reference/lexical_analysis.rst:925 msgid "" -"There are three types of numeric literals: integers, floating-point numbers, " -"and imaginary numbers. There are no complex literals (complex numbers can " -"be formed by adding a real number and an imaginary number)." +":data:`~token.NUMBER` tokens represent numeric literals, of which there are " +"three types: integers, floating-point numbers, and imaginary numbers." msgstr "" -#: ../../reference/lexical_analysis.rst:904 +#: ../../reference/lexical_analysis.rst:933 msgid "" -"Note that numeric literals do not include a sign; a phrase like ``-1`` is " -"actually an expression composed of the unary operator '``-``' and the " -"literal ``1``." +"The numeric value of a numeric literal is the same as if it were passed as a " +"string to the :class:`int`, :class:`float` or :class:`complex` class " +"constructor, respectively. Note that not all valid inputs for those " +"constructors are also valid literals." msgstr "" -#: ../../reference/lexical_analysis.rst:918 +#: ../../reference/lexical_analysis.rst:938 +msgid "" +"Numeric literals do not include a sign; a phrase like ``-1`` is actually an " +"expression composed of the unary operator '``-``' and the literal ``1``." +msgstr "" + +#: ../../reference/lexical_analysis.rst:952 msgid "Integer literals" msgstr "" -#: ../../reference/lexical_analysis.rst:920 -msgid "Integer literals are described by the following lexical definitions:" +#: ../../reference/lexical_analysis.rst:954 +msgid "Integer literals denote whole numbers. For example::" +msgstr "" + +#: ../../reference/lexical_analysis.rst:956 +msgid "" +"7\n" +"3\n" +"2147483647" msgstr "" -#: ../../reference/lexical_analysis.rst:934 +#: ../../reference/lexical_analysis.rst:960 msgid "" "There is no limit for the length of integer literals apart from what can be " -"stored in available memory." +"stored in available memory::" +msgstr "" + +#: ../../reference/lexical_analysis.rst:963 +msgid "7922816251426433759354395033679228162514264337593543950336" +msgstr "" + +#: ../../reference/lexical_analysis.rst:965 +msgid "" +"Underscores can be used to group digits for enhanced readability, and are " +"ignored for determining the numeric value of the literal. For example, the " +"following literals are equivalent::" +msgstr "" + +#: ../../reference/lexical_analysis.rst:969 +msgid "" +"100_000_000_000\n" +"100000000000\n" +"1_00_00_00_00_000" +msgstr "" + +#: ../../reference/lexical_analysis.rst:973 +msgid "" +"Underscores can only occur between digits. For example, ``_123``, ``321_``, " +"and ``123__321`` are *not* valid literals." +msgstr "" + +#: ../../reference/lexical_analysis.rst:976 +msgid "" +"Integers can be specified in binary (base 2), octal (base 8), or hexadecimal " +"(base 16) using the prefixes ``0b``, ``0o`` and ``0x``, respectively. " +"Hexadecimal digits 10 through 15 are represented by letters ``A``-``F``, " +"case-insensitive. For example::" msgstr "" -#: ../../reference/lexical_analysis.rst:937 +#: ../../reference/lexical_analysis.rst:981 msgid "" -"Underscores are ignored for determining the numeric value of the literal. " -"They can be used to group digits for enhanced readability. One underscore " -"can occur between digits, and after base specifiers like ``0x``." +"0b100110111\n" +"0b_1110_0101\n" +"0o177\n" +"0o377\n" +"0xdeadbeef\n" +"0xDead_Beef" msgstr "" -#: ../../reference/lexical_analysis.rst:941 +#: ../../reference/lexical_analysis.rst:988 msgid "" -"Note that leading zeros in a non-zero decimal number are not allowed. This " -"is for disambiguation with C-style octal literals, which Python used before " -"version 3.0." +"An underscore can follow the base specifier. For example, ``0x_1f`` is a " +"valid literal, but ``0_x1f`` and ``0x__1f`` are not." msgstr "" -#: ../../reference/lexical_analysis.rst:945 -msgid "Some examples of integer literals::" +#: ../../reference/lexical_analysis.rst:992 +msgid "" +"Leading zeros in a non-zero decimal number are not allowed. For example, " +"``0123`` is not a valid literal. This is for disambiguation with C-style " +"octal literals, which Python used before version 3.0." msgstr "" -#: ../../reference/lexical_analysis.rst:947 +#: ../../reference/lexical_analysis.rst:997 msgid "" -"7 2147483647 0o177 0b100110111\n" -"3 79228162514264337593543950336 0o377 0xdeadbeef\n" -" 100_000_000_000 0b_1110_0101" +"Formally, integer literals are described by the following lexical " +"definitions:" msgstr "" -#: ../../reference/lexical_analysis.rst:951 -#: ../../reference/lexical_analysis.rst:983 +#: ../../reference/lexical_analysis.rst:1014 +#: ../../reference/lexical_analysis.rst:1078 msgid "Underscores are now allowed for grouping purposes in literals." msgstr "" -#: ../../reference/lexical_analysis.rst:962 +#: ../../reference/lexical_analysis.rst:1025 msgid "Floating-point literals" msgstr "" -#: ../../reference/lexical_analysis.rst:964 +#: ../../reference/lexical_analysis.rst:1027 msgid "" -"Floating-point literals are described by the following lexical definitions:" +"Floating-point (float) literals, such as ``3.14`` or ``1.5``, denote :ref:" +"`approximations of real numbers `." msgstr "" -#: ../../reference/lexical_analysis.rst:974 +#: ../../reference/lexical_analysis.rst:1030 msgid "" -"Note that the integer and exponent parts are always interpreted using radix " -"10. For example, ``077e010`` is legal, and denotes the same number as " -"``77e10``. The allowed range of floating-point literals is implementation-" -"dependent. As in integer literals, underscores are supported for digit " -"grouping." +"They consist of *integer* and *fraction* parts, each composed of decimal " +"digits. The parts are separated by a decimal point, ``.``::" msgstr "" -#: ../../reference/lexical_analysis.rst:979 -msgid "Some examples of floating-point literals::" +#: ../../reference/lexical_analysis.rst:1033 +msgid "" +"2.71828\n" +"4.0" msgstr "" -#: ../../reference/lexical_analysis.rst:981 -msgid "3.14 10. .001 1e100 3.14e-10 0e0 3.14_15_93" +#: ../../reference/lexical_analysis.rst:1036 +msgid "" +"Unlike in integer literals, leading zeros are allowed in the numeric parts. " +"For example, ``077.010`` is legal, and denotes the same number as ``77.10``." msgstr "" -#: ../../reference/lexical_analysis.rst:992 +#: ../../reference/lexical_analysis.rst:1039 +msgid "" +"As in integer literals, single underscores may occur between digits to help " +"readability::" +msgstr "" + +#: ../../reference/lexical_analysis.rst:1042 +msgid "" +"96_485.332_123\n" +"3.14_15_93" +msgstr "" + +#: ../../reference/lexical_analysis.rst:1045 +msgid "Either of these parts, but not both, can be empty. For example::" +msgstr "" + +#: ../../reference/lexical_analysis.rst:1047 +msgid "" +"10. # (equivalent to 10.0)\n" +".001 # (equivalent to 0.001)" +msgstr "" + +#: ../../reference/lexical_analysis.rst:1050 +msgid "" +"Optionally, the integer and fraction may be followed by an *exponent*: the " +"letter ``e`` or ``E``, followed by an optional sign, ``+`` or ``-``, and a " +"number in the same format as the integer and fraction parts. The ``e`` or " +"``E`` represents \"times ten raised to the power of\"::" +msgstr "" + +#: ../../reference/lexical_analysis.rst:1055 +msgid "" +"1.0e3 # (represents 1.0×10³, or 1000.0)\n" +"1.166e-5 # (represents 1.166×10⁻⁵, or 0.00001166)\n" +"6.02214076e+23 # (represents 6.02214076×10²³, or 602214076000000000000000.)" +msgstr "" + +#: ../../reference/lexical_analysis.rst:1059 +msgid "" +"In floats with only integer and exponent parts, the decimal point may be " +"omitted::" +msgstr "" + +#: ../../reference/lexical_analysis.rst:1062 +msgid "" +"1e3 # (equivalent to 1.e3 and 1.0e3)\n" +"0e0 # (equivalent to 0.)" +msgstr "" + +#: ../../reference/lexical_analysis.rst:1065 +msgid "" +"Formally, floating-point literals are described by the following lexical " +"definitions:" +msgstr "" + +#: ../../reference/lexical_analysis.rst:1087 msgid "Imaginary literals" msgstr "" -#: ../../reference/lexical_analysis.rst:994 -msgid "Imaginary literals are described by the following lexical definitions:" +#: ../../reference/lexical_analysis.rst:1089 +msgid "" +"Python has :ref:`complex number ` objects, but no complex " +"literals. Instead, *imaginary literals* denote complex numbers with a zero " +"real part." msgstr "" -#: ../../reference/lexical_analysis.rst:999 +#: ../../reference/lexical_analysis.rst:1094 msgid "" -"An imaginary literal yields a complex number with a real part of 0.0. " -"Complex numbers are represented as a pair of floating-point numbers and have " -"the same restrictions on their range. To create a complex number with a " -"nonzero real part, add a floating-point number to it, e.g., ``(3+4j)``. " -"Some examples of imaginary literals::" +"For example, in math, the complex number 3+4.2\\ *i* is written as the real " +"number 3 added to the imaginary number 4.2\\ *i*. Python uses a similar " +"syntax, except the imaginary unit is written as ``j`` rather than *i*::" +msgstr "" + +#: ../../reference/lexical_analysis.rst:1099 +msgid "3+4.2j" msgstr "" -#: ../../reference/lexical_analysis.rst:1005 -msgid "3.14j 10.j 10j .001j 1e100j 3.14e-10j 3.14_15_93j" +#: ../../reference/lexical_analysis.rst:1101 +msgid "" +"This is an expression composed of the :ref:`integer literal ` " +"``3``, the :ref:`operator ` '``+``', and the :ref:`imaginary " +"literal ` ``4.2j``. Since these are three separate tokens, " +"whitespace is allowed between them::" +msgstr "" + +#: ../../reference/lexical_analysis.rst:1107 +msgid "3 + 4.2j" +msgstr "" + +#: ../../reference/lexical_analysis.rst:1109 +msgid "" +"No whitespace is allowed *within* each token. In particular, the ``j`` " +"suffix, may not be separated from the number before it." +msgstr "" + +#: ../../reference/lexical_analysis.rst:1113 +msgid "" +"The number before the ``j`` has the same syntax as a floating-point literal. " +"Thus, the following are valid imaginary literals::" +msgstr "" + +#: ../../reference/lexical_analysis.rst:1116 +msgid "" +"4.2j\n" +"3.14j\n" +"10.j\n" +".001j\n" +"1e100j\n" +"3.14e-10j\n" +"3.14_15_93j" msgstr "" -#: ../../reference/lexical_analysis.rst:1011 +#: ../../reference/lexical_analysis.rst:1124 +msgid "" +"Unlike in a floating-point literal the decimal point can be omitted if the " +"imaginary number only has an integer part. The number is still evaluated as " +"a floating-point number, not an integer::" +msgstr "" + +#: ../../reference/lexical_analysis.rst:1128 +msgid "" +"10j\n" +"0j\n" +"1000000000000000000000000j # equivalent to 1e+24j" +msgstr "" + +#: ../../reference/lexical_analysis.rst:1132 +msgid "" +"The ``j`` suffix is case-insensitive. That means you can use ``J`` instead::" +msgstr "" + +#: ../../reference/lexical_analysis.rst:1135 +msgid "3.14J # equivalent to 3.14j" +msgstr "" + +#: ../../reference/lexical_analysis.rst:1137 +msgid "" +"Formally, imaginary literals are described by the following lexical " +"definition:" +msgstr "" + +#: ../../reference/lexical_analysis.rst:1148 msgid "Operators" msgstr "" -#: ../../reference/lexical_analysis.rst:1015 +#: ../../reference/lexical_analysis.rst:1152 msgid "The following tokens are operators:" msgstr "" -#: ../../reference/lexical_analysis.rst:1017 +#: ../../reference/lexical_analysis.rst:1154 msgid "" "+ - * ** / // % @\n" "<< >> & | ^ ~ :=\n" "< > <= >= == !=" msgstr "" -#: ../../reference/lexical_analysis.rst:1028 +#: ../../reference/lexical_analysis.rst:1165 msgid "Delimiters" msgstr "" -#: ../../reference/lexical_analysis.rst:1032 +#: ../../reference/lexical_analysis.rst:1169 msgid "The following tokens serve as delimiters in the grammar:" msgstr "" -#: ../../reference/lexical_analysis.rst:1034 +#: ../../reference/lexical_analysis.rst:1171 msgid "" "( ) [ ] { }\n" ", : ! . ; @ =\n" @@ -1341,7 +1553,7 @@ msgid "" "@= &= |= ^= >>= <<= **=" msgstr "" -#: ../../reference/lexical_analysis.rst:1041 +#: ../../reference/lexical_analysis.rst:1178 msgid "" "The period can also occur in floating-point and imaginary literals. A " "sequence of three periods has a special meaning as an ellipsis literal. The " @@ -1349,31 +1561,31 @@ msgid "" "as delimiters, but also perform an operation." msgstr "" -#: ../../reference/lexical_analysis.rst:1046 +#: ../../reference/lexical_analysis.rst:1183 msgid "" "The following printing ASCII characters have special meaning as part of " "other tokens or are otherwise significant to the lexical analyzer:" msgstr "" -#: ../../reference/lexical_analysis.rst:1049 +#: ../../reference/lexical_analysis.rst:1186 msgid "' \" # \\" msgstr "" -#: ../../reference/lexical_analysis.rst:1053 +#: ../../reference/lexical_analysis.rst:1190 msgid "" "The following printing ASCII characters are not used in Python. Their " "occurrence outside string literals and comments is an unconditional error:" msgstr "" -#: ../../reference/lexical_analysis.rst:1056 +#: ../../reference/lexical_analysis.rst:1193 msgid "$ ? `" msgstr "" -#: ../../reference/lexical_analysis.rst:1062 +#: ../../reference/lexical_analysis.rst:1199 msgid "Footnotes" msgstr "" -#: ../../reference/lexical_analysis.rst:1063 +#: ../../reference/lexical_analysis.rst:1200 msgid "https://www.unicode.org/Public/16.0.0/ucd/NameAliases.txt" msgstr "" @@ -1399,7 +1611,7 @@ msgstr "" #: ../../reference/lexical_analysis.rst:36 #: ../../reference/lexical_analysis.rst:115 -#: ../../reference/lexical_analysis.rst:548 +#: ../../reference/lexical_analysis.rst:573 msgid "physical line" msgstr "" @@ -1489,310 +1701,310 @@ msgstr "" msgid "name" msgstr "" -#: ../../reference/lexical_analysis.rst:350 -#: ../../reference/lexical_analysis.rst:374 +#: ../../reference/lexical_analysis.rst:373 +#: ../../reference/lexical_analysis.rst:397 msgid "keyword" msgstr "" -#: ../../reference/lexical_analysis.rst:350 +#: ../../reference/lexical_analysis.rst:373 msgid "reserved word" msgstr "" -#: ../../reference/lexical_analysis.rst:374 +#: ../../reference/lexical_analysis.rst:397 msgid "soft keyword" msgstr "" -#: ../../reference/lexical_analysis.rst:393 +#: ../../reference/lexical_analysis.rst:417 msgid "_, identifiers" msgstr "" -#: ../../reference/lexical_analysis.rst:393 +#: ../../reference/lexical_analysis.rst:417 msgid "__, identifiers" msgstr "" -#: ../../reference/lexical_analysis.rst:449 +#: ../../reference/lexical_analysis.rst:473 msgid "literal" msgstr "" -#: ../../reference/lexical_analysis.rst:449 +#: ../../reference/lexical_analysis.rst:473 msgid "constant" msgstr "" -#: ../../reference/lexical_analysis.rst:454 -#: ../../reference/lexical_analysis.rst:495 +#: ../../reference/lexical_analysis.rst:478 +#: ../../reference/lexical_analysis.rst:520 msgid "string literal" msgstr "" -#: ../../reference/lexical_analysis.rst:454 -#: ../../reference/lexical_analysis.rst:508 +#: ../../reference/lexical_analysis.rst:478 +#: ../../reference/lexical_analysis.rst:533 msgid "bytes literal" msgstr "" -#: ../../reference/lexical_analysis.rst:454 +#: ../../reference/lexical_analysis.rst:478 msgid "ASCII" msgstr "" -#: ../../reference/lexical_analysis.rst:454 +#: ../../reference/lexical_analysis.rst:478 msgid "' (single quote)" msgstr "" -#: ../../reference/lexical_analysis.rst:454 +#: ../../reference/lexical_analysis.rst:478 msgid "\" (double quote)" msgstr "" -#: ../../reference/lexical_analysis.rst:454 +#: ../../reference/lexical_analysis.rst:478 msgid "u'" msgstr "" -#: ../../reference/lexical_analysis.rst:454 +#: ../../reference/lexical_analysis.rst:478 msgid "u\"" msgstr "" -#: ../../reference/lexical_analysis.rst:495 +#: ../../reference/lexical_analysis.rst:520 msgid "triple-quoted string" msgstr "" -#: ../../reference/lexical_analysis.rst:495 +#: ../../reference/lexical_analysis.rst:520 msgid "Unicode Consortium" msgstr "" -#: ../../reference/lexical_analysis.rst:495 +#: ../../reference/lexical_analysis.rst:520 msgid "raw string" msgstr "" -#: ../../reference/lexical_analysis.rst:495 +#: ../../reference/lexical_analysis.rst:520 msgid "\"\"\"" msgstr "" -#: ../../reference/lexical_analysis.rst:495 +#: ../../reference/lexical_analysis.rst:520 msgid "'''" msgstr "" -#: ../../reference/lexical_analysis.rst:508 +#: ../../reference/lexical_analysis.rst:533 msgid "b'" msgstr "" -#: ../../reference/lexical_analysis.rst:508 +#: ../../reference/lexical_analysis.rst:533 msgid "b\"" msgstr "" -#: ../../reference/lexical_analysis.rst:517 +#: ../../reference/lexical_analysis.rst:542 msgid "r'" msgstr "" -#: ../../reference/lexical_analysis.rst:517 +#: ../../reference/lexical_analysis.rst:542 msgid "raw string literal" msgstr "" -#: ../../reference/lexical_analysis.rst:517 +#: ../../reference/lexical_analysis.rst:542 msgid "r\"" msgstr "" -#: ../../reference/lexical_analysis.rst:535 +#: ../../reference/lexical_analysis.rst:560 msgid "f'" msgstr "" -#: ../../reference/lexical_analysis.rst:535 -#: ../../reference/lexical_analysis.rst:713 +#: ../../reference/lexical_analysis.rst:560 +#: ../../reference/lexical_analysis.rst:738 msgid "formatted string literal" msgstr "" -#: ../../reference/lexical_analysis.rst:535 +#: ../../reference/lexical_analysis.rst:560 msgid "f\"" msgstr "" -#: ../../reference/lexical_analysis.rst:548 +#: ../../reference/lexical_analysis.rst:573 msgid "escape sequence" msgstr "" -#: ../../reference/lexical_analysis.rst:548 +#: ../../reference/lexical_analysis.rst:573 msgid "Standard C" msgstr "" -#: ../../reference/lexical_analysis.rst:548 +#: ../../reference/lexical_analysis.rst:573 msgid "C" msgstr "" -#: ../../reference/lexical_analysis.rst:548 +#: ../../reference/lexical_analysis.rst:573 msgid "\\ (backslash)" msgstr "" -#: ../../reference/lexical_analysis.rst:548 +#: ../../reference/lexical_analysis.rst:573 msgid "\\\\" msgstr "" -#: ../../reference/lexical_analysis.rst:548 +#: ../../reference/lexical_analysis.rst:573 msgid "\\a" msgstr "" -#: ../../reference/lexical_analysis.rst:548 +#: ../../reference/lexical_analysis.rst:573 msgid "\\b" msgstr "" -#: ../../reference/lexical_analysis.rst:548 +#: ../../reference/lexical_analysis.rst:573 msgid "\\f" msgstr "" -#: ../../reference/lexical_analysis.rst:548 +#: ../../reference/lexical_analysis.rst:573 msgid "\\n" msgstr "" -#: ../../reference/lexical_analysis.rst:548 +#: ../../reference/lexical_analysis.rst:573 msgid "\\r" msgstr "" -#: ../../reference/lexical_analysis.rst:548 +#: ../../reference/lexical_analysis.rst:573 msgid "\\t" msgstr "" -#: ../../reference/lexical_analysis.rst:548 +#: ../../reference/lexical_analysis.rst:573 msgid "\\v" msgstr "" -#: ../../reference/lexical_analysis.rst:548 +#: ../../reference/lexical_analysis.rst:573 msgid "\\x" msgstr "" -#: ../../reference/lexical_analysis.rst:548 +#: ../../reference/lexical_analysis.rst:573 msgid "\\u" msgstr "" -#: ../../reference/lexical_analysis.rst:548 +#: ../../reference/lexical_analysis.rst:573 msgid "\\U" msgstr "" -#: ../../reference/lexical_analysis.rst:664 +#: ../../reference/lexical_analysis.rst:689 msgid "unrecognized escape sequence" msgstr "" -#: ../../reference/lexical_analysis.rst:713 +#: ../../reference/lexical_analysis.rst:738 msgid "interpolated string literal" msgstr "" -#: ../../reference/lexical_analysis.rst:713 +#: ../../reference/lexical_analysis.rst:738 msgid "string" msgstr "" -#: ../../reference/lexical_analysis.rst:713 +#: ../../reference/lexical_analysis.rst:738 msgid "formatted literal" msgstr "" -#: ../../reference/lexical_analysis.rst:713 +#: ../../reference/lexical_analysis.rst:738 msgid "interpolated literal" msgstr "" -#: ../../reference/lexical_analysis.rst:713 +#: ../../reference/lexical_analysis.rst:738 msgid "f-string" msgstr "" -#: ../../reference/lexical_analysis.rst:713 +#: ../../reference/lexical_analysis.rst:738 msgid "fstring" msgstr "" -#: ../../reference/lexical_analysis.rst:713 +#: ../../reference/lexical_analysis.rst:738 msgid "{} (curly brackets)" msgstr "" -#: ../../reference/lexical_analysis.rst:713 +#: ../../reference/lexical_analysis.rst:738 msgid "in formatted string literal" msgstr "" -#: ../../reference/lexical_analysis.rst:713 +#: ../../reference/lexical_analysis.rst:738 msgid "! (exclamation)" msgstr "" -#: ../../reference/lexical_analysis.rst:713 +#: ../../reference/lexical_analysis.rst:738 msgid ": (colon)" msgstr "" -#: ../../reference/lexical_analysis.rst:713 +#: ../../reference/lexical_analysis.rst:738 msgid "= (equals)" msgstr "" -#: ../../reference/lexical_analysis.rst:713 +#: ../../reference/lexical_analysis.rst:738 msgid "for help in debugging using string literals" msgstr "" -#: ../../reference/lexical_analysis.rst:896 +#: ../../reference/lexical_analysis.rst:921 msgid "number" msgstr "" -#: ../../reference/lexical_analysis.rst:896 +#: ../../reference/lexical_analysis.rst:921 msgid "numeric literal" msgstr "" -#: ../../reference/lexical_analysis.rst:896 -#: ../../reference/lexical_analysis.rst:909 +#: ../../reference/lexical_analysis.rst:921 +#: ../../reference/lexical_analysis.rst:943 msgid "integer literal" msgstr "" -#: ../../reference/lexical_analysis.rst:896 +#: ../../reference/lexical_analysis.rst:921 msgid "floating-point literal" msgstr "" -#: ../../reference/lexical_analysis.rst:896 +#: ../../reference/lexical_analysis.rst:921 msgid "hexadecimal literal" msgstr "" -#: ../../reference/lexical_analysis.rst:896 +#: ../../reference/lexical_analysis.rst:921 msgid "octal literal" msgstr "" -#: ../../reference/lexical_analysis.rst:896 +#: ../../reference/lexical_analysis.rst:921 msgid "binary literal" msgstr "" -#: ../../reference/lexical_analysis.rst:896 +#: ../../reference/lexical_analysis.rst:921 msgid "decimal literal" msgstr "" -#: ../../reference/lexical_analysis.rst:896 +#: ../../reference/lexical_analysis.rst:921 msgid "imaginary literal" msgstr "" -#: ../../reference/lexical_analysis.rst:896 +#: ../../reference/lexical_analysis.rst:921 msgid "complex literal" msgstr "" -#: ../../reference/lexical_analysis.rst:909 +#: ../../reference/lexical_analysis.rst:943 msgid "0b" msgstr "" -#: ../../reference/lexical_analysis.rst:909 +#: ../../reference/lexical_analysis.rst:943 msgid "0o" msgstr "" -#: ../../reference/lexical_analysis.rst:909 +#: ../../reference/lexical_analysis.rst:943 msgid "0x" msgstr "" -#: ../../reference/lexical_analysis.rst:909 -#: ../../reference/lexical_analysis.rst:955 +#: ../../reference/lexical_analysis.rst:943 +#: ../../reference/lexical_analysis.rst:1018 msgid "_ (underscore)" msgstr "" -#: ../../reference/lexical_analysis.rst:909 -#: ../../reference/lexical_analysis.rst:955 -#: ../../reference/lexical_analysis.rst:987 +#: ../../reference/lexical_analysis.rst:943 +#: ../../reference/lexical_analysis.rst:1018 +#: ../../reference/lexical_analysis.rst:1082 msgid "in numeric literal" msgstr "" -#: ../../reference/lexical_analysis.rst:955 +#: ../../reference/lexical_analysis.rst:1018 msgid ". (dot)" msgstr "" -#: ../../reference/lexical_analysis.rst:955 +#: ../../reference/lexical_analysis.rst:1018 msgid "e" msgstr "" -#: ../../reference/lexical_analysis.rst:987 +#: ../../reference/lexical_analysis.rst:1082 msgid "j" msgstr "" -#: ../../reference/lexical_analysis.rst:1013 +#: ../../reference/lexical_analysis.rst:1150 msgid "operators" msgstr "" -#: ../../reference/lexical_analysis.rst:1030 +#: ../../reference/lexical_analysis.rst:1167 msgid "delimiters" msgstr "" diff --git a/reference/simple_stmts.po b/reference/simple_stmts.po index 49e4109cc..333ec6662 100644 --- a/reference/simple_stmts.po +++ b/reference/simple_stmts.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:49+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/reference/toplevel_components.po b/reference/toplevel_components.po index 4da330f53..09bba088e 100644 --- a/reference/toplevel_components.po +++ b/reference/toplevel_components.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:49+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/reports/contributor_stats_2025_05_24.png b/reports/contributor_stats_2025_05_24.png new file mode 100644 index 000000000..9b42b4b1e Binary files /dev/null and b/reports/contributor_stats_2025_05_24.png differ diff --git a/reports/contributor_stats_2025_05_31.png b/reports/contributor_stats_2025_05_31.png new file mode 100644 index 000000000..f439a7485 Binary files /dev/null and b/reports/contributor_stats_2025_05_31.png differ diff --git a/reports/contributor_stats_2025_06_07.png b/reports/contributor_stats_2025_06_07.png new file mode 100644 index 000000000..45eeeae48 Binary files /dev/null and b/reports/contributor_stats_2025_06_07.png differ diff --git a/reports/contributor_stats_2025_06_14.png b/reports/contributor_stats_2025_06_14.png new file mode 100644 index 000000000..2944de865 Binary files /dev/null and b/reports/contributor_stats_2025_06_14.png differ diff --git a/reports/contributor_stats_2025_06_21.png b/reports/contributor_stats_2025_06_21.png new file mode 100644 index 000000000..c038081ea Binary files /dev/null and b/reports/contributor_stats_2025_06_21.png differ diff --git a/reports/contributor_stats_2025_06_28.png b/reports/contributor_stats_2025_06_28.png new file mode 100644 index 000000000..c038081ea Binary files /dev/null and b/reports/contributor_stats_2025_06_28.png differ diff --git a/reports/contributor_stats_2025_07_05.png b/reports/contributor_stats_2025_07_05.png new file mode 100644 index 000000000..c038081ea Binary files /dev/null and b/reports/contributor_stats_2025_07_05.png differ diff --git a/reports/contributor_stats_2025_07_12.png b/reports/contributor_stats_2025_07_12.png new file mode 100644 index 000000000..62c2ae7f9 Binary files /dev/null and b/reports/contributor_stats_2025_07_12.png differ diff --git a/sphinx.po b/sphinx.po index d58fed2df..0cee9fe47 100644 --- a/sphinx.po +++ b/sphinx.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 00:47+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -31,15 +32,15 @@ msgid "In development" msgstr "" #: ../../tools/templates/customsourcelink.html:3 -msgid "This Page" +msgid "This page" msgstr "" #: ../../tools/templates/customsourcelink.html:5 -msgid "Report a Bug" +msgid "Report a bug" msgstr "" #: ../../tools/templates/customsourcelink.html:8 -msgid "Show Source" +msgid "Show source" msgstr "" #: ../../tools/templates/download.html:2 @@ -48,7 +49,7 @@ msgid "Download" msgstr "" #: ../../tools/templates/download.html:30 -msgid "Download Python %(dl_version)s Documentation" +msgid "Download Python %(dl_version)s documentation" msgstr "" #: ../../tools/templates/download.html:32 @@ -431,7 +432,7 @@ msgid "Reporting issues" msgstr "" #: ../../tools/templates/indexcontent.html:75 -msgid "Contributing to Docs" +msgid "Contributing to docs" msgstr "" #: ../../tools/templates/indexcontent.html:76 @@ -467,23 +468,23 @@ msgid "Other resources" msgstr "" #: ../../tools/templates/indexsidebar.html:12 -msgid "PEP Index" +msgid "PEP index" msgstr "" #: ../../tools/templates/indexsidebar.html:13 -msgid "Beginner's Guide" +msgid "Beginner's guide" msgstr "" #: ../../tools/templates/indexsidebar.html:14 -msgid "Book List" +msgid "Book list" msgstr "" #: ../../tools/templates/indexsidebar.html:15 -msgid "Audio/Visual Talks" +msgid "Audio/visual talks" msgstr "" #: ../../tools/templates/indexsidebar.html:16 -msgid "Python Developer’s Guide" +msgid "Python developer’s guide" msgstr "" #: ../../tools/templates/layout.html:6 diff --git a/tutorial/appendix.po b/tutorial/appendix.po index ed123296e..018fbaf07 100644 --- a/tutorial/appendix.po +++ b/tutorial/appendix.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:49+0000\n" "Last-Translator: khosro azimi, 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" @@ -52,18 +52,31 @@ msgid "" "mode\", which makes pasting larger blocks of code easier. Press :kbd:`F3` to " "return to the regular prompt." msgstr "" +"در ویندوز یا سیستم های یونیکس مانند با پشتیبانی از :mod:`curses`، به صورت " +"پیش فرض از یک شل تعاملی جدید استفاده می شود. این شل از رنگ، ویرایش چندخطی، " +"مرور تاریخچه، و حالت چسباندن «paste mode» پشتیبانی می کند. برای غیرفعال کردن " +"رنگ، جزئیات را در :ref:`using-on-controlling-color` ببینید. کلیدهای تابعی " +"برخی از قابلیت های اضافی را فراهم می کنند. :kbd:`F1` مرورگر تعاملی راهنما :" +"mod:`pydoc` را فعال می کند. :kbd:`F2` اجازه می دهد تاریخچه خط فرمان را بدون " +"خروجی و بدون اعلان های :term:`>>>` و :term:`...` مرور کنید. :kbd:`F3` حالت " +"\"چسباندن\" را فعال می کند که چسباندن بلوک های بزرگ تر کد را آسان تر می " +"سازد. برای بازگشت به اعلان معمولی، :kbd:`F3` را فشار دهید." #: ../../tutorial/appendix.rst:28 msgid "" "When using the new interactive shell, exit the shell by typing :kbd:`exit` " "or :kbd:`quit`. Adding call parentheses after those commands is not required." msgstr "" +"وقتی از پوسته تعاملی جدید استفاده می‌کنید، با تایپ :kbd:`exit` یا :kbd:`quit` " +"از پوسته خارج شوید. اضافه‌کردن پرانتز پس از این دستورات ضروری نیست." #: ../../tutorial/appendix.rst:32 msgid "" "If the new interactive shell is not desired, it can be disabled via the :" "envvar:`PYTHON_BASIC_REPL` environment variable." msgstr "" +"اگر پوسته تعاملی جدید مطلوب نباشد، می توان آن را از طریق متغیر محیطی :envvar:" +"`PYTHON_BASIC_REPL` غیرفعال کرد." #: ../../tutorial/appendix.rst:38 msgid "Error Handling" @@ -81,6 +94,16 @@ msgid "" "memory. All error messages are written to the standard error stream; normal " "output from executed commands is written to standard output." msgstr "" +"موقع بروز خطا، مفسر یک پیام خطا و «گزارش پشته» «stack trace» چاپ می‌کند. در " +"حالت تعاملی، بعد از نمایش خطا، برنامه به حالت آماده‌باش برای دریافت دستورات " +"جدید بازمی‌گردد؛ اما اگر ورودی از یک فایل آمده باشد، پس از چاپ گزارش پشته با " +"یک کد خروجی غیر صفر از برنامه خارج می‌شود. (استثناهایی که با بخش :keyword:" +"`except` در یک دستور :keyword:`try` مدیریت می‌شوند، در این زمینه خطا محسوب " +"نمی‌شوند.) بعضی خطاها به‌طور قطعی باعث خروج از برنامه می‌شوند و کد خروجی غیر " +"صفر دارند؛ این در مورد ناسازگاری‌های داخلی یا در برخی موارد کمبود حافظه صدق " +"می‌کند. تمام پیام‌های خطا در جریان خروجی خطا «standard error» نوشته می‌شوند؛ " +"خروجی معمول دستورات اجراشده نیز در جریان خروجی استاندارد «standard output» " +"نوشته می‌شود." #: ../../tutorial/appendix.rst:50 msgid "" @@ -90,6 +113,10 @@ msgid "" "the :exc:`KeyboardInterrupt` exception, which may be handled by a :keyword:" "`try` statement." msgstr "" +"فشردن کلید وقفه (که معمولاً :kbd:`Control-C` یا :kbd:`Delete` است) در اعلان " +"اصلی یا فرعی، ورودی را لغو کرده و کاربر را به اعلان اصلی بازمی‌گرداند. [#]_ \n" +"فشردن کلید وقفه در حین اجرای یک دستور، استثنای :exc:`KeyboardInterrupt` را " +"ایجاد می‌کند که می‌توان آن را با دستور :keyword:`try` مدیریت کرد." #: ../../tutorial/appendix.rst:60 msgid "Executable Python Scripts" @@ -100,10 +127,12 @@ msgid "" "On BSD'ish Unix systems, Python scripts can be made directly executable, " "like shell scripts, by putting the line ::" msgstr "" +"در سیستم عامل های یونیکس مبتنی بر BSD، اسکریپت های پایتون می توانند مانند " +"اسکریپت های شل به صورت مستقیم اجرایی شوند، با قرار دادن خط ::" #: ../../tutorial/appendix.rst:65 msgid "#!/usr/bin/env python3" -msgstr "" +msgstr "#!/usr/bin/env python3" #: ../../tutorial/appendix.rst:67 msgid "" @@ -114,16 +143,23 @@ msgid "" "(``'\\r\\n'``) line ending. Note that the hash, or pound, character, " "``'#'``, is used to start a comment in Python." msgstr "" +"(با فرض اینکه مفسر در :envvar:`PATH` کاربر قرار دارد) در ابتدای اسکریپت باید " +"قرار گیرد و فایل باید به حالت قابل اجرا تنظیم شود. ``#!`` باید نخستین دو " +"نویسه‌ی فایل باشند. در برخی پلتفرم‌ها، این خط اول باید با پایان خط به سبک " +"یونیکس (``'\\n'``) تمام شود، نه پایان خط ویندوزی (``'\\r\\n'``). توجه داشته " +"باشید که نویسه‌ی ``'#'`` برای آغاز یک توضیح (کامنت) در پایتون به کار می‌رود." #: ../../tutorial/appendix.rst:74 msgid "" "The script can be given an executable mode, or permission, using the :" "program:`chmod` command." msgstr "" +"با استفاده از دستور :program:`chmod` می‌توان به اسکریپت حالت اجرایی یا مجوز " +"اجرا داد." #: ../../tutorial/appendix.rst:77 msgid "$ chmod +x myscript.py" -msgstr "" +msgstr "$ chmod +x myscript.py" #: ../../tutorial/appendix.rst:81 msgid "" @@ -133,6 +169,11 @@ msgid "" "extension can also be ``.pyw``, in that case, the console window that " "normally appears is suppressed." msgstr "" +"در سیستم‌عامل ویندوز، مفهوم «حالت اجرایی» \"executable mode\" وجود ندارد. " +"نصب‌کننده پایتون به‌طور خودکار فایل‌های ``.py`` را به ``python.exe`` مرتبط " +"می‌کند تا با دوبار کلیک روی فایل پایتون، به‌عنوان اسکریپت اجرا شود. پسوند فایل " +"همچنین می‌تواند ``.pyw`` باشد که در این صورت پنجره کنسولی که معمولاً ظاهر " +"می‌شود، نمایش داده نمی‌شود." #: ../../tutorial/appendix.rst:91 msgid "The Interactive Startup File" @@ -146,6 +187,11 @@ msgid "" "the name of a file containing your start-up commands. This is similar to " "the :file:`.profile` feature of the Unix shells." msgstr "" +"هنگامی که به صورت تعاملی از پایتون استفاده می کنید، اجرای برخی دستورات " +"استاندارد در هر بار شروع مفسر می تواند مفید باشد. شما می توانید این کار را " +"با تنظیم متغیر محیطی با نام :envvar:`PYTHONSTARTUP` به نام فایلی که حاوی " +"دستورات شروع شما است انجام دهید. این قابلیت شبیه به ویژگی :file:`.profile` " +"در شل های یونیکس است." #: ../../tutorial/appendix.rst:99 msgid "" @@ -157,6 +203,13 @@ msgid "" "qualification in the interactive session. You can also change the prompts " "``sys.ps1`` and ``sys.ps2`` in this file." msgstr "" +"این فایل فقط در جلسات تعاملی خوانده می شود، نه زمانی که پایتون دستورات را از " +"یک اسکریپت می خواند، و نه زمانی که :file:`/dev/tty` به عنوان منبع صریح " +"دستورات داده می شود (که در غیر این صورت همچون یک جلسه تعاملی رفتار می کند). " +"این فایل در همان فضای نامی که در آن دستورات تعاملی اجرا می شوند، اجرا می " +"گردد بنابراین اشیایی که تعریف یا وارد می کند می توانند بدون مشخص شدن در جلسه " +"تعاملی مورد استفاده قرار گیرند. شما می توانید درخواست ها ``sys.ps1`` و ``sys." +"ps2`` را نیز در این فایل تغییر دهید." #: ../../tutorial/appendix.rst:107 msgid "" @@ -166,6 +219,11 @@ msgid "" "want to use the startup file in a script, you must do this explicitly in the " "script::" msgstr "" +"اگر می خواهید یک فایل راه اندازی اضافی از دایرکتوری فعلی بخوانید، می توانید " +"این کار را در فایل راه اندازی عمومی با کدی مشابه ``if os.path.isfile('." +"pythonrc.py'): exec(open('.pythonrc.py').read())`` برنامه ریزی کنید. اگر می " +"خواهید از فایل راه اندازی در یک اسکریپت استفاده کنید، باید این کار را به طور " +"صریح در اسکریپت انجام دهید:" #: ../../tutorial/appendix.rst:113 msgid "" @@ -176,10 +234,16 @@ msgid "" " startup_file = fobj.read()\n" " exec(startup_file)" msgstr "" +"import os\n" +"filename = os.environ.get('PYTHONSTARTUP')\n" +"if filename and os.path.isfile(filename):\n" +" with open(filename) as fobj:\n" +" startup_file = fobj.read()\n" +" exec(startup_file)" #: ../../tutorial/appendix.rst:124 msgid "The Customization Modules" -msgstr "" +msgstr "ماژول های سفارشی سازی" #: ../../tutorial/appendix.rst:126 msgid "" @@ -188,6 +252,10 @@ msgid "" "location of your user site-packages directory. Start Python and run this " "code::" msgstr "" +"پایتون دو نقطهٔ اتصال برای سفارشی سازی ارائه می دهد: :index:`sitecustomize` " +"و :index:`usercustomize`. برای دیدن چگونگی کارکرد آن، ابتدا باید مکان " +"دایرکتوری user site-packages خود را پیدا کنید. پایتون را اجرا کنید و این کد " +"را اجرا کنید:" #: ../../tutorial/appendix.rst:130 msgid "" @@ -195,6 +263,9 @@ msgid "" ">>> site.getusersitepackages()\n" "'/home/user/.local/lib/python3.x/site-packages'" msgstr "" +">>> import site\n" +">>> site.getusersitepackages()\n" +"'/home/user/.local/lib/python3.x/site-packages'" #: ../../tutorial/appendix.rst:134 msgid "" @@ -203,6 +274,10 @@ msgid "" "unless it is started with the :option:`-s` option to disable the automatic " "import." msgstr "" +"حالا می‌توانید فایلی به نام :file:`usercustomize.py` در آن دایرکتوری ایجاد " +"کرده و هر چیزی که می‌خواهید در آن قرار دهید. این فایل روی هر بار اجرای پایتون " +"تأثیر خواهد گذاشت، مگر اینکه پایتون با گزینه :option:`-s` اجرا شود تا وارد " +"کردن خودکار غیرفعال گردد." #: ../../tutorial/appendix.rst:138 msgid "" diff --git a/tutorial/appetite.po b/tutorial/appetite.po index 323de3d18..7bb29874e 100644 --- a/tutorial/appetite.po +++ b/tutorial/appetite.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:49+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/tutorial/classes.po b/tutorial/classes.po index b99bef29c..272d17853 100644 --- a/tutorial/classes.po +++ b/tutorial/classes.po @@ -7,15 +7,16 @@ # Alireza Feyzabadi Farahani, 2025 # Alireza Shabani (Revisto) , 2025 # AmirHossein SAMIMI, 2025 +# khosro azimi, 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:49+0000\n" -"Last-Translator: AmirHossein SAMIMI, 2025\n" +"Last-Translator: khosro azimi, 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -98,10 +99,14 @@ msgid "" "since its object-oriented semantics are closer to those of Python than C++, " "but I expect that few readers have heard of it.)" msgstr "" +"(با نبود اصطلاحات پذیرفته شده جهانی برای صحبت درباره کلاس‌ها، گاهی از " +"اصطلاحات Smalltalk و C++ استفاده خواهم کرد. من از اصطلاحات Modula-3 استفاده " +"می‌کردم، چون معنای شیءگرای آن به پایتون نزدیک‌تر از C++ است، اما انتظار دارم " +"که تعداد کمی از خوانندگان با آن آشنا باشند.)" #: ../../tutorial/classes.rst:43 msgid "A Word About Names and Objects" -msgstr "" +msgstr "سخنی درباره نام‌ها و اشیاء" #: ../../tutorial/classes.rst:45 msgid "" @@ -131,10 +136,15 @@ msgid "" "understand what's going on. Incidentally, knowledge about this subject is " "useful for any advanced Python programmer." msgstr "" +"قبل از معرفی کلاس ها، ابتدا باید چیزی درباره قوانین حوزه در پایتون به شما " +"بگویم. تعریف کلاس ها چند ترفند جالب با فضاهای نام انجام می دهد و برای اینکه " +"به طور کامل متوجه شوید چه می گذرد، باید بدانید که حوزه ها و فضاهای نام چگونه " +"کار می کنند. ضمناً، آگاهی از این موضوع برای هر برنامه نویس پیشرفته پایتون " +"مفید است." #: ../../tutorial/classes.rst:69 msgid "Let's begin with some definitions." -msgstr "" +msgstr "بیایید با چند تعریف شروع کنیم." #: ../../tutorial/classes.rst:71 msgid "" @@ -150,6 +160,16 @@ msgid "" "may both define a function ``maximize`` without confusion --- users of the " "modules must prefix it with the module name." msgstr "" +"«فضای نام» *namespace* نگاشتی است از نام‌ها به اشیا. بیشتر فضای نام‌ها در حال " +"حاضر به‌صورت دیکشنری‌های پایتون پیاده‌سازی شده‌اند، اما معمولاً این موضوع (به جز " +"در بازدهی «performance» ) قابل مشاهده نیست و ممکن است در آینده تغییر کند. " +"مثال‌هایی از فضای نام عبارت‌اند از: مجموعه نام‌های داخلی (که شامل توابعی مثل :" +"func:`abs` و نام‌های استثنائات داخلی است)؛ نام‌های سراسری در یک ماژول؛ و " +"نام‌های محلی در یک فراخوانی تابع. به نوعی، مجموعه صفات «attributes» یک شی نیز " +"یک فضای نام را تشکیل می‌دهد. نکته مهم درباره فضای نام‌ها این است که هیچ " +"ارتباطی بین نام‌ها در فضای نام‌های مختلف وجود ندارد؛ برای مثال، دو ماژول مختلف " +"می‌توانند هر دو تابعی با نام ``maximize`` تعریف کنند بدون اینکه ابهامی پیش " +"بیاید — استفاده‌کنندگان از ماژول‌ها باید نام ماژول را به عنوان پیشوند بیاورند." #: ../../tutorial/classes.rst:82 msgid "" @@ -161,6 +181,13 @@ msgid "" "happens to be a straightforward mapping between the module's attributes and " "the global names defined in the module: they share the same namespace! [#]_" msgstr "" +"به‌هرحال، من واژهٔ *ویژگی* «*attribute*» را برای هر نامی که بعد از یک نقطه " +"بیاید به کار می‌برم — برای مثال، در عبارت ``z.real``, ``real`` یک ویژگیِ شیءِ " +"``z`` است. از نظر دقیق‌تر، ارجاع به نام‌ها در ماژول‌ها نیز نوعی ارجاع به ویژگی " +"محسوب می‌شود: در عبارت ``modname.funcname``, ``modname`` یک شیءِ ماژول است و " +"``funcname`` یکی از ویژگی‌های آن است. در این حالت، نگاشتی ساده و مستقیم بین " +"ویژگی‌های ماژول و نام‌های سراسری تعریف‌شده در آن وجود دارد: هر دو یک فضای نام " +"(namespace) را به اشتراک می‌گذارند! [#]_" #: ../../tutorial/classes.rst:90 msgid "" @@ -171,6 +198,12 @@ msgid "" "remove the attribute :attr:`!the_answer` from the object named by " "``modname``." msgstr "" +"ویژگی ها ممکن است فقط خواندنی یا قابل نوشتن باشند. در حالت دوم، اختصاص دادن " +"به ویژگی ها ممکن است. ویژگی های ماژول قابل نوشتن هستند: می توانید ``modname." +"the_answer = 42`` را بنویسید. ویژگی های قابل نوشتن را می توان با دستور :" +"keyword:`del` نیز حذف کرد. به عنوان مثال، ``del modname.the_answer`` ویژگی :" +"attr:`!the_answer` را از شیئی که توسط ``modname`` نامگذاری شده است حذف خواهد " +"کرد." #: ../../tutorial/classes.rst:96 msgid "" @@ -184,6 +217,15 @@ msgid "" "`__main__`, so they have their own global namespace. (The built-in names " "actually also live in a module; this is called :mod:`builtins`.)" msgstr "" +"فضاهای نام در لحظات مختلف ایجاد می شوند و دارای طول عمرهای متفاوتی هستند. " +"فضای نام که شامل نام های داخلی است، زمانی که مفسر پایتون شروع به کار می کند " +"ایجاد می شود و هرگز حذف نمی شود. فضای نام عمومی برای یک ماژول زمانی که تعریف " +"ماژول خوانده می شود ایجاد می گردد؛ به طور معمول، فضاهای نام ماژول نیز تا " +"زمانی که مفسر پایان یابد باقی می مانند. دستوراتی که توسط اجرای سطح بالای " +"مفسر، یا از فایل اسکریپت خوانده شده یا به طور تعاملی اجرا می شوند، به عنوان " +"بخشی از ماژولی به نام :mod:`__main__` در نظر گرفته می شوند، بنابراین آن ها " +"فضای نام عمومی خود را دارند. (نام‌های درون‌ساخت نیز در واقع در یک ماژول قرار " +"دارند؛ این ماژول :mod:`builtins` نامیده می شود.)" #: ../../tutorial/classes.rst:106 msgid "" @@ -193,6 +235,10 @@ msgid "" "describe what actually happens.) Of course, recursive invocations each have " "their own local namespace." msgstr "" +"فضای نام محلی برای یک تابع زمانی ایجاد می‌شود که تابع فراخوانی شود و زمانی که " +"تابع بازمی‌گردد یا استثنایی پرتاب می‌کند که در درون تابع مدیریت نمی‌شود، حذف " +"می‌گردد. (در واقع، «فراموش شدن» توصیف بهتری برای چیزی است که واقعاً اتفاق " +"می‌افتد.) البته، هر فراخوانی بازگشتی، فضای نام محلی خودش را دارد." #: ../../tutorial/classes.rst:112 msgid "" @@ -200,6 +246,10 @@ msgid "" "directly accessible. \"Directly accessible\" here means that an unqualified " "reference to a name attempts to find the name in the namespace." msgstr "" +"یک *دامنه* «*scope*» یک ناحیه متنی از یک برنامه پایتون است که در آن یک فضای " +"نام «namespace» به طور مستقیم قابل دستیابی است. \"به طور مستقیم قابل " +"دستیابی\" در اینجا به این معنی است که یک ارجاع بدون صلاحیت به یک نام تلاش می " +"کند تا نام «name» را در فضای نام «namespace» پیدا کند." #: ../../tutorial/classes.rst:116 msgid "" diff --git a/tutorial/controlflow.po b/tutorial/controlflow.po index 6a2d25c91..6b650d148 100644 --- a/tutorial/controlflow.po +++ b/tutorial/controlflow.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:50+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" @@ -1463,10 +1463,11 @@ msgstr "" #: ../../tutorial/controlflow.rst:1001 msgid "" "The above example uses a lambda expression to return a function. Another " -"use is to pass a small function as an argument::" +"use is to pass a small function as an argument. For instance, :meth:`list." +"sort` takes a sorting key function *key* which can be a lambda function::" msgstr "" -#: ../../tutorial/controlflow.rst:1004 +#: ../../tutorial/controlflow.rst:1005 msgid "" ">>> pairs = [(1, 'one'), (2, 'two'), (3, 'three'), (4, 'four')]\n" ">>> pairs.sort(key=lambda pair: pair[1])\n" @@ -1474,17 +1475,17 @@ msgid "" "[(4, 'four'), (1, 'one'), (3, 'three'), (2, 'two')]" msgstr "" -#: ../../tutorial/controlflow.rst:1013 +#: ../../tutorial/controlflow.rst:1014 msgid "Documentation Strings" msgstr "" -#: ../../tutorial/controlflow.rst:1020 +#: ../../tutorial/controlflow.rst:1021 msgid "" "Here are some conventions about the content and formatting of documentation " "strings." msgstr "" -#: ../../tutorial/controlflow.rst:1023 +#: ../../tutorial/controlflow.rst:1024 msgid "" "The first line should always be a short, concise summary of the object's " "purpose. For brevity, it should not explicitly state the object's name or " @@ -1493,7 +1494,7 @@ msgid "" "with a capital letter and end with a period." msgstr "" -#: ../../tutorial/controlflow.rst:1029 +#: ../../tutorial/controlflow.rst:1030 msgid "" "If there are more lines in the documentation string, the second line should " "be blank, visually separating the summary from the rest of the description. " @@ -1501,7 +1502,7 @@ msgid "" "calling conventions, its side effects, etc." msgstr "" -#: ../../tutorial/controlflow.rst:1034 +#: ../../tutorial/controlflow.rst:1035 msgid "" "The Python parser does not strip indentation from multi-line string literals " "in Python, so tools that process documentation have to strip indentation if " @@ -1516,11 +1517,11 @@ msgid "" "whitespace should be tested after expansion of tabs (to 8 spaces, normally)." msgstr "" -#: ../../tutorial/controlflow.rst:1046 +#: ../../tutorial/controlflow.rst:1047 msgid "Here is an example of a multi-line docstring::" msgstr "" -#: ../../tutorial/controlflow.rst:1048 +#: ../../tutorial/controlflow.rst:1049 msgid "" ">>> def my_function():\n" "... \"\"\"Do nothing, but document it.\n" @@ -1532,21 +1533,21 @@ msgid "" ">>> print(my_function.__doc__)\n" "Do nothing, but document it.\n" "\n" -" No, really, it doesn't do anything." +"No, really, it doesn't do anything." msgstr "" -#: ../../tutorial/controlflow.rst:1064 +#: ../../tutorial/controlflow.rst:1065 msgid "Function Annotations" msgstr "" -#: ../../tutorial/controlflow.rst:1072 +#: ../../tutorial/controlflow.rst:1073 msgid "" ":ref:`Function annotations ` are completely optional metadata " "information about the types used by user-defined functions (see :pep:`3107` " "and :pep:`484` for more information)." msgstr "" -#: ../../tutorial/controlflow.rst:1076 +#: ../../tutorial/controlflow.rst:1077 msgid "" ":term:`Annotations ` are stored in the :attr:`!" "__annotations__` attribute of the function as a dictionary and have no " @@ -1558,7 +1559,7 @@ msgid "" "a required argument, an optional argument, and the return value annotated::" msgstr "" -#: ../../tutorial/controlflow.rst:1085 +#: ../../tutorial/controlflow.rst:1086 msgid "" ">>> def f(ham: str, eggs: str = 'eggs') -> str:\n" "... print(\"Annotations:\", f.__annotations__)\n" @@ -1572,11 +1573,11 @@ msgid "" "'spam and eggs'" msgstr "" -#: ../../tutorial/controlflow.rst:1098 +#: ../../tutorial/controlflow.rst:1099 msgid "Intermezzo: Coding Style" msgstr "" -#: ../../tutorial/controlflow.rst:1103 +#: ../../tutorial/controlflow.rst:1104 msgid "" "Now that you are about to write longer, more complex pieces of Python, it is " "a good time to talk about *coding style*. Most languages can be written (or " @@ -1585,7 +1586,7 @@ msgid "" "and adopting a nice coding style helps tremendously for that." msgstr "" -#: ../../tutorial/controlflow.rst:1109 +#: ../../tutorial/controlflow.rst:1110 msgid "" "For Python, :pep:`8` has emerged as the style guide that most projects " "adhere to; it promotes a very readable and eye-pleasing coding style. Every " @@ -1593,48 +1594,48 @@ msgid "" "points extracted for you:" msgstr "" -#: ../../tutorial/controlflow.rst:1114 +#: ../../tutorial/controlflow.rst:1115 msgid "Use 4-space indentation, and no tabs." msgstr "" -#: ../../tutorial/controlflow.rst:1116 +#: ../../tutorial/controlflow.rst:1117 msgid "" "4 spaces are a good compromise between small indentation (allows greater " "nesting depth) and large indentation (easier to read). Tabs introduce " "confusion, and are best left out." msgstr "" -#: ../../tutorial/controlflow.rst:1120 +#: ../../tutorial/controlflow.rst:1121 msgid "Wrap lines so that they don't exceed 79 characters." msgstr "" -#: ../../tutorial/controlflow.rst:1122 +#: ../../tutorial/controlflow.rst:1123 msgid "" "This helps users with small displays and makes it possible to have several " "code files side-by-side on larger displays." msgstr "" -#: ../../tutorial/controlflow.rst:1125 +#: ../../tutorial/controlflow.rst:1126 msgid "" "Use blank lines to separate functions and classes, and larger blocks of code " "inside functions." msgstr "" -#: ../../tutorial/controlflow.rst:1128 +#: ../../tutorial/controlflow.rst:1129 msgid "When possible, put comments on a line of their own." msgstr "" -#: ../../tutorial/controlflow.rst:1130 +#: ../../tutorial/controlflow.rst:1131 msgid "Use docstrings." msgstr "" -#: ../../tutorial/controlflow.rst:1132 +#: ../../tutorial/controlflow.rst:1133 msgid "" "Use spaces around operators and after commas, but not directly inside " "bracketing constructs: ``a = f(1, 2) + g(3, 4)``." msgstr "" -#: ../../tutorial/controlflow.rst:1135 +#: ../../tutorial/controlflow.rst:1136 msgid "" "Name your classes and functions consistently; the convention is to use " "``UpperCamelCase`` for classes and ``lowercase_with_underscores`` for " @@ -1642,25 +1643,25 @@ msgid "" "argument (see :ref:`tut-firstclasses` for more on classes and methods)." msgstr "" -#: ../../tutorial/controlflow.rst:1140 +#: ../../tutorial/controlflow.rst:1141 msgid "" "Don't use fancy encodings if your code is meant to be used in international " "environments. Python's default, UTF-8, or even plain ASCII work best in any " "case." msgstr "" -#: ../../tutorial/controlflow.rst:1144 +#: ../../tutorial/controlflow.rst:1145 msgid "" "Likewise, don't use non-ASCII characters in identifiers if there is only the " "slightest chance people speaking a different language will read or maintain " "the code." msgstr "" -#: ../../tutorial/controlflow.rst:1150 +#: ../../tutorial/controlflow.rst:1151 msgid "Footnotes" msgstr "" -#: ../../tutorial/controlflow.rst:1151 +#: ../../tutorial/controlflow.rst:1152 msgid "" "Actually, *call by object reference* would be a better description, since if " "a mutable object is passed, the caller will see any changes the callee makes " @@ -1675,15 +1676,15 @@ msgstr "" msgid "for" msgstr "" -#: ../../tutorial/controlflow.rst:478 ../../tutorial/controlflow.rst:1015 +#: ../../tutorial/controlflow.rst:478 ../../tutorial/controlflow.rst:1016 msgid "documentation strings" msgstr "" -#: ../../tutorial/controlflow.rst:478 ../../tutorial/controlflow.rst:1015 +#: ../../tutorial/controlflow.rst:478 ../../tutorial/controlflow.rst:1016 msgid "docstrings" msgstr "" -#: ../../tutorial/controlflow.rst:478 ../../tutorial/controlflow.rst:1015 +#: ../../tutorial/controlflow.rst:478 ../../tutorial/controlflow.rst:1016 msgid "strings, documentation" msgstr "" @@ -1699,30 +1700,30 @@ msgstr "" msgid "**" msgstr "" -#: ../../tutorial/controlflow.rst:1067 +#: ../../tutorial/controlflow.rst:1068 msgid "function" msgstr "" -#: ../../tutorial/controlflow.rst:1067 +#: ../../tutorial/controlflow.rst:1068 msgid "annotations" msgstr "" -#: ../../tutorial/controlflow.rst:1067 +#: ../../tutorial/controlflow.rst:1068 msgid "->" msgstr "" -#: ../../tutorial/controlflow.rst:1067 +#: ../../tutorial/controlflow.rst:1068 msgid "function annotations" msgstr "" -#: ../../tutorial/controlflow.rst:1067 +#: ../../tutorial/controlflow.rst:1068 msgid ": (colon)" msgstr "" -#: ../../tutorial/controlflow.rst:1101 +#: ../../tutorial/controlflow.rst:1102 msgid "coding" msgstr "" -#: ../../tutorial/controlflow.rst:1101 +#: ../../tutorial/controlflow.rst:1102 msgid "style" msgstr "" diff --git a/tutorial/datastructures.po b/tutorial/datastructures.po index d85d6f38c..a1f74a9a5 100644 --- a/tutorial/datastructures.po +++ b/tutorial/datastructures.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:50+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/tutorial/errors.po b/tutorial/errors.po index 56cc01b06..d96822954 100644 --- a/tutorial/errors.po +++ b/tutorial/errors.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-06-27 14:20+0000\n" "PO-Revision-Date: 2021-06-28 01:50+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/tutorial/floatingpoint.po b/tutorial/floatingpoint.po index 1f9c7907e..61ca0b9d4 100644 --- a/tutorial/floatingpoint.po +++ b/tutorial/floatingpoint.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:50+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/tutorial/index.po b/tutorial/index.po index 8d68f4d3b..dc03c3825 100644 --- a/tutorial/index.po +++ b/tutorial/index.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-06-27 14:20+0000\n" "PO-Revision-Date: 2021-06-28 01:50+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" @@ -28,6 +28,12 @@ msgstr "راهنمای پایتون" #: ../../tutorial/index.rst:7 msgid "" +"This tutorial is designed for *programmers* that are new to the Python " +"language, **not** *beginners* who are new to programming." +msgstr "" + +#: ../../tutorial/index.rst:11 +msgid "" "Python is an easy to learn, powerful programming language. It has efficient " "high-level data structures and a simple but effective approach to object-" "oriented programming. Python's elegant syntax and dynamic typing, together " @@ -40,7 +46,7 @@ msgstr "" "تفسیری آن، این زبان را به گزینه ای ایده‌آل برای اسکریپت‌نویسی و توسعه سریع " "برنامه ها در بسیاری از حوزه ها و بر روی اکثر پلتفرم ها تبدیل کرده است." -#: ../../tutorial/index.rst:13 +#: ../../tutorial/index.rst:17 msgid "" "The Python interpreter and the extensive standard library are freely " "available in source or binary form for all major platforms from the Python " @@ -54,7 +60,7 @@ msgstr "" "کرد. همین وب‌سایت همچنین شامل توزیع‌هایی از ماژول‌ها، برنامه‌ها و ابزارهای " "رایگان شخص ثالث پایتون، به‌همراه مستندات تکمیلی، می‌باشد." -#: ../../tutorial/index.rst:19 +#: ../../tutorial/index.rst:23 msgid "" "The Python interpreter is easily extended with new functions and data types " "implemented in C or C++ (or other languages callable from C). Python is also " @@ -64,19 +70,16 @@ msgstr "" "زبان‌های C یا C++ (یا زبان‌های دیگر قابل فراخوانی از C) پیاده‌سازی شده‌اند. " "پایتون همچنین به‌عنوان یک زبان توسعه برای برنامه‌های قابل تنظیم مناسب است." -#: ../../tutorial/index.rst:23 +#: ../../tutorial/index.rst:27 msgid "" "This tutorial introduces the reader informally to the basic concepts and " -"features of the Python language and system. It helps to have a Python " -"interpreter handy for hands-on experience, but all examples are self-" +"features of the Python language and system. Be aware that it expects you to " +"have a basic understanding of programming in general. It helps to have a " +"Python interpreter handy for hands-on experience, but all examples are self-" "contained, so the tutorial can be read off-line as well." msgstr "" -"این آموزش به‌طور غیررسمی مفاهیم و ویژگی‌های پایه‌ای زبان و سیستم پایتون را به " -"خواننده معرفی می‌کند. داشتن مفسر پایتون برای تجربه‌ی عملی مفید است، اما همه‌ی " -"مثال‌ها به صورت مستقل هستند، بنابراین این آموزش را می‌توان به‌صورت آفلاین نیز " -"مطالعه کرد." -#: ../../tutorial/index.rst:28 +#: ../../tutorial/index.rst:33 msgid "" "For a description of standard objects and modules, see :ref:`library-" "index`. :ref:`reference-index` gives a more formal definition of the " @@ -89,7 +92,7 @@ msgstr "" "مطالعه کنید. همچنین چندین کتاب وجود دارد که به طور عمیق به زبان پایتون " "پرداخته‌اند." -#: ../../tutorial/index.rst:33 +#: ../../tutorial/index.rst:38 msgid "" "This tutorial does not attempt to be comprehensive and cover every single " "feature, or even every commonly used feature. Instead, it introduces many of " @@ -105,6 +108,6 @@ msgstr "" "مورد ماژول‌های کتابخانه مختلف پایتون که در :ref:`library-index` توضیح داده " "شده‌اند، بیشتر یاد بگیرید." -#: ../../tutorial/index.rst:40 +#: ../../tutorial/index.rst:45 msgid "The :ref:`glossary` is also worth going through." msgstr ":ref:`glossary` نیز ارزش مرور کردن دارد." diff --git a/tutorial/inputoutput.po b/tutorial/inputoutput.po index 531a921b4..ac10d90a4 100644 --- a/tutorial/inputoutput.po +++ b/tutorial/inputoutput.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:50+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/tutorial/interactive.po b/tutorial/interactive.po index ff7c70bfb..3b1df1b2e 100644 --- a/tutorial/interactive.po +++ b/tutorial/interactive.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-06-27 14:20+0000\n" "PO-Revision-Date: 2021-06-28 01:50+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/tutorial/interpreter.po b/tutorial/interpreter.po index 08d118fd1..96958a818 100644 --- a/tutorial/interpreter.po +++ b/tutorial/interpreter.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 01:50+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/tutorial/introduction.po b/tutorial/introduction.po index 32dd18f83..3b2f87df1 100644 --- a/tutorial/introduction.po +++ b/tutorial/introduction.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-06-27 14:20+0000\n" "PO-Revision-Date: 2021-06-28 01:50+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" @@ -38,13 +38,12 @@ msgstr "" #: ../../tutorial/introduction.rst:16 msgid "" -"You can toggle the display of prompts and output by clicking on ``>>>`` in " -"the upper-right corner of an example box. If you hide the prompts and " -"output for an example, then you can easily copy and paste the input lines " -"into your interpreter." +"You can use the \"Copy\" button (it appears in the upper-right corner when " +"hovering over or tapping a code example), which strips prompts and omits " +"output, to copy and paste the input lines into your interpreter." msgstr "" -#: ../../tutorial/introduction.rst:23 +#: ../../tutorial/introduction.rst:22 msgid "" "Many of the examples in this manual, even those entered at the interactive " "prompt, include comments. Comments in Python start with the hash character, " @@ -55,11 +54,11 @@ msgid "" "may be omitted when typing in examples." msgstr "" -#: ../../tutorial/introduction.rst:31 +#: ../../tutorial/introduction.rst:30 msgid "Some examples::" msgstr "" -#: ../../tutorial/introduction.rst:33 +#: ../../tutorial/introduction.rst:32 msgid "" "# this is the first comment\n" "spam = 1 # and this is the second comment\n" @@ -67,21 +66,21 @@ msgid "" "text = \"# This is not a comment because it's inside quotes.\"" msgstr "" -#: ../../tutorial/introduction.rst:42 +#: ../../tutorial/introduction.rst:41 msgid "Using Python as a Calculator" msgstr "" -#: ../../tutorial/introduction.rst:44 +#: ../../tutorial/introduction.rst:43 msgid "" "Let's try some simple Python commands. Start the interpreter and wait for " "the primary prompt, ``>>>``. (It shouldn't take long.)" msgstr "" -#: ../../tutorial/introduction.rst:51 +#: ../../tutorial/introduction.rst:50 msgid "Numbers" msgstr "" -#: ../../tutorial/introduction.rst:53 +#: ../../tutorial/introduction.rst:52 msgid "" "The interpreter acts as a simple calculator: you can type an expression at " "it and it will write the value. Expression syntax is straightforward: the " @@ -89,7 +88,7 @@ msgid "" "parentheses (``()``) can be used for grouping. For example::" msgstr "" -#: ../../tutorial/introduction.rst:59 +#: ../../tutorial/introduction.rst:58 msgid "" ">>> 2 + 2\n" "4\n" @@ -101,21 +100,21 @@ msgid "" "1.6" msgstr "" -#: ../../tutorial/introduction.rst:68 +#: ../../tutorial/introduction.rst:67 msgid "" "The integer numbers (e.g. ``2``, ``4``, ``20``) have type :class:`int`, the " "ones with a fractional part (e.g. ``5.0``, ``1.6``) have type :class:" "`float`. We will see more about numeric types later in the tutorial." msgstr "" -#: ../../tutorial/introduction.rst:72 +#: ../../tutorial/introduction.rst:71 msgid "" "Division (``/``) always returns a float. To do :term:`floor division` and " "get an integer result you can use the ``//`` operator; to calculate the " "remainder you can use ``%``::" msgstr "" -#: ../../tutorial/introduction.rst:76 +#: ../../tutorial/introduction.rst:75 msgid "" ">>> 17 / 3 # classic division returns a float\n" "5.666666666666667\n" @@ -128,13 +127,13 @@ msgid "" "17" msgstr "" -#: ../../tutorial/introduction.rst:86 +#: ../../tutorial/introduction.rst:85 msgid "" "With Python, it is possible to use the ``**`` operator to calculate powers " "[#]_::" msgstr "" -#: ../../tutorial/introduction.rst:88 +#: ../../tutorial/introduction.rst:87 msgid "" ">>> 5 ** 2 # 5 squared\n" "25\n" @@ -142,13 +141,13 @@ msgid "" "128" msgstr "" -#: ../../tutorial/introduction.rst:93 +#: ../../tutorial/introduction.rst:92 msgid "" "The equal sign (``=``) is used to assign a value to a variable. Afterwards, " "no result is displayed before the next interactive prompt::" msgstr "" -#: ../../tutorial/introduction.rst:96 +#: ../../tutorial/introduction.rst:95 msgid "" ">>> width = 20\n" ">>> height = 5 * 9\n" @@ -156,13 +155,13 @@ msgid "" "900" msgstr "" -#: ../../tutorial/introduction.rst:101 +#: ../../tutorial/introduction.rst:100 msgid "" "If a variable is not \"defined\" (assigned a value), trying to use it will " "give you an error::" msgstr "" -#: ../../tutorial/introduction.rst:104 +#: ../../tutorial/introduction.rst:103 msgid "" ">>> n # try to access an undefined variable\n" "Traceback (most recent call last):\n" @@ -170,26 +169,26 @@ msgid "" "NameError: name 'n' is not defined" msgstr "" -#: ../../tutorial/introduction.rst:109 +#: ../../tutorial/introduction.rst:108 msgid "" "There is full support for floating point; operators with mixed type operands " "convert the integer operand to floating point::" msgstr "" -#: ../../tutorial/introduction.rst:112 +#: ../../tutorial/introduction.rst:111 msgid "" ">>> 4 * 3.75 - 1\n" "14.0" msgstr "" -#: ../../tutorial/introduction.rst:115 +#: ../../tutorial/introduction.rst:114 msgid "" "In interactive mode, the last printed expression is assigned to the variable " "``_``. This means that when you are using Python as a desk calculator, it " "is somewhat easier to continue calculations, for example::" msgstr "" -#: ../../tutorial/introduction.rst:119 +#: ../../tutorial/introduction.rst:118 msgid "" ">>> tax = 12.5 / 100\n" ">>> price = 100.50\n" @@ -201,14 +200,14 @@ msgid "" "113.06" msgstr "" -#: ../../tutorial/introduction.rst:128 +#: ../../tutorial/introduction.rst:127 msgid "" "This variable should be treated as read-only by the user. Don't explicitly " "assign a value to it --- you would create an independent local variable with " "the same name masking the built-in variable with its magic behavior." msgstr "" -#: ../../tutorial/introduction.rst:132 +#: ../../tutorial/introduction.rst:131 msgid "" "In addition to :class:`int` and :class:`float`, Python supports other types " "of numbers, such as :class:`~decimal.Decimal` and :class:`~fractions." @@ -217,11 +216,11 @@ msgid "" "imaginary part (e.g. ``3+5j``)." msgstr "" -#: ../../tutorial/introduction.rst:142 +#: ../../tutorial/introduction.rst:141 msgid "Text" msgstr "" -#: ../../tutorial/introduction.rst:144 +#: ../../tutorial/introduction.rst:143 msgid "" "Python can manipulate text (represented by type :class:`str`, so-called " "\"strings\") as well as numbers. This includes characters \"``!``\", words " @@ -230,7 +229,7 @@ msgid "" "quotes (``\"...\"``) with the same result [#]_." msgstr "" -#: ../../tutorial/introduction.rst:150 +#: ../../tutorial/introduction.rst:149 msgid "" ">>> 'spam eggs' # single quotes\n" "'spam eggs'\n" @@ -240,13 +239,13 @@ msgid "" "'1975'" msgstr "" -#: ../../tutorial/introduction.rst:159 +#: ../../tutorial/introduction.rst:158 msgid "" "To quote a quote, we need to \"escape\" it, by preceding it with ``\\``. " "Alternatively, we can use the other type of quotation marks::" msgstr "" -#: ../../tutorial/introduction.rst:162 +#: ../../tutorial/introduction.rst:161 msgid "" ">>> 'doesn\\'t' # use \\' to escape the single quote...\n" "\"doesn't\"\n" @@ -260,7 +259,7 @@ msgid "" "'\"Isn\\'t,\" they said.'" msgstr "" -#: ../../tutorial/introduction.rst:173 +#: ../../tutorial/introduction.rst:172 msgid "" "In the Python shell, the string definition and output string can look " "different. The :func:`print` function produces a more readable output, by " @@ -268,7 +267,7 @@ msgid "" "characters::" msgstr "" -#: ../../tutorial/introduction.rst:177 +#: ../../tutorial/introduction.rst:176 msgid "" ">>> s = 'First line.\\nSecond line.' # \\n means newline\n" ">>> s # without print(), special characters are included in the string\n" @@ -279,14 +278,14 @@ msgid "" "Second line." msgstr "" -#: ../../tutorial/introduction.rst:184 +#: ../../tutorial/introduction.rst:183 msgid "" "If you don't want characters prefaced by ``\\`` to be interpreted as special " "characters, you can use *raw strings* by adding an ``r`` before the first " "quote::" msgstr "" -#: ../../tutorial/introduction.rst:188 +#: ../../tutorial/introduction.rst:187 msgid "" ">>> print('C:\\some\\name') # here \\n means newline!\n" "C:\\some\n" @@ -295,14 +294,14 @@ msgid "" "C:\\some\\name" msgstr "" -#: ../../tutorial/introduction.rst:194 +#: ../../tutorial/introduction.rst:193 msgid "" "There is one subtle aspect to raw strings: a raw string may not end in an " "odd number of ``\\`` characters; see :ref:`the FAQ entry ` for more information and workarounds." msgstr "" -#: ../../tutorial/introduction.rst:199 +#: ../../tutorial/introduction.rst:198 msgid "" "String literals can span multiple lines. One way is using triple-quotes: " "``\"\"\"...\"\"\"`` or ``'''...'''``. End-of-line characters are " @@ -311,7 +310,7 @@ msgid "" "initial newline is not included::" msgstr "" -#: ../../tutorial/introduction.rst:205 +#: ../../tutorial/introduction.rst:204 msgid "" ">>> print(\"\"\"\\\n" "... Usage: thingy [OPTIONS]\n" @@ -325,37 +324,37 @@ msgid "" ">>>" msgstr "" -#: ../../tutorial/introduction.rst:216 +#: ../../tutorial/introduction.rst:215 msgid "" "Strings can be concatenated (glued together) with the ``+`` operator, and " "repeated with ``*``::" msgstr "" -#: ../../tutorial/introduction.rst:219 +#: ../../tutorial/introduction.rst:218 msgid "" ">>> # 3 times 'un', followed by 'ium'\n" ">>> 3 * 'un' + 'ium'\n" "'unununium'" msgstr "" -#: ../../tutorial/introduction.rst:223 +#: ../../tutorial/introduction.rst:222 msgid "" "Two or more *string literals* (i.e. the ones enclosed between quotes) next " "to each other are automatically concatenated. ::" msgstr "" -#: ../../tutorial/introduction.rst:226 +#: ../../tutorial/introduction.rst:225 msgid "" ">>> 'Py' 'thon'\n" "'Python'" msgstr "" -#: ../../tutorial/introduction.rst:229 +#: ../../tutorial/introduction.rst:228 msgid "" "This feature is particularly useful when you want to break long strings::" msgstr "" -#: ../../tutorial/introduction.rst:231 +#: ../../tutorial/introduction.rst:230 msgid "" ">>> text = ('Put several strings within parentheses '\n" "... 'to have them joined together.')\n" @@ -363,12 +362,12 @@ msgid "" "'Put several strings within parentheses to have them joined together.'" msgstr "" -#: ../../tutorial/introduction.rst:236 +#: ../../tutorial/introduction.rst:235 msgid "" "This only works with two literals though, not with variables or expressions::" msgstr "" -#: ../../tutorial/introduction.rst:238 +#: ../../tutorial/introduction.rst:237 msgid "" ">>> prefix = 'Py'\n" ">>> prefix 'thon' # can't concatenate a variable and a string literal\n" @@ -383,25 +382,25 @@ msgid "" "SyntaxError: invalid syntax" msgstr "" -#: ../../tutorial/introduction.rst:250 +#: ../../tutorial/introduction.rst:249 msgid "" "If you want to concatenate variables or a variable and a literal, use ``+``::" msgstr "" -#: ../../tutorial/introduction.rst:252 +#: ../../tutorial/introduction.rst:251 msgid "" ">>> prefix + 'thon'\n" "'Python'" msgstr "" -#: ../../tutorial/introduction.rst:255 +#: ../../tutorial/introduction.rst:254 msgid "" "Strings can be *indexed* (subscripted), with the first character having " "index 0. There is no separate character type; a character is simply a string " "of size one::" msgstr "" -#: ../../tutorial/introduction.rst:259 +#: ../../tutorial/introduction.rst:258 msgid "" ">>> word = 'Python'\n" ">>> word[0] # character in position 0\n" @@ -410,12 +409,12 @@ msgid "" "'n'" msgstr "" -#: ../../tutorial/introduction.rst:265 +#: ../../tutorial/introduction.rst:264 msgid "" "Indices may also be negative numbers, to start counting from the right::" msgstr "" -#: ../../tutorial/introduction.rst:267 +#: ../../tutorial/introduction.rst:266 msgid "" ">>> word[-1] # last character\n" "'n'\n" @@ -425,18 +424,18 @@ msgid "" "'P'" msgstr "" -#: ../../tutorial/introduction.rst:274 +#: ../../tutorial/introduction.rst:273 msgid "Note that since -0 is the same as 0, negative indices start from -1." msgstr "" -#: ../../tutorial/introduction.rst:276 +#: ../../tutorial/introduction.rst:275 msgid "" "In addition to indexing, *slicing* is also supported. While indexing is " "used to obtain individual characters, *slicing* allows you to obtain a " "substring::" msgstr "" -#: ../../tutorial/introduction.rst:279 +#: ../../tutorial/introduction.rst:278 msgid "" ">>> word[0:2] # characters from position 0 (included) to 2 (excluded)\n" "'Py'\n" @@ -444,13 +443,13 @@ msgid "" "'tho'" msgstr "" -#: ../../tutorial/introduction.rst:284 +#: ../../tutorial/introduction.rst:283 msgid "" "Slice indices have useful defaults; an omitted first index defaults to zero, " "an omitted second index defaults to the size of the string being sliced. ::" msgstr "" -#: ../../tutorial/introduction.rst:287 +#: ../../tutorial/introduction.rst:286 msgid "" ">>> word[:2] # character from the beginning to position 2 (excluded)\n" "'Py'\n" @@ -460,13 +459,13 @@ msgid "" "'on'" msgstr "" -#: ../../tutorial/introduction.rst:294 +#: ../../tutorial/introduction.rst:293 msgid "" "Note how the start is always included, and the end always excluded. This " "makes sure that ``s[:i] + s[i:]`` is always equal to ``s``::" msgstr "" -#: ../../tutorial/introduction.rst:297 +#: ../../tutorial/introduction.rst:296 msgid "" ">>> word[:2] + word[2:]\n" "'Python'\n" @@ -474,7 +473,7 @@ msgid "" "'Python'" msgstr "" -#: ../../tutorial/introduction.rst:302 +#: ../../tutorial/introduction.rst:301 msgid "" "One way to remember how slices work is to think of the indices as pointing " "*between* characters, with the left edge of the first character numbered 0. " @@ -482,7 +481,7 @@ msgid "" "index *n*, for example::" msgstr "" -#: ../../tutorial/introduction.rst:307 +#: ../../tutorial/introduction.rst:306 msgid "" " +---+---+---+---+---+---+\n" " | P | y | t | h | o | n |\n" @@ -491,7 +490,7 @@ msgid "" "-6 -5 -4 -3 -2 -1" msgstr "" -#: ../../tutorial/introduction.rst:313 +#: ../../tutorial/introduction.rst:312 msgid "" "The first row of numbers gives the position of the indices 0...6 in the " "string; the second row gives the corresponding negative indices. The slice " @@ -499,18 +498,18 @@ msgid "" "*j*, respectively." msgstr "" -#: ../../tutorial/introduction.rst:318 +#: ../../tutorial/introduction.rst:317 msgid "" "For non-negative indices, the length of a slice is the difference of the " "indices, if both are within bounds. For example, the length of " "``word[1:3]`` is 2." msgstr "" -#: ../../tutorial/introduction.rst:322 +#: ../../tutorial/introduction.rst:321 msgid "Attempting to use an index that is too large will result in an error::" msgstr "" -#: ../../tutorial/introduction.rst:324 +#: ../../tutorial/introduction.rst:323 msgid "" ">>> word[42] # the word only has 6 characters\n" "Traceback (most recent call last):\n" @@ -518,13 +517,13 @@ msgid "" "IndexError: string index out of range" msgstr "" -#: ../../tutorial/introduction.rst:329 +#: ../../tutorial/introduction.rst:328 msgid "" "However, out of range slice indexes are handled gracefully when used for " "slicing::" msgstr "" -#: ../../tutorial/introduction.rst:332 +#: ../../tutorial/introduction.rst:331 msgid "" ">>> word[4:42]\n" "'on'\n" @@ -532,13 +531,13 @@ msgid "" "''" msgstr "" -#: ../../tutorial/introduction.rst:337 +#: ../../tutorial/introduction.rst:336 msgid "" "Python strings cannot be changed --- they are :term:`immutable`. Therefore, " "assigning to an indexed position in the string results in an error::" msgstr "" -#: ../../tutorial/introduction.rst:340 +#: ../../tutorial/introduction.rst:339 msgid "" ">>> word[0] = 'J'\n" "Traceback (most recent call last):\n" @@ -550,11 +549,11 @@ msgid "" "TypeError: 'str' object does not support item assignment" msgstr "" -#: ../../tutorial/introduction.rst:349 +#: ../../tutorial/introduction.rst:348 msgid "If you need a different string, you should create a new one::" msgstr "" -#: ../../tutorial/introduction.rst:351 +#: ../../tutorial/introduction.rst:350 msgid "" ">>> 'J' + word[1:]\n" "'Jython'\n" @@ -562,68 +561,68 @@ msgid "" "'Pypy'" msgstr "" -#: ../../tutorial/introduction.rst:356 +#: ../../tutorial/introduction.rst:355 msgid "The built-in function :func:`len` returns the length of a string::" msgstr "" -#: ../../tutorial/introduction.rst:358 +#: ../../tutorial/introduction.rst:357 msgid "" ">>> s = 'supercalifragilisticexpialidocious'\n" ">>> len(s)\n" "34" msgstr "" -#: ../../tutorial/introduction.rst:365 +#: ../../tutorial/introduction.rst:364 msgid ":ref:`textseq`" msgstr "" -#: ../../tutorial/introduction.rst:366 +#: ../../tutorial/introduction.rst:365 msgid "" "Strings are examples of *sequence types*, and support the common operations " "supported by such types." msgstr "" -#: ../../tutorial/introduction.rst:369 +#: ../../tutorial/introduction.rst:368 msgid ":ref:`string-methods`" msgstr "" -#: ../../tutorial/introduction.rst:370 +#: ../../tutorial/introduction.rst:369 msgid "" "Strings support a large number of methods for basic transformations and " "searching." msgstr "" -#: ../../tutorial/introduction.rst:373 +#: ../../tutorial/introduction.rst:372 msgid ":ref:`f-strings`" msgstr "" -#: ../../tutorial/introduction.rst:374 +#: ../../tutorial/introduction.rst:373 msgid "String literals that have embedded expressions." msgstr "" -#: ../../tutorial/introduction.rst:376 +#: ../../tutorial/introduction.rst:375 msgid ":ref:`formatstrings`" msgstr "" -#: ../../tutorial/introduction.rst:377 +#: ../../tutorial/introduction.rst:376 msgid "Information about string formatting with :meth:`str.format`." msgstr "" -#: ../../tutorial/introduction.rst:379 +#: ../../tutorial/introduction.rst:378 msgid ":ref:`old-string-formatting`" msgstr "" -#: ../../tutorial/introduction.rst:380 +#: ../../tutorial/introduction.rst:379 msgid "" "The old formatting operations invoked when strings are the left operand of " "the ``%`` operator are described in more detail here." msgstr "" -#: ../../tutorial/introduction.rst:387 +#: ../../tutorial/introduction.rst:386 msgid "Lists" msgstr "" -#: ../../tutorial/introduction.rst:389 +#: ../../tutorial/introduction.rst:388 msgid "" "Python knows a number of *compound* data types, used to group together other " "values. The most versatile is the *list*, which can be written as a list of " @@ -631,20 +630,20 @@ msgid "" "items of different types, but usually the items all have the same type. ::" msgstr "" -#: ../../tutorial/introduction.rst:394 +#: ../../tutorial/introduction.rst:393 msgid "" ">>> squares = [1, 4, 9, 16, 25]\n" ">>> squares\n" "[1, 4, 9, 16, 25]" msgstr "" -#: ../../tutorial/introduction.rst:398 +#: ../../tutorial/introduction.rst:397 msgid "" "Like strings (and all other built-in :term:`sequence` types), lists can be " "indexed and sliced::" msgstr "" -#: ../../tutorial/introduction.rst:401 +#: ../../tutorial/introduction.rst:400 msgid "" ">>> squares[0] # indexing returns the item\n" "1\n" @@ -654,23 +653,23 @@ msgid "" "[9, 16, 25]" msgstr "" -#: ../../tutorial/introduction.rst:408 +#: ../../tutorial/introduction.rst:407 msgid "Lists also support operations like concatenation::" msgstr "" -#: ../../tutorial/introduction.rst:410 +#: ../../tutorial/introduction.rst:409 msgid "" ">>> squares + [36, 49, 64, 81, 100]\n" "[1, 4, 9, 16, 25, 36, 49, 64, 81, 100]" msgstr "" -#: ../../tutorial/introduction.rst:413 +#: ../../tutorial/introduction.rst:412 msgid "" "Unlike strings, which are :term:`immutable`, lists are a :term:`mutable` " "type, i.e. it is possible to change their content::" msgstr "" -#: ../../tutorial/introduction.rst:416 +#: ../../tutorial/introduction.rst:415 msgid "" ">>> cubes = [1, 8, 27, 65, 125] # something's wrong here\n" ">>> 4 ** 3 # the cube of 4 is 64, not 65!\n" @@ -680,13 +679,13 @@ msgid "" "[1, 8, 27, 64, 125]" msgstr "" -#: ../../tutorial/introduction.rst:423 +#: ../../tutorial/introduction.rst:422 msgid "" "You can also add new items at the end of the list, by using the :meth:`!list." "append` *method* (we will see more about methods later)::" msgstr "" -#: ../../tutorial/introduction.rst:426 +#: ../../tutorial/introduction.rst:425 msgid "" ">>> cubes.append(216) # add the cube of 6\n" ">>> cubes.append(7 ** 3) # and the cube of 7\n" @@ -694,7 +693,7 @@ msgid "" "[1, 8, 27, 64, 125, 216, 343]" msgstr "" -#: ../../tutorial/introduction.rst:431 +#: ../../tutorial/introduction.rst:430 msgid "" "Simple assignment in Python never copies data. When you assign a list to a " "variable, the variable refers to the *existing list*. Any changes you make " @@ -702,7 +701,7 @@ msgid "" "that refer to it.::" msgstr "" -#: ../../tutorial/introduction.rst:436 +#: ../../tutorial/introduction.rst:435 msgid "" ">>> rgb = [\"Red\", \"Green\", \"Blue\"]\n" ">>> rgba = rgb\n" @@ -713,14 +712,14 @@ msgid "" "[\"Red\", \"Green\", \"Blue\", \"Alph\"]" msgstr "" -#: ../../tutorial/introduction.rst:444 +#: ../../tutorial/introduction.rst:443 msgid "" "All slice operations return a new list containing the requested elements. " "This means that the following slice returns a :ref:`shallow copy " "` of the list::" msgstr "" -#: ../../tutorial/introduction.rst:448 +#: ../../tutorial/introduction.rst:447 msgid "" ">>> correct_rgba = rgba[:]\n" ">>> correct_rgba[-1] = \"Alpha\"\n" @@ -730,13 +729,13 @@ msgid "" "[\"Red\", \"Green\", \"Blue\", \"Alph\"]" msgstr "" -#: ../../tutorial/introduction.rst:455 +#: ../../tutorial/introduction.rst:454 msgid "" "Assignment to slices is also possible, and this can even change the size of " "the list or clear it entirely::" msgstr "" -#: ../../tutorial/introduction.rst:458 +#: ../../tutorial/introduction.rst:457 msgid "" ">>> letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g']\n" ">>> letters\n" @@ -755,24 +754,24 @@ msgid "" "[]" msgstr "" -#: ../../tutorial/introduction.rst:474 +#: ../../tutorial/introduction.rst:473 msgid "The built-in function :func:`len` also applies to lists::" msgstr "" -#: ../../tutorial/introduction.rst:476 +#: ../../tutorial/introduction.rst:475 msgid "" ">>> letters = ['a', 'b', 'c', 'd']\n" ">>> len(letters)\n" "4" msgstr "" -#: ../../tutorial/introduction.rst:480 +#: ../../tutorial/introduction.rst:479 msgid "" "It is possible to nest lists (create lists containing other lists), for " "example::" msgstr "" -#: ../../tutorial/introduction.rst:483 +#: ../../tutorial/introduction.rst:482 msgid "" ">>> a = ['a', 'b', 'c']\n" ">>> n = [1, 2, 3]\n" @@ -785,11 +784,11 @@ msgid "" "'b'" msgstr "" -#: ../../tutorial/introduction.rst:496 +#: ../../tutorial/introduction.rst:495 msgid "First Steps Towards Programming" msgstr "" -#: ../../tutorial/introduction.rst:498 +#: ../../tutorial/introduction.rst:497 msgid "" "Of course, we can use Python for more complicated tasks than adding two and " "two together. For instance, we can write an initial sub-sequence of the " @@ -797,7 +796,7 @@ msgid "" "follows::" msgstr "" -#: ../../tutorial/introduction.rst:503 +#: ../../tutorial/introduction.rst:502 msgid "" ">>> # Fibonacci series:\n" ">>> # the sum of two elements defines the next\n" @@ -815,11 +814,11 @@ msgid "" "8" msgstr "" -#: ../../tutorial/introduction.rst:518 +#: ../../tutorial/introduction.rst:517 msgid "This example introduces several new features." msgstr "" -#: ../../tutorial/introduction.rst:520 +#: ../../tutorial/introduction.rst:519 msgid "" "The first line contains a *multiple assignment*: the variables ``a`` and " "``b`` simultaneously get the new values 0 and 1. On the last line this is " @@ -828,7 +827,7 @@ msgid "" "hand side expressions are evaluated from the left to the right." msgstr "" -#: ../../tutorial/introduction.rst:526 +#: ../../tutorial/introduction.rst:525 msgid "" "The :keyword:`while` loop executes as long as the condition (here: ``a < " "10``) remains true. In Python, like in C, any non-zero integer value is " @@ -840,7 +839,7 @@ msgid "" "to), ``>=`` (greater than or equal to) and ``!=`` (not equal to)." msgstr "" -#: ../../tutorial/introduction.rst:535 +#: ../../tutorial/introduction.rst:534 msgid "" "The *body* of the loop is *indented*: indentation is Python's way of " "grouping statements. At the interactive prompt, you have to type a tab or " @@ -852,7 +851,7 @@ msgid "" "that each line within a basic block must be indented by the same amount." msgstr "" -#: ../../tutorial/introduction.rst:544 +#: ../../tutorial/introduction.rst:543 msgid "" "The :func:`print` function writes the value of the argument(s) it is given. " "It differs from just writing the expression you want to write (as we did " @@ -862,20 +861,20 @@ msgid "" "things nicely, like this::" msgstr "" -#: ../../tutorial/introduction.rst:551 +#: ../../tutorial/introduction.rst:550 msgid "" ">>> i = 256*256\n" ">>> print('The value of i is', i)\n" "The value of i is 65536" msgstr "" -#: ../../tutorial/introduction.rst:555 +#: ../../tutorial/introduction.rst:554 msgid "" "The keyword argument *end* can be used to avoid the newline after the " "output, or end the output with a different string::" msgstr "" -#: ../../tutorial/introduction.rst:558 +#: ../../tutorial/introduction.rst:557 msgid "" ">>> a, b = 0, 1\n" ">>> while a < 1000:\n" @@ -885,18 +884,18 @@ msgid "" "0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987," msgstr "" -#: ../../tutorial/introduction.rst:567 +#: ../../tutorial/introduction.rst:566 msgid "Footnotes" msgstr "" -#: ../../tutorial/introduction.rst:568 +#: ../../tutorial/introduction.rst:567 msgid "" "Since ``**`` has higher precedence than ``-``, ``-3**2`` will be interpreted " "as ``-(3**2)`` and thus result in ``-9``. To avoid this and get ``9``, you " "can use ``(-3)**2``." msgstr "" -#: ../../tutorial/introduction.rst:572 +#: ../../tutorial/introduction.rst:571 msgid "" "Unlike other languages, special characters such as ``\\n`` have the same " "meaning with both single (``'...'``) and double (``\"...\"``) quotes. The " @@ -904,10 +903,10 @@ msgid "" "to escape ``\"`` (but you have to escape ``\\'``) and vice versa." msgstr "" -#: ../../tutorial/introduction.rst:21 +#: ../../tutorial/introduction.rst:20 msgid "# (hash)" msgstr "" -#: ../../tutorial/introduction.rst:21 +#: ../../tutorial/introduction.rst:20 msgid "comment" msgstr "" diff --git a/tutorial/modules.po b/tutorial/modules.po index 8ca6f219c..c91e66ab5 100644 --- a/tutorial/modules.po +++ b/tutorial/modules.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:50+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" @@ -61,14 +61,16 @@ msgstr "" msgid "" "# Fibonacci numbers module\n" "\n" -"def fib(n): # write Fibonacci series up to n\n" +"def fib(n):\n" +" \"\"\"Write Fibonacci series up to n.\"\"\"\n" " a, b = 0, 1\n" " while a < n:\n" " print(a, end=' ')\n" " a, b = b, a+b\n" " print()\n" "\n" -"def fib2(n): # return Fibonacci series up to n\n" +"def fib2(n):\n" +" \"\"\"Return Fibonacci series up to n.\"\"\"\n" " result = []\n" " a, b = 0, 1\n" " while a < n:\n" @@ -77,17 +79,17 @@ msgid "" " return result" msgstr "" -#: ../../tutorial/modules.rst:45 +#: ../../tutorial/modules.rst:47 msgid "" "Now enter the Python interpreter and import this module with the following " "command::" msgstr "" -#: ../../tutorial/modules.rst:48 +#: ../../tutorial/modules.rst:50 msgid ">>> import fibo" msgstr "" -#: ../../tutorial/modules.rst:50 +#: ../../tutorial/modules.rst:52 msgid "" "This does not add the names of the functions defined in ``fibo`` directly " "to the current :term:`namespace` (see :ref:`tut-scopes` for more details); " @@ -95,7 +97,7 @@ msgid "" "access the functions::" msgstr "" -#: ../../tutorial/modules.rst:55 +#: ../../tutorial/modules.rst:57 msgid "" ">>> fibo.fib(1000)\n" "0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987\n" @@ -105,23 +107,23 @@ msgid "" "'fibo'" msgstr "" -#: ../../tutorial/modules.rst:62 +#: ../../tutorial/modules.rst:64 msgid "" "If you intend to use a function often you can assign it to a local name::" msgstr "" -#: ../../tutorial/modules.rst:64 +#: ../../tutorial/modules.rst:66 msgid "" ">>> fib = fibo.fib\n" ">>> fib(500)\n" "0 1 1 2 3 5 8 13 21 34 55 89 144 233 377" msgstr "" -#: ../../tutorial/modules.rst:72 +#: ../../tutorial/modules.rst:74 msgid "More on Modules" msgstr "" -#: ../../tutorial/modules.rst:74 +#: ../../tutorial/modules.rst:76 msgid "" "A module can contain executable statements as well as function definitions. " "These statements are intended to initialize the module. They are executed " @@ -129,7 +131,7 @@ msgid "" "[#]_ (They are also run if the file is executed as a script.)" msgstr "" -#: ../../tutorial/modules.rst:79 +#: ../../tutorial/modules.rst:81 msgid "" "Each module has its own private namespace, which is used as the global " "namespace by all functions defined in the module. Thus, the author of a " @@ -139,7 +141,7 @@ msgid "" "same notation used to refer to its functions, ``modname.itemname``." msgstr "" -#: ../../tutorial/modules.rst:86 +#: ../../tutorial/modules.rst:88 msgid "" "Modules can import other modules. It is customary but not required to place " "all :keyword:`import` statements at the beginning of a module (or script, " @@ -148,37 +150,37 @@ msgid "" "global namespace." msgstr "" -#: ../../tutorial/modules.rst:91 +#: ../../tutorial/modules.rst:93 msgid "" "There is a variant of the :keyword:`import` statement that imports names " "from a module directly into the importing module's namespace. For example::" msgstr "" -#: ../../tutorial/modules.rst:94 +#: ../../tutorial/modules.rst:96 msgid "" ">>> from fibo import fib, fib2\n" ">>> fib(500)\n" "0 1 1 2 3 5 8 13 21 34 55 89 144 233 377" msgstr "" -#: ../../tutorial/modules.rst:98 +#: ../../tutorial/modules.rst:100 msgid "" "This does not introduce the module name from which the imports are taken in " "the local namespace (so in the example, ``fibo`` is not defined)." msgstr "" -#: ../../tutorial/modules.rst:101 +#: ../../tutorial/modules.rst:103 msgid "There is even a variant to import all names that a module defines::" msgstr "" -#: ../../tutorial/modules.rst:103 +#: ../../tutorial/modules.rst:105 msgid "" ">>> from fibo import *\n" ">>> fib(500)\n" "0 1 1 2 3 5 8 13 21 34 55 89 144 233 377" msgstr "" -#: ../../tutorial/modules.rst:107 +#: ../../tutorial/modules.rst:109 msgid "" "This imports all names except those beginning with an underscore (``_``). In " "most cases Python programmers do not use this facility since it introduces " @@ -186,45 +188,45 @@ msgid "" "you have already defined." msgstr "" -#: ../../tutorial/modules.rst:112 +#: ../../tutorial/modules.rst:114 msgid "" "Note that in general the practice of importing ``*`` from a module or " "package is frowned upon, since it often causes poorly readable code. " "However, it is okay to use it to save typing in interactive sessions." msgstr "" -#: ../../tutorial/modules.rst:116 +#: ../../tutorial/modules.rst:118 msgid "" "If the module name is followed by :keyword:`!as`, then the name following :" "keyword:`!as` is bound directly to the imported module." msgstr "" -#: ../../tutorial/modules.rst:121 +#: ../../tutorial/modules.rst:123 msgid "" ">>> import fibo as fib\n" ">>> fib.fib(500)\n" "0 1 1 2 3 5 8 13 21 34 55 89 144 233 377" msgstr "" -#: ../../tutorial/modules.rst:125 +#: ../../tutorial/modules.rst:127 msgid "" "This is effectively importing the module in the same way that ``import " "fibo`` will do, with the only difference of it being available as ``fib``." msgstr "" -#: ../../tutorial/modules.rst:128 +#: ../../tutorial/modules.rst:130 msgid "" "It can also be used when utilising :keyword:`from` with similar effects::" msgstr "" -#: ../../tutorial/modules.rst:130 +#: ../../tutorial/modules.rst:132 msgid "" ">>> from fibo import fib as fibonacci\n" ">>> fibonacci(500)\n" "0 1 1 2 3 5 8 13 21 34 55 89 144 233 377" msgstr "" -#: ../../tutorial/modules.rst:137 +#: ../../tutorial/modules.rst:139 msgid "" "For efficiency reasons, each module is only imported once per interpreter " "session. Therefore, if you change your modules, you must restart the " @@ -233,67 +235,67 @@ msgid "" "reload(modulename)``." msgstr "" -#: ../../tutorial/modules.rst:147 +#: ../../tutorial/modules.rst:149 msgid "Executing modules as scripts" msgstr "" -#: ../../tutorial/modules.rst:149 +#: ../../tutorial/modules.rst:151 msgid "When you run a Python module with ::" msgstr "" -#: ../../tutorial/modules.rst:151 +#: ../../tutorial/modules.rst:153 msgid "python fibo.py " msgstr "" -#: ../../tutorial/modules.rst:153 +#: ../../tutorial/modules.rst:155 msgid "" "the code in the module will be executed, just as if you imported it, but " "with the ``__name__`` set to ``\"__main__\"``. That means that by adding " "this code at the end of your module::" msgstr "" -#: ../../tutorial/modules.rst:157 +#: ../../tutorial/modules.rst:159 msgid "" "if __name__ == \"__main__\":\n" " import sys\n" " fib(int(sys.argv[1]))" msgstr "" -#: ../../tutorial/modules.rst:161 +#: ../../tutorial/modules.rst:163 msgid "" "you can make the file usable as a script as well as an importable module, " "because the code that parses the command line only runs if the module is " "executed as the \"main\" file:" msgstr "" -#: ../../tutorial/modules.rst:165 +#: ../../tutorial/modules.rst:167 msgid "" "$ python fibo.py 50\n" "0 1 1 2 3 5 8 13 21 34" msgstr "" -#: ../../tutorial/modules.rst:170 +#: ../../tutorial/modules.rst:172 msgid "If the module is imported, the code is not run::" msgstr "" -#: ../../tutorial/modules.rst:172 +#: ../../tutorial/modules.rst:174 msgid "" ">>> import fibo\n" ">>>" msgstr "" -#: ../../tutorial/modules.rst:175 +#: ../../tutorial/modules.rst:177 msgid "" "This is often used either to provide a convenient user interface to a " "module, or for testing purposes (running the module as a script executes a " "test suite)." msgstr "" -#: ../../tutorial/modules.rst:182 +#: ../../tutorial/modules.rst:184 msgid "The Module Search Path" msgstr "" -#: ../../tutorial/modules.rst:186 +#: ../../tutorial/modules.rst:188 msgid "" "When a module named :mod:`!spam` is imported, the interpreter first searches " "for a built-in module with that name. These module names are listed in :data:" @@ -302,36 +304,36 @@ msgid "" "path`. :data:`sys.path` is initialized from these locations:" msgstr "" -#: ../../tutorial/modules.rst:192 +#: ../../tutorial/modules.rst:194 msgid "" "The directory containing the input script (or the current directory when no " "file is specified)." msgstr "" -#: ../../tutorial/modules.rst:194 +#: ../../tutorial/modules.rst:196 msgid "" ":envvar:`PYTHONPATH` (a list of directory names, with the same syntax as the " "shell variable :envvar:`PATH`)." msgstr "" -#: ../../tutorial/modules.rst:196 +#: ../../tutorial/modules.rst:198 msgid "" "The installation-dependent default (by convention including a ``site-" "packages`` directory, handled by the :mod:`site` module)." msgstr "" -#: ../../tutorial/modules.rst:199 +#: ../../tutorial/modules.rst:201 msgid "More details are at :ref:`sys-path-init`." msgstr "" -#: ../../tutorial/modules.rst:202 +#: ../../tutorial/modules.rst:204 msgid "" "On file systems which support symlinks, the directory containing the input " "script is calculated after the symlink is followed. In other words the " "directory containing the symlink is **not** added to the module search path." msgstr "" -#: ../../tutorial/modules.rst:206 +#: ../../tutorial/modules.rst:208 msgid "" "After initialization, Python programs can modify :data:`sys.path`. The " "directory containing the script being run is placed at the beginning of the " @@ -341,11 +343,11 @@ msgid "" "section :ref:`tut-standardmodules` for more information." msgstr "" -#: ../../tutorial/modules.rst:219 +#: ../../tutorial/modules.rst:221 msgid "\"Compiled\" Python files" msgstr "" -#: ../../tutorial/modules.rst:221 +#: ../../tutorial/modules.rst:223 msgid "" "To speed up loading modules, Python caches the compiled version of each " "module in the ``__pycache__`` directory under the name :file:`module." @@ -356,7 +358,7 @@ msgid "" "different releases and different versions of Python to coexist." msgstr "" -#: ../../tutorial/modules.rst:229 +#: ../../tutorial/modules.rst:231 msgid "" "Python checks the modification date of the source against the compiled " "version to see if it's out of date and needs to be recompiled. This is a " @@ -365,7 +367,7 @@ msgid "" "architectures." msgstr "" -#: ../../tutorial/modules.rst:234 +#: ../../tutorial/modules.rst:236 msgid "" "Python does not check the cache in two circumstances. First, it always " "recompiles and does not store the result for the module that's loaded " @@ -375,11 +377,11 @@ msgid "" "must not be a source module." msgstr "" -#: ../../tutorial/modules.rst:241 +#: ../../tutorial/modules.rst:243 msgid "Some tips for experts:" msgstr "" -#: ../../tutorial/modules.rst:243 +#: ../../tutorial/modules.rst:245 msgid "" "You can use the :option:`-O` or :option:`-OO` switches on the Python command " "to reduce the size of a compiled module. The ``-O`` switch removes assert " @@ -390,30 +392,30 @@ msgid "" "the effects of optimization." msgstr "" -#: ../../tutorial/modules.rst:251 +#: ../../tutorial/modules.rst:253 msgid "" "A program doesn't run any faster when it is read from a ``.pyc`` file than " "when it is read from a ``.py`` file; the only thing that's faster about ``." "pyc`` files is the speed with which they are loaded." msgstr "" -#: ../../tutorial/modules.rst:255 +#: ../../tutorial/modules.rst:257 msgid "" "The module :mod:`compileall` can create .pyc files for all modules in a " "directory." msgstr "" -#: ../../tutorial/modules.rst:258 +#: ../../tutorial/modules.rst:260 msgid "" "There is more detail on this process, including a flow chart of the " "decisions, in :pep:`3147`." msgstr "" -#: ../../tutorial/modules.rst:265 +#: ../../tutorial/modules.rst:267 msgid "Standard Modules" msgstr "" -#: ../../tutorial/modules.rst:269 +#: ../../tutorial/modules.rst:271 msgid "" "Python comes with a library of standard modules, described in a separate " "document, the Python Library Reference (\"Library Reference\" hereafter). " @@ -428,7 +430,7 @@ msgid "" "define the strings used as primary and secondary prompts::" msgstr "" -#: ../../tutorial/modules.rst:281 +#: ../../tutorial/modules.rst:283 msgid "" ">>> import sys\n" ">>> sys.ps1\n" @@ -441,13 +443,13 @@ msgid "" "C>" msgstr "" -#: ../../tutorial/modules.rst:292 +#: ../../tutorial/modules.rst:294 msgid "" "These two variables are only defined if the interpreter is in interactive " "mode." msgstr "" -#: ../../tutorial/modules.rst:294 +#: ../../tutorial/modules.rst:296 msgid "" "The variable ``sys.path`` is a list of strings that determines the " "interpreter's search path for modules. It is initialized to a default path " @@ -456,23 +458,23 @@ msgid "" "standard list operations::" msgstr "" -#: ../../tutorial/modules.rst:300 +#: ../../tutorial/modules.rst:302 msgid "" ">>> import sys\n" ">>> sys.path.append('/ufs/guido/lib/python')" msgstr "" -#: ../../tutorial/modules.rst:307 +#: ../../tutorial/modules.rst:309 msgid "The :func:`dir` Function" msgstr "" -#: ../../tutorial/modules.rst:309 +#: ../../tutorial/modules.rst:311 msgid "" "The built-in function :func:`dir` is used to find out which names a module " "defines. It returns a sorted list of strings::" msgstr "" -#: ../../tutorial/modules.rst:312 +#: ../../tutorial/modules.rst:314 msgid "" ">>> import fibo, sys\n" ">>> dir(fibo)\n" @@ -508,12 +510,12 @@ msgid "" " 'warnoptions']" msgstr "" -#: ../../tutorial/modules.rst:338 +#: ../../tutorial/modules.rst:340 msgid "" "Without arguments, :func:`dir` lists the names you have defined currently::" msgstr "" -#: ../../tutorial/modules.rst:340 +#: ../../tutorial/modules.rst:342 msgid "" ">>> a = [1, 2, 3, 4, 5]\n" ">>> import fibo\n" @@ -522,19 +524,19 @@ msgid "" "['__builtins__', '__name__', 'a', 'fib', 'fibo', 'sys']" msgstr "" -#: ../../tutorial/modules.rst:346 +#: ../../tutorial/modules.rst:348 msgid "" "Note that it lists all types of names: variables, modules, functions, etc." msgstr "" -#: ../../tutorial/modules.rst:350 +#: ../../tutorial/modules.rst:352 msgid "" ":func:`dir` does not list the names of built-in functions and variables. If " "you want a list of those, they are defined in the standard module :mod:" "`builtins`::" msgstr "" -#: ../../tutorial/modules.rst:354 +#: ../../tutorial/modules.rst:356 msgid "" ">>> import builtins\n" ">>> dir(builtins)\n" @@ -570,11 +572,11 @@ msgid "" " 'zip']" msgstr "" -#: ../../tutorial/modules.rst:389 +#: ../../tutorial/modules.rst:391 msgid "Packages" msgstr "" -#: ../../tutorial/modules.rst:391 +#: ../../tutorial/modules.rst:393 msgid "" "Packages are a way of structuring Python's module namespace by using " "\"dotted module names\". For example, the module name :mod:`!A.B` " @@ -585,7 +587,7 @@ msgid "" "to worry about each other's module names." msgstr "" -#: ../../tutorial/modules.rst:399 +#: ../../tutorial/modules.rst:401 msgid "" "Suppose you want to design a collection of modules (a \"package\") for the " "uniform handling of sound files and sound data. There are many different " @@ -600,7 +602,7 @@ msgid "" "terms of a hierarchical filesystem):" msgstr "" -#: ../../tutorial/modules.rst:410 +#: ../../tutorial/modules.rst:412 msgid "" "sound/ Top-level package\n" " __init__.py Initialize the sound package\n" @@ -627,13 +629,13 @@ msgid "" " ..." msgstr "" -#: ../../tutorial/modules.rst:436 +#: ../../tutorial/modules.rst:438 msgid "" "When importing the package, Python searches through the directories on ``sys." "path`` looking for the package subdirectory." msgstr "" -#: ../../tutorial/modules.rst:439 +#: ../../tutorial/modules.rst:441 msgid "" "The :file:`__init__.py` files are required to make Python treat directories " "containing the file as packages (unless using a :term:`namespace package`, a " @@ -644,65 +646,65 @@ msgid "" "the package or set the ``__all__`` variable, described later." msgstr "" -#: ../../tutorial/modules.rst:447 +#: ../../tutorial/modules.rst:449 msgid "" "Users of the package can import individual modules from the package, for " "example::" msgstr "" -#: ../../tutorial/modules.rst:450 +#: ../../tutorial/modules.rst:452 msgid "import sound.effects.echo" msgstr "" -#: ../../tutorial/modules.rst:452 +#: ../../tutorial/modules.rst:454 msgid "" "This loads the submodule :mod:`!sound.effects.echo`. It must be referenced " "with its full name. ::" msgstr "" -#: ../../tutorial/modules.rst:455 +#: ../../tutorial/modules.rst:457 msgid "sound.effects.echo.echofilter(input, output, delay=0.7, atten=4)" msgstr "" -#: ../../tutorial/modules.rst:457 +#: ../../tutorial/modules.rst:459 msgid "An alternative way of importing the submodule is::" msgstr "" -#: ../../tutorial/modules.rst:459 +#: ../../tutorial/modules.rst:461 msgid "from sound.effects import echo" msgstr "" -#: ../../tutorial/modules.rst:461 +#: ../../tutorial/modules.rst:463 msgid "" "This also loads the submodule :mod:`!echo`, and makes it available without " "its package prefix, so it can be used as follows::" msgstr "" -#: ../../tutorial/modules.rst:464 +#: ../../tutorial/modules.rst:466 msgid "echo.echofilter(input, output, delay=0.7, atten=4)" msgstr "" -#: ../../tutorial/modules.rst:466 +#: ../../tutorial/modules.rst:468 msgid "" "Yet another variation is to import the desired function or variable " "directly::" msgstr "" -#: ../../tutorial/modules.rst:468 +#: ../../tutorial/modules.rst:470 msgid "from sound.effects.echo import echofilter" msgstr "" -#: ../../tutorial/modules.rst:470 +#: ../../tutorial/modules.rst:472 msgid "" "Again, this loads the submodule :mod:`!echo`, but this makes its function :" "func:`!echofilter` directly available::" msgstr "" -#: ../../tutorial/modules.rst:473 +#: ../../tutorial/modules.rst:475 msgid "echofilter(input, output, delay=0.7, atten=4)" msgstr "" -#: ../../tutorial/modules.rst:475 +#: ../../tutorial/modules.rst:477 msgid "" "Note that when using ``from package import item``, the item can be either a " "submodule (or subpackage) of the package, or some other name defined in the " @@ -712,7 +714,7 @@ msgid "" "`ImportError` exception is raised." msgstr "" -#: ../../tutorial/modules.rst:482 +#: ../../tutorial/modules.rst:484 msgid "" "Contrarily, when using syntax like ``import item.subitem.subsubitem``, each " "item except for the last must be a package; the last item can be a module or " @@ -720,11 +722,11 @@ msgid "" "previous item." msgstr "" -#: ../../tutorial/modules.rst:491 +#: ../../tutorial/modules.rst:493 msgid "Importing \\* From a Package" msgstr "" -#: ../../tutorial/modules.rst:495 +#: ../../tutorial/modules.rst:497 msgid "" "Now what happens when the user writes ``from sound.effects import *``? " "Ideally, one would hope that this somehow goes out to the filesystem, finds " @@ -733,7 +735,7 @@ msgid "" "effects that should only happen when the sub-module is explicitly imported." msgstr "" -#: ../../tutorial/modules.rst:501 +#: ../../tutorial/modules.rst:503 msgid "" "The only solution is for the package author to provide an explicit index of " "the package. The :keyword:`import` statement uses the following convention: " @@ -746,17 +748,17 @@ msgid "" "effects/__init__.py` could contain the following code::" msgstr "" -#: ../../tutorial/modules.rst:511 +#: ../../tutorial/modules.rst:513 msgid "__all__ = [\"echo\", \"surround\", \"reverse\"]" msgstr "" -#: ../../tutorial/modules.rst:513 +#: ../../tutorial/modules.rst:515 msgid "" "This would mean that ``from sound.effects import *`` would import the three " "named submodules of the :mod:`!sound.effects` package." msgstr "" -#: ../../tutorial/modules.rst:516 +#: ../../tutorial/modules.rst:518 msgid "" "Be aware that submodules might become shadowed by locally defined names. For " "example, if you added a ``reverse`` function to the :file:`sound/effects/" @@ -766,7 +768,7 @@ msgid "" "function::" msgstr "" -#: ../../tutorial/modules.rst:523 +#: ../../tutorial/modules.rst:525 msgid "" "__all__ = [\n" " \"echo\", # refers to the 'echo.py' file\n" @@ -778,7 +780,7 @@ msgid "" " return msg[::-1] # in the case of a 'from sound.effects import *'" msgstr "" -#: ../../tutorial/modules.rst:532 +#: ../../tutorial/modules.rst:534 msgid "" "If ``__all__`` is not defined, the statement ``from sound.effects import *`` " "does *not* import all submodules from the package :mod:`!sound.effects` into " @@ -791,14 +793,14 @@ msgid "" "this code::" msgstr "" -#: ../../tutorial/modules.rst:541 +#: ../../tutorial/modules.rst:543 msgid "" "import sound.effects.echo\n" "import sound.effects.surround\n" "from sound.effects import *" msgstr "" -#: ../../tutorial/modules.rst:545 +#: ../../tutorial/modules.rst:547 msgid "" "In this example, the :mod:`!echo` and :mod:`!surround` modules are imported " "in the current namespace because they are defined in the :mod:`!sound." @@ -806,14 +808,14 @@ msgid "" "also works when ``__all__`` is defined.)" msgstr "" -#: ../../tutorial/modules.rst:550 +#: ../../tutorial/modules.rst:552 msgid "" "Although certain modules are designed to export only names that follow " "certain patterns when you use ``import *``, it is still considered bad " "practice in production code." msgstr "" -#: ../../tutorial/modules.rst:554 +#: ../../tutorial/modules.rst:556 msgid "" "Remember, there is nothing wrong with using ``from package import " "specific_submodule``! In fact, this is the recommended notation unless the " @@ -821,11 +823,11 @@ msgid "" "packages." msgstr "" -#: ../../tutorial/modules.rst:563 +#: ../../tutorial/modules.rst:565 msgid "Intra-package References" msgstr "" -#: ../../tutorial/modules.rst:565 +#: ../../tutorial/modules.rst:567 msgid "" "When packages are structured into subpackages (as with the :mod:`!sound` " "package in the example), you can use absolute imports to refer to submodules " @@ -834,7 +836,7 @@ msgid "" "package, it can use ``from sound.effects import echo``." msgstr "" -#: ../../tutorial/modules.rst:571 +#: ../../tutorial/modules.rst:573 msgid "" "You can also write relative imports, with the ``from module import name`` " "form of import statement. These imports use leading dots to indicate the " @@ -842,14 +844,14 @@ msgid "" "`!surround` module for example, you might use::" msgstr "" -#: ../../tutorial/modules.rst:576 +#: ../../tutorial/modules.rst:578 msgid "" "from . import echo\n" "from .. import formats\n" "from ..filters import equalizer" msgstr "" -#: ../../tutorial/modules.rst:580 +#: ../../tutorial/modules.rst:582 msgid "" "Note that relative imports are based on the name of the current module. " "Since the name of the main module is always ``\"__main__\"``, modules " @@ -857,11 +859,11 @@ msgid "" "absolute imports." msgstr "" -#: ../../tutorial/modules.rst:586 +#: ../../tutorial/modules.rst:588 msgid "Packages in Multiple Directories" msgstr "" -#: ../../tutorial/modules.rst:588 +#: ../../tutorial/modules.rst:590 msgid "" "Packages support one more special attribute, :attr:`~module.__path__`. This " "is initialized to be a :term:`sequence` of strings containing the name of " @@ -870,44 +872,44 @@ msgid "" "future searches for modules and subpackages contained in the package." msgstr "" -#: ../../tutorial/modules.rst:595 +#: ../../tutorial/modules.rst:597 msgid "" "While this feature is not often needed, it can be used to extend the set of " "modules found in a package." msgstr "" -#: ../../tutorial/modules.rst:600 +#: ../../tutorial/modules.rst:602 msgid "Footnotes" msgstr "" -#: ../../tutorial/modules.rst:601 +#: ../../tutorial/modules.rst:603 msgid "" "In fact function definitions are also 'statements' that are 'executed'; the " "execution of a module-level function definition adds the function name to " "the module's global namespace." msgstr "" -#: ../../tutorial/modules.rst:184 ../../tutorial/modules.rst:267 -#: ../../tutorial/modules.rst:348 +#: ../../tutorial/modules.rst:186 ../../tutorial/modules.rst:269 +#: ../../tutorial/modules.rst:350 msgid "module" msgstr "" -#: ../../tutorial/modules.rst:184 +#: ../../tutorial/modules.rst:186 msgid "search" msgstr "" -#: ../../tutorial/modules.rst:184 +#: ../../tutorial/modules.rst:186 msgid "path" msgstr "" -#: ../../tutorial/modules.rst:267 +#: ../../tutorial/modules.rst:269 msgid "sys" msgstr "" -#: ../../tutorial/modules.rst:348 +#: ../../tutorial/modules.rst:350 msgid "builtins" msgstr "" -#: ../../tutorial/modules.rst:493 +#: ../../tutorial/modules.rst:495 msgid "__all__" msgstr "" diff --git a/tutorial/stdlib.po b/tutorial/stdlib.po index 51bcbbd6b..95e3597ba 100644 --- a/tutorial/stdlib.po +++ b/tutorial/stdlib.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 01:50+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/tutorial/stdlib2.po b/tutorial/stdlib2.po index b07c3652f..b04503b27 100644 --- a/tutorial/stdlib2.po +++ b/tutorial/stdlib2.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 01:50+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/tutorial/venv.po b/tutorial/venv.po index cc913d3ba..43b2058a4 100644 --- a/tutorial/venv.po +++ b/tutorial/venv.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:50+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/tutorial/whatnow.po b/tutorial/whatnow.po index 201085145..d20b0d897 100644 --- a/tutorial/whatnow.po +++ b/tutorial/whatnow.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-04 14:20+0000\n" "PO-Revision-Date: 2021-06-28 01:50+0000\n" "Last-Translator: Ariyan Bolandi, 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/using/android.po b/using/android.po index f6d1c5812..2ecceb941 100644 --- a/using/android.po +++ b/using/android.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-09-27 14:19+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" @@ -143,3 +143,16 @@ msgid "" "testbed/app/src/main/c/main_activity.c>`. This will need to be C code called " "via JNI." msgstr "" + +#: ../../using/android.rst:68 +msgid "Building a Python package for Android" +msgstr "" + +#: ../../using/android.rst:70 +msgid "" +"Python packages can be built for Android as wheels and released on PyPI. The " +"recommended tool for doing this is `cibuildwheel `__, which automates all the details of " +"setting up a cross-compilation environment, building the wheel, and testing " +"it on an emulator." +msgstr "" diff --git a/using/cmdline.po b/using/cmdline.po index 4517ac224..fb5b194ea 100644 --- a/using/cmdline.po +++ b/using/cmdline.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:50+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -235,7 +239,7 @@ msgid "" "path`." msgstr "" -#: ../../using/cmdline.rst:144 ../../using/cmdline.rst:827 +#: ../../using/cmdline.rst:144 ../../using/cmdline.rst:834 msgid "" "Raises an :ref:`auditing event ` ``cpython.run_stdin`` with no " "arguments." @@ -554,8 +558,8 @@ msgstr "" msgid "See also :envvar:`PYTHONNOUSERSITE`." msgstr "" -#: ../../using/cmdline.rst:404 ../../using/cmdline.rst:924 -#: ../../using/cmdline.rst:936 +#: ../../using/cmdline.rst:404 ../../using/cmdline.rst:931 +#: ../../using/cmdline.rst:943 msgid ":pep:`370` -- Per user site-packages directory" msgstr "" @@ -605,7 +609,7 @@ msgid "" "messages to :data:`sys.stderr`." msgstr "" -#: ../../using/cmdline.rst:446 ../../using/cmdline.rst:952 +#: ../../using/cmdline.rst:446 ../../using/cmdline.rst:959 msgid "" "The simplest settings apply a particular action unconditionally to all " "warnings emitted by a process (even those that are otherwise ignored by " @@ -693,7 +697,7 @@ msgid "" "can be used to use a regular expression on the warning message." msgstr "" -#: ../../using/cmdline.rst:497 ../../using/cmdline.rst:964 +#: ../../using/cmdline.rst:497 ../../using/cmdline.rst:971 msgid "" "See :ref:`warning-filter` and :ref:`describing-warning-filters` for more " "details." @@ -880,7 +884,7 @@ msgstr "" #: ../../using/cmdline.rst:655 msgid "" ":samp:`-X thread_inherit_context={0,1}` causes :class:`~threading.Thread` " -"to, by default, use a copy of context of of the caller of ``Thread.start()`` " +"to, by default, use a copy of context of the caller of ``Thread.start()`` " "when starting. Otherwise, threads will start with an empty context. If " "unset, the value of this option defaults to ``1`` on free-threaded builds " "and to ``0`` otherwise. See also :envvar:`PYTHON_THREAD_INHERIT_CONTEXT`." @@ -897,54 +901,62 @@ msgstr "" #: ../../using/cmdline.rst:672 msgid "" +":samp:`-X tlbc={0,1}` enables (1, the default) or disables (0) thread-local " +"bytecode in builds configured with :option:`--disable-gil`. When disabled, " +"this also disables the specializing interpreter. See also :envvar:" +"`PYTHON_TLBC`." +msgstr "" + +#: ../../using/cmdline.rst:679 +msgid "" "It also allows passing arbitrary values and retrieving them through the :" "data:`sys._xoptions` dictionary." msgstr "" -#: ../../using/cmdline.rst:677 +#: ../../using/cmdline.rst:684 msgid "Removed the ``-X showalloccount`` option." msgstr "" -#: ../../using/cmdline.rst:680 +#: ../../using/cmdline.rst:687 msgid "Removed the ``-X oldparser`` option." msgstr "" -#: ../../using/cmdline.rst:685 +#: ../../using/cmdline.rst:692 msgid "" ":option:`!-J` is no longer reserved for use by Jython_, and now has no " "special meaning." msgstr "" -#: ../../using/cmdline.rst:693 +#: ../../using/cmdline.rst:700 msgid "Controlling color" msgstr "" -#: ../../using/cmdline.rst:695 +#: ../../using/cmdline.rst:702 msgid "" "The Python interpreter is configured by default to use colors to highlight " "output in certain situations such as when displaying tracebacks. This " "behavior can be controlled by setting different environment variables." msgstr "" -#: ../../using/cmdline.rst:699 +#: ../../using/cmdline.rst:706 msgid "" "Setting the environment variable ``TERM`` to ``dumb`` will disable color." msgstr "" -#: ../../using/cmdline.rst:701 +#: ../../using/cmdline.rst:708 msgid "" "If the |FORCE_COLOR|_ environment variable is set, then color will be " "enabled regardless of the value of TERM. This is useful on CI systems which " "aren’t terminals but can still display ANSI escape sequences." msgstr "" -#: ../../using/cmdline.rst:705 +#: ../../using/cmdline.rst:712 msgid "" "If the |NO_COLOR|_ environment variable is set, Python will disable all " "color in the output. This takes precedence over ``FORCE_COLOR``." msgstr "" -#: ../../using/cmdline.rst:708 +#: ../../using/cmdline.rst:715 msgid "" "All these environment variables are used also by other tools to control " "color output. To control the color output only in the Python interpreter, " @@ -953,11 +965,11 @@ msgid "" "``FORCE_COLOR``." msgstr "" -#: ../../using/cmdline.rst:718 +#: ../../using/cmdline.rst:725 msgid "Environment variables" msgstr "" -#: ../../using/cmdline.rst:720 +#: ../../using/cmdline.rst:727 msgid "" "These environment variables influence Python's behavior, they are processed " "before the command-line switches other than -E or -I. It is customary that " @@ -965,7 +977,7 @@ msgid "" "conflict." msgstr "" -#: ../../using/cmdline.rst:727 +#: ../../using/cmdline.rst:734 msgid "" "Change the location of the standard Python libraries. By default, the " "libraries are searched in :file:`{prefix}/lib/python{version}` and :file:" @@ -974,14 +986,14 @@ msgid "" "file:`/usr/local`." msgstr "" -#: ../../using/cmdline.rst:733 +#: ../../using/cmdline.rst:740 msgid "" "When :envvar:`PYTHONHOME` is set to a single directory, its value replaces " "both :file:`{prefix}` and :file:`{exec_prefix}`. To specify different " "values for these, set :envvar:`PYTHONHOME` to :file:`{prefix}:{exec_prefix}`." msgstr "" -#: ../../using/cmdline.rst:740 +#: ../../using/cmdline.rst:747 msgid "" "Augment the default search path for module files. The format is the same as " "the shell's :envvar:`PATH`: one or more directory pathnames separated by :" @@ -989,21 +1001,21 @@ msgid "" "existent directories are silently ignored." msgstr "" -#: ../../using/cmdline.rst:745 +#: ../../using/cmdline.rst:752 msgid "" "In addition to normal directories, individual :envvar:`PYTHONPATH` entries " "may refer to zipfiles containing pure Python modules (in either source or " "compiled form). Extension modules cannot be imported from zipfiles." msgstr "" -#: ../../using/cmdline.rst:749 +#: ../../using/cmdline.rst:756 msgid "" "The default search path is installation dependent, but generally begins " "with :file:`{prefix}/lib/python{version}` (see :envvar:`PYTHONHOME` above). " "It is *always* appended to :envvar:`PYTHONPATH`." msgstr "" -#: ../../using/cmdline.rst:753 +#: ../../using/cmdline.rst:760 msgid "" "An additional directory will be inserted in the search path in front of :" "envvar:`PYTHONPATH` as described above under :ref:`using-on-interface-" @@ -1011,19 +1023,19 @@ msgid "" "the variable :data:`sys.path`." msgstr "" -#: ../../using/cmdline.rst:761 +#: ../../using/cmdline.rst:768 msgid "" "If this is set to a non-empty string, don't prepend a potentially unsafe " "path to :data:`sys.path`: see the :option:`-P` option for details." msgstr "" -#: ../../using/cmdline.rst:769 +#: ../../using/cmdline.rst:776 msgid "" "If this is set to a non-empty string, it overrides the :data:`sys." "platlibdir` value." msgstr "" -#: ../../using/cmdline.rst:777 +#: ../../using/cmdline.rst:784 msgid "" "If this is the name of a readable file, the Python commands in that file are " "executed before the first prompt is displayed in interactive mode. The file " @@ -1034,20 +1046,20 @@ msgid "" "file." msgstr "" -#: ../../using/cmdline.rst:784 ../../using/cmdline.rst:786 +#: ../../using/cmdline.rst:791 ../../using/cmdline.rst:793 msgid "" "Raises an :ref:`auditing event ` ``cpython.run_startup`` with the " "filename as the argument when called on startup." msgstr "" -#: ../../using/cmdline.rst:792 +#: ../../using/cmdline.rst:799 msgid "" "If this is set to a non-empty string it is equivalent to specifying the :" "option:`-O` option. If set to an integer, it is equivalent to specifying :" "option:`-O` multiple times." msgstr "" -#: ../../using/cmdline.rst:799 +#: ../../using/cmdline.rst:806 msgid "" "If this is set, it names a callable using dotted-path notation. The module " "containing the callable will be imported and then the callable will be run " @@ -1058,68 +1070,68 @@ msgid "" "breakpointhook` to do nothing but return immediately." msgstr "" -#: ../../using/cmdline.rst:811 +#: ../../using/cmdline.rst:818 msgid "" "If this is set to a non-empty string it is equivalent to specifying the :" "option:`-d` option. If set to an integer, it is equivalent to specifying :" "option:`-d` multiple times." msgstr "" -#: ../../using/cmdline.rst:815 +#: ../../using/cmdline.rst:822 msgid "" "This environment variable requires a :ref:`debug build of Python `, otherwise it's ignored." msgstr "" -#: ../../using/cmdline.rst:821 +#: ../../using/cmdline.rst:828 msgid "" "If this is set to a non-empty string it is equivalent to specifying the :" "option:`-i` option." msgstr "" -#: ../../using/cmdline.rst:824 +#: ../../using/cmdline.rst:831 msgid "" "This variable can also be modified by Python code using :data:`os.environ` " "to force inspect mode on program termination." msgstr "" -#: ../../using/cmdline.rst:829 +#: ../../using/cmdline.rst:836 msgid "(also 3.11.10, 3.10.15, 3.9.20, and 3.8.20) Emits audit events." msgstr "" -#: ../../using/cmdline.rst:832 +#: ../../using/cmdline.rst:839 msgid "" "Uses PyREPL if possible, in which case :envvar:`PYTHONSTARTUP` is also " "executed. Emits audit events." msgstr "" -#: ../../using/cmdline.rst:839 +#: ../../using/cmdline.rst:846 msgid "" "If this is set to a non-empty string it is equivalent to specifying the :" "option:`-u` option." msgstr "" -#: ../../using/cmdline.rst:845 +#: ../../using/cmdline.rst:852 msgid "" "If this is set to a non-empty string it is equivalent to specifying the :" "option:`-v` option. If set to an integer, it is equivalent to specifying :" "option:`-v` multiple times." msgstr "" -#: ../../using/cmdline.rst:852 +#: ../../using/cmdline.rst:859 msgid "" "If this is set, Python ignores case in :keyword:`import` statements. This " "only works on Windows and macOS." msgstr "" -#: ../../using/cmdline.rst:858 +#: ../../using/cmdline.rst:865 msgid "" "If this is set to a non-empty string, Python won't try to write ``.pyc`` " "files on the import of source modules. This is equivalent to specifying " "the :option:`-B` option." msgstr "" -#: ../../using/cmdline.rst:865 +#: ../../using/cmdline.rst:872 msgid "" "If this is set, Python will write ``.pyc`` files in a mirror directory tree " "at this path, instead of in ``__pycache__`` directories within the source " @@ -1127,40 +1139,40 @@ msgid "" "``pycache_prefix=PATH`` option." msgstr "" -#: ../../using/cmdline.rst:875 +#: ../../using/cmdline.rst:882 msgid "" "If this variable is not set or set to ``random``, a random value is used to " "seed the hashes of str and bytes objects." msgstr "" -#: ../../using/cmdline.rst:878 +#: ../../using/cmdline.rst:885 msgid "" "If :envvar:`PYTHONHASHSEED` is set to an integer value, it is used as a " "fixed seed for generating the hash() of the types covered by the hash " "randomization." msgstr "" -#: ../../using/cmdline.rst:882 +#: ../../using/cmdline.rst:889 msgid "" "Its purpose is to allow repeatable hashing, such as for selftests for the " "interpreter itself, or to allow a cluster of python processes to share hash " "values." msgstr "" -#: ../../using/cmdline.rst:886 +#: ../../using/cmdline.rst:893 msgid "" "The integer must be a decimal number in the range [0,4294967295]. " "Specifying the value 0 will disable hash randomization." msgstr "" -#: ../../using/cmdline.rst:893 +#: ../../using/cmdline.rst:900 msgid "" "If this variable is set to an integer, it is used to configure the " "interpreter's global :ref:`integer string conversion length limitation " "`." msgstr "" -#: ../../using/cmdline.rst:901 +#: ../../using/cmdline.rst:908 msgid "" "If this is set before running the interpreter, it overrides the encoding " "used for stdin/stdout/stderr, in the syntax ``encodingname:errorhandler``. " @@ -1168,17 +1180,17 @@ msgid "" "have the same meaning as in :func:`str.encode`." msgstr "" -#: ../../using/cmdline.rst:906 +#: ../../using/cmdline.rst:913 msgid "" "For stderr, the ``:errorhandler`` part is ignored; the handler will always " "be ``'backslashreplace'``." msgstr "" -#: ../../using/cmdline.rst:909 +#: ../../using/cmdline.rst:916 msgid "The ``encodingname`` part is now optional." msgstr "" -#: ../../using/cmdline.rst:912 +#: ../../using/cmdline.rst:919 msgid "" "On Windows, the encoding specified by this variable is ignored for " "interactive console buffers unless :envvar:`PYTHONLEGACYWINDOWSSTDIO` is " @@ -1186,13 +1198,13 @@ msgid "" "not affected." msgstr "" -#: ../../using/cmdline.rst:919 +#: ../../using/cmdline.rst:926 msgid "" "If this is set, Python won't add the :data:`user site-packages directory " "` to :data:`sys.path`." msgstr "" -#: ../../using/cmdline.rst:929 +#: ../../using/cmdline.rst:936 msgid "" "Defines the :data:`user base directory `, which is used to " "compute the path of the :data:`user site-packages directory ` of the :mod:`asyncio` module." msgstr "" -#: ../../using/cmdline.rst:1017 +#: ../../using/cmdline.rst:1024 msgid "Set the Python memory allocators and/or install debug hooks." msgstr "" -#: ../../using/cmdline.rst:1019 +#: ../../using/cmdline.rst:1026 msgid "Set the family of memory allocators used by Python:" msgstr "" -#: ../../using/cmdline.rst:1021 +#: ../../using/cmdline.rst:1028 msgid "" "``default``: use the :ref:`default memory allocators `." msgstr "" -#: ../../using/cmdline.rst:1023 +#: ../../using/cmdline.rst:1030 msgid "" "``malloc``: use the :c:func:`malloc` function of the C library for all " "domains (:c:macro:`PYMEM_DOMAIN_RAW`, :c:macro:`PYMEM_DOMAIN_MEM`, :c:macro:" "`PYMEM_DOMAIN_OBJ`)." msgstr "" -#: ../../using/cmdline.rst:1026 +#: ../../using/cmdline.rst:1033 msgid "" "``pymalloc``: use the :ref:`pymalloc allocator ` for :c:macro:" "`PYMEM_DOMAIN_MEM` and :c:macro:`PYMEM_DOMAIN_OBJ` domains and use the :c:" "func:`malloc` function for the :c:macro:`PYMEM_DOMAIN_RAW` domain." msgstr "" -#: ../../using/cmdline.rst:1029 +#: ../../using/cmdline.rst:1036 msgid "" "``mimalloc``: use the :ref:`mimalloc allocator ` for :c:macro:" "`PYMEM_DOMAIN_MEM` and :c:macro:`PYMEM_DOMAIN_OBJ` domains and use the :c:" "func:`malloc` function for the :c:macro:`PYMEM_DOMAIN_RAW` domain." msgstr "" -#: ../../using/cmdline.rst:1033 +#: ../../using/cmdline.rst:1040 msgid "Install :ref:`debug hooks `:" msgstr "" -#: ../../using/cmdline.rst:1035 +#: ../../using/cmdline.rst:1042 msgid "" "``debug``: install debug hooks on top of the :ref:`default memory allocators " "`." msgstr "" -#: ../../using/cmdline.rst:1037 +#: ../../using/cmdline.rst:1044 msgid "``malloc_debug``: same as ``malloc`` but also install debug hooks." msgstr "" -#: ../../using/cmdline.rst:1038 +#: ../../using/cmdline.rst:1045 msgid "``pymalloc_debug``: same as ``pymalloc`` but also install debug hooks." msgstr "" -#: ../../using/cmdline.rst:1039 +#: ../../using/cmdline.rst:1046 msgid "``mimalloc_debug``: same as ``mimalloc`` but also install debug hooks." msgstr "" -#: ../../using/cmdline.rst:1043 +#: ../../using/cmdline.rst:1050 msgid "Added the ``\"default\"`` allocator." msgstr "" -#: ../../using/cmdline.rst:1049 +#: ../../using/cmdline.rst:1056 msgid "" "If set to a non-empty string, Python will print statistics of the :ref:" "`pymalloc memory allocator ` every time a new pymalloc object " "arena is created, and on shutdown." msgstr "" -#: ../../using/cmdline.rst:1053 +#: ../../using/cmdline.rst:1060 msgid "" "This variable is ignored if the :envvar:`PYTHONMALLOC` environment variable " "is used to force the :c:func:`malloc` allocator of the C library, or if " "Python is configured without ``pymalloc`` support." msgstr "" -#: ../../using/cmdline.rst:1057 +#: ../../using/cmdline.rst:1064 msgid "" "This variable can now also be used on Python compiled in release mode. It " "now has no effect if set to an empty string." msgstr "" -#: ../../using/cmdline.rst:1064 +#: ../../using/cmdline.rst:1071 msgid "" "If set to a non-empty string, the default :term:`filesystem encoding and " "error handler` mode will revert to their pre-3.6 values of 'mbcs' and " @@ -1351,42 +1363,42 @@ msgid "" "'surrogatepass' are used." msgstr "" -#: ../../using/cmdline.rst:1069 +#: ../../using/cmdline.rst:1076 msgid "" "This may also be enabled at runtime with :func:`sys." "_enablelegacywindowsfsencoding`." msgstr "" -#: ../../using/cmdline.rst:1072 ../../using/cmdline.rst:1086 -#: ../../using/cmdline.rst:1137 +#: ../../using/cmdline.rst:1079 ../../using/cmdline.rst:1093 +#: ../../using/cmdline.rst:1144 msgid "Availability" msgstr "" -#: ../../using/cmdline.rst:1074 +#: ../../using/cmdline.rst:1081 msgid "See :pep:`529` for more details." msgstr "" -#: ../../using/cmdline.rst:1079 +#: ../../using/cmdline.rst:1086 msgid "" "If set to a non-empty string, does not use the new console reader and " "writer. This means that Unicode characters will be encoded according to the " "active console code page, rather than using utf-8." msgstr "" -#: ../../using/cmdline.rst:1083 +#: ../../using/cmdline.rst:1090 msgid "" "This variable is ignored if the standard streams are redirected (to files or " "pipes) rather than referring to console buffers." msgstr "" -#: ../../using/cmdline.rst:1093 +#: ../../using/cmdline.rst:1100 msgid "" "If set to the value ``0``, causes the main Python command line application " "to skip coercing the legacy ASCII-based C and POSIX locales to a more " "capable UTF-8 based alternative." msgstr "" -#: ../../using/cmdline.rst:1097 +#: ../../using/cmdline.rst:1104 msgid "" "If this variable is *not* set (or is set to a value other than ``0``), the " "``LC_ALL`` locale override environment variable is also not set, and the " @@ -1397,19 +1409,19 @@ msgid "" "runtime:" msgstr "" -#: ../../using/cmdline.rst:1105 +#: ../../using/cmdline.rst:1112 msgid "``C.UTF-8``" msgstr "" -#: ../../using/cmdline.rst:1106 +#: ../../using/cmdline.rst:1113 msgid "``C.utf8``" msgstr "" -#: ../../using/cmdline.rst:1107 +#: ../../using/cmdline.rst:1114 msgid "``UTF-8``" msgstr "" -#: ../../using/cmdline.rst:1109 +#: ../../using/cmdline.rst:1116 msgid "" "If setting one of these locale categories succeeds, then the ``LC_CTYPE`` " "environment variable will also be set accordingly in the current process " @@ -1422,7 +1434,7 @@ msgid "" "(such as Python's own :func:`locale.getdefaultlocale`)." msgstr "" -#: ../../using/cmdline.rst:1119 +#: ../../using/cmdline.rst:1126 msgid "" "Configuring one of these locales (either explicitly or via the above " "implicit locale coercion) automatically enables the ``surrogateescape`` :ref:" @@ -1432,7 +1444,7 @@ msgid "" "envvar:`PYTHONIOENCODING` as usual." msgstr "" -#: ../../using/cmdline.rst:1126 +#: ../../using/cmdline.rst:1133 msgid "" "For debugging purposes, setting ``PYTHONCOERCECLOCALE=warn`` will cause " "Python to emit warning messages on ``stderr`` if either the locale coercion " @@ -1440,7 +1452,7 @@ msgid "" "active when the Python runtime is initialized." msgstr "" -#: ../../using/cmdline.rst:1131 +#: ../../using/cmdline.rst:1138 msgid "" "Also note that even when locale coercion is disabled, or when it fails to " "find a suitable target locale, :envvar:`PYTHONUTF8` will still activate by " @@ -1449,11 +1461,11 @@ msgid "" "system interfaces." msgstr "" -#: ../../using/cmdline.rst:1139 +#: ../../using/cmdline.rst:1146 msgid "See :pep:`538` for more details." msgstr "" -#: ../../using/cmdline.rst:1145 +#: ../../using/cmdline.rst:1152 msgid "" "If this environment variable is set to a non-empty string, enable :ref:" "`Python Development Mode `, introducing additional runtime checks " @@ -1461,31 +1473,31 @@ msgid "" "setting the :option:`-X` ``dev`` option." msgstr "" -#: ../../using/cmdline.rst:1154 +#: ../../using/cmdline.rst:1161 msgid "If set to ``1``, enable the :ref:`Python UTF-8 Mode `." msgstr "" -#: ../../using/cmdline.rst:1156 +#: ../../using/cmdline.rst:1163 msgid "If set to ``0``, disable the :ref:`Python UTF-8 Mode `." msgstr "" -#: ../../using/cmdline.rst:1158 +#: ../../using/cmdline.rst:1165 msgid "" "Setting any other non-empty string causes an error during interpreter " "initialisation." msgstr "" -#: ../../using/cmdline.rst:1165 +#: ../../using/cmdline.rst:1172 msgid "" "If this environment variable is set to a non-empty string, issue a :class:" "`EncodingWarning` when the locale-specific default encoding is used." msgstr "" -#: ../../using/cmdline.rst:1168 +#: ../../using/cmdline.rst:1175 msgid "See :ref:`io-encoding-warning` for details." msgstr "" -#: ../../using/cmdline.rst:1174 +#: ../../using/cmdline.rst:1181 msgid "" "If this variable is set, it disables the inclusion of the tables mapping " "extra location information (end line, start column offset and end column " @@ -1494,36 +1506,36 @@ msgid "" "visual location indicators when the interpreter displays tracebacks." msgstr "" -#: ../../using/cmdline.rst:1184 +#: ../../using/cmdline.rst:1191 msgid "" "If this variable is set to a nonzero value, it enables support for the Linux " "``perf`` profiler so Python calls can be detected by it." msgstr "" -#: ../../using/cmdline.rst:1187 ../../using/cmdline.rst:1200 +#: ../../using/cmdline.rst:1194 ../../using/cmdline.rst:1207 msgid "If set to ``0``, disable Linux ``perf`` profiler support." msgstr "" -#: ../../using/cmdline.rst:1189 +#: ../../using/cmdline.rst:1196 msgid "" "See also the :option:`-X perf <-X>` command-line option and :ref:" "`perf_profiling`." msgstr "" -#: ../../using/cmdline.rst:1196 +#: ../../using/cmdline.rst:1203 msgid "" "If this variable is set to a nonzero value, it enables support for the Linux " "``perf`` profiler so Python calls can be detected by it using DWARF " "information." msgstr "" -#: ../../using/cmdline.rst:1202 +#: ../../using/cmdline.rst:1209 msgid "" "See also the :option:`-X perf_jit <-X>` command-line option and :ref:" "`perf_profiling`." msgstr "" -#: ../../using/cmdline.rst:1209 +#: ../../using/cmdline.rst:1216 msgid "" "If this variable is set to a non-empty string, it disables the remote " "debugging feature described in :pep:`768`. This includes both the " @@ -1531,21 +1543,21 @@ msgid "" "functionality to receive code for execution in the current process." msgstr "" -#: ../../using/cmdline.rst:1214 +#: ../../using/cmdline.rst:1221 msgid "See also the :option:`-X disable_remote_debug` command-line option." msgstr "" -#: ../../using/cmdline.rst:1220 +#: ../../using/cmdline.rst:1227 msgid "" "If this variable is set to a positive integer, it overrides the return " "values of :func:`os.cpu_count` and :func:`os.process_cpu_count`." msgstr "" -#: ../../using/cmdline.rst:1223 +#: ../../using/cmdline.rst:1230 msgid "See also the :option:`-X cpu_count <-X>` command-line option." msgstr "" -#: ../../using/cmdline.rst:1229 +#: ../../using/cmdline.rst:1236 msgid "" "If this variable is set to ``on`` or ``off``, it determines whether or not " "frozen modules are ignored by the import machinery. A value of ``on`` means " @@ -1556,54 +1568,54 @@ msgid "" "flag is set to ``off``." msgstr "" -#: ../../using/cmdline.rst:1237 +#: ../../using/cmdline.rst:1244 msgid "See also the :option:`-X frozen_modules <-X>` command-line option." msgstr "" -#: ../../using/cmdline.rst:1243 +#: ../../using/cmdline.rst:1250 msgid "" "If this variable is set to ``1``, the interpreter will colorize various " "kinds of output. Setting it to ``0`` deactivates this behavior. See also :" "ref:`using-on-controlling-color`." msgstr "" -#: ../../using/cmdline.rst:1251 +#: ../../using/cmdline.rst:1258 msgid "" "If this variable is set to any value, the interpreter will not attempt to " "load the Python-based :term:`REPL` that requires :mod:`curses` and :mod:" "`readline`, and will instead use the traditional parser-based :term:`REPL`." msgstr "" -#: ../../using/cmdline.rst:1260 +#: ../../using/cmdline.rst:1267 msgid "" "This environment variable can be used to set the location of a ``." "python_history`` file (by default, it is ``.python_history`` in the user's " "home directory)." msgstr "" -#: ../../using/cmdline.rst:1268 +#: ../../using/cmdline.rst:1275 msgid "" "If this variable is set to ``1``, the global interpreter lock (GIL) will be " "forced on. Setting it to ``0`` forces the GIL off (needs Python configured " "with the :option:`--disable-gil` build option)." msgstr "" -#: ../../using/cmdline.rst:1272 +#: ../../using/cmdline.rst:1279 msgid "" "See also the :option:`-X gil <-X>` command-line option, which takes " "precedence over this variable, and :ref:`whatsnew313-free-threaded-cpython`." msgstr "" -#: ../../using/cmdline.rst:1279 +#: ../../using/cmdline.rst:1286 msgid "" "If this variable is set to ``1`` then :class:`~threading.Thread` will, by " -"default, use a copy of context of of the caller of ``Thread.start()`` when " +"default, use a copy of context of the caller of ``Thread.start()`` when " "starting. Otherwise, new threads will start with an empty context. If " "unset, this variable defaults to ``1`` on free-threaded builds and to ``0`` " "otherwise. See also :option:`-X thread_inherit_context<-X>`." msgstr "" -#: ../../using/cmdline.rst:1289 +#: ../../using/cmdline.rst:1296 msgid "" "If set to ``1`` then the :class:`warnings.catch_warnings` context manager " "will use a :class:`~contextvars.ContextVar` to store warnings filter state. " @@ -1611,36 +1623,47 @@ msgid "" "``0`` otherwise. See :option:`-X context_aware_warnings<-X>`." msgstr "" -#: ../../using/cmdline.rst:1299 +#: ../../using/cmdline.rst:1306 msgid "" "On builds where experimental just-in-time compilation is available, this " "variable can force the JIT to be disabled (``0``) or enabled (``1``) at " "interpreter startup." msgstr "" -#: ../../using/cmdline.rst:1306 +#: ../../using/cmdline.rst:1314 +msgid "" +"If set to ``1`` enables thread-local bytecode. If set to ``0`` thread-local " +"bytecode and the specializing interpreter are disabled. Only applies to " +"builds configured with :option:`--disable-gil`." +msgstr "" + +#: ../../using/cmdline.rst:1318 +msgid "See also the :option:`-X tlbc <-X>` command-line option." +msgstr "" + +#: ../../using/cmdline.rst:1323 msgid "Debug-mode variables" msgstr "" -#: ../../using/cmdline.rst:1310 +#: ../../using/cmdline.rst:1327 msgid "" "If set, Python will dump objects and reference counts still alive after " "shutting down the interpreter." msgstr "" -#: ../../using/cmdline.rst:1313 ../../using/cmdline.rst:1321 +#: ../../using/cmdline.rst:1330 ../../using/cmdline.rst:1338 msgid "" "Needs Python configured with the :option:`--with-trace-refs` build option." msgstr "" -#: ../../using/cmdline.rst:1317 +#: ../../using/cmdline.rst:1334 msgid "" "If set, Python will dump objects and reference counts still alive after " "shutting down the interpreter into a file under the path given as the value " "to this environment variable." msgstr "" -#: ../../using/cmdline.rst:1327 +#: ../../using/cmdline.rst:1344 msgid "" "If this variable is set to a module, that module will be imported early in " "the interpreter lifecycle, before the :mod:`site` module is executed, and " @@ -1648,22 +1671,22 @@ msgid "" "is not treated as :mod:`__main__`." msgstr "" -#: ../../using/cmdline.rst:1332 +#: ../../using/cmdline.rst:1349 msgid "This can be used to execute code early during Python initialization." msgstr "" -#: ../../using/cmdline.rst:1334 +#: ../../using/cmdline.rst:1351 msgid "" "To import a submodule, use ``package.module`` as the value, like in an " "import statement." msgstr "" -#: ../../using/cmdline.rst:1337 +#: ../../using/cmdline.rst:1354 msgid "" "See also the :option:`-X presite <-X>` command-line option, which takes " "precedence over this variable." msgstr "" -#: ../../using/cmdline.rst:1340 +#: ../../using/cmdline.rst:1357 msgid "Needs Python configured with the :option:`--with-pydebug` build option." msgstr "" diff --git a/using/configure.po b/using/configure.po index a0f7018db..f55f5b3be 100644 --- a/using/configure.po +++ b/using/configure.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:50+0000\n" "Last-Translator: Alireza Shabani (Revisto) , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" @@ -72,66 +72,72 @@ msgstr "" #: ../../using/configure.rst:32 msgid "" +"`libmpdec `_ 2.5.0 for " +"the :mod:`decimal` module." +msgstr "" + +#: ../../using/configure.rst:35 +msgid "" "Autoconf 2.72 and aclocal 1.16.5 are required to regenerate the :file:" "`configure` script." msgstr "" -#: ../../using/configure.rst:35 +#: ../../using/configure.rst:38 msgid "Tcl/Tk version 8.3.1 is now required." msgstr "" -#: ../../using/configure.rst:38 +#: ../../using/configure.rst:41 msgid "" "On Windows, Visual Studio 2015 or later is now required. Tcl/Tk version 8.4 " "is now required." msgstr "" -#: ../../using/configure.rst:42 +#: ../../using/configure.rst:45 msgid "" "Selected C99 features are now required, like ```` and ``static " "inline`` functions." msgstr "" -#: ../../using/configure.rst:46 +#: ../../using/configure.rst:49 msgid "Thread support and OpenSSL 1.0.2 are now required." msgstr "" -#: ../../using/configure.rst:49 +#: ../../using/configure.rst:52 msgid "OpenSSL 1.1.1 is now required. Require SQLite 3.7.15." msgstr "" -#: ../../using/configure.rst:53 +#: ../../using/configure.rst:56 msgid "" "C11 compiler, IEEE 754 and NaN support are now required. On Windows, Visual " "Studio 2017 or later is required. Tcl/Tk version 8.5.12 is now required for " "the :mod:`tkinter` module." msgstr "" -#: ../../using/configure.rst:58 +#: ../../using/configure.rst:61 msgid "Autoconf 2.71, aclocal 1.16.5 and SQLite 3.15.2 are now required." msgstr "" -#: ../../using/configure.rst:61 +#: ../../using/configure.rst:64 msgid "Autoconf 2.72 is now required." msgstr "" -#: ../../using/configure.rst:64 +#: ../../using/configure.rst:67 msgid "" "See also :pep:`7` \"Style Guide for C Code\" and :pep:`11` \"CPython " "platform support\"." msgstr "" -#: ../../using/configure.rst:69 +#: ../../using/configure.rst:72 msgid "Generated files" msgstr "" -#: ../../using/configure.rst:71 +#: ../../using/configure.rst:74 msgid "" "To reduce build dependencies, Python source code contains multiple generated " "files. Commands to regenerate all generated files::" msgstr "" -#: ../../using/configure.rst:74 +#: ../../using/configure.rst:77 msgid "" "make regen-all\n" "make regen-stdlib-module-names\n" @@ -139,17 +145,17 @@ msgid "" "make regen-configure" msgstr "" -#: ../../using/configure.rst:79 +#: ../../using/configure.rst:82 msgid "" "The ``Makefile.pre.in`` file documents generated files, their inputs, and " "tools used to regenerate them. Search for ``regen-*`` make targets." msgstr "" -#: ../../using/configure.rst:83 +#: ../../using/configure.rst:86 msgid "configure script" msgstr "" -#: ../../using/configure.rst:85 +#: ../../using/configure.rst:88 msgid "" "The ``make regen-configure`` command regenerates the ``aclocal.m4`` file and " "the ``configure`` script using the ``Tools/build/regen-configure.sh`` shell " @@ -157,81 +163,81 @@ msgid "" "have a reproducible output." msgstr "" -#: ../../using/configure.rst:90 +#: ../../using/configure.rst:93 msgid "The container is optional, the following command can be run locally::" msgstr "" -#: ../../using/configure.rst:92 +#: ../../using/configure.rst:95 msgid "autoreconf -ivf -Werror" msgstr "" -#: ../../using/configure.rst:94 +#: ../../using/configure.rst:97 msgid "" "The generated files can change depending on the exact ``autoconf-archive``, " "``aclocal`` and ``pkg-config`` versions." msgstr "" -#: ../../using/configure.rst:101 +#: ../../using/configure.rst:104 msgid "Configure Options" msgstr "" -#: ../../using/configure.rst:103 +#: ../../using/configure.rst:106 msgid "List all :file:`configure` script options using::" msgstr "" -#: ../../using/configure.rst:105 +#: ../../using/configure.rst:108 msgid "./configure --help" msgstr "" -#: ../../using/configure.rst:107 +#: ../../using/configure.rst:110 msgid "" "See also the :file:`Misc/SpecialBuilds.txt` in the Python source " "distribution." msgstr "" -#: ../../using/configure.rst:110 +#: ../../using/configure.rst:113 msgid "General Options" msgstr "" -#: ../../using/configure.rst:114 +#: ../../using/configure.rst:117 msgid "" "Support loadable extensions in the :mod:`!_sqlite` extension module (default " "is no) of the :mod:`sqlite3` module." msgstr "" -#: ../../using/configure.rst:117 +#: ../../using/configure.rst:120 msgid "" "See the :meth:`sqlite3.Connection.enable_load_extension` method of the :mod:" "`sqlite3` module." msgstr "" -#: ../../using/configure.rst:124 +#: ../../using/configure.rst:127 msgid "" "Disable IPv6 support (enabled by default if supported), see the :mod:" "`socket` module." msgstr "" -#: ../../using/configure.rst:129 +#: ../../using/configure.rst:132 msgid "Define the size in bits of Python :class:`int` digits: 15 or 30 bits." msgstr "" -#: ../../using/configure.rst:131 +#: ../../using/configure.rst:134 msgid "By default, the digit size is 30." msgstr "" -#: ../../using/configure.rst:133 +#: ../../using/configure.rst:136 msgid "Define the ``PYLONG_BITS_IN_DIGIT`` to ``15`` or ``30``." msgstr "" -#: ../../using/configure.rst:135 +#: ../../using/configure.rst:138 msgid "See :data:`sys.int_info.bits_per_digit `." msgstr "" -#: ../../using/configure.rst:139 +#: ../../using/configure.rst:142 msgid "Set the Python executable suffix to *SUFFIX*." msgstr "" -#: ../../using/configure.rst:141 +#: ../../using/configure.rst:144 msgid "" "The default suffix is ``.exe`` on Windows and macOS (``python.exe`` " "executable), ``.js`` on Emscripten node, ``.html`` on Emscripten browser, ``." @@ -239,91 +245,91 @@ msgid "" "executable)." msgstr "" -#: ../../using/configure.rst:146 +#: ../../using/configure.rst:149 msgid "" "The default suffix on WASM platform is one of ``.js``, ``.html`` or ``." "wasm``." msgstr "" -#: ../../using/configure.rst:152 +#: ../../using/configure.rst:155 msgid "" "Select the default time zone search path for :const:`zoneinfo.TZPATH`. See " "the :ref:`Compile-time configuration ` of " "the :mod:`zoneinfo` module." msgstr "" -#: ../../using/configure.rst:156 +#: ../../using/configure.rst:159 msgid "" "Default: ``/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/" "etc/zoneinfo``." msgstr "" -#: ../../using/configure.rst:158 +#: ../../using/configure.rst:161 msgid "See :data:`os.pathsep` path separator." msgstr "" -#: ../../using/configure.rst:164 +#: ../../using/configure.rst:167 msgid "" "Build the ``_decimal`` extension module using a thread-local context rather " "than a coroutine-local context (default), see the :mod:`decimal` module." msgstr "" -#: ../../using/configure.rst:167 +#: ../../using/configure.rst:170 msgid "See :const:`decimal.HAVE_CONTEXTVAR` and the :mod:`contextvars` module." msgstr "" -#: ../../using/configure.rst:173 +#: ../../using/configure.rst:176 msgid "Override order to check db backends for the :mod:`dbm` module" msgstr "" -#: ../../using/configure.rst:175 +#: ../../using/configure.rst:178 msgid "" "A valid value is a colon (``:``) separated string with the backend names:" msgstr "" -#: ../../using/configure.rst:177 +#: ../../using/configure.rst:180 msgid "``ndbm``;" msgstr "" -#: ../../using/configure.rst:178 +#: ../../using/configure.rst:181 msgid "``gdbm``;" msgstr "" -#: ../../using/configure.rst:179 +#: ../../using/configure.rst:182 msgid "``bdb``." msgstr "" -#: ../../using/configure.rst:183 +#: ../../using/configure.rst:186 msgid "Disable C locale coercion to a UTF-8 based locale (enabled by default)." msgstr "" -#: ../../using/configure.rst:185 +#: ../../using/configure.rst:188 msgid "Don't define the ``PY_COERCE_C_LOCALE`` macro." msgstr "" -#: ../../using/configure.rst:187 +#: ../../using/configure.rst:190 msgid "See :envvar:`PYTHONCOERCECLOCALE` and the :pep:`538`." msgstr "" -#: ../../using/configure.rst:191 +#: ../../using/configure.rst:194 msgid "Python library directory name (default is ``lib``)." msgstr "" -#: ../../using/configure.rst:193 +#: ../../using/configure.rst:196 msgid "Fedora and SuSE use ``lib64`` on 64-bit platforms." msgstr "" -#: ../../using/configure.rst:195 +#: ../../using/configure.rst:198 msgid "See :data:`sys.platlibdir`." msgstr "" -#: ../../using/configure.rst:201 +#: ../../using/configure.rst:204 msgid "" "Directory of wheel packages used by the :mod:`ensurepip` module (none by " "default)." msgstr "" -#: ../../using/configure.rst:204 +#: ../../using/configure.rst:207 msgid "" "Some Linux distribution packaging policies recommend against bundling " "dependencies. For example, Fedora installs wheel packages in the ``/usr/" @@ -331,241 +337,241 @@ msgid "" "_bundled` package." msgstr "" -#: ../../using/configure.rst:213 +#: ../../using/configure.rst:216 msgid "" "Whether configure should use :program:`pkg-config` to detect build " "dependencies." msgstr "" -#: ../../using/configure.rst:216 +#: ../../using/configure.rst:219 msgid "``check`` (default): :program:`pkg-config` is optional" msgstr "" -#: ../../using/configure.rst:217 +#: ../../using/configure.rst:220 msgid "``yes``: :program:`pkg-config` is mandatory" msgstr "" -#: ../../using/configure.rst:218 +#: ../../using/configure.rst:221 msgid "``no``: configure does not use :program:`pkg-config` even when present" msgstr "" -#: ../../using/configure.rst:224 +#: ../../using/configure.rst:227 msgid "Turn on internal Python performance statistics gathering." msgstr "" -#: ../../using/configure.rst:226 +#: ../../using/configure.rst:229 msgid "" "By default, statistics gathering is off. Use ``python3 -X pystats`` command " "or set ``PYTHONSTATS=1`` environment variable to turn on statistics " "gathering at Python startup." msgstr "" -#: ../../using/configure.rst:230 +#: ../../using/configure.rst:233 msgid "" "At Python exit, dump statistics if statistics gathering was on and not " "cleared." msgstr "" -#: ../../using/configure.rst:233 ../../using/configure.rst:741 +#: ../../using/configure.rst:236 ../../using/configure.rst:759 msgid "Effects:" msgstr "" -#: ../../using/configure.rst:235 +#: ../../using/configure.rst:238 msgid "Add :option:`-X pystats <-X>` command line option." msgstr "" -#: ../../using/configure.rst:236 +#: ../../using/configure.rst:239 msgid "Add :envvar:`!PYTHONSTATS` environment variable." msgstr "" -#: ../../using/configure.rst:237 +#: ../../using/configure.rst:240 msgid "Define the ``Py_STATS`` macro." msgstr "" -#: ../../using/configure.rst:238 +#: ../../using/configure.rst:241 msgid "Add functions to the :mod:`sys` module:" msgstr "" -#: ../../using/configure.rst:240 +#: ../../using/configure.rst:243 msgid ":func:`!sys._stats_on`: Turns on statistics gathering." msgstr "" -#: ../../using/configure.rst:241 +#: ../../using/configure.rst:244 msgid ":func:`!sys._stats_off`: Turns off statistics gathering." msgstr "" -#: ../../using/configure.rst:242 +#: ../../using/configure.rst:245 msgid ":func:`!sys._stats_clear`: Clears the statistics." msgstr "" -#: ../../using/configure.rst:243 +#: ../../using/configure.rst:246 msgid "" ":func:`!sys._stats_dump`: Dump statistics to file, and clears the statistics." msgstr "" -#: ../../using/configure.rst:245 +#: ../../using/configure.rst:248 msgid "" "The statistics will be dumped to a arbitrary (probably unique) file in ``/" "tmp/py_stats/`` (Unix) or ``C:\\temp\\py_stats\\`` (Windows). If that " "directory does not exist, results will be printed on stderr." msgstr "" -#: ../../using/configure.rst:249 +#: ../../using/configure.rst:252 msgid "Use ``Tools/scripts/summarize_stats.py`` to read the stats." msgstr "" -#: ../../using/configure.rst:251 +#: ../../using/configure.rst:254 msgid "Statistics:" msgstr "" -#: ../../using/configure.rst:253 +#: ../../using/configure.rst:256 msgid "Opcode:" msgstr "" -#: ../../using/configure.rst:255 +#: ../../using/configure.rst:258 msgid "Specialization: success, failure, hit, deferred, miss, deopt, failures;" msgstr "" -#: ../../using/configure.rst:256 +#: ../../using/configure.rst:259 msgid "Execution count;" msgstr "" -#: ../../using/configure.rst:257 +#: ../../using/configure.rst:260 msgid "Pair count." msgstr "" -#: ../../using/configure.rst:259 +#: ../../using/configure.rst:262 msgid "Call:" msgstr "" -#: ../../using/configure.rst:261 +#: ../../using/configure.rst:264 msgid "Inlined Python calls;" msgstr "" -#: ../../using/configure.rst:262 +#: ../../using/configure.rst:265 msgid "PyEval calls;" msgstr "" -#: ../../using/configure.rst:263 +#: ../../using/configure.rst:266 msgid "Frames pushed;" msgstr "" -#: ../../using/configure.rst:264 +#: ../../using/configure.rst:267 msgid "Frame object created;" msgstr "" -#: ../../using/configure.rst:265 +#: ../../using/configure.rst:268 msgid "" "Eval calls: vector, generator, legacy, function VECTORCALL, build class, " "slot, function \"ex\", API, method." msgstr "" -#: ../../using/configure.rst:268 +#: ../../using/configure.rst:271 msgid "Object:" msgstr "" -#: ../../using/configure.rst:270 +#: ../../using/configure.rst:273 msgid "incref and decref;" msgstr "" -#: ../../using/configure.rst:271 +#: ../../using/configure.rst:274 msgid "interpreter incref and decref;" msgstr "" -#: ../../using/configure.rst:272 +#: ../../using/configure.rst:275 msgid "allocations: all, 512 bytes, 4 kiB, big;" msgstr "" -#: ../../using/configure.rst:273 +#: ../../using/configure.rst:276 msgid "free;" msgstr "" -#: ../../using/configure.rst:274 +#: ../../using/configure.rst:277 msgid "to/from free lists;" msgstr "" -#: ../../using/configure.rst:275 +#: ../../using/configure.rst:278 msgid "dictionary materialized/dematerialized;" msgstr "" -#: ../../using/configure.rst:276 +#: ../../using/configure.rst:279 msgid "type cache;" msgstr "" -#: ../../using/configure.rst:277 +#: ../../using/configure.rst:280 msgid "optimization attempts;" msgstr "" -#: ../../using/configure.rst:278 +#: ../../using/configure.rst:281 msgid "optimization traces created/executed;" msgstr "" -#: ../../using/configure.rst:279 +#: ../../using/configure.rst:282 msgid "uops executed." msgstr "" -#: ../../using/configure.rst:281 +#: ../../using/configure.rst:284 msgid "Garbage collector:" msgstr "" -#: ../../using/configure.rst:283 +#: ../../using/configure.rst:286 msgid "Garbage collections;" msgstr "" -#: ../../using/configure.rst:284 +#: ../../using/configure.rst:287 msgid "Objects visited;" msgstr "" -#: ../../using/configure.rst:285 +#: ../../using/configure.rst:288 msgid "Objects collected." msgstr "" -#: ../../using/configure.rst:293 +#: ../../using/configure.rst:296 msgid "" -"Enables **experimental** support for running Python without the :term:" -"`global interpreter lock` (GIL): free threading build." +"Enables support for running Python without the :term:`global interpreter " +"lock` (GIL): free threading build." msgstr "" -#: ../../using/configure.rst:296 +#: ../../using/configure.rst:299 msgid "" "Defines the ``Py_GIL_DISABLED`` macro and adds ``\"t\"`` to :data:`sys." "abiflags`." msgstr "" -#: ../../using/configure.rst:299 +#: ../../using/configure.rst:302 msgid "See :ref:`whatsnew313-free-threaded-cpython` for more detail." msgstr "" -#: ../../using/configure.rst:305 +#: ../../using/configure.rst:308 msgid "" "Indicate how to integrate the :ref:`experimental just-in-time compiler " "`." msgstr "" -#: ../../using/configure.rst:307 +#: ../../using/configure.rst:310 msgid "``no``: Don't build the JIT." msgstr "" -#: ../../using/configure.rst:308 +#: ../../using/configure.rst:311 msgid "" "``yes``: Enable the JIT. To disable it at runtime, set the environment " "variable :envvar:`PYTHON_JIT=0 `." msgstr "" -#: ../../using/configure.rst:310 +#: ../../using/configure.rst:313 msgid "" "``yes-off``: Build the JIT, but disable it by default. To enable it at " "runtime, set the environment variable :envvar:`PYTHON_JIT=1 `." msgstr "" -#: ../../using/configure.rst:312 +#: ../../using/configure.rst:315 msgid "" "``interpreter``: Enable the \"JIT interpreter\" (only useful for those " "debugging the JIT itself). To disable it at runtime, set the environment " "variable :envvar:`PYTHON_JIT=0 `." msgstr "" -#: ../../using/configure.rst:316 +#: ../../using/configure.rst:319 msgid "" "``--enable-experimental-jit=no`` is the default behavior if the option is " "not provided, and ``--enable-experimental-jit`` is shorthand for ``--enable-" @@ -573,253 +579,259 @@ msgid "" "information, including how to install the necessary build-time dependencies." msgstr "" -#: ../../using/configure.rst:323 +#: ../../using/configure.rst:326 msgid "" "When building CPython with JIT enabled, ensure that your system has Python " "3.11 or later installed." msgstr "" -#: ../../using/configure.rst:329 +#: ../../using/configure.rst:332 msgid "Path to ``pkg-config`` utility." msgstr "" -#: ../../using/configure.rst:334 +#: ../../using/configure.rst:337 msgid "``pkg-config`` options." msgstr "" -#: ../../using/configure.rst:338 +#: ../../using/configure.rst:341 msgid "C compiler options" msgstr "" -#: ../../using/configure.rst:342 ../../using/configure.rst:1308 +#: ../../using/configure.rst:345 ../../using/configure.rst:1326 msgid "C compiler command." msgstr "" -#: ../../using/configure.rst:346 ../../using/configure.rst:1320 +#: ../../using/configure.rst:349 ../../using/configure.rst:1338 msgid "C compiler flags." msgstr "" -#: ../../using/configure.rst:350 +#: ../../using/configure.rst:353 msgid "C preprocessor command." msgstr "" -#: ../../using/configure.rst:354 +#: ../../using/configure.rst:357 msgid "C preprocessor flags, e.g. :samp:`-I{include_dir}`." msgstr "" -#: ../../using/configure.rst:358 ../../using/configure.rst:812 +#: ../../using/configure.rst:361 ../../using/configure.rst:830 msgid "Linker options" msgstr "" -#: ../../using/configure.rst:362 +#: ../../using/configure.rst:365 msgid "Linker flags, e.g. :samp:`-L{library_directory}`." msgstr "" -#: ../../using/configure.rst:366 +#: ../../using/configure.rst:369 msgid "Libraries to pass to the linker, e.g. :samp:`-l{library}`." msgstr "" -#: ../../using/configure.rst:370 +#: ../../using/configure.rst:373 msgid "Name for machine-dependent library files." msgstr "" -#: ../../using/configure.rst:374 +#: ../../using/configure.rst:377 msgid "Options for third-party dependencies" msgstr "" -#: ../../using/configure.rst:381 +#: ../../using/configure.rst:384 msgid "" "C compiler and linker flags to link Python to ``libbz2``, used by :mod:`bz2` " "module, overriding ``pkg-config``." msgstr "" -#: ../../using/configure.rst:387 +#: ../../using/configure.rst:390 msgid "" "C compiler and linker flags for ``libncurses`` or ``libncursesw``, used by :" "mod:`curses` module, overriding ``pkg-config``." msgstr "" -#: ../../using/configure.rst:393 +#: ../../using/configure.rst:396 msgid "C compiler and linker flags for ``gdbm``." msgstr "" -#: ../../using/configure.rst:398 +#: ../../using/configure.rst:401 msgid "" "C compiler and linker flags for ``libb2`` (:ref:`BLAKE2 `), " "used by :mod:`hashlib` module, overriding ``pkg-config``." msgstr "" -#: ../../using/configure.rst:404 +#: ../../using/configure.rst:407 msgid "" "C compiler and linker flags for ``libedit``, used by :mod:`readline` module, " "overriding ``pkg-config``." msgstr "" -#: ../../using/configure.rst:410 +#: ../../using/configure.rst:413 msgid "" "C compiler and linker flags for ``libffi``, used by :mod:`ctypes` module, " "overriding ``pkg-config``." msgstr "" -#: ../../using/configure.rst:416 +#: ../../using/configure.rst:419 msgid "" "C compiler and linker flags for ``libmpdec``, used by :mod:`decimal` module, " "overriding ``pkg-config``." msgstr "" -#: ../../using/configure.rst:421 +#: ../../using/configure.rst:424 msgid "" "These environment variables have no effect unless :option:`--with-system-" "libmpdec` is specified." msgstr "" -#: ../../using/configure.rst:427 +#: ../../using/configure.rst:430 msgid "" "C compiler and linker flags for ``liblzma``, used by :mod:`lzma` module, " "overriding ``pkg-config``." msgstr "" -#: ../../using/configure.rst:433 +#: ../../using/configure.rst:436 msgid "" "C compiler and linker flags for ``libreadline``, used by :mod:`readline` " "module, overriding ``pkg-config``." msgstr "" -#: ../../using/configure.rst:439 +#: ../../using/configure.rst:442 msgid "" "C compiler and linker flags for ``libsqlite3``, used by :mod:`sqlite3` " "module, overriding ``pkg-config``." msgstr "" -#: ../../using/configure.rst:445 +#: ../../using/configure.rst:448 msgid "" "C compiler and linker flags for ``libuuid``, used by :mod:`uuid` module, " "overriding ``pkg-config``." msgstr "" -#: ../../using/configure.rst:451 +#: ../../using/configure.rst:454 +msgid "" +"C compiler and linker flags for ``libzstd``, used by :mod:`compression.zstd` " +"module, overriding ``pkg-config``." +msgstr "" + +#: ../../using/configure.rst:462 msgid "C compiler and linker flags for PANEL, overriding ``pkg-config``." msgstr "" -#: ../../using/configure.rst:453 +#: ../../using/configure.rst:464 msgid "" "C compiler and linker flags for ``libpanel`` or ``libpanelw``, used by :mod:" "`curses.panel` module, overriding ``pkg-config``." msgstr "" -#: ../../using/configure.rst:459 +#: ../../using/configure.rst:470 msgid "C compiler and linker flags for TCLTK, overriding ``pkg-config``." msgstr "" -#: ../../using/configure.rst:464 +#: ../../using/configure.rst:475 msgid "" "C compiler and linker flags for ``libzlib``, used by :mod:`gzip` module, " "overriding ``pkg-config``." msgstr "" -#: ../../using/configure.rst:469 +#: ../../using/configure.rst:480 msgid "WebAssembly Options" msgstr "" -#: ../../using/configure.rst:473 +#: ../../using/configure.rst:484 msgid "Turn on dynamic linking support for WASM." msgstr "" -#: ../../using/configure.rst:475 +#: ../../using/configure.rst:486 msgid "" "Dynamic linking enables ``dlopen``. File size of the executable increases " "due to limited dead code elimination and additional features." msgstr "" -#: ../../using/configure.rst:482 +#: ../../using/configure.rst:493 msgid "Turn on pthreads support for WASM." msgstr "" -#: ../../using/configure.rst:488 +#: ../../using/configure.rst:499 msgid "Install Options" msgstr "" -#: ../../using/configure.rst:492 +#: ../../using/configure.rst:503 msgid "" "Install architecture-independent files in PREFIX. On Unix, it defaults to :" "file:`/usr/local`." msgstr "" -#: ../../using/configure.rst:495 +#: ../../using/configure.rst:506 msgid "This value can be retrieved at runtime using :data:`sys.prefix`." msgstr "" -#: ../../using/configure.rst:497 +#: ../../using/configure.rst:508 msgid "" "As an example, one can use ``--prefix=\"$HOME/.local/\"`` to install a " "Python in its home directory." msgstr "" -#: ../../using/configure.rst:502 +#: ../../using/configure.rst:513 msgid "" "Install architecture-dependent files in EPREFIX, defaults to :option:`--" "prefix`." msgstr "" -#: ../../using/configure.rst:504 +#: ../../using/configure.rst:515 msgid "This value can be retrieved at runtime using :data:`sys.exec_prefix`." msgstr "" -#: ../../using/configure.rst:508 +#: ../../using/configure.rst:519 msgid "" "Don't build nor install test modules, like the :mod:`test` package or the :" "mod:`!_testcapi` extension module (built and installed by default)." msgstr "" -#: ../../using/configure.rst:515 +#: ../../using/configure.rst:526 msgid "Select the :mod:`ensurepip` command run on Python installation:" msgstr "" -#: ../../using/configure.rst:517 +#: ../../using/configure.rst:528 msgid "" "``upgrade`` (default): run ``python -m ensurepip --altinstall --upgrade`` " "command." msgstr "" -#: ../../using/configure.rst:519 +#: ../../using/configure.rst:530 msgid "``install``: run ``python -m ensurepip --altinstall`` command;" msgstr "" -#: ../../using/configure.rst:520 +#: ../../using/configure.rst:531 msgid "``no``: don't run ensurepip;" msgstr "" -#: ../../using/configure.rst:526 +#: ../../using/configure.rst:537 msgid "Performance options" msgstr "" -#: ../../using/configure.rst:528 +#: ../../using/configure.rst:539 msgid "" "Configuring Python using ``--enable-optimizations --with-lto`` (PGO + LTO) " "is recommended for best performance. The experimental ``--enable-bolt`` flag " "can also be used to improve performance." msgstr "" -#: ../../using/configure.rst:534 +#: ../../using/configure.rst:545 msgid "" "Enable Profile Guided Optimization (PGO) using :envvar:`PROFILE_TASK` " "(disabled by default)." msgstr "" -#: ../../using/configure.rst:537 +#: ../../using/configure.rst:548 msgid "" "The C compiler Clang requires ``llvm-profdata`` program for PGO. On macOS, " "GCC also requires it: GCC is just an alias to Clang on macOS." msgstr "" -#: ../../using/configure.rst:540 +#: ../../using/configure.rst:551 msgid "" "Disable also semantic interposition in libpython if ``--enable-shared`` and " "GCC is used: add ``-fno-semantic-interposition`` to the compiler and linker " "flags." msgstr "" -#: ../../using/configure.rst:546 +#: ../../using/configure.rst:557 msgid "" "During the build, you may encounter compiler warnings about profile data not " "being available for some source files. These warnings are harmless, as only " @@ -828,58 +840,58 @@ msgid "" "profile-instr-unprofiled`` to :envvar:`CFLAGS`." msgstr "" -#: ../../using/configure.rst:555 +#: ../../using/configure.rst:566 msgid "Use ``-fno-semantic-interposition`` on GCC." msgstr "" -#: ../../using/configure.rst:560 +#: ../../using/configure.rst:571 msgid "" "Environment variable used in the Makefile: Python command line arguments for " "the PGO generation task." msgstr "" -#: ../../using/configure.rst:563 +#: ../../using/configure.rst:574 msgid "Default: ``-m test --pgo --timeout=$(TESTTIMEOUT)``." msgstr "" -#: ../../using/configure.rst:567 +#: ../../using/configure.rst:578 msgid "Task failure is no longer ignored silently." msgstr "" -#: ../../using/configure.rst:572 +#: ../../using/configure.rst:583 msgid "Enable Link Time Optimization (LTO) in any build (disabled by default)." msgstr "" -#: ../../using/configure.rst:574 +#: ../../using/configure.rst:585 msgid "" "The C compiler Clang requires ``llvm-ar`` for LTO (``ar`` on macOS), as well " "as an LTO-aware linker (``ld.gold`` or ``lld``)." msgstr "" -#: ../../using/configure.rst:579 +#: ../../using/configure.rst:590 msgid "To use ThinLTO feature, use ``--with-lto=thin`` on Clang." msgstr "" -#: ../../using/configure.rst:582 +#: ../../using/configure.rst:593 msgid "" "Use ThinLTO as the default optimization policy on Clang if the compiler " "accepts the flag." msgstr "" -#: ../../using/configure.rst:587 +#: ../../using/configure.rst:598 msgid "" "Enable usage of the `BOLT post-link binary optimizer `_ (disabled by default)." msgstr "" -#: ../../using/configure.rst:591 +#: ../../using/configure.rst:602 msgid "" "BOLT is part of the LLVM project but is not always included in their binary " "distributions. This flag requires that ``llvm-bolt`` and ``merge-fdata`` are " "available." msgstr "" -#: ../../using/configure.rst:595 +#: ../../using/configure.rst:606 msgid "" "BOLT is still a fairly new project so this flag should be considered " "experimental for now. Because this tool operates on machine code its success " @@ -890,7 +902,7 @@ msgid "" "encouraged." msgstr "" -#: ../../using/configure.rst:603 +#: ../../using/configure.rst:614 msgid "" "The :envvar:`!BOLT_INSTRUMENT_FLAGS` and :envvar:`!BOLT_APPLY_FLAGS` :" "program:`configure` variables can be defined to override the default set of " @@ -898,23 +910,23 @@ msgid "" "binaries, respectively." msgstr "" -#: ../../using/configure.rst:612 +#: ../../using/configure.rst:623 msgid "" "Arguments to ``llvm-bolt`` when creating a `BOLT optimized binary `_." msgstr "" -#: ../../using/configure.rst:619 +#: ../../using/configure.rst:630 msgid "Arguments to ``llvm-bolt`` when instrumenting binaries." msgstr "" -#: ../../using/configure.rst:625 +#: ../../using/configure.rst:636 msgid "" "Enable computed gotos in evaluation loop (enabled by default on supported " "compilers)." msgstr "" -#: ../../using/configure.rst:630 +#: ../../using/configure.rst:641 msgid "" "Enable interpreters using tail calls in CPython. If enabled, enabling PGO (:" "option:`--enable-optimizations`) is highly recommended. This option " @@ -924,46 +936,46 @@ msgid "" "feature." msgstr "" -#: ../../using/configure.rst:640 +#: ../../using/configure.rst:651 msgid "" "Disable the fast :ref:`mimalloc ` allocator (enabled by default)." msgstr "" -#: ../../using/configure.rst:643 ../../using/configure.rst:650 +#: ../../using/configure.rst:654 ../../using/configure.rst:661 msgid "See also :envvar:`PYTHONMALLOC` environment variable." msgstr "" -#: ../../using/configure.rst:647 +#: ../../using/configure.rst:658 msgid "" "Disable the specialized Python memory allocator :ref:`pymalloc ` " "(enabled by default)." msgstr "" -#: ../../using/configure.rst:654 +#: ../../using/configure.rst:665 msgid "" "Disable static documentation strings to reduce the memory footprint (enabled " "by default). Documentation strings defined in Python are not affected." msgstr "" -#: ../../using/configure.rst:657 +#: ../../using/configure.rst:668 msgid "Don't define the ``WITH_DOC_STRINGS`` macro." msgstr "" -#: ../../using/configure.rst:659 +#: ../../using/configure.rst:670 msgid "See the ``PyDoc_STRVAR()`` macro." msgstr "" -#: ../../using/configure.rst:663 +#: ../../using/configure.rst:674 msgid "Enable C-level code profiling with ``gprof`` (disabled by default)." msgstr "" -#: ../../using/configure.rst:667 +#: ../../using/configure.rst:678 msgid "" "Add ``-fstrict-overflow`` to the C compiler flags (by default we add ``-fno-" "strict-overflow`` instead)." msgstr "" -#: ../../using/configure.rst:672 +#: ../../using/configure.rst:683 msgid "" "Deactivate remote debugging support described in :pep:`768` (enabled by " "default). When this flag is provided the code that allows the interpreter to " @@ -973,61 +985,73 @@ msgid "" "executed." msgstr "" -#: ../../using/configure.rst:685 +#: ../../using/configure.rst:691 +msgid "" +"This macro is defined by default, unless Python is configured with :option:" +"`--without-remote-debug`." +msgstr "" + +#: ../../using/configure.rst:694 +msgid "" +"Note that even if the macro is defined, remote debugging may not be " +"available (for example, on an incompatible platform)." +msgstr "" + +#: ../../using/configure.rst:703 msgid "Python Debug Build" msgstr "" -#: ../../using/configure.rst:687 +#: ../../using/configure.rst:705 msgid "" "A debug build is Python built with the :option:`--with-pydebug` configure " "option." msgstr "" -#: ../../using/configure.rst:690 +#: ../../using/configure.rst:708 msgid "Effects of a debug build:" msgstr "" -#: ../../using/configure.rst:692 +#: ../../using/configure.rst:710 msgid "" "Display all warnings by default: the list of default warning filters is " "empty in the :mod:`warnings` module." msgstr "" -#: ../../using/configure.rst:694 +#: ../../using/configure.rst:712 msgid "Add ``d`` to :data:`sys.abiflags`." msgstr "" -#: ../../using/configure.rst:695 +#: ../../using/configure.rst:713 msgid "Add :func:`!sys.gettotalrefcount` function." msgstr "" -#: ../../using/configure.rst:696 +#: ../../using/configure.rst:714 msgid "Add :option:`-X showrefcount <-X>` command line option." msgstr "" -#: ../../using/configure.rst:697 +#: ../../using/configure.rst:715 msgid "" "Add :option:`-d` command line option and :envvar:`PYTHONDEBUG` environment " "variable to debug the parser." msgstr "" -#: ../../using/configure.rst:699 +#: ../../using/configure.rst:717 msgid "" "Add support for the ``__lltrace__`` variable: enable low-level tracing in " "the bytecode evaluation loop if the variable is defined." msgstr "" -#: ../../using/configure.rst:701 +#: ../../using/configure.rst:719 msgid "" "Install :ref:`debug hooks on memory allocators ` " "to detect buffer overflow and other memory errors." msgstr "" -#: ../../using/configure.rst:703 +#: ../../using/configure.rst:721 msgid "Define ``Py_DEBUG`` and ``Py_REF_DEBUG`` macros." msgstr "" -#: ../../using/configure.rst:704 +#: ../../using/configure.rst:722 msgid "" "Add runtime checks: code surrounded by ``#ifdef Py_DEBUG`` and ``#endif``. " "Enable ``assert(...)`` and ``_PyObject_ASSERT(...)`` assertions: don't set " @@ -1035,317 +1059,317 @@ msgid "" "option). Main runtime checks:" msgstr "" -#: ../../using/configure.rst:709 +#: ../../using/configure.rst:727 msgid "Add sanity checks on the function arguments." msgstr "" -#: ../../using/configure.rst:710 +#: ../../using/configure.rst:728 msgid "" "Unicode and int objects are created with their memory filled with a pattern " "to detect usage of uninitialized objects." msgstr "" -#: ../../using/configure.rst:712 +#: ../../using/configure.rst:730 msgid "" "Ensure that functions which can clear or replace the current exception are " "not called with an exception raised." msgstr "" -#: ../../using/configure.rst:714 +#: ../../using/configure.rst:732 msgid "Check that deallocator functions don't change the current exception." msgstr "" -#: ../../using/configure.rst:715 +#: ../../using/configure.rst:733 msgid "" "The garbage collector (:func:`gc.collect` function) runs some basic checks " "on objects consistency." msgstr "" -#: ../../using/configure.rst:717 +#: ../../using/configure.rst:735 msgid "" "The :c:macro:`!Py_SAFE_DOWNCAST()` macro checks for integer underflow and " "overflow when downcasting from wide types to narrow types." msgstr "" -#: ../../using/configure.rst:720 +#: ../../using/configure.rst:738 msgid "" "See also the :ref:`Python Development Mode ` and the :option:`--" "with-trace-refs` configure option." msgstr "" -#: ../../using/configure.rst:723 +#: ../../using/configure.rst:741 msgid "" "Release builds and debug builds are now ABI compatible: defining the " "``Py_DEBUG`` macro no longer implies the ``Py_TRACE_REFS`` macro (see the :" "option:`--with-trace-refs` option)." msgstr "" -#: ../../using/configure.rst:730 +#: ../../using/configure.rst:748 msgid "Debug options" msgstr "" -#: ../../using/configure.rst:734 +#: ../../using/configure.rst:752 msgid "" ":ref:`Build Python in debug mode `: define the ``Py_DEBUG`` " "macro (disabled by default)." msgstr "" -#: ../../using/configure.rst:739 +#: ../../using/configure.rst:757 msgid "Enable tracing references for debugging purpose (disabled by default)." msgstr "" -#: ../../using/configure.rst:743 +#: ../../using/configure.rst:761 msgid "Define the ``Py_TRACE_REFS`` macro." msgstr "" -#: ../../using/configure.rst:744 +#: ../../using/configure.rst:762 msgid "Add :func:`sys.getobjects` function." msgstr "" -#: ../../using/configure.rst:745 +#: ../../using/configure.rst:763 msgid "Add :envvar:`PYTHONDUMPREFS` environment variable." msgstr "" -#: ../../using/configure.rst:747 +#: ../../using/configure.rst:765 msgid "" "The :envvar:`PYTHONDUMPREFS` environment variable can be used to dump " "objects and reference counts still alive at Python exit." msgstr "" -#: ../../using/configure.rst:750 +#: ../../using/configure.rst:768 msgid ":ref:`Statically allocated objects ` are not traced." msgstr "" -#: ../../using/configure.rst:754 +#: ../../using/configure.rst:772 msgid "" "This build is now ABI compatible with release build and :ref:`debug build " "`." msgstr "" -#: ../../using/configure.rst:760 +#: ../../using/configure.rst:778 msgid "" "Build with C assertions enabled (default is no): ``assert(...);`` and " "``_PyObject_ASSERT(...);``." msgstr "" -#: ../../using/configure.rst:763 +#: ../../using/configure.rst:781 msgid "" "If set, the ``NDEBUG`` macro is not defined in the :envvar:`OPT` compiler " "variable." msgstr "" -#: ../../using/configure.rst:766 +#: ../../using/configure.rst:784 msgid "" "See also the :option:`--with-pydebug` option (:ref:`debug build `) which also enables assertions." msgstr "" -#: ../../using/configure.rst:773 +#: ../../using/configure.rst:791 msgid "Enable Valgrind support (default is no)." msgstr "" -#: ../../using/configure.rst:777 +#: ../../using/configure.rst:795 msgid "Enable DTrace support (default is no)." msgstr "" -#: ../../using/configure.rst:779 +#: ../../using/configure.rst:797 msgid "" "See :ref:`Instrumenting CPython with DTrace and SystemTap `." msgstr "" -#: ../../using/configure.rst:786 +#: ../../using/configure.rst:804 msgid "" "Enable AddressSanitizer memory error detector, ``asan`` (default is no)." msgstr "" -#: ../../using/configure.rst:792 +#: ../../using/configure.rst:810 msgid "" "Enable MemorySanitizer allocation error detector, ``msan`` (default is no)." msgstr "" -#: ../../using/configure.rst:798 +#: ../../using/configure.rst:816 msgid "" "Enable UndefinedBehaviorSanitizer undefined behaviour detector, ``ubsan`` " "(default is no)." msgstr "" -#: ../../using/configure.rst:805 +#: ../../using/configure.rst:823 msgid "Enable ThreadSanitizer data race detector, ``tsan`` (default is no)." msgstr "" -#: ../../using/configure.rst:816 +#: ../../using/configure.rst:834 msgid "Enable building a shared Python library: ``libpython`` (default is no)." msgstr "" -#: ../../using/configure.rst:820 +#: ../../using/configure.rst:838 msgid "" "Do not build ``libpythonMAJOR.MINOR.a`` and do not install ``python.o`` " "(built and enabled by default)." msgstr "" -#: ../../using/configure.rst:827 +#: ../../using/configure.rst:845 msgid "Libraries options" msgstr "" -#: ../../using/configure.rst:831 +#: ../../using/configure.rst:849 msgid "Link against additional libraries (default is no)." msgstr "" -#: ../../using/configure.rst:835 +#: ../../using/configure.rst:853 msgid "" "Build the :mod:`!pyexpat` module using an installed ``expat`` library " "(default is no)." msgstr "" -#: ../../using/configure.rst:840 +#: ../../using/configure.rst:858 msgid "" "Build the ``_decimal`` extension module using an installed ``mpdecimal`` " "library, see the :mod:`decimal` module (default is yes)." msgstr "" -#: ../../using/configure.rst:845 +#: ../../using/configure.rst:863 msgid "Default to using the installed ``mpdecimal`` library." msgstr "" -#: ../../using/configure.rst:848 +#: ../../using/configure.rst:866 msgid "" "A copy of the ``mpdecimal`` library sources will no longer be distributed " "with Python 3.15." msgstr "" -#: ../../using/configure.rst:852 +#: ../../using/configure.rst:870 msgid ":option:`LIBMPDEC_CFLAGS` and :option:`LIBMPDEC_LIBS`." msgstr "" -#: ../../using/configure.rst:856 +#: ../../using/configure.rst:874 msgid "Designate a backend library for the :mod:`readline` module." msgstr "" -#: ../../using/configure.rst:858 +#: ../../using/configure.rst:876 msgid "readline: Use readline as the backend." msgstr "" -#: ../../using/configure.rst:859 +#: ../../using/configure.rst:877 msgid "editline: Use editline as the backend." msgstr "" -#: ../../using/configure.rst:865 +#: ../../using/configure.rst:883 msgid "Don't build the :mod:`readline` module (built by default)." msgstr "" -#: ../../using/configure.rst:867 +#: ../../using/configure.rst:885 msgid "Don't define the ``HAVE_LIBREADLINE`` macro." msgstr "" -#: ../../using/configure.rst:873 +#: ../../using/configure.rst:891 msgid "" "Override ``libm`` math library to *STRING* (default is system-dependent)." msgstr "" -#: ../../using/configure.rst:877 +#: ../../using/configure.rst:895 msgid "Override ``libc`` C library to *STRING* (default is system-dependent)." msgstr "" -#: ../../using/configure.rst:881 +#: ../../using/configure.rst:899 msgid "Root of the OpenSSL directory." msgstr "" -#: ../../using/configure.rst:887 +#: ../../using/configure.rst:905 msgid "Set runtime library directory (rpath) for OpenSSL libraries:" msgstr "" -#: ../../using/configure.rst:889 +#: ../../using/configure.rst:907 msgid "``no`` (default): don't set rpath;" msgstr "" -#: ../../using/configure.rst:890 +#: ../../using/configure.rst:908 msgid "" "``auto``: auto-detect rpath from :option:`--with-openssl` and ``pkg-config``;" msgstr "" -#: ../../using/configure.rst:892 +#: ../../using/configure.rst:910 msgid "*DIR*: set an explicit rpath." msgstr "" -#: ../../using/configure.rst:898 +#: ../../using/configure.rst:916 msgid "Security Options" msgstr "" -#: ../../using/configure.rst:902 +#: ../../using/configure.rst:920 msgid "Select hash algorithm for use in ``Python/pyhash.c``:" msgstr "" -#: ../../using/configure.rst:904 +#: ../../using/configure.rst:922 msgid "``siphash13`` (default);" msgstr "" -#: ../../using/configure.rst:905 +#: ../../using/configure.rst:923 msgid "``siphash24``;" msgstr "" -#: ../../using/configure.rst:906 +#: ../../using/configure.rst:924 msgid "``fnv``." msgstr "" -#: ../../using/configure.rst:910 +#: ../../using/configure.rst:928 msgid "``siphash13`` is added and it is the new default." msgstr "" -#: ../../using/configure.rst:915 +#: ../../using/configure.rst:933 msgid "Built-in hash modules:" msgstr "" -#: ../../using/configure.rst:917 +#: ../../using/configure.rst:935 msgid "``md5``;" msgstr "" -#: ../../using/configure.rst:918 +#: ../../using/configure.rst:936 msgid "``sha1``;" msgstr "" -#: ../../using/configure.rst:919 +#: ../../using/configure.rst:937 msgid "``sha256``;" msgstr "" -#: ../../using/configure.rst:920 +#: ../../using/configure.rst:938 msgid "``sha512``;" msgstr "" -#: ../../using/configure.rst:921 +#: ../../using/configure.rst:939 msgid "``sha3`` (with shake);" msgstr "" -#: ../../using/configure.rst:922 +#: ../../using/configure.rst:940 msgid "``blake2``." msgstr "" -#: ../../using/configure.rst:928 +#: ../../using/configure.rst:946 msgid "Override the OpenSSL default cipher suites string:" msgstr "" -#: ../../using/configure.rst:930 +#: ../../using/configure.rst:948 msgid "``python`` (default): use Python's preferred selection;" msgstr "" -#: ../../using/configure.rst:931 +#: ../../using/configure.rst:949 msgid "``openssl``: leave OpenSSL's defaults untouched;" msgstr "" -#: ../../using/configure.rst:932 +#: ../../using/configure.rst:950 msgid "*STRING*: use a custom string" msgstr "" -#: ../../using/configure.rst:934 +#: ../../using/configure.rst:952 msgid "See the :mod:`ssl` module." msgstr "" -#: ../../using/configure.rst:940 +#: ../../using/configure.rst:958 msgid "" "The settings ``python`` and *STRING* also set TLS 1.2 as minimum protocol " "version." msgstr "" -#: ../../using/configure.rst:945 +#: ../../using/configure.rst:963 msgid "" "Disable compiler options that are `recommended by OpenSSF`_ for security " "reasons with no performance overhead. If this option is not enabled, CPython " @@ -1354,24 +1378,24 @@ msgid "" "listed below." msgstr "" -#: ../../using/configure.rst:949 +#: ../../using/configure.rst:967 msgid "" "The following compiler options are disabled with :option:`!--disable-safety`:" msgstr "" -#: ../../using/configure.rst:951 +#: ../../using/configure.rst:969 msgid "" "`-fstack-protector-strong`_: Enable run-time checks for stack-based buffer " "overflows." msgstr "" -#: ../../using/configure.rst:952 +#: ../../using/configure.rst:970 msgid "" "`-Wtrampolines`_: Enable warnings about trampolines that require executable " "stacks." msgstr "" -#: ../../using/configure.rst:962 +#: ../../using/configure.rst:980 msgid "" "Enable compiler options that are `recommended by OpenSSF`_ for security " "reasons which require overhead. If this option is not enabled, CPython will " @@ -1380,81 +1404,81 @@ msgid "" "listed below." msgstr "" -#: ../../using/configure.rst:966 +#: ../../using/configure.rst:984 msgid "" "The following compiler options are enabled with :option:`!--enable-slower-" "safety`:" msgstr "" -#: ../../using/configure.rst:968 +#: ../../using/configure.rst:986 msgid "" "`-D_FORTIFY_SOURCE=3`_: Fortify sources with compile- and run-time checks " "for unsafe libc usage and buffer overflows." msgstr "" -#: ../../using/configure.rst:976 +#: ../../using/configure.rst:994 msgid "macOS Options" msgstr "" -#: ../../using/configure.rst:978 +#: ../../using/configure.rst:996 msgid "See :source:`Mac/README.rst`." msgstr "" -#: ../../using/configure.rst:983 +#: ../../using/configure.rst:1001 msgid "" "Create a universal binary build. *SDKDIR* specifies which macOS SDK should " "be used to perform the build (default is no)." msgstr "" -#: ../../using/configure.rst:989 +#: ../../using/configure.rst:1007 msgid "" "Create a Python.framework rather than a traditional Unix install. Optional " "*INSTALLDIR* specifies the installation path (default is no)." msgstr "" -#: ../../using/configure.rst:994 +#: ../../using/configure.rst:1012 msgid "" "Specify the kind of universal binary that should be created. This option is " "only valid when :option:`--enable-universalsdk` is set." msgstr "" -#: ../../using/configure.rst:997 +#: ../../using/configure.rst:1015 msgid "Options:" msgstr "" -#: ../../using/configure.rst:999 +#: ../../using/configure.rst:1017 msgid "``universal2`` (x86-64 and arm64);" msgstr "" -#: ../../using/configure.rst:1000 +#: ../../using/configure.rst:1018 msgid "``32-bit`` (PPC and i386);" msgstr "" -#: ../../using/configure.rst:1001 +#: ../../using/configure.rst:1019 msgid "``64-bit`` (PPC64 and x86-64);" msgstr "" -#: ../../using/configure.rst:1002 +#: ../../using/configure.rst:1020 msgid "``3-way`` (i386, PPC and x86-64);" msgstr "" -#: ../../using/configure.rst:1003 +#: ../../using/configure.rst:1021 msgid "``intel`` (i386 and x86-64);" msgstr "" -#: ../../using/configure.rst:1004 +#: ../../using/configure.rst:1022 msgid "``intel-32`` (i386);" msgstr "" -#: ../../using/configure.rst:1005 +#: ../../using/configure.rst:1023 msgid "``intel-64`` (x86-64);" msgstr "" -#: ../../using/configure.rst:1006 +#: ../../using/configure.rst:1024 msgid "``all`` (PPC, i386, PPC64 and x86-64)." msgstr "" -#: ../../using/configure.rst:1008 +#: ../../using/configure.rst:1026 msgid "" "Note that values for this configuration item are *not* the same as the " "identifiers used for universal binary wheels on macOS. See the Python " @@ -1463,13 +1487,13 @@ msgid "" "platform-compatibility-tags/#macos>`_" msgstr "" -#: ../../using/configure.rst:1016 +#: ../../using/configure.rst:1034 msgid "" "Specify the name for the python framework on macOS only valid when :option:" "`--enable-framework` is set (default: ``Python``)." msgstr "" -#: ../../using/configure.rst:1022 +#: ../../using/configure.rst:1040 msgid "" "The Python standard library contains strings that are known to trigger " "automated inspection tool errors when submitted for distribution by the " @@ -1478,29 +1502,29 @@ msgid "" "can also be specified. This option is disabled by default." msgstr "" -#: ../../using/configure.rst:1031 +#: ../../using/configure.rst:1049 msgid "iOS Options" msgstr "" -#: ../../using/configure.rst:1033 +#: ../../using/configure.rst:1051 msgid "See :source:`iOS/README.rst`." msgstr "" -#: ../../using/configure.rst:1037 +#: ../../using/configure.rst:1055 msgid "" "Create a Python.framework. Unlike macOS, the *INSTALLDIR* argument " "specifying the installation path is mandatory." msgstr "" -#: ../../using/configure.rst:1042 +#: ../../using/configure.rst:1060 msgid "Specify the name for the framework (default: ``Python``)." msgstr "" -#: ../../using/configure.rst:1046 +#: ../../using/configure.rst:1064 msgid "Cross Compiling Options" msgstr "" -#: ../../using/configure.rst:1048 +#: ../../using/configure.rst:1066 msgid "" "Cross compiling, also known as cross building, can be used to build Python " "for another CPU architecture or platform. Cross compiling requires a Python " @@ -1508,28 +1532,28 @@ msgid "" "match the version of the cross compiled host Python." msgstr "" -#: ../../using/configure.rst:1055 +#: ../../using/configure.rst:1073 msgid "" "configure for building on BUILD, usually guessed by :program:`config.guess`." msgstr "" -#: ../../using/configure.rst:1059 +#: ../../using/configure.rst:1077 msgid "cross-compile to build programs to run on HOST (target platform)" msgstr "" -#: ../../using/configure.rst:1063 +#: ../../using/configure.rst:1081 msgid "path to build ``python`` binary for cross compiling" msgstr "" -#: ../../using/configure.rst:1069 +#: ../../using/configure.rst:1087 msgid "An environment variable that points to a file with configure overrides." msgstr "" -#: ../../using/configure.rst:1071 +#: ../../using/configure.rst:1089 msgid "Example *config.site* file:" msgstr "" -#: ../../using/configure.rst:1073 +#: ../../using/configure.rst:1091 msgid "" "# config.site-aarch64\n" "ac_cv_buggy_getaddrinfo=no\n" @@ -1537,15 +1561,15 @@ msgid "" "ac_cv_file__dev_ptc=no" msgstr "" -#: ../../using/configure.rst:1082 +#: ../../using/configure.rst:1100 msgid "Program to run CPython for the host platform for cross-compilation." msgstr "" -#: ../../using/configure.rst:1087 +#: ../../using/configure.rst:1105 msgid "Cross compiling example::" msgstr "" -#: ../../using/configure.rst:1089 +#: ../../using/configure.rst:1107 msgid "" "CONFIG_SITE=config.site-aarch64 ../configure \\\n" " --build=x86_64-pc-linux-gnu \\\n" @@ -1553,64 +1577,64 @@ msgid "" " --with-build-python=../x86_64/python" msgstr "" -#: ../../using/configure.rst:1096 +#: ../../using/configure.rst:1114 msgid "Python Build System" msgstr "" -#: ../../using/configure.rst:1099 +#: ../../using/configure.rst:1117 msgid "Main files of the build system" msgstr "" -#: ../../using/configure.rst:1101 +#: ../../using/configure.rst:1119 msgid ":file:`configure.ac` => :file:`configure`;" msgstr "" -#: ../../using/configure.rst:1102 +#: ../../using/configure.rst:1120 msgid "" ":file:`Makefile.pre.in` => :file:`Makefile` (created by :file:`configure`);" msgstr "" -#: ../../using/configure.rst:1103 +#: ../../using/configure.rst:1121 msgid ":file:`pyconfig.h` (created by :file:`configure`);" msgstr "" -#: ../../using/configure.rst:1104 +#: ../../using/configure.rst:1122 msgid "" ":file:`Modules/Setup`: C extensions built by the Makefile using :file:" "`Module/makesetup` shell script;" msgstr "" -#: ../../using/configure.rst:1108 +#: ../../using/configure.rst:1126 msgid "Main build steps" msgstr "" -#: ../../using/configure.rst:1110 +#: ../../using/configure.rst:1128 msgid "C files (``.c``) are built as object files (``.o``)." msgstr "" -#: ../../using/configure.rst:1111 +#: ../../using/configure.rst:1129 msgid "A static ``libpython`` library (``.a``) is created from objects files." msgstr "" -#: ../../using/configure.rst:1112 +#: ../../using/configure.rst:1130 msgid "" "``python.o`` and the static ``libpython`` library are linked into the final " "``python`` program." msgstr "" -#: ../../using/configure.rst:1114 +#: ../../using/configure.rst:1132 msgid "C extensions are built by the Makefile (see :file:`Modules/Setup`)." msgstr "" -#: ../../using/configure.rst:1117 +#: ../../using/configure.rst:1135 msgid "Main Makefile targets" msgstr "" -#: ../../using/configure.rst:1120 +#: ../../using/configure.rst:1138 msgid "make" msgstr "" -#: ../../using/configure.rst:1122 +#: ../../using/configure.rst:1140 msgid "" "For the most part, when rebuilding after editing some code or refreshing " "your checkout from upstream, all you need to do is execute ``make``, which " @@ -1621,22 +1645,22 @@ msgid "" "all`` will build. The three choices are:" msgstr "" -#: ../../using/configure.rst:1131 +#: ../../using/configure.rst:1149 msgid "``profile-opt`` (configured with ``--enable-optimizations``)" msgstr "" -#: ../../using/configure.rst:1132 +#: ../../using/configure.rst:1150 msgid "" "``build_wasm`` (chosen if the host platform matches ``wasm32-wasi*`` or " "``wasm32-emscripten``)" msgstr "" -#: ../../using/configure.rst:1134 +#: ../../using/configure.rst:1152 msgid "" "``build_all`` (configured without explicitly using either of the others)" msgstr "" -#: ../../using/configure.rst:1136 +#: ../../using/configure.rst:1154 msgid "" "Depending on the most recent source file changes, Make will rebuild any " "targets (object files and executables) deemed out-of-date, including running " @@ -1649,11 +1673,11 @@ msgid "" "problems, at the expense of longer build times." msgstr "" -#: ../../using/configure.rst:1149 +#: ../../using/configure.rst:1167 msgid "make platform" msgstr "" -#: ../../using/configure.rst:1151 +#: ../../using/configure.rst:1169 msgid "" "Build the ``python`` program, but don't build the standard library extension " "modules. This generates a file named ``platform`` which contains a single " @@ -1661,91 +1685,91 @@ msgid "" "arm64-3.12`` or ``linux-x86_64-3.13``." msgstr "" -#: ../../using/configure.rst:1158 +#: ../../using/configure.rst:1176 msgid "make profile-opt" msgstr "" -#: ../../using/configure.rst:1160 +#: ../../using/configure.rst:1178 msgid "" "Build Python using profile-guided optimization (PGO). You can use the " "configure :option:`--enable-optimizations` option to make this the default " "target of the ``make`` command (``make all`` or just ``make``)." msgstr "" -#: ../../using/configure.rst:1168 +#: ../../using/configure.rst:1186 msgid "make clean" msgstr "" -#: ../../using/configure.rst:1170 +#: ../../using/configure.rst:1188 msgid "Remove built files." msgstr "" -#: ../../using/configure.rst:1174 +#: ../../using/configure.rst:1192 msgid "make distclean" msgstr "" -#: ../../using/configure.rst:1176 +#: ../../using/configure.rst:1194 msgid "" "In addition to the work done by ``make clean``, remove files created by the " "configure script. ``configure`` will have to be run before building again. " "[#]_" msgstr "" -#: ../../using/configure.rst:1182 +#: ../../using/configure.rst:1200 msgid "make install" msgstr "" -#: ../../using/configure.rst:1184 +#: ../../using/configure.rst:1202 msgid "Build the ``all`` target and install Python." msgstr "" -#: ../../using/configure.rst:1188 +#: ../../using/configure.rst:1206 msgid "make test" msgstr "" -#: ../../using/configure.rst:1190 +#: ../../using/configure.rst:1208 msgid "" "Build the ``all`` target and run the Python test suite with the ``--fast-" "ci`` option without GUI tests. Variables:" msgstr "" -#: ../../using/configure.rst:1193 +#: ../../using/configure.rst:1211 msgid "``TESTOPTS``: additional regrtest command-line options." msgstr "" -#: ../../using/configure.rst:1194 +#: ../../using/configure.rst:1212 msgid "``TESTPYTHONOPTS``: additional Python command-line options." msgstr "" -#: ../../using/configure.rst:1195 +#: ../../using/configure.rst:1213 msgid "``TESTTIMEOUT``: timeout in seconds (default: 10 minutes)." msgstr "" -#: ../../using/configure.rst:1199 +#: ../../using/configure.rst:1217 msgid "make ci" msgstr "" -#: ../../using/configure.rst:1201 +#: ../../using/configure.rst:1219 msgid "" "This is similar to ``make test``, but uses the ``-ugui`` to also run GUI " "tests." msgstr "" -#: ../../using/configure.rst:1207 +#: ../../using/configure.rst:1225 msgid "make buildbottest" msgstr "" -#: ../../using/configure.rst:1209 +#: ../../using/configure.rst:1227 msgid "" "This is similar to ``make test``, but uses the ``--slow-ci`` option and " "default timeout of 20 minutes, instead of ``--fast-ci`` option." msgstr "" -#: ../../using/configure.rst:1214 +#: ../../using/configure.rst:1232 msgid "make regen-all" msgstr "" -#: ../../using/configure.rst:1216 +#: ../../using/configure.rst:1234 msgid "" "Regenerate (almost) all generated files. These include (but are not limited " "to) bytecode cases, and parser generator file. ``make regen-stdlib-module-" @@ -1753,18 +1777,18 @@ msgid "" "files <#generated-files>`_." msgstr "" -#: ../../using/configure.rst:1223 +#: ../../using/configure.rst:1241 msgid "C extensions" msgstr "" -#: ../../using/configure.rst:1225 +#: ../../using/configure.rst:1243 msgid "" "Some C extensions are built as built-in modules, like the ``sys`` module. " "They are built with the ``Py_BUILD_CORE_BUILTIN`` macro defined. Built-in " "modules have no ``__file__`` attribute:" msgstr "" -#: ../../using/configure.rst:1229 +#: ../../using/configure.rst:1247 msgid "" ">>> import sys\n" ">>> sys\n" @@ -1775,14 +1799,14 @@ msgid "" "AttributeError: module 'sys' has no attribute '__file__'" msgstr "" -#: ../../using/configure.rst:1239 +#: ../../using/configure.rst:1257 msgid "" "Other C extensions are built as dynamic libraries, like the ``_asyncio`` " "module. They are built with the ``Py_BUILD_CORE_MODULE`` macro defined. " "Example on Linux x86-64:" msgstr "" -#: ../../using/configure.rst:1243 +#: ../../using/configure.rst:1261 msgid "" ">>> import _asyncio\n" ">>> _asyncio\n" @@ -1792,7 +1816,7 @@ msgid "" "'/usr/lib64/python3.9/lib-dynload/_asyncio.cpython-39-x86_64-linux-gnu.so'" msgstr "" -#: ../../using/configure.rst:1251 +#: ../../using/configure.rst:1269 msgid "" ":file:`Modules/Setup` is used to generate Makefile targets to build C " "extensions. At the beginning of the files, C extensions are built as built-" @@ -1800,304 +1824,304 @@ msgid "" "dynamic libraries." msgstr "" -#: ../../using/configure.rst:1255 +#: ../../using/configure.rst:1273 msgid "" "The :c:macro:`!PyAPI_FUNC()`, :c:macro:`!PyAPI_DATA()` and :c:macro:" "`PyMODINIT_FUNC` macros of :file:`Include/exports.h` are defined differently " "depending if the ``Py_BUILD_CORE_MODULE`` macro is defined:" msgstr "" -#: ../../using/configure.rst:1259 +#: ../../using/configure.rst:1277 msgid "Use ``Py_EXPORTED_SYMBOL`` if the ``Py_BUILD_CORE_MODULE`` is defined" msgstr "" -#: ../../using/configure.rst:1260 +#: ../../using/configure.rst:1278 msgid "Use ``Py_IMPORTED_SYMBOL`` otherwise." msgstr "" -#: ../../using/configure.rst:1262 +#: ../../using/configure.rst:1280 msgid "" "If the ``Py_BUILD_CORE_BUILTIN`` macro is used by mistake on a C extension " "built as a shared library, its :samp:`PyInit_{xxx}()` function is not " "exported, causing an :exc:`ImportError` on import." msgstr "" -#: ../../using/configure.rst:1268 +#: ../../using/configure.rst:1286 msgid "Compiler and linker flags" msgstr "" -#: ../../using/configure.rst:1270 +#: ../../using/configure.rst:1288 msgid "" "Options set by the ``./configure`` script and environment variables and used " "by ``Makefile``." msgstr "" -#: ../../using/configure.rst:1274 +#: ../../using/configure.rst:1292 msgid "Preprocessor flags" msgstr "" -#: ../../using/configure.rst:1278 +#: ../../using/configure.rst:1296 msgid "" "Value of :envvar:`CPPFLAGS` variable passed to the ``./configure`` script." msgstr "" -#: ../../using/configure.rst:1284 +#: ../../using/configure.rst:1302 msgid "" "(Objective) C/C++ preprocessor flags, e.g. :samp:`-I{include_dir}` if you " "have headers in a nonstandard directory *include_dir*." msgstr "" -#: ../../using/configure.rst:1287 ../../using/configure.rst:1477 +#: ../../using/configure.rst:1305 ../../using/configure.rst:1495 msgid "" "Both :envvar:`CPPFLAGS` and :envvar:`LDFLAGS` need to contain the shell's " "value to be able to build extension modules using the directories specified " "in the environment variables." msgstr "" -#: ../../using/configure.rst:1297 +#: ../../using/configure.rst:1315 msgid "" "Extra preprocessor flags added for building the interpreter object files." msgstr "" -#: ../../using/configure.rst:1299 +#: ../../using/configure.rst:1317 msgid "" "Default: ``$(BASECPPFLAGS) -I. -I$(srcdir)/Include $(CONFIGURE_CPPFLAGS) " "$(CPPFLAGS)``." msgstr "" -#: ../../using/configure.rst:1304 +#: ../../using/configure.rst:1322 msgid "Compiler flags" msgstr "" -#: ../../using/configure.rst:1310 +#: ../../using/configure.rst:1328 msgid "Example: ``gcc -pthread``." msgstr "" -#: ../../using/configure.rst:1314 +#: ../../using/configure.rst:1332 msgid "C++ compiler command." msgstr "" -#: ../../using/configure.rst:1316 +#: ../../using/configure.rst:1334 msgid "Example: ``g++ -pthread``." msgstr "" -#: ../../using/configure.rst:1324 +#: ../../using/configure.rst:1342 msgid "" ":envvar:`CFLAGS_NODIST` is used for building the interpreter and stdlib C " "extensions. Use it when a compiler flag should *not* be part of :envvar:" "`CFLAGS` once Python is installed (:gh:`65320`)." msgstr "" -#: ../../using/configure.rst:1328 +#: ../../using/configure.rst:1346 msgid "In particular, :envvar:`CFLAGS` should not contain:" msgstr "" -#: ../../using/configure.rst:1330 +#: ../../using/configure.rst:1348 msgid "" "the compiler flag ``-I`` (for setting the search path for include files). " "The ``-I`` flags are processed from left to right, and any flags in :envvar:" "`CFLAGS` would take precedence over user- and package-supplied ``-I`` flags." msgstr "" -#: ../../using/configure.rst:1335 +#: ../../using/configure.rst:1353 msgid "" "hardening flags such as ``-Werror`` because distributions cannot control " "whether packages installed by users conform to such heightened standards." msgstr "" -#: ../../using/configure.rst:1343 +#: ../../using/configure.rst:1361 msgid "" "Options passed to the :mod:`compileall` command line when building PYC files " "in ``make install``. Default: ``-j0``." msgstr "" -#: ../../using/configure.rst:1350 +#: ../../using/configure.rst:1368 msgid "Extra C compiler flags." msgstr "" -#: ../../using/configure.rst:1354 +#: ../../using/configure.rst:1372 msgid "" "Value of :envvar:`CFLAGS` variable passed to the ``./configure`` script." msgstr "" -#: ../../using/configure.rst:1361 +#: ../../using/configure.rst:1379 msgid "" "Value of :envvar:`CFLAGS_NODIST` variable passed to the ``./configure`` " "script." msgstr "" -#: ../../using/configure.rst:1368 +#: ../../using/configure.rst:1386 msgid "Base compiler flags." msgstr "" -#: ../../using/configure.rst:1372 +#: ../../using/configure.rst:1390 msgid "Optimization flags." msgstr "" -#: ../../using/configure.rst:1376 +#: ../../using/configure.rst:1394 msgid "Strict or non-strict aliasing flags used to compile ``Python/dtoa.c``." msgstr "" -#: ../../using/configure.rst:1382 +#: ../../using/configure.rst:1400 msgid "Compiler flags used to build a shared library." msgstr "" -#: ../../using/configure.rst:1384 +#: ../../using/configure.rst:1402 msgid "For example, ``-fPIC`` is used on Linux and on BSD." msgstr "" -#: ../../using/configure.rst:1388 +#: ../../using/configure.rst:1406 msgid "Extra C flags added for building the interpreter object files." msgstr "" -#: ../../using/configure.rst:1390 +#: ../../using/configure.rst:1408 msgid "" "Default: ``$(CCSHARED)`` when :option:`--enable-shared` is used, or an empty " "string otherwise." msgstr "" -#: ../../using/configure.rst:1395 +#: ../../using/configure.rst:1413 msgid "" "Default: ``$(BASECFLAGS) $(OPT) $(CONFIGURE_CFLAGS) $(CFLAGS) " "$(EXTRA_CFLAGS)``." msgstr "" -#: ../../using/configure.rst:1399 +#: ../../using/configure.rst:1417 msgid "" "Default: ``$(CONFIGURE_CFLAGS_NODIST) $(CFLAGS_NODIST) -I$(srcdir)/Include/" "internal``." msgstr "" -#: ../../using/configure.rst:1405 +#: ../../using/configure.rst:1423 msgid "C flags used for building the interpreter object files." msgstr "" -#: ../../using/configure.rst:1407 +#: ../../using/configure.rst:1425 msgid "" "Default: ``$(PY_CFLAGS) $(PY_CFLAGS_NODIST) $(PY_CPPFLAGS) " "$(CFLAGSFORSHARED)``." msgstr "" -#: ../../using/configure.rst:1413 +#: ../../using/configure.rst:1431 msgid "Default: ``$(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE``." msgstr "" -#: ../../using/configure.rst:1419 +#: ../../using/configure.rst:1437 msgid "" "Compiler flags to build a standard library extension module as a built-in " "module, like the :mod:`posix` module." msgstr "" -#: ../../using/configure.rst:1422 +#: ../../using/configure.rst:1440 msgid "Default: ``$(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN``." msgstr "" -#: ../../using/configure.rst:1428 +#: ../../using/configure.rst:1446 msgid "Purify command. Purify is a memory debugger program." msgstr "" -#: ../../using/configure.rst:1430 +#: ../../using/configure.rst:1448 msgid "Default: empty string (not used)." msgstr "" -#: ../../using/configure.rst:1434 +#: ../../using/configure.rst:1452 msgid "Linker flags" msgstr "" -#: ../../using/configure.rst:1438 +#: ../../using/configure.rst:1456 msgid "" "Linker command used to build programs like ``python`` and ``_testembed``." msgstr "" -#: ../../using/configure.rst:1440 +#: ../../using/configure.rst:1458 msgid "Default: ``$(PURIFY) $(CC)``." msgstr "" -#: ../../using/configure.rst:1444 +#: ../../using/configure.rst:1462 msgid "" "Value of :envvar:`LDFLAGS` variable passed to the ``./configure`` script." msgstr "" -#: ../../using/configure.rst:1446 +#: ../../using/configure.rst:1464 msgid "" "Avoid assigning :envvar:`CFLAGS`, :envvar:`LDFLAGS`, etc. so users can use " "them on the command line to append to these values without stomping the pre-" "set values." msgstr "" -#: ../../using/configure.rst:1454 +#: ../../using/configure.rst:1472 msgid "" ":envvar:`LDFLAGS_NODIST` is used in the same manner as :envvar:" "`CFLAGS_NODIST`. Use it when a linker flag should *not* be part of :envvar:" "`LDFLAGS` once Python is installed (:gh:`65320`)." msgstr "" -#: ../../using/configure.rst:1458 +#: ../../using/configure.rst:1476 msgid "In particular, :envvar:`LDFLAGS` should not contain:" msgstr "" -#: ../../using/configure.rst:1460 +#: ../../using/configure.rst:1478 msgid "" "the compiler flag ``-L`` (for setting the search path for libraries). The ``-" "L`` flags are processed from left to right, and any flags in :envvar:" "`LDFLAGS` would take precedence over user- and package-supplied ``-L`` flags." msgstr "" -#: ../../using/configure.rst:1467 +#: ../../using/configure.rst:1485 msgid "" "Value of :envvar:`LDFLAGS_NODIST` variable passed to the ``./configure`` " "script." msgstr "" -#: ../../using/configure.rst:1474 +#: ../../using/configure.rst:1492 msgid "" "Linker flags, e.g. :samp:`-L{lib_dir}` if you have libraries in a " "nonstandard directory *lib_dir*." msgstr "" -#: ../../using/configure.rst:1483 +#: ../../using/configure.rst:1501 msgid "" "Linker flags to pass libraries to the linker when linking the Python " "executable." msgstr "" -#: ../../using/configure.rst:1486 +#: ../../using/configure.rst:1504 msgid "Example: ``-lrt``." msgstr "" -#: ../../using/configure.rst:1490 +#: ../../using/configure.rst:1508 msgid "Command to build a shared library." msgstr "" -#: ../../using/configure.rst:1492 +#: ../../using/configure.rst:1510 msgid "Default: ``@LDSHARED@ $(PY_LDFLAGS)``." msgstr "" -#: ../../using/configure.rst:1496 +#: ../../using/configure.rst:1514 msgid "Command to build ``libpython`` shared library." msgstr "" -#: ../../using/configure.rst:1498 +#: ../../using/configure.rst:1516 msgid "Default: ``@BLDSHARED@ $(PY_CORE_LDFLAGS)``." msgstr "" -#: ../../using/configure.rst:1502 +#: ../../using/configure.rst:1520 msgid "Default: ``$(CONFIGURE_LDFLAGS) $(LDFLAGS)``." msgstr "" -#: ../../using/configure.rst:1506 +#: ../../using/configure.rst:1524 msgid "Default: ``$(CONFIGURE_LDFLAGS_NODIST) $(LDFLAGS_NODIST)``." msgstr "" -#: ../../using/configure.rst:1512 +#: ../../using/configure.rst:1530 msgid "Linker flags used for building the interpreter object files." msgstr "" -#: ../../using/configure.rst:1518 +#: ../../using/configure.rst:1536 msgid "Footnotes" msgstr "" -#: ../../using/configure.rst:1519 +#: ../../using/configure.rst:1537 msgid "" "``git clean -fdx`` is an even more extreme way to \"clean\" your checkout. " "It removes all files not known to Git. When bug hunting using ``git " diff --git a/using/editors.po b/using/editors.po index 92409254d..cf3239bee 100644 --- a/using/editors.po +++ b/using/editors.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:51+0000\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" diff --git a/using/index.po b/using/index.po index 6c19dc04a..a422a9a98 100644 --- a/using/index.po +++ b/using/index.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:51+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/using/ios.po b/using/ios.po index 14701759a..1d810ea45 100644 --- a/using/ios.po +++ b/using/ios.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-05-11 01:08+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -486,12 +490,12 @@ msgstr "" #: ../../using/ios.rst:301 msgid "" -"``PYTHONHOME`` for the interpreter is configured to point at the ``python`` " -"subfolder of your app's bundle; and" +":envvar:`PYTHONHOME` for the interpreter is configured to point at the " +"``python`` subfolder of your app's bundle; and" msgstr "" #: ../../using/ios.rst:303 -msgid "The ``PYTHONPATH`` for the interpreter includes:" +msgid "The :envvar:`PYTHONPATH` for the interpreter includes:" msgstr "" #: ../../using/ios.rst:305 @@ -539,14 +543,23 @@ msgstr "" #: ../../using/ios.rst:326 msgid "" "If you're using a separate folder for third-party packages, ensure that " -"folder is included as part of the ``PYTHONPATH`` configuration in step 10." +"folder is included as part of the :envvar:`PYTHONPATH` configuration in step " +"10." msgstr "" -#: ../../using/ios.rst:330 +#: ../../using/ios.rst:329 +msgid "" +"If any of the folders that contain third-party packages will contain ``." +"pth`` files, you should add that folder as a *site directory* (using :meth:" +"`site.addsitedir`), rather than adding to :envvar:`PYTHONPATH` or :attr:`sys." +"path` directly." +msgstr "" + +#: ../../using/ios.rst:335 msgid "Testing a Python package" msgstr "" -#: ../../using/ios.rst:332 +#: ../../using/ios.rst:337 msgid "" "The CPython source tree contains :source:`a testbed project ` " "that is used to run the CPython test suite on the iOS simulator. This " @@ -554,19 +567,19 @@ msgid "" "library's test suite on iOS." msgstr "" -#: ../../using/ios.rst:336 +#: ../../using/ios.rst:341 msgid "" "After building or obtaining an iOS XCFramework (See :source:`iOS/README.rst` " "for details), create a clone of the Python iOS testbed project by running:" msgstr "" -#: ../../using/ios.rst:339 +#: ../../using/ios.rst:344 msgid "" "$ python iOS/testbed clone --framework --app " " --app app-testbed" msgstr "" -#: ../../using/ios.rst:343 +#: ../../using/ios.rst:348 msgid "" "You will need to modify the ``iOS/testbed`` reference to point to that " "directory in the CPython source tree; any folders specified with the ``--" @@ -578,41 +591,41 @@ msgid "" "testbed/iOSTestbed/app_packages`` or similar)." msgstr "" -#: ../../using/ios.rst:352 +#: ../../using/ios.rst:357 msgid "" "You can then use the ``app-testbed`` folder to run the test suite for your " "app, For example, if ``module1.tests`` was the entry point to your test " "suite, you could run:" msgstr "" -#: ../../using/ios.rst:356 +#: ../../using/ios.rst:361 msgid "$ python app-testbed run -- module1.tests" msgstr "" -#: ../../using/ios.rst:360 +#: ../../using/ios.rst:365 msgid "" "This is the equivalent of running ``python -m module1.tests`` on a desktop " "Python build. Any arguments after the ``--`` will be passed to the testbed " "as if they were arguments to ``python -m`` on a desktop machine." msgstr "" -#: ../../using/ios.rst:364 +#: ../../using/ios.rst:369 msgid "You can also open the testbed project in Xcode by running:" msgstr "" -#: ../../using/ios.rst:366 +#: ../../using/ios.rst:371 msgid "$ open app-testbed/iOSTestbed.xcodeproj" msgstr "" -#: ../../using/ios.rst:370 +#: ../../using/ios.rst:375 msgid "This will allow you to use the full Xcode suite of tools for debugging." msgstr "" -#: ../../using/ios.rst:373 +#: ../../using/ios.rst:378 msgid "App Store Compliance" msgstr "" -#: ../../using/ios.rst:375 +#: ../../using/ios.rst:380 msgid "" "The only mechanism for distributing apps to third-party iOS devices is to " "submit the app to the iOS App Store; apps submitted for distribution must " @@ -621,7 +634,7 @@ msgid "" "problematic code." msgstr "" -#: ../../using/ios.rst:380 +#: ../../using/ios.rst:385 msgid "" "The Python standard library contains some code that is known to violate " "these automated rules. While these violations appear to be false positives, " @@ -629,7 +642,7 @@ msgid "" "Python standard library for an app to pass App Store review." msgstr "" -#: ../../using/ios.rst:385 +#: ../../using/ios.rst:390 msgid "" "The Python source tree contains :source:`a patch file ` that will remove all code that is known to cause " diff --git a/using/mac.po b/using/mac.po index 834f76a00..4bbf6f5f1 100644 --- a/using/mac.po +++ b/using/mac.po @@ -3,13 +3,17 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # +# Translators: +# Rafael Fontenelle , 2025 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:51+0000\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -40,15 +44,15 @@ msgid "" "some other options." msgstr "" -#: ../../using/mac.rst:34 +#: ../../using/mac.rst:27 msgid "Using Python for macOS from ``python.org``" msgstr "" -#: ../../using/mac.rst:37 +#: ../../using/mac.rst:30 msgid "Installation steps" msgstr "" -#: ../../using/mac.rst:39 +#: ../../using/mac.rst:32 msgid "" "For `current Python versions `_ (other " "than those in ``security`` status), the release team produces a **Python for " @@ -61,7 +65,7 @@ msgid "" "versions, currently typically from at least **macOS 10.13 High Sierra** on." msgstr "" -#: ../../using/mac.rst:51 +#: ../../using/mac.rst:44 msgid "" "The downloaded file is a standard macOS installer package file (``.pkg``). " "File integrity information (checksum, size, sigstore signature, etc) for " @@ -71,24 +75,24 @@ msgid "" "`_." msgstr "" -#: ../../using/mac.rst:57 +#: ../../using/mac.rst:50 msgid "" "For a default installation, double-click on the downloaded installer package " "file. This should launch the standard macOS Installer app and display the " "first of several installer windows steps." msgstr "" -#: ../../using/mac.rst:63 +#: ../../using/mac.rst:56 msgid "" "Clicking on the **Continue** button brings up the **Read Me** for this " "installer. Besides other important information, the **Read Me** documents " "which Python version is going to be installed and on what versions of macOS " "it is supported. You may need to scroll through to read the whole file. By " "default, this **Read Me** will also be installed in |" -"usemac_applications_folder_version| and available to read anytime." +"applications_python_version_literal| and available to read anytime." msgstr "" -#: ../../using/mac.rst:71 +#: ../../using/mac.rst:64 msgid "" "Clicking on **Continue** proceeds to display the license for Python and for " "other included software. You will then need to **Agree** to the license " @@ -96,23 +100,22 @@ msgid "" "installed and available to be read later." msgstr "" -#: ../../using/mac.rst:78 +#: ../../using/mac.rst:71 msgid "" "After the license terms are accepted, the next step is the **Installation " "Type** display. For most uses, the standard set of installation operations " "is appropriate." msgstr "" -#: ../../using/mac.rst:83 +#: ../../using/mac.rst:76 msgid "" "By pressing the **Customize** button, you can choose to omit or select " "certain package components of the installer. Click on each package name to " "see a description of what it installs. To also install support for the " -"optional experimental free-threaded feature, see :ref:`install-freethreaded-" -"macos`." +"optional free-threaded feature, see :ref:`install-freethreaded-macos`." msgstr "" -#: ../../using/mac.rst:91 +#: ../../using/mac.rst:84 msgid "" "In either case, clicking **Install** will begin the install process by " "asking permission to install new software. A macOS user name with " @@ -120,43 +123,44 @@ msgid "" "available to all users of the Mac." msgstr "" -#: ../../using/mac.rst:95 +#: ../../using/mac.rst:88 msgid "When the installation is complete, the **Summary** window will appear." msgstr "" -#: ../../using/mac.rst:99 +#: ../../using/mac.rst:92 msgid "" "Double-click on the :command:`Install Certificates.command` icon or file in " -"the |usemac_applications_folder_version| window to complete the installation." +"the |applications_python_version_literal| window to complete the " +"installation." msgstr "" -#: ../../using/mac.rst:105 +#: ../../using/mac.rst:98 msgid "" "This will open a temporary :program:`Terminal` shell window that will use " "the new Python to download and install SSL root certificates for its use." msgstr "" -#: ../../using/mac.rst:111 +#: ../../using/mac.rst:104 msgid "" "If ``Successfully installed certifi`` and ``update complete`` appears in the " "terminal window, the installation is complete. Close this terminal window " "and the installer window." msgstr "" -#: ../../using/mac.rst:115 +#: ../../using/mac.rst:108 msgid "A default install will include:" msgstr "" -#: ../../using/mac.rst:117 +#: ../../using/mac.rst:110 msgid "" -"A |usemac_applications_folder_name| folder in your :file:`Applications` " -"folder. In here you find :program:`IDLE`, the development environment that " -"is a standard part of official Python distributions; and :program:`Python " +"A |python_version_literal| folder in your :file:`Applications` folder. In " +"here you find :program:`IDLE`, the development environment that is a " +"standard part of official Python distributions; and :program:`Python " "Launcher`, which handles double-clicking Python scripts from the macOS " "`Finder `_." msgstr "" -#: ../../using/mac.rst:122 +#: ../../using/mac.rst:115 msgid "" "A framework :file:`/Library/Frameworks/Python.framework`, which includes the " "Python executable and libraries. The installer adds this location to your " @@ -164,7 +168,7 @@ msgid "" "to the Python executable are placed in :file:`/usr/local/bin/`." msgstr "" -#: ../../using/mac.rst:129 +#: ../../using/mac.rst:122 msgid "" "Recent versions of macOS include a :command:`python3` command in :file:`/usr/" "bin/python3` that links to a usually older and incomplete version of Python " @@ -178,21 +182,21 @@ msgid "" "used instead of the system :command:`python3`." msgstr "" -#: ../../using/mac.rst:140 +#: ../../using/mac.rst:133 msgid "How to run a Python script" msgstr "" -#: ../../using/mac.rst:142 +#: ../../using/mac.rst:135 msgid "" "There are two ways to invoke the Python interpreter. If you are familiar " "with using a Unix shell in a terminal window, you can invoke |" -"usemac_python_x_dot_y_literal| or ``python3`` optionally followed by one or " -"more command line options (described in :ref:`using-on-general`). The Python " +"python_x_dot_y_literal| or ``python3`` optionally followed by one or more " +"command line options (described in :ref:`using-on-general`). The Python " "tutorial also has a useful section on :ref:`using Python interactively from " "a shell `." msgstr "" -#: ../../using/mac.rst:149 +#: ../../using/mac.rst:142 msgid "" "You can also invoke the interpreter through an integrated development " "environment. :ref:`idle` is a basic editor and interpreter environment which " @@ -202,31 +206,31 @@ msgid "" "document." msgstr "" -#: ../../using/mac.rst:157 +#: ../../using/mac.rst:150 msgid "" "There are many other editors and IDEs available, see :ref:`editors` for more " "information." msgstr "" -#: ../../using/mac.rst:160 +#: ../../using/mac.rst:153 msgid "" "To run a Python script file from the terminal window, you can invoke the " "interpreter with the name of the script file:" msgstr "" -#: ../../using/mac.rst:163 -msgid "|usemac_python_x_dot_y_literal| ``myscript.py``" +#: ../../using/mac.rst:156 +msgid "|python_x_dot_y_literal| ``myscript.py``" msgstr "" -#: ../../using/mac.rst:165 +#: ../../using/mac.rst:158 msgid "To run your script from the Finder, you can either:" msgstr "" -#: ../../using/mac.rst:167 +#: ../../using/mac.rst:160 msgid "Drag it to :program:`Python Launcher`." msgstr "" -#: ../../using/mac.rst:169 +#: ../../using/mac.rst:162 msgid "" "Select :program:`Python Launcher` as the default application to open your " "script (or any ``.py`` script) through the Finder Info window and double-" @@ -235,7 +239,7 @@ msgid "" "invocation, or use its ``Preferences`` menu to change things globally." msgstr "" -#: ../../using/mac.rst:175 +#: ../../using/mac.rst:168 msgid "" "Be aware that running the script directly from the macOS Finder might " "produce different results than when running from a terminal window as the " @@ -244,215 +248,207 @@ msgid "" "program, be certain of what you are about to run." msgstr "" -#: ../../using/mac.rst:185 +#: ../../using/mac.rst:178 msgid "Alternative Distributions" msgstr "" -#: ../../using/mac.rst:187 +#: ../../using/mac.rst:180 msgid "" "Besides the standard ``python.org`` for macOS installer, there are third-" "party distributions for macOS that may include additional functionality. " "Some popular distributions and their key features:" msgstr "" -#: ../../using/mac.rst:191 +#: ../../using/mac.rst:184 msgid "`ActivePython `_" msgstr "" -#: ../../using/mac.rst:192 +#: ../../using/mac.rst:185 msgid "Installer with multi-platform compatibility, documentation" msgstr "" -#: ../../using/mac.rst:194 +#: ../../using/mac.rst:187 msgid "`Anaconda `_" msgstr "" -#: ../../using/mac.rst:195 +#: ../../using/mac.rst:188 msgid "" "Popular scientific modules (such as numpy, scipy, and pandas) and the " "``conda`` package manager." msgstr "" -#: ../../using/mac.rst:198 +#: ../../using/mac.rst:191 msgid "`Homebrew `_" msgstr "" -#: ../../using/mac.rst:199 +#: ../../using/mac.rst:192 msgid "" "Package manager for macOS including multiple versions of Python and many " "third-party Python-based packages (including numpy, scipy, and pandas)." msgstr "" -#: ../../using/mac.rst:202 +#: ../../using/mac.rst:195 msgid "`MacPorts `_" msgstr "" -#: ../../using/mac.rst:203 +#: ../../using/mac.rst:196 msgid "" "Another package manager for macOS including multiple versions of Python and " "many third-party Python-based packages. May include pre-built versions of " "Python and many packages for older versions of macOS." msgstr "" -#: ../../using/mac.rst:207 +#: ../../using/mac.rst:200 msgid "" "Note that distributions might not include the latest versions of Python or " "other libraries, and are not maintained or supported by the core Python team." msgstr "" -#: ../../using/mac.rst:213 +#: ../../using/mac.rst:206 msgid "Installing Additional Python Packages" msgstr "" -#: ../../using/mac.rst:215 +#: ../../using/mac.rst:208 msgid "Refer to the `Python Packaging User Guide`_ for more information." msgstr "" -#: ../../using/mac.rst:225 +#: ../../using/mac.rst:218 msgid "GUI Programming" msgstr "" -#: ../../using/mac.rst:227 +#: ../../using/mac.rst:220 msgid "" "There are several options for building GUI applications on the Mac with " "Python." msgstr "" -#: ../../using/mac.rst:229 +#: ../../using/mac.rst:222 msgid "" "The standard Python GUI toolkit is :mod:`tkinter`, based on the cross-" "platform Tk toolkit (https://www.tcl.tk). A macOS-native version of Tk is " "included with the installer." msgstr "" -#: ../../using/mac.rst:233 +#: ../../using/mac.rst:226 msgid "" "*PyObjC* is a Python binding to Apple's Objective-C/Cocoa framework. " "Information on PyObjC is available from :pypi:`pyobjc`." msgstr "" -#: ../../using/mac.rst:236 +#: ../../using/mac.rst:229 msgid "A number of alternative macOS GUI toolkits are available including:" msgstr "" -#: ../../using/mac.rst:238 +#: ../../using/mac.rst:231 msgid "" "`PySide `_: Official Python bindings to the " "`Qt GUI toolkit `_." msgstr "" -#: ../../using/mac.rst:241 +#: ../../using/mac.rst:234 msgid "" "`PyQt `_: Alternative Python " "bindings to Qt." msgstr "" -#: ../../using/mac.rst:244 +#: ../../using/mac.rst:237 msgid "" "`Kivy `_: A cross-platform GUI toolkit that supports " "desktop and mobile platforms." msgstr "" -#: ../../using/mac.rst:247 +#: ../../using/mac.rst:240 msgid "" "`Toga `_: Part of the `BeeWare Project `_; supports desktop, mobile, web and console apps." msgstr "" -#: ../../using/mac.rst:250 +#: ../../using/mac.rst:243 msgid "" "`wxPython `_: A cross-platform toolkit that supports " "desktop operating systems." msgstr "" -#: ../../using/mac.rst:255 +#: ../../using/mac.rst:248 msgid "Advanced Topics" msgstr "" -#: ../../using/mac.rst:260 +#: ../../using/mac.rst:253 msgid "Installing Free-threaded Binaries" msgstr "" -#: ../../using/mac.rst:262 -msgid "(Experimental)" -msgstr "" - -#: ../../using/mac.rst:266 -msgid "" -"Everything described in this section is considered experimental, and should " -"be expected to change in future releases." -msgstr "" - -#: ../../using/mac.rst:269 +#: ../../using/mac.rst:257 msgid "" "The ``python.org`` :ref:`Python for macOS ` installer package can optionally install an additional build of " -"Python |usemac_x_dot_y| that supports :pep:`703`, the experimental free-" -"threading feature (running with the :term:`global interpreter lock` " -"disabled). Check the release page on ``python.org`` for possible updated " -"information." +"Python |version| that supports :pep:`703`, the free-threading feature " +"(running with the :term:`global interpreter lock` disabled). Check the " +"release page on ``python.org`` for possible updated information." msgstr "" -#: ../../using/mac.rst:275 +#: ../../using/mac.rst:263 msgid "" -"Because this feature is still considered experimental, the support for it is " -"not installed by default. It is packaged as a separate install option, " -"available by clicking the **Customize** button on the **Installation Type** " -"step of the installer as described above." +"The free-threaded mode is working and continues to be improved, but there is " +"some additional overhead in single-threaded workloads compared to the " +"regular build. Additionally, third-party packages, in particular ones with " +"an :term:`extension module`, may not be ready for use in a free-threaded " +"build, and will re-enable the :term:`GIL`. Therefore, the support for free-" +"threading is not installed by default. It is packaged as a separate install " +"option, available by clicking the **Customize** button on the **Installation " +"Type** step of the installer as described above." msgstr "" -#: ../../using/mac.rst:282 +#: ../../using/mac.rst:275 msgid "" "If the box next to the **Free-threaded Python** package name is checked, a " "separate :file:`PythonT.framework` will also be installed alongside the " "normal :file:`Python.framework` in :file:`/Library/Frameworks`. This " -"configuration allows a free-threaded Python |usemac_x_dot_y| build to co-" -"exist on your system with a traditional (GIL only) Python |usemac_x_dot_y| " -"build with minimal risk while installing or testing. This installation " -"layout is itself experimental and is subject to change in future releases." +"configuration allows a free-threaded Python |version| build to co-exist on " +"your system with a traditional (GIL only) Python |version| build with " +"minimal risk while installing or testing. This installation layout may " +"change in future releases." msgstr "" -#: ../../using/mac.rst:290 +#: ../../using/mac.rst:283 msgid "Known cautions and limitations:" msgstr "" -#: ../../using/mac.rst:292 +#: ../../using/mac.rst:285 msgid "" "The **UNIX command-line tools** package, which is selected by default, will " -"install links in :file:`/usr/local/bin` for |" -"usemac_python_x_dot_y_t_literal|, the free-threaded interpreter, and |" -"usemac_python_x_dot_y_t_literal_config|, a configuration utility which may " -"be useful for package builders. Since :file:`/usr/local/bin` is typically " -"included in your shell ``PATH``, in most cases no changes to your ``PATH`` " -"environment variables should be needed to use |" -"usemac_python_x_dot_y_t_literal|." +"install links in :file:`/usr/local/bin` for |python_x_dot_y_t_literal|, the " +"free-threaded interpreter, and |python_x_dot_y_t_literal_config|, a " +"configuration utility which may be useful for package builders. Since :file:" +"`/usr/local/bin` is typically included in your shell ``PATH``, in most cases " +"no changes to your ``PATH`` environment variables should be needed to use |" +"python_x_dot_y_t_literal|." msgstr "" -#: ../../using/mac.rst:300 +#: ../../using/mac.rst:293 msgid "" "For this release, the **Shell profile updater** package and the :file:" -"`Update Shell Profile.command` in |usemac_applications_folder_version| do " +"`Update Shell Profile.command` in |applications_python_version_literal| do " "not support the free-threaded package." msgstr "" -#: ../../using/mac.rst:304 +#: ../../using/mac.rst:297 msgid "" "The free-threaded build and the traditional build have separate search paths " "and separate :file:`site-packages` directories so, by default, if you need a " "package available in both builds, it may need to be installed in both. The " "free-threaded package will install a separate instance of :program:`pip` for " -"use with |usemac_python_x_dot_y_t_literal|." +"use with |python_x_dot_y_t_literal|." msgstr "" -#: ../../using/mac.rst:310 +#: ../../using/mac.rst:303 msgid "To install a package using :command:`pip` without a :command:`venv`:" msgstr "" -#: ../../using/mac.rst:312 -msgid "|usemac_python_x_dot_y_t_literal| ``-m pip install ``" +#: ../../using/mac.rst:307 +msgid "python\\ |version|\\ t -m pip install " msgstr "" -#: ../../using/mac.rst:314 +#: ../../using/mac.rst:309 msgid "" "When working with multiple Python environments, it is usually safest and " "easiest to :ref:`create and use virtual environments `. This can " @@ -460,23 +456,23 @@ msgid "" "use:" msgstr "" -#: ../../using/mac.rst:318 -msgid "|usemac_python_x_dot_y_t_literal| ``-m venv ``" +#: ../../using/mac.rst:315 +msgid "python\\ |version|\\ t -m venv " msgstr "" -#: ../../using/mac.rst:320 +#: ../../using/mac.rst:318 msgid "then :command:`activate`." msgstr "" -#: ../../using/mac.rst:322 +#: ../../using/mac.rst:320 msgid "To run a free-threaded version of IDLE:" msgstr "" #: ../../using/mac.rst:324 -msgid "|usemac_python_x_dot_y_t_literal| ``-m idlelib``" +msgid "python\\ |version|\\ t -m idlelib" msgstr "" -#: ../../using/mac.rst:326 +#: ../../using/mac.rst:327 msgid "" "The interpreters in both builds respond to the same :ref:`PYTHON environment " "variables ` which may have unexpected results, for " @@ -485,7 +481,7 @@ msgid "" "E`` to ignore these environment variables." msgstr "" -#: ../../using/mac.rst:333 +#: ../../using/mac.rst:334 msgid "" "The free-threaded build links to the third-party shared libraries, such as " "``OpenSSL`` and ``Tk``, installed in the traditional framework. This means " @@ -494,46 +490,46 @@ msgid "" "run once." msgstr "" -#: ../../using/mac.rst:339 +#: ../../using/mac.rst:340 msgid "" "If you cannot depend on the link in ``/usr/local/bin`` pointing to the " -"``python.org`` free-threaded |usemac_python_x_dot_y_t_literal| (for example, " -"if you want to install your own version there or some other distribution " -"does), you can explicitly set your shell ``PATH`` environment variable to " -"include the ``PythonT`` framework ``bin`` directory:" +"``python.org`` free-threaded |python_x_dot_y_t_literal| (for example, if you " +"want to install your own version there or some other distribution does), you " +"can explicitly set your shell ``PATH`` environment variable to include the " +"``PythonT`` framework ``bin`` directory:" msgstr "" -#: ../../using/mac.rst:345 +#: ../../using/mac.rst:348 msgid "" -"export PATH=\"/Library/Frameworks/PythonT.framework/Versions/3.13/bin\":" -"\"$PATH\"" +"export PATH=\"/Library/Frameworks/PythonT.framework/Versions/\\ |version|\\ /" +"bin\":\"$PATH\"" msgstr "" -#: ../../using/mac.rst:349 +#: ../../using/mac.rst:350 msgid "" "The traditional framework installation by default does something similar, " "except for :file:`Python.framework`. Be aware that having both framework " "``bin`` directories in ``PATH`` can lead to confusion if there are duplicate " -"names like ``python3.13`` in both; which one is actually used depends on the " -"order they appear in ``PATH``. The ``which python3.x`` or ``which python3." -"xt`` commands can show which path is being used. Using virtual environments " -"can help avoid such ambiguities. Another option might be to create a shell :" -"command:`alias` to the desired interpreter, like:" +"names like |python_x_dot_y_literal| in both; which one is actually used " +"depends on the order they appear in ``PATH``. The ``which python3.x`` or " +"``which python3.xt`` commands can show which path is being used. Using " +"virtual environments can help avoid such ambiguities. Another option might " +"be to create a shell :command:`alias` to the desired interpreter, like:" msgstr "" -#: ../../using/mac.rst:358 +#: ../../using/mac.rst:361 msgid "" -"alias py3.13=\"/Library/Frameworks/Python.framework/Versions/3.13/bin/" -"python3.13\"\n" -"alias py3.13t=\"/Library/Frameworks/PythonT.framework/Versions/3.13/bin/" -"python3.13t\"" +"alias py\\ |version|\\ =\"/Library/Frameworks/Python.framework/Versions/\\ |" +"version|\\ /bin/python\\ |version|\\ \"\n" +"alias py\\ |version|\\ t=\"/Library/Frameworks/PythonT.framework/Versions/\\ " +"|version|\\ /bin/python\\ |version|\\ t\"" msgstr "" -#: ../../using/mac.rst:364 +#: ../../using/mac.rst:365 msgid "Installing using the command line" msgstr "" -#: ../../using/mac.rst:366 +#: ../../using/mac.rst:367 msgid "" "If you want to use automation to install the ``python.org`` installer " "package (rather than by using the familiar macOS :program:`Installer` GUI " @@ -541,23 +537,23 @@ msgid "" "non-default options, too. If you are not familiar with :command:`installer`, " "it can be somewhat cryptic (see :command:`man installer` for more " "information). As an example, the following shell snippet shows one way to do " -"it, using the ``3.13.0b2`` release and selecting the free-threaded " +"it, using the |x_dot_y_b2_literal| release and selecting the free-threaded " "interpreter option:" msgstr "" -#: ../../using/mac.rst:375 +#: ../../using/mac.rst:378 msgid "" -"RELEASE=\"python-3.13.0b2-macos11.pkg\"\n" +"RELEASE=\"python-\\ |version|\\ 0b2-macos11.pkg\"\n" "\n" "# download installer pkg\n" -"curl -O https://www.python.org/ftp/python/3.13.0/${RELEASE}\n" +"curl -O \\https://www.python.org/ftp/python/\\ |version|\\ .0/${RELEASE}\n" "\n" "# create installer choicechanges to customize the install:\n" -"# enable the PythonTFramework-3.13 package\n" +"# enable the PythonTFramework-\\ |version|\\ package\n" "# while accepting the other defaults (install all other packages)\n" "cat > ./choicechanges.plist <\n" -"\n" "\n" "\n" @@ -567,7 +563,8 @@ msgid "" " choiceAttribute\n" " selected\n" " choiceIdentifier\n" -" org.python.Python.PythonTFramework-3.13\n" +" org.python.Python.PythonTFramework-\\ |version|\\ \n" " \n" "\n" "\n" @@ -577,34 +574,36 @@ msgid "" "plist -target /" msgstr "" -#: ../../using/mac.rst:405 +#: ../../using/mac.rst:406 msgid "" "You can then test that both installer builds are now available with " "something like:" msgstr "" -#: ../../using/mac.rst:407 +#: ../../using/mac.rst:410 msgid "" "$ # test that the free-threaded interpreter was installed if the Unix " "Command Tools package was enabled\n" -"$ /usr/local/bin/python3.13t -VV\n" -"Python 3.13.0b2 experimental free-threading build (v3.13.0b2:3a83b172af, " -"Jun 5 2024, 12:57:31) [Clang 15.0.0 (clang-1500.3.9.4)]\n" -"$ # and the traditional interpreter\n" -"$ /usr/local/bin/python3.13 -VV\n" -"Python 3.13.0b2 (v3.13.0b2:3a83b172af, Jun 5 2024, 12:50:24) [Clang 15.0.0 " +"$ /usr/local/bin/python\\ |version|\\ t -VV\n" +"Python \\ |version|\\ .0b2 free-threading build (v\\ |version|" +"\\ .0b2:3a83b172af, Jun 5 2024, 12:57:31) [Clang 15.0.0 " "(clang-1500.3.9.4)]\n" +"$ # and the traditional interpreter\n" +"$ /usr/local/bin/python\\ |version|\\ -VV\n" +"Python \\ |version|\\ .0b2 (v\\ |version|\\ .0b2:3a83b172af, Jun 5 2024, " +"12:50:24) [Clang 15.0.0 (clang-1500.3.9.4)]\n" "$ # test that they are also available without the prefix if /usr/local/bin " "is on $PATH\n" -"$ python3.13t -VV\n" -"Python 3.13.0b2 experimental free-threading build (v3.13.0b2:3a83b172af, " -"Jun 5 2024, 12:57:31) [Clang 15.0.0 (clang-1500.3.9.4)]\n" -"$ python3.13 -VV\n" -"Python 3.13.0b2 (v3.13.0b2:3a83b172af, Jun 5 2024, 12:50:24) [Clang 15.0.0 " -"(clang-1500.3.9.4)]" +"$ python\\ |version|\\ t -VV\n" +"Python \\ |version|\\ .0b2 free-threading build (v\\ |version|" +"\\ .0b2:3a83b172af, Jun 5 2024, 12:57:31) [Clang 15.0.0 " +"(clang-1500.3.9.4)]\n" +"$ python\\ |version|\\ -VV\n" +"Python \\ |version|\\ .0b2 (v\\ |version|\\ .0b2:3a83b172af, Jun 5 2024, " +"12:50:24) [Clang 15.0.0 (clang-1500.3.9.4)]" msgstr "" -#: ../../using/mac.rst:423 +#: ../../using/mac.rst:424 msgid "" "Current ``python.org`` installers only install to fixed locations like :file:" "`/Library/Frameworks/`, :file:`/Applications`, and :file:`/usr/local/bin`. " @@ -612,23 +611,23 @@ msgid "" "other locations." msgstr "" -#: ../../using/mac.rst:431 +#: ../../using/mac.rst:432 msgid "Distributing Python Applications" msgstr "" -#: ../../using/mac.rst:433 +#: ../../using/mac.rst:434 msgid "" "A range of tools exist for converting your Python code into a standalone " "distributable application:" msgstr "" -#: ../../using/mac.rst:436 +#: ../../using/mac.rst:437 msgid "" ":pypi:`py2app`: Supports creating macOS ``.app`` bundles from a Python " "project." msgstr "" -#: ../../using/mac.rst:439 +#: ../../using/mac.rst:440 msgid "" "`Briefcase `_: Part of the `BeeWare " "Project `_; a cross-platform packaging tool that " @@ -636,17 +635,17 @@ msgid "" "and notarization." msgstr "" -#: ../../using/mac.rst:444 +#: ../../using/mac.rst:445 msgid "" "`PyInstaller `_: A cross-platform packaging tool " "that creates a single file or folder as a distributable artifact." msgstr "" -#: ../../using/mac.rst:448 +#: ../../using/mac.rst:449 msgid "App Store Compliance" msgstr "" -#: ../../using/mac.rst:450 +#: ../../using/mac.rst:451 msgid "" "Apps submitted for distribution through the macOS App Store must pass " "Apple's app review process. This process includes a set of automated " @@ -654,7 +653,7 @@ msgid "" "problematic code." msgstr "" -#: ../../using/mac.rst:454 +#: ../../using/mac.rst:455 msgid "" "The Python standard library contains some code that is known to violate " "these automated rules. While these violations appear to be false positives, " @@ -662,7 +661,7 @@ msgid "" "modify the Python standard library for an app to pass App Store review." msgstr "" -#: ../../using/mac.rst:459 +#: ../../using/mac.rst:460 msgid "" "The Python source tree contains :source:`a patch file ` that will remove all code that is known to cause " @@ -671,7 +670,7 @@ msgid "" "compliance` option." msgstr "" -#: ../../using/mac.rst:465 +#: ../../using/mac.rst:466 msgid "" "This patch is not normally required to use CPython on a Mac; nor is it " "required if you are distributing an app *outside* the macOS App Store. It is " @@ -679,11 +678,11 @@ msgid "" "channel." msgstr "" -#: ../../using/mac.rst:470 +#: ../../using/mac.rst:471 msgid "Other Resources" msgstr "" -#: ../../using/mac.rst:472 +#: ../../using/mac.rst:473 msgid "" "The `python.org Help page `_ has links " "to many useful resources. The `Pythonmac-SIG mailing list , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/using/windows.po b/using/windows.po index 4ca146784..7d1e66eb0 100644 --- a/using/windows.po +++ b/using/windows.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:51+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -583,8 +584,8 @@ msgstr "" msgid "Environment Variable" msgstr "" -#: ../../using/windows.rst:1 ../../using/windows.rst:1280 -#: ../../using/windows.rst:1300 ../../using/windows.rst:1895 +#: ../../using/windows.rst:1 ../../using/windows.rst:1301 +#: ../../using/windows.rst:1321 ../../using/windows.rst:1916 msgid "Description" msgstr "" @@ -774,15 +775,15 @@ msgstr "" msgid "````" msgstr "" -#: ../../using/windows.rst:457 ../../using/windows.rst:1669 +#: ../../using/windows.rst:457 ../../using/windows.rst:1690 msgid "For example, if the first line of your script starts with" msgstr "" -#: ../../using/windows.rst:459 ../../using/windows.rst:1671 +#: ../../using/windows.rst:459 ../../using/windows.rst:1692 msgid "#! /usr/bin/python" msgstr "" -#: ../../using/windows.rst:463 ../../using/windows.rst:1675 +#: ../../using/windows.rst:463 ../../using/windows.rst:1696 msgid "" "The default Python or an active virtual environment will be located and " "used. As many Python scripts written to work on Unix will already have this " @@ -831,11 +832,11 @@ msgid "" "``shebang_can_run_anything`` configuration option." msgstr "" -#: ../../using/windows.rst:510 +#: ../../using/windows.rst:518 msgid "Advanced Installation" msgstr "" -#: ../../using/windows.rst:512 +#: ../../using/windows.rst:520 msgid "" "For situations where an MSIX cannot be installed, such as some older " "administrative distribution platforms, there is an MSI available from the " @@ -846,13 +847,13 @@ msgid "" "configuration." msgstr "" -#: ../../using/windows.rst:521 +#: ../../using/windows.rst:529 msgid "" "Windows Server 2019 is the only version of Windows that CPython supports " "that does not support MSIX. For Windows Server 2019, you should use the MSI." msgstr "" -#: ../../using/windows.rst:524 +#: ../../using/windows.rst:532 msgid "" "Be aware that the MSI package does not bundle any runtimes, and so is not " "suitable for installs into offline environments without also creating an " @@ -860,7 +861,7 @@ msgid "" "admin-config` for information on handling these scenarios." msgstr "" -#: ../../using/windows.rst:529 +#: ../../using/windows.rst:537 msgid "" "Runtimes installed by the MSI are shared with those installed by the MSIX, " "and are all per-user only. The Python install manager does not support " @@ -870,7 +871,7 @@ msgid "" "menu." msgstr "" -#: ../../using/windows.rst:535 +#: ../../using/windows.rst:543 msgid "" "When the MSIX is installed, but commands are not available in the :envvar:" "`PATH` environment variable, they can be found under :file:`%LocalAppData%\\" @@ -882,13 +883,13 @@ msgid "" "recommended." msgstr "" -#: ../../using/windows.rst:544 +#: ../../using/windows.rst:552 msgid "" "To programmatically install the Python install manager, it is easiest to use " "WinGet, which is included with all supported versions of Windows:" msgstr "" -#: ../../using/windows.rst:547 +#: ../../using/windows.rst:555 msgid "" "$> winget install 9NQ7512CXL7T -e --accept-package-agreements --disable-" "interactivity\n" @@ -897,7 +898,7 @@ msgid "" "$> py install --configure -y" msgstr "" -#: ../../using/windows.rst:554 +#: ../../using/windows.rst:562 msgid "" "To download the Python install manager and install on another machine, the " "following WinGet command will download the required files from the Store to " @@ -907,22 +908,20 @@ msgid "" "below." msgstr "" -#: ../../using/windows.rst:560 +#: ../../using/windows.rst:568 msgid "" "$> winget download 9NQ7512CXL7T -e --skip-license --accept-package-" -"agreements --disable-interactivity" +"agreements --accept-source-agreements" msgstr "" -#: ../../using/windows.rst:564 +#: ../../using/windows.rst:572 msgid "" "To programmatically install or uninstall an MSIX using only PowerShell, the " -"`Add-AppxPackage `_ and `Remove-AppxPackage `_ PowerShell cmdlets are " +"`Add-AppxPackage`_ and `Remove-AppxPackage`_ PowerShell cmdlets are " "recommended:" msgstr "" -#: ../../using/windows.rst:569 +#: ../../using/windows.rst:575 msgid "" "$> Add-AppxPackage C:\\Downloads\\python-manager-25.0.msix\n" "...\n" @@ -930,31 +929,52 @@ msgid "" "AppxPackage" msgstr "" -#: ../../using/windows.rst:575 +#: ../../using/windows.rst:581 +msgid "" +"The latest release can be downloaded and installed by Windows by passing the " +"AppInstaller file to the Add-AppxPackage command. This installs using the " +"MSIX on python.org, and is only recommended for cases where installing via " +"the Store (interactively or using WinGet) is not possible." +msgstr "" + +#: ../../using/windows.rst:586 +msgid "" +"$> Add-AppxPackage -AppInstallerFile https://www.python.org/ftp/python/" +"pymanager/pymanager.appinstaller" +msgstr "" + +#: ../../using/windows.rst:590 msgid "" -"The native APIs for package management may be found on the Windows " -"`PackageManager `_ class. The :func:`!AddPackageAsync` method " -"installs for the current user, or use :func:`!StagePackageAsync` followed " -"by :func:`!ProvisionPackageForAllUsersAsync` to install the Python install " -"manager for all users from the MSIX package. Users will still need to " -"install their own copies of Python itself, as there is no way to trigger " -"those installs without being a logged in user." +"Other tools and APIs may also be used to provision an MSIX package for all " +"users on a machine, but Python does not consider this a supported scenario. " +"We suggest looking into the PowerShell `Add-AppxProvisionedPackage`_ cmdlet, " +"the native Windows `PackageManager`_ class, or the documentation and support " +"for your deployment tool." msgstr "" -#: ../../using/windows.rst:583 +#: ../../using/windows.rst:596 +msgid "" +"Regardless of the install method, users will still need to install their own " +"copies of Python itself, as there is no way to trigger those installs " +"without being a logged in user. When using the MSIX, the latest version of " +"Python will be available for all users to install without network access." +msgstr "" + +#: ../../using/windows.rst:601 msgid "" "Note that the MSIX downloadable from the Store and from the Python website " "are subtly different and cannot be installed at the same time. Wherever " -"possible, we suggest using the above commands to download the package from " -"the Store to reduce the risk of setting up conflicting installs." +"possible, we suggest using the above WinGet commands to download the package " +"from the Store to reduce the risk of setting up conflicting installs. There " +"are no licensing restrictions on the Python install manager that would " +"prevent using the Store package in this way." msgstr "" -#: ../../using/windows.rst:591 +#: ../../using/windows.rst:612 msgid "Administrative Configuration" msgstr "" -#: ../../using/windows.rst:593 +#: ../../using/windows.rst:614 msgid "" "There are a number of options that may be useful for administrators to " "override configuration of the Python install manager. These can be used to " @@ -963,7 +983,7 @@ msgid "" "below." msgstr "" -#: ../../using/windows.rst:598 +#: ../../using/windows.rst:619 msgid "" "Configuration options may be overridden in the registry by setting values " "under :file:`HKEY_LOCAL_MACHINE\\\\Software\\\\Policies\\\\Python\\" @@ -976,7 +996,7 @@ msgid "" "``base_config`` allows users to further modify settings they may need." msgstr "" -#: ../../using/windows.rst:608 +#: ../../using/windows.rst:629 msgid "" "Note that most settings with environment variables support those variables " "because their default setting specifies the variable. If you override them, " @@ -988,13 +1008,13 @@ msgid "" "environment variable will be used instead." msgstr "" -#: ../../using/windows.rst:617 +#: ../../using/windows.rst:638 msgid "" "Configuration settings that are paths are interpreted as relative to the " "directory containing the configuration file that specified them." msgstr "" -#: ../../using/windows.rst:620 +#: ../../using/windows.rst:641 msgid "Administrative configuration options" msgstr "" @@ -1112,36 +1132,36 @@ msgid "" "other than a Python runtime." msgstr "" -#: ../../using/windows.rst:664 ../../using/windows.rst:1459 +#: ../../using/windows.rst:685 ../../using/windows.rst:1480 msgid "Installing Free-threaded Binaries" msgstr "" -#: ../../using/windows.rst:666 ../../using/windows.rst:907 -#: ../../using/windows.rst:1461 +#: ../../using/windows.rst:687 ../../using/windows.rst:928 +#: ../../using/windows.rst:1482 msgid "(Experimental)" msgstr "" -#: ../../using/windows.rst:670 ../../using/windows.rst:911 -#: ../../using/windows.rst:1465 +#: ../../using/windows.rst:691 ../../using/windows.rst:932 +#: ../../using/windows.rst:1486 msgid "" "Everything described in this section is considered experimental, and should " "be expected to change in future releases." msgstr "" -#: ../../using/windows.rst:673 +#: ../../using/windows.rst:694 msgid "" "Pre-built distributions of the experimental free-threaded build are " "available by installing tags with the ``t`` suffix." msgstr "" -#: ../../using/windows.rst:676 +#: ../../using/windows.rst:697 msgid "" "$> py install 3.14t\n" "$> py install 3.14t-arm64\n" "$> py install 3.14t-32" msgstr "" -#: ../../using/windows.rst:682 +#: ../../using/windows.rst:703 msgid "" "This will install and register as normal. If you have no other runtimes " "installed, then ``python`` will launch this one. Otherwise, you will need to " @@ -1150,11 +1170,11 @@ msgid "" "commands." msgstr "" -#: ../../using/windows.rst:690 ../../using/windows.rst:698 +#: ../../using/windows.rst:711 ../../using/windows.rst:719 msgid "Troubleshooting" msgstr "" -#: ../../using/windows.rst:692 +#: ../../using/windows.rst:713 msgid "" "If your Python install manager does not seem to be working correctly, please " "work through these tests and fixes to see if it helps. If not, please report " @@ -1292,28 +1312,28 @@ msgid "" "for each runtime, and so you may need to add multiple paths." msgstr "" -#: ../../using/windows.rst:767 +#: ../../using/windows.rst:788 msgid "The embeddable package" msgstr "" -#: ../../using/windows.rst:771 +#: ../../using/windows.rst:792 msgid "" "The embedded distribution is a ZIP file containing a minimal Python " "environment. It is intended for acting as part of another application, " "rather than being directly accessed by end-users." msgstr "" -#: ../../using/windows.rst:775 +#: ../../using/windows.rst:796 msgid "" "To install an embedded distribution, we recommend using ``py install`` with " "the ``--target`` option:" msgstr "" -#: ../../using/windows.rst:778 +#: ../../using/windows.rst:799 msgid "$> py install 3.14-embed --target=runtime" msgstr "" -#: ../../using/windows.rst:782 +#: ../../using/windows.rst:803 msgid "" "When extracted, the embedded distribution is (almost) fully isolated from " "the user's system, including environment variables, system registry " @@ -1324,14 +1344,14 @@ msgid "" "documentation are not included." msgstr "" -#: ../../using/windows.rst:789 +#: ../../using/windows.rst:810 msgid "" "A default ``._pth`` file is included, which further restricts the default " "search paths (as described below in :ref:`windows_finding_modules`). This " "file is intended for embedders to modify as necessary." msgstr "" -#: ../../using/windows.rst:793 +#: ../../using/windows.rst:814 msgid "" "Third-party packages should be installed by the application installer " "alongside the embedded distribution. Using pip to manage dependencies as for " @@ -1342,16 +1362,16 @@ msgid "" "compatibility with newer versions before providing updates to users." msgstr "" -#: ../../using/windows.rst:801 +#: ../../using/windows.rst:822 msgid "" "The two recommended use cases for this distribution are described below." msgstr "" -#: ../../using/windows.rst:804 +#: ../../using/windows.rst:825 msgid "Python Application" msgstr "" -#: ../../using/windows.rst:806 +#: ../../using/windows.rst:827 msgid "" "An application written in Python does not necessarily require users to be " "aware of that fact. The embedded distribution may be used in this case to " @@ -1360,7 +1380,7 @@ msgid "" "there are two options." msgstr "" -#: ../../using/windows.rst:812 +#: ../../using/windows.rst:833 msgid "" "Using a specialized executable as a launcher requires some coding, but " "provides the most transparent experience for users. With a customized " @@ -1371,7 +1391,7 @@ msgid "" "line." msgstr "" -#: ../../using/windows.rst:819 +#: ../../using/windows.rst:840 msgid "" "The simpler approach is to provide a batch file or generated shortcut that " "directly calls the ``python.exe`` or ``pythonw.exe`` with the required " @@ -1380,7 +1400,7 @@ msgid "" "from other running Python processes or file associations." msgstr "" -#: ../../using/windows.rst:825 +#: ../../using/windows.rst:846 msgid "" "With the latter approach, packages should be installed as directories " "alongside the Python executable to ensure they are available on the path. " @@ -1389,11 +1409,11 @@ msgid "" "application." msgstr "" -#: ../../using/windows.rst:831 +#: ../../using/windows.rst:852 msgid "Embedding Python" msgstr "" -#: ../../using/windows.rst:833 +#: ../../using/windows.rst:854 msgid "" "Applications written in native code often require some form of scripting " "language, and the embedded Python distribution can be used for this purpose. " @@ -1404,7 +1424,7 @@ msgid "" "interpreter." msgstr "" -#: ../../using/windows.rst:840 +#: ../../using/windows.rst:861 msgid "" "As with the application use, packages can be installed to any location as " "there is an opportunity to specify search paths before initializing the " @@ -1412,11 +1432,11 @@ msgid "" "the embedded distribution and a regular installation." msgstr "" -#: ../../using/windows.rst:849 +#: ../../using/windows.rst:870 msgid "The nuget.org packages" msgstr "" -#: ../../using/windows.rst:853 +#: ../../using/windows.rst:874 msgid "" "The nuget.org package is a reduced size Python environment intended for use " "on continuous integration and build systems that do not have a system-wide " @@ -1424,14 +1444,14 @@ msgid "" "works perfectly fine for packages containing build-time tools." msgstr "" -#: ../../using/windows.rst:858 +#: ../../using/windows.rst:879 msgid "" "Visit `nuget.org `_ for the most up-to-date " "information on using nuget. What follows is a summary that is sufficient for " "Python developers." msgstr "" -#: ../../using/windows.rst:862 +#: ../../using/windows.rst:883 msgid "" "The ``nuget.exe`` command line tool may be downloaded directly from " "``https://aka.ms/nugetclidl``, for example, using curl or PowerShell. With " @@ -1439,13 +1459,13 @@ msgid "" "installed using::" msgstr "" -#: ../../using/windows.rst:867 +#: ../../using/windows.rst:888 msgid "" "nuget.exe install python -ExcludeVersion -OutputDirectory .\n" "nuget.exe install pythonx86 -ExcludeVersion -OutputDirectory ." msgstr "" -#: ../../using/windows.rst:870 +#: ../../using/windows.rst:891 msgid "" "To select a particular version, add a ``-Version 3.x.y``. The output " "directory may be changed from ``.``, and the package will be installed into " @@ -1455,7 +1475,7 @@ msgid "" "directory that contains the Python installation:" msgstr "" -#: ../../using/windows.rst:877 +#: ../../using/windows.rst:898 msgid "" "# Without -ExcludeVersion\n" "> .\\python.3.5.2\\tools\\python.exe -V\n" @@ -1466,7 +1486,7 @@ msgid "" "Python 3.5.2" msgstr "" -#: ../../using/windows.rst:887 +#: ../../using/windows.rst:908 msgid "" "In general, nuget packages are not upgradeable, and newer versions should be " "installed side-by-side and referenced using the full path. Alternatively, " @@ -1474,7 +1494,7 @@ msgid "" "will do this automatically if they do not preserve files between builds." msgstr "" -#: ../../using/windows.rst:892 +#: ../../using/windows.rst:913 msgid "" "Alongside the ``tools`` directory is a ``build\\native`` directory. This " "contains a MSBuild properties file ``python.props`` that can be used in a C+" @@ -1482,7 +1502,7 @@ msgid "" "automatically use the headers and import libraries in your build." msgstr "" -#: ../../using/windows.rst:897 +#: ../../using/windows.rst:918 msgid "" "The package information pages on nuget.org are `www.nuget.org/packages/" "python `_ for the 64-bit version, " @@ -1491,11 +1511,11 @@ msgid "" "`_ for the ARM64 version" msgstr "" -#: ../../using/windows.rst:905 +#: ../../using/windows.rst:926 msgid "Free-threaded packages" msgstr "" -#: ../../using/windows.rst:914 +#: ../../using/windows.rst:935 msgid "" "Packages containing free-threaded binaries are named `python-freethreaded " "`_ for the 64-bit " @@ -1506,45 +1526,45 @@ msgid "" "exe`` entry points, both of which run free threaded." msgstr "" -#: ../../using/windows.rst:925 +#: ../../using/windows.rst:946 msgid "Alternative bundles" msgstr "" -#: ../../using/windows.rst:927 +#: ../../using/windows.rst:948 msgid "" "Besides the standard CPython distribution, there are modified packages " "including additional functionality. The following is a list of popular " "versions and their key features:" msgstr "" -#: ../../using/windows.rst:931 +#: ../../using/windows.rst:952 msgid "`ActivePython `_" msgstr "" -#: ../../using/windows.rst:932 +#: ../../using/windows.rst:953 msgid "Installer with multi-platform compatibility, documentation, PyWin32" msgstr "" -#: ../../using/windows.rst:934 +#: ../../using/windows.rst:955 msgid "`Anaconda `_" msgstr "" -#: ../../using/windows.rst:935 +#: ../../using/windows.rst:956 msgid "" "Popular scientific modules (such as numpy, scipy and pandas) and the " "``conda`` package manager." msgstr "" -#: ../../using/windows.rst:938 +#: ../../using/windows.rst:959 msgid "" "`Enthought Deployment Manager `_" msgstr "" -#: ../../using/windows.rst:939 +#: ../../using/windows.rst:960 msgid "\"The Next Generation Python Environment and Package Manager\"." msgstr "" -#: ../../using/windows.rst:941 +#: ../../using/windows.rst:962 msgid "" "Previously Enthought provided Canopy, but it `reached end of life in 2016 " "`_." msgstr "" -#: ../../using/windows.rst:944 +#: ../../using/windows.rst:965 msgid "`WinPython `_" msgstr "" -#: ../../using/windows.rst:945 +#: ../../using/windows.rst:966 msgid "" "Windows-specific distribution with prebuilt scientific packages and tools " "for building packages." msgstr "" -#: ../../using/windows.rst:948 +#: ../../using/windows.rst:969 msgid "" "Note that these packages may not include the latest versions of Python or " "other libraries, and are not maintained or supported by the core Python team." msgstr "" -#: ../../using/windows.rst:953 +#: ../../using/windows.rst:974 msgid "Supported Windows versions" msgstr "" -#: ../../using/windows.rst:955 +#: ../../using/windows.rst:976 msgid "" "As specified in :pep:`11`, a Python release only supports a Windows platform " "while Microsoft considers the platform under extended support. This means " @@ -1581,17 +1601,17 @@ msgid "" "please install Python 3.12." msgstr "" -#: ../../using/windows.rst:965 ../../using/windows.rst:1246 +#: ../../using/windows.rst:986 ../../using/windows.rst:1267 msgid "Removing the MAX_PATH Limitation" msgstr "" -#: ../../using/windows.rst:967 ../../using/windows.rst:1248 +#: ../../using/windows.rst:988 ../../using/windows.rst:1269 msgid "" "Windows historically has limited path lengths to 260 characters. This meant " "that paths longer than this would not resolve and errors would result." msgstr "" -#: ../../using/windows.rst:970 +#: ../../using/windows.rst:991 msgid "" "In the latest versions of Windows, this limitation can be expanded to over " "32,000 characters. Your administrator will need to activate the \"Enable " @@ -1600,36 +1620,36 @@ msgid "" "``HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\FileSystem``." msgstr "" -#: ../../using/windows.rst:975 ../../using/windows.rst:1257 +#: ../../using/windows.rst:996 ../../using/windows.rst:1278 msgid "" "This allows the :func:`open` function, the :mod:`os` module and most other " "path functionality to accept and return paths longer than 260 characters." msgstr "" -#: ../../using/windows.rst:978 +#: ../../using/windows.rst:999 msgid "" "After changing the above option and rebooting, no further configuration is " "required." msgstr "" -#: ../../using/windows.rst:985 +#: ../../using/windows.rst:1006 msgid "UTF-8 mode" msgstr "" -#: ../../using/windows.rst:989 +#: ../../using/windows.rst:1010 msgid "" "Windows still uses legacy encodings for the system encoding (the ANSI Code " "Page). Python uses it for the default encoding of text files (e.g. :func:" "`locale.getencoding`)." msgstr "" -#: ../../using/windows.rst:993 +#: ../../using/windows.rst:1014 msgid "" "This may cause issues because UTF-8 is widely used on the internet and most " "Unix systems, including WSL (Windows Subsystem for Linux)." msgstr "" -#: ../../using/windows.rst:996 +#: ../../using/windows.rst:1017 msgid "" "You can use the :ref:`Python UTF-8 Mode ` to change the default " "text encoding to UTF-8. You can enable the :ref:`Python UTF-8 Mode ` is enabled, you can still use " "the system encoding (the ANSI Code Page) via the \"mbcs\" codec." msgstr "" -#: ../../using/windows.rst:1005 +#: ../../using/windows.rst:1026 msgid "" "Note that adding ``PYTHONUTF8=1`` to the default environment variables will " "affect all Python 3.7+ applications on your system. If you have any Python " @@ -1653,45 +1673,45 @@ msgid "" "utf8`` command line option." msgstr "" -#: ../../using/windows.rst:1012 +#: ../../using/windows.rst:1033 msgid "" "Even when UTF-8 mode is disabled, Python uses UTF-8 by default on Windows " "for:" msgstr "" -#: ../../using/windows.rst:1015 +#: ../../using/windows.rst:1036 msgid "Console I/O including standard I/O (see :pep:`528` for details)." msgstr "" -#: ../../using/windows.rst:1016 +#: ../../using/windows.rst:1037 msgid "" "The :term:`filesystem encoding ` " "(see :pep:`529` for details)." msgstr "" -#: ../../using/windows.rst:1023 +#: ../../using/windows.rst:1044 msgid "Finding modules" msgstr "" -#: ../../using/windows.rst:1025 +#: ../../using/windows.rst:1046 msgid "" "These notes supplement the description at :ref:`sys-path-init` with detailed " "Windows notes." msgstr "" -#: ../../using/windows.rst:1028 +#: ../../using/windows.rst:1049 msgid "" "When no ``._pth`` file is found, this is how :data:`sys.path` is populated " "on Windows:" msgstr "" -#: ../../using/windows.rst:1031 +#: ../../using/windows.rst:1052 msgid "" "An empty entry is added at the start, which corresponds to the current " "directory." msgstr "" -#: ../../using/windows.rst:1034 +#: ../../using/windows.rst:1055 msgid "" "If the environment variable :envvar:`PYTHONPATH` exists, as described in :" "ref:`using-on-envvars`, its entries are added next. Note that on Windows, " @@ -1699,7 +1719,7 @@ msgid "" "from the colon used in drive identifiers (``C:\\`` etc.)." msgstr "" -#: ../../using/windows.rst:1039 +#: ../../using/windows.rst:1060 msgid "" "Additional \"application paths\" can be added in the registry as subkeys of :" "samp:`\\\\SOFTWARE\\\\Python\\\\PythonCore\\\\{version}\\\\PythonPath` under " @@ -1709,7 +1729,7 @@ msgid "" "installers only use HKLM, so HKCU is typically empty.)" msgstr "" -#: ../../using/windows.rst:1046 +#: ../../using/windows.rst:1067 msgid "" "If the environment variable :envvar:`PYTHONHOME` is set, it is assumed as " "\"Python Home\". Otherwise, the path of the main Python executable is used " @@ -1720,31 +1740,31 @@ msgid "" "PythonPath stored in the registry." msgstr "" -#: ../../using/windows.rst:1054 +#: ../../using/windows.rst:1075 msgid "" "If the Python Home cannot be located, no :envvar:`PYTHONPATH` is specified " "in the environment, and no registry entries can be found, a default path " "with relative entries is used (e.g. ``.\\Lib;.\\plat-win``, etc)." msgstr "" -#: ../../using/windows.rst:1058 +#: ../../using/windows.rst:1079 msgid "" "If a ``pyvenv.cfg`` file is found alongside the main executable or in the " "directory one level above the executable, the following variations apply:" msgstr "" -#: ../../using/windows.rst:1061 +#: ../../using/windows.rst:1082 msgid "" "If ``home`` is an absolute path and :envvar:`PYTHONHOME` is not set, this " "path is used instead of the path to the main executable when deducing the " "home location." msgstr "" -#: ../../using/windows.rst:1065 +#: ../../using/windows.rst:1086 msgid "The end result of all this is:" msgstr "" -#: ../../using/windows.rst:1067 +#: ../../using/windows.rst:1088 msgid "" "When running :file:`python.exe`, or any other .exe in the main Python " "directory (either an installed version, or directly from the PCbuild " @@ -1752,7 +1772,7 @@ msgid "" "ignored. Other \"application paths\" in the registry are always read." msgstr "" -#: ../../using/windows.rst:1072 +#: ../../using/windows.rst:1093 msgid "" "When Python is hosted in another .exe (different directory, embedded via " "COM, etc), the \"Python Home\" will not be deduced, so the core path from " @@ -1760,20 +1780,20 @@ msgid "" "always read." msgstr "" -#: ../../using/windows.rst:1076 +#: ../../using/windows.rst:1097 msgid "" "If Python can't find its home and there are no registry value (frozen .exe, " "some very strange installation setup) you get a path with some default, but " "relative, paths." msgstr "" -#: ../../using/windows.rst:1080 +#: ../../using/windows.rst:1101 msgid "" "For those who want to bundle Python into their application or distribution, " "the following advice will prevent conflicts with other installations:" msgstr "" -#: ../../using/windows.rst:1083 +#: ../../using/windows.rst:1104 msgid "" "Include a ``._pth`` file alongside your executable containing the " "directories to include. This will ignore paths listed in the registry and " @@ -1781,20 +1801,20 @@ msgid "" "listed." msgstr "" -#: ../../using/windows.rst:1088 +#: ../../using/windows.rst:1109 msgid "" "If you are loading :file:`python3.dll` or :file:`python37.dll` in your own " "executable, explicitly set :c:member:`PyConfig.module_search_paths` before :" "c:func:`Py_InitializeFromConfig`." msgstr "" -#: ../../using/windows.rst:1092 +#: ../../using/windows.rst:1113 msgid "" "Clear and/or overwrite :envvar:`PYTHONPATH` and set :envvar:`PYTHONHOME` " "before launching :file:`python.exe` from your application." msgstr "" -#: ../../using/windows.rst:1095 +#: ../../using/windows.rst:1116 msgid "" "If you cannot use the previous suggestions (for example, you are a " "distribution that allows people to run :file:`python.exe` directly), ensure " @@ -1803,7 +1823,7 @@ msgid "" "correctly named ZIP file will be detected instead.)" msgstr "" -#: ../../using/windows.rst:1101 +#: ../../using/windows.rst:1122 msgid "" "These will ensure that the files in a system-wide installation will not take " "precedence over the copy of the standard library bundled with your " @@ -1813,19 +1833,19 @@ msgid "" "packages." msgstr "" -#: ../../using/windows.rst:1109 +#: ../../using/windows.rst:1130 msgid "" "Add ``._pth`` file support and removes ``applocal`` option from ``pyvenv." "cfg``." msgstr "" -#: ../../using/windows.rst:1114 +#: ../../using/windows.rst:1135 msgid "" "Add :file:`python{XX}.zip` as a potential landmark when directly adjacent to " "the executable." msgstr "" -#: ../../using/windows.rst:1119 +#: ../../using/windows.rst:1140 msgid "" "Modules specified in the registry under ``Modules`` (not ``PythonPath``) may " "be imported by :class:`importlib.machinery.WindowsRegistryFinder`. This " @@ -1833,86 +1853,86 @@ msgid "" "explicitly added to :data:`sys.meta_path` in the future." msgstr "" -#: ../../using/windows.rst:1125 +#: ../../using/windows.rst:1146 msgid "Additional modules" msgstr "" -#: ../../using/windows.rst:1127 +#: ../../using/windows.rst:1148 msgid "" "Even though Python aims to be portable among all platforms, there are " "features that are unique to Windows. A couple of modules, both in the " "standard library and external, and snippets exist to use these features." msgstr "" -#: ../../using/windows.rst:1131 +#: ../../using/windows.rst:1152 msgid "" "The Windows-specific standard modules are documented in :ref:`mswin-specific-" "services`." msgstr "" -#: ../../using/windows.rst:1135 +#: ../../using/windows.rst:1156 msgid "PyWin32" msgstr "" -#: ../../using/windows.rst:1137 +#: ../../using/windows.rst:1158 msgid "" "The :pypi:`PyWin32` module by Mark Hammond is a collection of modules for " "advanced Windows-specific support. This includes utilities for:" msgstr "" -#: ../../using/windows.rst:1141 +#: ../../using/windows.rst:1162 msgid "" "`Component Object Model `_ (COM)" msgstr "" -#: ../../using/windows.rst:1144 +#: ../../using/windows.rst:1165 msgid "Win32 API calls" msgstr "" -#: ../../using/windows.rst:1145 +#: ../../using/windows.rst:1166 msgid "Registry" msgstr "" -#: ../../using/windows.rst:1146 +#: ../../using/windows.rst:1167 msgid "Event log" msgstr "" -#: ../../using/windows.rst:1147 +#: ../../using/windows.rst:1168 msgid "" "`Microsoft Foundation Classes `_ (MFC) user interfaces" msgstr "" -#: ../../using/windows.rst:1151 +#: ../../using/windows.rst:1172 msgid "" "`PythonWin `_ is a sample MFC application shipped with PyWin32. " "It is an embeddable IDE with a built-in debugger." msgstr "" -#: ../../using/windows.rst:1157 +#: ../../using/windows.rst:1178 msgid "" "`Win32 How Do I...? `_" msgstr "" -#: ../../using/windows.rst:1158 +#: ../../using/windows.rst:1179 msgid "by Tim Golden" msgstr "" -#: ../../using/windows.rst:1160 +#: ../../using/windows.rst:1181 msgid "`Python and COM `_" msgstr "" -#: ../../using/windows.rst:1161 +#: ../../using/windows.rst:1182 msgid "by David and Paul Boddie" msgstr "" -#: ../../using/windows.rst:1165 +#: ../../using/windows.rst:1186 msgid "cx_Freeze" msgstr "" -#: ../../using/windows.rst:1167 +#: ../../using/windows.rst:1188 msgid "" "`cx_Freeze `_ wraps Python " "scripts into executable Windows programs (:file:`{*}.exe` files). When you " @@ -1920,11 +1940,11 @@ msgid "" "users to install Python." msgstr "" -#: ../../using/windows.rst:1174 +#: ../../using/windows.rst:1195 msgid "Compiling Python on Windows" msgstr "" -#: ../../using/windows.rst:1176 +#: ../../using/windows.rst:1197 msgid "" "If you want to compile CPython yourself, first thing you should do is get " "the `source `_. You can download " @@ -1932,38 +1952,38 @@ msgid "" "devguide.python.org/setup/#get-the-source-code>`_." msgstr "" -#: ../../using/windows.rst:1181 +#: ../../using/windows.rst:1202 msgid "" "The source tree contains a build solution and project files for Microsoft " "Visual Studio, which is the compiler used to build the official Python " "releases. These files are in the :file:`PCbuild` directory." msgstr "" -#: ../../using/windows.rst:1185 +#: ../../using/windows.rst:1206 msgid "" "Check :file:`PCbuild/readme.txt` for general information on the build " "process." msgstr "" -#: ../../using/windows.rst:1187 +#: ../../using/windows.rst:1208 msgid "For extension modules, consult :ref:`building-on-windows`." msgstr "" -#: ../../using/windows.rst:1194 +#: ../../using/windows.rst:1215 msgid "The full installer (deprecated)" msgstr "" -#: ../../using/windows.rst:1198 +#: ../../using/windows.rst:1219 msgid "" "This installer is deprecated since 3.14 and will not be produced for Python " "3.16 or later. See :ref:`pymanager` for the modern installer." msgstr "" -#: ../../using/windows.rst:1203 +#: ../../using/windows.rst:1224 msgid "Installation steps" msgstr "" -#: ../../using/windows.rst:1205 +#: ../../using/windows.rst:1226 msgid "" "Four Python |version| installers are available for download - two each for " "the 32-bit and 64-bit versions of the interpreter. The *web installer* is a " @@ -1974,43 +1994,43 @@ msgid "" "ways to avoid downloading during installation." msgstr "" -#: ../../using/windows.rst:1213 +#: ../../using/windows.rst:1234 msgid "After starting the installer, one of two options may be selected:" msgstr "" -#: ../../using/windows.rst:1217 +#: ../../using/windows.rst:1238 msgid "If you select \"Install Now\":" msgstr "" -#: ../../using/windows.rst:1219 +#: ../../using/windows.rst:1240 msgid "" "You will *not* need to be an administrator (unless a system update for the C " "Runtime Library is required or you install the :ref:`launcher` for all users)" msgstr "" -#: ../../using/windows.rst:1222 +#: ../../using/windows.rst:1243 msgid "Python will be installed into your user directory" msgstr "" -#: ../../using/windows.rst:1223 +#: ../../using/windows.rst:1244 msgid "" "The :ref:`launcher` will be installed according to the option at the bottom " "of the first page" msgstr "" -#: ../../using/windows.rst:1225 +#: ../../using/windows.rst:1246 msgid "The standard library, test suite, launcher and pip will be installed" msgstr "" -#: ../../using/windows.rst:1226 +#: ../../using/windows.rst:1247 msgid "If selected, the install directory will be added to your :envvar:`PATH`" msgstr "" -#: ../../using/windows.rst:1227 +#: ../../using/windows.rst:1248 msgid "Shortcuts will only be visible for the current user" msgstr "" -#: ../../using/windows.rst:1229 +#: ../../using/windows.rst:1250 msgid "" "Selecting \"Customize installation\" will allow you to select the features " "to install, the installation location and other options or post-install " @@ -2018,42 +2038,42 @@ msgid "" "option." msgstr "" -#: ../../using/windows.rst:1233 +#: ../../using/windows.rst:1254 msgid "" "To perform an all-users installation, you should select \"Customize " "installation\". In this case:" msgstr "" -#: ../../using/windows.rst:1236 +#: ../../using/windows.rst:1257 msgid "You may be required to provide administrative credentials or approval" msgstr "" -#: ../../using/windows.rst:1237 +#: ../../using/windows.rst:1258 msgid "Python will be installed into the Program Files directory" msgstr "" -#: ../../using/windows.rst:1238 +#: ../../using/windows.rst:1259 msgid "The :ref:`launcher` will be installed into the Windows directory" msgstr "" -#: ../../using/windows.rst:1239 +#: ../../using/windows.rst:1260 msgid "Optional features may be selected during installation" msgstr "" -#: ../../using/windows.rst:1240 +#: ../../using/windows.rst:1261 msgid "The standard library can be pre-compiled to bytecode" msgstr "" -#: ../../using/windows.rst:1241 +#: ../../using/windows.rst:1262 msgid "" "If selected, the install directory will be added to the system :envvar:`PATH`" msgstr "" -#: ../../using/windows.rst:1242 +#: ../../using/windows.rst:1263 msgid "Shortcuts are available for all users" msgstr "" -#: ../../using/windows.rst:1251 +#: ../../using/windows.rst:1272 msgid "" "In the latest versions of Windows, this limitation can be expanded to " "approximately 32,000 characters. Your administrator will need to activate " @@ -2062,19 +2082,19 @@ msgid "" "``HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\FileSystem``." msgstr "" -#: ../../using/windows.rst:1260 +#: ../../using/windows.rst:1281 msgid "After changing the above option, no further configuration is required." msgstr "" -#: ../../using/windows.rst:1264 +#: ../../using/windows.rst:1285 msgid "Support for long paths was enabled in Python." msgstr "" -#: ../../using/windows.rst:1269 +#: ../../using/windows.rst:1290 msgid "Installing Without UI" msgstr "" -#: ../../using/windows.rst:1271 +#: ../../using/windows.rst:1292 msgid "" "All of the options available in the installer UI can also be specified from " "the command line, allowing scripted installers to replicate an installation " @@ -2082,357 +2102,357 @@ msgid "" "without suppressing the UI in order to change some of the defaults." msgstr "" -#: ../../using/windows.rst:1276 +#: ../../using/windows.rst:1297 msgid "" "The following options (found by executing the installer with ``/?``) can be " "passed into the installer:" msgstr "" -#: ../../using/windows.rst:1280 ../../using/windows.rst:1300 -#: ../../using/windows.rst:1895 +#: ../../using/windows.rst:1301 ../../using/windows.rst:1321 +#: ../../using/windows.rst:1916 msgid "Name" msgstr "" -#: ../../using/windows.rst:1282 +#: ../../using/windows.rst:1303 msgid "/passive" msgstr "" -#: ../../using/windows.rst:1282 +#: ../../using/windows.rst:1303 msgid "to display progress without requiring user interaction" msgstr "" -#: ../../using/windows.rst:1284 +#: ../../using/windows.rst:1305 msgid "/quiet" msgstr "" -#: ../../using/windows.rst:1284 +#: ../../using/windows.rst:1305 msgid "to install/uninstall without displaying any UI" msgstr "" -#: ../../using/windows.rst:1286 +#: ../../using/windows.rst:1307 msgid "/simple" msgstr "" -#: ../../using/windows.rst:1286 +#: ../../using/windows.rst:1307 msgid "to prevent user customization" msgstr "" -#: ../../using/windows.rst:1288 +#: ../../using/windows.rst:1309 msgid "/uninstall" msgstr "" -#: ../../using/windows.rst:1288 +#: ../../using/windows.rst:1309 msgid "to remove Python (without confirmation)" msgstr "" -#: ../../using/windows.rst:1290 +#: ../../using/windows.rst:1311 msgid "/layout [directory]" msgstr "" -#: ../../using/windows.rst:1290 +#: ../../using/windows.rst:1311 msgid "to pre-download all components" msgstr "" -#: ../../using/windows.rst:1292 +#: ../../using/windows.rst:1313 msgid "/log [filename]" msgstr "" -#: ../../using/windows.rst:1292 +#: ../../using/windows.rst:1313 msgid "to specify log files location" msgstr "" -#: ../../using/windows.rst:1295 +#: ../../using/windows.rst:1316 msgid "" "All other options are passed as ``name=value``, where the value is usually " "``0`` to disable a feature, ``1`` to enable a feature, or a path. The full " "list of available options is shown below." msgstr "" -#: ../../using/windows.rst:1300 +#: ../../using/windows.rst:1321 msgid "Default" msgstr "" -#: ../../using/windows.rst:1302 +#: ../../using/windows.rst:1323 msgid "InstallAllUsers" msgstr "" -#: ../../using/windows.rst:1302 +#: ../../using/windows.rst:1323 msgid "Perform a system-wide installation." msgstr "" -#: ../../using/windows.rst:1302 ../../using/windows.rst:1328 -#: ../../using/windows.rst:1331 ../../using/windows.rst:1335 -#: ../../using/windows.rst:1344 ../../using/windows.rst:1366 -#: ../../using/windows.rst:1374 ../../using/windows.rst:1377 +#: ../../using/windows.rst:1323 ../../using/windows.rst:1349 +#: ../../using/windows.rst:1352 ../../using/windows.rst:1356 +#: ../../using/windows.rst:1365 ../../using/windows.rst:1387 +#: ../../using/windows.rst:1395 ../../using/windows.rst:1398 msgid "0" msgstr "" -#: ../../using/windows.rst:1304 +#: ../../using/windows.rst:1325 msgid "TargetDir" msgstr "" -#: ../../using/windows.rst:1304 +#: ../../using/windows.rst:1325 msgid "The installation directory" msgstr "" -#: ../../using/windows.rst:1304 +#: ../../using/windows.rst:1325 msgid "Selected based on InstallAllUsers" msgstr "" -#: ../../using/windows.rst:1307 +#: ../../using/windows.rst:1328 msgid "DefaultAllUsersTargetDir" msgstr "" -#: ../../using/windows.rst:1307 +#: ../../using/windows.rst:1328 msgid "The default installation directory for all-user installs" msgstr "" -#: ../../using/windows.rst:1307 +#: ../../using/windows.rst:1328 msgid "" ":file:`%ProgramFiles%\\\\\\ Python X.Y` or :file:`\\ %ProgramFiles(x86)%\\\\" "\\ Python X.Y`" msgstr "" -#: ../../using/windows.rst:1312 +#: ../../using/windows.rst:1333 msgid "DefaultJustForMeTargetDir" msgstr "" -#: ../../using/windows.rst:1312 +#: ../../using/windows.rst:1333 msgid "The default install directory for just-for-me installs" msgstr "" -#: ../../using/windows.rst:1312 +#: ../../using/windows.rst:1333 msgid "" ":file:`%LocalAppData%\\\\\\ Programs\\\\Python\\\\\\ PythonXY` or :file:" "`%LocalAppData%\\\\\\ Programs\\\\Python\\\\\\ PythonXY-32` or :file:" "`%LocalAppData%\\\\\\ Programs\\\\Python\\\\\\ PythonXY-64`" msgstr "" -#: ../../using/windows.rst:1322 +#: ../../using/windows.rst:1343 msgid "DefaultCustomTargetDir" msgstr "" -#: ../../using/windows.rst:1322 +#: ../../using/windows.rst:1343 msgid "The default custom install directory displayed in the UI" msgstr "" -#: ../../using/windows.rst:1322 ../../using/windows.rst:1379 +#: ../../using/windows.rst:1343 ../../using/windows.rst:1400 msgid "(empty)" msgstr "" -#: ../../using/windows.rst:1325 +#: ../../using/windows.rst:1346 msgid "AssociateFiles" msgstr "" -#: ../../using/windows.rst:1325 +#: ../../using/windows.rst:1346 msgid "Create file associations if the launcher is also installed." msgstr "" -#: ../../using/windows.rst:1325 ../../using/windows.rst:1339 -#: ../../using/windows.rst:1342 ../../using/windows.rst:1346 -#: ../../using/windows.rst:1350 ../../using/windows.rst:1354 -#: ../../using/windows.rst:1356 ../../using/windows.rst:1360 -#: ../../using/windows.rst:1364 ../../using/windows.rst:1368 -#: ../../using/windows.rst:1370 ../../using/windows.rst:1372 +#: ../../using/windows.rst:1346 ../../using/windows.rst:1360 +#: ../../using/windows.rst:1363 ../../using/windows.rst:1367 +#: ../../using/windows.rst:1371 ../../using/windows.rst:1375 +#: ../../using/windows.rst:1377 ../../using/windows.rst:1381 +#: ../../using/windows.rst:1385 ../../using/windows.rst:1389 +#: ../../using/windows.rst:1391 ../../using/windows.rst:1393 msgid "1" msgstr "" -#: ../../using/windows.rst:1328 +#: ../../using/windows.rst:1349 msgid "CompileAll" msgstr "" -#: ../../using/windows.rst:1328 +#: ../../using/windows.rst:1349 msgid "Compile all ``.py`` files to ``.pyc``." msgstr "" -#: ../../using/windows.rst:1331 +#: ../../using/windows.rst:1352 msgid "PrependPath" msgstr "" -#: ../../using/windows.rst:1331 +#: ../../using/windows.rst:1352 msgid "" "Prepend install and Scripts directories to :envvar:`PATH` and add ``.PY`` " "to :envvar:`PATHEXT`" msgstr "" -#: ../../using/windows.rst:1335 +#: ../../using/windows.rst:1356 msgid "AppendPath" msgstr "" -#: ../../using/windows.rst:1335 +#: ../../using/windows.rst:1356 msgid "" "Append install and Scripts directories to :envvar:`PATH` and add ``.PY`` " "to :envvar:`PATHEXT`" msgstr "" -#: ../../using/windows.rst:1339 +#: ../../using/windows.rst:1360 msgid "Shortcuts" msgstr "" -#: ../../using/windows.rst:1339 +#: ../../using/windows.rst:1360 msgid "" "Create shortcuts for the interpreter, documentation and IDLE if installed." msgstr "" -#: ../../using/windows.rst:1342 +#: ../../using/windows.rst:1363 msgid "Include_doc" msgstr "" -#: ../../using/windows.rst:1342 +#: ../../using/windows.rst:1363 msgid "Install Python manual" msgstr "" -#: ../../using/windows.rst:1344 +#: ../../using/windows.rst:1365 msgid "Include_debug" msgstr "" -#: ../../using/windows.rst:1344 +#: ../../using/windows.rst:1365 msgid "Install debug binaries" msgstr "" -#: ../../using/windows.rst:1346 +#: ../../using/windows.rst:1367 msgid "Include_dev" msgstr "" -#: ../../using/windows.rst:1346 +#: ../../using/windows.rst:1367 msgid "" "Install developer headers and libraries. Omitting this may lead to an " "unusable installation." msgstr "" -#: ../../using/windows.rst:1350 +#: ../../using/windows.rst:1371 msgid "Include_exe" msgstr "" -#: ../../using/windows.rst:1350 +#: ../../using/windows.rst:1371 msgid "" "Install :file:`python.exe` and related files. Omitting this may lead to an " "unusable installation." msgstr "" -#: ../../using/windows.rst:1354 +#: ../../using/windows.rst:1375 msgid "Include_launcher" msgstr "" -#: ../../using/windows.rst:1354 +#: ../../using/windows.rst:1375 msgid "Install :ref:`launcher`." msgstr "" -#: ../../using/windows.rst:1356 +#: ../../using/windows.rst:1377 msgid "InstallLauncherAllUsers" msgstr "" -#: ../../using/windows.rst:1356 +#: ../../using/windows.rst:1377 msgid "" "Installs the launcher for all users. Also requires ``Include_launcher`` to " "be set to 1" msgstr "" -#: ../../using/windows.rst:1360 +#: ../../using/windows.rst:1381 msgid "Include_lib" msgstr "" -#: ../../using/windows.rst:1360 +#: ../../using/windows.rst:1381 msgid "" "Install standard library and extension modules. Omitting this may lead to an " "unusable installation." msgstr "" -#: ../../using/windows.rst:1364 +#: ../../using/windows.rst:1385 msgid "Include_pip" msgstr "" -#: ../../using/windows.rst:1364 +#: ../../using/windows.rst:1385 msgid "Install bundled pip and setuptools" msgstr "" -#: ../../using/windows.rst:1366 +#: ../../using/windows.rst:1387 msgid "Include_symbols" msgstr "" -#: ../../using/windows.rst:1366 +#: ../../using/windows.rst:1387 msgid "Install debugging symbols (``*.pdb``)" msgstr "" -#: ../../using/windows.rst:1368 +#: ../../using/windows.rst:1389 msgid "Include_tcltk" msgstr "" -#: ../../using/windows.rst:1368 +#: ../../using/windows.rst:1389 msgid "Install Tcl/Tk support and IDLE" msgstr "" -#: ../../using/windows.rst:1370 +#: ../../using/windows.rst:1391 msgid "Include_test" msgstr "" -#: ../../using/windows.rst:1370 +#: ../../using/windows.rst:1391 msgid "Install standard library test suite" msgstr "" -#: ../../using/windows.rst:1372 +#: ../../using/windows.rst:1393 msgid "Include_tools" msgstr "" -#: ../../using/windows.rst:1372 +#: ../../using/windows.rst:1393 msgid "Install utility scripts" msgstr "" -#: ../../using/windows.rst:1374 +#: ../../using/windows.rst:1395 msgid "LauncherOnly" msgstr "" -#: ../../using/windows.rst:1374 +#: ../../using/windows.rst:1395 msgid "Only installs the launcher. This will override most other options." msgstr "" -#: ../../using/windows.rst:1377 +#: ../../using/windows.rst:1398 msgid "SimpleInstall" msgstr "" -#: ../../using/windows.rst:1377 +#: ../../using/windows.rst:1398 msgid "Disable most install UI" msgstr "" -#: ../../using/windows.rst:1379 +#: ../../using/windows.rst:1400 msgid "SimpleInstallDescription" msgstr "" -#: ../../using/windows.rst:1379 +#: ../../using/windows.rst:1400 msgid "A custom message to display when the simplified install UI is used." msgstr "" -#: ../../using/windows.rst:1383 +#: ../../using/windows.rst:1404 msgid "" "For example, to silently install a default, system-wide Python installation, " "you could use the following command (from an elevated command prompt)::" msgstr "" -#: ../../using/windows.rst:1386 +#: ../../using/windows.rst:1407 msgid "python-3.9.0.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0" msgstr "" -#: ../../using/windows.rst:1388 +#: ../../using/windows.rst:1409 msgid "" "To allow users to easily install a personal copy of Python without the test " "suite, you could provide a shortcut with the following command. This will " "display a simplified initial page and disallow customization::" msgstr "" -#: ../../using/windows.rst:1392 +#: ../../using/windows.rst:1413 msgid "" "python-3.9.0.exe InstallAllUsers=0 Include_launcher=0 Include_test=0\n" " SimpleInstall=1 SimpleInstallDescription=\"Just for me, no test suite.\"" msgstr "" -#: ../../using/windows.rst:1395 +#: ../../using/windows.rst:1416 msgid "" "(Note that omitting the launcher also omits file associations, and is only " "recommended for per-user installs when there is also a system-wide " "installation that included the launcher.)" msgstr "" -#: ../../using/windows.rst:1399 +#: ../../using/windows.rst:1420 msgid "" "The options listed above can also be provided in a file named ``unattend." "xml`` alongside the executable. This file specifies a list of options and " @@ -2441,7 +2461,7 @@ msgid "" "strings. This example file sets the same options as the previous example:" msgstr "" -#: ../../using/windows.rst:1405 +#: ../../using/windows.rst:1426 msgid "" "\n" " " msgstr "" -#: ../../using/windows.rst:1418 +#: ../../using/windows.rst:1439 msgid "Installing Without Downloading" msgstr "" -#: ../../using/windows.rst:1420 +#: ../../using/windows.rst:1441 msgid "" "As some features of Python are not included in the initial installer " "download, selecting those features may require an internet connection. To " @@ -2468,7 +2488,7 @@ msgid "" "to be performed it is very useful to have a locally cached copy." msgstr "" -#: ../../using/windows.rst:1428 +#: ../../using/windows.rst:1449 msgid "" "Execute the following command from Command Prompt to download all possible " "required files. Remember to substitute ``python-3.9.0.exe`` for the actual " @@ -2476,27 +2496,27 @@ msgid "" "avoid collisions between files with the same name." msgstr "" -#: ../../using/windows.rst:1435 +#: ../../using/windows.rst:1456 msgid "python-3.9.0.exe /layout [optional target directory]" msgstr "" -#: ../../using/windows.rst:1437 +#: ../../using/windows.rst:1458 msgid "" "You may also specify the ``/quiet`` option to hide the progress display." msgstr "" -#: ../../using/windows.rst:1440 +#: ../../using/windows.rst:1461 msgid "Modifying an install" msgstr "" -#: ../../using/windows.rst:1442 +#: ../../using/windows.rst:1463 msgid "" "Once Python has been installed, you can add or remove features through the " "Programs and Features tool that is part of Windows. Select the Python entry " "and choose \"Uninstall/Change\" to open the installer in maintenance mode." msgstr "" -#: ../../using/windows.rst:1446 +#: ../../using/windows.rst:1467 msgid "" "\"Modify\" allows you to add or remove features by modifying the checkboxes " "- unchanged checkboxes will not install or remove anything. Some options " @@ -2504,26 +2524,26 @@ msgid "" "these, you will need to remove and then reinstall Python completely." msgstr "" -#: ../../using/windows.rst:1451 +#: ../../using/windows.rst:1472 msgid "" "\"Repair\" will verify all the files that should be installed using the " "current settings and replace any that have been removed or modified." msgstr "" -#: ../../using/windows.rst:1454 +#: ../../using/windows.rst:1475 msgid "" "\"Uninstall\" will remove Python entirely, with the exception of the :ref:" "`launcher`, which has its own entry in Programs and Features." msgstr "" -#: ../../using/windows.rst:1468 +#: ../../using/windows.rst:1489 msgid "" "To install pre-built binaries with free-threading enabled (see :pep:`703`), " "you should select \"Customize installation\". The second page of options " "includes the \"Download free-threaded binaries\" checkbox." msgstr "" -#: ../../using/windows.rst:1474 +#: ../../using/windows.rst:1495 msgid "" "Selecting this option will download and install additional binaries to the " "same location as the main Python install. The main executable is called " @@ -2532,7 +2552,7 @@ msgid "" "are shared with the main install." msgstr "" -#: ../../using/windows.rst:1480 +#: ../../using/windows.rst:1501 msgid "" "The free-threaded version is registered as a regular Python install with the " "tag ``3.13t`` (with a ``-32`` or ``-arm64`` suffix as normal for those " @@ -2544,7 +2564,7 @@ msgid "" "not install the free-threaded binaries at this time." msgstr "" -#: ../../using/windows.rst:1489 +#: ../../using/windows.rst:1510 msgid "" "To specify the install option at the command line, use " "``Include_freethreaded=1``. See :ref:`install-layout-option` for " @@ -2553,24 +2573,24 @@ msgid "" "apply to the free-threaded builds." msgstr "" -#: ../../using/windows.rst:1495 +#: ../../using/windows.rst:1516 msgid "" "Free-threaded binaries are also available :ref:`on nuget.org `." msgstr "" -#: ../../using/windows.rst:1499 +#: ../../using/windows.rst:1520 msgid "Python Launcher for Windows (Deprecated)" msgstr "" -#: ../../using/windows.rst:1503 +#: ../../using/windows.rst:1524 msgid "" "The launcher and this documentation have been superseded by the Python " "Install Manager described above. This is preserved temporarily for " "historical interest." msgstr "" -#: ../../using/windows.rst:1509 +#: ../../using/windows.rst:1530 msgid "" "The Python launcher for Windows is a utility which aids in locating and " "executing of different Python versions. It allows scripts (or the command-" @@ -2578,7 +2598,7 @@ msgid "" "locate and execute that version." msgstr "" -#: ../../using/windows.rst:1514 +#: ../../using/windows.rst:1535 msgid "" "Unlike the :envvar:`PATH` variable, the launcher will correctly select the " "most appropriate version of Python. It will prefer per-user installations " @@ -2586,19 +2606,19 @@ msgid "" "most recently installed version." msgstr "" -#: ../../using/windows.rst:1519 +#: ../../using/windows.rst:1540 msgid "The launcher was originally specified in :pep:`397`." msgstr "" -#: ../../using/windows.rst:1522 +#: ../../using/windows.rst:1543 msgid "Getting started" msgstr "" -#: ../../using/windows.rst:1525 +#: ../../using/windows.rst:1546 msgid "From the command-line" msgstr "" -#: ../../using/windows.rst:1529 +#: ../../using/windows.rst:1550 msgid "" "System-wide installations of Python 3.3 and later will put the launcher on " "your :envvar:`PATH`. The launcher is compatible with all available versions " @@ -2606,62 +2626,62 @@ msgid "" "the launcher is available, execute the following command in Command Prompt::" msgstr "" -#: ../../using/windows.rst:1534 +#: ../../using/windows.rst:1555 msgid "py" msgstr "" -#: ../../using/windows.rst:1536 +#: ../../using/windows.rst:1557 msgid "" "You should find that the latest version of Python you have installed is " "started - it can be exited as normal, and any additional command-line " "arguments specified will be sent directly to Python." msgstr "" -#: ../../using/windows.rst:1540 +#: ../../using/windows.rst:1561 msgid "" "If you have multiple versions of Python installed (e.g., 3.7 and |version|) " "you will have noticed that Python |version| was started - to launch Python " "3.7, try the command::" msgstr "" -#: ../../using/windows.rst:1544 +#: ../../using/windows.rst:1565 msgid "py -3.7" msgstr "" -#: ../../using/windows.rst:1546 +#: ../../using/windows.rst:1567 msgid "" "If you want the latest version of Python 2 you have installed, try the " "command::" msgstr "" -#: ../../using/windows.rst:1549 +#: ../../using/windows.rst:1570 msgid "py -2" msgstr "" -#: ../../using/windows.rst:1551 +#: ../../using/windows.rst:1572 msgid "" "If you see the following error, you do not have the launcher installed::" msgstr "" -#: ../../using/windows.rst:1553 +#: ../../using/windows.rst:1574 msgid "" "'py' is not recognized as an internal or external command,\n" "operable program or batch file." msgstr "" -#: ../../using/windows.rst:1556 +#: ../../using/windows.rst:1577 msgid "The command::" msgstr "" -#: ../../using/windows.rst:1558 +#: ../../using/windows.rst:1579 msgid "py --list" msgstr "" -#: ../../using/windows.rst:1560 +#: ../../using/windows.rst:1581 msgid "displays the currently installed version(s) of Python." msgstr "" -#: ../../using/windows.rst:1562 +#: ../../using/windows.rst:1583 msgid "" "The ``-x.y`` argument is the short form of the ``-V:Company/Tag`` argument, " "which allows selecting a specific Python runtime, including those that may " @@ -2670,14 +2690,14 @@ msgid "" "available runtimes using the ``-V:`` format." msgstr "" -#: ../../using/windows.rst:1568 +#: ../../using/windows.rst:1589 msgid "" "When using the ``-V:`` argument, specifying the Company will limit selection " "to runtimes from that provider, while specifying only the Tag will select " "from all providers. Note that omitting the slash implies a tag::" msgstr "" -#: ../../using/windows.rst:1572 +#: ../../using/windows.rst:1593 msgid "" "# Select any '3.*' tagged runtime\n" "py -V:3\n" @@ -2689,14 +2709,14 @@ msgid "" "py -V:PythonCore/3" msgstr "" -#: ../../using/windows.rst:1581 +#: ../../using/windows.rst:1602 msgid "" "The short form of the argument (``-3``) only ever selects from core Python " "releases, and not other distributions. However, the longer form (``-V:3``) " "will select from any." msgstr "" -#: ../../using/windows.rst:1585 +#: ../../using/windows.rst:1606 msgid "" "The Company is matched on the full string, case-insensitive. The Tag is " "matched on either the full string, or a prefix, provided the next character " @@ -2705,11 +2725,11 @@ msgid "" "``3.1``), but are compared using text (``-V:3.01`` does not match ``3.1``)." msgstr "" -#: ../../using/windows.rst:1593 +#: ../../using/windows.rst:1614 msgid "Virtual environments" msgstr "" -#: ../../using/windows.rst:1597 +#: ../../using/windows.rst:1618 msgid "" "If the launcher is run with no explicit Python version specification, and a " "virtual environment (created with the standard library :mod:`venv` module or " @@ -2719,42 +2739,42 @@ msgid "" "specify the global Python version." msgstr "" -#: ../../using/windows.rst:1605 +#: ../../using/windows.rst:1626 msgid "From a script" msgstr "" -#: ../../using/windows.rst:1607 +#: ../../using/windows.rst:1628 msgid "" "Let's create a test Python script - create a file called ``hello.py`` with " "the following contents" msgstr "" -#: ../../using/windows.rst:1610 +#: ../../using/windows.rst:1631 msgid "" "#! python\n" "import sys\n" "sys.stdout.write(\"hello from Python %s\\n\" % (sys.version,))" msgstr "" -#: ../../using/windows.rst:1616 +#: ../../using/windows.rst:1637 msgid "From the directory in which hello.py lives, execute the command::" msgstr "" -#: ../../using/windows.rst:1618 +#: ../../using/windows.rst:1639 msgid "py hello.py" msgstr "" -#: ../../using/windows.rst:1620 +#: ../../using/windows.rst:1641 msgid "" "You should notice the version number of your latest Python 2.x installation " "is printed. Now try changing the first line to be:" msgstr "" -#: ../../using/windows.rst:1623 +#: ../../using/windows.rst:1644 msgid "#! python3" msgstr "" -#: ../../using/windows.rst:1627 +#: ../../using/windows.rst:1648 msgid "" "Re-executing the command should now print the latest Python 3.x information. " "As with the above command-line examples, you can specify a more explicit " @@ -2763,7 +2783,7 @@ msgid "" "information printed." msgstr "" -#: ../../using/windows.rst:1633 +#: ../../using/windows.rst:1654 msgid "" "Note that unlike interactive use, a bare \"python\" will use the latest " "version of Python 2.x that you have installed. This is for backward " @@ -2771,11 +2791,11 @@ msgid "" "typically refers to Python 2." msgstr "" -#: ../../using/windows.rst:1639 +#: ../../using/windows.rst:1660 msgid "From file associations" msgstr "" -#: ../../using/windows.rst:1641 +#: ../../using/windows.rst:1662 msgid "" "The launcher should have been associated with Python files (i.e. ``.py``, ``." "pyw``, ``.pyc`` files) when it was installed. This means that when you " @@ -2784,17 +2804,17 @@ msgid "" "have the script specify the version which should be used." msgstr "" -#: ../../using/windows.rst:1647 +#: ../../using/windows.rst:1668 msgid "" "The key benefit of this is that a single launcher can support multiple " "Python versions at the same time depending on the contents of the first line." msgstr "" -#: ../../using/windows.rst:1651 +#: ../../using/windows.rst:1672 msgid "Shebang Lines" msgstr "" -#: ../../using/windows.rst:1653 +#: ../../using/windows.rst:1674 msgid "" "If the first line of a script file starts with ``#!``, it is known as a " "\"shebang\" line. Linux and other Unix like operating systems have native " @@ -2804,30 +2824,30 @@ msgid "" "demonstrate their use." msgstr "" -#: ../../using/windows.rst:1660 +#: ../../using/windows.rst:1681 msgid "" "To allow shebang lines in Python scripts to be portable between Unix and " "Windows, this launcher supports a number of 'virtual' commands to specify " "which interpreter to use. The supported virtual commands are:" msgstr "" -#: ../../using/windows.rst:1664 +#: ../../using/windows.rst:1685 msgid "``/usr/bin/env``" msgstr "" -#: ../../using/windows.rst:1665 +#: ../../using/windows.rst:1686 msgid "``/usr/bin/python``" msgstr "" -#: ../../using/windows.rst:1666 +#: ../../using/windows.rst:1687 msgid "``/usr/local/bin/python``" msgstr "" -#: ../../using/windows.rst:1667 +#: ../../using/windows.rst:1688 msgid "``python``" msgstr "" -#: ../../using/windows.rst:1681 +#: ../../using/windows.rst:1702 msgid "" "Any of the above virtual commands can be suffixed with an explicit version " "(either just the major version, or the major and minor version). Furthermore " @@ -2837,21 +2857,21 @@ msgid "" "and the environment will be used." msgstr "" -#: ../../using/windows.rst:1690 +#: ../../using/windows.rst:1711 msgid "" "Beginning with python launcher 3.7 it is possible to request 64-bit version " "by the \"-64\" suffix. Furthermore it is possible to specify a major and " "architecture without minor (i.e. ``/usr/bin/python3-64``)." msgstr "" -#: ../../using/windows.rst:1696 +#: ../../using/windows.rst:1717 msgid "" "The \"-64\" suffix is deprecated, and now implies \"any architecture that is " "not provably i386/32-bit\". To request a specific environment, use the new :" "samp:`-V:{TAG}` argument with the complete tag." msgstr "" -#: ../../using/windows.rst:1702 +#: ../../using/windows.rst:1723 msgid "" "Virtual commands referencing ``python`` now prefer an active virtual " "environment rather than searching :envvar:`PATH`. This handles cases where " @@ -2859,7 +2879,7 @@ msgid "" "not present in the active environment." msgstr "" -#: ../../using/windows.rst:1707 +#: ../../using/windows.rst:1728 msgid "" "The ``/usr/bin/env`` form of shebang line has one further special property. " "Before looking for installed Python interpreters, this form will search the " @@ -2873,7 +2893,7 @@ msgid "" "of :envvar:`PATH`." msgstr "" -#: ../../using/windows.rst:1718 +#: ../../using/windows.rst:1739 msgid "" "Shebang lines that do not match any of these patterns are looked up in the " "``[commands]`` section of the launcher's :ref:`.INI file `. " @@ -2884,13 +2904,13 @@ msgid "" "part of the filename)." msgstr "" -#: ../../using/windows.rst:1726 +#: ../../using/windows.rst:1747 msgid "" "[commands]\n" "/bin/xpython=C:\\Program Files\\XPython\\python.exe" msgstr "" -#: ../../using/windows.rst:1731 +#: ../../using/windows.rst:1752 msgid "" "Any commands not found in the .INI file are treated as **Windows** " "executable paths that are absolute or relative to the directory containing " @@ -2901,33 +2921,33 @@ msgid "" "will be appended." msgstr "" -#: ../../using/windows.rst:1740 +#: ../../using/windows.rst:1761 msgid "Arguments in shebang lines" msgstr "" -#: ../../using/windows.rst:1742 +#: ../../using/windows.rst:1763 msgid "" "The shebang lines can also specify additional options to be passed to the " "Python interpreter. For example, if you have a shebang line:" msgstr "" -#: ../../using/windows.rst:1745 +#: ../../using/windows.rst:1766 msgid "#! /usr/bin/python -v" msgstr "" -#: ../../using/windows.rst:1749 +#: ../../using/windows.rst:1770 msgid "Then Python will be started with the ``-v`` option" msgstr "" -#: ../../using/windows.rst:1752 +#: ../../using/windows.rst:1773 msgid "Customization" msgstr "" -#: ../../using/windows.rst:1757 +#: ../../using/windows.rst:1778 msgid "Customization via INI files" msgstr "" -#: ../../using/windows.rst:1759 +#: ../../using/windows.rst:1780 msgid "" "Two .ini files will be searched by the launcher - ``py.ini`` in the current " "user's application data directory (``%LOCALAPPDATA%`` or ``$env:" @@ -2936,7 +2956,7 @@ msgid "" "e. py.exe) and for the 'windows' version (i.e. pyw.exe)." msgstr "" -#: ../../using/windows.rst:1765 +#: ../../using/windows.rst:1786 msgid "" "Customization specified in the \"application directory\" will have " "precedence over the one next to the executable, so a user, who may not have " @@ -2944,11 +2964,11 @@ msgid "" "that global .ini file." msgstr "" -#: ../../using/windows.rst:1770 +#: ../../using/windows.rst:1791 msgid "Customizing default Python versions" msgstr "" -#: ../../using/windows.rst:1772 +#: ../../using/windows.rst:1793 msgid "" "In some cases, a version qualifier can be included in a command to dictate " "which version of Python will be used by the command. A version qualifier " @@ -2958,13 +2978,13 @@ msgid "" "\"-32\" or \"-64\"." msgstr "" -#: ../../using/windows.rst:1778 +#: ../../using/windows.rst:1799 msgid "" "For example, a shebang line of ``#!python`` has no version qualifier, while " "``#!python3`` has a version qualifier which specifies only a major version." msgstr "" -#: ../../using/windows.rst:1781 +#: ../../using/windows.rst:1802 msgid "" "If no version qualifiers are found in a command, the environment variable :" "envvar:`PY_PYTHON` can be set to specify the default version qualifier. If " @@ -2974,7 +2994,7 @@ msgid "" "launcher included with Python 3.7 or newer.)" msgstr "" -#: ../../using/windows.rst:1788 +#: ../../using/windows.rst:1809 msgid "" "If no minor version qualifiers are found, the environment variable " "``PY_PYTHON{major}`` (where ``{major}`` is the current major version " @@ -2985,7 +3005,7 @@ msgid "" "version in that family." msgstr "" -#: ../../using/windows.rst:1796 +#: ../../using/windows.rst:1817 msgid "" "On 64-bit Windows with both 32-bit and 64-bit implementations of the same " "(major.minor) Python version installed, the 64-bit version will always be " @@ -2999,30 +3019,30 @@ msgid "" "suffix can be used on a version specifier to change this behaviour." msgstr "" -#: ../../using/windows.rst:1807 +#: ../../using/windows.rst:1828 msgid "Examples:" msgstr "" -#: ../../using/windows.rst:1809 +#: ../../using/windows.rst:1830 msgid "" "If no relevant options are set, the commands ``python`` and ``python2`` will " "use the latest Python 2.x version installed and the command ``python3`` will " "use the latest Python 3.x installed." msgstr "" -#: ../../using/windows.rst:1813 +#: ../../using/windows.rst:1834 msgid "" "The command ``python3.7`` will not consult any options at all as the " "versions are fully specified." msgstr "" -#: ../../using/windows.rst:1816 +#: ../../using/windows.rst:1837 msgid "" "If ``PY_PYTHON=3``, the commands ``python`` and ``python3`` will both use " "the latest installed Python 3 version." msgstr "" -#: ../../using/windows.rst:1819 +#: ../../using/windows.rst:1840 msgid "" "If ``PY_PYTHON=3.7-32``, the command ``python`` will use the 32-bit " "implementation of 3.7 whereas the command ``python3`` will use the latest " @@ -3030,13 +3050,13 @@ msgid "" "specified.)" msgstr "" -#: ../../using/windows.rst:1824 +#: ../../using/windows.rst:1845 msgid "" "If ``PY_PYTHON=3`` and ``PY_PYTHON3=3.7``, the commands ``python`` and " "``python3`` will both use specifically 3.7" msgstr "" -#: ../../using/windows.rst:1827 +#: ../../using/windows.rst:1848 msgid "" "In addition to environment variables, the same settings can be configured in " "the .INI file used by the launcher. The section in the INI file is called " @@ -3046,38 +3066,38 @@ msgid "" "will override things specified in the INI file." msgstr "" -#: ../../using/windows.rst:1834 +#: ../../using/windows.rst:1855 msgid "For example:" msgstr "" -#: ../../using/windows.rst:1836 +#: ../../using/windows.rst:1857 msgid "Setting ``PY_PYTHON=3.7`` is equivalent to the INI file containing:" msgstr "" -#: ../../using/windows.rst:1838 +#: ../../using/windows.rst:1859 msgid "" "[defaults]\n" "python=3.7" msgstr "" -#: ../../using/windows.rst:1843 +#: ../../using/windows.rst:1864 msgid "" "Setting ``PY_PYTHON=3`` and ``PY_PYTHON3=3.7`` is equivalent to the INI file " "containing:" msgstr "" -#: ../../using/windows.rst:1846 +#: ../../using/windows.rst:1867 msgid "" "[defaults]\n" "python=3\n" "python3=3.7" msgstr "" -#: ../../using/windows.rst:1853 +#: ../../using/windows.rst:1874 msgid "Diagnostics" msgstr "" -#: ../../using/windows.rst:1855 +#: ../../using/windows.rst:1876 msgid "" "If an environment variable :envvar:`PYLAUNCHER_DEBUG` is set (to any value), " "the launcher will print diagnostic information to stderr (i.e. to the " @@ -3087,11 +3107,11 @@ msgid "" "the target Python. It is primarily intended for testing and debugging." msgstr "" -#: ../../using/windows.rst:1863 +#: ../../using/windows.rst:1884 msgid "Dry Run" msgstr "" -#: ../../using/windows.rst:1865 +#: ../../using/windows.rst:1886 msgid "" "If an environment variable :envvar:`PYLAUNCHER_DRYRUN` is set (to any " "value), the launcher will output the command it would have run, but will not " @@ -3101,11 +3121,11 @@ msgid "" "correctly in the console." msgstr "" -#: ../../using/windows.rst:1873 +#: ../../using/windows.rst:1894 msgid "Install on demand" msgstr "" -#: ../../using/windows.rst:1875 +#: ../../using/windows.rst:1896 msgid "" "If an environment variable :envvar:`PYLAUNCHER_ALLOW_INSTALL` is set (to any " "value), and the requested Python version is not installed but is available " @@ -3114,7 +3134,7 @@ msgid "" "again." msgstr "" -#: ../../using/windows.rst:1880 +#: ../../using/windows.rst:1901 msgid "" "An additional :envvar:`PYLAUNCHER_ALWAYS_INSTALL` variable causes the " "launcher to always try to install Python, even if it is detected. This is " @@ -3122,110 +3142,110 @@ msgid "" "`PYLAUNCHER_DRYRUN`)." msgstr "" -#: ../../using/windows.rst:1885 +#: ../../using/windows.rst:1906 msgid "Return codes" msgstr "" -#: ../../using/windows.rst:1887 +#: ../../using/windows.rst:1908 msgid "" "The following exit codes may be returned by the Python launcher. " "Unfortunately, there is no way to distinguish these from the exit code of " "Python itself." msgstr "" -#: ../../using/windows.rst:1890 +#: ../../using/windows.rst:1911 msgid "" "The names of codes are as used in the sources, and are only for reference. " "There is no way to access or resolve them apart from reading this page. " "Entries are listed in alphabetical order of names." msgstr "" -#: ../../using/windows.rst:1895 +#: ../../using/windows.rst:1916 msgid "Value" msgstr "" -#: ../../using/windows.rst:1897 +#: ../../using/windows.rst:1918 msgid "RC_BAD_VENV_CFG" msgstr "" -#: ../../using/windows.rst:1897 +#: ../../using/windows.rst:1918 msgid "107" msgstr "" -#: ../../using/windows.rst:1897 +#: ../../using/windows.rst:1918 msgid "A :file:`pyvenv.cfg` was found but is corrupt." msgstr "" -#: ../../using/windows.rst:1899 +#: ../../using/windows.rst:1920 msgid "RC_CREATE_PROCESS" msgstr "" -#: ../../using/windows.rst:1899 +#: ../../using/windows.rst:1920 msgid "101" msgstr "" -#: ../../using/windows.rst:1899 +#: ../../using/windows.rst:1920 msgid "Failed to launch Python." msgstr "" -#: ../../using/windows.rst:1901 +#: ../../using/windows.rst:1922 msgid "RC_INSTALLING" msgstr "" -#: ../../using/windows.rst:1901 +#: ../../using/windows.rst:1922 msgid "111" msgstr "" -#: ../../using/windows.rst:1901 +#: ../../using/windows.rst:1922 msgid "" "An install was started, but the command will need to be re-run after it " "completes." msgstr "" -#: ../../using/windows.rst:1904 +#: ../../using/windows.rst:1925 msgid "RC_INTERNAL_ERROR" msgstr "" -#: ../../using/windows.rst:1904 +#: ../../using/windows.rst:1925 msgid "109" msgstr "" -#: ../../using/windows.rst:1904 +#: ../../using/windows.rst:1925 msgid "Unexpected error. Please report a bug." msgstr "" -#: ../../using/windows.rst:1906 +#: ../../using/windows.rst:1927 msgid "RC_NO_COMMANDLINE" msgstr "" -#: ../../using/windows.rst:1906 +#: ../../using/windows.rst:1927 msgid "108" msgstr "" -#: ../../using/windows.rst:1906 +#: ../../using/windows.rst:1927 msgid "Unable to obtain command line from the operating system." msgstr "" -#: ../../using/windows.rst:1909 +#: ../../using/windows.rst:1930 msgid "RC_NO_PYTHON" msgstr "" -#: ../../using/windows.rst:1909 +#: ../../using/windows.rst:1930 msgid "103" msgstr "" -#: ../../using/windows.rst:1909 +#: ../../using/windows.rst:1930 msgid "Unable to locate the requested version." msgstr "" -#: ../../using/windows.rst:1911 +#: ../../using/windows.rst:1932 msgid "RC_NO_VENV_CFG" msgstr "" -#: ../../using/windows.rst:1911 +#: ../../using/windows.rst:1932 msgid "106" msgstr "" -#: ../../using/windows.rst:1911 +#: ../../using/windows.rst:1932 msgid "A :file:`pyvenv.cfg` was required but not found." msgstr "" diff --git a/whatsnew/2.0.po b/whatsnew/2.0.po index 841ded723..5f65d3817 100644 --- a/whatsnew/2.0.po +++ b/whatsnew/2.0.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:51+0000\n" "Last-Translator: Danial Behzadi , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/whatsnew/2.1.po b/whatsnew/2.1.po index 0681d5251..9d87e8346 100644 --- a/whatsnew/2.1.po +++ b/whatsnew/2.1.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:51+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/whatsnew/2.2.po b/whatsnew/2.2.po index 0c9f169b0..d8725727b 100644 --- a/whatsnew/2.2.po +++ b/whatsnew/2.2.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:51+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/whatsnew/2.3.po b/whatsnew/2.3.po index 2f122c110..5389920de 100644 --- a/whatsnew/2.3.po +++ b/whatsnew/2.3.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:51+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/whatsnew/2.4.po b/whatsnew/2.4.po index 9608c7f30..26b4fcd52 100644 --- a/whatsnew/2.4.po +++ b/whatsnew/2.4.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:51+0000\n" "Last-Translator: Danial Behzadi , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" diff --git a/whatsnew/2.5.po b/whatsnew/2.5.po index a72edb25f..0eaa106da 100644 --- a/whatsnew/2.5.po +++ b/whatsnew/2.5.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:51+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/whatsnew/2.6.po b/whatsnew/2.6.po index e5a2194ed..741e9c00f 100644 --- a/whatsnew/2.6.po +++ b/whatsnew/2.6.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:51+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/whatsnew/2.7.po b/whatsnew/2.7.po index e7dd59276..e254d7bd6 100644 --- a/whatsnew/2.7.po +++ b/whatsnew/2.7.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-28 01:51+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/whatsnew/3.0.po b/whatsnew/3.0.po index 1e40b6fb4..6d9f35aea 100644 --- a/whatsnew/3.0.po +++ b/whatsnew/3.0.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-29 13:04+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/whatsnew/3.1.po b/whatsnew/3.1.po index 3a3d29b09..291d72fe9 100644 --- a/whatsnew/3.1.po +++ b/whatsnew/3.1.po @@ -5,15 +5,16 @@ # # Translators: # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-29 13:04+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/whatsnew/3.10.po b/whatsnew/3.10.po index 24da5d485..9d8c2e71c 100644 --- a/whatsnew/3.10.po +++ b/whatsnew/3.10.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-29 13:04+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -129,7 +130,7 @@ msgstr "" msgid ":pep:`597`, Add optional EncodingWarning" msgstr "" -#: ../../whatsnew/3.10.rst:92 ../../whatsnew/3.10.rst:2053 +#: ../../whatsnew/3.10.rst:92 ../../whatsnew/3.10.rst:2054 msgid "New Features" msgstr "" @@ -791,14 +792,15 @@ msgstr "" msgid "" "If you are using classes to structure your data, you can use as a pattern " "the class name followed by an argument list resembling a constructor. This " -"pattern has the ability to capture class attributes into variables::" +"pattern has the ability to capture instance attributes into variables::" msgstr "" #: ../../whatsnew/3.10.rst:556 msgid "" "class Point:\n" -" x: int\n" -" y: int\n" +" def __init__(self, x, y):\n" +" self.x = x\n" +" self.y = y\n" "\n" "def location(point):\n" " match point:\n" @@ -814,11 +816,11 @@ msgid "" " print(\"Not a point\")" msgstr "" -#: ../../whatsnew/3.10.rst:574 +#: ../../whatsnew/3.10.rst:575 msgid "Patterns with positional parameters" msgstr "" -#: ../../whatsnew/3.10.rst:576 +#: ../../whatsnew/3.10.rst:577 msgid "" "You can use positional parameters with some builtin classes that provide an " "ordering for their attributes (e.g. dataclasses). You can also define a " @@ -828,7 +830,7 @@ msgid "" "attribute to the ``var`` variable)::" msgstr "" -#: ../../whatsnew/3.10.rst:582 +#: ../../whatsnew/3.10.rst:583 msgid "" "Point(1, var)\n" "Point(1, y=var)\n" @@ -836,17 +838,17 @@ msgid "" "Point(y=var, x=1)" msgstr "" -#: ../../whatsnew/3.10.rst:588 +#: ../../whatsnew/3.10.rst:589 msgid "Nested patterns" msgstr "" -#: ../../whatsnew/3.10.rst:590 +#: ../../whatsnew/3.10.rst:591 msgid "" "Patterns can be arbitrarily nested. For example, if our data is a short " "list of points, it could be matched like this::" msgstr "" -#: ../../whatsnew/3.10.rst:593 +#: ../../whatsnew/3.10.rst:594 msgid "" "match points:\n" " case []:\n" @@ -861,18 +863,18 @@ msgid "" " print(\"Something else is found in the list.\")" msgstr "" -#: ../../whatsnew/3.10.rst:606 +#: ../../whatsnew/3.10.rst:607 msgid "Complex patterns and the wildcard" msgstr "" -#: ../../whatsnew/3.10.rst:608 +#: ../../whatsnew/3.10.rst:609 msgid "" "To this point, the examples have used ``_`` alone in the last case " "statement. A wildcard can be used in more complex patterns, such as " "``('error', code, _)``. For example::" msgstr "" -#: ../../whatsnew/3.10.rst:612 +#: ../../whatsnew/3.10.rst:613 msgid "" "match test_variable:\n" " case ('warning', code, 40):\n" @@ -881,24 +883,24 @@ msgid "" " print(f\"An error {code} occurred.\")" msgstr "" -#: ../../whatsnew/3.10.rst:618 +#: ../../whatsnew/3.10.rst:619 msgid "" "In the above case, ``test_variable`` will match for ('error', code, 100) and " "('error', code, 800)." msgstr "" -#: ../../whatsnew/3.10.rst:622 +#: ../../whatsnew/3.10.rst:623 msgid "Guard" msgstr "" -#: ../../whatsnew/3.10.rst:624 +#: ../../whatsnew/3.10.rst:625 msgid "" "We can add an ``if`` clause to a pattern, known as a \"guard\". If the " "guard is false, ``match`` goes on to try the next case block. Note that " "value capture happens before the guard is evaluated::" msgstr "" -#: ../../whatsnew/3.10.rst:628 +#: ../../whatsnew/3.10.rst:629 msgid "" "match point:\n" " case Point(x, y) if x == y:\n" @@ -907,15 +909,15 @@ msgid "" " print(f\"Point is not on the diagonal.\")" msgstr "" -#: ../../whatsnew/3.10.rst:635 +#: ../../whatsnew/3.10.rst:636 msgid "Other Key Features" msgstr "" -#: ../../whatsnew/3.10.rst:637 +#: ../../whatsnew/3.10.rst:638 msgid "Several other key features:" msgstr "" -#: ../../whatsnew/3.10.rst:639 +#: ../../whatsnew/3.10.rst:640 msgid "" "Like unpacking assignments, tuple and list patterns have exactly the same " "meaning and actually match arbitrary sequences. Technically, the subject " @@ -924,7 +926,7 @@ msgid "" "match strings." msgstr "" -#: ../../whatsnew/3.10.rst:645 +#: ../../whatsnew/3.10.rst:646 msgid "" "Sequence patterns support wildcards: ``[x, y, *rest]`` and ``(x, y, *rest)`` " "work similar to wildcards in unpacking assignments. The name after ``*`` " @@ -932,7 +934,7 @@ msgid "" "items without binding the remaining items." msgstr "" -#: ../../whatsnew/3.10.rst:650 +#: ../../whatsnew/3.10.rst:651 msgid "" "Mapping patterns: ``{\"bandwidth\": b, \"latency\": l}`` captures the " "``\"bandwidth\"`` and ``\"latency\"`` values from a dict. Unlike sequence " @@ -940,34 +942,34 @@ msgid "" "(But ``**_`` would be redundant, so is not allowed.)" msgstr "" -#: ../../whatsnew/3.10.rst:655 +#: ../../whatsnew/3.10.rst:656 msgid "Subpatterns may be captured using the ``as`` keyword::" msgstr "" -#: ../../whatsnew/3.10.rst:657 +#: ../../whatsnew/3.10.rst:658 msgid "case (Point(x1, y1), Point(x2, y2) as p2): ..." msgstr "" -#: ../../whatsnew/3.10.rst:659 +#: ../../whatsnew/3.10.rst:660 msgid "" "This binds x1, y1, x2, y2 like you would expect without the ``as`` clause, " "and p2 to the entire second item of the subject." msgstr "" -#: ../../whatsnew/3.10.rst:662 +#: ../../whatsnew/3.10.rst:663 msgid "" "Most literals are compared by equality. However, the singletons ``True``, " "``False`` and ``None`` are compared by identity." msgstr "" -#: ../../whatsnew/3.10.rst:665 +#: ../../whatsnew/3.10.rst:666 msgid "" "Named constants may be used in patterns. These named constants must be " "dotted names to prevent the constant from being interpreted as a capture " "variable::" msgstr "" -#: ../../whatsnew/3.10.rst:669 +#: ../../whatsnew/3.10.rst:670 msgid "" "from enum import Enum\n" "class Color(Enum):\n" @@ -985,17 +987,17 @@ msgid "" " print(\"I'm feeling the blues :(\")" msgstr "" -#: ../../whatsnew/3.10.rst:684 +#: ../../whatsnew/3.10.rst:685 msgid "" "For the full specification see :pep:`634`. Motivation and rationale are in :" "pep:`635`, and a longer tutorial is in :pep:`636`." msgstr "" -#: ../../whatsnew/3.10.rst:691 +#: ../../whatsnew/3.10.rst:692 msgid "Optional ``EncodingWarning`` and ``encoding=\"locale\"`` option" msgstr "" -#: ../../whatsnew/3.10.rst:693 +#: ../../whatsnew/3.10.rst:694 msgid "" "The default encoding of :class:`~io.TextIOWrapper` and :func:`open` is " "platform and locale dependent. Since UTF-8 is used on most Unix platforms, " @@ -1003,106 +1005,106 @@ msgid "" "TOML, Markdown) is a very common bug. For example::" msgstr "" -#: ../../whatsnew/3.10.rst:698 +#: ../../whatsnew/3.10.rst:699 msgid "" "# BUG: \"rb\" mode or encoding=\"utf-8\" should be used.\n" "with open(\"data.json\") as f:\n" " data = json.load(f)" msgstr "" -#: ../../whatsnew/3.10.rst:702 +#: ../../whatsnew/3.10.rst:703 msgid "" "To find this type of bug, an optional ``EncodingWarning`` is added. It is " "emitted when :data:`sys.flags.warn_default_encoding ` is true and " "locale-specific default encoding is used." msgstr "" -#: ../../whatsnew/3.10.rst:706 +#: ../../whatsnew/3.10.rst:707 msgid "" "``-X warn_default_encoding`` option and :envvar:`PYTHONWARNDEFAULTENCODING` " "are added to enable the warning." msgstr "" -#: ../../whatsnew/3.10.rst:709 +#: ../../whatsnew/3.10.rst:710 msgid "See :ref:`io-text-encoding` for more information." msgstr "" -#: ../../whatsnew/3.10.rst:714 +#: ../../whatsnew/3.10.rst:715 msgid "New Features Related to Type Hints" msgstr "" -#: ../../whatsnew/3.10.rst:716 +#: ../../whatsnew/3.10.rst:717 msgid "" "This section covers major changes affecting :pep:`484` type hints and the :" "mod:`typing` module." msgstr "" -#: ../../whatsnew/3.10.rst:721 +#: ../../whatsnew/3.10.rst:722 msgid "PEP 604: New Type Union Operator" msgstr "" -#: ../../whatsnew/3.10.rst:723 +#: ../../whatsnew/3.10.rst:724 msgid "" "A new type union operator was introduced which enables the syntax ``X | Y``. " "This provides a cleaner way of expressing 'either type X or type Y' instead " "of using :class:`typing.Union`, especially in type hints." msgstr "" -#: ../../whatsnew/3.10.rst:727 +#: ../../whatsnew/3.10.rst:728 msgid "" "In previous versions of Python, to apply a type hint for functions accepting " "arguments of multiple types, :class:`typing.Union` was used::" msgstr "" -#: ../../whatsnew/3.10.rst:730 +#: ../../whatsnew/3.10.rst:731 msgid "" "def square(number: Union[int, float]) -> Union[int, float]:\n" " return number ** 2" msgstr "" -#: ../../whatsnew/3.10.rst:734 +#: ../../whatsnew/3.10.rst:735 msgid "Type hints can now be written in a more succinct manner::" msgstr "" -#: ../../whatsnew/3.10.rst:736 +#: ../../whatsnew/3.10.rst:737 msgid "" "def square(number: int | float) -> int | float:\n" " return number ** 2" msgstr "" -#: ../../whatsnew/3.10.rst:740 +#: ../../whatsnew/3.10.rst:741 msgid "" "This new syntax is also accepted as the second argument to :func:" "`isinstance` and :func:`issubclass`::" msgstr "" -#: ../../whatsnew/3.10.rst:743 +#: ../../whatsnew/3.10.rst:744 msgid "" ">>> isinstance(1, int | str)\n" "True" msgstr "" -#: ../../whatsnew/3.10.rst:746 +#: ../../whatsnew/3.10.rst:747 msgid "See :ref:`types-union` and :pep:`604` for more details." msgstr "" -#: ../../whatsnew/3.10.rst:748 +#: ../../whatsnew/3.10.rst:749 msgid "" "(Contributed by Maggie Moss and Philippe Prados in :issue:`41428`, with " "additions by Yurii Karabas and Serhiy Storchaka in :issue:`44490`.)" msgstr "" -#: ../../whatsnew/3.10.rst:753 +#: ../../whatsnew/3.10.rst:754 msgid "PEP 612: Parameter Specification Variables" msgstr "" -#: ../../whatsnew/3.10.rst:755 +#: ../../whatsnew/3.10.rst:756 msgid "" "Two new options to improve the information provided to static type checkers " "for :pep:`484`\\ 's ``Callable`` have been added to the :mod:`typing` module." msgstr "" -#: ../../whatsnew/3.10.rst:758 +#: ../../whatsnew/3.10.rst:759 msgid "" "The first is the parameter specification variable. They are used to forward " "the parameter types of one callable to another callable -- a pattern " @@ -1111,7 +1113,7 @@ msgid "" "to type annotate dependency of parameter types in such a precise manner." msgstr "" -#: ../../whatsnew/3.10.rst:764 +#: ../../whatsnew/3.10.rst:765 msgid "" "The second option is the new ``Concatenate`` operator. It's used in " "conjunction with parameter specification variables to type annotate a higher " @@ -1119,24 +1121,24 @@ msgid "" "Examples of usage can be found in :class:`typing.Concatenate`." msgstr "" -#: ../../whatsnew/3.10.rst:769 +#: ../../whatsnew/3.10.rst:770 msgid "" "See :class:`typing.Callable`, :class:`typing.ParamSpec`, :class:`typing." "Concatenate`, :class:`typing.ParamSpecArgs`, :class:`typing." "ParamSpecKwargs`, and :pep:`612` for more details." msgstr "" -#: ../../whatsnew/3.10.rst:773 +#: ../../whatsnew/3.10.rst:774 msgid "" "(Contributed by Ken Jin in :issue:`41559`, with minor enhancements by Jelle " "Zijlstra in :issue:`43783`. PEP written by Mark Mendoza.)" msgstr "" -#: ../../whatsnew/3.10.rst:778 +#: ../../whatsnew/3.10.rst:779 msgid "PEP 613: TypeAlias" msgstr "" -#: ../../whatsnew/3.10.rst:780 +#: ../../whatsnew/3.10.rst:781 msgid "" ":pep:`484` introduced the concept of type aliases, only requiring them to be " "top-level unannotated assignments. This simplicity sometimes made it " @@ -1145,37 +1147,37 @@ msgid "" "involved. Compare::" msgstr "" -#: ../../whatsnew/3.10.rst:785 +#: ../../whatsnew/3.10.rst:786 msgid "" "StrCache = 'Cache[str]' # a type alias\n" "LOG_PREFIX = 'LOG[DEBUG]' # a module constant" msgstr "" -#: ../../whatsnew/3.10.rst:788 +#: ../../whatsnew/3.10.rst:789 msgid "" "Now the :mod:`typing` module has a special value :data:`~typing.TypeAlias` " "which lets you declare type aliases more explicitly::" msgstr "" -#: ../../whatsnew/3.10.rst:791 +#: ../../whatsnew/3.10.rst:792 msgid "" "StrCache: TypeAlias = 'Cache[str]' # a type alias\n" "LOG_PREFIX = 'LOG[DEBUG]' # a module constant" msgstr "" -#: ../../whatsnew/3.10.rst:794 +#: ../../whatsnew/3.10.rst:795 msgid "See :pep:`613` for more details." msgstr "" -#: ../../whatsnew/3.10.rst:796 +#: ../../whatsnew/3.10.rst:797 msgid "(Contributed by Mikhail Golubev in :issue:`41923`.)" msgstr "" -#: ../../whatsnew/3.10.rst:799 +#: ../../whatsnew/3.10.rst:800 msgid "PEP 647: User-Defined Type Guards" msgstr "" -#: ../../whatsnew/3.10.rst:801 +#: ../../whatsnew/3.10.rst:802 msgid "" ":data:`~typing.TypeGuard` has been added to the :mod:`typing` module to " "annotate type guard functions and improve information provided to static " @@ -1183,24 +1185,24 @@ msgid "" "`~typing.TypeGuard`\\ 's documentation, and :pep:`647`." msgstr "" -#: ../../whatsnew/3.10.rst:806 +#: ../../whatsnew/3.10.rst:807 msgid "" "(Contributed by Ken Jin and Guido van Rossum in :issue:`43766`. PEP written " "by Eric Traut.)" msgstr "" -#: ../../whatsnew/3.10.rst:810 +#: ../../whatsnew/3.10.rst:811 msgid "Other Language Changes" msgstr "" -#: ../../whatsnew/3.10.rst:812 +#: ../../whatsnew/3.10.rst:813 msgid "" "The :class:`int` type has a new method :meth:`int.bit_count`, returning the " "number of ones in the binary expansion of a given integer, also known as the " "population count. (Contributed by Niklas Fiekas in :issue:`29882`.)" msgstr "" -#: ../../whatsnew/3.10.rst:816 +#: ../../whatsnew/3.10.rst:817 msgid "" "The views returned by :meth:`dict.keys`, :meth:`dict.values` and :meth:`dict." "items` now all have a ``mapping`` attribute that gives a :class:`types." @@ -1208,13 +1210,13 @@ msgid "" "Dennis Sweeney in :issue:`40890`.)" msgstr "" -#: ../../whatsnew/3.10.rst:821 +#: ../../whatsnew/3.10.rst:822 msgid "" ":pep:`618`: The :func:`zip` function now has an optional ``strict`` flag, " "used to require that all the iterables have an equal length." msgstr "" -#: ../../whatsnew/3.10.rst:824 +#: ../../whatsnew/3.10.rst:825 msgid "" "Builtin and extension functions that take integer arguments no longer " "accept :class:`~decimal.Decimal`\\ s, :class:`~fractions.Fraction`\\ s and " @@ -1223,20 +1225,20 @@ msgid "" "__index__` method). (Contributed by Serhiy Storchaka in :issue:`37999`.)" msgstr "" -#: ../../whatsnew/3.10.rst:831 +#: ../../whatsnew/3.10.rst:832 msgid "" "If :func:`object.__ipow__` returns :data:`NotImplemented`, the operator will " "correctly fall back to :func:`object.__pow__` and :func:`object.__rpow__` as " "expected. (Contributed by Alex Shkop in :issue:`38302`.)" msgstr "" -#: ../../whatsnew/3.10.rst:835 +#: ../../whatsnew/3.10.rst:836 msgid "" "Assignment expressions can now be used unparenthesized within set literals " "and set comprehensions, as well as in sequence indexes (but not slices)." msgstr "" -#: ../../whatsnew/3.10.rst:838 +#: ../../whatsnew/3.10.rst:839 msgid "" "Functions have a new ``__builtins__`` attribute which is used to look for " "builtin symbols when a function is executed, instead of looking into " @@ -1245,7 +1247,7 @@ msgid "" "builtins. (Contributed by Mark Shannon in :issue:`42990`.)" msgstr "" -#: ../../whatsnew/3.10.rst:844 +#: ../../whatsnew/3.10.rst:845 msgid "" "Two new builtin functions -- :func:`aiter` and :func:`anext` have been added " "to provide asynchronous counterparts to :func:`iter` and :func:`next`, " @@ -1253,7 +1255,7 @@ msgid "" "in :issue:`31861`.)" msgstr "" -#: ../../whatsnew/3.10.rst:849 +#: ../../whatsnew/3.10.rst:850 msgid "" "Static methods (:func:`@staticmethod `) and class methods (:" "func:`@classmethod `) now inherit the method attributes " @@ -1263,7 +1265,7 @@ msgid "" "Stinner in :issue:`43682`.)" msgstr "" -#: ../../whatsnew/3.10.rst:856 +#: ../../whatsnew/3.10.rst:857 msgid "" "Annotations for complex targets (everything beside ``simple name`` targets " "defined by :pep:`526`) no longer cause any runtime effects with ``from " @@ -1271,7 +1273,7 @@ msgid "" "`42737`.)" msgstr "" -#: ../../whatsnew/3.10.rst:860 +#: ../../whatsnew/3.10.rst:861 msgid "" "Class and module objects now lazy-create empty annotations dicts on demand. " "The annotations dicts are stored in the object’s ``__dict__`` for backwards " @@ -1280,7 +1282,7 @@ msgid "" "howto`. (Contributed by Larry Hastings in :issue:`43901`.)" msgstr "" -#: ../../whatsnew/3.10.rst:867 +#: ../../whatsnew/3.10.rst:868 msgid "" "Annotations consist of ``yield``, ``yield from``, ``await`` or named " "expressions are now forbidden under ``from __future__ import annotations`` " @@ -1288,7 +1290,7 @@ msgid "" "`42725`.)" msgstr "" -#: ../../whatsnew/3.10.rst:872 +#: ../../whatsnew/3.10.rst:873 msgid "" "Usage of unbound variables, ``super()`` and other expressions that might " "alter the processing of symbol table as annotations are now rendered " @@ -1296,7 +1298,7 @@ msgid "" "Batuhan Taskaya in :issue:`42725`.)" msgstr "" -#: ../../whatsnew/3.10.rst:877 +#: ../../whatsnew/3.10.rst:878 msgid "" "Hashes of NaN values of both :class:`float` type and :class:`decimal." "Decimal` type now depend on object identity. Formerly, they always hashed to " @@ -1306,121 +1308,121 @@ msgid "" "Raymond Hettinger in :issue:`43475`.)" msgstr "" -#: ../../whatsnew/3.10.rst:884 +#: ../../whatsnew/3.10.rst:885 msgid "" "A :exc:`SyntaxError` (instead of a :exc:`NameError`) will be raised when " "deleting the :const:`__debug__` constant. (Contributed by Donghee Na in :" "issue:`45000`.)" msgstr "" -#: ../../whatsnew/3.10.rst:887 +#: ../../whatsnew/3.10.rst:888 msgid "" ":exc:`SyntaxError` exceptions now have ``end_lineno`` and ``end_offset`` " "attributes. They will be ``None`` if not determined. (Contributed by Pablo " "Galindo in :issue:`43914`.)" msgstr "" -#: ../../whatsnew/3.10.rst:892 +#: ../../whatsnew/3.10.rst:893 msgid "New Modules" msgstr "" -#: ../../whatsnew/3.10.rst:894 +#: ../../whatsnew/3.10.rst:895 msgid "None." msgstr "" -#: ../../whatsnew/3.10.rst:898 +#: ../../whatsnew/3.10.rst:899 msgid "Improved Modules" msgstr "" -#: ../../whatsnew/3.10.rst:901 +#: ../../whatsnew/3.10.rst:902 msgid "asyncio" msgstr "" -#: ../../whatsnew/3.10.rst:903 +#: ../../whatsnew/3.10.rst:904 msgid "" "Add missing :meth:`~asyncio.events.AbstractEventLoop." "connect_accepted_socket` method. (Contributed by Alex Grönholm in :issue:" "`41332`.)" msgstr "" -#: ../../whatsnew/3.10.rst:908 +#: ../../whatsnew/3.10.rst:909 msgid "argparse" msgstr "" -#: ../../whatsnew/3.10.rst:910 +#: ../../whatsnew/3.10.rst:911 msgid "" "Misleading phrase \"optional arguments\" was replaced with \"options\" in " "argparse help. Some tests might require adaptation if they rely on exact " "output match. (Contributed by Raymond Hettinger in :issue:`9694`.)" msgstr "" -#: ../../whatsnew/3.10.rst:914 +#: ../../whatsnew/3.10.rst:915 msgid "array" msgstr "" -#: ../../whatsnew/3.10.rst:916 +#: ../../whatsnew/3.10.rst:917 msgid "" "The :meth:`~array.array.index` method of :class:`array.array` now has " "optional *start* and *stop* parameters. (Contributed by Anders Lorentsen and " "Zackery Spytz in :issue:`31956`.)" msgstr "" -#: ../../whatsnew/3.10.rst:921 +#: ../../whatsnew/3.10.rst:922 msgid "asynchat, asyncore, smtpd" msgstr "" -#: ../../whatsnew/3.10.rst:922 +#: ../../whatsnew/3.10.rst:923 msgid "" "These modules have been marked as deprecated in their module documentation " "since Python 3.6. An import-time :class:`DeprecationWarning` has now been " "added to all three of these modules." msgstr "" -#: ../../whatsnew/3.10.rst:927 +#: ../../whatsnew/3.10.rst:928 msgid "base64" msgstr "" -#: ../../whatsnew/3.10.rst:929 +#: ../../whatsnew/3.10.rst:930 msgid "" "Add :func:`base64.b32hexencode` and :func:`base64.b32hexdecode` to support " "the Base32 Encoding with Extended Hex Alphabet." msgstr "" -#: ../../whatsnew/3.10.rst:933 +#: ../../whatsnew/3.10.rst:934 msgid "bdb" msgstr "" -#: ../../whatsnew/3.10.rst:935 +#: ../../whatsnew/3.10.rst:936 msgid "" "Add :meth:`~bdb.Breakpoint.clearBreakpoints` to reset all set breakpoints. " "(Contributed by Irit Katriel in :issue:`24160`.)" msgstr "" -#: ../../whatsnew/3.10.rst:939 +#: ../../whatsnew/3.10.rst:940 msgid "bisect" msgstr "" -#: ../../whatsnew/3.10.rst:941 +#: ../../whatsnew/3.10.rst:942 msgid "" "Added the possibility of providing a *key* function to the APIs in the :mod:" "`bisect` module. (Contributed by Raymond Hettinger in :issue:`4356`.)" msgstr "" -#: ../../whatsnew/3.10.rst:945 +#: ../../whatsnew/3.10.rst:946 msgid "codecs" msgstr "" -#: ../../whatsnew/3.10.rst:947 +#: ../../whatsnew/3.10.rst:948 msgid "" "Add a :func:`codecs.unregister` function to unregister a codec search " "function. (Contributed by Hai Shi in :issue:`41842`.)" msgstr "" -#: ../../whatsnew/3.10.rst:951 +#: ../../whatsnew/3.10.rst:952 msgid "collections.abc" msgstr "" -#: ../../whatsnew/3.10.rst:953 +#: ../../whatsnew/3.10.rst:954 msgid "" "The ``__args__`` of the :ref:`parameterized generic ` " "for :class:`collections.abc.Callable` are now consistent with :data:`typing." @@ -1436,34 +1438,34 @@ msgid "" "`42195`.)" msgstr "" -#: ../../whatsnew/3.10.rst:966 +#: ../../whatsnew/3.10.rst:967 msgid "contextlib" msgstr "" -#: ../../whatsnew/3.10.rst:968 +#: ../../whatsnew/3.10.rst:969 msgid "" "Add a :func:`contextlib.aclosing` context manager to safely close async " "generators and objects representing asynchronously released resources. " "(Contributed by Joongi Kim and John Belmonte in :issue:`41229`.)" msgstr "" -#: ../../whatsnew/3.10.rst:972 +#: ../../whatsnew/3.10.rst:973 msgid "" "Add asynchronous context manager support to :func:`contextlib.nullcontext`. " "(Contributed by Tom Gringauz in :issue:`41543`.)" msgstr "" -#: ../../whatsnew/3.10.rst:975 +#: ../../whatsnew/3.10.rst:976 msgid "" "Add :class:`~contextlib.AsyncContextDecorator`, for supporting usage of " "async context managers as decorators." msgstr "" -#: ../../whatsnew/3.10.rst:979 +#: ../../whatsnew/3.10.rst:980 msgid "curses" msgstr "" -#: ../../whatsnew/3.10.rst:981 +#: ../../whatsnew/3.10.rst:982 msgid "" "The extended color functions added in ncurses 6.1 will be used transparently " "by :func:`curses.color_content`, :func:`curses.init_color`, :func:`curses." @@ -1473,43 +1475,43 @@ msgid "" "Kintscher and Hans Petter Jansson in :issue:`36982`.)" msgstr "" -#: ../../whatsnew/3.10.rst:988 +#: ../../whatsnew/3.10.rst:989 msgid "" "The ``BUTTON5_*`` constants are now exposed in the :mod:`curses` module if " "they are provided by the underlying curses library. (Contributed by Zackery " "Spytz in :issue:`39273`.)" msgstr "" -#: ../../whatsnew/3.10.rst:993 +#: ../../whatsnew/3.10.rst:994 msgid "dataclasses" msgstr "" -#: ../../whatsnew/3.10.rst:996 +#: ../../whatsnew/3.10.rst:997 msgid "__slots__" msgstr "" -#: ../../whatsnew/3.10.rst:998 +#: ../../whatsnew/3.10.rst:999 msgid "" "Added ``slots`` parameter in :func:`dataclasses.dataclass` decorator. " "(Contributed by Yurii Karabas in :issue:`42269`)" msgstr "" -#: ../../whatsnew/3.10.rst:1002 +#: ../../whatsnew/3.10.rst:1003 msgid "Keyword-only fields" msgstr "" -#: ../../whatsnew/3.10.rst:1004 +#: ../../whatsnew/3.10.rst:1005 msgid "" "dataclasses now supports fields that are keyword-only in the generated " "__init__ method. There are a number of ways of specifying keyword-only " "fields." msgstr "" -#: ../../whatsnew/3.10.rst:1008 +#: ../../whatsnew/3.10.rst:1009 msgid "You can say that every field is keyword-only:" msgstr "" -#: ../../whatsnew/3.10.rst:1010 +#: ../../whatsnew/3.10.rst:1011 msgid "" "from dataclasses import dataclass\n" "\n" @@ -1519,17 +1521,17 @@ msgid "" " birthday: datetime.date" msgstr "" -#: ../../whatsnew/3.10.rst:1019 +#: ../../whatsnew/3.10.rst:1020 msgid "" "Both ``name`` and ``birthday`` are keyword-only parameters to the generated " "__init__ method." msgstr "" -#: ../../whatsnew/3.10.rst:1022 +#: ../../whatsnew/3.10.rst:1023 msgid "You can specify keyword-only on a per-field basis:" msgstr "" -#: ../../whatsnew/3.10.rst:1024 +#: ../../whatsnew/3.10.rst:1025 msgid "" "from dataclasses import dataclass, field\n" "\n" @@ -1539,7 +1541,7 @@ msgid "" " birthday: datetime.date = field(kw_only=True)" msgstr "" -#: ../../whatsnew/3.10.rst:1033 +#: ../../whatsnew/3.10.rst:1034 msgid "" "Here only ``birthday`` is keyword-only. If you set ``kw_only`` on " "individual fields, be aware that there are rules about re-ordering fields " @@ -1547,13 +1549,13 @@ msgid "" "the full dataclasses documentation for details." msgstr "" -#: ../../whatsnew/3.10.rst:1038 +#: ../../whatsnew/3.10.rst:1039 msgid "" "You can also specify that all fields following a KW_ONLY marker are keyword-" "only. This will probably be the most common usage:" msgstr "" -#: ../../whatsnew/3.10.rst:1041 +#: ../../whatsnew/3.10.rst:1042 msgid "" "from dataclasses import dataclass, KW_ONLY\n" "\n" @@ -1566,17 +1568,17 @@ msgid "" " t: float = 0.0" msgstr "" -#: ../../whatsnew/3.10.rst:1053 +#: ../../whatsnew/3.10.rst:1054 msgid "" "Here, ``z`` and ``t`` are keyword-only parameters, while ``x`` and ``y`` are " "not. (Contributed by Eric V. Smith in :issue:`43532`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1060 +#: ../../whatsnew/3.10.rst:1061 msgid "distutils" msgstr "" -#: ../../whatsnew/3.10.rst:1062 +#: ../../whatsnew/3.10.rst:1063 msgid "" "The entire ``distutils`` package is deprecated, to be removed in Python " "3.12. Its functionality for specifying package builds has already been " @@ -1589,39 +1591,39 @@ msgid "" "`632` for discussion." msgstr "" -#: ../../whatsnew/3.10.rst:1072 +#: ../../whatsnew/3.10.rst:1073 msgid "" "The ``bdist_wininst`` command deprecated in Python 3.8 has been removed. The " "``bdist_wheel`` command is now recommended to distribute binary packages on " "Windows. (Contributed by Victor Stinner in :issue:`42802`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1078 +#: ../../whatsnew/3.10.rst:1079 msgid "doctest" msgstr "" -#: ../../whatsnew/3.10.rst:1080 ../../whatsnew/3.10.rst:1215 -#: ../../whatsnew/3.10.rst:1242 ../../whatsnew/3.10.rst:1341 +#: ../../whatsnew/3.10.rst:1081 ../../whatsnew/3.10.rst:1216 +#: ../../whatsnew/3.10.rst:1243 ../../whatsnew/3.10.rst:1342 msgid "" "When a module does not define ``__loader__``, fall back to ``__spec__." "loader``. (Contributed by Brett Cannon in :issue:`42133`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1084 +#: ../../whatsnew/3.10.rst:1085 msgid "encodings" msgstr "" -#: ../../whatsnew/3.10.rst:1086 +#: ../../whatsnew/3.10.rst:1087 msgid "" ":func:`encodings.normalize_encoding` now ignores non-ASCII characters. " "(Contributed by Hai Shi in :issue:`39337`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1090 +#: ../../whatsnew/3.10.rst:1091 msgid "enum" msgstr "" -#: ../../whatsnew/3.10.rst:1092 +#: ../../whatsnew/3.10.rst:1093 msgid "" ":class:`~enum.Enum` :func:`~object.__repr__` now returns ``enum_name." "member_name`` and :func:`~object.__str__` now returns ``member_name``. " @@ -1629,106 +1631,106 @@ msgid "" "``module_name.member_name``. (Contributed by Ethan Furman in :issue:`40066`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1097 +#: ../../whatsnew/3.10.rst:1098 msgid "" "Add :class:`enum.StrEnum` for enums where all members are strings. " "(Contributed by Ethan Furman in :issue:`41816`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1101 +#: ../../whatsnew/3.10.rst:1102 msgid "fileinput" msgstr "" -#: ../../whatsnew/3.10.rst:1103 +#: ../../whatsnew/3.10.rst:1104 msgid "" "Add *encoding* and *errors* parameters in :func:`fileinput.input` and :class:" "`fileinput.FileInput`. (Contributed by Inada Naoki in :issue:`43712`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1107 +#: ../../whatsnew/3.10.rst:1108 msgid "" ":func:`fileinput.hook_compressed` now returns :class:`~io.TextIOWrapper` " "object when *mode* is \"r\" and file is compressed, like uncompressed files. " "(Contributed by Inada Naoki in :issue:`5758`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1112 +#: ../../whatsnew/3.10.rst:1113 msgid "faulthandler" msgstr "" -#: ../../whatsnew/3.10.rst:1114 +#: ../../whatsnew/3.10.rst:1115 msgid "" "The :mod:`faulthandler` module now detects if a fatal error occurs during a " "garbage collector collection. (Contributed by Victor Stinner in :issue:" "`44466`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1119 +#: ../../whatsnew/3.10.rst:1120 msgid "gc" msgstr "" -#: ../../whatsnew/3.10.rst:1121 +#: ../../whatsnew/3.10.rst:1122 msgid "" "Add audit hooks for :func:`gc.get_objects`, :func:`gc.get_referrers` and :" "func:`gc.get_referents`. (Contributed by Pablo Galindo in :issue:`43439`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1125 +#: ../../whatsnew/3.10.rst:1126 msgid "glob" msgstr "" -#: ../../whatsnew/3.10.rst:1127 +#: ../../whatsnew/3.10.rst:1128 msgid "" "Add the *root_dir* and *dir_fd* parameters in :func:`~glob.glob` and :func:" "`~glob.iglob` which allow to specify the root directory for searching. " "(Contributed by Serhiy Storchaka in :issue:`38144`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1132 +#: ../../whatsnew/3.10.rst:1133 msgid "hashlib" msgstr "" -#: ../../whatsnew/3.10.rst:1134 +#: ../../whatsnew/3.10.rst:1135 msgid "" "The hashlib module requires OpenSSL 1.1.1 or newer. (Contributed by " "Christian Heimes in :pep:`644` and :issue:`43669`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1137 +#: ../../whatsnew/3.10.rst:1138 msgid "" "The hashlib module has preliminary support for OpenSSL 3.0.0. (Contributed " "by Christian Heimes in :issue:`38820` and other issues.)" msgstr "" -#: ../../whatsnew/3.10.rst:1140 +#: ../../whatsnew/3.10.rst:1141 msgid "" "The pure-Python fallback of :func:`~hashlib.pbkdf2_hmac` is deprecated. In " "the future PBKDF2-HMAC will only be available when Python has been built " "with OpenSSL support. (Contributed by Christian Heimes in :issue:`43880`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1146 +#: ../../whatsnew/3.10.rst:1147 msgid "hmac" msgstr "" -#: ../../whatsnew/3.10.rst:1148 +#: ../../whatsnew/3.10.rst:1149 msgid "" "The hmac module now uses OpenSSL's HMAC implementation internally. " "(Contributed by Christian Heimes in :issue:`40645`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1152 +#: ../../whatsnew/3.10.rst:1153 msgid "IDLE and idlelib" msgstr "" -#: ../../whatsnew/3.10.rst:1154 +#: ../../whatsnew/3.10.rst:1155 msgid "" "Make IDLE invoke :func:`sys.excepthook` (when started without '-n'). User " "hooks were previously ignored. (Contributed by Ken Hilton in :issue:" "`43008`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1158 +#: ../../whatsnew/3.10.rst:1159 msgid "" "Rearrange the settings dialog. Split the General tab into Windows and Shell/" "Ed tabs. Move help sources, which extend the Help menu, to the Extensions " @@ -1739,11 +1741,11 @@ msgid "" "`33962`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1166 +#: ../../whatsnew/3.10.rst:1167 msgid "The changes above were backported to a 3.9 maintenance release." msgstr "" -#: ../../whatsnew/3.10.rst:1168 +#: ../../whatsnew/3.10.rst:1169 msgid "" "Add a Shell sidebar. Move the primary prompt ('>>>') to the sidebar. Add " "secondary prompts ('...') to the sidebar. Left click and optional drag " @@ -1754,7 +1756,7 @@ msgid "" "text. (Contributed by Tal Einat in :issue:`37903`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1177 +#: ../../whatsnew/3.10.rst:1178 msgid "" "Use spaces instead of tabs to indent interactive code. This makes " "interactive code entries 'look right'. Making this feasible was a major " @@ -1762,7 +1764,7 @@ msgid "" "in :issue:`37892`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1182 +#: ../../whatsnew/3.10.rst:1183 msgid "" "Highlight the new :ref:`soft keywords ` :keyword:`match`, :" "keyword:`case `, and :keyword:`_ ` in pattern-" @@ -1771,33 +1773,33 @@ msgid "" "(Contributed by Tal Einat in :issue:`44010`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1188 +#: ../../whatsnew/3.10.rst:1189 msgid "New in 3.10 maintenance releases." msgstr "" -#: ../../whatsnew/3.10.rst:1190 +#: ../../whatsnew/3.10.rst:1191 msgid "" "Apply syntax highlighting to ``.pyi`` files. (Contributed by Alex Waygood " "and Terry Jan Reedy in :issue:`45447`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1193 +#: ../../whatsnew/3.10.rst:1194 msgid "" "Include prompts when saving Shell with inputs and outputs. (Contributed by " "Terry Jan Reedy in :gh:`95191`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1197 +#: ../../whatsnew/3.10.rst:1198 msgid "importlib.metadata" msgstr "" -#: ../../whatsnew/3.10.rst:1199 +#: ../../whatsnew/3.10.rst:1200 msgid "" "Feature parity with ``importlib_metadata`` 4.6 (`history `_)." msgstr "" -#: ../../whatsnew/3.10.rst:1202 +#: ../../whatsnew/3.10.rst:1203 msgid "" ":ref:`importlib.metadata entry points ` now provide a nicer " "experience for selecting entry points by group and name through a new :ref:" @@ -1805,18 +1807,18 @@ msgid "" "Note in the docs for more info on the deprecation and usage." msgstr "" -#: ../../whatsnew/3.10.rst:1208 +#: ../../whatsnew/3.10.rst:1209 msgid "" "Added :ref:`importlib.metadata.packages_distributions() ` for resolving top-level Python modules and packages to " "their :ref:`importlib.metadata.Distribution `." msgstr "" -#: ../../whatsnew/3.10.rst:1213 +#: ../../whatsnew/3.10.rst:1214 msgid "inspect" msgstr "" -#: ../../whatsnew/3.10.rst:1218 +#: ../../whatsnew/3.10.rst:1219 msgid "" "Add :func:`inspect.get_annotations`, which safely computes the annotations " "defined on an object. It works around the quirks of accessing the " @@ -1834,38 +1836,38 @@ msgid "" "`43817`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1234 +#: ../../whatsnew/3.10.rst:1235 msgid "itertools" msgstr "" -#: ../../whatsnew/3.10.rst:1236 +#: ../../whatsnew/3.10.rst:1237 msgid "" "Add :func:`itertools.pairwise`. (Contributed by Raymond Hettinger in :issue:" "`38200`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1240 +#: ../../whatsnew/3.10.rst:1241 msgid "linecache" msgstr "" -#: ../../whatsnew/3.10.rst:1246 +#: ../../whatsnew/3.10.rst:1247 msgid "os" msgstr "" -#: ../../whatsnew/3.10.rst:1248 +#: ../../whatsnew/3.10.rst:1249 msgid "" "Add :func:`os.cpu_count` support for VxWorks RTOS. (Contributed by Peixing " "Xin in :issue:`41440`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1251 +#: ../../whatsnew/3.10.rst:1252 msgid "" "Add a new function :func:`os.eventfd` and related helpers to wrap the " "``eventfd2`` syscall on Linux. (Contributed by Christian Heimes in :issue:" "`41001`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1255 +#: ../../whatsnew/3.10.rst:1256 msgid "" "Add :func:`os.splice` that allows to move data between two file descriptors " "without copying between kernel address space and user address space, where " @@ -1873,41 +1875,41 @@ msgid "" "Galindo in :issue:`41625`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1260 +#: ../../whatsnew/3.10.rst:1261 msgid "" "Add :const:`~os.O_EVTONLY`, :const:`~os.O_FSYNC`, :const:`~os.O_SYMLINK` " "and :const:`~os.O_NOFOLLOW_ANY` for macOS. (Contributed by Donghee Na in :" "issue:`43106`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1265 +#: ../../whatsnew/3.10.rst:1266 msgid "os.path" msgstr "" -#: ../../whatsnew/3.10.rst:1267 +#: ../../whatsnew/3.10.rst:1268 msgid "" ":func:`os.path.realpath` now accepts a *strict* keyword-only argument. When " "set to ``True``, :exc:`OSError` is raised if a path doesn't exist or a " "symlink loop is encountered. (Contributed by Barney Gale in :issue:`43757`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1273 +#: ../../whatsnew/3.10.rst:1274 msgid "pathlib" msgstr "" -#: ../../whatsnew/3.10.rst:1275 +#: ../../whatsnew/3.10.rst:1276 msgid "" "Add slice support to :attr:`PurePath.parents `. " "(Contributed by Joshua Cannon in :issue:`35498`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1278 +#: ../../whatsnew/3.10.rst:1279 msgid "" "Add negative indexing support to :attr:`PurePath.parents `. (Contributed by Yaroslav Pankovych in :issue:`21041`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1282 +#: ../../whatsnew/3.10.rst:1283 msgid "" "Add :meth:`Path.hardlink_to ` method that " "supersedes :meth:`!link_to`. The new method has the same argument order as :" @@ -1915,7 +1917,7 @@ msgid "" "`39950`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1287 +#: ../../whatsnew/3.10.rst:1288 msgid "" ":meth:`pathlib.Path.stat` and :meth:`~pathlib.Path.chmod` now accept a " "*follow_symlinks* keyword-only argument for consistency with corresponding " @@ -1923,11 +1925,11 @@ msgid "" "`39906`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1293 +#: ../../whatsnew/3.10.rst:1294 msgid "platform" msgstr "" -#: ../../whatsnew/3.10.rst:1295 +#: ../../whatsnew/3.10.rst:1296 msgid "" "Add :func:`platform.freedesktop_os_release` to retrieve operation system " "identification from `freedesktop.org os-release >> from typing import Literal\n" ">>> Literal[{0}]\n" @@ -2215,18 +2217,18 @@ msgid "" "TypeError: unhashable type: 'set'" msgstr "" -#: ../../whatsnew/3.10.rst:1479 +#: ../../whatsnew/3.10.rst:1480 msgid "(Contributed by Yurii Karabas in :issue:`42345`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1481 +#: ../../whatsnew/3.10.rst:1482 msgid "" "Add new function :func:`typing.is_typeddict` to introspect if an annotation " "is a :class:`typing.TypedDict`. (Contributed by Patrick Reader in :issue:" "`41792`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1485 +#: ../../whatsnew/3.10.rst:1486 msgid "" "Subclasses of ``typing.Protocol`` which only have data variables declared " "will now raise a ``TypeError`` when checked with ``isinstance`` unless they " @@ -2236,7 +2238,7 @@ msgid "" "(Contributed by Yurii Karabas in :issue:`38908`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1493 +#: ../../whatsnew/3.10.rst:1494 msgid "" "Importing from the ``typing.io`` and ``typing.re`` submodules will now emit :" "exc:`DeprecationWarning`. These submodules have been deprecated since " @@ -2245,22 +2247,22 @@ msgid "" "instead. (Contributed by Sebastian Rittau in :issue:`38291`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1501 +#: ../../whatsnew/3.10.rst:1502 msgid "unittest" msgstr "" -#: ../../whatsnew/3.10.rst:1503 +#: ../../whatsnew/3.10.rst:1504 msgid "" "Add new method :meth:`~unittest.TestCase.assertNoLogs` to complement the " "existing :meth:`~unittest.TestCase.assertLogs`. (Contributed by Kit Yan Choi " "in :issue:`39385`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1508 +#: ../../whatsnew/3.10.rst:1509 msgid "urllib.parse" msgstr "" -#: ../../whatsnew/3.10.rst:1510 +#: ../../whatsnew/3.10.rst:1511 msgid "" "Python versions earlier than Python 3.10 allowed using both ``;`` and ``&`` " "as query parameter separators in :func:`urllib.parse.parse_qs` and :func:" @@ -2273,7 +2275,7 @@ msgid "" "in :issue:`42967`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1520 +#: ../../whatsnew/3.10.rst:1521 msgid "" "The presence of newline or tab characters in parts of a URL allows for some " "forms of attacks. Following the WHATWG specification that updates :rfc:" @@ -2283,22 +2285,22 @@ msgid "" "variable ``urllib.parse._UNSAFE_URL_BYTES_TO_REMOVE``. (See :gh:`88048`)" msgstr "" -#: ../../whatsnew/3.10.rst:1528 +#: ../../whatsnew/3.10.rst:1529 msgid "xml" msgstr "" -#: ../../whatsnew/3.10.rst:1530 +#: ../../whatsnew/3.10.rst:1531 msgid "" "Add a :class:`~xml.sax.handler.LexicalHandler` class to the :mod:`xml.sax." "handler` module. (Contributed by Jonathan Gossage and Zackery Spytz in :" "issue:`35018`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1535 +#: ../../whatsnew/3.10.rst:1536 msgid "zipimport" msgstr "" -#: ../../whatsnew/3.10.rst:1536 +#: ../../whatsnew/3.10.rst:1537 msgid "" "Add methods related to :pep:`451`: :meth:`~zipimport.zipimporter." "find_spec`, :meth:`zipimport.zipimporter.create_module`, and :meth:" @@ -2306,24 +2308,24 @@ msgid "" "`42131`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1541 +#: ../../whatsnew/3.10.rst:1542 msgid "" "Add :meth:`~zipimport.zipimporter.invalidate_caches` method. (Contributed by " "Desmond Cheong in :issue:`14678`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1546 +#: ../../whatsnew/3.10.rst:1547 msgid "Optimizations" msgstr "" -#: ../../whatsnew/3.10.rst:1548 +#: ../../whatsnew/3.10.rst:1549 msgid "" "Constructors :func:`str`, :func:`bytes` and :func:`bytearray` are now faster " "(around 30--40% for small objects). (Contributed by Serhiy Storchaka in :" "issue:`41334`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1552 +#: ../../whatsnew/3.10.rst:1553 msgid "" "The :mod:`runpy` module now imports fewer modules. The ``python3 -m module-" "name`` command startup time is 1.4x faster in average. On Linux, ``python3 -" @@ -2332,7 +2334,7 @@ msgid "" "`41006` and :issue:`41718`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1558 +#: ../../whatsnew/3.10.rst:1559 msgid "" "The ``LOAD_ATTR`` instruction now uses new \"per opcode cache\" mechanism. " "It is about 36% faster now for regular attributes and 44% faster for slots. " @@ -2341,7 +2343,7 @@ msgid "" "and MicroPython.)" msgstr "" -#: ../../whatsnew/3.10.rst:1564 +#: ../../whatsnew/3.10.rst:1565 msgid "" "When building Python with :option:`--enable-optimizations` now ``-fno-" "semantic-interposition`` is added to both the compile and link line. This " @@ -2352,7 +2354,7 @@ msgid "" "and Pablo Galindo in :issue:`38980`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1572 +#: ../../whatsnew/3.10.rst:1573 msgid "" "Use a new output buffer management code for :mod:`bz2` / :mod:`lzma` / :mod:" "`zlib` modules, and add ``.readall()`` function to ``_compression." @@ -2362,7 +2364,7 @@ msgid "" "`41486`)" msgstr "" -#: ../../whatsnew/3.10.rst:1578 +#: ../../whatsnew/3.10.rst:1579 msgid "" "When using stringized annotations, annotations dicts for functions are no " "longer created when the function is created. Instead, they are stored as a " @@ -2372,7 +2374,7 @@ msgid "" "Inada Naoki in :issue:`42202`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1585 +#: ../../whatsnew/3.10.rst:1586 msgid "" "Substring search functions such as ``str1 in str2`` and ``str2.find(str1)`` " "now sometimes use Crochemore & Perrin's \"Two-Way\" string searching " @@ -2380,7 +2382,7 @@ msgid "" "Dennis Sweeney in :issue:`41972`)" msgstr "" -#: ../../whatsnew/3.10.rst:1590 +#: ../../whatsnew/3.10.rst:1591 msgid "" "Add micro-optimizations to ``_PyType_Lookup()`` to improve type attribute " "cache lookup performance in the common case of cache hits. This makes the " @@ -2388,7 +2390,7 @@ msgid "" "issue:`43452`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1594 +#: ../../whatsnew/3.10.rst:1595 msgid "" "The following built-in functions now support the faster :pep:`590` " "vectorcall calling convention: :func:`map`, :func:`filter`, :func:" @@ -2397,7 +2399,7 @@ msgid "" "`41873` and :issue:`41870`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1598 +#: ../../whatsnew/3.10.rst:1599 msgid "" ":class:`~bz2.BZ2File` performance is improved by removing internal " "``RLock``. This makes :class:`!BZ2File` thread unsafe in the face of " @@ -2406,11 +2408,11 @@ msgid "" "Naoki in :issue:`43785`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1606 ../../whatsnew/3.10.rst:2212 +#: ../../whatsnew/3.10.rst:1607 ../../whatsnew/3.10.rst:2213 msgid "Deprecated" msgstr "" -#: ../../whatsnew/3.10.rst:1608 +#: ../../whatsnew/3.10.rst:1609 msgid "" "Currently Python accepts numeric literals immediately followed by keywords, " "for example ``0in x``, ``1or x``, ``0if 1else 2``. It allows confusing and " @@ -2423,7 +2425,7 @@ msgid "" "by Serhiy Storchaka in :issue:`43833`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1619 +#: ../../whatsnew/3.10.rst:1620 msgid "" "Starting in this release, there will be a concerted effort to begin cleaning " "up old import semantics that were kept for Python 2.7 compatibility. " @@ -2440,21 +2442,21 @@ msgid "" "transition." msgstr "" -#: ../../whatsnew/3.10.rst:1636 +#: ../../whatsnew/3.10.rst:1637 msgid "" "The entire ``distutils`` namespace is deprecated, to be removed in Python " "3.12. Refer to the :ref:`module changes ` section for " "more information." msgstr "" -#: ../../whatsnew/3.10.rst:1640 +#: ../../whatsnew/3.10.rst:1641 msgid "" "Non-integer arguments to :func:`random.randrange` are deprecated. The :exc:" "`ValueError` is deprecated in favor of a :exc:`TypeError`. (Contributed by " "Serhiy Storchaka and Raymond Hettinger in :issue:`37319`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1644 +#: ../../whatsnew/3.10.rst:1645 msgid "" "The various ``load_module()`` methods of :mod:`importlib` have been " "documented as deprecated since Python 3.6, but will now also trigger a :exc:" @@ -2462,21 +2464,21 @@ msgid "" "(Contributed by Brett Cannon in :issue:`26131`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1650 +#: ../../whatsnew/3.10.rst:1651 msgid "" ":meth:`!zimport.zipimporter.load_module` has been deprecated in preference " "for :meth:`~zipimport.zipimporter.exec_module`. (Contributed by Brett Cannon " "in :issue:`26131`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1654 +#: ../../whatsnew/3.10.rst:1655 msgid "" "The use of :meth:`~importlib.abc.Loader.load_module` by the import system " "now triggers an :exc:`ImportWarning` as :meth:`~importlib.abc.Loader." "exec_module` is preferred. (Contributed by Brett Cannon in :issue:`26131`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1659 +#: ../../whatsnew/3.10.rst:1660 msgid "" "The use of :meth:`!importlib.abc.MetaPathFinder.find_module` and :meth:`!" "importlib.abc.PathEntryFinder.find_module` by the import system now trigger " @@ -2486,7 +2488,7 @@ msgid "" "porting. (Contributed by Brett Cannon in :issue:`42134`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1668 +#: ../../whatsnew/3.10.rst:1669 msgid "" "The use of :meth:`!importlib.abc.PathEntryFinder.find_loader` by the import " "system now triggers an :exc:`ImportWarning` as :meth:`importlib.abc." @@ -2495,7 +2497,7 @@ msgid "" "`43672`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1674 +#: ../../whatsnew/3.10.rst:1675 msgid "" "The various implementations of :meth:`!importlib.abc.MetaPathFinder." "find_module` ( :meth:`!importlib.machinery.BuiltinImporter.find_module`, :" @@ -2510,7 +2512,7 @@ msgid "" "Python 3.4). (Contributed by Brett Cannon in :issue:`42135`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1689 +#: ../../whatsnew/3.10.rst:1690 msgid "" ":class:`!importlib.abc.Finder` is deprecated (including its sole method, :" "meth:`!find_module`). Both :class:`importlib.abc.MetaPathFinder` and :class:" @@ -2519,7 +2521,7 @@ msgid "" "(Contributed by Brett Cannon in :issue:`42135`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1696 +#: ../../whatsnew/3.10.rst:1697 msgid "" "The deprecations of :mod:`!imp`, :func:`!importlib.find_loader`, :func:`!" "importlib.util.set_package_wrapper`, :func:`!importlib.util." @@ -2530,7 +2532,7 @@ msgid "" "Brett Cannon in :issue:`43720`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1706 +#: ../../whatsnew/3.10.rst:1707 msgid "" "The import system now uses the ``__spec__`` attribute on modules before " "falling back on :meth:`!module_repr` for a module's ``__repr__()`` method. " @@ -2538,7 +2540,7 @@ msgid "" "(Contributed by Brett Cannon in :issue:`42137`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1712 +#: ../../whatsnew/3.10.rst:1713 msgid "" ":meth:`!importlib.abc.Loader.module_repr`, :meth:`!importlib.machinery." "FrozenLoader.module_repr`, and :meth:`!importlib.machinery.BuiltinLoader." @@ -2546,7 +2548,7 @@ msgid "" "(Contributed by Brett Cannon in :issue:`42136`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1718 +#: ../../whatsnew/3.10.rst:1719 msgid "" "``sqlite3.OptimizedUnicode`` has been undocumented and obsolete since Python " "3.3, when it was made an alias to :class:`str`. It is now deprecated, " @@ -2554,7 +2556,7 @@ msgid "" "issue:`42264`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1723 +#: ../../whatsnew/3.10.rst:1724 msgid "" "The undocumented built-in function ``sqlite3.enable_shared_cache`` is now " "deprecated, scheduled for removal in Python 3.12. Its use is strongly " @@ -2564,67 +2566,67 @@ msgid "" "query parameter. (Contributed by Erlend E. Aasland in :issue:`24464`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1731 +#: ../../whatsnew/3.10.rst:1732 msgid "The following ``threading`` methods are now deprecated:" msgstr "" -#: ../../whatsnew/3.10.rst:1733 +#: ../../whatsnew/3.10.rst:1734 msgid "``threading.currentThread`` => :func:`threading.current_thread`" msgstr "" -#: ../../whatsnew/3.10.rst:1735 +#: ../../whatsnew/3.10.rst:1736 msgid "``threading.activeCount`` => :func:`threading.active_count`" msgstr "" -#: ../../whatsnew/3.10.rst:1737 +#: ../../whatsnew/3.10.rst:1738 msgid "" "``threading.Condition.notifyAll`` => :meth:`threading.Condition.notify_all`" msgstr "" -#: ../../whatsnew/3.10.rst:1740 +#: ../../whatsnew/3.10.rst:1741 msgid "``threading.Event.isSet`` => :meth:`threading.Event.is_set`" msgstr "" -#: ../../whatsnew/3.10.rst:1742 +#: ../../whatsnew/3.10.rst:1743 msgid "``threading.Thread.setName`` => :attr:`threading.Thread.name`" msgstr "" -#: ../../whatsnew/3.10.rst:1744 +#: ../../whatsnew/3.10.rst:1745 msgid "``threading.thread.getName`` => :attr:`threading.Thread.name`" msgstr "" -#: ../../whatsnew/3.10.rst:1746 +#: ../../whatsnew/3.10.rst:1747 msgid "``threading.Thread.isDaemon`` => :attr:`threading.Thread.daemon`" msgstr "" -#: ../../whatsnew/3.10.rst:1748 +#: ../../whatsnew/3.10.rst:1749 msgid "``threading.Thread.setDaemon`` => :attr:`threading.Thread.daemon`" msgstr "" -#: ../../whatsnew/3.10.rst:1750 +#: ../../whatsnew/3.10.rst:1751 msgid "(Contributed by Jelle Zijlstra in :gh:`87889`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1752 +#: ../../whatsnew/3.10.rst:1753 msgid "" ":meth:`!pathlib.Path.link_to` is deprecated and slated for removal in Python " "3.12. Use :meth:`pathlib.Path.hardlink_to` instead. (Contributed by Barney " "Gale in :issue:`39950`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1756 +#: ../../whatsnew/3.10.rst:1757 msgid "" "``cgi.log()`` is deprecated and slated for removal in Python 3.12. " "(Contributed by Inada Naoki in :issue:`41139`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1759 +#: ../../whatsnew/3.10.rst:1760 msgid "" "The following :mod:`ssl` features have been deprecated since Python 3.6, " "Python 3.7, or OpenSSL 1.1.0 and will be removed in 3.11:" msgstr "" -#: ../../whatsnew/3.10.rst:1762 +#: ../../whatsnew/3.10.rst:1763 msgid "" ":data:`!OP_NO_SSLv2`, :data:`!OP_NO_SSLv3`, :data:`!OP_NO_TLSv1`, :data:`!" "OP_NO_TLSv1_1`, :data:`!OP_NO_TLSv1_2`, and :data:`!OP_NO_TLSv1_3` are " @@ -2632,7 +2634,7 @@ msgid "" "SSLContext.maximum_version`." msgstr "" -#: ../../whatsnew/3.10.rst:1768 +#: ../../whatsnew/3.10.rst:1769 msgid "" ":data:`!PROTOCOL_SSLv2`, :data:`!PROTOCOL_SSLv3`, :data:`!PROTOCOL_SSLv23`, :" "data:`!PROTOCOL_TLSv1`, :data:`!PROTOCOL_TLSv1_1`, :data:`!" @@ -2640,25 +2642,25 @@ msgid "" "const:`~ssl.PROTOCOL_TLS_CLIENT` and :const:`~ssl.PROTOCOL_TLS_SERVER`" msgstr "" -#: ../../whatsnew/3.10.rst:1774 +#: ../../whatsnew/3.10.rst:1775 msgid ":func:`!wrap_socket` is replaced by :meth:`ssl.SSLContext.wrap_socket`" msgstr "" -#: ../../whatsnew/3.10.rst:1776 +#: ../../whatsnew/3.10.rst:1777 msgid ":func:`!match_hostname`" msgstr "" -#: ../../whatsnew/3.10.rst:1778 +#: ../../whatsnew/3.10.rst:1779 msgid ":func:`!RAND_pseudo_bytes`, :func:`!RAND_egd`" msgstr "" -#: ../../whatsnew/3.10.rst:1780 +#: ../../whatsnew/3.10.rst:1781 msgid "" "NPN features like :meth:`ssl.SSLSocket.selected_npn_protocol` and :meth:`ssl." "SSLContext.set_npn_protocols` are replaced by ALPN." msgstr "" -#: ../../whatsnew/3.10.rst:1783 +#: ../../whatsnew/3.10.rst:1784 msgid "" "The threading debug (:envvar:`!PYTHONTHREADDEBUG` environment variable) is " "deprecated in Python 3.10 and will be removed in Python 3.12. This feature " @@ -2666,7 +2668,7 @@ msgid "" "Victor Stinner in :issue:`44584`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1788 +#: ../../whatsnew/3.10.rst:1789 msgid "" "Importing from the ``typing.io`` and ``typing.re`` submodules will now emit :" "exc:`DeprecationWarning`. These submodules will be removed in a future " @@ -2675,11 +2677,11 @@ msgid "" "Rittau in :issue:`38291`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1797 ../../whatsnew/3.10.rst:2220 +#: ../../whatsnew/3.10.rst:1798 ../../whatsnew/3.10.rst:2221 msgid "Removed" msgstr "" -#: ../../whatsnew/3.10.rst:1799 +#: ../../whatsnew/3.10.rst:1800 msgid "" "Removed special methods ``__int__``, ``__float__``, ``__floordiv__``, " "``__mod__``, ``__divmod__``, ``__rfloordiv__``, ``__rmod__`` and " @@ -2687,7 +2689,7 @@ msgid "" "`TypeError`. (Contributed by Serhiy Storchaka in :issue:`41974`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1805 +#: ../../whatsnew/3.10.rst:1806 msgid "" "The ``ParserBase.error()`` method from the private and undocumented " "``_markupbase`` module has been removed. :class:`html.parser.HTMLParser` is " @@ -2696,7 +2698,7 @@ msgid "" "`31844`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1811 +#: ../../whatsnew/3.10.rst:1812 msgid "" "Removed the ``unicodedata.ucnhash_CAPI`` attribute which was an internal " "PyCapsule object. The related private ``_PyUnicode_Name_CAPI`` structure was " @@ -2704,7 +2706,7 @@ msgid "" "`42157`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1816 +#: ../../whatsnew/3.10.rst:1817 msgid "" "Removed the ``parser`` module, which was deprecated in 3.9 due to the switch " "to the new PEG parser, as well as all the C source and header files that " @@ -2712,7 +2714,7 @@ msgid "" "``graminit.h`` and ``grammar.h``." msgstr "" -#: ../../whatsnew/3.10.rst:1821 +#: ../../whatsnew/3.10.rst:1822 msgid "" "Removed the Public C API functions ``PyParser_SimpleParseStringFlags``, " "``PyParser_SimpleParseStringFlagsFilename``, " @@ -2720,7 +2722,7 @@ msgid "" "deprecated in 3.9 due to the switch to the new PEG parser." msgstr "" -#: ../../whatsnew/3.10.rst:1826 +#: ../../whatsnew/3.10.rst:1827 msgid "" "Removed the ``formatter`` module, which was deprecated in Python 3.4. It is " "somewhat obsolete, little used, and not tested. It was originally scheduled " @@ -2729,71 +2731,71 @@ msgid "" "their code. (Contributed by Donghee Na and Terry J. Reedy in :issue:`42299`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1833 +#: ../../whatsnew/3.10.rst:1834 msgid "" "Removed the :c:func:`!PyModule_GetWarningsModule` function that was useless " "now due to the :mod:`!_warnings` module was converted to a builtin module in " "2.6. (Contributed by Hai Shi in :issue:`42599`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1837 +#: ../../whatsnew/3.10.rst:1838 msgid "" "Remove deprecated aliases to :ref:`collections-abstract-base-classes` from " "the :mod:`collections` module. (Contributed by Victor Stinner in :issue:" "`37324`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1841 +#: ../../whatsnew/3.10.rst:1842 msgid "" "The ``loop`` parameter has been removed from most of :mod:`asyncio`\\ 's :" "doc:`high-level API <../library/asyncio-api-index>` following deprecation in " "Python 3.8. The motivation behind this change is multifold:" msgstr "" -#: ../../whatsnew/3.10.rst:1845 +#: ../../whatsnew/3.10.rst:1846 msgid "This simplifies the high-level API." msgstr "" -#: ../../whatsnew/3.10.rst:1846 +#: ../../whatsnew/3.10.rst:1847 msgid "" "The functions in the high-level API have been implicitly getting the current " "thread's running event loop since Python 3.7. There isn't a need to pass " "the event loop to the API in most normal use cases." msgstr "" -#: ../../whatsnew/3.10.rst:1849 +#: ../../whatsnew/3.10.rst:1850 msgid "" "Event loop passing is error-prone especially when dealing with loops running " "in different threads." msgstr "" -#: ../../whatsnew/3.10.rst:1852 +#: ../../whatsnew/3.10.rst:1853 msgid "" "Note that the low-level API will still accept ``loop``. See :ref:`changes-" "python-api` for examples of how to replace existing code." msgstr "" -#: ../../whatsnew/3.10.rst:1855 ../../whatsnew/3.10.rst:1927 +#: ../../whatsnew/3.10.rst:1856 ../../whatsnew/3.10.rst:1928 msgid "" "(Contributed by Yurii Karabas, Andrew Svetlov, Yury Selivanov and Kyle " "Stanley in :issue:`42392`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1860 ../../whatsnew/3.10.rst:2147 +#: ../../whatsnew/3.10.rst:1861 ../../whatsnew/3.10.rst:2148 msgid "Porting to Python 3.10" msgstr "" -#: ../../whatsnew/3.10.rst:1862 +#: ../../whatsnew/3.10.rst:1863 msgid "" "This section lists previously described changes and other bugfixes that may " "require changes to your code." msgstr "" -#: ../../whatsnew/3.10.rst:1867 +#: ../../whatsnew/3.10.rst:1868 msgid "Changes in the Python syntax" msgstr "" -#: ../../whatsnew/3.10.rst:1869 +#: ../../whatsnew/3.10.rst:1870 msgid "" "Deprecation warning is now emitted when compiling previously valid syntax if " "the numeric literal is immediately followed by a keyword (like in ``0in " @@ -2803,11 +2805,11 @@ msgid "" "following keyword. (Contributed by Serhiy Storchaka in :issue:`43833`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1880 +#: ../../whatsnew/3.10.rst:1881 msgid "Changes in the Python API" msgstr "" -#: ../../whatsnew/3.10.rst:1882 +#: ../../whatsnew/3.10.rst:1883 msgid "" "The *etype* parameters of the :func:`~traceback.format_exception`, :func:" "`~traceback.format_exception_only`, and :func:`~traceback.print_exception` " @@ -2815,7 +2817,7 @@ msgid "" "(Contributed by Zackery Spytz and Matthias Bussonnier in :issue:`26389`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1888 +#: ../../whatsnew/3.10.rst:1889 msgid "" ":mod:`atexit`: At Python exit, if a callback registered with :func:`atexit." "register` fails, its exception is now logged. Previously, only some " @@ -2823,7 +2825,7 @@ msgid "" "(Contributed by Victor Stinner in :issue:`42639`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1894 +#: ../../whatsnew/3.10.rst:1895 msgid "" ":class:`collections.abc.Callable` generic now flattens type parameters, " "similar to what :data:`typing.Callable` currently does. This means that " @@ -2836,7 +2838,7 @@ msgid "" "`42195`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1904 +#: ../../whatsnew/3.10.rst:1905 msgid "" ":meth:`socket.htons` and :meth:`socket.ntohs` now raise :exc:`OverflowError` " "instead of :exc:`DeprecationWarning` if the given parameter will not fit in " @@ -2844,41 +2846,41 @@ msgid "" "`42393`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1909 +#: ../../whatsnew/3.10.rst:1910 msgid "" "The ``loop`` parameter has been removed from most of :mod:`asyncio`\\ 's :" "doc:`high-level API <../library/asyncio-api-index>` following deprecation in " "Python 3.8." msgstr "" -#: ../../whatsnew/3.10.rst:1913 +#: ../../whatsnew/3.10.rst:1914 msgid "A coroutine that currently looks like this::" msgstr "" -#: ../../whatsnew/3.10.rst:1915 +#: ../../whatsnew/3.10.rst:1916 msgid "" "async def foo(loop):\n" " await asyncio.sleep(1, loop=loop)" msgstr "" -#: ../../whatsnew/3.10.rst:1918 +#: ../../whatsnew/3.10.rst:1919 msgid "Should be replaced with this::" msgstr "" -#: ../../whatsnew/3.10.rst:1920 +#: ../../whatsnew/3.10.rst:1921 msgid "" "async def foo():\n" " await asyncio.sleep(1)" msgstr "" -#: ../../whatsnew/3.10.rst:1923 +#: ../../whatsnew/3.10.rst:1924 msgid "" "If ``foo()`` was specifically designed *not* to run in the current thread's " "running event loop (e.g. running in another thread's event loop), consider " "using :func:`asyncio.run_coroutine_threadsafe` instead." msgstr "" -#: ../../whatsnew/3.10.rst:1930 +#: ../../whatsnew/3.10.rst:1931 msgid "" "The :data:`types.FunctionType` constructor now inherits the current builtins " "if the *globals* dictionary has no ``\"__builtins__\"`` key, rather than " @@ -2889,11 +2891,11 @@ msgid "" "`42990`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1939 +#: ../../whatsnew/3.10.rst:1940 msgid "Changes in the C API" msgstr "" -#: ../../whatsnew/3.10.rst:1941 +#: ../../whatsnew/3.10.rst:1942 msgid "" "The C API functions ``PyParser_SimpleParseStringFlags``, " "``PyParser_SimpleParseStringFlagsFilename``, " @@ -2902,31 +2904,31 @@ msgid "" "PEG parser." msgstr "" -#: ../../whatsnew/3.10.rst:1947 +#: ../../whatsnew/3.10.rst:1948 msgid "" "Source should be now be compiled directly to a code object using, for " "example, :c:func:`Py_CompileString`. The resulting code object can then be " "evaluated using, for example, :c:func:`PyEval_EvalCode`." msgstr "" -#: ../../whatsnew/3.10.rst:1951 +#: ../../whatsnew/3.10.rst:1952 msgid "Specifically:" msgstr "" -#: ../../whatsnew/3.10.rst:1953 +#: ../../whatsnew/3.10.rst:1954 msgid "" "A call to ``PyParser_SimpleParseStringFlags`` followed by ``PyNode_Compile`` " "can be replaced by calling :c:func:`Py_CompileString`." msgstr "" -#: ../../whatsnew/3.10.rst:1956 +#: ../../whatsnew/3.10.rst:1957 msgid "" "There is no direct replacement for ``PyParser_SimpleParseFileFlags``. To " "compile code from a ``FILE *`` argument, you will need to read the file in C " "and pass the resulting buffer to :c:func:`Py_CompileString`." msgstr "" -#: ../../whatsnew/3.10.rst:1960 +#: ../../whatsnew/3.10.rst:1961 msgid "" "To compile a file given a ``char *`` filename, explicitly open the file, " "read it and compile the result. One way to do this is using the :py:mod:`io` " @@ -2935,7 +2937,7 @@ msgid "" "(Declarations and error handling are omitted.) ::" msgstr "" -#: ../../whatsnew/3.10.rst:1966 +#: ../../whatsnew/3.10.rst:1967 msgid "" "io_module = Import_ImportModule(\"io\");\n" "fileobject = PyObject_CallMethod(io_module, \"open\", \"ss\", filename, " @@ -2946,7 +2948,7 @@ msgid "" "code = Py_CompileString(source_buf, filename, Py_file_input);" msgstr "" -#: ../../whatsnew/3.10.rst:1973 +#: ../../whatsnew/3.10.rst:1974 msgid "" "For ``FrameObject`` objects, the :attr:`~frame.f_lasti` member now " "represents a wordcode offset instead of a simple offset into the bytecode " @@ -2957,53 +2959,53 @@ msgid "" "`PyFrame_GetLineNumber` instead." msgstr "" -#: ../../whatsnew/3.10.rst:1981 +#: ../../whatsnew/3.10.rst:1982 msgid "CPython bytecode changes" msgstr "" -#: ../../whatsnew/3.10.rst:1983 +#: ../../whatsnew/3.10.rst:1984 msgid "" "The ``MAKE_FUNCTION`` instruction now accepts either a dict or a tuple of " "strings as the function's annotations. (Contributed by Yurii Karabas and " "Inada Naoki in :issue:`42202`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1988 +#: ../../whatsnew/3.10.rst:1989 msgid "Build Changes" msgstr "" -#: ../../whatsnew/3.10.rst:1990 +#: ../../whatsnew/3.10.rst:1991 msgid "" ":pep:`644`: Python now requires OpenSSL 1.1.1 or newer. OpenSSL 1.0.2 is no " "longer supported. (Contributed by Christian Heimes in :issue:`43669`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1994 +#: ../../whatsnew/3.10.rst:1995 msgid "" "The C99 functions :c:func:`snprintf` and :c:func:`vsnprintf` are now " "required to build Python. (Contributed by Victor Stinner in :issue:`36020`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1998 +#: ../../whatsnew/3.10.rst:1999 msgid "" ":mod:`sqlite3` requires SQLite 3.7.15 or higher. (Contributed by Sergey " "Fedoseev and Erlend E. Aasland in :issue:`40744` and :issue:`40810`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2001 +#: ../../whatsnew/3.10.rst:2002 msgid "" "The :mod:`atexit` module must now always be built as a built-in module. " "(Contributed by Victor Stinner in :issue:`42639`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2004 +#: ../../whatsnew/3.10.rst:2005 msgid "" "Add :option:`--disable-test-modules` option to the ``configure`` script: " "don't build nor install test modules. (Contributed by Xavier de Gaye, Thomas " "Petazzoni and Peixing Xin in :issue:`27640`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2008 +#: ../../whatsnew/3.10.rst:2009 msgid "" "Add :option:`--with-wheel-pkg-dir=PATH option <--with-wheel-pkg-dir>` to the " "``./configure`` script. If specified, the :mod:`ensurepip` module looks for " @@ -3012,7 +3014,7 @@ msgid "" "packages." msgstr "" -#: ../../whatsnew/3.10.rst:2014 +#: ../../whatsnew/3.10.rst:2015 msgid "" "Some Linux distribution packaging policies recommend against bundling " "dependencies. For example, Fedora installs wheel packages in the ``/usr/" @@ -3020,22 +3022,22 @@ msgid "" "_bundled`` package." msgstr "" -#: ../../whatsnew/3.10.rst:2019 +#: ../../whatsnew/3.10.rst:2020 msgid "(Contributed by Victor Stinner in :issue:`42856`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2021 +#: ../../whatsnew/3.10.rst:2022 msgid "" "Add a new :option:`configure --without-static-libpython option <--without-" "static-libpython>` to not build the ``libpythonMAJOR.MINOR.a`` static " "library and not install the ``python.o`` object file." msgstr "" -#: ../../whatsnew/3.10.rst:2025 +#: ../../whatsnew/3.10.rst:2026 msgid "(Contributed by Victor Stinner in :issue:`43103`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2027 +#: ../../whatsnew/3.10.rst:2028 msgid "" "The ``configure`` script now uses the ``pkg-config`` utility, if available, " "to detect the location of Tcl/Tk headers and libraries. As before, those " @@ -3044,7 +3046,7 @@ msgid "" "Stamatogiannakis in :issue:`42603`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2033 +#: ../../whatsnew/3.10.rst:2034 msgid "" "Add :option:`--with-openssl-rpath` option to ``configure`` script. The " "option simplifies building Python with a custom OpenSSL installation, e.g. " @@ -3052,15 +3054,15 @@ msgid "" "(Contributed by Christian Heimes in :issue:`43466`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2040 +#: ../../whatsnew/3.10.rst:2041 msgid "C API Changes" msgstr "" -#: ../../whatsnew/3.10.rst:2043 +#: ../../whatsnew/3.10.rst:2044 msgid "PEP 652: Maintaining the Stable ABI" msgstr "" -#: ../../whatsnew/3.10.rst:2045 +#: ../../whatsnew/3.10.rst:2046 msgid "" "The Stable ABI (Application Binary Interface) for extension modules or " "embedding Python is now explicitly defined. :ref:`stable` describes C API " @@ -3068,25 +3070,25 @@ msgid "" "ABI." msgstr "" -#: ../../whatsnew/3.10.rst:2050 +#: ../../whatsnew/3.10.rst:2051 msgid "(Contributed by Petr Viktorin in :pep:`652` and :issue:`43795`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2055 +#: ../../whatsnew/3.10.rst:2056 msgid "" "The result of :c:func:`PyNumber_Index` now always has exact type :class:" "`int`. Previously, the result could have been an instance of a subclass of " "``int``. (Contributed by Serhiy Storchaka in :issue:`40792`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2059 +#: ../../whatsnew/3.10.rst:2060 msgid "" "Add a new :c:member:`~PyConfig.orig_argv` member to the :c:type:`PyConfig` " "structure: the list of the original command line arguments passed to the " "Python executable. (Contributed by Victor Stinner in :issue:`23427`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2064 +#: ../../whatsnew/3.10.rst:2065 msgid "" "The :c:func:`PyDateTime_DATE_GET_TZINFO` and :c:func:" "`PyDateTime_TIME_GET_TZINFO` macros have been added for accessing the " @@ -3094,72 +3096,72 @@ msgid "" "time` objects. (Contributed by Zackery Spytz in :issue:`30155`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2070 +#: ../../whatsnew/3.10.rst:2071 msgid "" "Add a :c:func:`PyCodec_Unregister` function to unregister a codec search " "function. (Contributed by Hai Shi in :issue:`41842`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2074 +#: ../../whatsnew/3.10.rst:2075 msgid "" "The :c:func:`PyIter_Send` function was added to allow sending value into " "iterator without raising ``StopIteration`` exception. (Contributed by " "Vladimir Matveev in :issue:`41756`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2078 +#: ../../whatsnew/3.10.rst:2079 msgid "" "Add :c:func:`PyUnicode_AsUTF8AndSize` to the limited C API. (Contributed by " "Alex Gaynor in :issue:`41784`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2081 +#: ../../whatsnew/3.10.rst:2082 msgid "" "Add :c:func:`PyModule_AddObjectRef` function: similar to :c:func:" "`PyModule_AddObject` but don't steal a reference to the value on success. " "(Contributed by Victor Stinner in :issue:`1635741`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2086 +#: ../../whatsnew/3.10.rst:2087 msgid "" "Add :c:func:`Py_NewRef` and :c:func:`Py_XNewRef` functions to increment the " "reference count of an object and return the object. (Contributed by Victor " "Stinner in :issue:`42262`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2090 +#: ../../whatsnew/3.10.rst:2091 msgid "" "The :c:func:`PyType_FromSpecWithBases` and :c:func:" "`PyType_FromModuleAndSpec` functions now accept a single class as the " "*bases* argument. (Contributed by Serhiy Storchaka in :issue:`42423`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2094 +#: ../../whatsnew/3.10.rst:2095 msgid "" "The :c:func:`PyType_FromModuleAndSpec` function now accepts NULL ``tp_doc`` " "slot. (Contributed by Hai Shi in :issue:`41832`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2098 +#: ../../whatsnew/3.10.rst:2099 msgid "" "The :c:func:`PyType_GetSlot` function can accept :ref:`static types `. (Contributed by Hai Shi and Petr Viktorin in :issue:`41073`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2102 +#: ../../whatsnew/3.10.rst:2103 msgid "" "Add a new :c:func:`PySet_CheckExact` function to the C-API to check if an " "object is an instance of :class:`set` but not an instance of a subtype. " "(Contributed by Pablo Galindo in :issue:`43277`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2106 +#: ../../whatsnew/3.10.rst:2107 msgid "" "Add :c:func:`PyErr_SetInterruptEx` which allows passing a signal number to " "simulate. (Contributed by Antoine Pitrou in :issue:`43356`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2110 +#: ../../whatsnew/3.10.rst:2111 msgid "" "The limited C API is now supported if :ref:`Python is built in debug mode " "` (if the ``Py_DEBUG`` macro is defined). In the limited C API, " @@ -3172,14 +3174,14 @@ msgid "" "`36465`)." msgstr "" -#: ../../whatsnew/3.10.rst:2120 +#: ../../whatsnew/3.10.rst:2121 msgid "" "The limited C API is still not supported in the :option:`--with-trace-refs` " "special build (``Py_TRACE_REFS`` macro). (Contributed by Victor Stinner in :" "issue:`43688`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2124 +#: ../../whatsnew/3.10.rst:2125 msgid "" "Add the :c:func:`Py_Is(x, y) ` function to test if the *x* object is " "the *y* object, the same as ``x is y`` in Python. Add also the :c:func:" @@ -3189,7 +3191,7 @@ msgid "" "`43753`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2131 +#: ../../whatsnew/3.10.rst:2132 msgid "" "Add new functions to control the garbage collector from C code: :c:func:" "`PyGC_Enable()`, :c:func:`PyGC_Disable()`, :c:func:`PyGC_IsEnabled()`. These " @@ -3197,20 +3199,20 @@ msgid "" "collector from C code without having to import the :mod:`gc` module." msgstr "" -#: ../../whatsnew/3.10.rst:2138 +#: ../../whatsnew/3.10.rst:2139 msgid "" "Add a new :c:macro:`Py_TPFLAGS_DISALLOW_INSTANTIATION` type flag to disallow " "creating type instances. (Contributed by Victor Stinner in :issue:`43916`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2142 +#: ../../whatsnew/3.10.rst:2143 msgid "" "Add a new :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` type flag for creating " "immutable type objects: type attributes cannot be set nor deleted. " "(Contributed by Victor Stinner and Erlend E. Aasland in :issue:`43908`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2149 +#: ../../whatsnew/3.10.rst:2150 msgid "" "The ``PY_SSIZE_T_CLEAN`` macro must now be defined to use :c:func:" "`PyArg_ParseTuple` and :c:func:`Py_BuildValue` formats which use ``#``: " @@ -3219,7 +3221,7 @@ msgid "" "`40943`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2155 +#: ../../whatsnew/3.10.rst:2156 msgid "" "Since :c:func:`Py_REFCNT()` is changed to the inline static function, " "``Py_REFCNT(obj) = new_refcnt`` must be replaced with ``Py_SET_REFCNT(obj, " @@ -3227,25 +3229,25 @@ msgid "" "For backward compatibility, this macro can be used::" msgstr "" -#: ../../whatsnew/3.10.rst:2160 +#: ../../whatsnew/3.10.rst:2161 msgid "" "#if PY_VERSION_HEX < 0x030900A4\n" "# define Py_SET_REFCNT(obj, refcnt) ((Py_REFCNT(obj) = (refcnt)), (void)0)\n" "#endif" msgstr "" -#: ../../whatsnew/3.10.rst:2164 +#: ../../whatsnew/3.10.rst:2165 msgid "(Contributed by Victor Stinner in :issue:`39573`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2166 +#: ../../whatsnew/3.10.rst:2167 msgid "" "Calling :c:func:`PyDict_GetItem` without :term:`GIL` held had been allowed " "for historical reason. It is no longer allowed. (Contributed by Victor " "Stinner in :issue:`40839`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2170 +#: ../../whatsnew/3.10.rst:2171 msgid "" "``PyUnicode_FromUnicode(NULL, size)`` and " "``PyUnicode_FromStringAndSize(NULL, size)`` raise ``DeprecationWarning`` " @@ -3253,14 +3255,14 @@ msgid "" "data. (Contributed by Inada Naoki in :issue:`36346`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2175 +#: ../../whatsnew/3.10.rst:2176 msgid "" "The private ``_PyUnicode_Name_CAPI`` structure of the PyCapsule API " "``unicodedata.ucnhash_CAPI`` has been moved to the internal C API. " "(Contributed by Victor Stinner in :issue:`42157`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2179 +#: ../../whatsnew/3.10.rst:2180 msgid "" ":c:func:`Py_GetPath`, :c:func:`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, :c:" "func:`Py_GetProgramFullPath`, :c:func:`Py_GetPythonHome` and :c:func:" @@ -3270,7 +3272,7 @@ msgid "" "Stinner in :issue:`42260`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2186 +#: ../../whatsnew/3.10.rst:2187 msgid "" ":c:func:`PyList_SET_ITEM`, :c:func:`PyTuple_SET_ITEM` and :c:func:" "`PyCell_SET` macros can no longer be used as l-value or r-value. For " @@ -3280,7 +3282,7 @@ msgid "" "and Victor Stinner in :issue:`30459`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2193 +#: ../../whatsnew/3.10.rst:2194 msgid "" "The non-limited API files ``odictobject.h``, ``parser_interface.h``, " "``picklebufobject.h``, ``pyarena.h``, ``pyctype.h``, ``pydebug.h``, ``pyfpe." @@ -3291,7 +3293,7 @@ msgid "" "issue:`35134`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2201 +#: ../../whatsnew/3.10.rst:2202 msgid "" "Use the :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` type flag to create immutable " "type objects. Do not rely on :c:macro:`Py_TPFLAGS_HEAPTYPE` to decide if a " @@ -3300,85 +3302,85 @@ msgid "" "issue:`43908`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2207 +#: ../../whatsnew/3.10.rst:2208 msgid "" "The undocumented function ``Py_FrozenMain`` has been removed from the " "limited API. The function is mainly useful for custom builds of Python. " "(Contributed by Petr Viktorin in :issue:`26241`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2214 +#: ../../whatsnew/3.10.rst:2215 msgid "" "The ``PyUnicode_InternImmortal()`` function is now deprecated and will be " "removed in Python 3.12: use :c:func:`PyUnicode_InternInPlace` instead. " "(Contributed by Victor Stinner in :issue:`41692`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2222 +#: ../../whatsnew/3.10.rst:2223 msgid "" "Removed ``Py_UNICODE_str*`` functions manipulating ``Py_UNICODE*`` strings. " "(Contributed by Inada Naoki in :issue:`41123`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2225 +#: ../../whatsnew/3.10.rst:2226 msgid "" "``Py_UNICODE_strlen``: use :c:func:`PyUnicode_GetLength` or :c:macro:" "`PyUnicode_GET_LENGTH`" msgstr "" -#: ../../whatsnew/3.10.rst:2227 +#: ../../whatsnew/3.10.rst:2228 msgid "" "``Py_UNICODE_strcat``: use :c:func:`PyUnicode_CopyCharacters` or :c:func:" "`PyUnicode_FromFormat`" msgstr "" -#: ../../whatsnew/3.10.rst:2229 +#: ../../whatsnew/3.10.rst:2230 msgid "" "``Py_UNICODE_strcpy``, ``Py_UNICODE_strncpy``: use :c:func:" "`PyUnicode_CopyCharacters` or :c:func:`PyUnicode_Substring`" msgstr "" -#: ../../whatsnew/3.10.rst:2231 +#: ../../whatsnew/3.10.rst:2232 msgid "``Py_UNICODE_strcmp``: use :c:func:`PyUnicode_Compare`" msgstr "" -#: ../../whatsnew/3.10.rst:2232 +#: ../../whatsnew/3.10.rst:2233 msgid "``Py_UNICODE_strncmp``: use :c:func:`PyUnicode_Tailmatch`" msgstr "" -#: ../../whatsnew/3.10.rst:2233 +#: ../../whatsnew/3.10.rst:2234 msgid "" "``Py_UNICODE_strchr``, ``Py_UNICODE_strrchr``: use :c:func:" "`PyUnicode_FindChar`" msgstr "" -#: ../../whatsnew/3.10.rst:2236 +#: ../../whatsnew/3.10.rst:2237 msgid "" "Removed ``PyUnicode_GetMax()``. Please migrate to new (:pep:`393`) APIs. " "(Contributed by Inada Naoki in :issue:`41103`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2239 +#: ../../whatsnew/3.10.rst:2240 msgid "" "Removed ``PyLong_FromUnicode()``. Please migrate to :c:func:" "`PyLong_FromUnicodeObject`. (Contributed by Inada Naoki in :issue:`41103`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2242 +#: ../../whatsnew/3.10.rst:2243 msgid "" "Removed ``PyUnicode_AsUnicodeCopy()``. Please use :c:func:" "`PyUnicode_AsUCS4Copy` or :c:func:`PyUnicode_AsWideCharString` (Contributed " "by Inada Naoki in :issue:`41103`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2246 +#: ../../whatsnew/3.10.rst:2247 msgid "" "Removed ``_Py_CheckRecursionLimit`` variable: it has been replaced by " "``ceval.recursion_limit`` of the :c:type:`PyInterpreterState` structure. " "(Contributed by Victor Stinner in :issue:`41834`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2250 +#: ../../whatsnew/3.10.rst:2251 msgid "" "Removed undocumented macros ``Py_ALLOW_RECURSION`` and " "``Py_END_ALLOW_RECURSION`` and the ``recursion_critical`` field of the :c:" @@ -3386,14 +3388,14 @@ msgid "" "issue:`41936`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2255 +#: ../../whatsnew/3.10.rst:2256 msgid "" "Removed the undocumented ``PyOS_InitInterrupts()`` function. Initializing " "Python already implicitly installs signal handlers: see :c:member:`PyConfig." "install_signal_handlers`. (Contributed by Victor Stinner in :issue:`41713`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2260 +#: ../../whatsnew/3.10.rst:2261 msgid "" "Remove the ``PyAST_Validate()`` function. It is no longer possible to build " "a AST object (``mod_ty`` type) with the public C API. The function was " @@ -3401,48 +3403,48 @@ msgid "" "Stinner in :issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2265 +#: ../../whatsnew/3.10.rst:2266 msgid "Remove the ``symtable.h`` header file and the undocumented functions:" msgstr "" -#: ../../whatsnew/3.10.rst:2267 +#: ../../whatsnew/3.10.rst:2268 msgid "``PyST_GetScope()``" msgstr "" -#: ../../whatsnew/3.10.rst:2268 +#: ../../whatsnew/3.10.rst:2269 msgid "``PySymtable_Build()``" msgstr "" -#: ../../whatsnew/3.10.rst:2269 +#: ../../whatsnew/3.10.rst:2270 msgid "``PySymtable_BuildObject()``" msgstr "" -#: ../../whatsnew/3.10.rst:2270 +#: ../../whatsnew/3.10.rst:2271 msgid "``PySymtable_Free()``" msgstr "" -#: ../../whatsnew/3.10.rst:2271 +#: ../../whatsnew/3.10.rst:2272 msgid "``Py_SymtableString()``" msgstr "" -#: ../../whatsnew/3.10.rst:2272 +#: ../../whatsnew/3.10.rst:2273 msgid "``Py_SymtableStringObject()``" msgstr "" -#: ../../whatsnew/3.10.rst:2274 +#: ../../whatsnew/3.10.rst:2275 msgid "" "The ``Py_SymtableString()`` function was part the stable ABI by mistake but " "it could not be used, because the ``symtable.h`` header file was excluded " "from the limited C API." msgstr "" -#: ../../whatsnew/3.10.rst:2278 +#: ../../whatsnew/3.10.rst:2279 msgid "" "Use Python :mod:`symtable` module instead. (Contributed by Victor Stinner " "in :issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2281 +#: ../../whatsnew/3.10.rst:2282 msgid "" "Remove :c:func:`PyOS_ReadlineFunctionPointer` from the limited C API headers " "and from ``python3.dll``, the library that provides the stable ABI on " @@ -3450,7 +3452,7 @@ msgid "" "cannot be guaranteed. (Contributed by Petr Viktorin in :issue:`43868`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2287 +#: ../../whatsnew/3.10.rst:2288 msgid "" "Remove ``ast.h``, ``asdl.h``, and ``Python-ast.h`` header files. These " "functions were undocumented and excluded from the limited C API. Most names " @@ -3461,96 +3463,96 @@ msgid "" "(Contributed by Victor Stinner in :issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2295 +#: ../../whatsnew/3.10.rst:2296 msgid "" "Remove the compiler and parser functions using ``struct _mod`` type, because " "the public AST C API was removed:" msgstr "" -#: ../../whatsnew/3.10.rst:2298 +#: ../../whatsnew/3.10.rst:2299 msgid "``PyAST_Compile()``" msgstr "" -#: ../../whatsnew/3.10.rst:2299 +#: ../../whatsnew/3.10.rst:2300 msgid "``PyAST_CompileEx()``" msgstr "" -#: ../../whatsnew/3.10.rst:2300 +#: ../../whatsnew/3.10.rst:2301 msgid "``PyAST_CompileObject()``" msgstr "" -#: ../../whatsnew/3.10.rst:2301 +#: ../../whatsnew/3.10.rst:2302 msgid "``PyFuture_FromAST()``" msgstr "" -#: ../../whatsnew/3.10.rst:2302 +#: ../../whatsnew/3.10.rst:2303 msgid "``PyFuture_FromASTObject()``" msgstr "" -#: ../../whatsnew/3.10.rst:2303 +#: ../../whatsnew/3.10.rst:2304 msgid "``PyParser_ASTFromFile()``" msgstr "" -#: ../../whatsnew/3.10.rst:2304 +#: ../../whatsnew/3.10.rst:2305 msgid "``PyParser_ASTFromFileObject()``" msgstr "" -#: ../../whatsnew/3.10.rst:2305 +#: ../../whatsnew/3.10.rst:2306 msgid "``PyParser_ASTFromFilename()``" msgstr "" -#: ../../whatsnew/3.10.rst:2306 +#: ../../whatsnew/3.10.rst:2307 msgid "``PyParser_ASTFromString()``" msgstr "" -#: ../../whatsnew/3.10.rst:2307 +#: ../../whatsnew/3.10.rst:2308 msgid "``PyParser_ASTFromStringObject()``" msgstr "" -#: ../../whatsnew/3.10.rst:2309 +#: ../../whatsnew/3.10.rst:2310 msgid "" "These functions were undocumented and excluded from the limited C API. " "(Contributed by Victor Stinner in :issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2312 +#: ../../whatsnew/3.10.rst:2313 msgid "Remove the ``pyarena.h`` header file with functions:" msgstr "" -#: ../../whatsnew/3.10.rst:2314 +#: ../../whatsnew/3.10.rst:2315 msgid "``PyArena_New()``" msgstr "" -#: ../../whatsnew/3.10.rst:2315 +#: ../../whatsnew/3.10.rst:2316 msgid "``PyArena_Free()``" msgstr "" -#: ../../whatsnew/3.10.rst:2316 +#: ../../whatsnew/3.10.rst:2317 msgid "``PyArena_Malloc()``" msgstr "" -#: ../../whatsnew/3.10.rst:2317 +#: ../../whatsnew/3.10.rst:2318 msgid "``PyArena_AddPyObject()``" msgstr "" -#: ../../whatsnew/3.10.rst:2319 +#: ../../whatsnew/3.10.rst:2320 msgid "" "These functions were undocumented, excluded from the limited C API, and were " "only used internally by the compiler. (Contributed by Victor Stinner in :" "issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2323 +#: ../../whatsnew/3.10.rst:2324 msgid "" "The ``PyThreadState.use_tracing`` member has been removed to optimize " "Python. (Contributed by Mark Shannon in :issue:`43760`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2328 +#: ../../whatsnew/3.10.rst:2329 msgid "Notable security feature in 3.10.7" msgstr "" -#: ../../whatsnew/3.10.rst:2330 +#: ../../whatsnew/3.10.rst:2331 msgid "" "Converting between :class:`int` and :class:`str` in bases other than 2 " "(binary), 4, 8 (octal), 16 (hexadecimal), or 32 such as base 10 (decimal) " @@ -3563,11 +3565,11 @@ msgid "" "digits in string form." msgstr "" -#: ../../whatsnew/3.10.rst:2341 +#: ../../whatsnew/3.10.rst:2342 msgid "Notable security feature in 3.10.8" msgstr "" -#: ../../whatsnew/3.10.rst:2343 +#: ../../whatsnew/3.10.rst:2344 msgid "" "The deprecated :mod:`!mailcap` module now refuses to inject unsafe text " "(filenames, MIME types, parameters) into shell commands. Instead of using " @@ -3576,15 +3578,15 @@ msgid "" "`98966`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2350 +#: ../../whatsnew/3.10.rst:2351 msgid "Notable changes in 3.10.12" msgstr "" -#: ../../whatsnew/3.10.rst:2353 +#: ../../whatsnew/3.10.rst:2354 msgid "tarfile" msgstr "" -#: ../../whatsnew/3.10.rst:2355 +#: ../../whatsnew/3.10.rst:2356 msgid "" "The extraction methods in :mod:`tarfile`, and :func:`shutil.unpack_archive`, " "have a new a *filter* argument that allows limiting tar features than may be " diff --git a/whatsnew/3.11.po b/whatsnew/3.11.po index 3dd0117b8..f31186eda 100644 --- a/whatsnew/3.11.po +++ b/whatsnew/3.11.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2022-11-05 19:49+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -1683,7 +1684,7 @@ msgstr "" #: ../../whatsnew/3.11.rst:1294 msgid "" -"Resizing lists is streamlined for the common case, speeding up :meth:`list." +"Resizing lists is streamlined for the common case, speeding up :meth:`!list." "append` by ≈15% and simple :term:`list comprehension`\\s by up to 20-30% " "(Contributed by Dennis Sweeney in :gh:`91165`.)" msgstr "" diff --git a/whatsnew/3.12.po b/whatsnew/3.12.po index 9566822b0..330252630 100644 --- a/whatsnew/3.12.po +++ b/whatsnew/3.12.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2023-05-24 13:08+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -2446,6 +2447,7 @@ msgid "" "by Jiahao Li in :gh:`125746`.)" msgstr "" +#: ../../deprecations/c-api-pending-removal-in-3.16.rst:2 #: ../../deprecations/pending-removal-in-3.16.rst:2 msgid "Pending removal in Python 3.16" msgstr "" @@ -2996,7 +2998,7 @@ msgid "" "_clear_internal_caches` instead." msgstr "" -#: ../../whatsnew/3.12.rst:1357 ../../whatsnew/3.12.rst:2239 +#: ../../whatsnew/3.12.rst:1357 ../../whatsnew/3.12.rst:2241 msgid "Removed" msgstr "" @@ -4677,16 +4679,12 @@ msgid "" msgstr "" #: ../../deprecations/c-api-pending-removal-in-3.15.rst:4 -msgid "The bundled copy of ``libmpdecimal``." -msgstr "" - -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:5 msgid "" "The :c:func:`PyImport_ImportModuleNoBlock`: Use :c:func:" "`PyImport_ImportModule` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:7 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:6 msgid "" ":c:func:`PyWeakref_GetObject` and :c:func:`PyWeakref_GET_OBJECT`: Use :c:" "func:`PyWeakref_GetRef` instead. The `pythoncapi-compat project ` (:data:`sys.path`) instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:28 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:27 msgid "" ":c:func:`Py_GetPrefix`: Use :c:func:`PyConfig_Get(\"base_prefix\") " "` (:data:`sys.base_prefix`) instead. Use :c:func:" @@ -4742,7 +4740,7 @@ msgid "" "`virtual environments ` need to be handled." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:33 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:32 msgid "" ":c:func:`Py_GetExecPrefix`: Use :c:func:`PyConfig_Get(\"base_exec_prefix\") " "` (:data:`sys.base_exec_prefix`) instead. Use :c:func:" @@ -4750,176 +4748,176 @@ msgid "" "ref:`virtual environments ` need to be handled." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:39 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:38 msgid "" ":c:func:`Py_GetProgramFullPath`: Use :c:func:`PyConfig_Get(\"executable\") " "` (:data:`sys.executable`) instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:42 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:41 msgid "" ":c:func:`Py_GetProgramName`: Use :c:func:`PyConfig_Get(\"executable\") " "` (:data:`sys.executable`) instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:45 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:44 msgid "" ":c:func:`Py_GetPythonHome`: Use :c:func:`PyConfig_Get(\"home\") " "` or the :envvar:`PYTHONHOME` environment variable instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:49 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:48 msgid "" "The `pythoncapi-compat project `__ can be used to get :c:func:`PyConfig_Get` on Python 3.13 and older." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:53 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:52 msgid "" "Functions to configure Python's initialization, deprecated in Python 3.11:" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:55 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:54 msgid ":c:func:`!PySys_SetArgvEx()`: Set :c:member:`PyConfig.argv` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:57 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:56 msgid ":c:func:`!PySys_SetArgv()`: Set :c:member:`PyConfig.argv` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:59 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:58 msgid "" ":c:func:`!Py_SetProgramName()`: Set :c:member:`PyConfig.program_name` " "instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:61 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:60 msgid ":c:func:`!Py_SetPythonHome()`: Set :c:member:`PyConfig.home` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:63 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:62 msgid "" ":c:func:`PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!" "warnings.filters` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:66 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:65 msgid "" "The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:" "`PyConfig` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:69 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:68 msgid "Global configuration variables:" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:71 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:70 msgid "" ":c:var:`Py_DebugFlag`: Use :c:member:`PyConfig.parser_debug` or :c:func:" "`PyConfig_Get(\"parser_debug\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:74 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:73 msgid "" ":c:var:`Py_VerboseFlag`: Use :c:member:`PyConfig.verbose` or :c:func:" "`PyConfig_Get(\"verbose\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:77 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:76 msgid "" ":c:var:`Py_QuietFlag`: Use :c:member:`PyConfig.quiet` or :c:func:" "`PyConfig_Get(\"quiet\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:80 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:79 msgid "" ":c:var:`Py_InteractiveFlag`: Use :c:member:`PyConfig.interactive` or :c:func:" "`PyConfig_Get(\"interactive\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:83 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:82 msgid "" ":c:var:`Py_InspectFlag`: Use :c:member:`PyConfig.inspect` or :c:func:" "`PyConfig_Get(\"inspect\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:86 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:85 msgid "" ":c:var:`Py_OptimizeFlag`: Use :c:member:`PyConfig.optimization_level` or :c:" "func:`PyConfig_Get(\"optimization_level\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:89 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:88 msgid "" ":c:var:`Py_NoSiteFlag`: Use :c:member:`PyConfig.site_import` or :c:func:" "`PyConfig_Get(\"site_import\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:92 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:91 msgid "" ":c:var:`Py_BytesWarningFlag`: Use :c:member:`PyConfig.bytes_warning` or :c:" "func:`PyConfig_Get(\"bytes_warning\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:95 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:94 msgid "" ":c:var:`Py_FrozenFlag`: Use :c:member:`PyConfig.pathconfig_warnings` or :c:" "func:`PyConfig_Get(\"pathconfig_warnings\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:98 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:97 msgid "" ":c:var:`Py_IgnoreEnvironmentFlag`: Use :c:member:`PyConfig.use_environment` " "or :c:func:`PyConfig_Get(\"use_environment\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:101 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:100 msgid "" ":c:var:`Py_DontWriteBytecodeFlag`: Use :c:member:`PyConfig.write_bytecode` " "or :c:func:`PyConfig_Get(\"write_bytecode\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:104 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:103 msgid "" ":c:var:`Py_NoUserSiteDirectory`: Use :c:member:`PyConfig." "user_site_directory` or :c:func:`PyConfig_Get(\"user_site_directory\") " "` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:107 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:106 msgid "" ":c:var:`Py_UnbufferedStdioFlag`: Use :c:member:`PyConfig.buffered_stdio` or :" "c:func:`PyConfig_Get(\"buffered_stdio\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:110 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:109 msgid "" ":c:var:`Py_HashRandomizationFlag`: Use :c:member:`PyConfig.use_hash_seed` " "and :c:member:`PyConfig.hash_seed` or :c:func:`PyConfig_Get(\"hash_seed\") " "` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:114 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:113 msgid "" ":c:var:`Py_IsolatedFlag`: Use :c:member:`PyConfig.isolated` or :c:func:" "`PyConfig_Get(\"isolated\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:117 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:116 msgid "" ":c:var:`Py_LegacyWindowsFSEncodingFlag`: Use :c:member:`PyPreConfig." "legacy_windows_fs_encoding` or :c:func:" "`PyConfig_Get(\"legacy_windows_fs_encoding\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:120 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:119 msgid "" ":c:var:`Py_LegacyWindowsStdioFlag`: Use :c:member:`PyConfig." "legacy_windows_stdio` or :c:func:`PyConfig_Get(\"legacy_windows_stdio\") " "` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:123 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:122 msgid "" ":c:var:`!Py_FileSystemDefaultEncoding`, :c:var:`!" "Py_HasFileSystemDefaultEncoding`: Use :c:member:`PyConfig." @@ -4927,27 +4925,31 @@ msgid "" "` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:126 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:125 msgid "" ":c:var:`!Py_FileSystemDefaultEncodeErrors`: Use :c:member:`PyConfig." "filesystem_errors` or :c:func:`PyConfig_Get(\"filesystem_errors\") " "` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:129 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:128 msgid "" ":c:var:`!Py_UTF8Mode`: Use :c:member:`PyPreConfig.utf8_mode` or :c:func:" "`PyConfig_Get(\"utf8_mode\") ` instead. (see :c:func:" "`Py_PreInitialize`)" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:134 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:133 msgid "" "The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:" "`PyConfig` to set these options. Or :c:func:`PyConfig_Get` can be used to " "get these options at runtime." msgstr "" +#: ../../deprecations/c-api-pending-removal-in-3.16.rst:4 +msgid "The bundled copy of ``libmpdec``." +msgstr "" + #: ../../deprecations/c-api-pending-removal-in-future.rst:4 msgid "" "The following APIs are deprecated and will be removed, although there is " @@ -5042,54 +5044,54 @@ msgstr "" msgid ":c:func:`PyThread_ReInitTLS`: Unneeded since Python 3.7." msgstr "" -#: ../../whatsnew/3.12.rst:2241 +#: ../../whatsnew/3.12.rst:2243 msgid "" "Remove the :file:`token.h` header file. There was never any public tokenizer " "C API. The :file:`token.h` header file was only designed to be used by " "Python internals. (Contributed by Victor Stinner in :gh:`92651`.)" msgstr "" -#: ../../whatsnew/3.12.rst:2246 +#: ../../whatsnew/3.12.rst:2248 msgid "Legacy Unicode APIs have been removed. See :pep:`623` for detail." msgstr "" -#: ../../whatsnew/3.12.rst:2248 +#: ../../whatsnew/3.12.rst:2250 msgid ":c:macro:`!PyUnicode_WCHAR_KIND`" msgstr "" -#: ../../whatsnew/3.12.rst:2249 +#: ../../whatsnew/3.12.rst:2251 msgid ":c:func:`!PyUnicode_AS_UNICODE`" msgstr "" -#: ../../whatsnew/3.12.rst:2250 +#: ../../whatsnew/3.12.rst:2252 msgid ":c:func:`!PyUnicode_AsUnicode`" msgstr "" -#: ../../whatsnew/3.12.rst:2251 +#: ../../whatsnew/3.12.rst:2253 msgid ":c:func:`!PyUnicode_AsUnicodeAndSize`" msgstr "" -#: ../../whatsnew/3.12.rst:2252 +#: ../../whatsnew/3.12.rst:2254 msgid ":c:func:`!PyUnicode_AS_DATA`" msgstr "" -#: ../../whatsnew/3.12.rst:2253 +#: ../../whatsnew/3.12.rst:2255 msgid ":c:func:`!PyUnicode_FromUnicode`" msgstr "" -#: ../../whatsnew/3.12.rst:2254 +#: ../../whatsnew/3.12.rst:2256 msgid ":c:func:`!PyUnicode_GET_SIZE`" msgstr "" -#: ../../whatsnew/3.12.rst:2255 +#: ../../whatsnew/3.12.rst:2257 msgid ":c:func:`!PyUnicode_GetSize`" msgstr "" -#: ../../whatsnew/3.12.rst:2256 +#: ../../whatsnew/3.12.rst:2258 msgid ":c:func:`!PyUnicode_GET_DATA_SIZE`" msgstr "" -#: ../../whatsnew/3.12.rst:2258 +#: ../../whatsnew/3.12.rst:2260 msgid "" "Remove the ``PyUnicode_InternImmortal()`` function macro. (Contributed by " "Victor Stinner in :gh:`85858`.)" diff --git a/whatsnew/3.13.po b/whatsnew/3.13.po index f7344f804..31369edc8 100644 --- a/whatsnew/3.13.po +++ b/whatsnew/3.13.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2024-05-11 01:09+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -345,7 +346,7 @@ msgid "" "years of security fixes." msgstr "" -#: ../../whatsnew/3.13.rst:208 ../../whatsnew/3.13.rst:2030 +#: ../../whatsnew/3.13.rst:208 ../../whatsnew/3.13.rst:2046 msgid "New Features" msgstr "" @@ -1116,38 +1117,57 @@ msgid "" "(Contributed by Arthur Tacca and Jason Zhang in :gh:`115957`.)" msgstr "" -#: ../../whatsnew/3.13.rst:735 +#: ../../whatsnew/3.13.rst:733 +msgid "" +"The function and methods named ``create_task`` have received a new " +"``**kwargs`` argument that is passed through to the task constructor. This " +"change was accidentally added in 3.13.3, and broke the API contract for " +"custom task factories. Several third-party task factories implemented " +"workarounds for this. In 3.13.4 and later releases the old factory contract " +"is honored once again (until 3.14). To keep the workarounds working, the " +"extra ``**kwargs`` argument still allows passing additional keyword " +"arguments to :class:`~asyncio.Task` and to custom task factories." +msgstr "" + +#: ../../whatsnew/3.13.rst:744 +msgid "" +"This affects the following function and methods: :meth:`asyncio." +"create_task`, :meth:`asyncio.loop.create_task`, :meth:`asyncio.TaskGroup." +"create_task`. (Contributed by Thomas Grainger in :gh:`128307`.)" +msgstr "" + +#: ../../whatsnew/3.13.rst:751 msgid "base64" msgstr "" -#: ../../whatsnew/3.13.rst:737 +#: ../../whatsnew/3.13.rst:753 msgid "" "Add :func:`~base64.z85encode` and :func:`~base64.z85decode` functions for " "encoding :class:`bytes` as `Z85 data`_ and decoding Z85-encoded data to :" "class:`!bytes`. (Contributed by Matan Perelman in :gh:`75299`.)" msgstr "" -#: ../../whatsnew/3.13.rst:746 +#: ../../whatsnew/3.13.rst:762 msgid "compileall" msgstr "" -#: ../../whatsnew/3.13.rst:748 ../../whatsnew/3.13.rst:756 -#: ../../whatsnew/3.13.rst:1015 +#: ../../whatsnew/3.13.rst:764 ../../whatsnew/3.13.rst:772 +#: ../../whatsnew/3.13.rst:1031 msgid "" "The default number of worker threads and processes is now selected using :" "func:`os.process_cpu_count` instead of :func:`os.cpu_count`. (Contributed by " "Victor Stinner in :gh:`109649`.)" msgstr "" -#: ../../whatsnew/3.13.rst:754 +#: ../../whatsnew/3.13.rst:770 msgid "concurrent.futures" msgstr "" -#: ../../whatsnew/3.13.rst:762 ../../whatsnew/3.13.rst:1664 +#: ../../whatsnew/3.13.rst:778 ../../whatsnew/3.13.rst:1680 msgid "configparser" msgstr "" -#: ../../whatsnew/3.13.rst:764 +#: ../../whatsnew/3.13.rst:780 msgid "" ":class:`~configparser.ConfigParser` now has support for unnamed sections, " "which allows for top-level key-value pairs. This can be enabled with the new " @@ -1155,11 +1175,11 @@ msgid "" "gh:`66449`.)" msgstr "" -#: ../../whatsnew/3.13.rst:771 +#: ../../whatsnew/3.13.rst:787 msgid "copy" msgstr "" -#: ../../whatsnew/3.13.rst:773 +#: ../../whatsnew/3.13.rst:789 msgid "" "The new :func:`~copy.replace` function and the :meth:`replace protocol " "` make creating modified copies of objects much simpler. " @@ -1168,43 +1188,43 @@ msgid "" "protocol:" msgstr "" -#: ../../whatsnew/3.13.rst:779 +#: ../../whatsnew/3.13.rst:795 msgid ":func:`collections.namedtuple`" msgstr "" -#: ../../whatsnew/3.13.rst:780 +#: ../../whatsnew/3.13.rst:796 msgid ":class:`dataclasses.dataclass`" msgstr "" -#: ../../whatsnew/3.13.rst:781 +#: ../../whatsnew/3.13.rst:797 msgid "" ":class:`datetime.datetime`, :class:`datetime.date`, :class:`datetime.time`" msgstr "" -#: ../../whatsnew/3.13.rst:782 +#: ../../whatsnew/3.13.rst:798 msgid ":class:`inspect.Signature`, :class:`inspect.Parameter`" msgstr "" -#: ../../whatsnew/3.13.rst:783 +#: ../../whatsnew/3.13.rst:799 msgid ":class:`types.SimpleNamespace`" msgstr "" -#: ../../whatsnew/3.13.rst:784 +#: ../../whatsnew/3.13.rst:800 msgid ":ref:`code objects `" msgstr "" -#: ../../whatsnew/3.13.rst:786 +#: ../../whatsnew/3.13.rst:802 msgid "" "Any user-defined class can also support :func:`copy.replace` by defining " "the :meth:`~object.__replace__` method. (Contributed by Serhiy Storchaka in :" "gh:`108751`.)" msgstr "" -#: ../../whatsnew/3.13.rst:792 +#: ../../whatsnew/3.13.rst:808 msgid "ctypes" msgstr "" -#: ../../whatsnew/3.13.rst:794 +#: ../../whatsnew/3.13.rst:810 msgid "" "As a consequence of necessary internal refactoring, initialization of " "internal metaclasses now happens in ``__init__`` rather than in ``__new__``. " @@ -1212,25 +1232,25 @@ msgid "" "custom initialization. Generally:" msgstr "" -#: ../../whatsnew/3.13.rst:800 +#: ../../whatsnew/3.13.rst:816 msgid "" "Custom logic that was done in ``__new__`` after calling ``super().__new__`` " "should be moved to ``__init__``." msgstr "" -#: ../../whatsnew/3.13.rst:802 +#: ../../whatsnew/3.13.rst:818 msgid "" "To create a class, call the metaclass, not only the metaclass's ``__new__`` " "method." msgstr "" -#: ../../whatsnew/3.13.rst:805 +#: ../../whatsnew/3.13.rst:821 msgid "" "See :gh:`124520` for discussion and links to changes in some affected " "projects." msgstr "" -#: ../../whatsnew/3.13.rst:808 +#: ../../whatsnew/3.13.rst:824 msgid "" ":class:`ctypes.Structure` objects have a new :attr:`~ctypes.Structure." "_align_` attribute which allows the alignment of the structure being packed " @@ -1238,29 +1258,29 @@ msgid "" "in :gh:`112433`)" msgstr "" -#: ../../whatsnew/3.13.rst:814 +#: ../../whatsnew/3.13.rst:830 msgid "dbm" msgstr "" -#: ../../whatsnew/3.13.rst:816 +#: ../../whatsnew/3.13.rst:832 msgid "" "Add :mod:`dbm.sqlite3`, a new module which implements an SQLite backend, and " "make it the default :mod:`!dbm` backend. (Contributed by Raymond Hettinger " "and Erlend E. Aasland in :gh:`100414`.)" msgstr "" -#: ../../whatsnew/3.13.rst:820 +#: ../../whatsnew/3.13.rst:836 msgid "" "Allow removing all items from the database through the new :meth:`.gdbm." "clear` and :meth:`.ndbm.clear` methods. (Contributed by Donghee Na in :gh:" "`107122`.)" msgstr "" -#: ../../whatsnew/3.13.rst:826 +#: ../../whatsnew/3.13.rst:842 msgid "dis" msgstr "" -#: ../../whatsnew/3.13.rst:828 +#: ../../whatsnew/3.13.rst:844 msgid "" "Change the output of :mod:`dis` module functions to show logical labels for " "jump targets and exception handlers, rather than offsets. The offsets can be " @@ -1268,7 +1288,7 @@ msgid "" "the *show_offsets* argument. (Contributed by Irit Katriel in :gh:`112137`.)" msgstr "" -#: ../../whatsnew/3.13.rst:835 +#: ../../whatsnew/3.13.rst:851 msgid "" ":meth:`~dis.get_instructions` no longer represents cache entries as separate " "instructions. Instead, it returns them as part of the :class:`~dis." @@ -1277,11 +1297,11 @@ msgid "" "(Contributed by Irit Katriel in :gh:`112962`.)" msgstr "" -#: ../../whatsnew/3.13.rst:847 +#: ../../whatsnew/3.13.rst:863 msgid "doctest" msgstr "" -#: ../../whatsnew/3.13.rst:849 +#: ../../whatsnew/3.13.rst:865 msgid "" ":mod:`doctest` output is now colored by default. This can be controlled via " "the new :envvar:`PYTHON_COLORS` environment variable as well as the " @@ -1290,18 +1310,18 @@ msgid "" "`117225`.)" msgstr "" -#: ../../whatsnew/3.13.rst:856 +#: ../../whatsnew/3.13.rst:872 msgid "" "The :meth:`.DocTestRunner.run` method now counts the number of skipped " "tests. Add the :attr:`.DocTestRunner.skips` and :attr:`.TestResults.skipped` " "attributes. (Contributed by Victor Stinner in :gh:`108794`.)" msgstr "" -#: ../../whatsnew/3.13.rst:862 +#: ../../whatsnew/3.13.rst:878 msgid "email" msgstr "" -#: ../../whatsnew/3.13.rst:864 +#: ../../whatsnew/3.13.rst:880 msgid "" "Headers with embedded newlines are now quoted on output. The :mod:`~email." "generator` will now refuse to serialize (write) headers that are improperly " @@ -1311,7 +1331,7 @@ msgid "" "Bloemsaat and Petr Viktorin in :gh:`121650`.)" msgstr "" -#: ../../whatsnew/3.13.rst:872 +#: ../../whatsnew/3.13.rst:888 msgid "" ":func:`~email.utils.getaddresses` and :func:`~email.utils.parseaddr` now " "return ``('', '')`` pairs in more situations where invalid email addresses " @@ -1323,21 +1343,21 @@ msgid "" "Stinner for :gh:`102988` to improve the :cve:`2023-27043` fix.)" msgstr "" -#: ../../whatsnew/3.13.rst:884 +#: ../../whatsnew/3.13.rst:900 msgid "enum" msgstr "" -#: ../../whatsnew/3.13.rst:886 +#: ../../whatsnew/3.13.rst:902 msgid "" ":class:`~enum.EnumDict` has been made public to better support subclassing :" "class:`~enum.EnumType`." msgstr "" -#: ../../whatsnew/3.13.rst:891 +#: ../../whatsnew/3.13.rst:907 msgid "fractions" msgstr "" -#: ../../whatsnew/3.13.rst:893 +#: ../../whatsnew/3.13.rst:909 msgid "" ":class:`~fractions.Fraction` objects now support the standard :ref:`format " "specification mini-language ` rules for fill, alignment, sign " @@ -1345,22 +1365,22 @@ msgid "" "`111320`.)" msgstr "" -#: ../../whatsnew/3.13.rst:900 +#: ../../whatsnew/3.13.rst:916 msgid "glob" msgstr "" -#: ../../whatsnew/3.13.rst:902 +#: ../../whatsnew/3.13.rst:918 msgid "" "Add :func:`~glob.translate`, a function to convert a path specification with " "shell-style wildcards to a regular expression. (Contributed by Barney Gale " "in :gh:`72904`.)" msgstr "" -#: ../../whatsnew/3.13.rst:908 +#: ../../whatsnew/3.13.rst:924 msgid "importlib" msgstr "" -#: ../../whatsnew/3.13.rst:910 +#: ../../whatsnew/3.13.rst:926 msgid "" "The following functions in :mod:`importlib.resources` now allow accessing a " "directory (or tree) of resources, using multiple positional arguments (the " @@ -1368,37 +1388,37 @@ msgid "" "keyword-only):" msgstr "" -#: ../../whatsnew/3.13.rst:915 +#: ../../whatsnew/3.13.rst:931 msgid ":func:`~importlib.resources.is_resource`" msgstr "" -#: ../../whatsnew/3.13.rst:916 +#: ../../whatsnew/3.13.rst:932 msgid ":func:`~importlib.resources.open_binary`" msgstr "" -#: ../../whatsnew/3.13.rst:917 +#: ../../whatsnew/3.13.rst:933 msgid ":func:`~importlib.resources.open_text`" msgstr "" -#: ../../whatsnew/3.13.rst:918 +#: ../../whatsnew/3.13.rst:934 msgid ":func:`~importlib.resources.path`" msgstr "" -#: ../../whatsnew/3.13.rst:919 +#: ../../whatsnew/3.13.rst:935 msgid ":func:`~importlib.resources.read_binary`" msgstr "" -#: ../../whatsnew/3.13.rst:920 +#: ../../whatsnew/3.13.rst:936 msgid ":func:`~importlib.resources.read_text`" msgstr "" -#: ../../whatsnew/3.13.rst:922 +#: ../../whatsnew/3.13.rst:938 msgid "" "These functions are no longer deprecated and are not scheduled for removal. " "(Contributed by Petr Viktorin in :gh:`116608`.)" msgstr "" -#: ../../whatsnew/3.13.rst:925 +#: ../../whatsnew/3.13.rst:941 msgid "" ":func:`~importlib.resources.contents` remains deprecated in favor of the " "fully-featured :class:`~importlib.resources.abc.Traversable` API. However, " @@ -1406,11 +1426,11 @@ msgid "" "`116608`.)" msgstr "" -#: ../../whatsnew/3.13.rst:932 +#: ../../whatsnew/3.13.rst:948 msgid "io" msgstr "" -#: ../../whatsnew/3.13.rst:934 +#: ../../whatsnew/3.13.rst:950 msgid "" "The :class:`~io.IOBase` finalizer now logs any errors raised by the :meth:" "`~io.IOBase.close` method with :data:`sys.unraisablehook`. Previously, " @@ -1419,17 +1439,17 @@ msgid "" "build>`. (Contributed by Victor Stinner in :gh:`62948`.)" msgstr "" -#: ../../whatsnew/3.13.rst:943 +#: ../../whatsnew/3.13.rst:959 msgid "ipaddress" msgstr "" -#: ../../whatsnew/3.13.rst:945 +#: ../../whatsnew/3.13.rst:961 msgid "" "Add the :attr:`.IPv4Address.ipv6_mapped` property, which returns the IPv4-" "mapped IPv6 address. (Contributed by Charles Machalow in :gh:`109466`.)" msgstr "" -#: ../../whatsnew/3.13.rst:949 +#: ../../whatsnew/3.13.rst:965 msgid "" "Fix ``is_global`` and ``is_private`` behavior in :class:`~ipaddress." "IPv4Address`, :class:`~ipaddress.IPv6Address`, :class:`~ipaddress." @@ -1437,22 +1457,22 @@ msgid "" "Stasiak in :gh:`113171`.)" msgstr "" -#: ../../whatsnew/3.13.rst:956 +#: ../../whatsnew/3.13.rst:972 msgid "itertools" msgstr "" -#: ../../whatsnew/3.13.rst:958 +#: ../../whatsnew/3.13.rst:974 msgid "" ":func:`~itertools.batched` has a new *strict* parameter, which raises a :exc:" "`ValueError` if the final batch is shorter than the specified batch size. " "(Contributed by Raymond Hettinger in :gh:`113202`.)" msgstr "" -#: ../../whatsnew/3.13.rst:965 +#: ../../whatsnew/3.13.rst:981 msgid "marshal" msgstr "" -#: ../../whatsnew/3.13.rst:967 +#: ../../whatsnew/3.13.rst:983 msgid "" "Add the *allow_code* parameter in module functions. Passing " "``allow_code=False`` prevents serialization and de-serialization of code " @@ -1460,11 +1480,11 @@ msgid "" "Serhiy Storchaka in :gh:`113626`.)" msgstr "" -#: ../../whatsnew/3.13.rst:974 +#: ../../whatsnew/3.13.rst:990 msgid "math" msgstr "" -#: ../../whatsnew/3.13.rst:976 +#: ../../whatsnew/3.13.rst:992 msgid "" "The new function :func:`~math.fma` performs fused multiply-add operations. " "This computes ``x * y + z`` with only a single round, and so avoids any " @@ -1474,11 +1494,11 @@ msgid "" "Stinner in :gh:`73468`.)" msgstr "" -#: ../../whatsnew/3.13.rst:986 +#: ../../whatsnew/3.13.rst:1002 msgid "mimetypes" msgstr "" -#: ../../whatsnew/3.13.rst:988 +#: ../../whatsnew/3.13.rst:1004 msgid "" "Add the :func:`~mimetypes.guess_file_type` function to guess a MIME type " "from a filesystem path. Using paths with :func:`~mimetypes.guess_type` is " @@ -1486,18 +1506,18 @@ msgid "" "`66543`.)" msgstr "" -#: ../../whatsnew/3.13.rst:995 +#: ../../whatsnew/3.13.rst:1011 msgid "mmap" msgstr "" -#: ../../whatsnew/3.13.rst:997 +#: ../../whatsnew/3.13.rst:1013 msgid "" ":class:`~mmap.mmap` is now protected from crashing on Windows when the " "mapped memory is inaccessible due to file system errors or access " "violations. (Contributed by Jannis Weigend in :gh:`118209`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1001 +#: ../../whatsnew/3.13.rst:1017 msgid "" ":class:`~mmap.mmap` has a new :meth:`~mmap.mmap.seekable` method that can be " "used when a seekable file-like object is required. The :meth:`~mmap.mmap." @@ -1505,7 +1525,7 @@ msgid "" "Na and Sylvie Liberman in :gh:`111835`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1006 +#: ../../whatsnew/3.13.rst:1022 msgid "" "The new UNIX-only *trackfd* parameter for :class:`~mmap.mmap` controls file " "descriptor duplication; if false, the file descriptor specified by *fileno* " @@ -1513,22 +1533,22 @@ msgid "" "gh:`78502`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1013 +#: ../../whatsnew/3.13.rst:1029 msgid "multiprocessing" msgstr "" -#: ../../whatsnew/3.13.rst:1021 +#: ../../whatsnew/3.13.rst:1037 msgid "os" msgstr "" -#: ../../whatsnew/3.13.rst:1023 +#: ../../whatsnew/3.13.rst:1039 msgid "" "Add :func:`~os.process_cpu_count` function to get the number of logical CPU " "cores usable by the calling thread of the current process. (Contributed by " "Victor Stinner in :gh:`109649`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1027 +#: ../../whatsnew/3.13.rst:1043 msgid "" ":func:`~os.cpu_count` and :func:`~os.process_cpu_count` can be overridden " "through the new environment variable :envvar:`PYTHON_CPU_COUNT` or the new " @@ -1538,7 +1558,7 @@ msgid "" "Na in :gh:`109595`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1035 +#: ../../whatsnew/3.13.rst:1051 msgid "" "Add a :ref:`low level interface ` to Linux's :manpage:`timer " "file descriptors ` via :func:`~os.timerfd_create`, :func:" @@ -1549,7 +1569,7 @@ msgid "" "in :gh:`108277`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1044 +#: ../../whatsnew/3.13.rst:1060 msgid "" ":func:`~os.lchmod` and the *follow_symlinks* argument of :func:`~os.chmod` " "are both now available on Windows. Note that the default value of " @@ -1557,14 +1577,14 @@ msgid "" "by Serhiy Storchaka in :gh:`59616`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1050 +#: ../../whatsnew/3.13.rst:1066 msgid "" ":func:`~os.fchmod` and support for file descriptors in :func:`~os.chmod` are " "both now available on Windows. (Contributed by Serhiy Storchaka in :gh:" "`113191`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1054 +#: ../../whatsnew/3.13.rst:1070 msgid "" "On Windows, :func:`~os.mkdir` and :func:`~os.makedirs` now support passing a " "*mode* value of ``0o700`` to apply access control to the new directory. This " @@ -1573,14 +1593,14 @@ msgid "" "Steve Dower in :gh:`118486`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1061 +#: ../../whatsnew/3.13.rst:1077 msgid "" ":func:`~os.posix_spawn` now accepts ``None`` for the *env* argument, which " "makes the newly spawned process use the current process environment. " "(Contributed by Jakub Kulik in :gh:`113119`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1065 +#: ../../whatsnew/3.13.rst:1081 msgid "" ":func:`~os.posix_spawn` can now use the :const:`~os.POSIX_SPAWN_CLOSEFROM` " "attribute in the *file_actions* parameter on platforms that support :c:func:" @@ -1588,76 +1608,76 @@ msgid "" "gh:`113117`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1072 +#: ../../whatsnew/3.13.rst:1088 msgid "os.path" msgstr "" -#: ../../whatsnew/3.13.rst:1074 +#: ../../whatsnew/3.13.rst:1090 msgid "" "Add :func:`~os.path.isreserved` to check if a path is reserved on the " "current system. This function is only available on Windows. (Contributed by " "Barney Gale in :gh:`88569`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1079 +#: ../../whatsnew/3.13.rst:1095 msgid "" "On Windows, :func:`~os.path.isabs` no longer considers paths starting with " "exactly one slash (``\\`` or ``/``) to be absolute. (Contributed by Barney " "Gale and Jon Foster in :gh:`44626`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1083 +#: ../../whatsnew/3.13.rst:1099 msgid "" ":func:`~os.path.realpath` now resolves MS-DOS style file names even if the " "file is not accessible. (Contributed by Moonsik Park in :gh:`82367`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1089 ../../whatsnew/3.13.rst:1720 +#: ../../whatsnew/3.13.rst:1105 ../../whatsnew/3.13.rst:1736 msgid "pathlib" msgstr "" -#: ../../whatsnew/3.13.rst:1091 +#: ../../whatsnew/3.13.rst:1107 msgid "" "Add :exc:`~pathlib.UnsupportedOperation`, which is raised instead of :exc:" "`NotImplementedError` when a path operation isn't supported. (Contributed by " "Barney Gale in :gh:`89812`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1095 +#: ../../whatsnew/3.13.rst:1111 msgid "" "Add a new constructor for creating :class:`~pathlib.Path` objects from " "'file' URIs (``file:///``), :meth:`.Path.from_uri`. (Contributed by Barney " "Gale in :gh:`107465`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1099 +#: ../../whatsnew/3.13.rst:1115 msgid "" "Add :meth:`.PurePath.full_match` for matching paths with shell-style " "wildcards, including the recursive wildcard \"``**``\". (Contributed by " "Barney Gale in :gh:`73435`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1103 +#: ../../whatsnew/3.13.rst:1119 msgid "" "Add the :attr:`.PurePath.parser` class attribute to store the implementation " "of :mod:`os.path` used for low-level path parsing and joining. This will be " "either :mod:`!posixpath` or :mod:`!ntpath`." msgstr "" -#: ../../whatsnew/3.13.rst:1108 +#: ../../whatsnew/3.13.rst:1124 msgid "" "Add *recurse_symlinks* keyword-only argument to :meth:`.Path.glob` and :meth:" "`~pathlib.Path.rglob`. (Contributed by Barney Gale in :gh:`77609`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1112 +#: ../../whatsnew/3.13.rst:1128 msgid "" ":meth:`.Path.glob` and :meth:`~pathlib.Path.rglob` now return files and " "directories when given a pattern that ends with \"``**``\". Previously, only " "directories were returned. (Contributed by Barney Gale in :gh:`70303`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1117 +#: ../../whatsnew/3.13.rst:1133 msgid "" "Add the *follow_symlinks* keyword-only argument to :meth:`Path.is_file " "`, :meth:`Path.is_dir `, :meth:`." @@ -1665,11 +1685,11 @@ msgid "" "`105793` and Kamil Turek in :gh:`107962`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1125 +#: ../../whatsnew/3.13.rst:1141 msgid "pdb" msgstr "" -#: ../../whatsnew/3.13.rst:1127 +#: ../../whatsnew/3.13.rst:1143 msgid "" ":func:`breakpoint` and :func:`~pdb.set_trace` now enter the debugger " "immediately rather than on the next line of code to be executed. This change " @@ -1678,20 +1698,20 @@ msgid "" "Gao in :gh:`118579`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1133 +#: ../../whatsnew/3.13.rst:1149 msgid "" "``sys.path[0]`` is no longer replaced by the directory of the script being " "debugged when :attr:`sys.flags.safe_path` is set. (Contributed by Tian Gao " "and Christian Walther in :gh:`111762`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1137 +#: ../../whatsnew/3.13.rst:1153 msgid "" ":mod:`zipapp` is now supported as a debugging target. (Contributed by Tian " "Gao in :gh:`118501`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1140 +#: ../../whatsnew/3.13.rst:1156 msgid "" "Add ability to move between chained exceptions during post-mortem debugging " "in :func:`~pdb.pm` using the new :pdbcmd:`exceptions [exc_number] " @@ -1699,101 +1719,101 @@ msgid "" "`106676`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1145 +#: ../../whatsnew/3.13.rst:1161 msgid "" "Expressions and statements whose prefix is a pdb command are now correctly " "identified and executed. (Contributed by Tian Gao in :gh:`108464`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1151 +#: ../../whatsnew/3.13.rst:1167 msgid "queue" msgstr "" -#: ../../whatsnew/3.13.rst:1153 +#: ../../whatsnew/3.13.rst:1169 msgid "" "Add :meth:`Queue.shutdown ` and :exc:`~queue.ShutDown` " "to manage queue termination. (Contributed by Laurie Opperman and Yves Duprat " "in :gh:`104750`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1159 +#: ../../whatsnew/3.13.rst:1175 msgid "random" msgstr "" -#: ../../whatsnew/3.13.rst:1161 +#: ../../whatsnew/3.13.rst:1177 msgid "" "Add a :ref:`command-line interface `. (Contributed by Hugo van " "Kemenade in :gh:`118131`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1166 ../../whatsnew/3.13.rst:1728 +#: ../../whatsnew/3.13.rst:1182 ../../whatsnew/3.13.rst:1744 msgid "re" msgstr "" -#: ../../whatsnew/3.13.rst:1168 +#: ../../whatsnew/3.13.rst:1184 msgid "" "Rename :exc:`!re.error` to :exc:`~re.PatternError` for improved clarity. :" "exc:`!re.error` is kept for backward compatibility." msgstr "" -#: ../../whatsnew/3.13.rst:1173 +#: ../../whatsnew/3.13.rst:1189 msgid "shutil" msgstr "" -#: ../../whatsnew/3.13.rst:1175 +#: ../../whatsnew/3.13.rst:1191 msgid "" "Support the *dir_fd* and *follow_symlinks* keyword arguments in :func:" "`~shutil.chown`. (Contributed by Berker Peksag and Tahia K in :gh:`62308`)" msgstr "" -#: ../../whatsnew/3.13.rst:1181 +#: ../../whatsnew/3.13.rst:1197 msgid "site" msgstr "" -#: ../../whatsnew/3.13.rst:1183 +#: ../../whatsnew/3.13.rst:1199 msgid "" ":file:`.pth` files are now decoded using UTF-8 first, and then with the :" "term:`locale encoding` if UTF-8 decoding fails. (Contributed by Inada Naoki " "in :gh:`117802`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1189 +#: ../../whatsnew/3.13.rst:1205 msgid "sqlite3" msgstr "" -#: ../../whatsnew/3.13.rst:1191 +#: ../../whatsnew/3.13.rst:1207 msgid "" "A :exc:`ResourceWarning` is now emitted if a :class:`~sqlite3.Connection` " "object is not :meth:`closed ` explicitly. " "(Contributed by Erlend E. Aasland in :gh:`105539`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1195 +#: ../../whatsnew/3.13.rst:1211 msgid "" "Add the *filter* keyword-only parameter to :meth:`.Connection.iterdump` for " "filtering database objects to dump. (Contributed by Mariusz Felisiak in :gh:" "`91602`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1201 +#: ../../whatsnew/3.13.rst:1217 msgid "ssl" msgstr "" -#: ../../whatsnew/3.13.rst:1203 +#: ../../whatsnew/3.13.rst:1219 msgid "" "The :func:`~ssl.create_default_context` API now includes :data:`~ssl." "VERIFY_X509_PARTIAL_CHAIN` and :data:`~ssl.VERIFY_X509_STRICT` in its " "default flags." msgstr "" -#: ../../whatsnew/3.13.rst:1209 +#: ../../whatsnew/3.13.rst:1225 msgid "" ":data:`~ssl.VERIFY_X509_STRICT` may reject pre-:rfc:`5280` or malformed " "certificates that the underlying OpenSSL implementation might otherwise " "accept. Whilst disabling this is not recommended, you can do so using:" msgstr "" -#: ../../whatsnew/3.13.rst:1214 +#: ../../whatsnew/3.13.rst:1230 msgid "" "import ssl\n" "\n" @@ -1801,15 +1821,15 @@ msgid "" "ctx.verify_flags &= ~ssl.VERIFY_X509_STRICT" msgstr "" -#: ../../whatsnew/3.13.rst:1221 +#: ../../whatsnew/3.13.rst:1237 msgid "(Contributed by William Woodruff in :gh:`112389`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1225 +#: ../../whatsnew/3.13.rst:1241 msgid "statistics" msgstr "" -#: ../../whatsnew/3.13.rst:1227 +#: ../../whatsnew/3.13.rst:1243 msgid "" "Add :func:`~statistics.kde` for kernel density estimation. This makes it " "possible to estimate a continuous probability density function from a fixed " @@ -1817,24 +1837,24 @@ msgid "" "`115863`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1232 +#: ../../whatsnew/3.13.rst:1248 msgid "" "Add :func:`~statistics.kde_random` for sampling from an estimated " "probability density function created by :func:`~statistics.kde`. " "(Contributed by Raymond Hettinger in :gh:`115863`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1240 +#: ../../whatsnew/3.13.rst:1256 msgid "subprocess" msgstr "" -#: ../../whatsnew/3.13.rst:1242 +#: ../../whatsnew/3.13.rst:1258 msgid "" "The :mod:`subprocess` module now uses the :func:`~os.posix_spawn` function " "in more situations." msgstr "" -#: ../../whatsnew/3.13.rst:1245 +#: ../../whatsnew/3.13.rst:1261 msgid "" "Notably, when *close_fds* is ``True`` (the default), :func:`~os.posix_spawn` " "will be used when the C library provides :c:func:`!" @@ -1843,7 +1863,7 @@ msgid "" "existing Linux :c:func:`!vfork` based code." msgstr "" -#: ../../whatsnew/3.13.rst:1252 +#: ../../whatsnew/3.13.rst:1268 msgid "" "A private control knob :attr:`!subprocess._USE_POSIX_SPAWN` can be set to " "``False`` if you need to force :mod:`subprocess` to never use :func:`~os." @@ -1853,22 +1873,22 @@ msgid "" "`113117`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1262 +#: ../../whatsnew/3.13.rst:1278 msgid "sys" msgstr "" -#: ../../whatsnew/3.13.rst:1264 +#: ../../whatsnew/3.13.rst:1280 msgid "" "Add the :func:`~sys._is_interned` function to test if a string was interned. " "This function is not guaranteed to exist in all implementations of Python. " "(Contributed by Serhiy Storchaka in :gh:`78573`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1270 +#: ../../whatsnew/3.13.rst:1286 msgid "tempfile" msgstr "" -#: ../../whatsnew/3.13.rst:1272 +#: ../../whatsnew/3.13.rst:1288 msgid "" "On Windows, the default mode ``0o700`` used by :func:`tempfile.mkdtemp` now " "limits access to the new directory due to changes to :func:`os.mkdir`. This " @@ -1876,11 +1896,11 @@ msgid "" "`118486`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1279 +#: ../../whatsnew/3.13.rst:1295 msgid "time" msgstr "" -#: ../../whatsnew/3.13.rst:1281 +#: ../../whatsnew/3.13.rst:1297 msgid "" "On Windows, :func:`~time.monotonic` now uses the " "``QueryPerformanceCounter()`` clock for a resolution of 1 microsecond, " @@ -1888,7 +1908,7 @@ msgid "" "milliseconds. (Contributed by Victor Stinner in :gh:`88494`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1287 +#: ../../whatsnew/3.13.rst:1303 msgid "" "On Windows, :func:`~time.time` now uses the " "``GetSystemTimePreciseAsFileTime()`` clock for a resolution of 1 " @@ -1897,11 +1917,11 @@ msgid "" "`63207`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1295 +#: ../../whatsnew/3.13.rst:1311 msgid "tkinter" msgstr "" -#: ../../whatsnew/3.13.rst:1297 +#: ../../whatsnew/3.13.rst:1313 msgid "" "Add :mod:`tkinter` widget methods: :meth:`!tk_busy_hold`, :meth:`!" "tk_busy_configure`, :meth:`!tk_busy_cget`, :meth:`!tk_busy_forget`, :meth:`!" @@ -1909,7 +1929,7 @@ msgid "" "klappnase and Serhiy Storchaka in :gh:`72684`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1303 +#: ../../whatsnew/3.13.rst:1319 msgid "" "The :mod:`tkinter` widget method :meth:`!wm_attributes` now accepts the " "attribute name without the minus prefix to get window attributes, for " @@ -1918,14 +1938,14 @@ msgid "" "wm_attributes(alpha=0.5)``. (Contributed by Serhiy Storchaka in :gh:`43457`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1310 +#: ../../whatsnew/3.13.rst:1326 msgid "" ":meth:`!wm_attributes` can now return attributes as a :class:`dict`, by " "using the new optional keyword-only parameter *return_python_dict*. " "(Contributed by Serhiy Storchaka in :gh:`43457`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1314 +#: ../../whatsnew/3.13.rst:1330 msgid "" ":meth:`!Text.count` can now return a simple :class:`int` when the new " "optional keyword-only parameter *return_ints* is used. Otherwise, the single " @@ -1933,27 +1953,27 @@ msgid "" "in :gh:`97928`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1319 +#: ../../whatsnew/3.13.rst:1335 msgid "" "Support the \"vsapi\" element type in the :meth:`~tkinter.ttk.Style." "element_create` method of :class:`tkinter.ttk.Style`. (Contributed by Serhiy " "Storchaka in :gh:`68166`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1324 +#: ../../whatsnew/3.13.rst:1340 msgid "" "Add the :meth:`!after_info` method for Tkinter widgets. (Contributed by " "Cheryl Sabella in :gh:`77020`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1327 +#: ../../whatsnew/3.13.rst:1343 msgid "" "Add a new :meth:`!copy_replace` method to :class:`!PhotoImage` to copy a " "region from one image to another, possibly with pixel zooming, subsampling, " "or both. (Contributed by Serhiy Storchaka in :gh:`118225`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1332 +#: ../../whatsnew/3.13.rst:1348 msgid "" "Add *from_coords* parameter to the :class:`!PhotoImage` methods :meth:`!" "copy`, :meth:`!zoom` and :meth:`!subsample`. Add *zoom* and *subsample* " @@ -1961,7 +1981,7 @@ msgid "" "Serhiy Storchaka in :gh:`118225`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1338 +#: ../../whatsnew/3.13.rst:1354 msgid "" "Add the :class:`!PhotoImage` methods :meth:`!read` to read an image from a " "file and :meth:`!data` to get the image data. Add *background* and " @@ -1969,11 +1989,11 @@ msgid "" "Storchaka in :gh:`118271`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1346 +#: ../../whatsnew/3.13.rst:1362 msgid "traceback" msgstr "" -#: ../../whatsnew/3.13.rst:1348 +#: ../../whatsnew/3.13.rst:1364 msgid "" "Add the :attr:`~traceback.TracebackException.exc_type_str` attribute to :" "class:`~traceback.TracebackException`, which holds a string display of the " @@ -1983,7 +2003,7 @@ msgid "" "(Contributed by Irit Katriel in :gh:`112332`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1357 +#: ../../whatsnew/3.13.rst:1373 msgid "" "Add a new *show_group* keyword-only parameter to :meth:`.TracebackException." "format_exception_only` to (recursively) format the nested exceptions of a :" @@ -1991,11 +2011,11 @@ msgid "" "`105292`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1364 +#: ../../whatsnew/3.13.rst:1380 msgid "types" msgstr "" -#: ../../whatsnew/3.13.rst:1366 +#: ../../whatsnew/3.13.rst:1382 msgid "" ":class:`~types.SimpleNamespace` can now take a single positional argument to " "initialise the namespace's arguments. This argument must either be a mapping " @@ -2003,63 +2023,63 @@ msgid "" "`108191`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1373 ../../whatsnew/3.13.rst:1753 +#: ../../whatsnew/3.13.rst:1389 ../../whatsnew/3.13.rst:1769 msgid "typing" msgstr "" -#: ../../whatsnew/3.13.rst:1375 +#: ../../whatsnew/3.13.rst:1391 msgid "" ":pep:`705`: Add :data:`~typing.ReadOnly`, a special typing construct to mark " "a :class:`~typing.TypedDict` item as read-only for type checkers." msgstr "" -#: ../../whatsnew/3.13.rst:1378 +#: ../../whatsnew/3.13.rst:1394 msgid "" ":pep:`742`: Add :data:`~typing.TypeIs`, a typing construct that can be used " "to instruct a type checker how to narrow a type." msgstr "" -#: ../../whatsnew/3.13.rst:1381 +#: ../../whatsnew/3.13.rst:1397 msgid "" "Add :data:`~typing.NoDefault`, a sentinel object used to represent the " "defaults of some parameters in the :mod:`typing` module. (Contributed by " "Jelle Zijlstra in :gh:`116126`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1385 +#: ../../whatsnew/3.13.rst:1401 msgid "" "Add :func:`~typing.get_protocol_members` to return the set of members " "defining a :class:`typing.Protocol`. (Contributed by Jelle Zijlstra in :gh:" "`104873`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1389 +#: ../../whatsnew/3.13.rst:1405 msgid "" "Add :func:`~typing.is_protocol` to check whether a class is a :class:" "`~typing.Protocol`. (Contributed by Jelle Zijlstra in :gh:`104873`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1393 +#: ../../whatsnew/3.13.rst:1409 msgid "" ":data:`~typing.ClassVar` can now be nested in :data:`~typing.Final`, and " "vice versa. (Contributed by Mehdi Drissi in :gh:`89547`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1399 +#: ../../whatsnew/3.13.rst:1415 msgid "unicodedata" msgstr "" -#: ../../whatsnew/3.13.rst:1401 +#: ../../whatsnew/3.13.rst:1417 msgid "" "Update the Unicode database to `version 15.1.0`__. (Contributed by James " "Gerity in :gh:`109559`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1408 +#: ../../whatsnew/3.13.rst:1424 msgid "venv" msgstr "" -#: ../../whatsnew/3.13.rst:1410 +#: ../../whatsnew/3.13.rst:1426 msgid "" "Add support for creating source control management (SCM) ignore files in a " "virtual environment's directory. By default, Git is supported. This is " @@ -2069,11 +2089,11 @@ msgid "" "Cannon in :gh:`108125`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1421 +#: ../../whatsnew/3.13.rst:1437 msgid "warnings" msgstr "" -#: ../../whatsnew/3.13.rst:1423 +#: ../../whatsnew/3.13.rst:1439 msgid "" ":pep:`702`: The new :func:`warnings.deprecated` decorator provides a way to " "communicate deprecations to a :term:`static type checker` and to warn on " @@ -2082,62 +2102,62 @@ msgid "" "(Contributed by Jelle Zijlstra in :gh:`104003`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1432 +#: ../../whatsnew/3.13.rst:1448 msgid "xml" msgstr "" -#: ../../whatsnew/3.13.rst:1434 +#: ../../whatsnew/3.13.rst:1450 msgid "" "Allow controlling Expat >=2.6.0 reparse deferral (:cve:`2023-52425`) by " "adding five new methods:" msgstr "" -#: ../../whatsnew/3.13.rst:1437 +#: ../../whatsnew/3.13.rst:1453 msgid ":meth:`xml.etree.ElementTree.XMLParser.flush`" msgstr "" -#: ../../whatsnew/3.13.rst:1438 +#: ../../whatsnew/3.13.rst:1454 msgid ":meth:`xml.etree.ElementTree.XMLPullParser.flush`" msgstr "" -#: ../../whatsnew/3.13.rst:1439 +#: ../../whatsnew/3.13.rst:1455 msgid ":meth:`xml.parsers.expat.xmlparser.GetReparseDeferralEnabled`" msgstr "" -#: ../../whatsnew/3.13.rst:1440 +#: ../../whatsnew/3.13.rst:1456 msgid ":meth:`xml.parsers.expat.xmlparser.SetReparseDeferralEnabled`" msgstr "" -#: ../../whatsnew/3.13.rst:1441 +#: ../../whatsnew/3.13.rst:1457 msgid ":meth:`!xml.sax.expatreader.ExpatParser.flush`" msgstr "" -#: ../../whatsnew/3.13.rst:1443 +#: ../../whatsnew/3.13.rst:1459 msgid "(Contributed by Sebastian Pipping in :gh:`115623`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1445 +#: ../../whatsnew/3.13.rst:1461 msgid "" "Add the :meth:`!close` method for the iterator returned by :func:`~xml.etree." "ElementTree.iterparse` for explicit cleanup. (Contributed by Serhiy " "Storchaka in :gh:`69893`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1451 +#: ../../whatsnew/3.13.rst:1467 msgid "zipimport" msgstr "" -#: ../../whatsnew/3.13.rst:1453 +#: ../../whatsnew/3.13.rst:1469 msgid "" "Add support for ZIP64_ format files. Everybody loves huge data, right? " "(Contributed by Tim Hatch in :gh:`94146`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1461 +#: ../../whatsnew/3.13.rst:1477 msgid "Optimizations" msgstr "" -#: ../../whatsnew/3.13.rst:1463 +#: ../../whatsnew/3.13.rst:1479 msgid "" "Several standard library modules have had their import times significantly " "improved. For example, the import time of the :mod:`typing` module has been " @@ -2148,13 +2168,13 @@ msgid "" "Turner, Daniel Hollas, and others in :gh:`109653`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1474 +#: ../../whatsnew/3.13.rst:1490 msgid "" ":func:`textwrap.indent` is now around 30% faster than before for large " "input. (Contributed by Inada Naoki in :gh:`107369`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1477 +#: ../../whatsnew/3.13.rst:1493 msgid "" "The :mod:`subprocess` module now uses the :func:`~os.posix_spawn` function " "in more situations, including when *close_fds* is ``True`` (the default) on " @@ -2164,15 +2184,15 @@ msgid "" "Kulik in :gh:`113117`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1487 +#: ../../whatsnew/3.13.rst:1503 msgid "Removed Modules And APIs" msgstr "" -#: ../../whatsnew/3.13.rst:1493 +#: ../../whatsnew/3.13.rst:1509 msgid "PEP 594: Remove \"dead batteries\" from the standard library" msgstr "" -#: ../../whatsnew/3.13.rst:1495 +#: ../../whatsnew/3.13.rst:1511 msgid "" ":pep:`594` proposed removing 19 modules from the standard library, " "colloquially referred to as 'dead batteries' due to their historic, " @@ -2180,38 +2200,38 @@ msgid "" "in Python 3.11, and are now removed:" msgstr "" -#: ../../whatsnew/3.13.rst:1501 +#: ../../whatsnew/3.13.rst:1517 msgid ":mod:`!aifc`" msgstr "" -#: ../../whatsnew/3.13.rst:1503 +#: ../../whatsnew/3.13.rst:1519 msgid "" ":pypi:`standard-aifc`: Use the redistribution of ``aifc`` library from PyPI." msgstr "" -#: ../../whatsnew/3.13.rst:1506 +#: ../../whatsnew/3.13.rst:1522 msgid ":mod:`!audioop`" msgstr "" -#: ../../whatsnew/3.13.rst:1508 +#: ../../whatsnew/3.13.rst:1524 msgid ":pypi:`audioop-lts`: Use ``audioop-lts`` library from PyPI." msgstr "" -#: ../../whatsnew/3.13.rst:1511 +#: ../../whatsnew/3.13.rst:1527 msgid ":mod:`!chunk`" msgstr "" -#: ../../whatsnew/3.13.rst:1513 +#: ../../whatsnew/3.13.rst:1529 msgid "" ":pypi:`standard-chunk`: Use the redistribution of ``chunk`` library from " "PyPI." msgstr "" -#: ../../whatsnew/3.13.rst:1516 +#: ../../whatsnew/3.13.rst:1532 msgid ":mod:`!cgi` and :mod:`!cgitb`" msgstr "" -#: ../../whatsnew/3.13.rst:1518 +#: ../../whatsnew/3.13.rst:1534 msgid "" ":class:`!cgi.FieldStorage` can typically be replaced with :func:`urllib." "parse.parse_qsl` for ``GET`` and ``HEAD`` requests, and the :mod:`email." @@ -2219,7 +2239,7 @@ msgid "" "requests." msgstr "" -#: ../../whatsnew/3.13.rst:1523 +#: ../../whatsnew/3.13.rst:1539 msgid "" ":func:`!cgi.parse` can be replaced by calling :func:`urllib.parse.parse_qs` " "directly on the desired query string, unless the input is ``multipart/form-" @@ -2227,14 +2247,14 @@ msgid "" "parse_multipart`." msgstr "" -#: ../../whatsnew/3.13.rst:1528 +#: ../../whatsnew/3.13.rst:1544 msgid "" ":func:`!cgi.parse_header` can be replaced with the functionality in the :mod:" "`email` package, which implements the same MIME RFCs. For example, with :" "class:`email.message.EmailMessage`:" msgstr "" -#: ../../whatsnew/3.13.rst:1532 +#: ../../whatsnew/3.13.rst:1548 msgid "" "from email.message import EmailMessage\n" "\n" @@ -2243,7 +2263,7 @@ msgid "" "main, params = msg.get_content_type(), msg['content-type'].params" msgstr "" -#: ../../whatsnew/3.13.rst:1540 +#: ../../whatsnew/3.13.rst:1556 msgid "" ":func:`!cgi.parse_multipart` can be replaced with the functionality in the :" "mod:`email` package, which implements the same MIME RFCs, or with the :pypi:" @@ -2251,54 +2271,54 @@ msgid "" "and :class:`email.message.Message` classes." msgstr "" -#: ../../whatsnew/3.13.rst:1546 +#: ../../whatsnew/3.13.rst:1562 msgid "" ":pypi:`standard-cgi`: and :pypi:`standard-cgitb`: Use the redistribution of " "``cgi`` and ``cgitb`` library from PyPI." msgstr "" -#: ../../whatsnew/3.13.rst:1549 +#: ../../whatsnew/3.13.rst:1565 msgid "" ":mod:`!crypt` and the private :mod:`!_crypt` extension. The :mod:`hashlib` " "module may be an appropriate replacement when simply hashing a value is " "required. Otherwise, various third-party libraries on PyPI are available:" msgstr "" -#: ../../whatsnew/3.13.rst:1554 +#: ../../whatsnew/3.13.rst:1570 msgid "" ":pypi:`bcrypt`: Modern password hashing for your software and your servers." msgstr "" -#: ../../whatsnew/3.13.rst:1556 +#: ../../whatsnew/3.13.rst:1572 msgid "" ":pypi:`passlib`: Comprehensive password hashing framework supporting over 30 " "schemes." msgstr "" -#: ../../whatsnew/3.13.rst:1558 +#: ../../whatsnew/3.13.rst:1574 msgid ":pypi:`argon2-cffi`: The secure Argon2 password hashing algorithm." msgstr "" -#: ../../whatsnew/3.13.rst:1560 +#: ../../whatsnew/3.13.rst:1576 msgid "" ":pypi:`legacycrypt`: :mod:`ctypes` wrapper to the POSIX crypt library call " "and associated functionality." msgstr "" -#: ../../whatsnew/3.13.rst:1563 +#: ../../whatsnew/3.13.rst:1579 msgid "" ":pypi:`crypt_r`: Fork of the :mod:`!crypt` module, wrapper to the :manpage:" "`crypt_r(3)` library call and associated functionality." msgstr "" -#: ../../whatsnew/3.13.rst:1567 +#: ../../whatsnew/3.13.rst:1583 msgid "" ":pypi:`standard-crypt` and :pypi:`deprecated-crypt-alternative`: Use the " "redistribution of ``crypt`` and reimplementation of ``_crypt`` libraries " "from PyPI." msgstr "" -#: ../../whatsnew/3.13.rst:1570 +#: ../../whatsnew/3.13.rst:1586 msgid "" ":mod:`!imghdr`: The :pypi:`filetype`, :pypi:`puremagic`, or :pypi:`python-" "magic` libraries should be used as replacements. For example, the :func:`!" @@ -2306,138 +2326,138 @@ msgid "" "function for all file formats that were supported by :mod:`!imghdr`." msgstr "" -#: ../../whatsnew/3.13.rst:1577 +#: ../../whatsnew/3.13.rst:1593 msgid "" ":pypi:`standard-imghdr`: Use the redistribution of ``imghdr`` library from " "PyPI." msgstr "" -#: ../../whatsnew/3.13.rst:1580 +#: ../../whatsnew/3.13.rst:1596 msgid ":mod:`!mailcap`: Use the :mod:`mimetypes` module instead." msgstr "" -#: ../../whatsnew/3.13.rst:1583 +#: ../../whatsnew/3.13.rst:1599 msgid "" ":pypi:`standard-mailcap`: Use the redistribution of ``mailcap`` library from " "PyPI." msgstr "" -#: ../../whatsnew/3.13.rst:1586 +#: ../../whatsnew/3.13.rst:1602 msgid ":mod:`!msilib`" msgstr "" -#: ../../whatsnew/3.13.rst:1587 +#: ../../whatsnew/3.13.rst:1603 msgid ":mod:`!nis`" msgstr "" -#: ../../whatsnew/3.13.rst:1588 +#: ../../whatsnew/3.13.rst:1604 msgid ":mod:`!nntplib`: Use the :pypi:`pynntp` library from PyPI instead." msgstr "" -#: ../../whatsnew/3.13.rst:1591 +#: ../../whatsnew/3.13.rst:1607 msgid "" ":pypi:`standard-nntplib`: Use the redistribution of ``nntplib`` library from " "PyPI." msgstr "" -#: ../../whatsnew/3.13.rst:1594 +#: ../../whatsnew/3.13.rst:1610 msgid "" ":mod:`!ossaudiodev`: For audio playback, use the :pypi:`pygame` library from " "PyPI instead." msgstr "" -#: ../../whatsnew/3.13.rst:1596 +#: ../../whatsnew/3.13.rst:1612 msgid "" ":mod:`!pipes`: Use the :mod:`subprocess` module instead. Use :func:`shlex." "quote` to replace the undocumented ``pipes.quote`` function." msgstr "" -#: ../../whatsnew/3.13.rst:1601 +#: ../../whatsnew/3.13.rst:1617 msgid "" ":pypi:`standard-pipes`: Use the redistribution of ``pipes`` library from " "PyPI." msgstr "" -#: ../../whatsnew/3.13.rst:1604 +#: ../../whatsnew/3.13.rst:1620 msgid "" ":mod:`!sndhdr`: The :pypi:`filetype`, :pypi:`puremagic`, or :pypi:`python-" "magic` libraries should be used as replacements." msgstr "" -#: ../../whatsnew/3.13.rst:1608 +#: ../../whatsnew/3.13.rst:1624 msgid "" ":pypi:`standard-sndhdr`: Use the redistribution of ``sndhdr`` library from " "PyPI." msgstr "" -#: ../../whatsnew/3.13.rst:1611 +#: ../../whatsnew/3.13.rst:1627 msgid ":mod:`!spwd`: Use the :pypi:`python-pam` library from PyPI instead." msgstr "" -#: ../../whatsnew/3.13.rst:1613 +#: ../../whatsnew/3.13.rst:1629 msgid ":mod:`!sunau`" msgstr "" -#: ../../whatsnew/3.13.rst:1615 +#: ../../whatsnew/3.13.rst:1631 msgid "" ":pypi:`standard-sunau`: Use the redistribution of ``sunau`` library from " "PyPI." msgstr "" -#: ../../whatsnew/3.13.rst:1618 +#: ../../whatsnew/3.13.rst:1634 msgid "" ":mod:`!telnetlib`, Use the :pypi:`telnetlib3` or :pypi:`Exscript` libraries " "from PyPI instead." msgstr "" -#: ../../whatsnew/3.13.rst:1621 +#: ../../whatsnew/3.13.rst:1637 msgid "" ":pypi:`standard-telnetlib`: Use the redistribution of ``telnetlib`` library " "from PyPI." msgstr "" -#: ../../whatsnew/3.13.rst:1624 +#: ../../whatsnew/3.13.rst:1640 msgid "" ":mod:`!uu`: Use the :mod:`base64` module instead, as a modern alternative." msgstr "" -#: ../../whatsnew/3.13.rst:1627 +#: ../../whatsnew/3.13.rst:1643 msgid "" ":pypi:`standard-uu`: Use the redistribution of ``uu`` library from PyPI." msgstr "" -#: ../../whatsnew/3.13.rst:1630 +#: ../../whatsnew/3.13.rst:1646 msgid ":mod:`!xdrlib`" msgstr "" -#: ../../whatsnew/3.13.rst:1632 +#: ../../whatsnew/3.13.rst:1648 msgid "" ":pypi:`standard-xdrlib`: Use the redistribution of ``xdrlib`` library from " "PyPI." msgstr "" -#: ../../whatsnew/3.13.rst:1635 +#: ../../whatsnew/3.13.rst:1651 msgid "" "(Contributed by Victor Stinner and Zachary Ware in :gh:`104773` and :gh:" "`104780`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1639 +#: ../../whatsnew/3.13.rst:1655 msgid "2to3" msgstr "" -#: ../../whatsnew/3.13.rst:1641 +#: ../../whatsnew/3.13.rst:1657 msgid "" "Remove the :program:`2to3` program and the :mod:`!lib2to3` module, " "previously deprecated in Python 3.11. (Contributed by Victor Stinner in :gh:" "`104780`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1647 +#: ../../whatsnew/3.13.rst:1663 msgid "builtins" msgstr "" -#: ../../whatsnew/3.13.rst:1649 +#: ../../whatsnew/3.13.rst:1665 msgid "" "Remove support for chained :class:`classmethod` descriptors (introduced in :" "gh:`63272`). These can no longer be used to wrap other descriptors, such as :" @@ -2447,47 +2467,47 @@ msgid "" "(Contributed by Raymond Hettinger in :gh:`89519`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1658 +#: ../../whatsnew/3.13.rst:1674 msgid "" "Raise a :exc:`RuntimeError` when calling :meth:`frame.clear` on a suspended " "frame (as has always been the case for an executing frame). (Contributed by " "Irit Katriel in :gh:`79932`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1666 +#: ../../whatsnew/3.13.rst:1682 msgid "" "Remove the undocumented :class:`!LegacyInterpolation` class, deprecated in " "the docstring since Python 3.2, and at runtime since Python 3.11. " "(Contributed by Hugo van Kemenade in :gh:`104886`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1673 +#: ../../whatsnew/3.13.rst:1689 msgid "importlib.metadata" msgstr "" -#: ../../whatsnew/3.13.rst:1675 +#: ../../whatsnew/3.13.rst:1691 msgid "" "Remove deprecated subscript (:meth:`~object.__getitem__`) access for :ref:" "`EntryPoint ` objects. (Contributed by Jason R. Coombs in :gh:" "`113175`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1681 +#: ../../whatsnew/3.13.rst:1697 msgid "locale" msgstr "" -#: ../../whatsnew/3.13.rst:1683 +#: ../../whatsnew/3.13.rst:1699 msgid "" "Remove the :func:`!locale.resetlocale` function, deprecated in Python 3.11. " "Use ``locale.setlocale(locale.LC_ALL, \"\")`` instead. (Contributed by " "Victor Stinner in :gh:`104783`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1689 +#: ../../whatsnew/3.13.rst:1705 msgid "opcode" msgstr "" -#: ../../whatsnew/3.13.rst:1691 +#: ../../whatsnew/3.13.rst:1707 msgid "" "Move :attr:`!opcode.ENABLE_SPECIALIZATION` to :attr:`!_opcode." "ENABLE_SPECIALIZATION`. This field was added in 3.12, it was never " @@ -2495,7 +2515,7 @@ msgid "" "Katriel in :gh:`105481`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1696 +#: ../../whatsnew/3.13.rst:1712 msgid "" "Remove :func:`!opcode.is_pseudo`, :attr:`!opcode.MIN_PSEUDO_OPCODE`, and :" "attr:`!opcode.MAX_PSEUDO_OPCODE`, which were added in Python 3.12, but were " @@ -2503,11 +2523,11 @@ msgid "" "be used externally. (Contributed by Irit Katriel in :gh:`105481`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1704 +#: ../../whatsnew/3.13.rst:1720 msgid "optparse" msgstr "" -#: ../../whatsnew/3.13.rst:1706 +#: ../../whatsnew/3.13.rst:1722 msgid "" "This module is no longer considered :term:`soft deprecated`. While :mod:" "`argparse` remains preferred for new projects that aren't using a third " @@ -2520,43 +2540,43 @@ msgid "" "(Contributed by Alyssa Coghlan and Serhiy Storchaka in :gh:`126180`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1722 +#: ../../whatsnew/3.13.rst:1738 msgid "" "Remove the ability to use :class:`~pathlib.Path` objects as context " "managers. This functionality was deprecated and has had no effect since " "Python 3.9. (Contributed by Barney Gale in :gh:`83863`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1730 +#: ../../whatsnew/3.13.rst:1746 msgid "" "Remove the undocumented, deprecated, and broken :func:`!re.template` " "function and :attr:`!re.TEMPLATE` / :attr:`!re.T` flag. (Contributed by " "Serhiy Storchaka and Nikita Sobolev in :gh:`105687`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1736 +#: ../../whatsnew/3.13.rst:1752 msgid "tkinter.tix" msgstr "" -#: ../../whatsnew/3.13.rst:1738 +#: ../../whatsnew/3.13.rst:1754 msgid "" "Remove the :mod:`!tkinter.tix` module, deprecated in Python 3.6. The third-" "party Tix library which the module wrapped is unmaintained. (Contributed by " "Zachary Ware in :gh:`75552`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1744 +#: ../../whatsnew/3.13.rst:1760 msgid "turtle" msgstr "" -#: ../../whatsnew/3.13.rst:1746 +#: ../../whatsnew/3.13.rst:1762 msgid "" "Remove the :meth:`!RawTurtle.settiltangle` method, deprecated in the " "documentation since Python 3.1 and at runtime since Python 3.11. " "(Contributed by Hugo van Kemenade in :gh:`104876`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1755 +#: ../../whatsnew/3.13.rst:1771 msgid "" "Remove the :mod:`!typing.io` and :mod:`!typing.re` namespaces, deprecated " "since Python 3.8. The items in those namespaces can be imported directly " @@ -2564,66 +2584,66 @@ msgid "" "`92871`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1761 +#: ../../whatsnew/3.13.rst:1777 msgid "" "Remove the keyword-argument method of creating :class:`~typing.TypedDict` " "types, deprecated in Python 3.11. (Contributed by Tomas Roun in :gh:" "`104786`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1767 +#: ../../whatsnew/3.13.rst:1783 msgid "unittest" msgstr "" -#: ../../whatsnew/3.13.rst:1769 +#: ../../whatsnew/3.13.rst:1785 msgid "" "Remove the following :mod:`unittest` functions, deprecated in Python 3.11:" msgstr "" -#: ../../whatsnew/3.13.rst:1771 +#: ../../whatsnew/3.13.rst:1787 msgid ":func:`!unittest.findTestCases`" msgstr "" -#: ../../whatsnew/3.13.rst:1772 +#: ../../whatsnew/3.13.rst:1788 msgid ":func:`!unittest.makeSuite`" msgstr "" -#: ../../whatsnew/3.13.rst:1773 +#: ../../whatsnew/3.13.rst:1789 msgid ":func:`!unittest.getTestCaseNames`" msgstr "" -#: ../../whatsnew/3.13.rst:1775 +#: ../../whatsnew/3.13.rst:1791 msgid "Use :class:`~unittest.TestLoader` methods instead:" msgstr "" -#: ../../whatsnew/3.13.rst:1777 +#: ../../whatsnew/3.13.rst:1793 msgid ":meth:`~unittest.TestLoader.loadTestsFromModule`" msgstr "" -#: ../../whatsnew/3.13.rst:1778 +#: ../../whatsnew/3.13.rst:1794 msgid ":meth:`~unittest.TestLoader.loadTestsFromTestCase`" msgstr "" -#: ../../whatsnew/3.13.rst:1779 +#: ../../whatsnew/3.13.rst:1795 msgid ":meth:`~unittest.TestLoader.getTestCaseNames`" msgstr "" -#: ../../whatsnew/3.13.rst:1781 +#: ../../whatsnew/3.13.rst:1797 msgid "(Contributed by Hugo van Kemenade in :gh:`104835`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1783 +#: ../../whatsnew/3.13.rst:1799 msgid "" "Remove the untested and undocumented :meth:`!TestProgram.usageExit` method, " "deprecated in Python 3.11. (Contributed by Hugo van Kemenade in :gh:" "`104992`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1789 +#: ../../whatsnew/3.13.rst:1805 msgid "urllib" msgstr "" -#: ../../whatsnew/3.13.rst:1791 +#: ../../whatsnew/3.13.rst:1807 msgid "" "Remove the *cafile*, *capath*, and *cadefault* parameters of the :func:" "`urllib.request.urlopen` function, deprecated in Python 3.6. Use the " @@ -2634,33 +2654,33 @@ msgid "" "Victor Stinner in :gh:`105382`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1802 +#: ../../whatsnew/3.13.rst:1818 msgid "webbrowser" msgstr "" -#: ../../whatsnew/3.13.rst:1804 +#: ../../whatsnew/3.13.rst:1820 msgid "" "Remove the untested and undocumented :class:`!MacOSX` class, deprecated in " "Python 3.11. Use the :class:`!MacOSXOSAScript` class (introduced in Python " "3.2) instead. (Contributed by Hugo van Kemenade in :gh:`104804`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1809 +#: ../../whatsnew/3.13.rst:1825 msgid "" "Remove the deprecated :attr:`!MacOSXOSAScript._name` attribute. Use the :" "attr:`MacOSXOSAScript.name ` attribute instead. " "(Contributed by Nikita Sobolev in :gh:`105546`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1816 +#: ../../whatsnew/3.13.rst:1832 msgid "New Deprecations" msgstr "" -#: ../../whatsnew/3.13.rst:1818 +#: ../../whatsnew/3.13.rst:1834 msgid ":ref:`User-defined functions `:" msgstr "" -#: ../../whatsnew/3.13.rst:1820 +#: ../../whatsnew/3.13.rst:1836 msgid "" "Deprecate assignment to a function's :attr:`~function.__code__` attribute, " "where the new code object's type does not match the function's type. The " @@ -2668,12 +2688,12 @@ msgid "" "coroutine. (Contributed by Irit Katriel in :gh:`81137`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1826 +#: ../../whatsnew/3.13.rst:1842 #: ../../deprecations/pending-removal-in-3.16.rst:11 msgid ":mod:`array`:" msgstr "" -#: ../../whatsnew/3.13.rst:1828 +#: ../../whatsnew/3.13.rst:1844 msgid "" "Deprecate the ``'u'`` format code (:c:type:`wchar_t`) at runtime. This " "format code has been deprecated in documentation since Python 3.3, and will " @@ -2682,61 +2702,61 @@ msgid "" "`80480`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1835 +#: ../../whatsnew/3.13.rst:1851 #: ../../deprecations/pending-removal-in-3.15.rst:16 msgid ":mod:`ctypes`:" msgstr "" -#: ../../whatsnew/3.13.rst:1837 +#: ../../whatsnew/3.13.rst:1853 msgid "" "Deprecate the undocumented :func:`!SetPointerType` function, to be removed " "in Python 3.15. (Contributed by Victor Stinner in :gh:`105733`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1841 +#: ../../whatsnew/3.13.rst:1857 msgid "" ":term:`Soft-deprecate ` the :func:`~ctypes.ARRAY` function " "in favour of ``type * length`` multiplication. (Contributed by Victor " "Stinner in :gh:`105733`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1845 +#: ../../whatsnew/3.13.rst:1861 msgid ":mod:`decimal`:" msgstr "" -#: ../../whatsnew/3.13.rst:1847 +#: ../../whatsnew/3.13.rst:1863 msgid "" "Deprecate the non-standard and undocumented :class:`~decimal.Decimal` format " "specifier ``'N'``, which is only supported in the :mod:`!decimal` module's C " "implementation. (Contributed by Serhiy Storchaka in :gh:`89902`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1852 +#: ../../whatsnew/3.13.rst:1868 msgid ":mod:`dis`:" msgstr "" -#: ../../whatsnew/3.13.rst:1854 +#: ../../whatsnew/3.13.rst:1870 msgid "" "Deprecate the :attr:`!HAVE_ARGUMENT` separator. Check membership in :data:" "`~dis.hasarg` instead. (Contributed by Irit Katriel in :gh:`109319`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1858 +#: ../../whatsnew/3.13.rst:1874 msgid ":mod:`gettext`:" msgstr "" -#: ../../whatsnew/3.13.rst:1860 +#: ../../whatsnew/3.13.rst:1876 msgid "" "Deprecate non-integer numbers as arguments to functions and methods that " "consider plural forms in the :mod:`!gettext` module, even if no translation " "was found. (Contributed by Serhiy Storchaka in :gh:`88434`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1865 +#: ../../whatsnew/3.13.rst:1881 msgid ":mod:`glob`:" msgstr "" -#: ../../whatsnew/3.13.rst:1867 +#: ../../whatsnew/3.13.rst:1883 msgid "" "Deprecate the undocumented :func:`!glob0` and :func:`!glob1` functions. Use :" "func:`~glob.glob` and pass a :term:`path-like object` specifying the root " @@ -2744,12 +2764,12 @@ msgid "" "in :gh:`117337`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1872 +#: ../../whatsnew/3.13.rst:1888 #: ../../deprecations/pending-removal-in-3.15.rst:21 msgid ":mod:`http.server`:" msgstr "" -#: ../../whatsnew/3.13.rst:1874 +#: ../../whatsnew/3.13.rst:1890 msgid "" "Deprecate :class:`~http.server.CGIHTTPRequestHandler`, to be removed in " "Python 3.15. Process-based CGI HTTP servers have been out of favor for a " @@ -2758,30 +2778,30 @@ msgid "" "by Gregory P. Smith in :gh:`109096`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1881 +#: ../../whatsnew/3.13.rst:1897 msgid "" "Deprecate the :option:`!--cgi` flag to the :program:`python -m http.server` " "command-line interface, to be removed in Python 3.15. (Contributed by " "Gregory P. Smith in :gh:`109096`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1886 +#: ../../whatsnew/3.13.rst:1902 #: ../../deprecations/pending-removal-in-3.16.rst:70 msgid ":mod:`mimetypes`:" msgstr "" -#: ../../whatsnew/3.13.rst:1888 +#: ../../whatsnew/3.13.rst:1904 msgid "" ":term:`Soft-deprecate ` file path arguments to :func:" "`~mimetypes.guess_type`, use :func:`~mimetypes.guess_file_type` instead. " "(Contributed by Serhiy Storchaka in :gh:`66543`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1893 +#: ../../whatsnew/3.13.rst:1909 msgid ":mod:`re`:" msgstr "" -#: ../../whatsnew/3.13.rst:1895 +#: ../../whatsnew/3.13.rst:1911 msgid "" "Deprecate passing the optional *maxsplit*, *count*, or *flags* arguments as " "positional arguments to the module-level :func:`~re.split`, :func:`~re.sub`, " @@ -2790,46 +2810,46 @@ msgid "" "by Serhiy Storchaka in :gh:`56166`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1902 +#: ../../whatsnew/3.13.rst:1918 #: ../../deprecations/pending-removal-in-3.15.rst:46 msgid ":mod:`pathlib`:" msgstr "" -#: ../../whatsnew/3.13.rst:1904 +#: ../../whatsnew/3.13.rst:1920 msgid "" "Deprecate :meth:`.PurePath.is_reserved`, to be removed in Python 3.15. Use :" "func:`os.path.isreserved` to detect reserved paths on Windows. (Contributed " "by Barney Gale in :gh:`88569`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1909 +#: ../../whatsnew/3.13.rst:1925 #: ../../deprecations/pending-removal-in-3.15.rst:52 msgid ":mod:`platform`:" msgstr "" -#: ../../whatsnew/3.13.rst:1911 +#: ../../whatsnew/3.13.rst:1927 msgid "" "Deprecate :func:`~platform.java_ver`, to be removed in Python 3.15. This " "function is only useful for Jython support, has a confusing API, and is " "largely untested. (Contributed by Nikita Sobolev in :gh:`116349`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1917 +#: ../../whatsnew/3.13.rst:1933 msgid ":mod:`pydoc`:" msgstr "" -#: ../../whatsnew/3.13.rst:1919 +#: ../../whatsnew/3.13.rst:1935 msgid "" "Deprecate the undocumented :func:`!ispackage` function. (Contributed by " "Zackery Spytz in :gh:`64020`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1922 +#: ../../whatsnew/3.13.rst:1938 #: ../../deprecations/pending-removal-in-3.14.rst:91 msgid ":mod:`sqlite3`:" msgstr "" -#: ../../whatsnew/3.13.rst:1924 +#: ../../whatsnew/3.13.rst:1940 msgid "" "Deprecate passing more than one positional argument to the :func:`~sqlite3." "connect` function and the :class:`~sqlite3.Connection` constructor. The " @@ -2837,7 +2857,7 @@ msgid "" "by Erlend E. Aasland in :gh:`107948`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1930 +#: ../../whatsnew/3.13.rst:1946 msgid "" "Deprecate passing name, number of arguments, and the callable as keyword " "arguments for :meth:`.Connection.create_function` and :meth:`.Connection." @@ -2845,7 +2865,7 @@ msgid "" "3.15. (Contributed by Erlend E. Aasland in :gh:`108278`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1936 +#: ../../whatsnew/3.13.rst:1952 msgid "" "Deprecate passing the callback callable by keyword for the :meth:`~sqlite3." "Connection.set_authorizer`, :meth:`~sqlite3.Connection." @@ -2855,47 +2875,47 @@ msgid "" "`108278`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1944 +#: ../../whatsnew/3.13.rst:1960 #: ../../deprecations/pending-removal-in-3.16.rst:90 msgid ":mod:`sys`:" msgstr "" -#: ../../whatsnew/3.13.rst:1946 +#: ../../whatsnew/3.13.rst:1962 msgid "" "Deprecate the :func:`~sys._enablelegacywindowsfsencoding` function, to be " "removed in Python 3.16. Use the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` " "environment variable instead. (Contributed by Inada Naoki in :gh:`73427`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1951 +#: ../../whatsnew/3.13.rst:1967 #: ../../deprecations/pending-removal-in-3.16.rst:102 msgid ":mod:`tarfile`:" msgstr "" -#: ../../whatsnew/3.13.rst:1953 +#: ../../whatsnew/3.13.rst:1969 msgid "" "Deprecate the undocumented and unused :attr:`!TarFile.tarfile` attribute, to " "be removed in Python 3.16. (Contributed in :gh:`115256`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1957 +#: ../../whatsnew/3.13.rst:1973 msgid ":mod:`traceback`:" msgstr "" -#: ../../whatsnew/3.13.rst:1959 +#: ../../whatsnew/3.13.rst:1975 msgid "" "Deprecate the :attr:`.TracebackException.exc_type` attribute. Use :attr:`." "TracebackException.exc_type_str` instead. (Contributed by Irit Katriel in :" "gh:`112332`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1963 +#: ../../whatsnew/3.13.rst:1979 #: ../../deprecations/pending-removal-in-3.15.rst:80 #: ../../deprecations/pending-removal-in-3.17.rst:4 msgid ":mod:`typing`:" msgstr "" -#: ../../whatsnew/3.13.rst:1965 +#: ../../whatsnew/3.13.rst:1981 msgid "" "Deprecate the undocumented keyword argument syntax for creating :class:" "`~typing.NamedTuple` classes (e.g. ``Point = NamedTuple(\"Point\", x=int, " @@ -2903,7 +2923,7 @@ msgid "" "functional syntax instead. (Contributed by Alex Waygood in :gh:`105566`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1972 +#: ../../whatsnew/3.13.rst:1988 msgid "" "Deprecate omitting the *fields* parameter when creating a :class:`~typing." "NamedTuple` or :class:`typing.TypedDict` class, and deprecate passing " @@ -2915,15 +2935,15 @@ msgid "" "Alex Waygood in :gh:`105566` and :gh:`105570`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1982 +#: ../../whatsnew/3.13.rst:1998 msgid "" "Deprecate the :func:`typing.no_type_check_decorator` decorator function, to " -"be removed in in Python 3.15. After eight years in the :mod:`typing` module, " -"it has yet to be supported by any major type checker. (Contributed by Alex " +"be removed in Python 3.15. After eight years in the :mod:`typing` module, it " +"has yet to be supported by any major type checker. (Contributed by Alex " "Waygood in :gh:`106309`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1988 +#: ../../whatsnew/3.13.rst:2004 msgid "" "Deprecate :data:`typing.AnyStr`. In Python 3.16, it will be removed from " "``typing.__all__``, and a :exc:`DeprecationWarning` will be emitted at " @@ -2932,12 +2952,12 @@ msgid "" "(Contributed by Michael The in :gh:`107116`.)" msgstr "" -#: ../../whatsnew/3.13.rst:1996 +#: ../../whatsnew/3.13.rst:2012 #: ../../deprecations/pending-removal-in-3.15.rst:100 msgid ":mod:`wave`:" msgstr "" -#: ../../whatsnew/3.13.rst:1998 +#: ../../whatsnew/3.13.rst:2014 msgid "" "Deprecate the :meth:`~wave.Wave_read.getmark`, :meth:`!setmark`, and :meth:" "`~wave.Wave_read.getmarkers` methods of the :class:`~wave.Wave_read` and :" @@ -3290,6 +3310,7 @@ msgid "" "by Jiahao Li in :gh:`125746`.)" msgstr "" +#: ../../deprecations/c-api-pending-removal-in-3.16.rst:2 #: ../../deprecations/pending-removal-in-3.16.rst:2 msgid "Pending removal in Python 3.16" msgstr "" @@ -3831,11 +3852,11 @@ msgid "" "_clear_internal_caches` instead." msgstr "" -#: ../../whatsnew/3.13.rst:2017 +#: ../../whatsnew/3.13.rst:2033 msgid "CPython Bytecode Changes" msgstr "" -#: ../../whatsnew/3.13.rst:2019 +#: ../../whatsnew/3.13.rst:2035 msgid "" "The oparg of :opcode:`YIELD_VALUE` is now ``1`` if the yield is part of a " "yield-from or await, and ``0`` otherwise. The oparg of :opcode:`RESUME` was " @@ -3844,97 +3865,97 @@ msgid "" "`111354`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2027 +#: ../../whatsnew/3.13.rst:2043 msgid "C API Changes" msgstr "" -#: ../../whatsnew/3.13.rst:2032 +#: ../../whatsnew/3.13.rst:2048 msgid "" "Add the :ref:`PyMonitoring C API ` for generating :pep:" "`669` monitoring events:" msgstr "" -#: ../../whatsnew/3.13.rst:2035 +#: ../../whatsnew/3.13.rst:2051 msgid ":c:type:`PyMonitoringState`" msgstr "" -#: ../../whatsnew/3.13.rst:2036 +#: ../../whatsnew/3.13.rst:2052 msgid ":c:func:`PyMonitoring_FirePyStartEvent`" msgstr "" -#: ../../whatsnew/3.13.rst:2037 +#: ../../whatsnew/3.13.rst:2053 msgid ":c:func:`PyMonitoring_FirePyResumeEvent`" msgstr "" -#: ../../whatsnew/3.13.rst:2038 +#: ../../whatsnew/3.13.rst:2054 msgid ":c:func:`PyMonitoring_FirePyReturnEvent`" msgstr "" -#: ../../whatsnew/3.13.rst:2039 +#: ../../whatsnew/3.13.rst:2055 msgid ":c:func:`PyMonitoring_FirePyYieldEvent`" msgstr "" -#: ../../whatsnew/3.13.rst:2040 +#: ../../whatsnew/3.13.rst:2056 msgid ":c:func:`PyMonitoring_FireCallEvent`" msgstr "" -#: ../../whatsnew/3.13.rst:2041 +#: ../../whatsnew/3.13.rst:2057 msgid ":c:func:`PyMonitoring_FireLineEvent`" msgstr "" -#: ../../whatsnew/3.13.rst:2042 +#: ../../whatsnew/3.13.rst:2058 msgid ":c:func:`PyMonitoring_FireJumpEvent`" msgstr "" -#: ../../whatsnew/3.13.rst:2043 +#: ../../whatsnew/3.13.rst:2059 msgid "``PyMonitoring_FireBranchEvent``" msgstr "" -#: ../../whatsnew/3.13.rst:2044 +#: ../../whatsnew/3.13.rst:2060 msgid ":c:func:`PyMonitoring_FireCReturnEvent`" msgstr "" -#: ../../whatsnew/3.13.rst:2045 +#: ../../whatsnew/3.13.rst:2061 msgid ":c:func:`PyMonitoring_FirePyThrowEvent`" msgstr "" -#: ../../whatsnew/3.13.rst:2046 +#: ../../whatsnew/3.13.rst:2062 msgid ":c:func:`PyMonitoring_FireRaiseEvent`" msgstr "" -#: ../../whatsnew/3.13.rst:2047 +#: ../../whatsnew/3.13.rst:2063 msgid ":c:func:`PyMonitoring_FireCRaiseEvent`" msgstr "" -#: ../../whatsnew/3.13.rst:2048 +#: ../../whatsnew/3.13.rst:2064 msgid ":c:func:`PyMonitoring_FireReraiseEvent`" msgstr "" -#: ../../whatsnew/3.13.rst:2049 +#: ../../whatsnew/3.13.rst:2065 msgid ":c:func:`PyMonitoring_FireExceptionHandledEvent`" msgstr "" -#: ../../whatsnew/3.13.rst:2050 +#: ../../whatsnew/3.13.rst:2066 msgid ":c:func:`PyMonitoring_FirePyUnwindEvent`" msgstr "" -#: ../../whatsnew/3.13.rst:2051 +#: ../../whatsnew/3.13.rst:2067 msgid ":c:func:`PyMonitoring_FireStopIterationEvent`" msgstr "" -#: ../../whatsnew/3.13.rst:2052 +#: ../../whatsnew/3.13.rst:2068 msgid ":c:func:`PyMonitoring_EnterScope`" msgstr "" -#: ../../whatsnew/3.13.rst:2053 +#: ../../whatsnew/3.13.rst:2069 msgid ":c:func:`PyMonitoring_ExitScope`" msgstr "" -#: ../../whatsnew/3.13.rst:2055 +#: ../../whatsnew/3.13.rst:2071 msgid "(Contributed by Irit Katriel in :gh:`111997`)." msgstr "" -#: ../../whatsnew/3.13.rst:2057 +#: ../../whatsnew/3.13.rst:2073 msgid "" "Add :c:type:`PyMutex`, a lightweight mutex that occupies a single byte, and " "the new :c:func:`PyMutex_Lock` and :c:func:`PyMutex_Unlock` functions. :c:" @@ -3942,52 +3963,52 @@ msgid "" "operation needs to block. (Contributed by Sam Gross in :gh:`108724`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2063 +#: ../../whatsnew/3.13.rst:2079 msgid "" "Add the :ref:`PyTime C API ` to provide access to system clocks:" msgstr "" -#: ../../whatsnew/3.13.rst:2065 +#: ../../whatsnew/3.13.rst:2081 msgid ":c:type:`PyTime_t`." msgstr "" -#: ../../whatsnew/3.13.rst:2066 +#: ../../whatsnew/3.13.rst:2082 msgid ":c:var:`PyTime_MIN` and :c:var:`PyTime_MAX`." msgstr "" -#: ../../whatsnew/3.13.rst:2067 +#: ../../whatsnew/3.13.rst:2083 msgid ":c:func:`PyTime_AsSecondsDouble`." msgstr "" -#: ../../whatsnew/3.13.rst:2068 +#: ../../whatsnew/3.13.rst:2084 msgid ":c:func:`PyTime_Monotonic`." msgstr "" -#: ../../whatsnew/3.13.rst:2069 +#: ../../whatsnew/3.13.rst:2085 msgid ":c:func:`PyTime_MonotonicRaw`." msgstr "" -#: ../../whatsnew/3.13.rst:2070 +#: ../../whatsnew/3.13.rst:2086 msgid ":c:func:`PyTime_PerfCounter`." msgstr "" -#: ../../whatsnew/3.13.rst:2071 +#: ../../whatsnew/3.13.rst:2087 msgid ":c:func:`PyTime_PerfCounterRaw`." msgstr "" -#: ../../whatsnew/3.13.rst:2072 +#: ../../whatsnew/3.13.rst:2088 msgid ":c:func:`PyTime_Time`." msgstr "" -#: ../../whatsnew/3.13.rst:2073 +#: ../../whatsnew/3.13.rst:2089 msgid ":c:func:`PyTime_TimeRaw`." msgstr "" -#: ../../whatsnew/3.13.rst:2075 +#: ../../whatsnew/3.13.rst:2091 msgid "(Contributed by Victor Stinner and Petr Viktorin in :gh:`110850`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2077 +#: ../../whatsnew/3.13.rst:2093 msgid "" "Add the :c:func:`PyDict_ContainsString` function with the same behavior as :" "c:func:`PyDict_Contains`, but *key* is specified as a :c:expr:`const char*` " @@ -3995,7 +4016,7 @@ msgid "" "by Victor Stinner in :gh:`108314`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2083 +#: ../../whatsnew/3.13.rst:2099 msgid "" "Add the :c:func:`PyDict_GetItemRef` and :c:func:`PyDict_GetItemStringRef` " "functions, which behave similarly to :c:func:`PyDict_GetItemWithError`, but " @@ -4005,7 +4026,7 @@ msgid "" "`106004`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2091 +#: ../../whatsnew/3.13.rst:2107 msgid "" "Add the :c:func:`PyDict_SetDefaultRef` function, which behaves similarly to :" "c:func:`PyDict_SetDefault`, but returns a :term:`strong reference` instead " @@ -4014,7 +4035,7 @@ msgid "" "dictionary. (Contributed by Sam Gross in :gh:`112066`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2099 +#: ../../whatsnew/3.13.rst:2115 msgid "" "Add the :c:func:`PyDict_Pop` and :c:func:`PyDict_PopString` functions to " "remove a key from a dictionary and optionally return the removed value. This " @@ -4023,7 +4044,7 @@ msgid "" "Victor Stinner in :gh:`111262`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2106 +#: ../../whatsnew/3.13.rst:2122 msgid "" "Add the :c:func:`PyMapping_GetOptionalItem` and :c:func:" "`PyMapping_GetOptionalItemString` functions as alternatives to :c:func:" @@ -4034,7 +4055,7 @@ msgid "" "gh:`106307`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2116 +#: ../../whatsnew/3.13.rst:2132 msgid "" "Add the :c:func:`PyObject_GetOptionalAttr` and :c:func:" "`PyObject_GetOptionalAttrString` functions as alternatives to :c:func:" @@ -4045,37 +4066,37 @@ msgid "" "Serhiy Storchaka in :gh:`106521`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2126 +#: ../../whatsnew/3.13.rst:2142 msgid "" "Add the :c:func:`PyErr_FormatUnraisable` function as an extension to :c:func:" "`PyErr_WriteUnraisable` that allows customizing the warning message. " "(Contributed by Serhiy Storchaka in :gh:`108082`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2131 +#: ../../whatsnew/3.13.rst:2147 msgid "" "Add new functions that return a :term:`strong reference` instead of a :term:" "`borrowed reference` for frame locals, globals, and builtins, as part of :" "ref:`PEP 667 `:" msgstr "" -#: ../../whatsnew/3.13.rst:2135 +#: ../../whatsnew/3.13.rst:2151 msgid ":c:func:`PyEval_GetFrameBuiltins` replaces :c:func:`PyEval_GetBuiltins`" msgstr "" -#: ../../whatsnew/3.13.rst:2136 +#: ../../whatsnew/3.13.rst:2152 msgid ":c:func:`PyEval_GetFrameGlobals` replaces :c:func:`PyEval_GetGlobals`" msgstr "" -#: ../../whatsnew/3.13.rst:2137 +#: ../../whatsnew/3.13.rst:2153 msgid ":c:func:`PyEval_GetFrameLocals` replaces :c:func:`PyEval_GetLocals`" msgstr "" -#: ../../whatsnew/3.13.rst:2139 +#: ../../whatsnew/3.13.rst:2155 msgid "(Contributed by Mark Shannon and Tian Gao in :gh:`74929`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2141 +#: ../../whatsnew/3.13.rst:2157 msgid "" "Add the :c:func:`Py_GetConstant` and :c:func:`Py_GetConstantBorrowed` " "functions to get :term:`strong ` or :term:`borrowed " @@ -4084,7 +4105,7 @@ msgid "" "constant zero. (Contributed by Victor Stinner in :gh:`115754`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2148 +#: ../../whatsnew/3.13.rst:2164 msgid "" "Add the :c:func:`PyImport_AddModuleRef` function as a replacement for :c:" "func:`PyImport_AddModule` that returns a :term:`strong reference` instead of " @@ -4092,35 +4113,35 @@ msgid "" "`105922`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2153 +#: ../../whatsnew/3.13.rst:2169 msgid "" "Add the :c:func:`Py_IsFinalizing` function to check whether the main Python " "interpreter is :term:`shutting down `. (Contributed by " "Victor Stinner in :gh:`108014`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2158 +#: ../../whatsnew/3.13.rst:2174 msgid "" "Add the :c:func:`PyList_GetItemRef` function as a replacement for :c:func:" "`PyList_GetItem` that returns a :term:`strong reference` instead of a :term:" "`borrowed reference`. (Contributed by Sam Gross in :gh:`114329`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2163 +#: ../../whatsnew/3.13.rst:2179 msgid "" "Add the :c:func:`PyList_Extend` and :c:func:`PyList_Clear` functions, " "mirroring the Python :meth:`!list.extend` and :meth:`!list.clear` methods. " "(Contributed by Victor Stinner in :gh:`111138`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2167 +#: ../../whatsnew/3.13.rst:2183 msgid "" "Add the :c:func:`PyLong_AsInt` function. It behaves similarly to :c:func:" "`PyLong_AsLong`, but stores the result in a C :c:expr:`int` instead of a C :" "c:expr:`long`. (Contributed by Victor Stinner in :gh:`108014`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2172 +#: ../../whatsnew/3.13.rst:2188 msgid "" "Add the :c:func:`PyLong_AsNativeBytes`, :c:func:`PyLong_FromNativeBytes`, " "and :c:func:`PyLong_FromUnsignedNativeBytes` functions to simplify " @@ -4128,27 +4149,27 @@ msgid "" "(Contributed by Steve Dower in :gh:`111140`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2178 +#: ../../whatsnew/3.13.rst:2194 msgid "" "Add :c:func:`PyModule_Add` function, which is similar to :c:func:" "`PyModule_AddObjectRef` and :c:func:`PyModule_AddObject`, but always steals " "a reference to the value. (Contributed by Serhiy Storchaka in :gh:`86493`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2183 +#: ../../whatsnew/3.13.rst:2199 msgid "" "Add the :c:func:`PyObject_GenericHash` function that implements the default " "hashing function of a Python object. (Contributed by Serhiy Storchaka in :gh:" "`113024`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2187 +#: ../../whatsnew/3.13.rst:2203 msgid "" "Add the :c:func:`Py_HashPointer` function to hash a raw pointer. " "(Contributed by Victor Stinner in :gh:`111545`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2190 +#: ../../whatsnew/3.13.rst:2206 msgid "" "Add the :c:func:`PyObject_VisitManagedDict` and :c:func:" "`PyObject_ClearManagedDict` functions. which must be called by the traverse " @@ -4157,7 +4178,7 @@ msgid "" "with Python 3.11 and 3.12. (Contributed by Victor Stinner in :gh:`107073`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2198 +#: ../../whatsnew/3.13.rst:2214 msgid "" "Add the :c:func:`PyRefTracer_SetTracer` and :c:func:`PyRefTracer_GetTracer` " "functions, which enable tracking object creation and destruction in the same " @@ -4165,14 +4186,14 @@ msgid "" "in :gh:`93502`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2204 +#: ../../whatsnew/3.13.rst:2220 msgid "" "Add the :c:func:`PySys_AuditTuple` function as an alternative to :c:func:" "`PySys_Audit` that takes event arguments as a Python :class:`tuple` object. " "(Contributed by Victor Stinner in :gh:`85283`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2209 +#: ../../whatsnew/3.13.rst:2225 msgid "" "Add the :c:func:`PyThreadState_GetUnchecked()` function as an alternative " "to :c:func:`PyThreadState_Get()` that doesn't kill the process with a fatal " @@ -4180,7 +4201,7 @@ msgid "" "result is ``NULL``. (Contributed by Victor Stinner in :gh:`108867`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2215 +#: ../../whatsnew/3.13.rst:2231 msgid "" "Add the :c:func:`PyType_GetFullyQualifiedName` function to get the type's " "fully qualified name. The module name is prepended if :attr:`type." @@ -4188,14 +4209,14 @@ msgid "" "``'__main__'``. (Contributed by Victor Stinner in :gh:`111696`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2221 +#: ../../whatsnew/3.13.rst:2237 msgid "" "Add the :c:func:`PyType_GetModuleName` function to get the type's module " "name. This is equivalent to getting the :attr:`type.__module__` attribute. " "(Contributed by Eric Snow and Victor Stinner in :gh:`111696`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2226 +#: ../../whatsnew/3.13.rst:2242 msgid "" "Add the :c:func:`PyUnicode_EqualToUTF8AndSize` and :c:func:" "`PyUnicode_EqualToUTF8` functions to compare a Unicode object with a :c:expr:" @@ -4204,7 +4225,7 @@ msgid "" "Storchaka in :gh:`110289`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2233 +#: ../../whatsnew/3.13.rst:2249 msgid "" "Add the :c:func:`PyWeakref_GetRef` function as an alternative to :c:func:" "`PyWeakref_GetObject` that returns a :term:`strong reference` or ``NULL`` if " @@ -4212,47 +4233,47 @@ msgid "" "`105927`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2239 +#: ../../whatsnew/3.13.rst:2255 msgid "Add fixed variants of functions which silently ignore errors:" msgstr "" -#: ../../whatsnew/3.13.rst:2241 +#: ../../whatsnew/3.13.rst:2257 msgid "" ":c:func:`PyObject_HasAttrWithError` replaces :c:func:`PyObject_HasAttr`." msgstr "" -#: ../../whatsnew/3.13.rst:2242 +#: ../../whatsnew/3.13.rst:2258 msgid "" ":c:func:`PyObject_HasAttrStringWithError` replaces :c:func:" "`PyObject_HasAttrString`." msgstr "" -#: ../../whatsnew/3.13.rst:2244 +#: ../../whatsnew/3.13.rst:2260 msgid "" ":c:func:`PyMapping_HasKeyWithError` replaces :c:func:`PyMapping_HasKey`." msgstr "" -#: ../../whatsnew/3.13.rst:2245 +#: ../../whatsnew/3.13.rst:2261 msgid "" ":c:func:`PyMapping_HasKeyStringWithError` replaces :c:func:" "`PyMapping_HasKeyString`." msgstr "" -#: ../../whatsnew/3.13.rst:2248 +#: ../../whatsnew/3.13.rst:2264 msgid "" "The new functions return ``-1`` for errors and the standard ``1`` for true " "and ``0`` for false." msgstr "" -#: ../../whatsnew/3.13.rst:2251 +#: ../../whatsnew/3.13.rst:2267 msgid "(Contributed by Serhiy Storchaka in :gh:`108511`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2255 +#: ../../whatsnew/3.13.rst:2271 msgid "Changed C APIs" msgstr "" -#: ../../whatsnew/3.13.rst:2257 +#: ../../whatsnew/3.13.rst:2273 msgid "" "The *keywords* parameter of :c:func:`PyArg_ParseTupleAndKeywords` and :c:" "func:`PyArg_VaParseTupleAndKeywords` now has type :c:expr:`char * const *` " @@ -4265,20 +4286,20 @@ msgid "" "`65210`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2269 +#: ../../whatsnew/3.13.rst:2285 msgid "" ":c:func:`PyArg_ParseTupleAndKeywords` now supports non-ASCII keyword " "parameter names. (Contributed by Serhiy Storchaka in :gh:`110815`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2273 +#: ../../whatsnew/3.13.rst:2289 msgid "" "The :c:func:`!PyCode_GetFirstFree` function is now unstable API and is now " "named :c:func:`PyUnstable_Code_GetFirstFree`. (Contributed by Bogdan " "Romanyuk in :gh:`115781`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2277 +#: ../../whatsnew/3.13.rst:2293 msgid "" "The :c:func:`PyDict_GetItem`, :c:func:`PyDict_GetItemString`, :c:func:" "`PyMapping_HasKey`, :c:func:`PyMapping_HasKeyString`, :c:func:" @@ -4289,35 +4310,35 @@ msgid "" "documentation. (Contributed by Serhiy Storchaka in :gh:`106672`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2286 +#: ../../whatsnew/3.13.rst:2302 msgid "" "Add support for the ``%T``, ``%#T``, ``%N`` and ``%#N`` formats to :c:func:" "`PyUnicode_FromFormat`:" msgstr "" -#: ../../whatsnew/3.13.rst:2289 +#: ../../whatsnew/3.13.rst:2305 msgid "``%T``: Get the fully qualified name of an object type" msgstr "" -#: ../../whatsnew/3.13.rst:2290 +#: ../../whatsnew/3.13.rst:2306 msgid "``%#T``: As above, but use a colon as the separator" msgstr "" -#: ../../whatsnew/3.13.rst:2291 +#: ../../whatsnew/3.13.rst:2307 msgid "``%N``: Get the fully qualified name of a type" msgstr "" -#: ../../whatsnew/3.13.rst:2292 +#: ../../whatsnew/3.13.rst:2308 msgid "``%#N``: As above, but use a colon as the separator" msgstr "" -#: ../../whatsnew/3.13.rst:2294 +#: ../../whatsnew/3.13.rst:2310 msgid "" "See :pep:`737` for more information. (Contributed by Victor Stinner in :gh:" "`111696`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2297 +#: ../../whatsnew/3.13.rst:2313 msgid "" "You no longer have to define the ``PY_SSIZE_T_CLEAN`` macro before " "including :file:`Python.h` when using ``#`` formats in :ref:`format codes " @@ -4326,7 +4347,7 @@ msgid "" "`104922`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2303 +#: ../../whatsnew/3.13.rst:2319 msgid "" "If Python is built in :ref:`debug mode ` or :option:`with " "assertions <--with-assertions>`, :c:func:`PyTuple_SET_ITEM` and :c:func:" @@ -4334,60 +4355,60 @@ msgid "" "(Contributed by Victor Stinner in :gh:`106168`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2311 +#: ../../whatsnew/3.13.rst:2327 msgid "Limited C API Changes" msgstr "" -#: ../../whatsnew/3.13.rst:2313 +#: ../../whatsnew/3.13.rst:2329 msgid "The following functions are now included in the Limited C API:" msgstr "" -#: ../../whatsnew/3.13.rst:2315 +#: ../../whatsnew/3.13.rst:2331 msgid ":c:func:`PyMem_RawMalloc`" msgstr "" -#: ../../whatsnew/3.13.rst:2316 +#: ../../whatsnew/3.13.rst:2332 msgid ":c:func:`PyMem_RawCalloc`" msgstr "" -#: ../../whatsnew/3.13.rst:2317 +#: ../../whatsnew/3.13.rst:2333 msgid ":c:func:`PyMem_RawRealloc`" msgstr "" -#: ../../whatsnew/3.13.rst:2318 +#: ../../whatsnew/3.13.rst:2334 msgid ":c:func:`PyMem_RawFree`" msgstr "" -#: ../../whatsnew/3.13.rst:2319 +#: ../../whatsnew/3.13.rst:2335 msgid ":c:func:`PySys_Audit`" msgstr "" -#: ../../whatsnew/3.13.rst:2320 +#: ../../whatsnew/3.13.rst:2336 msgid ":c:func:`PySys_AuditTuple`" msgstr "" -#: ../../whatsnew/3.13.rst:2321 +#: ../../whatsnew/3.13.rst:2337 msgid ":c:func:`PyType_GetModuleByDef`" msgstr "" -#: ../../whatsnew/3.13.rst:2323 +#: ../../whatsnew/3.13.rst:2339 msgid "" "(Contributed by Victor Stinner in :gh:`85283`, :gh:`85283`, and :gh:" "`116936`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2325 +#: ../../whatsnew/3.13.rst:2341 msgid "" "Python built with :option:`--with-trace-refs` (tracing references) now " "supports the :ref:`Limited API `. (Contributed by Victor " "Stinner in :gh:`108634`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2331 +#: ../../whatsnew/3.13.rst:2347 msgid "Removed C APIs" msgstr "" -#: ../../whatsnew/3.13.rst:2333 +#: ../../whatsnew/3.13.rst:2349 msgid "" "Remove several functions, macros, variables, etc with names prefixed by " "``_Py`` or ``_PY`` (which are considered private). If your project is " @@ -4397,13 +4418,13 @@ msgid "" "Victor Stinner. (Contributed by Victor Stinner in :gh:`106320`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2341 +#: ../../whatsnew/3.13.rst:2357 msgid "" "Remove old buffer protocols deprecated in Python 3.0. Use :ref:" "`bufferobjects` instead." msgstr "" -#: ../../whatsnew/3.13.rst:2344 +#: ../../whatsnew/3.13.rst:2360 msgid "" ":c:func:`!PyObject_CheckReadBuffer`: Use :c:func:`PyObject_CheckBuffer` to " "test whether the object supports the buffer protocol. Note that :c:func:" @@ -4412,13 +4433,13 @@ msgid "" "example of :c:func:`PyObject_GetBuffer`." msgstr "" -#: ../../whatsnew/3.13.rst:2352 +#: ../../whatsnew/3.13.rst:2368 msgid "" ":c:func:`!PyObject_AsCharBuffer`, :c:func:`!PyObject_AsReadBuffer`: Use :c:" "func:`PyObject_GetBuffer` and :c:func:`PyBuffer_Release` instead:" msgstr "" -#: ../../whatsnew/3.13.rst:2355 +#: ../../whatsnew/3.13.rst:2371 msgid "" "Py_buffer view;\n" "if (PyObject_GetBuffer(obj, &view, PyBUF_SIMPLE) < 0) {\n" @@ -4429,13 +4450,13 @@ msgid "" "PyBuffer_Release(&view);" msgstr "" -#: ../../whatsnew/3.13.rst:2365 +#: ../../whatsnew/3.13.rst:2381 msgid "" ":c:func:`!PyObject_AsWriteBuffer`: Use :c:func:`PyObject_GetBuffer` and :c:" "func:`PyBuffer_Release` instead:" msgstr "" -#: ../../whatsnew/3.13.rst:2368 +#: ../../whatsnew/3.13.rst:2384 msgid "" "Py_buffer view;\n" "if (PyObject_GetBuffer(obj, &view, PyBUF_WRITABLE) < 0) {\n" @@ -4445,21 +4466,21 @@ msgid "" "PyBuffer_Release(&view);" msgstr "" -#: ../../whatsnew/3.13.rst:2377 +#: ../../whatsnew/3.13.rst:2393 msgid "(Contributed by Inada Naoki in :gh:`85275`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2379 +#: ../../whatsnew/3.13.rst:2395 msgid "Remove various functions deprecated in Python 3.9:" msgstr "" -#: ../../whatsnew/3.13.rst:2381 +#: ../../whatsnew/3.13.rst:2397 msgid "" ":c:func:`!PyEval_CallObject`, :c:func:`!PyEval_CallObjectWithKeywords`: Use :" "c:func:`PyObject_CallNoArgs` or :c:func:`PyObject_Call` instead." msgstr "" -#: ../../whatsnew/3.13.rst:2386 +#: ../../whatsnew/3.13.rst:2402 msgid "" "In :c:func:`PyObject_Call`, positional arguments must be a :class:`tuple` " "and must not be ``NULL``, and keyword arguments must be a :class:`dict` or " @@ -4470,106 +4491,106 @@ msgid "" "`PyTuple_New(0) `." msgstr "" -#: ../../whatsnew/3.13.rst:2396 +#: ../../whatsnew/3.13.rst:2412 msgid "" ":c:func:`!PyEval_CallFunction`: Use :c:func:`PyObject_CallFunction` instead." msgstr "" -#: ../../whatsnew/3.13.rst:2398 +#: ../../whatsnew/3.13.rst:2414 msgid "" ":c:func:`!PyEval_CallMethod`: Use :c:func:`PyObject_CallMethod` instead." msgstr "" -#: ../../whatsnew/3.13.rst:2400 +#: ../../whatsnew/3.13.rst:2416 msgid ":c:func:`!PyCFunction_Call`: Use :c:func:`PyObject_Call` instead." msgstr "" -#: ../../whatsnew/3.13.rst:2403 +#: ../../whatsnew/3.13.rst:2419 msgid "(Contributed by Victor Stinner in :gh:`105107`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2405 +#: ../../whatsnew/3.13.rst:2421 msgid "" "Remove the following old functions to configure the Python initialization, " "deprecated in Python 3.11:" msgstr "" -#: ../../whatsnew/3.13.rst:2408 +#: ../../whatsnew/3.13.rst:2424 msgid "" ":c:func:`!PySys_AddWarnOptionUnicode`: Use :c:member:`PyConfig.warnoptions` " "instead." msgstr "" -#: ../../whatsnew/3.13.rst:2410 +#: ../../whatsnew/3.13.rst:2426 msgid "" ":c:func:`!PySys_AddWarnOption`: Use :c:member:`PyConfig.warnoptions` instead." msgstr "" -#: ../../whatsnew/3.13.rst:2412 +#: ../../whatsnew/3.13.rst:2428 msgid ":c:func:`!PySys_AddXOption`: Use :c:member:`PyConfig.xoptions` instead." msgstr "" -#: ../../whatsnew/3.13.rst:2414 +#: ../../whatsnew/3.13.rst:2430 msgid "" ":c:func:`!PySys_HasWarnOptions`: Use :c:member:`PyConfig.xoptions` instead." msgstr "" -#: ../../whatsnew/3.13.rst:2416 +#: ../../whatsnew/3.13.rst:2432 msgid "" ":c:func:`!PySys_SetPath`: Set :c:member:`PyConfig.module_search_paths` " "instead." msgstr "" -#: ../../whatsnew/3.13.rst:2418 +#: ../../whatsnew/3.13.rst:2434 msgid "" ":c:func:`!Py_SetPath`: Set :c:member:`PyConfig.module_search_paths` instead." msgstr "" -#: ../../whatsnew/3.13.rst:2420 +#: ../../whatsnew/3.13.rst:2436 msgid "" ":c:func:`!Py_SetStandardStreamEncoding`: Set :c:member:`PyConfig." "stdio_encoding` instead, and set also maybe :c:member:`PyConfig." "legacy_windows_stdio` (on Windows)." msgstr "" -#: ../../whatsnew/3.13.rst:2423 +#: ../../whatsnew/3.13.rst:2439 msgid "" ":c:func:`!_Py_SetProgramFullPath`: Set :c:member:`PyConfig.executable` " "instead." msgstr "" -#: ../../whatsnew/3.13.rst:2426 +#: ../../whatsnew/3.13.rst:2442 msgid "" "Use the new :c:type:`PyConfig` API of the :ref:`Python Initialization " "Configuration ` instead (:pep:`587`), added to Python 3.8. " "(Contributed by Victor Stinner in :gh:`105145`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2430 +#: ../../whatsnew/3.13.rst:2446 msgid "" "Remove :c:func:`!PyEval_AcquireLock` and :c:func:`!PyEval_ReleaseLock` " "functions, deprecated in Python 3.2. They didn't update the current thread " "state. They can be replaced with:" msgstr "" -#: ../../whatsnew/3.13.rst:2435 +#: ../../whatsnew/3.13.rst:2451 msgid ":c:func:`PyEval_SaveThread` and :c:func:`PyEval_RestoreThread`;" msgstr "" -#: ../../whatsnew/3.13.rst:2436 +#: ../../whatsnew/3.13.rst:2452 msgid "" "low-level :c:func:`PyEval_AcquireThread` and :c:func:`PyEval_RestoreThread`;" msgstr "" -#: ../../whatsnew/3.13.rst:2437 +#: ../../whatsnew/3.13.rst:2453 msgid "or :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release`." msgstr "" -#: ../../whatsnew/3.13.rst:2439 +#: ../../whatsnew/3.13.rst:2455 msgid "(Contributed by Victor Stinner in :gh:`105182`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2441 +#: ../../whatsnew/3.13.rst:2457 msgid "" "Remove the :c:func:`!PyEval_ThreadsInitialized` function, deprecated in " "Python 3.9. Since Python 3.7, :c:func:`!Py_Initialize` always creates the " @@ -4578,7 +4599,7 @@ msgid "" "Stinner in :gh:`105182`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2448 +#: ../../whatsnew/3.13.rst:2464 msgid "" "Remove the :c:func:`!_PyInterpreterState_Get` alias to :c:func:" "`PyInterpreterState_Get()` which was kept for backward compatibility with " @@ -4587,26 +4608,26 @@ msgid "" "Stinner in :gh:`106320`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2455 +#: ../../whatsnew/3.13.rst:2471 msgid "" "Remove the private :c:func:`!_PyObject_FastCall` function: use :c:func:`!" "PyObject_Vectorcall` which is available since Python 3.8 (:pep:`590`). " "(Contributed by Victor Stinner in :gh:`106023`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2460 +#: ../../whatsnew/3.13.rst:2476 msgid "" "Remove the ``cpython/pytime.h`` header file, which only contained private " "functions. (Contributed by Victor Stinner in :gh:`106316`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2464 +#: ../../whatsnew/3.13.rst:2480 msgid "" "Remove the undocumented ``PY_TIMEOUT_MAX`` constant from the limited C API. " "(Contributed by Victor Stinner in :gh:`110014`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2467 +#: ../../whatsnew/3.13.rst:2483 msgid "" "Remove the old trashcan macros ``Py_TRASHCAN_SAFE_BEGIN`` and " "``Py_TRASHCAN_SAFE_END``. Replace both with the new macros " @@ -4614,73 +4635,73 @@ msgid "" "in :gh:`105111`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2474 +#: ../../whatsnew/3.13.rst:2490 msgid "Deprecated C APIs" msgstr "" -#: ../../whatsnew/3.13.rst:2476 +#: ../../whatsnew/3.13.rst:2492 msgid "Deprecate old Python initialization functions:" msgstr "" -#: ../../whatsnew/3.13.rst:2478 -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:63 +#: ../../whatsnew/3.13.rst:2494 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:62 msgid "" ":c:func:`PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!" "warnings.filters` instead." msgstr "" -#: ../../whatsnew/3.13.rst:2480 +#: ../../whatsnew/3.13.rst:2496 msgid ":c:func:`Py_GetExecPrefix`: Get :data:`sys.exec_prefix` instead." msgstr "" -#: ../../whatsnew/3.13.rst:2482 +#: ../../whatsnew/3.13.rst:2498 msgid ":c:func:`Py_GetPath`: Get :data:`sys.path` instead." msgstr "" -#: ../../whatsnew/3.13.rst:2484 +#: ../../whatsnew/3.13.rst:2500 msgid ":c:func:`Py_GetPrefix`: Get :data:`sys.prefix` instead." msgstr "" -#: ../../whatsnew/3.13.rst:2486 +#: ../../whatsnew/3.13.rst:2502 msgid ":c:func:`Py_GetProgramFullPath`: Get :data:`sys.executable` instead." msgstr "" -#: ../../whatsnew/3.13.rst:2488 +#: ../../whatsnew/3.13.rst:2504 msgid ":c:func:`Py_GetProgramName`: Get :data:`sys.executable` instead." msgstr "" -#: ../../whatsnew/3.13.rst:2490 +#: ../../whatsnew/3.13.rst:2506 msgid "" ":c:func:`Py_GetPythonHome`: Get :c:member:`PyConfig.home` or the :envvar:" "`PYTHONHOME` environment variable instead." msgstr "" -#: ../../whatsnew/3.13.rst:2494 +#: ../../whatsnew/3.13.rst:2510 msgid "(Contributed by Victor Stinner in :gh:`105145`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2496 +#: ../../whatsnew/3.13.rst:2512 msgid "" ":term:`Soft deprecate ` the :c:func:`PyEval_GetBuiltins`, :" "c:func:`PyEval_GetGlobals`, and :c:func:`PyEval_GetLocals` functions, which " "return a :term:`borrowed reference`. (Soft deprecated as part of :pep:`667`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2502 +#: ../../whatsnew/3.13.rst:2518 msgid "" "Deprecate the :c:func:`PyImport_ImportModuleNoBlock` function, which is just " "an alias to :c:func:`PyImport_ImportModule` since Python 3.3. (Contributed " "by Victor Stinner in :gh:`105396`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2506 +#: ../../whatsnew/3.13.rst:2522 msgid "" ":term:`Soft deprecate ` the :c:func:`PyModule_AddObject` " "function. It should be replaced with :c:func:`PyModule_Add` or :c:func:" "`PyModule_AddObjectRef`. (Contributed by Serhiy Storchaka in :gh:`86493`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2512 +#: ../../whatsnew/3.13.rst:2528 msgid "" "Deprecate the old ``Py_UNICODE`` and ``PY_UNICODE_TYPE`` types and the :c:" "macro:`!Py_UNICODE_WIDE` define. Use the :c:type:`wchar_t` type directly " @@ -4689,7 +4710,7 @@ msgid "" "`105156`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2519 +#: ../../whatsnew/3.13.rst:2535 msgid "" "Deprecate the :c:func:`PyWeakref_GetObject` and :c:func:" "`PyWeakref_GET_OBJECT` functions, which return a :term:`borrowed reference`. " @@ -4712,16 +4733,12 @@ msgid "" msgstr "" #: ../../deprecations/c-api-pending-removal-in-3.15.rst:4 -msgid "The bundled copy of ``libmpdecimal``." -msgstr "" - -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:5 msgid "" "The :c:func:`PyImport_ImportModuleNoBlock`: Use :c:func:" "`PyImport_ImportModule` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:7 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:6 msgid "" ":c:func:`PyWeakref_GetObject` and :c:func:`PyWeakref_GET_OBJECT`: Use :c:" "func:`PyWeakref_GetRef` instead. The `pythoncapi-compat project ` (:data:`sys.path`) instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:28 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:27 msgid "" ":c:func:`Py_GetPrefix`: Use :c:func:`PyConfig_Get(\"base_prefix\") " "` (:data:`sys.base_prefix`) instead. Use :c:func:" @@ -4777,7 +4794,7 @@ msgid "" "`virtual environments ` need to be handled." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:33 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:32 msgid "" ":c:func:`Py_GetExecPrefix`: Use :c:func:`PyConfig_Get(\"base_exec_prefix\") " "` (:data:`sys.base_exec_prefix`) instead. Use :c:func:" @@ -4785,170 +4802,170 @@ msgid "" "ref:`virtual environments ` need to be handled." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:39 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:38 msgid "" ":c:func:`Py_GetProgramFullPath`: Use :c:func:`PyConfig_Get(\"executable\") " "` (:data:`sys.executable`) instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:42 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:41 msgid "" ":c:func:`Py_GetProgramName`: Use :c:func:`PyConfig_Get(\"executable\") " "` (:data:`sys.executable`) instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:45 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:44 msgid "" ":c:func:`Py_GetPythonHome`: Use :c:func:`PyConfig_Get(\"home\") " "` or the :envvar:`PYTHONHOME` environment variable instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:49 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:48 msgid "" "The `pythoncapi-compat project `__ can be used to get :c:func:`PyConfig_Get` on Python 3.13 and older." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:53 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:52 msgid "" "Functions to configure Python's initialization, deprecated in Python 3.11:" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:55 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:54 msgid ":c:func:`!PySys_SetArgvEx()`: Set :c:member:`PyConfig.argv` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:57 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:56 msgid ":c:func:`!PySys_SetArgv()`: Set :c:member:`PyConfig.argv` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:59 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:58 msgid "" ":c:func:`!Py_SetProgramName()`: Set :c:member:`PyConfig.program_name` " "instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:61 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:60 msgid ":c:func:`!Py_SetPythonHome()`: Set :c:member:`PyConfig.home` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:66 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:65 msgid "" "The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:" "`PyConfig` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:69 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:68 msgid "Global configuration variables:" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:71 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:70 msgid "" ":c:var:`Py_DebugFlag`: Use :c:member:`PyConfig.parser_debug` or :c:func:" "`PyConfig_Get(\"parser_debug\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:74 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:73 msgid "" ":c:var:`Py_VerboseFlag`: Use :c:member:`PyConfig.verbose` or :c:func:" "`PyConfig_Get(\"verbose\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:77 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:76 msgid "" ":c:var:`Py_QuietFlag`: Use :c:member:`PyConfig.quiet` or :c:func:" "`PyConfig_Get(\"quiet\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:80 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:79 msgid "" ":c:var:`Py_InteractiveFlag`: Use :c:member:`PyConfig.interactive` or :c:func:" "`PyConfig_Get(\"interactive\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:83 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:82 msgid "" ":c:var:`Py_InspectFlag`: Use :c:member:`PyConfig.inspect` or :c:func:" "`PyConfig_Get(\"inspect\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:86 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:85 msgid "" ":c:var:`Py_OptimizeFlag`: Use :c:member:`PyConfig.optimization_level` or :c:" "func:`PyConfig_Get(\"optimization_level\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:89 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:88 msgid "" ":c:var:`Py_NoSiteFlag`: Use :c:member:`PyConfig.site_import` or :c:func:" "`PyConfig_Get(\"site_import\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:92 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:91 msgid "" ":c:var:`Py_BytesWarningFlag`: Use :c:member:`PyConfig.bytes_warning` or :c:" "func:`PyConfig_Get(\"bytes_warning\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:95 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:94 msgid "" ":c:var:`Py_FrozenFlag`: Use :c:member:`PyConfig.pathconfig_warnings` or :c:" "func:`PyConfig_Get(\"pathconfig_warnings\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:98 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:97 msgid "" ":c:var:`Py_IgnoreEnvironmentFlag`: Use :c:member:`PyConfig.use_environment` " "or :c:func:`PyConfig_Get(\"use_environment\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:101 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:100 msgid "" ":c:var:`Py_DontWriteBytecodeFlag`: Use :c:member:`PyConfig.write_bytecode` " "or :c:func:`PyConfig_Get(\"write_bytecode\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:104 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:103 msgid "" ":c:var:`Py_NoUserSiteDirectory`: Use :c:member:`PyConfig." "user_site_directory` or :c:func:`PyConfig_Get(\"user_site_directory\") " "` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:107 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:106 msgid "" ":c:var:`Py_UnbufferedStdioFlag`: Use :c:member:`PyConfig.buffered_stdio` or :" "c:func:`PyConfig_Get(\"buffered_stdio\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:110 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:109 msgid "" ":c:var:`Py_HashRandomizationFlag`: Use :c:member:`PyConfig.use_hash_seed` " "and :c:member:`PyConfig.hash_seed` or :c:func:`PyConfig_Get(\"hash_seed\") " "` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:114 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:113 msgid "" ":c:var:`Py_IsolatedFlag`: Use :c:member:`PyConfig.isolated` or :c:func:" "`PyConfig_Get(\"isolated\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:117 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:116 msgid "" ":c:var:`Py_LegacyWindowsFSEncodingFlag`: Use :c:member:`PyPreConfig." "legacy_windows_fs_encoding` or :c:func:" "`PyConfig_Get(\"legacy_windows_fs_encoding\") ` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:120 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:119 msgid "" ":c:var:`Py_LegacyWindowsStdioFlag`: Use :c:member:`PyConfig." "legacy_windows_stdio` or :c:func:`PyConfig_Get(\"legacy_windows_stdio\") " "` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:123 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:122 msgid "" ":c:var:`!Py_FileSystemDefaultEncoding`, :c:var:`!" "Py_HasFileSystemDefaultEncoding`: Use :c:member:`PyConfig." @@ -4956,27 +4973,31 @@ msgid "" "` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:126 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:125 msgid "" ":c:var:`!Py_FileSystemDefaultEncodeErrors`: Use :c:member:`PyConfig." "filesystem_errors` or :c:func:`PyConfig_Get(\"filesystem_errors\") " "` instead." msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:129 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:128 msgid "" ":c:var:`!Py_UTF8Mode`: Use :c:member:`PyPreConfig.utf8_mode` or :c:func:" "`PyConfig_Get(\"utf8_mode\") ` instead. (see :c:func:" "`Py_PreInitialize`)" msgstr "" -#: ../../deprecations/c-api-pending-removal-in-3.15.rst:134 +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:133 msgid "" "The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:" "`PyConfig` to set these options. Or :c:func:`PyConfig_Get` can be used to " "get these options at runtime." msgstr "" +#: ../../deprecations/c-api-pending-removal-in-3.16.rst:4 +msgid "The bundled copy of ``libmpdec``." +msgstr "" + #: ../../deprecations/c-api-pending-removal-in-3.18.rst:2 msgid "Pending removal in Python 3.18" msgstr "" @@ -5191,56 +5212,56 @@ msgstr "" msgid ":c:func:`PyThread_ReInitTLS`: Unneeded since Python 3.7." msgstr "" -#: ../../whatsnew/3.13.rst:2541 +#: ../../whatsnew/3.13.rst:2559 msgid "Build Changes" msgstr "" -#: ../../whatsnew/3.13.rst:2543 +#: ../../whatsnew/3.13.rst:2561 msgid "" "``arm64-apple-ios`` and ``arm64-apple-ios-simulator`` are both now :pep:`11` " "tier 3 platforms. (:ref:`PEP 730 ` written and " "implementation contributed by Russell Keith-Magee in :gh:`114099`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2548 +#: ../../whatsnew/3.13.rst:2566 msgid "" "``aarch64-linux-android`` and ``x86_64-linux-android`` are both now :pep:" "`11` tier 3 platforms. (:ref:`PEP 738 ` " "written and implementation contributed by Malcolm Smith in :gh:`116622`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2553 +#: ../../whatsnew/3.13.rst:2571 msgid "" "``wasm32-wasi`` is now a :pep:`11` tier 2 platform. (Contributed by Brett " "Cannon in :gh:`115192`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2556 +#: ../../whatsnew/3.13.rst:2574 msgid "" "``wasm32-emscripten`` is no longer a :pep:`11` supported platform. " "(Contributed by Brett Cannon in :gh:`115192`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2559 +#: ../../whatsnew/3.13.rst:2577 msgid "" "Building CPython now requires a compiler with support for the C11 atomic " "library, GCC built-in atomic functions, or MSVC interlocked intrinsics." msgstr "" -#: ../../whatsnew/3.13.rst:2562 +#: ../../whatsnew/3.13.rst:2580 msgid "" "Autoconf 2.71 and aclocal 1.16.5 are now required to regenerate the :file:" "`configure` script. (Contributed by Christian Heimes in :gh:`89886` and by " "Victor Stinner in :gh:`112090`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2566 +#: ../../whatsnew/3.13.rst:2584 msgid "" "SQLite 3.15.2 or newer is required to build the :mod:`sqlite3` extension " "module. (Contributed by Erlend Aasland in :gh:`105875`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2570 +#: ../../whatsnew/3.13.rst:2588 msgid "" "CPython now bundles the `mimalloc library`_ by default. It is licensed under " "the MIT license; see :ref:`mimalloc license `. The bundled " @@ -5248,28 +5269,27 @@ msgid "" "Dino Viehland in :gh:`109914`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2578 +#: ../../whatsnew/3.13.rst:2596 msgid "" "The :file:`configure` option :option:`--with-system-libmpdec` now defaults " -"to ``yes``. The bundled copy of ``libmpdecimal`` will be removed in Python " -"3.15." +"to ``yes``. The bundled copy of ``libmpdec`` will be removed in Python 3.16." msgstr "" -#: ../../whatsnew/3.13.rst:2582 +#: ../../whatsnew/3.13.rst:2600 msgid "" "Python built with :file:`configure` :option:`--with-trace-refs` (tracing " "references) is now ABI compatible with the Python release build and :ref:" "`debug build `. (Contributed by Victor Stinner in :gh:`108634`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2587 +#: ../../whatsnew/3.13.rst:2605 msgid "" "On POSIX systems, the pkg-config (``.pc``) filenames now include the ABI " "flags. For example, the free-threaded build generates ``python-3.13t.pc`` " "and the debug build generates ``python-3.13d.pc``." msgstr "" -#: ../../whatsnew/3.13.rst:2591 +#: ../../whatsnew/3.13.rst:2609 msgid "" "The ``errno``, ``fcntl``, ``grp``, ``md5``, ``pwd``, ``resource``, " "``termios``, ``winsound``, ``_ctypes_test``, ``_multiprocessing." @@ -5279,27 +5299,27 @@ msgid "" "`85283`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2600 +#: ../../whatsnew/3.13.rst:2618 msgid "Porting to Python 3.13" msgstr "" -#: ../../whatsnew/3.13.rst:2602 +#: ../../whatsnew/3.13.rst:2620 msgid "" "This section lists previously described changes and other bugfixes that may " "require changes to your code." msgstr "" -#: ../../whatsnew/3.13.rst:2606 +#: ../../whatsnew/3.13.rst:2624 msgid "Changes in the Python API" msgstr "" -#: ../../whatsnew/3.13.rst:2610 +#: ../../whatsnew/3.13.rst:2628 msgid "" ":ref:`PEP 667 ` introduces several changes to " "the semantics of :func:`locals` and :attr:`f_locals `:" msgstr "" -#: ../../whatsnew/3.13.rst:2613 +#: ../../whatsnew/3.13.rst:2631 msgid "" "Calling :func:`locals` in an :term:`optimized scope` now produces an " "independent snapshot on each call, and hence no longer implicitly updates " @@ -5311,7 +5331,7 @@ msgid "" "scope. (Changed as part of :pep:`667`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2622 +#: ../../whatsnew/3.13.rst:2640 msgid "" "Calling :func:`locals` from a comprehension at module or class scope " "(including via ``exec`` or ``eval``) once more behaves as if the " @@ -5321,7 +5341,7 @@ msgid "" "implementing :pep:`709`. (Changed as part of :pep:`667`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2629 +#: ../../whatsnew/3.13.rst:2647 msgid "" "Accessing :attr:`FrameType.f_locals ` in an :term:`optimized " "scope` now returns a write-through proxy rather than a snapshot that gets " @@ -5330,7 +5350,7 @@ msgid "" "of :pep:`667`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2635 +#: ../../whatsnew/3.13.rst:2653 msgid "" ":class:`functools.partial` now emits a :exc:`FutureWarning` when used as a " "method. The behavior will change in future Python versions. Wrap it in :func:" @@ -5338,14 +5358,14 @@ msgid "" "Serhiy Storchaka in :gh:`121027`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2641 +#: ../../whatsnew/3.13.rst:2659 msgid "" "An :exc:`OSError` is now raised by :func:`getpass.getuser` for any failure " "to retrieve a username, instead of :exc:`ImportError` on non-Unix platforms " "or :exc:`KeyError` on Unix platforms where the password database is empty." msgstr "" -#: ../../whatsnew/3.13.rst:2646 +#: ../../whatsnew/3.13.rst:2664 msgid "" "The value of the :attr:`!mode` attribute of :class:`gzip.GzipFile` is now a " "string (``'rb'`` or ``'wb'``) instead of an integer (``1`` or ``2``). The " @@ -5354,13 +5374,13 @@ msgid "" "(Contributed by Serhiy Storchaka in :gh:`115961`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2652 +#: ../../whatsnew/3.13.rst:2670 msgid "" ":class:`mailbox.Maildir` now ignores files with a leading dot (``.``). " "(Contributed by Zackery Spytz in :gh:`65559`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2655 +#: ../../whatsnew/3.13.rst:2673 msgid "" ":meth:`pathlib.Path.glob` and :meth:`~pathlib.Path.rglob` now return both " "files and directories if a pattern that ends with \"``**``\" is given, " @@ -5368,25 +5388,25 @@ msgid "" "behavior and only match directories." msgstr "" -#: ../../whatsnew/3.13.rst:2660 +#: ../../whatsnew/3.13.rst:2678 msgid "" "The :mod:`threading` module now expects the :mod:`!_thread` module to have " "an :func:`!_is_main_interpreter` function. This function takes no arguments " "and returns ``True`` if the current interpreter is the main interpreter." msgstr "" -#: ../../whatsnew/3.13.rst:2665 +#: ../../whatsnew/3.13.rst:2683 msgid "" "Any library or application that provides a custom :mod:`!_thread` module " "must provide :func:`!_is_main_interpreter`, just like the module's other " "\"private\" attributes. (:gh:`112826`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2672 +#: ../../whatsnew/3.13.rst:2690 msgid "Changes in the C API" msgstr "" -#: ../../whatsnew/3.13.rst:2674 +#: ../../whatsnew/3.13.rst:2692 msgid "" "``Python.h`` no longer includes the ```` standard header. It was " "included for the :c:func:`!finite` function which is now provided by the " @@ -5395,7 +5415,7 @@ msgid "" "`108765`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2680 +#: ../../whatsnew/3.13.rst:2698 msgid "" "``Python.h`` no longer includes these standard header files: ````, " "```` and ````. If needed, they should now be " @@ -5406,7 +5426,7 @@ msgid "" "Victor Stinner in :gh:`108765`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2688 +#: ../../whatsnew/3.13.rst:2706 msgid "" "On Windows, ``Python.h`` no longer includes the ```` standard " "header file. If needed, it should now be included explicitly. For example, " @@ -5416,7 +5436,7 @@ msgid "" "(Contributed by Victor Stinner in :gh:`108765`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2695 +#: ../../whatsnew/3.13.rst:2713 msgid "" "If the :c:macro:`Py_LIMITED_API` macro is defined, :c:macro:`!" "Py_BUILD_CORE`, :c:macro:`!Py_BUILD_CORE_BUILTIN` and :c:macro:`!" @@ -5424,18 +5444,18 @@ msgid "" "(Contributed by Victor Stinner in :gh:`85283`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2700 +#: ../../whatsnew/3.13.rst:2718 msgid "" "The old trashcan macros ``Py_TRASHCAN_SAFE_BEGIN`` and " "``Py_TRASHCAN_SAFE_END`` were removed. They should be replaced by the new " "macros ``Py_TRASHCAN_BEGIN`` and ``Py_TRASHCAN_END``." msgstr "" -#: ../../whatsnew/3.13.rst:2704 +#: ../../whatsnew/3.13.rst:2722 msgid "A ``tp_dealloc`` function that has the old macros, such as::" msgstr "" -#: ../../whatsnew/3.13.rst:2706 +#: ../../whatsnew/3.13.rst:2724 msgid "" "static void\n" "mytype_dealloc(mytype *p)\n" @@ -5447,11 +5467,11 @@ msgid "" "}" msgstr "" -#: ../../whatsnew/3.13.rst:2715 +#: ../../whatsnew/3.13.rst:2733 msgid "should migrate to the new macros as follows::" msgstr "" -#: ../../whatsnew/3.13.rst:2717 +#: ../../whatsnew/3.13.rst:2735 msgid "" "static void\n" "mytype_dealloc(mytype *p)\n" @@ -5463,7 +5483,7 @@ msgid "" "}" msgstr "" -#: ../../whatsnew/3.13.rst:2726 +#: ../../whatsnew/3.13.rst:2744 msgid "" "Note that ``Py_TRASHCAN_BEGIN`` has a second argument which should be the " "deallocation function it is in. The new macros were added in Python 3.8 and " @@ -5471,13 +5491,13 @@ msgid "" "in :gh:`105111`.)" msgstr "" -#: ../../whatsnew/3.13.rst:2733 +#: ../../whatsnew/3.13.rst:2751 msgid "" ":ref:`PEP 667 ` introduces several changes to " "frame-related functions:" msgstr "" -#: ../../whatsnew/3.13.rst:2736 +#: ../../whatsnew/3.13.rst:2754 msgid "" "The effects of mutating the dictionary returned from :c:func:" "`PyEval_GetLocals` in an :term:`optimized scope` have changed. New dict " @@ -5491,7 +5511,7 @@ msgid "" "being used, so refer to the deprecation notice on the function for details." msgstr "" -#: ../../whatsnew/3.13.rst:2749 +#: ../../whatsnew/3.13.rst:2767 msgid "" "Calling :c:func:`PyFrame_GetLocals` in an :term:`optimized scope` now " "returns a write-through proxy rather than a snapshot that gets updated at " @@ -5500,126 +5520,126 @@ msgid "" "`PyEval_GetFrameLocals` API." msgstr "" -#: ../../whatsnew/3.13.rst:2756 +#: ../../whatsnew/3.13.rst:2774 msgid "" ":c:func:`!PyFrame_FastToLocals` and :c:func:`!PyFrame_FastToLocalsWithError` " "no longer have any effect. Calling these functions has been redundant since " "Python 3.11, when :c:func:`PyFrame_GetLocals` was first introduced." msgstr "" -#: ../../whatsnew/3.13.rst:2761 +#: ../../whatsnew/3.13.rst:2779 msgid "" ":c:func:`!PyFrame_LocalsToFast` no longer has any effect. Calling this " "function is redundant now that :c:func:`PyFrame_GetLocals` returns a write-" "through proxy for :term:`optimized scopes `." msgstr "" -#: ../../whatsnew/3.13.rst:2765 +#: ../../whatsnew/3.13.rst:2783 msgid "" "Python 3.13 removed many private functions. Some of them can be replaced " "using these alternatives:" msgstr "" -#: ../../whatsnew/3.13.rst:2768 +#: ../../whatsnew/3.13.rst:2786 msgid "``_PyDict_Pop()``: :c:func:`PyDict_Pop` or :c:func:`PyDict_PopString`;" msgstr "" -#: ../../whatsnew/3.13.rst:2769 +#: ../../whatsnew/3.13.rst:2787 msgid "``_PyDict_GetItemWithError()``: :c:func:`PyDict_GetItemRef`;" msgstr "" -#: ../../whatsnew/3.13.rst:2770 +#: ../../whatsnew/3.13.rst:2788 msgid "``_PyErr_WriteUnraisableMsg()``: :c:func:`PyErr_FormatUnraisable`;" msgstr "" -#: ../../whatsnew/3.13.rst:2771 +#: ../../whatsnew/3.13.rst:2789 msgid "" "``_PyEval_SetTrace()``: :c:func:`PyEval_SetTrace` or :c:func:" "`PyEval_SetTraceAllThreads`;" msgstr "" -#: ../../whatsnew/3.13.rst:2772 +#: ../../whatsnew/3.13.rst:2790 msgid "``_PyList_Extend()``: :c:func:`PyList_Extend`;" msgstr "" -#: ../../whatsnew/3.13.rst:2773 +#: ../../whatsnew/3.13.rst:2791 msgid "``_PyLong_AsInt()``: :c:func:`PyLong_AsInt`;" msgstr "" -#: ../../whatsnew/3.13.rst:2774 +#: ../../whatsnew/3.13.rst:2792 msgid "``_PyMem_RawStrdup()``: ``strdup()``;" msgstr "" -#: ../../whatsnew/3.13.rst:2775 +#: ../../whatsnew/3.13.rst:2793 msgid "``_PyMem_Strdup()``: ``strdup()``;" msgstr "" -#: ../../whatsnew/3.13.rst:2776 +#: ../../whatsnew/3.13.rst:2794 msgid "``_PyObject_ClearManagedDict()``: :c:func:`PyObject_ClearManagedDict`;" msgstr "" -#: ../../whatsnew/3.13.rst:2777 +#: ../../whatsnew/3.13.rst:2795 msgid "``_PyObject_VisitManagedDict()``: :c:func:`PyObject_VisitManagedDict`;" msgstr "" -#: ../../whatsnew/3.13.rst:2778 +#: ../../whatsnew/3.13.rst:2796 msgid "" "``_PyThreadState_UncheckedGet()``: :c:func:`PyThreadState_GetUnchecked()`;" msgstr "" -#: ../../whatsnew/3.13.rst:2779 +#: ../../whatsnew/3.13.rst:2797 msgid "``_PyTime_AsSecondsDouble()``: :c:func:`PyTime_AsSecondsDouble`;" msgstr "" -#: ../../whatsnew/3.13.rst:2780 +#: ../../whatsnew/3.13.rst:2798 msgid "" "``_PyTime_GetMonotonicClock()``: :c:func:`PyTime_Monotonic` or :c:func:" "`PyTime_MonotonicRaw`;" msgstr "" -#: ../../whatsnew/3.13.rst:2781 +#: ../../whatsnew/3.13.rst:2799 msgid "" "``_PyTime_GetPerfCounter()``: :c:func:`PyTime_PerfCounter` or :c:func:" "`PyTime_PerfCounterRaw`;" msgstr "" -#: ../../whatsnew/3.13.rst:2782 +#: ../../whatsnew/3.13.rst:2800 msgid "" "``_PyTime_GetSystemClock()``: :c:func:`PyTime_Time` or :c:func:" "`PyTime_TimeRaw`;" msgstr "" -#: ../../whatsnew/3.13.rst:2783 +#: ../../whatsnew/3.13.rst:2801 msgid "``_PyTime_MAX``: :c:var:`PyTime_MAX`;" msgstr "" -#: ../../whatsnew/3.13.rst:2784 +#: ../../whatsnew/3.13.rst:2802 msgid "``_PyTime_MIN``: :c:var:`PyTime_MIN`;" msgstr "" -#: ../../whatsnew/3.13.rst:2785 +#: ../../whatsnew/3.13.rst:2803 msgid "``_PyTime_t``: :c:type:`PyTime_t`;" msgstr "" -#: ../../whatsnew/3.13.rst:2786 +#: ../../whatsnew/3.13.rst:2804 msgid "``_Py_HashPointer()``: :c:func:`Py_HashPointer`;" msgstr "" -#: ../../whatsnew/3.13.rst:2787 +#: ../../whatsnew/3.13.rst:2805 msgid "``_Py_IsFinalizing()``: :c:func:`Py_IsFinalizing`." msgstr "" -#: ../../whatsnew/3.13.rst:2789 +#: ../../whatsnew/3.13.rst:2807 msgid "" "The `pythoncapi-compat project`_ can be used to get most of these new " "functions on Python 3.12 and older." msgstr "" -#: ../../whatsnew/3.13.rst:2793 +#: ../../whatsnew/3.13.rst:2811 msgid "Regression Test Changes" msgstr "" -#: ../../whatsnew/3.13.rst:2795 +#: ../../whatsnew/3.13.rst:2813 msgid "" "Python built with :file:`configure` :option:`--with-pydebug` now supports a :" "option:`-X presite=package.module <-X>` command-line option. If used, it " diff --git a/whatsnew/3.2.po b/whatsnew/3.2.po index 4fd9b7ec7..49e561a03 100644 --- a/whatsnew/3.2.po +++ b/whatsnew/3.2.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-29 13:04+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/whatsnew/3.3.po b/whatsnew/3.3.po index 695745b8c..924963abd 100644 --- a/whatsnew/3.3.po +++ b/whatsnew/3.3.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-29 13:04+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/whatsnew/3.4.po b/whatsnew/3.4.po index 1ed66df4a..f8d94daa8 100644 --- a/whatsnew/3.4.po +++ b/whatsnew/3.4.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-29 13:04+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/whatsnew/3.5.po b/whatsnew/3.5.po index 92cf4aae6..4c0c4c4f6 100644 --- a/whatsnew/3.5.po +++ b/whatsnew/3.5.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-29 13:04+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/whatsnew/3.6.po b/whatsnew/3.6.po index fa3ecd37c..ab8419af4 100644 --- a/whatsnew/3.6.po +++ b/whatsnew/3.6.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-29 13:04+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/whatsnew/3.7.po b/whatsnew/3.7.po index 5edb340f7..3e7358ba8 100644 --- a/whatsnew/3.7.po +++ b/whatsnew/3.7.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-09 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-29 13:04+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/whatsnew/3.8.po b/whatsnew/3.8.po index addb98f55..62ab331b2 100644 --- a/whatsnew/3.8.po +++ b/whatsnew/3.8.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-29 13:04+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" diff --git a/whatsnew/3.9.po b/whatsnew/3.9.po index 81e468db7..ec97bae8f 100644 --- a/whatsnew/3.9.po +++ b/whatsnew/3.9.po @@ -5,15 +5,16 @@ # # Translators: # Alireza Shabani (Revisto) , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-08 02:53-0300\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-29 13:04+0000\n" -"Last-Translator: Alireza Shabani (Revisto) , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -635,8 +636,8 @@ msgstr "" #: ../../whatsnew/3.9.rst:426 msgid "" -"Added constants :const:`~fcntl.F_OFD_GETLK`, :const:`~fcntl.F_OFD_SETLK` " -"and :const:`~fcntl.F_OFD_SETLKW`. (Contributed by Donghee Na in :issue:" +"Added constants :const:`!fcntl.F_OFD_GETLK`, :const:`!fcntl.F_OFD_SETLK` " +"and :const:`!fcntl.F_OFD_SETLKW`. (Contributed by Donghee Na in :issue:" "`38602`.)" msgstr "" @@ -991,7 +992,7 @@ msgstr "" #: ../../whatsnew/3.9.rst:647 msgid "" -"Added a new :attr:`random.Random.randbytes` method: generate random bytes. " +"Added a new :meth:`random.Random.randbytes` method: generate random bytes. " "(Contributed by Victor Stinner in :issue:`40286`.)" msgstr "" @@ -1203,7 +1204,7 @@ msgstr "" #: ../../whatsnew/3.9.rst:779 msgid "" -"Optimized :func:`~set.difference_update` for the case when the other set is " +"Optimized :meth:`!set.difference_update` for the case when the other set is " "much larger than the base set. (Suggested by Evgeny Kapun with code " "contributed by Michele Orrù in :issue:`8425`.)" msgstr "" diff --git a/whatsnew/changelog.po b/whatsnew/changelog.po index 6c5eec43b..1e59d4d1c 100644 --- a/whatsnew/changelog.po +++ b/whatsnew/changelog.po @@ -6,15 +6,16 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Danial Behzadi , 2025 +# Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-16 14:19+0000\n" +"POT-Creation-Date: 2025-07-11 14:21+0000\n" "PO-Revision-Date: 2021-06-29 13:04+0000\n" -"Last-Translator: Danial Behzadi , 2025\n" +"Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/" "fa/)\n" "MIME-Version: 1.0\n" @@ -35,125 +36,1197 @@ msgstr "" msgid "*Release date: XXXX-XX-XX*" msgstr "" -#: ../NEWS:8 ../NEWS:122 ../NEWS:926 ../NEWS:1295 ../NEWS:2731 ../NEWS:3171 -#: ../NEWS:3826 ../NEWS:6742 ../NEWS:7219 ../NEWS:7704 ../NEWS:8214 -#: ../NEWS:9073 ../NEWS:9654 ../NEWS:11895 ../NEWS:13111 ../NEWS:13488 -#: ../NEWS:13774 ../NEWS:14060 ../NEWS:14457 ../NEWS:14795 ../NEWS:15220 -#: ../NEWS:17180 ../NEWS:18174 ../NEWS:18767 ../NEWS:19252 ../NEWS:19632 -#: ../NEWS:20075 ../NEWS:20559 ../NEWS:21016 ../NEWS:22790 ../NEWS:23610 -#: ../NEWS:24063 ../NEWS:24335 ../NEWS:24612 ../NEWS:25434 ../NEWS:25873 -#: ../NEWS:26903 ../NEWS:27372 ../NEWS:27832 ../NEWS:28290 ../NEWS:28681 -#: ../NEWS:29459 ../NEWS:31071 ../NEWS:32139 ../NEWS:32648 ../NEWS:33017 -#: ../NEWS:33262 ../NEWS:35852 ../NEWS:36397 ../NEWS:36780 ../NEWS:36988 -#: ../NEWS:37235 ../NEWS:37574 ../NEWS:37880 ../NEWS:38415 ../NEWS:40525 -#: ../NEWS:41122 ../NEWS:41453 ../NEWS:41864 ../NEWS:42242 ../NEWS:42813 -#: ../NEWS:43062 ../NEWS:43192 ../NEWS:43482 ../NEWS:43723 ../NEWS:44253 -#: ../NEWS:44485 ../NEWS:44988 ../NEWS:46257 ../NEWS:46762 ../NEWS:47396 -#: ../NEWS:48191 ../NEWS:48238 ../NEWS:48695 ../NEWS:49984 ../NEWS:51798 -msgid "Windows" +#: ../NEWS:8 ../NEWS:108 ../NEWS:296 ../NEWS:551 ../NEWS:843 ../NEWS:1648 +#: ../NEWS:2021 ../NEWS:2592 ../NEWS:3090 ../NEWS:3444 ../NEWS:3897 +#: ../NEWS:4668 ../NEWS:7057 ../NEWS:7611 ../NEWS:8067 ../NEWS:8553 +#: ../NEWS:9159 ../NEWS:10046 ../NEWS:11171 ../NEWS:13223 ../NEWS:13975 +#: ../NEWS:14287 ../NEWS:14581 ../NEWS:14874 ../NEWS:15272 ../NEWS:15698 +#: ../NEWS:16613 ../NEWS:18381 ../NEWS:19052 ../NEWS:19691 ../NEWS:20085 +#: ../NEWS:20504 ../NEWS:20917 ../NEWS:21382 ../NEWS:22346 ../NEWS:23890 +#: ../NEWS:24522 ../NEWS:24905 ../NEWS:25129 ../NEWS:25403 ../NEWS:25800 +#: ../NEWS:26355 ../NEWS:26975 ../NEWS:27847 ../NEWS:28235 ../NEWS:28722 +#: ../NEWS:29182 ../NEWS:29544 ../NEWS:29890 ../NEWS:30546 ../NEWS:32312 +#: ../NEWS:32979 ../NEWS:33522 ../NEWS:33817 ../NEWS:34568 ../NEWS:36976 +#: ../NEWS:37009 ../NEWS:37137 ../NEWS:37345 ../NEWS:37536 ../NEWS:37741 +#: ../NEWS:38039 ../NEWS:38360 ../NEWS:38685 ../NEWS:39275 ../NEWS:39935 +#: ../NEWS:41605 ../NEWS:41951 ../NEWS:42317 ../NEWS:42641 ../NEWS:42744 +#: ../NEWS:43207 ../NEWS:43594 ../NEWS:43897 ../NEWS:43979 ../NEWS:44082 +#: ../NEWS:44252 ../NEWS:44587 ../NEWS:45005 ../NEWS:45223 ../NEWS:45460 +#: ../NEWS:45997 ../NEWS:47024 ../NEWS:47042 ../NEWS:47130 ../NEWS:47611 +#: ../NEWS:48326 ../NEWS:48990 ../NEWS:49428 ../NEWS:49455 ../NEWS:49493 +#: ../NEWS:49513 ../NEWS:49620 ../NEWS:49714 ../NEWS:49810 ../NEWS:49885 +#: ../NEWS:50143 ../NEWS:50366 ../NEWS:50539 ../NEWS:50897 +msgid "Library" msgstr "" #: ../NEWS:10 msgid "" +":gh:`52876`: Add missing ``keepends`` (default ``True``) parameter to :meth:" +"`!codecs.StreamReaderWriter.readline` and :meth:`!codecs.StreamReaderWriter." +"readlines`." +msgstr "" + +#: ../NEWS:14 +msgid "" +":gh:`136476`: Fix a bug that was causing the ``get_async_stack_trace`` " +"function to miss some frames in the stack trace." +msgstr "" + +#: ../NEWS:17 +msgid "" +":gh:`136434`: Fix docs generation of ``UnboundItem`` in :mod:`concurrent." +"interpreters` when running with :option:`-OO`." +msgstr "" + +#: ../NEWS:20 +msgid "" +":gh:`136380`: Raises :exc:`AttributeError` when accessing :class:`concurrent." +"futures.InterpreterPoolExecutor` and subinterpreters are not available." +msgstr "" + +#: ../NEWS:24 +msgid "" +":gh:`134657`: :mod:`asyncio`: Remove some private names from ``asyncio." +"__all__``." +msgstr "" + +#: ../NEWS:28 ../NEWS:213 ../NEWS:399 ../NEWS:713 ../NEWS:1259 ../NEWS:1831 +#: ../NEWS:2291 ../NEWS:2855 ../NEWS:3267 ../NEWS:3671 ../NEWS:4292 +#: ../NEWS:5894 ../NEWS:6864 ../NEWS:7500 ../NEWS:8008 ../NEWS:8443 +#: ../NEWS:9000 ../NEWS:9874 ../NEWS:10535 ../NEWS:13007 ../NEWS:13901 +#: ../NEWS:14207 ../NEWS:14516 ../NEWS:14765 ../NEWS:15203 ../NEWS:15544 +#: ../NEWS:15997 ../NEWS:18185 ../NEWS:18933 ../NEWS:19534 ../NEWS:19975 +#: ../NEWS:20357 ../NEWS:20791 ../NEWS:21273 ../NEWS:21826 ../NEWS:23759 +#: ../NEWS:24430 ../NEWS:24840 ../NEWS:25073 ../NEWS:25330 ../NEWS:25698 +#: ../NEWS:26275 ../NEWS:26635 ../NEWS:27789 ../NEWS:28151 ../NEWS:28595 +#: ../NEWS:29105 ../NEWS:29446 ../NEWS:29813 ../NEWS:30229 ../NEWS:32148 +#: ../NEWS:32909 ../NEWS:33447 ../NEWS:33753 ../NEWS:34014 ../NEWS:36994 +#: ../NEWS:37106 ../NEWS:37319 ../NEWS:37510 ../NEWS:37720 ../NEWS:37964 +#: ../NEWS:38283 ../NEWS:38587 ../NEWS:39187 ../NEWS:39476 ../NEWS:41568 +#: ../NEWS:41905 ../NEWS:42222 ../NEWS:42671 ../NEWS:43160 ../NEWS:43502 +#: ../NEWS:43526 ../NEWS:43850 ../NEWS:43880 ../NEWS:43944 ../NEWS:44058 +#: ../NEWS:44182 ../NEWS:44450 ../NEWS:44959 ../NEWS:45206 ../NEWS:45420 +#: ../NEWS:45712 ../NEWS:47018 ../NEWS:47079 ../NEWS:47480 ../NEWS:48153 +#: ../NEWS:48196 ../NEWS:48904 ../NEWS:48922 ../NEWS:49445 ../NEWS:49480 +#: ../NEWS:49508 ../NEWS:49600 ../NEWS:49687 ../NEWS:49792 ../NEWS:49835 +#: ../NEWS:50111 ../NEWS:50346 ../NEWS:50532 ../NEWS:50671 +msgid "Core and Builtins" +msgstr "" + +#: ../NEWS:30 +msgid "" +":gh:`136541`: Fix some issues with the perf trampolines on x86-64 and " +"aarch64. The trampolines were not being generated correctly for some cases, " +"which could lead to the perf integration not working correctly. Patch by " +"Pablo Galindo." +msgstr "" + +#: ../NEWS:35 +msgid "" +":gh:`136517`: Fixed a typo that prevented printing of uncollectable objects " +"when the :const:`gc.DEBUG_UNCOLLECTABLE` mode was set." +msgstr "" + +#: ../NEWS:38 +msgid "" +":gh:`132661`: ``Interpolation.expression`` now has a default, the empty " +"string." +msgstr "" + +#: ../NEWS:41 +msgid "" +":gh:`133136`: Limit excess memory usage in the :term:`free threading` build " +"when a large dictionary or list is resized and accessed by multiple threads." +msgstr "" + +#: ../NEWS:47 +msgid "Python 3.14.0 beta 4" +msgstr "" + +#: ../NEWS:49 +msgid "*Release date: 2025-07-08*" +msgstr "" + +#: ../NEWS:52 ../NEWS:520 ../NEWS:803 ../NEWS:1613 ../NEWS:1973 ../NEWS:2539 +#: ../NEWS:3076 ../NEWS:3413 ../NEWS:3872 ../NEWS:4545 ../NEWS:8408 +#: ../NEWS:8930 ../NEWS:10367 ../NEWS:12632 ../NEWS:13834 ../NEWS:14169 +#: ../NEWS:15160 ../NEWS:15490 ../NEWS:17981 ../NEWS:18867 ../NEWS:19474 +#: ../NEWS:23550 ../NEWS:25656 ../NEWS:26150 ../NEWS:28069 ../NEWS:28531 +#: ../NEWS:29004 ../NEWS:31986 ../NEWS:32849 ../NEWS:33388 ../NEWS:33730 +#: ../NEWS:36853 ../NEWS:37475 ../NEWS:37692 ../NEWS:37952 ../NEWS:38558 +#: ../NEWS:39146 ../NEWS:41461 ../NEWS:41849 ../NEWS:42190 ../NEWS:42613 +#: ../NEWS:43100 ../NEWS:43465 ../NEWS:43859 ../NEWS:43933 ../NEWS:44918 +#: ../NEWS:45379 ../NEWS:45687 ../NEWS:46947 ../NEWS:48056 ../NEWS:48882 +#: ../NEWS:49405 ../NEWS:50092 ../NEWS:50311 ../NEWS:50519 ../NEWS:52431 +msgid "Tools/Demos" +msgstr "" + +#: ../NEWS:54 +msgid "" +":gh:`135968`: Stubs for ``strip`` are now provided as part of an iOS install." +msgstr "" + +#: ../NEWS:56 +msgid ":gh:`133600`: Backport file reorganization for Tools/wasm/wasi." +msgstr "" + +#: ../NEWS:58 +msgid "" +"This should make backporting future code changes easier. It also simplifies " +"instructions around how to do WASI builds in the devguide." +msgstr "" + +#: ../NEWS:62 ../NEWS:270 ../NEWS:526 ../NEWS:812 ../NEWS:1622 ../NEWS:1996 +#: ../NEWS:2548 ../NEWS:3083 ../NEWS:3419 ../NEWS:3881 ../NEWS:4551 +#: ../NEWS:7855 ../NEWS:8318 ../NEWS:8861 ../NEWS:9676 ../NEWS:10268 +#: ../NEWS:12232 ../NEWS:13723 ../NEWS:14142 ../NEWS:14416 ../NEWS:14693 +#: ../NEWS:15099 ../NEWS:15424 ../NEWS:15836 ../NEWS:17616 ../NEWS:18800 +#: ../NEWS:19383 ../NEWS:19872 ../NEWS:20220 ../NEWS:20673 ../NEWS:21081 +#: ../NEWS:21584 ../NEWS:23294 ../NEWS:24250 ../NEWS:24704 ../NEWS:24978 +#: ../NEWS:25248 ../NEWS:25601 ../NEWS:26047 ../NEWS:26522 ../NEWS:27503 +#: ../NEWS:28025 ../NEWS:28466 ../NEWS:28929 ../NEWS:29339 ../NEWS:30066 +#: ../NEWS:31501 ../NEWS:32752 ../NEWS:33205 ../NEWS:33662 ../NEWS:33901 +#: ../NEWS:36239 ../NEWS:37275 ../NEWS:37429 ../NEWS:37645 ../NEWS:37897 +#: ../NEWS:38211 ../NEWS:38543 ../NEWS:39027 ../NEWS:41022 ../NEWS:41766 +#: ../NEWS:41879 ../NEWS:42104 ../NEWS:42494 ../NEWS:42892 ../NEWS:43471 +#: ../NEWS:43782 ../NEWS:44033 ../NEWS:44168 ../NEWS:44439 ../NEWS:44869 +#: ../NEWS:45142 ../NEWS:45396 ../NEWS:45650 ../NEWS:46823 ../NEWS:47383 +#: ../NEWS:48037 ../NEWS:48158 ../NEWS:48781 ../NEWS:49343 ../NEWS:49587 +#: ../NEWS:49764 ../NEWS:50073 ../NEWS:50302 ../NEWS:50512 ../NEWS:52323 +msgid "Tests" +msgstr "" + +#: ../NEWS:64 +msgid "" +":gh:`135966`: The iOS testbed now handles the ``app_packages`` folder as a " +"site directory." +msgstr "" + +#: ../NEWS:67 +msgid "" +":gh:`135494`: Fix regrtest to support excluding tests from ``--pgo`` tests. " +"Patch by Victor Stinner." +msgstr "" + +#: ../NEWS:71 ../NEWS:281 ../NEWS:541 ../NEWS:833 ../NEWS:1633 ../NEWS:2013 +#: ../NEWS:2564 ../NEWS:3436 ../NEWS:3892 ../NEWS:4617 ../NEWS:6854 +#: ../NEWS:7991 ../NEWS:8435 ../NEWS:8991 ../NEWS:10510 ../NEWS:12989 +#: ../NEWS:14186 ../NEWS:14507 ../NEWS:15189 ../NEWS:15524 ../NEWS:15959 +#: ../NEWS:18178 ../NEWS:21799 ../NEWS:23703 ../NEWS:24408 ../NEWS:24833 +#: ../NEWS:25067 ../NEWS:25691 ../NEWS:26264 ../NEWS:26614 ../NEWS:27783 +#: ../NEWS:28136 ../NEWS:28588 ../NEWS:29094 ../NEWS:29795 ../NEWS:30180 +#: ../NEWS:32133 ../NEWS:32891 ../NEWS:33435 ../NEWS:33966 ../NEWS:37496 +#: ../NEWS:37714 ../NEWS:39442 ../NEWS:41895 ../NEWS:42662 ../NEWS:43126 +#: ../NEWS:43153 ../NEWS:45197 ../NEWS:45408 ../NEWS:45699 ../NEWS:46995 +#: ../NEWS:47054 ../NEWS:47471 ../NEWS:48174 +msgid "Security" +msgstr "" + +#: ../NEWS:73 +msgid "" +":gh:`136053`: :mod:`marshal`: fix a possible crash when deserializing :class:" +"`slice` objects." +msgstr "" + +#: ../NEWS:76 +msgid "" +":gh:`135661`: Fix parsing start and end tags in :class:`html.parser." +"HTMLParser` according to the HTML5 standard." +msgstr "" + +#: ../NEWS:79 +msgid "" +"Whitespaces no longer accepted between ```` does not end the script section." +msgstr "" + +#: ../NEWS:82 +msgid "" +"Vertical tabulation (``\\v``) and non-ASCII whitespaces no longer recognized " +"as whitespaces. The only whitespaces are ``\\t\\n\\r\\f`` and space." +msgstr "" + +#: ../NEWS:85 +msgid "Null character (U+0000) no longer ends the tag name." +msgstr "" + +#: ../NEWS:87 +msgid "" +"Attributes and slashes after the tag name in end tags are now ignored, " +"instead of terminating after the first ``>`` in quoted attribute value. E.g. " +"``\"/>``." +msgstr "" + +#: ../NEWS:91 +msgid "" +"Multiple slashes and whitespaces between the last attribute and closing " +"``>`` are now ignored in both start and end tags. E.g. ````." +msgstr "" + +#: ../NEWS:94 +msgid "" +"Multiple ``=`` between attribute name and value are no longer collapsed. E." +"g. ```` produces attribute \"foo\" with value \"=bar\"." +msgstr "" + +#: ../NEWS:97 +msgid "" +"Whitespaces between the ``=`` separator and attribute name or value are no " +"longer ignored. E.g. ```` produces two attributes \"foo\" and " +"\"=bar\", both with value None; ```` produces two attributes: " +"\"foo\" with value \"\" and \"bar\" with value None." +msgstr "" + +#: ../NEWS:102 +msgid "" +":gh:`102555`: Fix comment parsing in :class:`html.parser.HTMLParser` " +"according to the HTML5 standard. ``--!>`` now ends the comment. ``-- >`` no " +"longer ends the comment. Support abnormally ended empty comments ``<-->`` " +"and ``<--->``." +msgstr "" + +#: ../NEWS:110 +msgid "" +":gh:`136286`: Fix pickling failures for protocols 0 and 1 for many objects " +"realted to subinterpreters." +msgstr "" + +#: ../NEWS:113 +msgid "" +":gh:`136316`: Improve support for evaluating nested forward references in :" +"func:`typing.evaluate_forward_ref`." +msgstr "" + +#: ../NEWS:116 +msgid "" +":gh:`85702`: If ``zoneinfo._common.load_tzdata`` is given a package without " +"a resource a :exc:`zoneinfo.ZoneInfoNotFoundError` is raised rather than a :" +"exc:`PermissionError`. Patch by Victor Stinner." +msgstr "" + +#: ../NEWS:120 +msgid "" +":gh:`136028`: Fix parsing month names containing \"İ\" (U+0130, LATIN " +"CAPITAL LETTER I WITH DOT ABOVE) in :func:`time.strptime`. This affects " +"locales az_AZ, ber_DZ, ber_MA and crh_UA." +msgstr "" + +#: ../NEWS:124 +msgid "" +":gh:`135995`: In the palmos encoding, make byte ``0x9b`` decode to ``›`` " +"(U+203A - SINGLE RIGHT-POINTING ANGLE QUOTATION MARK)." +msgstr "" + +#: ../NEWS:127 +msgid "" +":gh:`53203`: Fix :func:`time.strptime` for ``%c`` and ``%x`` formats on " +"locales byn_ER, wal_ET and lzh_TW, and for ``%X`` format on locales ar_SA, " +"bg_BG and lzh_TW." +msgstr "" + +#: ../NEWS:131 +msgid "" +":gh:`91555`: An earlier change, which was introduced in 3.14.0b2, has been " +"reverted. It disabled logging for a logger during handling of log messages " +"for that logger. Since the reversion, the behaviour should be as it was " +"before 3.14.0b2." +msgstr "" + +#: ../NEWS:136 +msgid "" +":gh:`135878`: Fixes a crash of :class:`types.SimpleNamespace` on :term:`free " +"threading` builds, when several threads were calling its :meth:`~object." +"__repr__` method at the same time." +msgstr "" + +#: ../NEWS:140 +msgid "" +":gh:`135836`: Fix :exc:`IndexError` in :meth:`asyncio.loop." +"create_connection` that could occur when non-\\ :exc:`OSError` exception is " +"raised during connection and socket's ``close()`` raises :exc:`!OSError`." +msgstr "" + +#: ../NEWS:144 +msgid "" +":gh:`135836`: Fix :exc:`IndexError` in :meth:`asyncio.loop." +"create_connection` that could occur when the Happy Eyeballs algorithm " +"resulted in an empty exceptions list during connection attempts." +msgstr "" + +#: ../NEWS:148 +msgid "" +":gh:`135855`: Raise :exc:`TypeError` instead of :exc:`SystemError` when :" +"func:`!_interpreters.set___main___attrs` is passed a non-dict object. Patch " +"by Brian Schubert." +msgstr "" + +#: ../NEWS:152 +msgid "" +":gh:`135815`: :mod:`netrc`: skip security checks if :func:`os.getuid` is " +"missing. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:155 +msgid "" +":gh:`135640`: Address bug where it was possible to call :func:`xml.etree." +"ElementTree.ElementTree.write` on an ElementTree object with an invalid root " +"element. This behavior blanked the file passed to ``write`` if it already " +"existed." +msgstr "" + +#: ../NEWS:160 +msgid "" +":gh:`135645`: Added ``supports_isolated_interpreters`` field to :data:`sys." +"implementation`." +msgstr "" + +#: ../NEWS:163 +msgid "" +":gh:`135646`: Raise consistent :exc:`NameError` exceptions in :func:" +"`annotationlib.ForwardRef.evaluate`" +msgstr "" + +#: ../NEWS:166 +msgid "" +":gh:`135557`: Fix races on :mod:`heapq` updates and :class:`list` reads on " +"the :term:`free threaded ` build." +msgstr "" + +#: ../NEWS:169 +msgid "" +":gh:`119180`: Only fetch globals and locals if necessary in :func:" +"`annotationlib.get_annotations`" +msgstr "" + +#: ../NEWS:172 +msgid "" +":gh:`135561`: Fix a crash on DEBUG builds when an HACL* HMAC routine fails. " +"Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:175 +msgid "" +":gh:`135487`: Fix :meth:`!reprlib.Repr.repr_int` when given integers with " +"more than :func:`sys.get_int_max_str_digits` digits. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:179 +msgid "" +":gh:`135335`: :mod:`multiprocessing`: Flush ``stdout`` and ``stderr`` after " +"preloading modules in the ``forkserver``." +msgstr "" + +#: ../NEWS:182 +msgid "" +":gh:`135069`: Fix the \"Invalid error handling\" exception in :class:`!" +"encodings.idna.IncrementalDecoder` to correctly replace the 'errors' " +"parameter." +msgstr "" + +#: ../NEWS:186 +msgid "" +":gh:`130662`: +Accept leading zeros in precision and width fields for +:" +"class:`~decimal.Decimal` formatting, for example ``format(Decimal(1.25), " +"'.016f')``." +msgstr "" + +#: ../NEWS:190 +msgid "" +":gh:`130662`: Accept leading zeros in precision and width fields for :class:" +"`~fractions.Fraction` formatting, for example ``format(Fraction(1, 3), " +"'.016f')``." +msgstr "" + +#: ../NEWS:194 +msgid "" +":gh:`87790`: Support underscore and comma as thousands separators in the " +"fractional part for :class:`~fractions.Fraction`'s formatting. Patch by " +"Sergey B Kirpichev." +msgstr "" + +#: ../NEWS:198 +msgid "" +":gh:`87790`: Support underscore and comma as thousands separators in the " +"fractional part for :class:`~decimal.Decimal`'s formatting. Patch by Sergey " +"B Kirpichev." +msgstr "" + +#: ../NEWS:202 +msgid "" +":gh:`130664`: Handle corner-case for :class:`~fractions.Fraction`'s " +"formatting: treat zero-padding (preceding the width field by a zero " +"(``'0'``) character) as an equivalent to a fill character of ``'0'`` with an " +"alignment type of ``'='``, just as in case of :class:`float`'s." +msgstr "" + +#: ../NEWS:208 ../NEWS:390 ../NEWS:1250 ../NEWS:1825 ../NEWS:2279 ../NEWS:2845 +#: ../NEWS:3665 ../NEWS:4279 ../NEWS:5840 ../NEWS:7386 ../NEWS:7844 +#: ../NEWS:8310 ../NEWS:8847 ../NEWS:9662 ../NEWS:12185 ../NEWS:13703 +#: ../NEWS:14136 ../NEWS:14407 ../NEWS:14686 ../NEWS:15085 ../NEWS:15403 +#: ../NEWS:15828 ../NEWS:17530 ../NEWS:18763 ../NEWS:19357 ../NEWS:19866 +#: ../NEWS:20214 ../NEWS:20660 ../NEWS:21050 ../NEWS:21549 ../NEWS:23159 +#: ../NEWS:24227 ../NEWS:24689 ../NEWS:24969 ../NEWS:25239 ../NEWS:25592 +#: ../NEWS:26035 ../NEWS:26501 ../NEWS:27461 ../NEWS:28008 ../NEWS:28452 +#: ../NEWS:28910 ../NEWS:29314 ../NEWS:29737 ../NEWS:30052 ../NEWS:31397 +#: ../NEWS:32703 ../NEWS:33170 ../NEWS:33648 ../NEWS:33890 ../NEWS:36074 +#: ../NEWS:37050 ../NEWS:37260 ../NEWS:37410 ../NEWS:37628 ../NEWS:37873 +#: ../NEWS:38198 ../NEWS:38538 ../NEWS:39021 ../NEWS:39364 ../NEWS:40974 +#: ../NEWS:41728 ../NEWS:42084 ../NEWS:42481 ../NEWS:42880 ../NEWS:43449 +#: ../NEWS:43769 ../NEWS:43925 ../NEWS:44028 ../NEWS:45387 ../NEWS:45638 +#: ../NEWS:46805 ../NEWS:47365 ../NEWS:48032 ../NEWS:48758 ../NEWS:49319 +#: ../NEWS:49572 ../NEWS:49771 ../NEWS:50082 ../NEWS:52283 +msgid "Documentation" +msgstr "" + +#: ../NEWS:210 +msgid "" +":gh:`136155`: EPUB builds are fixed by excluding non-XHTML-compatible tags." +msgstr "" + +#: ../NEWS:215 +msgid ":gh:`109700`: Fix memory error handling in :c:func:`PyDict_SetDefault`." +msgstr "" + +#: ../NEWS:217 +msgid "" +":gh:`78465`: Fix error message for ``cls.__new__(cls, ...)`` where ``cls`` " +"is not instantiable builtin or extension type (with ``tp_new`` set to " +"``NULL``)." +msgstr "" + +#: ../NEWS:221 +msgid "" +":gh:`129958`: Differentiate between t-strings and f-strings in syntax error " +"for newlines in format specifiers of single-quoted interpolated strings." +msgstr "" + +#: ../NEWS:224 +msgid "" +":gh:`135871`: Non-blocking mutex lock attempts now return immediately when " +"the lock is busy instead of briefly spinning in the :term:`free threading` " +"build." +msgstr "" + +#: ../NEWS:228 +msgid "" +":gh:`135106`: Restrict the trashcan mechanism to GC'ed objects and untrack " +"them while in the trashcan to prevent the GC and trashcan mechanisms " +"conflicting." +msgstr "" + +#: ../NEWS:232 +msgid "" +":gh:`135607`: Fix potential :mod:`weakref` races in an object's destructor " +"on the :term:`free threaded ` build." +msgstr "" + +#: ../NEWS:235 +msgid ":gh:`135608`: Fix a crash in the JIT involving attributes of modules." +msgstr "" + +#: ../NEWS:237 +msgid "" +":gh:`135543`: Emit ``sys.remote_exec`` audit event when :func:`sys." +"remote_exec` is called and migrate ``remote_debugger_script`` to ``cpython." +"remote_debugger_script``." +msgstr "" + +#: ../NEWS:241 +msgid "" +":gh:`134280`: Disable constant folding for ``~`` with a boolean argument. " +"This moves the deprecation warning from compile time to runtime." +msgstr "" + +#: ../NEWS:245 ../NEWS:456 ../NEWS:770 ../NEWS:1494 ../NEWS:1926 ../NEWS:2453 +#: ../NEWS:2990 ../NEWS:3345 ../NEWS:3772 ../NEWS:4419 ../NEWS:6489 +#: ../NEWS:7458 ../NEWS:7920 ../NEWS:8416 ../NEWS:8944 ../NEWS:9851 +#: ../NEWS:10375 ../NEWS:12692 ../NEWS:13841 ../NEWS:14174 ../NEWS:14477 +#: ../NEWS:15169 ../NEWS:15500 ../NEWS:15915 ../NEWS:18016 ../NEWS:18880 +#: ../NEWS:19480 ../NEWS:19948 ../NEWS:20331 ../NEWS:20759 ../NEWS:21261 +#: ../NEWS:21714 ../NEWS:23571 ../NEWS:24358 ../NEWS:24748 ../NEWS:25024 +#: ../NEWS:25312 ../NEWS:25665 ../NEWS:26160 ../NEWS:26578 ../NEWS:27672 +#: ../NEWS:28082 ../NEWS:28543 ../NEWS:29016 ../NEWS:29387 ../NEWS:29774 +#: ../NEWS:30161 ../NEWS:32011 ../NEWS:32855 ../NEWS:33393 ../NEWS:33737 +#: ../NEWS:36892 ../NEWS:36982 ../NEWS:37698 ../NEWS:38268 ../NEWS:38565 +#: ../NEWS:39158 ../NEWS:39420 ../NEWS:41492 ../NEWS:41867 ../NEWS:42200 +#: ../NEWS:42620 ../NEWS:43423 ../NEWS:43752 ../NEWS:43920 ../NEWS:44421 +#: ../NEWS:44860 ../NEWS:45350 ../NEWS:45679 ../NEWS:46968 ../NEWS:47443 +#: ../NEWS:48023 ../NEWS:50335 ../NEWS:50650 ../NEWS:52254 +msgid "C API" +msgstr "" + +#: ../NEWS:247 +msgid "" +":gh:`135906`: Fix compilation errors when compiling the internal headers " +"with a C++ compiler." +msgstr "" + +#: ../NEWS:251 ../NEWS:473 ../NEWS:776 ../NEWS:1553 ../NEWS:1934 ../NEWS:2502 +#: ../NEWS:3055 ../NEWS:3363 ../NEWS:3822 ../NEWS:4442 ../NEWS:6744 +#: ../NEWS:7392 ../NEWS:7881 ../NEWS:8350 ../NEWS:8871 ../NEWS:9716 +#: ../NEWS:10302 ../NEWS:12480 ../NEWS:13745 ../NEWS:14152 ../NEWS:14429 +#: ../NEWS:14699 ../NEWS:15111 ../NEWS:15445 ../NEWS:15856 ../NEWS:17738 +#: ../NEWS:18831 ../NEWS:19407 ../NEWS:19894 ../NEWS:20264 ../NEWS:20700 +#: ../NEWS:21103 ../NEWS:21633 ../NEWS:23416 ../NEWS:24273 ../NEWS:24713 +#: ../NEWS:24984 ../NEWS:25258 ../NEWS:25623 ../NEWS:26082 ../NEWS:26538 +#: ../NEWS:27554 ../NEWS:28034 ../NEWS:28492 ../NEWS:28945 ../NEWS:29348 +#: ../NEWS:29750 ../NEWS:30121 ../NEWS:31671 ../NEWS:32788 ../NEWS:33259 +#: ../NEWS:33675 ../NEWS:36406 ../NEWS:37062 ../NEWS:37284 ../NEWS:37435 +#: ../NEWS:37655 ../NEWS:37902 ../NEWS:38231 ../NEWS:39054 ../NEWS:39374 +#: ../NEWS:41085 ../NEWS:41774 ../NEWS:41884 ../NEWS:42119 ../NEWS:42511 +#: ../NEWS:42647 ../NEWS:42908 ../NEWS:43429 ../NEWS:43513 ../NEWS:43804 +#: ../NEWS:43869 ../NEWS:44041 ../NEWS:44159 ../NEWS:44428 ../NEWS:44883 +#: ../NEWS:45169 ../NEWS:45357 ../NEWS:45670 ../NEWS:46866 ../NEWS:47421 +#: ../NEWS:48083 ../NEWS:48804 ../NEWS:49356 ../NEWS:49416 ../NEWS:49433 +#: ../NEWS:49675 ../NEWS:49780 ../NEWS:50293 ../NEWS:50507 ../NEWS:50642 +#: ../NEWS:52174 +msgid "Build" +msgstr "" + +#: ../NEWS:253 +msgid "" +":gh:`134273`: Add support for configuring compiler flags for the JIT with " +"``CFLAGS_JIT``" +msgstr "" + +#: ../NEWS:258 +msgid "Python 3.14.0 beta 3" +msgstr "" + +#: ../NEWS:260 +msgid "*Release date: 2025-06-17*" +msgstr "" + +#: ../NEWS:263 ../NEWS:500 ../NEWS:794 ../NEWS:1598 ../NEWS:1967 ../NEWS:3403 +#: ../NEWS:3843 ../NEWS:4498 ../NEWS:7414 ../NEWS:7891 ../NEWS:8376 +#: ../NEWS:8886 ../NEWS:9745 ../NEWS:10326 ../NEWS:12567 ../NEWS:13783 +#: ../NEWS:14160 ../NEWS:14446 ../NEWS:14732 ../NEWS:15129 ../NEWS:15467 +#: ../NEWS:15892 ../NEWS:17852 ../NEWS:18846 ../NEWS:19439 ../NEWS:19924 +#: ../NEWS:20304 ../NEWS:20747 ../NEWS:21231 ../NEWS:21688 ../NEWS:23462 +#: ../NEWS:24282 ../NEWS:24735 ../NEWS:25007 ../NEWS:25284 ../NEWS:26106 +#: ../NEWS:26545 ../NEWS:27575 ../NEWS:28044 ../NEWS:28504 ../NEWS:28962 +#: ../NEWS:29353 ../NEWS:30131 ../NEWS:31743 ../NEWS:32811 ../NEWS:33320 +#: ../NEWS:33689 ../NEWS:33934 ../NEWS:36524 ../NEWS:37069 ../NEWS:37452 +#: ../NEWS:37660 ../NEWS:37907 ../NEWS:38246 ../NEWS:38552 ../NEWS:39087 +#: ../NEWS:41197 ../NEWS:41794 ../NEWS:42125 ../NEWS:42536 ../NEWS:42914 +#: ../NEWS:43485 ../NEWS:43734 ../NEWS:43864 ../NEWS:44154 ../NEWS:44395 +#: ../NEWS:44925 ../NEWS:45157 ../NEWS:45660 ../NEWS:46929 ../NEWS:47434 +#: ../NEWS:48068 ../NEWS:48863 ../NEWS:48910 ../NEWS:49367 ../NEWS:50656 +#: ../NEWS:52470 +msgid "Windows" +msgstr "" + +#: ../NEWS:265 +msgid "" +":gh:`135099`: Fix a crash that could occur on Windows when a background " +"thread waits on a :c:type:`PyMutex` while the main thread is shutting down " +"the interpreter." +msgstr "" + +#: ../NEWS:272 +msgid "" +":gh:`132815`: Fix test__opcode: add ``JUMP_BACKWARD`` to specialization " +"stats." +msgstr "" + +#: ../NEWS:275 +msgid "" +":gh:`135489`: Show verbose output for failing tests during PGO profiling " +"step with --enable-optimizations." +msgstr "" + +#: ../NEWS:278 +msgid ":gh:`135120`: Add :func:`!test.support.subTests`." +msgstr "" + +#: ../NEWS:283 +msgid "" +":gh:`135462`: Fix quadratic complexity in processing specially crafted input " +"in :class:`html.parser.HTMLParser`. End-of-file errors are now handled " +"according to the HTML5 specs -- comments and declarations are automatically " +"closed, tags are ignored." +msgstr "" + +#: ../NEWS:288 +msgid "" +":gh:`135034`: Fixes multiple issues that allowed ``tarfile`` extraction " +"filters (``filter=\"data\"`` and ``filter=\"tar\"``) to be bypassed using " +"crafted symlinks and hard links." +msgstr "" + +#: ../NEWS:292 +msgid "" +"Addresses :cve:`2024-12718`, :cve:`2025-4138`, :cve:`2025-4330`, and :cve:" +"`2025-4517`." +msgstr "" + +#: ../NEWS:298 +msgid "" +":gh:`65697`: :class:`configparser`'s error message when attempting to write " +"an invalid key is now more helpful." +msgstr "" + +#: ../NEWS:301 +msgid "" +":gh:`135497`: Fix :func:`os.getlogin` failing for longer usernames on BSD-" +"based platforms." +msgstr "" + +#: ../NEWS:304 +msgid "" +":gh:`135429`: Fix the argument mismatch in ``_lsprof`` for ``PY_THROW`` " +"event." +msgstr "" + +#: ../NEWS:307 +msgid "" +":gh:`135368`: Fix :class:`unittest.mock.Mock` generation on :func:" +"`dataclasses.dataclass` objects. Now all special attributes are set as it " +"was before :gh:`124429`." +msgstr "" + +#: ../NEWS:311 +msgid "" +":gh:`133967`: Do not normalize :mod:`locale` name 'C.UTF-8' to 'en_US.UTF-8'." +msgstr "" + +#: ../NEWS:313 +msgid "" +":gh:`135321`: Raise a correct exception for values greater than 0x7fffffff " +"for the ``BINSTRING`` opcode in the C implementation of :mod:`pickle`." +msgstr "" + +#: ../NEWS:316 +msgid "" +":gh:`135276`: Backported bugfixes in zipfile.Path from zipp 3.23. Fixed ``." +"name``, ``.stem`` and other basename-based properties on Windows when " +"working with a zipfile on disk." +msgstr "" + +#: ../NEWS:320 +msgid "" +":gh:`135244`: :mod:`uuid`: when the MAC address cannot be determined, the 48-" +"bit node ID is now generated with a cryptographically-secure pseudo-random " +"number generator (CSPRNG) as per :rfc:`RFC 9562, §6.10.3 " +"<9562#section-6.10-3>`. This affects :func:`~uuid.uuid1` and :func:`~uuid." +"uuid6`." +msgstr "" + +#: ../NEWS:326 +msgid "" +":gh:`134970`: Fix the \"unknown action\" exception in :meth:`argparse." +"ArgumentParser.add_argument_group` to correctly replace the action class." +msgstr "" + +#: ../NEWS:330 +msgid "" +":gh:`134718`: :func:`ast.dump` now only omits ``None`` and ``[]`` values if " +"they are default values." +msgstr "" + +#: ../NEWS:333 +msgid "" +":gh:`134939`: Add the :mod:`concurrent.interpreters` module. See :pep:`734`." +msgstr "" + +#: ../NEWS:335 +msgid "" +":gh:`134885`: Fix possible crash in the :mod:`compression.zstd` module " +"related to setting parameter types. Patch by Jelle Zijlstra." +msgstr "" + +#: ../NEWS:338 +msgid "" +":gh:`134857`: Improve error report for :mod:`doctest`\\ s run with :mod:" +"`unittest`. Remove :mod:`!doctest` module frames from tracebacks and " +"redundant newline character from a failure message." +msgstr "" + +#: ../NEWS:342 +msgid "" +":gh:`128840`: Fix parsing long IPv6 addresses with embedded IPv4 address." +msgstr "" + +#: ../NEWS:344 +msgid "" +":gh:`134637`: Fix performance regression in calling a :mod:`ctypes` function " +"pointer in :term:`free threading`." +msgstr "" + +#: ../NEWS:347 +msgid "" +":gh:`134696`: Built-in HACL* and OpenSSL implementations of hash function " +"constructors now correctly accept the same *documented* named arguments. For " +"instance, :func:`~hashlib.md5` could be previously invoked as " +"``md5(data=data)`` or ``md5(string=string)`` depending on the underlying " +"implementation but these calls were not compatible. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:354 +msgid "" +":gh:`134151`: :mod:`email`: Fix :exc:`TypeError` in :func:`email.utils." +"decode_params` when sorting :rfc:`2231` continuations that contain an " +"unnumbered section." +msgstr "" + +#: ../NEWS:358 +msgid "" +":gh:`134210`: :func:`curses.window.getch` now correctly handles signals. " +"Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:361 +msgid "" +":gh:`134152`: :mod:`email`: Fix parsing of email message ID with invalid " +"domain." +msgstr "" + +#: ../NEWS:364 +msgid "" +":gh:`133489`: :func:`random.getrandbits` can now generate more that 2\\ :sup:" +"`31` bits. :func:`random.randbytes` can now generate more that 256 MiB." +msgstr "" + +#: ../NEWS:368 +msgid "" +":gh:`132813`: Improve error messages for incorrect types and values of :" +"class:`csv.Dialect` attributes." +msgstr "" + +#: ../NEWS:371 +msgid "" +":gh:`132969`: Prevent the :class:`~concurrent.futures.ProcessPoolExecutor` " +"executor thread, which remains running when :meth:`shutdown(wait=False) " +"`, from attempting to adjust the " +"pool's worker processes after the object state has already been reset during " +"shutdown. A combination of conditions, including a worker process having " +"terminated abormally, resulted in an exception and a potential hang when the " +"still-running executor thread attempted to replace dead workers within the " +"pool." +msgstr "" + +#: ../NEWS:380 +msgid "" +":gh:`127081`: Fix libc thread safety issues with :mod:`os` by replacing " +"``getlogin`` with ``getlogin_r`` re-entrant version." +msgstr "" + +#: ../NEWS:383 +msgid "" +":gh:`131884`: Fix formatting issues in :func:`json.dump` when both *indent* " +"and *skipkeys* are used." +msgstr "" + +#: ../NEWS:386 +msgid "" +":gh:`130999`: Avoid exiting the new REPL and offer suggestions even if there " +"are non-string candidates when errors occur." +msgstr "" + +#: ../NEWS:392 +msgid "" +":gh:`135171`: Document that the :term:`iterator` for the leftmost :keyword:`!" +"for` clause in the generator expression is created immediately." +msgstr "" + +#: ../NEWS:395 +msgid "" +":issue:`45210`: Document that error indicator may be set in tp_dealloc, and " +"how to avoid clobbering it." +msgstr "" + +#: ../NEWS:401 +msgid "" +":gh:`135496`: Fix typo in the f-string conversion type error " +"(\"exclamanation\" -> \"exclamation\")." +msgstr "" + +#: ../NEWS:404 +msgid "" +":gh:`135371`: Fixed :mod:`asyncio` debugging tools to properly display " +"internal coroutine call stacks alongside external task dependencies. The " +"``python -m asyncio ps`` and ``python -m asyncio pstree`` commands now show " +"complete execution context. Patch by Pablo Galindo." +msgstr "" + +#: ../NEWS:409 +msgid "" +":gh:`127319`: Set the ``allow_reuse_port`` class variable to ``False`` on " +"the XMLRPC, logging, and HTTP servers. This matches the behavior in prior " +"Python releases, which is to not allow port reuse." +msgstr "" + +#: ../NEWS:413 +msgid "" +":gh:`135171`: Reverts the behavior of async generator expressions when " +"created with object w/o __aiter__ method to the pre-3.13 behavior of raising " +"a TypeError." +msgstr "" + +#: ../NEWS:417 +msgid "" +":gh:`130077`: Properly raise custom syntax errors when incorrect syntax " +"containing names that are prefixes of soft keywords is encountered. Patch " +"by Pablo Galindo." +msgstr "" + +#: ../NEWS:421 +msgid "" +":gh:`135171`: Reverts the behavior of generator expressions when created " +"with a non-iterable to the pre-3.13 behavior of raising a TypeError. It is " +"no longer possible to cause a crash in the debugger by altering the " +"generator expression's local variables. This is achieved by moving the " +"``GET_ITER`` instruction back to the creation of the generator expression " +"and adding an additional check to ``FOR_ITER``." +msgstr "" + +#: ../NEWS:428 +msgid "" +":gh:`116738`: Make methods in :mod:`heapq` thread-safe on the :term:`free " +"threaded ` build." +msgstr "" + +#: ../NEWS:431 +msgid "" +":gh:`134876`: Add support to :pep:`768` remote debugging for Linux kernels " +"which don't have CONFIG_CROSS_MEMORY_ATTACH configured." +msgstr "" + +#: ../NEWS:434 +msgid "" +":gh:`134889`: Fix handling of a few opcodes that leave operands on the stack " +"when optimizing ``LOAD_FAST``." +msgstr "" + +#: ../NEWS:437 +msgid "" +":gh:`134908`: Fix crash when iterating over lines in a text file on the :" +"term:`free threaded ` build." +msgstr "" + +#: ../NEWS:440 +msgid "" +":gh:`132617`: Fix :meth:`dict.update` modification check that could " +"incorrectly raise a \"dict mutated during update\" error when a different " +"dictionary was modified that happens to share the same underlying keys " +"object." +msgstr "" + +#: ../NEWS:445 +msgid "" +":gh:`134679`: Fix crash in the :term:`free threading` build's QSBR code that " +"could occur when changing an object's ``__dict__`` attribute." +msgstr "" + +#: ../NEWS:448 +msgid "" +":gh:`127682`: No longer call ``__iter__`` twice in list comprehensions. This " +"brings the behavior of list comprehensions in line with other forms of " +"iteration" +msgstr "" + +#: ../NEWS:452 +msgid "" +":gh:`133912`: Fix the C API function ``PyObject_GenericSetDict`` to handle " +"extension classes with inline values." +msgstr "" + +#: ../NEWS:458 +msgid "" +":gh:`134989`: Fix ``Py_RETURN_NONE``, ``Py_RETURN_TRUE`` and " +"``Py_RETURN_FALSE`` macros in the limited C API 3.11 and older: don't treat " +"``Py_None``, ``Py_True`` and ``Py_False`` as immortal. Patch by Victor " +"Stinner." +msgstr "" + +#: ../NEWS:463 +msgid "" +":gh:`134989`: Implement :c:func:`PyObject_DelAttr` and :c:func:" +"`PyObject_DelAttrString` as macros in the limited C API 3.12 and older. " +"Patch by Victor Stinner." +msgstr "" + +#: ../NEWS:467 +msgid "" +":gh:`133968`: Add :c:func:`PyUnicodeWriter_WriteASCII` function to write an " +"ASCII string into a :c:type:`PyUnicodeWriter`. The function is faster than :" +"c:func:`PyUnicodeWriter_WriteUTF8`, but has an undefined behavior if the " +"input string contains non-ASCII characters. Patch by Victor Stinner." +msgstr "" + +#: ../NEWS:475 +msgid "" +":gh:`119132`: Remove \"experimental\" tag from the CPython free-threading " +"build." +msgstr "" + +#: ../NEWS:478 +msgid "" +":gh:`135497`: Fix the detection of ``MAXLOGNAME`` in the ``configure.ac`` " +"script." +msgstr "" + +#: ../NEWS:481 +msgid "" +":gh:`134923`: Windows builds with profile-guided optimization enabled now " +"use ``/GENPROFILE`` and ``/USEPROFILE`` instead of deprecated ``/LTCG:`` " +"options." +msgstr "" + +#: ../NEWS:485 +msgid "" +":gh:`134774`: Fix :c:macro:`Py_DEBUG` macro redefinition warnings on Windows " +"debug builds. Patch by Chris Eibl." +msgstr "" + +#: ../NEWS:488 +msgid "" +":gh:`134632`: Fixed ``build-details.json`` generation to use ``INCLUDEPY``, " +"in order to reference the ``pythonX.Y`` subdirectory of the include " +"directory, as required in :pep:`739`, instead of the top-level include " +"directory." +msgstr "" + +#: ../NEWS:495 +msgid "Python 3.14.0 beta 2" +msgstr "" + +#: ../NEWS:497 +msgid "*Release date: 2025-05-26*" +msgstr "" + +#: ../NEWS:502 +msgid "" +":gh:`130727`: Fix a race in internal calls into WMI that can result in an " +"\"invalid handle\" exception under high load. Patch by Chris Eibl." +msgstr "" + +#: ../NEWS:505 +msgid "" +":gh:`76023`: Make :func:`os.path.realpath` ignore Windows error 1005 when in " +"non-strict mode." +msgstr "" + +#: ../NEWS:508 +msgid "" +":gh:`133779`: Reverts the change to generate different :file:`pyconfig.h` " +"files based on compiler settings, as it was frequently causing extension " +"builds to break. In particular, the ``Py_GIL_DISABLED`` preprocessor " +"variable must now always be defined explicitly when compiling for the " +"experimental free-threaded runtime. The :func:`sysconfig.get_config_var` " +"function can be used to determine whether the current runtime was compiled " +"with that flag or not." +msgstr "" + +#: ../NEWS:516 +msgid "" ":gh:`133626`: Ensures packages are not accidentally bundled into the " "traditional installer." msgstr "" -#: ../NEWS:14 ../NEWS:140 ../NEWS:950 ../NEWS:1324 ../NEWS:1876 ../NEWS:2411 -#: ../NEWS:2747 ../NEWS:3209 ../NEWS:3879 ../NEWS:7183 ../NEWS:7646 -#: ../NEWS:8189 ../NEWS:9004 ../NEWS:9596 ../NEWS:11560 ../NEWS:13051 -#: ../NEWS:13470 ../NEWS:13744 ../NEWS:14021 ../NEWS:14427 ../NEWS:14752 -#: ../NEWS:15164 ../NEWS:16944 ../NEWS:18128 ../NEWS:18711 ../NEWS:19200 -#: ../NEWS:19548 ../NEWS:20001 ../NEWS:20409 ../NEWS:20912 ../NEWS:22622 -#: ../NEWS:23578 ../NEWS:24032 ../NEWS:24306 ../NEWS:24576 ../NEWS:24929 -#: ../NEWS:25375 ../NEWS:25850 ../NEWS:26831 ../NEWS:27353 ../NEWS:27794 -#: ../NEWS:28257 ../NEWS:28667 ../NEWS:29394 ../NEWS:30829 ../NEWS:32080 -#: ../NEWS:32533 ../NEWS:32990 ../NEWS:33229 ../NEWS:35567 ../NEWS:36603 -#: ../NEWS:36757 ../NEWS:36973 ../NEWS:37225 ../NEWS:37539 ../NEWS:37871 -#: ../NEWS:38355 ../NEWS:40350 ../NEWS:41094 ../NEWS:41207 ../NEWS:41432 -#: ../NEWS:41822 ../NEWS:42220 ../NEWS:42799 ../NEWS:43110 ../NEWS:43361 -#: ../NEWS:43496 ../NEWS:43767 ../NEWS:44197 ../NEWS:44470 ../NEWS:44724 -#: ../NEWS:44978 ../NEWS:46151 ../NEWS:46711 ../NEWS:47365 ../NEWS:47486 -#: ../NEWS:48109 ../NEWS:48671 ../NEWS:48915 ../NEWS:49092 ../NEWS:49401 -#: ../NEWS:49630 ../NEWS:49840 ../NEWS:51651 -msgid "Tests" +#: ../NEWS:522 +msgid "" +":gh:`134215`: :term:`REPL` import autocomplete only suggests private modules " +"when explicitly specified." msgstr "" -#: ../NEWS:16 +#: ../NEWS:528 msgid "" ":gh:`133744`: Fix multiprocessing interrupt test. Add an event to " "synchronize the parent process with the child process: wait until the child " "process starts sleeping. Patch by Victor Stinner." msgstr "" -#: ../NEWS:20 +#: ../NEWS:532 msgid "" ":gh:`133682`: Fixed test case ``test.test_annotationlib.TestStringFormat." "test_displays`` which ensures proper handling of complex data structures " "(lists, sets, dictionaries, and tuples) in string annotations." msgstr "" -#: ../NEWS:25 +#: ../NEWS:537 msgid "" ":gh:`133639`: Fix ``TestPyReplAutoindent.test_auto_indent_default()`` " "doesn't run ``input_code``." msgstr "" -#: ../NEWS:29 ../NEWS:161 ../NEWS:961 ../NEWS:1341 ../NEWS:1892 ../NEWS:2764 -#: ../NEWS:3220 ../NEWS:3945 ../NEWS:6182 ../NEWS:7319 ../NEWS:7763 -#: ../NEWS:8319 ../NEWS:9838 ../NEWS:12317 ../NEWS:13514 ../NEWS:13835 -#: ../NEWS:14517 ../NEWS:14852 ../NEWS:15287 ../NEWS:17506 ../NEWS:21127 -#: ../NEWS:23031 ../NEWS:23736 ../NEWS:24161 ../NEWS:24395 ../NEWS:25019 -#: ../NEWS:25592 ../NEWS:25942 ../NEWS:27111 ../NEWS:27464 ../NEWS:27916 -#: ../NEWS:28422 ../NEWS:29123 ../NEWS:29508 ../NEWS:31461 ../NEWS:32219 -#: ../NEWS:32763 ../NEWS:33294 ../NEWS:36824 ../NEWS:37042 ../NEWS:38770 -#: ../NEWS:41223 ../NEWS:41990 ../NEWS:42454 ../NEWS:42481 ../NEWS:44525 -#: ../NEWS:44736 ../NEWS:45027 ../NEWS:46323 ../NEWS:46382 ../NEWS:46799 -#: ../NEWS:47502 -msgid "Security" -msgstr "" - -#: ../NEWS:31 +#: ../NEWS:543 msgid "" ":gh:`133767`: Fix use-after-free in the \"unicode-escape\" decoder with a " "non-\"strict\" error handler." msgstr "" -#: ../NEWS:35 ../NEWS:171 ../NEWS:976 ../NEWS:1349 ../NEWS:1920 ../NEWS:2418 -#: ../NEWS:2772 ../NEWS:3225 ../NEWS:3996 ../NEWS:6385 ../NEWS:6939 -#: ../NEWS:7395 ../NEWS:7881 ../NEWS:8487 ../NEWS:9374 ../NEWS:10499 -#: ../NEWS:12551 ../NEWS:13303 ../NEWS:13615 ../NEWS:13909 ../NEWS:14202 -#: ../NEWS:14600 ../NEWS:15026 ../NEWS:15941 ../NEWS:17709 ../NEWS:18380 -#: ../NEWS:19019 ../NEWS:19413 ../NEWS:19832 ../NEWS:20245 ../NEWS:20710 -#: ../NEWS:21674 ../NEWS:23218 ../NEWS:23850 ../NEWS:24233 ../NEWS:24457 -#: ../NEWS:24731 ../NEWS:25128 ../NEWS:25683 ../NEWS:26303 ../NEWS:27175 -#: ../NEWS:27563 ../NEWS:28050 ../NEWS:28510 ../NEWS:28872 ../NEWS:29218 -#: ../NEWS:29874 ../NEWS:31640 ../NEWS:32307 ../NEWS:32850 ../NEWS:33145 -#: ../NEWS:33896 ../NEWS:36304 ../NEWS:36337 ../NEWS:36465 ../NEWS:36673 -#: ../NEWS:36864 ../NEWS:37069 ../NEWS:37367 ../NEWS:37688 ../NEWS:38013 -#: ../NEWS:38603 ../NEWS:39263 ../NEWS:40933 ../NEWS:41279 ../NEWS:41645 -#: ../NEWS:41969 ../NEWS:42072 ../NEWS:42535 ../NEWS:42922 ../NEWS:43225 -#: ../NEWS:43307 ../NEWS:43410 ../NEWS:43580 ../NEWS:43915 ../NEWS:44333 -#: ../NEWS:44551 ../NEWS:44788 ../NEWS:45325 ../NEWS:46352 ../NEWS:46370 -#: ../NEWS:46458 ../NEWS:46939 ../NEWS:47654 ../NEWS:48318 ../NEWS:48756 -#: ../NEWS:48783 ../NEWS:48821 ../NEWS:48841 ../NEWS:48948 ../NEWS:49042 -#: ../NEWS:49138 ../NEWS:49213 ../NEWS:49471 ../NEWS:49694 ../NEWS:49867 -#: ../NEWS:50225 -msgid "Library" +#: ../NEWS:546 +msgid "" +":gh:`128840`: Short-circuit the processing of long IPv6 addresses early in :" +"mod:`ipaddress` to prevent excessive memory consumption and a minor denial-" +"of-service." +msgstr "" + +#: ../NEWS:553 +msgid "" +":gh:`132710`: If possible, ensure that :func:`uuid.getnode` returns the same " +"result even across different processes. Previously, the result was constant " +"only within the same process. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:557 +msgid "" +":gh:`80334`: :func:`multiprocessing.freeze_support` now checks for work on " +"any \"spawn\" start method platform rather than only on Windows." +msgstr "" + +#: ../NEWS:560 +msgid "" +":gh:`134582`: Fix tokenize.untokenize() round-trip errors related to t-" +"strings braces escaping" +msgstr "" + +#: ../NEWS:563 +msgid "" +":gh:`134546`: Ensure :mod:`pdb` remote debugging script is readable by " +"remote Python process." +msgstr "" + +#: ../NEWS:566 +msgid "" +":gh:`134451`: Converted ``asyncio.tools.CycleFoundException`` from dataclass " +"to a regular exception type." +msgstr "" + +#: ../NEWS:569 +msgid "" +":gh:`114177`: Fix :mod:`asyncio` to not close subprocess pipes which would " +"otherwise error out when the event loop is already closed." +msgstr "" + +#: ../NEWS:572 +msgid "" +":gh:`90871`: Fixed an off by one error concerning the backlog parameter in :" +"meth:`~asyncio.loop.create_unix_server`. Contributed by Christian Harries." +msgstr "" + +#: ../NEWS:576 +msgid ":gh:`134323`: Fix the :meth:`threading.RLock.locked` method." +msgstr "" + +#: ../NEWS:578 +msgid "" +":gh:`86802`: Fixed asyncio memory leak in cancelled shield tasks. For " +"shielded tasks where the shield was cancelled, log potential exceptions " +"through the exception handler. Contributed by Christian Harries." +msgstr "" + +#: ../NEWS:582 +msgid "" +":gh:`134209`: :mod:`curses`: The :meth:`curses.window.instr` and :meth:" +"`curses.window.getstr` methods now allocate their internal buffer on the " +"heap instead of the stack; in addition, the max buffer size is increased " +"from 1023 to 2047." +msgstr "" + +#: ../NEWS:587 +msgid "" +":gh:`134235`: Updated tab completion on REPL to include builtin modules. " +"Contributed by Tom Wang, Hunter Young" +msgstr "" + +#: ../NEWS:590 +msgid "" +":gh:`134152`: Fixed :exc:`UnboundLocalError` that could occur during :mod:" +"`email` header parsing if an expected trailing delimiter is missing in some " +"contexts." +msgstr "" + +#: ../NEWS:594 +msgid "" +":gh:`134168`: :mod:`http.server`: Fix IPv6 address binding and :option:`--" +"directory ` handling when using HTTPS." +msgstr "" + +#: ../NEWS:597 +msgid "" +":gh:`62184`: Remove import of C implementation of :class:`io.FileIO` from " +"Python implementation which has its own implementation" +msgstr "" + +#: ../NEWS:600 +msgid "" +":gh:`133982`: Emit :exc:`RuntimeWarning` in the Python implementation of :" +"mod:`io` when the :term:`file-like object ` is not closed " +"explicitly in the presence of multiple I/O layers." +msgstr "" + +#: ../NEWS:604 +msgid "" +":gh:`133890`: The :mod:`tarfile` module now handles :exc:" +"`UnicodeEncodeError` in the same way as :exc:`OSError` when cannot extract a " +"member." +msgstr "" + +#: ../NEWS:607 +msgid "" +":gh:`134097`: Fix interaction of the new :term:`REPL` and :option:`-X " +"showrefcount <-X>` command line option." +msgstr "" + +#: ../NEWS:610 +msgid "" +":gh:`133889`: The generated directory listing page in :class:`http.server." +"SimpleHTTPRequestHandler` now only shows the decoded path component of the " +"requested URL, and not the query and fragment." +msgstr "" + +#: ../NEWS:614 +msgid "" +":gh:`134098`: Fix handling paths that end with a percent-encoded slash " +"(``%2f`` or ``%2F``) in :class:`http.server.SimpleHTTPRequestHandler`." +msgstr "" + +#: ../NEWS:617 +msgid "" +":gh:`132124`: On POSIX-compliant systems, :func:`!multiprocessing.util." +"get_temp_dir` now ignores :envvar:`TMPDIR` (and similar environment " +"variables) if the path length of ``AF_UNIX`` socket files exceeds the " +"platform-specific maximum length when using the :ref:`forkserver " +"` start method. Patch by Bénédikt " +"Tran." +msgstr "" + +#: ../NEWS:624 +msgid "" +":gh:`134062`: :mod:`ipaddress`: fix collisions in :meth:`~object.__hash__` " +"for :class:`~ipaddress.IPv4Network` and :class:`~ipaddress.IPv6Network` " +"objects." msgstr "" -#: ../NEWS:37 +#: ../NEWS:628 msgid "" ":gh:`133970`: Make :class:`!string.templatelib.Template` and :class:`!string." "templatelib.Interpolation` generic." msgstr "" -#: ../NEWS:40 +#: ../NEWS:631 +msgid "" +":gh:`71253`: Raise :exc:`ValueError` in :func:`open` if *opener* returns a " +"negative file-descriptor in the Python implementation of :mod:`io` to match " +"the C implementation." +msgstr "" + +#: ../NEWS:635 +msgid "" +":gh:`133960`: Simplify and improve :func:`typing.evaluate_forward_ref`. It " +"now no longer raises errors on certain invalid types. In several situations, " +"it is now able to evaluate forward references that were previously " +"unsupported." +msgstr "" + +#: ../NEWS:640 msgid "" ":gh:`133925`: Make the private class ``typing._UnionGenericAlias`` hashable." msgstr "" -#: ../NEWS:42 +#: ../NEWS:642 msgid "" ":gh:`133653`: Fix :class:`argparse.ArgumentParser` with the " "*formatter_class* argument. Fix TypeError when *formatter_class* is a custom " @@ -163,33 +1236,46 @@ msgid "" "class:`!HelpFormatter`." msgstr "" -#: ../NEWS:49 +#: ../NEWS:649 msgid "" ":gh:`132641`: Fixed a race in :func:`functools.lru_cache` under free-" "threading." msgstr "" -#: ../NEWS:52 +#: ../NEWS:652 msgid "" ":gh:`133783`: Fix bug with applying :func:`copy.replace` to :mod:`ast` " "objects. Attributes that default to ``None`` were incorrectly treated as " "required for manually created AST nodes." msgstr "" -#: ../NEWS:56 +#: ../NEWS:656 +msgid "" +":gh:`133684`: Fix bug where :func:`annotationlib.get_annotations` would " +"return the wrong result for certain classes that are part of a class " +"hierarchy where ``from __future__ import annotations`` is used." +msgstr "" + +#: ../NEWS:660 msgid "" ":gh:`77057`: Fix handling of invalid markup declarations in :class:`html." "parser.HTMLParser`." msgstr "" -#: ../NEWS:59 +#: ../NEWS:663 +msgid "" +":gh:`130328`: Speedup pasting in ``PyREPL`` on Windows in a legacy console. " +"Patch by Chris Eibl." +msgstr "" + +#: ../NEWS:666 msgid "" ":gh:`133701`: Fix bug where :class:`typing.TypedDict` classes defined under " "``from __future__ import annotations`` and inheriting from another " "``TypedDict`` had an incorrect ``__annotations__`` attribute." msgstr "" -#: ../NEWS:63 +#: ../NEWS:670 msgid "" ":gh:`133581`: Improve unparsing of t-strings in :func:`ast.unparse` and " "``from __future__ import annotations``. Empty t-strings now round-trip " @@ -197,196 +1283,253 @@ msgid "" "Zijlstra." msgstr "" -#: ../NEWS:68 +#: ../NEWS:675 msgid "" ":gh:`133551`: Support t-strings (:pep:`750`) in :mod:`annotationlib`. Patch " "by Jelle Zijlstra." msgstr "" -#: ../NEWS:71 +#: ../NEWS:678 msgid "" ":gh:`133439`: Fix dot commands with trailing spaces are mistaken for multi-" "line SQL statements in the sqlite3 command-line interface." msgstr "" -#: ../NEWS:74 +#: ../NEWS:681 +msgid "" +":gh:`132493`: Avoid accessing ``__annotations__`` unnecessarily in :func:" +"`inspect.signature`." +msgstr "" + +#: ../NEWS:684 +msgid "" +":gh:`132876`: ``ldexp()`` on Windows doesn't round subnormal results before " +"Windows 11, but should. Python's :func:`math.ldexp` wrapper now does round " +"them, so results may change slightly, in rare cases of very small results, " +"on Windows versions before 11." +msgstr "" + +#: ../NEWS:689 msgid "" ":gh:`133009`: :mod:`xml.etree.ElementTree`: Fix a crash in :meth:`Element." "__deepcopy__ ` when the element is concurrently " "mutated. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:78 +#: ../NEWS:693 msgid "" ":gh:`91555`: Ignore log messages generated during handling of log messages, " -"to avoid deadlock or infinite recursion." +"to avoid deadlock or infinite recursion. [NOTE: This change has since been " +"reverted.]" msgstr "" -#: ../NEWS:81 +#: ../NEWS:697 msgid "" ":gh:`125028`: :data:`functools.Placeholder` cannot be passed to :func:" "`functools.partial` as a keyword argument." msgstr "" -#: ../NEWS:84 +#: ../NEWS:700 +msgid "" +":gh:`62824`: Fix aliases for ``iso8859_8`` encoding. Patch by Dave Goncalves." +msgstr "" + +#: ../NEWS:702 msgid "" ":gh:`86155`: :meth:`html.parser.HTMLParser.close` no longer loses data when " "the ``