diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index d0a0ef86..10df8f30 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ blank_issues_enabled: false contact_links: - name: راهنمای مشارکت (CONTRIBUTING.md) - url: https://github.com/python/python-docs-fa/blob/3.14/CONTRIBUTING.md + url: https://github.com/python/python-docs-fa/blob/3.15/CONTRIBUTING.md about: پیش از ثبت issue، لطفاً راهنمای مشارکت و README را مطالعه کنید \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 07a15da4..dd513955 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -21,5 +21,5 @@ - [ ] نشانه‌گذاری‌های Sphinx (`:class:`، `:func:`، کد درون‌خطی) و جای‌گذارها (`%s`، `{name}`) دست‌نخورده مانده‌اند - [ ] ترجمه‌ها با [واژه‌نامه](http://python.github.io/python-docs-fa/glossary-searcher) هماهنگ است - [ ] رشته‌های `fuzzy` بررسی و در صورت لزوم بازنویسی شده‌اند -- [ ] پرونده [CONTRIBUTING.md](https://github.com/python/python-docs-fa/blob/3.14/CONTRIBUTING.md) با دقت خوانده شده است. +- [ ] پرونده [CONTRIBUTING.md](https://github.com/python/python-docs-fa/blob/3.15/CONTRIBUTING.md) با دقت خوانده شده است. diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index dde9f0ab..481393fa 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -5,7 +5,7 @@ on: - cron: '0 6 * * *' push: branches: - - 3.14 + - 3.15 workflow_dispatch: permissions: @@ -25,7 +25,7 @@ jobs: uses: actions/checkout@v4 with: repository: python/cpython - ref: '3.14' + ref: '3.15' - name: Set up Python uses: actions/setup-python@v4 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index fc8851da..41aa19fa 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -21,7 +21,7 @@ jobs: uses: actions/checkout@v4 with: repository: python/cpython - ref: '3.14' + ref: '3.15' - name: Set up Python uses: actions/setup-python@v4 diff --git a/.github/workflows/sync-with-cpython.yml b/.github/workflows/sync-with-cpython.yml index 15fa963f..ebb6c5a7 100644 --- a/.github/workflows/sync-with-cpython.yml +++ b/.github/workflows/sync-with-cpython.yml @@ -6,9 +6,9 @@ on: workflow_dispatch: inputs: cpython_tag: - description: 'CPython tag/branch to sync against (e.g. 3.14)' + description: 'CPython tag/branch to sync against (e.g. 3.15)' required: false - default: '3.14' + default: '3.15' permissions: contents: write @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 45 env: - CPYTHON_TAG: ${{ github.event.inputs.cpython_tag || '3.14' }} + CPYTHON_TAG: ${{ github.event.inputs.cpython_tag || '3.15' }} steps: - name: Checkout translation repo uses: actions/checkout@v4 diff --git a/.readthedocs.yml b/.readthedocs.yml index f1653547..4e835784 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -5,7 +5,7 @@ build: tools: python: "3.12" commands: - - git clone --depth 1 --branch 3.14 https://github.com/python/cpython venv/cpython + - git clone --depth 1 --branch 3.15 https://github.com/python/cpython venv/cpython - pip install -r venv/cpython/Doc/requirements.txt # Pin Sphinx separately: requirements.txt may resolve to an older version, # and 9.1.0+ is needed for the reordered- ref / translated-display-text diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4406f7b7..dc97a454 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,9 +22,9 @@ git checkout -b translate-functions ``` -3. کارتان را روی شاخه‌ی `3.14` (شاخه‌ی پیش‌فرض) آماده کنید. +3. کارتان را روی شاخه‌ی `3.15` (شاخه‌ی پیش‌فرض) آماده کنید. -4. بعد از ترجمه، تغییرات را روی شاخه‌ی خودتان پوش کنید و یک **پول‌ریکوئست** به شاخه‌ی `3.14` باز کنید. +4. بعد از ترجمه، تغییرات را روی شاخه‌ی خودتان پوش کنید و یک **پول‌ریکوئست** به شاخه‌ی `3.15` باز کنید. ## ساختار پرونده‌ها diff --git a/Makefile b/Makefile index dc05b7ae..9425945a 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ CPYTHON_CURRENT_COMMIT := d26c2fe7a2833606b3fb8d9789149d8696978d86 LANGUAGE := fa -BRANCH := 3.14 +BRANCH := 3.15 EXCLUDED := \ whatsnew/2.?.po \ diff --git a/README.md b/README.md index cf508401..9f5d9f79 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ ### شاخه‌های نسخه -ترجمه‌ها به‌ازای هر نسخه‌ی پایتون در یک شاخه‌ی جدا نگهداری می‌شوند. شاخه‌ی فعلی و پیش‌فرض، نسخه‌ی `3.14` است و پول‌ریکوئست‌ها باید روی همین شاخه باز شوند (برای مثال روی پرونده‌های `tutorial/`، `library/`، `c-api/` و غیره). هنگام انتشار نسخه‌ی جدید پایتون، هماهنگ‌کننده‌ها شاخه‌ی جدیدی ایجاد و ترجمه‌ها را به آن منتقل می‌کنند. +ترجمه‌ها به‌ازای هر نسخه‌ی پایتون در یک شاخه‌ی جدا نگهداری می‌شوند. شاخه‌ی فعلی و پیش‌فرض، نسخه‌ی `3.15` است و پول‌ریکوئست‌ها باید روی همین شاخه باز شوند (برای مثال روی پرونده‌های `tutorial/`، `library/`، `c-api/` و غیره). هنگام انتشار نسخه‌ی جدید پایتون، هماهنگ‌کننده‌ها شاخه‌ی جدیدی ایجاد و ترجمه‌ها را به آن منتقل می‌کنند. ## ارتباط و هماهنگی @@ -49,6 +49,6 @@ ### مشارکت‌های کاربران -![نمودار مشارکت‌های کاربران؛ sepehr-rs 38277، Revisto 3984، danialbehzadi 677، invincible627 358، khosro_o 63، ParhamF 41، Ariyan_Bolandi 37، nikovinix7878 13، thaghgoo 12، Ramiz_222 10](reports/contributor_stats_latest.png) -(به‌روزرسانی: 2026-09-24) +![نمودار مشارکت‌های کاربران؛ sepehr-rs 38277، arman mohebali 5830، Revisto 3984، danialbehzadi 677، invincible627 358، khosro_o 63، ParhamF 41، Ariyan_Bolandi 37، mahdyaralipor 21، nikovinix7878 13](reports/contributor_stats_latest.png) +(به‌روزرسانی: 2026-10-07) diff --git a/STATUS.md b/STATUS.md index 785d933c..ae96e81f 100644 --- a/STATUS.md +++ b/STATUS.md @@ -1,54 +1,54 @@ ### وضعیت ترجمه فایل‌ها -(به‌روزرسانی: 2026-10-01) +(به‌روزرسانی: 2026-10-08) | فایل | ترجمه‌شده | مبهم | تعداد ترجمه‌شده | تعداد ترجمه‌نشده | |:-----|:-----------:|:-----------:|:-----------:|:-----------:| | about.po | 100.0% | 0.0% | 10 | 0 | | bugs.po | 100.0% | 0.0% | 31 | 0 | | builtins/constants.po | 100.0% | 0.0% | 22 | 0 | -| builtins/exceptions.po | 100.0% | 0.0% | 203 | 0 | -| builtins/functions.po | 100.0% | 0.0% | 522 | 0 | +| builtins/exceptions.po | 100.0% | 0.0% | 206 | 0 | +| builtins/functions.po | 100.0% | 0.0% | 539 | 0 | | builtins/index.po | 100.0% | 0.0% | 5 | 0 | -| builtins/stdtypes.po | 100.0% | 0.0% | 1583 | 0 | -| builtins/time-complexity.po | 100.0% | 0.0% | 120 | 0 | +| builtins/stdtypes.po | 100.0% | 0.0% | 1608 | 0 | +| builtins/threadsafety.po | 100.0% | 0.0% | 118 | 0 | +| builtins/time-complexity.po | 100.0% | 0.0% | 121 | 0 | | c-api/abstract.po | 100.0% | 0.0% | 3 | 0 | | c-api/allocation.po | 100.0% | 0.0% | 40 | 0 | -| c-api/apiabiversion.po | 100.0% | 0.0% | 60 | 0 | -| c-api/arg.po | 100.0% | 0.0% | 205 | 0 | +| c-api/apiabiversion.po | 100.0% | 0.0% | 62 | 0 | +| c-api/arg.po | 100.0% | 0.0% | 208 | 0 | | c-api/bool.po | 100.0% | 0.0% | 11 | 0 | | c-api/buffer.po | 100.0% | 0.0% | 119 | 0 | | c-api/bytearray.po | 100.0% | 0.0% | 24 | 0 | -| c-api/bytes.po | 100.0% | 0.0% | 78 | 0 | +| c-api/bytes.po | 100.0% | 0.0% | 121 | 0 | | c-api/call.po | 100.0% | 0.0% | 99 | 0 | | c-api/capsule.po | 100.0% | 0.0% | 36 | 0 | | c-api/cell.po | 100.0% | 0.0% | 11 | 0 | | c-api/code.po | 100.0% | 0.0% | 82 | 0 | | c-api/codec.po | 100.0% | 0.0% | 30 | 0 | -| c-api/complex.po | 100.0% | 0.0% | 35 | 0 | +| c-api/complex.po | 100.0% | 0.0% | 37 | 0 | | c-api/concrete.po | 100.0% | 0.0% | 16 | 0 | | c-api/contextvars.po | 100.0% | 0.0% | 38 | 0 | | c-api/conversion.po | 100.0% | 0.0% | 55 | 0 | | c-api/coro.po | 100.0% | 0.0% | 6 | 0 | | c-api/curses.po | 100.0% | 0.0% | 28 | 0 | -| c-api/datetime.po | 100.0% | 0.0% | 65 | 0 | -| c-api/descriptor.po | 100.0% | 0.0% | 33 | 0 | -| c-api/dict.po | 100.0% | 0.0% | 109 | 0 | -| c-api/exceptions.po | 100.0% | 0.0% | 274 | 0 | -| c-api/extension-modules.po | 100.0% | 0.0% | 50 | 0 | +| c-api/datetime.po | 100.0% | 0.0% | 67 | 0 | +| c-api/descriptor.po | 100.0% | 0.0% | 35 | 0 | +| c-api/dict.po | 100.0% | 0.0% | 123 | 0 | +| c-api/extension-modules.po | 100.0% | 0.0% | 74 | 0 | | c-api/file.po | 100.0% | 0.0% | 31 | 0 | -| c-api/float.po | 100.0% | 0.0% | 58 | 0 | +| c-api/float.po | 100.0% | 0.0% | 55 | 0 | | c-api/frame.po | 100.0% | 0.0% | 60 | 0 | -| c-api/function.po | 100.0% | 0.0% | 43 | 0 | -| c-api/gcsupport.po | 100.0% | 0.0% | 68 | 0 | +| c-api/function.po | 100.0% | 0.0% | 44 | 0 | +| c-api/gcsupport.po | 100.0% | 0.0% | 107 | 0 | | c-api/gen.po | 100.0% | 0.0% | 18 | 0 | | c-api/hash.po | 100.0% | 0.0% | 40 | 0 | -| c-api/import.po | 100.0% | 0.0% | 67 | 0 | +| c-api/import.po | 100.0% | 0.0% | 80 | 0 | | c-api/index.po | 100.0% | 0.0% | 2 | 0 | | c-api/init.po | 100.0% | 0.0% | 8 | 0 | -| c-api/init_config.po | 100.0% | 0.0% | 639 | 0 | -| c-api/interp-lifecycle.po | 100.0% | 0.0% | 202 | 0 | -| c-api/intro.po | 100.0% | 0.0% | 217 | 0 | +| c-api/init_config.po | 100.0% | 0.0% | 660 | 0 | +| c-api/interp-lifecycle.po | 100.0% | 0.0% | 217 | 0 | +| c-api/intro.po | 100.0% | 0.0% | 240 | 0 | | c-api/iter.po | 100.0% | 0.0% | 12 | 0 | | c-api/iterator.po | 100.0% | 0.0% | 24 | 0 | | c-api/lifecycle.po | 100.0% | 0.0% | 45 | 0 | @@ -59,57 +59,65 @@ | c-api/memory.po | 100.0% | 0.0% | 219 | 0 | | c-api/memoryview.po | 100.0% | 0.0% | 15 | 0 | | c-api/method.po | 100.0% | 0.0% | 20 | 0 | -| c-api/module.po | 100.0% | 0.0% | 135 | 0 | +| c-api/module.po | 100.0% | 0.0% | 225 | 0 | | c-api/monitoring.po | 100.0% | 0.0% | 55 | 0 | | c-api/none.po | 100.0% | 0.0% | 7 | 0 | | c-api/number.po | 100.0% | 0.0% | 48 | 0 | -| c-api/object.po | 100.0% | 0.0% | 147 | 0 | +| c-api/object.po | 100.0% | 0.0% | 161 | 0 | | c-api/objimpl.po | 100.0% | 0.0% | 2 | 0 | | c-api/perfmaps.po | 100.0% | 0.0% | 24 | 0 | | c-api/picklebuffer.po | 100.0% | 0.0% | 16 | 0 | | c-api/profiling.po | 100.0% | 0.0% | 46 | 0 | | c-api/refcounting.po | 100.0% | 0.0% | 50 | 0 | | c-api/reflection.po | 100.0% | 0.0% | 17 | 0 | +| c-api/sentinel.po | 100.0% | 0.0% | 6 | 0 | | c-api/sequence.po | 100.0% | 0.0% | 32 | 0 | | c-api/set.po | 100.0% | 0.0% | 35 | 0 | -| c-api/stable.po | 100.0% | 0.0% | 45 | 0 | -| c-api/structures.po | 100.0% | 0.0% | 206 | 0 | -| c-api/subinterpreters.po | 100.0% | 0.0% | 87 | 0 | -| c-api/synchronization.po | 100.0% | 0.0% | 58 | 0 | -| c-api/sys.po | 100.0% | 0.0% | 87 | 0 | -| c-api/threads.po | 100.0% | 0.0% | 176 | 0 | +| c-api/slice.po | 100.0% | 0.0% | 25 | 0 | +| c-api/slots.po | 100.0% | 0.0% | 45 | 0 | +| c-api/stable.po | 100.0% | 0.0% | 97 | 0 | +| c-api/structures.po | 100.0% | 0.0% | 212 | 0 | +| c-api/subinterpreters.po | 100.0% | 0.0% | 90 | 0 | +| c-api/synchronization.po | 100.0% | 0.0% | 65 | 0 | +| c-api/sys.po | 100.0% | 0.0% | 95 | 0 | +| c-api/threads.po | 100.0% | 0.0% | 213 | 0 | | c-api/time.po | 100.0% | 0.0% | 27 | 0 | | c-api/tls.po | 100.0% | 0.0% | 27 | 0 | -| c-api/tuple.po | 100.0% | 0.0% | 47 | 0 | -| c-api/type.po | 100.0% | 0.0% | 137 | 0 | +| c-api/tuple.po | 100.0% | 0.0% | 51 | 0 | +| c-api/type.po | 100.0% | 0.0% | 203 | 0 | | c-api/typehints.po | 100.0% | 0.0% | 7 | 0 | -| c-api/typeobj.po | 100.0% | 0.0% | 764 | 0 | -| c-api/unicode.po | 100.0% | 0.0% | 414 | 0 | +| c-api/typeobj.po | 100.0% | 0.0% | 754 | 0 | +| c-api/unicode.po | 100.0% | 0.0% | 418 | 0 | | c-api/utilities.po | 100.0% | 0.0% | 2 | 0 | | c-api/veryhigh.po | 100.0% | 0.0% | 86 | 0 | -| c-api/weakref.po | 100.0% | 0.0% | 23 | 0 | +| c-api/weakref.po | 100.0% | 0.0% | 19 | 0 | | contents.po | 100.0% | 0.0% | 1 | 0 | | copyright.po | 100.0% | 0.0% | 7 | 0 | | deprecations/c-api-pending-removal-in-3.14.po | 100.0% | 0.0% | 3 | 0 | -| deprecations/c-api-pending-removal-in-3.15.po | 100.0% | 0.0% | 45 | 0 | +| deprecations/c-api-pending-removal-in-3.15.po | 100.0% | 0.0% | 44 | 0 | | deprecations/c-api-pending-removal-in-3.16.po | 100.0% | 0.0% | 2 | 0 | | deprecations/c-api-pending-removal-in-3.18.po | 100.0% | 0.0% | 22 | 0 | +| deprecations/c-api-pending-removal-in-3.19.po | 100.0% | 0.0% | 2 | 0 | +| deprecations/c-api-pending-removal-in-3.20.po | 100.0% | 0.0% | 4 | 0 | | deprecations/c-api-pending-removal-in-future.po | 100.0% | 0.0% | 20 | 0 | -| deprecations/index.po | 100.0% | 0.0% | 230 | 0 | +| deprecations/index.po | 100.0% | 0.0% | 275 | 0 | | deprecations/pending-removal-in-3.13.po | 100.0% | 0.0% | 33 | 0 | | deprecations/pending-removal-in-3.14.po | 100.0% | 0.0% | 33 | 0 | -| deprecations/pending-removal-in-3.15.po | 100.0% | 0.0% | 29 | 0 | +| deprecations/pending-removal-in-3.15.po | 100.0% | 0.0% | 30 | 0 | | deprecations/pending-removal-in-3.16.po | 100.0% | 0.0% | 36 | 0 | -| deprecations/pending-removal-in-3.17.po | 100.0% | 0.0% | 9 | 0 | -| deprecations/pending-removal-in-3.18.po | 100.0% | 0.0% | 3 | 0 | -| deprecations/pending-removal-in-3.19.po | 100.0% | 0.0% | 3 | 0 | +| deprecations/pending-removal-in-3.17.po | 100.0% | 0.0% | 19 | 0 | +| deprecations/pending-removal-in-3.18.po | 100.0% | 0.0% | 7 | 0 | +| deprecations/pending-removal-in-3.19.po | 100.0% | 0.0% | 13 | 0 | +| deprecations/pending-removal-in-3.20.po | 100.0% | 0.0% | 38 | 0 | | deprecations/pending-removal-in-future.po | 100.0% | 0.0% | 70 | 0 | +| deprecations/soft-deprecations.po | 100.0% | 0.0% | 6 | 0 | | distributing/index.po | 100.0% | 0.0% | 2 | 0 | | extending/building.po | 100.0% | 0.0% | 6 | 0 | | extending/embedding.po | 100.0% | 0.0% | 59 | 0 | -| extending/extending.po | 100.0% | 0.0% | 226 | 0 | -| extending/index.po | 100.0% | 0.0% | 11 | 0 | -| extending/newtypes.po | 100.0% | 0.0% | 117 | 0 | +| extending/extending.po | 100.0% | 0.0% | 166 | 0 | +| extending/first-extension-module.po | 100.0% | 0.0% | 146 | 0 | +| extending/index.po | 100.0% | 0.0% | 22 | 0 | +| extending/newtypes.po | 100.0% | 0.0% | 118 | 0 | | extending/newtypes_tutorial.po | 100.0% | 0.0% | 180 | 0 | | extending/windows.po | 100.0% | 0.0% | 28 | 0 | | faq/design.po | 100.0% | 0.0% | 174 | 0 | @@ -122,52 +130,53 @@ | faq/programming.po | 100.0% | 0.0% | 506 | 0 | | faq/windows.po | 100.0% | 0.0% | 58 | 0 | | glossary.po | 100.0% | 0.0% | 501 | 0 | -| howto/a-conceptual-overview-of-asyncio.po | 100.0% | 0.0% | 93 | 0 | -| howto/annotations.po | 100.0% | 0.0% | 52 | 0 | +| howto/a-conceptual-overview-of-asyncio.po | 100.0% | 0.0% | 95 | 0 | +| howto/annotations.po | 100.0% | 0.0% | 50 | 0 | | howto/argparse-optparse.po | 100.0% | 0.0% | 20 | 0 | -| howto/argparse.po | 100.0% | 0.0% | 145 | 0 | +| howto/argparse.po | 100.0% | 0.0% | 143 | 0 | | howto/clinic.po | 100.0% | 0.0% | 2 | 0 | | howto/cporting.po | 100.0% | 0.0% | 5 | 0 | -| howto/curses.po | 100.0% | 0.0% | 122 | 0 | -| howto/descriptor.po | 100.0% | 0.0% | 230 | 0 | +| howto/curses.po | 100.0% | 0.0% | 118 | 0 | +| howto/descriptor.po | 100.0% | 0.0% | 226 | 0 | | howto/enum.po | 100.0% | 0.0% | 309 | 0 | -| howto/free-threading-extensions.po | 100.0% | 0.0% | 106 | 0 | +| howto/free-threading-extensions.po | 100.0% | 0.0% | 112 | 0 | | howto/free-threading-python.po | 100.0% | 0.0% | 67 | 0 | -| howto/functional.po | 100.0% | 0.0% | 252 | 0 | +| howto/functional.po | 100.0% | 0.0% | 248 | 0 | | howto/gdb_helpers.po | 100.0% | 0.0% | 86 | 0 | -| howto/index.po | 100.0% | 0.0% | 30 | 0 | -| howto/instrumentation.po | 100.0% | 0.0% | 99 | 0 | -| howto/ipaddress.po | 100.0% | 0.0% | 65 | 0 | +| howto/index.po | 100.0% | 0.0% | 31 | 0 | +| howto/instrumentation.po | 100.0% | 0.0% | 96 | 0 | +| howto/ipaddress.po | 100.0% | 0.0% | 62 | 0 | | howto/isolating-extensions.po | 100.0% | 0.0% | 134 | 0 | -| howto/logging-cookbook.po | 100.0% | 0.0% | 435 | 0 | -| howto/logging.po | 100.0% | 0.0% | 250 | 0 | +| howto/logging-cookbook.po | 100.0% | 0.0% | 433 | 0 | +| howto/logging.po | 100.0% | 0.0% | 248 | 0 | | howto/mro.po | 100.0% | 0.0% | 120 | 0 | -| howto/perf_profiling.po | 100.0% | 0.0% | 50 | 0 | -| howto/pyporting.po | 100.0% | 0.0% | 13 | 0 | -| howto/regex.po | 100.0% | 0.0% | 337 | 0 | +| howto/perf_profiling.po | 100.0% | 0.0% | 54 | 0 | +| howto/pyporting.po | 100.0% | 0.0% | 11 | 0 | +| howto/regex.po | 100.0% | 0.0% | 335 | 0 | | howto/remote_debugging.po | 100.0% | 0.0% | 154 | 0 | -| howto/sockets.po | 100.0% | 0.0% | 63 | 0 | -| howto/sorting.po | 100.0% | 0.0% | 92 | 0 | +| howto/sockets.po | 100.0% | 0.0% | 61 | 0 | +| howto/sorting.po | 100.0% | 0.0% | 90 | 0 | | howto/timerfd.po | 100.0% | 0.0% | 12 | 0 | -| howto/unicode.po | 100.0% | 0.0% | 145 | 0 | -| howto/urllib2.po | 100.0% | 0.0% | 100 | 0 | +| howto/unicode.po | 100.0% | 0.0% | 143 | 0 | +| howto/urllib2.po | 100.0% | 0.0% | 98 | 0 | | improve-page-nojs.po | 100.0% | 0.0% | 6 | 0 | | improve-page.po | 100.0% | 0.0% | 8 | 0 | | installing/index.po | 100.0% | 0.0% | 53 | 0 | | library/__future__.po | 100.0% | 0.0% | 49 | 0 | | library/__main__.po | 100.0% | 0.0% | 72 | 0 | -| library/_thread.po | 100.0% | 0.0% | 52 | 0 | +| library/_thread.po | 100.0% | 0.0% | 53 | 0 | | library/abc.po | 100.0% | 0.0% | 60 | 0 | | library/aifc.po | 100.0% | 0.0% | 3 | 0 | | library/allos.po | 100.0% | 0.0% | 2 | 0 | | library/annotationlib.po | 100.0% | 0.0% | 158 | 0 | | library/archiving.po | 100.0% | 0.0% | 2 | 0 | -| library/argparse.po | 100.0% | 0.0% | 409 | 0 | -| library/array.po | 100.0% | 0.0% | 89 | 0 | -| library/ast.po | 100.0% | 0.0% | 338 | 0 | +| library/argparse.po | 100.0% | 0.0% | 421 | 0 | +| library/array.po | 100.0% | 0.0% | 102 | 0 | +| library/ast.po | 100.0% | 0.0% | 345 | 0 | | library/asynchat.po | 100.0% | 0.0% | 4 | 0 | | library/asyncio-api-index.po | 100.0% | 0.0% | 100 | 0 | | library/asyncio-dev.po | 100.0% | 0.0% | 84 | 0 | +| library/asyncio-eventloop.po | 100.0% | 0.0% | 427 | 0 | | library/asyncio-exceptions.po | 100.0% | 0.0% | 19 | 0 | | library/asyncio-extending.po | 100.0% | 0.0% | 27 | 0 | | library/asyncio-future.po | 100.0% | 0.0% | 66 | 0 | @@ -178,70 +187,72 @@ | library/asyncio-protocol.po | 100.0% | 0.0% | 194 | 0 | | library/asyncio-queue.po | 100.0% | 0.0% | 49 | 0 | | library/asyncio-runner.po | 100.0% | 0.0% | 41 | 0 | +| library/asyncio-stream.po | 100.0% | 0.0% | 106 | 0 | | library/asyncio-subprocess.po | 100.0% | 0.0% | 80 | 0 | | library/asyncio-sync.po | 100.0% | 0.0% | 100 | 0 | -| library/asyncio-task.po | 100.0% | 0.0% | 280 | 0 | +| library/asyncio-task.po | 100.0% | 0.0% | 285 | 0 | | library/asyncio-threading.po | 100.0% | 0.0% | 21 | 0 | -| library/asyncio-tools.po | 100.0% | 0.0% | 22 | 0 | +| library/asyncio-tools.po | 100.0% | 0.0% | 23 | 0 | | library/asyncio.po | 100.0% | 0.0% | 36 | 0 | | library/asyncore.po | 100.0% | 0.0% | 4 | 0 | | library/atexit.po | 100.0% | 0.0% | 23 | 0 | | library/audioop.po | 100.0% | 0.0% | 3 | 0 | | library/audit_events.po | 100.0% | 0.0% | 26 | 0 | -| library/base64.po | 100.0% | 0.0% | 78 | 0 | -| library/bdb.po | 100.0% | 0.0% | 119 | 0 | +| library/base64.po | 100.0% | 0.0% | 99 | 0 | +| library/bdb.po | 100.0% | 0.0% | 116 | 0 | | library/binary.po | 100.0% | 0.0% | 4 | 0 | -| library/binascii.po | 100.0% | 0.0% | 38 | 0 | +| library/binascii.po | 100.0% | 0.0% | 89 | 0 | | library/bisect.po | 100.0% | 0.0% | 36 | 0 | | library/builtins.po | 100.0% | 0.0% | 9 | 0 | | library/bz2.po | 100.0% | 0.0% | 75 | 0 | -| library/calendar.po | 100.0% | 0.0% | 117 | 0 | +| library/calendar.po | 100.0% | 0.0% | 123 | 0 | | library/cgi.po | 100.0% | 0.0% | 4 | 0 | | library/cgitb.po | 100.0% | 0.0% | 4 | 0 | | library/chunk.po | 100.0% | 0.0% | 3 | 0 | | library/cmath.po | 100.0% | 0.0% | 124 | 0 | | library/cmd.po | 100.0% | 0.0% | 50 | 0 | -| library/cmdline.po | 100.0% | 0.0% | 53 | 0 | +| library/cmdline.po | 100.0% | 0.0% | 54 | 0 | | library/cmdlinelibs.po | 100.0% | 0.0% | 3 | 0 | | library/code.po | 100.0% | 0.0% | 33 | 0 | -| library/codecs.po | 100.0% | 0.0% | 567 | 0 | +| library/codecs.po | 100.0% | 0.0% | 569 | 0 | | library/codeop.po | 100.0% | 0.0% | 14 | 0 | | library/collections.abc.po | 100.0% | 0.0% | 142 | 0 | -| library/collections.po | 100.0% | 0.0% | 244 | 0 | +| library/collections.po | 100.0% | 0.0% | 247 | 0 | | library/colorsys.po | 100.0% | 0.0% | 13 | 0 | | library/compileall.po | 100.0% | 0.0% | 63 | 0 | | library/compression.po | 100.0% | 0.0% | 7 | 0 | -| library/compression.zstd.po | 100.0% | 0.0% | 174 | 0 | +| library/compression.zstd.po | 100.0% | 0.0% | 175 | 0 | | library/concurrency.po | 100.0% | 0.0% | 3 | 0 | | library/concurrent.futures.po | 100.0% | 0.0% | 121 | 0 | | library/concurrent.interpreters.po | 100.0% | 0.0% | 87 | 0 | | library/concurrent.po | 100.0% | 0.0% | 4 | 0 | -| library/configparser.po | 100.0% | 0.0% | 226 | 0 | -| library/contextlib.po | 100.0% | 0.0% | 172 | 0 | +| library/configparser.po | 100.0% | 0.0% | 227 | 0 | +| library/contextlib.po | 100.0% | 0.0% | 181 | 0 | | library/contextvars.po | 100.0% | 0.0% | 66 | 0 | | library/copy.po | 100.0% | 0.0% | 32 | 0 | | library/copyreg.po | 100.0% | 0.0% | 12 | 0 | | library/crypt.po | 100.0% | 0.0% | 4 | 0 | | library/crypto.po | 100.0% | 0.0% | 3 | 0 | | library/csv.po | 100.0% | 0.0% | 133 | 0 | +| library/ctypes.po | 100.0% | 0.0% | 678 | 0 | | library/curses.ascii.po | 100.0% | 0.0% | 69 | 0 | | library/curses.panel.po | 100.0% | 0.0% | 25 | 0 | | library/curses.po | 100.0% | 0.0% | 510 | 0 | | library/custominterp.po | 100.0% | 0.0% | 3 | 0 | -| library/dataclasses.po | 100.0% | 0.0% | 162 | 0 | +| library/dataclasses.po | 100.0% | 0.0% | 165 | 0 | | library/datatypes.po | 100.0% | 0.0% | 4 | 0 | -| library/datetime.po | 100.0% | 0.0% | 659 | 0 | -| library/dbm.po | 100.0% | 0.0% | 108 | 0 | +| library/datetime.po | 100.0% | 0.0% | 698 | 0 | +| library/dbm.po | 100.0% | 0.0% | 115 | 0 | | library/debug.po | 100.0% | 0.0% | 2 | 0 | -| library/decimal.po | 100.0% | 0.0% | 386 | 0 | +| library/decimal.po | 100.0% | 0.0% | 387 | 0 | | library/development.po | 100.0% | 0.0% | 3 | 0 | | library/devmode.po | 100.0% | 0.0% | 58 | 0 | | library/dialog.po | 100.0% | 0.0% | 68 | 0 | -| library/difflib.po | 100.0% | 0.0% | 150 | 0 | -| library/dis.po | 100.0% | 0.0% | 414 | 0 | +| library/difflib.po | 100.0% | 0.0% | 152 | 0 | +| library/dis.po | 100.0% | 0.0% | 413 | 0 | | library/distribution.po | 100.0% | 0.0% | 2 | 0 | | library/distutils.po | 100.0% | 0.0% | 3 | 0 | -| library/doctest.po | 100.0% | 0.0% | 379 | 0 | +| library/doctest.po | 100.0% | 0.0% | 381 | 0 | | library/email.charset.po | 100.0% | 0.0% | 44 | 0 | | library/email.compat32-message.po | 100.0% | 0.0% | 115 | 0 | | library/email.contentmanager.po | 100.0% | 0.0% | 42 | 0 | @@ -250,19 +261,19 @@ | library/email.examples.po | 100.0% | 0.0% | 20 | 0 | | library/email.generator.po | 100.0% | 0.0% | 41 | 0 | | library/email.header.po | 100.0% | 0.0% | 46 | 0 | -| library/email.headerregistry.po | 100.0% | 0.0% | 111 | 0 | +| library/email.headerregistry.po | 100.0% | 0.0% | 112 | 0 | | library/email.iterators.po | 100.0% | 0.0% | 12 | 0 | | library/email.message.po | 100.0% | 0.0% | 111 | 0 | | library/email.mime.po | 100.0% | 0.0% | 38 | 0 | | library/email.parser.po | 100.0% | 0.0% | 48 | 0 | | library/email.po | 100.0% | 0.0% | 23 | 0 | -| library/email.policy.po | 100.0% | 0.0% | 108 | 0 | +| library/email.policy.po | 100.0% | 0.0% | 110 | 0 | | library/email.utils.po | 100.0% | 0.0% | 36 | 0 | | library/ensurepip.po | 100.0% | 0.0% | 40 | 0 | | library/enum.po | 100.0% | 0.0% | 257 | 0 | | library/errno.po | 100.0% | 0.0% | 161 | 0 | -| library/faulthandler.po | 100.0% | 0.0% | 53 | 0 | -| library/fcntl.po | 100.0% | 0.0% | 54 | 0 | +| library/faulthandler.po | 100.0% | 0.0% | 55 | 0 | +| library/fcntl.po | 100.0% | 0.0% | 55 | 0 | | library/filecmp.po | 100.0% | 0.0% | 42 | 0 | | library/fileformats.po | 100.0% | 0.0% | 2 | 0 | | library/fileinput.po | 100.0% | 0.0% | 46 | 0 | @@ -270,67 +281,68 @@ | library/fnmatch.po | 100.0% | 0.0% | 38 | 0 | | library/fractions.po | 100.0% | 0.0% | 41 | 0 | | library/frameworks.po | 100.0% | 0.0% | 5 | 0 | -| library/ftplib.po | 100.0% | 0.0% | 99 | 0 | +| library/ftplib.po | 100.0% | 0.0% | 98 | 0 | | library/functional.po | 100.0% | 0.0% | 3 | 0 | -| library/functools.po | 100.0% | 0.0% | 126 | 0 | -| library/gc.po | 100.0% | 0.0% | 67 | 0 | +| library/functools.po | 100.0% | 0.0% | 128 | 0 | +| library/gc.po | 100.0% | 0.0% | 72 | 0 | | library/getopt.po | 100.0% | 0.0% | 37 | 0 | -| library/getpass.po | 100.0% | 0.0% | 16 | 0 | +| library/getpass.po | 100.0% | 0.0% | 25 | 0 | | library/gettext.po | 100.0% | 0.0% | 129 | 0 | | library/glob.po | 100.0% | 0.0% | 46 | 0 | | library/graphlib.po | 100.0% | 0.0% | 40 | 0 | | library/grp.po | 100.0% | 0.0% | 27 | 0 | -| library/gzip.po | 100.0% | 0.0% | 71 | 0 | -| library/hashlib.po | 100.0% | 0.0% | 170 | 0 | +| library/gzip.po | 100.0% | 0.0% | 72 | 0 | +| library/hashlib.po | 100.0% | 0.0% | 172 | 0 | | library/heapq.po | 100.0% | 0.0% | 73 | 0 | | library/hmac.po | 100.0% | 0.0% | 27 | 0 | | library/html.entities.po | 100.0% | 0.0% | 9 | 0 | | library/html.parser.po | 100.0% | 0.0% | 64 | 0 | | library/html.po | 100.0% | 0.0% | 8 | 0 | -| library/http.client.po | 100.0% | 0.0% | 118 | 0 | +| library/http.client.po | 100.0% | 0.0% | 120 | 0 | | library/http.cookiejar.po | 100.0% | 0.0% | 159 | 0 | -| library/http.cookies.po | 100.0% | 0.0% | 52 | 0 | +| library/http.cookies.po | 100.0% | 0.0% | 54 | 0 | | library/http.po | 100.0% | 0.0% | 247 | 0 | -| library/http.server.po | 100.0% | 0.0% | 141 | 0 | +| library/http.server.po | 100.0% | 0.0% | 135 | 0 | | library/i18n.po | 100.0% | 0.0% | 3 | 0 | | library/idle.po | 100.0% | 0.0% | 297 | 0 | -| library/imaplib.po | 100.0% | 0.0% | 137 | 0 | +| library/imaplib.po | 100.0% | 0.0% | 135 | 0 | | library/imghdr.po | 100.0% | 0.0% | 4 | 0 | | library/imp.po | 100.0% | 0.0% | 4 | 0 | -| library/importlib.metadata.po | 100.0% | 0.0% | 120 | 0 | -| library/importlib.po | 100.0% | 0.0% | 284 | 0 | +| library/importlib.metadata.po | 100.0% | 0.0% | 149 | 0 | +| library/importlib.po | 100.0% | 0.0% | 283 | 0 | | library/importlib.resources.abc.po | 100.0% | 0.0% | 37 | 0 | -| library/importlib.resources.po | 100.0% | 0.0% | 53 | 0 | +| library/importlib.resources.po | 100.0% | 0.0% | 54 | 0 | | library/index.po | 100.0% | 0.0% | 6 | 0 | -| library/inspect.po | 100.0% | 0.0% | 423 | 0 | +| library/inspect.po | 100.0% | 0.0% | 433 | 0 | | library/internet.po | 100.0% | 0.0% | 7 | 0 | | library/intro.po | 100.0% | 0.0% | 28 | 0 | -| library/io.po | 100.0% | 0.0% | 289 | 0 | +| library/io.po | 100.0% | 0.0% | 287 | 0 | | library/ipaddress.po | 100.0% | 0.0% | 168 | 0 | | library/ipc.po | 100.0% | 0.0% | 4 | 0 | -| library/itertools.po | 100.0% | 0.0% | 198 | 0 | -| library/json.po | 100.0% | 0.0% | 177 | 0 | +| library/itertools.po | 100.0% | 0.0% | 200 | 0 | +| library/json.po | 100.0% | 0.0% | 183 | 0 | | library/keyword.po | 100.0% | 0.0% | 7 | 0 | | library/language.po | 100.0% | 0.0% | 3 | 0 | | library/linecache.po | 100.0% | 0.0% | 17 | 0 | -| library/locale.po | 100.0% | 0.0% | 163 | 0 | +| library/locale.po | 100.0% | 0.0% | 166 | 0 | | library/logging.config.po | 100.0% | 0.0% | 171 | 0 | | library/logging.handlers.po | 100.0% | 0.0% | 276 | 0 | -| library/logging.po | 100.0% | 0.0% | 372 | 0 | +| library/logging.po | 100.0% | 0.0% | 375 | 0 | | library/lzma.po | 100.0% | 0.0% | 128 | 0 | -| library/mailbox.po | 100.0% | 0.0% | 307 | 0 | +| library/mailbox.po | 100.0% | 0.0% | 309 | 0 | | library/mailcap.po | 100.0% | 0.0% | 3 | 0 | | library/markup.po | 100.0% | 0.0% | 2 | 0 | -| library/marshal.po | 100.0% | 0.0% | 56 | 0 | -| library/math.po | 100.0% | 0.0% | 268 | 0 | +| library/marshal.po | 100.0% | 0.0% | 60 | 0 | +| library/math.integer.po | 100.0% | 0.0% | 15 | 0 | +| library/math.po | 100.0% | 0.0% | 280 | 0 | | library/mimetypes.po | 100.0% | 0.0% | 68 | 0 | | library/mm.po | 100.0% | 0.0% | 2 | 0 | -| library/mmap.po | 100.0% | 0.0% | 65 | 0 | +| library/mmap.po | 100.0% | 0.0% | 78 | 0 | | library/modulefinder.po | 100.0% | 0.0% | 16 | 0 | | library/modules.po | 100.0% | 0.0% | 3 | 0 | | library/msilib.po | 100.0% | 0.0% | 3 | 0 | -| library/msvcrt.po | 100.0% | 0.0% | 47 | 0 | -| library/multiprocessing.po | 100.0% | 0.0% | 620 | 0 | +| library/msvcrt.po | 100.0% | 0.0% | 48 | 0 | +| library/multiprocessing.po | 100.0% | 0.0% | 622 | 0 | | library/multiprocessing.shared_memory.po | 100.0% | 0.0% | 56 | 0 | | library/netdata.po | 100.0% | 0.0% | 2 | 0 | | library/netrc.po | 100.0% | 0.0% | 19 | 0 | @@ -340,155 +352,161 @@ | library/numeric.po | 100.0% | 0.0% | 3 | 0 | | library/operator.po | 100.0% | 0.0% | 189 | 0 | | library/optparse.po | 100.0% | 0.0% | 532 | 0 | -| library/os.path.po | 100.0% | 0.0% | 112 | 0 | -| library/os.po | 100.0% | 0.0% | 1075 | 0 | +| library/os.path.po | 100.0% | 0.0% | 113 | 0 | +| library/os.po | 100.0% | 0.0% | 1135 | 0 | | library/ossaudiodev.po | 100.0% | 0.0% | 3 | 0 | -| library/pathlib.po | 100.0% | 0.0% | 445 | 0 | +| library/pathlib.po | 100.0% | 0.0% | 444 | 0 | | library/pdb.po | 100.0% | 0.0% | 179 | 0 | | library/persistence.po | 100.0% | 0.0% | 3 | 0 | | library/pickle.po | 100.0% | 0.0% | 251 | 0 | -| library/pickletools.po | 100.0% | 0.0% | 19 | 0 | +| library/pickletools.po | 100.0% | 0.0% | 20 | 0 | | library/pipes.po | 100.0% | 0.0% | 4 | 0 | -| library/pkgutil.po | 100.0% | 0.0% | 49 | 0 | -| library/platform.po | 100.0% | 0.0% | 89 | 0 | +| library/pkgutil.po | 100.0% | 0.0% | 53 | 0 | +| library/platform.po | 100.0% | 0.0% | 85 | 0 | | library/plistlib.po | 100.0% | 0.0% | 51 | 0 | | library/poplib.po | 100.0% | 0.0% | 53 | 0 | | library/posix.po | 100.0% | 0.0% | 21 | 0 | -| library/pprint.po | 100.0% | 0.0% | 50 | 0 | -| library/profile.po | 100.0% | 0.0% | 181 | 0 | -| library/pty.po | 100.0% | 0.0% | 21 | 0 | +| library/pprint.po | 100.0% | 0.0% | 54 | 0 | +| library/profile.po | 100.0% | 0.0% | 78 | 0 | +| library/profiling.po | 100.0% | 0.0% | 89 | 0 | +| library/profiling.sampling.po | 100.0% | 0.0% | 466 | 0 | +| library/profiling.tracing.po | 100.0% | 0.0% | 84 | 0 | +| library/pstats.po | 100.0% | 0.0% | 129 | 0 | +| library/pty.po | 100.0% | 0.0% | 23 | 0 | | library/pwd.po | 100.0% | 0.0% | 36 | 0 | | library/py_compile.po | 100.0% | 0.0% | 30 | 0 | | library/pyclbr.po | 100.0% | 0.0% | 26 | 0 | | library/pydoc.po | 100.0% | 0.0% | 25 | 0 | -| library/pyexpat.po | 100.0% | 0.0% | 174 | 0 | +| library/pyexpat.po | 100.0% | 0.0% | 169 | 0 | | library/python.po | 100.0% | 0.0% | 3 | 0 | | library/queue.po | 100.0% | 0.0% | 58 | 0 | | library/quopri.po | 100.0% | 0.0% | 13 | 0 | | library/random.po | 100.0% | 0.0% | 138 | 0 | -| library/re.po | 100.0% | 0.0% | 445 | 0 | -| library/readline.po | 100.0% | 0.0% | 59 | 0 | +| library/re.po | 100.0% | 0.0% | 457 | 0 | +| library/readline.po | 100.0% | 0.0% | 60 | 0 | | library/removed.po | 100.0% | 0.0% | 2 | 0 | | library/reprlib.po | 100.0% | 0.0% | 39 | 0 | -| library/resource.po | 100.0% | 0.0% | 110 | 0 | +| library/resource.po | 100.0% | 0.0% | 116 | 0 | | library/rlcompleter.po | 100.0% | 0.0% | 13 | 0 | -| library/runpy.po | 100.0% | 0.0% | 40 | 0 | +| library/runpy.po | 100.0% | 0.0% | 41 | 0 | | library/sched.po | 100.0% | 0.0% | 25 | 0 | | library/secrets.po | 100.0% | 0.0% | 39 | 0 | | library/security_warnings.po | 100.0% | 0.0% | 17 | 0 | -| library/select.po | 100.0% | 0.0% | 209 | 0 | +| library/select.po | 100.0% | 0.0% | 212 | 0 | | library/selectors.po | 100.0% | 0.0% | 58 | 0 | -| library/shelve.po | 100.0% | 0.0% | 40 | 0 | +| library/shelve.po | 100.0% | 0.0% | 52 | 0 | | library/shlex.po | 100.0% | 0.0% | 77 | 0 | -| library/shutil.po | 100.0% | 0.0% | 194 | 0 | -| library/signal.po | 100.0% | 0.0% | 143 | 0 | -| library/site.po | 100.0% | 0.0% | 63 | 0 | +| library/shutil.po | 100.0% | 0.0% | 195 | 0 | +| library/signal.po | 100.0% | 0.0% | 145 | 0 | +| library/site.po | 100.0% | 0.0% | 106 | 0 | | library/smtpd.po | 100.0% | 0.0% | 4 | 0 | -| library/smtplib.po | 100.0% | 0.0% | 124 | 0 | +| library/smtplib.po | 100.0% | 0.0% | 131 | 0 | | library/sndhdr.po | 100.0% | 0.0% | 4 | 0 | -| library/socket.po | 100.0% | 0.0% | 385 | 0 | -| library/socketserver.po | 100.0% | 0.0% | 99 | 0 | +| library/socket.po | 100.0% | 0.0% | 391 | 0 | +| library/socketserver.po | 100.0% | 0.0% | 100 | 0 | | library/spwd.po | 100.0% | 0.0% | 4 | 0 | -| library/sqlite3.po | 100.0% | 0.0% | 480 | 0 | -| library/stat.po | 100.0% | 0.0% | 92 | 0 | -| library/statistics.po | 100.0% | 0.0% | 249 | 0 | +| library/sqlite3.po | 100.0% | 0.0% | 481 | 0 | +| library/ssl.po | 100.0% | 0.0% | 569 | 0 | +| library/stat.po | 100.0% | 0.0% | 93 | 0 | +| library/statistics.po | 100.0% | 0.0% | 248 | 0 | | library/string.po | 100.0% | 0.0% | 224 | 0 | | library/string.templatelib.po | 100.0% | 0.0% | 56 | 0 | | library/stringprep.po | 100.0% | 0.0% | 25 | 0 | -| library/struct.po | 100.0% | 0.0% | 205 | 0 | -| library/subprocess.po | 100.0% | 0.0% | 314 | 0 | +| library/struct.po | 100.0% | 0.0% | 206 | 0 | +| library/subprocess.po | 100.0% | 0.0% | 320 | 0 | | library/sunau.po | 100.0% | 0.0% | 3 | 0 | | library/superseded.po | 100.0% | 0.0% | 4 | 0 | -| library/symtable.po | 100.0% | 0.0% | 73 | 0 | -| library/sys.monitoring.po | 100.0% | 0.0% | 120 | 0 | -| library/sys.po | 100.0% | 0.0% | 478 | 0 | +| library/symtable.po | 100.0% | 0.0% | 76 | 0 | +| library/sys.monitoring.po | 100.0% | 0.0% | 122 | 0 | +| library/sys.po | 100.0% | 0.0% | 513 | 0 | | library/sys_path_init.po | 100.0% | 0.0% | 27 | 0 | -| library/sysconfig.po | 100.0% | 0.0% | 136 | 0 | +| library/sysconfig.po | 100.0% | 0.0% | 138 | 0 | | library/syslog.po | 100.0% | 0.0% | 31 | 0 | | library/tabnanny.po | 100.0% | 0.0% | 11 | 0 | -| library/tarfile.po | 100.0% | 0.0% | 365 | 0 | +| library/tarfile.po | 100.0% | 0.0% | 367 | 0 | | library/telnetlib.po | 100.0% | 0.0% | 4 | 0 | -| library/tempfile.po | 100.0% | 0.0% | 88 | 0 | | library/termios.po | 100.0% | 0.0% | 25 | 0 | -| library/test.po | 100.0% | 0.0% | 339 | 0 | +| library/test.po | 100.0% | 0.0% | 341 | 0 | | library/text.po | 100.0% | 0.0% | 3 | 0 | | library/textwrap.po | 100.0% | 0.0% | 58 | 0 | -| library/threading.po | 100.0% | 0.0% | 284 | 0 | -| library/time.po | 100.0% | 0.0% | 280 | 0 | -| library/timeit.po | 100.0% | 0.0% | 68 | 0 | +| library/threading.po | 100.0% | 0.0% | 308 | 0 | +| library/time.po | 100.0% | 0.0% | 282 | 0 | +| library/timeit.po | 100.0% | 0.0% | 71 | 0 | | library/tk.po | 100.0% | 0.0% | 8 | 0 | | library/tkinter.colorchooser.po | 100.0% | 0.0% | 8 | 0 | | library/tkinter.dnd.po | 100.0% | 0.0% | 20 | 0 | | library/tkinter.font.po | 100.0% | 0.0% | 37 | 0 | | library/tkinter.messagebox.po | 100.0% | 0.0% | 43 | 0 | -| library/tkinter.po | 100.0% | 0.0% | 1236 | 0 | +| library/tkinter.po | 100.0% | 0.0% | 1248 | 0 | | library/tkinter.scrolledtext.po | 100.0% | 0.0% | 7 | 0 | | library/tkinter.ttk.po | 100.0% | 0.0% | 476 | 0 | | library/token.po | 100.0% | 0.0% | 100 | 0 | -| library/tokenize.po | 100.0% | 0.0% | 52 | 0 | -| library/tomllib.po | 100.0% | 0.0% | 52 | 0 | +| library/tokenize.po | 100.0% | 0.0% | 53 | 0 | +| library/tomllib.po | 100.0% | 0.0% | 69 | 0 | | library/trace.po | 100.0% | 0.0% | 43 | 0 | | library/traceback.po | 100.0% | 0.0% | 118 | 0 | | library/tracemalloc.po | 100.0% | 0.0% | 156 | 0 | | library/tty.po | 100.0% | 0.0% | 17 | 0 | -| library/types.po | 100.0% | 0.0% | 105 | 0 | -| library/typing.po | 100.0% | 0.0% | 833 | 0 | -| library/unicodedata.po | 100.0% | 0.0% | 43 | 0 | +| library/turtle.po | 100.0% | 0.0% | 586 | 0 | +| library/types.po | 100.0% | 0.0% | 110 | 0 | +| library/typing.po | 100.0% | 0.0% | 861 | 0 | +| library/unicodedata.po | 100.0% | 0.0% | 100 | 0 | | library/unittest.mock-examples.po | 100.0% | 0.0% | 182 | 0 | | library/unittest.mock.po | 100.0% | 0.0% | 448 | 0 | -| library/unittest.po | 100.0% | 0.0% | 560 | 0 | +| library/unittest.po | 100.0% | 0.0% | 567 | 0 | | library/unix.po | 100.0% | 0.0% | 2 | 0 | | library/urllib.error.po | 100.0% | 0.0% | 15 | 0 | -| library/urllib.parse.po | 100.0% | 0.0% | 169 | 0 | +| library/urllib.parse.po | 100.0% | 0.0% | 176 | 0 | | library/urllib.po | 100.0% | 0.0% | 7 | 0 | | library/urllib.request.po | 100.0% | 0.0% | 298 | 0 | | library/urllib.robotparser.po | 100.0% | 0.0% | 19 | 0 | | library/uu.po | 100.0% | 0.0% | 4 | 0 | | library/uuid.po | 100.0% | 0.0% | 79 | 0 | -| library/venv.po | 100.0% | 0.0% | 137 | 0 | -| library/warnings.po | 100.0% | 0.0% | 162 | 0 | -| library/wave.po | 100.0% | 0.0% | 61 | 0 | +| library/venv.po | 100.0% | 0.0% | 139 | 0 | +| library/warnings.po | 100.0% | 0.0% | 165 | 0 | +| library/wave.po | 100.0% | 0.0% | 73 | 0 | | library/weakref.po | 100.0% | 0.0% | 96 | 0 | -| library/webbrowser.po | 100.0% | 0.0% | 90 | 0 | +| library/webbrowser.po | 100.0% | 0.0% | 93 | 0 | | library/windows.po | 100.0% | 0.0% | 2 | 0 | -| library/winreg.po | 100.0% | 0.0% | 176 | 0 | -| library/winsound.po | 100.0% | 0.0% | 40 | 0 | +| library/winreg.po | 100.0% | 0.0% | 183 | 0 | +| library/winsound.po | 100.0% | 0.0% | 43 | 0 | | library/wsgiref.po | 100.0% | 0.0% | 135 | 0 | | library/xdrlib.po | 100.0% | 0.0% | 3 | 0 | | library/xml.dom.minidom.po | 100.0% | 0.0% | 60 | 0 | | library/xml.dom.po | 100.0% | 0.0% | 302 | 0 | | library/xml.dom.pulldom.po | 100.0% | 0.0% | 31 | 0 | -| library/xml.etree.elementtree.po | 100.0% | 0.0% | 274 | 0 | -| library/xml.po | 100.0% | 0.0% | 27 | 0 | -| library/xml.sax.handler.po | 100.0% | 0.0% | 114 | 0 | -| library/xml.sax.po | 100.0% | 0.0% | 34 | 0 | -| library/xml.sax.reader.po | 100.0% | 0.0% | 76 | 0 | -| library/xml.sax.utils.po | 100.0% | 0.0% | 17 | 0 | +| library/xml.etree.elementtree.po | 100.0% | 0.0% | 277 | 0 | +| library/xml.po | 100.0% | 0.0% | 32 | 0 | +| library/xml.sax.handler.po | 100.0% | 0.0% | 104 | 0 | +| library/xml.sax.po | 100.0% | 0.0% | 32 | 0 | +| library/xml.sax.reader.po | 100.0% | 0.0% | 75 | 0 | +| library/xml.sax.utils.po | 100.0% | 0.0% | 15 | 0 | | library/xmlrpc.client.po | 100.0% | 0.0% | 113 | 0 | | library/xmlrpc.po | 100.0% | 0.0% | 5 | 0 | | library/xmlrpc.server.po | 100.0% | 0.0% | 57 | 0 | | library/zipapp.po | 100.0% | 0.0% | 77 | 0 | | library/zipfile.po | 100.0% | 0.0% | 216 | 0 | -| library/zipimport.po | 100.0% | 0.0% | 39 | 0 | -| library/zlib.po | 100.0% | 0.0% | 96 | 0 | +| library/zipimport.po | 100.0% | 0.0% | 38 | 0 | +| library/zlib.po | 100.0% | 0.0% | 103 | 0 | | library/zoneinfo.po | 100.0% | 0.0% | 84 | 0 | -| license.po | 100.0% | 0.0% | 129 | 0 | -| reference/compound_stmts.po | 100.0% | 0.0% | 480 | 0 | -| reference/datamodel.po | 100.0% | 0.0% | 914 | 0 | +| license.po | 100.0% | 0.0% | 138 | 0 | +| reference/compound_stmts.po | 100.0% | 0.0% | 499 | 0 | +| reference/datamodel.po | 100.0% | 0.0% | 915 | 0 | | reference/executionmodel.po | 100.0% | 0.0% | 145 | 0 | -| reference/expressions.po | 100.0% | 0.0% | 595 | 0 | +| reference/expressions.po | 100.0% | 0.0% | 674 | 0 | | reference/grammar.po | 100.0% | 0.0% | 6 | 0 | -| reference/import.po | 100.0% | 0.0% | 202 | 0 | +| reference/import.po | 100.0% | 0.0% | 203 | 0 | | reference/index.po | 100.0% | 0.0% | 4 | 0 | | reference/introduction.po | 100.0% | 0.0% | 56 | 0 | -| reference/lexical_analysis.po | 100.0% | 0.0% | 476 | 0 | -| reference/simple_stmts.po | 100.0% | 0.0% | 291 | 0 | +| reference/lexical_analysis.po | 100.0% | 0.0% | 478 | 0 | +| reference/simple_stmts.po | 100.0% | 0.0% | 310 | 0 | | reference/toplevel_components.po | 100.0% | 0.0% | 32 | 0 | +| sphinx.po | 100.0% | 0.0% | 970 | 0 | | tutorial/appendix.po | 100.0% | 0.0% | 28 | 0 | | tutorial/appetite.po | 100.0% | 0.0% | 17 | 0 | -| tutorial/classes.po | 100.0% | 0.0% | 149 | 0 | +| tutorial/classes.po | 100.0% | 0.0% | 154 | 0 | | tutorial/controlflow.po | 100.0% | 0.0% | 226 | 0 | -| tutorial/datastructures.po | 100.0% | 0.0% | 127 | 0 | +| tutorial/datastructures.po | 100.0% | 0.0% | 139 | 0 | | tutorial/errors.po | 100.0% | 0.0% | 96 | 0 | | tutorial/floatingpoint.po | 100.0% | 0.0% | 76 | 0 | | tutorial/index.po | 100.0% | 0.0% | 9 | 0 | @@ -502,13 +520,14 @@ | tutorial/venv.po | 100.0% | 0.0% | 43 | 0 | | tutorial/whatnow.po | 100.0% | 0.0% | 18 | 0 | | using/android.po | 100.0% | 0.0% | 27 | 0 | -| using/cmdline.po | 100.0% | 0.0% | 270 | 0 | +| using/cmdline.po | 100.0% | 0.0% | 284 | 0 | +| using/configure.po | 100.0% | 0.0% | 495 | 0 | | using/editors.po | 100.0% | 0.0% | 6 | 0 | | using/index.po | 100.0% | 0.0% | 2 | 0 | | using/ios.po | 100.0% | 0.0% | 91 | 0 | -| using/mac.po | 100.0% | 0.0% | 94 | 0 | +| using/mac.po | 100.0% | 0.0% | 95 | 0 | | using/unix.po | 100.0% | 0.0% | 63 | 0 | -| using/windows.po | 100.0% | 0.0% | 583 | 0 | +| using/windows.po | 100.0% | 0.0% | 584 | 0 | | whatsnew/2.0.po | 100.0% | 0.0% | 207 | 0 | | whatsnew/2.1.po | 100.0% | 0.0% | 154 | 0 | | whatsnew/2.2.po | 100.0% | 0.0% | 216 | 0 | @@ -521,9 +540,9 @@ | whatsnew/3.1.po | 100.0% | 0.0% | 132 | 0 | | whatsnew/3.10.po | 100.0% | 0.0% | 550 | 0 | | whatsnew/3.11.po | 100.0% | 0.0% | 776 | 0 | -| whatsnew/3.12.po | 100.0% | 0.0% | 856 | 0 | -| whatsnew/3.13.po | 100.0% | 0.0% | 933 | 0 | -| whatsnew/3.14.po | 100.0% | 0.0% | 1055 | 0 | +| whatsnew/3.12.po | 100.0% | 0.0% | 914 | 0 | +| whatsnew/3.13.po | 100.0% | 0.0% | 991 | 0 | +| whatsnew/3.14.po | 100.0% | 0.0% | 1111 | 0 | | whatsnew/3.2.po | 100.0% | 0.0% | 576 | 0 | | whatsnew/3.3.po | 100.0% | 0.0% | 682 | 0 | | whatsnew/3.4.po | 100.0% | 0.0% | 517 | 0 | @@ -534,14 +553,9 @@ | whatsnew/3.9.po | 100.0% | 0.0% | 380 | 0 | | whatsnew/changelog.po | 100.0% | 0.0% | 1 | 0 | | whatsnew/index.po | 100.0% | 0.0% | 3 | 0 | -| library/ctypes.po | 99.9% | 0.0% | 677 | 1 | -| library/asyncio-eventloop.po | 99.8% | 0.0% | 426 | 1 | -| using/configure.po | 99.6% | 0.0% | 466 | 2 | -| library/ssl.po | 99.3% | 0.0% | 546 | 4 | -| library/asyncio-stream.po | 99.1% | 0.0% | 105 | 1 | -| builtins/threadsafety.po | 96.6% | 3.4% | 114 | 0 | -| library/turtle.po | 95.9% | 3.8% | 562 | 2 | -| c-api/slice.po | 92.3% | 3.8% | 24 | 1 | -| sphinx.po | 13.3% | 0.0% | 129 | 841 | -| **مجموع** | **98.8%** | **0.0%** | **70410** | **853** | +| whatsnew/3.15.po | 99.6% | 0.2% | 816 | 1 | +| c-api/exceptions.po | 99.3% | 0.0% | 291 | 2 | +| library/tempfile.po | 97.8% | 0.0% | 88 | 2 | +| howto/abi3t-migration.po | 94.4% | 0.6% | 169 | 9 | +| **مجموع** | **100.0%** | **0.0%** | **74811** | **14** | diff --git a/TEAM.md b/TEAM.md index f2ebdd14..81d84b80 100644 --- a/TEAM.md +++ b/TEAM.md @@ -16,3 +16,5 @@ | pangominn | translator | 2 | | mdflx | reviewer | 1 | | ashykng | translator | 1 | +| arman mohebali | translator | 5830 | +| mahdyaralipor | translator | 21 | diff --git a/about.po b/about.po index bb9131ee..5b09f1d6 100644 --- a/about.po +++ b/about.po @@ -8,12 +8,13 @@ # Alireza Shabani (Revisto) , 2025 # khosro azimi, 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-26 03:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-08-28 10:52+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -48,8 +49,8 @@ msgstr "فردریک لوند (Fredrik Lundh) برای پروژه‌ی \"Alterna msgid "Contributors to the Python documentation" msgstr "مشارکت کنندگان مستندات پایتون" -msgid "Many people have contributed to the Python language, the Python standard library, and the Python documentation. See :source:`Misc/ACKS` in the Python source distribution for a partial list of contributors." -msgstr "افراد زیادی در توسعه زبان پایتون، کتابخانه استاندارد پایتون، و مستندات پایتون مشارکت داشته‌اند. برای مشاهده فهرستی از برخی از این مشارکت‌کنندگان، به :source:`Misc/ACKS` در توزیع سورس پایتون مراجعه کنید." +msgid "Many people have contributed to the Python language, the Python standard library, and the Python documentation. See the `CPython GitHub repository `__ for a partial list of contributors." +msgstr "بسیاری از افراد در توسعه‌ی زبان پایتون، کتابخانه‌ی استاندارد پایتون و مستندات پایتون مشارکت داشته‌اند. برای مشاهده‌ی فهرست نسبی مشارکت‌کنندگان، به `مخزن گیت‌هاب CPython `__ مراجعه کنید." msgid "It is only with the input and contributions of the Python community that Python has such wonderful documentation -- Thank You!" msgstr "فقط با مشارکت‌ها و کمک‌های جامعه پایتون است که پایتون چنین مستندات فوق‌العاده‌ای دارد -- سپاس از شما!" diff --git a/bugs.po b/bugs.po index a04e398c..e1721d10 100644 --- a/bugs.po +++ b/bugs.po @@ -10,12 +10,13 @@ # Danial Behzadi , 2025 # Alireza Shabani (Revisto) , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-26 03:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-07-26 07:53+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -68,11 +69,11 @@ msgstr "`کمک به مستندسازی `_" -msgstr "`ترجمه های مستندات `_" +msgid "`Documentation Translations `_" +msgstr "`ترجمه‌های مستندات `_" -msgid "A list of GitHub pages for documentation translation and their primary contacts." -msgstr "فهرستی از صفحات GitHub مربوط به ترجمه‌ی مستندات و راه‌های ارتباطی مسئولان هر یک." +msgid "A list of GitHub pages for documentation translation and their coordination teams." +msgstr "فهرستی از صفحات گیت‌هاب مربوط به ترجمه‌ی مستندات و تیم‌های هماهنگی آن‌ها." msgid "Using the Python issue tracker" msgstr "استفاده از پایگاه پیگیری مشکلات پایتون" diff --git a/builtins/exceptions.po b/builtins/exceptions.po index 972ea09f..bb7b1b0c 100644 --- a/builtins/exceptions.po +++ b/builtins/exceptions.po @@ -5,12 +5,13 @@ # # Translators: # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-19 20:08+0330\n" +"POT-Creation-Date: 2026-10-08 09:24+0330\n" "PO-Revision-Date: 2026-09-19 20:08+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: none\n" @@ -167,6 +168,9 @@ msgstr "ویژگی‌های :attr:`name` و :attr:`path` اضافه شدند." 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 "زیرکلاسی از :exc:`ImportError` که توسط :keyword:`import` زمانی پرتاب می‌شود که نتوان یک ماژول را یافت. همچنین زمانی که ``None`` در :data:`sys.modules` یافت شود نیز پرتاب می‌شود." +msgid "A subclass of :exc:`ImportError` which is raised when a lazy import fails because it (directly or indirectly) tries to import itself." +msgstr "یک زیرکلاس از :exc:`ImportError` که وقتی یک ایمپورت تنبل (lazy import) به دلیل تلاش (مستقیم یا غیرمستقیم) برای ایمپورت کردن خودش شکست بخورد، بالا برده می‌شود." + 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 "زمانی پرتاب می‌شود که زیرنویس یک دنباله خارج از محدوده باشد. (اندیس‌های اسلایس به‌صورت خاموش محدود می‌شوند تا در محدوده مجاز قرار گیرند؛ اگر اندیس عدد صحیح نباشد، :exc:`TypeError` پرتاب می‌شود.)" @@ -248,8 +252,11 @@ msgstr "ایجاد یک نخ پایتون جدید." msgid ":meth:`Joining ` a running daemon thread." msgstr ":meth:`پیوستن ` به یک نخ daemon در حال اجرا." -msgid ":func:`os.fork`." -msgstr ":func:`os.fork`." +msgid ":func:`os.fork`," +msgstr ":func:`os.fork`،" + +msgid "acquiring a lock such as :class:`threading.Lock`, when it is known that the operation would otherwise deadlock." +msgstr "به‌دست آوردن قفل مانند :class:`threading.Lock`، هنگامی که مشخص است عملیات در غیر این صورت دچار بن‌بست خواهد شد." msgid "See also the :func:`sys.is_finalizing` function." msgstr "همچنین تابع :func:`sys.is_finalizing` را ببینید." @@ -260,6 +267,9 @@ msgstr "پیش از این، یک :exc:`RuntimeError` ساده پرتاب می msgid ":meth:`threading.Thread.join` can now raise this exception." msgstr ":meth:`threading.Thread.join` اکنون می‌تواند این استثنا را پرتاب کند." +msgid "This exception may be raised when acquiring :meth:`threading.Lock` or :meth:`threading.RLock`." +msgstr "این استثنا ممکن است هنگام به‌دست آوردن :meth:`threading.Lock` یا :meth:`threading.RLock` بالا برده شود." + 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 "این استثنا از :exc:`RuntimeError` مشتق شده است. این استثنا زمانی پرتاب می‌شود که مفسر تشخیص دهد که از حداکثر عمق بازگشت (به :func:`sys.getrecursionlimit` مراجعه کنید) فراتر رفته است." @@ -662,6 +672,78 @@ msgstr "سلسله‌مراتب استثنا" msgid "The class hierarchy for built-in exceptions is:" msgstr "سلسله‌مراتب کلاس برای استثناهای توکار به صورت زیر است:" +msgid "" +"BaseException\n" +" ├── BaseExceptionGroup\n" +" ├── GeneratorExit\n" +" ├── KeyboardInterrupt\n" +" ├── SystemExit\n" +" └── Exception\n" +" ├── ArithmeticError\n" +" │ ├── FloatingPointError\n" +" │ ├── OverflowError\n" +" │ └── ZeroDivisionError\n" +" ├── AssertionError\n" +" ├── AttributeError\n" +" ├── BufferError\n" +" ├── EOFError\n" +" ├── ExceptionGroup [BaseExceptionGroup]\n" +" ├── ImportError\n" +" │ └── ImportCycleError\n" +" │ └── ModuleNotFoundError\n" +" ├── LookupError\n" +" │ ├── IndexError\n" +" │ └── KeyError\n" +" ├── MemoryError\n" +" ├── NameError\n" +" │ └── UnboundLocalError\n" +" ├── OSError\n" +" │ ├── BlockingIOError\n" +" │ ├── ChildProcessError\n" +" │ ├── ConnectionError\n" +" │ │ ├── BrokenPipeError\n" +" │ │ ├── ConnectionAbortedError\n" +" │ │ ├── ConnectionRefusedError\n" +" │ │ └── ConnectionResetError\n" +" │ ├── FileExistsError\n" +" │ ├── FileNotFoundError\n" +" │ ├── InterruptedError\n" +" │ ├── IsADirectoryError\n" +" │ ├── NotADirectoryError\n" +" │ ├── PermissionError\n" +" │ ├── ProcessLookupError\n" +" │ └── TimeoutError\n" +" ├── ReferenceError\n" +" ├── RuntimeError\n" +" │ ├── NotImplementedError\n" +" │ ├── PythonFinalizationError\n" +" │ └── RecursionError\n" +" ├── StopAsyncIteration\n" +" ├── StopIteration\n" +" ├── SyntaxError\n" +" │ └── IndentationError\n" +" │ └── TabError\n" +" ├── SystemError\n" +" ├── TypeError\n" +" ├── ValueError\n" +" │ └── UnicodeError\n" +" │ ├── UnicodeDecodeError\n" +" │ ├── UnicodeEncodeError\n" +" │ └── UnicodeTranslateError\n" +" └── Warning\n" +" ├── BytesWarning\n" +" ├── DeprecationWarning\n" +" ├── EncodingWarning\n" +" ├── FutureWarning\n" +" ├── ImportWarning\n" +" ├── PendingDeprecationWarning\n" +" ├── ResourceWarning\n" +" ├── RuntimeWarning\n" +" ├── SyntaxWarning\n" +" ├── UnicodeWarning\n" +" └── UserWarning\n" +msgstr "" + msgid "statement" msgstr "دستور" diff --git a/builtins/functions.po b/builtins/functions.po index 3e9d4f0e..047ebf24 100644 --- a/builtins/functions.po +++ b/builtins/functions.po @@ -5,12 +5,13 @@ # # Translators: # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-24 04:09+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-24 07:55+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: none\n" @@ -20,12 +21,15 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 3.6\n" -msgid "Built-in Functions" +msgid "Built-in functions" msgstr "توابع توکار" msgid "The Python interpreter has a number of functions and types built into it that are always available. They are listed here in alphabetical order." msgstr "مفسر پایتون دارای تعدادی تابع و نوع داده است که در آن بصورت توکار (built-in) همیشه در دسترس می‌باشند. آن‌ها در اینجا به ترتیب حروف الفبا فهرست شده‌اند." +msgid "Built-in Functions" +msgstr "توابع توکار" + msgid "**A**" msgstr "**A**" @@ -122,6 +126,9 @@ msgstr ":func:`float`" msgid ":func:`format`" msgstr ":func:`format`" +msgid "|func-frozendict|_" +msgstr "|func-frozendict|_" + msgid "|func-frozenset|_" msgstr "|func-frozenset|_" @@ -254,6 +261,9 @@ msgstr "|func-set|_" msgid ":func:`setattr`" msgstr ":func:`setattr`" +msgid ":func:`sentinel`" +msgstr ":func:`sentinel`" + msgid ":func:`slice`" msgstr ":func:`slice`" @@ -481,8 +491,11 @@ msgstr "گزینه‌های کامپایلر و دستورهای future با ا msgid "The argument *optimize* specifies the optimization level of the compiler; the default value of ``-1`` selects the optimization level of the interpreter as given by :option:`-O` options. Explicit levels are ``0`` (no optimization; ``__debug__`` is true), ``1`` (asserts are removed, ``__debug__`` is false) or ``2`` (docstrings are removed too)." msgstr "آرگومان *optimize* سطح بهینه‌سازی کامپایلر را مشخص می‌کند؛ مقدار پیش‌فرض ``-1`` سطح بهینه‌سازی مفسر را مطابق گزینه‌های :option:`-O` انتخاب می‌کند. سطوح صریح عبارت‌اند از: ``0`` (بدون بهینه‌سازی؛ ``__debug__`` برابر با true است)، ``1`` (دستورهای assert حذف می‌شوند و ``__debug__`` برابر false است)، و ``2`` (علاوه بر آن، docstringها نیز حذف می‌شوند)." -msgid "This function raises :exc:`SyntaxError` if the compiled source is invalid, including a *source* containing a null character or that cannot be decoded; :exc:`ValueError` if *mode* or *flags* is invalid, or if a string *source* contains surrogate characters; :exc:`MemoryError` or :exc:`RecursionError` if *source* is too complex to parse or compile, for example an expression with many thousands of nested operators; and :exc:`OverflowError` if *source* is too large." -msgstr "این تابع :exc:`SyntaxError` را پرتاب میکند اگر منبعِ کامپایل‌شده نامعتبر باشد، از جمله یک *source* که حاوی نویسه‌ی null است یا که قابل رمزگشایی نیست؛ :exc:`ValueError` اگر *حالت* یا *پرچم‌ها* نامعتبر باشند، یا اگر یک رشته *source* حاوی نویسه‌های جایگزین باشد؛ :exc:`MemoryError` یا :exc:`RecursionError` اگر *source* برای تجزیه یا کامپایل بیش از حد پیچیده باشد، برای مثال یک عبارت با هزاران عملگر تو در تو؛ و :exc:`OverflowError` اگر *source* بیش از حد بزرگ باشد." +msgid "The optional argument *module* specifies the module name. It is needed to unambiguous :ref:`filter ` syntax warnings by module name." +msgstr "آرگومان اختیاری *module* نام ماژول را مشخص می‌کند. این آرگومان برای رفع ابهام در هشدار‌های نحو (نحو :ref:`filter `) بر اساس نام ماژول مورد نیاز است." + +msgid "This function raises :exc:`SyntaxError` or :exc:`ValueError` if the compiled source is invalid." +msgstr "اگر کد منبع کامپایل‌شده نامعتبر باشد، این تابع استثنای :exc:`SyntaxError` یا :exc:`ValueError` پرتاب می‌کند." msgid "If you want to parse Python code into its AST representation, see :func:`ast.parse`." msgstr "اگر می‌خواهید کد پایتون را به نمایش AST آن تجزیه کنید، به :func:`ast.parse` مراجعه کنید." @@ -505,8 +518,8 @@ msgstr "پیش از این، هنگام برخورد با بایت‌های ته msgid "``ast.PyCF_ALLOW_TOP_LEVEL_AWAIT`` can now be passed in flags to enable support for top-level ``await``, ``async for``, and ``async with``." msgstr "اکنون می‌توان ``ast.PyCF_ALLOW_TOP_LEVEL_AWAIT`` را در پرچم‌ها ارسال کرد تا از ``await``، ``async for`` و ``async with`` در سطح بالای کد (top-level) پشتیبانی شود." -msgid ":exc:`SyntaxError` is raised instead of :exc:`ValueError` when null bytes are encountered in *source*." -msgstr "هنگامی که بایت‌های تهی در *source* یافت شوند، :exc:`SyntaxError` به‌جای :exc:`ValueError` پرتاب می‌شود." +msgid "Added the *module* parameter." +msgstr "پارامتر *module* اضافه شد." msgid "Convert a single string or number to a complex number, or create a complex number from real and imaginary parts." msgstr "تبدیل یک رشته یا عدد به یک عدد مختلط، یا ایجاد یک عدد مختلط از بخش‌های حقیقی و موهومی یک عدد." @@ -582,8 +595,8 @@ msgstr "این تابع همتای :func:`setattr` است. آرگومان‌ها msgid "Create a new dictionary. The :class:`dict` object is the dictionary class. See also :ref:`typesmapping` for documentation about this class." msgstr "ایجاد یک دیکشنری جدید. شیء :class:`dict` کلاس دیکشنری است. برای مستندات این کلاس، به :ref:`typesmapping` مراجعه کنید." -msgid "For other containers see the built-in :class:`list`, :class:`set`, and :class:`tuple` classes, as well as the :mod:`collections` module." -msgstr "برای سایر انواع ظرف‌ها، به کلاس‌های توکار :class:`list`، :class:`set` و :class:`tuple`، و همچنین ماژول :mod:`collections` مراجعه کنید." +msgid "For other containers see the built-in :class:`frozendict`, :class:`list`, :class:`set`, and :class:`tuple` classes, as well as the :mod:`collections` module." +msgstr "برای سایر ظروف، به کلاس‌های توکار :class:`frozendict`، :class:`list`، :class:`set` و :class:`tuple` و همچنین ماژول :mod:`collections` مراجعه کنید." msgid "Without arguments, return the list of names in the current local scope. With an argument, attempt to return a list of valid attributes for that object." msgstr "بدون آرگومان، فهرست نام‌های موجود در دامنه‌ی محلیِ فعلی را بازمی‌گرداند. با ارسال یک آرگومان، تلاش می‌کند فهرستی از ویژگی‌های معتبر آن شیء را بازگرداند." @@ -688,6 +701,9 @@ msgstr "آرگومان‌های *globals* و *locals* اکنون می‌توان msgid "The semantics of the default *locals* namespace have been adjusted as described for the :func:`locals` builtin." msgstr "معنای فضای نام پیش‌فرض *locals* مطابق توضیحات ارائه‌شده برای تابع توکار :func:`locals` تنظیم شده است." +msgid "*globals* can now be a :class:`frozendict`." +msgstr "اکنون *globals* می‌تواند یک :class:`frozendict` باشد." + msgid "This function supports dynamic execution of Python code. *source* must be either a string or a code object. If it is a string, the string is parsed as a suite of Python statements which is then executed (unless a syntax error occurs). [#]_ If it is a code object, it is simply executed. In all cases, the code that's executed is expected to be valid as file input (see the section :ref:`file-input` in the Reference Manual). Be aware that the :keyword:`nonlocal`, :keyword:`yield`, and :keyword:`return` statements may not be used outside of function definitions even within the context of code passed to the :func:`exec` function. The return value is ``None``." msgstr "این تابع از اجرای پویای کد پایتون پشتیبانی می‌کند. *source* باید یا یک رشته باشد یا یک شیء کد. اگر رشته باشد، به‌عنوان مجموعه‌ای از دستورهای پایتون تجزیه و سپس اجرا می‌شود (مگر اینکه خطای نحوی رخ دهد). [#]_ اگر یک شیء کد باشد، مستقیماً اجرا می‌شود. در همه‌ی موارد، انتظار می‌رود کد اجراشده به‌عنوان ورودی پرونده معتبر باشد (به بخش :ref:`file-input` در راهنمای مرجع مراجعه کنید). توجه داشته باشید که دستورهای :keyword:`nonlocal`، :keyword:`yield` و :keyword:`return` حتی در کدی که از طریق :func:`exec` اجرا می‌شود نیز خارج از تعریف تابع قابل استفاده نیستند. مقدار بازگشتی ``None`` است." @@ -783,6 +799,12 @@ msgstr "فراخوانی ``format(value, format_spec)`` به ``type(value).__for msgid "``object().__format__(format_spec)`` raises :exc:`TypeError` if *format_spec* is not an empty string." msgstr "اگر *format_spec* یک رشته‌ی خالی نباشد، ``object().__format__(format_spec)`` استثنای :exc:`TypeError` پرتاب می‌کند." +msgid "Create a new frozen dictionary. The :class:`frozendict` object is a built-in class. See also :ref:`typesmapping` for documentation about this class." +msgstr "یک دیکشنری فریزشده‌ی جدید ایجاد کنید. شیء :class:`frozendict` یک کلاس توکار است. برای مستندات مربوط به این کلاس، به :ref:`typesmapping` نیز مراجعه کنید." + +msgid "For other containers see the built-in :class:`dict`, :class:`list`, :class:`set`, and :class:`tuple` classes, as well as the :mod:`collections` module." +msgstr "برای سایر ظروف، به کلاس‌های توکار :class:`dict`، :class:`list`، :class:`set` و :class:`tuple` و همچنین ماژول :mod:`collections` مراجعه کنید." + msgid "Return a new :class:`frozenset` object, optionally with elements taken from *iterable*. :class:`frozenset` is a built-in class. See also :ref:`types-set` for documentation about this class." msgstr "یک شیء جدید از نوع :class:`frozenset` را برمی‌گرداند که در صورت ارائه، عناصر آن از *iterable* گرفته می‌شوند. :class:`frozenset` یک کلاس توکار است. برای مستندات این کلاس، به :ref:`types-set` مراجعه کنید." @@ -926,8 +948,8 @@ msgstr "اگر آرگومان *object* نمونه‌ای از *classinfo* یا msgid "*classinfo* can be a :ref:`types-union`." msgstr "*classinfo* می‌تواند یک :ref:`types-union` باشد." -msgid "Return ``True`` if *class* is a subclass (direct, indirect, or :term:`virtual `) of *classinfo*. A class is considered a subclass of itself. *classinfo* may be a tuple of class objects (or recursively, other such tuples) or a :ref:`types-union`, in which case return ``True`` if *class* is a subclass of any entry in *classinfo*. In any other case, a :exc:`TypeError` exception is raised." -msgstr "اگر *class* زیرکلاس (مستقیم، غیرمستقیم یا :term:`مجازی `) *classinfo* باشد، مقدار ``True`` را برمی‌گرداند. هر کلاس، زیرکلاس خودش نیز در نظر گرفته می‌شود. *classinfo* می‌تواند یک تاپل از اشیای کلاس (یا به‌صورت بازگشتی، تاپل‌هایی از این نوع) یا یک :ref:`types-union` باشد؛ در این صورت، اگر *class* زیرکلاس هر یک از اعضای *classinfo* باشد، مقدار ``True`` برگردانده می‌شود. در هر حالت دیگر، استثنای :exc:`TypeError` پرتاب می‌شود." +msgid "Return ``True`` if *cls* is a subclass (direct, indirect, or :term:`virtual `) of *classinfo*. A class is considered a subclass of itself. *classinfo* may be a tuple of class objects (or recursively, other such tuples) or a :ref:`types-union`, in which case return ``True`` if *cls* is a subclass of any entry in *classinfo*. In any other case, a :exc:`TypeError` exception is raised." +msgstr "اگر *cls* زیرکلاس (مستقیم، غیرمستقیم، یا :term:`مجازی `) از *classinfo* باشد، ``True`` را برمی‌گرداند. یک کلاس زیرکلاس خودش در نظر گرفته می‌شود. *classinfo* ممکن است تاتویی از شیء‌های کلاس (یا به طور بازگشتی، سایر تاپل‌های این‌چنینی) یا یک :ref:`types-union` باشد؛ در این صورت، اگر *cls* زیرکلاس هر یک از ورودی‌های *classinfo* باشد، ``True`` بازگردانده می‌شود. در هر صورت دیگر، یک استثنای :exc:`TypeError` بالا برده می‌شود." msgid "Return an :term:`iterator` object. The first argument is interpreted very differently depending on the presence of the second argument. Without a second argument, the single argument must be a collection object which supports the :term:`iterable` protocol (the :meth:`~object.__iter__` method), or it must support the sequence protocol (the :meth:`~object.__getitem__` method with integer arguments starting at ``0``). If it does not support either of those protocols, :exc:`TypeError` is raised. If the second argument, *sentinel*, is given, then the first argument must be a callable object. The iterator created in this case will call *callable* with no arguments for each call to its :meth:`~iterator.__next__` method; if the value returned is equal to *sentinel*, :exc:`StopIteration` will be raised, otherwise the value will be returned." msgstr "یک شیء :term:`پیمایش‌گر ` را برمی‌گرداند. تفسیر آرگومان اول به وجود یا عدم وجود آرگومان دوم بستگی دارد. اگر آرگومان دومی وجود نداشته باشد، آرگومان اول باید یک شیء مجموعه باشد که از پروتکل :term:`پیمایش‌پذیر ` (متد :meth:`~object.__iter__`) پشتیبانی کند، یا از پروتکل دنباله (متد :meth:`~object.__getitem__` با آرگومان‌های صحیح که از ``0`` شروع می‌شوند) پشتیبانی کند. اگر از هیچ‌یک از این پروتکل‌ها پشتیبانی نکند، استثنای :exc:`TypeError` پرتاب می‌شود. اگر آرگومان دوم، یعنی *sentinel*، ارائه شود، آرگومان اول باید یک شیء فراخوانی‌پذیر باشد. پیمایش‌گر ایجادشده در این حالت، در هر فراخوانی متد :meth:`~iterator.__next__`، *callable* را بدون آرگومان فراخوانی می‌کند؛ اگر مقدار بازگردانده‌شده برابر *sentinel* باشد، استثنای :exc:`StopIteration` پرتاب می‌شود؛ در غیر این صورت، همان مقدار برگردانده می‌شود." @@ -1045,8 +1067,8 @@ msgstr "*file* را باز کرده و :term:`شیء پرونده ` msgid "*file* is a :term:`path-like object` giving the pathname (absolute or relative to the current working directory) of the file to be opened or an integer file descriptor of the file to be wrapped. (If a file descriptor is given, it is closed when the returned I/O object is closed unless *closefd* is set to ``False``.)" msgstr "*file* یک :term:`شیء شبه‌مسیر ` است که مسیر پرونده (مطلق یا نسبی نسبت به پوشه‌ی کاری فعلی) را برای باز شدن مشخص می‌کند، یا یک توصیف‌گر عددی پرونده مربوط به پرونده‌ای است که باید در یک شیء ورودی/خروجی بسته‌بندی شود. (اگر یک توصیف‌گر پرونده ارائه شود، هنگام بسته شدن شیء ورودی/خروجیِ بازگشتی نیز بسته خواهد شد، مگر اینکه *closefd* برابر ``False`` تنظیم شده باشد.)" -msgid "*mode* is an optional string that specifies the mode in which the file is opened. It defaults to ``'r'`` which means open for reading in text mode. Other common values are ``'w'`` for writing (truncating the file if it already exists), ``'x'`` for exclusive creation, and ``'a'`` for appending (which on *some* Unix systems, means that *all* writes append to the end of the file regardless of the current seek position). In text mode, if *encoding* is not specified the encoding used is platform-dependent: :func:`locale.getencoding` is called to get the current locale encoding. (For reading and writing raw bytes use binary mode and leave *encoding* unspecified.) The available modes are:" -msgstr "*mode* یک رشته‌ی اختیاری است که حالت باز شدن پرونده را مشخص می‌کند. مقدار پیش‌فرض آن ``'r'`` است که به معنای باز کردن پرونده برای خواندن در حالت متنی است. مقادیر رایج دیگر عبارت‌اند از ``'w'`` برای نوشتن (که اگر پرونده از قبل وجود داشته باشد، محتوای آن را حذف می‌کند)، ``'x'`` برای ایجاد انحصاری، و ``'a'`` برای افزودن به انتهای پرونده (که در *برخی* از سیستم‌های یونیکس به این معناست که *تمام* عملیات نوشتن، صرف‌نظر از موقعیت فعلی نشانگر، به انتهای پرونده افزوده می‌شوند). در حالت متنی، اگر *encoding* مشخص نشده باشد، کدگذاری مورد استفاده به سکو بستگی دارد؛ در این حالت، :func:`locale.getencoding` برای دریافت کدگذاری locale فعلی فراخوانی می‌شود. (برای خواندن و نوشتن بایت‌های خام، از حالت دودویی استفاده کنید و *encoding* را مشخص نکنید.) حالت‌های موجود عبارت‌اند از:" +msgid "*mode* is an optional string that specifies the mode in which the file is opened. It defaults to ``'r'`` which means open for reading in text mode. Other common values are ``'w'`` for writing (truncating the file if it already exists), ``'x'`` for exclusive creation, and ``'a'`` for appending (which on *some* Unix systems, means that *all* writes append to the end of the file regardless of the current seek position). In text mode, if *encoding* is not specified, UTF-8 is used by default; if :ref:`Python UTF-8 Mode ` is disabled, :func:`locale.getencoding` is called to get the current locale encoding. (For reading and writing raw bytes use binary mode and leave *encoding* unspecified.) The available modes are:" +msgstr "*mode* یک رشته‌ی اختیاری است که حالتی که در آن پرونده گشوده می‌شود را مشخص می‌کند. حالت پیش‌فرض آن ``'r'`` است که به معنای گشودن برای خواندن در حالت متنی است. سایر مقادیر رایج عبارتند از ``'w'`` برای نوشتن (که اگر پرونده از قبل وجود داشته باشد، محتوای آن را پاک می‌کند)، ``'x'`` برای ایجاد انحصاری، و ``'a'`` برای الحاق (که در *برخی* سیستم‌های یونیکس، به این معناست که *تمام* عمل نوشتن بدون توجه به موقعیت فعلی مکان‌یاب، به انتهای پرونده الحاق می‌شود). در حالت متنی، اگر *encoding* مشخص نشده باشد، به طور پیش‌فرض از UTF-8 استفاده می‌شود؛ اگر :ref:`حالت UTF-8 پایتون ` غیرفعال باشد، تابع :func:`locale.getencoding` برای دریافت کدگذاری محلی فعلی فراخوانی می‌شود. (برای خواندن و نوشتن بایت‌های خام، از حالت دودویی استفاده کنید و *encoding* را مشخص نکنید.) حالت‌های موجود عبارتند از:" msgid "Character" msgstr "نویسه" @@ -1099,8 +1121,8 @@ msgstr "باز کردن برای به‌روزرسانی (خواندن و نوش msgid "The default mode is ``'r'`` (open for reading text, a synonym of ``'rt'``). Modes ``'w+'`` and ``'w+b'`` open and truncate the file. Modes ``'r+'`` and ``'r+b'`` open the file with no truncation." msgstr "حالت پیش‌فرض ``'r'`` است (باز کردن پرونده برای خواندن متن، که معادل ``'rt'`` است). حالت‌های ``'w+'`` و ``'w+b'`` پرونده را باز کرده و محتوای آن را حذف می‌کنند. حالت‌های ``'r+'`` و ``'r+b'`` پرونده را بدون حذف محتوا باز می‌کنند." -msgid "As mentioned in the :ref:`io-overview`, Python distinguishes between binary and text I/O. Files opened in binary mode (including ``'b'`` in the *mode* argument) return contents as :class:`bytes` objects without any decoding. In text mode (the default, or when ``'t'`` is included in the *mode* argument), the contents of the file are returned as :class:`str`, the bytes having been first decoded using a platform-dependent encoding or using the specified *encoding* if given." -msgstr "همان‌طور که در :ref:`io-overview` اشاره شد، پایتون بین ورودی/خروجی دودویی و متنی تفاوت قائل می‌شود. پرونده‌هایی که در حالت دودویی باز می‌شوند (یعنی *mode* شامل ``'b'`` باشد)، محتوا را بدون هیچ کدگشایی به‌صورت اشیای :class:`bytes` برمی‌گردانند. در حالت متنی (حالت پیش‌فرض، یا زمانی که *mode* شامل ``'t'`` باشد)، محتوای پرونده به‌صورت :class:`str` برگردانده می‌شود؛ در این حالت، بایت‌ها ابتدا با استفاده از کدگذاری وابسته به سکو یا، در صورت مشخص شدن، با استفاده از *encoding* داده‌شده کدگشایی می‌شوند." +msgid "As mentioned in the :ref:`io-overview`, Python distinguishes between binary and text I/O. Files opened in binary mode (including ``'b'`` in the *mode* argument) return contents as :class:`bytes` objects without any decoding. In text mode (the default, or when ``'t'`` is included in the *mode* argument), the contents of the file are returned as :class:`str`, the bytes having been first decoded using the default encoding or using the specified *encoding* if given." +msgstr "همان‌طور که در :ref:`io-overview` ذکر شد، پایتون بین ورودی/خروجی دودویی و متنی تمایز قائل می‌شود. پرونده‌هایی که در حالت دودویی گشوده می‌شوند (شامل ``'b'`` در آرگومان *mode*) محتویات را به شکل شیءهای :class:`bytes` و بدون هیچ‌گونه کدگشایی برمی‌گردانند. در حالت متنی (حالت پیش‌فرض، یا زمانی که ``'t'`` در آرگومان *mode* گنجانده شده باشد)، محتویات پرونده به شکل :class:`str` برگردانده می‌شوند، در حالی که بایت‌ها ابتدا با استفاده از کدگذاری پیش‌فرض یا در صورت ارائه‌ شدن، با استفاده از *encoding* مشخص‌شده کدگشایی شده‌اند." msgid "Python doesn't depend on the underlying operating system's notion of text files; all the processing is done by Python itself, and is therefore platform-independent." msgstr "پایتون به مفهوم پرونده‌ی متنی در سیستم‌عامل زیربنایی وابسته نیست؛ تمام پردازش‌ها توسط خود پایتون انجام می‌شوند و بنابراین مستقل از سکو هستند." @@ -1114,32 +1136,11 @@ msgstr "پرونده‌های دودویی در قطعه‌هایی با اند msgid "\"Interactive\" text files (files for which :meth:`~io.IOBase.isatty` returns ``True``) use line buffering. Other text files use the policy described above for binary files." msgstr "پرونده‌های متنی «تعاملی» (پرونده‌هایی که :meth:`~io.IOBase.isatty` برای آن‌ها مقدار ``True`` برمی‌گرداند) از بافرگذاری سطری استفاده می‌کنند. سایر پرونده‌های متنی از سیاستی که در بالا برای پرونده‌های دودویی توضیح داده شده است، پیروی می‌کنند." -msgid "*encoding* is the name of the encoding used to decode or encode the file. This should only be used in text mode. The default encoding is platform dependent (whatever :func:`locale.getencoding` returns), but any :term:`text encoding` supported by Python can be used. See the :mod:`codecs` module for the list of supported encodings." -msgstr "*encoding* نام کدگذاری مورد استفاده برای کدگشایی یا کدگذاری پرونده است. این گزینه فقط باید در حالت متنی استفاده شود. کدگذاری پیش‌فرض به سکو بستگی دارد (هر مقداری که :func:`locale.getencoding` برگرداند)، اما می‌توان از هر :term:`کدگذاری متنی ` که توسط پایتون پشتیبانی می‌شود استفاده کرد. برای مشاهده‌ی فهرست کدگذاری‌های پشتیبانی‌شده، به ماژول :mod:`codecs` مراجعه کنید." - -msgid "*errors* is an optional string that specifies how encoding and decoding errors are to be handled—this cannot be used in binary mode. A variety of standard error handlers are available (listed under :ref:`error-handlers`), though any error handling name that has been registered with :func:`codecs.register_error` is also valid. The standard names include:" -msgstr "*errors* یک رشته‌ی اختیاری است که مشخص می‌کند خطاهای کدگذاری و کدگشایی چگونه مدیریت شوند؛ این گزینه در حالت دودویی قابل استفاده نیست. مجموعه‌ای از هندلرهای استاندارد خطا (که در :ref:`error-handlers` فهرست شده‌اند) در دسترس هستند، با این حال هر نام مدیریت خطایی که با :func:`codecs.register_error` ثبت شده باشد نیز معتبر است. نام‌های استاندارد شامل موارد زیر هستند:" - -msgid "``'strict'`` to raise a :exc:`ValueError` exception if there is an encoding error. The default value of ``None`` has the same effect." -msgstr "``'strict'`` در صورت بروز خطای کدگذاری، استثنای :exc:`ValueError` پرتاب می‌کند. مقدار پیش‌فرض ``None`` نیز همین رفتار را دارد." - -msgid "``'ignore'`` ignores errors. Note that ignoring encoding errors can lead to data loss." -msgstr "``'ignore'`` خطاها را نادیده می‌گیرد. توجه داشته باشید که نادیده گرفتن خطاهای کدگذاری ممکن است به از دست رفتن داده‌ها منجر شود." - -msgid "``'replace'`` causes a replacement marker (such as ``'?'``) to be inserted where there is malformed data." -msgstr "``'replace'`` باعث می‌شود در محل داده‌های نادرست، یک نویسه‌ی جایگزین (مانند ``'?'``) درج شود." - -msgid "``'surrogateescape'`` will represent any incorrect bytes as low surrogate code units ranging from U+DC80 to U+DCFF. These surrogate code units will then be turned back into the same bytes when the ``surrogateescape`` error handler is used when writing data. This is useful for processing files in an unknown encoding." -msgstr "``'surrogateescape'`` هر بایت نادرست را به‌صورت واحدهای کد جانشین پایینی در بازه‌ی U+DC80 تا U+DCFF نمایش می‌دهد. سپس، هنگام نوشتن داده‌ها و استفاده از هندلر خطای ``surrogateescape``، این واحدهای کد جانشین دوباره به همان بایت‌ها تبدیل می‌شوند. این قابلیت برای پردازش پرونده‌هایی با کدگذاری نامشخص مفید است." +msgid "*encoding* is the name of the encoding used to decode or encode the file. This should only be used in text mode. The default encoding is UTF-8; if :ref:`Python UTF-8 Mode ` is disabled, the default is platform-dependent (whatever :func:`locale.getencoding` returns). Any :term:`text encoding` supported by Python can be used, and ``encoding=\"locale\"`` specifies the current locale encoding explicitly. See the :mod:`codecs` module for the list of supported encodings." +msgstr "*encoding* نام کدگذاری‌ای است که برای کدگشایی یا کدگذاری پرونده استفاده می‌شود. این پارامتر فقط باید در حالت متنی استفاده شود. کدگذاری پیش‌فرض UTF-8 است؛ اگر :ref:`حالت UTF-8 پایتون ` غیرفعال باشد، مقدار پیش‌فرض به پلتفرم بستگی دارد (هر چیزی که :func:`locale.getencoding` برگرداند). هر :term:`کدگذاری متن ` که توسط پایتون پشتیبانی شود قابل استفاده است و مقدار ``encoding=\"locale\"`` کدگذاری محلی فعلی را به طور صریح مشخص می‌کند. برای فهرست کدگذاری‌های پشتیبانی‌شده، به ماژول :mod:`codecs` مراجعه کنید." -msgid "``'xmlcharrefreplace'`` is only supported when writing to a file. Characters not supported by the encoding are replaced with the appropriate XML character reference :samp:`&#{nnn};`." -msgstr "``'xmlcharrefreplace'`` فقط هنگام نوشتن در یک پرونده پشتیبانی می‌شود. نویسه‌هایی که توسط کدگذاری پشتیبانی نمی‌شوند، با ارجاع نویسه‌ی XML متناظر آن‌ها به صورت :samp:`&#{nnn};` جایگزین می‌شوند." - -msgid "``'backslashreplace'`` replaces malformed data by Python's backslashed escape sequences." -msgstr "``'backslashreplace'`` داده‌های نادرست را با دنباله‌های خنثی‌سازی دارای بک‌اسلش در پایتون جایگزین می‌کند." - -msgid "``'namereplace'`` (also only supported when writing) replaces unsupported characters with ``\\N{...}`` escape sequences." -msgstr "``'namereplace'`` (که آن هم فقط هنگام نوشتن پشتیبانی می‌شود) نویسه‌های پشتیبانی‌نشده را با دنباله‌های خنثی‌سازی ``\\N{...}`` جایگزین می‌کند." +msgid "*errors* is an optional string that specifies how encoding and decoding errors are to be handled—this cannot be used in binary mode. A variety of standard error handlers are available, though any error handling name that has been registered with :func:`codecs.register_error` is also valid. The standard names can be found in :ref:`error-handlers`." +msgstr "*errors* یک رشته‌ی اختیاری است که مشخص می‌کند خطاهای کدگذاری و کدگشایی چگونه باید مدیریت شوند — این پارامتر را نمی‌توان در حالت دودویی استفاده کرد. مجموعه‌ای متنوع از هندلرهای خطای استاندارد در دسترس هستند، البته هر نام مدیریت خطایی که در :func:`codecs.register_error` ثبت شده باشد نیز معتبر است. نام‌های استاندارد را می‌توانید در :ref:`error-handlers` بیابید." msgid "*newline* determines how to parse newline characters from the stream. It can be ``None``, ``''``, ``'\\n'``, ``'\\r'``, and ``'\\r\\n'``. It works as follows:" msgstr "*newline* مشخص می‌کند که نویسه‌های پایان خط در جریان داده چگونه تجزیه شوند. این مقدار می‌تواند ``None``، ``''``، ``'\\n'``، ``'\\r'`` یا ``'\\r\\n'`` باشد. عملکرد آن به صورت زیر است:" @@ -1225,6 +1226,9 @@ msgstr "در ویندوز، باز کردن یک بافر کنسول ممکن ا msgid "The ``'U'`` mode has been removed." msgstr "حالت ``'U'`` حذف شده است." +msgid "UTF-8 is now the default encoding, instead of the platform-dependent locale encoding (:pep:`686`)." +msgstr "اکنون UTF-8 کدگذاری پیش‌فرض است و جایگزین کدگذاری locale وابسته به پلتفرم شده است (:pep:`686`)." + msgid "Return the ordinal value of a character." msgstr "مقدار ترتیبی یک نویسه را برمی‌گرداند." @@ -1412,7 +1416,7 @@ msgid "" " self.age = age\n" "\n" " def __repr__(self):\n" -" return f\"Person('{self.name}', {self.age})\"" +" return f\"Person({self.name!r}, {self.age!r})\"" msgstr "" "class Person:\n" " def __init__(self, name, age):\n" @@ -1420,7 +1424,7 @@ msgstr "" " self.age = age\n" "\n" " def __repr__(self):\n" -" return f\"Person('{self.name}', {self.age})\"" +" return f\"Person({self.name!r}, {self.age!r})\"" msgid "Return a reverse :term:`iterator`. The argument must be an object which has a :meth:`~object.__reversed__` method or supports the sequence protocol (the :meth:`~object.__len__` method and the :meth:`~object.__getitem__` method with integer arguments starting at ``0``)." msgstr "یک :term:`پیمایش‌گر ` معکوس را برمی‌گرداند. آرگومان باید شی‌ءای باشد که متد :meth:`~object.__reversed__` را داشته باشد یا از پروتکل دنباله (متد :meth:`~object.__len__` و متد :meth:`~object.__getitem__` با آرگومان‌های صحیح که از ``0`` شروع می‌شوند) پشتیبانی کند." @@ -1452,6 +1456,91 @@ msgstr "*name* لازم نیست یک شناسه‌ی پایتون، مطابق msgid "Since :ref:`private name mangling ` happens at compilation time, one must manually mangle a private attribute's (attributes with two leading underscores) name in order to set it with :func:`setattr`." msgstr "از آنجا که :ref:`تغییر نام خصوصی ` در زمان کامپایل انجام می‌شود، برای تنظیم مقدار یک ویژگی خصوصی (ویژگی‌هایی که با دو زیرخط آغاز می‌شوند) با استفاده از :func:`setattr`، باید نام آن را به‌صورت دستی تغییر دهید." +msgid "Return a new unique sentinel object. *name* must be a :class:`str`, and is used by default as the returned object's representation::" +msgstr "یک شیء نشانگر یکتا و جدید برمی‌گرداند. آرگومان *name* باید یک :class:`str` باشد و به‌طور پیش‌فرض به عنوان نمایش شیء بازگردانده‌شده استفاده می‌شود::" + +msgid "" +">>> MISSING = sentinel(\"MISSING\")\n" +">>> MISSING\n" +"MISSING" +msgstr "" +">>> MISSING = sentinel(\"MISSING\")\n" +">>> MISSING\n" +"MISSING" + +msgid "The optional *repr* argument can be used to specify a different representation::" +msgstr "آرگومان اختیاری *repr* را می‌توان برای مشخص کردن یک بازنمایی متفاوت به کار برد::" + +msgid "" +">>> MISSING = sentinel(\"MISSING\", repr=\"\")\n" +">>> MISSING\n" +"" +msgstr "" +">>> MISSING = sentinel(\"MISSING\", repr=\"\")\n" +">>> MISSING\n" +"" + +msgid "Sentinel objects are truthy and compare equal only to themselves. They are intended to be compared with the :keyword:`is` operator." +msgstr "اشیاء نشانگر دارای ارزش راستین (truthy) هستند و فقط با خودشان برابر مقایسه می‌شوند. آن‌ها برای مقایسه با عملگر :keyword:`is` در نظر گرفته شده‌اند." + +msgid "``sentinel`` does not support subclassing." +msgstr "``sentinel`` از ایجاد زیرکلاس پشتیبانی نمی‌کند." + +msgid "Shallow and deep copies of a sentinel object return the object itself." +msgstr "نسخه‌های کم‌عمق و عمیق از یک شیء نشانگر، خودِ شیء را برمی‌گردانند." + +msgid "Sentinels are conventionally assigned to a variable with a matching name. Sentinels defined in this way can be used in :term:`type hints `::" +msgstr "نشانگرها به‌طور قراردادی به یک متغیر با نام مشابه اختصاص داده می‌شوند. نشانگرهایی که به این روش تعریف می‌شوند را می‌توان در :term:`راهنماهای نوع ` استفاده کرد::" + +msgid "" +"MISSING = sentinel(\"MISSING\")\n" +"\n" +"def next_value(default: int | MISSING = MISSING):\n" +" ..." +msgstr "" +"MISSING = sentinel(\"MISSING\")\n" +"\n" +"def next_value(default: int | MISSING = MISSING):\n" +" ..." + +msgid "Sentinel objects support the :ref:`| ` operator for use in type expressions." +msgstr "اشیاء نشانگر از عملگر :ref:`| ` برای استفاده در عبارات نوع پشتیبانی می‌کنند." + +msgid ":mod:`Pickling ` is supported for sentinel objects that are placed in the global scope of a module under a name matching the sentinel's name, and for sentinels placed in class scopes with a name matching the :term:`qualified name` of the sentinel. Other sentinels, such as those defined in a function scope, are not picklable. The identity of the sentinel is preserved after pickling::" +msgstr ":mod:`Pickling ` برای اشیاء نشانگری پشتیبانی می‌شود که در محدوده سراسری یک ماژول با نامی منطبق با نام نشانگر قرار دارند و همچنین برای نشانگرهایی که در محدوده‌های کلاس با نامی منطبق با :term:`نام کامل ` نشانگر قرار گرفته‌اند. سایر نشانگرها، مانند آن‌هایی که در محدوده یک تابع تعریف شده‌اند، پیکل‌پذیر نیستند. هویت نشانگر پس از پیکل شدن حفظ می‌شود::" + +msgid "" +"import pickle\n" +"\n" +"PICKLABLE = sentinel(\"PICKLABLE\")\n" +"\n" +"assert pickle.loads(pickle.dumps(PICKLABLE)) is PICKLABLE\n" +"\n" +"class Cls:\n" +" PICKLABLE = sentinel(\"Cls.PICKLABLE\")\n" +"\n" +"assert pickle.loads(pickle.dumps(Cls.PICKLABLE)) is Cls.PICKLABLE" +msgstr "" +"import pickle\n" +"\n" +"PICKLABLE = sentinel(\"PICKLABLE\")\n" +"\n" +"assert pickle.loads(pickle.dumps(PICKLABLE)) is PICKLABLE\n" +"\n" +"class Cls:\n" +" PICKLABLE = sentinel(\"Cls.PICKLABLE\")\n" +"\n" +"assert pickle.loads(pickle.dumps(Cls.PICKLABLE)) is Cls.PICKLABLE" + +msgid "Sentinel objects have the following attributes:" +msgstr "اشیاء نشانگر دارای ویژگی‌های زیر هستند:" + +msgid "The sentinel's name." +msgstr "نام نشانگر." + +msgid "The name of the module where the sentinel was created. This attribute is writable." +msgstr "نام ماژولی که نشانگر در آن ایجاد شده است. این ویژگی قابل نوشتن است." + msgid "Return a :term:`slice` object representing the set of indices specified by ``range(start, stop, step)``. The *start* and *step* arguments default to ``None``." msgstr "یک شیء :term:`slice` را برمی‌گرداند که مجموعه‌ی اندیس‌های مشخص‌شده توسط ``range(start, stop, step)`` را نمایش می‌دهد. آرگومان‌های *start* و *step* به‌طور پیش‌فرض برابر ``None`` هستند." @@ -1644,6 +1733,9 @@ msgstr "همچنین به :ref:`class-customization` مراجعه کنید." msgid "Subclasses of :class:`!type` which don't override ``type.__new__`` may no longer use the one-argument form to get the type of an object." msgstr "زیرکلاس‌های :class:`!type` که ``type.__new__`` را بازنویسی نمی‌کنند، دیگر نمی‌توانند از شکل تک‌آرگومانی برای دریافت نوع یک شیء استفاده کنند." +msgid "*dict* can now be a :class:`frozendict`." +msgstr "اکنون *dict* می‌تواند یک :class:`frozendict` باشد." + msgid "Return the :attr:`~object.__dict__` attribute for a module, class, instance, or any other object with a :attr:`!__dict__` attribute." msgstr "ویژگی :attr:`~object.__dict__` یک ماژول، کلاس، نمونه یا هر شیء دیگری که دارای ویژگی :attr:`!__dict__` باشد را برمی‌گرداند." @@ -1894,5 +1986,29 @@ msgstr "ایمپورت" msgid "builtins" msgstr "توکارها" -#~ msgid "This function raises :exc:`SyntaxError` or :exc:`ValueError` if the compiled source is invalid." -#~ msgstr "اگر کد منبع کامپایل‌شده نامعتبر باشد، این تابع استثنای :exc:`SyntaxError` یا :exc:`ValueError` پرتاب می‌کند." +#~ msgid "This function raises :exc:`SyntaxError` if the compiled source is invalid, including a *source* containing a null character or that cannot be decoded; :exc:`ValueError` if *mode* or *flags* is invalid, or if a string *source* contains surrogate characters; :exc:`MemoryError` or :exc:`RecursionError` if *source* is too complex to parse or compile, for example an expression with many thousands of nested operators; and :exc:`OverflowError` if *source* is too large." +#~ msgstr "این تابع :exc:`SyntaxError` را پرتاب میکند اگر منبعِ کامپایل‌شده نامعتبر باشد، از جمله یک *source* که حاوی نویسه‌ی null است یا که قابل رمزگشایی نیست؛ :exc:`ValueError` اگر *حالت* یا *پرچم‌ها* نامعتبر باشند، یا اگر یک رشته *source* حاوی نویسه‌های جایگزین باشد؛ :exc:`MemoryError` یا :exc:`RecursionError` اگر *source* برای تجزیه یا کامپایل بیش از حد پیچیده باشد، برای مثال یک عبارت با هزاران عملگر تو در تو؛ و :exc:`OverflowError` اگر *source* بیش از حد بزرگ باشد." + +#~ msgid ":exc:`SyntaxError` is raised instead of :exc:`ValueError` when null bytes are encountered in *source*." +#~ msgstr "هنگامی که بایت‌های تهی در *source* یافت شوند، :exc:`SyntaxError` به‌جای :exc:`ValueError` پرتاب می‌شود." + +#~ msgid "``'strict'`` to raise a :exc:`ValueError` exception if there is an encoding error. The default value of ``None`` has the same effect." +#~ msgstr "``'strict'`` در صورت بروز خطای کدگذاری، استثنای :exc:`ValueError` پرتاب می‌کند. مقدار پیش‌فرض ``None`` نیز همین رفتار را دارد." + +#~ msgid "``'ignore'`` ignores errors. Note that ignoring encoding errors can lead to data loss." +#~ msgstr "``'ignore'`` خطاها را نادیده می‌گیرد. توجه داشته باشید که نادیده گرفتن خطاهای کدگذاری ممکن است به از دست رفتن داده‌ها منجر شود." + +#~ msgid "``'replace'`` causes a replacement marker (such as ``'?'``) to be inserted where there is malformed data." +#~ msgstr "``'replace'`` باعث می‌شود در محل داده‌های نادرست، یک نویسه‌ی جایگزین (مانند ``'?'``) درج شود." + +#~ msgid "``'surrogateescape'`` will represent any incorrect bytes as low surrogate code units ranging from U+DC80 to U+DCFF. These surrogate code units will then be turned back into the same bytes when the ``surrogateescape`` error handler is used when writing data. This is useful for processing files in an unknown encoding." +#~ msgstr "``'surrogateescape'`` هر بایت نادرست را به‌صورت واحدهای کد جانشین پایینی در بازه‌ی U+DC80 تا U+DCFF نمایش می‌دهد. سپس، هنگام نوشتن داده‌ها و استفاده از هندلر خطای ``surrogateescape``، این واحدهای کد جانشین دوباره به همان بایت‌ها تبدیل می‌شوند. این قابلیت برای پردازش پرونده‌هایی با کدگذاری نامشخص مفید است." + +#~ msgid "``'xmlcharrefreplace'`` is only supported when writing to a file. Characters not supported by the encoding are replaced with the appropriate XML character reference :samp:`&#{nnn};`." +#~ msgstr "``'xmlcharrefreplace'`` فقط هنگام نوشتن در یک پرونده پشتیبانی می‌شود. نویسه‌هایی که توسط کدگذاری پشتیبانی نمی‌شوند، با ارجاع نویسه‌ی XML متناظر آن‌ها به صورت :samp:`&#{nnn};` جایگزین می‌شوند." + +#~ msgid "``'backslashreplace'`` replaces malformed data by Python's backslashed escape sequences." +#~ msgstr "``'backslashreplace'`` داده‌های نادرست را با دنباله‌های خنثی‌سازی دارای بک‌اسلش در پایتون جایگزین می‌کند." + +#~ msgid "``'namereplace'`` (also only supported when writing) replaces unsupported characters with ``\\N{...}`` escape sequences." +#~ msgstr "``'namereplace'`` (که آن هم فقط هنگام نوشتن پشتیبانی می‌شود) نویسه‌های پشتیبانی‌نشده را با دنباله‌های خنثی‌سازی ``\\N{...}`` جایگزین می‌کند." diff --git a/builtins/stdtypes.po b/builtins/stdtypes.po index fc644e9a..52c23b65 100644 --- a/builtins/stdtypes.po +++ b/builtins/stdtypes.po @@ -5,12 +5,13 @@ # # Translators: # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-21 13:27+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: none\n" @@ -1799,8 +1800,8 @@ msgstr "" ">>> 'straße'.casefold()\n" "'strasse'" -msgid "The casefolding algorithm is `described in section 3.13 'Default Case Folding' of the Unicode Standard `__." -msgstr "الگوریتم تاشدن حروف (casefolding) `در بخش ۳٫۱۳ با عنوان 'تاشدن پیش‌فرض' از استاندارد یونیکد توصیف شده است `__." +msgid "The casefolding algorithm is `described in section 3.13.3 'Default Case Folding' of the Unicode Standard `__." +msgstr "الگوریتم یکسان‌سازی حروف بزرگ و کوچک در `بخش ۳.۱۳.۳ با عنوان «Default Case Folding» از استاندارد یونیکس `__ شرح داده شده است." msgid "Return centered in a string of length *width*. Padding is done using the specified *fillchar* (default is an ASCII space). The original string is returned if *width* is less than or equal to ``len(s)``. For example::" msgstr "رشته‌ای به طول *width* را برمی‌گرداند که رشته‌ی اصلی در وسط آن قرار دارد. پرکردن با استفاده از *fillchar* مشخص‌شده انجام می‌شود (پیش‌فرض یک فاصله‌ی ASCII است). اگر *width* کوچک‌تر یا مساوی ``len(s)`` باشد، رشته‌ی اصلی برگردانده می‌شود. برای مثال::" @@ -2029,8 +2030,8 @@ msgstr "" ">>> ' '.isalnum()\n" "False" -msgid "Return ``True`` if all characters in the string are alphabetic and there is at least one character, ``False`` otherwise. Alphabetic characters are those characters defined in the Unicode character database as \"Letter\", i.e., those with general category property being one of \"Lm\", \"Lt\", \"Lu\", \"Ll\", or \"Lo\". Note that this is different from the `Alphabetic property defined in section 4.10 'Letters, Alphabetic, and Ideographic' of the Unicode Standard `_. For example:" -msgstr "اگر تمام نویسه‌های موجود در رشته الفبایی باشند و حداقل یک نویسه وجود داشته باشد، ``True`` برگردانید، در غیر این صورت ``False``. نویسه‌های الفبایی آن نویسه‌هایی هستند که در پایگاه‌داده نویسه‌های یونیکد به‌عنوان «Letter» تعریف شده‌اند، یعنی آن‌هایی که ویژگیِ دسته‌بندی عمومی‌شان یکی از «Lm»، «Lt»، «Lu»، «Ll»، یا «Lo» باشد. توجه کنید که این با `ویژگی الفبایی تعریف‌شده در بخش ۴.۱۰ «Letters, Alphabetic, and Ideographic» از استاندارد یونیکد `_ متفاوت است. برای مثال:" +msgid "Return ``True`` if all characters in the string are alphabetic and there is at least one character, ``False`` otherwise. Alphabetic characters are those characters defined in the Unicode character database as \"Letter\", i.e., those with general category property being one of \"Lm\", \"Lt\", \"Lu\", \"Ll\", or \"Lo\". Note that this is different from the `Alphabetic property defined in section 4.10 'Letters, Alphabetic, and Ideographic' of the Unicode Standard `__. For example:" +msgstr "اگر همه‌ی نویسه‌های درون رشته الفبایی باشند و حداقل یک نویسه وجود داشته باشد، مقدار ``True`` و در غیر این صورت ``False`` را برمی‌گرداند. نویسه‌های الفبایی آن دسته از نویسه‌هایی هستند که در پایگاه داده‌ی نویسه‌های یونیکس به عنوان «Letter» تعریف شده‌اند؛ یعنی آن‌هایی که ویژگی دسته‌ی عمومی‌شان یکی از موارد «Lm»، «Lt»، «Lu»، «Ll» یا «Lo» است. توجه داشته باشید که این با `ویژگی الفبایی تعریف‌شده در بخش ۴.۱۰ با عنوان «Letters, Alphabetic, and Ideographic» از استاندارد یونیکس `__ متفاوت است. برای مثال:" msgid "" ">>> 'Letters and spaces'.isalpha()\n" @@ -2285,8 +2286,8 @@ msgstr "" ">>> 'Lower Method Example'.lower()\n" "'lower method example'" -msgid "The lowercasing algorithm used is `described in section 3.13 'Default Case Folding' of the Unicode Standard `__." -msgstr "الگوریتم حروف‌کوچک‌سازی استفاده‌شده، `در بخش ۳٫۱۳ با عنوان «تاشدگی پیش‌فرض» (Default Case Folding) از استاندارد یونیکد توصیف شده است `__." +msgid "The lowercasing algorithm used is `described in section 3.13.2 'Default Case Conversion' of the Unicode Standard `__." +msgstr "الگوریتم کوچک‌سازی حروف استفاده‌شده در `بخش 3.13.2 'Default Case Conversion' از استاندارد یونیکد `__ شرح داده شده است." 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 omitted or ``None``, the *chars* argument defaults to removing whitespace. The *chars* argument is not a prefix; rather, all combinations of its values are stripped::" msgstr "کپی‌ای از رشته را با حذف نویسه‌های ابتدایی برمی‌گرداند. آرگومان *chars* رشته‌ای است که مجموعه نویسه‌هایی را که باید حذف شوند مشخص می‌کند. اگر ذکر نشود یا ``None`` باشد، آرگومان *chars* به‌طور پیش‌فرض فاصله‌های خالی را حذف می‌کند. آرگومان *chars* یک پیشوند نیست؛ بلکه تمام ترکیب‌های مقادیر آن حذف می‌شوند::" @@ -2325,6 +2326,9 @@ msgstr "اگر تنها یک آرگومان وجود داشته باشد، با msgid "If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in *from* will be mapped to the character at the same position in *to*. If there is a third argument, it must be a string, whose characters will be mapped to ``None`` in the result." msgstr "اگر دو آرگومان وجود داشته باشند، باید رشته‌هایی با طول برابر باشند و در دیکشنری حاصل، هر نویسه در *from* به نویسه‌ای در همان جایگاه در *to* نگاشت می‌شود. اگر آرگومان سومی وجود داشته باشد، باید یک رشته باشد که نویسه‌های آن در نتیجه به ``None`` نگاشت می‌شوند." +msgid "*dict* can now be a :class:`frozendict`." +msgstr "اکنون *dict* می‌تواند یک :class:`frozendict` باشد." + 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 after the separator. If the separator is not found, return a 3-tuple containing the string itself, followed by two empty strings." msgstr "رشته را در نخستین رخداد *sep* تفکیک می‌کند و یک تاپل سه‌عضوی شامل بخش پیش از جداکننده، خودِ جداکننده و بخش پس از جداکننده را برمی‌گرداند. اگر جداکننده یافت نشود، تاپلی سه‌عضوی شامل خودِ رشته و سپس دو رشته‌ی خالی را برمی‌گرداند." @@ -2832,14 +2836,24 @@ msgstr "نسخه‌ای از رشته را برمی‌گرداند که در آ msgid "You can use :meth:`str.maketrans` to create a translation map from character-to-character mappings in different formats." msgstr "می‌توانید از :meth:`str.maketrans` برای ایجاد یک نگاشت ترجمه از نگاشت‌های نویسه‌به‌نویسه در قالب‌های مختلف استفاده کنید." +msgid "The following example uses a mapping to replace ``'a'`` with ``'X'``, ``'b'`` with ``'Y'``, and delete ``'c'``:" +msgstr "مثال زیر از یک نگاشت برای جایگزینی ``'a'`` با ``'X'``، ``'b'`` با ``'Y'`` و حذف ``'c'`` استفاده می‌کند:" + +msgid "" +">>> 'abc123'.translate({ord('a'): 'X', ord('b'): 'Y', ord('c'): None})\n" +"'XY123'" +msgstr "" +">>> 'abc123'.translate({ord('a'): 'X', ord('b'): 'Y', ord('c'): None})\n" +"'XY123'" + msgid "See also the :mod:`codecs` module for a more flexible approach to custom character mappings." msgstr "برای رویکردی انعطاف‌پذیرتر به نگاشت‌های سفارشی نویسه‌ها، ماژول :mod:`codecs` را نیز ببینید." 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`` contains uncased characters or if the Unicode category of the resulting character(s) is not \"Lu\" (Letter, uppercase), but e.g. \"Lt\" (Letter, titlecase)." msgstr "یک کپی از رشته را برمی‌گرداند که در آن تمام نویسه‌های دارای حالت [4]_ به حروف بزرگ تبدیل شده‌اند. توجه داشته باشید که ``s.upper().isupper()`` ممکن است ``False`` باشد اگر ``s`` حاوی نویسه‌های بدون حالت باشد یا اگر دسته یونیکد نویسه‌های حاصل \"Lu\" (حرف، بزرگ) نباشد، بلکه برای مثال \"Lt\" (حرف، حالت عنوان) باشد." -msgid "The uppercasing algorithm used is `described in section 3.13 'Default Case Folding' of the Unicode Standard `__." -msgstr "الگوریتم تبدیل به حروف بزرگ استفاده‌شده `در بخش ۳.۱۳ «Default Case Folding» از استاندارد یونیکد توضیح داده شده است `__." +msgid "The uppercasing algorithm used is `described in section 3.13.2 'Default Case Conversion' of the Unicode Standard `__." +msgstr "الگوریتم بزرگ‌سازی حروف استفاده‌شده در `بخش 3.13.2 'Default Case Conversion' از استاندارد یونیکد `__ شرح داده شده است." 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 by inserting the padding *after* the sign character rather than before. The original string is returned if *width* is less than or equal to ``len(s)``." msgstr "یک کپی از رشته را برمی‌گرداند که از سمت چپ با ارقام ``'0'`` ASCII پر شده است تا رشته‌ای به طول *width* بسازد. پیشوند علامت ابتدایی (``'+'``/``'-'``) به‌گونه‌ای مدیریت می‌شود که پرکننده *بعد از* نویسه علامت درج می‌شود، نه قبل از آن. اگر *width* کمتر یا مساوی با ``len(s)`` باشد، رشته اصلی برگردانده می‌شود." @@ -3394,6 +3408,21 @@ msgstr "این معادل است با:" msgid "Examples:" msgstr "مثال‌ها:" +msgid "Remove the first *n* bytes from the bytearray and return them as an immutable :class:`bytes`. By default (if *n* is ``None``), return all bytes and clear the bytearray." +msgstr "اولین *n* بایت را از bytearray حذف کرده و آن‌ها را به عنوان یک :class:`bytes` تغییرناپذیر برگردانید. به طور پیش‌فرض (اگر *n* برابر با ``None`` باشد)، تمام بایت‌ها را برگردانده و bytearray را پاک کنید." + +msgid "If *n* is negative, index from the end and take the first :func:`len` plus *n* bytes. If *n* is out of bounds, raise :exc:`IndexError`." +msgstr "اگر *n* منفی باشد، اندیس را از انتها حساب کنید و مجموع طول :func:`len` به اضافه‌ی *n* بایت را بگیرید. اگر *n* خارج از کران باشد، :exc:`IndexError` را ایجاد کنید." + +msgid "Taking less than the full length will leave remaining bytes in the :class:`bytearray`, which requires a copy. If the remaining bytes should be discarded, use :func:`~bytearray.resize` or :keyword:`del` to truncate then :func:`~bytearray.take_bytes` without a size." +msgstr "گرفتن مقداری کمتر از کل طول، بایت‌های باقی‌مانده را در :class:`bytearray` باقی می‌گذارد که این امر نیازمند یک کپی است. اگر بایت‌های باقی‌مانده باید کنار گذاشته شوند، از :func:`~bytearray.resize` یا :keyword:`del` برای برش زدن استفاده کنید و سپس :func:`~bytearray.take_bytes` را بدون اندازه فراخوانی کنید." + +msgid "Taking all bytes is a zero-copy operation." +msgstr "گرفتن تمام بایت‌ها یک عملیات بدون کپی است." + +msgid "See the :ref:`What's New ` entry for common code patterns which can be optimized with :meth:`bytearray.take_bytes`." +msgstr "برای الگوهای کد رایجی که می‌توانند با :meth:`bytearray.take_bytes` بهینه‌سازی شوند، ورودی :ref:`What's New ` را ببینید." + 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 a bytearray object of length 1. (This contrasts with text strings, where both indexing and slicing will produce a string of length 1)" msgstr "از آن‌جا که اشیای bytearray دنباله‌هایی از اعداد صحیح هستند (شبیه به یک فهرست)، برای یک شیء bytearray با نام *b*، ``b[0]`` یک عدد صحیح خواهد بود، در حالی که ``b[0:1]`` یک شیء bytearray به طول ۱ خواهد بود. (این موضوع با رشته‌های متنی تفاوت دارد، که در آن‌ها هم اندیس‌دهی و هم اسلایس، یک رشته به طول ۱ تولید می‌کنند)" @@ -3533,8 +3562,8 @@ msgstr "دنباله را در نخستین رخداد *sep* جدا می‌کن msgid "The separator to search for may be any :term:`bytes-like object`." msgstr "جداکننده‌ی مورد جستجو می‌تواند هر :term:`شیء شبه‌بایت ` باشد." -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 "یک کپی از دنباله را برمی‌گرداند که در آن تمام رخدادهای زیردنباله‌ی *old* با *new* جایگزین شده‌اند. اگر آرگومان اختیاری *count* داده شود، فقط *count* رخداد نخست جایگزین می‌شوند." +msgid "Return a copy of the sequence with all occurrences of subsequence *old* replaced by *new*. If *count* is given, only the first *count* occurrences are replaced. If *count* is not specified or ``-1``, then all occurrences are replaced." +msgstr "یک کپی از دنباله را برمی‌گرداند که در آن تمام موارد زیردنباله‌ی *old* با *new* جایگزین شده‌اند. اگر *count* داده شود، فقط *count* مورد اول جایگزین می‌شوند. اگر *count* مشخص نشده باشد یا ``-1`` باشد، تمام موارد جایگزین می‌شوند." msgid "The subsequence to search for and its replacement may be any :term:`bytes-like object`." msgstr "زیردنباله‌ای که باید جستجو شود و جایگزین آن می‌توانند هر :term:`bytes-like object` باشند." @@ -4771,17 +4800,17 @@ msgstr "توجه داشته باشید که نسخه‌های غیرعملگری msgid "Note, the *elem* argument to the :meth:`~object.__contains__`, :meth:`~set.remove`, and :meth:`~set.discard` methods may be a set. To support searching for an equivalent frozenset, a temporary one is created from *elem*." msgstr "توجه داشته باشید که آرگومان *elem* در متدهای :meth:`~object.__contains__`، :meth:`~set.remove` و :meth:`~set.discard` می‌تواند یک مجموعه باشد. برای پشتیبانی از جست‌وجوی یک frozenset معادل، یک frozenset موقت از *elem* ایجاد می‌شود." -msgid "For detailed information on thread-safety guarantees for :class:`set` objects, see :ref:`thread-safety-set`." -msgstr "برای اطلاعات دقیق درباره تضمین‌های ایمنی نخی برای اشیای :class:`set`، :ref:`thread-safety-set` را ببینید." - msgid "Sets and frozensets are :ref:`generic ` over the type of their elements." msgstr "مجموعه‌ها و مجموعه‌های فریزشده (frozenset) نسبت به نوع عناصرشان :ref:`عام ` هستند." -msgid "Mapping Types --- :class:`dict`" -msgstr "انواع نگاشت --- :class:`dict`" +msgid "For detailed information on thread-safety guarantees for :class:`set` objects, see :ref:`thread-safety-set`." +msgstr "برای اطلاعات دقیق درباره تضمین‌های ایمنی نخی برای اشیای :class:`set`، :ref:`thread-safety-set` را ببینید." + +msgid "Mapping types --- :class:`!dict`, :class:`!frozendict`" +msgstr "انواع نگاشت --- :class:`!dict`, :class:`!frozendict`" -msgid "A :term:`mapping` object maps :term:`hashable` values to arbitrary objects. Mappings are mutable objects. There is currently only one standard mapping type, the :dfn:`dictionary`. (For other containers see the built-in :class:`list`, :class:`set`, and :class:`tuple` classes, and the :mod:`collections` module.) See :ref:`time-complexity` for the costs of the various dictionary operations." -msgstr "یک شیء :term:`نگاشت ` مقادیر :term:`هش‌پذیر ` را به اشیای دلخواه نگاشت می‌کند. نگاشت‌ها اشیای تغییرپذیر هستند. در حال حاضر تنها یک نوع نگاشت استاندارد وجود دارد، یعنی :dfn:`دیکشنری (dictionary)`. (برای سایر ظرف‌ها به کلاس‌های توکار :class:`list`، :class:`set` و :class:`tuple` و ماژول :mod:`collections` مراجعه کنید.) برای هزینه‌های عملیات‌های مختلف دیکشنری به :ref:`time-complexity` مراجعه کنید." +msgid "A :term:`mapping` object maps :term:`hashable` values to arbitrary objects. There are currently two standard mapping types, the :dfn:`dictionary` and :class:`frozendict`. (For other containers see the built-in :class:`list`, :class:`set`, and :class:`tuple` classes, and the :mod:`collections` module.) See :ref:`time-complexity` for the costs of the various dictionary operations." +msgstr "یک شیء :term:`نگاشت ` مقادیر :term:`هش‌پذیر ` را به اشیای دلخواه نگاشت می‌دهد. در حال حاضر دو نوع نگاشت استاندارد وجود دارد: :dfn:`dictionary` و :class:`frozendict`. (برای سایر ظروف، کلاس‌های توکار :class:`list`، :class:`set` و :class:`tuple` و ماژول :mod:`collections` را ببینید.) برای هزینه‌های عملیات مختلف دیکشنری، :ref:`time-complexity` را ببینید." msgid "A dictionary's keys are *almost* arbitrary values. Values that are not :term:`hashable`, that is, values containing lists, dictionaries or other mutable types (that are compared by value rather than by object identity) may not be used as keys. Values that compare equal (such as ``1``, ``1.0``, and ``True``) can be used interchangeably to index the same dictionary entry." msgstr "کلیدهای یک دیکشنری *تقریباً* مقادیر دلخواه هستند. مقادیری که :term:`هش‌پذیر ` نیستند، یعنی مقادیری که شامل فهرست‌ها، دیکشنری‌ها یا سایر انواع تغییرپذیر هستند (که بر اساس مقدار مقایسه می‌شوند، نه بر اساس هویت شیء) نمی‌توانند به‌عنوان کلید استفاده شوند. مقادیری که برابر یکدیگر مقایسه می‌شوند (مانند ``1``، ``1.0`` و ``True``) می‌توانند به‌جای یکدیگر برای اندیس‌دهی به یک آیتم دیکشنری استفاده شوند." @@ -5021,8 +5050,8 @@ msgstr "" msgid "Dictionaries are now reversible." msgstr "دیکشنری‌ها اکنون برگشت‌پذیر هستند." -msgid ":class:`types.MappingProxyType` can be used to create a read-only view of a :class:`dict`." -msgstr "می‌توان از :class:`types.MappingProxyType` برای ایجاد یک نمای فقط‌خواندنی از یک :class:`dict` استفاده کرد." +msgid ":class:`frozendict` and :class:`types.MappingProxyType` can be used to create a read-only view of a :class:`dict`." +msgstr "از :class:`frozendict` و :class:`types.MappingProxyType` می‌توان برای ایجاد یک نمای فقط‌خواندنی از یک :class:`dict` استفاده کرد." msgid "For detailed information on thread-safety guarantees for :class:`dict` objects, see :ref:`thread-safety-dict`." msgstr "برای اطلاعات دقیق درباره‌ی تضمین‌های ایمنی نخ برای اشیاء :class:`dict`، به :ref:`thread-safety-dict` مراجعه کنید." @@ -5146,6 +5175,54 @@ msgstr "" ">>> values.mapping['spam']\n" "500" +msgid "Frozen dictionaries" +msgstr "دیکشنری‌های فریزشده" + +msgid "Return a new frozen dictionary initialized from an optional positional argument and a possibly empty set of keyword arguments." +msgstr "یک دیکشنری فریزشده‌ی جدید که از یک آرگومان جایگاهی اختیاری و یک مجموعه آرگومان کلیدواژه‌ای احتمالاً خالی مقداردهی اولیه شده است را برمی‌گرداند." + +msgid "A :class:`!frozendict` has a similar API to the :class:`dict` API, with the following differences:" +msgstr "یک :class:`!frozendict` دارای API مشابهی با API در :class:`dict` است، با تفاوت‌های زیر:" + +msgid ":class:`!dict` has more methods than :class:`!frozendict`:" +msgstr ":class:`!dict` دارای متدهای بیشتری نسبت به :class:`!frozendict` است:" + +msgid ":meth:`!__delitem__`" +msgstr ":meth:`!__delitem__`" + +msgid ":meth:`!__setitem__`" +msgstr ":meth:`!__setitem__`" + +msgid ":meth:`~dict.clear`" +msgstr ":meth:`~dict.clear`" + +msgid ":meth:`~dict.pop`" +msgstr ":meth:`~dict.pop`" + +msgid ":meth:`~dict.popitem`" +msgstr ":meth:`~dict.popitem`" + +msgid ":meth:`~dict.setdefault`" +msgstr ":meth:`~dict.setdefault`" + +msgid ":meth:`~dict.update`" +msgstr ":meth:`~dict.update`" + +msgid "A :class:`!frozendict` can be hashed with ``hash(frozendict)`` if all keys and values can be hashed." +msgstr "یک :class:`!frozendict` را می‌توان با ``hash(frozendict)`` هش کرد، اگر تمام کلیدها و مقادیر قابل هش کردن باشند." + +msgid "``frozendict |= other`` does not modify the :class:`!frozendict` in-place but creates a new frozen dictionary." +msgstr "عبارت ``frozendict |= other`` شیء :class:`!frozendict` را در جا تغییر نمی‌دهد، بلکه یک دیکشنری فریزشده‌ی جدید ایجاد می‌کند." + +msgid ":class:`!frozendict` is not a :class:`!dict` subclass but inherits directly from ``object``." +msgstr ":class:`!frozendict` زیرکلاسی از :class:`!dict` نیست، بلکه مستقیماً از ``object`` ارث‌بری می‌کند." + +msgid "Like dictionaries, frozendicts are :ref:`generic ` over two types, signifying (respectively) the types of the frozendict's keys and values." +msgstr "دیکشنری‌های فریزشده نیز مانند دیکشنری‌ها، :ref:`generic ` روی دو نوع هستند و به ترتیب انواع کلیدها و مقادیر دیکشنری فریزشده را مشخص می‌کنند." + +msgid "Similar to :meth:`dict.fromkeys`, but call again the type constructor with an initialized :class:`frozendict` if the type is a :class:`frozendict` subclass or if the constructor returned a :class:`frozendict`." +msgstr "مشابه :meth:`dict.fromkeys`، اما اگر نوع داده زیرکلاسی از :class:`frozendict` باشد یا سازنده یک :class:`frozendict` برگرداند، سازنده‌ی نوع داده را دوباره با یک :class:`frozendict` مقداردهی‌شده فراخوانی کنید." + msgid "Context Manager Types" msgstr "انواع مدیر زمینه" @@ -5358,6 +5435,9 @@ msgstr ":class:`dict`" msgid ":class:`set`" msgstr ":class:`set`" +msgid ":class:`frozendict`" +msgstr ":class:`frozendict`" + msgid ":class:`frozenset`" msgstr ":class:`frozenset`" @@ -6644,3 +6724,9 @@ msgstr "..." msgid "ellipsis literal" msgstr "لفظی سه‌نقطه" + +#~ 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 "یک کپی از دنباله را برمی‌گرداند که در آن تمام رخدادهای زیردنباله‌ی *old* با *new* جایگزین شده‌اند. اگر آرگومان اختیاری *count* داده شود، فقط *count* رخداد نخست جایگزین می‌شوند." + +#~ msgid "Mapping Types --- :class:`dict`" +#~ msgstr "انواع نگاشت --- :class:`dict`" diff --git a/builtins/threadsafety.po b/builtins/threadsafety.po index 6a2fa77e..aa5c97df 100644 --- a/builtins/threadsafety.po +++ b/builtins/threadsafety.po @@ -5,6 +5,7 @@ # # Translators: # Sepehr Rasouli , 2026 +# mahdyaralipor , 2026 # msgid "" msgstr "" diff --git a/builtins/time-complexity.po b/builtins/time-complexity.po index 0bd4690e..881f0a3d 100644 --- a/builtins/time-complexity.po +++ b/builtins/time-complexity.po @@ -5,12 +5,13 @@ # # Translators: # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-19 20:08+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: none\n" @@ -157,17 +158,20 @@ msgstr "``min(t)``, ``max(t)``" msgid "Get length (``len(t)``) [5]_" msgstr "دریافت طول (``len(t)``) [5]_" -msgid ":class:`!dict`" -msgstr ":class:`!dict`" +msgid ":class:`!dict`, :class:`!frozendict`" +msgstr ":class:`!dict`, :class:`!frozendict`" msgid "The times listed for dict objects are average-case times, as they assume the hash function for the objects is sufficiently robust to make collisions uncommon. They also assume the keys are well-distributed among the set of possible keys. In the worst case, when every key hashes to the same value, each of the *O*\\ (1) operations below instead takes *O*\\ (*n*) time. They also assume that hashing and comparing a key is *O*\\ (1). For more detail on the implementation, see :ref:`how-are-dictionaries-implemented`." msgstr "زمان‌های فهرست‌شده برای شیء‌ها dict زمان‌های حالت‌میانگین هستند، زیرا آن‌ها فرض می‌کنند که تابع هش برای شیء‌ها به‌قدر کافی قوی است تا تصادفات را کم کند. آن‌ها همچنین فرض می‌کنند که کلیدها در میان مجموعه‌ی کلیدهای ممکن به‌خوبی توزیع شده‌اند. در بدترین حالت، وقتی هر کلید به یک مقدار هش می‌شود، هر یک از عملیات‌های *O*\\ (1) در زیر در عوض زمان *O*\\ (*n*) می‌طلبد. آن‌ها همچنین فرض می‌کنند که هش کردن و مقایسه یک کلید *O*\\ (1) است. برای جزئیات بیشتر در مورد پیاده‌سازی، به :ref:`how-are-dictionaries-implemented` مراجعه کنید." +msgid "A :class:`frozendict` is immutable, so it does not support setting, deleting, or updating items. The other operations below apply to it at the same costs." +msgstr "یک :class:`frozendict` تغییرناپذیر است، بنابراین تنظیم، حذف یا به‌روزرسانی آیتم‌ها را پشتیبانی نمی‌کند. سایر عملیات زیر با همان هزینه‌ها روی آن اعمال می‌شوند." + msgid "``key in d``" msgstr "``key in d``" -msgid "Copy (``d.copy()``) [7]_" -msgstr "کپی (``d.copy()``) [7]_" +msgid "Copy (``d.copy()``) [6]_ [7]_" +msgstr "کپی (``d.copy()``) [6]_ [7]_" msgid "Get item (``d[key]``, ``d.get(key)``)" msgstr "دریافت آیتم (``d[key]``, ``d.get(key)``)" @@ -349,8 +353,8 @@ msgstr "این بدترین حالت است. مرتب‌سازی سازگار ا msgid "The number of elements is stored in the object, so ``len()`` does not need to count them." msgstr "تعداد المان‌ها در شیء ذخیره شده است، بنابراین ``len()`` نیازی به شمارش آن‌ها ندارد." -msgid "Copying a :class:`frozenset` is *O*\\ (1) as it returns the original object." -msgstr "کپی کردن یک :class:`frozenset` از مرتبه *O*\\ (1) است، زیرا شیء اصلی را برمی‌گرداند." +msgid "Copying a :class:`frozendict` or a :class:`frozenset` is *O*\\ (1) as it returns the original object." +msgstr "کپی کردن یک :class:`frozendict` یا :class:`frozenset` از مرتبه‌ی *O*\\ (1) است؛ زیرا شیء اصلی را برمی‌گرداند." msgid "These operations scan the container's internal hash table, which is not shrunk when elements are removed. After removing most elements, they still take time proportional to the container's former size, until a later insertion triggers a resize." msgstr "این عملیات‌ها جدول هش داخلی ظرف را اسکن می‌کنند، که وقتی المان‌ها حذف می‌شوند کوچک نمی‌شود. پس از حذف اکثر المان‌ها، آن‌ها همچنان زمان متناسب با اندازه‌ی قبلی ظرف را می‌طلبد، تا زمانی که یک درج بعدی باعث تغییر اندازه شود." @@ -378,3 +382,9 @@ msgstr "این‌ها هر المان را به‌صورت جداگانه باز msgid "Assuming :class:`int` or :class:`bool` arguments. For other types, the range is searched like any other sequence in *O*\\ (*n*) time." msgstr "با فرض آرگومان‌های :class:`int` یا :class:`bool`. برای سایر نوع‌ها، محدوده مانند هر دنباله‌ی دیگر در زمان *O*\\ (*n*) جستجو می‌شود." + +#~ msgid ":class:`!dict`" +#~ msgstr ":class:`!dict`" + +#~ msgid "Copy (``d.copy()``) [7]_" +#~ msgstr "کپی (``d.copy()``) [7]_" diff --git a/c-api/apiabiversion.po b/c-api/apiabiversion.po index 1d611f97..3c5bc58a 100644 --- a/c-api/apiabiversion.po +++ b/c-api/apiabiversion.po @@ -11,12 +11,13 @@ # Revisto , 2025 # Sepehr Rasouli , 2026 # invincible627 , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-17 13:34+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 08:26+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -51,6 +52,9 @@ msgstr "``1`` در ``3.4.1a2``." msgid "The ``a`` in ``3.4.1a2``. This can be ``0xA`` for alpha, ``0xB`` for beta, ``0xC`` for release candidate or ``0xF`` for final." msgstr "``a`` در ``3.4.1a2``. این می‌تواند ``0xA`` برای آلفا باشد، ``0xB`` برای بتا، ``0xC`` برای کاندیدای انتشار (release candidate) یا ``0xF`` برای نهایی (final)." +msgid "For completeness, the values are available as macros: :c:macro:`!PY_RELEASE_LEVEL_ALPHA` (``0xA``), :c:macro:`!PY_RELEASE_LEVEL_BETA` (``0xB``), :c:macro:`!PY_RELEASE_LEVEL_GAMMA` (``0xC``), and :c:macro:`!PY_RELEASE_LEVEL_FINAL` (``0xF``)." +msgstr "برای کامل بودن، مقادیر به صورت ماکروهای زیر در دسترس هستند: :c:macro:`!PY_RELEASE_LEVEL_ALPHA` (``0xA``)، :c:macro:`!PY_RELEASE_LEVEL_BETA` (``0xB``)، :c:macro:`!PY_RELEASE_LEVEL_GAMMA` (``0xC``) و :c:macro:`!PY_RELEASE_LEVEL_FINAL` (``0xF``)." + msgid "The ``2`` in ``3.4.1a2``. Zero for final releases." msgstr "``2`` در ``3.4.1a2``. برای انتشارهای نهایی، صفر است." @@ -60,6 +64,9 @@ msgstr "شماره‌ی نسخه‌ی پایتون که در یک عدد صحی msgid "Use this for numeric comparisons, for example, ``#if PY_VERSION_HEX >= ...``." msgstr "از این (مقدار) برای مقایسه‌های عددی استفاده کنید، برای مثال، ``#if PY_VERSION_HEX >= ...``." +msgid "The Python version as a string, for example, ``\"3.4.1a2\"``." +msgstr "نسخه‌ی پایتون به صورت یک رشته، برای مثال ``\"3.4.1a2\"``." + msgid "These macros are defined in :source:`Include/patchlevel.h`." msgstr "این ماکروها در :source:`Include/patchlevel.h` تعریف می‌شوند." diff --git a/c-api/arg.po b/c-api/arg.po index c6980d78..725499db 100644 --- a/c-api/arg.po +++ b/c-api/arg.po @@ -9,12 +9,13 @@ # navid BH, 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 00:47+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -210,8 +211,8 @@ msgstr "اعداد" msgid "These formats allow representing Python numbers or single characters as C numbers. Formats that require :class:`int`, :class:`float` or :class:`complex` can also use the corresponding special methods :meth:`~object.__index__`, :meth:`~object.__float__` or :meth:`~object.__complex__` to convert the Python object to the required type." msgstr "این قالب‌ها اجازه می‌دهند اعداد پایتون یا نویسه‌های تکی به‌صورت اعداد C نمایش داده شوند. قالب‌هایی که به :class:`int`، :class:`float` یا :class:`complex` نیاز دارند، می‌توانند برای تبدیل شیء پایتون به نوع موردنیاز از متدهای ویژه‌ی متناظر :meth:`~object.__index__`، :meth:`~object.__float__` یا :meth:`~object.__complex__` نیز استفاده کنند." -msgid "For signed integer formats, :exc:`OverflowError` is raised if the value is out of range for the C type. For unsigned integer formats, no range checking is done --- the most significant bits are silently truncated when the receiving field is too small to receive the value." -msgstr "برای قالب‌های عدد صحیح علامت‌دار، اگر مقدار خارج از محدوده نوع C باشد، :exc:`OverflowError` مطرح می‌شود. برای قالب‌های عدد صحیح بدون علامت، هیچ بررسی محدوده‌ای انجام نمی‌شود --- وقتی فیلد دریافت‌کننده برای دریافت مقدار بیش از حد کوچک باشد، بیت‌های پرارزش بدون هیچ هشداری بریده می‌شوند." +msgid "For signed integer formats, :exc:`OverflowError` is raised if the value is out of range for the C type. For unsigned integer formats, the most significant bits are silently truncated when the receiving field is too small to receive the value, and :exc:`DeprecationWarning` is emitted when the value is larger than the maximal value for the C type or less than the minimal value for the corresponding signed integer type of the same size." +msgstr "برای قالب‌های عدد صحیح علامت‌دار، اگر مقدار خارج از بازه‌ی مجاز برای نوع C باشد، :exc:`OverflowError` بالا آورده می‌شود. برای قالب‌های عدد صحیح بدون علامت، زمانی که فیلد دریافت‌کننده برای دریافت مقدار خیلی کوچک باشد، بیت‌های با ارزش‌تر به طور بی‌صدا قطع می‌شوند و زمانی که مقدار از حداکثر مقدار برای نوع C بزرگ‌تر یا از حداقل مقدار برای نوع عدد صحیح علامت‌دار متناظر با همان اندازه کوچک‌تر باشد، :exc:`DeprecationWarning` صادر می‌شود." msgid "``b`` (:class:`int`) [unsigned char]" msgstr "``b`` (:class:`int`) [unsigned char]" @@ -222,8 +223,8 @@ msgstr "یک عدد صحیح نامنفی پایتون را به یک عدد ص msgid "``B`` (:class:`int`) [unsigned char]" msgstr "``B`` (:class:`int`) [unsigned char]" -msgid "Convert a Python integer to a tiny integer without overflow checking, stored in a C :c:expr:`unsigned char`." -msgstr "یک عدد صحیح پایتون را بدون بررسی سرریز به یک عدد صحیح کوچک تبدیل می‌کند که در یک :c:expr:`unsigned char` از C ذخیره می‌شود." +msgid "Convert a Python integer to a tiny integer without overflow checking, stored in a C :c:expr:`unsigned char`. Convert a Python integer to a C :c:expr:`unsigned char`." +msgstr "یک عدد صحیح پایتون را بدون بررسی سرریز، به یک عدد صحیح بسیار کوچک ذخیره‌شده در یک :c:expr:`unsigned char` زبان C تبدیل کنید. یک عدد صحیح پایتون را به یک :c:expr:`unsigned char` زبان C تبدیل کنید." msgid "``h`` (:class:`int`) [short int]" msgstr "``h`` (:class:`int`) [short int]" @@ -234,8 +235,8 @@ msgstr "یک عدد صحیح پایتون را به :c:expr:`short int` در ز msgid "``H`` (:class:`int`) [unsigned short int]" msgstr "``H`` (:class:`int`) [unsigned short int]" -msgid "Convert a Python integer to a C :c:expr:`unsigned short int`, without overflow checking." -msgstr "یک عدد صحیح پایتون را بدون بررسی سرریز به یک :c:expr:`unsigned short int` در C تبدیل می‌کند." +msgid "Convert a Python integer to a C :c:expr:`unsigned short int`." +msgstr "یک عدد صحیح پایتون را به یک :c:expr:`unsigned short int` زبان C تبدیل کنید." msgid "``i`` (:class:`int`) [int]" msgstr "``i`` (:class:`int`) [int]" @@ -246,8 +247,8 @@ msgstr "یک عدد صحیح پایتون را به یک :c:expr:`int` ساده msgid "``I`` (:class:`int`) [unsigned int]" msgstr "``I`` (:class:`int`) [unsigned int]" -msgid "Convert a Python integer to a C :c:expr:`unsigned int`, without overflow checking." -msgstr "یک عدد صحیح پایتون را به :c:expr:`unsigned int` در C تبدیل می‌کند، بدون بررسی سرریز." +msgid "Convert a Python integer to a C :c:expr:`unsigned int`." +msgstr "یک عدد صحیح پایتون را به یک :c:expr:`unsigned int` زبان C تبدیل کنید." msgid "``l`` (:class:`int`) [long int]" msgstr "``l`` (:class:`int`) [long int]" @@ -258,8 +259,8 @@ msgstr "یک عدد صحیح پایتون را به یک :c:expr:`long int` در msgid "``k`` (:class:`int`) [unsigned long]" msgstr "``k`` (:class:`int`) [unsigned long]" -msgid "Convert a Python integer to a C :c:expr:`unsigned long` without overflow checking." -msgstr "یک عدد صحیح پایتون را بدون بررسی سرریز به یک :c:expr:`unsigned long` در C تبدیل می‌کند." +msgid "Convert a Python integer to a C :c:expr:`unsigned long`." +msgstr "یک عدد صحیح پایتون را به یک :c:expr:`unsigned long` زبان C تبدیل کنید." msgid "Use :meth:`~object.__index__` if available." msgstr "در صورت وجود، از :meth:`~object.__index__` استفاده کنید." @@ -273,8 +274,8 @@ msgstr "تبدیل یک عدد صحیح پایتون به یک :c:expr:`long lon msgid "``K`` (:class:`int`) [unsigned long long]" msgstr "``K`` (:class:`int`) [unsigned long long]" -msgid "Convert a Python integer to a C :c:expr:`unsigned long long` without overflow checking." -msgstr "یک عدد صحیح پایتون را بدون بررسی سرریز به یک :c:expr:`unsigned long long` در C تبدیل می‌کند." +msgid "Convert a Python integer to a C :c:expr:`unsigned long long`." +msgstr "یک عدد صحیح پایتون را به یک :c:expr:`unsigned long long` زبان C تبدیل کنید." msgid "``n`` (:class:`int`) [:c:type:`Py_ssize_t`]" msgstr "``n`` (:class:`int`) [:c:type:`Py_ssize_t`]" @@ -315,6 +316,9 @@ msgstr "``D`` (:class:`complex`) [Py_complex]" msgid "Convert a Python complex number to a C :c:type:`Py_complex` structure." msgstr "یک عدد مختلط پایتون را به ساختار :c:type:`Py_complex` زبان C تبدیل می‌کند." +msgid "For unsigned integer formats ``B``, ``H``, ``I``, ``k`` and ``K``, :exc:`DeprecationWarning` is emitted when the value is larger than the maximal value for the C type or less than the minimal value for the corresponding signed integer type of the same size." +msgstr "برای قالب‌های عدد صحیح بدون علامت ``B``، ``H``، ``I``، ``k`` و ``K``، هنگامی که مقدار بزرگ‌تر از حداکثر مقدار برای نوع C یا کوچک‌تر از حداقل مقدار برای نوع عدد صحیح علامت‌دار متناظر با همان اندازه باشد، اخطار :exc:`DeprecationWarning` صادر می‌شود." + msgid "Other objects" msgstr "سایر اشیاء" @@ -464,6 +468,12 @@ msgstr "" " // ... use value ...\n" "}" +msgid "Parse the parameters of a function that takes only array parameters into local variables (that is, a function using the :c:macro:`METH_FASTCALL` calling convention). Returns true on success; on failure, it returns false and raises the appropriate exception." +msgstr "پارامترهای تابعی که تنها پارامترهای آرایه‌ای می‌پذیرد را به متغیرهای محلی تجزیه کنید (یعنی تابعی که از قرارداد فراخوانی :c:macro:`METH_FASTCALL` استفاده می‌کند). در صورت موفقیت، مقدار true را برمی‌گرداند؛ در صورت شکست، false را برگردانده و استثنای مناسب را بالا می‌آورد." + +msgid "Parse the parameters of a function that takes both array and keyword parameters into local variables (that is, a function using the :c:macro:`METH_FASTCALL` ``|`` :c:macro:`METH_KEYWORDS` calling convention). Returns true on success; on failure, it returns false and raises the appropriate exception." +msgstr "پارامترهای تابعی که هم پارامترهای آرایه‌ای و هم کلیدواژه‌ای می‌پذیرد را به متغیرهای محلی تجزیه کنید (یعنی تابعی که از قرارداد فراخوانی :c:macro:`METH_FASTCALL` ``|`` :c:macro:`METH_KEYWORDS` استفاده می‌کند). در صورت موفقیت، مقدار true را برمی‌گرداند؛ در صورت شکست، false را برگردانده و استثنای مناسب را بالا می‌آورد." + msgid "A simpler form of parameter retrieval which does not use a format string to specify the types of the arguments. Functions which use this method to retrieve their parameters should be declared as :c:macro:`METH_VARARGS` in function or method tables. The tuple containing the actual parameters should be passed as *args*; it must actually be a tuple. The length of the tuple must be at least *min* and no more than *max*; *min* and *max* may be equal. Additional arguments must be passed to the function, each of which should be a pointer to a :c:expr:`PyObject*` variable; these will be filled in with the values from *args*; they will contain :term:`borrowed references `. The variables which correspond to optional parameters not given by *args* will not be filled in; these should be initialized by the caller. This function returns true on success and false if *args* is not a tuple or contains the wrong number of elements; an exception will be set if there was a failure." msgstr "شکل ساده‌تری از بازیابی پارامتر که برای تعیین نوع آرگومان‌ها از رشته قالب استفاده نمی‌کند. توابعی که از این روش برای بازیابی پارامترهای خود استفاده می‌کنند باید در جدول‌های تابع یا متد به‌صورت :c:macro:`METH_VARARGS` اعلان شوند. تاپل حاوی پارامترهای واقعی باید به‌عنوان *args* ارسال شود؛ واقعاً باید یک تاپل باشد. طول تاپل باید حداقل *min* و حداکثر *max* باشد؛ *min* و *max* می‌توانند برابر باشند. آرگومان‌های اضافی باید به تابع ارسال شوند که هر یک باید اشاره‌گری به متغیر :c:expr:`PyObject*` باشد؛ این‌ها با مقادیر *args* پر خواهند شد؛ آن‌ها حاوی :term:`ارجاع‌های امانتی ` خواهند بود. متغیرهای متناظر با پارامترهای اختیاری که توسط *args* داده نشده‌اند، پر نخواهند شد؛ این متغیرها باید توسط فراخواننده مقداردهی اولیه شوند. این تابع در صورت موفقیت true برمی‌گرداند و اگر *args* یک تاپل نباشد یا تعداد عناصر نادرستی داشته باشد false برمی‌گرداند؛ در صورت شکست، یک استثنا تنظیم خواهد شد." @@ -682,3 +692,15 @@ msgstr "اگر خطایی در رشته قالب‌بندی وجود داشته msgid "Identical to :c:func:`Py_BuildValue`, except that it accepts a va_list rather than a variable number of arguments." msgstr "یکسان با :c:func:`Py_BuildValue` است، با این تفاوت که به جای تعداد متغیری از آرگومان‌ها، یک va_list می‌پذیرد." + +#~ msgid "Convert a Python integer to a C :c:expr:`unsigned short int`, without overflow checking." +#~ msgstr "یک عدد صحیح پایتون را بدون بررسی سرریز به یک :c:expr:`unsigned short int` در C تبدیل می‌کند." + +#~ msgid "Convert a Python integer to a C :c:expr:`unsigned int`, without overflow checking." +#~ msgstr "یک عدد صحیح پایتون را به :c:expr:`unsigned int` در C تبدیل می‌کند، بدون بررسی سرریز." + +#~ msgid "Convert a Python integer to a C :c:expr:`unsigned long` without overflow checking." +#~ msgstr "یک عدد صحیح پایتون را بدون بررسی سرریز به یک :c:expr:`unsigned long` در C تبدیل می‌کند." + +#~ msgid "Convert a Python integer to a C :c:expr:`unsigned long long` without overflow checking." +#~ msgstr "یک عدد صحیح پایتون را بدون بررسی سرریز به یک :c:expr:`unsigned long long` در C تبدیل می‌کند." diff --git a/c-api/buffer.po b/c-api/buffer.po index 8a6d1cfb..7c568560 100644 --- a/c-api/buffer.po +++ b/c-api/buffer.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 13:23+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -405,8 +406,8 @@ msgstr "اگر حافظه‌ی تعریف‌شده توسط *view* به سبک C msgid "Get the memory area pointed to by the *indices* inside the given *view*. *indices* must point to an array of ``view->ndim`` indices." msgstr "به دست آوردن ناحیه حافظه‌ای درون *view* داده‌شده که *indices* به آن اشاره می‌کند. *indices* باید به آرایه‌ای از ``view->ndim`` اندیس اشاره کند." -msgid "Copy contiguous *len* bytes from *buf* to *view*. *fort* can be ``'C'`` or ``'F'`` (for C-style or Fortran-style ordering). ``0`` is returned on success, ``-1`` on error." -msgstr "*len* بایت پیوسته را از *buf* به *view* کپی می‌کند. *fort* می‌تواند ``'C'`` یا ``'F'`` باشد (برای ترتیب به سبک C یا به سبک فورترن). در صورت موفقیت ``0`` و در صورت خطا ``-1`` برگردانده می‌شود." +msgid "Copy contiguous *len* bytes from *buf* to *view*. *order* can be ``'C'`` or ``'F'`` or ``'A'`` (for C-style or Fortran-style ordering or either one). ``0`` is returned on success, ``-1`` on error." +msgstr "تعداد *len* بایت پیوسته را از *buf* به *view* کپی کنید. پارامتر *order* می‌تواند ``'C'``، ``'F'`` یا ``'A'`` باشد (به ترتیب برای ترتیب‌بندی سبک C، سبک فرترن یا هرکدام). در صورت موفقیت ``0`` و در صورت خطا ``-1`` برگردانده می‌شود." msgid "Copy *len* bytes from *src* to its contiguous representation in *buf*. *order* can be ``'C'`` or ``'F'`` or ``'A'`` (for C-style or Fortran-style ordering or either one). ``0`` is returned on success, ``-1`` on error." msgstr "*len* بایت از *src* را به نمایش پیوسته‌ی آن در *buf* کپی می‌کند. *order* می‌تواند ``'C'`` یا ``'F'`` یا ``'A'`` باشد (برای ترتیب به سبک C یا سبک Fortran یا هر یک از این دو). در صورت موفقیت ``0`` و در صورت خطا ``-1`` برگردانده می‌شود." diff --git a/c-api/bytes.po b/c-api/bytes.po index cb4b3163..b038241e 100644 --- a/c-api/bytes.po +++ b/c-api/bytes.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 13:25+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -51,6 +52,9 @@ msgstr "در صورت موفقیت، شیء بایت جدیدی را برمی‌ msgid "Return a new bytes object with a copy of the string *v* as value and length *len* on success, and ``NULL`` on failure. If *v* is ``NULL``, the contents of the bytes object are uninitialized." msgstr "در صورت موفقیت، شیء بایت جدیدی برمی‌گرداند که مقدار آن رونوشتی از رشته *v* و طول آن *len* است و در صورت شکست ``NULL`` برمی‌گرداند. اگر *v* برابر ``NULL`` باشد، محتویات شیء بایت مقداردهی‌نشده هستند." +msgid "Use the :c:type:`PyBytesWriter` API instead of ``PyBytes_FromStringAndSize(NULL, len)``." +msgstr "به جای ``PyBytes_FromStringAndSize(NULL, len)`` از API مربوط به :c:type:`PyBytesWriter` استفاده کنید." + msgid "Take a C :c:func:`printf`\\ -style *format* string and a variable number of arguments, calculate the size of the resulting Python bytes object and return a bytes object with the values formatted into it. The variable arguments must be C types and must correspond exactly to the format characters in the *format* string. The following format characters are allowed:" msgstr "یک رشته‌ی *format* به سبک :c:func:`printf`\\ در C و تعداد متغیری از آرگومان‌ها می‌گیرد، اندازه‌ی شیء bytes پایتون که حاصل می‌شود را محاسبه می‌کند و یک شیء bytes که مقادیر در آن قالب‌بندی شده‌اند برمی‌گرداند. آرگومان‌های متغیر باید از نوع‌های C باشند و باید دقیقاً با نویسه‌های قالب در رشته‌ی *format* مطابقت داشته باشند. نویسه‌های قالب زیر مجاز هستند:" @@ -228,6 +232,9 @@ msgstr "اگر اشیاء *iterable* پروتکل بافر را پیاده‌س msgid "Resize a bytes object. *newsize* will be the new length of the bytes object. You can think of it as creating a new bytes object and destroying the old one, only more efficiently. Pass the address of an existing bytes object as an lvalue (it may be written into), and the new size desired. On success, *\\*bytes* holds the resized bytes object and ``0`` is returned; the address in *\\*bytes* may differ from its input value. If the reallocation fails, the original bytes object at *\\*bytes* is deallocated, *\\*bytes* is set to ``NULL``, :exc:`MemoryError` is set, and ``-1`` is returned." msgstr "اندازه یک شیء بایت را تغییر می‌دهد. *newsize* طول جدید شیء بایت خواهد بود. می‌توانید آن را به‌صورت ایجاد یک شیء بایت جدید و نابود کردن شیء قدیمی تصور کنید، فقط با کارایی بیشتر. آدرس یک شیء بایت موجود را به‌عنوان یک چپ‌مقدار (lvalue) (که ممکن است در آن نوشته شود) به همراه اندازه جدید موردنظر ارسال کنید. در صورت موفقیت، *\\*bytes* حاوی شیء بایت با اندازه جدید است و ``0`` بازگردانده می‌شود؛ آدرس موجود در *\\*bytes* ممکن است با مقدار ورودی آن متفاوت باشد. اگر تخصیص مجدد شکست بخورد، شیء بایت اصلی موجود در *\\*bytes* آزاد می‌شود، *\\*bytes* برابر ``NULL`` قرار می‌گیرد، :exc:`MemoryError` تنظیم می‌شود و ``-1`` بازگردانده می‌شود." +msgid "Use the :c:type:`PyBytesWriter` API instead." +msgstr "به جای آن از API مربوط به :c:type:`PyBytesWriter` استفاده کنید." + msgid "Get the string representation of *bytes*. This function is currently used to implement :meth:`!bytes.__repr__` in Python." msgstr "بازنمایی رشته‌ای *bytes* را برمی‌گرداند. این تابع در حال حاضر برای پیاده‌سازی :meth:`!bytes.__repr__` در پایتون استفاده می‌شود." @@ -252,6 +259,143 @@ msgstr "در صورت موفقیت، این تابع یک :term:`ارجاع قو msgid "*unicode* and *recode_encoding* are now unused." msgstr "*unicode* و *recode_encoding* اکنون استفاده نمی‌شوند." +msgid "PyBytesWriter" +msgstr "PyBytesWriter" + +msgid "The :c:type:`PyBytesWriter` API can be used to create a Python :class:`bytes` object." +msgstr "رابط برمکی (API) نوع :c:type:`PyBytesWriter` را می‌توان برای ایجاد یک شیء :class:`bytes` در پایتون استفاده کرد." + +msgid "A bytes writer instance." +msgstr "یک نمونه‌ی نویسنده‌ی بایت (bytes writer)." + +msgid "The API is **not thread safe**: a writer should only be used by a single thread at the same time." +msgstr "این API **ایمن در برابر نخ (thread-safe) نیست**: یک نویسنده باید در هر لحظه تنها توسط یک نخ استفاده شود." + +msgid "The instance must be destroyed by :c:func:`PyBytesWriter_Finish` on success, or :c:func:`PyBytesWriter_Discard` on error." +msgstr "نمونه باید در صورت موفقیت توسط :c:func:`PyBytesWriter_Finish` و در صورت بروز خطا توسط :c:func:`PyBytesWriter_Discard` نابود شود." + +msgid "Create, Finish, Discard" +msgstr "Create, Finish, Discard" + +msgid "Create a :c:type:`PyBytesWriter` to write *size* bytes." +msgstr "ایجاد یک :c:type:`PyBytesWriter` برای نوشتن *size* بایت." + +msgid "If *size* is greater than zero, allocate *size* bytes, and set the writer size to *size*. The caller is responsible to write *size* bytes using :c:func:`PyBytesWriter_GetData`. This function does not overallocate." +msgstr "اگر *size* بزرگ‌تر از صفر باشد، *size* بایت تخصیص دهید و اندازه‌ی نویسنده را روی *size* تنظیم کنید. فراخواننده مسئول نوشتن *size* بایت با استفاده از :c:func:`PyBytesWriter_GetData` است. این تابع تخصیص بیش از حد (overallocate) انجام نمی‌دهد." + +msgid "On error, set an exception and return ``NULL``." +msgstr "در صورت بروز خطا، یک استثنا تنظیم کرده و ``NULL`` را برگردانید." + +msgid "*size* must be positive or zero." +msgstr "*size* باید مثبت یا صفر باشد." + +msgid "Finish a :c:type:`PyBytesWriter` created by :c:func:`PyBytesWriter_Create`." +msgstr "پایان دادن به یک :c:type:`PyBytesWriter` که توسط :c:func:`PyBytesWriter_Create` ایجاد شده است." + +msgid "On success, return a Python :class:`bytes` object. On error, set an exception and return ``NULL``." +msgstr "در صورت موفقیت، یک شیء :class:`bytes` پایتون را برمی‌گرداند. در صورت بروز خطا، یک استثنا تنظیم کرده و ``NULL`` را برگردانید." + +msgid "The writer instance is invalid after the call in any case. No API can be called on the writer after :c:func:`PyBytesWriter_Finish`." +msgstr "نمونه‌ی نویسنده در هر صورت پس از این فراخوانی نامعتبر می‌شود. پس از :c:func:`PyBytesWriter_Finish` هیچ API روی نویسنده قابل فراخوانی نیست." + +msgid "Similar to :c:func:`PyBytesWriter_Finish`, but resize the writer to *size* bytes before creating the :class:`bytes` object." +msgstr "مشابه :c:func:`PyBytesWriter_Finish`، اما پیش از ایجاد شیء :class:`bytes`، اندازه‌ی نویسنده را به *size* بایت تغییر دهید." + +msgid "Similar to :c:func:`PyBytesWriter_Finish`, but resize the writer using *buf* pointer before creating the :class:`bytes` object." +msgstr "مشابه :c:func:`PyBytesWriter_Finish`، اما پیش از ایجاد شیء :class:`bytes`، اندازه‌ی نویسنده را با استفاده از اشاره‌گر *buf* تغییر دهید." + +msgid "Set an exception and return ``NULL`` if *buf* pointer is outside the internal buffer bounds." +msgstr "اگر اشاره‌گر *buf* خارج از کران‌های بافر داخلی باشد، یک استثنا تنظیم کرده و ``NULL`` را برگردانید." + +msgid "Function pseudo-code::" +msgstr "کد شبه تابع (pseudo-code)::" + +msgid "" +"Py_ssize_t size = (char*)buf - (char*)PyBytesWriter_GetData(writer);\n" +"return PyBytesWriter_FinishWithSize(writer, size);" +msgstr "" +"Py_ssize_t size = (char*)buf - (char*)PyBytesWriter_GetData(writer);\n" +"return PyBytesWriter_FinishWithSize(writer, size);" + +msgid "Discard a :c:type:`PyBytesWriter` created by :c:func:`PyBytesWriter_Create`." +msgstr "دور انداختن یک :c:type:`PyBytesWriter` که توسط :c:func:`PyBytesWriter_Create` ایجاد شده است." + +msgid "Do nothing if *writer* is ``NULL``." +msgstr "اگر *writer* برابر با ``NULL`` باشد، هیچ کاری انجام ندهید." + +msgid "The writer instance is invalid after the call. No API can be called on the writer after :c:func:`PyBytesWriter_Discard`." +msgstr "نمونه‌ی نویسنده پس از این فراخوانی نامعتبر می‌شود. پس از :c:func:`PyBytesWriter_Discard` هیچ API روی نویسنده قابل فراخوانی نیست." + +msgid "High-level API" +msgstr "API رده‌بالا" + +msgid "Grow the *writer* internal buffer by *size* bytes, write *size* bytes of *bytes* at the *writer* end, and add *size* to the *writer* size." +msgstr "بافر داخلی *writer* را به اندازه‌ی *size* بایت بزرگ کنید، *size* بایت از *bytes* را در انتهای *writer* بنویسید و *size* را به اندازه‌ی *writer* اضافه کنید." + +msgid "If *size* is equal to ``-1``, call ``strlen(bytes)`` to get the string length." +msgstr "اگر *size* برابر با ``-1`` باشد، برای به دست آوردن طول رشته ``strlen(bytes)`` را فراخوانی کنید." + +msgid "On success, return ``0``. On error, set an exception and return ``-1``." +msgstr "در صورت موفقیت، ``0`` را برمی‌گرداند. در صورت بروز خطا، یک استثنا تنظیم کرده و ``-1`` را برگردانید." + +msgid "Similar to :c:func:`PyBytes_FromFormat`, but write the output directly at the writer end. Grow the writer internal buffer on demand. Then add the written size to the writer size." +msgstr "مشابه :c:func:`PyBytes_FromFormat`، اما خروجی را مستقیماً در انتهای نویسنده می‌نویسد. بافر داخلی نویسنده را در صورت نیاز بزرگ کنید. سپس اندازه‌ی نوشته‌شده را به اندازه‌ی نویسنده اضافه کنید." + +msgid "Getters" +msgstr "getterها" + +msgid "Get the writer size." +msgstr "اندازه‌ی نویسنده را دریافت کنید." + +msgid "The function does not invalidate pointers returned by :c:func:`PyBytesWriter_GetData`." +msgstr "این تابع اشاره‌گرهای بازگردانده‌شده توسط :c:func:`PyBytesWriter_GetData` را نامعتبر نمی‌کند." + +msgid "The function cannot fail." +msgstr "این تابع نمی‌تواند با خطا مواجه شود." + +msgid "Get the writer data: start of the internal buffer." +msgstr "داده‌های نویسنده را دریافت کنید: شروع بافر داخلی." + +msgid "The pointer remains valid until a :c:type:`PyBytesWriter` function other than :c:func:`PyBytesWriter_GetData` or :c:func:`PyBytesWriter_GetSize` is called on *writer*." +msgstr "این اشاره‌گر تا زمانی که تابعی از :c:type:`PyBytesWriter` غیر از :c:func:`PyBytesWriter_GetData` یا :c:func:`PyBytesWriter_GetSize` روی *writer* فراخوانی شود، معتبر باقی می‌ماند." + +msgid "Low-level API" +msgstr "API سطح پایین" + +msgid "Resize the writer to *size* bytes. It can be used to enlarge or to shrink the writer. This function typically overallocates to achieve amortized performance when resizing multiple times." +msgstr "اندازه‌ی نویسنده را به *size* بایت تغییر دهید. از آن می‌توان برای بزرگ کردن یا کوچک کردن نویسنده استفاده کرد. این تابع معمولاً برای دستیابی به کارایی سرشکن‌شده هنگام تغییر اندازه‌ی مکرر، حافظه را بیشتر تخصیص می‌دهد." + +msgid "Newly allocated bytes are left uninitialized." +msgstr "بایت‌های تازه تخصیص‌یافته مقداردهی اولیه نمی‌شوند." + +msgid "Resize the writer by adding *grow* bytes to the current writer size. This function typically overallocates to achieve amortized performance when resizing multiple times." +msgstr "با اضافه کردن *grow* بایت به اندازه‌ی فعلی نویسنده، اندازه‌ی آن را تغییر دهید. این تابع معمولاً برای دستیابی به کارایی سرشکن‌شده هنگام تغییر اندازه‌ی مکرر، حافظه را بیشتر تخصیص می‌دهد." + +msgid "*size* can be negative to shrink the writer." +msgstr "برای کوچک کردن نویسنده، *size* می‌تواند منفی باشد." + +msgid "Similar to :c:func:`PyBytesWriter_Grow`, but update also the *buf* pointer." +msgstr "مشابه :c:func:`PyBytesWriter_Grow` است، اما اشاره‌گر *buf* را نیز به‌روزرسانی می‌کند." + +msgid "The *buf* pointer is moved if the internal buffer is moved in memory. The *buf* relative position within the internal buffer is left unchanged." +msgstr "اگر بافر داخلی در حافظه جابه‌جا شود، اشاره‌گر *buf* نیز جابه‌جا می‌شود. موقعیت نسبی *buf* در داخل بافر داخلی تغییر‌نکرده باقی می‌ماند." + +msgid "*buf* must not be ``NULL``." +msgstr "*buf* نباید ``NULL`` باشد." + +msgid "" +"Py_ssize_t pos = (char*)buf - (char*)PyBytesWriter_GetData(writer);\n" +"if (PyBytesWriter_Grow(writer, size) < 0) {\n" +" return NULL;\n" +"}\n" +"return (char*)PyBytesWriter_GetData(writer) + pos;" +msgstr "" +"Py_ssize_t pos = (char*)buf - (char*)PyBytesWriter_GetData(writer);\n" +"if (PyBytesWriter_Grow(writer, size) < 0) {\n" +" return NULL;\n" +"}\n" +"return (char*)PyBytesWriter_GetData(writer) + pos;" + msgid "object" msgstr "شیء" diff --git a/c-api/complex.po b/c-api/complex.po index 516438dc..d9c5f037 100644 --- a/c-api/complex.po +++ b/c-api/complex.po @@ -6,12 +6,13 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 00:48+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -24,17 +25,47 @@ msgstr "" msgid "Complex Number Objects" msgstr "اشیاء عدد مختلط" -msgid "Python's complex number objects are implemented as two distinct types when viewed from the C API: one is the Python object exposed to Python programs, and the other is a C structure which represents the actual complex number value. The API provides functions for working with both." -msgstr "اشیاء عدد مختلط پایتون از دید API زبان C به‌صورت دو نوع متمایز پیاده‌سازی شده‌اند: یکی شیء پایتونی است که در اختیار برنامه‌های پایتون قرار می‌گیرد، و دیگری ساختاری در C است که مقدار واقعی عدد مختلط را نمایندگی می‌کند. این API توابعی برای کار با هر دو فراهم می‌کند." +msgid "This subtype of :c:type:`PyObject` represents a Python complex number object." +msgstr "این زیرنوع از :c:type:`PyObject` نمایانگر یک شیء عدد مختلط پایتون است." -msgid "Complex Numbers as C Structures" -msgstr "اعداد مختلط به‌عنوان ساختارهای C" +msgid "The complex number value, using the C :c:type:`Py_complex` representation." +msgstr "مقدار عدد مختلط، با استفاده از نمایش :c:type:`Py_complex` در C." + +msgid "Use :c:func:`PyComplex_AsCComplex` and :c:func:`PyComplex_FromCComplex` to convert a Python complex number to/from the C :c:type:`Py_complex` representation." +msgstr "برای تبدیل یک عدد مختلط پایتون به/از نمایش C در :c:type:`Py_complex`، از :c:func:`PyComplex_AsCComplex` و :c:func:`PyComplex_FromCComplex` استفاده کنید." + +msgid "This instance of :c:type:`PyTypeObject` represents the Python complex number type. It is the same object as :class:`complex` in the Python layer." +msgstr "این نمونه از :c:type:`PyTypeObject` نوع عدد مختلط پایتون را نشان می‌دهد. این همان شیء :class:`complex` در لایه‌ی پایتون است." -msgid "Note that the functions which accept these structures as parameters and return them as results do so *by value* rather than dereferencing them through pointers. This is consistent throughout the API." -msgstr "توجه داشته باشید که توابعی که این ساختارها را به‌عنوان پارامتر می‌پذیرند و آن‌ها را به‌عنوان نتیجه برمی‌گردانند، این کار را *به‌صورت مقدار* انجام می‌دهند، نه با ارجاع‌زدایی (dereferencing) آن‌ها از طریق اشاره‌گرها. این موضوع در سراسر API یکسان است." +msgid "Return true if its argument is a :c:type:`PyComplexObject` or a subtype of :c:type:`PyComplexObject`. This function always succeeds." +msgstr "اگر آرگومان آن یک :c:type:`PyComplexObject` یا زیرنوعی از :c:type:`PyComplexObject` باشد، مقدار درست را برمی‌گرداند. این تابع همیشه موفق می‌شود." -msgid "The C structure which corresponds to the value portion of a Python complex number object. Most of the functions for dealing with complex number objects use structures of this type as input or output values, as appropriate." -msgstr "ساختار C که به بخش مقدارِ شیء عدد مختلط پایتون مربوط می‌شود. بیشتر توابعی که با اشیاء عدد مختلط سروکار دارند، بسته به مورد، از ساختارهایی از این نوع به‌عنوان مقادیر ورودی یا خروجی استفاده می‌کنند." +msgid "Return true if its argument is a :c:type:`PyComplexObject`, but not a subtype of :c:type:`PyComplexObject`. This function always succeeds." +msgstr "در صورتی که آرگومان آن یک :c:type:`PyComplexObject` باشد، اما زیرنوعی از :c:type:`PyComplexObject` نباشد، مقدار true را برمی‌گرداند. این تابع همیشه موفق می‌شود." + +msgid "Return a new :c:type:`PyComplexObject` object from *real* and *imag*. Return ``NULL`` with an exception set on error." +msgstr "یک شیء جدید :c:type:`PyComplexObject` از *real* و *imag* برمی‌گرداند. در صورت خطا، ``NULL`` به همراه یک استثنای تنظیم‌شده برمی‌گرداند." + +msgid "Return the real part of *op* as a C :c:expr:`double`." +msgstr "بخش حقیقی *op* را به‌صورت یک :c:expr:`double` در C برمی‌گرداند." + +msgid "If *op* is not a Python complex number object but has a :meth:`~object.__complex__` method, this method will first be called to convert *op* to a Python complex number object. If :meth:`!__complex__` is not defined then it falls back to call :c:func:`PyFloat_AsDouble` and returns its result." +msgstr "اگر *op* یک شیء عدد مختلط پایتون نباشد اما متد :meth:`~object.__complex__` را داشته باشد، این متد ابتدا برای تبدیل *op* به یک شیء عدد مختلط پایتون فراخوانی می‌شود. اگر :meth:`!__complex__` تعریف نشده باشد، به فراخوانی :c:func:`PyFloat_AsDouble` بازمی‌گردد و نتیجه‌ی آن را برمی‌گرداند." + +msgid "Upon failure, this method returns ``-1.0`` with an exception set, so one should call :c:func:`PyErr_Occurred` to check for errors." +msgstr "در صورت شکست، این متد ``-1.0`` را همراه با یک استثنای تنظیم‌شده برمی‌گرداند، بنابراین برای بررسی خطاها باید :c:func:`PyErr_Occurred` را فراخوانی کنید." + +msgid "Use :meth:`~object.__complex__` if available." +msgstr "در صورت وجود، از :meth:`~object.__complex__` استفاده کنید." + +msgid "Return the imaginary part of *op* as a C :c:expr:`double`." +msgstr "بخش موهومی *op* را به‌صورت یک :c:expr:`double` در C برمی‌گرداند." + +msgid "If *op* is not a Python complex number object but has a :meth:`~object.__complex__` method, this method will first be called to convert *op* to a Python complex number object. If :meth:`!__complex__` is not defined then it falls back to call :c:func:`PyFloat_AsDouble` and returns ``0.0`` on success." +msgstr "اگر *op* یک شیء عدد مختلط پایتون نباشد اما متد :meth:`~object.__complex__` را داشته باشد، این متد ابتدا برای تبدیل *op* به یک شیء عدد مختلط پایتون فراخوانی می‌شود. اگر :meth:`!__complex__` تعریف نشده باشد، به فراخوانی :c:func:`PyFloat_AsDouble` روی می‌آورد و در صورت موفقیت مقدار ``0.0`` را برمی‌گرداند." + +msgid "This C structure defines an export format for a Python complex number object." +msgstr "این ساختار C یک قالب صادرات (export) برای یک شیء عدد مختلط پایتون تعریف می‌کند." msgid "The structure is defined as::" msgstr "ساختار به صورت زیر تعریف می‌شود::" @@ -50,6 +81,30 @@ msgstr "" " double imag;\n" "} Py_complex;" +msgid "Create a new Python complex number object from a C :c:type:`Py_complex` value. Return ``NULL`` with an exception set on error." +msgstr "یک شیء عدد مختلط جدید پایتون را از یک مقدار :c:type:`Py_complex` در C ایجاد می‌کند. در صورت خطا، ``NULL`` به همراه یک استثنای تنظیم‌شده برگردانده می‌شود." + +msgid "Return the :c:type:`Py_complex` value of the complex number *op*." +msgstr "مقدار :c:type:`Py_complex` عدد مختلط *op* را برمی‌گرداند." + +msgid "If *op* is not a Python complex number object but has a :meth:`~object.__complex__` method, this method will first be called to convert *op* to a Python complex number object. If :meth:`!__complex__` is not defined then it falls back to :meth:`~object.__float__`. If :meth:`!__float__` is not defined then it falls back to :meth:`~object.__index__`." +msgstr "اگر *op* یک شیء عدد مختلط پایتون نباشد اما متد :meth:`~object.__complex__` را داشته باشد، این متد ابتدا فراخوانی می‌شود تا *op* را به یک شیء عدد مختلط پایتون تبدیل کند. اگر :meth:`!__complex__` تعریف‌نشده باشد، به جای آن از :meth:`~object.__float__` استفاده می‌شود. اگر :meth:`!__float__` تعریف‌نشده باشد، به جای آن از :meth:`~object.__index__` استفاده می‌شود." + +msgid "Upon failure, this method returns :c:type:`Py_complex` with :c:member:`~Py_complex.real` set to ``-1.0`` and with an exception set, so one should call :c:func:`PyErr_Occurred` to check for errors." +msgstr "در صورت شکست، این متد یک :c:type:`Py_complex` برمی‌گرداند که :c:member:`~Py_complex.real` آن روی ``-1.0`` تنظیم شده و یک استثنا نیز تنظیم شده است؛ بنابراین برای بررسی خطاها باید :c:func:`PyErr_Occurred` را فراخوانی کرد." + +msgid "Use :meth:`~object.__index__` if available." +msgstr "در صورت وجود، از :meth:`~object.__index__` استفاده کنید." + +msgid "Complex Numbers as C Structures" +msgstr "اعداد مختلط به‌عنوان ساختارهای C" + +msgid "The API also provides functions for working with complex numbers, using the :c:type:`Py_complex` representation. Note that the functions which accept these structures as parameters and return them as results do so *by value* rather than dereferencing them through pointers." +msgstr "این رابط برنامه‌نویسی (API) همچنین توابعی را برای کار با اعداد مختلط، با استفاده از نمایش :c:type:`Py_complex` فراهم می‌کند. توجه داشته باشید توابعی که این ساختارها را به عنوان پارامتر می‌پذیرند و آن‌ها را به عنوان نتیجه برمی‌گردانند، این کار را *به صورت مقداری* (by value) انجام می‌دهند و نه با رفع ارجاع آن‌ها از طریق اشاره‌گرها." + +msgid "Please note, that these functions are :term:`soft deprecated` since Python 3.15. Avoid using this API in a new code to do complex arithmetic: either use the :ref:`Number Protocol ` API or use native complex types, like :c:expr:`double complex`." +msgstr "لطفاً توجه داشته باشید که این توابع از نسخه‌ی 3.15 پایتون :term:`مشمول هشدار منسوخ‌شدگی ` هستند. از استفاده از این API در کدهای جدید برای انجام محاسبات مختلط خودداری کنید: یا از API :ref:`پروتکل اعداد ` استفاده کنید یا از انواع مختلط بومی مانند :c:expr:`double complex` بهره ببرید." + msgid "Return the sum of two complex numbers, using the C :c:type:`Py_complex` representation." msgstr "مجموع دو عدد مختلط را با استفاده از نمایش C :c:type:`Py_complex` برمی‌گرداند." @@ -77,59 +132,20 @@ msgstr "اگر *num* صفر باشد و *exp* عدد حقیقی مثبت نبا msgid "Set :c:data:`errno` to :c:macro:`!ERANGE` on overflows." msgstr "در صورت سرریز، :c:data:`errno` را برابر :c:macro:`!ERANGE` قرار می‌دهد." -msgid "Complex Numbers as Python Objects" -msgstr "اعداد مختلط به‌عنوان اشیاء پایتون" - -msgid "This subtype of :c:type:`PyObject` represents a Python complex number object." -msgstr "این زیرنوع از :c:type:`PyObject` نمایانگر یک شیء عدد مختلط پایتون است." - -msgid "This instance of :c:type:`PyTypeObject` represents the Python complex number type. It is the same object as :class:`complex` in the Python layer." -msgstr "این نمونه از :c:type:`PyTypeObject` نوع عدد مختلط پایتون را نشان می‌دهد. این همان شیء :class:`complex` در لایه‌ی پایتون است." - -msgid "Return true if its argument is a :c:type:`PyComplexObject` or a subtype of :c:type:`PyComplexObject`. This function always succeeds." -msgstr "اگر آرگومان آن یک :c:type:`PyComplexObject` یا زیرنوعی از :c:type:`PyComplexObject` باشد، مقدار درست را برمی‌گرداند. این تابع همیشه موفق می‌شود." - -msgid "Return true if its argument is a :c:type:`PyComplexObject`, but not a subtype of :c:type:`PyComplexObject`. This function always succeeds." -msgstr "در صورتی که آرگومان آن یک :c:type:`PyComplexObject` باشد، اما زیرنوعی از :c:type:`PyComplexObject` نباشد، مقدار true را برمی‌گرداند. این تابع همیشه موفق می‌شود." - -msgid "Create a new Python complex number object from a C :c:type:`Py_complex` value. Return ``NULL`` with an exception set on error." -msgstr "یک شیء عدد مختلط جدید پایتون را از یک مقدار :c:type:`Py_complex` در C ایجاد می‌کند. در صورت خطا، ``NULL`` به همراه یک استثنای تنظیم‌شده برگردانده می‌شود." - -msgid "Return a new :c:type:`PyComplexObject` object from *real* and *imag*. Return ``NULL`` with an exception set on error." -msgstr "یک شیء جدید :c:type:`PyComplexObject` از *real* و *imag* برمی‌گرداند. در صورت خطا، ``NULL`` به همراه یک استثنای تنظیم‌شده برمی‌گرداند." - -msgid "Return the real part of *op* as a C :c:expr:`double`." -msgstr "بخش حقیقی *op* را به‌صورت یک :c:expr:`double` در C برمی‌گرداند." - -msgid "If *op* is not a Python complex number object but has a :meth:`~object.__complex__` method, this method will first be called to convert *op* to a Python complex number object. If :meth:`!__complex__` is not defined then it falls back to call :c:func:`PyFloat_AsDouble` and returns its result." -msgstr "اگر *op* یک شیء عدد مختلط پایتون نباشد اما متد :meth:`~object.__complex__` را داشته باشد، این متد ابتدا برای تبدیل *op* به یک شیء عدد مختلط پایتون فراخوانی می‌شود. اگر :meth:`!__complex__` تعریف نشده باشد، به فراخوانی :c:func:`PyFloat_AsDouble` بازمی‌گردد و نتیجه‌ی آن را برمی‌گرداند." - -msgid "Upon failure, this method returns ``-1.0`` with an exception set, so one should call :c:func:`PyErr_Occurred` to check for errors." -msgstr "در صورت شکست، این متد ``-1.0`` را همراه با یک استثنای تنظیم‌شده برمی‌گرداند، بنابراین برای بررسی خطاها باید :c:func:`PyErr_Occurred` را فراخوانی کنید." - -msgid "Use :meth:`~object.__complex__` if available." -msgstr "در صورت وجود، از :meth:`~object.__complex__` استفاده کنید." - -msgid "Return the imaginary part of *op* as a C :c:expr:`double`." -msgstr "بخش موهومی *op* را به‌صورت یک :c:expr:`double` در C برمی‌گرداند." - -msgid "If *op* is not a Python complex number object but has a :meth:`~object.__complex__` method, this method will first be called to convert *op* to a Python complex number object. If :meth:`!__complex__` is not defined then it falls back to call :c:func:`PyFloat_AsDouble` and returns ``0.0`` on success." -msgstr "اگر *op* یک شیء عدد مختلط پایتون نباشد اما متد :meth:`~object.__complex__` را داشته باشد، این متد ابتدا برای تبدیل *op* به یک شیء عدد مختلط پایتون فراخوانی می‌شود. اگر :meth:`!__complex__` تعریف نشده باشد، به فراخوانی :c:func:`PyFloat_AsDouble` روی می‌آورد و در صورت موفقیت مقدار ``0.0`` را برمی‌گرداند." - -msgid "Return the :c:type:`Py_complex` value of the complex number *op*." -msgstr "مقدار :c:type:`Py_complex` عدد مختلط *op* را برمی‌گرداند." - -msgid "If *op* is not a Python complex number object but has a :meth:`~object.__complex__` method, this method will first be called to convert *op* to a Python complex number object. If :meth:`!__complex__` is not defined then it falls back to :meth:`~object.__float__`. If :meth:`!__float__` is not defined then it falls back to :meth:`~object.__index__`." -msgstr "اگر *op* یک شیء عدد مختلط پایتون نباشد اما متد :meth:`~object.__complex__` را داشته باشد، این متد ابتدا فراخوانی می‌شود تا *op* را به یک شیء عدد مختلط پایتون تبدیل کند. اگر :meth:`!__complex__` تعریف‌نشده باشد، به جای آن از :meth:`~object.__float__` استفاده می‌شود. اگر :meth:`!__float__` تعریف‌نشده باشد، به جای آن از :meth:`~object.__index__` استفاده می‌شود." - -msgid "Upon failure, this method returns :c:type:`Py_complex` with :c:member:`~Py_complex.real` set to ``-1.0`` and with an exception set, so one should call :c:func:`PyErr_Occurred` to check for errors." -msgstr "در صورت شکست، این متد یک :c:type:`Py_complex` برمی‌گرداند که :c:member:`~Py_complex.real` آن روی ``-1.0`` تنظیم شده و یک استثنا نیز تنظیم شده است؛ بنابراین برای بررسی خطاها باید :c:func:`PyErr_Occurred` را فراخوانی کرد." - -msgid "Use :meth:`~object.__index__` if available." -msgstr "در صورت وجود، از :meth:`~object.__index__` استفاده کنید." +msgid "Return the absolute value of the complex number *num*." +msgstr "مقدار مطلق عدد مختلط *num* را برمی‌گرداند." msgid "object" msgstr "شیء" msgid "complex number" msgstr "عدد مختلط" + +#~ msgid "Python's complex number objects are implemented as two distinct types when viewed from the C API: one is the Python object exposed to Python programs, and the other is a C structure which represents the actual complex number value. The API provides functions for working with both." +#~ msgstr "اشیاء عدد مختلط پایتون از دید API زبان C به‌صورت دو نوع متمایز پیاده‌سازی شده‌اند: یکی شیء پایتونی است که در اختیار برنامه‌های پایتون قرار می‌گیرد، و دیگری ساختاری در C است که مقدار واقعی عدد مختلط را نمایندگی می‌کند. این API توابعی برای کار با هر دو فراهم می‌کند." + +#~ msgid "The C structure which corresponds to the value portion of a Python complex number object. Most of the functions for dealing with complex number objects use structures of this type as input or output values, as appropriate." +#~ msgstr "ساختار C که به بخش مقدارِ شیء عدد مختلط پایتون مربوط می‌شود. بیشتر توابعی که با اشیاء عدد مختلط سروکار دارند، بسته به مورد، از ساختارهایی از این نوع به‌عنوان مقادیر ورودی یا خروجی استفاده می‌کنند." + +#~ msgid "Complex Numbers as Python Objects" +#~ msgstr "اعداد مختلط به‌عنوان اشیاء پایتون" diff --git a/c-api/conversion.po b/c-api/conversion.po index 06753934..aec3d06e 100644 --- a/c-api/conversion.po +++ b/c-api/conversion.po @@ -6,12 +6,13 @@ # Translators: # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 00:48+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -84,8 +85,8 @@ msgstr "اگر ``endptr`` برابر ``NULL`` باشد، کل رشته تبدی msgid "If endptr is not ``NULL``, convert as much of the string as possible and set ``*endptr`` to point to the first unconverted character. If no initial segment of the string is the valid representation of a floating-point number, set ``*endptr`` to point to the beginning of the string, raise ValueError, and return ``-1.0``." msgstr "اگر endptr برابر ``NULL`` نباشد، تا حد امکان رشته را تبدیل می‌کند و ``*endptr`` را طوری تنظیم می‌کند که به نخستین نویسه‌ی تبدیل‌نشده اشاره کند. اگر هیچ بخش آغازینی از رشته، نمای معتبر یک عدد ممیز شناور نباشد، ``*endptr`` را طوری تنظیم می‌کند که به ابتدای رشته اشاره کند، استثنای ValueError ایجاد می‌کند و ``-1.0`` را برمی‌گرداند." -msgid "If ``s`` represents a value that is too large to store in a float (for example, ``\"1e500\"`` is such a string on many platforms) then if ``overflow_exception`` is ``NULL`` return ``Py_INFINITY`` (with an appropriate sign) and don't set any exception. Otherwise, ``overflow_exception`` must point to a Python exception object; raise that exception and return ``-1.0``. In both cases, set ``*endptr`` to point to the first character after the converted value." -msgstr "اگر ``s`` مقداری را بازنمایی کند که برای ذخیره‌سازی در یک عدد اعشاری بیش از حد بزرگ است (برای مثال، ``\"1e500\"`` در بسیاری از پلتفرم‌ها چنین رشته‌ای است)، آنگاه اگر ``overflow_exception`` برابر ``NULL`` باشد، ``Py_INFINITY`` را (با علامت مناسب) بازگردانید و هیچ استثنایی تنظیم نکنید. در غیر این صورت، ``overflow_exception`` باید به یک شیء استثنای پایتون اشاره کند؛ آن استثنا را برانگیزید و ``-1.0`` را بازگردانید. در هر دو حالت، ``*endptr`` را طوری تنظیم کنید که به نخستین نویسه‌ی پس از مقدار تبدیل‌شده اشاره کند." +msgid "If ``s`` represents a value that is too large to store in a float (for example, ``\"1e500\"`` is such a string on many platforms) then if ``overflow_exception`` is ``NULL`` return :c:macro:`!INFINITY` (with an appropriate sign) and don't set any exception. Otherwise, ``overflow_exception`` must point to a Python exception object; raise that exception and return ``-1.0``. In both cases, set ``*endptr`` to point to the first character after the converted value." +msgstr "اگر ``s`` نمایانگر مقداری باشد که برای ذخیره‌سازی در یک عدد اعشاری بسیار بزرگ است (برای مثال، ``\"1e500\"`` چنین رشته‌ای در بسیاری از پلتفرم‌ها است)، آنگاه اگر ``overflow_exception`` برابر با ``NULL`` باشد، :c:macro:`!INFINITY` را (با علامت مناسب) برمی‌گرداند و هیچ استثنایی را تنظیم نمی‌کند. در غیر این صورت، ``overflow_exception`` باید به یک شیء استثنای پایتون اشاره کند؛ آن استثنا را بالا آورده و ``-1.0`` را برگردانید. در هر دو حالت، ``*endptr`` را تنظیم کنید تا به اولین نویسه پس از مقدار تبدیل‌شده اشاره کند." msgid "If any other error occurs during the conversion (for example an out-of-memory error), set the appropriate Python exception and return ``-1.0``." msgstr "اگر خطای دیگری در حین تبدیل رخ دهد (برای مثال، خطای کمبود حافظه)، استثنای مناسب پایتون را تنظیم کرده و ``-1.0`` را برگردانید." diff --git a/c-api/datetime.po b/c-api/datetime.po index 74c74e66..e06a7a67 100644 --- a/c-api/datetime.po +++ b/c-api/datetime.po @@ -7,12 +7,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 13:20+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -45,6 +46,9 @@ msgstr "" msgid "This is not compatible with subinterpreters." msgstr "این با زیرمفسر‌ها سازگار نیست." +msgid "This macro is now thread safe." +msgstr "این ماکرو اکنون نخ‌ایمن (thread-safe) است." + msgid "Structure containing the fields for the datetime C API." msgstr "ساختار شامل فیلدهای C API مربوط به datetime." @@ -60,6 +64,9 @@ msgstr "شیء تخصیص‌یافته به‌صورت پویا که C API مر msgid "This variable is only available once :c:macro:`PyDateTime_IMPORT` succeeds." msgstr "این متغیر تنها پس از موفقیت :c:macro:`PyDateTime_IMPORT` در دسترس است." +msgid "This variable should not be accessed directly as direct access is not thread-safe. Use :c:func:`PyDateTime_IMPORT` instead." +msgstr "به این متغیر نباید به‌طور مستقیم دسترسی پیدا کرد؛ زیرا دسترسی مستقیم نخ‌ایمن نیست. به‌جای آن از :c:func:`PyDateTime_IMPORT` استفاده کنید." + msgid "This subtype of :c:type:`PyObject` represents a Python date object." msgstr "این زیرنوع از :c:type:`PyObject` یک شیء تاریخ پایتون را نمایندگی می‌کند." diff --git a/c-api/descriptor.po b/c-api/descriptor.po index 68d78593..6fbe396d 100644 --- a/c-api/descriptor.po +++ b/c-api/descriptor.po @@ -7,12 +7,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 00:48+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -28,9 +29,6 @@ msgstr "شیءهای توصیف‌گر" msgid "\"Descriptors\" are objects that describe some attribute of an object. They are found in the dictionary of type objects." msgstr "«توصیف‌گرها» اشیایی هستند که ویژگی‌ای از یک شیء را توصیف می‌کنند. آن‌ها در دیکشنری اشیاء نوع یافت می‌شوند." -msgid "The type object for the built-in descriptor types." -msgstr "شیء نوع برای نوع‌های توصیف‌گر توکار." - msgid "Create a new get-set descriptor for extension type *type* from the :c:type:`PyGetSetDef` structure *getset*." msgstr "یک توصیف‌گر دریافت-تنظیم (get-set) جدید برای نوع توسعه‌ای *type* از ساختار :c:type:`PyGetSetDef` با نام *getset* می‌سازد." @@ -94,9 +92,18 @@ msgstr "این، شکل مقیدِ یک توصیف‌گر پوششی (wrapper de msgid "On success, return a :term:`strong reference` to the wrapper object. Return ``NULL`` with an exception set on failure." msgstr "در صورت موفقیت، یک :term:`ارجاع قوی ` به شیء پوششی برمی‌گرداند. در صورت شکل، ``NULL`` را همراه با یک استثنای تنظیم‌شده برمی‌گرداند." +msgid "This is a macro including the common fields for a descriptor object." +msgstr "این یک کلان‌دستور است که شامل فیلدهای مشترک برای یک شیء توصیف‌گر است." + +msgid "This was included in Python's C API by mistake; do not use it in extensions. For creating custom descriptor objects, create a class implementing the descriptor protocol (:c:member:`~PyTypeObject.tp_descr_get` and :c:member:`~PyTypeObject.tp_descr_set`)." +msgstr "این مورد به اشتباه در API سی پایتون قرار داده شده است؛ از آن در افزونه‌ها استفاده نکنید. برای ایجاد شیء‌های توصیف‌گر سفارشی، کلاسی ایجاد کنید که پروتکل توصیف‌گر را پیاده‌سازی کند (:c:member:`~PyTypeObject.tp_descr_get` و :c:member:`~PyTypeObject.tp_descr_set`)." + msgid "Built-in descriptors" msgstr "توصیف‌گرهای توکار" +msgid "The type object for property objects. This is the same object as :class:`property` in the Python layer." +msgstr "شیء نوع برای اشیاء ویژگی. این شیء همان شیء :class:`property` در لایه‌ی پایتون است." + msgid "The type object for super objects. This is the same object as :class:`super` in the Python layer." msgstr "شیء نوع برای اشیای super. این همان شیء :class:`super` در لایه‌ی پایتون است." @@ -120,3 +127,6 @@ msgstr "یک شیء :class:`staticmethod` جدید ایجاد می‌کند که msgid "On success, this function returns a :term:`strong reference` to a new static method descriptor. On failure, this function returns ``NULL`` with an exception set." msgstr "در صورت موفقیت، این تابع یک :term:`ارجاع قوی ` به توصیف‌گر جدید متد ایستا برمی‌گرداند. در صورت شکست، این تابع ``NULL`` را همراه با یک استثنای تنظیم‌شده برمی‌گرداند." + +#~ msgid "The type object for the built-in descriptor types." +#~ msgstr "شیء نوع برای نوع‌های توصیف‌گر توکار." diff --git a/c-api/dict.po b/c-api/dict.po index 6cc9ee86..5be362be 100644 --- a/c-api/dict.po +++ b/c-api/dict.po @@ -8,13 +8,14 @@ # khosro azimi, 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" -"PO-Revision-Date: 2026-09-13 20:16+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 20:44+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" @@ -24,8 +25,8 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Poedit 3.6\n" -msgid "Dictionary Objects" -msgstr "اشیاء دیکشنری" +msgid "Dictionary objects" +msgstr "اشیای دیکشنری" msgid "This subtype of :c:type:`PyObject` represents a Python dictionary object." msgstr "این زیرنوع «subtype» از :c:type:`PyObject` نمایانگر یک شیء دیکشنری پایتون است." @@ -45,15 +46,27 @@ msgstr "یک دیکشنری خالی جدید برمی‌گرداند، یا د msgid "Return a :class:`types.MappingProxyType` object for a mapping which enforces read-only behavior. This is normally used to create a view to prevent modification of the dictionary for non-dynamic class types." msgstr "یک شیء :class:`types.MappingProxyType` برای نگاشتی که رفتار فقط‌خواندنی را اعمال می‌کند بازمی‌گرداند. این معمولاً برای ایجاد نمایی استفاده می‌شود که از تغییر دیکشنری در نوع‌های کلاس غیرپویا جلوگیری کند." +msgid "The first argument can be a :class:`dict`, a :class:`frozendict`, or a mapping." +msgstr "اولین آرگومان می‌تواند یک :class:`dict`، یک :class:`frozendict` یا یک نگاشت باشد." + +msgid "Also accept :class:`frozendict`." +msgstr "همچنین :class:`frozendict` را بپذیرید." + msgid "The type object for mapping proxy objects created by :c:func:`PyDictProxy_New` and for the read-only ``__dict__`` attribute of many built-in types. A :c:type:`PyDictProxy_Type` instance provides a dynamic, read-only view of an underlying dictionary: changes to the underlying dictionary are reflected in the proxy, but the proxy itself does not support mutation operations. This corresponds to :class:`types.MappingProxyType` in Python." msgstr "شیء نوع برای اشیاء پراکسی نگاشت ایجاد‌شده توسط :c:func:`PyDictProxy_New` و برای ویژگی ``__dict__`` فقط‌خواندنی بسیاری از نوع‌های توکار. یک نمونه‌ی :c:type:`PyDictProxy_Type` نمای پویا و فقط‌خواندنی از یک دیکشنری زیرین ارائه می‌دهد: تغییرات دیکشنری زیرین در پراکسی منعکس می‌شوند، اما خود پراکسی از عملیات تغییر پشتیبانی نمی‌کند. این معادل :class:`types.MappingProxyType` در پایتون است." msgid "Empty an existing dictionary of all key-value pairs." msgstr "یک دیکشنری موجود را از تمام جفت‌های کلید-مقدار خالی می‌کند." +msgid "Do nothing if the argument is not a :class:`dict` or a :class:`!dict` subclass." +msgstr "اگر آرگومان یک :class:`dict` یا زیرکلاس :class:`!dict` نباشد، هیچ کاری انجام ندهید." + msgid "Determine if dictionary *p* contains *key*. If an item in *p* matches *key*, return ``1``, otherwise return ``0``. On error, return ``-1``. This is equivalent to the Python expression ``key in p``." msgstr "تعیین می‌کند که آیا دیکشنری *p* شامل *key* است یا خیر. اگر آیتمی در *p* با *key* مطابقت داشته باشد، ``1`` را برمی‌گرداند، در غیر این صورت ``0`` را برمی‌گرداند. در صورت خطا، ``-1`` را برمی‌گرداند. این معادل عبارت پایتونی ``key in p`` است." +msgid "The first argument can be a :class:`dict` or a :class:`frozendict`." +msgstr "اولین آرگومان می‌تواند یک :class:`dict` یا یک :class:`frozendict` باشد." + msgid "The operation is atomic on :term:`free threading ` when *key* is :class:`str`, :class:`int`, :class:`float`, :class:`bool` or :class:`bytes`." msgstr "این عملیات در :term:`نخ‌بندی آزاد ` زمانی که *key* :class:`str`، :class:`int`، :class:`float`، :class:`bool` یا :class:`bytes` باشد، اتمی است." @@ -159,6 +172,9 @@ msgstr "یک :c:type:`PyListObject` شامل تمام مقادیر دیکشنر msgid "Return the number of items in the dictionary. This is equivalent to ``len(p)`` on a dictionary." msgstr "تعداد آیتم‌های موجود در دیکشنری را برمی‌گرداند. این معادل ``len(p)`` روی یک دیکشنری است." +msgid "The argument can be a :class:`dict` or a :class:`frozendict`." +msgstr "آرگومان می‌تواند یک :class:`dict` یا یک :class:`frozendict` باشد." + msgid "Similar to :c:func:`PyDict_Size`, but without error checking." msgstr "مشابه :c:func:`PyDict_Size`، اما بدون بررسی خطا." @@ -225,8 +241,8 @@ msgstr "" " Py_DECREF(o);\n" "}" -msgid "The function is not thread-safe in the :term:`free-threaded ` build without external synchronization. You can use :c:macro:`Py_BEGIN_CRITICAL_SECTION` to lock the dictionary while iterating over it::" -msgstr "این تابع در ساخت‌ِ :term:`نخ‌آزاد ` بدون همگام‌سازی بیرونی، نخ‌ایمن نیست. می‌توانید از :c:macro:`Py_BEGIN_CRITICAL_SECTION` برای قفل کردن دیکشنری در حین پیمایش آن استفاده کنید::" +msgid "The function is not thread-safe in the :term:`free-threaded ` build without external synchronization for a mutable :class:`dict`. You can use :c:macro:`Py_BEGIN_CRITICAL_SECTION` to lock the dictionary while iterating over it::" +msgstr "این تابع در ساخت :term:`نخ‌بندی آزاد ` بدون همگام‌سازی خارجی برای یک :class:`dict` تغییرپذیر، نخ‌ایمن نیست. می‌توانید از :c:macro:`Py_BEGIN_CRITICAL_SECTION` برای قفل کردن دیکشنری هنگام پیمایش آن استفاده کنید::" msgid "" "Py_BEGIN_CRITICAL_SECTION(self->dict);\n" @@ -241,6 +257,9 @@ msgstr "" "}\n" "Py_END_CRITICAL_SECTION();" +msgid "The function is thread-safe on a :class:`frozendict`." +msgstr "این تابع روی یک :class:`frozendict` نخ‌ایمن است." + msgid "On the free-threaded build, this function can be used safely inside a critical section. However, the references returned for *pkey* and *pvalue* are :term:`borrowed ` and are only valid while the critical section is held. If you need to use these objects outside the critical section or when the critical section can be suspended, create a :term:`strong reference ` (for example, using :c:func:`Py_NewRef`)." msgstr "در نسخه‌ی نخ‌آزاد، می‌توان از این تابع به‌طور ایمن درون بخش بحرانی استفاده کرد. با این حال، ارجاع‌های برگردانده‌شده برای *pkey* و *pvalue* :term:`امانتی ` هستند و تنها تا زمانی که بخش بحرانی برقرار است معتبرند. اگر نیاز دارید از این اشیاء خارج از بخش بحرانی یا در زمانی که بخش بحرانی ممکن است معلق شود استفاده کنید، یک :term:`ارجاع قوی ` ایجاد کنید (برای مثال، با استفاده از :c:func:`Py_NewRef`)." @@ -312,8 +331,8 @@ msgstr "اگر کال‌بک استثنایی تنظیم کند، باید ``-1` msgid "There may already be a pending exception set on entry to the callback. In this case, the callback should return ``0`` with the same exception still set. This means the callback may not call any other API that can set an exception unless it saves and clears the exception state first, and restores it before returning." msgstr "ممکن است هنگام ورود به کال‌بک، از قبل استثنایی در انتظار تنظیم‌شده باشد. در این حالت، کال‌بک باید ``0`` را بازگرداند، در حالی که همان استثنا همچنان تنظیم‌شده است. این بدان معناست که کال‌بک نمی‌تواند هیچ API دیگری که می‌تواند استثنا تنظیم کند فراخوانی کند، مگر آنکه ابتدا وضعیت استثنا را ذخیره و پاک کند و پیش از بازگشت، آن را بازگردانی کند." -msgid "Dictionary View Objects" -msgstr "اشیاء نمای دیکشنری" +msgid "Dictionary view objects" +msgstr "اشیای نمای دیکشنری" msgid "Return true if *op* is a view of a set inside a dictionary. This is currently equivalent to :c:expr:`PyDictKeys_Check(op) || PyDictItems_Check(op)`. This function always succeeds." msgstr "اگر *op* نمایی از یک مجموعه درون یک دیکشنری باشد، مقدار true را برمی‌گرداند. این تابع در حال حاضر معادل :c:expr:`PyDictKeys_Check(op) || PyDictItems_Check(op)` است. این تابع همیشه با موفقیت اجرا می‌شود." @@ -336,8 +355,32 @@ msgstr "شیء نوع برای نمای آیتم‌های دیکشنری. در msgid "Return true if *op* is an instance of a dictionary items view. This function always succeeds." msgstr "اگر *op* نمونه‌ای از نمای آیتم‌های دیکشنری باشد، مقدار true را برمی‌گرداند. این تابع همیشه با موفقیت اجرا می‌شود." -msgid "Ordered Dictionaries" -msgstr "دیکشنری‌های ترتیب‌دار" +msgid "Frozen dictionary objects" +msgstr "اشیای دیکشنری فریزشده" + +msgid "This instance of :c:type:`PyTypeObject` represents the Python frozen dictionary type. This is the same object as :class:`frozendict` in the Python layer." +msgstr "این نمونه از :c:type:`PyTypeObject` نوع دیکشنری فریزشده‌ی پایتون را نمایش می‌دهد. این شیء همان شیء :class:`frozendict` در لایه‌ی پایتون است." + +msgid "Return true if *p* is a :class:`dict` object, a :class:`frozendict` object, or an instance of a subtype of the :class:`!dict` or :class:`!frozendict` type. This function always succeeds." +msgstr "اگر *p* یک شیء :class:`dict`، یک شیء :class:`frozendict` یا نمونه‌ای از زیرنوع نوع :class:`!dict` یا :class:`!frozendict` باشد، مقدار true برمی‌گرداند. این تابع همیشه موفقیت‌آمیز است." + +msgid "Return true if *p* is a :class:`dict` object or a :class:`frozendict` object, but not an instance of a subtype of the :class:`!dict` or :class:`!frozendict` type. This function always succeeds." +msgstr "اگر *p* یک شیء :class:`dict` یا یک شیء :class:`frozendict` باشد، اما نمونه‌ای از زیرنوع نوع :class:`!dict` یا :class:`!frozendict` نباشد، مقدار true برمی‌گرداند. این تابع همیشه موفقیت‌آمیز است." + +msgid "Return true if *p* is a :class:`frozendict` object or an instance of a subtype of the :class:`!frozendict` type. This function always succeeds." +msgstr "اگر *p* یک شیء :class:`frozendict` یا نمونه‌ای از زیرنوع نوع :class:`!frozendict` باشد، مقدار true برمی‌گرداند. این تابع همیشه موفقیت‌آمیز است." + +msgid "Return true if *p* is a :class:`frozendict` object, but not an instance of a subtype of the :class:`!frozendict` type. This function always succeeds." +msgstr "اگر *p* یک شیء :class:`frozendict` باشد، اما نمونه‌ای از زیرنوع نوع :class:`!frozendict` نباشد، مقدار true برمی‌گرداند. این تابع همیشه موفقیت‌آمیز است." + +msgid "Return a new :class:`frozendict` from an iterable, or ``NULL`` on failure with an exception set." +msgstr "یک :class:`frozendict` جدید را از یک شیء قابل پیمایش برمی‌گرداند، یا در صورت شکست، با تنظیم یک استثنا، ``NULL`` را برمی‌گرداند." + +msgid "Create an empty dictionary if *iterable* is ``NULL``." +msgstr "اگر *iterable* برابر با ``NULL`` باشد، یک دیکشنری خالی ایجاد کنید." + +msgid "Ordered dictionaries" +msgstr "دیکشنری‌های مرتب" msgid "Python's C API provides interface for :class:`collections.OrderedDict` from C. Since Python 3.7, dictionaries are ordered by default, so there is usually little need for these functions; prefer ``PyDict*`` where possible." msgstr "API زبان C پایتون رابطی برای :class:`collections.OrderedDict` از C فراهم می‌کند. از پایتون 3.7 به بعد، دیکشنری‌ها به‌طور پیش‌فرض مرتب هستند، بنابراین معمولاً نیاز اندکی به این توابع وجود دارد؛ در صورت امکان ``PyDict*`` را ترجیح دهید." diff --git a/c-api/exceptions.po b/c-api/exceptions.po index 75ec79b9..5190af31 100644 --- a/c-api/exceptions.po +++ b/c-api/exceptions.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-08 09:24+0330\n" "PO-Revision-Date: 2026-09-15 13:22+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -384,6 +385,9 @@ msgstr "اجرای زباله‌روب، در صورت نیاز." msgid "Executing a pending :ref:`remote debugger ` script." msgstr "اجرای یک اسکریپت در انتظار :ref:`اشکال‌زدای راه دور `." +msgid "Raise the exception set by :c:func:`PyThreadState_SetAsyncExc`." +msgstr "استثنای تعیین‌شده توسط :c:func:`PyThreadState_SetAsyncExc` را بالا بیاورید." + msgid "If any handler raises an exception, immediately return ``-1`` with that exception set. Any remaining interruptions are left to be processed on the next :c:func:`PyErr_CheckSignals()` invocation, if appropriate." msgstr "اگر هر هندلری استثنایی ایجاد کند، بلافاصله ``-1`` همراه با آن استثنای تنظیم‌شده بازگردانده می‌شود. پردازش هر وقفه‌ی باقی‌مانده، در صورت لزوم، به فراخوانی بعدی :c:func:`PyErr_CheckSignals()` موکول می‌شود." @@ -396,6 +400,9 @@ msgstr "این تابع ممکن است اکنون زباله‌روب را فر msgid "This function may now execute a remote debugger script, if remote debugging is enabled." msgstr "این تابع اکنون ممکن است در صورت فعال بودن اشکال‌زدایی از راه دور، یک اسکریپت اشکال‌زدای از راه دور را اجرا کند." +msgid "The exception set by :c:func:`PyThreadState_SetAsyncExc` is now raised." +msgstr "استثنای تعیین‌شده توسط :c:func:`PyThreadState_SetAsyncExc` اکنون بالا آورده می‌شود." + msgid "Simulate the effect of a :c:macro:`!SIGINT` signal arriving. This is equivalent to ``PyErr_SetInterruptEx(SIGINT)``." msgstr "اثر رسیدن سیگنال :c:macro:`!SIGINT` را شبیه‌سازی می‌کند. این معادل ``PyErr_SetInterruptEx(SIGINT)`` است." @@ -441,6 +448,12 @@ msgstr "اگر *ob* یک کلاس استثنا باشد، مقدار ناصفر msgid "Return :c:member:`~PyTypeObject.tp_name` of the exception class *ob*." msgstr ":c:member:`~PyTypeObject.tp_name` کلاس استثنا *ob* را بازمی‌گرداند." +msgid "This is a macro including the base fields for an exception object." +msgstr "این یک کلان‌دستور است که شامل فیلدهای پایه برای یک شیء استثنا است." + +msgid "This was included in Python's C API by mistake and is not designed for use in extensions. For creating custom exception objects, use :c:func:`PyErr_NewException` or otherwise create a class inheriting from :c:data:`PyExc_BaseException`." +msgstr "این مورد به اشتباه در API سی پایتون قرار داده شده است و برای استفاده در افزونه‌ها طراحی نشده است. برای ایجاد شیء‌های استثنای سفارشی، از :c:func:`PyErr_NewException` استفاده کنید یا به روشی دیگر کلاسی ایجاد کنید که از :c:data:`PyExc_BaseException` ارث‌بری کند." + msgid "Exception Objects" msgstr "اشیاء استثنا" @@ -540,6 +553,9 @@ msgstr "نقطه‌ای را نشان‌گذاری می‌کند که در آن msgid "The function then checks if the stack limit is reached. If this is the case, a :exc:`RecursionError` is set and a nonzero value is returned. Otherwise, zero is returned." msgstr "سپس تابع بررسی می‌کند که آیا به حد پشته رسیده است یا خیر. اگر چنین باشد، یک :exc:`RecursionError` تنظیم می‌شود و مقدار غیرصفر بازگردانده می‌شود. در غیر این صورت، صفر بازگردانده می‌شود." +msgid "The check is based on the remaining C stack space of the current thread, not on a count of calls, so it is unaffected by :c:func:`Py_SetRecursionLimit` and :func:`sys.setrecursionlimit`." +msgstr "" + msgid "*where* should be a UTF-8 encoded string such as ``\" in instance check\"`` to be concatenated to the :exc:`RecursionError` message caused by the recursion depth limit." msgstr "*where* باید یک رشته‌ی کدگذاری‌شده با UTF-8 مانند ``\" in instance check\"`` باشد تا به پیام :exc:`RecursionError` که ناشی از محدودیت عمق بازگشت است، الحاق شود." @@ -549,6 +565,9 @@ msgstr "تابع :c:func:`PyUnstable_ThreadState_SetStackProtection`." msgid "This function is now also available in the :ref:`limited API `." msgstr "این تابع اکنون در :ref:`API محدود ` نیز در دسترس است." +msgid "The check is based on the remaining C stack space. Previously, a separate counter of C-level calls was used." +msgstr "" + msgid "Ends a :c:func:`Py_EnterRecursiveCall`. Must be called once for each *successful* invocation of :c:func:`Py_EnterRecursiveCall`." msgstr "یک :c:func:`Py_EnterRecursiveCall` را پایان می‌دهد. باید یک‌بار برای هر فراخوانی *موفق* :c:func:`Py_EnterRecursiveCall` فراخوانی شود." @@ -660,6 +679,9 @@ msgstr ":exc:`FloatingPointError`" msgid ":exc:`GeneratorExit`" msgstr ":exc:`GeneratorExit`" +msgid ":exc:`ImportCycleError`" +msgstr ":exc:`ImportCycleError`" + msgid ":exc:`ImportError`" msgstr ":exc:`ImportError`" @@ -867,6 +889,52 @@ msgstr "این تابع در صورت موفقیت ``0`` را برمی‌گرد msgid "Write the traceback *tb* into the file *f*." msgstr "ردگیری *tb* را در پرونده *f* بنویسید." +msgid "Write a trace of the Python stack in *tstate* into the file *fd*. The format looks like::" +msgstr "ردی از پشته‌ی پایتون در *tstate* را در پرونده‌ی *fd* بنویسید. قالب آن به شکل زیر است::" + +msgid "" +"Traceback (most recent call first):\n" +" File \"xxx\", line xxx in \n" +" File \"xxx\", line xxx in \n" +" ...\n" +" File \"xxx\", line xxx in " +msgstr "" +"Traceback (most recent call first):\n" +" File \"xxx\", line xxx in \n" +" File \"xxx\", line xxx in \n" +" ...\n" +" File \"xxx\", line xxx in " + +msgid "This function is meant to debug situations such as segfaults, fatal errors, and similar. The file and function names it outputs are encoded to ASCII with backslashreplace and truncated to 500 characters. It writes only the first 100 frames; further frames are truncated with the line ``...``." +msgstr "این تابع برای رفع اشکال موقعیت‌هایی مانند خطاهای حافظه (segfaults)، خطاهای مهلک و موارد مشابه در نظر گرفته شده است. نام‌های پرونده و تابعی که خروجی می‌دهد با استفاده از backslashreplace به اسکی (ASCII) کدگذاری شده و به ۵۰۰ نویسه کوتاه می‌شوند. این تابع فقط ۱۰۰ فریم اول را می‌نویسد؛ فریم‌های بعدی با سطر ``...`` کوتاه می‌شوند." + +msgid "This function will return ``NULL`` on success, or an error message on error." +msgstr "این تابع در صورت موفقیت ``NULL``، و در صورت بروز خطا، یک پیام خطا برمی‌گرداند." + +msgid "This function is intended for use in crash scenarios such as signal handlers for SIGSEGV, where the interpreter may be in an inconsistent state. Given that it reads interpreter data structures that may be partially modified, the function might produce incomplete output or it may even crash itself." +msgstr "این تابع برای استفاده در سناریوهای فروپاشی (crash) مانند هندلرهای سیگنال برای SIGSEGV در نظر گرفته شده است، جایی که مفسر ممکن است در وضعیتی ناهمگون باشد. با توجه به اینکه این تابع ساختارهای داده‌ی مفسر را می‌خواند که ممکن است به‌صورت جزئی تغییر یافته باشند، ممکن است خروجی ناقصی تولید کند یا حتی خودش دچار فروپاشی شود." + +msgid "The caller does not need to hold an :term:`attached thread state`, nor does *tstate* need to be attached." +msgstr "فراخواننده نیازی به نگهداری :term:`وضعیت نخ متصل ` ندارد و همچنین نیازی نیست که *tstate* متصل باشد." + +msgid "Write the traces of all Python threads in *interp* into the file *fd*." +msgstr "ردپای تمام نخ‌های پایتون را در *interp* درون پرونده‌ی *fd* بنویسید." + +msgid "If *interp* is ``NULL`` then this function will try to identify the current interpreter using thread-specific storage. If it cannot, it will return an error." +msgstr "اگر *interp* مقدار ``NULL`` باشد، این تابع تلاش خواهد کرد تا مفسر فعلی را با استفاده از حافظه‌ی مختص نخ شناسایی کند. اگر نتواند، خطایی را برمی‌گرداند." + +msgid "If *current_tstate* is not ``NULL`` then it will be used to identify what the current thread is in the written output. If it is ``NULL`` then this function will identify the current thread using thread-specific storage. It is not an error if the function is unable to get the current Python thread state." +msgstr "اگر *current_tstate* برابر با ``NULL`` نباشد، از آن برای شناسایی اینکه نخ فعلی در خروجی نوشته‌شده چیست، استفاده خواهد شد. اگر برابر با ``NULL`` باشد، این تابع نخ فعلی را با استفاده از حافظه‌ی مختص نخ شناسایی خواهد کرد. اگر تابع نتواند وضعیت نخ فعلی پایتون را دریافت کند، خطا محسوب نمی‌شود." + +msgid "This function is meant to debug situations such as segfaults, fatal errors, and similar. It calls :c:func:`PyUnstable_DumpTraceback` for each thread. It only writes the tracebacks of the first *max_threads* threads, further output is truncated with the line ``...``. If *max_threads* is 0, the function will use a default value of 100 for the argument." +msgstr "این تابع برای رفع اشکال موقعیت‌هایی مانند خطاهای حافظه (segfaults)، خطاهای مهلک و موارد مشابه در نظر گرفته شده است. این تابع به ازای هر نخ، :c:func:`PyUnstable_DumpTraceback` را فراخوانی می‌کند. این تابع فقط ردگیری‌های *max_threads* نخ اول را می‌نویسد و خروجی‌های بیشتر با سطر ``...`` کوتاه می‌شوند. اگر *max_threads* برابر با 0 باشد، تابع از مقدار پیش‌فرض 100 برای آرگومان استفاده خواهد کرد." + +msgid "The caller does not need to hold an :term:`attached thread state`, nor does *current_tstate* need to be attached." +msgstr "فراخواننده نیازی به نگهداری یک :term:`وضعیت نخ متصل ` ندارد و همچنین *current_tstate* نیازی به متصل بودن ندارد." + +msgid "On the :term:`free-threaded build`, this function is not thread-safe. If another thread deletes its :term:`thread state` while this function is being called, the process will likely crash." +msgstr "در :term:`ساخت نخ‌آزاد `، این تابع نخ‌ایمن نیست. اگر در حین فراخوانی این تابع، نخ دیگری :term:`وضعیت نخ ` خود را حذف کند، فرایند احتمالاً دچار فروپاشی خواهد شد." + msgid "strerror (C function)" msgstr "strerror (تابع C)" diff --git a/c-api/extension-modules.po b/c-api/extension-modules.po index 58ccccbc..16b08559 100644 --- a/c-api/extension-modules.po +++ b/c-api/extension-modules.po @@ -5,25 +5,27 @@ # # Translators: # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" -"PO-Revision-Date: 2026-07-25 12:59+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 20:44+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: none\n" "Language: fa\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.6\n" msgid "Defining extension modules" msgstr "تعریف ماژول‌های توسعه‌ای" -msgid "A C extension for CPython is a shared library (for example, a ``.so`` file on Linux, ``.pyd`` DLL on Windows), which is loadable into the Python process (for example, it is compiled with compatible compiler settings), and which exports an :ref:`initialization function `." -msgstr "یک افزونه C برای سی‌پایتون یک کتابخانه اشتراکی است (برای مثال، یک پرونده ``.so`` در لینوکس، DLL ``.pyd`` در ویندوز) که در فرایند پایتون بارگذاری‌پذیر است (برای مثال، با تنظیمات سازگار کامپایلر کامپایل شده است) و یک :ref:`تابع مقداردهی اولیه ` را اکسپورت می‌کند." +msgid "A C extension for CPython is a shared library (for example, a ``.so`` file on Linux, ``.pyd`` DLL on Windows), which is loadable into the Python process (for example, it is compiled with compatible compiler settings), and which exports an :dfn:`export hook` function (or an old-style :ref:`initialization function `)." +msgstr "یک افزونه‌ی C برای سی‌پایتون یک کتابخانه‌ی مشترک است (برای مثال، یک پرونده‌ی ``.so`` روی لینوکس، DLL مربوط به ``.pyd`` روی ویندوز) که قابل بارگذاری در فرایند پایتون است (برای مثال، با تنظیمات کامپایلر سازگار کامپایل شده است) و یک تابع :dfn:`قلاب اکسپورت` (یا یک :ref:`تابع راه‌اندازی ` به سبک قدیم) را صادر می‌کند." msgid "To be importable by default (that is, by :py:class:`importlib.machinery.ExtensionFileLoader`), the shared library must be available on :py:attr:`sys.path`, and must be named after the module name plus an extension listed in :py:attr:`importlib.machinery.EXTENSION_SUFFIXES`." msgstr "برای اینکه به‌صورت پیش‌فرض ایمپورت‌پذیر باشد (یعنی توسط :py:class:`importlib.machinery.ExtensionFileLoader`)، کتابخانه‌ی اشتراکی باید در :py:attr:`sys.path` موجود باشد و باید بر اساس نام ماژول به‌علاوه‌ی یکی از پسوند‌های فهرست‌شده در :py:attr:`importlib.machinery.EXTENSION_SUFFIXES` نام‌گذاری شود." @@ -31,20 +33,167 @@ msgstr "برای اینکه به‌صورت پیش‌فرض ایمپورت‌پ msgid "Building, packaging and distributing extension modules is best done with third-party tools, and is out of scope of this document. One suitable tool is Setuptools, whose documentation can be found at https://setuptools.pypa.io/en/latest/setuptools.html." msgstr "ساخت، بسته‌بندی و توزیع ماژول‌های توسعه‌ای بهتر است با ابزارهای شخص ثالث انجام شود و خارج از محدوده‌ی این سند است. یکی از ابزارهای مناسب، Setuptools است که می‌توانید مستندات آن را در https://setuptools.pypa.io/en/latest/setuptools.html بیابید." -msgid "Normally, the initialization function returns a module definition initialized using :c:func:`PyModuleDef_Init`. This allows splitting the creation process into several phases:" -msgstr "به‌طور معمول، تابع مقداردهی اولیه، تعریف ماژولی را برمی‌گرداند که با استفاده از :c:func:`PyModuleDef_Init` مقداردهی اولیه شده است. این اجازه می‌دهد فرایند ایجاد به چندین مرحله تقسیم شود:" +msgid "Extension export hook" +msgstr "قلاب اکسپورت افزونه" -msgid "Before any substantial code is executed, Python can determine which capabilities the module supports, and it can adjust the environment or refuse loading an incompatible extension." -msgstr "پیش از آنکه هر کد قابل توجهی اجرا شود، پایتون می‌تواند تعیین کند که ماژول از چه قابلیت‌هایی پشتیبانی می‌کند، و می‌تواند محیط را تنظیم کند یا از بارگذاری یک ماژول توسعه‌ای ناسازگار خودداری کند." +msgid "Support for the :samp:`PyModExport_{}` export hook was added in Python 3.15. The older way of defining modules is still available: consult either the :ref:`extension-pyinit` section or earlier versions of this documentation if you plan to support earlier Python versions." +msgstr "پشتیبانی از قلاب اکسپورت :samp:`PyModExport_{}` در نسخه‌ی ۳.۱۵ پایتون اضافه شد. روش قدیمی‌تر تعریف ماژول‌ها همچنان در دسترس است: اگر قصد دارید از نسخه‌های قدیمی‌تر پایتون پشتیبانی کنید، به بخش :ref:`extension-pyinit` یا نسخه‌های قبلی این مستندات مراجعه کنید." -msgid "By default, Python itself creates the module object -- that is, it does the equivalent of :py:meth:`object.__new__` for classes. It also sets initial attributes like :attr:`~module.__package__` and :attr:`~module.__loader__`." -msgstr "به‌طور پیش‌فرض، خودِ پایتون شیء ماژول را ایجاد می‌کند -- یعنی همان کاری را انجام می‌دهد که :py:meth:`object.__new__` برای کلاس‌ها انجام می‌دهد. همچنین ویژگی‌های اولیه‌ای مانند :attr:`~module.__package__` و :attr:`~module.__loader__` را تنظیم می‌کند." +msgid "The export hook must be an exported function with the following signature:" +msgstr "قلاب اکسپورت باید یک تابع صادرشده با امضای زیر باشد:" -msgid "Afterwards, the module object is initialized using extension-specific code -- the equivalent of :py:meth:`~object.__init__` on classes." -msgstr "پس از آن، شیء ماژول با استفاده از کد مخصوص توسعه مقداردهی اولیه می‌شود — معادلِ :py:meth:`~object.__init__` در کلاس‌ها." +msgid "For modules with ASCII-only names, the :ref:`export hook ` must be named :samp:`PyModExport_{}`, with ```` replaced by the module's name." +msgstr "برای ماژول‌هایی با نام‌های تماماً اسکی، :ref:`export hook ` باید به صورت :samp:`PyModExport_{}` نام‌گذاری شود که در آن ```` با نام ماژول جایگزین می‌شود." -msgid "This is called *multi-phase initialization* to distinguish it from the legacy (but still supported) *single-phase initialization* scheme, where the initialization function returns a fully constructed module. See the :ref:`single-phase-initialization section below ` for details." -msgstr "این روش *مقداردهی اولیه چندمرحله‌ای* (multi-phase initialization) نامیده می‌شود تا از طرح قدیمی (اما همچنان پشتیبانی‌شده) *مقداردهی اولیه تک‌مرحله‌ای* (single-phase initialization) متمایز باشد؛ در این طرح، تابع مقداردهی اولیه ماژولی کاملاً ساخته‌شده را برمی‌گرداند. برای جزئیات، :ref:`بخش مقداردهی اولیه تک‌مرحله‌ای در پایین ` را ببینید." +msgid "For non-ASCII module names, the export hook must instead be named :samp:`PyModExportU_{}` (note the ``U``), with ```` encoded using Python's *punycode* encoding with hyphens replaced by underscores. In Python:" +msgstr "برای نام‌های ماژول غیر اسکی، قلاب اکسپورت باید به‌جای آن :samp:`PyModExportU_{}` نام‌گذاری شود (به ``U`` توجه کنید)، که در آن ```` با استفاده از کدگذاری *punycode* پایتون و با جایگزینی خط تیره با زیرخط رمزگذاری شده است. در پایتون:" + +msgid "" +"def hook_name(name):\n" +" try:\n" +" suffix = b'_' + name.encode('ascii')\n" +" except UnicodeEncodeError:\n" +" suffix = b'U_' + name.encode('punycode').replace(b'-', b'_')\n" +" return b'PyModExport' + suffix" +msgstr "" +"def hook_name(name):\n" +" try:\n" +" suffix = b'_' + name.encode('ascii')\n" +" except UnicodeEncodeError:\n" +" suffix = b'U_' + name.encode('punycode').replace(b'-', b'_')\n" +" return b'PyModExport' + suffix" + +msgid "The export hook returns an array of :c:type:`PySlot` entries, terminated by an entry with a slot ID of ``0``. These slots describe how the module should be created and initialized." +msgstr "قلاب اکسپورت آرایه‌ای از درایه‌های :c:type:`PySlot` را برمی‌گرداند که با درایه‌ای با شناسه‌ی جایگاه ``0`` خاتمه می‌یابد. این جایگاه‌ها نحوه ایجاد و مقداردهی اولیه ماژول را توصیف می‌کنند." + +msgid "This array must remain valid and constant until interpreter shutdown. Typically, it should use ``static`` storage. Prefer using the :c:macro:`Py_mod_create` and :c:macro:`Py_mod_exec` slots for any dynamic behavior." +msgstr "این آرایه باید تا زمان خاموش شدن مفسر معتبر و ثابت باقی بماند. معمولاً باید از حافظه‌ی ``static`` استفاده کند. ترجیح داده می‌شود برای هرگونه رفتار پویایی از جایگاه‌های :c:macro:`Py_mod_create` و :c:macro:`Py_mod_exec` استفاده کنید." + +msgid "The export hook may return ``NULL`` with an exception set to signal failure." +msgstr "قلاب اکسپورت ممکن است برای سیگنال‌دهی به خطا، مقدار ``NULL`` را به همراه یک استثنای تنظیم‌شده برگرداند." + +msgid "It is recommended to define the export hook function using a helper macro:" +msgstr "توصیه می‌شود تابع قلاب اکسپورت با استفاده از یک کلان‌دستور کمکی تعریف شود:" + +msgid "Declare an extension module export hook. This macro:" +msgstr "یک قلاب اکسپورت ماژول توسعه‌ای را اعلان کنید. این کلان‌دستور:" + +msgid "specifies the :c:expr:`PySlot*` return type," +msgstr "نوع داده‌ی بازگشتی :c:expr:`PySlot*` را مشخص می‌کند،" + +msgid "adds any special linkage declarations required by the platform, and" +msgstr "هرگونه اعلان پیوند خاص مورد نیاز پلتفرم را می‌افزاید و" + +msgid "for C++, declares the function as ``extern \"C\"``." +msgstr "برای C++، تابع را به‌صورت ``extern \"C\"`` اعلان می‌کند." + +msgid "For example, a module called ``spam`` would be defined like this::" +msgstr "برای مثال، ماژولی به نام ``spam`` به شکل زیر تعریف می‌شود::" + +msgid "" +"PyABIInfo_VAR(abi_info);\n" +"\n" +"static PySlot spam_slots[] = {\n" +" PySlot_STATIC_DATA(Py_mod_abi, &abi_info),\n" +" PySlot_STATIC_DATA(Py_mod_name, \"spam\"),\n" +" PySlot_FUNC(Py_mod_init, spam_init_function),\n" +" ...\n" +" PySlot_END\n" +"};\n" +"\n" +"PyMODEXPORT_FUNC\n" +"PyModExport_spam(void)\n" +"{\n" +" return spam_slots;\n" +"}" +msgstr "" +"PyABIInfo_VAR(abi_info);\n" +"\n" +"static PySlot spam_slots[] = {\n" +" PySlot_STATIC_DATA(Py_mod_abi, &abi_info),\n" +" PySlot_STATIC_DATA(Py_mod_name, \"spam\"),\n" +" PySlot_FUNC(Py_mod_init, spam_init_function),\n" +" ...\n" +" PySlot_END\n" +"};\n" +"\n" +"PyMODEXPORT_FUNC\n" +"PyModExport_spam(void)\n" +"{\n" +" return spam_slots;\n" +"}" + +msgid "The export hook is typically the only non-\\ ``static`` item defined in the module's C source." +msgstr "قلاب اکسپورت معمولاً تنها آیتم غیر\\ ``static`` است که در کد منبع C ماژول تعریف می‌شود." + +msgid "The hook should be kept short. If it does more than ``return`` a static array, several caveats apply:" +msgstr "این قلاب باید کوتاه نگه داشته شود. اگر کاری بیش از ``return`` کردن یک آرایه‌ی ثابت انجام دهد، چند نکته حائز اهمیت است:" + +msgid "If you need to use any Python C API, it is recommended to call :c:func:`PyABIInfo_Check` first to raise an exception, rather than crash, in common cases of ABI mismatch." +msgstr "اگر نیاز به استفاده از هرگونه API سی پایتون دارید، توصیه می‌شود در موارد رایج عدم تطابق ABI، به جای ایجاد فروپاشی، ابتدا :c:func:`PyABIInfo_Check` را برای ایجاد یک استثنا فراخوانی کنید." + +msgid "Code in the export hook must never rely on the :term:`GIL`: :term:`free-threaded builds ` of Python can only check the :c:macro:`Py_mod_gil` slot (or the lack of it) after the hook returns," +msgstr "کد موجود در قلاب اکسپورت نباید به :term:`GIL` اتکا کند: :term:`ساخت‌های نخ‌آزاد ` پایتون تنها پس از بازگشت قلاب می‌توانند جایگاه :c:macro:`Py_mod_gil` (یا نبود آن) را بررسی کنند،" + +msgid "Similarly, the hook may be called in any subinterpreter, since the :c:macro:`Py_mod_multiple_interpreters` slot (or lack of it) is only checked after the hook returns." +msgstr "به طور مشابه، ممکن است این قلاب در هر زیرمفسری فراخوانی شود، زیرا جایگاه :c:macro:`Py_mod_multiple_interpreters` (یا نبود آن) تنها پس از بازگشت قلاب بررسی می‌شود." + +msgid "For example::" +msgstr "برای نمونه::" + +msgid "" +"PyMODEXPORT_FUNC\n" +"PyModExport_modulename(void)\n" +"{\n" +" if (PyABIInfo_Check(&abi_info, \"modulename\") < 0) {\n" +" /* ABI mismatch. It's not safe to examine the raised exception. */\n" +" return NULL;\n" +" }\n" +"\n" +" /* use Python API (as little as possible); don't rely on GIL */\n" +"\n" +" return modulename_slots;\n" +"}" +msgstr "" +"PyMODEXPORT_FUNC\n" +"PyModExport_modulename(void)\n" +"{\n" +" if (PyABIInfo_Check(&abi_info, \"modulename\") < 0) {\n" +" /* ABI mismatch. It's not safe to examine the raised exception. */\n" +" return NULL;\n" +" }\n" +"\n" +" /* use Python API (as little as possible); don't rely on GIL */\n" +"\n" +" return modulename_slots;\n" +"}" + +msgid "It is possible to export multiple modules from a single shared library by defining multiple export hooks. However, importing them requires a custom importer or suitably named copies/links of the extension file, because Python's import machinery only finds the function corresponding to the filename. See the `Multiple modules in one library `__ section in :pep:`489` for details." +msgstr "امکان اکسپورت کردن چندین ماژول از یک کتابخانه‌ی مشترک با تعریف چندین قلاب اکسپورت وجود دارد. با این حال، ایمپورت کردن آن‌ها نیازمند یک ایمپورت‌کننده‌ی سفارشی یا کپی‌ها/پیوندهای با نام مناسب از پرونده‌ی توسعه‌ای است، زیرا مکانیزم ایمپورت پایتون فقط تابع متناظر با نام پرونده را پیدا می‌کند. برای جزئیات بیشتر بخش `Multiple modules in one library `__ را در :pep:`489` ببینید." + +msgid "Multi-phase initialization" +msgstr "مقداردهی اولیه چندمرحله‌ای" + +msgid "The process of creating an extension module follows several phases:" +msgstr "فرایند ایجاد یک ماژول توسعه‌ای شامل چند مرحله است:" + +msgid "Python finds and calls the export hook to get information on how to create the module." +msgstr "پایتون قلاب اکسپورت را پیدا کرده و فراخوانی می‌کند تا اطلاعاتی درباره‌ی نحوه‌ی ایجاد ماژول به دست آورد." + +msgid "Before any substantial code is executed, Python can determine which capabilities the module supports, and it can adjust the environment or refuse loading an incompatible extension. Slots like :c:data:`Py_mod_abi`, :c:data:`Py_mod_gil` and :c:data:`Py_mod_multiple_interpreters` influence this step." +msgstr "پیش از اجرای هرگونه کد قابل‌توجه، پایتون می‌تواند تعیین کند که ماژول از چه قابلیت‌هایی پشتیبانی می‌کند، و می‌تواند محیط را تنظیم کند یا از بارگذاری یک اکستنشن ناسازگار خودداری کند. جایگاه‌هایی مانند :c:data:`Py_mod_abi`، :c:data:`Py_mod_gil` و :c:data:`Py_mod_multiple_interpreters` روی این مرحله تأثیر می‌گذارند." + +msgid "By default, Python itself then creates the module object -- that is, it does the equivalent of calling :py:meth:`~object.__new__` when creating an object. This step can be overridden using the :c:data:`Py_mod_create` slot." +msgstr "به طور پیش‌فرض، خودِ پایتون شیء ماژول را ایجاد می‌کند -- یعنی کار معادل با فراخوانی :py:meth:`~object.__new__` را هنگام ایجاد یک شیء انجام می‌دهد. این مرحله را می‌توان با استفاده از جایگاه :c:data:`Py_mod_create` بازنویسی (override) کرد." + +msgid "Python sets initial module attributes like :attr:`~module.__package__` and :attr:`~module.__loader__`, and inserts the module object into :py:attr:`sys.modules`." +msgstr "پایتون ویژگی‌های اولیه ماژول مانند :attr:`~module.__package__` و :attr:`~module.__loader__` را تنظیم کرده و شیء ماژول را در :py:attr:`sys.modules` قرار می‌دهد." + +msgid "Afterwards, the module object is initialized in an extension-specific way -- the equivalent of :py:meth:`~object.__init__` when creating an object, or of executing top-level code in a Python-language module. The behavior is specified using the :c:data:`Py_mod_exec` slot." +msgstr "پس از آن، شیء ماژول به روشی مختصِ اکستنشن مقداردهی اولیه می‌شود -- معادل :py:meth:`~object.__init__` هنگام ایجاد یک شیء، یا اجرای کد سطح بالا در یک ماژول به زبان پایتون. رفتار مورد نظر با استفاده از جایگاه :c:data:`Py_mod_exec` مشخص می‌شود." + +msgid "This is called *multi-phase initialization* to distinguish it from the legacy (but still supported) :ref:`single-phase initialization `, where an initialization function returns a fully constructed module." +msgstr "به این کار *مقداردهی اولیه‌ی چندمرحله‌ای* گفته می‌شود تا از مقداردهی اولیه‌ی قدیمی (اما همچنان پشتیبانی‌شده) :ref:`single-phase initialization ` متمایز شود؛ در روش قدیمی، یک تابع مقداردهی اولیه، یک ماژول کاملاً ساخته‌شده را برمی‌گرداند." msgid "Added support for multi-phase initialization (:pep:`489`)." msgstr "پشتیبانی از مقداردهی اولیه چندمرحله‌ای اضافه شد (:pep:`489`)." @@ -52,8 +201,8 @@ msgstr "پشتیبانی از مقداردهی اولیه چندمرحله‌ا msgid "Multiple module instances" msgstr "نمونه‌های متعدد ماژول" -msgid "By default, extension modules are not singletons. For example, if the :py:attr:`sys.modules` entry is removed and the module is re-imported, a new module object is created, and typically populated with fresh method and type objects. The old module is subject to normal garbage collection. This mirrors the behavior of pure-Python modules." -msgstr "به‌طور پیش‌فرض، ماژول‌های توسعه‌ای تک‌نمونه نیستند. برای مثال، اگر ورودی :py:attr:`sys.modules` حذف شود و ماژول دوباره ایمپورت شود، یک شیء ماژول جدید ساخته می‌شود که معمولاً با اشیاء متد و نوع تازه پر می‌شود. ماژول قدیمی مشمول زباله‌روبی معمول می‌شود. این، بازتاب رفتار ماژول‌های پایتون خالص است." +msgid "By default, extension modules are not singletons. For example, if the :py:attr:`sys.modules` entry is removed and the module is re-imported, a new module object is created and, typically, populated with fresh method and type objects. The old module is subject to normal garbage collection. This mirrors the behavior of pure-Python modules." +msgstr "به طور پیش‌فرض، ماژول‌های توسعه‌ای تک‌نمونه (singleton) نیستند. برای مثال، اگر ورودی :py:attr:`sys.modules` حذف شود و ماژول دوباره ایمپورت شود، یک شیء ماژول جدید ایجاد می‌شود و معمولاً با اشیای متد و نوع داده‌ی تازه پر می‌شود. ماژول قدیمی مشمول زباله‌روبی عادی می‌شود. این رفتار، بازتابنده‌ی رفتار ماژول‌های خالص‌پایتون است." msgid "Additional module instances may be created in :ref:`sub-interpreters ` or after Python runtime reinitialization (:c:func:`Py_Finalize` and :c:func:`Py_Initialize`). In these cases, sharing Python objects between module instances would likely cause crashes or undefined behavior." msgstr "ممکن است نمونه‌های اضافی ماژول در :ref:`زیرمفسرها ` یا پس از راه‌اندازی مجدد ران‌تایم پایتون (:c:func:`Py_Finalize` و :c:func:`Py_Initialize`) ایجاد شوند. در این موارد، اشتراک‌گذاری اشیاء پایتون بین نمونه‌های ماژول به احتمال زیاد باعث فروپاشی یا رفتار تعریف‌نشده می‌شود." @@ -67,35 +216,23 @@ msgstr "راه ساده‌تر برای اجتناب از این مشکلات، msgid "All modules are expected to support :ref:`sub-interpreters `, or otherwise explicitly signal a lack of support. This is usually achieved by isolation or blocking repeated initialization, as above. A module may also be limited to the main interpreter using the :c:data:`Py_mod_multiple_interpreters` slot." msgstr "انتظار می‌رود تمام ماژول‌ها از :ref:`زیرمفسرها ` پشتیبانی کنند، یا در غیر این صورت، به‌صراحت عدم پشتیبانی خود را اعلام کنند. این کار معمولاً از طریق جداسازی یا مسدود کردن مقداردهی اولیه‌ی مکرر، همان‌طور که در بالا ذکر شد، انجام می‌شود. همچنین ممکن است یک ماژول با استفاده از جایگاه :c:data:`Py_mod_multiple_interpreters` به مفسر اصلی محدود شود." -msgid "Initialization function" -msgstr "تابع مقداردهی اولیه" +msgid "``PyInit`` function" +msgstr "تابع ``PyInit``" -msgid "The initialization function defined by an extension module has the following signature:" -msgstr "تابع مقدار‌دهی اولیه‌ای که توسط یک ماژول توسعه‌ای تعریف می‌شود، امضای زیر را دارد:" +msgid "This functionality will not get new features, but there are no plans to remove it." +msgstr "این قابلیت ویژگی‌های جدیدی دریافت نخواهد کرد، اما هیچ برنامه‌ای برای حذف آن وجود ندارد." -msgid "Its name should be :samp:`PyInit_{}`, with ```` replaced by the name of the module." -msgstr "نام آن باید :samp:`PyInit_{}` باشد، که در آن ```` با نام ماژول جایگزین می‌شود." +msgid "Instead of :c:func:`PyModExport_modulename`, an extension module can define an older-style :dfn:`initialization function` with the signature:" +msgstr "به جای :c:func:`PyModExport_modulename`، یک ماژول توسعه‌ای می‌تواند یک :dfn:`تابع مقداردهی اولیه` به سبک قدیمی‌تر با امضای زیر تعریف کند:" -msgid "For modules with ASCII-only names, the function must instead be named :samp:`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 :samp:`PyInitU_{}`, with ```` encoded using Python's *punycode* encoding with hyphens replaced by underscores. In Python:" -msgstr "برای ماژول‌هایی با نام‌های فقط اسکی، تابع باید در عوض :samp:`PyInit_{}` نام‌گذاری شود، که در آن ```` با نام ماژول جایگزین می‌شود. هنگام استفاده از :ref:`multi-phase-initialization`، نام‌های غیراسکی برای ماژول‌ها مجاز هستند. در این حالت، نام تابع مقداردهی اولیه :samp:`PyInitU_{}` است، که در آن ```` با استفاده از کدگذاری *punycode* پایتون کدگذاری می‌شود و خط تیره‌ها با زیرخط جایگزین می‌شوند. در پایتون:" +msgid "Its name should be :samp:`PyInit_{}`, with ```` replaced by the name of the module. For non-ASCII module names, use :samp:`PyInitU_{}` instead, with ```` encoded in the same way as for the :ref:`export hook ` (that is, using Punycode with underscores)." +msgstr "نام آن باید به صورت :samp:`PyInit_{}` باشد، به طوری که ```` با نام ماژول جایگزین شود. برای نام‌های ماژول غیر اسکی، به جای آن از :samp:`PyInitU_{}` استفاده کنید، که در آن ```` درست مانند :ref:`export hook ` (یعنی با استفاده از Punycode و زیرخط‌ها) کدگذاری شده است." -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" -msgstr "" -"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" +msgid "If a module exports both :samp:`PyInit_{}` and :samp:`PyModExport_{}`, the :samp:`PyInit_{}` function is ignored." +msgstr "اگر یک ماژول هم :samp:`PyInit_{}` و هم :samp:`PyModExport_{}` را اکسپورت کند، تابع :samp:`PyInit_{}` نادیده گرفته می‌شود." -msgid "It is recommended to define the initialization function using a helper macro:" -msgstr "توصیه می‌شود که تابع مقداردهی اولیه را با استفاده از یک ماکرو کمکی تعریف کنید:" +msgid "Like with :c:macro:`PyMODEXPORT_FUNC`, it is recommended to define the initialization function using a helper macro:" +msgstr "همانند :c:macro:`PyMODEXPORT_FUNC`، توصیه می‌شود تابع مقداردهی اولیه با استفاده از یک کلان‌دستور کمکی تعریف شود:" msgid "Declare an extension module initialization function. This macro:" msgstr "یک تابع مقداردهی اولیه‌ی ماژول توسعه‌ای را اعلان می‌کند. این ماکرو:" @@ -103,14 +240,23 @@ msgstr "یک تابع مقداردهی اولیه‌ی ماژول توسعه‌ msgid "specifies the :c:expr:`PyObject*` return type," msgstr "نوع بازگشتی :c:expr:`PyObject*` را تعیین می‌کند،" -msgid "adds any special linkage declarations required by the platform, and" -msgstr "هرگونه اعلان پیوند خاص مورد نیاز پلتفرم را می‌افزاید و" +msgid "Normally, the initialization function (``PyInit_modulename``) returns a :c:type:`PyModuleDef` instance with non-``NULL`` :c:member:`~PyModuleDef.m_slots`. This allows Python to use :ref:`multi-phase initialization `." +msgstr "معمولاً، تابع مقداردهی اولیه (``PyInit_modulename``) یک نمونه‌ی :c:type:`PyModuleDef` با مقدار :c:member:`~PyModuleDef.m_slots` غیر-``NULL`` برمی‌گرداند. این امر به پایتون اجازه می‌دهد از :ref:`مقداردهی اولیه‌ی چندمرحله‌ای ` استفاده کند." -msgid "for C++, declares the function as ``extern \"C\"``." -msgstr "برای C++، تابع را به‌صورت ``extern \"C\"`` اعلان می‌کند." +msgid "Before it is returned, the ``PyModuleDef`` instance must be initialized using the following function:" +msgstr "پیش از بازگردانده شدن نمونه‌ی ``PyModuleDef``، باید با استفاده از تابع زیر مقداردهی اولیه شود:" -msgid "For example, a module called ``spam`` would be defined like this::" -msgstr "برای مثال، ماژولی به نام ``spam`` به شکل زیر تعریف می‌شود::" +msgid "Ensure a module definition is a properly initialized Python object that correctly reports its type and a reference count." +msgstr "اطمینان حاصل می‌کند که تعریف ماژول، یک شیء پایتونِ به‌درستی مقداردهی‌شده است که نوع و شمارش ارجاع خود را به‌درستی گزارش می‌کند." + +msgid "Return *def* cast to ``PyObject*``, or ``NULL`` if an error occurred." +msgstr "*def* قالب‌ریزی‌شده به ``PyObject*`` را برمی‌گرداند، یا ``NULL`` را در صورت وقوع خطا." + +msgid "Calling this function is required before returning a :c:type:`PyModuleDef` from a module initialization function. It should not be used in other contexts." +msgstr "فراخوانی این تابع پیش از بازگرداندن :c:type:`PyModuleDef` از درون یک تابع مقداردهی اولیه‌ی ماژول الزامی است. نباید از آن در زمینه‌های دیگر استفاده شود." + +msgid "Note that Python assumes that ``PyModuleDef`` structures are statically allocated. This function may return either a new reference or a borrowed one; this reference must not be released." +msgstr "توجه داشته باشید که پایتون فرض می‌کند ساختارهای ``PyModuleDef`` به‌صورت ایستا تخصیص یافته‌اند. این تابع ممکن است یک ارجاع جدید یا یک ارجاع امانتی برگرداند؛ این ارجاع نباید آزاد شود." msgid "" "static struct PyModuleDef spam_module = {\n" @@ -137,38 +283,17 @@ msgstr "" " return PyModuleDef_Init(&spam_module);\n" "}" -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 "با تعریف چند تابع مقداردهی اولیه می‌توان چند ماژول را از یک کتابخانه اشتراکی واحد اکسپورت کرد. با این حال، ایمپورت کردن آن‌ها مستلزم استفاده از پیوند‌های نمادین یا یک ایمپورت‌کننده سفارشی است، زیرا به‌طور پیش‌فرض تنها تابع متناظر با نام پرونده پیدا می‌شود. برای جزئیات، به بخش `چند ماژول در یک کتابخانه `__ در :pep:`489` مراجعه کنید." - -msgid "The initialization function is typically the only non-\\ ``static`` item defined in the module's C source." -msgstr "تابع مقداردهی اولیه معمولاً تنها آیتم غیر\\ ``static`` تعریف‌شده در کد منبع C ماژول است." - -msgid "Multi-phase initialization" -msgstr "مقداردهی اولیه چندمرحله‌ای" - -msgid "Normally, the :ref:`initialization function ` (``PyInit_modulename``) returns a :c:type:`PyModuleDef` instance with non-``NULL`` :c:member:`~PyModuleDef.m_slots`. Before it is returned, the ``PyModuleDef`` instance must be initialized using the following function:" -msgstr "معمولاً، :ref:`تابع مقدار‌دهی اولیه ` (``PyInit_modulename``) نمونه‌ای از :c:type:`PyModuleDef` برمی‌گرداند که :c:member:`~PyModuleDef.m_slots` آن غیر ``NULL`` است. پیش از آنکه بازگردانده شود، نمونه‌ی ``PyModuleDef`` باید با استفاده از تابع زیر مقدار‌دهی اولیه شود:" - -msgid "Ensure a module definition is a properly initialized Python object that correctly reports its type and a reference count." -msgstr "اطمینان حاصل می‌کند که تعریف ماژول، یک شیء پایتونِ به‌درستی مقداردهی‌شده است که نوع و شمارش ارجاع خود را به‌درستی گزارش می‌کند." - -msgid "Return *def* cast to ``PyObject*``, or ``NULL`` if an error occurred." -msgstr "*def* قالب‌ریزی‌شده به ``PyObject*`` را برمی‌گرداند، یا ``NULL`` را در صورت وقوع خطا." - -msgid "Calling this function is required for :ref:`multi-phase-initialization`. It should not be used in other contexts." -msgstr "فراخوانی این تابع برای :ref:`multi-phase-initialization` لازم است. این تابع نباید در زمینه‌های دیگر استفاده شود." - -msgid "Note that Python assumes that ``PyModuleDef`` structures are statically allocated. This function may return either a new reference or a borrowed one; this reference must not be released." -msgstr "توجه داشته باشید که پایتون فرض می‌کند ساختارهای ``PyModuleDef`` به‌صورت ایستا تخصیص یافته‌اند. این تابع ممکن است یک ارجاع جدید یا یک ارجاع امانتی برگرداند؛ این ارجاع نباید آزاد شود." - msgid "Legacy single-phase initialization" msgstr "مقداردهی اولیه تک‌مرحله‌ای قدیمی" msgid "Single-phase initialization is a legacy mechanism to initialize extension modules, with known drawbacks and design flaws. Extension module authors are encouraged to use multi-phase initialization instead." msgstr "راه‌اندازی تک‌فازی (single-phase initialization) سازوکاری قدیمی برای راه‌اندازی ماژول‌های توسعه‌ای است و معایب شناخته‌شده و نقص‌های طراحی دارد. به نویسندگان ماژول‌های توسعه‌ای توصیه می‌شود که به‌جای آن از راه‌اندازی چندفازی (multi-phase initialization) استفاده کنند." -msgid "In single-phase initialization, the :ref:`initialization function ` (``PyInit_modulename``) should create, populate and return a module object. This is typically done using :c:func:`PyModule_Create` and functions like :c:func:`PyModule_AddObjectRef`." -msgstr "در مقداردهی اولیه تک‌فازی، :ref:`تابع مقداردهی اولیه ` (``PyInit_modulename``) باید یک شیء ماژول ایجاد کند، آن را پر کند و بازگرداند. این کار معمولاً با استفاده از :c:func:`PyModule_Create` و توابعی مانند :c:func:`PyModule_AddObjectRef` انجام می‌شود." +msgid "However, there are no plans to remove support for it." +msgstr "با این حال، هیچ برنامه‌ای برای حذف پشتیبانی از آن وجود ندارد." + +msgid "In single-phase initialization, the old-style :ref:`initialization function ` (``PyInit_modulename``) should create, populate and return a module object. This is typically done using :c:func:`PyModule_Create` and functions like :c:func:`PyModule_AddObjectRef`." +msgstr "در مقداردهی اولیه‌ی تک‌مرحله‌ای، :ref:`تابع مقداردهی اولیه‌ی ` سبک قدیمی (``PyInit_modulename``) باید یک شیء ماژول را ایجاد کرده، مقداردهی کند و برگرداند. این کار معمولاً با استفاده از :c:func:`PyModule_Create` و توابعی مانند :c:func:`PyModule_AddObjectRef` انجام می‌شود." msgid "Single-phase initialization differs from the :ref:`default ` in the following ways:" msgstr "مقداردهی اولیه تک‌فازی در موارد زیر با :ref:`پیش‌فرض ` تفاوت دارد:" @@ -224,5 +349,14 @@ msgstr "نام‌های ماژول غیراسکی (``PyInitU_modulename``) پش msgid "Single-phase modules support module lookup functions like :c:func:`PyState_FindModule`." msgstr "ماژول‌های تک‌فازی از توابع جستجوی ماژول مانند :c:func:`PyState_FindModule` پشتیبانی می‌کنند." +msgid "The module's :c:member:`PyModuleDef.m_slots` must be NULL." +msgstr "فیلد :c:member:`PyModuleDef.m_slots` در ماژول باید NULL باشد." + msgid "``_testsinglephase`` is an internal module used in CPython's self-test suite; your installation may or may not include it." msgstr "``_testsinglephase`` یک ماژول داخلی است که در بدنه خودآزمون سی‌پایتون استفاده می‌شود؛ ممکن است نصب شما شامل آن باشد یا نباشد." + +#~ msgid "Normally, the initialization function returns a module definition initialized using :c:func:`PyModuleDef_Init`. This allows splitting the creation process into several phases:" +#~ msgstr "به‌طور معمول، تابع مقداردهی اولیه، تعریف ماژولی را برمی‌گرداند که با استفاده از :c:func:`PyModuleDef_Init` مقداردهی اولیه شده است. این اجازه می‌دهد فرایند ایجاد به چندین مرحله تقسیم شود:" + +#~ msgid "Its name should be :samp:`PyInit_{}`, with ```` replaced by the name of the module." +#~ msgstr "نام آن باید :samp:`PyInit_{}` باشد، که در آن ```` با نام ماژول جایگزین می‌شود." diff --git a/c-api/float.po b/c-api/float.po index 67b31b82..276d9441 100644 --- a/c-api/float.po +++ b/c-api/float.po @@ -6,12 +6,13 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 13:21+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -64,8 +65,8 @@ msgstr "کمترین عدد اعشاری مثبت نرمال‌شده *DBL_MIN* msgid "This macro expands to a constant expression of type :c:expr:`double`, that represents the positive infinity." msgstr "این ماکرو به یک عبارت ثابت از نوع :c:expr:`double` بسط می‌یابد که بی‌نهایت مثبت را نشان می‌دهد." -msgid "On most platforms, this is equivalent to the :c:macro:`!INFINITY` macro from the C11 standard ```` header." -msgstr "در بیشتر پلتفرم‌ها، این معادل ماکروی :c:macro:`!INFINITY` از سرآیند ```` استاندارد C11 است." +msgid "It is equivalent to the :c:macro:`!INFINITY` macro from the C11 standard ```` header." +msgstr "این معادل کلان‌دستور :c:macro:`!INFINITY` از سرآیند ```` استاندارد C11 است." msgid "This macro expands to a constant expression of type :c:expr:`double`, that represents a quiet not-a-number (qNaN) value." msgstr "این ماکرو به عبارت ثابتی از نوع :c:expr:`double` بسط می‌یابد که نشان‌دهنده‌ی مقدار عدد-نیست ساکت (qNaN) است." @@ -76,9 +77,6 @@ msgstr "در بیشتر پلتفرم‌ها، این معادل ماکروی :c: msgid "Equivalent to :c:macro:`!INFINITY`." msgstr "معادل :c:macro:`!INFINITY` است." -msgid "The macro is :term:`soft deprecated`." -msgstr "این ماکرو :term:`soft deprecated` است." - msgid "The definition (accurate for a :c:expr:`double` type) of the :data:`math.e` constant." msgstr "تعریف ثابت :data:`math.e` (دقیق برای نوع :c:expr:`double`)." @@ -112,54 +110,51 @@ msgstr "return PyFloat_FromDouble(copysign(INFINITY, sign));" msgid "Return ``1`` if the given floating-point number *X* is finite, that is, it is normal, subnormal or zero, but not infinite or NaN. Return ``0`` otherwise." msgstr "اگر عدد ممیز شناور داده‌شده *X* متناهی باشد، یعنی نرمال، زیرنرمال یا صفر باشد، اما بی‌نهایت یا NaN نباشد، ``1`` را برمی‌گرداند. در غیر این صورت ``0`` را برمی‌گرداند." -msgid "The macro is :term:`soft deprecated`. Use :c:macro:`!isfinite` instead." -msgstr "این ماکرو :term:`نرم‌منسوخ (soft deprecated) ` است. به‌جای آن از :c:macro:`!isfinite` استفاده کنید." +msgid "Use :c:macro:`!isfinite` instead." +msgstr "به جای آن از :c:macro:`!isfinite` استفاده کنید." msgid "Return ``1`` if the given floating-point number *X* is positive or negative infinity. Return ``0`` otherwise." msgstr "اگر عدد ممیز شناورِ داده‌شده‌ی *X* بی‌نهایت مثبت یا منفی باشد، ``1`` را برمی‌گرداند. در غیر این صورت ``0`` را برمی‌گرداند." -msgid "The macro is :term:`soft deprecated`. Use :c:macro:`!isinf` instead." -msgstr "این ماکرو :term:`منسوخ نرم ` است. به‌جای آن از :c:macro:`!isinf` استفاده کنید." +msgid "Use :c:macro:`!isinf` instead." +msgstr "به جای آن از :c:macro:`!isinf` استفاده کنید." msgid "Return ``1`` if the given floating-point number *X* is a not-a-number (NaN) value. Return ``0`` otherwise." msgstr "اگر عدد ممیز شناورِ داده‌شده‌ی *X* مقداری غیرعددی (NaN) باشد، ``1`` را برمی‌گرداند. در غیر این صورت ``0`` را برمی‌گرداند." -msgid "The macro is :term:`soft deprecated`. Use :c:macro:`!isnan` instead." -msgstr "این ماکرو :term:`soft deprecated` است. به‌جای آن از :c:macro:`!isnan` استفاده کنید." +msgid "Use :c:macro:`!isnan` instead." +msgstr "به جای آن از :c:macro:`!isnan` استفاده کنید." msgid "Pack and Unpack functions" msgstr "توابع بسته‌بندی و باز کردن بسته‌بندی" -msgid "The pack and unpack functions provide an efficient platform-independent way to store floating-point values as byte strings. The Pack routines produce a bytes string from a C :c:expr:`double`, and the Unpack routines produce a C :c:expr:`double` from such a bytes string. The suffix (2, 4 or 8) specifies the number of bytes in the bytes string." -msgstr "توابع pack و unpack راهی کارآمد و مستقل از پلتفرم برای ذخیره‌سازی مقادیر ممیز شناور به‌صورت رشته‌های بایتی فراهم می‌کنند. روال‌های Pack از یک :c:expr:`double` در C یک رشته بایتی تولید می‌کنند و روال‌های Unpack از چنین رشته بایتی، یک :c:expr:`double` در C تولید می‌کنند. پسوند (۲، ۴ یا ۸) تعداد بایت‌های رشته بایتی را مشخص می‌کند." +msgid "The pack and unpack functions provide an efficient platform-independent way to store floating-point values as byte strings. The Pack routines produce a bytes string from a C :c:expr:`double`, and the Unpack routines produce a C :c:expr:`double` from such a bytes string. The suffix (2, 4 or 8) specifies the number of bytes in the bytes string:" +msgstr "توابع pack و unpack روشی کارآمد و مستقل از پلتفرم برای ذخیره‌سازی مقادیر ممیز شناور به صورت رشته‌های بایتی فراهم می‌کنند. روال‌های Pack یک رشته‌ی bytes از یک :c:expr:`double` در زبان C تولید می‌کنند و روال‌های Unpack یک :c:expr:`double` در زبان C را از چنین رشته‌ی bytesی به دست می‌آورند. پسوند (۲، ۴ یا ۸) تعداد بایت‌ها را در رشته‌ی bytes مشخص می‌کند:" + +msgid "The 2-byte format is the IEEE 754 binary16 half-precision format." +msgstr "فرمت ۲ بایتی، فرمت دقت نیمه‌ی binary16 استاندارد IEEE 754 است." -msgid "On platforms that appear to use IEEE 754 formats these functions work by copying bits. On other platforms, the 2-byte format is identical to the IEEE 754 binary16 half-precision format, the 4-byte format (32-bit) is identical to the IEEE 754 binary32 single precision format, and the 8-byte format to the IEEE 754 binary64 double precision format, although the packing of INFs and NaNs (if such things exist on the platform) isn't handled correctly, and attempting to unpack a bytes string containing an IEEE INF or NaN will raise an exception." -msgstr "در پلتفرم‌هایی که به نظر می‌رسد از قالب‌های IEEE 754 استفاده می‌کنند، این توابع با کپی کردن بیت‌ها کار می‌کنند. در پلتفرم‌های دیگر، قالب ۲ بایتی با قالب دقت نصف binary16 در IEEE 754 یکسان است، قالب ۴ بایتی (۳۲ بیتی) با قالب دقت منفرد binary32 در IEEE 754 یکسان است و قالب ۸ بایتی با قالب دقت مضاعف binary64 در IEEE 754 یکسان است؛ هرچند بسته‌بندی مقادیر INF و NaN (اگر چنین مقادیری در پلتفرم وجود داشته باشند) به‌درستی مدیریت نمی‌شود و تلاش برای واگشایی رشته بایتی حاوی INF یا NaN مطابق با IEEE، منجر به ایجاد استثنا می‌شود." +msgid "The 4-byte format is the IEEE 754 binary32 single-precision format." +msgstr "فرمت ۴ بایتی، فرمت دقت تک (single-precision) استاندارد IEEE 754 binary32 است." -msgid "Note that NaN type may not be preserved on IEEE platforms (signaling NaNs become quiet NaNs), for example on x86 systems in 32-bit mode." -msgstr "توجه داشته باشید که نوع NaN ممکن است روی سکوهای IEEE حفظ نشود (NaNهای سیگنال‌دهنده به NaNهای خاموش (quiet NaN) تبدیل می‌شوند)، برای مثال روی سیستم‌های x86 در حالت ۳۲ بیتی." +msgid "The 8-byte format is the IEEE 754 binary64 double-precision format." +msgstr "فرمت ۸ بایتی، فرمت ممیز شناور با دقت مضاعف binary64 استاندارد IEEE 754 است." -msgid "On non-IEEE platforms with more precision, or larger dynamic range, than IEEE 754 supports, not all values can be packed; on non-IEEE platforms with less precision, or smaller dynamic range, not all values can be unpacked. What happens in such cases is partly accidental (alas)." -msgstr "در پلتفرم‌های غیر IEEE که دقتی بیشتر از آنچه IEEE 754 از آن پشتیبانی می‌کند دارند، یا گستره پویایی بزرگ‌تری دارند، نمی‌توان همه مقادیر را بسته‌بندی کرد؛ در پلتفرم‌های غیر IEEE با دقت کمتر، یا گستره پویایی کوچک‌تر، نمی‌توان همه مقادیر را واگشایی کرد. آنچه در چنین مواردی رخ می‌دهد تا حدی اتفاقی است (متأسفانه)." +msgid "The NaN type may not be preserved on some platforms while unpacking (signaling NaNs become quiet NaNs), for example on x86 systems in 32-bit mode." +msgstr "نوع NaN ممکن است روی برخی از پلتفرم‌ها هنگام بازکردن بسته حفظ نشود (مقادیر signaling NaN به quiet NaN تبدیل می‌شوند)، برای مثال روی سیستم‌های x86 در حالت ۳۲ بیتی." + +msgid "It's assumed that the :c:expr:`double` type has the IEEE 754 binary64 double precision format. What happens if it's not true is partly accidental (alas). On non-IEEE platforms with more precision, or larger dynamic range, than IEEE 754 supports, not all values can be packed; on non-IEEE platforms with less precision, or smaller dynamic range, not all values can be unpacked. The packing of special numbers like INFs and NaNs (if such things exist on the platform) may not be handled correctly, and attempting to unpack a bytes string containing an IEEE INF or NaN may raise an exception." +msgstr "فرض بر این است که نوع :c:expr:`double` دارای فرمت ممیز شناور با دقت مضاعف binary64 استاندارد IEEE 754 است. این که اگر این طور نباشد چه اتفاقی می‌افتد تا حدی اتفاقی است (متأسفانه). روی پلتفرم‌های غیر IEEE با دقت بیشتر یا بازه‌ی پویای بزرگ‌تر نسبت به آن چه IEEE 754 پشتیبانی می‌کند، همه‌ی مقادیر را نمی‌توان بسته‌بندی کرد؛ و روی پلتفرم‌های غیر IEEE با دقت کمتر یا بازه‌ی پویای کوچک‌تر، همه‌ی مقادیر را نمی‌توان باز کرد. بسته‌بندی اعداد خاص مانند INFها و NaNها (اگر چنین چیزهایی روی پلتفرم وجود داشته باشد) ممکن است به درستی مدیریت نشود و تلاش برای بازکردن بسته‌ی یک رشته‌ی bytes حاوی یک INF یا NaN استاندارد IEEE ممکن است باعث بروز یک استثنا شود." msgid "Pack functions" msgstr "توابع بسته‌بندی" -msgid "The pack routines write 2, 4 or 8 bytes, starting at *p*. *le* is an :c:expr:`int` argument, non-zero if you want the bytes string in little-endian format (exponent last, at ``p+1``, ``p+3``, or ``p+6`` and ``p+7``), zero if you want big-endian format (exponent first, at *p*). The :c:macro:`PY_BIG_ENDIAN` constant can be used to use the native endian: it is equal to ``1`` on big endian processor, or ``0`` on little endian processor." -msgstr "روال‌های بسته‌بندی ۲، ۴ یا ۸ بایت را با شروع از *p* می‌نویسند. *le* یک آرگومان :c:expr:`int` است؛ اگر می‌خواهید رشته بایتی در قالب کوچک‌اندیان باشد، ناصفر است (توان در انتها، در ``p+1``، ``p+3``، یا ``p+6`` و ``p+7``)، و اگر قالب بزرگ‌اندیان را می‌خواهید، صفر است (توان در ابتدا، در *p*). برای استفاده از اندیان بومی می‌توان از ثابت :c:macro:`PY_BIG_ENDIAN` بهره گرفت: این ثابت روی پردازنده‌های بزرگ‌اندیان برابر ``1`` و روی پردازنده‌های کوچک‌اندیان برابر ``0`` است." +msgid "The pack routines write 2, 4 or 8 bytes, starting at *p*. *le* is an :c:expr:`int` argument, non-zero if you want the bytes string in little-endian format (exponent last, at ``p+1``, ``p+3``, or ``p+6`` and ``p+7``), zero if you want big-endian format (exponent first, at *p*). Use the :c:macro:`!PY_LITTLE_ENDIAN` constant to select the native endian: it is equal to ``0`` on big endian processor, or ``1`` on little endian processor." +msgstr "روال‌های pack تعداد ۲، ۴ یا ۸ بایت را از *p* به بعد می‌نویسند. پارامتر *le* یک آرگومان :c:expr:`int` است که اگر بخواهید رشته‌ی بایتی در فرمت کوچک‌اندیان (توان در انتها، در ``p+1``، ``p+3``، یا ``p+6`` و ``p+7``) باشد، غیرصفر است و اگر فرمت بزرگ‌اندیان (توان در ابتدا، در *p*) را بخواهید، صفر است. از ثابت :c:macro:`!PY_LITTLE_ENDIAN` برای انتخاب اندیان بومی استفاده کنید: این مقدار روی پردازنده‌ی بزرگ‌اندیان برابر با ``0`` و روی پردازنده‌ی کوچک‌اندیان برابر با ``1`` است." msgid "Return value: ``0`` if all is OK, ``-1`` if error (and an exception is set, most likely :exc:`OverflowError`)." msgstr "مقدار بازگشتی: ``0`` در صورت موفقیت، ``-1`` در صورت خطا (و استثنا تنظیم‌شده است، به احتمال زیاد :exc:`OverflowError`)." -msgid "There are two problems on non-IEEE platforms:" -msgstr "دو مشکل در پلتفرم‌های غیر IEEE وجود دارد:" - -msgid "What this does is undefined if *x* is a NaN or infinity." -msgstr "اگر *x* یک NaN یا بی‌نهایت باشد، آنچه این انجام می‌دهد تعریف‌نشده است." - -msgid "``-0.0`` and ``+0.0`` produce the same bytes string." -msgstr "``-0.0`` و ``+0.0`` همان رشته بایت را تولید می‌کنند." - msgid "Pack a C double as the IEEE 754 binary16 half-precision format." msgstr "یک ممیز شناور با دقت مضاعف در C را به قالب binary16 با دقت نصف IEEE 754 بسته‌بندی می‌کند." @@ -172,15 +167,12 @@ msgstr "یک double زبان C را به قالب دقت مضاعف binary64 ا msgid "Unpack functions" msgstr "توابع واگشایی" -msgid "The unpack routines read 2, 4 or 8 bytes, starting at *p*. *le* is an :c:expr:`int` argument, non-zero if the bytes string is in little-endian format (exponent last, at ``p+1``, ``p+3`` or ``p+6`` and ``p+7``), zero if big-endian (exponent first, at *p*). The :c:macro:`PY_BIG_ENDIAN` constant can be used to use the native endian: it is equal to ``1`` on big endian processor, or ``0`` on little endian processor." -msgstr "روال‌های واگشایی ۲، ۴ یا ۸ بایت را با شروع از *p* می‌خوانند. *le* یک آرگومان :c:expr:`int` است؛ اگر رشته بایتی در قالب کوچک‌اندیان باشد، ناصفر است (نما در انتها، در ``p+1``، ``p+3`` یا ``p+6`` و ``p+7``)، و اگر بزرگ‌اندیان باشد، صفر است (نما در ابتدا، در *p*). می‌توان ثابت :c:macro:`PY_BIG_ENDIAN` را برای بهره‌گیری از اندیان بومی به کار برد: این ثابت روی پردازنده‌ی بزرگ‌اندیان برابر ``1``، یا روی پردازنده‌ی کوچک‌اندیان برابر ``0`` است." +msgid "The unpack routines read 2, 4 or 8 bytes, starting at *p*. *le* is an :c:expr:`int` argument, non-zero if the bytes string is in little-endian format (exponent last, at ``p+1``, ``p+3`` or ``p+6`` and ``p+7``), zero if big-endian (exponent first, at *p*). Use the :c:macro:`!PY_LITTLE_ENDIAN` constant to select the native endian: it is equal to ``0`` on big endian processor, or ``1`` on little endian processor." +msgstr "روال‌های unpack تعداد ۲، ۴ یا ۸ بایت را از *p* به بعد می‌خوانند. پارامتر *le* یک آرگومان :c:expr:`int` است که اگر رشته‌ی بایتی در فرمت کوچک‌اندیان (توان در انتها، در ``p+1``، ``p+3`` یا ``p+6`` و ``p+7``) باشد، غیرصفر است و اگر بزرگ‌اندیان باشد (توان در ابتدا، در *p*)، صفر است. از ثابت :c:macro:`!PY_LITTLE_ENDIAN` برای انتخاب اندیان بومی استفاده کنید: این مقدار روی پردازنده‌ی بزرگ‌اندیان برابر با ``0`` و روی پردازنده‌ی کوچک‌اندیان برابر با ``1`` است." msgid "Return value: The unpacked double. On error, this is ``-1.0`` and :c:func:`PyErr_Occurred` is true (and an exception is set, most likely :exc:`OverflowError`)." msgstr "مقدار بازگشتی: ممیز شناور با دقت مضاعفِ واگشایی‌شده. در صورت خطا، این مقدار ``-1.0`` است و :c:func:`PyErr_Occurred` درست است (و استثنایی تنظیم‌شده است که به احتمال زیاد :exc:`OverflowError` است)." -msgid "Note that on a non-IEEE platform this will refuse to unpack a bytes string that represents a NaN or infinity." -msgstr "توجه داشته باشید که روی یک پلتفرم غیر IEEE، این از واگشایی کردن رشته‌ی بایتی که نمایانگر NaN یا بی‌نهایت است، خودداری خواهد کرد." - msgid "Unpack the IEEE 754 binary16 half-precision format as a C double." msgstr "قالب IEEE 754 binary16 با دقت نصف را به‌صورت یک double در C واگشایی می‌کند." @@ -195,3 +187,21 @@ msgstr "شیء" msgid "floating-point" msgstr "ممیز شناور" + +#~ msgid "The macro is :term:`soft deprecated`." +#~ msgstr "این ماکرو :term:`soft deprecated` است." + +#~ msgid "On platforms that appear to use IEEE 754 formats these functions work by copying bits. On other platforms, the 2-byte format is identical to the IEEE 754 binary16 half-precision format, the 4-byte format (32-bit) is identical to the IEEE 754 binary32 single precision format, and the 8-byte format to the IEEE 754 binary64 double precision format, although the packing of INFs and NaNs (if such things exist on the platform) isn't handled correctly, and attempting to unpack a bytes string containing an IEEE INF or NaN will raise an exception." +#~ msgstr "در پلتفرم‌هایی که به نظر می‌رسد از قالب‌های IEEE 754 استفاده می‌کنند، این توابع با کپی کردن بیت‌ها کار می‌کنند. در پلتفرم‌های دیگر، قالب ۲ بایتی با قالب دقت نصف binary16 در IEEE 754 یکسان است، قالب ۴ بایتی (۳۲ بیتی) با قالب دقت منفرد binary32 در IEEE 754 یکسان است و قالب ۸ بایتی با قالب دقت مضاعف binary64 در IEEE 754 یکسان است؛ هرچند بسته‌بندی مقادیر INF و NaN (اگر چنین مقادیری در پلتفرم وجود داشته باشند) به‌درستی مدیریت نمی‌شود و تلاش برای واگشایی رشته بایتی حاوی INF یا NaN مطابق با IEEE، منجر به ایجاد استثنا می‌شود." + +#~ msgid "There are two problems on non-IEEE platforms:" +#~ msgstr "دو مشکل در پلتفرم‌های غیر IEEE وجود دارد:" + +#~ msgid "What this does is undefined if *x* is a NaN or infinity." +#~ msgstr "اگر *x* یک NaN یا بی‌نهایت باشد، آنچه این انجام می‌دهد تعریف‌نشده است." + +#~ msgid "``-0.0`` and ``+0.0`` produce the same bytes string." +#~ msgstr "``-0.0`` و ``+0.0`` همان رشته بایت را تولید می‌کنند." + +#~ msgid "Note that on a non-IEEE platform this will refuse to unpack a bytes string that represents a NaN or infinity." +#~ msgstr "توجه داشته باشید که روی یک پلتفرم غیر IEEE، این از واگشایی کردن رشته‌ی بایتی که نمایانگر NaN یا بی‌نهایت است، خودداری خواهد کرد." diff --git a/c-api/function.po b/c-api/function.po index 986ce294..ebaabaa1 100644 --- a/c-api/function.po +++ b/c-api/function.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 00:48+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -121,6 +122,9 @@ msgstr "``PyFunction_EVENT_MODIFY_DEFAULTS``" msgid "``PyFunction_EVENT_MODIFY_KWDEFAULTS``" msgstr "``PyFunction_EVENT_MODIFY_KWDEFAULTS``" +msgid "``PyFunction_PYFUNC_EVENT_MODIFY_QUALNAME``" +msgstr "``PyFunction_PYFUNC_EVENT_MODIFY_QUALNAME``" + msgid "Type of a function watcher callback function." msgstr "نوع تابع کال‌بک دیده‌بان (watcher) تابع." @@ -133,8 +137,8 @@ msgstr "کال‌بک می‌تواند *func* را بررسی کند اما ن msgid "If *event* is ``PyFunction_EVENT_CREATE``, then the callback is invoked after *func* has been fully initialized. Otherwise, the callback is invoked before the modification to *func* takes place, so the prior state of *func* can be inspected. The runtime is permitted to optimize away the creation of function objects when possible. In such cases no event will be emitted. Although this creates the possibility of an observable difference of runtime behavior depending on optimization decisions, it does not change the semantics of the Python code being executed." msgstr "اگر *event* برابر ``PyFunction_EVENT_CREATE`` باشد، کال‌بک پس از آنکه *func* به‌طور کامل مقداردهی اولیه‌شده باشد فراخوانی می‌شود. در غیر این صورت، کال‌بک پیش از اعمال تغییر روی *func* فراخوانی می‌شود، به‌طوری‌که بتوان وضعیت پیشین *func* را بررسی کرد. ران‌تایم مجاز است در صورت امکان، ایجاد اشیاء تابع را با بهینه‌سازی حذف کند. در چنین مواردی هیچ رویدادی منتشر نخواهد شد. اگرچه این امر امکان بروز تفاوت قابل مشاهده در رفتار ران‌تایم بسته به تصمیمات بهینه‌سازی را ایجاد می‌کند، اما معناشناسی کد پایتون در حال اجرا را تغییر نمی‌دهد." -msgid "If *event* is ``PyFunction_EVENT_DESTROY``, Taking a reference in the callback to the about-to-be-destroyed function will resurrect it, preventing it from being freed at this time. When the resurrected object is destroyed later, any watcher callbacks active at that time will be called again." -msgstr "اگر *event* برابر با ``PyFunction_EVENT_DESTROY`` باشد، گرفتن ارجاعی در کال‌بک به تابعی که در آستانه‌ی نابودی است، آن را احیا می‌کند و مانع از آزاد شدن آن در این زمان می‌شود. هنگامی که شیء احیا‌شده بعداً نابود شود، هر کال‌بک ناظری که در آن زمان فعال باشد، دوباره فراخوانی خواهد شد." +msgid "If *event* is ``PyFunction_EVENT_DESTROY``, taking a reference in the callback to the about-to-be-destroyed function will resurrect it, preventing it from being freed at this time. When the resurrected object is destroyed later, any watcher callbacks active at that time will be called again." +msgstr "اگر *event* برابر با ``PyFunction_EVENT_DESTROY`` باشد، گرفتن یک ارجاع در فراخوانی بازگشتی به تابعی که در حال نابود شدن است، آن را احیا کرده و مانع از آزاد شدن آن در این مرحله می‌شود. هنگامی که شیء احیا شده بعداً نابود شود، هر گونه کال‌بک دیده‌بان (watcher) که در آن زمان فعال باشد دوباره فراخوانی خواهد شد." 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 "اگر کال‌بک استثنایی تنظیم کند، باید ``-1`` را بازگرداند؛ این استثنا با استفاده از :c:func:`PyErr_WriteUnraisable` به‌عنوان یک استثنای غیرقابل برافراشتن (unraisable) چاپ خواهد شد. در غیر این صورت باید ``0`` را بازگرداند." diff --git a/c-api/gcsupport.po b/c-api/gcsupport.po index 23443920..2bdaa69d 100644 --- a/c-api/gcsupport.po +++ b/c-api/gcsupport.po @@ -7,12 +7,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 00:48+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -163,43 +164,188 @@ msgstr "هندلر :c:member:`~PyTypeObject.tp_traverse` یک پارامتر ت msgid "Type of the visitor function passed to the :c:member:`~PyTypeObject.tp_traverse` handler. The function should be called with an object to traverse as *object* and the third parameter to the :c:member:`~PyTypeObject.tp_traverse` handler as *arg*. The Python core uses several visitor functions to implement cyclic garbage detection; it's not expected that users will need to write their own visitor functions." msgstr "نوع تابع بازدیدکننده (visitor function) که به هندلر :c:member:`~PyTypeObject.tp_traverse` پاس داده می‌شود. این تابع باید با یک شیء برای پیمایش به‌عنوان *object* و پارامتر سوم هندلر :c:member:`~PyTypeObject.tp_traverse` به‌عنوان *arg* فراخوانی شود. هسته‌ی پایتون از چندین تابع بازدیدکننده برای پیاده‌سازی تشخیص زباله‌ی چرخه‌ای استفاده می‌کند؛ انتظار نمی‌رود که کاربران نیازی به نوشتن توابع بازدیدکننده‌ی خودشان داشته باشند." -msgid "The :c:member:`~PyTypeObject.tp_traverse` handler must have the following type:" -msgstr "هندلر :c:member:`~PyTypeObject.tp_traverse` باید از نوع زیر باشد:" +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:member:`~PyTypeObject.tp_clear` باید از نوع :c:type:`inquiry` باشد، یا در صورتی که شیء تغییرناپذیر است، ``NULL`` باشد." -msgid "Traversal function for a container object. Implementations must call the *visit* function for each object directly contained by *self*, with the parameters to *visit* being the contained object and the *arg* value passed to the handler. The *visit* function must not be called with a ``NULL`` object argument. If *visit* returns a non-zero value that value should be returned immediately." -msgstr "تابع پیمایش برای یک شیء ظرف. پیاده‌سازی‌ها باید تابع *visit* را برای هر شیء‌ای که مستقیماً توسط *self* دربرگرفته شده است فراخوانی کنند، به‌طوری که پارامترهای *visit*، شیء دربرگرفته و مقدار *arg*ِ ارسال‌شده به هندلر باشند. تابع *visit* نباید با آرگومان شیء ``NULL`` فراخوانی شود. اگر *visit* مقدار غیرصفر برگرداند، آن مقدار باید بی‌درنگ بازگردانده شود." +msgid "Drop references that may have created reference cycles. Immutable objects do not have to define this method since they can never directly create reference cycles. Note that the object must still be valid after calling this method (don't just call :c:func:`Py_DECREF` on a reference). The collector will call this method if it detects that this object is involved in a reference cycle." +msgstr "ارجاع‌هایی را که ممکن است چرخه‌های ارجاع ایجاد کرده باشند رها کنید. اشیاء تغییرناپذیر نیازی به تعریف این متد ندارند، زیرا هرگز نمی‌توانند به‌طور مستقیم چرخه‌های ارجاع ایجاد کنند. توجه داشته باشید که شیء باید پس از فراخوانی این متد همچنان معتبر باشد (تنها :c:func:`Py_DECREF` را روی یک ارجاع فراخوانی نکنید). زباله‌روب در صورتی که تشخیص دهد این شیء در یک چرخه ارجاع درگیر است، این متد را فراخوانی خواهد کرد." -msgid "The traversal function must not have any side effects. Implementations may not modify the reference counts of any Python objects nor create or destroy any Python objects." -msgstr "تابع پیمایش نباید هیچ اثر جانبی داشته باشد. پیاده‌سازی‌ها نباید شمارش ارجاع هیچ‌یک از اشیاء پایتون را تغییر دهند و نباید هیچ شیء پایتونی ایجاد یا نابود کنند." +msgid "Traversal" +msgstr "پیمایش" -msgid "To simplify writing :c:member:`~PyTypeObject.tp_traverse` handlers, a :c:func:`Py_VISIT` macro is provided. In order to use this macro, the :c:member:`~PyTypeObject.tp_traverse` implementation must name its arguments exactly *visit* and *arg*:" -msgstr "برای ساده‌سازی نوشتن هندلرهای :c:member:`~PyTypeObject.tp_traverse`، ماکروی :c:func:`Py_VISIT` فراهم شده است. برای استفاده از این ماکرو، پیاده‌سازی :c:member:`~PyTypeObject.tp_traverse` باید آرگومان‌های خود را دقیقاً *visit* و *arg* نام‌گذاری کند:" +msgid "The :c:member:`~PyTypeObject.tp_traverse` handler must have the following type:" +msgstr "هندلر :c:member:`~PyTypeObject.tp_traverse` باید از نوع زیر باشد:" -msgid "If the :c:expr:`PyObject *` *o* is not ``NULL``, call the *visit* callback, with arguments *o* and *arg*. If *visit* returns a non-zero value, then return it. Using this macro, :c:member:`~PyTypeObject.tp_traverse` handlers look like::" -msgstr "اگر :c:expr:`PyObject *` *o* برابر ``NULL`` نباشد، کال‌بک *visit* با آرگومان‌های *o* و *arg* فراخوانی می‌شود. اگر *visit* مقدار غیرصفری برگرداند، همان مقدار برگردانده می‌شود. با استفاده از این ماکرو، هندلرهای :c:member:`~PyTypeObject.tp_traverse` به این شکل هستند::" +msgid "Traversal function for a garbage-collected object, used by the garbage collector to detect reference cycles. Implementations must call the *visit* function for each object directly contained by *self*, with the parameters to *visit* being the contained object and the *arg* value passed to the handler. The *visit* function must not be called with a ``NULL`` object argument. If *visit* returns a non-zero value, that value should be returned immediately." +msgstr "تابع پیمایش برای یک شیء جمع‌آوری‌شده در زباله‌جمع‌کن، که توسط زباله‌جمع‌کن برای تشخیص چرخه‌های ارجاع استفاده می‌شود. پیاده‌سازی‌ها باید تابع *visit* را برای هر شیء که مستقیماً توسط *self* دربرگرفته شده است فراخوانی کنند، به طوری که پارامترهای ارسالی به *visit* شامل شیء محصورشده و مقدار *arg* ارسال‌شده به هندلر باشند. تابع *visit* نباید با یک آرگومان شیء ``NULL`` فراخوانی شود. اگر *visit* یک مقدار غیرصفر برگرداند، آن مقدار باید بلافاصله بازگردانده شود." + +msgid "A typical :c:member:`!tp_traverse` function calls the :c:func:`Py_VISIT` convenience macro on each of the instance's members that are Python objects that the instance owns. For example, this is a (slightly outdated) traversal function for the :py:class:`threading.local` class::" +msgstr "یک تابع :c:member:`!tp_traverse` معمولی، ماکروی کمکی :c:func:`Py_VISIT` را روی هر یک از اعضای نمونه فراخوانی می‌کند که از اشیای پایتون متعلق به نمونه هستند. برای نمونه، این یک تابع پیمایش (کمی قدیمی‌شده) برای کلاس :py:class:`threading.local` است::" msgid "" "static int\n" -"my_traverse(Noddy *self, visitproc visit, void *arg)\n" +"local_traverse(PyObject *op, visitproc visit, void *arg)\n" "{\n" -" Py_VISIT(self->foo);\n" -" Py_VISIT(self->bar);\n" +" localobject *self = (localobject *) op;\n" +" Py_VISIT(Py_TYPE(self));\n" +" Py_VISIT(self->args);\n" +" Py_VISIT(self->kw);\n" +" Py_VISIT(self->dict);\n" " return 0;\n" "}" msgstr "" "static int\n" -"my_traverse(Noddy *self, visitproc visit, void *arg)\n" +"local_traverse(PyObject *op, visitproc visit, void *arg)\n" "{\n" -" Py_VISIT(self->foo);\n" -" Py_VISIT(self->bar);\n" +" localobject *self = (localobject *) op;\n" +" Py_VISIT(Py_TYPE(self));\n" +" Py_VISIT(self->args);\n" +" Py_VISIT(self->kw);\n" +" Py_VISIT(self->dict);\n" " return 0;\n" "}" -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:member:`~PyTypeObject.tp_clear` باید از نوع :c:type:`inquiry` باشد، یا در صورتی که شیء تغییرناپذیر است، ``NULL`` باشد." +msgid ":c:func:`Py_VISIT` requires the *visit* and *arg* parameters to :c:func:`!local_traverse` to have these specific names; don't name them just anything." +msgstr "تابع :c:func:`Py_VISIT` ایجاب می‌کند که پارامترهای *visit* و *arg* در تابع :c:func:`!local_traverse` دارای این نام‌های مشخص باشند؛ آن‌ها را با هر نام دلخواهی نام‌گذاری نکنید." -msgid "Drop references that may have created reference cycles. Immutable objects do not have to define this method since they can never directly create reference cycles. Note that the object must still be valid after calling this method (don't just call :c:func:`Py_DECREF` on a reference). The collector will call this method if it detects that this object is involved in a reference cycle." -msgstr "ارجاع‌هایی را که ممکن است چرخه‌های ارجاع ایجاد کرده باشند رها کنید. اشیاء تغییرناپذیر نیازی به تعریف این متد ندارند، زیرا هرگز نمی‌توانند به‌طور مستقیم چرخه‌های ارجاع ایجاد کنند. توجه داشته باشید که شیء باید پس از فراخوانی این متد همچنان معتبر باشد (تنها :c:func:`Py_DECREF` را روی یک ارجاع فراخوانی نکنید). زباله‌روب در صورتی که تشخیص دهد این شیء در یک چرخه ارجاع درگیر است، این متد را فراخوانی خواهد کرد." +msgid "Instances of :ref:`heap-allocated types ` hold a reference to their type. Their traversal function must therefore visit the type::" +msgstr "نمونه‌های :ref:`انواع تخصیص‌یافته در هیپ ` ارجاعی به نوع خود را نگهداری می‌کنند. بنابراین تابع پیمایش آن‌ها باید نوع را بازدید کند::" + +msgid "Py_VISIT(Py_TYPE(self));" +msgstr "Py_VISIT(Py_TYPE(self));" + +msgid "Alternately, the type may delegate this responsibility by calling ``tp_traverse`` of a heap-allocated superclass (or another heap-allocated type, if applicable). If they do not, the type object may not be garbage-collected." +msgstr "به‌عنوان جایگزین، نوع ممکن است با فراخوانی ``tp_traverse`` از یک سوپرکلاس تخصیص‌یافته در هیپ (یا یک نوع تخصیص‌یافته‌ی دیگر در هیپ، در صورت لزوم)، این مسئولیت را واگذار کند. اگر این کار را نکنند، ممکن است شیء نوع زباله‌روبی نشود." + +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:macro:`Py_TPFLAGS_MANAGED_DICT` در فیلد :c:member:`~PyTypeObject.tp_flags` تنظیم شده باشد، تابع پیمایش باید تابع :c:func:`PyObject_VisitManagedDict` را به این شکل فراخوانی کند::" + +msgid "" +"int err = PyObject_VisitManagedDict((PyObject*)self, visit, arg);\n" +"if (err) {\n" +" return err;\n" +"}" +msgstr "" +"int err = PyObject_VisitManagedDict((PyObject*)self, visit, arg);\n" +"if (err) {\n" +" return err;\n" +"}" + +msgid "Only the members that the instance *owns* (by having :term:`strong references ` to them) must be visited. For instance, if an object supports weak references via the :c:member:`~PyTypeObject.tp_weaklist` slot, the pointer supporting the linked list (what *tp_weaklist* points to) must **not** be visited as the instance does not directly own the weak references to itself." +msgstr "فقط اعضایی که نمونه آن‌ها را *دارد* (با داشتن :term:`ارجاع‌های قوی ` به آن‌ها) باید بازدید شوند. برای نمونه، اگر یک شیء از طریق جایگاه :c:member:`~PyTypeObject.tp_weaklist` از ارجاع‌های ضعیف پشتیبانی کند، اشاره‌گری که از فهرست پیوندی پشتیبانی می‌کند (چیزی که *tp_weaklist* به آن اشاره می‌کند) **نباید** بازدید شود، زیرا نمونه مستقیماً مالک ارجاع‌های ضعیف به خودش نیست." + +msgid "The traversal function has a limitation:" +msgstr "تابع پیمایش محدودیتی دارد:" + +msgid "The traversal function must not have any side effects. Implementations may not modify the reference counts of any Python objects nor create or destroy any Python objects, directly or indirectly." +msgstr "تابع پیمایش نباید هیچ اثر جانبی داشته باشد. پیاده‌سازی‌ها نباید شماره‌های ارجاع هیچ‌یک از اشیای پایتون را تغییر دهند و همچنین نباید هیچ شیء پایتونی را، به صورت مستقیم یا غیرمستقیم، ایجاد یا نابود کنند." + +msgid "This means that *most* Python C API functions may not be used, since they can raise a new exception, return a new reference to a result object, have internal logic that uses side effects. Also, unless documented otherwise, functions that happen to not have side effects may start having them in future versions, without warning." +msgstr "این یعنی *بیشتر* توابع C API پایتون ممکن است استفاده نشوند، زیرا می‌توانند یک استثنای جدید ایجاد کنند، یک ارجاع جدید به یک شیء نتیجه را برگردانند، یا منطق داخلی داشته باشند که از عوارض جانبی استفاده می‌کند. همچنین، مگر اینکه طور دیگری مستند شده باشد، توابعی که عوارض جانبی ندارند ممکن است در نسخه‌های آینده بدون هشدار پیدا کردن عوارض جانبی را شروع کنند." + +msgid "For a list of safe functions, see a :ref:`separate section ` below." +msgstr "برای فهرستی از توابع امن، به :ref:`بخش جداگانه ` در ادامه مراجعه کنید." + +msgid "The :c:func:`Py_VISIT` call may be skipped for those members that provably cannot participate in reference cycles. In the ``local_traverse`` example above, there is also a ``self->key`` member, but it can only be ``NULL`` or a Python string and therefore cannot be part of a reference cycle." +msgstr "فراخوانی :c:func:`Py_VISIT` را می‌توان برای آن دسته از اعضایی که ثابت شده نمی‌توانند در چرخه‌های ارجاع شرکت کنند، رد کرد. در نمونه‌ی ``local_traverse`` در بالا، یک عضو ``self->key`` نیز وجود دارد، اما این عضو فقط می‌تواند ``NULL`` یا یک رشته‌ی پایتون باشد و بنابراین نمی‌تواند بخشی از یک چرخه ارجاع باشد." + +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 "از سوی دیگر، حتی اگر می‌دانید که یک عضو هرگز نمی‌تواند بخشی از یک چرخه باشد، به عنوان یک ابزار کمکی برای اشکال‌زدایی ممکن است بخواهید به هر حال آن را بازدید کنید تا تابع :func:`~gc.get_referents` در ماژول :mod:`gc` آن را در بر بگیرد." + +msgid "The :c:member:`~PyTypeObject.tp_traverse` function can be called from any thread." +msgstr "تابع :c:member:`~PyTypeObject.tp_traverse` را می‌توان از هر نخی فراخوانی کرد." + +msgid "Garbage collection is a \"stop-the-world\" operation: even in :term:`free threading` builds, only one thread state is :term:`attached ` when :c:member:`!tp_traverse` handlers run." +msgstr "زباله‌روبی یک عملیات «متوقف‌کننده‌ی دنیا» است: حتی در پیاده‌سازی‌های دارای :term:`نخ‌بندی آزاد `، هنگامی که کنترل‌کننده‌های :c:member:`!tp_traverse` اجرا می‌شوند، فقط یک حالت نخ :term:`متصل ` است." + +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 "انتظار می‌رود انواع تخصیص‌یافته در هیپ، ``Py_TYPE(self)`` را در ``tp_traverse`` بازدید کنند. در نسخه‌های قبلی پایتون، به دلیل `bug 40217 `_، انجام این کار ممکن است منجر به فروپاشی در زیرکلاس‌ها شود." + +msgid "To simplify writing :c:member:`~PyTypeObject.tp_traverse` handlers, a :c:func:`Py_VISIT` macro is provided. In order to use this macro, the :c:member:`~PyTypeObject.tp_traverse` implementation must name its arguments exactly *visit* and *arg*:" +msgstr "برای ساده‌تر کردن نوشتن هندلرهای :c:member:`~PyTypeObject.tp_traverse`، یک ماکرو به نام :c:func:`Py_VISIT` فراهم شده است. به منظور استفاده از این ماکرو، پیاده‌سازی :c:member:`~PyTypeObject.tp_traverse` باید آرگومان‌های خود را دقیقاً *visit* و *arg* نام‌گذاری کند:" + +msgid "If the :c:expr:`PyObject *` *o* is not ``NULL``, call the *visit* callback, with arguments *o* and *arg*. If *visit* returns a non-zero value, then return it." +msgstr "اگر عبارت :c:expr:`PyObject *` *o* برابر با ``NULL`` نیست، کال‌بک *visit* را با آرگومان‌های *o* و *arg* فراخوانی کنید. اگر *visit* یک مقدار غیرصفر برگرداند، آنگاه همان مقدار را برگردانید." + +msgid "This corresponds roughly to::" +msgstr "این مورد تقریباً با این معادل است::" + +msgid "" +"#define Py_VISIT(o) \\\n" +" if (op) { \\\n" +" int visit_result = visit(o, arg); \\\n" +" if (visit_result != 0) { \\\n" +" return visit_result; \\\n" +" } \\\n" +" }" +msgstr "" +"#define Py_VISIT(o) \\\n" +" if (op) { \\\n" +" int visit_result = visit(o, arg); \\\n" +" if (visit_result != 0) { \\\n" +" return visit_result; \\\n" +" } \\\n" +" }" + +msgid "Traversal-safe functions" +msgstr "توابع امن برای پیمایش" + +msgid "The following functions and macros are safe to use in a :c:member:`~PyTypeObject.tp_traverse` handler:" +msgstr "استفاده از توابع و ماکروهای زیر در یک هندلر :c:member:`~PyTypeObject.tp_traverse` امن است:" + +msgid "the *visit* function passed to ``tp_traverse``" +msgstr "تابع *visit* که به ``tp_traverse`` ارسال می‌شود" + +msgid ":c:func:`Py_VISIT`" +msgstr ":c:func:`Py_VISIT`" + +msgid ":c:func:`Py_SIZE`" +msgstr ":c:func:`Py_SIZE`" + +msgid ":c:func:`Py_TYPE`: if called from a :c:member:`!tp_traverse` handler, :c:func:`!Py_TYPE`'s result will be valid for the duration of the handler call" +msgstr ":c:func:`Py_TYPE`: اگر از یک هندلر :c:member:`!tp_traverse` فراخوانی شود، نتیجه‌ی :c:func:`!Py_TYPE` تا زمان پایان فراخوانی هندلر معتبر خواهد ماند" + +msgid ":c:func:`PyObject_VisitManagedDict`" +msgstr ":c:func:`PyObject_VisitManagedDict`" + +msgid ":c:func:`PyObject_TypeCheck`, :c:func:`PyType_IsSubtype`, :c:func:`PyType_HasFeature`" +msgstr ":c:func:`PyObject_TypeCheck`, :c:func:`PyType_IsSubtype`, :c:func:`PyType_HasFeature`" + +msgid ":samp:`Py{}_Check` and :samp:`Py{}_CheckExact` -- for example, :c:func:`PyTuple_Check`" +msgstr ":samp:`Py{}_Check` و :samp:`Py{}_CheckExact` -- برای نمونه، :c:func:`PyTuple_Check`" + +msgid ":ref:`duringgc-functions`" +msgstr ":ref:`duringgc-functions`" + +msgid "\"DuringGC\" functions" +msgstr "توابع «DuringGC»" + +msgid "The following functions should *only* be used in a :c:member:`~PyTypeObject.tp_traverse` handler; calling them in other contexts may have unintended consequences." +msgstr "توابع زیر *فقط* باید در یک هندلر :c:member:`~PyTypeObject.tp_traverse` استفاده شوند؛ فراخوانی آن‌ها در زمینه‌های دیگر ممکن است پیامدهای ناخواسته‌ای داشته باشد." + +msgid "These functions act like their counterparts without the ``_DuringGC`` suffix, but they are guaranteed to not have side effects, they do not set an exception on failure, and they return/set :term:`borrowed references ` as detailed in the individual documentation." +msgstr "این توابع درست مانند همتایان خود بدون پسوند ``_DuringGC`` عمل می‌کنند، اما تضمین می‌شود که هیچ عارضه‌ی جانبی نداشته باشند، در صورت بروز خطا هیچ استثنایی را تنظیم نمی‌کنند، و همان‌طور که در مستندات هر کدام به تفصیل آمده است، :term:`ارجاع‌های امانتی ` را برمی‌گردانند/تنظیم می‌کنند." + +msgid "Note that these functions may fail (return ``NULL`` or ``-1``), but as they do not set an exception, no error information is available. In some cases, failure is not distinguishable from a successful ``NULL`` result." +msgstr "توجه داشته باشید که این توابع ممکن است با خطا مواجه شوند (مقادیر ``NULL`` یا ``-1`` را برگردانند)، اما از آنجا که استثنایی را تنظیم نمی‌کنند، هیچ اطلاعات خطایی در دسترس نیست. در برخی موارد، خطا از نتیجه‌ی موفقیت‌آمیز ``NULL`` قابل تشخیص نیست." + +msgid "See :ref:`duringgc-functions` for common information." +msgstr "برای کسب اطلاعات عمومی به :ref:`duringgc-functions` مراجعه کنید." + +msgid ":c:func:`PyObject_GetTypeData`, :c:func:`PyObject_GetItemData`, :c:func:`PyType_GetModuleState`, :c:func:`PyModule_GetState`, :c:func:`PyModule_GetToken`, :c:func:`PyType_GetBaseByToken`" +msgstr ":c:func:`PyObject_GetTypeData`, :c:func:`PyObject_GetItemData`, :c:func:`PyType_GetModuleState`, :c:func:`PyModule_GetState`, :c:func:`PyModule_GetToken`, :c:func:`PyType_GetBaseByToken`" + +msgid "Sets *\\*result* to a :term:`borrowed reference` rather than a strong one. The reference is valid for the duration of the :c:member:`!tp_traverse` handler call." +msgstr "مقدار *\\*result* را به‌جای یک ارجاع قوی، روی یک :term:`ارجاع امانتی ` تنظیم می‌کند. این ارجاع تا زمان پایان فراخوانی هندلر :c:member:`!tp_traverse` معتبر است." + +msgid ":c:func:`PyType_GetBaseByToken`" +msgstr ":c:func:`PyType_GetBaseByToken`" + +msgid "These functions return a :term:`borrowed reference`, which is valid for the duration of the :c:member:`!tp_traverse` handler call." +msgstr "این توابع یک :term:`ارجاع امانتی ` برمی‌گردانند که تا زمان پایان فراخوانی هندلر :c:member:`!tp_traverse` معتبر است." + +msgid ":c:func:`PyType_GetModule`, :c:func:`PyType_GetModuleByToken`" +msgstr ":c:func:`PyType_GetModule`, :c:func:`PyType_GetModuleByToken`" msgid "Controlling the Garbage Collector State" msgstr "کنترل وضعیت زباله‌روب" diff --git a/c-api/import.po b/c-api/import.po index 10bbad7f..3eca8370 100644 --- a/c-api/import.po +++ b/c-api/import.po @@ -6,13 +6,14 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" -"PO-Revision-Date: 2026-09-15 08:30+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 20:48+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" @@ -28,15 +29,6 @@ msgstr "ایمپورت کردن ماژول‌ها" msgid "This is a wrapper around :c:func:`PyImport_Import()` which takes a :c:expr:`const char *` as an argument instead of a :c:expr:`PyObject *`." msgstr "این یک دربرگیرنده در اطراف :c:func:`PyImport_Import()` است که به‌جای :c:expr:`PyObject *`، آرگومانی از نوع :c:expr:`const char *` می‌گیرد." -msgid "This function is a deprecated alias of :c:func:`PyImport_ImportModule`." -msgstr "این تابع یک نام مستعار منسوخ برای :c:func:`PyImport_ImportModule` است." - -msgid "This function used to fail immediately when the import lock was held by another thread. In Python 3.3 though, the locking scheme switched to per-module locks for most purposes, so this function's special behaviour isn't needed anymore." -msgstr "این تابع پیش‌تر زمانی که قفل ایمپورت توسط نخ دیگری نگه داشته می‌شد، بلافاصله شکست می‌خورد. اما در پایتون 3.3، طرح‌واره قفل‌گذاری در اکثر موارد به قفل‌های جداگانه برای هر ماژول تغییر کرد، بنابراین رفتار خاص این تابع دیگر مورد نیاز نیست." - -msgid "Use :c:func:`PyImport_ImportModule` instead." -msgstr "به جای آن از :c:func:`PyImport_ImportModule` استفاده کنید." - msgid "Import a module. This is best described by referring to the built-in Python function :func:`__import__`." msgstr "ایمپورت کردن یک ماژول. این کار را به بهترین شکل می‌توان با ارجاع به تابع توکار پایتون :func:`__import__` توصیف کرد." @@ -91,8 +83,8 @@ msgstr "با دریافت نام یک ماژول (احتمالاً به شکل ` msgid "The module's :attr:`~module.__spec__` and :attr:`~module.__loader__` will be set, if not set already, with the appropriate values. The spec's loader will be set to the module's :attr:`!__loader__` (if set) and to an instance of :class:`~importlib.machinery.SourceFileLoader` otherwise." msgstr ":attr:`~module.__spec__` و :attr:`~module.__loader__` ماژول، در صورتی که از قبل تنظیم‌نشده باشند، با مقادیر مناسب تنظیم خواهند شد. بارگذار مشخصه به :attr:`!__loader__` ماژول (در صورت تنظیم بودن) و در غیر این صورت به نمونه‌ای از :class:`~importlib.machinery.SourceFileLoader` تنظیم خواهد شد." -msgid "The module's :attr:`~module.__file__` attribute will be set to the code object's :attr:`~codeobject.co_filename`. If applicable, :attr:`~module.__cached__` will also be set." -msgstr "ویژگی :attr:`~module.__file__` ماژول به :attr:`~codeobject.co_filename` شیء کد تنظیم خواهد شد. در صورت وجود، :attr:`~module.__cached__` نیز تنظیم خواهد شد." +msgid "The module's :attr:`~module.__file__` attribute will be set to the code object's :attr:`~codeobject.co_filename`." +msgstr "ویژگی :attr:`~module.__file__` ماژول روی شیء کد :attr:`~codeobject.co_filename` تنظیم خواهد شد." msgid "This function will reload the module if it was already imported. See :c:func:`PyImport_ReloadModule` for the intended way to reload a module." msgstr "این تابع در صورتی که ماژول قبلاً ایمپورت شده باشد، آن را بازبارگذاری می‌کند. برای روش موردنظرِ بازبارگذاری یک ماژول، :c:func:`PyImport_ReloadModule` را ببینید." @@ -103,8 +95,11 @@ msgstr "اگر *name* به نامی نقطه‌گذاری‌شده به شکل ` msgid "See also :c:func:`PyImport_ExecCodeModuleEx` and :c:func:`PyImport_ExecCodeModuleWithPathnames`." msgstr "همچنین ببینید :c:func:`PyImport_ExecCodeModuleEx` و :c:func:`PyImport_ExecCodeModuleWithPathnames`." -msgid "The setting of :attr:`~module.__cached__` and :attr:`~module.__loader__` is deprecated. See :class:`~importlib.machinery.ModuleSpec` for alternatives." -msgstr "تنظیم کردن :attr:`~module.__cached__` و :attr:`~module.__loader__` منسوخ شده است. برای جایگزین‌ها به :class:`~importlib.machinery.ModuleSpec` مراجعه کنید." +msgid "The setting of ``__cached__`` and :attr:`~module.__loader__` is deprecated. See :class:`~importlib.machinery.ModuleSpec` for alternatives." +msgstr "تنظیم کردن ``__cached__`` و :attr:`~module.__loader__` منسوخ شده است. برای راه‌های جایگزین، :class:`~importlib.machinery.ModuleSpec` را ببینید." + +msgid "The ``__cached__`` attribute is no longer set." +msgstr "ویژگی ``__cached__`` دیگر تنظیم نمی‌شود." msgid "Like :c:func:`PyImport_ExecCodeModule`, but the :attr:`~module.__file__` attribute of the module object is set to *pathname* if it is non-``NULL``." msgstr "مانند :c:func:`PyImport_ExecCodeModule`، اما اگر *مسیرنام* غیر ``NULL`` باشد، ویژگی :attr:`~module.__file__` شیء ماژول به *مسیرنام* تنظیم می‌شود." @@ -112,11 +107,14 @@ msgstr "مانند :c:func:`PyImport_ExecCodeModule`، اما اگر *مسیرن msgid "See also :c:func:`PyImport_ExecCodeModuleWithPathnames`." msgstr "همچنین :c:func:`PyImport_ExecCodeModuleWithPathnames` را ببینید." -msgid "Like :c:func:`PyImport_ExecCodeModuleEx`, but the :attr:`~module.__cached__` attribute of the module object is set to *cpathname* if it is non-``NULL``. Of the three functions, this is the preferred one to use." -msgstr "مانند :c:func:`PyImport_ExecCodeModuleEx`، اما ویژگی :attr:`~module.__cached__` شیء ماژول در صورتی که *cpathname* غیر ``NULL`` باشد، برابر *cpathname* تنظیم می‌شود. از میان این سه تابع، استفاده از این تابع ترجیح دارد." +msgid "Like :c:func:`PyImport_ExecCodeModuleEx`, but the path to any compiled file via *cpathname* is used appropriately when non-``NULL``. Of the three functions, this is the preferred one to use." +msgstr "مشابه :c:func:`PyImport_ExecCodeModuleEx`، اما مسیر هر پرونده‌ی کامپایل‌شده از طریق *cpathname* در صورت غیر از ``NULL`` بودن به‌درستی استفاده می‌شود. از میان این سه تابع، این تابع ترجیح داده می‌شود که استفاده شود." + +msgid "Setting ``__cached__`` is deprecated. See :class:`~importlib.machinery.ModuleSpec` for alternatives." +msgstr "تنظیم ``__cached__`` منسوخ شده است. برای راه‌های جایگزین، :class:`~importlib.machinery.ModuleSpec` را ببینید." -msgid "Setting :attr:`~module.__cached__` is deprecated. See :class:`~importlib.machinery.ModuleSpec` for alternatives." -msgstr "تنظیم کردن :attr:`~module.__cached__` منسوخ شده است. برای جایگزین‌ها به :class:`~importlib.machinery.ModuleSpec` مراجعه کنید." +msgid "The ``__cached__`` attribute no longer set." +msgstr "ویژگی ``__cached__`` دیگر تنظیم نمی‌شود." msgid "Like :c:func:`PyImport_ExecCodeModuleObject`, but *name*, *pathname* and *cpathname* are UTF-8 encoded strings. Attempts are also made to figure out what the value for *pathname* should be from *cpathname* if the former is set to ``NULL``." msgstr "مانند :c:func:`PyImport_ExecCodeModuleObject`، اما *name*، *pathname* و *cpathname* رشته‌های کدگذاری‌شده با UTF-8 هستند. اگر *pathname* برابر ``NULL`` قرار داده شده باشد، تلاش‌هایی نیز برای تعیین مقدار *pathname* از روی *cpathname* صورت می‌گیرد." @@ -190,6 +188,9 @@ msgstr "نام ماژول، به‌صورت یک رشته کدگذاری‌شد msgid "Initialization function for a module built into the interpreter." msgstr "تابع مقداردهی اولیه برای ماژولی که به‌صورت توکار در مفسر ساخته‌شده است." +msgid "Note that the inittab uses \"``PyInit``\" :ref:`initialization functions `; there is currently no way to include \"``PyModExport_``\" :ref:`export hooks `." +msgstr "توجه داشته باشید که inittab از :ref:`توابع راه‌اندازی ` «``PyInit``» استفاده می‌کند؛ در حال حاضر هیچ راهی برای گنجاندن :ref:`هوک‌های صادراتی ` «``PyModExport_``» وجود ندارد." + msgid "Add a collection of modules to the table of built-in modules. The *newtab* array must end with a sentinel entry which contains ``NULL`` for the :c:member:`~_inittab.name` field; failure to provide the sentinel value can result in a memory fault. Returns ``0`` on success or ``-1`` if insufficient memory could be allocated to extend the internal table. In the event of failure, no modules are added to the internal table. This must be called before :c:func:`Py_Initialize`." msgstr "مجموعه‌ای از ماژول‌ها را به جدول ماژول‌های توکار اضافه می‌کند. آرایه *newtab* باید با یک ورودی نشانگر پایان یابد که برای فیلد :c:member:`~_inittab.name` مقدار ``NULL`` را در بر دارد؛ ارائه‌نکردن مقدار نشانگر می‌تواند به خطای حافظه منجر شود. در صورت موفقیت ``0`` و در صورتی که حافظه کافی برای گسترش جدول داخلی تخصیص داده نشود، ``-1`` برمی‌گرداند. در صورت شکست، هیچ ماژولی به جدول داخلی اضافه نمی‌شود. این باید پیش از :c:func:`Py_Initialize` فراخوانی شود." @@ -211,6 +212,45 @@ msgstr "تابع کمکی که :c:func:`PyImport_Import` و :c:func:`PyObject_Ge msgid "Similar to :c:func:`PyImport_ImportModuleAttr`, but names are UTF-8 encoded strings instead of Python :class:`str` objects." msgstr "مشابه :c:func:`PyImport_ImportModuleAttr` است، اما نام‌ها به‌جای اشیاء :class:`str` پایتون، رشته‌های کدگذاری‌شده با UTF-8 هستند." +msgid "Gets the current lazy imports mode." +msgstr "حالت فعلی ایمپورت‌های تنبل را دریافت می‌کند." + +msgid "Return a :term:`strong reference` to the current lazy imports filter, or ``NULL`` if none exists. This function always succeeds." +msgstr "یک :term:`ارجاع قوی ` به صافی ایمپورت‌های تنبل فعلی، یا در صورت عدم وجود، ``NULL`` را برمی‌گرداند. این تابع همیشه موفق اجرا می‌شود." + +msgid "This function always returns ``0``." +msgstr "این تابع همیشه ``0`` را برمی‌گرداند." + +msgid "Sets the current lazy imports filter. The *filter* should be a callable that will receive ``(importing_module_name, imported_module_name, [fromlist])`` when an import can potentially be lazy. The ``imported_module_name`` value is the resolved module name, so ``lazy from .spam import eggs`` passes ``package.spam``. The callable must return ``True`` if the import should be lazy and ``False`` otherwise." +msgstr "فیلتر ایمپورت تنبل فعلی را تنظیم می‌کند. *filter* باید یک شیء قابل فراخوانی باشد که هنگامی که یک ایمپورت بالقوه می‌تواند تنبل باشد، ``(importing_module_name, imported_module_name, [fromlist])`` را دریافت کند. مقدار ``imported_module_name`` نام ماژول حل‌شده است؛ بنابراین، ``lazy from .spam import eggs`` مقدار ``package.spam`` را ارسال می‌کند. شیء قابل فراخوانی باید در صورتی که ایمپورت باید تنبل باشد، ``True`` و در غیر این صورت ``False`` برگرداند." + +msgid "Return ``0`` on success and ``-1`` with an exception set otherwise." +msgstr "در صورت موفقیت ``0`` و در غیر این صورت، در حالی که یک استثنا تنظیم شده است، ``-1`` را برمی‌گرداند." + +msgid "Enumeration of possible lazy import modes." +msgstr "شمارش حالت‌های ممکن برای ایمپورت تنبل." + +msgid "Respect the ``lazy`` keyword in source code. This is the default mode." +msgstr "احترام به کلیدواژه‌ی ``lazy`` در کد منبع. این حالت پیش‌فرض است." + +msgid "Make all imports lazy by default." +msgstr "تنظیم تمام ایمپورت‌ها به حالت تنبل به صورت پیش‌فرض." + +msgid "This function is a building block that enables embedders to implement the :py:meth:`~importlib.abc.Loader.create_module` step of custom static extension importers (e.g. of statically-linked extensions)." +msgstr "این تابع یک بلوک ساختاری است که به تعبیه‌کنندگان امکان می‌دهد مرحله‌ی :py:meth:`~importlib.abc.Loader.create_module` مربوط به ایمپورت‌کننده‌های افزونه‌ی استاتیک سفارشی (مانند افزونه‌های پیوندیافته‌ی ایستا) را پیاده‌سازی کنند." + +msgid "*spec* must be a :class:`~importlib.machinery.ModuleSpec` object." +msgstr "*spec* باید یک شیء :class:`~importlib.machinery.ModuleSpec` باشد." + +msgid "*initfunc* must be an :ref:`initialization function `, the same as for :c:func:`PyImport_AppendInittab`." +msgstr "*initfunc* باید یک :ref:`تابع مقداردهی اولیه ` باشد، درست مانند :c:func:`PyImport_AppendInittab`." + +msgid "On success, create and return a module object. This module will not be initialized; call :c:func:`PyModule_Exec` to initialize it. (Custom importers should do this in their :py:meth:`~importlib.abc.Loader.exec_module` method.)" +msgstr "در صورت موفقیت، یک شیء ماژول ایجاد کرده و برمی‌گرداند. این ماژول مقداردهی اولیه نخواهد شد؛ برای مقداردهی اولیه آن، :c:func:`PyModule_Exec` را فراخوانی کنید. (ایمپورت‌کننده‌های سفارشی باید این کار را در متد :py:meth:`~importlib.abc.Loader.exec_module` خود انجام دهند.)" + +msgid "On error, return NULL with an exception set." +msgstr "در صورت بروز خطا، مقدار NULL را همراه با تنظیم یک استثنا برمی‌گرداند." + msgid "package variable" msgstr "متغیر بسته" @@ -234,3 +274,12 @@ msgstr "کامپایل" msgid "freeze utility" msgstr "ابزار انجماد (freeze)" + +#~ msgid "This function is a deprecated alias of :c:func:`PyImport_ImportModule`." +#~ msgstr "این تابع یک نام مستعار منسوخ برای :c:func:`PyImport_ImportModule` است." + +#~ msgid "This function used to fail immediately when the import lock was held by another thread. In Python 3.3 though, the locking scheme switched to per-module locks for most purposes, so this function's special behaviour isn't needed anymore." +#~ msgstr "این تابع پیش‌تر زمانی که قفل ایمپورت توسط نخ دیگری نگه داشته می‌شد، بلافاصله شکست می‌خورد. اما در پایتون 3.3، طرح‌واره قفل‌گذاری در اکثر موارد به قفل‌های جداگانه برای هر ماژول تغییر کرد، بنابراین رفتار خاص این تابع دیگر مورد نیاز نیست." + +#~ msgid "Use :c:func:`PyImport_ImportModule` instead." +#~ msgstr "به جای آن از :c:func:`PyImport_ImportModule` استفاده کنید." diff --git a/c-api/init_config.po b/c-api/init_config.po index 3cf16a25..9e6a2f55 100644 --- a/c-api/init_config.po +++ b/c-api/init_config.po @@ -8,13 +8,14 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" -"PO-Revision-Date: 2026-09-13 20:13+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 19:55+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" @@ -1127,11 +1128,8 @@ msgstr "اگر ناصفر باشد، :ref:`حالت UTF-8 پایتون ` command line option and the :envvar:`PYTHONUTF8` environment variable." msgstr "توسط گزینه‌ی خط فرمان :option:`-X utf8 <-X>` و متغیر محیطی :envvar:`PYTHONUTF8` روی ``0`` یا ``1`` تنظیم می‌شود." -msgid "Also set to ``1`` if the ``LC_CTYPE`` locale is ``C`` or ``POSIX``." -msgstr "همچنین اگر locale مربوط به ``LC_CTYPE`` برابر ``C`` یا ``POSIX`` باشد، به ``1`` تنظیم می‌شود." - -msgid "Default: ``-1`` in Python config and ``0`` in isolated config." -msgstr "پیش‌فرض: ``-1`` در پیکربندی پایتون و ``0`` در پیکربندی ایزوله." +msgid "Default: ``1``." +msgstr "پیش‌فرض: ``1``." msgid "Preinitialize Python with PyPreConfig" msgstr "پیش‌مقداردهی اولیه‌ی پایتون با PyPreConfig" @@ -1363,9 +1361,6 @@ msgstr "توسط گزینه‌ی خط فرمان :option:`-u` و متغیر مح msgid "stdin is always opened in buffered mode." msgstr "stdin همیشه در حالت بافرشده باز می‌شود." -msgid "Default: ``1``." -msgstr "پیش‌فرض: ``1``." - msgid "If equals to ``1``, issue a warning when comparing :class:`bytes` or :class:`bytearray` with :class:`str`, or comparing :class:`bytes` with :class:`int`." msgstr "اگر برابر با ``1`` باشد، هنگام مقایسه‌ی :class:`bytes` یا :class:`bytearray` با :class:`str`، یا مقایسه‌ی :class:`bytes` با :class:`int`، هشداری صادر می‌شود." @@ -1375,6 +1370,9 @@ msgstr "اگر برابر یا بزرگ‌تر از ``2`` باشد، در این msgid "Incremented by the :option:`-b` command line option." msgstr "با گزینه‌ی خط فرمان :option:`-b` افزایش می‌یابد." +msgid "The :option:`-b` and :option:`!-bb` options will become no-op in 3.17. :c:member:`~PyConfig.bytes_warning` member will be removed in 3.17." +msgstr "گزینه‌های :option:`-b` و :option:`!-bb` در نسخه‌ی 3.17 به عملیات بی‌اثر تبدیل خواهند شد. عضو :c:member:`~PyConfig.bytes_warning` در نسخه‌ی 3.17 حذف خواهد شد." + msgid "If non-zero, emit a :exc:`EncodingWarning` warning when :class:`io.TextIOWrapper` uses its default encoding. See :ref:`io-encoding-warning` for details." msgstr "اگر نا‌صفر باشد، هنگامی که :class:`io.TextIOWrapper` از کدگذاری پیش‌فرض خود استفاده می‌کند، هشدار :exc:`EncodingWarning` نشان داده می‌شود. برای جزئیات به :ref:`io-encoding-warning` مراجعه کنید." @@ -1765,11 +1763,11 @@ msgstr "همچنین گزینه‌ی :c:member:`PyConfig.skip_source_first_line` msgid "Value of the :option:`-m` command line option." msgstr "مقدار گزینه‌ی خط فرمان :option:`-m`." -msgid "``package.module`` path to module that should be imported before ``site.py`` is run." -msgstr "``package.module`` مسیر ماژولی که باید پیش از اجرای ``site.py`` ایمپورت شود." +msgid "``module`` or ``module:func`` entry point that should be executed before the :mod:`site` module is imported." +msgstr "نقطه‌ی ورودی ``module`` یا ``module:func`` که باید پیش از ایمپورت شدن ماژول :mod:`site` اجرا شود." -msgid "Set by the :option:`-X presite=package.module <-X>` command-line option and the :envvar:`PYTHON_PRESITE` environment variable. The command-line option takes precedence." -msgstr "توسط گزینه‌ی خط فرمان :option:`-X presite=package.module <-X>` و متغیر محیطی :envvar:`PYTHON_PRESITE` تنظیم می‌شود. گزینه‌ی خط فرمان اولویت دارد." +msgid "Set by the :option:`-X presite=module:func <-X>` command-line option and the :envvar:`PYTHON_PRESITE` environment variable. The command-line option takes precedence." +msgstr "تنظیم‌شده توسط گزینه‌ی خط فرمان :option:`-X presite=module:func <-X>` و متغیر محیطی :envvar:`PYTHON_PRESITE`. گزینه‌ی خط فرمان اولویت دارد." msgid "Show total reference count at exit (excluding :term:`immortal` objects)?" msgstr "نمایش مجموع شمارش ارجاع در هنگام خروج (به‌جز اشیاء :term:`نامیرا `)؟" @@ -2039,7 +2037,7 @@ msgid "" "\n" " /* Specify sys.path explicitly */\n" " /* If you want to modify the default set of paths, finish\n" -" initialization first and then use PySys_GetObject(\"path\") */\n" +" initialization first and then use PySys_GetAttrString(\"path\") */\n" " config.module_search_paths_set = 1;\n" " status = PyWideStringList_Append(&config.module_search_paths,\n" " L\"/path/to/stdlib\");\n" @@ -2091,7 +2089,7 @@ msgstr "" "\n" " /* Specify sys.path explicitly */\n" " /* If you want to modify the default set of paths, finish\n" -" initialization first and then use PySys_GetObject(\"path\") */\n" +" initialization first and then use PySys_GetAttrString(\"path\") */\n" " config.module_search_paths_set = 1;\n" " status = PyWideStringList_Append(&config.module_search_paths,\n" " L\"/path/to/stdlib\");\n" @@ -2259,6 +2257,9 @@ msgstr "مقدار :c:member:`~PyConfig.use_environment` را برابر ``0`` msgid "Set :c:member:`~PyConfig.site_import` to ``0``." msgstr "مقدار :c:member:`~PyConfig.site_import` را برابر ``0`` قرار دهید." +msgid "Set :c:member:`~PyConfig.user_site_directory` to ``0`` (since 3.15)." +msgstr "تنظیم کردن :c:member:`~PyConfig.user_site_directory` روی ``0`` (از نسخه‌ی 3.15)." + msgid "Set :c:member:`~PyConfig.safe_path` to ``1``." msgstr "مقدار :c:member:`~PyConfig.safe_path` را برابر ``1`` قرار دهید." @@ -2271,6 +2272,9 @@ msgstr "از متغیر محیطی ``__PYVENV_LAUNCHER__`` برای تنظیم : msgid ":c:member:`~PyConfig.prefix`, and :c:member:`~PyConfig.exec_prefix`, are now set to the ``pyvenv.cfg`` directory. This was previously done by :mod:`site`, therefore affected by :option:`-S`." msgstr ":c:member:`~PyConfig.prefix` و :c:member:`~PyConfig.exec_prefix` اکنون به پوشه‌ی ``pyvenv.cfg`` تنظیم می‌شوند. این کار پیش‌تر توسط :mod:`site` انجام می‌شد و بنابراین تحت تأثیر :option:`-S` قرار داشت." +msgid ":c:member:`~PyConfig.user_site_directory` is now set to ``0`` when a ``._pth`` file is present." +msgstr "هنگامی که یک پرونده‌ی ``._pth`` موجود باشد، ویژگی :c:member:`~PyConfig.user_site_directory` اکنون روی ``0`` تنظیم می‌شود." + msgid "Py_GetArgcArgv()" msgstr "Py_GetArgcArgv()" @@ -2280,17 +2284,158 @@ msgstr "آرگومان‌های اصلی خط فرمان را دریافت می msgid "See also :c:member:`PyConfig.orig_argv` member." msgstr "همچنین عضو :c:member:`PyConfig.orig_argv` را ببینید." -msgid "Delaying main module execution" -msgstr "به تأخیر انداختن اجرای ماژول اصلی" +msgid "Multi-Phase Initialization Private Provisional API" +msgstr "API موقت خصوصی مقداردهی اولیه‌ی چندمرحله‌ای" + +msgid "This section is a private provisional API introducing multi-phase initialization, the core feature of :pep:`432`:" +msgstr "این بخش یک API خصوصی و موقت است که مقداردهی اولیه‌ی چندمرحله‌ای را معرفی می‌کند؛ ویژگی اصلی :pep:`432`:" + +msgid "\"Core\" initialization phase, \"bare minimum Python\":" +msgstr "مرحله‌ی مقداردهی اولیه‌ی «هسته»، «حداقل امکانات پایتون»:" + +msgid "Builtin types;" +msgstr "انواع توکار؛" + +msgid "Builtin exceptions;" +msgstr "استثناهای توکار؛" + +msgid "Builtin and frozen modules;" +msgstr "ماژول‌های توکار و فریزشده؛" + +msgid "The :mod:`sys` module is only partially initialized (ex: :data:`sys.path` doesn't exist yet)." +msgstr "ماژول :mod:`sys` فقط تا حدی مقداردهی اولیه شده است (به عنوان مثال: :data:`sys.path` هنوز وجود ندارد)." + +msgid "\"Main\" initialization phase, Python is fully initialized:" +msgstr "مرحله‌ی مقداردهی اولیه‌ی «اصلی»، پایتون به طور کامل مقداردهی اولیه شده است:" + +msgid "Install and configure :mod:`importlib`;" +msgstr "نصب و پیکربندی :mod:`importlib`؛" + +msgid "Apply the :ref:`Path Configuration `;" +msgstr "اعمال :ref:`پیکربندی مسیر `؛" + +msgid "Install signal handlers;" +msgstr "نصب هندلرهای سیگنال؛" + +msgid "Finish :mod:`sys` module initialization (ex: create :data:`sys.stdout` and :data:`sys.path`);" +msgstr "اتمام مقداردهی اولیه‌ی ماژول :mod:`sys` (به عنوان مثال: ایجاد :data:`sys.stdout` و :data:`sys.path`)؛" -msgid "In some embedding use cases, it may be desirable to separate interpreter initialization from the execution of the main module." -msgstr "در برخی موارد استفاده از تعبیه، ممکن است مطلوب باشد که مقداردهی اولیه‌ی مفسر از اجرای ماژول اصلی جدا شود." +msgid "Enable optional features like :mod:`faulthandler` and :mod:`tracemalloc`;" +msgstr "فعال‌سازی ویژگی‌های اختیاری مانند :mod:`faulthandler` و :mod:`tracemalloc`؛" -msgid "This separation can be achieved by setting ``PyConfig.run_command`` to the empty string during initialization (to prevent the interpreter from dropping into the interactive prompt), and then subsequently executing the desired main module code using ``__main__.__dict__`` as the global namespace." -msgstr "این جداسازی را می‌توان با تنظیم ``PyConfig.run_command`` به رشته خالی در حین راه‌اندازی (برای جلوگیری از اینکه مفسر وارد اعلان تعاملی شود)، و سپس اجرای کد ماژول اصلی موردنظر با استفاده از ``__main__.__dict__`` به‌عنوان فضای نام سراسری به دست آورد." +msgid "Import the :mod:`site` module;" +msgstr "ایمپورت کردن ماژول :mod:`site`؛" + +msgid "etc." +msgstr "و غیره." + +msgid "Private provisional API:" +msgstr "رابط برنامه‌نویسی (API) آزمایشی خصوصی:" + +msgid "If set to ``0``, :c:func:`Py_InitializeFromConfig` stops at the \"Core\" initialization phase." +msgstr "اگر روی ``0`` تنظیم شود، :c:func:`Py_InitializeFromConfig` در مرحله‌ی مقداردهی اولیه‌ی «Core» متوقف می‌شود." + +msgid "Move to the \"Main\" initialization phase, finish the Python initialization." +msgstr "به مرحله‌ی مقداردهی اولیه‌ی «Main» منتقل شوید و مقداردهی اولیه‌ی پایتون را به پایان برسانید." + +msgid "No module is imported during the \"Core\" phase and the ``importlib`` module is not configured: the :ref:`Path Configuration ` is only applied during the \"Main\" phase. It may allow to customize Python in Python to override or tune the :ref:`Path Configuration `, maybe install a custom :data:`sys.meta_path` importer or an import hook, etc." +msgstr "هیچ ماژولی در طول مرحله‌ی «Core» ایمپورت نمی‌شود و ماژول ``importlib`` پیکربندی نشده است: :ref:`Path Configuration ` فقط در طول مرحله‌ی «Main» اعمال می‌شود. این امر ممکن است امکان سفارشی‌سازی پایتون را در خود پایتون فراهم کند تا :ref:`Path Configuration ` را بازنشانی یا تنظیم دقیق کنید، شاید یک ایمپورت‌کننده‌ی سفارشی :data:`sys.meta_path` یا یک قلاب ایمپورت و غیره نصب کنید." + +msgid "It may become possible to calculate the :ref:`Path Configuration ` in Python, after the Core phase and before the Main phase, which is one of the :pep:`432` motivation." +msgstr "ممکن است پس از مرحله‌ی Core و قبل از مرحله‌ی Main، محاسبه‌ی :ref:`Path Configuration ` در پایتون امکان‌پذیر شود که این یکی از انگیزه‌های :pep:`432` است." + +msgid "The \"Core\" phase is not properly defined: what should be and what should not be available at this phase is not specified yet. The API is marked as private and provisional: the API can be modified or even be removed anytime until a proper public API is designed." +msgstr "مرحله‌ی «Core» به‌درستی تعریف نشده است: مشخص نیست در این مرحله چه چیزی باید در دسترس باشد و چه چیزی نباید باشد. این رابط برنامه‌نویسی (API) به عنوان خصوصی و آزمایشی علامت‌گذاری شده است: این API ممکن است در هر زمانی تا زمان طراحی یک API عمومی مناسب، تغییر کند یا حتی حذف شود." + +msgid "Example running Python code between \"Core\" and \"Main\" initialization phases::" +msgstr "نمونه‌ی اجرای کد پایتون بین مراحل مقداردهی اولیه‌ی «Core» و «Main»::" + +msgid "" +"void init_python(void)\n" +"{\n" +" PyStatus status;\n" +"\n" +" PyConfig config;\n" +" PyConfig_InitPythonConfig(&config);\n" +" config._init_main = 0;\n" +"\n" +" /* ... customize 'config' configuration ... */\n" +"\n" +" status = Py_InitializeFromConfig(&config);\n" +" PyConfig_Clear(&config);\n" +" if (PyStatus_Exception(status)) {\n" +" Py_ExitStatusException(status);\n" +" }\n" +"\n" +" /* Use sys.stderr because sys.stdout is only created\n" +" by _Py_InitializeMain() */\n" +" int res = PyRun_SimpleString(\n" +" \"import sys; \"\n" +" \"print('Run Python code before _Py_InitializeMain', \"\n" +" \"file=sys.stderr)\");\n" +" if (res < 0) {\n" +" exit(1);\n" +" }\n" +"\n" +" /* ... put more configuration code here ... */\n" +"\n" +" status = _Py_InitializeMain();\n" +" if (PyStatus_Exception(status)) {\n" +" Py_ExitStatusException(status);\n" +" }\n" +"}" +msgstr "" +"void init_python(void)\n" +"{\n" +" PyStatus status;\n" +"\n" +" PyConfig config;\n" +" PyConfig_InitPythonConfig(&config);\n" +" config._init_main = 0;\n" +"\n" +" /* ... customize 'config' configuration ... */\n" +"\n" +" status = Py_InitializeFromConfig(&config);\n" +" PyConfig_Clear(&config);\n" +" if (PyStatus_Exception(status)) {\n" +" Py_ExitStatusException(status);\n" +" }\n" +"\n" +" /* Use sys.stderr because sys.stdout is only created\n" +" by _Py_InitializeMain() */\n" +" int res = PyRun_SimpleString(\n" +" \"import sys; \"\n" +" \"print('Run Python code before _Py_InitializeMain', \"\n" +" \"file=sys.stderr)\");\n" +" if (res < 0) {\n" +" exit(1);\n" +" }\n" +"\n" +" /* ... put more configuration code here ... */\n" +"\n" +" status = _Py_InitializeMain();\n" +" if (PyStatus_Exception(status)) {\n" +" Py_ExitStatusException(status);\n" +" }\n" +"}" msgid "main()" msgstr "main()" msgid "argv (in module sys)" msgstr "argv (در ماژول sys)" + +#~ msgid "Also set to ``1`` if the ``LC_CTYPE`` locale is ``C`` or ``POSIX``." +#~ msgstr "همچنین اگر locale مربوط به ``LC_CTYPE`` برابر ``C`` یا ``POSIX`` باشد، به ``1`` تنظیم می‌شود." + +#~ msgid "Default: ``-1`` in Python config and ``0`` in isolated config." +#~ msgstr "پیش‌فرض: ``-1`` در پیکربندی پایتون و ``0`` در پیکربندی ایزوله." + +#~ msgid "Delaying main module execution" +#~ msgstr "به تأخیر انداختن اجرای ماژول اصلی" + +#~ msgid "In some embedding use cases, it may be desirable to separate interpreter initialization from the execution of the main module." +#~ msgstr "در برخی موارد استفاده از تعبیه، ممکن است مطلوب باشد که مقداردهی اولیه‌ی مفسر از اجرای ماژول اصلی جدا شود." + +#~ msgid "This separation can be achieved by setting ``PyConfig.run_command`` to the empty string during initialization (to prevent the interpreter from dropping into the interactive prompt), and then subsequently executing the desired main module code using ``__main__.__dict__`` as the global namespace." +#~ msgstr "این جداسازی را می‌توان با تنظیم ``PyConfig.run_command`` به رشته خالی در حین راه‌اندازی (برای جلوگیری از اینکه مفسر وارد اعلان تعاملی شود)، و سپس اجرای کد ماژول اصلی موردنظر با استفاده از ``__main__.__dict__`` به‌عنوان فضای نام سراسری به دست آورد." diff --git a/c-api/interp-lifecycle.po b/c-api/interp-lifecycle.po index 7b854aeb..d4131327 100644 --- a/c-api/interp-lifecycle.po +++ b/c-api/interp-lifecycle.po @@ -5,13 +5,14 @@ # # Translators: # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" -"PO-Revision-Date: 2026-09-15 08:29+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 20:24+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: none\n" "Language: fa\n" @@ -338,6 +339,9 @@ msgstr "برای جزئیات درباره‌ی پیش‌راه‌اندازی msgid "Return true (nonzero) when the Python interpreter has been initialized, false (zero) if not. After :c:func:`Py_FinalizeEx` is called, this returns false until :c:func:`Py_Initialize` is called again." msgstr "هنگامی که مفسر پایتون مقداردهی اولیه شده باشد، true (غیرصفر) را برمی‌گرداند و در غیر این صورت false (صفر) را برمی‌گرداند. پس از فراخوانی :c:func:`Py_FinalizeEx`، این تابع تا زمانی که :c:func:`Py_Initialize` دوباره فراخوانی شود، false برمی‌گرداند." +msgid "This function no longer returns true until initialization has fully completed, including import of the :mod:`site` module. Previously it could return true while :c:func:`Py_Initialize` was still running." +msgstr "این تابع تا زمانی که مقداردهی اولیه به‌طور کامل تکمیل نشده باشد، از جمله ایمپورت ماژول :mod:`site`، دیگر مقدار true را برنمی‌گرداند. پیش‌تر ممکن بود در حالی که :c:func:`Py_Initialize` هنوز در حال اجرا بود، مقدار true را برگرداند." + msgid "Return true (non-zero) if the main Python interpreter is :term:`shutting down `. Return false (zero) otherwise." msgstr "اگر مفسر اصلی پایتون در حال :term:`خاموش شدن ` باشد، مقدار true (غیرصفر) را برمی‌گرداند. در غیر این صورت مقدار false (صفر) را برمی‌گرداند." @@ -427,71 +431,155 @@ msgstr "برای مفسر هدف *interp* یک کال‌بک :mod:`atexit` ثب msgid "There must be an :term:`attached thread state` for *interp*." msgstr "باید یک :term:`attached thread state` برای *interp* وجود داشته باشد." -msgid "Cautions regarding runtime finalization" -msgstr "هشدارهایی درباره‌ی نهایی‌سازی ران‌تایم" +msgid "Cautions regarding interpreter finalization" +msgstr "احتیاط‌های مربوط به نهایی‌سازی مفسر" -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:`KeyboardInterrupt`) and running the :mod:`atexit` functions, the runtime is marked as *finalizing*: :c:func:`Py_IsFinalizing` and :func:`sys.is_finalizing` return true. At this point, only the *finalization thread* that initiated finalization (typically the main thread) is allowed to acquire the :term:`GIL`." -msgstr "در مرحله‌ی پایانیِ :term:`خاموشی مفسر `، پس از تلاش برای منتظر ماندن تا خروج نخ‌های غیر دِیمِن (هرچند این انتظار ممکن است توسط :class:`KeyboardInterrupt` قطع شود) و اجرای توابع :mod:`atexit`، ران‌تایم به‌عنوان *در حال نهایی‌سازی* علامت‌گذاری می‌شود: :c:func:`Py_IsFinalizing` و :func:`sys.is_finalizing` مقدار true را برمی‌گردانند. در این نقطه، تنها *نخ نهایی‌سازی* که نهایی‌سازی را آغاز کرده است (معمولاً نخ اصلی) مجاز است :term:`قفل مفسر سراسری (GIL) ` را به دست آورد." +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:`KeyboardInterrupt`) and running the :mod:`atexit` functions, the runtime is marked as finalizing, meaning that :c:func:`Py_IsFinalizing` and :func:`sys.is_finalizing` return true. At this point, only the finalization thread (the thread that initiated finalization; this is typically the main thread) is allowed to :term:`attach ` a thread state." +msgstr "در مرحله‌ی پایانی :term:`خاموش شدن مفسر `، پس از تلاش برای منتظر ماندن تا خروج نخ‌های غیر دِیمِن (هرچند این فرایند ممکن است با :class:`KeyboardInterrupt` قطع شود) و اجرای توابع :mod:`atexit`، زمان اجرا در وضعیت نهایی‌سازی قرار می‌گیرد؛ یعنی :c:func:`Py_IsFinalizing` و :func:`sys.is_finalizing` مقدار true را برمی‌گردانند. در این مرحله، فقط نخ نهایی‌سازی (نخی که فرایند نهایی‌سازی را آغاز کرده است؛ این نخ معمولاً نخ اصلی است) مجاز است یک وضعیت نخ را به :term:`متصل ` کند." -msgid "If any thread, other than the finalization thread, attempts to attach a :term:`thread state` during finalization, either explicitly or implicitly, the thread enters **a permanently blocked state** where it remains until the program exits. In most cases this is harmless, but this can result in deadlock if a later stage of finalization attempts to acquire a lock owned by the blocked thread, or otherwise waits on the blocked thread." -msgstr "اگر نخی غیر از نخ نهایی‌سازی، در حین نهایی‌سازی، چه به‌طور صریح و چه به‌طور ضمنی، تلاش کند یک :term:`thread state` را متصل کند، آن نخ وارد **وضعیت مسدود دائمی** می‌شود و تا زمان خروج برنامه در همان وضعیت باقی می‌ماند. در بیشتر موارد این بی‌ضرر است، اما اگر مرحله‌ای بعدی از نهایی‌سازی تلاش کند قفلی را که در اختیار نخ مسدود است به دست آورد یا به نحوی دیگر منتظر نخ مسدود بماند، این می‌تواند منجر به بن‌بست شود." +msgid "Other threads that attempt to attach during finalization, either explicitly (such as via :c:func:`PyThreadState_Ensure` or :c:macro:`Py_END_ALLOW_THREADS`) or implicitly (such as in-between bytecode instructions), will enter a **permanently blocked state**. Generally, this is harmless, but this can result in deadlocks. For example, a thread may be permanently blocked while holding a lock, meaning that the finalization thread can never acquire that lock." +msgstr "سایر نخ‌هایی که در طول نهایی‌سازی تلاش می‌کنند متصل شوند، چه به‌طور صریح (مانند طریق :c:func:`PyThreadState_Ensure` یا :c:macro:`Py_END_ALLOW_THREADS`) و چه به‌طور ضمنی (مانند بین دستورالعمل‌های بایت‌کد)، وارد یک **وضعیت مسدودشده‌ی دائمی** خواهند شد. به طور کلی، این بی‌خطر است، اما می‌تواند منجر به بن‌بست شود. به عنوان مثال، ممکن است یک نخ در حالی که قفلی را در اختیار دارد به‌طور دائم مسدود شود، به این معنی که نخ نهایی‌سازی هرگز نمی‌تواند آن قفل را به‌دست آورد." -msgid "Gross? Yes. This prevents random crashes and/or unexpectedly skipped C++ finalizations further up the call stack when such threads were forcibly exited here in CPython 3.13 and earlier. The CPython runtime :term:`thread state` C APIs have never had any error reporting or handling expectations at :term:`thread state` attachment time that would've allowed for graceful exit from this situation. Changing that would require new stable C APIs and rewriting the majority of C code in the CPython ecosystem to use those with error handling." -msgstr "زشت است؟ بله. این کار از فروپاشی‌های تصادفی و/یا رد شدن غیرمنتظره‌ی نهایی‌سازی‌های C++ در بخش‌های بالاتر پشته فراخوانی جلوگیری می‌کند؛ همان مشکلاتی که در سی‌پایتون 3.13 و نسخه‌های پیشین، هنگامی که چنین نخ‌هایی در اینجا به‌اجبار خارج می‌شدند، پیش می‌آمدند. APIهای C مربوط به :term:`وضعیت نخ ` در ران‌تایم سی‌پایتون هیچ‌گاه در زمان اتصال :term:`وضعیت نخ ` هیچ‌گونه انتظاری برای گزارش یا مدیریت خطا نداشته‌اند که خروج منظم از این وضعیت را ممکن می‌ساخت. تغییر این امر نیازمند ایجاد APIهای C پایدار جدید و بازنویسی بخش عمده‌ی کدهای C در اکوسیستم سی‌پایتون برای استفاده از آن‌ها همراه با مدیریت خطا خواهد بود." +msgid "Prior to CPython 3.13, the thread would exit instead of hanging, which led to other issues (see the warning note at :c:func:`PyThread_exit_thread`)." +msgstr "پیش از سی‌پایتون ۳.۱۳، نخ به جای معلق ماندن خارج می‌شد که منجر به مشکلات دیگری می‌شد (یادداشت هشدار در :c:func:`PyThread_exit_thread` را ببینید)." -msgid "Process-wide parameters" -msgstr "پارامترهای در سطح فرایند" +msgid "Gross? Yes. Starting in Python 3.15, there are a number of C APIs that make it possible to avoid these issues by temporarily preventing finalization:" +msgstr "زشت است؟ بله. از پایتون ۳.۱۵ به بعد، تعدادی از رابط‌های برنامه‌نویسی (API) سی وجود دارند که با جلوگیری موقت از نهایی‌سازی، اجتناب از این مشکلات را امکان‌پذیر می‌کنند:" -msgid "This API is kept for backward compatibility: setting :c:member:`PyConfig.program_name` should be used instead, see :ref:`Python Initialization Configuration `." -msgstr "این API برای سازگاری با نسخه‌های پیشین حفظ شده است: به جای آن باید :c:member:`PyConfig.program_name` را تنظیم کنید؛ به :ref:`پیکربندی مقدار‌دهی اولیه پایتون ` مراجعه کنید." +msgid ":pep:`788` explains the design, motivation and rationale for these APIs." +msgstr ":pep:`788` طراحی، انگیزه و دلیل منطقی این APIها را توضیح می‌دهد." -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 of the ``argv[0]`` argument to the :c:func:`main` function of the program (converted to wide characters). This is used by :c:func:`Py_GetPath` and some other functions below to find the Python run-time libraries relative to the interpreter executable. The default value is ``'python'``. The argument should point to a zero-terminated wide character string in static storage whose contents will not change for the duration of the program's execution. No code in the Python interpreter will change the contents of this storage." -msgstr "این تابع، اگر اصلاً فراخوانی شود، باید پیش از آنکه :c:func:`Py_Initialize` برای نخستین بار فراخوانی شود، فراخوانی شود. این تابع مقدار آرگومان ``argv[0]`` تابع :c:func:`main` برنامه را به مفسر اطلاع می‌دهد (تبدیل‌شده به نویسه‌های پهن). این مقدار توسط :c:func:`Py_GetPath` و برخی توابع دیگر در ادامه برای یافتن کتابخانه‌های زمان اجرای پایتون نسبت به پرونده اجرایی مفسر استفاده می‌شود. مقدار پیش‌فرض ``'python'`` است. این آرگومان باید به یک رشته‌ی نویسه‌های پهن خاتمه‌یافته با نویسه‌ی تهی (zero-terminated) در حافظه‌ی ایستا اشاره کند که محتوای آن در طول اجرای برنامه تغییر نخواهد کرد. هیچ کدی در مفسر پایتون محتوای این حافظه را تغییر نخواهد داد." +msgid "An opaque interpreter guard structure." +msgstr "یک ساختار نگهبان مفسر کدر." -msgid "Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a :c:expr:`wchar_t*` string." -msgstr "برای کدگشایی یک رشته بایتی و به‌دست آوردن یک رشته‌ی :c:expr:`wchar_t*` از :c:func:`Py_DecodeLocale` استفاده کنید." +msgid "By holding an interpreter guard, the caller can ensure that the interpreter will not finalize until the guard is closed (through :c:func:`PyInterpreterGuard_Close`)." +msgstr "با نگه‌داشتن یک نگهبان مفسر، فراخواننده می‌تواند اطمینان حاصل کند که مفسر تا زمانی که نگهبان بسته نشده است (از طریق :c:func:`PyInterpreterGuard_Close`) نهایی نخواهد شد." + +msgid "When a guard is held, a thread attempting to finalize the interpreter will block until the guard is closed before starting finalization. After finalization has started, threads are forever unable to acquire guards for that interpreter. This means that if you forget to close an interpreter guard, the process will **permanently hang** during finalization!" +msgstr "هنگامی که یک نگهبان نگه داشته می‌شود، نخی که تلاش می‌کند مفسر را نهایی کند، تا پیش از شروع نهایی‌سازی، یعنی تا زمان بسته شدن نگهبان، مسدود خواهد شد. پس از شروع نهایی‌سازی، نخ‌ها برای همیشه قادر به به‌دست آوردن نگهبان‌ها برای آن مفسر نیستند. این یعنی اگر فراموش کنید یک نگهبان مفسر را ببندید، فرایند در طول نهایی‌سازی **به‌طور دائم معلق خواهد ماند**!" -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:member:`PyConfig.program_name` یا مقدار پیش‌فرض را برمی‌گرداند. رشته‌ی بازگردانده‌شده به فضای ذخیره‌سازی ایستا اشاره می‌کند؛ فراخواننده نباید مقدار آن را تغییر دهد." +msgid "Holding a guard for an interpreter is similar to holding a :term:`strong reference` to a Python object, except finalization does not happen automatically after all guards are released: it requires an explicit :c:func:`Py_EndInterpreter` call." +msgstr "نگه‌داشتن یک نگهبان برای یک مفسر شبیه به نگه‌داشتن یک :term:`ارجاع قوی ` به یک شیء پایتون است، با این تفاوت که نهایی‌سازی به‌طور خودکار پس از آزاد شدن همه‌ی نگهبان‌ها اتفاق نمی‌افتد: بلکه نیازمند یک فراخوانی صریح :c:func:`Py_EndInterpreter` است." -msgid "This function should not be called before :c:func:`Py_Initialize`, otherwise it returns ``NULL``." -msgstr "این تابع نباید پیش از :c:func:`Py_Initialize` فراخوانی شود، در غیر این صورت ``NULL`` را برمی‌گرداند." +msgid "Create a finalization guard for the current interpreter. This will prevent finalization until the guard is closed." +msgstr "یک نگهبان نهایی‌سازی برای مفسر فعلی ایجاد کنید. این کار تا زمان بسته شدن نگهبان، از نهایی‌سازی جلوگیری می‌کند." + +msgid "For example:" +msgstr "برای نمونه:" + +msgid "" +"// Temporarily prevent finalization.\n" +"PyInterpreterGuard *guard = PyInterpreterGuard_FromCurrent();\n" +"if (guard == NULL) {\n" +" // Finalization has already started or we're out of memory.\n" +" return NULL;\n" +"}\n" +"\n" +"Py_BEGIN_ALLOW_THREADS;\n" +"// Do some critical processing here. For example, we can safely acquire\n" +"// locks that might be acquired by the finalization thread.\n" +"Py_END_ALLOW_THREADS;\n" +"\n" +"// Now that we're done with our critical processing, the interpreter is\n" +"// allowed to finalize again.\n" +"PyInterpreterGuard_Close(guard);" +msgstr "" +"// Temporarily prevent finalization.\n" +"PyInterpreterGuard *guard = PyInterpreterGuard_FromCurrent();\n" +"if (guard == NULL) {\n" +" // Finalization has already started or we're out of memory.\n" +" return NULL;\n" +"}\n" +"\n" +"Py_BEGIN_ALLOW_THREADS;\n" +"// Do some critical processing here. For example, we can safely acquire\n" +"// locks that might be acquired by the finalization thread.\n" +"Py_END_ALLOW_THREADS;\n" +"\n" +"// Now that we're done with our critical processing, the interpreter is\n" +"// allowed to finalize again.\n" +"PyInterpreterGuard_Close(guard);" -msgid "It now returns ``NULL`` if called before :c:func:`Py_Initialize`." -msgstr "اکنون اگر پیش از :c:func:`Py_Initialize` فراخوانی شود، ``NULL`` را برمی‌گرداند." +msgid "On success, this function returns a guard for the current interpreter; on failure, it returns ``NULL`` with an exception set." +msgstr "این تابع در صورت موفقیت، یک نگهبان برای مفسر فعلی برمی‌گرداند؛ و در صورت شکست، مقدار ``NULL`` را به همراه تنظیم یک استثنا برمی‌گرداند." -msgid "Use :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) instead." -msgstr "به جای آن از :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) استفاده کنید." +msgid "This function will fail only if the current interpreter has already started finalizing, or if the process is out of memory." +msgstr "این تابع تنها زمانی با شکست مواجه خواهد شد که مفسر فعلی از پیش فرآیند نهایی‌سازی را آغاز کرده باشد، یا اینکه حافظه‌ی فرایند به پایان رسیده باشد." -msgid "Return the *prefix* for installed platform-independent files. This is derived through a number of complicated rules from the program name set with :c:member:`PyConfig.program_name` and some environment variables; for example, if the program name is ``'/usr/local/bin/python'``, the prefix is ``'/usr/local'``. The returned string points into static storage; the caller should not modify its value. This corresponds to the :makevar:`prefix` variable in the top-level :file:`Makefile` and the :option:`--prefix` argument to the :program:`configure` script at build time. The value is available to Python code as ``sys.base_prefix``. It is only useful on Unix. See also the next function." -msgstr "*پیشوند* پرونده‌های نصب‌شده‌ی مستقل از پلتفرم را برمی‌گرداند. این پیشوند بر اساس تعدادی قاعده‌ی پیچیده، از نام برنامه‌ای که با :c:member:`PyConfig.program_name` تنظیم‌شده است و برخی متغیرهای محیطی به دست می‌آید؛ برای نمونه، اگر نام برنامه ``'/usr/local/bin/python'`` باشد، پیشوند ``'/usr/local'`` است. رشته‌ی بازگردانده‌شده به حافظه‌ی ایستا اشاره می‌کند؛ فراخواننده نباید مقدار آن را تغییر دهد. این مقدار با متغیر :makevar:`prefix` در :file:`Makefile` سطح بالا و آرگومان :option:`--prefix` اسکریپت :program:`configure` در زمان ساخت مطابقت دارد. این مقدار برای کد پایتون به‌صورت ``sys.base_prefix`` در دسترس است. فقط روی یونیکس کاربرد دارد. همچنین تابع بعدی را ببینید." +msgid "The guard pointer returned by this function must be eventually closed with :c:func:`PyInterpreterGuard_Close`; failing to do so will result in the Python process infinitely hanging." +msgstr "اشاره‌گر نگهبان بازگردانده‌شده توسط این تابع باید در نهایت با :c:func:`PyInterpreterGuard_Close` بسته شود؛ در غیر این صورت، فرایند پایتون به‌طور بی‌نهایت معلق خواهد ماند." -msgid "Use :c:func:`PyConfig_Get(\"base_prefix\") ` (:data:`sys.base_prefix`) instead. Use :c:func:`PyConfig_Get(\"prefix\") ` (:data:`sys.prefix`) if :ref:`virtual environments ` need to be handled." -msgstr "به‌جای آن از :c:func:`PyConfig_Get(\"base_prefix\") ` (:data:`sys.base_prefix`) استفاده کنید. اگر لازم است :ref:`محیط‌های مجازی ` مدیریت شوند، از :c:func:`PyConfig_Get(\"prefix\") ` (:data:`sys.prefix`) استفاده کنید." +msgid "The caller must hold an :term:`attached thread state`." +msgstr "فراخواننده باید یک :term:`وضعیت نخ متصل‌شده ` را نگه دارد." -msgid "Return the *exec-prefix* for installed platform-*dependent* files. This is derived through a number of complicated rules from the program name set with :c:member:`PyConfig.program_name` and some environment variables; for example, if the program name is ``'/usr/local/bin/python'``, the exec-prefix is ``'/usr/local'``. The returned string points into static storage; the caller should not modify its value. This corresponds to the :makevar:`exec_prefix` variable in the top-level :file:`Makefile` and the ``--exec-prefix`` argument to the :program:`configure` script at build time. The value is available to Python code as ``sys.base_exec_prefix``. It is only useful on Unix." -msgstr "*پیشوند اجرا* (exec-prefix) را برای پرونده‌های نصب‌شده‌ی *وابسته* به پلتفرم برمی‌گرداند. این مقدار بر اساس تعدادی قاعده‌ی پیچیده از نام برنامه‌ی تنظیم‌شده با :c:member:`PyConfig.program_name` و برخی متغیرهای محیطی به دست می‌آید؛ برای مثال، اگر نام برنامه ``'/usr/local/bin/python'`` باشد، پیشوند اجرا ``'/usr/local'`` است. رشته‌ی بازگردانده‌شده به حافظه‌ی ایستا اشاره می‌کند؛ فراخواننده نباید مقدار آن را تغییر دهد. این مقدار با متغیر :makevar:`exec_prefix` در :file:`Makefile` سطح بالا و آرگومان ``--exec-prefix`` اسکریپت :program:`configure` در زمان ساخت مطابقت دارد. این مقدار در کد پایتون به‌صورت ``sys.base_exec_prefix`` در دسترس است. این مقدار فقط در یونیکس کاربرد دارد." +msgid "Create a finalization guard for an interpreter through a view." +msgstr "ایجاد یک نگهبان نهایی‌سازی برای یک مفسر از طریق یک نما." -msgid "Background: The exec-prefix differs from the prefix when platform dependent files (such as executables and shared libraries) are installed in a different directory tree. In a typical installation, platform dependent files may be installed in the :file:`/usr/local/plat` subtree while platform independent may be installed in :file:`/usr/local`." -msgstr "پیش‌زمینه: پیشوند اجرا هنگامی از پیشوند متفاوت است که پرونده‌های وابسته به پلتفرم (مانند پرونده‌های اجرایی و کتابخانه‌های اشتراکی) در درخت پوشه‌ی متفاوتی نصب شوند. در یک نصب معمولی، ممکن است پرونده‌های وابسته به پلتفرم در زیردرخت :file:`/usr/local/plat` نصب شوند، در حالی که پرونده‌های مستقل از پلتفرم ممکن است در :file:`/usr/local` نصب شوند." +msgid "On success, this function returns a guard to the interpreter represented by *view*. The view is still valid after calling this function. The guard must eventually be closed with :c:func:`PyInterpreterGuard_Close`." +msgstr "این تابع در صورت موفقیت، نگهبانی را نسبت به مفسر بازنمایی‌شده توسط *view* برمی‌گرداند. نما پس از فراخوانی این تابع هم‌چنان معتبر است. نگهبان باید در نهایت با :c:func:`PyInterpreterGuard_Close` بسته شود." -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 considered the same platform, but Intel machines running Solaris 2.x are another platform, and Intel machines running Linux are yet another platform. Different major revisions of the same operating system generally also form different platforms. Non-Unix operating systems are a different story; the installation strategies on those systems are so different that the prefix and exec-prefix are meaningless, and set to the empty string. Note that compiled Python bytecode files are platform independent (but not independent from the Python version by which they were compiled!)." -msgstr "به‌طور کلی، یک پلتفرم ترکیبی از خانواده‌های سخت‌افزاری و نرم‌افزاری است؛ برای مثال، ماشین‌های Sparc که سیستم‌عامل Solaris 2.x را اجرا می‌کنند، یک پلتفرم واحد محسوب می‌شوند، اما ماشین‌های Intel که Solaris 2.x را اجرا می‌کنند، پلتفرم دیگری هستند و ماشین‌های Intel که لینوکس را اجرا می‌کنند، پلتفرمی دیگر. نسخه‌های اصلی مختلف یک سیستم‌عامل واحد نیز به‌طور کلی پلتفرم‌های متفاوتی را تشکیل می‌دهند. سیستم‌عامل‌های غیر یونیکسی داستان دیگری دارند؛ راهبردهای نصب در این سیستم‌ها چنان متفاوت است که پیشوند و پیشوند اجرا بی‌معنا هستند و روی رشته خالی تنظیم می‌شوند. توجه داشته باشید که پرونده‌های بایت‌کد کامپایل‌شده پایتون مستقل از پلتفرم هستند (اما از نسخه پایتونی که آن‌ها را کامپایل کرده است، مستقل نیستند!)." +msgid "If the interpreter no longer exists, is already finalizing, or out of memory, then this function returns ``NULL`` without setting an exception." +msgstr "اگر مفسر دیگر وجود نداشته باشد، از پیش در حال نهایی‌سازی باشد یا حافظه‌اش تمام شده باشد، این تابع ``NULL`` را بدون تنظیم استثنا برمی‌گرداند." -msgid "System administrators will know how to configure the :program:`mount` or :program:`automount` programs to share :file:`/usr/local` between platforms while having :file:`/usr/local/plat` be a different filesystem for each platform." -msgstr "مدیران سیستم می‌دانند چگونه برنامه‌های :program:`mount` یا :program:`automount` را پیکربندی کنند تا :file:`/usr/local` میان پلتفرم‌ها به اشتراک گذاشته شود، در حالی که :file:`/usr/local/plat` برای هر پلتفرم یک سامانه فایل‌بندی متفاوت باشد." +msgid "The caller does not need to hold an :term:`attached thread state`." +msgstr "فراخواننده نیازی به نگه داشتن یک :term:`وضعیت نخ متصل‌شده ` ندارد." -msgid "Use :c:func:`PyConfig_Get(\"base_exec_prefix\") ` (:data:`sys.base_exec_prefix`) instead. Use :c:func:`PyConfig_Get(\"exec_prefix\") ` (:data:`sys.exec_prefix`) if :ref:`virtual environments ` need to be handled." -msgstr "به‌جای آن از :c:func:`PyConfig_Get(\"base_exec_prefix\") ` (:data:`sys.base_exec_prefix`) استفاده کنید. اگر لازم باشد :ref:`محیط‌های مجازی ` مدیریت شوند، از :c:func:`PyConfig_Get(\"exec_prefix\") ` (:data:`sys.exec_prefix`) استفاده کنید." +msgid "Close an interpreter guard, allowing the interpreter to start finalization if no other guards remain. If an interpreter guard is never closed, the interpreter will infinitely wait when trying to enter finalization!" +msgstr "بستن یک نگهبان مفسر، به مفسر اجازه می‌دهد اگر نگهبان دیگری باقی نمانده باشد، نهایی‌سازی را آغاز کند. اگر نگهبان مفسری هرگز بسته نشود، مفسر هنگام تلاش برای ورود به مرحله‌ی نهایی‌سازی، به‌طور بی‌نهایت منتظر خواهد ماند!" -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 name (set by :c:member:`PyConfig.program_name`). The returned string points into static storage; the caller should not modify its value. The value is available to Python code as ``sys.executable``." -msgstr "نام کامل برنامه‌ی اجرایی پایتون را برمی‌گرداند؛ این نام به‌عنوان یک عارضه‌ی جانبی از استخراج مسیر جستجوی پیش‌فرض ماژول از نام برنامه (که توسط :c:member:`PyConfig.program_name` تنظیم می‌شود) محاسبه می‌شود. رشته‌ی بازگردانده‌شده به حافظه‌ی ایستا اشاره می‌کند؛ فراخواننده نباید مقدار آن را تغییر دهد. این مقدار برای کد پایتون به صورت ``sys.executable`` در دسترس است." +msgid "After an interpreter guard is closed, it may not be used in :c:func:`PyThreadState_Ensure`. Doing so will result in undefined behavior." +msgstr "پس از بسته شدن نگهبان مفسر، ممکن است نتوان از آن در :c:func:`PyThreadState_Ensure` استفاده کرد. انجام این کار به رفتار نامشخص منجر خواهد شد." -msgid "Return the default module search path; this is computed from the program name (set by :c:member:`PyConfig.program_name`) and some environment variables. The returned string consists of a series of directory names separated by a platform dependent delimiter character. The delimiter character is ``':'`` on Unix and macOS, ``';'`` on Windows. The returned string points into static storage; the caller should not modify its value. The list :data:`sys.path` is initialized with this value on interpreter startup; it can be (and usually is) modified later to change the search path for loading modules." -msgstr "مسیر جستجوی پیش‌فرض ماژول را برمی‌گرداند؛ این مسیر از نام برنامه (که توسط :c:member:`PyConfig.program_name` تنظیم می‌شود) و برخی متغیرهای محیطی محاسبه می‌شود. رشته‌ی بازگردانده‌شده از مجموعه‌ای از نام پوشه‌ها تشکیل شده است که با نویسه‌ی جداکننده‌ای وابسته به پلتفرم از هم جدا شده‌اند. نویسه‌ی جداکننده در یونیکس و مک‌اواس ``':'`` و در ویندوز ``';'`` است. رشته‌ی بازگردانده‌شده به داخل ذخیره‌گاه ایستا اشاره می‌کند؛ فراخوان‌کننده نباید مقدار آن را تغییر دهد. فهرست :data:`sys.path` هنگام راه‌اندازی مفسر با این مقدار مقداردهی اولیه می‌شود؛ این فهرست می‌تواند (و معمولاً نیز چنین می‌شود) بعداً برای تغییر مسیر جستجو جهت بارگذاری ماژول‌ها تغییر کند." +msgid "This function cannot fail, and the caller doesn't need to hold an :term:`attached thread state`." +msgstr "این تابع نمی‌تواند با شکست مواجه شود و فراخواننده نیازی به نگهداری یک :term:`وضعیت نخ متصل ` ندارد." -msgid "Use :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:`sys.path`) instead." -msgstr "به جای آن از :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:`sys.path`) استفاده کنید." +msgid "Interpreter views" +msgstr "نماهای مفسر" + +msgid "In some cases, it may be necessary to access an interpreter that may have been deleted. This can be done using interpreter views." +msgstr "در برخی موارد، ممکن است دسترسی به مفسری که شاید حذف شده باشد، ضروری باشد. این کار را می‌توان با استفاده از نماهای مفسر انجام داد." + +msgid "An opaque view of an interpreter." +msgstr "یک نمای کدر از یک مفسر." + +msgid "This is a thread-safe way to access an interpreter that may have be finalizing or already destroyed." +msgstr "این یک روش نخ‌ایمن برای دسترسی به مفسری است که ممکن است در حال نهایی‌سازی بوده یا از پیش نابود شده باشد." + +msgid "Create a view to the current interpreter." +msgstr "ایجاد یک نما به مفسر فعلی." + +msgid "This function is generally meant to be used alongside :c:func:`PyInterpreterGuard_FromView` or :c:func:`PyThreadState_EnsureFromView`." +msgstr "این تابع عموماً به این منظور استفاده می‌شود که در کنار :c:func:`PyInterpreterGuard_FromView` یا :c:func:`PyThreadState_EnsureFromView` به کار رود." + +msgid "On success, this function returns a view to the current interpreter; on failure, it returns ``NULL`` with an exception set." +msgstr "این تابع در صورت موفقیت، نمایی به مفسر فعلی برمی‌گرداند؛ و در صورت شکست، مقدار ``NULL`` را به همراه تنظیم یک استثنا برمی‌گرداند." + +msgid "Close an interpreter view." +msgstr "بستن یک نمای مفسر." + +msgid "If an interpreter view is never closed, the view's memory will never be freed, but there are no other consequences. (In contrast, forgetting to close a guard will infinitely hang the main thread during finalization.)" +msgstr "اگر نمای مفسری هرگز بسته نشود، حافظه‌ی نما هرگز آزاد نخواهد شد، اما پیامد دیگری ندارد. (در مقابل، فراموش کردن بستن یک نگهبان باعث معلق ماندن بی‌نهایت نخ اصلی در طول نهایی‌سازی خواهد شد.)" + +msgid "Create a view for the main interpreter (the first and default interpreter in a Python process; see :c:func:`PyInterpreterState_Main`)." +msgstr "ایجاد یک نما برای مفسر اصلی (اولین مفسر پیش‌فرض در یک فرایند پایتون؛ نگاه کنید به :c:func:`PyInterpreterState_Main`)." + +msgid "On success, this function returns a view to the main interpreter; on failure, it returns ``NULL`` without an exception set. Failure indicates that the process is out of memory." +msgstr "این تابع در صورت موفقیت، نمایی به مفسر اصلی برمی‌گرداند؛ و در صورت شکست، ``NULL`` را بدون تنظیم استثنا برمی‌گرداند. شکست نشان‌دهنده‌ی این است که حافظه‌ی فرایند تمام شده است." + +msgid "Use this function when an interpreter pointer or view cannot be supplied by the caller, such as when a native threading library does not provide a ``void *arg`` parameter that could carry a :c:type:`PyInterpreterGuard` or :c:type:`PyInterpreterView`. In code that supports subinterpreters, prefer :c:func:`PyInterpreterView_FromCurrent` so the guard tracks the calling interpreter rather than the main one." +msgstr "هنگامی که فراخواننده نتواند یک اشاره‌گر مفسر یا نما را فراهم کند، مانند زمانی که یک کتابخانه‌ی نخ‌کشی بومی پارامتری به شکل ``void *arg`` که بتواند یک :c:type:`PyInterpreterGuard` یا :c:type:`PyInterpreterView` را حمل کند ارائه نمی‌دهد، از این تابع استفاده کنید. در کدهایی که از مفسرهای فرعی پشتیبانی می‌کنند، :c:func:`PyInterpreterView_FromCurrent` را ترجیح دهید تا نگهبان به جای مفسر اصلی، مفسر فراخواننده را پیگیری کند." + +msgid "Process-wide parameters" +msgstr "پارامترهای در سطح فرایند" + +msgid "This API is kept for backward compatibility: setting :c:member:`PyConfig.program_name` should be used instead, see :ref:`Python Initialization Configuration `." +msgstr "این API برای سازگاری با نسخه‌های پیشین حفظ شده است: به جای آن باید :c:member:`PyConfig.program_name` را تنظیم کنید؛ به :ref:`پیکربندی مقدار‌دهی اولیه پایتون ` مراجعه کنید." + +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 of the ``argv[0]`` argument to the :c:func:`main` function of the program (converted to wide characters). This is used by some other functions below to find the Python run-time libraries relative to the interpreter executable. The default value is ``'python'``. The argument should point to a zero-terminated wide character string in static storage whose contents will not change for the duration of the program's execution. No code in the Python interpreter will change the contents of this storage." +msgstr "این تابع باید پیش از فراخوانی :c:func:`Py_Initialize` برای نخستین بار (در صورت فراخوانی) فراخوانی شود. این تابع مقدار آرگومان ``argv[0]`` تابع :c:func:`main` برنامه را (که به نویسه‌های پهن تبدیل شده است) به مفسر اعلام می‌کند. این مقدار توسط برخی دیگر از توابع زیر برای یافتن کتابخانه‌های زمان اجرای پایتون نسبت به فایل اجرایی مفسر استفاده می‌شود. مقدار پیش‌فرض ``'python'`` است. آرگومان باید به یک رشته‌ی نویسه پهنِ ختم‌شده به صفر در حافظه ایستا اشاره کند که محتویات آن در طول اجرای برنامه تغییر نخواهد کرد. هیچ کدی در مفسر پایتون محتویات این حافظه را تغییر نخواهد داد." + +msgid "Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a :c:expr:`wchar_t*` string." +msgstr "برای کدگشایی یک رشته بایتی و به‌دست آوردن یک رشته‌ی :c:expr:`wchar_t*` از :c:func:`Py_DecodeLocale` استفاده کنید." msgid "Return the version of this Python interpreter. This is a string that looks something like ::" msgstr "نسخه‌ی این مفسر پایتون را برمی‌گرداند. این رشته‌ای است که چیزی شبیه به این است ::" @@ -577,12 +665,6 @@ msgstr "پوشه‌ی «home» پیش‌فرض را تنظیم می‌کند، 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 execution. No code in the Python interpreter will change the contents of this storage." msgstr "آرگومان باید به یک رشته‌ی نویسه‌ای پایان‌یافته با نویسه‌ی تهی در حافظه‌ی ایستا اشاره کند که محتوای آن در طول مدت اجرای برنامه تغییر نخواهد کرد. هیچ کدی در مفسر پایتون محتوای این حافظه را تغییر نخواهد داد." -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 "بازگرداندن «home» پیش‌فرض، یعنی مقداری که توسط :c:member:`PyConfig.home` تنظیم شده است، یا مقدار متغیر محیطی :envvar:`PYTHONHOME` در صورتی که تنظیم شده باشد." - -msgid "Use :c:func:`PyConfig_Get(\"home\") ` or the :envvar:`PYTHONHOME` environment variable instead." -msgstr "به‌جای آن از :c:func:`PyConfig_Get(\"home\") ` یا متغیر محیطی :envvar:`PYTHONHOME` استفاده کنید." - msgid "PyEval_InitThreads()" msgstr "PyEval_InitThreads()" @@ -619,12 +701,6 @@ msgstr "Py_Initialize()" msgid "main()" msgstr "main()" -msgid "Py_GetPath()" -msgstr "Py_GetPath()" - -msgid "executable (in module sys)" -msgstr "executable (در ماژول sys)" - msgid "version (in module sys)" msgstr "version (در ماژول sys)" @@ -639,3 +715,63 @@ msgstr "Py_FatalError()" msgid "argv (in module sys)" msgstr "argv (در ماژول sys)" + +#~ msgid "If any thread, other than the finalization thread, attempts to attach a :term:`thread state` during finalization, either explicitly or implicitly, the thread enters **a permanently blocked state** where it remains until the program exits. In most cases this is harmless, but this can result in deadlock if a later stage of finalization attempts to acquire a lock owned by the blocked thread, or otherwise waits on the blocked thread." +#~ msgstr "اگر نخی غیر از نخ نهایی‌سازی، در حین نهایی‌سازی، چه به‌طور صریح و چه به‌طور ضمنی، تلاش کند یک :term:`thread state` را متصل کند، آن نخ وارد **وضعیت مسدود دائمی** می‌شود و تا زمان خروج برنامه در همان وضعیت باقی می‌ماند. در بیشتر موارد این بی‌ضرر است، اما اگر مرحله‌ای بعدی از نهایی‌سازی تلاش کند قفلی را که در اختیار نخ مسدود است به دست آورد یا به نحوی دیگر منتظر نخ مسدود بماند، این می‌تواند منجر به بن‌بست شود." + +#~ msgid "Gross? Yes. This prevents random crashes and/or unexpectedly skipped C++ finalizations further up the call stack when such threads were forcibly exited here in CPython 3.13 and earlier. The CPython runtime :term:`thread state` C APIs have never had any error reporting or handling expectations at :term:`thread state` attachment time that would've allowed for graceful exit from this situation. Changing that would require new stable C APIs and rewriting the majority of C code in the CPython ecosystem to use those with error handling." +#~ msgstr "زشت است؟ بله. این کار از فروپاشی‌های تصادفی و/یا رد شدن غیرمنتظره‌ی نهایی‌سازی‌های C++ در بخش‌های بالاتر پشته فراخوانی جلوگیری می‌کند؛ همان مشکلاتی که در سی‌پایتون 3.13 و نسخه‌های پیشین، هنگامی که چنین نخ‌هایی در اینجا به‌اجبار خارج می‌شدند، پیش می‌آمدند. APIهای C مربوط به :term:`وضعیت نخ ` در ران‌تایم سی‌پایتون هیچ‌گاه در زمان اتصال :term:`وضعیت نخ ` هیچ‌گونه انتظاری برای گزارش یا مدیریت خطا نداشته‌اند که خروج منظم از این وضعیت را ممکن می‌ساخت. تغییر این امر نیازمند ایجاد APIهای C پایدار جدید و بازنویسی بخش عمده‌ی کدهای C در اکوسیستم سی‌پایتون برای استفاده از آن‌ها همراه با مدیریت خطا خواهد بود." + +#~ 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:member:`PyConfig.program_name` یا مقدار پیش‌فرض را برمی‌گرداند. رشته‌ی بازگردانده‌شده به فضای ذخیره‌سازی ایستا اشاره می‌کند؛ فراخواننده نباید مقدار آن را تغییر دهد." + +#~ msgid "This function should not be called before :c:func:`Py_Initialize`, otherwise it returns ``NULL``." +#~ msgstr "این تابع نباید پیش از :c:func:`Py_Initialize` فراخوانی شود، در غیر این صورت ``NULL`` را برمی‌گرداند." + +#~ msgid "It now returns ``NULL`` if called before :c:func:`Py_Initialize`." +#~ msgstr "اکنون اگر پیش از :c:func:`Py_Initialize` فراخوانی شود، ``NULL`` را برمی‌گرداند." + +#~ msgid "Use :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) instead." +#~ msgstr "به جای آن از :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) استفاده کنید." + +#~ msgid "Return the *prefix* for installed platform-independent files. This is derived through a number of complicated rules from the program name set with :c:member:`PyConfig.program_name` and some environment variables; for example, if the program name is ``'/usr/local/bin/python'``, the prefix is ``'/usr/local'``. The returned string points into static storage; the caller should not modify its value. This corresponds to the :makevar:`prefix` variable in the top-level :file:`Makefile` and the :option:`--prefix` argument to the :program:`configure` script at build time. The value is available to Python code as ``sys.base_prefix``. It is only useful on Unix. See also the next function." +#~ msgstr "*پیشوند* پرونده‌های نصب‌شده‌ی مستقل از پلتفرم را برمی‌گرداند. این پیشوند بر اساس تعدادی قاعده‌ی پیچیده، از نام برنامه‌ای که با :c:member:`PyConfig.program_name` تنظیم‌شده است و برخی متغیرهای محیطی به دست می‌آید؛ برای نمونه، اگر نام برنامه ``'/usr/local/bin/python'`` باشد، پیشوند ``'/usr/local'`` است. رشته‌ی بازگردانده‌شده به حافظه‌ی ایستا اشاره می‌کند؛ فراخواننده نباید مقدار آن را تغییر دهد. این مقدار با متغیر :makevar:`prefix` در :file:`Makefile` سطح بالا و آرگومان :option:`--prefix` اسکریپت :program:`configure` در زمان ساخت مطابقت دارد. این مقدار برای کد پایتون به‌صورت ``sys.base_prefix`` در دسترس است. فقط روی یونیکس کاربرد دارد. همچنین تابع بعدی را ببینید." + +#~ msgid "Use :c:func:`PyConfig_Get(\"base_prefix\") ` (:data:`sys.base_prefix`) instead. Use :c:func:`PyConfig_Get(\"prefix\") ` (:data:`sys.prefix`) if :ref:`virtual environments ` need to be handled." +#~ msgstr "به‌جای آن از :c:func:`PyConfig_Get(\"base_prefix\") ` (:data:`sys.base_prefix`) استفاده کنید. اگر لازم است :ref:`محیط‌های مجازی ` مدیریت شوند، از :c:func:`PyConfig_Get(\"prefix\") ` (:data:`sys.prefix`) استفاده کنید." + +#~ msgid "Return the *exec-prefix* for installed platform-*dependent* files. This is derived through a number of complicated rules from the program name set with :c:member:`PyConfig.program_name` and some environment variables; for example, if the program name is ``'/usr/local/bin/python'``, the exec-prefix is ``'/usr/local'``. The returned string points into static storage; the caller should not modify its value. This corresponds to the :makevar:`exec_prefix` variable in the top-level :file:`Makefile` and the ``--exec-prefix`` argument to the :program:`configure` script at build time. The value is available to Python code as ``sys.base_exec_prefix``. It is only useful on Unix." +#~ msgstr "*پیشوند اجرا* (exec-prefix) را برای پرونده‌های نصب‌شده‌ی *وابسته* به پلتفرم برمی‌گرداند. این مقدار بر اساس تعدادی قاعده‌ی پیچیده از نام برنامه‌ی تنظیم‌شده با :c:member:`PyConfig.program_name` و برخی متغیرهای محیطی به دست می‌آید؛ برای مثال، اگر نام برنامه ``'/usr/local/bin/python'`` باشد، پیشوند اجرا ``'/usr/local'`` است. رشته‌ی بازگردانده‌شده به حافظه‌ی ایستا اشاره می‌کند؛ فراخواننده نباید مقدار آن را تغییر دهد. این مقدار با متغیر :makevar:`exec_prefix` در :file:`Makefile` سطح بالا و آرگومان ``--exec-prefix`` اسکریپت :program:`configure` در زمان ساخت مطابقت دارد. این مقدار در کد پایتون به‌صورت ``sys.base_exec_prefix`` در دسترس است. این مقدار فقط در یونیکس کاربرد دارد." + +#~ msgid "Background: The exec-prefix differs from the prefix when platform dependent files (such as executables and shared libraries) are installed in a different directory tree. In a typical installation, platform dependent files may be installed in the :file:`/usr/local/plat` subtree while platform independent may be installed in :file:`/usr/local`." +#~ msgstr "پیش‌زمینه: پیشوند اجرا هنگامی از پیشوند متفاوت است که پرونده‌های وابسته به پلتفرم (مانند پرونده‌های اجرایی و کتابخانه‌های اشتراکی) در درخت پوشه‌ی متفاوتی نصب شوند. در یک نصب معمولی، ممکن است پرونده‌های وابسته به پلتفرم در زیردرخت :file:`/usr/local/plat` نصب شوند، در حالی که پرونده‌های مستقل از پلتفرم ممکن است در :file:`/usr/local` نصب شوند." + +#~ 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 considered the same platform, but Intel machines running Solaris 2.x are another platform, and Intel machines running Linux are yet another platform. Different major revisions of the same operating system generally also form different platforms. Non-Unix operating systems are a different story; the installation strategies on those systems are so different that the prefix and exec-prefix are meaningless, and set to the empty string. Note that compiled Python bytecode files are platform independent (but not independent from the Python version by which they were compiled!)." +#~ msgstr "به‌طور کلی، یک پلتفرم ترکیبی از خانواده‌های سخت‌افزاری و نرم‌افزاری است؛ برای مثال، ماشین‌های Sparc که سیستم‌عامل Solaris 2.x را اجرا می‌کنند، یک پلتفرم واحد محسوب می‌شوند، اما ماشین‌های Intel که Solaris 2.x را اجرا می‌کنند، پلتفرم دیگری هستند و ماشین‌های Intel که لینوکس را اجرا می‌کنند، پلتفرمی دیگر. نسخه‌های اصلی مختلف یک سیستم‌عامل واحد نیز به‌طور کلی پلتفرم‌های متفاوتی را تشکیل می‌دهند. سیستم‌عامل‌های غیر یونیکسی داستان دیگری دارند؛ راهبردهای نصب در این سیستم‌ها چنان متفاوت است که پیشوند و پیشوند اجرا بی‌معنا هستند و روی رشته خالی تنظیم می‌شوند. توجه داشته باشید که پرونده‌های بایت‌کد کامپایل‌شده پایتون مستقل از پلتفرم هستند (اما از نسخه پایتونی که آن‌ها را کامپایل کرده است، مستقل نیستند!)." + +#~ msgid "System administrators will know how to configure the :program:`mount` or :program:`automount` programs to share :file:`/usr/local` between platforms while having :file:`/usr/local/plat` be a different filesystem for each platform." +#~ msgstr "مدیران سیستم می‌دانند چگونه برنامه‌های :program:`mount` یا :program:`automount` را پیکربندی کنند تا :file:`/usr/local` میان پلتفرم‌ها به اشتراک گذاشته شود، در حالی که :file:`/usr/local/plat` برای هر پلتفرم یک سامانه فایل‌بندی متفاوت باشد." + +#~ msgid "Use :c:func:`PyConfig_Get(\"base_exec_prefix\") ` (:data:`sys.base_exec_prefix`) instead. Use :c:func:`PyConfig_Get(\"exec_prefix\") ` (:data:`sys.exec_prefix`) if :ref:`virtual environments ` need to be handled." +#~ msgstr "به‌جای آن از :c:func:`PyConfig_Get(\"base_exec_prefix\") ` (:data:`sys.base_exec_prefix`) استفاده کنید. اگر لازم باشد :ref:`محیط‌های مجازی ` مدیریت شوند، از :c:func:`PyConfig_Get(\"exec_prefix\") ` (:data:`sys.exec_prefix`) استفاده کنید." + +#~ 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 name (set by :c:member:`PyConfig.program_name`). The returned string points into static storage; the caller should not modify its value. The value is available to Python code as ``sys.executable``." +#~ msgstr "نام کامل برنامه‌ی اجرایی پایتون را برمی‌گرداند؛ این نام به‌عنوان یک عارضه‌ی جانبی از استخراج مسیر جستجوی پیش‌فرض ماژول از نام برنامه (که توسط :c:member:`PyConfig.program_name` تنظیم می‌شود) محاسبه می‌شود. رشته‌ی بازگردانده‌شده به حافظه‌ی ایستا اشاره می‌کند؛ فراخواننده نباید مقدار آن را تغییر دهد. این مقدار برای کد پایتون به صورت ``sys.executable`` در دسترس است." + +#~ msgid "Return the default module search path; this is computed from the program name (set by :c:member:`PyConfig.program_name`) and some environment variables. The returned string consists of a series of directory names separated by a platform dependent delimiter character. The delimiter character is ``':'`` on Unix and macOS, ``';'`` on Windows. The returned string points into static storage; the caller should not modify its value. The list :data:`sys.path` is initialized with this value on interpreter startup; it can be (and usually is) modified later to change the search path for loading modules." +#~ msgstr "مسیر جستجوی پیش‌فرض ماژول را برمی‌گرداند؛ این مسیر از نام برنامه (که توسط :c:member:`PyConfig.program_name` تنظیم می‌شود) و برخی متغیرهای محیطی محاسبه می‌شود. رشته‌ی بازگردانده‌شده از مجموعه‌ای از نام پوشه‌ها تشکیل شده است که با نویسه‌ی جداکننده‌ای وابسته به پلتفرم از هم جدا شده‌اند. نویسه‌ی جداکننده در یونیکس و مک‌اواس ``':'`` و در ویندوز ``';'`` است. رشته‌ی بازگردانده‌شده به داخل ذخیره‌گاه ایستا اشاره می‌کند؛ فراخوان‌کننده نباید مقدار آن را تغییر دهد. فهرست :data:`sys.path` هنگام راه‌اندازی مفسر با این مقدار مقداردهی اولیه می‌شود؛ این فهرست می‌تواند (و معمولاً نیز چنین می‌شود) بعداً برای تغییر مسیر جستجو جهت بارگذاری ماژول‌ها تغییر کند." + +#~ msgid "Use :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:`sys.path`) instead." +#~ msgstr "به جای آن از :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:`sys.path`) استفاده کنید." + +#~ 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 "بازگرداندن «home» پیش‌فرض، یعنی مقداری که توسط :c:member:`PyConfig.home` تنظیم شده است، یا مقدار متغیر محیطی :envvar:`PYTHONHOME` در صورتی که تنظیم شده باشد." + +#~ msgid "Use :c:func:`PyConfig_Get(\"home\") ` or the :envvar:`PYTHONHOME` environment variable instead." +#~ msgstr "به‌جای آن از :c:func:`PyConfig_Get(\"home\") ` یا متغیر محیطی :envvar:`PYTHONHOME` استفاده کنید." + +#~ msgid "Py_GetPath()" +#~ msgstr "Py_GetPath()" + +#~ msgid "executable (in module sys)" +#~ msgstr "executable (در ماژول sys)" diff --git a/c-api/intro.po b/c-api/intro.po index aa454bd0..446e1ba2 100644 --- a/c-api/intro.po +++ b/c-api/intro.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 00:49+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -87,6 +88,60 @@ msgstr "برای گنجاندن سرآیندها، هر دو پوشه (در صو msgid "C++ users should note that although the API is defined entirely using C, the header files properly declare the entry points to be ``extern \"C\"``. As a result, there is no need to do anything special to use the API from C++." msgstr "کاربران C++ باید توجه داشته باشند که اگرچه API کاملاً با استفاده از C تعریف شده است، پرونده‌های سرآیند نقاط ورود را به‌درستی به‌صورت ``extern \"C\"`` اعلام می‌کنند. در نتیجه، برای استفاده از API در C++ نیازی به انجام کار خاصی نیست." +msgid "System includes" +msgstr "سرفصل‌های سیستمی" + +msgid ":file:`Python.h` includes several standard header files. C extensions should include the standard headers that they use, and should not rely on these implicit includes. The implicit includes are:" +msgstr "پرونده‌ی :file:`Python.h` شامل چندین پرونده‌ی سرآیند استاندارد است. افزونه‌های C باید سرآیندهای استانداردی را که استفاده می‌کنند شامل شوند و نباید به این گنجاندن‌های ضمنی اتکا کنند. گنجاندن‌های ضمنی عبارتند از:" + +msgid "````" +msgstr "````" + +msgid "```` (on Windows)" +msgstr "```` (روی ویندوز)" + +msgid "````" +msgstr "````" + +msgid "````" +msgstr "````" + +msgid "````" +msgstr "````" + +msgid "````" +msgstr "````" + +msgid "````" +msgstr "````" + +msgid "````" +msgstr "````" + +msgid "```` (if present)" +msgstr "```` (در صورت وجود)" + +msgid "The following are included for backwards compatibility, unless using :ref:`Limited API ` 3.13 or newer:" +msgstr "موارد زیر برای سازگاری با نسخه‌های قبلی گنجانده شده‌اند، مگر اینکه از :ref:`Limited API ` نسخه‌ی ۳.۱۳ یا جدیدتر استفاده کنید:" + +msgid "````" +msgstr "````" + +msgid "```` (on POSIX)" +msgstr "```` (روی POSIX)" + +msgid "The following are included for backwards compatibility, unless using :ref:`Limited API ` 3.11 or newer:" +msgstr "موارد زیر برای سازگاری با نسخه‌های قبلی گنجانده شده‌اند، مگر اینکه از :ref:`Limited API ` نسخه‌ی ۳.۱۱ یا جدیدتر استفاده کنید:" + +msgid "````" +msgstr "````" + +msgid "````" +msgstr "````" + +msgid "````" +msgstr "````" + msgid "Useful macros" msgstr "ماکروهای مفید" @@ -373,14 +428,17 @@ msgstr "ماکرویی که توسط سی‌پایتون برای اعلان ی msgid "Outdated macros" msgstr "ماکروهای منسوخ" -msgid "The following macros have been used to features that have been standardized in C11." -msgstr "از ماکروهای زیر برای ویژگی‌هایی که در C11 استاندارد شده‌اند استفاده شده است." +msgid "The following :term:`soft deprecated` macros have been used to features that have been standardized in C11 (or previous standards)." +msgstr "کلان‌دستورهای :term:`به‌طور نرم‌افزاری منسوخ‌شده ` زیر برای ویژگی‌هایی استفاده شده‌اند که در C11 (یا استانداردهای قبلی) استانداردسازی شده‌اند." + +msgid "On some GCC-like compilers, specify alignment to *num* bytes. This does nothing on other compilers." +msgstr "روی برخی کامپایلرهای شبیه به GCC، هم‌راستاسازی را به *num* بایت مشخص کنید. این کار روی سایر کامپایلرها اثری ندارد." -msgid "Specify alignment to *num* bytes on compilers that support it." -msgstr "در کامپایلرهایی که از آن پشتیبانی می‌کنند، هم‌ترازی را به *num* بایت مشخص کنید." +msgid "Use the standard ``alignas`` specifier rather than this macro." +msgstr "به‌جای این کلان‌دستور، از مشخص‌کننده‌ی استاندارد ``alignas`` استفاده کنید." -msgid "Consider using the C11 standard ``_Alignas`` specifier over this macro." -msgstr "استفاده از مشخص‌کننده‌ی ``_Alignas`` استاندارد C11 را به جای این ماکرو در نظر بگیرید." +msgid "The :c:func:`printf` formatting modifier for :c:type:`size_t`. Use ``\"z\"`` directly instead." +msgstr "اصلاح‌کننده‌ی قالب‌بندی :c:func:`printf` برای :c:type:`size_t`. به‌جای آن مستقیماً از ``\"z\"`` استفاده کنید." msgid "Use *number* as a ``long long`` or ``unsigned long long`` integer literal, respectively." msgstr "از *number* به ترتیب به عنوان لفظی عدد صحیح ``long long`` یا ``unsigned long long`` استفاده کنید." @@ -391,12 +449,30 @@ msgstr "به *number* و به ترتیب پس از آن ``LL`` یا ``LLU`` گس msgid "Consider using the C99 standard suffixes ``LL`` and ``LLU`` directly." msgstr "در نظر بگیرید که مستقیماً از پسوندهای استاندارد C99 یعنی ``LL`` و ``LLU`` استفاده کنید." +msgid "Aliases for the types :c:type:`!long long`, :c:type:`!int32_t`, :c:type:`!uint32_t`. :c:type:`!int64_t` and :c:type:`!uint64_t`, respectively. Historically, these types needed compiler-specific extensions." +msgstr "به‌ترتیب نام‌های مستعار برای انواع :c:type:`!long long`، :c:type:`!int32_t`، :c:type:`!uint32_t`، :c:type:`!int64_t` و :c:type:`!uint64_t`. از نظر تاریخی، این نوع‌ها به افزونه‌های خاص کامپایلر نیاز داشتند." + +msgid "Aliases for the values :c:macro:`!LLONG_MIN`, :c:macro:`!LLONG_MAX`, :c:macro:`!ULLONG_MAX`, and :c:macro:`!SIZE_MAX`, respectively. Use these standard names instead." +msgstr "به‌ترتیب نام‌های مستعار برای مقادیر :c:macro:`!LLONG_MIN`، :c:macro:`!LLONG_MAX`، :c:macro:`!ULLONG_MAX` و :c:macro:`!SIZE_MAX`. به‌جای آن‌ها از این نام‌های استاندارد استفاده کنید." + +msgid "The required header, ````, :ref:`is included ` in ``Python.h``." +msgstr "سرآیند مورد نیاز، یعنی ````، در ``Python.h`` :ref:`گنجانده شده است `." + msgid "This is an alias to :c:func:`!memcpy`." msgstr "این یک نام مستعار برای :c:func:`!memcpy` است." msgid "Use :c:func:`!memcpy` directly instead." msgstr "به‌جای آن، مستقیماً از :c:func:`!memcpy` استفاده کنید." +msgid "Size of the :c:type:`!wchar_t` type. Use ``sizeof(wchar_t)`` or ``WCHAR_WIDTH/8`` instead." +msgstr "اندازه‌ی نوع :c:type:`!wchar_t`. به‌جای آن از ``sizeof(wchar_t)`` یا ``WCHAR_WIDTH/8`` استفاده کنید." + +msgid "The required header for the latter, ````, :ref:`is included ` in ``Python.h``." +msgstr "سرآیند مورد نیاز برای مورد دوم، یعنی ````، در ``Python.h`` :ref:`گنجانده شده است `." + +msgid "Defined if ``wchar_t`` can hold a Unicode character (UCS-4). Use ``sizeof(wchar_t) >= 4`` instead" +msgstr "اگر ``wchar_t`` بتواند یک نویسه‌ی یونیکد (UCS-4) را در خود نگه دارد، تعریف می‌شود. به‌جای آن از ``sizeof(wchar_t) >= 4`` استفاده کنید" + msgid "This is an alias to the C99-standard ``va_copy`` function." msgstr "این یک نام‌مستعار برای تابع ``va_copy`` مطابق با استاندارد C99 است." @@ -802,8 +878,8 @@ msgstr "در بیشتر سیستم‌ها (به‌طور خاص در یونیک 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/python{X.Y}`. (In fact, this particular path is also the \"fallback\" location, used when no executable file named :file:`python` is found along :envvar:`PATH`.) The user can override this behavior by setting the environment variable :envvar:`PYTHONHOME`, or insert additional directories in front of the standard path by setting :envvar:`PYTHONPATH`." msgstr "برای نمونه، اگر پرونده اجرایی پایتون در :file:`/usr/local/bin/python` یافت شود، فرض می‌کند که کتابخانه‌ها در :file:`/usr/local/lib/python{X.Y}` قرار دارند. (در واقع، این مسیر خاص همچنین مکان «جایگزین» است که زمانی استفاده می‌شود که هیچ پرونده اجرایی‌ای با نام :file:`python` در :envvar:`PATH` یافت نشود.) کاربر می‌تواند این رفتار را با تنظیم متغیر محیطی :envvar:`PYTHONHOME` بازتعریف کند، یا با تنظیم :envvar:`PYTHONPATH` پوشه‌های اضافی را در ابتدای مسیر استاندارد درج کند." -msgid "The embedding application can steer the search by setting :c:member:`PyConfig.program_name` *before* calling :c:func:`Py_InitializeFromConfig`. Note that :envvar:`PYTHONHOME` still overrides this and :envvar:`PYTHONPATH` is still inserted in front of the standard path. An application that requires total control has to provide its own implementation of :c:func:`Py_GetPath`, :c:func:`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, and :c:func:`Py_GetProgramFullPath` (all defined in :file:`Modules/getpath.c`)." -msgstr "برنامه جاسازنده می‌تواند با تنظیم :c:member:`PyConfig.program_name` *پیش از* فراخوانی :c:func:`Py_InitializeFromConfig` جستجو را هدایت کند. توجه داشته باشید که :envvar:`PYTHONHOME` همچنان این تنظیم را لغو می‌کند و :envvar:`PYTHONPATH` همچنان در ابتدای مسیر استاندارد درج می‌شود. برنامه‌ای که به کنترل کامل نیاز دارد، باید پیاده‌سازی خودش از :c:func:`Py_GetPath`، :c:func:`Py_GetPrefix`، :c:func:`Py_GetExecPrefix` و :c:func:`Py_GetProgramFullPath` را فراهم کند (که همگی در :file:`Modules/getpath.c` تعریف شده‌اند)." +msgid "The embedding application can steer the search by setting :c:member:`PyConfig.program_name` *before* calling :c:func:`Py_InitializeFromConfig`. Note that :envvar:`PYTHONHOME` still overrides this and :envvar:`PYTHONPATH` is still inserted in front of the standard path." +msgstr "برنامه‌ی تعبیه‌شده می‌تواند با تنظیم :c:member:`PyConfig.program_name` *پیش* از فراخوانی :c:func:`Py_InitializeFromConfig`، جستجو را هدایت کند. توجه داشته باشید که :envvar:`PYTHONHOME` همچنان این مقدار را بازنویسی می‌کند و :envvar:`PYTHONPATH` همچنان در ابتدای مسیر استاندارد درج می‌شود." msgid "Sometimes, it is desirable to \"uninitialize\" Python. For instance, the application may want to start over (make another call to :c:func:`Py_Initialize`) or the application is simply done with its use of Python and wants to free memory allocated by Python. This can be accomplished by calling :c:func:`Py_FinalizeEx`. The function :c:func:`Py_IsInitialized` returns true if Python is currently in the initialized state. More information about these functions is given in a later chapter. Notice that :c:func:`Py_FinalizeEx` does *not* free all memory allocated by the Python interpreter, e.g. memory allocated by extension modules currently cannot be released." msgstr "گاهی مطلوب است که پایتون را «مقداردهی‌زدایی» (uninitialize) کنید. برای نمونه، ممکن است برنامه بخواهد از نو شروع کند (فراخوانی دوباره‌ی :c:func:`Py_Initialize`) یا اینکه کار برنامه با پایتون به‌سادگی تمام شده باشد و بخواهد حافظه‌ای را که پایتون تخصیص داده است آزاد کند. این کار را می‌توان با فراخوانی :c:func:`Py_FinalizeEx` انجام داد. تابع :c:func:`Py_IsInitialized` در صورتی که پایتون در حال حاضر در وضعیت مقداردهی‌شده باشد، مقدار true برمی‌گرداند. اطلاعات بیشتر درباره‌ی این توابع در فصلی بعدی ارائه شده است. توجه داشته باشید که :c:func:`Py_FinalizeEx` تمام حافظه‌ی تخصیص‌یافته توسط مفسر پایتون را آزاد *نمی‌کند*؛ مثلاً حافظه‌ی تخصیص‌یافته توسط ماژول‌های توسعه‌ای در حال حاضر قابل آزادسازی نیست." @@ -817,11 +893,17 @@ msgstr "پایتون را می‌توان با چندین ماکرو ساخت ت 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 available that support tracing of reference counts, debugging the memory allocator, or low-level profiling of the main interpreter loop. Only the most frequently used builds will be described in the remainder of this section." msgstr "فهرست کامل انواع مختلف ساخت‌های اشکال‌زدایی در پرونده :file:`Misc/SpecialBuilds.txt` در توزیع کد منبع پایتون قرار دارد. ساخت‌هایی در دسترس هستند که از ردگیری شمارش ارجاع، اشکال‌زدایی تخصیص‌دهنده حافظه یا پروفایل‌گیری سطح پایین حلقه اصلی مفسر پشتیبانی می‌کنند. در ادامه این بخش، تنها پرکاربردترین ساخت‌ها توضیح داده خواهند شد." -msgid "Compiling the interpreter with the :c:macro:`!Py_DEBUG` macro defined produces what is generally meant by :ref:`a debug build of Python `. :c:macro:`!Py_DEBUG` is enabled in the Unix build by adding :option:`--with-pydebug` to the :file:`./configure` command. It is also implied by the presence of the not-Python-specific :c:macro:`!_DEBUG` macro. When :c:macro:`!Py_DEBUG` is enabled in the Unix build, compiler optimization is disabled." -msgstr "کامپایل کردن مفسر در حالی که ماکروی :c:macro:`!Py_DEBUG` تعریف‌شده باشد، چیزی را تولید می‌کند که عموماً از :ref:`ساخت‌ دیباگ پایتون ` منظور می‌شود. ماکروی :c:macro:`!Py_DEBUG` در ساخت‌ یونیکس با افزودن :option:`--with-pydebug` به دستور :file:`./configure` فعال می‌شود. این ماکرو همچنین با وجود ماکروی :c:macro:`!_DEBUG` که مختص پایتون نیست، به‌طور ضمنی فعال می‌شود. هنگامی که :c:macro:`!Py_DEBUG` در ساخت‌ یونیکس فعال باشد، بهینه‌سازی کامپایلر غیرفعال می‌شود." +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:macro:`!Py_DEBUG` باعث ایجاد چیزی می‌شود که عموماً به آن :ref:`ساخت دیباگ پایتون ` می‌گویند." -msgid "In addition to the reference count debugging described below, extra checks are performed, see :ref:`Python Debug Build `." -msgstr "علاوه بر اشکال‌زدایی شمارش ارجاع که در زیر شرح داده شده، بررسی‌های اضافی نیز انجام می‌شود؛ به :ref:`نسخه دیباگ پایتون ` مراجعه کنید." +msgid "On Unix, :c:macro:`!Py_DEBUG` can be enabled by adding :option:`--with-pydebug` to the :file:`./configure` command. This will also disable compiler optimization." +msgstr "روی یونیکس، با افزودن :option:`--with-pydebug` به دستور :file:`./configure` می‌توانید :c:macro:`!Py_DEBUG` را فعال کنید. این کار بهینه‌سازی کامپایلر را نیز غیرفعال خواهد کرد." + +msgid "On Windows, selecting a debug build (e.g., by passing the :option:`-d` option to :file:`PCbuild/build.bat`) automatically enables :c:macro:`!Py_DEBUG`. Additionally, the presence of the not-Python-specific :c:macro:`!_DEBUG` macro, when defined by the compiler, will also implicitly enable :c:macro:`!Py_DEBUG`." +msgstr "روی ویندوز، انتخاب یک ساخت دیباگ (مثلاً با انتقال گزینه‌ی :option:`-d` به :file:`PCbuild/build.bat`) به‌طور خودکار :c:macro:`!Py_DEBUG` را فعال می‌کند. علاوه بر این، وجود ماکروی غیروابسته به پایتون :c:macro:`!_DEBUG` نیز، هنگامی که توسط کامپایلر تعریف شود، :c:macro:`!Py_DEBUG` را به‌طور ضمنی فعال خواهد کرد." + +msgid "In addition to the reference count debugging described below, extra checks are performed. See :ref:`Python Debug Build ` for more details." +msgstr "علاوه بر اشکال‌زدایی شماره‌ی ارجاع که در ادامه توصیف شده است، بررسی‌های اضافی نیز انجام می‌شوند. برای جزئیات بیشتر به :ref:`Python Debug Build ` مراجعه کنید." msgid "Defining ``Py_TRACE_REFS`` enables reference tracing (see the :option:`configure --with-trace-refs option <--with-trace-refs>`). When defined, a circular doubly linked list of active objects is maintained by adding two extra fields to every :c:type:`PyObject`. Total allocations are tracked as well. Upon exit, all existing references are printed. (In interactive mode this happens after every statement run by the interpreter.)" msgstr "تعریف ``Py_TRACE_REFS`` ردگیری ارجاع را فعال می‌کند (به :option:`configure --with-trace-refs option <--with-trace-refs>` مراجعه کنید). هنگامی که تعریف شود، با افزودن دو فیلد اضافی به هر :c:type:`PyObject`، یک فهرست پیوندی دوطرفه‌ی چرخه‌ای از اشیاء فعال نگهداری می‌شود. مجموع تخصیص‌ها نیز پیگیری می‌شود. هنگام خروج، تمام ارجاع‌های موجود چاپ می‌شوند. (در حالت تعاملی، این کار پس از اجرای هر دستور توسط مفسر انجام می‌شود.)" @@ -949,17 +1031,23 @@ msgstr "مسیر" msgid "path (in module sys)" msgstr "path (در ماژول sys)" -msgid "Py_GetPath (C function)" -msgstr "Py_GetPath (تابع C)" +msgid "Py_IsInitialized (C function)" +msgstr "Py_IsInitialized (تابع C)" + +#~ msgid "Specify alignment to *num* bytes on compilers that support it." +#~ msgstr "در کامپایلرهایی که از آن پشتیبانی می‌کنند، هم‌ترازی را به *num* بایت مشخص کنید." -msgid "Py_GetPrefix (C function)" -msgstr "Py_GetPrefix (تابع C)" +#~ msgid "Compiling the interpreter with the :c:macro:`!Py_DEBUG` macro defined produces what is generally meant by :ref:`a debug build of Python `. :c:macro:`!Py_DEBUG` is enabled in the Unix build by adding :option:`--with-pydebug` to the :file:`./configure` command. It is also implied by the presence of the not-Python-specific :c:macro:`!_DEBUG` macro. When :c:macro:`!Py_DEBUG` is enabled in the Unix build, compiler optimization is disabled." +#~ msgstr "کامپایل کردن مفسر در حالی که ماکروی :c:macro:`!Py_DEBUG` تعریف‌شده باشد، چیزی را تولید می‌کند که عموماً از :ref:`ساخت‌ دیباگ پایتون ` منظور می‌شود. ماکروی :c:macro:`!Py_DEBUG` در ساخت‌ یونیکس با افزودن :option:`--with-pydebug` به دستور :file:`./configure` فعال می‌شود. این ماکرو همچنین با وجود ماکروی :c:macro:`!_DEBUG` که مختص پایتون نیست، به‌طور ضمنی فعال می‌شود. هنگامی که :c:macro:`!Py_DEBUG` در ساخت‌ یونیکس فعال باشد، بهینه‌سازی کامپایلر غیرفعال می‌شود." -msgid "Py_GetExecPrefix (C function)" -msgstr "Py_GetExecPrefix (تابع C)" +#~ msgid "Py_GetPath (C function)" +#~ msgstr "Py_GetPath (تابع C)" -msgid "Py_GetProgramFullPath (C function)" -msgstr "Py_GetProgramFullPath (تابع C)" +#~ msgid "Py_GetPrefix (C function)" +#~ msgstr "Py_GetPrefix (تابع C)" -msgid "Py_IsInitialized (C function)" -msgstr "Py_IsInitialized (تابع C)" +#~ msgid "Py_GetExecPrefix (C function)" +#~ msgstr "Py_GetExecPrefix (تابع C)" + +#~ msgid "Py_GetProgramFullPath (C function)" +#~ msgstr "Py_GetProgramFullPath (تابع C)" diff --git a/c-api/iter.po b/c-api/iter.po index bd13a73b..8a815d87 100644 --- a/c-api/iter.po +++ b/c-api/iter.po @@ -6,13 +6,14 @@ # Translators: # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" -"PO-Revision-Date: 2021-06-28 00:49+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 20:43+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" @@ -20,6 +21,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 3.6\n" msgid "Iterator Protocol" msgstr "پروتکل پیمایش‌گر" @@ -54,5 +56,5 @@ msgstr "``PYGEN_RETURN`` اگر پیمایش‌گر بازگشت کند. مقد msgid "``PYGEN_NEXT`` if iterator yields. Yielded value is returned via *presult*." msgstr "``PYGEN_NEXT`` اگر پیمایش‌گر مقداری تولید کند. مقدار تولیدشده از طریق *presult* بازگردانده می‌شود." -msgid "``PYGEN_ERROR`` if iterator has raised and exception. *presult* is set to ``NULL``." -msgstr "``PYGEN_ERROR`` اگر پیمایش‌گر استثنایی مطرح کرده باشد. *presult* برابر ``NULL`` قرار می‌گیرد." +msgid "``PYGEN_ERROR`` if iterator has raised an exception. *presult* is set to ``NULL``." +msgstr "اگر پیمایش‌گر یک استثنا ایجاد کرده باشد، ``PYGEN_ERROR`` را برمی‌گرداند. *presult* روی ``NULL`` تنظیم می‌شود." diff --git a/c-api/long.po b/c-api/long.po index 909c31ec..0454c199 100644 --- a/c-api/long.po +++ b/c-api/long.po @@ -8,12 +8,13 @@ # Rafael Fontenelle , 2025 # Gigahertz ., 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 16:27+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -48,8 +49,8 @@ msgstr "در صورتی که آرگومان آن یک :c:type:`PyLongObject` ب msgid "Return a new :c:type:`PyLongObject` object from *v*, or ``NULL`` on failure." msgstr "یک شیء جدید :c:type:`PyLongObject` از *v* برمی‌گرداند، یا در صورت شکست ``NULL``." -msgid "CPython keeps an array of integer objects for all integers between ``-5`` and ``256``. When you create an int in that range you actually just get back a reference to the existing object." -msgstr "سی‌پایتون آرایه‌ای از اشیاء عدد صحیح را برای تمام اعداد صحیح بین ``-5`` و ``256`` نگه می‌دارد. وقتی شما یک int در این بازه ایجاد می‌کنید، در واقع فقط ارجاعی به شیء موجود را دریافت می‌کنید." +msgid "CPython keeps an array of integer objects for all integers between ``-5`` and ``1024``. When you create an int in that range you actually just get back a reference to the existing object." +msgstr "سی‌پایتون آرایه‌ای از اشیای عدد صحیح را برای تمام اعداد صحیح بین ``-5`` و ``1024`` نگه می‌دارد. وقتی یک عدد صحیح در آن محدوده ایجاد می‌کنید، در واقع فقط یک ارجاع به شیء موجود دریافت می‌کنید." msgid "Return a new :c:type:`PyLongObject` object from a C :c:expr:`unsigned long`, or ``NULL`` on failure." msgstr "یک شیء جدید :c:type:`PyLongObject` از یک :c:expr:`unsigned long` در C برمی‌گرداند، یا در صورت شکست ``NULL``." @@ -494,8 +495,8 @@ msgstr "``-1`` برای کم‌ارزش‌ترین بایت در ابتدا (ک msgid "Get the native layout of Python :class:`int` objects." msgstr "دریافت چیدمان بومی اشیای :class:`int` پایتون." -msgid "See the :c:struct:`PyLongLayout` structure." -msgstr "ساختار :c:struct:`PyLongLayout` را ببینید." +msgid "See the :c:type:`PyLongLayout` structure." +msgstr "ساختار :c:type:`PyLongLayout` را ببینید." msgid "The function must not be called before Python initialization nor after Python finalization. The returned layout is valid until Python is finalized. The layout is the same for all Python sub-interpreters in a process, and so it can be cached." msgstr "تابع نباید نه پیش از مقداردهی اولیه پایتون و نه پس از نهایی‌سازی پایتون فراخوانی شود. چیدمان بازگردانده‌شده تا زمان نهایی‌سازی پایتون معتبر است. چیدمان برای همه زیرمفسرهای پایتون در یک فرایند یکسان است و بنابراین می‌توان آن را در نهانگاه ذخیره کرد." @@ -527,8 +528,8 @@ msgstr "آرایه‌ی فقط خواندنی از ارقام بدون علام msgid "Export a Python :class:`int` object." msgstr "یک شیء :class:`int` پایتون را اکسپورت (export) می‌کند." -msgid "*export_long* must point to a :c:struct:`PyLongExport` structure allocated by the caller. It must not be ``NULL``." -msgstr "*export_long* باید به یک ساختار :c:struct:`PyLongExport` که توسط فراخواننده تخصیص داده‌شده است اشاره کند. این نباید ``NULL`` باشد." +msgid "*export_long* must point to a :c:type:`PyLongExport` structure allocated by the caller. It must not be ``NULL``." +msgstr "*export_long* باید به یک ساختار :c:type:`PyLongExport` تخصیص‌یافته توسط فراخواننده اشاره کند. این مقدار نباید ``NULL`` باشد." msgid "On success, fill in *\\*export_long* and return ``0``. On error, set an exception and return ``-1``." msgstr "در صورت موفقیت، *\\*export_long* را پر می‌کند و ``0`` برمی‌گرداند. در صورت خطا، یک استثنا تنظیم می‌کند و ``-1`` برمی‌گرداند." @@ -575,8 +576,8 @@ msgstr "*digits* نباید NULL باشد." msgid "After a successful call to this function, the caller should fill in the array of digits *digits* and then call :c:func:`PyLongWriter_Finish` to get a Python :class:`int`. The layout of *digits* is described by :c:func:`PyLong_GetNativeLayout`." msgstr "پس از فراخوانی موفق این تابع، فراخوانی‌کننده باید آرایه‌ی ارقام *digits* را پر کند و سپس :c:func:`PyLongWriter_Finish` را فراخوانی کند تا یک :class:`int` پایتونی به دست آورد. چیدمان *digits* توسط :c:func:`PyLong_GetNativeLayout` توصیف می‌شود." -msgid "Digits must be in the range [``0``; ``(1 << bits_per_digit) - 1``] (where the :c:struct:`~PyLongLayout.bits_per_digit` is the number of bits per digit). Any unused most significant digits must be set to ``0``." -msgstr "رقم‌ها باید در بازه‌ی [``0``; ``(1 << bits_per_digit) - 1``] باشند (که در آن :c:struct:`~PyLongLayout.bits_per_digit` تعداد بیت‌های هر رقم است). هر رقم مرتبه‌بالا که استفاده نشده باشد، باید برابر ``0`` قرار داده شود." +msgid "Digits must be in the range [``0``; ``(1 << bits_per_digit) - 1``] (where the :c:type:`~PyLongLayout.bits_per_digit` is the number of bits per digit). Any unused most significant digits must be set to ``0``." +msgstr "رقم‌ها باید در بازه‌ی [``0``; ``(1 << bits_per_digit) - 1``] باشند (که در آن :c:type:`~PyLongLayout.bits_per_digit` تعداد بیت‌ها در هر رقم است). هر رقم با ارزش بیشترینِ استفاده‌نشده باید روی ``0`` تنظیم شود." msgid "Alternately, call :c:func:`PyLongWriter_Discard` to destroy the writer instance without creating an :class:`~int` object." msgstr "به‌طور جایگزین، می‌توانید :c:func:`PyLongWriter_Discard` را فراخوانی کنید تا نمونه‌ی نویسنده را بدون ایجاد شیء :class:`~int` نابود کنید." diff --git a/c-api/memory.po b/c-api/memory.po index e6f2b9cd..71c10e1b 100644 --- a/c-api/memory.po +++ b/c-api/memory.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 16:27+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -579,8 +580,8 @@ msgstr "الگو‌های بایتی ``0xCB`` (``PYMEM_CLEANBYTE``)، ``0xDB`` ( msgid "The pymalloc allocator" msgstr "تخصیص‌دهنده‌ی pymalloc" -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 \"arenas\" with a fixed size of either 256 KiB on 32-bit platforms or 1 MiB on 64-bit platforms. It falls back to :c:func:`PyMem_RawMalloc` and :c:func:`PyMem_RawRealloc` for allocations larger than 512 bytes." -msgstr "پایتون یک تخصیص‌دهنده *pymalloc* دارد که برای اشیاء کوچک (کوچک‌تر یا برابر با ۵۱۲ بایت) با عمر کوتاه بهینه‌سازی شده است. این تخصیص‌دهنده از نگاشت‌های حافظه به نام «آرنا» با اندازه ثابت ۲۵۶ KiB در سکوهای ۳۲ بیتی یا ۱ MiB در سکوهای ۶۴ بیتی استفاده می‌کند. برای تخصیص‌های بزرگ‌تر از ۵۱۲ بایت، به :c:func:`PyMem_RawMalloc` و :c:func:`PyMem_RawRealloc` بازمی‌گردد." +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 \"arenas\" with a fixed size of either 256 KiB on 32-bit platforms or 1 MiB on 64-bit platforms. When Python is configured with :option:`--with-pymalloc-hugepages`, the arena size on 64-bit platforms is increased to 2 MiB to match the huge page size, and arena allocation will attempt to use huge pages (``MAP_HUGETLB`` on Linux, ``MEM_LARGE_PAGES`` on Windows) with automatic fallback to regular pages. It falls back to :c:func:`PyMem_RawMalloc` and :c:func:`PyMem_RawRealloc` for allocations larger than 512 bytes." +msgstr "پایتون یک تخصیص‌دهنده‌ی *pymalloc* دارد که برای اشیای کوچک (کوچک‌تر یا مساوی ۵۱۲ بایت) با طول عمر کوتاه بهینه‌سازی شده است. این تخصیص‌دهنده از نگاشت‌های حافظه‌ای به نام «آرنا» با اندازه‌ی ثابت ۲۵۶ کیلوبایت در پلتفرم‌های ۳۲ بیتی یا ۱ مگابایت در پلتفرم‌های ۶۴ بیتی استفاده می‌کند. هنگامی که پایتون با :option:`--with-pymalloc-hugepages` پیکربندی می‌شود، اندازه‌ی آرنا در پلتفرم‌های ۶۴ بیتی به ۲ مگابایت افزایش می‌یابد تا با اندازه‌ی صفحه‌ی بزرگ (huge page) مطابقت داشته باشد و تخصیص آرنا تلاش خواهد کرد از صفحات بزرگ (``MAP_HUGETLB`` در لینوکس، ``MEM_LARGE_PAGES`` در ویندوز) با بازگشت خودکار به صفحات معمولی استفاده کند. این بخش برای تخصیص‌های بزرگ‌تر از ۵۱۲ بایت به :c:func:`PyMem_RawMalloc` و :c:func:`PyMem_RawRealloc` بازمی‌گردد." 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 "*pymalloc* :ref:`تخصیص‌دهنده پیش‌فرض ` دامنه‌های :c:macro:`PYMEM_DOMAIN_MEM` (مثلاً :c:func:`PyMem_Malloc`) و :c:macro:`PYMEM_DOMAIN_OBJ` (مثلاً :c:func:`PyObject_Malloc`) است." diff --git a/c-api/module.po b/c-api/module.po index f79a11ac..314c9574 100644 --- a/c-api/module.po +++ b/c-api/module.po @@ -7,13 +7,14 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" -"PO-Revision-Date: 2021-06-28 00:49+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 20:44+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" @@ -21,6 +22,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 3.6\n" msgid "Module Objects" msgstr "اشیاء ماژول" @@ -64,9 +66,6 @@ msgstr "مشابه :c:func:`PyModule_GetNameObject` است، اما نام را msgid "The returned buffer is only valid until the module is renamed or destroyed. Note that Python code may rename a module by setting its :py:attr:`~module.__name__` attribute." msgstr "بافر بازگشتی تنها تا زمانی معتبر است که نام ماژول تغییر کند یا ماژول نابود شود. توجه داشته باشید که کد پایتون می‌تواند نام یک ماژول را با تنظیم ویژگی :py:attr:`~module.__name__` آن تغییر دهد." -msgid "Return the \"state\" of the module, that is, a pointer to the block of memory allocated at module creation time, or ``NULL``. See :c:member:`PyModuleDef.m_size`." -msgstr "«وضعیت» ماژول را برمی‌گرداند، یعنی اشاره‌گری به بلوک حافظه‌ای که در زمان ایجاد ماژول تخصیص یافته است، یا ``NULL``. :c:member:`PyModuleDef.m_size` را ببینید." - msgid "Return a pointer to the :c:type:`PyModuleDef` struct from which the module was created, or ``NULL`` if the module wasn't created from a definition." msgstr "اشاره‌گر به ساختار :c:type:`PyModuleDef` که ماژول از آن ایجاد شده است را برمی‌گرداند، یا ``NULL`` اگر ماژول از یک تعریف ایجاد نشده باشد." @@ -85,155 +84,474 @@ msgstr "بافر بازگشتی تنها تا زمانی معتبر است که msgid ":c:func:`PyModule_GetFilename` raises :exc:`UnicodeEncodeError` on unencodable filenames, use :c:func:`PyModule_GetFilenameObject` instead." msgstr ":c:func:`PyModule_GetFilename` برای نام‌های پرونده‌ی غیرقابل کدگذاری، استثنای :exc:`UnicodeEncodeError` را مطرح می‌کند؛ به‌جای آن از :c:func:`PyModule_GetFilenameObject` استفاده کنید." -msgid "Module definitions" -msgstr "تعریف‌های ماژول" +msgid "Module definition" +msgstr "تعریف ماژول" -msgid "The functions in the previous section work on any module object, including modules imported from Python code." -msgstr "توابع بخش قبلی روی هر شیء ماژول کار می‌کنند، از جمله ماژول‌هایی که از کد پایتون ایمپورت شده‌اند." +msgid "Modules created using the C API are typically defined using an array of :c:type:`PySlot` structs, which provides a \"description\" of how a module should be created. See :ref:`capi-slots` for more information on slots in general." +msgstr "ماژول‌های ایجادشده با استفاده از API زبان C معمولاً با استفاده از آرایه‌ای از ساختارهای :c:type:`PySlot` تعریف می‌شوند که «توضیحی» درباره‌ی نحوه‌ی ایجاد یک ماژول ارائه می‌دهد. برای اطلاعات بیشتر درباره‌ی جایگاه‌ها به‌طور کلی، به :ref:`capi-slots` مراجعه کنید." -msgid "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 تعریف می‌شوند، معمولاً از یک *تعریف ماژول*، :c:type:`PyModuleDef`، استفاده می‌کنند -- یک «توصیف» ثابت و تخصیص‌یافته به‌صورت ایستا از چگونگی ایجاد یک ماژول." +msgid "Previously, a :c:type:`PyModuleDef` struct was necessary to define modules. The older way of defining modules is still available: consult either the :ref:`pymoduledef` section or earlier versions of this documentation if you plan to support earlier Python versions." +msgstr "پیش از این، برای تعریف ماژول‌ها ساختار :c:type:`PyModuleDef` ضروری بود. روش قدیمی‌تر تعریف ماژول‌ها همچنان در دسترس است: اگر قصد دارید از نسخه‌های قبلی پایتون پشتیبانی کنید، به بخش :ref:`pymoduledef` یا نسخه‌های قبلی این مستندات مراجعه کنید." -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 "این تعریف معمولاً برای تعریف شیء ماژول «اصلی» یک ماژول توسعه‌ای استفاده می‌شود (برای جزئیات به :ref:`extension-modules` مراجعه کنید). همچنین برای :ref:`ایجاد ماژول‌های توسعه‌ای به‌صورت پویا ` استفاده می‌شود." +msgid "The slots array is usually used to define an extension module's “main” module object (see :ref:`extension-modules` for details). It can also be used to :ref:`create extension modules dynamically `." +msgstr "آرایه‌ی جایگاه‌ها معمولاً برای تعریف شیء ماژول «اصلی» یک ماژول توسعه‌ای استفاده می‌شود (برای جزئیات به :ref:`extension-modules` مراجعه کنید). همچنین می‌توان از آن برای :ref:`ایجاد پویای ماژول‌های توسعه‌ای ` استفاده کرد." -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:func:`PyModule_New`، این تعریف امکان مدیریت *وضعیت ماژول* را فراهم می‌کند -- تکه‌ای از حافظه که همراه با شیء ماژول تخصیص داده و پاک‌سازی می‌شود. برخلاف ویژگی‌های پایتونیِ ماژول، کد پایتون نمی‌تواند داده‌های ذخیره‌شده در وضعیت ماژول را جایگزین یا حذف کند." +msgid "Unless specified otherwise, the same slot ID may not be repeated in an array of slots." +msgstr "مگر اینکه جور دیگری مشخص شده باشد، ممکن است یک شناسه‌ی جایگاه در یک آرایه از جایگاه‌ها تکرار نشود." -msgid "The module definition struct, which holds all information needed to create a 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 "ساختار تعریف ماژول که تمام اطلاعات مورد نیاز برای ایجاد یک شیء ماژول را در خود نگه می‌دارد. این ساختار باید به‌صورت ایستا تخصیص داده شود (یا به نحوی تضمین شود که تا زمانی که هر یک از ماژول‌های ایجاد‌شده از روی آن وجود دارد، معتبر بماند). معمولاً برای هر ماژول توسعه‌ای تنها یک متغیر از این نوع وجود دارد." +msgid "Metadata slots" +msgstr "جایگاه‌های فراداده" -msgid "Always initialize this member to :c:macro:`PyModuleDef_HEAD_INIT`." -msgstr "این عضو را همیشه به :c:macro:`PyModuleDef_HEAD_INIT` مقداردهی اولیه کنید." +msgid ":c:member:`Slot ID ` for the name of the new module, as a NUL-terminated UTF8-encoded ``const char *``." +msgstr ":c:member:`شناسه‌ی جایگاه ` برای نام ماژول جدید، به شکل یک ``const char *`` کدگذاری‌شده با UTF-8 و پایان‌یافته با NUL." -msgid "Name for the new module." -msgstr "نام ماژول جدید." +msgid "Note that modules are typically created using a :py:class:`~importlib.machinery.ModuleSpec`, and when they are, the name from the spec will be used instead of :c:data:`!Py_mod_name`. However, it is still recommended to include this slot for introspection and debugging purposes." +msgstr "توجه داشته باشید که ماژول‌ها معمولاً با استفاده از یک :py:class:`~importlib.machinery.ModuleSpec` ایجاد می‌شوند و در این صورت، نام مشخصات به‌جای :c:data:`!Py_mod_name` استفاده خواهد شد. با این حال، همچنان توصیه می‌شود برای اهداف درون‌نگری و اشکال‌زدایی، این جایگاه را بگنجانید." -msgid "Docstring for the module; usually a docstring variable created with :c:macro:`PyDoc_STRVAR` is used." -msgstr "رشته مستند ماژول؛ معمولاً از متغیر رشته مستند ایجاد‌شده با :c:macro:`PyDoc_STRVAR` استفاده می‌شود." +msgid "Use :c:member:`PyModuleDef.m_name` instead to support previous versions." +msgstr "برای پشتیبانی از نسخه‌های قبلی، به‌جای آن از :c:member:`PyModuleDef.m_name` استفاده کنید." -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:func:`PyModule_GetState` بازیابی کرد. این کار باعث می‌شود ماژول‌ها برای استفاده در چندین زیرمفسر ایمن باشند." +msgid ":c:type:`Slot ID ` for the docstring of the new module, as a NUL-terminated UTF8-encoded ``const char *``." +msgstr ":c:type:`شناسه‌ی شکاف ` برای رشته مستند ماژول جدید، به شکل یک ``const char *`` با انتهای تهی و کدگذاری‌شده با UTF-8." -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 "این ناحیه حافظه هنگام ایجاد ماژول بر اساس *m_size* تخصیص داده می‌شود و هنگام تخصیص‌زدایی شیء ماژول، پس از فراخوانی تابع :c:member:`~PyModuleDef.m_free` (در صورت وجود)، آزاد می‌شود." +msgid "Usually it is set to a variable created with :c:macro:`PyDoc_STRVAR`." +msgstr "معمولاً این مقدار روی متغیری تنظیم می‌شود که با :c:macro:`PyDoc_STRVAR` ایجاد شده است." -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." -msgstr "تنظیم آن به یک مقدار نامنفی به این معناست که ماژول می‌تواند مجدداً مقداردهی اولیه شود و میزان حافظه‌ی اضافی مورد نیاز برای وضعیت خود را مشخص می‌کند." +msgid "Use :c:member:`PyModuleDef.m_doc` instead to support previous versions." +msgstr "برای پشتیبانی از نسخه‌های قبلی، به‌جای آن از :c:member:`PyModuleDef.m_doc` استفاده کنید." -msgid "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 "تنظیم ``m_size`` روی ``-1`` به این معنی است که ماژول از زیرمفسرها پشتیبانی نمی‌کند، زیرا دارای وضعیت سراسری است. مقدار منفی ``m_size`` تنها هنگام استفاده از :ref:`راه‌اندازی تک‌فازی قدیمی ` یا هنگام :ref:`ایجاد ماژول‌ها به‌صورت پویا ` مجاز است." +msgid "Feature slots" +msgstr "جایگاه‌های ویژگی" -msgid "See :PEP:`3121` for more details." -msgstr "برای جزئیات بیشتر به :PEP:`3121` مراجعه کنید." +msgid ":c:member:`Slot ID ` whose value points to a :c:struct:`PyABIInfo` structure describing the ABI that the extension is using." +msgstr ":c:member:`شناسه‌ی جایگاه ` که مقدار آن به ساختار :c:struct:`PyABIInfo` اشاره می‌کند و توصیف‌کننده‌ی ABI است که افزونه از آن استفاده می‌کند." -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:type:`PyMethodDef` توصیف می‌شوند. اگر هیچ تابعی وجود نداشته باشد، می‌تواند ``NULL`` باشد." +msgid "A suitable :c:struct:`!PyABIInfo` variable can be defined using the :c:macro:`PyABIInfo_VAR` macro, as in:" +msgstr "یک متغیر مناسب :c:struct:`!PyABIInfo` را می‌توان با استفاده از ماکروی :c:macro:`PyABIInfo_VAR` تعریف کرد، مانند:" -msgid "An array of slot definitions for multi-phase initialization, terminated by a ``{0, NULL}`` entry. When using legacy single-phase initialization, *m_slots* must be ``NULL``." -msgstr "آرایه‌ای از تعریف‌های جایگاه برای مقداردهی اولیه چندمرحله‌ای که با ورودی ``{0, NULL}`` پایان می‌یابد. هنگام استفاده از مقداردهی اولیه تک‌مرحله‌ای قدیمی، *m_slots* باید ``NULL`` باشد." +msgid "" +"PyABIInfo_VAR(abi_info);\n" +"\n" +"static PySlot mymodule_slots[] = {\n" +" PySlot_DATA(Py_mod_abi, &abi_info),\n" +" ...\n" +"};" +msgstr "" +"PyABIInfo_VAR(abi_info);\n" +"\n" +"static PySlot mymodule_slots[] = {\n" +" PySlot_DATA(Py_mod_abi, &abi_info),\n" +" ...\n" +"};" -msgid "Prior to version 3.5, this member was always set to ``NULL``, and was defined as:" -msgstr "پیش از نسخه 3.5، این عضو همیشه روی ``NULL`` تنظیم می‌شد و به این صورت تعریف می‌شد:" +msgid "When creating a module, Python checks the value of this slot using :c:func:`PyABIInfo_Check`." +msgstr "هنگام ایجاد یک ماژول، پایتون مقدار این جایگاه را با استفاده از :c:func:`PyABIInfo_Check` بررسی می‌کند." + +msgid "This slot is required, except for modules created from :c:struct:`PyModuleDef`." +msgstr "این جایگاه الزامی است، به جز برای ماژول‌هایی که از :c:struct:`PyModuleDef` ایجاد شده‌اند." + +msgid ":c:member:`Slot ID ` whose value is one of:" +msgstr ":c:member:`Slot ID ` که مقدار آن یکی از موارد زیر است:" -msgid "A traversal function to call during GC traversal of the module object, or ``NULL`` if not needed." -msgstr "تابع پیمایشی که در حین پیمایش شیء ماژول توسط GC فراخوانی می‌شود، یا ``NULL`` در صورت عدم نیاز." +msgid "The module does not support being imported in subinterpreters." +msgstr "این ماژول از ایمپورت شدن در زیرمفسرها (subinterpreters) پشتیبانی نمی‌کند." -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 before the module is executed (:c:data:`Py_mod_exec` function). More precisely, this function is not called if :c:member:`~PyModuleDef.m_size` is greater than 0 and the module state (as returned by :c:func:`PyModule_GetState`) is ``NULL``." -msgstr "این تابع در صورتی فراخوانی نمی‌شود که وضعیت ماژول درخواست شده باشد اما هنوز تخصیص داده نشده باشد. این حالت بلافاصله پس از ایجاد ماژول و پیش از اجرای ماژول (تابع :c:data:`Py_mod_exec`) برقرار است. دقیق‌تر آنکه، این تابع در صورتی فراخوانی نمی‌شود که :c:member:`~PyModuleDef.m_size` بزرگ‌تر از ۰ باشد و وضعیت ماژول (همان‌طور که :c:func:`PyModule_GetState` برمی‌گرداند) برابر ``NULL`` باشد." +msgid "The module supports being imported in subinterpreters, but only when they share the main interpreter's GIL. (See :ref:`isolating-extensions-howto`.)" +msgstr "این ماژول از ایمپورت شدن در زیرمفسرها پشتیبانی می‌کند، اما تنها زمانی که آن‌ها قفل مفسر سراسری (GIL) مفسر اصلی را به اشتراک بگذارند. (به :ref:`isolating-extensions-howto` مراجعه کنید.)" -msgid "No longer called before the module state is allocated." -msgstr "دیگر پیش از تخصیص وضعیت ماژول فراخوانی نمی‌شود." +msgid "The module supports being imported in subinterpreters, even when they have their own GIL. (See :ref:`isolating-extensions-howto`.)" +msgstr "این ماژول از ایمپورت شدن در زیرمفسرها پشتیبانی می‌کند، حتی زمانی که آن‌ها قفل مفسر سراسری خود را دارند. (به :ref:`isolating-extensions-howto` مراجعه کنید.)" -msgid "A clear function to call during GC clearing of the module object, or ``NULL`` if not needed." -msgstr "تابعی برای پاک‌سازی که در حین پاک‌سازی زباله‌روبی شیء ماژول فراخوانی می‌شود، یا ``NULL`` در صورت عدم نیاز." +msgid "This slot determines whether or not importing this module in a subinterpreter will fail." +msgstr "این جایگاه تعیین می‌کند که آیا ایمپورت کردن این ماژول در یک زیرمفسر شکست می‌خورد یا خیر." -msgid "Like :c:member:`PyTypeObject.tp_clear`, this function is not *always* called before a module 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:`~PyModuleDef.m_free` is called directly." -msgstr "مانند :c:member:`PyTypeObject.tp_clear`، این تابع *همیشه* پیش از آزادسازی یک ماژول فراخوانی نمی‌شود. برای مثال، وقتی شمارش ارجاع برای تعیین اینکه یک شیء دیگر استفاده نمی‌شود کافی باشد، زباله‌روب چرخه‌ای دخالتی ندارد و :c:member:`~PyModuleDef.m_free` مستقیماً فراخوانی می‌شود." +msgid "If ``Py_mod_multiple_interpreters`` is not specified, the import machinery defaults to ``Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED``." +msgstr "اگر ``Py_mod_multiple_interpreters`` مشخص نشده باشد، سازوکار ایمپورت به‌صورت پیش‌فرض از ``Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED`` استفاده می‌کند." -msgid "A function to call during deallocation of the module object, or ``NULL`` if not needed." -msgstr "تابعی که هنگام آزادسازی شیء ماژول فراخوانی می‌شود، یا ``NULL`` در صورت عدم نیاز." +msgid "For historical reasons, the values are declared as pointers (``void *``). When using :c:type:`PySlot` arrays, use :c:macro:`PySlot_DATA` for :c:macro:`!Py_mod_multiple_interpreters`:" +msgstr "به دلایل تاریخی، مقادیر به عنوان اشاره‌گر (``void *``) اعلام می‌شوند. هنگام استفاده از آرایه‌های :c:type:`PySlot`، از :c:macro:`PySlot_DATA` برای :c:macro:`!Py_mod_multiple_interpreters` استفاده کنید:" -msgid "The type of ``PyModuleDef`` objects." -msgstr "نوع اشیاء ``PyModuleDef``." +msgid "" +"PySlot_DATA(Py_mod_multiple_interpreters,\n" +" Py_MOD_PER_INTERPRETER_GIL_SUPPORTED)" +msgstr "" +"PySlot_DATA(Py_mod_multiple_interpreters,\n" +" Py_MOD_PER_INTERPRETER_GIL_SUPPORTED)" + +msgid "The module depends on the presence of the global interpreter lock (GIL), and may access global state without synchronization." +msgstr "این ماژول به وجود قفل مفسر سراسری (GIL) وابسته است و ممکن است بدون همگام‌سازی به وضعیت سراسری دسترسی داشته باشد." + +msgid "The module is safe to run without an active GIL." +msgstr "اجرای این ماژول بدون قفل مفسر سراسریِ فعال، ایمن است." + +msgid "This slot is ignored by Python builds not configured with :option:`--disable-gil`. Otherwise, it determines whether or not importing this module will cause the GIL to be automatically enabled. See :ref:`whatsnew313-free-threaded-cpython` for more detail." +msgstr "این جایگاه توسط ساخت‌های پایتون که با :option:`--disable-gil` پیکربندی نشده‌اند نادیده گرفته می‌شود. در غیر این صورت، تعیین می‌کند که آیا ایمپورت کردن این ماژول باعث می‌شود قفل مفسر سراسری (GIL) به‌طور خودکار فعال شود یا خیر. برای جزئیات بیشتر به :ref:`whatsnew313-free-threaded-cpython` مراجعه کنید." + +msgid "If ``Py_mod_gil`` is not specified, the import machinery defaults to ``Py_MOD_GIL_USED``." +msgstr "اگر ``Py_mod_gil`` مشخص نشده باشد، سازوکار ایمپورت به‌طور پیش‌فرض از ``Py_MOD_GIL_USED`` استفاده می‌کند." + +msgid "For historical reasons, the values are declared as pointers (``void *``). When using :c:type:`PySlot` arrays, use :c:macro:`PySlot_DATA` for :c:macro:`!Py_mod_gil`:" +msgstr "به دلایل تاریخی، مقادیر به عنوان اشاره‌گر (``void *``) اعلام می‌شوند. هنگام استفاده از آرایه‌های :c:type:`PySlot`، از :c:macro:`PySlot_DATA` برای :c:macro:`!Py_mod_gil` استفاده کنید:" -msgid "Module slots" -msgstr "جایگاه‌های ماژول" +msgid "PySlot_DATA(Py_mod_gil, Py_MOD_GIL_NOT_USED)" +msgstr "PySlot_DATA(Py_mod_gil, Py_MOD_GIL_NOT_USED)" -msgid "A slot ID, chosen from the available values explained below." -msgstr "شناسه‌ی جایگاه، که از میان مقادیر موجود توضیح‌داده‌شده در ادامه انتخاب می‌شود." +msgid "Creation and initialization slots" +msgstr "جایگاه‌های ایجاد و راه‌اندازی اولیه" -msgid "Value of the slot, whose meaning depends on the slot ID." -msgstr "مقدار جایگاه، که معنای آن به شناسه جایگاه بستگی دارد." +msgid ":c:member:`Slot ID ` for a function that creates the module object itself. The function must have the signature:" +msgstr ":c:member:`Slot ID ` برای تابعی که خود شیء ماژول را ایجاد می‌کند. این تابع باید امضای زیر را داشته باشد:" -msgid "The available slot types are:" -msgstr "انواع جایگاه‌های موجود عبارت‌اند از:" +msgid "The function will be called with:" +msgstr "این تابع با موارد زیر فراخوانی خواهد شد:" -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 "تابعی را مشخص می‌کند که برای ایجاد خودِ شیء ماژول فراخوانی می‌شود. اشاره‌گر *value* این جایگاه باید به تابعی با امضای زیر اشاره کند:" +msgid "*spec*: a ``ModuleSpec``-like object, meaning that any attributes defined for :py:class:`importlib.machinery.ModuleSpec` have matching semantics. However, any of the attributes may be missing." +msgstr "*spec*: یک شیء شبیه به ``ModuleSpec``، به این معنا که هر ویژگی تعریف‌شده برای :py:class:`importlib.machinery.ModuleSpec` دارای معناشناسی منطبق است. با این حال، ممکن است هر یک از ویژگی‌ها وجود نداشته باشند." -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 "این تابع یک نمونه‌ی :py:class:`~importlib.machinery.ModuleSpec` را که در :PEP:`451` تعریف شده است، و تعریف ماژول را دریافت می‌کند. این تابع باید یک شیء ماژول جدید برگرداند، یا خطا را تنظیم کرده و ``NULL`` را برگرداند." +msgid "*def*: ``NULL``, or the module definition if the module is created from one." +msgstr "*def*: مقدار ``NULL``، یا تعریف ماژول در صورتی که ماژول از یکی از آن‌ها ایجاد شده باشد." + +msgid "The function should return a new module object, or set an error and return ``NULL``." +msgstr "این تابع باید یک شیء ماژول جدید برگرداند، یا یک خطا را تنظیم کرده و ``NULL`` را برگرداند." 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 "این تابع باید در حداقل ممکن نگه داشته شود. به‌ویژه، نباید کد دلخواه پایتون را فراخوانی کند، زیرا تلاش برای ایمپورت کردن مجدد همان ماژول ممکن است به حلقه بی‌نهایت منجر شود." -msgid "Multiple ``Py_mod_create`` slots may not be specified in one module definition." -msgstr "نمی‌توان چند جایگاه ``Py_mod_create`` را در یک تعریف ماژول مشخص کرد." - 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 *spec*, not the definition, to allow extension modules to dynamically adjust to their place in the module hierarchy and be imported under different names through symlinks, all while sharing a single module definition." msgstr "اگر ``Py_mod_create`` مشخص نشده باشد، مکانیزم ایمپورت با استفاده از :c:func:`PyModule_New` یک شیء ماژول معمولی ایجاد می‌کند. نام از *مشخصه* گرفته می‌شود، نه از تعریف، تا ماژول‌های توسعه‌ای بتوانند به‌طور پویا با جایگاه خود در سلسله‌مراتب ماژول سازگار شوند و از طریق پیوندهای نمادین با نام‌های مختلف ایمپورت شوند، در حالی که همگی یک تعریف ماژول واحد را به اشتراک می‌گذارند." -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 getting import-related attributes. However, only ``PyModule_Type`` instances may be returned if the ``PyModuleDef`` has non-``NULL`` ``m_traverse``, ``m_clear``, ``m_free``; non-zero ``m_size``; or slots other than ``Py_mod_create``." -msgstr "هیچ الزامی وجود ندارد که شیء بازگردانده‌شده نمونه‌ای از :c:type:`PyModule_Type` باشد. می‌توان از هر نوعی استفاده کرد، به شرط آنکه از تنظیم و دریافت ویژگی‌های مرتبط با ایمپورت پشتیبانی کند. با این حال، تنها نمونه‌های ``PyModule_Type`` را می‌توان بازگرداند اگر ``PyModuleDef`` دارای ``m_traverse``، ``m_clear`` و ``m_free`` غیر ``NULL``؛ ``m_size`` غیرصفر؛ یا جایگاه‌هایی غیر از ``Py_mod_create`` باشد." +msgid "There is no requirement for the returned object to be an instance of :c:type:`PyModule_Type`. However, some slots may only be used with :c:type:`!PyModule_Type` instances; in particular:" +msgstr "هیچ الزامی وجود ندارد که شیء برگردانده‌شده نمونه‌ای از :c:type:`PyModule_Type` باشد. با این حال، برخی از جایگاه‌ها ممکن است فقط با نمونه‌های :c:type:`!PyModule_Type` استفاده شوند؛ به ویژه:" -msgid "Specifies a function that is called to *execute* the module. This is equivalent to executing the code of a Python module: typically, this function adds classes and constants to the module. The signature of the function is:" -msgstr "تابعی را مشخص می‌کند که برای *اجرا* کردن ماژول فراخوانی می‌شود. این معادل اجرای کد یک ماژول پایتون است: به‌طور معمول، این تابع کلاس‌ها و ثابت‌ها را به ماژول اضافه می‌کند. امضای تابع به این صورت است:" +msgid ":c:macro:`Py_mod_exec`," +msgstr ":c:macro:`Py_mod_exec`،" -msgid "If multiple ``Py_mod_exec`` slots are specified, they are processed in the order they appear in the *m_slots* array." -msgstr "اگر چندین جایگاه ``Py_mod_exec`` مشخص شده باشند، به ترتیبی که در آرایه *m_slots* ظاهر شده‌اند پردازش می‌شوند." +msgid ":ref:`module state slots ` (``Py_mod_state_*``)," +msgstr ":ref:`جایگاه‌های حالت ماژول ` (``Py_mod_state_*``)،" -msgid "Specifies one of the following values:" -msgstr "یکی از مقادیر زیر را مشخص می‌کند:" +msgid ":c:macro:`Py_mod_token`." +msgstr ":c:macro:`Py_mod_token`." -msgid "The module does not support being imported in subinterpreters." -msgstr "این ماژول از ایمپورت شدن در زیرمفسرها (subinterpreters) پشتیبانی نمی‌کند." +msgid "The *slots* argument may be a ``ModuleSpec``-like object, rather than a true :py:class:`~importlib.machinery.ModuleSpec` instance. Note that previous versions of CPython did not enforce this." +msgstr "آرگومان *slots* ممکن است یک شیء شبیه به ``ModuleSpec`` باشد، نه یک نمونه‌ی واقعی :py:class:`~importlib.machinery.ModuleSpec`. توجه داشته باشید که نسخه‌های قبلی سی‌پایتون این موضوع را اعمال نمی‌کردند." -msgid "The module supports being imported in subinterpreters, but only when they share the main interpreter's GIL. (See :ref:`isolating-extensions-howto`.)" -msgstr "این ماژول از ایمپورت شدن در زیرمفسرها پشتیبانی می‌کند، اما تنها زمانی که آن‌ها قفل مفسر سراسری (GIL) مفسر اصلی را به اشتراک بگذارند. (به :ref:`isolating-extensions-howto` مراجعه کنید.)" +msgid "The *def* argument may now be ``NULL``, since modules are not necessarily made from definitions." +msgstr "آرگومان *def* اکنون ممکن است ``NULL`` باشد، زیرا ماژول‌ها لزوماً از تعاریف ساخته نمی‌شوند." -msgid "The module supports being imported in subinterpreters, even when they have their own GIL. (See :ref:`isolating-extensions-howto`.)" -msgstr "این ماژول از ایمپورت شدن در زیرمفسرها پشتیبانی می‌کند، حتی زمانی که آن‌ها قفل مفسر سراسری خود را دارند. (به :ref:`isolating-extensions-howto` مراجعه کنید.)" +msgid ":c:member:`Slot ID ` for a function that will :dfn:`execute`, or initialize, the module. This function does the equivalent to executing the code of a Python module: typically, it adds classes and constants to the module. The signature of the function is:" +msgstr ":c:member:`Slot ID ` برای تابعی که ماژول را :dfn:`execute` (اجرا) یا مقداردهی اولیه می‌کند. این تابع معادل اجرای کد یک ماژول پایتون عمل می‌کند: معمولاً کلاس‌ها و ثابت‌ها را به ماژول اضافه می‌کند. امضای تابع به صورت زیر است:" -msgid "This slot determines whether or not importing this module in a subinterpreter will fail." -msgstr "این جایگاه تعیین می‌کند که آیا ایمپورت کردن این ماژول در یک زیرمفسر شکست می‌خورد یا خیر." +msgid "See the :ref:`capi-module-support-functions` section for some useful functions to call." +msgstr "برای مشاهده‌ی برخی توابع مفید جهت فراخوانی، به بخش :ref:`capi-module-support-functions` مراجعه کنید." -msgid "Multiple ``Py_mod_multiple_interpreters`` slots may not be specified in one module definition." -msgstr "نمی‌توان چند جایگاه ``Py_mod_multiple_interpreters`` در یک تعریف ماژول مشخص کرد." +msgid "For backwards compatibility, the :c:type:`PyModuleDef.m_slots` array may contain multiple :c:macro:`!Py_mod_exec` slots; these are processed in the order they appear in the array. Elsewhere (that is, in arguments to :c:func:`PyModule_FromSlotsAndSpec` and in return values of :samp:`PyModExport_{}`), repeating the slot is not allowed." +msgstr "به منظور سازگاری با نسخه‌های قبل، آرایه‌ی :c:type:`PyModuleDef.m_slots` ممکن است حاوی چندین جایگاه :c:macro:`!Py_mod_exec` باشد؛ این موارد به ترتیبی که در آرایه ظاهر می‌شوند پردازش خواهند شد. جاهای دیگر (یعنی در آرگومان‌های :c:func:`PyModule_FromSlotsAndSpec` و مقادیر بازگشتی :samp:`PyModExport_{}`)، تکرار جایگاه مجاز نیست." -msgid "If ``Py_mod_multiple_interpreters`` is not specified, the import machinery defaults to ``Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED``." -msgstr "اگر ``Py_mod_multiple_interpreters`` مشخص نشده باشد، سازوکار ایمپورت به‌صورت پیش‌فرض از ``Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED`` استفاده می‌کند." +msgid "Repeated ``Py_mod_exec`` slots are disallowed, except in :c:type:`PyModuleDef.m_slots`." +msgstr "جایگاه‌های تکراری ``Py_mod_exec`` مجاز نیستند، مگر در :c:type:`PyModuleDef.m_slots`." -msgid "The module depends on the presence of the global interpreter lock (GIL), and may access global state without synchronization." -msgstr "این ماژول به وجود قفل مفسر سراسری (GIL) وابسته است و ممکن است بدون همگام‌سازی به وضعیت سراسری دسترسی داشته باشد." +msgid ":c:member:`Slot ID ` for a table of module-level functions, as an array of :c:type:`PyMethodDef` values suitable as the *functions* argument to :c:func:`PyModule_AddFunctions`." +msgstr ":c:member:`Slot ID ` برای جدولی از توابع در سطح ماژول، به صورت آرایه‌ای از مقادیر :c:type:`PyMethodDef` که به عنوان آرگومان *functions* برای :c:func:`PyModule_AddFunctions` مناسب است." -msgid "The module is safe to run without an active GIL." -msgstr "اجرای این ماژول بدون قفل مفسر سراسریِ فعال، ایمن است." +msgid "Like other slot IDs, a slots array may only contain one :c:macro:`!Py_mod_methods` entry. To add functions from multiple :c:type:`PyMethodDef` arrays, call :c:func:`PyModule_AddFunctions` in the :c:macro:`Py_mod_exec` function." +msgstr "مانند سایر شناسه‌های جایگاه، یک آرایه‌ی جایگاه ممکن است فقط حاوی یک ورودی :c:macro:`!Py_mod_methods` باشد. برای افزودن توابع از چندین آرایه‌ی :c:type:`PyMethodDef`، تابع :c:func:`PyModule_AddFunctions` را در تابع :c:macro:`Py_mod_exec` فراخوانی کنید." -msgid "This slot is ignored by Python builds not configured with :option:`--disable-gil`. Otherwise, it determines whether or not importing this module will cause the GIL to be automatically enabled. See :ref:`whatsnew313-free-threaded-cpython` for more detail." -msgstr "این جایگاه توسط ساخت‌های پایتون که با :option:`--disable-gil` پیکربندی نشده‌اند نادیده گرفته می‌شود. در غیر این صورت، تعیین می‌کند که آیا ایمپورت کردن این ماژول باعث می‌شود قفل مفسر سراسری (GIL) به‌طور خودکار فعال شود یا خیر. برای جزئیات بیشتر به :ref:`whatsnew313-free-threaded-cpython` مراجعه کنید." +msgid "The table must be statically allocated (or otherwise guaranteed to outlive the module object)." +msgstr "این جدول باید به صورت ایستا تخصیص داده شود (یا به نحوی تضمین شود که عمر آن بیشتر از شیء ماژول است)." -msgid "Multiple ``Py_mod_gil`` slots may not be specified in one module definition." -msgstr "تعیین چند جایگاه ``Py_mod_gil`` در یک تعریف ماژول مجاز نیست." +msgid "Use :c:member:`PyModuleDef.m_methods` instead to support previous versions." +msgstr "برای پشتیبانی از نسخه‌های قبلی، به‌جای آن از :c:member:`PyModuleDef.m_methods` استفاده کنید." -msgid "If ``Py_mod_gil`` is not specified, the import machinery defaults to ``Py_MOD_GIL_USED``." -msgstr "اگر ``Py_mod_gil`` مشخص نشده باشد، سازوکار ایمپورت به‌طور پیش‌فرض از ``Py_MOD_GIL_USED`` استفاده می‌کند." +msgid "Module state" +msgstr "وضعیت ماژول" + +msgid "Extension modules can have *module state* -- a piece of memory that is allocated on module creation, and freed when the module object is deallocated. The module state is specified using :ref:`dedicated slots `." +msgstr "ماژول‌های توسعه‌ای می‌توانند *وضعیت ماژول* داشته باشند؛ تکه‌ای از حافظه که هنگام ایجاد ماژول تخصیص داده می‌شود و زمانی که شیء ماژول زدوده‌سازی می‌شود، آزاد می‌گردد. وضعیت ماژول با استفاده از :ref:`جایگاه‌های اختصاصی ` مشخص می‌شود." + +msgid "A typical use of module state is storing an exception type -- or indeed *any* type object defined by the module --" +msgstr "یک کاربرد رایج وضعیت ماژول، ذخیره‌سازی یک نوع استثنا -- یا در واقع *هر* شیء نوع تعریف‌شده توسط ماژول -- است." + +msgid "Unlike the module's Python attributes, Python code cannot replace or delete data stored in module state." +msgstr "بر خلاف ویژگی‌های پایتونی ماژول، کد پایتون نمی‌تواند داده‌های ذخیره‌شده در وضعیت ماژول را جایگزین یا حذف کند." + +msgid "Keeping per-module information in attributes and module state, rather than in static globals, makes module objects *isolated* and safer for use in multiple sub-interpreters. It also helps Python do an orderly clean-up when it shuts down." +msgstr "نگهداری اطلاعات هر ماژول در ویژگی‌ها و وضعیت ماژول، به‌جای متغیرهای سراسری ایستا، اشیاء ماژول را *ایزوله* و برای استفاده در زیرمفسرهای متعدد امن‌تر می‌کند. همچنین به پایتون کمک می‌کند تا هنگام خاموش شدن، پاکسازی منظمی را انجام دهد." + +msgid "Extensions that keep references to Python objects as part of module state must implement :c:macro:`Py_mod_state_traverse` and :c:macro:`Py_mod_state_clear` functions to avoid reference leaks." +msgstr "اکستنشن‌هایی که ارجاع به اشیاء پایتون را به عنوان بخشی از وضعیت ماژول نگه می‌دارند، باید توابع :c:macro:`Py_mod_state_traverse` و :c:macro:`Py_mod_state_clear` را پیاده‌سازی کنند تا از نشت ارجاعات جلوگیری شود." + +msgid "To retrieve the state from a given module, use the following functions:" +msgstr "برای بازیابی وضعیت از یک ماژول مشخص، از توابع زیر استفاده کنید:" + +msgid "Return the \"state\" of the module, that is, a pointer to the block of memory allocated at module creation time, or ``NULL``. See :c:macro:`Py_mod_state_size`." +msgstr "برگرداندن «وضعیت» ماژول؛ یعنی یک اشاره‌گر به بلوک حافظه‌ای که در زمان ایجاد ماژول تخصیص داده شده است، یا ``NULL``. به :c:macro:`Py_mod_state_size` مراجعه کنید." + +msgid "On error, return ``NULL`` with an exception set. Use :c:func:`PyErr_Occurred` to tell this case apart from missing module state." +msgstr "در صورت بروز خطا، مقدار ``NULL`` را همراه با تنظیم یک استثنا برگردانید. از :c:func:`PyErr_Occurred` استفاده کنید تا این حالت را از وضعیت مفقود ماژول متمایز کنید." + +msgid "Set *\\*result* to the size of *module*'s state, as specified using :c:macro:`Py_mod_state_size` (or :c:member:`PyModuleDef.m_size`), and return 0." +msgstr "مقدار *\\*result* را برابر با اندازه‌ی وضعیت *module*، همان‌طور که با استفاده از :c:macro:`Py_mod_state_size` (یا :c:member:`PyModuleDef.m_size`) مشخص شده است، قرار دهید و مقدار 0 را برگردانید." + +msgid "On error, set *\\*result* to -1, and return -1 with an exception set." +msgstr "در صورت بروز خطا، *\\*result* را روی 1- تنظیم کنید و با تنظیم یک استثنا، 1- را برگردانید." + +msgid "Slots for defining module state" +msgstr "جایگاه‌ها برای تعریف وضعیت ماژول" + +msgid "The following :c:member:`slot IDs ` are available for defining the module state." +msgstr "شناسه‌های جایگاه :c:member:`slot IDs ` زیر برای تعریف وضعیت ماژول در دسترس هستند." + +msgid ":c:member:`Slot ID ` for the size of the module state, in bytes." +msgstr ":c:member:`شناسه‌ی جایگاه ` برای اندازه‌ی وضعیت ماژول، بر حسب بایت." + +msgid "Setting the value 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 "تنظیم مقدار به یک مقدار غیرمنفی به این معنا است که ماژول می‌تواند دوباره مقداردهی اولیه شود و مقدار حافظه اضافی مورد نیاز برای وضعیت خود را مشخص می‌کند." + +msgid "See :PEP:`3121` for more details." +msgstr "برای جزئیات بیشتر به :PEP:`3121` مراجعه کنید." + +msgid "Use :c:func:`PyModule_GetStateSize` to retrieve the size of a given module." +msgstr "برای بازیابی اندازه‌ی یک ماژول مشخص، از :c:func:`PyModule_GetStateSize` استفاده کنید." + +msgid "Use :c:member:`PyModuleDef.m_size` instead to support previous versions." +msgstr "برای پشتیبانی از نسخه‌های قبلی، به‌جای آن از :c:member:`PyModuleDef.m_size` استفاده کنید." + +msgid ":c:member:`Slot ID ` for a traversal function to call during GC traversal of the module object." +msgstr ":c:member:`Slot ID ` برای یک تابع پیمایش که در طول پیمایش GC برای شیء ماژول فراخوانی می‌شود." + +msgid "The signature of the function, and meanings of the arguments, is similar as for :c:member:`PyTypeObject.tp_traverse`:" +msgstr "امضای تابع و معانی آرگومان‌ها مشابه :c:member:`PyTypeObject.tp_traverse` است:" + +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 before the module is executed (:c:data:`Py_mod_exec` function). More precisely, this function is not called if the state size (:c:data:`Py_mod_state_size`) is greater than 0 and the module state (as returned by :c:func:`PyModule_GetState`) is ``NULL``." +msgstr "اگر وضعیت ماژول درخواست شده باشد اما هنوز تخصیص نیافته باشد، این تابع فراخوانی نمی‌شود. این حالت بلافاصله پس از ایجاد ماژول و قبل از اجرای ماژول (تابع :c:data:`Py_mod_exec`) رخ می‌دهد. به عبارت دقیق‌تر، اگر اندازه‌ی وضعیت (:c:data:`Py_mod_state_size`) بزرگ‌تر از 0 باشد و وضعیت ماژول (که توسط :c:func:`PyModule_GetState` برگردانده می‌شود) برابر با ``NULL`` باشد، این تابع فراخوانی نمی‌شود." + +msgid "Use :c:member:`PyModuleDef.m_traverse` instead to support previous versions." +msgstr "برای پشتیبانی از نسخه‌های قبلی، به‌جای آن از :c:member:`PyModuleDef.m_traverse` استفاده کنید." + +msgid ":c:member:`Slot ID ` for a clear function to call during GC clearing of the module object." +msgstr ":c:member:`Slot ID ` برای یک تابع پاک‌سازی که در طول پاک‌سازی GC شیء ماژول فراخوانی می‌شود." + +msgid "The signature of the function is:" +msgstr "امضای تابع به صورت زیر است:" + +msgid "Like :c:member:`PyTypeObject.tp_clear`, this function is not *always* called before a module 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 the :c:macro:`Py_mod_state_free` function is called directly." +msgstr "مانند :c:member:`PyTypeObject.tp_clear`، این تابع *همیشه* قبل از واگذاری حافظه (deallocation) یک ماژول فراخوانی نمی‌شود. برای مثال، زمانی که شمارش ارقام برای تشخیص اینکه آیا یک شیء دیگر استفاده نمی‌شود کافی است، جمع‌آور زباله‌ی چرخه‌ای درگیر نمی‌شود و تابع :c:macro:`Py_mod_state_free` مستقیماً فراخوانی می‌شود." + +msgid "Use :c:member:`PyModuleDef.m_clear` instead to support previous versions." +msgstr "برای پشتیبانی از نسخه‌های قبلی، به‌جای آن از :c:member:`PyModuleDef.m_clear` استفاده کنید." + +msgid ":c:member:`Slot ID ` for a function to call during deallocation of the module object." +msgstr ":c:member:`Slot ID ` برای تابعی که در طول واگذاری حافظه (deallocation) شیء ماژول فراخوانی می‌شود." + +msgid "Use :c:member:`PyModuleDef.m_free` instead to support previous versions." +msgstr "برای پشتیبانی از نسخه‌های قبلی، به‌جای آن از :c:member:`PyModuleDef.m_free` استفاده کنید." + +msgid "Module token" +msgstr "توکن ماژول" + +msgid "Each module may have an associated *token*: a pointer-sized value intended to identify of the module state's memory layout. This means that if you have a module object, but you are not sure if it “belongs” to your extension, you can check using code like this:" +msgstr "هر ماژول ممکن است یک *توکن* (token) مرتبط داشته باشد: مقداری به اندازه‌ی اشاره‌گر که برای شناسایی چیدمان حافظه‌ی وضعیت ماژول در نظر گرفته شده است. این یعنی اگر شیء ماژولی دارید، اما مطمئن نیستید که آیا به افزونه‌ی شما «تعلق» دارد یا خیر، می‌توانید با استفاده از کدی شبیه به این آن را بررسی کنید:" + +msgid "" +"PyObject *module = \n" +"\n" +"void *module_token;\n" +"if (PyModule_GetToken(module, &module_token) < 0) {\n" +" return NULL;\n" +"}\n" +"if (module_token != your_token) {\n" +" PyErr_SetString(PyExc_ValueError, \"unexpected module\")\n" +" return NULL;\n" +"}\n" +"\n" +"// This module's state has the expected memory layout; it's safe to cast\n" +"struct my_state state = (struct my_state*)PyModule_GetState(module)" +msgstr "" +"PyObject *module = \n" +"\n" +"void *module_token;\n" +"if (PyModule_GetToken(module, &module_token) < 0) {\n" +" return NULL;\n" +"}\n" +"if (module_token != your_token) {\n" +" PyErr_SetString(PyExc_ValueError, \"unexpected module\")\n" +" return NULL;\n" +"}\n" +"\n" +"// This module's state has the expected memory layout; it's safe to cast\n" +"struct my_state state = (struct my_state*)PyModule_GetState(module)" + +msgid "A module's token -- and the *your_token* value to use in the above code -- is:" +msgstr "توکن یک ماژول — و مقداری از *your_token* که باید در کد بالا استفاده شود — به این صورت است:" + +msgid "For modules created with :c:type:`PyModuleDef`: the address of that :c:type:`PyModuleDef`;" +msgstr "برای ماژول‌های ایجادشده با :c:type:`PyModuleDef`: آدرس همان :c:type:`PyModuleDef`؛" + +msgid "For modules defined with the :c:macro:`Py_mod_token` slot: the value of that slot;" +msgstr "برای ماژول‌های تعریف‌شده با جایگاه :c:macro:`Py_mod_token`: مقدار آن جایگاه؛" + +msgid "For modules created from an ``PyModExport_*`` :ref:`export hook `: the slots array that the export hook returned (unless overridden with :c:macro:`Py_mod_token`)." +msgstr "برای ماژول‌های ایجادشده از یک :ref:`قلاب اکسپورت ` به نام ``PyModExport_*``: آرایه‌ی جایگاه‌هایی که قلاب اکسپورت برگردانده است (مگر اینکه با :c:macro:`Py_mod_token` بازنشانی شود)." + +msgid ":c:member:`Slot ID ` for the module token." +msgstr "مورد :c:member:`Slot ID ` برای توکن ماژول." + +msgid "If you use this slot to set the module token (rather than rely on the default), you must ensure that:" +msgstr "اگر از این جایگاه برای تنظیم توکن ماژول استفاده می‌کنید (به‌جای اینکه به مقدار پیش‌فرض اتکا کنید)، باید مطمئن شوید که:" + +msgid "The pointer outlives the class, so it's not reused for something else while the class exists." +msgstr "اشاره‌گر بیشتر از کلاس عمر می‌کند، بنابراین تا زمانی که کلاس وجود دارد، برای کار دیگری دوباره استفاده نمی‌شود." + +msgid "It \"belongs\" to the extension module where the class lives, so it will not clash with other extensions." +msgstr "به ماژول توسعه‌ای که کلاس در آن قرار دارد «تعلق» دارد، بنابراین با سایر افزونه‌ها تداخل نخواهد داشت." + +msgid "If the token points to a :c:type:`PyModuleDef` struct, the module should behave as if it was created from that :c:type:`PyModuleDef`. In particular, the module state must have matching layout and semantics." +msgstr "اگر توکن به یک struct از نوع :c:type:`PyModuleDef` اشاره کند، ماژول باید طوری رفتار کند که گویی از همان :c:type:`PyModuleDef` ایجاد شده است. به‌ویژه، وضعیت ماژول باید دارای چیدمان و معناشناسی منطبق باشد." + +msgid "Modules created from :c:type:`PyModuleDef` always use the address of the :c:type:`PyModuleDef` as the token. This means that :c:macro:`!Py_mod_token` cannot be used in :c:member:`PyModuleDef.m_slots`." +msgstr "ماژول‌های ایجادشده از :c:type:`PyModuleDef` همیشه از آدرس :c:type:`PyModuleDef` به عنوان توکن استفاده می‌کنند. این یعنی :c:macro:`!Py_mod_token` را نمی‌توان در :c:member:`PyModuleDef.m_slots` استفاده کرد." + +msgid "Set *\\*result* to the module token for *module* and return 0." +msgstr "مقدار *\\*result* را روی توکن ماژول برای *module* تنظیم کنید و مقدار 0 را برگردانید." + +msgid "On error, set *\\*result* to NULL, and return -1 with an exception set." +msgstr "در صورت بروز خطا، *\\*result* را روی NULL تنظیم کنید و با تنظیم یک استثنا، مقدار 1- را برگردانید." + +msgid "See also :c:func:`PyType_GetModuleByToken`." +msgstr "همچنین نگاه کنید به :c:func:`PyType_GetModuleByToken`." msgid "Creating extension modules dynamically" msgstr "ایجاد ماژول‌های توسعه‌ای به‌صورت پویا" -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 "از توابع زیر می‌توان برای ایجاد یک ماژول خارج از :ref:`تابع مقداردهی اولیه ` یک ماژول توسعه‌ای استفاده کرد. این توابع در :ref:`مقداردهی اولیه تک‌فازی ` نیز به کار می‌روند." +msgid "The following functions may be used to create an extension module dynamically, rather than from an extension's :ref:`export hook `." +msgstr "توابع زیر ممکن است برای ایجاد پویای یک ماژول توسعه‌ای استفاده شوند، به‌جای اینکه از :ref:`قلاب اکسپورت ` افزونه استفاده شود." + +msgid "Create a new module object, given an array of :ref:`slots ` and the :py:class:`~importlib.machinery.ModuleSpec` *spec*." +msgstr "یک شیء ماژول جدید ایجاد کنید، با توجه به آرایه‌ای از :ref:`جایگاه‌ها ` و مشخصات :py:class:`~importlib.machinery.ModuleSpec` به نام *spec*." + +msgid "The *slots* argument must point to an array of :c:type:`PySlot` structures, terminated by an entry with slot ID of 0 (typically written as :c:macro:`PySlot_END`). The array must include a :c:data:`Py_mod_abi` entry." +msgstr "آرگومان *slots* باید به آرایه‌ای از ساختارهای :c:type:`PySlot` اشاره کند که با یک درایه با شناسه‌ی جایگاه 0 (که معمولاً به صورت :c:macro:`PySlot_END` نوشته می‌شود) خاتمه می‌یابد. آرایه باید شامل یک درایه‌ی :c:data:`Py_mod_abi` باشد." + +msgid "The *spec* argument may be any ``ModuleSpec``-like object, as described in :c:macro:`Py_mod_create` documentation. Currently, the *spec* must have a ``name`` attribute." +msgstr "آرگومان *spec* ممکن است هر شیء شبیه به ``ModuleSpec`` باشد، همان‌طور که در مستندات :c:macro:`Py_mod_create` توصیف شده است. در حال حاضر، *spec* باید دارای ویژگی ``name`` باشد." + +msgid "On success, return the new module. On error, return ``NULL`` with an exception set." +msgstr "در صورت موفقیت، ماژول جدید را برگردانید. در صورت بروز خطا، مقدار ``NULL`` را همراه با تنظیم یک استثنا برگردانید." + +msgid "Note that this does not process the module's execution slot (:c:data:`Py_mod_exec`). Both :c:func:`!PyModule_FromSlotsAndSpec` and :c:func:`PyModule_Exec` must be called to fully initialize a module. (See also :ref:`multi-phase-initialization`.)" +msgstr "توجه داشته باشید که این کار جایگاه اجرای ماژول (:c:data:`Py_mod_exec`) را پردازش نمی‌کند. برای مقداردهی اولیه کامل یک ماژول، باید هر دو تابع :c:func:`!PyModule_FromSlotsAndSpec` و :c:func:`PyModule_Exec` فراخوانی شوند. (همچنین به :ref:`multi-phase-initialization` مراجعه کنید.)" + +msgid "Execute the :c:data:`Py_mod_exec` slot(s) of *module*." +msgstr "جایگاه(های) :c:data:`Py_mod_exec` مربوط به *module* را اجرا کنید." + +msgid "On success, return 0. On error, return -1 with an exception set." +msgstr "در صورت موفقیت، 0 را برگردانید. در صورت بروز خطا، -1 را همراه با تنظیم یک استثنا برگردانید." + +msgid "For clarity: If *module* has no slots, for example if it uses :ref:`legacy single-phase initialization `, this function does nothing and returns 0." +msgstr "برای شفافیت: اگر *module* هیچ جایگاهی نداشته باشد، برای نمونه اگر از :ref:`مقدهی اولیه‌ی تک‌فاز قدیمی ` استفاده کند، این تابع هیچ کاری انجام نمی‌دهد و مقدار 0 را برمی‌گرداند." + +msgid "Module definition struct" +msgstr "ساختار تعریف ماژول" + +msgid "Traditionally, extension modules were defined using a *module definition* as the “description\" of how a module should be created. Rather than using an array of :ref:`slots ` directly, the definition has dedicated members for most common functionality, and allows additional slots as an extension mechanism." +msgstr "به‌طور سنتی، ماژول‌های توسعه‌ای با استفاده از یک *تعریف ماژول* به عنوان «توصیفی» از نحوه‌ی ایجاد یک ماژول تعریف می‌شدند. به جای استفاده‌ی مستقیم از آرایه‌ای از :ref:`جایگاه‌ها `، این تعریف اعضای اختصاصی برای بیشتر قابلیت‌های رایج دارد و جایگاه‌های اضافی را به عنوان مکانیزم توسعه‌ای مجاز می‌داند." + +msgid "This way of defining modules is still available and there are no plans to remove it." +msgstr "این روش تعریف ماژول‌ها همچنان در دسترس است و هیچ برنامه‌ای برای حذف آن وجود ندارد." + +msgid "The module definition struct, which holds information needed to create a module object." +msgstr "ساختار تعریف ماژول (struct) که اطلاعات لازم برای ایجاد یک شیء ماژول را در خود نگه می‌دارد." + +msgid "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 defined this way." +msgstr "این ساختار باید به صورت ایستا تخصیص داده شود (یا به نحوی تضمین شود که تا زمانی که هر ماژولی که از آن ایجاد شده است وجود دارد، معتبر باقی می‌ماند). معمولاً برای هر ماژول توسعه‌ای که به این روش تعریف می‌شود، فقط یک متغیر از این نوع وجود دارد." + +msgid "The struct, including all members, is part of the :ref:`Stable ABI ` for non-free-threaded builds (``abi3``). In the Stable ABI for free-threaded builds (``abi3t``), this struct is opaque, and unusable in practice; see :ref:`pymoduledef_slot` for a replacement." +msgstr "این ساختار، از جمله تمامی اعضا، بخشی از :ref:`ABI پایدار ` برای نسخه‌های غیر نخ‌آزاد (``abi3``) است. در ABI پایدار برای نسخه‌های ساخت نخ‌آزاد (``abi3t``)، این ساختار کدر است و در عمل قابل استفاده نیست؛ برای جایگزین، به :ref:`pymoduledef_slot` مراجعه کنید." + +msgid "Always initialize this member to :c:macro:`PyModuleDef_HEAD_INIT`:" +msgstr "همیشه این عضو را مقداردهی اولیه کنید به :c:macro:`PyModuleDef_HEAD_INIT`:" + +msgid "The type of :c:member:`!PyModuleDef.m_base`." +msgstr "نوع داده‌ی :c:member:`!PyModuleDef.m_base`." + +msgid "The struct is part of the :ref:`Stable ABI ` for non-free-threaded builds (``abi3``). In the Stable ABI for Free-Threaded Builds (``abi3t``), this struct is opaque, and unusable in practice." +msgstr "این ساختار بخشی از :ref:`ABI پایدار ` برای نسخه‌های غیر نخ‌آزاد (``abi3``) است. در ABI پایدار برای نسخه‌های ساخت نخ‌آزاد (``abi3t``)، این ساختار کدر است و در عمل قابل استفاده نیست." + +msgid "The required initial value for :c:member:`!PyModuleDef.m_base`." +msgstr "مقدار اولیهی مورد نیاز برای :c:member:`!PyModuleDef.m_base`." + +msgid "Corresponds to the :c:macro:`Py_mod_name` slot." +msgstr "متناظر با جایگاه :c:macro:`Py_mod_name`." + +msgid "These members correspond to the :c:macro:`Py_mod_doc` slot. Setting this to NULL is equivalent to omitting the slot." +msgstr "این اعضا متناظر با جایگاه :c:macro:`Py_mod_doc` هستند. تنظیم کردن این مورد روی NULL معادل چشم‌پوشی کردن از آن جایگاه است." + +msgid "Corresponds to the :c:macro:`Py_mod_state_size` slot. Setting this to zero is equivalent to omitting the slot." +msgstr "متناظر با جایگاه :c:macro:`Py_mod_state_size` است. تنظیم کردن این مورد روی صفر معادل چشم‌پوشی کردن از آن جایگاه است." + +msgid "When using :ref:`legacy single-phase initialization ` or when creating modules dynamically using :c:func:`PyModule_Create` or :c:func:`PyModule_Create2`, :c:member:`!m_size` may be set to -1. This indicates that the module does not support sub-interpreters, because it has global state." +msgstr "هنگام استفاده از :ref:`مقدهی اولیه‌ی تک‌فاز قدیمی ` یا هنگام ایجاد پویای ماژول‌ها با استفاده از :c:func:`PyModule_Create` یا :c:func:`PyModule_Create2`، ممکن است :c:member:`!m_size` روی -1 تنظیم شود. این نشان می‌دهد که ماژول از زیرمفسرها پشتیبانی نمی‌کند، زیرا دارای وضعیت سراسری است." + +msgid "Corresponds to the :c:macro:`Py_mod_methods` slot. Setting this to NULL is equivalent to omitting the slot." +msgstr "متناظر با جایگاه :c:macro:`Py_mod_methods` است. تنظیم کردن این مورد روی NULL معادل چشم‌پوشی کردن از آن جایگاه است." + +msgid "An array of additional slots, terminated by a ``{0, NULL}`` entry. Note that the entries use the older :c:type:`PyModuleDef_Slot` structure, rather than :c:type:`PySlot`." +msgstr "آرایه‌ای از جایگاه‌های اضافی که با یک درایهی ``{0, NULL}`` خاتمه می‌یابد. توجه داشته باشید که درایه‌ها به جای :c:type:`PySlot`، از ساختار قدیمی‌تر :c:type:`PyModuleDef_Slot` استفاده می‌کنند." + +msgid "If the array contains slots corresponding to :c:type:`PyModuleDef` members, the values must match. For example, if you use :c:macro:`Py_mod_name` in :c:member:`!m_slots`, :c:member:`PyModuleDef.m_name` must be set to the same pointer (not just an equal string)." +msgstr "اگر آرایه حاوی جایگاه‌های متناظر با اعضای :c:type:`PyModuleDef` باشد، مقادیر باید مطابقت داشته باشند. برای نمونه، اگر از :c:macro:`Py_mod_name` در :c:member:`!m_slots` استفاده می‌کنید، :c:member:`PyModuleDef.m_name` باید روی همان اشاره‌گر (و نه صرفاً یک رشته‌ی برابر) تنظیم شود." + +msgid "Prior to version 3.5, this member was always set to ``NULL``, and was defined as:" +msgstr "پیش از نسخه 3.5، این عضو همیشه روی ``NULL`` تنظیم می‌شد و به این صورت تعریف می‌شد:" + +msgid "Older structure defining additional slots of a module." +msgstr "ساختار قدیمی‌تری که جایگاه‌های اضافی یک ماژول را تعریف می‌کند." + +msgid "Note that a :c:type:`!PyModuleDef_Slot` array may be included in a :c:type:`!PySlot` array using :c:macro:`Py_mod_slots`, and vice versa using :c:macro:`Py_slot_subslots`." +msgstr "توجه داشته باشید که ممکن است یک آرایه‌ی :c:type:`!PyModuleDef_Slot` با استفاده از :c:macro:`Py_mod_slots` در یک آرایه‌ی :c:type:`!PySlot` گنجانده شود، و بالعکس با استفاده از :c:macro:`Py_slot_subslots`." + +msgid "Each :c:type:`!PyModuleDef_Slot` structure ``modslot`` is interpreted as the following :c:type:`PySlot` structure::" +msgstr "هر ساختار :c:type:`!PyModuleDef_Slot` یعنی ``modslot`` به عنوان ساختار :c:type:`PySlot` زیر تفسیر می‌شود::" + +msgid "" +"(PySlot){\n" +" .sl_id=modslot.slot,\n" +" .sl_flags=PySlot_INTPTR | sub_static,\n" +" .sl_ptr=modslot.value\n" +"}" +msgstr "" +"(PySlot){\n" +" .sl_id=modslot.slot,\n" +" .sl_flags=PySlot_INTPTR | sub_static,\n" +" .sl_ptr=modslot.value\n" +"}" + +msgid "where ``sub_static`` is ``PySlot_STATIC`` if the slot requires the flag (such as for :c:macro:`Py_mod_methods`), or if this flag is present on the \"parent\" :c:macro:`!Py_mod_slots` slot (if any)." +msgstr "که در آن ``sub_static`` برابر با ``PySlot_STATIC`` است اگر جایگاه به پرچم نیاز داشته باشد (مانند :c:macro:`Py_mod_methods`)، یا اگر این پرچم روی جایگاه «والد» :c:macro:`!Py_mod_slots` (در صورت وجود) حضور داشته باشد." + +msgid "Corresponds to :c:member:`PySlot.sl_id`." +msgstr "متناظر با :c:member:`PySlot.sl_id` است." + +msgid "Corresponds to :c:member:`PySlot.sl_ptr`." +msgstr "متناظر با :c:member:`PySlot.sl_ptr`." + +msgid "These members correspond to the :c:macro:`Py_mod_state_traverse`, :c:macro:`Py_mod_state_clear`, and :c:macro:`Py_mod_state_free` slots, respectively." +msgstr "این اعضا به ترتیب با جایگاه‌های :c:macro:`Py_mod_state_traverse`، :c:macro:`Py_mod_state_clear` و :c:macro:`Py_mod_state_free` مطابقت دارند." + +msgid "Setting these members to NULL is equivalent to omitting the corresponding slots." +msgstr "مقداردهی این اعضا به NULL معادل حذف جایگاه‌های مربوطه است." + +msgid ":c:member:`m_traverse`, :c:member:`m_clear` and :c:member:`m_free` functions are no longer called before the module state is allocated." +msgstr "توابع :c:member:`m_traverse`، :c:member:`m_clear` و :c:member:`m_free` دیگر قبل از تخصیص یافتن وضعیت ماژول فراخوانی نمی‌شوند." + +msgid "The type of ``PyModuleDef`` objects." +msgstr "نوع اشیاء ``PyModuleDef``." + +msgid ":c:member:`Slot ID ` that works like :c:macro:`Py_slot_subslots`, except it specifies an array of :c:type:`PyModuleDef_Slot` structures." +msgstr ":c:member:`Slot ID ` که مانند :c:macro:`Py_slot_subslots` کار می‌کند، با این تفاوت که آرایه‌ای از ساختارهای :c:type:`PyModuleDef_Slot` را مشخص می‌کند." + +msgid "The following API can be used to create modules from a :c:type:`!PyModuleDef` struct:" +msgstr "برای ایجاد ماژول‌ها از یک struct نوع :c:type:`!PyModuleDef` می‌توانید از API زیر استفاده کنید:" msgid "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 "بر اساس تعریف داده‌شده در *def*، یک شیء ماژول جدید ایجاد می‌کند. این یک ماکرو است که :c:func:`PyModule_Create2` را با *module_api_version* برابر با :c:macro:`PYTHON_API_VERSION`، یا در صورت استفاده از :ref:`API محدود ` برابر با :c:macro:`PYTHON_ABI_VERSION`، فراخوانی می‌کند." @@ -250,6 +568,9 @@ msgstr "در بیشتر موارد، به جای این تابع باید از : 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:func:`PyModule_FromDefAndSpec2` را با *module_api_version* تنظیم‌شده روی :c:macro:`PYTHON_API_VERSION`، یا روی :c:macro:`PYTHON_ABI_VERSION` در صورت استفاده از :ref:`API محدود ` فراخوانی می‌کند." +msgid "Prefer :c:func:`PyModule_FromSlotsAndSpec` in new code." +msgstr "در کدهای جدید، :c:func:`PyModule_FromSlotsAndSpec` را ترجیح دهید." + 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 not match the version of the running interpreter, a :exc:`RuntimeWarning` is emitted." msgstr "با توجه به تعریف موجود در *def* و ModuleSpec *spec*، و با فرض نسخه API *module_api_version*، یک شیء ماژول جدید ایجاد می‌کند. اگر آن نسخه با نسخه مفسر در حال اجرا مطابقت نداشته باشد، یک :exc:`RuntimeWarning` منتشر می‌شود." @@ -262,20 +583,23 @@ msgstr "در بیشتر موارد، به‌جای این تابع باید از msgid "Process any execution slots (:c:data:`Py_mod_exec`) given in *def*." msgstr "پردازش هر جایگاه اجرا (:c:data:`Py_mod_exec`) که در *def* داده شده است." -msgid "The C API version. Defined for backwards compatibility." -msgstr "نسخه‌ی C API. برای سازگاری با نسخه‌های پیشین تعریف‌شده است." +msgid "To run a module's own execution slots, prefer :c:func:`PyModule_Exec`, which works on modules that were not created from a :c:type:`PyModuleDef` structure." +msgstr "برای اجرای جایگاه‌های اجرایی خودِ ماژول، :c:func:`PyModule_Exec` را ترجیح دهید که روی ماژول‌هایی که با ساختار :c:type:`PyModuleDef` ایجاد نشده‌اند، کار می‌کند." + +msgid "The C API version, as an integer (``1013``) and string (``\"1013\"``), respectively. Defined for backwards compatibility." +msgstr "نسخه‌ی رابط برنامه‌نویسی کاربردی C، به ترتیب به صورت یک عدد صحیح (``1013``) و رشته (``\"1013\"``). برای سازگاری با نسخه‌های قبلی تعریف شده است." msgid "Currently, this constant is not updated in new Python versions, and is not useful for versioning. This may change in the future." msgstr "در حال حاضر، این ثابت در نسخه‌های جدید پایتون به‌روزرسانی نمی‌شود و برای نسخه‌بندی مفید نیست. این ممکن است در آینده تغییر کند." -msgid "Defined as ``3`` for backwards compatibility." -msgstr "برای سازگاری با نسخه‌های پیشین به‌صورت ``3`` تعریف‌شده است." +msgid "Defined as ``3`` and ``\"3\"``, respectively, for backwards compatibility." +msgstr "برای سازگاری با نسخه‌های پیشین، به ترتیب به عنوان ``3`` و ``\"3\"`` تعریف شده است." msgid "Support functions" msgstr "توابع پشتیبانی" -msgid "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:data:`Py_mod_exec`)، تابع مقداردهی اولیه برای :ref:`مقداردهی اولیه تک‌مرحله‌ای ` قدیمی، یا کدی که ماژول‌ها را به‌صورت پویا ایجاد می‌کند، در نظر گرفته شده‌اند." +msgid "The following functions are provided to help initialize a module object. They are intended for a module's execution slot (:c:data:`Py_mod_exec`), the initialization function for legacy :ref:`single-phase initialization `, or code that creates modules dynamically." +msgstr "توابع زیر برای کمک به مقداردهی اولیه یک شیء ماژول ارائه شده‌اند. آن‌ها برای جایگاه اجرای یک ماژول (:c:data:`Py_mod_exec`)، تابع مقداردهی اولیه برای مقداردهی اولیه‌ی تک‌مرحله‌ای قدیمی (:ref:`single-phase initialization `)، یا کدی که ماژول‌ها را به صورت پویا ایجاد می‌کند، در نظر گرفته شده‌اند." msgid "Add an object to *module* as *name*. This is a convenience function which can be used from the module's initialization function." msgstr "یک شیء را با نام *name* به *module* اضافه می‌کند. این تابع برای راحتی کار فراهم شده و می‌توان از آن در تابع مقداردهی اولیه‌ی ماژول استفاده کرد." @@ -490,3 +814,63 @@ msgstr "__dict__ (ویژگی ماژول)" msgid "SystemError (built-in exception)" msgstr "SystemError (استثنای توکار)" + +#~ msgid "The functions in the previous section work on any module object, including modules imported from Python code." +#~ msgstr "توابع بخش قبلی روی هر شیء ماژول کار می‌کنند، از جمله ماژول‌هایی که از کد پایتون ایمپورت شده‌اند." + +#~ msgid "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 تعریف می‌شوند، معمولاً از یک *تعریف ماژول*، :c:type:`PyModuleDef`، استفاده می‌کنند -- یک «توصیف» ثابت و تخصیص‌یافته به‌صورت ایستا از چگونگی ایجاد یک ماژول." + +#~ 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:func:`PyModule_New`، این تعریف امکان مدیریت *وضعیت ماژول* را فراهم می‌کند -- تکه‌ای از حافظه که همراه با شیء ماژول تخصیص داده و پاک‌سازی می‌شود. برخلاف ویژگی‌های پایتونیِ ماژول، کد پایتون نمی‌تواند داده‌های ذخیره‌شده در وضعیت ماژول را جایگزین یا حذف کند." + +#~ msgid "Name for the new module." +#~ msgstr "نام ماژول جدید." + +#~ 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:func:`PyModule_GetState` بازیابی کرد. این کار باعث می‌شود ماژول‌ها برای استفاده در چندین زیرمفسر ایمن باشند." + +#~ 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 "این ناحیه حافظه هنگام ایجاد ماژول بر اساس *m_size* تخصیص داده می‌شود و هنگام تخصیص‌زدایی شیء ماژول، پس از فراخوانی تابع :c:member:`~PyModuleDef.m_free` (در صورت وجود)، آزاد می‌شود." + +#~ msgid "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 "تنظیم ``m_size`` روی ``-1`` به این معنی است که ماژول از زیرمفسرها پشتیبانی نمی‌کند، زیرا دارای وضعیت سراسری است. مقدار منفی ``m_size`` تنها هنگام استفاده از :ref:`راه‌اندازی تک‌فازی قدیمی ` یا هنگام :ref:`ایجاد ماژول‌ها به‌صورت پویا ` مجاز است." + +#~ msgid "An array of slot definitions for multi-phase initialization, terminated by a ``{0, NULL}`` entry. When using legacy single-phase initialization, *m_slots* must be ``NULL``." +#~ msgstr "آرایه‌ای از تعریف‌های جایگاه برای مقداردهی اولیه چندمرحله‌ای که با ورودی ``{0, NULL}`` پایان می‌یابد. هنگام استفاده از مقداردهی اولیه تک‌مرحله‌ای قدیمی، *m_slots* باید ``NULL`` باشد." + +#~ msgid "No longer called before the module state is allocated." +#~ msgstr "دیگر پیش از تخصیص وضعیت ماژول فراخوانی نمی‌شود." + +#~ msgid "A slot ID, chosen from the available values explained below." +#~ msgstr "شناسه‌ی جایگاه، که از میان مقادیر موجود توضیح‌داده‌شده در ادامه انتخاب می‌شود." + +#~ msgid "Value of the slot, whose meaning depends on the slot ID." +#~ msgstr "مقدار جایگاه، که معنای آن به شناسه جایگاه بستگی دارد." + +#~ msgid "The available slot types are:" +#~ msgstr "انواع جایگاه‌های موجود عبارت‌اند از:" + +#~ 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 "این تابع یک نمونه‌ی :py:class:`~importlib.machinery.ModuleSpec` را که در :PEP:`451` تعریف شده است، و تعریف ماژول را دریافت می‌کند. این تابع باید یک شیء ماژول جدید برگرداند، یا خطا را تنظیم کرده و ``NULL`` را برگرداند." + +#~ msgid "Multiple ``Py_mod_create`` slots may not be specified in one module definition." +#~ msgstr "نمی‌توان چند جایگاه ``Py_mod_create`` را در یک تعریف ماژول مشخص کرد." + +#~ 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 getting import-related attributes. However, only ``PyModule_Type`` instances may be returned if the ``PyModuleDef`` has non-``NULL`` ``m_traverse``, ``m_clear``, ``m_free``; non-zero ``m_size``; or slots other than ``Py_mod_create``." +#~ msgstr "هیچ الزامی وجود ندارد که شیء بازگردانده‌شده نمونه‌ای از :c:type:`PyModule_Type` باشد. می‌توان از هر نوعی استفاده کرد، به شرط آنکه از تنظیم و دریافت ویژگی‌های مرتبط با ایمپورت پشتیبانی کند. با این حال، تنها نمونه‌های ``PyModule_Type`` را می‌توان بازگرداند اگر ``PyModuleDef`` دارای ``m_traverse``، ``m_clear`` و ``m_free`` غیر ``NULL``؛ ``m_size`` غیرصفر؛ یا جایگاه‌هایی غیر از ``Py_mod_create`` باشد." + +#~ msgid "If multiple ``Py_mod_exec`` slots are specified, they are processed in the order they appear in the *m_slots* array." +#~ msgstr "اگر چندین جایگاه ``Py_mod_exec`` مشخص شده باشند، به ترتیبی که در آرایه *m_slots* ظاهر شده‌اند پردازش می‌شوند." + +#~ msgid "Specifies one of the following values:" +#~ msgstr "یکی از مقادیر زیر را مشخص می‌کند:" + +#~ msgid "Multiple ``Py_mod_multiple_interpreters`` slots may not be specified in one module definition." +#~ msgstr "نمی‌توان چند جایگاه ``Py_mod_multiple_interpreters`` در یک تعریف ماژول مشخص کرد." + +#~ msgid "Multiple ``Py_mod_gil`` slots may not be specified in one module definition." +#~ msgstr "تعیین چند جایگاه ``Py_mod_gil`` در یک تعریف ماژول مجاز نیست." + +#~ 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 "از توابع زیر می‌توان برای ایجاد یک ماژول خارج از :ref:`تابع مقداردهی اولیه ` یک ماژول توسعه‌ای استفاده کرد. این توابع در :ref:`مقداردهی اولیه تک‌فازی ` نیز به کار می‌روند." diff --git a/c-api/object.po b/c-api/object.po index 8ece0c76..1d38b320 100644 --- a/c-api/object.po +++ b/c-api/object.po @@ -8,12 +8,13 @@ # Rafael Fontenelle , 2025 # Gigahertz ., 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 16:26+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -126,6 +127,43 @@ msgstr "پرچمی که همراه چندین تابعِ چاپ‌کننده‌ msgid "Print an object *o*, on file *fp*. Returns ``-1`` on error. The flags argument is used to enable certain printing options. The only option currently supported is :c:macro:`Py_PRINT_RAW`; if given, the :func:`str` of the object is written instead of the :func:`repr`." msgstr "شیء *o* را در پرونده *fp* چاپ می‌کند. در صورت خطا ``-1`` را برمی‌گرداند. از آرگومان پرچم‌ها برای فعال‌سازی برخی گزینه‌های چاپ استفاده می‌شود. تنها گزینه‌ای که در حال حاضر پشتیبانی می‌شود :c:macro:`Py_PRINT_RAW` است؛ در صورت ارائه این گزینه، :func:`str` شیء به‌جای :func:`repr` آن نوشته می‌شود." +msgid "Dump an object *op* to ``stderr``. This should only be used for debugging." +msgstr "برون‌ریزی یک شیء *op* در ``stderr``. این مورد فقط باید برای اشکال‌زدایی استفاده شود." + +msgid "The output is intended to try dumping objects even after memory corruption:" +msgstr "خروجی به گونه‌ای طراحی شده است که حتی پس از خرابی حافظه نیز سعی در برون‌ریزی اشیاء داشته باشد:" + +msgid "Information is written starting with fields that are the least likely to crash when accessed." +msgstr "اطلاعات با فیلدهایی نوشته می‌شوند که هنگام دسترسی، کمتر از همه احتمال دارد دچار فروپاشی شوند." + +msgid "This function can be called without an :term:`attached thread state`, but it's not recommended to do so: it can cause deadlocks." +msgstr "این تابع را می‌توان بدون :term:`وضعیت نخ متصل ` فراخوانی کرد، اما انجام این کار توصیه نمی‌شود: می‌تواند باعث ایجاد بن‌بست شود." + +msgid "An object that does not belong to the current interpreter may be dumped, but this may also cause crashes or unintended behavior." +msgstr "ممکن است شیئی که متعلق به مفسر فعلی نیست برون‌ریزی شود، اما این کار همچنین ممکن است باعث فروپاشی یا رفتارهای ناخواسته‌ای شود." + +msgid "Implement a heuristic to detect if the object memory has been freed. Don't display the object contents in this case, only its memory address." +msgstr "پیاده‌سازی یک روش اکتشافی برای تشخیص اینکه آیا حافظه‌ی شیء آزاد شده است یا خیر. در این صورت محتویات شیء را نمایش ندهید، بلکه فقط آدرس حافظه‌ی آن را نشان دهید." + +msgid "The output format may change at any time." +msgstr "قالب خروجی ممکن است در هر زمانی تغییر کند." + +msgid "Example of output:" +msgstr "نمونه‌ای از خروجی:" + +msgid "" +"object address : 0x7f80124702c0\n" +"object refcount : 2\n" +"object type : 0x9902e0\n" +"object type name: str\n" +"object repr : 'abcdef'" +msgstr "" +"object address : 0x7f80124702c0\n" +"object refcount : 2\n" +"object type : 0x9902e0\n" +"object type name: str\n" +"object repr : 'abcdef'" + msgid "Returns ``1`` if *o* has the attribute *attr_name*, and ``0`` otherwise. This is equivalent to the Python expression ``hasattr(o, attr_name)``. On failure, return ``-1``." msgstr "اگر *o* ویژگی *attr_name* را داشته باشد، ``1`` و در غیر این صورت ``0`` برمی‌گرداند. این معادل عبارت پایتونی ``hasattr(o, attr_name)`` است. در صورت شکست، ``-1`` برمی‌گرداند." @@ -174,6 +212,12 @@ msgstr "مقدار ویژگی‌ای با نام *attr_name* را برای شی msgid "If *v* is ``NULL``, the attribute is deleted. This behaviour is deprecated in favour of using :c:func:`PyObject_DelAttr`, but there are currently no plans to remove it." msgstr "اگر *v* برابر ``NULL`` باشد، ویژگی حذف می‌شود. این رفتار به نفع استفاده از :c:func:`PyObject_DelAttr` منسوخ شده است، اما در حال حاضر هیچ برنامه‌ای برای حذف آن وجود ندارد." +msgid "The function must not be called with a ``NULL`` *v* and an exception set. This case can arise from forgetting ``NULL`` checks and would delete the attribute." +msgstr "این تابع نباید با یک ``NULL`` *v* و در حالی که استثنایی تنظیم شده است، فراخوانی شود. این حالت می‌تواند ناشی از فراموش کردن بررسی‌های ``NULL`` باشد و باعث حذف ویژگی می‌شود." + +msgid "Must not be called with NULL value if an exception is set." +msgstr "اگر استثنایی تنظیم شده باشد، نباید با مقدار NULL فراخوانی شود." + msgid "This is the same as :c:func:`PyObject_SetAttr`, but *attr_name* is specified as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:`PyObject*`." msgstr "این همان :c:func:`PyObject_SetAttr` است، اما *attr_name* به‌صورت یک رشته‌ی بایتِ کدگذاری‌شده با UTF-8 از نوع :c:expr:`const char*` مشخص می‌شود، نه :c:expr:`PyObject*`." @@ -534,6 +578,15 @@ msgstr "در :term:`ساخت‌ نخ‌آزاد `، این msgid "The caller must hold an :term:`attached thread state`, despite the fact that this function doesn't call into the Python interpreter. This function cannot fail." msgstr "فراخوانی‌کننده باید یک :term:`attached thread state` را در اختیار داشته باشد، با وجود اینکه این تابع مفسر پایتون را فراخوانی نمی‌کند. این تابع نمی‌تواند شکست بخورد." +msgid "Marks the object *op* :term:`immortal`. The argument should be uniquely referenced by the calling thread. This is intended to be used for reducing reference counting contention in the :term:`free-threaded build` for objects which are shared across threads." +msgstr "شیء *op* را به عنوان :term:`نامیرا ` علامت‌گذاری می‌کند. آرگومان باید به طور منحصربه‌فرد توسط نِخ فراخواننده ارجاع داده شود. این قابلیت برای کاهش رقابت شمارش ارجاع در :term:`ساخت نخ‌آزاد ` برای اشیایی که بین نخ‌ها به اشتراک گذاشته می‌شوند، در نظر گرفته شده است." + +msgid "This is a one-way process: objects can only be made immortal; they cannot be made mortal once again. Immortal objects do not participate in reference counting and will never be garbage collected. If the object is GC-tracked, it is untracked." +msgstr "این یک فرایند یک‌طرفه است: اشیا را فقط می‌توان نامیرا کرد؛ و نمی‌توان آن‌ها را دوباره میرا ساخت. اشیای نامیرا در شمارش ارجاع شرکت نمی‌کنند و هرگز جمع‌آوری زباله نمی‌شوند. اگر شیء تحت نظارت GC باشد، نظارت بر آن متوقف می‌شود." + +msgid "This function is intended to be used soon after *op* is created, by the code that creates it, such as in the object's :c:member:`~PyTypeObject.tp_new` slot. Returns 1 if the object was made immortal and returns 0 if it was not. This function cannot fail." +msgstr "این تابع در نظر گرفته شده است تا به زودی پس از ایجاد *op*، توسط کدی که آن را ایجاد می‌کند، مانند جایگاه :c:member:`~PyTypeObject.tp_new` شیء، استفاده شود. اگر شیء نامیرا شده باشد ۱ و اگر نشده باشد ۰ را برمی‌گرداند. این تابع نمی‌تواند با خطا مواجه شود." + msgid "built-in function" msgstr "تابع توکار" diff --git a/c-api/perfmaps.po b/c-api/perfmaps.po index 144f76c5..e8512f84 100644 --- a/c-api/perfmaps.po +++ b/c-api/perfmaps.po @@ -6,12 +6,13 @@ # Translators: # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2023-05-24 13:07+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -24,8 +25,8 @@ msgstr "" msgid "Support for Perf Maps" msgstr "پشتیبانی از Perf Maps" -msgid "On supported platforms (as of this writing, only Linux), the runtime can take advantage of *perf map files* to make Python functions visible to an external profiling tool (such as `perf `_). A running process may create a file in the ``/tmp`` directory, which contains entries that can map a section of executable code to a name. This interface is described in the `documentation of the Linux Perf tool `_." -msgstr "در پلتفرم‌های پشتیبانی‌شده (در زمان نگارش این متن، تنها لینوکس)، ران‌تایم می‌تواند از *پرونده‌های نگاشت perf* بهره بگیرد تا توابع پایتون برای یک ابزار پروفایل‌گیری خارجی (مانند `perf `_) قابل مشاهده شوند. یک فرایند در حال اجرا ممکن است پرونده‌ای در پوشه‌ی ``/tmp`` ایجاد کند که حاوی ورودی‌هایی است که می‌توانند بخشی از کد اجرایی را به یک نام نگاشت کنند. این رابط در `مستندات ابزار Linux Perf `_ شرح داده شده است." +msgid "On supported platforms (Linux and macOS), the runtime can take advantage of *perf map files* to make Python functions visible to an external profiling tool (such as `perf `_ or `samply `_). A running process may create a file in the ``/tmp`` directory, which contains entries that can map a section of executable code to a name. This interface is described in the `documentation of the Linux Perf tool `_." +msgstr "روی سکوهای پشتیبانی‌شده (لینوکس و مک‌اواس)، زمان‌اجرا می‌تواند از *پرونده‌های نگاشت perf* بهره ببرد تا توابع پایتون برای یک ابزار پروفایل‌گیری خارجی (مانند `perf `_ یا `samply `_) قابل مشاهده شوند. یک فرایند در حال اجرا ممکن است پرونده‌ای در پوشه‌ی ``/tmp`` ایجاد کند که حاوی مواردی برای نگاشت بخش از کد اجرایی به یک نام است. این رابط در `مستندات ابزار لینوکس Perf `_ شرح داده شده است." msgid "In Python, these helper APIs can be used by libraries and features that rely on generating machine code on the fly." msgstr "در پایتون، کتابخانه‌ها و قابلیت‌هایی که به تولید کد ماشین در لحظه وابسته‌اند، می‌توانند از این APIهای کمکی استفاده کنند." diff --git a/c-api/sentinel.po b/c-api/sentinel.po new file mode 100644 index 00000000..8c290c01 --- /dev/null +++ b/c-api/sentinel.po @@ -0,0 +1,39 @@ +# Persian translations for Python package. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# Automatically generated, 2026. +# +# Translators: +# Sepehr Rasouli , 2026 +# arman mohebali , 2026 +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-01 14:41+0330\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: fa\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "Sentinel objects" +msgstr "اشیای نشانگر" + +msgid "This instance of :c:type:`PyTypeObject` represents the Python :class:`sentinel` type. This is the same object as :class:`sentinel`." +msgstr "این نمونه از :c:type:`PyTypeObject` معرف نوع :class:`sentinel` در پایتون است. این همان شیء موجود در :class:`sentinel` است." + +msgid "Return true if *o* is a :class:`sentinel` object or a subtype. The :class:`sentinel` type does not currently allow subclasses, so this check is exact. Future Python versions may choose to allow subtyping. This function always succeeds." +msgstr "اگر *o* یک شیء :class:`sentinel` یا یک زیرنوع باشد، مقدار true را برمی‌گرداند. نوع :class:`sentinel` در حال حاضر اجازه‌ی ایجاد زیرکلاس را نمی‌دهد، بنابراین این بررسی دقیق است. نسخه‌های آینده‌ی پایتون ممکن است امکان زیرنوع‌سازی را فراهم کنند. این تابع همیشه با موفقیت اجرا می‌شود." + +msgid "Return true if *o* is a :class:`sentinel` object, but not a subtype. The :class:`sentinel` type does not currently allow subclasses. Future Python versions may choose to allow subtyping. This function always succeeds." +msgstr "اگر *o* یک شیء :class:`sentinel` باشد اما زیرنوع نباشد، مقدار true را برمی‌گرداند. نوع :class:`sentinel` در حال حاضر اجازه‌ی ایجاد زیرکلاس را نمی‌دهد. نسخه‌های آینده‌ی پایتون ممکن است امکان زیرنوع‌سازی را فراهم کنند. این تابع همیشه با موفقیت اجرا می‌شود." + +msgid "Return a new :class:`sentinel` object with :attr:`~sentinel.__name__` set to *name* and :attr:`~sentinel.__module__` set to *module_name*. *name* must not be ``NULL``. If *module_name* is ``NULL``, :attr:`~sentinel.__module__` is set to ``None``. If *repr* is ``NULL``, ``repr()`` returns :attr:`~sentinel.__name__`. Return ``NULL`` with an exception set on failure." +msgstr "یک شیء :class:`sentinel` جدید با مقدار :attr:`~sentinel.__name__` برابر با *name* و ویژگی :attr:`~sentinel.__module__` برابر با *module_name* برگردانید. مقدار *name* نباید ``NULL`` باشد. اگر *module_name* برابر با ``NULL`` باشد، :attr:`~sentinel.__module__` روی ``None`` تنظیم می‌شود. اگر *repr* برابر با ``NULL`` باشد، تابع ``repr()`` مقدار :attr:`~sentinel.__name__` را برمی‌گرداند. در صورت بروز خطا، ``NULL`` را همراه با یک استثنای تنظیم‌شده برگردانید." + +msgid "For pickling to work, *module_name* must be the name of an importable module, and the sentinel must be accessible from that module under a path matching *name*. Pickle treats *name* as a global variable name in *module_name* (see :meth:`object.__reduce__`)." +msgstr "برای اینکه پیکل‌سازی (pickling) کار کند، مقدار *module_name* باید نام یک ماژول قابل‌واردسازی (importable) باشد و نشانگر باید از طریق مسیری منطبق بر *name* در آن ماژول قابل‌دسترس باشد. ماژول پیکل *name* را به عنوان یک نام متغیر سراسری در *module_name* در نظر می‌گیرد (نگاه کنید به :meth:`object.__reduce__`)." diff --git a/c-api/set.po b/c-api/set.po index a115eb24..dce62d18 100644 --- a/c-api/set.po +++ b/c-api/set.po @@ -8,12 +8,13 @@ # khosro azimi, 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 00:50+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -62,8 +63,8 @@ msgstr "اگر *p* یک شیء :class:`frozenset` باشد اما نمونه‌ msgid "Return a new :class:`set` containing objects returned by the *iterable*. The *iterable* may be ``NULL`` to create a new empty set. Return the new set on success or ``NULL`` on failure. Raise :exc:`TypeError` if *iterable* is not actually iterable. The constructor is also useful for copying a set (``c=set(s)``)." msgstr "یک :class:`set` جدید شامل اشیاء بازگردانده‌شده توسط *iterable* برمی‌گرداند. *iterable* می‌تواند ``NULL`` باشد تا یک مجموعه‌ی خالی جدید ایجاد شود. در صورت موفقیت مجموعه‌ی جدید و در صورت شکست ``NULL`` برمی‌گرداند. اگر *iterable* در واقع پیمایش‌پذیر نباشد، استثنای :exc:`TypeError` ایجاد می‌شود. این سازنده برای کپی‌کردن یک مجموعه نیز مفید است (``c=set(s)``)." -msgid "The operation is atomic on :term:`free threading ` when *iterable* is a :class:`set`, :class:`frozenset` or :class:`dict`." -msgstr "این عملیات در :term:`نخ‌بندی آزاد ` زمانی اتمی است که *iterable* یک :class:`set`، :class:`frozenset` یا :class:`dict` باشد." +msgid "The operation is atomic on :term:`free threading ` when *iterable* is a :class:`set`, :class:`frozenset`, :class:`dict` or :class:`frozendict`." +msgstr "هنگامی که *iterable* یک :class:`set`، :class:`frozenset`، :class:`dict` یا :class:`frozendict` باشد، عملیات روی :term:`ساخت نخ‌آزاد ` اتمی است." msgid "Return a new :class:`frozenset` containing objects returned by the *iterable*. The *iterable* may be ``NULL`` to create a new empty frozenset. Return the new set on success or ``NULL`` on failure. Raise :exc:`TypeError` if *iterable* is not actually iterable." msgstr "یک :class:`frozenset` جدید شامل اشیایی که توسط *iterable* برگردانده می‌شوند را برمی‌گرداند. *iterable* می‌تواند ``NULL`` باشد تا یک frozenset خالی جدید ایجاد شود. در صورت موفقیت، مجموعه جدید و در صورت شکست، ``NULL`` برگردانده می‌شود. اگر *iterable* در واقع پیمایش‌پذیر نباشد، :exc:`TypeError` ایجاد می‌شود." diff --git a/c-api/slice.po b/c-api/slice.po index a863a617..e85445b6 100644 --- a/c-api/slice.po +++ b/c-api/slice.po @@ -6,12 +6,14 @@ # Translators: # Revisto , 2025 # Sepehr Rasouli , 2026 +# mahdyaralipor , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-30 04:09+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 00:50+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -48,8 +50,8 @@ msgstr "احتمالاً نمی‌خواهید از این تابع استفاد msgid "The parameter type for the *slice* parameter was ``PySliceObject*`` before." msgstr "نوع پارامتر *slice* قبلاً ``PySliceObject*`` بود." -msgid "Usable replacement for :c:func:`PySlice_GetIndices`. Retrieve the start, stop, and step indices from the slice object *slice* assuming a sequence of length *length*, and store the length of the slice in *slicelength*. Out of bounds indices are clipped in a manner consistent with the handling of normal slices. *length* must not be negative." -msgstr "جایگزین قابل استفاده برای :c:func:`PySlice_GetIndices`. اندیس‌های شروع، توقف و گام را از شیء اسلایس *slice* با فرض دنباله‌ای به طول *length* بازیابی می‌کند و طول اسلایس را در *slicelength* ذخیره می‌کند. اندیس‌های خارج از محدوده به شکلی سازگار با نحوه‌ی برخورد با اسلایس‌های معمولی محدود می‌شوند. *length* نباید منفی باشد." +msgid "Usable replacement for :c:func:`PySlice_GetIndices`. Retrieve the start, stop, and step indices from the slice object *slice* assuming a sequence of length *length*, and store the length of the slice in *slicelength*. Out of bounds indices are clipped in a manner consistent with the handling of normal slices." +msgstr "جایگزین قابل استفاده برای :c:func:`PySlice_GetIndices`. شاخص‌های شروع، پایان و گام را از شیء اسلایس *slice* با فرض یک دنباله با طول *length* بازیابی کنید، و طول اسلایس را در *slicelength* ذخیره کنید. شاخص‌های خارج از کران به روشی سازگار با مدیریت اسلایس‌های عادی برش داده می‌شوند." msgid "Return ``0`` on success and ``-1`` on error with an exception set." msgstr "در صورت موفقیت ``0`` و در صورت خطا ``-1`` به همراه استثنای تنظیم‌شده برمی‌گرداند." @@ -95,9 +97,6 @@ msgstr "در صورت خطا ``-1`` به همراه استثنای تنظیم‌ msgid "Adjust start/end slice indices assuming a sequence of the specified length. Out of bounds indices are clipped in a manner consistent with the handling of normal slices." msgstr "اندیس‌های شروع/پایان اسلایس را با فرض دنباله‌ای به طول مشخص‌شده تنظیم می‌کند. اندیس‌های خارج از محدوده به شکلی سازگار با نحوه‌ی برخورد با اسلایس‌های معمولی محدود می‌شوند." -msgid "*length* must not be negative. *step* must not be zero and must not be less than ``-PY_SSIZE_T_MAX``, as guaranteed by :c:func:`PySlice_Unpack`." -msgstr "*length* نباید منفی باشد. *step* نباید صفر باشد و نباید کمتر از ``-PY_SSIZE_T_MAX`` باشد؛ این موضوع توسط :c:func:`PySlice_Unpack` تضمین شده است." - msgid "Return the length of the slice. Always successful. Doesn't call Python code." msgstr "طول اسلایس را برمی‌گرداند. همیشه موفق است. کد پایتون را فراخوانی نمی‌کند." @@ -112,3 +111,6 @@ msgstr "شیء ``Ellipsis`` پایتون. این شیء هیچ متدی ندار msgid ":c:data:`Py_Ellipsis` is immortal." msgstr ":c:data:`Py_Ellipsis` نامیرا است." + +#~ msgid "*length* must not be negative. *step* must not be zero and must not be less than ``-PY_SSIZE_T_MAX``, as guaranteed by :c:func:`PySlice_Unpack`." +#~ msgstr "*length* نباید منفی باشد. *step* نباید صفر باشد و نباید کمتر از ``-PY_SSIZE_T_MAX`` باشد؛ این موضوع توسط :c:func:`PySlice_Unpack` تضمین شده است." diff --git a/c-api/slots.po b/c-api/slots.po new file mode 100644 index 00000000..994bdbbb --- /dev/null +++ b/c-api/slots.po @@ -0,0 +1,224 @@ +# Persian translations for Python package. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# Automatically generated, 2026. +# +# Translators: +# Sepehr Rasouli , 2026 +# arman mohebali , 2026 +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-01 14:41+0330\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: fa\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "Definition slots" +msgstr "جایگاه‌های تعریف" + +msgid "To define :ref:`module objects ` and :ref:`classes ` using the C API, you may use an array of *slots* -- essentially, key-value pairs that describe features of the object to create. This decouples the data from the structures used at runtime, allowing CPython -- and other Python C API implementations -- to update the structures without breaking backwards compatibility." +msgstr "برای تعریف :ref:`اشیای ماژول ` و :ref:`کلاس‌ها ` با استفاده از C API، می‌توانید از آرایه‌ای از *جایگاه‌ها* استفاده کنید — اساساً جفت‌مقادیر کلید-مقداری که ویژگی‌های شیء مورد نظر برای ایجاد را توصیف می‌کنند. این کار داده‌ها را از ساختارهای استفاده‌شده در زمان اجرا جدا می‌کند و به CPython — و سایر پیاده‌سازی‌های C API پایتون — اجازه می‌دهد تا ساختارها را بدون شکستن سازگاری با نسخه‌های قبلی به‌روزرسانی کنند." + +msgid "This section documents slots in general. For object-specific behavior and slot values, see documentation for functions that apply slots:" +msgstr "این بخش جایگاه‌ها را به طور کلی مستند می‌کند. برای رفتارها و مقادیر جایگاه‌های خاصِ هر شیء، به مستندات توابعی که جایگاه‌ها را اعمال می‌کنند مراجعه کنید:" + +msgid ":c:func:`PyType_FromSlots` for types;" +msgstr "تابع :c:func:`PyType_FromSlots` برای انواع؛" + +msgid ":c:func:`PyModule_FromSlotsAndSpec` and :ref:`extension-export-hook` for modules." +msgstr "توابع :c:func:`PyModule_FromSlotsAndSpec` و :ref:`extension-export-hook` برای ماژول‌ها." + +msgid "When slots are passed to a function that applies them, the function will not modify the slot array, nor any data it points to (recursively). After the function is done, the caller is allowed to modify or deallocate the array and any data it points to (recursively), except data explicitly marked with :c:macro:`PySlot_STATIC`." +msgstr "هنگامی که جایگاه‌ها به تابعی که آن‌ها را اعمال می‌کند ارسال می‌شوند، آن تابع آرایه‌ی جایگاه‌ها و هیچ‌یک از داده‌هایی را که به آن‌ها اشاره می‌کند (به صورت بازگشتی) تغییر نخواهد داد. پس از اتمام کار تابع، فراخواننده مجاز است آرایه و هر داده‌ای را که به آن اشاره می‌کند (به صورت بازگشتی) تغییر دهد یا حافظه‌ی آن‌ها را آزاد کند، به جز داده‌هایی که صراحتاً با :c:macro:`PySlot_STATIC` علامت‌گذاری شده‌اند." + +msgid "Except when documented otherwise, multiple slots with the same ID (:c:member:`~PySlot.sl_id`) may not occur in a single slots array." +msgstr "به جز در مواردی که خلاف آن مستند شده باشد، چندین جایگاه با یک شناسه (:c:member:`~PySlot.sl_id`) نمی‌توانند در یک آرایه‌ی جایگاه واحد وجود داشته باشند." + +msgid "Slot arrays generalize an earlier way of defining objects: using :c:type:`PyType_Spec` with :c:type:`PyType_Slot` for types, and :c:type:`PyModuleDef` with :c:type:`PyModuleDef_Slot` for modules. The earlier API is :term:`soft deprecated`; there are no plans to remove it." +msgstr "آرایه‌های جایگاه، روش قدیمی‌تر تعریف اشیا را عمومی‌سازی می‌کنند: استفاده از :c:type:`PyType_Spec` همراه با :c:type:`PyType_Slot` برای انواع، و :c:type:`PyModuleDef` همراه با :c:type:`PyModuleDef_Slot` برای ماژول‌ها. API قدیمی‌تر :term:`منسوخ، از رده خارج شده نرم ` است؛ هیچ برنامه‌ای برای حذف آن وجود ندارد." + +msgid "Entries of the slots array use the following structure:" +msgstr "درایه‌های آرایه‌ی جایگاه از ساختار زیر استفاده می‌کنند:" + +msgid "An entry in a slots array. Defined as:" +msgstr "یک درایه در آرایه‌ی جایگاه. تعریف‌شده به صورت:" + +msgid "" +"typedef struct {\n" +" uint16_t sl_id;\n" +" uint16_t sl_flags;\n" +" uint32_t _reserved; // must be 0\n" +" union {\n" +" void *sl_ptr;\n" +" void (*sl_func)(void);\n" +" Py_ssize_t sl_size;\n" +" int64_t sl_int64;\n" +" uint64_t sl_uint64;\n" +" };\n" +"} PySlot;" +msgstr "" +"typedef struct {\n" +" uint16_t sl_id;\n" +" uint16_t sl_flags;\n" +" uint32_t _reserved; // must be 0\n" +" union {\n" +" void *sl_ptr;\n" +" void (*sl_func)(void);\n" +" Py_ssize_t sl_size;\n" +" int64_t sl_int64;\n" +" uint64_t sl_uint64;\n" +" };\n" +"} PySlot;" + +msgid "A slot ID, chosen from:" +msgstr "شناسه‌ی جایگاه، انتخاب‌شده از:" + +msgid "``Py_slot_*`` values documented in :ref:`pyslot-common-ids` below;" +msgstr "مقادیر ``Py_slot_*`` که در بخش :ref:`pyslot-common-ids` در ادامه مستند شده‌اند؛" + +msgid "``Py_mod_*`` values for modules, as documented in :ref:`c_module_slots`;" +msgstr "مقادیر ``Py_mod_*`` برای ماژول‌ها، همان‌طور که در :ref:`c_module_slots` مستند شده است؛" + +msgid "Values for types, as documented in :ref:`pyslot_type_slot_ids`." +msgstr "مقادیر برای نوع‌ها، همان‌طور که در :ref:`pyslot_type_slot_ids` مستند شده است." + +msgid "A :c:member:`!sl_id` of zero (:c:macro:`Py_slot_end`) marks the end of a slots array." +msgstr "یک :c:member:`!sl_id` برابر با صفر (:c:macro:`Py_slot_end`) پایان یک آرایه جایگاه را نشان می‌دهد." + +msgid "The data for the slot. These members are part of an anonymous union; the member to use depends on which data type is required by the slot ID: data pointer, function pointer, size, signed or unsigned integer, respectively." +msgstr "داده‌های مربوط به جایگاه. این اعضا بخشی از یک union ناشناس هستند؛ عضوی که باید استفاده شود بستگی به این دارد که شناسه جایگاه چه نوع داده‌ای را نیاز دارد: به ترتیب اشاره‌گر داده، اشاره‌گر تابع، اندازه، عدد صحیح علامت‌دار یا بدون علامت." + +msgid "Except when documented otherwise for a specific slot ID, pointers (that is :c:member:`!sl_ptr` and :c:member:`!sl_func`) may not be NULL." +msgstr "به‌جز مواردی که برای یک شناسه جایگاه خاص به شکل دیگری مستند شده باشد، اشاره‌گرها (یعنی :c:member:`!sl_ptr` و :c:member:`!sl_func`) نباید NULL باشند." + +msgid "Zero or more of the following flags, OR-ed together:" +msgstr "صفر یا چند مورد از پرچم‌های زیر که با عملگر OR ترکیب شده‌اند:" + +msgid "All data the slot points to is statically allocated and constant. Thus, the interpreter does not need to copy the information." +msgstr "تمام داده‌هایی که جایگاه به آن‌ها اشاره می‌کند به صورت ایستا تخصیص یافته و ثابت هستند. بنابراین، مفسر نیازی به کپی کردن اطلاعات ندارد." + +msgid "This flag is implied for function pointers." +msgstr "این پرچم برای اشاره‌گرهای تابع ضمنی است." + +msgid "The flag applies even to data the slot points to “indirectly”, except for slots nested via :c:macro:`Py_slot_subslots` which may have their own :c:macro:`!PySlot_STATIC` flags. For example, if applied to a :c:macro:`Py_tp_members` slot that points to an array of :c:type:`PyMemberDef` structures, then the entire array, as well as the name and doc strings in its elements, must be static and constant." +msgstr "این پرچم حتی برای داده‌هایی که جایگاه به‌طور «غیرمستقیم» به آن‌ها اشاره می‌کند نیز اعمال می‌شود، به استثنای جایگاه‌هایی که از طریق :c:macro:`Py_slot_subslots` تو در تو قرار گرفته‌اند و ممکن است پرچم‌های :c:macro:`!PySlot_STATIC` خود را داشته باشند. برای مثال، اگر روی جایگاه :c:macro:`Py_tp_members` اعمال شود که به آرایه‌ای از ساختارهای :c:type:`PyMemberDef` اشاره می‌کند، آنگاه کل آرایه و همچنین رشته‌های نام و مستندات در عناصر آن باید ایستا و ثابت باشند." + +msgid "The data is stored in ``sl_ptr``; CPython will cast it to the appropriate type." +msgstr "داده‌ها در ``sl_ptr`` ذخیره می‌شوند؛ سی‌پایتون آن را به نوع مناسب تبدیل نوع خواهد داد." + +msgid "This flag can simplify porting from the older :c:type:`PyType_Slot` and :c:type:`PyModuleDef_Slot` structures." +msgstr "این پرچم می‌تواند انتقال از ساختارهای قدیمی‌تر :c:type:`PyType_Slot` و :c:type:`PyModuleDef_Slot` را ساده‌تر کند." + +msgid "If the slot ID is unknown, the interpreter should ignore the slot, rather than fail." +msgstr "اگر شناسه جایگاه ناشناخته باشد، مفسر باید به‌جای خطا دادن، جایگاه را نادیده بگیرد." + +msgid "For example, if Python 3.16 adds a new feature with a new slot ID,attr the corresponding slot may be marked :c:macro:`!PySlot_OPTIONAL` so that Python 3.15 ignores it." +msgstr "برای مثال، اگر پایتون 3.16 ویژگی جدیدی با یک شناسه جایگاه جدید اضافه کند،attr جایگاه متناظر ممکن است به صورت :c:macro:`!PySlot_OPTIONAL` علامت‌گذاری شود تا پایتون 3.15 آن را نادیده بگیرد." + +msgid "Note that the \"optionality\" only applies to unknown slot IDs. This flag does not make Python skip invalid values of known slots." +msgstr "توجه داشته باشید که «اختیاری بودن» فقط برای شناسه‌های جایگاه ناشناخته اعمال می‌شود. این پرچم باعث نمی‌شود پایتون مقادیر نامعتبر جایگاه‌های شناخته‌شده را نادیده بگیرد." + +msgid "Convenience macros" +msgstr "ماکروهای کمکی" + +msgid "Convenience macros to define :c:type:`!PySlot` structures with :c:member:`~PySlot.sl_id` and a particular union member set." +msgstr "ماکروهای کمکی برای تعریف ساختارهای :c:type:`!PySlot` با :c:member:`~PySlot.sl_id` و یک مجموعه عضو union مشخص." + +msgid ":c:macro:`!PySlot_STATIC_DATA` sets the :c:macro:`PySlot_STATIC` flag; others set no flags." +msgstr "ماکروی :c:macro:`!PySlot_STATIC_DATA` پرچم :c:macro:`PySlot_STATIC` را تنظیم می‌کند؛ بقیه هیچ پرچمی را تنظیم نمی‌کنند." + +msgid "Note that these macros use *designated initializers*, a C language feature that C++ added in the 2020 version of the standard. If your code needs to be compatible with C++11 or older, use :c:macro:`PySlot_PTR` instead." +msgstr "توجه داشته باشید که این ماکروها از *تعیین‌کننده‌های مقداردهی اولیه* (designated initializers) استفاده می‌کنند، که ویژگی زبان C است که C++ آن را در نسخه 2020 استاندارد اضافه کرده است. اگر کد شما باید با C++11 یا قدیمی‌تر سازگار باشد، در عوض از :c:macro:`PySlot_PTR` استفاده کنید." + +msgid "Defined as::" +msgstr "به صورت زیر تعریف شده است::" + +msgid "" +"#define PySlot_DATA(NAME, VALUE) \\\n" +" {.sl_id=NAME, .sl_ptr=(void*)(VALUE)}\n" +"\n" +"#define PySlot_FUNC(NAME, VALUE) \\\n" +" {.sl_id=NAME, .sl_func=(VALUE)}\n" +"\n" +"#define PySlot_SIZE(NAME, VALUE) \\\n" +" {.sl_id=NAME, .sl_size=(VALUE)}\n" +"\n" +"#define PySlot_INT64(NAME, VALUE) \\\n" +" {.sl_id=NAME, .sl_int64=(VALUE)}\n" +"\n" +"#define PySlot_UINT64(NAME, VALUE) \\\n" +" {.sl_id=NAME, .sl_uint64=(VALUE)}\n" +"\n" +"#define PySlot_STATIC_DATA(NAME, VALUE) \\\n" +" {.sl_id=NAME, .sl_flags=PySlot_STATIC, .sl_ptr=(VALUE)}" +msgstr "" +"#define PySlot_DATA(NAME, VALUE) \\\n" +" {.sl_id=NAME, .sl_ptr=(void*)(VALUE)}\n" +"\n" +"#define PySlot_FUNC(NAME, VALUE) \\\n" +" {.sl_id=NAME, .sl_func=(VALUE)}\n" +"\n" +"#define PySlot_SIZE(NAME, VALUE) \\\n" +" {.sl_id=NAME, .sl_size=(VALUE)}\n" +"\n" +"#define PySlot_INT64(NAME, VALUE) \\\n" +" {.sl_id=NAME, .sl_int64=(VALUE)}\n" +"\n" +"#define PySlot_UINT64(NAME, VALUE) \\\n" +" {.sl_id=NAME, .sl_uint64=(VALUE)}\n" +"\n" +"#define PySlot_STATIC_DATA(NAME, VALUE) \\\n" +" {.sl_id=NAME, .sl_flags=PySlot_STATIC, .sl_ptr=(VALUE)}" + +msgid "Convenience macro to mark the end of a :c:type:`!PySlot` array." +msgstr "ماکروی کمکی برای نشانه‌گذاری پایان یک آرایه‌ی :c:type:`!PySlot`." + +msgid "#define PySlot_END {0}" +msgstr "#define PySlot_END {0}" + +msgid "Convenience macros for use in C++11-compatible code. This version of C++ does not allow setting arbitrary union members in literals; instead, these macros set the :c:macro:`PySlot_INTPTR` flag and cast the value to ``(void*)``." +msgstr "ماکروهای کمکی برای استفاده در کدهای سازگار با C++11. این نسخه‌ی C++ اجازه نمی‌دهد اعضای اتحادی دلخواه را در مقادیر لفظی تنظیم کنید؛ در عوض، این ماکروها پرچم :c:macro:`PySlot_INTPTR` را تنظیم کرده و مقدار را به ``(void*)`` تبدیل نوع می‌دهند." + +msgid "" +"#define PySlot_PTR(NAME, VALUE) \\\n" +" {NAME, PySlot_INTPTR, {0}, {(void*)(VALUE)}}\n" +"\n" +"#define PySlot_PTR_STATIC(NAME, VALUE) \\\n" +" {NAME, PySlot_INTPTR|Py_SLOT_STATIC, {0}, {(void*)(VALUE)}}" +msgstr "" +"#define PySlot_PTR(NAME, VALUE) \\\n" +" {NAME, PySlot_INTPTR, {0}, {(void*)(VALUE)}}\n" +"\n" +"#define PySlot_PTR_STATIC(NAME, VALUE) \\\n" +" {NAME, PySlot_INTPTR|Py_SLOT_STATIC, {0}, {(void*)(VALUE)}}" + +msgid "Common slot IDs" +msgstr "شناسه‌های رایج جایگاه" + +msgid "The following slot IDs may be used in both type and module definitions." +msgstr "شناسه‌های جایگاه زیر ممکن است در تعاریف نوع و ماژول استفاده شوند." + +msgid "Marks the end of a slots array. Defined as zero." +msgstr "پایان یک آرایه‌ی جایگاه را نشانه‌گذاری می‌کند. به عنوان صفر تعریف شده است." + +msgid "Nested slots array." +msgstr "آرایه‌ی جایگاه تو در تو." + +msgid "The value (:c:member:`~PySlot.sl_ptr`) should point to an array of :c:type:`PySlot` structures. The slots in the array (up to but not including the zero-ID terminator) will be treated as if they were inserted if the current slot array, at the point :c:macro:`!Py_slot_subslots` appears." +msgstr "مقدار (:c:member:`~PySlot.sl_ptr`) باید به آرایه‌ای از ساختارهای :c:type:`PySlot` اشاره کند. جایگاه‌های موجود در آرایه (تا پیش از پایان‌دهنده‌ی شناسه-صفر که شامل آن نمی‌شود) طوری پردازش خواهند شد که انگار در جایگاه فعلی، در نقطه‌ای که :c:macro:`!Py_slot_subslots` ظاهر می‌شود، درج شده‌اند." + +msgid "Slot nesting depth is limited to 5 levels. This restriction may be lifted in the future." +msgstr "عمق تو در تو بودن جایگاه به ۵ سطح محدود شده است. ممکن است این محدودیت در آینده برداشته شود." + +msgid "Reserved; will always be treated as an unknown slot ID. Defined as ``UINT16_MAX`` (``0xFFFF``)." +msgstr "رزروشده؛ همیشه به عنوان یک شناسه‌ی جایگاه ناشناخته در نظر گرفته خواهد شد. به عنوان ``UINT16_MAX`` (``0xFFFF``) تعریف شده است." + +msgid "When used with the :c:macro:`PySlot_OPTIONAL` flag, defines a slot with no effect. Without the flag, processing a slot with this ID will fail." +msgstr "هنگامی که با پرچم :c:macro:`PySlot_OPTIONAL` استفاده شود، جایگاهی بدون اثر را تعریف می‌کند. بدون این پرچم، پردازش جایگاهی با این شناسه با خطا مواجه خواهد شد." diff --git a/c-api/stable.po b/c-api/stable.po index 62bbb074..91e9b538 100644 --- a/c-api/stable.po +++ b/c-api/stable.po @@ -6,12 +6,13 @@ # Translators: # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 00:50+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -21,8 +22,8 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -msgid "C API Stability" -msgstr "پایداری API زبان C" +msgid "C API and ABI Stability" +msgstr "پایداری رابط برنامه‌نویسی کاربردی و رابط دودویی کاربردی C" msgid "Unless documented otherwise, Python's C API is covered by the Backwards Compatibility Policy, :pep:`387`. Most changes to it are source-compatible (typically by only adding new API). Changing existing API or removing API is only done after a deprecation period or to fix serious issues." msgstr "مگر آنکه خلاف آن مستند شده باشد، C API پایتون مشمول سیاست سازگاری رو به عقب، :pep:`387`، است. بیشتر تغییرات آن با کد منبع سازگار هستند (source-compatible) (معمولاً فقط با افزودن API‌های جدید). تغییر API‌های موجود یا حذف API تنها پس از یک دوره‌ی منسوخ‌سازی یا برای رفع مشکلات جدی انجام می‌شود." @@ -57,101 +58,329 @@ msgstr "این به‌طور کلی برای ابزارهای تخصصی و سط msgid "Projects that use this API are expected to follow CPython development and spend extra effort adjusting to changes." msgstr "انتظار می‌رود پروژه‌هایی که از این API استفاده می‌کنند، توسعه‌ی سی‌پایتون را دنبال کنند و برای سازگاری با تغییرات تلاش اضافی صرف کنند." -msgid "Stable Application Binary Interface" -msgstr "رابط دودویی پایدار برنامه (ABI)" +msgid "Stable Application Binary Interfaces" +msgstr "رابط‌های دودویی کاربردی پایدار" -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 "برای سادگی، این سند درباره‌ی *افزونه‌ها* صحبت می‌کند، اما API محدود (Limited API) و ABI پایدار برای همه‌ی کاربردهای API به همان شکل کار می‌کنند – برای مثال، تعبیه کردن پایتون." +msgid "Python's :dfn:`Stable ABI` allows extensions to be compatible with multiple versions of Python, without recompilation." +msgstr ":dfn:`Stable ABI` پایتون به افزونه‌ها اجازه می‌دهد بدون نیاز به کامپایل مجدد، با چندین نسخه‌ی پایتون سازگار باشند." -msgid "Limited C API" -msgstr "C API محدود" +msgid "For simplicity, this document talks about *extensions*, but Stable ABI works the same way for all uses of the API – for example, embedding Python." +msgstr "برای سادگی، این سند درباره‌ی *توسعه‌ها* صحبت می‌کند، اما ABI پایدار برای همه‌ی استفاده‌های API – برای مثال، تعبیه‌ی پایتون – به همین شکل کار می‌کند." -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 on multiple versions of Python. Contents of the Limited API are :ref:`listed below `." -msgstr "پایتون 3.2 *API محدود* را معرفی کرد، زیرمجموعه‌ای از C API پایتون. ماژول‌های توسعه‌ای که فقط از API محدود استفاده می‌کنند، می‌توانند یک‌بار کامپایل شوند و روی نسخه‌های متعدد پایتون بارگذاری شوند. محتوای API محدود :ref:`در ادامه فهرست شده‌اند `." +msgid "There are two Stable ABIs:" +msgstr "دو ABI پایدار وجود دارد:" -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 "این ماکرو را پیش از گنجاندن ``Python.h`` تعریف کنید تا فقط از API محدود استفاده کنید و نسخه‌ی API محدود را انتخاب کنید." +msgid "``abi3``, introduced in Python 3.2, is compatible with **non**-:term:`free-threaded ` builds of CPython." +msgstr "نسخه‌ی ``abi3`` که در پایتون ۳.۲ معرفی شد، با نسخه‌های **غیر**-:term:`ساخت نخ‌آزاد ` سی‌پایتون سازگار است." -msgid "Define ``Py_LIMITED_API`` to the value of :c:macro:`PY_VERSION_HEX` corresponding to the lowest Python version your extension supports. The extension will be ABI-compatible with all Python 3 releases from the specified one onward, and can use Limited API introduced up to that version." -msgstr "``Py_LIMITED_API`` را برابر با مقدار :c:macro:`PY_VERSION_HEX` مربوط به کمترین نسخه‌ی پایتونی که ماژول توسعه‌ای شما از آن پشتیبانی می‌کند، تعریف کنید. ماژول توسعه‌ای از نظر ABI با تمام نسخه‌های پایتون 3 از نسخه‌ی مشخص‌شده به بعد سازگار خواهد بود و می‌تواند از API محدودی که تا آن نسخه معرفی شده است استفاده کند." +msgid "``abi3t``, introduced in Python 3.15, is compatible with :term:`free-threaded ` builds of CPython. It has stricter API limitations than ``abi3``." +msgstr "``abi3t`` که در پایتون ۳.۱۵ معرفی شد، با نسخه‌های :term:`ساخت نخ‌آزاد ` از سی‌پایتون سازگار است. این نسخه دارای محدودیت‌های API سخت‌گیرانه‌تری نسبت به ``abi3`` است." -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 "به‌جای استفاده‌ی مستقیم از ماکروی ``PY_VERSION_HEX``، برای پایداری هنگام کامپایل با نسخه‌های آینده‌ی پایتون، یک حداقل نسخه‌ی فرعی (مثلاً ``0x030A0000`` برای پایتون 3.10) را به‌صورت هاردکد (hardcode) در کد بنویسید." +msgid "``abi3t`` was added in :pep:`803`" +msgstr "نسخه‌ی ``abi3t`` در :pep:`803` اضافه شد" -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 "همچنین می‌توانید ``Py_LIMITED_API`` را با مقدار ``3`` تعریف کنید. این همانند ``0x03020000`` عمل می‌کند (پایتون 3.2، نسخه‌ای که API محدود را معرفی کرد)." +msgid "It is possible for an extension to be compiled for *both* ``abi3`` and ``abi3t`` at the same time; the result will be compatible with both free-threaded and non-free-threaded builds of Python. Currently, this has no downsides compared to compiling for ``abi3t`` only." +msgstr "این امکان وجود دارد که یک افزونه برای *هر دو* نسخه‌ی ``abi3`` و ``abi3t`` به طور همزمان کامپایل شود؛ نتیجه با هر دو نسخه‌ی پایتون، یعنی ساخت‌های نخ‌آزاد و غیرنخ‌آزاد، سازگار خواهد بود. در حال حاضر، این روش در مقایسه با کامپایل کردن فقط برای ``abi3t`` هیچ جنبه‌ی منفی ندارد." -msgid "Stable ABI" -msgstr "رابط دودویی کاربردی پایدار" +msgid "Each Stable ABI is versioned using the first two numbers of the Python version. For example, Stable ABI 3.14 corresponds to Python 3.14. An extension compiled for Stable ABI 3.x is ABI-compatible with Python 3.x and above." +msgstr "هر ABI پایدار با استفاده از دو رقم اول نسخه‌ی پایتون شماره‌گذاری می‌شود. برای مثال، ABI پایدار ۳.۱۴ با پایتون ۳.۱۴ مطابقت دارد. افزونه‌ای که برای ABI پایدار ۳.x کامپایل شده باشد، از نظر ABI با پایتون ۳.x و بالاتر سازگار است." -msgid "To enable this, Python provides a *Stable ABI*: a set of symbols that will remain ABI-compatible across Python 3.x versions." -msgstr "برای فعال‌سازی این، پایتون یک *ABI پایدار* فراهم می‌کند: مجموعه‌ای از نمادها که در تمام نسخه‌های Python 3.x از نظر ABI سازگار باقی خواهند ماند." +msgid "Extensions that target a stable ABI must only use a limited subset of the C API. This subset is known as the :dfn:`Limited API`; its contents are :ref:`listed below `." +msgstr "افزونه‌هایی که یک ABI پایدار را هدف قرار می‌دهند، باید تنها از زیرمجموعه‌ی محدودی از C API استفاده کنند. این زیرمجموعه به نام :dfn:`Limited API` شناخته می‌شود؛ محتویات آن در :ref:`فهرست زیر ` آمده است." -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 signatures. However, other changes in Python can change the *behavior* of extensions. See Python's Backwards Compatibility Policy (:pep:`387`) for details." -msgstr "ABI پایدار از بروز مشکلات ABI جلوگیری می‌کند؛ مانند خطاهای پیونددهنده به دلیل نبود نمادها یا خرابی داده به دلیل تغییرات در چیدمان ساختارها یا امضاهای توابع. با این حال، تغییرات دیگر در پایتون می‌توانند *رفتار* ماژول‌های توسعه‌ای را تغییر دهند. برای جزئیات، سیاست سازگاری رو به عقب پایتون (:pep:`387`) را ببینید." +msgid "On Windows, extensions that use a Stable ABI should be linked against ``python3.dll`` rather than a version-specific library such as ``python39.dll``. This library only exposes the relevant symbols." +msgstr "روی ویندوز، توسعه‌هایی که از یک ABI پایدار استفاده می‌کنند باید به جای یک کتابخانه‌ی وابسته‌ی نسخه مانند ``python39.dll``، به ``python3.dll`` پیوند داده شوند. این کتابخانه فقط نمادهای مربوطه را در معرض دید قرار می‌دهد." -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 "ABI پایدار شامل نمادهایی است که در :ref:`API محدود ` افشا شده‌اند، اما نمادهای دیگری را نیز در بر می‌گیرد – برای مثال، توابعی که برای پشتیبانی از نسخه‌های قدیمی‌ترِ API محدود ضروری‌اند." +msgid "On some platforms, Python will look for and load shared library files named with the ``abi3`` or ``abi3t`` tag (for example, ``mymodule.abi3.so``). :term:`Free-threaded ` interpreters only recognize the ``abi3t`` tag, while non-free-threaded ones will prefer ``abi3`` but fall back to ``abi3t``. Thus, extensions compatible with both ABIs should use the ``abi3t`` tag." +msgstr "در برخی پلتفرم‌ها، پایتون به دنبال پرونده‌های کتابخانه‌ی مشترکی با برچسب ``abi3`` یا ``abi3t`` (برای مثال ``mymodule.abi3.so``) می‌گردد و آن‌ها را بارگذاری می‌کند. مفسرهای :term:`توسعه‌یافته با نخ‌آزاد ` تنها برچسب ``abi3t`` را تشخیص می‌دهند، در حالی که مفسرهای غیر نخ‌آزاد برچسب ``abi3`` را ترجیح می‌دهند اما به ``abi3t`` بازمی‌گردند. بنابراین، افزونه‌های سازگار با هر دو نوع ABI باید از برچسب ``abi3t`` استفاده کنند." -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 "در ویندوز، ماژول‌های توسعه‌ای که از رابط دودویی پایدار استفاده می‌کنند، باید به‌جای کتابخانه‌ی خاص نسخه مانند ``python39.dll`` به ``python3.dll`` پیوند داده شوند." +msgid "Python does not necessarily check that extensions it loads have compatible ABI. Extension authors are encouraged to add a check using the :c:macro:`Py_mod_abi` slot or the :c:func:`PyABIInfo_Check` function, but the user (or their packaging tool) is ultimately responsible for ensuring that, for example, extensions built for Stable ABI 3.10 are not installed for lower versions of Python." +msgstr "پایتون لزوماً بررسی نمی‌کند که افزونه‌هایی که بارگذاری می‌کند دارای ABI سازگار باشند. به توسعه‌دهندگان افزونه‌ها توصیه می‌شود با استفاده از جایگاه :c:macro:`Py_mod_abi` یا تابع :c:func:`PyABIInfo_Check` یک بررسی اضافه کنند، اما مسئولیت نهایی تضمین این موضوع بر عهده‌ی کاربر (یا ابزار بسته‌بندی او) است؛ برای مثال، اینکه اطمینان حاصل شود افزونه‌های ساخته‌شده برای ABI پایدار ۳.۱۰ برای نسخه‌های پایین‌تر پایتون نصب نشوند." -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 extensions conform to a Stable ABI. The user (or their packaging tools) need to ensure that, for example, extensions built with the 3.10+ Limited API are not installed for lower versions of Python." -msgstr "در برخی پلتفرم‌ها، پایتون به دنبال پرونده‌های کتابخانه اشتراکی‌ای که با برچسب ``abi3`` نام‌گذاری شده‌اند می‌گردد و آن‌ها را بارگذاری می‌کند (برای مثال، ``mymodule.abi3.so``). پایتون بررسی نمی‌کند که آیا این‌گونه ماژول‌های توسعه‌ای با ABI پایدار مطابقت دارند یا خیر. کاربر (یا ابزارهای بسته‌بندی او) باید اطمینان حاصل کنند که مثلاً ماژول‌های توسعه‌ای ساخته‌شده با API محدودِ 3.10+ برای نسخه‌های پایین‌تر پایتون نصب نمی‌شوند." +msgid "All functions in Stable ABI are present as functions in Python's shared library, not solely as macros. This makes them usable in languages that don't use the C preprocessor, including Python's :py:mod:`ctypes`." +msgstr "تمام توابع موجود در ABI پایدار به عنوان تابع در کتابخانه‌ی مشترک پایتون حضور دارند، نه صرفاً به صورت کلان‌دستورها (ماکروها). این امر باعث می‌شود که آن‌ها در زبان‌هایی که از پیش‌پردازنده‌ی C استفاده نمی‌کنند، از جمله :py:mod:`ctypes` پایتون، قابل استفاده باشند." -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 "تمام توابع موجود در ABI پایدار به‌صورت تابع در کتابخانه‌ی اشتراکی پایتون وجود دارند، نه صرفاً به‌صورت ماکرو. این امر امکان استفاده از آن‌ها را در زبان‌هایی که از پیش‌پردازنده‌ی C استفاده نمی‌کنند، فراهم می‌کند." +msgid "Compiling for Stable ABI" +msgstr "کامپایل کردن برای ABI پایدار" -msgid "Limited API Scope and Performance" -msgstr "محدوده و کارایی API محدود" +msgid "Build tools (such as, for example, meson-python, scikit-build-core, or Setuptools) often have a mechanism for setting macros and synchronizing them with extension filenames and other metadata. Prefer using such a mechanism, if it exists, over defining the macros manually." +msgstr "ابزارهای ساخت (مانند meson-python، scikit-build-core یا Setuptools) اغلب مکانیزمی برای تنظیم ماکروها و همگام‌سازی آن‌ها با نام‌ پرونده‌های افزونه و سایر فرااطلاعات دارند. در صورت وجود چنین مکانیزمی، استفاده از آن را به تعریف دستی ماکروها ترجیح دهید." -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 "هدف API محدود (Limited API) این است که هر آنچه با C API کامل امکان‌پذیر است را ممکن سازد، اما احتمالاً با جریمه‌ای در کارایی (performance penalty)." +msgid "The rest of this section is mainly relevant for tool authors, and for people who compile extensions manually." +msgstr "باقی مانده‌ی این بخش عمدتاً برای توسعه‌دهندگان ابزارها و افرادی که افزونه‌ها را به صورت دستی کامپایل می‌کنند، کاربرد دارد." -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:func:`PyList_GetItem` دسترس‌پذیر است، گونه‌ی ماکروی «ناامن» آن :c:func:`PyList_GET_ITEM` دسترس‌پذیر نیست. این ماکرو می‌تواند سریع‌تر باشد، زیرا می‌تواند به جزئیات پیاده‌سازی وابسته به نسخه‌ی شیء فهرست تکیه کند." +msgid "`list of recommended tools`_ in the Python Packaging User Guide" +msgstr "`فهرست ابزارهای پیشنهادی`_ در راهنمای کاربر بسته‌بندی پایتون" -msgid "Without ``Py_LIMITED_API`` defined, some C API functions are inlined or replaced by macros. Defining ``Py_LIMITED_API`` disables this inlining, allowing stability as Python's data structures are improved, but possibly reducing performance." -msgstr "بدون تعریف ``Py_LIMITED_API``، برخی از توابع C API به‌صورت درون‌خطی تعریف می‌شوند یا با ماکروها جایگزین می‌گردند. تعریف ``Py_LIMITED_API`` این درون‌خطی‌سازی را غیرفعال می‌کند و همین امر باعث می‌شود با بهبود ساختارهای داده‌ی پایتون، پایداری حفظ شود، هرچند ممکن است کارایی را کاهش دهد." +msgid "To compile for a Stable ABI, define one or both of the following macros to the lowest Python version your extension should support, in :c:macro:`Py_PACK_VERSION` format. Typically, you should choose a specific value rather than the version of the Python headers you are compiling against." +msgstr "برای کامپایل کردن برای یک ABI پایدار، یکی از ماکروهای زیر یا هر دو آن‌ها را روی پایین‌ترین نسخه‌ی پایتونی که افزونه‌ی شما باید پشتیبانی کند، در قالب :c:macro:`Py_PACK_VERSION` تعریف کنید. به طور معمول، به جای نسخه‌ی سرآیندهای پایتونی که در حال کامپایل کردن با آن‌ها هستید، باید مقدار خاصی را انتخاب کنید." -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 performance for that Python version, but will limit compatibility. Compiling with ``Py_LIMITED_API`` will then yield an extension that can be distributed where a version-specific one is not available – for example, for prereleases of an upcoming Python version." -msgstr "با تعریف ن کردن ``Py_LIMITED_API``، می‌توان یک افزونه‌ی API محدود را با ABI مخصوص نسخه کامپایل کرد. این کار می‌تواند کارایی را برای آن نسخه از پایتون بهبود بخشد، اما سازگاری را محدود خواهد کرد. در مقابل، کامپایل کردن با ``Py_LIMITED_API`` افزونه‌ای به دست می‌دهد که می‌توان آن را در جایی که افزونه‌ی مخصوص نسخه در دسترس نیست، توزیع کرد – برای مثال، برای نسخه‌های پیش‌انتشار یک نسخه‌ی آتی از پایتون." +msgid "The macros must be defined before including ``Python.h``. Since :c:macro:`Py_PACK_VERSION` is not available at this point, you will need to use the numeric value directly. For reference, the values for a few recent Python versions are:" +msgstr "ماکروها باید پیش از گنجاندن ``Python.h`` تعریف شوند. از آنجا که :c:macro:`Py_PACK_VERSION` در این نقطه در دسترس نیست، لازم است مستقیماً از مقدار عددی استفاده کنید. برای مراجع، مقادیر مربوط به چند نسخه‌ی اخیر پایتون عبارتند از:" -msgid "Limited API Caveats" -msgstr "هشدارهای API محدود" +msgid "" +"0x30a0000 /* Py_PACK_VERSION(3,10) */\n" +"0x30b0000 /* Py_PACK_VERSION(3,11) */\n" +"0x30c0000 /* Py_PACK_VERSION(3,12) */\n" +"0x30d0000 /* Py_PACK_VERSION(3,13) */\n" +"0x30e0000 /* Py_PACK_VERSION(3,14) */\n" +"0x30f0000 /* Py_PACK_VERSION(3,15) */" +msgstr "" +"0x30a0000 /* Py_PACK_VERSION(3,10) */\n" +"0x30b0000 /* Py_PACK_VERSION(3,11) */\n" +"0x30c0000 /* Py_PACK_VERSION(3,12) */\n" +"0x30d0000 /* Py_PACK_VERSION(3,13) */\n" +"0x30e0000 /* Py_PACK_VERSION(3,14) */\n" +"0x30f0000 /* Py_PACK_VERSION(3,15) */" + +msgid "When one of the macros is defined, ``Python.h`` will only expose API that is compatible with the given Stable ABI -- that is, the :ref:`Limited API ` plus some definitions that need to be visible to the compiler but should not be used directly. When both are defined, ``Python.h`` will only expose API compatible with both Stable ABIs." +msgstr "هنگامی که یکی از ماکروها تعریف می‌شود، ``Python.h`` تنها API سازگار با ABI پایدار داده‌شده را نمایش می‌دهد -- یعنی :ref:`API محدود ` به علاوه برخی تعاریف که باید برای کامپایلر قابل مشاهده باشند اما نباید مستقیماً استفاده شوند. هنگامی که هر دو تعریف شوند، ``Python.h`` فقط API سازگار با هر دو ABI پایدار را نمایش خواهد داد." + +msgid "Target ``abi3``, that is, non-:term:`free-threaded builds ` of CPython. See :ref:`above ` for common information." +msgstr "هدف قرار دادن ``abi3``، یعنی ساخت‌های غیر-:term:`نخ‌آزاد ` سی‌پایتون. برای اطلاعات عمومی به بخش :ref:`بالا ` مراجعه کنید." + +msgid "Target ``abi3t``, that is, :term:`free-threaded builds ` of CPython. See :ref:`above ` for common information." +msgstr "هدف قرار دادن ``abi3t``، یعنی ساخت‌های :term:`نخ‌آزاد ` سی‌پایتون. برای اطلاعات عمومی به بخش :ref:`بالا ` مراجعه کنید." + +msgid "Both macros specify a target ABI; the different naming style is due to backwards compatibility." +msgstr "هر دو ماکرو یک ABI هدف را مشخص می‌کنند؛ سبک نام‌گذاری متفاوت به دلیل سازگاری با نسخه‌های قبلی است." + +msgid "Historical note" +msgstr "نکته‌ی تاریخی" + +msgid "You can also define ``Py_LIMITED_API`` as ``3``. This works the same as ``0x03020000`` (Python 3.2, the version that introduced Stable ABI)." +msgstr "همچنین می‌توانید ``Py_LIMITED_API`` را به عنوان ``3`` تعریف کنید. این کار مشابه ``0x03020000`` (پایتون ۳.۲، نسخه‌ای که ABI پایدار را معرفی کرد) عمل می‌کند." + +msgid "When both are defined, ``Python.h`` may, or may not, redefine :c:macro:`!Py_LIMITED_API` to match :c:macro:`!Py_TARGET_ABI3T`." +msgstr "هنگامی که هر دو تعریف شوند، ``Python.h`` ممکن است ماکروی :c:macro:`!Py_LIMITED_API` را برای تطابق با :c:macro:`!Py_TARGET_ABI3T` بازتعریف بکند یا نکند." + +msgid "On a :term:`free-threaded build` -- that is, when :c:macro:`Py_GIL_DISABLED` is defined -- :c:macro:`!Py_TARGET_ABI3T` defaults to the value of :c:macro:`!Py_LIMITED_API`. This means that there are two ways to build for both ``abi3`` and ``abi3t``:" +msgstr "در یک :term:`ساخت نخ‌آزاد ` -- یعنی زمانی که :c:macro:`Py_GIL_DISABLED` تعریف شده باشد -- :c:macro:`!Py_TARGET_ABI3T` به‌طور پیش‌فرض به مقداری که :c:macro:`!Py_LIMITED_API` دارد تنظیم می‌شود. این یعنی دو راه برای ساخت هم‌زمان برای ``abi3`` و ``abi3t`` وجود دارد:" + +msgid "define both :c:macro:`!Py_LIMITED_API` and :c:macro:`!Py_TARGET_ABI3T`, or" +msgstr "تعریف کردن هر دو ماکروی :c:macro:`!Py_LIMITED_API` و :c:macro:`!Py_TARGET_ABI3T`، یا" + +msgid "define only :c:macro:`!Py_LIMITED_API` and:" +msgstr "تعریف کردن تنها ماکروی :c:macro:`!Py_LIMITED_API` و:" + +msgid "on Windows, define :c:macro:`!Py_GIL_DISABLED`;" +msgstr "در ویندوز، تعریف کردن :c:macro:`!Py_GIL_DISABLED`؛" + +msgid "on other systems, use the headers of free-threaded build of Python." +msgstr "در سایر سیستم‌ها، استفاده از سرآیندهای ساخت نخ‌آزاد پایتون." + +msgid "Stable ABI Scope and Performance" +msgstr "محدوده و کارایی ABI پایدار" + +msgid "The goal for Stable ABI is to allow everything that is possible with the full C API, but possibly with a performance penalty. Generally, compatibility with Stable ABI will require some changes to an extension's source code." +msgstr "هدف از ABI پایدار این است که همه‌ی کارهایی که با API کامل C امکان‌پذیر است، اما احتمالاً همراه با جریمه‌ی کارایی، اجازه داده شود. به طور کلی، سازگاری با ABI پایدار نیازمند برخی تغییرات در کد منبع توسعه است." + +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:func:`PyList_GetItem` در دسترس است، نوع مشتق‌شده‌ی ناامن آن یعنی کلان‌دستور :c:func:`PyList_GET_ITEM` در دسترس نیست. این کلان‌دستور می‌تواند سریع‌تر باشد زیرا می‌تواند به جزئیات پیاده‌سازی وابسته‌ی نسخه‌ی شیء فهرست تکیه کند." + +msgid "For another example, when *not* compiling for Stable ABI, some C API functions are inlined or replaced by macros. Compiling for Stable ABI disables this inlining, allowing stability as Python's data structures are improved, but possibly reducing performance." +msgstr "برای مثالی دیگر، هنگام *عدم* کامپایل برای ABI پایدار، برخی از توابع API پایتون درون‌خطی می‌شوند یا با کلان‌دستورها جایگزین می‌شوند. کامپایل کردن برای ABI پایدار این درون‌خطی‌سازی را غیرفعال می‌کند، و با بهبود ساختارهای داده‌ی پایتون اجازه می‌دهد پایداری حفظ شود، اما احتمالاً کارایی را کاهش می‌دهد." -msgid "Note that compiling with ``Py_LIMITED_API`` is *not* a complete guarantee that code conforms to the :ref:`Limited API ` or the :ref:`Stable ABI `. ``Py_LIMITED_API`` only covers definitions, but an API also includes other issues, such as expected semantics." -msgstr "توجه داشته باشید که کامپایل با ``Py_LIMITED_API`` تضمین کاملی *نیست* که کد با :ref:`API محدود ` یا :ref:`ABI پایدار ` مطابقت داشته باشد. ``Py_LIMITED_API`` تنها تعاریف را پوشش می‌دهد، اما یک API همچنین شامل مسائل دیگری مانند معناشناسی مورد انتظار است." +msgid "By leaving out the :c:macro:`!Py_LIMITED_API` or :c:macro:`!Py_TARGET_ABI3T` definition, it is possible to compile Stable-ABI-compatible source for a version-specific ABI. A potentially faster version-specific extension can then be distributed alongside a version compiled for Stable ABI -- a slower but more compatible fallback." +msgstr "با کنار گذاشتن تعریف :c:macro:`!Py_LIMITED_API` یا :c:macro:`!Py_TARGET_ABI3T`، امکان کامپایل کد منبع سازگار با Stable-ABI برای یک ABI خاصِ نسخه وجود دارد. سپس می‌توان یک افزونه‌ی خاصِ نسخه‌ی احتمالاً سریع‌تر را در کنار نسخه‌ای که برای Stable ABI کامپایل شده است (یک جایگزین کندتر اما سازگارتر) توزیع کرد." -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 example, consider a function that starts accepting ``NULL`` for an argument. In Python 3.9, ``NULL`` now selects a default behavior, but in Python 3.8, the argument will be used directly, causing a ``NULL`` dereference and crash. A similar argument works for fields of structs." -msgstr "یکی از مشکلاتی که ``Py_LIMITED_API`` در برابر آن محافظت نمی‌کند، فراخوانی تابعی با آرگومان‌هایی است که در نسخه‌ی پایین‌تر پایتون نامعتبر هستند. برای مثال، تابعی را در نظر بگیرید که شروع به پذیرش ``NULL`` برای یک آرگومان کرده است. در پایتون 3.9، ``NULL`` اکنون یک رفتار پیش‌فرض را انتخاب می‌کند، اما در پایتون 3.8، آرگومان مستقیماً استفاده خواهد شد که موجب ارجاع‌زدایی (dereference) ``NULL`` و فروپاشی می‌شود. استدلال مشابهی برای فیلدهای ساختارها نیز برقرار است." +msgid "Stable ABI Caveats" +msgstr "هشدارهای ABI پایدار" -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 "مشکل دیگر این است که برخی از فیلدهای ساختار هنگامی که ``Py_LIMITED_API`` تعریف شده باشد، در حال حاضر پنهان نمی‌شوند، هرچند که بخشی از API محدود به شمار می‌روند." +msgid "Note that compiling for Stable ABI is *not* a complete guarantee that code will be compatible with the expected Python versions. Stable ABI prevents *ABI* issues, like linker errors due to missing symbols or data corruption due to changes in structure layouts or function signatures. However, other changes in Python can change the *behavior* of extensions." +msgstr "توجه داشته باشید که کامپایل کردن برای Stable ABI تضمین کامل نمی‌کند که کد با نسخه‌های مورد انتظار پایتون سازگار باشد. Stable ABI از مشکلات *ABI*، مانند خطاهای پیونددهنده به دلیل نمادهای مفقود یا خرابی داده‌ها به دلیل تغییرات در طرح‌بندی ساختارها یا امضای تابع، جلوگیری می‌کند. با این حال، سایر تغییرات در پایتون می‌تواند *رفتار* افزونه‌ها را تغییر دهد." -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 "به این دلایل، توصیه می‌کنیم یک ماژول توسعه‌ای را با *همه‌ی* نسخه‌های فرعی پایتون که از آن‌ها پشتیبانی می‌کند آزمایش کنید و ترجیحاً آن را با *پایین‌ترین* نسخه از میان آن‌ها کامپایل کنید." +msgid "One issue that the :c:macro:`Py_TARGET_ABI3T` and :c:macro:`Py_LIMITED_API` macros do not guard against is calling a function with arguments that are invalid in a lower Python version. For example, consider a function that starts accepting ``NULL`` for an argument. In Python 3.9, ``NULL`` now selects a default behavior, but in Python 3.8, the argument will be used directly, causing a ``NULL`` dereference and crash. A similar argument works for fields of structs." +msgstr "یکی از مشکلاتی که ماکروهای :c:macro:`Py_TARGET_ABI3T` و :c:macro:`Py_LIMITED_API` از آن جلوگیری نمی‌کنند، فراخوانی یک تابع با آرگومان‌هایی است که در یک نسخه‌ی پایین‌تر پایتون نامعتبر هستند. برای مثال، تابعی را در نظر بگیرید که شروع به پذیرش ``NULL`` برای یک آرگومان می‌کند. در پایتون ۳.۹، مقدار ``NULL`` اکنون یک رفتار پیش‌فرض را انتخاب می‌کند، اما در پایتون ۳.۸، آرگومان مستقیماً استفاده خواهد شد که باعث رفع ارجاع ``NULL`` و فروپاشی می‌شود. استدلال مشابهی برای فیلدهای structها نیز صادق است." + +msgid "For these reasons, we recommend testing an extension with *all* minor Python versions it supports." +msgstr "به همین دلیل، توصیه می‌کنیم یک افزونه را با *تمام* نسخه‌های فرعی پایتون که پشتیبانی می‌کند، آزمایش کنید." 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 few private declarations are exposed for technical reasons (or even unintentionally, as bugs)." msgstr "همچنین توصیه می‌کنیم مستندات تمام API‌های استفاده‌شده را بررسی کنید تا مشخص شود که آیا به‌طور صریح بخشی از API محدود هستند یا خیر. حتی با تعریف ``Py_LIMITED_API``، چند اعلان خصوصی به دلایل فنی (یا حتی ناخواسته، به‌عنوان باگ) در دسترس قرار می‌گیرند." -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 Python 3.12, but it will not necessarily *compile* with Python 3.12. In particular, parts of the Limited API may be deprecated and removed, provided that the Stable ABI stays stable." -msgstr "همچنین توجه داشته باشید که API محدود لزوماً پایدار نیست: کامپایل کردن با ``Py_LIMITED_API`` در پایتون 3.8 به این معناست که ماژول توسعه‌ای با پایتون 3.12 اجرا خواهد شد، اما لزوماً با پایتون 3.12 *کامپایل* نخواهد شد. به‌ویژه، ممکن است بخش‌هایی از API محدود منسوخ و حذف شوند، به شرط آنکه ABI پایدار پایدار باقی بماند." +msgid "Also note that while compiling with ``Py_LIMITED_API`` 3.8 means that the extension should *load* on Python 3.12, and *compile* with Python 3.12, the same source will not necessarily compile with ``Py_LIMITED_API`` set to 3.12. In general, parts of the Limited API may be deprecated and removed, provided that Stable ABI stays stable." +msgstr "همچنین توجه داشته باشید که اگرچه کامپایل کردن با ``Py_LIMITED_API`` ۳.۸ به این معنی است که افزونه باید روی پایتون ۳.۱۲ *بارگذاری* شود و با پایتون ۳.۱۲ *کامپایل* شود، اما همان سورس لزوماً با تنظیم ``Py_LIMITED_API`` روی ۳.۱۲ کامپایل نخواهد شد. به طور کلی، بخش‌هایی از API محدود ممکن است منسوخ و حذف شوند، مشروط بر اینکه Stable ABI پایدار بماند." msgid "Platform Considerations" msgstr "ملاحظات پلتفرم" -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:`Stable ABI `, these details define a “platform”. They usually depend on the OS type and processor architecture" -msgstr "پایداری ABI نه‌تنها به پایتون، بلکه به کامپایلر استفاده‌شده، کتابخانه‌های سطح پایین‌تر و گزینه‌های کامپایلر نیز بستگی دارد. در چارچوب :ref:`ABI پایدار `، این جزئیات یک «پلتفرم» را تعریف می‌کنند. این جزئیات معمولاً به نوع سیستم‌عامل و معماری پردازنده بستگی دارند" +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:`Stable ABIs `, these details define a “platform”. They usually depend on the OS type and processor architecture" +msgstr "پایداری ABI نه تنها به پایتون، بلکه به کامپایلر استفاده‌شده، کتابخانه‌های سطح پایین‌تر و گزینه‌های کامپایلر نیز بستگی دارد. برای اهداف :ref:`Stable ABIs `، این جزئیات یک «پلتفرم» را تعریف می‌کنند. آن‌ها معمولاً به نوع سیستم‌عامل و معماری پردازنده بستگی دارند." + +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 does not break the Stable ABIs, or the version-specific ABIs. This is the case with Windows and macOS releases from ``python.org`` and many third-party distributors." +msgstr "مسئولیت هر توزیع‌کننده‌ی خاص پایتون است که اطمینان حاصل کند تمام نسخه‌های پایتون روی یک پلتفرم خاص به گونه‌ای ساخته شده‌اند که Stable ABIها یا ABIهای خاصِ نسخه را مختل نکنند. این مورد در خصوص نسخه‌های ویندوز و macOS ارائه شده از سوی ``python.org`` و بسیاری از توزیع‌کنندگان شخص ثالث صادق است." + +msgid "ABI Checking" +msgstr "بررسی ABI" + +msgid "Python includes a rudimentary check for ABI compatibility." +msgstr "پایتون شامل یک بررسی مقدماتی برای سازگاری ABI است." + +msgid "This check is not comprehensive. It only guards against common cases of incompatible modules being installed for the wrong interpreter. It also does not take :ref:`platform incompatibilities ` into account. It can only be done after an extension is successfully loaded." +msgstr "این بررسی جامع نیست. این بررسی تنها در برابر موارد رایج نصب ماژول‌های ناسازگار برای مفسر اشتباه محافظت می‌کند. همچنین ناسازگاری‌های :ref:`platform incompatibilities ` را در نظر نمی‌گیرد. این کار تنها پس از بارگذاری موفقیت‌آمیز یک افزونه قابل انجام است." + +msgid "Despite these limitations, it is recommended that extension modules use this mechanism, so that detectable incompatibilities raise exceptions rather than crash." +msgstr "با وجود این محدودیت‌ها، توصیه می‌شود که ماژول‌های توسعه‌ای از این مکانیزم استفاده کنند تا ناسازگاری‌های قابل‌تشخیص به جای فروپاشی، استثناهایی را ایجاد کنند." + +msgid "Most modules can use this check via the :c:data:`Py_mod_abi` slot and the :c:macro:`PyABIInfo_VAR` macro, for example like this:" +msgstr "بیشتر ماژول‌ها می‌توانند از طریق جایگاه :c:data:`Py_mod_abi` و کلان‌دستور :c:macro:`PyABIInfo_VAR` از این بررسی استفاده کنند، برای مثال به این شکل:" + +msgid "" +"PyABIInfo_VAR(abi_info);\n" +"\n" +"static PyModuleDef_Slot mymodule_slots[] = {\n" +" {Py_mod_abi, &abi_info},\n" +" ...\n" +"};" +msgstr "" +"PyABIInfo_VAR(abi_info);\n" +"\n" +"static PyModuleDef_Slot mymodule_slots[] = {\n" +" {Py_mod_abi, &abi_info},\n" +" ...\n" +"};" + +msgid "The full API is described below for advanced use cases." +msgstr "API کامل در ادامه برای موارد استفاده‌ی پیشرفته شرح داده شده است." + +msgid "Verify that the given *info* is compatible with the currently running interpreter." +msgstr "بررسی کنید که *info* داده‌شده با مفسر در حال اجرا سازگار باشد." + +msgid "Return 0 on success. On failure, raise an exception and return -1." +msgstr "در صورت موفقیت مقدار ۰ را برمی‌گرداند. در صورت شکست، یک استثنا ایجاد کرده و ۱- برمی‌گرداند." + +msgid "If the ABI is incompatible, the raised exception will be :py:exc:`ImportError`." +msgstr "اگر ABI ناسازگار باشد، استثنای ایجادشده :py:exc:`ImportError` خواهد بود." + +msgid "The *module_name* argument can be ``NULL``, or point to a NUL-terminated UTF-8-encoded string used for error messages." +msgstr "آرگومان *module_name* می‌تواند ``NULL`` باشد، یا به یک رشته‌ی کدگذاری‌شده با UTF-8 و پایان‌یافته با NUL که برای پیام‌های خطا استفاده می‌شود، اشاره کند." + +msgid "Note that if *info* describes the ABI that the current code uses (as defined by :c:macro:`PyABIInfo_VAR`, for example), using any other Python C API may lead to crashes. In particular, it is not safe to examine the raised exception." +msgstr "توجه داشته باشید که اگر *info* نشان‌دهنده‌ی ABI باشد که کد فعلی از آن استفاده می‌کند (همان‌طور که توسط :c:macro:`PyABIInfo_VAR` تعریف شده است، برای مثال)، استفاده از هر API C دیگری از پایتون ممکن است منجر به فروپاشی شود. به‌ویژه، بررسی استثنای ایجادشده ایمن نیست." + +msgid "Define a static :c:struct:`PyABIInfo` variable with the given *NAME* that describes the ABI that the current code will use. This macro expands to:" +msgstr "یک متغیر استاتیک :c:struct:`PyABIInfo` با نام *NAME* داده‌شده تعریف کنید که ABI مورد استفاده‌ی کد فعلی را توصیف می‌کند. این کلان‌دستور به شکل زیر باز می‌شود:" -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 does not break the Stable ABI. This is the case with Windows and macOS releases from ``python.org`` and many third-party distributors." -msgstr "مسئولیت هر توزیع‌کننده‌ی خاص پایتون این است که اطمینان حاصل کند تمام نسخه‌های پایتون روی یک پلتفرم خاص به گونه‌ای ساخته می‌شوند که ABI پایدار را نشکنند. این موضوع درباره‌ی نسخه‌های ویندوز و macOS از ``python.org`` و بسیاری از توزیع‌کنندگان شخص ثالث صادق است." +msgid "" +"static PyABIInfo NAME = {\n" +" 1, 0,\n" +" PyABIInfo_DEFAULT_FLAGS,\n" +" PY_VERSION_HEX,\n" +" PyABIInfo_DEFAULT_ABI_VERSION\n" +"}" +msgstr "" +"static PyABIInfo NAME = {\n" +" 1, 0,\n" +" PyABIInfo_DEFAULT_FLAGS,\n" +" PY_VERSION_HEX,\n" +" PyABIInfo_DEFAULT_ABI_VERSION\n" +"}" + +msgid "The major version of :c:struct:`PyABIInfo`. Can be set to:" +msgstr "نسخه‌ی اصلی :c:struct:`PyABIInfo`. می‌تواند روی موارد زیر تنظیم شود:" + +msgid "``0`` to skip all checking, or" +msgstr "``0`` برای رد کردن تمام بررسی‌ها، یا" + +msgid "``1`` to specify this version of :c:struct:`!PyABIInfo`." +msgstr "``1`` برای مشخص کردن این نسخه از :c:struct:`!PyABIInfo`." + +msgid "The minor version of :c:struct:`PyABIInfo`. Must be set to ``0``; larger values are reserved for backwards-compatible future versions of :c:struct:`!PyABIInfo`." +msgstr "نسخه‌ی فرعی :c:struct:`PyABIInfo`. باید روی ``0`` تنظیم شود؛ مقادیر بزرگ‌تر برای نسخه‌های آینده‌ی سازگار با عقب :c:struct:`!PyABIInfo` رزرو شده‌اند." + +msgid "This field is usually set to the following macro:" +msgstr "این فیلد معمولاً روی کلان‌دستور زیر تنظیم می‌شود:" + +msgid "Default flags, based on current values of macros such as :c:macro:`Py_LIMITED_API` and :c:macro:`Py_GIL_DISABLED`." +msgstr "پرچم‌های پیش‌فرض، بر اساس مقادیر فعلی کلان‌دستورهایی مانند :c:macro:`Py_LIMITED_API` و :c:macro:`Py_GIL_DISABLED`." + +msgid "Alternately, the field can be set to the following flags, combined by bitwise OR. Unused bits must be set to zero." +msgstr "به‌عنوان جایگزین، این فیلد می‌تواند روی پرچم‌های زیر تنظیم شود که با عملگر بیتی OR ترکیب شده‌اند. بیت‌های استفاده‌نشده باید روی صفر تنظیم شوند." + +msgid "ABI variant -- one of:" +msgstr "نوع ABI -- یکی از موارد زیر:" + +msgid "Specifies that Stable ABI is used." +msgstr "مشخص می‌کند که از ABI پایدار استفاده می‌شود." + +msgid "Specifies ABI specific to a particular build of CPython. Internal use only." +msgstr "ABI مختص یک ساخت خاص از سی‌پایتون را مشخص می‌کند. فقط برای استفاده‌ی داخلی." + +msgid "Free-threading compatibility -- one of:" +msgstr "سازگاری با نخ‌بندی آزاد -- یکی از موارد زیر:" + +msgid "Specifies ABI compatible with :term:`free-threaded builds ` of CPython. (That is, ones compiled with :option:`--disable-gil`; with ``t`` in :py:data:`sys.abiflags`)" +msgstr "ABI سازگار با :term:`ساخت‌های نخ‌آزاد ` سی‌پایتون را مشخص می‌کند (یعنی آن‌هایی که با :option:`--disable-gil` کامپایل شده‌اند؛ با ``t`` در :py:data:`sys.abiflags`)." + +msgid "Specifies ABI compatible with non-free-threaded builds of CPython (ones compiled *without* :option:`--disable-gil`)." +msgstr "ABI سازگار با ساخت‌های غیرنخ‌آزاد سی‌پایتون را مشخص می‌کند (آن‌هایی که *بدون* :option:`--disable-gil` کامپایل شده‌اند)." + +msgid "Specifies ABI compatible with both free-threaded and non-free-threaded builds of CPython, that is, both ``abi3`` and ``abi3t``." +msgstr "ABI سازگار با هر دو ساخت نخ‌آزاد و غیرنخ‌آزاد سی‌پایتون را مشخص می‌کند، یعنی هر دو مقدار ``abi3`` و ``abi3t``." + +msgid "The version of the Python headers used to build the code, in the format used by :c:macro:`PY_VERSION_HEX`." +msgstr "نسخه‌ی سرآیندهای پایتون که برای ساخت کد استفاده شده‌اند، در قالبی که :c:macro:`PY_VERSION_HEX` استفاده می‌کند." + +msgid "This can be set to ``0`` to skip any checks related to this field. This option is meant mainly for projects that do not use the CPython headers directly, and do not emulate a specific version of them." +msgstr "این مقدار را می‌توان روی ``0`` تنظیم کرد تا هرگونه بررسی مربوط به این فیلد رد شود. این گزینه‌ی اصلی برای پروژه‌هایی در نظر گرفته شده است که مستقیماً از سرآیندهای سی‌پایتون استفاده نمی‌کنند و نسخه‌ی خاصی از آن‌ها را شبیه‌سازی نمی‌کنند." + +msgid "The ABI version." +msgstr "نسخه‌ی ABI." + +msgid "For Stable ABI, this field should be the value of :c:macro:`Py_LIMITED_API` or :c:macro:`Py_TARGET_ABI3T`. If both are defined, use the smaller value. (If :c:macro:`Py_LIMITED_API` is ``3``; use :c:expr:`Py_PACK_VERSION(3, 2)` instead of ``3``.)" +msgstr "برای ABI پایدار، این فیلد باید مقدار :c:macro:`Py_LIMITED_API` یا :c:macro:`Py_TARGET_ABI3T` باشد. اگر هر دو تعریف شده باشند، مقدار کوچک‌تر را استفاده کنید. (اگر :c:macro:`Py_LIMITED_API` برابر با ``3`` است؛ به‌جای ``3`` از :c:expr:`Py_PACK_VERSION(3, 2)` استفاده کنید.)" + +msgid "Otherwise, it should be set to :c:macro:`PY_VERSION_HEX`." +msgstr "در غیر این صورت، باید روی :c:macro:`PY_VERSION_HEX` تنظیم شود." + +msgid "It can also be set to ``0`` to skip any checks related to this field." +msgstr "همچنین می‌توان آن را روی ``0`` تنظیم کرد تا هرگونه بررسی مربوط به این فیلد رد شود." + +msgid "The value that should be used for this field, based on current values of macros such as :c:macro:`Py_LIMITED_API`, :c:macro:`PY_VERSION_HEX` and :c:macro:`Py_GIL_DISABLED`." +msgstr "مقداری که باید برای این فیلد استفاده شود، بر اساس مقادیر فعلی کلان‌دستورهایی مانند :c:macro:`Py_LIMITED_API`، :c:macro:`PY_VERSION_HEX` و :c:macro:`Py_GIL_DISABLED`." msgid "Contents of Limited API" msgstr "محتویات API محدود" -msgid "Currently, the :ref:`Limited API ` includes the following items:" -msgstr "در حال حاضر، :ref:`API محدود ` شامل موارد زیر است:" +msgid "This is the definitive list of :ref:`Limited API ` for Python |version|:" +msgstr "این فهرست قطعی :ref:`Limited API ` برای پایتون |version| است:" msgid "PyUnstable" msgstr "PyUnstable" + +#~ msgid "Limited C API" +#~ msgstr "C API محدود" + +#~ 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 on multiple versions of Python. Contents of the Limited API are :ref:`listed below `." +#~ msgstr "پایتون 3.2 *API محدود* را معرفی کرد، زیرمجموعه‌ای از C API پایتون. ماژول‌های توسعه‌ای که فقط از API محدود استفاده می‌کنند، می‌توانند یک‌بار کامپایل شوند و روی نسخه‌های متعدد پایتون بارگذاری شوند. محتوای API محدود :ref:`در ادامه فهرست شده‌اند `." + +#~ 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 "این ماکرو را پیش از گنجاندن ``Python.h`` تعریف کنید تا فقط از API محدود استفاده کنید و نسخه‌ی API محدود را انتخاب کنید." + +#~ msgid "Define ``Py_LIMITED_API`` to the value of :c:macro:`PY_VERSION_HEX` corresponding to the lowest Python version your extension supports. The extension will be ABI-compatible with all Python 3 releases from the specified one onward, and can use Limited API introduced up to that version." +#~ msgstr "``Py_LIMITED_API`` را برابر با مقدار :c:macro:`PY_VERSION_HEX` مربوط به کمترین نسخه‌ی پایتونی که ماژول توسعه‌ای شما از آن پشتیبانی می‌کند، تعریف کنید. ماژول توسعه‌ای از نظر ABI با تمام نسخه‌های پایتون 3 از نسخه‌ی مشخص‌شده به بعد سازگار خواهد بود و می‌تواند از API محدودی که تا آن نسخه معرفی شده است استفاده کند." + +#~ 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 "به‌جای استفاده‌ی مستقیم از ماکروی ``PY_VERSION_HEX``، برای پایداری هنگام کامپایل با نسخه‌های آینده‌ی پایتون، یک حداقل نسخه‌ی فرعی (مثلاً ``0x030A0000`` برای پایتون 3.10) را به‌صورت هاردکد (hardcode) در کد بنویسید." + +#~ msgid "To enable this, Python provides a *Stable ABI*: a set of symbols that will remain ABI-compatible across Python 3.x versions." +#~ msgstr "برای فعال‌سازی این، پایتون یک *ABI پایدار* فراهم می‌کند: مجموعه‌ای از نمادها که در تمام نسخه‌های Python 3.x از نظر ABI سازگار باقی خواهند ماند." + +#~ 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 "ABI پایدار شامل نمادهایی است که در :ref:`API محدود ` افشا شده‌اند، اما نمادهای دیگری را نیز در بر می‌گیرد – برای مثال، توابعی که برای پشتیبانی از نسخه‌های قدیمی‌ترِ API محدود ضروری‌اند." + +#~ 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 extensions conform to a Stable ABI. The user (or their packaging tools) need to ensure that, for example, extensions built with the 3.10+ Limited API are not installed for lower versions of Python." +#~ msgstr "در برخی پلتفرم‌ها، پایتون به دنبال پرونده‌های کتابخانه اشتراکی‌ای که با برچسب ``abi3`` نام‌گذاری شده‌اند می‌گردد و آن‌ها را بارگذاری می‌کند (برای مثال، ``mymodule.abi3.so``). پایتون بررسی نمی‌کند که آیا این‌گونه ماژول‌های توسعه‌ای با ABI پایدار مطابقت دارند یا خیر. کاربر (یا ابزارهای بسته‌بندی او) باید اطمینان حاصل کنند که مثلاً ماژول‌های توسعه‌ای ساخته‌شده با API محدودِ 3.10+ برای نسخه‌های پایین‌تر پایتون نصب نمی‌شوند." + +#~ 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 performance for that Python version, but will limit compatibility. Compiling with ``Py_LIMITED_API`` will then yield an extension that can be distributed where a version-specific one is not available – for example, for prereleases of an upcoming Python version." +#~ msgstr "با تعریف ن کردن ``Py_LIMITED_API``، می‌توان یک افزونه‌ی API محدود را با ABI مخصوص نسخه کامپایل کرد. این کار می‌تواند کارایی را برای آن نسخه از پایتون بهبود بخشد، اما سازگاری را محدود خواهد کرد. در مقابل، کامپایل کردن با ``Py_LIMITED_API`` افزونه‌ای به دست می‌دهد که می‌توان آن را در جایی که افزونه‌ی مخصوص نسخه در دسترس نیست، توزیع کرد – برای مثال، برای نسخه‌های پیش‌انتشار یک نسخه‌ی آتی از پایتون." + +#~ msgid "Limited API Caveats" +#~ msgstr "هشدارهای API محدود" + +#~ msgid "Note that compiling with ``Py_LIMITED_API`` is *not* a complete guarantee that code conforms to the :ref:`Limited API ` or the :ref:`Stable ABI `. ``Py_LIMITED_API`` only covers definitions, but an API also includes other issues, such as expected semantics." +#~ msgstr "توجه داشته باشید که کامپایل با ``Py_LIMITED_API`` تضمین کاملی *نیست* که کد با :ref:`API محدود ` یا :ref:`ABI پایدار ` مطابقت داشته باشد. ``Py_LIMITED_API`` تنها تعاریف را پوشش می‌دهد، اما یک API همچنین شامل مسائل دیگری مانند معناشناسی مورد انتظار است." + +#~ 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 "مشکل دیگر این است که برخی از فیلدهای ساختار هنگامی که ``Py_LIMITED_API`` تعریف شده باشد، در حال حاضر پنهان نمی‌شوند، هرچند که بخشی از API محدود به شمار می‌روند." diff --git a/c-api/structures.po b/c-api/structures.po index 4e4d0474..50847e40 100644 --- a/c-api/structures.po +++ b/c-api/structures.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 00:50+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -41,6 +42,9 @@ msgstr "همه‌ی نوع‌های شیء توسعه‌هایی از این ن msgid "The members must not be accessed directly; instead use macros such as :c:macro:`Py_REFCNT` and :c:macro:`Py_TYPE`." msgstr "اعضا نباید به‌طور مستقیم مورد دسترسی قرار گیرند؛ در عوض از ماکروهایی مانند :c:macro:`Py_REFCNT` و :c:macro:`Py_TYPE` استفاده کنید." +msgid "In the :ref:`Stable ABI ` for Free-Threaded Builds (``abi3t``), this struct is opaque; its size and layout may change between Python versions. In Stable ABI for non-free-threaded builds (``abi3``), the :c:member:`!ob_refcnt` and :c:member:`!ob_type` fields are available, but using them directly is discouraged." +msgstr "در :ref:`ABI پایدار ` برای ساخت‌های نخ‌آزاد (``abi3t``)، این struct کدر است؛ اندازه و چیدمان آن ممکن است بین نسخه‌های پایتون تغییر کند. در ABI پایدار برای ساخت‌های غیرنخ‌آزاد (``abi3``)، فیلدهای :c:member:`!ob_refcnt` و :c:member:`!ob_type` در دسترس هستند، اما استفاده‌ی مستقیم از آن‌ها توصیه نمی‌شود." + msgid "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:macro:`Py_REFCNT` برگردانده می‌شود. از این فیلد مستقیماً استفاده نکنید؛ در عوض از توابع و ماکروهایی مانند :c:macro:`!Py_REFCNT`، :c:func:`Py_INCREF` و :c:func:`Py_DecRef` استفاده کنید." @@ -50,12 +54,24 @@ msgstr "نوع فیلد ممکن است بسته به پیکربندی ساخت 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:macro:`Py_TYPE` و :c:func:`Py_SET_TYPE` استفاده کنید." +msgid "A :ref:`per-object lock `, present only in the :term:`free-threaded ` build (when :c:macro:`Py_GIL_DISABLED` is defined)." +msgstr "یک :ref:`قفل به ازای شیء `، که فقط در ساخت :term:`نخ‌آزاد ` (هنگامی که :c:macro:`Py_GIL_DISABLED` تعریف شده باشد) وجود دارد." + +msgid "This field is **reserved for use by the critical section API** (:c:macro:`Py_BEGIN_CRITICAL_SECTION` / :c:macro:`Py_END_CRITICAL_SECTION`). Do **not** lock it directly with ``PyMutex_Lock``; doing so can cause deadlocks. If you need your own lock, add a separate :c:type:`PyMutex` field to your object struct." +msgstr "این فیلد **برای استفاده توسط API بخش بحرانی** (:c:macro:`Py_BEGIN_CRITICAL_SECTION` / :c:macro:`Py_END_CRITICAL_SECTION`) **رزرو شده است**. آن را مستقیماً با ``PyMutex_Lock`` قفل **نکنید**؛ انجام این کار می‌تواند باعث بن‌بست شود. اگر به قفل خودتان نیاز دارید، یک فیلد جداگانه‌ی :c:type:`PyMutex` به struct شیء خود اضافه کنید." + 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:type:`PyObject` که فیلد :c:member:`~PyVarObject.ob_size` را به آن می‌افزاید. این برای شیءهایی در نظر گرفته شده است که نوعی مفهوم از *طول* دارند." 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:type:`!PyObject` صادق است، نباید به اعضا مستقیماً دسترسی داشته باشید؛ در عوض از ماکروهایی مانند :c:macro:`Py_SIZE`، :c:macro:`Py_REFCNT` و :c:macro:`Py_TYPE` استفاده کنید." +msgid "In the :ref:`Stable ABI ` for Free-Threaded Builds (``abi3t``), this struct is opaque; its size and layout may change between Python versions. In Stable ABI for non-free-threaded builds (``abi3``), the :c:member:`!ob_base` and :c:member:`!ob_size` fields are available, but using them directly is discouraged." +msgstr "در :ref:`ABI پایدار ` برای ساخت‌های نخ‌آزاد (``abi3t``)، این struct کدر است؛ اندازه و چیدمان آن ممکن است بین نسخه‌های پایتون تغییر کند. در ABI پایدار برای ساخت‌های غیرنخ‌آزاد (``abi3``)، فیلدهای :c:member:`!ob_base` و :c:member:`!ob_size` در دسترس هستند، اما استفاده‌ی مستقیم از آن‌ها توصیه نمی‌شود." + +msgid "Common object header. Typically, this field is not accessed directly; instead :c:type:`!PyVarObject` can be cast to :c:type:`PyObject`." +msgstr "سرآیند مشترک شیء. معمولاً این فیلد مستقیماً فراخوانی نمی‌شود؛ در عوض می‌توانید :c:type:`!PyVarObject` را به :c:type:`PyObject` تبدیل نوع کنید." + msgid "A size field, whose contents should be considered an object's internal implementation detail." msgstr "فیلد اندازه، که محتوای آن باید به‌عنوان جزئیات داخلی پیاده‌سازی یک شیء در نظر گرفته شود." @@ -230,6 +246,9 @@ msgstr "ساختاری که برای توصیف متد یک نوع توسعه‌ msgid "Name of the method." msgstr "نام متد." +msgid "A ``NULL`` *ml_name* marks the end of a :c:type:`!PyMethodDef` array." +msgstr "یک مقدار ``NULL`` در *ml_name* پایان یک آرایه‌ی :c:type:`!PyMethodDef` را مشخص می‌کند." + msgid "Pointer to the C implementation." msgstr "اشاره‌گر به پیاده‌سازی C." diff --git a/c-api/subinterpreters.po b/c-api/subinterpreters.po index 3135159e..12e3ac58 100644 --- a/c-api/subinterpreters.po +++ b/c-api/subinterpreters.po @@ -5,12 +5,13 @@ # # Translators: # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 20:17+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: none\n" @@ -234,6 +235,15 @@ msgstr "به :pep:`523` «افزودن یک API ارزیابی فریم به س msgid "Set the frame evaluation function." msgstr "تابع ارزیابی فریم را تنظیم می‌کند." +msgid "Enables or disables specialization why a custom frame evaluator is in place." +msgstr "فعال‌سازی یا غیرفعال‌سازی تخصصی‌سازی هنگامی که یک ارزیاب قاب سفارشی فعال است." + +msgid "If *allow_specialization* is non-zero, the adaptive specializer will continue to specialize bytecodes even though a custom eval frame function is set. When *allow_specialization* is zero, setting a custom eval frame disables specialization. The standard interpreter loop will continue to deopt while a frame evaluation API is in place - the frame evaluation function needs to handle the specialized opcodes to take advantage of this." +msgstr "اگر *allow_specialization* غیرصفر باشد، تخصیص‌گر تطبیقی به تخصصی‌سازی بایت‌کدها ادامه خواهد داد، حتی اگر یک تابع قاب ارزیابی سفارشی تنظیم شده باشد. وقتی *allow_specialization* صفر باشد، تنظیم یک قاب ارزیابی سفارشی، تخصصی‌سازی را غیرفعال می‌کند. حلقه مفسر استاندارد به خروج از بهینه‌سازی (deopt) در حین فعال بودن یک API ارزیابی قاب ادامه خواهد داد - تابع ارزیابی قاب باید برای بهره‌برداری از این ویژگی، آپ‌کد‌های تخصصی‌سازی‌شده را مدیریت کند." + +msgid "Return non-zero if adaptive specialization is enabled for the interpreter. Specialization is enabled when no custom eval frame function is set, or when one is set with *allow_specialization* enabled." +msgstr "اگر تخصصی‌سازی تطبیقی برای مفسر فعال باشد، مقدار غیرصفر برمی‌گرداند. تخصصی‌سازی زمانی فعال است که هیچ تابع قاب ارزیابی سفارشی تنظیم نشده باشد، یا زمانی که یکی با *allow_specialization* فعال تنظیم شده باشد." + msgid "Low-level APIs" msgstr "API‌های سطح پایین" diff --git a/c-api/synchronization.po b/c-api/synchronization.po index 1bb60949..74e31b02 100644 --- a/c-api/synchronization.po +++ b/c-api/synchronization.po @@ -5,12 +5,13 @@ # # Translators: # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 12:55+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: none\n" @@ -65,9 +66,6 @@ msgstr "بخش‌های بحرانی با تعلیق ضمنی بخش‌های ب msgid "Variants that accept :c:type:`PyMutex` pointers rather than Python objects are also available. Use these variants to start a critical section in a situation where there is no :c:type:`PyObject` -- for example, when working with a C type that does not extend or wrap :c:type:`PyObject` but still needs to call into the C API in a manner that might lead to deadlocks." msgstr "گونه‌هایی نیز موجود هستند که به‌جای اشیاء پایتون، اشاره‌گرهای :c:type:`PyMutex` را می‌پذیرند. از این گونه‌ها برای آغاز یک بخش بحرانی در موقعیتی که :c:type:`PyObject` وجود ندارد استفاده کنید -- برای مثال، هنگام کار با یک نوع C که :c:type:`PyObject` را بسط نمی‌دهد یا دربر نمی‌گیرد، اما همچنان باید به شکلی که ممکن است به بن‌بست منجر شود، در API زبان C فراخوانی انجام دهد." -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 expansions. Note that the sizes and contents of the structures may change in future Python versions." -msgstr "توابع و ساختارهایی که ماکروها از آن‌ها استفاده می‌کنند، برای مواردی که ماکروهای C موجود نیستند، در دسترس قرار گرفته‌اند. از آن‌ها باید فقط مطابق با بسط‌های داده‌شده‌ی ماکروها استفاده شود. توجه داشته باشید که اندازه و محتویات ساختارها ممکن است در نسخه‌های آینده پایتون تغییر کنند." - 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 lock more than one object at once, because the inner critical section may suspend the outer critical sections. This API does not provide a way to lock more than two objects at once." msgstr "عملیاتی که نیاز به قفل کردن دو شیء به‌طور همزمان دارند، باید از :c:macro:`Py_BEGIN_CRITICAL_SECTION2` استفاده کنند. شما *نمی‌توانید* از بخش‌های بحرانی تودرتو برای قفل کردن بیش از یک شیء به‌طور همزمان استفاده کنید، زیرا بخش بحرانی داخلی ممکن است بخش‌های بحرانی خارجی را تعلیق کند. این API راهی برای قفل کردن بیش از دو شیء به‌طور همزمان فراهم نمی‌کند." @@ -99,8 +97,8 @@ msgstr "در مثال بالا، :c:macro:`Py_SETREF` :c:macro:`Py_DECREF` را msgid "Acquires the per-object lock for the object *op* and begins a critical section." msgstr "قفل مخصوص هر شیء را برای شیء *op* به دست می‌آورد و یک بخش بحرانی را آغاز می‌کند." -msgid "In the free-threaded build, this macro expands to::" -msgstr "در ساخت‌ نخ‌آزاد، این ماکرو به صورت زیر بسط می‌یابد::" +msgid "In the free-threaded build, and when building for the :ref:`Stable ABI `, this macro expands to::" +msgstr "در ساخت نخ‌آزاد، و هنگام ساخت برای :ref:`Stable ABI `، این ماکرو به شکل زیر گسترش می‌یابد::" msgid "" "{\n" @@ -117,6 +115,9 @@ msgstr "در ساخت‌ پیش‌فرض، این ماکرو به ``{`` بسط msgid "Locks the mutex *m* and begins a critical section." msgstr "قفل متقابل *m* را قفل می‌کند و یک بخش بحرانی را آغاز می‌کند." +msgid "In the free-threaded build, this macro expands to::" +msgstr "در ساخت‌ نخ‌آزاد، این ماکرو به صورت زیر بسط می‌یابد::" + msgid "" "{\n" " PyCriticalSection _py_cs;\n" @@ -182,12 +183,30 @@ msgstr "" " PyCriticalSection2_End(&_py_cs2);\n" "}" +msgid "Low-level critical section API" +msgstr "API بخش بحرانی سطح پایین" + +msgid "The following functions and structs are exposed for cases where C macros are not available." +msgstr "توابع و structهای زیر برای مواردی که ماکروهای C در دسترس نیستند، ارائه شده‌اند." + +msgid "To be used only as in the macro expansions listed :ref:`earlier in this section `." +msgstr "فقط برای استفاده همانند گسترش‌های ماکرو فهرست‌شده در :ref:`earlier in this section `." + +msgid "In non-:term:`free-threaded ` builds of CPython, these functions do nothing." +msgstr "در نسخه‌های ساخت :term:`نخ‌بندی آزاد ` سی‌پایتون، این توابع هیچ کاری انجام نمی‌دهند." + +msgid "To be used only as in the macro expansions listed :ref:`earlier in this section `. Note that the contents of the structures are private and their meaning may change in future Python versions." +msgstr "فقط برای استفاده همانند گسترش‌های ماکرو فهرست‌شده در :ref:`earlier in this section `. توجه داشته باشید که محتویات ساختارها خصوصی هستند و معنای آن‌ها ممکن است در نسخه‌های آینده‌ی پایتون تغییر کند." + msgid "Legacy locking APIs" msgstr "API‌های قدیمی قفل‌گذاری" msgid "These APIs are obsolete since Python 3.13 with the introduction of :c:type:`PyMutex`." msgstr "این API‌ها با معرفی :c:type:`PyMutex` در پایتون 3.13 منسوخ شده‌اند." +msgid "These APIs are now a simple wrapper around ``PyMutex``." +msgstr "این APIها اکنون یک پوشش ساده در اطراف ``PyMutex`` هستند." + msgid "A pointer to a mutual exclusion lock." msgstr "اشاره‌گری به قفل متقابل." @@ -212,6 +231,9 @@ msgstr "در صورت موفقیت، این تابع یک قفل برمی‌گر msgid "The caller does not need to hold an :term:`attached thread state`." msgstr "فراخواننده نیازی به در اختیار داشتن :term:`وضعیت نخ متصل ` ندارد." +msgid "This function now always uses :c:type:`PyMutex`. In prior versions, this would use a lock provided by the operating system." +msgstr "این تابع اکنون همیشه از :c:type:`PyMutex` استفاده می‌کند. در نسخه‌های قبلی، این تابع از یک قفل ارائه‌شده توسط سیستم‌عامل استفاده می‌کرد." + msgid "Destroy *lock*. The lock should not be held by any thread when calling this." msgstr "قفل *lock* را از بین می‌برد. هنگام فراخوانی این تابع، قفل نباید در اختیار هیچ نخی باشد." @@ -241,3 +263,6 @@ msgstr "برخلاف :c:func:`PyThread_acquire_lock_timed`، به‌دست‌آ msgid "Release *lock*. If *lock* is not held, then this function issues a fatal error." msgstr "*lock* را آزاد می‌کند. اگر *lock* نگه داشته نشده باشد، این تابع خطای مهلک صادر می‌کند." + +#~ 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 expansions. Note that the sizes and contents of the structures may change in future Python versions." +#~ msgstr "توابع و ساختارهایی که ماکروها از آن‌ها استفاده می‌کنند، برای مواردی که ماکروهای C موجود نیستند، در دسترس قرار گرفته‌اند. از آن‌ها باید فقط مطابق با بسط‌های داده‌شده‌ی ماکروها استفاده شود. توجه داشته باشید که اندازه و محتویات ساختارها ممکن است در نسخه‌های آینده پایتون تغییر کنند." diff --git a/c-api/sys.po b/c-api/sys.po index 12c78296..be5b1eb7 100644 --- a/c-api/sys.po +++ b/c-api/sys.po @@ -6,12 +6,13 @@ # Translators: # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 00:50+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -162,17 +163,41 @@ msgstr "توابع سیستمی" msgid "These are utility functions that make functionality from the :mod:`sys` module accessible to C code. They all work with the current interpreter thread's :mod:`sys` module's dict, which is contained in the internal thread state structure." msgstr "این‌ها توابع کاربردی هستند که کارکردهای ماژول :mod:`sys` را برای کد C در دسترس قرار می‌دهند. همه‌ی آن‌ها با دیکشنری ماژول :mod:`sys` مربوط به نخ فعلی مفسر کار می‌کنند که در ساختار وضعیت داخلی نخ قرار دارد." -msgid "Return the object *name* from the :mod:`sys` module or ``NULL`` if it does not exist, without setting an exception." -msgstr "شیء *name* را از ماژول :mod:`sys` بازمی‌گرداند، یا اگر وجود نداشته باشد ``NULL`` را برمی‌گرداند، بدون تنظیم استثنا." +msgid "Get the attribute *name* of the :mod:`sys` module. Return a :term:`strong reference`. Raise :exc:`RuntimeError` and return ``NULL`` if it does not exist or if the :mod:`sys` module cannot be found." +msgstr "ویژگی *name* ماژول :mod:`sys` را دریافت کنید. یک :term:`ارجاع قوی ` برگردانید. اگر وجود نداشته باشد یا ماژول :mod:`sys` پیدا نشود، استثنای :exc:`RuntimeError` را بالا آورده و ``NULL`` برگردانید." -msgid "Set *name* in the :mod:`sys` module to *v* unless *v* is ``NULL``, in which case *name* is deleted from the sys module. Returns ``0`` on success, ``-1`` on error." -msgstr "*name* را در ماژول :mod:`sys` برابر *v* قرار می‌دهد، مگر اینکه *v* ``NULL`` باشد که در این صورت *name* از ماژول sys حذف می‌شود. در صورت موفقیت ``0`` و در صورت خطا ``-1`` برمی‌گرداند." +msgid "If the non-existing object should not be treated as a failure, you can use :c:func:`PySys_GetOptionalAttr` instead." +msgstr "اگر شیء ناموجود نباید به عنوان یک خطا تلقی شود، می‌توانید به جای آن از :c:func:`PySys_GetOptionalAttr` استفاده کنید." + +msgid "This is the same as :c:func:`PySys_GetAttr`, but *name* is specified as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:`PyObject*`." +msgstr "این تابع مشابه :c:func:`PySys_GetAttr` است، اما *name* به جای :c:expr:`PyObject*`، به عنوان یک رشته‌ی بایت رمزگذاری‌شده با UTF-8 از نوع :c:expr:`const char*` مشخص می‌شود." + +msgid "If the non-existing object should not be treated as a failure, you can use :c:func:`PySys_GetOptionalAttrString` instead." +msgstr "اگر شیء ناموجود نباید به عنوان یک خطا تلقی شود، می‌توانید به جای آن از :c:func:`PySys_GetOptionalAttrString` استفاده کنید." + +msgid "Variant of :c:func:`PySys_GetAttr` which doesn't raise exception if the object does not exist." +msgstr "نوع دیگری از :c:func:`PySys_GetAttr` که اگر شیء وجود نداشته باشد، استثنایی بالا نمی‌آورد." + +msgid "Set *\\*result* to a new :term:`strong reference` to the object and return ``1`` if the object exists." +msgstr "اگر شیء وجود داشته باشد، *\\*result* را به یک :term:`ارجاع قوی ` جدید به شیء تنظیم کرده و ``1`` برگردانید." + +msgid "Set *\\*result* to ``NULL`` and return ``0`` without setting an exception if the object does not exist." +msgstr "اگر شیء وجود نداشته باشد، *\\*result* را روی ``NULL`` تنظیم کرده و بدون تنظیم هیچ استثنایی، ``0`` برگردانید." + +msgid "Set an exception, set *\\*result* to ``NULL``, and return ``-1``, if an error occurred." +msgstr "اگر خطایی رخ دهد، یک استثنا تنظیم کنید، *\\*result* را روی ``NULL`` قرار دهید و ``-1`` برگردانید." -msgid "Reset :data:`sys.warnoptions` to an empty list. This function may be called prior to :c:func:`Py_Initialize`." -msgstr "بازنشانی :data:`sys.warnoptions` به یک فهرست خالی. این تابع می‌تواند پیش از :c:func:`Py_Initialize` فراخوانی شود." +msgid "This is the same as :c:func:`PySys_GetOptionalAttr`, but *name* is specified as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:`PyObject*`." +msgstr "این تابع مشابه :c:func:`PySys_GetOptionalAttr` است، اما *name* به جای :c:expr:`PyObject*`، به عنوان یک رشته‌ی بایت رمزگذاری‌شده با UTF-8 از نوع :c:expr:`const char*` مشخص می‌شود." -msgid "Clear :data:`sys.warnoptions` and :data:`!warnings.filters` instead." -msgstr "به جای آن، :data:`sys.warnoptions` و :data:`!warnings.filters` را پاک کنید." +msgid "Similar to :c:func:`PySys_GetAttrString`, but return a :term:`borrowed reference` and return ``NULL`` *without* setting exception on failure." +msgstr "مشابه :c:func:`PySys_GetAttrString` است، اما یک :term:`ارجاع امانتی ` برمی‌گرداند و در صورت بروز خطا، *بدون* تنظیم استثنا، ``NULL`` برمی‌گرداند." + +msgid "Preserves exception that was set before the call." +msgstr "استثنایی را که قبل از فراخوانی تنظیم شده بود، حفظ می‌کند." + +msgid "Set *name* in the :mod:`sys` module to *v* unless *v* is ``NULL``, in which case *name* is deleted from the sys module. Returns ``0`` on success, ``-1`` on error." +msgstr "*name* را در ماژول :mod:`sys` برابر *v* قرار می‌دهد، مگر اینکه *v* ``NULL`` باشد که در این صورت *name* از ماژول sys حذف می‌شود. در صورت موفقیت ``0`` و در صورت خطا ``-1`` برمی‌گرداند." msgid "Write the output string described by *format* to :data:`sys.stdout`. No exceptions are raised, even if truncation occurs (see below)." msgstr "رشته خروجی توصیف‌شده توسط *format* را در :data:`sys.stdout` می‌نویسد. هیچ استثنایی به‌وجود نمی‌آید، حتی اگر اسلایس رخ دهد (در ادامه ببینید)." @@ -281,3 +306,12 @@ msgstr "exit (تابع C)" msgid "cleanup functions" msgstr "توابع پاک‌سازی" + +#~ msgid "Return the object *name* from the :mod:`sys` module or ``NULL`` if it does not exist, without setting an exception." +#~ msgstr "شیء *name* را از ماژول :mod:`sys` بازمی‌گرداند، یا اگر وجود نداشته باشد ``NULL`` را برمی‌گرداند، بدون تنظیم استثنا." + +#~ msgid "Reset :data:`sys.warnoptions` to an empty list. This function may be called prior to :c:func:`Py_Initialize`." +#~ msgstr "بازنشانی :data:`sys.warnoptions` به یک فهرست خالی. این تابع می‌تواند پیش از :c:func:`Py_Initialize` فراخوانی شود." + +#~ msgid "Clear :data:`sys.warnoptions` and :data:`!warnings.filters` instead." +#~ msgstr "به جای آن، :data:`sys.warnoptions` و :data:`!warnings.filters` را پاک کنید." diff --git a/c-api/threads.po b/c-api/threads.po index e1a568d2..d37f743a 100644 --- a/c-api/threads.po +++ b/c-api/threads.po @@ -5,19 +5,21 @@ # # Translators: # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" -"PO-Revision-Date: 2026-07-25 12:59+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 20:44+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: none\n" "Language: fa\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.6\n" msgid "Thread states and the global interpreter lock" msgstr "وضعیت‌های نخ و قفل مفسر سراسری" @@ -46,8 +48,8 @@ msgstr "حتی در ساخت‌ نخ‌آزاد، پیوست کردن وضعیت msgid "Generally, there will always be an attached thread state when using Python's C API, including during embedding and when implementing methods, so it's uncommon to need to set up a thread state on your own. Only in some specific cases, such as in a :c:macro:`Py_BEGIN_ALLOW_THREADS` block or in a fresh thread, will the thread not have an attached thread state. If uncertain, check if :c:func:`PyThreadState_GetUnchecked` returns ``NULL``." msgstr "به‌طور کلی، هنگام استفاده از API زبان C پایتون، همیشه یک وضعیت نخ متصل وجود خواهد داشت، از جمله در حین تعبیه و هنگام پیاده‌سازی متدها؛ بنابراین به‌ندرت پیش می‌آید که لازم باشد خودتان وضعیت نخ ایجاد کنید. تنها در برخی موارد خاص، مانند داخل بلوک :c:macro:`Py_BEGIN_ALLOW_THREADS` یا در یک نخ تازه، نخ وضعیت نخ متصل نخواهد داشت. اگر مطمئن نیستید، بررسی کنید که آیا :c:func:`PyThreadState_GetUnchecked` مقدار ``NULL`` برمی‌گرداند یا خیر." -msgid "If it turns out that you do need to create a thread state, call :c:func:`PyThreadState_New` followed by :c:func:`PyThreadState_Swap`, or use the dangerous :c:func:`PyGILState_Ensure` function." -msgstr "اگر معلوم شد که واقعاً به ایجاد وضعیت نخ نیاز دارید، :c:func:`PyThreadState_New` و سپس :c:func:`PyThreadState_Swap` را فراخوانی کنید، یا از تابع خطرناک :c:func:`PyGILState_Ensure` استفاده کنید." +msgid "If it turns out that you do need to create a thread state, it is recommended to use :c:func:`PyThreadState_Ensure` or :c:func:`PyThreadState_EnsureFromView`, which will manage the thread state for you." +msgstr "اگر مشخص شد که واقعاً به ایجاد یک وضعیت نخ نیاز دارید، توصیه می‌شود از :c:func:`PyThreadState_Ensure` یا :c:func:`PyThreadState_EnsureFromView` استفاده کنید، که وضعیت نخ را برای شما مدیریت خواهند کرد." msgid "Detaching the thread state from extension code" msgstr "جدا کردن وضعیت نخ از کد توسعه‌ای" @@ -134,8 +136,8 @@ msgstr "این ماکرو به ``PyEval_RestoreThread(_save);`` بسط می‌ی 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 "این ماکرو به ``_save = PyEval_SaveThread();`` بسط می‌یابد: معادل :c:macro:`Py_BEGIN_ALLOW_THREADS` بدون آکولاد باز و اعلان متغیر است." -msgid "Non-Python created threads" -msgstr "نخ‌های ایجادشده خارج از پایتون" +msgid "Using the C API from foreign threads" +msgstr "استفاده از API زبان C از نخ‌های خارجی" msgid "When threads are created using the dedicated Python APIs (such as the :mod:`threading` module), a thread state is automatically associated with them, However, when a thread is created from native code (for example, by a third-party library with its own thread management), it doesn't hold an attached thread state." msgstr "وقتی نخ‌ها با استفاده از APIهای اختصاصی پایتون (مانند ماژول :mod:`threading`) ایجاد می‌شوند، یک وضعیت نخ به‌طور خودکار با آن‌ها مرتبط می‌شود؛ با این حال، وقتی یک نخ از کد بومی ایجاد شود (برای مثال، توسط یک کتابخانه شخص ثالث با مدیریت نخ اختصاصی خودش)، وضعیت نخ متصل‌شده‌ای ندارد." @@ -143,92 +145,241 @@ msgstr "وقتی نخ‌ها با استفاده از APIهای اختصاصی 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 must first register these threads with the interpreter by creating a new thread state and attaching it." msgstr "اگر لازم باشد کد پایتون را از این نخ‌ها فراخوانی کنید (اغلب این کار بخشی از یک API کال‌بک ارائه‌شده توسط کتابخانه شخص ثالث مذکور خواهد بود)، باید ابتدا با ایجاد یک وضعیت نخ جدید و پیوست دادن آن، این نخ‌ها را در مفسر ثبت کنید." -msgid "The most robust way to do this is through :c:func:`PyThreadState_New` followed by :c:func:`PyThreadState_Swap`." -msgstr "مقاوم‌ترین راه انجام این کار، استفاده از :c:func:`PyThreadState_New` و سپس :c:func:`PyThreadState_Swap` است." +msgid "The easiest way to do this is through :c:func:`PyThreadState_Ensure` or :c:func:`PyThreadState_EnsureFromView`." +msgstr "ساده‌ترین راه برای انجام این کار استفاده از :c:func:`PyThreadState_Ensure` یا :c:func:`PyThreadState_EnsureFromView` است." -msgid "``PyThreadState_New`` requires an argument pointing to the desired interpreter; such a pointer can be acquired via a call to :c:func:`PyInterpreterState_Get` from the code where the thread was created." -msgstr "``PyThreadState_New`` به آرگومانی نیاز دارد که به مفسر موردنظر اشاره کند؛ چنین اشاره‌گری را می‌توان از طریق فراخوانی :c:func:`PyInterpreterState_Get` در کدی که نخ در آن ایجاد شده است، به دست آورد." +msgid "These functions require an argument pointing to the desired interpreter; such a pointer can be acquired via a call to :c:func:`PyInterpreterGuard_FromCurrent` (for ``PyThreadState_Ensure``) or :c:func:`PyInterpreterView_FromCurrent` (for ``PyThreadState_EnsureFromView``) from the function that creates the thread. If no pointer is available (such as when the given native thread library doesn't provide a data argument), :c:func:`PyInterpreterView_FromMain` can be used to get a view for the main interpreter, but note that this will make the code incompatible with subinterpreters." +msgstr "این تابع‌ها به آرگومانی نیاز دارند که به مفسر مورد نظر اشاره کند؛ چنین اشاره‌گری را می‌توان از طریق فراخوانی :c:func:`PyInterpreterGuard_FromCurrent` (برای ``PyThreadState_Ensure``) یا :c:func:`PyInterpreterView_FromCurrent` (برای ``PyThreadState_EnsureFromView``) از تابعی که نخ را ایجاد می‌کند، به‌دست آورد. اگر هیچ اشاره‌گری در دسترس نباشد (مانند زمانی که کتابخانه‌ی نخ بومیِ داده‌شده آرگومان داده‌ای فراهم نمی‌کند)، می‌توانید از :c:func:`PyInterpreterView_FromMain` برای دریافت یک نما برای مفسر اصلی استفاده کنید، اما توجه داشته باشید که این کار کد را با زیرمفسرها ناسازگار می‌کند." msgid "For example::" msgstr "برای مثال::" msgid "" -"/* The return value of PyInterpreterState_Get() from the\n" -" function that created this thread. */\n" -"PyInterpreterState *interp = thread_data->interp;\n" +"// The return value of PyInterpreterGuard_FromCurrent() from the\n" +"// function that created this thread.\n" +"PyInterpreterGuard *guard = thread_data->guard;\n" "\n" -"/* Create a new thread state for the interpreter. It does not start out\n" -" attached. */\n" -"PyThreadState *tstate = PyThreadState_New(interp);\n" +"// Create a new thread state for the interpreter.\n" +"PyThreadStateToken *token = PyThreadState_Ensure(guard);\n" +"if (token == NULL) {\n" +" PyInterpreterGuard_Close(guard);\n" +" return;\n" +"}\n" "\n" -"/* Attach the thread state, which will acquire the GIL. */\n" -"PyThreadState_Swap(tstate);\n" -"\n" -"/* Perform Python actions here. */\n" +"// We have a valid thread state -- perform Python actions here.\n" "result = CallSomeFunction();\n" -"/* evaluate result or handle exception */\n" +"// Evaluate result or handle exceptions.\n" "\n" -"/* Destroy the thread state. No Python API allowed beyond this point. */\n" -"PyThreadState_Clear(tstate);\n" -"PyThreadState_DeleteCurrent();" +"// Release the thread state. No calls to the C API are allowed beyond this\n" +"// point.\n" +"PyThreadState_Release(token);\n" +"PyInterpreterGuard_Close(guard);" msgstr "" -"/* مقدار بازگشتی PyInterpreterState_Get() از تابعی که\n" -" این نخ را ایجاد کرده است. */\n" -"PyInterpreterState *interp = thread_data->interp;\n" +"// The return value of PyInterpreterGuard_FromCurrent() from the\n" +"// function that created this thread.\n" +"PyInterpreterGuard *guard = thread_data->guard;\n" "\n" -"/* ایجاد یک وضعیت نخ جدید برای مفسر. این وضعیت در ابتدا\n" -" متصل نیست. */\n" -"PyThreadState *tstate = PyThreadState_New(interp);\n" +"// Create a new thread state for the interpreter.\n" +"PyThreadStateToken *token = PyThreadState_Ensure(guard);\n" +"if (token == NULL) {\n" +" PyInterpreterGuard_Close(guard);\n" +" return;\n" +"}\n" "\n" -"/* اتصال وضعیت نخ، که قفل مفسر سراسری را به دست خواهد آورد. */\n" -"PyThreadState_Swap(tstate);\n" -"\n" -"/* اینجا کنش‌های پایتون را انجام دهید. */\n" +"// We have a valid thread state -- perform Python actions here.\n" "result = CallSomeFunction();\n" -"/* ارزیابی نتیجه یا مدیریت استثنا */\n" +"// Evaluate result or handle exceptions.\n" "\n" -"/* تخریب وضعیت نخ. پس از این نقطه هیچ API پایتونی مجاز نیست. */\n" -"PyThreadState_Clear(tstate);\n" -"PyThreadState_DeleteCurrent();" +"// Release the thread state. No calls to the C API are allowed beyond this\n" +"// point.\n" +"PyThreadState_Release(token);\n" +"PyInterpreterGuard_Close(guard);" + +msgid "Keep in mind that calling ``PyThreadState_Ensure`` might not always create a new thread state, and calling ``PyThreadState_Release`` might not always detach it. These functions may reuse an existing attached thread state, or may re-attach a thread state that was previously attached for the current thread." +msgstr "به خاطر داشته باشید که فراخوانی ``PyThreadState_Ensure`` ممکن است همیشه یک وضعیت نخ جدید ایجاد نکند و فراخوانی ``PyThreadState_Release`` ممکن است همیشه آن را جدا نکند. این تابع‌ها ممکن است یک وضعیت نخ متصلِ موجود را دوباره استفاده کنند، یا وضعیت نخی را که قبلاً برای نخ فعلی متصل شده بود، دوباره متصل کنند." -msgid "If the interpreter finalized before ``PyThreadState_Swap`` was called, then ``interp`` will be a dangling pointer!" -msgstr "اگر مفسر پیش از فراخوانی ``PyThreadState_Swap`` نهایی‌سازی شده باشد، آنگاه ``interp`` یک اشاره‌گر معلق (dangling pointer) خواهد بود!" +msgid ":pep:`788`" +msgstr ":pep:`788`" -msgid "Legacy API" -msgstr "API قدیمی" +msgid "Reusing a thread state across repeated calls" +msgstr "استفاده‌ی مجدد از وضعیت نخ در فراخوانی‌های مکرر" -msgid "Another common pattern to call Python code from a non-Python thread is to use :c:func:`PyGILState_Ensure` followed by a call to :c:func:`PyGILState_Release`." -msgstr "الگوی رایج دیگر برای فراخوانی کد پایتون از یک نخ غیرپایتونی، استفاده از :c:func:`PyGILState_Ensure` و سپس فراخوانی :c:func:`PyGILState_Release` است." +msgid "Creating and destroying a :c:type:`PyThreadState` is not free, and is more expensive on a :term:`free-threaded build`. A foreign thread that calls into the interpreter many times -- for example, a worker thread in a native thread pool -- should avoid creating a fresh thread state on every entry and destroying it on every exit. Instead, set up one thread state when the thread starts (or lazily on its first call into Python), attach and detach it around each call, and tear it down once when the thread exits." +msgstr "ایجاد و نابود کردن یک :c:type:`PyThreadState` رایگان نیست و در یک :term:`ساخت نخ‌آزاد ` هزینه‌ی بیشتری دارد. یک نخ خارجی که بارها مفسر را فراخوانی می‌کند -- برای مثال، یک نخ کارگر در یک استخر نخ بومی -- باید از ایجاد وضعیت نخ جدید در هر بار ورود و نابود کردن آن در هر بار خروج خودداری کند. در عوض، هنگامی که نخ شروع به کار می‌کند (یا به صورت تنبل در اولین فراخوانی‌اش به پایتون)، یک وضعیت نخ را راه‌اندازی کنید، آن را در اطراف هر فراخوانی متصل و جدا کنید، و هنگامی که نخ خارج می‌شود، آن را یک بار از بین ببرید." -msgid "These functions do not work well when multiple interpreters exist in the Python process. If no Python interpreter has ever been used in the current thread (which is common for threads created outside Python), ``PyGILState_Ensure`` will create and attach a thread state for the \"main\" interpreter (the first interpreter in the Python process)." -msgstr "این توابع زمانی که چندین مفسر در فرایند پایتون وجود داشته باشند، به‌خوبی کار نمی‌کنند. اگر تاکنون هیچ مفسر پایتونی در نخ فعلی استفاده نشده باشد (که این امر برای نخ‌هایی که خارج از پایتون ایجاد شده‌اند رایج است)، ``PyGILState_Ensure`` یک وضعیت نخ برای مفسر «اصلی» (اولین مفسر در فرایند پایتون) ایجاد و پیوست می‌دهد." +msgid "Manage the thread state explicitly with :c:func:`PyThreadState_New`, attaching and detaching it with :c:func:`PyEval_RestoreThread` and :c:func:`PyEval_SaveThread`. This happens in three distinct phases, at different points in the thread's life." +msgstr "وضعیت نخ را به صراحت با :c:func:`PyThreadState_New` مدیریت کنید و آن را با :c:func:`PyEval_RestoreThread` و :c:func:`PyEval_SaveThread` متصل و جدا کنید. این کار در سه مرحله‌ی مجزا، در نقاط مختلفی از چرخه‌ی حیات نخ رخ می‌دهد." -msgid "Additionally, these functions have thread-safety issues during interpreter finalization. Using ``PyGILState_Ensure`` during finalization will likely crash the process." -msgstr "علاوه بر این، این توابع در حین نهایی‌سازی مفسر دارای مشکلات نخ‌ایمنی هستند. استفاده از ``PyGILState_Ensure`` در حین نهایی‌سازی به احتمال زیاد باعث فروپاشی فرایند می‌شود." +msgid "When the thread starts, create one thread state for it. ``interp`` is the target interpreter, captured by the code that created this thread while it held an attached thread state (for example via :c:func:`PyInterpreterState_Get`)::" +msgstr "هنگامی که نخ شروع به کار می‌کند، یک وضعیت نخ برای آن ایجاد کنید. ``interp`` مفسر هدف است که توسط کدی که این نخ را ایجاد کرده است، در حالی که یک وضعیت نخ متصل را نگه می‌داشت (برای مثال از طریق :c:func:`PyInterpreterState_Get`)، گرفته شده است::" -msgid "Usage of these functions look like such::" -msgstr "استفاده از این توابع به این شکل است::" +msgid "PyThreadState *tstate = PyThreadState_New(interp);" +msgstr "PyThreadState *tstate = PyThreadState_New(interp);" + +msgid "Then, on each call into Python -- which may happen many times over the thread's life -- attach the thread state, make the Python C API calls that require it, and detach again so the thread does not hold the GIL while off doing non-Python work::" +msgstr "سپس، در هر فراخوانی به پایتون -- که ممکن است بارها در طول چرخه‌ی حیات نخ رخ دهد -- وضعیت نخ را متصل کنید، فراخوانی‌های API زبان C پایتون را که به آن نیاز دارند انجام دهید، و دوباره آن را جدا کنید تا نخ در حالی که کارهای غیرپایتونی انجام می‌دهد، GIL را نگه ندارد::" msgid "" -"PyGILState_STATE gstate;\n" -"gstate = PyGILState_Ensure();\n" -"\n" -"/* Perform Python actions here. */\n" -"result = CallSomeFunction();\n" -"/* evaluate result or handle exception */\n" -"\n" -"/* Release the thread. No Python API allowed beyond this point. */\n" -"PyGILState_Release(gstate);" +"PyEval_RestoreThread(tstate);\n" +"result = CallSomeFunction(); /* your Python C API calls go here */\n" +"PyEval_SaveThread();" msgstr "" -"PyGILState_STATE gstate;\n" -"gstate = PyGILState_Ensure();\n" -"\n" -"/* Perform Python actions here. */\n" -"result = CallSomeFunction();\n" -"/* evaluate result or handle exception */\n" -"\n" -"/* Release the thread. No Python API allowed beyond this point. */\n" -"PyGILState_Release(gstate);" +"PyEval_RestoreThread(tstate);\n" +"result = CallSomeFunction(); /* فراخوانی‌های API زبان C پایتون شما در اینجا قرار می‌گیرند */\n" +"PyEval_SaveThread();" + +msgid "When the thread is finished calling into Python, destroy the thread state once::" +msgstr "هنگامی که کار نخ با فراخوانی پایتون به پایان رسید، وضعیت نخ را یک بار نابود کنید::" + +msgid "" +"PyEval_RestoreThread(tstate);\n" +"PyThreadState_Clear(tstate);\n" +"PyThreadState_DeleteCurrent();" +msgstr "" +"PyEval_RestoreThread(tstate);\n" +"PyThreadState_Clear(tstate);\n" +"PyThreadState_DeleteCurrent();" + +msgid "The general-purpose entry points for calling in from a foreign thread -- :c:func:`PyThreadState_Ensure` and the older :c:func:`PyGILState_Ensure` -- do *not* guarantee a persistent thread state: their thread-state lifetime is deliberately implementation-defined, so a matched acquire/release pair may create and destroy a thread state each time. Use :c:func:`PyThreadState_New`, as shown here, whenever you specifically want to reuse one thread state across calls." +msgstr "نقاط ورودی همه‌منظوره برای فراخوانی از یک نخ خارجی -- یعنی :c:func:`PyThreadState_Ensure` و :c:func:`PyGILState_Ensure` قدیمی -- پایداری وضعیت نخ را تضمین *نمی‌کنند*: طول عمر وضعیت نخِ آن‌ها عمدتاً توسط پیاده‌سازی تعریف می‌شود، بنابراین ممکن است یک جفت به‌دست‌آوردن/آزاد کردنِ منطبق، در هر بار یک وضعیت نخ ایجاد و نابود کند. هر زمان که به‌طور خاص می‌خواهید از یک وضعیت نخ در میان فراخوانی‌ها استفاده مجدد کنید، همان‌طور که در اینجا نشان داده شده است، از :c:func:`PyThreadState_New` استفاده کنید." + +msgid "The code that created the foreign thread must arrange for the shutdown sequence to run before the thread exits, and before :c:func:`Py_FinalizeEx` is called. If interpreter finalization begins first, the shutdown :c:func:`PyEval_RestoreThread` call will hang the thread rather than return (see :ref:`cautions-regarding-runtime-finalization`). If the thread exits without running the shutdown sequence, the thread state is leaked for the remainder of the process." +msgstr "کدی که نخ خارجی را ایجاد کرده است باید ترتیبی دهد که دنباله‌ی خاموشی قبل از خروج نخ و قبل از فراخوانی :c:func:`Py_FinalizeEx` اجرا شود. اگر نهایی‌سازی مفسر ابتدا آغاز شود، فراخوانی خاموشی :c:func:`PyEval_RestoreThread` به جای بازگشت، نخ را معلق می‌کند (نگاه کنید به :ref:`cautions-regarding-runtime-finalization`). اگر نخ بدون اجرای دنباله‌ی خاموشی خارج شود، وضعیت نخ برای بقیه روند پردازش نشت می‌کند." + +msgid "Attaching/detaching thread states" +msgstr "اتصال و جداسازی وضعیت‌های نخ" + +msgid "Ensure that the thread has an attached thread state for the interpreter protected by *guard*, and thus can safely invoke that interpreter." +msgstr "اطمینان حاصل کنید که نخ دارای یک وضعیت نخ متصل برای مفسری است که توسط *guard* محافظت می‌شود، و بنابراین می‌تواند با خیال راحت آن مفسر را فراخوانی کند." + +msgid "It is OK to call this function if the thread already has an attached thread state, as long as there is a subsequent call to :c:func:`PyThreadState_Release` that matches this one (meaning that \"nested\" calls to this function are permitted)." +msgstr "اگر نخ از قبل دارای یک وضعیت نخ متصل باشد، فراخوانی این تابع اشکالی ندارد، به شرطی که فراخوانی بعدی برای :c:func:`PyThreadState_Release` وجود داشته باشد که با این یکی مطابقت داشته باشد (به این معنا که فراخوانی‌های «تودرتو» به این تابع مجاز هستند)." + +msgid "The function's effect (if any) will be reversed by the matching call to :c:func:`PyThreadState_Release`." +msgstr "تأثیر تابع (در صورت وجود) توسط فراخوانی منطبق به :c:func:`PyThreadState_Release` معکوس خواهد شد." + +msgid "On error, this function returns ``NULL`` *without* an exception set. Do not call :c:func:`!PyThreadState_Release` in this case." +msgstr "هنگام خطا، این تابع ``NULL`` را *بدون* تنظیم هیچ استثنایی برمی‌گرداند. در این صورت :c:func:`!PyThreadState_Release` را فراخوانی نکنید." + +msgid "On success, this function returns a pointer value that must be passed to the matching call to :c:func:`!PyThreadState_Release`." +msgstr "در صورت موفقیت، این تابع یک مقدار اشاره‌گر بازمی‌گرداند که باید به فراخوانی متناظر در :c:func:`!PyThreadState_Release` پاس داده شود." + +msgid "The conditions in which this function creates a new :term:`thread state` are considered unstable and implementation-dependent. If you need to control the exact lifetime of a thread state, consider using :c:func:`PyThreadState_New`. However, do not avoid this function solely on the basis that the lifetime of the thread state may be inconsistent across versions; changes to this function will be done with caution and in a backwards-compatible manner. In particular, the saving of thread-local variables and similar state will be retained across Python versions." +msgstr "شرایطی که در آن‌ها این تابع یک :term:`وضعیت نخ ` جدید ایجاد می‌کند، ناپایدار و وابسته به پیاده‌سازی در نظر گرفته می‌شوند. اگر نیاز دارید طول عمر دقیق یک وضعیت نخ را کنترل کنید، استفاده از :c:func:`PyThreadState_New` را در نظر بگیرید. با این حال، صرفاً به این دلیل که ممکن است طول عمر وضعیت نخ در نسخه‌های مختلف ناسازگار باشد، از این تابع اجتناب نکنید؛ تغییرات در این تابع با احتیاط و به شیوه‌ای سازگار با گذشته انجام خواهد شد. به‌ویژه، ذخیره‌سازی متغیرهای نخ‌محلی (thread-local) و وضعیت‌های مشابه در نسخه‌های مختلف پایتون حفظ خواهد شد." + +msgid "The exact behavior of whether this function creates a new thread state is described below, but be aware that this may change in the future." +msgstr "رفتار دقیق این که آیا این تابع یک وضعیت نخ جدید ایجاد می‌کند یا خیر، در ادامه شرح داده شده است، اما آگاه باشید که ممکن است در آینده تغییر کند." + +msgid "First, this function checks if an attached thread state is present. If there is, this function then checks if the interpreter of that thread state matches the interpreter guarded by *guard*. If that is the case, this function simply marks the thread state as being used by a ``PyThreadState_Ensure`` call and returns." +msgstr "ابتدا، این تابع بررسی می‌کند که آیا یک وضعیت نخ متصل حضور دارد یا خیر. اگر چنین باشد، این تابع سپس بررسی می‌کند که آیا مفسر آن وضعیت نخ با مفسر محافظت‌شده توسط *guard* مطابقت دارد یا خیر. اگر چنین باشد، این تابع صرفاً وضعیت نخ را به عنوان در حال استفاده توسط یک فراخوانی ``PyThreadState_Ensure`` علامت‌گذاری می‌کند و برمی‌گردد." + +msgid "If there is no attached thread state, then this function checks if any thread state has been used by the current OS thread. (This is returned by :c:func:`PyGILState_GetThisThreadState`.) If there was, then this function checks if that thread state's interpreter matches *guard*. If it does, it is re-attached and marked as used." +msgstr "اگر هیچ وضعیت نخ متصلی وجود نداشته باشد، این تابع بررسی می‌کند که آیا هیچ وضعیت نخی توسط نخ جاری سیستم‌عامل استفاده شده است یا خیر. (این مقدار توسط :c:func:`PyGILState_GetThisThreadState` بازگردانده می‌شود.) اگر وجود داشته باشد، این تابع بررسی می‌کند که آیا مفسر آن وضعیت نخ با *guard* مطابقت دارد یا خیر. اگر مطابقت داشته باشد، مجدداً متصل شده و به عنوان استفاده‌شده علامت‌گذاری می‌شود." + +msgid "Otherwise, if both of the above cases fail, a new thread state is created for *guard*. It is then attached and marked as owned by ``PyThreadState_Ensure``." +msgstr "در غیر این صورت، اگر هر دو مورد بالا با شکست مواجه شوند، یک وضعیت نخ جدید برای *guard* ایجاد می‌شود. سپس متصل شده و به عنوان متعلق به ``PyThreadState_Ensure`` علامت‌گذاری می‌شود." + +msgid "Get an attached thread state for the interpreter referenced by *view*." +msgstr "یک وضعیت نخ متصل برای مفسر ارجاع‌داده‌شده توسط *view* را دریافت کنید." + +msgid "The behavior and return value are the same as for :c:func:`PyThreadState_Ensure`; additionally, if the function succeeds, the interpreter referenced by *view* will be implicitly guarded. The guard will be released upon the corresponding :c:func:`PyThreadState_Release` call." +msgstr "رفتار و مقدار بازگشتی مشابه :c:func:`PyThreadState_Ensure` است؛ علاوه بر این، اگر تابع موفق باشد، مفسر ارجاع‌داده‌شده توسط *view* به‌طور ضمنی محافظت خواهد شد. این محافظ پس از فراخوانی متناظر :c:func:`PyThreadState_Release` آزاد خواهد شد." + +msgid "Undo a :c:func:`PyThreadState_Ensure` or :c:func:`PyThreadState_EnsureFromView` call." +msgstr "یک فراخوانی :c:func:`PyThreadState_Ensure` یا :c:func:`PyThreadState_EnsureFromView` را خنثی کنید." + +msgid "This must be called exactly once for each successful *Ensure* call, with *token* set to that call's return value." +msgstr "این تابع باید دقیقاً یک بار برای هر فراخوانی موفق *Ensure*، در حالی که *token* روی مقدار بازگشتی آن فراخوانی تنظیم شده است، فراخوانی شود." + +msgid "The state that was attached before the corresponding *Ensure* call (if any) will be attached when :c:func:`PyThreadState_Release` returns." +msgstr "وضعیتی که پیش از فراخوانی متناظر *Ensure* (در صورت وجود) متصل شده بود، هنگام بازگشت :c:func:`PyThreadState_Release` متصل خواهد شد." + +msgid "The exact behavior of whether this function deletes a thread state is considered unstable and implementation-dependent." +msgstr "رفتار دقیق این که آیا این تابع یک وضعیت نخ را حذف می‌کند یا خیر، ناپایدار و وابسته به پیاده‌سازی در نظر گرفته می‌شود." + +msgid "Currently, this function will decrement an internal counter on the attached thread state. If this counter ever reaches below zero, this function emits a fatal error (via :c:func:`Py_FatalError`)." +msgstr "در حال حاضر، این تابع یک شمارنده‌ی داخلی را در وضعیت نخ متصل کاهش می‌دهد. اگر این شمارنده روزی به زیر صفر برسد، این تابع یک خطای مهلک (از طریق :c:func:`Py_FatalError`) صادر می‌کند." + +msgid "If the attached thread state is owned by ``PyThreadState_Ensure``, then the attached thread state will be deallocated and deleted upon the internal counter reaching zero. Otherwise, nothing happens when the counter reaches zero." +msgstr "اگر وضعیت نخ متصل متعلق به ``PyThreadState_Ensure`` باشد، با رسیدن شمارنده‌ی داخلی به صفر، وضعیت نخ متصل از تخصیص خارج و حذف خواهد شد. در غیر این صورت، با رسیدن شمارنده به صفر اتفاقی نمی‌افتد." + +msgid "An opaque token retrieved from a :c:func:`PyThreadState_Ensure` call and passed to a corresponding :c:func:`PyThreadState_Release` call." +msgstr "یک توکن کدر که از یک فراخوانی :c:func:`PyThreadState_Ensure` بازیابی شده و به یک فراخوانی متناظر :c:func:`PyThreadState_Release` پاس داده می‌شود." + +msgid "GIL-state APIs" +msgstr "APIهای وضعیت قفل مفسر سراسری" + +msgid "The following APIs are generally not compatible with subinterpreters and will hang the process during interpreter finalization (see :ref:`cautions-regarding-runtime-finalization`). As such, these APIs were :term:`soft deprecated` in Python 3.15 in favor of the :ref:`new APIs `." +msgstr "رابط‌های برنامه‌نویسی کاربردی (API) زیر به‌طور کلی با زیرمفسرها سازگار نیستند و فرایند را در طول نهایی‌سازی مفسر متوقف (Hang) خواهند کرد (به :ref:`cautions-regarding-runtime-finalization` مراجعه کنید). به همین دلیل، این APIها در پایتون ۳.۱۵ به نفع :ref:`رابط‌های جدید ` :term:`به‌طور نرم‌افزاری منسوخ ` شدند." + +msgid "The type of the value returned by :c:func:`PyGILState_Ensure` and passed to :c:func:`PyGILState_Release`." +msgstr "نوع مقداری که توسط :c:func:`PyGILState_Ensure` بازگردانده می‌شود و به :c:func:`PyGILState_Release` پاس داده می‌شود." + +msgid "The GIL was already held when :c:func:`PyGILState_Ensure` was called." +msgstr "هنگام فراخوانی :c:func:`PyGILState_Ensure`، قفل مفسر سراسری از قبل گرفته شده بود." + +msgid "The GIL was not held when :c:func:`PyGILState_Ensure` was called." +msgstr "قفل مفسر سراسری هنگام فراخوانی :c:func:`PyGILState_Ensure` در اختیار گرفته نشده بود." + +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`. This may be called as many times as desired by a thread as long as each call is matched with a call to :c:func:`PyGILState_Release`. In general, other thread-related APIs may be used between :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release` calls as long as the thread state is restored to its previous state before the Release(). For example, normal usage of the :c:macro:`Py_BEGIN_ALLOW_THREADS` and :c:macro:`Py_END_ALLOW_THREADS` macros is acceptable." +msgstr "تضمین می‌کند که نخ فعلی، صرف‌نظر از وضعیت فعلی پایتون یا :term:`وضعیت نخ متصل `، برای فراخوانی Python C API آماده باشد. یک نخ می‌تواند این تابع را به هر تعداد که مطلوب است فراخوانی کند، به شرط آن‌که هر فراخوانی با یک فراخوانی :c:func:`PyGILState_Release` جفت شود. به‌طور کلی، می‌توان بین فراخوانی‌های :c:func:`PyGILState_Ensure` و :c:func:`PyGILState_Release` از سایر APIهای مربوط به نخ استفاده کرد، به شرط آن‌که وضعیت نخ پیش از Release() به وضعیت پیشین خود بازگردانی شود. برای نمونه، استفاده‌ی معمول از ماکروهای :c:macro:`Py_BEGIN_ALLOW_THREADS` و :c:macro:`Py_END_ALLOW_THREADS` قابل‌قبول است." + +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:func:`PyGILState_Release` to ensure Python is left in the same state. Even though recursive calls are allowed, these handles *cannot* be shared - each unique call to :c:func:`PyGILState_Ensure` must save the handle for its call to :c:func:`PyGILState_Release`." +msgstr "مقدار بازگشتی، یک «دسته» مات برای :term:`attached thread state` در زمان فراخوانی :c:func:`PyGILState_Ensure` است و باید به :c:func:`PyGILState_Release` پاس داده شود تا اطمینان حاصل شود که پایتون در همان وضعیت باقی می‌ماند. هرچند فراخوانی‌های بازگشتی مجاز هستند، این دسته‌ها *نمی‌توانند* به اشتراک گذاشته شوند؛ هر فراخوانی مجزای :c:func:`PyGILState_Ensure` باید دسته را برای فراخوانی خود به :c:func:`PyGILState_Release` ذخیره کند." + +msgid "When the function returns, there will be an :term:`attached thread state` and the thread will be able to call arbitrary Python code." +msgstr "هنگامی که تابع برمی‌گردد، یک :term:`وضعیت نخ متصل ` وجود خواهد داشت و نخ قادر خواهد بود کد دلخواه پایتون را فراخوانی کند." + +msgid "This function has no way to return an error. As such, errors are either fatal (that is, they send ``SIGABRT`` and crash the process; see :c:func:`Py_FatalError`), or the thread will be permanently blocked (such as during interpreter finalization)." +msgstr "این تابع هیچ راهی برای بازگرداندن خطا ندارد. به همین دلیل، خطاها یا مهلک هستند (یعنی ``SIGABRT`` را ارسال کرده و فرایند را دچار فروپاشی می‌کنند؛ به :c:func:`Py_FatalError` مراجعه کنید)، یا نخ به‌طور دائم مسدود خواهد شد (مانند طول نهایی‌سازی مفسر)." + +msgid "Calling this function when the interpreter is finalizing will infinitely hang the thread, which may cause deadlocks. :ref:`cautions-regarding-runtime-finalization` for more details." +msgstr "فراخوانی این تابع هنگامی که مفسر در حال نهایی‌سازی است، نخ را به طور بی‌نهایت معلق خواهد کرد که ممکن است باعث ایجاد بن‌بست شود. برای جزئیات بیشتر به :ref:`cautions-regarding-runtime-finalization` مراجعه کنید." + +msgid "In addition, this function generally does not work with subinterpreters when used from foreign threads, because this function has no way of knowing which interpreter created the thread (and as such, will implicitly pick the main interpreter)." +msgstr "علاوه بر این، این تابع هنگامی که از نخ‌های خارجی استفاده می‌شود، معمولاً با زیرمفسرها کار نمی‌کند، زیرا این تابع راهی برای دانستن اینکه کدام مفسر نخ را ایجاد کرده است ندارد (و به همین دلیل، به‌طور ضمنی مفسر اصلی را انتخاب خواهد کرد)." + +msgid "Hangs the current thread, rather than terminating it, if called while the interpreter is finalizing." +msgstr "اگر در حین نهایی‌سازی مفسر فراخوانی شود، نخ فعلی را معلق می‌کند، نه اینکه آن را خاتمه دهد." + +msgid "Use :c:func:`PyThreadState_Ensure` or :c:func:`PyThreadState_EnsureFromView` instead." +msgstr "به‌جای آن از :c:func:`PyThreadState_Ensure` یا :c:func:`PyThreadState_EnsureFromView` استفاده کنید." + +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:`PyGILState_Ensure` call (but generally this state will be unknown to the caller, hence the use of the GIL-state API)." +msgstr "هر منبعی که قبلاً کسب شده است را آزاد کنید. پس از این فراخوانی، وضعیت پایتون همانند وضعیت قبل از فراخوانی متناظر :c:func:`PyGILState_Ensure` خواهد بود (اما به طور کلی این وضعیت برای فراخواننده ناشناخته خواهد بود، از این رو استفاده از API وضعیت GIL توصیه می‌شود)." + +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:func:`PyGILState_Ensure` باید با یک فراخوانی :c:func:`PyGILState_Release` روی همان نخ متناظر باشد." + +msgid "Use :c:func:`PyThreadState_Release` instead." +msgstr "به جای آن از :c:func:`PyThreadState_Release` استفاده کنید." + +msgid "Get the :term:`thread state` that was most recently :term:`attached ` for this thread. (If the most recent thread state has been deleted, this returns ``NULL``.)" +msgstr "دریافت :term:`وضعیت نخ ` که اخیراً برای این نخ :term:`متصل ` شده است. (اگر جدیدترین وضعیت نخ حذف شده باشد، این تابع ``NULL`` را برمی‌گرداند.)" + +msgid "If the caller has an attached thread state, it is returned." +msgstr "اگر فراخواننده دارای وضعیت نخ متصلی باشد، آن وضعیت برگردانده می‌شود." + +msgid "In other terms, this function returns the thread state that will be used by :c:func:`PyGILState_Ensure`. If this returns ``NULL``, then ``PyGILState_Ensure`` will create a new thread state." +msgstr "به عبارت دیگر، این تابع وضعیت نخی را برمی‌گرداند که توسط :c:func:`PyGILState_Ensure` استفاده خواهد شد. اگر این تابع ``NULL`` را برگرداند، آنگاه ``PyGILState_Ensure`` یک وضعیت نخ جدید ایجاد خواهد کرد." + +msgid "This function cannot fail." +msgstr "این تابع نمی‌تواند با شکست مواجه شود." + +msgid "Use :c:func:`PyThreadState_Get` or :c:func:`PyThreadState_GetUnchecked` instead." +msgstr "به‌جای آن از :c:func:`PyThreadState_Get` یا :c:func:`PyThreadState_GetUnchecked` استفاده کنید." + +msgid "Return ``1`` if the current thread has an :term:`attached thread state` that matches the thread state returned by :c:func:`PyGILState_GetThisThreadState`. If the caller has no attached thread state or it otherwise doesn't match, then this returns ``0``." +msgstr "اگر نخ فعلی دارای یک :term:`وضعیت نخ متصل ` باشد که با وضعیت نخ بازگردانده‌شده توسط :c:func:`PyGILState_GetThisThreadState` مطابقت دارد، مقدار ``1`` را بازگردانید. اگر فراخواننده هیچ وضعیت نخ متصلی نداشته باشد یا به شکلی دیگر مطابقت نکند، این تابع ``0`` را برمی‌گرداند." + +msgid "If the current Python process has ever created a subinterpreter, this function will *always* return ``1``." +msgstr "اگر فرایند کنونی پایتون تا به حال یک زیرمفسر ایجاد کرده باشد، این تابع *همیشه* مقدار ``1`` را برمی‌گرداند." + +msgid "This is mainly a helper/diagnostic function." +msgstr "این تابع عمدتاً یک تابع کمکی/عیب‌یابی است." + +msgid "Use ``PyThreadState_GetUnchecked() != NULL`` instead." +msgstr "به‌جای آن از ``PyThreadState_GetUnchecked() != NULL`` استفاده کنید." msgid "Cautions about fork()" msgstr "هشدارهایی درباره‌ی fork()" @@ -278,9 +429,6 @@ msgstr ":term:`وضعیت نخ متصل ` را به *tsta 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 Python. Refer to :ref:`cautions-regarding-runtime-finalization` for more details." msgstr "فراخوانی این تابع از یک نخ در زمانی که ران‌تایم در حال نهایی‌سازی است، باعث می‌شود نخ تا زمان خروج از برنامه معلق بماند، حتی اگر آن نخ توسط پایتون ایجاد نشده باشد. برای جزئیات بیشتر به :ref:`cautions-regarding-runtime-finalization` مراجعه کنید." -msgid "Hangs the current thread, rather than terminating it, if called while the interpreter is finalizing." -msgstr "اگر در حین نهایی‌سازی مفسر فراخوانی شود، نخ فعلی را معلق می‌کند، نه اینکه آن را خاتمه دهد." - 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` block), then this issues a fatal error (so that the caller needn't check for ``NULL``)." msgstr ":term:`attached thread state` را برمی‌گرداند. اگر نخ وضعیت نخ متصلی نداشته باشد (مانند زمانی که درون بلوک :c:macro:`Py_BEGIN_ALLOW_THREADS` هستیم)، خطای مهلک ایجاد می‌شود (تا فراخواننده نیازی به بررسی ``NULL`` نداشته باشد)." @@ -305,54 +453,6 @@ msgstr ":c:func:`PyEval_ReleaseThread`" msgid "Similar to :c:func:`PyGILState_Ensure`, this function will hang the thread if the runtime is finalizing." msgstr "مشابه :c:func:`PyGILState_Ensure`، این تابع در صورتی که ران‌تایم در حال نهایی‌سازی باشد، نخ را معلق می‌کند." -msgid "GIL-state APIs" -msgstr "APIهای وضعیت قفل مفسر سراسری" - -msgid "The following functions use thread-local storage, and are not compatible with sub-interpreters:" -msgstr "توابع زیر از ذخیره‌سازی نخ‌محلی استفاده می‌کنند و با زیرمفسر‌ها (sub-interpreters) سازگار نیستند:" - -msgid "The type of the value returned by :c:func:`PyGILState_Ensure` and passed to :c:func:`PyGILState_Release`." -msgstr "نوع مقداری که توسط :c:func:`PyGILState_Ensure` بازگردانده می‌شود و به :c:func:`PyGILState_Release` پاس داده می‌شود." - -msgid "The GIL was already held when :c:func:`PyGILState_Ensure` was called." -msgstr "هنگام فراخوانی :c:func:`PyGILState_Ensure`، قفل مفسر سراسری از قبل گرفته شده بود." - -msgid "The GIL was not held when :c:func:`PyGILState_Ensure` was called." -msgstr "قفل مفسر سراسری هنگام فراخوانی :c:func:`PyGILState_Ensure` در اختیار گرفته نشده بود." - -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`. This may be called as many times as desired by a thread as long as each call is matched with a call to :c:func:`PyGILState_Release`. In general, other thread-related APIs may be used between :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release` calls as long as the thread state is restored to its previous state before the Release(). For example, normal usage of the :c:macro:`Py_BEGIN_ALLOW_THREADS` and :c:macro:`Py_END_ALLOW_THREADS` macros is acceptable." -msgstr "تضمین می‌کند که نخ فعلی، صرف‌نظر از وضعیت فعلی پایتون یا :term:`وضعیت نخ متصل `، برای فراخوانی Python C API آماده باشد. یک نخ می‌تواند این تابع را به هر تعداد که مطلوب است فراخوانی کند، به شرط آن‌که هر فراخوانی با یک فراخوانی :c:func:`PyGILState_Release` جفت شود. به‌طور کلی، می‌توان بین فراخوانی‌های :c:func:`PyGILState_Ensure` و :c:func:`PyGILState_Release` از سایر APIهای مربوط به نخ استفاده کرد، به شرط آن‌که وضعیت نخ پیش از Release() به وضعیت پیشین خود بازگردانی شود. برای نمونه، استفاده‌ی معمول از ماکروهای :c:macro:`Py_BEGIN_ALLOW_THREADS` و :c:macro:`Py_END_ALLOW_THREADS` قابل‌قبول است." - -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:func:`PyGILState_Release` to ensure Python is left in the same state. Even though recursive calls are allowed, these handles *cannot* be shared - each unique call to :c:func:`PyGILState_Ensure` must save the handle for its call to :c:func:`PyGILState_Release`." -msgstr "مقدار بازگشتی، یک «دسته» مات برای :term:`attached thread state` در زمان فراخوانی :c:func:`PyGILState_Ensure` است و باید به :c:func:`PyGILState_Release` پاس داده شود تا اطمینان حاصل شود که پایتون در همان وضعیت باقی می‌ماند. هرچند فراخوانی‌های بازگشتی مجاز هستند، این دسته‌ها *نمی‌توانند* به اشتراک گذاشته شوند؛ هر فراخوانی مجزای :c:func:`PyGILState_Ensure` باید دسته را برای فراخوانی خود به :c:func:`PyGILState_Release` ذخیره کند." - -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 "هنگامی که تابع بازمی‌گردد، یک :term:`attached thread state` وجود خواهد داشت و نخ قادر خواهد بود کد دلخواه پایتون را فراخوانی کند. شکست یک خطای مهلک است." - -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 "فراخوانی این تابع هنگامی که ران‌تایم در حال نهایی‌سازی است، ناامن است. انجام این کار یا باعث می‌شود نخ تا پایان برنامه معلق بماند، یا در موارد نادر مفسر به‌طور کامل فروپاشی می‌کند. برای جزئیات بیشتر به :ref:`cautions-regarding-runtime-finalization` مراجعه کنید." - -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:`PyGILState_Ensure` call (but generally this state will be unknown to the caller, hence the use of the GILState API)." -msgstr "هر منبعی که پیش‌تر به‌دست آمده است را آزاد می‌کند. پس از این فراخوانی، وضعیت پایتون همان وضعیتی خواهد بود که پیش از فراخوانی متناظر :c:func:`PyGILState_Ensure` وجود داشت (اما به‌طور کلی این وضعیت برای فراخواننده ناشناخته است، از این رو از GILState API استفاده می‌شود)." - -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:func:`PyGILState_Ensure` باید با یک فراخوانی :c:func:`PyGILState_Release` روی همان نخ متناظر باشد." - -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 thread always has such a thread-state, even if no auto-thread-state call has been made on the main thread. This is mainly a helper/diagnostic function." -msgstr ":term:`وضعیت نخ متصل ` مربوط به این نخ را برمی‌گرداند. اگر هیچ API‌ی GILState روی نخ فعلی استفاده نشده باشد، ممکن است ``NULL`` را برگرداند. توجه داشته باشید که نخ اصلی همیشه چنین وضعیت نخی دارد، حتی اگر هیچ فراخوانی auto-thread-state روی نخ اصلی انجام نشده باشد. این عمدتاً یک تابع کمکی/تشخیصی است." - -msgid "This function may return non-``NULL`` even when the :term:`thread state` is detached. Prefer :c:func:`PyThreadState_Get` or :c:func:`PyThreadState_GetUnchecked` for most cases." -msgstr "این تابع ممکن است حتی زمانی که :term:`thread state` جدا شده باشد، مقدار غیر ``NULL`` را برگرداند. برای بیشتر موارد، :c:func:`PyThreadState_Get` یا :c:func:`PyThreadState_GetUnchecked` را ترجیح دهید." - -msgid ":c:func:`PyThreadState_Get`" -msgstr ":c:func:`PyThreadState_Get`" - -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 :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 "اگر نخ فعلی :term:`قفل مفسر سراسری ` را در اختیار داشته باشد، ``1`` و در غیر این صورت ``0`` را برمی‌گرداند. این تابع را می‌توان در هر زمان از هر نخی فراخوانی کرد. تنها در صورتی ``1`` برمی‌گرداند که :term:`وضعیت نخ ` آن از طریق :c:func:`PyGILState_Ensure` مقداردهی اولیه شده باشد. این عمدتاً یک تابع کمکی/تشخیصی است. این تابع می‌تواند برای مثال در زمینه‌های کال‌بک یا توابع تخصیص حافظه مفید باشد؛ زمانی که دانستن اینکه :term:`قفل مفسر سراسری ` گرفته شده است می‌تواند به فراخوان‌کننده اجازه دهد تا کنش‌های حساسی انجام دهد یا رفتار متفاوتی داشته باشد." - -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 "اگر فرایند فعلی پایتون تا به حال یک زیرمفسر ایجاد کرده باشد، این تابع *همیشه* ``1`` را برمی‌گرداند. در بیشتر موارد، :c:func:`PyThreadState_GetUnchecked` را ترجیح دهید." - msgid "Low-level APIs" msgstr "APIهای سطح پایین" @@ -473,8 +573,8 @@ msgstr "*func* باید در صورت موفقیت ``0`` و در صورت شکس 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:`attached thread state`. Otherwise, the function *func* can be scheduled to be called from the wrong interpreter." msgstr "این تابع به :term:`وضعیت نخ متصل ` نیاز ندارد. با این حال، برای فراخوانی این تابع در یک زیرمفسر، فراخواننده باید :term:`وضعیت نخ متصل ` داشته باشد. در غیر این صورت، ممکن است تابع *func* برای فراخوانی از مفسر اشتباه زمان‌بندی شود." -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 thread is busy executing a system call, *func* won't be called before the system call returns. This function is generally **not** suitable for calling Python code from arbitrary C threads. Instead, use the :ref:`PyGILState API`." -msgstr "این یک تابع سطح پایین است که فقط برای موارد بسیار خاص مفید است. هیچ تضمینی وجود ندارد که *func* در سریع‌ترین حالت ممکن فراخوانی شود. اگر نخ اصلی مشغول اجرای یک فراخوانی سیستمی باشد، *func* پیش از بازگشت فراخوانی سیستمی فراخوانی نخواهد شد. این تابع به‌طور کلی برای فراخوانی کد پایتون از نخ‌های C دلخواه مناسب **نیست**. در عوض، از :ref:`PyGILState API` استفاده کنید." +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 thread is busy executing a system call, *func* won't be called before the system call returns. This function is generally **not** suitable for calling Python code from arbitrary C threads. Instead, use :c:func:`PyThreadState_EnsureFromView`." +msgstr "این یک تابع سطح پایین است و فقط برای موارد بسیار خاص مفید است. هیچ تضمینی وجود ندارد که *func* با بیشترین سرعت ممکن فراخوانی شود. اگر نخ اصلی مشغول اجرای یک فراخوانی سیستمی باشد، *func* قبل از بازگشت فراخوانی سیستمی فراخوانی نخواهد شد. این تابع به‌طور کلی برای فراخوانی کد پایتون از نخ‌های دلخواه C **مناسب نیست**. در عوض، از :c:func:`PyThreadState_EnsureFromView` استفاده کنید." 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 from the main interpreter. Each subinterpreter now has its own list of scheduled calls." msgstr "اگر این تابع در یک زیرمفسر فراخوانی شود، تابع *func* اکنون برای فراخوانی از طریق زیرمفسر زمان‌بندی می‌شود، نه از طریق مفسر اصلی. هر زیرمفسر اکنون فهرست فراخوانی‌های زمان‌بندی‌شده‌ی خود را دارد." @@ -494,8 +594,17 @@ msgstr "اگر این تابع در نخ اصلی مفسر اصلی فراخوا msgid "This function only runs pending calls in the main interpreter." msgstr "این تابع فقط فراخوانی‌های در انتظار را در مفسر اصلی اجرا می‌کند." -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. This function does not :term:`steal` any references to *exc*. To prevent naive misuse, you must write your own C extension to call this. Must be called with an :term:`attached thread state`. Returns the number of thread states modified; this is normally one, but will be zero if the thread id isn't found. If *exc* is ``NULL``, the pending exception (if any) for the thread is cleared. This raises no exceptions." -msgstr "یک استثنا را به‌صورت ناهمگام در یک نخ ایجاد می‌کند. آرگومان *id* شناسه‌ی نخ هدف است؛ *exc* شیء استثنا است که باید ایجاد شود. این تابع هیچ ارجاعی به *exc* را :term:`سرقت ` نمی‌کند. برای جلوگیری از سوءاستفاده‌ی ساده‌لوحانه، باید برای فراخوانی این تابع، افزونه‌ی C خودتان را بنویسید. باید با یک :term:`وضعیت نخ متصل ` فراخوانی شود. تعداد وضعیت‌های نخ که تغییر کرده‌اند را برمی‌گرداند؛ این تعداد معمولاً یکی است، اما اگر شناسه‌ی نخ پیدا نشود، صفر خواهد بود. اگر *exc* برابر ``NULL`` باشد، استثنای در انتظار (در صورت وجود) برای آن نخ پاک می‌شود. این تابع هیچ استثنایی ایجاد نمی‌کند." +msgid "Schedule an exception to be raised asynchronously in a thread. If the thread has a previously scheduled exception, it is overwritten." +msgstr "برنامه‌ریزی برای بالا آوردن یک استثنا به شکل ناهمگام در یک نخ. اگر نخ از قبل استثنایی برنامه‌ریزی‌شده داشته باشد، بازنویسی می‌شود." + +msgid "The *id* argument is the thread id of the target thread, as returned by :c:func:`PyThread_get_thread_ident`. *exc* is the class of the exception to be raised, or ``NULL`` to clear the pending exception (if any)." +msgstr "آرگومان *id* شناسه‌ی نخِ نخِ هدف است، همان‌طور که توسط :c:func:`PyThread_get_thread_ident` برگردانده می‌شود. *exc* کلاس استثنایی است که باید بالا برده شود، یا ``NULL`` برای پاک کردن استثنای معلق (در صورت وجود)." + +msgid "Return the number of affected thread states. This is normally ``1`` if *id* is found, even when no change was made (the given *exc* was already pending, or *exc* is ``NULL`` but no exception is pending). If the thread id isn't found, return ``0``. This raises no exceptions." +msgstr "تعداد وضعیت‌های نخِ تحت تأثیر را برگردانید. اگر *id* پیدا شود، این مقدار معمولاً ``1`` است، حتی زمانی که هیچ تغییری ایجاد نشده باشد (مقدار *exc* داده‌شده از قبل معلق بوده است، یا *exc* برابر با ``NULL`` است اما هیچ استثنایی معلق نیست). اگر شناسه‌ی نخ پیدا نشود، ``0`` را برگردانید. این تابع هیچ استثنایی را بالا نمی‌برد." + +msgid "To prevent naive misuse, you must write your own C extension to call this. This function must be called with an :term:`attached thread state`. This function does not :term:`steal` any references to *exc*. This function does not necessarily interrupt system calls such as :py:func:`~time.sleep`." +msgstr "برای جلوگیری از سوءاستفاده‌ی ساده‌لوحانه، باید افزونه‌ی C خود را بنویسید تا این تابع را فراخوانی کند. این تابع باید با یک :term:`وضعیت نخ متصل ` فراخوانی شود. این تابع هیچ ارجاعی را به *exc* :term:`نمی‌رباید ` لزوماً فراخوانی‌های سیستمی مانند :py:func:`~time.sleep` را متوقف نمی‌کند." msgid "The type of the *id* parameter changed from :c:expr:`long` to :c:expr:`unsigned long`." msgstr "نوع پارامتر *id* از :c:expr:`long` به :c:expr:`unsigned long` تغییر یافت." @@ -527,8 +636,8 @@ msgstr "شناسه‌ی نخ فعلی را برمی‌گرداند که هرگز msgid "This function cannot fail, and the caller does not need to hold an :term:`attached thread state`." msgstr "این تابع نمی‌تواند شکست بخورد و فراخوانی‌کننده نیازی به نگه داشتن :term:`attached thread state` ندارد." -msgid ":py:func:`threading.get_ident`" -msgstr ":py:func:`threading.get_ident`" +msgid ":py:func:`threading.get_ident` and :py:attr:`threading.Thread.ident` expose this identifier to Python." +msgstr ":py:func:`threading.get_ident` و :py:attr:`threading.Thread.ident` این شناسه را در پایتون در معرض دید قرار می‌دهند." msgid "Get general information about the current thread in the form of a :ref:`struct sequence ` object. This information is accessible as :py:attr:`sys.thread_info` in Python." msgstr "اطلاعات کلی درباره‌ی نخ فعلی را به شکل یک شیء :ref:`دنباله ساختاری ` دریافت کنید. این اطلاعات در پایتون به صورت :py:attr:`sys.thread_info` در دسترس است." @@ -622,3 +731,66 @@ msgstr "ماژول" msgid "_thread" msgstr "_thread" + +#~ msgid "Non-Python created threads" +#~ msgstr "نخ‌های ایجادشده خارج از پایتون" + +#~ msgid "``PyThreadState_New`` requires an argument pointing to the desired interpreter; such a pointer can be acquired via a call to :c:func:`PyInterpreterState_Get` from the code where the thread was created." +#~ msgstr "``PyThreadState_New`` به آرگومانی نیاز دارد که به مفسر موردنظر اشاره کند؛ چنین اشاره‌گری را می‌توان از طریق فراخوانی :c:func:`PyInterpreterState_Get` در کدی که نخ در آن ایجاد شده است، به دست آورد." + +#~ msgid "If the interpreter finalized before ``PyThreadState_Swap`` was called, then ``interp`` will be a dangling pointer!" +#~ msgstr "اگر مفسر پیش از فراخوانی ``PyThreadState_Swap`` نهایی‌سازی شده باشد، آنگاه ``interp`` یک اشاره‌گر معلق (dangling pointer) خواهد بود!" + +#~ msgid "Legacy API" +#~ msgstr "API قدیمی" + +#~ msgid "Another common pattern to call Python code from a non-Python thread is to use :c:func:`PyGILState_Ensure` followed by a call to :c:func:`PyGILState_Release`." +#~ msgstr "الگوی رایج دیگر برای فراخوانی کد پایتون از یک نخ غیرپایتونی، استفاده از :c:func:`PyGILState_Ensure` و سپس فراخوانی :c:func:`PyGILState_Release` است." + +#~ msgid "These functions do not work well when multiple interpreters exist in the Python process. If no Python interpreter has ever been used in the current thread (which is common for threads created outside Python), ``PyGILState_Ensure`` will create and attach a thread state for the \"main\" interpreter (the first interpreter in the Python process)." +#~ msgstr "این توابع زمانی که چندین مفسر در فرایند پایتون وجود داشته باشند، به‌خوبی کار نمی‌کنند. اگر تاکنون هیچ مفسر پایتونی در نخ فعلی استفاده نشده باشد (که این امر برای نخ‌هایی که خارج از پایتون ایجاد شده‌اند رایج است)، ``PyGILState_Ensure`` یک وضعیت نخ برای مفسر «اصلی» (اولین مفسر در فرایند پایتون) ایجاد و پیوست می‌دهد." + +#~ msgid "Additionally, these functions have thread-safety issues during interpreter finalization. Using ``PyGILState_Ensure`` during finalization will likely crash the process." +#~ msgstr "علاوه بر این، این توابع در حین نهایی‌سازی مفسر دارای مشکلات نخ‌ایمنی هستند. استفاده از ``PyGILState_Ensure`` در حین نهایی‌سازی به احتمال زیاد باعث فروپاشی فرایند می‌شود." + +#~ msgid "Usage of these functions look like such::" +#~ msgstr "استفاده از این توابع به این شکل است::" + +#~ msgid "" +#~ "PyGILState_STATE gstate;\n" +#~ "gstate = PyGILState_Ensure();\n" +#~ "\n" +#~ "/* Perform Python actions here. */\n" +#~ "result = CallSomeFunction();\n" +#~ "/* evaluate result or handle exception */\n" +#~ "\n" +#~ "/* Release the thread. No Python API allowed beyond this point. */\n" +#~ "PyGILState_Release(gstate);" +#~ msgstr "" +#~ "PyGILState_STATE gstate;\n" +#~ "gstate = PyGILState_Ensure();\n" +#~ "\n" +#~ "/* Perform Python actions here. */\n" +#~ "result = CallSomeFunction();\n" +#~ "/* evaluate result or handle exception */\n" +#~ "\n" +#~ "/* Release the thread. No Python API allowed beyond this point. */\n" +#~ "PyGILState_Release(gstate);" + +#~ msgid "The following functions use thread-local storage, and are not compatible with sub-interpreters:" +#~ msgstr "توابع زیر از ذخیره‌سازی نخ‌محلی استفاده می‌کنند و با زیرمفسر‌ها (sub-interpreters) سازگار نیستند:" + +#~ 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 thread always has such a thread-state, even if no auto-thread-state call has been made on the main thread. This is mainly a helper/diagnostic function." +#~ msgstr ":term:`وضعیت نخ متصل ` مربوط به این نخ را برمی‌گرداند. اگر هیچ API‌ی GILState روی نخ فعلی استفاده نشده باشد، ممکن است ``NULL`` را برگرداند. توجه داشته باشید که نخ اصلی همیشه چنین وضعیت نخی دارد، حتی اگر هیچ فراخوانی auto-thread-state روی نخ اصلی انجام نشده باشد. این عمدتاً یک تابع کمکی/تشخیصی است." + +#~ msgid "This function may return non-``NULL`` even when the :term:`thread state` is detached. Prefer :c:func:`PyThreadState_Get` or :c:func:`PyThreadState_GetUnchecked` for most cases." +#~ msgstr "این تابع ممکن است حتی زمانی که :term:`thread state` جدا شده باشد، مقدار غیر ``NULL`` را برگرداند. برای بیشتر موارد، :c:func:`PyThreadState_Get` یا :c:func:`PyThreadState_GetUnchecked` را ترجیح دهید." + +#~ 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 :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 "اگر نخ فعلی :term:`قفل مفسر سراسری ` را در اختیار داشته باشد، ``1`` و در غیر این صورت ``0`` را برمی‌گرداند. این تابع را می‌توان در هر زمان از هر نخی فراخوانی کرد. تنها در صورتی ``1`` برمی‌گرداند که :term:`وضعیت نخ ` آن از طریق :c:func:`PyGILState_Ensure` مقداردهی اولیه شده باشد. این عمدتاً یک تابع کمکی/تشخیصی است. این تابع می‌تواند برای مثال در زمینه‌های کال‌بک یا توابع تخصیص حافظه مفید باشد؛ زمانی که دانستن اینکه :term:`قفل مفسر سراسری ` گرفته شده است می‌تواند به فراخوان‌کننده اجازه دهد تا کنش‌های حساسی انجام دهد یا رفتار متفاوتی داشته باشد." + +#~ 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. This function does not :term:`steal` any references to *exc*. To prevent naive misuse, you must write your own C extension to call this. Must be called with an :term:`attached thread state`. Returns the number of thread states modified; this is normally one, but will be zero if the thread id isn't found. If *exc* is ``NULL``, the pending exception (if any) for the thread is cleared. This raises no exceptions." +#~ msgstr "یک استثنا را به‌صورت ناهمگام در یک نخ ایجاد می‌کند. آرگومان *id* شناسه‌ی نخ هدف است؛ *exc* شیء استثنا است که باید ایجاد شود. این تابع هیچ ارجاعی به *exc* را :term:`سرقت ` نمی‌کند. برای جلوگیری از سوءاستفاده‌ی ساده‌لوحانه، باید برای فراخوانی این تابع، افزونه‌ی C خودتان را بنویسید. باید با یک :term:`وضعیت نخ متصل ` فراخوانی شود. تعداد وضعیت‌های نخ که تغییر کرده‌اند را برمی‌گرداند؛ این تعداد معمولاً یکی است، اما اگر شناسه‌ی نخ پیدا نشود، صفر خواهد بود. اگر *exc* برابر ``NULL`` باشد، استثنای در انتظار (در صورت وجود) برای آن نخ پاک می‌شود. این تابع هیچ استثنایی ایجاد نمی‌کند." + +#~ msgid ":py:func:`threading.get_ident`" +#~ msgstr ":py:func:`threading.get_ident`" diff --git a/c-api/tuple.po b/c-api/tuple.po index 00fbc7e2..114c4e58 100644 --- a/c-api/tuple.po +++ b/c-api/tuple.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 20:17+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -41,6 +42,15 @@ msgstr "اگر *p* یک شیء تاپل باشد، اما نمونه‌ای از msgid "Return a new tuple object of size *len*, or ``NULL`` with an exception set on failure." msgstr "یک شیء تاپل جدید با اندازه‌ی *len* برمی‌گرداند، یا در صورت شکست ``NULL`` را همراه با استثنای تنظیم‌شده برمی‌گرداند." +msgid "Create a tuple of *size* items and copy references from *array* to the new tuple." +msgstr "یک تاپل با *size* تا آیتم ایجاد کنید و ارجاعات را از *array* به تاپل جدید کپی کنید." + +msgid "*array* can be NULL if *size* is ``0``." +msgstr "اگر *size* برابر با ``0`` باشد، *array* می‌تواند NULL باشد." + +msgid "On success, return a new reference. On error, set an exception and return ``NULL``." +msgstr "در صورت موفقیت، یک ارجاع جدید برگردانید. در صورت بروز خطا، یک استثنا تنظیم کنید و ``NULL`` را برگردانید." + msgid "Return a new tuple object of size *n*, or ``NULL`` with an exception set on failure. The tuple values are initialized to the subsequent *n* C arguments pointing to Python objects. ``PyTuple_Pack(2, a, b)`` is equivalent to ``Py_BuildValue(\"(OO)\", a, b)``." msgstr "یک شیء تاپل جدید با اندازه‌ی *n* برمی‌گرداند، یا در صورت شکست ``NULL`` به همراه یک استثنای تنظیم‌شده برمی‌گرداند. مقادیر تاپل به *n* آرگومان C بعدی که به اشیاء پایتون اشاره می‌کنند، مقداردهی اولیه می‌شوند. ``PyTuple_Pack(2, a, b)`` معادل ``Py_BuildValue(\"(OO)\", a, b)`` است." @@ -65,14 +75,14 @@ msgstr "اسلایس تاپلی را که *p* به آن اشاره می‌کند msgid "This is the equivalent of the Python expression ``p[low:high]``. Indexing from the end of the tuple is not supported." msgstr "این معادل عبارت پایتونی ``p[low:high]`` است. اندیس‌گذاری از انتهای تاپل پشتیبانی نمی‌شود." -msgid "Insert a reference to object *o* at position *pos* of the tuple pointed to by *p*. Return ``0`` on success. If *pos* is out of bounds, return ``-1`` and set an :exc:`IndexError` exception." -msgstr "یک ارجاع به شیء *o* در موقعیت *pos* از تاپلی که *p* به آن اشاره می‌کند، درج می‌کند. در صورت موفقیت ``0`` برمی‌گرداند. اگر *pos* خارج از محدوده باشد، ``-1`` برمی‌گرداند و استثنای :exc:`IndexError` را تنظیم می‌کند." +msgid "Insert a reference to object *o* at position *pos* of the tuple pointed to by *p*. Return ``0`` on success. If *pos* is out of bounds, return ``-1`` and set an :exc:`IndexError` exception. This function should only be used to fill in brand new tuples; using it on an existing tuple is thread-unsafe." +msgstr "یک ارجاع به شیء *o* در موقعیت *pos* از تاپلی که *p* به آن اشاره می‌کند درج کنید. در صورت موفقیت ``0`` را برگردانید. اگر *pos* خارج از کران باشد، مقدار ``-1`` را برگردانید و یک استثنای :exc:`IndexError` تنظیم کنید. این تابع باید فقط برای پر کردن تاپل‌های کاملاً تازه استفاده شود؛ استفاده از آن روی یک تاپل موجود ناامن‌درنخ (thread-unsafe) است." msgid "This function \":term:`steals `\" a reference to *o* and discards a reference to an item already in the tuple at the affected position (unless it was NULL)." msgstr "این تابع ارجاعی به *o* را «:term:`می‌دزدد (steal) `» و ارجاع به آیتمی را که از قبل در جایگاه مورد تأثیر تاپل قرار دارد، دور می‌ریزد (مگر اینکه NULL بوده باشد)." -msgid "Like :c:func:`PyTuple_SetItem`, but does no error checking, and should *only* be used to fill in brand new tuples." -msgstr "مانند :c:func:`PyTuple_SetItem` است، اما هیچ بررسی خطایی انجام نمی‌دهد و باید *فقط* برای پر کردن تاپل‌های کاملاً جدید استفاده شود." +msgid "Like :c:func:`PyTuple_SetItem`, but does no error checking, and should *only* be used to fill in brand new tuples, using it on an existing tuple is thread-unsafe." +msgstr "مشابه :c:func:`PyTuple_SetItem` است، اما هیچ بررسی خطایی انجام نمی‌دهد و *فقط* باید برای پر کردن تاپل‌های کاملاً تازه استفاده شود؛ استفاده از آن روی یک تاپل موجود ناامن‌درنخ است." msgid "Bounds checking is performed as an assertion if Python is built in :ref:`debug mode ` or :option:`with assertions <--with-assertions>`." msgstr "اگر پایتون در :ref:`حالت اشکال‌زدایی ` یا :option:`با ادعاها <--with-assertions>` ساخته شده باشد، بررسی کران‌ها به‌صورت یک ادعا انجام می‌شود." @@ -89,8 +99,11 @@ msgstr "می‌تواند برای تغییر اندازه‌ی یک تاپل ا msgid "Struct Sequence Objects" msgstr "اشیاء دنباله ساختاری" -msgid "Struct sequence objects are the C equivalent of :func:`~collections.namedtuple` objects, i.e. a sequence whose items can also be accessed through attributes. To create a struct sequence, you first have to create a specific struct sequence type." -msgstr "اشیاء دنباله ساختاری معادل C برای اشیاء :func:`~collections.namedtuple` هستند؛ یعنی دنباله‌ای که به آیتم‌های آن می‌توان از طریق ویژگی‌ها نیز دسترسی داشت. برای ایجاد یک دنباله ساختاری، ابتدا باید یک نوع دنباله ساختاری خاص ایجاد کنید." +msgid "A struct sequence object is a :term:`named tuple`, that is, a sequence whose items can also be accessed through attributes. It is similar to :func:`collections.namedtuple`, but provides a slightly different interface." +msgstr "یک شیء دنباله ساختاری یک :term:`تاپل نام‌دار ` است؛ یعنی دنباله‌ای که آیتم‌های آن از طریق ویژگی‌ها نیز قابل دسترسی هستند. این شیء مشابه :func:`collections.namedtuple` است، اما رابط کمی متفاوتی را فراهم می‌کند." + +msgid "To create a struct sequence, you first have to create a specific struct sequence type." +msgstr "برای ایجاد یک دنباله ساختاری، ابتدا باید یک نوع دنباله ساختاری خاص ایجاد کنید." msgid "Create a new struct sequence type from the data in *desc*, described below. Instances of the resulting type can be created with :c:func:`PyStructSequence_New`." msgstr "نوع دنباله ساختاری جدیدی از داده‌های موجود در *desc* که در ادامه توضیح داده شده است، ایجاد می‌کند. نمونه‌های نوع حاصل را می‌توان با :c:func:`PyStructSequence_New` ایجاد کرد." @@ -137,8 +150,8 @@ msgstr "نوع از ``char *`` تغییر یافت." msgid "Creates an instance of *type*, which must have been created with :c:func:`PyStructSequence_NewType`." msgstr "یک نمونه از *type* ایجاد می‌کند که باید با :c:func:`PyStructSequence_NewType` ایجاد شده باشد." -msgid "Return the object at position *pos* in the struct sequence pointed to by *p*." -msgstr "شیء موجود در موقعیت *pos* در دنباله ساختاری‌ای که *p* به آن اشاره می‌کند را برمی‌گرداند." +msgid "Return the object at position *pos* in the struct sequence pointed to by *p*. The returned reference is borrowed from the struct sequence *p* (that is: it is only valid as long as you hold a reference to *p*)." +msgstr "شیء موجود در موقعیت *pos* را در دنباله ساختاری اشاره‌شده توسط *p* برگردانید. ارجاع برگردانده‌شده از دنباله ساختاری *p* قرض گرفته شده است (یعنی: تا زمانی که یک ارجاع به *p* را حفظ کنید معتبر است)." msgid "Alias to :c:func:`PyStructSequence_GetItem`." msgstr "نام مستعاری برای :c:func:`PyStructSequence_GetItem` است." @@ -163,3 +176,6 @@ msgstr "شیء" msgid "tuple" msgstr "تاپل" + +#~ msgid "Return the object at position *pos* in the struct sequence pointed to by *p*." +#~ msgstr "شیء موجود در موقعیت *pos* در دنباله ساختاری‌ای که *p* به آن اشاره می‌کند را برمی‌گرداند." diff --git a/c-api/type.po b/c-api/type.po index 54ba4223..5ef13da5 100644 --- a/c-api/type.po +++ b/c-api/type.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 00:50+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -73,9 +74,15 @@ msgstr "یک ماژول توسعه‌ای هرگز نباید ``PyType_ClearWatc msgid "Mark *type* as watched. The callback granted *watcher_id* by :c:func:`PyType_AddWatcher` will be called whenever :c:func:`PyType_Modified` reports a change to *type*. (The callback may be called only once for a series of consecutive modifications to *type*, if :c:func:`!_PyType_Lookup` is not called on *type* between the modifications; this is an implementation detail and subject to change.)" msgstr "*type* را به‌عنوان تحت نظارت علامت‌گذاری می‌کند. کال‌بکی که :c:func:`PyType_AddWatcher` شناسه‌ی *watcher_id* را به آن اعطا کرده است، هر زمان که :c:func:`PyType_Modified` تغییری در *type* را گزارش کند، فراخوانی خواهد شد. (کال‌بک ممکن است برای یک سری تغییرهای متوالی در *type* تنها یک بار فراخوانی شود، اگر :c:func:`!_PyType_Lookup` بین این تغییرها بر روی *type* فراخوانی نشود؛ این یک جزئیات پیاده‌سازی است و ممکن است تغییر کند.)" +msgid "The callback is also invoked when a watched heap type is deallocated." +msgstr "این کال‌بک همچنین زمانی که یک نوع هیپ تحت نظارت تخصیص‌زدایی می‌شود، فراخوانی می‌شود." + msgid "An extension should never call ``PyType_Watch`` with a *watcher_id* that was not returned to it by a previous call to :c:func:`PyType_AddWatcher`." msgstr "یک ماژول توسعه‌ای هرگز نباید ``PyType_Watch`` را با یک *watcher_id* که پیش‌تر توسط فراخوانی :c:func:`PyType_AddWatcher` به آن بازگردانده نشده است، فراخوانی کند." +msgid "The callback is now also invoked when a watched heap type is deallocated." +msgstr "اکنون این کال‌بک همچنین زمانی که یک نوع هیپ تحت نظارت تخصیص‌زدایی می‌شود، فراخوانی می‌شود." + msgid "Mark *type* as not watched. This undoes a previous call to :c:func:`PyType_Watch`. *type* must not be ``NULL``." msgstr "*type* را به‌عنوان نظارت‌نشده علامت‌گذاری می‌کند. این کار، فراخوانی قبلیِ :c:func:`PyType_Watch` را خنثی می‌کند. *type* نباید ``NULL`` باشد." @@ -91,6 +98,12 @@ msgstr "نوع تابع کال‌بک دیده‌بان نوع (type-watcher)." msgid "The callback must not modify *type* or cause :c:func:`PyType_Modified` to be called on *type* or any type in its MRO; violating this rule could cause infinite recursion." msgstr "کال‌بک نباید *type* را تغییر دهد یا باعث فراخوانی :c:func:`PyType_Modified` روی *type* یا هیچ نوعی در ترتیب حل متد (MRO) آن شود؛ نقض این قاعده می‌تواند منجر به بازگشت بی‌نهایت شود." +msgid "The callback may be called during type deallocation. In this case, the type object is temporarily resurrected (its reference count is at least 1) and all its attributes are still valid. However, the callback should not store new strong references to the type, as this would resurrect the object and prevent its deallocation." +msgstr "ممکن است این کال‌بک در طول تخصیص‌زدایی نوع فراخوانی شود. در این صورت، شیء نوع به طور موقت احیا می‌شود (شمارش ارجاع آن حداقل ۱ است) و تمام ویژگی‌های آن همچنان معتبر هستند. با این حال، کال‌بک نباید ارجاعات قوی جدیدی به نوع ذخیره کند، زیرا این کار شیء را احیا کرده و مانع از تخصیص‌زدایی آن می‌شود." + +msgid "The callback may now be called during deallocation of a watched heap type." +msgstr "اکنون ممکن است این کال‌بک در طول تخصیص‌زدایی یک نوع هیپ تحت نظارت فراخوانی شود." + msgid "Return non-zero if the type object *o* sets the feature *feature*. Type features are denoted by single bit flags." msgstr "اگر شیء نوع *o* ویژگی *feature* را تنظیم کرده باشد، مقدار غیرصفر برمی‌گرداند. ویژگی‌های نوع با پرچم‌های تک‌بیتی نشان داده می‌شوند." @@ -157,8 +170,8 @@ msgstr "ارجاع بازگردانده‌شده از *type* به‌صورت :te msgid "If no module is associated with the given type, sets :py:class:`TypeError` and returns ``NULL``." msgstr "اگر هیچ ماژولی با نوع داده‌شده مرتبط نباشد، :py:class:`TypeError` را تنظیم می‌کند و ``NULL`` را برمی‌گرداند." -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 not return the intended result. ``Py_TYPE(self)`` may be a *subclass* of the intended class, and subclasses are not necessarily defined in the same module as their superclass. See :c:type:`PyCMethod` to get the class that defines the method. See :c:func:`PyType_GetModuleByDef` for cases when :c:type:`!PyCMethod` cannot be used." -msgstr "این تابع معمولاً برای به‌دست‌آوردن ماژولی که متدی در آن تعریف شده است استفاده می‌شود. توجه داشته باشید که در چنین متدی، ``PyType_GetModule(Py_TYPE(self))`` ممکن است نتیجه‌ی مورد نظر را برنگرداند. ``Py_TYPE(self)`` ممکن است یک *زیرکلاس* از کلاس مورد نظر باشد و زیرکلاس‌ها لزوماً در همان ماژولی که ابرکلاس‌شان در آن تعریف شده است، تعریف نمی‌شوند. برای به‌دست‌آوردن کلاسی که متد را تعریف می‌کند، به :c:type:`PyCMethod` مراجعه کنید. برای مواردی که نمی‌توان از :c:type:`!PyCMethod` استفاده کرد، به :c:func:`PyType_GetModuleByDef` مراجعه کنید." +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 not return the intended result. ``Py_TYPE(self)`` may be a *subclass* of the intended class, and subclasses are not necessarily defined in the same module as their superclass. See :c:type:`PyCMethod` to get the class that defines the method. See :c:func:`PyType_GetModuleByToken` for cases when :c:type:`!PyCMethod` cannot be used." +msgstr "این تابع معمولاً برای به دست آوردن ماژولی که یک متد در آن تعریف شده است استفاده می‌شود. توجه داشته باشید که در چنین متدی، ``PyType_GetModule(Py_TYPE(self))`` ممکن است نتیجه‌ی مورد نظر را برنگرداند. عبارت ``Py_TYPE(self)`` ممکن است زیرکلاسی از کلاس مورد نظر باشد و زیرکلاس‌ها لزوماً در همان ماژولی که ابرکلاس آن‌ها قرار دارد تعریف نمی‌شوند. برای به دست آوردن کلاسی که متد را تعریف می‌کند، به :c:type:`PyCMethod` مراجعه کنید. برای مواردی که نمی‌توان از :c:type:`!PyCMethod` استفاده کرد، :c:func:`PyType_GetModuleByToken` را ببیند." 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:func:`PyModule_GetState()` بر روی نتیجه‌ی :c:func:`PyType_GetModule` است." @@ -166,8 +179,8 @@ msgstr "وضعیت شیء ماژول مرتبط با نوع داده‌شده ر msgid "If the *type* has an associated module but its state is ``NULL``, returns ``NULL`` without setting an exception." msgstr "اگر *نوع* ماژول مرتبطی داشته باشد اما وضعیت آن ``NULL`` باشد، ``NULL`` را بدون تنظیم استثنا برمی‌گرداند." -msgid "Find the first superclass whose module was created from the given :c:type:`PyModuleDef` *def*, and return that module." -msgstr "اولین ابرکلاسی را بیابید که ماژول آن از :c:type:`PyModuleDef` *def* داده‌شده ساخته‌شده است و آن ماژول را برگردانید." +msgid "Find the first superclass whose module has the given :ref:`module token `, and return that module." +msgstr "نخستین ابرکلاسی را که ماژول آن دارای :ref:`توسعه‌ی توکن ماژول ` داده‌شده است پیدا کنید و آن ماژول را برگردانید." msgid "If no module is found, raises a :py:class:`TypeError` and returns ``NULL``." msgstr "اگر هیچ ماژولی یافت نشود، یک :py:class:`TypeError` ایجاد می‌کند و ``NULL`` را برمی‌گرداند." @@ -175,8 +188,20 @@ msgstr "اگر هیچ ماژولی یافت نشود، یک :py:class:`TypeError msgid "This function is intended to be used together with :c:func:`PyModule_GetState()` to get module state from slot methods (such as :c:member:`~PyTypeObject.tp_init` or :c:member:`~PyNumberMethods.nb_add`) and other places where a method's defining class cannot be passed using the :c:type:`PyCMethod` calling convention." msgstr "این تابع برای استفاده همراه با :c:func:`PyModule_GetState()` جهت گرفتن وضعیت ماژول از متدهای جایگاه (مانند :c:member:`~PyTypeObject.tp_init` یا :c:member:`~PyNumberMethods.nb_add`) و دیگر جاهایی که کلاس تعریف‌کننده‌ی متد را نمی‌توان با استفاده از قرارداد فراخوانی :c:type:`PyCMethod` ارسال کرد، در نظر گرفته شده است." -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 "اولین ابرکلاسی را در :term:`ترتیب حل متد ` *type* می‌یابد که توکن :c:macro:`Py_tp_token` آن با توکن داده‌شده برابر است." +msgid "Find the first superclass whose module was created from the given :c:type:`PyModuleDef` *def*, or whose :ref:`module token ` is equal to *def*, and return that module." +msgstr "نخستین ابرکلاسی را که ماژول آن از *def* (یک :c:type:`PyModuleDef` داده‌شده) ایجاد شده است، یا :ref:`توسعه‌ی توکن ماژول ` آن برابر با *def* است پیدا کنید، و آن ماژول را برگردانید." + +msgid "Note that modules created from a :c:type:`PyModuleDef` always have their token set to the :c:type:`PyModuleDef`'s address. In other words, this function is equivalent to :c:func:`PyType_GetModuleByToken`, except that it:" +msgstr "توجه داشته باشید که ماژول‌های ایجادشده از یک :c:type:`PyModuleDef` همیشه توکن خود را روی آدرس :c:type:`PyModuleDef` تنظیم می‌کنند. به عبارت دیگر، این تابع معادل :c:func:`PyType_GetModuleByToken` است، با این تفاوت که:" + +msgid "returns a borrowed reference, and" +msgstr "یک ارجاع امانتی برمی‌گرداند، و" + +msgid "has a non-``void*`` argument type (which is a cosmetic difference in C)." +msgstr "دارای نوع آرگومانی غیر از ``void*`` است (که یک تفاوت ظاهری در C است)." + +msgid "Find the first superclass in *type*'s :term:`method resolution order` whose :c:macro:`Py_tp_token` token is equal to *tp_token*." +msgstr "نخستین ابرکلاس را در :term:`ترتیب حل متد ` متعلق به *type* پیدا کنید که توکن :c:macro:`Py_tp_token` آن برابر با *tp_token* باشد." msgid "If found, set *\\*result* to a new :term:`strong reference` to it and return ``1``." msgstr "اگر یافت شود، *\\*result* را برابر با یک :term:`ارجاع قوی ` جدید به آن قرار می‌دهد و ``1`` را برمی‌گرداند." @@ -190,8 +215,8 @@ msgstr "در صورت خطا، *\\*result* را برابر ``NULL`` قرار د msgid "The *result* argument may be ``NULL``, in which case *\\*result* is not set. Use this if you need only the return value." msgstr "آرگومان *result* می‌تواند ``NULL`` باشد که در این صورت *\\*result* مقداردهی نمی‌شود. اگر فقط به مقدار بازگشتی نیاز دارید، از این استفاده کنید." -msgid "The *token* argument may not be ``NULL``." -msgstr "آرگومان *token* نباید ``NULL`` باشد." +msgid "The *tp_token* argument may not be ``NULL``." +msgstr "آرگومان *tp_token* نمی‌تواند ``NULL`` باشد." msgid "Attempt to assign a version tag to the given type." msgstr "تلاش می‌کند تا یک برچسب نسخه را به نوع داده‌شده انتساب دهد." @@ -211,23 +236,11 @@ msgstr ":py:mod:`weakref`" msgid "Creating Heap-Allocated Types" msgstr "ایجاد نوع‌های تخصیص‌یافته از هیپ" -msgid "The following functions and structs are used to create :ref:`heap types `." -msgstr "توابع و ساختارهای زیر برای ایجاد :ref:`نوع‌های هیپ ` استفاده می‌شوند." - -msgid "Create and return a :ref:`heap type ` from the *spec* (see :c:macro:`Py_TPFLAGS_HEAPTYPE`)." -msgstr "یک :ref:`نوع هیپ ` از *spec* بسازید و بازگردانید (به :c:macro:`Py_TPFLAGS_HEAPTYPE` مراجعه کنید)." +msgid "The following function is used to create :ref:`heap types `:" +msgstr "تابع زیر برای ایجاد :ref:`انواع انباشته ` استفاده می‌شود:" -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 "فراکلاس *metaclass* برای ساخت شیء نوع حاصل استفاده می‌شود. وقتی *metaclass* برابر ``NULL`` باشد، فراکلاس از *bases* به دست می‌آید (یا از جایگاه‌های *Py_tp_base[s]* اگر *bases* برابر ``NULL`` باشد؛ در ادامه ببینید)." - -msgid "Metaclasses that override :c:member:`~PyTypeObject.tp_new` are not supported, except if ``tp_new`` is ``NULL``." -msgstr "فراکلاس‌هایی که :c:member:`~PyTypeObject.tp_new` را بازنویسی می‌کنند پشتیبانی نمی‌شوند، مگر آنکه ``tp_new`` برابر ``NULL`` باشد." - -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 :c:data:`Py_tp_bases` slot is used instead. If that also is ``NULL``, the :c:data:`Py_tp_base` slot is used instead. If that also is ``NULL``, the new type derives from :class:`object`." -msgstr "می‌توان از آرگومان *bases* برای تعیین کلاس‌های پایه استفاده کرد؛ این آرگومان می‌تواند تنها یک کلاس یا یک تاپل از کلاس‌ها باشد. اگر *bases* برابر ``NULL`` باشد، در عوض از جایگاه :c:data:`Py_tp_bases` استفاده می‌شود. اگر آن نیز ``NULL`` باشد، در عوض از جایگاه :c:data:`Py_tp_base` استفاده می‌شود. اگر آن نیز ``NULL`` باشد، نوع جدید از :class:`object` مشتق می‌شود." - -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``, the module is associated with the new type and can later be retrieved with :c:func:`PyType_GetModule`. The associated module is not inherited by subclasses; it must be specified for each class individually." -msgstr "می‌توان از آرگومان *module* برای ثبت ماژولی که کلاس جدید در آن تعریف می‌شود، استفاده کرد. این آرگومان باید یک شیء ماژول یا ``NULL`` باشد. اگر ``NULL`` نباشد، ماژول با نوع جدید مرتبط می‌شود و بعداً می‌توان آن را با :c:func:`PyType_GetModule` بازیابی کرد. ماژول مرتبط به زیرکلاس‌ها به ارث نمی‌رسد؛ باید برای هر کلاس به‌طور جداگانه مشخص شود." +msgid "Create and return a :ref:`heap type ` from a :c:type:`!PySlot` array. See :ref:`capi-slots` for general information on slots, and :ref:`pyslot_type_slot_ids` for slots specific to type creation." +msgstr "یک :ref:`نوع هیپ ` را از یک آرایه :c:type:`!PySlot` ایجاد کرده و برگردانید. برای اطلاعات عمومی درباره‌ی جایگاه‌ها به :ref:`capi-slots` و برای جایگاه‌های خاصِ ایجاد نوع به :ref:`pyslot_type_slot_ids` مراجعه کنید." msgid "This function calls :c:func:`PyType_Ready` on the new type." msgstr "این تابع :c:func:`PyType_Ready` را روی نوع جدید فراخوانی می‌کند." @@ -247,29 +260,44 @@ msgstr ":py:meth:`~object.__init_subclass__` روی هیچ‌یک از کلاس msgid ":py:meth:`~object.__set_name__` is not called on new descriptors." msgstr ":py:meth:`~object.__set_name__` روی توصیف‌گرهای جدید فراخوانی نمی‌شود." -msgid "Equivalent to ``PyType_FromMetaclass(NULL, module, spec, bases)``." -msgstr "معادل ``PyType_FromMetaclass(NULL, module, spec, bases)`` است." - -msgid "The function now accepts a single class as the *bases* argument and ``NULL`` as the ``tp_doc`` slot." -msgstr "این تابع اکنون یک کلاس منفرد را به‌عنوان آرگومان *bases* و ``NULL`` را به‌عنوان جایگاه ``tp_doc`` می‌پذیرد." - -msgid "The function now finds and uses a metaclass corresponding to the provided base classes. Previously, only :class:`type` instances were returned." -msgstr "این تابع اکنون فراکلاسی متناظر با کلاس‌های پایه‌ی ارائه‌شده را می‌یابد و از آن استفاده می‌کند. پیش‌تر، تنها نمونه‌های :class:`type` برگردانده می‌شدند." - -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:member:`~PyTypeObject.tp_new` مربوط به فراکلاس *نادیده گرفته می‌شود*. که ممکن است به مقداردهی اولیه‌ی ناقص منجر شود. ایجاد کلاس‌هایی که فراکلاس آن‌ها :c:member:`~PyTypeObject.tp_new` را بازنویسی می‌کند، منسوخ شده است." +msgid "Slots are typically defined as a global static constant arrays. However, sometimes slot values are not statically known at compile time. For example, slots like :c:data:`Py_tp_bases`, :c:data:`Py_tp_metaclass` and :c:data:`Py_tp_module` require live Python objects. In this case, it is recommended to put such slots on the stack, and use :c:macro:`Py_slot_subslots` to refer to an array of static slots. For example::" +msgstr "جایگاه‌ها معمولاً به عنوان آرایه‌های ثابتِ ایستا و سراسری تعریف می‌شوند. با این حال، گاهی اوقات مقادیر جایگاه در زمان کامپایل به طور ایستا شناخته نمی‌شوند. برای مثال، جایگاه‌هایی مانند :c:data:`Py_tp_bases`، :c:data:`Py_tp_metaclass` و :c:data:`Py_tp_module` به شیء‌های زنده‌ی پایتون نیاز دارند. در این صورت، توصیه می‌شود چنین جایگاه‌هایی را روی پشته قرار دهید و از :c:macro:`Py_slot_subslots` برای ارجاع به آرایه‌ای از جایگاه‌های ایستا استفاده کنید. برای مثال::" -msgid "Creating classes whose metaclass overrides :c:member:`~PyTypeObject.tp_new` is no longer allowed." -msgstr "ساخت کلاس‌هایی که فراکلاس آن‌ها :c:member:`~PyTypeObject.tp_new` را بازنویسی می‌کند، دیگر مجاز نیست." - -msgid "Equivalent to ``PyType_FromMetaclass(NULL, NULL, spec, bases)``." -msgstr "معادل ``PyType_FromMetaclass(NULL, NULL, spec, bases)`` است." - -msgid "Equivalent to ``PyType_FromMetaclass(NULL, NULL, spec, NULL)``." -msgstr "معادل ``PyType_FromMetaclass(NULL, NULL, spec, NULL)`` است." - -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 "این تابع اکنون فراکلاسی متناظر با کلاس‌های پایه‌ی ارائه‌شده در جایگاه‌های *Py_tp_base[s]* را می‌یابد و از آن استفاده می‌کند. پیش‌تر، تنها نمونه‌های :class:`type` برگردانده می‌شدند." +msgid "" +"static const PySlot my_slots[] = {\n" +" PySlot_STATIC_DATA(Py_tp_name, \"MyClass\"),\n" +" PySlot_FUNC(Py_tp_repr, my_repr_func),\n" +" ...\n" +" PySlot_END\n" +"};\n" +"\n" +"PyObject *make_my_class(PyObject *module) {\n" +" PySlot all_slots[] = {\n" +" PySlot_STATIC_DATA(Py_slot_subslots, my_slots),\n" +" PySlot_DATA(Py_tp_module, module),\n" +" PySlot_END\n" +" };\n" +" return PyType_FromSlots(all_slots);\n" +"}" +msgstr "" +"static const PySlot my_slots[] = {\n" +" PySlot_STATIC_DATA(Py_tp_name, \"MyClass\"),\n" +" PySlot_FUNC(Py_tp_repr, my_repr_func),\n" +" ...\n" +" PySlot_END\n" +"};\n" +"\n" +"PyObject *make_my_class(PyObject *module) {\n" +" PySlot all_slots[] = {\n" +" PySlot_STATIC_DATA(Py_slot_subslots, my_slots),\n" +" PySlot_DATA(Py_tp_module, module),\n" +" PySlot_END\n" +" };\n" +" return PyType_FromSlots(all_slots);\n" +"}" + +msgid "Heap types created without the :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` flag may be modified, for example by setting attributes on them, as with classes defined in Python code. Sometimes, such modifications are necessary to fully initialize a type, but you may wish to prevent users from changing the type after the initialization is done:" +msgstr "انواع هیپ (heap types) ایجادشده بدون پرچم :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` ممکن است تغییر داده شوند؛ برای نمونه با تعیین ویژگی‌ها روی آن‌ها، درست مانند کلاس‌های تعریف‌شده در کد پایتون. گاهی اوقات، چنین تغییراتی برای مقداردهی اولیه کامل یک نوع ضروری هستند، اما ممکن است بخواهید پس از اتمام مقداردهی اولیه، از تغییر نوع توسط کاربران جلوگیری کنید:" msgid "Make a type immutable: set the :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` flag." msgstr "برای تغییرناپذیر کردن یک نوع: پرچم :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` را تنظیم کنید." @@ -283,62 +311,11 @@ msgstr "در صورت موفقیت، ``0`` را برمی‌گرداند. در ص 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 "از نوع نباید پیش از تغییرناپذیر شدن آن استفاده شود. برای مثال، نمونه‌های نوع نباید پیش از تغییرناپذیر شدن نوع ایجاد شوند." -msgid "Structure defining a type's behavior." -msgstr "ساختاری که رفتار یک نوع را تعریف می‌کند." - -msgid "Name of the type, used to set :c:member:`PyTypeObject.tp_name`." -msgstr "نام نوع، که برای تنظیم :c:member:`PyTypeObject.tp_name` استفاده می‌شود." - -msgid "If positive, specifies the size of the instance in bytes. It is used to set :c:member:`PyTypeObject.tp_basicsize`." -msgstr "اگر مثبت باشد، اندازه‌ی نمونه را بر حسب بایت مشخص می‌کند. از آن برای تنظیم :c:member:`PyTypeObject.tp_basicsize` استفاده می‌شود." - -msgid "If zero, specifies that :c:member:`~PyTypeObject.tp_basicsize` should be inherited." -msgstr "اگر صفر باشد، مشخص می‌کند که :c:member:`~PyTypeObject.tp_basicsize` باید به ارث برده شود." - -msgid "If negative, the absolute value specifies how much space instances of the class need *in addition* to the superclass. Use :c:func:`PyObject_GetTypeData` to get a pointer to subclass-specific memory reserved this way. For negative :c:member:`!basicsize`, Python will insert padding when needed to meet :c:member:`~PyTypeObject.tp_basicsize`'s alignment requirements." -msgstr "اگر منفی باشد، قدر مطلق آن مشخص می‌کند که نمونه‌های کلاس *علاوه بر* ابرکلاس به چه مقدار فضا نیاز دارند. برای دریافت اشاره‌گر به حافظه‌ی اختصاصی زیرکلاس که به این شیوه رزرو شده است، از :c:func:`PyObject_GetTypeData` استفاده کنید. برای :c:member:`!basicsize` منفی، پایتون در صورت نیاز پدینگ اضافه خواهد کرد تا نیازمندی‌های ترازبندیِ :c:member:`~PyTypeObject.tp_basicsize` را برآورده کند." +msgid "Type slot IDs" +msgstr "شناسه‌های جایگاه نوع" -msgid "Previously, this field could not be negative." -msgstr "پیش‌تر، این فیلد نمی‌توانست منفی باشد." - -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:member:`PyTypeObject.tp_itemsize` استفاده می‌شود. برای هشدارها به مستندات ``tp_itemsize`` مراجعه کنید." - -msgid "If zero, :c:member:`~PyTypeObject.tp_itemsize` is inherited. Extending arbitrary variable-sized classes is dangerous, since some types use a fixed offset for variable-sized memory, which can then overlap fixed-sized memory used by a subclass. To help prevent mistakes, inheriting ``itemsize`` is only possible in the following situations:" -msgstr "اگر صفر باشد، :c:member:`~PyTypeObject.tp_itemsize` به ارث برده می‌شود. گسترش کلاس‌های اندازه‌متغیرِ دلخواه خطرناک است، زیرا برخی نوع‌ها برای حافظه‌ی اندازه‌متغیر از آفست ثابت استفاده می‌کنند که در نتیجه می‌تواند با حافظه‌ی اندازه‌ثابتِ استفاده‌شده توسط یک زیرکلاس هم‌پوشانی پیدا کند. برای کمک به جلوگیری از اشتباهات، ارث‌بری ``itemsize`` تنها در شرایط زیر ممکن است:" - -msgid "The base is not variable-sized (its :c:member:`~PyTypeObject.tp_itemsize` is zero)." -msgstr "پایه اندازه‌متغیر نیست (:c:member:`~PyTypeObject.tp_itemsize` آن صفر است)." - -msgid "The requested :c:member:`PyType_Spec.basicsize` is positive, suggesting that the memory layout of the base class is known." -msgstr "مقدار درخواستی :c:member:`PyType_Spec.basicsize` مثبت است، که نشان می‌دهد چیدمان حافظه‌ی کلاس پایه معلوم است." - -msgid "The requested :c:member:`PyType_Spec.basicsize` is zero, suggesting that the subclass does not access the instance's memory directly." -msgstr ":c:member:`PyType_Spec.basicsize` درخواست‌شده صفر است، که نشان می‌دهد زیرکلاس مستقیماً به حافظه‌ی نمونه دسترسی ندارد." - -msgid "With the :c:macro:`Py_TPFLAGS_ITEMS_AT_END` flag." -msgstr "با پرچم :c:macro:`Py_TPFLAGS_ITEMS_AT_END`." - -msgid "Type flags, used to set :c:member:`PyTypeObject.tp_flags`." -msgstr "پرچم‌های نوع، که برای تنظیم :c:member:`PyTypeObject.tp_flags` به کار می‌روند." - -msgid "If the ``Py_TPFLAGS_HEAPTYPE`` flag is not set, :c:func:`PyType_FromSpecWithBases` sets it automatically." -msgstr "اگر پرچم ``Py_TPFLAGS_HEAPTYPE`` تنظیم‌نشده باشد، تابع :c:func:`PyType_FromSpecWithBases` آن را به‌طور خودکار تنظیم می‌کند." - -msgid "Array of :c:type:`PyType_Slot` structures. Terminated by the special slot value ``{0, NULL}``." -msgstr "آرایه‌ای از ساختارهای :c:type:`PyType_Slot`. با مقدار جایگاه ویژه‌ی ``{0, NULL}`` پایان می‌یابد." - -msgid "Each slot ID should be specified at most once." -msgstr "هر شناسه‌ی جایگاه باید حداکثر یک‌بار مشخص شود." - -msgid "Structure defining optional functionality of a type, containing a slot ID and a value pointer." -msgstr "ساختاری که کارکرد اختیاری یک نوع را تعریف می‌کند و شامل شناسه‌ی جایگاه و اشاره‌گر مقدار است." - -msgid "A slot ID." -msgstr "شناسه‌ی جایگاه." - -msgid "Slot IDs are named like the field names of the structures :c:type:`PyTypeObject`, :c:type:`PyNumberMethods`, :c:type:`PySequenceMethods`, :c:type:`PyMappingMethods` and :c:type:`PyAsyncMethods` with an added ``Py_`` prefix. For example, use:" -msgstr "شناسه‌های جایگاه مانند نام فیلدهای ساختارهای :c:type:`PyTypeObject`، :c:type:`PyNumberMethods`، :c:type:`PySequenceMethods`، :c:type:`PyMappingMethods` و :c:type:`PyAsyncMethods` با افزودن پیشوند ``Py_`` نام‌گذاری می‌شوند. برای مثال، از این استفاده کنید:" +msgid "Most type slot IDs are named like the field names of the structures :c:type:`PyTypeObject`, :c:type:`PyNumberMethods`, :c:type:`PySequenceMethods`, :c:type:`PyMappingMethods` and :c:type:`PyAsyncMethods` with an added ``Py_`` prefix. For example, use:" +msgstr "بیشتر شناسه‌های جایگاه نوع مانند نام فیلدهای ساختارهای :c:type:`PyTypeObject`، :c:type:`PyNumberMethods`، :c:type:`PySequenceMethods`، :c:type:`PyMappingMethods` و :c:type:`PyAsyncMethods` با یک پیشوند اضافه‌شده‌ی ``Py_`` نام‌گذاری می‌شوند. برای مثال، از این مورد استفاده کنید:" msgid ":c:data:`Py_tp_dealloc` to set :c:member:`PyTypeObject.tp_dealloc`" msgstr ":c:data:`Py_tp_dealloc` برای تنظیم :c:member:`PyTypeObject.tp_dealloc`" @@ -349,12 +326,33 @@ msgstr ":c:data:`Py_nb_add` برای تنظیم :c:member:`PyNumberMethods.nb_ad msgid ":c:data:`Py_sq_length` to set :c:member:`PySequenceMethods.sq_length`" msgstr ":c:data:`Py_sq_length` برای تنظیم :c:member:`PySequenceMethods.sq_length`" -msgid "An additional slot is supported that does not correspond to a :c:type:`!PyTypeObject` struct field:" -msgstr "یک جایگاه اضافی پشتیبانی می‌شود که با هیچ فیلدی از ساختار :c:type:`!PyTypeObject` مطابق نیست:" +msgid "The following slots need additional considerations when specified as slots:" +msgstr "هنگامی که جایگاه‌های زیر به عنوان جایگاه مشخص می‌شوند، به بررسی‌های اضافی نیاز دارند:" + +msgid ":c:data:`Py_tp_name`" +msgstr ":c:data:`Py_tp_name`" + +msgid ":c:data:`Py_tp_basicsize` and :c:data:`Py_tp_extra_basicsize`" +msgstr ":c:data:`Py_tp_basicsize` و :c:data:`Py_tp_extra_basicsize`" + +msgid ":c:data:`Py_tp_itemsize`" +msgstr ":c:data:`Py_tp_itemsize`" + +msgid ":c:data:`Py_tp_flags`" +msgstr ":c:data:`Py_tp_flags`" + +msgid "Additional slots do not directly correspond to a :c:type:`!PyTypeObject` struct field:" +msgstr "جایگاه‌های اضافی مستقیماً با یک فیلد ساختار :c:type:`!PyTypeObject` مطابقت ندارند:" msgid ":c:data:`Py_tp_token`" msgstr ":c:data:`Py_tp_token`" +msgid ":c:data:`Py_tp_metaclass`" +msgstr ":c:data:`Py_tp_metaclass`" + +msgid ":c:data:`Py_tp_module`" +msgstr ":c:data:`Py_tp_module`" + msgid "The following “offset” fields cannot be set using :c:type:`PyType_Slot`:" msgstr "فیلدهای «آفست» زیر را نمی‌توان با استفاده از :c:type:`PyType_Slot` تنظیم کرد:" @@ -376,8 +374,17 @@ msgstr "هنگام ایجاد نوع هیپ، فیلد‌های داخلی زی 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:member:`~PyTypeObject.tp_dict`، :c:member:`~PyTypeObject.tp_mro`، :c:member:`~PyTypeObject.tp_cache`، :c:member:`~PyTypeObject.tp_subclasses`، و :c:member:`~PyTypeObject.tp_weaklist`." -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:data:`Py_tp_bases` یا :c:data:`Py_tp_base` ممکن است روی برخی پلتفرم‌ها مشکل‌ساز باشد. برای پرهیز از مشکلات، به‌جای آن از آرگومان *bases* در :c:func:`PyType_FromSpecWithBases` استفاده کنید." +msgid "The :c:data:`Py_tp_base` slot is equivalent to :c:data:`Py_tp_bases`; both may be set either to a type or a tuple of types. If both are specified, the value of :c:data:`Py_tp_bases` is used." +msgstr "جایگاه :c:data:`Py_tp_base` معادل :c:data:`Py_tp_bases` است؛ هر دو را می‌توان روی یک نوع یا یک تاپل از نوع‌ها تنظیم کرد. اگر هر دو مشخص شوند، مقدار :c:data:`Py_tp_bases` به کار گرفته می‌شود." + +msgid "Slot values may not be ``NULL``, except for the following:" +msgstr "مقادیر جایگاه نمی‌توانند ``NULL`` باشند، به جز موارد زیر:" + +msgid ":c:data:`Py_tp_doc`" +msgstr ":c:data:`Py_tp_doc`" + +msgid ":c:data:`Py_tp_token` (for clarity, prefer :c:data:`Py_TP_USE_SPEC` rather than ``NULL``)" +msgstr ":c:data:`Py_tp_token` (برای شفافیت، :c:data:`Py_TP_USE_SPEC` را به‌جای ``NULL`` ترجیح دهید)" msgid "Slots in :c:type:`PyBufferProcs` may be set in the unlimited API." msgstr "جایگاه‌های :c:type:`PyBufferProcs` را می‌توان در API نامحدود تنظیم کرد." @@ -388,23 +395,140 @@ msgstr ":c:member:`~PyBufferProcs.bf_getbuffer` و :c:member:`~PyBufferProcs.bf_ msgid "The field :c:member:`~PyTypeObject.tp_vectorcall` can now be set using :c:data:`Py_tp_vectorcall`. See the field's documentation for details." msgstr "فیلد :c:member:`~PyTypeObject.tp_vectorcall` اکنون می‌تواند با استفاده از :c:data:`Py_tp_vectorcall` تنظیم شود. برای جزئیات، به مستندات این فیلد مراجعه کنید." -msgid "The desired value of the slot. In most cases, this is a pointer to a function." -msgstr "مقدار موردنظر جایگاه. در بیشتر موارد، این یک اشاره‌گر به تابع است." +msgid "The :c:data:`Py_tp_bases` slot may be set to a single type object, making it equivalent to the :c:data:`Py_tp_base` slot. Previously, a tuple of types was required." +msgstr "جایگاه :c:data:`Py_tp_bases` را می‌توان روی یک شیء نوع منفرد تنظیم کرد که آن را با جایگاه :c:data:`Py_tp_base` معادل می‌سازد. پیش‌تر، یک تاپل از نوع‌ها مورد نیاز بود." -msgid "*pfunc* values may not be ``NULL``, except for the following slots:" -msgstr "مقادیر *pfunc* نمی‌توانند ``NULL`` باشند، به‌جز جایگاه‌های زیر:" +msgid "The following slots correspond to fields in the underlying type structure, but need extra remarks for use as slots:" +msgstr "جایگاه‌های زیر با فیلدهای موجود در ساختار نوع زیرین مطابقت دارند، اما برای استفاده به عنوان جایگاه به نکات اضافه‌تری نیاز دارند:" -msgid ":c:data:`Py_tp_doc`" -msgstr ":c:data:`Py_tp_doc`" +msgid ":c:member:`Slot ID ` for the name of the type, used to set :c:member:`PyTypeObject.tp_name`." +msgstr ":c:member:`Slot ID ` برای نام نوع، که برای تنظیم :c:member:`PyTypeObject.tp_name` استفاده می‌شود." -msgid ":c:data:`Py_tp_token` (for clarity, prefer :c:data:`Py_TP_USE_SPEC` rather than ``NULL``)" -msgstr ":c:data:`Py_tp_token` (برای شفافیت، :c:data:`Py_TP_USE_SPEC` را به‌جای ``NULL`` ترجیح دهید)" +msgid "This slot (or :c:member:`PyType_Spec.name`) is required to create a type." +msgstr "این جایگاه (یا :c:member:`PyType_Spec.name`) برای ایجاد یک نوع الزامی است." + +msgid "This may not be used in :c:member:`PyType_Spec.slots`. Use :c:member:`PyType_Spec.name` instead." +msgstr "نمی‌توان از این مورد در :c:member:`PyType_Spec.slots` استفاده کرد. به جای آن از :c:member:`PyType_Spec.name` استفاده کنید." + +msgid "CPython processes slots in order. It is recommended to put ``Py_tp_name`` at the beginning of the slots array, so that if processing of a later slots fails, error messages can include the name." +msgstr "سی‌پایتون جایگاه‌ها را به ترتیب پردازش می‌کند. توصیه می‌شود ``Py_tp_name`` را در ابتدای آرایه‌ی جایگاه‌ها قرار دهید تا اگر پردازش جایگاه‌های بعدی با خطا مواجه شد، پیام‌های خطا بتوانند نام را شامل شوند." + +msgid ":c:member:`Slot ID ` for the size of the instance in bytes. It is used to set :c:member:`PyTypeObject.tp_basicsize`." +msgstr ":c:member:`Slot ID ` برای اندازه‌ی نمونه بر حسب بایت. از آن برای تنظیم :c:member:`PyTypeObject.tp_basicsize` استفاده می‌شود." + +msgid "The value must be positive." +msgstr "مقدار باید مثبت باشد." + +msgid "This may not be used in :c:member:`PyType_Spec.slots`. Use :c:member:`PyType_Spec.basicsize` instead." +msgstr "نمی‌توان از این مورد در :c:member:`PyType_Spec.slots` استفاده کرد. به جای آن از :c:member:`PyType_Spec.basicsize` استفاده کنید." + +msgid "This slot may not be used with :c:func:`PyType_GetSlot`. Use :c:member:`PyTypeObject.tp_basicsize` instead if needed, but be aware that a type's size is often considered an implementation detail." +msgstr "نمی‌توان از این جایگاه با :c:func:`PyType_GetSlot` استفاده کرد. در صورت نیاز به جای آن از :c:member:`PyTypeObject.tp_basicsize` استفاده کنید، اما آگاه باشید که اندازه‌ی یک نوع اغلب جزئیات پیاده‌سازی در نظر گرفته می‌شود." + +msgid ":c:member:`Slot ID ` for type data size in bytes, that is, how much space instances of the class need *in addition* to space needed for superclasses." +msgstr ":c:member:`Slot ID ` برای اندازه‌ی داده‌ی نوع بر حسب بایت، یعنی این که نمونه‌های کلاس *علاوه بر* فضای مورد نیاز برای کلاس‌های والد، به چه مقدار فضا نیاز دارند." + +msgid "The value is used, together with the size of superclasses, to set :c:member:`PyTypeObject.tp_basicsize`. Python will insert padding as needed to meet :c:member:`!tp_basicsize`'s alignment requirements." +msgstr "این مقدار به همراه اندازه‌ی کلاس‌های والد، برای تنظیم :c:member:`PyTypeObject.tp_basicsize` استفاده می‌شود. پایتون در صورت نیاز برای برآورده کردن الزامات تراز کردن :c:member:`!tp_basicsize`، پدینگ (padding) درج خواهد کرد." + +msgid "Use :c:func:`PyObject_GetTypeData` to get a pointer to subclass-specific memory reserved this way." +msgstr "از :c:func:`PyObject_GetTypeData` برای دریافت یک اشاره‌گر به حافظه‌ی مختص زیرکلاس که به این روش رزرو شده است استفاده کنید." + +msgid "The value must be positive. To specify that instances need no additional size (that is, size should be inherited), omit the :c:macro:`!Py_tp_extra_basicsize` slot rather than set it to zero." +msgstr "مقدار باید مثبت باشد. برای مشخص کردن اینکه نمونه‌ها به اندازه‌ی اضافی نیاز ندارند (یعنی اندازه باید به ارث برسد)، به جای تنظیم آن روی صفر، جایگاه :c:macro:`!Py_tp_extra_basicsize` را حذف کنید." + +msgid "Specifying both :c:macro:`Py_tp_basicsize` and :c:macro:`!Py_tp_extra_basicsize` is an error." +msgstr "مشخص کردن هم‌زمان :c:macro:`Py_tp_basicsize` و :c:macro:`!Py_tp_extra_basicsize` یک خطا است." + +msgid "This may not be used in :c:member:`PyType_Spec.slots`. Use negative :c:member:`PyType_Spec.basicsize` instead." +msgstr "نمی‌توان از این مورد در :c:member:`PyType_Spec.slots` استفاده کرد. به جای آن از :c:member:`PyType_Spec.basicsize` منفی استفاده کنید." + +msgid "This slot may not be used with :c:func:`PyType_GetSlot`." +msgstr "نمی‌توان از این جایگاه با :c:func:`PyType_GetSlot` استفاده کرد." + +msgid ":c:member:`Slot ID ` for the size of one element of a variable-size type, in bytes. Used to set :c:member:`PyTypeObject.tp_itemsize`. See :c:member:`!tp_itemsize` documentation for caveats." +msgstr ":c:member:`Slot ID ` برای اندازه‌ی یک عنصر از یک نوع با اندازه‌ی متغیر، بر حسب بایت. برای تنظیم :c:member:`PyTypeObject.tp_itemsize` استفاده می‌شود. برای نکات مهم، مستندات :c:member:`!tp_itemsize` را ببینید." -msgid "A :c:member:`~PyType_Slot.slot` that records a static memory layout ID for a class." -msgstr "یک :c:member:`~PyType_Slot.slot` که شناسه‌ی چیدمان حافظه‌ی ایستا را برای یک کلاس ثبت می‌کند." +msgid "If this slot is missing, :c:member:`~PyTypeObject.tp_itemsize` is inherited. Extending arbitrary variable-sized classes is dangerous, since some types use a fixed offset for variable-sized memory, which can then overlap fixed-sized memory used by a subclass. To help prevent mistakes, inheriting ``itemsize`` is only possible in the following situations:" +msgstr "اگر این جایگاه موجود نباشد، :c:member:`~PyTypeObject.tp_itemsize` به ارث برده می‌شود. گسترش کلاس‌های با اندازه‌ی متغیر دلخواه خطرناک است، زیرا برخی از انواع از یک آفست ثابت برای حافظه‌ی با اندازه‌ی متغیر استفاده می‌کنند که در این صورت می‌تواند با حافظه‌ی با اندازه‌ی ثابت که توسط زیرکلاس استفاده می‌شود، تداخل پیدا کند. برای کمک به جلوگیری از اشتباهات، ارث‌بری ``itemsize`` فقط در موقعیت‌های زیر امکان‌پذیر است:" -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:type:`PyType_Spec` کلاس به‌صورت ایستا تخصیص یافته باشد، می‌توان توکن را با استفاده از مقدار ویژه‌ی :c:data:`Py_TP_USE_SPEC` برابر با مشخصه تنظیم کرد:" +msgid "The base is not variable-sized (its :c:member:`~PyTypeObject.tp_itemsize` is zero)." +msgstr "پایه اندازه‌متغیر نیست (:c:member:`~PyTypeObject.tp_itemsize` آن صفر است)." + +msgid "The requested :c:member:`PyType_Spec.basicsize` is positive, suggesting that the memory layout of the base class is known." +msgstr "مقدار درخواستی :c:member:`PyType_Spec.basicsize` مثبت است، که نشان می‌دهد چیدمان حافظه‌ی کلاس پایه معلوم است." + +msgid "The requested :c:member:`PyType_Spec.basicsize` is zero, suggesting that the subclass does not access the instance's memory directly." +msgstr ":c:member:`PyType_Spec.basicsize` درخواست‌شده صفر است، که نشان می‌دهد زیرکلاس مستقیماً به حافظه‌ی نمونه دسترسی ندارد." + +msgid "With the :c:macro:`Py_TPFLAGS_ITEMS_AT_END` flag." +msgstr "با پرچم :c:macro:`Py_TPFLAGS_ITEMS_AT_END`." + +msgid "This may not be used in :c:member:`PyType_Spec.slots`. Use :c:member:`PyType_Spec.itemsize` instead." +msgstr "این مورد را نمی‌توان در :c:member:`PyType_Spec.slots` استفاده کرد. به‌جای آن از :c:member:`PyType_Spec.itemsize` استفاده کنید." + +msgid ":c:member:`Slot ID ` for type flags, used to set :c:member:`PyTypeObject.tp_flags`." +msgstr ":c:member:`Slot ID ` برای پرچم‌های نوع، که برای تنظیم :c:member:`PyTypeObject.tp_flags` استفاده می‌شود." + +msgid "The ``Py_TPFLAGS_HEAPTYPE`` flag is not set, :c:func:`PyType_FromSpecWithBases` sets it automatically." +msgstr "پرچم ``Py_TPFLAGS_HEAPTYPE`` تنظیم نشده است، :c:func:`PyType_FromSpecWithBases` آن را به طور خودکار تنظیم می‌کند." + +msgid "This slot may not be used with :c:func:`PyType_GetSlot`. Use :c:func:`PyType_GetFlags` instead." +msgstr "این جایگاه را نمی‌توان با :c:func:`PyType_GetSlot` استفاده کرد. به‌جای آن از :c:func:`PyType_GetFlags` استفاده کنید." + +msgid ":c:member:`Slot ID ` for type flags, used to set :c:member:`PyTypeObject.tp_bases`." +msgstr ":c:member:`Slot ID ` برای پرچم‌های نوع، که برای تنظیم :c:member:`PyTypeObject.tp_bases` استفاده می‌شود." + +msgid "The slot can be set to a tuple of type objects which the newly created type should inherit from, like the \"positional arguments\" of a Python :ref:`class definition `." +msgstr "این جایگاه را می‌توان روی تاپلی از شیءهای نوع تنظیم کرد که نوع تازه ایجادشده باید از آن‌ها ارث‌بری کند، مانند «آرگومان‌های جایگاهی» در :ref:`تعریف کلاس ` پایتون." + +msgid "Alternately, the slot can be set to a single type object to specify a single base. The effect is the same as specifying a one-element tuple." +msgstr "به‌عنوان جایگزین، این جایگاه را می‌توان روی یک شیء نوع واحد تنظیم کرد تا یک پایه (base) منفرد مشخص شود. اثر آن همانند مشخص کردن یک تاپل تک‌عنصری است." + +msgid "Previously, :c:macro:`!Py_tp_bases` required a tuple of types." +msgstr "پیش‌تر، :c:macro:`!Py_tp_bases` به یک تاپل از نوع‌ها نیاز داشت." + +msgid "Equivalent to :c:macro:`Py_tp_bases` (with ``s`` at the end). If both are specified, :c:macro:`!Py_tp_bases` takes priority and this slot is ignored." +msgstr "معادل :c:macro:`Py_tp_bases` (با یک ``s`` در انتها). اگر هر دو مشخص شوند، :c:macro:`!Py_tp_bases` اولویت دارد و این جایگاه نادیده گرفته می‌شود." + +msgid "Previously, :c:macro:`!Py_tp_base` required a single type, not a tuple." +msgstr "پیش‌تر، :c:macro:`!Py_tp_base` به یک نوع منفرد نیاز داشت، نه یک تاپل." + +msgid "When not targeting older Python versions, prefer :c:macro:`!Py_tp_bases`." +msgstr "هنگامی که نسخه‌های قدیمی‌تر پایتون را هدف قرار نمی‌دهید، :c:macro:`!Py_tp_bases` را ترجیح دهید." + +msgid "The following slots do not correspond to public fields in the underlying structures:" +msgstr "جایگاه‌های زیر با فیلدهای عمومی در ساختارهای زیرین مطابقت ندارند:" + +msgid ":c:member:`Slot ID ` for the metaclass used to construct the resulting type object. When omitted the metaclass is derived from bases (:c:macro:`Py_tp_bases` or the *bases* argument of :c:func:`PyType_FromMetaclass`)." +msgstr ":c:member:`Slot ID ` برای فراکلاسی که برای ساخت شیء نوع حاصل استفاده می‌شود. هنگامی که حذف شود، فراکلاس از پایه‌ها (:c:macro:`Py_tp_bases` یا آرگومان *bases* در :c:func:`PyType_FromMetaclass`) مشتق می‌شود." + +msgid "Metaclasses that override :c:member:`~PyTypeObject.tp_new` are not supported, except if ``tp_new`` is ``NULL``." +msgstr "فراکلاس‌هایی که :c:member:`~PyTypeObject.tp_new` را بازنویسی می‌کنند پشتیبانی نمی‌شوند، مگر آنکه ``tp_new`` برابر ``NULL`` باشد." + +msgid "This may not be used in :c:member:`PyType_Spec.slots`. Use :c:func:`PyType_FromMetaclass` to specify a metaclass with :c:type:`!PyType_Spec`." +msgstr "این مورد را نمی‌توان در :c:member:`PyType_Spec.slots` استفاده کرد. برای مشخص کردن یک فراکلاس با :c:type:`!PyType_Spec` از :c:func:`PyType_FromMetaclass` استفاده کنید." + +msgid "This slot may not be used with :c:func:`PyType_GetSlot`. Use :c:func:`Py_TYPE` on the type object instead." +msgstr "این جایگاه را نمی‌توان با :c:func:`PyType_GetSlot` استفاده کرد. به‌جای آن از :c:func:`Py_TYPE` روی شیء نوع استفاده کنید." + +msgid ":c:member:`Slot ID ` for recording the module in which the new class is defined." +msgstr ":c:member:`شناسه‌ی جایگاه ` برای ثبت ماژولی که کلاس جدید در آن تعریف شده است." + +msgid "The value must be a module object. The module is associated with the new type and can later be retrieved with :c:func:`PyType_GetModule`. The associated module is not inherited by subclasses; it must be specified for each class individually." +msgstr "مقدار باید یک شیء ماژول باشد. این ماژول با نوع جدید مرتبط می‌شود و بعداً می‌توان آن را با :c:func:`PyType_GetModule` بازیابی کرد. ماژول مرتبط توسط زیرکلاس‌ها به ارث برده نمی‌شود؛ بلکه باید برای هر کلاس به طور جداگانه مشخص شود." + +msgid "This may not be used in :c:member:`PyType_Spec.slots`. Use :c:func:`PyType_FromMetaclass` to specify a module with :c:type:`!PyType_Spec`." +msgstr "این مورد را نمی‌توان در :c:member:`PyType_Spec.slots` استفاده کرد. برای مشخص کردن یک ماژول با :c:type:`!PyType_Spec` از :c:func:`PyType_FromMetaclass` استفاده کنید." + +msgid "This slot may not be used with :c:func:`PyType_GetSlot`. Use :c:func:`PyType_GetModule` instead." +msgstr "این جایگاه را نمی‌توان با :c:func:`PyType_GetSlot` استفاده کرد. به‌جای آن از :c:func:`PyType_GetModule` استفاده کنید." + +msgid ":c:member:`Slot ID ` for recording a static memory layout ID for a class." +msgstr ":c:member:`Slot ID ` برای ثبت یک شناسه‌ی طرح‌بندی حافظه‌ی ایستا برای یک کلاس." + +msgid "If the class is defined using a :c:type:`PyType_Spec`, and that spec is statically allocated, the token can be set to the spec using the special value :c:data:`Py_TP_USE_SPEC`:" +msgstr "اگر کلاس با استفاده از :c:type:`PyType_Spec` تعریف شود و آن مشخصات به صورت ایستا تخصیص یافته باشد، می‌توان توکن را با استفاده از مقادیر خاص :c:data:`Py_TP_USE_SPEC` روی مشخصات تنظیم کرد:" msgid "" "static PyType_Slot foo_slots[] = {\n" @@ -428,11 +552,147 @@ msgstr "از :c:func:`PyType_GetBaseByToken` برای بررسی این‌که msgid "To get the token for a given class (without considering superclasses), use :c:func:`PyType_GetSlot` with ``Py_tp_token``." msgstr "برای به‌دست‌آوردن توکن یک کلاس معین (بدون در نظر گرفتن کلاس‌های والد)، از :c:func:`PyType_GetSlot` با ``Py_tp_token`` استفاده کنید." -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``." -msgstr "به عنوان یک مقدار همراه با :c:data:`Py_tp_token` برای تنظیم توکن به :c:type:`PyType_Spec` کلاس استفاده می‌شود. به ``NULL`` بسط می‌یابد." +msgid "Used as a value with :c:data:`Py_tp_token` to set the token to the class's :c:type:`PyType_Spec`. May only be used for classes defined using :c:type:`!PyType_Spec`." +msgstr "به عنوان مقداری با :c:data:`Py_tp_token` استفاده می‌شود تا توکن روی :c:type:`PyType_Spec` کلاس تنظیم شود. ممکن است فقط برای کلاس‌هایی استفاده شود که با استفاده از :c:type:`!PyType_Spec` تعریف شده‌اند." + +msgid "Expands to ``NULL``." +msgstr "به ``NULL`` گسترش می‌یابد." + +msgid ":c:member:`Slot ID ` that works like :c:macro:`Py_slot_subslots`, except it specifies an array of :c:type:`PyType_Slot` structures." +msgstr ":c:member:`شناسه‌ی جایگاه ` که مانند :c:macro:`Py_slot_subslots` کار می‌کند، با این تفاوت که آرایه‌ای از ساختارهای :c:type:`PyType_Slot` را مشخص می‌کند." + +msgid "Soft-deprecated API" +msgstr "API منسوخ‌سازی نرم" + +msgid "The following functions are :term:`soft deprecated`. They will continue to work, but new features will be added as slots for :c:func:`PyType_FromSlots`, not as arguments to new ``PyType_From*`` functions." +msgstr "توابع زیر :term:`منسوخ‌شده‌ی نرم ` هستند. آن‌ها به کار خود ادامه خواهند داد، اما ویژگی‌های جدید به عنوان جایگاه‌ها برای :c:func:`PyType_FromSlots` اضافه خواهند شد، نه به عنوان آرگومان‌ها برای توابع جدید ``PyType_From*``." + +msgid "Create and return a :ref:`heap type ` from the *spec* (see :c:macro:`Py_TPFLAGS_HEAPTYPE`)." +msgstr "یک :ref:`نوع هیپ ` از *spec* بسازید و بازگردانید (به :c:macro:`Py_TPFLAGS_HEAPTYPE` مراجعه کنید)." + +msgid "A non-``NULL`` *metaclass* argument corresponds to the :c:macro:`Py_tp_metaclass` slot." +msgstr "یک آرگومان *metaclass* غیر-``NULL`` با جایگاه :c:macro:`Py_tp_metaclass` مطابقت دارد." + +msgid "A non-``NULL`` *bases* argument corresponds to the :c:data:`Py_tp_bases` slot, and takes precedence over :c:data:`Py_tp_bases` and :c:data:`Py_tp_bases` slots." +msgstr "یک آرگومان *bases* غیر-``NULL`` با جایگاه :c:data:`Py_tp_bases` مطابقت دارد و بر جایگاه‌های :c:data:`Py_tp_bases` و :c:data:`Py_tp_bases` اولویت دارد." + +msgid "A non-``NULL`` *module* argument corresponds to the :c:macro:`Py_tp_module` slot." +msgstr "یک آرگومان *ماژول* غیر ``NULL`` متناظر با جایگاه :c:macro:`Py_tp_module` است." + +msgid "Note that this function does *not* fully match the behavior of calling :py:class:`type() ` or using the :keyword:`class` statement. See the note in :c:func:`PyType_FromSlots` documentation for details." +msgstr "توجه داشته باشید که این تابع کاملاً با رفتار فراخوانی :py:class:`type() ` یا استفاده از دستور :keyword:`class` مطابقت *ندارد*. برای جزئیات، یادداشت موجود در مستندات :c:func:`PyType_FromSlots` را ببینید." + +msgid "Prefer :c:func:`PyType_FromSlots` in new code." +msgstr "در کد جدید، :c:func:`PyType_FromSlots` را ترجیح دهید." + +msgid "Equivalent to ``PyType_FromMetaclass(NULL, module, spec, bases)``." +msgstr "معادل ``PyType_FromMetaclass(NULL, module, spec, bases)`` است." + +msgid "The function now accepts a single class as the *bases* argument and ``NULL`` as the ``tp_doc`` slot." +msgstr "این تابع اکنون یک کلاس منفرد را به‌عنوان آرگومان *bases* و ``NULL`` را به‌عنوان جایگاه ``tp_doc`` می‌پذیرد." + +msgid "The function now finds and uses a metaclass corresponding to the provided base classes. Previously, only :class:`type` instances were returned." +msgstr "این تابع اکنون فراکلاسی متناظر با کلاس‌های پایه‌ی ارائه‌شده را می‌یابد و از آن استفاده می‌کند. پیش‌تر، تنها نمونه‌های :class:`type` برگردانده می‌شدند." + +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:member:`~PyTypeObject.tp_new` مربوط به فراکلاس *نادیده گرفته می‌شود*. که ممکن است به مقداردهی اولیه‌ی ناقص منجر شود. ایجاد کلاس‌هایی که فراکلاس آن‌ها :c:member:`~PyTypeObject.tp_new` را بازنویسی می‌کند، منسوخ شده است." + +msgid "Creating classes whose metaclass overrides :c:member:`~PyTypeObject.tp_new` is no longer allowed." +msgstr "ساخت کلاس‌هایی که فراکلاس آن‌ها :c:member:`~PyTypeObject.tp_new` را بازنویسی می‌کند، دیگر مجاز نیست." + +msgid "Equivalent to ``PyType_FromMetaclass(NULL, NULL, spec, bases)``." +msgstr "معادل ``PyType_FromMetaclass(NULL, NULL, spec, bases)`` است." + +msgid "Equivalent to ``PyType_FromMetaclass(NULL, NULL, spec, NULL)``." +msgstr "معادل ``PyType_FromMetaclass(NULL, NULL, spec, NULL)`` است." + +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 "این تابع اکنون فراکلاسی متناظر با کلاس‌های پایه‌ی ارائه‌شده در جایگاه‌های *Py_tp_base[s]* را می‌یابد و از آن استفاده می‌کند. پیش‌تر، تنها نمونه‌های :class:`type` برگردانده می‌شدند." + +msgid "Structure defining a type's behavior, used for soft-deprecated functions like :c:func:`PyType_FromMetaclass`." +msgstr "ساختاری که رفتار یک نوع داده را تعریف می‌کند، و برای توابع منسوخ‌شده‌ی نرم مانند :c:func:`PyType_FromMetaclass` استفاده می‌شود." + +msgid "This structure contains several members that can instead be specified as :ref:`slots ` for :c:func:`PyType_FromSlots`, and an array of slot entries with a simpler structure." +msgstr "این ساختار شامل چندین عضو است که به جای آن می‌توانند به عنوان :ref:`جایگاه‌ها ` برای :c:func:`PyType_FromSlots` مشخص شوند، و همچنین آرایه‌ای از ورودی‌های جایگاه با ساختاری ساده‌تر است." + +msgid "Corresponds to :c:macro:`Py_tp_name`." +msgstr "متناظر با :c:macro:`Py_tp_name`." + +msgid "If positive, corresponds to :c:macro:`Py_tp_basicsize`." +msgstr "اگر مثبت باشد، متناظر با :c:macro:`Py_tp_basicsize` است." + +msgid "If negative, corresponds to :c:macro:`Py_tp_extra_basicsize` set to the absolute value." +msgstr "اگر منفی باشد، متناظر با :c:macro:`Py_tp_extra_basicsize` است که روی مقدار مطلق تنظیم شده است." + +msgid "Previously, this field could not be negative." +msgstr "پیش‌تر، این فیلد نمی‌توانست منفی باشد." + +msgid "Corresponds to :c:macro:`Py_tp_itemsize`." +msgstr "متناظر با :c:macro:`Py_tp_itemsize`." + +msgid "Corresponds to :c:macro:`Py_tp_flags`." +msgstr "متناظر با :c:macro:`Py_tp_flags`." + +msgid "Array of :c:type:`PyType_Slot` (not :c:type:`PySlot`) structures." +msgstr "آرایه‌ای از ساختارهای :c:type:`PyType_Slot` (نه :c:type:`PySlot`)." + +msgid "Terminated by the special slot value ``{0, NULL}``. Each slot ID should be specified at most once." +msgstr "با مقدار جایگاه خاص ``{0, NULL}`` پایان می‌یابد. هر شناسه‌ی جایگاه باید حداکثر یک بار مشخص شود." + +msgid "Structure defining optional functionality of a type, used for soft-deprecated functions like :c:func:`PyType_FromMetaclass`." +msgstr "ساختاری که قابلیت اختیاری یک نوع را تعریف می‌کند و برای توابع منسوخ‌شده‌ی ملایم مانند :c:func:`PyType_FromMetaclass` استفاده می‌شود." + +msgid "Note that a :c:type:`!PyType_Slot` array may be included in a :c:type:`!PySlot` array using :c:macro:`Py_tp_slots`, and vice versa using :c:macro:`Py_slot_subslots`." +msgstr "توجه داشته باشید که ممکن است یک آرایه‌ی :c:type:`!PyType_Slot` با استفاده از :c:macro:`Py_tp_slots` در یک آرایه‌ی :c:type:`!PySlot` گنجانده شود، و بالعکس با استفاده از :c:macro:`Py_slot_subslots`." + +msgid "Each :c:type:`!PyType_Slot` structure ``tpslot`` is interpreted as the following :c:type:`PySlot` structure::" +msgstr "هر ساختار :c:type:`!PyType_Slot` به نام ``tpslot`` به عنوان ساختار :c:type:`PySlot` زیر تفسیر می‌شود::" + +msgid "" +"(PySlot){\n" +" .sl_id=tpslot.slot,\n" +" .sl_flags=PySlot_INTPTR | sub_static,\n" +" .sl_ptr=tpslot.func\n" +"}" +msgstr "" +"(PySlot){\n" +" .sl_id=tpslot.slot,\n" +" .sl_flags=PySlot_INTPTR | sub_static,\n" +" .sl_ptr=tpslot.func\n" +"}" + +msgid "where ``sub_static`` is ``PySlot_STATIC`` if the slot requires the flag (such as for :c:macro:`Py_tp_methods`), or if this flag is present on the \"parent\" :c:macro:`!Py_tp_slots` slot (if any)." +msgstr "که در آن ``sub_static`` برابر با ``PySlot_STATIC`` است اگر جایگاه به پرچم نیاز داشته باشد (مانند :c:macro:`Py_tp_methods`)، یا اگر این پرچم روی جایگاه «والد» :c:macro:`!Py_tp_slots` (در صورت وجود) حضور داشته باشد." + +msgid "Corresponds to :c:member:`PySlot.sl_id`." +msgstr "متناظر با :c:member:`PySlot.sl_id`." + +msgid "Corresponds to :c:member:`PySlot.sl_ptr`." +msgstr "متناظر با :c:member:`PySlot.sl_ptr`." msgid "object" msgstr "شیء" msgid "type" msgstr "نوع" + +#~ 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 :c:data:`Py_tp_bases` slot is used instead. If that also is ``NULL``, the :c:data:`Py_tp_base` slot is used instead. If that also is ``NULL``, the new type derives from :class:`object`." +#~ msgstr "می‌توان از آرگومان *bases* برای تعیین کلاس‌های پایه استفاده کرد؛ این آرگومان می‌تواند تنها یک کلاس یا یک تاپل از کلاس‌ها باشد. اگر *bases* برابر ``NULL`` باشد، در عوض از جایگاه :c:data:`Py_tp_bases` استفاده می‌شود. اگر آن نیز ``NULL`` باشد، در عوض از جایگاه :c:data:`Py_tp_base` استفاده می‌شود. اگر آن نیز ``NULL`` باشد، نوع جدید از :class:`object` مشتق می‌شود." + +#~ msgid "Structure defining a type's behavior." +#~ msgstr "ساختاری که رفتار یک نوع را تعریف می‌کند." + +#~ msgid "If zero, specifies that :c:member:`~PyTypeObject.tp_basicsize` should be inherited." +#~ msgstr "اگر صفر باشد، مشخص می‌کند که :c:member:`~PyTypeObject.tp_basicsize` باید به ارث برده شود." + +#~ msgid "If negative, the absolute value specifies how much space instances of the class need *in addition* to the superclass. Use :c:func:`PyObject_GetTypeData` to get a pointer to subclass-specific memory reserved this way. For negative :c:member:`!basicsize`, Python will insert padding when needed to meet :c:member:`~PyTypeObject.tp_basicsize`'s alignment requirements." +#~ msgstr "اگر منفی باشد، قدر مطلق آن مشخص می‌کند که نمونه‌های کلاس *علاوه بر* ابرکلاس به چه مقدار فضا نیاز دارند. برای دریافت اشاره‌گر به حافظه‌ی اختصاصی زیرکلاس که به این شیوه رزرو شده است، از :c:func:`PyObject_GetTypeData` استفاده کنید. برای :c:member:`!basicsize` منفی، پایتون در صورت نیاز پدینگ اضافه خواهد کرد تا نیازمندی‌های ترازبندیِ :c:member:`~PyTypeObject.tp_basicsize` را برآورده کند." + +#~ msgid "Array of :c:type:`PyType_Slot` structures. Terminated by the special slot value ``{0, NULL}``." +#~ msgstr "آرایه‌ای از ساختارهای :c:type:`PyType_Slot`. با مقدار جایگاه ویژه‌ی ``{0, NULL}`` پایان می‌یابد." + +#~ 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:data:`Py_tp_bases` یا :c:data:`Py_tp_base` ممکن است روی برخی پلتفرم‌ها مشکل‌ساز باشد. برای پرهیز از مشکلات، به‌جای آن از آرگومان *bases* در :c:func:`PyType_FromSpecWithBases` استفاده کنید." + +#~ msgid "The desired value of the slot. In most cases, this is a pointer to a function." +#~ msgstr "مقدار موردنظر جایگاه. در بیشتر موارد، این یک اشاره‌گر به تابع است." diff --git a/c-api/typeobj.po b/c-api/typeobj.po index 5a7049ee..1a3d8d06 100644 --- a/c-api/typeobj.po +++ b/c-api/typeobj.po @@ -8,12 +8,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 08:25+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -1081,6 +1082,9 @@ msgstr "جایگاه‌های PyTypeObject" msgid "Each slot has a section describing inheritance. If :c:func:`PyType_Ready` may set a value when the field is set to ``NULL`` then there will also be a \"Default\" section. (Note that many fields set on :c:data:`PyBaseObject_Type` and :c:data:`PyType_Type` effectively act as defaults.)" msgstr "هر جایگاه بخشی دارد که وراثت را توصیف می‌کند. اگر ممکن است :c:func:`PyType_Ready` هنگامی که فیلد برابر ``NULL`` تنظیم شده باشد، مقداری تعیین کند، آنگاه بخشی نیز با عنوان «پیش‌فرض» وجود خواهد داشت. (توجه داشته باشید که بسیاری از فیلدهای تنظیم‌شده در :c:data:`PyBaseObject_Type` و :c:data:`PyType_Type` عملاً به‌عنوان پیش‌فرض عمل می‌کنند.)" +msgid "See :c:macro:`Py_tp_name` for the corresponding :c:member:`Slot ID `." +msgstr "برای :c:member:`شناسه‌ی جایگاه ` متناظر، به :c:macro:`Py_tp_name` مراجعه کنید." + msgid "Pointer to a NUL-terminated string containing the name of the type. For types that are accessible as module globals, the string should be the full module name, followed by a dot, followed by the type name; for built-in types, it should be just the type name. If the module is a submodule of a package, the full package name is part of the full module name. For example, a type named :class:`!T` defined in module :mod:`!M` in subpackage :mod:`!Q` in package :mod:`!P` should have the :c:member:`~PyTypeObject.tp_name` initializer ``\"P.Q.M.T\"``." msgstr "اشاره‌گر به رشته‌ی پایان‌یافته با تهی که نام نوع را در بر دارد. برای نوع‌هایی که به‌صورت متغیرهای سراسری ماژول در دسترس‌اند، این رشته باید شامل نام کامل ماژول، سپس یک نقطه و سپس نام نوع باشد؛ برای نوع‌های توکار، باید فقط نام نوع باشد. اگر ماژول، زیرماژولی از یک بسته باشد، نام کامل بسته بخشی از نام کامل ماژول است. برای مثال، نوعی با نام :class:`!T` که در ماژول :mod:`!M` در زیربسته‌ی :mod:`!Q` در بسته‌ی :mod:`!P` تعریف‌شده باشد، باید مقداردهنده‌ی اولیه‌ی :c:member:`~PyTypeObject.tp_name` آن ``\"P.Q.M.T\"`` باشد." @@ -1099,6 +1103,9 @@ msgstr "این فیلد نباید ``NULL`` باشد. این تنها فیلد msgid "These fields allow calculating the size in bytes of instances of the type." msgstr "این فیلد‌ها محاسبه‌ی اندازه‌ی نمونه‌های نوع بر حسب بایت را ممکن می‌سازند." +msgid "See :c:macro:`Py_tp_basicsize`, :c:macro:`Py_tp_extra_basicsize` and :c:macro:`Py_tp_itemsize` for the corresponding :c:member:`Slot IDs `." +msgstr "برای :c:member:`شناسه‌های جایگاه ` متناظر، به :c:macro:`Py_tp_basicsize`، :c:macro:`Py_tp_extra_basicsize` و :c:macro:`Py_tp_itemsize` مراجعه کنید." + msgid "There are two kinds of types: types with fixed-length instances have a zero :c:member:`!tp_itemsize` field, types with variable-length instances have a non-zero :c:member:`!tp_itemsize` field. For a type with fixed-length instances, all instances have the same size, given in :c:member:`!tp_basicsize`. (Exceptions to this rule can be made using :c:func:`PyUnstable_Object_GC_NewWithExtraData`.)" msgstr "دو گونه نوع وجود دارد: نوع‌هایی با نمونه‌های طول ثابت، فیلد :c:member:`!tp_itemsize` صفر دارند و نوع‌هایی با نمونه‌های طول متغیر، فیلد :c:member:`!tp_itemsize` غیرصفر دارند. برای نوعی با نمونه‌های طول ثابت، همه نمونه‌ها اندازه یکسانی دارند که در :c:member:`!tp_basicsize` داده شده است. (می‌توان با استفاده از :c:func:`PyUnstable_Object_GC_NewWithExtraData` برای این قاعده استثنا قائل شد.)" @@ -1489,6 +1496,9 @@ msgstr "اشاره‌گر به یک ساختار اضافی که فیلدهای msgid "The :c:member:`~PyTypeObject.tp_as_buffer` field is not inherited, but the contained fields are inherited individually." msgstr "فیلد :c:member:`~PyTypeObject.tp_as_buffer` به ارث برده نمی‌شود، اما فیلدهای درون آن به‌طور جداگانه به ارث برده می‌شوند." +msgid "See :c:macro:`Py_tp_flags` for the corresponding :c:member:`Slot ID `." +msgstr "برای :c:member:`شناسه‌ی جایگاه ` متناظر، به :c:macro:`Py_tp_flags` مراجعه کنید." + 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 fields in the type object (or in the extension structures referenced via :c:member:`~PyTypeObject.tp_as_number`, :c:member:`~PyTypeObject.tp_as_sequence`, :c:member:`~PyTypeObject.tp_as_mapping`, and :c:member:`~PyTypeObject.tp_as_buffer`) that were historically not always present are valid; if such a flag bit is clear, the type fields it guards must not be accessed and must be considered to have a zero or ``NULL`` value instead." msgstr "این فیلد یک نقاب بیتی از پرچم‌های گوناگون است. برخی پرچم‌ها معناشناسی متفاوتی را برای موقعیت‌های خاص نشان می‌دهند؛ برخی دیگر برای نشان دادن این موضوع به کار می‌روند که فیلدهای خاصی در شیء نوع (یا در ساختارهای توسعه‌ای که از طریق :c:member:`~PyTypeObject.tp_as_number`، :c:member:`~PyTypeObject.tp_as_sequence`، :c:member:`~PyTypeObject.tp_as_mapping` و :c:member:`~PyTypeObject.tp_as_buffer` به آن‌ها ارجاع می‌شود) که به‌طور تاریخی همیشه وجود نداشته‌اند، معتبر هستند؛ اگر چنین بیت پرچمی صفر باشد، نباید به فیلدهای نوعی که این بیت از آن‌ها نگهبانی می‌کند دسترسی پیدا کرد و باید در عوض، آن‌ها را دارای مقدار صفر یا ``NULL`` در نظر گرفت." @@ -1552,8 +1562,8 @@ msgstr "این پرچم هرگز توسط نوع‌هایی که پرچم :c:mac msgid "This bit indicates that instances of the class have a :attr:`~object.__dict__` attribute, and that the space for the dictionary is managed by the VM." msgstr "این بیت نشان می‌دهد که نمونه‌های کلاس دارای ویژگی :attr:`~object.__dict__` هستند و فضای دیکشنری توسط ماشین مجازی مدیریت می‌شود." -msgid "If this flag is set, :c:macro:`Py_TPFLAGS_HAVE_GC` should also be set." -msgstr "اگر این پرچم تنظیم شده باشد، :c:macro:`Py_TPFLAGS_HAVE_GC` نیز باید تنظیم شود." +msgid "If this flag is set, :c:macro:`Py_TPFLAGS_HAVE_GC` must also be set." +msgstr "اگر این پرچم تنظیم شود، :c:macro:`Py_TPFLAGS_HAVE_GC` نیز باید تنظیم شود." msgid "The type traverse function must call :c:func:`PyObject_VisitManagedDict` and its clear function must call :c:func:`PyObject_ClearManagedDict`." msgstr "تابع پیمایش نوع باید :c:func:`PyObject_VisitManagedDict` را فراخوانی کند و تابع پاک‌سازی آن باید :c:func:`PyObject_ClearManagedDict` را فراخوانی کند." @@ -1567,6 +1577,12 @@ msgstr "این بیت نشان می‌دهد که نمونه‌های کلاس msgid "This flag is inherited unless the :c:member:`~PyTypeObject.tp_weaklistoffset` field is set in a superclass." msgstr "این پرچم به ارث برده می‌شود مگر اینکه فیلد :c:member:`~PyTypeObject.tp_weaklistoffset` در یک ابرکلاس تنظیم شده باشد." +msgid "These bits indicate that the VM will manage some fields by storing them before the object. Currently, this macro is equivalent to :c:expr:`Py_TPFLAGS_MANAGED_DICT | Py_TPFLAGS_MANAGED_WEAKREF`." +msgstr "این بیت‌ها نشان می‌دهند که ماشین مجازی (VM) برخی از فیلدها را با ذخیره‌سازی آن‌ها پیش از شیء مدیریت خواهد کرد. در حال حاضر، این کلان‌دستور معادل :c:expr:`Py_TPFLAGS_MANAGED_DICT | Py_TPFLAGS_MANAGED_WEAKREF` است." + +msgid "This macro value relies on the implementation of the VM, so its value is not stable and may change in a future version. Prefer using individual flags instead." +msgstr "این مقدار کلان‌دستور به پیاده‌سازی ماشین مجازی (VM) وابسته است؛ بنابراین، مقدار آن پایدار نیست و ممکن است در نسخه‌ی آینده تغییر کند. ترجیح بر این است که به‌جای آن از پرچم‌های مجزا استفاده کنید." + msgid "Only usable with variable-size types, i.e. ones with non-zero :c:member:`~PyTypeObject.tp_itemsize`." msgstr "فقط با نوع‌های دارای اندازه متغیر قابل استفاده است؛ یعنی نوع‌هایی که :c:member:`~PyTypeObject.tp_itemsize` غیر صفر دارند." @@ -1681,86 +1697,11 @@ msgstr "یک اشاره‌گر اختیاری به رشته‌ی C پایان‌ msgid "This field is *not* inherited by subtypes." msgstr "این فیلد توسط زیرنوع‌ها به ارث برده *نمی‌شود*." -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:macro:`Py_TPFLAGS_HAVE_GC` تنظیم شده باشد. امضا به این صورت است::" - -msgid "int tp_traverse(PyObject *self, visitproc visit, void *arg);" -msgstr "int tp_traverse(PyObject *self, visitproc visit, void *arg);" +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." +msgstr "یک اشاره‌گر اختیاری به یک تابع پیمایش برای جمع‌آوری‌کننده‌ی زباله. این مورد فقط در صورتی استفاده می‌شود که بیت پرچم :c:macro:`Py_TPFLAGS_HAVE_GC` تنظیم شده باشد." -msgid "More information about Python's garbage collection scheme can be found in section :ref:`supporting-cycle-detection`." -msgstr "اطلاعات بیشتری درباره‌ی طرح‌واره‌ی زباله‌روبی پایتون را می‌توانید در بخش :ref:`supporting-cycle-detection` بیابید." - -msgid "The :c:member:`~PyTypeObject.tp_traverse` pointer is used by the garbage collector to detect reference cycles. A typical implementation of a :c:member:`~PyTypeObject.tp_traverse` function simply calls :c:func:`Py_VISIT` on each of the instance's members that are Python objects that the instance owns. For example, this is function :c:func:`!local_traverse` from the :mod:`!_thread` extension module::" -msgstr "اشاره‌گر :c:member:`~PyTypeObject.tp_traverse` توسط زباله‌روب برای تشخیص چرخه‌های ارجاع استفاده می‌شود. یک پیاده‌سازی معمول از تابع :c:member:`~PyTypeObject.tp_traverse` به‌سادگی :c:func:`Py_VISIT` را روی هر یک از اعضای نمونه که شیءهای پایتونی هستند و نمونه مالک آن‌هاست، فراخوانی می‌کند. برای مثال، این تابع :c:func:`!local_traverse` از ماژول توسعه‌ای :mod:`!_thread` است::" - -msgid "" -"static int\n" -"local_traverse(PyObject *op, visitproc visit, void *arg)\n" -"{\n" -" localobject *self = (localobject *) op;\n" -" Py_VISIT(self->args);\n" -" Py_VISIT(self->kw);\n" -" Py_VISIT(self->dict);\n" -" return 0;\n" -"}" -msgstr "" -"static int\n" -"local_traverse(PyObject *op, visitproc visit, void *arg)\n" -"{\n" -" localobject *self = (localobject *) op;\n" -" Py_VISIT(self->args);\n" -" Py_VISIT(self->kw);\n" -" Py_VISIT(self->dict);\n" -" return 0;\n" -"}" - -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`` member, it can only be ``NULL`` or a Python string and therefore cannot be part of a reference cycle." -msgstr "توجه داشته باشید که :c:func:`Py_VISIT` تنها بر روی اعضایی فراخوانی می‌شود که می‌توانند در چرخه‌های ارجاع شرکت کنند. اگرچه عضو ``self->key`` نیز وجود دارد، اما این عضو تنها می‌تواند ``NULL`` یا یک رشته‌ی پایتون باشد و بنابراین نمی‌تواند بخشی از یک چرخه‌ی ارجاع باشد." - -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 "از سوی دیگر، حتی اگر بدانید که یک عضو هرگز نمی‌تواند بخشی از یک چرخه باشد، ممکن است به عنوان کمکی برای اشکال‌زدایی، به هر حال بخواهید آن را بازدید کنید تا تابع :func:`~gc.get_referents` ماژول :mod:`gc` آن را در بر بگیرد." - -msgid "Heap types (:c:macro:`Py_TPFLAGS_HEAPTYPE`) must visit their type with::" -msgstr "نوع‌های هیپ (:c:macro:`Py_TPFLAGS_HEAPTYPE`) باید نوع خود را با کد زیر بازدید کنند::" - -msgid "Py_VISIT(Py_TYPE(self));" -msgstr "Py_VISIT(Py_TYPE(self));" - -msgid "It is only needed since Python 3.9. To support Python 3.8 and older, this line must be conditional::" -msgstr "این تنها از پایتون 3.9 به بعد مورد نیاز است. برای پشتیبانی از پایتون 3.8 و نسخه‌های قدیمی‌تر، این سطر باید شرطی باشد::" - -msgid "" -"#if PY_VERSION_HEX >= 0x03090000\n" -" Py_VISIT(Py_TYPE(self));\n" -"#endif" -msgstr "" -"#if PY_VERSION_HEX >= 0x03090000\n" -" Py_VISIT(Py_TYPE(self));\n" -"#endif" - -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:macro:`Py_TPFLAGS_MANAGED_DICT` در فیلد :c:member:`~PyTypeObject.tp_flags` تنظیم شده باشد، تابع پیمایش باید :c:func:`PyObject_VisitManagedDict` را به این شکل فراخوانی کند::" - -msgid "PyObject_VisitManagedDict((PyObject*)self, visit, arg);" -msgstr "PyObject_VisitManagedDict((PyObject*)self, visit, arg);" - -msgid "When implementing :c:member:`~PyTypeObject.tp_traverse`, only the members that the instance *owns* (by having :term:`strong references ` to them) must be visited. For instance, if an object supports weak references via the :c:member:`~PyTypeObject.tp_weaklist` slot, the pointer supporting the linked list (what *tp_weaklist* points to) must **not** be visited as the instance does not directly own the weak references to itself (the weakreference list is there to support the weak reference machinery, but the instance has no strong reference to the elements inside it, as they are allowed to be removed even if the instance is still alive)." -msgstr "هنگام پیاده‌سازی :c:member:`~PyTypeObject.tp_traverse`، فقط اعضایی که نمونه *مالک* آن‌هاست (با داشتن :term:`ارجاع‌های قوی ` به آن‌ها) باید بازدید شوند. برای مثال، اگر یک شیء از طریق جایگاه :c:member:`~PyTypeObject.tp_weaklist` از ارجاع‌های ضعیف پشتیبانی کند، اشاره‌گری که فهرست پیوندی را پشتیبانی می‌کند (چیزی که *tp_weaklist* به آن اشاره می‌کند) **نباید** بازدید شود، زیرا نمونه به‌طور مستقیم مالک ارجاع‌های ضعیف به خود نیست (فهرست ارجاع‌های ضعیف وجود دارد تا از سازوکار ارجاع ضعیف پشتیبانی کند، اما نمونه ارجاع قوی به عناصر درون آن ندارد، زیرا اجازه داده می‌شود آن‌ها حتی اگر نمونه هنوز زنده باشد حذف شوند)." - -msgid "The traversal function must not have any side effects. It must not modify the reference counts of any Python objects nor create or destroy any Python objects." -msgstr "تابع پیمایش نباید هیچ اثر جانبی داشته باشد. این تابع نباید شمارش ارجاع هیچ شیء پایتونی را تغییر دهد و نه هیچ شیء پایتونی را ایجاد یا نابود کند." - -msgid "Note that :c:func:`Py_VISIT` requires the *visit* and *arg* parameters to :c:func:`!local_traverse` to have these specific names; don't name them just anything." -msgstr "توجه داشته باشید که :c:func:`Py_VISIT` نیازمند آن است که پارامترهای *visit* و *arg* در :c:func:`!local_traverse` دقیقاً همین نام‌ها را داشته باشند؛ آن‌ها را با هر نامی نام‌گذاری نکنید." - -msgid "Instances of :ref:`heap-allocated types ` hold a reference to their type. Their traversal function must therefore either visit :c:func:`Py_TYPE(self) `, or delegate this responsibility by calling ``tp_traverse`` of another heap-allocated type (such as a heap-allocated superclass). If they do not, the type object may not be garbage-collected." -msgstr "نمونه‌های :ref:`نوع‌های تخصیص‌یافته در هیپ ` ارجاعی به نوع خود نگه می‌دارند. بنابراین تابع پیمایش آن‌ها باید یا :c:func:`Py_TYPE(self) ` را بازدید کند، یا این مسئولیت را با فراخوانی ``tp_traverse`` یک نوع تخصیص‌یافته در هیپ دیگر (مانند یک ابرکلاس تخصیص‌یافته در هیپ) واگذار کند. اگر چنین نکنند، ممکن است شیء نوع زباله‌روبی نشود." - -msgid "The :c:member:`~PyTypeObject.tp_traverse` function can be called from any thread." -msgstr "تابع :c:member:`~PyTypeObject.tp_traverse` را می‌توان از هر نخی فراخوانی کرد." - -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 "انتظار می‌رود که نوع‌های تخصیص‌یافته در هیپ، ``Py_TYPE(self)`` را در ``tp_traverse`` بازدید کنند. در نسخه‌های پیشین پایتون، به دلیل `باگ 40217 `_، انجام این کار ممکن است در زیرکلاس‌ها به فروپاشی منجر شود." +msgid "See :ref:`gc-traversal` for documentation." +msgstr "برای مستندات، :ref:`gc-traversal` را ببینید." 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:member:`~PyTypeObject.tp_traverse`, and :c:member:`~PyTypeObject.tp_clear` are all inherited from the base type if they are all zero in the subtype." msgstr "این فیلد به همراه :c:member:`~PyTypeObject.tp_clear` و بیت پرچم :c:macro:`Py_TPFLAGS_HAVE_GC` توسط زیرنوع‌ها به ارث برده می‌شود: بیت پرچم، :c:member:`~PyTypeObject.tp_traverse` و :c:member:`~PyTypeObject.tp_clear` همگی در صورتی از نوع پایه به ارث برده می‌شوند که هر سه در زیرنوع صفر باشند." @@ -1863,6 +1804,9 @@ msgstr "اگر بیت :c:macro:`Py_TPFLAGS_MANAGED_DICT` در فیلد :c:member msgid "PyObject_ClearManagedDict((PyObject*)self);" msgstr "PyObject_ClearManagedDict((PyObject*)self);" +msgid "More information about Python's garbage collection scheme can be found in section :ref:`supporting-cycle-detection`." +msgstr "اطلاعات بیشتری درباره‌ی طرح‌واره‌ی زباله‌روبی پایتون را می‌توانید در بخش :ref:`supporting-cycle-detection` بیابید." + 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, :c:member:`~PyTypeObject.tp_traverse`, and :c:member:`~PyTypeObject.tp_clear` are all inherited from the base type if they are all zero in the subtype." msgstr "این فیلد به همراه :c:member:`~PyTypeObject.tp_traverse` و بیت پرچم :c:macro:`Py_TPFLAGS_HAVE_GC` توسط زیرنوع‌ها به ارث برده می‌شود: اگر بیت پرچم، :c:member:`~PyTypeObject.tp_traverse` و :c:member:`~PyTypeObject.tp_clear` در زیرنوع همگی صفر باشند، از نوع پایه به ارث برده می‌شوند." @@ -1995,6 +1939,9 @@ msgstr "این فیلد به زیرنوع‌ها به ارث نمی‌رسد (و msgid "An optional pointer to a base type from which type properties are inherited. At this level, only single inheritance is supported; multiple inheritance require dynamically creating a type object by calling the metatype." msgstr "اشاره‌گری اختیاری به یک نوع پایه که ویژگی‌های نوع از آن به ارث می‌رسند. در این سطح، تنها ارث‌بری تکی پشتیبانی می‌شود؛ ارث‌بری چندگانه نیازمند ایجاد یک شیء نوع به‌صورت پویا با فراخوانی فرانوع است." +msgid "For the corresponding slot ID, see :c:macro:`Py_tp_base`." +msgstr "برای شناسه‌ی جایگاه متناظر، :c:macro:`Py_tp_base` را ببینید." + msgid "Slot initialization is subject to the rules of initializing globals. C99 requires the initializers to be \"address constants\". Function designators like :c:func:`PyType_GenericNew`, with implicit conversion to a pointer, are valid C99 address constants." msgstr "مقداردهی اولیه جایگاه از قواعد مقداردهی اولیه متغیرهای سراسری پیروی می‌کند. C99 الزام می‌کند که مقداردهنده‌های اولیه «ثابت‌های آدرس» باشند. نشانگرهای تابع (function designator) مانند :c:func:`PyType_GenericNew` که به‌طور ضمنی به اشاره‌گر تبدیل می‌شوند، ثابت‌های آدرس معتبر در C99 هستند." @@ -2172,8 +2119,8 @@ msgstr "تاپل نوع‌های پایه." 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 "این فیلد باید روی ``NULL`` تنظیم شود و به‌عنوان فقط‌خواندنی در نظر گرفته شود. پایتون آن را زمانی که نوع :c:func:`مقداردهی اولیه ` شود، پر می‌کند." -msgid "For dynamically created classes, the :c:data:`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 "برای کلاس‌های ایجادشده به‌صورت پویا، می‌توان به‌جای آرگومان *bases* در :c:func:`PyType_FromSpecWithBases` از :c:type:`جایگاه ` :c:data:`Py_tp_bases` استفاده کرد. شکل آرگومان ترجیح داده می‌شود." +msgid "For the corresponding slot ID, see :c:macro:`Py_tp_bases`." +msgstr "برای شناسه‌ی جایگاه متناظر، :c:macro:`Py_tp_bases` را ببینید." 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 "وراثت چندگانه برای نوع‌های تعریف‌شده به‌صورت ایستا به‌خوبی کار نمی‌کند. اگر ``tp_bases`` را روی یک تاپل تنظیم کنید، پایتون خطایی ایجاد نمی‌کند، اما برخی جایگاه‌ها فقط از اولین پایه به ارث برده می‌شوند." @@ -3027,3 +2974,81 @@ msgstr "repr" msgid "hash" msgstr "هش" + +#~ msgid "int tp_traverse(PyObject *self, visitproc visit, void *arg);" +#~ msgstr "int tp_traverse(PyObject *self, visitproc visit, void *arg);" + +#~ msgid "The :c:member:`~PyTypeObject.tp_traverse` pointer is used by the garbage collector to detect reference cycles. A typical implementation of a :c:member:`~PyTypeObject.tp_traverse` function simply calls :c:func:`Py_VISIT` on each of the instance's members that are Python objects that the instance owns. For example, this is function :c:func:`!local_traverse` from the :mod:`!_thread` extension module::" +#~ msgstr "اشاره‌گر :c:member:`~PyTypeObject.tp_traverse` توسط زباله‌روب برای تشخیص چرخه‌های ارجاع استفاده می‌شود. یک پیاده‌سازی معمول از تابع :c:member:`~PyTypeObject.tp_traverse` به‌سادگی :c:func:`Py_VISIT` را روی هر یک از اعضای نمونه که شیءهای پایتونی هستند و نمونه مالک آن‌هاست، فراخوانی می‌کند. برای مثال، این تابع :c:func:`!local_traverse` از ماژول توسعه‌ای :mod:`!_thread` است::" + +#~ msgid "" +#~ "static int\n" +#~ "local_traverse(PyObject *op, visitproc visit, void *arg)\n" +#~ "{\n" +#~ " localobject *self = (localobject *) op;\n" +#~ " Py_VISIT(self->args);\n" +#~ " Py_VISIT(self->kw);\n" +#~ " Py_VISIT(self->dict);\n" +#~ " return 0;\n" +#~ "}" +#~ msgstr "" +#~ "static int\n" +#~ "local_traverse(PyObject *op, visitproc visit, void *arg)\n" +#~ "{\n" +#~ " localobject *self = (localobject *) op;\n" +#~ " Py_VISIT(self->args);\n" +#~ " Py_VISIT(self->kw);\n" +#~ " Py_VISIT(self->dict);\n" +#~ " return 0;\n" +#~ "}" + +#~ 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`` member, it can only be ``NULL`` or a Python string and therefore cannot be part of a reference cycle." +#~ msgstr "توجه داشته باشید که :c:func:`Py_VISIT` تنها بر روی اعضایی فراخوانی می‌شود که می‌توانند در چرخه‌های ارجاع شرکت کنند. اگرچه عضو ``self->key`` نیز وجود دارد، اما این عضو تنها می‌تواند ``NULL`` یا یک رشته‌ی پایتون باشد و بنابراین نمی‌تواند بخشی از یک چرخه‌ی ارجاع باشد." + +#~ 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 "از سوی دیگر، حتی اگر بدانید که یک عضو هرگز نمی‌تواند بخشی از یک چرخه باشد، ممکن است به عنوان کمکی برای اشکال‌زدایی، به هر حال بخواهید آن را بازدید کنید تا تابع :func:`~gc.get_referents` ماژول :mod:`gc` آن را در بر بگیرد." + +#~ msgid "Heap types (:c:macro:`Py_TPFLAGS_HEAPTYPE`) must visit their type with::" +#~ msgstr "نوع‌های هیپ (:c:macro:`Py_TPFLAGS_HEAPTYPE`) باید نوع خود را با کد زیر بازدید کنند::" + +#~ msgid "Py_VISIT(Py_TYPE(self));" +#~ msgstr "Py_VISIT(Py_TYPE(self));" + +#~ msgid "It is only needed since Python 3.9. To support Python 3.8 and older, this line must be conditional::" +#~ msgstr "این تنها از پایتون 3.9 به بعد مورد نیاز است. برای پشتیبانی از پایتون 3.8 و نسخه‌های قدیمی‌تر، این سطر باید شرطی باشد::" + +#~ msgid "" +#~ "#if PY_VERSION_HEX >= 0x03090000\n" +#~ " Py_VISIT(Py_TYPE(self));\n" +#~ "#endif" +#~ msgstr "" +#~ "#if PY_VERSION_HEX >= 0x03090000\n" +#~ " Py_VISIT(Py_TYPE(self));\n" +#~ "#endif" + +#~ 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:macro:`Py_TPFLAGS_MANAGED_DICT` در فیلد :c:member:`~PyTypeObject.tp_flags` تنظیم شده باشد، تابع پیمایش باید :c:func:`PyObject_VisitManagedDict` را به این شکل فراخوانی کند::" + +#~ msgid "PyObject_VisitManagedDict((PyObject*)self, visit, arg);" +#~ msgstr "PyObject_VisitManagedDict((PyObject*)self, visit, arg);" + +#~ msgid "When implementing :c:member:`~PyTypeObject.tp_traverse`, only the members that the instance *owns* (by having :term:`strong references ` to them) must be visited. For instance, if an object supports weak references via the :c:member:`~PyTypeObject.tp_weaklist` slot, the pointer supporting the linked list (what *tp_weaklist* points to) must **not** be visited as the instance does not directly own the weak references to itself (the weakreference list is there to support the weak reference machinery, but the instance has no strong reference to the elements inside it, as they are allowed to be removed even if the instance is still alive)." +#~ msgstr "هنگام پیاده‌سازی :c:member:`~PyTypeObject.tp_traverse`، فقط اعضایی که نمونه *مالک* آن‌هاست (با داشتن :term:`ارجاع‌های قوی ` به آن‌ها) باید بازدید شوند. برای مثال، اگر یک شیء از طریق جایگاه :c:member:`~PyTypeObject.tp_weaklist` از ارجاع‌های ضعیف پشتیبانی کند، اشاره‌گری که فهرست پیوندی را پشتیبانی می‌کند (چیزی که *tp_weaklist* به آن اشاره می‌کند) **نباید** بازدید شود، زیرا نمونه به‌طور مستقیم مالک ارجاع‌های ضعیف به خود نیست (فهرست ارجاع‌های ضعیف وجود دارد تا از سازوکار ارجاع ضعیف پشتیبانی کند، اما نمونه ارجاع قوی به عناصر درون آن ندارد، زیرا اجازه داده می‌شود آن‌ها حتی اگر نمونه هنوز زنده باشد حذف شوند)." + +#~ msgid "The traversal function must not have any side effects. It must not modify the reference counts of any Python objects nor create or destroy any Python objects." +#~ msgstr "تابع پیمایش نباید هیچ اثر جانبی داشته باشد. این تابع نباید شمارش ارجاع هیچ شیء پایتونی را تغییر دهد و نه هیچ شیء پایتونی را ایجاد یا نابود کند." + +#~ msgid "Note that :c:func:`Py_VISIT` requires the *visit* and *arg* parameters to :c:func:`!local_traverse` to have these specific names; don't name them just anything." +#~ msgstr "توجه داشته باشید که :c:func:`Py_VISIT` نیازمند آن است که پارامترهای *visit* و *arg* در :c:func:`!local_traverse` دقیقاً همین نام‌ها را داشته باشند؛ آن‌ها را با هر نامی نام‌گذاری نکنید." + +#~ msgid "Instances of :ref:`heap-allocated types ` hold a reference to their type. Their traversal function must therefore either visit :c:func:`Py_TYPE(self) `, or delegate this responsibility by calling ``tp_traverse`` of another heap-allocated type (such as a heap-allocated superclass). If they do not, the type object may not be garbage-collected." +#~ msgstr "نمونه‌های :ref:`نوع‌های تخصیص‌یافته در هیپ ` ارجاعی به نوع خود نگه می‌دارند. بنابراین تابع پیمایش آن‌ها باید یا :c:func:`Py_TYPE(self) ` را بازدید کند، یا این مسئولیت را با فراخوانی ``tp_traverse`` یک نوع تخصیص‌یافته در هیپ دیگر (مانند یک ابرکلاس تخصیص‌یافته در هیپ) واگذار کند. اگر چنین نکنند، ممکن است شیء نوع زباله‌روبی نشود." + +#~ msgid "The :c:member:`~PyTypeObject.tp_traverse` function can be called from any thread." +#~ msgstr "تابع :c:member:`~PyTypeObject.tp_traverse` را می‌توان از هر نخی فراخوانی کرد." + +#~ 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 "انتظار می‌رود که نوع‌های تخصیص‌یافته در هیپ، ``Py_TYPE(self)`` را در ``tp_traverse`` بازدید کنند. در نسخه‌های پیشین پایتون، به دلیل `باگ 40217 `_، انجام این کار ممکن است در زیرکلاس‌ها به فروپاشی منجر شود." + +#~ msgid "For dynamically created classes, the :c:data:`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 "برای کلاس‌های ایجادشده به‌صورت پویا، می‌توان به‌جای آرگومان *bases* در :c:func:`PyType_FromSpecWithBases` از :c:type:`جایگاه ` :c:data:`Py_tp_bases` استفاده کرد. شکل آرگومان ترجیح داده می‌شود." diff --git a/c-api/unicode.po b/c-api/unicode.po index 56a08037..7940b80d 100644 --- a/c-api/unicode.po +++ b/c-api/unicode.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 16:24+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -120,6 +121,18 @@ msgstr "اگر رشته آماده نباشد، این تابع دیگر :c:func msgid "Return true if the string only contains ASCII characters. Equivalent to :py:meth:`str.isascii`." msgstr "اگر رشته فقط شامل نویسه‌های اسکی باشد، مقدار درست را برمی‌گرداند. معادل :py:meth:`str.isascii` است." +msgid "If the hash of *str*, as returned by :c:func:`PyObject_Hash`, has been cached and is immediately available, return it. Otherwise, return ``-1`` *without* setting an exception." +msgstr "اگر هش *str* که توسط :c:func:`PyObject_Hash` برگردانده می‌شود، نهانگاه‌شده باشد و فوراً در دسترس باشد، آن را برگردانید. در غیر این صورت، بدون تنظیم کردن یک استثنا، ``-1`` را برگردانید." + +msgid "If *str* is not a string (that is, if ``PyUnicode_Check(obj)`` is false), the behavior is undefined." +msgstr "اگر *str* یک رشته نباشد (یعنی اگر ``PyUnicode_Check(obj)`` نادرست باشد)، رفتار نامشخص است." + +msgid "This function never fails with an exception." +msgstr "این تابع هرگز با یک استثنا شکست نمی‌خورد." + +msgid "Note that there are no guarantees on when an object's hash is cached, and the (non-)existence of a cached hash does not imply that the string has any other properties." +msgstr "توجه کنید هیچ تضمینی وجود ندارد که هش یک شیء چه زمانی نهانگاه شود، و وجود (یا عدم‌وجود) یک هش نهانگاه‌شده به این معنا نیست که رشته ویژگی‌های دیگری دارد." + msgid "Unicode Character Properties" msgstr "ویژگی‌های نویسه‌ی یونیکد" diff --git a/c-api/weakref.po b/c-api/weakref.po index e85ebb58..7528c9a3 100644 --- a/c-api/weakref.po +++ b/c-api/weakref.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 00:50+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -61,18 +61,6 @@ msgstr "اگر ارجاع مرده باشد، *\\*pobj* را برابر ``NULL`` msgid "On error, raise an exception and return -1." msgstr "در صورت خطا، یک استثنا برانگیخته و -1 بازگردانده می‌شود." -msgid "Return a :term:`borrowed reference` to the referenced object from a weak reference, *ref*. If the referent is no longer live, returns ``Py_None``." -msgstr "یک :term:`ارجاع امانتی ` به شیء ارجاع‌شده را از یک ارجاع ضعیف، *ref*، برمی‌گرداند. اگر ارجاع‌شونده دیگر زنده نباشد، ``Py_None`` را برمی‌گرداند." - -msgid "This function returns a :term:`borrowed reference` to the referenced object. This means that you should always call :c:func:`Py_INCREF` on the object except when it cannot be destroyed before the last usage of the borrowed reference." -msgstr "این تابع یک :term:`ارجاع امانتی ` به شیء مورد ارجاع برمی‌گرداند. این بدان معناست که شما باید همیشه :c:func:`Py_INCREF` را روی شیء فراخوانی کنید، مگر اینکه نتوان آن را پیش از آخرین استفاده از ارجاع امانتی نابود کرد." - -msgid "Use :c:func:`PyWeakref_GetRef` instead." -msgstr "به جای آن از :c:func:`PyWeakref_GetRef` استفاده کنید." - -msgid "Similar to :c:func:`PyWeakref_GetObject`, but does no error checking." -msgstr "مشابه :c:func:`PyWeakref_GetObject`، اما هیچ بررسی خطایی انجام نمی‌دهد." - msgid "Test if the weak reference *ref* is dead. Returns 1 if the reference is dead, 0 if it is alive, and -1 with an error set if *ref* is not a weak reference object." msgstr "بررسی می‌کند که آیا ارجاع ضعیف *ref* مرده است. اگر ارجاع مرده باشد 1 را برمی‌گرداند، اگر زنده باشد 0 را، و اگر *ref* یک شیء ارجاع ضعیف نباشد، -1 را همراه با تنظیم خطا برمی‌گرداند." @@ -90,3 +78,15 @@ msgstr "این تابع توسط هندلر :c:member:`~PyTypeObject.tp_dealloc` msgid "In most circumstances, it's more appropriate to use :c:func:`PyObject_ClearWeakRefs` to clear weakrefs instead of this function." msgstr "در بیشتر موارد، استفاده از :c:func:`PyObject_ClearWeakRefs` برای پاک کردن ارجاع‌های ضعیف به‌جای این تابع مناسب‌تر است." + +#~ msgid "Return a :term:`borrowed reference` to the referenced object from a weak reference, *ref*. If the referent is no longer live, returns ``Py_None``." +#~ msgstr "یک :term:`ارجاع امانتی ` به شیء ارجاع‌شده را از یک ارجاع ضعیف، *ref*، برمی‌گرداند. اگر ارجاع‌شونده دیگر زنده نباشد، ``Py_None`` را برمی‌گرداند." + +#~ msgid "This function returns a :term:`borrowed reference` to the referenced object. This means that you should always call :c:func:`Py_INCREF` on the object except when it cannot be destroyed before the last usage of the borrowed reference." +#~ msgstr "این تابع یک :term:`ارجاع امانتی ` به شیء مورد ارجاع برمی‌گرداند. این بدان معناست که شما باید همیشه :c:func:`Py_INCREF` را روی شیء فراخوانی کنید، مگر اینکه نتوان آن را پیش از آخرین استفاده از ارجاع امانتی نابود کرد." + +#~ msgid "Use :c:func:`PyWeakref_GetRef` instead." +#~ msgstr "به جای آن از :c:func:`PyWeakref_GetRef` استفاده کنید." + +#~ msgid "Similar to :c:func:`PyWeakref_GetObject`, but does no error checking." +#~ msgstr "مشابه :c:func:`PyWeakref_GetObject`، اما هیچ بررسی خطایی انجام نمی‌دهد." diff --git a/deprecations/c-api-pending-removal-in-3.15.po b/deprecations/c-api-pending-removal-in-3.15.po index e3512a71..8ffb92d1 100644 --- a/deprecations/c-api-pending-removal-in-3.15.po +++ b/deprecations/c-api-pending-removal-in-3.15.po @@ -6,12 +6,13 @@ # Translators: # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2024-08-02 14:17+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -24,14 +25,11 @@ msgstr "" msgid "Pending removal in Python 3.15" msgstr "در انتظار حذف در پایتون 3.15" -msgid "The :c:func:`PyImport_ImportModuleNoBlock`: Use :c:func:`PyImport_ImportModule` instead." -msgstr "تابع :c:func:`PyImport_ImportModuleNoBlock`: به‌جای آن از :c:func:`PyImport_ImportModule` استفاده کنید." +msgid "The :c:func:`!PyImport_ImportModuleNoBlock`: Use :c:func:`PyImport_ImportModule` instead." +msgstr "تابع :c:func:`!PyImport_ImportModuleNoBlock`: به جای آن از :c:func:`PyImport_ImportModule` استفاده کنید." -msgid ":c:func:`PyWeakref_GetObject` and :c:func:`PyWeakref_GET_OBJECT`: Use :c:func:`PyWeakref_GetRef` instead. The `pythoncapi-compat project `__ can be used to get :c:func:`PyWeakref_GetRef` on Python 3.12 and older." -msgstr ":c:func:`PyWeakref_GetObject` و :c:func:`PyWeakref_GET_OBJECT`: به‌جای آن‌ها از :c:func:`PyWeakref_GetRef` استفاده کنید. می‌توان از `پروژه‌ی pythoncapi-compat `__ برای دسترسی به :c:func:`PyWeakref_GetRef` در پایتون 3.12 و نسخه‌های قدیمی‌تر استفاده کرد." - -msgid ":c:type:`Py_UNICODE` type and the :c:macro:`!Py_UNICODE_WIDE` macro: Use :c:type:`wchar_t` instead." -msgstr "نوع :c:type:`Py_UNICODE` و ماکرو :c:macro:`!Py_UNICODE_WIDE`: به‌جای آن‌ها از :c:type:`wchar_t` استفاده کنید." +msgid ":c:func:`!PyWeakref_GetObject` and :c:func:`!PyWeakref_GET_OBJECT`: Use :c:func:`PyWeakref_GetRef` instead. The `pythoncapi-compat project `__ can be used to get :c:func:`PyWeakref_GetRef` on Python 3.12 and older." +msgstr ":c:func:`!PyWeakref_GetObject` و :c:func:`!PyWeakref_GET_OBJECT`: به جای آن از :c:func:`PyWeakref_GetRef` استفاده کنید. پروژه‌ی `pythoncapi-compat project `__ را می‌توان برای دریافت :c:func:`PyWeakref_GetRef` در پایتون ۳.۱۲ و قدیمی‌تر استفاده کرد." msgid ":c:func:`!PyUnicode_AsDecodedObject`: Use :c:func:`PyCodec_Decode` instead." msgstr ":c:func:`!PyUnicode_AsDecodedObject`: به‌جای آن از :c:func:`PyCodec_Decode` استفاده کنید." @@ -48,23 +46,23 @@ msgstr ":c:func:`!PyUnicode_AsEncodedUnicode`: به‌جای آن از :c:func:` msgid "Python initialization functions, deprecated in Python 3.13:" msgstr "توابع مقداردهی اولیه پایتون، منسوخ‌شده در پایتون 3.13:" -msgid ":c:func:`Py_GetPath`: Use :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:`sys.path`) instead." -msgstr ":c:func:`Py_GetPath`: به‌جای آن از :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:`sys.path`) استفاده کنید." +msgid ":c:func:`!Py_GetPath`: Use :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:`sys.path`) instead." +msgstr ":c:func:`!Py_GetPath`: به جای آن از :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:`sys.path`) استفاده کنید." -msgid ":c:func:`Py_GetPrefix`: Use :c:func:`PyConfig_Get(\"base_prefix\") ` (:data:`sys.base_prefix`) instead. Use :c:func:`PyConfig_Get(\"prefix\") ` (:data:`sys.prefix`) if :ref:`virtual environments ` need to be handled." -msgstr ":c:func:`Py_GetPrefix`: به‌جای آن از :c:func:`PyConfig_Get(\"base_prefix\") ` (:data:`sys.base_prefix`) استفاده کنید. اگر لازم باشد :ref:`محیط‌های مجازی ` مدیریت شوند، از :c:func:`PyConfig_Get(\"prefix\") ` (:data:`sys.prefix`) استفاده کنید." +msgid ":c:func:`!Py_GetPrefix`: Use :c:func:`PyConfig_Get(\"base_prefix\") ` (:data:`sys.base_prefix`) instead. Use :c:func:`PyConfig_Get(\"prefix\") ` (:data:`sys.prefix`) if :ref:`virtual environments ` need to be handled." +msgstr ":c:func:`!Py_GetPrefix`: به جای آن از :c:func:`PyConfig_Get(\"base_prefix\") ` (:data:`sys.base_prefix`) استفاده کنید. اگر نیاز است :ref:`محیط‌های مجازی ` مدیریت شوند، از :c:func:`PyConfig_Get(\"prefix\") ` (:data:`sys.prefix`) استفاده کنید." -msgid ":c:func:`Py_GetExecPrefix`: Use :c:func:`PyConfig_Get(\"base_exec_prefix\") ` (:data:`sys.base_exec_prefix`) instead. Use :c:func:`PyConfig_Get(\"exec_prefix\") ` (:data:`sys.exec_prefix`) if :ref:`virtual environments ` need to be handled." -msgstr ":c:func:`Py_GetExecPrefix`: به جای آن از :c:func:`PyConfig_Get(\"base_exec_prefix\") ` (:data:`sys.base_exec_prefix`) استفاده کنید. اگر نیاز به مدیریت :ref:`محیط‌های مجازی ` باشد، از :c:func:`PyConfig_Get(\"exec_prefix\") ` (:data:`sys.exec_prefix`) استفاده کنید." +msgid ":c:func:`!Py_GetExecPrefix`: Use :c:func:`PyConfig_Get(\"base_exec_prefix\") ` (:data:`sys.base_exec_prefix`) instead. Use :c:func:`PyConfig_Get(\"exec_prefix\") ` (:data:`sys.exec_prefix`) if :ref:`virtual environments ` need to be handled." +msgstr ":c:func:`!Py_GetExecPrefix`: به جای آن از :c:func:`PyConfig_Get(\"base_exec_prefix\") ` (:data:`sys.base_exec_prefix`) استفاده کنید. اگر نیاز است :ref:`محیط‌های مجازی ` مدیریت شوند، از :c:func:`PyConfig_Get(\"exec_prefix\") ` (:data:`sys.exec_prefix`) استفاده کنید." -msgid ":c:func:`Py_GetProgramFullPath`: Use :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) instead." -msgstr ":c:func:`Py_GetProgramFullPath`: به جای آن از :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) استفاده کنید." +msgid ":c:func:`!Py_GetProgramFullPath`: Use :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) instead." +msgstr ":c:func:`!Py_GetProgramFullPath`: به جای آن از :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) استفاده کنید." -msgid ":c:func:`Py_GetProgramName`: Use :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) instead." -msgstr ":c:func:`Py_GetProgramName`: به جای آن از :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) استفاده کنید." +msgid ":c:func:`!Py_GetProgramName`: Use :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) instead." +msgstr ":c:func:`!Py_GetProgramName`: به جای آن از :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) استفاده کنید." -msgid ":c:func:`Py_GetPythonHome`: Use :c:func:`PyConfig_Get(\"home\") ` or the :envvar:`PYTHONHOME` environment variable instead." -msgstr ":c:func:`Py_GetPythonHome`: به جای آن از :c:func:`PyConfig_Get(\"home\") ` یا متغیر محیطی :envvar:`PYTHONHOME` استفاده کنید." +msgid ":c:func:`!Py_GetPythonHome`: Use :c:func:`PyConfig_Get(\"home\") ` or the :envvar:`PYTHONHOME` environment variable instead." +msgstr ":c:func:`!Py_GetPythonHome`: به جای آن از :c:func:`PyConfig_Get(\"home\") ` یا متغیر محیطی :envvar:`PYTHONHOME` استفاده کنید." msgid "The `pythoncapi-compat project `__ can be used to get :c:func:`PyConfig_Get` on Python 3.13 and older." msgstr "می‌توان از `پروژه‌ی pythoncapi-compat `__ برای دسترسی به :c:func:`PyConfig_Get` در پایتون 3.13 و قدیمی‌تر استفاده کرد." @@ -84,8 +82,8 @@ msgstr ":c:func:`!Py_SetProgramName()`: به جای آن، :c:member:`PyConfig.p msgid ":c:func:`!Py_SetPythonHome()`: Set :c:member:`PyConfig.home` instead." msgstr ":c:func:`!Py_SetPythonHome()`: به‌جای آن، :c:member:`PyConfig.home` را تنظیم کنید." -msgid ":c:func:`PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!warnings.filters` instead." -msgstr ":c:func:`PySys_ResetWarnOptions`: به‌جای آن، :data:`sys.warnoptions` و :data:`!warnings.filters` را پاک کنید." +msgid ":c:func:`!PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!warnings.filters` instead." +msgstr ":c:func:`!PySys_ResetWarnOptions`: به جای آن :data:`sys.warnoptions` و :data:`!warnings.filters` را پاکسازی کنید." msgid "The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:`PyConfig` instead." msgstr "به‌جای آن، باید از API :c:func:`Py_InitializeFromConfig` به همراه :c:type:`PyConfig` استفاده کرد." @@ -155,3 +153,6 @@ msgstr ":c:var:`!Py_UTF8Mode`: به‌جای آن از :c:member:`PyPreConfig.ut 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 "برای تنظیم این گزینه‌ها باید از API :c:func:`Py_InitializeFromConfig` به همراه :c:type:`PyConfig` استفاده شود. یا می‌توان از :c:func:`PyConfig_Get` برای دریافت این گزینه‌ها در ران‌تایم استفاده کرد." + +#~ msgid ":c:type:`Py_UNICODE` type and the :c:macro:`!Py_UNICODE_WIDE` macro: Use :c:type:`wchar_t` instead." +#~ msgstr "نوع :c:type:`Py_UNICODE` و ماکرو :c:macro:`!Py_UNICODE_WIDE`: به‌جای آن‌ها از :c:type:`wchar_t` استفاده کنید." diff --git a/deprecations/c-api-pending-removal-in-3.19.po b/deprecations/c-api-pending-removal-in-3.19.po new file mode 100644 index 00000000..fd9c7cb9 --- /dev/null +++ b/deprecations/c-api-pending-removal-in-3.19.po @@ -0,0 +1,27 @@ +# Persian translations for Python package. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# Automatically generated, 2026. +# +# Translators: +# Sepehr Rasouli , 2026 +# arman mohebali , 2026 +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-01 14:41+0330\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: fa\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "Pending removal in Python 3.19" +msgstr "در نسخه‌ی ۳.۱۹ پایتون حذف خواهد شد" + +msgid ":pep:`456` embedders support for the string hashing scheme definition." +msgstr "پشتیبانی توسعه‌دهندگان :pep:`456` از تعریف طرح‌واره‌ی هش کردن رشته." diff --git a/deprecations/c-api-pending-removal-in-3.20.po b/deprecations/c-api-pending-removal-in-3.20.po new file mode 100644 index 00000000..9f21d768 --- /dev/null +++ b/deprecations/c-api-pending-removal-in-3.20.po @@ -0,0 +1,33 @@ +# Persian translations for Python package. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# Automatically generated, 2026. +# +# Translators: +# Sepehr Rasouli , 2026 +# arman mohebali , 2026 +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-01 14:41+0330\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: fa\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "Pending removal in Python 3.20" +msgstr "در نسخه‌ی ۳.۲۰ پایتون حذف خواهد شد" + +msgid ":c:func:`!_PyObject_CallMethodId`, :c:func:`!_PyObject_GetAttrId` and :c:func:`!_PyUnicode_FromId` are deprecated since 3.15 and will be removed in 3.20. Instead, use :c:func:`PyUnicode_InternFromString()` and cache the result in the module state, then call :c:func:`PyObject_CallMethod` or :c:func:`PyObject_GetAttr`. (Contributed by Victor Stinner in :gh:`141049`.)" +msgstr "توابع :c:func:`!_PyObject_CallMethodId`، :c:func:`!_PyObject_GetAttrId` و :c:func:`!_PyUnicode_FromId` از نسخه‌ی ۳.۱۵ منسوخ شده‌اند و در نسخه‌ی ۳.۲۰ حذف خواهند شد. به‌جای آن، از :c:func:`PyUnicode_InternFromString()` استفاده کنید و نتیجه را در وضعیت ماژول نهانگاه کنید، سپس :c:func:`PyObject_CallMethod` یا :c:func:`PyObject_GetAttr` را فراخوانی کنید. (مشارکتی از Victor Stinner در :gh:`141049`.)" + +msgid "The ``cval`` field in :c:type:`PyComplexObject` (:gh:`128813`). Use :c:func:`PyComplex_AsCComplex` and :c:func:`PyComplex_FromCComplex` to convert a Python complex number to/from the C :c:type:`Py_complex` representation." +msgstr "فیلد ``cval`` در :c:type:`PyComplexObject` (:gh:`128813`). برای تبدیل یک عدد مختلط پایتون به/از نمایش C در :c:type:`Py_complex`، از :c:func:`PyComplex_AsCComplex` و :c:func:`PyComplex_FromCComplex` استفاده کنید." + +msgid "Macros :c:macro:`!Py_MATH_PIl` and :c:macro:`!Py_MATH_El`." +msgstr "کلان‌دستورهای :c:macro:`!Py_MATH_PIl` و :c:macro:`!Py_MATH_El`." diff --git a/deprecations/index.po b/deprecations/index.po index 401adcaa..3848aa7c 100644 --- a/deprecations/index.po +++ b/deprecations/index.po @@ -6,12 +6,13 @@ # Translators: # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2024-07-29 04:07+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -24,96 +25,12 @@ msgstr "" msgid "Deprecations" msgstr "منسوخ‌شده‌ها" -msgid "Pending removal in Python 3.15" -msgstr "در انتظار حذف در پایتون 3.15" +msgid "Pending removal in Python 3.16" +msgstr "در انتظار حذف در پایتون 3.16" msgid "The import system:" msgstr "سیستم ایمپورت:" -msgid "Setting :attr:`~module.__cached__` on a module while failing to set :attr:`__spec__.cached ` is deprecated. In Python 3.15, :attr:`!__cached__` will cease to be set or take into consideration by the import system or standard library. (:gh:`97879`)" -msgstr "تنظیم :attr:`~module.__cached__` روی یک ماژول در حالی که :attr:`__spec__.cached ` تنظیم نشده باشد، منسوخ شده است. در پایتون 3.15، :attr:`!__cached__` دیگر توسط سیستم ایمپورت یا کتابخانه استاندارد تنظیم نخواهد شد یا در نظر گرفته نخواهد شد. (:gh:`97879`)" - -msgid "Setting :attr:`~module.__package__` on a module while failing to set :attr:`__spec__.parent ` is deprecated. In Python 3.15, :attr:`!__package__` will cease to be set or take into consideration by the import system or standard library. (:gh:`97879`)" -msgstr "تنظیم کردن :attr:`~module.__package__` روی یک ماژول بدون تنظیم :attr:`__spec__.parent ` منسوخ شده است. در پایتون 3.15، :attr:`!__package__` دیگر توسط سیستم ایمپورت یا کتابخانه استاندارد تنظیم یا در نظر گرفته نخواهد شد. (:gh:`97879`)" - -msgid ":mod:`ctypes`:" -msgstr ":mod:`ctypes`:" - -msgid "The undocumented :func:`!ctypes.SetPointerType` function has been deprecated since Python 3.13." -msgstr "تابع مستند‌نشده :func:`!ctypes.SetPointerType` از پایتون 3.13 منسوخ شده است." - -msgid ":mod:`http.server`:" -msgstr ":mod:`http.server`:" - -msgid "The obsolete and rarely used :class:`~http.server.CGIHTTPRequestHandler` has been deprecated since Python 3.13. No direct replacement exists. *Anything* is better than CGI to interface a web server with a request handler." -msgstr "کلاس :class:`~http.server.CGIHTTPRequestHandler` که از رده خارج است و به‌ندرت استفاده می‌شود، از پایتون 3.13 منسوخ شده است. جایگزین مستقیمی برای آن وجود ندارد. برای برقراری رابط بین وب‌سرور و هندلر درخواست، *هر چیزی* بهتر از CGI است." - -msgid "The :option:`!--cgi` flag to the :program:`python -m http.server` command-line interface has been deprecated since Python 3.13." -msgstr "پرچم :option:`!--cgi` در رابط خط فرمان :program:`python -m http.server` از پایتون 3.13 منسوخ شده است." - -msgid ":mod:`importlib`:" -msgstr ":mod:`importlib`:" - -msgid "``load_module()`` method: use ``exec_module()`` instead." -msgstr "متد ``load_module()``: به‌جای آن از ``exec_module()`` استفاده کنید." - -msgid ":mod:`pathlib`:" -msgstr ":mod:`pathlib`:" - -msgid ":meth:`.PurePath.is_reserved` has been deprecated since Python 3.13. Use :func:`os.path.isreserved` to detect reserved paths on Windows." -msgstr ":meth:`.PurePath.is_reserved` از پایتون 3.13 منسوخ شده است. برای تشخیص مسیرهای رزروشده در ویندوز، از :func:`os.path.isreserved` استفاده کنید." - -msgid ":mod:`platform`:" -msgstr ":mod:`platform`:" - -msgid ":func:`~platform.java_ver` has been deprecated since Python 3.13. This function is only useful for Jython support, has a confusing API, and is largely untested." -msgstr ":func:`~platform.java_ver` از پایتون 3.13 منسوخ شده است. این تابع تنها برای پشتیبانی از Jython مفید است، API گیج‌کننده‌ای دارد و عمدتاً آزمایش‌نشده است." - -msgid ":mod:`sysconfig`:" -msgstr ":mod:`sysconfig`:" - -msgid "The *check_home* argument of :func:`sysconfig.is_python_build` has been deprecated since Python 3.12." -msgstr "آرگومان *check_home* تابع :func:`sysconfig.is_python_build` از پایتون 3.12 منسوخ شده است." - -msgid ":mod:`threading`:" -msgstr ":mod:`threading`:" - -msgid ":func:`~threading.RLock` will take no arguments in Python 3.15. Passing any arguments has been deprecated since Python 3.14, as the Python version does not permit any arguments, but the C version allows any number of positional or keyword arguments, ignoring every argument." -msgstr ":func:`~threading.RLock` در پایتون 3.15 هیچ آرگومانی نخواهد گرفت. ارسال هر آرگومانی از پایتون 3.14 منسوخ شده است، زیرا نسخه‌ی پایتون اجازه‌ی هیچ آرگومانی را نمی‌دهد، اما نسخه‌ی C هر تعداد آرگومان جایگاهی یا کلیدواژه‌ای را می‌پذیرد و همه‌ی آرگومان‌ها را نادیده می‌گیرد." - -msgid ":mod:`types`:" -msgstr ":mod:`types`:" - -msgid ":class:`types.CodeType`: Accessing :attr:`~codeobject.co_lnotab` was deprecated in :pep:`626` since 3.10 and was planned to be removed in 3.12, but it only got a proper :exc:`DeprecationWarning` in 3.12. May be removed in 3.15. (Contributed by Nikita Sobolev in :gh:`101866`.)" -msgstr ":class:`types.CodeType`: دسترسی به :attr:`~codeobject.co_lnotab` طبق :pep:`626` از نسخه‌ی 3.10 منسوخ شد و قرار بود در 3.12 حذف شود، اما تنها در 3.12 یک :exc:`DeprecationWarning` مناسب دریافت کرد. ممکن است در 3.15 حذف شود. (مشارکت‌شده توسط نیکیتا سوبولف در :gh:`101866`.)" - -msgid ":mod:`typing`:" -msgstr ":mod:`typing`:" - -msgid "The undocumented keyword argument syntax for creating :class:`~typing.NamedTuple` classes (for example, ``Point = NamedTuple(\"Point\", x=int, y=int)``) has been deprecated since Python 3.13. Use the class-based syntax or the functional syntax instead." -msgstr "سینتکس مستندنشده‌ی آرگومان کلیدواژه‌ای برای ایجاد کلاس‌های :class:`~typing.NamedTuple` (برای مثال، ``Point = NamedTuple(\"Point\", x=int, y=int)``) از پایتون 3.13 منسوخ شده است. به‌جای آن، از سینتکس مبتنی بر کلاس یا سینتکس تابعی استفاده کنید." - -msgid "When using the functional syntax of :class:`~typing.TypedDict`\\s, failing to pass a value to the *fields* parameter (``TD = TypedDict(\"TD\")``) or passing ``None`` (``TD = TypedDict(\"TD\", None)``) has been deprecated since Python 3.13. Use ``class TD(TypedDict): pass`` or ``TD = TypedDict(\"TD\", {})`` to create a TypedDict with zero field." -msgstr "هنگام استفاده از سینتکس تابعی :class:`~typing.TypedDict`، عدم ارسال مقدار به پارامتر *fields* (``TD = TypedDict(\"TD\")``) یا ارسال ``None`` (``TD = TypedDict(\"TD\", None)``) از پایتون 3.13 منسوخ شده است. برای ایجاد یک TypedDict بدون هیچ فیلدی، از ``class TD(TypedDict): pass`` یا ``TD = TypedDict(\"TD\", {})`` استفاده کنید." - -msgid "The :deco:`typing.no_type_check_decorator` decorator function has been deprecated since Python 3.13. After eight years in the :mod:`typing` module, it has yet to be supported by any major type checker." -msgstr "تابع دکوراتور :deco:`typing.no_type_check_decorator` از پایتون 3.13 منسوخ شده است. پس از هشت سال حضور در ماژول :mod:`typing`، هنوز توسط هیچ بررسی‌گر نوع مطرحی پشتیبانی نشده است." - -msgid ":mod:`wave`:" -msgstr ":mod:`wave`:" - -msgid "The :meth:`~wave.Wave_read.getmark`, :meth:`!setmark`, and :meth:`~wave.Wave_read.getmarkers` methods of the :class:`~wave.Wave_read` and :class:`~wave.Wave_write` classes have been deprecated since Python 3.13." -msgstr "متدهای :meth:`~wave.Wave_read.getmark`، :meth:`!setmark` و :meth:`~wave.Wave_read.getmarkers` در کلاس‌های :class:`~wave.Wave_read` و :class:`~wave.Wave_write` از پایتون 3.13 منسوخ شده‌اند." - -msgid ":mod:`zipimport`:" -msgstr ":mod:`zipimport`:" - -msgid ":meth:`~zipimport.zipimporter.load_module` has been deprecated since Python 3.10. Use :meth:`~zipimport.zipimporter.exec_module` instead. (Contributed by Jiahao Li in :gh:`125746`.)" -msgstr ":meth:`~zipimport.zipimporter.load_module` از پایتون 3.10 منسوخ شده است. به جای آن از :meth:`~zipimport.zipimporter.exec_module` استفاده کنید. (مشارکت‌شده توسط جیاهائو لی در :gh:`125746`.)" - -msgid "Pending removal in Python 3.16" -msgstr "در انتظار حذف در پایتون 3.16" - msgid "Setting :attr:`~module.__loader__` on a module while failing to set :attr:`__spec__.loader ` is deprecated. In Python 3.16, :attr:`!__loader__` will cease to be set or taken into consideration by the import system or the standard library." msgstr "تنظیم :attr:`~module.__loader__` روی یک ماژول بدون تنظیم :attr:`__spec__.loader ` منسوخ شده است. در پایتون 3.16، :attr:`!__loader__` دیگر توسط سیستم ایمپورت یا کتابخانه استاندارد تنظیم یا در نظر گرفته نخواهد شد." @@ -216,6 +133,9 @@ msgstr ":mod:`sys`:" msgid "The :func:`~sys._enablelegacywindowsfsencoding` function has been deprecated since Python 3.13. Use the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` environment variable instead." msgstr "تابع :func:`~sys._enablelegacywindowsfsencoding` از پایتون 3.13 منسوخ شده است. به جای آن از متغیر محیطی :envvar:`PYTHONLEGACYWINDOWSFSENCODING` استفاده کنید." +msgid ":mod:`sysconfig`:" +msgstr ":mod:`sysconfig`:" + msgid "The :func:`!sysconfig.expand_makefile_vars` function has been deprecated since Python 3.14. Use the ``vars`` argument of :func:`sysconfig.get_paths` instead." msgstr "تابع :func:`!sysconfig.expand_makefile_vars` از پایتون 3.14 منسوخ شده است. به جای آن، از آرگومان ``vars`` در :func:`sysconfig.get_paths` استفاده کنید." @@ -228,6 +148,12 @@ msgstr "ویژگی مستندنشده و استفاده‌نشده‌ی :attr:`! msgid "Pending removal in Python 3.17" msgstr "در انتظار حذف در پایتون 3.17" +msgid ":mod:`datetime`:" +msgstr ":mod:`datetime`:" + +msgid ":meth:`~datetime.datetime.strptime` calls using a format string containing ``%e`` (day of month) without a year. This has been deprecated since Python 3.15. (Contributed by Stan Ulbrych in :gh:`70647`.)" +msgstr "فراخوانی‌های :meth:`~datetime.datetime.strptime` که از یک رشته‌ی قالب حاوی ``%e`` (روز ماه) بدون سال استفاده می‌کنند. این مورد از پایتون ۳.۱۵ منسوخ شده است. (مشارکتی از Stan Ulbrych در :gh:`70647`.)" + msgid ":mod:`collections.abc`:" msgstr ":mod:`collections.abc`:" @@ -243,27 +169,204 @@ msgstr ":class:`!ByteString` در اصل قرار بود یک کلاس انتز msgid "See :pep:`PEP 688 <688#current-options>` for more details. (Contributed by Shantanu Jain in :gh:`91896`.)" msgstr "برای جزئیات بیشتر به :pep:`PEP 688 <688#current-options>` مراجعه کنید. (مشارکت‌شده توسط Shantanu Jain در :gh:`91896`.)" +msgid ":mod:`encodings`:" +msgstr ":mod:`encodings`:" + +msgid "Passing non-ascii *encoding* names to :func:`encodings.normalize_encoding` is deprecated and scheduled for removal in Python 3.17. (Contributed by Stan Ulbrych in :gh:`136702`.)" +msgstr "ارسال نام‌های *encoding* غیر اسکی به :func:`encodings.normalize_encoding` منسوخ شده است و طبق برنامه در پایتون ۳.۱۷ حذف خواهد شد. (مشارکتی از Stan Ulbrych در :gh:`136702`.)" + +msgid ":mod:`profile`:" +msgstr ":mod:`profile`:" + +msgid "The :mod:`!profile` module is deprecated and will be removed in Python 3.17. Use :mod:`profiling.tracing` instead, which provides a compatible API. See :pep:`799` for details. (Contributed by Pablo Galindo and László Kiss Kollár in :gh:`138122`.)" +msgstr "ماژول :mod:`!profile` منسوخ شده است و در پایتون ۳.۱۷ حذف خواهد شد. به‌جای آن از :mod:`profiling.tracing` استفاده کنید که یک API سازگار فراهم می‌کند. برای جزئیات بیشتر :pep:`799` را ببینید. (مشارکتی از Pablo Galindo و László Kiss Kollár در :gh:`138122`.)" + +msgid ":mod:`webbrowser`:" +msgstr ":mod:`webbrowser`:" + +msgid ":class:`!webbrowser.MacOSXOSAScript` is deprecated in favour of :class:`!webbrowser.MacOS`. (:gh:`137586`)" +msgstr "کلاس :class:`!webbrowser.MacOSXOSAScript` به نفع کلاس :class:`!webbrowser.MacOS` منسوخ شده است. (:gh:`137586`)" + +msgid ":mod:`typing`:" +msgstr ":mod:`typing`:" + msgid "Before Python 3.14, old-style unions were implemented using the private class ``typing._UnionGenericAlias``. This class is no longer needed for the implementation, but it has been retained for backward compatibility, with removal scheduled for Python 3.17. Users should use documented introspection helpers like :func:`typing.get_origin` and :func:`typing.get_args` instead of relying on private implementation details." msgstr "پیش از پایتون 3.14، اجتماع‌های سبک قدیمی (old-style unions) با استفاده از کلاس خصوصی ``typing._UnionGenericAlias`` پیاده‌سازی می‌شدند. این کلاس دیگر برای پیاده‌سازی لازم نیست، اما برای سازگاری با نسخه‌های پیشین حفظ شده است و حذف آن برای پایتون 3.17 برنامه‌ریزی شده است. کاربران باید به‌جای اتکا به جزئیات پیاده‌سازی خصوصی، از ابزارهای کمکی درون‌نگری مستند مانند :func:`typing.get_origin` و :func:`typing.get_args` استفاده کنند." msgid ":class:`typing.ByteString`, deprecated since Python 3.9, is scheduled for removal in Python 3.17." msgstr ":class:`typing.ByteString` که از پایتون 3.9 منسوخ شده است، برای حذف در پایتون 3.17 برنامه‌ریزی شده است." +msgid ":mod:`tkinter`:" +msgstr ":mod:`tkinter`:" + +msgid "The :class:`!tkinter.Variable` methods :meth:`!trace_variable`, :meth:`!trace` (an alias of :meth:`!trace_variable`), :meth:`!trace_vdelete` and :meth:`!trace_vinfo`, deprecated since Python 3.14, are scheduled for removal in Python 3.17. Use :meth:`!trace_add`, :meth:`!trace_remove` and :meth:`!trace_info` instead. (Contributed by Serhiy Storchaka in :gh:`120220`.)" +msgstr "متدهای :class:`!tkinter.Variable` یعنی :meth:`!trace_variable`، :meth:`!trace` (یک نام مستعار برای :meth:`!trace_variable`)، :meth:`!trace_vdelete` و :meth:`!trace_vinfo` که از پایتون ۳.۱۴ منسوخ شده‌اند، طبق برنامه در پایتون ۳.۱۷ حذف خواهند شد. به‌جای آن‌ها از :meth:`!trace_add`، :meth:`!trace_remove` و :meth:`!trace_info` استفاده کنید. (مشارکتی از Serhiy Storchaka در :gh:`120220`.)" + msgid "Pending removal in Python 3.18" msgstr "در انتظار حذف در پایتون 3.18" +msgid "No longer accept a boolean value when a file descriptor is expected. (Contributed by Serhiy Storchaka in :gh:`82626`.)" +msgstr "هنگامی که انتظار یک توصیف‌گر پرونده می‌رود، دیگر یک مقدار بولی پذیرفته نمی‌شود. (مشارکتی از Serhiy Storchaka در :gh:`82626`.)" + msgid ":mod:`decimal`:" msgstr ":mod:`decimal`:" msgid "The non-standard and undocumented :class:`~decimal.Decimal` format specifier ``'N'``, which is only supported in the :mod:`!decimal` module's C implementation, has been deprecated since Python 3.13. (Contributed by Serhiy Storchaka in :gh:`89902`.)" msgstr "مشخص‌کننده قالب ``'N'`` در :class:`~decimal.Decimal` که غیراستاندارد و مستندسازی‌نشده است و فقط در پیاده‌سازی C ماژول :mod:`!decimal` پشتیبانی می‌شود، از پایتون 3.13 منسوخ شده است. (مشارکت‌شده توسط Serhiy Storchaka در :gh:`89902`.)" +msgid "Deprecations defined by :pep:`829`:" +msgstr "موارد منسوخ تعریف‌شده توسط :pep:`829`:" + +msgid "``import`` lines in :file:`{name}.pth` files are silently ignored." +msgstr "خط‌های ``import`` در پرونده‌های :file:`{name}.pth` به‌طور صامت نادیده گرفته می‌شوند." + +msgid "(Contributed by Barry Warsaw in :gh:`148641`.)" +msgstr "(تهیه‌شده توسط Barry Warsaw در :gh:`148641`.)" + msgid "Pending removal in Python 3.19" msgstr "در انتظار حذف در پایتون 3.19" +msgid ":mod:`ctypes`:" +msgstr ":mod:`ctypes`:" + msgid "Implicitly switching to the MSVC-compatible struct layout by setting :attr:`~ctypes.Structure._pack_` but not :attr:`~ctypes.Structure._layout_` on non-Windows platforms." msgstr "تغییر ضمنی به چیدمان ساختار سازگار با MSVC با تنظیم :attr:`~ctypes.Structure._pack_` اما بدون تنظیم :attr:`~ctypes.Structure._layout_` روی پلتفرم‌های غیر ویندوزی." +msgid ":mod:`hashlib`:" +msgstr ":mod:`hashlib`:" + +msgid "In hash function constructors such as :func:`~hashlib.new` or the direct hash-named constructors such as :func:`~hashlib.md5` and :func:`~hashlib.sha256`, their optional initial data parameter could also be passed a keyword argument named ``data=`` or ``string=`` in various :mod:`!hashlib` implementations." +msgstr "در سازنده‌های توابع هش مانند :func:`~hashlib.new` یا سازنده‌های مستقیم با نام هش مانند :func:`~hashlib.md5` و :func:`~hashlib.sha256`، در پیاده‌سازی‌های مختلف :mod:`!hashlib` می‌توانید پارامتر داده‌ی اولیه اختیاری را به صورت آرگومان کلیدواژه‌ای با نام ``data=`` یا ``string=`` نیز ارسال کنید." + +msgid "Support for the ``string`` keyword argument name is now deprecated and slated for removal in Python 3.19." +msgstr "پشتیبانی از نام آرگومان کلیدواژه‌ای ``string`` اکنون منسوخ شده است و در پایتون ۳.۱۹ حذف خواهد شد." + +msgid "Before Python 3.13, the ``string`` keyword parameter was not correctly supported depending on the backend implementation of hash functions. Prefer passing the initial data as a positional argument for maximum backwards compatibility." +msgstr "پیش از نسخه‌ی ۳.۱۳ پایتون، پارامتر کلیدواژه‌ای ``string`` بسته به پیاده‌سازی بک‌اند توابع هش به‌درستی پشتیبانی نمی‌شد. برای حداکثر سازگاری با نسخه‌های قبلی، ترجیح دهید داده‌ی اولیه را به عنوان یک آرگومان جایگاهی ارسال کنید." + +msgid ":mod:`http.cookies`:" +msgstr ":mod:`http.cookies`:" + +msgid ":meth:`http.cookies.Morsel.js_output` is deprecated and will be removed in Python 3.19." +msgstr ":meth:`http.cookies.Morsel.js_output` منسوخ شده است و در نسخه‌ی ۳.۱۹ پایتون حذف خواهد شد." + +msgid ":meth:`http.cookies.BaseCookie.js_output` is deprecated and will be removed in Python 3.19." +msgstr ":meth:`http.cookies.BaseCookie.js_output` منسوخ شده است و در نسخه‌ی ۳.۱۹ پایتون حذف خواهد شد." + +msgid ":mod:`imaplib`:" +msgstr ":mod:`imaplib`:" + +msgid "Altering :attr:`IMAP4.file ` is now deprecated and slated for removal in Python 3.19. This property is now unused and changing its value does not automatically close the current file." +msgstr "تغییر دادن :attr:`IMAP4.file ` اکنون منسوخ شده است و برای حذف در نسخه‌ی ۳.۱۹ پایتون در نظر گرفته شده است. این ویژگی اکنون استفاده نمی‌شود و تغییر دادن مقدار آن پرونده‌ی جاری را به‌طور خودکار نمی‌بندد." + +msgid "Before Python 3.14, this property was used to implement the corresponding ``read()`` and ``readline()`` methods for :class:`~imaplib.IMAP4` but this is no longer the case since then." +msgstr "پیش از نسخه‌ی ۳.۱۴ پایتون، از این ویژگی برای پیاده‌سازی متدهای متناظر ``read()`` و ``readline()`` برای :class:`~imaplib.IMAP4` استفاده می‌شد اما از آن زمان به بعد دیگر این‌طور نیست." + +msgid "Pending removal in Python 3.20" +msgstr "در نسخه‌ی ۳.۲۰ پایتون حذف خواهد شد" + +msgid "Calling the ``__new__()`` method of :class:`struct.Struct` without the *format* argument is deprecated and will be removed in Python 3.20. Calling :meth:`~object.__init__` method on initialized :class:`~struct.Struct` objects is deprecated and will be removed in Python 3.20." +msgstr "فراخوانی متد ``__new__()`` از :class:`struct.Struct` بدون آرگومان *format* منسوخ شده است و در نسخه‌ی ۳.۲۰ پایتون حذف خواهد شد. فراخوانی متد :meth:`~object.__init__` روی اشیاء مقداردهی‌شده‌ی :class:`~struct.Struct` منسوخ شده است و در نسخه‌ی ۳.۲۰ پایتون حذف خواهد شد." + +msgid "(Contributed by Sergey B Kirpichev and Serhiy Storchaka in :gh:`143715`.)" +msgstr "(مشارکت‌کرده توسط Sergey B Kirpichev و Serhiy Storchaka در :gh:`143715`.)" + +msgid "The ``__version__``, ``version`` and ``VERSION`` attributes have been deprecated in these standard library modules and will be removed in Python 3.20. Use :py:data:`sys.version_info` instead." +msgstr "ویژگی‌های ``__version__``، ``version`` و ``VERSION`` در این ماژول‌های کتابخانه‌ی استاندارد منسوخ شده‌اند و در نسخه‌ی ۳.۲۰ پایتون حذف خواهند شد. به‌جای آن‌ها از :py:data:`sys.version_info` استفاده کنید." + +msgid ":mod:`argparse`" +msgstr ":mod:`argparse`" + +msgid ":mod:`csv`" +msgstr ":mod:`csv`" + +msgid ":mod:`ctypes`" +msgstr ":mod:`ctypes`" + +msgid ":mod:`!ctypes.macholib`" +msgstr ":mod:`!ctypes.macholib`" + +msgid ":mod:`decimal` (use :data:`decimal.SPEC_VERSION` instead)" +msgstr ":mod:`decimal` (به‌جای آن از :data:`decimal.SPEC_VERSION` استفاده کنید)" + +msgid ":mod:`http.server`" +msgstr ":mod:`http.server`" + +msgid ":mod:`imaplib`" +msgstr ":mod:`imaplib`" + +msgid ":mod:`ipaddress`" +msgstr ":mod:`ipaddress`" + +msgid ":mod:`json`" +msgstr ":mod:`json`" + +msgid ":mod:`logging` (``__date__`` also deprecated)" +msgstr ":mod:`logging` (``__date__`` نیز منسوخ شده است)" + +msgid ":mod:`optparse`" +msgstr ":mod:`optparse`" + +msgid ":mod:`pickle`" +msgstr ":mod:`pickle`" + +msgid ":mod:`platform`" +msgstr ":mod:`platform`" + +msgid ":mod:`re`" +msgstr ":mod:`re`" + +msgid ":mod:`socketserver`" +msgstr ":mod:`socketserver`" + +msgid ":mod:`tabnanny`" +msgstr ":mod:`tabnanny`" + +msgid ":mod:`tarfile`" +msgstr ":mod:`tarfile`" + +msgid ":mod:`tkinter.font`" +msgstr ":mod:`tkinter.font`" + +msgid ":mod:`tkinter.ttk`" +msgstr ":mod:`tkinter.ttk`" + +msgid ":mod:`wsgiref.simple_server`" +msgstr ":mod:`wsgiref.simple_server`" + +msgid ":mod:`xml.etree.ElementTree`" +msgstr ":mod:`xml.etree.ElementTree`" + +msgid ":mod:`!xml.sax.expatreader`" +msgstr ":mod:`!xml.sax.expatreader`" + +msgid ":mod:`xml.sax.handler`" +msgstr ":mod:`xml.sax.handler`" + +msgid ":mod:`zlib`" +msgstr ":mod:`zlib`" + +msgid "(Contributed by Hugo van Kemenade and Stan Ulbrych in :gh:`76007`.)" +msgstr "(تهیه‌شده توسط Hugo van Kemenade و Stan Ulbrych در :gh:`76007`.)" + +msgid "Warnings are produced for ``import`` lines found in :file:`{name}.pth` files." +msgstr "برای خط‌های ``import`` یافت‌شده در پرونده‌های :file:`{name}.pth` اخطاردهی می‌شود." + +msgid ":file:`{name}.pth` files are no longer decoded in the locale encoding by default. They **MUST** be encoded in ``utf-8-sig``." +msgstr "پرونده‌های :file:`{name}.pth` دیگر به‌طور پیش‌فرض با کدگذاری locale رمزگشایی نمی‌شوند. آن‌ها **باید** با کدگذاری ``utf-8-sig`` رمزگذاری شوند." + +msgid ":mod:`ast`:" +msgstr ":mod:`ast`:" + +msgid "Creating instances of abstract AST nodes (such as :class:`ast.AST` or :class:`!ast.expr`) is deprecated and will raise an error in Python 3.20." +msgstr "ایجاد نمونه‌هایی از گره‌های درخت نحوی انتزاعی (AST) (مانند :class:`ast.AST` یا :class:`!ast.expr`) منسوخ شده است و در نسخه‌ی ۳.۲۰ پایتون خطایی را ایجاد خواهد کرد." + +msgid "It is deprecated to call :func:`isinstance` and :func:`issubclass` checks on protocol classes that were not explicitly decorated with :func:`!runtime_checkable` but that inherit from a runtime-checkable protocol class. This will raise a :exc:`TypeError` in Python 3.20." +msgstr "فراخوانی بررسی‌های :func:`isinstance` و :func:`issubclass` روی کلاس‌های پروتکلی که صراحتاً با :func:`!runtime_checkable` تزئین نشده‌اند اما از یک کلاس پروتکل با قابلیت بررسی در زمان اجرا (runtime-checkable) ارث‌بری می‌کنند، منسوخ شده است. این کار در نسخه‌ی ۳.۲۰ پایتون یک خطای :exc:`TypeError` ایجاد خواهد کرد." + +msgid "(Contributed by Bartosz Sławecki in :gh:`132604`.)" +msgstr "(تهیه‌شده توسط Bartosz Sławecki در :gh:`132604`.)" + msgid "Pending removal in future versions" msgstr "در انتظار حذف در نسخه‌های آینده" @@ -306,11 +409,8 @@ msgstr ":mod:`calendar`: ثابت‌های ``calendar.January`` و ``calendar.Fe msgid ":mod:`codecs`: use :func:`open` instead of :func:`codecs.open`. (:gh:`133038`)" msgstr ":mod:`codecs`: به‌جای :func:`codecs.open` از :func:`open` استفاده کنید. (:gh:`133038`)" -msgid ":attr:`codeobject.co_lnotab`: use the :meth:`codeobject.co_lines` method instead." -msgstr ":attr:`codeobject.co_lnotab`: به جای آن از متد :meth:`codeobject.co_lines` استفاده کنید." - -msgid ":mod:`datetime`:" -msgstr ":mod:`datetime`:" +msgid ":attr:`!codeobject.co_lnotab`: use the :meth:`codeobject.co_lines` method instead." +msgstr ":attr:`!codeobject.co_lnotab`: به‌جای آن از متد :meth:`codeobject.co_lines` استفاده کنید." msgid ":meth:`~datetime.datetime.utcnow`: use ``datetime.datetime.now(tz=datetime.UTC)``." msgstr ":meth:`~datetime.datetime.utcnow`: از ``datetime.datetime.now(tz=datetime.UTC)`` استفاده کنید." @@ -321,6 +421,9 @@ msgstr ":meth:`~datetime.datetime.utcfromtimestamp`: از ``datetime.datetime.fr msgid ":mod:`gettext`: Plural value must be an integer." msgstr ":mod:`gettext`: مقدار جمع باید یک عدد صحیح باشد." +msgid ":mod:`importlib`:" +msgstr ":mod:`importlib`:" + msgid ":func:`~importlib.util.cache_from_source` *debug_override* parameter is deprecated: use the *optimization* parameter instead." msgstr "پارامتر *debug_override* در :func:`~importlib.util.cache_from_source` منسوخ شده است: به جای آن از پارامتر *optimization* استفاده کنید." @@ -339,8 +442,11 @@ msgstr ":mod:`logging`: متد ``warn()`` از پایتون 3.3 به بعد من msgid ":mod:`mailbox`: Use of StringIO input and text mode is deprecated, use BytesIO and binary mode instead." msgstr ":mod:`mailbox`: استفاده از ورودی StringIO و حالت متنی منسوخ شده است؛ به‌جای آن از BytesIO و حالت دودویی استفاده کنید." -msgid ":mod:`os`: Calling :func:`os.register_at_fork` in multi-threaded process." -msgstr ":mod:`os`: فراخوانی :func:`os.register_at_fork` در فرایند چندنخی." +msgid ":mod:`os`: Calling :func:`os.register_at_fork` in a multi-threaded process." +msgstr ":mod:`os`: فراخوانی :func:`os.register_at_fork` در یک فرایند چندنخی." + +msgid ":mod:`os.path`: :func:`os.path.commonprefix` is deprecated, use :func:`os.path.commonpath` for path prefixes. The :func:`os.path.commonprefix` function is being deprecated due to having a misleading name and module. The function is not safe to use for path prefixes despite being included in a module about path manipulation, meaning it is easy to accidentally introduce path traversal vulnerabilities into Python programs by using this function." +msgstr ":mod:`os.path`: تابع :func:`os.path.commonprefix` منسوخ شده است؛ برای پیشوندهای مسیر از :func:`os.path.commonpath` استفاده کنید. تابع :func:`os.path.commonprefix` به دلیل داشتن نام و ماژول گمراه‌کننده در حال منسوخ شدن است. این تابع با وجود اینکه در ماژولی مربوط به دستکاری مسیر قرار دارد، برای استفاده با پیشوندهای مسیر ایمن نیست؛ یعنی با استفاده از این تابع می‌توان به‌طور تصادفی آسیب‌پذیری‌های پیمایش مسیر را وارد برنامه‌های پایتون کرد." msgid ":class:`!pydoc.ErrorDuringImport`: A tuple value for *exc_info* parameter is deprecated, use an exception instance." msgstr ":class:`!pydoc.ErrorDuringImport`: مقدار تاپل برای پارامتر *exc_info* منسوخ شده است؛ از یک نمونه استثنا استفاده کنید." @@ -348,9 +454,6 @@ msgstr ":class:`!pydoc.ErrorDuringImport`: مقدار تاپل برای پارا msgid ":mod:`re`: More strict rules are now applied for numerical group references and group names in regular expressions. Only sequence of ASCII digits is now accepted as a numerical reference. The group name in bytes patterns and replacement strings can now only contain ASCII letters and digits and underscore. (Contributed by Serhiy Storchaka in :gh:`91760`.)" msgstr ":mod:`re`: اکنون قواعد سخت‌گیرانه‌تری برای ارجاع‌های عددی گروه و نام گروه‌ها در عبارت‌های باقاعده اعمال می‌شود. اکنون فقط دنباله‌ای از ارقام اسکی به‌عنوان ارجاع عددی پذیرفته می‌شود. نام گروه در الگوهای بایتی و رشته‌های جایگزین اکنون فقط می‌تواند شامل حروف و ارقام اسکی و زیرخط باشد. (مشارکت‌شده توسط Serhiy Storchaka در :gh:`91760`.)" -msgid ":mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse` modules." -msgstr "ماژول‌های :mod:`!sre_compile`، :mod:`!sre_constants` و :mod:`!sre_parse`." - msgid ":mod:`shutil`: :func:`~shutil.rmtree`'s *onerror* parameter is deprecated in Python 3.12; use the *onexc* parameter instead." msgstr ":mod:`shutil`: پارامتر *onerror* در :func:`~shutil.rmtree` در پایتون 3.12 منسوخ شده است؛ به‌جای آن از پارامتر *onexc* استفاده کنید." @@ -468,17 +571,35 @@ msgstr ":mod:`xml.etree.ElementTree`: آزمودن مقدار درستی یک :c msgid ":func:`sys._clear_type_cache` is deprecated: use :func:`sys._clear_internal_caches` instead." msgstr ":func:`sys._clear_type_cache` منسوخ شده است: به جای آن از :func:`sys._clear_internal_caches` استفاده کنید." +msgid "Soft deprecations" +msgstr "منسوخ‌سازی‌های نرم" + +msgid "There are no plans to remove :term:`soft deprecated` APIs." +msgstr "هیچ برنامه‌ای برای حذف :term:`مشتراک‌ناپذیر ` APIها وجود ندارد." + +msgid ":func:`re.match` and :meth:`re.Pattern.match` are now :term:`soft deprecated` in favor of the new :func:`re.prefixmatch` and :meth:`re.Pattern.prefixmatch` APIs, which have been added as alternate, more explicit names. These are intended to be used to alleviate confusion around what *match* means by following the Zen of Python's *\"Explicit is better than implicit\"* mantra. Most other language regular expression libraries use an API named *match* to mean what Python has always called *search*." +msgstr ":func:`re.match` و :meth:`re.Pattern.match` اکنون به نفع APIهای جدید :func:`re.prefixmatch` و :meth:`re.Pattern.prefixmatch` که به عنوان نام‌های جایگزین و صریح‌تر اضافه شده‌اند، :term:`مشتراک‌ناپذیر ` می‌شوند. این تغییرات به این منظور در نظر گرفته شده‌اند تا با پیروی از شعار ذن پایتون یعنی *«صریح بودن بهتر از ضمنی بودن است»*، سردرگمی‌ها پیرامون معنای *match* را کاهش دهند. بیشتر کتابخانه‌های عبارت باقاعده در زبان‌های دیگر از APIای به نام *match* استفاده می‌کنند که منظور پایتون از آن چیزی است که همیشه *search* نامیده است." + +msgid "We **do not** plan to remove the older :func:`!match` name, as it has been used in code for over 30 years. Code supporting older versions of Python should continue to use :func:`!match`, while new code should prefer :func:`!prefixmatch`. See :ref:`prefixmatch-vs-match`." +msgstr "ما **هیچ** برنامه‌ای برای حذف نام قدیمی‌تر :func:`!match` نداریم، زیرا این نام بیش از ۳۰ سال است که در کدها استفاده می‌شود. کدهایی که از نسخه‌های قدیمی‌تر پایتون پشتیبانی می‌کنند باید همچنان از :func:`!match` استفاده کنند، در حالی که کدهای جدید باید :func:`!prefixmatch` را ترجیح دهند. :ref:`prefixmatch-vs-match` را ببینید." + +msgid "(Contributed by Gregory P. Smith in :gh:`86519` and Hugo van Kemenade in :gh:`148100`.)" +msgstr "(مشارکت‌کرده توسط Gregory P. Smith در :gh:`86519` و Hugo van Kemenade در :gh:`148100`.)" + +msgid "Using ``'F'`` and ``'D'`` format type codes of the :mod:`struct` module now are :term:`soft deprecated` in favor of two-letter forms ``'Zf'`` and ``'Zd'``. (Contributed by Sergey B Kirpichev in :gh:`121249`.)" +msgstr "استفاده از کدهای نوع فرمت ``'F'`` و ``'D'`` در ماژول :mod:`struct` اکنون به نفع فرم‌های دوحرفی ``'Zf'`` و ``'Zd'`` :term:`مشتراک‌ناپذیر ` شده‌اند. (مشارکت‌کرده توسط Sergey B Kirpichev در :gh:`121249`.)" + msgid "C API deprecations" msgstr "منسوخ‌شده‌های C API" -msgid "The :c:func:`PyImport_ImportModuleNoBlock`: Use :c:func:`PyImport_ImportModule` instead." -msgstr "تابع :c:func:`PyImport_ImportModuleNoBlock`: به جای آن از :c:func:`PyImport_ImportModule` استفاده کنید." +msgid "Pending removal in Python 3.15" +msgstr "در انتظار حذف در پایتون 3.15" -msgid ":c:func:`PyWeakref_GetObject` and :c:func:`PyWeakref_GET_OBJECT`: Use :c:func:`PyWeakref_GetRef` instead. The `pythoncapi-compat project `__ can be used to get :c:func:`PyWeakref_GetRef` on Python 3.12 and older." -msgstr ":c:func:`PyWeakref_GetObject` و :c:func:`PyWeakref_GET_OBJECT`: به‌جای آن‌ها از :c:func:`PyWeakref_GetRef` استفاده کنید. می‌توان از `پروژه‌ی pythoncapi-compat `__ برای دسترسی به :c:func:`PyWeakref_GetRef` در پایتون 3.12 و نسخه‌های قدیمی‌تر استفاده کرد." +msgid "The :c:func:`!PyImport_ImportModuleNoBlock`: Use :c:func:`PyImport_ImportModule` instead." +msgstr ":c:func:`!PyImport_ImportModuleNoBlock`: به‌جای آن از :c:func:`PyImport_ImportModule` استفاده کنید." -msgid ":c:type:`Py_UNICODE` type and the :c:macro:`!Py_UNICODE_WIDE` macro: Use :c:type:`wchar_t` instead." -msgstr "نوع :c:type:`Py_UNICODE` و ماکرو :c:macro:`!Py_UNICODE_WIDE`: به جای آن‌ها از :c:type:`wchar_t` استفاده کنید." +msgid ":c:func:`!PyWeakref_GetObject` and :c:func:`!PyWeakref_GET_OBJECT`: Use :c:func:`PyWeakref_GetRef` instead. The `pythoncapi-compat project `__ can be used to get :c:func:`PyWeakref_GetRef` on Python 3.12 and older." +msgstr ":c:func:`!PyWeakref_GetObject` و :c:func:`!PyWeakref_GET_OBJECT`: به‌جای آن از :c:func:`PyWeakref_GetRef` استفاده کنید. پروژه‌ی `pythoncapi-compat project `__ را می‌توان برای دریافت :c:func:`PyWeakref_GetRef` روی پایتون ۳.۱۲ و نسخه‌های قدیمی‌تر استفاده کرد." msgid ":c:func:`!PyUnicode_AsDecodedObject`: Use :c:func:`PyCodec_Decode` instead." msgstr ":c:func:`!PyUnicode_AsDecodedObject`: به جای آن از :c:func:`PyCodec_Decode` استفاده کنید." @@ -495,23 +616,23 @@ msgstr ":c:func:`!PyUnicode_AsEncodedUnicode`: به‌جای آن از :c:func:` msgid "Python initialization functions, deprecated in Python 3.13:" msgstr "توابع مقداردهی اولیه پایتون، منسوخ‌شده در پایتون 3.13:" -msgid ":c:func:`Py_GetPath`: Use :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:`sys.path`) instead." -msgstr ":c:func:`Py_GetPath`: به‌جای آن از :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:`sys.path`) استفاده کنید." +msgid ":c:func:`!Py_GetPath`: Use :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:`sys.path`) instead." +msgstr ":c:func:`!Py_GetPath`: به‌جای آن از :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:`sys.path`) استفاده کنید." -msgid ":c:func:`Py_GetPrefix`: Use :c:func:`PyConfig_Get(\"base_prefix\") ` (:data:`sys.base_prefix`) instead. Use :c:func:`PyConfig_Get(\"prefix\") ` (:data:`sys.prefix`) if :ref:`virtual environments ` need to be handled." -msgstr ":c:func:`Py_GetPrefix`: به جای آن از :c:func:`PyConfig_Get(\"base_prefix\") ` (:data:`sys.base_prefix`) استفاده کنید. اگر لازم باشد :ref:`محیط‌های مجازی ` مدیریت شوند، از :c:func:`PyConfig_Get(\"prefix\") ` (:data:`sys.prefix`) استفاده کنید." +msgid ":c:func:`!Py_GetPrefix`: Use :c:func:`PyConfig_Get(\"base_prefix\") ` (:data:`sys.base_prefix`) instead. Use :c:func:`PyConfig_Get(\"prefix\") ` (:data:`sys.prefix`) if :ref:`virtual environments ` need to be handled." +msgstr ":c:func:`!Py_GetPrefix`: به‌جای آن از :c:func:`PyConfig_Get(\"base_prefix\") ` (:data:`sys.base_prefix`) استفاده کنید. اگر نیاز است :ref:`محیط‌های مجازی ` مدیریت شوند، از :c:func:`PyConfig_Get(\"prefix\") ` (:data:`sys.prefix`) استفاده کنید." -msgid ":c:func:`Py_GetExecPrefix`: Use :c:func:`PyConfig_Get(\"base_exec_prefix\") ` (:data:`sys.base_exec_prefix`) instead. Use :c:func:`PyConfig_Get(\"exec_prefix\") ` (:data:`sys.exec_prefix`) if :ref:`virtual environments ` need to be handled." -msgstr ":c:func:`Py_GetExecPrefix`: به جای آن از :c:func:`PyConfig_Get(\"base_exec_prefix\") ` (:data:`sys.base_exec_prefix`) استفاده کنید. اگر نیاز به مدیریت :ref:`محیط‌های مجازی ` باشد، از :c:func:`PyConfig_Get(\"exec_prefix\") ` (:data:`sys.exec_prefix`) استفاده کنید." +msgid ":c:func:`!Py_GetExecPrefix`: Use :c:func:`PyConfig_Get(\"base_exec_prefix\") ` (:data:`sys.base_exec_prefix`) instead. Use :c:func:`PyConfig_Get(\"exec_prefix\") ` (:data:`sys.exec_prefix`) if :ref:`virtual environments ` need to be handled." +msgstr ":c:func:`!Py_GetExecPrefix`: به‌جای آن از :c:func:`PyConfig_Get(\"base_exec_prefix\") ` (:data:`sys.base_exec_prefix`) استفاده کنید. اگر نیاز است :ref:`محیط‌های مجازی ` مدیریت شوند، از :c:func:`PyConfig_Get(\"exec_prefix\") ` (:data:`sys.exec_prefix`) استفاده کنید." -msgid ":c:func:`Py_GetProgramFullPath`: Use :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) instead." -msgstr ":c:func:`Py_GetProgramFullPath`: به جای آن از :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) استفاده کنید." +msgid ":c:func:`!Py_GetProgramFullPath`: Use :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) instead." +msgstr ":c:func:`!Py_GetProgramFullPath`: به‌جای آن از :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) استفاده کنید." -msgid ":c:func:`Py_GetProgramName`: Use :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) instead." -msgstr ":c:func:`Py_GetProgramName`: به جای آن از :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) استفاده کنید." +msgid ":c:func:`!Py_GetProgramName`: Use :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) instead." +msgstr ":c:func:`!Py_GetProgramName`: به‌جای آن از :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) استفاده کنید." -msgid ":c:func:`Py_GetPythonHome`: Use :c:func:`PyConfig_Get(\"home\") ` or the :envvar:`PYTHONHOME` environment variable instead." -msgstr ":c:func:`Py_GetPythonHome`: به جای آن از :c:func:`PyConfig_Get(\"home\") ` یا متغیر محیطی :envvar:`PYTHONHOME` استفاده کنید." +msgid ":c:func:`!Py_GetPythonHome`: Use :c:func:`PyConfig_Get(\"home\") ` or the :envvar:`PYTHONHOME` environment variable instead." +msgstr ":c:func:`!Py_GetPythonHome`: به‌جای آن از :c:func:`PyConfig_Get(\"home\") ` یا متغیر محیطی :envvar:`PYTHONHOME` استفاده کنید." msgid "The `pythoncapi-compat project `__ can be used to get :c:func:`PyConfig_Get` on Python 3.13 and older." msgstr "می‌توان از پروژه‌ی `pythoncapi-compat `__ برای به دست آوردن :c:func:`PyConfig_Get` در پایتون 3.13 و نسخه‌های قدیمی‌تر استفاده کرد." @@ -531,8 +652,8 @@ msgstr ":c:func:`!Py_SetProgramName()`: به‌جای آن :c:member:`PyConfig.p msgid ":c:func:`!Py_SetPythonHome()`: Set :c:member:`PyConfig.home` instead." msgstr ":c:func:`!Py_SetPythonHome()`: به جای آن :c:member:`PyConfig.home` را تنظیم کنید." -msgid ":c:func:`PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!warnings.filters` instead." -msgstr ":c:func:`PySys_ResetWarnOptions`: به‌جای آن، :data:`sys.warnoptions` و :data:`!warnings.filters` را پاک کنید." +msgid ":c:func:`!PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!warnings.filters` instead." +msgstr ":c:func:`!PySys_ResetWarnOptions`: به‌جای آن :data:`sys.warnoptions` و :data:`!warnings.filters` را پاک کنید." msgid "The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:`PyConfig` instead." msgstr "به‌جای آن، باید از API :c:func:`Py_InitializeFromConfig` به همراه :c:type:`PyConfig` استفاده شود." @@ -603,6 +724,9 @@ msgstr ":c:var:`!Py_UTF8Mode`: به جای آن از :c:member:`PyPreConfig.utf8 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 "برای تنظیم این گزینه‌ها باید از API :c:func:`Py_InitializeFromConfig` به همراه :c:type:`PyConfig` استفاده شود. یا می‌توان از :c:func:`PyConfig_Get` برای دریافت این گزینه‌ها در زمان اجرا استفاده کرد." +msgid "The bundled copy of ``libmpdec``." +msgstr "نسخه‌ی بسته‌بندی‌شده‌ی ``libmpdec``." + msgid "The following private functions are deprecated and planned for removal in Python 3.18:" msgstr "توابع خصوصی زیر منسوخ شده‌اند و حذف آن‌ها در پایتون 3.18 برنامه‌ریزی شده است:" @@ -666,6 +790,18 @@ msgstr ":c:func:`!_Py_fopen_obj`: از :c:func:`Py_fopen` استفاده کنی msgid "The `pythoncapi-compat project `__ can be used to get these new public functions on Python 3.13 and older. (Contributed by Victor Stinner in :gh:`128863`.)" msgstr "می‌توان از `پروژه‌ی pythoncapi-compat `__ برای به دست آوردن این توابع عمومی جدید در پایتون 3.13 و نسخه‌های قدیمی‌تر استفاده کرد. (مشارکت‌شده توسط Victor Stinner در :gh:`128863`.)" +msgid ":pep:`456` embedders support for the string hashing scheme definition." +msgstr "پشتیبانی تعبیه‌کنندگان :pep:`456` از تعریف طرح‌واره‌ی هش کردن رشته." + +msgid ":c:func:`!_PyObject_CallMethodId`, :c:func:`!_PyObject_GetAttrId` and :c:func:`!_PyUnicode_FromId` are deprecated since 3.15 and will be removed in 3.20. Instead, use :c:func:`PyUnicode_InternFromString()` and cache the result in the module state, then call :c:func:`PyObject_CallMethod` or :c:func:`PyObject_GetAttr`. (Contributed by Victor Stinner in :gh:`141049`.)" +msgstr "توابع :c:func:`!_PyObject_CallMethodId`، :c:func:`!_PyObject_GetAttrId` و :c:func:`!_PyUnicode_FromId` از نسخه‌ی 3.15 منسوخ شده‌اند و در نسخه‌ی 3.20 حذف خواهند شد. به جای آن‌ها، از :c:func:`PyUnicode_InternFromString()` استفاده کنید و نتیجه را در وضعیت ماژول نهانگاه کنید، سپس :c:func:`PyObject_CallMethod` یا :c:func:`PyObject_GetAttr` را فراخوانی کنید. (مشارکت‌کرده توسط Victor Stinner در :gh:`141049`.)" + +msgid "The ``cval`` field in :c:type:`PyComplexObject` (:gh:`128813`). Use :c:func:`PyComplex_AsCComplex` and :c:func:`PyComplex_FromCComplex` to convert a Python complex number to/from the C :c:type:`Py_complex` representation." +msgstr "فیلد ``cval`` در :c:type:`PyComplexObject` (:gh:`128813`). برای تبدیل یک عدد مختلط پایتون به/از نمایش C آن یعنی :c:type:`Py_complex`، از :c:func:`PyComplex_AsCComplex` و :c:func:`PyComplex_FromCComplex` استفاده کنید." + +msgid "Macros :c:macro:`!Py_MATH_PIl` and :c:macro:`!Py_MATH_El`." +msgstr "ماکروهای :c:macro:`!Py_MATH_PIl` و :c:macro:`!Py_MATH_El`." + msgid "The following APIs are deprecated and will be removed, although there is currently no date scheduled for their removal." msgstr "API‌های زیر منسوخ شده‌اند و حذف خواهند شد، اگرچه در حال حاضر هیچ تاریخی برای حذف آن‌ها تعیین نشده است." @@ -722,3 +858,60 @@ msgstr ":c:func:`PyThread_delete_key_value`: به جای آن از :c:func:`PyTh msgid ":c:func:`PyThread_ReInitTLS`: Unneeded since Python 3.7." msgstr ":c:func:`PyThread_ReInitTLS`: از پایتون 3.7 به بعد لازم نیست." + +#~ msgid "Setting :attr:`~module.__cached__` on a module while failing to set :attr:`__spec__.cached ` is deprecated. In Python 3.15, :attr:`!__cached__` will cease to be set or take into consideration by the import system or standard library. (:gh:`97879`)" +#~ msgstr "تنظیم :attr:`~module.__cached__` روی یک ماژول در حالی که :attr:`__spec__.cached ` تنظیم نشده باشد، منسوخ شده است. در پایتون 3.15، :attr:`!__cached__` دیگر توسط سیستم ایمپورت یا کتابخانه استاندارد تنظیم نخواهد شد یا در نظر گرفته نخواهد شد. (:gh:`97879`)" + +#~ msgid "Setting :attr:`~module.__package__` on a module while failing to set :attr:`__spec__.parent ` is deprecated. In Python 3.15, :attr:`!__package__` will cease to be set or take into consideration by the import system or standard library. (:gh:`97879`)" +#~ msgstr "تنظیم کردن :attr:`~module.__package__` روی یک ماژول بدون تنظیم :attr:`__spec__.parent ` منسوخ شده است. در پایتون 3.15، :attr:`!__package__` دیگر توسط سیستم ایمپورت یا کتابخانه استاندارد تنظیم یا در نظر گرفته نخواهد شد. (:gh:`97879`)" + +#~ msgid "The undocumented :func:`!ctypes.SetPointerType` function has been deprecated since Python 3.13." +#~ msgstr "تابع مستند‌نشده :func:`!ctypes.SetPointerType` از پایتون 3.13 منسوخ شده است." + +#~ msgid "The obsolete and rarely used :class:`~http.server.CGIHTTPRequestHandler` has been deprecated since Python 3.13. No direct replacement exists. *Anything* is better than CGI to interface a web server with a request handler." +#~ msgstr "کلاس :class:`~http.server.CGIHTTPRequestHandler` که از رده خارج است و به‌ندرت استفاده می‌شود، از پایتون 3.13 منسوخ شده است. جایگزین مستقیمی برای آن وجود ندارد. برای برقراری رابط بین وب‌سرور و هندلر درخواست، *هر چیزی* بهتر از CGI است." + +#~ msgid "The :option:`!--cgi` flag to the :program:`python -m http.server` command-line interface has been deprecated since Python 3.13." +#~ msgstr "پرچم :option:`!--cgi` در رابط خط فرمان :program:`python -m http.server` از پایتون 3.13 منسوخ شده است." + +#~ msgid "``load_module()`` method: use ``exec_module()`` instead." +#~ msgstr "متد ``load_module()``: به‌جای آن از ``exec_module()`` استفاده کنید." + +#~ msgid ":meth:`.PurePath.is_reserved` has been deprecated since Python 3.13. Use :func:`os.path.isreserved` to detect reserved paths on Windows." +#~ msgstr ":meth:`.PurePath.is_reserved` از پایتون 3.13 منسوخ شده است. برای تشخیص مسیرهای رزروشده در ویندوز، از :func:`os.path.isreserved` استفاده کنید." + +#~ msgid ":func:`~platform.java_ver` has been deprecated since Python 3.13. This function is only useful for Jython support, has a confusing API, and is largely untested." +#~ msgstr ":func:`~platform.java_ver` از پایتون 3.13 منسوخ شده است. این تابع تنها برای پشتیبانی از Jython مفید است، API گیج‌کننده‌ای دارد و عمدتاً آزمایش‌نشده است." + +#~ msgid "The *check_home* argument of :func:`sysconfig.is_python_build` has been deprecated since Python 3.12." +#~ msgstr "آرگومان *check_home* تابع :func:`sysconfig.is_python_build` از پایتون 3.12 منسوخ شده است." + +#~ msgid ":func:`~threading.RLock` will take no arguments in Python 3.15. Passing any arguments has been deprecated since Python 3.14, as the Python version does not permit any arguments, but the C version allows any number of positional or keyword arguments, ignoring every argument." +#~ msgstr ":func:`~threading.RLock` در پایتون 3.15 هیچ آرگومانی نخواهد گرفت. ارسال هر آرگومانی از پایتون 3.14 منسوخ شده است، زیرا نسخه‌ی پایتون اجازه‌ی هیچ آرگومانی را نمی‌دهد، اما نسخه‌ی C هر تعداد آرگومان جایگاهی یا کلیدواژه‌ای را می‌پذیرد و همه‌ی آرگومان‌ها را نادیده می‌گیرد." + +#~ msgid ":class:`types.CodeType`: Accessing :attr:`~codeobject.co_lnotab` was deprecated in :pep:`626` since 3.10 and was planned to be removed in 3.12, but it only got a proper :exc:`DeprecationWarning` in 3.12. May be removed in 3.15. (Contributed by Nikita Sobolev in :gh:`101866`.)" +#~ msgstr ":class:`types.CodeType`: دسترسی به :attr:`~codeobject.co_lnotab` طبق :pep:`626` از نسخه‌ی 3.10 منسوخ شد و قرار بود در 3.12 حذف شود، اما تنها در 3.12 یک :exc:`DeprecationWarning` مناسب دریافت کرد. ممکن است در 3.15 حذف شود. (مشارکت‌شده توسط نیکیتا سوبولف در :gh:`101866`.)" + +#~ msgid "The undocumented keyword argument syntax for creating :class:`~typing.NamedTuple` classes (for example, ``Point = NamedTuple(\"Point\", x=int, y=int)``) has been deprecated since Python 3.13. Use the class-based syntax or the functional syntax instead." +#~ msgstr "سینتکس مستندنشده‌ی آرگومان کلیدواژه‌ای برای ایجاد کلاس‌های :class:`~typing.NamedTuple` (برای مثال، ``Point = NamedTuple(\"Point\", x=int, y=int)``) از پایتون 3.13 منسوخ شده است. به‌جای آن، از سینتکس مبتنی بر کلاس یا سینتکس تابعی استفاده کنید." + +#~ msgid "When using the functional syntax of :class:`~typing.TypedDict`\\s, failing to pass a value to the *fields* parameter (``TD = TypedDict(\"TD\")``) or passing ``None`` (``TD = TypedDict(\"TD\", None)``) has been deprecated since Python 3.13. Use ``class TD(TypedDict): pass`` or ``TD = TypedDict(\"TD\", {})`` to create a TypedDict with zero field." +#~ msgstr "هنگام استفاده از سینتکس تابعی :class:`~typing.TypedDict`، عدم ارسال مقدار به پارامتر *fields* (``TD = TypedDict(\"TD\")``) یا ارسال ``None`` (``TD = TypedDict(\"TD\", None)``) از پایتون 3.13 منسوخ شده است. برای ایجاد یک TypedDict بدون هیچ فیلدی، از ``class TD(TypedDict): pass`` یا ``TD = TypedDict(\"TD\", {})`` استفاده کنید." + +#~ msgid "The :deco:`typing.no_type_check_decorator` decorator function has been deprecated since Python 3.13. After eight years in the :mod:`typing` module, it has yet to be supported by any major type checker." +#~ msgstr "تابع دکوراتور :deco:`typing.no_type_check_decorator` از پایتون 3.13 منسوخ شده است. پس از هشت سال حضور در ماژول :mod:`typing`، هنوز توسط هیچ بررسی‌گر نوع مطرحی پشتیبانی نشده است." + +#~ msgid "The :meth:`~wave.Wave_read.getmark`, :meth:`!setmark`, and :meth:`~wave.Wave_read.getmarkers` methods of the :class:`~wave.Wave_read` and :class:`~wave.Wave_write` classes have been deprecated since Python 3.13." +#~ msgstr "متدهای :meth:`~wave.Wave_read.getmark`، :meth:`!setmark` و :meth:`~wave.Wave_read.getmarkers` در کلاس‌های :class:`~wave.Wave_read` و :class:`~wave.Wave_write` از پایتون 3.13 منسوخ شده‌اند." + +#~ msgid ":mod:`zipimport`:" +#~ msgstr ":mod:`zipimport`:" + +#~ msgid ":meth:`~zipimport.zipimporter.load_module` has been deprecated since Python 3.10. Use :meth:`~zipimport.zipimporter.exec_module` instead. (Contributed by Jiahao Li in :gh:`125746`.)" +#~ msgstr ":meth:`~zipimport.zipimporter.load_module` از پایتون 3.10 منسوخ شده است. به جای آن از :meth:`~zipimport.zipimporter.exec_module` استفاده کنید. (مشارکت‌شده توسط جیاهائو لی در :gh:`125746`.)" + +#~ msgid ":mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse` modules." +#~ msgstr "ماژول‌های :mod:`!sre_compile`، :mod:`!sre_constants` و :mod:`!sre_parse`." + +#~ msgid ":c:type:`Py_UNICODE` type and the :c:macro:`!Py_UNICODE_WIDE` macro: Use :c:type:`wchar_t` instead." +#~ msgstr "نوع :c:type:`Py_UNICODE` و ماکرو :c:macro:`!Py_UNICODE_WIDE`: به جای آن‌ها از :c:type:`wchar_t` استفاده کنید." diff --git a/deprecations/pending-removal-in-3.15.po b/deprecations/pending-removal-in-3.15.po index 7773fa3d..8cd178b8 100644 --- a/deprecations/pending-removal-in-3.15.po +++ b/deprecations/pending-removal-in-3.15.po @@ -6,12 +6,13 @@ # Translators: # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2024-07-20 00:54+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -27,8 +28,8 @@ msgstr "در انتظار حذف در پایتون 3.15" msgid "The import system:" msgstr "سیستم ایمپورت:" -msgid "Setting :attr:`~module.__cached__` on a module while failing to set :attr:`__spec__.cached ` is deprecated. In Python 3.15, :attr:`!__cached__` will cease to be set or take into consideration by the import system or standard library. (:gh:`97879`)" -msgstr "تنظیم :attr:`~module.__cached__` روی یک ماژول در حالی که :attr:`__spec__.cached ` تنظیم نشده باشد، منسوخ شده است. در پایتون 3.15، :attr:`!__cached__` دیگر توسط سیستم ایمپورت یا کتابخانه استاندارد تنظیم نمی‌شود یا در نظر گرفته نمی‌شود. (:gh:`97879`)" +msgid "Setting ``__cached__`` on a module while failing to set :attr:`__spec__.cached ` is deprecated. In Python 3.15, ``__cached__`` will cease to be set or take into consideration by the import system or standard library. (:gh:`97879`)" +msgstr "تنظیم ویژگی ``__cached__`` روی یک ماژول در حالی که تنظیم :attr:`__spec__.cached ` با شکست مواجه می‌شود، منسوخ شده است. در پایتون ۳.۱۵، ویژگی ``__cached__`` دیگر توسط سیستم ایمپورت یا کتابخانه‌ی استاندارد تنظیم نخواهد شد و در نظر گرفته نمی‌شود. (:gh:`97879`)" msgid "Setting :attr:`~module.__package__` on a module while failing to set :attr:`__spec__.parent ` is deprecated. In Python 3.15, :attr:`!__package__` will cease to be set or take into consideration by the import system or standard library. (:gh:`97879`)" msgstr "تنظیم :attr:`~module.__package__` روی یک ماژول، بدون تنظیم :attr:`__spec__.parent `، منسوخ است. در پایتون 3.15، :attr:`!__package__` دیگر توسط سیستم ایمپورت یا کتابخانه استاندارد تنظیم نخواهد شد و در نظر گرفته نخواهد شد. (:gh:`97879`)" @@ -42,8 +43,8 @@ msgstr "تابع مستندنشده‌ی :func:`!ctypes.SetPointerType` از پ msgid ":mod:`http.server`:" msgstr ":mod:`http.server`:" -msgid "The obsolete and rarely used :class:`~http.server.CGIHTTPRequestHandler` has been deprecated since Python 3.13. No direct replacement exists. *Anything* is better than CGI to interface a web server with a request handler." -msgstr "کلاس منسوخ و به‌ندرت استفاده‌شده :class:`~http.server.CGIHTTPRequestHandler` از پایتون 3.13 از رده خارج شده است. هیچ جایگزین مستقیمی وجود ندارد. برای برقراری رابط بین وب‌سرور و هندلر درخواست، *هر چیزی* بهتر از CGI است." +msgid "The obsolete and rarely used :class:`!CGIHTTPRequestHandler` has been deprecated since Python 3.13. No direct replacement exists. *Anything* is better than CGI to interface a web server with a request handler." +msgstr "کلاس منسوخ‌شده و به‌ندرت استفاده‌شده‌ی :class:`!CGIHTTPRequestHandler` از پایتون ۳.۱۳ منسوخ شده است. هیچ جایگزین مستقیمی وجود ندارد. *هر چیزی* برای برقراری رابط بین یک سرور وب و یک هندلر درخواست، بهتر از CGI است." msgid "The :option:`!--cgi` flag to the :program:`python -m http.server` command-line interface has been deprecated since Python 3.13." msgstr "پرچم :option:`!--cgi` در رابط خط فرمان :program:`python -m http.server` از پایتون 3.13 منسوخ شده است." @@ -57,14 +58,14 @@ msgstr "متد ``load_module()``: به‌جای آن از ``exec_module()`` اس msgid ":mod:`pathlib`:" msgstr ":mod:`pathlib`:" -msgid ":meth:`.PurePath.is_reserved` has been deprecated since Python 3.13. Use :func:`os.path.isreserved` to detect reserved paths on Windows." -msgstr ":meth:`.PurePath.is_reserved` از پایتون 3.13 منسوخ شده است. برای تشخیص مسیرهای رزرو‌شده در ویندوز از :func:`os.path.isreserved` استفاده کنید." +msgid ":meth:`!.PurePath.is_reserved` has been deprecated since Python 3.13. Use :func:`os.path.isreserved` to detect reserved paths on Windows." +msgstr "متد :meth:`!.PurePath.is_reserved` از پایتون ۳.۱۳ منسوخ شده است. برای شناسایی مسیرهای رزرو شده در ویندوز، از :func:`os.path.isreserved` استفاده کنید." msgid ":mod:`platform`:" msgstr ":mod:`platform`:" -msgid ":func:`~platform.java_ver` has been deprecated since Python 3.13. This function is only useful for Jython support, has a confusing API, and is largely untested." -msgstr ":func:`~platform.java_ver` از پایتون 3.13 منسوخ شده است. این تابع تنها برای پشتیبانی از Jython مفید است، API گیج‌کننده‌ای دارد و عمدتاً آزمون‌نشده است." +msgid ":func:`!platform.java_ver` has been deprecated since Python 3.13. This function is only useful for Jython support, has a confusing API, and is largely untested." +msgstr "تابع :func:`!platform.java_ver` از پایتون ۳.۱۳ منسوخ شده است. این تابع فقط برای پشتیبانی از Jython مفید است، دارای یک API گیج‌کننده است و تا حد زیادی تست نشده است." msgid ":mod:`sysconfig`:" msgstr ":mod:`sysconfig`:" @@ -81,8 +82,8 @@ msgstr ":func:`~threading.RLock` در پایتون 3.15 هیچ آرگومانی msgid ":mod:`types`:" msgstr ":mod:`types`:" -msgid ":class:`types.CodeType`: Accessing :attr:`~codeobject.co_lnotab` was deprecated in :pep:`626` since 3.10 and was planned to be removed in 3.12, but it only got a proper :exc:`DeprecationWarning` in 3.12. May be removed in 3.15. (Contributed by Nikita Sobolev in :gh:`101866`.)" -msgstr ":class:`types.CodeType`: دسترسی به :attr:`~codeobject.co_lnotab` در :pep:`626` از نسخه 3.10 منسوخ شد و قرار بود در 3.12 حذف شود، اما تنها در 3.12 یک :exc:`DeprecationWarning` مناسب دریافت کرد. ممکن است در 3.15 حذف شود. (مشارکت‌شده توسط Nikita Sobolev در :gh:`101866`.)" +msgid ":class:`types.CodeType`: Accessing :attr:`!codeobject.co_lnotab` was deprecated in :pep:`626` since 3.10 and was planned to be removed in 3.12, but it only got a proper :exc:`DeprecationWarning` in 3.12. May be removed in 3.15. (Contributed by Nikita Sobolev in :gh:`101866`.)" +msgstr ":class:`types.CodeType`: دسترسی به :attr:`!codeobject.co_lnotab` در :pep:`626` از نسخه‌ی ۳.۱۰ منسوخ شد و برنامه‌ریزی شده بود که در ۳.۱۲ حذف شود، اما تنها در نسخه‌ی ۳.۱۲ یک :exc:`DeprecationWarning` مناسب دریافت کرد. ممکن است در نسخه‌ی ۳.۱۵ حذف شود. (تهیه‌شده توسط Nikita Sobolev در :gh:`101866`.)" msgid ":mod:`typing`:" msgstr ":mod:`typing`:" @@ -93,17 +94,20 @@ msgstr "سینتکس مستندنشده‌ی آرگومان کلیدواژه‌ msgid "When using the functional syntax of :class:`~typing.TypedDict`\\s, failing to pass a value to the *fields* parameter (``TD = TypedDict(\"TD\")``) or passing ``None`` (``TD = TypedDict(\"TD\", None)``) has been deprecated since Python 3.13. Use ``class TD(TypedDict): pass`` or ``TD = TypedDict(\"TD\", {})`` to create a TypedDict with zero field." msgstr "هنگام استفاده از سینتکس تابعی :class:`~typing.TypedDict`\\s، عدم گذر دادن مقدار به پارامتر *fields* (``TD = TypedDict(\"TD\")``) یا گذر دادن ``None`` (``TD = TypedDict(\"TD\", None)``) از پایتون 3.13 منسوخ شده است. برای ایجاد یک TypedDict بدون هیچ فیلدی، از ``class TD(TypedDict): pass`` یا ``TD = TypedDict(\"TD\", {})`` استفاده کنید." -msgid "The :deco:`typing.no_type_check_decorator` decorator function has been deprecated since Python 3.13. After eight years in the :mod:`typing` module, it has yet to be supported by any major type checker." -msgstr "تابع دکوراتور :deco:`typing.no_type_check_decorator` از پایتون 3.13 منسوخ شده است. پس از هشت سال حضور در ماژول :mod:`typing`، هنوز توسط هیچ بررسی‌گر نوع بزرگی پشتیبانی نشده است." +msgid "The :deco:`!typing.no_type_check_decorator` decorator function has been deprecated since Python 3.13. After eight years in the :mod:`typing` module, it has yet to be supported by any major type checker." +msgstr "تابع دکوراتور :deco:`!typing.no_type_check_decorator` از نسخه‌ی ۳.۱۳ پایتون منسوخ شده است. این دکوراتور پس از هشت سال حضور در ماژول :mod:`typing`، هنوز توسط هیچ‌کدام از بررسی‌کننده‌های نوع بزرگ پشتیبانی نشده است." + +msgid ":mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse` modules." +msgstr "ماژول‌های :mod:`!sre_compile`، :mod:`!sre_constants` و :mod:`!sre_parse`." msgid ":mod:`wave`:" msgstr ":mod:`wave`:" -msgid "The :meth:`~wave.Wave_read.getmark`, :meth:`!setmark`, and :meth:`~wave.Wave_read.getmarkers` methods of the :class:`~wave.Wave_read` and :class:`~wave.Wave_write` classes have been deprecated since Python 3.13." -msgstr "متد‌های :meth:`~wave.Wave_read.getmark`، :meth:`!setmark` و :meth:`~wave.Wave_read.getmarkers` در کلاس‌های :class:`~wave.Wave_read` و :class:`~wave.Wave_write` از پایتون 3.13 منسوخ شده‌اند." +msgid "The ``getmark()``, ``setmark()`` and ``getmarkers()`` methods of the :class:`~wave.Wave_read` and :class:`~wave.Wave_write` classes have been deprecated since Python 3.13." +msgstr "متدهای ``getmark()``، ``setmark()`` و ``getmarkers()`` از کلاس‌های :class:`~wave.Wave_read` و :class:`~wave.Wave_write` از نسخه‌ی ۳.۱۳ پایتون منسوخ شده‌اند." msgid ":mod:`zipimport`:" msgstr ":mod:`zipimport`:" -msgid ":meth:`~zipimport.zipimporter.load_module` has been deprecated since Python 3.10. Use :meth:`~zipimport.zipimporter.exec_module` instead. (Contributed by Jiahao Li in :gh:`125746`.)" -msgstr ":meth:`~zipimport.zipimporter.load_module` از پایتون 3.10 منسوخ شده است. به جای آن از :meth:`~zipimport.zipimporter.exec_module` استفاده کنید. (مشارکت‌شده توسط Jiahao Li در :gh:`125746`.)" +msgid ":meth:`!zipimport.zipimporter.load_module` has been deprecated since Python 3.10. Use :meth:`~zipimport.zipimporter.exec_module` instead. (:gh:`125746`.)" +msgstr "متد :meth:`!zipimport.zipimporter.load_module` از نسخه‌ی ۳.۱۰ پایتون منسوخ شده است. به‌جای آن از :meth:`~zipimport.zipimporter.exec_module` استفاده کنید. (:gh:`125746`.)" diff --git a/deprecations/pending-removal-in-3.17.po b/deprecations/pending-removal-in-3.17.po index 0df9924b..b5b0d9a5 100644 --- a/deprecations/pending-removal-in-3.17.po +++ b/deprecations/pending-removal-in-3.17.po @@ -5,12 +5,13 @@ # # Translators: # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-07-25 12:59+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: none\n" @@ -22,6 +23,12 @@ msgstr "" msgid "Pending removal in Python 3.17" msgstr "در انتظار حذف در پایتون 3.17" +msgid ":mod:`datetime`:" +msgstr ":mod:`datetime`:" + +msgid ":meth:`~datetime.datetime.strptime` calls using a format string containing ``%e`` (day of month) without a year. This has been deprecated since Python 3.15. (Contributed by Stan Ulbrych in :gh:`70647`.)" +msgstr "فراخوانی‌های :meth:`~datetime.datetime.strptime` که از یک رشته‌ی قالب‌بندی حاوی ``%e`` (روز ماه) بدون سال استفاده می‌کنند. این ویژگی از نسخه‌ی ۳.۱۵ پایتون منسوخ شده است. (مشارکت‌شده توسط Stan Ulbrych در :gh:`70647`.)" + msgid ":mod:`collections.abc`:" msgstr ":mod:`collections.abc`:" @@ -37,6 +44,24 @@ msgstr ":class:`!ByteString` در اصل قرار بود کلاسی انتزاع msgid "See :pep:`PEP 688 <688#current-options>` for more details. (Contributed by Shantanu Jain in :gh:`91896`.)" msgstr "برای جزئیات بیشتر به :pep:`PEP 688 <688#current-options>` مراجعه کنید. (مشارکت‌شده توسط شانتانو جین در :gh:`91896`.)" +msgid ":mod:`encodings`:" +msgstr ":mod:`encodings`:" + +msgid "Passing non-ascii *encoding* names to :func:`encodings.normalize_encoding` is deprecated and scheduled for removal in Python 3.17. (Contributed by Stan Ulbrych in :gh:`136702`.)" +msgstr "ارسال نام‌های کدگذاری non-ascii به :func:`encodings.normalize_encoding` منسوخ شده است و طبق برنامه‌ریزی در نسخه‌ی ۳.۱۷ پایتون حذف خواهد شد. (مشارکت‌شده توسط Stan Ulbrych در :gh:`136702`.)" + +msgid ":mod:`profile`:" +msgstr ":mod:`profile`:" + +msgid "The :mod:`!profile` module is deprecated and will be removed in Python 3.17. Use :mod:`profiling.tracing` instead, which provides a compatible API. See :pep:`799` for details. (Contributed by Pablo Galindo and László Kiss Kollár in :gh:`138122`.)" +msgstr "ماژول :mod:`!profile` منسوخ شده است و در نسخه‌ی ۳.۱۷ پایتون حذف خواهد شد. به‌جای آن از :mod:`profiling.tracing` استفاده کنید که یک API سازگار فراهم می‌کند. برای جزئیات بیشتر :pep:`799` را ببینید. (مشارکت‌شده توسط Pablo Galindo و László Kiss Kollár در :gh:`138122`.)" + +msgid ":mod:`webbrowser`:" +msgstr ":mod:`webbrowser`:" + +msgid ":class:`!webbrowser.MacOSXOSAScript` is deprecated in favour of :class:`!webbrowser.MacOS`. (:gh:`137586`)" +msgstr "کلاس :class:`!webbrowser.MacOSXOSAScript` به نفع :class:`!webbrowser.MacOS` منسوخ شده است. (:gh:`137586`)" + msgid ":mod:`typing`:" msgstr ":mod:`typing`:" @@ -45,3 +70,9 @@ msgstr "پیش از پایتون 3.14، یونیون‌های سبک قدیمی msgid ":class:`typing.ByteString`, deprecated since Python 3.9, is scheduled for removal in Python 3.17." msgstr ":class:`typing.ByteString` که از پایتون 3.9 منسوخ شده است، برای حذف در پایتون 3.17 برنامه‌ریزی شده است." + +msgid ":mod:`tkinter`:" +msgstr ":mod:`tkinter`:" + +msgid "The :class:`!tkinter.Variable` methods :meth:`!trace_variable`, :meth:`!trace` (an alias of :meth:`!trace_variable`), :meth:`!trace_vdelete` and :meth:`!trace_vinfo`, deprecated since Python 3.14, are scheduled for removal in Python 3.17. Use :meth:`!trace_add`, :meth:`!trace_remove` and :meth:`!trace_info` instead. (Contributed by Serhiy Storchaka in :gh:`120220`.)" +msgstr "متدهای :class:`!tkinter.Variable` یعنی :meth:`!trace_variable`، :meth:`!trace` (که نام مستعاری برای :meth:`!trace_variable` است)، :meth:`!trace_vdelete` و :meth:`!trace_vinfo` که از نسخه‌ی ۳.۱۴ پایتون منسوخ شده‌اند، طبق برنامه‌ریزی در نسخه‌ی ۳.۱۷ پایتون حذف خواهند شد. به‌جای آن‌ها از :meth:`!trace_add`، :meth:`!trace_remove` و :meth:`!trace_info` استفاده کنید. (مشارکت‌شده توسط Serhiy Storchaka در :gh:`120220`.)" diff --git a/deprecations/pending-removal-in-3.18.po b/deprecations/pending-removal-in-3.18.po index 01bd16e3..067eaaa4 100644 --- a/deprecations/pending-removal-in-3.18.po +++ b/deprecations/pending-removal-in-3.18.po @@ -5,12 +5,13 @@ # # Translators: # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-07-25 12:59+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: none\n" @@ -22,8 +23,20 @@ msgstr "" msgid "Pending removal in Python 3.18" msgstr "در انتظار حذف در Python 3.18" +msgid "No longer accept a boolean value when a file descriptor is expected. (Contributed by Serhiy Storchaka in :gh:`82626`.)" +msgstr "دیگر مقدار بولی را هنگامی که یک توصیف‌گر پرونده مورد انتظار است، نمی‌پذیرد. (مشارکت‌شده توسط Serhiy Storchaka در :gh:`82626`.)" + msgid ":mod:`decimal`:" msgstr ":mod:`decimal`:" msgid "The non-standard and undocumented :class:`~decimal.Decimal` format specifier ``'N'``, which is only supported in the :mod:`!decimal` module's C implementation, has been deprecated since Python 3.13. (Contributed by Serhiy Storchaka in :gh:`89902`.)" msgstr "مشخص‌کننده قالب ``'N'`` در :class:`~decimal.Decimal`، که غیراستاندارد و مستندسازی‌نشده است و تنها در پیاده‌سازی C ماژول :mod:`!decimal` پشتیبانی می‌شود، از پایتون 3.13 منسوخ شده است. (مشارکت‌شده توسط Serhiy Storchaka در :gh:`89902`.)" + +msgid "Deprecations defined by :pep:`829`:" +msgstr "موارد منسوخ تعریف‌شده توسط :pep:`829`:" + +msgid "``import`` lines in :file:`{name}.pth` files are silently ignored." +msgstr "سطرهای ``import`` در پرونده‌های :file:`{name}.pth` به سکوت نادیده گرفته می‌شوند." + +msgid "(Contributed by Barry Warsaw in :gh:`148641`.)" +msgstr "(تهیه‌شده توسط Barry Warsaw در :gh:`148641`.)" diff --git a/deprecations/pending-removal-in-3.19.po b/deprecations/pending-removal-in-3.19.po index bdf23d40..f6d2aec4 100644 --- a/deprecations/pending-removal-in-3.19.po +++ b/deprecations/pending-removal-in-3.19.po @@ -5,12 +5,13 @@ # # Translators: # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-07-25 12:59+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: none\n" @@ -27,3 +28,33 @@ msgstr ":mod:`ctypes`:" msgid "Implicitly switching to the MSVC-compatible struct layout by setting :attr:`~ctypes.Structure._pack_` but not :attr:`~ctypes.Structure._layout_` on non-Windows platforms." msgstr "تغییر ضمنی به چیدمان ساختار سازگار با MSVC از طریق تنظیم :attr:`~ctypes.Structure._pack_` اما بدون تنظیم :attr:`~ctypes.Structure._layout_` در پلتفرم‌های غیر ویندوزی." + +msgid ":mod:`hashlib`:" +msgstr ":mod:`hashlib`:" + +msgid "In hash function constructors such as :func:`~hashlib.new` or the direct hash-named constructors such as :func:`~hashlib.md5` and :func:`~hashlib.sha256`, their optional initial data parameter could also be passed a keyword argument named ``data=`` or ``string=`` in various :mod:`!hashlib` implementations." +msgstr "در سازنده‌های توابع هش (hash function constructors) مانند :func:`~hashlib.new` یا سازنده‌های مستقیم با نام هش مانند :func:`~hashlib.md5` و :func:`~hashlib.sha256`، همچنین می‌توانید در پیاده‌سازی‌های مختلف :mod:`!hashlib` یک آرگومان کلیدواژه‌ای با نام ``data=`` یا ``string=`` را به پارامتر داده‌ی اولیه اختیاری آن‌ها ارسال کنید." + +msgid "Support for the ``string`` keyword argument name is now deprecated and slated for removal in Python 3.19." +msgstr "پشتیبانی از نام آرگومان کلیدواژه‌ای ``string`` اکنون منسوخ شده است و در پایتون ۳.۱۹ حذف خواهد شد." + +msgid "Before Python 3.13, the ``string`` keyword parameter was not correctly supported depending on the backend implementation of hash functions. Prefer passing the initial data as a positional argument for maximum backwards compatibility." +msgstr "پیش از پایتون ۳.۱۳، پارامتر کلیدواژه‌ای ``string`` بسته به پیاده‌سازی بک‌اند توابع هش به درستی پشتیبانی نمی‌شد. برای حداکثر سازگاری با نسخه‌های قبلی، ترجیح دهید داده‌ی اولیه را به عنوان یک آرگومان جایگاهی ارسال کنید." + +msgid ":mod:`http.cookies`:" +msgstr ":mod:`http.cookies`:" + +msgid ":meth:`http.cookies.Morsel.js_output` is deprecated and will be removed in Python 3.19." +msgstr ":meth:`http.cookies.Morsel.js_output` منسوخ شده است و در پایتون ۳.۱۹ حذف خواهد شد." + +msgid ":meth:`http.cookies.BaseCookie.js_output` is deprecated and will be removed in Python 3.19." +msgstr ":meth:`http.cookies.BaseCookie.js_output` منسوخ شده است و در پایتون ۳.۱۹ حذف خواهد شد." + +msgid ":mod:`imaplib`:" +msgstr ":mod:`imaplib`:" + +msgid "Altering :attr:`IMAP4.file ` is now deprecated and slated for removal in Python 3.19. This property is now unused and changing its value does not automatically close the current file." +msgstr "تغییر دادن :attr:`IMAP4.file ` اکنون منسوخ شده است و در پایتون ۳.۱۹ حذف خواهد شد. این ویژگی اکنون استفاده نمی‌شود و تغییر مقدار آن به طور خودکار پرونده‌ی فعلی را نمی‌بندد." + +msgid "Before Python 3.14, this property was used to implement the corresponding ``read()`` and ``readline()`` methods for :class:`~imaplib.IMAP4` but this is no longer the case since then." +msgstr "پیش از پایتون ۳.۱۴، این ویژگی برای پیاده‌سازی متدهای متناظر ``read()`` و ``readline()`` برای :class:`~imaplib.IMAP4` استفاده می‌شد، اما از آن زمان به بعد دیگر این‌گونه نیست." diff --git a/deprecations/pending-removal-in-3.20.po b/deprecations/pending-removal-in-3.20.po new file mode 100644 index 00000000..97f75fbb --- /dev/null +++ b/deprecations/pending-removal-in-3.20.po @@ -0,0 +1,135 @@ +# Persian translations for Python package. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# Automatically generated, 2026. +# +# Translators: +# Sepehr Rasouli , 2026 +# arman mohebali , 2026 +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-01 14:41+0330\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: fa\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "Pending removal in Python 3.20" +msgstr "در نوبت حذف در پایتون ۳.۲۰" + +msgid "Calling the ``__new__()`` method of :class:`struct.Struct` without the *format* argument is deprecated and will be removed in Python 3.20. Calling :meth:`~object.__init__` method on initialized :class:`~struct.Struct` objects is deprecated and will be removed in Python 3.20." +msgstr "فراخوانی متد ``__new__()`` از :class:`struct.Struct` بدون آرگومان *format* منسوخ شده است و در پایتون ۳.۲۰ حذف خواهد شد. فراخوانی متد :meth:`~object.__init__` روی شیءهای مقداردهی اولیه‌شده‌ی :class:`~struct.Struct` منسوخ شده است و در پایتون ۳.۲۰ حذف خواهد شد." + +msgid "(Contributed by Sergey B Kirpichev and Serhiy Storchaka in :gh:`143715`.)" +msgstr "(تهیه‌شده توسط Sergey B Kirpichev و Serhiy Storchaka در :gh:`143715`.)" + +msgid "The ``__version__``, ``version`` and ``VERSION`` attributes have been deprecated in these standard library modules and will be removed in Python 3.20. Use :py:data:`sys.version_info` instead." +msgstr "ویژگی‌های ``__version__``، ``version`` و ``VERSION`` در این ماژول‌های کتابخانه‌ی استاندارد منسوخ شده‌اند و در پایتون ۳.۲۰ حذف خواهند شد. به جای آن‌ها از :py:data:`sys.version_info` استفاده کنید." + +msgid ":mod:`argparse`" +msgstr ":mod:`argparse`" + +msgid ":mod:`csv`" +msgstr ":mod:`csv`" + +msgid ":mod:`ctypes`" +msgstr ":mod:`ctypes`" + +msgid ":mod:`!ctypes.macholib`" +msgstr ":mod:`!ctypes.macholib`" + +msgid ":mod:`decimal` (use :data:`decimal.SPEC_VERSION` instead)" +msgstr ":mod:`decimal` (به جای آن از :data:`decimal.SPEC_VERSION` استفاده کنید)" + +msgid ":mod:`http.server`" +msgstr ":mod:`http.server`" + +msgid ":mod:`imaplib`" +msgstr ":mod:`imaplib`" + +msgid ":mod:`ipaddress`" +msgstr ":mod:`ipaddress`" + +msgid ":mod:`json`" +msgstr ":mod:`json`" + +msgid ":mod:`logging` (``__date__`` also deprecated)" +msgstr ":mod:`logging` (همچنین ``__date__`` منسوخ شده است)" + +msgid ":mod:`optparse`" +msgstr ":mod:`optparse`" + +msgid ":mod:`pickle`" +msgstr ":mod:`pickle`" + +msgid ":mod:`platform`" +msgstr ":mod:`platform`" + +msgid ":mod:`re`" +msgstr ":mod:`re`" + +msgid ":mod:`socketserver`" +msgstr ":mod:`socketserver`" + +msgid ":mod:`tabnanny`" +msgstr ":mod:`tabnanny`" + +msgid ":mod:`tarfile`" +msgstr ":mod:`tarfile`" + +msgid ":mod:`tkinter.font`" +msgstr ":mod:`tkinter.font`" + +msgid ":mod:`tkinter.ttk`" +msgstr ":mod:`tkinter.ttk`" + +msgid ":mod:`wsgiref.simple_server`" +msgstr ":mod:`wsgiref.simple_server`" + +msgid ":mod:`xml.etree.ElementTree`" +msgstr ":mod:`xml.etree.ElementTree`" + +msgid ":mod:`!xml.sax.expatreader`" +msgstr ":mod:`!xml.sax.expatreader`" + +msgid ":mod:`xml.sax.handler`" +msgstr ":mod:`xml.sax.handler`" + +msgid ":mod:`zlib`" +msgstr ":mod:`zlib`" + +msgid "(Contributed by Hugo van Kemenade and Stan Ulbrych in :gh:`76007`.)" +msgstr "(مشارکت‌شده توسط Hugo van Kemenade و Stan Ulbrych در :gh:`76007`.)" + +msgid "Deprecations defined by :pep:`829`:" +msgstr "موارد منسوخ تعریف‌شده توسط :pep:`829`:" + +msgid "Warnings are produced for ``import`` lines found in :file:`{name}.pth` files." +msgstr "برای سطرهای ``import`` یافت‌شده در پرونده‌های :file:`{name}.pth` اخطارهایی تولید می‌شود." + +msgid ":file:`{name}.pth` files are no longer decoded in the locale encoding by default. They **MUST** be encoded in ``utf-8-sig``." +msgstr "پرونده‌های :file:`{name}.pth` دیگر به‌طور پیش‌فرض با کدگذاری locale رمزگشایی نمی‌شوند. آن‌ها **باید** با ``utf-8-sig`` کدگذاری شوند." + +msgid "(Contributed by Barry Warsaw in :gh:`148641`.)" +msgstr "(تهیه‌شده توسط Barry Warsaw در :gh:`148641`.)" + +msgid ":mod:`ast`:" +msgstr ":mod:`ast`:" + +msgid "Creating instances of abstract AST nodes (such as :class:`ast.AST` or :class:`!ast.expr`) is deprecated and will raise an error in Python 3.20." +msgstr "ایجاد نمونه‌هایی از گره‌های درخت نحوی انتزاعی (AST) (مانند :class:`ast.AST` یا :class:`!ast.expr`) منسوخ شده است و در پایتون ۳.۲۰ خطایی ایجاد خواهد کرد." + +msgid ":mod:`typing`:" +msgstr ":mod:`typing`:" + +msgid "It is deprecated to call :func:`isinstance` and :func:`issubclass` checks on protocol classes that were not explicitly decorated with :func:`!runtime_checkable` but that inherit from a runtime-checkable protocol class. This will raise a :exc:`TypeError` in Python 3.20." +msgstr "فراخوانی بررسی‌های :func:`isinstance` و :func:`issubclass` روی کلاس‌های پروتکل که صراحتاً با :func:`!runtime_checkable` دکورور نشده‌اند، اما از یک کلاس پروتکلِ قابل‌بررسی در ران‌تایم ارث‌بری می‌کنند، منسوخ شده است. این کار در پایتون ۳.۲۰ یک :exc:`TypeError` ایجاد خواهد کرد." + +msgid "(Contributed by Bartosz Sławecki in :gh:`132604`.)" +msgstr "(تهیه‌شده توسط Bartosz Sławecki در :gh:`132604`.)" diff --git a/deprecations/pending-removal-in-future.po b/deprecations/pending-removal-in-future.po index a572c425..24a38b48 100644 --- a/deprecations/pending-removal-in-future.po +++ b/deprecations/pending-removal-in-future.po @@ -6,12 +6,13 @@ # Translators: # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 10:11+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -67,8 +68,8 @@ msgstr ":mod:`calendar`: ثابت‌های ``calendar.January`` و ``calendar.Fe msgid ":mod:`codecs`: use :func:`open` instead of :func:`codecs.open`. (:gh:`133038`)" msgstr ":mod:`codecs`: به جای :func:`codecs.open` از :func:`open` استفاده کنید. (:gh:`133038`)" -msgid ":attr:`codeobject.co_lnotab`: use the :meth:`codeobject.co_lines` method instead." -msgstr ":attr:`codeobject.co_lnotab`: به‌جای آن از متد :meth:`codeobject.co_lines` استفاده کنید." +msgid ":attr:`!codeobject.co_lnotab`: use the :meth:`codeobject.co_lines` method instead." +msgstr "صفت :attr:`!codeobject.co_lnotab`: به‌جای آن از متد :meth:`codeobject.co_lines` استفاده کنید." msgid ":mod:`datetime`:" msgstr ":mod:`datetime`:" @@ -103,8 +104,11 @@ msgstr ":mod:`logging`: متد ``warn()`` از پایتون 3.3 منسوخ شد msgid ":mod:`mailbox`: Use of StringIO input and text mode is deprecated, use BytesIO and binary mode instead." msgstr ":mod:`mailbox`: استفاده از ورودی StringIO و حالت متنی منسوخ شده است؛ به‌جای آن از BytesIO و حالت دودویی استفاده کنید." -msgid ":mod:`os`: Calling :func:`os.register_at_fork` in multi-threaded process." -msgstr ":mod:`os`: فراخوانی :func:`os.register_at_fork` در فرایند چندنخی." +msgid ":mod:`os`: Calling :func:`os.register_at_fork` in a multi-threaded process." +msgstr "ماژول :mod:`os`: فراخوانی :func:`os.register_at_fork` در یک فرایند چندنخی." + +msgid ":mod:`os.path`: :func:`os.path.commonprefix` is deprecated, use :func:`os.path.commonpath` for path prefixes. The :func:`os.path.commonprefix` function is being deprecated due to having a misleading name and module. The function is not safe to use for path prefixes despite being included in a module about path manipulation, meaning it is easy to accidentally introduce path traversal vulnerabilities into Python programs by using this function." +msgstr ":mod:`os.path`: تابع :func:`os.path.commonprefix` منسوخ شده است، برای پیشوندهای مسیر از :func:`os.path.commonpath` استفاده کنید. تابع :func:`os.path.commonprefix` به دلیل داشتن نام و ماژول گمراه‌کننده در حال منسوخ شدن است. استفاده از این تابع برای پیشوندهای مسیر ایمن نیست، با وجود اینکه در ماژولی مربوط به دستکاری مسیر قرار دارد، به این معنی که استفاده از آن می‌تواند به طور تصادفی آسیب‌پذیری‌های پیمایش مسیر را وارد برنامه‌های پایتون کند." msgid ":class:`!pydoc.ErrorDuringImport`: A tuple value for *exc_info* parameter is deprecated, use an exception instance." msgstr ":class:`!pydoc.ErrorDuringImport`: مقدار تاپل برای پارامتر *exc_info* منسوخ شده است؛ از یک نمونه‌ی استثنا استفاده کنید." @@ -112,9 +116,6 @@ msgstr ":class:`!pydoc.ErrorDuringImport`: مقدار تاپل برای پارا msgid ":mod:`re`: More strict rules are now applied for numerical group references and group names in regular expressions. Only sequence of ASCII digits is now accepted as a numerical reference. The group name in bytes patterns and replacement strings can now only contain ASCII letters and digits and underscore. (Contributed by Serhiy Storchaka in :gh:`91760`.)" msgstr ":mod:`re`: اکنون قواعد سخت‌گیرانه‌تری برای ارجاع‌های عددی به گروه‌ها و نام گروه‌ها در عبارت‌های باقاعده اعمال می‌شود. اکنون فقط دنباله‌ای از ارقام اسکی به‌عنوان ارجاع عددی پذیرفته می‌شود. نام گروه در الگوهای بایتی و رشته‌های جایگزین اکنون فقط می‌تواند شامل حروف و ارقام اسکی و زیرخط باشد. (مشارکت‌شده توسط Serhiy Storchaka در :gh:`91760`.)" -msgid ":mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse` modules." -msgstr "ماژول‌های :mod:`!sre_compile`، :mod:`!sre_constants` و :mod:`!sre_parse`." - msgid ":mod:`shutil`: :func:`~shutil.rmtree`'s *onerror* parameter is deprecated in Python 3.12; use the *onexc* parameter instead." msgstr ":mod:`shutil`: پارامتر *onerror* تابع :func:`~shutil.rmtree` در پایتون 3.12 منسوخ شده است؛ به جای آن از پارامتر *onexc* استفاده کنید." @@ -231,3 +232,6 @@ msgstr ":mod:`xml.etree.ElementTree`: آزمودن ارزش درستی یک :cla msgid ":func:`sys._clear_type_cache` is deprecated: use :func:`sys._clear_internal_caches` instead." msgstr ":func:`sys._clear_type_cache` منسوخ شده است: به جای آن از :func:`sys._clear_internal_caches` استفاده کنید." + +#~ msgid ":mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse` modules." +#~ msgstr "ماژول‌های :mod:`!sre_compile`، :mod:`!sre_constants` و :mod:`!sre_parse`." diff --git a/deprecations/soft-deprecations.po b/deprecations/soft-deprecations.po new file mode 100644 index 00000000..5fd9b1b0 --- /dev/null +++ b/deprecations/soft-deprecations.po @@ -0,0 +1,39 @@ +# Persian translations for Python package. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# Automatically generated, 2026. +# +# Translators: +# Sepehr Rasouli , 2026 +# arman mohebali , 2026 +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-01 14:41+0330\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: fa\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "Soft deprecations" +msgstr "منسوخ‌سازی‌های نرم" + +msgid "There are no plans to remove :term:`soft deprecated` APIs." +msgstr "هیچ برنامه‌ای برای حذف :term:`منسوخ‌شده‌ی نرم ` APIها وجود ندارد." + +msgid ":func:`re.match` and :meth:`re.Pattern.match` are now :term:`soft deprecated` in favor of the new :func:`re.prefixmatch` and :meth:`re.Pattern.prefixmatch` APIs, which have been added as alternate, more explicit names. These are intended to be used to alleviate confusion around what *match* means by following the Zen of Python's *\"Explicit is better than implicit\"* mantra. Most other language regular expression libraries use an API named *match* to mean what Python has always called *search*." +msgstr "توابع :func:`re.match` و :meth:`re.Pattern.match` اکنون به نفع APIهای جدید :func:`re.prefixmatch` و :meth:`re.Pattern.prefixmatch` که به عنوان نام‌های جایگزین و صریح‌تر اضافه شده‌اند، :term:`منسوخ‌شده‌ی نرم ` شده‌اند. این موارد به این منظور در نظر گرفته شده‌اند تا با پیروی از شعار ذهنیت پایتون یعنی *«صریح بودن بهتر از ضمنی بودن است»*، سردرگمی پیرامون معنای *match* را کاهش دهند. بیشتر کتابخانه‌های عبارت باقاعده در زبان‌های دیگر از یک API به نام *match* استفاده می‌کنند تا مفهومی را برسانند که پایتون همیشه آن را *search* نامیده است." + +msgid "We **do not** plan to remove the older :func:`!match` name, as it has been used in code for over 30 years. Code supporting older versions of Python should continue to use :func:`!match`, while new code should prefer :func:`!prefixmatch`. See :ref:`prefixmatch-vs-match`." +msgstr "ما برنامه‌ای **نداریم** که نام قدیمی‌تر :func:`!match` را حذف کنیم، زیرا بیش از ۳۰ سال است که در کدها استفاده می‌شود. کدهایی که از نسخه‌های قدیمی‌تر پایتون پشتیبانی می‌کنند باید به استفاده از :func:`!match` ادامه دهند، در حالی که کدهای جدید باید :func:`!prefixmatch` را ترجیح دهند. به :ref:`prefixmatch-vs-match` مراجعه کنید." + +msgid "(Contributed by Gregory P. Smith in :gh:`86519` and Hugo van Kemenade in :gh:`148100`.)" +msgstr "(تهیه‌شده توسط Gregory P. Smith در :gh:`86519` و Hugo van Kemenade در :gh:`148100`.)" + +msgid "Using ``'F'`` and ``'D'`` format type codes of the :mod:`struct` module now are :term:`soft deprecated` in favor of two-letter forms ``'Zf'`` and ``'Zd'``. (Contributed by Sergey B Kirpichev in :gh:`121249`.)" +msgstr "استفاده از کدهای نوع فرمت ``'F'`` و ``'D'`` از ماژول :mod:`struct` اکنون به نفع فرم‌های دوحرفی ``'Zf'`` و ``'Zd'`` :term:`منسوخ‌شده‌ی نرم ` شده‌اند. (تهیه‌شده توسط Sergey B Kirpichev در :gh:`121249`.)" diff --git a/extending/extending.po b/extending/extending.po index b46e476e..ac55fb0c 100644 --- a/extending/extending.po +++ b/extending/extending.po @@ -7,13 +7,14 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" -"PO-Revision-Date: 2021-06-28 00:51+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 19:58+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" @@ -21,153 +22,16 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 3.6\n" -msgid "Extending Python with C or C++" -msgstr "توسعه پایتون با C یا C++" +msgid "Using the C API: Assorted topics" +msgstr "استفاده از C API: موضوعات متفرقه" -msgid "It is quite easy to add new built-in modules to Python, if you know how to program in C. Such :dfn:`extension modules` can do two things that can't be done directly in Python: they can implement new built-in object types, and they can call C library functions and system calls." -msgstr "اگر بدانید چگونه به زبان C برنامه‌نویسی کنید، افزودن ماژول‌های توکار جدید به پایتون کاملاً آسان است. چنین :dfn:`ماژول‌های توسعه‌ای (extension modules)` می‌توانند دو کاری انجام دهند که مستقیماً در پایتون امکان‌پذیر نیست: می‌توانند نوع‌های شیء توکار جدید را پیاده‌سازی کنند و می‌توانند توابع کتابخانه C و فراخوان‌های سیستمی را فراخوانی کنند." +msgid "The :ref:`tutorial ` walked you through creating a C API extension module, but left many areas unexplained. This document looks at several concepts that you'll need to learn in order to write more complex extensions." +msgstr ":ref:`آموزش ` شما را در ایجاد یک ماژول توسعه‌ی C API راهنمایی کرد، اما بسیاری از قسمت‌ها را بدون توضیح گذاشت. این سند چندین مفهوم را بررسی می‌کند که برای نوشتن مشتقات پیچیده‌تر باید آن‌ها را یاد بگیرید." -msgid "To support extensions, the Python API (Application Programmers Interface) defines a set of functions, macros and variables that provide access to most aspects of the Python run-time system. The Python API is incorporated in a C source file by including the header ``\"Python.h\"``." -msgstr "برای پشتیبانی از توسعه‌ها، API پایتون (رابط برنامه‌نویسی کاربردی) مجموعه‌ای از توابع، ماکروها و متغیرها را تعریف می‌کند که دسترسی به بیشتر جنبه‌های سیستم زمان اجرای پایتون را فراهم می‌کنند. API پایتون با گنجاندن سرآیند ``\"Python.h\"`` در یک پرونده منبع C ادغام می‌شود." - -msgid "The compilation of an extension module depends on its intended use as well as on your system setup; details are given in later chapters." -msgstr "کامپایل یک ماژول توسعه‌ای به کاربرد موردنظر آن و همچنین به پیکربندی سیستم شما بستگی دارد؛ جزئیات در فصل‌های بعدی ارائه شده است." - -msgid "The C extension interface is specific to CPython, and extension modules do not work on other Python implementations. In many cases, it is possible to avoid writing C extensions and preserve portability to other implementations. For example, if your use case is calling C library functions or system calls, you should consider using the :mod:`ctypes` module or the `cffi `_ library rather than writing custom C code. These modules let you write Python code to interface with C code and are more portable between implementations of Python than writing and compiling a C extension module." -msgstr "رابط توسعه C مختص سی‌پایتون است و ماژول‌های توسعه‌ای روی پیاده‌سازی‌های دیگر پایتون کار نمی‌کنند. در بسیاری از موارد می‌توان از نوشتن توسعه‌های C پرهیز کرد و قابلیت حمل به پیاده‌سازی‌های دیگر را حفظ نمود. برای مثال، اگر مورد استفاده‌ی شما فراخوانی توابع کتابخانه C یا فراخوانی‌های سیستمی است، باید به جای نوشتن کد C سفارشی، استفاده از ماژول :mod:`ctypes` یا کتابخانه‌ی `cffi `_ را در نظر بگیرید. این ماژول‌ها به شما اجازه می‌دهند برای برقراری رابط با کد C، کد پایتون بنویسید و نسبت به نوشتن و کامپایل کردن یک ماژول توسعه‌ای C، بین پیاده‌سازی‌های پایتون قابلیت حمل بیشتری دارند." - -msgid "A Simple Example" -msgstr "یک مثال ساده" - -msgid "Let's create an extension module called ``spam`` (the favorite food of Monty Python fans...) and let's say we want to create a Python interface to the C library function :c:func:`system` [#]_. This function takes a null-terminated character string as argument and returns an integer. We want this function to be callable from Python as follows:" -msgstr "بیایید یک ماژول توسعه‌ای به نام ``spam`` بسازیم (غذای مورد علاقه‌ی طرفداران مونتی پایتون...) و فرض کنیم می‌خواهیم یک رابط پایتونی برای تابع کتابخانه‌ی C یعنی :c:func:`system` [#]_ بسازیم. این تابع یک رشته‌ی نویسه‌ای پایان‌یافته با نویسه‌ی تهی را به‌عنوان آرگومان می‌گیرد و یک عدد صحیح برمی‌گرداند. می‌خواهیم این تابع از پایتون به صورت زیر فراخوانی‌پذیر باشد:" - -msgid "" -">>> import spam\n" -">>> status = spam.system(\"ls -l\")" -msgstr "" -">>> import spam\n" -">>> status = spam.system(\"ls -l\")" - -msgid "Begin by creating a file :file:`spammodule.c`. (Historically, if a module is called ``spam``, the C file containing its implementation is called :file:`spammodule.c`; if the module name is very long, like ``spammify``, the module name can be just :file:`spammify.c`.)" -msgstr "کار را با ایجاد یک پرونده‌ی :file:`spammodule.c` آغاز کنید. (از نظر تاریخی، اگر ماژولی ``spam`` نام داشته باشد، پرونده‌ی C حاوی پیاده‌سازی آن :file:`spammodule.c` نامیده می‌شود؛ اگر نام ماژول بسیار طولانی باشد، مانند ``spammify``، نام ماژول می‌تواند تنها :file:`spammify.c` باشد.)" - -msgid "The first two lines of our file can be::" -msgstr "دو سطر نخست پرونده‌ی ما می‌تواند باشد::" - -msgid "" -"#define PY_SSIZE_T_CLEAN\n" -"#include " -msgstr "" -"#define PY_SSIZE_T_CLEAN\n" -"#include " - -msgid "which pulls in the Python API (you can add a comment describing the purpose of the module and a copyright notice if you like)." -msgstr "که API پایتون را وارد می‌کند (در صورت تمایل می‌توانید کامنتی که هدف ماژول را شرح می‌دهد و یک اعلان حق نشر اضافه کنید)." - -msgid "Since Python may define some pre-processor definitions which affect the standard headers on some systems, you *must* include :file:`Python.h` before any standard headers are included." -msgstr "از آنجا که پایتون ممکن است برخی تعریف‌های پیش‌پردازنده را تعریف کند که در برخی سیستم‌ها بر سرآیندهای استاندارد تأثیر می‌گذارند، شما *باید* :file:`Python.h` را پیش از گنجاندن هر سرآیند استانداردی بگنجانید." - -msgid "``#define PY_SSIZE_T_CLEAN`` was used to indicate that ``Py_ssize_t`` should be used in some APIs instead of ``int``. It is not necessary since Python 3.13, but we keep it here for backward compatibility. See :ref:`arg-parsing-string-and-buffers` for a description of this macro." -msgstr "``#define PY_SSIZE_T_CLEAN`` برای نشان دادن اینکه ``Py_ssize_t`` باید در برخی API‌ها به‌جای ``int`` استفاده شود، به کار می‌رفت. از پایتون 3.13 به بعد دیگر ضروری نیست، اما ما آن را برای سازگاری با گذشته در اینجا نگه می‌داریم. برای توضیح این ماکرو به :ref:`arg-parsing-string-and-buffers` مراجعه کنید." - -msgid "All user-visible symbols defined by :file:`Python.h` have a prefix of ``Py`` or ``PY``, except those defined in standard header files." -msgstr "تمام نمادهای قابل مشاهده توسط کاربر که توسط :file:`Python.h` تعریف شده‌اند، پیشوند ``Py`` یا ``PY`` دارند؛ به‌جز نمادهایی که در پرونده‌های سرآیند استاندارد تعریف شده‌اند." - -msgid "For backward compatibility, :file:`Python.h` includes several standard header files. C extensions should include the standard headers that they use, and should not rely on these implicit includes. If using the limited C API version 3.13 or newer, the implicit includes are:" -msgstr "برای سازگاری با نسخه‌های پیشین، :file:`Python.h` چندین پرونده‌ی سرآیند استاندارد را include می‌کند. افزونه‌های C باید سرآیندهای استاندارد مورد استفاده‌ی خود را include کنند و نباید به این include‌های ضمنی تکیه کنند. اگر از C API محدود نسخه‌ی 3.13 یا جدیدتر استفاده می‌کنید، include‌های ضمنی عبارت‌اند از:" - -msgid "````" -msgstr "````" - -msgid "```` (on Windows)" -msgstr "```` (در ویندوز)" - -msgid "````" -msgstr "````" - -msgid "````" -msgstr "````" - -msgid "````" -msgstr "````" - -msgid "````" -msgstr "````" - -msgid "````" -msgstr "````" - -msgid "```` (if present)" -msgstr "```` (در صورت وجود)" - -msgid "If :c:macro:`Py_LIMITED_API` is not defined, or is set to version 3.12 or older, the headers below are also included:" -msgstr "اگر :c:macro:`Py_LIMITED_API` تعریف نشده باشد، یا روی نسخه 3.12 یا قدیمی‌تر تنظیم شده باشد، سرآیندهای زیر نیز گنجانده می‌شوند:" - -msgid "````" -msgstr "````" - -msgid "```` (on POSIX)" -msgstr "```` (در POSIX)" - -msgid "If :c:macro:`Py_LIMITED_API` is not defined, or is set to version 3.10 or older, the headers below are also included:" -msgstr "اگر :c:macro:`Py_LIMITED_API` تعریف نشده باشد، یا روی نسخه 3.10 یا قدیمی‌تر تنظیم شده باشد، سرآیندهای زیر نیز گنجانده می‌شوند:" - -msgid "````" -msgstr "````" - -msgid "````" -msgstr "````" - -msgid "````" -msgstr "````" - -msgid "````" -msgstr "````" - -msgid "The next thing we add to our module file is the C function that will be called when the Python expression ``spam.system(string)`` is evaluated (we'll see shortly how it ends up being called)::" -msgstr "مورد بعدی که به پرونده ماژول خود اضافه می‌کنیم، تابع C است که هنگام ارزیابی عبارت پایتون ``spam.system(string)`` فراخوانی خواهد شد (به‌زودی خواهیم دید که چگونه در نهایت فراخوانی می‌شود)::" - -msgid "" -"static PyObject *\n" -"spam_system(PyObject *self, PyObject *args)\n" -"{\n" -" const char *command;\n" -" int sts;\n" -"\n" -" if (!PyArg_ParseTuple(args, \"s\", &command))\n" -" return NULL;\n" -" sts = system(command);\n" -" return PyLong_FromLong(sts);\n" -"}" -msgstr "" -"static PyObject *\n" -"spam_system(PyObject *self, PyObject *args)\n" -"{\n" -" const char *command;\n" -" int sts;\n" -"\n" -" if (!PyArg_ParseTuple(args, \"s\", &command))\n" -" return NULL;\n" -" sts = system(command);\n" -" return PyLong_FromLong(sts);\n" -"}" - -msgid "There is a straightforward translation from the argument list in Python (for example, the single expression ``\"ls -l\"``) to the arguments passed to the C function. The C function always has two arguments, conventionally named *self* and *args*." -msgstr "ترجمه‌ای سرراست از فهرست آرگومان‌ها در پایتون (برای مثال، عبارت واحد ``\"ls -l\"``) به آرگومان‌های پاس‌داده‌شده به تابع C وجود دارد. تابع C همیشه دو آرگومان دارد که به‌طور قراردادی *self* و *args* نامیده می‌شوند." - -msgid "The *self* argument points to the module object for module-level functions; for a method it would point to the object instance." -msgstr "آرگومان *self* برای توابع در سطح ماژول به شیء ماژول اشاره می‌کند؛ برای یک متد، به نمونه‌ی شیء اشاره خواهد کرد." - -msgid "The *args* argument will be a pointer to a Python tuple object containing the arguments. Each item of the tuple corresponds to an argument in the call's argument list. The arguments are Python objects --- in order to do anything with them in our C function we have to convert them to C values. The function :c:func:`PyArg_ParseTuple` in the Python API checks the argument types and converts them to C values. It uses a template string to determine the required types of the arguments as well as the types of the C variables into which to store the converted values. More about this later." -msgstr "آرگومان *args* اشاره‌گری به یک شیء تاپل پایتون حاوی آرگومان‌ها خواهد بود. هر آیتم از تاپل با یک آرگومان در فهرست آرگومان‌های فراخوانی مطابقت دارد. آرگومان‌ها اشیاء پایتون هستند --- برای اینکه بتوانیم در تابع C خود کاری با آن‌ها انجام دهیم، باید آن‌ها را به مقادیر C تبدیل کنیم. تابع :c:func:`PyArg_ParseTuple` در API پایتون انواع آرگومان‌ها را بررسی می‌کند و آن‌ها را به مقادیر C تبدیل می‌کند. این تابع از یک رشته‌ی قالب برای تعیین انواع مورد نیاز آرگومان‌ها و همچنین انواع متغیرهای C که مقادیر تبدیل‌شده در آن‌ها ذخیره می‌شوند، استفاده می‌کند. در ادامه بیشتر درباره‌ی این موضوع توضیح داده خواهد شد." - -msgid ":c:func:`PyArg_ParseTuple` returns true (nonzero) if all arguments have the right type and its components have been stored in the variables whose addresses are passed. It returns false (zero) if an invalid argument list was passed. In the latter case it also raises an appropriate exception so the calling function can return ``NULL`` immediately (as we saw in the example)." -msgstr "تابع :c:func:`PyArg_ParseTuple` در صورتی مقدار درست (غیرصفر) را برمی‌گرداند که همه‌ی آرگومان‌ها نوع درست را داشته باشند و اجزای آن در متغیرهایی که آدرس‌هایشان پاس داده شده، ذخیره شده باشند. اگر فهرست آرگومان نامعتبری پاس داده شده باشد، مقدار نادرست (صفر) را برمی‌گرداند. در حالت دوم، همچنین یک استثنای مناسب ایجاد می‌کند تا تابع فراخواننده بتواند بلافاصله ``NULL`` را برگرداند (همان‌طور که در مثال دیدیم)." - -msgid "Intermezzo: Errors and Exceptions" -msgstr "میان‌پرده: خطاها و استثناها" +msgid "Errors and Exceptions" +msgstr "خطاها و استثناها" msgid "An important convention throughout the Python interpreter is the following: when a function fails, it should set an exception condition and return an error value (usually ``-1`` or a ``NULL`` pointer). Exception information is stored in three members of the interpreter's thread state. These are ``NULL`` if there is no exception. Otherwise they are the C equivalents of the members of the Python tuple returned by :meth:`sys.exc_info`. These are the exception type, exception instance, and a traceback object. It is important to know about them to understand how errors are passed around." msgstr "یک قرارداد مهم در سراسر مفسر پایتون به شرح زیر است: هنگامی که تابعی شکست می‌خورد، باید وضعیت استثنا را تنظیم کند و یک مقدار خطا (معمولاً ``-1`` یا یک اشاره‌گر ``NULL``) برگرداند. اطلاعات استثنا در سه عضو از وضعیت نخ مفسر ذخیره می‌شود. در صورت نبود استثنا، این‌ها ``NULL`` هستند. در غیر این صورت، آن‌ها معادل‌های C اعضای تاپل پایتونی‌ای هستند که توسط :meth:`sys.exc_info` برگردانده می‌شود. این‌ها عبارت‌اند از نوع استثنا، نمونه استثنا، و یک شیء ردگیری. دانستن این موارد برای درک چگونگی انتقال خطاها اهمیت دارد." @@ -344,234 +208,11 @@ msgstr "" " return PyLong_FromLong(sts);\n" "}" -msgid "Back to the Example" -msgstr "بازگشت به مثال" - -msgid "Going back to our example function, you should now be able to understand this statement::" -msgstr "با بازگشت به تابع مثال خودمان، اکنون باید بتوانید این دستور را درک کنید::" - -msgid "" -"if (!PyArg_ParseTuple(args, \"s\", &command))\n" -" return NULL;" -msgstr "" -"if (!PyArg_ParseTuple(args, \"s\", &command))\n" -" return NULL;" - -msgid "It returns ``NULL`` (the error indicator for functions returning object pointers) if an error is detected in the argument list, relying on the exception set by :c:func:`PyArg_ParseTuple`. Otherwise the string value of the argument has been copied to the local variable :c:data:`!command`. This is a pointer assignment and you are not supposed to modify the string to which it points (so in Standard C, the variable :c:data:`!command` should properly be declared as ``const char *command``)." -msgstr "در صورت تشخیص خطا در فهرست آرگومان‌ها، این تابع ``NULL`` (نشانگر خطا برای توابعی که اشاره‌گر شیء برمی‌گردانند) را برمی‌گرداند و به استثنای تنظیم‌شده توسط :c:func:`PyArg_ParseTuple` تکیه می‌کند. در غیر این صورت، مقدار رشته‌ی آرگومان به متغیر محلی :c:data:`!command` کپی شده است. این یک انتساب اشاره‌گر است و شما نباید رشته‌ای را که به آن اشاره می‌کند تغییر دهید (بنابراین در C استاندارد، متغیر :c:data:`!command` باید به‌درستی به‌صورت ``const char *command`` اعلان شود)." - -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 "دستور بعدی، تابع یونیکسی :c:func:`system` را فراخوانی می‌کند و رشته‌ای را که به‌تازگی از :c:func:`PyArg_ParseTuple` دریافت کرده‌ایم به آن پاس می‌دهد::" - -msgid "sts = system(command);" -msgstr "sts = system(command);" - -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 "تابع :func:`!spam.system` ما باید مقدار :c:data:`!sts` را به‌عنوان یک شیء پایتون بازگرداند. این کار با استفاده از تابع :c:func:`PyLong_FromLong` انجام می‌شود. ::" - -msgid "return PyLong_FromLong(sts);" -msgstr "return PyLong_FromLong(sts);" - -msgid "In this case, it will return an integer object. (Yes, even integers are objects on the heap in Python!)" -msgstr "در این حالت، یک شیء عدد صحیح را برمی‌گرداند. (بله، در پایتون حتی اعداد صحیح هم اشیایی روی هیپ هستند!)" - -msgid "If you have a C function that returns no useful argument (a function returning :c:expr:`void`), the corresponding Python function must return ``None``. You need this idiom to do so (which is implemented by the :c:macro:`Py_RETURN_NONE` macro)::" -msgstr "اگر تابعی در C داشته باشید که هیچ آرگومان مفیدی برنمی‌گرداند (تابعی که :c:expr:`void` برمی‌گرداند)، تابع پایتونِ متناظر باید ``None`` را برگرداند. برای انجام این کار به این اصطلاح نیاز دارید (که توسط ماکروی :c:macro:`Py_RETURN_NONE` پیاده‌سازی شده است)::" - -msgid "" -"Py_INCREF(Py_None);\n" -"return Py_None;" -msgstr "" -"Py_INCREF(Py_None);\n" -"return Py_None;" - -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 ":c:data:`Py_None` نام C برای شیء ویژه‌ی پایتون ``None`` است. این یک شیء واقعی پایتون است، نه یک اشاره‌گر ``NULL`` که همان‌طور که دیدیم، در بیشتر زمینه‌ها به معنای «خطا» است." - -msgid "The Module's Method Table and Initialization Function" -msgstr "جدول متدهای ماژول و تابع مقدار‌دهی اولیه" - -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 "قول داده بودم که نشان دهم :c:func:`!spam_system` چگونه از برنامه‌های پایتون فراخوانی می‌شود. ابتدا، باید نام و نشانی آن را در یک «جدول متد» فهرست کنیم::" - -msgid "" -"static PyMethodDef spam_methods[] = {\n" -" ...\n" -" {\"system\", spam_system, METH_VARARGS,\n" -" \"Execute a shell command.\"},\n" -" ...\n" -" {NULL, NULL, 0, NULL} /* Sentinel */\n" -"};" -msgstr "" -"static PyMethodDef spam_methods[] = {\n" -" ...\n" -" {\"system\", spam_system, METH_VARARGS,\n" -" \"Execute a shell command.\"},\n" -" ...\n" -" {NULL, NULL, 0, NULL} /* Sentinel */\n" -"};" - -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 normally always be ``METH_VARARGS`` or ``METH_VARARGS | METH_KEYWORDS``; a value of ``0`` means that an obsolete variant of :c:func:`PyArg_ParseTuple` is used." -msgstr "به ورودی سوم (``METH_VARARGS``) توجه کنید. این یک پرچم است که به مفسر اعلام می‌کند از کدام قرارداد فراخوانی برای تابع C استفاده شود. این پرچم معمولاً همیشه باید ``METH_VARARGS`` یا ``METH_VARARGS | METH_KEYWORDS`` باشد؛ مقدار ``0`` به این معنی است که گونه‌ی منسوخی از :c:func:`PyArg_ParseTuple` به کار می‌رود." - -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 "هنگام استفاده‌ی تنها از ``METH_VARARGS``، تابع باید انتظار داشته باشد که پارامترهای سطح پایتون به‌صورت تاپلی مناسب برای پارس کردن توسط :c:func:`PyArg_ParseTuple` ارسال شوند؛ اطلاعات بیشتر درباره‌ی این تابع در ادامه ارائه شده است." - -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 should accept a third ``PyObject *`` parameter which will be a dictionary of keywords. Use :c:func:`PyArg_ParseTupleAndKeywords` to parse the arguments to such a function." -msgstr "اگر قرار است آرگومان‌های کلیدواژه‌ای به تابع ارسال شوند، می‌توان بیت :c:macro:`METH_KEYWORDS` را در فیلد سوم تنظیم کرد. در این حالت، تابع C باید پارامتر سومی از نوع ``PyObject *`` را بپذیرد که دیکشنری‌ای از کلیدواژه‌ها خواهد بود. برای پارس کردن آرگومان‌های چنین تابعی، از :c:func:`PyArg_ParseTupleAndKeywords` استفاده کنید." - -msgid "The method table must be referenced in the module definition structure::" -msgstr "جدول متدها باید در ساختار تعریف ماژول ارجاع داده شود::" - -msgid "" -"static struct PyModuleDef spam_module = {\n" -" ...\n" -" .m_methods = spam_methods,\n" -" ...\n" -"};" -msgstr "" -"static struct PyModuleDef spam_module = {\n" -" ...\n" -" .m_methods = spam_methods,\n" -" ...\n" -"};" - -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:`!PyInit_name`, where *name* is the name of the module, and should be the only non-\\ ``static`` item defined in the module file::" -msgstr "این ساختار، به نوبه خود، باید در تابع مقداردهی اولیه‌ی ماژول، به مفسر پاس داده شود. تابع مقداردهی اولیه باید نام :c:func:`!PyInit_name` داشته باشد، که در آن *name* نام ماژول است، و باید تنها آیتم غیر ``static`` تعریف‌شده در پرونده‌ی ماژول باشد::" - -msgid "" -"PyMODINIT_FUNC\n" -"PyInit_spam(void)\n" -"{\n" -" return PyModuleDef_Init(&spam_module);\n" -"}" -msgstr "" -"PyMODINIT_FUNC\n" -"PyInit_spam(void)\n" -"{\n" -" return PyModuleDef_Init(&spam_module);\n" -"}" - -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 "توجه داشته باشید که :c:macro:`PyMODINIT_FUNC` تابع را با نوع بازگشتی ``PyObject *`` اعلام می‌کند، هرگونه اعلان پیوند (linkage) خاص مورد نیاز پلتفرم را اعلام می‌کند و برای C++ تابع را به‌صورت ``extern \"C\"`` اعلام می‌کند." - -msgid ":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 ":c:func:`!PyInit_spam` هنگامی فراخوانی می‌شود که هر مفسر، ماژول :mod:`!spam` خود را برای نخستین بار ایمپورت کند. (برای نکات مربوط به تعبیه پایتون، به ادامه مراجعه کنید.) اشاره‌گری به تعریف ماژول باید از طریق :c:func:`PyModuleDef_Init` بازگردانده شود تا سازوکار ایمپورت بتواند ماژول را ایجاد کرده و آن را در ``sys.modules`` ذخیره کند." - -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` table. To add the module to the initialization table, use :c:func:`PyImport_AppendInittab`, optionally followed by an import of the module::" -msgstr "هنگام تعبیه پایتون، تابع :c:func:`!PyInit_spam` به‌طور خودکار فراخوانی نمی‌شود، مگر آنکه ورودی‌ای در جدول :c:data:`PyImport_Inittab` وجود داشته باشد. برای افزودن ماژول به جدول مقداردهی اولیه، از :c:func:`PyImport_AppendInittab` استفاده کنید و در صورت تمایل، ماژول را ایمپورت کنید::" - -msgid "" -"#define PY_SSIZE_T_CLEAN\n" -"#include \n" -"\n" -"int\n" -"main(int argc, char *argv[])\n" -"{\n" -" PyStatus status;\n" -" PyConfig config;\n" -" PyConfig_InitPythonConfig(&config);\n" -"\n" -" /* Add a built-in module, before Py_Initialize */\n" -" if (PyImport_AppendInittab(\"spam\", PyInit_spam) == -1) {\n" -" fprintf(stderr, \"Error: could not extend in-built modules table\\n\");\n" -" exit(1);\n" -" }\n" -"\n" -" /* Pass argv[0] to the Python interpreter */\n" -" status = PyConfig_SetBytesString(&config, &config.program_name, argv[0]);\n" -" if (PyStatus_Exception(status)) {\n" -" goto exception;\n" -" }\n" -"\n" -" /* Initialize the Python interpreter. Required.\n" -" If this step fails, it will be a fatal error. */\n" -" status = Py_InitializeFromConfig(&config);\n" -" if (PyStatus_Exception(status)) {\n" -" goto exception;\n" -" }\n" -" PyConfig_Clear(&config);\n" -"\n" -" /* Optionally import the module; alternatively,\n" -" import can be deferred until the embedded script\n" -" imports it. */\n" -" PyObject *pmodule = PyImport_ImportModule(\"spam\");\n" -" if (!pmodule) {\n" -" PyErr_Print();\n" -" fprintf(stderr, \"Error: could not import module 'spam'\\n\");\n" -" }\n" -"\n" -" // ... use Python C API here ...\n" -"\n" -" return 0;\n" -"\n" -" exception:\n" -" PyConfig_Clear(&config);\n" -" Py_ExitStatusException(status);\n" -"}" -msgstr "" -"#define PY_SSIZE_T_CLEAN\n" -"#include \n" -"\n" -"int\n" -"main(int argc, char *argv[])\n" -"{\n" -" PyStatus status;\n" -" PyConfig config;\n" -" PyConfig_InitPythonConfig(&config);\n" -"\n" -" /* Add a built-in module, before Py_Initialize */\n" -" if (PyImport_AppendInittab(\"spam\", PyInit_spam) == -1) {\n" -" fprintf(stderr, \"Error: could not extend in-built modules table\\n\");\n" -" exit(1);\n" -" }\n" -"\n" -" /* Pass argv[0] to the Python interpreter */\n" -" status = PyConfig_SetBytesString(&config, &config.program_name, argv[0]);\n" -" if (PyStatus_Exception(status)) {\n" -" goto exception;\n" -" }\n" -"\n" -" /* Initialize the Python interpreter. Required.\n" -" If this step fails, it will be a fatal error. */\n" -" status = Py_InitializeFromConfig(&config);\n" -" if (PyStatus_Exception(status)) {\n" -" goto exception;\n" -" }\n" -" PyConfig_Clear(&config);\n" -"\n" -" /* Optionally import the module; alternatively,\n" -" import can be deferred until the embedded script\n" -" imports it. */\n" -" PyObject *pmodule = PyImport_ImportModule(\"spam\");\n" -" if (!pmodule) {\n" -" PyErr_Print();\n" -" fprintf(stderr, \"Error: could not import module 'spam'\\n\");\n" -" }\n" -"\n" -" // ... use Python C API here ...\n" -"\n" -" return 0;\n" -"\n" -" exception:\n" -" PyConfig_Clear(&config);\n" -" Py_ExitStatusException(status);\n" -"}" - -msgid "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`). 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 "اگر یک متغیر سراسری یا یک متغیر ایستای محلی تعریف کنید، ماژول ممکن است هنگام مقداردهی مجدد دچار عوارض جانبی ناخواسته شود، برای مثال هنگام حذف ورودی‌ها از ``sys.modules`` یا ایمپورت کردن ماژول‌های کامپایل‌شده در چندین مفسر درون یک فرایند (یا پس از یک :c:func:`fork` بدون :c:func:`exec` در میان). اگر وضعیت ماژول هنوز به‌طور کامل :ref:`جداسازی‌شده ` نباشد، نویسندگان باید در نظر بگیرند که ماژول را به‌عنوان فاقد پشتیبانی از زیرمفسرها علامت‌گذاری کنند (از طریق :c:macro:`Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED`)." - -msgid "A more substantial example module is included in the Python source distribution as :file:`Modules/xxlimited.c`. This file may be used as a template or simply read as an example." -msgstr "یک ماژول نمونه‌ی جامع‌تر در توزیع کد منبع پایتون به‌صورت :file:`Modules/xxlimited.c` گنجانده شده است. می‌توان از این پرونده به‌عنوان یک قالب استفاده کرد یا صرفاً آن را به‌عنوان مثال خواند." - -msgid "Compilation and Linkage" -msgstr "کامپایل و پیونددهی (linkage)" - -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 loading, the details may depend on the style of dynamic loading your system uses; see the chapters about building extension modules (chapter :ref:`building`) and additional information that pertains only to building on Windows (chapter :ref:`building-on-windows`) for more information about this." -msgstr "پیش از آنکه بتوانید از ماژول توسعه‌ای جدید خود استفاده کنید، باید دو کار دیگر انجام دهید: کامپایل کردن و پیوند دادن آن با سیستم پایتون. اگر از بارگذاری پویا استفاده کنید، جزئیات ممکن است به سبک بارگذاری پویایی که سیستم شما از آن استفاده می‌کند بستگی داشته باشد؛ برای اطلاعات بیشتر درباره‌ی این موضوع، به فصل‌های مربوط به ساخت ماژول‌های توسعه‌ای (فصل :ref:`building`) و اطلاعات تکمیلی‌ای که تنها به ساخت روی ویندوز مربوط می‌شود (فصل :ref:`building-on-windows`) مراجعه کنید." +msgid "Embedding an extension" +msgstr "تعبیه‌ی یک افزونه" -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 configuration setup and rebuild the interpreter. Luckily, this is very simple on Unix: just place your file (:file:`spammodule.c` for example) in the :file:`Modules/` directory of an unpacked source distribution, add a line to the file :file:`Modules/Setup.local` describing your file:" -msgstr "اگر نتوانید از بارگذاری پویا استفاده کنید، یا اگر می‌خواهید ماژول خود را به بخشی دائمی از مفسر پایتون تبدیل کنید، باید تنظیمات پیکربندی را تغییر دهید و مفسر را بازسازی کنید. خوشبختانه، این کار در یونیکس بسیار ساده است: کافی است پرونده‌ی خود (برای مثال :file:`spammodule.c`) را در پوشه‌ی :file:`Modules/` یک توزیع کد منبعِ استخراج‌شده قرار دهید، و سطری به پرونده‌ی :file:`Modules/Setup.local` اضافه کنید که پرونده‌ی شما را توصیف کند:" +msgid "If you want to make your module a permanent part of the Python interpreter, you will have to change the configuration setup and rebuild the interpreter. On Unix, place your file (:file:`spammodule.c` for example) in the :file:`Modules/` directory of an unpacked source distribution, add a line to the file :file:`Modules/Setup.local` describing your file:" +msgstr "اگر می‌خواهید ماژول خود را به بخش دائمی مفسر پایتون تبدیل کنید، باید تنظیمات پیکربندی را تغییر دهید و مفسر را دوباره بسازید. در سیستم‌یونیکس، پرونده‌ی خود (مثلاً :file:`spammodule.c`) را در پوشه‌ی :file:`Modules/` از یک بسته‌ی توزیع‌کننده‌ی کد منبع استخراج‌شده قرار دهید، یک سطر به پرونده‌ی :file:`Modules/Setup.local` اضافه کنید که پرونده‌ی شما را توصیف کند:" msgid "spam spammodule.o" msgstr "spam spammodule.o" @@ -588,8 +229,8 @@ msgstr "spam spammodule.o -lX11" msgid "Calling Python Functions from C" msgstr "فراخوانی توابع پایتون از زبان C" -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 the case for libraries that support so-called \"callback\" functions. If a C interface makes use of callbacks, the equivalent Python often needs to provide a callback mechanism to the Python programmer; the implementation will require calling the Python callback functions from a C callback. Other uses are also imaginable." -msgstr "تا اینجا بر فراخوانی‌پذیر کردن توابع C از پایتون تمرکز کرده‌ایم. حالت معکوس نیز کاربردی است: فراخوانی توابع پایتون از C. این موضوع به‌ویژه در مورد کتابخانه‌هایی که از توابعی به اصطلاح «کال‌بک» پشتیبانی می‌کنند صادق است. اگر یک رابط C از کال‌بک‌ها استفاده کند، معادل پایتونی آن اغلب نیاز دارد که سازوکار کال‌بکی را در اختیار برنامه‌نویس پایتون قرار دهد؛ پیاده‌سازی این کار مستلزم فراخوانی توابع کال‌بک پایتون از یک کال‌بک C خواهد بود. کاربردهای دیگری نیز قابل تصور است." +msgid "The tutorial concentrated on making C functions callable from Python. The reverse is also useful: calling Python functions from C. This is especially the case for libraries that support so-called \"callback\" functions. If a C interface makes use of callbacks, the equivalent Python often needs to provide a callback mechanism to the Python programmer; the implementation will require calling the Python callback functions from a C callback. Other uses are also imaginable." +msgstr "آموزش بر روی فراخوانی‌پذیر کردن عملکردهای C از پایتون تمرکز داشت. حالت برعکس آن نیز مفید است: فراخوانی توابع پایتون از C. این موضوع به‌ویژه برای کتابخانه‌هایی که از توابع موسوم به «کال‌بک» پشتیبانی می‌کنند اهمیت دارد. اگر یک رابط C از کال‌بک‌ها استفاده کند، نسخه‌ی معادل در پایتون اغلب باید یک مکانیزم کال‌بک را برای برنامه‌نویس پایتون فراهم کند؛ پیاده‌سازی آن نیازمند فراخوانی توابع کال‌بک پایتون از طریق یک کال‌بک C خواهد بود. کاربردهای دیگری نیز قابل تصور است." msgid "Fortunately, the Python interpreter is easily called recursively, and there is a standard interface to call a Python function. (If you're interested in how to call the Python parser with a particular string as input, see :ref:`veryhigh`.)" msgstr "خوشبختانه، مفسر پایتون به‌راحتی به‌صورت بازگشتی فراخوانی می‌شود و یک رابط استاندارد برای فراخوانی یک تابع پایتون وجود دارد. (اگر می‌خواهید بدانید چگونه می‌توان پارسر پایتون را با یک رشته خاص به‌عنوان ورودی فراخوانی کرد، به :ref:`veryhigh` مراجعه کنید.)" @@ -644,8 +285,8 @@ msgstr "" " return result;\n" "}" -msgid "This function must be registered with the interpreter using the :c:macro:`METH_VARARGS` flag; this is described in section :ref:`methodtable`. The :c:func:`PyArg_ParseTuple` function and its arguments are documented in section :ref:`parsetuple`." -msgstr "این تابع باید با استفاده از پرچم :c:macro:`METH_VARARGS` در مفسر ثبت شود؛ این موضوع در بخش :ref:`methodtable` توضیح داده شده است. تابع :c:func:`PyArg_ParseTuple` و آرگومان‌های آن در بخش :ref:`parsetuple` مستندسازی شده‌اند." +msgid "This function must be registered with the interpreter using the :c:macro:`METH_VARARGS` flag in :c:type:`PyMethodDef.ml_flags`. The :c:func:`PyArg_ParseTuple` function and its arguments are documented in section :ref:`parsetuple`." +msgstr "این تابع باید با استفاده از پرچم :c:macro:`METH_VARARGS` در :c:type:`PyMethodDef.ml_flags` در مفسر ثبت شود. تابع :c:func:`PyArg_ParseTuple` و آرگومان‌های آن در بخش :ref:`parsetuple` مستند شده‌اند." 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`` pointers (but note that *temp* will not be ``NULL`` in this context). More info on them in section :ref:`refcounts`." msgstr "ماکروهای :c:func:`Py_XINCREF` و :c:func:`Py_XDECREF` شمارش ارجاع یک شیء را افزایش/کاهش می‌دهند و در صورت وجود اشاره‌گرهای ``NULL`` ایمن هستند (اما توجه داشته باشید که *temp* در این زمینه ``NULL`` نخواهد بود). اطلاعات بیشتر درباره‌ی آن‌ها در بخش :ref:`refcounts` آمده است." @@ -750,8 +391,11 @@ msgstr "" msgid "Extracting Parameters in Extension Functions" msgstr "استخراج پارامترها در توابع توسعه‌ای" -msgid "The :c:func:`PyArg_ParseTuple` function is declared as follows::" -msgstr "تابع :c:func:`PyArg_ParseTuple` به شرح زیر تعریف شده است::" +msgid "The :ref:`tutorial ` uses a \":c:data:`METH_O`\" function, which is limited to a single Python argument. If you want more, you can use :c:data:`METH_VARARGS` instead. With this flag, the C function will receive a :py:class:`tuple` of arguments instead of a single object." +msgstr ":ref:`آموزش ` از یک تابع \":c:data:`METH_O`\" استفاده می‌کند که به یک آرگومان واحد پایتون محدود است. اگر آرگومان‌های بیشتری می‌خواهید، می‌توانید به جای آن از :c:data:`METH_VARARGS` استفاده کنید. با این پرچم، تابع C به جای یک شیء واحد، یک :py:class:`tuple` از آرگومان‌ها را دریافت خواهد کرد." + +msgid "For unpacking the tuple, CPython provides the :c:func:`PyArg_ParseTuple` function, declared as follows::" +msgstr "برای بازکردن بسته‌ی تاپل، سی‌پایتون تابع :c:func:`PyArg_ParseTuple` را فراهم می‌کند که به شکل زیر اعلام شده است::" msgid "int PyArg_ParseTuple(PyObject *arg, const char *format, ...);" msgstr "int PyArg_ParseTuple(PyObject *arg, const char *format, ...);" @@ -759,6 +403,23 @@ msgstr "int PyArg_ParseTuple(PyObject *arg, const char *format, ...);" 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, whose syntax is explained in :ref:`arg-parsing` in the Python/C API Reference Manual. The remaining arguments must be addresses of variables whose type is determined by the format string." msgstr "آرگومان *arg* باید یک شیء تاپل حاوی فهرست آرگومانی باشد که از پایتون به یک تابع C پاس داده می‌شود. آرگومان *format* باید یک رشته قالب باشد که سینتکس آن در :ref:`arg-parsing` در راهنمای مرجع Python/C API توضیح داده شده است. آرگومان‌های باقی‌مانده باید آدرس‌های متغیرهایی باشند که نوع آن‌ها توسط رشته قالب تعیین می‌شود." +msgid "For example, to receive a single Python :py:class:`str` object and turn it into a C buffer, you would use ``\"s\"`` as the format string::" +msgstr "به عنوان مثال، برای دریافت یک شیء :py:class:`str` واحد پایتون و تبدیل آن به یک بافر C، از ``\"s\"`` به عنوان رشته‌ی فرمت استفاده می‌کنید::" + +msgid "" +"const char *command;\n" +"if (!PyArg_ParseTuple(args, \"s\", &command)) {\n" +" return NULL;\n" +"}" +msgstr "" +"const char *command;\n" +"if (!PyArg_ParseTuple(args, \"s\", &command)) {\n" +" return NULL;\n" +"}" + +msgid "If an error is detected in the argument list, :c:func:`!PyArg_ParseTuple` returns ``NULL`` (the error indicator for functions returning object pointers); your function may return ``NULL``, relying on the exception set by :c:func:`PyArg_ParseTuple`." +msgstr "اگر خطایی در فهرست آرگومان‌ها تشخیص داده شود، تابع :c:func:`!PyArg_ParseTuple` مقدار ``NULL`` (نشانگر خطا برای توابعی که اشاره‌گرهای شیء برمی‌گردانند) را برمی‌گرداند؛ تابع شما ممکن است با اتکا به استثنای تعیین‌شده توسط :c:func:`PyArg_ParseTuple`، مقدار ``NULL`` را برگرداند." + 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 variables passed to the call: if you make mistakes there, your code will probably crash or at least overwrite random bits in memory. So be careful!" msgstr "توجه داشته باشید که هرچند :c:func:`PyArg_ParseTuple` بررسی می‌کند که آرگومان‌های پایتون نوع‌های مورد نیاز را داشته باشند، نمی‌تواند اعتبار نشانی‌های متغیرهای C که به فراخوانی ارسال شده‌اند را بررسی کند: اگر در آنجا اشتباهی کنید، کد شما احتمالاً فروپاشی می‌کند یا دست‌کم بیت‌های تصادفی در حافظه را بازنویسی می‌کند. پس مراقب باشید!" @@ -768,6 +429,9 @@ msgstr "توجه داشته باشید که هر ارجاع به شیء پایت msgid "Some example calls::" msgstr "چند نمونه فراخوانی::" +msgid "#include " +msgstr "#include " + msgid "" "int ok;\n" "int i, j;\n" @@ -872,6 +536,12 @@ msgstr "" msgid "Keyword Parameters for Extension Functions" msgstr "پارامترهای کلیدواژه‌ای برای توابع توسعه‌ای" +msgid "If you also want your function to accept :term:`keyword arguments `, use the :c:data:`METH_KEYWORDS` flag in combination with :c:data:`METH_VARARGS`. (:c:data:`!METH_KEYWORDS` can also be used with other flags; see its documentation for the allowed combinations.)" +msgstr "اگر می‌خواهید تابع شما :term:`آرگومان‌های کلیدواژه‌ای ` را نیز بپذیرد، از پرچم :c:data:`METH_KEYWORDS` در ترکیب با :c:data:`METH_VARARGS` استفاده کنید. (:c:data:`!METH_KEYWORDS` را می‌توان با پرچم‌های دیگر نیز استفاده کرد؛ برای ترکیب‌های مجاز به مستندات آن مراجعه کنید.)" + +msgid "In this case, the C function should accept a third ``PyObject *`` parameter which will be a dictionary of keywords. Use :c:func:`PyArg_ParseTupleAndKeywords` to parse the arguments to such a function." +msgstr "در این صورت، تابع C باید یک پارامتر سوم ``PyObject *`` را بپذیرد که دیکشنری‌ای از کلیدواژه‌ها خواهد بود. از :c:func:`PyArg_ParseTupleAndKeywords` برای تجزیه کردن آرگومان‌های چنین تابعی استفاده کنید." + msgid "The :c:func:`PyArg_ParseTupleAndKeywords` function is declared as follows::" msgstr "تابع :c:func:`PyArg_ParseTupleAndKeywords` به صورت زیر اعلان می‌شود::" @@ -924,20 +594,7 @@ msgid "" " {\"parrot\", (PyCFunction)(void(*)(void))keywdarg_parrot, METH_VARARGS | METH_KEYWORDS,\n" " \"Print a lovely skit to standard output.\"},\n" " {NULL, NULL, 0, NULL} /* sentinel */\n" -"};\n" -"\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 PyModuleDef_Init(&keywdarg_module);\n" -"}" +"};" msgstr "" "#define PY_SSIZE_T_CLEAN\n" "#include \n" @@ -971,20 +628,7 @@ msgstr "" " {\"parrot\", (PyCFunction)(void(*)(void))keywdarg_parrot, METH_VARARGS | METH_KEYWORDS,\n" " \"Print a lovely skit to standard output.\"},\n" " {NULL, NULL, 0, NULL} /* sentinel */\n" -"};\n" -"\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 PyModuleDef_Init(&keywdarg_module);\n" -"}" +"};" msgid "Building Arbitrary Values" msgstr "ساخت مقادیر دلخواه" @@ -1074,8 +718,8 @@ msgstr "دو ماکرو وجود دارد، ``Py_INCREF(x)`` و ``Py_DECREF(x)`` 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 object; however, you can :dfn:`own a reference` to an object. An object's reference count is now defined as the number of owned references to it. The owner of a reference is responsible for calling :c:func:`Py_DECREF` when the reference is no longer needed. Ownership of a reference can be transferred. There are three ways to dispose of an owned reference: pass it on, store it, or call :c:func:`Py_DECREF`. Forgetting to dispose of an owned reference creates a memory leak." msgstr "اکنون پرسش بزرگ این است: چه زمانی باید از ``Py_INCREF(x)`` و ``Py_DECREF(x)`` استفاده کرد؟ اجازه دهید ابتدا چند اصطلاح را معرفی کنیم. هیچ‌کس «مالک» یک شیء نیست؛ اما شما می‌توانید :dfn:`مالک یک ارجاع (own a reference)` به یک شیء باشید. اکنون شمارش ارجاع یک شیء به‌عنوان تعداد ارجاع‌های در مالکیت به آن تعریف می‌شود. مالک یک ارجاع مسئول است که وقتی دیگر به ارجاع نیازی نیست، :c:func:`Py_DECREF` را فراخوانی کند. مالکیت یک ارجاع می‌تواند منتقل شود. سه راه برای خلاص شدن از یک ارجاع در مالکیت وجود دارد: انتقال آن، ذخیره‌ی آن، یا فراخوانی :c:func:`Py_DECREF`. فراموش کردن خلاص شدن از یک ارجاع در مالکیت، باعث نشت حافظه می‌شود." -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 must not hold on to the object longer than the owner from which it was borrowed. Using a borrowed reference after the owner has disposed of it risks using freed memory and should be avoided completely [#]_." -msgstr "همچنین می‌توان ارجاعی به یک شیء را :dfn:`به امانت گرفت (borrow)` [#]_. امانت‌گیرنده‌ی ارجاع نباید :c:func:`Py_DECREF` را فراخوانی کند. امانت‌گیرنده نباید شیء را بیشتر از مالکی که ارجاع از او امانت گرفته‌شده است، نگه دارد. استفاده از ارجاع امانتی پس از آنکه مالک آن را دور انداخته باشد، خطر استفاده از حافظه‌ی آزادشده را در پی دارد و باید به‌طور کامل از آن پرهیز کرد [#]_." +msgid "It is also possible to :dfn:`borrow` [#borrow]_ a reference to an object. The borrower of a reference should not call :c:func:`Py_DECREF`. The borrower must not hold on to the object longer than the owner from which it was borrowed. Using a borrowed reference after the owner has disposed of it risks using freed memory and should be avoided completely [#dont-check-refcount]_." +msgstr "همچنین می‌توان یک ارجاع به یک شیء را به‌صورت :dfn:`امانتی` [#borrow]_ دریافت کرد. امانت‌گیرنده‌ی یک ارجاع نباید :c:func:`Py_DECREF` را فراخوانی کند. امانت‌گیرنده نباید شیء را بیشتر از مالک آن، که ارجاع از آن به امانت گرفته شده است، نگه دارد. استفاده از یک ارجاع امانتی پس از آن‌که مالک آن را آزاد کرده است، خطر استفاده از حافظه‌ی آزادشده را به همراه دارد و باید کاملاً از آن اجتناب شود [#dont-check-refcount]_." 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 code --- in other words, with a borrowed reference you don't run the risk of leaking when a premature exit is taken. The disadvantage of borrowing over owning is that there are some subtle situations where in seemingly correct code a borrowed reference can be used after the owner from which it was borrowed has in fact disposed of it." msgstr "مزیت امانت گرفتن ارجاع نسبت به مالکیت آن این است که لازم نیست در تمام مسیرهای ممکن در کد، دفع ارجاع را مدیریت کنید --- به عبارت دیگر، با ارجاع امانتی، هنگام خروج زودهنگام در معرض خطر نشت قرار نمی‌گیرید. عیب امانت گرفتن نسبت به مالکیت این است که در برخی موقعیت‌های ظریف، ممکن است در کدی که به‌ظاهر درست است، از یک ارجاع امانتی پس از آنکه مالکی که ارجاع از او امانت گرفته شده، در واقع آن را دفع کرده باشد، استفاده شود." @@ -1212,8 +856,8 @@ msgstr "ماکروهای :c:func:`Py_INCREF` و :c:func:`Py_DECREF` اشاره 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 several of these in a row to test an object against various different expected types, and this would generate redundant tests. There are no variants with ``NULL`` checking." msgstr "ماکروهای بررسی یک نوع شیء خاص (``Pytype_Check()``) اشاره‌گرهای ``NULL`` را بررسی نمی‌کنند --- باز هم، کدهای زیادی وجود دارند که برای آزمودن یک شیء در برابر انواع مختلف مورد انتظار، چندین مورد از این ماکروها را پشت سر هم فراخوانی می‌کنند، و این کار آزمون‌های تکراری ایجاد می‌کرد. هیچ گونه‌ای با بررسی ``NULL`` وجود ندارد." -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 "سازوکار فراخوانی تابع C تضمین می‌کند که فهرست آرگومان‌هایی که به توابع C ارسال می‌شود (``args`` در مثال‌ها) هرگز ``NULL`` نیست --- در واقع تضمین می‌کند که همیشه یک تاپل است [#]_." +msgid "The C function calling mechanism guarantees that the argument list passed to C functions (``args`` in the examples) is never ``NULL`` --- in fact it guarantees that it is always a tuple [#old-calling-convention]_." +msgstr "مکانیسم فراخوانی تابع C تضمین می‌کند که فهرست آرگومان‌های ارسال‌شده به توابع C (که در مثال‌ها با ``args`` نشان داده شده است) هرگز ``NULL`` نباشد --- در واقع، این مکانیسم تضمین می‌کند که آرگومان‌ها همیشه یک تاپل هستند [#old-calling-convention]_." msgid "It is a severe error to ever let a ``NULL`` pointer \"escape\" to the Python user." msgstr "این خطایی بسیار جدی است که اشاره‌گر ``NULL`` به کاربر پایتون «گریز» کند." @@ -1233,8 +877,8 @@ msgstr "بسیاری از ماژول‌های توسعه‌ای صرفاً تو msgid "At first sight this seems easy: just write the functions (without declaring them ``static``, of course), provide an appropriate header file, and document the C API. And in fact this would work if all extension modules were always linked statically with the Python interpreter. When modules are used as shared libraries, however, the symbols defined in one module may not be visible to another module. The details of visibility depend on the operating system; some systems use one global namespace for the Python interpreter and all extension modules (Windows, for example), whereas others require an explicit list of imported symbols at module link time (AIX is one example), or offer a choice of different strategies (most Unices). And even if symbols are globally visible, the module whose functions one wishes to call might not have been loaded yet!" msgstr "در نگاه نخست این کار آسان به نظر می‌رسد: کافی است توابع را بنویسید (البته بدون اینکه آن‌ها را ``static`` اعلان کنید)، یک پرونده‌ی سرآیند مناسب فراهم کنید و API زبان C را مستند کنید. و در واقع اگر همه ماژول‌های توسعه‌ای همیشه به‌صورت ایستا با مفسر پایتون پیوند داده می‌شدند، همین روش کار می‌کرد. اما هنگامی که ماژول‌ها به‌صورت کتابخانه‌های اشتراکی استفاده می‌شوند، ممکن است نمادهای تعریف‌شده در یک ماژول برای ماژول دیگری نمایان نباشند. جزئیات نمایان بودن نمادها به سیستم‌عامل بستگی دارد؛ برخی سیستم‌ها برای مفسر پایتون و همه ماژول‌های توسعه‌ای از یک فضای نام سراسری واحد استفاده می‌کنند (مثلاً ویندوز)، در حالی که برخی دیگر در زمان پیوند ماژول به فهرست صریحی از نمادهای واردشده نیاز دارند (AIX یکی از این نمونه‌هاست)، یا امکان انتخاب میان راهبردهای مختلف را ارائه می‌دهند (بیشتر سیستم‌های یونیکس). و حتی اگر نمادها به‌صورت سراسری نمایان باشند، ممکن است ماژولی که می‌خواهید توابعش را فراخوانی کنید، هنوز بارگذاری‌نشده باشد!" -msgid "Portability therefore requires not to make any assumptions about symbol visibility. This means that all symbols in extension modules should be declared ``static``, except for the module's initialization function, in order to avoid name clashes with other extension modules (as discussed in section :ref:`methodtable`). And it means that symbols that *should* be accessible from other extension modules must be exported in a different way." -msgstr "بنابراین، قابلیت انتقال (portability) ایجاب می‌کند که هیچ فرضی درباره‌ی نمایانی نمادها صورت نگیرد. این بدان معناست که همه‌ی نمادها در ماژول‌های توسعه‌ای، به‌جز تابع مقداردهی اولیه‌ی ماژول، باید به‌صورت ``static`` اعلام شوند تا از تداخل نام با ماژول‌های توسعه‌ای دیگر پرهیز شود (همان‌طور که در بخش :ref:`methodtable` بحث شد). و این بدان معناست که نمادهایی که *باید* برای دیگر ماژول‌های توسعه‌ای دسترسی‌پذیر باشند، باید به شیوه‌ای متفاوت اکسپورت شوند." +msgid "Portability therefore requires not to make any assumptions about symbol visibility. This means that all symbols in extension modules should be declared ``static``, except for the module's initialization function, in order to avoid name clashes with other extension modules. And it means that symbols that *should* be accessible from other extension modules must be exported in a different way." +msgstr "بنابراین، قابلیت حمل (Portability) ایجاب می‌کند که هیچ‌گونه فرضی درباره‌ی قابلیت دید نمادها (symbol visibility) در نظر نگیرید. این بدان معناست که برای جلوگیری از تداخل نام با سایر ماژول‌های توسعه‌ای، تمام نمادها در ماژول‌های توسعه‌ای باید به صورت ``static`` اعلام شوند، مگر تابع مقداردهی اولیه‌ی ماژول. و این یعنی نمادهایی که *باید* از سایر ماژول‌های توسعه‌ای قابل دسترسی باشند، باید به روش متفاوتی صادر (export) شوند." 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 data type which stores a pointer (:c:expr:`void \\*`). Capsules can only be created and accessed via their C API, but they can be passed around like any other Python object. In particular, they can be assigned to a name in an extension module's namespace. Other extension modules can then import this module, retrieve the value of this name, and then retrieve the pointer from the Capsule." msgstr "پایتون سازوکار ویژه‌ای برای انتقال اطلاعات در سطح C (اشاره‌گرها) از یک ماژول توسعه‌ای به ماژول توسعه‌ای دیگر فراهم می‌کند: کپسول‌ها (Capsules). کپسول یک نوع داده پایتونی است که یک اشاره‌گر (:c:expr:`void \\*`) را ذخیره می‌کند. ایجاد و دسترسی به کپسول‌ها تنها از طریق API زبان C آن‌ها ممکن است، اما می‌توان آن‌ها را مانند هر شیء پایتونی دیگری منتقل کرد. به‌طور خاص، می‌توان آن‌ها را به نامی در فضای نام یک ماژول توسعه‌ای منتسب کرد. سپس ماژول‌های توسعه‌ای دیگر می‌توانند این ماژول را ایمپورت کنند، مقدار این نام را بازیابی کنند و سپس اشاره‌گر را از کپسول بازیابی کنند." @@ -1257,8 +901,8 @@ msgstr "تابع کمکی :c:func:`PyCapsule_Import` بارگذاری یک C API 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 used library modules. It stores all C API pointers (just one in the example!) in an array of :c:expr:`void` pointers which becomes the value of a Capsule. The header file corresponding to the module provides a macro that takes care of importing the module and retrieving its C API pointers; client modules only have to call this macro before accessing the C API." msgstr "مثال زیر رویکردی را نشان می‌دهد که بیشتر بار را بر دوش نویسنده ماژول اکسپورتکننده قرار می‌دهد، که برای ماژول‌های کتابخانه‌ای پرکاربرد مناسب است. این رویکرد تمام اشاره‌گرهای C API (در مثال فقط یکی!) را در آرایه‌ای از اشاره‌گرهای :c:expr:`void` ذخیره می‌کند که مقدار یک کپسول می‌شود. پرونده‌ی سرآیند متناظر با ماژول، ماکرویی را فراهم می‌کند که کار ایمپورت کردن ماژول و بازیابی اشاره‌گرهای C API آن را انجام می‌دهد؛ ماژول‌های کلاینت تنها باید پیش از دسترسی به C API این ماکرو را فراخوانی کنند." -msgid "The exporting module is a modification of the :mod:`!spam` module from section :ref:`extending-simpleexample`. The function :func:`!spam.system` does not call the C library function :c:func:`system` directly, but a function :c:func:`!PySpam_System`, which would of course do something more complicated in reality (such as adding \"spam\" to every command). This function :c:func:`!PySpam_System` is also exported to other extension modules." -msgstr "ماژول اکسپورتکننده، نسخه‌ی تغییر‌یافته‌ای از ماژول :mod:`!spam` در بخش :ref:`extending-simpleexample` است. تابع :func:`!spam.system` مستقیماً تابع :c:func:`system` از کتابخانه‌ی C را فراخوانی نمی‌کند، بلکه تابع :c:func:`!PySpam_System` را فراخوانی می‌کند که البته در واقعیت کاری پیچیده‌تر انجام می‌دهد (مانند افزودن \"spam\" به هر دستور). این تابع :c:func:`!PySpam_System` همچنین به ماژول‌های توسعه‌ای دیگر اکسپورت می‌شود." +msgid "The exporting module is a modification of the :mod:`!spam` module from the :ref:`tutorial `. The function :func:`!spam.system` does not call the C library function :c:func:`system` directly, but a function :c:func:`!PySpam_System`, which would of course do something more complicated in reality (such as adding \"spam\" to every command). This function :c:func:`!PySpam_System` is also exported to other extension modules." +msgstr "ماژول صادرکننده، تغییری از ماژول :mod:`!spam` در :ref:`آموزش ` است. تابع :func:`!spam.system` تابع کتابخانه‌ای C یعنی :c:func:`system` را مستقیماً فراخوانی نمی‌کند، بلکه تابع :c:func:`!PySpam_System` را فراخوانی می‌کند که البته در واقعیت کار پیچیده‌تری انجام می‌دهد (مانند افزودن «spam» به هر دستور). این تابع :c:func:`!PySpam_System` نیز به سایر ماژول‌های توسعه‌ای صادر می‌شود." msgid "The function :c:func:`!PySpam_System` is a plain C function, declared ``static`` like everything else::" msgstr "تابع :c:func:`!PySpam_System` یک تابع C ساده است که مانند بقیه موارد به‌صورت ``static`` اعلان شده است::" @@ -1307,9 +951,6 @@ msgstr "" msgid "In the beginning of the module, right after the line ::" msgstr "در ابتدای ماژول، درست پس از سطر ::" -msgid "#include " -msgstr "#include " - msgid "two more lines must be added::" msgstr "دو سطر دیگر باید افزوده شود::" @@ -1498,9 +1139,6 @@ msgstr "در نهایت باید ذکر شود که Capsule‌ها عملکرد msgid "Footnotes" msgstr "پانوشت‌ها" -msgid "An interface for this function already exists in the standard module :mod:`os` --- it was chosen as a simple and straightforward example." -msgstr "رابطی برای این تابع از پیش در ماژول استاندارد :mod:`os` وجود دارد --- این تابع به‌عنوان مثالی ساده و سرراست انتخاب شد." - msgid "The metaphor of \"borrowing\" a reference is not completely correct: the owner still has a copy of the reference." msgstr "استعاره‌ی «امانت گرفتنِ» ارجاع کاملاً درست نیست: مالک همچنان نسخه‌ای از ارجاع را در اختیار دارد." @@ -1521,3 +1159,366 @@ msgstr "PyArg_ParseTupleAndKeywords (تابع C)" msgid "Philbrick, Geoff" msgstr "Philbrick, Geoff" + +#~ msgid "Extending Python with C or C++" +#~ msgstr "توسعه پایتون با C یا C++" + +#~ msgid "It is quite easy to add new built-in modules to Python, if you know how to program in C. Such :dfn:`extension modules` can do two things that can't be done directly in Python: they can implement new built-in object types, and they can call C library functions and system calls." +#~ msgstr "اگر بدانید چگونه به زبان C برنامه‌نویسی کنید، افزودن ماژول‌های توکار جدید به پایتون کاملاً آسان است. چنین :dfn:`ماژول‌های توسعه‌ای (extension modules)` می‌توانند دو کاری انجام دهند که مستقیماً در پایتون امکان‌پذیر نیست: می‌توانند نوع‌های شیء توکار جدید را پیاده‌سازی کنند و می‌توانند توابع کتابخانه C و فراخوان‌های سیستمی را فراخوانی کنند." + +#~ msgid "To support extensions, the Python API (Application Programmers Interface) defines a set of functions, macros and variables that provide access to most aspects of the Python run-time system. The Python API is incorporated in a C source file by including the header ``\"Python.h\"``." +#~ msgstr "برای پشتیبانی از توسعه‌ها، API پایتون (رابط برنامه‌نویسی کاربردی) مجموعه‌ای از توابع، ماکروها و متغیرها را تعریف می‌کند که دسترسی به بیشتر جنبه‌های سیستم زمان اجرای پایتون را فراهم می‌کنند. API پایتون با گنجاندن سرآیند ``\"Python.h\"`` در یک پرونده منبع C ادغام می‌شود." + +#~ msgid "The compilation of an extension module depends on its intended use as well as on your system setup; details are given in later chapters." +#~ msgstr "کامپایل یک ماژول توسعه‌ای به کاربرد موردنظر آن و همچنین به پیکربندی سیستم شما بستگی دارد؛ جزئیات در فصل‌های بعدی ارائه شده است." + +#~ msgid "The C extension interface is specific to CPython, and extension modules do not work on other Python implementations. In many cases, it is possible to avoid writing C extensions and preserve portability to other implementations. For example, if your use case is calling C library functions or system calls, you should consider using the :mod:`ctypes` module or the `cffi `_ library rather than writing custom C code. These modules let you write Python code to interface with C code and are more portable between implementations of Python than writing and compiling a C extension module." +#~ msgstr "رابط توسعه C مختص سی‌پایتون است و ماژول‌های توسعه‌ای روی پیاده‌سازی‌های دیگر پایتون کار نمی‌کنند. در بسیاری از موارد می‌توان از نوشتن توسعه‌های C پرهیز کرد و قابلیت حمل به پیاده‌سازی‌های دیگر را حفظ نمود. برای مثال، اگر مورد استفاده‌ی شما فراخوانی توابع کتابخانه C یا فراخوانی‌های سیستمی است، باید به جای نوشتن کد C سفارشی، استفاده از ماژول :mod:`ctypes` یا کتابخانه‌ی `cffi `_ را در نظر بگیرید. این ماژول‌ها به شما اجازه می‌دهند برای برقراری رابط با کد C، کد پایتون بنویسید و نسبت به نوشتن و کامپایل کردن یک ماژول توسعه‌ای C، بین پیاده‌سازی‌های پایتون قابلیت حمل بیشتری دارند." + +#~ msgid "A Simple Example" +#~ msgstr "یک مثال ساده" + +#~ msgid "Let's create an extension module called ``spam`` (the favorite food of Monty Python fans...) and let's say we want to create a Python interface to the C library function :c:func:`system` [#]_. This function takes a null-terminated character string as argument and returns an integer. We want this function to be callable from Python as follows:" +#~ msgstr "بیایید یک ماژول توسعه‌ای به نام ``spam`` بسازیم (غذای مورد علاقه‌ی طرفداران مونتی پایتون...) و فرض کنیم می‌خواهیم یک رابط پایتونی برای تابع کتابخانه‌ی C یعنی :c:func:`system` [#]_ بسازیم. این تابع یک رشته‌ی نویسه‌ای پایان‌یافته با نویسه‌ی تهی را به‌عنوان آرگومان می‌گیرد و یک عدد صحیح برمی‌گرداند. می‌خواهیم این تابع از پایتون به صورت زیر فراخوانی‌پذیر باشد:" + +#~ msgid "" +#~ ">>> import spam\n" +#~ ">>> status = spam.system(\"ls -l\")" +#~ msgstr "" +#~ ">>> import spam\n" +#~ ">>> status = spam.system(\"ls -l\")" + +#~ msgid "Begin by creating a file :file:`spammodule.c`. (Historically, if a module is called ``spam``, the C file containing its implementation is called :file:`spammodule.c`; if the module name is very long, like ``spammify``, the module name can be just :file:`spammify.c`.)" +#~ msgstr "کار را با ایجاد یک پرونده‌ی :file:`spammodule.c` آغاز کنید. (از نظر تاریخی، اگر ماژولی ``spam`` نام داشته باشد، پرونده‌ی C حاوی پیاده‌سازی آن :file:`spammodule.c` نامیده می‌شود؛ اگر نام ماژول بسیار طولانی باشد، مانند ``spammify``، نام ماژول می‌تواند تنها :file:`spammify.c` باشد.)" + +#~ msgid "The first two lines of our file can be::" +#~ msgstr "دو سطر نخست پرونده‌ی ما می‌تواند باشد::" + +#~ msgid "" +#~ "#define PY_SSIZE_T_CLEAN\n" +#~ "#include " +#~ msgstr "" +#~ "#define PY_SSIZE_T_CLEAN\n" +#~ "#include " + +#~ msgid "which pulls in the Python API (you can add a comment describing the purpose of the module and a copyright notice if you like)." +#~ msgstr "که API پایتون را وارد می‌کند (در صورت تمایل می‌توانید کامنتی که هدف ماژول را شرح می‌دهد و یک اعلان حق نشر اضافه کنید)." + +#~ msgid "Since Python may define some pre-processor definitions which affect the standard headers on some systems, you *must* include :file:`Python.h` before any standard headers are included." +#~ msgstr "از آنجا که پایتون ممکن است برخی تعریف‌های پیش‌پردازنده را تعریف کند که در برخی سیستم‌ها بر سرآیندهای استاندارد تأثیر می‌گذارند، شما *باید* :file:`Python.h` را پیش از گنجاندن هر سرآیند استانداردی بگنجانید." + +#~ msgid "``#define PY_SSIZE_T_CLEAN`` was used to indicate that ``Py_ssize_t`` should be used in some APIs instead of ``int``. It is not necessary since Python 3.13, but we keep it here for backward compatibility. See :ref:`arg-parsing-string-and-buffers` for a description of this macro." +#~ msgstr "``#define PY_SSIZE_T_CLEAN`` برای نشان دادن اینکه ``Py_ssize_t`` باید در برخی API‌ها به‌جای ``int`` استفاده شود، به کار می‌رفت. از پایتون 3.13 به بعد دیگر ضروری نیست، اما ما آن را برای سازگاری با گذشته در اینجا نگه می‌داریم. برای توضیح این ماکرو به :ref:`arg-parsing-string-and-buffers` مراجعه کنید." + +#~ msgid "All user-visible symbols defined by :file:`Python.h` have a prefix of ``Py`` or ``PY``, except those defined in standard header files." +#~ msgstr "تمام نمادهای قابل مشاهده توسط کاربر که توسط :file:`Python.h` تعریف شده‌اند، پیشوند ``Py`` یا ``PY`` دارند؛ به‌جز نمادهایی که در پرونده‌های سرآیند استاندارد تعریف شده‌اند." + +#~ msgid "For backward compatibility, :file:`Python.h` includes several standard header files. C extensions should include the standard headers that they use, and should not rely on these implicit includes. If using the limited C API version 3.13 or newer, the implicit includes are:" +#~ msgstr "برای سازگاری با نسخه‌های پیشین، :file:`Python.h` چندین پرونده‌ی سرآیند استاندارد را include می‌کند. افزونه‌های C باید سرآیندهای استاندارد مورد استفاده‌ی خود را include کنند و نباید به این include‌های ضمنی تکیه کنند. اگر از C API محدود نسخه‌ی 3.13 یا جدیدتر استفاده می‌کنید، include‌های ضمنی عبارت‌اند از:" + +#~ msgid "````" +#~ msgstr "````" + +#~ msgid "```` (on Windows)" +#~ msgstr "```` (در ویندوز)" + +#~ msgid "````" +#~ msgstr "````" + +#~ msgid "````" +#~ msgstr "````" + +#~ msgid "````" +#~ msgstr "````" + +#~ msgid "````" +#~ msgstr "````" + +#~ msgid "````" +#~ msgstr "````" + +#~ msgid "```` (if present)" +#~ msgstr "```` (در صورت وجود)" + +#~ msgid "If :c:macro:`Py_LIMITED_API` is not defined, or is set to version 3.12 or older, the headers below are also included:" +#~ msgstr "اگر :c:macro:`Py_LIMITED_API` تعریف نشده باشد، یا روی نسخه 3.12 یا قدیمی‌تر تنظیم شده باشد، سرآیندهای زیر نیز گنجانده می‌شوند:" + +#~ msgid "````" +#~ msgstr "````" + +#~ msgid "```` (on POSIX)" +#~ msgstr "```` (در POSIX)" + +#~ msgid "If :c:macro:`Py_LIMITED_API` is not defined, or is set to version 3.10 or older, the headers below are also included:" +#~ msgstr "اگر :c:macro:`Py_LIMITED_API` تعریف نشده باشد، یا روی نسخه 3.10 یا قدیمی‌تر تنظیم شده باشد، سرآیندهای زیر نیز گنجانده می‌شوند:" + +#~ msgid "````" +#~ msgstr "````" + +#~ msgid "````" +#~ msgstr "````" + +#~ msgid "````" +#~ msgstr "````" + +#~ msgid "````" +#~ msgstr "````" + +#~ msgid "The next thing we add to our module file is the C function that will be called when the Python expression ``spam.system(string)`` is evaluated (we'll see shortly how it ends up being called)::" +#~ msgstr "مورد بعدی که به پرونده ماژول خود اضافه می‌کنیم، تابع C است که هنگام ارزیابی عبارت پایتون ``spam.system(string)`` فراخوانی خواهد شد (به‌زودی خواهیم دید که چگونه در نهایت فراخوانی می‌شود)::" + +#~ msgid "" +#~ "static PyObject *\n" +#~ "spam_system(PyObject *self, PyObject *args)\n" +#~ "{\n" +#~ " const char *command;\n" +#~ " int sts;\n" +#~ "\n" +#~ " if (!PyArg_ParseTuple(args, \"s\", &command))\n" +#~ " return NULL;\n" +#~ " sts = system(command);\n" +#~ " return PyLong_FromLong(sts);\n" +#~ "}" +#~ msgstr "" +#~ "static PyObject *\n" +#~ "spam_system(PyObject *self, PyObject *args)\n" +#~ "{\n" +#~ " const char *command;\n" +#~ " int sts;\n" +#~ "\n" +#~ " if (!PyArg_ParseTuple(args, \"s\", &command))\n" +#~ " return NULL;\n" +#~ " sts = system(command);\n" +#~ " return PyLong_FromLong(sts);\n" +#~ "}" + +#~ msgid "There is a straightforward translation from the argument list in Python (for example, the single expression ``\"ls -l\"``) to the arguments passed to the C function. The C function always has two arguments, conventionally named *self* and *args*." +#~ msgstr "ترجمه‌ای سرراست از فهرست آرگومان‌ها در پایتون (برای مثال، عبارت واحد ``\"ls -l\"``) به آرگومان‌های پاس‌داده‌شده به تابع C وجود دارد. تابع C همیشه دو آرگومان دارد که به‌طور قراردادی *self* و *args* نامیده می‌شوند." + +#~ msgid "The *self* argument points to the module object for module-level functions; for a method it would point to the object instance." +#~ msgstr "آرگومان *self* برای توابع در سطح ماژول به شیء ماژول اشاره می‌کند؛ برای یک متد، به نمونه‌ی شیء اشاره خواهد کرد." + +#~ msgid "The *args* argument will be a pointer to a Python tuple object containing the arguments. Each item of the tuple corresponds to an argument in the call's argument list. The arguments are Python objects --- in order to do anything with them in our C function we have to convert them to C values. The function :c:func:`PyArg_ParseTuple` in the Python API checks the argument types and converts them to C values. It uses a template string to determine the required types of the arguments as well as the types of the C variables into which to store the converted values. More about this later." +#~ msgstr "آرگومان *args* اشاره‌گری به یک شیء تاپل پایتون حاوی آرگومان‌ها خواهد بود. هر آیتم از تاپل با یک آرگومان در فهرست آرگومان‌های فراخوانی مطابقت دارد. آرگومان‌ها اشیاء پایتون هستند --- برای اینکه بتوانیم در تابع C خود کاری با آن‌ها انجام دهیم، باید آن‌ها را به مقادیر C تبدیل کنیم. تابع :c:func:`PyArg_ParseTuple` در API پایتون انواع آرگومان‌ها را بررسی می‌کند و آن‌ها را به مقادیر C تبدیل می‌کند. این تابع از یک رشته‌ی قالب برای تعیین انواع مورد نیاز آرگومان‌ها و همچنین انواع متغیرهای C که مقادیر تبدیل‌شده در آن‌ها ذخیره می‌شوند، استفاده می‌کند. در ادامه بیشتر درباره‌ی این موضوع توضیح داده خواهد شد." + +#~ msgid ":c:func:`PyArg_ParseTuple` returns true (nonzero) if all arguments have the right type and its components have been stored in the variables whose addresses are passed. It returns false (zero) if an invalid argument list was passed. In the latter case it also raises an appropriate exception so the calling function can return ``NULL`` immediately (as we saw in the example)." +#~ msgstr "تابع :c:func:`PyArg_ParseTuple` در صورتی مقدار درست (غیرصفر) را برمی‌گرداند که همه‌ی آرگومان‌ها نوع درست را داشته باشند و اجزای آن در متغیرهایی که آدرس‌هایشان پاس داده شده، ذخیره شده باشند. اگر فهرست آرگومان نامعتبری پاس داده شده باشد، مقدار نادرست (صفر) را برمی‌گرداند. در حالت دوم، همچنین یک استثنای مناسب ایجاد می‌کند تا تابع فراخواننده بتواند بلافاصله ``NULL`` را برگرداند (همان‌طور که در مثال دیدیم)." + +#~ msgid "Back to the Example" +#~ msgstr "بازگشت به مثال" + +#~ msgid "Going back to our example function, you should now be able to understand this statement::" +#~ msgstr "با بازگشت به تابع مثال خودمان، اکنون باید بتوانید این دستور را درک کنید::" + +#~ msgid "It returns ``NULL`` (the error indicator for functions returning object pointers) if an error is detected in the argument list, relying on the exception set by :c:func:`PyArg_ParseTuple`. Otherwise the string value of the argument has been copied to the local variable :c:data:`!command`. This is a pointer assignment and you are not supposed to modify the string to which it points (so in Standard C, the variable :c:data:`!command` should properly be declared as ``const char *command``)." +#~ msgstr "در صورت تشخیص خطا در فهرست آرگومان‌ها، این تابع ``NULL`` (نشانگر خطا برای توابعی که اشاره‌گر شیء برمی‌گردانند) را برمی‌گرداند و به استثنای تنظیم‌شده توسط :c:func:`PyArg_ParseTuple` تکیه می‌کند. در غیر این صورت، مقدار رشته‌ی آرگومان به متغیر محلی :c:data:`!command` کپی شده است. این یک انتساب اشاره‌گر است و شما نباید رشته‌ای را که به آن اشاره می‌کند تغییر دهید (بنابراین در C استاندارد، متغیر :c:data:`!command` باید به‌درستی به‌صورت ``const char *command`` اعلان شود)." + +#~ 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 "دستور بعدی، تابع یونیکسی :c:func:`system` را فراخوانی می‌کند و رشته‌ای را که به‌تازگی از :c:func:`PyArg_ParseTuple` دریافت کرده‌ایم به آن پاس می‌دهد::" + +#~ msgid "sts = system(command);" +#~ msgstr "sts = system(command);" + +#~ 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 "تابع :func:`!spam.system` ما باید مقدار :c:data:`!sts` را به‌عنوان یک شیء پایتون بازگرداند. این کار با استفاده از تابع :c:func:`PyLong_FromLong` انجام می‌شود. ::" + +#~ msgid "return PyLong_FromLong(sts);" +#~ msgstr "return PyLong_FromLong(sts);" + +#~ msgid "In this case, it will return an integer object. (Yes, even integers are objects on the heap in Python!)" +#~ msgstr "در این حالت، یک شیء عدد صحیح را برمی‌گرداند. (بله، در پایتون حتی اعداد صحیح هم اشیایی روی هیپ هستند!)" + +#~ msgid "If you have a C function that returns no useful argument (a function returning :c:expr:`void`), the corresponding Python function must return ``None``. You need this idiom to do so (which is implemented by the :c:macro:`Py_RETURN_NONE` macro)::" +#~ msgstr "اگر تابعی در C داشته باشید که هیچ آرگومان مفیدی برنمی‌گرداند (تابعی که :c:expr:`void` برمی‌گرداند)، تابع پایتونِ متناظر باید ``None`` را برگرداند. برای انجام این کار به این اصطلاح نیاز دارید (که توسط ماکروی :c:macro:`Py_RETURN_NONE` پیاده‌سازی شده است)::" + +#~ msgid "" +#~ "Py_INCREF(Py_None);\n" +#~ "return Py_None;" +#~ msgstr "" +#~ "Py_INCREF(Py_None);\n" +#~ "return Py_None;" + +#~ 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 ":c:data:`Py_None` نام C برای شیء ویژه‌ی پایتون ``None`` است. این یک شیء واقعی پایتون است، نه یک اشاره‌گر ``NULL`` که همان‌طور که دیدیم، در بیشتر زمینه‌ها به معنای «خطا» است." + +#~ msgid "The Module's Method Table and Initialization Function" +#~ msgstr "جدول متدهای ماژول و تابع مقدار‌دهی اولیه" + +#~ 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 "قول داده بودم که نشان دهم :c:func:`!spam_system` چگونه از برنامه‌های پایتون فراخوانی می‌شود. ابتدا، باید نام و نشانی آن را در یک «جدول متد» فهرست کنیم::" + +#~ msgid "" +#~ "static PyMethodDef spam_methods[] = {\n" +#~ " ...\n" +#~ " {\"system\", spam_system, METH_VARARGS,\n" +#~ " \"Execute a shell command.\"},\n" +#~ " ...\n" +#~ " {NULL, NULL, 0, NULL} /* Sentinel */\n" +#~ "};" +#~ msgstr "" +#~ "static PyMethodDef spam_methods[] = {\n" +#~ " ...\n" +#~ " {\"system\", spam_system, METH_VARARGS,\n" +#~ " \"Execute a shell command.\"},\n" +#~ " ...\n" +#~ " {NULL, NULL, 0, NULL} /* Sentinel */\n" +#~ "};" + +#~ 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 normally always be ``METH_VARARGS`` or ``METH_VARARGS | METH_KEYWORDS``; a value of ``0`` means that an obsolete variant of :c:func:`PyArg_ParseTuple` is used." +#~ msgstr "به ورودی سوم (``METH_VARARGS``) توجه کنید. این یک پرچم است که به مفسر اعلام می‌کند از کدام قرارداد فراخوانی برای تابع C استفاده شود. این پرچم معمولاً همیشه باید ``METH_VARARGS`` یا ``METH_VARARGS | METH_KEYWORDS`` باشد؛ مقدار ``0`` به این معنی است که گونه‌ی منسوخی از :c:func:`PyArg_ParseTuple` به کار می‌رود." + +#~ 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 "هنگام استفاده‌ی تنها از ``METH_VARARGS``، تابع باید انتظار داشته باشد که پارامترهای سطح پایتون به‌صورت تاپلی مناسب برای پارس کردن توسط :c:func:`PyArg_ParseTuple` ارسال شوند؛ اطلاعات بیشتر درباره‌ی این تابع در ادامه ارائه شده است." + +#~ msgid "The method table must be referenced in the module definition structure::" +#~ msgstr "جدول متدها باید در ساختار تعریف ماژول ارجاع داده شود::" + +#~ msgid "" +#~ "static struct PyModuleDef spam_module = {\n" +#~ " ...\n" +#~ " .m_methods = spam_methods,\n" +#~ " ...\n" +#~ "};" +#~ msgstr "" +#~ "static struct PyModuleDef spam_module = {\n" +#~ " ...\n" +#~ " .m_methods = spam_methods,\n" +#~ " ...\n" +#~ "};" + +#~ 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:`!PyInit_name`, where *name* is the name of the module, and should be the only non-\\ ``static`` item defined in the module file::" +#~ msgstr "این ساختار، به نوبه خود، باید در تابع مقداردهی اولیه‌ی ماژول، به مفسر پاس داده شود. تابع مقداردهی اولیه باید نام :c:func:`!PyInit_name` داشته باشد، که در آن *name* نام ماژول است، و باید تنها آیتم غیر ``static`` تعریف‌شده در پرونده‌ی ماژول باشد::" + +#~ msgid "" +#~ "PyMODINIT_FUNC\n" +#~ "PyInit_spam(void)\n" +#~ "{\n" +#~ " return PyModuleDef_Init(&spam_module);\n" +#~ "}" +#~ msgstr "" +#~ "PyMODINIT_FUNC\n" +#~ "PyInit_spam(void)\n" +#~ "{\n" +#~ " return PyModuleDef_Init(&spam_module);\n" +#~ "}" + +#~ 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 "توجه داشته باشید که :c:macro:`PyMODINIT_FUNC` تابع را با نوع بازگشتی ``PyObject *`` اعلام می‌کند، هرگونه اعلان پیوند (linkage) خاص مورد نیاز پلتفرم را اعلام می‌کند و برای C++ تابع را به‌صورت ``extern \"C\"`` اعلام می‌کند." + +#~ msgid ":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 ":c:func:`!PyInit_spam` هنگامی فراخوانی می‌شود که هر مفسر، ماژول :mod:`!spam` خود را برای نخستین بار ایمپورت کند. (برای نکات مربوط به تعبیه پایتون، به ادامه مراجعه کنید.) اشاره‌گری به تعریف ماژول باید از طریق :c:func:`PyModuleDef_Init` بازگردانده شود تا سازوکار ایمپورت بتواند ماژول را ایجاد کرده و آن را در ``sys.modules`` ذخیره کند." + +#~ 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` table. To add the module to the initialization table, use :c:func:`PyImport_AppendInittab`, optionally followed by an import of the module::" +#~ msgstr "هنگام تعبیه پایتون، تابع :c:func:`!PyInit_spam` به‌طور خودکار فراخوانی نمی‌شود، مگر آنکه ورودی‌ای در جدول :c:data:`PyImport_Inittab` وجود داشته باشد. برای افزودن ماژول به جدول مقداردهی اولیه، از :c:func:`PyImport_AppendInittab` استفاده کنید و در صورت تمایل، ماژول را ایمپورت کنید::" + +#~ msgid "" +#~ "#define PY_SSIZE_T_CLEAN\n" +#~ "#include \n" +#~ "\n" +#~ "int\n" +#~ "main(int argc, char *argv[])\n" +#~ "{\n" +#~ " PyStatus status;\n" +#~ " PyConfig config;\n" +#~ " PyConfig_InitPythonConfig(&config);\n" +#~ "\n" +#~ " /* Add a built-in module, before Py_Initialize */\n" +#~ " if (PyImport_AppendInittab(\"spam\", PyInit_spam) == -1) {\n" +#~ " fprintf(stderr, \"Error: could not extend in-built modules table\\n\");\n" +#~ " exit(1);\n" +#~ " }\n" +#~ "\n" +#~ " /* Pass argv[0] to the Python interpreter */\n" +#~ " status = PyConfig_SetBytesString(&config, &config.program_name, argv[0]);\n" +#~ " if (PyStatus_Exception(status)) {\n" +#~ " goto exception;\n" +#~ " }\n" +#~ "\n" +#~ " /* Initialize the Python interpreter. Required.\n" +#~ " If this step fails, it will be a fatal error. */\n" +#~ " status = Py_InitializeFromConfig(&config);\n" +#~ " if (PyStatus_Exception(status)) {\n" +#~ " goto exception;\n" +#~ " }\n" +#~ " PyConfig_Clear(&config);\n" +#~ "\n" +#~ " /* Optionally import the module; alternatively,\n" +#~ " import can be deferred until the embedded script\n" +#~ " imports it. */\n" +#~ " PyObject *pmodule = PyImport_ImportModule(\"spam\");\n" +#~ " if (!pmodule) {\n" +#~ " PyErr_Print();\n" +#~ " fprintf(stderr, \"Error: could not import module 'spam'\\n\");\n" +#~ " }\n" +#~ "\n" +#~ " // ... use Python C API here ...\n" +#~ "\n" +#~ " return 0;\n" +#~ "\n" +#~ " exception:\n" +#~ " PyConfig_Clear(&config);\n" +#~ " Py_ExitStatusException(status);\n" +#~ "}" +#~ msgstr "" +#~ "#define PY_SSIZE_T_CLEAN\n" +#~ "#include \n" +#~ "\n" +#~ "int\n" +#~ "main(int argc, char *argv[])\n" +#~ "{\n" +#~ " PyStatus status;\n" +#~ " PyConfig config;\n" +#~ " PyConfig_InitPythonConfig(&config);\n" +#~ "\n" +#~ " /* Add a built-in module, before Py_Initialize */\n" +#~ " if (PyImport_AppendInittab(\"spam\", PyInit_spam) == -1) {\n" +#~ " fprintf(stderr, \"Error: could not extend in-built modules table\\n\");\n" +#~ " exit(1);\n" +#~ " }\n" +#~ "\n" +#~ " /* Pass argv[0] to the Python interpreter */\n" +#~ " status = PyConfig_SetBytesString(&config, &config.program_name, argv[0]);\n" +#~ " if (PyStatus_Exception(status)) {\n" +#~ " goto exception;\n" +#~ " }\n" +#~ "\n" +#~ " /* Initialize the Python interpreter. Required.\n" +#~ " If this step fails, it will be a fatal error. */\n" +#~ " status = Py_InitializeFromConfig(&config);\n" +#~ " if (PyStatus_Exception(status)) {\n" +#~ " goto exception;\n" +#~ " }\n" +#~ " PyConfig_Clear(&config);\n" +#~ "\n" +#~ " /* Optionally import the module; alternatively,\n" +#~ " import can be deferred until the embedded script\n" +#~ " imports it. */\n" +#~ " PyObject *pmodule = PyImport_ImportModule(\"spam\");\n" +#~ " if (!pmodule) {\n" +#~ " PyErr_Print();\n" +#~ " fprintf(stderr, \"Error: could not import module 'spam'\\n\");\n" +#~ " }\n" +#~ "\n" +#~ " // ... use Python C API here ...\n" +#~ "\n" +#~ " return 0;\n" +#~ "\n" +#~ " exception:\n" +#~ " PyConfig_Clear(&config);\n" +#~ " Py_ExitStatusException(status);\n" +#~ "}" + +#~ msgid "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`). 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 "اگر یک متغیر سراسری یا یک متغیر ایستای محلی تعریف کنید، ماژول ممکن است هنگام مقداردهی مجدد دچار عوارض جانبی ناخواسته شود، برای مثال هنگام حذف ورودی‌ها از ``sys.modules`` یا ایمپورت کردن ماژول‌های کامپایل‌شده در چندین مفسر درون یک فرایند (یا پس از یک :c:func:`fork` بدون :c:func:`exec` در میان). اگر وضعیت ماژول هنوز به‌طور کامل :ref:`جداسازی‌شده ` نباشد، نویسندگان باید در نظر بگیرند که ماژول را به‌عنوان فاقد پشتیبانی از زیرمفسرها علامت‌گذاری کنند (از طریق :c:macro:`Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED`)." + +#~ msgid "A more substantial example module is included in the Python source distribution as :file:`Modules/xxlimited.c`. This file may be used as a template or simply read as an example." +#~ msgstr "یک ماژول نمونه‌ی جامع‌تر در توزیع کد منبع پایتون به‌صورت :file:`Modules/xxlimited.c` گنجانده شده است. می‌توان از این پرونده به‌عنوان یک قالب استفاده کرد یا صرفاً آن را به‌عنوان مثال خواند." + +#~ msgid "Compilation and Linkage" +#~ msgstr "کامپایل و پیونددهی (linkage)" + +#~ 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 loading, the details may depend on the style of dynamic loading your system uses; see the chapters about building extension modules (chapter :ref:`building`) and additional information that pertains only to building on Windows (chapter :ref:`building-on-windows`) for more information about this." +#~ msgstr "پیش از آنکه بتوانید از ماژول توسعه‌ای جدید خود استفاده کنید، باید دو کار دیگر انجام دهید: کامپایل کردن و پیوند دادن آن با سیستم پایتون. اگر از بارگذاری پویا استفاده کنید، جزئیات ممکن است به سبک بارگذاری پویایی که سیستم شما از آن استفاده می‌کند بستگی داشته باشد؛ برای اطلاعات بیشتر درباره‌ی این موضوع، به فصل‌های مربوط به ساخت ماژول‌های توسعه‌ای (فصل :ref:`building`) و اطلاعات تکمیلی‌ای که تنها به ساخت روی ویندوز مربوط می‌شود (فصل :ref:`building-on-windows`) مراجعه کنید." + +#~ msgid "An interface for this function already exists in the standard module :mod:`os` --- it was chosen as a simple and straightforward example." +#~ msgstr "رابطی برای این تابع از پیش در ماژول استاندارد :mod:`os` وجود دارد --- این تابع به‌عنوان مثالی ساده و سرراست انتخاب شد." diff --git a/extending/first-extension-module.po b/extending/first-extension-module.po new file mode 100644 index 00000000..bc3885ff --- /dev/null +++ b/extending/first-extension-module.po @@ -0,0 +1,872 @@ +# Persian translations for Python package. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# Automatically generated, 2026. +# +# Translators: +# Sepehr Rasouli , 2026 +# arman mohebali , 2026 +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 19:51+0330\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: fa\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.6\n" + +msgid "Your first C API extension module" +msgstr "نخستین ماژول توسعه‌ی C API شما" + +msgid "This tutorial will take you through creating a simple Python extension module written in C or C++." +msgstr "این خودآموز شما را با ساخت یک ماژول توسعه‌ی ساده‌ی پایتون که به زبان C یا C++ نوشته شده است، همراهی می‌کند." + +msgid "We will use the low-level Python C API directly. For easier ways to create extension modules, see the :ref:`recommended third party tools `." +msgstr "ما مستقیماً از Python C API سطح پایین استفاده خواهیم کرد. برای راه‌های ساده‌تر جهت ساخت ماژول‌های توسعه، به :ref:`ابزارهای شخص ثالث توصیه‌شده ` مراجعه کنید." + +msgid "The tutorial assumes basic knowledge about Python: you should be able to define functions in Python code before starting to write them in C. See :ref:`tutorial-index` for an introduction to Python itself." +msgstr "این خودآموز دانش پایه‌ای درباره‌ی پایتون را فرض می‌گیرد: شما باید پیش از شروع نوشتن توابع در زبان C، قادر به تعریف تابع در کد پایتون باشید. برای آشنایی با خودِ پایتون به :ref:`tutorial-index` مراجعه کنید." + +msgid "The tutorial should be approachable for anyone who can write a basic C library. While we will mention several concepts that a C beginner would not be expected to know, like ``static`` functions or linkage declarations, understanding these is not necessary for success." +msgstr "این خودآموز برای هر کسی که بتواند یک کتابخانه‌ی پایه‌ای C را بنویسد، قابل درک خواهد بود. با اینکه به مفاهیمی اشاره خواهیم کرد که انتظار نمی‌رود یک تازه‌کار C بداند، مانند توابع ``static`` یا اعلان‌های پیوند (linkage)، درک آن‌ها برای موفقیت ضروری نیست." + +msgid "We will focus on giving you a \"feel\" of what Python's C API is like. It will not teach you important concepts, like error handling and reference counting, which are covered in later chapters." +msgstr "ما بر این تمرکز خواهیم کرد که «حسی» از چگونگی C API پایتون به شما بدهیم. این خودآموز مفاهیم مهمی مانند مدیریت خطا و شمارش ارجاع را به شما نخواهد آموخت که در فصول بعدی پوشش داده شده‌اند." + +msgid "We will assume that you use a Unix-like system (including macOS and Linux), or Windows. On other systems, you might need to adjust some details -- for example, a system command name." +msgstr "ما فرض می‌کنیم که شما از یک سیستم مشابه یونیکس (شامل macOS و لینوکس) یا ویندوز استفاده می‌کنید. در سایر سیستم‌ها، ممکن است نیاز باشد برخی جزئیات -- به عنوان مثال، نام یک دستور سیستمی -- را تنظیم کنید." + +msgid "You need to have a suitable C compiler and Python development headers installed. On Linux, headers are often in a package like ``python3-dev`` or ``python3-devel``." +msgstr "شما باید یک کامپایلر مناسب C و سرآیندهای توسعه‌ی پایتون را نصب کرده باشید. در لینوکس، سرآیندها معمولاً در بسته‌ای مانند ``python3-dev`` یا ``python3-devel`` قرار دارند." + +msgid "You need to be able to install Python packages. This tutorial uses `pip `__ (``pip install``), but you can substitute any tool that can build and install ``pyproject.toml``-based projects, like `uv `_ (``uv pip install``). Preferably, have a :ref:`virtual environment ` activated." +msgstr "شما باید توانایی نصب بسته‌های پایتون را داشته باشید. این خودآموز از `pip `__ (``pip install``) استفاده می‌کند، اما می‌توانید هر ابزاری را که توانایی ساخت و نصب پروژه‌های مبتنی بر ``pyproject.toml`` را دارد جایگزین کنید، مانند `uv `_ (``uv pip install``). ترجیحاً، یک :ref:`محیط مجازی ` را فعال کنید." + +msgid "This tutorial uses APIs that were added in CPython 3.15. To create an extension that's compatible with earlier versions of CPython, please follow an earlier version of this documentation." +msgstr "این خودآموز از APIهایی استفاده می‌کند که در سی‌پایتون ۳.۱۵ اضافه شده‌اند. برای ساخت بسته‌ای که با نسخه‌های قبلی سی‌پایتون سازگار باشد، لطفاً نسخه‌ی قبلی این مستندات را دنبال کنید." + +msgid "This tutorial uses C syntax added in C11 and C++20. If your extension needs to be compatible with earlier standards, please follow tutorials in documentation for Python 3.14 or below." +msgstr "این خودآموز از نحو C اضافه شده در C11 و C++20 استفاده می‌کند. اگر افزونه‌ی شما نیاز دارد با استانداردهای قدیمی‌تر سازگار باشد، لطفاً خودآموزهای موجود در مستندات پایتون ۳.۱۴ یا پایین‌تر را دنبال کنید." + +msgid "What we'll do" +msgstr "آنچه انجام خواهیم داد" + +msgid "Let's create an extension module called ``spam`` [#why-spam]_, which will include a Python interface to the C standard library function :c:func:`system`. This function is defined in ``stdlib.h``. It takes a C string as argument, runs the argument as a system command, and returns a result value as an integer. A manual page for :c:func:`system` might summarize it this way::" +msgstr "بیایید یک ماژول توسعه‌ی به نام ``spam`` [#why-spam]_ بسازیم که شامل یک رابط پایتون به تابع کتابخانه‌ی استاندارد C یعنی :c:func:`system` خواهد بود. این تابع در ``stdlib.h`` تعریف شده است. این تابع یک رشته‌ی C را به عنوان آرگومان می‌گیرد، آرگومان را به عنوان یک دستور سیستمی اجرا می‌کند و یک مقدار نتیجه را به صورت یک عدد صحیح برمی‌گرداند. یک صفحه‌ی راهنما (man page) برای :c:func:`system` ممکن است آن را به این شکل خلاصه کند::" + +msgid "" +"#include \n" +"int system(const char *command);" +msgstr "" +"#include \n" +"int system(const char *command);" + +msgid "Note that like many functions in the C standard library, this function is already exposed in Python. In production, use :py:func:`os.system` or :py:func:`subprocess.run` rather than the module you'll write here." +msgstr "توجه داشته باشید که مانند بسیاری از توابع در کتابخانه‌ی استاندارد C، این تابع از پیش در پایتون در معرض دید قرار گرفته است. در محیط تولید، به جای ماژولی که در اینجا خواهید نوشت، از :py:func:`os.system` یا :py:func:`subprocess.run` استفاده کنید." + +msgid "We want this function to be callable from Python as follows:" +msgstr "ما می‌خواهیم این تابع به صورت زیر از پایتون قابل فراخوانی باشد:" + +msgid "" +">>> import spam\n" +">>> status = spam.system(\"whoami\")\n" +"User Name\n" +">>> status\n" +"0" +msgstr "" +">>> import spam\n" +">>> status = spam.system(\"whoami\")\n" +"User Name\n" +">>> status\n" +"0" + +msgid "The system command ``whoami`` prints out your username. It's useful in tutorials like this one because it has the same name on both Unix and Windows." +msgstr "دستور سیستمی ``whoami`` نام کاربری شما را چاپ می‌کند. این دستور در خودآموزهایی مانند این مفید است زیرا نام یکسانی در هر دو سیستم یونیکس و ویندوز دارد." + +msgid "Start with the headers" +msgstr "شروع با سرآیندها" + +msgid "Begin by creating a directory for this tutorial, and switching to it on the command line. Then, create a file named :file:`spammodule.c` in your directory. [#why-spammodule]_" +msgstr "با ساخت یک پوشه برای این خودآموز و رفتن به درون آن در خط فرمان شروع کنید. سپس، یک پرونده با نام :file:`spammodule.c` در پوشه‌ی خود ایجاد کنید. [#why-spammodule]_" + +msgid "In this file, we'll include two headers: :file:`Python.h` to pull in all declarations of the Python C API, and :file:`stdlib.h` for the :c:func:`system` function. [#stdlib-h]_" +msgstr "در این پرونده، دو سرآیند را اضافه می‌کنیم: :file:`Python.h` برای فراخوانی تمام تعاریف مربوط به API زبان C در پایتون، و :file:`stdlib.h` برای تابع :c:func:`system`. [#stdlib-h]_" + +msgid "Add the following lines to :file:`spammodule.c`:" +msgstr "سطرهای زیر را به :file:`spammodule.c` اضافه کنید:" + +msgid "" +"#include \n" +"#include // for system()\n" +msgstr "" +"#include \n" +"#include // for system()\n" + +msgid "Be sure to put :file:`stdlib.h`, and any other standard library includes, *after* :file:`Python.h`. On some systems, Python may define some pre-processor definitions that affect the standard headers." +msgstr "مطمئن شوید که :file:`stdlib.h` و هر سرآیند استاندارد دیگری را *بعد* از :file:`Python.h` قرار دهید. در برخی سیستم‌ها، پایتون ممکن است تعاریف پیش‌پردازنده‌ای را تعیین کند که روی سرآیندهای استاندارد تأثیر می‌گذارند." + +msgid "Running your build tool" +msgstr "اجرای ابزار ساخت" + +msgid "With only the includes in place, your extension won't do anything. Still, it's a good time to compile it and try to import it. This will ensure that your build tool works, so that you can make and test incremental changes as you follow the rest of the text." +msgstr "با قرارگیری این سرآیندها، افزونه‌ی شما کار خاصی انجام نخواهد داد. با این حال، زمان مناسبی است که آن را کامپایل کرده و تلاش کنید ایمپورتش کنید. این کار تضمین می‌کند که ابزار ساخت شما به‌درستی کار می‌کند، به‌طوری که بتوانید در حین دنبال کردن ادامه‌ی متن، تغییرات افزایشی ایجاد کرده و آن‌ها را آزمون کنید." + +msgid "CPython itself does not come with a tool to build extension modules; it is recommended to use a third-party project for this. In this tutorial, we'll use `meson-python`_. (If you want to use another one, see :ref:`first-extension-other-tools`.)" +msgstr "سی‌پایتون به خودی خود ابزاری برای ساخت ماژول‌های توسعه‌ای ندارد؛ توصیه می‌شود برای این کار از یک پروژه‌ی شخص ثالث استفاده کنید. در این آموزش، از `meson-python`_ استفاده خواهیم کرد. (اگر می‌خواهید از ابزار دیگری استفاده کنید، به :ref:`first-extension-other-tools` مراجعه کنید.)" + +msgid "``meson-python`` requires defining a \"project\" using two extra files." +msgstr "ابزار ``meson-python`` نیازمند تعریف یک «پروژه» با استفاده از دو پرونده‌ی اضافی است." + +msgid "First, add ``pyproject.toml`` with these contents:" +msgstr "ابتدا پرونده‌ی ``pyproject.toml`` را با این محتوا اضافه کنید:" + +msgid "" +"[build-system]\n" +"build-backend = 'mesonpy'\n" +"requires = ['meson-python']\n" +"\n" +"[project]\n" +"# Placeholder project information\n" +"# (change this before distributing the module)\n" +"name = 'sampleproject'\n" +"version = '0'" +msgstr "" +"[build-system]\n" +"build-backend = 'mesonpy'\n" +"requires = ['meson-python']\n" +"\n" +"[project]\n" +"# Placeholder project information\n" +"# (change this before distributing the module)\n" +"name = 'sampleproject'\n" +"version = '0'" + +msgid "Then, create ``meson.build`` containing the following:" +msgstr "سپس، پرونده‌ی ``meson.build`` را با محتوای زیر ایجاد کنید:" + +msgid "" +"project('sampleproject', 'c')\n" +"\n" +"py = import('python').find_installation(pure: false)\n" +"\n" +"py.extension_module(\n" +" 'spam', # name of the importable Python module\n" +" 'spammodule.c', # the C source file\n" +" install: true,\n" +")" +msgstr "" +"project('sampleproject', 'c')\n" +"\n" +"py = import('python').find_installation(pure: false)\n" +"\n" +"py.extension_module(\n" +" 'spam', # name of the importable Python module\n" +" 'spammodule.c', # the C source file\n" +" install: true,\n" +")" + +msgid "See the `meson-python documentation `_ for details on configuration." +msgstr "برای کسب اطلاعات بیشتر درباره‌ی پیکربندی، به `مستندات meson-python `_ مراجعه کنید." + +msgid "Now, build install the *project in the current directory* (``.``) via ``pip``:" +msgstr "اکنون، پروژه‌ی موجود در پوشه‌ی جاری (``.``) را از طریق ``pip`` ساخت و نصب کنید:" + +msgid "python -m pip -v install ." +msgstr "python -m pip -v install ." + +msgid "The ``-v`` (``--verbose``) option causes ``pip`` to show the output from the compiler, which is often useful during development." +msgstr "گزینه‌ی ``-v`` (``--verbose``) باعث می‌شود ``pip`` خروجی کامپایلر را نمایش دهد، که اغلب در طول توسعه مفید است." + +msgid "If you don't have ``pip`` installed, run ``python -m ensurepip``, preferably in a :ref:`virtual environment `. (Or, if you prefer another tool that can build and install ``pyproject.toml``-based projects, use that.)" +msgstr "اگر ``pip`` را نصب ندارید، دستور ``python -m ensurepip`` را اجرا کنید، ترجیحاً در یک :ref:`محیط مجازی ` (یا اگر ابزار دیگری را ترجیح می‌دهید که بتواند پروژه‌های مبتنی بر ``pyproject.toml`` را ساخت و نصب کند، از آن استفاده کنید.)" + +msgid "Note that you will need to run this command again every time you change your extension. Unlike Python, C has an explicit compilation step." +msgstr "توجه داشته باشید که هر بار افزونه‌ی خود را تغییر می‌دهید، باید این دستور را دوباره اجرا کنید. برخلاف پایتون، زبان C دارای یک مرحله‌ی صریح کامپایل است." + +msgid "When your extension is compiled and installed, start Python and try to import it. This should fail with the following exception:" +msgstr "هنگامی که افزونه‌ی شما کامپایل‌‌شده و نصب شد، پایتون را اجرا کرده و تلاش کنید آن را ایمپورت کنید. این کار باید با خطای زیر مواجه شود:" + +msgid "" +">>> import spam\n" +"Traceback (most recent call last):\n" +" ...\n" +"ImportError: dynamic module does not define module export function (PyModExport_spam or PyInit_spam)" +msgstr "" +">>> import spam\n" +"Traceback (most recent call last):\n" +" ...\n" +"ImportError: dynamic module does not define module export function (PyModExport_spam or PyInit_spam)" + +msgid "Module export hook" +msgstr "قلاب اکسپورت ماژول" + +msgid "The exception you got when you tried to import the module told you that Python is looking for a \"module export function\", also known as a :ref:`module export hook `. Let's define one." +msgstr "استثنایی که هنگام تلاش برای ایمپورت کردن ماژول دریافت کردید به شما گفت که پایتون به دنبال یک «تابع اکسپورت ماژول» می‌گردد که با نام :ref:`قلاب اکسپورت ماژول ` نیز شناخته می‌شود. بیایید یکی را تعریف کنیم." + +msgid "First, add a prototype below the ``#include`` lines:" +msgstr "ابتدا، یک پیش‌نمونه در زیر سطرهای ``#include`` اضافه کنید:" + +msgid "" +"\n" +"PyMODEXPORT_FUNC PyModExport_spam(void);\n" +"\n" +msgstr "" +"\n" +"PyMODEXPORT_FUNC PyModExport_spam(void);\n" +"\n" + +msgid "The prototype is not strictly necessary, but some modern compilers emit warnings without it. It's generally better to add the prototype than to disable the warning." +msgstr "پیش‌نمونه به طور دقیق ضروری نیست، اما برخی از کامپایلرهای مدرن بدون آن هشدارهایی صادر می‌کنند. اضافه کردن پیش‌نمونه عموماً بهتر از غیرفعال کردن هشدار است." + +msgid "The :c:macro:`PyMODEXPORT_FUNC` macro declares the function's return type, and adds any special linkage declarations needed to make the function visible and usable when CPython loads it." +msgstr "کلان‌دستور :c:macro:`PyMODEXPORT_FUNC` نوع بازگشت تابع را اعلام می‌کند و هرگونه اعلام پیوند ویژه‌ای را که برای قابل دیدن و قابل استفاده کردن تابع هنگام بارگذاری آن توسط سی‌پایتون لازم است، اضافه می‌کند." + +msgid "After the prototype, add the function itself. For now, make it return ``NULL``:" +msgstr "پس از پیش‌نمونه، خود تابع را اضافه کنید. فعلاً کاری کنید که ``NULL`` را برگرداند:" + +msgid "" +"PyMODEXPORT_FUNC\n" +"PyModExport_spam(void)\n" +"{\n" +" return NULL;\n" +"}" +msgstr "" +"PyMODEXPORT_FUNC\n" +"PyModExport_spam(void)\n" +"{\n" +" return NULL;\n" +"}" + +msgid "Compile and load the module again. You should get a different error this time." +msgstr "ماژول را دوباره کامپایل و بارگذاری کنید. این بار باید خطای متفاوتی دریافت کنید." + +msgid "" +">>> import spam\n" +"Traceback (most recent call last):\n" +" ...\n" +"SystemError: module export hook for module 'spam' failed without setting an exception" +msgstr "" +">>> import spam\n" +"Traceback (most recent call last):\n" +" ...\n" +"SystemError: module export hook for module 'spam' failed without setting an exception" + +msgid "Simply returning ``NULL`` is *not* correct behavior for an export hook, and CPython complains about it. That's good -- it means that CPython found the function! Let's now make it do something useful." +msgstr "صرفاً برگرداندن ``NULL`` رفتار درستی برای یک قلاب اکسپورت *نیست* و سی‌پایتون از آن شکایت می‌کند. این خوب است -- به این معنی است که سی‌پایتون تابع را پیدا کرده است! حالا بیایید کاری کنیم که کار مفیدی انجام دهد." + +msgid "The slot table" +msgstr "جدول جایگاه" + +msgid "Rather than ``NULL``, the export hook should return the information needed to create a module. Let's start with the basics: the name and docstring." +msgstr "به‌جای ``NULL``، قلاب اکسپورت باید اطلاعات لازم برای ایجاد یک ماژول را برگرداند. بیایید با اصول اولیه شروع کنیم: نام و رشته مستند." + +msgid "The information should be defined in an array of :c:type:`PySlot` entries, which are essentially key-value pairs. Define this array just before your export hook:" +msgstr "اطلاعات باید در آرایه‌ای از ورودی‌های :c:type:`PySlot` تعریف شوند که در واقع جفت‌های کلید-مقدار هستند. این آرایه را درست قبل از قلاب اکسپورت خود تعریف کنید:" + +msgid "" +"PyABIInfo_VAR(abi_info);\n" +"\n" +"static PySlot spam_slots[] = {\n" +" PySlot_STATIC_DATA(Py_mod_abi, &abi_info),\n" +" PySlot_STATIC_DATA(Py_mod_name, \"spam\"),\n" +" PySlot_STATIC_DATA(Py_mod_doc, \"A wonderful module with an example function\"),\n" +" PySlot_END\n" +"};" +msgstr "" +"PyABIInfo_VAR(abi_info);\n" +"\n" +"static PySlot spam_slots[] = {\n" +" PySlot_STATIC_DATA(Py_mod_abi, &abi_info),\n" +" PySlot_STATIC_DATA(Py_mod_name, \"spam\"),\n" +" PySlot_STATIC_DATA(Py_mod_doc, \"A wonderful module with an example function\"),\n" +" PySlot_END\n" +"};" + +msgid "The :c:macro:`PySlot_STATIC_DATA` macro is used when the slot value (here: ``&abi_info``, ``\"spam\"``, and the docstring) is a pointer to constant, statically allocated data." +msgstr "کلان‌دستور :c:macro:`PySlot_STATIC_DATA` زمانی استفاده می‌شود که مقدار جایگاه (اینجا: ``&abi_info``، ``\"spam\"`` و رشته مستند) یک اشاره‌گر به داده‌ی ثابت و تخصیص‌یافته‌ی ایستا باشد." + +msgid "The ``PyABIInfo_VAR(abi_info);`` macro and the :c:data:`Py_mod_abi` slot are a bit of boilerplate that helps prevent extensions compiled for a different version of Python from crashing the interpreter." +msgstr "کلان‌دستور ``PyABIInfo_VAR(abi_info);`` و جایگاه :c:data:`Py_mod_abi` مقداری کد پیش‌ساخته هستند که کمک می‌کنند از کرش کردن مفسر توسط افزونه‌های کامپایل‌شده برای نسخه‌ی متفاوتی از پایتون جلوگیری شود." + +msgid "For both :c:data:`Py_mod_name` and :c:data:`Py_mod_doc`, the values are C strings -- that is, NUL-terminated, UTF-8 encoded byte arrays." +msgstr "برای هر دو :c:data:`Py_mod_name` و :c:data:`Py_mod_doc`، مقادیر رشته‌های C هستند -- یعنی آرایه‌های بایتی پایان‌یافته با NUL و کدگذاری‌شده با UTF-8." + +msgid "Note ``PySlot_END`` sentinel entry at the end. This marks the end of the array. If you forget it, you'll trigger undefined behavior." +msgstr "ورودی نشانگر ``PySlot_END`` را در انتها توجه کنید. این نشان‌دهنده‌ی پایان آرایه است. اگر آن را فراموش کنید، رفتار نامشخصی را فعال خواهید کرد." + +msgid "The array is defined as ``static`` -- that is, not visible outside this ``.c`` file. This will be a common theme. CPython only needs to access the export hook; all global variables and all other functions should generally be ``static``, so that they don't clash with other extensions." +msgstr "این آرایه به صورت ``static`` تعریف می‌شود -- یعنی خارج از این پرونده‌ی ``.c`` قابل مشاهده نیست. این یک روند رایج خواهد بود. سی‌پایتون فقط باید به قلاب اکسپورت دسترسی داشته باشد؛ تمام متغیرهای سراسری و تمام عملکردهای دیگر به‌طور کلی باید ``static`` باشند تا با سایر افزونه‌ها تداخل پیدا نکنند." + +msgid "Return this array from your export hook instead of ``NULL``:" +msgstr "این آرایه را به‌جای ``NULL`` از قلاب (hook) اکسپورت خود برگردانید:" + +msgid "" +"PyMODEXPORT_FUNC\n" +"PyModExport_spam(void)\n" +"{\n" +" return spam_slots;\n" +"}" +msgstr "" +"PyMODEXPORT_FUNC\n" +"PyModExport_spam(void)\n" +"{\n" +" return spam_slots;\n" +"}" + +msgid "Now, recompile and try it out:" +msgstr "اکنون، برنامه را دوباره کامپایل کرده و امتحان کنید:" + +msgid "" +">>> import spam\n" +">>> print(spam)\n" +"" +msgstr "" +">>> import spam\n" +">>> print(spam)\n" +"" + +msgid "You have an extension module! Try ``help(spam)`` to see the docstring." +msgstr "شما یک ماژول توسعه‌ای دارید! برای دیدن رشته مستند (docstring)، عبارت ``help(spam)`` را امتحان کنید." + +msgid "The next step will be adding a function." +msgstr "گام بعدی افزودن یک تابع خواهد بود." + +msgid "Exposing a function" +msgstr "عرضه کردن یک تابع" + +msgid "To expose the :c:func:`system` C function directly to Python, we'll need to write a layer of glue code to convert arguments from Python objects to C values, and the C return value back to Python." +msgstr "برای عرضه‌ی مستقیم تابع C با نام :c:func:`system` به پایتون، باید لایه‌ای از کدهای واسط بنویسیم تا آرگومان‌ها را از اشیاء پایتون به مقادیر C و مقدار برگشتی C را دوباره به پایتون تبدیل کنند." + +msgid "One of the simplest ways to write glue code is a \":c:data:`METH_O`\" function, which takes two Python objects and returns one. All Python objects -- regardless of the Python type -- are represented in C as pointers to the :c:type:`PyObject` structure." +msgstr "یکی از ساده‌ترین راه‌ها برای نوشتن کدهای واسط، تابعی با نماد \":c:data:`METH_O`\" است که دو شیء پایتون را دریافت کرده و یکی را برمی‌گرداند. تمام اشیاء پایتون -- صرف‌نظر از نوع پایتون -- در زبان C به شکل اشاره‌گرهایی به ساختار :c:type:`PyObject` نمایش داده می‌شوند." + +msgid "Add such a function above the slots array::" +msgstr "چنین تابعی را بالای آرایه جایگاه‌ها (slots) اضافه کنید::" + +msgid "" +"static PyObject *\n" +"spam_system(PyObject *self, PyObject *arg)\n" +"{\n" +" Py_RETURN_NONE;\n" +"}" +msgstr "" +"static PyObject *\n" +"spam_system(PyObject *self, PyObject *arg)\n" +"{\n" +" Py_RETURN_NONE;\n" +"}" + +msgid "For now, we ignore the arguments, and use the :c:macro:`Py_RETURN_NONE` macro, which expands to a ``return`` statement that properly returns a Python :py:data:`None` object." +msgstr "فعلاً از آرگومان‌ها صرف‌نظر می‌کنیم و از کلان‌دستور :c:macro:`Py_RETURN_NONE` بهره می‌بریم؛ این کلان‌دستور به یک دستور ``return`` گسترش می‌یابد که به شکل درستی یک شیء :py:data:`None` پایتون را برمی‌گرداند." + +msgid "Recompile your extension to make sure you don't have syntax errors. We haven't yet added ``spam_system`` to the module, so you might get a warning that ``spam_system`` is unused." +msgstr "افزونه‌ی خود را دوباره کامپایل کنید تا مطمئن شوید خطای نحوی ندارید. ما هنوز ``spam_system`` را به ماژول اضافه نکرده‌ایم، بنابراین ممکن است هشداری مبنی بر استفاده‌نشدن از ``spam_system`` دریافت کنید." + +msgid "Method definitions" +msgstr "تعاریف متدها" + +msgid "To expose the C function to Python, you will need to provide several pieces of information in a structure called :c:type:`PyMethodDef` [#why-pymethoddef]_:" +msgstr "برای عرضه‌ی تابع C به پایتون، باید چندین قطعه اطلاعات را در ساختاری به نام :c:type:`PyMethodDef` [#why-pymethoddef]_ فراهم کنید:" + +msgid "``ml_name``: the name of the Python function;" +msgstr "``ml_name``: نام تابع پایتون؛" + +msgid "``ml_doc``: a docstring;" +msgstr "``ml_doc``: یک رشته مستند (docstring)؛" + +msgid "``ml_meth``: the C function to be called; and" +msgstr "``ml_meth``: تابع C که باید فراخوانی شود؛ و" + +msgid "``ml_flags``: a set of flags describing details like how Python arguments are passed to the C function. We'll use :c:data:`METH_O` here -- the flag that matches our ``spam_system`` function's signature." +msgstr "``ml_flags``: مجموعه‌ای از پرچم‌ها (flags) که جزئیاتی مانند نحوه‌ی ارسال آرگومان‌های پایتون به تابع C را توصیف می‌کنند. ما در اینجا از :c:data:`METH_O` استفاده می‌کنیم -- یعنی پرچمی که با امضای تابع ``spam_system`` ما مطابقت دارد." + +msgid "Because modules typically create several functions, these definitions need to be collected in an array, with a zero-filled sentinel at the end. Add this array just below the ``spam_system`` function:" +msgstr "از آنجا که ماژول‌ها معمولاً چندین تابع ایجاد می‌کنند، این تعاریف باید در یک آرایه جمع‌آوری شوند و در انتها یک نشانگر (sentinel) صفر پرشده قرار گیرد. این آرایه را درست در پایین تابع ``spam_system`` اضافه کنید:" + +msgid "" +"\n" +"static PyMethodDef spam_methods[] = {\n" +" {\n" +" .ml_name=\"system\",\n" +" .ml_meth=spam_system,\n" +" .ml_flags=METH_O,\n" +" .ml_doc=\"Execute a shell command.\",\n" +" },\n" +" {NULL, NULL, 0, NULL} /* Sentinel */\n" +"};\n" +"\n" +msgstr "" +"\n" +"static PyMethodDef spam_methods[] = {\n" +" {\n" +" .ml_name=\"system\",\n" +" .ml_meth=spam_system,\n" +" .ml_flags=METH_O,\n" +" .ml_doc=\"Execute a shell command.\",\n" +" },\n" +" {NULL, NULL, 0, NULL} /* Sentinel */\n" +"};\n" +"\n" + +msgid "As with module slots, a zero-filled sentinel marks the end of the array." +msgstr "همانند جایگاه‌های ماژول، یک نشانگر صفرگذاری‌شده پایان آرایه را مشخص می‌کند." + +msgid "Next, we'll add the method to the module. Add a :c:data:`Py_mod_methods` slot to your :c:type:`PyMethodDef` array:" +msgstr "در ادامه، متد را به ماژول اضافه می‌کنیم. یک جایگاه :c:data:`Py_mod_methods` به آرایه‌ی :c:type:`PyMethodDef` خود اضافه کنید:" + +msgid "" +"\n" +"PyABIInfo_VAR(abi_info);\n" +"\n" +"static PySlot spam_slots[] = {\n" +" PySlot_STATIC_DATA(Py_mod_abi, &abi_info),\n" +" PySlot_STATIC_DATA(Py_mod_name, \"spam\"),\n" +" PySlot_STATIC_DATA(Py_mod_doc, \"A wonderful module with an example function\"),\n" +" PySlot_STATIC_DATA(Py_mod_methods, spam_methods),\n" +" PySlot_END\n" +"};\n" +"\n" +msgstr "" +"\n" +"PyABIInfo_VAR(abi_info);\n" +"\n" +"static PySlot spam_slots[] = {\n" +" PySlot_STATIC_DATA(Py_mod_abi, &abi_info),\n" +" PySlot_STATIC_DATA(Py_mod_name, \"spam\"),\n" +" PySlot_STATIC_DATA(Py_mod_doc, \"A wonderful module with an example function\"),\n" +" PySlot_STATIC_DATA(Py_mod_methods, spam_methods),\n" +" PySlot_END\n" +"};\n" +"\n" + +msgid "Recompile your extension again, and test it. Be sure to restart the Python interpreter, so that ``import spam`` picks up the new version of the module." +msgstr "افزونه‌ی خود را مجدداً کامپایل و آن را آزمون کنید. حتماً مفسر پایتون را راه‌اندازی مجدد کنید تا ``import spam`` نسخه‌ی جدید ماژول را بارگذاری کند." + +msgid "You should now be able to call the function:" +msgstr "اکنون باید بتوانید تابع را فراخوانی کنید:" + +msgid "" +">>> import spam\n" +">>> print(spam.system)\n" +"\n" +">>> print(spam.system('whoami'))\n" +"None" +msgstr "" +">>> import spam\n" +">>> print(spam.system)\n" +"\n" +">>> print(spam.system('whoami'))\n" +"None" + +msgid "Note that our ``spam.system`` does not yet run the ``whoami`` command; it only returns ``None``." +msgstr "توجه داشته باشید که ``spam.system`` ما هنوز دستور ``whoami`` را اجرا نمی‌کند؛ بلکه فقط مقدار ``None`` را برمی‌گرداند." + +msgid "Check that the function accepts exactly one argument, as specified by the :c:data:`METH_O` flag:" +msgstr "بررسی کنید که تابع، همان‌طور که با پرچم :c:data:`METH_O` مشخص شده است، دقیقاً یک آرگومان بپذیرد:" + +msgid "" +">>> print(spam.system('too', 'many', 'arguments'))\n" +"Traceback (most recent call last):\n" +" ...\n" +"TypeError: spam.system() takes exactly one argument (3 given)" +msgstr "" +">>> print(spam.system('too', 'many', 'arguments'))\n" +"Traceback (most recent call last):\n" +" ...\n" +"TypeError: spam.system() takes exactly one argument (3 given)" + +msgid "Returning an integer" +msgstr "برگرداندن یک عدد صحیح" + +msgid "Now, let's take a look at the return value. Instead of ``None``, we'll want ``spam.system`` to return a number -- that is, a Python :py:type:`int` object. Eventually this will be the exit code of a system command, but let's start with a fixed value, say, ``3``." +msgstr "اکنون، بیایید نگاهی به مقدار بازگشتی بیندازیم. به‌جای ``None``، می‌خواهیم ``spam.system`` یک عدد -- یعنی یک شیء :py:type:`int` پایتون -- برگرداند. در نهایت این مقدار، کد خروج یک دستور پوسته خواهد بود، اما بیایید با یک مقدار ثابت، مثلاً ``3``، شروع کنیم." + +msgid "The Python C API provides a function to create a Python :py:type:`int` object from a C ``int`` value: :c:func:`PyLong_FromLong`. [#why-pylongfromlong]_" +msgstr "رابط برنامه‌نویسی کاربردی C پایتون تابعی برای ایجاد یک شیء :py:type:`int` پایتون از یک مقدار ``int`` زبان C فراهم می‌کند: :c:func:`PyLong_FromLong`. [#why-pylongfromlong]_" + +msgid "To call it, replace the ``Py_RETURN_NONE`` with the following 3 lines:" +msgstr "برای فراخوانی آن، ``Py_RETURN_NONE`` را با ۳ سطر زیر جایگزین کنید:" + +msgid "" +"static PyObject *\n" +"spam_system(PyObject *self, PyObject *arg)\n" +"{\n" +" int status = 3;\n" +" PyObject *result = PyLong_FromLong(status);\n" +" return result;\n" +"}" +msgstr "" +"static PyObject *\n" +"spam_system(PyObject *self, PyObject *arg)\n" +"{\n" +" int status = 3;\n" +" PyObject *result = PyLong_FromLong(status);\n" +" return result;\n" +"}" + +msgid "Recompile, restart the Python interpreter again, and check that the function now returns 3:" +msgstr "مجدداً کامپایل کنید، مفسر پایتون را راه‌اندازی مجدد کنید و بررسی کنید که تابع اکنون عدد ۳ را برمی‌گرداند:" + +msgid "" +">>> import spam\n" +">>> spam.system('whoami')\n" +"3" +msgstr "" +">>> import spam\n" +">>> spam.system('whoami')\n" +"3" + +msgid "Accepting a string" +msgstr "پذیرش یک رشته" + +msgid "Finally, let's handle the function argument." +msgstr "در نهایت، بیایید آرگومان تابع را مدیریت کنیم." + +msgid "Our C function, :c:func:`!spam_system`, takes two arguments. The first one, ``PyObject *self``, will be set to the ``spam`` module object. This isn't useful in our case, so we'll ignore it." +msgstr "تابع C ما، یعنی :c:func:`!spam_system`، دو آرگومان می‌پذیرد. اولین آرگومان، یعنی ``PyObject *self``، روی شیء ماژول ``spam`` تنظیم خواهد شد. این مورد در سناریوی ما کاربردی ندارد، بنابراین آن را نادیده می‌گیریم." + +msgid "The other one, ``PyObject *arg``, will be set to the object that the user passed from Python. We expect that it should be a Python string. In order to use the information in it, we will need to convert it to a C value -- in this case, a C string (``const char *``)." +msgstr "مورد دیگر، یعنی ``PyObject *arg``، به شیءای که کاربر از پایتون ارسال کرده است تنظیم خواهد شد. انتظار داریم که این شیء یک رشته‌ی پایتون باشد. برای استفاده از اطلاعات موجود در آن، باید آن را به یک مقدار C -- در اینجا، یک رشته‌ی C (``const char *``) -- تبدیل کنیم." + +msgid "There's a slight type mismatch here: Python's :py:class:`str` objects store Unicode text, but C strings are arrays of bytes. So, we'll need to *encode* the data, and we'll use the UTF-8 encoding for it. (UTF-8 might not always be correct for system commands, but it's what :py:meth:`str.encode` uses by default, and the C API has special support for it.)" +msgstr "در اینجا ناسازگاری کوچکی در نوع داده وجود دارد: اشیاء :py:class:`str` در پایتون متن یونیکد را ذخیره می‌کنند، اما رشته‌های C آرایه‌هایی از بایت‌ها هستند. بنابراین، باید داده‌ها را *کدگذاری* (encode) کنیم و برای این کار از کدگذاری UTF-8 استفاده خواهیم کرد. (ممکن است UTF-8 همیشه برای دستورات سیستم درست نباشد، اما همان چیزی است که :py:meth:`str.encode` به‌طور پیش‌فرض استفاده می‌کند و C API پشتیبانی ویژه‌ای از آن دارد.)" + +msgid "The function to encode a Python string into a UTF-8 buffer is named :c:func:`PyUnicode_AsUTF8AndSize` [#why-pyunicodeasutf8]_. Call it like this:" +msgstr "تابع برای کدگذاری یک رشته‌ی پایتون در یک بافر UTF-8 :c:func:`PyUnicode_AsUTF8AndSize` [#why-pyunicodeasutf8]_ نام دارد. آن را به این صورت فراخوانی کنید:" + +msgid "" +"static PyObject *\n" +"spam_system(PyObject *self, PyObject *arg)\n" +"{\n" +" const char *command = PyUnicode_AsUTF8AndSize(arg, NULL);\n" +" int status = 3;\n" +" PyObject *result = PyLong_FromLong(status);\n" +" return result;\n" +"}" +msgstr "" +"static PyObject *\n" +"spam_system(PyObject *self, PyObject *arg)\n" +"{\n" +" const char *command = PyUnicode_AsUTF8AndSize(arg, NULL);\n" +" int status = 3;\n" +" PyObject *result = PyLong_FromLong(status);\n" +" return result;\n" +"}" + +msgid "If :c:func:`PyUnicode_AsUTF8AndSize` is successful, *command* will point to the resulting C string -- a zero-terminated array of bytes [#embedded-nul]_. This buffer is managed by the *arg* object, which means we don't need to free it, but we must follow some rules:" +msgstr "اگر :c:func:`PyUnicode_AsUTF8AndSize` موفقیت‌آمیز باشد، *command* به رشته‌ی C حاصل -- یک آرایه‌ی بایت ختم‌شده با صفر [#embedded-nul]_ -- اشاره خواهد کرد. این بافر توسط شیء *arg* مدیریت می‌شود، به این معنی که نیازی به آزادسازی آن نداریم، اما باید چند قانون را رعایت کنیم:" + +msgid "We should only use the buffer inside the ``spam_system`` function. After ``spam_system`` returns, *arg* and the buffer it manages might be garbage-collected." +msgstr "ما باید فقط از بافر درون تابع ``spam_system`` استفاده کنیم. پس از اینکه ``spam_system`` برگردد، ممکن است *arg* و بافری که مدیریت می‌کند زباله‌روبی (garbage-collected) شوند." + +msgid "We must not modify it. This is why we use ``const``." +msgstr "ما نباید آن را تغییر دهیم. به همین دلیل است که از ``const`` استفاده می‌کنیم." + +msgid "If :c:func:`PyUnicode_AsUTF8AndSize` was *not* successful, it returns a ``NULL`` pointer. When calling *any* Python C API, we always need to handle such error cases. The way to do this in general is left for later chapters of this documentation. For now, be assured that we are already handling errors from :c:func:`PyLong_FromLong` correctly." +msgstr "اگر :c:func:`PyUnicode_AsUTF8AndSize` موفقیت‌آمیز *نباشد*، یک اشاره‌گر ``NULL`` برمی‌گرداند. هنگام فراخوانی *هر* C API پایتون، همیشه باید چنین مواردی از خطا را مدیریت کنیم. روش انجام این کار به‌طور کلی به فصول بعدی این مستندات موکول می‌شود. فعلاً مطمئن باشید که ما در حال حاضر خطاهای :c:func:`PyLong_FromLong` را به درستی مدیریت می‌کنیم." + +msgid "For the :c:func:`PyUnicode_AsUTF8AndSize` call, the correct way to handle errors is returning ``NULL`` from ``spam_system``. Add an ``if`` block for this:" +msgstr "برای فراخوانی :c:func:`PyUnicode_AsUTF8AndSize`، روش صحیح مدیریت خطاها برگرداندن ``NULL`` از ``spam_system`` است. یک بلوک ``if`` برای این کار اضافه کنید:" + +msgid "" +"static PyObject *\n" +"spam_system(PyObject *self, PyObject *arg)\n" +"{\n" +" const char *command = PyUnicode_AsUTF8AndSize(arg);\n" +" if (command == NULL) {\n" +" return NULL;\n" +" }\n" +" int status = 3;\n" +" PyObject *result = PyLong_FromLong(status);\n" +" return result;\n" +"}" +msgstr "" +"static PyObject *\n" +"spam_system(PyObject *self, PyObject *arg)\n" +"{\n" +" const char *command = PyUnicode_AsUTF8AndSize(arg);\n" +" if (command == NULL) {\n" +" return NULL;\n" +" }\n" +" int status = 3;\n" +" PyObject *result = PyLong_FromLong(status);\n" +" return result;\n" +"}" + +msgid "To test that error handling works, compile again, restart Python so that ``import spam`` picks up the new version of your module, and try passing a non-string value to your function:" +msgstr "برای آزمون اینکه مدیریت خطا کار می‌کند، دوباره کامپایل کنید، پایتون را مجدداً راه‌اندازی کنید تا ``import spam`` نسخه‌ی جدید ماژول شما را بارگیری کند، و سعی کنید یک مقدار غیررشته‌ای به تابع خود ارسال کنید:" + +msgid "" +">>> import spam\n" +">>> spam.system(3)\n" +"Traceback (most recent call last):\n" +" ...\n" +"TypeError: bad argument type for built-in operation" +msgstr "" +">>> import spam\n" +">>> spam.system(3)\n" +"Traceback (most recent call last):\n" +" ...\n" +"TypeError: bad argument type for built-in operation" + +msgid "Now, all that is left is calling the C library function :c:func:`system` with the ``char *`` buffer, and using its result instead of the ``3``:" +msgstr "اکنون، تنها چیزی که باقی مانده است فراخوانی تابع کتابخانه‌ی C :c:func:`system` با بافر ``char *`` و استفاده از نتیجه‌ی آن به جای ``3`` است:" + +msgid "" +"static PyObject *\n" +"spam_system(PyObject *self, PyObject *arg)\n" +"{\n" +" const char *command = PyUnicode_AsUTF8AndSize(arg);\n" +" if (command == NULL) {\n" +" return NULL;\n" +" }\n" +" int status = system(command);\n" +" PyObject *result = PyLong_FromLong(status);\n" +" return result;\n" +"}" +msgstr "" +"static PyObject *\n" +"spam_system(PyObject *self, PyObject *arg)\n" +"{\n" +" const char *command = PyUnicode_AsUTF8AndSize(arg);\n" +" if (command == NULL) {\n" +" return NULL;\n" +" }\n" +" int status = system(command);\n" +" PyObject *result = PyLong_FromLong(status);\n" +" return result;\n" +"}" + +msgid "Compile your module, restart Python, and test. This time, you should see your username -- the output of the ``whoami`` system command:" +msgstr "ماژول خود را کامپایل کنید، پایتون را مجدداً راه‌اندازی کنید و آزمون کنید. این بار، باید نام کاربری خود را -- که خروجی دستور سیستمی ``whoami`` است -- ببینید:" + +msgid "" +">>> import spam\n" +">>> result = spam.system('whoami')\n" +"User Name\n" +">>> result\n" +"0" +msgstr "" +">>> import spam\n" +">>> result = spam.system('whoami')\n" +"User Name\n" +">>> result\n" +"0" + +msgid "You can also test with other commands, like ``ls``, ``dir``, or one that doesn't exist:" +msgstr "همچنین می‌توانید با دستورات دیگر، مانند ``ls``، ``dir``، یا دستوری که وجود ندارد، آزمون کنید:" + +msgid "" +">>> import spam\n" +">>> result = spam.system('nonexistent-command')\n" +"sh: line 1: nonexistent-command: command not found\n" +">>> result\n" +"32512" +msgstr "" +">>> import spam\n" +">>> result = spam.system('nonexistent-command')\n" +"sh: line 1: nonexistent-command: command not found\n" +">>> result\n" +"32512" + +msgid "The result" +msgstr "نتیجه" + +msgid "Congratulations! You have written a complete Python C API extension module, and completed this tutorial!" +msgstr "تبریک می‌گوییم! شما یک ماژول توسعه‌ای کامل با C API پایتون نوشته‌اید و این آموزش را به پایان رسانده‌اید!" + +msgid "Here is the entire source file, for your convenience:" +msgstr "برای راحتی شما، کل پرونده‌ی سورس در ادامه آورده شده است:" + +msgid "" +"/// Includes\n" +"\n" +"#include \n" +"#include // for system()\n" +"\n" +"/// Implementation of spam.system\n" +"\n" +"static PyObject *\n" +"spam_system(PyObject *self, PyObject *arg)\n" +"{\n" +" const char *command = PyUnicode_AsUTF8AndSize(arg, NULL);\n" +" if (command == NULL) {\n" +" return NULL;\n" +" }\n" +" int status = system(command);\n" +" PyObject *result = PyLong_FromLong(status);\n" +" return result;\n" +"}\n" +"\n" +"/// Module method table\n" +"\n" +"static PyMethodDef spam_methods[] = {\n" +" {\n" +" .ml_name=\"system\",\n" +" .ml_meth=spam_system,\n" +" .ml_flags=METH_O,\n" +" .ml_doc=\"Execute a shell command.\",\n" +" },\n" +" {NULL, NULL, 0, NULL} /* Sentinel */\n" +"};\n" +"\n" +"/// Module slot table\n" +"\n" +"PyABIInfo_VAR(abi_info);\n" +"\n" +"static PySlot spam_slots[] = {\n" +" PySlot_STATIC_DATA(Py_mod_abi, &abi_info),\n" +" PySlot_STATIC_DATA(Py_mod_name, \"spam\"),\n" +" PySlot_STATIC_DATA(Py_mod_doc, \"A wonderful module with an example function\"),\n" +" PySlot_STATIC_DATA(Py_mod_methods, spam_methods),\n" +" PySlot_END\n" +"};\n" +"\n" +"/// Export hook prototype\n" +"\n" +"PyMODEXPORT_FUNC PyModExport_spam(void);\n" +"\n" +"/// Module export hook\n" +"\n" +"PyMODEXPORT_FUNC\n" +"PyModExport_spam(void)\n" +"{\n" +" return spam_slots;\n" +"}\n" +msgstr "" +"/// Includes\n" +"\n" +"#include \n" +"#include // for system()\n" +"\n" +"/// Implementation of spam.system\n" +"\n" +"static PyObject *\n" +"spam_system(PyObject *self, PyObject *arg)\n" +"{\n" +" const char *command = PyUnicode_AsUTF8AndSize(arg, NULL);\n" +" if (command == NULL) {\n" +" return NULL;\n" +" }\n" +" int status = system(command);\n" +" PyObject *result = PyLong_FromLong(status);\n" +" return result;\n" +"}\n" +"\n" +"/// Module method table\n" +"\n" +"static PyMethodDef spam_methods[] = {\n" +" {\n" +" .ml_name=\"system\",\n" +" .ml_meth=spam_system,\n" +" .ml_flags=METH_O,\n" +" .ml_doc=\"Execute a shell command.\",\n" +" },\n" +" {NULL, NULL, 0, NULL} /* Sentinel */\n" +"};\n" +"\n" +"/// Module slot table\n" +"\n" +"PyABIInfo_VAR(abi_info);\n" +"\n" +"static PySlot spam_slots[] = {\n" +" PySlot_STATIC_DATA(Py_mod_abi, &abi_info),\n" +" PySlot_STATIC_DATA(Py_mod_name, \"spam\"),\n" +" PySlot_STATIC_DATA(Py_mod_doc, \"A wonderful module with an example function\"),\n" +" PySlot_STATIC_DATA(Py_mod_methods, spam_methods),\n" +" PySlot_END\n" +"};\n" +"\n" +"/// Export hook prototype\n" +"\n" +"PyMODEXPORT_FUNC PyModExport_spam(void);\n" +"\n" +"/// Module export hook\n" +"\n" +"PyMODEXPORT_FUNC\n" +"PyModExport_spam(void)\n" +"{\n" +" return spam_slots;\n" +"}\n" + +msgid "Appendix: Other build tools" +msgstr "پیوست: سایر ابزارهای ساخت" + +msgid "You should be able to follow this tutorial -- except the *Running your build tool* section itself -- with a build tool other than ``meson-python``." +msgstr "شما باید بتوانید این خودآموز را — به جز خود بخش *Running your build tool* — با ابزار ساختی به غیر از ``meson-python`` دنبال کنید." + +msgid "The Python Packaging User Guide has a `list of recommended tools `_; be sure to choose one for the C language." +msgstr "«راهنمای کاربر بسته‌بندی پایتون» دارای یک `فهرست از ابزارهای توصیه‌شده `_ است؛ حتماً یکی را برای زبان C انتخاب کنید." + +msgid "Workaround for missing PyInit function" +msgstr "راه‌حل موقت برای تابع PyInit گمشده" + +msgid "If your build tool output complains about missing ``PyInit_spam``, add the following function to your module for now:" +msgstr "اگر خروجی ابزار ساخت شما از گم شدن ``PyInit_spam`` گله می‌کند، فعلاً تابع زیر را به ماژول خود اضافه کنید:" + +msgid "" +"// A workaround\n" +"void *PyInit_spam(void) { return NULL; }" +msgstr "" +"// A workaround\n" +"void *PyInit_spam(void) { return NULL; }" + +msgid "This is a shim for an old-style :ref:`initialization function `, which was required in extension modules for CPython 3.14 and below. Current CPython does not need it, but some build tools may still assume that all extension modules need to define it." +msgstr "این یک لایه (shim) برای :ref:`تابع مقداردهی اولیه‌ی ` سبک قدیم است که در ماژول‌های توسعه‌ای برای سی‌پایتون نسخه‌ی ۳.۱۴ و پایین‌تر الزامی بود. سی‌پایتون فعلی به آن نیازی ندارد، اما برخی از ابزارهای ساخت ممکن است همچنان فرض کنند که تمام ماژول‌های توسعه‌ای باید آن را تعریف کنند." + +msgid "If you use this workaround, you will get the exception ``SystemError: initialization of spam failed without raising an exception`` instead of ``ImportError: dynamic module does not define module export function``." +msgstr "اگر از این راه‌حل موقت استفاده کنید، به جای ``ImportError: dynamic module does not define module export function``، استثنای ``SystemError: initialization of spam failed without raising an exception`` را دریافت خواهید کرد." + +msgid "Compiling directly" +msgstr "کامپایل مستقیم" + +msgid "Using a third-party build tool is heavily recommended, as it will take care of various details of your platform and Python installation, of naming the resulting extension, and, later, of distributing your work." +msgstr "استفاده از یک ابزار ساخت شخص ثالث بسیار توصیه می‌شود، زیرا به جزئیات مختلف پلتفرم و نصب پایتون شما، نام‌گذاری اکستنشن حاصل و بعداً توزیع کار شما رسیدگی می‌کند." + +msgid "If you are building an extension for as *specific* system, or for yourself only, you might instead want to run your compiler directly. The way to do this is system-specific; be prepared for issues you will need to solve yourself." +msgstr "اگر در حال ساخت یک اکستنشن برای یک سیستم *خاص* هستید، یا فقط برای خودتان، ممکن است بخواهید مستقیماً کامپایلر خود را اجرا کنید. نحوه‌ی انجام این کار سیستم‌محور است؛ برای مشکلاتی که باید خودتان حل کنید آماده باشید." + +msgid "Linux" +msgstr "لینوکس" + +msgid "On Linux, the Python development package may include a ``python3-config`` command that prints out the required compiler flags. If you use it, check that it corresponds to the CPython interpreter you'll use to load the module. Then, start with the following command:" +msgstr "روی لینوکس، بسته‌ی توسعه‌ی پایتون ممکن است شامل دستوری به نام ``python3-config`` باشد که پرچم‌های لازم کامپایلر را چاپ می‌کند. اگر از آن استفاده می‌کنید، بررسی کنید که با مفسر سی‌پایتونی که برای بارگذاری ماژول استفاده خواهید کرد مطابقت داشته باشد. سپس با دستور زیر شروع کنید:" + +msgid "gcc --shared $(python3-config --cflags --ldflags) spammodule.c -o spam.so" +msgstr "gcc --shared $(python3-config --cflags --ldflags) spammodule.c -o spam.so" + +msgid "This should generate a ``spam.so`` file that you need to put in a directory on :py:attr:`sys.path`." +msgstr "این کار باید پرونده‌ای به نام ``spam.so`` تولید کند که لازم است آن را در پوشه‌ای روی :py:attr:`sys.path` قرار دهید." + +msgid "Footnotes" +msgstr "پاورقی‌ها" + +msgid "``spam`` is the favorite food of Monty Python fans..." +msgstr "``spam`` غذای محبوب طرفداران مونتی پایتون است..." + +msgid "The source file name is entirely up to you, though some tools can be picky about the ``.c`` extension. This tutorial uses the traditional ``*module.c`` suffix. Some people would just use :file:`spam.c` to implement a module named ``spam``, projects where Python isn't the primary language might use ``py_spam.c``, and so on." +msgstr "نام پرونده‌ی سورس کاملاً به خود شما بستگی دارد، گرچه برخی ابزارها ممکن است در مورد پسوند ``.c`` سخت‌گیر باشند. این خودآموز از پسوند سنتی ``*module.c`` استفاده می‌کند. برخی افراد ممکن است به سادگی از :file:`spam.c` برای پیاده‌سازی ماژولی به نام ``spam`` استفاده کنند، پروژه‌هایی که پایتون زبان اصلی آن‌ها نیست ممکن است از ``py_spam.c`` استفاده کنند و غیره." + +msgid "Including :file:`stdlib.h` is technically not necessary, since :file:`Python.h` includes it and :ref:`several other standard headers ` for its own use or for backwards compatibility. However, it is good practice to explicitly include what you need." +msgstr "گنجاندن :file:`stdlib.h` از نظر فنی ضروری نیست؛ زیرا :file:`Python.h` آن را به همراه :ref:`چندین سرآیند استاندارد دیگر ` برای استفاده‌ی خود یا سازگاری با نسخه‌های پیشین فراخوانی می‌کند. با این حال، شیوه‌ی نیکو آن است که آنچه را نیاز دارید به‌طور صریح اضافه کنید." + +msgid "The :c:type:`!PyMethodDef` structure is also used to create methods of classes, so there's no separate \":c:type:`!PyFunctionDef`\"." +msgstr "ساختار :c:type:`!PyMethodDef` همچنین برای ایجاد متدهای کلاس‌ها استفاده می‌شود، بنابراین ساختار جداگانه‌ای به نام \":c:type:`!PyFunctionDef`\" وجود ندارد." + +msgid "The name :c:func:`PyLong_FromLong` might not seem obvious. ``PyLong`` refers to a the Python :py:class:`int`, which was originally called ``long``; the ``FromLong`` refers to the C ``long`` (or ``long int``) type." +msgstr "نام :c:func:`PyLong_FromLong` ممکن است واضح به نظر نرسد. ``PyLong`` به :py:class:`int` پایتون اشاره دارد که در اصل ``long`` نامیده می‌شد؛ عبارت ``FromLong`` به نوع ``long`` (یا ``long int``) در زبان C اشاره دارد." + +msgid "Here, ``PyUnicode`` refers to the original name of the Python :py:class:`str` class: ``unicode``." +msgstr "در اینجا، ``PyUnicode`` به نام اصلی کلاس :py:class:`str` در پایتون اشاره دارد: ``unicode``." + +msgid "The ``AndSize`` part of the name refers to the fact that this function can also retrieve the size of the buffer, using an output argument. We don't need this, so we set the second argument to NULL." +msgstr "بخش ``AndSize`` از نام به این واقعیت اشاره دارد که این تابع همچنین می‌تواند با استفاده از یک آرگومان خروجی، اندازه‌ی بافر را بازیابی کند. ما به این مورد نیازی نداریم، بنابراین آرگومان دوم را روی NULL تنظیم می‌کنیم." + +msgid "We're ignoring the fact that Python strings can also contain NUL bytes, which terminate a C string. In other words, our function will treat ``spam.system(\"foo\\0bar\")`` as ``spam.system(\"foo\")``. This possibility can lead to security issues, so the real ``os.system`` function size checks for this case and raises an error." +msgstr "ما این حقیقت را نادیده می‌گیریم که رشته‌های پایتون می‌توانند حاوی بایت‌های NUL نیز باشند که یک رشته‌ی C را پایان می‌دهند. به عبارت دیگر، تابع ما عبارت ``spam.system(\"foo\\0bar\")`` را به شکل ``spam.system(\"foo\")`` در نظر خواهد گرفت. این احتمال می‌تواند به مشکلات امنیتی منجر شود، بنابراین تابع واقعی ``os.system`` اندازه‌ی بافر را برای این مورد بررسی کرده و خطایی را صادر می‌کند." diff --git a/extending/index.po b/extending/index.po index d81bcf1d..ae01b805 100644 --- a/extending/index.po +++ b/extending/index.po @@ -6,12 +6,13 @@ # Translators: # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 00:52+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -24,8 +25,8 @@ msgstr "" msgid "Extending and Embedding the Python Interpreter" msgstr "توسعه و تعبیه مفسر پایتون" -msgid "This document describes how to write modules in C or C++ to extend the Python interpreter with new modules. Those modules can not only define new functions but also new object types and their methods. The document also describes how to embed the Python interpreter in another application, for use as an extension language. Finally, it shows how to compile and link extension modules so that they can be loaded dynamically (at run time) into the interpreter, if the underlying operating system supports this feature." -msgstr "این سند توضیح می‌دهد که چگونه می‌توان ماژول‌هایی به زبان C یا C++ نوشت تا مفسر پایتون با ماژول‌های جدید توسعه یابد. این ماژول‌ها نه‌تنها توابع جدید، بلکه نوع‌های جدید شیء و متدهای آن‌ها را نیز می‌توانند تعریف کنند. این سند همچنین توضیح می‌دهد که چگونه می‌توان مفسر پایتون را در برنامه‌ای دیگر تعبیه کرد تا به‌عنوان یک زبان توسعه‌ای از آن استفاده شود. در نهایت، نشان می‌دهد که چگونه می‌توان ماژول‌های توسعه‌ای را کامپایل و پیوند داد تا در صورت پشتیبانی سیستم‌عامل زیرین از این قابلیت، به‌صورت پویا (در زمان اجرا) در مفسر بارگذاری شوند." +msgid "This document describes how to write modules in C or C++ to extend the Python interpreter with new modules. Those modules can do what Python code does -- define functions, object types and methods -- but also interact with native libraries or achieve better performance by avoiding the overhead of an interpreter. The document also describes how to embed the Python interpreter in another application, for use as an extension language. Finally, it shows how to compile and link extension modules so that they can be loaded dynamically (at run time) into the interpreter, if the underlying operating system supports this feature." +msgstr "این سند شرح می‌دهد که چگونه ماژول‌هایی به زبان C یا C++ بنویسید تا مفسر پایتون را با ماژول‌های جدید توسعه دهید. آن ماژول‌ها می‌توانند کارهایی را که کدهای پایتون انجام می‌دهند -- مانند تعریف توابع، انواع داده‌ی اشیاء و متدها -- انجام دهند، و همچنین با کتابخانه‌های بومی تعامل داشته باشند یا با اجتناب از سربار مفسر، کارایی بهتری به دست آورند. این سند همچنین نحوهی تعبیه‌سازی مفسر پایتون را در برنامه‌ای دیگر، برای استفاده به عنوان یک زبان افزونه، شرح می‌دهد. در نهایت، نشان می‌دهد که چگونه ماژول‌های توسعه‌ای را کامپایل و پیوند (link) دهید تا در صورت پشتیبانی سیستم‌عامل زیربنایی، بتوانند به صورت پویا (در زمان اجرا) در مفسر بارگذاری شوند." msgid "This document assumes basic knowledge about C and Python. For an informal introduction to Python, see :ref:`tutorial-index`. :ref:`reference-index` gives a more formal definition of the language. :ref:`builtins-index` documents the built-in functions and object types, and :ref:`library-index` documents the modules (both built-in and written in Python) that give the language its wide application range." msgstr "این سند دانش پایه‌ای درباره C و Python را فرض می‌کند. برای مقدمه‌ی غیررسمی به Python، به :ref:`tutorial-index` مراجعه کنید. :ref:`reference-index` تعریفی رسمی‌تر از زبان ارائه می‌دهد. :ref:`builtins-index` توابع و انواع شیء توکار را مستند می‌کند، و :ref:`library-index` ماژول‌ها (هر دو توکار و نوشته شده در Python) را که به زبان طیف وسیعی از کاربردها می‌دهند، مستند می‌کند." @@ -33,23 +34,62 @@ msgstr "این سند دانش پایه‌ای درباره C و Python را ف msgid "For a detailed description of the whole Python/C API, see the separate :ref:`c-api-index`." msgstr "برای شرح دقیق کل Python/C API، به :ref:`c-api-index` جداگانه مراجعه کنید." +msgid "To support extensions, Python's C API (Application Programmers Interface) defines a set of functions, macros and variables that provide access to most aspects of the Python run-time system. The Python API is incorporated in a C source file by including the header ``\"Python.h\"``." +msgstr "برای پشتیبانی از افزونه‌ها، API زبان C در پایتون (رابط برنامه‌نویسی کاربردی) مجموعه‌ای از توابع، ماکروها و متغیرها را تعریف می‌کند که دسترسی به بیشتر جنبه‌های سیستم زمان اجرای پایتون را فراهم می‌کنند. API پایتون با گنجاندن سرآیند ``\"Python.h\"`` در یک پرونده‌ی سورس C گنجانده می‌شود." + +msgid "The C extension interface is specific to CPython, and extension modules do not work on other Python implementations. In many cases, it is possible to avoid writing C extensions and preserve portability to other implementations. For example, if your use case is calling C library functions or system calls, you should consider using the :mod:`ctypes` module or the `cffi `_ library rather than writing custom C code. These modules let you write Python code to interface with C code and are more portable between implementations of Python than writing and compiling a C extension module." +msgstr "رابط افزونه‌ی C مختص CPython است و ماژول‌های توسعه‌ای روی سایر پیاده‌سازی‌های پایتون کار نمی‌کنند. در بسیاری از موارد، اجتناب از نوشتن افزونه‌های C و حفظ قابلیت حمل به سایر پیاده‌سازی‌ها امکان‌پذیر است. برای مثال، اگر مورد استفاده‌ی شما فراخوانی عملکردهای کتابخانه‌ی C یا فرایندهای سیستمی است، باید به‌جای نوشتن کد سفارشی C، استفاده از ماژول :mod:`ctypes` یا کتابخانه‌ی `cffi `_ را در نظر بگیرید. این ماژول‌ها به شما اجازه می‌دهند کدهای پایتون را برای ارتباط با کدهای C بنویسید و نسبت به نوشتن و کامپایل کردن یک ماژول توسعه‌ی C، قابلیت حمل بالاتری بین پیاده‌سازی‌های مختلف پایتون دارند." + msgid "Recommended third party tools" msgstr "ابزارهای شخص ثالث توصیه‌شده" -msgid "This guide only covers the basic tools for creating extensions provided as 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 "این راهنما تنها ابزارهای پایه‌ای را پوشش می‌دهد که به‌عنوان بخشی از این نسخه از سی‌پایتون برای ایجاد افزونه‌ها ارائه شده‌اند. برخی از :ref:`ابزارهای شخص ثالث ` رویکردهایی هم ساده‌تر و هم پیشرفته‌تر برای ایجاد افزونه‌های C و C++ برای پایتون ارائه می‌دهند." +msgid "This document only covers the basic tools for creating extensions provided as 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 "این سند تنها ابزارهای پایه‌ای را برای ایجاد افزونه‌های ارائه‌شده به عنوان بخشی از این نسخه‌ی سی‌پایتون پوشش می‌دهد. برخی از :ref:`ابزارهای شخص ثالث ` رویکردهای ساده‌تر و پیشرفته‌تری را برای ایجاد افزونه‌های C و C++ برای پایتون ارائه می‌دهند." + +msgid "While this document is aimed at extension authors, it should also be helpful to the authors of such tools. For example, the tutorial module can serve as a simple test case for a build tool or sample expected output of a code generator." +msgstr "اگرچه این سند برای نویسندگان افزونه‌ها در نظر گرفته شده است، اما باید برای نویسندگان چنین ابزارهایی نیز مفید باشد. برای مثال، ماژول آموزشی می‌تواند به‌عنوان یک آزمون ساده برای یک ابزار ساخت یا نمونه خروجی مورد انتظار یک تولیدگر کد عمل کند." + +msgid "C API Tutorial" +msgstr "آموزش API زبان C" -msgid "Creating extensions without third party tools" -msgstr "ایجاد توسعه‌ها بدون ابزارهای شخص ثالث" +msgid "This tutorial describes how to write a simple module in C or C++, using the Python C API -- that is, using the basic tools provided as part of this version of CPython." +msgstr "این آموزش نحوه‌ی نوشتن یک ماژول ساده به زبان C یا C++ را با استفاده از API C پایتون شرح می‌دهد — یعنی با استفاده از ابزارهای پایه‌ای که به عنوان بخشی از این نسخه از CPython ارائه شده‌اند." + +msgid ":ref:`first-extension-module`" +msgstr ":ref:`first-extension-module`" + +msgid "Guides for intermediate topics" +msgstr "راهنماهایی برای مباحث متوسط" 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 those tools, rather than being a recommended way to create your own C extensions." msgstr "این بخش از راهنما به ایجاد توسعه‌های C و C++ بدون کمک گرفتن از ابزارهای شخص ثالث می‌پردازد. این بخش در درجه‌ی اول برای سازندگان آن ابزارها در نظر گرفته شده است، نه اینکه روش توصیه‌شده‌ای برای ایجاد توسعه‌های C خودتان باشد." -msgid ":pep:`489` -- Multi-phase extension module initialization" -msgstr ":pep:`489` -- مقداردهی اولیه‌ی چندمرحله‌ای ماژول توسعه‌ای" +msgid ":ref:`extending-intro`" +msgstr ":ref:`extending-intro`" + +msgid ":ref:`defining-new-types`" +msgstr ":ref:`defining-new-types`" + +msgid ":ref:`new-types-topics`" +msgstr ":ref:`new-types-topics`" + +msgid ":ref:`building`" +msgstr ":ref:`building`" + +msgid ":ref:`building-on-windows`" +msgstr ":ref:`building-on-windows`" msgid "Embedding the CPython runtime in a larger application" msgstr "تعبیه ران‌تایم سی‌پایتون در برنامه‌ای بزرگ‌تر" msgid "Sometimes, rather than creating an extension that runs inside the Python interpreter as the main application, it is desirable to instead embed the CPython runtime inside a larger application. This section covers some of the details involved in doing that successfully." msgstr "گاهی، به‌جای ایجاد افزونه‌ای که درون مفسر پایتون به‌عنوان برنامه اصلی اجرا می‌شود، مطلوب است که ران‌تایم سی‌پایتون درون برنامه‌ای بزرگ‌تر تعبیه شود. این بخش برخی از جزئیات مربوط به انجام موفقیت‌آمیز این کار را در بر می‌گیرد." + +msgid ":ref:`embedding`" +msgstr ":ref:`embedding`" + +#~ msgid "Creating extensions without third party tools" +#~ msgstr "ایجاد توسعه‌ها بدون ابزارهای شخص ثالث" + +#~ msgid ":pep:`489` -- Multi-phase extension module initialization" +#~ msgstr ":pep:`489` -- مقداردهی اولیه‌ی چندمرحله‌ای ماژول توسعه‌ای" diff --git a/extending/newtypes.po b/extending/newtypes.po index d299373e..13f907ba 100644 --- a/extending/newtypes.po +++ b/extending/newtypes.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 10:51+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -814,6 +815,9 @@ msgstr "مستندات ماژول :mod:`weakref`." msgid "For an object to be weakly referenceable, the extension type must set the ``Py_TPFLAGS_MANAGED_WEAKREF`` bit of the :c:member:`~PyTypeObject.tp_flags` field. The legacy :c:member:`~PyTypeObject.tp_weaklistoffset` field should be left as zero." msgstr "برای اینکه بتوان به یک شیء ارجاع ضعیف داد، نوع توسعه‌ای باید بیت ``Py_TPFLAGS_MANAGED_WEAKREF`` را در فیلد :c:member:`~PyTypeObject.tp_flags` تنظیم کند. فیلد قدیمی :c:member:`~PyTypeObject.tp_weaklistoffset` باید صفر باقی بماند." +msgid "If this flag is set, :c:macro:`Py_TPFLAGS_HAVE_GC` should also be set." +msgstr "اگر این پرچم تنظیم شده باشد، :c:macro:`Py_TPFLAGS_HAVE_GC` نیز باید تنظیم شود." + msgid "Concretely, here is how the statically declared type object would look::" msgstr "به‌طور مشخص، شیء نوعِ به‌صورت ایستا اعلان‌شده به این شکل خواهد بود::" diff --git a/faq/design.po b/faq/design.po index 27f26e45..d1c364cc 100644 --- a/faq/design.po +++ b/faq/design.po @@ -8,12 +8,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 13:33+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -377,8 +378,8 @@ msgstr "فهرست‌ها و تاپل‌ها، با وجود شباهت‌های msgid "Lists, on the other hand, are more like arrays in other languages. They tend to hold a varying number of objects all of which have the same type and which are operated on one-by-one. For example, :func:`os.listdir('.') ` returns a list of strings representing the files in the current directory. Functions which operate on this output would generally not break if you added another file or two to the directory." msgstr "از سوی دیگر، فهرست‌ها بیشتر به آرایه‌ها در زبان‌های دیگر شبیه‌اند. آن‌ها معمولاً تعداد متغیری از شیءها را نگه می‌دارند که همگی نوع یکسانی دارند و یکی‌یکی روی آن‌ها عمل می‌شود. برای مثال، :func:`os.listdir('.') ` فهرستی از رشته‌ها را برمی‌گرداند که پرونده‌های پوشه جاری را نشان می‌دهند. توابعی که روی این خروجی عمل می‌کنند، معمولاً اگر یک یا دو پرونده دیگر به پوشه اضافه کنید، از کار نمی‌افتند." -msgid "Tuples are immutable, meaning that once a tuple has been created, you can't replace any of its elements with a new value. Lists are mutable, meaning that you can always change a list's elements. Only immutable elements can be used as dictionary keys, and hence only tuples and not lists can be used as keys." -msgstr "تاپل‌ها تغییرناپذیر هستند، به این معنا که پس از ایجاد یک تاپل، نمی‌توانید هیچ‌یک از عناصر آن را با مقدار جدیدی جایگزین کنید. فهرست‌ها تغییرپذیر هستند، به این معنا که همیشه می‌توانید عناصر یک فهرست را تغییر دهید. فقط عناصر تغییرناپذیر می‌توانند به‌عنوان کلیدهای دیکشنری استفاده شوند، و بنابراین فقط تاپل‌ها و نه فهرست‌ها می‌توانند به‌عنوان کلید استفاده شوند." +msgid "Tuples are :term:`immutable`, meaning that once a tuple has been created, you can't replace any of its elements with a new value. Lists are :term:`mutable`, meaning that you can always change a list's elements. Only :term:`hashable` objects can be used as dictionary keys. Most immutable types are hashable, which is why tuples, but not lists, can be used as keys. Note, however, that a tuple is only hashable if all of its elements are hashable." +msgstr "تاپل‌ها :term:`تغییرناپذیر ` هستند، به این معنا که پس از ایجاد یک تاپل، نمی‌توانید هیچ‌یک از عناصر آن را با مقدار جدیدی جایگزین کنید. فهرست‌ها :term:`تغییرپذیر ` هستند، یعنی همیشه می‌توانید عناصر یک فهرست را تغییر دهید. فقط اشیاء :term:`هش‌پذیر ` می‌توانند به عنوان کلیدهای دیکشنری استفاده شوند. بیشتر انواع تغییرناپذیر هش‌پذیر هستند، و به همین دلیل است که تاپل‌ها (اما نه فهرست‌ها) می‌توانند به عنوان کلید استفاده شوند. با این حال، توجه داشته باشید که یک تاپل تنها زمانی هش‌پذیر است که تمام عناصر آن هش‌پذیر باشند." msgid "How are lists implemented in CPython?" msgstr "فهرست‌ها در CPython چگونه پیاده‌سازی شده‌اند؟" diff --git a/faq/general.po b/faq/general.po index af4d8b87..e4c96302 100644 --- a/faq/general.po +++ b/faq/general.po @@ -8,12 +8,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 00:52+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -128,8 +129,8 @@ msgstr "پسوند نسخه‌ی نامزد انتشار، \"rcN\" است که msgid "In other words, all versions labeled *2.0aN* precede the versions labeled *2.0bN*, which precede versions labeled *2.0rcN*, and *those* precede 2.0." msgstr "به عبارت دیگر، همه‌ی نسخه‌های دارای برچسب *2.0aN* بر نسخه‌های دارای برچسب *2.0bN* مقدم‌اند، که بر نسخه‌های دارای برچسب *2.0rcN* مقدم‌اند، و *آن‌ها* بر 2.0 مقدم‌اند." -msgid "You may also find version numbers with a \"+\" suffix, e.g. \"2.2+\". These are unreleased versions, built directly from the CPython development repository. In practice, after a final minor release is made, the version is incremented to the next minor version, which becomes the \"a0\" version, e.g. \"2.4a0\"." -msgstr "ممکن است همچنین شماره نسخه‌هایی را با پسوند «+» ببینید، مثلاً «2.2+». این‌ها نسخه‌های منتشرنشده هستند که مستقیماً از مخزن توسعه CPython ساخته شده‌اند. در عمل، پس از انجام یک انتشار فرعی نهایی، شماره نسخه به نسخه فرعی بعدی افزایش می‌یابد که به‌عنوان نسخه «a0» شناخته می‌شود، مثلاً «2.4a0»." +msgid "You may also find version numbers with a \"+dev\" suffix, such as \"3.15.0b3+dev\". These are unreleased versions, built directly from the CPython development repository. After the first beta release is made, the version is incremented to the next feature version, which becomes the \"a0\" version, such as \"3.16.0a0\"." +msgstr "همچنین ممکن است شماره‌نسخه‌هایی را با پسوند «+dev» مشاهده کنید، مانند «3.15.0b3+dev». این‌ها نسخه‌های منتشرنشده‌ای هستند که مستقیماً از مخزن توسعه‌ی سی‌پایتون ساخته شده‌اند. پس از انتشار نخستین نسخه‌ی بتا، شماره‌نسخه به نسخه‌ی ویژگی بعدی ارتقا می‌یابد که به نسخه‌ی «a0» تبدیل می‌شود، مانند «3.16.0a0»." msgid "See the `Developer's Guide `__ for more information about the development cycle, and :pep:`387` to learn more about Python's backward compatibility policy. See also the documentation for :data:`sys.version`, :data:`sys.hexversion`, and :data:`sys.version_info`." msgstr "برای اطلاعات بیشتر درباره چرخه توسعه، `راهنمای توسعه‌دهنده `__ و برای آشنایی بیشتر با سیاست سازگاری با نسخه‌های پیشین پایتون، :pep:`387` را ببینید. همچنین مستندات :data:`sys.version`، :data:`sys.hexversion` و :data:`sys.version_info` را ببینید." diff --git a/faq/programming.po b/faq/programming.po index 24fee879..88c05a0c 100644 --- a/faq/programming.po +++ b/faq/programming.po @@ -8,13 +8,14 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" -"PO-Revision-Date: 2026-09-14 09:35+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 20:25+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" @@ -2205,7 +2206,7 @@ msgid "Detecting optional arguments can be tricky when ``None`` is a valid input msgstr "تشخیص آرگومان‌های اختیاری می‌تواند زمانی که ``None`` یک مقدار ورودی معتبر است، دشوار باشد. در این شرایط، می‌توانید یک شیء نشانگر تک‌نمونه (singleton sentinel object) ایجاد کنید که متمایز بودن آن از سایر اشیاء تضمین شده است. برای مثال، در اینجا نحوه‌ی پیاده‌سازی متدی که مانند :meth:`dict.pop` رفتار می‌کند آمده است:" msgid "" -"_sentinel = object()\n" +"_sentinel = sentinel('_sentinel')\n" "\n" "def pop(self, key, default=_sentinel):\n" " if key in self:\n" @@ -2216,7 +2217,7 @@ msgid "" " raise KeyError(key)\n" " return default" msgstr "" -"_sentinel = object()\n" +"_sentinel = sentinel('_sentinel')\n" "\n" "def pop(self, key, default=_sentinel):\n" " if key in self:\n" diff --git a/glossary-searcher/site/app.js b/glossary-searcher/site/app.js index a5b22084..4287b309 100644 --- a/glossary-searcher/site/app.js +++ b/glossary-searcher/site/app.js @@ -106,9 +106,9 @@ function githubContributingDocumentLink(kind, term){ if (kind === 'report'){ // translation bugs - return "https://github.com/python/python-docs-fa/blob/3.14/CONTRIBUTING.md#%DA%AF%D8%B2%D8%A7%D8%B1%D8%B4-%D8%A7%D8%B4%DA%A9%D8%A7%D9%84-%D8%AF%D8%B1-%D8%AA%D8%B1%D8%AC%D9%85%D9%87"; + return "https://github.com/python/python-docs-fa/blob/3.15/CONTRIBUTING.md#%DA%AF%D8%B2%D8%A7%D8%B1%D8%B4-%D8%A7%D8%B4%DA%A9%D8%A7%D9%84-%D8%AF%D8%B1-%D8%AA%D8%B1%D8%AC%D9%85%D9%87"; } else { - return "https://github.com/python/python-docs-fa/blob/3.14/CONTRIBUTING.md#%D8%A7%D9%81%D8%B2%D9%88%D8%AF%D9%86-%D9%88%D8%A7%DA%98%D9%87-%DB%8C%D8%A7-%D8%A7%D8%B5%D8%B7%D9%84%D8%A7%D8%AD-%D8%AC%D8%AF%DB%8C%D8%AF-%D8%A8%D9%87-%D9%88%D8%A7%DA%98%D9%87%E2%80%8C%D9%86%D8%A7%D9%85%D9%87"; + return "https://github.com/python/python-docs-fa/blob/3.15/CONTRIBUTING.md#%D8%A7%D9%81%D8%B2%D9%88%D8%AF%D9%86-%D9%88%D8%A7%DA%98%D9%87-%DB%8C%D8%A7-%D8%A7%D8%B5%D8%B7%D9%84%D8%A7%D8%AD-%D8%AC%D8%AF%DB%8C%D8%AF-%D8%A8%D9%87-%D9%88%D8%A7%DA%98%D9%87%E2%80%8C%D9%86%D8%A7%D9%85%D9%87"; } } diff --git a/howto/a-conceptual-overview-of-asyncio.po b/howto/a-conceptual-overview-of-asyncio.po index e9e4e746..6d5a85cd 100644 --- a/howto/a-conceptual-overview-of-asyncio.po +++ b/howto/a-conceptual-overview-of-asyncio.po @@ -5,12 +5,13 @@ # # Translators: # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 12:56+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: none\n" @@ -20,8 +21,8 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 3.6\n" -msgid "A Conceptual Overview of :mod:`!asyncio`" -msgstr "مروری مفهومی بر :mod:`!asyncio`" +msgid "A conceptual overview of :mod:`!asyncio`" +msgstr "نمای کلی مفهومی از :mod:`!asyncio`" msgid "This :ref:`HOWTO ` article seeks to help you build a sturdy mental model of how :mod:`asyncio` fundamentally works, helping you understand the how and why behind the recommended patterns." msgstr "این مقاله‌ی :ref:`HOWTO ` در پی آن است که به شما کمک کند مدلی ذهنی مستحکم از اینکه :mod:`asyncio` در بنیاد چگونه کار می‌کند بسازید و چگونگی و چرایی پشت الگوهای توصیه‌شده را درک کنید." @@ -53,14 +54,14 @@ msgstr "مرور مفهومی بخش ۱: سطح بالا" msgid "In part 1, we'll cover the main, high-level building blocks of :mod:`!asyncio`: the event loop, coroutine functions, coroutine objects, tasks, and ``await``." msgstr "در بخش ۱، اجزای سازنده‌ی اصلی و سطح بالای :mod:`!asyncio` را پوشش خواهیم داد: حلقه‌ی رویداد، توابع هم‌روال، اشیاء هم‌روال، وظایف و ``await``." -msgid "Event Loop" +msgid "Event loop" msgstr "حلقه رویداد" -msgid "Everything in :mod:`!asyncio` happens relative to the event loop. It's the star of the show. It's like an orchestra conductor. It's behind the scenes managing resources. Some power is explicitly granted to it, but a lot of its ability to get things done comes from the respect and cooperation of its worker bees." -msgstr "همه‌چیز در :mod:`!asyncio` نسبت به حلقه رویداد رخ می‌دهد. آن ستاره نمایش است. مانند رهبر ارکستر است. پشت صحنه منابع را مدیریت می‌کند. برخی قدرت‌ها به‌طور صریح به آن اعطا شده‌اند، اما بخش زیادی از توانایی آن برای انجام کارها از احترام و همکاری زنبورهای کارگرش ناشی می‌شود." +msgid "Everything in :mod:`!asyncio` happens relative to the event loop. It's the star of the show, but prefers to work behind the scenes, managing and coordinating resources. It's like an orchestra conductor. Some power is explicitly granted to it, but a lot of its ability to get things done comes from the respect and cooperation of its band members." +msgstr "همه‌چیز در :mod:`!asyncio` نسبت به حلقه رویداد اتفاق می‌افتد. این بخش ستاره‌ی نمایش است، اما ترجیح می‌دهد پشت صحنه کار کند و منابع را مدیریت و هماهنگ کند. این بخش مانند رهبر ارکستر است. مقداری قدرت به صراحت به آن اعطا شده است، اما بسیاری از توانایی‌های آن در انجام کارها از احترام و همکاری اعضای گروهش سرچشمه می‌گیرد." -msgid "In more technical terms, the event loop contains a collection of jobs to be run. Some jobs are added directly by you, and some indirectly by :mod:`!asyncio`. The event loop takes a job from its backlog of work and invokes it (or \"gives it control\"), similar to calling a function, and then that job runs. Once it pauses or completes, it returns control to the event loop. The event loop will then select another job from its pool and invoke it. You can *roughly* think of the collection of jobs as a queue: jobs are added and then processed one at a time, generally (but not always) in order. This process repeats indefinitely, with the event loop cycling endlessly onwards. If there are no more jobs pending execution, the event loop is smart enough to rest and avoid needlessly wasting CPU cycles, and will come back when there's more work to be done." -msgstr "به بیان فنی‌تر، حلقه رویداد شامل مجموعه‌ای از کارها برای اجراست. برخی کارها مستقیماً توسط شما و برخی به‌صورت غیرمستقیم توسط :mod:`!asyncio` اضافه می‌شوند. حلقه رویداد یک کار را از فهرست کارهای معوق خود می‌گیرد و آن را فراخوانی می‌کند (یا «کنترل را به آن می‌دهد»)، شبیه به فراخوانی یک تابع، و سپس آن کار اجرا می‌شود. هنگامی که آن کار مکث کند یا به پایان برسد، کنترل را به حلقه رویداد بازمی‌گرداند. سپس حلقه رویداد کار دیگری را از استخر خود انتخاب می‌کند و آن را فراخوانی می‌کند. شما *تقریباً* می‌توانید مجموعه کارها را یک صف در نظر بگیرید: کارها اضافه می‌شوند و سپس یکی‌یکی پردازش می‌شوند، معمولاً (اما نه همیشه) به‌ترتیب. این فرآیند به‌طور نامحدود تکرار می‌شود، در حالی که حلقه رویداد بی‌پایان به چرخه خود ادامه می‌دهد. اگر دیگر کاری در انتظار اجرا نباشد، حلقه رویداد به‌اندازه کافی هوشمند است که استراحت کند و از هدر دادن بیهوده چرخه‌های CPU جلوگیری کند، و هنگامی که کار بیشتری برای انجام وجود داشته باشد بازمی‌گردد." +msgid "In more technical terms, the event loop contains a collection of jobs to be run. Some jobs are added directly by you, and some indirectly by :mod:`!asyncio`. The event loop takes a job from its backlog of work and invokes it (or \"gives it control\"), similar to calling a function, and then that job runs. Once it pauses or completes, it returns control to the event loop. The event loop will then select another job from its pool and invoke it. You can *roughly* think of the collection of jobs as a queue: jobs are added and then processed one at a time, generally (but not always) in order. This process repeats indefinitely, with the event loop cycling endlessly onwards. If there are no more jobs pending execution, the event loop is smart enough to rest and avoid needlessly wasting CPU cycles, and will come back when there's more work to be done, such as when I/O operations complete or timers expire." +msgstr "به بیان فنی‌تر، حلقه رویداد شامل مجموعه‌ای از کارهای در حال اجرا است. برخی کارها مستقیماً توسط شما و برخی غیرمستقیم توسط :mod:`!asyncio` اضافه می‌شوند. حلقه رویداد کاری را از عقب‌ماندگی کارهای خود برمی‌دارد و آن را فراخوانی می‌کند (یا «به آن کنترل می‌دهد»)، که شبیه به فراخوانی یک تابع است، و سپس آن کار اجرا می‌شود. هنگامی که متوقف شود یا کامل شود، کنترل را به حلقه رویداد بازمی‌گرداند. سپس حلقه رویداد کار دیگری را از استخر خود انتخاب کرده و آن را فراخوانی می‌کند. شما می‌توانید *تقریباً* مجموعه کارها را مانند یک صف در نظر بگیرید: کارها اضافه شده و سپس یکی‌یکی پردازش می‌شوند، عموماً (اما نه همیشه) به ترتیب. این فرایند به طور نامحدود تکرار می‌شود و حلقه رویداد به طور بی‌پایان به چرخش خود ادامه می‌دهد. اگر کار دیگری در انتظار اجرا نباشد، حلقه رویداد به اندازه کافی هوشمند است که استراحت کند و از هدر رفتن بی‌دلیل چرخه‌های پردازنده جلوگیری کند، و هر زمان که کار بیشتری برای انجام وجود داشته باشد، مانند زمان اتمام عملیات ورودی/خروجی یا انقضای زمان‌سنج‌ها، برمی‌گردد." msgid "Effective execution relies on jobs sharing well and cooperating; a greedy job could hog control and leave the other jobs to starve, rendering the overall event loop approach rather useless." msgstr "اجرای کارآمد به اشتراک‌گذاری و همکاری مناسب کارها وابسته است؛ یک کار حریص می‌تواند کنترل را تصاحب کند و سایر کارها را محروم نگه دارد، و در نتیجه رویکرد کلی حلقه رویداد را عملاً بی‌فایده می‌سازد." @@ -202,11 +203,11 @@ msgstr "" msgid "Tasks" msgstr "وظایف" -msgid "Roughly speaking, :ref:`tasks ` are coroutines (not coroutine functions) tied to an event loop. A task also maintains a list of callback functions whose importance will become clear in a moment when we discuss :keyword:`await`. The recommended way to create tasks is via :func:`asyncio.create_task`." -msgstr "به‌طور تقریبی، :ref:`وظایف ` هم‌روال‌هایی (نه توابع هم‌روال) هستند که به یک حلقه رویداد وابسته‌اند. یک وظیفه نیز فهرستی از توابع کال‌بک را نگه‌داری می‌کند که اهمیت آن‌ها لحظه‌ای دیگر، هنگامی که درباره :keyword:`await` بحث می‌کنیم، روشن خواهد شد. روش توصیه‌شده برای ایجاد وظایف، استفاده از :func:`asyncio.create_task` است." +msgid "Roughly speaking, :ref:`tasks ` are coroutines (not coroutine functions) tied to an event loop. A task also maintains a list of callback functions whose importance will become clear in a moment when we discuss :keyword:`await`." +msgstr "به طور تقریبی، :ref:`وظایف ` همان هم‌روال‌ها (و نه توابع هم‌روال) هستند که به یک حلقه رویداد متصل شده‌اند. یک وظیفه همچنین فهرستی از توابع بازگشتی (کال‌بک) را نگه می‌دارد که اهمیت آن‌ها لحظه‌ای دیگر هنگام بحث درباره‌ی :keyword:`await` مشخص خواهد شد." -msgid "Creating a task automatically schedules it for execution (by adding a callback to run it in the event loop's to-do list, that is, collection of jobs)." -msgstr "ایجاد یک وظیفهبه‌طور خودکار آن را برای اجرا زمان‌بندی می‌کند (با افزودن یک کال‌بک برای اجرای آن در فهرست کارهای حلقه رویداد، یعنی مجموعه‌ای از کارها)." +msgid "Creating a task automatically schedules it for execution (by adding a callback to run it in the event loop's to-do list, that is, collection of jobs). The recommended way to create tasks is via :func:`asyncio.create_task`." +msgstr "ایجاد یک وظیفه به طور خودکار آن را برای اجرا زمان‌بندی می‌کند (با افزودن یک تابع بازگشتی برای اجرای آن در فهرست کارهای انجام‌نشدنی حلقه رویداد، یعنی مجموعه کارها). روش توصیه‌شده برای ایجاد وظایف از طریق :func:`asyncio.create_task` است." msgid ":mod:`!asyncio` automatically associates tasks with the event loop for you. This automatic association was purposely designed into :mod:`!asyncio` for the sake of simplicity. Without it, you'd have to keep track of the event loop object and pass it to any coroutine function that wants to create tasks, adding redundant clutter to your code." msgstr ":mod:`!asyncio` به‌طور خودکار وظایف را برای شما به حلقه رویداد مرتبط می‌کند. این ارتباط خودکار عمداً برای سادگی در :mod:`!asyncio` طراحی شده است. بدون آن، شما باید شیء حلقه رویداد را پیگیری کنید و آن را به هر تابع هم‌روالی که بخواهد وظایف را ایجاد کند، بفرستید، که این کار باعث ایجاد شلوغی اضافی در کد شما می‌شود." @@ -293,6 +294,9 @@ msgstr "" msgid "In a crucial way, the behavior of ``await`` depends on the type of object being awaited." msgstr "به‌شکلی اساسی، رفتار ``await`` به نوع شیء‌ای که await می‌شود بستگی دارد." +msgid "Awaiting tasks" +msgstr "وظایف در انتظار" + msgid "Awaiting a task will cede control from the current task or coroutine to the event loop. In the process of relinquishing control, a few important things happen. We'll use the following code example to illustrate::" msgstr "await کردن یک task، کنترل را از task یا هم‌روال فعلی به حلقه رویداد واگذار می‌کند. در فرآیند واگذاری کنترل، چند اتفاق مهم رخ می‌دهد. برای نشان دادن این موضوع از مثال کد زیر استفاده می‌کنیم::" @@ -320,6 +324,9 @@ msgstr "به‌طور کلی، هنگامی که وظیفه awaitشده (``dig_t msgid "This is a basic, yet reliable mental model. In practice, the control handoffs are slightly more complex, but not by much. In part 2, we'll walk through the details that make this possible." msgstr "این یک مدل ذهنی پایه‌ای، اما قابل‌اتکا است. در عمل، انتقال‌های کنترل کمی پیچیده‌تر هستند، اما نه چندان زیاد. در بخش ۲، جزئیاتی را که این امر را ممکن می‌سازند، بررسی خواهیم کرد." +msgid "Awaiting coroutines" +msgstr "انتظار کشیدن برای هم‌روال‌ها" + msgid "**Unlike tasks, awaiting a coroutine does not hand control back to the event loop!** Wrapping a coroutine in a task first, then awaiting that would cede control. The behavior of ``await coroutine`` is effectively the same as invoking a regular, synchronous Python function. Consider this program::" msgstr "برخلاف وظایف، await کردن یک هم‌روال کنترل را به حلقه رویداد بازنمی‌گرداند! قرار دادن یک هم‌روال در یک وظیفه و سپس await کردن آن، کنترل را واگذار می‌کند. رفتار ``await coroutine`` عملاً همانند فراخوانی یک تابع پایتون عادی و همگام است. این برنامه را در نظر بگیرید::" @@ -389,8 +396,8 @@ msgstr "" msgid "This behavior of ``await coroutine`` can trip a lot of people up! That example highlights how using only ``await coroutine`` could unintentionally hog control from other tasks and effectively stall the event loop. :func:`asyncio.run` can help you detect such occurrences via the ``debug=True`` flag, which enables :ref:`debug mode `. Among other things, it will log any coroutines that monopolize execution for 100ms or longer." msgstr "این رفتار ``await coroutine`` می‌تواند بسیاری از افراد را دچار اشتباه کند! آن مثال نشان می‌دهد که چگونه استفاده‌ی صرف از ``await coroutine`` می‌تواند به‌طور غیرعمدی کنترل را از سایر وظایف تصاحب کند و عملاً حلقه رویداد را متوقف کند. :func:`asyncio.run` می‌تواند به شما کمک کند تا چنین مواردی را از طریق پرچم ``debug=True`` تشخیص دهید، که :ref:`حالت اشکال‌زدایی ` را فعال می‌کند. در میان سایر موارد، این حالت هر هم‌روالی را که اجرا را برای ۱۰۰ میلی‌ثانیه یا بیشتر در انحصار خود می‌گیرد، ثبت می‌کند." -msgid "The design intentionally trades off some conceptual clarity around usage of ``await`` for improved performance. Each time a task is awaited, control needs to be passed all the way up the call stack to the event loop. That might sound minor, but in a large program with many ``await`` statements and a deep call stack, that overhead can add up to a meaningful performance drag." -msgstr "طراحی عمداً تا حدی وضوح مفهومی پیرامون استفاده از ``await`` را با بهبود عملکرد معاوضه می‌کند. هر بار که یک وظیفه در انتظار قرار می‌گیرد، کنترل باید از کل پشته فراخوانی به حلقه رویداد منتقل شود. ممکن است این موضوع جزئی به نظر برسد، اما در یک برنامه بزرگ با تعداد زیادی دستور ``await`` و پشته فراخوانی عمیق، این سربار می‌تواند به افت عملکرد قابل‌توجهی منجر شود." +msgid "The design intentionally trades off some conceptual clarity around usage of ``await`` for improved performance. Each time a task is awaited, control needs to be passed all the way up the call stack to the event loop. Then, the event loop needs to manage its internal state and work through its processing logic to resume the next job. That might sound minor, but in a large program with many ``await``\\ s, that overhead can add up to a non-negligible performance drag." +msgstr "طراحی این بخش عمدتاً برای بهبود عملکرد، مقداری از وضوح مفهومی پیرامون استفاده از ``await`` را فدا می‌کند. هر بار که برای یک وظیفه انتظار کشیده می‌شود، لازم است کنترل تمام مسیر را در پشته‌ی فراخوانی تا حلقه رویداد بالا ببرد. سپس، حلقه رویداد باید وضعیت داخلی خود را مدیریت کرده و منطق پردازش خود را طی کند تا کار بعدی را از سر بگیرد. ممکن است این موضوع جزئی به نظر برسد، اما در یک برنامه‌ی بزرگ با تعداد زیادی ``await``، این سربار می‌تواند به افت عملکرد قابل‌توجهی منجر شود." msgid "A conceptual overview part 2: the nuts and bolts" msgstr "مرور کلی مفهومی، بخش ۲: جزئیات عملی" @@ -401,8 +408,8 @@ msgstr "بخش ۲ به تفصیل به سازوکارهایی می‌پرداز msgid "The inner workings of coroutines" msgstr "سازوکار درونی هم‌روال‌ها" -msgid ":mod:`!asyncio` leverages four components to pass around control." -msgstr ":mod:`!asyncio` برای جابه‌جایی کنترل از چهار کامپوننت بهره می‌گیرد." +msgid ":mod:`!asyncio` leverages four components of Python to pass around control." +msgstr ":mod:`!asyncio` از چهار مؤلفه‌ی پایتون برای انتقال کنترل استفاده می‌کند." msgid ":meth:`coroutine.send(arg) ` is the method used to start or resume a coroutine. If the coroutine was paused and is now being resumed, the argument ``arg`` will be sent in as the return value of the ``yield`` statement which originally paused it. If the coroutine is being used for the first time (as opposed to being resumed), ``arg`` must be ``None``." msgstr ":meth:`coroutine.send(arg) ` متدی است که برای آغاز یا از سر گرفتن یک هم‌روال به کار می‌رود. اگر هم‌روال متوقف شده باشد و اکنون از سر گرفته شود، آرگومان ``arg`` به‌عنوان مقدار بازگشتی دستور ``yield`` که در ابتدا آن را متوقف کرده بود، فرستاده می‌شود. اگر هم‌روال برای اولین بار استفاده شود (نه اینکه از سر گرفته شود)، ``arg`` باید ``None`` باشد." @@ -493,8 +500,8 @@ msgstr "تنها راه برای yield کردن از یک هم‌روال (یا msgid "1. What about a ``yield`` directly within the coroutine function? The coroutine function becomes an :ref:`async generator function `, a different beast entirely." msgstr "۱. اگر یک ``yield`` به‌طور مستقیم درون تابع هم‌روال باشد چطور؟ تابع هم‌روال به یک :ref:`تابع تولیدگر ناهمگام ` تبدیل می‌شود، که به‌کلی مقوله‌ای متفاوت است." -msgid "2. What about a :ref:`yield from ` within the coroutine function to a (plain) generator? That causes the error: ``SyntaxError: yield from not allowed in a coroutine.`` This was intentionally designed for the sake of simplicity -- mandating only one way of using coroutines. Initially ``yield`` was barred as well, but was re-accepted to allow for async generators. Despite that, ``yield from`` and ``await`` effectively do the same thing." -msgstr "۲. اگر درون تابع هم‌روال، یک :ref:`yield from ` به یک تولیدگر (ساده) داشته باشید، چه؟ این باعث خطای زیر می‌شود: ``SyntaxError: yield from not allowed in a coroutine.`` این به‌عمد به‌خاطر سادگی طراحی شده است — تا تنها یک روش برای استفاده از هم‌روال‌ها الزامی باشد. در ابتدا ``yield`` نیز ممنوع بود، اما برای امکان‌پذیر شدن تولیدگرهای ناهمگام دوباره پذیرفته شد. با وجود این، ``yield from`` و ``await`` عملاً کار یکسانی انجام می‌دهند." +msgid "2. What about a :ref:`yield from ` within the coroutine function to a (plain) generator? That causes the error: ``SyntaxError: yield from not allowed in a coroutine.`` This was intentionally designed for the sake of simplicity -- mandating only one way of using coroutines. Despite that, ``yield from`` and ``await`` effectively do the same thing. Initially ``yield`` was barred as well, but was re-accepted to allow for async generators." +msgstr "۲. درباره‌ی استفاده از :ref:`yield from ` درون تابع هم‌روال به یک تولیدگر (ساده) چطور؟ این کار خطای زیر را ایجاد می‌کند: ``SyntaxError: yield from not allowed in a coroutine.`` این موضوع به خاطر سادگی -- یعنی الزامی کردن تنها یک روش برای استفاده از هم‌روال‌ها -- به طور عمدی طراحی شده است. با وجود این، ``yield from`` و ``await`` عملاً کار مشابهی انجام می‌دهند. در ابتدا ``yield`` نیز ممنوع بود، اما برای امکان‌پذیر شدن استفاده از تولیدگرهای ناهمگام مجدداً پذیرفته شد." msgid "Futures" msgstr "آینده‌نماها (Futures)" diff --git a/howto/abi3t-migration.po b/howto/abi3t-migration.po new file mode 100644 index 00000000..42a4b216 --- /dev/null +++ b/howto/abi3t-migration.po @@ -0,0 +1,813 @@ +# Persian translations for Python package. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# Automatically generated, 2026. +# +# Translators: +# Sepehr Rasouli , 2026 +# arman mohebali , 2026 +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-08 09:24+0330\n" +"PO-Revision-Date: 2026-10-01 14:41+0330\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: fa\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "Migrating to Stable ABI for free threading (``abi3t``)" +msgstr "مهاجرت به ABI پایدار برای نخ‌بندی آزاد (``abi3t``)" + +msgid "Starting with the 3.15 release, CPython supports a variant of the Stable ABI that supports :term:`free-threaded ` Python: the Stable ABI for Free-Threaded Builds, or ``abi3t`` for short. This document describes how to adapt C API extensions to support free threading." +msgstr "شروع از نسخه‌ی 3.15، سی‌پایتون از گونه‌ای از ABI پایدار پشتیبانی می‌کند که از پایتون :term:`نخ‌بندی‌آزاد ` پشتیبانی می‌کند: ABI پایدار برای ساخت‌های نخ‌آزاد، یا به اختصار ``abi3t``. این سند نحوه سازگار کردن افزونه‌های C API را برای پشتیبانی از نخ‌بندی آزاد شرح می‌دهد." + +msgid "Why do this" +msgstr "چرا این کار را انجام دهیم" + +msgid "The typical reason to use the Stable ABI is to reduce the number of artifacts that you need to build and distribute for each version of your library." +msgstr "دلیل اصلی استفاده از ABI پایدار، کاهش تعداد خروجی‌هایی است که باید برای هر نسخه از کتابخانه‌ی خود بسازید و توزیع کنید." + +msgid "Without the Stable ABI, you must build a separate shared library, and typically a *wheel* distribution, for each feature version of CPython you wish to support. For example, each tag in the following table represents a separate library/wheel:" +msgstr "بدون ABI پایدار، باید برای هر نسخه‌ی ویژگی سی‌پایتونی که می‌خواهید از آن پشتیبانی کنید، یک کتابخانه‌ی مشترک جداگانه و معمولاً یک توزیع *ویل* (wheel) بساحید. برای مثال، هر برچسب در جدول زیر نمایانگر یک کتابخانه/ویل جداگانه است:" + +msgid "CPython version" +msgstr "نسخه‌ی سی‌پایتون" + +msgid "Non-free-threaded" +msgstr "غیر نخ‌آزاد" + +msgid "Free-threaded" +msgstr "نخ‌آزاد" + +msgid "3.12" +msgstr "3.12" + +msgid "``cpython-312``" +msgstr "``cpython-312``" + +msgid "---" +msgstr "---" + +msgid "3.13" +msgstr "3.13" + +msgid "``cpython-313``" +msgstr "``cpython-313``" + +msgid "``cpython-313t``" +msgstr "``cpython-313t``" + +msgid "3.14" +msgstr "3.14" + +msgid "``cpython-314``" +msgstr "``cpython-314``" + +msgid "``cpython-314t``" +msgstr "``cpython-314t``" + +msgid "3.15" +msgstr "3.15" + +msgid "``cpython-315``" +msgstr "``cpython-315``" + +msgid "``cpython-315t``" +msgstr "``cpython-315t``" + +msgid "3.16" +msgstr "۳.۱۶" + +msgid "``cpython-316``" +msgstr "``cpython-316``" + +msgid "``cpython-316t``" +msgstr "``cpython-316t``" + +msgid "Later versions" +msgstr "نسخه‌های بعدی" + +msgid ":samp:`cpython-3{XX}`" +msgstr ":samp:`cpython-3{XX}`" + +msgid ":samp:`cpython-3{XX}t`" +msgstr ":samp:`cpython-3{XX}t`" + +msgid "That's a lot of builds, especially when multiplied by the number of supported platforms." +msgstr "این تعداد ساخت بسیار زیاد است، به‌ویژه وقتی در تعداد پلتفرم‌های پشتیبانی‌شده ضرب شود." + +msgid "With the Stable ABI (``abi3``, introduced in CPython 3.2), a single extension (per platform) can cover all *non-free-threaded* builds of CPython:" +msgstr "با استفاده از Stable ABI (معادل ``abi3``، که در سی‌پایتون ۳.۲ معرفی شد)، یک افزونەی واحد (به ازای هر پلتفرم) می‌تواند تمام ساخت‌های *غیر نخ‌آزاد* سی‌پایتون را پوشش دهد:" + +msgid "``abi3``" +msgstr "``abi3``" + +msgid "The Stable ABI for free-threaded builds (``abi3t``), introduced in CPython 3.15, does the same for free-threaded builds. And it's compatible with non-free-threaded ones as well:" +msgstr "Stable ABI برای ساخت‌های نخ‌آزاد (``abi3t``) که در سی‌پایتون ۳.۱۵ معرفی شد، همین کار را برای ساخت‌های نخ‌آزاد انجام می‌دهد. همچنین با نسخه‌های غیر نخ‌آزاد نیز سازگار است:" + +msgid "``abi3`` *" +msgstr "``abi3`` *" + +msgid "``abi3t``" +msgstr "``abi3t``" + +msgid "\\* (As above, the ``abi3`` extension is compatible with all non-free-threaded builds; even the 3.15+ ones that this table \"attributes\" to ``abi3t``.)" +msgstr "\\* (همان‌طور که در بالا ذکر شد، افزونەی ``abi3`` با تمام ساخت‌های غیر نخ‌آزاد سازگار است؛ حتی نسخه‌های ۳.۱۵ به بالا که این جدول آن‌ها را به ``abi3t`` «نسبت می‌دهد».)" + +msgid "Why *not* do this" +msgstr "چرا این کار را *نکنیم*" + +msgid "There are two main downsides to the Stable ABI." +msgstr "Stable ABI دو نقطه‌ی ضعف اصلی دارد." + +msgid "First, your extension may become slower, since the Stable ABI prioritizes compatibility over performance. The difference is usually not noticeable, and often can be mitigated by using the same source to build both a Stable ABI build and a few version-specific ones for \"tier 1\" CPython versions." +msgstr "نخست، ممکن است افزونەی شما کندتر شود، زیرا Stable ABI سازگاری را بر کارایی ترجیح می‌دهد. این تفاوت معمولاً محسوس نیست و اغلب می‌توان با استفاده از یک سورس واحد برای ساخت هم یک ساخت Stable ABI و هم چند ساختِ وابستہ به نسخه برای نسخه‌های «رده ۱» سی‌پایتون، آن را کاهش داد." + +msgid "Second, not all of the C API is available. Extensions need to be ported to build for the Stable ABI, which may be difficult or, in rare cases, impossible." +msgstr "دوم، همه‌ی C API در دسترس نیست. افزونه‌ها باید برای ساخته شدن با Stable ABI پورت شوند، که ممکن است دشوار یا در موارد نادر، غیرممکن باشد." + +msgid "Specifically, ``abi3t`` requires APIs added in CPython 3.15. If you want to build your extension for older versions of CPython from the same source, you have two main options:" +msgstr "به‌طور خاص، ``abi3t`` به APIهای اضافه‌شده در سی‌پایتون ۳.۱۵ نیاز دارد. اگر می‌خواهید افزونەی خود را برای نسخه‌های قدیمی‌تر سی‌پایتون از همان سورس بسازید، دو گزینه‌ی اصلی پیش رو دارید:" + +msgid "Use preprocessor conditionals." +msgstr "استفاده از شرط‌های پیش‌پردازنده (preprocessor conditionals)." + +msgid "When following this guide, use ``#ifdef Py_TARGET_ABI3T`` blocks whenever you are told to do a change that breaks the build on CPython versions you care about. Keep the pre-existing code in ``#else`` blocks." +msgstr "هنگام پیروی از این راهنما، هر زمان که به شما گفته شد تغییری انجام دهید که ساخت را در نسخه‌های سی‌پایتون مورد نظرتان دچار مشکل می‌کند، از بلوک‌های ``#ifdef Py_TARGET_ABI3T`` استفاده کنید. کد از پیش موجود را در بلوک‌های ``#else`` نگه دارید." + +msgid "For hand-written C extensions, this approach is reasonable down to CPython 3.12, due to additions introduced in :pep:`697`. Keeping compatibility with 3.11 and below may be worth it for code generators (for example, Cython)." +msgstr "برای افزونه‌های C دست‌نویس، این رویکرد تا سی‌پایتون ۳.۱۲ منطقی است، به دلیل اضافه‌سازی‌های معرفی‌شده در :pep:`697`. حفظ سازگاری با نسخه‌ی ۳.۱۱ و پایین‌تر ممکن است برای تولیدگرهای کد (مثلاً Cython) ارزش داشته باشد." + +msgid "Do not port to ``abi3t``, and continue building separate extensions for each version of CPython, until you can drop support for the older versions." +msgstr "تا زمانی که نتوانید پشتیبانی از نسخه‌های قدیمی‌تر را کنار بگذارید، به ``abi3t`` منتقل نکنید و به ساخت افزونه‌های جداگانه برای هر نسخه‌ی سی‌پایتون ادامه دهید." + +msgid "This is a valid approach. Not all extensions need to switch to ``abi3t`` right now." +msgstr "این یک رویکرد معتبر است. لازم نیست همه‌ی افزونه‌ها در حال حاضر به ``abi3t`` تغییر وضعیت دهند." + +msgid "Prerequisites" +msgstr "پیش‌نیازها" + +msgid "This guide assumes that you have an extension written directly in C (or C++), which you want to port to ``abi3t``." +msgstr "این راهنما فرض می‌کند که شما یک افزونه دارید که مستقیماً به زبان C (یا ++C) نوشته شده است و می‌خواهید آن را به ``abi3t`` منتقل کنید." + +msgid "If your extension uses a code generator (like Cython) or language binding (like PyO3), it's best to wait until that tool has support for ``abi3t``. If you maintain such a tool, you might be able to adapt the instructions here for your tool." +msgstr "اگر افزونه‌ی شما از یک تولیدگر کد (مانند Cython) یا اتصال زبانی (مانند PyO3) استفاده می‌کند، بهتر است صبر کنید تا آن ابزار از ``abi3t`` پشتیبانی کند. اگر چنین ابزاری را نگهداری می‌کنید، ممکن است بتوانید دستورالعمل‌های اینجا را برای ابزار خود تطبیق دهید." + +msgid "Non-free-threaded Stable ABI" +msgstr "ABI پایدار غیر نخ‌آزاد" + +msgid "Your extension should support the non-free-threaded Stable ABI (``abi3``). If not, either port it first, or follow this guide but be prepared to fix issues it does not mention." +msgstr "افزونه‌ی شما باید از ABI پایدار غیر نخ‌آزاد (``abi3``) پشتیبانی کند. اگر این‌طور نیست، یا ابتدا آن را منتقل کنید، یا این راهنما را دنبال کنید اما آماده باشید تا مسائلی را که در آن ذکر نشده است، برطرف کنید." + +msgid "Free-threading support" +msgstr "پشتیبانی از نخ‌بندی آزاد" + +msgid "While it's technically not a hard prerequisite, you will most likely want to prepare your extension for free threading before you port it to ``abi3t``. See :ref:`freethreading-extensions-howto` for instructions." +msgstr "اگرچه از نظر فنی یک پیش‌نیاز سخت‌گیرانه نیست، اما احتمالاً ترجیح می‌دهید پیش از انتقال افزونه‌ی خود به ``abi3t``، آن را برای نخ‌بندی آزاد آماده کنید. برای دستورالعمل‌ها به :ref:`freethreading-extensions-howto` مراجعه کنید." + +msgid "`Porting Extension Modules to Support Free-Threading `__: A community-maintained porting guide for extension authors." +msgstr "`انتقال ماژول‌های افزونه برای پشتیبانی از نخ‌بندی آزاد `__: یک راهنمای انتقال که توسط کامیونیتی برای توسعه‌دهندگان افزونه نگهداری می‌شود." + +msgid "Isolating extension modules" +msgstr "ایزوله‌سازی ماژول‌های افزونه" + +msgid "Your module should use :ref:`multi-phase initialization `, and it should either be isolated or limit itself to be loaded at most once per process. If it is not your case, follow :ref:`isolating-extensions-howto` first. (See the :ref:`opt-out section ` for a shortcut.)" +msgstr "ماژول شما باید از :ref:`راه‌اندازی چندفازی ` استفاده کند و یا باید ایزوله باشد یا بارگذاری خود را به حداکثر یک بار در هر فرایند محدود کند. اگر این‌گونه نیست، ابتدا :ref:`isolating-extensions-howto` را دنبال کنید. (برای میانبر، به :ref:`بخش انصراف ` مراجعه کنید.)" + +msgid "Avoiding variable-sized types" +msgstr "جلوگیری از انواعی با اندازه‌ی متغیر" + +msgid "If your extension defines variable-sized types (using :c:macro:`Py_tp_itemsize` or :c:member:`PyTypeObject.tp_itemsize`), it cannot be ported to ``abi3t`` 3.15." +msgstr "اگر افزونه‌ی شما انواعی با اندازه‌ی متغیر را تعریف می‌کند (با استفاده از :c:macro:`Py_tp_itemsize` یا :c:member:`PyTypeObject.tp_itemsize`)، نمی‌تواند به ``abi3t`` ۳.۱۵ منتقل شود." + +msgid "Setting up the build" +msgstr "تنظیم ساخت" + +msgid "If you use a build tool, search its documentation for \"``abi3t``\", and follow any instructions to select the ABI. For reference, here are direct links for several popular build tools:" +msgstr "" + +msgid "`meson-python `__" +msgstr "" + +msgid "`scikit-build-core `__" +msgstr "" + +msgid "`Maturin `__" +msgstr "" + +msgid "You may want to verify that the tool set the right flag by temporarily adding the following just after ``#include ``::" +msgstr "" + +msgid "" +"#if Py_TARGET_ABI3T+0 <= 0x30f0000\n" +"#error \"abi3t define is not set!\"\n" +"#endif" +msgstr "" +"#if Py_TARGET_ABI3T+0 <= 0x30f0000\n" +"#error \"abi3t define is not set!\"\n" +"#endif" + +msgid "This should result in a different error than \"``abi3t`` define is not set\"." +msgstr "این امر باید خطایی متفاوت از \"``abi3t`` define is not set\" ایجاد کند." + +msgid "`Building and distributing abi3t extensions `__: Build configuration and wheel testing examples in the community-maintained Python Free-Threading Guide." +msgstr "" + +msgid "If your build tool doesn't support ``abi3t`` yet, set the following macro before including ``Python.h``::" +msgstr "اگر ابزار ساخت شما هنوز از ``abi3t`` پشتیبانی نمی‌کند، کلان‌دستور زیر را پیش از گنجاندن ``Python.h`` تنظیم کنید::" + +msgid "#define Py_TARGET_ABI3T 0x30f0000" +msgstr "#define Py_TARGET_ABI3T 0x30f0000" + +msgid "or specify it as a compiler flag, for example::" +msgstr "یا آن را به‌عنوان پرچم کامپایلر مشخص کنید، برای نمونه::" + +msgid "-DPy_TARGET_ABI3T=0x30f0000" +msgstr "-DPy_TARGET_ABI3T=0x30f0000" + +msgid "Once your extension builds with this setting, it will be compatible with CPython 3.15 and above." +msgstr "هنگامی که افزونه‌ی شما با این تنظیم ساخته شود، با سی‌پایتون ۳.۱۵ و بالاتر سازگار خواهد بود." + +msgid "If you set this macro manually, you will later need to name and tag the resulting extension manually as well. This is covered in :ref:`abi3t-migration-tagging` below." +msgstr "اگر این کلان‌دستور را به‌صورت دستی تنظیم کنید، بعدها باید افزونه‌ی حاصل را نیز به‌صورت دستی نام‌گذاری و برچسب‌گذاری کنید. این موضوع در :ref:`abi3t-migration-tagging` در ادامه پوشش داده شده است." + +msgid "This guide will ask you to make a series of changes. After each one, verify that your extension still builds in the original (non-``abi3t``) configuration, and ideally run tests on all Python versions you support. This will ensure that nothing breaks as you are porting." +msgstr "این راهنما از شما می‌خواهد مجموعه‌ای از تغییرات را انجام دهید. پس از هر تغییر، بررسی کنید که افزونه‌ی شما همچنان در پیکربندی اصلی (غیر ``abi3t``) ساخته می‌شود و ایده‌آل این است که آزمون‌ها را روی تمام نسخه‌های پایتونی که پشتیبانی می‌کنید اجرا کنید. این کار تضمین می‌کند که هنگام انتقال، چیزی خراب نشود." + +msgid "Module export hook" +msgstr "قلاب اکسپورت ماژول" + +#, fuzzy +#| msgid "Unless you've done this step already, your extension module defines a :ref:`module initialization function ` named :samp:`PyInit_{}`. You will need to port it to a :ref:`module export hook `, :samp:`PyModExport_{}`, a feature added in CPython 3.15 in :pep:`793`." +msgid "Unless you've done this step already, your extension module defines a :ref:`module initialization function ` named :samp:`PyInit_{}` (where ``modname`` is the name of your module). You will need to port it to a :ref:`module export hook `, :samp:`PyModExport_{}`, a feature added in CPython 3.15 in :pep:`793`." +msgstr "مگر اینکه قبلاً این مرحله را انجام داده باشید، ماژول توسعه‌ای شما یک :ref:`تابع مقداردهی اولیه‌ی ماژول ` به نام :samp:`PyInit_{}` را تعریف می‌کند. لازم است آن را به یک :ref:`قلاب اکسپورت ماژول `، یعنی :samp:`PyModExport_{}` منتقل کنید که این ویژگی در سی‌پایتون ۳.۱۵ در :pep:`793` اضافه شده است." + +msgid "Your existing init function should look like this (with your own names for ```` and ````):" +msgstr "تابع اولیه‌ی موجود شما باید به شکل زیر باشد (با نام‌های دلخواه خودتان برای ```` و ````):" + +msgid "" +"PyMODINIT_FUNC\n" +"PyInit_(void)\n" +"{\n" +" return PyModuleDef_Init(&);\n" +"}" +msgstr "" +"PyMODINIT_FUNC\n" +"PyInit_(void)\n" +"{\n" +" return PyModuleDef_Init(&);\n" +"}" + +msgid "If there is some code before the ``return``, move it to a :c:macro:`Py_mod_create` or :c:macro:`Py_mod_exec` slot function. See the :ref:`PyInit documentation ` for related information." +msgstr "اگر کدی پیش از ``return`` وجود دارد، آن را به یک تابع جایگاه :c:macro:`Py_mod_create` یا :c:macro:`Py_mod_exec` منتقل کنید. برای اطلاعات مرتبط، مستندات :ref:`PyInit documentation ` را ببینید." + +msgid "The function references a ``PyModuleDef`` object (```` in the code above). Its definition should be similar to the following, with different values and perhaps some fields unnnamed or left out:" +msgstr "این تابع به یک شیء ``PyModuleDef`` (که در کد بالا ```` است) ارجاع می‌دهد. تعریف آن باید مشابه موارد زیر باشد، با مقادیر متفاوت و احتمالاً برخی فیلدهای بدون نام یا حذف‌شده:" + +msgid "" +"static PyModuleDef = {\n" +" PyModuleDef_HEAD_INIT,\n" +" .m_name = \"my_module\",\n" +" .m_doc = \"my docstring\",\n" +" .m_size = sizeof(my_state_struct),\n" +" .m_methods = my_methods,\n" +" .m_slots = my_slots,\n" +" .m_traverse = my_traverse,\n" +" .m_clear = my_clear,\n" +" .m_free = my_free,\n" +"};" +msgstr "" +"static PyModuleDef = {\n" +" PyModuleDef_HEAD_INIT,\n" +" .m_name = \"my_module\",\n" +" .m_doc = \"my docstring\",\n" +" .m_size = sizeof(my_state_struct),\n" +" .m_methods = my_methods,\n" +" .m_slots = my_slots,\n" +" .m_traverse = my_traverse,\n" +" .m_clear = my_clear,\n" +" .m_free = my_free,\n" +"};" + +msgid "Remove this definition and the ``PyInit`` function (or put them in an ``#ifndef Py_TARGET_ABI3T`` block, to retain backwards compatibility), and replace them with the following:" +msgstr "این تعریف و تابع ``PyInit`` را حذف کنید (یا آن‌ها را در یک بلوک ``#ifndef Py_TARGET_ABI3T`` قرار دهید تا سازگاری با نسخه‌های قبلی حفظ شود) و موارد زیر را جایگزین آن‌ها کنید:" + +msgid "" +"PyABIInfo_VAR(abi_info);\n" +"\n" +"static PySlot my_slot_array[] = {\n" +" PySlot_STATIC_DATA(Py_mod_abi, &abi_info),\n" +" PySlot_STATIC_DATA(Py_mod_name, \"my_module\"),\n" +" PySlot_STATIC_DATA(Py_mod_doc, \"my docstring\"),\n" +" PySlot_SIZE(Py_mod_state_size, sizeof(my_state_struct)),\n" +" PySlot_STATIC_DATA(Py_mod_methods, my_methods),\n" +" PySlot_STATIC_DATA(Py_mod_slots, my_slots),\n" +" PySlot_FUNC(Py_mod_state_traverse, my_traverse),\n" +" PySlot_FUNC(Py_mod_state_clear, my_clear),\n" +" PySlot_FUNC(Py_mod_state_free, my_free),\n" +" PySlot_END\n" +"};\n" +"\n" +"PyMODEXPORT_FUNC\n" +"PyModExport_(void)\n" +"{\n" +" return my_slot_array;\n" +"}" +msgstr "" +"PyABIInfo_VAR(abi_info);\n" +"\n" +"static PySlot my_slot_array[] = {\n" +" PySlot_STATIC_DATA(Py_mod_abi, &abi_info),\n" +" PySlot_STATIC_DATA(Py_mod_name, \"my_module\"),\n" +" PySlot_STATIC_DATA(Py_mod_doc, \"my docstring\"),\n" +" PySlot_SIZE(Py_mod_state_size, sizeof(my_state_struct)),\n" +" PySlot_STATIC_DATA(Py_mod_methods, my_methods),\n" +" PySlot_STATIC_DATA(Py_mod_slots, my_slots),\n" +" PySlot_FUNC(Py_mod_state_traverse, my_traverse),\n" +" PySlot_FUNC(Py_mod_state_clear, my_clear),\n" +" PySlot_FUNC(Py_mod_state_free, my_free),\n" +" PySlot_END\n" +"};\n" +"\n" +"PyMODEXPORT_FUNC\n" +"PyModExport_(void)\n" +"{\n" +" return my_slot_array;\n" +"}" + +msgid "Leave out any fields that were missing (except the new :c:macro:`Py_mod_abi`), and substitute your own values." +msgstr "هر فیلدی که غایب بوده است را کنار بگذارید (به‌جز :c:macro:`Py_mod_abi` جدید) و مقادیر خود را جایگزین کنید." + +msgid "See the :c:type:`PySlot` and :c:ref:`export hook ` documentation for details on this API." +msgstr "برای جزئیات این API، مستندات :c:type:`PySlot` و :c:ref:`export hook ` را ببینید." + +msgid "As in the example, your ``PyModExport_`` function should *only* return a pointer to static data. If you cannot avoid additional code, refer to the :ref:`caveats in PyModExport documentation `." +msgstr "همانند نمونه، تابع ``PyModExport_`` شما *فقط* باید یک اشاره‌گر به داده‌ی ایستا برگرداند. اگر نمی‌توانید از کد اضافی جلوگیری کنید، به :ref:`موارد احتیاطی در مستندات PyModExport ` مراجعه کنید." + +msgid "When building for Windows using the Setuptools_ build tool, removing the :samp:`PyInit_{}` function may result in the linker error :samp:`LINK : error LNK2001: unresolved external symbol PyInit_{}`. This is caused by Setuptools passing an ``/EXPORT`` linker flag, which is redundant since Python 3.15 (see :gh:`141671`). A workaround is to add a dummy :samp:`PyInit_{}` function to your code. Python 3.15+ will never call this function if :samp:`PyModExport_{}` is present, so it can always fail:" +msgstr "" + +msgid "" +"// Workaround for https://github.com/pypa/distutils/issues/387\n" +"PyMODINIT_FUNC\n" +"PyInit_(void)\n" +"{\n" +" PyErr_SetString(PyExc_SystemError,\n" +" \"PyInit_* called for module with PyModExport_*\");\n" +" return NULL;\n" +"}" +msgstr "" + +msgid "(This issue is present in Setuptools 84.0.0; it might be fixed in newer versions.)" +msgstr "" + +msgid "Existing slots" +msgstr "جایگاه‌های موجود" + +msgid "If you have a ``Py_mod_slots`` slot, check the array it refers to. It should be a :c:type:`PyModuleDef_Slot` array like the following:" +msgstr "اگر یک جایگاه (slot) به نام ``Py_mod_slots`` دارید، آرایه‌ای را که به آن اشاره می‌کند بررسی کنید. این آرایه باید مشابه نمونه‌ی زیر یک آرایه‌ی :c:type:`PyModuleDef_Slot` باشد:" + +msgid "" +"static PyObject *create_module(PyObject *spec, PyModuleDef *def) { ... }\n" +"static int my_first_module_exec(PyObject *module) { ... }\n" +"static int my_second_module_exec(PyObject *module) { ... }\n" +"\n" +"static PyModuleDef_Slot my_slots[] = {\n" +" {Py_mod_gil, Py_MOD_GIL_NOT_USED},\n" +" {Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED},\n" +" {Py_mod_create, my_module_create},\n" +" {Py_mod_exec, my_first_module_exec},\n" +" {Py_mod_exec, my_second_module_exec},\n" +" {0, NULL}\n" +"};" +msgstr "" +"static PyObject *create_module(PyObject *spec, PyModuleDef *def) { ... }\n" +"static int my_first_module_exec(PyObject *module) { ... }\n" +"static int my_second_module_exec(PyObject *module) { ... }\n" +"\n" +"static PyModuleDef_Slot my_slots[] = {\n" +" {Py_mod_gil, Py_MOD_GIL_NOT_USED},\n" +" {Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED},\n" +" {Py_mod_create, my_module_create},\n" +" {Py_mod_exec, my_first_module_exec},\n" +" {Py_mod_exec, my_second_module_exec},\n" +" {0, NULL}\n" +"};" + +msgid "``py_mod_create``" +msgstr "``py_mod_create``" + +msgid "If you have a :c:macro:`Py_mod_create` entry, make sure the function can be called with ``NULL`` as its second argument (instead of the :c:type:`PyModuleDef`, which you are removing). Often, this argument isn't used at all; you can check by renaming it:" +msgstr "اگر یک ورودی :c:macro:`Py_mod_create` دارید، اطمینان حاصل کنید که تابع می‌تواند با مقدار ``NULL`` به عنوان آرگومان دوم (به‌جای :c:type:`PyModuleDef` که در حال حذف آن هستید) فراخوانی شود. اغلب، از این آرگومان اصلاً استفاده نمی‌شود؛ می‌توانید با تغییر نام آن این موضوع را بررسی کنید:" + +msgid "static PyObject *create_module(PyObject *spec, PyModuleDef *_unused) { ... }" +msgstr "static PyObject *create_module(PyObject *spec, PyModuleDef *_unused) { ... }" + +msgid "If the argument is used, find a different way to pass in the data. Commonly, the information is static and you can refer to it directly. (If you're reusing a single function for several different modules, consider defining several functions instead.)" +msgstr "اگر از آرگومان استفاده می‌شود، روش دیگری برای ارسال داده‌ها پیدا کنید. معمولاً اطلاعات به صورت ایستا هستند و می‌توانید مستقیماً به آن‌ها ارجاع دهید. (اگر از یک تابع واحد برای چند ماژول مختلف استفاده مجدد می‌کنید، به جای آن تعریف چندین تابع را در نظر بگیرید.)" + +msgid "Multiple ``py_mod_exec``" +msgstr "چندین ``py_mod_exec``" + +msgid "If you have *more than one* :c:macro:`Py_mod_exec` entry, consolidate them: create a new function that calls the others, and replace existing slots with it." +msgstr "اگر *بیش از یک* ورودی :c:macro:`Py_mod_exec` دارید، آن‌ها را یکپارچه کنید: تابعی جدید ایجاد کنید که بقیه را فراخوانی کند و جایگاه‌های موجود را با آن جایگزین کنید." + +msgid "" +"static int my_module_exec(PyObject *module) {\n" +" if (my_first_module_exec(module) < 0) return -1;\n" +" if (my_second_module_exec(module) < 0) return -1;\n" +"}\n" +"\n" +"static PyModuleDef_Slot my_slots[] = {\n" +" ...\n" +" /* (remove other Py_mod_exec slots) */\n" +" ...\n" +" {Py_mod_exec, my_module_exec},\n" +" {0, NULL}\n" +"};" +msgstr "" +"static int my_module_exec(PyObject *module) {\n" +" if (my_first_module_exec(module) < 0) return -1;\n" +" if (my_second_module_exec(module) < 0) return -1;\n" +"}\n" +"\n" +"static PyModuleDef_Slot my_slots[] = {\n" +" ...\n" +" /* (remove other Py_mod_exec slots) */\n" +" ...\n" +" {Py_mod_exec, my_module_exec},\n" +" {0, NULL}\n" +"};" + +msgid "If the functions aren't used elsewhere, you can combine their bodies instead." +msgstr "اگر توابع در جاهای دیگر استفاده نمی‌شوند، می‌توانید به جای آن بدنه‌ی آن‌ها را ترکیب کنید." + +msgid "Merging slot arrays" +msgstr "ادغام آرایه‌های جایگاه (slot)" + +msgid "Optionally, when you break compatibility with Python 3.14, you may clean up the code by moving slots into the :c:type:`PySlot` array, and converting the definitions to :c:macro:`PySlot_DATA` and :c:macro:`PySlot_FUNC`:" +msgstr "به صورت اختیاری، هنگامی که سازگاری با نسخه‌ی ۳.۱۴ پایتون را قطع می‌کنید، می‌توانید با انتقال جایگاه‌ها به آرایه‌ی :c:type:`PySlot` و تبدیل تعاریف به :c:macro:`PySlot_DATA` و :c:macro:`PySlot_FUNC`، کد را پاکسازی کنید:" + +msgid "" +"static PySlot my_slot_array[] = {\n" +" ...\n" +" PySlot_DATA(Py_mod_gil, Py_MOD_GIL_NOT_USED),\n" +" PySlot_DATA(Py_mod_multiple_interpreters,\n" +" Py_MOD_PER_INTERPRETER_GIL_SUPPORTED)\n" +" PySlot_FUNC(Py_mod_create, my_module_create),\n" +" PySlot_FUNC(Py_mod_exec, my_module_exec),\n" +" PySlot_END\n" +"};" +msgstr "" +"static PySlot my_slot_array[] = {\n" +" ...\n" +" PySlot_DATA(Py_mod_gil, Py_MOD_GIL_NOT_USED),\n" +" PySlot_DATA(Py_mod_multiple_interpreters,\n" +" Py_MOD_PER_INTERPRETER_GIL_SUPPORTED)\n" +" PySlot_FUNC(Py_mod_create, my_module_create),\n" +" PySlot_FUNC(Py_mod_exec, my_module_exec),\n" +" PySlot_END\n" +"};" + +msgid "If you do this, delete the original :c:type:`PyModuleDef_Slot` array and its ``Py_mod_slots`` entry." +msgstr "اگر این کار را انجام دادید، آرایه‌ی اصلی :c:type:`PyModuleDef_Slot` و ورودی ``Py_mod_slots`` آن را حذف کنید." + +msgid "Associated ``PyModuleDef``" +msgstr "شیء ``PyModuleDef`` مرتبط" + +msgid "Since the new API does not use a :c:type:`!PyModuleDef` structure, a definition will not be associated with the resulting module. This changes the behavior of the following functions:" +msgstr "از آنجا که رابط برنامه‌نویسی (API) جدید از ساختار :c:type:`!PyModuleDef` استفاده نمی‌کند، هیچ تعریفی به ماژول حاصل مرتبط نخواهد شد. این موضوع رفتار توابع زیر را تغییر می‌دهد:" + +msgid ":c:func:`PyModule_GetDef`" +msgstr ":c:func:`PyModule_GetDef`" + +msgid ":c:func:`PyType_GetModuleByDef`" +msgstr ":c:func:`PyType_GetModuleByDef`" + +msgid "Check your code for these. If you do not use them, you can skip this section." +msgstr "کد خود را برای این موارد بررسی کنید. اگر از آن‌ها استفاده نمی‌کنید، می‌توانید از این بخش رد شوید." + +msgid "These functions are typically used for two purposes:" +msgstr "این توابع معمولاً برای دو منظور استفاده می‌شوند:" + +msgid "To get the definition the module was created with. This is no longer possible using the new API. Modules no longer keep a reference to the definition, so you will need to figure out a different way to pass the relevant data around." +msgstr "برای دریافت تعریفی که ماژول با آن ایجاد شده است. این کار دیگر با API جدید امکان‌پذیر نیست. ماژول‌ها دیگر ارجاعی به تعریف نگه نمی‌دارند، بنابراین باید روش دیگری برای انتقال داده‌های مربوطه پیدا کنید." + +msgid "To check if a given module object is “yours”. This use case is now served by :ref:`module tokens ` -- opaque pointers that identify a module. To use a token, declare (or reuse) a unique static variable, for example:" +msgstr "برای بررسی اینکه آیا یک شیء ماژول داده‌شده «متعلق به شما» است یا خیر. این کاربرد اکنون توسط :ref:`module tokens ` پشتیبانی می‌شود -- اشاره‌گرهای کدر که یک ماژول را شناسایی می‌کنند. برای استفاده از یک توکن، یک متغیر ایستا (یا ثابت) منحصر‌به‌فرد را تعریف (یا دوباره استفاده) کنید، برای مثال:" + +msgid "static char my_token;" +msgstr "static char my_token;" + +msgid "and add a pointer to it in a new entry to your module's ``PySlot`` array:" +msgstr "و یک اشاره‌گر به آن را در یک درایه (عنصر) جدید به آرایه‌ی ``PySlot`` ماژول خود اضافه کنید:" + +msgid "" +"static PySlot my_slot_array[] = {\n" +" ...\n" +" PySlot_STATIC_DATA(Py_mod_token, &my_token),\n" +" PySlot_END\n" +"}" +msgstr "" +"static PySlot my_slot_array[] = {\n" +" ...\n" +" PySlot_STATIC_DATA(Py_mod_token, &my_token),\n" +" PySlot_END\n" +"}" + +msgid "Then, switch from :c:func:`PyModule_GetDef` calls such as:" +msgstr "سپس، از فراخوانی‌های :c:func:`PyModule_GetDef` مانند موارد زیر:" + +msgid "PyModuleDef *def = PyModule_GetDef(module);" +msgstr "PyModuleDef *def = PyModule_GetDef(module);" + +msgid "to :c:func:`PyModule_GetToken` (which uses an output argument and may fail with an exception):" +msgstr "به :c:func:`PyModule_GetToken` (که از یک آرگومان خروجی استفاده می‌کند و ممکن است با یک استثنا با خطا مواجه شود) تغییر دهید:" + +msgid "" +"void *token;\n" +"if (PyModule_GetToken(module, &token) < 0) {\n" +" /* handle error */\n" +"}" +msgstr "" +"void *token;\n" +"if (PyModule_GetToken(module, &token) < 0) {\n" +" /* handle error */\n" +"}" + +msgid "and from :c:func:`PyType_GetModuleByDef` calls such as:" +msgstr "و از فراخوانی‌های :c:func:`PyType_GetModuleByDef` مانند:" + +msgid "" +"PyObject *module = PyType_GetModuleByDef(type, my_def);\n" +"/* handle error; use module */" +msgstr "" +"PyObject *module = PyType_GetModuleByDef(type, my_def);\n" +"/* handle error; use module */" + +msgid "to :c:func:`PyType_GetModuleByToken` (which returns a strong reference):" +msgstr "به :c:func:`PyType_GetModuleByToken` (که یک ارجاع قوی برمی‌گرداند):" + +msgid "" +"PyObject *module = PyType_GetModuleByToken(type, my_token);\n" +"/* handle error; use module */\n" +"Py_XDECREF(module);" +msgstr "" +"PyObject *module = PyType_GetModuleByToken(type, my_token);\n" +"/* handle error; use module */\n" +"Py_XDECREF(module);" + +msgid "``PyObject`` opaqueness" +msgstr "کدر بودن ``PyObject``" + +msgid "The :c:type:`PyObject` and :c:type:`PyVarObject` structures are opaque in ``abi3t``." +msgstr "ساختارهای :c:type:`PyObject` و :c:type:`PyVarObject` در ``abi3t`` کدر هستند." + +msgid "Accessing their members is prohibited. If you do this, switch to getter/setter functions mentioned in their documentation:" +msgstr "دسترسی به اعضای آن‌ها ممنوع است. اگر این کار را انجام می‌دهید، به توابع getter/setter ذکرشده در مستندات آن‌ها سوئیچ کنید:" + +msgid ":c:member:`PyObject.ob_type`" +msgstr ":c:member:`PyObject.ob_type`" + +msgid ":c:member:`PyObject.ob_refcnt`" +msgstr ":c:member:`PyObject.ob_refcnt`" + +msgid ":c:member:`PyVarObject.ob_size`" +msgstr ":c:member:`PyVarObject.ob_size`" + +msgid "Also, the *size* of the :c:type:`PyObject` structures is unknown to the compiler. It can -- and *does* -- change between different CPython builds." +msgstr "همچنین، *اندازه‌ی* ساختارهای :c:type:`PyObject` برای کامپایلر ناشناخته است. این اندازه می‌تواند -- و *واقعاً* -- بین نسخه‌های مختلف سی‌پایتون تغییر می‌کند." + +msgid "While the size is available at runtime (for example as ``sys.getsizeof(object())`` in Python code), you should resist the temptation to calculate pointer offsets from it. The object memory layout is subject to change in future ``abi3t`` implementations." +msgstr "اگرچه اندازه‌ی آن در طول ران‌تایم در دسترس است (برای مثال به شکل ``sys.getsizeof(object())`` در کد پایتون)، اما باید در برابر وسوسه‌ی محاسبه‌ی آفست‌های اشاره‌گر بر اساس آن مقاومت کنید. چیدمان حافظه‌ی شیء ممکن است در پیاده‌سازی‌های آینده‌ی ``abi3t`` تغییر کند." + +msgid "Custom type definitions" +msgstr "تعاریف نوع سفارشی" + +msgid "Since :c:type:`!PyObject` is opaque, the traditional way of defining custom types no longer works:" +msgstr "از آنجا که :c:type:`!PyObject` کدر است، روش سنتی تعریف انواع سفارشی دیگر کار نمی‌کند:" + +msgid "" +"typedef struct {\n" +" PyObject_HEAD // expands to `PyObject ob_base;` which has unknown size\n" +"\n" +" int my_data;\n" +"} CustomObject;\n" +"\n" +"static PyType_Spec CustomType_spec = {\n" +" ...\n" +" .basicsize = sizeof(CustomObject),\n" +" ...\n" +"};" +msgstr "" +"typedef struct {\n" +" PyObject_HEAD // expands to `PyObject ob_base;` which has unknown size\n" +"\n" +" int my_data;\n" +"} CustomObject;\n" +"\n" +"static PyType_Spec CustomType_spec = {\n" +" ...\n" +" .basicsize = sizeof(CustomObject),\n" +" ...\n" +"};" + +msgid "Most likely, all your class definitions, *and* all code that accesses your classes' data, will need to be rewritten. This will probably be the biggest change you need to support ``abi3t``." +msgstr "احتمالاً تمام تعاریف کلاس شما، *و* تمام کدهایی که به داده‌ی کلاس‌های شما دسترسی دارند، باید بازنویسی شوند. این احتمالاً بزرگ‌ترین تغییری است که برای پشتیبانی از ``abi3t`` به آن نیاز دارید." + +msgid "For each such type, instead of defining a ``struct`` for the entire instance, define one with only the “additional” fields -- ones specific to your class, not its superclasses:" +msgstr "برای هر چنین نوعی، به‌جای تعریف یک ``struct`` برای کل نمونه، یکی را فقط با فیلدهای «اضافی» تعریف کنید -- فیلدهایی که مختص کلاس شما هستند، نه ابرکلاس‌های آن:" + +msgid "" +"typedef struct {\n" +" int my_data;\n" +"} CustomObjectData;" +msgstr "" +"typedef struct {\n" +" int my_data;\n" +"} CustomObjectData;" + +msgid "Change the name. Almost all code that uses the struct will need to change (notably, pointers to the new structure cannot be cast to/from ``PyObject*``), and changing the name will highlight the usages as compiler errors. (If you use ``typeof``, C++ ``auto``, or similar ways to avoid typing the type name, this won't work. Be extra careful, and consider running tools to detect undefined behavior.)" +msgstr "نام را تغییر دهید. تقریباً تمام کدهایی که از struct استفاده می‌کنند باید تغییر کنند (به‌ویژه اشاره‌گرها به ساختار جدید را نمی‌توان به/از ``PyObject*`` تبدیل نوع داد)، و تغییر نام، کاربردها را به عنوان خطاهای کامپایلر برجسته خواهد کرد. (اگر از ``typeof``، کلمه کلیدی ``auto`` در ++C، یا روش‌های مشابهی برای جلوگیری از تایپ نام نوع استفاده می‌کنید، این کارکرد نخواهد داشت. بسیار مراقب باشید و اجرای ابزارهایی برای تشخیص رفتار تعریف‌نشده را در نظر بگیرید.)" + +msgid "Then, to create the class, use *negative* ``basicsize`` to indicate “extra” storage space rather than *total* instance size:" +msgstr "سپس، برای ایجاد کلاس، از ``basicsize`` *منفی* استفاده کنید تا به‌جای اندازه‌ی *کل* نمونه، فضای ذخیره‌سازی «اضافی» را مشخص کنید:" + +msgid "" +"static PyType_Spec CustomType_spec = {\n" +" ...\n" +" .basicsize = -sizeof(CustomObjectData), /* note the minus sign */\n" +" ...\n" +"};" +msgstr "" +"static PyType_Spec CustomType_spec = {\n" +" ...\n" +" .basicsize = -sizeof(CustomObjectData), /* note the minus sign */\n" +" ...\n" +"};" + +msgid "If you use :c:macro:`Py_tp_members`, set the :c:macro:`Py_RELATIVE_OFFSET` flag on each member and specify the :c:member:`~PyMemberDef.offset` relative to your new struct." +msgstr "اگر از :c:macro:`Py_tp_members` استفاده می‌کنید، پرچم :c:macro:`Py_RELATIVE_OFFSET` را روی هر عضو تنظیم کنید و :c:member:`~PyMemberDef.offset` را نسبت به struct جدید خود مشخص نمایید." + +msgid "Custom type data access" +msgstr "دسترسی به داده‌ی نوع سفارشی" + +msgid "Then comes the hard part: in all code that needs to access this struct, you will need an additional :c:func:`PyObject_GetTypeData` call to retrieve a ``CustomObjectData *`` pointer from ``PyObject *``:" +msgstr "سپس بخش سخت ماجرا فرا می‌رسد: در تمام کدهایی که نیاز به دسترسی به این struct دارند، به یک فراخوانی اضافی :c:func:`PyObject_GetTypeData` برای بازیابی یک اشاره‌گر ``CustomObjectData *`` از ``PyObject *`` نیاز خواهید داشت:" + +msgid "" +"PyObject *obj = ...;\n" +"CustomObjectData *data = PyObject_GetTypeData(obj, cls);" +msgstr "" +"PyObject *obj = ...;\n" +"CustomObjectData *data = PyObject_GetTypeData(obj, cls);" + +msgid "Note that this call requires the *type object* for your class (``cls``)." +msgstr "توجه داشته باشید که این فراخوانی نیازمند *شیء نوع* برای کلاس شما (``cls``) است." + +msgid "If your class is not subclassable (that is, it does not use the :c:macro:`Py_TPFLAGS_BASETYPE` flag), ``cls`` will be ``Py_TYPE(obj)``. Otherwise, **DO NOT USE** ``Py_TYPE`` with :c:func:`!PyObject_GetTypeData`: it might return memory reserved to an unrelated subclass! For example, if a user makes a subclass like this:" +msgstr "اگر کلاس شما قابلیت زیرکلاس‌سازی نداشته باشد (یعنی از پرچم :c:macro:`Py_TPFLAGS_BASETYPE` استفاده نکند)، مقدار ``cls`` برابر با ``Py_TYPE(obj)`` خواهد بود. در غیر این صورت، **از** ``Py_TYPE`` همراه با :c:func:`!PyObject_GetTypeData` **استفاده نکنید**: ممکن است حافظه‌ی رزرو شده برای یک زیرکلاس نامرتبط را برگرداند! برای مثال، اگر کاربری زیرکلاسی به شکل زیر بسازد:" + +msgid "" +"class Sub(YourCustomClass):\n" +" __slots__ = ('a', 'b')" +msgstr "" +"class Sub(YourCustomClass):\n" +" __slots__ = ('a', 'b')" + +msgid "then ``Py_TYPE(obj)`` is ``Sub``, and the underlying memory may look like this:" +msgstr "آنگاه ``Py_TYPE(obj)`` برابر با ``Sub`` است و حافظه‌ی زیرین ممکن است به شکل زیر باشد:" + +msgid "" +"╭─ PyObject *obj\n" +"│ ╭─ the pointer you want\n" +"│ │ ╭─ PyObject_GetTypeData(obj, Py_TYPE(obj))\n" +"▼ ▼ ▼\n" +"┌──────────┬───┬────────────────┬───┬─────────────┬───┬─────────────┐\n" +"│ PyObject │...│ CustomTypeData │...│ PyObject *a │...│ PyObject *b │\n" +"└──────────┴───┴────────────────┴───┴─────────────┴───┴─────────────┘" +msgstr "" +"╭─ PyObject *obj\n" +"│ ╭─ اشاره‌گری که می‌خواهید\n" +"│ │ ╭─ PyObject_GetTypeData(obj, Py_TYPE(obj))\n" +"▼ ▼ ▼\n" +"┌──────────┬───┬────────────────┬───┬─────────────┬───┬─────────────┐\n" +"│ PyObject │...│ CustomTypeData │...│ PyObject *a │...│ PyObject *b │\n" +"└──────────┴───┴────────────────┴───┴─────────────┴───┴─────────────┘" + +msgid "(Ellipses indicate possible padding. Note that this memory layout is not guaranteed: future versions of Python may add different padding or even switch the order of the structures.)" +msgstr "(نقاط چین نشان‌دهنده‌ی پدینگ احتمالی هستند. توجه داشته باشید که این چیدمان حافظه تضمین نمی‌شود: نسخه‌های آینده‌ی پایتون ممکن است پدینگ متفاوتی اضافه کنند یا حتی ترتیب ساختارها را جابه‌جا کنند.)" + +msgid "There are two main ways to get the right class:" +msgstr "برای دریافت کلاس درست دو روش اصلی وجود دارد:" + +msgid "In instance methods, your implementation may use the :c:type:`PyCMethod` signature (and the :c:macro:`METH_METHOD` bit in :c:member:`PyMethodDef.ml_flags`), and get the class as the ``defining_class`` argument." +msgstr "در متدهای نمونه، پیاده‌سازی شما ممکن است از امضای :c:type:`PyCMethod` (و بیت :c:macro:`METH_METHOD` در :c:member:`PyMethodDef.ml_flags`) استفاده کند و کلاس را به عنوان آرگومان ``defining_class`` دریافت کند." + +msgid "Otherwise, give your class a unique static token using the :c:macro:`Py_tp_token` slot, and use:" +msgstr "در غیر این صورت، با استفاده از جایگاه :c:macro:`Py_tp_token` یک توکن ایستا و یکتا به کلاس خود بدهید و از موارد زیر استفاده کنید:" + +msgid "" +"PyTypeObject cls;\n" +"if (PyType_GetBaseByToken(Py_TYPE(obj), my_tp_token, &cls) < 0) {\n" +" /* handle error */\n" +"}\n" +"CustomObjectData *data = PyObject_GetTypeData(obj, cls);" +msgstr "" +"PyTypeObject cls;\n" +"if (PyType_GetBaseByToken(Py_TYPE(obj), my_tp_token, &cls) < 0) {\n" +" /* handle error */\n" +"}\n" +"CustomObjectData *data = PyObject_GetTypeData(obj, cls);" + +msgid "Type tokens work similarly to module tokens covered :ref:`earlier in this guide `." +msgstr "توکن‌های نوع مشابه‌ توکن‌های ماژول کار می‌کنند که :ref:`پیش‌تر در این راهنما ` بررسی شده‌اند." + +msgid "Avoid build-time conditionals" +msgstr "از شرط‌های زمان ساخت اجتناب کنید" + +msgid "Check your code for API that identifies the version of Python used to *build* your extension. This no longer corresponds to the Python your extension runs on, so code that uses this information often needs changing. The macros to check for are:" +msgstr "کد خود را برای یافتن APIهایی بررسی کنید که نسخه‌ی پایتون مورد استفاده برای *ساخت* افزونه‌تان را مشخص می‌کنند. این مورد دیگر با پایتونی که افزونه‌تان روی آن اجرا می‌شود مطابقت ندارد، بنابراین کدی که از این اطلاعات استفاده می‌کند اغلب نیازمند تغییر است. ماکروهایی که باید بررسی شوند عبارتند از:" + +msgid ":c:macro:`PY_VERSION_HEX`, :c:macro:`PY_MAJOR_VERSION`, :c:macro:`PY_MINOR_VERSION`:" +msgstr ":c:macro:`PY_VERSION_HEX`، :c:macro:`PY_MAJOR_VERSION`، :c:macro:`PY_MINOR_VERSION`:" + +msgid "to get the run-time version, use :c:data:`Py_Version`;" +msgstr "برای دریافت نسخه‌ی زمان اجرا، از :c:data:`Py_Version` استفاده کنید؛" + +msgid "to determine what C API is available, use :c:macro:`Py_TARGET_ABI3T`. This macro is set to the minimum supported version." +msgstr "برای تعیین این که کدام C API در دسترس است، از :c:macro:`Py_TARGET_ABI3T` استفاده کنید. این ماکرو روی حداقل نسخه‌ی پشتیبانی‌شده تنظیم می‌شود." + +msgid ":c:macro:`Py_GIL_DISABLED`: under ``abi3t``, this macro is always defined. Code that works with free-threaded Python *should* also work with the GIL enabled (since the GIL can be enabled at run time), and usually *does* (unless it, for some reason, requires more than one :term:`attached thread state ` at one time)." +msgstr ":c:macro:`Py_GIL_DISABLED`: تحت ``abi3t``، این ماکرو همیشه تعریف می‌شود. کدی که با پایتون نخ‌آزاد کار می‌کند *باید* با GIL فعال نیز کار کند (از آنجا که GIL می‌تواند در زمان اجرا فعال شود) و معمولاً *نیز کار می‌کند* (مگر اینکه بنا به دلیلی، به بیش از یک :term:`وضعیت نخ متصل ` در یک زمان نیاز داشته باشد)." + +msgid "Further code changes" +msgstr "تغییرات بیشتر در کد" + +msgid "If you are still left with compiler errors or warnings, find a way to fix them. Alas, this guide is limited, and cannot cover all possible code changes extensions may need." +msgstr "اگر همچنان با خطاهای کامپایلر یا هشدارها مواجه شدید، راهی برای رفع آن‌ها پیدا کنید. متأسفانه، این راهنما محدود است و نمی‌تواند تمام تغییرات ممکن کد را که افزونه‌ها ممکن است نیاز داشته باشند پوشش دهد." + +msgid "If you find a problem that other extension authors might run into, consider :ref:`reporting an issue ` (or sending a pull request) for this guide." +msgstr "اگر مشکلی را پیدا کردید که سایر توسعه‌دهندگان افزونه ممکن است با آن مواجه شوند، :ref:`گزارش یک مسئله ` (یا ارسال یک پول ریکوئست) را برای این راهنما در نظر بگیرید." + +msgid "It is possible your issue cannot be fixed for the current version of ``abi3t``. In that case, reporting it may help it get prioritized for the next version of CPython." +msgstr "این امکان وجود دارد که مشکل شما برای نسخه‌ی فعلی ``abi3t`` قابل رفع نباشد. در این صورت، گزارش دادن آن ممکن است به اولویت‌بندی‌اش برای نسخه‌ی بعدی سی‌پایتون کمک کند." + +msgid "Tagging and distribution" +msgstr "برچسب‌گذاری و توزیع" + +msgid "If you are using a build tool with ``abi3t`` support, your extension is ready, but you might want to check that it was built correctly." +msgstr "اگر از یک ابزار ساخت با پشتیبانی از ``abi3t`` استفاده می‌کنید، افزونه‌ی شما آماده است، اما ممکن است بخواهید بررسی کنید که آیا به درستی ساخته شده است یا خیر." + +msgid "Extensions built with ``abi3t`` should have the following extension:" +msgstr "افزونه‌های ساخته‌شده با ``abi3t`` باید پسوند زیر را داشته باشند:" + +msgid "On Windows: ``.pyd`` (like any other extension);" +msgstr "در ویندوز: ``.pyd`` (مانند هر افزونه‌ی دیگری)؛" + +msgid "Linux, macOS, and other systems that use the ``.so`` suffix: ``.abi3t.so`` (**not** ``.cpython-315t.so`` or ``.abi3.so``). Note that both free-threaded and non-free-threaded builds will load ``.abi3t.so`` extensions;" +msgstr "لینوکس، مک‌اواس و سایر سیستم‌هایی که از پسوند ``.so`` استفاده می‌کنند: ``.abi3t.so`` (**نه** ``.cpython-315t.so`` یا ``.abi3.so``). توجه داشته باشید که هر دو ساخت‌ نخ‌آزاد و غیرنخ‌آزاد افزونه‌های ``.abi3t.so`` را بارگذاری خواهند کرد؛" + +msgid "Other systems: consult your distributor, and perhaps update this guide." +msgstr "سایر سیستم‌ها: با توزیع‌کننده‌ی خود مشورت کنید و احتمالاً این راهنما را به‌روزرسانی کنید." + +msgid "If you distribute the extension as a *wheel*, use the following tags:" +msgstr "اگر افزونه را در قالب یک *ویل* (wheel) توزیع می‌کنید، از برچسب‌های زیر استفاده کنید:" + +msgid "Python tag: :samp:`cp3{XX}`, where *XX* is the minimum Python version the extension is built for. (For example, ``cp315`` if you set ``Py_TARGET_ABI3T`` to ``0x30f0000``. See :ref:`abi3-compiling` for more values.)" +msgstr "برچسب پایتون: :samp:`cp3{XX}`، که در آن *XX* حداقل نسخه‌ی پایتونی است که افزونه برای آن ساخته شده است. (برای مثال، ``cp315`` اگر مقدار ``Py_TARGET_ABI3T`` را روی ``0x30f0000`` تنظیم کنید. برای مقادیر بیشتر، به :ref:`abi3-compiling` مراجعه کنید.)" + +msgid "ABI tag: ``abi3.abi3t``. This is a *compressed tag set* that indicates support for both non-free-threaded and free-threaded builds." +msgstr "برچسب ABI: ``abi3.abi3t``. این یک *مجموعه برچسب فشرده* است که پشتیبانی از ساخت‌های غیرنخ‌آزاد و نخ‌آزاد را نشان می‌دهد." + +msgid "For example, the wheel filename may look like this:" +msgstr "برای مثال، نام پرونده‌ی ویل ممکن است شبیه به این باشد:" + +msgid "myproject-1.0-cp315-abi3.abi3t-macosx_11_0_arm64.whl" +msgstr "myproject-1.0-cp315-abi3.abi3t-macosx_11_0_arm64.whl" + +msgid "`Platform Compatibility Tags `__ in the PyPA package distribution metadata." +msgstr "`Platform Compatibility Tags `__ در متادیتای توزیع بسته‌ی PyPA." + +msgid "If the filename or tags are incorrect, fix them." +msgstr "اگر نام پرونده یا برچسب‌ها نادرست هستند، آن‌ها را اصلاح کنید." + +msgid "Testing" +msgstr "آزمون" + +msgid "Note that when you build an extension compatible with multiple versions of CPython, you should always *test* it with each version it supports (for example, 3.15, 3.16, and so on). The Stable ABI only guarantees *ABI* compatibility; there may also be behavior changes -- both intentional ones (covered by :pep:`387`) and bugs." +msgstr "توجه داشته باشید که وقتی افزونه‌ای سازگار با چندین نسخه‌ی سی‌پایتون می‌سازید، باید همیشه آن را با هر نسخه‌ای که پشتیبانی می‌کند *آزمون* کنید (برای مثال، ۳.۱۵، ۳.۱۶ و غیره). ABI پایدار فقط سازگاری *ABI* را تضمین می‌کند؛ ممکن است تغییرات رفتاری نیز وجود داشته باشد -- هم تغییرات عمدی (که توسط :pep:`387` پوشش داده شده‌اند) و هم باگ‌ها." + +msgid "Be sure to run tests on both free-threaded and non-free-threaded builds of CPython." +msgstr "حتماً آزمون‌ها را روی هر دو ساخت نخ‌آزاد و غیرنخ‌آزاد سی‌پایتون اجرا کنید." + +msgid "If they pass, congratulations! You have an ``abi3t`` extension." +msgstr "اگر با موفقیت انجام شدند، تبریک می‌گوییم! شما یک افزونه‌ی ``abi3t`` دارید." + +#~ msgid "If you use a build tool (such as setuptools, meson-python, scikit-build-core), search its documentation for a way to select ``abi3t``. At the time of writing, not all of them have this; but if your tool does, use it. You may want to verify that it set the right flag by temporarily adding the following just after ``#include ``::" +#~ msgstr "اگر از یک ابزار ساخت (مانند setuptools، meson-python، scikit-build-core) استفاده می‌کنید، مستندات آن را برای یافتن روشی جهت انتخاب ``abi3t`` جستجو کنید. در زمان نگارش این متن، همه آن‌ها این ویژگی را ندارند؛ اما اگر ابزار شما دارد، از آن استفاده کنید. ممکن است بخواهید با افزودن موقت کد زیر بلافاصله پس از ``#include `` بررسی کنید که آیا پرچم مناسب را تنظیم کرده است یا خیر::" diff --git a/howto/annotations.po b/howto/annotations.po index f080fd4e..7b3eb5a8 100644 --- a/howto/annotations.po +++ b/howto/annotations.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 07:30+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -27,12 +27,6 @@ msgstr "" msgid "Annotations Best Practices" msgstr "بهترین شیوه‌های حاشیه‌نویسی" -msgid "author" -msgstr "نویسنده" - -msgid "Larry Hastings" -msgstr "لری هیستینگز" - msgid "Abstract" msgstr "چکیده" @@ -211,3 +205,9 @@ msgstr "اگر از کلاسی با فراکلاس سفارشی استفاده 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 "در برخی نسخه‌های پایتون، نمونه‌های کلاس‌ها ممکن است دارای ویژگی ``__annotations__`` باشند. با این حال، این یک قابلیت پشتیبانی‌شده نیست. اگر به حاشیه‌نویسی‌های یک نمونهنیاز دارید، می‌توانید از :func:`type` برای دسترسی به کلاس آن استفاده کنید (برای مثال، ``annotationlib.get_annotations(type(myinstance))`` در پایتون 3.14+)." + +#~ msgid "author" +#~ msgstr "نویسنده" + +#~ msgid "Larry Hastings" +#~ msgstr "لری هیستینگز" diff --git a/howto/argparse.po b/howto/argparse.po index bccdf206..7146d6e0 100644 --- a/howto/argparse.po +++ b/howto/argparse.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 10:50+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -27,12 +27,6 @@ msgstr "" msgid "Argparse Tutorial" msgstr "آموزش Argparse" -msgid "author" -msgstr "نویسنده" - -msgid "Tshepang Mbambo" -msgstr "Tshepang Mbambo" - msgid "This tutorial is intended to be a gentle introduction to :mod:`argparse`, the recommended command-line parsing module in the Python standard library." msgstr "این آموزش در نظر دارد مقدمه‌ای ملایم به :mod:`argparse`، ماژول توصیه‌شده برای تجزیه خط فرمان در کتابخانه استاندارد پایتون، باشد." @@ -1306,3 +1300,9 @@ msgstr "نتیجه‌گیری" msgid "The :mod:`argparse` module offers a lot more than shown here. Its docs are quite detailed and thorough, and full of examples. Having gone through this tutorial, you should easily digest them without feeling overwhelmed." msgstr "ماژول :mod:`argparse` امکانات بسیار بیشتری نسبت به آنچه در اینجا نشان داده شد ارائه می‌دهد. مستندات آن کاملاً دقیق و جامع و سرشار از مثال است. پس از گذراندن این آموزش، باید بتوانید به‌راحتی آن‌ها را درک کنید، بدون آن‌که احساس کنید مطالب برایتان سنگین است." + +#~ msgid "author" +#~ msgstr "نویسنده" + +#~ msgid "Tshepang Mbambo" +#~ msgstr "Tshepang Mbambo" diff --git a/howto/curses.po b/howto/curses.po index 3334a179..a2e952ed 100644 --- a/howto/curses.po +++ b/howto/curses.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-21 13:28+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -27,18 +27,6 @@ msgstr "" msgid "Curses Programming with Python" msgstr "برنامه‌نویسی Curses با پایتون" -msgid "Author" -msgstr "نویسنده" - -msgid "A.M. Kuchling, Eric S. Raymond" -msgstr "A.M. Kuchling, Eric S. Raymond" - -msgid "Release" -msgstr "انتشار" - -msgid "2.04" -msgstr "2.04" - msgid "Abstract" msgstr "چکیده" @@ -531,3 +519,15 @@ msgstr "`\"Use curses... don't swear\" `_: video of a PyCon CA 2012 talk demonstrating some applications written using Urwid." msgstr "`\"Console Applications with Urwid\" `_: ویدیویی از یک سخنرانی در PyCon CA 2012 که برخی برنامه‌های نوشته‌شده با استفاده از Urwid را نمایش می‌دهد." + +#~ msgid "Author" +#~ msgstr "نویسنده" + +#~ msgid "A.M. Kuchling, Eric S. Raymond" +#~ msgstr "A.M. Kuchling, Eric S. Raymond" + +#~ msgid "Release" +#~ msgstr "انتشار" + +#~ msgid "2.04" +#~ msgstr "2.04" diff --git a/howto/descriptor.po b/howto/descriptor.po index d54bc51a..fc5b186d 100644 --- a/howto/descriptor.po +++ b/howto/descriptor.po @@ -8,13 +8,14 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" -"PO-Revision-Date: 2026-09-14 10:27+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 19:56+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" @@ -27,18 +28,6 @@ msgstr "" msgid "Descriptor Guide" msgstr "راهنمای توصیف‌گر" -msgid "Author" -msgstr "نویسنده" - -msgid "Raymond Hettinger" -msgstr "ریموند هتینگر" - -msgid "Contact" -msgstr "تماس" - -msgid "" -msgstr "" - msgid "Contents" msgstr "فهرست مطالب" @@ -780,7 +769,7 @@ msgid "" "\n" "def object_getattribute(obj, name):\n" " \"Emulate PyObject_GenericGetAttr() in Objects/object.c\"\n" -" null = object()\n" +" null = sentinel('null')\n" " objtype = type(obj)\n" " cls_var = find_name_in_mro(objtype, name, null)\n" " descr_get = getattr(type(cls_var), '__get__', null)\n" @@ -805,7 +794,7 @@ msgstr "" "\n" "def object_getattribute(obj, name):\n" " \"Emulate PyObject_GenericGetAttr() in Objects/object.c\"\n" -" null = object()\n" +" null = sentinel('null')\n" " objtype = type(obj)\n" " cls_var = find_name_in_mro(objtype, name, null)\n" " descr_get = getattr(type(cls_var), '__get__', null)\n" @@ -1696,7 +1685,7 @@ msgid "It is not possible to create an exact drop-in pure Python version of ``__ msgstr "ایجاد یک نسخه‌ی پایتون خالصِ دقیق و کاملاً جایگزین (drop-in) از ``__slots__`` ممکن نیست، زیرا به دسترسی مستقیم به ساختارهای C و کنترل بر تخصیص حافظه‌ی شیء نیاز دارد. با این حال، می‌توانیم یک شبیه‌سازی تا حد زیادی وفادار بسازیم که در آن ساختار C واقعی جایگاه‌ها با یک فهرست خصوصی ``_slotvalues`` شبیه‌سازی می‌شود. عملیات خواندن و نوشتن روی آن ساختار خصوصی توسط توصیف‌گرهای عضو مدیریت می‌شود:" msgid "" -"null = object()\n" +"null = sentinel('null')\n" "\n" "class Member:\n" "\n" @@ -1732,7 +1721,7 @@ msgid "" " 'Emulate member_repr() in Objects/descrobject.c'\n" " return f''" msgstr "" -"null = object()\n" +"null = sentinel('null')\n" "\n" "class Member:\n" "\n" @@ -1931,3 +1920,15 @@ msgstr "" "Traceback (most recent call last):\n" " ...\n" "AttributeError: 'H' object has no attribute 'xz'" + +#~ msgid "Author" +#~ msgstr "نویسنده" + +#~ msgid "Raymond Hettinger" +#~ msgstr "ریموند هتینگر" + +#~ msgid "Contact" +#~ msgstr "تماس" + +#~ msgid "" +#~ msgstr "" diff --git a/howto/enum.po b/howto/enum.po index f9250fef..576d7023 100644 --- a/howto/enum.po +++ b/howto/enum.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 00:53+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -616,8 +617,8 @@ msgstr "" ">>> Color.BLUE == Color.BLUE\n" "True" -msgid "Comparisons against non-enumeration values will always compare not equal (again, :class:`IntEnum` was explicitly designed to behave differently, see below)::" -msgstr "مقایسه‌ها با مقادیر غیرشمارشی همیشه نابرابر ارزیابی می‌شوند (باز هم، :class:`IntEnum` به‌صراحت برای رفتار متفاوتی طراحی شده است، در زیر ببینید)::" +msgid "Equality comparisons against non-enumeration values will always return ``False`` (again, :class:`IntEnum` was explicitly designed to behave differently, see below)::" +msgstr "مقایسه‌های برابری با مقادیر غیرعضوِ شمارشگر همیشه مقدار ``False`` را برمی‌گردانند (دوباره ذکر می‌شود که :class:`IntEnum` صراحتاً به‌گونه‌ای طراحی شده است که رفتار متفاوتی داشته باشد، در ادامه ببینید)::" msgid "" ">>> Color.BLUE == 2\n" diff --git a/howto/free-threading-extensions.po b/howto/free-threading-extensions.po index 47c1bd16..5cb39404 100644 --- a/howto/free-threading-extensions.po +++ b/howto/free-threading-extensions.po @@ -7,12 +7,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 16:17+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -59,8 +60,8 @@ msgstr "بسته به اینکه یک ماژول توسعه از مقدارده msgid "Multi-Phase Initialization" msgstr "مقداردهی اولیه‌ی چندمرحله‌ای" -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 definition. If your extension supports older versions of CPython, you should guard the slot with a :c:data:`PY_VERSION_HEX` check." -msgstr "افزونه‌هایی که از مقداردهی اولیه چندمرحله‌ای (یعنی :c:func:`PyModuleDef_Init`) استفاده می‌کنند، باید یک جایگاه :c:data:`Py_mod_gil` در تعریف ماژول اضافه کنند. اگر افزونه‌ی شما از نسخه‌های قدیمی‌تر CPython پشتیبانی می‌کند، باید این جایگاه را با یک بررسی :c:data:`PY_VERSION_HEX` محافظت کنید." +msgid "Extensions that use :ref:`multi-phase initialization ` (functions like :c:func:`PyModuleDef_Init`, :c:func:`PyModExport_* ` export hook, :c:func:`PyModule_FromSlotsAndSpec`) should add a :c:data:`Py_mod_gil` slot in the module definition. If your extension supports older versions of CPython, you should guard the slot with a :c:data:`PY_VERSION_HEX` check." +msgstr "افزونه‌هایی که از :ref:`مقداردهی اولیه چندمرحله‌ای ` (تابعونی مانند :c:func:`PyModuleDef_Init`، قلاب اکسپورت :c:func:`PyModExport_* `، و :c:func:`PyModule_FromSlotsAndSpec`) استفاده می‌کنند، باید یک :c:data:`Py_mod_gil` جایگاه در تعریف ماژول اضافه کنند. اگر افزونه‌ی شما از نسخه‌های قدیمی‌تر سی‌پایتون پشتیبانی می‌کند، باید این جایگاه را با یک بررسی :c:data:`PY_VERSION_HEX` محافظت کنید." msgid "" "static struct PyModuleDef_Slot module_slots[] = {\n" @@ -69,12 +70,6 @@ msgid "" " {Py_mod_gil, Py_MOD_GIL_NOT_USED},\n" "#endif\n" " {0, NULL}\n" -"};\n" -"\n" -"static struct PyModuleDef moduledef = {\n" -" PyModuleDef_HEAD_INIT,\n" -" .m_slots = module_slots,\n" -" ...\n" "};" msgstr "" "static struct PyModuleDef_Slot module_slots[] = {\n" @@ -83,19 +78,13 @@ msgstr "" " {Py_mod_gil, Py_MOD_GIL_NOT_USED},\n" "#endif\n" " {0, NULL}\n" -"};\n" -"\n" -"static struct PyModuleDef moduledef = {\n" -" PyModuleDef_HEAD_INIT,\n" -" .m_slots = module_slots,\n" -" ...\n" "};" msgid "Single-Phase Initialization" msgstr "مقداردهی اولیه‌ی تک‌مرحله‌ای" -msgid "Extensions that use single-phase initialization (i.e., :c:func:`PyModule_Create`) should call :c:func:`PyUnstable_Module_SetGIL` to indicate that they support running with the GIL disabled. The function is only defined in the free-threaded build, so you should guard the call with ``#ifdef Py_GIL_DISABLED`` to avoid compilation errors in the regular build." -msgstr "افزونه‌هایی که از راه‌اندازی تک‌مرحله‌ای (یعنی :c:func:`PyModule_Create`) استفاده می‌کنند، باید :c:func:`PyUnstable_Module_SetGIL` را فراخوانی کنند تا نشان دهند که از اجرا با GIL غیرفعال پشتیبانی می‌کنند. این تابع فقط در ساخت نخ‌آزاد شده است، بنابراین باید فراخوانی را با ``#ifdef Py_GIL_DISABLED`` محافظت کنید تا از خطاهای کامپایل در ساخت معمولی جلوگیری شود." +msgid "Extensions that use legacy :ref:`single-phase initialization ` (that is, :c:func:`PyModule_Create`) should call :c:func:`PyUnstable_Module_SetGIL` to indicate that they support running with the GIL disabled. The function is only defined in the free-threaded build, so you should guard the call with ``#ifdef Py_GIL_DISABLED`` to avoid compilation errors in the regular build." +msgstr "افزونه‌هایی که از :ref:`مقداردهی اولیه تک‌مرحله‌ای ` قدیمی (یعنی :c:func:`PyModule_Create`) استفاده می‌کنند، باید :c:func:`PyUnstable_Module_SetGIL` را فراخوانی کنند تا نشان دهند از اجرا با غیرفعال بودن GIL پشتیبانی می‌کنند. این تابع فقط در ساخت نخ‌آزاد تعریف شده است، بنابراین باید فراخوانی را با ``#ifdef Py_GIL_DISABLED`` محافظت کنید تا از خطاهای کامپایل در ساخت معمولی جلوگیری شود." msgid "" "static struct PyModuleDef moduledef = {\n" @@ -229,14 +218,14 @@ msgstr ":c:func:`PyDict_Next`" msgid "none (see :ref:`PyDict_Next`)" msgstr "هیچ (به :ref:`PyDict_Next` رجوع کنید)" -msgid ":c:func:`PyWeakref_GetObject`" -msgstr ":c:func:`PyWeakref_GetObject`" +msgid ":c:func:`!PyWeakref_GetObject`" +msgstr ":c:func:`!PyWeakref_GetObject`" msgid ":c:func:`PyWeakref_GetRef`" msgstr ":c:func:`PyWeakref_GetRef`" -msgid ":c:func:`PyWeakref_GET_OBJECT`" -msgstr ":c:func:`PyWeakref_GET_OBJECT`" +msgid ":c:func:`!PyWeakref_GET_OBJECT`" +msgstr ":c:func:`!PyWeakref_GET_OBJECT`" msgid ":c:func:`PyImport_AddModule`" msgstr ":c:func:`PyImport_AddModule`" @@ -271,6 +260,9 @@ msgstr "وضعیت نخ و APIهای GIL" msgid "Python provides a set of functions and macros to manage thread state and the GIL, such as:" msgstr "پایتون مجموعه‌ای از توابع و ماکروها را برای مدیریت وضعیت نخ و GIL فراهم می‌کند، مانند:" +msgid ":c:func:`PyThreadState_Ensure`, :c:func:`PyThreadState_EnsureFromView`, and :c:func:`PyThreadState_Release`" +msgstr ":c:func:`PyThreadState_Ensure`، :c:func:`PyThreadState_EnsureFromView` و :c:func:`PyThreadState_Release`" + msgid ":c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release`" msgstr ":c:func:`PyGILState_Ensure` و :c:func:`PyGILState_Release`" @@ -280,8 +272,8 @@ msgstr ":c:func:`PyEval_SaveThread` و :c:func:`PyEval_RestoreThread`" msgid ":c:macro:`Py_BEGIN_ALLOW_THREADS` and :c:macro:`Py_END_ALLOW_THREADS`" msgstr ":c:macro:`Py_BEGIN_ALLOW_THREADS` و :c:macro:`Py_END_ALLOW_THREADS`" -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 create a thread outside of Python, you must call :c:func:`PyGILState_Ensure` before calling into the Python API to ensure that the thread has a valid Python thread state." -msgstr "همچنان باید از این توابع در ساخت با نخ‌های آزاد (free-threaded build) برای مدیریت وضعیت نخ استفاده شود، حتی زمانی که :term:`GIL` غیرفعال باشد. برای مثال، اگر نخی خارج از پایتون ایجاد می‌کنید، باید پیش از فراخوانی API پایتون، :c:func:`PyGILState_Ensure` را فراخوانی کنید تا اطمینان حاصل شود که آن نخ دارای وضعیت نخ پایتون معتبری است." +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 create a thread outside of Python, you must call :c:func:`PyThreadState_Ensure` before calling into the Python API to ensure that the thread has a valid Python thread state." +msgstr "این توابع همچنان باید در ساخت نخ‌آزاد برای مدیریت وضعیت نخ حتی زمانی که :term:`GIL` غیرفعال است، استفاده شوند. برای مثال، اگر نخی را خارج از پایتون ایجاد کنید، باید پیش از فراخوانی API پایتون، تابع :c:func:`PyThreadState_Ensure` را فراخوانی کنید تا مطمئن شوید که نخ دارای وضعیت نخ معتبری در پایتون است." 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 acquisitions, to allow other threads to run the :term:`cyclic garbage collector `." msgstr "شما باید همچنان :c:func:`PyEval_SaveThread` یا :c:macro:`Py_BEGIN_ALLOW_THREADS` را در اطراف عملیات مسدودکننده، مانند I/O یا کسب قفل، فراخوانی کنید تا نخ‌های دیگر بتوانند :term:`زباله‌روبی چرخه‌ای ` را اجرا کنند." @@ -413,6 +405,21 @@ msgstr "هنگام استفاده از :c:macro:`Py_BEGIN_CRITICAL_SECTION2`، msgid "Remember that the critical section macros are primarily for protecting access to *Python objects* that might be involved in internal CPython operations susceptible to the deadlock scenarios described above. For protecting purely internal extension state, standard mutexes or other synchronization primitives might be more appropriate." msgstr "به یاد داشته باشید که ماکروهای بخش بحرانی عمدتاً برای محافظت از دسترسی به *اشیای پایتون* به کار می‌روند؛ این اشیاء ممکن است در عملیات داخلی CPython که مستعد سناریوهای بن‌بست توصیف‌شده در بالا هستند، دخیل باشند. برای محافظت از وضعیت کاملاً داخلی افزونه، ممکن است قفل‌های متقابل استاندارد یا دیگر سازوکارهای همگام‌سازی مناسب‌تر باشند." +msgid "Per-Object Locks (``ob_mutex``)" +msgstr "قفل‌های مخصوص هر شیء (``ob_mutex``)" + +msgid "In the free-threaded build, each Python object contains a :c:member:`~PyObject.ob_mutex` field of type :c:type:`PyMutex`. This mutex is **reserved for use by the critical section API** (:c:macro:`Py_BEGIN_CRITICAL_SECTION` / :c:macro:`Py_END_CRITICAL_SECTION`)." +msgstr "در ساخت نخ‌آزاد، هر شیء پایتون شامل یک فیلد :c:member:`~PyObject.ob_mutex` از نوع :c:type:`PyMutex` است. این قفل متقابل **برای استفاده توسط API بخش بحرانی** (:c:macro:`Py_BEGIN_CRITICAL_SECTION` / :c:macro:`Py_END_CRITICAL_SECTION`) **رزرو شده است**." + +msgid "Do **not** lock ``ob_mutex`` directly with ``PyMutex_Lock(&obj->ob_mutex)``. Mixing direct ``PyMutex_Lock`` calls with the critical section API on the same mutex can cause deadlocks." +msgstr "``ob_mutex`` را مستقیماً با ``PyMutex_Lock(&obj->ob_mutex)`` قفل **نکنید**. ترکیب فراخوانی‌های مستقیم ``PyMutex_Lock`` با API بخش بحرانی روی همان قفل متقابل می‌تواند باعث ایجاد بن‌بست شود." + +msgid "Even if your own code never uses critical sections on a particular object type, **CPython internals may use the critical section API on any Python object**." +msgstr "حتی اگر کد خودتان هرگز از بخش‌های بحرانی روی یک نوع شیء خاص استفاده نکند، **بخش‌های داخلی سی‌پایتون ممکن است از API بخش بحرانی روی هر شیء پایتونی استفاده کنند**." + +msgid "If your extension type needs its own lock, add a separate :c:type:`PyMutex` field (or another synchronization primitive) to your object struct. :c:type:`PyMutex` is very lightweight, so there is negligible cost to having an additional one." +msgstr "اگر نوع افزونه‌ی شما به قفل خودش نیاز دارد، یک فیلد مجزای :c:type:`PyMutex` (یا یک اولیه‌ی همگام‌سازی دیگر) به ساختار شیء خود اضافه کنید. :c:type:`PyMutex` بسیار سبک است، بنابراین داشتن یک قفل اضافی هزینه‌ی ناچیزی دارد." + msgid "Building Extensions for the Free-Threaded Build" msgstr "ساخت افزونه‌ها برای ساخت نخ‌آزاد (Free-Threaded Build)" diff --git a/howto/functional.po b/howto/functional.po index 1248d638..a48a9cb2 100644 --- a/howto/functional.po +++ b/howto/functional.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 14:19+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -27,18 +28,6 @@ msgstr "" msgid "Functional Programming HOWTO" msgstr "راهنمای عملی برنامه‌نویسی تابعی" -msgid "Author" -msgstr "نویسنده" - -msgid "\\A. M. Kuchling" -msgstr "\\A. M. Kuchling" - -msgid "Release" -msgstr "انتشار" - -msgid "0.32" -msgstr "0.32" - msgid "In this document, we'll take a tour of Python's features suitable for implementing programs in a functional style. After an introduction to the concepts of functional programming, we'll look at language features such as :term:`iterator`\\s and :term:`generator`\\s and relevant library modules such as :mod:`itertools` and :mod:`functools`." msgstr "در این سند، مروری بر ویژگی‌های پایتون مناسب برای پیاده‌سازی برنامه‌ها به سبک تابعی خواهیم داشت. پس از مقدمه‌ای بر مفاهیم برنامه‌نویسی تابعی، به ویژگی‌های زبانی مانند :term:`iterator`\\s و :term:`تولیدگر `\\s و ماژول‌های کتابخانه‌ای مرتبط مانند :mod:`itertools` و :mod:`functools` می‌پردازیم." @@ -318,8 +307,8 @@ msgid "" " for expr2 in sequence2\n" " if condition2\n" " for expr3 in sequence3\n" -" ...\n" " if condition3\n" +" ...\n" " for exprN in sequenceN\n" " if conditionN )" msgstr "" @@ -328,8 +317,8 @@ msgstr "" " for expr2 in sequence2\n" " if condition2\n" " for expr3 in sequence3\n" -" ...\n" " if condition3\n" +" ...\n" " for exprN in sequenceN\n" " if conditionN )" @@ -1237,8 +1226,8 @@ msgstr "من این قوانین را بسیار می‌پسندم، اما شم msgid "Revision History and Acknowledgements" msgstr "تاریخچه‌ی بازبینی و سپاسگزاری‌ها" -msgid "The author would like to thank the following people for offering suggestions, corrections and assistance with various drafts of this article: Ian Bicking, Nick Coghlan, Nick Efford, Raymond Hettinger, Jim Jewett, Mike Krell, Leandro Lameiro, Jussi Salmela, Collin Winter, Blake Winton." -msgstr "نویسنده مایل است از افراد زیر برای ارائه پیشنهادها، اصلاحات و کمک در پیش‌نویس‌های مختلف این مقاله قدردانی کند: Ian Bicking، Nick Coghlan، Nick Efford، Raymond Hettinger، Jim Jewett، Mike Krell، Leandro Lameiro، Jussi Salmela، Collin Winter، Blake Winton." +msgid "This HOWTO was originally written by A. M. Kuchling. The author would like to thank the following people for offering suggestions, corrections and assistance with various drafts of this article: Ian Bicking, Nick Coghlan, Nick Efford, Raymond Hettinger, Jim Jewett, Mike Krell, Leandro Lameiro, Jussi Salmela, Collin Winter, Blake Winton." +msgstr "این راهنمای عملی در ابتدا توسط A. M. Kuchling نوشته شده است. نویسنده مایل است از افراد زیر برای ارائه‌ی پیشنهادها، اصلاحات و کمک در پیش‌نویس‌های مختلف این مقاله تشکر کند: Ian Bicking، Nick Coghlan، Nick Efford، Raymond Hettinger، Jim Jewett، Mike Krell، Leandro Lameiro، Jussi Salmela، Collin Winter، Blake Winton." msgid "Version 0.1: posted June 30 2006." msgstr "نسخه‌ی 0.1: منتشرشده در ۳۰ ژوئن ۲۰۰۶." @@ -1285,8 +1274,8 @@ msgstr "مختص پایتون" msgid "https://gnosis.cx/TPiP/: The first chapter of David Mertz's book :title-reference:`Text Processing in Python` discusses functional programming for text processing, in the section titled \"Utilizing Higher-Order Functions in Text Processing\"." msgstr "https://gnosis.cx/TPiP/: فصل نخست کتاب دیوید مرتز :title-reference:`Text Processing in Python` در بخشی با عنوان «به‌کارگیری توابع مرتبه بالاتر در پردازش متن» به برنامه‌نویسی تابعی برای پردازش متن می‌پردازد." -msgid "Mertz also wrote a 3-part series of articles on functional programming for IBM's DeveloperWorks site; see `part 1 `__, `part 2 `__, and `part 3 `__," -msgstr "مرتز همچنین مجموعه‌ای ۳ قسمتی از مقالات درباره‌ی برنامه‌نویسی تابعی برای وب‌سایت DeveloperWorks شرکت IBM نوشت؛ `بخش ۱ `__، `بخش ۲ `__، و `بخش ۳ `__ را ببینید،" +msgid "Mertz also wrote a 3-part series of articles on functional programming for IBM's DeveloperWorks site; see `part 1 `__, `part 2 `__, and `part 3 `__." +msgstr "مرتز (Mertz) همچنین یک مجموعه‌مقاله ۳بخشی درباره‌ی برنامه‌نویسی تابعی برای سایت DeveloperWorks شرکت IBM نوشته است؛ نگاه کنید به `بخش ۱ `__، `بخش ۲ `__ و `بخش ۳ `__." msgid "Python documentation" msgstr "مستندات پایتون" @@ -1305,3 +1294,15 @@ msgstr ":pep:`289`: «عبارت‌های تولیدگر»" msgid ":pep:`342`: \"Coroutines via Enhanced Generators\" describes the new generator features in Python 2.5." msgstr ":pep:`342`: «Coroutines via Enhanced Generators» قابلیت‌های جدید تولیدگر در پایتون 2.5 را توصیف می‌کند." + +#~ msgid "Author" +#~ msgstr "نویسنده" + +#~ msgid "\\A. M. Kuchling" +#~ msgstr "\\A. M. Kuchling" + +#~ msgid "Release" +#~ msgstr "انتشار" + +#~ msgid "0.32" +#~ msgstr "0.32" diff --git a/howto/gdb_helpers.po b/howto/gdb_helpers.po index 9d4c38bb..3a215227 100644 --- a/howto/gdb_helpers.po +++ b/howto/gdb_helpers.po @@ -6,12 +6,13 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2024-02-25 01:11+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -141,7 +142,7 @@ msgid "" " at Objects/unicodeobject.c:551\n" "#7 0x0000000000440d94 in PyUnicodeUCS2_FromString (u=0x5c2b8d \"__lltrace__\") at Objects/unicodeobject.c:569\n" "#8 0x0000000000584abd in PyDict_GetItemString (v=\n" -" {'Yuck': , '__builtins__': , '__file__': 'Lib/test/crashers/nasty_eq_vs_dict.py', '__package__': None, 'y': , 'dict': {0: 0, 1: 1, 2: 2, 3: 3}, '__cached__': None, '__name__': '__main__', 'z': , '__doc__': None}, key=\n" +" {'Yuck': , '__builtins__': , '__file__': 'Lib/test/crashers/nasty_eq_vs_dict.py', '__package__': None, 'y': , 'dict': {0: 0, 1: 1, 2: 2, 3: 3}, '__name__': '__main__', 'z': , '__doc__': None}, key=\n" " 0x5c2b8d \"__lltrace__\") at Objects/dictobject.c:2171" msgstr "" "#0 0x000000000041a6b1 in PyObject_Malloc (nbytes=Cannot access memory at address 0x7fffff7fefe8\n" @@ -157,7 +158,7 @@ msgstr "" " at Objects/unicodeobject.c:551\n" "#7 0x0000000000440d94 in PyUnicodeUCS2_FromString (u=0x5c2b8d \"__lltrace__\") at Objects/unicodeobject.c:569\n" "#8 0x0000000000584abd in PyDict_GetItemString (v=\n" -" {'Yuck': , '__builtins__': , '__file__': 'Lib/test/crashers/nasty_eq_vs_dict.py', '__package__': None, 'y': , 'dict': {0: 0, 1: 1, 2: 2, 3: 3}, '__cached__': None, '__name__': '__main__', 'z': , '__doc__': None}, key=\n" +" {'Yuck': , '__builtins__': , '__file__': 'Lib/test/crashers/nasty_eq_vs_dict.py', '__package__': None, 'y': , 'dict': {0: 0, 1: 1, 2: 2, 3: 3}, '__name__': '__main__', 'z': , '__doc__': None}, key=\n" " 0x5c2b8d \"__lltrace__\") at Objects/dictobject.c:2171" msgid "Notice how the dictionary argument to ``PyDict_GetItemString`` is displayed as its ``repr()``, rather than an opaque ``PyObject *`` pointer." diff --git a/howto/index.po b/howto/index.po index 2c1fe28e..46cf6cf8 100644 --- a/howto/index.po +++ b/howto/index.po @@ -7,12 +7,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 00:53+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -85,6 +86,9 @@ msgstr ":ref:`freethreading-extensions-howto`" msgid ":ref:`isolating-extensions-howto`" msgstr ":ref:`isolating-extensions-howto`" +msgid ":ref:`abi3t-migration-howto`" +msgstr ":ref:`abi3t-migration-howto`" + msgid ":ref:`python_2.3_mro`" msgstr ":ref:`python_2.3_mro`" diff --git a/howto/instrumentation.po b/howto/instrumentation.po index e789f7ee..8c5969c7 100644 --- a/howto/instrumentation.po +++ b/howto/instrumentation.po @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 00:53+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -27,15 +27,6 @@ msgstr "" msgid "Instrumenting CPython with DTrace and SystemTap" msgstr "ابزارسازی CPython با DTrace و SystemTap" -msgid "author" -msgstr "نویسنده" - -msgid "David Malcolm" -msgstr "دیوید مالکوم" - -msgid "Łukasz Langa" -msgstr "Łukasz Langa" - msgid "DTrace and SystemTap are monitoring tools, each providing a way to inspect what the processes on a computer system are doing. They both use domain-specific languages allowing a user to write scripts which:" msgstr "DTrace و SystemTap ابزارهای پایش هستند که هر کدام راهی برای بررسی کارهایی که فرایندهای یک سیستم کامپیوتری انجام می‌دهند، فراهم می‌کنند. هر دوی آن‌ها از زبان‌های خاص‌منظوره استفاده می‌کنند که به کاربر امکان می‌دهند اسکریپت‌هایی بنویسد که:" @@ -664,3 +655,12 @@ msgstr "" " }\n" " delete fn_calls;\n" "}" + +#~ msgid "author" +#~ msgstr "نویسنده" + +#~ msgid "David Malcolm" +#~ msgstr "دیوید مالکوم" + +#~ msgid "Łukasz Langa" +#~ msgstr "Łukasz Langa" diff --git a/howto/ipaddress.po b/howto/ipaddress.po index a96b896b..80d86465 100644 --- a/howto/ipaddress.po +++ b/howto/ipaddress.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 00:53+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -26,15 +26,6 @@ msgstr "" msgid "An introduction to the ipaddress module" msgstr "مقدمه‌ای بر ماژول ipaddress" -msgid "author" -msgstr "نویسنده" - -msgid "Peter Moody" -msgstr "پیتر مودی" - -msgid "Nick Coghlan" -msgstr "Nick Coghlan" - msgid "Overview" msgstr "مرور کلی" @@ -425,3 +416,12 @@ msgstr "" " network = ipaddress.IPv4Network(address)\n" "except ValueError:\n" " print('address/netmask is invalid for IPv4:', address)" + +#~ msgid "author" +#~ msgstr "نویسنده" + +#~ msgid "Peter Moody" +#~ msgstr "پیتر مودی" + +#~ msgid "Nick Coghlan" +#~ msgstr "Nick Coghlan" diff --git a/howto/logging-cookbook.po b/howto/logging-cookbook.po index b03acf48..4427937e 100644 --- a/howto/logging-cookbook.po +++ b/howto/logging-cookbook.po @@ -8,13 +8,14 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" -"PO-Revision-Date: 2026-09-13 15:56+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 20:24+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" @@ -27,12 +28,6 @@ msgstr "" msgid "Logging Cookbook" msgstr "کتاب آشپزی گزارش‌گیری (Logging Cookbook)" -msgid "Author" -msgstr "نویسنده" - -msgid "Vinay Sajip " -msgstr "Vinay Sajip " - msgid "This page contains a number of recipes related to logging, which have been found useful in the past. For links to tutorial and reference information, please see :ref:`cookbook-ref-links`." msgstr "این صفحه حاوی تعدادی دستورالعمل مرتبط با گزارش‌کردن است که در گذشته مفید شناخته شده‌اند. برای پیوندهایی به اطلاعات آموزشی و مرجع، لطفاً :ref:`cookbook-ref-links` را ببینید." @@ -5922,7 +5917,7 @@ msgid "" " def format(self, record):\n" " version = 1\n" " asctime = dt.datetime.fromtimestamp(record.created).isoformat()\n" -" m = self.tz_offset.match(time.strftime('%z'))\n" +" m = self.tz_offset.prefixmatch(time.strftime('%z'))\n" " has_offset = False\n" " if m and time.timezone:\n" " hrs, mins = m.groups()\n" @@ -5984,7 +5979,7 @@ msgstr "" " def format(self, record):\n" " version = 1\n" " asctime = dt.datetime.fromtimestamp(record.created).isoformat()\n" -" m = self.tz_offset.match(time.strftime('%z'))\n" +" m = self.tz_offset.prefixmatch(time.strftime('%z'))\n" " has_offset = False\n" " if m and time.timezone:\n" " hrs, mins = m.groups()\n" @@ -6492,3 +6487,9 @@ msgstr ":ref:`خودآموز مقدماتی `" msgid ":ref:`Advanced Tutorial `" msgstr ":ref:`آموزش پیشرفته `" + +#~ msgid "Author" +#~ msgstr "نویسنده" + +#~ msgid "Vinay Sajip " +#~ msgstr "Vinay Sajip " diff --git a/howto/logging.po b/howto/logging.po index d1dfb7a8..e3cad912 100644 --- a/howto/logging.po +++ b/howto/logging.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 10:26+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -27,12 +27,6 @@ msgstr "" msgid "Logging HOWTO" msgstr "راهنمای گزارش‌گیری" -msgid "Author" -msgstr "نویسنده" - -msgid "Vinay Sajip " -msgstr "Vinay Sajip " - msgid "This page contains tutorial information. For links to reference information and a logging cookbook, please see :ref:`tutorial-ref-links`." msgstr "این صفحه شامل اطلاعات آموزشی است. برای پیوندهایی به اطلاعات مرجع و یک کتابچه‌ی آشپزی برای گزارش‌گیری (logging cookbook)، لطفاً :ref:`tutorial-ref-links` را ببینید." @@ -1049,3 +1043,9 @@ msgstr "هندلرهای مفید موجود در ماژول logging." msgid ":ref:`A logging cookbook `" msgstr ":ref:`کتابچه آشپزی ثبت رویداد `" + +#~ msgid "Author" +#~ msgstr "نویسنده" + +#~ msgid "Vinay Sajip " +#~ msgstr "Vinay Sajip " diff --git a/howto/perf_profiling.po b/howto/perf_profiling.po index 71d3875a..d54d5534 100644 --- a/howto/perf_profiling.po +++ b/howto/perf_profiling.po @@ -7,12 +7,13 @@ # Danial Behzadi , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-11 14:09+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -23,26 +24,20 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Poedit 3.6\n" -msgid "Python support for the Linux ``perf`` profiler" -msgstr "پشتیبانی پایتون از پروفایل‌گیر ``perf`` لینوکس" +msgid "Python support for the ``perf map`` compatible profilers" +msgstr "پشتیبانی پایتون از پروفایل‌گیرهای سازگار با ``perf map``" -msgid "author" -msgstr "نویسنده" +msgid "`The Linux perf profiler `_ and `samply `_ are powerful tools that allow you to profile and obtain information about the performance of your application. Both tools have vibrant ecosystems that aid with the analysis of the data they produce." +msgstr "ابزار پروفایل‌گیر `Linux perf `_ و `samply `_ ابزارهای قدرتمندی هستند که به شما امکان می‌دهند عملکرد برنامه‌ی خود را پروفایل کرده و اطلاعاتی درباره‌ی آن به دست آورید. هر دو ابزار دارای اکوسیستم‌های پویایی هستند که به تحلیل داده‌های تولیدشده توسط آن‌ها کمک می‌کنند." -msgid "Pablo Galindo" -msgstr "پابلو گالیندو" +msgid "The main problem with using these profilers with Python applications is that they only get information about native symbols, that is, the names of functions and procedures written in C. This means that the names and file names of Python functions in your code will not appear in the profiler output." +msgstr "مشکل اصلی استفاده از این پروفایل‌گیرها با برنامه‌های پایتون این است که آن‌ها فقط اطلاعات مربوط به نمادهای بومی، یعنی نام توابع و رویه‌های نوشته‌شده به زبان C را دریافت می‌کنند. این بدان معناست که نام‌ها و نام‌های پرونده‌ی توابع پایتون در کد شما در خروجی پروفایل‌گیر ظاهر نخواهند شد." -msgid "`The Linux perf profiler `_ is a very powerful tool that allows you to profile and obtain information about the performance of your application. ``perf`` also has a very vibrant ecosystem of tools that aid with the analysis of the data that it produces." -msgstr "`پروفایل‌گیر perf لینوکس `_ ابزاری بسیار قدرتمند است که به شما امکان می‌دهد برنامه‌ی خود را پروفایل کنید و اطلاعاتی درباره‌ی عملکرد آن به دست آورید. ``perf`` همچنین اکوسیستم بسیار پویایی از ابزارها دارد که به تحلیل داده‌هایی که تولید می‌کند کمک می‌کنند." +msgid "Since Python 3.12, the interpreter can run in a special mode that allows Python functions to appear in the output of compatible profilers. When this mode is enabled, the interpreter will interpose a small piece of code compiled on the fly before the execution of every Python function and it will teach the profiler the relationship between this piece of code and the associated Python function using :doc:`perf map files <../c-api/perfmaps>`." +msgstr "از پایتون ۳.۱۲ به بعد، مفسر می‌تواند در حالت ویژه‌ای اجرا شود که به توابع پایتون اجازه می‌دهد در خروجی پروفایل‌گیرهای سازگار ظاهر شوند. هنگامی که این حالت فعال است، مفسر قطعه کد کوچکی را که در لحظه (on the fly) کامپایل‌شده است پیش از اجرای هر تابع پایتون قرار می‌دهد و با استفاده از :doc:`perf map files <../c-api/perfmaps>` به پروفایل‌گیر می‌آموزد که رابطه‌ی میان این قطعه کد و تابع پایتون مرتبط چیست." -msgid "The main problem with using the ``perf`` profiler with Python applications is that ``perf`` only gets information about native symbols, that is, the names of functions and procedures written in C. This means that the names and file names of Python functions in your code will not appear in the output of ``perf``." -msgstr "مشکل اصلی استفاده از پروفایل‌گیر (profiler) ``perf`` در برنامه‌های پایتونی این است که ``perf`` فقط اطلاعاتی درباره‌ی نمادهای بومی دریافت می‌کند، یعنی نام توابع و رویه‌هایی که به زبان C نوشته شده‌اند. این بدان معناست که نام توابع پایتونی و نام پرونده‌های آن‌ها در کد شما، در خروجی ``perf`` ظاهر نخواهند شد." - -msgid "Since Python 3.12, the interpreter can run in a special mode that allows Python functions to appear in the output of the ``perf`` profiler. When this mode is enabled, the interpreter will interpose a small piece of code compiled on the fly before the execution of every Python function and it will teach ``perf`` the relationship between this piece of code and the associated Python function using :doc:`perf map files <../c-api/perfmaps>`." -msgstr "از پایتون 3.12، مفسر می‌تواند در حالت ویژه‌ای اجرا شود که به توابع پایتون اجازه می‌دهد در خروجی پروفایل‌گیر ``perf`` ظاهر شوند. هنگامی که این حالت فعال باشد، مفسر پیش از اجرای هر تابع پایتون، یک قطعه‌کد کوچک را که در لحظه کامپایل می‌شود، درج می‌کند و با استفاده از :doc:`perf map files <../c-api/perfmaps>`، رابطه بین این قطعه‌کد و تابع پایتون مرتبط را به ``perf`` می‌آموزد." - -msgid "Support for the ``perf`` profiler is currently only available for Linux on select architectures. Check the output of the ``configure`` build step or check the output of ``python -m sysconfig | grep HAVE_PERF_TRAMPOLINE`` to see if your system is supported." -msgstr "پشتیبانی از پروفایل‌گیر ``perf`` در حال حاضر فقط برای لینوکس در معماری‌های منتخب در دسترس است. برای اینکه ببینید آیا سیستم شما پشتیبانی می‌شود، خروجی مرحله‌ی ساخت ``configure`` یا خروجی ``python -m sysconfig | grep HAVE_PERF_TRAMPOLINE`` را بررسی کنید." +msgid "Support for profiling is available on Linux and macOS on select architectures. Perf is available on Linux, while samply can be used on both Linux and macOS. samply support on macOS is available starting from Python 3.15. Check the output of the ``configure`` build step or check the output of ``python -m sysconfig | grep HAVE_PERF_TRAMPOLINE`` to see if your system is supported." +msgstr "پشتیبانی از پروفایل‌گیری روی لینوکس و مک‌اواس در معماری‌های خاصی در دسترس است. ابزار Perf روی لینوکس در دسترس است، در حالی که samply را می‌توان هم روی لینوکس و هم روی مک‌اواس استفاده کرد. پشتیبانی از samply روی مک‌اواس از پایتون ۳.۱۵ به بعد در دسترس است. خروجی مرحله‌ی ساخت ``configure`` را بررسی کنید یا خروجی دستور ``python -m sysconfig | grep HAVE_PERF_TRAMPOLINE`` را بررسی کنید تا ببینید آیا سیستم شما پشتیبانی می‌شود یا خیر." msgid "For example, consider the following script:" msgstr "برای مثال، اسکریپت زیر را در نظر بگیرید:" @@ -120,7 +115,7 @@ msgid "" " | | | |\n" " | | | |--51.67%--_PyEval_EvalFrameDefault\n" " | | | | |\n" -" | | | | |--11.52%--_PyLong_Add\n" +" | | | | |--11.52%--_PyCompactLong_Add\n" " | | | | | |\n" " | | | | | |--2.97%--_PyObject_Malloc\n" "..." @@ -157,7 +152,7 @@ msgstr "" " | | | |\n" " | | | |--51.67%--_PyEval_EvalFrameDefault\n" " | | | | |\n" -" | | | | |--11.52%--_PyLong_Add\n" +" | | | | |--11.52%--_PyCompactLong_Add\n" " | | | | | |\n" " | | | | | |--2.97%--_PyObject_Malloc\n" "..." @@ -205,7 +200,7 @@ msgid "" " | | | |\n" " | | | |--51.81%--_PyEval_EvalFrameDefault\n" " | | | | |\n" -" | | | | |--13.77%--_PyLong_Add\n" +" | | | | |--13.77%--_PyCompactLong_Add\n" " | | | | | |\n" " | | | | | |--3.26%--_PyObject_Malloc" msgstr "" @@ -245,10 +240,28 @@ msgstr "" " | | | |\n" " | | | |--51.81%--_PyEval_EvalFrameDefault\n" " | | | | |\n" -" | | | | |--13.77%--_PyLong_Add\n" +" | | | | |--13.77%--_PyCompactLong_Add\n" " | | | | | |\n" " | | | | | |--3.26%--_PyObject_Malloc" +msgid "Using the samply profiler" +msgstr "استفاده از پروفایل‌گیر samply" + +msgid "samply is a modern profiler that can be used as an alternative to perf. It uses the same perf map files that Python generates, making it compatible with Python's profiling support. samply is particularly useful on macOS where perf is not available." +msgstr "samply یک پروفایل‌گیر مدرن است که می‌تواند به عنوان جایگزینی برای perf استفاده شود. این ابزار از همان پرونده‌های نگاشت perf که پایتون تولید می‌کند استفاده می‌کند و آن را با پشتیبانی پروفایل‌گیری پایتون سازگار می‌سازد. samply به‌ویژه در macOS که perf در دسترس نیست، بسیار مفید است." + +msgid "To use samply with Python, first install it following the instructions at https://github.com/mstange/samply, then run::" +msgstr "برای استفاده از samply با پایتون، ابتدا آن را با پیروی از دستورالعمل‌های موجود در https://github.com/mstange/samply نصب کنید، سپس این دستور را اجرا کنید::" + +msgid "$ samply record PYTHONPERFSUPPORT=1 python my_script.py" +msgstr "$ samply record PYTHONPERFSUPPORT=1 python my_script.py" + +msgid "This will open a web interface where you can analyze the profiling data interactively. The advantage of samply is that it provides a modern web-based interface for analyzing profiling data and works on both Linux and macOS." +msgstr "این کار یک رابط وب را باز می‌کند که در آن می‌توانید داده‌های پروفایل‌گیری را به‌صورت تعاملی تحلیل کنید. مزیت samply این است که یک رابط مدرن مبتنی بر وب برای تحلیل داده‌های پروفایل‌گیری فراهم می‌کند و هم روی لینوکس و هم روی مک‌اواس کار می‌کند." + +msgid "On macOS, samply support requires Python 3.15 or later. Also on macOS, samply can't profile signed Python executables due to restrictions by macOS. You can profile with Python binaries that you've compiled yourself, or which are unsigned or locally-signed (such as anything installed by Homebrew). In order to attach to running processes on macOS, run ``samply setup`` once (and every time samply is updated) to self-sign the samply binary." +msgstr "روی مک‌اواس، پشتیبانی samply به پایتون ۳.۱۵ یا بالاتر نیاز دارد. همچنین روی مک‌اواس، samply نمی‌تواند فایل‌های اجرایی امضاشده‌ی پایتون را به دلیل محدودیت‌های مک‌اواس پروفایل کند. می‌توانید با باینری‌های پایتون که خودتان کامپایل کرده‌اید، یا باینری‌های امضانشده یا امضاشده‌ی محلی (مانند هر چیزی که توسط Homebrew نصب شده است) پروفایل‌گیری کنید. برای اتصال به فرایندهای در حال اجرا روی مک‌اواس، دستور ``samply setup`` را یک بار (و در هر بار به‌روزرسانی samply) اجرا کنید تا باینری samply را خودامضا کنید." + msgid "How to enable ``perf`` profiling support" msgstr "چگونه پشتیبانی از پروفایل‌گیری ``perf`` را فعال کنیم" @@ -311,8 +324,8 @@ msgstr "" msgid "How to obtain the best results" msgstr "چگونه بهترین نتایج را به دست آوریم" -msgid "For best results, Python should be compiled with ``CFLAGS=\"-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer\"`` as this allows profilers to unwind using only the frame pointer and not on DWARF debug information. This is because as the code that is interposed to allow ``perf`` support is dynamically generated it doesn't have any DWARF debugging information available." -msgstr "برای رسیدن به بهترین نتایج، پایتون باید با ``CFLAGS=\"-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer\"`` کامپایل شود، زیرا این کار به ابزارهای پروفایل‌گیری اجازه می‌دهد تا فقط با استفاده از اشاره‌گر فریم (frame pointer) و بدون اتکا به اطلاعات اشکال‌زدایی DWARF، پشته را باز کنند (unwind). دلیل این امر آن است که چون کدی که برای امکان‌پذیر کردن پشتیبانی از ``perf`` میان‌گذاری می‌شود به‌صورت پویا تولید می‌شود، هیچ اطلاعات اشکال‌زدایی DWARF برای آن در دسترس نیست." +msgid "For best results, keep frame pointers enabled. On supported GCC-compatible toolchains, CPython builds itself with ``-fno-omit-frame-pointer`` and similar flags (see :option:`--without-frame-pointers` for details). These flags allow profilers to unwind using only the frame pointer and not on DWARF debug information. This is because as the code that is interposed to allow ``perf`` support is dynamically generated it doesn't have any DWARF debugging information available." +msgstr "برای کسب بهترین نتیجه، اشاره‌گرهای قاب را فعال نگه دارید. روی زنجیره‌ابزارهای سازگار با GCC که پشتیبانی می‌شوند، سی‌پایتون خودش را با پرچم‌های ``-fno-omit-frame-pointer`` و مشابه آن می‌سازد (برای جزئیات بیشتر :option:`--without-frame-pointers` را ببینید). این پرچم‌ها به پروفایل‌گیرها اجازه می‌دهند تا با استفاده تنها از اشاره‌گر قاب و نه اطلاعات اشکال‌زدایی DWARF، پشته‌گشایی (unwind) کنند. دلیل این امر آن است که کدی که برای فراهم کردن پشتیبانی از ``perf`` میان‌گذاری (interpose) می‌شود، به شکل پویا تولید شده است و هیچ اطلاعات اشکال‌زدایی DWARFی در دسترس ندارد." msgid "You can check if your system has been compiled with this flag by running::" msgstr "می‌توانید با اجرای دستور زیر بررسی کنید که آیا سیستم شما با این پرچم کامپایل شده است::" @@ -388,3 +401,9 @@ msgstr "افزودن بهینه‌سازی‌ها (``-O1``، ``-O2`` و غیره msgid "Frame pointers (``-fno-omit-frame-pointer``) generally provide more reliable stack unwinding" msgstr "اشاره‌گرهای فریم (``-fno-omit-frame-pointer``) معمولاً باز شدن قابل‌اطمینان‌تر پشته را فراهم می‌کنند" + +#~ msgid "author" +#~ msgstr "نویسنده" + +#~ msgid "Pablo Galindo" +#~ msgstr "پابلو گالیندو" diff --git a/howto/pyporting.po b/howto/pyporting.po index 82daa5fe..e426cf56 100644 --- a/howto/pyporting.po +++ b/howto/pyporting.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 13:25+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -27,12 +27,6 @@ msgstr "" msgid "How to port Python 2 Code to Python 3" msgstr "چگونه کد پایتون 2 را به پایتون 3 منتقل کنیم" -msgid "author" -msgstr "نویسنده" - -msgid "Brett Cannon" -msgstr "Brett Cannon" - msgid "Python 2 reached its official end-of-life at the start of 2020. This means that no new bug reports, fixes, or changes will be made to Python 2 - it's no longer supported: see :pep:`373` and `status of Python versions `_." msgstr "پایتون 2 در آغاز سال ۲۰۲۰ به پایان عمر رسمی خود رسید. این بدان معناست که دیگر هیچ گزارش اشکال، رفع اشکال یا تغییر جدیدی برای پایتون 2 انجام نخواهد شد — این نسخه دیگر پشتیبانی نمی‌شود: :pep:`373` و `وضعیت نسخه‌های پایتون `_ را ببینید." @@ -62,3 +56,9 @@ msgstr "راهنمای `DigitalOcean `_" msgstr "`راهنمای ActiveState `_" + +#~ msgid "author" +#~ msgstr "نویسنده" + +#~ msgid "Brett Cannon" +#~ msgstr "Brett Cannon" diff --git a/howto/regex.po b/howto/regex.po index 5be490b8..2aaf4eef 100644 --- a/howto/regex.po +++ b/howto/regex.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 07:16+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -27,12 +28,6 @@ msgstr "" msgid "Regular expression HOWTO" msgstr "راهنمای عبارت باقاعده" -msgid "Author" -msgstr "نویسنده" - -msgid "A.M. Kuchling " -msgstr "A.M. Kuchling " - msgid "Abstract" msgstr "چکیده" @@ -353,18 +348,18 @@ msgstr "متد/ویژگی" msgid "Purpose" msgstr "هدف" -msgid "``match()``" -msgstr "``match()``" - -msgid "Determine if the RE matches at the beginning of the string." -msgstr "تعیین می‌کند که آیا عبارت باقاعده در ابتدای رشته تطابق دارد یا خیر." - msgid "``search()``" msgstr "``search()``" msgid "Scan through a string, looking for any location where this RE matches." msgstr "یک رشته را پیمایش می‌کند و به دنبال هر موقعیتی می‌گردد که این عبارت باقاعده در آن مطابقت دارد." +msgid "``prefixmatch()``" +msgstr "``prefixmatch()``" + +msgid "Determine if the RE matches at the beginning of the string. Previously named :ref:`match() `." +msgstr "تعیین می‌کند که آیا عبارت باقاعده در ابتدای رشته تطابق پیدا می‌کند یا خیر. این مورد قبلاً :ref:`match() ` نام داشت." + msgid "``findall()``" msgstr "``findall()``" @@ -377,8 +372,8 @@ msgstr "``finditer()``" msgid "Find all substrings where the RE matches, and return them as an :term:`iterator`." msgstr "تمام زیررشته‌هایی را که RE با آن‌ها مطابقت دارد پیدا کنید و آن‌ها را به‌عنوان یک :term:`iterator` برگردانید." -msgid ":meth:`~re.Pattern.match` and :meth:`~re.Pattern.search` return ``None`` if no match can be found. If they're successful, a :ref:`match object ` instance is returned, containing information about the match: where it starts and ends, the substring it matched, and more." -msgstr ":meth:`~re.Pattern.match` و :meth:`~re.Pattern.search` در صورتی که هیچ تطابقی یافت نشود، ``None`` برمی‌گردانند. اگر موفق باشند، نمونه‌ای از :ref:`شیء تطابق ` برگردانده می‌شود که حاوی اطلاعاتی درباره‌ی تطابق است: محل شروع و پایان آن، زیررشته‌ای که با آن تطابق داشته است، و موارد دیگر." +msgid ":meth:`~re.Pattern.search` and :meth:`~re.Pattern.prefixmatch` return ``None`` if no match can be found. If they're successful, a :ref:`match object ` instance is returned, containing information about the match: where it starts and ends, the substring it matched, and more." +msgstr "متد‌های :meth:`~re.Pattern.search` و :meth:`~re.Pattern.prefixmatch` اگر نتوانند تطابقی پیدا کنند، ``None`` برمی‌گردانند. اگر موفق باشند، یک نمونه از :ref:`match object ` برگردانده می‌شود که حاوی اطلاعاتی درباره‌ی تطابق است: این که از کجا شروع می‌شود و به کجا ختم می‌شود، زیررشته‌ای که با آن تطابق پیدا کرده است و موارد بیشتر." msgid "You can learn about this by interactively experimenting with the :mod:`re` module." msgstr "می‌توانید با آزمایش تعاملی ماژول :mod:`re`، درباره این موضوع بیاموزید." @@ -397,27 +392,27 @@ msgstr "" ">>> p\n" "re.compile('[a-z]+')" -msgid "Now, you can try matching various strings against the RE ``[a-z]+``. An empty string shouldn't match at all, since ``+`` means 'one or more repetitions'. :meth:`~re.Pattern.match` should return ``None`` in this case, which will cause the interpreter to print no output. You can explicitly print the result of :meth:`!match` to make this clear. ::" -msgstr "اکنون می‌توانید تطبیق رشته‌های مختلف با عبارت باقاعده ``[a-z]+`` را امتحان کنید. یک رشته خالی به‌هیچ‌وجه نباید تطبیق پیدا کند، زیرا ``+`` به معنای «یک یا چند تکرار» است. در این حالت :meth:`~re.Pattern.match` باید ``None`` برگرداند، که باعث می‌شود مفسر هیچ خروجی چاپ نکند. می‌توانید برای روشن‌تر شدن این موضوع، نتیجه :meth:`!match` را به‌صورت صریح چاپ کنید. ::" +msgid "Now, you can try matching various strings against the RE ``[a-z]+``. An empty string shouldn't match at all, since ``+`` means 'one or more repetitions'. :meth:`~re.Pattern.search` should return ``None`` in this case, which will cause the interpreter to print no output. You can explicitly print the result of :meth:`!search` to make this clear. ::" +msgstr "اکنون می‌توانید تلاش کنید رشته‌های مختلف را با عبارت باقاعده ``[a-z]+`` تطابق دهید. یک رشته‌ی خالی اصلاً نباید تطابق پیدا کند، زیرا ``+`` به معنای «یک یا چند تکرار» است. :meth:`~re.Pattern.search` باید در این حالت ``None`` برگرداند که باعث می‌شود مفسر هیچ خروجی‌ای چاپ نکند. برای واضح شدن این موضوع، می‌توانید نتیجه‌ی :meth:`!search` را به طور صریح چاپ کنید. ::" msgid "" -">>> p.match(\"\")\n" -">>> print(p.match(\"\"))\n" +">>> p.search(\"\")\n" +">>> print(p.search(\"\"))\n" "None" msgstr "" -">>> p.match(\"\")\n" -">>> print(p.match(\"\"))\n" +">>> p.search(\"\")\n" +">>> print(p.search(\"\"))\n" "None" -msgid "Now, let's try it on a string that it should match, such as ``tempo``. In this case, :meth:`~re.Pattern.match` will return a :ref:`match object `, so you should store the result in a variable for later use. ::" -msgstr "اکنون، بیایید آن را روی رشته‌ای که باید با آن تطبیق داشته باشد، مانند ``tempo`` امتحان کنیم. در این حالت، :meth:`~re.Pattern.match` یک :ref:`شیء تطبیق ` برمی‌گرداند، بنابراین باید نتیجه را برای استفاده بعدی در یک متغیر ذخیره کنید. ::" +msgid "Now, let's try it on a string that it should match, such as ``tempo``. In this case, :meth:`~re.Pattern.search` will return a :ref:`match object `, so you should store the result in a variable for later use. ::" +msgstr "اکنون بیایید آن را روی رشته‌ای امتحان کنیم که باید با آن تطابق داشته باشد، مانند ``tempo``. در این حالت، :meth:`~re.Pattern.search` یک :ref:`match object ` برمی‌گرداند، بنابراین باید نتیجه را برای استفاده‌ی بعدی در یک متغیر ذخیره کنید. ::" msgid "" -">>> m = p.match('tempo')\n" +">>> m = p.search('tempo')\n" ">>> m\n" "" msgstr "" -">>> m = p.match('tempo')\n" +">>> m = p.search('tempo')\n" ">>> m\n" "" @@ -466,41 +461,41 @@ msgstr "" ">>> m.span()\n" "(0, 5)" -msgid ":meth:`~re.Match.group` returns the substring that was matched by the RE. :meth:`~re.Match.start` and :meth:`~re.Match.end` return the starting and ending index of the match. :meth:`~re.Match.span` returns both start and end indexes in a single tuple. Since the :meth:`~re.Pattern.match` method only checks if the RE matches at the start of a string, :meth:`!start` will always be zero. However, the :meth:`~re.Pattern.search` method of patterns scans through the string, so the match may not start at zero in that case. ::" -msgstr ":meth:`~re.Match.group` زیررشته‌ای را برمی‌گرداند که با عبارت باقاعده مطابقت داشته است. :meth:`~re.Match.start` و :meth:`~re.Match.end` اندیس‌های شروع و پایان تطابق را برمی‌گردانند. :meth:`~re.Match.span` هر دو اندیس شروع و پایان را در یک تاپل واحد برمی‌گرداند. از آن‌جا که متد :meth:`~re.Pattern.match` فقط بررسی می‌کند که آیا عبارت باقاعده در ابتدای یک رشته تطابق دارد یا خیر، :meth:`!start` همیشه ۰ خواهد بود. با این حال، متد :meth:`~re.Pattern.search` الگوها، رشته را پیمایش می‌کند، بنابراین در آن حالت ممکن است تطابق از ۰ شروع نشود. ::" +msgid ":meth:`~re.Match.group` returns the substring that was matched by the RE. :meth:`~re.Match.start` and :meth:`~re.Match.end` return the starting and ending index of the match. :meth:`~re.Match.span` returns both start and end indexes in a single tuple. The :meth:`~re.Pattern.search` method of patterns scans through the string, so the match may not start at zero. However, the :meth:`~re.Pattern.prefixmatch` method only checks if the RE matches at the start of a string, so :meth:`!start` will always be zero in that case. ::" +msgstr "متد :meth:`~re.Match.group` زیررشته‌ای را برمی‌گرداند که توسط عبارت باقاعده تطابق داده شده است. متد‌های :meth:`~re.Match.start` و :meth:`~re.Match.end` اندیس شروع و پایان تطابق را برمی‌گردانند. متد :meth:`~re.Match.span` هر دو اندیس شروع و پایان را در یک تاپل واحد برمی‌گرداند. متد :meth:`~re.Pattern.search` الگوها را در سراسر رشته پیمایش می‌کند، بنابراین ممکن است تطابق از صفر شروع نشود. با این حال، متد :meth:`~re.Pattern.prefixmatch` فقط بررسی می‌کند که آیا عبارت باقاعده در شروع رشته تطابق دارد یا خیر، بنابراین در آن صورت :meth:`!start` همیشه صفر خواهد بود. ::" msgid "" -">>> print(p.match('::: message'))\n" -"None\n" ">>> m = p.search('::: message'); print(m)\n" "\n" ">>> m.group()\n" "'message'\n" ">>> m.span()\n" -"(4, 11)" +"(4, 11)\n" +">>> print(p.prefixmatch('::: message'))\n" +"None" msgstr "" -">>> print(p.match('::: message'))\n" -"None\n" ">>> m = p.search('::: message'); print(m)\n" "\n" ">>> m.group()\n" "'message'\n" ">>> m.span()\n" -"(4, 11)" +"(4, 11)\n" +">>> print(p.prefixmatch('::: message'))\n" +"None" msgid "In actual programs, the most common style is to store the :ref:`match object ` in a variable, and then check if it was ``None``. This usually looks like::" msgstr "در برنامه‌های واقعی، رایج‌ترین سبک این است که :ref:`شیء تطبیق ` را در یک متغیر ذخیره کنید و سپس بررسی کنید که آیا ``None`` است یا خیر. این معمولاً به این شکل است::" msgid "" "p = re.compile( ... )\n" -"m = p.match( 'string goes here' )\n" +"m = p.search( 'string goes here' )\n" "if m:\n" " print('Match found: ', m.group())\n" "else:\n" " print('No match')" msgstr "" "p = re.compile( ... )\n" -"m = p.match( 'string goes here' )\n" +"m = p.search( 'string goes here' )\n" "if m:\n" " print('Match found: ', m.group())\n" "else:\n" @@ -548,18 +543,18 @@ msgstr "" msgid "Module-level functions" msgstr "توابع سطح ماژول" -msgid "You don't have to create a pattern object and call its methods; the :mod:`re` module also provides top-level functions called :func:`~re.match`, :func:`~re.search`, :func:`~re.findall`, :func:`~re.sub`, and so forth. These functions take the same arguments as the corresponding pattern method with the RE string added as the first argument, and still return either ``None`` or a :ref:`match object ` instance. ::" -msgstr "شما مجبور نیستید یک شیء الگو ایجاد کنید و متدهای آن را فراخوانی کنید؛ ماژول :mod:`re` همچنین توابع سطح بالایی به نام‌های :func:`~re.match`، :func:`~re.search`، :func:`~re.findall`، :func:`~re.sub` و غیره ارائه می‌دهد. این توابع همان آرگومان‌های متد متناظر الگو را، با اضافه شدن رشته RE به‌عنوان اولین آرگومان، می‌پذیرند، و همچنان یا ``None`` یا نمونه‌ای از :ref:`شیء تطبیق ` را برمی‌گردانند. ::" +msgid "You don't have to create a pattern object and call its methods; the :mod:`re` module also provides top-level functions called :func:`~re.search`, :func:`~re.prefixmatch`, :func:`~re.findall`, :func:`~re.sub`, and so forth. These functions take the same arguments as the corresponding pattern method with the RE string added as the first argument, and still return either ``None`` or a :ref:`match object ` instance. ::" +msgstr "شما نیازی به ایجاد یک شیء الگو و فراخوانی متدهای آن ندارید؛ ماژول :mod:`re` همچنین توابع رده‌بالایی به نام‌های :func:`~re.search`، :func:`~re.prefixmatch`، :func:`~re.findall`، :func:`~re.sub` و غیره فراهم می‌کند. این توابع همان آرگومان‌های متد متناظر الگو را می‌پذیرند، با این تفاوت که رشته‌ی عبارت باقاعده به عنوان نخستین آرگومان اضافه شده است، و همچنان یا ``None`` یا یک نمونه‌ی :ref:`match object ` را برمی‌گردانند. ::" msgid "" -">>> print(re.match(r'From\\s+', 'Fromage amk'))\n" +">>> print(re.prefixmatch(r'From\\s+', 'Fromage amk'))\n" "None\n" -">>> re.match(r'From\\s+', 'From amk Thu May 14 19:12:10 1998')\n" +">>> re.prefixmatch(r'From\\s+', 'From amk Thu May 14 19:12:10 1998')\n" "" msgstr "" -">>> print(re.match(r'From\\s+', 'Fromage amk'))\n" +">>> print(re.prefixmatch(r'From\\s+', 'Fromage amk'))\n" "None\n" -">>> re.match(r'From\\s+', 'From amk Thu May 14 19:12:10 1998')\n" +">>> re.prefixmatch(r'From\\s+', 'From amk Thu May 14 19:12:10 1998')\n" "" msgid "Under the hood, these functions simply create a pattern object for you and call the appropriate method on it. They also store the compiled object in a cache, so future calls using the same RE won't need to parse the pattern again and again." @@ -847,11 +842,11 @@ msgstr "گروه‌ها با فرانویسه‌های ``'('`` و ``')'`` مشخ msgid "" ">>> p = re.compile('(ab)*')\n" -">>> print(p.match('ababababab').span())\n" +">>> print(p.search('ababababab').span())\n" "(0, 10)" msgstr "" ">>> p = re.compile('(ab)*')\n" -">>> print(p.match('ababababab').span())\n" +">>> print(p.search('ababababab').span())\n" "(0, 10)" msgid "Groups indicated with ``'('``, ``')'`` also capture the starting and ending index of the text that they match; this can be retrieved by passing an argument to :meth:`~re.Match.group`, :meth:`~re.Match.start`, :meth:`~re.Match.end`, and :meth:`~re.Match.span`. Groups are numbered starting with 0. Group 0 is always present; it's the whole RE, so :ref:`match object ` methods all have group 0 as their default argument. Later we'll see how to express groups that don't capture the span of text that they match. ::" @@ -859,14 +854,14 @@ msgstr "گروه‌های مشخص‌شده با ``'('`` و ``')'`` همچنین msgid "" ">>> p = re.compile('(a)b')\n" -">>> m = p.match('ab')\n" +">>> m = p.search('ab')\n" ">>> m.group()\n" "'ab'\n" ">>> m.group(0)\n" "'ab'" msgstr "" ">>> p = re.compile('(a)b')\n" -">>> m = p.match('ab')\n" +">>> m = p.search('ab')\n" ">>> m.group()\n" "'ab'\n" ">>> m.group(0)\n" @@ -877,7 +872,7 @@ msgstr "زیرگروه‌ها از چپ به راست، از ۱ به بعد شم msgid "" ">>> p = re.compile('(a(b)c)d')\n" -">>> m = p.match('abcd')\n" +">>> m = p.search('abcd')\n" ">>> m.group(0)\n" "'abcd'\n" ">>> m.group(1)\n" @@ -886,7 +881,7 @@ msgid "" "'b'" msgstr "" ">>> p = re.compile('(a(b)c)d')\n" -">>> m = p.match('abcd')\n" +">>> m = p.search('abcd')\n" ">>> m.group(0)\n" "'abcd'\n" ">>> m.group(1)\n" @@ -954,17 +949,17 @@ msgid "Sometimes you'll want to use a group to denote a part of a regular expres msgstr "گاهی ممکن است بخواهید از یک گروه برای مشخص کردن بخشی از یک عبارت باقاعده استفاده کنید، اما مایل به بازیابی محتوای گروه نباشید. می‌توانید این موضوع را با استفاده از یک گروه غیرثبت‌کننده (non-capturing group) به‌صراحت بیان کنید: ``(?:...)``، که در آن می‌توانید ``...`` را با هر عبارت باقاعده دیگری جایگزین کنید. ::" msgid "" -">>> m = re.match(\"([abc])+\", \"abc\")\n" +">>> m = re.search(\"([abc])+\", \"abc\")\n" ">>> m.groups()\n" "('c',)\n" -">>> m = re.match(\"(?:[abc])+\", \"abc\")\n" +">>> m = re.search(\"(?:[abc])+\", \"abc\")\n" ">>> m.groups()\n" "()" msgstr "" -">>> m = re.match(\"([abc])+\", \"abc\")\n" +">>> m = re.search(\"([abc])+\", \"abc\")\n" ">>> m.groups()\n" "('c',)\n" -">>> m = re.match(\"(?:[abc])+\", \"abc\")\n" +">>> m = re.search(\"(?:[abc])+\", \"abc\")\n" ">>> m.groups()\n" "()" @@ -996,11 +991,11 @@ msgid "Additionally, you can retrieve named groups as a dictionary with :meth:`~ msgstr "علاوه بر این، می‌توانید گروه‌های نام‌گذاری‌شده را با :meth:`~re.Match.groupdict` به‌عنوان یک دیکشنری بازیابی کنید::" msgid "" -">>> m = re.match(r'(?P\\w+) (?P\\w+)', 'Jane Doe')\n" +">>> m = re.search(r'(?P\\w+) (?P\\w+)', 'Jane Doe')\n" ">>> m.groupdict()\n" "{'first': 'Jane', 'last': 'Doe'}" msgstr "" -">>> m = re.match(r'(?P\\w+) (?P\\w+)', 'Jane Doe')\n" +">>> m = re.search(r'(?P\\w+) (?P\\w+)', 'Jane Doe')\n" ">>> m.groupdict()\n" "{'first': 'Jane', 'last': 'Doe'}" @@ -1331,25 +1326,28 @@ msgstr "یک کار رایج دیگر، حذف تمام رخدادهای یک ن 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 "به‌طور خلاصه، پیش از مراجعه به ماژول :mod:`re`، در نظر بگیرید که آیا مسئله شما می‌تواند با یک متد رشته‌ای سریع‌تر و ساده‌تر حل شود." -msgid "match() versus search()" -msgstr "match() در برابر search()" +msgid "prefixmatch() (aka match) versus search()" +msgstr "تابع prefixmatch() (معروف به match) در برابر search()" + +msgid ":func:`~re.prefixmatch` was added in Python 3.15 as the :ref:`preferred name ` for :func:`~re.match`. Before this, it was only known as :func:`!match` and the distinction with :func:`~re.search` was often misunderstood." +msgstr "تابع :func:`~re.prefixmatch` در پایتون ۳.۱۵ به عنوان :ref:`نام ترجیحی ` برای :func:`~re.match` اضافه شد. پیش از این، این تابع تنها با نام :func:`!match` شناخته می‌شد و تفاوت آن با :func:`~re.search` اغلب به‌درستی درک نمی‌شد." -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 the string for a match. It's important to keep this distinction in mind. Remember, :func:`!match` will only report a successful match which will start at 0; if the match wouldn't start at zero, :func:`!match` will *not* report it. ::" -msgstr "تابع :func:`~re.match` فقط بررسی می‌کند که آیا RE در ابتدای رشته مطابقت دارد یا خیر، در حالی که :func:`~re.search` رشته را برای یافتن یک مطابقت به سمت جلو پیمایش می‌کند. مهم است که این تمایز را در نظر داشته باشید. به یاد داشته باشید، :func:`!match` فقط مطابقت موفقی را گزارش می‌کند که از ۰ شروع شود؛ اگر مطابقت از صفر شروع نشود، :func:`!match` آن را گزارش *نخواهد کرد*. ::" +msgid ":func:`!prefixmatch` aka :func:`!match` only checks if the RE matches at the beginning of the string while :func:`!search` scans forward through the string for a match. ::" +msgstr "تابع :func:`!prefixmatch` (یا همان :func:`!match`) تنها بررسی می‌کند که آیا عبارت باقاعده در ابتدای رشته مطابقت دارد یا خیر، در حالی که :func:`!search` برای یافتن تطابق، رشته را به سمت جلو اسکن می‌کند. ::" msgid "" -">>> print(re.match('super', 'superstition').span())\n" +">>> print(re.prefixmatch('super', 'superstition').span())\n" "(0, 5)\n" -">>> print(re.match('super', 'insuperable'))\n" +">>> print(re.prefixmatch('super', 'insuperable'))\n" "None" msgstr "" -">>> print(re.match('super', 'superstition').span())\n" +">>> print(re.prefixmatch('super', 'superstition').span())\n" "(0, 5)\n" -">>> print(re.match('super', 'insuperable'))\n" +">>> print(re.prefixmatch('super', 'insuperable'))\n" "None" -msgid "On the other hand, :func:`~re.search` will scan forward through the string, reporting the first match it finds. ::" -msgstr "از سوی دیگر، :func:`~re.search` رشته را به سمت جلو پیمایش می‌کند و اولین تطابقی را که پیدا کند گزارش می‌دهد. ::" +msgid "On the other hand, :func:`~re.search` scans forward through the string, reporting the first match it finds. ::" +msgstr "از سوی دیگر، تابع :func:`~re.search` رشته را به سمت جلو اسکن می‌کند و نخستین تطبیقی را که پیدا کند گزارش می‌دهد. ::" msgid "" ">>> print(re.search('super', 'superstition').span())\n" @@ -1362,11 +1360,8 @@ msgstr "" ">>> print(re.search('super', 'insuperable').span())\n" "(2, 7)" -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.search` instead. The regular expression compiler does some analysis of REs in order to speed up the process of looking for a match. One such analysis figures out what the first character of a match must be; for example, a pattern starting with ``Crow`` must match starting with a ``'C'``. The analysis lets the engine quickly scan through the string looking for the starting character, only trying the full match if a ``'C'`` is found." -msgstr "گاهی ممکن است وسوسه شوید که همچنان از :func:`re.match` استفاده کنید و فقط ``.*`` را به ابتدای عبارت باقاعده‌ی خود اضافه کنید. در برابر این وسوسه مقاومت کنید و به‌جای آن از :func:`re.search` استفاده کنید. کامپایلر عبارت باقاعده، عبارت‌های باقاعده را تا حدی تحلیل می‌کند تا فرایند جست‌وجو برای تطبیق را سرعت بخشد. یکی از این تحلیل‌ها مشخص می‌کند که اولین نویسه‌ی یک تطبیق باید چه باشد؛ برای مثال، الگویی که با ``Crow`` شروع می‌شود باید تطبیق را با یک ``'C'`` آغاز کند. این تحلیل به موتور اجازه می‌دهد رشته را به‌سرعت برای یافتن نویسه‌ی آغازین پیمایش کند و تنها در صورتی که یک ``'C'`` یافت شود، تطبیق کامل را بیازماید." - -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 "افزودن ``.*`` این بهینه‌سازی را بی‌اثر می‌کند و به پیمایش تا پایان رشته و سپس پس‌گرد برای یافتن تطابق برای بقیه‌ی RE نیاز دارد. در عوض از :func:`re.search` استفاده کنید." +msgid "This distinction is important to remember when using the old :func:`~re.match` name in code requiring compatibility with older Python versions." +msgstr "هنگام استفاده از نام قدیمی :func:`~re.match` در کدهایی که به سازگاری با نسخه‌های قدیمی‌تر پایتون نیاز دارند، به خاطر سپردن این تفاوت حائز اهمیت است." msgid "Greedy versus non-greedy" msgstr "حریصانه در برابر غیرحریصانه" @@ -1378,17 +1373,17 @@ msgid "" ">>> s = 'Title'\n" ">>> len(s)\n" "32\n" -">>> print(re.match('<.*>', s).span())\n" +">>> print(re.prefixmatch('<.*>', s).span())\n" "(0, 32)\n" -">>> print(re.match('<.*>', s).group())\n" +">>> print(re.prefixmatch('<.*>', s).group())\n" "Title" msgstr "" ">>> s = 'Title'\n" ">>> len(s)\n" "32\n" -">>> print(re.match('<.*>', s).span())\n" +">>> print(re.prefixmatch('<.*>', s).span())\n" "(0, 32)\n" -">>> print(re.match('<.*>', s).group())\n" +">>> print(re.prefixmatch('<.*>', s).group())\n" "Title" 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 ``>`` can't match at the end of the string, so the regular expression engine has to backtrack character by character until it finds a match for the ``>``. The final match extends from the ``'<'`` in ``''`` to the ``'>'`` in ``''``, which isn't what you want." @@ -1398,10 +1393,10 @@ msgid "In this case, the solution is to use the non-greedy quantifiers ``*?``, ` msgstr "در این حالت، راه‌حل استفاده از کمیت‌گذارهای غیرحریص ``*?``، ``+?``، ``??`` یا ``{m,n}?`` است، که تا حد امکان متن *کمی* را تطبیق می‌دهند. در مثال بالا، بلافاصله پس از تطبیق اولین ``'<'``، تلاش برای تطبیق ``'>'`` انجام می‌شود، و وقتی این تلاش شکست می‌خورد، موتور هر بار یک نویسه جلو می‌رود و در هر مرحله برای تطبیق ``'>'`` دوباره تلاش می‌کند. این دقیقاً نتیجه درست را تولید می‌کند::" msgid "" -">>> print(re.match('<.*?>', s).group())\n" +">>> print(re.prefixmatch('<.*?>', s).group())\n" "" msgstr "" -">>> print(re.match('<.*?>', s).group())\n" +">>> print(re.prefixmatch('<.*?>', s).group())\n" "" 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 cases that will break the obvious regular expression; by the time you've written a regular expression that handles all of the possible cases, the patterns will be *very* complicated. Use an HTML or XML parser module for such tasks.)" @@ -1452,3 +1447,18 @@ msgstr "عبارات باقاعده موضوعی پیچیده هستند. آیا msgid "The most complete book on regular expressions is almost certainly Jeffrey Friedl's Mastering Regular Expressions, published by O'Reilly. Unfortunately, it exclusively concentrates on Perl and Java's flavours of regular expressions, and doesn't contain any Python material at all, so it won't be useful as a reference for programming in Python. (The first edition covered Python's now-removed :mod:`!regex` module, which won't help you much.) Consider checking it out from your library." msgstr "کامل‌ترین کتاب درباره عبارت‌های باقاعده تقریباً با قطعیت کتاب Mastering Regular Expressions اثر Jeffrey Friedl است که توسط O'Reilly منتشر شده است. متأسفانه، این کتاب منحصراً بر گونه‌های عبارت‌های باقاعده در Perl و Java تمرکز دارد و اصلاً هیچ مطلبی درباره پایتون ندارد، بنابراین به‌عنوان مرجعی برای برنامه‌نویسی پایتون مفید نخواهد بود. (نخستین ویرایش این کتاب ماژول :mod:`!regex` پایتون را پوشش می‌داد که اکنون حذف شده است و کمک چندانی به شما نخواهد کرد.) امانت گرفتن آن را از کتابخانه خود در نظر داشته باشید." + +#~ msgid "Author" +#~ msgstr "نویسنده" + +#~ msgid "A.M. Kuchling " +#~ msgstr "A.M. Kuchling " + +#~ 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 the string for a match. It's important to keep this distinction in mind. Remember, :func:`!match` will only report a successful match which will start at 0; if the match wouldn't start at zero, :func:`!match` will *not* report it. ::" +#~ msgstr "تابع :func:`~re.match` فقط بررسی می‌کند که آیا RE در ابتدای رشته مطابقت دارد یا خیر، در حالی که :func:`~re.search` رشته را برای یافتن یک مطابقت به سمت جلو پیمایش می‌کند. مهم است که این تمایز را در نظر داشته باشید. به یاد داشته باشید، :func:`!match` فقط مطابقت موفقی را گزارش می‌کند که از ۰ شروع شود؛ اگر مطابقت از صفر شروع نشود، :func:`!match` آن را گزارش *نخواهد کرد*. ::" + +#~ 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.search` instead. The regular expression compiler does some analysis of REs in order to speed up the process of looking for a match. One such analysis figures out what the first character of a match must be; for example, a pattern starting with ``Crow`` must match starting with a ``'C'``. The analysis lets the engine quickly scan through the string looking for the starting character, only trying the full match if a ``'C'`` is found." +#~ msgstr "گاهی ممکن است وسوسه شوید که همچنان از :func:`re.match` استفاده کنید و فقط ``.*`` را به ابتدای عبارت باقاعده‌ی خود اضافه کنید. در برابر این وسوسه مقاومت کنید و به‌جای آن از :func:`re.search` استفاده کنید. کامپایلر عبارت باقاعده، عبارت‌های باقاعده را تا حدی تحلیل می‌کند تا فرایند جست‌وجو برای تطبیق را سرعت بخشد. یکی از این تحلیل‌ها مشخص می‌کند که اولین نویسه‌ی یک تطبیق باید چه باشد؛ برای مثال، الگویی که با ``Crow`` شروع می‌شود باید تطبیق را با یک ``'C'`` آغاز کند. این تحلیل به موتور اجازه می‌دهد رشته را به‌سرعت برای یافتن نویسه‌ی آغازین پیمایش کند و تنها در صورتی که یک ``'C'`` یافت شود، تطبیق کامل را بیازماید." + +#~ 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 "افزودن ``.*`` این بهینه‌سازی را بی‌اثر می‌کند و به پیمایش تا پایان رشته و سپس پس‌گرد برای یافتن تطابق برای بقیه‌ی RE نیاز دارد. در عوض از :func:`re.search` استفاده کنید." diff --git a/howto/sockets.po b/howto/sockets.po index d4425b0a..53608ef2 100644 --- a/howto/sockets.po +++ b/howto/sockets.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 10:12+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -27,12 +27,6 @@ msgstr "" msgid "Socket Programming HOWTO" msgstr "راهنمای عملی برنامه‌نویسی سوکت" -msgid "Author" -msgstr "نویسنده" - -msgid "Gordon McMillan" -msgstr "گوردون مک‌میلان" - msgid "Abstract" msgstr "چکیده" @@ -324,3 +318,9 @@ msgstr "در واقع، ``select`` حتی با سوکت‌های مسدودکن msgid "**Portability alert**: On Unix, ``select`` works both with the sockets and files. Don't try this on Windows. On Windows, ``select`` works with sockets only. Also note that in C, many of the more advanced socket options are done differently on Windows. In fact, on Windows I usually use threads (which work very, very well) with my sockets." msgstr "**هشدار قابلیت حمل**: در یونیکس، ``select`` هم با سوکت‌ها و هم با پرونده‌ها کار می‌کند. این کار را در ویندوز امتحان نکنید. در ویندوز، ``select`` فقط با سوکت‌ها کار می‌کند. همچنین توجه داشته باشید که در C، بسیاری از گزینه‌های پیشرفته‌تر سوکت در ویندوز به شکل متفاوتی انجام می‌شوند. در واقع، در ویندوز من معمولاً از نخ‌ها (که بسیار، بسیار خوب کار می‌کنند) همراه با سوکت‌هایم استفاده می‌کنم." + +#~ msgid "Author" +#~ msgstr "نویسنده" + +#~ msgid "Gordon McMillan" +#~ msgstr "گوردون مک‌میلان" diff --git a/howto/sorting.po b/howto/sorting.po index cf74cf96..b4fb7cd1 100644 --- a/howto/sorting.po +++ b/howto/sorting.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 00:53+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -26,12 +26,6 @@ msgstr "" msgid "Sorting Techniques" msgstr "روش‌های مرتب‌سازی" -msgid "Author" -msgstr "نویسنده" - -msgid "Andrew Dalke and Raymond Hettinger" -msgstr "Andrew Dalke و Raymond Hettinger" - msgid "Python lists have a built-in :meth:`list.sort` method that modifies the list in-place. There is also a :func:`sorted` built-in function that builds a new sorted list from an iterable." msgstr "فهرست‌های پایتون یک متد توکار :meth:`list.sort` دارند که فهرست را به‌صورت درجا تغییر می‌دهد. همچنین یک تابع توکار :func:`sorted` وجود دارد که یک فهرست مرتب‌شده‌ی جدید از یک پیمایش‌پذیر می‌سازد." @@ -510,3 +504,9 @@ msgstr ":func:`heapq.nsmallest` و :func:`heapq.nlargest` به‌ترتیب *n* msgid ":func:`heapq.heappush` and :func:`heapq.heappop` create and maintain a partially sorted arrangement of data that keeps the smallest element at position ``0``. These functions are suitable for implementing priority queues which are commonly used for task scheduling." msgstr ":func:`heapq.heappush` و :func:`heapq.heappop` یک چیدمان تا حدی مرتب‌شده از داده‌ها ایجاد و نگهداری می‌کنند که کوچک‌ترین عنصر را در موقعیت ``0`` نگه می‌دارد. این توابع برای پیاده‌سازی صف‌های اولویتی که معمولاً برای زمان‌بندی وظایف استفاده می‌شوند، مناسب هستند." + +#~ msgid "Author" +#~ msgstr "نویسنده" + +#~ msgid "Andrew Dalke and Raymond Hettinger" +#~ msgstr "Andrew Dalke و Raymond Hettinger" diff --git a/howto/unicode.po b/howto/unicode.po index 2883f52c..846e1b6e 100644 --- a/howto/unicode.po +++ b/howto/unicode.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 19:15+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -27,12 +27,6 @@ msgstr "" msgid "Unicode HOWTO" msgstr "راهنمای عملی یونیکد" -msgid "Release" -msgstr "انتشار" - -msgid "1.12" -msgstr "1.12" - msgid "This HOWTO discusses Python's support for the Unicode specification for representing textual data, and explains various problems that people commonly encounter when trying to work with Unicode." msgstr "این راهنمای عملی پشتیبانی پایتون از مشخصات یونیکد برای بازنمایی داده‌های متنی را بررسی می‌کند و مشکلات مختلفی را توضیح می‌دهد که افراد معمولاً هنگام تلاش برای کار با یونیکد با آن‌ها مواجه می‌شوند." @@ -792,3 +786,9 @@ msgstr "پیش‌نویس اولیه این سند توسط Andrew Kuchling نو msgid "Thanks to the following people who have noted errors or offered suggestions on this article: Éric Araujo, Nicholas Bastin, Nick Coghlan, Marius Gedminas, Kent Johnson, Ken Krugler, Marc-André Lemburg, Martin von Löwis, Terry J. Reedy, Serhiy Storchaka, Eryk Sun, Chad Whitacre, Graham Wideman." msgstr "با تشکر از افراد زیر که به خطاهای این مقاله اشاره کرده یا پیشنهادهایی درباره آن ارائه کرده‌اند: Éric Araujo، Nicholas Bastin، Nick Coghlan، Marius Gedminas، Kent Johnson، Ken Krugler، Marc-André Lemburg، Martin von Löwis، Terry J. Reedy، Serhiy Storchaka، Eryk Sun، Chad Whitacre و Graham Wideman." + +#~ msgid "Release" +#~ msgstr "انتشار" + +#~ msgid "1.12" +#~ msgstr "1.12" diff --git a/howto/urllib2.po b/howto/urllib2.po index d18d8e30..4e4a0365 100644 --- a/howto/urllib2.po +++ b/howto/urllib2.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 10:44+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -27,12 +27,6 @@ msgstr "" msgid "HOWTO Fetch Internet Resources Using The urllib Package" msgstr "راهنمای واکشی منابع اینترنتی با استفاده از بسته urllib" -msgid "Author" -msgstr "نویسنده" - -msgid "`Michael Foord `_" -msgstr "`Michael Foord `_" - msgid "Introduction" msgstr "مقدمه" @@ -635,3 +629,9 @@ msgstr "در مورد من، باید برای دسترسی به اینترنت msgid "urllib opener for SSL proxy (CONNECT method): `ASPN Cookbook Recipe `_." msgstr "بازکننده‌ی urllib برای پراکسی SSL (متد CONNECT): `ASPN Cookbook Recipe `_." + +#~ msgid "Author" +#~ msgstr "نویسنده" + +#~ msgid "`Michael Foord `_" +#~ msgstr "`Michael Foord `_" diff --git a/library/_thread.po b/library/_thread.po index 571b014d..a0a3e4fb 100644 --- a/library/_thread.po +++ b/library/_thread.po @@ -6,12 +6,13 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 14:05+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -91,6 +92,9 @@ msgstr "دسترس‌پذیری" msgid "Added support for GNU/kFreeBSD." msgstr "پشتیبانی از GNU/kFreeBSD افزوده شد." +msgid "Added support for Solaris." +msgstr "پشتیبانی از Solaris اضافه شد." + msgid "Return the thread stack size used when creating new threads. The optional *size* argument specifies the stack size to be used for subsequently created threads, and must be 0 (use platform or configured default) or a positive integer value of at least 32,768 (32 KiB). If *size* is not specified, 0 is used. If changing the thread stack size is unsupported, a :exc:`RuntimeError` is raised. If the specified stack size is invalid, a :exc:`ValueError` is raised and the stack size is unmodified. 32 KiB is currently the minimum supported stack size value to guarantee sufficient stack space for the interpreter itself. Note that some platforms may have particular restrictions on values for the stack size, such as requiring a minimum stack size > 32 KiB or requiring allocation in multiples of the system memory page size - platform documentation should be referred to for more information (4 KiB pages are common; using multiples of 4096 for the stack size is the suggested approach in the absence of more specific information)." msgstr "اندازه‌ی پشته‌ی نخ را که هنگام ایجاد نخ‌های جدید استفاده می‌شود، برمی‌گرداند. آرگومان اختیاری *size* اندازه‌ی پشته‌ای را مشخص می‌کند که برای نخ‌های ایجادشده بعدی استفاده می‌شود، و باید ۰ (استفاده از پیش‌فرض پلتفرم یا پیش‌فرض پیکربندی‌شده) یا یک مقدار عدد صحیح مثبت با حداقل ۳۲٬۷۶۸ (۳۲ KiB) باشد. اگر *size* مشخص نشده باشد، ۰ استفاده می‌شود. اگر تغییر اندازه‌ی پشته‌ی نخ پشتیبانی نشود، یک :exc:`RuntimeError` پرتاب می‌شود. اگر اندازه‌ی پشته‌ی مشخص‌شده نامعتبر باشد، یک :exc:`ValueError` پرتاب می‌شود و اندازه‌ی پشته بدون تغییر باقی می‌ماند. در حال حاضر ۳۲ KiB حداقل مقدار اندازه‌ی پشته‌ی پشتیبانی‌شده برای تضمین فضای پشته‌ی کافی برای خود مفسر است. توجه داشته باشید که برخی پلتفرم‌ها ممکن است محدودیت‌های خاصی برای مقادیر اندازه‌ی پشته داشته باشند، مانند نیاز به حداقل اندازه‌ی پشته > ۳۲ KiB یا نیاز به تخصیص به‌صورت مضرب‌هایی از اندازه‌ی صفحه‌ی حافظه‌ی سیستم — برای اطلاعات بیشتر باید به مستندات پلتفرم مراجعه شود (صفحه‌های ۴ KiB رایج هستند؛ استفاده از مضرب‌های ۴۰۹۶ برای اندازه‌ی پشته، روش پیشنهادی در نبود اطلاعات خاص‌تر است)." diff --git a/library/argparse.po b/library/argparse.po index 32ee40f8..c141c040 100644 --- a/library/argparse.po +++ b/library/argparse.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-21 13:27+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -128,8 +129,8 @@ msgstr "allow_abbrev_ - اجازه می‌دهد گزینه‌های بلند م msgid "exit_on_error_ - Determines whether or not :class:`!ArgumentParser` exits with error info when an error occurs. (default: ``True``)" msgstr "exit_on_error_ - تعیین می‌کند که آیا :class:`!ArgumentParser` هنگام بروز خطا همراه با اطلاعات خطا خارج می‌شود یا خیر. (پیش‌فرض: ``True``)" -msgid "suggest_on_error_ - Enables suggestions for mistyped argument choices and subparser names (default: ``False``)" -msgstr "suggest_on_error_ - پیشنهادها را برای گزینه‌های آرگومان و نام‌های زیرپارسر (subparser) که اشتباه تایپ‌شده‌اند، فعال می‌کند (پیش‌فرض: ``False``)" +msgid "suggest_on_error_ - Enables suggestions for mistyped argument choices and subparser names (default: ``True``)" +msgstr "suggest_on_error_ - پیشنهادها را برای انتخاب‌های آرگومان تایپ‌شده‌ی اشتباه و نام‌های زیرپارسر فعال می‌کند (پیش‌فرض: ``True``)" msgid "color_ - Allow color output (default: ``True``)" msgstr "color_ - اجازه دادن به خروجی رنگی (پیش‌فرض: ``True``)" @@ -146,6 +147,9 @@ msgstr "پارامتر *exit_on_error* اضافه شد." msgid "*suggest_on_error* and *color* parameters were added." msgstr "پارامترهای *suggest_on_error* و *color* افزوده شدند." +msgid "*suggest_on_error* default changed to ``True``." +msgstr "مقدار پیش‌فرض *suggest_on_error* به ``True`` تغییر یافت." + msgid "The following sections describe how each of these are used." msgstr "بخش‌های زیر چگونگی استفاده از هر یک از این موارد را شرح می‌دهند." @@ -733,11 +737,8 @@ msgstr "" msgid "suggest_on_error" msgstr "suggest_on_error" -msgid "By default, when a user passes an invalid argument choice or subparser name, :class:`ArgumentParser` will exit with error info and list the permissible argument choices (if specified) or subparser names as part of the error message." -msgstr "به‌طور پیش‌فرض، هنگامی که کاربر یک انتخاب نامعتبر برای آرگومان یا یک نام زیرپارسر (subparser) ارائه می‌دهد، :class:`ArgumentParser` با اطلاعات خطا خارج می‌شود و انتخاب‌های مجاز آرگومان (در صورت مشخص بودن) یا نام‌های زیرپارسر را به‌عنوان بخشی از پیام خطا فهرست می‌کند." - -msgid "If the user would like to enable suggestions for mistyped argument choices and subparser names, the feature can be enabled by setting ``suggest_on_error`` to ``True``. Note that this only applies for arguments when the choices specified are strings::" -msgstr "اگر کاربر بخواهد پیشنهادها را برای انتخاب‌های آرگومان و نام‌های زیرپارسر (subparser) که اشتباه تایپ شده‌اند فعال کند، این قابلیت را می‌توان با تنظیم ``suggest_on_error`` روی ``True`` فعال کرد. توجه داشته باشید که این فقط برای آرگومان‌هایی اعمال می‌شود که انتخاب‌های تعیین‌شده برای آن‌ها رشته باشند::" +msgid "By default, when a user passes an invalid argument choice or subparser name, :class:`ArgumentParser` will exit with error info and provide suggestions for mistyped arguments. The error message will list the permissible argument choices (if specified) or subparser names, along with a \"maybe you meant\" suggestion if a close match is found. Note that this only applies for arguments when the choices specified are strings::" +msgstr "به طور پیش‌فرض، هنگامی که کاربری یک انتخاب آرگومان یا نام زیرپارسر نامعتبر را ارسال کند، کلاس :class:`ArgumentParser` با اطلاعات خطا خارج می‌شود و پیشنهادهایی را برای آرگومان‌های اشتباه تایپ‌شده ارائه می‌دهد. پیام خطا انتخاب‌های مجاز آرگومان (در صورت مشخص شدن) یا نام‌های زیرپارسر را فهرست می‌کند، همراه با یک پیشنهاد «شاید منظور شما این بوده است» اگر تطبیق نزدیکی پیدا شود. توجه داشته باشید که این مورد تنها برای آرگومان‌هایی اعمال می‌شود که انتخاب‌های مشخص‌شده رشته باشند::" msgid "" ">>> parser = argparse.ArgumentParser(suggest_on_error=True)\n" @@ -752,15 +753,11 @@ msgstr "" "usage: tester.py [-h] [--action {debug,dryrun}]\n" "tester.py: error: argument --action: invalid choice: 'debugg', maybe you meant 'debug'? (choose from debug, dryrun)" -msgid "If you're writing code that needs to be compatible with older Python versions and want to opportunistically use ``suggest_on_error`` when it's available, you can set it as an attribute after initializing the parser instead of using the keyword argument::" -msgstr "اگر در حال نوشتن کدی هستید که باید با نسخه‌های قدیمی‌تر پایتون سازگار باشد و می‌خواهید در صورت در دسترس بودن، به‌صورت فرصت‌طلبانه از ``suggest_on_error`` استفاده کنید، می‌توانید به‌جای استفاده از آرگومان کلیدواژه‌ای، آن را پس از مقداردهی اولیه‌ی پارسر به‌عنوان یک ویژگی تنظیم کنید::" +msgid "You can disable suggestions by setting ``suggest_on_error`` to ``False``." +msgstr "می‌توانید با تنظیم ``suggest_on_error`` روی ``False`` پیشنهادها را غیرفعال کنید." -msgid "" -">>> parser = argparse.ArgumentParser(description='Process some integers.')\n" -">>> parser.suggest_on_error = True" -msgstr "" -">>> parser = argparse.ArgumentParser(description='Process some integers.')\n" -">>> parser.suggest_on_error = True" +msgid "Changed default value of ``suggest_on_error`` from ``False`` to ``True``." +msgstr "مقدار پیش‌فرض ``suggest_on_error`` از ``False`` به ``True`` تغییر یافت." msgid "color" msgstr "رنگ" @@ -786,8 +783,30 @@ msgstr "" msgid "Note that when ``color=True``, colored output depends on both environment variables and terminal capabilities. However, if ``color=False``, colored output is always disabled, even if environment variables like ``FORCE_COLOR`` are set." msgstr "توجه داشته باشید که هنگامی که ``color=True`` باشد، خروجی رنگی هم به متغیرهای محیطی و هم به قابلیت‌های پایانه بستگی دارد. با این حال، اگر ``color=False`` باشد، خروجی رنگی همیشه غیرفعال است، حتی اگر متغیرهای محیطی مانند ``FORCE_COLOR`` تنظیم شده باشند." -msgid "Error messages will include color codes when redirecting stderr to a file. To avoid this, set the |NO_COLOR|_ or :envvar:`PYTHON_COLORS` environment variable (for example, ``NO_COLOR=1 python script.py 2> errors.txt``)." -msgstr "در صورت هدایت stderr به یک پرونده، پیام‌های خطا شامل کدهای رنگ خواهند بود. برای جلوگیری از این موضوع، متغیر محیطی |NO_COLOR|_ یا :envvar:`PYTHON_COLORS` را تنظیم کنید (برای مثال، ``NO_COLOR=1 python script.py 2> errors.txt``)." +msgid "To highlight inline code in your description, epilog, or argument ``help`` text, you can use single or double backticks::" +msgstr "برای برجسته‌سازی کد درون‌خطی در توضیحات، epilog، یا متن ``help`` آرگومان، می‌توانید از علامت‌های نقل‌قول معکوس تکی یا دوتایی استفاده کنید::" + +msgid "" +">>> parser = argparse.ArgumentParser(\n" +"... formatter_class=argparse.RawDescriptionHelpFormatter,\n" +"... description='Run ``python -m myapp`` to start.',\n" +"... epilog='''Examples:\n" +"... `python -m myapp --verbose`\n" +"... ``python -m myapp --config settings.json``\n" +"... ''')\n" +">>> parser.add_argument('--foo', help='set the `foo` value')" +msgstr "" +">>> parser = argparse.ArgumentParser(\n" +"... formatter_class=argparse.RawDescriptionHelpFormatter,\n" +"... description='Run ``python -m myapp`` to start.',\n" +"... epilog='''Examples:\n" +"... `python -m myapp --verbose`\n" +"... ``python -m myapp --config settings.json``\n" +"... ''')\n" +">>> parser.add_argument('--foo', help='set the `foo` value')" + +msgid "When colors are enabled, the text inside backticks will be displayed in a distinct color to help examples stand out. When colors are disabled, backticks are preserved as-is, which is readable in plain text." +msgstr "هنگامی که رنگ‌ها فعال هستند، متن داخل نقل‌قول‌های معکوس با رنگ متمایزی نمایش داده می‌شود تا به برجسته شدن مثال‌ها کمک کند. هنگامی که رنگ‌ها غیرفعال هستند، نقل‌قول‌های معکوس دقیقاً به همان شکل حفظ می‌شوند که در متن ساده خوانا است." msgid "The add_argument() method" msgstr "متد add_argument()" @@ -1624,25 +1643,27 @@ msgstr "" ">>> parser.parse_args(['XXX'])\n" "Namespace(bar='XXX')" -msgid "For optional argument actions, the value of ``dest`` is normally inferred from the option strings. :class:`ArgumentParser` generates the value of ``dest`` by taking the first long option string and stripping away the initial ``--`` string. If no long option strings were supplied, ``dest`` will be derived from the first short option string by stripping the initial ``-`` character. Any internal ``-`` characters will be converted to ``_`` characters to make sure the string is a valid attribute name. The examples below illustrate this behavior::" -msgstr "برای کنش‌های آرگومان‌های اختیاری، مقدار ``dest`` معمولاً از رشته‌های گزینه استنباط می‌شود. :class:`ArgumentParser` مقدار ``dest`` را با گرفتن نخستین رشته‌ی گزینه‌ی بلند و حذف رشته‌ی ``--`` ابتدایی تولید می‌کند. اگر هیچ رشته‌ی گزینه‌ی بلندی ارائه نشده باشد، ``dest`` با حذف نویسه‌ی ``-`` ابتدایی از نخستین رشته‌ی گزینه‌ی کوتاه به‌دست می‌آید. هر نویسه‌ی ``-`` داخلی به نویسه‌ی ``_`` تبدیل می‌شود تا اطمینان حاصل شود که رشته یک نام ویژگی معتبر است. مثال‌های زیر این رفتار را نشان می‌دهند::" +msgid "For optional argument actions, the value of ``dest`` is normally inferred from the option strings. :class:`ArgumentParser` generates the value of ``dest`` by taking the first double-dash long option string and stripping away the initial ``-`` characters. If no double-dash long option strings were supplied, ``dest`` will be derived from the first single-dash long option string by stripping the initial ``-`` character. If no long option strings were supplied, ``dest`` will be derived from the first short option string by stripping the initial ``-`` character. Any internal ``-`` characters will be converted to ``_`` characters to make sure the string is a valid attribute name. The examples below illustrate this behavior::" +msgstr "برای اکشن‌های آرگومان اختیاری، مقدار ``dest`` معمولاً از رشته‌های گزینه استنباط می‌شود. کلاس :class:`ArgumentParser` مقدار ``dest`` را با گرفتن نخستین رشته‌ی گزینه طولانی دوخط‌تیره‌ای و حذف نویسه‌های اولیه‌ی ``-`` تولید می‌کند. اگر هیچ رشته‌ی گزینه‌ی طولانی دوخط‌تیره‌ای ارائه نشده باشد، ``dest`` از نخستین رشته‌ی گزینه‌ی طولانی تک‌خط‌تیره‌ای با حذف نویسه‌ی اولیه‌ی ``-`` مشتق خواهد شد. اگر هیچ رشته‌ی گزینه‌ی طولانی ارائه نشده باشد، ``dest`` از نخستین رشته‌ی گزینه‌ی کوتاه با حذف نویسه‌ی اولیه‌ی ``-`` مشتق خواهد شد. هر گونه نویسه‌ی داخلی ``-`` به نویسه‌های ``_`` تبدیل خواهد شد تا مطمئن شویم رشته یک نام ویژگی معتبر است. مثال‌های زیر این رفتار را نشان می‌دهند::" msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('-f', '--foo-bar', '--foo')\n" +">>> parser.add_argument('-q', '-quz')\n" ">>> parser.add_argument('-x', '-y')\n" -">>> parser.parse_args('-f 1 -x 2'.split())\n" -"Namespace(foo_bar='1', x='2')\n" -">>> parser.parse_args('--foo 1 -y 2'.split())\n" -"Namespace(foo_bar='1', x='2')" +">>> parser.parse_args('-f 1 -q 2 -x 3'.split())\n" +"Namespace(foo_bar='1', quz='2', x='3')\n" +">>> parser.parse_args('--foo 1 -quz 2 -y 3'.split())\n" +"Namespace(foo_bar='1', quz='2', x='2')" msgstr "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('-f', '--foo-bar', '--foo')\n" +">>> parser.add_argument('-q', '-quz')\n" ">>> parser.add_argument('-x', '-y')\n" -">>> parser.parse_args('-f 1 -x 2'.split())\n" -"Namespace(foo_bar='1', x='2')\n" -">>> parser.parse_args('--foo 1 -y 2'.split())\n" -"Namespace(foo_bar='1', x='2')" +">>> parser.parse_args('-f 1 -q 2 -x 3'.split())\n" +"Namespace(foo_bar='1', quz='2', x='3')\n" +">>> parser.parse_args('--foo 1 -quz 2 -y 3'.split())\n" +"Namespace(foo_bar='1', quz='2', x='2')" msgid "``dest`` allows a custom attribute name to be provided::" msgstr "``dest`` امکان ارائه‌ی یک نام ویژگی سفارشی را فراهم می‌کند::" @@ -1661,6 +1682,9 @@ msgstr "" msgid "Multiple arguments may share the same ``dest``. By default, the value from the last such argument given on the command line wins. Use ``action='append'`` to collect values from all of them into a list instead. For conflicting *option strings* rather than ``dest`` names, see conflict_handler_." msgstr "آرگومان‌های متعدد می‌توانند ``dest`` یکسانی داشته باشند. به‌صورت پیش‌فرض، مقدار آخرین آرگومان از این نوع که در خط فرمان وارد شود، برنده می‌شود. در عوض، برای جمع‌آوری مقادیر همه‌ی آن‌ها در یک فهرست، از ``action='append'`` استفاده کنید. برای *رشته‌های گزینه* دارای تعارض، نه نام‌های ``dest``، conflict_handler_ را ببینید." +msgid "Single-dash long option now takes precedence over short options." +msgstr "گزینه‌ی طولانی با یک خط تیره اکنون نسبت به گزینه‌های کوتاه اولویت دارد." + msgid "deprecated" msgstr "منسوخ" @@ -1735,6 +1759,15 @@ msgstr "" ">>> parser.parse_args(['--no-foo'])\n" "Namespace(foo=False)" +msgid "Single-dash long options are also supported. For example, negative option ``-nofoo`` is automatically added for positive option ``-foo``. But no additional options are added for short options such as ``-f``." +msgstr "گزینه‌های طولانی با یک خط تیره نیز پشتیبانی می‌شوند. برای مثال، گزینه‌ی منفی ``-nofoo`` به‌طور خودکار برای گزینه‌ی مثبت ``-foo`` اضافه می‌شود. اما هیچ گزینه‌ی اضافه‌ای برای گزینه‌های کوتاهی مانند ``-f`` اضافه نمی‌شود." + +msgid "Added support for single-dash options." +msgstr "پشتیبانی از گزینه‌های تک‌خط‌تیره اضافه شد." + +msgid "Added support for alternate prefix_chars_." +msgstr "پشتیبانی از prefix_chars_ جایگزین اضافه شد." + msgid "The parse_args() method" msgstr "متد parse_args()" @@ -2129,8 +2162,8 @@ msgstr "" ">>> parser.parse_args(['--foo', 'b', '--baz', 'Z'])\n" "Namespace(baz='Z', foo=True)" -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 command line (and not any other subparsers). So in the example above, when the ``a`` command is specified, only the ``foo`` and ``bar`` attributes are present, and when the ``b`` command is specified, only the ``foo`` and ``baz`` attributes are present." -msgstr "توجه داشته باشید که شیء برگردانده‌شده از :meth:`parse_args` فقط شامل ویژگی‌هایی برای پارسر اصلی و زیرپارسری خواهد بود که از طریق خط فرمان انتخاب شده است (و نه هیچ زیرپارسر دیگری). بنابراین در مثال بالا، هنگامی که دستور ``a`` مشخص شده باشد، فقط ویژگی‌های ``foo`` و ``bar`` وجود دارند، و هنگامی که دستور ``b`` مشخص شده باشد، فقط ویژگی‌های ``foo`` و ``baz`` وجود دارند." +msgid "Note that the object returned by :meth:`~ArgumentParser.parse_args` will only contain attributes for the main parser and the subparser that was selected by the command line (and not any other subparsers). So in the example above, when the ``a`` command is specified, only the ``foo`` and ``bar`` attributes are present, and when the ``b`` command is specified, only the ``foo`` and ``baz`` attributes are present." +msgstr "توجه داشته باشید که شیء بازگردانده‌شده توسط :meth:`~ArgumentParser.parse_args` تنها شامل ویژگی‌های مربوط به پارسر اصلی و زیرپارسری خواهد بود که توسط خط فرمان انتخاب شده است (و شامل سایر زیرپارسرها نمی‌شود). بنابراین در مثال بالا، هنگامی که دستور ``a`` مشخص می‌شود، تنها ویژگی‌های ``foo`` و ``bar`` حضور دارند، و هنگامی که دستور ``b`` مشخص می‌شود، تنها ویژگی‌های ``foo`` و ``baz`` حضور دارند." msgid "If a subparser defines an argument with the same ``dest`` as the parent parser, the two share a single namespace attribute, so the parent's value won't be retained. Users should give them distinct ``dest`` values to keep both." msgstr "اگر یک زیرپارسر آرگومانی با همان ``dest`` پارسر والد تعریف کند، این دو یک ویژگی فضای نام واحد را به اشتراک می‌گذارند، بنابراین مقدار پارسر والد حفظ نخواهد شد. کاربران باید برای آن‌ها مقادیر ``dest`` متمایزی تعیین کنند تا هر دو حفظ شوند." @@ -2195,8 +2228,8 @@ msgstr "" " -h, --help show this help message and exit\n" " --baz {X,Y,Z} baz help" -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 "متد :meth:`add_subparsers` همچنین از آرگومان‌های کلیدواژه‌ای ``title`` و ``description`` پشتیبانی می‌کند. هنگامی که هر یک وجود داشته باشد، دستورات زیرپارسر (subparser) در گروه خودشان در خروجی راهنما ظاهر می‌شوند. برای مثال::" +msgid "The :meth:`~ArgumentParser.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 "متد :meth:`~ArgumentParser.add_subparsers` همچنین از آرگومان‌های کلیدواژه‌ای ``title`` و ``description`` پشتیبانی می‌کند. هنگامی که هر یک از آن‌ها حضور داشته باشد، دستورات زیرپارسر در گروه مختص به خود در خروجی راهنما ظاهر خواهند شد. برای مثال::" msgid "" ">>> parser = argparse.ArgumentParser()\n" @@ -2233,29 +2266,8 @@ msgstr "" "\n" " {foo,bar} additional help" -msgid "Furthermore, :meth:`~_SubParsersAction.add_parser` supports an additional *aliases* argument, which allows multiple strings to refer to the same subparser. This example, like ``svn``, aliases ``co`` as a shorthand for ``checkout``::" -msgstr "علاوه بر این، :meth:`~_SubParsersAction.add_parser` از یک آرگومان اضافی *aliases* پشتیبانی می‌کند، که امکان می‌دهد چندین رشته به یک زیرپارسر یکسان ارجاع داده شوند. این مثال، مانند ``svn``، نام مستعار ``co`` را به‌عنوان شکل کوتاهی برای ``checkout`` تعریف می‌کند::" - -msgid "" -">>> parser = argparse.ArgumentParser()\n" -">>> subparsers = parser.add_subparsers()\n" -">>> checkout = subparsers.add_parser('checkout', aliases=['co'])\n" -">>> checkout.add_argument('foo')\n" -">>> parser.parse_args(['co', 'bar'])\n" -"Namespace(foo='bar')" -msgstr "" -">>> parser = argparse.ArgumentParser()\n" -">>> subparsers = parser.add_subparsers()\n" -">>> checkout = subparsers.add_parser('checkout', aliases=['co'])\n" -">>> checkout.add_argument('foo')\n" -">>> parser.parse_args(['co', 'bar'])\n" -"Namespace(foo='bar')" - -msgid ":meth:`~_SubParsersAction.add_parser` supports also an additional *deprecated* argument, which allows to deprecate the subparser." -msgstr ":meth:`~_SubParsersAction.add_parser` همچنین از یک آرگومان اضافی *deprecated* پشتیبانی می‌کند، که به شما امکان می‌دهد زیرپارسر (subparser) را منسوخ کنید." - -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 that each subparser knows which Python function it should execute. For example::" -msgstr "یک روش به‌ویژه مؤثر برای مدیریت زیردستورها، ترکیب استفاده از متد :meth:`add_subparsers` با فراخوانی‌های :meth:`set_defaults` است، به‌طوری‌که هر زیرپارسر (subparser) بداند کدام تابع پایتون را باید اجرا کند. برای مثال::" +msgid "One particularly effective way of handling subcommands is to combine the use of the :meth:`~ArgumentParser.add_subparsers` method with calls to :meth:`~ArgumentParser.set_defaults` so that each subparser knows which Python function it should execute. For example::" +msgstr "یک روش به خصوص مؤثر برای مدیریت زیردستورات، ترکیب استفاده از متد :meth:`~ArgumentParser.add_subparsers` با فراخوانی‌های :meth:`~ArgumentParser.set_defaults` است تا هر زیرپارسر بداند که کدام تابع پایتون را باید اجرا کند. برای مثال::" msgid "" ">>> # subcommand functions\n" @@ -2322,8 +2334,8 @@ msgstr "" ">>> args.func(args)\n" "((XYZYX))" -msgid "This way, you can let :meth:`parse_args` do the job of calling the appropriate function after argument parsing is complete. Associating functions with actions like this is typically the easiest way to handle the different actions for each of your subparsers. However, if it is necessary to check the name of the subparser that was invoked, the ``dest`` keyword argument to the :meth:`add_subparsers` call will work::" -msgstr "به این ترتیب، می‌توانید اجازه دهید :meth:`parse_args` پس از تکمیل تجزیه آرگومان‌ها، کار فراخوانی تابع مناسب را انجام دهد. مرتبط کردن توابع با کنش‌هایی مانند این، معمولاً ساده‌ترین راه برای مدیریت کنش‌های متفاوت هر یک از زیرپارسرهای شما است. با این حال، اگر لازم باشد نام زیرپارسر فراخوانی‌شده بررسی شود، آرگومان کلیدواژه‌ای ``dest`` در فراخوانی :meth:`add_subparsers` کار خواهد کرد::" +msgid "This way, you can let :meth:`~ArgumentParser.parse_args` do the job of calling the appropriate function after argument parsing is complete. Associating functions with actions like this is typically the easiest way to handle the different actions for each of your subparsers. However, if it is necessary to check the name of the subparser that was invoked, the ``dest`` keyword argument to the :meth:`~ArgumentParser.add_subparsers` call will work::" +msgstr "به این ترتیب، می‌توانید به :meth:`~ArgumentParser.parse_args` اجازه دهید کار فراخوانی تابع مناسب را پس از اتمام تجزیه آرگومان انجام دهد. مرتبط کردن توابع با کنش‌ها به این شکل، معمولاً آسان‌ترین راه برای مدیریت کنش‌های مختلف برای هر یک از زیرپارسرهای شما است. با این حال، اگر بررسی نام زیرپارسری که فراخوانی شده است ضروری باشد، آرگومان کلیدواژه‌ای ``dest`` در فراخوانی :meth:`~ArgumentParser.add_subparsers` کارساز خواهد بود::" msgid "" ">>> parser = argparse.ArgumentParser()\n" @@ -2350,6 +2362,57 @@ msgstr "پارامتر جدید *الزامی* فقط کلیدواژه‌ای." msgid "Subparser's *prog* is no longer affected by a custom usage message in the main parser." msgstr "*prog* زیرپارسر دیگر تحت تأثیر پیام کاربرد سفارشی در پارسر اصلی قرار نمی‌گیرد." +msgid "Create and return a new :class:`ArgumentParser` object for the subcommand *name*." +msgstr "یک شیء جدید :class:`ArgumentParser` برای *name* (نام) زیردستور ایجاد کرده و برمی‌گرداند." + +msgid "The *name* argument is the name of the sub-command." +msgstr "آرگومان *name* نام زیردستور است." + +msgid "The *help* argument provides a short description for this sub-command." +msgstr "آرگومان *help* توضیح کوتاهی برای این زیردستور فراهم می‌کند." + +msgid "The *aliases* argument allows providing alternative names for this sub-command. For example::" +msgstr "آرگومان *aliases* امکان ارائه‌ی نام‌های جایگزین را برای این زیردستور فراهم می‌کند. برای مثال::" + +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> subparsers = parser.add_subparsers()\n" +">>> checkout = subparsers.add_parser('checkout', aliases=['co'])\n" +">>> checkout.add_argument('foo')\n" +">>> parser.parse_args(['co', 'bar'])\n" +"Namespace(foo='bar')" +msgstr "" +">>> parser = argparse.ArgumentParser()\n" +">>> subparsers = parser.add_subparsers()\n" +">>> checkout = subparsers.add_parser('checkout', aliases=['co'])\n" +">>> checkout.add_argument('foo')\n" +">>> parser.parse_args(['co', 'bar'])\n" +"Namespace(foo='bar')" + +msgid "The *deprecated* argument, if ``True``, marks the sub-command as deprecated and will issue a warning when used. For example::" +msgstr "آرگومان *deprecated*، اگر روی ``True`` تنظیم شود، زیردستور را به عنوان منسوخ علامت‌گذاری می‌کند و هنگام استفاده، اخطاری صادر خواهد کرد. برای مثال::" + +msgid "" +">>> parser = argparse.ArgumentParser(prog='chicken.py')\n" +">>> subparsers = parser.add_subparsers()\n" +">>> fly = subparsers.add_parser('fly', deprecated=True)\n" +">>> args = parser.parse_args(['fly'])\n" +"chicken.py: warning: command 'fly' is deprecated\n" +"Namespace()" +msgstr "" +">>> parser = argparse.ArgumentParser(prog='chicken.py')\n" +">>> subparsers = parser.add_subparsers()\n" +">>> fly = subparsers.add_parser('fly', deprecated=True)\n" +">>> args = parser.parse_args(['fly'])\n" +"chicken.py: warning: command 'fly' is deprecated\n" +"Namespace()" + +msgid "All other keyword arguments are passed directly to the :class:`!ArgumentParser` constructor." +msgstr "تمام آرگومان‌های کلیدواژه‌ای دیگر مستقیماً به سازنده‌ی :class:`!ArgumentParser` منتقل می‌شوند." + +msgid "Added the *deprecated* parameter." +msgstr "پارامتر *deprecated* اضافه شد." + msgid "FileType objects" msgstr "اشیای FileType" @@ -2805,5 +2868,27 @@ msgstr "* (ستاره)" msgid "+ (plus)" msgstr "+ (مثبت)" +#~ msgid "If the user would like to enable suggestions for mistyped argument choices and subparser names, the feature can be enabled by setting ``suggest_on_error`` to ``True``. Note that this only applies for arguments when the choices specified are strings::" +#~ msgstr "اگر کاربر بخواهد پیشنهادها را برای انتخاب‌های آرگومان و نام‌های زیرپارسر (subparser) که اشتباه تایپ شده‌اند فعال کند، این قابلیت را می‌توان با تنظیم ``suggest_on_error`` روی ``True`` فعال کرد. توجه داشته باشید که این فقط برای آرگومان‌هایی اعمال می‌شود که انتخاب‌های تعیین‌شده برای آن‌ها رشته باشند::" + +#~ msgid "If you're writing code that needs to be compatible with older Python versions and want to opportunistically use ``suggest_on_error`` when it's available, you can set it as an attribute after initializing the parser instead of using the keyword argument::" +#~ msgstr "اگر در حال نوشتن کدی هستید که باید با نسخه‌های قدیمی‌تر پایتون سازگار باشد و می‌خواهید در صورت در دسترس بودن، به‌صورت فرصت‌طلبانه از ``suggest_on_error`` استفاده کنید، می‌توانید به‌جای استفاده از آرگومان کلیدواژه‌ای، آن را پس از مقداردهی اولیه‌ی پارسر به‌عنوان یک ویژگی تنظیم کنید::" + +#~ msgid "" +#~ ">>> parser = argparse.ArgumentParser(description='Process some integers.')\n" +#~ ">>> parser.suggest_on_error = True" +#~ msgstr "" +#~ ">>> parser = argparse.ArgumentParser(description='Process some integers.')\n" +#~ ">>> parser.suggest_on_error = True" + +#~ msgid "Error messages will include color codes when redirecting stderr to a file. To avoid this, set the |NO_COLOR|_ or :envvar:`PYTHON_COLORS` environment variable (for example, ``NO_COLOR=1 python script.py 2> errors.txt``)." +#~ msgstr "در صورت هدایت stderr به یک پرونده، پیام‌های خطا شامل کدهای رنگ خواهند بود. برای جلوگیری از این موضوع، متغیر محیطی |NO_COLOR|_ یا :envvar:`PYTHON_COLORS` را تنظیم کنید (برای مثال، ``NO_COLOR=1 python script.py 2> errors.txt``)." + +#~ msgid "Furthermore, :meth:`~_SubParsersAction.add_parser` supports an additional *aliases* argument, which allows multiple strings to refer to the same subparser. This example, like ``svn``, aliases ``co`` as a shorthand for ``checkout``::" +#~ msgstr "علاوه بر این، :meth:`~_SubParsersAction.add_parser` از یک آرگومان اضافی *aliases* پشتیبانی می‌کند، که امکان می‌دهد چندین رشته به یک زیرپارسر یکسان ارجاع داده شوند. این مثال، مانند ``svn``، نام مستعار ``co`` را به‌عنوان شکل کوتاهی برای ``checkout`` تعریف می‌کند::" + +#~ msgid ":meth:`~_SubParsersAction.add_parser` supports also an additional *deprecated* argument, which allows to deprecate the subparser." +#~ msgstr ":meth:`~_SubParsersAction.add_parser` همچنین از یک آرگومان اضافی *deprecated* پشتیبانی می‌کند، که به شما امکان می‌دهد زیرپارسر (subparser) را منسوخ کنید." + #~ msgid "Note, the *default* will be ``None`` unless explicitly set to *0*." #~ msgstr "توجه داشته باشید، *پیش‌فرض* ``None`` خواهد بود، مگر اینکه به‌صراحت روی *0* تنظیم شود." diff --git a/library/array.po b/library/array.po index 0d18c240..ee5d5904 100644 --- a/library/array.po +++ b/library/array.po @@ -9,13 +9,14 @@ # Ariyan Bolandi, 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" -"PO-Revision-Date: 2026-09-14 08:51+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 20:30+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" @@ -28,8 +29,8 @@ msgstr "" msgid ":mod:`!array` --- Efficient arrays of numeric values" msgstr ":mod:`!array` --- آرایه‌های کارآمد از مقادیر عددی" -msgid "This module defines an object type which can compactly represent an array of basic values: characters, integers, floating-point numbers. Arrays are mutable :term:`sequence` types and behave very much like lists, except that the type of objects stored in them is constrained. The type is specified at object creation time by using a :dfn:`type code`, which is a single character. The following type codes are defined:" -msgstr "این ماژول یک نوع شیء را تعریف می‌کند که می‌تواند آرایه‌ای از مقادیر پایه را به‌صورت فشرده بازنمایی کند: نویسه‌ها، اعداد صحیح و اعداد ممیز شناور. آرایه‌ها انواعی از :term:`دنباله ` تغییرپذیر هستند و بسیار شبیه فهرست‌ها رفتار می‌کنند، با این تفاوت که نوع اشیاء ذخیره‌شده در آن‌ها محدود است. این نوع در زمان ایجاد شیء با استفاده از یک :dfn:`کد نوع (type code)` مشخص می‌شود که یک نویسه واحد است. کدهای نوع زیر تعریف شده‌اند:" +msgid "This module defines an object type which can compactly represent an array of basic values: characters, integers, floating-point numbers, complex numbers. Arrays are mutable :term:`sequence` types and behave very much like lists, except that the type of objects stored in them is constrained. The type is specified at object creation time by using a :dfn:`type code`, which is a single character. The following type codes are defined:" +msgstr "این ماژول یک نوع شیء تعریف می‌کند که می‌تواند آرایه‌ای از مقادیر پایه را به‌صورت فشرده نمایش دهد: نویسه‌ها، اعداد صحیح، اعداد ممیز شناور و اعداد مختلط. آرایه‌ها نوع‌های :term:`دنباله ` تغییرپذیر هستند و بسیار شبیه فهرست‌ها رفتار می‌کنند، با این تفاوت که نوع اشیای ذخیره‌شده در آن‌ها محدود است. نوع در زمان ایجاد شیء، با استفاده از یک :dfn:`کد نوع` که یک نویسه‌ی منفرد است، مشخص می‌شود. کدهای نوع زیر تعریف شده‌اند:" msgid "Type code" msgstr "کد نوع" @@ -142,18 +143,48 @@ msgstr "``'Q'``" msgid "unsigned long long" msgstr "unsigned long long" -msgid "``'f'``" -msgstr "``'f'``" +msgid "``'e'``" +msgstr "``'e'``" + +msgid "_Float16" +msgstr "_Float16" msgid "float" msgstr "float" +msgid "\\(3)" +msgstr "\\(3)" + +msgid "``'f'``" +msgstr "``'f'``" + msgid "``'d'``" msgstr "``'d'``" msgid "double" msgstr "double" +msgid "``'Zf'``" +msgstr "``'Zf'``" + +msgid "float complex" +msgstr "عدد اعشاری مختلط" + +msgid "complex" +msgstr "مختلط" + +msgid "\\(4)" +msgstr "\\(4)" + +msgid "``'Zd'``" +msgstr "``'Zd'``" + +msgid "double complex" +msgstr "ممیز شناور با دقت مضاعف مختلط" + +msgid "16" +msgstr "۱۶" + msgid "Notes:" msgstr "یادداشت‌ها:" @@ -166,6 +197,12 @@ msgstr "``array('u')`` اکنون از :c:type:`wchar_t` به‌عنوان نو msgid "Please migrate to ``'w'`` typecode." msgstr "لطفاً به کد نوع (typecode) ``'w'`` مهاجرت کنید." +msgid "The IEEE 754 binary16 \"half precision\" type was introduced in the 2008 revision of the `IEEE 754 standard `_. This type is not widely supported by C compilers. It's available as :c:expr:`_Float16` type, if the compiler supports the Annex H of the C23 standard." +msgstr "نوع «نیم‌دقت» دودویی IEEE 754 با نام binary16 در بازبینی سال ۲۰۰۸ از :ieee 754 standard <استاندارد IEEE 754>_ معرفی شد. این نوع داده به‌طور گسترده توسط کامپایلرهای C پشتیبانی نمی‌شود. اگر کامپایلر از ضمیمه‌ی H استاندارد C23 پشتیبانی کند، این نوع داده به عنوان نوع :c:expr:`_Float16` در دسترس است." + +msgid "Complex types (``Zf`` and ``Zd``) are available unconditionally, regardless on support for complex types (the Annex G of the C11 standard) by the C compiler. As specified in the C11 standard, each complex type is represented by a two-element C array containing, respectively, the real and imaginary parts." +msgstr "انواع مختلط (``Zf`` و ``Zd``) بدون قید و شرط و صرف‌نظر از پشتیبانی کامپایلر C از انواع مختلط (ضمیمه‌ی G استاندارد C11) در دسترس هستند. همان‌طور که در استاندارد C11 مشخص شده است، هر نوع داده‌ی مختلط توسط یک آرایه‌ی C دو عضوی نمایش داده می‌شود که به ترتیب شامل بخش‌های حقیقی و موهمی است." + msgid "The :ref:`ctypes ` and :ref:`struct ` modules, as well as third-party modules like `numpy `__, use similar -- but slightly different -- type codes." msgstr "ماژول‌های :ref:`ctypes ` و :ref:`struct `، و همچنین ماژول‌های شخص ثالث مانند `numpy `__، از کدهای نوع مشابه -- اما کمی متفاوت -- استفاده می‌کنند." @@ -175,8 +212,11 @@ msgstr "نمایش واقعی مقادیر توسط معماری ماشین تع msgid "The module defines the following item:" msgstr "این ماژول آیتم زیر را تعریف می‌کند:" -msgid "A string with all available type codes." -msgstr "رشته‌ای حاوی همه‌ی کدهای نوع موجود." +msgid "A tuple with all available type codes." +msgstr "یک تاپل با تمام کدهای نوع موجود." + +msgid "The type changed from :class:`str` to :class:`tuple`." +msgstr "نوع داده از :class:`str` به :class:`tuple` تغییر یافت." msgid "The module defines the following type:" msgstr "این ماژول نوع زیر را تعریف می‌کند:" @@ -211,8 +251,8 @@ msgstr "یک تاپل ``(address, length)`` برمی‌گرداند که نشا msgid "When using array objects from code written in C or C++ (the only way to effectively make use of this information), it makes more sense to use the buffer interface supported by array objects. This method is maintained for backward compatibility and should be avoided in new code. The buffer interface is documented in :ref:`bufferobjects`." msgstr "هنگام استفاده از اشیای آرایه از کدی که به زبان C یا C++ نوشته‌شده است (تنها راه برای استفاده مؤثر از این اطلاعات)، منطقی‌تر است از رابط بافر (buffer interface) که توسط اشیای آرایه پشتیبانی می‌شود استفاده کنید. این متد برای سازگاری با عقب‌گرد نگهداری می‌شود و باید در کد جدید از آن اجتناب شود. رابط بافر در :ref:`bufferobjects` مستند شده است." -msgid "\"Byteswap\" all items of the array. This is only supported for values which are 1, 2, 4, or 8 bytes in size; for other types of values, :exc:`RuntimeError` is raised. It is useful when reading data from a file written on a machine with a different byte order." -msgstr "«جابه‌جایی بایت‌ها» (Byteswap) برای تمام آیتم‌های آرایه انجام می‌شود. این عمل فقط برای مقادیری با اندازه‌ی ۱، ۲، ۴ یا ۸ بایت پشتیبانی می‌شود؛ برای سایر انواع مقادیر، :exc:`RuntimeError` پرتاب می‌شود. این عمل هنگام خواندن داده‌ها از پرونده‌ای که روی ماشینی با ترتیب بایت متفاوت نوشته شده است، مفید است." +msgid "\"Byteswap\" all items of the array. This is only supported for values which are 1, 2, 4, 8 or 16 bytes in size; for other types of values, :exc:`RuntimeError` is raised. It is useful when reading data from a file written on a machine with a different byte order. Note, that for complex types the order of components (the real part, followed by imaginary part) is preserved." +msgstr "تمام آیتم‌های آرایه را «Byteswap» کنید. این کار فقط برای مقادیری پشتیبانی می‌شود که اندازه‌ی آن‌ها ۱، ۲، ۴، ۸ یا ۱۶ بایت باشد؛ برای سایر انواع مقادیر، استثنای :exc:`RuntimeError` بالا می‌رود. این کار هنگام خواندن داده از پرونده‌ای که روی ماشینی با ترتیب بایت متفاوت نوشته شده است، مفید است. توجه داشته باشید که برای انواع مختلط، ترتیب اجزا (بخش حقیقی، و به دنبال آن بخش موهومی) حفظ می‌شود." msgid "Return the number of occurrences of *value* in the array." msgstr "تعداد تکرارهای *value* را در آرایه برمی‌گرداند." diff --git a/library/ast.po b/library/ast.po index 5265d8a6..cf94da84 100644 --- a/library/ast.po +++ b/library/ast.po @@ -7,13 +7,14 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" -"PO-Revision-Date: 2026-09-13 16:29+0330\n" +"POT-Creation-Date: 2026-10-08 09:24+0330\n" +"PO-Revision-Date: 2026-10-06 20:40+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" @@ -41,11 +42,478 @@ msgstr "دستور زبان انتزاعی" msgid "The abstract grammar is currently defined as follows:" msgstr "دستور زبان انتزاعی در حال حاضر به‌صورت زیر تعریف شده است:" +#, fuzzy +#| msgid "" +#| "-- ASDL's 4 builtin types are:\n" +#| "-- identifier, int, string, constant\n" +#| "\n" +#| "module Python\n" +#| "{\n" +#| " mod = Module(stmt* body, type_ignore* type_ignores)\n" +#| " | Interactive(stmt* body)\n" +#| " | Expression(expr body)\n" +#| " | FunctionType(expr* argtypes, expr returns)\n" +#| "\n" +#| " stmt = FunctionDef(identifier name, arguments args,\n" +#| " stmt* body, expr* decorator_list, expr? returns,\n" +#| " string? type_comment, type_param* type_params)\n" +#| " | AsyncFunctionDef(identifier name, arguments args,\n" +#| " stmt* body, expr* decorator_list, expr? returns,\n" +#| " string? type_comment, type_param* type_params)\n" +#| "\n" +#| " | ClassDef(identifier name,\n" +#| " expr* bases,\n" +#| " keyword* keywords,\n" +#| " stmt* body,\n" +#| " expr* decorator_list,\n" +#| " type_param* type_params)\n" +#| " | Return(expr? value)\n" +#| "\n" +#| " | Delete(expr* targets)\n" +#| " | Assign(expr* targets, expr value, string? type_comment)\n" +#| " | TypeAlias(expr name, type_param* type_params, expr value)\n" +#| " | AugAssign(expr target, operator op, expr value)\n" +#| " -- 'simple' indicates that we annotate simple name without parens\n" +#| " | AnnAssign(expr target, expr annotation, expr? value, int simple)\n" +#| "\n" +#| " -- use 'orelse' because else is a keyword in target languages\n" +#| " | For(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment)\n" +#| " | AsyncFor(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment)\n" +#| " | While(expr test, stmt* body, stmt* orelse)\n" +#| " | If(expr test, stmt* body, stmt* orelse)\n" +#| " | With(withitem* items, stmt* body, string? type_comment)\n" +#| " | AsyncWith(withitem* items, stmt* body, string? type_comment)\n" +#| "\n" +#| " | Match(expr subject, match_case* cases)\n" +#| "\n" +#| " | Raise(expr? exc, expr? cause)\n" +#| " | Try(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody)\n" +#| " | TryStar(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody)\n" +#| " | Assert(expr test, expr? msg)\n" +#| "\n" +#| " | Import(alias* names)\n" +#| " | ImportFrom(identifier? module, alias* names, int? level)\n" +#| "\n" +#| " | Global(identifier* names)\n" +#| " | Nonlocal(identifier* names)\n" +#| " | Expr(expr value)\n" +#| " | Pass | Break | Continue\n" +#| "\n" +#| " -- col_offset is the byte offset in the utf8 string the parser uses\n" +#| " attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" +#| "\n" +#| " -- BoolOp() can use left & right?\n" +#| " expr = BoolOp(boolop op, expr* values)\n" +#| " | NamedExpr(expr target, expr value)\n" +#| " | BinOp(expr left, operator op, expr right)\n" +#| " | UnaryOp(unaryop op, expr operand)\n" +#| " | Lambda(arguments args, expr body)\n" +#| " | IfExp(expr test, expr body, expr orelse)\n" +#| " | Dict(expr?* keys, expr* values)\n" +#| " | Set(expr* elts)\n" +#| " | ListComp(expr elt, comprehension* generators)\n" +#| " | SetComp(expr elt, comprehension* generators)\n" +#| " | DictComp(expr key, expr value, comprehension* generators)\n" +#| " | GeneratorExp(expr elt, comprehension* generators)\n" +#| " -- the grammar constrains where yield expressions can occur\n" +#| " | Await(expr value)\n" +#| " | Yield(expr? value)\n" +#| " | YieldFrom(expr value)\n" +#| " -- need sequences for compare to distinguish between\n" +#| " -- x < 4 < 3 and (x < 4) < 3\n" +#| " | Compare(expr left, cmpop* ops, expr* comparators)\n" +#| " | Call(expr func, expr* args, keyword* keywords)\n" +#| " | FormattedValue(expr value, int conversion, expr? format_spec)\n" +#| " | Interpolation(expr value, constant str, int conversion, expr? format_spec)\n" +#| " | JoinedStr(expr* values)\n" +#| " | TemplateStr(expr* values)\n" +#| " | Constant(constant value, string? kind)\n" +#| "\n" +#| " -- the following expression can appear in assignment context\n" +#| " | Attribute(expr value, identifier attr, expr_context ctx)\n" +#| " | Subscript(expr value, expr slice, expr_context ctx)\n" +#| " | Starred(expr value, expr_context ctx)\n" +#| " | Name(identifier id, expr_context ctx)\n" +#| " | List(expr* elts, expr_context ctx)\n" +#| " | Tuple(expr* elts, expr_context ctx)\n" +#| "\n" +#| " -- can appear only in Subscript\n" +#| " | Slice(expr? lower, expr? upper, expr? step)\n" +#| "\n" +#| " -- col_offset is the byte offset in the utf8 string the parser uses\n" +#| " attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" +#| "\n" +#| " expr_context = Load | Store | Del\n" +#| "\n" +#| " boolop = And | Or\n" +#| "\n" +#| " operator = Add | Sub | Mult | MatMult | Div | Mod | Pow | LShift\n" +#| " | RShift | BitOr | BitXor | BitAnd | FloorDiv\n" +#| "\n" +#| " unaryop = Invert | Not | UAdd | USub\n" +#| "\n" +#| " cmpop = Eq | NotEq | Lt | LtE | Gt | GtE | Is | IsNot | In | NotIn\n" +#| "\n" +#| " comprehension = (expr target, expr iter, expr* ifs, int is_async)\n" +#| "\n" +#| " excepthandler = ExceptHandler(expr? type, identifier? name, stmt* body)\n" +#| " attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" +#| "\n" +#| " arguments = (arg* posonlyargs, arg* args, arg? vararg, arg* kwonlyargs,\n" +#| " expr?* kw_defaults, arg? kwarg, expr* defaults)\n" +#| "\n" +#| " arg = (identifier arg, expr? annotation, string? type_comment)\n" +#| " attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" +#| "\n" +#| " -- keyword arguments supplied to call (NULL identifier for **kwargs)\n" +#| " keyword = (identifier? arg, expr value)\n" +#| " attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" +#| "\n" +#| " -- import name with optional 'as' alias.\n" +#| " alias = (identifier name, identifier? asname)\n" +#| " attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" +#| "\n" +#| " withitem = (expr context_expr, expr? optional_vars)\n" +#| "\n" +#| " match_case = (pattern pattern, expr? guard, stmt* body)\n" +#| "\n" +#| " pattern = MatchValue(expr value)\n" +#| " | MatchSingleton(constant value)\n" +#| " | MatchSequence(pattern* patterns)\n" +#| " | MatchMapping(expr* keys, pattern* patterns, identifier? rest)\n" +#| " | MatchClass(expr cls, pattern* patterns, identifier* kwd_attrs, pattern* kwd_patterns)\n" +#| "\n" +#| " | MatchStar(identifier? name)\n" +#| " -- The optional \"rest\" MatchMapping parameter handles capturing extra mapping keys\n" +#| "\n" +#| " | MatchAs(pattern? pattern, identifier? name)\n" +#| " | MatchOr(pattern* patterns)\n" +#| "\n" +#| " attributes (int lineno, int col_offset, int end_lineno, int end_col_offset)\n" +#| "\n" +#| " type_ignore = TypeIgnore(int lineno, string tag)\n" +#| "\n" +#| " type_param = TypeVar(identifier name, expr? bound, expr? default_value)\n" +#| " | ParamSpec(identifier name, expr? default_value)\n" +#| " | TypeVarTuple(identifier name, expr? default_value)\n" +#| " attributes (int lineno, int col_offset, int end_lineno, int end_col_offset)\n" +#| "}\n" +msgid "" +"-- ASDL's 4 builtin types are:\n" +"-- identifier, int, string, constant\n" +"\n" +"module Python\n" +"{\n" +" mod = Module(stmt* body, type_ignore* type_ignores)\n" +" | Interactive(stmt* body)\n" +" | Expression(expr body)\n" +" | FunctionType(expr* argtypes, expr returns)\n" +"\n" +" stmt = FunctionDef(identifier name, arguments args,\n" +" stmt* body, expr* decorator_list, expr? returns,\n" +" string? type_comment, type_param* type_params)\n" +" | AsyncFunctionDef(identifier name, arguments args,\n" +" stmt* body, expr* decorator_list, expr? returns,\n" +" string? type_comment, type_param* type_params)\n" +"\n" +" | ClassDef(identifier name,\n" +" expr* bases,\n" +" keyword* keywords,\n" +" stmt* body,\n" +" expr* decorator_list,\n" +" type_param* type_params)\n" +" | Return(expr? value)\n" +"\n" +" | Delete(expr* targets)\n" +" | Assign(expr* targets, expr value, string? type_comment)\n" +" | TypeAlias(expr name, type_param* type_params, expr value)\n" +" | AugAssign(expr target, operator op, expr value)\n" +" -- 'simple' indicates that we annotate simple name without parens\n" +" | AnnAssign(expr target, expr annotation, expr? value, int simple)\n" +"\n" +" -- use 'orelse' because else is a keyword in target languages\n" +" | For(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment)\n" +" | AsyncFor(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment)\n" +" | While(expr test, stmt* body, stmt* orelse)\n" +" | If(expr test, stmt* body, stmt* orelse)\n" +" | With(withitem* items, stmt* body, string? type_comment)\n" +" | AsyncWith(withitem* items, stmt* body, string? type_comment)\n" +"\n" +" | Match(expr subject, match_case* cases)\n" +"\n" +" | Raise(expr? exc, expr? cause)\n" +" | Try(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody)\n" +" | TryStar(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody)\n" +" | Assert(expr test, expr? msg)\n" +"\n" +" | Import(alias* names, int? is_lazy)\n" +" | ImportFrom(identifier? module, alias* names, int? level, int? is_lazy)\n" +"\n" +" | Global(identifier* names)\n" +" | Nonlocal(identifier* names)\n" +" | Expr(expr value)\n" +" | Pass | Break | Continue\n" +"\n" +" -- col_offset is the byte offset in the utf8 string the parser uses\n" +" attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" +"\n" +" -- BoolOp() can use left & right?\n" +" expr = BoolOp(boolop op, expr* values)\n" +" | NamedExpr(expr target, expr value)\n" +" | BinOp(expr left, operator op, expr right)\n" +" | UnaryOp(unaryop op, expr operand)\n" +" | Lambda(arguments args, expr body)\n" +" | IfExp(expr test, expr body, expr orelse)\n" +" | Dict(expr?* keys, expr* values)\n" +" | Set(expr* elts)\n" +" | ListComp(expr elt, comprehension* generators)\n" +" | SetComp(expr elt, comprehension* generators)\n" +" | DictComp(expr key, expr? value, comprehension* generators)\n" +" | GeneratorExp(expr elt, comprehension* generators)\n" +" -- the grammar constrains where yield expressions can occur\n" +" | Await(expr value)\n" +" | Yield(expr? value)\n" +" | YieldFrom(expr value)\n" +" -- need sequences for compare to distinguish between\n" +" -- x < 4 < 3 and (x < 4) < 3\n" +" | Compare(expr left, cmpop* ops, expr* comparators)\n" +" | Call(expr func, expr* args, keyword* keywords)\n" +" | FormattedValue(expr value, int conversion, expr? format_spec)\n" +" | Interpolation(expr value, constant str, int conversion, expr? format_spec)\n" +" | JoinedStr(expr* values)\n" +" | TemplateStr(expr* values)\n" +" | Constant(constant value, string? kind)\n" +"\n" +" -- the following expression can appear in assignment context\n" +" | Attribute(expr value, identifier attr, expr_context ctx)\n" +" | Subscript(expr value, expr slice, expr_context ctx)\n" +" | Starred(expr value, expr_context ctx)\n" +" | Name(identifier id, expr_context ctx)\n" +" | List(expr* elts, expr_context ctx)\n" +" | Tuple(expr* elts, expr_context ctx)\n" +"\n" +" -- can appear only in Subscript\n" +" | Slice(expr? lower, expr? upper, expr? step)\n" +"\n" +" -- col_offset is the byte offset in the utf8 string the parser uses\n" +" attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" +"\n" +" expr_context = Load | Store | Del\n" +"\n" +" boolop = And | Or\n" +"\n" +" operator = Add | Sub | Mult | MatMult | Div | Mod | Pow | LShift\n" +" | RShift | BitOr | BitXor | BitAnd | FloorDiv\n" +"\n" +" unaryop = Invert | Not | UAdd | USub\n" +"\n" +" cmpop = Eq | NotEq | Lt | LtE | Gt | GtE | Is | IsNot | In | NotIn\n" +"\n" +" comprehension = (expr target, expr iter, expr* ifs, int is_async)\n" +"\n" +" excepthandler = ExceptHandler(expr? type, identifier? name, stmt* body)\n" +" attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" +"\n" +" arguments = (arg* posonlyargs, arg* args, arg? vararg, arg* kwonlyargs,\n" +" expr?* kw_defaults, arg? kwarg, expr* defaults)\n" +"\n" +" arg = (identifier arg, expr? annotation, string? type_comment)\n" +" attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" +"\n" +" -- keyword arguments supplied to call (NULL identifier for **kwargs)\n" +" keyword = (identifier? arg, expr value)\n" +" attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" +"\n" +" -- import name with optional 'as' alias.\n" +" alias = (identifier name, identifier? asname)\n" +" attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" +"\n" +" withitem = (expr context_expr, expr? optional_vars)\n" +"\n" +" match_case = (pattern pattern, expr? guard, stmt* body)\n" +"\n" +" pattern = MatchValue(expr value)\n" +" | MatchSingleton(constant value)\n" +" | MatchSequence(pattern* patterns)\n" +" | MatchMapping(expr* keys, pattern* patterns, identifier? rest)\n" +" | MatchClass(expr cls, pattern* patterns, identifier* kwd_attrs, pattern* kwd_patterns)\n" +"\n" +" | MatchStar(identifier? name)\n" +" -- The optional \"rest\" MatchMapping parameter handles capturing extra mapping keys\n" +"\n" +" | MatchAs(pattern? pattern, identifier? name)\n" +" | MatchOr(pattern* patterns)\n" +"\n" +" attributes (int lineno, int col_offset, int end_lineno, int end_col_offset)\n" +"\n" +" type_ignore = TypeIgnore(int lineno, string tag)\n" +"\n" +" type_param = TypeVar(identifier name, expr? bound, expr? default_value)\n" +" | ParamSpec(identifier name, expr? default_value)\n" +" | TypeVarTuple(identifier name, expr? default_value)\n" +" attributes (int lineno, int col_offset, int end_lineno, int end_col_offset)\n" +"}\n" +msgstr "" +"-- ASDL's 4 builtin types are:\n" +"-- identifier, int, string, constant\n" +"\n" +"module Python\n" +"{\n" +" mod = Module(stmt* body, type_ignore* type_ignores)\n" +" | Interactive(stmt* body)\n" +" | Expression(expr body)\n" +" | FunctionType(expr* argtypes, expr returns)\n" +"\n" +" stmt = FunctionDef(identifier name, arguments args,\n" +" stmt* body, expr* decorator_list, expr? returns,\n" +" string? type_comment, type_param* type_params)\n" +" | AsyncFunctionDef(identifier name, arguments args,\n" +" stmt* body, expr* decorator_list, expr? returns,\n" +" string? type_comment, type_param* type_params)\n" +"\n" +" | ClassDef(identifier name,\n" +" expr* bases,\n" +" keyword* keywords,\n" +" stmt* body,\n" +" expr* decorator_list,\n" +" type_param* type_params)\n" +" | Return(expr? value)\n" +"\n" +" | Delete(expr* targets)\n" +" | Assign(expr* targets, expr value, string? type_comment)\n" +" | TypeAlias(expr name, type_param* type_params, expr value)\n" +" | AugAssign(expr target, operator op, expr value)\n" +" -- 'simple' indicates that we annotate simple name without parens\n" +" | AnnAssign(expr target, expr annotation, expr? value, int simple)\n" +"\n" +" -- use 'orelse' because else is a keyword in target languages\n" +" | For(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment)\n" +" | AsyncFor(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment)\n" +" | While(expr test, stmt* body, stmt* orelse)\n" +" | If(expr test, stmt* body, stmt* orelse)\n" +" | With(withitem* items, stmt* body, string? type_comment)\n" +" | AsyncWith(withitem* items, stmt* body, string? type_comment)\n" +"\n" +" | Match(expr subject, match_case* cases)\n" +"\n" +" | Raise(expr? exc, expr? cause)\n" +" | Try(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody)\n" +" | TryStar(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody)\n" +" | Assert(expr test, expr? msg)\n" +"\n" +" | Import(alias* names)\n" +" | ImportFrom(identifier? module, alias* names, int? level)\n" +"\n" +" | Global(identifier* names)\n" +" | Nonlocal(identifier* names)\n" +" | Expr(expr value)\n" +" | Pass | Break | Continue\n" +"\n" +" -- col_offset is the byte offset in the utf8 string the parser uses\n" +" attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" +"\n" +" -- BoolOp() can use left & right?\n" +" expr = BoolOp(boolop op, expr* values)\n" +" | NamedExpr(expr target, expr value)\n" +" | BinOp(expr left, operator op, expr right)\n" +" | UnaryOp(unaryop op, expr operand)\n" +" | Lambda(arguments args, expr body)\n" +" | IfExp(expr test, expr body, expr orelse)\n" +" | Dict(expr?* keys, expr* values)\n" +" | Set(expr* elts)\n" +" | ListComp(expr elt, comprehension* generators)\n" +" | SetComp(expr elt, comprehension* generators)\n" +" | DictComp(expr key, expr value, comprehension* generators)\n" +" | GeneratorExp(expr elt, comprehension* generators)\n" +" -- the grammar constrains where yield expressions can occur\n" +" | Await(expr value)\n" +" | Yield(expr? value)\n" +" | YieldFrom(expr value)\n" +" -- need sequences for compare to distinguish between\n" +" -- x < 4 < 3 and (x < 4) < 3\n" +" | Compare(expr left, cmpop* ops, expr* comparators)\n" +" | Call(expr func, expr* args, keyword* keywords)\n" +" | FormattedValue(expr value, int conversion, expr? format_spec)\n" +" | Interpolation(expr value, constant str, int conversion, expr? format_spec)\n" +" | JoinedStr(expr* values)\n" +" | TemplateStr(expr* values)\n" +" | Constant(constant value, string? kind)\n" +"\n" +" -- the following expression can appear in assignment context\n" +" | Attribute(expr value, identifier attr, expr_context ctx)\n" +" | Subscript(expr value, expr slice, expr_context ctx)\n" +" | Starred(expr value, expr_context ctx)\n" +" | Name(identifier id, expr_context ctx)\n" +" | List(expr* elts, expr_context ctx)\n" +" | Tuple(expr* elts, expr_context ctx)\n" +"\n" +" -- can appear only in Subscript\n" +" | Slice(expr? lower, expr? upper, expr? step)\n" +"\n" +" -- col_offset is the byte offset in the utf8 string the parser uses\n" +" attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" +"\n" +" expr_context = Load | Store | Del\n" +"\n" +" boolop = And | Or\n" +"\n" +" operator = Add | Sub | Mult | MatMult | Div | Mod | Pow | LShift\n" +" | RShift | BitOr | BitXor | BitAnd | FloorDiv\n" +"\n" +" unaryop = Invert | Not | UAdd | USub\n" +"\n" +" cmpop = Eq | NotEq | Lt | LtE | Gt | GtE | Is | IsNot | In | NotIn\n" +"\n" +" comprehension = (expr target, expr iter, expr* ifs, int is_async)\n" +"\n" +" excepthandler = ExceptHandler(expr? type, identifier? name, stmt* body)\n" +" attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" +"\n" +" arguments = (arg* posonlyargs, arg* args, arg? vararg, arg* kwonlyargs,\n" +" expr?* kw_defaults, arg? kwarg, expr* defaults)\n" +"\n" +" arg = (identifier arg, expr? annotation, string? type_comment)\n" +" attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" +"\n" +" -- keyword arguments supplied to call (NULL identifier for **kwargs)\n" +" keyword = (identifier? arg, expr value)\n" +" attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" +"\n" +" -- import name with optional 'as' alias.\n" +" alias = (identifier name, identifier? asname)\n" +" attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" +"\n" +" withitem = (expr context_expr, expr? optional_vars)\n" +"\n" +" match_case = (pattern pattern, expr? guard, stmt* body)\n" +"\n" +" pattern = MatchValue(expr value)\n" +" | MatchSingleton(constant value)\n" +" | MatchSequence(pattern* patterns)\n" +" | MatchMapping(expr* keys, pattern* patterns, identifier? rest)\n" +" | MatchClass(expr cls, pattern* patterns, identifier* kwd_attrs, pattern* kwd_patterns)\n" +"\n" +" | MatchStar(identifier? name)\n" +" -- The optional \"rest\" MatchMapping parameter handles capturing extra mapping keys\n" +"\n" +" | MatchAs(pattern? pattern, identifier? name)\n" +" | MatchOr(pattern* patterns)\n" +"\n" +" attributes (int lineno, int col_offset, int end_lineno, int end_col_offset)\n" +"\n" +" type_ignore = TypeIgnore(int lineno, string tag)\n" +"\n" +" type_param = TypeVar(identifier name, expr? bound, expr? default_value)\n" +" | ParamSpec(identifier name, expr? default_value)\n" +" | TypeVarTuple(identifier name, expr? default_value)\n" +" attributes (int lineno, int col_offset, int end_lineno, int end_col_offset)\n" +"}\n" + msgid "Node classes" msgstr "کلاس‌های گره" -msgid "This is the base of all AST node classes. The actual node classes are derived from the :file:`Parser/Python.asdl` file, which is reproduced :ref:`above `. They are defined in the :mod:`!_ast` C module and re-exported in :mod:`!ast`." -msgstr "این پایه‌ی تمام کلاس‌های گره AST است. کلاس‌های گره واقعی از پرونده‌ی :file:`Parser/Python.asdl` مشتق شده‌اند، که در :ref:`بالا ` بازتولید شده است. آن‌ها در ماژول C :mod:`!_ast` تعریف شده‌اند و در :mod:`!ast` دوباره اکسپورت شده‌اند." +msgid "This is the abstract base of all AST node classes. The actual node classes are derived from the :file:`Parser/Python.asdl` file, which is reproduced :ref:`above `. They are defined in the :mod:`!_ast` C module and re-exported in :mod:`!ast`." +msgstr "این کلاس، کلاس پایه‌ی انتزاعی همه‌ی کلاس‌های گره AST است. کلاس‌های واقعی گره از پرونده‌ی :file:`Parser/Python.asdl` مشتق می‌شوند که در :ref:`بالا ` بازتولید شده است. این کلاس‌ها در ماژول Cِ :mod:`!_ast` تعریف شده‌اند و در :mod:`!ast` بازصدور می‌شوند." msgid "There is one class defined for each left-hand side symbol in the abstract grammar (for example, :class:`ast.stmt` or :class:`ast.expr`). In addition, there is one class defined for each constructor on the right-hand side; these classes inherit from the classes for the left-hand side trees. For example, :class:`ast.BinOp` inherits from :class:`ast.expr`. For production rules with alternatives (aka \"sums\"), the left-hand side class is abstract: only instances of specific constructor nodes are ever created." msgstr "برای هر نماد سمت چپ در دستور زبان انتزاعی، یک کلاس تعریف شده است (برای مثال، :class:`ast.stmt` یا :class:`ast.expr`). علاوه بر این، برای هر سازنده در سمت راست، یک کلاس تعریف شده است؛ این کلاس‌ها از کلاس‌های مربوط به درخت‌های سمت چپ ارث می‌برند. برای مثال، :class:`ast.BinOp` از :class:`ast.expr` ارث می‌برد. برای قواعد تولید دارای جایگزین‌ها (معروف به «مجموع‌ها»)، کلاس سمت چپ انتزاعی است: تنها نمونه‌هایی از گره‌های سازنده‌ی خاص ایجاد می‌شوند." @@ -115,8 +583,11 @@ msgstr "نسخه‌های پیشین پایتون، کلاس‌های AST یعن msgid "Old classes :class:`!ast.Index` and :class:`!ast.ExtSlice` are still available, but they will be removed in future Python releases. In the meantime, instantiating them will return an instance of a different class." msgstr "کلاس‌های قدیمی :class:`!ast.Index` و :class:`!ast.ExtSlice` هنوز در دسترس هستند، اما در نسخه‌های آینده پایتون حذف خواهند شد. تا آن زمان، نمونه‌سازی از آن‌ها یک نمونه از کلاسی دیگر را برمی‌گرداند." -msgid "Previous versions of Python allowed the creation of AST nodes that were missing required fields. Similarly, AST node constructors allowed arbitrary keyword arguments that were set as attributes of the AST node, even if they did not match any of the fields of the AST node. This behavior is deprecated and will be removed in Python 3.15." -msgstr "نسخه‌های پیشین پایتون امکان ایجاد گره‌های AST را که فاقد فیلدهای الزامی بودند، می‌دادند. به‌طور مشابه، سازنده‌های گره AST اجازه می‌دادند آرگومان‌های کلیدواژه‌ای دلخواه به‌عنوان ویژگی‌های گره AST تنظیم شوند، حتی اگر با هیچ‌یک از فیلدهای گره AST مطابقت نداشتند. این رفتار منسوخ‌شده است و در پایتون 3.15 حذف خواهد شد." +msgid "Previous versions of Python allowed the creation of AST nodes that were missing required fields. Similarly, AST node constructors allowed arbitrary keyword arguments that were set as attributes of the AST node, even if they did not match any of the fields of the AST node. These cases now raise a :exc:`TypeError`." +msgstr "نسخه‌های قبلی پایتون اجازه می‌دادند گره‌های درخت نحوی انتزاعی (AST) که فاقد فیلدهای الزامی بودند، ایجاد شوند. به همین ترتیب، سازنده‌های گره‌های AST به آرگومان کلیدواژه‌ای دلخواهی اجازه می‌دادند که به‌عنوان ویژگی‌های گره AST تنظیم شوند، حتی اگر با هیچ‌یک از فیلدهای گره AST مطابقت نداشتند. این موارد اکنون یک :exc:`TypeError` ایجاد می‌کنند." + +msgid "In the :ref:`grammar above `, the AST node classes that correspond to production rules with variants (aka \"sums\") are abstract classes. Previous versions of Python allowed for the creation of direct instances of these abstract node classes. This behavior is deprecated and will be removed in Python 3.20." +msgstr "در :ref:`دستور زبان بالا `، کلاس‌های گره AST که با قواعد تولید دارای نوع (معروف به «sums») مطابقت دارند، کلاس‌های انتزاعی هستند. نسخه‌های قبلی پایتون امکان ایجاد نمونه‌های مستقیم از این کلاس‌های گره انتزاعی را فراهم می‌کردند. این رفتار منسوخ شده است و در پایتون ۳.۲۰ حذف خواهد شد." msgid "The descriptions of the specific node classes displayed here were initially adapted from the fantastic `Green Tree Snakes `__ project and all its contributors." msgstr "توضیحات کلاس‌های گره خاصی که در اینجا نمایش داده شده‌اند، در ابتدا از پروژه‌ی فوق‌العاده‌ی `Green Tree Snakes `__ و همه‌ی مشارکت‌کنندگان آن اقتباس شده‌اند." @@ -221,22 +692,20 @@ msgid "" ">>> print(ast.dump(ast.parse('(int, str) -> List[int]', mode='func_type'), indent=4))\n" "FunctionType(\n" " argtypes=[\n" -" Name(id='int', ctx=Load()),\n" -" Name(id='str', ctx=Load())],\n" +" Name(id='int'),\n" +" Name(id='str')],\n" " returns=Subscript(\n" -" value=Name(id='List', ctx=Load()),\n" -" slice=Name(id='int', ctx=Load()),\n" -" ctx=Load()))" +" value=Name(id='List'),\n" +" slice=Name(id='int')))" msgstr "" ">>> print(ast.dump(ast.parse('(int, str) -> List[int]', mode='func_type'), indent=4))\n" "FunctionType(\n" " argtypes=[\n" -" Name(id='int', ctx=Load()),\n" -" Name(id='str', ctx=Load())],\n" +" Name(id='int'),\n" +" Name(id='str')],\n" " returns=Subscript(\n" -" value=Name(id='List', ctx=Load()),\n" -" slice=Name(id='int', ctx=Load()),\n" -" ctx=Load()))" +" value=Name(id='List'),\n" +" slice=Name(id='int')))" msgid "Literals" msgstr "مقادیر لفظی" @@ -296,14 +765,14 @@ msgid "" " values=[\n" " Constant(value='sin('),\n" " FormattedValue(\n" -" value=Name(id='a', ctx=Load()),\n" +" value=Name(id='a'),\n" " conversion=-1),\n" " Constant(value=') is '),\n" " FormattedValue(\n" " value=Call(\n" -" func=Name(id='sin', ctx=Load()),\n" +" func=Name(id='sin'),\n" " args=[\n" -" Name(id='a', ctx=Load())]),\n" +" Name(id='a')]),\n" " conversion=-1,\n" " format_spec=JoinedStr(\n" " values=[\n" @@ -315,14 +784,14 @@ msgstr "" " values=[\n" " Constant(value='sin('),\n" " FormattedValue(\n" -" value=Name(id='a', ctx=Load()),\n" +" value=Name(id='a'),\n" " conversion=-1),\n" " Constant(value=') is '),\n" " FormattedValue(\n" " value=Call(\n" -" func=Name(id='sin', ctx=Load()),\n" +" func=Name(id='sin'),\n" " args=[\n" -" Name(id='a', ctx=Load())]),\n" +" Name(id='a')]),\n" " conversion=-1,\n" " format_spec=JoinedStr(\n" " values=[\n" @@ -338,12 +807,12 @@ msgid "" " body=TemplateStr(\n" " values=[\n" " Interpolation(\n" -" value=Name(id='name', ctx=Load()),\n" +" value=Name(id='name'),\n" " str='name',\n" " conversion=-1),\n" " Constant(value=' finished '),\n" " Interpolation(\n" -" value=Name(id='place', ctx=Load()),\n" +" value=Name(id='place'),\n" " str='place',\n" " conversion=-1,\n" " format_spec=JoinedStr(\n" @@ -356,12 +825,12 @@ msgstr "" " body=TemplateStr(\n" " values=[\n" " Interpolation(\n" -" value=Name(id='name', ctx=Load()),\n" +" value=Name(id='name'),\n" " str='name',\n" " conversion=-1),\n" " Constant(value=' finished '),\n" " Interpolation(\n" -" value=Name(id='place', ctx=Load()),\n" +" value=Name(id='place'),\n" " str='place',\n" " conversion=-1,\n" " format_spec=JoinedStr(\n" @@ -408,16 +877,14 @@ msgid "" " elts=[\n" " Constant(value=1),\n" " Constant(value=2),\n" -" Constant(value=3)],\n" -" ctx=Load()))\n" +" Constant(value=3)]))\n" ">>> print(ast.dump(ast.parse('(1, 2, 3)', mode='eval'), indent=4))\n" "Expression(\n" " body=Tuple(\n" " elts=[\n" " Constant(value=1),\n" " Constant(value=2),\n" -" Constant(value=3)],\n" -" ctx=Load()))" +" Constant(value=3)]))" msgstr "" ">>> print(ast.dump(ast.parse('[1, 2, 3]', mode='eval'), indent=4))\n" "Expression(\n" @@ -425,16 +892,14 @@ msgstr "" " elts=[\n" " Constant(value=1),\n" " Constant(value=2),\n" -" Constant(value=3)],\n" -" ctx=Load()))\n" +" Constant(value=3)]))\n" ">>> print(ast.dump(ast.parse('(1, 2, 3)', mode='eval'), indent=4))\n" "Expression(\n" " body=Tuple(\n" " elts=[\n" " Constant(value=1),\n" " Constant(value=2),\n" -" Constant(value=3)],\n" -" ctx=Load()))" +" Constant(value=3)]))" msgid "A set. ``elts`` holds a list of nodes representing the set's elements." msgstr "یک مجموعه. ``elts`` شامل فهرستی از گره‌هایی است که عناصر مجموعه را نشان می‌دهند." @@ -471,7 +936,7 @@ msgid "" " None],\n" " values=[\n" " Constant(value=1),\n" -" Name(id='d', ctx=Load())]))" +" Name(id='d')]))" msgstr "" ">>> print(ast.dump(ast.parse('{\"a\":1, **d}', mode='eval'), indent=4))\n" "Expression(\n" @@ -481,7 +946,7 @@ msgstr "" " None],\n" " values=[\n" " Constant(value=1),\n" -" Name(id='d', ctx=Load())]))" +" Name(id='d')]))" msgid "Variables" msgstr "متغیرها" @@ -497,7 +962,7 @@ msgid "" "Module(\n" " body=[\n" " Expr(\n" -" value=Name(id='a', ctx=Load()))])\n" +" value=Name(id='a'))])\n" "\n" ">>> print(ast.dump(ast.parse('a = 1'), indent=4))\n" "Module(\n" @@ -518,7 +983,7 @@ msgstr "" "Module(\n" " body=[\n" " Expr(\n" -" value=Name(id='a', ctx=Load()))])\n" +" value=Name(id='a'))])\n" "\n" ">>> print(ast.dump(ast.parse('a = 1'), indent=4))\n" "Module(\n" @@ -551,7 +1016,7 @@ msgid "" " value=Name(id='b', ctx=Store()),\n" " ctx=Store())],\n" " ctx=Store())],\n" -" value=Name(id='it', ctx=Load()))])" +" value=Name(id='it'))])" msgstr "" ">>> print(ast.dump(ast.parse('a, *b = it'), indent=4))\n" "Module(\n" @@ -565,7 +1030,7 @@ msgstr "" " value=Name(id='b', ctx=Store()),\n" " ctx=Store())],\n" " ctx=Store())],\n" -" value=Name(id='it', ctx=Load()))])" +" value=Name(id='it'))])" msgid "Expressions" msgstr "عبارات" @@ -580,7 +1045,7 @@ msgid "" " Expr(\n" " value=UnaryOp(\n" " op=USub(),\n" -" operand=Name(id='a', ctx=Load())))])" +" operand=Name(id='a')))])" msgstr "" ">>> print(ast.dump(ast.parse('-a'), indent=4))\n" "Module(\n" @@ -588,7 +1053,7 @@ msgstr "" " Expr(\n" " value=UnaryOp(\n" " op=USub(),\n" -" operand=Name(id='a', ctx=Load())))])" +" operand=Name(id='a')))])" msgid "A unary operation. ``op`` is the operator, and ``operand`` any expression node." msgstr "یک عملیات یک‌عملوندی. ``op`` عملگر است و ``operand`` هر گره‌ی عبارت است." @@ -601,13 +1066,13 @@ msgid "" "Expression(\n" " body=UnaryOp(\n" " op=Not(),\n" -" operand=Name(id='x', ctx=Load())))" +" operand=Name(id='x')))" msgstr "" ">>> print(ast.dump(ast.parse('not x', mode='eval'), indent=4))\n" "Expression(\n" " body=UnaryOp(\n" " op=Not(),\n" -" operand=Name(id='x', ctx=Load())))" +" operand=Name(id='x')))" msgid "A binary operation (like addition or division). ``op`` is the operator, and ``left`` and ``right`` are any expression nodes." msgstr "یک عملیات دودویی (مانند جمع یا تقسیم). ``op`` عملگر است و ``left`` و ``right`` گره‌های عبارت دلخواه هستند." @@ -616,16 +1081,16 @@ msgid "" ">>> print(ast.dump(ast.parse('x + y', mode='eval'), indent=4))\n" "Expression(\n" " body=BinOp(\n" -" left=Name(id='x', ctx=Load()),\n" +" left=Name(id='x'),\n" " op=Add(),\n" -" right=Name(id='y', ctx=Load())))" +" right=Name(id='y')))" msgstr "" ">>> print(ast.dump(ast.parse('x + y', mode='eval'), indent=4))\n" "Expression(\n" " body=BinOp(\n" -" left=Name(id='x', ctx=Load()),\n" +" left=Name(id='x'),\n" " op=Add(),\n" -" right=Name(id='y', ctx=Load())))" +" right=Name(id='y')))" msgid "Binary operator tokens." msgstr "توکن‌های عملگر دودویی." @@ -642,16 +1107,16 @@ msgid "" " body=BoolOp(\n" " op=Or(),\n" " values=[\n" -" Name(id='x', ctx=Load()),\n" -" Name(id='y', ctx=Load())]))" +" Name(id='x'),\n" +" Name(id='y')]))" msgstr "" ">>> print(ast.dump(ast.parse('x or y', mode='eval'), indent=4))\n" "Expression(\n" " body=BoolOp(\n" " op=Or(),\n" " values=[\n" -" Name(id='x', ctx=Load()),\n" -" Name(id='y', ctx=Load())]))" +" Name(id='x'),\n" +" Name(id='y')]))" msgid "Boolean operator tokens." msgstr "توکن‌های عملگر بولی." @@ -668,7 +1133,7 @@ msgid "" " LtE(),\n" " Lt()],\n" " comparators=[\n" -" Name(id='a', ctx=Load()),\n" +" Name(id='a'),\n" " Constant(value=10)]))" msgstr "" ">>> print(ast.dump(ast.parse('1 <= a < 10', mode='eval'), indent=4))\n" @@ -679,7 +1144,7 @@ msgstr "" " LtE(),\n" " Lt()],\n" " comparators=[\n" -" Name(id='a', ctx=Load()),\n" +" Name(id='a'),\n" " Constant(value=10)]))" msgid "Comparison operator tokens." @@ -701,34 +1166,32 @@ msgid "" ">>> print(ast.dump(ast.parse('func(a, b=c, *d, **e)', mode='eval'), indent=4))\n" "Expression(\n" " body=Call(\n" -" func=Name(id='func', ctx=Load()),\n" +" func=Name(id='func'),\n" " args=[\n" -" Name(id='a', ctx=Load()),\n" +" Name(id='a'),\n" " Starred(\n" -" value=Name(id='d', ctx=Load()),\n" -" ctx=Load())],\n" +" value=Name(id='d'))],\n" " keywords=[\n" " keyword(\n" " arg='b',\n" -" value=Name(id='c', ctx=Load())),\n" +" value=Name(id='c')),\n" " keyword(\n" -" value=Name(id='e', ctx=Load()))]))" +" value=Name(id='e'))]))" msgstr "" ">>> print(ast.dump(ast.parse('func(a, b=c, *d, **e)', mode='eval'), indent=4))\n" "Expression(\n" " body=Call(\n" -" func=Name(id='func', ctx=Load()),\n" +" func=Name(id='func'),\n" " args=[\n" -" Name(id='a', ctx=Load()),\n" +" Name(id='a'),\n" " Starred(\n" -" value=Name(id='d', ctx=Load()),\n" -" ctx=Load())],\n" +" value=Name(id='d'))],\n" " keywords=[\n" " keyword(\n" " arg='b',\n" -" value=Name(id='c', ctx=Load())),\n" +" value=Name(id='c')),\n" " keyword(\n" -" value=Name(id='e', ctx=Load()))]))" +" value=Name(id='e'))]))" msgid "A keyword argument to a function call or class definition. ``arg`` is a raw string of the parameter name, ``value`` is a node to pass in." msgstr "یک آرگومان کلیدواژه‌ای برای فراخوانی تابع یا تعریف کلاس. ``arg`` یک رشته خام از نام پارامتر است، ``value`` یک گره برای ارسال است." @@ -740,16 +1203,16 @@ msgid "" ">>> print(ast.dump(ast.parse('a if b else c', mode='eval'), indent=4))\n" "Expression(\n" " body=IfExp(\n" -" test=Name(id='b', ctx=Load()),\n" -" body=Name(id='a', ctx=Load()),\n" -" orelse=Name(id='c', ctx=Load())))" +" test=Name(id='b'),\n" +" body=Name(id='a'),\n" +" orelse=Name(id='c')))" msgstr "" ">>> print(ast.dump(ast.parse('a if b else c', mode='eval'), indent=4))\n" "Expression(\n" " body=IfExp(\n" -" test=Name(id='b', ctx=Load()),\n" -" body=Name(id='a', ctx=Load()),\n" -" orelse=Name(id='c', ctx=Load())))" +" test=Name(id='b'),\n" +" body=Name(id='a'),\n" +" orelse=Name(id='c')))" msgid "Attribute access, e.g. ``d.keys``. ``value`` is a node, typically a :class:`Name`. ``attr`` is a bare string giving the name of the attribute, and ``ctx`` is :class:`Load`, :class:`Store` or :class:`Del` according to how the attribute is acted on." msgstr "دسترسی به ویژگی، مثلاً ``d.keys``. ``value`` یک گره است، معمولاً یک :class:`Name`. ``attr`` یک رشته‌ی ساده است که نام ویژگی را مشخص می‌کند، و ``ctx`` بسته به نوع عمل انجام‌شده روی ویژگی، :class:`Load`، :class:`Store` یا :class:`Del` است." @@ -758,16 +1221,14 @@ msgid "" ">>> print(ast.dump(ast.parse('snake.colour', mode='eval'), indent=4))\n" "Expression(\n" " body=Attribute(\n" -" value=Name(id='snake', ctx=Load()),\n" -" attr='colour',\n" -" ctx=Load()))" +" value=Name(id='snake'),\n" +" attr='colour'))" msgstr "" ">>> print(ast.dump(ast.parse('snake.colour', mode='eval'), indent=4))\n" "Expression(\n" " body=Attribute(\n" -" value=Name(id='snake', ctx=Load()),\n" -" attr='colour',\n" -" ctx=Load()))" +" value=Name(id='snake'),\n" +" attr='colour'))" msgid "A named expression. This AST node is produced by the assignment expressions operator (also known as the walrus operator). As opposed to the :class:`Assign` node in which the first argument can be multiple nodes, in this case both ``target`` and ``value`` must be single nodes." msgstr "یک عبارت نام‌دار. این گره AST توسط عملگر عبارت انتساب (که به عملگر walrus نیز شناخته می‌شود) تولید می‌شود. برخلاف گره :class:`Assign` که در آن اولین آرگومان می‌تواند چندین گره باشد، در این حالت هر دو ``target`` و ``value`` باید گره‌های تکی باشند." @@ -795,28 +1256,24 @@ msgid "" ">>> print(ast.dump(ast.parse('l[1:2, 3]', mode='eval'), indent=4))\n" "Expression(\n" " body=Subscript(\n" -" value=Name(id='l', ctx=Load()),\n" +" value=Name(id='l'),\n" " slice=Tuple(\n" " elts=[\n" " Slice(\n" " lower=Constant(value=1),\n" " upper=Constant(value=2)),\n" -" Constant(value=3)],\n" -" ctx=Load()),\n" -" ctx=Load()))" +" Constant(value=3)])))" msgstr "" ">>> print(ast.dump(ast.parse('l[1:2, 3]', mode='eval'), indent=4))\n" "Expression(\n" " body=Subscript(\n" -" value=Name(id='l', ctx=Load()),\n" +" value=Name(id='l'),\n" " slice=Tuple(\n" " elts=[\n" " Slice(\n" " lower=Constant(value=1),\n" " upper=Constant(value=2)),\n" -" Constant(value=3)],\n" -" ctx=Load()),\n" -" ctx=Load()))" +" Constant(value=3)])))" msgid "Regular slicing (on the form ``lower:upper`` or ``lower:upper:step``). Can occur only inside the *slice* field of :class:`Subscript`, either directly or as an element of :class:`Tuple`." msgstr "اسلایس معمولی (به‌شکل ``lower:upper`` یا ``lower:upper:step``). فقط می‌تواند درون فیلد *slice* در :class:`Subscript` رخ دهد، چه به‌صورت مستقیم و چه به‌عنوان عنصری از :class:`Tuple`." @@ -825,20 +1282,18 @@ msgid "" ">>> print(ast.dump(ast.parse('l[1:2]', mode='eval'), indent=4))\n" "Expression(\n" " body=Subscript(\n" -" value=Name(id='l', ctx=Load()),\n" +" value=Name(id='l'),\n" " slice=Slice(\n" " lower=Constant(value=1),\n" -" upper=Constant(value=2)),\n" -" ctx=Load()))" +" upper=Constant(value=2))))" msgstr "" ">>> print(ast.dump(ast.parse('l[1:2]', mode='eval'), indent=4))\n" "Expression(\n" " body=Subscript(\n" -" value=Name(id='l', ctx=Load()),\n" +" value=Name(id='l'),\n" " slice=Slice(\n" " lower=Constant(value=1),\n" -" upper=Constant(value=2)),\n" -" ctx=Load()))" +" upper=Constant(value=2))))" msgid "Comprehensions" msgstr "درک‌ها" @@ -846,6 +1301,9 @@ msgstr "درک‌ها" msgid "List and set comprehensions, generator expressions, and dictionary comprehensions. ``elt`` (or ``key`` and ``value``) is a single node representing the part that will be evaluated for each item." msgstr "درک‌های فهرستی و مجموعه‌ای، عبارات تولیدگر، و درک‌های دیکشنری. ``elt`` (یا ``key`` و ``value``) یک گره واحد است که نشان‌دهنده‌ی بخشی است که برای هر آیتم ارزیابی می‌شود." +msgid "For dictionary comprehensions using unpacking, for example ``{**item for item in items}``, the expression to be expanded goes in ``key`` and ``value`` is ``None``." +msgstr "برای درک‌های دیکشنری که از بازکردن بسته استفاده می‌کنند، مثلاً ``{**item for item in items}``، عبارت قابل گسترش در ``key`` قرار می‌گیرد و ``value`` برابر با ``None`` است." + msgid "``generators`` is a list of :class:`comprehension` nodes." msgstr "``generators`` فهرستی از گره‌های :class:`comprehension` است." @@ -856,11 +1314,11 @@ msgid "" "... ))\n" "Expression(\n" " body=ListComp(\n" -" elt=Name(id='x', ctx=Load()),\n" +" elt=Name(id='x'),\n" " generators=[\n" " comprehension(\n" " target=Name(id='x', ctx=Store()),\n" -" iter=Name(id='numbers', ctx=Load()),\n" +" iter=Name(id='numbers'),\n" " is_async=0)]))\n" ">>> print(ast.dump(\n" "... ast.parse('{x: x**2 for x in numbers}', mode='eval'),\n" @@ -868,15 +1326,15 @@ msgid "" "... ))\n" "Expression(\n" " body=DictComp(\n" -" key=Name(id='x', ctx=Load()),\n" +" key=Name(id='x'),\n" " value=BinOp(\n" -" left=Name(id='x', ctx=Load()),\n" +" left=Name(id='x'),\n" " op=Pow(),\n" " right=Constant(value=2)),\n" " generators=[\n" " comprehension(\n" " target=Name(id='x', ctx=Store()),\n" -" iter=Name(id='numbers', ctx=Load()),\n" +" iter=Name(id='numbers'),\n" " is_async=0)]))\n" ">>> print(ast.dump(\n" "... ast.parse('{x for x in numbers}', mode='eval'),\n" @@ -884,11 +1342,11 @@ msgid "" "... ))\n" "Expression(\n" " body=SetComp(\n" -" elt=Name(id='x', ctx=Load()),\n" +" elt=Name(id='x'),\n" " generators=[\n" " comprehension(\n" " target=Name(id='x', ctx=Store()),\n" -" iter=Name(id='numbers', ctx=Load()),\n" +" iter=Name(id='numbers'),\n" " is_async=0)]))" msgstr "" ">>> print(ast.dump(\n" @@ -897,11 +1355,11 @@ msgstr "" "... ))\n" "Expression(\n" " body=ListComp(\n" -" elt=Name(id='x', ctx=Load()),\n" +" elt=Name(id='x'),\n" " generators=[\n" " comprehension(\n" " target=Name(id='x', ctx=Store()),\n" -" iter=Name(id='numbers', ctx=Load()),\n" +" iter=Name(id='numbers'),\n" " is_async=0)]))\n" ">>> print(ast.dump(\n" "... ast.parse('{x: x**2 for x in numbers}', mode='eval'),\n" @@ -909,15 +1367,15 @@ msgstr "" "... ))\n" "Expression(\n" " body=DictComp(\n" -" key=Name(id='x', ctx=Load()),\n" +" key=Name(id='x'),\n" " value=BinOp(\n" -" left=Name(id='x', ctx=Load()),\n" +" left=Name(id='x'),\n" " op=Pow(),\n" " right=Constant(value=2)),\n" " generators=[\n" " comprehension(\n" " target=Name(id='x', ctx=Store()),\n" -" iter=Name(id='numbers', ctx=Load()),\n" +" iter=Name(id='numbers'),\n" " is_async=0)]))\n" ">>> print(ast.dump(\n" "... ast.parse('{x for x in numbers}', mode='eval'),\n" @@ -925,11 +1383,11 @@ msgstr "" "... ))\n" "Expression(\n" " body=SetComp(\n" -" elt=Name(id='x', ctx=Load()),\n" +" elt=Name(id='x'),\n" " generators=[\n" " comprehension(\n" " target=Name(id='x', ctx=Store()),\n" -" iter=Name(id='numbers', ctx=Load()),\n" +" iter=Name(id='numbers'),\n" " is_async=0)]))" msgid "One ``for`` clause in a comprehension. ``target`` is the reference to use for each element - typically a :class:`Name` or :class:`Tuple` node. ``iter`` is the object to iterate over. ``ifs`` is a list of test expressions: each ``for`` clause can have multiple ``ifs``." @@ -944,17 +1402,17 @@ msgid "" "Expression(\n" " body=ListComp(\n" " elt=Call(\n" -" func=Name(id='ord', ctx=Load()),\n" +" func=Name(id='ord'),\n" " args=[\n" -" Name(id='c', ctx=Load())]),\n" +" Name(id='c')]),\n" " generators=[\n" " comprehension(\n" " target=Name(id='line', ctx=Store()),\n" -" iter=Name(id='file', ctx=Load()),\n" +" iter=Name(id='file'),\n" " is_async=0),\n" " comprehension(\n" " target=Name(id='c', ctx=Store()),\n" -" iter=Name(id='line', ctx=Load()),\n" +" iter=Name(id='line'),\n" " is_async=0)]))\n" "\n" ">>> print(ast.dump(ast.parse('(n**2 for n in it if n>5 if n<10)', mode='eval'),\n" @@ -962,22 +1420,22 @@ msgid "" "Expression(\n" " body=GeneratorExp(\n" " elt=BinOp(\n" -" left=Name(id='n', ctx=Load()),\n" +" left=Name(id='n'),\n" " op=Pow(),\n" " right=Constant(value=2)),\n" " generators=[\n" " comprehension(\n" " target=Name(id='n', ctx=Store()),\n" -" iter=Name(id='it', ctx=Load()),\n" +" iter=Name(id='it'),\n" " ifs=[\n" " Compare(\n" -" left=Name(id='n', ctx=Load()),\n" +" left=Name(id='n'),\n" " ops=[\n" " Gt()],\n" " comparators=[\n" " Constant(value=5)]),\n" " Compare(\n" -" left=Name(id='n', ctx=Load()),\n" +" left=Name(id='n'),\n" " ops=[\n" " Lt()],\n" " comparators=[\n" @@ -988,11 +1446,11 @@ msgid "" "... indent=4)) # Async comprehension\n" "Expression(\n" " body=ListComp(\n" -" elt=Name(id='i', ctx=Load()),\n" +" elt=Name(id='i'),\n" " generators=[\n" " comprehension(\n" " target=Name(id='i', ctx=Store()),\n" -" iter=Name(id='soc', ctx=Load()),\n" +" iter=Name(id='soc'),\n" " is_async=1)]))" msgstr "" ">>> print(ast.dump(ast.parse('[ord(c) for line in file for c in line]', mode='eval'),\n" @@ -1000,17 +1458,17 @@ msgstr "" "Expression(\n" " body=ListComp(\n" " elt=Call(\n" -" func=Name(id='ord', ctx=Load()),\n" +" func=Name(id='ord'),\n" " args=[\n" -" Name(id='c', ctx=Load())]),\n" +" Name(id='c')]),\n" " generators=[\n" " comprehension(\n" " target=Name(id='line', ctx=Store()),\n" -" iter=Name(id='file', ctx=Load()),\n" +" iter=Name(id='file'),\n" " is_async=0),\n" " comprehension(\n" " target=Name(id='c', ctx=Store()),\n" -" iter=Name(id='line', ctx=Load()),\n" +" iter=Name(id='line'),\n" " is_async=0)]))\n" "\n" ">>> print(ast.dump(ast.parse('(n**2 for n in it if n>5 if n<10)', mode='eval'),\n" @@ -1018,22 +1476,22 @@ msgstr "" "Expression(\n" " body=GeneratorExp(\n" " elt=BinOp(\n" -" left=Name(id='n', ctx=Load()),\n" +" left=Name(id='n'),\n" " op=Pow(),\n" " right=Constant(value=2)),\n" " generators=[\n" " comprehension(\n" " target=Name(id='n', ctx=Store()),\n" -" iter=Name(id='it', ctx=Load()),\n" +" iter=Name(id='it'),\n" " ifs=[\n" " Compare(\n" -" left=Name(id='n', ctx=Load()),\n" +" left=Name(id='n'),\n" " ops=[\n" " Gt()],\n" " comparators=[\n" " Constant(value=5)]),\n" " Compare(\n" -" left=Name(id='n', ctx=Load()),\n" +" left=Name(id='n'),\n" " ops=[\n" " Lt()],\n" " comparators=[\n" @@ -1044,11 +1502,11 @@ msgstr "" "... indent=4)) # Async comprehension\n" "Expression(\n" " body=ListComp(\n" -" elt=Name(id='i', ctx=Load()),\n" +" elt=Name(id='i'),\n" " generators=[\n" " comprehension(\n" " target=Name(id='i', ctx=Store()),\n" -" iter=Name(id='soc', ctx=Load()),\n" +" iter=Name(id='soc'),\n" " is_async=1)]))" msgid "Statements" @@ -1083,7 +1541,7 @@ msgid "" " Name(id='a', ctx=Store()),\n" " Name(id='b', ctx=Store())],\n" " ctx=Store())],\n" -" value=Name(id='c', ctx=Load()))])" +" value=Name(id='c'))])" msgstr "" ">>> print(ast.dump(ast.parse('a = b = 1'), indent=4)) # Multiple assignment\n" "Module(\n" @@ -1104,7 +1562,7 @@ msgstr "" " Name(id='a', ctx=Store()),\n" " Name(id='b', ctx=Store())],\n" " ctx=Store())],\n" -" value=Name(id='c', ctx=Load()))])" +" value=Name(id='c'))])" msgid "An assignment with a type annotation. ``target`` is a single node and can be a :class:`Name`, an :class:`Attribute` or a :class:`Subscript`. ``annotation`` is the annotation, such as a :class:`Constant` or :class:`Name` node. ``value`` is a single optional node." msgstr "یک انتساب با حاشیه‌نویسی نوع. ``target`` یک گره واحد است و می‌تواند یک :class:`Name`، یک :class:`Attribute` یا یک :class:`Subscript` باشد. ``annotation`` حاشیه‌نویسی است، مانند یک گره :class:`Constant` یا :class:`Name`. ``value`` یک گره واحد اختیاری است." @@ -1118,7 +1576,7 @@ msgid "" " body=[\n" " AnnAssign(\n" " target=Name(id='c', ctx=Store()),\n" -" annotation=Name(id='int', ctx=Load()),\n" +" annotation=Name(id='int'),\n" " simple=1)])\n" "\n" ">>> print(ast.dump(ast.parse('(a): int = 1'), indent=4)) # Annotation with parenthesis\n" @@ -1126,7 +1584,7 @@ msgid "" " body=[\n" " AnnAssign(\n" " target=Name(id='a', ctx=Store()),\n" -" annotation=Name(id='int', ctx=Load()),\n" +" annotation=Name(id='int'),\n" " value=Constant(value=1),\n" " simple=0)])\n" "\n" @@ -1135,10 +1593,10 @@ msgid "" " body=[\n" " AnnAssign(\n" " target=Attribute(\n" -" value=Name(id='a', ctx=Load()),\n" +" value=Name(id='a'),\n" " attr='b',\n" " ctx=Store()),\n" -" annotation=Name(id='int', ctx=Load()),\n" +" annotation=Name(id='int'),\n" " simple=0)])\n" "\n" ">>> print(ast.dump(ast.parse('a[1]: int'), indent=4)) # Subscript annotation\n" @@ -1146,10 +1604,10 @@ msgid "" " body=[\n" " AnnAssign(\n" " target=Subscript(\n" -" value=Name(id='a', ctx=Load()),\n" +" value=Name(id='a'),\n" " slice=Constant(value=1),\n" " ctx=Store()),\n" -" annotation=Name(id='int', ctx=Load()),\n" +" annotation=Name(id='int'),\n" " simple=0)])" msgstr "" ">>> print(ast.dump(ast.parse('c: int'), indent=4))\n" @@ -1157,7 +1615,7 @@ msgstr "" " body=[\n" " AnnAssign(\n" " target=Name(id='c', ctx=Store()),\n" -" annotation=Name(id='int', ctx=Load()),\n" +" annotation=Name(id='int'),\n" " simple=1)])\n" "\n" ">>> print(ast.dump(ast.parse('(a): int = 1'), indent=4)) # Annotation with parenthesis\n" @@ -1165,7 +1623,7 @@ msgstr "" " body=[\n" " AnnAssign(\n" " target=Name(id='a', ctx=Store()),\n" -" annotation=Name(id='int', ctx=Load()),\n" +" annotation=Name(id='int'),\n" " value=Constant(value=1),\n" " simple=0)])\n" "\n" @@ -1174,10 +1632,10 @@ msgstr "" " body=[\n" " AnnAssign(\n" " target=Attribute(\n" -" value=Name(id='a', ctx=Load()),\n" +" value=Name(id='a'),\n" " attr='b',\n" " ctx=Store()),\n" -" annotation=Name(id='int', ctx=Load()),\n" +" annotation=Name(id='int'),\n" " simple=0)])\n" "\n" ">>> print(ast.dump(ast.parse('a[1]: int'), indent=4)) # Subscript annotation\n" @@ -1185,10 +1643,10 @@ msgstr "" " body=[\n" " AnnAssign(\n" " target=Subscript(\n" -" value=Name(id='a', ctx=Load()),\n" +" value=Name(id='a'),\n" " slice=Constant(value=1),\n" " ctx=Store()),\n" -" annotation=Name(id='int', ctx=Load()),\n" +" annotation=Name(id='int'),\n" " simple=0)])" msgid "Augmented assignment, such as ``a += 1``. In the following example, ``target`` is a :class:`Name` node for ``x`` (with the :class:`Store` context), ``op`` is :class:`Add`, and ``value`` is a :class:`Constant` with value for 1." @@ -1222,15 +1680,15 @@ msgid "" "Module(\n" " body=[\n" " Raise(\n" -" exc=Name(id='x', ctx=Load()),\n" -" cause=Name(id='y', ctx=Load()))])" +" exc=Name(id='x'),\n" +" cause=Name(id='y'))])" msgstr "" ">>> print(ast.dump(ast.parse('raise x from y'), indent=4))\n" "Module(\n" " body=[\n" " Raise(\n" -" exc=Name(id='x', ctx=Load()),\n" -" cause=Name(id='y', ctx=Load()))])" +" exc=Name(id='x'),\n" +" cause=Name(id='y'))])" msgid "An assertion. ``test`` holds the condition, such as a :class:`Compare` node. ``msg`` holds the failure message." msgstr "یک ادعا. ``test`` حاوی شرط است، مانند یک گره :class:`Compare`. ``msg`` حاوی پیام شکست است." @@ -1240,15 +1698,15 @@ msgid "" "Module(\n" " body=[\n" " Assert(\n" -" test=Name(id='x', ctx=Load()),\n" -" msg=Name(id='y', ctx=Load()))])" +" test=Name(id='x'),\n" +" msg=Name(id='y'))])" msgstr "" ">>> print(ast.dump(ast.parse('assert x,y'), indent=4))\n" "Module(\n" " body=[\n" " Assert(\n" -" test=Name(id='x', ctx=Load()),\n" -" msg=Name(id='y', ctx=Load()))])" +" test=Name(id='x'),\n" +" msg=Name(id='y'))])" msgid "Represents a ``del`` statement. ``targets`` is a list of nodes, such as :class:`Name`, :class:`Attribute` or :class:`Subscript` nodes." msgstr "نشان‌دهنده‌ی یک دستور ``del`` است. ``targets`` فهرستی از گره‌ها است، مانند گره‌های :class:`Name`، :class:`Attribute` یا :class:`Subscript`." @@ -1295,14 +1753,14 @@ msgid "" " body=[\n" " TypeAlias(\n" " name=Name(id='Alias', ctx=Store()),\n" -" value=Name(id='int', ctx=Load()))])" +" value=Name(id='int'))])" msgstr "" ">>> print(ast.dump(ast.parse('type Alias = int'), indent=4))\n" "Module(\n" " body=[\n" " TypeAlias(\n" " name=Name(id='Alias', ctx=Store()),\n" -" value=Name(id='int', ctx=Load()))])" +" value=Name(id='int'))])" msgid "Other statements which are only applicable inside functions or loops are described in other sections." msgstr "دستورهای دیگر که فقط داخل توابع یا حلقه‌ها قابل استفاده هستند، در بخش‌های دیگر شرح داده شده‌اند." @@ -1321,7 +1779,8 @@ msgid "" " names=[\n" " alias(name='x'),\n" " alias(name='y'),\n" -" alias(name='z')])])" +" alias(name='z')],\n" +" is_lazy=0)])" msgstr "" ">>> print(ast.dump(ast.parse('import x,y,z'), indent=4))\n" "Module(\n" @@ -1330,7 +1789,8 @@ msgstr "" " names=[\n" " alias(name='x'),\n" " alias(name='y'),\n" -" alias(name='z')])])" +" alias(name='z')],\n" +" is_lazy=0)])" msgid "Represents ``from x import y``. ``module`` is a raw string of the 'from' name, without any leading dots, or ``None`` for statements such as ``from . import foo``. ``level`` is an integer holding the level of the relative import (0 means absolute import)." msgstr "نشان‌دهنده‌ی ``from x import y`` است. ``module`` یک رشته خام از نام 'from'، بدون هیچ نقطه‌ی ابتدایی، یا ``None`` برای دستورهایی مانند ``from . import foo`` است. ``level`` یک عدد صحیح است که سطح ایمپورت نسبی را نگه می‌دارد (۰ به معنای ایمپورت مطلق است)." @@ -1345,7 +1805,8 @@ msgid "" " alias(name='x'),\n" " alias(name='y'),\n" " alias(name='z')],\n" -" level=0)])" +" level=0,\n" +" is_lazy=0)])" msgstr "" ">>> print(ast.dump(ast.parse('from y import x,y,z'), indent=4))\n" "Module(\n" @@ -1356,7 +1817,8 @@ msgstr "" " alias(name='x'),\n" " alias(name='y'),\n" " alias(name='z')],\n" -" level=0)])" +" level=0,\n" +" is_lazy=0)])" msgid "Both parameters are raw strings of the names. ``asname`` can be ``None`` if the regular name is to be used." msgstr "هر دو پارامتر، رشته‌های خام نام‌ها هستند. اگر قرار باشد از نام معمولی استفاده شود، ``asname`` می‌تواند ``None`` باشد." @@ -1370,7 +1832,8 @@ msgid "" " names=[\n" " alias(name='a', asname='b'),\n" " alias(name='c')],\n" -" level=2)])" +" level=2,\n" +" is_lazy=0)])" msgstr "" ">>> print(ast.dump(ast.parse('from ..foo.bar import a as b, c'), indent=4))\n" "Module(\n" @@ -1380,7 +1843,8 @@ msgstr "" " names=[\n" " alias(name='a', asname='b'),\n" " alias(name='c')],\n" -" level=2)])" +" level=2,\n" +" is_lazy=0)])" msgid "Control flow" msgstr "کنترل جریان" @@ -1406,13 +1870,13 @@ msgid "" "Module(\n" " body=[\n" " If(\n" -" test=Name(id='x', ctx=Load()),\n" +" test=Name(id='x'),\n" " body=[\n" " Expr(\n" " value=Constant(value=Ellipsis))],\n" " orelse=[\n" " If(\n" -" test=Name(id='y', ctx=Load()),\n" +" test=Name(id='y'),\n" " body=[\n" " Expr(\n" " value=Constant(value=Ellipsis))],\n" @@ -1431,13 +1895,13 @@ msgstr "" "Module(\n" " body=[\n" " If(\n" -" test=Name(id='x', ctx=Load()),\n" +" test=Name(id='x'),\n" " body=[\n" " Expr(\n" " value=Constant(value=Ellipsis))],\n" " orelse=[\n" " If(\n" -" test=Name(id='y', ctx=Load()),\n" +" test=Name(id='y'),\n" " body=[\n" " Expr(\n" " value=Constant(value=Ellipsis))],\n" @@ -1459,7 +1923,7 @@ msgid "" " body=[\n" " For(\n" " target=Name(id='x', ctx=Store()),\n" -" iter=Name(id='y', ctx=Load()),\n" +" iter=Name(id='y'),\n" " body=[\n" " Expr(\n" " value=Constant(value=Ellipsis))],\n" @@ -1477,7 +1941,7 @@ msgstr "" " body=[\n" " For(\n" " target=Name(id='x', ctx=Store()),\n" -" iter=Name(id='y', ctx=Load()),\n" +" iter=Name(id='y'),\n" " body=[\n" " Expr(\n" " value=Constant(value=Ellipsis))],\n" @@ -1498,7 +1962,7 @@ msgid "" "Module(\n" " body=[\n" " While(\n" -" test=Name(id='x', ctx=Load()),\n" +" test=Name(id='x'),\n" " body=[\n" " Expr(\n" " value=Constant(value=Ellipsis))],\n" @@ -1515,7 +1979,7 @@ msgstr "" "Module(\n" " body=[\n" " While(\n" -" test=Name(id='x', ctx=Load()),\n" +" test=Name(id='x'),\n" " body=[\n" " Expr(\n" " value=Constant(value=Ellipsis))],\n" @@ -1539,11 +2003,11 @@ msgid "" " body=[\n" " For(\n" " target=Name(id='a', ctx=Store()),\n" -" iter=Name(id='b', ctx=Load()),\n" +" iter=Name(id='b'),\n" " body=[\n" " If(\n" " test=Compare(\n" -" left=Name(id='a', ctx=Load()),\n" +" left=Name(id='a'),\n" " ops=[\n" " Gt()],\n" " comparators=[\n" @@ -1565,11 +2029,11 @@ msgstr "" " body=[\n" " For(\n" " target=Name(id='a', ctx=Store()),\n" -" iter=Name(id='b', ctx=Load()),\n" +" iter=Name(id='b'),\n" " body=[\n" " If(\n" " test=Compare(\n" -" left=Name(id='a', ctx=Load()),\n" +" left=Name(id='a'),\n" " ops=[\n" " Gt()],\n" " comparators=[\n" @@ -1603,12 +2067,12 @@ msgid "" " value=Constant(value=Ellipsis))],\n" " handlers=[\n" " ExceptHandler(\n" -" type=Name(id='Exception', ctx=Load()),\n" +" type=Name(id='Exception'),\n" " body=[\n" " Expr(\n" " value=Constant(value=Ellipsis))]),\n" " ExceptHandler(\n" -" type=Name(id='OtherException', ctx=Load()),\n" +" type=Name(id='OtherException'),\n" " name='e',\n" " body=[\n" " Expr(\n" @@ -1640,12 +2104,12 @@ msgstr "" " value=Constant(value=Ellipsis))],\n" " handlers=[\n" " ExceptHandler(\n" -" type=Name(id='Exception', ctx=Load()),\n" +" type=Name(id='Exception'),\n" " body=[\n" " Expr(\n" " value=Constant(value=Ellipsis))]),\n" " ExceptHandler(\n" -" type=Name(id='OtherException', ctx=Load()),\n" +" type=Name(id='OtherException'),\n" " name='e',\n" " body=[\n" " Expr(\n" @@ -1675,7 +2139,7 @@ msgid "" " value=Constant(value=Ellipsis))],\n" " handlers=[\n" " ExceptHandler(\n" -" type=Name(id='Exception', ctx=Load()),\n" +" type=Name(id='Exception'),\n" " body=[\n" " Expr(\n" " value=Constant(value=Ellipsis))])])])" @@ -1694,7 +2158,7 @@ msgstr "" " value=Constant(value=Ellipsis))],\n" " handlers=[\n" " ExceptHandler(\n" -" type=Name(id='Exception', ctx=Load()),\n" +" type=Name(id='Exception'),\n" " body=[\n" " Expr(\n" " value=Constant(value=Ellipsis))])])])" @@ -1715,12 +2179,12 @@ msgid "" " body=[\n" " Expr(\n" " value=BinOp(\n" -" left=Name(id='a', ctx=Load()),\n" +" left=Name(id='a'),\n" " op=Add(),\n" " right=Constant(value=1)))],\n" " handlers=[\n" " ExceptHandler(\n" -" type=Name(id='TypeError', ctx=Load()),\n" +" type=Name(id='TypeError'),\n" " body=[\n" " Pass()])])])" msgstr "" @@ -1736,12 +2200,12 @@ msgstr "" " body=[\n" " Expr(\n" " value=BinOp(\n" -" left=Name(id='a', ctx=Load()),\n" +" left=Name(id='a'),\n" " op=Add(),\n" " right=Constant(value=1)))],\n" " handlers=[\n" " ExceptHandler(\n" -" type=Name(id='TypeError', ctx=Load()),\n" +" type=Name(id='TypeError'),\n" " body=[\n" " Pass()])])])" @@ -1761,18 +2225,18 @@ msgid "" " With(\n" " items=[\n" " withitem(\n" -" context_expr=Name(id='a', ctx=Load()),\n" +" context_expr=Name(id='a'),\n" " optional_vars=Name(id='b', ctx=Store())),\n" " withitem(\n" -" context_expr=Name(id='c', ctx=Load()),\n" +" context_expr=Name(id='c'),\n" " optional_vars=Name(id='d', ctx=Store()))],\n" " body=[\n" " Expr(\n" " value=Call(\n" -" func=Name(id='something', ctx=Load()),\n" +" func=Name(id='something'),\n" " args=[\n" -" Name(id='b', ctx=Load()),\n" -" Name(id='d', ctx=Load())]))])])" +" Name(id='b'),\n" +" Name(id='d')]))])])" msgstr "" ">>> print(ast.dump(ast.parse(\"\"\"\\\n" "... with a as b, c as d:\n" @@ -1783,18 +2247,18 @@ msgstr "" " With(\n" " items=[\n" " withitem(\n" -" context_expr=Name(id='a', ctx=Load()),\n" +" context_expr=Name(id='a'),\n" " optional_vars=Name(id='b', ctx=Store())),\n" " withitem(\n" -" context_expr=Name(id='c', ctx=Load()),\n" +" context_expr=Name(id='c'),\n" " optional_vars=Name(id='d', ctx=Store()))],\n" " body=[\n" " Expr(\n" " value=Call(\n" -" func=Name(id='something', ctx=Load()),\n" +" func=Name(id='something'),\n" " args=[\n" -" Name(id='b', ctx=Load()),\n" -" Name(id='d', ctx=Load())]))])])" +" Name(id='b'),\n" +" Name(id='d')]))])])" msgid "Pattern matching" msgstr "تطبیق الگو" @@ -1822,14 +2286,14 @@ msgid "" "Module(\n" " body=[\n" " Match(\n" -" subject=Name(id='x', ctx=Load()),\n" +" subject=Name(id='x'),\n" " cases=[\n" " match_case(\n" " pattern=MatchSequence(\n" " patterns=[\n" " MatchAs(name='x')]),\n" " guard=Compare(\n" -" left=Name(id='x', ctx=Load()),\n" +" left=Name(id='x'),\n" " ops=[\n" " Gt()],\n" " comparators=[\n" @@ -1839,7 +2303,7 @@ msgid "" " value=Constant(value=Ellipsis))]),\n" " match_case(\n" " pattern=MatchClass(\n" -" cls=Name(id='tuple', ctx=Load())),\n" +" cls=Name(id='tuple')),\n" " body=[\n" " Expr(\n" " value=Constant(value=Ellipsis))])])])" @@ -1854,14 +2318,14 @@ msgstr "" "Module(\n" " body=[\n" " Match(\n" -" subject=Name(id='x', ctx=Load()),\n" +" subject=Name(id='x'),\n" " cases=[\n" " match_case(\n" " pattern=MatchSequence(\n" " patterns=[\n" " MatchAs(name='x')]),\n" " guard=Compare(\n" -" left=Name(id='x', ctx=Load()),\n" +" left=Name(id='x'),\n" " ops=[\n" " Gt()],\n" " comparators=[\n" @@ -1871,7 +2335,7 @@ msgstr "" " value=Constant(value=Ellipsis))]),\n" " match_case(\n" " pattern=MatchClass(\n" -" cls=Name(id='tuple', ctx=Load())),\n" +" cls=Name(id='tuple')),\n" " body=[\n" " Expr(\n" " value=Constant(value=Ellipsis))])])])" @@ -1888,7 +2352,7 @@ msgid "" "Module(\n" " body=[\n" " Match(\n" -" subject=Name(id='x', ctx=Load()),\n" +" subject=Name(id='x'),\n" " cases=[\n" " match_case(\n" " pattern=MatchValue(\n" @@ -1905,7 +2369,7 @@ msgstr "" "Module(\n" " body=[\n" " Match(\n" -" subject=Name(id='x', ctx=Load()),\n" +" subject=Name(id='x'),\n" " cases=[\n" " match_case(\n" " pattern=MatchValue(\n" @@ -1926,7 +2390,7 @@ msgid "" "Module(\n" " body=[\n" " Match(\n" -" subject=Name(id='x', ctx=Load()),\n" +" subject=Name(id='x'),\n" " cases=[\n" " match_case(\n" " pattern=MatchSingleton(value=None),\n" @@ -1942,7 +2406,7 @@ msgstr "" "Module(\n" " body=[\n" " Match(\n" -" subject=Name(id='x', ctx=Load()),\n" +" subject=Name(id='x'),\n" " cases=[\n" " match_case(\n" " pattern=MatchSingleton(value=None),\n" @@ -1962,7 +2426,7 @@ msgid "" "Module(\n" " body=[\n" " Match(\n" -" subject=Name(id='x', ctx=Load()),\n" +" subject=Name(id='x'),\n" " cases=[\n" " match_case(\n" " pattern=MatchSequence(\n" @@ -1983,7 +2447,7 @@ msgstr "" "Module(\n" " body=[\n" " Match(\n" -" subject=Name(id='x', ctx=Load()),\n" +" subject=Name(id='x'),\n" " cases=[\n" " match_case(\n" " pattern=MatchSequence(\n" @@ -2010,7 +2474,7 @@ msgid "" "Module(\n" " body=[\n" " Match(\n" -" subject=Name(id='x', ctx=Load()),\n" +" subject=Name(id='x'),\n" " cases=[\n" " match_case(\n" " pattern=MatchSequence(\n" @@ -2041,7 +2505,7 @@ msgstr "" "Module(\n" " body=[\n" " Match(\n" -" subject=Name(id='x', ctx=Load()),\n" +" subject=Name(id='x'),\n" " cases=[\n" " match_case(\n" " pattern=MatchSequence(\n" @@ -2079,7 +2543,7 @@ msgid "" "Module(\n" " body=[\n" " Match(\n" -" subject=Name(id='x', ctx=Load()),\n" +" subject=Name(id='x'),\n" " cases=[\n" " match_case(\n" " pattern=MatchMapping(\n" @@ -2108,7 +2572,7 @@ msgstr "" "Module(\n" " body=[\n" " Match(\n" -" subject=Name(id='x', ctx=Load()),\n" +" subject=Name(id='x'),\n" " cases=[\n" " match_case(\n" " pattern=MatchMapping(\n" @@ -2147,11 +2611,11 @@ msgid "" "Module(\n" " body=[\n" " Match(\n" -" subject=Name(id='x', ctx=Load()),\n" +" subject=Name(id='x'),\n" " cases=[\n" " match_case(\n" " pattern=MatchClass(\n" -" cls=Name(id='Point2D', ctx=Load()),\n" +" cls=Name(id='Point2D'),\n" " patterns=[\n" " MatchValue(\n" " value=Constant(value=0)),\n" @@ -2162,7 +2626,7 @@ msgid "" " value=Constant(value=Ellipsis))]),\n" " match_case(\n" " pattern=MatchClass(\n" -" cls=Name(id='Point3D', ctx=Load()),\n" +" cls=Name(id='Point3D'),\n" " kwd_attrs=[\n" " 'x',\n" " 'y',\n" @@ -2188,11 +2652,11 @@ msgstr "" "Module(\n" " body=[\n" " Match(\n" -" subject=Name(id='x', ctx=Load()),\n" +" subject=Name(id='x'),\n" " cases=[\n" " match_case(\n" " pattern=MatchClass(\n" -" cls=Name(id='Point2D', ctx=Load()),\n" +" cls=Name(id='Point2D'),\n" " patterns=[\n" " MatchValue(\n" " value=Constant(value=0)),\n" @@ -2203,7 +2667,7 @@ msgstr "" " value=Constant(value=Ellipsis))]),\n" " match_case(\n" " pattern=MatchClass(\n" -" cls=Name(id='Point3D', ctx=Load()),\n" +" cls=Name(id='Point3D'),\n" " kwd_attrs=[\n" " 'x',\n" " 'y',\n" @@ -2236,7 +2700,7 @@ msgid "" "Module(\n" " body=[\n" " Match(\n" -" subject=Name(id='x', ctx=Load()),\n" +" subject=Name(id='x'),\n" " cases=[\n" " match_case(\n" " pattern=MatchAs(\n" @@ -2263,7 +2727,7 @@ msgstr "" "Module(\n" " body=[\n" " Match(\n" -" subject=Name(id='x', ctx=Load()),\n" +" subject=Name(id='x'),\n" " cases=[\n" " match_case(\n" " pattern=MatchAs(\n" @@ -2292,7 +2756,7 @@ msgid "" "Module(\n" " body=[\n" " Match(\n" -" subject=Name(id='x', ctx=Load()),\n" +" subject=Name(id='x'),\n" " cases=[\n" " match_case(\n" " pattern=MatchOr(\n" @@ -2313,7 +2777,7 @@ msgstr "" "Module(\n" " body=[\n" " Match(\n" -" subject=Name(id='x', ctx=Load()),\n" +" subject=Name(id='x'),\n" " cases=[\n" " match_case(\n" " pattern=MatchOr(\n" @@ -2347,7 +2811,7 @@ msgid "" " body=[\n" " AnnAssign(\n" " target=Name(id='x', ctx=Store()),\n" -" annotation=Name(id='bool', ctx=Load()),\n" +" annotation=Name(id='bool'),\n" " value=Constant(value=1),\n" " simple=1)],\n" " type_ignores=[\n" @@ -2367,7 +2831,7 @@ msgstr "" " body=[\n" " AnnAssign(\n" " target=Name(id='x', ctx=Store()),\n" -" annotation=Name(id='bool', ctx=Load()),\n" +" annotation=Name(id='bool'),\n" " value=Constant(value=1),\n" " simple=1)],\n" " type_ignores=[\n" @@ -2394,12 +2858,11 @@ msgid "" " type_params=[\n" " TypeVar(\n" " name='T',\n" -" bound=Name(id='int', ctx=Load()),\n" -" default_value=Name(id='bool', ctx=Load()))],\n" +" bound=Name(id='int'),\n" +" default_value=Name(id='bool'))],\n" " value=Subscript(\n" -" value=Name(id='list', ctx=Load()),\n" -" slice=Name(id='T', ctx=Load()),\n" -" ctx=Load()))])" +" value=Name(id='list'),\n" +" slice=Name(id='T')))])" msgstr "" ">>> print(ast.dump(ast.parse(\"type Alias[T: int = bool] = list[T]\"), indent=4))\n" "Module(\n" @@ -2409,12 +2872,11 @@ msgstr "" " type_params=[\n" " TypeVar(\n" " name='T',\n" -" bound=Name(id='int', ctx=Load()),\n" -" default_value=Name(id='bool', ctx=Load()))],\n" +" bound=Name(id='int'),\n" +" default_value=Name(id='bool'))],\n" " value=Subscript(\n" -" value=Name(id='list', ctx=Load()),\n" -" slice=Name(id='T', ctx=Load()),\n" -" ctx=Load()))])" +" value=Name(id='list'),\n" +" slice=Name(id='T')))])" msgid "Added the *default_value* parameter." msgstr "پارامتر *default_value* افزوده شد." @@ -2433,17 +2895,14 @@ msgid "" " name='P',\n" " default_value=List(\n" " elts=[\n" -" Name(id='int', ctx=Load()),\n" -" Name(id='str', ctx=Load())],\n" -" ctx=Load()))],\n" +" Name(id='int'),\n" +" Name(id='str')]))],\n" " value=Subscript(\n" -" value=Name(id='Callable', ctx=Load()),\n" +" value=Name(id='Callable'),\n" " slice=Tuple(\n" " elts=[\n" -" Name(id='P', ctx=Load()),\n" -" Name(id='int', ctx=Load())],\n" -" ctx=Load()),\n" -" ctx=Load()))])" +" Name(id='P'),\n" +" Name(id='int')])))])" msgstr "" ">>> print(ast.dump(ast.parse(\"type Alias[**P = [int, str]] = Callable[P, int]\"), indent=4))\n" "Module(\n" @@ -2455,17 +2914,14 @@ msgstr "" " name='P',\n" " default_value=List(\n" " elts=[\n" -" Name(id='int', ctx=Load()),\n" -" Name(id='str', ctx=Load())],\n" -" ctx=Load()))],\n" +" Name(id='int'),\n" +" Name(id='str')]))],\n" " value=Subscript(\n" -" value=Name(id='Callable', ctx=Load()),\n" +" value=Name(id='Callable'),\n" " slice=Tuple(\n" " elts=[\n" -" Name(id='P', ctx=Load()),\n" -" Name(id='int', ctx=Load())],\n" -" ctx=Load()),\n" -" ctx=Load()))])" +" Name(id='P'),\n" +" Name(id='int')])))])" msgid "A :class:`typing.TypeVarTuple`. ``name`` is the name of the type variable tuple. ``default_value`` is the default value; if the :class:`!TypeVarTuple` has no default, this attribute will be set to ``None``." msgstr "یک :class:`typing.TypeVarTuple` است. ``name`` نام تاپل متغیر نوع است. ``default_value`` مقدار پیش‌فرض است؛ اگر :class:`!TypeVarTuple` پیش‌فرضی نداشته باشد، این ویژگی روی ``None`` تنظیم می‌شود." @@ -2477,18 +2933,13 @@ msgid "" " TypeAlias(\n" " name=Name(id='Alias', ctx=Store()),\n" " type_params=[\n" -" TypeVarTuple(\n" -" name='Ts',\n" -" default_value=Tuple(ctx=Load()))],\n" +" TypeVarTuple(name='Ts', default_value=Tuple())],\n" " value=Subscript(\n" -" value=Name(id='tuple', ctx=Load()),\n" +" value=Name(id='tuple'),\n" " slice=Tuple(\n" " elts=[\n" " Starred(\n" -" value=Name(id='Ts', ctx=Load()),\n" -" ctx=Load())],\n" -" ctx=Load()),\n" -" ctx=Load()))])" +" value=Name(id='Ts'))])))])" msgstr "" ">>> print(ast.dump(ast.parse(\"type Alias[*Ts = ()] = tuple[*Ts]\"), indent=4))\n" "Module(\n" @@ -2496,18 +2947,13 @@ msgstr "" " TypeAlias(\n" " name=Name(id='Alias', ctx=Store()),\n" " type_params=[\n" -" TypeVarTuple(\n" -" name='Ts',\n" -" default_value=Tuple(ctx=Load()))],\n" +" TypeVarTuple(name='Ts', default_value=Tuple())],\n" " value=Subscript(\n" -" value=Name(id='tuple', ctx=Load()),\n" +" value=Name(id='tuple'),\n" " slice=Tuple(\n" " elts=[\n" " Starred(\n" -" value=Name(id='Ts', ctx=Load()),\n" -" ctx=Load())],\n" -" ctx=Load()),\n" -" ctx=Load()))])" +" value=Name(id='Ts'))])))])" msgid "Function and class definitions" msgstr "تعاریف تابع و کلاس" @@ -2615,8 +3061,8 @@ msgid "" " body=[\n" " Pass()],\n" " decorator_list=[\n" -" Name(id='decorator1', ctx=Load()),\n" -" Name(id='decorator2', ctx=Load())],\n" +" Name(id='decorator1'),\n" +" Name(id='decorator2')],\n" " returns=Constant(value='return annotation'))])" msgstr "" ">>> print(ast.dump(ast.parse(\"\"\"\\\n" @@ -2650,8 +3096,8 @@ msgstr "" " body=[\n" " Pass()],\n" " decorator_list=[\n" -" Name(id='decorator1', ctx=Load()),\n" -" Name(id='decorator2', ctx=Load())],\n" +" Name(id='decorator1'),\n" +" Name(id='decorator2')],\n" " returns=Constant(value='return annotation'))])" msgid "A ``return`` statement." @@ -2679,28 +3125,28 @@ msgid "" " body=[\n" " Expr(\n" " value=Yield(\n" -" value=Name(id='x', ctx=Load())))])\n" +" value=Name(id='x')))])\n" "\n" ">>> print(ast.dump(ast.parse('yield from x'), indent=4))\n" "Module(\n" " body=[\n" " Expr(\n" " value=YieldFrom(\n" -" value=Name(id='x', ctx=Load())))])" +" value=Name(id='x')))])" msgstr "" ">>> print(ast.dump(ast.parse('yield x'), indent=4))\n" "Module(\n" " body=[\n" " Expr(\n" " value=Yield(\n" -" value=Name(id='x', ctx=Load())))])\n" +" value=Name(id='x')))])\n" "\n" ">>> print(ast.dump(ast.parse('yield from x'), indent=4))\n" "Module(\n" " body=[\n" " Expr(\n" " value=YieldFrom(\n" -" value=Name(id='x', ctx=Load())))])" +" value=Name(id='x')))])" msgid "``global`` and ``nonlocal`` statements. ``names`` is a list of raw strings." msgstr "دستورهای ``global`` و ``nonlocal``. ``names`` فهرستی از رشته‌های خام است." @@ -2772,17 +3218,17 @@ msgid "" " ClassDef(\n" " name='Foo',\n" " bases=[\n" -" Name(id='base1', ctx=Load()),\n" -" Name(id='base2', ctx=Load())],\n" +" Name(id='base1'),\n" +" Name(id='base2')],\n" " keywords=[\n" " keyword(\n" " arg='metaclass',\n" -" value=Name(id='meta', ctx=Load()))],\n" +" value=Name(id='meta'))],\n" " body=[\n" " Pass()],\n" " decorator_list=[\n" -" Name(id='decorator1', ctx=Load()),\n" -" Name(id='decorator2', ctx=Load())])])" +" Name(id='decorator1'),\n" +" Name(id='decorator2')])])" msgstr "" ">>> print(ast.dump(ast.parse(\"\"\"\\\n" "... @decorator1\n" @@ -2795,17 +3241,17 @@ msgstr "" " ClassDef(\n" " name='Foo',\n" " bases=[\n" -" Name(id='base1', ctx=Load()),\n" -" Name(id='base2', ctx=Load())],\n" +" Name(id='base1'),\n" +" Name(id='base2')],\n" " keywords=[\n" " keyword(\n" " arg='metaclass',\n" -" value=Name(id='meta', ctx=Load()))],\n" +" value=Name(id='meta'))],\n" " body=[\n" " Pass()],\n" " decorator_list=[\n" -" Name(id='decorator1', ctx=Load()),\n" -" Name(id='decorator2', ctx=Load())])])" +" Name(id='decorator1'),\n" +" Name(id='decorator2')])])" msgid "Async and await" msgstr "ناهمگام و await" @@ -2830,7 +3276,7 @@ msgid "" " Expr(\n" " value=Await(\n" " value=Call(\n" -" func=Name(id='other_func', ctx=Load()))))])])" +" func=Name(id='other_func'))))])])" msgstr "" ">>> print(ast.dump(ast.parse(\"\"\"\\\n" "... async def f():\n" @@ -2845,7 +3291,7 @@ msgstr "" " Expr(\n" " value=Await(\n" " value=Call(\n" -" func=Name(id='other_func', ctx=Load()))))])])" +" func=Name(id='other_func'))))])])" msgid "``async for`` loops and ``async with`` context managers. They have the same fields as :class:`For` and :class:`With`, respectively. Only valid in the body of an :class:`AsyncFunctionDef`." msgstr "حلقه‌های ``async for`` و مدیران زمینه‌ی ``async with``. آن‌ها به‌ترتیب همان فیلدهای :class:`For` و :class:`With` را دارند. فقط در بدنه‌ی یک :class:`AsyncFunctionDef` معتبر هستند." @@ -2859,8 +3305,8 @@ msgstr "کمک‌کننده‌های :mod:`!ast`" msgid "Apart from the node classes, the :mod:`!ast` module defines these utility functions and classes for traversing abstract syntax trees:" msgstr "جدا از کلاس‌های گره، ماژول :mod:`!ast` این توابع و کلاس‌های سودمند را برای پیمایش درختان سینتکس انتزاعی تعریف می‌کند:" -msgid "Parse the source into an AST node. Equivalent to ``compile(source, filename, mode, flags=FLAGS_VALUE, optimize=optimize)``, where ``FLAGS_VALUE`` is ``ast.PyCF_ONLY_AST`` if ``optimize <= 0`` and ``ast.PyCF_OPTIMIZED_AST`` otherwise." -msgstr "منبع را به یک گره AST تجزیه می‌کند. معادل ``compile(source, filename, mode, flags=FLAGS_VALUE, optimize=optimize)`` است، که در آن ``FLAGS_VALUE`` اگر ``optimize <= 0`` باشد ``ast.PyCF_ONLY_AST`` و در غیر این صورت ``ast.PyCF_OPTIMIZED_AST`` است." +msgid "Parse the source into an AST node. Equivalent to ``compile(source, filename, mode, flags=FLAGS_VALUE, optimize=optimize, module=module)``, where ``FLAGS_VALUE`` is ``ast.PyCF_ONLY_AST`` if ``optimize <= 0`` and ``ast.PyCF_OPTIMIZED_AST`` otherwise." +msgstr "منبع را به یک گره درخت نحوی انتزاعی (AST) تجزیه کنید. معادل ``compile(source, filename, mode, flags=FLAGS_VALUE, optimize=optimize, module=module)`` است، که در آن ``FLAGS_VALUE`` برابر با ``ast.PyCF_ONLY_AST`` است اگر ``optimize <= 0`` و در غیر این صورت ``ast.PyCF_OPTIMIZED_AST`` است." msgid "If ``type_comments=True`` is given, the parser is modified to check and return type comments as specified by :pep:`484` and :pep:`526`. This is equivalent to adding :data:`ast.PyCF_TYPE_COMMENTS` to the flags passed to :func:`compile`. This will report syntax errors for misplaced type comments. Without this flag, type comments will be ignored, and the ``type_comment`` field on selected AST nodes will always be ``None``. In addition, the locations of ``# type: ignore`` comments will be returned as the ``type_ignores`` attribute of :class:`Module` (otherwise it is always an empty list)." msgstr "اگر ``type_comments=True`` داده شود، پارسر به‌گونه‌ای تغییر می‌یابد که کامنت‌های نوع را مطابق :pep:`484` و :pep:`526` بررسی کند و برگرداند. این معادل افزودن :data:`ast.PyCF_TYPE_COMMENTS` به پرچم‌های ارسال‌شده به :func:`compile` است. این حالت خطاهای سینتکسی مربوط به کامنت‌های نوع نابجا را گزارش می‌دهد. بدون این پرچم، کامنت‌های نوع نادیده گرفته می‌شوند و فیلد ``type_comment`` در گره‌های AST انتخاب‌شده همیشه ``None`` خواهد بود. علاوه بر این، موقعیت‌های کامنت‌های ``# type: ignore`` به‌عنوان ویژگی ``type_ignores`` در :class:`Module` برگردانده می‌شوند (در غیر این صورت همیشه یک فهرست خالی است)." @@ -2889,6 +3335,9 @@ msgstr "``type_comments``، ``mode='func_type'`` و ``feature_version`` افزو msgid "The minimum supported version for ``feature_version`` is now ``(3, 7)``. The ``optimize`` argument was added." msgstr "حداقل نسخه پشتیبانی‌شده برای ``feature_version`` اکنون ``(3, 7)`` است. آرگومان ``optimize`` افزوده شد." +msgid "Added the *module* parameter." +msgstr "پارامتر *module* اضافه شد." + msgid "Unparse an :class:`ast.AST` object and generate a string with code that would produce an equivalent :class:`ast.AST` object if parsed back with :func:`ast.parse`." msgstr "یک شیء :class:`ast.AST` را به کد بازگردانید و رشته‌ای حاوی کدی تولید کنید که اگر دوباره با :func:`ast.parse` تجزیه شود، یک شیء :class:`ast.AST` معادل تولید می‌کند." @@ -2990,7 +3439,7 @@ msgid "" "\n" " def visit_Name(self, node):\n" " return Subscript(\n" -" value=Name(id='data', ctx=Load()),\n" +" value=Name(id='data'),\n" " slice=Constant(value=node.id),\n" " ctx=node.ctx\n" " )" @@ -2999,7 +3448,7 @@ msgstr "" "\n" " def visit_Name(self, node):\n" " return Subscript(\n" -" value=Name(id='data', ctx=Load()),\n" +" value=Name(id='data'),\n" " slice=Constant(value=node.id),\n" " ctx=node.ctx\n" " )" @@ -3029,11 +3478,45 @@ msgstr "node = YourTransformer().visit(node)" msgid "Return a formatted dump of the tree in *node*. This is mainly useful for debugging purposes. If *annotate_fields* is true (by default), the returned string will show the names and the values for fields. If *annotate_fields* is false, the result string will be more compact by omitting unambiguous field names. Attributes such as line numbers and column offsets are not dumped by default. If this is wanted, *include_attributes* can be set to true." msgstr "یک برون‌ریزی قالب‌بندی‌شده از درخت درون *node* برمی‌گرداند. این عمدتاً برای اهداف اشکال‌زدایی مفید است. اگر *annotate_fields* برابر true باشد (به‌طور پیش‌فرض)، رشته‌ی برگردانده‌شده نام‌ها و مقدارهای فیلدها را نشان می‌دهد. اگر *annotate_fields* برابر false باشد، رشته‌ی حاصل با حذف نام فیلدهای غیرمبهم فشرده‌تر خواهد بود. ویژگی‌هایی مانند شماره‌های خط و آفست‌های ستون به‌طور پیش‌فرض در خروجی آورده نمی‌شوند. اگر این مورد نظر باشد، می‌توان *include_attributes* را روی true تنظیم کرد." +msgid "If *color* is ``True``, the returned string is syntax highlighted using ANSI escape sequences. If ``False`` (the default), colored output is always disabled." +msgstr "اگر مقدار *color* برابر با ``True`` باشد، رشته‌ی خروجی با استفاده از دنباله‌های گریز ANSI برجسته‌سازی نحوی می‌شود. اگر ``False`` باشد (پیش‌فرض)، خروجی رنگی همیشه غیرفعال است." + msgid "If *indent* is a non-negative integer or string, then the tree will be pretty-printed with that indent level. An indent level of 0, negative, or ``\"\"`` will only insert newlines. ``None`` (the default) selects the single line representation. Using a positive integer indent indents that many spaces per level. If *indent* is a string (such as ``\"\\t\"``), that string is used to indent each level." msgstr "اگر *indent* یک عدد صحیح نامنفی یا رشته باشد، درخت با آن سطح تورفتگی به‌صورت خوانا چاپ می‌شود. سطح تورفتگی ۰، منفی، یا ``\"\"`` فقط سطرهای جدید درج می‌کند. ``None`` (پیش‌فرض) نمایش تک‌سطری را انتخاب می‌کند. استفاده از تورفتگی عدد صحیح مثبت، در هر سطح به همان تعداد فاصله تورفتگی ایجاد می‌کند. اگر *indent* یک رشته باشد (مانند ``\"\\t\"``)، از آن رشته برای تورفتگی هر سطح استفاده می‌شود." -msgid "If *show_empty* is false (the default), optional empty lists will be omitted from the output. Optional ``None`` values are always omitted." -msgstr "اگر *show_empty* نادرست باشد (حالت پیش‌فرض)، فهرست‌های خالی اختیاری از خروجی حذف می‌شوند. مقادیر ``None`` اختیاری همیشه حذف می‌شوند." +msgid "If *show_empty* is false (the default), optional empty lists and ``Load()`` values will be omitted from the output. Optional ``None`` values are always omitted." +msgstr "اگر *show_empty* نادرست (پیش‌فرض) باشد، فهرست‌های خالی اختیاری و مقادیر ``Load()`` از خروجی حذف خواهند شد. مقادیر اختیاری ``None`` همیشه حذف می‌شوند." + +msgid "" +">>> tree = ast.parse('print(None)', '?', 'eval')\n" +">>> print(ast.dump(tree, indent=4))\n" +"Expression(\n" +" body=Call(\n" +" func=Name(id='print'),\n" +" args=[\n" +" Constant(value=None)]))\n" +">>> print(ast.dump(tree, indent=4, show_empty=True))\n" +"Expression(\n" +" body=Call(\n" +" func=Name(id='print', ctx=Load()),\n" +" args=[\n" +" Constant(value=None)],\n" +" keywords=[]))" +msgstr "" +">>> tree = ast.parse('print(None)', '?', 'eval')\n" +">>> print(ast.dump(tree, indent=4))\n" +"Expression(\n" +" body=Call(\n" +" func=Name(id='print'),\n" +" args=[\n" +" Constant(value=None)]))\n" +">>> print(ast.dump(tree, indent=4, show_empty=True))\n" +"Expression(\n" +" body=Call(\n" +" func=Name(id='print', ctx=Load()),\n" +" args=[\n" +" Constant(value=None)],\n" +" keywords=[]))" msgid "Added the *indent* option." msgstr "گزینه‌ی *indent* افزوده شد." @@ -3041,56 +3524,11 @@ msgstr "گزینه‌ی *indent* افزوده شد." msgid "Added the *show_empty* option." msgstr "گزینه‌ی *show_empty* اضافه شد." -msgid "" -">>> print(ast.dump(ast.parse(\"\"\"\\\n" -"... async def f():\n" -"... await other_func()\n" -"... \"\"\"), indent=4, show_empty=True))\n" -"Module(\n" -" body=[\n" -" AsyncFunctionDef(\n" -" name='f',\n" -" args=arguments(\n" -" posonlyargs=[],\n" -" args=[],\n" -" kwonlyargs=[],\n" -" kw_defaults=[],\n" -" defaults=[]),\n" -" body=[\n" -" Expr(\n" -" value=Await(\n" -" value=Call(\n" -" func=Name(id='other_func', ctx=Load()),\n" -" args=[],\n" -" keywords=[])))],\n" -" decorator_list=[],\n" -" type_params=[])],\n" -" type_ignores=[])" -msgstr "" -">>> print(ast.dump(ast.parse(\"\"\"\\\n" -"... async def f():\n" -"... await other_func()\n" -"... \"\"\"), indent=4, show_empty=True))\n" -"Module(\n" -" body=[\n" -" AsyncFunctionDef(\n" -" name='f',\n" -" args=arguments(\n" -" posonlyargs=[],\n" -" args=[],\n" -" kwonlyargs=[],\n" -" kw_defaults=[],\n" -" defaults=[]),\n" -" body=[\n" -" Expr(\n" -" value=Await(\n" -" value=Call(\n" -" func=Name(id='other_func', ctx=Load()),\n" -" args=[],\n" -" keywords=[])))],\n" -" decorator_list=[],\n" -" type_params=[])],\n" -" type_ignores=[])" +msgid "Omit optional ``Load()`` values by default." +msgstr "مقادیر اختیاری ``Load()`` را به‌طور پیش‌فرض حذف کنید." + +msgid "Added the *color* parameter." +msgstr "پارامتر *color* اضافه شد." msgid "Recursively compares two ASTs." msgstr "دو AST را به‌صورت بازگشتی مقایسه می‌کند." @@ -3119,6 +3557,9 @@ msgstr "پشتیبانی از کامنت‌های نوع به سبک :pep:`484` msgid "Command-line usage" msgstr "استفاده از خط فرمان" +msgid "The output is now syntax highlighted by default. This can be :ref:`controlled using environment variables `." +msgstr "خروجی اکنون به‌طور پیش‌فرض دارای برجسته‌سازی نحوی است. این کار را می‌توان با :ref:`استفاده از متغیرهای محیطی ` کنترل کرد." + msgid "The :mod:`!ast` module can be executed as a script from the command line. It is as simple as:" msgstr "ماژول :mod:`!ast` می‌تواند به‌عنوان یک اسکریپت از خط فرمان اجرا شود. این کار به سادگی زیر است:" @@ -3180,312 +3621,52 @@ msgid "* (asterisk)" msgstr "* (ستاره)" #~ msgid "" -#~ "-- ASDL's 4 builtin types are:\n" -#~ "-- identifier, int, string, constant\n" -#~ "\n" -#~ "module Python\n" -#~ "{\n" -#~ " mod = Module(stmt* body, type_ignore* type_ignores)\n" -#~ " | Interactive(stmt* body)\n" -#~ " | Expression(expr body)\n" -#~ " | FunctionType(expr* argtypes, expr returns)\n" -#~ "\n" -#~ " stmt = FunctionDef(identifier name, arguments args,\n" -#~ " stmt* body, expr* decorator_list, expr? returns,\n" -#~ " string? type_comment, type_param* type_params)\n" -#~ " | AsyncFunctionDef(identifier name, arguments args,\n" -#~ " stmt* body, expr* decorator_list, expr? returns,\n" -#~ " string? type_comment, type_param* type_params)\n" -#~ "\n" -#~ " | ClassDef(identifier name,\n" -#~ " expr* bases,\n" -#~ " keyword* keywords,\n" -#~ " stmt* body,\n" -#~ " expr* decorator_list,\n" -#~ " type_param* type_params)\n" -#~ " | Return(expr? value)\n" -#~ "\n" -#~ " | Delete(expr* targets)\n" -#~ " | Assign(expr* targets, expr value, string? type_comment)\n" -#~ " | TypeAlias(expr name, type_param* type_params, expr value)\n" -#~ " | AugAssign(expr target, operator op, expr value)\n" -#~ " -- 'simple' indicates that we annotate simple name without parens\n" -#~ " | AnnAssign(expr target, expr annotation, expr? value, int simple)\n" -#~ "\n" -#~ " -- use 'orelse' because else is a keyword in target languages\n" -#~ " | For(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment)\n" -#~ " | AsyncFor(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment)\n" -#~ " | While(expr test, stmt* body, stmt* orelse)\n" -#~ " | If(expr test, stmt* body, stmt* orelse)\n" -#~ " | With(withitem* items, stmt* body, string? type_comment)\n" -#~ " | AsyncWith(withitem* items, stmt* body, string? type_comment)\n" -#~ "\n" -#~ " | Match(expr subject, match_case* cases)\n" -#~ "\n" -#~ " | Raise(expr? exc, expr? cause)\n" -#~ " | Try(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody)\n" -#~ " | TryStar(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody)\n" -#~ " | Assert(expr test, expr? msg)\n" -#~ "\n" -#~ " | Import(alias* names)\n" -#~ " | ImportFrom(identifier? module, alias* names, int? level)\n" -#~ "\n" -#~ " | Global(identifier* names)\n" -#~ " | Nonlocal(identifier* names)\n" -#~ " | Expr(expr value)\n" -#~ " | Pass | Break | Continue\n" -#~ "\n" -#~ " -- col_offset is the byte offset in the utf8 string the parser uses\n" -#~ " attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" -#~ "\n" -#~ " -- BoolOp() can use left & right?\n" -#~ " expr = BoolOp(boolop op, expr* values)\n" -#~ " | NamedExpr(expr target, expr value)\n" -#~ " | BinOp(expr left, operator op, expr right)\n" -#~ " | UnaryOp(unaryop op, expr operand)\n" -#~ " | Lambda(arguments args, expr body)\n" -#~ " | IfExp(expr test, expr body, expr orelse)\n" -#~ " | Dict(expr?* keys, expr* values)\n" -#~ " | Set(expr* elts)\n" -#~ " | ListComp(expr elt, comprehension* generators)\n" -#~ " | SetComp(expr elt, comprehension* generators)\n" -#~ " | DictComp(expr key, expr value, comprehension* generators)\n" -#~ " | GeneratorExp(expr elt, comprehension* generators)\n" -#~ " -- the grammar constrains where yield expressions can occur\n" -#~ " | Await(expr value)\n" -#~ " | Yield(expr? value)\n" -#~ " | YieldFrom(expr value)\n" -#~ " -- need sequences for compare to distinguish between\n" -#~ " -- x < 4 < 3 and (x < 4) < 3\n" -#~ " | Compare(expr left, cmpop* ops, expr* comparators)\n" -#~ " | Call(expr func, expr* args, keyword* keywords)\n" -#~ " | FormattedValue(expr value, int conversion, expr? format_spec)\n" -#~ " | Interpolation(expr value, constant str, int conversion, expr? format_spec)\n" -#~ " | JoinedStr(expr* values)\n" -#~ " | TemplateStr(expr* values)\n" -#~ " | Constant(constant value, string? kind)\n" -#~ "\n" -#~ " -- the following expression can appear in assignment context\n" -#~ " | Attribute(expr value, identifier attr, expr_context ctx)\n" -#~ " | Subscript(expr value, expr slice, expr_context ctx)\n" -#~ " | Starred(expr value, expr_context ctx)\n" -#~ " | Name(identifier id, expr_context ctx)\n" -#~ " | List(expr* elts, expr_context ctx)\n" -#~ " | Tuple(expr* elts, expr_context ctx)\n" -#~ "\n" -#~ " -- can appear only in Subscript\n" -#~ " | Slice(expr? lower, expr? upper, expr? step)\n" -#~ "\n" -#~ " -- col_offset is the byte offset in the utf8 string the parser uses\n" -#~ " attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" -#~ "\n" -#~ " expr_context = Load | Store | Del\n" -#~ "\n" -#~ " boolop = And | Or\n" -#~ "\n" -#~ " operator = Add | Sub | Mult | MatMult | Div | Mod | Pow | LShift\n" -#~ " | RShift | BitOr | BitXor | BitAnd | FloorDiv\n" -#~ "\n" -#~ " unaryop = Invert | Not | UAdd | USub\n" -#~ "\n" -#~ " cmpop = Eq | NotEq | Lt | LtE | Gt | GtE | Is | IsNot | In | NotIn\n" -#~ "\n" -#~ " comprehension = (expr target, expr iter, expr* ifs, int is_async)\n" -#~ "\n" -#~ " excepthandler = ExceptHandler(expr? type, identifier? name, stmt* body)\n" -#~ " attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" -#~ "\n" -#~ " arguments = (arg* posonlyargs, arg* args, arg? vararg, arg* kwonlyargs,\n" -#~ " expr?* kw_defaults, arg? kwarg, expr* defaults)\n" -#~ "\n" -#~ " arg = (identifier arg, expr? annotation, string? type_comment)\n" -#~ " attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" -#~ "\n" -#~ " -- keyword arguments supplied to call (NULL identifier for **kwargs)\n" -#~ " keyword = (identifier? arg, expr value)\n" -#~ " attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" -#~ "\n" -#~ " -- import name with optional 'as' alias.\n" -#~ " alias = (identifier name, identifier? asname)\n" -#~ " attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" -#~ "\n" -#~ " withitem = (expr context_expr, expr? optional_vars)\n" -#~ "\n" -#~ " match_case = (pattern pattern, expr? guard, stmt* body)\n" -#~ "\n" -#~ " pattern = MatchValue(expr value)\n" -#~ " | MatchSingleton(constant value)\n" -#~ " | MatchSequence(pattern* patterns)\n" -#~ " | MatchMapping(expr* keys, pattern* patterns, identifier? rest)\n" -#~ " | MatchClass(expr cls, pattern* patterns, identifier* kwd_attrs, pattern* kwd_patterns)\n" -#~ "\n" -#~ " | MatchStar(identifier? name)\n" -#~ " -- The optional \"rest\" MatchMapping parameter handles capturing extra mapping keys\n" -#~ "\n" -#~ " | MatchAs(pattern? pattern, identifier? name)\n" -#~ " | MatchOr(pattern* patterns)\n" -#~ "\n" -#~ " attributes (int lineno, int col_offset, int end_lineno, int end_col_offset)\n" -#~ "\n" -#~ " type_ignore = TypeIgnore(int lineno, string tag)\n" -#~ "\n" -#~ " type_param = TypeVar(identifier name, expr? bound, expr? default_value)\n" -#~ " | ParamSpec(identifier name, expr? default_value)\n" -#~ " | TypeVarTuple(identifier name, expr? default_value)\n" -#~ " attributes (int lineno, int col_offset, int end_lineno, int end_col_offset)\n" -#~ "}\n" +#~ ">>> print(ast.dump(ast.parse(\"\"\"\\\n" +#~ "... async def f():\n" +#~ "... await other_func()\n" +#~ "... \"\"\"), indent=4, show_empty=True))\n" +#~ "Module(\n" +#~ " body=[\n" +#~ " AsyncFunctionDef(\n" +#~ " name='f',\n" +#~ " args=arguments(\n" +#~ " posonlyargs=[],\n" +#~ " args=[],\n" +#~ " kwonlyargs=[],\n" +#~ " kw_defaults=[],\n" +#~ " defaults=[]),\n" +#~ " body=[\n" +#~ " Expr(\n" +#~ " value=Await(\n" +#~ " value=Call(\n" +#~ " func=Name(id='other_func', ctx=Load()),\n" +#~ " args=[],\n" +#~ " keywords=[])))],\n" +#~ " decorator_list=[],\n" +#~ " type_params=[])],\n" +#~ " type_ignores=[])" #~ msgstr "" -#~ "-- ASDL's 4 builtin types are:\n" -#~ "-- identifier, int, string, constant\n" -#~ "\n" -#~ "module Python\n" -#~ "{\n" -#~ " mod = Module(stmt* body, type_ignore* type_ignores)\n" -#~ " | Interactive(stmt* body)\n" -#~ " | Expression(expr body)\n" -#~ " | FunctionType(expr* argtypes, expr returns)\n" -#~ "\n" -#~ " stmt = FunctionDef(identifier name, arguments args,\n" -#~ " stmt* body, expr* decorator_list, expr? returns,\n" -#~ " string? type_comment, type_param* type_params)\n" -#~ " | AsyncFunctionDef(identifier name, arguments args,\n" -#~ " stmt* body, expr* decorator_list, expr? returns,\n" -#~ " string? type_comment, type_param* type_params)\n" -#~ "\n" -#~ " | ClassDef(identifier name,\n" -#~ " expr* bases,\n" -#~ " keyword* keywords,\n" -#~ " stmt* body,\n" -#~ " expr* decorator_list,\n" -#~ " type_param* type_params)\n" -#~ " | Return(expr? value)\n" -#~ "\n" -#~ " | Delete(expr* targets)\n" -#~ " | Assign(expr* targets, expr value, string? type_comment)\n" -#~ " | TypeAlias(expr name, type_param* type_params, expr value)\n" -#~ " | AugAssign(expr target, operator op, expr value)\n" -#~ " -- 'simple' indicates that we annotate simple name without parens\n" -#~ " | AnnAssign(expr target, expr annotation, expr? value, int simple)\n" -#~ "\n" -#~ " -- use 'orelse' because else is a keyword in target languages\n" -#~ " | For(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment)\n" -#~ " | AsyncFor(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment)\n" -#~ " | While(expr test, stmt* body, stmt* orelse)\n" -#~ " | If(expr test, stmt* body, stmt* orelse)\n" -#~ " | With(withitem* items, stmt* body, string? type_comment)\n" -#~ " | AsyncWith(withitem* items, stmt* body, string? type_comment)\n" -#~ "\n" -#~ " | Match(expr subject, match_case* cases)\n" -#~ "\n" -#~ " | Raise(expr? exc, expr? cause)\n" -#~ " | Try(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody)\n" -#~ " | TryStar(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody)\n" -#~ " | Assert(expr test, expr? msg)\n" -#~ "\n" -#~ " | Import(alias* names)\n" -#~ " | ImportFrom(identifier? module, alias* names, int? level)\n" -#~ "\n" -#~ " | Global(identifier* names)\n" -#~ " | Nonlocal(identifier* names)\n" -#~ " | Expr(expr value)\n" -#~ " | Pass | Break | Continue\n" -#~ "\n" -#~ " -- col_offset is the byte offset in the utf8 string the parser uses\n" -#~ " attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" -#~ "\n" -#~ " -- BoolOp() can use left & right?\n" -#~ " expr = BoolOp(boolop op, expr* values)\n" -#~ " | NamedExpr(expr target, expr value)\n" -#~ " | BinOp(expr left, operator op, expr right)\n" -#~ " | UnaryOp(unaryop op, expr operand)\n" -#~ " | Lambda(arguments args, expr body)\n" -#~ " | IfExp(expr test, expr body, expr orelse)\n" -#~ " | Dict(expr?* keys, expr* values)\n" -#~ " | Set(expr* elts)\n" -#~ " | ListComp(expr elt, comprehension* generators)\n" -#~ " | SetComp(expr elt, comprehension* generators)\n" -#~ " | DictComp(expr key, expr value, comprehension* generators)\n" -#~ " | GeneratorExp(expr elt, comprehension* generators)\n" -#~ " -- the grammar constrains where yield expressions can occur\n" -#~ " | Await(expr value)\n" -#~ " | Yield(expr? value)\n" -#~ " | YieldFrom(expr value)\n" -#~ " -- need sequences for compare to distinguish between\n" -#~ " -- x < 4 < 3 and (x < 4) < 3\n" -#~ " | Compare(expr left, cmpop* ops, expr* comparators)\n" -#~ " | Call(expr func, expr* args, keyword* keywords)\n" -#~ " | FormattedValue(expr value, int conversion, expr? format_spec)\n" -#~ " | Interpolation(expr value, constant str, int conversion, expr? format_spec)\n" -#~ " | JoinedStr(expr* values)\n" -#~ " | TemplateStr(expr* values)\n" -#~ " | Constant(constant value, string? kind)\n" -#~ "\n" -#~ " -- the following expression can appear in assignment context\n" -#~ " | Attribute(expr value, identifier attr, expr_context ctx)\n" -#~ " | Subscript(expr value, expr slice, expr_context ctx)\n" -#~ " | Starred(expr value, expr_context ctx)\n" -#~ " | Name(identifier id, expr_context ctx)\n" -#~ " | List(expr* elts, expr_context ctx)\n" -#~ " | Tuple(expr* elts, expr_context ctx)\n" -#~ "\n" -#~ " -- can appear only in Subscript\n" -#~ " | Slice(expr? lower, expr? upper, expr? step)\n" -#~ "\n" -#~ " -- col_offset is the byte offset in the utf8 string the parser uses\n" -#~ " attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" -#~ "\n" -#~ " expr_context = Load | Store | Del\n" -#~ "\n" -#~ " boolop = And | Or\n" -#~ "\n" -#~ " operator = Add | Sub | Mult | MatMult | Div | Mod | Pow | LShift\n" -#~ " | RShift | BitOr | BitXor | BitAnd | FloorDiv\n" -#~ "\n" -#~ " unaryop = Invert | Not | UAdd | USub\n" -#~ "\n" -#~ " cmpop = Eq | NotEq | Lt | LtE | Gt | GtE | Is | IsNot | In | NotIn\n" -#~ "\n" -#~ " comprehension = (expr target, expr iter, expr* ifs, int is_async)\n" -#~ "\n" -#~ " excepthandler = ExceptHandler(expr? type, identifier? name, stmt* body)\n" -#~ " attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" -#~ "\n" -#~ " arguments = (arg* posonlyargs, arg* args, arg? vararg, arg* kwonlyargs,\n" -#~ " expr?* kw_defaults, arg? kwarg, expr* defaults)\n" -#~ "\n" -#~ " arg = (identifier arg, expr? annotation, string? type_comment)\n" -#~ " attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" -#~ "\n" -#~ " -- keyword arguments supplied to call (NULL identifier for **kwargs)\n" -#~ " keyword = (identifier? arg, expr value)\n" -#~ " attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" -#~ "\n" -#~ " -- import name with optional 'as' alias.\n" -#~ " alias = (identifier name, identifier? asname)\n" -#~ " attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)\n" -#~ "\n" -#~ " withitem = (expr context_expr, expr? optional_vars)\n" -#~ "\n" -#~ " match_case = (pattern pattern, expr? guard, stmt* body)\n" -#~ "\n" -#~ " pattern = MatchValue(expr value)\n" -#~ " | MatchSingleton(constant value)\n" -#~ " | MatchSequence(pattern* patterns)\n" -#~ " | MatchMapping(expr* keys, pattern* patterns, identifier? rest)\n" -#~ " | MatchClass(expr cls, pattern* patterns, identifier* kwd_attrs, pattern* kwd_patterns)\n" -#~ "\n" -#~ " | MatchStar(identifier? name)\n" -#~ " -- The optional \"rest\" MatchMapping parameter handles capturing extra mapping keys\n" -#~ "\n" -#~ " | MatchAs(pattern? pattern, identifier? name)\n" -#~ " | MatchOr(pattern* patterns)\n" -#~ "\n" -#~ " attributes (int lineno, int col_offset, int end_lineno, int end_col_offset)\n" -#~ "\n" -#~ " type_ignore = TypeIgnore(int lineno, string tag)\n" -#~ "\n" -#~ " type_param = TypeVar(identifier name, expr? bound, expr? default_value)\n" -#~ " | ParamSpec(identifier name, expr? default_value)\n" -#~ " | TypeVarTuple(identifier name, expr? default_value)\n" -#~ " attributes (int lineno, int col_offset, int end_lineno, int end_col_offset)\n" -#~ "}\n" +#~ ">>> print(ast.dump(ast.parse(\"\"\"\\\n" +#~ "... async def f():\n" +#~ "... await other_func()\n" +#~ "... \"\"\"), indent=4, show_empty=True))\n" +#~ "Module(\n" +#~ " body=[\n" +#~ " AsyncFunctionDef(\n" +#~ " name='f',\n" +#~ " args=arguments(\n" +#~ " posonlyargs=[],\n" +#~ " args=[],\n" +#~ " kwonlyargs=[],\n" +#~ " kw_defaults=[],\n" +#~ " defaults=[]),\n" +#~ " body=[\n" +#~ " Expr(\n" +#~ " value=Await(\n" +#~ " value=Call(\n" +#~ " func=Name(id='other_func', ctx=Load()),\n" +#~ " args=[],\n" +#~ " keywords=[])))],\n" +#~ " decorator_list=[],\n" +#~ " type_params=[])],\n" +#~ " type_ignores=[])" diff --git a/library/asyncio-eventloop.po b/library/asyncio-eventloop.po index 556956ef..3eb2b034 100644 --- a/library/asyncio-eventloop.po +++ b/library/asyncio-eventloop.po @@ -8,6 +8,7 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" @@ -446,7 +447,7 @@ msgid "*all_errors* was added." msgstr "*all_errors* افزوده شد." msgid "Raises a ``ValueError`` if ``ssl.check_hostname`` is ``True`` and ``server_hostname`` is not supplied." -msgstr "" +msgstr "اگر ``ssl.check_hostname`` برابر با ``True`` باشد و ``server_hostname`` فراهم نشده باشد، یک ``ValueError`` بالا می‌آورد." 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 "تابع :func:`open_connection` یک API جایگزین سطح‌بالا است. این تابع یک جفت (:class:`StreamReader`، :class:`StreamWriter`) را برمی‌گرداند که می‌توان مستقیماً در کد async/await از آن‌ها استفاده کرد." diff --git a/library/asyncio-stream.po b/library/asyncio-stream.po index 5bfc6780..d31af1f5 100644 --- a/library/asyncio-stream.po +++ b/library/asyncio-stream.po @@ -8,6 +8,7 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" @@ -323,7 +324,7 @@ msgid "*ssl_shutdown_timeout* is the time in seconds to wait for the SSL shutdow msgstr "*ssl_shutdown_timeout* زمان بر حسب ثانیه است که باید برای تکمیل خاموش‌سازی SSL پیش از قطع اتصال منتظر بمانید. اگر ``None`` باشد، ``30.0`` ثانیه است (پیش‌فرض)." msgid "Raises a ``ValueError`` if ``sslcontext.check_hostname`` is ``True`` and ``server_hostname`` is not supplied." -msgstr "" +msgstr "اگر ``sslcontext.check_hostname`` برابر با ``True`` باشد و ``server_hostname`` فراهم نشده باشد، یک ``ValueError`` بالا می‌آورد." msgid "Return ``True`` if the stream is closed or in the process of being closed." msgstr "اگر جریان بسته باشد یا در حال بسته شدن باشد، ``True`` را برمی‌گرداند." diff --git a/library/asyncio-task.po b/library/asyncio-task.po index f5a10627..33781b62 100644 --- a/library/asyncio-task.po +++ b/library/asyncio-task.po @@ -7,13 +7,14 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" -"PO-Revision-Date: 2026-09-21 13:27+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 20:43+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" @@ -461,6 +462,30 @@ msgstr "اگر گروه وظیفه فعال نیست، هم‌روال داده msgid "Passes on all *kwargs* to :meth:`loop.create_task`" msgstr "تمام *kwargs* را به :meth:`loop.create_task` منتقل می‌کند" +msgid "Cancel the task group. This is a non-exceptional, early exit of the task group's lifetime -- useful once the group's goal has been met or its services no longer needed." +msgstr "گروه وظیفه را لغو کنید. این یک خروج زودهنگام و غیرخطایی از چرخه‌ی عمر گروه وظیفه است؛ و زمانی مفید است که هدف گروه برآورده شده باشد یا خدمات آن دیگر نیازی نباشد." + +msgid ":meth:`~asyncio.Task.cancel` will be called on any tasks in the group that aren't yet done, as well as the parent (body) of the group. The task group context manager will exit *without* :exc:`asyncio.CancelledError` being raised." +msgstr "متد :meth:`~asyncio.Task.cancel` روی هر وظیفه‌ای در گروه که هنوز تمام نشده است و همچنین والد (بدنه) گروه فراخوانی خواهد شد. مدیر زمینه‌ی گروه وظیفه بدون بالا آمدن :exc:`asyncio.CancelledError` خارج خواهد شد." + +msgid "If :meth:`cancel` is called before entering the task group, the group will be cancelled upon entry. This is useful for patterns where one piece of code passes an unused :class:`asyncio.TaskGroup` instance to another in order to have the ability to cancel anything run within the group." +msgstr "اگر متد :meth:`cancel` قبل از ورود به گروه وظیفه فراخوانی شود، گروه پس از ورود لغو خواهد شد. این کار برای الگوهایی مفید است که در آن یک تکه کد یک نمونه‌ی :class:`asyncio.TaskGroup` استفاده‌نشده را به تکه‌ی دیگری منتقل می‌کند تا توانایی لغو هر چیز در حال اجرا درون گروه را داشته باشد." + +msgid ":meth:`cancel` is idempotent and may be called after the task group has already exited." +msgstr ":meth:`cancel` هم‌توان است و ممکن است پس از خروج گروه وظیفه نیز فراخوانی شود." + +msgid "Some ways to use :meth:`cancel`:" +msgstr "برخی از راه‌ها برای استفاده از متد :meth:`cancel`:" + +msgid "call it from the task group body based on some condition or event" +msgstr "آن را بر اساس برخی شرایط یا رویداد از بدنهه‌ی گروه وظیفه فراخوانی کنید" + +msgid "pass the task group instance to child tasks via :meth:`create_task`, allowing a child task to conditionally cancel the entire group" +msgstr "نمونه‌ی گروه وظیفه را از طریق :meth:`create_task` به وظایف فرزند ارسال کنید، که به وظیفه‌ی فرزند اجازه می‌دهد کل گروه را به طور شرطی لغو کند" + +msgid "pass the task group instance or bound :meth:`cancel` method to some other task *before* opening the task group, allowing remote cancellation" +msgstr "نمونه‌ی گروه وظیفه یا متد متصل :meth:`cancel` را *پیش* از گشودن گروه وظیفه به وظیفه‌ی دیگری ارسال کنید، که امکان لغو از راه دور را فراهم می‌کند" + msgid "Example::" msgstr "مثال::" @@ -477,8 +502,8 @@ msgstr "" " task2 = tg.create_task(another_coro(...))\n" " print(f\"Both tasks have completed now: {task1.result()}, {task2.result()}\")" -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 passing ``tg`` into one of the coroutines and calling ``tg.create_task()`` in that coroutine). Once the last task has finished and the ``async with`` block is exited, no new tasks may be added to the group." -msgstr "دستور ``async with`` منتظر می‌ماند تا تمام وظایف گروه به پایان برسند. در حین انتظار، همچنان ممکن است وظایف جدیدی به گروه اضافه شوند (برای مثال، با پاس دادن ``tg`` به یکی از هم‌روال‌ها و فراخوانی ``tg.create_task()`` در آن هم‌روال). پس از پایان آخرین وظیفه و خروج از بلوک ``async with``، دیگر نمی‌توان وظیفه جدیدی به گروه اضافه کرد." +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 passing ``tg`` into one of the coroutines and calling ``tg.create_task()`` in that coroutine). There is also opportunity to request termination of the entire task group with ``tg.cancel()``, based on some condition. Once the last task has finished and the ``async with`` block is exited, no new tasks may be added to the group." +msgstr "دستور ``async with`` منتظر می‌ماند تا تمام وظایف موجود در گروه به پایان برسند. در حین انتظار، همچنان ممکن است وظایف جدیدی به گروه اضافه شوند (برای مثال، با ارسال ``tg`` به یکی از هم‌روال‌ها و فراخوانی ``tg.create_task()`` در آن هم‌روال). همچنین این فرصت وجود دارد که بر اساس شرایطی، درخواست خاتمه‌ی کل گروه وظایف با ``tg.cancel()`` داده شود. هنگامی که آخرین وظیفه به پایان رسید و از بلوک ``async with`` خارج شد، هیچ وظیفه‌ی جدیدی نمی‌تواند به گروه اضافه شود." 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 the group are cancelled. No further tasks can then be added to the group. At this point, if the body of the ``async with`` statement is still active (i.e., :meth:`~object.__aexit__` hasn't been called yet), the task directly containing the ``async with`` statement is also cancelled. The resulting :exc:`asyncio.CancelledError` will interrupt an ``await``, but it will not bubble out of the containing ``async with`` statement." msgstr "اولین باری که هر وظیفهیمتعلق به گروه با استثنایی غیر از :exc:`asyncio.CancelledError` شکست بخورد، وظایف باقی‌مانده در گروه لغو می‌شوند. پس از آن، دیگر نمی‌توان وظیفه دیگری به گروه افزود. در این نقطه، اگر بدنه دستور ``async with`` هنوز فعال باشد (یعنی :meth:`~object.__aexit__` هنوز فراخوانی نشده باشد)، وظیفهی که مستقیماً دربرگیرنده دستور ``async with`` است نیز لغو می‌شود. :exc:`asyncio.CancelledError` حاصل، یک ``await`` را قطع می‌کند، اما از دستور ``async with`` دربرگیرنده بیرون نخواهد زد." @@ -489,8 +514,8 @@ msgstr "پس از پایان یافتن همه وظایف، اگر هر یک ا msgid "Two base exceptions are treated specially: If any task fails with :exc:`KeyboardInterrupt` or :exc:`SystemExit`, the task group still cancels the remaining tasks and waits for them, but then the initial :exc:`KeyboardInterrupt` or :exc:`SystemExit` is re-raised instead of :exc:`ExceptionGroup` or :exc:`BaseExceptionGroup`." msgstr "دو استثنای پایه به‌صورت ویژه مدیریت می‌شوند: اگر هر وظیفه‌ای با :exc:`KeyboardInterrupt` یا :exc:`SystemExit` شکست بخورد، گروه وظیفه (task group) همچنان وظایف باقی‌مانده را لغو می‌کند و منتظر آن‌ها می‌ماند، اما سپس :exc:`KeyboardInterrupt` یا :exc:`SystemExit` اولیه به‌جای :exc:`ExceptionGroup` یا :exc:`BaseExceptionGroup` دوباره پرتاب می‌شود." -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 the same as if one of the tasks failed: the remaining tasks are cancelled and then waited for, and non-cancellation exceptions are grouped into an exception group and raised. The exception passed into :meth:`~object.__aexit__`, unless it is :exc:`asyncio.CancelledError`, is also included in the exception group. The same special case is made for :exc:`KeyboardInterrupt` and :exc:`SystemExit` as in the previous paragraph." -msgstr "اگر بدنه‌ی دستور ``async with`` با یک استثنا خارج شود (بنابراین :meth:`~object.__aexit__` در حالی فراخوانی می‌شود که یک استثنا تنظیم شده است)، با این مورد مانند حالتی رفتار می‌شود که یکی از وظایف شکست خورده باشد: وظایف باقی‌مانده لغو می‌شوند و سپس برای آن‌ها انتظار می‌رود، و استثناهای غیر از لغو در یک گروه استثنا دسته‌بندی و پرتاب می‌شوند. استثنایی که به :meth:`~object.__aexit__` داده می‌شود، مگر آنکه :exc:`asyncio.CancelledError` باشد، نیز در گروه استثنا گنجانده می‌شود. همان حالت خاص پاراگراف قبلی برای :exc:`KeyboardInterrupt` و :exc:`SystemExit` نیز اعمال می‌شود." +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 the same as if one of the tasks failed: the remaining tasks are cancelled and then waited for, and non-cancellation exceptions are grouped into an exception group and raised. The exception passed into :meth:`~object.__aexit__`, unless it is :exc:`asyncio.CancelledError`, is also included in the exception group. The same special case is made for :exc:`KeyboardInterrupt` and :exc:`SystemExit` as in the previous paragraph. There is an additional special case made only for the body of the ``async with``: if it raises :exc:`GeneratorExit` and none of the other tasks raise exceptions that would be reported, then the :exc:`GeneratorExit` is reraised." +msgstr "اگر بدنه‌ی دستور ``async with`` با یک استثنا خارج شود (بنابراین :meth:`~object.__aexit__` با یک مجموعه‌استثنا فراخوانی می‌شود)، این حالت دقیقاً مانند زمانی رفتار می‌شود که یکی از وظایف با شکست مواجه شده باشد: وظایف باقی‌مانده لغو شده و سپس منتظر آن‌ها می‌ماند، و استثناهای غیرلغو به شکل یک گروه استثنا گروه‌بندی شده و بالا برده می‌شوند. استثنایی که به :meth:`~object.__aexit__` ارسال می‌شود، مگر اینکه :exc:`asyncio.CancelledError` باشد، در گروه استثنا نیز گنجانده می‌شود. همان حالت خاص برای :exc:`KeyboardInterrupt` و :exc:`SystemExit` مانند پاراگراف قبلی اعمال می‌شود. یک حالت خاص اضافی نیز فقط برای بدنه‌ی ``async with`` در نظر گرفته شده است: اگر این بخش :exc:`GeneratorExit` را بالا ببرد و هیچ‌کدام از وظایف دیگر استثناهایی که باید گزارش شوند را بالا نبرند، آنگاه :exc:`GeneratorExit` دوباره بالا برده می‌شود." msgid "Task groups are careful not to mix up the internal cancellation used to \"wake up\" their :meth:`~object.__aexit__` with cancellation requests for the task in which they are running made by other parties. In particular, when one task group is syntactically nested in another, and both experience an exception in one of their child tasks simultaneously, the inner task group will process its exceptions, and then the outer task group will receive another cancellation and process its own exceptions." msgstr "گروه‌های وظیفه مراقب هستند که لغو داخلیِ استفاده‌شده برای «بیدار کردن» :meth:`~object.__aexit__` خود را با درخواست‌های لغو برای وظیفهی که در آن در حال اجرا هستند و از سوی طرف‌های دیگر مطرح شده‌اند، اشتباه نگیرند. به‌ویژه، هنگامی که یک گروه وظیفه از نظر نحوی در گروه دیگری تودرتو شده باشد و هر دو همزمان در یکی از وظایف فرزند خود با استثنا مواجه شوند، گروه وظیفه داخلی استثناهای خود را پردازش می‌کند و سپس گروه وظیفه خارجی لغو دیگری را دریافت می‌کند و استثناهای خود را پردازش می‌کند." @@ -504,84 +529,8 @@ msgstr "گروه‌های Task تعداد لغو گزارش‌شده توسط :m msgid "Improved handling of simultaneous internal and external cancellations and correct preservation of cancellation counts." msgstr "مدیریت بهتر لغوهای همزمان داخلی و خارجی و حفظ صحیح تعداد لغوها." -msgid "Terminating a task group" -msgstr "پایان دادن به گروه وظیفه" - -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 "اگرچه پایان دادن به یک گروه وظیفه به‌صورت بومی توسط کتابخانه استاندارد پشتیبانی نمی‌شود، می‌توان با افزودن وظیفه‌ای که استثنا پرتاب می‌کند به گروه وظیفه و نادیده گرفتن استثنای پرتاب‌شده، آن را پایان داد:" - -msgid "" -"import asyncio\n" -"from asyncio import TaskGroup\n" -"\n" -"class TerminateTaskGroup(Exception):\n" -" \"\"\"Exception raised to terminate a task group.\"\"\"\n" -"\n" -"async def force_terminate_task_group():\n" -" \"\"\"Used to force termination of a task group.\"\"\"\n" -" raise TerminateTaskGroup()\n" -"\n" -"async def job(task_id, sleep_time):\n" -" print(f'Task {task_id}: start')\n" -" await asyncio.sleep(sleep_time)\n" -" print(f'Task {task_id}: done')\n" -"\n" -"async def main():\n" -" try:\n" -" async with TaskGroup() as group:\n" -" # spawn some tasks\n" -" group.create_task(job(1, 0.5))\n" -" group.create_task(job(2, 1.5))\n" -" # sleep for 1 second\n" -" await asyncio.sleep(1)\n" -" # add an exception-raising task to force the group to terminate\n" -" group.create_task(force_terminate_task_group())\n" -" except* TerminateTaskGroup:\n" -" pass\n" -"\n" -"asyncio.run(main())" -msgstr "" -"import asyncio\n" -"from asyncio import TaskGroup\n" -"\n" -"class TerminateTaskGroup(Exception):\n" -" \"\"\"Exception raised to terminate a task group.\"\"\"\n" -"\n" -"async def force_terminate_task_group():\n" -" \"\"\"Used to force termination of a task group.\"\"\"\n" -" raise TerminateTaskGroup()\n" -"\n" -"async def job(task_id, sleep_time):\n" -" print(f'Task {task_id}: start')\n" -" await asyncio.sleep(sleep_time)\n" -" print(f'Task {task_id}: done')\n" -"\n" -"async def main():\n" -" try:\n" -" async with TaskGroup() as group:\n" -" # spawn some tasks\n" -" group.create_task(job(1, 0.5))\n" -" group.create_task(job(2, 1.5))\n" -" # sleep for 1 second\n" -" await asyncio.sleep(1)\n" -" # add an exception-raising task to force the group to terminate\n" -" group.create_task(force_terminate_task_group())\n" -" except* TerminateTaskGroup:\n" -" pass\n" -"\n" -"asyncio.run(main())" - -msgid "Expected output:" -msgstr "خروجی مورد انتظار:" - -msgid "" -"Task 1: start\n" -"Task 2: start\n" -"Task 1: done" -msgstr "" -"Task 1: start\n" -"Task 2: start\n" -"Task 1: done" +msgid "Addition of the special case for :exc:`GeneratorExit`." +msgstr "افزودن حالت خاص برای :exc:`GeneratorExit`." msgid "Sleeping" msgstr "توقف" @@ -1406,8 +1355,8 @@ msgstr "حلقه‌های رویداد از زمان‌بندی مشارکتی 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 "برای ایجاد Taskها، از تابع سطح بالای :func:`asyncio.create_task` یا توابع سطح پایین :meth:`loop.create_task` یا :func:`ensure_future` استفاده کنید. نمونه‌سازی دستی Taskها توصیه نمی‌شود." -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 coroutine. If a coroutine is awaiting on a Future object during cancellation, the Future object will be cancelled." -msgstr "برای لغو یک Task در حال اجرا، از متد :meth:`cancel` استفاده کنید. فراخوانی آن موجب می‌شود که Task استثنای :exc:`CancelledError` را به درون هم‌روال پوشیده‌شده پرتاب کند. اگر یک هم‌روال در حین لغو، روی یک شیء Future در حال await باشد، شیء Future لغو خواهد شد." +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 coroutine. If a coroutine is awaiting on a future-like object during cancellation, the awaited object will be cancelled." +msgstr "برای لغو یک Task در حال اجرا، از متد :meth:`cancel` استفاده کنید. فراخوانی آن باعث می‌شود Task یک استثنای :exc:`CancelledError` را در coroutine پوشانده‌شده ایجاد کند. اگر یک coroutine هنگام لغو در حال انتظار برای یک شیء شبه‌future باشد، شیء مورد انتظار لغو خواهد شد." 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 "می‌توانید از :meth:`cancelled` برای بررسی این‌که Task لغو شده است یا خیر استفاده کنید. اگر هم‌روال پوشیده‌شده استثنای :exc:`CancelledError` را سرکوب نکرده باشد و واقعاً لغو شده باشد، این متد ``True`` برمی‌گرداند." @@ -1541,6 +1490,9 @@ msgstr "این متد ترتیبی می‌دهد که استثنای :exc:`Cance msgid "The coroutine then has a chance to clean up or even deny the request by suppressing the exception with a :keyword:`try` ... ... ``except CancelledError`` ... :keyword:`finally` block. Therefore, unlike :meth:`Future.cancel`, :meth:`Task.cancel` does not guarantee that the Task will be cancelled, although suppressing cancellation completely is not common and is actively discouraged. Should the coroutine nevertheless decide to suppress the cancellation, it needs to call :meth:`Task.uncancel` in addition to catching the exception." msgstr "سپس هم‌روال این فرصت را دارد که پاک‌سازی کند یا حتی با مهار استثنا از طریق یک بلوک :keyword:`try` ... ... ``except CancelledError`` ... :keyword:`finally`، درخواست را رد کند. بنابراین، برخلاف :meth:`Future.cancel`، :meth:`Task.cancel` تضمین نمی‌کند که Task لغو شود، اگرچه مهار کامل لغو رایج نیست و به‌طور فعال نهی شده است. اگر هم‌روال با این حال تصمیم بگیرد لغو را مهار کند، باید علاوه بر گرفتن استثنا، :meth:`Task.uncancel` را نیز فراخوانی کند." +msgid "If the Task being cancelled is currently awaiting on a future-like object, that awaited object will also be cancelled. This cancellation propagates down the entire chain of awaited objects." +msgstr "اگر وظیفه‌ای که در حال لغو شدن است در حال حاضر در انتظار یک شیء آینده‌نما باشد، آن شیء مورد انتظار نیز لغو خواهد شد. این لغو شدن در سراسر زنجیره‌ی اشیای مورد انتظار به پایین منتقل می‌شود." + msgid "Added the *msg* parameter." msgstr "پارامتر *msg* اضافه شد." @@ -1680,3 +1632,82 @@ msgstr "توجه داشته باشید که اگر این عدد بزرگ‌تر 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." msgstr "این متد توسط اجزای داخلی asyncio استفاده می‌شود و انتظار نمی‌رود که توسط کد کاربر نهایی استفاده شود. برای جزئیات بیشتر :meth:`uncancel` را ببینید." + +#~ msgid "Terminating a task group" +#~ msgstr "پایان دادن به گروه وظیفه" + +#~ 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 "اگرچه پایان دادن به یک گروه وظیفه به‌صورت بومی توسط کتابخانه استاندارد پشتیبانی نمی‌شود، می‌توان با افزودن وظیفه‌ای که استثنا پرتاب می‌کند به گروه وظیفه و نادیده گرفتن استثنای پرتاب‌شده، آن را پایان داد:" + +#~ msgid "" +#~ "import asyncio\n" +#~ "from asyncio import TaskGroup\n" +#~ "\n" +#~ "class TerminateTaskGroup(Exception):\n" +#~ " \"\"\"Exception raised to terminate a task group.\"\"\"\n" +#~ "\n" +#~ "async def force_terminate_task_group():\n" +#~ " \"\"\"Used to force termination of a task group.\"\"\"\n" +#~ " raise TerminateTaskGroup()\n" +#~ "\n" +#~ "async def job(task_id, sleep_time):\n" +#~ " print(f'Task {task_id}: start')\n" +#~ " await asyncio.sleep(sleep_time)\n" +#~ " print(f'Task {task_id}: done')\n" +#~ "\n" +#~ "async def main():\n" +#~ " try:\n" +#~ " async with TaskGroup() as group:\n" +#~ " # spawn some tasks\n" +#~ " group.create_task(job(1, 0.5))\n" +#~ " group.create_task(job(2, 1.5))\n" +#~ " # sleep for 1 second\n" +#~ " await asyncio.sleep(1)\n" +#~ " # add an exception-raising task to force the group to terminate\n" +#~ " group.create_task(force_terminate_task_group())\n" +#~ " except* TerminateTaskGroup:\n" +#~ " pass\n" +#~ "\n" +#~ "asyncio.run(main())" +#~ msgstr "" +#~ "import asyncio\n" +#~ "from asyncio import TaskGroup\n" +#~ "\n" +#~ "class TerminateTaskGroup(Exception):\n" +#~ " \"\"\"Exception raised to terminate a task group.\"\"\"\n" +#~ "\n" +#~ "async def force_terminate_task_group():\n" +#~ " \"\"\"Used to force termination of a task group.\"\"\"\n" +#~ " raise TerminateTaskGroup()\n" +#~ "\n" +#~ "async def job(task_id, sleep_time):\n" +#~ " print(f'Task {task_id}: start')\n" +#~ " await asyncio.sleep(sleep_time)\n" +#~ " print(f'Task {task_id}: done')\n" +#~ "\n" +#~ "async def main():\n" +#~ " try:\n" +#~ " async with TaskGroup() as group:\n" +#~ " # spawn some tasks\n" +#~ " group.create_task(job(1, 0.5))\n" +#~ " group.create_task(job(2, 1.5))\n" +#~ " # sleep for 1 second\n" +#~ " await asyncio.sleep(1)\n" +#~ " # add an exception-raising task to force the group to terminate\n" +#~ " group.create_task(force_terminate_task_group())\n" +#~ " except* TerminateTaskGroup:\n" +#~ " pass\n" +#~ "\n" +#~ "asyncio.run(main())" + +#~ msgid "Expected output:" +#~ msgstr "خروجی مورد انتظار:" + +#~ msgid "" +#~ "Task 1: start\n" +#~ "Task 2: start\n" +#~ "Task 1: done" +#~ msgstr "" +#~ "Task 1: start\n" +#~ "Task 2: start\n" +#~ "Task 1: done" diff --git a/library/asyncio-tools.po b/library/asyncio-tools.po index 79f5cef3..09c2cb29 100644 --- a/library/asyncio-tools.po +++ b/library/asyncio-tools.po @@ -5,12 +5,13 @@ # # Translators: # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 07:59+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: none\n" @@ -33,11 +34,11 @@ msgid "The following commands inspect the process identified by ``PID``:" msgstr "دستورات زیر فرایند شناسایی‌شده با ``PID`` را بررسی می‌کنند:" msgid "" -"$ python -m asyncio pstree PID\n" -"$ python -m asyncio ps PID" +"$ python -m asyncio pstree [--retries N] PID\n" +"$ python -m asyncio ps [--retries N] PID" msgstr "" -"$ python -m asyncio pstree PID\n" -"$ python -m asyncio ps PID" +"$ python -m asyncio pstree [--retries N] PID\n" +"$ python -m asyncio ps [--retries N] PID" msgid "The commands read the target process state without executing any code in it. They are only available on supported platforms and may require permission to inspect another process. See the :ref:`permission requirements ` for details." msgstr "این دستورات وضعیت فرایند هدف را بدون اجرای هیچ کدی در آن می‌خوانند. آن‌ها فقط روی پلتفرم‌های پشتیبانی‌شده در دسترس هستند و ممکن است برای بازرسی یک فرایند دیگر به مجوز نیاز داشته باشند. برای جزئیات، :ref:`الزامات مجوز ` را ببینید." @@ -221,3 +222,6 @@ msgstr "" "18445801 0x10a2a38a0 Levitate sleep -> play TaskGroup._aexit -> TaskGroup.__aexit__ -> album Sundowning 0x10a439f60\n" "18445801 0x10a2d7150 DYWTYLM sleep -> play TaskGroup._aexit -> TaskGroup.__aexit__ -> album TMBTE 0x10a439d70\n" "18445801 0x10a6bdaa0 Aqua Regia sleep -> play TaskGroup._aexit -> TaskGroup.__aexit__ -> album TMBTE 0x10a439d70" + +msgid "Retry failed attempts to inspect the target process up to *N* times. This can help when the target process changes while its state is being read." +msgstr "تلاش‌های ناموفق برای بازرسی فرایند هدف را تا *N* بار دوباره امتحان کنید. این کار می‌تواند زمانی مفید باشد که فرایند هدف در حین خوانده شدن وضعیتش تغییر کند." diff --git a/library/base64.po b/library/base64.po index fb590eaa..6c29046a 100644 --- a/library/base64.po +++ b/library/base64.po @@ -7,12 +7,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-08-28 11:34+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -56,8 +57,14 @@ msgstr ":term:`bytes-like object` *s* را با استفاده از Base64 کد msgid "Optional *altchars* must be a :term:`bytes-like object` of length 2 which specifies an alternative alphabet for the ``+`` and ``/`` characters. This allows an application to e.g. generate URL or filesystem safe Base64 strings. The default is ``None``, for which the standard Base64 alphabet is used." msgstr "*altchars* اختیاری باید یک :term:`شیء شبه‌بایت ` به طول ۲ باشد که الفبای جایگزین را برای نویسه‌های ``+`` و ``/`` مشخص می‌کند. این به یک برنامه اجازه می‌دهد که برای مثال، رشته‌های Base64 امن برای URL یا سیستم پرونده تولید کند. پیش‌فرض ``None`` است، که در این صورت از الفبای استاندارد Base64 استفاده می‌شود." -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 "ممکن است در صورتی که طول *altchars* ۲ نباشد، assert کند یا یک :exc:`ValueError` را پرتاب کند. اگر *altchars* یک :term:`bytes-like object` نباشد، یک :exc:`TypeError` را پرتاب می‌کند." +msgid "If *padded* is true (default), pad the encoded data with the '=' character to a size multiple of 4. If *padded* is false, do not add the pad characters." +msgstr "اگر *padded* مقدار درست (پیش‌فرض) باشد، داده‌های رمزگذاری‌شده را با نویسه‌ی '=' تا اندازه‌ای که مضربی از ۴ باشد پُر کنید. اگر *padded* مقدار نادرست باشد، نویسه‌های پُرکننده را اضافه نکنید." + +msgid "If *wrapcol* is non-zero, insert a newline (``b'\\n'``) character after at most every *wrapcol* characters. If *wrapcol* is zero (default), do not insert any newlines." +msgstr "اگر *wrapcol* غیرصفر باشد، یک نویسه‌ی خط جدید (``b'\\n'``) را پس از حداکثر هر *wrapcol* نویسه درج کنید. اگر *wrapcol* صفر باشد (پیش‌فرض)، هیچ خط جدیدی درج نکنید." + +msgid "Added the *padded* and *wrapcol* parameters." +msgstr "پارامترهای *padded* و *wrapcol* افزوده شدند." msgid "Decode the Base64 encoded :term:`bytes-like object` or ASCII string *s* and return the decoded :class:`bytes`." msgstr ":term:`bytes-like object` یا رشته‌ی ASCII کدگذاری‌شده با Base64 *s* را کدگشایی می‌کند و :class:`bytes` کدگشایی‌شده را برمی‌گرداند." @@ -65,17 +72,32 @@ msgstr ":term:`bytes-like object` یا رشته‌ی ASCII کدگذاری‌شد 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 "*altchars* اختیاری باید یک :term:`bytes-like object` یا رشته‌ی ASCII به طول ۲ باشد که الفبای جایگزینی را که به‌جای نویسه‌های ``+`` و ``/`` استفاده می‌شود، مشخص می‌کند." +msgid "If *padded* is true, the last group of 4 base 64 alphabet characters must be padded with the '=' character. If *padded* is false, padding is neither required nor recognized: the '=' character is not treated as padding but as a non-alphabet character, which means it is silently discarded when *validate* is false, or causes an :exc:`~binascii.Error` when *validate* is true unless b'=' is included in *ignorechars*." +msgstr "اگر *padded* درست باشد، آخرین گروه از ۴ نویسه‌ی الفبای پایه ۶۴ باید با نویسه‌ی '=' پُر شود. اگر *padded* نادرست باشد، پدینگ نه لازم است و نه شناخته می‌شود: نویسه‌ی '=' به عنوان پدینگ در نظر گرفته نمی‌شود بلکه به عنوان یک نویسه‌ی غیرالفبایی در نظر گرفته می‌شود، به این معنا که اگر *validate* نادرست باشد به سکوت کنار گذاشته می‌شود، یا اگر *validate* درست باشد باعث بروز خطای :exc:`~binascii.Error` می‌شود مگر اینکه b'=' در *ignorechars* گنجانده شده باشد." + msgid "A :exc:`binascii.Error` exception is raised if *s* is incorrectly padded." msgstr "اگر *s* به‌درستی پدینگ (padding) نشده باشد، استثنای :exc:`binascii.Error` پرتاب می‌شود." -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 the padding check. If *validate* is ``True``, these non-alphabet characters in the input result in a :exc:`binascii.Error`." -msgstr "اگر *validate* برابر ``False`` باشد (پیش‌فرض)، نویسه‌هایی که نه در الفبای عادی base-64 و نه در الفبای جایگزین وجود دارند، پیش از بررسی پرکننده (padding) دور انداخته می‌شوند. اگر *validate* برابر ``True`` باشد، این نویسه‌های غیرالفبایی در ورودی منجر به پرتاب یک :exc:`binascii.Error` می‌شوند." +msgid "If *ignorechars* is specified, it should be a :term:`bytes-like object` containing characters to ignore from the input when *validate* is true. If *ignorechars* contains the pad character ``'='``, the pad characters presented before the end of the encoded data and the excess pad characters will be ignored. The default value of *validate* is ``True`` if *ignorechars* is specified, ``False`` otherwise." +msgstr "اگر *ignorechars* مشخص شده باشد، باید یک :term:`شیء شبه‌بایت ` باشد که حاوی نویسه‌هایی است که هنگام درست بودن *validate* باید از ورودی نادیده گرفته شوند. اگر *ignorechars* حاوی نویسه‌ی پُرکننده‌ی ``'='`` باشد، نویسه‌های پُرکننده‌ای که قبل از پایان داده‌های رمزگذاری‌شده ارائه شده‌اند و نویسه‌های پُرکننده‌ی اضافی نادیده گرفته خواهند شد. مقدار پیش‌فرض *validate* اگر *ignorechars* مشخص شده باشد ``True`` و در غیر این صورت ``False`` است." + +msgid "If *validate* is false, characters that are neither in the normal base-64 alphabet nor (if *ignorechars* is not specified) the alternative alphabet are discarded prior to the padding check, but the ``+`` and ``/`` characters keep their meaning if they are not in *altchars* (they will be discarded in future Python versions)." +msgstr "اگر *validate* نادرست باشد، نویسه‌هایی که نه در الفبای عادی base-64 و نه (اگر *ignorechars* مشخص نشده باشد) در الفبای جایگزین قرار دارند، قبل از بررسی پُرکننده کنار گذاشته می‌شوند، اما نویسه‌های ``+`` و ``/`` اگر در *altchars* نباشند معنای خود را حفظ می‌کنند (در نسخه‌های آینده‌ی پایتون کنار گذاشته خواهند شد)." + +msgid "If *validate* is true, these non-alphabet characters in the input result in a :exc:`binascii.Error`." +msgstr "اگر *validate* درست باشد، این نویسه‌های غیرالفبایی در ورودی منجر به خطای :exc:`binascii.Error` می‌شوند." + +msgid "If *canonical* is true, non-zero padding bits are rejected. See :func:`binascii.a2b_base64` for details." +msgstr "اگر *canonical* درست باشد، بیت‌های پُرکننده‌ی غیرصفر رد می‌شوند. برای جزئیات به :func:`binascii.a2b_base64` مراجعه کنید." msgid "For more information about the strict base64 check, see :func:`binascii.a2b_base64`" msgstr "برای اطلاعات بیشتر درباره بررسی سخت‌گیرانه base64، :func:`binascii.a2b_base64` را ببینید" -msgid "May assert or raise a :exc:`ValueError` if the length of *altchars* is not 2." -msgstr "ممکن است در صورتی که طول *altchars* برابر ۲ نباشد، assert کند یا یک :exc:`ValueError` را پرتاب کند." +msgid "Added the *canonical*, *ignorechars*, and *padded* parameters." +msgstr "پارامترهای *canonical*، *ignorechars* و *padded* افزوده شدند." + +msgid "Accepting the ``+`` and ``/`` characters with an alternative alphabet is now deprecated." +msgstr "پذیرش نویسه‌های ``+`` و ``/`` با یک الفبای جایگزین اکنون منسوخ شده است." msgid "Encode :term:`bytes-like object` *s* using the standard Base64 alphabet and return the encoded :class:`bytes`." msgstr ":term:`bytes-like object` *s* را با استفاده از الفبای استاندارد Base64 کدگذاری می‌کند و :class:`bytes` کدگذاری‌شده را برمی‌گرداند." @@ -83,15 +105,30 @@ msgstr ":term:`bytes-like object` *s* را با استفاده از الفبای msgid "Decode :term:`bytes-like object` or ASCII string *s* using the standard Base64 alphabet and return the decoded :class:`bytes`." msgstr ":term:`bytes-like object` یا رشته ASCII *s* را با استفاده از الفبای استاندارد Base64 کدگشایی می‌کند و :class:`bytes` کدگشایی‌شده را برمی‌گرداند." -msgid "Encode :term:`bytes-like object` *s* using the URL- and filesystem-safe alphabet, which substitutes ``-`` instead of ``+`` and ``_`` instead of ``/`` in the standard Base64 alphabet, and return the encoded :class:`bytes`. The result can still contain ``=``." -msgstr ":term:`bytes-like object` *s* را با استفاده از الفبای امن برای URL و سامانه فایل‌بندی کدگذاری می‌کند، که در الفبای استاندارد Base64، ``-`` را به جای ``+`` و ``_`` را به جای ``/`` جایگزین می‌کند، و :class:`bytes` کدگذاری‌شده را برمی‌گرداند. نتیجه همچنان می‌تواند شامل ``=`` باشد." +msgid "Encode :term:`bytes-like object` *s* using the URL- and filesystem-safe alphabet, which substitutes ``-`` instead of ``+`` and ``_`` instead of ``/`` in the standard Base64 alphabet, and return the encoded :class:`bytes`. The result can still contain ``=`` if *padded* is true (default)." +msgstr "یک :term:`شیء شبه‌بایت ` *s* را با استفاده از الفبای امن برای URL و سامانه فایل‌بندی رمزگذاری کنید؛ این الفبا به جای ``+`` از ``-`` و به جای ``/`` از ``_`` در الفبای استاندارد Base64 استفاده می‌کند و :class:`bytes` رمزگذاری‌شده را برمی‌گرداند. اگر *padded* درست باشد (پیش‌فرض)، نتیجه همچنان می‌تواند حاوی ``=`` باشد." + +msgid "Added the *padded* parameter." +msgstr "پارامتر *padded* افزوده شد." msgid "Decode :term:`bytes-like object` or ASCII string *s* using the URL- and filesystem-safe alphabet, which substitutes ``-`` instead of ``+`` and ``_`` instead of ``/`` in the standard Base64 alphabet, and return the decoded :class:`bytes`." msgstr "با استفاده از الفبای امن برای URL و سامانه فایل‌بندی، که در الفبای استاندارد Base64 به‌جای ``+`` از ``-`` و به‌جای ``/`` از ``_`` استفاده می‌کند، :term:`bytes-like object` یا رشته‌ی ASCII *s* را کدگشایی کنید و :class:`bytes` کدگشایی‌شده را برگردانید." +msgid "Added the *padded* parameter. Padding of input is no longer required by default." +msgstr "پارامتر *padded* افزوده شد. پدینگ ورودی دیگر به طور پیش‌فرض الزامی نیست." + +msgid "Accepting the ``+`` and ``/`` characters is now deprecated." +msgstr "پذیرش نویسه‌های ``+`` و ``/`` اکنون منسوخ شده است." + msgid "Encode the :term:`bytes-like object` *s* using Base32 and return the encoded :class:`bytes`." msgstr ":term:`bytes-like object` *s* را با استفاده از Base32 کدگذاری می‌کند و :class:`bytes` کدگذاری‌شده را برمی‌گرداند." +msgid "If *padded* is true (default), pad the encoded data with the '=' character to a size multiple of 8. If *padded* is false, do not add the pad characters." +msgstr "اگر *padded* مقدار درست (پیش‌فرض) باشد، داده‌های رمزگذاری‌شده را با نویسه‌ی '=' تا اندازه‌ای که مضربی از ۸ باشد پُر کنید. اگر *padded* مقدار نادرست باشد، نویسه‌های پُرکننده را اضافه نکنید." + +msgid "If *wrapcol* is non-zero, insert a newline (``b'\\n'``) character after at most every *wrapcol* characters. If *wrapcol* is zero (default), do not add any newlines." +msgstr "اگر *wrapcol* غیرصفر باشد، یک نویسه‌ی خط جدید (``b'\\n'``) را پس از حداکثر هر *wrapcol* نویسه درج کنید. اگر *wrapcol* صفر باشد (پیش‌فرض)، هیچ خط جدیدی اضافه نکنید." + msgid "Decode the Base32 encoded :term:`bytes-like object` or ASCII string *s* and return the decoded :class:`bytes`." msgstr ":term:`bytes-like object` یا رشته ASCII *s* را که با Base32 کدگذاری‌شده است، کدگشایی می‌کند و :class:`bytes` کدگشایی‌شده را برمی‌گرداند." @@ -101,6 +138,15 @@ msgstr "*casefold* اختیاری پرچمی است که مشخص می‌کند 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 (eye) or letter L (el). The optional argument *map01* when not ``None``, specifies which letter the digit 1 should be mapped to (when *map01* is not ``None``, the digit 0 is always mapped to the letter O). For security purposes the default is ``None``, so that 0 and 1 are not allowed in the input." msgstr ":rfc:`4648` امکان نگاشت اختیاری رقم ۰ (صفر) به حرف O (اوه) و نگاشت اختیاری رقم ۱ (یک) به حرف I (آی) یا حرف L (اِل) را فراهم می‌کند. آرگومان اختیاری *map01*، هنگامی که ``None`` نباشد، مشخص می‌کند که رقم ۱ باید به کدام حرف نگاشت شود (هنگامی که *map01* ``None`` نباشد، رقم ۰ همیشه به حرف O نگاشت می‌شود). به‌دلایل امنیتی، مقدار پیش‌فرض ``None`` است، تا ۰ و ۱ در ورودی مجاز نباشند." +msgid "If *padded* is true, the last group of 8 base 32 alphabet characters must be padded with the '=' character. If *padded* is false, padding is neither required nor recognized: the '=' character is not treated as padding but as a non-alphabet character, which means it raises an :exc:`~binascii.Error` unless b'=' is included in *ignorechars*." +msgstr "اگر *padded* مقدار درست باشد، آخرین گروه از ۸ نویسه‌ی الفبای base 32 باید با نویسه‌ی '=' پُر شود. اگر *padded* مقدار نادرست باشد، پُرکننده نه الزامی است و نه شناخته می‌شود: نویسه‌ی '=' به عنوان پُرکننده در نظر گرفته نمی‌شود، بلکه به عنوان یک نویسه‌ی غیرالفبایی در نظر گرفته می‌شود؛ این یعنی به استثنای حالتی که b'=' در *ignorechars* گنجانده شده باشد، یک خطای :exc:`~binascii.Error` پرتاب می‌کند." + +msgid "*ignorechars* should be a :term:`bytes-like object` containing characters to ignore from the input." +msgstr "*ignorechars* باید یک :term:`شیء شبه‌بایت ` باشد که شامل نویسه‌هایی است که باید از ورودی نادیده گرفته شوند." + +msgid "If *canonical* is true, non-zero padding bits are rejected. See :func:`binascii.a2b_base32` for details." +msgstr "اگر *canonical* مقدار درست باشد، بیت‌های پُرکننده‌ی غیرصفر رد می‌شوند. برای جزئیات بیشتر به :func:`binascii.a2b_base32` مراجعه کنید." + msgid "A :exc:`binascii.Error` is raised if *s* is incorrectly padded or if there are non-alphabet characters present in the input." msgstr "اگر *s* به‌درستی پد (padding) نشده باشد یا نویسه‌های خارج از الفبا در ورودی وجود داشته باشند، یک :exc:`binascii.Error` پرتاب می‌شود." @@ -116,9 +162,15 @@ msgstr "این نسخه اجازه‌ی نگاشت رقم ۰ (صفر) به حر msgid "Encode the :term:`bytes-like object` *s* using Base16 and return the encoded :class:`bytes`." msgstr "شیء :term:`bytes-like object` *s* را با استفاده از Base16 کدگذاری کنید و :class:`bytes` کدگذاری‌شده را برگردانید." +msgid "Added the *wrapcol* parameter." +msgstr "پارامتر *wrapcol* اضافه شد." + msgid "Decode the Base16 encoded :term:`bytes-like object` or ASCII string *s* and return the decoded :class:`bytes`." msgstr "کدگشایی :term:`bytes-like object` یا رشته‌ی ASCII *s* کدگذاری‌شده با Base16 و برگرداندن :class:`bytes` کدگشایی‌شده." +msgid "Added the *ignorechars* parameter." +msgstr "پارامتر *ignorechars* اضافه شد." + msgid "Base85 Encodings" msgstr "کدگذاری‌های Base85" @@ -158,9 +210,6 @@ msgstr ":term:`bytes-like object` *b* را با استفاده از Ascii85 کد 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 encoding used in PDF." msgstr "*foldspaces* یک پرچم اختیاری است که به‌جای ۴ فاصله‌ی متوالی (ASCII 0x20)، از دنباله‌ی کوتاه ویژه‌ی 'y' استفاده می‌کند؛ همان‌طور که توسط 'btoa' پشتیبانی می‌شود. این قابلیت توسط کدگذاری استاندارد استفاده‌شده در PDF پشتیبانی نمی‌شود." -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 "*wrapcol* تعیین می‌کند که آیا باید نویسه‌های خط جدید (``b'\\n'``) به خروجی افزوده شوند یا خیر. اگر این مقدار غیرصفر باشد، طول هر خط خروجی حداکثر این تعداد نویسه خواهد بود، بدون احتساب نویسه خط جدید پایانی." - msgid "*pad* controls whether zero-padding applied to the end of the input is fully retained in the output encoding, as done by ``btoa``, producing an exact multiple of 5 bytes of output. This is not part of the standard encoding used in PDF, as it does not preserve the length of the data." msgstr "*pad* مشخص می‌کند که آیا پدینگ صفر (zero-padding) اعمال‌شده به انتهای ورودی به‌طور کامل در کدگذاری خروجی حفظ می‌شوند، همان‌طور که ``btoa`` این کار را انجام می‌دهد و خروجی‌ای تولید می‌کند که دقیقاً مضربی از ۵ بایت است. این بخشی از کدگذاری استاندارد استفاده‌شده در PDF نیست، زیرا طول داده را حفظ نمی‌کند." @@ -176,8 +225,14 @@ msgstr "*foldspaces* پرچمی است که مشخص می‌کند آیا دنب msgid "*adobe* controls whether the ``<~`` and ``~>`` markers are present. While the leading ``<~`` is not required, the input must end with ``~>``, or a :exc:`ValueError` is raised." msgstr "*adobe* تعیین می‌کند که نشانگرهای ``<~`` و ``~>`` وجود داشته باشند. اگرچه نشانگر ابتدایی ``<~`` الزامی نیست، اما ورودی باید با ``~>`` پایان یابد، در غیر این صورت یک :exc:`ValueError` پرتاب می‌شود." -msgid "*ignorechars* should be a byte string containing characters to ignore from the input. This should only contain whitespace characters, and by default contains all whitespace characters in ASCII." -msgstr "*ignorechars* باید یک رشته‌ی بایتی شامل نویسه‌هایی باشد که باید از ورودی نادیده گرفته شوند. این رشته باید فقط شامل نویسه‌های فضای سفید باشد، و به‌طور پیش‌فرض شامل تمام نویسه‌های فضای سفید در ASCII است." +msgid "*ignorechars* should be a :term:`bytes-like object` containing characters to ignore from the input. This should only contain whitespace characters, and by default contains all whitespace characters in ASCII." +msgstr "پارامتر *ignorechars* باید یک :term:`شیء شبه‌بایت ` باشد که شامل نویسه‌هایی برای نادیده‌گرفتن از ورودی است. این پارامتر فقط باید شامل نویسه‌های فاصله باشد و به طور پیش‌فرض شامل تمام نویسه‌های فاصله در ASCII است." + +msgid "If *canonical* is true, non-canonical encodings are rejected. See :func:`binascii.a2b_ascii85` for details." +msgstr "اگر *canonical* مقدار درست باشد، کدگذاری‌های غیرکانونیکال رد می‌شوند. برای جزئیات بیشتر به :func:`binascii.a2b_ascii85` مراجعه کنید." + +msgid "Added the *canonical* parameter. Single-character final groups are now always rejected as encoding violations." +msgstr "پارامتر *canonical* اضافه شد. گروه‌های نهایی تک‌نویسه‌ای اکنون همیشه به عنوان نقض کدگذاری رد می‌شوند." 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 "شیء شبه‌بایت (:term:`bytes-like object`) *b* را با استفاده از base85 (که برای مثال در diffهای دودویی به‌سبک git استفاده می‌شود) کدگذاری می‌کند و :class:`bytes` کدگذاری‌شده را برمی‌گرداند." @@ -188,11 +243,20 @@ msgstr "ورودی با ``b'\\0'`` پر می‌شود تا طول آن پیش ا msgid "Decode the base85-encoded :term:`bytes-like object` or ASCII string *b* and return the decoded :class:`bytes`." msgstr ":term:`bytes-like object` یا رشته‌ی ASCII *b* را که با base85 کدگذاری‌شده است، کدگشایی می‌کند و :class:`bytes` کدگشایی‌شده را برمی‌گرداند." +msgid "If *canonical* is true, non-canonical encodings are rejected. See :func:`binascii.a2b_base85` for details." +msgstr "اگر *canonical* مقدار درست باشد، کدگذاری‌های غیرکانونیکال رد می‌شوند. برای جزئیات بیشتر به :func:`binascii.a2b_base85` مراجعه کنید." + +msgid "Added the *canonical* and *ignorechars* parameters. Single-character final groups are now always rejected as encoding violations." +msgstr "پارامترهای *canonical* و *ignorechars* اضافه شدند. گروه‌های نهایی تک‌نویسه‌ای اکنون همیشه به عنوان نقض کدگذاری رد می‌شوند." + msgid "Encode the :term:`bytes-like object` *s* using Z85 (as used in ZeroMQ) and return the encoded :class:`bytes`." msgstr ":term:`bytes-like object` *s* را با استفاده از Z85 (همان‌طور که در ZeroMQ استفاده می‌شود) کدگذاری کنید و :class:`bytes` کدگذاری‌شده را برگردانید." -msgid "The `ZeroMQ specification `_ requires the length of Z85-encoded data to be a multiple of 5 bytes. To produce compliant data frames, you must pad the input data to this function to a multiple of 4 bytes." -msgstr "`مشخصات ZeroMQ `_ الزام می‌کند که طول داده‌های کدگذاری‌شده با Z85 مضربی از ۵ بایت باشد. برای تولید فریم‌های داده‌ی سازگار، باید داده‌های ورودی به این تابع را تا مضربی از ۴ بایت پد کنید." +msgid "The input is padded with ``b'\\0'`` so its length is a multiple of 4 bytes before encoding. If *pad* is true, all the resulting characters are retained in the output, which will always be a multiple of 5 bytes, as required by the ZeroMQ standard." +msgstr "ورودی با ``b'\\0'`` پدگذاری می‌شود تا طول آن قبل از کدگذاری ضریبی از ۴ بایت باشد. اگر *pad* برابر با True باشد، تمام نویسه‌های حاصل در خروجی حفظ خواهند شد که همان‌طور که استاندارد ZeroMQ ایجاب می‌کند، همیشه ضریبی از ۵ بایت خواهد بود." + +msgid "The *pad* parameter was added." +msgstr "پارامتر *pad* اضافه شد." msgid "Decode the Z85-encoded :term:`bytes-like object` or ASCII string *s* and return the decoded :class:`bytes`." msgstr ":term:`bytes-like object` یا رشته ASCII *s* کدگذاری‌شده با Z85 را کدگشایی می‌کند و :class:`bytes` کدگشایی‌شده را برمی‌گرداند." @@ -256,3 +320,15 @@ msgstr "MIME" msgid "base64 encoding" msgstr "کدگذاری base64" + +#~ 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 "ممکن است در صورتی که طول *altchars* ۲ نباشد، assert کند یا یک :exc:`ValueError` را پرتاب کند. اگر *altchars* یک :term:`bytes-like object` نباشد، یک :exc:`TypeError` را پرتاب می‌کند." + +#~ msgid "May assert or raise a :exc:`ValueError` if the length of *altchars* is not 2." +#~ msgstr "ممکن است در صورتی که طول *altchars* برابر ۲ نباشد، assert کند یا یک :exc:`ValueError` را پرتاب کند." + +#~ 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 "*wrapcol* تعیین می‌کند که آیا باید نویسه‌های خط جدید (``b'\\n'``) به خروجی افزوده شوند یا خیر. اگر این مقدار غیرصفر باشد، طول هر خط خروجی حداکثر این تعداد نویسه خواهد بود، بدون احتساب نویسه خط جدید پایانی." + +#~ msgid "The `ZeroMQ specification `_ requires the length of Z85-encoded data to be a multiple of 5 bytes. To produce compliant data frames, you must pad the input data to this function to a multiple of 4 bytes." +#~ msgstr "`مشخصات ZeroMQ `_ الزام می‌کند که طول داده‌های کدگذاری‌شده با Z85 مضربی از ۵ بایت باشد. برای تولید فریم‌های داده‌ی سازگار، باید داده‌های ورودی به این تابع را تا مضربی از ۴ بایت پد کنید." diff --git a/library/bdb.po b/library/bdb.po index 7d1dbd92..a66b137e 100644 --- a/library/bdb.po +++ b/library/bdb.po @@ -7,12 +7,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 08:49+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -173,17 +174,8 @@ msgstr "``\"return\"``: یک تابع یا بلوک کد دیگر در آستا msgid "``\"exception\"``: An exception has occurred." msgstr "``\"exception\"``: یک استثنا رخ داده است." -msgid "``\"c_call\"``: A C function is about to be called." -msgstr "``\"c_call\"``: یک تابع C در آستانه فراخوانی است." - -msgid "``\"c_return\"``: A C function has returned." -msgstr "``\"c_return\"``: یک تابع C بازگشته است." - -msgid "``\"c_exception\"``: A C function has raised an exception." -msgstr "``\"c_exception\"``: یک تابع C استثنایی را پرتاب کرده است." - -msgid "For the Python events, specialized functions (see below) are called. For the C events, no action is taken." -msgstr "برای رویدادهای پایتون، توابع تخصصی (در زیر ببینید) فراخوانی می‌شوند. برای رویدادهای C، هیچ اقدامی انجام نمی‌شود." +msgid "For all the events, specialized functions (see below) are called." +msgstr "برای تمام رویدادها، توابع تخصصی (در ادامه ببینید) فراخوانی می‌شوند." msgid "The *arg* parameter depends on the previous event." msgstr "پارامتر *arg* به رویداد قبلی بستگی دارد." @@ -379,3 +371,12 @@ msgstr "شروع اشکال‌زدایی با نمونه‌ای از :class:`Bdb msgid "quitting (bdb.Bdb attribute)" msgstr "quitting (ویژگی bdb.Bdb)" + +#~ msgid "``\"c_call\"``: A C function is about to be called." +#~ msgstr "``\"c_call\"``: یک تابع C در آستانه فراخوانی است." + +#~ msgid "``\"c_return\"``: A C function has returned." +#~ msgstr "``\"c_return\"``: یک تابع C بازگشته است." + +#~ msgid "``\"c_exception\"``: A C function has raised an exception." +#~ msgstr "``\"c_exception\"``: یک تابع C استثنایی را پرتاب کرده است." diff --git a/library/binascii.po b/library/binascii.po index 2bf854c5..ff278e2e 100644 --- a/library/binascii.po +++ b/library/binascii.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-08-28 11:24+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -50,14 +51,23 @@ msgstr "پارامتر *backtick* افزوده شد." msgid "Convert a block of base64 data back to binary and return the binary data. More than one line may be passed at a time." msgstr "یک بلوک از داده‌های base64 را دوباره به دودویی تبدیل می‌کند و داده‌های دودویی را برمی‌گرداند. شما می‌توانید بیش از یک خط را در هر بار ارسال کنید." +msgid "Optional *alphabet* must be a :class:`bytes` object of length 64 which specifies an alternative alphabet." +msgstr "پارامتر اختیاری *alphabet* باید یک :class:`bytes` به طول ۶۴ باشد که الفبای جایگزینی را مشخص می‌کند." + +msgid "If *padded* is true, the last group of 4 base 64 alphabet characters must be padded with the '=' character. If *padded* is false, padding is neither required nor recognized: the '=' character is not treated as padding but as a non-alphabet character, which means it is silently discarded when *strict_mode* is false, or causes an :exc:`~binascii.Error` when *strict_mode* is true unless b'=' is included in *ignorechars*." +msgstr "اگر *padded* مقدار درست باشد، آخرین گروه از ۴ نویسه‌ی الفبای base 64 باید با نویسه‌ی '=' پُر شود. اگر *padded* مقدار نادرست باشد، پُرکننده نه الزامی است و نه شناخته می‌شود: نویسه‌ی '=' به عنوان پُرکننده در نظر گرفته نمی‌شود، بلکه به عنوان یک نویسه‌ی غیرالفبایی در نظر گرفته می‌شود؛ به این معنا که اگر *strict_mode* نادرست باشد، به‌طور صامت کنار گذاشته می‌شود، یا اگر *strict_mode* درست باشد، خطای :exc:`~binascii.Error` را ایجاد می‌کند، مگر اینکه b'=' در *ignorechars* گنجانده شده باشد." + +msgid "If *ignorechars* is specified, it should be a :term:`bytes-like object` containing characters to ignore from the input when *strict_mode* is true. If *ignorechars* contains the pad character ``'='``, the pad characters presented before the end of the encoded data and the excess pad characters will be ignored. The default value of *strict_mode* is ``True`` if *ignorechars* is specified, ``False`` otherwise." +msgstr "اگر *ignorechars* مشخص شده باشد، باید یک :term:`شیء شبه‌بایت ` باشد که شامل نویسه‌هایی است که وقتی *strict_mode* درست است، باید از ورودی نادیده گرفته شوند. اگر *ignorechars* شامل نویسه‌ی پُرکننده‌ی ``'='`` باشد، نویسه‌های پُرکننده‌ای که قبل از انتهای داده‌های کدگذاری‌شده ارائه شده‌اند و نویسه‌های پُرکننده‌ی اضافی نادیده گرفته خواهند شد. اگر *ignorechars* مشخص شده باشد، مقدار پیش‌فرض *strict_mode* برابر با ``True`` و در غیراین‌صورت برابر با ``False`` است." + msgid "If *strict_mode* is true, only valid base64 data will be converted. Invalid base64 data will raise :exc:`binascii.Error`." msgstr "اگر *strict_mode* درست باشد، فقط داده‌های معتبر base64 تبدیل می‌شوند. داده‌های نامعتبر base64 باعث پرتاب :exc:`binascii.Error` می‌شوند." msgid "Valid base64:" msgstr "base64 معتبر:" -msgid "Conforms to :rfc:`3548`." -msgstr "با :rfc:`3548` مطابقت دارد." +msgid "Conforms to :rfc:`4648`." +msgstr "مطابق با استاندارد :rfc:`4648`." msgid "Contains only characters from the base64 alphabet." msgstr "فقط شامل نویسه‌های الفبای base64 است." @@ -68,15 +78,126 @@ msgstr "فاقد داده اضافی پس از پدینگ (padding) است (از msgid "Does not start with a padding." msgstr "با یک پرکننده (padding) شروع نمی‌شود." +msgid "If *canonical* is true, non-zero padding bits in the last group are rejected with :exc:`binascii.Error`, enforcing canonical encoding as defined in :rfc:`4648` section 3.5. This check is independent of *strict_mode*." +msgstr "اگر *canonical* مقدار درست باشد، بیت‌های پُرکننده‌ی غیرصفر در آخرین گروه با خطای :exc:`binascii.Error` رد می‌شوند و کدگذاری کانونیکال همان‌طور که در بخش ۳.۵ استاندارد :rfc:`4648` تعریف شده است، اعمال می‌شود. این بررسی مستقل از *strict_mode* است." + msgid "Added the *strict_mode* parameter." msgstr "پارامتر *strict_mode* اضافه شد." -msgid "Convert binary data to a line of ASCII characters in base64 coding. The return value is the converted line, including a newline char if *newline* is true. The output of this function conforms to :rfc:`3548`." -msgstr "داده‌های دودویی را به سطری از نویسه‌های ASCII با کدگذاری base64 تبدیل می‌کند. مقدار بازگشتی، خط تبدیل‌شده است و در صورتی که *newline* درست باشد، شامل یک نویسه خط جدید نیز می‌شود. خروجی این تابع با :rfc:`3548` مطابقت دارد." +msgid "Added the *alphabet*, *canonical*, *ignorechars*, and *padded* parameters." +msgstr "پارامترهای *alphabet*، *canonical*، *ignorechars* و *padded* اضافه شدند." + +msgid "Convert binary data to a line(s) of ASCII characters in base64 coding, as specified in :rfc:`4648`." +msgstr "داده‌های دودویی را به یک یا چند سطر از نویسه‌های اسکی در کدگذاری base64 تبدیل می‌کند، همان‌طور که در :rfc:`4648` مشخص شده است." + +msgid "If *padded* is true (default), pad the encoded data with the '=' character to a size multiple of 4. If *padded* is false, do not add the pad characters." +msgstr "اگر *padded* مقدار درست باشد (پیش‌فرض)، داده‌های کدگذاری‌شده را با نویسه‌ی '=' تا اندازه‌ای که ضریبی از ۴ باشد پُر کنید. اگر *padded* مقدار نادرست باشد، نویسه‌های پُرکننده را اضافه نکنید." + +msgid "If *wrapcol* is non-zero, insert a newline (``b'\\n'``) character after at most every *wrapcol* characters. If *wrapcol* is zero (default), do not insert any newlines." +msgstr "اگر *wrapcol* غیرصفر باشد، پس از حداکثر هر *wrapcol* نویسه، یک نویسه‌ی خط جدید (``b'\\n'``) درج کنید. اگر *wrapcol* صفر باشد (پیش‌فرض)، هیچ خط جدیدی درج نکنید." + +msgid "If *newline* is true (default), a newline character will be added at the end of the output." +msgstr "اگر *newline* درست باشد (پیش‌فرض)، یک نویسه‌ی خط جدید در انتهای خروجی اضافه خواهد شد." msgid "Added the *newline* parameter." msgstr "پارامتر *newline* افزوده شد." +msgid "Added the *alphabet*, *padded* and *wrapcol* parameters." +msgstr "پارامترهای *alphabet*، *padded* و *wrapcol* اضافه شدند." + +msgid "Convert Ascii85 data back to binary and return the binary data." +msgstr "داده‌های Ascii85 را به داده‌های دودویی تبدیل کرده و داده‌های دودویی را برمی‌گرداند." + +msgid "Valid Ascii85 data contains characters from the Ascii85 alphabet in groups of five (except for the final group, which may have from two to five characters). Each group encodes 32 bits of binary data in the range from ``0`` to ``2 ** 32 - 1``, inclusive. The special character ``z`` is accepted as a short form of the group ``!!!!!``, which encodes four consecutive null bytes. A single-character final group is always rejected as an encoding violation." +msgstr "داده‌های معتبر Ascii85 شامل نویسه‌هایی از الفبای Ascii85 در گروه‌های پنج‌تایی هستند (به‌جز گروه نهایی که ممکن است دارای دو تا پنج نویسه باشد). هر گروه داده‌های دودویی ۳۲ بیتی را در محدوده‌ی شامل ``0`` تا ``2 ** 32 - 1`` کدگذاری می‌کند. نویسه‌ی خاص ``z`` به عنوان فرم کوتاهی از گروه ``!!!!!`` پذیرفته می‌شود که چهار بایت تهی متوالی را کدگذاری می‌کند. یک گروه نهایی تک‌نویسه‌ای همیشه به عنوان نقض کدگذاری رد می‌شود." + +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 "پارامتر *foldspaces* پرچمی است که مشخص می‌کند آیا دنباله‌ی کوتاه 'y' باید به عنوان میانبری برای ۴ فضای خالی متوالی (اسکی 0x20) پذیرفته شود یا خیر. این ویژگی توسط کدگذاری «استاندارد» Ascii85 پشتیبانی نمی‌شود." + +msgid "*adobe* controls whether the encoded byte sequence is framed with ``<~`` and ``~>``, as in a PostScript base-85 string literal. If *adobe* is true, a leading ``<~`` is optionally accepted, while a trailing ``~>`` is *required*, and :exc:`binascii.Error` is raised if it is not found." +msgstr "پارامتر *adobe* کنترل می‌کند که آیا دنباله‌ی بایت‌های کدگذاری‌شده با ``<~`` و ``~>`` قاب‌بندی شده‌اند یا خیر، درست مانند یک رشته‌ی لفظی base-85 در PostScript. اگر *adobe* مقدار درست باشد، وجود یک ``<~`` در ابتدا به صورت اختیاری پذیرفته می‌شود، در حالی که وجود ``~>`` در انتها *الزامی* است و اگر یافت نشود، استثنای :exc:`binascii.Error` پرتاب می‌شود." + +msgid "*ignorechars* should be a :term:`bytes-like object` containing characters to ignore from the input. This should only contain whitespace characters." +msgstr "پارامتر *ignorechars* باید یک :term:`شیء شبه‌بایت ` حاوی نویسه‌هایی باشد که باید از ورودی نادیده گرفته شوند. این پارامتر باید فقط شامل نویسه‌های فاصله باشد." + +msgid "If *canonical* is true, non-canonical encodings are rejected with :exc:`binascii.Error`. Here \"canonical\" means the encoding that :func:`b2a_ascii85` would produce: the ``z`` abbreviation must be used for all-zero groups (rather than ``!!!!!``), and partial final groups must use the same padding digits as the encoder." +msgstr "اگر *canonical* مقدار درست باشد، کدگذاری‌های غیرکانونیکال با :exc:`binascii.Error` رد می‌شوند. در اینجا «کانونیکال» به معنای کدگذاری‌ای است که تابع :func:`b2a_ascii85` تولید می‌کند: علامت اختصاری ``z`` باید برای گروه‌های تماماً صفر (به‌جای ``!!!!!``) استفاده شود و گروه‌های نهایی جزئی باید از همان رقم‌های پدینگِ کدگذار استفاده کنند." + +msgid "Invalid Ascii85 data will raise :exc:`binascii.Error`." +msgstr "داده‌های نامعتبر Ascii85 استثنای :exc:`binascii.Error` را پرتاب خواهند کرد." + +msgid "Convert binary data to a formatted sequence of ASCII characters in Ascii85 coding. The return value is the converted data." +msgstr "داده‌های دودویی را به یک دنباله‌ی قالب‌بندی‌شده از نویسه‌های اسکی در کدگذاری Ascii85 تبدیل می‌کند. مقدار بازگشتی، داده‌های تبدیل‌شده است." + +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 "پارامتر *foldspaces* پرچمی اختیاری است که به‌جای ۴ فضای خالی متوالی (اسکی 0x20)، از دنباله‌ی کوتاه ویژه‌ی 'y' استفاده می‌کند، همان‌طور که توسط 'btoa' پشتیبانی می‌شود. این ویژگی توسط کدگذاری «استاندارد» Ascii85 پشتیبانی نمی‌شود." + +msgid "If *pad* is true, the zero-padding applied to the end of the input is fully retained in the output encoding, as done by ``btoa``, producing an exact multiple of 5 bytes of output. This is not part of the standard encoding used in PDF, as it does not preserve the length of the data." +msgstr "اگر *pad* مقدار درست باشد، پدینگ صفر اعمال‌شده به انتهای ورودی به‌طور کامل در کدگذاری خروجی حفظ می‌شود، درست مانند کاری که ``btoa`` انجام می‌دهد، و در نتیجه خروجی دقیقاً ضریبی از ۵ بایت خواهد بود. این مورد بخشی از کدگذاری استاندارد مورداستفاده در PDF نیست، زیرا طول داده‌ها را حفظ نمی‌کند." + +msgid "*adobe* controls whether the encoded byte sequence is framed with ``<~`` and ``~>``, as in a PostScript base-85 string literal. Note that while ASCII85Decode streams in PDF documents *must* be terminated with ``~>``, they *must not* use a leading ``<~``." +msgstr "پارامتر *adobe* کنترل می‌کند که آیا دنباله‌ی بایت‌های کدگذاری‌شده با ``<~`` و ``~>`` قاب‌بندی شده‌اند یا خیر، درست مانند یک رشته‌ی لفظی base-85 در PostScript. توجه داشته باشید که اگرچه جریان‌های ASCII85Decode در اسناد PDF *باید* با ``~>`` خاتمه یابند، اما *نباید* از ``<~`` در ابتدا استفاده کنند." + +msgid "Convert Base85 data back to binary and return the binary data. More than one line may be passed at a time." +msgstr "داده‌های Base85 را به داده‌های دودویی تبدیل کرده و داده‌های دودویی را برمی‌گرداند. ممکن است بیش از یک سطر در هر بار ارسال شود." + +msgid "Valid Base85 data contains characters from the Base85 alphabet in groups of five (except for the final group, which may have from two to five characters). Each group encodes 32 bits of binary data in the range from ``0`` to ``2 ** 32 - 1``, inclusive. A single-character final group is always rejected as an encoding violation." +msgstr "داده‌های معتبر Base85 شامل نویسه‌هایی از الفبای Base85 در گروه‌های پنج‌تایی هستند (به‌جز گروه نهایی که ممکن است از دو تا پنج نویسه داشته باشد). هر گروه ۳۲ بیت از داده‌های دودویی را در محدوده‌ی ``0`` تا ``2 ** 32 - 1`` (شامل هر دو) کدگذاری می‌کند. یک گروه نهایی تک‌نویسه‌ای همیشه به عنوان تخلف از قوانین کدگذاری رد می‌شود." + +msgid "Optional *alphabet* must be a :class:`bytes` object of length 85 which specifies an alternative alphabet." +msgstr "پارامتر اختیاری *alphabet* باید یک شیء :class:`bytes` با طول ۸۵ باشد که الفبای جایگزینی را مشخص می‌کند." + +msgid "*ignorechars* should be a :term:`bytes-like object` containing characters to ignore from the input." +msgstr "پارامتر *ignorechars* باید یک :term:`شیء شبه‌بایت ` حاوی نویسه‌هایی باشد که باید از ورودی نادیده گرفته شوند." + +msgid "If *canonical* is true, non-canonical encodings are rejected with :exc:`binascii.Error`. Here \"canonical\" means the encoding that :func:`b2a_base85` would produce: partial final groups must use the same padding digits as the encoder." +msgstr "اگر *canonical* مقدار درست باشد، کدگذاری‌های غیرکانونیکال با :exc:`binascii.Error` رد می‌شوند. در اینجا «کانونیکال» به معنای کدگذاری‌ای است که تابع :func:`b2a_base85` تولید می‌کند: گروه‌های نهایی جزئی باید از همان رقم‌های پدینگِ کدگذار استفاده کنند." + +msgid "Invalid Base85 data will raise :exc:`binascii.Error`." +msgstr "داده‌های نامعتبر Base85 استثنای :exc:`binascii.Error` را پرتاب خواهند کرد." + +msgid "Convert binary data to a line of ASCII characters in Base85 coding. The return value is the converted line." +msgstr "داده‌های دودویی را به یک سطر از نویسه‌های اسکی در کدگذاری Base85 تبدیل می‌کند. مقدار بازگشتی، سطر تبدیل‌شده است." + +msgid "Optional *alphabet* must be a :term:`bytes-like object` of length 85 which specifies an alternative alphabet." +msgstr "پارامتر اختیاری *alphabet* باید یک :term:`شیء شبه‌بایت ` با طول ۸۵ باشد که الفبای جایگزینی را مشخص می‌کند." + +msgid "If *pad* is true, the zero-padding applied to the end of the input is retained in the output, which will always be a multiple of 5 bytes, and thus the length of the data may not be preserved on decoding." +msgstr "اگر *pad* مقدار درست باشد، پدینگ صفر اعمال‌شده به انتهای ورودی در خروجی حفظ می‌شود که همیشه ضریبی از ۵ بایت خواهد بود، و در نتیجه ممکن است طول داده‌ها هنگام کدگشایی حفظ نشود." + +msgid "Convert base32 data back to binary and return the binary data." +msgstr "داده‌های base32 را به داده‌های دودویی تبدیل کرده و داده‌های دودویی را برمی‌گرداند." + +msgid "Valid base32 data contains characters from the base32 alphabet specified in :rfc:`4648` in groups of eight (if necessary, the final group is padded to eight characters with ``=``). Each group encodes 40 bits of binary data in the range from ``0`` to ``2 ** 40 - 1``, inclusive." +msgstr "داده‌های معتبر base32 شامل نویسه‌هایی از الفبای base32 مشخص‌شده در :rfc:`4648` در گروه‌های هشت‌تایی هستند (در صورت نیاز، گروه نهایی با ``=`` تا هشت نویسه پدینگ می‌شود). هر گروه ۴۰ بیت از داده‌های دودویی را در محدوده‌ی ``0`` تا ``2 ** 40 - 1`` (شامل هر دو) کدگذاری می‌کند." + +msgid "This function does not map lowercase characters (which are invalid in standard base32) to their uppercase counterparts, nor does it contextually map ``0`` to ``O`` and ``1`` to ``I``/``L`` as :rfc:`4648` allows." +msgstr "این تابع نویسه‌های حروف کوچک (که در base32 استاندارد نامعتبر هستند) را به معادل‌های حروف بزرگ آن‌ها نگاشت نمی‌کند و همچنین همان‌طور که :rfc:`4648` اجازه می‌دهد، به صورت متنی ``0`` را به ``O`` و ``1`` را به ``I``/``L`` نگاشت نمی‌کند." + +msgid "Optional *alphabet* must be a :class:`bytes` object of length 32 which specifies an alternative alphabet." +msgstr "پارامتر اختیاری *alphabet* باید یک شیء :class:`bytes` با طول ۳۲ باشد که الفبای جایگزینی را مشخص می‌کند." + +msgid "If *padded* is true, the last group of 8 base 32 alphabet characters must be padded with the '=' character. If *padded* is false, the '=' character is treated as other non-alphabet characters (depending on the value of *ignorechars*)." +msgstr "اگر *padded* مقدار درست باشد، آخرین گروه از ۸ نویسه‌ی الفبای base 32 باید با نویسه‌ی '=' پدینگ شود. اگر *padded* مقدار نادرست باشد، نویسه‌ی '=' مانند سایر نویسه‌های غیرالفبایی رفتار می‌شود (بسته به مقدار پارامتر *ignorechars*)." + +msgid "*ignorechars* should be a :term:`bytes-like object` containing characters to ignore from the input. If *ignorechars* contains the pad character ``'='``, the pad characters presented before the end of the encoded data and the excess pad characters will be ignored." +msgstr "پارامتر *ignorechars* باید یک :term:`شیء شبه‌بایت ` حاوی نویسه‌هایی باشد که باید از ورودی نادیده گرفته شوند. اگر *ignorechars* شامل نویسه‌ی پدینگ ``'='`` باشد، نویسه‌های پدینگ ارائه‌شده قبل از انتهای داده‌های کدگذاری‌شده و نویسه‌های پدینگ اضافی نادیده گرفته خواهند شد." + +msgid "If *canonical* is true, non-zero padding bits in the last group are rejected with :exc:`binascii.Error`, enforcing canonical encoding as defined in :rfc:`4648` section 3.5." +msgstr "اگر *canonical* برابر با true باشد، بیت‌های پُرکننده‌ی غیرصفر در آخرین گروه با استثنای :exc:`binascii.Error` رد می‌شوند و کدگذاری کانونیکال را همان‌طور که در بخش ۳.۵ استاندارد :rfc:`4648` تعریف شده است، اعمال می‌کنند." + +msgid "Invalid base32 data will raise :exc:`binascii.Error`." +msgstr "داده‌های نامعتبر base32 باعث ایجاد استثنای :exc:`binascii.Error` می‌شوند." + +msgid "Convert binary data to a line of ASCII characters in base32 coding, as specified in :rfc:`4648`. The return value is the converted line." +msgstr "داده‌های دودویی را به یک سطر از نویسه‌های اسکی در کدگذاری base32 تبدیل می‌کند، همان‌طور که در :rfc:`4648` مشخص شده است. مقدار بازگشتی، سطر تبدیل‌شده است." + +msgid "Optional *alphabet* must be a :term:`bytes-like object` of length 32 which specifies an alternative alphabet." +msgstr "پارامتر اختیاری *alphabet* باید یک :term:`شیء شبه‌بایت ` به طول ۳۲ باشد که الفبای جایگزینی را مشخص می‌کند." + +msgid "If *padded* is true (default), pad the encoded data with the '=' character to a size multiple of 8. If *padded* is false, do not add the pad characters." +msgstr "اگر *padded* برابر با True باشد (پیش‌فرض)، داده‌های کدگذاری‌شده با نویسه‌ی '=' تا ضریبی از اندازه‌ی ۸ پُر می‌شوند. اگر *padded* برابر با False باشد، نویسه‌های پُرکننده اضافه نمی‌شوند." + msgid "Convert a block of quoted-printable data back to binary and return the binary data. More than one line may be passed at a time. If the optional argument *header* is present and true, underscores will be decoded as spaces." msgstr "یک بلوک از داده‌های quoted-printable را دوباره به دودویی تبدیل می‌کند و داده‌های دودویی را برمی‌گرداند. می‌توان بیش از یک خط را در هر نوبت ارسال کرد. اگر آرگومان اختیاری *header* وجود داشته باشد و مقدار آن درست باشد، زیرسطرها به‌عنوان فاصله کدگشایی می‌شوند." @@ -123,12 +244,45 @@ msgstr "داده‌ی دودویی نمایش‌داده‌شده توسط رش msgid "Similar functionality (but more liberal towards whitespace) is also accessible using the :meth:`bytes.fromhex` class method." msgstr "قابلیت مشابهی (اما با سخت‌گیری کمتر نسبت به فضای خالی) نیز از طریق متد کلاسی :meth:`bytes.fromhex` در دسترس است." +msgid "Added the *ignorechars* parameter." +msgstr "پارامتر *ignorechars* اضافه شد." + msgid "Exception raised on errors. These are usually programming errors." msgstr "استثنایی که در صورت بروز خطا پرتاب می‌شود. این موارد معمولاً خطاهای برنامه‌نویسی هستند." msgid "Exception raised on incomplete data. These are usually not programming errors, but may be handled by reading a little more data and trying again." msgstr "استثنایی که هنگام ناقص بودن داده‌ها پرتاب می‌شود. این استثناها معمولاً خطاهای برنامه‌نویسی نیستند، اما ممکن است با خواندن اندکی داده بیشتر و تلاش دوباره مدیریت شوند." +msgid "The Base 64 alphabet according to :rfc:`4648`." +msgstr "الفبای Base 64 بر اساس استاندارد :rfc:`4648`." + +msgid "The \"URL and filename safe\" Base 64 alphabet according to :rfc:`4648`." +msgstr "الفبای Base 64 «امن برای URL و نام پرونده» بر اساس استاندارد :rfc:`4648`." + +msgid "The uuencoding alphabet." +msgstr "الفبای uuencoding." + +msgid "The Base 64 alphabet used in the :manpage:`crypt(3)` routine and in the GEDCOM format." +msgstr "الفبای Base 64 استفاده‌شده در رویه‌ی :manpage:`crypt(3)` و در قالب GEDCOM." + +msgid "The Base 64 alphabet used in BinHex 4 (HQX) within the classic Mac OS." +msgstr "الفبای Base 64 استفاده‌شده در BinHex 4 (HQX) درون مک اواس کلاسیک." + +msgid "The Base85 alphabet." +msgstr "الفبای Base85." + +msgid "The Ascii85 alphabet." +msgstr "الفبای Ascii85." + +msgid "The `Z85 `_ alphabet." +msgstr "الفبای `Z85 `_." + +msgid "The Base 32 alphabet according to :rfc:`4648`." +msgstr "الفبای Base 32 بر اساس استاندارد :rfc:`4648`." + +msgid "The \"Extended Hex\" Base 32 alphabet according to :rfc:`4648`. Data encoded with this alphabet maintains its sort order during bitwise comparisons." +msgstr "الفبای پایه‌ی ۳۲ «شانزده‌تایی توسعه‌یافته» (Extended Hex) مطابق با :rfc:`4648`. داده‌های کدگذاری‌شده با این الفبا ترتیب خود را در طول مقایسه‌های بیتی حفظ می‌کنند." + msgid "Module :mod:`base64`" msgstr "ماژول :mod:`base64`" diff --git a/library/calendar.po b/library/calendar.po index 8c20d999..d65612c3 100644 --- a/library/calendar.po +++ b/library/calendar.po @@ -7,12 +7,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 07:47+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -104,6 +105,9 @@ msgstr "این کلاس می‌تواند برای تولید گاه‌شمار msgid ":class:`TextCalendar` instances have the following methods:" msgstr "نمونه‌های :class:`TextCalendar` متدهای زیر را دارند:" +msgid "Print a week's calendar as returned by :meth:`formatweek` and without a final newline." +msgstr "گاه‌شماری یک هفته را همان‌طور که :meth:`formatweek` برمی‌گرداند و بدون خط جدید پایانی چاپ می‌کند." + msgid "Return a string representing a single day formatted with the given *width*. If *theday* is ``0``, return a string of spaces of the specified width, representing an empty day. The *weekday* parameter is unused." msgstr "رشته‌ای را برمی‌گرداند که نمایانگر یک روز واحد است و با *width* داده‌شده قالب‌بندی شده است. اگر *theday* برابر ``0`` باشد، رشته‌ای از فاصله‌ها با عرض مشخص‌شده برمی‌گرداند که نمایانگر یک روز خالی است. پارامتر *weekday* استفاده نمی‌شود." @@ -143,8 +147,8 @@ msgstr "گاه‌شماری یک ماه را به‌صورت یک جدول HTML msgid "Return a year's calendar as an HTML table. *width* (defaulting to 3) specifies the number of months per row." msgstr "گاه‌شماری یک سال را به‌صورت یک جدول HTML برمی‌گرداند. *width* (با پیش‌فرض ۳) تعداد ماه‌ها در هر ردیف را مشخص می‌کند." -msgid "Return a year's calendar as a complete HTML page. *width* (defaulting to 3) specifies the number of months per row. *css* is the name for the cascading style sheet to be used. :const:`None` can be passed if no style sheet should be used. *encoding* specifies the encoding to be used for the output (defaulting to the system default encoding)." -msgstr "گاه‌شماری یک سال را به‌عنوان یک صفحه HTML کامل بازمی‌گرداند. *width* (که پیش‌فرض آن ۳ است) تعداد ماه‌ها در هر ردیف را مشخص می‌کند. *css* نام شیوه‌نامه آبشاری مورد استفاده است. اگر نباید از شیوه‌نامه استفاده شود، می‌توان :const:`None` را ارسال کرد. *encoding* کدگذاری مورد استفاده برای خروجی را مشخص می‌کند (که پیش‌فرض آن کدگذاری پیش‌فرض سیستم است)." +msgid "Return a year's calendar as a complete HTML page. *width* (defaulting to 3) specifies the number of months per row. *css* is the name for the cascading style sheet to be used. :const:`None` can be passed if no style sheet should be used. *encoding* specifies the encoding to be used for the output (defaulting to ``'utf-8'``)." +msgstr "گاه‌شماری یک سال را به صورت یک صفحه‌ی کامل HTML برمی‌گرداند. پارامتر *width* (که پیش‌فرض آن ۳ است) تعداد ماه‌ها در هر ردیف را مشخص می‌کند. *css* نام شیوه¬نامه‌ی آبشاری (style sheet) مورد استفاده است. اگر قرار نباشد از هیچ شیوه¬نامه‌ای استفاده شود، می‌توان :const:`None` را ارسال کرد. پارامتر *encoding* کدگذاری مورد استفاده برای خروجی را مشخص می‌کند (پیش‌فرض آن ``'utf-8'`` است)." msgid "Return a month name as an HTML table row. If *withyear* is true the year will be included in the row, otherwise just the month name will be used." msgstr "نام یک ماه را به‌عنوان یک ردیف جدول HTML برمی‌گرداند. اگر *withyear* درست باشد، سال در ردیف گنجانده خواهد شد، در غیر این صورت فقط از نام ماه استفاده خواهد شد." @@ -288,9 +292,21 @@ msgstr "شمارشی که روزهای هفته را به‌عنوان ثابت msgid "A sequence that represents the months of the year in the current locale. This follows normal convention of January being month number 1, so it has a length of 13 and ``month_name[0]`` is the empty string." msgstr "یک دنباله که ماه‌های سال را در locale فعلی نشان می‌دهد. این دنباله از قرارداد معمول پیروی می‌کند که بر اساس آن ژانویه ماه شماره‌ی ۱ است، بنابراین طول آن ۱۳ است و ``month_name[0]`` رشته‌ی خالی است." +msgid "In locales with alternative month names forms, the :data:`!month_name` sequence may not be suitable when a month name stands by itself and not as part of a date. For instance, in Greek and in many Slavic and Baltic languages, :data:`!month_name` will produce the month in genitive case. Use :data:`standalone_month_name` for a form suitable for standalone use." +msgstr "در localeهایی با شکل‌های جایگزین برای نام ماه‌ها، ممکن است دنباله‌ی :data:`!month_name` زمانی که نام ماه به‌تنهایی و نه به عنوان بخشی از یک تاریخ می‌آید، مناسب نباشد. برای نمونه، در زبان یونانی و بسیاری از زبان‌های اسلاو و بالتیک، :data:`!month_name` ماه را در حالت مضاف‌الیه تولید می‌کند. از :data:`standalone_month_name` برای شکلی استفاده کنید که برای استفاده‌ی مستقل مناسب است." + msgid "A sequence that represents the abbreviated months of the year in the current locale. This follows normal convention of January being month number 1, so it has a length of 13 and ``month_abbr[0]`` is the empty string." msgstr "دنباله‌ای که نام‌های مخفف ماه‌های سال را در locale فعلی نشان می‌دهد. این از قرارداد معمول پیروی می‌کند که ژانویه ماه شماره‌ی ۱ است، بنابراین طول آن ۱۳ است و ``month_abbr[0]`` رشته‌ی خالی است." +msgid "In locales with alternative month names forms, the :data:`!month_abbr` sequence may not be suitable when a month name stands by itself and not as part of a date. Use :data:`standalone_month_abbr` for a form suitable for standalone use." +msgstr "در localeهایی با شکل‌های جایگزین برای نام ماه‌ها، ممکن است دنباله‌ی :data:`!month_abbr` زمانی که نام ماه به‌تنهایی و نه به عنوان بخشی از یک تاریخ می‌آید، مناسب نباشد. از :data:`standalone_month_abbr` برای شکلی استفاده کنید که برای استفاده‌ی مستقل مناسب است." + +msgid "A sequence that represents the months of the year in the current locale in the standalone form if the locale provides one. Else it is equivalent to :data:`month_name`." +msgstr "دنباله‌ای که ماه‌های سال را در locale فعلی به صورت مستقل (standalone) نشان می‌دهد، اگر locale چنین فرمی را فراهم کند. در غیر این صورت معادل :data:`month_name` است." + +msgid "A sequence that represents the abbreviated months of the year in the current locale in the standalone form if the locale provides one. Else it is equivalent to :data:`month_abbr`." +msgstr "دنباله‌ای که ماه‌های مخفف سال را در locale فعلی به صورت مستقل (standalone) نشان می‌دهد، اگر locale چنین فرمی را فراهم کند. در غیر این صورت معادل :data:`month_abbr` است." + msgid "Aliases for the months of the year, where ``JANUARY`` is ``1`` and ``DECEMBER`` is ``12``." msgstr "نام‌های مستعار برای ماه‌های سال، که در آن‌ها ``JANUARY`` برابر ``1`` و ``DECEMBER`` برابر ``12`` است." @@ -443,8 +459,8 @@ msgstr "روز هفته برای شروع هر هفته. باید عددی بی msgid "The year to print the calendar for. Defaults to the current year." msgstr "سالی که گاه‌شماری برای آن چاپ می‌شود. پیش‌فرض آن سال جاری است." -msgid "The month of the specified :option:`year` to print the calendar for. Must be a number between 1 and 12, and may only be used in text mode. Defaults to printing a calendar for the full year." -msgstr "ماه از :option:`year` مشخص‌شده برای چاپ گاه‌شماری. باید عددی بین ۱ تا ۱۲ باشد و فقط می‌تواند در حالت متنی استفاده شود. به‌طور پیش‌فرض، گاه‌شماریی برای تمام سال چاپ می‌شود." +msgid "The month of the specified :option:`year` to print the calendar for. Must be a number between 1 and 12. Defaults to printing a calendar for the full year." +msgstr "ماه از :option:`year` مشخص‌شده برای چاپ گاه‌شماری. باید عددی بین ۱ تا ۱۲ باشد. پیش‌فرض آن چاپ گاه‌شماری برای کل سال است." msgid "*Text-mode options:*" msgstr "*گزینه‌های حالت متنی:*" @@ -464,6 +480,9 @@ msgstr "تعداد ماه‌های چاپ‌شده در هر ردیف. مقدا msgid "By default, today's date is highlighted in color and can be :ref:`controlled using environment variables `." msgstr "به‌طور پیش‌فرض، تاریخ امروز با رنگ برجسته می‌شود و می‌توان آن را :ref:`با استفاده از متغیرهای محیطی کنترل کرد `." +msgid "By default, the month is now also highlighted in color, and the days of the week are also in color. This behavior can be :ref:`controlled using environment variables `." +msgstr "به طور پیش‌فرض، ماه اکنون با رنگ برجسته می‌شود و روزهای هفته نیز رنگی هستند. این رفتار را می‌توان :ref:`با استفاده از متغیرهای محیطی کنترل کرد `." + msgid "*HTML-mode options:*" msgstr "*گزینه‌های حالت HTML:*" diff --git a/library/cmdline.po b/library/cmdline.po index 34cca272..daae2bd2 100644 --- a/library/cmdline.po +++ b/library/cmdline.po @@ -6,12 +6,13 @@ # Translators: # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-26 03:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2023-10-13 14:16+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -45,8 +46,8 @@ msgstr ":mod:`code`" msgid ":ref:`compileall `" msgstr ":ref:`compileall `" -msgid ":mod:`cProfile`: see :ref:`profile `" -msgstr ":mod:`cProfile`: :ref:`profile ` را ببینید" +msgid "``cProfile``: see :ref:`profiling.tracing `" +msgstr "``cProfile``: رجوع کنید به :ref:`profiling.tracing `" msgid ":ref:`dis `" msgstr ":ref:`dis `" @@ -102,11 +103,14 @@ msgstr ":ref:`platform `" msgid ":mod:`poplib`" msgstr ":mod:`poplib`" -msgid ":ref:`profile `" -msgstr ":ref:`profile `" +msgid ":ref:`profiling.sampling `" +msgstr ":ref:`profiling.sampling `" -msgid ":mod:`pstats`" -msgstr ":mod:`pstats`" +msgid ":ref:`profiling.tracing `" +msgstr ":ref:`profiling.tracing `" + +msgid ":ref:`pstats `" +msgstr ":ref:`pstats `" msgid ":ref:`py_compile `" msgstr ":ref:`py_compile `" @@ -179,3 +183,6 @@ msgstr ":ref:`zipfile `" msgid "See also the :ref:`Python command-line interface `." msgstr "همچنین :ref:`رابط خط فرمان پایتون ` را ببینید." + +#~ msgid ":mod:`pstats`" +#~ msgstr ":mod:`pstats`" diff --git a/library/code.po b/library/code.po index 8ea65026..9c197dca 100644 --- a/library/code.po +++ b/library/code.po @@ -6,12 +6,13 @@ # Translators: # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-24 04:09+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-24 07:53+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -64,8 +65,8 @@ msgstr "اشیای مفسر تعاملی" 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 "مقداری کد منبع را در مفسر کامپایل و اجرا می‌کند. آرگومان‌ها همان آرگومان‌های :func:`compile_command` هستند؛ پیش‌فرض برای *filename* برابر ``''`` و برای *symbol* برابر ``'single'`` است. یکی از چند حالت ممکن است رخ دهد:" -msgid "The input is incorrect; :func:`compile_command` raised an exception (usually :exc:`SyntaxError`). A syntax traceback will be printed by calling the :meth:`showsyntaxerror` method. :meth:`runsource` returns ``False``." -msgstr "ورودی نادرست است؛ :func:`compile_command` استثنایی پرتاب کرد (معمولا :exc:`SyntaxError`). با فراخوانی متد :meth:`showsyntaxerror`، یک ردگیری سینتکسی چاپ خواهد شد. :meth:`runsource` مقدار ``False`` را بازمی‌گرداند." +msgid "The input is incorrect; :func:`compile_command` raised an exception (:exc:`SyntaxError` or :exc:`OverflowError`). A syntax traceback will be printed by calling the :meth:`showsyntaxerror` method. :meth:`runsource` returns ``False``." +msgstr "ورودی نادرست است؛ :func:`compile_command` یک استثنا (:exc:`SyntaxError` یا :exc:`OverflowError`) را بالا آورد. یک ردگیری نحوی با فراخوانی متد :meth:`showsyntaxerror` چاپ خواهد شد. :meth:`runsource` مقدار ``False`` را برمی‌گرداند." msgid "The input is incomplete, and more input is required; :func:`compile_command` returned ``None``. :meth:`runsource` returns ``True``." msgstr "ورودی ناقص است و به ورودی بیشتری نیاز است؛ :func:`compile_command` ``None`` را برگرداند. :meth:`runsource` ``True`` را برمی‌گرداند." diff --git a/library/codecs.po b/library/codecs.po index fd6bcd4f..6e457d41 100644 --- a/library/codecs.po +++ b/library/codecs.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 07:00+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -56,8 +57,14 @@ msgstr "همچنین می‌توانید جزئیات کامل هر کدک را msgid "Looks up the codec info in the Python codec registry and returns a :class:`CodecInfo` object as defined below." msgstr "اطلاعات کدک را در رجیستری کدک‌های پایتون جستجو می‌کند و یک شیء :class:`CodecInfo` را که در زیر تعریف شده است برمی‌گرداند." -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` object is found, a :exc:`LookupError` is raised. Otherwise, the :class:`CodecInfo` object is stored in the cache and returned to the caller." -msgstr "کدگذاری‌ها ابتدا در نهانگاه رجیستری جستجو می‌شوند. اگر یافت نشوند، فهرست توابع جستجوی ثبت‌شده پویش می‌شود. اگر شیء :class:`CodecInfo` یافت نشود، :exc:`LookupError` پرتاب می‌شود. در غیر این صورت، شیء :class:`CodecInfo` در نهانگاه ذخیره می‌شود و به فراخواننده برگردانده می‌شود." +msgid "This function first normalizes the *encoding*: all ASCII letters are converted to lower case, spaces are replaced with hyphens. Then encoding is looked up in the registry's cache. If not found, the list of registered search functions is scanned. If no :class:`CodecInfo` object is found, a :exc:`LookupError` is raised. Otherwise, the :class:`CodecInfo` object is stored in the cache and returned to the caller." +msgstr "این تابع ابتدا *کدگذاری* (encoding) را عادی‌سازی می‌کند: تمام حروف اسکی به حروف کوچک تبدیل می‌شوند، و فاصله‌ها با خط تیره جایگزین می‌شوند. سپس کدگذاری در نهانگاه رجیستری جستجو می‌شود. اگر پیدا نشود، فهرست عملکردهای جستجوی ثبت‌شده بررسی می‌شود. اگر هیچ شیء :class:`CodecInfo` پیدا نشود، یک استثنای :exc:`LookupError` بالا آورده می‌شود. در غیر این صورت، شیء :class:`CodecInfo` در نهانگاه ذخیره شده و به فراخواننده برگردانده می‌شود." + +msgid "Any characters except ASCII letters and digits and a dot are converted to underscore." +msgstr "هر نویسه‌ای به جز حروف و ارقام اسکی و یک نقطه، به زیرخط تبدیل می‌شود." + +msgid "No characters are converted to underscore anymore. Spaces are converted to hyphens." +msgstr "دیگر هیچ نویسه‌ای به زیرخط تبدیل نمی‌شود. فاصله‌ها به خط تیره تبدیل می‌شوند." msgid "Codec details when looking up the codec registry. The constructor arguments are stored in attributes of the same name:" msgstr "جزئیات کدک هنگام جستجو در رجیستری کدک (codec registry). آرگومان‌های سازنده در ویژگی‌های هم‌نام ذخیره می‌شوند:" @@ -107,11 +114,8 @@ msgstr "کدک مربوط به کدگذاری داده‌شده را جستجو msgid "Custom codecs are made available by registering a suitable codec search function:" msgstr "کدک‌های سفارشی با ثبت یک تابع جستجوی کدک مناسب در دسترس قرار می‌گیرند:" -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 spaces converted to underscores, and return a :class:`CodecInfo` object. In case a search function cannot find a given encoding, it should return ``None``." -msgstr "یک تابع جست‌وجوی کدک ثبت کنید. انتظار می‌رود توابع جست‌وجو یک آرگومان دریافت کنند و یک شیء :class:`CodecInfo` برگردانند؛ این آرگومان نام کدگذاری است که تماماً با حروف کوچک بوده و سطرهای تیره و فاصله‌های آن به زیرخط تبدیل شده‌اند. در صورتی که یک تابع جست‌وجو نتواند کدگذاری داده‌شده را پیدا کند، باید ``None`` برگرداند." - -msgid "Hyphens and spaces are converted to underscore." -msgstr "خط‌تیره‌ها و فاصله‌ها به زیرخط تبدیل می‌شوند." +msgid "Register a codec search function. Search functions are expected to take one argument, being the encoding name in all lower case letters with spaces converted to hyphens, and return a :class:`CodecInfo` object. In case a search function cannot find a given encoding, it should return ``None``." +msgstr "یک تابع جستجوی کُدک را ثبت کنید. انتظار می‌رود توابع جستجو یک آرگومان بپذیرند که نام کدگذاری با تمام حروف کوچک و با فاصله‌های جایگزین‌شده با خط تیره است، و یک شیء :class:`CodecInfo` را برگردانند. در صورتی که یک تابع جستجو نتواند کدگذاری داده‌شده را پیدا کند، باید ``None`` را برگرداند." msgid "Unregister a codec search function and clear the registry's cache. If the search function is not registered, do nothing." msgstr "یک تابع جست‌وجوی کدک را از ثبت خارج می‌کند و نهانگاه رجیستری را پاک می‌کند. اگر تابع جست‌وجو ثبت‌نشده باشد، کاری انجام نمی‌دهد." @@ -660,14 +664,14 @@ msgstr "در iso-8859-1)، این موضوع احتمال اینکه کدگذا msgid "Standard Encodings" msgstr "کدگذاری‌های استاندارد" -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 the codecs by name, together with a few common aliases, and the languages for which the encoding is likely used. Neither the list of aliases nor the list of languages is meant to be exhaustive. Notice that spelling alternatives that only differ in case or use a hyphen instead of an underscore are also valid aliases because they are equivalent when normalized by :func:`~encodings.normalize_encoding`. For example, ``'utf-8'`` is a valid alias for the ``'utf_8'`` codec." -msgstr "پایتون همراه با تعدادی کدک توکار است که یا به‌صورت توابع C یا با استفاده از دیکشنری‌ها به‌عنوان جداول نگاشت پیاده‌سازی شده‌اند. جدول زیر کدک‌ها را بر اساس نام، به‌همراه چند نام مستعار رایج و زبان‌هایی که احتمالاً کدگذاری برای آن‌ها استفاده می‌شود، فهرست می‌کند. هیچ‌یک از فهرست نام‌های مستعار و فهرست زبان‌ها برای جامع بودن در نظر گرفته نشده است. توجه داشته باشید که نوشتارهای جایگزینی که فقط از نظر بزرگی یا کوچکی حروف تفاوت دارند یا به‌جای زیرخط از خط تیره استفاده می‌کنند نیز نام‌های مستعار معتبر هستند، زیرا وقتی با :func:`~encodings.normalize_encoding` نرمال‌سازی شوند، معادل یکدیگر هستند. برای مثال، ``'utf-8'`` یک نام مستعار معتبر برای کدک ``'utf_8'`` است." +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 the codecs by name, together with a few common aliases, and the languages for which the encoding is likely used. Neither the list of aliases nor the list of languages is meant to be exhaustive. Notice that spelling alternatives that only differ in case or use a space or a hyphen instead of an underscore are also valid aliases because they are equivalent when normalized by :func:`~encodings.normalize_encoding`. For example, ``'utf-8'`` is a valid alias for the ``'utf_8'`` codec." +msgstr "پایتون تعدادی کُدک توکار ارائه می‌دهد که یا به صورت توابع C پیاده‌سازی شده‌اند یا با دیکشنری‌ها به عنوان جدول‌های نگاشت. جدول زیر کُدک‌ها را به همراه نام، تعداد کمی نام مستعار رایج، و زبان‌هایی که احتمالاً کدگذاری برای آن‌ها استفاده می‌شود، فهرست می‌کند. نه فهرست نام‌های مستعار و نه فهرست زبان‌ها جامع نیستند. توجه داشته باشید که جایگزین‌های املایی که فقط در کوچک و بزرگ بودن حروف تفاوت دارند یا به جای زیرخط از فاصله یا خط تیره استفاده می‌کنند نیز نام‌های مستعار معتبری هستند؛ زیرا هنگام عادی‌سازی توسط :func:`~encodings.normalize_encoding` معادل در نظر گرفته می‌شوند. برای مثال، ``'utf-8'`` یک نام مستعار معتبر برای کُدک ``'utf_8'`` است." msgid "The below table lists the most common aliases, for a complete list refer to the source :source:`aliases.py ` file." msgstr "جدول زیر رایج‌ترین نام‌های مستعار را فهرست می‌کند، برای فهرست کامل به پرونده منبع :source:`aliases.py ` مراجعه کنید." -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 "در ویندوز، کدک‌های ``cpXXX`` برای تمام صفحه‌های کد در دسترس هستند. اما تضمین می‌شود که تنها کدک‌های فهرست‌شده در جدول زیر در سایر پلتفرم‌ها وجود داشته باشند." +msgid "On Windows, ``cpXXX`` codecs are available for all code pages. But only codecs listed in the following table are guaranteed to exist on other platforms." +msgstr "در ویندوز، کُدک‌های ``cpXXX`` برای تمام صفحات کد در دسترس هستند. اما فقط کُدک‌هایی که در جدول زیر فهرست شده‌اند تضمین می‌شوند که در سایر پلتفرم‌ها وجود داشته باشند." msgid "Some common encodings can bypass the codecs lookup machinery to improve performance. These optimization opportunities are only recognized by CPython for a limited set of (case insensitive) aliases: utf-8, utf8, latin-1, latin1, iso-8859-1, iso8859-1, mbcs (Windows only), ascii, us-ascii, utf-16, utf16, utf-32, utf32, and the same using underscores instead of dashes. Using alternative aliases for these encodings may result in slower execution." msgstr "برخی کدگذاری‌های رایج می‌توانند برای بهبود کارایی، سازوکار جست‌وجوی کدک‌ها را دور بزنند. این فرصت‌های بهینه‌سازی تنها برای مجموعه‌ای محدود از نام‌های مستعار (غیرحساس به بزرگی و کوچکی حروف) توسط CPython شناسایی می‌شوند: utf-8، utf8، latin-1، latin1، iso-8859-1، iso8859-1، mbcs (فقط ویندوز)، ascii، us-ascii، utf-16، utf16، utf-32، utf32، و همان موارد با استفاده از زیرسطرها به‌جای سطرهای تیره. استفاده از نام‌های مستعار جایگزین برای این کدگذاری‌ها ممکن است باعث اجرای کندتر شود." @@ -1353,6 +1357,9 @@ msgstr "U8, UTF, utf8, cp65001" msgid "utf_8_sig" msgstr "utf_8_sig" +msgid "utf8-sig" +msgstr "utf8-sig" + 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 "کدگذارهای utf-16\\* و utf-32\\* دیگر اجازه نمی‌دهند نقاط کد جانشین (``U+D800``--``U+DFFF``) کدگذاری شوند. کدگشاهای utf-32\\* دیگر دنباله‌های بایتی متناظر با نقاط کد جانشین (surrogate code points) را کدگشایی نمی‌کنند." diff --git a/library/collections.po b/library/collections.po index 3af13bfd..9b75f3dc 100644 --- a/library/collections.po +++ b/library/collections.po @@ -7,13 +7,14 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" -"PO-Revision-Date: 2026-09-14 10:44+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 20:27+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/fa/)\n" "Language: fa\n" @@ -371,8 +372,8 @@ msgstr "عناصر از یک *پیمایش‌پذیر* یا از یک *نگاش msgid "Compute the sum of the counts." msgstr "مجموع شمارش‌ها را محاسبه کنید." -msgid "The usual dictionary methods are available for :class:`Counter` objects except for two which work differently for counters." -msgstr "متدهای معمول دیکشنری برای اشیای :class:`Counter` در دسترس هستند، به‌جز دو مورد که برای شمارنده‌ها متفاوت عمل می‌کنند." +msgid "The usual dictionary methods are available for :class:`Counter` objects except for these two which work differently for counters:" +msgstr "متدهای معمولی دیکشنری برای اشیای :class:`Counter` در دسترس هستند، به جز این دو مورد که برای شمارنده‌ها به شکل متفاوتی کار می‌کنند:" msgid "This class method is not implemented for :class:`Counter` objects." msgstr "این متد کلاس برای اشیای :class:`Counter` پیاده‌سازی نشده است." @@ -413,8 +414,8 @@ msgstr "" "c.most_common()[:-n-1:-1] # n least common elements\n" "+c # remove zero and negative counts" -msgid "Several mathematical operations are provided for combining :class:`Counter` objects to produce multisets (counters that have counts greater than zero). Addition and subtraction combine counters by adding or subtracting the counts of corresponding elements. Intersection and union return the minimum and maximum of corresponding counts. Equality and inclusion compare corresponding counts. Each operation can accept inputs with signed counts, but the output will exclude results with counts of zero or less." -msgstr "چند عملیات ریاضی برای ترکیب اشیای :class:`Counter` و تولید چندمجموعه‌ها (شمارنده‌هایی که شمارش‌های بزرگ‌تر از صفر دارند) ارائه شده است. جمع و تفریق، شمارنده‌ها را با افزودن یا کم کردن شمارش‌های عناصر متناظر ترکیب می‌کنند. اشتراک و اجتماع، کمینه و بیشینه‌ی شمارش‌های متناظر را برمی‌گردانند. برابری و شمول، شمارش‌های متناظر را مقایسه می‌کنند. هر عملیات می‌تواند ورودی‌هایی با شمارش‌های علامت‌دار بپذیرد، اما خروجی، نتایجی را که شمارش آن‌ها صفر یا کمتر است شامل نمی‌شود." +msgid "Several mathematical operations are provided for combining :class:`Counter` objects to produce multisets (counters that have counts greater than zero). Addition and subtraction combine counters by adding or subtracting the counts of corresponding elements. Intersection and union return the minimum and maximum of corresponding counts. Symmetric difference returns the difference between the maximum and minimum of the corresponding counts. Equality and inclusion compare corresponding counts. Each operation can accept inputs with signed counts, but the output will exclude results with counts of zero or below." +msgstr "چندین عملیات ریاضی برای ترکیب اشیای :class:`Counter` جهت تولید چندمجموعه‌ها (شمارنده‌هایی که تعدادشان بیشتر از صفر است) ارائه شده است. جمع و تفریق، شمارنده‌ها را با اضافه کردن یا کم کردن تعداد عناصر متناظر ترکیب می‌کنند. اشتراک و اجتماع، حداقل و حداکثر تعدادهای متناظر را برمی‌گردانند. تفاضل تقارنی، اختلاف بین حداکثر و حداقل تعدادهای متناظر را برمی‌گرداند. برابری و شمول، تعدادهای متناظر را مقایسه می‌کنند. هر عملیات می‌تواند ورودی‌هایی با تعدادهای علامت‌دار بپذیرد، اما خروجی نتایج با تعدادهای صفر یا کمتر را حذف خواهد کرد." msgid "" ">>> c = Counter(a=3, b=1)\n" @@ -427,6 +428,8 @@ msgid "" "Counter({'a': 1, 'b': 1})\n" ">>> c | d # union: max(c[x], d[x])\n" "Counter({'a': 3, 'b': 2})\n" +">>> c ^ d # max(c[x], d[x]) - min(c[x], d[x])\n" +"Counter({'a': 2, 'b': 1})\n" ">>> c == d # equality: c[x] == d[x]\n" "False\n" ">>> c <= d # inclusion: c[x] <= d[x]\n" @@ -442,6 +445,8 @@ msgstr "" "Counter({'a': 1, 'b': 1})\n" ">>> c | d # union: max(c[x], d[x])\n" "Counter({'a': 3, 'b': 2})\n" +">>> c ^ d # max(c[x], d[x]) - min(c[x], d[x])\n" +"Counter({'a': 2, 'b': 1})\n" ">>> c == d # equality: c[x] == d[x]\n" "False\n" ">>> c <= d # inclusion: c[x] <= d[x]\n" @@ -453,6 +458,9 @@ msgstr "جمع و تفریق یک‌عملوندی، میان‌برهایی ب msgid "Added support for unary plus, unary minus, and in-place multiset operations." msgstr "پشتیبانی از عملگرهای یک‌عملوندی مثبت و منفی و عملیات‌های چندمجموعه‌ای درجا افزوده شد." +msgid "Added support for the symmetric difference multiset operation, ``c ^ d``." +msgstr "پشتیبانی از عملیات چندمجموعه‌ای تفاضل تقارنی، یعنی ``c ^ d`` اضافه شد." + msgid "Counters were primarily designed to work with positive integers to represent running counts; however, care was taken to not unnecessarily preclude use cases needing other types or negative values. To help with those use cases, this section documents the minimum range and type restrictions." msgstr "شمارنده‌ها عمدتاً برای کار با اعداد صحیح مثبت به منظور نمایش شمارش‌های جاری طراحی شده‌اند؛ با این حال، دقت شده است که به‌طور غیرضروری از موارد استفاده‌ای که نیازمند انواع دیگر یا مقادیر منفی هستند جلوگیری نشود. برای کمک به این موارد استفاده، این بخش حداقل دامنه و محدودیت‌های نوع را مستند می‌کند." @@ -1186,14 +1194,14 @@ msgstr "ایجاد گونه‌ای از دیکشنری مرتب که ترتیب msgid "" "class LastUpdatedOrderedDict(OrderedDict):\n" -" 'Store items in the order the keys were last added'\n" +" 'Store items in the order that the keys were last updated.'\n" "\n" " def __setitem__(self, key, value):\n" " super().__setitem__(key, value)\n" " self.move_to_end(key)" msgstr "" "class LastUpdatedOrderedDict(OrderedDict):\n" -" 'Store items in the order the keys were last added'\n" +" 'Store items in the order that the keys were last updated.'\n" "\n" " def __setitem__(self, key, value):\n" " super().__setitem__(key, value)\n" @@ -1335,6 +1343,12 @@ msgstr "علاوه بر پشتیبانی از متدها و عملیات نگا msgid "A real dictionary used to store the contents of the :class:`UserDict` class." msgstr "یک دیکشنری واقعی که برای ذخیره‌ی محتویات کلاس :class:`UserDict` استفاده می‌شود." +msgid ":class:`!UserDict` instances also override the following method:" +msgstr "نمونه‌های :class:`!UserDict` همچنین متد زیر را بازنویسی می‌کنند:" + +msgid "Remove and return a ``(key, value)`` pair from the wrapped dictionary. Pairs are returned in the same order as ``data.popitem()``. (For the default :meth:`dict.popitem`, this order is :abbr:`LIFO (last-in, first-out)`.) If the dictionary is empty, raises a :exc:`KeyError`." +msgstr "یک جفت ``(key, value)`` را از دیکشنری بسته‌بندی‌شده حذف کرده و برمی‌گرداند. جفت‌ها به همان ترتیبی که ``data.popitem()`` برمی‌گرداند، بازگردانده می‌شوند. (برای :meth:`dict.popitem` پیش‌فرض، این ترتیب به صورت :abbr:`LIFO (last-in, first-out)` است.) اگر دیکشنری خالی باشد، استثنای :exc:`KeyError` را بالا می‌آورد." + msgid ":class:`UserList` objects" msgstr "اشیاء :class:`UserList`" diff --git a/library/compression.zstd.po b/library/compression.zstd.po index ac4e7ad6..44e3ab27 100644 --- a/library/compression.zstd.po +++ b/library/compression.zstd.po @@ -5,12 +5,13 @@ # # Translators: # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 12:11+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: none\n" @@ -197,8 +198,17 @@ msgstr "این کلاس، برخلاف تابع :func:`decompress` و کلاس : msgid "Decompress *data* (a :term:`bytes-like object`), returning uncompressed data as bytes. Some of *data* may be buffered internally, for use in later calls to :meth:`!decompress`. The returned data should be concatenated with the output of any previous calls to :meth:`!decompress`." msgstr "*data* (یک :term:`شیء شبه‌بایت `) را واگشایی می‌کند و داده‌ی فشرده‌نشده را به‌صورت بایت برمی‌گرداند. ممکن است بخشی از *data* به‌صورت داخلی در حافظه‌ی موقت ذخیره شود تا در فراخوانی‌های بعدی :meth:`!decompress` استفاده شود. داده‌ی برگردانده‌شده باید با خروجی هر یک از فراخوانی‌های قبلی :meth:`!decompress` الحاق شود." -msgid "If *max_length* is non-negative, the method returns at most *max_length* bytes of decompressed data. If this limit is reached and further output can be produced, the :attr:`~.needs_input` attribute will be set to ``False``. In this case, the next call to :meth:`~.decompress` may provide *data* as ``b''`` to obtain more of the output." -msgstr "اگر *max_length* نامنفی باشد، این متد حداکثر *max_length* بایت از داده‌ی خارج‌شده از حالت فشرده را برمی‌گرداند. اگر این حد حاصل شود و امکان تولید خروجی بیشتر وجود داشته باشد، ویژگی :attr:`~.needs_input` روی ``False`` تنظیم می‌شود. در این حالت، در فراخوانی بعدی :meth:`~.decompress` می‌توان *data* را به‌صورت ``b''`` ارائه کرد تا بخش بیشتری از خروجی به دست آید." +msgid "If *max_length* is non-negative, the method returns at most *max_length* bytes of decompressed data. If this limit is reached and further output can be produced (or EOF is reached), the :attr:`~.needs_input` attribute will be set to ``False``. In this case, the next call to :meth:`~.decompress` may provide *data* as ``b''`` to obtain more of the output. The full content can thus be read like::" +msgstr "اگر *max_length* غیرمنفی باشد، متد حد اکثر *max_length* بایت از داده‌های رمزگشایی‌شده را برمی‌گرداند. اگر این محدودیت به دست آمد و خروجی‌های بیشتری می‌توانند تولید شوند (یا EOF به دست آمد)، ویژگی :attr:`~.needs_input` روی ``False`` تنظیم خواهد شد. در این حالت، فراخوانی بعدی به :meth:`~.decompress` ممکن است *data* را به عنوان ``b''`` فراهم کند تا خروجی بیشتری به دست آید. محتوای کامل را می‌توان بدین صورت خواند::" + +msgid "" +"process_output(d.decompress(data, max_length))\n" +"while not d.eof and not d.needs_input:\n" +" process_output(d.decompress(b\"\", max_length))" +msgstr "" +"process_output(d.decompress(data, max_length))\n" +"while not d.eof and not d.needs_input:\n" +" process_output(d.decompress(b\"\", max_length))" msgid "If all of the input data was decompressed and returned (either because this was less than *max_length* bytes, or because *max_length* was negative), the :attr:`~.needs_input` attribute will be set to ``True``." msgstr "اگر تمام داده‌های ورودی واگشایی و برگردانده شده باشند (خواه به این دلیل که کمتر از *max_length* بایت بودند، خواه به این دلیل که *max_length* منفی بود)، ویژگی :attr:`~.needs_input` روی ``True`` تنظیم خواهد شد." diff --git a/library/configparser.po b/library/configparser.po index 1b22ca8c..06b88d08 100644 --- a/library/configparser.po +++ b/library/configparser.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 08:40+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -35,6 +36,9 @@ msgstr "این ماژول، کلاس :class:`ConfigParser` را ارائه می msgid "This library does *not* interpret or write the value-type prefixes used in the Windows Registry extended version of INI syntax." msgstr "این کتابخانه پیشوندهای نوع مقدار استفاده‌شده در نسخه گسترش‌یافته سینتکس INI در Windows Registry را تفسیر یا نوشتن *نمی‌کند*." +msgid "Be cautious when parsing data from untrusted sources. A malicious INI file may cause the decoder to consume considerable CPU and memory resources. Limiting the size of data to be parsed is recommended." +msgstr "هنگام تجزیه‌ی داده‌ها از منابع نامطمئن مراقب باشید. یک پرونده‌ی INI مخرب ممکن است باعث شود رمزگشا منابع پردازنده و حافظه‌ی قابل‌توجهی را مصرف کند. محدود کردن حجم داده‌هایی که باید تجزیه شوند توصیه می‌شود." + msgid "Module :mod:`tomllib`" msgstr "ماژول :mod:`tomllib`" diff --git a/library/contextlib.po b/library/contextlib.po index 1332e89e..39b4a090 100644 --- a/library/contextlib.po +++ b/library/contextlib.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 10:22+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -408,11 +409,11 @@ msgstr "اگر کد درون بلوک :keyword:`!with` یک :exc:`BaseExceptionG msgid "``suppress`` now supports suppressing exceptions raised as part of a :exc:`BaseExceptionGroup`." msgstr "``suppress`` اکنون از مهار استثناهایی که به‌عنوان بخشی از یک :exc:`BaseExceptionGroup` پرتاب می‌شوند، پشتیبانی می‌کند." -msgid "Context manager for temporarily redirecting :data:`sys.stdout` to another file or file-like object." -msgstr "مدیر زمینه برای تغییر مسیر موقت :data:`sys.stdout` به یک پرونده یا شیء شبه‌پرونده دیگر." +msgid "Context manager for temporarily redirecting :data:`sys.stdout` to another :term:`file object`." +msgstr "مدیر زمینه برای هدایت موقت :data:`sys.stdout` به یک :term:`شیء پرونده ` دیگر." -msgid "This tool adds flexibility to existing functions or classes whose output is hardwired to stdout." -msgstr "این ابزار، انعطاف‌پذیری را به توابع یا کلاس‌های موجودی می‌افزاید که خروجی آن‌ها به stdout متصل است." +msgid "This tool adds flexibility to existing functions or classes whose output is hardwired to :data:`sys.stdout`." +msgstr "این ابزار انعطاف‌پذیری را به توابع یا کلاس‌های موجودی اضافه می‌کند که خروجی آن‌ها به :data:`sys.stdout` وصل شده است." msgid "For example, the output of :func:`help` normally is sent to *sys.stdout*. You can capture that output in a string by redirecting the output to an :class:`io.StringIO` object. The replacement stream is returned from the :meth:`~object.__enter__` method and so is available as the target of the :keyword:`with` statement::" msgstr "برای مثال، خروجی :func:`help` به‌طور معمول به *sys.stdout* فرستاده می‌شود. شما می‌توانید با هدایت خروجی به یک شیء :class:`io.StringIO`، آن خروجی را در یک رشته ذخیره کنید. جریان جایگزین از متد :meth:`~object.__enter__` بازگردانده می‌شود و بنابراین به‌عنوان هدف دستور :keyword:`with` در دسترس است::" @@ -451,8 +452,8 @@ msgstr "" msgid "Note that the global side effect on :data:`sys.stdout` means that this context manager is not suitable for use in library code and most threaded applications. It also has no effect on the output of subprocesses. However, it is still a useful approach for many utility scripts." msgstr "توجه داشته باشید که اثر جانبی سراسری بر :data:`sys.stdout` به این معناست که این مدیر زمینه برای استفاده در کد کتابخانه‌ای و بیشتر برنامه‌های نخی مناسب نیست. همچنین بر خروجی زیرفرایندها اثری ندارد. با این حال، هنوز هم رویکردی مفید برای بسیاری از اسکریپت‌های کاربردی است." -msgid "Similar to :func:`~contextlib.redirect_stdout` but redirecting :data:`sys.stderr` to another file or file-like object." -msgstr "مشابه :func:`~contextlib.redirect_stdout` است، اما :data:`sys.stderr` را به پرونده یا شیء شبه‌پرونده دیگری تغییر مسیر می‌دهد." +msgid "Similar to :func:`~contextlib.redirect_stdout` but redirecting the global :data:`sys.stderr` to another :term:`file object`." +msgstr "مشابه :func:`~contextlib.redirect_stdout` اما با هدایت :data:`sys.stderr` سراسری به یک :term:`شیء پرونده ` دیگر." msgid "Non parallel-safe context manager to change the current working directory. As this changes a global state, the working directory, it is not suitable for use in most threaded or async contexts. It is also not suitable for most non-linear code execution, like generators, where the program execution is temporarily relinquished -- unless explicitly desired, you should not yield when this context manager is active." msgstr "مدیر زمینه‌ای که از نظر موازی‌سازی ایمن نیست، برای تغییر پوشه کاری جاری است. از آن‌جا که این کار یک وضعیت سراسری، یعنی پوشه کاری، را تغییر می‌دهد، برای استفاده در بیشتر زمینه‌های نخی یا ناهمگام مناسب نیست. همچنین برای بیشتر اجراهای غیرخطی کد، مانند تولیدگرها، مناسب نیست؛ جاهایی که اجرای برنامه به‌طور موقت واگذار می‌شود -- مگر این‌که صریحاً مورد نظر باشد، نباید هنگامی که این مدیر زمینه فعال است، yield کنید." @@ -583,8 +584,20 @@ msgstr "" msgid "As the decorated function must be able to be called multiple times, the underlying context manager must support use in multiple :keyword:`with` statements. If this is not the case, then the original construct with the explicit :keyword:`!with` statement inside the function should be used." msgstr "از آنجا که تابع دکورات‌شده باید بتواند چندین بار فراخوانی شود، مدیر زمینه زیربنایی باید از استفاده در چندین دستور :keyword:`with` پشتیبانی کند. در غیر این صورت، باید از ساختار اصلی با دستور صریح :keyword:`!with` درون تابع استفاده شود." -msgid "Similar to :class:`ContextDecorator` but only for asynchronous functions." -msgstr "مشابه :class:`ContextDecorator` اما فقط برای توابع ناهمگام." +msgid "When the decorated callable is a generator function, coroutine function, or asynchronous generator function, the returned wrapper is of the same kind and keeps the context manager open for the lifetime of the iteration or await rather than only for the call that creates the generator or coroutine object. Wrapped generators and asynchronous generators are explicitly closed when iteration ends, as if by :func:`closing` or :func:`aclosing`." +msgstr "هنگامی که شیء فراخوانی‌پذیرِ تزئین‌شده یک تابع تولیدگر، تابع هم‌روال یا تابع تولیدگر ناهمگام باشد، پوششِ بازگردانده‌شده از همان نوع است و مدیر زمینه را برای طول عمر پیمایش یا await باز نگه می‌دارد، نه فقط برای فراخوانی‌ای که شیء تولیدگر یا هم‌روال را ایجاد می‌کند. تولیدگرهای پوشش‌داده‌شده و تولیدگرهای ناهمگام، هنگامی که پیمایش به پایان می‌رسد، به‌طور صریح بسته می‌شوند، درست مانند زمانی که توسط :func:`closing` یا :func:`aclosing` بسته می‌شوند." + +msgid "For asynchronous generators the wrapper re-yields each value with ``async for``; values sent with :meth:`~agen.asend` and exceptions thrown with :meth:`~agen.athrow` are not forwarded to the wrapped generator." +msgstr "برای تولیدگرهای ناهمگام، پوشش هر مقدار را با ``async for`` دوباره تولید (yield) می‌کند؛ مقادیر ارسال‌شده با :meth:`~agen.asend` و استثناهای پرتاب‌شده با :meth:`~agen.athrow` به تولیدگر پوشش‌داده‌شده فوروارد نمی‌شوند." + +msgid "Decorating a generator function, coroutine function, or asynchronous generator function now keeps the context manager open across iteration or await. Previously the context manager exited as soon as the generator or coroutine object was created." +msgstr "تزئین کردن یک تابع تولیدگر، تابع هم‌روال یا تابع تولیدگر ناهمگام اکنون باعث می‌شود مدیر زمینه در طول پیمایش یا await باز بماند. پیش‌تر، مدیر زمینه به‌محض ایجاد شدن شیء تولیدگر یا هم‌روال خارج می‌شد." + +msgid "Similar to :class:`ContextDecorator`, but the context manager is entered and exited with :keyword:`async with`. Decorate coroutine functions and asynchronous generator functions with this class; the returned wrapper is of the same kind." +msgstr "مشابه :class:`ContextDecorator`، اما ورود و خروج از مدیر زمینه با :keyword:`async with` انجام می‌شود. توابع هم‌روال و توابع تولیدگر ناهمگام را با این کلاس تزئین کنید؛ پوششِ بازگردانده‌شده از همان نوع است." + +msgid "Synchronous functions and generators are accepted, but the wrapper is always asynchronous, so the decorated callable must then be awaited or iterated with ``async for``. If that change of calling convention is not intended, use :class:`ContextDecorator` instead." +msgstr "توابع همگام و تولیدگرها پذیرفته می‌شوند، اما پوشش همیشه ناهمگام است، بنابراین شیء فراخوانی‌پذیرِ تزئین‌شده باید با ``async for`` منتظر بماند (await شود) یا پیمایش شود. اگر آن تغییر در قرارداد فراخوانی مورد نظر نیست، به جای آن از :class:`ContextDecorator` استفاده کنید." msgid "Example of ``AsyncContextDecorator``::" msgstr "مثالی از ``AsyncContextDecorator``::" @@ -651,6 +664,9 @@ msgstr "" "The bit in the middle\n" "Finishing" +msgid "Decorating an asynchronous generator function now keeps the context manager open across iteration. Previously the context manager exited as soon as the generator object was created. Synchronous functions and synchronous generator functions are also now accepted, with an asynchronous wrapper returned." +msgstr "تزئین کردن یک تابع تولیدگر ناهمگام اکنون باعث می‌شود مدیر زمینه در طول پیمایش باز بماند. پیش‌تر، مدیر زمینه به‌محض ایجاد شدن شیء تولیدگر خارج می‌شد. توابع همگام و توابع تولیدگر همگام نیز اکنون پذیرفته می‌شوند و یک پوشش ناهمگام بازگردانده می‌شود." + msgid "A context manager that is designed to make it easy to programmatically combine other context managers and cleanup functions, especially those that are optional or otherwise driven by input data." msgstr "یک مدیر زمینه که طراحی شده است تا ترکیب سایر مدیرهای زمینه و توابع پاک‌سازی را به‌صورت برنامه‌ای آسان کند، به‌ویژه آن‌هایی که اختیاری هستند یا به‌نحوی دیگر توسط داده‌های ورودی هدایت می‌شوند." @@ -694,6 +710,9 @@ msgstr "این مدیران زمینه ممکن است استثناها را م msgid "Raises :exc:`TypeError` instead of :exc:`AttributeError` if *cm* is not a context manager." msgstr "اگر *cm* یک مدیر زمینه نباشد، به‌جای :exc:`AttributeError`، :exc:`TypeError` پرتاب می‌شود." +msgid "Added support for arbitrary descriptors :meth:`!__enter__` and :meth:`!__exit__`." +msgstr "پشتیبانی از توصیف‌گرهای دلخواه :meth:`!__enter__` و :meth:`!__exit__` اضافه شد." + msgid "Adds a context manager's :meth:`~object.__exit__` method to the callback stack." msgstr "متد :meth:`~object.__exit__`\\ مدیر زمینه را به پشته‌ی کال‌بک اضافه می‌کند." @@ -709,6 +728,9 @@ msgstr "این کال‌بک‌ها می‌توانند با برگرداندن msgid "The passed in object is returned from the function, allowing this method to be used as a function decorator." msgstr "شیء داده‌شده از تابع بازگردانده می‌شود و امکان استفاده از این متد به‌عنوان دکوراتور تابع را فراهم می‌کند." +msgid "Added support for arbitrary descriptors :meth:`!__exit__`." +msgstr "پشتیبانی از توصیف‌گرهای دلخواه :meth:`!__exit__` اضافه شد." + msgid "Accepts an arbitrary callback function and arguments and adds it to the callback stack." msgstr "یک تابع کال‌بک دلخواه و آرگومان‌ها را می‌پذیرد و آن را به پشته کال‌بک اضافه می‌کند." @@ -758,9 +780,15 @@ msgstr "مشابه :meth:`ExitStack.enter_context` است، اما انتظار msgid "Raises :exc:`TypeError` instead of :exc:`AttributeError` if *cm* is not an asynchronous context manager." msgstr "اگر *cm* یک مدیر زمینه‌ی ناهمگام نباشد، به‌جای :exc:`AttributeError`، :exc:`TypeError` را پرتاب می‌کند." +msgid "Added support for arbitrary descriptors :meth:`!__aenter__` and :meth:`!__aexit__`." +msgstr "پشتیبانی از توصیف‌گرهای دلخواه :meth:`!__aenter__` و :meth:`!__aexit__` اضافه شد." + msgid "Similar to :meth:`ExitStack.push` but expects either an asynchronous context manager or a coroutine function." msgstr "مشابه :meth:`ExitStack.push` است، اما انتظار دارد که یا یک مدیر زمینه ناهمگام باشد یا یک تابع هم‌روال." +msgid "Added support for arbitrary descriptors :meth:`!__aexit__`." +msgstr "پشتیبانی از توصیف‌گرهای دلخواه :meth:`!__aexit__` اضافه شد." + msgid "Similar to :meth:`ExitStack.callback` but expects a coroutine function." msgstr "مشابه :meth:`ExitStack.callback` است، اما یک تابع هم‌روال انتظار می‌رود." @@ -1309,3 +1337,6 @@ msgstr "" "Callback: from inner context\n" "Leaving outer context\n" "Callback: from outer context" + +#~ msgid "Similar to :class:`ContextDecorator` but only for asynchronous functions." +#~ msgstr "مشابه :class:`ContextDecorator` اما فقط برای توابع ناهمگام." diff --git a/library/contextvars.po b/library/contextvars.po index 64405b04..e53d195c 100644 --- a/library/contextvars.po +++ b/library/contextvars.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 00:57+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -344,7 +345,7 @@ msgid "" " addr = writer.transport.get_extra_info('socket').getpeername()\n" " client_addr_var.set(addr)\n" "\n" -" # In any code that we call is now possible to get\n" +" # In any code that we call, it is now possible to get the\n" " # client's address by calling 'client_addr_var.get()'.\n" "\n" " while True:\n" @@ -387,7 +388,7 @@ msgstr "" " addr = writer.transport.get_extra_info('socket').getpeername()\n" " client_addr_var.set(addr)\n" "\n" -" # In any code that we call is now possible to get\n" +" # In any code that we call, it is now possible to get the\n" " # client's address by calling 'client_addr_var.get()'.\n" "\n" " while True:\n" diff --git a/library/csv.po b/library/csv.po index 6e844b41..dabba535 100644 --- a/library/csv.po +++ b/library/csv.po @@ -8,13 +8,14 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" -"PO-Revision-Date: 2026-09-15 13:18+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 20:43+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" @@ -24,8 +25,8 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Poedit 3.6\n" -msgid ":mod:`!csv` --- CSV File Reading and Writing" -msgstr ":mod:`!csv` --- خواندن و نوشتن پرونده CSV" +msgid ":mod:`!csv` --- CSV file reading and writing" +msgstr ":mod:`!csv` --- خواندن و نوشتن پرونده‌های CSV" msgid "**Source code:** :source:`Lib/csv.py`" msgstr "**کد منبع:** :source:`Lib/csv.py`" @@ -45,7 +46,7 @@ msgstr ":pep:`305` - API پرونده‌ی CSV" msgid "The Python Enhancement Proposal which proposed this addition to Python." msgstr "پیشنهاد بهبود پایتون (Python Enhancement Proposal) که این افزوده را برای پایتون پیشنهاد داد." -msgid "Module Contents" +msgid "Module contents" msgstr "محتویات ماژول" msgid "The :mod:`!csv` module defines the following functions:" @@ -344,7 +345,7 @@ msgstr "ماژول :mod:`!csv` استثنای زیر را تعریف می‌کن msgid "Raised by any of the functions when an error is detected." msgstr "در صورت تشخیص خطا، توسط هر یک از توابع پرتاب می‌شود." -msgid "Dialects and Formatting Parameters" +msgid "Dialects and formatting parameters" msgstr "گویش‌ها و پارامترهای قالب‌بندی" msgid "To make it easier to specify the format of input and output records, specific formatting parameters are grouped together into dialects. A dialect is a subclass of the :class:`Dialect` class containing various attributes describing the format of the CSV file. When creating :class:`reader` or :class:`writer` objects, the programmer can specify a string or a subclass of the :class:`Dialect` class as the dialect parameter. In addition to, or instead of, the *dialect* parameter, the programmer can also specify individual formatting parameters, which have the same names as the attributes defined below for the :class:`Dialect` class." @@ -404,8 +405,8 @@ msgstr "هنگامی که :const:`True` باشد، فاصله‌های بلاف msgid "When ``True``, raise exception :exc:`Error` on bad CSV input. The default is ``False``." msgstr "هنگامی که ``True`` باشد، در صورت ورودی CSV نامعتبر، استثنای :exc:`Error` پرتاب می‌شود. مقدار پیش‌فرض ``False`` است." -msgid "Reader Objects" -msgstr "اشیاء خواننده (Reader)" +msgid "Reader objects" +msgstr "شیءهای خواننده" msgid "Reader objects (:class:`DictReader` instances and objects returned by the :func:`reader` function) have the following public methods:" msgstr "اشیای Reader (نمونه‌های :class:`DictReader` و اشیای برگردانده‌شده از تابع :func:`reader`) دارای متدهای عمومی زیر هستند:" @@ -428,8 +429,8 @@ msgstr "اشیای DictReader ویژگی عمومی زیر را دارند:" 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 "اگر هنگام ایجاد شیء به‌عنوان پارامتر ارسال نشده باشد، این ویژگی در اولین دسترسی یا هنگام خواندن اولین رکورد از پرونده مقداردهی اولیه می‌شود." -msgid "Writer Objects" -msgstr "اشیای نویسنده" +msgid "Writer objects" +msgstr "شیءهای نویسنده" msgid ":class:`writer` objects (:class:`DictWriter` instances and objects returned by the :func:`writer` function) have the following public methods. A *row* must be an iterable of strings or numbers for :class:`writer` objects and a dictionary mapping fieldnames to strings or numbers (by passing them through :func:`str` first) for :class:`DictWriter` objects. Note that complex numbers are written out surrounded by parens. This may cause some problems for other programs which read CSV files (assuming they support complex numbers at all)." msgstr "اشیای :class:`writer` (نمونه‌های :class:`DictWriter` و اشیایی که تابع :func:`writer` برمی‌گرداند) دارای متدهای عمومی زیر هستند. برای اشیای :class:`writer`، یک *ردیف* باید یک پیمایش‌پذیر از رشته‌ها یا اعداد باشد و برای اشیای :class:`DictWriter` باید یک دیکشنری باشد که نام فیلدها را به رشته‌ها یا اعداد نگاشت می‌کند (با اعمال :func:`str` روی آن‌ها در ابتدا). توجه داشته باشید که اعداد مختلط با پرانتز در اطرافشان نوشته می‌شوند. این موضوع ممکن است برای برنامه‌های دیگری که پرونده‌های CSV را می‌خوانند (اگر اصلاً از اعداد مختلط پشتیبانی کنند) مشکلاتی ایجاد کند." @@ -507,24 +508,24 @@ msgstr "" " writer = csv.writer(f)\n" " writer.writerows(someiterable)" -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:`locale.getencoding`). To decode a file using a different encoding, use the ``encoding`` argument of open::" -msgstr "از آنجا که :func:`open` برای باز کردن یک پرونده CSV جهت خواندن استفاده می‌شود، پرونده به‌طور پیش‌فرض با استفاده از کدگذاری پیش‌فرض سیستم به یونیکد کدگشایی می‌شود (به :func:`locale.getencoding` مراجعه کنید). برای کدگشایی یک پرونده با کدگذاری متفاوت، از آرگومان ``encoding`` در open استفاده کنید::" +msgid "Since :func:`open` is used to open a CSV file for reading, the file will by default be decoded into Unicode using UTF-8. To decode a file using a different encoding, use the ``encoding`` argument of open::" +msgstr "از آنجا که تابع :func:`open` برای گشودن یک پرونده‌ی CSV به منظور خواندن استفاده می‌شود، پرونده به طور پیش‌فرض با استفاده از UTF-8 به یونیکد رمزگشایی خواهد شد. برای رمزگشایی یک پرونده با استفاده از یک کدگذاری متفاوت، از آرگومان ``encoding`` در open استفاده کنید::" msgid "" "import csv\n" -"with open('some.csv', newline='', encoding='utf-8') as f:\n" +"with open('some.csv', newline='', encoding='latin-1') as f:\n" " reader = csv.reader(f)\n" " for row in reader:\n" " print(row)" msgstr "" "import csv\n" -"with open('some.csv', newline='', encoding='utf-8') as f:\n" +"with open('some.csv', newline='', encoding='latin-1') as f:\n" " reader = csv.reader(f)\n" " for row in reader:\n" " print(row)" -msgid "The same applies to writing in something other than the system default encoding: specify the encoding argument when opening the output file." -msgstr "همین امر در مورد نوشتن با کدگذاری غیر از کدگذاری پیش‌فرض سیستم نیز صدق می‌کند: هنگام باز کردن پرونده خروجی، آرگومان encoding را مشخص کنید." +msgid "The same applies to writing in something other than the default encoding: specify the encoding argument when opening the output file." +msgstr "همین امر برای نوشتن با کدگذاری‌ای غیر از کدگذاری پیش‌فرض نیز صدق می‌کند: هنگام گشودن پرونده‌ی خروجی، آرگومان encoding را مشخص کنید." msgid "Registering a new dialect::" msgstr "ثبت یک گویش جدید::" diff --git a/library/ctypes.po b/library/ctypes.po index 7b4760ee..376c11d2 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -8,12 +8,14 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# mahdyaralipor , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-28 04:10+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 18:16+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -597,8 +599,8 @@ msgstr ":c:expr:`float complex`" msgid ":py:class:`complex`" msgstr ":py:class:`complex`" -msgid "``'F'``" -msgstr "``'F'``" +msgid "``'Zf'``" +msgstr "``'Zf'``" msgid ":class:`c_double_complex`" msgstr ":class:`c_double_complex`" @@ -606,8 +608,8 @@ msgstr ":class:`c_double_complex`" msgid ":c:expr:`double complex`" msgstr ":c:expr:`double complex`" -msgid "``'D'``" -msgstr "``'D'``" +msgid "``'Zd'``" +msgstr "``'Zd'``" msgid ":class:`c_longdouble_complex`" msgstr ":class:`c_longdouble_complex`" @@ -615,8 +617,11 @@ msgstr ":class:`c_longdouble_complex`" msgid ":c:expr:`long double complex`" msgstr ":c:expr:`long double complex`" -msgid "``'G'``" -msgstr "``'G'``" +msgid "``'Zg'``" +msgstr "``'Zg'``" + +msgid "The :py:attr:`~_SimpleCData._type_` types ``F``, ``D`` and ``G`` have been replaced with ``Zf``, ``Zd`` and ``Zg``." +msgstr "انواع ``F``، ``D`` و ``G`` در :py:attr:`~_SimpleCData._type_` با ``Zf``، ``Zd`` و ``Zg`` جایگزین شده‌اند." msgid "All these types can be created by calling them with an optional initializer of the correct type and value::" msgstr "همه‌ی این نوع‌ها را می‌توان با فراخوانی آن‌ها به‌همراه یک مقدارده اولیه‌ی اختیاری از نوع و مقدار صحیح ایجاد کرد::" @@ -2086,108 +2091,6 @@ msgstr "راه دیگر برای استفاده از انواع داده با ا msgid "ctypes reference" msgstr "مرجع ctypes" -msgid "Finding shared libraries" -msgstr "یافتن کتابخانه‌های مشترک" - -msgid "When programming in a compiled language, shared libraries are accessed when compiling/linking a program, and when the program is run." -msgstr "هنگام برنامه‌نویسی در یک زبان کامپایل‌شده، در زمان کامپایل/لینک کردن یک برنامه و نیز هنگامی که برنامه اجرا می‌شود، به کتابخانه‌های اشتراکی دسترسی پیدا می‌شود." - -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 platforms with several versions of a shared library the most recent should be loaded), while the ctypes library loaders act like when a program is run, and call the runtime loader directly." -msgstr "هدف از تابع :func:`~ctypes.util.find_library` این است که یک کتابخانه را به شیوه‌ای مشابه آنچه کامپایلر یا بارگذار ران‌تایم انجام می‌دهد بیابد (در سکوهایی که چند نسخه از یک کتابخانه اشتراکی دارند، باید جدیدترین نسخه بارگذاری شود)، در حالی که بارگذارهای کتابخانه ctypes مانند زمانی که یک برنامه اجرا می‌شود عمل می‌کنند و بارگذار ران‌تایم را مستقیماً فراخوانی می‌کنند." - -msgid "The :mod:`!ctypes.util` module provides a function which can help to determine the library to load." -msgstr "ماژول :mod:`!ctypes.util` تابعی فراهم می‌کند که می‌تواند به تعیین کتابخانه‌ای که باید بارگذاری شود کمک کند." - -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 number (this is the form used for the posix linker option :option:`!-l`). If no library can be found, returns ``None``." -msgstr "تلاش می‌کند یک کتابخانه را پیدا کند و یک مسیر را برگرداند. *name* نام کتابخانه بدون هیچ پیشوندی مانند *lib*، پسوندی مانند ``.so``، ``.dylib`` یا شماره‌ی نسخه است (این همان قالبی است که برای گزینه‌ی پیونددهنده‌ی posix یعنی :option:`!-l` استفاده می‌شود). اگر هیچ کتابخانه‌ای پیدا نشود، ``None`` را برمی‌گرداند." - -msgid "The exact functionality is system dependent." -msgstr "عملکرد دقیق، وابسته به سیستم است." - -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 "در لینوکس، :func:`~ctypes.util.find_library` تلاش می‌کند برنامه‌های خارجی (``/sbin/ldconfig``، ``gcc``، ``objdump`` و ``ld``) را اجرا کند تا پرونده کتابخانه را پیدا کند. نام پرونده کتابخانه را برمی‌گرداند." - -msgid "Note that if the output of these programs does not correspond to the dynamic linker used by Python, the result of this function may be misleading." -msgstr "توجه داشته باشید که اگر خروجی این برنامه‌ها با پیونددهنده‌ی پویایی که پایتون از آن استفاده می‌کند مطابقت نداشته باشد، نتیجه این تابع ممکن است گمراه‌کننده باشد." - -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 "در لینوکس، هنگام جست‌وجوی کتابخانه‌ها، اگر کتابخانه‌ای به هیچ روش دیگری یافت نشود، مقدار متغیر محیطی ``LD_LIBRARY_PATH`` استفاده می‌شود." - -msgid "Here are some examples::" -msgstr "در اینجا چند مثال آمده است::" - -msgid "" -">>> from ctypes.util import find_library\n" -">>> find_library(\"m\")\n" -"'libm.so.6'\n" -">>> find_library(\"c\")\n" -"'libc.so.6'\n" -">>> find_library(\"bz2\")\n" -"'libbz2.so.1.0'\n" -">>>" -msgstr "" -">>> from ctypes.util import find_library\n" -">>> find_library(\"m\")\n" -"'libm.so.6'\n" -">>> find_library(\"c\")\n" -"'libc.so.6'\n" -">>> find_library(\"bz2\")\n" -"'libbz2.so.1.0'\n" -">>>" - -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 "در macOS و Android، :func:`~ctypes.util.find_library` از طرح‌های نام‌گذاری و مسیرهای استاندارد سیستم برای پیدا کردن کتابخانه استفاده می‌کند و در صورت موفقیت، یک نام مسیر کامل را برمی‌گرداند::" - -msgid "" -">>> from ctypes.util import find_library\n" -">>> find_library(\"c\")\n" -"'/usr/lib/libc.dylib'\n" -">>> find_library(\"m\")\n" -"'/usr/lib/libm.dylib'\n" -">>> find_library(\"bz2\")\n" -"'/usr/lib/libbz2.dylib'\n" -">>> find_library(\"AGL\")\n" -"'/System/Library/Frameworks/AGL.framework/AGL'\n" -">>>" -msgstr "" -">>> from ctypes.util import find_library\n" -">>> find_library(\"c\")\n" -"'/usr/lib/libc.dylib'\n" -">>> find_library(\"m\")\n" -"'/usr/lib/libm.dylib'\n" -">>> find_library(\"bz2\")\n" -"'/usr/lib/libbz2.dylib'\n" -">>> find_library(\"AGL\")\n" -"'/System/Library/Frameworks/AGL.framework/AGL'\n" -">>>" - -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 naming scheme a call like ``find_library(\"c\")`` will fail and return ``None``." -msgstr "در ویندوز، :func:`~ctypes.util.find_library` در امتداد مسیر جستجوی سیستم جستجو می‌کند و مسیر کامل را برمی‌گرداند، اما از آنجا که هیچ الگوی نام‌گذاری از پیش تعریف‌شده‌ای وجود ندارد، فراخوانی مانند ``find_library(\"c\")`` با شکست مواجه می‌شود و ``None`` را برمی‌گرداند." - -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 into the wrapper module instead of using :func:`~ctypes.util.find_library` to locate the library at runtime." -msgstr "اگر در حال پوشش دادن یک کتابخانه اشتراکی با :mod:`!ctypes` هستید، *ممکن است* بهتر باشد نام کتابخانه اشتراکی را در زمان توسعه تعیین کنید و آن را به‌صورت مقدار ثابت (hardcode) در ماژول پوششی قرار دهید، به‌جای استفاده از :func:`~ctypes.util.find_library` برای یافتن کتابخانه در ران‌تایم." - -msgid "Listing loaded shared libraries" -msgstr "فهرست کتابخانه‌های اشتراکی بارگذاری‌شده" - -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 "هنگام نوشتن کدی که به کد بارگذاری‌شده از کتابخانه‌های اشتراکی متکی است، دانستن اینکه کدام کتابخانه‌های اشتراکی از قبل در فرایند جاری بارگذاری شده‌اند، می‌تواند مفید باشد." - -msgid "The :mod:`!ctypes.util` module provides the :func:`~ctypes.util.dllist` function, which calls the different APIs provided by the various platforms to help determine which shared libraries have already been loaded into the current process." -msgstr "ماژول :mod:`!ctypes.util` تابع :func:`~ctypes.util.dllist` را فراهم می‌کند، که APIهای متفاوتی را که پلتفرم‌های گوناگون ارائه می‌دهند فراخوانی می‌کند تا به تعیین اینکه کدام کتابخانه‌های اشتراکی از قبل در فرایند جاری بارگذاری شده‌اند کمک کند." - -msgid "The exact output of this function will be system dependent. On most platforms, the first entry of this list represents the current process itself, which may be an empty string. For example, on glibc-based Linux, the return may look like::" -msgstr "خروجی دقیق این تابع به سیستم وابسته است. در بیشتر پلتفرم‌ها، نخستین آیتم این فهرست خود فرایند جاری را نشان می‌دهد، که ممکن است یک رشته خالی باشد. برای مثال، در لینوکس مبتنی بر glibc، ممکن است مقدار بازگشتی به شکل زیر باشد::" - -msgid "" -">>> from ctypes.util import dllist\n" -">>> dllist()\n" -"['', 'linux-vdso.so.1', '/lib/x86_64-linux-gnu/libm.so.6', '/lib/x86_64-linux-gnu/libc.so.6', ... ]" -msgstr "" -">>> from ctypes.util import dllist\n" -">>> dllist()\n" -"['', 'linux-vdso.so.1', '/lib/x86_64-linux-gnu/libm.so.6', '/lib/x86_64-linux-gnu/libc.so.6', ... ]" - msgid "Loading shared libraries" msgstr "بارگذاری کتابخانه‌های مشترک" @@ -2203,12 +2106,15 @@ msgstr "توابع این کتابخانه از قرارداد فراخوانی msgid "If you have an existing :py:attr:`handle ` to an already loaded shared library, it can be passed as the *handle* argument to wrap the opened library in a new :py:class:`!CDLL` object. In this case, *name* is only used to set the :py:attr:`~ctypes.CDLL._name` attribute, but it may be adjusted and/or validated." msgstr "اگر یک :py:attr:`handle ` موجود برای یک کتابخانه اشتراکی از پیش بارگذاری‌شده دارید، می‌توان آن را به‌عنوان آرگومان *handle* برای دربرگرفتن کتابخانه بازشده در قالب یک شیء جدید :py:class:`!CDLL` ارسال کرد. در این حالت، *name* فقط برای تنظیم ویژگی :py:attr:`~ctypes.CDLL._name` استفاده می‌شود، اما ممکن است تنظیم و/یا اعتبارسنجی شود." -msgid "If *handle* is ``None``, the underlying platform's :manpage:`dlopen(3)` or :c:func:`!LoadLibrary` function is used to load the library into the process, and to get a handle to it." -msgstr "اگر *handle* برابر ``None`` باشد، از تابع :manpage:`dlopen(3)` یا :c:func:`!LoadLibrary` پلتفرم زیرین برای بارگذاری کتابخانه در فرایند و دریافت یک دسته برای آن استفاده می‌شود." +msgid "If *handle* is ``None``, the underlying platform's :manpage:`dlopen(3)` or `LoadLibraryExW`_ function is used to load the library into the process, and to get a handle to it." +msgstr "اگر *handle* برابر با ``None`` باشد، تابع :manpage:`dlopen(3)` یا `LoadLibraryExW`_ پلتفرم زیرین برای بارگذاری کتابخانه در فرایند و به دست آوردن دسته‌ای به آن استفاده می‌شود." msgid "*name* is the pathname of the shared library to open. If *name* does not contain a path separator, the library is found in a platform-specific way." msgstr "*name* مسیر کتابخانه اشتراکی برای باز کردن است. اگر *name* شامل جداکننده مسیر نباشد، کتابخانه به شیوه‌ای وابسته به پلتفرم یافت می‌شود." +msgid "On Windows, the ``.DLL`` suffix may be missing. (For details, see `LoadLibraryExW`_ documentation.) Other platform-specific prefixes and suffixes (for example, ``lib``, ``.so``, ``.dylib``, or version numbers) must be present in *name*; they are not added automatically. See :ref:`ctypes-finding-shared-libraries` for more information." +msgstr "در ویندوز، پسوند ``.DLL`` ممکن است وجود نداشته باشد. (برای جزئیات، مستندات `LoadLibraryExW`_ را ببینید.) سایر پیشوندها و پسوندهای مختص پلتفرم (به‌عنوان‌مثال، ``lib``، ``.so``، ``.dylib`` یا شماره‌های نسخه) باید در *name* موجود باشند؛ آن‌ها به‌طور خودکار اضافه نمی‌شوند. برای اطلاعات بیشتر :ref:`ctypes-finding-shared-libraries` را ببینید." + msgid "On non-Windows systems, *name* can be ``None``. In this case, :c:func:`!dlopen` is called with ``NULL``, which opens the main program as a \"library\". (Some systems do the same is *name* is empty; ``None``/``NULL`` is more portable.)" msgstr "در سیستم‌های غیرویندوزی، *name* می‌تواند ``None`` باشد. در این حالت، :c:func:`!dlopen` با ``NULL`` فراخوانی می‌شود، که برنامه‌ی اصلی را به‌عنوان یک «کتابخانه» باز می‌کند. (برخی سیستم‌ها اگر *name* خالی باشد نیز همین کار را انجام می‌دهند؛ ``None``/``NULL`` قابل‌حمل‌تر است.)" @@ -2246,8 +2152,8 @@ msgstr "تابع :func:`ctypes.get_errno` مقدار نسخه خصوصی ctypes 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 :func:`!SetLastError` Windows API functions; :func:`ctypes.get_last_error` and :func:`ctypes.set_last_error` are used to request and change the ctypes private copy of the windows error code." msgstr "پارامتر *use_last_error*، هنگامی که روی true تنظیم شود، همان سازوکار را برای کد خطای ویندوز، که توسط توابع API ویندوز :func:`GetLastError` و :func:`!SetLastError` مدیریت می‌شود، فعال می‌کند؛ از :func:`ctypes.get_last_error` و :func:`ctypes.set_last_error` برای درخواست و تغییر نسخه‌ی خصوصی ctypes از کد خطای ویندوز استفاده می‌شود." -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 Win32 API ``LoadLibraryEx`` flags parameter. When omitted, the default is to use the flags that result in the most secure DLL load, which avoids issues such as DLL hijacking. Passing the full path to the DLL is the safest way to ensure the correct library and dependencies are loaded." -msgstr "پارامتر *winmode* در ویندوز برای مشخص کردن چگونگی بارگذاری کتابخانه استفاده می‌شود (زیرا *mode* در نظر گرفته نمی‌شود). این پارامتر هر مقداری را می‌پذیرد که برای پارامتر پرچم‌های ``LoadLibraryEx`` در Win32 API معتبر باشد. در صورت حذف، پیش‌فرض استفاده از پرچم‌هایی است که به امن‌ترین بارگذاری DLL منجر می‌شوند و از مسائلی مانند ربایش DLL (DLL hijacking) جلوگیری می‌کنند. ارسال مسیر کامل DLL، امن‌ترین راه برای اطمینان از بارگذاری کتابخانه و وابستگی‌های صحیح است." +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 Win32 API `LoadLibraryExW`_ flags parameter. When omitted, the default is to use the flags that result in the most secure DLL load, which avoids issues such as DLL hijacking. Passing the full path to the DLL is the safest way to ensure the correct library and dependencies are loaded." +msgstr "پارامتر *winmode* در ویندوز برای مشخص کردن نحوه‌ی بارگذاری کتابخانه استفاده می‌شود (زیرا *mode* نادیده گرفته می‌شود). این پارامتر هر مقداری را که برای پرچم‌های API ویندوز در `LoadLibraryExW`_ معتبر باشد می‌پذیرد. هنگامی که این پارامتر حذف شود، پیش‌فرض استفاده از پرچم‌هایی است که امن‌ترین بارگذاری DLL را به همراه دارند، و این امر از مشکلاتی نظیر ربایش DLL جلوگیری می‌کند. ارسال مسیر کامل به DLL امن‌ترین راه برای اطمینان از بارگذاری کتابخانه و وابستگی‌های درست است." 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:`OSError` error is raised with the message *\"[WinError 126] The specified module could not be found\".* This error message does not contain the name of the missing DLL because the Windows API does not return this information making this error hard to diagnose. To resolve this error and determine which DLL is not found, you need to find the list of dependent DLLs and determine which one is not found using Windows debugging and tracing tools." msgstr "در ویندوز، ایجاد یک نمونه از :class:`CDLL` ممکن است حتی اگر نام DLL وجود داشته باشد شکست بخورد. هنگامی که یک DLL وابسته به DLL بارگذاری‌شده پیدا نشود، یک خطای :exc:`OSError` با پیام *\"[WinError 126] The specified module could not be found\".* پرتاب می‌شود. این پیام خطا حاوی نام DLL مفقود نیست، زیرا API ویندوز این اطلاعات را برنمی‌گرداند و این موضوع، تشخیص این خطا را دشوار می‌کند. برای رفع این خطا و تعیین این‌که کدام DLL پیدا نشده است، باید فهرست DLLهای وابسته را پیدا کنید و با استفاده از ابزارهای اشکال‌زدایی و ردگیری ویندوز مشخص کنید کدام‌یک پیدا نشده است." @@ -2345,15 +2251,9 @@ msgstr "نمونه‌های :class:`OleDLL` را ایجاد می‌کند." msgid "Creates :class:`PyDLL` instances." msgstr "نمونه‌های :class:`PyDLL` را ایجاد می‌کند." -msgid "For accessing the C Python api directly, a ready-to-use Python shared library object is available:" -msgstr "برای دسترسی مستقیم به API پایتون C، یک شیء کتابخانه مشترک پایتون آماده استفاده در دسترس است:" - 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:`int`, which is of course not always the truth, so you have to assign the correct :attr:`!restype` attribute to use these functions." msgstr "نمونه‌ای از :class:`PyDLL` که توابع Python C API را به‌عنوان ویژگی‌ها در دسترس قرار می‌دهد. توجه داشته باشید که فرض می‌شود همه‌ی این توابع مقداری از نوع C :c:expr:`int` را برمی‌گردانند، که البته همیشه درست نیست، بنابراین برای استفاده از این توابع باید ویژگی :attr:`!restype` صحیح را اختصاص دهید." -msgid "Note that if the Python interpreter is statically linked, this will be ``None``, as ``dlopen`` is not possible in this case." -msgstr "توجه داشته باشید که اگر مفسر پایتون به‌صورت ایستا پیوند شده باشد، این مقدار ``None`` خواهد بود، زیرا در این حالت ``dlopen`` ممکن نیست." - 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 "بارگذاری یک کتابخانه از طریق هر یک از این اشیاء، یک :ref:`رویداد حسابرسی ` ``ctypes.dlopen`` را با آرگومان رشته‌ای ``name``، نام استفاده‌شده برای بارگذاری کتابخانه، پرتاب می‌کند." @@ -2363,6 +2263,120 @@ msgstr "دسترسی به یک تابع در یک کتابخانه بارگذا 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 "در مواردی که به جای شیء، تنها دسته‌ی کتابخانه در دسترس باشد، دسترسی به یک تابع، رویداد حسابرسی ``ctypes.dlsym/handle`` را با آرگومان‌های ``handle`` (دسته‌ی خام کتابخانه) و ``name`` پرتاب می‌کند." +msgid "Finding shared libraries" +msgstr "یافتن کتابخانه‌های مشترک" + +msgid "When programming in a compiled language, shared libraries are accessed when compiling/linking a program, and when the program is run. The programmer specifies a short name; the C compiler, linker, and runtime dynamic library loader then interact in system-specific ways to find the filename of the library to load." +msgstr "هنگام برنامه‌نویسی به یک زبان کامپایل‌شده، کتابخانه‌های مشترک هنگام کامپایل/پیوند دادن یک برنامه و همچنین هنگام اجرای برنامه مورد دسترسی قرار می‌گیرند. برنامه‌نویس یک نام کوتاه مشخص می‌کند؛ سپس کامپایلر C، پیونددهنده و بارگذار کتابخانه‌ی پویای ران‌تایم به روش‌های مختص سیستم تعامل می‌کنند تا نام پرونده‌ی کتابخانه را برای بارگذاری پیدا کنند." + +msgid "While the mapping from short names to filenames is not consistently exposed by platforms, the :mod:`!ctypes.util` module provides a function, :func:`!find_library`, that attempts to match it. However, as backwards compatibility concerns make it difficult to adjust its behavior for new platforms and configurations, the function is :term:`soft deprecated`." +msgstr "در حالی که نگاشت از نام‌های کوتاه به نام پرونده‌ها به‌طور سازگار توسط پلتفرم‌ها در معرض دید قرار نمی‌گیرد، ماژول :mod:`!ctypes.util` تابعی به نام :func:`!find_library` فراهم می‌کند که تلاش می‌کند آن را مطابقت دهد. با این حال، از آنجا که نگرانی‌های مربوط به سازگاری رو به عقب تنظیم رفتار آن را برای پلتفرم‌ها و پیکربندی‌های جدید دشوار می‌کند، این تابع :term:`به‌طور نرم منسوخ‌شده ` است." + +msgid "If wrapping a shared library with :mod:`!ctypes`, consider determining the shared library name at development time, and hardcoding it into the wrapper module instead of using :func:`!find_library` to locate the library at runtime. Also consider adding a configuration option or environment variable to let users select a library to use, and then perhaps use :func:`!find_library` as a default or fallback." +msgstr "اگر در حال پوشش‌دهی یک کتابخانه‌ی مشترک با :mod:`!ctypes` هستید، به جای استفاده از :func:`!find_library` برای یافتن کتابخانه در زمان اجرای برنامه‌ (ران‌تایم)، تعیین نام کتابخانه‌ی مشترک را در زمان توسعه در نظر بگیرید و آن را به صورت ثابت (سخت‌کد) در ماژول پوششی قرار دهید. همچنین اضافه کردن یک گزینه‌ی پیکربندی یا متغیر محیطی را برای اجازه دادن به کاربران جهت انتخاب کتابخانه‌ی مورد استفاده در نظر بگیرید، و سپس شاید از :func:`!find_library` به عنوان پیش‌فرض یا جایگزین استفاده کنید." + +msgid "Try to find a library and return a pathname." +msgstr "تلاش برای یافتن یک کتابخانه و بازگرداندن یک مسرنام." + +msgid "*name* is the \"short\" library name without any prefix like ``lib``, suffix like ``.so``, ``.dylib`` or version number. (This is the form used for the posix linker option :option:`!-l`.) The result is in a format suitable for passing to :py:class:`~ctypes.CDLL`." +msgstr "*name* نام «کوتاه» کتابخانه بدون هیچ پیشوندی مانند ``lib``، پسوندی مانند ``.so``، ``.dylib`` یا شماره‌ی نسخه است. (این شکلی است که برای گزینه‌ی پیونددهنده‌ی posix یعنی :option:`!-l` استفاده می‌شود.) نتیجه در قالبی مناسب برای ارسال به :py:class:`~ctypes.CDLL` است." + +msgid "If no library can be found, return ``None``." +msgstr "اگر هیچ کتابخانه‌ای پیدا نشود، ``None`` را بازمی‌گرداند." + +msgid "The exact functionality is system dependent, and is *not guaranteed* to match the behavior of the compiler, linker, and loader used for (or by) Python. It is recommended to only use this function as a default or fallback," +msgstr "عملکرد دقیق به سیستم وابسته است و *تضمین نمی‌شود* که با رفتار کامپایلر، پیونددهنده و بارگذار مورد استفاده برای (یا توسط) پایتون مطابقت داشته باشد. توصیه می‌شود فقط از این تابع به عنوان پیش‌فرض یا جایگزین استفاده کنید،" + +msgid "This function is kept for use in cases where it works, but not expected to be updated for additional platforms and configurations." +msgstr "این تابع برای استفاده در مواردی که کار می‌کند حفظ شده است، اما انتظار نمی‌رود برای پلتفرم‌ها و پیکربندی‌های اضافی به‌روزرسانی شود." + +msgid "On Linux, :func:`!find_library` tries to run external programs (``/sbin/ldconfig``, ``gcc``, ``objdump`` and ``ld``) to find the library file. If the output of these programs does not correspond to the dynamic linker used by Python, the result of this function may be misleading." +msgstr "در لینوکس، :func:`!find_library` تلاش می‌کند برنامه‌های خارجی (``/sbin/ldconfig``، ``gcc``، ``objdump`` و ``ld``) را اجرا کند تا پرونده‌ی کتابخانه را بیابد. اگر خروجی این برنامه‌ها با پیونددهنده‌ی پویای مورد استفاده‌ی پایتون مطابقت نداشته باشد، ممکن است نتیجه‌ی این تابع گمراه‌کننده باشد." + +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 "در لینوکس، هنگام جست‌وجوی کتابخانه‌ها، اگر کتابخانه‌ای به هیچ روش دیگری یافت نشود، مقدار متغیر محیطی ``LD_LIBRARY_PATH`` استفاده می‌شود." + +msgid "Here are some examples::" +msgstr "در اینجا چند مثال آمده است::" + +msgid "" +">>> from ctypes.util import find_library\n" +">>> find_library(\"m\")\n" +"'libm.so.6'\n" +">>> find_library(\"c\")\n" +"'libc.so.6'\n" +">>> find_library(\"bz2\")\n" +"'libbz2.so.1.0'\n" +">>>" +msgstr "" +">>> from ctypes.util import find_library\n" +">>> find_library(\"m\")\n" +"'libm.so.6'\n" +">>> find_library(\"c\")\n" +"'libc.so.6'\n" +">>> find_library(\"bz2\")\n" +"'libbz2.so.1.0'\n" +">>>" + +msgid "On macOS and Android, :func:`!find_library` uses the system's standard naming schemes and paths to locate the library, and returns a full pathname if successful::" +msgstr "در مک‌اواس و اندروید، :func:`!find_library` از الگوها و مسیرهای نام‌گذاری استاندارد سیستم برای یافتن کتابخانه استفاده می‌کند و در صورت موفقیت، یک مسیرنام کامل را برمی‌گرداند::" + +msgid "" +">>> from ctypes.util import find_library\n" +">>> find_library(\"c\")\n" +"'/usr/lib/libc.dylib'\n" +">>> find_library(\"m\")\n" +"'/usr/lib/libm.dylib'\n" +">>> find_library(\"bz2\")\n" +"'/usr/lib/libbz2.dylib'\n" +">>> find_library(\"AGL\")\n" +"'/System/Library/Frameworks/AGL.framework/AGL'\n" +">>>" +msgstr "" +">>> from ctypes.util import find_library\n" +">>> find_library(\"c\")\n" +"'/usr/lib/libc.dylib'\n" +">>> find_library(\"m\")\n" +"'/usr/lib/libm.dylib'\n" +">>> find_library(\"bz2\")\n" +"'/usr/lib/libbz2.dylib'\n" +">>> find_library(\"AGL\")\n" +"'/System/Library/Frameworks/AGL.framework/AGL'\n" +">>>" + +msgid "On Windows, :func:`!find_library` searches along the system search path, and returns the full pathname, but since there is no predefined naming scheme a call like ``find_library(\"c\")`` will fail and return ``None``." +msgstr "در ویندوز، :func:`!find_library` مسیر جستجوی سیستم را جستجو می‌کند و مسیرنام کامل را برمی‌گرداند، اما از آنجا که هیچ الگوی نام‌گذاری از پیش تعریف‌شده‌ای وجود ندارد، فراخوانی‌ای مانند ``find_library(\"c\")`` با شکست مواجه شده و ``None`` را برمی‌گرداند." + +msgid "Returns the filename of the VC runtime library used by Python, and by the extension modules." +msgstr "نام پرونده‌ی کتابخانه‌ی ران‌تایم VC مورد استفاده‌ی پایتون و ماژول‌های توسعه‌ای را برمی‌گرداند." + +msgid "If the name of the library cannot be determined, ``None`` is returned. Notably, this will happen for recent versions of the VC runtime library, which are not directly loadable." +msgstr "اگر نام کتابخانه قابل تشخیص نباشد، مقدار ``None`` برگردانده می‌شود. به طور ویژه، این اتفاق برای نسخه‌های جدیدتر کتابخانه‌ی ران‌تایم VC رخ می‌دهد که مستقیماً قابل بارگذاری نیستند." + +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 "اگر نیاز دارید حافظه‌ای را آزاد کنید، برای مثال حافظه‌ای که توسط یک ماژول توسعه تخصیص داده شده است، با فراخوانی ``free(void *)``، مهم است که از تابع در همان کتابخانه‌ای استفاده کنید که آن حافظه را تخصیص داده است." + +msgid "Listing loaded shared libraries" +msgstr "فهرست کتابخانه‌های اشتراکی بارگذاری‌شده" + +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 "هنگام نوشتن کدی که به کد بارگذاری‌شده از کتابخانه‌های اشتراکی متکی است، دانستن اینکه کدام کتابخانه‌های اشتراکی از قبل در فرایند جاری بارگذاری شده‌اند، می‌تواند مفید باشد." + +msgid "The :mod:`!ctypes.util` module provides the :func:`~ctypes.util.dllist` function, which calls the different APIs provided by the various platforms to help determine which shared libraries have already been loaded into the current process." +msgstr "ماژول :mod:`!ctypes.util` تابع :func:`~ctypes.util.dllist` را فراهم می‌کند، که APIهای متفاوتی را که پلتفرم‌های گوناگون ارائه می‌دهند فراخوانی می‌کند تا به تعیین اینکه کدام کتابخانه‌های اشتراکی از قبل در فرایند جاری بارگذاری شده‌اند کمک کند." + +msgid "The exact output of this function will be system dependent. On most platforms, the first entry of this list represents the current process itself, which may be an empty string. For example, on glibc-based Linux, the return may look like::" +msgstr "خروجی دقیق این تابع به سیستم وابسته است. در بیشتر پلتفرم‌ها، نخستین آیتم این فهرست خود فرایند جاری را نشان می‌دهد، که ممکن است یک رشته خالی باشد. برای مثال، در لینوکس مبتنی بر glibc، ممکن است مقدار بازگشتی به شکل زیر باشد::" + +msgid "" +">>> from ctypes.util import dllist\n" +">>> dllist()\n" +"['', 'linux-vdso.so.1', '/lib/x86_64-linux-gnu/libm.so.6', '/lib/x86_64-linux-gnu/libc.so.6', ... ]" +msgstr "" +">>> from ctypes.util import dllist\n" +">>> dllist()\n" +"['', 'linux-vdso.so.1', '/lib/x86_64-linux-gnu/libm.so.6', '/lib/x86_64-linux-gnu/libc.so.6', ... ]" + msgid "Foreign functions" msgstr "توابع خارجی" @@ -2726,18 +2740,6 @@ msgstr "این تابع یک قلاباست که امکان پیاده‌ساز 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 "این تابع یک قلاباست که امکان پیاده‌سازی سرورهای COM درون‌فرایندی را با ctypes فراهم می‌کند. این تابع از تابع DllGetClassObject فراخوانی می‌شود که dll افزونه ``_ctypes`` آن را اکسپورت می‌کند." -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 number (this is the form used for the posix linker option :option:`!-l`). If no library can be found, returns ``None``." -msgstr "تلاش می‌کند کتابخانه‌ای را بیابد و یک مسیر نام برگرداند. *name* نام کتابخانه بدون هیچ پیشوندی مانند ``lib``، پسوندی مانند ``.so`` یا ``.dylib``، یا شماره‌ی نسخه است (این قالب برای گزینه‌ی پیونددهنده‌ی POSIX یعنی :option:`!-l` به کار می‌رود). اگر هیچ کتابخانه‌ای یافت نشود، ``None`` برگردانده می‌شود." - -msgid "See :ref:`ctypes-finding-shared-libraries` for complete documentation." -msgstr "برای مستندات کامل، :ref:`ctypes-finding-shared-libraries` را ببینید." - -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 "نام پرونده کتابخانه ران‌تایم VC مورد استفاده پایتون و ماژول‌های توسعه را برمی‌گرداند. اگر نام کتابخانه قابل تعیین نباشد، ``None`` برگردانده می‌شود." - -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 "اگر نیاز دارید حافظه‌ای را آزاد کنید، برای مثال حافظه‌ای که توسط یک ماژول توسعه تخصیص داده شده است، با فراخوانی ``free(void *)``، مهم است که از تابع در همان کتابخانه‌ای استفاده کنید که آن حافظه را تخصیص داده است." - 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. The function can raise :exc:`OSError` if the underlying platform APIs fail. The exact functionality is system dependent." msgstr "تلاش می‌کند فهرستی از مسیرهای کتابخانه‌های اشتراکی بارگذاری‌شده در فرایند جاری را ارائه کند. این مسیرها به هیچ وجه به‌هنجار یا پردازش نمی‌شوند. اگر APIهای پلتفرم زیرین شکست بخورند، این تابع ممکن است :exc:`OSError` را پرتاب کند. عملکرد دقیق آن وابسته به سیستم است." @@ -3345,3 +3347,39 @@ msgstr "۵-تاییِ ``(descr, source, helpfile, helpcontext, progid)``." msgid "*descr* is the textual description. *source* is the language-dependent ``ProgID`` for the class or application that raised the error. *helpfile* is the path of the help file. *helpcontext* is the help context identifier. *progid* is the ``ProgID`` of the interface that defined the error." msgstr "*descr* توضیح متنی است. *source* ``ProgID`` وابسته به زبان برای کلاس یا برنامه‌ای است که خطا را پرتاب کرده است. *helpfile* مسیر پرونده راهنما است. *helpcontext* شناسه زمینه راهنما است. *progid* ``ProgID`` رابطی است که خطا را تعریف کرده است." + +#~ msgid "``'F'``" +#~ msgstr "``'F'``" + +#~ msgid "``'D'``" +#~ msgstr "``'D'``" + +#~ msgid "``'G'``" +#~ msgstr "``'G'``" + +#~ msgid "When programming in a compiled language, shared libraries are accessed when compiling/linking a program, and when the program is run." +#~ msgstr "هنگام برنامه‌نویسی در یک زبان کامپایل‌شده، در زمان کامپایل/لینک کردن یک برنامه و نیز هنگامی که برنامه اجرا می‌شود، به کتابخانه‌های اشتراکی دسترسی پیدا می‌شود." + +#~ 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 platforms with several versions of a shared library the most recent should be loaded), while the ctypes library loaders act like when a program is run, and call the runtime loader directly." +#~ msgstr "هدف از تابع :func:`~ctypes.util.find_library` این است که یک کتابخانه را به شیوه‌ای مشابه آنچه کامپایلر یا بارگذار ران‌تایم انجام می‌دهد بیابد (در سکوهایی که چند نسخه از یک کتابخانه اشتراکی دارند، باید جدیدترین نسخه بارگذاری شود)، در حالی که بارگذارهای کتابخانه ctypes مانند زمانی که یک برنامه اجرا می‌شود عمل می‌کنند و بارگذار ران‌تایم را مستقیماً فراخوانی می‌کنند." + +#~ msgid "The :mod:`!ctypes.util` module provides a function which can help to determine the library to load." +#~ msgstr "ماژول :mod:`!ctypes.util` تابعی فراهم می‌کند که می‌تواند به تعیین کتابخانه‌ای که باید بارگذاری شود کمک کند." + +#~ 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 number (this is the form used for the posix linker option :option:`!-l`). If no library can be found, returns ``None``." +#~ msgstr "تلاش می‌کند یک کتابخانه را پیدا کند و یک مسیر را برگرداند. *name* نام کتابخانه بدون هیچ پیشوندی مانند *lib*، پسوندی مانند ``.so``، ``.dylib`` یا شماره‌ی نسخه است (این همان قالبی است که برای گزینه‌ی پیونددهنده‌ی posix یعنی :option:`!-l` استفاده می‌شود). اگر هیچ کتابخانه‌ای پیدا نشود، ``None`` را برمی‌گرداند." + +#~ msgid "The exact functionality is system dependent." +#~ msgstr "عملکرد دقیق، وابسته به سیستم است." + +#~ msgid "Note that if the output of these programs does not correspond to the dynamic linker used by Python, the result of this function may be misleading." +#~ msgstr "توجه داشته باشید که اگر خروجی این برنامه‌ها با پیونددهنده‌ی پویایی که پایتون از آن استفاده می‌کند مطابقت نداشته باشد، نتیجه این تابع ممکن است گمراه‌کننده باشد." + +#~ msgid "For accessing the C Python api directly, a ready-to-use Python shared library object is available:" +#~ msgstr "برای دسترسی مستقیم به API پایتون C، یک شیء کتابخانه مشترک پایتون آماده استفاده در دسترس است:" + +#~ msgid "Note that if the Python interpreter is statically linked, this will be ``None``, as ``dlopen`` is not possible in this case." +#~ msgstr "توجه داشته باشید که اگر مفسر پایتون به‌صورت ایستا پیوند شده باشد، این مقدار ``None`` خواهد بود، زیرا در این حالت ``dlopen`` ممکن نیست." + +#~ msgid "See :ref:`ctypes-finding-shared-libraries` for complete documentation." +#~ msgstr "برای مستندات کامل، :ref:`ctypes-finding-shared-libraries` را ببینید." diff --git a/library/dataclasses.po b/library/dataclasses.po index 5b4c1f03..2b9f677a 100644 --- a/library/dataclasses.po +++ b/library/dataclasses.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 15:51+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -247,8 +248,8 @@ msgstr "" "c = C()\n" "c.mylist += [1, 2, 3]" -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 because ``None`` is a valid value for some parameters with a distinct meaning. No code should directly use the :const:`MISSING` value." -msgstr "همان‌طور که در بالا نشان داده شد، مقدار :const:`MISSING` یک شیء نشانگر (sentinel) است که برای تشخیص این‌که آیا برخی پارامترها توسط کاربر ارائه شده‌اند، استفاده می‌شود. این نشانگر به این دلیل استفاده می‌شود که ``None`` برای برخی پارامترها یک مقدار معتبر با معنایی متمایز است. هیچ کدی نباید به‌طور مستقیم از مقدار :const:`MISSING` استفاده کند." +msgid "As shown above, the :const:`MISSING` value is a :class:`sentinel` object used to detect if some parameters are provided by the user. This sentinel is used because ``None`` is a valid value for some parameters with a distinct meaning. No code should directly use the :const:`MISSING` value." +msgstr "همان‌طور که در بالا نشان داده شد، مقدار :const:`MISSING` یک شیء :class:`نشانگر ` است که برای تشخیص اینکه آیا برخی پارامترها توسط کاربر فراهم شده‌اند یا خیر، استفاده می‌شود. این نشانگر به این دلیل استفاده می‌شود که ``None`` یک مقدار معتبر برای برخی پارامترها با معنایی متمایز است. هیچ کدی نباید مستقیماً از مقدار :const:`MISSING` استفاده کند." msgid "The parameters to :func:`!field` are:" msgstr "پارامترهای :func:`!field` عبارتند از:" @@ -307,6 +308,9 @@ msgstr "" 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 "صفت کلاس :attr:`!C.z` برابر ``10`` خواهد بود، صفت کلاس :attr:`!C.t` برابر ``20`` خواهد بود، و صفات کلاس :attr:`!C.x` و :attr:`!C.y` تنظیم نخواهند شد." +msgid "If *metadata* is ``None``, use an empty :class:`frozendict`, instead of a :func:`~types.MappingProxyType` of an empty :class:`dict`." +msgstr "اگر *metadata* برابر با ``None`` باشد، به جای :func:`~types.MappingProxyType` یک :class:`dict` خالی، از یک :class:`frozendict` خالی استفاده کنید." + msgid ":class:`!Field` objects describe each defined field. These objects are created internally, and are returned by the :func:`fields` module-level method (see below). Users should never instantiate a :class:`!Field` object directly. Its documented attributes are:" msgstr "اشیای :class:`!Field` هر فیلد تعریف‌شده را توصیف می‌کنند. این اشیاء به‌صورت داخلی ایجاد می‌شوند و توسط متد :func:`fields` در سطح ماژول برگردانده می‌شوند (در زیر ببینید). کاربران هرگز نباید یک شیء :class:`!Field` را مستقیماً نمونه‌سازی کنند. ویژگی‌های مستندشده‌ی آن عبارت‌اند از:" @@ -328,8 +332,8 @@ msgstr "حاشیه‌نویسی‌های نوع ``InitVar[T]`` متغیرهای 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. Raises :exc:`TypeError` if not passed a dataclass or instance of one. Does not return pseudo-fields which are ``ClassVar`` or ``InitVar``." msgstr "تاپلی از اشیای :class:`Field` برمی‌گرداند که فیلدهای این دیتاکلاس را تعریف می‌کنند. یک دیتاکلاس یا نمونه‌ای از دیتاکلاس را می‌پذیرد. اگر دیتاکلاس یا نمونه‌ای از آن پاس داده نشود، :exc:`TypeError` را پرتاب می‌کند. شبه‌فیلدهایی که ``ClassVar`` یا ``InitVar`` باشند را برنمی‌گرداند." -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 ``name: value`` pairs. dataclasses, dicts, lists, and tuples are recursed into. Other objects are copied with :func:`copy.deepcopy`." -msgstr "دیتاکلاس *obj* را به یک دیکشنری تبدیل می‌کند (با استفاده از تابع کارخانه‌ای *dict_factory*). هر دیتاکلاس به دیکشنری از فیلدهای آن، به‌صورت جفت‌های ``name: value`` تبدیل می‌شود. دیتاکلاس‌ها، دیکشنری‌ها، فهرست‌ها و تاپل‌ها به‌صورت بازگشتی پردازش می‌شوند. سایر اشیاء با :func:`copy.deepcopy` کپی می‌شوند." +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 ``name: value`` pairs. dataclasses, dicts, frozendicts, lists, and tuples are recursed into. Other objects are copied with :func:`copy.deepcopy`." +msgstr "دیتاکلاس *obj* را به یک دیکشنری تبدیل می‌کند (با استفاده از تابع کارخانه‌ای *dict_factory*). هر دیتاکلاس به دیکشنری‌ای از فیلدهای خود به صورت جفت‌های ``name: value`` تبدیل می‌شود. درون دیتاکلاس‌ها، دیکشنری‌ها، frozendictها، فهرست‌ها و تاپل‌ها بازگشت انجام می‌شود (بازگشتی پیمایش می‌شوند). سایر شیءها با :func:`copy.deepcopy` کپی می‌شوند." msgid "Example of using :func:`!asdict` on nested dataclasses::" msgstr "مثالی از استفاده از :func:`!asdict` روی دیتاکلاس‌های تودرتو::" @@ -374,8 +378,8 @@ msgstr "{field.name: getattr(obj, field.name) for field in fields(obj)}" msgid ":func:`!asdict` raises :exc:`TypeError` if *obj* is not a dataclass instance." msgstr ":func:`!asdict` در صورتی که *obj* نمونه‌ای از دیتاکلاس نباشد، :exc:`TypeError` را پرتاب می‌کند." -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 values. dataclasses, dicts, lists, and tuples are recursed into. Other objects are copied with :func:`copy.deepcopy`." -msgstr "دیتاکلاس *obj* را به یک تاپل تبدیل می‌کند (با استفاده از تابع کارخانه‌ای *tuple_factory*). هر دیتاکلاس به یک تاپل از مقادیر فیلدهای آن تبدیل می‌شود. دیتاکلاس‌ها، دیکشنری‌ها، فهرست‌ها و تاپل‌ها به‌صورت بازگشتی پیمایش می‌شوند. سایر اشیاء با :func:`copy.deepcopy` کپی می‌شوند." +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 values. dataclasses, dicts, frozendicts, lists, and tuples are recursed into. Other objects are copied with :func:`copy.deepcopy`." +msgstr "دیتاکلاس *obj* را به یک تاپل تبدیل می‌کند (با استفاده از تابع کارخانه‌ای *tuple_factory*). هر دیتاکلاس به تاپلی از مقدارهای فیلد خود تبدیل می‌شود. درون دیتاکلاس‌ها، دیکشنری‌ها، frozendictها، فهرست‌ها و تاپل‌ها بازگشت انجام می‌شود (بازگشتی پیمایش می‌شوند). سایر شیءها با :func:`copy.deepcopy` کپی می‌شوند." msgid "Continuing from the previous example::" msgstr "در ادامه از مثال پیشین::" @@ -474,11 +478,14 @@ msgstr "" "def is_dataclass_instance(obj):\n" " return is_dataclass(obj) and not isinstance(obj, type)" -msgid "A sentinel value signifying a missing default or default_factory." -msgstr "یک مقدار نشانگر (sentinel) که نشان‌دهنده‌ی نبود default یا default_factory است." +msgid "A :class:`sentinel` object signifying a missing default or *default_factory*." +msgstr "یک شیء :class:`نشانگر ` که نشان‌دهنده‌ی یک پیش‌فرضِ گم‌شده یا *default_factory* است." + +msgid ":const:`!MISSING` is now a :class:`sentinel` object." +msgstr ":const:`!MISSING` اکنون یک شیء :class:`sentinel` است." -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 that a pseudo-field of type :const:`!KW_ONLY` is otherwise completely ignored. This includes the name of such a field. By convention, a name of ``_`` is used for a :const:`!KW_ONLY` field. Keyword-only fields signify :meth:`~object.__init__` parameters that must be specified as keywords when the class is instantiated." -msgstr "یک مقدار نشانگر (sentinel value) که به‌عنوان حاشیه‌نویسی نوع استفاده می‌شود. هر فیلدی که پس از یک شبه‌فیلد (pseudo-field) با نوع :const:`!KW_ONLY` قرار گیرد، به‌عنوان فیلد فقط کلیدواژه‌ای علامت‌گذاری می‌شود. توجه داشته باشید که یک شبه‌فیلد از نوع :const:`!KW_ONLY` در موارد دیگر به‌طور کامل نادیده گرفته می‌شود. این موضوع شامل نام چنین فیلدی نیز می‌شود. طبق قرارداد، برای یک فیلد :const:`!KW_ONLY` از نام ``_`` استفاده می‌شود. فیلدهای فقط کلیدواژه‌ای نشان می‌دهند که پارامترهای :meth:`~object.__init__` باید هنگام نمونه‌سازی از کلاس به‌صورت کلیدواژه مشخص شوند." +msgid "A :class:`sentinel` object 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 that a pseudo-field of type :const:`!KW_ONLY` is otherwise completely ignored. This includes the name of such a field. By convention, a name of ``_`` is used for a :const:`!KW_ONLY` field. Keyword-only fields signify :meth:`~object.__init__` parameters that must be specified as keywords when the class is instantiated." +msgstr "یک شیء :class:`sentinel` که به‌عنوان حاشیه‌نویسی نوع استفاده می‌شود. هر فیلدی پس از یک فیلد کاذب با نوع :const:`!KW_ONLY` به‌عنوان فیلد فقط-کلیدواژه علامت‌گذاری می‌شود. توجه داشته باشید که فیلد کاذب با نوع :const:`!KW_ONLY` در غیر این صورت کاملاً نادیده گرفته می‌شود. این شامل نام چنین فیلدی نیز می‌شود. طبق قرارداد، نام ``_`` برای یک فیلد :const:`!KW_ONLY` استفاده می‌شود. فیلدهای فقط-کلیدواژه نمایانگر :meth:`~object.__init__` پارامترهایی هستند که هنگام نمونه‌سازی کلاس باید به‌عنوان کلیدواژه مشخص شوند." msgid "In this example, the fields ``y`` and ``z`` will be marked as keyword-only fields::" msgstr "در این مثال، فیلدهای ``y`` و ``z`` به‌عنوان فیلدهای فقط کلیدواژه‌ای علامت‌گذاری خواهند شد::" @@ -505,6 +512,9 @@ msgstr "" msgid "In a single dataclass, it is an error to specify more than one field whose type is :const:`!KW_ONLY`." msgstr "در یک دیتاکلاس واحد، مشخص کردن بیش از یک فیلد که نوع آن :const:`!KW_ONLY` باشد، خطا است." +msgid ":const:`!KW_ONLY` is now a :class:`sentinel` object." +msgstr ":const:`!KW_ONLY` اکنون یک شیء :class:`sentinel` است." + 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 "هنگامی پرتاب می‌شود که یک :meth:`~object.__setattr__` یا :meth:`~object.__delattr__` تعریف‌شده به‌صورت ضمنی، روی یک دیتاکلاس که با ``frozen=True`` تعریف شده باشد، فراخوانی شود. این استثنا زیرکلاسی از :exc:`AttributeError` است." diff --git a/library/datatypes.po b/library/datatypes.po index f872461f..8c00d4ed 100644 --- a/library/datatypes.po +++ b/library/datatypes.po @@ -6,12 +6,13 @@ # Translators: # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 01:04+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -27,8 +28,8 @@ msgstr "انواع داده" msgid "The modules described in this chapter provide a variety of specialized data types such as dates and times, fixed-type arrays, heap queues, double-ended queues, and enumerations." msgstr "ماژول‌های توصیف‌شده در این فصل، انواع داده تخصصی متنوعی مانند تاریخ‌ها و زمان‌ها، آرایه‌های با نوع ثابت، صف‌های heap (heap queues)، صف‌های دوطرفه و شمارش‌ها را فراهم می‌کنند." -msgid "Python also provides some built-in data types, in particular, :class:`dict`, :class:`list`, :class:`set` and :class:`frozenset`, and :class:`tuple`. The :class:`str` class is used to hold Unicode strings, and the :class:`bytes` and :class:`bytearray` classes are used to hold binary data." -msgstr "پایتون همچنین برخی از انواع داده‌ی توکار را فراهم می‌کند، به‌ویژه :class:`dict`، :class:`list`، :class:`set` و :class:`frozenset`، و :class:`tuple`. کلاس :class:`str` برای نگهداری رشته‌های یونیکد استفاده می‌شود، و کلاس‌های :class:`bytes` و :class:`bytearray` برای نگهداری داده‌های دودویی استفاده می‌شوند." +msgid "Python also provides :ref:`some built-in data types `, in particular, :class:`list`, :class:`tuple`, :class:`dict`, :class:`frozendict`, :class:`set`, and :class:`frozenset`. The :class:`str` class is used to hold Unicode strings, and the :class:`bytes` and :class:`bytearray` classes are used to hold binary data." +msgstr "پایتون همچنین :ref:`برخی از انواع داده‌ی توکار `، به‌ویژه :class:`list`، :class:`tuple`، :class:`dict`، :class:`frozendict`، :class:`set` و :class:`frozenset` را فراهم می‌کند. کلاس :class:`str` برای نگهداری رشته‌های یونیکد و کلاس‌های :class:`bytes` و :class:`bytearray` برای نگهداری داده‌های دودویی استفاده می‌شوند." msgid "The following modules are documented in this chapter:" msgstr "ماژول‌های زیر در این فصل مستند شده‌اند:" diff --git a/library/datetime.po b/library/datetime.po index 7edd2652..fcc103cb 100644 --- a/library/datetime.po +++ b/library/datetime.po @@ -9,12 +9,13 @@ # Parham Forati, 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 14:43+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -595,6 +596,9 @@ msgstr "این ممکن است در صورتی که برچسب زمانی خار msgid "Raise :exc:`OverflowError` instead of :exc:`ValueError` if the timestamp is out of the range of values supported by the platform C :c:func:`localtime` function. Raise :exc:`OSError` instead of :exc:`ValueError` on :c:func:`localtime` failure." msgstr "اگر برچسب زمانی خارج از محدوده مقادیر پشتیبانی‌شده توسط تابع :c:func:`localtime` در C پلتفرم باشد، :exc:`OverflowError` به جای :exc:`ValueError` پرتاب می‌شود. در صورت شکست :c:func:`localtime`، :exc:`OSError` به جای :exc:`ValueError` پرتاب می‌شود." +msgid "Accepts any real number as *timestamp*, not only integer or float." +msgstr "هر عدد حقیقی را به‌عنوان *timestamp* می‌پذیرد، نه فقط عدد صحیح یا float." + msgid "Return the date corresponding to the proleptic Gregorian *ordinal*, where January 1 of year 1 has ordinal 1." msgstr "تاریخ متناظر با *ordinal* در گاه‌شماری میلادی تعمیم‌یافته (proleptic Gregorian) را برمی‌گرداند؛ به‌طوری‌که ۱ ژانویه سال ۱ دارای شماره ترتیبی ۱ است." @@ -648,8 +652,8 @@ msgstr "date(*(time.strptime(date_string, format)[0:3]))" msgid ":exc:`ValueError` is raised if the date_string and format can't be parsed by :func:`time.strptime` or if it returns a value which isn't a time tuple. See also :ref:`strftime-strptime-behavior` and :meth:`date.fromisoformat`." msgstr ":exc:`ValueError` در صورتی پرتاب می‌شود که date_string و format توسط :func:`time.strptime` قابل تجزیه نباشند یا این تابع مقداری برگرداند که یک تاپل زمانیی (time tuple) نیست. همچنین ببینید :ref:`strftime-strptime-behavior` و :meth:`date.fromisoformat`." -msgid "If *format* specifies a day of month without a year a :exc:`DeprecationWarning` is emitted. This is to avoid a quadrennial leap year bug in code seeking to parse only a month and day as the default year used in absence of one in the format is not a leap year. Such *format* values may raise an error as of Python 3.15. The workaround is to always include a year in your *format*. If parsing *date_string* values that do not have a year, explicitly add a year that is a leap year before parsing:" -msgstr "اگر *format* روزی از ماه را بدون سال تعیین کند، یک :exc:`DeprecationWarning` نشان داده می‌شود. این کار برای اجتناب از یک اشکال چهارساله‌ی مربوط به سال کبیسه در کدی است که فقط به دنبال تجزیه‌ی ماه و روز است، زیرا سال پیش‌فرضی که در نبود سال در قالب استفاده می‌شود، سال کبیسه نیست. چنین مقادیر *format* ممکن است از پایتون 3.15 به بعد خطایی پرتاب کنند. راه‌حل این است که همیشه یک سال را در *format* خود بگنجانید. اگر مقادیر *date_string* را که سال ندارند تجزیه می‌کنید، پیش از تجزیه به‌صراحت یک سال کبیسه اضافه کنید:" +msgid "If *format* specifies a day of month (``%d``) without a year, :exc:`ValueError` is raised. This is to avoid a quadrennial leap year bug in code seeking to parse only a month and day as the default year used in absence of one in the format is not a leap year. The workaround is to always include a year in your *format*. If parsing *date_string* values that do not have a year, explicitly add a year that is a leap year before parsing:" +msgstr "اگر *format* روزی از ماه (``%d``) را بدون سال مشخص کند، خطای :exc:`ValueError` بالا می‌آید. این کار برای جلوگیری از بروز باگ سال کبیسه‌ی چهارساله در کدهایی است که می‌خواهند فقط ماه و روز را تجزیه کنند؛ زیرا سال پیش‌فرض در صورت نبود سال در قالب، یک سال کبیسه نیست. راه‌حل جایگزین این است که همیشه یک سال را در *format* خود بگنجانید. اگر مقادیر *date_string* را که سالی ندارند تجزیه می‌کنید، پیش از تجزیه، به‌صورت صریح سالی را اضافه کنید که کبیسه باشد:" msgid "" ">>> import datetime as dt\n" @@ -1118,9 +1122,6 @@ msgstr "از آن‌جا که بسیاری از متدهای ``datetime`` با msgid "Raise :exc:`OverflowError` instead of :exc:`ValueError` if the timestamp is out of the range of values supported by the platform C :c:func:`gmtime` function. Raise :exc:`OSError` instead of :exc:`ValueError` on :c:func:`gmtime` failure." msgstr "اگر برچسب زمانی خارج از محدوده مقادیر پشتیبانی‌شده توسط تابع :c:func:`gmtime` در زبان C پلتفرم باشد، :exc:`OverflowError` به‌جای :exc:`ValueError` پرتاب می‌شود. در صورت شکست :c:func:`gmtime`، :exc:`OSError` به‌جای :exc:`ValueError` پرتاب می‌شود." -msgid "Accepts any real number as *timestamp*, not only integer or float." -msgstr "هر عدد حقیقی را به‌عنوان *timestamp* می‌پذیرد، نه فقط عدد صحیح یا float." - msgid "Use :meth:`datetime.fromtimestamp` with :const:`UTC` instead." msgstr "به‌جای آن از :meth:`datetime.fromtimestamp` با :const:`UTC` استفاده کنید." @@ -1209,9 +1210,6 @@ msgstr "datetime(*(time.strptime(date_string, format)[0:6]))" msgid ":exc:`ValueError` is raised if the date_string and format can't be parsed by :func:`time.strptime` or if it returns a value which isn't a time tuple. See also :ref:`strftime-strptime-behavior` and :meth:`datetime.fromisoformat`." msgstr ":exc:`ValueError` پرتاب می‌شود اگر date_string و format توسط :func:`time.strptime` قابل تجزیه نباشند یا اگر مقداری برگرداند که یک تاپل زمانیی نباشد. همچنین :ref:`strftime-strptime-behavior` و :meth:`datetime.fromisoformat` را ببینید." -msgid "If *format* specifies a day of month without a year a :exc:`DeprecationWarning` is now emitted. This is to avoid a quadrennial leap year bug in code seeking to parse only a month and day as the default year used in absence of one in the format is not a leap year. Such *format* values may raise an error as of Python 3.15. The workaround is to always include a year in your *format*. If parsing *date_string* values that do not have a year, explicitly add a year that is a leap year before parsing:" -msgstr "اگر *format* روزی از ماه را بدون سال تعیین کند، اکنون یک :exc:`DeprecationWarning` نشان داده می‌شود. این کار برای اجتناب از یک باگ سال کبیسه‌ای چهارساله در کدی است که می‌خواهد فقط ماه و روز را تجزیه کند، زیرا سال پیش‌فرضی که در نبود سال در قالب استفاده می‌شود، سال کبیسه نیست. چنین مقادیری برای *format* ممکن است از پایتون 3.15 به بعد خطایی پرتاب کنند. راه‌حل این است که همیشه یک سال در *format* خود بگنجانید. اگر مقادیر *date_string* بدون سال را تجزیه می‌کنید، پیش از تجزیه به‌صراحت یک سال کبیسه اضافه کنید:" - msgid "" ">>> import datetime as dt\n" ">>> date_string = \"02/29\"\n" @@ -2778,8 +2776,8 @@ msgstr "" ">>> _.strftime('%a %d %b %Y, %I:%M%p')\n" "'Mon 31 Jan 2022, 11:59PM'" -msgid "The following is a list of all the format codes that the 1989 C standard requires, and these work on all platforms with a standard C implementation." -msgstr "فهرست زیر شامل تمام کدهای قالب‌بندی است که استاندارد C سال ۱۹۸۹ آن‌ها را الزامی می‌کند، و این کدها روی تمام سکوهای دارای پیاده‌سازی استاندارد C کار می‌کنند." +msgid "The following is a list of all the format codes that the 2011 C standard requires, and these work on all supported platforms." +msgstr "در ادامه فهرست تمامی کدهای قالبی که استاندارد C در سال ۲۰۱۱ الزامی کرده است آمده و این موارد روی تمام پلتفرم‌های پشتیبانی‌شده کار می‌کنند." msgid "Directive" msgstr "دایرکتیو" @@ -2817,27 +2815,6 @@ msgstr "Sunday, Monday, ..., Saturday (en_US);" msgid "Sonntag, Montag, ..., Samstag (de_DE)" msgstr "Sonntag, Montag, ..., Samstag (de_DE)" -msgid "``%w``" -msgstr "``%w``" - -msgid "Weekday as a decimal number, where 0 is Sunday and 6 is Saturday." -msgstr "روز هفته به‌صورت عدد دهدهی، که در آن ۰ یکشنبه و ۶ شنبه است." - -msgid "0, 1, ..., 6" -msgstr "0, 1, ..., 6" - -msgid "``%d``" -msgstr "``%d``" - -msgid "Day of the month as a zero-padded decimal number." -msgstr "روز ماه به‌صورت عدد دهدهی با صفرهای پیشرو." - -msgid "01, 02, ..., 31" -msgstr "01, 02, ..., 31" - -msgid "\\(9)" -msgstr "\\(9)" - msgid "``%b``" msgstr "``%b``" @@ -2862,33 +2839,105 @@ msgstr "January, February, ..., December (en_US);" msgid "Januar, Februar, ..., Dezember (de_DE)" msgstr "Januar, Februar, ..., Dezember (de_DE)" -msgid "``%m``" -msgstr "``%m``" +msgid "``%c``" +msgstr "``%c``" -msgid "Month as a zero-padded decimal number." -msgstr "ماه به‌صورت عدد دهدهی با صفر پر شده." +msgid "Locale's appropriate date and time representation." +msgstr "نمایش مناسب تاریخ و زمان بر اساس تنظیمات locale ." -msgid "01, 02, ..., 12" -msgstr "01, 02, ..., 12" +msgid "Tue Aug 16 21:30:00 1988 (en_US);" +msgstr "Tue Aug 16 21:30:00 1988 (en_US);" -msgid "``%y``" -msgstr "``%y``" +msgid "Di 16 Aug 21:30:00 1988 (de_DE)" +msgstr "Di 16 Aug 21:30:00 1988 (de_DE)" -msgid "Year without century as a zero-padded decimal number." -msgstr "سال بدون قرن به‌صورت عدد دهدهی با صفرِ پیش‌رو." +msgid "``%C``" +msgstr "``%C``" + +msgid "The year divided by 100 and truncated to an integer as a zero-padded decimal number." +msgstr "سال تقسیم بر ۱۰۰ و قطع‌شده به یک عدد صحیح به‌عنوان یک عدد دهدهی پرشده با صفر." + +msgid "01, 02, ..., 99" +msgstr "01, 02, ..., 99" + +msgid "\\(0)" +msgstr "\\(0)" + +msgid "``%d``" +msgstr "``%d``" + +msgid "Day of the month as a zero-padded decimal number." +msgstr "روز ماه به‌صورت عدد دهدهی با صفرهای پیشرو." + +msgid "01, 02, ..., 31" +msgstr "01, 02, ..., 31" + +msgid "\\(9), \\(10)" +msgstr "\\(9), \\(10)" + +msgid "``%D``" +msgstr "``%D``" + +msgid "Equivalent to ``%m/%d/%y``." +msgstr "معادل ``%m/%d/%y``." + +msgid "11/28/25" +msgstr "11/28/25" + +msgid "\\(9)" +msgstr "\\(9)" + +msgid "``%e``" +msgstr "``%e``" + +msgid "The day of the month as a space-padded decimal number." +msgstr "روز ماه به‌عنوان یک عدد دهدهی پرشده با فاصله." + +msgid "␣1, ␣2, ..., 31" +msgstr "␣1, ␣2, ..., 31" + +msgid "\\(10)" +msgstr "\\(10)" + +msgid "``%F``" +msgstr "``%F``" + +msgid "Equivalent to ``%Y-%m-%d``, the ISO 8601 format." +msgstr "معادل با ``%Y-%m-%d``، قالب ISO 8601." + +msgid "2025-10-11, 1001-12-30" +msgstr "2025-10-11, 1001-12-30" + +msgid "``%g``" +msgstr "``%g``" + +msgid "Last 2 digits of ISO 8601 year representing the year that contains the greater part of the ISO week (``%V``)." +msgstr "۲ رقم آخر سال ISO 8601 که نمایانگر سال شامل بخش بزرگ‌تری از هفته‌ی ISO (``%V``) است." msgid "00, 01, ..., 99" msgstr "00, 01, ..., 99" -msgid "``%Y``" -msgstr "``%Y``" +msgid "``%G``" +msgstr "``%G``" -msgid "Year with century as a decimal number." -msgstr "سال همراه با قرن به‌صورت عدد دهدهی." +msgid "ISO 8601 year with century representing the year that contains the greater part of the ISO week (``%V``)." +msgstr "سال ISO 8601 همراه با قرن، نشان‌دهنده‌ی سالی که بخش بزرگ‌تر هفته‌ی ISO (``%V``) در آن قرار دارد." msgid "0001, 0002, ..., 2013, 2014, ..., 9998, 9999" msgstr "0001, 0002, ..., 2013, 2014, ..., 9998, 9999" +msgid "\\(8)" +msgstr "\\(8)" + +msgid "``%h``" +msgstr "``%h``" + +msgid "Equivalent to ``%b``." +msgstr "معادل ``%b``." + +msgid "See ``%b``." +msgstr "به ``%b`` مراجعه کنید." + msgid "``%H``" msgstr "``%H``" @@ -2904,6 +2953,42 @@ msgstr "``%I``" msgid "Hour (12-hour clock) as a zero-padded decimal number." msgstr "ساعت (ساعت ۱۲ ساعته) به‌صورت عدد دهدهی با صفر پرشده." +msgid "01, 02, ..., 12" +msgstr "01, 02, ..., 12" + +msgid "``%j``" +msgstr "``%j``" + +msgid "Day of the year as a zero-padded decimal number." +msgstr "روز سال به‌صورت عدد دهدهی با صفر پرشده." + +msgid "001, 002, ..., 366" +msgstr "001, 002, ..., 366" + +msgid "``%m``" +msgstr "``%m``" + +msgid "Month as a zero-padded decimal number." +msgstr "ماه به‌صورت عدد دهدهی با صفر پر شده." + +msgid "``%M``" +msgstr "``%M``" + +msgid "Minute as a zero-padded decimal number." +msgstr "دقیقه به‌صورت یک عدد ده‌دهی پر شده با صفر." + +msgid "00, 01, ..., 59" +msgstr "00, 01, ..., 59" + +msgid "``%n``" +msgstr "``%n``" + +msgid "The newline character (``'\\n'``). For :meth:`!strptime`, zero or more whitespace." +msgstr "نویسه‌ی خط جدید (``'\\n'``). برای :meth:`!strptime`، صفر یا چند فضای خالی." + +msgid "``\\n``" +msgstr "``\\n``" + msgid "``%p``" msgstr "``%p``" @@ -2919,14 +3004,26 @@ msgstr "am, pm (de_DE)" msgid "\\(1), \\(3)" msgstr "\\(1), \\(3)" -msgid "``%M``" -msgstr "``%M``" +msgid "``%r``" +msgstr "``%r``" -msgid "Minute as a zero-padded decimal number." -msgstr "دقیقه به‌صورت یک عدد ده‌دهی پر شده با صفر." +msgid "Locale's 12-hour clock time." +msgstr "زمان ساعت ۱۲ ساعته‌ی locale." -msgid "00, 01, ..., 59" -msgstr "00, 01, ..., 59" +msgid "12:00:00 AM" +msgstr "۱۲:۰۰:۰۰ ب.ظ" + +msgid "\\(1), \\(0)" +msgstr "\\(1), \\(0)" + +msgid "``%R``" +msgstr "``%R``" + +msgid "Equivalent to ``%H:%M``." +msgstr "معادل ``%H:%M``." + +msgid "10:01" +msgstr "۱۰:۰۱" msgid "``%S``" msgstr "``%S``" @@ -2937,47 +3034,32 @@ msgstr "ثانیه به‌صورت عدد ده‌دهی با صفر پرشده." msgid "\\(4), \\(9)" msgstr "\\(4), \\(9)" -msgid "``%f``" -msgstr "``%f``" +msgid "``%t``" +msgstr "``%t``" -msgid "Microsecond as a decimal number, zero-padded to 6 digits." -msgstr "میکروثانیه به‌صورت عدد دهدهی، با صفر پر شده تا ۶ رقم." +msgid "The tab character (``'\\t'``). For :meth:`!strptime`, zero or more whitespace." +msgstr "نویسه‌ی تب (``'\\t'``). برای :meth:`!strptime`، صفر یا چند فضای خالی." -msgid "000000, 000001, ..., 999999" -msgstr "000000, 000001, ..., 999999" +msgid "``\\t``" +msgstr "``\\t``" -msgid "\\(5)" -msgstr "\\(5)" +msgid "``%T``" +msgstr "``%T``" -msgid "``%z``" -msgstr "``%z``" +msgid "ISO 8601 time format, equivalent to ``%H:%M:%S``." +msgstr "قالب زمان ISO 8601، معادل ``%H:%M:%S``." -msgid "UTC offset in the form ``±HHMM[SS[.ffffff]]`` (empty string if the object is naive)." -msgstr "اختلاف از UTC در قالب ``±HHMM[SS[.ffffff]]`` (اگر شیء ساده باشد، رشته خالی)." - -msgid "(empty), +0000, -0400, +1030, +063415, -030712.345216" -msgstr "(empty), +0000, -0400, +1030, +063415, -030712.345216" - -msgid "\\(6)" -msgstr "\\(6)" - -msgid "``%Z``" -msgstr "``%Z``" - -msgid "Time zone name (empty string if the object is naive)." -msgstr "نام منطقه زمانی (رشته خالی اگر شیء ساده باشد)." - -msgid "(empty), UTC, GMT" -msgstr "(empty), UTC, GMT" +msgid "10:01:59" +msgstr "۱۰:۰۱:۵۹" -msgid "``%j``" -msgstr "``%j``" +msgid "``%u``" +msgstr "``%u``" -msgid "Day of the year as a zero-padded decimal number." -msgstr "روز سال به‌صورت عدد دهدهی با صفر پرشده." +msgid "ISO 8601 weekday as a decimal number where 1 is Monday." +msgstr "روز هفته در ISO 8601 به‌صورت عدد دهدهی که در آن ۱ دوشنبه است." -msgid "001, 002, ..., 366" -msgstr "001, 002, ..., 366" +msgid "1, 2, ..., 7" +msgstr "1, 2, ..., 7" msgid "``%U``" msgstr "``%U``" @@ -2991,23 +3073,32 @@ msgstr "00, 01, ..., 53" msgid "\\(7), \\(9)" msgstr "\\(7), \\(9)" -msgid "``%W``" -msgstr "``%W``" +msgid "``%V``" +msgstr "``%V``" -msgid "Week number of the year (Monday as the first day of the week) as a zero-padded decimal number. All days in a new year preceding the first Monday are considered to be in week 0." -msgstr "شماره‌ی هفته‌ی سال (دوشنبه به‌عنوان نخستین روز هفته) به‌صورت عدد دهدهی با صفر پرشده. همه‌ی روزهای سال جدید پیش از نخستین دوشنبه، در هفته‌ی ۰ در نظر گرفته می‌شوند." +msgid "ISO 8601 week as a decimal number with Monday as the first day of the week. Week 01 is the week containing Jan 4." +msgstr "هفته‌ی ISO 8601 به‌صورت عدد ده‌دهی با دوشنبه به‌عنوان نخستین روز هفته. هفته‌ی 01 هفته‌ای است که شامل ۴ ژانویه می‌شود." -msgid "``%c``" -msgstr "``%c``" +msgid "01, 02, ..., 53" +msgstr "01, 02, ..., 53" -msgid "Locale's appropriate date and time representation." -msgstr "نمایش مناسب تاریخ و زمان بر اساس تنظیمات locale ." +msgid "\\(8), \\(9)" +msgstr "\\(8), \\(9)" -msgid "Tue Aug 16 21:30:00 1988 (en_US);" -msgstr "Tue Aug 16 21:30:00 1988 (en_US);" +msgid "``%w``" +msgstr "``%w``" -msgid "Di 16 Aug 21:30:00 1988 (de_DE)" -msgstr "Di 16 Aug 21:30:00 1988 (de_DE)" +msgid "Weekday as a decimal number, where 0 is Sunday and 6 is Saturday." +msgstr "روز هفته به‌صورت عدد دهدهی، که در آن ۰ یکشنبه و ۶ شنبه است." + +msgid "0, 1, ..., 6" +msgstr "0, 1, ..., 6" + +msgid "``%W``" +msgstr "``%W``" + +msgid "Week number of the year (Monday as the first day of the week) as a zero-padded decimal number. All days in a new year preceding the first Monday are considered to be in week 0." +msgstr "شماره‌ی هفته‌ی سال (دوشنبه به‌عنوان نخستین روز هفته) به‌صورت عدد دهدهی با صفر پرشده. همه‌ی روزهای سال جدید پیش از نخستین دوشنبه، در هفته‌ی ۰ در نظر گرفته می‌شوند." msgid "``%x``" msgstr "``%x``" @@ -3036,6 +3127,39 @@ msgstr "21:30:00 (en_US);" msgid "21:30:00 (de_DE)" msgstr "21:30:00 (de_DE)" +msgid "``%y``" +msgstr "``%y``" + +msgid "Year without century as a zero-padded decimal number." +msgstr "سال بدون قرن به‌صورت عدد دهدهی با صفرِ پیش‌رو." + +msgid "``%Y``" +msgstr "``%Y``" + +msgid "Year with century as a decimal number." +msgstr "سال همراه با قرن به‌صورت عدد دهدهی." + +msgid "``%z``" +msgstr "``%z``" + +msgid "UTC offset in the form ``±HHMM[SS[.ffffff]]`` (empty string if the object is naive)." +msgstr "اختلاف از UTC در قالب ``±HHMM[SS[.ffffff]]`` (اگر شیء ساده باشد، رشته خالی)." + +msgid "(empty), +0000, -0400, +1030, +063415, -030712.345216" +msgstr "(empty), +0000, -0400, +1030, +063415, -030712.345216" + +msgid "\\(6)" +msgstr "\\(6)" + +msgid "``%Z``" +msgstr "``%Z``" + +msgid "Time zone name (empty string if the object is naive)." +msgstr "نام منطقه زمانی (رشته خالی اگر شیء ساده باشد)." + +msgid "(empty), UTC, GMT" +msgstr "(empty), UTC, GMT" + msgid "``%%``" msgstr "``%%``" @@ -3045,38 +3169,23 @@ msgstr "یک نویسه‌ی ``'%'`` به‌صورت لفظی." msgid "%" msgstr "%" -msgid "Several additional directives not required by the C89 standard are included for convenience. These parameters all correspond to ISO 8601 date values." -msgstr "چند دایرکتیو اضافی که استاندارد C89 آن‌ها را الزامی نمی‌داند، برای سهولت گنجانده شده‌اند. این پارامترها همگی با مقادیر تاریخ ISO 8601 مطابقت دارند." - -msgid "``%G``" -msgstr "``%G``" - -msgid "ISO 8601 year with century representing the year that contains the greater part of the ISO week (``%V``)." -msgstr "سال ISO 8601 همراه با قرن، نشان‌دهنده‌ی سالی که بخش بزرگ‌تر هفته‌ی ISO (``%V``) در آن قرار دارد." - -msgid "\\(8)" -msgstr "\\(8)" +msgid "The ISO 8601 year and ISO 8601 week directives are not interchangeable with the year and week number directives above. Calling :meth:`~.datetime.strptime` with incomplete or ambiguous ISO 8601 directives will raise a :exc:`ValueError`." +msgstr "دایرکتیوهای سال و شماره هفته در ISO 8601 با دایرکتیوهای سال و شماره هفته در بالا قابل‌جایگزینی نیستند. فراخوانی متد :meth:`~.datetime.strptime` با دایرکتیوهای ناقص یا مبهم ISO 8601 باعث ایجاد خطای :exc:`ValueError` خواهد شد." -msgid "``%u``" -msgstr "``%u``" +msgid "Several additional directives not required by the C11 standard are included for convenience." +msgstr "چندین دایرکتیو اضافی که توسط استاندارد C11 الزامی نشده‌اند، برای راحتی کار گنجانده شده‌اند." -msgid "ISO 8601 weekday as a decimal number where 1 is Monday." -msgstr "روز هفته در ISO 8601 به‌صورت عدد دهدهی که در آن ۱ دوشنبه است." - -msgid "1, 2, ..., 7" -msgstr "1, 2, ..., 7" - -msgid "``%V``" -msgstr "``%V``" +msgid "``%f``" +msgstr "``%f``" -msgid "ISO 8601 week as a decimal number with Monday as the first day of the week. Week 01 is the week containing Jan 4." -msgstr "هفته‌ی ISO 8601 به‌صورت عدد ده‌دهی با دوشنبه به‌عنوان نخستین روز هفته. هفته‌ی 01 هفته‌ای است که شامل ۴ ژانویه می‌شود." +msgid "Microsecond as a decimal number, zero-padded to 6 digits." +msgstr "میکروثانیه به‌صورت عدد دهدهی، با صفر پر شده تا ۶ رقم." -msgid "01, 02, ..., 53" -msgstr "01, 02, ..., 53" +msgid "000000, 000001, ..., 999999" +msgstr "000000, 000001, ..., 999999" -msgid "\\(8), \\(9)" -msgstr "\\(8), \\(9)" +msgid "\\(5)" +msgstr "\\(5)" msgid "``%:z``" msgstr "``%:z``" @@ -3087,17 +3196,17 @@ msgstr "فاصله زمانی از UTC در قالب ``±HH:MM[:SS[.ffffff]]`` ( msgid "(empty), +00:00, -04:00, +10:30, +06:34:15, -03:07:12.345216" msgstr "(خالی)، +00:00، -04:00، +10:30، +06:34:15، -03:07:12.345216" -msgid "These may not be available on all platforms when used with the :meth:`~.datetime.strftime` method. The ISO 8601 year and ISO 8601 week directives are not interchangeable with the year and week number directives above. Calling :meth:`~.datetime.strptime` with incomplete or ambiguous ISO 8601 directives will raise a :exc:`ValueError`." -msgstr "ممکن است این‌ها هنگام استفاده با متد :meth:`~.datetime.strftime` در همه سکوها در دسترس نباشند. دایرکتیوهای سال ISO 8601 و هفته ISO 8601 با دایرکتیوهای سال و شماره هفته در بالا قابل تعویض نیستند. فراخوانی :meth:`~.datetime.strptime` با دایرکتیوهای ناقص یا مبهم ISO 8601 باعث پرتاب :exc:`ValueError` می‌شود." - msgid "The full set of format codes supported varies across platforms, because Python calls the platform C library's :c:func:`strftime` function, and platform variations are common. To see the full set of format codes supported on your platform, consult the :manpage:`strftime(3)` documentation. There are also differences between platforms in handling of unsupported format specifiers." msgstr "مجموعه کامل کدهای قالب‌بندی پشتیبانی‌شده در پلتفرم‌های مختلف متفاوت است، زیرا پایتون تابع :c:func:`strftime` از کتابخانه C پلتفرم را فراخوانی می‌کند و تفاوت‌های بین پلتفرم‌ها رایج است. برای مشاهده مجموعه کامل کدهای قالب‌بندی پشتیبانی‌شده در پلتفرم شما، به مستندات :manpage:`strftime(3)` مراجعه کنید. همچنین در مدیریت مشخص‌کننده‌های قالب‌بندی پشتیبانی‌نشده، بین پلتفرم‌ها تفاوت‌هایی وجود دارد." msgid "``%G``, ``%u`` and ``%V`` were added." msgstr "``%G``، ``%u`` و ``%V`` افزوده شدند." -msgid "``%:z`` was added." -msgstr "``%:z`` افزوده شد." +msgid "``%:z`` was added for :meth:`~.datetime.strftime`." +msgstr "مقدار ``%:z`` برای :meth:`~.datetime.strftime` اضافه شد." + +msgid "``%D``, ``%F``, ``%n``, ``%t``, and ``%:z`` were added for :meth:`~.datetime.strptime`." +msgstr "مواردهای ``%D``، ``%F``، ``%n``، ``%t`` و ``%:z`` برای :meth:`~.datetime.strptime` اضافه شدند." msgid "Technical detail" msgstr "جزئیات فنی" @@ -3148,6 +3257,9 @@ msgstr "برای اشیای :class:`date`، نباید از کدهای قالب msgid "For the same reason, handling of format strings containing Unicode code points that can't be represented in the charset of the current locale is also platform-dependent. On some platforms such code points are preserved intact in the output, while on others ``strftime`` may raise :exc:`UnicodeError` or return an empty string instead." msgstr "به همین دلیل، پردازش رشته‌های قالب‌بندی حاوی نقاط کد یونیکد که در مجموعه نویسه‌های locale قابل بازنمایی نیستند نیز وابسته به سکو است. در برخی سکوها چنین نقاط کدی به‌صورت دست‌نخورده در خروجی حفظ می‌شوند، در حالی که در سکوهایی دیگر ``strftime`` ممکن است :exc:`UnicodeError` را پرتاب کند یا در عوض یک رشته‌ی خالی برگرداند." +msgid "This format code is currently unsupported by :meth:`~.datetime.strptime`." +msgstr "این کد قالب در حال حاضر توسط :meth:`~.datetime.strptime` پشتیبانی نمی‌شود." + msgid "Because the format depends on the current locale, care should be taken when making assumptions about the output value. Field orderings will vary (for example, \"month/day/year\" versus \"day/month/year\"), and the output may contain non-ASCII characters." msgstr "از آنجا که قالب به locale بستگی دارد، هنگامی که درباره‌ی مقدار خروجی فرض‌هایی می‌کنید، باید احتیاط کنید. ترتیب فیلدها متفاوت خواهد بود (برای مثال، «ماه/روز/سال» در برابر «روز/ماه/سال»)، و خروجی ممکن است شامل نویسه‌های غیر ASCII باشد." @@ -3178,11 +3290,14 @@ msgstr "برای یک شیء آگاه :" msgid ":meth:`~.datetime.utcoffset` is transformed into a string of the form ``±HHMM[SS[.ffffff]]``, where ``HH`` is a 2-digit string giving the number of UTC offset hours, ``MM`` is a 2-digit string giving the number of UTC offset minutes, ``SS`` is a 2-digit string giving the number of UTC offset seconds and ``ffffff`` is a 6-digit string giving the number of UTC offset microseconds. The ``ffffff`` part is omitted when the offset is a whole number of seconds and both the ``ffffff`` and the ``SS`` part is omitted when the offset is a whole number of minutes. For example, if :meth:`~.datetime.utcoffset` returns ``timedelta(hours=-3, minutes=-30)``, ``%z`` is replaced with the string ``'-0330'``." msgstr ":meth:`~.datetime.utcoffset` به رشته‌ای به شکل ``±HHMM[SS[.ffffff]]`` تبدیل می‌شود، که در آن ``HH`` رشته‌ای ۲ رقمی است که تعداد ساعت‌های اختلاف از UTC را نشان می‌دهد، ``MM`` رشته‌ای ۲ رقمی است که تعداد دقیقه‌های اختلاف از UTC را نشان می‌دهد، ``SS`` رشته‌ای ۲ رقمی است که تعداد ثانیه‌های اختلاف از UTC را نشان می‌دهد و ``ffffff`` رشته‌ای ۶ رقمی است که تعداد میکروثانیه‌های اختلاف از UTC را نشان می‌دهد. بخش ``ffffff`` زمانی حذف می‌شود که اختلاف، عدد حسابی‌ای بر حسب ثانیه باشد و هنگامی که اختلاف، عدد حسابی‌ای بر حسب دقیقه باشد، هر دو بخش ``ffffff`` و ``SS`` حذف می‌شوند. برای مثال، اگر :meth:`~.datetime.utcoffset` مقدار ``timedelta(hours=-3, minutes=-30)`` را برگرداند، ``%z`` با رشته‌ی ``'-0330'`` جایگزین می‌شود." -msgid "When the ``%z`` directive is provided to the :meth:`~.datetime.strptime` method, the UTC offsets can have a colon as a separator between hours, minutes and seconds. For example, ``'+01:00:00'`` will be parsed as an offset of one hour. In addition, providing ``'Z'`` is identical to ``'+00:00'``." -msgstr "هنگامی که دایرکتیو ``%z`` به متد :meth:`~.datetime.strptime` ارائه شود، انحراف‌های UTC می‌توانند دارای علامت دونقطه به‌عنوان جداکننده بین ساعت‌ها، دقیقه‌ها و ثانیه‌ها باشند. برای مثال، ``'+01:00:00'`` به‌عنوان انحرافی به اندازه یک ساعت تجزیه می‌شود. علاوه بر این، ارائه ``'Z'`` معادل ``'+00:00'`` است." +msgid "When the ``%z`` directive is provided to the :meth:`~.datetime.strptime` method, the UTC offsets can have a colon as a separator between hours, minutes and seconds. For example, both ``'+010000'`` and ``'+01:00:00'`` will be parsed as an offset of one hour. In addition, providing ``'Z'`` is identical to ``'+00:00'``." +msgstr "هنگامی که دایرکتیو ``%z`` به متد :meth:`~.datetime.strptime` داده می‌شود، آفست‌های UTC می‌توانند دارای یک علامت دونقطه به‌عنوان جداکننده بین ساعت‌ها، دقایق و ثانیه‌ها باشند. برای مثال، هر دو مقدار ``'+010000'`` و ``'+01:00:00'`` به‌عنوان آفستی برابر با یک ساعت تجزیه خواهند شد. علاوه بر این، ارائه‌ی ``'Z'`` با ``'+00:00'`` یکسان است." -msgid "Behaves exactly as ``%z``, but has a colon separator added between hours, minutes and seconds." -msgstr "دقیقاً مانند ``%z`` رفتار می‌کند، اما یک دونقطه به‌عنوان جداکننده بین ساعت‌ها، دقیقه‌ها و ثانیه‌ها اضافه شده است." +msgid "When used with :meth:`~.datetime.strftime`, behaves exactly as ``%z``, except that a colon separator is added between hours, minutes and seconds." +msgstr "هنگامی که با :meth:`~.datetime.strftime` استفاده می‌شود، دقیقاً مانند ``%z`` رفتار می‌کند، با این تفاوت که یک جداکننده‌ی دونقطه بین ساعت‌ها، دقایق و ثانیه‌ها اضافه می‌شود." + +msgid "When used with :meth:`~.datetime.strptime`, the UTC offset is *required* to have a colon as a separator between hours, minutes and seconds. For example, ``'+01:00:00'`` (but *not* ``'+010000'``) will be parsed as an offset of one hour. In addition, providing ``'Z'`` is identical to ``'+00:00'``." +msgstr "هنگامی که با :meth:`~.datetime.strptime` استفاده می‌شود، آفست UTC *باید* دارای یک دونقطه به‌عنوان جداکننده بین ساعت‌ها، دقایق و ثانیه‌ها باشد. برای مثال، ``'+01:00:00'`` (اما *نه* ``'+010000'``) به‌عنوان آفستی معادل یک ساعت تجزیه خواهد شد. علاوه بر این، ارائه‌ی ``'Z'`` با ``'+00:00'`` یکسان است." msgid "In :meth:`~.datetime.strftime`, ``%Z`` is replaced by an empty string if :meth:`~.datetime.tzname` returns ``None``; otherwise ``%Z`` is replaced by the returned value, which must be a string." msgstr "در :meth:`~.datetime.strftime`، اگر :meth:`~.datetime.tzname` مقدار ``None`` را برگرداند، ``%Z`` با یک رشته‌ی خالی جایگزین می‌شود؛ در غیر این صورت ``%Z`` با مقدار برگردانده‌شده جایگزین می‌شود، که باید یک رشته باشد." @@ -3223,8 +3338,11 @@ msgstr "" ">>> dt.datetime.strptime(f\"{month_day};1984\", \"%m/%d;%Y\") # No leap year bug.\n" "datetime.datetime(1984, 2, 29, 0, 0)" -msgid ":meth:`~.datetime.strptime` calls using a format string containing a day of month without a year now emit a :exc:`DeprecationWarning`. In 3.15 or later we may change this into an error or change the default year to a leap year. See :gh:`70647`." -msgstr "فراخوانی‌های :meth:`~.datetime.strptime` که از یک رشته قالب شامل روز ماه بدون سال استفاده می‌کنند، اکنون یک :exc:`DeprecationWarning` را نشان می‌دهند. در 3.15 یا بعد از آن ممکن است این را به یک خطا تغییر دهیم یا سال پیش‌فرض را به یک سال کبیسه تغییر دهیم. :gh:`70647` را ببینید." +msgid "Using ``%d`` without a year now raises :exc:`ValueError`." +msgstr "استفاده از ``%d`` بدون سال اکنون باعث ایجاد :exc:`ValueError` می‌شود." + +msgid ":meth:`~.datetime.strptime` calls using a format string containing ``%e`` without a year now emit a :exc:`DeprecationWarning`." +msgstr "فراخوانی‌های متد :meth:`~.datetime.strptime` که از یک رشته‌ی قالب‌بندی حاوی ``%e`` بدون سال استفاده می‌کنند، اکنون یک :exc:`DeprecationWarning` صادر می‌کنند." msgid "Footnotes" msgstr "پانویس‌ها" @@ -3243,3 +3361,9 @@ msgstr "% (درصد)" msgid "datetime format" msgstr "قالب datetime" + +#~ msgid "If *format* specifies a day of month without a year a :exc:`DeprecationWarning` is now emitted. This is to avoid a quadrennial leap year bug in code seeking to parse only a month and day as the default year used in absence of one in the format is not a leap year. Such *format* values may raise an error as of Python 3.15. The workaround is to always include a year in your *format*. If parsing *date_string* values that do not have a year, explicitly add a year that is a leap year before parsing:" +#~ msgstr "اگر *format* روزی از ماه را بدون سال تعیین کند، اکنون یک :exc:`DeprecationWarning` نشان داده می‌شود. این کار برای اجتناب از یک باگ سال کبیسه‌ای چهارساله در کدی است که می‌خواهد فقط ماه و روز را تجزیه کند، زیرا سال پیش‌فرضی که در نبود سال در قالب استفاده می‌شود، سال کبیسه نیست. چنین مقادیری برای *format* ممکن است از پایتون 3.15 به بعد خطایی پرتاب کنند. راه‌حل این است که همیشه یک سال در *format* خود بگنجانید. اگر مقادیر *date_string* بدون سال را تجزیه می‌کنید، پیش از تجزیه به‌صراحت یک سال کبیسه اضافه کنید:" + +#~ msgid "``%:z`` was added." +#~ msgstr "``%:z`` افزوده شد." diff --git a/library/dbm.po b/library/dbm.po index 36d770b1..bbf910a3 100644 --- a/library/dbm.po +++ b/library/dbm.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 09:10+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -41,8 +42,11 @@ msgstr ":mod:`dbm.gnu`" msgid ":mod:`dbm.ndbm`" msgstr ":mod:`dbm.ndbm`" -msgid "If none of these modules are installed, the slow-but-simple implementation in module :mod:`dbm.dumb` will be used. There is a `third party interface `_ to the Oracle Berkeley DB." -msgstr "اگر هیچ‌کدام از این ماژول‌ها نصب‌نشده باشند، از پیاده‌سازی کند اما ساده در ماژول :mod:`dbm.dumb` استفاده خواهد شد. یک `رابط شخص ثالث `_ برای Oracle Berkeley DB وجود دارد." +msgid "If none of these modules are installed, the slow-but-simple implementation in module :mod:`dbm.dumb` will be used. There is a `third party interface `_ to the Oracle Berkeley DB." +msgstr "اگر هیچ‌یک از این ماژول‌ها نصب نشده باشند، پیاده‌سازی کند-اما-ساده در ماژول :mod:`dbm.dumb` استفاده خواهد شد. یک `رابط شخص ثالث `_ برای پایگاه داده‌ی اوراکل برکلی (Oracle Berkeley DB) وجود دارد." + +msgid "None of the underlying modules will automatically shrink the disk space used by the database file. However, :mod:`dbm.sqlite3`, :mod:`dbm.gnu` and :mod:`dbm.dumb` provide a :meth:`!reorganize` method that can be used for this purpose." +msgstr "هیچ‌یک از ماژول‌های زیرین فضای دیسک استفاده‌شده توسط پرونده‌ی پایگاه‌داده را به‌طور خودکار کوچک نمی‌کنند. بااین‌حال، :mod:`dbm.sqlite3`، :mod:`dbm.gnu` و :mod:`dbm.dumb` متدی به نام :meth:`!reorganize` ارائه می‌دهند که می‌توان از آن برای این منظور استفاده کرد." msgid "A tuple containing the exceptions that can be raised by each of the supported modules, with a unique exception also named :exc:`dbm.error` as the first item --- the latter is used when :exc:`dbm.error` is raised." msgstr "تاپلی شامل استثناهایی که هر یک از ماژول‌های پشتیبانی‌شده می‌توانند پرتاب کنند، با یک استثنای یکتا که آن نیز :exc:`dbm.error` نام دارد به‌عنوان اولین آیتم --- این استثنا زمانی استفاده می‌شود که :exc:`dbm.error` پرتاب شود." @@ -210,12 +214,18 @@ msgstr "حالت دسترسی یونیکسی پرونده (پیش‌فرض: ``0o msgid "The returned database object behaves similar to a mutable :term:`mapping`, but the :meth:`!keys` method returns a list, and the :meth:`!setdefault` method requires two arguments. It also supports a \"closing\" context manager via the :keyword:`with` keyword." msgstr "شیء پایگاه داده‌ی برگردانده‌شده رفتاری مشابه یک :term:`mapping` تغییرپذیر دارد، اما متد :meth:`!keys` یک فهرست برمی‌گرداند و متد :meth:`!setdefault` به دو آرگومان نیاز دارد. همچنین از یک مدیر زمینه‌ی «بستن» از طریق کلیدواژه :keyword:`with` پشتیبانی می‌کند." -msgid "The following method is also provided:" -msgstr "متد زیر نیز ارائه شده است:" +msgid "The following methods are also provided:" +msgstr "متدهای زیر نیز ارائه شده‌اند:" msgid "Close the SQLite database." msgstr "پایگاه داده‌ی SQLite را ببندید." +msgid "If you have carried out a lot of deletions and would like to shrink the space used on disk, this method will reorganize the database; otherwise, deleted file space will be kept and reused as new (key, value) pairs are added." +msgstr "اگر حذف‌های زیادی انجام داده‌اید و می‌خواهید فضای استفاده‌شده روی دیسک را کاهش دهید، این متد پایگاه داده را سازمان‌دهی مجدد خواهد کرد؛ در غیر این صورت، فضای پرونده‌ی حذف‌شده حفظ می‌شود و با اضافه شدن جفت‌های (کلید، مقدار) جدید دوباره مورد استفاده قرار می‌گیرد." + +msgid "While reorganizing, as much as two times the size of the original database is required in free disk space. However, be aware that this factor changes for each :mod:`!dbm` submodule." +msgstr "هنگام بازسازمان‌دهی، فضایی آزاد روی دیسک به اندازه‌ی حداکثر دو برابر اندازه‌ی پایگاه‌داده‌ی اصلی مورد نیاز است. بااین‌حال، آگاه باشید که این ضریب برای هر زیرماژول :mod:`!dbm` تغییر می‌کند." + msgid ":mod:`!dbm.gnu` --- GNU database manager" msgstr ":mod:`!dbm.gnu` --- مدیر پایگاه‌داده GNU" @@ -273,9 +283,6 @@ msgstr "متدهای :meth:`!get` و :meth:`!setdefault` افزوده شدند." msgid "Added the :meth:`!clear` method." msgstr "متد :meth:`!clear` افزوده شد." -msgid "The following methods are also provided:" -msgstr "متدهای زیر نیز ارائه شده‌اند:" - msgid "Close the GDBM database." msgstr "پایگاه داده GDBM را ببندید." @@ -299,6 +306,9 @@ msgstr "" msgid "If you have carried out a lot of deletions and would like to shrink the space used by the GDBM file, this routine will reorganize the database. :class:`!gdbm` objects will not shorten the length of a database file except by using this reorganization; otherwise, deleted file space will be kept and reused as new (key, value) pairs are added." msgstr "اگر حذف‌های زیادی انجام داده‌اید و می‌خواهید فضای مصرفی پرونده GDBM را کاهش دهید، این روتین پایگاه داده را بازآرایی می‌کند. اشیای :class:`!gdbm` طول پرونده پایگاه داده را کوتاه نمی‌کنند، مگر با استفاده از این بازآرایی؛ در غیر این صورت، فضای حذف‌شده در پرونده نگه داشته شده و با افزودن جفت‌های جدید (کلید، مقدار) دوباره استفاده می‌شود." +msgid "While reorganizing, as much as one time the size of the original database is required in free disk space. However, be aware that this factor changes for each :mod:`!dbm` submodule." +msgstr "هنگام بازسازمان‌دهی، فضایی آزاد روی دیسک به اندازه‌ی حداکثر یک برابر اندازه‌ی پایگاه‌داده‌ی اصلی مورد نیاز است. بااین‌حال، آگاه باشید که این ضریب برای هر زیرماژول :mod:`!dbm` تغییر می‌کند." + msgid "When the database has been opened in fast mode, this method forces any unwritten data to be written to the disk." msgstr "هنگامی که پایگاه داده در حالت سریع باز شده باشد، این متد باعث می‌شود هرگونه داده‌ی نوشته‌نشده روی دیسک نوشته شود." @@ -335,6 +345,9 @@ msgstr ":term:`path-like object` را برای نام پرونده می‌پذی msgid ":class:`!ndbm` objects behave similar to mutable :term:`mappings `, but methods :meth:`!items`, :meth:`!values`, :meth:`!pop`, :meth:`!popitem`, and :meth:`!update` are not supported, the :meth:`!keys` method returns a list, and the :meth:`!setdefault` method requires two arguments. It also supports a \"closing\" context manager via the :keyword:`with` keyword." msgstr "اشیای :class:`!ndbm` رفتاری مشابه :term:`نگاشت‌های ` تغییرپذیر دارند، اما متدهای :meth:`!items`، :meth:`!values`، :meth:`!pop`، :meth:`!popitem` و :meth:`!update` پشتیبانی نمی‌شوند؛ متد :meth:`!keys` یک فهرست برمی‌گرداند و متد :meth:`!setdefault` به دو آرگومان نیاز دارد. همچنین از یک مدیر زمینه «بستن» از طریق کلیدواژه :keyword:`with` پشتیبانی می‌کند." +msgid "The following method is also provided:" +msgstr "متد زیر نیز ارائه شده است:" + msgid "Close the NDBM database." msgstr "پایگاه داده NDBM را ببندید." @@ -383,6 +396,9 @@ msgstr "``'c'`` (پیش‌فرض): |flag_c|" msgid "It is possible to crash the Python interpreter when loading a database with a sufficiently large/complex entry due to stack depth limitations in Python's AST compiler." msgstr "ممکن است بارگذاری پایگاه داده‌ای با یک ورودی به‌اندازه کافی بزرگ/پیچیده، به دلیل محدودیت‌های عمق پشته در کامپایلر AST پایتون، باعث از کار افتادن مفسر پایتون شود." +msgid ":mod:`!dbm.dumb` does not support concurrent read/write access. (Multiple simultaneous read accesses are safe.) When a program has the database open for writing, no other program should have it open for reading or writing." +msgstr "ماژول :mod:`!dbm.dumb` از دسترسی هم‌زمان خواندن/نوشتن پشتیبانی نمی‌کند. (چندین دسترسی خواندن هم‌زمان امن هستند.) هنگامی که یک برنامه پایگاه‌داده را برای نوشتن باز کرده است، هیچ برنامه‌ی دیگری نباید آن را برای خواندن یا نوشتن باز کرده باشد." + msgid ":func:`~dbm.dumb.open` always creates a new database when *flag* is ``'n'``." msgstr ":func:`~dbm.dumb.open` همیشه وقتی *flag* برابر ``'n'`` باشد، یک پایگاه داده جدید ایجاد می‌کند." @@ -395,6 +411,12 @@ msgstr "شیء پایگاه داده‌ی برگردانده‌شده مانند msgid "Close the database." msgstr "پایگاه داده را ببندید." +msgid "If you have carried out a lot of deletions and would like to shrink the space used on disk, this method will reorganize the database; otherwise, deleted file space will not be reused." +msgstr "اگر حذف‌های زیادی انجام داده‌اید و می‌خواهید فضای استفاده‌شده روی دیسک را کاهش دهید، این متد پایگاه داده را سازمان‌دهی مجدد خواهد کرد؛ در غیر این صورت، فضای پرونده‌ی حذف‌شده دوباره مورد استفاده قرار نخواهد گرفت." + +msgid "While reorganizing, no additional free disk space is required. However, be aware that this factor changes for each :mod:`!dbm` submodule." +msgstr "هنگام بازسازمان‌دهی، هیچ فضای آزاد اضافه‌ای روی دیسک مورد نیاز نیست. بااین‌حال، آگاه باشید که این ضریب برای هر زیرماژول :mod:`!dbm` تغییر می‌کند." + msgid "Synchronize the on-disk directory and data files. This method is called by the :meth:`shelve.Shelf.sync` method." msgstr "پوشه و پرونده‌های داده روی دیسک را همگام‌سازی می‌کند. این متد توسط متد :meth:`shelve.Shelf.sync` فراخوانی می‌شود." diff --git a/library/debug.po b/library/debug.po index 98165258..d28d7c1b 100644 --- a/library/debug.po +++ b/library/debug.po @@ -6,12 +6,13 @@ # Translators: # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 01:04+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -21,7 +22,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -msgid "Debugging and Profiling" +msgid "Debugging and profiling" msgstr "اشکال‌زدایی و پروفایل‌گیری" msgid "These libraries help you with Python development: the debugger enables you to step through code, analyze stack frames and set breakpoints etc., and the profilers run code and give you a detailed breakdown of execution times, allowing you to identify bottlenecks in your programs. Auditing events provide visibility into runtime behaviors that would otherwise require intrusive debugging or patching." diff --git a/library/decimal.po b/library/decimal.po index eb7f2c63..a212a170 100644 --- a/library/decimal.po +++ b/library/decimal.po @@ -8,12 +8,13 @@ # Parham Forati, 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 10:21+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -1243,8 +1244,11 @@ msgstr "یک عدد را با استفاده از نماد علمی به رشت msgid "Constants" msgstr "ثابت‌ها" -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 "ثابت‌های این بخش تنها برای ماژول C مرتبط هستند. این ثابت‌ها برای سازگاری در نسخه پایتون خالص نیز گنجانده شده‌اند." +msgid "The highest version of the General Decimal Arithmetic Specification that this implementation complies with. See https://speleotrove.com/decimal/decarith.html for the specification." +msgstr "بالاترین نسخه‌ی مشخصات حساب دهدهی عمومی (General Decimal Arithmetic Specification) که این پیاده‌سازی از آن تبعیت می‌کند. برای مشاهده‌ی مشخصات به https://speleotrove.com/decimal/decarith.html مراجعه کنید." + +msgid "The following constants are only relevant for the C module. They are also included in the pure Python version for compatibility." +msgstr "ثابت‌های زیر فقط برای ماژول C مربوط هستند. آن‌ها همچنین برای سازگاری در نسخه‌ی پایتون خالص نیز گنجانده شده‌اند." msgid "32-bit" msgstr "۳۲ بیتی" diff --git a/library/difflib.po b/library/difflib.po index f718a2ed..b8fddce8 100644 --- a/library/difflib.po +++ b/library/difflib.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 16:12+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -251,9 +252,15 @@ msgstr "تفاوت‌های یکپارچه (unified diffs) روشی فشرده msgid "By default, the diff control lines (those with ``---``, ``+++``, or ``@@``) are created with a trailing newline. This is helpful so that inputs created from :func:`io.IOBase.readlines` result in diffs that are suitable for use with :func:`io.IOBase.writelines` since both the inputs and outputs have trailing newlines." msgstr "به‌طور پیش‌فرض، سطرهای کنترلی diff (آن‌هایی که دارای ``---``، ``+++`` یا ``@@`` هستند) با یک خط جدید در پایان ایجاد می‌شوند. این موضوع مفید است تا ورودی‌هایی که از :func:`io.IOBase.readlines` ایجاد شده‌اند، منجر به diffهایی شوند که برای استفاده با :func:`io.IOBase.writelines` مناسب هستند، زیرا هم ورودی‌ها و هم خروجی‌ها دارای خط جدید در پایان هستند." +msgid "Set *color* to ``True`` to enable output in color, similar to :program:`git diff --color`. Even if enabled, it can be :ref:`controlled using environment variables `." +msgstr "برای فعال‌سازی خروجی رنگی، مشابه‌ :program:`git diff --color`، مقدار *color* را روی ``True`` تنظیم کنید. حتی در صورت فعال بودن، می‌توانید آن را :ref:`با استفاده از متغیرهای محیطی کنترل کنید `." + msgid "The unified diff format normally has a header for filenames and modification times. Any or all of these may be specified using strings for *fromfile*, *tofile*, *fromfiledate*, and *tofiledate*. The modification times are normally expressed in the ISO 8601 format. If not specified, the strings default to blanks." msgstr "قالب unified diff معمولاً دارای سرآیندی برای نام پرونده‌ها و زمان‌های تغییر است. هرکدام یا همه‌ی این موارد را می‌توان با استفاده از رشته‌هایی برای *fromfile*، *tofile*، *fromfiledate* و *tofiledate* مشخص کرد. زمان‌های تغییر معمولاً در قالب ISO 8601 بیان می‌شوند. اگر مشخص نشوند، رشته‌ها به‌طور پیش‌فرض خالی خواهند بود." +msgid "Added the *color* parameter." +msgstr "پارامتر *color* اضافه شد." + msgid "Compare *a* and *b* (lists of bytes objects) using *dfunc*; yield a sequence of delta lines (also bytes) in the format returned by *dfunc*. *dfunc* must be a callable, typically either :func:`unified_diff` or :func:`context_diff`." msgstr "*a* و *b* (فهرست‌هایی از اشیای bytes) را با استفاده از *dfunc* مقایسه می‌کند؛ دنباله‌ای از سطرهای دلتا (که آن‌ها نیز bytes هستند) را در قالبی که *dfunc* برمی‌گرداند تولید می‌کند. *dfunc* باید یک شیء فراخوانی‌پذیر باشد، معمولاً یا :func:`unified_diff` یا :func:`context_diff`." diff --git a/library/dis.po b/library/dis.po index 70556872..18994679 100644 --- a/library/dis.po +++ b/library/dis.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 16:54+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -293,8 +294,8 @@ msgstr "این تابع تولیدگر از متد :meth:`~codeobject.co_lines` msgid "Line numbers can be decreasing. Before, they were always increasing." msgstr "شماره‌های خط می‌توانند کاهشی باشند. پیش از این، همیشه افزایشی بودند." -msgid "The :pep:`626` :meth:`~codeobject.co_lines` method is used instead of the :attr:`~codeobject.co_firstlineno` and :attr:`~codeobject.co_lnotab` attributes of the :ref:`code object `." -msgstr "متد :meth:`~codeobject.co_lines` مربوط به :pep:`626`، به‌جای ویژگی‌های :attr:`~codeobject.co_firstlineno` و :attr:`~codeobject.co_lnotab` در :ref:`شیء کد ` استفاده می‌شود." +msgid "The :pep:`626` :meth:`~codeobject.co_lines` method is used instead of the :attr:`~codeobject.co_firstlineno` and :attr:`!codeobject.co_lnotab` attributes of the :ref:`code object `." +msgstr "متد :meth:`~codeobject.co_lines` در :pep:`626` به جای ویژگی‌های :attr:`~codeobject.co_firstlineno` و :attr:`!codeobject.co_lnotab` از :ref:`شیء کد ` استفاده می‌شود." msgid "Line numbers can be ``None`` for bytecode that does not map to source lines." msgstr "شماره‌های خط می‌توانند برای بایت‌کدی که به سطرهای منبع نگاشت نمی‌شود، ``None`` باشند." @@ -1062,8 +1063,8 @@ msgstr "``CALL_KW`` تمام آرگومان‌ها، نام‌های کلیدو 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 contains a mapping object containing additional keyword arguments. Before the callable is called, the mapping object and iterable object are each \"unpacked\" and their contents passed in as keyword and positional arguments respectively. ``CALL_FUNCTION_EX`` 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 "یک شیء فراخوانی‌پذیر را با مجموعه‌ای متغیر از آرگومان‌های جایگاهی و کلیدواژه‌ای فراخوانی می‌کند. اگر پایین‌ترین بیت *flags* تنظیم شده باشد، بالای پشته شامل یک شیء نگاشت است که حاوی آرگومان‌های کلیدواژه‌ای اضافی است. پیش از فراخوانی شیء فراخوانی‌پذیر، شیء نگاشت و شیء پیمایش‌پذیر هرکدام «واگشایی» می‌شوند و محتویات آن‌ها به‌ترتیب به‌عنوان آرگومان‌های کلیدواژه‌ای و جایگاهی ارسال می‌شوند. ``CALL_FUNCTION_EX`` تمام آرگومان‌ها و شیء فراخوانی‌پذیر را از پشته برمی‌دارد، شیء فراخوانی‌پذیر را با آن آرگومان‌ها فراخوانی می‌کند و مقدار بازگشتی برگردانده‌شده توسط شیء فراخوانی‌پذیر را بر پشته می‌گذارد." -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 "یک ``NULL`` را روی پشته قرار می‌دهد. در دنباله‌ی فراخوانی استفاده می‌شود تا با ``NULL``\\ ای که توسط :opcode:`!LOAD_METHOD` برای فراخوانی‌های غیرمتدی روی پشته قرار گرفته است، مطابقت داشته باشد." +msgid "Pushes a ``NULL`` to the stack. Used in the call sequence to match the ``NULL`` pushed by :opcode:`LOAD_ATTR` for non-method calls." +msgstr "یک مقدار ``NULL`` را به پشته فشار می‌دهد. در دنباله‌ی فراخوانی استفاده می‌شود تا با مقدار ``NULL`` فشار داده شده توسط :opcode:`LOAD_ATTR` برای فراخوانی‌های غیرمتد مطابقت داشته باشد." msgid "Pushes a new function object on the stack built from the code object at ``STACK[-1]``." msgstr "یک شیء تابع جدید را که از شیء کد در ``STACK[-1]`` ساخته شده است، روی پشته می‌گذارد." @@ -1383,9 +1384,6 @@ msgstr "این گونه در ساخت‌های :keyword:`with` و :keyword:`asyn msgid "Marks the end of the code block associated with the last ``SETUP_FINALLY``, ``SETUP_CLEANUP`` or ``SETUP_WITH``." msgstr "پایان بلوک کد مرتبط با آخرین ``SETUP_FINALLY``، ``SETUP_CLEANUP`` یا ``SETUP_WITH`` را مشخص می‌کند." -msgid "Works as :opcode:`LOAD_CONST`, but is more efficient for immortal objects." -msgstr "مانند :opcode:`LOAD_CONST` عمل می‌کند، اما برای اشیاء نامیرا کارآمدتر است." - msgid "Undirected relative jump instructions which are replaced by their directed (forward/backward) counterparts by the assembler." msgstr "دستورهای پرش نسبی بدون جهت که توسط اسمبلر با همتایان جهت‌دار (رو به جلو/رو به عقب) خود جایگزین می‌شوند." @@ -1460,3 +1458,6 @@ msgstr "تابع توکار" msgid "slice" msgstr "اسلایس" + +#~ msgid "Works as :opcode:`LOAD_CONST`, but is more efficient for immortal objects." +#~ msgstr "مانند :opcode:`LOAD_CONST` عمل می‌کند، اما برای اشیاء نامیرا کارآمدتر است." diff --git a/library/doctest.po b/library/doctest.po index 918804cd..0f387811 100644 --- a/library/doctest.po +++ b/library/doctest.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 19:32+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -1065,8 +1066,8 @@ msgstr "دو تابع اصلی برای ایجاد نمونه‌های :class:`u msgid "Convert doctest tests from one or more text files to a :class:`unittest.TestSuite`." msgstr "تبدیل آزمون‌های doctest از یک یا چند پرونده‌ی متنی به یک :class:`unittest.TestSuite`." -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:`~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 ":class:`unittest.TestSuite` بازگشتی برای اجرا توسط چارچوب unittest در نظر گرفته شده است و مثال‌های تعاملی در هر پرونده را اجرا می‌کند. اگر مثالی در هر پرونده‌ای شکست بخورد، آزمون واحد ساخته‌شده شکست می‌خورد و استثنای :exc:`~unittest.TestCase.failureException` پرتاب می‌شود که نام پرونده حاوی آزمون و شماره سطری (گاهی تقریبی) را نشان می‌دهد. اگر تمام مثال‌های یک پرونده رد شده باشند، آزمون واحد ساخته‌شده نیز به‌عنوان ردشده علامت‌گذاری می‌شود." +msgid "The returned :class:`unittest.TestSuite` is to be run by the unittest framework and runs the interactive examples in each file. Each file is run as a separate unit test, and each example in a file is run as a :ref:`subtest `. If any example in a file fails, then the synthesized unit test fails. The traceback for failure or error contains 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 "کلاس :class:`unittest.TestSuite` بازگردانده‌شده توسط چارچوب unittest اجرا می‌شود و نمونه‌های تعاملی را در هر پرونده اجرا می‌کند. هر پرونده به عنوان یک آزمون واحد جداگانه اجرا می‌شود و هر نمونه در یک پرونده به عنوان یک :ref:`زیرآزمون ` اجرا می‌شود. اگر هر نمونه‌ای در یک پرونده با شکست مواجه شود، آزمون واحد سنتز‌شده نیز با شکست مواجه می‌شود. ردگیری مربوط به شکست یا خطا شامل نام پرونده‌ی حاوی آزمون و یک شماره سطر (گاهی تقریبی) است. اگر تمام نمونه‌های یک پرونده رد شوند، آزمون واحد سنتز‌شده نیز به عنوان ردشده علامت‌گذاری می‌شود." msgid "Pass one or more paths (as strings) to text files to be examined." msgstr "یک یا چند مسیر (به‌صورت رشته) برای پرونده‌های متنی که باید بررسی شوند، ارائه دهید." @@ -1101,11 +1102,14 @@ msgstr "آرگومان اختیاری *optionflags*، که با OR کردن پر msgid "The global ``__file__`` is added to the globals provided to doctests loaded from a text file using :func:`DocFileSuite`." msgstr "متغیر سراسری ``__file__`` به متغیرهای سراسری ارائه‌شده به doctestهایی که از یک پرونده متنی با استفاده از :func:`DocFileSuite` بارگذاری می‌شوند، افزوده می‌شود." +msgid "Run each example as a :ref:`subtest `." +msgstr "هر مثال را به عنوان یک :ref:`subtest ` اجرا کنید." + msgid "Convert doctest tests for a module to a :class:`unittest.TestSuite`." msgstr "تبدیل آزمون‌های doctest یک ماژول به :class:`unittest.TestSuite`." -msgid "The returned :class:`unittest.TestSuite` is to be run by the unittest 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 ":class:`unittest.TestSuite` برگردانده‌شده برای اجرا توسط چارچوب unittest در نظر گرفته شده است و هر doctest را در ماژول اجرا می‌کند. هر رشته مستند به‌عنوان یک آزمون واحد جداگانه اجرا می‌شود. اگر هر یک از doctestها شکست بخورد، آزمون واحد ساخته‌شده شکست می‌خورد و یک استثنای :exc:`unittest.TestCase.failureException` پرتاب می‌شود که نام پرونده حاوی آزمون و شماره سطری (گاهی تقریبی) را نشان می‌دهد. اگر همه‌ی مثال‌های یک رشته مستند رد شوند، آنگاه" +msgid "The returned :class:`unittest.TestSuite` is to be run by the unittest framework and runs each doctest in the module. Each docstring is run as a separate unit test, and each example in a docstring is run as a :ref:`subtest `. If any of the doctests fail, then the synthesized unit test fails. The traceback for failure or error contains 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." +msgstr "کلاس :class:`unittest.TestSuite` بازگردانده‌شده توسط چارچوب unittest اجرا می‌شود و هر آزمون مستند (doctest) را در ماژول اجرا می‌کند. هر رشته مستند به عنوان یک آزمون واحد جداگانه اجرا می‌شود و هر نمونه در یک رشته مستند به عنوان یک :ref:`زیرآزمون ` اجرا می‌شود. اگر هر یک از آزمون‌های مستند با شکست مواجه شوند، آزمون واحد سنتز‌شده نیز با شکست مواجه می‌شود. ردگیری مربوط به شکست یا خطا شامل نام پرونده‌ی حاوی آزمون و یک شماره سطر (گاهی تقریبی) است. اگر تمام نمونه‌های موجود در یک رشته مستند رد شوند، آزمون واحد سنتز‌شده نیز به عنوان ردشده علامت‌گذاری می‌شود." 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 "آرگومان اختیاری *module* ماژول مورد آزمایش را فراهم می‌کند. این آرگومان می‌تواند یک شیء ماژول یا یک نام ماژول (که ممکن است نقطه‌دار باشد) باشد. اگر مشخص نشده باشد، از ماژول فراخواننده این تابع استفاده می‌شود." @@ -1348,8 +1352,8 @@ msgstr "یک کلاس پردازشی که برای اجرا و صحت‌سنجی 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 constructor." msgstr "مقایسه بین خروجی‌های مورد انتظار و خروجی‌های واقعی توسط یک :class:`OutputChecker` انجام می‌شود. این مقایسه می‌تواند با تعدادی پرچم گزینه سفارشی‌سازی شود؛ برای اطلاعات بیشتر بخش :ref:`doctest-options` را ببینید. اگر پرچم‌های گزینه کافی نباشند، این مقایسه همچنین می‌تواند با ارسال یک زیرکلاس از :class:`!OutputChecker` به سازنده سفارشی‌سازی شود." -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 with strings that should be displayed. It defaults to ``sys.stdout.write``. If capturing the output is not sufficient, then the display output can be also customized by subclassing DocTestRunner, and overriding the methods :meth:`report_start`, :meth:`report_success`, :meth:`report_unexpected_exception`, and :meth:`report_failure`." -msgstr "خروجی نمایشی اجراکننده‌ی آزمون را می‌توان به دو روش کنترل کرد. نخست، می‌توان یک تابع خروجی به :meth:`run` ارسال کرد؛ این تابع با رشته‌هایی که باید نمایش داده شوند فراخوانی می‌شود. مقدار پیش‌فرض آن ``sys.stdout.write`` است. اگر گرفتن خروجی کافی نباشد، می‌توان خروجی نمایشی را نیز با ایجاد زیرکلاس از DocTestRunner و بازنویسی متدهای :meth:`report_start`، :meth:`report_success`، :meth:`report_unexpected_exception` و :meth:`report_failure` سفارشی‌سازی کرد." +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 with strings that should be displayed. It defaults to ``sys.stdout.write``. If capturing the output is not sufficient, then the display output can be also customized by subclassing DocTestRunner, and overriding the methods :meth:`report_skip`, :meth:`report_start`, :meth:`report_success`, :meth:`report_unexpected_exception`, and :meth:`report_failure`." +msgstr "خروجی نمایش اجراکننده‌ی آزمون را می‌توان به دو روش کنترل کرد. ابتدا، یک تابع خروجی را می‌توان به :meth:`run` ارسال کرد؛ این تابع با رشته‌هایی که باید نمایش داده شوند فراخوانی خواهد شد. پیش‌فرض آن ``sys.stdout.write`` است. اگر گرفتن خروجی کافی نباشد، خروجی نمایش را می‌توان با زیرکلاس‌سازی DocTestRunner و بازنویسی متدهای :meth:`report_skip`، :meth:`report_start`، :meth:`report_success`، :meth:`report_unexpected_exception` و :meth:`report_failure` نیز سفارشی‌سازی کرد." 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 "آرگومان کلیدواژه‌ای اختیاری *checker*، شیء :class:`OutputChecker` (یا جایگزین مستقیم (drop-in replacement)) را مشخص می‌کند که باید برای مقایسه‌ی خروجی‌های مورد انتظار با خروجی‌های واقعی مثال‌های doctest استفاده شود." @@ -1366,12 +1370,15 @@ msgstr "اجراکننده آزمون آمار را گردآوری می‌کند msgid ":class:`DocTestRunner` defines the following methods:" msgstr ":class:`DocTestRunner` متدهای زیر را تعریف می‌کند:" -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 "گزارش می‌دهد که اجراکننده‌ی آزمون در آستانه‌ی پردازش مثال داده‌شده است. این متد ارائه شده است تا زیرکلاس‌های :class:`DocTestRunner` بتوانند خروجی خود را سفارشی‌سازی کنند؛ نباید مستقیماً فراخوانی شود." +msgid "Report that the given example was skipped. This method is provided to allow subclasses of :class:`DocTestRunner` to customize their output; it should not be called directly." +msgstr "گزارش اینکه نمونه‌ی داده‌شده رد شده است. این متد برای این فراهم شده است که به زیرکلاس‌های :class:`DocTestRunner` اجازه دهد خروجی خود را سفارشی‌سازی کنند؛ این متد نباید به طور مستقیم فراخوانی شود." msgid "*example* is the example about to be processed. *test* is the test containing *example*. *out* is the output function that was passed to :meth:`DocTestRunner.run`." msgstr "*example* مثالی است که در آستانه‌ی پردازش قرار دارد. *test* آزمونی است که شامل *example* می‌شود. *out* تابع خروجی است که به :meth:`DocTestRunner.run` پاس داده شده است." +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 "گزارش می‌دهد که اجراکننده‌ی آزمون در آستانه‌ی پردازش مثال داده‌شده است. این متد ارائه شده است تا زیرکلاس‌های :class:`DocTestRunner` بتوانند خروجی خود را سفارشی‌سازی کنند؛ نباید مستقیماً فراخوانی شود." + 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 "گزارش می‌دهد که مثال داده‌شده با موفقیت اجرا شده است. این متد ارائه شده است تا زیرکلاس‌های :class:`DocTestRunner` بتوانند خروجی خود را سفارشی‌سازی کنند؛ نباید مستقیماً فراخوانی شود." diff --git a/library/email.headerregistry.po b/library/email.headerregistry.po index 4edc0634..b76c8978 100644 --- a/library/email.headerregistry.po +++ b/library/email.headerregistry.po @@ -8,12 +8,13 @@ # Parham Forati, 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 16:09+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -168,6 +169,9 @@ msgstr "همه سرآیندهای MIME با پیشوند 'Content-' شروع م msgid "A dictionary mapping parameter names to parameter values." msgstr "یک دیکشنری که نام‌های پارامتر را به مقادیر پارامتر نگاشت می‌کند." +msgid "It is now a :class:`frozendict` instead of a :class:`types.MappingProxyType`." +msgstr "این ساختار اکنون به جای :class:`types.MappingProxyType` یک :class:`فریزدیکت ` است." + msgid "A :class:`ParameterizedMIMEHeader` class that handles the :mailheader:`Content-Type` header." msgstr "یک کلاس :class:`ParameterizedMIMEHeader` که سرآیند :mailheader:`Content-Type` را مدیریت می‌کند." diff --git a/library/email.policy.po b/library/email.policy.po index ccf42266..1cfcfcf2 100644 --- a/library/email.policy.po +++ b/library/email.policy.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 13:14+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -269,8 +270,14 @@ msgstr "علاوه بر ویژگی‌های قابل تنظیم فهرست‌ش msgid "[1]_" msgstr "[1]_" -msgid "If ``False``, follow :rfc:`5322`, supporting non-ASCII characters in headers by encoding them as \"encoded words\". If ``True``, follow :rfc:`6532` and use ``utf-8`` encoding for headers. Messages formatted in this way may be passed to SMTP servers that support the ``SMTPUTF8`` extension (:rfc:`6531`)." -msgstr "اگر ``False`` باشد، از :rfc:`5322` پیروی می‌کند و با کدگذاری نویسه‌های غیر ASCII موجود در سرآیندها به‌عنوان «کلمات کدگذاری‌شده»، از آن‌ها پشتیبانی می‌کند. اگر ``True`` باشد، از :rfc:`6532` پیروی می‌کند و برای سرآیندها از کدگذاری ``utf-8`` استفاده می‌کند. پیام‌هایی که به این شکل قالب‌بندی شده‌اند، می‌توانند به سرورهای SMTP که از افزونه ``SMTPUTF8`` پشتیبانی می‌کنند (:rfc:`6531`) ارسال شوند." +msgid "If ``False``, follow :rfc:`5322`, supporting non-ASCII characters in headers by encoding them as :rfc:`2047` \"encoded words\". If ``True``, follow :rfc:`6532` and use ``utf-8`` encoding for headers. Messages formatted in this way may be passed to SMTP servers that support the ``SMTPUTF8`` extension (:rfc:`6531`)." +msgstr "اگر ``False`` باشد، از :rfc:`5322` پیروی کنید و با کدگذاری نویسه‌های غیر-اسکی به عنوان «کدگذاری‌شده‌های» :rfc:`2047`، از آن‌ها در سرآیندها پشتیبانی کنید. اگر ``True`` باشد، از :rfc:`6532` پیروی کنید و از کدگذاری ``utf-8`` برای سرآیندها استفاده کنید. پیام‌های قالب‌بندی‌شده به این روش ممکن است به سرورهای SMTP که از پسوند ``SMTPUTF8`` پشتیبانی می‌کنند (:rfc:`6531`) ارسال شوند." + +msgid "When ``False``, the generator will raise :exc:`~email.errors.HeaderWriteError` if any header includes non-ASCII characters in a context where :rfc:`2047` does not permit encoded words. This particularly applies to mailboxes (\"addr-spec\") with non-ASCII characters, which can be created via :class:`~email.headerregistry.Address`. To use a mailbox with a non-ASCII domain name with ``utf8=False``, first encode the domain using the third-party :pypi:`idna` or :pypi:`uts46` module or with :mod:`encodings.idna`. It is not possible to use a non-ASCII username (\"local-part\") in a mailbox when ``utf8=False``." +msgstr "هنگامی که روی ``False`` تنظیم شود، اگر هر سرآیندی شامل نویسه‌های غیر اسکی در زمینه‌ای باشد که :rfc:`2047` کلمات کدگذاری‌شده را مجاز نمی‌داند، تولیدگر خطای :exc:`~email.errors.HeaderWriteError` را بالا می‌آورد. این موضوع به‌ویژه در مورد صندوق‌های پستی («addr-spec») دارای نویسه‌های غیر اسکی صدق می‌کند که می‌توانند از طریق :class:`~email.headerregistry.Address` ایجاد شوند. برای استفاده از یک صندوق پستی با نام دامنه‌ی غیر اسکی همراه با ``utf8=False``، ابتدا دامنه را با استفاده از ماژول شخص ثالث :pypi:`idna` یا :pypi:`uts46` یا با :mod:`encodings.idna` کدگذاری کنید. استفاده از نام کاربری غیر اسکی («local-part») در یک صندوق پستی هنگامی که ``utf8=False`` است، امکان‌پذیر نیست." + +msgid "Can trigger the raising of :exc:`~email.errors.HeaderWriteError`. (Earlier versions incorrectly applied :rfc:`2047` in certain contexts, mostly notably in addr-specs.)" +msgstr "می‌تواند باعث بالا آمدن خطای :exc:`~email.errors.HeaderWriteError` شود. (نسخه‌های قبلی به اشتباه :rfc:`2047` را در زمینه‌های خاصی، به‌ویژه در مشخصات آدرس‌ها (addr-specs)، اعمال می‌کردند.)" msgid "If the value for a header in the ``Message`` object originated from a :mod:`~email.parser` (as opposed to being set by a program), this attribute indicates whether or not a generator should refold that value when transforming the message back into serialized form. The possible values are:" msgstr "اگر مقدار یک سرآیند در شیء ``Message`` از :mod:`~email.parser` آمده باشد (در مقابل تنظیم شدن توسط یک برنامه)، این ویژگی نشان می‌دهد که آیا یک تولیدگر باید آن مقدار را هنگام بازگرداندن پیام به قالب سریالی‌شده دوباره تا بزند (refold) یا خیر. مقادیر ممکن عبارت‌اند از:" diff --git a/library/enum.po b/library/enum.po index 34753160..c811be55 100644 --- a/library/enum.po +++ b/library/enum.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 12:02+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -682,8 +683,8 @@ msgstr "" msgid "Using :class:`auto` with :class:`Enum` results in integers of increasing value, starting with ``1``." msgstr "استفاده از :class:`auto` همراه با :class:`Enum` منجر به اعداد صحیحی با مقادیر افزایشی می‌شود که از ``1`` شروع می‌شوند." -msgid "Added :ref:`enum-dataclass-support`" -msgstr ":ref:`enum-dataclass-support` افزوده شد" +msgid "Added :ref:`enum-dataclass-support`." +msgstr "پشتیبانی از :ref:`enum-dataclass-support` اضافه شد." msgid "Adds a new name as an alias to an existing member::" msgstr "یک نام جدید را به‌عنوان نام مستعار به یک عضو موجود اضافه می‌کند::" @@ -1173,8 +1174,8 @@ msgstr "``_add_alias_``، ``_add_value_alias_``، ``_repr_*``" msgid "Utilities and decorators" msgstr "ابزارهای کاربردی و دکوراتورها" -msgid "*auto* can be used in place of a value. If used, the *Enum* machinery will call an :class:`Enum`'s :meth:`~Enum._generate_next_value_` to get an appropriate value. For :class:`Enum` and :class:`IntEnum` that appropriate value will be the last value plus one; for :class:`Flag` and :class:`IntFlag` it will be the first power-of-two greater than the highest value; for :class:`StrEnum` it will be the lower-cased version of the member's name. Care must be taken if mixing *auto()* with manually specified values." -msgstr "از *auto* می‌توان به‌جای یک مقدار استفاده کرد. در صورت استفاده، سازوکار *Enum* متد :meth:`~Enum._generate_next_value_` یک :class:`Enum` را فراخوانی می‌کند تا مقدار مناسبی به دست آورد. برای :class:`Enum` و :class:`IntEnum`، آن مقدار مناسب برابر با آخرین مقدار به‌علاوه یک خواهد بود؛ برای :class:`Flag` و :class:`IntFlag`، اولین توانِ ۲ که از بیشترین مقدار بزرگ‌تر باشد خواهد بود؛ برای :class:`StrEnum`، نام عضو با حروف کوچک خواهد بود. هنگام ترکیب *auto()* با مقادیر مشخص‌شده به‌صورت دستی باید دقت کنید." +msgid "*auto* can be used in place of a value. If used, the *Enum* machinery will call an :class:`Enum`'s :meth:`~Enum._generate_next_value_` to get an appropriate value. For :class:`Enum` and :class:`IntEnum` that appropriate value will be the highest value seen plus one; for :class:`Flag` and :class:`IntFlag` it will be the first power-of-two greater than the highest value seen; for :class:`StrEnum` it will be the lower-cased version of the member's name. Care must be taken if mixing *auto()* with manually specified values." +msgstr "عبارت *auto* را می‌توان به جای یک مقدار استفاده کرد. در صورت استفاده، سازوکار *Enum* متد :meth:`~Enum._generate_next_value_` از یک :class:`Enum` را برای دریافت مقدار مناسب فراخوانی خواهد کرد. برای :class:`Enum` و :class:`IntEnum` آن مقدار مناسب برابر خواهد بود با بیشترین مقدار دیده‌شده به‌علاوه یک؛ برای :class:`Flag` و :class:`IntFlag` برابر خواهد بود با اولین توانِ دو که از بیشترین مقدار دیده‌شده بزرگ‌تر است؛ برای :class:`StrEnum` نسخه‌ی با حروف کوچک نام عضو خواهد بود. در صورت ترکیب *auto()* با مقادیر مشخص‌شده‌ی دستی باید دقت شود." msgid "*auto* instances are only resolved when at the top level of an assignment, either by itself or as part of a tuple:" msgstr "نمونه‌های *auto* تنها زمانی حل می‌شوند که در بالاترین سطح یک انتساب قرار داشته باشند، چه به‌تنهایی و چه به‌عنوان بخشی از یک تاپل:" @@ -1185,8 +1186,8 @@ msgstr "``FIRST = auto()`` کار خواهد کرد (auto() با ``1`` جایگ msgid "``SECOND = auto(), -2`` will work (auto is replaced with ``2``, so ``2, -2`` is used to create the ``SECOND`` enum member;" msgstr "``SECOND = auto(), -2`` کار خواهد کرد (auto با ``2`` جایگزین می‌شود، بنابراین ``2, -2`` برای ایجاد عضو ``SECOND`` در enum استفاده می‌شود؛" -msgid "``THREE = [auto(), -3]`` will *not* work (``[, -3]`` is used to create the ``THREE`` enum member)" -msgstr "``THREE = [auto(), -3]`` کار *نخواهد کرد* (``[, -3]`` برای ایجاد عضو enum ``THREE`` استفاده می‌شود)" +msgid "``THIRD = [auto(), -3]`` will *not* work (``[, -3]`` is used to create the ``THIRD`` enum member)" +msgstr "عبارت ``THIRD = [auto(), -3]`` کار *نخواهد کرد* (از ``[, -3]`` برای ایجاد عضو enum به نام ``THIRD`` استفاده می‌شود)" msgid "In prior versions, ``auto()`` had to be the only thing on the assignment line to work properly." msgstr "در نسخه‌های پیشین، ``auto()`` باید تنها مورد موجود در خط انتساب می‌بود تا به‌درستی کار کند." @@ -1194,14 +1195,14 @@ msgstr "در نسخه‌های پیشین، ``auto()`` باید تنها مور msgid "``_generate_next_value_`` can be overridden to customize the values used by *auto*." msgstr "می‌توان ``_generate_next_value_`` را برای سفارشی‌سازی مقادیر استفاده‌شده توسط *auto* بازنویسی کرد." -msgid "in 3.13 the default ``_generate_next_value_`` will always return the highest member value incremented by 1, and will fail if any member is an incompatible type." -msgstr "در 3.13، ``_generate_next_value_`` پیش‌فرض همیشه بالاترین مقدار عضو را با افزایش ۱ برمی‌گرداند و اگر نوع هر یک از اعضا ناسازگار باشد، شکست خواهد خورد." +msgid "In version 3.13 the default ``_generate_next_value_`` will always return the highest member value incremented by 1, and will fail if any member is an incompatible type." +msgstr "در نسخه‌ی ۳.۱۳ مقدار پیش‌فرض ``_generate_next_value_`` همیشه بیشترین مقدار عضو را به علاوه ۱ برمی‌گرداند و اگر هر عضوی از نوع ناسازگاری باشد با خطا مواجه خواهد شد." msgid "A decorator similar to the built-in :deco:`property`, but specifically for enumerations. It allows member attributes to have the same names as members themselves." msgstr "دکوراتوری مشابه :deco:`property` توکار، اما به‌طور خاص برای شمارش‌ها. این دکوراتور اجازه می‌دهد ویژگی‌های اعضا نام‌هایی مشابه نام خود اعضا داشته باشند." -msgid "the *property* and the member must be defined in separate classes; for example, the *value* and *name* attributes are defined in the *Enum* class, and *Enum* subclasses can define members with the names ``value`` and ``name``." -msgstr "*پراپرتی* و عضو باید در کلاس‌های جداگانه تعریف شوند؛ برای مثال، ویژگی‌های *value* و *name* در کلاس *Enum* تعریف شده‌اند و زیرکلاس‌های *Enum* می‌توانند اعضایی با نام‌های ``value`` و ``name`` تعریف کنند." +msgid "The *property* and the member must be defined in separate classes; for example, the *value* and *name* attributes are defined in the *Enum* class, and *Enum* subclasses can define members with the names ``value`` and ``name``." +msgstr "ویژگی (property) و عضو باید در کلاس‌های جداگانه‌ای تعریف شوند؛ برای مثال، ویژگی‌های *value* و *name* در کلاس *Enum* تعریف می‌شوند و زیرکلاس‌های *Enum* می‌توانند اعضایی با نام‌های ``value`` و ``name`` تعریف کنند." msgid "A :keyword:`class` decorator specifically for enumerations. It searches an enumeration's :attr:`~EnumType.__members__`, gathering any aliases it finds; if any are found :exc:`ValueError` is raised with the details::" msgstr "یک دکوراتور :keyword:`class` به‌طور خاص برای شمارش‌ها. این دکوراتور :attr:`~EnumType.__members__` یک شمارش را جستجو می‌کند و هر نام مستعاری را که بیابد، گردآوری می‌کند؛ در صورت یافتن هر نام مستعار، :exc:`ValueError` همراه با جزئیات پرتاب می‌شود::" diff --git a/library/faulthandler.po b/library/faulthandler.po index 511716e3..cee184e8 100644 --- a/library/faulthandler.po +++ b/library/faulthandler.po @@ -8,12 +8,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-11 11:09+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -45,8 +46,8 @@ msgstr "هر رشته به ۵۰۰ نویسه محدود است." msgid "Only the filename, the function name and the line number are displayed. (no source code)" msgstr "فقط نام پرونده، نام تابع و شماره‌ی خط نمایش داده می‌شوند. (بدون کد منبع)" -msgid "It is limited to 100 frames and 100 threads." -msgstr "آن به ۱۰۰ فریم و ۱۰۰ نخ محدود شده است." +msgid "It is limited to 100 frames per thread, and 100 threads (configurable via *max_threads*)." +msgstr "این کار به ۱۰۰ قاب در هر نخ و ۱۰۰ نخ (قابل تنظیم از طریق *max_threads*) محدود است." msgid "The order is reversed: the most recent call is shown first." msgstr "ترتیب معکوس است: جدیدترین فراخوانی ابتدا نمایش داده می‌شود." @@ -75,8 +76,8 @@ msgstr "رابط استاندارد برای استخراج، قالب‌بند msgid "Dumping the traceback" msgstr "برون‌ریزی ردگیری پشته" -msgid "Dump the tracebacks of all threads into *file*. If *all_threads* is ``False``, dump only the current thread." -msgstr "ردگیری‌های پشته‌ی همه‌ی نخ‌ها را در *file* بنویسید. اگر *all_threads* ``False`` باشد، فقط ردگیری پشته‌ی نخ جاری را بنویسید." +msgid "Dump the tracebacks of all threads into *file*. If *all_threads* is ``False``, dump only the current thread. *max_threads* caps the number of threads dumped." +msgstr "ردگیری‌های تمام نخ‌ها را در *file* برون‌ریزی کنید. اگر *all_threads* برابر با ``False`` باشد، فقط نخ فعلی برون‌ریزی می‌شود. *max_threads* سقف تعداد نخ‌های برون‌ریزی‌شده را تعیین می‌کند." msgid ":func:`traceback.print_tb`, which can be used to print a traceback object." msgstr ":func:`traceback.print_tb`، که می‌تواند برای چاپ یک شیء ردگیری پشته استفاده شود." @@ -84,6 +85,9 @@ msgstr ":func:`traceback.print_tb`، که می‌تواند برای چاپ یک msgid "Added support for passing file descriptor to this function." msgstr "پشتیبانی از ارسال توصیف‌گر پرونده به این تابع افزوده شد." +msgid "Added the *max_threads* keyword argument." +msgstr "آرگومان کلیدواژه‌ای *max_threads* اضافه شد." + msgid "Dumping the C stack" msgstr "برون‌ریزی پشته‌ی C" @@ -117,6 +121,9 @@ msgstr "*file* باید تا پیش از غیرفعال‌شدن هندلر خط msgid "If *c_stack* is ``True``, then the C stack trace is printed after the Python traceback, unless the system does not support it. See :func:`dump_c_stack` for more information on compatibility." msgstr "اگر *c_stack* برابر ``True`` باشد، ردگیری پشته C پس از ردگیری پشته پایتون چاپ می‌شود، مگر آنکه سیستم از آن پشتیبانی نکند. برای اطلاعات بیشتر درباره سازگاری، :func:`dump_c_stack` را ببینید." +msgid "*max_threads* caps the number of threads dumped when a fatal signal fires." +msgstr "پارامتر *max_threads* سقف تعداد نخ‌های تخلیه‌شده هنگام بروز سیگنال مرگبار را تعیین می‌کند." + msgid "On Windows, a handler for Windows exception is also installed." msgstr "در ویندوز، یک هندلر برای استثنای ویندوز نیز نصب می‌شود." @@ -138,8 +145,8 @@ msgstr "بررسی کنید که آیا هندلر خطا فعال است یا msgid "Dumping the tracebacks after a timeout" msgstr "برون‌ریزی ردگیری‌های پشته پس از پایان مهلت" -msgid "Dump the tracebacks of all threads, after a timeout of *timeout* seconds, or every *timeout* seconds if *repeat* is ``True``. If *exit* is ``True``, call :c:func:`!_exit` with status=1 after dumping the tracebacks. (Note :c:func:`!_exit` exits the process immediately, which means it doesn't do any cleanup like flushing file buffers.) If the function is called twice, the new call replaces previous parameters and resets the timeout. The timer has a sub-second resolution." -msgstr "ردگیری‌های پشته‌ی تمام نخ‌ها را پس از گذشت *timeout* ثانیه، یا هر *timeout* ثانیه در صورتی که *repeat* برابر ``True`` باشد، برون‌ریزی می‌کند. اگر *exit* برابر ``True`` باشد، پس از برون‌ریزی ردگیری‌های پشته، :c:func:`!_exit` را با status=1 فراخوانی می‌کند. (توجه: :c:func:`!_exit` فرآیند را بلافاصله خاتمه می‌دهد، به این معنا که هیچ‌گونه پاک‌سازی مانند برون‌ریزی بافرهای پرونده انجام نمی‌دهد.) اگر این تابع دو بار فراخوانی شود، فراخوانی جدید پارامترهای پیشین را جایگزین می‌کند و مهلت زمانی را بازنشانی می‌کند. زمان‌سنج دقتی کمتر از یک ثانیه دارد." +msgid "Dump the tracebacks of all threads, after a timeout of *timeout* seconds, or every *timeout* seconds if *repeat* is ``True``. If *exit* is ``True``, call :c:func:`!_exit` with status=1 after dumping the tracebacks. (Note :c:func:`!_exit` exits the process immediately, which means it doesn't do any cleanup like flushing file buffers.) If the function is called twice, the new call replaces previous parameters and resets the timeout. The timer has a sub-second resolution. *max_threads* caps the number of threads dumped." +msgstr "ردگیری‌های تمام نخ‌ها را پس از یک مهلت زمانی به مدت *timeout* ثانیه، یا اگر *repeat* برابر با ``True`` باشد هر *timeout* ثانیه برون‌ریزی کنید. اگر *exit* برابر با ``True`` باشد، تابع :c:func:`!_exit` با status=1 پس از برون‌ریزی ردگیری‌ها فراخوانی می‌شود. (توجه کنید که :c:func:`!_exit` فرایند را بلافاصله خارج می‌کند، به این معنا که هیچ‌گونه پاکسازی مانند تخلیه بافر‌های پرونده انجام نمی‌دهد.) اگر این تابع دو بار فراخوانی شود، فراخوانی جدید جایگزین پارامترهای قبلی شده و مهلت زمانی را بازنشانی می‌کند. تایمر دارای وضوح زیر ثانیه است. *max_threads* سقف تعداد نخ‌های برون‌ریزی‌شده را تعیین می‌کند." msgid "The *file* must be kept open until the traceback is dumped or :func:`cancel_dump_traceback_later` is called: see :ref:`issue with file descriptors `." msgstr "*file* باید تا زمانی که ردگیری پشته برون‌ریزی شود یا :func:`cancel_dump_traceback_later` فراخوانی شود، باز بماند: :ref:`مسئله‌ی توصیف‌گرهای پرونده ` را ببینید." @@ -156,8 +163,8 @@ msgstr "آخرین فراخوانی :func:`dump_traceback_later` را لغو م msgid "Dumping the traceback on a user signal" msgstr "برون‌ریزی ردگیری پشته در سیگنال کاربر" -msgid "Register a user signal: install a handler for the *signum* signal to dump the traceback of all threads, or of the current thread if *all_threads* is ``False``, into *file*. Call the previous handler if chain is ``True``." -msgstr "ثبت یک سیگنال کاربر: یک هندلر برای سیگنال *signum* نصب می‌شود تا ردگیری پشته همه نخ‌ها، یا نخ جاری اگر *all_threads* برابر ``False`` باشد، در *file* نوشته شود. اگر chain برابر ``True`` باشد، هندلر پیشین فراخوانی می‌شود." +msgid "Register a user signal: install a handler for the *signum* signal to dump the traceback of all threads, or of the current thread if *all_threads* is ``False``, into *file*. Call the previous handler if chain is ``True``. *max_threads* caps the number of threads dumped." +msgstr "ثبت یک سیگنال کاربر: یک هندلر برای سیگنال *signum* نصب کنید تا ردگیری تمام نخ‌ها، یا در صورت ``False`` بودن *all_threads* ردگیری نخ فعلی را در *file* برون‌ریزی کند. اگر chain برابر با ``True`` باشد، هندلر قبلی را فراخوانی کنید. *max_threads* سقف تعداد نخ‌های برون‌ریزی‌شده را تعیین می‌کند." msgid "The *file* must be kept open until the signal is unregistered by :func:`unregister`: see :ref:`issue with file descriptors `." msgstr "*file* باید تا زمانی که سیگنال توسط :func:`unregister` از ثبت خارج شود، باز بماند: به :ref:`مشکل توصیف‌گرهای پرونده ` مراجعه کنید." @@ -199,13 +206,13 @@ msgid "" " 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 \"/opt/python/build/lib.linux-x86_64-3.15/_ctypes.cpython-315d-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/build/lib.linux-x86_64-3.15/_ctypes.cpython-315d-x86_64-linux-gnu.so\", at +0x15a33 [0x77b7315e6a33]\n" +" Binary file \"/opt/python/build/lib.linux-x86_64-3.15/_ctypes.cpython-315d-x86_64-linux-gnu.so\", at +0x164fa [0x77b7315e74fa]\n" +" Binary file \"/opt/python/build/lib.linux-x86_64-3.15/_ctypes.cpython-315d-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" @@ -247,13 +254,13 @@ msgstr "" " 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 \"/opt/python/build/lib.linux-x86_64-3.15/_ctypes.cpython-315d-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/build/lib.linux-x86_64-3.15/_ctypes.cpython-315d-x86_64-linux-gnu.so\", at +0x15a33 [0x77b7315e6a33]\n" +" Binary file \"/opt/python/build/lib.linux-x86_64-3.15/_ctypes.cpython-315d-x86_64-linux-gnu.so\", at +0x164fa [0x77b7315e74fa]\n" +" Binary file \"/opt/python/build/lib.linux-x86_64-3.15/_ctypes.cpython-315d-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" diff --git a/library/fcntl.po b/library/fcntl.po index 4445ddd1..e0d1b2e6 100644 --- a/library/fcntl.po +++ b/library/fcntl.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 08:20+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -68,14 +69,14 @@ msgstr "عملیات *cmd* را روی توصیف‌گر پرونده *fd* ان msgid "When *arg* is an integer, the function returns the integer return value of the C :c:func:`fcntl` call." msgstr "هنگامی که *arg* عدد صحیح باشد، تابع مقدار بازگشتی از نوع عدد صحیحِ فراخوانی C :c:func:`fcntl` را برمی‌گرداند." -msgid "When the argument is bytes-like object, it represents a binary structure, for example, created by :func:`struct.pack`. A string value is encoded to binary using the UTF-8 encoding. The binary data is copied to a buffer whose address is passed to the C :c:func:`fcntl` call. The return value after a successful call is the contents of the buffer, converted to a :class:`bytes` object. The length of the returned object will be the same as the length of the *arg* argument. This is limited to 1024 bytes." -msgstr "هنگامی که آرگومان یک شیء شبه‌بایت (bytes-like) باشد، این آرگومان یک ساختار دودویی را نشان می‌دهد؛ برای مثال، ساختاری که با :func:`struct.pack` ایجاد شده است. یک مقدار رشته‌ای با استفاده از کدگذاری UTF-8 به دودویی کدگذاری می‌شود. داده‌های دودویی به یک بافر کپی می‌شوند و نشانی آن به فراخوانی :c:func:`fcntl` در C ارسال می‌شود. مقدار بازگشتی پس از یک فراخوانی موفق، محتوای بافر است که به یک شیء :class:`bytes` تبدیل می‌شود. طول شیء برگردانده‌شده همان طول آرگومان *arg* خواهد بود. این مقدار به ۱۰۲۴ بایت محدود است." +msgid "When the argument is bytes-like object, it represents a binary structure, for example, created by :func:`struct.pack`. A string value is encoded to binary using the UTF-8 encoding. The binary data is copied to a buffer whose address is passed to the C :c:func:`fcntl` call. The return value after a successful call is the contents of the buffer, converted to a :class:`bytes` object. The length of the returned object will be the same as the length of the *arg* argument." +msgstr "وقتی آرگومان یک شیء شبه‌بایت است، ساختاری دودویی را نشان می‌دهد که مثلاً توسط :func:`struct.pack` ایجاد شده است. مقدار رشته با استفاده از کدگذاری UTF-8 به شکل دودویی کدگذاری می‌شود. داده‌ی دودویی در بافری کپی می‌شود که آدرس آن به فراخوانی C :c:func:`fcntl` ارسال می‌شود. مقدار بازگشتی پس از یک فراخوانی موفق، محتویات بافر است که به یک شیء :class:`bytes` تبدیل شده است. طول شیء بازگشتی برابر با طول آرگومان *arg* خواهد بود." msgid "If the :c:func:`fcntl` call fails, an :exc:`OSError` is raised." msgstr "اگر فراخوانی :c:func:`fcntl` با شکست مواجه شود، یک :exc:`OSError` پرتاب می‌شود." -msgid "If the type or the size of *arg* does not match the type or size of the argument of the operation (for example, if an integer is passed when a pointer is expected, or the information returned in the buffer by the operating system is larger than 1024 bytes), this is most likely to result in a segmentation violation or a more subtle data corruption." -msgstr "اگر نوع یا اندازه‌ی *arg* با نوع یا اندازه‌ی آرگومان عملیات مطابقت نداشته باشد (برای مثال، اگر زمانی که اشاره‌گر مورد انتظار است، یک عدد صحیح ارسال شود، یا اطلاعاتی که سیستم‌عامل در بافر برمی‌گرداند بزرگ‌تر از ۱۰۲۴ بایت باشد)، این حالت به احتمال زیاد منجر به نقض قطعه‌بندی یا خرابی داده‌ی پنهان‌تر می‌شود." +msgid "If the type or size of *arg* does not match the type or size of the operation's argument (for example, if an integer is passed when a pointer is expected, or the information returned in the buffer by the operating system is larger than the size of *arg*), this is most likely to result in a segmentation violation or a more subtle data corruption." +msgstr "اگر نوع یا اندازهی *arg* با نوع یا اندازهی آرگومان عملیات مطابقت نداشته باشد (برای مثال، اگر در صورت انتظار یک اشاره‌گر، یک عدد صحیح ارسال شود، یا اطلاعات بازگردانده‌شده در بافر توسط سیستم‌عامل بزرگ‌تر از اندازه‌ی *arg* باشد)، این امر احتمالاً به خطای قطعه‌بندی (segmentation fault) یا خرابی داده‌های ظریف‌تری منجر می‌شود." msgid "Raises an :ref:`auditing event ` ``fcntl.fcntl`` with arguments ``fd``, ``cmd``, ``arg``." msgstr "یک :ref:`رویداد حسابرسی ` ``fcntl.fcntl`` را با آرگومان‌های ``fd``، ``cmd`` و ``arg`` پرتاب می‌کند." @@ -83,6 +84,9 @@ msgstr "یک :ref:`رویداد حسابرسی ` ``fcntl.fcntl`` را msgid "Add support of arbitrary :term:`bytes-like objects `, not only :class:`bytes`." msgstr "افزودن پشتیبانی از هرگونه :term:`شیء شبه‌بایت (bytes-like object) `، نه فقط :class:`bytes`." +msgid "The size of bytes-like objects is no longer limited to 1024 bytes." +msgstr "اندازه‌ی اشیاء شبه‌بایت دیگر به ۱۰۲۴ بایت محدود نیست." + msgid "This function is identical to the :func:`~fcntl.fcntl` function, except that the argument handling is even more complicated." msgstr "این تابع با تابع :func:`~fcntl.fcntl` یکسان است، با این تفاوت که مدیریت آرگومان‌ها حتی پیچیده‌تر است." @@ -101,9 +105,6 @@ msgstr "اگر *arg* از رابط بافر خواندنی-نوشتنی (مان msgid "If the :c:func:`ioctl` call fails, an :exc:`OSError` exception is raised." msgstr "اگر فراخوانی :c:func:`ioctl` با شکست مواجه شود، یک استثنای :exc:`OSError` پرتاب می‌شود." -msgid "If the type or size of *arg* does not match the type or size of the operation's argument (for example, if an integer is passed when a pointer is expected, or the information returned in the buffer by the operating system is larger than 1024 bytes, or the size of the mutable bytes-like object is too small), this is most likely to result in a segmentation violation or a more subtle data corruption." -msgstr "اگر نوع یا اندازه‌ی *arg* با نوع یا اندازه‌ی آرگومان عملیات مطابقت نداشته باشد (برای مثال، اگر زمانی که یک اشاره‌گر انتظار می‌رود، یک عدد صحیح ارسال شود، یا اطلاعاتی که سیستم‌عامل در بافر برمی‌گرداند بزرگ‌تر از ۱۰۲۴ بایت باشد، یا اندازه‌ی شیء شبه‌بایت (bytes-like) تغییرپذیر بیش از حد کوچک باشد)، این موضوع به احتمال زیاد منجر به خطای قطعه‌بندی (segmentation violation) یا خرابی داده‌ای ظریف‌تر خواهد شد." - msgid "An example::" msgstr "یک مثال::" @@ -136,6 +137,9 @@ msgstr "یک :ref:`رویداد حسابرسی ` ``fcntl.ioctl`` را msgid "The GIL is always released during a system call. System calls failing with EINTR are automatically retried." msgstr "GIL همیشه در حین یک فراخوانی سیستمی آزاد می‌شود. فراخوانی‌های سیستمی که با EINTR ناموفق می‌شوند، به‌طور خودکار دوباره تلاش می‌شوند." +msgid "The size of not mutated bytes-like objects is no longer limited to 1024 bytes." +msgstr "اندازه‌ی اشیاء شبه‌بایت تغییرنیافته دیگر به ۱۰۲۴ بایت محدود نیست." + msgid "Perform the lock operation *operation* on file descriptor *fd* (file objects providing a :meth:`~io.IOBase.fileno` method are accepted as well). See the Unix manual :manpage:`flock(2)` for details. (On some systems, this function is emulated using :c:func:`fcntl`.)" msgstr "عملیات قفل *operation* را روی توصیف‌گر پرونده *fd* انجام دهید (اشیاء پرونده‌ای که یک متد :meth:`~io.IOBase.fileno` ارائه می‌دهند نیز پذیرفته می‌شوند). برای جزئیات، صفحه‌ی راهنمای Unix :manpage:`flock(2)` را ببینید. (در برخی سیستم‌ها، این تابع با استفاده از :c:func:`fcntl` شبیه‌سازی می‌شود.)" @@ -218,3 +222,6 @@ msgstr "کنترل پرونده" msgid "I/O control" msgstr "کنترل ورودی/خروجی" + +#~ msgid "If the type or size of *arg* does not match the type or size of the operation's argument (for example, if an integer is passed when a pointer is expected, or the information returned in the buffer by the operating system is larger than 1024 bytes, or the size of the mutable bytes-like object is too small), this is most likely to result in a segmentation violation or a more subtle data corruption." +#~ msgstr "اگر نوع یا اندازه‌ی *arg* با نوع یا اندازه‌ی آرگومان عملیات مطابقت نداشته باشد (برای مثال، اگر زمانی که یک اشاره‌گر انتظار می‌رود، یک عدد صحیح ارسال شود، یا اطلاعاتی که سیستم‌عامل در بافر برمی‌گرداند بزرگ‌تر از ۱۰۲۴ بایت باشد، یا اندازه‌ی شیء شبه‌بایت (bytes-like) تغییرپذیر بیش از حد کوچک باشد)، این موضوع به احتمال زیاد منجر به خطای قطعه‌بندی (segmentation violation) یا خرابی داده‌ای ظریف‌تر خواهد شد." diff --git a/library/fnmatch.po b/library/fnmatch.po index a7b4e6bb..d2d749d5 100644 --- a/library/fnmatch.po +++ b/library/fnmatch.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 12:29+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -104,8 +105,8 @@ msgstr "فهرستی از آن عناصرِ :term:`پیمایش‌پذیر ` از رشته‌های نام پرونده *names* می‌سازد که با رشته‌ی الگو *pat* مطابقت ندارند. این معادل ``[n for n in names if not fnmatch(n, pat)]`` است، اما به‌صورت کارآمدتری پیاده‌سازی شده است." -msgid "Return the shell-style pattern *pat* converted to a regular expression for using with :func:`re.match`. The pattern is expected to be a :class:`str`." -msgstr "الگوی سبک پوسته *pat* را به‌صورت یک عبارت باقاعده برای استفاده با :func:`re.match` برمی‌گرداند. انتظار می‌رود الگو یک :class:`str` باشد." +msgid "Return the shell-style pattern *pat* converted to a regular expression for using with :func:`re.prefixmatch`. The pattern is expected to be a :class:`str`." +msgstr "الگوی سبک پوسته‌ی *pat* را که به یک عبارت باقاعده برای استفاده با :func:`re.prefixmatch` تبدیل شده است، برگردانید. انتظار می‌رود الگو یک :class:`str` باشد." msgid "Example:" msgstr "مثال:" diff --git a/library/ftplib.po b/library/ftplib.po index 26cd0670..12f0419c 100644 --- a/library/ftplib.po +++ b/library/ftplib.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 01:06+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -318,11 +319,8 @@ msgstr "" msgid ":class:`!FTP_TLS` class inherits from :class:`FTP`, defining these additional methods and attributes:" msgstr "کلاس :class:`!FTP_TLS` از :class:`FTP` ارث می‌برد و این متدها و ویژگی‌های اضافی را تعریف می‌کند:" -msgid "The SSL version to use (defaults to :data:`ssl.PROTOCOL_SSLv23`)." -msgstr "نسخه‌ی SSL برای استفاده (به‌طور پیش‌فرض :data:`ssl.PROTOCOL_SSLv23`)." - -msgid "Set up a secure control connection by using TLS or SSL, depending on what is specified in the :attr:`ssl_version` attribute." -msgstr "بسته به آنچه در ویژگی :attr:`ssl_version` مشخص شده است، با استفاده از TLS یا SSL یک اتصال کنترلی امن برقرار کنید." +msgid "Set up a secure control connection by using TLS." +msgstr "با استفاده از TLS یک اتصال کنترلی امن را راه‌اندازی کنید." msgid "The method now supports hostname check with :attr:`ssl.SSLContext.check_hostname` and *Server Name Indication* (see :const:`ssl.HAS_SNI`)." msgstr "این متد اکنون از بررسی نام میزبان با :attr:`ssl.SSLContext.check_hostname` و *Server Name Indication* پشتیبانی می‌کند (به :const:`ssl.HAS_SNI` مراجعه کنید)." @@ -330,8 +328,8 @@ msgstr "این متد اکنون از بررسی نام میزبان با :attr: msgid "Revert control channel back to plaintext. This can be useful to take advantage of firewalls that know how to handle NAT with non-secure FTP without opening fixed ports." msgstr "کانال کنترل را به متن آشکار بازمی‌گرداند. این می‌تواند برای بهره‌گیری از فایروال‌هایی که می‌دانند چگونه NAT را با FTP غیرامن بدون باز کردن پورت‌های ثابت مدیریت کنند، مفید باشد." -msgid "Set up secure data connection." -msgstr "اتصال امن داده را راه‌اندازی کنید." +msgid "Set up secure data connection by using TLS." +msgstr "با استفاده از TLS یک اتصال داده‌ی امن را راه‌اندازی کنید." msgid "Set up clear text data connection." msgstr "اتصال داده‌ی متن آشکار (clear text) را برقرار کنید." @@ -368,3 +366,9 @@ msgstr "پروتکل" msgid "ftplib (standard module)" msgstr "ftplib (ماژول استاندارد)" + +#~ msgid "The SSL version to use (defaults to :data:`ssl.PROTOCOL_SSLv23`)." +#~ msgstr "نسخه‌ی SSL برای استفاده (به‌طور پیش‌فرض :data:`ssl.PROTOCOL_SSLv23`)." + +#~ msgid "Set up a secure control connection by using TLS or SSL, depending on what is specified in the :attr:`ssl_version` attribute." +#~ msgstr "بسته به آنچه در ویژگی :attr:`ssl_version` مشخص شده است، با استفاده از TLS یا SSL یک اتصال کنترلی امن برقرار کنید." diff --git a/library/functools.po b/library/functools.po index e1497733..f4cd1089 100644 --- a/library/functools.po +++ b/library/functools.po @@ -7,13 +7,14 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" -"PO-Revision-Date: 2026-09-14 09:04+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 20:42+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" @@ -73,6 +74,9 @@ msgstr "نهانگاه ایمن برای نخ‌ها است تا بتوان از msgid "It is possible for the wrapped function to be called more than once if another thread makes an additional call before the initial call has been completed and cached." msgstr "ممکن است تابع پوشیده‌شده بیش از یک بار فراخوانی شود، اگر نخ دیگری پیش از آنکه فراخوانی اولیه کامل شده و در نهانگاه ذخیره شده باشد، یک فراخوانی اضافی انجام دهد." +msgid "Call-once behavior is not guaranteed because locks are not held during the function call. Potentially another call with the same arguments could occur while the first call is still running." +msgstr "رفتار یک‌بار فراخوانی تضمین نمی‌شود زیرا قفل‌ها در طول فراخوانی تابع نگه داشته نمی‌شوند. این احتمال وجود دارد که در حالی که فراخوانی اول هنوز در حال اجراست، فراخوانی دیگری با همان آرگومان‌ها رخ دهد." + msgid "Transform a method of a class into a property whose value is computed once and then cached as a normal attribute for the life of the instance. Similar to :deco:`property`, with the addition of caching. Useful for expensive computed properties of instances that are otherwise effectively immutable." msgstr "یک متد از کلاس را به پراپرتی تبدیل می‌کند که مقدار آن یک بار محاسبه می‌شود و سپس برای طول عمر نمونه به‌عنوان یک ویژگی معمولی در نهانگاه ذخیره می‌شود. مشابه :deco:`property`، با افزودن نهانگاه‌سازی. برای پراپرتی‌های محاسبه‌شده‌ی پرهزینه در نمونه‌هایی که در غیر این صورت عملاً تغییرناپذیر هستند، مفید است." @@ -148,12 +152,12 @@ msgstr "اگر *user_function* مشخص شده باشد، باید فراخوا msgid "" "@lru_cache\n" -"def count_vowels(sentence):\n" -" return sum(sentence.count(vowel) for vowel in 'AEIOUaeiou')" +"def count_vowels(word):\n" +" return sum(word.count(vowel) for vowel in 'AEIOUaeiou')" msgstr "" "@lru_cache\n" -"def count_vowels(sentence):\n" -" return sum(sentence.count(vowel) for vowel in 'AEIOUaeiou')" +"def count_vowels(word):\n" +" return sum(word.count(vowel) for vowel in 'AEIOUaeiou')" msgid "If *maxsize* is set to ``None``, the LRU feature is disabled and the cache can grow without bound." msgstr "اگر *maxsize* برابر ``None`` قرار داده شود، قابلیت LRU غیرفعال می‌شود و نهانگاه می‌تواند بدون محدودیت رشد کند." @@ -456,7 +460,7 @@ msgid "Roughly equivalent to::" msgstr "تقریباً معادل با::" msgid "" -"initial_missing = object()\n" +"initial_missing = sentinel('initial_missing')\n" "\n" "def reduce(function, iterable, /, initial=initial_missing):\n" " it = iter(iterable)\n" @@ -468,7 +472,7 @@ msgid "" " value = function(value, element)\n" " return value" msgstr "" -"initial_missing = object()\n" +"initial_missing = sentinel('initial_missing')\n" "\n" "def reduce(function, iterable, /, initial=initial_missing):\n" " it = iter(iterable)\n" @@ -829,6 +833,9 @@ msgstr "" msgid "The same pattern can be used for other similar decorators: :deco:`staticmethod`, :deco:`~abc.abstractmethod`, and others." msgstr "می‌توان از همین الگو برای دکوراتورهای مشابه دیگر نیز استفاده کرد: :deco:`staticmethod`، :deco:`~abc.abstractmethod` و دیگر موارد." +msgid "Added support of non-:term:`descriptor` callables." +msgstr "پشتیبانی از فراخوانی‌پذیرهای غیر :term:`توصیف‌گر ` اضافه شد." + msgid "Update a *wrapper* function to look like the *wrapped* function. The optional arguments are tuples to specify which attributes of the original function are assigned directly to the matching attributes on the wrapper function and which attributes of the wrapper function are updated with the corresponding attributes from the original function. The default values for these arguments are the module level constants ``WRAPPER_ASSIGNMENTS`` (which assigns to the wrapper function's :attr:`~function.__module__`, :attr:`~function.__name__`, :attr:`~function.__qualname__`, :attr:`~function.__annotations__`, :attr:`~function.__type_params__`, and :attr:`~function.__doc__`, the documentation string) and ``WRAPPER_UPDATES`` (which updates the wrapper function's :attr:`~function.__dict__`, i.e. the instance dictionary)." msgstr "یک تابع *پوششی* را به‌روزرسانی کنید تا شبیه تابع *پوشیده‌شده* به نظر برسد. آرگومان‌های اختیاری، تاپل‌هایی هستند که مشخص می‌کنند کدام ویژگی‌های تابع اصلی مستقیماً به ویژگی‌های متناظر در تابع پوششی انتساب داده می‌شوند و کدام ویژگی‌های تابع پوششی با ویژگی‌های متناظر از تابع اصلی به‌روزرسانی می‌شوند. مقادیر پیش‌فرض این آرگومان‌ها، ثابت‌های سطح ماژول ``WRAPPER_ASSIGNMENTS`` (که به ویژگی‌های تابع پوششی شامل :attr:`~function.__module__`، :attr:`~function.__name__`، :attr:`~function.__qualname__`، :attr:`~function.__annotations__`، :attr:`~function.__type_params__` و :attr:`~function.__doc__`، یعنی رشته مستندسازی، مقدار انتساب می‌دهد) و ``WRAPPER_UPDATES`` (که :attr:`~function.__dict__` تابع پوششی، یعنی دیکشنری نمونه، را به‌روزرسانی می‌کند) هستند." diff --git a/library/gc.po b/library/gc.po index 2ba7e224..f52239e5 100644 --- a/library/gc.po +++ b/library/gc.po @@ -6,12 +6,13 @@ # Translators: # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 16:11+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -85,8 +86,17 @@ msgstr "``collections`` تعداد دفعاتی است که این نسل جمع msgid "``collected`` is the total number of objects collected inside this generation;" msgstr "``collected`` تعداد کل اشیایی است که در این نسل جمع‌آوری شده‌اند؛" -msgid "``uncollectable`` is the total number of objects which were found to be uncollectable (and were therefore moved to the :data:`garbage` list) inside this generation." -msgstr "``uncollectable`` تعداد کل اشیایی است که در این نسل غیرقابل جمع‌آوری تشخیص داده شدند (و بنابراین به فهرست :data:`garbage` منتقل شدند)." +msgid "``uncollectable`` is the total number of objects which were found to be uncollectable (and were therefore moved to the :data:`garbage` list) inside this generation;" +msgstr "``uncollectable`` تعداد کل اشیایی است که مشخص شد غیرقابل جمع‌آوری هستند (و بنابراین به فهرست :data:`garbage` منتقل شدند) در این نسل؛" + +msgid "``candidates`` is the total number of objects in this generation which were considered for collection and traversed;" +msgstr "``candidates`` تعداد کل اشیا در این نسل است که برای جمع‌آوری در نظر گرفته شده و پیمایش شدند؛" + +msgid "``duration`` is the total time in seconds spent in collections for this generation." +msgstr "``duration`` کل زمان بر حسب ثانیه است که صرف جمع‌آوری‌های این نسل شده است." + +msgid "Add ``duration`` and ``candidates``." +msgstr "اضافه کردن ``duration`` و ``candidates``." msgid "Set the garbage collection thresholds (the collection frequency). Setting *threshold0* to zero disables collection." msgstr "آستانه‌های زباله‌روبی (فرکانس جمع‌آوری) را تنظیم کنید. قرار دادن *threshold0* روی ۰، جمع‌آوری را غیرفعال می‌کند." @@ -94,11 +104,8 @@ msgstr "آستانه‌های زباله‌روبی (فرکانس جمع‌آو msgid "The GC classifies objects into three generations depending on how many collection sweeps they have survived. New objects are placed in the youngest generation (generation ``0``). If an object survives a collection it is moved into the next older generation. Since generation ``2`` is the oldest generation, objects in that generation remain there after a collection. In order to decide when to run, the collector keeps track of the number object allocations and deallocations since the last collection. When the number of allocations minus the number of deallocations exceeds *threshold0*, collection starts. Initially only generation ``0`` is examined. If generation ``0`` has been examined more than *threshold1* times since generation ``1`` has been examined, then generation ``1`` is examined as well. With the third generation, things are a bit more complicated, see `Collecting the oldest generation `_ for more information." msgstr "GC اشیاء را بسته به اینکه از چند دور زباله‌روبی جان به در برده‌اند، به سه نسل طبقه‌بندی می‌کند. اشیاء جدید در جوان‌ترین نسل (نسل ``0``) قرار می‌گیرند. اگر شیء از یک زباله‌روبی جان به در ببرد، به نسل قدیمی‌تر بعدی منتقل می‌شود. از آنجا که نسل ``2`` قدیمی‌ترین نسل است، اشیاء موجود در آن نسل پس از زباله‌روبی در همان‌جا باقی می‌مانند. جمع‌کننده برای تصمیم‌گیری درباره زمان اجرا، تعداد تخصیص‌ها و آزادسازی‌های اشیاء از آخرین زباله‌روبی را پیگیری می‌کند. هنگامی که تعداد تخصیص‌ها منهای تعداد آزادسازی‌ها از *threshold0* بیشتر شود، زباله‌روبی آغاز می‌شود. در ابتدا فقط نسل ``0`` بررسی می‌شود. اگر نسل ``0`` از زمانی که نسل ``1`` بررسی شده است بیش از *threshold1* بار بررسی شده باشد، نسل ``1`` نیز بررسی می‌شود. در مورد نسل سوم، اوضاع کمی پیچیده‌تر است؛ برای اطلاعات بیشتر `جمع‌آوری قدیمی‌ترین نسل `_ را ببینید." -msgid "In the free-threaded build, the increase in process memory usage is also checked before running the collector. If the memory usage has not increased by 10% since the last collection and the net number of object allocations has not exceeded 40 times *threshold0*, the collection is not run." -msgstr "در ساخت نخ‌آزاد (free-threaded build)، افزایش مصرف حافظه‌ی فرایند نیز پیش از اجرای جمع‌آور بررسی می‌شود. اگر مصرف حافظه از زمان آخرین جمع‌آوری ۱۰ درصد افزایش پیدا نکرده باشد و تعداد خالص تخصیص‌های شیء از ۴۰ برابر *threshold0* فراتر نرفته باشد، جمع‌آوری اجرا نمی‌شود." - -msgid "See `Garbage collector design `_ for more information." -msgstr "برای اطلاعات بیشتر، `طراحی زباله‌رو `_ را ببینید." +msgid "See `Garbage collector design `_ for more information." +msgstr "برای اطلاعات بیشتر به `طراحی جمع‌آوری‌کننده‌ی زباله `_ مراجعه کنید." msgid "*threshold2* is ignored" msgstr "*threshold2* نادیده گرفته می‌شود" @@ -237,6 +244,12 @@ msgstr "\"collected\": هنگامی که *phase* برابر \"stop\" باشد، msgid "\"uncollectable\": When *phase* is \"stop\", the number of objects that could not be collected and were put in :data:`garbage`." msgstr "\"uncollectable\": وقتی *phase* برابر \"stop\" است، تعداد اشیایی که جمع‌آوری نشدند و در :data:`garbage` قرار گرفتند." +msgid "\"candidates\": When *phase* is \"stop\", the total number of objects in this generation which were considered for collection and traversed." +msgstr "\"candidates\": وقتی *phase* برابر با \"stop\" است، تعداد کل اشیا در این نسل که برای جمع‌آوری در نظر گرفته شده و پیمایش شدند." + +msgid "\"duration\": When *phase* is \"stop\", the time in seconds spent in the collection." +msgstr "\"duration\": وقتی *phase* برابر با \"stop\" است، زمان بر حسب ثانیه که صرف جمع‌آوری شده است." + msgid "Applications can add their own callbacks to this list. The primary use cases are:" msgstr "برنامه‌ها می‌توانند کال‌بک‌های خود را به این فهرست اضافه کنند. موارد استفاده اصلی عبارتند از:" @@ -246,6 +259,9 @@ msgstr "جمع‌آوری آمار درباره زباله‌روبی، مانن msgid "Allowing applications to identify and clear their own uncollectable types when they appear in :data:`garbage`." msgstr "اجازه دادن به برنامه‌ها برای شناسایی و پاک‌سازی انواع غیرقابل‌جمع‌آوری خودشان، هنگامی که در :data:`garbage` ظاهر می‌شوند." +msgid "Add \"duration\" and \"candidates\"." +msgstr "اضافه کردن \"duration\" و \"candidates\"." + msgid "The following constants are provided for use with :func:`set_debug`:" msgstr "ثابت‌های زیر برای استفاده با :func:`set_debug` ارائه شده‌اند:" @@ -266,3 +282,6 @@ msgstr "هنگامی که تنظیم شود، تمام اشیاء غیرقابل msgid "The debugging flags necessary for the collector to print information about a leaking program (equal to ``DEBUG_COLLECTABLE | DEBUG_UNCOLLECTABLE | DEBUG_SAVEALL``)." msgstr "پرچم‌های اشکال‌زدایی مورد نیاز برای جمع‌کننده تا اطلاعات مربوط به برنامه‌ای که نشتی دارد را چاپ کند (برابر با ``DEBUG_COLLECTABLE | DEBUG_UNCOLLECTABLE | DEBUG_SAVEALL``)." + +#~ msgid "In the free-threaded build, the increase in process memory usage is also checked before running the collector. If the memory usage has not increased by 10% since the last collection and the net number of object allocations has not exceeded 40 times *threshold0*, the collection is not run." +#~ msgstr "در ساخت نخ‌آزاد (free-threaded build)، افزایش مصرف حافظه‌ی فرایند نیز پیش از اجرای جمع‌آور بررسی می‌شود. اگر مصرف حافظه از زمان آخرین جمع‌آوری ۱۰ درصد افزایش پیدا نکرده باشد و تعداد خالص تخصیص‌های شیء از ۴۰ برابر *threshold0* فراتر نرفته باشد، جمع‌آوری اجرا نمی‌شود." diff --git a/library/getpass.po b/library/getpass.po index 2fb3cfca..144ebaec 100644 --- a/library/getpass.po +++ b/library/getpass.po @@ -6,12 +6,13 @@ # Translators: # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-11 13:26+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -49,12 +50,39 @@ msgstr "اگر ورودی بدون بازتاب در دسترس نباشد، get msgid "If you call getpass from within IDLE, the input may be done in the terminal you launched IDLE from rather than the idle window itself." msgstr "اگر getpass را از درون IDLE فراخوانی کنید، ممکن است ورودی به‌جای خود پنجره IDLE، در پایانه‌ای که IDLE را از آن راه‌اندازی کرده‌اید انجام شود." -msgid "On Unix systems, when *echo_char* is set, the terminal will be configured to operate in :manpage:`noncanonical mode `. In particular, this means that line editing shortcuts such as :kbd:`Ctrl+U` will not work and may insert unexpected characters into the input." -msgstr "در سیستم‌های یونیکسی، هنگامی که *echo_char* تنظیم شده باشد، پایانه به‌گونه‌ای پیکربندی می‌شود که در :manpage:`حالت غیرکانونیکال (noncanonical mode) ` عمل کند. به‌ویژه، این بدان معناست که میان‌برهای ویرایش خط مانند :kbd:`Ctrl+U` کار نخواهند کرد و ممکن است نویسه‌های غیرمنتظره را در ورودی درج کنند." +msgid "On Unix systems, when *echo_char* is set, the terminal will be configured to operate in :manpage:`noncanonical mode `. Common terminal control characters are supported:" +msgstr "در سیستم‌های یونیکس، هنگامی که *echo_char* تنظیم شده باشد، ترمینال به گونه‌ای پیکربندی می‌شود که در :manpage:`حالت غیرمتعارف ` عمل کند. کاراکترهای کنترل رایج ترمینال پشتیبانی می‌شوند:" + +msgid ":kbd:`Ctrl+A` - Move cursor to beginning of line" +msgstr ":kbd:`Ctrl+A` - انتقال نشانگر به ابتدای سطر" + +msgid ":kbd:`Ctrl+E` - Move cursor to end of line" +msgstr ":kbd:`Ctrl+E` - انتقال نشانگر به انتهای سطر" + +msgid ":kbd:`Ctrl+K` - Kill (delete) from cursor to end of line" +msgstr ":kbd:`Ctrl+K` - حذف (برش) از نشانگر تا انتهای سطر" + +msgid ":kbd:`Ctrl+U` - Kill (delete) entire line" +msgstr ":kbd:`Ctrl+U` - حذف (برش) کل سطر" + +msgid ":kbd:`Ctrl+W` - Erase previous word" +msgstr ":kbd:`Ctrl+W` - پاک کردن کلمه‌ی قبلی" + +msgid ":kbd:`Ctrl+V` - Insert next character literally (quote)" +msgstr ":kbd:`Ctrl+V` - درج نویسه‌ی بعدی به صورت تحت‌اللفظی (نقل‌قول)" + +msgid ":kbd:`Backspace`/:kbd:`DEL` - Delete character before cursor" +msgstr ":kbd:`Backspace`/:kbd:`DEL` - حذف نویسه‌ی قبل از نشانگر" + +msgid "These shortcuts work by reading the terminal's configured control character mappings from termios settings." +msgstr "این میان‌برها با خواندن نگاشت‌های نویسه‌ی کنترلی پیکربندی‌شده‌ی ترمینال از تنظیمات termios کار می‌کنند." msgid "Added the *echo_char* parameter for keyboard feedback." msgstr "پارامتر *echo_char* برای بازخورد صفحه‌کلید افزوده شد." +msgid "When using non-empty *echo_char* on Unix, keyboard shortcuts (including cursor movement and line editing) are now properly handled using the terminal's control character configuration." +msgstr "هنگام استفاده از *echo_char* غیرخالی در یونیکس، میان‌برهای صفحه کلید (از جمله حرکت نشانگر و ویرایش سطر) اکنون با استفاده از پیکربندی نویسه‌ی کنترلی ترمینال به درستی مدیریت می‌شوند." + msgid "A :exc:`UserWarning` subclass issued when password input may be echoed." msgstr "یک زیرکلاس از :exc:`UserWarning` که زمانی صادر می‌شود که ممکن است ورودی گذرواژه بازتاب داده شود." diff --git a/library/glob.po b/library/glob.po index cbef2784..f879f3db 100644 --- a/library/glob.po +++ b/library/glob.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 01:06+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -89,8 +90,8 @@ msgstr "یک :term:`iterator` برمی‌گرداند که همان مقادیر msgid "Escape all special characters (``'?'``, ``'*'`` and ``'['``). This is useful if you want to match an arbitrary literal string that may have special characters in it. Special characters in drive/UNC sharepoints are not escaped, for example on Windows ``escape('//?/c:/Quo vadis?.txt')`` returns ``'//?/c:/Quo vadis[?].txt'``." msgstr "تمام نویسه‌های خاص (``'?'``، ``'*'`` و ``'['``) را خنثی می‌کند. این کار زمانی مفید است که بخواهید یک رشته‌ی لفظی دلخواه را که ممکن است حاوی نویسه‌های خاص باشد، تطبیق دهید. نویسه‌های خاص در نقاط اشتراک‌گذاری درایو/UNC خنثی نمی‌شوند. برای مثال در ویندوز، ``escape('//?/c:/Quo vadis?.txt')`` ``'//?/c:/Quo vadis[?].txt'`` را برمی‌گرداند." -msgid "Convert the given path specification to a regular expression for use with :func:`re.match`. The path specification can contain shell-style wildcards." -msgstr "مشخصه مسیر داده‌شده را به یک عبارت باقاعده برای استفاده با :func:`re.match` تبدیل می‌کند. مشخصه مسیر می‌تواند شامل وایلدکارد به‌سبک پوسته باشد." +msgid "Convert the given path specification to a regular expression for use with :func:`re.prefixmatch`. The path specification can contain shell-style wildcards." +msgstr "مشخصات مسیر داده‌شده را به یک عبارت باقاعده برای استفاده با :func:`re.prefixmatch` تبدیل کنید. مشخصات مسیر می‌تواند حاوی وایلدکاردهای سبک پوسته باشد." msgid "For example:" msgstr "برای مثال:" diff --git a/library/gzip.po b/library/gzip.po index 8924b3a8..e88e6136 100644 --- a/library/gzip.po +++ b/library/gzip.po @@ -7,12 +7,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 01:07+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -73,6 +74,9 @@ msgstr "پشتیبانی از حالت‌های ``'x'``، ``'xb'`` و ``'xt'`` msgid "Accepts a :term:`path-like object`." msgstr "یک :term:`path-like object` را می‌پذیرد." +msgid "The default compression level was reduced to 6 (down from 9). It is the default level used by most compression tools and a better tradeoff between speed and performance." +msgstr "سطح فشرده‌سازی پیش‌فرض به ۶ (کاهش‌یافته از ۹) کاهش یافت. این سطح پیش‌فرضی است که توسط بیشتر ابزارهای فشرده‌سازی استفاده می‌شود و توازن بهتری بین سرعت و کارایی برقرار می‌کند." + msgid "An exception raised for invalid gzip files. It inherits from :exc:`OSError`. :exc:`EOFError` and :exc:`zlib.error` can also be raised for invalid gzip files." msgstr "استثنایی که برای پرونده‌های gzip نامعتبر پرتاب می‌شود. این استثنا از :exc:`OSError` ارث‌بری می‌کند. :exc:`EOFError` و :exc:`zlib.error` نیز ممکن است برای پرونده‌های gzip نامعتبر پرتاب شوند." @@ -94,8 +98,8 @@ msgstr "توجه داشته باشید که پرونده همیشه در حال msgid "The *compresslevel* argument is an integer from ``0`` to ``9`` controlling the level of compression; ``1`` is fastest and produces the least compression, and ``9`` is slowest and produces the most compression. ``0`` is no compression. The default is ``9``." msgstr "آرگومان *compresslevel* یک عدد صحیح از ``0`` تا ``9`` است که سطح فشرده‌سازی را کنترل می‌کند؛ ``1`` سریع‌ترین است و کمترین میزان فشرده‌سازی را تولید می‌کند، و ``9`` کندترین است و بیشترین میزان فشرده‌سازی را تولید می‌کند. ``0`` بدون فشرده‌سازی است. مقدار پیش‌فرض ``9`` است." -msgid "The optional *mtime* argument is the timestamp requested by gzip. The time is in Unix format, i.e., seconds since 00:00:00 UTC, January 1, 1970. If *mtime* is omitted or ``None``, the current time is used. Use *mtime* = 0 to generate a compressed stream that does not depend on creation time." -msgstr "آرگومان اختیاری *mtime* برچسب زمانی است که gzip درخواست می‌کند. این زمان در قالب Unix است، یعنی ثانیه‌های سپری‌شده از ۰۰:۰۰:۰۰ UTC، ۱ ژانویه ۱۹۷۰. اگر *mtime* حذف شود یا ``None`` باشد، از زمان جاری استفاده می‌شود. برای تولید یک جریان فشرده که به زمان ایجاد وابسته نباشد، از *mtime* = 0 استفاده کنید." +msgid "The optional *mtime* argument is the timestamp requested by gzip. The time is in Unix format, i.e., seconds since 00:00:00 UTC, January 1, 1970. Set *mtime* to ``0`` to generate a compressed stream that does not depend on creation time. If *mtime* is omitted or ``None``, the current time is used; however, if the current time is outside the range 00:00:00 UTC, January 1, 1970 through 06:28:15 UTC, February 7, 2106, or explicitly passed *mtime* argument is outside the range ``0`` to ``2**32-1``, then the value ``0`` is used instead." +msgstr "آرگومان اختیاری *mtime* برچسب زمانی درخواست‌شده توسط gzip است. زمان در قالب یونیکس است، یعنی تعداد ثانیه‌های سپری‌شده از 00:00:00 UTC، ۱ ژانویه‌ی ۱۹۷۰. برای تولید یک جریان فشرده‌شده که به زمان ایجاد وابسته نباشد، *mtime* را روی ``0`` تنظیم کنید. اگر *mtime* حذف شود یا ``None`` باشد، از زمان فعلی استفاده می‌شود؛ با این حال، اگر زمان فعلی خارج از بازه‌ی 00:00:00 UTC، ۱ ژانویه‌ی ۱۹۷۰ تا 06:28:15 UTC، ۷ فوریه‌ی ۲۱۰۶ باشد، یا آرگومان *mtime* به‌طور صریح خارج از بازه‌ی ``0`` تا ``2**32-1`` داده شود، به‌جای آن از مقدار ``0`` استفاده می‌شود." msgid "See below for the :attr:`mtime` attribute that is set when decompressing." msgstr "در زیر ویژگی :attr:`mtime` را ببینید که هنگام از حالت فشرده خارج کردن تنظیم می‌شود." diff --git a/library/hashlib.po b/library/hashlib.po index 0cabc533..8d236ae1 100644 --- a/library/hashlib.po +++ b/library/hashlib.po @@ -10,12 +10,13 @@ # Ariyan Bolandi, 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 08:07+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -47,8 +48,11 @@ msgstr "برای هر نوع :dfn:`هش (hash)`، یک متد سازنده با msgid "To allow multithreading, the Python :term:`GIL` is released while computing a hash supplied more than 2047 bytes of data at once in its constructor or :meth:`.update` method." msgstr "برای امکان‌پذیر کردن چندنخی، :term:`GIL` پایتون هنگام محاسبه‌ی هشی که بیش از ۲۰۴۷ بایت داده را به‌صورت یک‌جا در سازنده یا متد :meth:`.update` خود دریافت کرده است، آزاد می‌شود." -msgid "Constructors for hash algorithms that are always present in this module are :func:`sha1`, :func:`sha224`, :func:`sha256`, :func:`sha384`, :func:`sha512`, :func:`sha3_224`, :func:`sha3_256`, :func:`sha3_384`, :func:`sha3_512`, :func:`shake_128`, :func:`shake_256`, :func:`blake2b`, and :func:`blake2s`. :func:`md5` is normally available as well, though it may be missing or blocked if you are using a rare \"FIPS compliant\" build of Python. These correspond to :data:`algorithms_guaranteed`." -msgstr "سازنده‌هایی برای الگوریتم‌های هش که همیشه در این ماژول موجود هستند، عبارت‌اند از :func:`sha1`، :func:`sha224`، :func:`sha256`، :func:`sha384`، :func:`sha512`، :func:`sha3_224`، :func:`sha3_256`، :func:`sha3_384`، :func:`sha3_512`، :func:`shake_128`، :func:`shake_256`، :func:`blake2b` و :func:`blake2s`. :func:`md5` نیز معمولاً در دسترس است، هرچند اگر از یک نسخه‌ی ساخت نادر «سازگار با FIPS» پایتون استفاده می‌کنید، ممکن است وجود نداشته باشد یا مسدود شده باشد. این موارد با :data:`algorithms_guaranteed` متناظر هستند." +msgid "Constructors for hash algorithms that are always present in this module are :func:`md5`, :func:`sha1`, :func:`sha224`, :func:`sha256`, :func:`sha384`, :func:`sha512`, :func:`sha3_224`, :func:`sha3_256`, :func:`sha3_384`, :func:`sha3_512`, :func:`shake_128`, :func:`shake_256`, :func:`blake2b`, and :func:`blake2s`. These correspond to :data:`algorithms_guaranteed`." +msgstr "سازنده‌های الگوریتم‌های هش که همیشه در این ماژول موجود هستند عبارتند از: :func:`md5`، :func:`sha1`، :func:`sha224`، :func:`sha256`، :func:`sha384`، :func:`sha512`، :func:`sha3_224`، :func:`sha3_256`، :func:`sha3_384`، :func:`sha3_512`، :func:`shake_128`، :func:`shake_256`، :func:`blake2b` و :func:`blake2s`. این موارد با :data:`algorithms_guaranteed` مطابقت دارند." + +msgid "Any of these may nonetheless be missing or blocked in unusual environments, such as a rare \"FIPS compliant\" build of Python or when OpenSSL's \"FIPS mode\" is configured to exclude some algorithms from its default provider. Calling the constructor of an algorithm that is unavailable raises :exc:`ValueError`." +msgstr "با این حال، هر یک از این موارد ممکن است در محیط‌های غیرمعمول، مانند ساخت کمیاب «سازگار با FIPS» از پایتون یا زمانی که «حالت FIPS» کتابخانه‌ی OpenSSL به‌گونه‌ای پیکربندی شده باشد که برخی الگوریتم‌ها را از ارائه‌دهنده‌ی پیش‌فرض خود مستثنی کند، مفقود یا مسدود شده باشند. فراخوانی سازنده‌ی الگوریتمی که در دسترس نیست، استثنای :exc:`ValueError` را بالا می‌آورد." msgid "Additional algorithms may also be available if your Python distribution's :mod:`!hashlib` was linked against a build of OpenSSL that provides others. Others *are not guaranteed available* on all installations and will only be accessible by name via :func:`new`. See :data:`algorithms_available`." msgstr "اگر :mod:`!hashlib` توزیع پایتون شما با ساختی از OpenSSL پیوند داده شده باشد که سایر الگوریتم‌ها را فراهم کند، ممکن است الگوریتم‌های اضافی دیگری نیز در دسترس باشند. سایر الگوریتم‌ها *در دسترس بودنشان در همه نصب‌ها تضمین نمی‌شود* و تنها با نام از طریق :func:`new` قابل دسترسی خواهند بود. :data:`algorithms_available` را ببینید." @@ -68,6 +72,9 @@ msgstr "Hashlib اکنون در صورتی که OpenSSL آن‌ها را فرا msgid "For any of the MD5, SHA1, SHA2, or SHA3 algorithms that the linked OpenSSL does not provide we fall back to a verified implementation from the `HACL\\* project`_." msgstr "برای هر یک از الگوریتم‌های MD5، SHA1، SHA2 یا SHA3 که OpenSSL پیوندداده‌شده آن‌ها را فراهم نمی‌کند، به یک پیاده‌سازی تأییدشده از `HACL\\* project`_ متوسل می‌شویم." +msgid "The undocumented ``string`` keyword parameter in :func:`!_hashlib.new` and hash-named constructors such as :func:`!_md5.md5` is deprecated. Prefer passing the initial data as a positional argument for maximum backwards compatibility." +msgstr "پارامتر کلیدواژه‌ی مستندنشده‌ی ``string`` در :func:`!_hashlib.new` و سازنده‌های نام‌گذاری‌شده‌ی هش مانند :func:`!_md5.md5` منسوخ شده است. برای حداکثر سازگاری با نسخه‌های قبلی، ترجیح بر این است که داده‌های اولیه به عنوان یک آرگومان جایگاهی ارسال شوند." + msgid "Usage" msgstr "استفاده" diff --git a/library/heapq.po b/library/heapq.po index 90014739..3017061d 100644 --- a/library/heapq.po +++ b/library/heapq.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 20:09+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -337,29 +338,11 @@ msgstr "نظریه" msgid "Heaps are arrays for which ``a[k] <= a[2*k+1]`` and ``a[k] <= a[2*k+2]`` for all *k*, counting elements from 0. For the sake of comparison, non-existing elements are considered to be infinite. The interesting property of a heap is that ``a[0]`` is always its smallest element." msgstr "هیپ‌ها آرایه‌هایی هستند که در آن‌ها برای همه‌ی *k*، ``a[k] <= a[2*k+1]`` و ``a[k] <= a[2*k+2]`` برقرار است، با شمارش عناصر از ۰. برای مقایسه، عناصر ناموجود بی‌نهایت در نظر گرفته می‌شوند. ویژگی جالب یک هیپ این است که ``a[0]`` همیشه کوچک‌ترین عنصر آن است." -msgid "The strange invariant above is meant to be an efficient memory representation for a tournament. The numbers below are *k*, not ``a[k]``::" -msgstr "ناوردای عجیب بالا به‌عنوان یک بازنمایی کارآمد در حافظه برای یک تورنمنت (tournament) در نظر گرفته شده است. اعداد زیر *k* هستند، نه ``a[k]``::" +msgid "The strange invariant above is meant to be an efficient memory representation for a tournament. The numbers below are *k*, not ``a[k]``:" +msgstr "ناوردای عجیب بالا برای این در نظر گرفته شده است که یک بازنمایی حافظه‌ی کارآمد برای یک تورنمنت باشد. اعداد زیر *k* هستند، نه ``a[k]``:" -msgid "" -" 0\n" -"\n" -" 1 2\n" -"\n" -" 3 4 5 6\n" -"\n" -" 7 8 9 10 11 12 13 14\n" -"\n" -"15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30" -msgstr "" -" 0\n" -"\n" -" 1 2\n" -"\n" -" 3 4 5 6\n" -"\n" -" 7 8 9 10 11 12 13 14\n" -"\n" -"15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30" +msgid "Example (min-heap) binary tree." +msgstr "درخت دودویی نمونه (هیپ کمینه)." msgid "In the tree above, each cell *k* is topping ``2*k+1`` and ``2*k+2``. In a usual binary tournament we see in sports, each cell is the winner over the two cells it tops, and we can trace the winner down the tree to see all opponents s/he had. However, in many computer applications of such tournaments, we do not need to trace the history of a winner. To be more memory efficient, when a winner is promoted, we try to replace it by something else at a lower level, and the rule becomes that a cell and the two cells it tops contain three different items, but the top cell \"wins\" over the two topped cells." msgstr "در درخت بالا، هر سلول *k* بر ``2*k+1`` و ``2*k+2`` قرار دارد. در یک تورنمنت دودویی معمول که در ورزش‌ها می‌بینیم، هر سلول برنده‌ی دو سلولی است که بر آن‌ها قرار دارد، و می‌توانیم برنده را در درخت به سمت پایین دنبال کنیم تا همه‌ی حریفانی را که داشته است ببینیم. با این حال، در بسیاری از کاربردهای رایانه‌ای چنین تورنمنت‌هایی، نیازی به پیگیری تاریخچه‌ی یک برنده نیست. برای کارآمدتر بودن از نظر حافظه، هنگامی که یک برنده ارتقا می‌یابد، سعی می‌کنیم آن را با چیز دیگری در سطحی پایین‌تر جایگزین کنیم، و قاعده این می‌شود که یک سلول و دو سلولی که بر آن‌ها قرار دارد شامل سه آیتم متفاوت هستند، اما سلول بالایی بر دو سلول زیرین خود «برنده می‌شود»." @@ -387,3 +370,24 @@ msgstr "پانویس‌ها" msgid "The disk balancing algorithms which are current, nowadays, are more annoying than clever, and this is a consequence of the seeking capabilities of the disks. On devices which cannot seek, like big tape drives, the story was quite different, and one had to be very clever to ensure (far in advance) that each tape movement will be the most effective possible (that is, will best participate at \"progressing\" the merge). Some tapes were even able to read backwards, and this was also used to avoid the rewinding time. Believe me, real good tape sorts were quite spectacular to watch! From all times, sorting has always been a Great Art! :-)" msgstr "الگوریتم‌های موازنه‌ی دیسک که امروزه رایج هستند، بیش از آنکه هوشمندانه باشند، آزاردهنده‌اند، و این پیامد قابلیت مکان‌یابی دیسک‌هاست. در دستگاه‌هایی که نمی‌توانند جست‌وجو کنند، مانند درایوهای نواری بزرگ، داستان کاملاً متفاوت بود و باید بسیار هوشمندانه عمل می‌شد تا (از مدت‌ها پیش) اطمینان حاصل شود که هر حرکت نوار مؤثرترین حرکت ممکن خواهد بود (یعنی بهترین مشارکت را در «پیش‌بردن» ادغام خواهد داشت). برخی نوارها حتی می‌توانستند به‌صورت معکوس خوانده شوند و از این قابلیت نیز برای پرهیز از زمان بازپیچی استفاده می‌شد. باور کنید، مرتب‌سازی‌های نواری واقعاً خوب برای تماشا بسیار دیدنی بودند! در تمام دوران‌ها، مرتب‌سازی همیشه هنر بزرگی بوده است! :-)" + +#~ msgid "" +#~ " 0\n" +#~ "\n" +#~ " 1 2\n" +#~ "\n" +#~ " 3 4 5 6\n" +#~ "\n" +#~ " 7 8 9 10 11 12 13 14\n" +#~ "\n" +#~ "15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30" +#~ msgstr "" +#~ " 0\n" +#~ "\n" +#~ " 1 2\n" +#~ "\n" +#~ " 3 4 5 6\n" +#~ "\n" +#~ " 7 8 9 10 11 12 13 14\n" +#~ "\n" +#~ "15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30" diff --git a/library/http.client.po b/library/http.client.po index 63cbbff0..d663e7f6 100644 --- a/library/http.client.po +++ b/library/http.client.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 12:34+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -48,8 +49,8 @@ msgstr "این ماژول روی WebAssembly کار نمی‌کند یا در د msgid "The module provides the following classes:" msgstr "این ماژول کلاس‌های زیر را فراهم می‌کند:" -msgid "An :class:`HTTPConnection` instance represents one transaction with an HTTP server. It should be instantiated by passing it a host and optional port number. If no port number is passed, the port is extracted from the host string if it has the form ``host:port``, else the default HTTP port (80) is used. If the optional *timeout* parameter is given, blocking operations (like connection attempts) will timeout after that many seconds (if it is not given, the global default timeout setting is used). The optional *source_address* parameter may be a tuple of a (host, port) to use as the source address the HTTP connection is made from. The optional *blocksize* parameter sets the buffer size in bytes for sending a file-like message body." -msgstr "یک نمونه :class:`HTTPConnection` نشان‌دهنده یک تراکنش با یک سرور HTTP است. نمونه‌سازی آن باید با دادن یک میزبان و شماره پورت اختیاری انجام شود. اگر شماره پورتی داده نشود، پورت از رشته میزبان استخراج می‌شود، به شرطی که به شکل ``host:port`` باشد، در غیر این صورت از پورت پیش‌فرض HTTP (۸۰) استفاده می‌شود. اگر پارامتر اختیاری *timeout* داده شود، عملیات‌های مسدودکننده (مانند تلاش‌های اتصال) پس از آن تعداد ثانیه منقضی می‌شوند (اگر داده نشود، از تنظیم سراسری پیش‌فرض timeout استفاده می‌شود). پارامتر اختیاری *source_address* می‌تواند یک تاپل (host, port) باشد که به‌عنوان آدرس مبدأ برای برقراری اتصال HTTP استفاده می‌شود. پارامتر اختیاری *blocksize* اندازه بافر را بر حسب بایت برای ارسال بدنه پیام شبه‌پرونده تنظیم می‌کند." +msgid "An :class:`HTTPConnection` instance represents one transaction with an HTTP server. It should be instantiated by passing it a host and optional port number. If no port number is passed, the port is extracted from the host string if it has the form ``host:port``, else the default HTTP port (80) is used. If the optional *timeout* parameter is given, blocking operations (like connection attempts) will timeout after that many seconds (if it is not given, the global default timeout setting is used). The optional *source_address* parameter may be a tuple of a (host, port) to use as the source address the HTTP connection is made from. The optional *blocksize* parameter sets the buffer size in bytes for sending a file-like message body. The optional *max_response_headers* parameter sets the maximum number of allowed response headers to help prevent denial-of-service attacks, otherwise the default value (100) is used." +msgstr "یک نمونه‌ی :class:`HTTPConnection` نمایانگر یک تراکنش با یک سرور HTTP است. این کلاس باید با ارسال یک میزبان و شماره پورت اختیاری مقداردهی اولیه شود. اگر هیچ شماره پورتی ارسال نشود، پورت از رشته‌ی میزبان استخراج می‌شود (اگر دارای قالب ``host:port`` باشد)، در غیر این صورت از پورت پیش‌فرض HTTP (یعنی ۸۰) استفاده می‌شود. اگر پارامتر اختیاری *timeout* داده شود، عملیات مسدودکننده (مانند تلاش برای اتصال) پس از گذشت آن تعداد ثانیه متوقف خواهند شد (اگر داده نشود، از تنظیم مهلت زمانی پیش‌فرض سراسری استفاده می‌شود). پارامتر اختیاری *source_address* می‌تواند یک چندتایی از (میزبان، پورت) باشد تا به‌عنوان آدرس مبدأیی که اتصال HTTP از آن برقرار می‌شود استفاده شود. پارامتر اختیاری *blocksize* اندازه‌ی بافر را بر حسب بایت برای ارسال بدنه‌ی پیامی شبیه به پرونده تنظیم می‌کند. پارامتر اختیاری *max_response_headers* حداکثر تعداد سرآیندهای پاسخ مجاز را برای کمک به جلوگیری از حملات انکار خدمت تنظیم می‌کند، در غیر این صورت از مقدار پیش‌فرض (۱۰۰) استفاده می‌شود." msgid "For example, the following calls all create instances that connect to the server at the same host and port::" msgstr "برای مثال، فراخوانی‌های زیر همگی نمونه‌هایی ایجاد می‌کنند که به سرور در همان میزبان و پورت متصل می‌شوند::" @@ -74,6 +75,9 @@ msgstr "پارامتر *strict* حذف شده است. «پاسخ‌های ساد msgid "*blocksize* parameter was added." msgstr "پارامتر *blocksize* افزوده شد." +msgid "*max_response_headers* parameter was added." +msgstr "پارامتر *max_response_headers* اضافه شد." + msgid "A subclass of :class:`HTTPConnection` that uses SSL for communication with secure servers. Default port is ``443``. If *context* is specified, it must be a :class:`ssl.SSLContext` instance describing the various SSL options." msgstr "زیرکلاسی از :class:`HTTPConnection` که از SSL برای ارتباط با سرورهای امن استفاده می‌کند. پورت پیش‌فرض ``443`` است. اگر *context* مشخص شده باشد، باید نمونه‌ای از :class:`ssl.SSLContext` باشد که گزینه‌های مختلف SSL را توصیف می‌کند." @@ -276,6 +280,9 @@ msgstr "بستن اتصال به سرور." msgid "Buffer size in bytes for sending a file-like message body." msgstr "اندازه‌ی بافر بر حسب بایت برای ارسال بدنه‌ی پیام شبه‌پرونده." +msgid "The maximum number of allowed response headers to help prevent denial-of-service attacks. By default, the maximum number of allowed headers is set to 100. The same limit applies to the trailer section of a chunked response." +msgstr "حداکثر تعداد سرآیند‌های پاسخ مجاز برای کمک به جلوگیری از حملات محرومیت از سرویس. به طور پیش‌فرض، حداکثر تعداد سرآیند‌های مجاز روی ۱۰۰ تنظیم شده است. همین محدودیت برای بخش پایانی (trailer) یک پاسخ بخش‌بندی‌شده نیز اعمال می‌شود." + msgid "As an alternative to using the :meth:`~HTTPConnection.request` method described above, you can also send your request step by step, by using the four functions below." msgstr "به‌عنوان جایگزینی برای استفاده از متد :meth:`~HTTPConnection.request` که در بالا توضیح داده شد، می‌توانید با استفاده از چهار تابع زیر، درخواست خود را گام‌به‌گام ارسال کنید." diff --git a/library/http.cookies.po b/library/http.cookies.po index 06aea513..2db4b43c 100644 --- a/library/http.cookies.po +++ b/library/http.cookies.po @@ -8,12 +8,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 01:07+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -89,6 +90,9 @@ msgstr "یک قطعه‌کد جاوااسکریپت قابل تعبیه برمی msgid "The meaning for *attrs* is the same as in :meth:`output`." msgstr "معنای *attrs* همان معنای آن در :meth:`output` است." +msgid "This method generates a JavaScript snippet to set cookies in the browser, which is no longer considered a standard or recommended approach. Use :meth:`~http.cookies.BaseCookie.output` instead to generate HTTP headers." +msgstr "این متد یک قطعه کد جاوااسکریپت برای تنظیم کوکی‌ها در مرورگر تولید می‌کند که دیگر رویکردی استاندارد یا توصیه‌شده در نظر گرفته نمی‌شود. به جای آن، برای تولید سرآیند‌های HTTP از :meth:`~http.cookies.BaseCookie.output` استفاده کنید." + msgid "If *rawdata* is a string, parse it as an ``HTTP_COOKIE`` and add the values found there as :class:`Morsel`\\ s. If it is a dictionary, it is equivalent to::" msgstr "اگر *rawdata* یک رشته باشد، آن را به‌عنوان ``HTTP_COOKIE`` تجزیه می‌کند و مقادیر یافت‌شده در آن را به‌صورت :class:`Morsel`\\ s اضافه می‌کند. اگر یک دیکشنری باشد، معادل است با::" @@ -156,6 +160,9 @@ msgstr "یک نمایش رشته‌ای از Morsel برمی‌گرداند که msgid "Return an embeddable JavaScript snippet, which, if run on a browser which supports JavaScript, will act the same as if the HTTP header was sent." msgstr "یک قطعه‌کد جاوااسکریپت قابل تعبیه برمی‌گرداند که اگر در مرورگری که از جاوااسکریپت پشتیبانی می‌کند اجرا شود، همان‌گونه عمل می‌کند که گویی سرآیند HTTP ارسال شده باشد." +msgid "This method generates a JavaScript snippet to set cookies in the browser, which is no longer considered a standard or recommended approach. Use :meth:`~http.cookies.Morsel.output` instead to generate HTTP headers." +msgstr "این متد یک قطعه کد جاوااسکریپت برای تنظیم کوکی‌ها در مرورگر تولید می‌کند که دیگر رویکردی استاندارد یا توصیه‌شده در نظر گرفته نمی‌شود. به جای آن، برای تولید سرآیند‌های HTTP از :meth:`~http.cookies.Morsel.output` استفاده کنید." + msgid "Return a string representing the Morsel, without any surrounding HTTP or JavaScript." msgstr "یک رشته را برمی‌گرداند که نمایانگر Morsel است، بدون هیچ HTTP یا JavaScript پیرامونی." diff --git a/library/http.server.po b/library/http.server.po index 5fe371fc..59c6914f 100644 --- a/library/http.server.po +++ b/library/http.server.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 17:40+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -241,6 +242,9 @@ msgstr "پارامتر *directory* افزوده شد." msgid "The *directory* parameter accepts a :term:`path-like object`." msgstr "پارامتر *directory* یک :term:`path-like object` را می‌پذیرد." +msgid "Added *extra_response_headers* parameter." +msgstr "پارامتر *extra_response_headers* اضافه شد." + msgid "A lot of the work, such as parsing the request, is done by the base class :class:`BaseHTTPRequestHandler`. This class implements the :func:`do_GET` and :func:`do_HEAD` functions." msgstr "بخش زیادی از کار، مانند تجزیه درخواست، توسط کلاس پایه :class:`BaseHTTPRequestHandler` انجام می‌شود. این کلاس توابع :func:`do_GET` و :func:`do_HEAD` را پیاده‌سازی می‌کند." @@ -250,6 +254,9 @@ msgstr "موارد زیر به‌عنوان ویژگی‌های سطح کلاس msgid "This will be ``\"SimpleHTTP/\" + __version__``, where ``__version__`` is defined at the module level." msgstr "این مقدار ``\"SimpleHTTP/\" + __version__`` خواهد بود، که ``__version__`` در سطح ماژول تعریف شده است." +msgid "Specifies the Content-Type header value sent when the MIME type cannot be guessed from the file extension of the requested URL. By default, it is set to ``'application/octet-stream'``." +msgstr "مقدار سرآیند Content-Type را که هنگام عدم امکان حدس نوع MIME از روی پسوند پرونده‌ی URL درخواست‌شده ارسال می‌شود، مشخص می‌کند. به طور پیش‌فرض، روی ``'application/octet-stream'`` تنظیم شده است." + msgid "Specifies the filenames that are treated as directory index pages." msgstr "نام پرونده‌هایی را مشخص می‌کند که به‌عنوان صفحات اندیس پوشه در نظر گرفته می‌شوند." @@ -262,6 +269,12 @@ msgstr "یک دیکشنری که پسوندها را به انواع MIME نگا msgid "This dictionary is no longer filled with the default system mappings, but only contains overrides." msgstr "این دیکشنری دیگر با نگاشت‌های پیش‌فرض سیستم پر نمی‌شود، بلکه فقط شامل بازنویسی‌ها است." +msgid "A sequence of ``(name, value)`` pairs containing user-defined extra HTTP response headers to add to each successful HTTP status 200 response. These headers are not included in other status code responses." +msgstr "دنباله‌ای از جفت‌های ``(name, value)`` شامل سرآیند‌های اضافی پاسخ HTTP تعریف‌شده توسط کاربر که به هر پاسخ موفقیت‌آمیز HTTP با وضعیت ۲۰۰ اضافه می‌شود. این سرآیندها در پاسخ‌های با کدهای وضعیت دیگر گنجانده نمی‌شوند." + +msgid "Headers that the server sends automatically such as ``Content-Type`` will not be overwritten by :attr:`!extra_response_headers`." +msgstr "سرآیندهایی که سرور به طور خودکار ارسال می‌کند، مانند ``Content-Type``، توسط :attr:`!extra_response_headers` بازنویسی نخواهند شد." + msgid "The :class:`SimpleHTTPRequestHandler` class defines the following methods:" msgstr "کلاس :class:`SimpleHTTPRequestHandler` متدهای زیر را تعریف می‌کند:" @@ -280,6 +293,9 @@ msgstr "اگر درخواست به یک پرونده نگاشت شده باشد msgid "A ``'Content-type:'`` header with the guessed content type is output, followed by a ``'Content-Length:'`` header with the file's size and a ``'Last-Modified:'`` header with the file's modification time." msgstr "یک سرآیند ``'Content-type:'`` با نوع محتوای حدس‌زده‌شده خروجی داده می‌شود و پس از آن، یک سرآیند ``'Content-Length:'`` با اندازه‌ی پرونده و یک سرآیند ``'Last-Modified:'`` با زمان تغییر پرونده خروجی داده می‌شوند." +msgid "The instance attribute :attr:`extra_response_headers` is a sequence of ``(name, value)`` pairs containing user-defined extra response headers." +msgstr "ویژگی نمونه‌ی :attr:`extra_response_headers` دنباله‌ای از جفت‌های ``(name, value)`` شامل سرآیند‌های اضافی پاسخ تعریف‌شده توسط کاربر است." + msgid "Then follows a blank line signifying the end of the headers, and then the contents of the file are output." msgstr "سپس یک خط خالی می‌آید که پایان سرآیندها را نشان می‌دهد، و سپس محتوای پرونده خروجی داده می‌شود." @@ -301,8 +317,8 @@ msgstr "نوع پرونده در *path* داده‌شده را حدس می‌ز msgid "This returns a string of the form ``type/subtype``, usable for a MIME Content-type header." msgstr "این یک رشته به‌شکل ``type/subtype`` برمی‌گرداند که برای سرآیند MIME Content-type قابل استفاده است." -msgid "The default implementation looks the file's extension up in :attr:`extensions_map`, falling back to :func:`mimetypes.guess_file_type` and then to ``'application/octet-stream'``." -msgstr "پیاده‌سازی پیش‌فرض، پسوند پرونده را در :attr:`extensions_map` جست‌وجو می‌کند و در صورت نیافتن، به :func:`mimetypes.guess_file_type` و سپس به ``'application/octet-stream'`` رجوع می‌کند." +msgid "The default implementation looks the file's extension up in :attr:`extensions_map`, falling back to :func:`mimetypes.guess_file_type` and then to :attr:`default_content_type`." +msgstr "پیاده‌سازی پیش‌فرض، پسوند پرونده را در :attr:`extensions_map` جستجو می‌کند، و در صورت عدم یافتن، به :func:`mimetypes.guess_file_type` و سپس به :attr:`default_content_type` بازمی‌گردد." msgid "Add :func:`mimetypes.guess_file_type` as a fallback." msgstr ":func:`mimetypes.guess_file_type` را به‌عنوان جایگزین اضافه کنید." @@ -336,36 +352,6 @@ msgstr "" msgid ":class:`SimpleHTTPRequestHandler` can also be subclassed to enhance behavior, such as using different index file names by overriding the class attribute :attr:`~SimpleHTTPRequestHandler.index_pages`." msgstr "همچنین می‌توان از :class:`SimpleHTTPRequestHandler` زیرکلاس ساخت تا رفتار آن بهبود یابد، مانند استفاده از نام‌های متفاوت برای پرونده‌های اندیس با بازنویسی صفت کلاس :attr:`~SimpleHTTPRequestHandler.index_pages`." -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 "این کلاس برای سرو کردن پرونده‌ها یا خروجی اسکریپت‌های CGI از پوشه جاری و زیرپوشه‌های آن استفاده می‌شود. توجه داشته باشید که نگاشت ساختار سلسله‌مراتبی HTTP به ساختار پوشه محلی دقیقاً مانند :class:`SimpleHTTPRequestHandler` است." - -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 "اسکریپت‌های CGI که توسط کلاس :class:`CGIHTTPRequestHandler` اجرا می‌شوند، نمی‌توانند تغییرمسیرها (redirects، کد HTTP ۳۰۲) را انجام دهند، زیرا کد ۲۰۰ (خروجی اسکریپت در ادامه می‌آید) پیش از اجرای اسکریپت CGI ارسال می‌شود. این موضوع مانع از ارسال کد وضعیت می‌شود." - -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 --- the other common server configuration is to treat special extensions as denoting CGI scripts." -msgstr "با این حال، اگر این کلاس حدس بزند که آن یک اسکریپت CGI است، به‌جای ارائه آن به‌عنوان پرونده، اسکریپت CGI را اجرا می‌کند. تنها از CGIهای مبتنی بر پوشه استفاده می‌شود — پیکربندی رایج دیگر سرور این است که پسوندهای خاص را به‌عنوان نشان‌دهنده اسکریپت‌های CGI در نظر بگیرد." - -msgid "The :func:`~SimpleHTTPRequestHandler.do_GET` and :func:`~SimpleHTTPRequestHandler.do_HEAD` functions are modified to run CGI scripts and serve the output, instead of serving files, if the request leads to somewhere below the ``cgi_directories`` path." -msgstr "توابع :func:`~SimpleHTTPRequestHandler.do_GET` و :func:`~SimpleHTTPRequestHandler.do_HEAD` تغییر داده شده‌اند تا در صورتی که درخواست به مکانی در زیر مسیر ``cgi_directories`` منجر شود، به‌جای ارائه پرونده‌ها، اسکریپت‌های CGI را اجرا کرده و خروجی را ارائه دهند." - -msgid "The :class:`CGIHTTPRequestHandler` defines the following data member:" -msgstr "کلاس :class:`CGIHTTPRequestHandler` عضو داده‌ای زیر را تعریف می‌کند:" - -msgid "This defaults to ``['/cgi-bin', '/htbin']`` and describes directories to treat as containing CGI scripts." -msgstr "مقدار پیش‌فرض این، ``['/cgi-bin', '/htbin']`` است و پوشه‌هایی را توصیف می‌کند که باید به‌عنوان حاوی اسکریپت‌های CGI در نظر گرفته شوند." - -msgid "The :class:`CGIHTTPRequestHandler` defines the following method:" -msgstr "کلاس :class:`CGIHTTPRequestHandler` متد زیر را تعریف می‌کند:" - -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 "این متد نوع درخواست ``'POST'`` را پاسخ می‌دهد و فقط برای اسکریپت‌های CGI مجاز است. هنگام تلاش برای POST به یک URL غیر CGI، خطای 501، «Can only POST to CGI scripts»، خروجی داده می‌شود." - -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 "توجه داشته باشید که اسکریپت‌های CGI به دلایل امنیتی با UID کاربر nobody اجرا می‌شوند. مشکلات اسکریپت CGI به خطای 403 تبدیل می‌شوند." - -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 been unmaintained for a while now and sees very little practical use. Retaining it could lead to further :ref:`security considerations `." -msgstr ":class:`CGIHTTPRequestHandler` در 3.15 حذف می‌شود. CGI برای بیش از یک دهه به‌عنوان روش مناسبی برای انجام کارها در نظر گرفته نشده است. این کد مدتی است که نگهداری نمی‌شود و استفاده‌ی عملی بسیار کمی دارد. حفظ آن می‌تواند منجر به :ref:`ملاحظات امنیتی ` بیشتری شود." - msgid "Command-line interface" msgstr "رابط خط فرمان" @@ -405,17 +391,11 @@ msgstr "نسخه HTTP مورد انطباق سرور را مشخص می‌کند msgid "python -m http.server --protocol HTTP/1.1" msgstr "python -m http.server --protocol HTTP/1.1" -msgid ":class:`CGIHTTPRequestHandler` can be enabled in the command line by passing the ``--cgi`` option::" -msgstr ":class:`CGIHTTPRequestHandler` را می‌توان در خط فرمان با دادن گزینه‌ی ``--cgi`` فعال کرد::" - -msgid "python -m http.server --cgi" -msgstr "python -m http.server --cgi" +msgid "Specifies the default Content-Type HTTP header used when the MIME type cannot be guessed from the URL's file extension. By default, the server uses ``'application/octet-stream'``:" +msgstr "سرآیند پیش‌فرض HTTP با نام Content-Type را مشخص می‌کند که وقتی نوع MIME از روی پسوند پرونده‌ی URL قابل حدس نباشد، استفاده می‌شود. به طور پیش‌فرض، سرور از ``'application/octet-stream'`` استفاده می‌کند:" -msgid ":mod:`!http.server` command line ``--cgi`` support is being removed because :class:`CGIHTTPRequestHandler` is being removed." -msgstr "پشتیبانی از ``--cgi`` در خط فرمان :mod:`!http.server` در حال حذف شدن است، زیرا :class:`CGIHTTPRequestHandler` در حال حذف شدن است." - -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 ":class:`CGIHTTPRequestHandler` و گزینه‌ی خط فرمان ``--cgi`` برای استفاده توسط کلاینت‌های غیرقابل‌اعتماد در نظر گرفته نشده‌اند و ممکن است در برابر سوءاستفاده آسیب‌پذیر باشند. همیشه درون یک محیط امن استفاده کنید." +msgid "python -m http.server --content-type text/html" +msgstr "python -m http.server --content-type text/html" msgid "Specifies a TLS certificate chain for HTTPS connections:" msgstr "یک زنجیره‌ی گواهی TLS برای اتصال‌های HTTPS مشخص می‌کند:" @@ -443,6 +423,9 @@ msgstr "" " --tls-key key.pem \\\n" " --tls-password-file password.txt" +msgid "Specify an additional HTTP Response Header to send on successful HTTP 200 responses. Can be used multiple times to send additional custom response headers. Headers that are sent automatically by the server (for instance Content-Type) will not be overwritten by the server." +msgstr "یک سرآیند پاسخ HTTP اضافی را برای ارسال در پاسخ‌های موفقیت‌آمیز HTTP 200 مشخص کنید. می‌توان چندین بار از آن برای ارسال سرآیند‌های پاسخ سفارشی اضافی استفاده کرد. سرآیندهایی که به طور خودکار توسط سرور ارسال می‌شوند (مثلاً Content-Type) توسط سرور بازنویسی نخواهند شد." + msgid "Security considerations" msgstr "ملاحظات امنیتی" @@ -481,3 +464,45 @@ msgstr "http.server" msgid "security" msgstr "امنیت" + +#~ 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 "این کلاس برای سرو کردن پرونده‌ها یا خروجی اسکریپت‌های CGI از پوشه جاری و زیرپوشه‌های آن استفاده می‌شود. توجه داشته باشید که نگاشت ساختار سلسله‌مراتبی HTTP به ساختار پوشه محلی دقیقاً مانند :class:`SimpleHTTPRequestHandler` است." + +#~ 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 "اسکریپت‌های CGI که توسط کلاس :class:`CGIHTTPRequestHandler` اجرا می‌شوند، نمی‌توانند تغییرمسیرها (redirects، کد HTTP ۳۰۲) را انجام دهند، زیرا کد ۲۰۰ (خروجی اسکریپت در ادامه می‌آید) پیش از اجرای اسکریپت CGI ارسال می‌شود. این موضوع مانع از ارسال کد وضعیت می‌شود." + +#~ 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 --- the other common server configuration is to treat special extensions as denoting CGI scripts." +#~ msgstr "با این حال، اگر این کلاس حدس بزند که آن یک اسکریپت CGI است، به‌جای ارائه آن به‌عنوان پرونده، اسکریپت CGI را اجرا می‌کند. تنها از CGIهای مبتنی بر پوشه استفاده می‌شود — پیکربندی رایج دیگر سرور این است که پسوندهای خاص را به‌عنوان نشان‌دهنده اسکریپت‌های CGI در نظر بگیرد." + +#~ msgid "The :func:`~SimpleHTTPRequestHandler.do_GET` and :func:`~SimpleHTTPRequestHandler.do_HEAD` functions are modified to run CGI scripts and serve the output, instead of serving files, if the request leads to somewhere below the ``cgi_directories`` path." +#~ msgstr "توابع :func:`~SimpleHTTPRequestHandler.do_GET` و :func:`~SimpleHTTPRequestHandler.do_HEAD` تغییر داده شده‌اند تا در صورتی که درخواست به مکانی در زیر مسیر ``cgi_directories`` منجر شود، به‌جای ارائه پرونده‌ها، اسکریپت‌های CGI را اجرا کرده و خروجی را ارائه دهند." + +#~ msgid "The :class:`CGIHTTPRequestHandler` defines the following data member:" +#~ msgstr "کلاس :class:`CGIHTTPRequestHandler` عضو داده‌ای زیر را تعریف می‌کند:" + +#~ msgid "This defaults to ``['/cgi-bin', '/htbin']`` and describes directories to treat as containing CGI scripts." +#~ msgstr "مقدار پیش‌فرض این، ``['/cgi-bin', '/htbin']`` است و پوشه‌هایی را توصیف می‌کند که باید به‌عنوان حاوی اسکریپت‌های CGI در نظر گرفته شوند." + +#~ msgid "The :class:`CGIHTTPRequestHandler` defines the following method:" +#~ msgstr "کلاس :class:`CGIHTTPRequestHandler` متد زیر را تعریف می‌کند:" + +#~ 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 "این متد نوع درخواست ``'POST'`` را پاسخ می‌دهد و فقط برای اسکریپت‌های CGI مجاز است. هنگام تلاش برای POST به یک URL غیر CGI، خطای 501، «Can only POST to CGI scripts»، خروجی داده می‌شود." + +#~ 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 "توجه داشته باشید که اسکریپت‌های CGI به دلایل امنیتی با UID کاربر nobody اجرا می‌شوند. مشکلات اسکریپت CGI به خطای 403 تبدیل می‌شوند." + +#~ 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 been unmaintained for a while now and sees very little practical use. Retaining it could lead to further :ref:`security considerations `." +#~ msgstr ":class:`CGIHTTPRequestHandler` در 3.15 حذف می‌شود. CGI برای بیش از یک دهه به‌عنوان روش مناسبی برای انجام کارها در نظر گرفته نشده است. این کد مدتی است که نگهداری نمی‌شود و استفاده‌ی عملی بسیار کمی دارد. حفظ آن می‌تواند منجر به :ref:`ملاحظات امنیتی ` بیشتری شود." + +#~ msgid ":class:`CGIHTTPRequestHandler` can be enabled in the command line by passing the ``--cgi`` option::" +#~ msgstr ":class:`CGIHTTPRequestHandler` را می‌توان در خط فرمان با دادن گزینه‌ی ``--cgi`` فعال کرد::" + +#~ msgid "python -m http.server --cgi" +#~ msgstr "python -m http.server --cgi" + +#~ msgid ":mod:`!http.server` command line ``--cgi`` support is being removed because :class:`CGIHTTPRequestHandler` is being removed." +#~ msgstr "پشتیبانی از ``--cgi`` در خط فرمان :mod:`!http.server` در حال حذف شدن است، زیرا :class:`CGIHTTPRequestHandler` در حال حذف شدن است." + +#~ 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 ":class:`CGIHTTPRequestHandler` و گزینه‌ی خط فرمان ``--cgi`` برای استفاده توسط کلاینت‌های غیرقابل‌اعتماد در نظر گرفته نشده‌اند و ممکن است در برابر سوءاستفاده آسیب‌پذیر باشند. همیشه درون یک محیط امن استفاده کنید." diff --git a/library/imaplib.po b/library/imaplib.po index 11860c5a..890681cc 100644 --- a/library/imaplib.po +++ b/library/imaplib.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 08:20+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -448,15 +449,6 @@ msgstr "اجازه دادن به دستورات توسعه‌ای ساده که msgid "The following attributes are defined on instances of :class:`IMAP4`:" msgstr "ویژگی‌های زیر برای نمونه‌های :class:`IMAP4` تعریف شده‌اند:" -msgid "A tuple of the capabilities advertised by the server, in upper case." -msgstr "یک تاپل از قابلیت‌های تبلیغ‌شده توسط سرور، با حروف بزرگ." - -msgid "It is set when the connection is established, and refreshed after a successful :meth:`~IMAP4.login`, :meth:`~IMAP4.authenticate` or :meth:`~IMAP4.starttls`, because the server can advertise different capabilities in different connection states." -msgstr "این مقدار در هنگام برقراری اتصال تنظیم می‌شود، و پس از یک :meth:`~IMAP4.login`، :meth:`~IMAP4.authenticate` یا :meth:`~IMAP4.starttls` موفق، به‌روزرسانی می‌شود، زیرا سرور می‌تواند قابلیت‌های متفاوتی را در وضعیت‌های مختلف اتصال تبلیغ کند." - -msgid "Refreshed after :meth:`~IMAP4.login` and :meth:`~IMAP4.authenticate`." -msgstr "پس از :meth:`~IMAP4.login` و :meth:`~IMAP4.authenticate` به‌روزرسانی می‌شود." - msgid "The most recent supported protocol in the ``CAPABILITY`` response from the server." msgstr "جدیدترین پروتکل پشتیبانی‌شده در پاسخ ``CAPABILITY`` از سرور." @@ -466,6 +458,9 @@ msgstr "مقدار عدد صحیح برای کنترل خروجی اشکال‌ msgid "Boolean value that is normally ``False``, but is set to ``True`` if an :meth:`enable` command is successfully issued for the ``UTF8=ACCEPT`` capability." msgstr "مقدار بولی که معمولاً ``False`` است، اما اگر دستور :meth:`enable` برای قابلیت ``UTF8=ACCEPT`` با موفقیت صادر شود، به ``True`` تنظیم می‌شود." +msgid "Internal :class:`~io.BufferedReader` associated with the underlying socket. This property is documented for legacy purposes but not part of the public interface. The caller is responsible to ensure that the current file is closed before changing it." +msgstr "شیء داخلی :class:`~io.BufferedReader` مرتبط با سوکت زیرین. این ویژگی برای اهداف سازگاری با نسخه‌های قدیمی مستند شده است، اما بخشی از رابط عمومی نیست. فراخواننده مسئول است اطمینان حاصل کند که پرونده‌ی فعلی قبل از تغییر آن بسته می‌شود." + msgid "IMAP4 Example" msgstr "مثال IMAP4" @@ -511,3 +506,12 @@ msgstr "IMAP4_SSL" msgid "IMAP4_stream" msgstr "IMAP4_stream" + +#~ msgid "A tuple of the capabilities advertised by the server, in upper case." +#~ msgstr "یک تاپل از قابلیت‌های تبلیغ‌شده توسط سرور، با حروف بزرگ." + +#~ msgid "It is set when the connection is established, and refreshed after a successful :meth:`~IMAP4.login`, :meth:`~IMAP4.authenticate` or :meth:`~IMAP4.starttls`, because the server can advertise different capabilities in different connection states." +#~ msgstr "این مقدار در هنگام برقراری اتصال تنظیم می‌شود، و پس از یک :meth:`~IMAP4.login`، :meth:`~IMAP4.authenticate` یا :meth:`~IMAP4.starttls` موفق، به‌روزرسانی می‌شود، زیرا سرور می‌تواند قابلیت‌های متفاوتی را در وضعیت‌های مختلف اتصال تبلیغ کند." + +#~ msgid "Refreshed after :meth:`~IMAP4.login` and :meth:`~IMAP4.authenticate`." +#~ msgstr "پس از :meth:`~IMAP4.login` و :meth:`~IMAP4.authenticate` به‌روزرسانی می‌شود." diff --git a/library/importlib.metadata.po b/library/importlib.metadata.po index 419a0d63..de2e022b 100644 --- a/library/importlib.metadata.po +++ b/library/importlib.metadata.po @@ -8,13 +8,14 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" -"PO-Revision-Date: 2026-09-15 12:49+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 20:42+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" @@ -101,6 +102,9 @@ msgstr "همچنین می‌توانید :ref:`شماره نسخه توزیع `_." msgstr "یک پیاده‌سازی عینی از `پروتکل PackageMetadata `_." @@ -259,6 +266,9 @@ msgstr "" msgid "The full set of available metadata is not described here. See the PyPA `Core metadata specification `_ for additional details." msgstr "مجموعه‌ی کامل فراداده‌های موجود در اینجا توصیف نشده است. برای جزئیات بیشتر، `Core metadata specification `_ در PyPA را ببینید." +msgid "Previously and incidentally, if a METADATA file was missing from a distribution, an empty ``PackageMetadata`` would be returned, indistinguishable from an empty METADATA file. Now, a missing METADATA file triggers a ``MetadataNotFound`` exception." +msgstr "پیش‌تر و بر حسب تصادف، اگر یک پرونده‌ی METADATA از یک توزیع مفقود بود، یک شیء خالی ``PackageMetadata`` بازگردانده می‌شد که از یک پرونده‌ی METADATA خالی قابل تشخیص نبود. اکنون، مفقود بودن پرونده‌ی METADATA باعث ایجاد استثنای ``MetadataNotFound`` می‌شود." + msgid "The ``Description`` is now included in the metadata when presented through the payload. Line continuation characters have been removed." msgstr "``Description`` اکنون هنگام ارائه از طریق بار در فراداده گنجانده شده است. نویسه‌های ادامه‌ی خط حذف شده‌اند." @@ -284,17 +294,23 @@ msgstr "" msgid "Distribution files" msgstr "پرونده‌های توزیع" -msgid "Return the full set of files contained within the named distribution package." -msgstr "مجموعه کامل پرونده‌های موجود در بسته توزیع نام‌برده را برمی‌گرداند." +msgid "Return the full set of files contained within the named distribution package as :class:`PackagePath` instances." +msgstr "مجموعه کامل پرونده‌های موجود در بسته‌ی توزیع نام‌برده را به شکل نمونه‌های :class:`PackagePath` برمی‌گرداند." msgid "Returns :const:`None` if the distribution is found but the installation database records reporting the files associated with the distribution package are missing." msgstr "اگر توزیع یافت شود اما رکوردهای پایگاه‌داده‌ی نصب که پرونده‌های مرتبط با بسته توزیع را گزارش می‌دهند موجود نباشند، مقدار :const:`None` را برمی‌گرداند." -msgid "A :class:`pathlib.PurePath` derived object with additional ``dist``, ``size``, and ``hash`` properties corresponding to the distribution package's installation metadata for that file." -msgstr "یک شیء مشتق‌شده از :class:`pathlib.PurePath` با ویژگی‌های اضافی ``dist``، ``size`` و ``hash`` که با فراداده نصب بسته توزیع برای آن پرونده متناظر هستند." +msgid "A :class:`pathlib.PurePath` derived object with additional ``dist``, ``size``, and ``hash`` properties corresponding to the distribution package's installation metadata for that file, also:" +msgstr "یک شیء مشتق‌شده از :class:`pathlib.PurePath` با ویژگی‌های اضافی ``dist``، ``size`` و ``hash`` که با فراداده‌ی نصب بسته‌ی توزیع برای آن پرونده مطابقت دارند، و همچنین:" -msgid "The :func:`!files` function takes a `Distribution Package `_ name and returns all of the files installed by this distribution. Each file is reported as a :class:`PackagePath` instance. For example::" -msgstr "تابع :func:`!files` نام یک `Distribution Package `_ را می‌گیرد و تمام پرونده‌های نصب‌شده توسط این توزیع را برمی‌گرداند. هر پرونده به‌عنوان نمونه‌ای از :class:`PackagePath` گزارش می‌شود. برای مثال::" +msgid "If possible, return the concrete :class:`SimplePath` allowing to access data, or raise a :exc:`NotImplementedError` otherwise." +msgstr "در صورت امکان، :class:`SimplePath` ملموس را که امکان دسترسی به داده‌ها را فراهم می‌کند بازگردانید، در غیر این صورت استثنای :exc:`NotImplementedError` را بالا بیاورید." + +msgid "A protocol representing a minimal subset of :class:`pathlib.Path` that allows to check if it ``exists()``, to traverse using ``joinpath()`` and ``parent``, and to retrieve data using ``read_text()`` and ``read_bytes()``." +msgstr "پروتکلی که زیرمجموعه‌ی حداقلی از :class:`pathlib.Path` را نشان می‌دهد که امکان بررسی وجود آن با ``exists()``، پیمایش با استفاده از ``joinpath()`` و ``parent``، و بازیابی داده‌ها با استفاده از ``read_text()`` و ``read_bytes()`` را فراهم می‌کند." + +msgid "The :func:`!files` function takes a `Distribution Package `_ name and returns all of the files installed by this distribution. For example::" +msgstr "تابع :func:`!files` نام یک `Distribution Package `_ را می‌گیرد و تمام پرونده‌های نصب‌شده توسط این توزیع را برمی‌گرداند. برای مثال::" msgid "" ">>> util = [p for p in files('wheel') if 'util.py' in str(p)][0]\n" @@ -393,17 +409,8 @@ msgstr "برخی نصب‌های قابل‌ویرایش، `نام‌های سط msgid "Distributions" msgstr "توزیع‌ها" -msgid "Return a :class:`Distribution` instance describing the named distribution package." -msgstr "نمونه‌ای از :class:`Distribution` برمی‌گرداند که بسته توزیع نام‌برده‌شده را توصیف می‌کند." - -msgid "Details of an installed distribution package." -msgstr "جزئیات یک بسته توزیع نصب‌شده." - -msgid "Note: different :class:`!Distribution` instances do not currently compare equal, even if they relate to the same installed distribution and accordingly have the same attributes." -msgstr "توجه: نمونه‌های متفاوت :class:`!Distribution` در حال حاضر هنگام مقایسه برابر در نظر گرفته نمی‌شوند، حتی اگر به همان توزیع نصب‌شده مربوط باشند و بنابراین ویژگی‌های یکسانی داشته باشند." - -msgid "While the module level API described above is the most common and convenient usage, you can get all of that information from the :class:`!Distribution` class. :class:`!Distribution` is an abstract object that represents the metadata for a Python `Distribution Package `_. You can get the concrete :class:`!Distribution` subclass instance for an installed distribution package by calling the :func:`distribution` function::" -msgstr "اگرچه API سطح ماژول توصیف‌شده در بالا رایج‌ترین و مناسب‌ترین کاربرد است، می‌توانید تمام آن اطلاعات را از کلاس :class:`!Distribution` دریافت کنید. :class:`!Distribution` یک شیء انتزاعی است که فراداده‌ی یک `بسته توزیع `_ پایتون را نشان می‌دهد. می‌توانید با فراخوانی تابع :func:`distribution`، نمونه‌ای از زیرکلاس عینی :class:`!Distribution` برای یک بسته توزیع نصب‌شده را دریافت کنید::" +msgid "While the module level API described above is the most common and convenient usage, all that information is accessible from the :class:`Distribution` class. :class:`!Distribution` is an abstract object that represents the metadata for a Python `Distribution Package `_. Get the concrete :class:`!Distribution` subclass instance for an installed distribution package by calling the :func:`distribution` function::" +msgstr "در حالی که API سطح ماژول که در بالا توصیف شد رایج‌ترین و راحت‌ترین روش استفاده است، تمام این اطلاعات از طریق کلاس :class:`Distribution` قابل دسترسی هستند. :class:`!Distribution` یک شیء انتزاعی است که فراداده‌ی مربوط به یک `Distribution Package `_ پایتون را بازنمایی می‌کند. با فراخوانی تابع :func:`distribution`، نمونه‌ی زیرکلاس مشخص :class:`!Distribution` را برای یک بسته‌ی توزیع نصب‌شده دریافت کنید::" msgid "" ">>> from importlib.metadata import distribution\n" @@ -416,8 +423,11 @@ msgstr "" ">>> type(dist)\n" "" -msgid "Thus, an alternative way to get the version number is through the :class:`!Distribution` instance::" -msgstr "بنابراین، روشی جایگزین برای دریافت شماره نسخه از طریق نمونه‌ی :class:`!Distribution` است::" +msgid "Return a :class:`Distribution` instance describing the named distribution package." +msgstr "نمونه‌ای از :class:`Distribution` برمی‌گرداند که بسته توزیع نام‌برده‌شده را توصیف می‌کند." + +msgid "Thus, an alternative way to get e.g. the version number is through the :attr:`Distribution.version` attribute::" +msgstr "بنابراین، یک روش جایگزین برای دریافت مثلاً شماره‌ی نسخه، استفاده از ویژگی :attr:`Distribution.version` است::" msgid "" ">>> dist.version\n" @@ -426,8 +436,29 @@ msgstr "" ">>> dist.version\n" "'0.32.3'" -msgid "There are all kinds of additional metadata available on :class:`!Distribution` instances::" -msgstr "انواع مختلفی از فراداده‌های اضافی روی نمونه‌های :class:`!Distribution` در دسترس است::" +msgid "The same applies for :func:`entry_points` and :func:`files`." +msgstr "همین امر برای :func:`entry_points` و :func:`files` نیز صدق می‌کند." + +msgid "Details of an installed distribution package." +msgstr "جزئیات یک بسته توزیع نصب‌شده." + +msgid "Note: different :class:`!Distribution` instances do not currently compare equal, even if they relate to the same installed distribution and accordingly have the same attributes." +msgstr "توجه: نمونه‌های متفاوت :class:`!Distribution` در حال حاضر هنگام مقایسه برابر در نظر گرفته نمی‌شوند، حتی اگر به همان توزیع نصب‌شده مربوط باشند و بنابراین ویژگی‌های یکسانی داشته باشند." + +msgid "Return a :class:`!Distribution` instance at the given path or with the given name." +msgstr "یک نمونه‌ی :class:`!Distribution` را در مسیر داده‌شده یا با نام داده‌شده برمی‌گرداند." + +msgid "Returns an iterable of :class:`!Distribution` instances for all packages (see distribution-discovery_)." +msgstr "یک پیمایش‌پذیر از نمونه‌های :class:`!Distribution` را برای تمام بسته‌ها برمی‌گرداند (نگاه کنید به distribution-discovery_)." + +msgid "The optional argument *context* is a :class:`DistributionFinder.Context` instance, used to modify the search for distributions. Alternatively, *kwargs* may contain keyword arguments for constructing a new :class:`!DistributionFinder.Context`." +msgstr "آرگومان اختیاری *context* یک نمونه از :class:`DistributionFinder.Context` است که برای اصلاح جستجوی توزیع‌ها استفاده می‌شود. به عنوان جایگزین، *kwargs* ممکن است حاوی آرگومان‌های کلیدواژه‌ای برای ساخت یک :class:`!DistributionFinder.Context` جدید باشد." + +msgid "Raises :exc:`MetadataNotFound` if the METADATA file is not present in the distribution." +msgstr "اگر پرونده‌ی METADATA در بسته موجود نباشد، استثنای :exc:`MetadataNotFound` را بالا می‌آورد." + +msgid "There are all kinds of additional metadata available on :class:`!Distribution` instances as a :class:`PackageMetadata` instance::" +msgstr "انواع و اقسام فراداده‌های اضافی به شکل یک نمونه‌ی :class:`PackageMetadata` روی نمونه‌های :class:`!Distribution` در دسترس هستند::" msgid "" ">>> dist.metadata['Requires-Python']\n" @@ -440,8 +471,14 @@ msgstr "" ">>> dist.metadata['License']\n" "'MIT'" -msgid "For editable packages, an ``origin`` property may present :pep:`610` metadata::" -msgstr "برای بسته‌های قابل‌ویرایش، ممکن است ویژگی ``origin`` فراداده‌ی :pep:`610` را ارائه دهد::" +msgid "A few metadata fields are also available as shortcut properties." +msgstr "چند فیلد فراداده‌ی دیگر نیز به‌عنوان ویژگی‌های میانبر در دسترس هستند." + +msgid "The ``name`` shortcut was added." +msgstr "میانبر ``name`` اضافه شد." + +msgid "For editable packages, an ``origin`` property may present :pep:`610` metadata (for non-editable packages, ``origin`` is :const:`None`)::" +msgstr "برای بسته‌های قابل ویرایش، یک ویژگی ``origin`` ممکن است فراداده‌ی :pep:`610` را نمایش دهد (برای بسته‌های غیرقابل ویرایش، ``origin`` برابر با :const:`None` است)::" msgid "" ">>> dist.origin.url\n" @@ -450,8 +487,23 @@ msgstr "" ">>> dist.origin.url\n" "'file:///path/to/wheel-0.32.3.editable-py3-none-any.whl'" -msgid "The ``.origin`` property was added." -msgstr "ویژگی ``.origin`` افزوده شد." +msgid "The ``origin`` object follows the `Direct URL Data Structure `_." +msgstr "شیء ``origin`` از ساختار داده‌ی `Direct URL Data Structure `_ پیروی می‌کند." + +msgid "The entry points provided by this distribution package." +msgstr "نقطه‌های ورودی ارائه شده توسط این بسته‌ی توزیع." + +msgid "All files contained in this distribution package. Like :func:`files`, this returns :const:`None` if there are no records." +msgstr "تمام پرونده‌های موجود در این بسته‌ی توزیع. درست مانند :func:`files`، اگر رکوردی وجود نداشته باشد، این تابع :const:`None` را برمی‌گرداند." + +msgid "The following two abstract methods need to be implemented when implementing-custom-providers_:" +msgstr "هنگام پیاده‌سازی implementing-custom-providers_، دو متد انتزاعی زیر باید پیاده‌سازی شوند:" + +msgid "Like :meth:`!PackagePath.locate`, return a :class:`SimplePath` for the given path. Takes a :class:`os.PathLike` or a :class:`str`." +msgstr "مشابه :meth:`!PackagePath.locate`، یک :class:`SimplePath` برای مسیر داده‌شده برمی‌گرداند. یک :class:`os.PathLike` یا یک :class:`str` می‌پذیرد." + +msgid "A shortcut for ``distribution.locate_file(filename).read_text()``." +msgstr "یک میانبر برای ``distribution.locate_file(filename).read_text()``." msgid "Distribution Discovery" msgstr "کشف توزیع" @@ -465,6 +517,42 @@ msgstr "``importlib.metadata`` اشیای :class:`bytes` موجود در ``sys.p msgid "``importlib.metadata`` will incidentally honor :py:class:`pathlib.Path` objects on ``sys.path`` even though such values will be ignored for imports." msgstr "``importlib.metadata`` به‌طور اتفاقی اشیای :py:class:`pathlib.Path` موجود در ``sys.path`` را معتبر می‌شمارد، حتی اگر چنین مقادیری برای ایمپورت‌ها نادیده گرفته شوند." +msgid "A :class:`~importlib.abc.MetaPathFinder` subclass capable of discovering installed distributions." +msgstr "یک زیرکلاس از :class:`~importlib.abc.MetaPathFinder` که قادر به کشف توزیع‌های نصب‌شده است." + +msgid "Custom providers should implement this interface in order to supply metadata." +msgstr "ارائه‌دهندگان سفارشی باید این رابط را برای ارائه‌ی فراداده پیاده‌سازی کنند." + +msgid "A :class:`!Context` gives a custom provider a means to solicit additional details from the callers of distribution discovery functions like :func:`distributions` or :meth:`Distribution.discover` beyond :attr:`!.name` and :attr:`!.path` when searching for distributions." +msgstr "یک :class:`!Context` به ارائه‌دهنده‌ی سفارشی ابزاری می‌دهد تا جزئیات اضافی را فراتر از :attr:`!.name` و :attr:`!.path` هنگام جست‌وجوی توزیع‌ها، از فراخوانندگان توابع کشف توزیع مانند :func:`distributions` یا :meth:`Distribution.discover` درخواست کند." + +msgid "For example, a provider could expose suites of packages in either a \"public\" or \"private\" ``realm``. A caller of distribution discovery functions may wish to query only for distributions in a particular realm and could call ``distributions(realm=\"private\")`` to signal to the custom provider to only include distributions from that realm." +msgstr "برای مثال، یک ارائه‌دهنده می‌تواند مجموعه‌هایی از بسته‌ها را در یک ``realm`` «عمومی» یا «خصوصی» ارائه دهد. ممکن است فراخواننده‌ی توابع کشف توزیع بخواهد فقط برای توزیع‌ها در یک قلمرو خاص پرس‌وجو کند و می‌تواند ``distributions(realm=\"private\")`` را فراخوانی کند تا به ارائه‌دهنده‌ی سفارشی سیگنال دهد که فقط توزیع‌های آن قلمرو را لحاظ کند." + +msgid "Each :class:`!DistributionFinder` must expect any parameters and should attempt to honor the canonical parameters defined below when appropriate." +msgstr "هر :class:`!DistributionFinder` باید هر پارامتری را انتظار داشته باشد و در صورت لزوم باید تلاش کند تا پارامترهای کانونیکال تعریف‌شده در زیر را رعایت کند." + +msgid "See the section on :ref:`implementing-custom-providers` for more details." +msgstr "برای جزئیات بیشتر، بخش مربوط به :ref:`implementing-custom-providers` را ببینید." + +msgid "Specific name for which a distribution finder should match." +msgstr "نام خاصی که یابنده‌ی توزیع باید با آن مطابقت داشته باشد." + +msgid "A :attr:`!.name` of ``None`` matches all distributions." +msgstr "مقدار ``None`` برای :attr:`!.name` با تمام توزیع‌ها مطابقت دارد." + +msgid "A property providing the sequence of directory paths that a distribution finder should search." +msgstr "ویژگی‌ای که دنباله‌ای از مسیرهای پوشه‌ای را که یابنده‌ی توزیع باید جست‌وجو کند، فراهم می‌کند." + +msgid "Typically refers to Python installed package paths such as \"site-packages\" directories and defaults to :attr:`sys.path`." +msgstr "معمولاً به مسیرهای بسته‌ی نصب‌شده‌ی پایتون مانند پوشه‌های \"site-packages\" اشاره دارد و به‌طور پیش‌فرض :attr:`sys.path` است." + +msgid "Returns an iterable of :class:`Distribution` instances for all packages." +msgstr "یک شیء قابل پیمایش از نمونه‌های :class:`Distribution` برای همه‌ی بسته‌ها برمی‌گرداند." + +msgid "The *kwargs* argument may contain either a keyword argument ``context``, a :class:`DistributionFinder.Context` instance, or pass keyword arguments for constructing a new :class:`!DistributionFinder.Context`. The :class:`!DistributionFinder.Context` is used to modify the search for distributions." +msgstr "آرگومان *kwargs* ممکن است حاوی یک آرگومان کلیدواژه‌ای ``context``، یک نمونه از :class:`DistributionFinder.Context` باشد، یا آرگومان‌های کلیدواژه‌ای را برای ساختن یک :class:`!DistributionFinder.Context` جدید ارسال کند. :class:`!DistributionFinder.Context` برای اصلاح جست‌وجوی توزیع‌ها استفاده می‌شود." + msgid "Implementing Custom Providers" msgstr "پیاده‌سازی فراهم‌کنندگان سفارشی" @@ -477,8 +565,8 @@ msgstr "از آن‌جا که فراداده‌ی `بسته توزیعی , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 10:11+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -165,6 +166,9 @@ msgstr "تابع :func:`import_module` به‌عنوان پوششی ساده‌ msgid "If you are dynamically importing a module that was created since the interpreter began execution (e.g., created a Python source file), you may need to call :func:`invalidate_caches` in order for the new module to be noticed by the import system." msgstr "اگر ماژولی را که از زمان آغاز اجرای مفسر ایجاد شده است (برای مثال، یک پرونده منبع پایتون ایجاد کرده‌اید)، به‌صورت پویا ایمپورت می‌کنید، ممکن است لازم باشد :func:`invalidate_caches` را فراخوانی کنید تا ماژول جدید توسط سامانه‌ی ایمپورت شناسایی شود." +msgid "If the module cannot be imported, :func:`import_module` will raise :exc:`ImportError` or an appropriate subclass like :exc:`ModuleNotFoundError`." +msgstr "اگر ماژول نتواند وارد شود، :func:`import_module` استثنای :exc:`ImportError` یا یک زیرکلاس مناسب مانند :exc:`ModuleNotFoundError` را بالا خواهد آورد." + msgid "Parent packages are automatically imported." msgstr "بسته‌های والد به‌طور خودکار ایمپورت می‌شوند." @@ -272,6 +276,21 @@ msgstr "یک متد اختیاری که هرگاه فراخوانی شود، ب msgid "Returns ``None`` when called instead of :data:`NotImplemented`." msgstr "هنگام فراخوانی، به جای :data:`NotImplemented`، ``None`` را بازمی‌گرداند." +msgid "An optional method which searches for possible specs with given *parent* module spec. If *parent* is *None*, :meth:`MetaPathFinder.discover` will search for top-level modules." +msgstr "یک متد اختیاری که به دنبال مشخصات احتمالی با مشخصه‌ی ماژول *parent* داده‌شده می‌گردد. اگر *parent* مقدار *None* باشد، :meth:`MetaPathFinder.discover` به دنبال ماژول‌های رده‌بالا خواهد گشت." + +msgid "Returns an iterable of possible specs." +msgstr "یک شیء پیمایش‌پذیر از مشخصات احتمالی را برمی‌گرداند." + +msgid "Raises :exc:`ValueError` if *parent* is not a package module." +msgstr "اگر *parent* یک ماژول بسته نباشد، استثنای :exc:`ValueError` را بالا می‌آورد." + +msgid "This method can potentially yield a very large number of objects, and it may carry out IO operations when computing these values." +msgstr "این متد به‌طور بالقوه می‌تواند تعداد بسیار زیادی از اشیاء را تولید کند، و ممکن است هنگام محاسبه‌ی این مقادیر، عملیات‌های ورودی/خروجی (IO) انجام دهد." + +msgid "Because of this, it will generally be desirable to compute the result values on-the-fly, as they are needed. As such, the returned object is only guaranteed to be an :class:`iterable `, instead of a :class:`list` or other :class:`collection ` type." +msgstr "به همین دلیل، معمولاً مطلوب است که مقادیر نتیجه به‌صورت در لحظه (on-the-fly) و در زمان نیاز محاسبه شوند. به همین خاطر، فقط تضمین می‌شود که شیء بازگردانده‌شده یک :class:`iterable ` باشد، نه یک :class:`list` یا سایر انواع :class:`collection `." + msgid "An abstract base class representing a :term:`path entry finder`. Though it bears some similarities to :class:`MetaPathFinder`, ``PathEntryFinder`` is meant for use only within the path-based import subsystem provided by :class:`importlib.machinery.PathFinder`." msgstr "یک کلاس پایه انتزاعی که نشان‌دهنده‌ی یک :term:`path entry finder` است. اگرچه این کلاس شباهت‌هایی به :class:`MetaPathFinder` دارد، اما ``PathEntryFinder`` تنها برای استفاده در زیرسیستم ایمپورت مبتنی بر مسیر که توسط :class:`importlib.machinery.PathFinder` ارائه می‌شود، در نظر گرفته شده است." @@ -281,6 +300,9 @@ msgstr "یک متد انتزاعی برای یافتن یک :term:`spec `. برای تعریف دقیق بارگذار، :pep:`302` را ببینید." @@ -290,6 +312,9 @@ msgstr "بارگذارهایی که مایلند از خواندن منبع پش msgid "Introduced the optional :meth:`!get_resource_reader` method." msgstr "متد اختیاری :meth:`!get_resource_reader` معرفی شد." +msgid "Removed the ``load_module()`` method." +msgstr "متد ``load_module()`` حذف شد." + msgid "A method that returns the module object to use when importing a module. This method may return ``None``, indicating that default module creation semantics should take place." msgstr "متدی که شیء ماژول را برای استفاده هنگام ایمپورت یک ماژول برمی‌گرداند. این متد ممکن است ``None`` را برگرداند، که نشان می‌دهد باید معناشناسی پیش‌فرض ایجاد ماژول صورت گیرد." @@ -302,42 +327,6 @@ msgstr "یک متد انتزاعی که ماژول را در فضای نام خ msgid ":meth:`create_module` must also be defined." msgstr ":meth:`create_module` نیز باید تعریف شود." -msgid "A legacy method for loading a module. If the module cannot be loaded, :exc:`ImportError` is raised, otherwise the loaded module is returned." -msgstr "یک متد قدیمی برای بارگذاری یک ماژول. اگر ماژول قابل بارگذاری نباشد، :exc:`ImportError` پرتاب می‌شود، در غیر این صورت ماژول بارگذاری‌شده برگردانده می‌شود." - -msgid "If the requested module already exists in :data:`sys.modules`, that module should be used and reloaded. Otherwise the loader should create a new module and insert it into :data:`sys.modules` before any loading begins, to prevent recursion from the import. If the loader inserted a module and the load fails, it must be removed by the loader from :data:`sys.modules`; modules already in :data:`sys.modules` before the loader began execution should be left alone." -msgstr "اگر ماژول درخواست‌شده از قبل در :data:`sys.modules` وجود داشته باشد، باید از همان ماژول استفاده شود و آن ماژول دوباره بارگذاری شود. در غیر این صورت، بارگذار باید یک ماژول جدید ایجاد کند و آن را پیش از آغاز هرگونه بارگذاری در :data:`sys.modules` درج کند تا از بازگشت ناشی از ایمپورت جلوگیری شود. اگر بارگذار ماژولی را درج کرد و بارگذاری شکست خورد، بارگذار باید آن را از :data:`sys.modules` حذف کند؛ ماژول‌هایی که پیش از آغاز اجرای بارگذار از قبل در :data:`sys.modules` وجود داشته‌اند، باید دست‌نخورده باقی بمانند." - -msgid "The loader should set several attributes on the module (note that some of these attributes can change when a module is reloaded):" -msgstr "بارگذار باید چندین ویژگی را روی ماژول تنظیم کند (توجه داشته باشید که برخی از این ویژگی‌ها ممکن است هنگام بارگذاری مجدد یک ماژول تغییر کنند):" - -msgid ":attr:`module.__name__`" -msgstr ":attr:`module.__name__`" - -msgid ":attr:`module.__file__`" -msgstr ":attr:`module.__file__`" - -msgid ":attr:`module.__cached__` *(deprecated)*" -msgstr ":attr:`module.__cached__` *(منسوخ)*" - -msgid ":attr:`module.__path__`" -msgstr ":attr:`module.__path__`" - -msgid ":attr:`module.__package__` *(deprecated)*" -msgstr ":attr:`module.__package__` *(منسوخ)*" - -msgid ":attr:`module.__loader__` *(deprecated)*" -msgstr ":attr:`module.__loader__` *(منسوخ)*" - -msgid "When :meth:`exec_module` is available then backwards-compatible functionality is provided." -msgstr "هنگامی که :meth:`exec_module` در دسترس باشد، عملکرد سازگار با نسخه‌های پیشین فراهم می‌شود." - -msgid "Raise :exc:`ImportError` when called instead of :exc:`NotImplementedError`. Functionality provided when :meth:`exec_module` is available." -msgstr "هنگام فراخوانی، به‌جای :exc:`NotImplementedError`، :exc:`ImportError` پرتاب می‌کند. قابلیت ارائه‌شده زمانی در دسترس است که :meth:`exec_module` موجود باشد." - -msgid "The recommended API for loading a module is :meth:`exec_module` (and :meth:`create_module`). Loaders should implement it instead of :meth:`load_module`. The import machinery takes care of all the other responsibilities of :meth:`load_module` when :meth:`exec_module` is implemented." -msgstr "API توصیه‌شده برای بارگذاری یک ماژول، :meth:`exec_module` (و :meth:`create_module`) است. بارگذارها باید به جای :meth:`load_module` آن را پیاده‌سازی کنند. سازوکار ایمپورت تمام مسئولیت‌های دیگر :meth:`load_module` را هنگامی که :meth:`exec_module` پیاده‌سازی شود، بر عهده می‌گیرد." - msgid "*Superseded by TraversableResources*" msgstr "*جایگزین‌شده با TraversableResources*" @@ -383,18 +372,18 @@ msgstr "آرگومان *data* می‌تواند هر چیزی باشد که تا msgid "With the subsequent code object one can execute it in a module by running ``exec(code, module.__dict__)``." msgstr "با استفاده از شیء کد متعاقب، می‌توان آن را در یک ماژول با اجرای ``exec(code, module.__dict__)`` اجرا کرد." +msgid "The optional argument *fullname* specifies the module name. It is needed to unambiguous :ref:`filter ` syntax warnings by module name." +msgstr "آرگومان اختیاری *fullname* نام ماژول را مشخص می‌کند. این آرگومان برای رفع ابهام در هشدار‌های :ref:`filter ` نحو (syntax) بر اساس نام ماژول مورد نیاز است." + msgid "Made the method static." msgstr "متد را ایستا کرد." +msgid "Added the *fullname* parameter." +msgstr "پارامتر *fullname* اضافه شد." + msgid "Implementation of :meth:`Loader.exec_module`." msgstr "پیاده‌سازی :meth:`Loader.exec_module`." -msgid "Implementation of :meth:`Loader.load_module`." -msgstr "پیاده‌سازی :meth:`Loader.load_module`." - -msgid "use :meth:`exec_module` instead." -msgstr "به‌جای آن از :meth:`exec_module` استفاده کنید." - msgid "An abstract base class which inherits from :class:`InspectLoader` that, when implemented, helps a module to be executed as a script. The ABC represents an optional :pep:`302` protocol." msgstr "یک کلاس پایه انتزاعی که از :class:`InspectLoader` ارث می‌برد و هنگامی که پیاده‌سازی شود، به اجرای یک ماژول به‌عنوان اسکریپت کمک می‌کند. این کلاس پایه انتزاعی (ABC) نشان‌دهنده‌ی یک پروتکل اختیاری :pep:`302` است." @@ -416,12 +405,6 @@ msgstr "نام ماژولی که بارگذار می‌تواند آن را مد msgid "Path to the file of the module." msgstr "مسیر پرونده ماژول." -msgid "Calls super's ``load_module()``." -msgstr "متد ``load_module()`` ابرکلاس را فراخوانی می‌کند." - -msgid "Use :meth:`Loader.exec_module` instead." -msgstr "به‌جای آن از :meth:`Loader.exec_module` استفاده کنید." - msgid "Returns :attr:`path`." msgstr ":attr:`path` را برمی‌گرداند." @@ -479,12 +462,6 @@ msgstr "پیاده‌سازی مشخص برای :meth:`InspectLoader.get_code`." msgid "Concrete implementation of :meth:`Loader.exec_module`." msgstr "پیاده‌سازی عینی :meth:`Loader.exec_module`." -msgid "Concrete implementation of :meth:`Loader.load_module`." -msgstr "پیاده‌سازی عینی :meth:`Loader.load_module`." - -msgid "Use :meth:`exec_module` instead." -msgstr "به‌جای آن از :meth:`exec_module` استفاده کنید." - msgid "Concrete implementation of :meth:`InspectLoader.get_source`." msgstr "پیاده‌سازی عینی برای :meth:`InspectLoader.get_source`." @@ -590,6 +567,33 @@ msgstr "یک متد کلاس که یک بستار را برای استفاده msgid "If the argument to the closure is not an existing directory, :exc:`ImportError` is raised." msgstr "اگر آرگومانِ بسته یک پوشه‌ی موجود نباشد، :exc:`ImportError` پرتاب می‌شود." +msgid "Represents a :term:`namespace package`'s path (:attr:`module.__path__`)." +msgstr "نشان‌دهنده‌ی مسیر یک :term:`بسته فضای نام ` است (:attr:`module.__path__`)." + +msgid "When its ``__path__`` value is accessed it will be recomputed if necessary. This keeps it in-sync with the global state (:attr:`sys.modules`)." +msgstr "هنگامی که به مقدار ``__path__`` آن دسترسی پیدا می‌شود، در صورت نیاز دوباره محاسبه خواهد شد. این کار باعث می‌شود تا با وضعیت سراسری (:attr:`sys.modules`) همگام بماند." + +msgid "The *name* argument is the name of the namespace module." +msgstr "آرگومان *name* نام ماژول فضای نام است." + +msgid "The *path* argument is the initial path value." +msgstr "آرگومان *path* مقدار مسیر اولیه است." + +msgid "The *path_finder* argument is the callable used to recompute the path value. The callable has the same signature as :meth:`importlib.abc.MetaPathFinder.find_spec`." +msgstr "آرگومان *path_finder* شیء فراخوانی‌پذیری است که برای محاسبه‌ی مجدد مقدار مسیر استفاده می‌شود. این شیء فراخوانی‌پذیر دارای همان امضا (signature) :meth:`importlib.abc.MetaPathFinder.find_spec` است." + +msgid "When the parent's :attr:`module.__path__` attribute is updated, the path value is recomputed." +msgstr "هنگامی که ویژگی :attr:`module.__path__` متعلق به والد به‌روزرسانی می‌شود، مقدار مسیر مجدداً محاسبه می‌شود." + +msgid "If the parent module is missing from :data:`sys.modules`, then :exc:`ModuleNotFoundError` will be raised." +msgstr "اگر ماژول والد در :data:`sys.modules` وجود نداشته باشد، استثنای :exc:`ModuleNotFoundError` بالا خواهد آمد." + +msgid "For top-level modules, the parent module's path is :data:`sys.path`." +msgstr "برای ماژول‌های رده‌بالا (top-level)، مسیر ماژول والد برابر با :data:`sys.path` است." + +msgid ":meth:`PathFinder.invalidate_caches` invalidates :class:`NamespacePath`, forcing the path value to be recomputed next time it is accessed." +msgstr "متد :meth:`PathFinder.invalidate_caches` اعتبار :class:`NamespacePath` را باطل می‌کند و باعث می‌شود در دفعه‌ی بعدی که به مسیر دسترسی پیدا می‌شود، مقدار آن مجدداً محاسبه شود." + msgid "A concrete implementation of :class:`importlib.abc.SourceLoader` by subclassing :class:`importlib.abc.FileLoader` and providing some concrete implementations of other methods." msgstr "یک پیاده‌سازی عینی از :class:`importlib.abc.SourceLoader` با زیرکلاس‌سازی از :class:`importlib.abc.FileLoader` و ارائه پیاده‌سازی‌های عینی برای برخی متدهای دیگر." @@ -608,12 +612,6 @@ msgstr "پیاده‌سازی عینی :meth:`importlib.abc.SourceLoader.path_st msgid "Concrete implementation of :meth:`importlib.abc.SourceLoader.set_data`." msgstr "پیاده‌سازی عینی :meth:`importlib.abc.SourceLoader.set_data`." -msgid "Concrete implementation of :meth:`importlib.abc.Loader.load_module` where specifying the name of the module to load is optional." -msgstr "پیاده‌سازی عینی :meth:`importlib.abc.Loader.load_module` که در آن مشخص کردن نام ماژول برای بارگذاری اختیاری است." - -msgid "Use :meth:`importlib.abc.Loader.exec_module` instead." -msgstr "به‌جای آن از :meth:`importlib.abc.Loader.exec_module` استفاده کنید." - msgid "A concrete implementation of :class:`importlib.abc.FileLoader` which can import bytecode files (i.e. no source code files exist)." msgstr "یک پیاده‌سازی عینی از :class:`importlib.abc.FileLoader` که می‌تواند پرونده‌های بایت‌کد را ایمپورت کند (یعنی هیچ پرونده کد منبعی وجود ندارد)." @@ -709,8 +707,8 @@ msgstr ":term:`یابنده ` باید این ویژگی را روی ی msgid "The :term:`finder` may set this attribute to an object containing additional, module-specific data to use when loading the module. Otherwise it should be set to ``None``." msgstr ":term:`یابنده ` ممکن است این ویژگی را روی شیءای حاوی داده‌های اضافی و مختص ماژول برای استفاده هنگام بارگذاری ماژول تنظیم کند. در غیر این صورت باید روی ``None`` تنظیم شود." -msgid "The filename of a compiled version of the module's code (see :attr:`module.__cached__`). The :term:`finder` should always set this attribute but it may be ``None`` for modules that do not need compiled code stored." -msgstr "نام پرونده‌ی یک نسخه‌ی کامپایل‌شده از کد ماژول (ببینید :attr:`module.__cached__`). :term:`finder` باید همیشه این ویژگی را تنظیم کند، اما ممکن است برای ماژول‌هایی که نیازی به ذخیره‌ی کد کامپایل‌شده ندارند، ``None`` باشد." +msgid "The filename of a compiled version of the module's code. The :term:`finder` should always set this attribute but it may be ``None`` for modules that do not need compiled code stored." +msgstr "نام پرونده‌ی نسخه‌ی کامپایل‌شده‌ی کد ماژول. :term:`یابنده ` باید همیشه این ویژگی را تنظیم کند اما ممکن است برای ماژول‌هایی که نیازی به ذخیره‌ی کد کامپایل‌شده ندارند ``None`` باشد." msgid "(Read-only) The fully qualified name of the package the module is in (or the empty string for a top-level module). See :attr:`module.__package__`. If the module is a package then this is the same as :attr:`name`." msgstr "(فقط‌خواندنی) نام کامل بسته‌ای که ماژول در آن قرار دارد (یا رشته‌ی خالی برای یک ماژول سطح بالا). به :attr:`module.__package__` مراجعه کنید. اگر ماژول یک بسته باشد، این با :attr:`name` یکسان است." @@ -760,15 +758,15 @@ msgstr "مسیر :pep:`3147`/:pep:`488` پرونده‌ی بایت‌کامپا msgid "The *optimization* parameter is used to specify the optimization level of the bytecode file. An empty string represents no optimization, so ``/foo/bar/baz.py`` with an *optimization* of ``''`` will result in a bytecode path of ``/foo/bar/__pycache__/baz.cpython-32.pyc``. ``None`` causes the interpreter's optimization level to be used. Any other value's string representation is used, so ``/foo/bar/baz.py`` with an *optimization* of ``2`` will lead to the bytecode path of ``/foo/bar/__pycache__/baz.cpython-32.opt-2.pyc``. The string representation of *optimization* can only be alphanumeric, else :exc:`ValueError` is raised." msgstr "پارامتر *optimization* برای مشخص کردن سطح بهینه‌سازی پرونده‌ی بایت‌کد استفاده می‌شود. یک رشته خالی نشان‌دهنده‌ی نبود بهینه‌سازی است، بنابراین ``/foo/bar/baz.py`` با *optimization* برابر ``''`` به مسیر بایت‌کد ``/foo/bar/__pycache__/baz.cpython-32.pyc`` منجر می‌شود. ``None`` باعث می‌شود از سطح بهینه‌سازی مفسر استفاده شود. برای هر مقدار دیگری، از بازنمایی رشته‌ای آن استفاده می‌شود، بنابراین ``/foo/bar/baz.py`` با *optimization* برابر ``2`` به مسیر بایت‌کد ``/foo/bar/__pycache__/baz.cpython-32.opt-2.pyc`` منجر می‌شود. بازنمایی رشته‌ای *optimization* فقط می‌تواند شامل حروف و ارقام باشد، در غیر این صورت :exc:`ValueError` پرتاب می‌شود." -msgid "The *debug_override* parameter is deprecated and can be used to override the system's value for ``__debug__``. A ``True`` value is the equivalent of setting *optimization* to the empty string. A ``False`` value is the same as setting *optimization* to ``1``. If both *debug_override* an *optimization* are not ``None`` then :exc:`TypeError` is raised." -msgstr "پارامتر *debug_override* منسوخ شده است و می‌تواند برای بازنویسی مقدار سیستم برای ``__debug__`` استفاده شود. مقدار ``True`` معادل تنظیم *optimization* به رشته خالی است. مقدار ``False`` همانند تنظیم *optimization* به ``1`` است. اگر هر دو *debug_override* و *optimization* ``None`` نباشند، :exc:`TypeError` پرتاب می‌شود." - msgid "The *optimization* parameter was added and the *debug_override* parameter was deprecated." msgstr "پارامتر *optimization* افزوده شد و پارامتر *debug_override* منسوخ شد." msgid "Accepts a :term:`path-like object`." msgstr "یک :term:`شیء شبه‌مسیر ` را می‌پذیرد." +msgid "The *debug_override* parameter was removed." +msgstr "پارامتر *debug_override* حذف شد." + msgid "Given the *path* to a :pep:`3147` file name, return the associated source code file path. For example, if *path* is ``/foo/bar/__pycache__/baz.cpython-32.pyc`` the returned path would be ``/foo/bar/baz.py``. *path* need not exist, however if it does not conform to :pep:`3147` or :pep:`488` format, a :exc:`ValueError` is raised. If :attr:`sys.implementation.cache_tag ` is not defined, :exc:`NotImplementedError` is raised." msgstr "با دادن *path* به نام پرونده‌ی :pep:`3147`، مسیر پرونده‌ی کد منبع مرتبط را برگردانید. برای مثال، اگر *path* برابر با ``/foo/bar/__pycache__/baz.cpython-32.pyc`` باشد، مسیر برگردانده‌شده ``/foo/bar/baz.py`` خواهد بود. *path* لزوماً وجود ندارد، اما اگر با فرمت :pep:`3147` یا :pep:`488` مطابقت نداشته باشد، یک :exc:`ValueError` پرتاب می‌شود. اگر :attr:`sys.implementation.cache_tag ` تعریف نشده باشد، :exc:`NotImplementedError` پرتاب می‌شود." @@ -1125,3 +1123,63 @@ msgstr "سطرهای جدید همگانی (universal newlines)" msgid "importlib.abc.InspectLoader.get_source method" msgstr "متد importlib.abc.InspectLoader.get_source" + +#~ msgid "A legacy method for loading a module. If the module cannot be loaded, :exc:`ImportError` is raised, otherwise the loaded module is returned." +#~ msgstr "یک متد قدیمی برای بارگذاری یک ماژول. اگر ماژول قابل بارگذاری نباشد، :exc:`ImportError` پرتاب می‌شود، در غیر این صورت ماژول بارگذاری‌شده برگردانده می‌شود." + +#~ msgid "If the requested module already exists in :data:`sys.modules`, that module should be used and reloaded. Otherwise the loader should create a new module and insert it into :data:`sys.modules` before any loading begins, to prevent recursion from the import. If the loader inserted a module and the load fails, it must be removed by the loader from :data:`sys.modules`; modules already in :data:`sys.modules` before the loader began execution should be left alone." +#~ msgstr "اگر ماژول درخواست‌شده از قبل در :data:`sys.modules` وجود داشته باشد، باید از همان ماژول استفاده شود و آن ماژول دوباره بارگذاری شود. در غیر این صورت، بارگذار باید یک ماژول جدید ایجاد کند و آن را پیش از آغاز هرگونه بارگذاری در :data:`sys.modules` درج کند تا از بازگشت ناشی از ایمپورت جلوگیری شود. اگر بارگذار ماژولی را درج کرد و بارگذاری شکست خورد، بارگذار باید آن را از :data:`sys.modules` حذف کند؛ ماژول‌هایی که پیش از آغاز اجرای بارگذار از قبل در :data:`sys.modules` وجود داشته‌اند، باید دست‌نخورده باقی بمانند." + +#~ msgid "The loader should set several attributes on the module (note that some of these attributes can change when a module is reloaded):" +#~ msgstr "بارگذار باید چندین ویژگی را روی ماژول تنظیم کند (توجه داشته باشید که برخی از این ویژگی‌ها ممکن است هنگام بارگذاری مجدد یک ماژول تغییر کنند):" + +#~ msgid ":attr:`module.__name__`" +#~ msgstr ":attr:`module.__name__`" + +#~ msgid ":attr:`module.__file__`" +#~ msgstr ":attr:`module.__file__`" + +#~ msgid ":attr:`module.__cached__` *(deprecated)*" +#~ msgstr ":attr:`module.__cached__` *(منسوخ)*" + +#~ msgid ":attr:`module.__path__`" +#~ msgstr ":attr:`module.__path__`" + +#~ msgid ":attr:`module.__package__` *(deprecated)*" +#~ msgstr ":attr:`module.__package__` *(منسوخ)*" + +#~ msgid ":attr:`module.__loader__` *(deprecated)*" +#~ msgstr ":attr:`module.__loader__` *(منسوخ)*" + +#~ msgid "When :meth:`exec_module` is available then backwards-compatible functionality is provided." +#~ msgstr "هنگامی که :meth:`exec_module` در دسترس باشد، عملکرد سازگار با نسخه‌های پیشین فراهم می‌شود." + +#~ msgid "Raise :exc:`ImportError` when called instead of :exc:`NotImplementedError`. Functionality provided when :meth:`exec_module` is available." +#~ msgstr "هنگام فراخوانی، به‌جای :exc:`NotImplementedError`، :exc:`ImportError` پرتاب می‌کند. قابلیت ارائه‌شده زمانی در دسترس است که :meth:`exec_module` موجود باشد." + +#~ msgid "The recommended API for loading a module is :meth:`exec_module` (and :meth:`create_module`). Loaders should implement it instead of :meth:`load_module`. The import machinery takes care of all the other responsibilities of :meth:`load_module` when :meth:`exec_module` is implemented." +#~ msgstr "API توصیه‌شده برای بارگذاری یک ماژول، :meth:`exec_module` (و :meth:`create_module`) است. بارگذارها باید به جای :meth:`load_module` آن را پیاده‌سازی کنند. سازوکار ایمپورت تمام مسئولیت‌های دیگر :meth:`load_module` را هنگامی که :meth:`exec_module` پیاده‌سازی شود، بر عهده می‌گیرد." + +#~ msgid "Implementation of :meth:`Loader.load_module`." +#~ msgstr "پیاده‌سازی :meth:`Loader.load_module`." + +#~ msgid "use :meth:`exec_module` instead." +#~ msgstr "به‌جای آن از :meth:`exec_module` استفاده کنید." + +#~ msgid "Use :meth:`Loader.exec_module` instead." +#~ msgstr "به‌جای آن از :meth:`Loader.exec_module` استفاده کنید." + +#~ msgid "Concrete implementation of :meth:`Loader.load_module`." +#~ msgstr "پیاده‌سازی عینی :meth:`Loader.load_module`." + +#~ msgid "Use :meth:`exec_module` instead." +#~ msgstr "به‌جای آن از :meth:`exec_module` استفاده کنید." + +#~ msgid "Concrete implementation of :meth:`importlib.abc.Loader.load_module` where specifying the name of the module to load is optional." +#~ msgstr "پیاده‌سازی عینی :meth:`importlib.abc.Loader.load_module` که در آن مشخص کردن نام ماژول برای بارگذاری اختیاری است." + +#~ msgid "Use :meth:`importlib.abc.Loader.exec_module` instead." +#~ msgstr "به‌جای آن از :meth:`importlib.abc.Loader.exec_module` استفاده کنید." + +#~ msgid "The *debug_override* parameter is deprecated and can be used to override the system's value for ``__debug__``. A ``True`` value is the equivalent of setting *optimization* to the empty string. A ``False`` value is the same as setting *optimization* to ``1``. If both *debug_override* an *optimization* are not ``None`` then :exc:`TypeError` is raised." +#~ msgstr "پارامتر *debug_override* منسوخ شده است و می‌تواند برای بازنویسی مقدار سیستم برای ``__debug__`` استفاده شود. مقدار ``True`` معادل تنظیم *optimization* به رشته خالی است. مقدار ``False`` همانند تنظیم *optimization* به ``1`` است. اگر هر دو *debug_override* و *optimization* ``None`` نباشند، :exc:`TypeError` پرتاب می‌شود." diff --git a/library/importlib.resources.po b/library/importlib.resources.po index cae851ac..8626cbaf 100644 --- a/library/importlib.resources.po +++ b/library/importlib.resources.po @@ -7,12 +7,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2022-11-05 19:49+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -58,8 +59,11 @@ msgstr "یک شیء :class:`~importlib.resources.abc.Traversable` را برمی msgid "*anchor* is an optional :class:`Anchor`. If the anchor is a package, resources are resolved from that package. If a module, resources are resolved adjacent to that module (in the same package or the package root). If the anchor is omitted, the caller's module is used." msgstr "*anchor* یک :class:`Anchor` اختیاری است. اگر *anchor* یک بسته باشد، منابع از آن بسته یافت می‌شوند. اگر *anchor* یک ماژول باشد، منابع در مجاورت آن ماژول یافت می‌شوند (در همان بسته یا ریشه‌ی بسته). اگر *anchor* حذف شود، از ماژول فراخواننده استفاده می‌شود." -msgid "*package* parameter was renamed to *anchor*. *anchor* can now be a non-package module and if omitted will default to the caller's module. *package* is still accepted for compatibility but will raise a :exc:`DeprecationWarning`. Consider passing the anchor positionally or using ``importlib_resources >= 5.10`` for a compatible interface on older Pythons." -msgstr "پارامتر *package* به *anchor* تغییر نام داده شده است. *anchor* اکنون می‌تواند یک ماژول غیربسته باشد و در صورت حذف، به‌طور پیش‌فرض ماژول فراخوان خواهد بود. *package* همچنان برای سازگاری پذیرفته می‌شود، اما یک :exc:`DeprecationWarning` پرتاب می‌کند. در نظر داشته باشید که anchor را به‌صورت جایگاهی ارسال کنید یا از ``importlib_resources >= 5.10`` برای یک رابط سازگار در پایتون‌های قدیمی‌تر استفاده کنید." +msgid "*package* parameter was renamed to *anchor*. *package* was still accepted, but deprecated." +msgstr "پارامتر *package* به *anchor* تغییر نام داد. پارامتر *package* همچنان پذیرفته می‌شود، اما منسوخ شده است." + +msgid "*package* parameter was fully removed. *anchor* can now be a non-package module and if omitted will default to the caller's module. *package* is no longer accepted since Python 3.15. Consider passing the anchor positionally or using ``importlib_resources >= 5.10`` for a compatible interface on older Pythons." +msgstr "پارامتر *package* به طور کامل حذف شد. *anchor* اکنون می‌تواند یک ماژول غیربسته باشد و اگر حذف شود، به‌طور پیش‌فرض روی ماژول فراخواننده تنظیم می‌شود. از پایتون ۳.۱۵ به بعد، پارامتر *package* دیگر پذیرفته نمی‌شود. برای داشتن یک رابط سازگار در نسخه‌های قدیمی‌تر پایتون، در نظر داشته باشید که anchor را به صورت ترتیبی ارسال کنید یا از ``importlib_resources >= 5.10`` استفاده کنید." msgid "Given a :class:`~importlib.resources.abc.Traversable` object representing a file or directory, typically from :func:`importlib.resources.files`, return a context manager for use in a :keyword:`with` statement. The context manager provides a :class:`pathlib.Path` object." msgstr "با داشتن یک شیء :class:`~importlib.resources.abc.Traversable` که نشان‌دهنده یک پرونده یا پوشه است و معمولاً از :func:`importlib.resources.files` به‌دست می‌آید، یک مدیر زمینه برای استفاده در دستور :keyword:`with` برمی‌گرداند. این مدیر زمینه یک شیء :class:`pathlib.Path` را فراهم می‌کند." diff --git a/library/inspect.po b/library/inspect.po index 53f424f5..022f820d 100644 --- a/library/inspect.po +++ b/library/inspect.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 15:35+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -294,12 +295,6 @@ msgstr "co_flags" msgid "bitmap of ``CO_*`` flags, read more :ref:`here `" msgstr "بیت‌مپ پرچم‌های ``CO_*``، برای مطالعه بیشتر :ref:`اینجا ` را ببینید" -msgid "co_lnotab" -msgstr "co_lnotab" - -msgid "encoded mapping of line numbers to bytecode indices" -msgstr "نگاشت کدگذاری‌شده از شماره سطرها به اندیس‌های بایت‌کد" - msgid "co_freevars" msgstr "co_freevars" @@ -402,6 +397,12 @@ msgstr "gi_yieldfrom" msgid "object being iterated by ``yield from``, or ``None``" msgstr "شیئی که ``yield from`` روی آن پیمایش می‌کند، یا ``None``" +msgid "gi_state" +msgstr "gi_state" + +msgid "state of the generator, one of ``GEN_CREATED``, ``GEN_RUNNING``, ``GEN_SUSPENDED``, or ``GEN_CLOSED``" +msgstr "وضعیت تولیدگر، یکی از مقادیر ``GEN_CREATED``، ``GEN_RUNNING``، ``GEN_SUSPENDED`` یا ``GEN_CLOSED``" + msgid "async generator" msgstr "تولیدگر ناهمگام" @@ -423,6 +424,12 @@ msgstr "ag_suspended" msgid "ag_code" msgstr "ag_code" +msgid "ag_state" +msgstr "ag_state" + +msgid "state of the async generator, one of ``AGEN_CREATED``, ``AGEN_RUNNING``, ``AGEN_SUSPENDED``, or ``AGEN_CLOSED``" +msgstr "وضعیت تولیدگر ناهمگام، یکی از موارد ``AGEN_CREATED``، ``AGEN_RUNNING``، ``AGEN_SUSPENDED`` یا ``AGEN_CLOSED``" + msgid "coroutine" msgstr "هم‌روال" @@ -453,6 +460,12 @@ msgstr "cr_origin" msgid "where coroutine was created, or ``None``. See |coroutine-origin-link|" msgstr "جایی که هم‌روال ایجاد شده است، یا ``None``. ببینید |coroutine-origin-link|" +msgid "cr_state" +msgstr "cr_state" + +msgid "state of the coroutine, one of ``CORO_CREATED``, ``CORO_RUNNING``, ``CORO_SUSPENDED``, or ``CORO_CLOSED``" +msgstr "وضعیت هم‌روال، یکی از موارد ``CORO_CREATED``، ``CORO_RUNNING``، ``CORO_SUSPENDED`` یا ``CORO_CLOSED``" + msgid "builtin" msgstr "توکار" @@ -486,6 +499,9 @@ msgstr "افزودن ویژگی ``ag_suspended`` به تولیدگرهای نا msgid "Add ``f_generator`` attribute to frames." msgstr "افزودن ویژگی ``f_generator`` به فریم‌ها." +msgid "Add ``gi_state`` attribute to generators, ``cr_state`` attribute to coroutines, and ``ag_state`` attribute to async generators." +msgstr "افزودن ویژگی ``gi_state`` به تولیدگرها، ویژگی ``cr_state`` به هم‌روال‌ها و ویژگی ``ag_state`` به تولیدگرهای ناهمگام." + msgid "Return all the members of an object in a list of ``(name, value)`` pairs sorted by name. If the optional *predicate* argument—which will be called with the ``value`` object of each member—is supplied, only members for which the predicate returns a true value are included." msgstr "تمام اعضای یک شیء را در فهرستی از جفت‌های ``(name, value)`` مرتب‌شده بر اساس نام برمی‌گرداند. اگر آرگومان اختیاری *predicate* — که با شیء ``value`` هر عضو فراخوانی می‌شود — داده شده باشد، تنها اعضایی که predicate برای آن‌ها مقدار درست برگرداند، گنجانده می‌شوند." @@ -592,9 +608,6 @@ msgstr "همچنین برای متدهای مقید ایجادشده از توا msgid "Functions wrapped in :func:`functools.partial` now return ``True`` if the wrapped function is a Python generator function." msgstr "توابع پوشیده‌شده با :func:`functools.partial` اکنون اگر تابع پوشیده‌شده یک تابع تولیدگر پایتون باشد، ``True`` را برمی‌گردانند." -msgid ":term:`Duck-typed ` function-like objects now return ``True`` if their code object has the :data:`CO_GENERATOR` flag." -msgstr ":term:`نوع‌دهی اردکی ` شیءهای شبیه‌تابع اکنون ``True`` برمی‌گردانند اگر شیء کد آن‌ها پرچم :data:`CO_GENERATOR` را داشته باشد." - msgid "Functions wrapped in :func:`functools.partialmethod` now return ``True`` if the wrapped function is a Python generator function." msgstr "توابعی که در :func:`functools.partialmethod` پوشیده شده‌اند، اکنون در صورتی که تابع پوشیده‌شده یک تابع تولیدگر پایتون باشد، ``True`` برمی‌گردانند." @@ -607,9 +620,6 @@ msgstr "اگر شیء یک :term:`تابع هم‌روال ` msgid "Functions wrapped in :func:`functools.partial` now return ``True`` if the wrapped function is a :term:`coroutine function`." msgstr "توابع پوشش‌داده‌شده توسط :func:`functools.partial` اکنون در صورتی ``True`` را برمی‌گردانند که تابع پوشش‌داده‌شده یک :term:`تابع هم‌روال ` باشد." -msgid ":term:`Duck-typed ` function-like objects now return ``True`` if their code object has the :data:`CO_COROUTINE` flag." -msgstr ":term:`نوع‌دهی اردکی ` شیءهای شبیه‌تابع اکنون ``True`` برمی‌گردانند اگر شیء کد آن‌ها پرچم :data:`CO_COROUTINE` را داشته باشد." - msgid "Sync functions marked with :func:`markcoroutinefunction` now return ``True``." msgstr "توابع همگامی که با :func:`markcoroutinefunction` علامت‌گذاری شده‌اند، اکنون ``True`` برمی‌گردانند." @@ -676,9 +686,6 @@ msgstr "" msgid "Functions wrapped in :func:`functools.partial` now return ``True`` if the wrapped function is an :term:`asynchronous generator` function." msgstr "توابعی که با :func:`functools.partial` پوشیده‌شده‌اند، اکنون اگر تابع پوشیده‌شده یک تابع :term:`تولیدگر ناهمگام ` باشد، ``True`` برمی‌گردانند." -msgid ":term:`Duck-typed ` function-like objects now return ``True`` if their code object has the :data:`CO_ASYNC_GENERATOR` flag." -msgstr ":term:`نوع‌دهی اردکی ` شیءهای شبیه‌به‌تابع اکنون ``True`` را برمی‌گردانند اگر شیء کد آن‌ها پرچم :data:`CO_ASYNC_GENERATOR` را داشته باشد." - msgid "Functions wrapped in :func:`functools.partialmethod` now return ``True`` if the wrapped function is a :term:`asynchronous generator` function." msgstr "توابع پوشش‌داده‌شده با :func:`functools.partialmethod` اکنون در صورتی ``True`` برمی‌گردانند که تابع پوشش‌داده‌شده یک تابع :term:`تولیدگر ناهمگام ` باشد." @@ -751,12 +758,30 @@ msgstr "توصیف‌گرهای عضو، ویژگی‌هایی هستند که msgid "Retrieving source code" msgstr "بازیابی کد منبع" -msgid "Get the documentation string for an object, cleaned up with :func:`cleandoc`. If the documentation string for an object is not provided and the object is a class, a method, a property or a descriptor, retrieve the documentation string from the inheritance hierarchy. Return ``None`` if the documentation string is invalid or missing." -msgstr "رشته مستندات یک شیء را، پاک‌سازی‌شده با :func:`cleandoc`، دریافت کنید. اگر رشته مستندات یک شیء فراهم‌نشده باشد و آن شیء یک کلاس، یک متد، یک ویژگی یا یک توصیف‌گر باشد، رشته مستندات را از سلسله‌مراتب وراثت بازیابی کنید. اگر رشته مستندات نامعتبر یا موجود نباشد، ``None`` را برگردانید." +msgid "Get the documentation string for an object, cleaned up with :func:`cleandoc`. If the documentation string for an object is not provided:" +msgstr "دریافت رشته‌ی مستندات برای یک شیء، که با :func:`cleandoc` پاک‌سازی شده است. اگر رشته‌ی مستندات برای یک شیء فراهم نشده باشد:" + +msgid "if the object is a class and *inherit_class_doc* is true (by default), retrieve the documentation string from the inheritance hierarchy;" +msgstr "اگر شیء یک کلاس باشد و *inherit_class_doc* برابر با درست (به‌طور پیش‌فرض) باشد، رشته‌ی مستندات از سلسله‌مراتب ارث‌بری بازیابی می‌شود؛" + +msgid "if the object is a method, a property or a descriptor, retrieve the documentation string from the inheritance hierarchy;" +msgstr "اگر شیء یک متد، یک ویژگی یا یک توصیف‌گر باشد، رشته‌ی مستندات از سلسله‌مراتب ارث‌بری بازیابی می‌شود؛" + +msgid "otherwise, if *fallback_to_class_doc* is true (by default), retrieve the documentation string from the class of the object." +msgstr "در غیر این صورت، اگر *fallback_to_class_doc* برابر با درست (به‌طور پیش‌فرض) باشد، رشته‌ی مستندات از کلاسِ شیء بازیابی می‌شود." + +msgid "Return ``None`` if the documentation string is invalid or missing." +msgstr "اگر رشته‌ی مستندات نامعتبر یا گم شده باشد، مقدار ``None`` را برمی‌گرداند." msgid "Documentation strings are now inherited if not overridden." msgstr "رشته مستندات اکنون در صورتی که بازنویسی نشده باشند، به ارث می‌رسند." +msgid "Added parameters *inherit_class_doc* and *fallback_to_class_doc*." +msgstr "پارامترهای *inherit_class_doc* و *fallback_to_class_doc* اضافه شدند." + +msgid "Documentation strings on :class:`~functools.cached_property` objects are now inherited if not overridden." +msgstr "رشته‌های مستندسازی روی اشیاء :class:`~functools.cached_property` اکنون در صورت عدم بازنویسی، به ارث برده می‌شوند." + msgid "Return in a single string any lines of comments immediately preceding the object's source code (for a class, function, or method), or at the top of the Python source file (if the object is a module). If the object's source code is unavailable, return ``None``. This could happen if the object has been defined in C or the interactive shell." msgstr "هر یک از سطرهای کامنت‌ها بلافاصله پیش از کد منبع شیء (برای یک کلاس، تابع یا متد) یا در بالای پرونده منبع پایتون (اگر شیء یک ماژول باشد) را در یک رشته‌ی واحد برمی‌گرداند. اگر کد منبع شیء در دسترس نباشد، ``None`` را برمی‌گرداند. این حالت ممکن است در صورتی رخ دهد که شیء در C یا پوسته‌ی تعاملی تعریف شده باشد." @@ -1175,6 +1200,9 @@ msgstr "*args* فهرستی از نام پارامترهای جایگاهی اس msgid "Note that :func:`signature` and :ref:`Signature Object ` provide the recommended API for callable introspection, and support additional behaviours (like positional-only arguments) that are sometimes encountered in extension module APIs. This function is retained primarily for use in code that needs to maintain compatibility with the Python 2 ``inspect`` module API." msgstr "توجه داشته باشید که :func:`signature` و :ref:`شیء امضا `، API توصیه‌شده برای درون‌نگری اشیاء فراخوانی‌پذیر را فراهم می‌کنند و از رفتارهای اضافی (مانند آرگومان‌های فقط جایگاهی) پشتیبانی می‌کنند که گاهی در APIهای ماژول‌های توسعه‌ای با آن‌ها مواجه می‌شوید. این تابع عمدتاً برای استفاده در کدی نگه داشته شده است که نیاز دارد سازگاری با API ماژول ``inspect`` در پایتون 2 را حفظ کند." +msgid "A member of the :class:`annotationlib.Format` enum can be passed to the *annotation_format* parameter to control the format of the returned annotations. For example, use ``annotation_format=annotationlib.Format.STRING`` to return annotations in string format. Note that with the default ``VALUE`` format, creation of some argspecs may raise an exception." +msgstr "می‌توان یک عضو از شمارشی :class:`annotationlib.Format` را به پارامتر *annotation_format* ارسال کرد تا قالب حاشیه‌نویسی‌های برگردانده‌شده کنترل شود. برای مثال، از ``annotation_format=annotationlib.Format.STRING`` استفاده کنید تا حاشیه‌نویسی‌ها در قالب رشته برگردانده شوند. توجه داشته باشید که با قالب پیش‌فرض ``VALUE``، ایجاد برخی از مشخصات آرگومان ممکن است یک استثنا ایجاد کند." + msgid "This function is now based on :func:`signature`, but still ignores ``__wrapped__`` attributes and includes the already bound first parameter in the signature output for bound methods." msgstr "این تابع اکنون بر پایه‌ی :func:`signature` است، اما همچنان ویژگی‌های ``__wrapped__`` را نادیده می‌گیرد و نخستین پارامتر از پیش مقید را در خروجی امضا برای متدهای مقید قرار می‌دهد." @@ -1555,8 +1583,29 @@ msgstr "رابط خط فرمان" msgid "The :mod:`!inspect` module also provides a basic introspection capability from the command line." msgstr "ماژول :mod:`!inspect` همچنین قابلیت مقدماتی درون‌نگری را از خط فرمان فراهم می‌کند." -msgid "By default, accepts the name of a module and prints the source of that module. A class or function within the module can be printed instead by appended a colon and the qualified name of the target object." -msgstr "به‌طور پیش‌فرض، نام یک ماژول را می‌پذیرد و کد منبع آن ماژول را چاپ می‌کند. به‌جای آن، با افزودن یک دونقطه و نام کامل شیء هدف، می‌توان یک کلاس یا تابع درون ماژول را چاپ کرد." +msgid "By default, accepts the name of a module and prints the source of that module. A class or function within the module can be printed instead by appending a colon and the qualified name of the target object." +msgstr "به طور پیش‌فرض، نام یک ماژول را می‌پذیرد و سورس آن ماژول را چاپ می‌کند. با الحاق یک دونقطه (colon) و نام کامل شیء هدف، می‌توان یک کلاس یا تابع درون ماژول را به جای آن چاپ کرد." msgid "Print information about the specified object rather than the source code" msgstr "چاپ اطلاعات درباره شیء مشخص به جای کد منبع" + +msgid "The ``--details`` option now supports basic introspection for modules without available source code and indicates when modules are frozen. It also indicates when the given target reference is not the canonical name of the referenced object." +msgstr "گزینه‌ی ``--details`` اکنون از درون‌نگری پایه‌ای برای ماژول‌های فاقد کد منبع در دسترس پشتیبانی می‌کند و زمان فریز شدن ماژول‌ها را نشان می‌دهد. همچنین نشان می‌دهد که آیا ارجاع هدف داده‌شده، نام کانونیکال شیء ارجاع‌داده‌شده نیست یا خیر." + +#~ msgid "co_lnotab" +#~ msgstr "co_lnotab" + +#~ msgid "encoded mapping of line numbers to bytecode indices" +#~ msgstr "نگاشت کدگذاری‌شده از شماره سطرها به اندیس‌های بایت‌کد" + +#~ msgid ":term:`Duck-typed ` function-like objects now return ``True`` if their code object has the :data:`CO_GENERATOR` flag." +#~ msgstr ":term:`نوع‌دهی اردکی ` شیءهای شبیه‌تابع اکنون ``True`` برمی‌گردانند اگر شیء کد آن‌ها پرچم :data:`CO_GENERATOR` را داشته باشد." + +#~ msgid ":term:`Duck-typed ` function-like objects now return ``True`` if their code object has the :data:`CO_COROUTINE` flag." +#~ msgstr ":term:`نوع‌دهی اردکی ` شیءهای شبیه‌تابع اکنون ``True`` برمی‌گردانند اگر شیء کد آن‌ها پرچم :data:`CO_COROUTINE` را داشته باشد." + +#~ msgid ":term:`Duck-typed ` function-like objects now return ``True`` if their code object has the :data:`CO_ASYNC_GENERATOR` flag." +#~ msgstr ":term:`نوع‌دهی اردکی ` شیءهای شبیه‌به‌تابع اکنون ``True`` را برمی‌گردانند اگر شیء کد آن‌ها پرچم :data:`CO_ASYNC_GENERATOR` را داشته باشد." + +#~ msgid "Get the documentation string for an object, cleaned up with :func:`cleandoc`. If the documentation string for an object is not provided and the object is a class, a method, a property or a descriptor, retrieve the documentation string from the inheritance hierarchy. Return ``None`` if the documentation string is invalid or missing." +#~ msgstr "رشته مستندات یک شیء را، پاک‌سازی‌شده با :func:`cleandoc`، دریافت کنید. اگر رشته مستندات یک شیء فراهم‌نشده باشد و آن شیء یک کلاس، یک متد، یک ویژگی یا یک توصیف‌گر باشد، رشته مستندات را از سلسله‌مراتب وراثت بازیابی کنید. اگر رشته مستندات نامعتبر یا موجود نباشد، ``None`` را برگردانید." diff --git a/library/io.po b/library/io.po index 0f0b8d91..0b01e973 100644 --- a/library/io.po +++ b/library/io.po @@ -8,12 +8,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 12:03+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -108,38 +109,23 @@ msgstr "API جریان خام به‌طور کامل در مستندات :class: msgid "Raw I/O is a low-level interface and methods generally must have their return values checked and be explicitly retried to ensure an operation completes. For instance :meth:`~RawIOBase.write` returns the number of bytes written which may be less than the number of bytes provided (a partial write). High-level I/O objects like :ref:`binary-io` and :ref:`text-io` implement retry behavior." msgstr "I/O خام یک رابط سطح پایین است و متدها معمولاً باید مقادیر بازگشتی‌شان بررسی شوند و به‌صراحت دوباره فراخوانی شوند تا از تکمیل یک عملیات اطمینان حاصل شود. برای مثال، :meth:`~RawIOBase.write` تعداد بایت‌های نوشته‌شده را برمی‌گرداند که ممکن است کمتر از تعداد بایت‌های ارائه‌شده باشد (یک نوشتن جزئی). اشیاء I/O سطح بالا مانند :ref:`binary-io` و :ref:`text-io` رفتار تلاش مجدد را پیاده‌سازی می‌کنند." -msgid "Text Encoding" +msgid "Text encoding" msgstr "کدگذاری متن" -msgid "The default encoding of :class:`TextIOWrapper` and :func:`open` is locale-specific (:func:`locale.getencoding`)." -msgstr "کدگذاری پیش‌فرض :class:`TextIOWrapper` و :func:`open` وابسته به locale است (:func:`locale.getencoding`)." - -msgid "However, many developers forget to specify the encoding when opening text files encoded in UTF-8 (e.g. JSON, TOML, Markdown, etc...) since most Unix platforms use UTF-8 locale by default. This causes bugs because the locale encoding is not UTF-8 for most Windows users. For example::" -msgstr "با این حال، بسیاری از توسعه‌دهندگان فراموش می‌کنند هنگام باز کردن پرونده‌های متنی کدگذاری‌شده با UTF-8 (مانند JSON، TOML، Markdown و غیره...) کدگذاری را مشخص کنند، زیرا بیش‌تر پلتفرم‌های یونیکسی به‌طور پیش‌فرض از تنظیمات locale با کدگذاری UTF-8 استفاده می‌کنند. این موضوع باعث ایجاد باگ می‌شود، زیرا کدگذاری تنظیمات locale برای بیش‌تر کاربران ویندوز UTF-8 نیست. برای مثال::" - -msgid "" -"# May not work on Windows when non-ASCII characters in the file.\n" -"with open(\"README.md\") as f:\n" -" long_description = f.read()" -msgstr "" -"# May not work on Windows when non-ASCII characters in the file.\n" -"with open(\"README.md\") as f:\n" -" long_description = f.read()" - -msgid "Accordingly, it is highly recommended that you specify the encoding explicitly when opening text files. If you want to use UTF-8, pass ``encoding=\"utf-8\"``. To use the current locale encoding, ``encoding=\"locale\"`` is supported since Python 3.10." -msgstr "بنابراین، به‌شدت توصیه می‌شود که هنگام باز کردن پرونده‌های متنی، کدگذاری را به‌صراحت مشخص کنید. اگر می‌خواهید از UTF-8 استفاده کنید، ``encoding=\"utf-8\"`` را ارسال کنید. برای استفاده از کدگذاری locale جاری، ``encoding=\"locale\"`` از پایتون 3.10 به بعد پشتیبانی می‌شود." +msgid "The default encoding of :class:`TextIOWrapper` and :func:`open` is UTF-8. If :ref:`Python UTF-8 Mode ` is disabled, the default encoding is locale-specific (:func:`locale.getencoding`)." +msgstr "کدگذاری پیش‌فرض :class:`TextIOWrapper` و :func:`open` برابر با UTF-8 است. اگر :ref:`حالت UTF-8 پایتون ` غیرفعال باشد، کدگذاری پیش‌فرض وابسته به محلی (locale-specific) است (:func:`locale.getencoding`)." msgid ":ref:`utf8-mode`" msgstr ":ref:`utf8-mode`" -msgid "Python UTF-8 Mode can be used to change the default encoding to UTF-8 from locale-specific encoding." -msgstr "می‌توان از حالت UTF-8 پایتون برای تغییر کدگذاری پیش‌فرض از کدگذاری وابسته به locale به UTF-8 استفاده کرد." +msgid "Python UTF-8 Mode ignores the locale encoding and forces the use of UTF-8." +msgstr "حالت UTF-8 پایتون، کدگذاری locale را نادیده می‌گیرد و استفاده از UTF-8 را اجباری می‌کند." msgid ":pep:`686`" msgstr ":pep:`686`" -msgid "Python 3.15 will make :ref:`utf8-mode` default." -msgstr "پایتون 3.15، :ref:`utf8-mode` را پیش‌فرض خواهد کرد." +msgid "Python 3.15 made :ref:`utf8-mode` the default." +msgstr "پایتون ۳.۱۵ گزینه‌ی :ref:`utf8-mode` را به عنوان پیش‌فرض قرار داد." msgid "Opt-in EncodingWarning" msgstr "فعال‌سازی اختیاری هشدار کدگذاری (EncodingWarning)" @@ -147,14 +133,14 @@ msgstr "فعال‌سازی اختیاری هشدار کدگذاری (EncodingWa msgid "See :pep:`597` for more details." msgstr "برای جزئیات بیشتر، :pep:`597` را ببینید." -msgid "To find where the default locale encoding is used, you can enable the :option:`-X warn_default_encoding <-X>` command line option or set the :envvar:`PYTHONWARNDEFAULTENCODING` environment variable, which will emit an :exc:`EncodingWarning` when the default encoding is used." -msgstr "برای یافتن این‌که کدگذاری پیش‌فرض locale کجا استفاده می‌شود، می‌توانید گزینه‌ی خط فرمان :option:`-X warn_default_encoding <-X>` را فعال کنید یا متغیر محیطی :envvar:`PYTHONWARNDEFAULTENCODING` را تنظیم کنید، که هنگام استفاده از کدگذاری پیش‌فرض، یک :exc:`EncodingWarning` نشان می‌دهد." +msgid "To find where the default encoding is used, you can enable the :option:`-X warn_default_encoding <-X>` command line option or set the :envvar:`PYTHONWARNDEFAULTENCODING` environment variable, which will emit an :exc:`EncodingWarning` when the default encoding is used." +msgstr "برای یافتن جاهایی که از کدگذاری پیش‌فرض استفاده می‌شود، می‌توانید گزینه‌ی خط فرمان :option:`-X warn_default_encoding <-X>` را فعال کنید یا متغیر محیطی :envvar:`PYTHONWARNDEFAULTENCODING` را تنظیم کنید؛ این کار هنگام استفاده از کدگذاری پیش‌فرض، یک :exc:`EncodingWarning` صادر خواهد کرد." msgid "If you are providing an API that uses :func:`open` or :class:`TextIOWrapper` and passes ``encoding=None`` as a parameter, you can use :func:`text_encoding` so that callers of the API will emit an :exc:`EncodingWarning` if they don't pass an ``encoding``. However, please consider using UTF-8 by default (i.e. ``encoding=\"utf-8\"``) for new APIs." msgstr "اگر یک API ارائه می‌دهید که از :func:`open` یا :class:`TextIOWrapper` استفاده می‌کند و ``encoding=None`` را به‌عنوان یک پارامتر ارسال می‌کند، می‌توانید از :func:`text_encoding` استفاده کنید تا فراخوانندگان آن API در صورتی که ``encoding`` را ارسال نکنند، یک :exc:`EncodingWarning` نشان می‌دهند. با این حال، لطفاً برای APIهای جدید استفاده از UTF-8 به‌صورت پیش‌فرض (یعنی ``encoding=\"utf-8\"``) را در نظر بگیرید." -msgid "High-level Module Interface" -msgstr "رابط سطح‌بالای ماژول" +msgid "High-level module interface" +msgstr "رابط ماژول سطح بالا" msgid "An int containing the default buffer size used by the module's buffered I/O classes. :func:`open` uses the file's blksize (as obtained by :func:`os.stat`) if possible." msgstr "یک عدد صحیح شامل اندازه‌ی بافر پیش‌فرضی که کلاس‌های I/O بافرشده‌ی ماژول از آن استفاده می‌کنند. :func:`open` در صورت امکان از blksize پرونده (که توسط :func:`os.stat` به دست می‌آید) استفاده می‌کند." @@ -290,8 +276,8 @@ msgstr "``detach``، ``read``، ``readline`` و ``write``" msgid "Inherited :class:`IOBase` methods, ``encoding``, ``errors``, and ``newlines``" msgstr "متدهای به‌ارث‌برده‌شده از :class:`IOBase`، ``encoding``، ``errors`` و ``newlines``" -msgid "I/O Base Classes" -msgstr "کلاس‌های پایه‌ی I/O" +msgid "I/O base classes" +msgstr "کلاس‌های پایه‌ی ورودی/خروجی" msgid "The abstract base class for all I/O classes." msgstr "کلاس پایه انتزاعی برای تمام کلاس‌های I/O." @@ -504,7 +490,7 @@ msgstr "در حالت غیرمسدودکننده، اگر داده‌ای نیا msgid "The caller may release or mutate *b* after this method returns, so the implementation should only access *b* during the method call." msgstr "فراخواننده ممکن است *b* را پس از بازگشت این متد آزاد کند یا تغییر دهد، بنابراین پیاده‌سازی باید فقط در حین فراخوانی متد به *b* دسترسی داشته باشد." -msgid "Raw File I/O" +msgid "Raw file I/O" msgstr "ورودی/خروجی خام پرونده" msgid "A raw binary stream representing an OS-level file containing bytes data. It inherits from :class:`RawIOBase` and implements its low-level access design. This means :meth:`~RawIOBase.write` does not guarantee all bytes are written and :meth:`~RawIOBase.read` may read less bytes than requested even when more bytes may be present in the underlying file. To get \"write all\" and \"read at least\" behavior, use :ref:`binary-io`." @@ -549,8 +535,8 @@ msgstr "حالت، همان‌طور که در سازنده داده شده اس msgid "The file name. This is the file descriptor of the file when no name is given in the constructor." msgstr "نام پرونده. هنگامی که در سازنده نامی داده نشده باشد، این مقدار توصیف‌گر پرونده است." -msgid "Buffered Streams" -msgstr "جریان‌های بافرشده" +msgid "Buffered streams" +msgstr "جریان‌های با میان‌گیر" msgid "Buffered I/O streams provide a higher-level interface to an I/O device than raw I/O does." msgstr "جریان‌های ورودی/خروجی بافرشده، نسبت به ورودی/خروجی خام، رابط سطح بالاتری را برای یک دستگاه ورودی/خروجی فراهم می‌کنند." @@ -561,6 +547,9 @@ msgstr "یک جریان دودویی که از یک بافر بایت در حا msgid "The optional argument *initial_bytes* is a :term:`bytes-like object` that contains initial data." msgstr "آرگومان اختیاری *initial_bytes* یک :term:`bytes-like object` است که حاوی داده‌های اولیه است." +msgid "Methods may be used from multiple threads without external locking in :term:`free-threaded builds `." +msgstr "متدها ممکن است در :term:`ساخت‌های نخ‌آزاد ` بدون قفل‌گذاری خارجی از چندین نخ استفاده شوند." + msgid ":class:`BytesIO` provides or overrides these methods in addition to those from :class:`BufferedIOBase` and :class:`IOBase`:" msgstr ":class:`BytesIO` این متدها را علاوه بر متدهای :class:`BufferedIOBase` و :class:`IOBase` ارائه می‌دهد یا بازنویسی می‌کند:" @@ -727,8 +716,8 @@ msgstr "رشته‌ی *s* را در جریان می‌نویسد و تعداد msgid "A buffered text stream providing higher-level access to a :class:`BufferedIOBase` buffered binary stream. It inherits from :class:`TextIOBase`." msgstr "یک جریان متنی بافرشده که دسترسی سطح بالاتری به یک جریان دودویی بافرشده از :class:`BufferedIOBase` فراهم می‌کند. این جریان از :class:`TextIOBase` ارث‌بری می‌کند." -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. Otherwise, it defaults to :func:`locale.getencoding`. ``encoding=\"locale\"`` can be used to specify the current locale's encoding explicitly. See :ref:`io-text-encoding` for more information." -msgstr "*encoding* نام کدگذاری‌ای را مشخص می‌کند که جریان با آن کدگشایی یا کدگذاری می‌شود. در :ref:`حالت UTF-8 `، این مقدار به‌طور پیش‌فرض UTF-8 است. در غیر این صورت، مقدار پیش‌فرض آن :func:`locale.getencoding` است. می‌توان از ``encoding=\"locale\"`` برای مشخص کردن صریح کدگذاری locale استفاده کرد. برای اطلاعات بیشتر :ref:`io-text-encoding` را ببینید." +msgid "*encoding* gives the name of the encoding that the stream will be decoded or encoded with. This defaults to UTF-8; if :ref:`UTF-8 Mode ` is disabled, it defaults to :func:`locale.getencoding`. ``encoding=\"locale\"`` can be used to specify the current locale's encoding explicitly. See :ref:`io-text-encoding` for more information." +msgstr "*encoding* نام کدگذاری‌ای را مشخص می‌کند که جریان با آن رمزگشایی یا رمزگذاری خواهد شد. این مقدار به‌طور پیش‌فرض UTF-8 است؛ اگر :ref:`UTF-8 Mode ` غیرفعال باشد، به‌طور پیش‌فرض از :func:`locale.getencoding` استفاده می‌کند. برای مشخص کردن صریح کدگذاری locale فعلی می‌توانید از ``encoding=\"locale\"`` استفاده کنید. برای اطلاعات بیشتر :ref:`io-text-encoding` را ببینید." msgid "*errors* is an optional string that specifies how encoding and decoding errors are to be handled. Pass ``'strict'`` to raise a :exc:`ValueError` exception if there is an encoding error (the default of ``None`` has the same effect), or pass ``'ignore'`` to ignore errors. (Note that ignoring encoding errors can lead to data loss.) ``'replace'`` causes a replacement marker (such as ``'?'``) to be inserted where there is malformed data. ``'backslashreplace'`` causes malformed data to be replaced by a backslashed escape sequence. When writing, ``'xmlcharrefreplace'`` (replace with the appropriate XML character reference) or ``'namereplace'`` (replace with ``\\N{...}`` escape sequences) can be used. Any other error handling name that has been registered with :func:`codecs.register_error` is also valid." msgstr "*errors* رشته‌ای اختیاری است که چگونگی مدیریت خطاهای کدگذاری و کدگشایی را مشخص می‌کند. برای پرتاب استثنای :exc:`ValueError` در صورت بروز خطای کدگذاری، ``'strict'`` را ارسال کنید (مقدار پیش‌فرض ``None`` نیز همین اثر را دارد)، یا برای نادیده گرفتن خطاها، ``'ignore'`` را ارسال کنید. (توجه داشته باشید که نادیده گرفتن خطاهای کدگذاری می‌تواند منجر به از دست رفتن داده شود.) ``'replace'`` باعث می‌شود یک نشانگر جایگزینی (مانند ``'?'``) در جایی که داده نادرست وجود دارد درج شود. ``'backslashreplace'`` باعث می‌شود داده نادرست با یک دنباله خنثی‌سازی حاوی بک‌اسلش جایگزین شود. هنگام نوشتن، می‌توان از ``'xmlcharrefreplace'`` (جایگزینی با ارجاع نویسه مناسب XML) یا ``'namereplace'`` (جایگزینی با دنباله‌های خنثی‌سازی ``\\N{...}``) استفاده کرد. هر نام مدیریت خطای دیگری که با :func:`codecs.register_error` ثبت‌شده باشد نیز معتبر است." @@ -864,8 +853,8 @@ msgstr "" msgid "A helper codec that decodes newlines for :term:`universal newlines` mode. It inherits from :class:`codecs.IncrementalDecoder`." msgstr "یک کدک کمکی که سطرهای جدید را برای حالت :term:`سطرهای جدید جهان‌شمول (universal newlines) ` کدگشایی می‌کند. این کدک از :class:`codecs.IncrementalDecoder` ارث می‌برد." -msgid "Static Typing" -msgstr "نوع‌دهی ایستا" +msgid "Static typing" +msgstr "نوع‌بندی ایستا" 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 "پروتکل‌های زیر می‌توانند برای حاشیه‌نویسی آرگومان‌های تابع و متد در عملیات ساده‌ی خواندن یا نوشتن جریان استفاده شوند. این پروتکل‌ها با :deco:`typing.runtime_checkable` آراسته شده‌اند." @@ -954,3 +943,21 @@ msgstr "کلاس io.TextIOWrapper" msgid "io.IncrementalNewlineDecoder class" msgstr "کلاس io.IncrementalNewlineDecoder" + +#~ msgid "However, many developers forget to specify the encoding when opening text files encoded in UTF-8 (e.g. JSON, TOML, Markdown, etc...) since most Unix platforms use UTF-8 locale by default. This causes bugs because the locale encoding is not UTF-8 for most Windows users. For example::" +#~ msgstr "با این حال، بسیاری از توسعه‌دهندگان فراموش می‌کنند هنگام باز کردن پرونده‌های متنی کدگذاری‌شده با UTF-8 (مانند JSON، TOML، Markdown و غیره...) کدگذاری را مشخص کنند، زیرا بیش‌تر پلتفرم‌های یونیکسی به‌طور پیش‌فرض از تنظیمات locale با کدگذاری UTF-8 استفاده می‌کنند. این موضوع باعث ایجاد باگ می‌شود، زیرا کدگذاری تنظیمات locale برای بیش‌تر کاربران ویندوز UTF-8 نیست. برای مثال::" + +#~ msgid "" +#~ "# May not work on Windows when non-ASCII characters in the file.\n" +#~ "with open(\"README.md\") as f:\n" +#~ " long_description = f.read()" +#~ msgstr "" +#~ "# May not work on Windows when non-ASCII characters in the file.\n" +#~ "with open(\"README.md\") as f:\n" +#~ " long_description = f.read()" + +#~ msgid "Accordingly, it is highly recommended that you specify the encoding explicitly when opening text files. If you want to use UTF-8, pass ``encoding=\"utf-8\"``. To use the current locale encoding, ``encoding=\"locale\"`` is supported since Python 3.10." +#~ msgstr "بنابراین، به‌شدت توصیه می‌شود که هنگام باز کردن پرونده‌های متنی، کدگذاری را به‌صراحت مشخص کنید. اگر می‌خواهید از UTF-8 استفاده کنید، ``encoding=\"utf-8\"`` را ارسال کنید. برای استفاده از کدگذاری locale جاری، ``encoding=\"locale\"`` از پایتون 3.10 به بعد پشتیبانی می‌شود." + +#~ msgid "Python UTF-8 Mode can be used to change the default encoding to UTF-8 from locale-specific encoding." +#~ msgstr "می‌توان از حالت UTF-8 پایتون برای تغییر کدگذاری پیش‌فرض از کدگذاری وابسته به locale به UTF-8 استفاده کرد." diff --git a/library/itertools.po b/library/itertools.po index dc1106f6..2ddfb4ef 100644 --- a/library/itertools.po +++ b/library/itertools.po @@ -8,12 +8,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 08:58+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -453,6 +454,9 @@ msgstr "" " for iterable in iterables:\n" " yield from iterable" +msgid "Note that :ref:`unpacking in comprehensions ` provides similar functionality so that ``list(chain(p, q))`` could be written as ``[*s for s in (p, q)]``." +msgstr "توجه داشته باشید که :ref:`unpacking in comprehensions ` قابلیت مشابه‌ای را فراهم می‌کند؛ به‌طوری‌که ``list(chain(p, q))`` را می‌توان به صورت ``[*s for s in (p, q)]`` نوشت." + msgid "Alternate constructor for :func:`chain`. Gets chained inputs from a single iterable argument that is evaluated lazily. Roughly equivalent to::" msgstr "سازنده جایگزین برای :func:`chain`. ورودی‌های زنجیره‌شده را از یک آرگومان پیمایش‌پذیر واحد که به‌صورت تنبلانه ارزیابی می‌شود، دریافت می‌کند. تقریباً معادل است با::" @@ -467,6 +471,9 @@ msgstr "" " for iterable in iterables:\n" " yield from iterable" +msgid "Note that :ref:`unpacking in comprehensions ` provides similar functionality so that ``list(chain.from_iterable(iterables))`` could be written as ``[*s for s in iterables]``." +msgstr "توجه داشته باشید که :ref:`unpacking in comprehensions ` قابلیت مشابه‌ای را فراهم می‌کند؛ به‌طوری‌که ``list(chain.from_iterable(iterables))`` را می‌توان به صورت ``[*s for s in iterables]`` نوشت." + msgid "Return *r* length subsequences of elements from the input *iterable*." msgstr "بازگرداندن زیردنباله‌هایی به طول *r* از عناصرِ *iterable* ورودی." diff --git a/library/json.po b/library/json.po index eb353524..802c2a8f 100644 --- a/library/json.po +++ b/library/json.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-21 15:40+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -321,6 +322,9 @@ msgstr "اگر تنظیم شود، تابعی است که با نتیجه‌ی msgid "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 "در صورت تنظیم، تابعی است که با نتیجه‌ی کدگشایی هر شیء JSON به‌صورت یک فهرست مرتب از جفت‌ها فراخوانی می‌شود. مقدار بازگشتی این تابع به‌جای :class:`dict` استفاده خواهد شد. می‌توان از این قابلیت برای پیاده‌سازی کدگشاهای سفارشی استفاده کرد. اگر *object_hook* نیز تنظیم شده باشد، *object_pairs_hook* اولویت دارد. پیش‌فرض ``None``." +msgid "If set, a function that is called with the result of any JSON array literal decoded with as a Python list. The return value of this function will be used instead of the :class:`list`. This feature can be used to implement custom decoders. Default ``None``." +msgstr "اگر تنظیم شود، تابعی است که با نتیجه‌ی هر آرایه‌ی JSON رمزگشایی‌شده به عنوان یک فهرست پایتون فراخوانی می‌شود. مقدار بازگشتی این تابع به جای :class:`list` استفاده خواهد شد. از این ویژگی می‌توان برای پیاده‌سازی رمزگشاهای سفارشی استفاده کرد. مقدار پیش‌فرض ``None`` است." + 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)``. This can be used to parse JSON floats into custom datatypes, for example :class:`decimal.Decimal`." msgstr "اگر تنظیم‌شده باشد، تابعی است که با رشته‌ی هر شناور JSON برای کدگشایی فراخوانی می‌شود. اگر ``None`` (پیش‌فرض) باشد، معادل ``float(num_str)`` است. این می‌تواند برای تجزیه‌ی شناورهای JSON به انواع داده سفارشی استفاده شود، برای مثال :class:`decimal.Decimal`." @@ -351,6 +355,9 @@ msgstr "*fp* اکنون می‌تواند یک :term:`پرونده دودویی 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 "مقدار پیش‌فرض *parse_int* یعنی :func:`int` اکنون حداکثر طول رشته‌ی عدد صحیح را از طریق :ref:`محدودیت طول تبدیل رشته‌ی عدد صحیح ` مفسر محدود می‌کند تا به جلوگیری از حملات منع سرویس کمک کند." +msgid "Added the optional *array_hook* parameter." +msgstr "پارامتر اختیاری *array_hook* اضافه شد." + msgid "Identical to :func:`load`, but instead of a file-like object, deserialize *s* (a :class:`str`, :class:`bytes` or :class:`bytearray` instance containing a JSON document) to a Python object using this :ref:`conversion table `." msgstr "کاملاً مشابه :func:`load` است، اما به‌جای یک شیء شبه‌پرونده، *s* (نمونه‌ای از :class:`str`، :class:`bytes` یا :class:`bytearray` که حاوی یک سند JSON است) را با استفاده از این :ref:`جدول تبدیل ` به یک شیء پایتون تبدیل (deserialize) می‌کند." @@ -435,6 +442,12 @@ msgstr "*object_pairs_hook* یک تابع اختیاری است که با نتی msgid "Added support for *object_pairs_hook*." msgstr "پشتیبانی از *object_pairs_hook* افزوده شد." +msgid "*array_hook* is an optional function that will be called with the result of every JSON array decoded as a list. The return value of *array_hook* will be used instead of the :class:`list`. This feature can be used to implement custom decoders." +msgstr "*array_hook* تابعی اختیاری است که با نتیجه‌ی هر آرایه‌ی JSON رمزگشایی‌شده به عنوان یک فهرست فراخوانی می‌شود. مقدار بازگشتی *array_hook* به جای :class:`list` استفاده خواهد شد. از این ویژگی می‌توان برای پیاده‌سازی رمزگشاهای سفارشی استفاده کرد." + +msgid "Added support for *array_hook*." +msgstr "پشتیبانی از *array_hook* اضافه شد." + 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 ``float(num_str)``. This can be used to use another datatype or parser for JSON floats (e.g. :class:`decimal.Decimal`)." msgstr "*parse_float* یک تابع اختیاری است که با رشته‌ی هر عدد اعشاری JSON که کدگشایی می‌شود، فراخوانی خواهد شد. به‌طور پیش‌فرض، این معادل ``float(num_str)`` است. می‌توان از آن برای استفاده از یک نوع داده یا پارسر دیگر برای اعداد اعشاری JSON استفاده کرد (برای مثال :class:`decimal.Decimal`)." @@ -471,6 +484,9 @@ msgstr "کدگذار JSON توسعه‌پذیر برای ساختارهای دا msgid "Supports the following objects and types by default:" msgstr "به‌طور پیش‌فرض از اشیاء و انواع زیر پشتیبانی می‌کند:" +msgid "dict, frozendict" +msgstr "dict, frozendict" + msgid "list, tuple" msgstr "فهرست، تاپل" @@ -483,6 +499,9 @@ msgstr "عدد" msgid "Added support for int- and float-derived Enum classes." msgstr "پشتیبانی از کلاس‌های Enum مشتق‌شده از int و float افزوده شد." +msgid "Added support for :class:`frozendict`." +msgstr "پشتیبانی از :class:`frozendict` اضافه شد." + msgid "To extend this to recognize other objects, subclass and implement a :meth:`~JSONEncoder.default` method with another method that returns a serializable object for ``o`` if possible, otherwise it should call the superclass implementation (to raise :exc:`TypeError`)." msgstr "برای گسترش آن جهت شناسایی اشیاء دیگر، یک زیرکلاس بسازید و متد :meth:`~JSONEncoder.default` را با متد دیگری پیاده‌سازی کنید که در صورت امکان یک شیء قابل سریال‌سازی برای ``o`` برمی‌گرداند؛ در غیر این صورت باید پیاده‌سازی ابرکلاس را فراخوانی کند (تا :exc:`TypeError` پرتاب شود)." diff --git a/library/locale.po b/library/locale.po index 7b277237..67f0ce26 100644 --- a/library/locale.po +++ b/library/locale.po @@ -8,12 +8,13 @@ # Rafael Fontenelle , 2025 # Gigahertz ., 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 08:55+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -45,8 +46,8 @@ msgstr "استثنایی که در صورت شناسایی نشدن تنظیما msgid "If *locale* is given and not ``None``, :func:`setlocale` modifies the locale setting for the *category*. The available categories are listed in the data description below. *locale* may be a :ref:`string `, or a pair, language code and encoding. An empty string specifies the user's default settings. If the modification of the locale fails, the exception :exc:`Error` is raised. If successful, the new locale setting is returned." msgstr "اگر *locale* داده شده باشد و ``None`` نباشد، :func:`setlocale` تنظیمات locale را برای *category* تغییر می‌دهد. دسته‌های موجود در توضیحات داده‌های زیر فهرست شده‌اند. *locale* می‌تواند یک :ref:`رشته `، یا جفتی از کد زبان و کدگذاری باشد. یک رشته خالی تنظیمات پیش‌فرض کاربر را مشخص می‌کند. اگر تغییر تنظیمات locale ناموفق باشد، استثنای :exc:`Error` پرتاب می‌شود. در صورت موفقیت، تنظیمات locale جدید برگردانده می‌شود." -msgid "If *locale* is a pair, it is converted to a locale name using the locale aliasing engine. The language code has the same format as a :ref:`locale name `, but without encoding and ``@``-modifier. The language code and encoding can be ``None``." -msgstr "اگر *locale* یک جفت باشد، با استفاده از موتور نام‌مستعارسازی locale به یک نام locale تبدیل می‌شود. کد زبان همان قالب یک :ref:`نام locale ` را دارد، اما بدون کدگذاری و اصلاح‌کننده ``@``. کد زبان و کدگذاری می‌توانند ``None`` باشند." +msgid "If *locale* is a pair, it is converted to a locale name using the locale aliasing engine. The language code has the same format as a :ref:`locale name `, but without encoding. The language code and encoding can be ``None``." +msgstr "اگر *locale* یک جفت باشد، با استفاده از موتور نام‌گذاری مستعار locale به نام locale تبدیل می‌شود. کد زبان فرمتی مشابه :ref:`locale name ` دارد، اما بدون کدگذاری است. کد زبان و کدگذاری می‌توانند ``None`` باشند." msgid "If *locale* is omitted or ``None``, the current setting for *category* is returned." msgstr "اگر *locale* حذف شود یا ``None`` باشد، تنظیم فعلی *category* برگردانده می‌شود." @@ -86,6 +87,9 @@ msgstr "" msgid "This sets the locale for all categories to the user's default setting (typically specified in the :envvar:`LANG` environment variable). If the locale is not changed thereafter, using multithreading should not cause problems." msgstr "این کار تنظیمات locale را برای تمام دسته‌ها روی تنظیم پیش‌فرض کاربر قرار می‌دهد (که معمولاً در متغیر محیطی :envvar:`LANG` مشخص شده است). اگر تنظیمات locale پس از آن تغییر نکند، استفاده از چندنخی نباید مشکلی ایجاد کند." +msgid "Support language codes with ``@``-modifiers." +msgstr "پشتیبانی از کدهای زبان با اصلاح‌گرهای ``@``." + msgid "Returns the database of the local conventions as a dictionary. This dictionary has the following strings as keys:" msgstr "پایگاه داده‌ی قراردادهای محلی را به‌صورت یک دیکشنری برمی‌گرداند. این دیکشنری رشته‌های زیر را به‌عنوان کلید دارد:" @@ -344,6 +348,12 @@ msgstr "کد زبان همان قالب :ref:`locale name ` را د msgid "Returns the current setting for the given locale category as a tuple containing the language code and encoding. *category* may be one of the :const:`!LC_\\*` values except :const:`LC_ALL`. It defaults to :const:`LC_CTYPE`." msgstr "تنظیم فعلی دسته‌بندی locale داده‌شده را به‌صورت یک تاپل شامل کد زبان و کدگذاری برمی‌گرداند. *category* می‌تواند یکی از مقادیر :const:`!LC_\\*`، به‌جز :const:`LC_ALL` باشد. پیش‌فرض آن :const:`LC_CTYPE` است." +msgid "The language code has the same format as a :ref:`locale name `, but without encoding. The language code and encoding may be ``None`` if their values cannot be determined. The \"C\" locale is represented as ``(None, None)``." +msgstr "کد زبان فرمتی مشابه :ref:`locale name ` دارد، اما بدون کدگذاری است. اگر مقادیر کد زبان و کدگذاری قابل تعیین نباشند، ممکن است ``None`` باشند. locale مقدار «C» به صورت ``(None, None)`` نمایش داده می‌شود." + +msgid "``@``-modifier are no longer silently removed, but included in the language code." +msgstr "اصلاح‌گرهای ``@`` دیگر به‌طور بی‌صدا حذف نمی‌شوند، بلکه در کد زبان گنجانده می‌شوند." + msgid "Return the :term:`locale encoding` used for text data, according to user preferences. User preferences are expressed differently on different systems, and might not be available programmatically on some systems, so this function only returns a guess." msgstr ":term:`locale encoding` مورد استفاده برای داده‌های متنی را، بر اساس ترجیحات کاربر، برمی‌گرداند. ترجیحات کاربر در سیستم‌های مختلف به‌شکل متفاوتی بیان می‌شوند و ممکن است در برخی سیستم‌ها به‌صورت برنامه‌ای در دسترس نباشند، بنابراین این تابع تنها یک حدس را برمی‌گرداند." diff --git a/library/logging.po b/library/logging.po index 0739b82a..8fbfdd00 100644 --- a/library/logging.po +++ b/library/logging.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 10:00+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -980,8 +981,8 @@ msgstr "اگر هیچ مقدار عددی یا رشته‌ای متناظری ا msgid "Levels are internally integers (as they need to be compared in the logging logic). This function is used to convert between an integer level and the level name displayed in the formatted log output by means of the ``%(levelname)s`` format specifier (see :ref:`logrecord-attributes`), and vice versa." msgstr "سطح‌ها به‌صورت داخلی اعداد صحیح هستند (زیرا باید در منطق گزارش‌گیری مقایسه شوند). این تابع برای تبدیل میان یک سطح عدد صحیح و نام سطحی استفاده می‌شود که در خروجی گزارش قالب‌بندی‌شده به‌وسیله‌ی مشخص‌کننده‌ی قالب ``%(levelname)s`` نمایش داده می‌شود (به :ref:`logrecord-attributes` مراجعه کنید)، و برعکس." -msgid "In Python versions earlier than 3.4, this function could also be passed a text level, and would return the corresponding numeric value of the level. This undocumented behaviour was considered a mistake, and was removed in Python 3.4, but reinstated in 3.4.2 due to retain backward compatibility." -msgstr "در نسخه‌های پیش از 3.4 پایتون، این تابع همچنین می‌توانست یک سطح متنی را بپذیرد و مقدار عددی متناظر آن سطح را برمی‌گرداند. این رفتار بدون مستند، یک اشتباه تلقی می‌شد و در پایتون 3.4 حذف شد، اما در 3.4.2 برای حفظ سازگاری با نسخه‌های پیشین بازگردانده شد." +msgid "In Python versions earlier than 3.4, this function could also be passed a text level, and would return the corresponding numeric value of the level. This undocumented behaviour was considered a mistake, and was removed in Python 3.4, but reinstated in 3.4.2 in order to retain backward compatibility." +msgstr "در نسخه‌های پایتون قبل از ۳.۴، این تابع می‌توانست یک سطح متنی نیز دریافت کند و مقدار عددی متناظر با آن سطح را بازگرداند. این رفتار مستندسازه‌نشده یک اشتباه در نظر گرفته شد و در پایتون ۳.۴ حذف گردید، اما به منظور حفظ سازگاری عقبگرد در نسخه‌ی ۳.۴.۲ مجدداً بازگردانده شد." msgid "Returns a handler with the specified *name*, or ``None`` if there is no handler with that name." msgstr "یک هندلر با *name* مشخص‌شده برمی‌گرداند، یا اگر هندلری با آن نام وجود نداشته باشد ``None`` برمی‌گرداند." @@ -992,8 +993,8 @@ msgstr "یک مجموعه تغییرناپذیر از تمام نام‌های msgid "Creates and returns a new :class:`LogRecord` instance whose attributes are defined by *attrdict*. This function is useful for taking a pickled :class:`LogRecord` attribute dictionary, sent over a socket, and reconstituting it as a :class:`LogRecord` instance at the receiving end." msgstr "یک نمونه جدید از :class:`LogRecord` را ایجاد می‌کند و برمی‌گرداند که ویژگی‌های آن توسط *attrdict* تعریف شده‌اند. این تابع برای گرفتن یک دیکشنری ویژگی‌های :class:`LogRecord` که پیکل‌شده و از طریق یک سوکت ارسال شده است، و بازسازی آن به‌عنوان یک نمونه از :class:`LogRecord` در سمت گیرنده مفید است." -msgid "Does basic configuration for the logging system by creating a :class:`StreamHandler` with a default :class:`Formatter` and adding it to the root logger. The functions :func:`debug`, :func:`info`, :func:`warning`, :func:`error` and :func:`critical` will call :func:`basicConfig` automatically if no handlers are defined for the root logger." -msgstr "پیکربندی پایه‌ی سیستم گزارش‌گیری را با ایجاد یک :class:`StreamHandler` با یک :class:`Formatter` پیش‌فرض و افزودن آن به گزارش‌گیر ریشه انجام می‌دهد. توابع :func:`debug`، :func:`info`، :func:`warning`، :func:`error` و :func:`critical` اگر هیچ هندلری برای گزارش‌گیر ریشه تعریف نشده باشد، به‌طور خودکار :func:`basicConfig` را فراخوانی می‌کنند." +msgid "Does basic configuration for the logging system by either creating a :class:`StreamHandler` with a default :class:`Formatter` or using the given *formatter* instance, and adding it to the root logger. The functions :func:`debug`, :func:`info`, :func:`warning`, :func:`error` and :func:`critical` will call :func:`basicConfig` automatically if no handlers are defined for the root logger." +msgstr "پیکربندی پایه‌ای را برای سیستم گزارش‌گیری با ایجاد یک :class:`StreamHandler` به همراه یک :class:`Formatter` پیش‌فرض یا با استفاده از نمونه‌ی *formatter* داده‌شده و افزودن آن به گزارش‌گیر ریشه انجام می‌دهد. توابع :func:`debug`، :func:`info`، :func:`warning`، :func:`error` و :func:`critical` در صورتی که هیچ هندلری برای گزارش‌گیر ریشه تعریف نشده باشد، :func:`basicConfig` را به‌طور خودکار فراخوانی خواهند کرد." msgid "This function does nothing if the root logger already has handlers configured, unless the keyword argument *force* is set to ``True``." msgstr "اگر گزارش‌گیر ریشه از قبل هندلرهایی پیکربندی‌شده داشته باشد، این تابع کاری انجام نمی‌دهد، مگر اینکه آرگومان کلیدواژه‌ای *force* بر روی ``True`` تنظیم شده باشد." @@ -1070,6 +1071,12 @@ msgstr "*errors*" msgid "If this keyword argument is specified along with *filename*, its value is used when the :class:`FileHandler` is created, and thus used when opening the output file. If not specified, the value 'backslashreplace' is used. Note that if ``None`` is specified, it will be passed as such to :func:`open`, which means that it will be treated the same as passing 'errors'." msgstr "اگر این آرگومان کلیدواژه‌ای به همراه *filename* مشخص شده باشد، مقدار آن در زمان ایجاد :class:`FileHandler` استفاده می‌شود و بنابراین در زمان باز کردن پرونده خروجی نیز استفاده می‌شود. اگر مشخص نشده باشد، مقدار 'backslashreplace' استفاده می‌شود. توجه داشته باشید که اگر ``None`` مشخص شود، به همان صورت به :func:`open` ارسال می‌شود، به این معنا که همانند ارسال 'errors' با آن رفتار خواهد شد." +msgid "*formatter*" +msgstr "*formatter*" + +msgid "If specified, set this formatter instance (see :ref:`formatter-objects`) for all involved handlers. If not specified, the default is to create and use an instance of :class:`logging.Formatter` based on arguments *format*, *datefmt* and *style*. When *formatter* is specified together with any of the three arguments *format*, *datefmt* and *style*, a ``ValueError`` is raised to signal that these arguments would lose meaning otherwise." +msgstr "اگر مشخص شود، این نمونه‌ی قالب‌بند (نگاه کنید به :ref:`formatter-objects`) را برای تمام هندلرهای درگیر تنظیم می‌کند. اگر مشخص نشود، رفتار پیش‌فرض این است که یک نمونه از :class:`logging.Formatter` بر اساس آرگومان‌های *format*، *datefmt* و *style* ایجاد و استفاده شود. هنگامی که *formatter* به همراه هر یک از سه آرگومان *format*، *datefmt* و *style* مشخص شود، یک ``ValueError`` بالا آورده می‌شود تا اعلام کند که این آرگومان‌ها در غیر این صورت معنای خود را از دست خواهند داد." + msgid "The *style* argument was added." msgstr "آرگومان *style* افزوده شد." @@ -1082,6 +1089,9 @@ msgstr "آرگومان *force* افزوده شد." msgid "The *encoding* and *errors* arguments were added." msgstr "آرگومان‌های *encoding* و *errors* افزوده شدند." +msgid "The *formatter* argument was added." +msgstr "آرگومان *formatter* اضافه شد." + msgid "Informs the logging system to perform an orderly shutdown by flushing and closing all handlers. This should be called at application exit and no further use of the logging system should be made after this call." msgstr "به سیستم گزارش‌گیری اطلاع می‌دهد تا با تخلیه و بستن همه‌ی هندلرها، یک خاموش‌سازی منظم را انجام دهد. این باید در زمان خروج برنامه فراخوانی شود و پس از این فراخوانی، نباید هیچ استفاده‌ی دیگری از سیستم گزارش‌گیری صورت گیرد." diff --git a/library/mailbox.po b/library/mailbox.po index df55aeb8..feaebe2d 100644 --- a/library/mailbox.po +++ b/library/mailbox.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 09:15+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -63,6 +64,12 @@ msgstr ":term:`پیمایش‌گر ` پیش‌فرض :class:`!Mailbox` msgid "Be very cautious when modifying mailboxes that might be simultaneously changed by some other process. The safest mailbox format to use for such tasks is :class:`Maildir`; try to avoid using single-file formats such as :class:`mbox` for concurrent writing. If you're modifying a mailbox, you *must* lock it by calling the :meth:`lock` and :meth:`unlock` methods *before* reading any messages in the file or making any changes by adding or deleting a message. Failing to lock the mailbox runs the risk of losing messages or corrupting the entire mailbox." msgstr "هنگام تغییر صندوق‌های پستی که ممکن است همزمان توسط فرایند دیگری تغییر کنند، بسیار محتاط باشید. امن‌ترین قالب صندوق پستی برای استفاده در چنین وظایفی :class:`Maildir` است؛ سعی کنید برای نوشتن همزمان از قالب‌های تک‌پرونده‌ای مانند :class:`mbox` اجتناب کنید. اگر در حال تغییر یک صندوق پستی هستید، *باید* *پیش از* خواندن هر پیامی در پرونده یا ایجاد هرگونه تغییر از طریق افزودن یا حذف یک پیام، آن را با فراخوانی متدهای :meth:`lock` و :meth:`unlock` قفل کنید. عدم قفل کردن صندوق پستی خطر از دست رفتن پیام‌ها یا خراب شدن کل صندوق پستی را به همراه دارد." +msgid "The :class:`!Mailbox` class supports the :keyword:`with` statement. When used as a context manager, :class:`!Mailbox` calls :meth:`lock` when the context is entered, returns the mailbox object as the context object, and at context end calls :meth:`close`, thereby releasing the lock." +msgstr "کلاس :class:`!Mailbox` از دستور :keyword:`with` پشتیبانی می‌کند. هنگامی که به عنوان یک مدیر زمینه استفاده می‌شود، :class:`!Mailbox` هنگام ورود به زمینه، :meth:`lock` را فراخوانی می‌کند، شیء صندوق پستی را به عنوان شیء زمینه برمی‌گرداند و در پایان زمینه، :meth:`close` را فراخوانی می‌کند و در نتیجه قفل را آزاد می‌کند." + +msgid "Support for the :keyword:`with` statement was added." +msgstr "پشتیبانی از دستور :keyword:`with` اضافه شد." + msgid ":class:`!Mailbox` instances have the following methods:" msgstr "نمونه‌های :class:`!Mailbox` متدهای زیر را دارند:" diff --git a/library/marshal.po b/library/marshal.po index 1808ab12..d6b15176 100644 --- a/library/marshal.po +++ b/library/marshal.po @@ -8,12 +8,13 @@ # Mehdi Batani, 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 12:15+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -48,8 +49,8 @@ msgstr "انواع عددی: :class:`int`، :class:`bool`، :class:`float`، :cl msgid "Strings (:class:`str`) and :class:`bytes`. :term:`Bytes-like objects ` like :class:`bytearray` are marshalled as :class:`!bytes`." msgstr "رشته‌ها (:class:`str`) و :class:`bytes`. :term:`اشیاء شبه‌بایت ` مانند :class:`bytearray` به‌صورت :class:`!bytes` مارشال (marshalled) می‌شوند." -msgid "Containers: :class:`tuple`, :class:`list`, :class:`set`, :class:`frozenset`, and (since :data:`version` 5), :class:`slice`. It should be understood that these are supported only if the values contained therein are themselves supported. Recursive containers are supported since :data:`version` 3." -msgstr "ظرف‌ها: :class:`tuple`، :class:`list`، :class:`set`، :class:`frozenset` و :class:`slice` (از :data:`version` 5). باید توجه داشته باشید که این موارد تنها در صورتی پشتیبانی می‌شوند که مقادیر درون آن‌ها نیز پشتیبانی شوند. ظرف‌های بازگشتی از :data:`version` 3 پشتیبانی می‌شوند." +msgid "Containers: :class:`tuple`, :class:`list`, :class:`dict`, :class:`frozendict` (since :data:`version` 6), :class:`set`, :class:`frozenset`, and :class:`slice` (since :data:`version` 5). It should be understood that these are supported only if the values contained therein are themselves supported. Recursive containers are supported since :data:`version` 3." +msgstr "ظرف‌ها: :class:`tuple`، :class:`list`، :class:`dict`، :class:`frozendict` (از :data:`version` ۶ به بعد)، :class:`set`، :class:`frozenset` و :class:`slice` (از :data:`version` ۵ به بعد). باید توجه داشت که این موارد تنها در صورتی پشتیبانی می‌شوند که مقادیر درون آن‌ها نیز خودشان پشتیبانی شوند. ظرف‌های بازگشتی از :data:`version` ۳ به بعد پشتیبانی می‌شوند." msgid "The singletons :const:`None`, :const:`Ellipsis` and :exc:`StopIteration`." msgstr "مقادیر تک‌نمونه :const:`None`، :const:`Ellipsis` و :exc:`StopIteration`." @@ -66,6 +67,9 @@ msgstr "نسخه‌ی 4 قالب افزوده شد، که از بازنمایی msgid "Added format version 5, which allows marshalling slices." msgstr "نسخه‌ی 5 قالب افزوده شد که امکان مارشال‌کردن اسلایس‌ها را فراهم می‌کند." +msgid "Added format version 6, which allows marshalling :class:`frozendict`." +msgstr "نسخه‌ی فرمت ۶ اضافه شد که امکان مارشال کردن :class:`frozendict` را فراهم می‌کند." + msgid "The module defines these functions:" msgstr "این ماژول توابع زیر را تعریف می‌کند:" @@ -168,6 +172,15 @@ msgstr "Python 3.14" msgid "Support for :class:`slice` objects" msgstr "پشتیبانی از اشیاء :class:`slice`" +msgid "6" +msgstr "۶" + +msgid "Python 3.15" +msgstr "پایتون ۳.۱۵" + +msgid "Support for :class:`frozendict` objects" +msgstr "پشتیبانی از اشیای :class:`frozendict`" + msgid "Footnotes" msgstr "پانویس‌ها" diff --git a/library/math.integer.po b/library/math.integer.po new file mode 100644 index 00000000..9f55fec2 --- /dev/null +++ b/library/math.integer.po @@ -0,0 +1,66 @@ +# Persian translations for Python package. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# Automatically generated, 2026. +# +# Translators: +# Sepehr Rasouli , 2026 +# arman mohebali , 2026 +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-01 14:41+0330\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: fa\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid ":mod:`!math.integer` --- integer-specific mathematics functions" +msgstr ":mod:`!math.integer` --- توابع ریاضی مختص اعداد صحیح" + +msgid "This module provides access to the mathematical functions defined for integer arguments. These functions accept integers and objects that implement the :meth:`~object.__index__` method which is used to convert the object to an integer number." +msgstr "این ماژول دسترسی به توابع ریاضی تعریف‌شده برای آرگومان‌های عدد صحیح را فراهم می‌کند. این توابع، اعداد صحیح و اشیایی را می‌پذیرند که متد :meth:`~object.__index__` را پیاده‌سازی کرده‌اند؛ این متد برای تبدیل کردن شیء به یک عدد صحیح استفاده می‌شود." + +msgid "The following functions are provided by this module. All return values are computed exactly and are integers." +msgstr "توابع زیر توسط این ماژول فراهم شده‌اند. تمام مقادیر بازگشتی به‌طور دقیق محاسبه می‌شوند و عدد صحیح هستند." + +msgid "Return the number of ways to choose *k* items from *n* items without repetition and without order." +msgstr "تعداد روش‌های انتخاب *k* آیتم از میان *n* آیتم بدون تکرار و بدون در نظر گرفتن ترتیب را برمی‌گرداند." + +msgid "Evaluates to ``n! / (k! * (n - k)!)`` when ``k <= n`` and evaluates to zero when ``k > n``." +msgstr "هنگامی که ``k <= n`` باشد به ``n! / (k! * (n - k)!)`` و هنگامی که ``k > n`` باشد به صفر ارزیابی می‌شود." + +msgid "Also called the binomial coefficient because it is equivalent to the coefficient of k-th term in polynomial expansion of ``(1 + x)ⁿ``." +msgstr "همچنین ضریب دو جمله‌ای نامیده می‌شود؛ زیرا معادل ضریب جمله‌ی kام در انبساه چندجمله‌ای ``(1 + x)ⁿ`` است." + +msgid "Raises :exc:`ValueError` if either of the arguments are negative." +msgstr "اگر هر یک از آرگومان‌ها منفی باشند، خطای :exc:`ValueError` را بالا می‌آورد." + +msgid "Return factorial of the nonnegative integer *n*." +msgstr "فاکتوریل عدد صحیح نامنفی *n* را برمی‌گرداند." + +msgid "Return the greatest common divisor of the specified integer arguments. If any of the arguments is nonzero, then the returned value is the largest positive integer that is a divisor of all arguments. If all arguments are zero, then the returned value is ``0``. ``gcd()`` without arguments returns ``0``." +msgstr "بزرگ‌ترین مقسوم‌علیه مشترک آرگومان‌های عدد صحیح مشخص‌شده را برمی‌گرداند. اگر هر یک از آرگومان‌ها ناصفر باشند، مقدار بازگشتی بزرگ‌ترین عدد صحیح مثبتی است که مقسوم‌علیه همه آرگومان‌ها باشد. اگر همه آرگومان‌ها صفر باشند، مقدار بازگشتی ``0`` خواهد بود. تابع ``gcd()`` بدون آرگومان، مقدار ``0`` را برمی‌گرداند." + +msgid "Return the integer square root of the nonnegative integer *n*. This is the floor of the exact square root of *n*, or equivalently the greatest integer *a* such that *a*\\ ² |nbsp| ≤ |nbsp| *n*." +msgstr "جذر صحیح عدد صحیح نامنفی *n* را برمی‌گرداند. این مقدار، کفِ جذر دقیق *n*، یا به عبارت معادل، بزرگ‌ترین عدد صحیح *a* است به‌طوری‌که *a*\\ ² |nbsp| ≤ |nbsp| *n* باشد." + +msgid "For some applications, it may be more convenient to have the least integer *a* such that *n* |nbsp| ≤ |nbsp| *a*\\ ², or in other words the ceiling of the exact square root of *n*. For positive *n*, this can be computed using ``a = 1 + isqrt(n - 1)``." +msgstr "برای برخی برنامه‌ها، ممکن است راحت‌تر باشد که کوچک‌ترین عدد صحیح *a* را داشته باشیم به‌طوری‌که *n* |nbsp| ≤ |nbsp| *a*\\ ² باشد، یا به عبارت دیگر سقف جذر دقیق *n* است. برای *n* مثبت، این مقدار را می‌توان با استفاده از ``a = 1 + isqrt(n - 1)`` محاسبه کرد." + +msgid "Return the least common multiple of the specified integer arguments. If all arguments are nonzero, then the returned value is the smallest positive integer that is a multiple of all arguments. If any of the arguments is zero, then the returned value is ``0``. ``lcm()`` without arguments returns ``1``." +msgstr "کوچک‌ترین مضرب مشترک آرگومان‌های عدد صحیح مشخص‌شده را برمی‌گرداند. اگر همه آرگومان‌ها ناصفر باشند، مقدار بازگشتی کوچک‌ترین عدد صحیح مثبتی است که مضربی از همه آرگومان‌ها باشد. اگر هر یک از آرگومان‌ها صفر باشند، مقدار بازگشتی ``0`` خواهد بود. تابع ``lcm()`` بدون آرگومان، مقدار ``1`` را برمی‌گرداند." + +msgid "Return the number of ways to choose *k* items from *n* items without repetition and with order." +msgstr "تعداد روش‌های انتخاب *k* آیتم از میان *n* آیتم بدون تکرار و با در نظر گرفتن ترتیب را برمی‌گرداند." + +msgid "Evaluates to ``n! / (n - k)!`` when ``k <= n`` and evaluates to zero when ``k > n``." +msgstr "هنگامی که ``k <= n`` باشد به ``n! / (n - k)!`` و هنگامی که ``k > n`` باشد به صفر ارزیابی می‌شود." + +msgid "If *k* is not specified or is ``None``, then *k* defaults to *n* and the function returns ``n!``." +msgstr "اگر *k* مشخص نشده باشد یا ``None`` باشد، به طور پیش‌فرض *k* برابر با *n* در نظر گرفته می‌شود و تابع ``n!`` را برمی‌گرداند." diff --git a/library/math.po b/library/math.po index c3df4427..3e77aa78 100644 --- a/library/math.po +++ b/library/math.po @@ -8,12 +8,13 @@ # Parham Forati, 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 12:04+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -36,45 +37,6 @@ msgstr "این توابع نمی‌توانند با اعداد مختلط اس msgid "The following functions are provided by this module. Except when explicitly noted otherwise, all return values are floats." msgstr "توابع زیر توسط این ماژول ارائه شده‌اند. مگر آنکه صریحاً غیر از این ذکر شده باشد، تمام مقادیر بازگشتی از نوع float هستند." -msgid "**Number-theoretic functions**" -msgstr "توابع نظریه‌ی اعداد" - -msgid ":func:`comb(n, k) `" -msgstr ":func:`comb(n, k) `" - -msgid "Number of ways to choose *k* items from *n* items without repetition and without order" -msgstr "تعداد راه‌های انتخاب *k* آیتم از *n* آیتم بدون تکرار و بدون ترتیب" - -msgid ":func:`factorial(n) `" -msgstr ":func:`factorial(n) `" - -msgid "*n* factorial" -msgstr "فاکتوریل *n*" - -msgid ":func:`gcd(*integers) `" -msgstr ":func:`gcd(*integers) `" - -msgid "Greatest common divisor of the integer arguments" -msgstr "بزرگ‌ترین مقسوم‌علیه مشترک آرگومان‌های عدد صحیح" - -msgid ":func:`isqrt(n) `" -msgstr ":func:`isqrt(n) `" - -msgid "Integer square root of a nonnegative integer *n*" -msgstr "جذر صحیح عدد صحیح نامنفی *n*" - -msgid ":func:`lcm(*integers) `" -msgstr ":func:`lcm(*integers) `" - -msgid "Least common multiple of the integer arguments" -msgstr "کمترین مضرب مشترک آرگومان‌های عدد صحیح" - -msgid ":func:`perm(n, k) `" -msgstr ":func:`perm(n, k) `" - -msgid "Number of ways to choose *k* items from *n* items without repetition and with order" -msgstr "تعداد راه‌های انتخاب *k* آیتم از *n* آیتم بدون تکرار و با ترتیب" - msgid "**Floating point arithmetic**" msgstr "محاسبات ممیز شناور" @@ -102,6 +64,18 @@ msgstr ":func:`fma(x, y, z) `" msgid "Fused multiply-add operation: ``(x * y) + z``" msgstr "عملیات ضرب-جمع ادغام‌شده (fused multiply-add): ``(x * y) + z``" +msgid ":func:`fmax(x, y) `" +msgstr ":func:`fmax(x, y) `" + +msgid "Maximum of two floating-point values" +msgstr "بیشترین مقدار بین دو مقدار اعشاری" + +msgid ":func:`fmin(x, y) `" +msgstr ":func:`fmin(x, y) `" + +msgid "Minimum of two floating-point values" +msgstr "کمترین مقدار بین دو مقدار اعشاری" + msgid ":func:`fmod(x, y) `" msgstr ":func:`fmod(x, y) `" @@ -153,6 +127,18 @@ msgstr ":func:`isfinite(x) `" msgid "Check if *x* is neither an infinity nor a NaN" msgstr "بررسی می‌کند که *x* نه بی‌نهایت است و نه NaN" +msgid ":func:`isnormal(x) `" +msgstr ":func:`isnormal(x) `" + +msgid "Check if *x* is a normal number" +msgstr "بررسی کنید که آیا *x* یک عدد نرمال است یا خیر." + +msgid ":func:`issubnormal(x) `" +msgstr ":func:`issubnormal(x) `" + +msgid "Check if *x* is a subnormal number" +msgstr "بررسی کنید که آیا *x* یک عدد زیرنرمال است یا خیر." + msgid ":func:`isinf(x) `" msgstr ":func:`isinf(x) `" @@ -177,6 +163,12 @@ msgstr ":func:`nextafter(x, y, steps) `" msgid "Floating-point value *steps* steps after *x* towards *y*" msgstr "مقدار ممیز شناور *steps* گام پس از *x* به سمت *y*" +msgid ":func:`signbit(x) `" +msgstr ":func:`signbit(x) `" + +msgid "Check if *x* is a negative number" +msgstr "بررسی کنید که آیا *x* یک عدد منفی است یا خیر." + msgid ":func:`ulp(x) `" msgstr ":func:`ulp(x) `" @@ -438,51 +430,6 @@ msgstr ":data:`nan`" msgid "\"Not a number\" (NaN)" msgstr "\"عدد نامعتبر\" (NaN)" -msgid "Number-theoretic functions" -msgstr "توابع نظریه اعداد" - -msgid "Return the number of ways to choose *k* items from *n* items without repetition and without order." -msgstr "تعداد راه‌های انتخاب *k* آیتم از *n* آیتم بدون تکرار و بدون ترتیب را برمی‌گرداند." - -msgid "Evaluates to ``n! / (k! * (n - k)!)`` when ``k <= n`` and evaluates to zero when ``k > n``." -msgstr "هنگامی که ``k <= n`` باشد، به ``n! / (k! * (n - k)!)`` ارزیابی می‌شود و هنگامی که ``k > n`` باشد، به صفر ارزیابی می‌شود." - -msgid "Also called the binomial coefficient because it is equivalent to the coefficient of k-th term in polynomial expansion of ``(1 + x)ⁿ``." -msgstr "همچنین ضریب دوجمله‌ای نیز نامیده می‌شود، زیرا معادل ضریب جمله‌ی kاُم در بسط چندجمله‌ایِ ``(1 + x)ⁿ`` است." - -msgid "Raises :exc:`TypeError` if either of the arguments are not integers. Raises :exc:`ValueError` if either of the arguments are negative." -msgstr "اگر هر یک از آرگومان‌ها عدد صحیح نباشند، :exc:`TypeError` پرتاب می‌شود. اگر هر یک از آرگومان‌ها منفی باشند، :exc:`ValueError` پرتاب می‌شود." - -msgid "Return factorial of the nonnegative integer *n*." -msgstr "فاکتوریل عدد صحیح نامنفی *n* را برمی‌گرداند." - -msgid "Floats with integral values (like ``5.0``) are no longer accepted." -msgstr "شناورهایی با مقادیر صحیح (مانند ``5.0``) دیگر پذیرفته نمی‌شوند." - -msgid "Return the greatest common divisor of the specified integer arguments. If any of the arguments is nonzero, then the returned value is the largest positive integer that is a divisor of all arguments. If all arguments are zero, then the returned value is ``0``. ``gcd()`` without arguments returns ``0``." -msgstr "بزرگ‌ترین مقسوم‌علیه مشترک آرگومان‌های عدد صحیح مشخص‌شده را برمی‌گرداند. اگر هر یک از آرگومان‌ها غیرصفر باشد، مقدار برگردانده‌شده بزرگ‌ترین عدد صحیح مثبتی است که مقسوم‌علیه همه آرگومان‌ها باشد. اگر همه آرگومان‌ها صفر باشند، مقدار برگردانده‌شده ``0`` است. ``gcd()`` بدون آرگومان، ``0`` را برمی‌گرداند." - -msgid "Added support for an arbitrary number of arguments. Formerly, only two arguments were supported." -msgstr "پشتیبانی از تعداد دلخواهی از آرگومان‌ها افزوده شد. پیش‌تر، تنها از دو آرگومان پشتیبانی می‌شد." - -msgid "Return the integer square root of the nonnegative integer *n*. This is the floor of the exact square root of *n*, or equivalently the greatest integer *a* such that *a*\\ ² |nbsp| ≤ |nbsp| *n*." -msgstr "ریشه‌ی دوم صحیح عدد صحیح غیرمنفی *n* را برمی‌گرداند. این مقدار، جزء صحیح ریشه‌ی دوم دقیق *n* است، یا به‌طور معادل، بزرگ‌ترین عدد صحیح *a* است به‌طوری که *a*\\ ² |nbsp| ≤ |nbsp| *n*." - -msgid "For some applications, it may be more convenient to have the least integer *a* such that *n* |nbsp| ≤ |nbsp| *a*\\ ², or in other words the ceiling of the exact square root of *n*. For positive *n*, this can be computed using ``a = 1 + isqrt(n - 1)``." -msgstr "برای برخی کاربردها، ممکن است مناسب‌تر باشد که کوچک‌ترین عدد صحیح *a* را داشته باشیم، به‌طوری که *n* |nbsp| ≤ |nbsp| *a*\\ ²، یا به عبارت دیگر سقف جذر دقیق *n*. برای *n* مثبت، این را می‌توان با ``a = 1 + isqrt(n - 1)`` محاسبه کرد." - -msgid "Return the least common multiple of the specified integer arguments. If all arguments are nonzero, then the returned value is the smallest positive integer that is a multiple of all arguments. If any of the arguments is zero, then the returned value is ``0``. ``lcm()`` without arguments returns ``1``." -msgstr "کوچک‌ترین مضرب مشترک آرگومان‌های عدد صحیح مشخص‌شده را برمی‌گرداند. اگر همه آرگومان‌ها غیرصفر باشند، مقدار برگردانده‌شده کوچک‌ترین عدد صحیح مثبتی است که مضربی از همه آرگومان‌ها باشد. اگر هر یک از آرگومان‌ها صفر باشد، مقدار برگردانده‌شده ``0`` است. ``lcm()`` بدون آرگومان، ``1`` را برمی‌گرداند." - -msgid "Return the number of ways to choose *k* items from *n* items without repetition and with order." -msgstr "تعداد راه‌های انتخاب *k* آیتم از *n* آیتم بدون تکرار و با ترتیب را برمی‌گرداند." - -msgid "Evaluates to ``n! / (n - k)!`` when ``k <= n`` and evaluates to zero when ``k > n``." -msgstr "هنگامی که ``k <= n`` باشد، برابر با ``n! / (n - k)!`` است و هنگامی که ``k > n`` باشد، برابر با صفر است." - -msgid "If *k* is not specified or is ``None``, then *k* defaults to *n* and the function returns ``n!``." -msgstr "اگر *k* تعیین نشده باشد یا ``None`` باشد، آنگاه *k* به‌طور پیش‌فرض برابر *n* خواهد بود و تابع ``n!`` را برمی‌گرداند." - msgid "Floating point arithmetic" msgstr "محاسبات ممیز شناور" @@ -501,6 +448,18 @@ msgstr "عملیات ضرب-جمع ادغام‌شده (Fused multiply-add). ``( msgid "This function follows the specification of the fusedMultiplyAdd operation described in the IEEE 754 standard. The standard leaves one case implementation-defined, namely the result of ``fma(0, inf, nan)`` and ``fma(inf, 0, nan)``. In these cases, ``math.fma`` returns a NaN, and does not raise any exception." msgstr "این تابع از مشخصات عملیات fusedMultiplyAdd پیروی می‌کند که در استاندارد IEEE 754 توصیف شده است. این استاندارد یک حالت را به‌صورت تعریف‌شده توسط پیاده‌سازی باقی گذاشته است، یعنی نتیجه‌ی ``fma(0, inf, nan)`` و ``fma(inf, 0, nan)``. در این حالت‌ها، ``math.fma`` یک NaN برمی‌گرداند و هیچ استثنایی را پرتاب نمی‌کند." +msgid "Get the larger of two floating-point values, treating NaNs as missing data." +msgstr "بزرگ‌ترین مقدار بین دو مقدار اعشاری را به دست می‌آورد و NaNها را به عنوان داده‌ی مفقود در نظر می‌گیرد." + +msgid "When both operands are (signed) NaNs or zeroes, return ``nan`` and ``0`` respectively and the sign of the result is implementation-defined, that is, :func:`!fmax` is not required to be sensitive to the sign of such operands (see Annex F of the C11 standard, §F.10.0.3 and §F.10.9.2)." +msgstr "وقتی هر دو عملوند (علامت‌دار) NaN یا صفر باشند، به ترتیب ``nan`` و ``0`` را برمی‌گرداند و علامت نتیجه توسط پیاده‌سازی تعریف می‌شود؛ یعنی :func:`!fmax` نیازی به حساسیت نسبت به علامت چنین عملوندهایی ندارد (به ضمیمه F استاندارد C11، بندهای §F.10.0.3 و §F.10.9.2 مراجعه کنید)." + +msgid "Get the smaller of two floating-point values, treating NaNs as missing data." +msgstr "کوچک‌ترین مقدار بین دو مقدار اعشاری را به دست آورید و مقادیر NaN را به عنوان داده‌ی گم‌شده در نظر بگیرید." + +msgid "When both operands are (signed) NaNs or zeroes, return ``nan`` and ``0`` respectively and the sign of the result is implementation-defined, that is, :func:`!fmin` is not required to be sensitive to the sign of such operands (see Annex F of the C11 standard, §F.10.0.3 and §F.10.9.3)." +msgstr "هنگامی که هر دو عملوند (علامت‌دار) NaN یا صفر باشند، به ترتیب ``nan`` و ``0`` را برمی‌گرداند و علامت نتیجه وابسته به پیاده‌سازی است؛ یعنی :func:`!fmin` نیازی نیست نسبت به علامت چنین عملوندهایی حساس باشد (به ضمیمه‌ی F استاندارد C11، بخش‌های §F.10.0.3 و §F.10.9.3 مراجعه کنید)." + msgid "Return the floating-point remainder of ``x / y``, as defined by the platform C library function ``fmod(x, y)``. Note that the Python expression ``x % y`` may not return the same result. The intent of the C standard is that ``fmod(x, y)`` be exactly (mathematically; to infinite precision) equal to ``x - n*y`` for some integer *n* such that the result has the same sign as *x* and magnitude less than ``abs(y)``. Python's ``x % y`` returns a result with the sign of *y* instead, and may not be exactly computable for float arguments. For example, ``fmod(-1e-100, 1e100)`` is ``-1e-100``, but the result of Python's ``-1e-100 % 1e100`` is ``1e100-1e-100``, which cannot be represented exactly as a float, and rounds to the surprising ``1e100``. For this reason, function :func:`fmod` is generally preferred when working with floats, while Python's ``x % y`` is preferred when working with integers." msgstr "باقی‌مانده‌ی ممیز شناور ``x / y`` را، همان‌طور که توسط تابع ``fmod(x, y)`` کتابخانه‌ی C سکو تعریف‌شده است، برمی‌گرداند. توجه داشته باشید که عبارت ``x % y`` در پایتون ممکن است همان نتیجه را برنگرداند. منظور استاندارد C این است که ``fmod(x, y)`` دقیقاً (از نظر ریاضی؛ با دقت نامتناهی) برابر با ``x - n*y`` برای عدد صحیحی *n* باشد، به‌گونه‌ای که نتیجه همان علامت *x* را داشته باشد و قدر مطلق آن کمتر از ``abs(y)`` باشد. در عوض، ``x % y`` در پایتون نتیجه‌ای با علامت *y* برمی‌گرداند و ممکن است برای آرگومان‌های ممیز شناور به‌طور دقیق قابل محاسبه نباشد. برای مثال، ``fmod(-1e-100, 1e100)`` برابر ``-1e-100`` است، اما نتیجه‌ی ``-1e-100 % 1e100`` در پایتون ``1e100-1e-100`` است که نمی‌توان آن را دقیقاً به‌عنوان یک عدد ممیز شناور بازنمایی کرد و به مقدار شگفت‌آور ``1e100`` گرد می‌شود. به همین دلیل، معمولاً هنگام کار با اعداد ممیز شناور تابع :func:`fmod` ترجیح داده می‌شود، در حالی که هنگام کار با اعداد صحیح، ``x % y`` در پایتون ترجیح داده می‌شود." @@ -558,6 +517,12 @@ msgstr ":pep:`485` -- تابعی برای آزمون برابری تقریبی" msgid "Return ``True`` if *x* is neither an infinity nor a NaN, and ``False`` otherwise. (Note that ``0.0`` *is* considered finite.)" msgstr "اگر *x* نه بی‌نهایت و نه NaN باشد، ``True`` را برمی‌گرداند و در غیر این صورت ``False`` را برمی‌گرداند. (توجه داشته باشید که ``0.0`` *متناهی* در نظر گرفته می‌شود.)" +msgid "Return ``True`` if *x* is a normal number, that is a finite nonzero number that is not a subnormal (see :func:`issubnormal`). Return ``False`` otherwise." +msgstr "اگر *x* یک عدد نرمال باشد، یعنی یک عدد متناهی غیرصفر که زیرنرمال نباشد (به :func:`issubnormal` مراجعه کنید)، ``True`` را برمی‌گرداند. در غیر این صورت ``False`` را برمی‌گرداند." + +msgid "Return ``True`` if *x* is a subnormal number, that is a finite nonzero number with a magnitude smaller than :data:`sys.float_info.min`. Return ``False`` otherwise." +msgstr "اگر *x* یک عدد زیرنرمال باشد، یعنی یک عدد متناهی غیرصفر با بزرگی کوچک‌تر از :data:`sys.float_info.min`، ``True`` را برمی‌گرداند. در غیر این صورت ``False`` را برمی‌گرداند." + msgid "Return ``True`` if *x* is a positive or negative infinity, and ``False`` otherwise." msgstr "اگر *x* بی‌نهایت مثبت یا منفی باشد، ``True`` برمی‌گرداند و در غیر این صورت ``False`` برمی‌گرداند." @@ -594,6 +559,12 @@ msgstr "همچنین ببینید :func:`math.ulp`." msgid "Added the *steps* argument." msgstr "آرگومان *steps* افزوده شد." +msgid "Return ``True`` if the sign of *x* is negative and ``False`` otherwise." +msgstr "اگر علامت *x* منفی باشد مقدار ``True`` و در غیر این صورت ``False`` را برمی‌گرداند." + +msgid "This is useful to detect the sign bit of zeroes, infinities and NaNs." +msgstr "این کار برای تشخیص بیت علامت اعداد صفر، بی‌نهایت‌ها و NaNها مفید است." + msgid "Return the value of the least significant bit of the float *x*:" msgstr "مقدار کم‌ارزش‌ترین بیت شناور *x* را برمی‌گرداند:" @@ -675,8 +646,8 @@ msgstr "فاصله اقلیدسی بین دو نقطه *p* و *q* را برمی msgid "Roughly equivalent to::" msgstr "تقریباً معادل با::" -msgid "sqrt(sum((px - qx) ** 2.0 for px, qx in zip(p, q)))" -msgstr "sqrt(sum((px - qx) ** 2.0 for px, qx in zip(p, q)))" +msgid "sqrt(sum((px - qx) ** 2.0 for px, qx in zip(p, q, strict=True)))" +msgstr "sqrt(sum((px - qx) ** 2.0 for px, qx in zip(p, q, strict=True)))" msgid "Return an accurate floating-point sum of values in the iterable. Avoids loss of precision by tracking multiple intermediate partial sums." msgstr "مجموع دقیق ممیز شناور مقادیر موجود در پیمایش‌پذیر را برمی‌گرداند. با پیگیری چندین مجموع جزئی میانی، از کاهش دقت جلوگیری می‌کند." @@ -801,6 +772,66 @@ msgstr "`تابع گاما `_ msgid "Return the natural logarithm of the absolute value of the Gamma function at *x*." msgstr "لگاریتم طبیعی قدر مطلق تابع گاما در *x* را برمی‌گرداند." +msgid "Number-theoretic functions" +msgstr "توابع نظریه اعداد" + +msgid "For backward compatibility, the :mod:`!math` module provides also aliases of the following functions from the :mod:`math.integer` module:" +msgstr "برای سازگاری عقبگرد، ماژول :mod:`!math` همچنین نام‌های مستعاری از توابع زیر از ماژول :mod:`math.integer` را فراهم می‌کند:" + +msgid ":func:`comb(n, k) `" +msgstr ":func:`comb(n, k) `" + +msgid "Number of ways to choose *k* items from *n* items without repetition and without order" +msgstr "تعداد راه‌های انتخاب *k* آیتم از *n* آیتم بدون تکرار و بدون ترتیب" + +msgid ":func:`factorial(n) `" +msgstr ":func:`factorial(n) `" + +msgid "*n* factorial" +msgstr "فاکتوریل *n*" + +msgid ":func:`gcd(*integers) `" +msgstr ":func:`gcd(*integers) `" + +msgid "Greatest common divisor of the integer arguments" +msgstr "بزرگ‌ترین مقسوم‌علیه مشترک آرگومان‌های عدد صحیح" + +msgid ":func:`isqrt(n) `" +msgstr ":func:`isqrt(n) `" + +msgid "Integer square root of a nonnegative integer *n*" +msgstr "جذر صحیح عدد صحیح نامنفی *n*" + +msgid ":func:`lcm(*integers) `" +msgstr ":func:`lcm(*integers) `" + +msgid "Least common multiple of the integer arguments" +msgstr "کمترین مضرب مشترک آرگومان‌های عدد صحیح" + +msgid ":func:`perm(n, k) `" +msgstr ":func:`perm(n, k) `" + +msgid "Number of ways to choose *k* items from *n* items without repetition and with order" +msgstr "تعداد راه‌های انتخاب *k* آیتم از *n* آیتم بدون تکرار و با ترتیب" + +msgid "The :func:`gcd` function." +msgstr "تابع :func:`gcd`." + +msgid "The :func:`comb`, :func:`perm` and :func:`isqrt` functions." +msgstr "توابع :func:`comb`، :func:`perm` و :func:`isqrt`." + +msgid "The :func:`lcm` function." +msgstr "تابع :func:`lcm`." + +msgid "Added support for an arbitrary number of arguments in the :func:`gcd` function. Formerly, only two arguments were supported." +msgstr "پشتیبانی از تعداد دلخواهی از آرگومان‌ها به تابع :func:`gcd` اضافه شد. پیش‌تر، فقط از دو آرگومان پشتیبانی می‌شد." + +msgid "Floats with integral values (like ``5.0``) are no longer accepted in the :func:`factorial` function." +msgstr "اعداد اعشاری با مقادیر صحیح (مانند ``5.0``) دیگر در تابع :func:`factorial` پذیرفته نمی‌شوند." + +msgid "Use the :mod:`math.integer` functions instead of these aliases." +msgstr "به جای این نام‌های مستعار، از توابع ماژول :mod:`math.integer` استفاده کنید." + msgid "Constants" msgstr "ثابت‌ها" @@ -833,3 +864,48 @@ msgstr "ماژول :mod:`cmath`" msgid "Complex number versions of many of these functions." msgstr "نسخه‌هایی از بسیاری از این توابع برای اعداد مختلط." + +msgid "Module :mod:`math.integer`" +msgstr "ماژول :mod:`math.integer`" + +msgid "Integer-specific mathematics functions." +msgstr "توابع ریاضی مخصوص اعداد صحیح." + +#~ msgid "**Number-theoretic functions**" +#~ msgstr "توابع نظریه‌ی اعداد" + +#~ msgid "Return the number of ways to choose *k* items from *n* items without repetition and without order." +#~ msgstr "تعداد راه‌های انتخاب *k* آیتم از *n* آیتم بدون تکرار و بدون ترتیب را برمی‌گرداند." + +#~ msgid "Evaluates to ``n! / (k! * (n - k)!)`` when ``k <= n`` and evaluates to zero when ``k > n``." +#~ msgstr "هنگامی که ``k <= n`` باشد، به ``n! / (k! * (n - k)!)`` ارزیابی می‌شود و هنگامی که ``k > n`` باشد، به صفر ارزیابی می‌شود." + +#~ msgid "Also called the binomial coefficient because it is equivalent to the coefficient of k-th term in polynomial expansion of ``(1 + x)ⁿ``." +#~ msgstr "همچنین ضریب دوجمله‌ای نیز نامیده می‌شود، زیرا معادل ضریب جمله‌ی kاُم در بسط چندجمله‌ایِ ``(1 + x)ⁿ`` است." + +#~ msgid "Raises :exc:`TypeError` if either of the arguments are not integers. Raises :exc:`ValueError` if either of the arguments are negative." +#~ msgstr "اگر هر یک از آرگومان‌ها عدد صحیح نباشند، :exc:`TypeError` پرتاب می‌شود. اگر هر یک از آرگومان‌ها منفی باشند، :exc:`ValueError` پرتاب می‌شود." + +#~ msgid "Return factorial of the nonnegative integer *n*." +#~ msgstr "فاکتوریل عدد صحیح نامنفی *n* را برمی‌گرداند." + +#~ msgid "Return the greatest common divisor of the specified integer arguments. If any of the arguments is nonzero, then the returned value is the largest positive integer that is a divisor of all arguments. If all arguments are zero, then the returned value is ``0``. ``gcd()`` without arguments returns ``0``." +#~ msgstr "بزرگ‌ترین مقسوم‌علیه مشترک آرگومان‌های عدد صحیح مشخص‌شده را برمی‌گرداند. اگر هر یک از آرگومان‌ها غیرصفر باشد، مقدار برگردانده‌شده بزرگ‌ترین عدد صحیح مثبتی است که مقسوم‌علیه همه آرگومان‌ها باشد. اگر همه آرگومان‌ها صفر باشند، مقدار برگردانده‌شده ``0`` است. ``gcd()`` بدون آرگومان، ``0`` را برمی‌گرداند." + +#~ msgid "Return the integer square root of the nonnegative integer *n*. This is the floor of the exact square root of *n*, or equivalently the greatest integer *a* such that *a*\\ ² |nbsp| ≤ |nbsp| *n*." +#~ msgstr "ریشه‌ی دوم صحیح عدد صحیح غیرمنفی *n* را برمی‌گرداند. این مقدار، جزء صحیح ریشه‌ی دوم دقیق *n* است، یا به‌طور معادل، بزرگ‌ترین عدد صحیح *a* است به‌طوری که *a*\\ ² |nbsp| ≤ |nbsp| *n*." + +#~ msgid "For some applications, it may be more convenient to have the least integer *a* such that *n* |nbsp| ≤ |nbsp| *a*\\ ², or in other words the ceiling of the exact square root of *n*. For positive *n*, this can be computed using ``a = 1 + isqrt(n - 1)``." +#~ msgstr "برای برخی کاربردها، ممکن است مناسب‌تر باشد که کوچک‌ترین عدد صحیح *a* را داشته باشیم، به‌طوری که *n* |nbsp| ≤ |nbsp| *a*\\ ²، یا به عبارت دیگر سقف جذر دقیق *n*. برای *n* مثبت، این را می‌توان با ``a = 1 + isqrt(n - 1)`` محاسبه کرد." + +#~ msgid "Return the least common multiple of the specified integer arguments. If all arguments are nonzero, then the returned value is the smallest positive integer that is a multiple of all arguments. If any of the arguments is zero, then the returned value is ``0``. ``lcm()`` without arguments returns ``1``." +#~ msgstr "کوچک‌ترین مضرب مشترک آرگومان‌های عدد صحیح مشخص‌شده را برمی‌گرداند. اگر همه آرگومان‌ها غیرصفر باشند، مقدار برگردانده‌شده کوچک‌ترین عدد صحیح مثبتی است که مضربی از همه آرگومان‌ها باشد. اگر هر یک از آرگومان‌ها صفر باشد، مقدار برگردانده‌شده ``0`` است. ``lcm()`` بدون آرگومان، ``1`` را برمی‌گرداند." + +#~ msgid "Return the number of ways to choose *k* items from *n* items without repetition and with order." +#~ msgstr "تعداد راه‌های انتخاب *k* آیتم از *n* آیتم بدون تکرار و با ترتیب را برمی‌گرداند." + +#~ msgid "Evaluates to ``n! / (n - k)!`` when ``k <= n`` and evaluates to zero when ``k > n``." +#~ msgstr "هنگامی که ``k <= n`` باشد، برابر با ``n! / (n - k)!`` است و هنگامی که ``k > n`` باشد، برابر با صفر است." + +#~ msgid "If *k* is not specified or is ``None``, then *k* defaults to *n* and the function returns ``n!``." +#~ msgstr "اگر *k* تعیین نشده باشد یا ``None`` باشد، آنگاه *k* به‌طور پیش‌فرض برابر *n* خواهد بود و تابع ``n!`` را برمی‌گرداند." diff --git a/library/mmap.po b/library/mmap.po index 24be9904..487e6448 100644 --- a/library/mmap.po +++ b/library/mmap.po @@ -7,12 +7,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 09:18+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -50,8 +51,8 @@ msgstr "ثابت :const:`ACCESS_DEFAULT` اضافه شد." msgid "To map anonymous memory, -1 should be passed as the fileno along with the length." msgstr "برای نگاشت حافظه‌ی ناشناس، باید -1 به‌عنوان fileno به همراه طول ارسال شود." -msgid "**(Windows version)** Maps *length* bytes from the file specified by the file handle *fileno*, and creates a mmap object. If *length* is larger than the current size of the file, the file is extended to contain *length* bytes. If *length* is ``0``, the maximum length of the map is the current size of the file, except that if the file is empty Windows raises an exception (you cannot create an empty mapping on Windows)." -msgstr "**(نسخه‌ی ویندوز)** *length* بایت از پرونده‌ای که با دسته پرونده *fileno* مشخص شده است را نگاشت می‌کند و یک شیء mmap ایجاد می‌کند. اگر *length* بزرگ‌تر از اندازه‌ی فعلی پرونده باشد، پرونده گسترش داده می‌شود تا شامل *length* بایت شود. اگر *length* برابر ``0`` باشد، حداکثر طول نگاشت برابر اندازه‌ی فعلی پرونده است، مگر اینکه پرونده خالی باشد؛ در این صورت ویندوز یک استثنا پرتاب می‌کند (شما نمی‌توانید یک نگاشت خالی در ویندوز ایجاد کنید)." +msgid "**(Windows version)** Maps *length* bytes from the file specified by the file descriptor *fileno*, and creates a mmap object. If *length* is larger than the current size of the file, the file is extended to contain *length* bytes. If *length* is ``0``, the maximum length of the map is the current size of the file, except that if the file is empty Windows raises an exception (you cannot create an empty mapping on Windows)." +msgstr "**(نسخه‌ی ویندوز)** به اندازه‌ی *length* بایت از پرونده‌ی مشخص‌شده توسط توصیف‌گر پرونده‌ی *fileno* را نگاشت کرده و یک شیء mmap ایجاد می‌کند. اگر *length* بزرگ‌تر از اندازه‌ی فعلی پرونده باشد، پرونده گسترش می‌یابد تا *length* بایت را در بر بگیرد. اگر *length* برابر با ``0`` باشد، بیشترین طول نگاشت همان اندازه‌ی فعلی پرونده است، با این تفاوت که اگر پرونده خالی باشد ویندوز یک استثنا ایجاد می‌کند (شما نمی‌توانید یک نگاشت خالی روی ویندوز ایجاد کنید)." msgid "*tagname*, if specified and not ``None``, is a string giving a tag name for the mapping. Windows allows you to have many different mappings against the same file. If you specify the name of an existing tag, that tag is opened, otherwise a new tag of this name is created. If this parameter is omitted or ``None``, the mapping is created without a name. Avoiding the use of the *tagname* parameter will assist in keeping your code portable between Unix and Windows." msgstr "*tagname*، اگر مشخص شده باشد و ``None`` نباشد، رشته‌ای است که نام برچسب را برای نگاشت مشخص می‌کند. ویندوز به شما امکان می‌دهد نگاشت‌های متفاوت بسیاری برای یک پرونده یکسان داشته باشید. اگر نام یک برچسب موجود را مشخص کنید، آن برچسب باز می‌شود، در غیر این صورت برچسب جدیدی با این نام ایجاد می‌شود. اگر این پارامتر حذف شود یا ``None`` باشد، نگاشت بدون نام ایجاد می‌شود. اجتناب از استفاده از پارامتر *tagname* به قابل‌حمل نگه‌داشتن کد شما بین یونیکس و ویندوز کمک می‌کند." @@ -59,6 +60,12 @@ msgstr "*tagname*، اگر مشخص شده باشد و ``None`` نباشد، ر msgid "*offset* may be specified as a non-negative integer offset. mmap references will be relative to the offset from the beginning of the file. *offset* defaults to 0. *offset* must be a multiple of the :const:`ALLOCATIONGRANULARITY`." msgstr "*offset* می‌تواند به‌عنوان یک آفست از نوع عدد صحیح غیرمنفی مشخص شود. ارجاع‌های mmap نسبت به آفست از ابتدای پرونده خواهند بود. *offset* به‌طور پیش‌فرض ۰ است. *offset* باید مضربی از :const:`ALLOCATIONGRANULARITY` باشد." +msgid "If *trackfd* is ``False``, the file handle corresponding to *fileno* will not be duplicated, and the resulting :class:`!mmap` object will not be associated with the map's underlying file. This means that the :meth:`~mmap.mmap.size` and :meth:`~mmap.mmap.resize` methods will fail. This mode is useful to limit the number of open file handles. The original file can be renamed (but not deleted) after closing *fileno*." +msgstr "اگر *trackfd* برابر با ``False`` باشد، دسته‌ی پرونده‌ی متناظر با *fileno* تکثیر نخواهد شد و شیء :class:`!mmap` حاصل با پرونده‌ی زیرین نگاشت مرتبط نخواهد شد. این یعنی متدهای :meth:`~mmap.mmap.size` و :meth:`~mmap.mmap.resize` با شکست مواجه خواهند شد. این حالت برای محدود کردن تعداد دسته‌های پرونده‌ی باز مفید است. پرونده‌ی اصلی را می‌توان پس از بستن *fileno* تغییر نام داد (اما نمی‌توان حذف کرد)." + +msgid "The *trackfd* parameter was added." +msgstr "پارامتر *trackfd* افزوده شد." + msgid "Raises an :ref:`auditing event ` ``mmap.__new__`` with arguments ``fileno``, ``length``, ``access``, ``offset``." msgstr "یک :ref:`رویداد حسابرسی ` ``mmap.__new__`` را با آرگومان‌های ``fileno``، ``length``، ``access``، ``offset`` پرتاب می‌کند." @@ -83,9 +90,6 @@ msgstr "اگر *trackfd* برابر ``False`` باشد، توصیف‌گر پر msgid "To ensure validity of the created memory mapping the file specified by the descriptor *fileno* is internally automatically synchronized with the physical backing store on macOS." msgstr "برای اطمینان از اعتبار نگاشت حافظه‌ی ایجادشده، پرونده مشخص‌شده با توصیف‌گر *fileno*، به‌صورت داخلی و به‌طور خودکار با ذخیره‌گاه پشتیبان فیزیکی در macOS همگام‌سازی می‌شود." -msgid "The *trackfd* parameter was added." -msgstr "پارامتر *trackfd* افزوده شد." - msgid "This example shows a simple way of using :class:`~mmap.mmap`::" msgstr "این مثال روش ساده‌ای برای استفاده از :class:`~mmap.mmap` نشان می‌دهد::" @@ -201,12 +205,24 @@ msgstr "اکنون :term:`bytes-like object` قابل نوشتن پذیرفته msgid "Flushes changes made to the in-memory copy of a file back to disk. Without use of this call there is no guarantee that changes are written back before the object is destroyed. If *offset* and *size* are specified, only changes to the given range of bytes will be flushed to disk; otherwise, the whole extent of the mapping is flushed. *offset* must be a multiple of the :const:`PAGESIZE` or :const:`ALLOCATIONGRANULARITY`." msgstr "تغییرات اعمال‌شده بر نسخه‌ی درون‌حافظه‌ای یک پرونده را به دیسک می‌نویسد. بدون استفاده از این فراخوانی، هیچ تضمینی وجود ندارد که تغییرات پیش از از بین رفتن شیء به دیسک نوشته شوند. اگر *offset* و *size* مشخص شده باشند، فقط تغییرات در محدوده‌ی مشخص‌شده از بایت‌ها به دیسک نوشته می‌شوند؛ در غیر این صورت، کل محدوده‌ی نگاشت به دیسک نوشته می‌شود. *offset* باید مضربی از :const:`PAGESIZE` یا :const:`ALLOCATIONGRANULARITY` باشد." +msgid "The *flags* parameter specifies the synchronization behavior. *flags* must be one of the :ref:`MS_* constants ` available on the system." +msgstr "پارامتر *flags* رفتار همگام‌سازی را مشخص می‌کند. *flags* باید یکی از ثابت‌های :ref:`MS_* constants ` موجود در سیستم باشد." + +msgid "On Windows, the *flags* parameter is ignored." +msgstr "در ویندوز، پارامتر *flags* نادیده گرفته می‌شود." + msgid "``None`` is returned to indicate success. An exception is raised when the call failed." msgstr "``None`` برای نشان دادن موفقیت برگردانده می‌شود. در صورت شکست فراخوانی، یک استثنا پرتاب می‌شود." msgid "Previously, a nonzero value was returned on success; zero was returned on error under Windows. A zero value was returned on success; an exception was raised on error under Unix." msgstr "پیش‌تر، در صورت موفقیت یک مقدار غیرصفر بازگردانده می‌شد؛ در ویندوز، در صورت خطا صفر بازگردانده می‌شد. در یونیکس، در صورت موفقیت یک مقدار صفر بازگردانده می‌شد؛ در صورت خطا یک استثنا پرتاب می‌شد." +msgid "Allow specifying *offset* without *size*. Previously, both *offset* and *size* parameters were required together. Now *offset* can be specified alone, and the flush operation will extend from *offset* to the end of the mmap." +msgstr "امکان مشخص کردن *offset* بدون *size* را فراهم می‌کند. پیش از این، هر دو پارامتر *offset* و *size* با هم الزامی بودند. اکنون *offset* را می‌توان به تنهایی مشخص کرد و عملیات تخلیه (flush) از *offset* تا انتهای mmap گسترش خواهد یافت." + +msgid "Added *flags* parameter to control synchronization behavior." +msgstr "پارامتر *flags* برای کنترل رفتار همگام‌سازی اضافه شد." + msgid "Send advice *option* to the kernel about the memory region beginning at *start* and extending *length* bytes. *option* must be one of the :ref:`MADV_* constants ` available on the system. If *start* and *length* are omitted, the entire mapping is spanned. On some systems (including Linux), *start* must be a multiple of the :const:`PAGESIZE`." msgstr "توصیه‌ی *option* را درباره‌ی ناحیه‌ی حافظه‌ای که از *start* شروع می‌شود و به طول *length* بایت ادامه دارد، به هسته ارسال کنید. *option* باید یکی از :ref:`ثابت‌های MADV_* ` موجود در سیستم باشد. اگر *start* و *length* حذف شوند، کل نگاشت پوشش داده می‌شود. در برخی سیستم‌ها (از جمله لینوکس)، *start* باید مضربی از :const:`PAGESIZE` باشد." @@ -237,6 +253,9 @@ msgstr "تغییر اندازه‌ی نگاشتی که با *access* برابر msgid "**On Windows**: Resizing the map will raise an :exc:`OSError` if there are other maps against the same named file. Resizing an anonymous map (ie against the pagefile) will silently create a new map with the original data copied over up to the length of the new size." msgstr "**در ویندوز**: تغییر اندازه‌ی نگاشت (map) در صورتی که نگاشت‌های دیگری بر روی همان پرونده نام‌دار وجود داشته باشند، باعث پرتاب یک :exc:`OSError` می‌شود. تغییر اندازه‌ی یک نگاشت ناشناس (یعنی بر روی پرونده صفحه‌بندی (pagefile)) بدون هیچ پیامی یک نگاشت جدید با داده‌های اصلی کپی‌شده تا طول اندازه‌ی جدید ایجاد می‌کند." +msgid "Availability: Windows and systems with the ``mremap()`` system call." +msgstr "دسترس‌پذیری: ویندوز و سیستم‌های دارای فراخوانی سیستمی ``mremap()``." + msgid "Correctly fails if attempting to resize when another map is held Allows resize against an anonymous map on Windows" msgstr "در صورت تلاش برای تغییر اندازه زمانی که نگاشت دیگری در اختیار گرفته شده است، به‌درستی شکست می‌خورد. امکان تغییر اندازه‌ی نگاشت ناشناس در ویندوز را فراهم می‌کند" @@ -252,8 +271,14 @@ msgstr "موقعیت مطلق جدید به‌جای ``None`` برگردانده msgid "Return whether the file supports seeking, and the return value is always ``True``." msgstr "برمی‌گرداند که آیا پرونده از مکان‌یابی (seeking) پشتیبانی می‌کند، و مقدار بازگشتی همیشه ``True`` است." -msgid "Return the length of the file, which can be larger than the size of the memory-mapped area." -msgstr "طول پرونده را برمی‌گرداند، که می‌تواند بزرگ‌تر از اندازه‌ی ناحیه‌ی نگاشت‌شده به حافظه باشد." +msgid "Annotate the memory mapping with the given *name* for easier identification in ``/proc//maps`` if the kernel supports the feature and :option:`-X dev <-X>` is passed to Python or if Python is built in :ref:`debug mode `. The length of *name* must not exceed 67 bytes including the ``'\\0'`` terminator." +msgstr "اگر هسته از این ویژگی پشتیبانی کند و :option:`-X dev <-X>` به پایتون پاس داده شود یا پایتون در :ref:`حالت اشکالات‌زدایی ` ساخته شده باشد، نگاشت حافظه را با *name* داده‌شده حاشیه‌نویسی کنید تا شناسایی آن در ``/proc//maps`` آسان‌تر شود. طول *name* نباید از ۶۷ بایت شامل نویسنده‌ی پایان‌بخش ``'\\0'`` بیشتر باشد." + +msgid "Return the length of the file, which can be larger than the size of the memory-mapped area. For an anonymous mapping, return its size." +msgstr "طول پرونده را برمی‌گرداند که می‌تواند بزرگ‌تر از اندازه‌ی ناحیه‌ی نگاشت‌شده در حافظه باشد. برای یک نگاشت ناشناس، اندازه‌ی آن را برمی‌گرداند." + +msgid "Anonymous mappings are now supported on Unix." +msgstr "نگاشت‌های بی‌نام اکنون روی یونیکس پشتیبانی می‌شوند." msgid "Returns the current position of the file pointer." msgstr "موقعیت فعلی اشاره‌گر پرونده را برمی‌گرداند." @@ -293,3 +318,18 @@ msgstr "ثابت‌های :data:`MAP_ALIGNED_SUPER` و :data:`MAP_CONCEAL` اف msgid "Added :data:`MAP_32BIT`, :data:`MAP_HASSEMAPHORE`, :data:`MAP_JIT`, :data:`MAP_NOCACHE`, :data:`MAP_NOEXTEND`, :data:`MAP_NORESERVE`, :data:`MAP_RESILIENT_CODESIGN`, :data:`MAP_RESILIENT_MEDIA`, :data:`MAP_TPRO`, :data:`MAP_TRANSLATED_ALLOW_EXECUTE`, and :data:`MAP_UNIX03` constants." msgstr "ثابت‌های :data:`MAP_32BIT`، :data:`MAP_HASSEMAPHORE`، :data:`MAP_JIT`، :data:`MAP_NOCACHE`، :data:`MAP_NOEXTEND`، :data:`MAP_NORESERVE`، :data:`MAP_RESILIENT_CODESIGN`، :data:`MAP_RESILIENT_MEDIA`، :data:`MAP_TPRO`، :data:`MAP_TRANSLATED_ALLOW_EXECUTE` و :data:`MAP_UNIX03` افزوده شدند." + +msgid "MS_* Constants" +msgstr "ثابت‌های MS_*" + +msgid "These flags control the synchronization behavior for :meth:`mmap.flush`:" +msgstr "این پرچم‌ها رفتار همگام‌سازی را برای :meth:`mmap.flush` کنترل می‌کنند:" + +msgid ":data:`MS_SYNC` - Synchronous flush: writes are scheduled and the call blocks until they are physically written to storage." +msgstr ":data:`MS_SYNC` - تخلیه‌ی همگام: نوشتن‌ها زمان‌بندی می‌شوند و فراخوانی تا زمانی که آن‌ها به طور فیزیکی روی ذخیره‌ساز نوشته شوند، مسدود می‌ماند." + +msgid ":data:`MS_ASYNC` - Asynchronous flush: writes are scheduled but the call returns immediately without waiting for completion." +msgstr ":data:`MS_ASYNC` - تخلیه‌ی ناهمگام: نوشتن‌ها زمان‌بندی می‌شوند اما فراخوانی بدون انتظار برای تکمیل، بلافاصله برمی‌گردد." + +msgid ":data:`MS_INVALIDATE` - Invalidate cached data: invalidates other mappings of the same file so they can see the changes." +msgstr ":data:`MS_INVALIDATE` - نامعتبرسازی داده‌های کش‌شده: نگاشت‌های دیگرِ همان پرونده را نامعتبر می‌سازد تا بتوانند تغییرات را ببینند." diff --git a/library/msvcrt.po b/library/msvcrt.po index ed11e036..afb6209f 100644 --- a/library/msvcrt.po +++ b/library/msvcrt.po @@ -7,12 +7,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 15:55+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -26,6 +27,9 @@ msgstr "" msgid ":mod:`!msvcrt` --- Useful routines from the MS VC++ runtime" msgstr ":mod:`!msvcrt` --- روال‌های مفید از ران‌تایم MS VC++" +msgid "**Source code:** :source:`PC/msvcrtmodule.c`" +msgstr "**کد منبع:** :source:`PC/msvcrtmodule.c`" + msgid "These functions provide access to some useful capabilities on Windows platforms. Some higher-level modules use these functions to build the Windows implementations of their services. For example, the :mod:`getpass` module uses this in the implementation of the :func:`getpass` function." msgstr "این توابع دسترسی به برخی قابلیت‌های مفید در سکوهای ویندوزی را فراهم می‌کنند. برخی ماژول‌های سطح بالاتر از این توابع برای ساخت پیاده‌سازی‌های ویندوزی خدمات خود استفاده می‌کنند. برای مثال، ماژول :mod:`getpass` در پیاده‌سازی تابع :func:`getpass` از آن استفاده می‌کند." diff --git a/library/multiprocessing.po b/library/multiprocessing.po index 020bc269..ff1841ea 100644 --- a/library/multiprocessing.po +++ b/library/multiprocessing.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 15:53+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -1192,15 +1193,21 @@ msgstr "اکنون در POSIX در صورتی پشتیبانی می‌شود ک msgid "Accepts a :term:`path-like object`." msgstr "یک :term:`شیء شبه‌مسیر ` را می‌پذیرد." -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 processes. Any :exc:`ImportError` when doing so is silently ignored. This can be used as a performance enhancement to avoid repeated work in every process." -msgstr "فهرستی از نام ماژول‌ها را برای فرایند اصلی forkserver تنظیم کنید تا تلاش کند آن‌ها را ایمپورت کند، به‌طوری که وضعیت از پیش ایمپورت‌شده‌ی آن‌ها توسط فرایندهای forkشده به ارث برده شود. هرگونه :exc:`ImportError` هنگام انجام این کار به‌صورت بی‌سر و صدا نادیده گرفته می‌شود. از این می‌توان به‌عنوان بهبود کارایی برای اجتناب از کار تکراری در هر فرایند استفاده کرد." +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 processes. This can be used as a performance enhancement to avoid repeated work in every process." +msgstr "فهرستی از نام‌های ماژول را برای فرایند اصلی forkserver تنظیم می‌کند تا تلاش کند آن‌ها را ایمپورت کند؛ به طوری که وضعیت ازپیش‌ایمپورت‌شده‌ی آن‌ها توسط فرایند‌های منشعب‌شده به ارث برده شود. از این قابلیت می‌توان به عنوان بهبود کارایی برای جلوگیری از کارهای تکراری در هر فرایند استفاده کرد." 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 "برای این که این کار کند، باید پیش از راه‌اندازی فرایند forkserver فراخوانی شود (پیش از ایجاد یک :class:`Pool` یا آغاز یک :class:`Process`)." +msgid "The *on_error* parameter controls how :exc:`ImportError` exceptions during module preloading are handled: ``\"ignore\"`` (default) silently ignores failures, ``\"warn\"`` causes the forkserver subprocess to emit an :exc:`ImportWarning` to stderr, and ``\"fail\"`` causes the forkserver subprocess to exit with the exception traceback on stderr, making subsequent process creation fail with :exc:`EOFError` or :exc:`ConnectionError`." +msgstr "پارامتر *on_error* نحوه‌ی مدیریت استثناهای :exc:`ImportError` را در طول پیش‌بارگذاری ماژول کنترل می‌کند: گزینه‌ی ``\"ignore\"`` (پیش‌فرض) خطاهای شکست را به‌طور بی‌صدا نادیده می‌گیرد، ``\"warn\"`` باعث می‌شود که زیرفرایند forkserver یک :exc:`ImportWarning` روی stderr صادر کند، و ``\"fail\"`` باعث می‌شود زیرفرایند forkserver با ردگیری استثنا روی stderr خارج شود و در نتیجه ایجاد فرایند بعدی با :exc:`EOFError` یا :exc:`ConnectionError` با شکست مواجه شود." + msgid "Only meaningful when using the ``'forkserver'`` start method. See :ref:`multiprocessing-start-methods`." msgstr "تنها زمانی معنا دارد که از متد شروع ``'forkserver'`` استفاده شود. :ref:`multiprocessing-start-methods` را ببینید." +msgid "Added the *on_error* parameter." +msgstr "پارامتر *on_error* اضافه شد." + msgid "Set the method which should be used to start child processes. The *method* argument can be ``'fork'``, ``'spawn'`` or ``'forkserver'``. Raises :exc:`RuntimeError` if the start method has already been set and *force* is not ``True``. If *method* is ``None`` and *force* is ``True`` then the start method is set to ``None``. If *method* is ``None`` and *force* is ``False`` then the context is set to the default context." msgstr "متدی را که باید برای شروع فرآیندهای فرزند استفاده شود، تنظیم کنید. آرگومان *method* می‌تواند ``'fork'``، ``'spawn'`` یا ``'forkserver'`` باشد. اگر متد شروع از قبل تنظیم‌شده باشد و *force* برابر ``True`` نباشد، :exc:`RuntimeError` پرتاب می‌شود. اگر *method* برابر ``None`` و *force* برابر ``True`` باشد، متد شروع به ``None`` تنظیم می‌شود. اگر *method* برابر ``None`` و *force* برابر ``False`` باشد، زمینه به زمینه پیش‌فرض تنظیم می‌شود." diff --git a/library/os.path.po b/library/os.path.po index 29e47a25..a497c9cb 100644 --- a/library/os.path.po +++ b/library/os.path.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-21 13:24+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -107,6 +108,9 @@ msgstr "" ">>> os.path.commonpath(['/usr/lib', '/usr/local/lib'])\n" "'/usr'" +msgid "Deprecated in favor of :func:`os.path.commonpath` for path prefixes. The :func:`os.path.commonprefix` function is being deprecated due to having a misleading name and module. The function is not safe to use for path prefixes despite being included in a module about path manipulation, meaning it is easy to accidentally introduce path traversal vulnerabilities into Python programs by using this function." +msgstr "منسوخ شده است و به جای آن برای پیشوندهای مسیر باید از :func:`os.path.commonpath` استفاده کنید. تابع :func:`os.path.commonprefix` به این دلیل منسوخ می‌شود که نام و ماژول گمراه‌کننده‌ای دارد. استفاده از این تابع برای پیشوندهای مسیر امن نیست، علی‌رغم اینکه در ماژولی مربوط به دستکاری مسیر قرار دارد، به این معنی که با استفاده از این تابع به‌سادگی می‌توان آسیب‌پذیری‌های پیمایش مسیر را به‌طور تصادفی وارد برنامه‌های پایتون کرد." + msgid "Return the directory name of pathname *path*. This is the first element of the pair returned by passing *path* to the function :func:`split`." msgstr "نام پوشه‌ی مسیر *path* را برمی‌گرداند. این نخستین عنصر از جفتی است که با فرستادن *path* به تابع :func:`split` برگردانده می‌شود." @@ -258,8 +262,8 @@ msgstr "برخی از خطاهایی که به این روش مدیریت می msgid "This behavior can be modified by keyword arguments:" msgstr "این رفتار را می‌توان با آرگومان‌های کلیدواژه‌ای تغییر داد:" -msgid "If *strict* is ``True``, the first error encountered when evaluating the path is re-raised. In particular, :exc:`FileNotFoundError` is raised if *path* does not exist, or another :exc:`OSError` if it is otherwise inaccessible." -msgstr "اگر *strict* برابر ``True`` باشد، اولین خطای مواجه‌شده هنگام ارزیابی مسیر دوباره پرتاب می‌شود. به‌ویژه، اگر *path* وجود نداشته باشد، :exc:`FileNotFoundError` پرتاب می‌شود، یا اگر به دلایل دیگر در دسترس نباشد، یک :exc:`OSError` دیگر پرتاب می‌شود." +msgid "If *strict* is ``True``, the first error encountered when evaluating the path is re-raised. In particular, :exc:`FileNotFoundError` is raised if *path* does not exist, or another :exc:`OSError` if it is otherwise inaccessible. If *strict* is :data:`ALL_BUT_LAST`, the last component of the path is allowed to be missing, but all other errors are raised." +msgstr "اگر *strict* برابر با ``True`` باشد، نخستین خطای مواجه‌شده هنگام ارزیابی مسیر مجدداً بالا برده می‌شود. به‌طور خاص، اگر *path* وجود نداشته باشد، خطای :exc:`FileNotFoundError` بالا برده می‌شود، یا اگر به شکل دیگری غیرقابل‌دسترس باشد، خطای :exc:`OSError` دیگری بالا برده می‌شود. اگر *strict* برابر با :data:`ALL_BUT_LAST` باشد، اجازه داده می‌شود که آخرین جزء مسیر گم شده باشد، اما تمام خطاهای دیگر بالا برده می‌شوند." msgid "If *strict* is :py:data:`os.path.ALLOW_MISSING`, errors other than :exc:`FileNotFoundError` are re-raised (as with ``strict=True``). Thus, the returned path will not contain any symbolic links, but the named file and some of its parent directories may be missing." msgstr "اگر *strict* برابر با :py:data:`os.path.ALLOW_MISSING` باشد، خطاهایی غیر از :exc:`FileNotFoundError` دوباره پرتاب می‌شوند (مانند ``strict=True``). بنابراین، مسیر بازگردانده‌شده شامل هیچ پیوند نمادینی نخواهد بود، اما ممکن است پرونده نام‌برده و برخی از پوشه‌های والد آن موجود نباشند." @@ -276,8 +280,8 @@ msgstr "پیوندهای نمادین و نقاط اتصال (junctions) اکن msgid "The *strict* parameter was added." msgstr "پارامتر *strict* افزوده شد." -msgid "The :py:data:`~os.path.ALLOW_MISSING` value for the *strict* parameter was added." -msgstr "مقدار :py:data:`~os.path.ALLOW_MISSING` برای پارامتر *strict* افزوده شد." +msgid "The :data:`ALL_BUT_LAST` and :data:`ALLOW_MISSING` values for the *strict* parameter was added." +msgstr "مقادیر :data:`ALL_BUT_LAST` و :data:`ALLOW_MISSING` برای پارامتر *strict* اضافه شدند." msgid "Special value used for the *strict* argument in :func:`realpath`." msgstr "مقدار ویژه‌ای که برای آرگومان *strict* در :func:`realpath` استفاده می‌شود." diff --git a/library/os.po b/library/os.po index 4786b844..27a68922 100644 --- a/library/os.po +++ b/library/os.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-12 15:04+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -89,6 +90,9 @@ msgstr "حالت UTF-8 پایتون" msgid "See :pep:`540` for more details." msgstr "برای جزئیات بیشتر به :pep:`540` مراجعه کنید." +msgid "Python UTF-8 mode is now enabled by default (:pep:`686`). It may be disabled by setting :envvar:`PYTHONUTF8=0 ` as an environment variable or by using the :option:`-X utf8=0 <-X>` command line option." +msgstr "حالت UTF-8 پایتون اکنون به‌طور پیش‌فرض فعال است (:pep:`686`). می‌توان آن را با تنظیم کردن :envvar:`PYTHONUTF8=0 ` به‌عنوان یک متغیر محیطی یا با استفاده از گزینه‌ی خط فرمان :option:`-X utf8=0 <-X>` غیرفعال کرد." + msgid "The Python UTF-8 Mode ignores the :term:`locale encoding` and forces the usage of the UTF-8 encoding:" msgstr "حالت UTF-8 پایتون، :term:`locale encoding` را نادیده می‌گیرد و استفاده از کدگذاری UTF-8 را اجباری می‌کند:" @@ -122,27 +126,15 @@ msgstr ":func:`os.fsdecode` و :func:`os.fsencode` از کدگذاری UTF-8 ا msgid ":func:`open`, :func:`io.open`, and :func:`codecs.open` use the UTF-8 encoding by default. However, they still use the strict error handler by default so that attempting to open a binary file in text mode is likely to raise an exception rather than producing nonsense data." msgstr ":func:`open`، :func:`io.open` و :func:`codecs.open` به‌طور پیش‌فرض از کدگذاری UTF-8 استفاده می‌کنند. با این حال، آن‌ها همچنان به‌طور پیش‌فرض از هندلر خطای سخت‌گیرانه (strict) استفاده می‌کنند، به‌طوری که تلاش برای باز کردن یک پرونده دودویی در حالت متنی احتمالاً به‌جای تولید داده‌های بی‌معنی، منجر به پرتاب استثنایی می‌شود." -msgid "The :ref:`Python UTF-8 Mode ` is enabled if the LC_CTYPE locale is ``C`` or ``POSIX`` at Python startup (see the :c:func:`PyConfig_Read` function)." -msgstr "اگر locale LC_CTYPE در زمان راه‌اندازی پایتون ``C`` یا ``POSIX`` باشد، :ref:`حالت UTF-8 پایتون ` فعال می‌شود (به تابع :c:func:`PyConfig_Read` مراجعه کنید)." - -msgid "It can be enabled or disabled using the :option:`-X utf8 <-X>` command line option and the :envvar:`PYTHONUTF8` environment variable." -msgstr "می‌توان آن را با استفاده از گزینه‌ی خط فرمان :option:`-X utf8 <-X>` و متغیر محیطی :envvar:`PYTHONUTF8` فعال یا غیرفعال کرد." - -msgid "If the :envvar:`PYTHONUTF8` environment variable is not set at all, then the interpreter defaults to using the current locale settings, *unless* the current locale is identified as a legacy ASCII-based locale (as described for :envvar:`PYTHONCOERCECLOCALE`), and locale coercion is either disabled or fails. In such legacy locales, the interpreter will default to enabling UTF-8 mode unless explicitly instructed not to do so." -msgstr "اگر متغیر محیطی :envvar:`PYTHONUTF8` اصلاً تنظیم نشده باشد، مفسر به‌طور پیش‌فرض از تنظیمات محیط locale فعلی استفاده می‌کند، *مگر اینکه* محیط locale فعلی به‌عنوان یک محیط locale قدیمی مبتنی بر ASCII شناسایی شود (همان‌طور که برای :envvar:`PYTHONCOERCECLOCALE` توضیح داده شده است) و اجبار محیط locale (locale coercion) غیرفعال باشد یا با شکست مواجه شود. در این‌گونه محیط‌های locale قدیمی، مفسر به‌طور پیش‌فرض حالت UTF-8 را فعال می‌کند، مگر اینکه صریحاً دستور داده شود که این کار انجام نشود." +msgid "The :ref:`Python UTF-8 Mode ` is enabled by default. It can be disabled using the :option:`-X utf8=0 <-X>` command line option or the :envvar:`PYTHONUTF8=0 ` environment variable. The Python UTF-8 Mode can only be disabled at Python startup. Its value can be read from :data:`sys.flags.utf8_mode `." +msgstr ":ref:`حالت UTF-8 پایتون ` به‌طور پیش‌فرض فعال است. می‌توان آن را با استفاده از گزینه‌ی خط فرمان :option:`-X utf8=0 <-X>` یا متغیر محیطی :envvar:`PYTHONUTF8=0 ` غیرفعال کرد. حالت UTF-8 پایتون را فقط می‌توان در زمان راه‌اندازی پایتون غیرفعال کرد. مقدار آن را می‌توان از :data:`sys.flags.utf8_mode ` خواند." -msgid "The Python UTF-8 Mode can only be enabled at the Python startup. Its value can be read from :data:`sys.flags.utf8_mode `." -msgstr "حالت UTF-8 پایتون فقط در زمان راه‌اندازی پایتون می‌تواند فعال شود. مقدار آن را می‌توان از :data:`sys.flags.utf8_mode ` خواند." +msgid "If the UTF-8 mode is disabled, the interpreter defaults to using the current locale settings, *unless* the current locale is identified as a legacy ASCII-based locale (as described for :envvar:`PYTHONCOERCECLOCALE`), and locale coercion is either disabled or fails. In such legacy locales, the interpreter will default to enabling UTF-8 mode unless explicitly instructed not to do so." +msgstr "اگر حالت UTF-8 غیرفعال باشد، مفسر به صورت پیش‌فرض از تنظیمات locale فعلی استفاده می‌کند، *مگر اینکه* locale فعلی به عنوان یک locale قدیمی مبتنی بر اسکی شناخته شود (همان‌طور که برای :envvar:`PYTHONCOERCECLOCALE` توصیف شده است)، و تبدیل ضمنی نوع یا غیرفعال باشد یا با شکست مواجه شود. در چنین localeهای قدیمی‌ای، مفسر به صورت پیش‌فرض حالت UTF-8 را فعال می‌کند، مگر اینکه صراحتاً دستور دیگری داده شده باشد." msgid "See also the :ref:`UTF-8 mode on Windows ` and the :term:`filesystem encoding and error handler`." msgstr "همچنین :ref:`حالت UTF-8 در ویندوز ` و :term:`filesystem encoding and error handler` را ببینید." -msgid ":pep:`686`" -msgstr ":pep:`686`" - -msgid "Python 3.15 will make :ref:`utf8-mode` default." -msgstr "پایتون 3.15 :ref:`utf8-mode` را پیش‌فرض خواهد کرد." - msgid "Process Parameters" msgstr "پارامترهای فرایند" @@ -176,8 +168,17 @@ msgstr "فراخوانی مستقیم :func:`putenv` باعث تغییر :data:` msgid "On some platforms, including FreeBSD and macOS, setting ``environ`` may cause memory leaks. Refer to the system documentation for :c:func:`!putenv`." msgstr "در برخی از سکوها، از جمله FreeBSD و macOS، تنظیم ``environ`` ممکن است موجب نشتی حافظه شود. برای :c:func:`!putenv` به مستندات سیستم مراجعه کنید." -msgid "You can delete items in this mapping to unset environment variables. :func:`unsetenv` will be called automatically when an item is deleted from :data:`os.environ`, and when one of the :meth:`pop` or :meth:`clear` methods is called." -msgstr "شما می‌توانید آیتم‌های این نگاشت را حذف کنید تا متغیرهای محیطی از حالت تنظیم خارج شوند. :func:`unsetenv` به‌طور خودکار هنگامی که آیتمی از :data:`os.environ` حذف شود، و هنگامی که یکی از متدهای :meth:`pop` یا :meth:`clear` فراخوانی شود، فراخوانی می‌شود." +msgid "You can delete items in this mapping to unset environment variables. :func:`unsetenv` will be called automatically when an item is deleted from :data:`os.environ`, and when one of the :meth:`~dict.pop` or :meth:`~dict.clear` methods is called." +msgstr "شما می‌توانید آیتم‌های موجود در این نگاشت را برای حذف تنظیمات متغیرهای محیطی پاک کنید. :func:`unsetenv` به طور خودکار زمانی که یک آیتم از :data:`os.environ` حذف شود و همچنین زمانی که یکی از متدهای :meth:`~dict.pop` یا :meth:`~dict.clear` فراخوانی شود، فراخوانی خواهد شد." + +msgid "If the :manpage:`clearenv(3)` function is available, the :meth:`~dict.clear` method uses it and emits a single ``os._clearenv`` audit event. Otherwise, it emits an ``os.unsetenv`` event on each deleted variable." +msgstr "اگر تابع :manpage:`clearenv(3)` موجود باشد، متد :meth:`~dict.clear` از آن استفاده می‌کند و یک رویداد حسابرسی واحدِ ``os._clearenv`` را صادر می‌کند. در غیر این صورت، به ازای هر متغیر حذف‌شده، یک رویداد ``os.unsetenv`` صادر می‌کند." + +msgid "Raises an :ref:`auditing event ` ``os.unsetenv`` with argument ``key``." +msgstr "یک :ref:`رویداد حسابرسی ` ``os.unsetenv`` را با آرگومان ``key`` پرتاب می‌کند." + +msgid "Raises an :ref:`auditing event ` ``os._clearenv`` with no arguments." +msgstr "یک رویداد ممیزی :ref:`auditing event ` به نام ``os._clearenv`` بدون هیچ آرگومان بالا می‌برد." msgid "The :func:`os.reload_environ` function." msgstr "تابع :func:`os.reload_environ`." @@ -185,6 +186,9 @@ msgstr "تابع :func:`os.reload_environ`." msgid "Updated to support :pep:`584`'s merge (``|``) and update (``|=``) operators." msgstr "به‌روزرسانی شد تا از عملگرهای ادغام (``|``) و به‌روزرسانی (``|=``) در :pep:`584` پشتیبانی کند." +msgid "The :meth:`~dict.clear` method can now emit an ``os._clearenv`` audit event." +msgstr "متد :meth:`~dict.clear` اکنون می‌تواند یک رویداد حسابرسی ``os._clearenv`` صادر کند." + msgid "Bytes version of :data:`environ`: a :term:`mapping` object where both keys and values are :class:`bytes` objects representing the process environment. :data:`environ` and :data:`environb` are synchronized (modifying :data:`environb` updates :data:`environ`, and vice versa)." msgstr "نسخه‌ی بایتی :data:`environ`: یک شیء :term:`mapping` که در آن هم کلیدها و هم مقدارها، اشیای :class:`bytes` نشان‌دهنده‌ی محیط فرایند هستند. :data:`environ` و :data:`environb` همگام هستند (تغییر دادن :data:`environb`، :data:`environ` را به‌روزرسانی می‌کند و بالعکس)." @@ -263,8 +267,8 @@ msgstr "فهرست شناسه‌های گروه را برمی‌گرداند ک msgid "Return list of supplemental group ids associated with the current process." msgstr "فهرستی از شناسه‌های گروه تکمیلی مرتبط با فرایند جاری را برمی‌گرداند." -msgid "On macOS, :func:`getgroups` behavior differs somewhat from other Unix platforms. If the Python interpreter was built with a deployment target of ``10.5`` or earlier, :func:`getgroups` returns the list of effective group ids associated with the current user process; this list is limited to a system-defined number of entries, typically 16, and may be modified by calls to :func:`setgroups` if suitably privileged. If built with a deployment target greater than ``10.5``, :func:`getgroups` returns the current group access list for the user associated with the effective user id of the process; the group access list may change over the lifetime of the process, it is not affected by calls to :func:`setgroups`, and its length is not limited to 16. The deployment target value, :const:`MACOSX_DEPLOYMENT_TARGET`, can be obtained with :func:`sysconfig.get_config_var`." -msgstr "در macOS، رفتار :func:`getgroups` تا حدی با سایر پلتفرم‌های Unix متفاوت است. اگر مفسر Python با هدف استقرار (deployment target) ``10.5`` یا قدیمی‌تر ساخته شده باشد، :func:`getgroups` فهرست شناسه‌های گروه مؤثر مرتبط با فرایند کاربر جاری را برمی‌گرداند؛ این فهرست به تعداد ورودی‌های تعریف‌شده توسط سیستم محدود است، که معمولاً ۱۶ است، و در صورت داشتن امتیازات کافی ممکن است توسط فراخوانی‌های :func:`setgroups` تغییر کند. اگر با هدف استقرار بزرگ‌تر از ``10.5`` ساخته شده باشد، :func:`getgroups` فهرست دسترسی گروه جاری برای کاربر مرتبط با شناسه کاربر مؤثر فرایند را برمی‌گرداند؛ فهرست دسترسی گروه ممکن است در طول عمر فرایند تغییر کند، تحت تأثیر فراخوانی‌های :func:`setgroups` قرار نمی‌گیرد، و طول آن به ۱۶ محدود نیست. می‌توان مقدار هدف استقرار، :const:`MACOSX_DEPLOYMENT_TARGET`، را با :func:`sysconfig.get_config_var` به دست آورد." +msgid "On macOS, :func:`getgroups` behavior differs somewhat from other Unix platforms. If the Python interpreter was built with a deployment target of ``10.5`` or earlier, :func:`getgroups` returns the list of effective group ids associated with the current user process; this list is limited to a system-defined number of entries, typically 16, and may be modified by calls to :func:`setgroups` if suitably privileged. If built with a deployment target greater than ``10.5``, :func:`getgroups` returns the current group access list for the user associated with the effective user id of the process; the group access list may change over the lifetime of the process, it is not affected by calls to :func:`setgroups`, and its length is not limited to 16. The deployment target value can be obtained with :func:`sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') `." +msgstr "در سیستم‌عامل macOS، رفتار :func:`getgroups` تا حدی با سایر پلتفرم‌های یونیکس متفاوت است. اگر مفسر پایتون با هدف استقرار (deployment target) ``10.5`` یا نسخه‌های قبل‌تر ساخته شده باشد، :func:`getgroups` فهرست شناسه‌های گروه مؤثر مرتبط با فرایند کاربر فعلی را برمی‌گرداند؛ این فهرست به تعداد مشخص‌شده‌ای از ورودی‌ها توسط سیستم، به طور معمول ۱۶، محدود شده است و ممکن است با فراخوانی‌های :func:`setgroups` در صورت داشتن مجوزهای مناسب تغییر کند. اگر با هدف استقراری بزرگ‌تر از ``10.5`` ساخته شده باشد، :func:`getgroups` فهرست دسترسی گروه فعلی را برای کاربر مرتبط با شناسه‌ی کاربر مؤثر فرایند برمی‌گرداند؛ فهرست دسترسی گروه ممکن است در طول عمر فرایند تغییر کند، تحت تأثیر فراخوانی‌های :func:`setgroups` قرار نمی‌گیرد و طول آن به ۱۶ محدود نمی‌شود. مقدار هدف استقرار را می‌توان با :func:`sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') ` به دست آورد." msgid "Return the name of the user logged in on the controlling terminal of the process. For most purposes, it is more useful to use :func:`getpass.getuser` since the latter checks the environment variables :envvar:`LOGNAME` or :envvar:`USERNAME` to find out who the user is, and falls back to ``pwd.getpwuid(os.getuid())[0]`` to get the login name of the current real user id." msgstr "نام کاربر واردشده به پایانه کنترل‌کننده فرایند را برمی‌گرداند. در بیشتر موارد، استفاده از :func:`getpass.getuser` مفیدتر است، زیرا این تابع متغیرهای محیطی :envvar:`LOGNAME` یا :envvar:`USERNAME` را بررسی می‌کند تا مشخص کند کاربر کیست، و به‌عنوان جایگزین، برای دریافت نام ورود شناسه کاربر واقعی فعلی از ``pwd.getpwuid(os.getuid())[0]`` استفاده می‌کند." @@ -440,9 +444,6 @@ msgstr "متغیر محیطی با نام *key* را حذف (unset) می‌کن msgid "Deletion of items in :data:`os.environ` is automatically translated into a corresponding call to :func:`unsetenv`; however, calls to :func:`unsetenv` don't update :data:`os.environ`, so it is actually preferable to delete items of :data:`os.environ`." msgstr "حذف آیتم‌ها از :data:`os.environ` به‌طور خودکار به یک فراخوانی متناظر از :func:`unsetenv` تبدیل می‌شود؛ با این حال، فراخوانی‌های :func:`unsetenv`، :data:`os.environ` را به‌روزرسانی نمی‌کنند، بنابراین در واقع بهتر است آیتم‌های :data:`os.environ` را حذف کنید." -msgid "Raises an :ref:`auditing event ` ``os.unsetenv`` with argument ``key``." -msgstr "یک :ref:`رویداد حسابرسی ` ``os.unsetenv`` را با آرگومان ``key`` پرتاب می‌کند." - msgid "The function is now always available and is also available on Windows." msgstr "این تابع اکنون همیشه در دسترس است و در ویندوز نیز در دسترس است." @@ -795,6 +796,9 @@ msgstr ":data:`RWF_HIPRI`" msgid ":data:`RWF_NOWAIT`" msgstr ":data:`RWF_NOWAIT`" +msgid ":data:`RWF_DONTCACHE`" +msgstr ":data:`RWF_DONTCACHE`" + msgid "Return the total number of bytes actually read which can be less than the total capacity of all the objects." msgstr "تعداد کل بایت‌های واقعاً خوانده‌شده را برمی‌گرداند که می‌تواند کمتر از ظرفیت کل همه‌ی شیء‌ها باشد." @@ -819,6 +823,12 @@ msgstr "خواندن/نوشتن با اولویت بالا. به سامانه ف msgid "Currently, on Linux, this feature is usable only on a file descriptor opened using the :data:`O_DIRECT` flag." msgstr "در حال حاضر، در لینوکس، این قابلیت فقط برای توصیف‌گر پرونده‌ای که با پرچم :data:`O_DIRECT` باز شده است، قابل استفاده است." +msgid "Use uncached buffered IO." +msgstr "استفاده از IO با بافر بدون کش." + +msgid "Write data atomically. Requires alignment to the device's atomic write unit." +msgstr "نوشتن داده‌ها به‌صورت اتمی. نیازمند هم‌راستایی با واحد نوشتن اتمی دستگاه است." + msgid "Return the name of the slave pseudo-terminal device associated with the master pseudo-terminal device to which the file descriptor *fd* refers. The file descriptor *fd* is not closed upon failure." msgstr "نام دستگاه شبه‌پایانه پیرو (slave pseudo-terminal device) مرتبط با دستگاه شبه‌پایانه اصلی (master pseudo-terminal device) که توصیف‌گر پرونده *fd* به آن اشاره می‌کند را برمی‌گرداند. توصیف‌گر پرونده *fd* در صورت شکست بسته نمی‌شود." @@ -843,6 +853,9 @@ msgstr ":data:`RWF_SYNC`" msgid ":data:`RWF_APPEND`" msgstr ":data:`RWF_APPEND`" +msgid ":data:`RWF_ATOMIC`" +msgstr ":data:`RWF_ATOMIC`" + msgid "Return the total number of bytes actually written." msgstr "تعداد کل بایت‌های واقعاً نوشته‌شده را برمی‌گرداند." @@ -1318,6 +1331,9 @@ msgstr "پارامتر *path* اختیاری شد." msgid "Added support for specifying *path* as an open file descriptor." msgstr "پشتیبانی از مشخص کردن *path* به‌عنوان یک توصیف‌گر پرونده باز (open file descriptor) افزوده شد." +msgid "``os.listdir(-1)`` now fails with ``OSError(errno.EBADF)`` rather than listing the current directory." +msgstr "تابع ``os.listdir(-1)`` اکنون به‌جای فهرست کردن پوشه‌ی جاری، با خطای ``OSError(errno.EBADF)`` مواجه می‌شود." + msgid "Return a list containing the names of drives on a Windows system." msgstr "فهرستی شامل نام درایوهای یک سیستم ویندوزی را برمی‌گرداند." @@ -1405,6 +1421,9 @@ msgstr "پارامتر *mode* برای ایجاد پوشه برگ به :func:`mk msgid "If *exist_ok* is ``False`` (the default), a :exc:`FileExistsError` is raised if the target directory already exists." msgstr "اگر *exist_ok* برابر ``False`` (پیش‌فرض) باشد، در صورتی که پوشه هدف از قبل وجود داشته باشد، یک :exc:`FileExistsError` پرتاب می‌شود." +msgid "If *parent_mode* is not ``None``, it is used as the mode for any newly-created, intermediate-level directories. Like *mode*, it is combined with the process's umask value; see :ref:`the mkdir() description `. Otherwise, intermediate directories are created with the default mode, which is also subject to the umask." +msgstr "اگر *parent_mode* مقدار ``None`` نباشد، به‌عنوان حالت برای هر پوشه‌ی سطح میانیِ تازه ایجادشده استفاده می‌شود. مانند *mode*، این مقدار با مقدار umask فرایند ترکیب می‌شود؛ :ref:`توضیحات mkdir() ` را ببینید. در غیر این صورت، پوشه‌های میانی با حالت پیش‌فرض ایجاد می‌شوند که آن نیز تابع umask است." + msgid ":func:`makedirs` will become confused if the path elements to create include :data:`pardir` (eg. \"..\" on UNIX systems)." msgstr "اگر عناصر مسیری که باید ایجاد شوند شامل :data:`pardir` باشند (برای مثال \"..\" در سیستم‌های UNIX)، :func:`makedirs` دچار سردرگمی می‌شود." @@ -1420,24 +1439,30 @@ msgstr "پیش از پایتون 3.4.1، اگر *exist_ok* برابر ``True`` msgid "The *mode* argument no longer affects the file permission bits of newly created intermediate-level directories." msgstr "آرگومان *mode* دیگر بر بیت‌های مجوز فایلِ پوشه‌های سطح میانی تازه ایجادشده تأثیر نمی‌گذارد." +msgid "The *parent_mode* parameter. To match the behavior from Python 3.6 and earlier (where *mode* was applied to all created directories), pass ``parent_mode=mode``." +msgstr "پارامتر *parent_mode*. برای تطبیق با رفتار پایتون ۳.۶ و نسخه‌های پیشین (که در آن‌ها *mode* روی تمام پوشه‌های ایجادشده اعمال می‌شد)، مقدار ``parent_mode=mode`` را ارسال کنید." + msgid "Create a FIFO (a named pipe) named *path* with numeric mode *mode*. The current umask value is first masked out from the mode." msgstr "یک FIFO (یک پایپ نام‌دار) به نام *path* با حالت عددی *mode* ایجاد می‌کند. مقدار فعلی umask ابتدا از حالت نقاب می‌شود." msgid "FIFOs are pipes that can be accessed like regular files. FIFOs exist until they are deleted (for example with :func:`os.unlink`). Generally, FIFOs are used as rendezvous between \"client\" and \"server\" type processes: the server opens the FIFO for reading, and the client opens it for writing. Note that :func:`mkfifo` doesn't open the FIFO --- it just creates the rendezvous point." msgstr "FIFOها پایپ‌هایی هستند که می‌توان مانند پرونده‌های معمولی به آن‌ها دسترسی داشت. FIFOها تا حذف شدنشان وجود دارند (برای مثال با :func:`os.unlink`). به‌طور کلی، FIFOها به‌عنوان محل ملاقات بین فرایندهای نوع «کلاینت» و «سرور» استفاده می‌شوند: سرور FIFO را برای خواندن باز می‌کند و کلاینت آن را برای نوشتن باز می‌کند. توجه داشته باشید که :func:`mkfifo` FIFO را باز نمی‌کند — فقط محل ملاقات را ایجاد می‌کند." -msgid "Create a filesystem node (file, device special file or named pipe) named *path*. *mode* specifies both the permissions to use and the type of node to be created, being combined (bitwise OR) with one of ``stat.S_IFREG``, ``stat.S_IFCHR``, ``stat.S_IFBLK``, and ``stat.S_IFIFO`` (those constants are available in :mod:`stat`). For ``stat.S_IFCHR`` and ``stat.S_IFBLK``, *device* defines the newly created device special file (probably using :func:`os.makedev`), otherwise it is ignored." -msgstr "یک گره سامانه فایل‌بندی (پرونده، پرونده ویژه دستگاه یا پایپ نام‌دار) به نام *path* ایجاد کنید. *mode* هم مجوزهای مورد استفاده و هم نوع گرهی که ایجاد می‌شود را مشخص می‌کند و به‌صورت OR بیتی با یکی از ``stat.S_IFREG``، ``stat.S_IFCHR``، ``stat.S_IFBLK`` و ``stat.S_IFIFO`` ترکیب می‌شود (این ثابت‌ها در :mod:`stat` در دسترس هستند). برای ``stat.S_IFCHR`` و ``stat.S_IFBLK``، *device* پرونده ویژه دستگاهی را که به‌تازگی ایجاد شده است تعریف می‌کند (احتمالاً با استفاده از :func:`os.makedev`)، در غیر این صورت نادیده گرفته می‌شود." +msgid "Create a filesystem node (file, device special file or named pipe) named *path*. *mode* specifies both the permissions to use and the type of node to be created, being combined (bitwise OR) with one of :const:`stat.S_IFREG`, :const:`stat.S_IFCHR`, :const:`stat.S_IFBLK`, and :const:`stat.S_IFIFO`. For :const:`stat.S_IFCHR` and :const:`stat.S_IFBLK`, *device* defines the newly created device special file (probably using :func:`os.makedev`), otherwise it is ignored." +msgstr "یک گره سامانه فایل‌بندی (پرونده، پرونده‌ی خاص دستگاه یا پایپ نام‌گذاری‌شده) به نام *path* ایجاد کنید. *mode* هم مجوزهایی که باید استفاده شوند و هم نوع گره‌ای که باید ایجاد شود را مشخص می‌کند و با یکی از ثابت‌های :const:`stat.S_IFREG`، :const:`stat.S_IFCHR`، :const:`stat.S_IFBLK` و :const:`stat.S_IFIFO` ترکیب (OR بیتی) می‌شود. برای :const:`stat.S_IFCHR` و :const:`stat.S_IFBLK`، *device* پرونده‌ی خاص دستگاه تازه‌تولیدشده را تعریف می‌کند (احتمالاً با استفاده از :func:`os.makedev`)، در غیر این صورت نادیده گرفته می‌شود." -msgid "Extract the device major number from a raw device number (usually the :attr:`st_dev` or :attr:`st_rdev` field from :c:struct:`stat`)." -msgstr "شماره اصلی دستگاه را از یک شماره خام دستگاه استخراج کنید (معمولاً فیلد :attr:`st_dev` یا :attr:`st_rdev` از :c:struct:`stat`)." +msgid "Extract the device major number from a raw device number (usually the :attr:`~stat_result.st_dev` or :attr:`~stat_result.st_rdev` field from :c:struct:`stat`)." +msgstr "شماره‌ی اصلی دستگاه را از یک شماره‌ی دستگاه خام استخراج کنید (معمولاً فیلد :attr:`~stat_result.st_dev` یا :attr:`~stat_result.st_rdev` از :c:struct:`stat`)." -msgid "Extract the device minor number from a raw device number (usually the :attr:`st_dev` or :attr:`st_rdev` field from :c:struct:`stat`)." -msgstr "شماره فرعی دستگاه را از یک شماره خام دستگاه استخراج کنید (معمولاً فیلد :attr:`st_dev` یا :attr:`st_rdev` از :c:struct:`stat`)." +msgid "Extract the device minor number from a raw device number (usually the :attr:`~stat_result.st_dev` or :attr:`~stat_result.st_rdev` field from :c:struct:`stat`)." +msgstr "شماره‌ی فرعی دستگاه را از یک شماره‌ی دستگاه خام استخراج کنید (معمولاً فیلد :attr:`~stat_result.st_dev` یا :attr:`~stat_result.st_rdev` از :c:struct:`stat`)." msgid "Compose a raw device number from the major and minor device numbers." msgstr "یک شماره‌ی دستگاه خام را از شماره‌های دستگاه اصلی و فرعی تشکیل دهید." +msgid "Non-existent device." +msgstr "دستگاه ناموجود." + msgid "Return system configuration information relevant to a named file. *name* specifies the configuration value to retrieve; it may be a string which is the name of a defined system value; these names are specified in a number of standards (POSIX.1, Unix 95, Unix 98, and others). Some platforms define additional names as well. The names known to the host operating system are given in the ``pathconf_names`` dictionary. For configuration variables not included in that mapping, passing an integer for *name* is also accepted." msgstr "اطلاعات پیکربندی سیستم مربوط به یک پرونده نام‌گذاری‌شده را برمی‌گرداند. *name* مقدار پیکربندی برای بازیابی را مشخص می‌کند؛ ممکن است یک رشته باشد که نام یک مقدار سیستمی تعریف‌شده است؛ این نام‌ها در تعدادی از استانداردها مشخص شده‌اند (POSIX.1، Unix 95، Unix 98 و سایر موارد). برخی سکوها نیز نام‌های اضافی تعریف می‌کنند. نام‌های شناخته‌شده برای سیستم‌عامل میزبان در دیکشنری ``pathconf_names`` آمده‌اند. برای متغیرهای پیکربندی که در آن نگاشت گنجانده نشده‌اند، ارسال یک عدد صحیح برای *name* نیز پذیرفته می‌شود." @@ -1569,6 +1594,9 @@ msgstr "این تابع یک :term:`path-like object` را می‌پذیرد." msgid "Added support for :ref:`file descriptors ` on Unix." msgstr "پشتیبانی از :ref:`توصیف‌گرهای پرونده ` در یونیکس افزوده شد." +msgid "``os.scandir(-1)`` now fails with ``OSError(errno.EBADF)`` rather than listing the current directory." +msgstr "تابع ``os.scandir(-1)`` اکنون به‌جای فهرست کردن پوشه‌ی جاری، با خطای ``OSError(errno.EBADF)`` مواجه می‌شود." + msgid "Object yielded by :func:`scandir` to expose the file path and other file attributes of a directory entry." msgstr "شیء‌ای که توسط :func:`scandir` تولید می‌شود تا مسیر پرونده و سایر ویژگی‌های فایلِ یک ورودیِ پوشه را در دسترس قرار دهد." @@ -1852,8 +1880,8 @@ msgstr "عضو :attr:`st_fstype` برای Solaris و مشتقات آن افزو msgid "Added the :attr:`st_reparse_tag` member on Windows." msgstr "عضو :attr:`st_reparse_tag` در ویندوز اضافه شد." -msgid "On Windows, the :attr:`st_mode` member now identifies special files as :const:`S_IFCHR`, :const:`S_IFIFO` or :const:`S_IFBLK` as appropriate." -msgstr "در ویندوز، عضو :attr:`st_mode` اکنون پرونده‌های ویژه را حسب مورد به‌عنوان :const:`S_IFCHR`، :const:`S_IFIFO` یا :const:`S_IFBLK` شناسایی می‌کند." +msgid "On Windows, the :attr:`st_mode` member now identifies special files as :const:`~stat.S_IFCHR`, :const:`~stat.S_IFIFO` or :const:`~stat.S_IFBLK` as appropriate." +msgstr "در ویندوز، عضو :attr:`st_mode` اکنون پرونده‌های خاص را در صورت لزوم به عنوان :const:`~stat.S_IFCHR`، :const:`~stat.S_IFIFO` یا :const:`~stat.S_IFBLK` شناسایی می‌کند." msgid "On Windows, :attr:`st_ctime` is deprecated. Eventually, it will contain the last metadata change time, for consistency with other platforms, but for now still contains creation time. Use :attr:`st_birthtime` for the creation time." msgstr "در ویندوز، :attr:`st_ctime` منسوخ شده است. در نهایت، این ویژگی برای سازگاری با سایر سکوها، شامل زمان آخرین تغییر فراداده خواهد شد، اما در حال حاضر همچنان شامل زمان ایجاد است. برای زمان ایجاد از :attr:`st_birthtime` استفاده کنید." @@ -1867,6 +1895,147 @@ msgstr "در ویندوز، :attr:`st_rdev` دیگر مقداری برنمی‌ msgid "Added the :attr:`st_birthtime` member on Windows." msgstr "عضو :attr:`st_birthtime` در ویندوز افزوده شد." +msgid "Get the status of a file or file descriptor by performing a :c:func:`!statx` system call on the given path." +msgstr "وضعیت یک پرونده یا توصیف‌گر پرونده را با اجرای یک فراخوانی سیستمی :c:func:`!statx` روی مسیر داده‌شده دریافت کنید." + +msgid "*path* is a :term:`path-like object` or an open file descriptor. *mask* is a combination of the module-level :const:`STATX_* ` constants specifying the information to retrieve. *flags* is a combination of the module-level :const:`AT_STATX_* ` constants and/or :const:`AT_NO_AUTOMOUNT`. Returns a :class:`statx_result` object whose :attr:`~os.statx_result.stx_mask` attribute specifies the information actually retrieved (which may differ from *mask*)." +msgstr "پارامتر *path* یک :term:`شیء شبه‌مسیر ` یا یک توصیف‌گر پرونده‌ی باز است. پارامتر *mask* ترکیبی از ثابت‌های سطح ماژول :const:`STATX_* ` است که اطلاعاتی را که باید بازیابی شوند مشخص می‌کند. پارامتر *flags* ترکیبی از ثابت‌های سطح ماژول :const:`AT_STATX_* ` و/یا :const:`AT_NO_AUTOMOUNT` است. این تابع یک شیء :class:`statx_result` برمی‌گرداند که ویژگی :attr:`~os.statx_result.stx_mask` در آن، اطلاعاتی را که در واقعیت بازیابی شده‌اند مشخص می‌کند (که ممکن است با *mask* متفاوت باشد)." + +msgid "This function supports :ref:`specifying a file descriptor `, :ref:`paths relative to directory descriptors `, and :ref:`not following symlinks `." +msgstr "این تابع از :ref:`مشخص کردن یک توصیف‌گر پرونده `، :ref:`مسیرهای نسبی به توصیف‌گرهای دایرکتوری ` و :ref:`دنبال نکردن پیوندهای نمادین ` پشتیبانی می‌کند." + +msgid "The :manpage:`statx(2)` man page." +msgstr "صفحه‌ی راهنمای :manpage:`statx(2)`." + +msgid "Information about a file returned by :func:`os.statx`." +msgstr "اطلاعات مربوط به یک پرونده که توسط :func:`os.statx` برگردانده شده است." + +msgid ":class:`!statx_result` has the following attributes:" +msgstr "کلاس :class:`!statx_result` دارای ویژگی‌های زیر است:" + +msgid "Equal to ``None`` if :data:`STATX_ATIME` is missing from :attr:`~statx_result.stx_mask`." +msgstr "اگر :data:`STATX_ATIME` در :attr:`~statx_result.stx_mask` وجود نداشته باشد، برابر با ``None`` است." + +msgid "Maximum iovecs for direct I/O with torn-write protection." +msgstr "حداکثر تعداد iovec برای ورودی/خروجی مستقیم با حفاظت در برابر نوشتن ناقص (torn-write)." + +msgid "Equal to ``None`` if :data:`STATX_WRITE_ATOMIC` is missing from :attr:`~statx_result.stx_mask`." +msgstr "اگر :data:`STATX_WRITE_ATOMIC` از :attr:`~statx_result.stx_mask` حذف شده باشد برابر با ``None`` است." + +msgid "Maximum size for direct I/O with torn-write protection." +msgstr "حداکثر اندازه‌ی ورودی/خروجی مستقیم با محافظت در برابر نوشتن ناقص (torn-write)." + +msgid "Maximum optimized size for direct I/O with torn-write protection." +msgstr "حداکثر اندازه‌ی بهینه‌سازی‌شده برای ورودی/خروجی مستقیم با محافظت در برابر نوشتن ناقص (torn-write)." + +msgid "Minimum size for direct I/O with torn-write protection." +msgstr "حداقل اندازه‌ی ورودی/خروجی مستقیم با محافظت در برابر نوشتن ناقص (torn-write)." + +msgid "Bitmask of :const:`STATX_ATTR_* ` constants specifying the attributes of this file." +msgstr "نقاب بیتی از ثابت‌های :const:`STATX_ATTR_* ` که ویژگی‌های این پرونده را مشخص می‌کنند." + +msgid "A mask indicating which bits in :attr:`stx_attributes` are supported by the VFS and the filesystem." +msgstr "نقابی که نشان می‌دهد کدام بیت‌ها در :attr:`stx_attributes` توسط VFS و سامانه‌ی فایل‌بندی پشتیبانی می‌شوند." + +msgid "Number of 512-byte blocks allocated for file. This may be smaller than :attr:`stx_size`/512 when the file has holes." +msgstr "تعداد بلوک‌های ۵۱۲ بایتی تخصیص‌داده‌شده برای پرونده. هنگامی که پرونده دارای حفره باشد، این مقدار ممکن است کوچک‌تر از :attr:`stx_size`/512 باشد." + +msgid "Equal to ``None`` if :data:`STATX_BLOCKS` is missing from :attr:`~statx_result.stx_mask`." +msgstr "اگر :data:`STATX_BLOCKS` از :attr:`~statx_result.stx_mask` حذف شده باشد برابر با ``None`` است." + +msgid "Time of file creation expressed in seconds." +msgstr "زمان ایجاد پرونده به ثانیه." + +msgid "Equal to ``None`` if :data:`STATX_BTIME` is missing from :attr:`~statx_result.stx_mask`." +msgstr "اگر :data:`STATX_BTIME` از :attr:`~statx_result.stx_mask` حذف شده باشد برابر با ``None`` است." + +msgid "Time of file creation expressed in nanoseconds as an integer." +msgstr "زمان ایجاد پرونده به نانوثانیه به شکل یک عدد صحیح." + +msgid "Equal to ``None`` if :data:`STATX_CTIME` is missing from :attr:`~statx_result.stx_mask`." +msgstr "اگر :data:`STATX_CTIME` از :attr:`~statx_result.stx_mask` حذف شده باشد برابر با ``None`` است." + +msgid "Major number of the device on which this file resides." +msgstr "شماره‌ی اصلی دستگاهی که این پرونده روی آن قرار دارد." + +msgid "Minor number of the device on which this file resides." +msgstr "شماره‌ی فرعی دستگاهی که این پرونده روی آن قرار دارد." + +msgid "Direct I/O memory buffer alignment requirement." +msgstr "الزام تراز حافظه‌ی بافر ورودی/خروجی مستقیم." + +msgid "Equal to ``None`` if :data:`STATX_DIOALIGN` is missing from :attr:`~statx_result.stx_mask`." +msgstr "اگر :data:`STATX_DIOALIGN` از :attr:`~statx_result.stx_mask` حذف شده باشد برابر با ``None`` است." + +msgid "Direct I/O file offset alignment requirement." +msgstr "الزام تراز آفست پرونده‌ی ورودی/خروجی مستقیم." + +msgid "Direct I/O file offset alignment requirement for reads." +msgstr "الزام تراز آفست پرونده‌ی ورودی/خروجی مستقیم برای عملیات خواندن." + +msgid "Equal to ``None`` if :data:`STATX_DIO_READ_ALIGN` is missing from :attr:`~statx_result.stx_mask`." +msgstr "اگر :data:`STATX_DIO_READ_ALIGN` از :attr:`~statx_result.stx_mask` حذف شده باشد برابر با ``None`` است." + +msgid "Equal to ``None`` if :data:`STATX_GID` is missing from :attr:`~statx_result.stx_mask`." +msgstr "اگر :data:`STATX_GID` از :attr:`~statx_result.stx_mask` حذف شده باشد برابر با ``None`` است." + +msgid "Inode number." +msgstr "شماره‌ی آی‌نود." + +msgid "Equal to ``None`` if :data:`STATX_INO` is missing from :attr:`~statx_result.stx_mask`." +msgstr "اگر :data:`STATX_INO` از :attr:`~statx_result.stx_mask` حذف شده باشد برابر با ``None`` است." + +msgid "Bitmask of :const:`STATX_* ` constants specifying the information retrieved, which may differ from what was requested." +msgstr "نقاب بیتی از ثابت‌های :const:`STATX_* ` که اطلاعات بازیابی‌شده را مشخص می‌کند، که ممکن است با مقدار درخواست‌شده متفاوت باشد." + +msgid "Mount identifier." +msgstr "شناسه‌ی سوارکردن (Mount)." + +msgid "Equal to ``None`` if :data:`STATX_MNT_ID` is missing from :attr:`~statx_result.stx_mask`." +msgstr "اگر :data:`STATX_MNT_ID` از :attr:`~statx_result.stx_mask` حذف شده باشد برابر با ``None`` است." + +msgid "Equal to ``None`` if :data:`STATX_TYPE | STATX_MODE ` is missing from :attr:`~statx_result.stx_mask`." +msgstr "اگر :data:`STATX_TYPE | STATX_MODE ` از :attr:`~statx_result.stx_mask` حذف شده باشد برابر با ``None`` است." + +msgid "Equal to ``None`` if :data:`STATX_MTIME` is missing from :attr:`~statx_result.stx_mask`." +msgstr "اگر :data:`STATX_MTIME` از :attr:`~statx_result.stx_mask` حذف شده باشد برابر با ``None`` است." + +msgid "Equal to ``None`` if :data:`STATX_NLINK` is missing from :attr:`~statx_result.stx_mask`." +msgstr "اگر :data:`STATX_NLINK` در :attr:`~statx_result.stx_mask` وجود نداشته باشد، برابر با ``None`` است." + +msgid "Major number of the device this file represents." +msgstr "شماره‌ی اصلی دستگاهی که این پرونده نشان می‌دهد." + +msgid "Minor number of the device this file represents." +msgstr "شماره‌ی فرعی دستگاهی که این پرونده نشان می‌دهد." + +msgid "Equal to ``None`` if :data:`STATX_SIZE` is missing from :attr:`~statx_result.stx_mask`." +msgstr "اگر :data:`STATX_SIZE` در :attr:`~statx_result.stx_mask` وجود نداشته باشد، برابر با ``None`` است." + +msgid "Subvolume identifier." +msgstr "شناسه‌ی زیرحجم (Subvolume)." + +msgid "Equal to ``None`` if :data:`STATX_SUBVOL` is missing from :attr:`~statx_result.stx_mask`." +msgstr "اگر :data:`STATX_SUBVOL` در :attr:`~statx_result.stx_mask` وجود نداشته باشد، برابر با ``None`` است." + +msgid "Equal to ``None`` if :data:`STATX_UID` is missing from :attr:`~statx_result.stx_mask`." +msgstr "اگر :data:`STATX_UID` در :attr:`~statx_result.stx_mask` وجود نداشته باشد، برابر با ``None`` است." + +msgid "Bitflags for use in the *mask* parameter to :func:`os.statx`. Some of these flags may be available even when their corresponding members in :class:`statx_result` are not available." +msgstr "پرچم‌های بیتی برای استفاده در پارامتر *mask* در تابع :func:`os.statx`. برخی از این پرچم‌ها ممکن است حتی زمانی که اعضای متناظر آن‌ها در :class:`statx_result` در دسترس نیستند، قابل استفاده باشند." + +msgid "A flag for the :func:`os.statx` function. Requests that the kernel return up-to-date information even when doing so is expensive (for example, requiring a round trip to the server for a file on a network filesystem)." +msgstr "پرچمی برای تابع :func:`os.statx`. درخواست می‌کند که هسته (kernel) اطلاعات به‌روز را برگرداند، حتی زمانی که انجام این کار پرهزینه باشد (برای مثال، نیازمند یک رفت‌وبرگشت به سرور برای یک پرونده روی سامانه فایل‌بندی شبکه‌ای باشد)." + +msgid "A flag for the :func:`os.statx` function. Requests that the kernel return cached information if possible." +msgstr "پرچمی برای تابع :func:`os.statx`. در صورت امکان، درخواست می‌کند که هسته (kernel) اطلاعات کش‌شده را برگرداند." + +msgid "A flag for the :func:`os.statx` function. This flag is defined as ``0``, so it has no effect, but it can be used to explicitly indicate neither :data:`AT_STATX_FORCE_SYNC` nor :data:`AT_STATX_DONT_SYNC` is being passed. In the absence of the other two flags, the kernel will generally return information as fresh as :func:`os.stat` would return." +msgstr "پرچمی برای تابع :func:`os.statx`. این پرچم به عنوان ``0`` تعریف شده است، بنابراین هیچ تأثیری ندارد، اما می‌توان از آن برای نشان دادن صریح این موضوع استفاده کرد که نه :data:`AT_STATX_FORCE_SYNC` و نه :data:`AT_STATX_DONT_SYNC` در حال ارسال هستند. در غیاب دو پرچم دیگر، هسته معمولاً اطلاعاتی به تازگیِ آن چه :func:`os.stat` برمی‌گرداند را بازخواهد گرداند." + +msgid "If the final component of a path is an automount point, operate on the automount point instead of performing the automount. On Linux, :func:`os.stat`, :func:`os.fstat` and :func:`os.lstat` always behave this way." +msgstr "اگر جزء نهایی یک مسیر یک نقطه‌ی خودکارگذاری (automount) باشد، به جای انجام خودکارگذاری، روی خود نقطه‌ی خودکارگذاری عمل کنید. در لینوکس، :func:`os.stat`، :func:`os.fstat` و :func:`os.lstat` همیشه به همین صورت رفتار می‌کنند." + msgid "Perform a :manpage:`statvfs(3)` system call on the given path. The return value is a :class:`statvfs_result` whose attributes describe the filesystem on the given path and correspond to the members of the :c:struct:`statvfs` structure." msgstr "یک فراخوانی سیستمی :manpage:`statvfs(3)` روی مسیر داده‌شده انجام می‌دهد. مقدار بازگشتی یک :class:`statvfs_result` است که ویژگی‌های آن، سامانه فایل‌بندی در مسیر داده‌شده را توصیف می‌کنند و با اعضای ساختار :c:struct:`statvfs` مطابقت دارند." @@ -2032,8 +2201,8 @@ msgstr ":func:`utime` دو پارامتر اختیاری می‌پذیرد، *ti msgid "If *ns* is specified, it must be a 2-tuple of the form ``(atime_ns, mtime_ns)`` where each member is an int expressing nanoseconds." msgstr "اگر *ns* تعیین‌شده باشد، باید یک تاپل دوتایی به شکل ``(atime_ns, mtime_ns)`` باشد که هر عضو آن یک عدد صحیح بیانگر نانوثانیه باشد." -msgid "If *times* is not ``None``, it must be a 2-tuple of the form ``(atime, mtime)`` where each member is an int or float expressing seconds." -msgstr "اگر *times* برابر ``None`` نباشد، باید یک تاپل دوتایی به شکل ``(atime, mtime)`` باشد که هر عضو آن یک int یا float بیان‌کننده‌ی ثانیه‌ها است." +msgid "If *times* is not ``None``, it must be a 2-tuple of the form ``(atime, mtime)`` where each member is a real number expressing seconds, rounded down to nanoseconds." +msgstr "اگر *times* برابر با ``None`` نباشد، باید یک تاپل ۲تایی به شکل ``(atime, mtime)`` باشد که در آن هر عضو یک عدد حقیقی بیانگر ثانیه است که به نانوثانیه گرد شده است." msgid "If *times* is ``None`` and *ns* is unspecified, this is equivalent to specifying ``ns=(atime_ns, mtime_ns)`` where both times are the current time." msgstr "اگر *times* برابر ``None`` باشد و *ns* مشخص نشده باشد، این معادل مشخص کردن ``ns=(atime_ns, mtime_ns)`` است که در آن هر دو زمان، زمان فعلی هستند." @@ -2050,6 +2219,9 @@ msgstr "یک :ref:`رویداد حسابرسی ` ``os.utime`` را ب msgid "Added support for specifying *path* as an open file descriptor, and the *dir_fd*, *follow_symlinks*, and *ns* parameters." msgstr "پشتیبانی برای مشخص کردن *path* به‌عنوان یک توصیف‌گر پرونده باز، و پارامترهای *dir_fd*، *follow_symlinks* و *ns* افزوده شد." +msgid "Accepts any real numbers as *times*, not only integers or floats." +msgstr "هر اعداد حقیقی را به عنوان *times* می‌پذیرد، نه فقط اعداد صحیح یا اعداد اعشاری را." + msgid "Generate the file names in a directory tree by walking the tree either top-down or bottom-up. For each directory in the tree rooted at directory *top* (including *top* itself), it yields a 3-tuple ``(dirpath, dirnames, filenames)``." msgstr "نام پرونده‌های یک درخت پوشه را با پیمایش درخت از بالا به پایین یا از پایین به بالا تولید می‌کند. برای هر پوشه در درختی که ریشه آن پوشه *top* است (از جمله خود *top*)، یک ۳-تایی ``(dirpath, dirnames, filenames)`` برمی‌گرداند." @@ -2311,14 +2483,14 @@ msgstr ":const:`time.CLOCK_MONOTONIC`" msgid ":const:`time.CLOCK_BOOTTIME` (Since Linux 3.15 for timerfd_create)" msgstr ":const:`time.CLOCK_BOOTTIME` (از لینوکس 3.15 برای timerfd_create)" -msgid "If *clockid* is :const:`time.CLOCK_REALTIME`, a settable system-wide real-time clock is used. If the system clock is changed, the timer setting needs to be updated. To cancel the timer when the system clock is changed, see :const:`TFD_TIMER_CANCEL_ON_SET`." -msgstr "اگر *clockid* برابر با :const:`time.CLOCK_REALTIME` باشد، یک ساعت واقعی‌زمان سیستم‌گسترده قابل تنظیم استفاده می‌شود. اگر ساعت سیستم تغییر کند، تنظیم تایمر نیاز به به‌روزرسانی دارد. برای لغو تایمر هنگام تغییر ساعت سیستم، ببینید :const:`TFD_TIMER_CANCEL_ON_SET`." +msgid "If *clockid* is :const:`time.CLOCK_REALTIME`, a settable system-wide real-time clock is used. If system clock is changed, timer setting need to be updated. To cancel timer when system clock is changed, see :const:`TFD_TIMER_CANCEL_ON_SET`." +msgstr "اگر *clockid* برابر با :const:`time.CLOCK_REALTIME` باشد، از یک ساعت زمان واقعیِ سراسریِ سیستمِ قابل‌تنظیم استفاده می‌شود. اگر ساعت سیستم تغییر کند، باید تنظیمات تایمر به‌روزرسانی شود. برای لغو تایمر هنگامی که ساعت سیستم تغییر می‌کند، :const:`TFD_TIMER_CANCEL_ON_SET` را ببینید." msgid "If *clockid* is :const:`time.CLOCK_MONOTONIC`, a non-settable monotonically increasing clock is used. Even if the system clock is changed, the timer setting will not be affected." msgstr "اگر *clockid* برابر :const:`time.CLOCK_MONOTONIC` باشد، از ساعتی غیرقابل‌تنظیم استفاده می‌شود که به‌صورت یکنواخت افزایش می‌یابد. حتی اگر ساعت سیستم تغییر کند، تنظیم زمان‌سنج تحت تأثیر قرار نمی‌گیرد." -msgid "If *clockid* is :const:`time.CLOCK_BOOTTIME`, it is the same as :const:`time.CLOCK_MONOTONIC` except it includes any time that the system is suspended." -msgstr "اگر *clockid* برابر با :const:`time.CLOCK_BOOTTIME` باشد، همانند :const:`time.CLOCK_MONOTONIC` است، با تفاوت که هر زمانی که سیستم معلق است را نیز شامل می‌شود." +msgid "If *clockid* is :const:`time.CLOCK_BOOTTIME`, same as :const:`time.CLOCK_MONOTONIC` except it includes any time that the system is suspended." +msgstr "اگر *clockid* برابر با :const:`time.CLOCK_BOOTTIME` باشد، مشابه :const:`time.CLOCK_MONOTONIC` است با این تفاوت که شامل هر زمانی که سیستم به حالت تعلیق درآمده نیز می‌شود." msgid "The file descriptor's behaviour can be modified by specifying a *flags* value. Any of the following variables may be used, combined using bitwise OR (the ``|`` operator):" msgstr "می‌توان رفتار توصیف‌گر پرونده را با تعیین یک مقدار *flags* تغییر داد. می‌توان از هر یک از متغیرهای زیر استفاده کرد و آن‌ها را با OR بیتی (عملگر ``|``) ترکیب کرد:" @@ -2329,8 +2501,8 @@ msgstr ":const:`TFD_NONBLOCK`" msgid ":const:`TFD_CLOEXEC`" msgstr ":const:`TFD_CLOEXEC`" -msgid "If :const:`TFD_NONBLOCK` is not set as a flag, :func:`read` blocks until the timer expires. If it is set as a flag, :func:`read` doesn't block, but if there hasn't been an expiration since the last call to read, :func:`read` raises :class:`OSError` with ``errno`` set to :const:`errno.EAGAIN`." -msgstr "اگر :const:`TFD_NONBLOCK` به عنوان پرچم تنظیم نشده باشد، :func:`read` تا انقضای تایمر مسدود می‌ماند. اگر به عنوان پرچم تنظیم شده باشد، :func:`read` مسدود نمی‌شود، اما اگر از آخرین فراخوانی read انقضایی رخ نداده باشد، :func:`read` استثنای :class:`OSError` را با ``errno`` تنظیم‌شده بر :const:`errno.EAGAIN` پرتاب می‌کند." +msgid "If :const:`TFD_NONBLOCK` is not set as a flag, :func:`read` blocks until the timer expires. If it is set as a flag, :func:`read` doesn't block, but If there hasn't been an expiration since the last call to read, :func:`read` raises :class:`OSError` with ``errno`` is set to :const:`errno.EAGAIN`." +msgstr "اگر :const:`TFD_NONBLOCK` به عنوان یک پرچم تنظیم نشده باشد، :func:`read` تا زمان سررسیدن تایمر مسدود می‌ماند. اگر به عنوان یک پرچم تنظیم شده باشد، :func:`read` مسدود نمی‌شود، اما اگر از آخرین فراخوانی به read سررسیدی اتفاق نیفتاده باشد، :func:`read` یک استثنای :class:`OSError` با مقدار ``errno`` برابر با :const:`errno.EAGAIN` بالا می‌آورد." msgid ":const:`TFD_CLOEXEC` is always set by Python automatically." msgstr ":const:`TFD_CLOEXEC` همواره به‌صورت خودکار توسط پایتون تنظیم می‌شود." @@ -2356,20 +2528,20 @@ msgstr ":const:`TFD_TIMER_ABSTIME`" msgid ":const:`TFD_TIMER_CANCEL_ON_SET`" msgstr ":const:`TFD_TIMER_CANCEL_ON_SET`" -msgid "The timer is disabled by setting *initial* to zero (``0``). If *initial* is greater than zero, the timer is enabled. If *initial* is less than zero, it raises an :class:`OSError` exception with ``errno`` set to :const:`errno.EINVAL`." -msgstr "تایمر با تنظیم *initial* بر صفر (``0``) غیرفعال می‌شود. اگر *initial* بزرگتر از صفر باشد، تایمر فعال می‌شود. اگر *initial* کمتر از صفر باشد، یک استثنای :class:`OSError` با ``errno`` تنظیم‌شده بر :const:`errno.EINVAL` پرتاب می‌کند." +msgid "The timer is disabled by setting *initial* to zero (``0``). If *initial* is equal to or greater than zero, the timer is enabled. If *initial* is less than zero, it raises an :class:`OSError` exception with ``errno`` set to :const:`errno.EINVAL`" +msgstr "تایمر با صفر کردن *initial* (``0``) غیرفعال می‌شود. اگر *initial* بزرگ‌تر یا مساوی صفر باشد، تایمر فعال می‌شود. اگر *initial* کمتر از صفر باشد، یک استثنای :class:`OSError` با مقدار ``errno`` برابر با :const:`errno.EINVAL` بالا می‌آورد." -msgid "By default the timer will fire when *initial* seconds have elapsed." -msgstr "به‌صورت پیش‌فرض تایمر وقتی *initial* ثانیه سپری شود اجرا می‌شود." +msgid "By default the timer will fire when *initial* seconds have elapsed. (If *initial* is zero, timer will fire immediately.)" +msgstr "به طور پیش‌فرض، تایمر پس از سپری شدن *initial* ثانیه آتش می‌گیرد. (اگر *initial* صفر باشد، تایمر بلافاصله آتش می‌گیرد.)" msgid "However, if the :const:`TFD_TIMER_ABSTIME` flag is set, the timer will fire when the timer's clock (set by *clockid* in :func:`timerfd_create`) reaches *initial* seconds." msgstr "با این حال، اگر پرچم :const:`TFD_TIMER_ABSTIME` تنظیم شده باشد، تایمر زمانی فعال می‌شود که ساعت تایمر (که با *clockid* در :func:`timerfd_create` تنظیم می‌شود) به *initial* ثانیه برسد." -msgid "The timer's interval is set by the *interval* :py:class:`float`. If *interval* is zero, the timer only fires once, on the initial expiration. If *interval* is greater than zero, the timer fires every time *interval* seconds have elapsed since the previous expiration. If *interval* is less than zero, it raises :class:`OSError` with ``errno`` set to :const:`errno.EINVAL`." -msgstr "فاصله‌ی تایمر توسط *interval* :py:class:`float` تنظیم می‌شود. اگر *interval* صفر باشد، تایمر فقط یک‌بار در انقضای اولیه فعال می‌شود. اگر *interval* بزرگتر از صفر باشد، تایمر هر بار که *interval* ثانیه از انقضای قبلی گذشته باشد فعال می‌شود. اگر *interval* کمتر از صفر باشد، :class:`OSError` با ``errno`` تنظیم‌شده بر :const:`errno.EINVAL` پرتاب می‌شود." +msgid "The timer's interval is set by the *interval* real number. If *interval* is zero, the timer only fires once, on the initial expiration. If *interval* is greater than zero, the timer fires every time *interval* seconds have elapsed since the previous expiration. If *interval* is less than zero, it raises :class:`OSError` with ``errno`` set to :const:`errno.EINVAL`" +msgstr "بازهه‌ی تایمر توسط عدد حقیقی *interval* تنظیم می‌شود. اگر *interval* صفر باشد، تایمر فقط یک بار، در سررسید اولیه، آتش می‌گیرد. اگر *interval* بزرگ‌تر از صفر باشد، تایمر هر بار که پس از سررسید قبلی، *interval* ثانیه سپری شود، آتش می‌گیرد. اگر *interval* کمتر از صفر باشد، :class:`OSError` را با ``errno`` تنظیم‌شده روی :const:`errno.EINVAL` بالا می‌آورد." -msgid "If the :const:`TFD_TIMER_CANCEL_ON_SET` flag is set along with :const:`TFD_TIMER_ABSTIME` and the clock for this timer is :const:`time.CLOCK_REALTIME`, the timer is marked as cancelable if the real-time clock is changed discontinuously. Reading the descriptor is aborted with the error :const:`errno.ECANCELED`." -msgstr "اگر پرچم :const:`TFD_TIMER_CANCEL_ON_SET` با :const:`TFD_TIMER_ABSTIME` تنظیم شده باشد و ساعت این تایمر :const:`time.CLOCK_REALTIME` باشد، تایمر به‌عنوان قابل‌لغو علامت‌گذاری می‌شود اگر ساعت واقعی به‌صورت ناگهانی تغییر کند. خواندن توصیف‌گر با خطای :const:`errno.ECANCELED` متوقف می‌شود." +msgid "If the :const:`TFD_TIMER_CANCEL_ON_SET` flag is set along with :const:`TFD_TIMER_ABSTIME` and the clock for this timer is :const:`time.CLOCK_REALTIME`, the timer is marked as cancelable if the real-time clock is changed discontinuously. Reading the descriptor is aborted with the error ECANCELED." +msgstr "اگر پرچم :const:`TFD_TIMER_CANCEL_ON_SET` به همراه :const:`TFD_TIMER_ABSTIME` تنظیم شود و ساعت این تایمر :const:`time.CLOCK_REALTIME` باشد، در صورتی که ساعت زمان واقعی به طور ناپیوسته تغییر کند، تایمر به عنوان قابل‌لغو علامت‌گذاری می‌شود. خواندن توصیف‌گر با خطای ECANCELED متوقف می‌شود." msgid "Linux manages system clock as UTC. A daylight-savings time transition is done by changing time offset only and doesn't cause discontinuous system clock change." msgstr "لینوکس ساعت سیستم را به‌صورت UTC مدیریت می‌کند. انتقال ساعت تابستانی تنها با تغییر آفست زمان (time offset) انجام می‌شود و باعث تغییر ناپیوسته ساعت سیستم نمی‌شود." @@ -2443,6 +2615,9 @@ msgstr "فهرستی از ویژگی‌های توسعه‌یافته‌ی سا msgid "Raises an :ref:`auditing event ` ``os.listxattr`` with argument ``path``." msgstr "یک :ref:`رویداد حسابرسی ` ``os.listxattr`` را با آرگومان ``path`` پرتاب می‌کند." +msgid "``os.listxattr(-1)`` now fails with ``OSError(errno.EBADF)`` rather than listing extended attributes of the current directory." +msgstr "تابع ``os.listxattr(-1)`` اکنون به جای فهرست کردن ویژگی‌های توسعه‌یافته‌ی پوشه‌ی جاری، با خطای ``OSError(errno.EBADF)`` مواجه می‌شود." + msgid "Removes the extended filesystem attribute *attribute* from *path*. *attribute* should be bytes or str (directly or indirectly through the :class:`PathLike` interface). If it is a string, it is encoded with the :term:`filesystem encoding and error handler`." msgstr "ویژگی توسعه‌یافته‌ی سامانه فایل‌بندی *attribute* را از *path* حذف می‌کند. *attribute* باید از نوع bytes یا str باشد (مستقیماً یا به‌طور غیرمستقیم از طریق رابط :class:`PathLike`). اگر یک رشته باشد، با :term:`filesystem encoding and error handler` کدگذاری می‌شود." @@ -2476,8 +2651,8 @@ msgstr "می‌توان از این توابع برای ایجاد و مدیری msgid "The various :func:`exec\\* ` functions take a list of arguments for the new program loaded into the process. In each case, the first of these arguments is passed to the new program as its own name rather than as an argument a user may have typed on a command line. For the C programmer, this is the ``argv[0]`` passed to a program's :c:func:`main`. For example, ``os.execv('/bin/echo', ['foo', 'bar'])`` will only print ``bar`` on standard output; ``foo`` will seem to be ignored." msgstr "توابع گوناگون :func:`exec\\* ` فهرستی از آرگومان‌ها را برای برنامه جدیدی که در فرایند بارگذاری می‌شود دریافت می‌کنند. در هر مورد، نخستین آرگومان از این آرگومان‌ها به‌عنوان نام خود برنامه به برنامه جدید ارسال می‌شود، نه به‌عنوان آرگومانی که کاربر ممکن است در خط فرمان وارد کرده باشد. برای برنامه‌نویس C، این همان ``argv[0]`` است که به :c:func:`main` یک برنامه ارسال می‌شود. برای مثال، ``os.execv('/bin/echo', ['foo', 'bar'])`` تنها ``bar`` را در خروجی استاندارد چاپ می‌کند؛ به نظر می‌رسد که ``foo`` چشم‌پوشی شده است." -msgid "Generate a :const:`SIGABRT` signal to the current process. On Unix, the default behavior is to produce a core dump; on Windows, the process immediately returns an exit code of ``3``. Be aware that calling this function will not call the Python signal handler registered for :const:`SIGABRT` with :func:`signal.signal`." -msgstr "یک سیگنال :const:`SIGABRT` به فرایند جاری ارسال می‌کند. در یونیکس، رفتار پیش‌فرض تولید یک برون‌ریزی هسته است؛ در ویندوز، فرایند بلافاصله کد خروجی ``3`` را برمی‌گرداند. توجه داشته باشید که فراخوانی این تابع، هندلر سیگنال پایتونی را که برای :const:`SIGABRT` با :func:`signal.signal` ثبت شده است، فراخوانی نخواهد کرد." +msgid "Generate a :const:`~signal.SIGABRT` signal to the current process. On Unix, the default behavior is to produce a core dump; on Windows, the process immediately returns an exit code of ``3``. Be aware that calling this function will not call the Python signal handler registered for :const:`~signal.SIGABRT` with :func:`signal.signal`." +msgstr "تولید یک سیگنال :const:`~signal.SIGABRT` برای فرایند فعلی. روی یونیکس، رفتار پیش‌فرض تولید یک برون‌ریزی حافظه (core dump) است؛ روی ویندوز، فرایند بلافاصله یک کد خروج برابر با ``3`` برمی‌گرداند. آگاه باشید که فراخوانی این تابع، هندلر سیگنال پایتون ثبت‌شده برای :const:`~signal.SIGABRT` را با :func:`signal.signal` فراخوانی نخواهد کرد." msgid "Add a path to the DLL search path." msgstr "مسیری به مسیر جستجوی DLL اضافه کنید." @@ -2620,6 +2795,9 @@ msgstr "برای جزئیات فنی درباره‌ی اینکه چرا این msgid "Fork a child process, using a new pseudo-terminal as the child's controlling terminal. Return a pair of ``(pid, fd)``, where *pid* is ``0`` in the child, the new child's process id in the parent, and *fd* is the file descriptor of the master end of the pseudo-terminal. For a more portable approach, use the :mod:`pty` module. If an error occurs :exc:`OSError` is raised." msgstr "یک فرایند فرزند را با استفاده از یک شبه‌پایانه (pseudo-terminal) جدید به‌عنوان پایانه کنترل‌کننده فرزند fork می‌کند. یک جفت ``(pid, fd)`` را برمی‌گرداند، که در آن *pid* در فرزند ``0`` و در والد شناسه فرایند فرزند جدید است، و *fd* توصیف‌گر پرونده سمت اصلی شبه‌پایانه است. برای رویکرد قابل‌حمل‌تر، از ماژول :mod:`pty` استفاده کنید. در صورت بروز خطا، :exc:`OSError` پرتاب می‌شود." +msgid "The returned file descriptor *fd* is :ref:`non-inheritable `." +msgstr "توصیف‌گر پرونده‌ی *fd* بازگردانده‌شده از نوع :ref:`non-inheritable ` است." + msgid "Raises an :ref:`auditing event ` ``os.forkpty`` with no arguments." msgstr ":ref:`رویداد حسابرسی ` ``os.forkpty`` را بدون آرگومان پرتاب می‌کند." @@ -2629,6 +2807,9 @@ msgstr "فراخوانی ``forkpty()`` در یک زیرمفسر دیگر پشت msgid "If Python is able to detect that your process has multiple threads, this now raises a :exc:`DeprecationWarning`. See the longer explanation on :func:`os.fork`." msgstr "اگر پایتون بتواند تشخیص دهد که فرایند شما دارای چندین نخ است، این مورد اکنون یک :exc:`DeprecationWarning` پرتاب می‌کند. توضیح طولانی‌تر درباره‌ی :func:`os.fork` را ببینید." +msgid "The returned file descriptor is now made non-inheritable." +msgstr "توصیف‌گر پرونده‌ی بازگردانده‌شده اکنون به صورت غیرقابل‌به‌ارث‌بری (non-inheritable) درآمده است." + msgid "Send signal *sig* to the process *pid*. Constants for the specific signals available on the host platform are defined in the :mod:`signal` module." msgstr "سیگنال *sig* را به فرایند *pid* ارسال می‌کند. ثابت‌های مربوط به سیگنال‌های خاصی که روی پلتفرم میزبان در دسترس هستند، در ماژول :mod:`signal` تعریف شده‌اند." @@ -3421,3 +3602,18 @@ msgstr "جداکننده‌ی مسیر (POSIX)" msgid "; (semicolon)" msgstr "; (نقطه‌ویرگول)" + +#~ msgid "The :ref:`Python UTF-8 Mode ` is enabled if the LC_CTYPE locale is ``C`` or ``POSIX`` at Python startup (see the :c:func:`PyConfig_Read` function)." +#~ msgstr "اگر locale LC_CTYPE در زمان راه‌اندازی پایتون ``C`` یا ``POSIX`` باشد، :ref:`حالت UTF-8 پایتون ` فعال می‌شود (به تابع :c:func:`PyConfig_Read` مراجعه کنید)." + +#~ msgid "It can be enabled or disabled using the :option:`-X utf8 <-X>` command line option and the :envvar:`PYTHONUTF8` environment variable." +#~ msgstr "می‌توان آن را با استفاده از گزینه‌ی خط فرمان :option:`-X utf8 <-X>` و متغیر محیطی :envvar:`PYTHONUTF8` فعال یا غیرفعال کرد." + +#~ msgid "The Python UTF-8 Mode can only be enabled at the Python startup. Its value can be read from :data:`sys.flags.utf8_mode `." +#~ msgstr "حالت UTF-8 پایتون فقط در زمان راه‌اندازی پایتون می‌تواند فعال شود. مقدار آن را می‌توان از :data:`sys.flags.utf8_mode ` خواند." + +#~ msgid ":pep:`686`" +#~ msgstr ":pep:`686`" + +#~ msgid "Python 3.15 will make :ref:`utf8-mode` default." +#~ msgstr "پایتون 3.15 :ref:`utf8-mode` را پیش‌فرض خواهد کرد." diff --git a/library/pathlib.po b/library/pathlib.po index 40eb154d..565691c6 100644 --- a/library/pathlib.po +++ b/library/pathlib.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-23 06:56+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 17:37+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -741,15 +742,6 @@ msgstr "این متد مبتنی بر رشته است؛ نه به سامانه msgid "Passing additional arguments is deprecated; if supplied, they are joined with *other*." msgstr "ارسال آرگومان‌های اضافی منسوخ شده است؛ در صورت ارائه، به *other* پیوست می‌شوند." -msgid "With :class:`PureWindowsPath`, return ``True`` if the path is considered reserved under Windows, ``False`` otherwise. With :class:`PurePosixPath`, ``False`` is always returned." -msgstr "در :class:`PureWindowsPath`، اگر مسیر در ویندوز رزروشده محسوب شود، ``True`` و در غیر این صورت ``False`` برمی‌گرداند. در :class:`PurePosixPath`، همیشه ``False`` برگردانده می‌شود." - -msgid "Windows path names that contain a colon, or end with a dot or a space, are considered reserved. UNC paths may be reserved." -msgstr "نام مسیرهای ویندوزی که شامل دونقطه باشند، یا با نقطه یا فاصله پایان یابند، رزروشده محسوب می‌شوند. مسیرهای UNC ممکن است رزروشده باشند." - -msgid "This method is deprecated; use :func:`os.path.isreserved` to detect reserved paths on Windows." -msgstr "این متد منسوخ‌شده است؛ برای تشخیص مسیرهای رزروشده در ویندوز از :func:`os.path.isreserved` استفاده کنید." - msgid "Calling this method is equivalent to combining the path with each of the given *pathsegments* in turn::" msgstr "فراخوانی این متد معادل ترکیب مسیر با هر یک از *pathsegments* داده‌شده به‌نوبت است::" @@ -1696,6 +1688,9 @@ msgstr "یک پوشه جدید در این مسیر داده‌شده ایجاد msgid "If *parents* is true, any missing parents of this path are created as needed; they are created with the default permissions without taking *mode* into account (mimicking the POSIX ``mkdir -p`` command)." msgstr "اگر *parents* درست باشد، هر والدِ موجودنشده‌ای از این مسیر در صورت نیاز ایجاد می‌شود؛ آن‌ها با دسترسی‌های پیش‌فرض ایجاد می‌شوند، بدون اینکه *mode* در نظر گرفته شود (با تقلید از دستور ``mkdir -p`` در POSIX)." +msgid "If *parent_mode* is not ``None``, it is used as the mode for any newly-created, intermediate-level directories when *parents* is true. Like *mode*, it is combined with the process's ``umask`` value. Otherwise, intermediate directories are created with the default permissions (also subject to the umask)." +msgstr "اگر *parent_mode* برابر با ``None`` نباشد، هنگامی که *parents* برابر با true باشد، به عنوان حالت (mode) برای هر پوشه‌ی سطح میانیِ تازه‌ایجادشده استفاده می‌شود. مانند *mode*، این مقدار با مقدار ``umask`` فرایند ترکیب می‌شود. در غیر این صورت، پوشه‌های میانی با مجوزهای پیش‌فرض ایجاد می‌شوند (که آن‌ها نیز مشمول umask هستند)." + msgid "If *parents* is false (the default), a missing parent raises :exc:`FileNotFoundError`." msgstr "اگر *parents* نادرست باشد (پیش‌فرض)، نبودِ یک والد باعث پرتاب :exc:`FileNotFoundError` می‌شود." @@ -1708,6 +1703,9 @@ msgstr "اگر *exist_ok* درست باشد، :exc:`FileExistsError` پرتاب msgid "The *exist_ok* parameter was added." msgstr "پارامتر *exist_ok* اضافه شد." +msgid "The *parent_mode* parameter." +msgstr "پارامتر *parent_mode*." + msgid "Make this path a symbolic link pointing to *target*." msgstr "این مسیر را به یک پیوند نمادین اشاره‌کننده به *target* تبدیل کنید." @@ -2262,6 +2260,15 @@ msgstr "مسیر" msgid "operations" msgstr "عملیات" +#~ msgid "With :class:`PureWindowsPath`, return ``True`` if the path is considered reserved under Windows, ``False`` otherwise. With :class:`PurePosixPath`, ``False`` is always returned." +#~ msgstr "در :class:`PureWindowsPath`، اگر مسیر در ویندوز رزروشده محسوب شود، ``True`` و در غیر این صورت ``False`` برمی‌گرداند. در :class:`PurePosixPath`، همیشه ``False`` برگردانده می‌شود." + +#~ msgid "Windows path names that contain a colon, or end with a dot or a space, are considered reserved. UNC paths may be reserved." +#~ msgstr "نام مسیرهای ویندوزی که شامل دونقطه باشند، یا با نقطه یا فاصله پایان یابند، رزروشده محسوب می‌شوند. مسیرهای UNC ممکن است رزروشده باشند." + +#~ msgid "This method is deprecated; use :func:`os.path.isreserved` to detect reserved paths on Windows." +#~ msgstr "این متد منسوخ‌شده است؛ برای تشخیص مسیرهای رزروشده در ویندوز از :func:`os.path.isreserved` استفاده کنید." + #~ msgid "" #~ ">>> PurePath()\n" #~ "PurePosixPath('.')" diff --git a/library/pdb.po b/library/pdb.po index 8fa7952d..4833a35d 100644 --- a/library/pdb.po +++ b/library/pdb.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-21 13:27+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -428,8 +429,8 @@ msgstr "" msgid "To remove all commands from a breakpoint, type ``commands`` and follow it immediately with ``end``; that is, give no commands." msgstr "برای حذف همه‌ی دستورات از یک نقطه توقف، ``commands`` را وارد کنید و بلافاصله پس از آن ``end`` را وارد کنید؛ یعنی هیچ دستوری ندهید." -msgid "With no *bpnumber* argument, ``commands`` refers to the last breakpoint set." -msgstr "بدون آرگومان *bpnumber*، ``commands`` به آخرین نقطه توقف تنظیم‌شده اشاره می‌کند." +msgid "With no *bpnumber* argument, ``commands`` refers to the most recently set breakpoint that still exists." +msgstr "بدون آرگومان *bpnumber*، عبارت ``commands`` به نقطه‌شکستی اشاره می‌کند که اخیراً تنظیم شده و همچنان وجود دارد." 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 "می‌توانید از دستورهای نقطه توقف برای شروع دوباره برنامه خود استفاده کنید. کافی است از دستور :pdbcmd:`continue`، یا :pdbcmd:`step`، یا هر دستور دیگری که اجرا را از سر می‌گیرد، استفاده کنید." diff --git a/library/pickletools.po b/library/pickletools.po index d0e6da23..004793f7 100644 --- a/library/pickletools.po +++ b/library/pickletools.po @@ -7,12 +7,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-11 12:33+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -87,6 +88,9 @@ msgstr "هنگامی که بیش از یک پرونده پیکل مشخص شده msgid "A pickle file to read, or ``-`` to indicate reading from standard input." msgstr "یک پرونده pickle برای خواندن، یا ``-`` برای نشان دادن خواندن از ورودی استاندارد." +msgid "Output is in color by default and can be :ref:`controlled using environment variables `." +msgstr "خروجی به صورت پیش‌فرض رنگی است و می‌توان آن را :ref:`با استفاده از متغیرهای محیطی کنترل کرد `." + msgid "Programmatic interface" msgstr "رابط برنامه‌نویسی" diff --git a/library/pkgutil.po b/library/pkgutil.po index 47af2326..e65a91ab 100644 --- a/library/pkgutil.po +++ b/library/pkgutil.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 08:19+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -170,12 +171,21 @@ msgstr "``W(.W)*``" msgid "``W(.W)*:(W(.W)*)?``" msgstr "``W(.W)*:(W(.W)*)?``" +msgid "``W(.W)*:(W(.W)*)``" +msgstr "``W(.W)*:(W(.W)*)``" + msgid "The first form is intended for backward compatibility only. It assumes that some part of the dotted name is a package, and the rest is an object somewhere within that package, possibly nested inside other objects. Because the place where the package stops and the object hierarchy starts can't be inferred by inspection, repeated attempts to import must be done with this form." msgstr "شکل اول فقط برای سازگاری با نسخه‌های پیشین در نظر گرفته شده است. این شکل فرض می‌کند که بخشی از نام نقطه‌دار یک بسته است و باقی‌مانده، شیءای در جایی درون آن بسته است که ممکن است درون اشیاء دیگر تودرتو شده باشد. از آنجا که نمی‌توان با بازرسی استنتاج کرد که بسته کجا تمام می‌شود و سلسله‌مراتب اشیاء آغاز می‌گردد، تلاش‌های مکرر برای ایمپورت باید با این شکل انجام شوند." msgid "In the second form, the caller makes the division point clear through the provision of a single colon: the dotted name to the left of the colon is a package to be imported, and the dotted name to the right is the object hierarchy within that package. Only one import is needed in this form. If it ends with the colon, then a module object is returned." msgstr "در شکل دوم، فراخواننده با قرار دادن یک دونقطه، نقطه جداسازی را مشخص می‌کند: نام نقطه‌دار سمت چپ دونقطه، بسته‌ای است که باید ایمپورت شود، و نام نقطه‌دار سمت راست، سلسله‌مراتب شیء درون آن بسته است. در این شکل فقط به یک ایمپورت نیاز است. اگر با دونقطه پایان یابد، یک شیء ماژول برگردانده می‌شود." +msgid "The first two forms are accepted when ``strict=False`` (the default)." +msgstr "دو فرم اول زمانی پذیرفته می‌شوند که ``strict=False`` باشد (حالت پیش‌فرض)." + +msgid "The third form requires both the module name and callable, separated by a colon. Only this form is accepted when ``strict=True``." +msgstr "فرم سوم نیازمند نام ماژول و شیء فراخوانی‌پذیر است که با یک علامت دو‌نقطه (colon) از هم جدا شده‌اند. فقط این فرم است که وقتی ``strict=True`` باشد پذیرفته می‌شود." + msgid "The function will return an object (which might be a module), or raise one of the following exceptions:" msgstr "این تابع یک شیء را برمی‌گرداند (که ممکن است یک ماژول باشد)، یا یکی از استثناهای زیر را پرتاب می‌کند:" @@ -187,3 +197,6 @@ msgstr ":exc:`ImportError` -- اگر ایمپورتی زمانی که نباید msgid ":exc:`AttributeError` -- If a failure occurred when traversing the object hierarchy within the imported package to get to the desired object." msgstr ":exc:`AttributeError` -- اگر خطایی هنگام پیمایش سلسله‌مراتب اشیاء درون بسته‌ی ایمپورت‌شده برای رسیدن به شیء مورد نظر رخ داد." + +msgid "The optional keyword-only ``strict`` flag was added." +msgstr "پرچم اختیاری و فقط-کلیدواژه‌ی ``strict`` اضافه شد." diff --git a/library/platform.po b/library/platform.po index d44a8829..dd31cbfa 100644 --- a/library/platform.po +++ b/library/platform.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 01:11+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -151,18 +151,6 @@ msgstr ":attr:`processor` به‌جای حل بلافاصله، با تأخیر msgid "Clear out the internal cache of information, such as the :func:`uname`. This is typically useful when the platform's :func:`node` is changed by an external process and one needs to retrieve the updated value." msgstr "نهانگاه داخلی اطلاعاتی مانند :func:`uname` را پاک کنید. این کار معمولاً زمانی مفید است که :func:`node` پلتفرم توسط یک فرآیند خارجی تغییر کرده باشد و لازم باشد مقدار به‌روزشده را بازیابی کنید." -msgid "Java platform" -msgstr "سکوی جاوا" - -msgid "Version interface for Jython." -msgstr "رابط نسخه برای Jython." - -msgid "Returns a tuple ``(release, vendor, vminfo, osinfo)`` with *vminfo* being a tuple ``(vm_name, vm_release, vm_vendor)`` and *osinfo* being a tuple ``(os_name, os_version, os_arch)``. Values which cannot be determined are set to the defaults given as parameters (which all default to ``''``)." -msgstr "یک تاپل ``(release, vendor, vminfo, osinfo)`` برمی‌گرداند که در آن *vminfo* یک تاپل ``(vm_name, vm_release, vm_vendor)`` و *osinfo* یک تاپل ``(os_name, os_version, os_arch)`` است. مقادیری که نمی‌توان آن‌ها را تعیین کرد، به پیش‌فرض‌هایی که به‌عنوان پارامتر داده شده‌اند تنظیم می‌شوند (که همگی به‌طور پیش‌فرض ``''`` هستند)." - -msgid "It was largely untested, had a confusing API, and was only useful for Jython support." -msgstr "این تا حد زیادی آزمایش‌نشده بود، API گیج‌کننده‌ای داشت و فقط برای پشتیبانی از Jython مفید بود." - msgid "Windows platform" msgstr "سکوی ویندوز" @@ -302,3 +290,15 @@ msgstr "اطلاعات پلتفرم را بدون استفاده از نام م msgid "You can also pass one or more positional arguments (``terse``, ``nonaliased``) to explicitly control the output format. These behave similarly to their corresponding options." msgstr "همچنین می‌توانید یک یا چند آرگومان جایگاهی (``terse``، ``nonaliased``) را برای کنترل صریح قالب خروجی ارسال کنید. این آرگومان‌ها مشابه گزینه‌های متناظر خود رفتار می‌کنند." + +#~ msgid "Java platform" +#~ msgstr "سکوی جاوا" + +#~ msgid "Version interface for Jython." +#~ msgstr "رابط نسخه برای Jython." + +#~ msgid "Returns a tuple ``(release, vendor, vminfo, osinfo)`` with *vminfo* being a tuple ``(vm_name, vm_release, vm_vendor)`` and *osinfo* being a tuple ``(os_name, os_version, os_arch)``. Values which cannot be determined are set to the defaults given as parameters (which all default to ``''``)." +#~ msgstr "یک تاپل ``(release, vendor, vminfo, osinfo)`` برمی‌گرداند که در آن *vminfo* یک تاپل ``(vm_name, vm_release, vm_vendor)`` و *osinfo* یک تاپل ``(os_name, os_version, os_arch)`` است. مقادیری که نمی‌توان آن‌ها را تعیین کرد، به پیش‌فرض‌هایی که به‌عنوان پارامتر داده شده‌اند تنظیم می‌شوند (که همگی به‌طور پیش‌فرض ``''`` هستند)." + +#~ msgid "It was largely untested, had a confusing API, and was only useful for Jython support." +#~ msgstr "این تا حد زیادی آزمایش‌نشده بود، API گیج‌کننده‌ای داشت و فقط برای پشتیبانی از Jython مفید بود." diff --git a/library/plistlib.po b/library/plistlib.po index 6737f08c..936b7155 100644 --- a/library/plistlib.po +++ b/library/plistlib.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 12:43+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -33,8 +34,8 @@ msgstr "**کد منبع:** :source:`Lib/plistlib.py`" msgid "This module provides an interface for reading and writing the \"property list\" files used by Apple, primarily on macOS and iOS. This module supports both binary and XML plist files." msgstr "این ماژول رابطی برای خواندن و نوشتن پرونده‌های «فهرست ویژگی» (property list) فراهم می‌کند که اپل عمدتاً در macOS و iOS از آن‌ها استفاده می‌کند. این ماژول از هر دو نوع پرونده plist دودویی و XML پشتیبانی می‌کند." -msgid "The property list (``.plist``) file format is a simple serialization supporting basic object types, like dictionaries, lists, numbers and strings. Usually the top level object is a dictionary." -msgstr "قالب پرونده فهرست ویژگی‌ها (``.plist``) یک سریال‌سازی ساده است که از انواع پایه‌ای شیء، مانند دیکشنری‌ها، فهرست‌ها، اعداد و رشته‌ها پشتیبانی می‌کند. معمولاً شیء سطح بالا یک دیکشنری است." +msgid "The property list (``.plist``) file format is a simple serialization supporting basic object types, like dictionaries, lists, numbers and strings. Usually the top level object is a dictionary or a frozen dictionary." +msgstr "ساختار پرونده‌ی فهرست ویژگی‌ها (``.plist``) یک سریال‌سازی ساده است که از انواع داده‌ی پایه‌ای مانند دیکشنری‌ها، فهرست‌ها، اعداد و رشته‌ها پشتیبانی می‌کند. معمولاً شیء سطح بالا یک دیکشنری یا دیکشنری فریز‌شده است." msgid "To write out and to parse a plist file, use the :func:`dump` and :func:`load` functions." msgstr "برای نوشتن و تجزیه یک پرونده plist، از توابع :func:`dump` و :func:`load` استفاده کنید." diff --git a/library/pprint.po b/library/pprint.po index 05fa5dee..24d40611 100644 --- a/library/pprint.po +++ b/library/pprint.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 08:13+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -66,8 +67,11 @@ msgstr "حداکثر تعداد مطلوب نویسه‌ها در هر خط از msgid "The number of nesting levels which may be printed. If the data structure being printed is too deep, the next contained level is replaced by ``...``. If ``None`` (the default), there is no constraint on the depth of the objects being formatted." msgstr "تعداد سطوح تودرتویی که ممکن است چاپ شوند. اگر ساختار داده‌ای که چاپ می‌شود بیش از حد عمیق باشد، سطح داخلی بعدی با ``...`` جایگزین می‌شود. اگر ``None`` (پیش‌فرض) باشد، هیچ محدودیتی بر عمق اشیاء قالب‌بندی‌شده وجود ندارد." -msgid "Control the way long :term:`sequences ` are formatted. If ``False`` (the default), each item of a sequence will be formatted on a separate line, otherwise as many items as will fit within the *width* will be formatted on each output line." -msgstr "نحوه قالب‌بندی :term:`دنباله‌های ` طولانی را کنترل کنید. اگر ``False`` (پیش‌فرض) باشد، هر آیتم از یک دنباله در یک خط جداگانه قالب‌بندی می‌شود، در غیر این صورت، در هر خط خروجی، هر تعداد آیتم که در *width* جا شوند قالب‌بندی می‌شوند." +msgid "Control the way long :term:`sequences ` are formatted. If ``False`` (the default), each item of a sequence will be formatted on a separate line, otherwise as many items as will fit within the *width* will be formatted on each output line. Incompatible with *expand*." +msgstr "نحوه‌ی قالب‌بندی :term:`دنباله‌های ` طولانی را کنترل کنید. اگر ``False`` باشد (پیش‌فرض)، هر آیتم از دنباله در یک سطر جداگانه قالب‌بندی می‌شود؛ در غیر این صورت، تا جایی که ممکن است آیتم‌ها در محدوده‌ی *width* روی هر سطر خروجی جای بگیرند قالب‌بندی خواهند شد. این ویژگی با *expand* سازگار نیست." + +msgid "If ``True``, opening parentheses and brackets will be followed by a newline and the following content will be indented by one level, similar to pretty-printed JSON. Incompatible with *compact*." +msgstr "اگر ``True`` باشد، پرانتزها و قلاب‌های بازشونده با یک خط جدید دنبال خواهند شد و محتوای بعدی به اندازه‌ی یک سطح فرورفته خواهد شد، شبیه به JSON قالب‌بندی‌شده و خوانا. با *compact* ناسازگار است." msgid "If ``True``, dictionaries will be formatted with their keys sorted, otherwise they will be displayed in insertion order (the default)." msgstr "اگر ``True`` باشد، دیکشنری‌ها با کلیدهای مرتب‌شده قالب‌بندی می‌شوند، در غیر این صورت به ترتیب درج نمایش داده می‌شوند (پیش‌فرض)." @@ -78,8 +82,8 @@ msgstr "اگر ``True`` باشد، اعداد صحیح با نویسه ``_`` ب msgid "Alias for :func:`~pprint.pp` with *sort_dicts* set to ``True`` by default, which would automatically sort the dictionaries' keys, you might want to use :func:`~pprint.pp` instead where it is ``False`` by default." msgstr "نام مستعاری برای :func:`~pprint.pp` که *sort_dicts* به‌طور پیش‌فرض روی ``True`` تنظیم شده است و کلیدهای دیکشنری‌ها را به‌صورت خودکار مرتب می‌کند؛ ممکن است بخواهید به‌جای آن از :func:`~pprint.pp` استفاده کنید که در آن این گزینه به‌طور پیش‌فرض ``False`` است." -msgid "Return the formatted representation of *object* as a string. *indent*, *width*, *depth*, *compact*, *sort_dicts* and *underscore_numbers* are passed to the :class:`PrettyPrinter` constructor as formatting parameters and their meanings are as described in the documentation above." -msgstr "بازنمایی قالب‌بندی‌شده‌ی *object* را به‌صورت یک رشته برمی‌گرداند. *indent*، *width*، *depth*، *compact*، *sort_dicts* و *underscore_numbers* به‌عنوان پارامترهای قالب‌بندی به سازنده‌ی :class:`PrettyPrinter` داده می‌شوند و معنای آن‌ها همان‌گونه است که در مستندات بالا توضیح داده شده است." +msgid "Return the formatted representation of *object* as a string. *indent*, *width*, *depth*, *compact*, *expand*, *sort_dicts* and *underscore_numbers* are passed to the :class:`PrettyPrinter` constructor as formatting parameters and their meanings are as described in the documentation above." +msgstr "بازنمایی قالب‌بندی‌شده‌ی *object* را به عنوان یک رشته برمی‌گرداند. پارامترهای *indent*، *width*، *depth*، *compact*، *expand*، *sort_dicts* و *underscore_numbers* به عنوان پارامترهای قالب‌بندی به سازنده‌ی :class:`PrettyPrinter` ارسال می‌شوند و معانی آن‌ها همان‌طور است که در مستندات بالا توضیح داده شد." msgid "Determine if the formatted representation of *object* is \"readable\", or can be used to reconstruct the value using :func:`eval`. This always returns ``False`` for recursive objects." msgstr "تعیین می‌کند که آیا نمایش قالب‌بندی‌شده‌ی *object* «خوانا» است، یا می‌توان از آن برای بازسازی مقدار با استفاده از :func:`eval` استفاده کرد. این همیشه برای اشیاء بازگشتی ``False`` را برمی‌گرداند." @@ -111,6 +115,9 @@ msgstr "پارامتر *underscore_numbers* اضافه شد." msgid "No longer attempts to write to :data:`!sys.stdout` if it is ``None``." msgstr "دیگر در صورتی که :data:`!sys.stdout` مقدار ``None`` باشد، تلاش نمی‌کند در آن بنویسد." +msgid "Added the *expand* parameter." +msgstr "پارامتر *expand* اضافه شد." + msgid ":class:`PrettyPrinter` instances have the following methods:" msgstr "نمونه‌های :class:`PrettyPrinter` متدهای زیر را دارند:" @@ -452,6 +459,142 @@ msgstr "" " 'summary': 'A sample Python project',\n" " 'version': '1.2.0'}" +msgid "Lastly, we can format like pretty-printed JSON with the *expand* parameter. Best results are achieved with a higher *indent* value::" +msgstr "در نهایت، می‌توانیم با پارامتر *expand* مانند JSON قالب‌بندی‌شده خروجی بگیریم. بهترین نتیجه‌ها با مقدار *indent* بالاتر به دست می‌آیند::" + +msgid "" +">>> pprint.pp(project_info, indent=4, expand=True)\n" +"{\n" +" 'author': 'The Python Packaging Authority',\n" +" 'author_email': 'pypa-dev@googlegroups.com',\n" +" 'bugtrack_url': None,\n" +" 'classifiers': [\n" +" 'Development Status :: 3 - Alpha',\n" +" 'Intended Audience :: Developers',\n" +" 'License :: OSI Approved :: MIT License',\n" +" 'Programming Language :: Python :: 2',\n" +" 'Programming Language :: Python :: 2.6',\n" +" 'Programming Language :: Python :: 2.7',\n" +" 'Programming Language :: Python :: 3',\n" +" 'Programming Language :: Python :: 3.2',\n" +" 'Programming Language :: Python :: 3.3',\n" +" 'Programming Language :: Python :: 3.4',\n" +" 'Topic :: Software Development :: Build Tools',\n" +" ],\n" +" 'description': 'A sample Python project\\n'\n" +" '=======================\\n'\n" +" '\\n'\n" +" 'This is the description file for the project.\\n'\n" +" '\\n'\n" +" 'The file should use UTF-8 encoding and be written using ReStructured '\n" +" 'Text. It\\n'\n" +" 'will be used to generate the project webpage on PyPI, and should be '\n" +" 'written for\\n'\n" +" 'that purpose.\\n'\n" +" '\\n'\n" +" 'Typical contents for this file would include an overview of the project, '\n" +" 'basic\\n'\n" +" 'usage examples, etc. Generally, including the project changelog in here '\n" +" 'is not\\n'\n" +" 'a good idea, although a simple \"What\\'s New\" section for the most recent '\n" +" 'version\\n'\n" +" 'may be appropriate.',\n" +" 'description_content_type': None,\n" +" 'docs_url': None,\n" +" 'download_url': 'UNKNOWN',\n" +" 'downloads': {'last_day': -1, 'last_month': -1, 'last_week': -1},\n" +" 'dynamic': None,\n" +" 'home_page': 'https://github.com/pypa/sampleproject',\n" +" 'keywords': 'sample setuptools development',\n" +" 'license': 'MIT',\n" +" 'license_expression': None,\n" +" 'license_files': None,\n" +" 'maintainer': None,\n" +" 'maintainer_email': None,\n" +" 'name': 'sampleproject',\n" +" 'package_url': 'https://pypi.org/project/sampleproject/',\n" +" 'platform': 'UNKNOWN',\n" +" 'project_url': 'https://pypi.org/project/sampleproject/',\n" +" 'project_urls': {\n" +" 'Download': 'UNKNOWN',\n" +" 'Homepage': 'https://github.com/pypa/sampleproject',\n" +" },\n" +" 'provides_extra': None,\n" +" 'release_url': 'https://pypi.org/project/sampleproject/1.2.0/',\n" +" 'requires_dist': None,\n" +" 'requires_python': None,\n" +" 'summary': 'A sample Python project',\n" +" 'version': '1.2.0',\n" +" 'yanked': False,\n" +" 'yanked_reason': None,\n" +"}" +msgstr "" +">>> pprint.pp(project_info, indent=4, expand=True)\n" +"{\n" +" 'author': 'The Python Packaging Authority',\n" +" 'author_email': 'pypa-dev@googlegroups.com',\n" +" 'bugtrack_url': None,\n" +" 'classifiers': [\n" +" 'Development Status :: 3 - Alpha',\n" +" 'Intended Audience :: Developers',\n" +" 'License :: OSI Approved :: MIT License',\n" +" 'Programming Language :: Python :: 2',\n" +" 'Programming Language :: Python :: 2.6',\n" +" 'Programming Language :: Python :: 2.7',\n" +" 'Programming Language :: Python :: 3',\n" +" 'Programming Language :: Python :: 3.2',\n" +" 'Programming Language :: Python :: 3.3',\n" +" 'Programming Language :: Python :: 3.4',\n" +" 'Topic :: Software Development :: Build Tools',\n" +" ],\n" +" 'description': 'A sample Python project\\n'\n" +" '=======================\\n'\n" +" '\\n'\n" +" 'This is the description file for the project.\\n'\n" +" '\\n'\n" +" 'The file should use UTF-8 encoding and be written using ReStructured '\n" +" 'Text. It\\n'\n" +" 'will be used to generate the project webpage on PyPI, and should be '\n" +" 'written for\\n'\n" +" 'that purpose.\\n'\n" +" '\\n'\n" +" 'Typical contents for this file would include an overview of the project, '\n" +" 'basic\\n'\n" +" 'usage examples, etc. Generally, including the project changelog in here '\n" +" 'is not\\n'\n" +" 'a good idea, although a simple \"What\\'s New\" section for the most recent '\n" +" 'version\\n'\n" +" 'may be appropriate.',\n" +" 'description_content_type': None,\n" +" 'docs_url': None,\n" +" 'download_url': 'UNKNOWN',\n" +" 'downloads': {'last_day': -1, 'last_month': -1, 'last_week': -1},\n" +" 'dynamic': None,\n" +" 'home_page': 'https://github.com/pypa/sampleproject',\n" +" 'keywords': 'sample setuptools development',\n" +" 'license': 'MIT',\n" +" 'license_expression': None,\n" +" 'license_files': None,\n" +" 'maintainer': None,\n" +" 'maintainer_email': None,\n" +" 'name': 'sampleproject',\n" +" 'package_url': 'https://pypi.org/project/sampleproject/',\n" +" 'platform': 'UNKNOWN',\n" +" 'project_url': 'https://pypi.org/project/sampleproject/',\n" +" 'project_urls': {\n" +" 'Download': 'UNKNOWN',\n" +" 'Homepage': 'https://github.com/pypa/sampleproject',\n" +" },\n" +" 'provides_extra': None,\n" +" 'release_url': 'https://pypi.org/project/sampleproject/1.2.0/',\n" +" 'requires_dist': None,\n" +" 'requires_python': None,\n" +" 'summary': 'A sample Python project',\n" +" 'version': '1.2.0',\n" +" 'yanked': False,\n" +" 'yanked_reason': None,\n" +"}" + msgid "built-in function" msgstr "تابع توکار" diff --git a/library/profile.po b/library/profile.po index 8bc1dedc..5389dc10 100644 --- a/library/profile.po +++ b/library/profile.po @@ -7,13 +7,14 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" -"PO-Revision-Date: 2026-09-14 16:13+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 20:42+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" @@ -23,242 +24,61 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Poedit 3.6\n" -msgid "The Python Profilers" -msgstr "پروفایل‌گیرهای پایتون" +msgid ":mod:`!profile` --- Pure Python profiler" +msgstr ":mod:`!profile` --- پروفایل‌گیر خالص پایتون" -msgid "**Source code:** :source:`Lib/profile.py` and :source:`Lib/pstats.py`" -msgstr "**کد منبع:** :source:`Lib/profile.py` و :source:`Lib/pstats.py`" +msgid "**Source code:** :source:`Lib/profile.py`" +msgstr "**کد منبع:** :source:`Lib/profile.py`" -msgid "Introduction to the profilers" -msgstr "آشنایی با پروفایل‌گیرها" +msgid "The :mod:`!profile` module is deprecated and will be removed in Python 3.17. Use :mod:`profiling.tracing` instead." +msgstr "ماژول :mod:`!profile` منسوخ شده است و در پایتون ۳.۱۷ حذف خواهد شد. به جای آن از :mod:`profiling.tracing` استفاده کنید." -msgid ":mod:`cProfile` and :mod:`profile` provide :dfn:`deterministic profiling` of Python programs. A :dfn:`profile` is a set of statistics that describes how often and for how long various parts of the program executed. These statistics can be formatted into reports via the :mod:`pstats` module." -msgstr ":mod:`cProfile` و :mod:`profile`، :dfn:`پروفایل‌گیری قطعی (deterministic profiling)` برنامه‌های پایتون را فراهم می‌کنند. یک :dfn:`پروفایل (profile)` مجموعه‌ای از آمارها است که توصیف می‌کند بخش‌های مختلف برنامه چند بار و برای چه مدت اجرا شده‌اند. این آمارها را می‌توان از طریق ماژول :mod:`pstats` در قالب گزارش قالب‌بندی کرد." +msgid "The :mod:`!profile` module provides a pure Python implementation of a deterministic profiler. While useful for understanding profiler internals or extending profiler behavior through subclassing, its pure Python implementation introduces significant overhead compared to the C-based :mod:`profiling.tracing` module." +msgstr "ماژول :mod:`!profile` یک پیاده‌سازی خالص پایتون از یک پروفایل‌گیر قطعی ارائه می‌دهد. اگرچه این پیاده‌سازی برای درک جزئیات داخلی پروفایل‌گیر یا گسترش رفتار آن از طریق زیرکلاس‌سازی مفید است، اما پیاده‌سازی خالص پایتون آن در مقایسه با ماژول مبتنی بر C و :mod:`profiling.tracing` سربار قابل‌توجهی را ایجاد می‌کند." -msgid "The Python standard library provides two different implementations of the same profiling interface:" -msgstr "کتابخانه استاندارد پایتون دو پیاده‌سازی متفاوت از یک رابط پروفایل‌گیری یکسان ارائه می‌دهد:" +msgid "For most profiling tasks, use:" +msgstr "برای اکثر وظایف پروفایل‌گیری، از موارد زیر استفاده کنید:" -msgid ":mod:`cProfile` is recommended for most users; it's a C extension with reasonable overhead that makes it suitable for profiling long-running programs. Based on :mod:`lsprof`, contributed by Brett Rosen and Ted Czotter." -msgstr ":mod:`cProfile` برای بیشتر کاربران توصیه می‌شود؛ این یک افزونه C با سربار معقول است که آن را برای پروفایل‌گیری برنامه‌های با اجرای طولانی مناسب می‌سازد. بر پایه :mod:`lsprof`، با مشارکت Brett Rosen و Ted Czotter." +msgid ":mod:`profiling.sampling` for production debugging with zero overhead" +msgstr ":mod:`profiling.sampling` برای اشکال‌زدایی در محیط تولید با سربار صفر" -msgid ":mod:`profile`, a pure Python module whose interface is imitated by :mod:`cProfile`, but which adds significant overhead to profiled programs. If you're trying to extend the profiler in some way, the task might be easier with this module. Originally designed and written by Jim Roskind." -msgstr ":mod:`profile`، یک ماژول پایتون خالص است که رابط آن توسط :mod:`cProfile` تقلید شده است، اما سربار قابل‌توجهی به برنامه‌های پروفایل‌شده (profiled) اضافه می‌کند. اگر می‌خواهید پروفایل‌گیر (profiler) را به شکلی گسترش دهید، ممکن است این کار با این ماژول آسان‌تر باشد. در ابتدا توسط Jim Roskind طراحی و نوشته شده است." +msgid ":mod:`profiling.tracing` for development and testing" +msgstr ":mod:`profiling.tracing` برای توسعه و تست" -msgid "The profiler modules are designed to provide an execution profile for a given program, not for benchmarking purposes (for that, there is :mod:`timeit` for reasonably accurate results). This particularly applies to benchmarking Python code against C code: the profilers introduce overhead for Python code, but not for C-level functions, and so the C code would seem faster than any Python one." -msgstr "ماژول‌های پروفایل‌گیر طراحی شده‌اند تا پروفایل اجرای یک برنامه مشخص را فراهم کنند، نه برای اهداف محک‌زنی (برای آن، :mod:`timeit` برای نتایج نسبتاً دقیق وجود دارد). این موضوع به‌ویژه در مورد محک‌زدن کد پایتون در برابر کد C صدق می‌کند: پروفایل‌گیرها سرباری برای کد پایتون ایجاد می‌کنند، اما برای توابع سطح C نه، و بنابراین کد C سریع‌تر از هر کد پایتونی به نظر خواهد رسید." +msgid "Migration" +msgstr "مهاجرت" -msgid "Instant User's Manual" -msgstr "راهنمای کاربری فوری" - -msgid "This section is provided for users that \"don't want to read the manual.\" It provides a very brief overview, and allows a user to rapidly perform profiling on an existing application." -msgstr "این بخش برای کاربرانی فراهم شده است که «نمی‌خواهند راهنما را بخوانند». این بخش مروری بسیار کوتاه ارائه می‌دهد و به کاربر امکان می‌دهد تا به‌سرعت پروفایل‌گیری را روی یک برنامه موجود انجام دهد." - -msgid "To profile a function that takes a single argument, you can do::" -msgstr "برای پروفایل‌گیری تابعی که یک آرگومان می‌گیرد، می‌توانید به این صورت عمل کنید::" - -msgid "" -"import cProfile\n" -"import re\n" -"cProfile.run('re.compile(\"foo|bar\")')" -msgstr "" -"import cProfile\n" -"import re\n" -"cProfile.run('re.compile(\"foo|bar\")')" - -msgid "(Use :mod:`profile` instead of :mod:`cProfile` if the latter is not available on your system.)" -msgstr "(اگر :mod:`cProfile` در سیستم شما در دسترس نیست، به‌جای آن از :mod:`profile` استفاده کنید.)" - -msgid "The above action would run :func:`re.compile` and print profile results like the following::" -msgstr "عملیات بالا :func:`re.compile` را اجرا کرده و نتایج پروفایل را مانند زیر چاپ می‌کند::" +msgid "Migrating from :mod:`!profile` to :mod:`profiling.tracing` is straightforward. The APIs are compatible::" +msgstr "مهاجرت از :mod:`!profile` به :mod:`profiling.tracing` بسیار ساده است. رابط‌های برنامه‌نویسی (APIها) سازگار هستند::" msgid "" -" 214 function calls (207 primitive calls) in 0.002 seconds\n" -"\n" -"Ordered by: cumulative time\n" +"# Old (deprecated)\n" +"import profile\n" +"profile.run('my_function()')\n" "\n" -"ncalls tottime percall cumtime percall filename:lineno(function)\n" -" 1 0.000 0.000 0.002 0.002 {built-in method builtins.exec}\n" -" 1 0.000 0.000 0.001 0.001 :1()\n" -" 1 0.000 0.000 0.001 0.001 __init__.py:250(compile)\n" -" 1 0.000 0.000 0.001 0.001 __init__.py:289(_compile)\n" -" 1 0.000 0.000 0.000 0.000 _compiler.py:759(compile)\n" -" 1 0.000 0.000 0.000 0.000 _parser.py:937(parse)\n" -" 1 0.000 0.000 0.000 0.000 _compiler.py:598(_code)\n" -" 1 0.000 0.000 0.000 0.000 _parser.py:435(_parse_sub)" +"# New (recommended)\n" +"import profiling.tracing\n" +"profiling.tracing.run('my_function()')" msgstr "" -" 214 function calls (207 primitive calls) in 0.002 seconds\n" -"\n" -"Ordered by: cumulative time\n" +"# Old (deprecated)\n" +"import profile\n" +"profile.run('my_function()')\n" "\n" -"ncalls tottime percall cumtime percall filename:lineno(function)\n" -" 1 0.000 0.000 0.002 0.002 {built-in method builtins.exec}\n" -" 1 0.000 0.000 0.001 0.001 :1()\n" -" 1 0.000 0.000 0.001 0.001 __init__.py:250(compile)\n" -" 1 0.000 0.000 0.001 0.001 __init__.py:289(_compile)\n" -" 1 0.000 0.000 0.000 0.000 _compiler.py:759(compile)\n" -" 1 0.000 0.000 0.000 0.000 _parser.py:937(parse)\n" -" 1 0.000 0.000 0.000 0.000 _compiler.py:598(_code)\n" -" 1 0.000 0.000 0.000 0.000 _parser.py:435(_parse_sub)" - -msgid "The first line indicates that 214 calls were monitored. Of those calls, 207 were :dfn:`primitive`, meaning that the call was not induced via recursion. The next line: ``Ordered by: cumulative time`` indicates the output is sorted by the ``cumtime`` values. The column headings include:" -msgstr "خط نخست نشان می‌دهد که ۲۱۴ فراخوانی پایش شده‌اند. از میان آن فراخوانی‌ها، ۲۰۷ مورد :dfn:`اولیه (primitive)` بودند، به این معنا که فراخوانی از طریق بازگشت ایجاد نشده است. خط بعدی: ``Ordered by: cumulative time`` نشان می‌دهد که خروجی بر اساس مقادیر ``cumtime`` مرتب شده است. عنوان ستون‌ها شامل:" - -msgid "ncalls" -msgstr "ncalls" - -msgid "for the number of calls." -msgstr "برای تعداد فراخوانی‌ها." - -msgid "tottime" -msgstr "tottime" - -msgid "for the total time spent in the given function (and excluding time made in calls to sub-functions)" -msgstr "برای کل زمان صرف‌شده در تابع داده‌شده (و به‌جز زمان صرف‌شده در فراخوانی‌های توابع فرعی)" - -msgid "percall" -msgstr "percall" - -msgid "is the quotient of ``tottime`` divided by ``ncalls``" -msgstr "خارج‌قسمت ``tottime`` بر ``ncalls`` است" - -msgid "cumtime" -msgstr "زمان تجمعی (cumtime)" - -msgid "is the cumulative time spent in this and all subfunctions (from invocation till exit). This figure is accurate *even* for recursive functions." -msgstr "زمان تجمعی صرف‌شده در این تابع و همه زیرتوابع (از فراخوانی تا خروج) است. این رقم *حتی* برای توابع بازگشتی نیز دقیق است." - -msgid "is the quotient of ``cumtime`` divided by primitive calls" -msgstr "خارج‌قسمت ``cumtime`` بر فراخوانی‌های اولیه است" - -msgid "filename:lineno(function)" -msgstr "filename:lineno(function)" - -msgid "provides the respective data of each function" -msgstr "داده‌های مربوط به هر تابع را فراهم می‌کند" - -msgid "When there are two numbers in the first column (for example ``3/1``), it means that the function recursed. The second value is the number of primitive calls and the former is the total number of calls. Note that when the function does not recurse, these two values are the same, and only the single figure is printed." -msgstr "هنگامی که دو عدد در ستون اول وجود داشته باشد (برای مثال ``3/1``)، به این معناست که تابع بازگشتی فراخوانی شده است. مقدار دوم تعداد فراخوانی‌های اولیه (primitive calls) و مقدار اول تعداد کل فراخوانی‌هاست. توجه داشته باشید که وقتی تابع بازگشتی فراخوانی نشود، این دو مقدار یکسان هستند و فقط یک عدد چاپ می‌شود." - -msgid "Instead of printing the output at the end of the profile run, you can save the results to a file by specifying a filename to the :func:`run` function::" -msgstr "به‌جای چاپ خروجی در پایان اجرای پروفایل، می‌توانید با مشخص کردن نام پرونده برای تابع :func:`run`، نتایج را در یک پرونده ذخیره کنید::" - -msgid "" -"import cProfile\n" -"import re\n" -"cProfile.run('re.compile(\"foo|bar\")', 'restats')" -msgstr "" -"import cProfile\n" -"import re\n" -"cProfile.run('re.compile(\"foo|bar\")', 'restats')" - -msgid "The :class:`pstats.Stats` class reads profile results from a file and formats them in various ways." -msgstr "کلاس :class:`pstats.Stats` نتایج پروفایل را از یک پرونده می‌خواند و آن‌ها را به روش‌های مختلفی قالب‌بندی می‌کند." - -msgid "The files :mod:`cProfile` and :mod:`profile` can also be invoked as a script to profile another script. For example::" -msgstr "همچنین می‌توان پرونده‌های :mod:`cProfile` و :mod:`profile` را به‌عنوان یک اسکریپت برای پروفایل‌گیری اسکریپتی دیگر فراخوانی کرد. برای مثال::" - -msgid "python -m cProfile [-o output_file] [-s sort_order] (-m module | myscript.py)" -msgstr "python -m cProfile [-o output_file] [-s sort_order] (-m module | myscript.py)" - -msgid "Writes the profile results to a file instead of to stdout." -msgstr "نتایج پروفایل را به‌جای stdout در یک پرونده می‌نویسد." - -msgid "Specifies one of the :func:`~pstats.Stats.sort_stats` sort values to sort the output by. This only applies when :option:`-o ` is not supplied." -msgstr "یکی از مقادیر مرتب‌سازی :func:`~pstats.Stats.sort_stats` را برای مرتب‌سازی خروجی مشخص می‌کند. این مورد فقط زمانی اعمال می‌شود که :option:`-o ` ارائه نشده باشد." - -msgid "Specifies that a module is being profiled instead of a script." -msgstr "مشخص می‌کند که یک ماژول به‌جای یک اسکریپت پروفایل می‌شود." - -msgid "Added the ``-m`` option to :mod:`cProfile`." -msgstr "گزینه ``-m`` به :mod:`cProfile` افزوده شد." - -msgid "Added the ``-m`` option to :mod:`profile`." -msgstr "گزینه ``-m`` به :mod:`profile` افزوده شد." - -msgid "The :mod:`pstats` module's :class:`~pstats.Stats` class has a variety of methods for manipulating and printing the data saved into a profile results file::" -msgstr "کلاس :class:`~pstats.Stats` در ماژول :mod:`pstats` دارای متدهای مختلفی برای دستکاری و چاپ داده‌های ذخیره‌شده در پرونده نتایج پروفایل است::" - -msgid "" -"import pstats\n" -"from pstats import SortKey\n" -"p = pstats.Stats('restats')\n" -"p.strip_dirs().sort_stats(-1).print_stats()" -msgstr "" -"import pstats\n" -"from pstats import SortKey\n" -"p = pstats.Stats('restats')\n" -"p.strip_dirs().sort_stats(-1).print_stats()" - -msgid "The :meth:`~pstats.Stats.strip_dirs` method removed the extraneous path from all the module names. The :meth:`~pstats.Stats.sort_stats` method sorted all the entries according to the standard module/line/name string that is printed. The :meth:`~pstats.Stats.print_stats` method printed out all the statistics. You might try the following sort calls::" -msgstr "متد :meth:`~pstats.Stats.strip_dirs` مسیر اضافی را از تمام نام‌های ماژول حذف کرد. متد :meth:`~pstats.Stats.sort_stats` تمام ورودی‌ها را بر اساس رشته‌ی استاندارد ماژول/خط/نام که چاپ می‌شود مرتب کرد. متد :meth:`~pstats.Stats.print_stats` تمام آمار را چاپ کرد. ممکن است بخواهید فراخوانی‌های مرتب‌سازی زیر را امتحان کنید::" - -msgid "" -"p.sort_stats(SortKey.NAME)\n" -"p.print_stats()" -msgstr "" -"p.sort_stats(SortKey.NAME)\n" -"p.print_stats()" - -msgid "The first call will actually sort the list by function name, and the second call will print out the statistics. The following are some interesting calls to experiment with::" -msgstr "نخستین فراخوانی در واقع فهرست را بر اساس نام تابع مرتب می‌کند و دومین فراخوانی آمار را چاپ می‌کند. موارد زیر چند فراخوانی جالب برای آزمایش هستند::" - -msgid "p.sort_stats(SortKey.CUMULATIVE).print_stats(10)" -msgstr "p.sort_stats(SortKey.CUMULATIVE).print_stats(10)" - -msgid "This sorts the profile by cumulative time in a function, and then only prints the ten most significant lines. If you want to understand what algorithms are taking time, the above line is what you would use." -msgstr "این دستور پروفایل را بر اساس زمان تجمعی در یک تابع مرتب می‌کند و سپس فقط ۱۰ خط مهم را چاپ می‌کند. اگر می‌خواهید بفهمید کدام الگوریتم‌ها زمان‌بر هستند، باید از خط بالا استفاده کنید." - -msgid "If you were looking to see what functions were looping a lot, and taking a lot of time, you would do::" -msgstr "اگر می‌خواستید ببینید چه توابعی حلقه‌های زیادی اجرا می‌کردند و زمان زیادی می‌بردند، این کار را می‌کردید::" - -msgid "p.sort_stats(SortKey.TIME).print_stats(10)" -msgstr "p.sort_stats(SortKey.TIME).print_stats(10)" - -msgid "to sort according to time spent within each function, and then print the statistics for the top ten functions." -msgstr "برای مرتب‌سازی بر اساس زمان سپری‌شده در هر تابع، و سپس چاپ آمار برای ده تابع برتر." - -msgid "You might also try::" -msgstr "همچنین ممکن است بخواهید این را نیز امتحان کنید::" - -msgid "p.sort_stats(SortKey.FILENAME).print_stats('__init__')" -msgstr "p.sort_stats(SortKey.FILENAME).print_stats('__init__')" - -msgid "This will sort all the statistics by file name, and then print out statistics for only the class init methods (since they are spelled with ``__init__`` in them). As one final example, you could try::" -msgstr "این کار تمام آمارها را بر اساس نام پرونده مرتب می‌کند، و سپس فقط آمار متدهای init کلاس را چاپ می‌کند (زیرا در نام آن‌ها ``__init__`` وجود دارد). به‌عنوان یک مثال نهایی، می‌توانید امتحان کنید::" - -msgid "p.sort_stats(SortKey.TIME, SortKey.CUMULATIVE).print_stats(.5, 'init')" -msgstr "p.sort_stats(SortKey.TIME, SortKey.CUMULATIVE).print_stats(.5, 'init')" - -msgid "This line sorts statistics with a primary key of time, and a secondary key of cumulative time, and then prints out some of the statistics. To be specific, the list is first culled down to 50% (re: ``.5``) of its original size, then only lines containing ``init`` are maintained, and that sub-sub-list is printed." -msgstr "این خط، آمار را با کلید اصلیِ زمان و کلید ثانویه‌ی زمان تجمعی مرتب می‌کند و سپس برخی از آمارها را چاپ می‌کند. به‌طور مشخص، ابتدا فهرست به ۵۰٪ اندازه‌ی اصلی خود (مربوط به ``.5``) کاهش می‌یابد، سپس فقط ردیفهای شامل ``init`` نگه داشته می‌شوند و آن زیرفهرستِ تودرتو چاپ می‌شود." - -msgid "If you wondered what functions called the above functions, you could now (``p`` is still sorted according to the last criteria) do::" -msgstr "اگر می‌خواستید بدانید چه توابعی توابع بالا را فراخوانی کرده‌اند، اکنون می‌توانید (``p`` هنوز بر اساس آخرین معیار مرتب شده است) این کار را انجام دهید::" - -msgid "p.print_callers(.5, 'init')" -msgstr "p.print_callers(.5, 'init')" - -msgid "and you would get a list of callers for each of the listed functions." -msgstr "و شما فهرستی از فراخواننده‌های هر یک از توابع فهرست‌شده را دریافت خواهید کرد." - -msgid "If you want more functionality, you're going to have to read the manual, or guess what the following functions do::" -msgstr "اگر قابلیت بیشتری می‌خواهید، باید راهنما را بخوانید یا حدس بزنید توابع زیر چه کاری انجام می‌دهند::" +"# New (recommended)\n" +"import profiling.tracing\n" +"profiling.tracing.run('my_function()')" -msgid "" -"p.print_callees()\n" -"p.add('restats')" -msgstr "" -"p.print_callees()\n" -"p.add('restats')" +msgid "For most code, replacing ``import profile`` with ``import profiling.tracing`` (and using ``profiling.tracing`` instead of ``profile`` throughout) provides a straightforward migration path." +msgstr "برای اکثر کدها، جایگزین کردن ``import profile`` با ``import profiling.tracing`` (و استفاده از ``profiling.tracing`` به‌جای ``profile`` در سراسر کد) یک مسیر مهاجرت ساده را فراهم می‌کند." -msgid "Invoked as a script, the :mod:`pstats` module is a statistics browser for reading and examining profile dumps. It has a simple line-oriented interface (implemented using :mod:`cmd`) and interactive help." -msgstr "هنگامی که به‌عنوان یک اسکریپت اجرا شود، ماژول :mod:`pstats` یک مرورگر آمار برای خواندن و بررسی برون‌ریزی‌های پروفایل (profile dumps) است. این ماژول دارای یک رابط خط‌محور ساده (پیاده‌سازی‌شده با استفاده از :mod:`cmd`) و راهنمای تعاملی است." +msgid "The ``cProfile`` module remains available as a backward-compatible alias to :mod:`profiling.tracing`. Existing code using ``import cProfile`` will continue to work without modification." +msgstr "ماژول ``cProfile`` به عنوان یک نام مستعار سازگار با گذشته برای :mod:`profiling.tracing` در دسترس باقی می‌ماند. کدهای موجودی که از ``import cProfile`` استفاده می‌کنند، بدون هیچ‌گونه تغییری به کار خود ادامه خواهند داد." -msgid ":mod:`profile` and :mod:`!cProfile` Module Reference" -msgstr "مرجع ماژول‌های :mod:`profile` و :mod:`!cProfile`" +msgid ":mod:`!profile` and :mod:`!profiling.tracing` module reference" +msgstr "ارجاع به ماژول‌های :mod:`!profile` و :mod:`!profiling.tracing`" -msgid "Both the :mod:`profile` and :mod:`!cProfile` modules provide the following functions:" -msgstr "هر دو ماژول :mod:`profile` و :mod:`!cProfile` توابع زیر را ارائه می‌دهند:" +msgid "Both the :mod:`!profile` and :mod:`profiling.tracing` modules provide the following functions:" +msgstr "هر دو ماژول :mod:`!profile` و :mod:`profiling.tracing` توابع زیر را فراهم می‌کنند:" msgid "This function takes a single argument that can be passed to the :func:`exec` function, and an optional file name. In all cases this routine executes::" msgstr "این تابع یک آرگومان واحد را که می‌توان آن را به تابع :func:`exec` ارسال کرد، و یک نام پرونده اختیاری می‌پذیرد. در همه موارد، این روال کد زیر را اجرا می‌کند::" @@ -278,8 +98,8 @@ msgstr "exec(command, globals, locals)" msgid "and gathers profiling statistics as in the :func:`run` function above." msgstr "و آمارهای پروفایل‌گیری را همان‌طور که در تابع :func:`run` بالا آمده است، جمع‌آوری می‌کند." -msgid "This class is normally only used if more precise control over profiling is needed than what the :func:`cProfile.run` function provides." -msgstr "این کلاس معمولاً تنها زمانی استفاده می‌شود که به کنترل دقیق‌تری بر پروفایل‌گیری نسبت به آنچه تابع :func:`cProfile.run` فراهم می‌کند، نیاز باشد." +msgid "This class is normally only used if more precise control over profiling is needed than what the :func:`profiling.tracing.run` function provides." +msgstr "این کلاس معمولاً فقط زمانی استفاده می‌شود که به کنترل دقیق‌تری روی پروفایل‌گیری نیاز باشد، فراتر از آنچه تابع :func:`profiling.tracing.run` فراهم می‌کند." msgid "A custom timer can be supplied for measuring how long code takes to run via the *timer* argument. This must be a function that returns a single number representing the current time. If the number is an integer, the *timeunit* specifies a multiplier that specifies the duration of each unit of time. For example, if the timer returns times measured in thousands of seconds, the time unit would be ``.001``." msgstr "می‌توان از طریق آرگومان *timer*، یک زمان‌سنج سفارشی برای اندازه‌گیری مدت‌زمان اجرای کد فراهم کرد. این باید تابعی باشد که یک عدد واحد را برمی‌گرداند و نشان‌دهنده‌ی زمان جاری است. اگر این عدد یک عدد صحیح باشد، *timeunit* ضریبی را مشخص می‌کند که مدت‌زمان هر واحد زمان را تعیین می‌کند. برای مثال، اگر زمان‌سنج زمان‌هایی را برگرداند که بر حسب هزاران ثانیه اندازه‌گیری شده‌اند، واحد زمان ``.001`` خواهد بود." @@ -288,9 +108,12 @@ msgid "Directly using the :class:`Profile` class allows formatting profile resul msgstr "استفاده مستقیم از کلاس :class:`Profile` امکان قالب‌بندی نتایج پروفایل را بدون نوشتن داده‌های پروفایل در یک پرونده فراهم می‌کند::" msgid "" -"import cProfile, pstats, io\n" +"import profiling.tracing\n" +"import pstats\n" +"import io\n" "from pstats import SortKey\n" -"pr = cProfile.Profile()\n" +"\n" +"pr = profiling.tracing.Profile()\n" "pr.enable()\n" "# ... do something ...\n" "pr.disable()\n" @@ -300,9 +123,12 @@ msgid "" "ps.print_stats()\n" "print(s.getvalue())" msgstr "" -"import cProfile, pstats, io\n" +"import profiling.tracing\n" +"import pstats\n" +"import io\n" "from pstats import SortKey\n" -"pr = cProfile.Profile()\n" +"\n" +"pr = profiling.tracing.Profile()\n" "pr.enable()\n" "# ... do something ...\n" "pr.disable()\n" @@ -312,20 +138,20 @@ msgstr "" "ps.print_stats()\n" "print(s.getvalue())" -msgid "The :class:`Profile` class can also be used as a context manager (supported only in :mod:`!cProfile` module. see :ref:`typecontextmanager`)::" -msgstr "کلاس :class:`Profile` همچنین می‌تواند به‌عنوان یک مدیر زمینه استفاده شود (فقط در ماژول :mod:`!cProfile` پشتیبانی می‌شود. به :ref:`typecontextmanager` مراجعه کنید)::" +msgid "The :class:`Profile` class can also be used as a context manager (supported only in :mod:`profiling.tracing`, not in the deprecated :mod:`!profile` module; see :ref:`typecontextmanager`)::" +msgstr "کلاس :class:`Profile` همچنین می‌تواند به عنوان یک مدیر زمینه (فقط پشتیبانی‌شده در :mod:`profiling.tracing` و نه در ماژول منسوخ :mod:`!profile`؛ نگاه کنید به :ref:`typecontextmanager`) استفاده شود::" msgid "" -"import cProfile\n" +"import profiling.tracing\n" "\n" -"with cProfile.Profile() as pr:\n" +"with profiling.tracing.Profile() as pr:\n" " # ... do something ...\n" "\n" " pr.print_stats()" msgstr "" -"import cProfile\n" +"import profiling.tracing\n" "\n" -"with cProfile.Profile() as pr:\n" +"with profiling.tracing.Profile() as pr:\n" " # ... do something ...\n" "\n" " pr.print_stats()" @@ -333,11 +159,11 @@ msgstr "" msgid "Added context manager support." msgstr "پشتیبانی از مدیر زمینه افزوده شد." -msgid "Start collecting profiling data. Only in :mod:`!cProfile`." -msgstr "جمع‌آوری داده‌های پروفایل‌گیری را آغاز کنید. فقط در :mod:`!cProfile`." +msgid "Start collecting profiling data. Only in :mod:`profiling.tracing`." +msgstr "شروع جمع‌آوری داده‌های پروفایل‌گیری. فقط در :mod:`profiling.tracing`." -msgid "Stop collecting profiling data. Only in :mod:`!cProfile`." -msgstr "توقف جمع‌آوری داده‌های پروفایل‌سازی. فقط در :mod:`!cProfile`." +msgid "Stop collecting profiling data. Only in :mod:`profiling.tracing`." +msgstr "توقف جمع‌آوری داده‌های پروفایل‌گیری. فقط در :mod:`profiling.tracing`." msgid "Stop collecting profiling data and record the results internally as the current profile." msgstr "جمع‌آوری داده‌های پروفایل‌گیری را متوقف کنید و نتایج را به‌صورت داخلی به‌عنوان پروفایل فعلی ثبت کنید." @@ -345,8 +171,8 @@ msgstr "جمع‌آوری داده‌های پروفایل‌گیری را مت msgid "Create a :class:`~pstats.Stats` object based on the current profile and print the results to stdout." msgstr "یک شیء :class:`~pstats.Stats` بر اساس پروفایل فعلی ایجاد کنید و نتایج را در stdout چاپ کنید." -msgid "The *sort* parameter specifies the sorting order of the displayed statistics. It accepts a single key or a tuple of keys to enable multi-level sorting, as in :func:`Stats.sort_stats `." -msgstr "پارامتر *sort* ترتیب مرتب‌سازی آمار نمایش‌یافته را تعیین می‌کند. این پارامتر یک کلید واحد یا تاپلی از کلیدها را برای فعال‌سازی مرتب‌سازی چندسطحی می‌پذیرد، همان‌طور که در :func:`Stats.sort_stats ` آمده است." +msgid "The *sort* parameter specifies the sorting order of the displayed statistics. It accepts a single key or a tuple of keys to enable multi-level sorting, as in :meth:`pstats.Stats.sort_stats`." +msgstr "پارامتر *sort* ترتیب مرتب‌سازی آمارهای نمایش‌داده‌شده را مشخص می‌کند. این پارامتر یک کلید منفرد یا تاپلی از کلیدها را برای فعال‌سازی مرتب‌سازی چندسطحی می‌پذیرد، درست مانند :meth:`pstats.Stats.sort_stats`." msgid ":meth:`~Profile.print_stats` now accepts a tuple of keys." msgstr ":meth:`~Profile.print_stats` اکنون یک تاپل از کلیدها را می‌پذیرد." @@ -366,209 +192,29 @@ msgstr "``func(*args, **kwargs)`` را پروفایل می‌کند" msgid "Note that profiling will only work if the called command/function actually returns. If the interpreter is terminated (e.g. via a :func:`sys.exit` call during the called command/function execution) no profiling results will be printed." msgstr "توجه داشته باشید که پروفایل‌گیری تنها در صورتی کار می‌کند که فرمان/تابع فراخوانی‌شده واقعاً بازگشت داشته باشد. اگر مفسر خاتمه یابد (مثلاً از طریق فراخوانی :func:`sys.exit` در حین اجرای فرمان/تابع فراخوانی‌شده)، هیچ نتیجه‌ای از پروفایل‌گیری چاپ نخواهد شد." -msgid "The :class:`Stats` Class" -msgstr "کلاس :class:`Stats`" - -msgid "Analysis of the profiler data is done using the :class:`~pstats.Stats` class." -msgstr "تحلیل داده‌های پروفایل‌گیر با استفاده از کلاس :class:`~pstats.Stats` انجام می‌شود." - -msgid "This class constructor creates an instance of a \"statistics object\" from a *filename* (or list of filenames) or from a :class:`Profile` instance. Output will be printed to the stream specified by *stream*." -msgstr "سازنده‌ی این کلاس، نمونه‌ای از «شیء آماری» را از یک *filename* (یا فهرستی از نام پرونده‌ها) یا از یک نمونه‌ی :class:`Profile` ایجاد می‌کند. خروجی به جریان مشخص‌شده توسط *stream* چاپ می‌شود." - -msgid "The file selected by the above constructor must have been created by the corresponding version of :mod:`profile` or :mod:`cProfile`. To be specific, there is *no* file compatibility guaranteed with future versions of this profiler, and there is no compatibility with files produced by other profilers, or the same profiler run on a different operating system. If several files are provided, all the statistics for identical functions will be coalesced, so that an overall view of several processes can be considered in a single report. If additional files need to be combined with data in an existing :class:`~pstats.Stats` object, the :meth:`~pstats.Stats.add` method can be used." -msgstr "پرونده انتخاب‌شده توسط سازنده‌ی بالا باید به‌وسیله‌ی نسخه‌ی متناظر :mod:`profile` یا :mod:`cProfile` ایجاد شده باشد. به‌طور مشخص، *هیچ* سازگاری پرونده‌ای با نسخه‌های آینده‌ی این پروفایل‌گیر تضمین نمی‌شود، و هیچ سازگاری با پرونده‌های تولیدشده توسط پروفایل‌گیرهای دیگر، یا همان پروفایل‌گیر اجراشده روی یک سیستم‌عامل دیگر وجود ندارد. اگر چندین پرونده ارائه شود، همه‌ی آمارهای مربوط به توابع یکسان با هم ادغام می‌شوند، تا بتوان نمای کلی از چندین فرایند را در یک گزارش واحد در نظر گرفت. اگر نیاز باشد پرونده‌های اضافی با داده‌های موجود در یک شیء :class:`~pstats.Stats` ترکیب شوند، می‌توان از متد :meth:`~pstats.Stats.add` استفاده کرد." - -msgid "Instead of reading the profile data from a file, a :class:`cProfile.Profile` or :class:`profile.Profile` object can be used as the profile data source." -msgstr "به جای خواندن داده‌های پروفایل از یک پرونده، می‌توان از یک شیء :class:`cProfile.Profile` یا :class:`profile.Profile` به‌عنوان منبع داده‌های پروفایل استفاده کرد." - -msgid ":class:`Stats` objects have the following methods:" -msgstr "اشیای :class:`Stats` دارای متدهای زیر هستند:" - -msgid "This method for the :class:`Stats` class removes all leading path information from file names. It is very useful in reducing the size of the printout to fit within (close to) 80 columns. This method modifies the object, and the stripped information is lost. After performing a strip operation, the object is considered to have its entries in a \"random\" order, as it was just after object initialization and loading. If :meth:`~pstats.Stats.strip_dirs` causes two function names to be indistinguishable (they are on the same line of the same filename, and have the same function name), then the statistics for these two entries are accumulated into a single entry." -msgstr "این متد برای کلاس :class:`Stats` تمام اطلاعات ابتدایی مسیر را از نام پرونده‌ها حذف می‌کند. این کار برای کاهش اندازه خروجی چاپی جهت جا شدن در (نزدیک به) ۸۰ ستون بسیار مفید است. این متد شیء را تغییر می‌دهد، و اطلاعات حذف‌شده از دست می‌رود. پس از انجام عملیات حذف، فرض می‌شود که آیتم‌های شیء در ترتیبی «تصادفی» قرار دارند، همان‌طور که درست پس از مقداردهی اولیه و بارگذاری شیء بودند. اگر :meth:`~pstats.Stats.strip_dirs` باعث شود دو نام تابع غیرقابل تمایز شوند (روی یک خط از یک نام پرونده باشند و نام تابع یکسانی داشته باشند)، آمار این دو آیتم در یک آیتم واحد انباشته می‌شود." - -msgid "This method of the :class:`Stats` class accumulates additional profiling information into the current profiling object. Its arguments should refer to filenames created by the corresponding version of :func:`profile.run` or :func:`cProfile.run`. Statistics for identically named (re: file, line, name) functions are automatically accumulated into single function statistics." -msgstr "این متد از کلاس :class:`Stats`، اطلاعات پروفایل‌گیری اضافی را در شیء پروفایل‌گیری جاری انباشته می‌کند. آرگومان‌های آن باید به نام پرونده‌هایی ارجاع دهند که توسط نسخه‌ی متناظر :func:`profile.run` یا :func:`cProfile.run` ایجاد شده‌اند. آمار توابعی که نام یکسان دارند (از نظر: پرونده، خط، نام) به‌طور خودکار در آمار یک تابع واحد انباشته می‌شود." - -msgid "Save the data loaded into the :class:`Stats` object to a file named *filename*. The file is created if it does not exist, and is overwritten if it already exists. This is equivalent to the method of the same name on the :class:`profile.Profile` and :class:`cProfile.Profile` classes." -msgstr "داده‌های بارگذاری‌شده در شیء :class:`Stats` را در پرونده‌ای به نام *filename* ذخیره کنید. در صورتی که پرونده وجود نداشته باشد، ایجاد می‌شود و اگر از قبل وجود داشته باشد، بازنویسی می‌شود. این معادل متدی با همین نام در کلاس‌های :class:`profile.Profile` و :class:`cProfile.Profile` است." - -msgid "This method modifies the :class:`Stats` object by sorting it according to the supplied criteria. The argument can be either a string or a SortKey enum identifying the basis of a sort (example: ``'time'``, ``'name'``, ``SortKey.TIME`` or ``SortKey.NAME``). The SortKey enums argument have advantage over the string argument in that it is more robust and less error prone." -msgstr "این متد شیء :class:`Stats` را با مرتب‌سازی آن بر اساس معیارهای ارائه‌شده تغییر می‌دهد. آرگومان می‌تواند یک رشته یا یک شمارش (enum) از SortKey باشد که مبنای مرتب‌سازی را مشخص می‌کند (مثال: ``'time'``، ``'name'``، ``SortKey.TIME`` یا ``SortKey.NAME``). آرگومان شمارش‌های (enum) SortKey نسبت به آرگومان رشته‌ای این مزیت را دارد که پایدارتر و کمتر مستعد خطا است." - -msgid "When more than one key is provided, then additional keys are used as secondary criteria when there is equality in all keys selected before them. For example, ``sort_stats(SortKey.NAME, SortKey.FILE)`` will sort all the entries according to their function name, and resolve all ties (identical function names) by sorting by file name." -msgstr "وقتی بیش از یک کلید ارائه شود، کلیدهای اضافی به‌عنوان معیارهای ثانویه در صورتی استفاده می‌شوند که در تمام کلیدهای انتخاب‌شده پیش از آن‌ها برابری وجود داشته باشد. برای مثال، ``sort_stats(SortKey.NAME, SortKey.FILE)`` تمام ورودی‌ها را بر اساس نام تابعشان مرتب می‌کند و تمام تساوی‌ها (نام‌های تابع یکسان) را با مرتب‌سازی بر اساس نام پرونده برطرف می‌کند." - -msgid "For the string argument, abbreviations can be used for any key names, as long as the abbreviation is unambiguous." -msgstr "برای آرگومان رشته‌ای، می‌توان از مخفف‌ها برای هر یک از نام‌های کلید استفاده کرد، مشروط بر این‌که مخفف بدون ابهام باشد." - -msgid "The following are the valid string and SortKey:" -msgstr "موارد زیر رشته و SortKey معتبر هستند:" - -msgid "Valid String Arg" -msgstr "آرگومان رشته‌ای معتبر" - -msgid "Valid enum Arg" -msgstr "آرگومان enum معتبر" - -msgid "Meaning" -msgstr "معنی" - -msgid "``'calls'``" -msgstr "``'calls'``" - -msgid "SortKey.CALLS" -msgstr "SortKey.CALLS" - -msgid "call count" -msgstr "تعداد فراخوانی‌ها" - -msgid "``'cumulative'``" -msgstr "``'cumulative'``" - -msgid "SortKey.CUMULATIVE" -msgstr "SortKey.CUMULATIVE" - -msgid "cumulative time" -msgstr "زمان تجمعی" - -msgid "``'cumtime'``" -msgstr "``'cumtime'``" - -msgid "N/A" -msgstr "ناموجود" - -msgid "``'file'``" -msgstr "``'file'``" - -msgid "file name" -msgstr "نام پرونده" - -msgid "``'filename'``" -msgstr "``'filename'``" - -msgid "SortKey.FILENAME" -msgstr "SortKey.FILENAME" - -msgid "``'module'``" -msgstr "``'module'``" - -msgid "``'ncalls'``" -msgstr "``'ncalls'``" - -msgid "``'pcalls'``" -msgstr "``'pcalls'``" - -msgid "SortKey.PCALLS" -msgstr "SortKey.PCALLS" - -msgid "primitive call count" -msgstr "تعداد فراخوانی‌های اولیه" - -msgid "``'line'``" -msgstr "``'line'``" - -msgid "SortKey.LINE" -msgstr "SortKey.LINE" - -msgid "line number" -msgstr "شماره خط" - -msgid "``'name'``" -msgstr "``'name'``" - -msgid "SortKey.NAME" -msgstr "SortKey.NAME" - -msgid "function name" -msgstr "نام تابع" - -msgid "``'nfl'``" -msgstr "``'nfl'``" - -msgid "SortKey.NFL" -msgstr "SortKey.NFL" - -msgid "name/file/line" -msgstr "نام/پرونده/خط" - -msgid "``'stdname'``" -msgstr "``'stdname'``" - -msgid "SortKey.STDNAME" -msgstr "SortKey.STDNAME" - -msgid "standard name" -msgstr "نام استاندارد" - -msgid "``'time'``" -msgstr "``'time'``" - -msgid "SortKey.TIME" -msgstr "SortKey.TIME" - -msgid "internal time" -msgstr "زمان داخلی" - -msgid "``'tottime'``" -msgstr "``'tottime'``" - -msgid "Note that all sorts on statistics are in descending order (placing most time consuming items first), where as name, file, and line number searches are in ascending order (alphabetical). The subtle distinction between ``SortKey.NFL`` and ``SortKey.STDNAME`` is that the standard name is a sort of the name as printed, which means that the embedded line numbers get compared in an odd way. For example, lines 3, 20, and 40 would (if the file names were the same) appear in the string order 20, 3 and 40. In contrast, ``SortKey.NFL`` does a numeric compare of the line numbers. In fact, ``sort_stats(SortKey.NFL)`` is the same as ``sort_stats(SortKey.NAME, SortKey.FILENAME, SortKey.LINE)``." -msgstr "توجه داشته باشید که تمام مرتب‌سازی‌ها بر اساس آمار به ترتیب نزولی هستند (زمان‌برترین آیتم‌ها در ابتدا قرار می‌گیرند)، در حالی که مرتب‌سازی‌های نام، پرونده و شماره خط به ترتیب صعودی (الفبایی) هستند. تفاوت ظریف بین ``SortKey.NFL`` و ``SortKey.STDNAME`` این است که نام استاندارد، مرتب‌سازی نام به همان صورت چاپ‌شده است؛ این بدان معناست که شماره‌های خط تعبیه‌شده به طرز عجیبی مقایسه می‌شوند. برای مثال، سطرهای ۳، ۲۰ و ۴۰ (اگر نام پرونده‌ها یکسان باشد) با ترتیب رشته‌ای به صورت ۲۰، ۳ و ۴۰ ظاهر می‌شوند. در مقابل، ``SortKey.NFL`` شماره‌های خط را به صورت عددی مقایسه می‌کند. در واقع، ``sort_stats(SortKey.NFL)`` همان ``sort_stats(SortKey.NAME, SortKey.FILENAME, SortKey.LINE)`` است." - -msgid "For backward-compatibility reasons, the numeric arguments ``-1``, ``0``, ``1``, and ``2`` are permitted. They are interpreted as ``'stdname'``, ``'calls'``, ``'time'``, and ``'cumulative'`` respectively. If this old style format (numeric) is used, only one sort key (the numeric key) will be used, and additional arguments will be silently ignored." -msgstr "به دلایل سازگاری با نسخه‌های قدیمی، آرگومان‌های عددی ``-1``، ``0``، ``1`` و ``2`` مجاز هستند. این مقادیر به‌ترتیب به‌عنوان ``'stdname'``، ``'calls'``، ``'time'`` و ``'cumulative'`` تفسیر می‌شوند. اگر از این قالب قدیمی (عددی) استفاده شود، تنها یک کلید مرتب‌سازی (کلید عددی) استفاده خواهد شد و آرگومان‌های اضافی به‌صورت بی‌صدا نادیده گرفته می‌شوند." - -msgid "Added the SortKey enum." -msgstr "شمارش SortKey افزوده شد." - -msgid "This method for the :class:`Stats` class reverses the ordering of the basic list within the object. Note that by default ascending vs descending order is properly selected based on the sort key of choice." -msgstr "این متد برای کلاس :class:`Stats`، ترتیب فهرست پایه درون شیء را معکوس می‌کند. توجه داشته باشید که به‌طور پیش‌فرض، ترتیب صعودی یا نزولی به‌درستی بر اساس کلید مرتب‌سازی انتخابی انتخاب می‌شود." - -msgid "This method for the :class:`Stats` class prints out a report as described in the :func:`profile.run` definition." -msgstr "این متد از کلاس :class:`Stats`، گزارشی را همان‌طور که در تعریف :func:`profile.run` شرح داده شده است، چاپ می‌کند." - -msgid "The order of the printing is based on the last :meth:`~pstats.Stats.sort_stats` operation done on the object (subject to caveats in :meth:`~pstats.Stats.add` and :meth:`~pstats.Stats.strip_dirs`)." -msgstr "ترتیب چاپ بر اساس آخرین عملیات :meth:`~pstats.Stats.sort_stats` انجام‌شده روی شیء است (با توجه به ملاحظات موجود در :meth:`~pstats.Stats.add` و :meth:`~pstats.Stats.strip_dirs`)." - -msgid "The arguments provided (if any) can be used to limit the list down to the significant entries. Initially, the list is taken to be the complete set of profiled functions. Each restriction is either an integer (to select a count of lines), or a decimal fraction between 0.0 and 1.0 inclusive (to select a percentage of lines), or a string that will be interpreted as a regular expression (to pattern match the standard name that is printed). If several restrictions are provided, then they are applied sequentially. For example::" -msgstr "می‌توان از آرگومان‌های داده‌شده (در صورت وجود) برای محدود کردن فهرست به آیتم‌های مهم استفاده کرد. در ابتدا، فهرست به‌عنوان مجموعه‌ی کاملی از توابع پروفایل‌شده در نظر گرفته می‌شود. هر محدودیت یا یک عدد صحیح است (برای انتخاب تعدادی از سطرهای)، یا یک کسر اعشاری بین ۰٫۰ و ۱٫۰ شامل هر دو (برای انتخاب درصدی از سطرهای)، یا رشته‌ای است که به‌عنوان عبارت باقاعده تفسیر می‌شود (برای تطبیق الگو با نام استانداردی که چاپ می‌شود). اگر چندین محدودیت ارائه شود، آن‌ها به‌ترتیب اعمال می‌شوند. برای مثال::" - -msgid "print_stats(.1, 'foo:')" -msgstr "print_stats(.1, 'foo:')" - -msgid "would first limit the printing to first 10% of list, and then only print functions that were part of filename :file:`.\\*foo:`. In contrast, the command::" -msgstr "ابتدا چاپ را به ۱۰٪ نخست فهرست محدود می‌کند، و سپس فقط توابعی را چاپ می‌کند که بخشی از نام پرونده :file:`.\\*foo:` بودند. در مقابل، دستور::" +msgid "Differences from :mod:`!profiling.tracing`" +msgstr "تفاوت‌ها با :mod:`!profiling.tracing`" -msgid "print_stats('foo:', .1)" -msgstr "print_stats('foo:', .1)" +msgid "The :mod:`!profile` module differs from :mod:`profiling.tracing` in several ways:" +msgstr "ماژول :mod:`!profile` در چند مورد با :mod:`profiling.tracing` متفاوت است:" -msgid "would limit the list to all functions having file names :file:`.\\*foo:`, and then proceed to only print the first 10% of them." -msgstr "فهرست را به همه توابعی که نام پرونده‌هایشان :file:`.\\*foo:` است محدود می‌کند، و سپس تنها ۱۰٪ نخست آن‌ها را چاپ می‌کند." +msgid "**Higher overhead.** The pure Python implementation is significantly slower than the C implementation, making it unsuitable for profiling long-running programs or performance-sensitive code." +msgstr "**سربار بالاتر.** پیاده‌سازی خالص پایتون به‌طور قابل‌توجهی کندتر از پیاده‌سازی C است و این امر آن را برای پروفایل‌گیری برنامه‌های طولانی‌مدت یا کدهای حساس به عملکرد نامناسب می‌سازد." -msgid "This method for the :class:`Stats` class prints a list of all functions that called each function in the profiled database. The ordering is identical to that provided by :meth:`~pstats.Stats.print_stats`, and the definition of the restricting argument is also identical. Each caller is reported on its own line. The format differs slightly depending on the profiler that produced the stats:" -msgstr "این متد برای کلاس :class:`Stats` فهرستی از همه توابعی که هر تابع موجود در پایگاه داده‌ی پروفایل‌شده را فراخوانی کرده‌اند، چاپ می‌کند. ترتیب دقیقاً مشابه ترتیب ارائه‌شده توسط :meth:`~pstats.Stats.print_stats` است و تعریف آرگومان محدودکننده نیز کاملاً مشابه است. هر فراخواننده در خط خود گزارش می‌شود. قالب بسته به پروفایل‌گیر تولیدکننده‌ی آمار، کمی متفاوت است:" +msgid "**Calibration support.** The :mod:`!profile` module supports calibration to compensate for profiling overhead. This is not needed in :mod:`profiling.tracing` because the C implementation has negligible overhead." +msgstr "**پشتیبانی از کالیبراسیون.** ماژول :mod:`!profile` از کالیبراسیون برای جبران سربار پروفایل‌گیری پشتیبانی می‌کند. این کار در :mod:`profiling.tracing` نیازی نیست زیرا پیاده‌سازی C سربار ناچیزی دارد." -msgid "With :mod:`profile`, a number is shown in parentheses after each caller to show how many times this specific call was made. For convenience, a second non-parenthesized number repeats the cumulative time spent in the function at the right." -msgstr "در :mod:`profile`، یک عدد در پرانتز پس از هر فراخواننده نمایش داده می‌شود تا نشان دهد این فراخوانی خاص چند بار انجام شده است. برای سهولت، یک عدد دوم بدون پرانتز، زمان تجمعی صرف‌شده در تابع سمت راست را تکرار می‌کند." +msgid "**Custom timers.** Both modules support custom timers, but :mod:`!profile` accepts timer functions that return tuples (like :func:`os.times`), while :mod:`profiling.tracing` requires a function returning a single number." +msgstr "**تایمرهای سفارشی.** هر دو ماژول از تایمرهای سفارشی پشتیبانی می‌کنند، اما :mod:`!profile` توابع تایمری را می‌پذیرد که تاپل برمی‌گردانند (مانند :func:`os.times`)، در حالی که :mod:`profiling.tracing` به تابعی نیاز دارد که یک عدد واحد برگرداند." -msgid "With :mod:`cProfile`, each caller is preceded by three numbers: the number of times this specific call was made, and the total and cumulative times spent in the current function while it was invoked by this specific caller." -msgstr "با :mod:`cProfile`، پیش از هر فراخواننده سه عدد قرار دارد: تعداد دفعاتی که این فراخوانی خاص انجام شده است، و زمان‌های کل و تجمعی صرف‌شده در تابع فعلی هنگامی که توسط این فراخواننده خاص فراخوانی شده است." +msgid "**Subclassing.** The pure Python implementation is easier to subclass and extend for custom profiling behavior." +msgstr "**زیرکلاس‌سازی.** پیاده‌سازی خالص پایتون برای زیرکلاس‌سازی و گسترش جهت رفتار سفارشی پروفایل‌گیری آسان‌تر است." -msgid "This method for the :class:`Stats` class prints a list of all function that were called by the indicated function. Aside from this reversal of direction of calls (re: called vs was called by), the arguments and ordering are identical to the :meth:`~pstats.Stats.print_callers` method." -msgstr "این متد برای کلاس :class:`Stats`، فهرستی از تمام توابعی را که توسط تابع مشخص‌شده فراخوانی شده‌اند، چاپ می‌کند. جدا از این معکوس‌سازی جهت فراخوانی‌ها (در خصوص: «فراخوانی‌شده» در مقابل «فراخوانی‌شده توسط»)، آرگومان‌ها و ترتیب با متد :meth:`~pstats.Stats.print_callers` یکسان است." +msgid "What is deterministic profiling?" +msgstr "پروفایل‌گیری قطعی (deterministic profiling) چیست؟" -msgid "This method returns an instance of StatsProfile, which contains a mapping of function names to instances of FunctionProfile. Each FunctionProfile instance holds information related to the function's profile such as how long the function took to run, how many times it was called, etc..." -msgstr "این متد یک نمونه از StatsProfile را برمی‌گرداند، که شامل نگاشتی از نام‌های تابع به نمونه‌هایی از FunctionProfile است. هر نمونه از FunctionProfile اطلاعات مربوط به پروفایل تابع را نگهداری می‌کند، مانند مدت‌زمانی که اجرای تابع طول کشید، تعداد دفعاتی که فراخوانی شده است، و غیره..." - -msgid "Added the following dataclasses: StatsProfile, FunctionProfile. Added the following function: get_stats_profile." -msgstr "کلاس‌های داده (dataclasses) زیر افزوده شدند: StatsProfile، FunctionProfile. تابع زیر افزوده شد: get_stats_profile." - -msgid "What Is Deterministic Profiling?" -msgstr "پروفایل‌گیری قطعی (Deterministic Profiling) چیست؟" - -msgid ":dfn:`Deterministic profiling` is meant to reflect the fact that all *function call*, *function return*, and *exception* events are monitored, and precise timings are made for the intervals between these events (during which time the user's code is executing). In contrast, :dfn:`statistical profiling` (which is not done by this module) randomly samples the effective instruction pointer, and deduces where time is being spent. The latter technique traditionally involves less overhead (as the code does not need to be instrumented), but provides only relative indications of where time is being spent." -msgstr ":dfn:`پروفایل‌گیری قطعی (deterministic profiling)` برای بازتاب این واقعیت در نظر گرفته شده است که تمام رویدادهای *فراخوانی تابع*، *بازگشت تابع* و *استثنا* پایش می‌شوند و زمان‌سنجی‌های دقیقی برای فاصله‌های زمانی بین این رویدادها (که در این فاصله، کد کاربر در حال اجراست) انجام می‌شود. در مقابل، :dfn:`پروفایل‌گیری آماری (statistical profiling)` (که این ماژول آن را انجام نمی‌دهد) به‌صورت تصادفی از اشاره‌گر دستور مؤثر (effective instruction pointer) نمونه‌برداری می‌کند و استنتاج می‌کند که زمان کجا صرف می‌شود. روش دوم به‌طور سنتی سربار کمتری به همراه دارد (زیرا نیازی به ابزارمندسازی کد نیست)، اما فقط نشانه‌های نسبی درباره‌ی محل صرف زمان ارائه می‌دهد." +msgid ":dfn:`Deterministic profiling` is meant to reflect the fact that all *function call*, *function return*, and *exception* events are monitored, and precise timings are made for the intervals between these events (during which time the user's code is executing). In contrast, :dfn:`statistical profiling` (which is provided by the :mod:`profiling.sampling` module) periodically samples the effective instruction pointer, and deduces where time is being spent. The latter technique traditionally involves less overhead (as the code does not need to be instrumented), but provides only relative indications of where time is being spent." +msgstr ":dfn:`پروفایل‌گیری قطعی` برای بازتاب این واقعیت در نظر گرفته شده است که تمامی رویدادهای *function call*، *function return* و *exception* نظارت می‌شوند و زمان‌بندی‌های دقیقی برای بازه‌های بین این رویدادها (زمانی که کد کاربر در حال اجراست) انجام می‌شود. در مقابل، :dfn:`پروفایل‌گیری آماری` (که توسط ماژول :mod:`profiling.sampling` ارائه می‌شود) به‌طور دوره‌ای اشاره‌گر دستورالعمل مؤثر را نمونه‌برداری می‌کند و استنباط می‌کند که زمان صرف کجا می‌شود. روش دوم به‌طور سنتی سربار کمتری دارد (چرا که نیازی به ابزارگذاری کد نیست)، اما تنها نشانه‌های نسبی از میزان صرف زمان را ارائه می‌دهد." msgid "In Python, since there is an interpreter active during execution, the presence of instrumented code is not required in order to do deterministic profiling. Python automatically provides a :dfn:`hook` (optional callback) for each event. In addition, the interpreted nature of Python tends to add so much overhead to execution, that deterministic profiling tends to only add small processing overhead in typical applications. The result is that deterministic profiling is not that expensive, yet provides extensive run time statistics about the execution of a Python program." msgstr "در پایتون، از آن‌جا که در حین اجرا یک مفسر فعال است، برای انجام پروفایل‌گیری قطعی (deterministic profiling) نیازی به وجود کد ابزاربندی‌شده (instrumented code) نیست. پایتون به‌طور خودکار یک :dfn:`hook` (کال‌بک اختیاری) برای هر رویداد فراهم می‌کند. علاوه بر این، ماهیت تفسیری پایتون معمولاً آن‌قدر سربار زیادی به اجرا اضافه می‌کند، به‌طوری که پروفایل‌گیری قطعی معمولاً فقط سربار پردازشی اندکی در برنامه‌های کاربردی معمولی اضافه می‌کند. نتیجه این است که پروفایل‌گیری قطعی چندان پرهزینه نیست، اما آمار گسترده‌ای از زمان اجرا درباره اجرای یک برنامه پایتون ارائه می‌دهد." @@ -585,14 +231,14 @@ msgstr "یکی از محدودیت‌ها به دقت اطلاعات زمان‌ msgid "The second problem is that it \"takes a while\" from when an event is dispatched until the profiler's call to get the time actually *gets* the state of the clock. Similarly, there is a certain lag when exiting the profiler event handler from the time that the clock's value was obtained (and then squirreled away), until the user's code is once again executing. As a result, functions that are called many times, or call many functions, will typically accumulate this error. The error that accumulates in this fashion is typically less than the accuracy of the clock (less than one clock tick), but it *can* accumulate and become very significant." msgstr "دومین مشکل این است که از لحظه‌ای که یک رویداد ارسال می‌شود تا زمانی که فراخوانی پروفایل‌گیر برای گرفتن زمان واقعاً وضعیت ساعت را *دریافت می‌کند*، «مدتی طول می‌کشد». به‌طور مشابه، هنگام خروج از هندلر رویداد پروفایل‌گیر، از زمانی که مقدار ساعت گرفته شده (و سپس ذخیره شده است) تا زمانی که کد کاربر دوباره در حال اجرا است، تأخیر مشخصی وجود دارد. در نتیجه، توابعی که بارها فراخوانی می‌شوند یا توابع زیادی را فراخوانی می‌کنند، معمولاً این خطا را انباشته می‌کنند. خطایی که به این شکل انباشته می‌شود، معمولاً کمتر از دقت ساعت است (کمتر از یک تیک ساعت)، اما *می‌تواند* انباشته شود و بسیار قابل‌توجه شود." -msgid "The problem is more important with :mod:`profile` than with the lower-overhead :mod:`cProfile`. For this reason, :mod:`profile` provides a means of calibrating itself for a given platform so that this error can be probabilistically (on the average) removed. After the profiler is calibrated, it will be more accurate (in a least square sense), but it will sometimes produce negative numbers (when call counts are exceptionally low, and the gods of probability work against you :-). ) Do *not* be alarmed by negative numbers in the profile. They should *only* appear if you have calibrated your profiler, and the results are actually better than without calibration." -msgstr "این مشکل در :mod:`profile` نسبت به :mod:`cProfile` با سربار کمتر، جدی‌تر است. به همین دلیل، :mod:`profile` امکانی برای کالیبره کردن خود برای یک پلتفرم مشخص فراهم می‌کند تا بتوان این خطا را به‌صورت احتمالی (به‌طور میانگین) برطرف کرد. پس از کالیبره شدن، پروفایل‌گیر دقیق‌تر خواهد بود (از نظر کمترین مربعات)، اما گاهی اعداد منفی تولید می‌کند (وقتی تعداد فراخوانی‌ها به‌طور استثنایی کم باشد و خدایان احتمال علیه شما کار کنند :-). ) از اعداد منفی در پروفایل نگران *نباشید*. آن‌ها باید *فقط* زمانی ظاهر شوند که پروفایل‌گیر خود را کالیبره کرده باشید، و نتایج در واقع بهتر از حالت بدون کالیبراسیون هستند." +msgid "The problem is more important with the deprecated :mod:`!profile` module than with the lower-overhead :mod:`profiling.tracing`. For this reason, :mod:`!profile` provides a means of calibrating itself for a given platform so that this error can be probabilistically (on the average) removed. After the profiler is calibrated, it will be more accurate (in a least square sense), but it will sometimes produce negative numbers (when call counts are exceptionally low, and the gods of probability work against you :-). ) Do *not* be alarmed by negative numbers in the profile. They should *only* appear if you have calibrated your profiler, and the results are actually better than without calibration." +msgstr "این مسئله در ماژول منسوخ‌شده :mod:`!profile` در مقایسه با ماژول کم‌سربار :mod:`profiling.tracing` اهمیت بیشتری دارد. به همین دلیل، :mod:`!profile` ابزاری برای کالیبره‌کردن خود برای یک پلتفرم مشخص فراهم می‌کند تا بتوان این خطا را به روش احتمالی (به طور میانگین) برطرف کرد. پس از کالیبره‌شدن پروفایل‌گیر، دقت آن بیشتر خواهد شد (به معنای کمترین مربعات)، اما گاهی اوقات اعداد منفی تولید خواهد کرد (زمانی که تعداد فراخوانی‌ها به طرز استثنایی کم باشد و قوانین احتمال علیه شما کار کنند :-)). از اعداد منفی در پروفایل **نگران** نشوید. آن‌ها *فقط* زمانی باید ظاهر شوند که پروفایل‌گیر خود را کالیبره کرده باشید و نتایج در واقع بهتر از حالت بدون کالیبره باشند." msgid "Calibration" msgstr "کالیبراسیون" -msgid "The profiler of the :mod:`profile` module subtracts a constant from each event handling time to compensate for the overhead of calling the time function, and socking away the results. By default, the constant is 0. The following procedure can be used to obtain a better constant for a given platform (see :ref:`profile-limitations`). ::" -msgstr "پروفایل‌گیر ماژول :mod:`profile`، یک ثابت را از زمان رسیدگی به هر رویداد کم می‌کند تا سربار فراخوانی تابع زمان و ذخیره‌سازی نتایج را جبران کند. به‌طور پیش‌فرض، این ثابت ۰ است. می‌توانید از روش زیر برای به‌دست آوردن ثابتی بهتر برای یک پلتفرم مشخص استفاده کنید (به :ref:`profile-limitations` مراجعه کنید). ::" +msgid "The profiler of the :mod:`!profile` module subtracts a constant from each event handling time to compensate for the overhead of calling the time function, and socking away the results. By default, the constant is 0. The following procedure can be used to obtain a better constant for a given platform (see :ref:`profile-limitations`). ::" +msgstr "پروفایل‌گیر ماژول :mod:`!profile` یک مقدار ثابت را از زمان پردازش هر رویداد کم می‌کند تا سربارِ فراخوانی تابع زمان و ذخیره‌سازی نتایج را جبران کند. به طور پیش‌فرض، این مقدار ثابت 0 است. از روش زیر می‌توان برای به دست آوردن مقدار ثابت بهتری برای یک پلتفرم مشخص استفاده کرد (به :ref:`profile-limitations` مراجعه کنید). ::" msgid "" "import profile\n" @@ -651,8 +297,8 @@ msgstr "اگر می‌خواهید نحوه تعیین زمان جاری را ت msgid "pr = profile.Profile(your_time_func)" msgstr "pr = profile.Profile(your_time_func)" -msgid "The resulting profiler will then call ``your_time_func``. Depending on whether you are using :class:`profile.Profile` or :class:`cProfile.Profile`, ``your_time_func``'s return value will be interpreted differently:" -msgstr "سپس پروفایل‌گیر حاصل، ``your_time_func`` را فراخوانی خواهد کرد. بسته به این‌که از :class:`profile.Profile` یا :class:`cProfile.Profile` استفاده می‌کنید، مقدار بازگشتی ``your_time_func`` به‌صورت متفاوتی تفسیر خواهد شد:" +msgid "The resulting profiler will then call ``your_time_func``. Depending on whether you are using :class:`profile.Profile` or :class:`profiling.tracing.Profile`, ``your_time_func``'s return value will be interpreted differently:" +msgstr "سپس پروفایل‌گیر حاصل، ``your_time_func`` را فراخوانی خواهد کرد. بسته به اینکه از :class:`profile.Profile` یا :class:`profiling.tracing.Profile` استفاده می‌کنید، مقدار بازگشتی ``your_time_func`` به شکل متفاوتی تفسیرشده خواهد شد:" msgid ":class:`profile.Profile`" msgstr ":class:`profile.Profile`" @@ -663,23 +309,470 @@ msgstr "``your_time_func`` باید یک عدد زمانی واحد، یا فه msgid "Be warned that you should calibrate the profiler class for the timer function that you choose (see :ref:`profile-calibration`). For most machines, a timer that returns a lone integer value will provide the best results in terms of low overhead during profiling. (:func:`os.times` is *pretty* bad, as it returns a tuple of floating-point values). If you want to substitute a better timer in the cleanest fashion, derive a class and hardwire a replacement dispatch method that best handles your timer call, along with the appropriate calibration constant." msgstr "توجه داشته باشید که باید کلاس پروفایل‌گیر را برای تابع زمان‌سنجی که انتخاب می‌کنید کالیبره کنید (به :ref:`profile-calibration` مراجعه کنید). در بیشتر ماشین‌ها، زمان‌سنجی که تنها یک مقدار عدد صحیح برمی‌گرداند، بهترین نتایج را از نظر سربار کم در حین پروفایل‌کردن فراهم می‌کند. (:func:`os.times` *نسبتاً* بد است، زیرا یک تاپل از مقادیر ممیز شناور برمی‌گرداند). اگر می‌خواهید یک زمان‌سنج بهتر را به تمیزترین روش جایگزین کنید، یک کلاس مشتق کنید و یک متد اعزام (dispatch) جایگزین را که فراخوانی زمان‌سنج شما را به بهترین شکل مدیریت می‌کند، به‌همراه ثابت کالیبراسیون مناسب، به‌صورت سخت‌کد (hardwire) پیاده‌سازی کنید." -msgid ":class:`cProfile.Profile`" -msgstr ":class:`cProfile.Profile`" +msgid ":class:`profiling.tracing.Profile`" +msgstr ":class:`profiling.tracing.Profile`" msgid "``your_time_func`` should return a single number. If it returns integers, you can also invoke the class constructor with a second argument specifying the real duration of one unit of time. For example, if ``your_integer_time_func`` returns times measured in thousands of seconds, you would construct the :class:`Profile` instance as follows::" msgstr "``your_time_func`` باید یک عدد واحد برگرداند. اگر این تابع اعداد صحیح برگرداند، همچنین می‌توانید سازنده‌ی کلاس را با یک آرگومان دوم برای مشخص کردن مدت‌زمان واقعی یک واحد زمان فراخوانی کنید. برای مثال، اگر ``your_integer_time_func`` مقادیر زمانی را برگرداند که بر حسب هزاران ثانیه اندازه‌گیری شده‌اند، باید نمونه‌ی :class:`Profile` را به‌صورت زیر بسازید::" -msgid "pr = cProfile.Profile(your_integer_time_func, 0.001)" -msgstr "pr = cProfile.Profile(your_integer_time_func, 0.001)" +msgid "pr = profiling.tracing.Profile(your_integer_time_func, 0.001)" +msgstr "pr = profiling.tracing.Profile(your_integer_time_func, 0.001)" -msgid "As the :class:`cProfile.Profile` class cannot be calibrated, custom timer functions should be used with care and should be as fast as possible. For the best results with a custom timer, it might be necessary to hard-code it in the C source of the internal :mod:`!_lsprof` module." -msgstr "از آن‌جا که کلاس :class:`cProfile.Profile` قابل کالیبره نیست، توابع زمان‌سنج سفارشی باید با احتیاط استفاده شوند و تا حد ممکن سریع باشند. برای بهترین نتایج با یک زمان‌سنج سفارشی، ممکن است لازم باشد آن را در کد منبع C ماژول درونی :mod:`!_lsprof` به‌صورت سخت‌کد (hard-code) پیاده‌سازی کنید." +msgid "As the :class:`profiling.tracing.Profile` class cannot be calibrated, custom timer functions should be used with care and should be as fast as possible. For the best results with a custom timer, it might be necessary to hard-code it in the C source of the internal :mod:`!_lsprof` module." +msgstr "از آنجا که کلاس :class:`profiling.tracing.Profile` قابل کالیبره‌شدن نیست، توابع تایمر سفارشی باید با احتیاط استفاده شوند و تا حد امکان سریع باشند. برای کسب بهترین نتایج با یک تایمر سفارشی، ممکن است لازم باشد آن را در کد C ماژول داخلی :mod:`!_lsprof` به صورت سخت‌کد شده قرار دهید." msgid "Python 3.3 adds several new functions in :mod:`time` that can be used to make precise measurements of process or wall-clock time. For example, see :func:`time.perf_counter`." msgstr "پایتون 3.3 چندین تابع جدید به :mod:`time` اضافه می‌کند که می‌توان از آن‌ها برای اندازه‌گیری‌های دقیق زمان فرایند یا زمان دیواری استفاده کرد. برای مثال، :func:`time.perf_counter` را ببینید." -msgid "deterministic profiling" -msgstr "پروفایل‌گیری قطعی" +msgid ":mod:`profiling`" +msgstr ":mod:`profiling`" + +msgid "Overview of Python profiling tools." +msgstr "نمای کلی ابزارهای پروفایل‌گیری پایتون." + +msgid ":mod:`profiling.tracing`" +msgstr ":mod:`profiling.tracing`" + +msgid "Recommended replacement for this module." +msgstr "جایگزین پیشنهادی برای این ماژول." + +msgid ":mod:`pstats`" +msgstr ":mod:`pstats`" + +msgid "Statistical analysis and formatting for profile data." +msgstr "تحلیل آماری و قالب‌بندی برای داده‌های پروفایل." + +#~ msgid "The Python Profilers" +#~ msgstr "پروفایل‌گیرهای پایتون" + +#~ msgid "Introduction to the profilers" +#~ msgstr "آشنایی با پروفایل‌گیرها" + +#~ msgid ":mod:`cProfile` and :mod:`profile` provide :dfn:`deterministic profiling` of Python programs. A :dfn:`profile` is a set of statistics that describes how often and for how long various parts of the program executed. These statistics can be formatted into reports via the :mod:`pstats` module." +#~ msgstr ":mod:`cProfile` و :mod:`profile`، :dfn:`پروفایل‌گیری قطعی (deterministic profiling)` برنامه‌های پایتون را فراهم می‌کنند. یک :dfn:`پروفایل (profile)` مجموعه‌ای از آمارها است که توصیف می‌کند بخش‌های مختلف برنامه چند بار و برای چه مدت اجرا شده‌اند. این آمارها را می‌توان از طریق ماژول :mod:`pstats` در قالب گزارش قالب‌بندی کرد." + +#~ msgid "The Python standard library provides two different implementations of the same profiling interface:" +#~ msgstr "کتابخانه استاندارد پایتون دو پیاده‌سازی متفاوت از یک رابط پروفایل‌گیری یکسان ارائه می‌دهد:" + +#~ msgid ":mod:`cProfile` is recommended for most users; it's a C extension with reasonable overhead that makes it suitable for profiling long-running programs. Based on :mod:`lsprof`, contributed by Brett Rosen and Ted Czotter." +#~ msgstr ":mod:`cProfile` برای بیشتر کاربران توصیه می‌شود؛ این یک افزونه C با سربار معقول است که آن را برای پروفایل‌گیری برنامه‌های با اجرای طولانی مناسب می‌سازد. بر پایه :mod:`lsprof`، با مشارکت Brett Rosen و Ted Czotter." + +#~ msgid ":mod:`profile`, a pure Python module whose interface is imitated by :mod:`cProfile`, but which adds significant overhead to profiled programs. If you're trying to extend the profiler in some way, the task might be easier with this module. Originally designed and written by Jim Roskind." +#~ msgstr ":mod:`profile`، یک ماژول پایتون خالص است که رابط آن توسط :mod:`cProfile` تقلید شده است، اما سربار قابل‌توجهی به برنامه‌های پروفایل‌شده (profiled) اضافه می‌کند. اگر می‌خواهید پروفایل‌گیر (profiler) را به شکلی گسترش دهید، ممکن است این کار با این ماژول آسان‌تر باشد. در ابتدا توسط Jim Roskind طراحی و نوشته شده است." + +#~ msgid "The profiler modules are designed to provide an execution profile for a given program, not for benchmarking purposes (for that, there is :mod:`timeit` for reasonably accurate results). This particularly applies to benchmarking Python code against C code: the profilers introduce overhead for Python code, but not for C-level functions, and so the C code would seem faster than any Python one." +#~ msgstr "ماژول‌های پروفایل‌گیر طراحی شده‌اند تا پروفایل اجرای یک برنامه مشخص را فراهم کنند، نه برای اهداف محک‌زنی (برای آن، :mod:`timeit` برای نتایج نسبتاً دقیق وجود دارد). این موضوع به‌ویژه در مورد محک‌زدن کد پایتون در برابر کد C صدق می‌کند: پروفایل‌گیرها سرباری برای کد پایتون ایجاد می‌کنند، اما برای توابع سطح C نه، و بنابراین کد C سریع‌تر از هر کد پایتونی به نظر خواهد رسید." + +#~ msgid "Instant User's Manual" +#~ msgstr "راهنمای کاربری فوری" + +#~ msgid "This section is provided for users that \"don't want to read the manual.\" It provides a very brief overview, and allows a user to rapidly perform profiling on an existing application." +#~ msgstr "این بخش برای کاربرانی فراهم شده است که «نمی‌خواهند راهنما را بخوانند». این بخش مروری بسیار کوتاه ارائه می‌دهد و به کاربر امکان می‌دهد تا به‌سرعت پروفایل‌گیری را روی یک برنامه موجود انجام دهد." + +#~ msgid "To profile a function that takes a single argument, you can do::" +#~ msgstr "برای پروفایل‌گیری تابعی که یک آرگومان می‌گیرد، می‌توانید به این صورت عمل کنید::" + +#~ msgid "" +#~ "import cProfile\n" +#~ "import re\n" +#~ "cProfile.run('re.compile(\"foo|bar\")')" +#~ msgstr "" +#~ "import cProfile\n" +#~ "import re\n" +#~ "cProfile.run('re.compile(\"foo|bar\")')" + +#~ msgid "(Use :mod:`profile` instead of :mod:`cProfile` if the latter is not available on your system.)" +#~ msgstr "(اگر :mod:`cProfile` در سیستم شما در دسترس نیست، به‌جای آن از :mod:`profile` استفاده کنید.)" + +#~ msgid "The above action would run :func:`re.compile` and print profile results like the following::" +#~ msgstr "عملیات بالا :func:`re.compile` را اجرا کرده و نتایج پروفایل را مانند زیر چاپ می‌کند::" + +#~ msgid "" +#~ " 214 function calls (207 primitive calls) in 0.002 seconds\n" +#~ "\n" +#~ "Ordered by: cumulative time\n" +#~ "\n" +#~ "ncalls tottime percall cumtime percall filename:lineno(function)\n" +#~ " 1 0.000 0.000 0.002 0.002 {built-in method builtins.exec}\n" +#~ " 1 0.000 0.000 0.001 0.001 :1()\n" +#~ " 1 0.000 0.000 0.001 0.001 __init__.py:250(compile)\n" +#~ " 1 0.000 0.000 0.001 0.001 __init__.py:289(_compile)\n" +#~ " 1 0.000 0.000 0.000 0.000 _compiler.py:759(compile)\n" +#~ " 1 0.000 0.000 0.000 0.000 _parser.py:937(parse)\n" +#~ " 1 0.000 0.000 0.000 0.000 _compiler.py:598(_code)\n" +#~ " 1 0.000 0.000 0.000 0.000 _parser.py:435(_parse_sub)" +#~ msgstr "" +#~ " 214 function calls (207 primitive calls) in 0.002 seconds\n" +#~ "\n" +#~ "Ordered by: cumulative time\n" +#~ "\n" +#~ "ncalls tottime percall cumtime percall filename:lineno(function)\n" +#~ " 1 0.000 0.000 0.002 0.002 {built-in method builtins.exec}\n" +#~ " 1 0.000 0.000 0.001 0.001 :1()\n" +#~ " 1 0.000 0.000 0.001 0.001 __init__.py:250(compile)\n" +#~ " 1 0.000 0.000 0.001 0.001 __init__.py:289(_compile)\n" +#~ " 1 0.000 0.000 0.000 0.000 _compiler.py:759(compile)\n" +#~ " 1 0.000 0.000 0.000 0.000 _parser.py:937(parse)\n" +#~ " 1 0.000 0.000 0.000 0.000 _compiler.py:598(_code)\n" +#~ " 1 0.000 0.000 0.000 0.000 _parser.py:435(_parse_sub)" + +#~ msgid "The first line indicates that 214 calls were monitored. Of those calls, 207 were :dfn:`primitive`, meaning that the call was not induced via recursion. The next line: ``Ordered by: cumulative time`` indicates the output is sorted by the ``cumtime`` values. The column headings include:" +#~ msgstr "خط نخست نشان می‌دهد که ۲۱۴ فراخوانی پایش شده‌اند. از میان آن فراخوانی‌ها، ۲۰۷ مورد :dfn:`اولیه (primitive)` بودند، به این معنا که فراخوانی از طریق بازگشت ایجاد نشده است. خط بعدی: ``Ordered by: cumulative time`` نشان می‌دهد که خروجی بر اساس مقادیر ``cumtime`` مرتب شده است. عنوان ستون‌ها شامل:" + +#~ msgid "ncalls" +#~ msgstr "ncalls" + +#~ msgid "for the number of calls." +#~ msgstr "برای تعداد فراخوانی‌ها." + +#~ msgid "tottime" +#~ msgstr "tottime" + +#~ msgid "for the total time spent in the given function (and excluding time made in calls to sub-functions)" +#~ msgstr "برای کل زمان صرف‌شده در تابع داده‌شده (و به‌جز زمان صرف‌شده در فراخوانی‌های توابع فرعی)" + +#~ msgid "percall" +#~ msgstr "percall" + +#~ msgid "is the quotient of ``tottime`` divided by ``ncalls``" +#~ msgstr "خارج‌قسمت ``tottime`` بر ``ncalls`` است" + +#~ msgid "cumtime" +#~ msgstr "زمان تجمعی (cumtime)" + +#~ msgid "is the cumulative time spent in this and all subfunctions (from invocation till exit). This figure is accurate *even* for recursive functions." +#~ msgstr "زمان تجمعی صرف‌شده در این تابع و همه زیرتوابع (از فراخوانی تا خروج) است. این رقم *حتی* برای توابع بازگشتی نیز دقیق است." + +#~ msgid "is the quotient of ``cumtime`` divided by primitive calls" +#~ msgstr "خارج‌قسمت ``cumtime`` بر فراخوانی‌های اولیه است" + +#~ msgid "filename:lineno(function)" +#~ msgstr "filename:lineno(function)" + +#~ msgid "provides the respective data of each function" +#~ msgstr "داده‌های مربوط به هر تابع را فراهم می‌کند" + +#~ msgid "When there are two numbers in the first column (for example ``3/1``), it means that the function recursed. The second value is the number of primitive calls and the former is the total number of calls. Note that when the function does not recurse, these two values are the same, and only the single figure is printed." +#~ msgstr "هنگامی که دو عدد در ستون اول وجود داشته باشد (برای مثال ``3/1``)، به این معناست که تابع بازگشتی فراخوانی شده است. مقدار دوم تعداد فراخوانی‌های اولیه (primitive calls) و مقدار اول تعداد کل فراخوانی‌هاست. توجه داشته باشید که وقتی تابع بازگشتی فراخوانی نشود، این دو مقدار یکسان هستند و فقط یک عدد چاپ می‌شود." + +#~ msgid "Instead of printing the output at the end of the profile run, you can save the results to a file by specifying a filename to the :func:`run` function::" +#~ msgstr "به‌جای چاپ خروجی در پایان اجرای پروفایل، می‌توانید با مشخص کردن نام پرونده برای تابع :func:`run`، نتایج را در یک پرونده ذخیره کنید::" + +#~ msgid "" +#~ "import cProfile\n" +#~ "import re\n" +#~ "cProfile.run('re.compile(\"foo|bar\")', 'restats')" +#~ msgstr "" +#~ "import cProfile\n" +#~ "import re\n" +#~ "cProfile.run('re.compile(\"foo|bar\")', 'restats')" + +#~ msgid "The :class:`pstats.Stats` class reads profile results from a file and formats them in various ways." +#~ msgstr "کلاس :class:`pstats.Stats` نتایج پروفایل را از یک پرونده می‌خواند و آن‌ها را به روش‌های مختلفی قالب‌بندی می‌کند." + +#~ msgid "The files :mod:`cProfile` and :mod:`profile` can also be invoked as a script to profile another script. For example::" +#~ msgstr "همچنین می‌توان پرونده‌های :mod:`cProfile` و :mod:`profile` را به‌عنوان یک اسکریپت برای پروفایل‌گیری اسکریپتی دیگر فراخوانی کرد. برای مثال::" + +#~ msgid "python -m cProfile [-o output_file] [-s sort_order] (-m module | myscript.py)" +#~ msgstr "python -m cProfile [-o output_file] [-s sort_order] (-m module | myscript.py)" + +#~ msgid "Writes the profile results to a file instead of to stdout." +#~ msgstr "نتایج پروفایل را به‌جای stdout در یک پرونده می‌نویسد." + +#~ msgid "Specifies one of the :func:`~pstats.Stats.sort_stats` sort values to sort the output by. This only applies when :option:`-o ` is not supplied." +#~ msgstr "یکی از مقادیر مرتب‌سازی :func:`~pstats.Stats.sort_stats` را برای مرتب‌سازی خروجی مشخص می‌کند. این مورد فقط زمانی اعمال می‌شود که :option:`-o ` ارائه نشده باشد." + +#~ msgid "Specifies that a module is being profiled instead of a script." +#~ msgstr "مشخص می‌کند که یک ماژول به‌جای یک اسکریپت پروفایل می‌شود." + +#~ msgid "Added the ``-m`` option to :mod:`cProfile`." +#~ msgstr "گزینه ``-m`` به :mod:`cProfile` افزوده شد." + +#~ msgid "Added the ``-m`` option to :mod:`profile`." +#~ msgstr "گزینه ``-m`` به :mod:`profile` افزوده شد." + +#~ msgid "The :mod:`pstats` module's :class:`~pstats.Stats` class has a variety of methods for manipulating and printing the data saved into a profile results file::" +#~ msgstr "کلاس :class:`~pstats.Stats` در ماژول :mod:`pstats` دارای متدهای مختلفی برای دستکاری و چاپ داده‌های ذخیره‌شده در پرونده نتایج پروفایل است::" + +#~ msgid "" +#~ "import pstats\n" +#~ "from pstats import SortKey\n" +#~ "p = pstats.Stats('restats')\n" +#~ "p.strip_dirs().sort_stats(-1).print_stats()" +#~ msgstr "" +#~ "import pstats\n" +#~ "from pstats import SortKey\n" +#~ "p = pstats.Stats('restats')\n" +#~ "p.strip_dirs().sort_stats(-1).print_stats()" + +#~ msgid "The :meth:`~pstats.Stats.strip_dirs` method removed the extraneous path from all the module names. The :meth:`~pstats.Stats.sort_stats` method sorted all the entries according to the standard module/line/name string that is printed. The :meth:`~pstats.Stats.print_stats` method printed out all the statistics. You might try the following sort calls::" +#~ msgstr "متد :meth:`~pstats.Stats.strip_dirs` مسیر اضافی را از تمام نام‌های ماژول حذف کرد. متد :meth:`~pstats.Stats.sort_stats` تمام ورودی‌ها را بر اساس رشته‌ی استاندارد ماژول/خط/نام که چاپ می‌شود مرتب کرد. متد :meth:`~pstats.Stats.print_stats` تمام آمار را چاپ کرد. ممکن است بخواهید فراخوانی‌های مرتب‌سازی زیر را امتحان کنید::" + +#~ msgid "" +#~ "p.sort_stats(SortKey.NAME)\n" +#~ "p.print_stats()" +#~ msgstr "" +#~ "p.sort_stats(SortKey.NAME)\n" +#~ "p.print_stats()" + +#~ msgid "The first call will actually sort the list by function name, and the second call will print out the statistics. The following are some interesting calls to experiment with::" +#~ msgstr "نخستین فراخوانی در واقع فهرست را بر اساس نام تابع مرتب می‌کند و دومین فراخوانی آمار را چاپ می‌کند. موارد زیر چند فراخوانی جالب برای آزمایش هستند::" + +#~ msgid "p.sort_stats(SortKey.CUMULATIVE).print_stats(10)" +#~ msgstr "p.sort_stats(SortKey.CUMULATIVE).print_stats(10)" + +#~ msgid "This sorts the profile by cumulative time in a function, and then only prints the ten most significant lines. If you want to understand what algorithms are taking time, the above line is what you would use." +#~ msgstr "این دستور پروفایل را بر اساس زمان تجمعی در یک تابع مرتب می‌کند و سپس فقط ۱۰ خط مهم را چاپ می‌کند. اگر می‌خواهید بفهمید کدام الگوریتم‌ها زمان‌بر هستند، باید از خط بالا استفاده کنید." + +#~ msgid "If you were looking to see what functions were looping a lot, and taking a lot of time, you would do::" +#~ msgstr "اگر می‌خواستید ببینید چه توابعی حلقه‌های زیادی اجرا می‌کردند و زمان زیادی می‌بردند، این کار را می‌کردید::" + +#~ msgid "p.sort_stats(SortKey.TIME).print_stats(10)" +#~ msgstr "p.sort_stats(SortKey.TIME).print_stats(10)" + +#~ msgid "to sort according to time spent within each function, and then print the statistics for the top ten functions." +#~ msgstr "برای مرتب‌سازی بر اساس زمان سپری‌شده در هر تابع، و سپس چاپ آمار برای ده تابع برتر." + +#~ msgid "You might also try::" +#~ msgstr "همچنین ممکن است بخواهید این را نیز امتحان کنید::" + +#~ msgid "p.sort_stats(SortKey.FILENAME).print_stats('__init__')" +#~ msgstr "p.sort_stats(SortKey.FILENAME).print_stats('__init__')" + +#~ msgid "This will sort all the statistics by file name, and then print out statistics for only the class init methods (since they are spelled with ``__init__`` in them). As one final example, you could try::" +#~ msgstr "این کار تمام آمارها را بر اساس نام پرونده مرتب می‌کند، و سپس فقط آمار متدهای init کلاس را چاپ می‌کند (زیرا در نام آن‌ها ``__init__`` وجود دارد). به‌عنوان یک مثال نهایی، می‌توانید امتحان کنید::" + +#~ msgid "p.sort_stats(SortKey.TIME, SortKey.CUMULATIVE).print_stats(.5, 'init')" +#~ msgstr "p.sort_stats(SortKey.TIME, SortKey.CUMULATIVE).print_stats(.5, 'init')" + +#~ msgid "This line sorts statistics with a primary key of time, and a secondary key of cumulative time, and then prints out some of the statistics. To be specific, the list is first culled down to 50% (re: ``.5``) of its original size, then only lines containing ``init`` are maintained, and that sub-sub-list is printed." +#~ msgstr "این خط، آمار را با کلید اصلیِ زمان و کلید ثانویه‌ی زمان تجمعی مرتب می‌کند و سپس برخی از آمارها را چاپ می‌کند. به‌طور مشخص، ابتدا فهرست به ۵۰٪ اندازه‌ی اصلی خود (مربوط به ``.5``) کاهش می‌یابد، سپس فقط ردیفهای شامل ``init`` نگه داشته می‌شوند و آن زیرفهرستِ تودرتو چاپ می‌شود." + +#~ msgid "If you wondered what functions called the above functions, you could now (``p`` is still sorted according to the last criteria) do::" +#~ msgstr "اگر می‌خواستید بدانید چه توابعی توابع بالا را فراخوانی کرده‌اند، اکنون می‌توانید (``p`` هنوز بر اساس آخرین معیار مرتب شده است) این کار را انجام دهید::" + +#~ msgid "p.print_callers(.5, 'init')" +#~ msgstr "p.print_callers(.5, 'init')" + +#~ msgid "and you would get a list of callers for each of the listed functions." +#~ msgstr "و شما فهرستی از فراخواننده‌های هر یک از توابع فهرست‌شده را دریافت خواهید کرد." + +#~ msgid "If you want more functionality, you're going to have to read the manual, or guess what the following functions do::" +#~ msgstr "اگر قابلیت بیشتری می‌خواهید، باید راهنما را بخوانید یا حدس بزنید توابع زیر چه کاری انجام می‌دهند::" + +#~ msgid "" +#~ "p.print_callees()\n" +#~ "p.add('restats')" +#~ msgstr "" +#~ "p.print_callees()\n" +#~ "p.add('restats')" + +#~ msgid "Invoked as a script, the :mod:`pstats` module is a statistics browser for reading and examining profile dumps. It has a simple line-oriented interface (implemented using :mod:`cmd`) and interactive help." +#~ msgstr "هنگامی که به‌عنوان یک اسکریپت اجرا شود، ماژول :mod:`pstats` یک مرورگر آمار برای خواندن و بررسی برون‌ریزی‌های پروفایل (profile dumps) است. این ماژول دارای یک رابط خط‌محور ساده (پیاده‌سازی‌شده با استفاده از :mod:`cmd`) و راهنمای تعاملی است." + +#~ msgid "The :class:`Stats` Class" +#~ msgstr "کلاس :class:`Stats`" + +#~ msgid "Analysis of the profiler data is done using the :class:`~pstats.Stats` class." +#~ msgstr "تحلیل داده‌های پروفایل‌گیر با استفاده از کلاس :class:`~pstats.Stats` انجام می‌شود." + +#~ msgid "This class constructor creates an instance of a \"statistics object\" from a *filename* (or list of filenames) or from a :class:`Profile` instance. Output will be printed to the stream specified by *stream*." +#~ msgstr "سازنده‌ی این کلاس، نمونه‌ای از «شیء آماری» را از یک *filename* (یا فهرستی از نام پرونده‌ها) یا از یک نمونه‌ی :class:`Profile` ایجاد می‌کند. خروجی به جریان مشخص‌شده توسط *stream* چاپ می‌شود." + +#~ msgid "The file selected by the above constructor must have been created by the corresponding version of :mod:`profile` or :mod:`cProfile`. To be specific, there is *no* file compatibility guaranteed with future versions of this profiler, and there is no compatibility with files produced by other profilers, or the same profiler run on a different operating system. If several files are provided, all the statistics for identical functions will be coalesced, so that an overall view of several processes can be considered in a single report. If additional files need to be combined with data in an existing :class:`~pstats.Stats` object, the :meth:`~pstats.Stats.add` method can be used." +#~ msgstr "پرونده انتخاب‌شده توسط سازنده‌ی بالا باید به‌وسیله‌ی نسخه‌ی متناظر :mod:`profile` یا :mod:`cProfile` ایجاد شده باشد. به‌طور مشخص، *هیچ* سازگاری پرونده‌ای با نسخه‌های آینده‌ی این پروفایل‌گیر تضمین نمی‌شود، و هیچ سازگاری با پرونده‌های تولیدشده توسط پروفایل‌گیرهای دیگر، یا همان پروفایل‌گیر اجراشده روی یک سیستم‌عامل دیگر وجود ندارد. اگر چندین پرونده ارائه شود، همه‌ی آمارهای مربوط به توابع یکسان با هم ادغام می‌شوند، تا بتوان نمای کلی از چندین فرایند را در یک گزارش واحد در نظر گرفت. اگر نیاز باشد پرونده‌های اضافی با داده‌های موجود در یک شیء :class:`~pstats.Stats` ترکیب شوند، می‌توان از متد :meth:`~pstats.Stats.add` استفاده کرد." + +#~ msgid "Instead of reading the profile data from a file, a :class:`cProfile.Profile` or :class:`profile.Profile` object can be used as the profile data source." +#~ msgstr "به جای خواندن داده‌های پروفایل از یک پرونده، می‌توان از یک شیء :class:`cProfile.Profile` یا :class:`profile.Profile` به‌عنوان منبع داده‌های پروفایل استفاده کرد." + +#~ msgid ":class:`Stats` objects have the following methods:" +#~ msgstr "اشیای :class:`Stats` دارای متدهای زیر هستند:" + +#~ msgid "This method for the :class:`Stats` class removes all leading path information from file names. It is very useful in reducing the size of the printout to fit within (close to) 80 columns. This method modifies the object, and the stripped information is lost. After performing a strip operation, the object is considered to have its entries in a \"random\" order, as it was just after object initialization and loading. If :meth:`~pstats.Stats.strip_dirs` causes two function names to be indistinguishable (they are on the same line of the same filename, and have the same function name), then the statistics for these two entries are accumulated into a single entry." +#~ msgstr "این متد برای کلاس :class:`Stats` تمام اطلاعات ابتدایی مسیر را از نام پرونده‌ها حذف می‌کند. این کار برای کاهش اندازه خروجی چاپی جهت جا شدن در (نزدیک به) ۸۰ ستون بسیار مفید است. این متد شیء را تغییر می‌دهد، و اطلاعات حذف‌شده از دست می‌رود. پس از انجام عملیات حذف، فرض می‌شود که آیتم‌های شیء در ترتیبی «تصادفی» قرار دارند، همان‌طور که درست پس از مقداردهی اولیه و بارگذاری شیء بودند. اگر :meth:`~pstats.Stats.strip_dirs` باعث شود دو نام تابع غیرقابل تمایز شوند (روی یک خط از یک نام پرونده باشند و نام تابع یکسانی داشته باشند)، آمار این دو آیتم در یک آیتم واحد انباشته می‌شود." + +#~ msgid "This method of the :class:`Stats` class accumulates additional profiling information into the current profiling object. Its arguments should refer to filenames created by the corresponding version of :func:`profile.run` or :func:`cProfile.run`. Statistics for identically named (re: file, line, name) functions are automatically accumulated into single function statistics." +#~ msgstr "این متد از کلاس :class:`Stats`، اطلاعات پروفایل‌گیری اضافی را در شیء پروفایل‌گیری جاری انباشته می‌کند. آرگومان‌های آن باید به نام پرونده‌هایی ارجاع دهند که توسط نسخه‌ی متناظر :func:`profile.run` یا :func:`cProfile.run` ایجاد شده‌اند. آمار توابعی که نام یکسان دارند (از نظر: پرونده، خط، نام) به‌طور خودکار در آمار یک تابع واحد انباشته می‌شود." + +#~ msgid "Save the data loaded into the :class:`Stats` object to a file named *filename*. The file is created if it does not exist, and is overwritten if it already exists. This is equivalent to the method of the same name on the :class:`profile.Profile` and :class:`cProfile.Profile` classes." +#~ msgstr "داده‌های بارگذاری‌شده در شیء :class:`Stats` را در پرونده‌ای به نام *filename* ذخیره کنید. در صورتی که پرونده وجود نداشته باشد، ایجاد می‌شود و اگر از قبل وجود داشته باشد، بازنویسی می‌شود. این معادل متدی با همین نام در کلاس‌های :class:`profile.Profile` و :class:`cProfile.Profile` است." + +#~ msgid "This method modifies the :class:`Stats` object by sorting it according to the supplied criteria. The argument can be either a string or a SortKey enum identifying the basis of a sort (example: ``'time'``, ``'name'``, ``SortKey.TIME`` or ``SortKey.NAME``). The SortKey enums argument have advantage over the string argument in that it is more robust and less error prone." +#~ msgstr "این متد شیء :class:`Stats` را با مرتب‌سازی آن بر اساس معیارهای ارائه‌شده تغییر می‌دهد. آرگومان می‌تواند یک رشته یا یک شمارش (enum) از SortKey باشد که مبنای مرتب‌سازی را مشخص می‌کند (مثال: ``'time'``، ``'name'``، ``SortKey.TIME`` یا ``SortKey.NAME``). آرگومان شمارش‌های (enum) SortKey نسبت به آرگومان رشته‌ای این مزیت را دارد که پایدارتر و کمتر مستعد خطا است." + +#~ msgid "When more than one key is provided, then additional keys are used as secondary criteria when there is equality in all keys selected before them. For example, ``sort_stats(SortKey.NAME, SortKey.FILE)`` will sort all the entries according to their function name, and resolve all ties (identical function names) by sorting by file name." +#~ msgstr "وقتی بیش از یک کلید ارائه شود، کلیدهای اضافی به‌عنوان معیارهای ثانویه در صورتی استفاده می‌شوند که در تمام کلیدهای انتخاب‌شده پیش از آن‌ها برابری وجود داشته باشد. برای مثال، ``sort_stats(SortKey.NAME, SortKey.FILE)`` تمام ورودی‌ها را بر اساس نام تابعشان مرتب می‌کند و تمام تساوی‌ها (نام‌های تابع یکسان) را با مرتب‌سازی بر اساس نام پرونده برطرف می‌کند." + +#~ msgid "For the string argument, abbreviations can be used for any key names, as long as the abbreviation is unambiguous." +#~ msgstr "برای آرگومان رشته‌ای، می‌توان از مخفف‌ها برای هر یک از نام‌های کلید استفاده کرد، مشروط بر این‌که مخفف بدون ابهام باشد." + +#~ msgid "The following are the valid string and SortKey:" +#~ msgstr "موارد زیر رشته و SortKey معتبر هستند:" + +#~ msgid "Valid String Arg" +#~ msgstr "آرگومان رشته‌ای معتبر" + +#~ msgid "Valid enum Arg" +#~ msgstr "آرگومان enum معتبر" + +#~ msgid "Meaning" +#~ msgstr "معنی" + +#~ msgid "``'calls'``" +#~ msgstr "``'calls'``" + +#~ msgid "SortKey.CALLS" +#~ msgstr "SortKey.CALLS" + +#~ msgid "call count" +#~ msgstr "تعداد فراخوانی‌ها" + +#~ msgid "``'cumulative'``" +#~ msgstr "``'cumulative'``" + +#~ msgid "SortKey.CUMULATIVE" +#~ msgstr "SortKey.CUMULATIVE" + +#~ msgid "cumulative time" +#~ msgstr "زمان تجمعی" + +#~ msgid "``'cumtime'``" +#~ msgstr "``'cumtime'``" + +#~ msgid "N/A" +#~ msgstr "ناموجود" + +#~ msgid "``'file'``" +#~ msgstr "``'file'``" + +#~ msgid "file name" +#~ msgstr "نام پرونده" + +#~ msgid "``'filename'``" +#~ msgstr "``'filename'``" + +#~ msgid "SortKey.FILENAME" +#~ msgstr "SortKey.FILENAME" + +#~ msgid "``'module'``" +#~ msgstr "``'module'``" + +#~ msgid "``'ncalls'``" +#~ msgstr "``'ncalls'``" + +#~ msgid "``'pcalls'``" +#~ msgstr "``'pcalls'``" + +#~ msgid "SortKey.PCALLS" +#~ msgstr "SortKey.PCALLS" + +#~ msgid "primitive call count" +#~ msgstr "تعداد فراخوانی‌های اولیه" + +#~ msgid "``'line'``" +#~ msgstr "``'line'``" + +#~ msgid "SortKey.LINE" +#~ msgstr "SortKey.LINE" + +#~ msgid "line number" +#~ msgstr "شماره خط" + +#~ msgid "``'name'``" +#~ msgstr "``'name'``" + +#~ msgid "SortKey.NAME" +#~ msgstr "SortKey.NAME" + +#~ msgid "function name" +#~ msgstr "نام تابع" + +#~ msgid "``'nfl'``" +#~ msgstr "``'nfl'``" + +#~ msgid "SortKey.NFL" +#~ msgstr "SortKey.NFL" + +#~ msgid "name/file/line" +#~ msgstr "نام/پرونده/خط" + +#~ msgid "``'stdname'``" +#~ msgstr "``'stdname'``" + +#~ msgid "SortKey.STDNAME" +#~ msgstr "SortKey.STDNAME" + +#~ msgid "standard name" +#~ msgstr "نام استاندارد" + +#~ msgid "``'time'``" +#~ msgstr "``'time'``" + +#~ msgid "SortKey.TIME" +#~ msgstr "SortKey.TIME" + +#~ msgid "internal time" +#~ msgstr "زمان داخلی" + +#~ msgid "``'tottime'``" +#~ msgstr "``'tottime'``" + +#~ msgid "Note that all sorts on statistics are in descending order (placing most time consuming items first), where as name, file, and line number searches are in ascending order (alphabetical). The subtle distinction between ``SortKey.NFL`` and ``SortKey.STDNAME`` is that the standard name is a sort of the name as printed, which means that the embedded line numbers get compared in an odd way. For example, lines 3, 20, and 40 would (if the file names were the same) appear in the string order 20, 3 and 40. In contrast, ``SortKey.NFL`` does a numeric compare of the line numbers. In fact, ``sort_stats(SortKey.NFL)`` is the same as ``sort_stats(SortKey.NAME, SortKey.FILENAME, SortKey.LINE)``." +#~ msgstr "توجه داشته باشید که تمام مرتب‌سازی‌ها بر اساس آمار به ترتیب نزولی هستند (زمان‌برترین آیتم‌ها در ابتدا قرار می‌گیرند)، در حالی که مرتب‌سازی‌های نام، پرونده و شماره خط به ترتیب صعودی (الفبایی) هستند. تفاوت ظریف بین ``SortKey.NFL`` و ``SortKey.STDNAME`` این است که نام استاندارد، مرتب‌سازی نام به همان صورت چاپ‌شده است؛ این بدان معناست که شماره‌های خط تعبیه‌شده به طرز عجیبی مقایسه می‌شوند. برای مثال، سطرهای ۳، ۲۰ و ۴۰ (اگر نام پرونده‌ها یکسان باشد) با ترتیب رشته‌ای به صورت ۲۰، ۳ و ۴۰ ظاهر می‌شوند. در مقابل، ``SortKey.NFL`` شماره‌های خط را به صورت عددی مقایسه می‌کند. در واقع، ``sort_stats(SortKey.NFL)`` همان ``sort_stats(SortKey.NAME, SortKey.FILENAME, SortKey.LINE)`` است." + +#~ msgid "For backward-compatibility reasons, the numeric arguments ``-1``, ``0``, ``1``, and ``2`` are permitted. They are interpreted as ``'stdname'``, ``'calls'``, ``'time'``, and ``'cumulative'`` respectively. If this old style format (numeric) is used, only one sort key (the numeric key) will be used, and additional arguments will be silently ignored." +#~ msgstr "به دلایل سازگاری با نسخه‌های قدیمی، آرگومان‌های عددی ``-1``، ``0``، ``1`` و ``2`` مجاز هستند. این مقادیر به‌ترتیب به‌عنوان ``'stdname'``، ``'calls'``، ``'time'`` و ``'cumulative'`` تفسیر می‌شوند. اگر از این قالب قدیمی (عددی) استفاده شود، تنها یک کلید مرتب‌سازی (کلید عددی) استفاده خواهد شد و آرگومان‌های اضافی به‌صورت بی‌صدا نادیده گرفته می‌شوند." + +#~ msgid "Added the SortKey enum." +#~ msgstr "شمارش SortKey افزوده شد." + +#~ msgid "This method for the :class:`Stats` class reverses the ordering of the basic list within the object. Note that by default ascending vs descending order is properly selected based on the sort key of choice." +#~ msgstr "این متد برای کلاس :class:`Stats`، ترتیب فهرست پایه درون شیء را معکوس می‌کند. توجه داشته باشید که به‌طور پیش‌فرض، ترتیب صعودی یا نزولی به‌درستی بر اساس کلید مرتب‌سازی انتخابی انتخاب می‌شود." + +#~ msgid "This method for the :class:`Stats` class prints out a report as described in the :func:`profile.run` definition." +#~ msgstr "این متد از کلاس :class:`Stats`، گزارشی را همان‌طور که در تعریف :func:`profile.run` شرح داده شده است، چاپ می‌کند." + +#~ msgid "The order of the printing is based on the last :meth:`~pstats.Stats.sort_stats` operation done on the object (subject to caveats in :meth:`~pstats.Stats.add` and :meth:`~pstats.Stats.strip_dirs`)." +#~ msgstr "ترتیب چاپ بر اساس آخرین عملیات :meth:`~pstats.Stats.sort_stats` انجام‌شده روی شیء است (با توجه به ملاحظات موجود در :meth:`~pstats.Stats.add` و :meth:`~pstats.Stats.strip_dirs`)." + +#~ msgid "The arguments provided (if any) can be used to limit the list down to the significant entries. Initially, the list is taken to be the complete set of profiled functions. Each restriction is either an integer (to select a count of lines), or a decimal fraction between 0.0 and 1.0 inclusive (to select a percentage of lines), or a string that will be interpreted as a regular expression (to pattern match the standard name that is printed). If several restrictions are provided, then they are applied sequentially. For example::" +#~ msgstr "می‌توان از آرگومان‌های داده‌شده (در صورت وجود) برای محدود کردن فهرست به آیتم‌های مهم استفاده کرد. در ابتدا، فهرست به‌عنوان مجموعه‌ی کاملی از توابع پروفایل‌شده در نظر گرفته می‌شود. هر محدودیت یا یک عدد صحیح است (برای انتخاب تعدادی از سطرهای)، یا یک کسر اعشاری بین ۰٫۰ و ۱٫۰ شامل هر دو (برای انتخاب درصدی از سطرهای)، یا رشته‌ای است که به‌عنوان عبارت باقاعده تفسیر می‌شود (برای تطبیق الگو با نام استانداردی که چاپ می‌شود). اگر چندین محدودیت ارائه شود، آن‌ها به‌ترتیب اعمال می‌شوند. برای مثال::" + +#~ msgid "print_stats(.1, 'foo:')" +#~ msgstr "print_stats(.1, 'foo:')" + +#~ msgid "would first limit the printing to first 10% of list, and then only print functions that were part of filename :file:`.\\*foo:`. In contrast, the command::" +#~ msgstr "ابتدا چاپ را به ۱۰٪ نخست فهرست محدود می‌کند، و سپس فقط توابعی را چاپ می‌کند که بخشی از نام پرونده :file:`.\\*foo:` بودند. در مقابل، دستور::" + +#~ msgid "print_stats('foo:', .1)" +#~ msgstr "print_stats('foo:', .1)" + +#~ msgid "would limit the list to all functions having file names :file:`.\\*foo:`, and then proceed to only print the first 10% of them." +#~ msgstr "فهرست را به همه توابعی که نام پرونده‌هایشان :file:`.\\*foo:` است محدود می‌کند، و سپس تنها ۱۰٪ نخست آن‌ها را چاپ می‌کند." + +#~ msgid "This method for the :class:`Stats` class prints a list of all functions that called each function in the profiled database. The ordering is identical to that provided by :meth:`~pstats.Stats.print_stats`, and the definition of the restricting argument is also identical. Each caller is reported on its own line. The format differs slightly depending on the profiler that produced the stats:" +#~ msgstr "این متد برای کلاس :class:`Stats` فهرستی از همه توابعی که هر تابع موجود در پایگاه داده‌ی پروفایل‌شده را فراخوانی کرده‌اند، چاپ می‌کند. ترتیب دقیقاً مشابه ترتیب ارائه‌شده توسط :meth:`~pstats.Stats.print_stats` است و تعریف آرگومان محدودکننده نیز کاملاً مشابه است. هر فراخواننده در خط خود گزارش می‌شود. قالب بسته به پروفایل‌گیر تولیدکننده‌ی آمار، کمی متفاوت است:" + +#~ msgid "With :mod:`profile`, a number is shown in parentheses after each caller to show how many times this specific call was made. For convenience, a second non-parenthesized number repeats the cumulative time spent in the function at the right." +#~ msgstr "در :mod:`profile`، یک عدد در پرانتز پس از هر فراخواننده نمایش داده می‌شود تا نشان دهد این فراخوانی خاص چند بار انجام شده است. برای سهولت، یک عدد دوم بدون پرانتز، زمان تجمعی صرف‌شده در تابع سمت راست را تکرار می‌کند." + +#~ msgid "With :mod:`cProfile`, each caller is preceded by three numbers: the number of times this specific call was made, and the total and cumulative times spent in the current function while it was invoked by this specific caller." +#~ msgstr "با :mod:`cProfile`، پیش از هر فراخواننده سه عدد قرار دارد: تعداد دفعاتی که این فراخوانی خاص انجام شده است، و زمان‌های کل و تجمعی صرف‌شده در تابع فعلی هنگامی که توسط این فراخواننده خاص فراخوانی شده است." + +#~ msgid "This method for the :class:`Stats` class prints a list of all function that were called by the indicated function. Aside from this reversal of direction of calls (re: called vs was called by), the arguments and ordering are identical to the :meth:`~pstats.Stats.print_callers` method." +#~ msgstr "این متد برای کلاس :class:`Stats`، فهرستی از تمام توابعی را که توسط تابع مشخص‌شده فراخوانی شده‌اند، چاپ می‌کند. جدا از این معکوس‌سازی جهت فراخوانی‌ها (در خصوص: «فراخوانی‌شده» در مقابل «فراخوانی‌شده توسط»)، آرگومان‌ها و ترتیب با متد :meth:`~pstats.Stats.print_callers` یکسان است." + +#~ msgid "This method returns an instance of StatsProfile, which contains a mapping of function names to instances of FunctionProfile. Each FunctionProfile instance holds information related to the function's profile such as how long the function took to run, how many times it was called, etc..." +#~ msgstr "این متد یک نمونه از StatsProfile را برمی‌گرداند، که شامل نگاشتی از نام‌های تابع به نمونه‌هایی از FunctionProfile است. هر نمونه از FunctionProfile اطلاعات مربوط به پروفایل تابع را نگهداری می‌کند، مانند مدت‌زمانی که اجرای تابع طول کشید، تعداد دفعاتی که فراخوانی شده است، و غیره..." + +#~ msgid "Added the following dataclasses: StatsProfile, FunctionProfile. Added the following function: get_stats_profile." +#~ msgstr "کلاس‌های داده (dataclasses) زیر افزوده شدند: StatsProfile، FunctionProfile. تابع زیر افزوده شد: get_stats_profile." + +#~ msgid ":class:`cProfile.Profile`" +#~ msgstr ":class:`cProfile.Profile`" + +#~ msgid "deterministic profiling" +#~ msgstr "پروفایل‌گیری قطعی" -msgid "profiling, deterministic" -msgstr "پروفایل‌گیری، قطعی" +#~ msgid "profiling, deterministic" +#~ msgstr "پروفایل‌گیری، قطعی" diff --git a/library/profiling.po b/library/profiling.po new file mode 100644 index 00000000..63a7c4ef --- /dev/null +++ b/library/profiling.po @@ -0,0 +1,296 @@ +# Persian translations for Python package. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# Automatically generated, 2026. +# +# Translators: +# Sepehr Rasouli , 2026 +# arman mohebali , 2026 +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-01 14:41+0330\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: fa\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid ":mod:`!profiling` --- Python profilers" +msgstr ":mod:`!profiling` --- پروفایل‌گیرهای پایتون" + +msgid "**Source code:** :source:`Lib/profiling/`" +msgstr "**کد منبع:** :source:`Lib/profiling/`" + +msgid "Introduction to profiling" +msgstr "آشنایی با پروفایل‌گیری" + +msgid "A :dfn:`profile` is a set of statistics that describes how often and for how long various parts of a program execute. These statistics help identify performance bottlenecks and guide optimization efforts. Python provides two fundamentally different approaches to collecting this information: statistical sampling and deterministic tracing." +msgstr "یک :dfn:`profile` مجموعه‌ای از آماره‌ها است که توصیف می‌کند بخش‌های مختلف یک برنامه با چه تناوبی و برای چه مدت‌زمانی اجرا می‌شوند. این آماره‌ها به شناسایی گلوگاه‌های عملکردی کمک کرده و تلاش‌های بهینه‌سازی را هدایت می‌کنند. پایتون دو رویکرد اساساً متفاوت برای جمع‌آوری این اطلاعات ارائه می‌دهد: نمونه‌برداری آماری و ردیابی قطعی (deterministic)." + +msgid "The :mod:`!profiling` package organizes Python's built-in profiling tools under a single namespace. It contains two submodules, each implementing a different profiling methodology:" +msgstr "بسته‌ی :mod:`!profiling` ابزارهای پروفایل‌گیری توکار پایتون را تحت یک فضای نام واحد سازمان‌دهی می‌کند. این بسته شامل دو زیرماژول است که هر کدام متدولوژی پروفایل‌گیری متفاوتی را پیاده‌سازی می‌کنند:" + +msgid ":mod:`profiling.sampling`" +msgstr ":mod:`profiling.sampling`" + +msgid "A statistical profiler that periodically samples the call stack. Run scripts directly or attach to running processes by PID. Provides multiple output formats (flame graphs, heatmaps, Firefox Profiler), GIL analysis, GC tracking, and multiple profiling modes (wall-clock, CPU, GIL) with virtually no overhead." +msgstr "یک پروفایل‌گیر آماری که به‌طور دوره‌ای از پشته‌ی فراخوانی نمونه‌برداری می‌کند. اسکریپت‌ها را مستقیماً اجرا کنید یا از طریق PID به فرایندهای در حال اجرا متصل شوید. این ماژول چندین فرمت خروجی (نمودارهای شعله‌ای، نقشه‌های حرارتی، Firefox Profiler)، تحلیل GIL، پیگیری GC و چندین حالت پروفایل‌گیری (زمان واقعی، CPU، GIL) را با عملاً هیچ سرباری فراهم می‌کند." + +msgid ":mod:`profiling.tracing`" +msgstr ":mod:`profiling.tracing`" + +msgid "A deterministic profiler that traces every function call, return, and exception event. Provides exact call counts and precise timing information, capturing every invocation including very fast functions." +msgstr "یک پروفایل‌گیر قطعی که هر فراخوانی تابع، بازگشت و رویداد استثنا را ردیابی می‌کند. این ماژول تعداد دقیق فراخوانی‌ها و اطلاعات زمانی دقیق را فراهم می‌کند و تمام فراخوانی‌ها، از جمله توابع بسیار سریع را ثبت می‌کند." + +msgid "The profiler modules are designed to provide an execution profile for a given program, not for benchmarking purposes. For benchmarking, use the :mod:`timeit` module, which provides reasonably accurate timing measurements. This distinction is particularly important when comparing Python code against C code: deterministic profilers introduce overhead for Python code but not for C-level functions, which can skew comparisons." +msgstr "ماژول‌های پروفایل‌گیر به‌گونه‌ای طراحی شده‌اند که پروفایل اجرایی یک برنامه‌ی مشخص را ارائه دهند، نه برای اهداف بنچ‌مارک (سنجش کارایی). برای بنچ‌مارک، از ماژول :mod:`timeit` استفاده کنید که اندازه‌گیری‌های زمانی نسبتاً دقیقی را فراهم می‌کند. این تمایز به‌ویژه هنگام مقایسه‌ی کد پایتون با کد C اهمیت دارد: پروفایل‌گیرهای قطعی برای کد پایتون سربار ایجاد می‌کنند اما برای توابع سطح C خیر، که این موضوع می‌تواند مقایسه‌ها را دچار انحراف کند." + +msgid "Choosing a profiler" +msgstr "انتخاب یک پروفایل‌گیر" + +msgid "For most performance analysis, use the statistical profiler (:mod:`profiling.sampling`). It has minimal overhead, works for both development and production, and provides rich visualization options including flame graphs, heatmaps, GIL analysis, and more." +msgstr "برای بیشتر تحلیل‌های عملکردی، از پروفایل‌گیر آماری (:mod:`profiling.sampling`) استفاده کنید. این پروفایل‌گیر حداقل سربار را دارد، هم برای توسعه و هم برای محیط تولید کار می‌کند و گزینه‌های بصری‌سازی غنی از جمله نمودارهای شعله‌ای، نقشه‌های حرارتی، تحلیل GIL و موارد دیگر را فراهم می‌کند." + +msgid "Use the deterministic profiler (:mod:`profiling.tracing`) when you need **exact call counts** and cannot afford to miss any function calls. Since it instruments every function call and return, it will capture even very fast functions that complete between sampling intervals. The tradeoff is higher overhead." +msgstr "هنگامی که به **تعداد دقیق فراخوانی‌ها** نیاز دارید و نمی‌خواهید هیچ فراخوانی تابعی از دست برود، از پروفایل‌گیر قطعی (:mod:`profiling.tracing`) استفاده کنید. از آنجا که این ماژول هر فراخوانی تابع و بازگشتی را ابزاربندی می‌کند، حتی توابع بسیار سریعی را که بین بازه‌های نمونه‌برداری کامل می‌شوند نیز ثبت خواهد کرد. نکته‌ی منفی، سربار بالاتر است." + +msgid "The following table summarizes the key differences:" +msgstr "جدول زیر تفاوت‌های کلیدی را خلاصه می‌کند:" + +msgid "Feature" +msgstr "ویژگی" + +msgid "Statistical sampling (:mod:`profiling.sampling`)" +msgstr "نمونه‌برداری آماری (:mod:`profiling.sampling`)" + +msgid "Deterministic (:mod:`profiling.tracing`)" +msgstr "قطعی (:mod:`profiling.tracing`)" + +msgid "**Overhead**" +msgstr "**سربار**" + +msgid "Virtually none" +msgstr "عملاً صفر" + +msgid "Moderate" +msgstr "متوسط" + +msgid "**Accuracy**" +msgstr "**دقت**" + +msgid "Statistical estimate" +msgstr "برآورد آماری" + +msgid "Exact call counts" +msgstr "تعداد دقیق فراخوانی‌ها" + +msgid "**Output formats**" +msgstr "**قالب‌های خروجی**" + +msgid "pstats, flame graph, heatmap, gecko, collapsed" +msgstr "pstats، نمودار شعله‌ای (flame graph)، نقشه‌ی حرارتی (heatmap)، gecko، فشرده‌شده (collapsed)" + +msgid "pstats" +msgstr "pstats" + +msgid "**Profiling modes**" +msgstr "**حالت‌های پروفایل‌گیری**" + +msgid "Wall-clock, CPU, GIL" +msgstr "زمان دیوار (Wall-clock)، پردازنده، GIL" + +msgid "Wall-clock" +msgstr "زمان دیوار (Wall-clock)" + +msgid "**Special frames**" +msgstr "**قاب‌های ویژه**" + +msgid "GC, native (C extensions)" +msgstr "مدیریت حافظه (GC)، بومی (پسوندهای C)" + +msgid "N/A" +msgstr "ناموجود" + +msgid "**Attach to PID**" +msgstr "**اتصال به PID**" + +msgid "Yes" +msgstr "بله" + +msgid "No" +msgstr "خیر" + +msgid "When to use statistical sampling" +msgstr "چه زمانی از نمونه‌برداری آماری استفاده کنید" + +msgid "The statistical profiler (:mod:`profiling.sampling`) is recommended for most performance analysis tasks. Use it the same way you would use :mod:`profiling.tracing`::" +msgstr "پروفایل‌گیر آماری (:mod:`profiling.sampling`) برای بیشتر وظایف تحلیل کارایی پیشنهاد می‌شود. از آن درست مانند :mod:`profiling.tracing` استفاده کنید::" + +msgid "python -m profiling.sampling run script.py" +msgstr "python -m profiling.sampling run script.py" + +msgid "One of the main strengths of the sampling profiler is its variety of output formats. Beyond traditional pstats tables, it can generate interactive flame graphs that visualize call hierarchies, line-level source heatmaps that show exactly where time is spent in your code, and Firefox Profiler output for timeline-based analysis." +msgstr "یکی از نقاط قوت اصلی پروفایل‌گیر نمونه‌برداری، تنوع قالب‌های خروجی آن است. فراتر از جدول‌های سنتی pstats، این ابزار می‌تواند نمودارهای شعله‌ای تعاملی تولید کند که سلسله‌مراتب فراخوانی را مصورسازی می‌کنند، نقشه‌های حرارتی منبع در سطح سطر که دقیقاً نشان می‌دهند زمان در کک شما کجا صرف شده است، و خروجی پروفایل‌گیر فایرفاکس را برای تحلیل مبتنی بر خط زمانی فراهم کند." + +msgid "The profiler also provides insight into Python interpreter behavior that deterministic profiling cannot capture. Use ``--mode gil`` to identify GIL contention in multi-threaded code, ``--mode cpu`` to measure actual CPU time excluding I/O waits, or inspect ```` frames to understand garbage collection overhead. The ``--native`` option reveals time spent in C extensions, helping distinguish Python overhead from library performance." +msgstr "این پروفایل‌گیر همچنین بینشی نسبت به رفتار مفسر پایتون فراهم می‌کند که پروفایل‌گیری قطعی نمی‌تواند ثبت کند. از ``--mode gil`` برای شناسایی رقابت بر سر GIL در کد چندنخی، از ``--mode cpu`` برای اندازه‌گیری زمان واقعی پردازنده به غیر از انتظارهای I/O، یا بررسی قاب‌های ```` برای درک سربار زباله‌روبی استفاده کنید. گزینه‌ی ``--native`` زمان صرف‌شده در پسوندهای C را آشکار می‌کند و به تفکیک سربار پایتون از کارایی کتابخانه کمک می‌کند." + +msgid "For multi-threaded applications, the ``-a`` option samples all threads simultaneously, showing how work is distributed. And for production debugging, the ``attach`` command connects to any running Python process by PID without requiring a restart or code changes." +msgstr "برای برنامه‌های چندنخی، گزینه‌ی ``-a`` همه نخ‌ها را به‌طور هم‌زمان نمونه‌برداری می‌کند و نشان می‌دهد کار چگونه توزیع شده است. همچنین برای اشکال‌زدایی در محیط تولید، دستور ``attach`` به هر فرایند در حال اجرای پایتون از طریق PID متصل می‌شود بدون اینکه نیازی به راه‌اندازی مجدد یا تغییرات کد باشد." + +msgid "When to use deterministic tracing" +msgstr "چه زمانی از ردیابی قطعی استفاده کنیم" + +msgid "The deterministic profiler (:mod:`profiling.tracing`) instruments every function call and return. This approach has higher overhead than sampling, but guarantees complete coverage of program execution." +msgstr "پروفایل‌گیر قطعی (:mod:`profiling.tracing`) تمام فراخوانی‌ها و بازگشت‌های تابع را ابزارگذاری می‌کند. این رویکرد سربار بالاتری نسبت به نمونه‌برداری دارد، اما پوشش کاملی از اجرای برنامه را تضمین می‌کند." + +msgid "The primary reason to choose deterministic tracing is when you need exact call counts. Statistical profiling estimates frequency based on sampling, which may undercount short-lived functions that complete between samples. If you need to verify that an optimization actually reduced the number of function calls, or if you want to trace the complete call graph to understand caller-callee relationships, deterministic tracing is the right choice." +msgstr "دلیل اصلی برای انتخاب پروفایل‌گیری قطعی زمانی است که به تعداد دقیق فراخوانی‌ها نیاز دارید. پروفایل‌گیری آماری بسامد را بر اساس نمونه‌برداری تخمین می‌زند، که ممکن است توابع عمرکوتاهی را که بین نمونه‌ها کامل می‌شوند، کمتر از مقدار واقعی بشاند. اگر نیاز دارید تأیید کنید که یک بهینه‌سازی واقعاً تعداد فراخوانی‌های تابع را کاهش داده است، یا اگر می‌خواهید گراف کامل فراخوانی‌ها را برای درک روابط فراخواننده و فراخوانده‌شده ردگیری کنید، پروفایل‌گیری قطعی انتخاب درستی است." + +msgid "Deterministic tracing also excels at capturing functions that execute in microseconds. Such functions may not appear frequently enough in statistical samples, but deterministic tracing records every invocation regardless of duration." +msgstr "پروفایل‌گیری قطعی همچنین در ثبت توابع کوتاه‌مدتی که در مایکروثانیه‌ها اجرا می‌شوند عملکرد بسیار خوبی دارد. چنین توابعی ممکن است به اندازه کافی در نمونه‌های آماری ظاهر نشوند، اما پروفایل‌گیری قطعی هر فراخوانی را صرف‌نظر از مدت‌زمان آن ثبت می‌کند." + +msgid "Quick start" +msgstr "شروع سریع" + +msgid "This section provides the minimal steps needed to start profiling. For complete documentation, see the dedicated pages for each profiler." +msgstr "این بخش حداقل گام‌های لازم برای شروع پروفایل‌گیری را ارائه می‌دهد. برای مستندات کامل، صفحات اختصاصی هر پروفایل‌گیر را ببینید." + +msgid "Statistical profiling" +msgstr "پروفایل‌گیری آماری" + +msgid "To profile a script, use the :mod:`profiling.sampling` module with the ``run`` command::" +msgstr "برای پروفایل‌گیری یک اسکریپت، از ماژول :mod:`profiling.sampling` به همراه دستور ``run`` استفاده کنید::" + +msgid "" +"python -m profiling.sampling run script.py\n" +"python -m profiling.sampling run -m mypackage.module" +msgstr "" +"python -m profiling.sampling run script.py\n" +"python -m profiling.sampling run -m mypackage.module" + +msgid "This runs the script under the profiler and prints a summary of where time was spent. For an interactive flame graph::" +msgstr "این کار اسکریپت را تحت پروفایل‌گیر اجرا می‌کند و خلاصه‌ای از محل صرف زمان را چاپ می‌کند. برای یک نمودار شعله‌ی تعاملی::" + +msgid "python -m profiling.sampling run --flamegraph script.py" +msgstr "python -m profiling.sampling run --flamegraph script.py" + +msgid "To profile an already-running process, use the ``attach`` command with the process ID::" +msgstr "برای پروفایل‌گیری یک فرایند در حال اجرا، از دستور ``attach`` به همراه شناسه‌ی فرایند استفاده کنید::" + +msgid "python -m profiling.sampling attach 1234" +msgstr "python -m profiling.sampling attach 1234" + +msgid "For custom settings, specify the sampling interval (in microseconds) and duration (in seconds)::" +msgstr "برای تنظیمات سفارشی، بازه‌ی نمونه‌برداری (بر حسب مایکروثانیه) و مدت‌زمان (بر حسب ثانیه) را مشخص کنید::" + +msgid "python -m profiling.sampling run -i 50 -d 30 script.py" +msgstr "python -m profiling.sampling run -i 50 -d 30 script.py" + +msgid "Deterministic profiling" +msgstr "پروفایل‌گیری قطعی" + +msgid "To profile a script from the command line::" +msgstr "برای پروفایل‌گیری یک اسکریپت از خط فرمان::" + +msgid "python -m profiling.tracing script.py" +msgstr "python -m profiling.tracing script.py" + +msgid "To profile a piece of code programmatically:" +msgstr "برای پروفایل‌گیری بخشی از کد به شکل برنامه‌نویسی‌شده:" + +msgid "" +"import profiling.tracing\n" +"profiling.tracing.run('my_function()')" +msgstr "" +"import profiling.tracing\n" +"profiling.tracing.run('my_function()')" + +msgid "This executes the given code under the profiler and prints a summary showing exact function call counts and timing." +msgstr "این کد داده‌شده را تحت پروفایل‌گیر اجرا می‌کند و خلاصه‌ای شامل تعداد دقیق فراخوانی‌های تابع و زمان‌بندی را چاپ می‌کند." + +msgid "Understanding profile output" +msgstr "درک خروجی پروفایل‌گیری" + +msgid "Both profilers collect function-level statistics, though they present them in different formats. The sampling profiler offers multiple visualizations (flame graphs, heatmaps, Firefox Profiler, pstats tables), while the deterministic profiler produces pstats-compatible output. Regardless of format, the underlying concepts are the same." +msgstr "هر دو پروفایل‌گیر آمار در سطح تابع را جمع‌آوری می‌کنند، البته آن‌ها را در قالب‌های متفاوتی نمایش می‌دهند. پروفایل‌گیر نمونه‌برداری تجسم‌های متعددی (نمودارهای شعله‌ای، نقشه‌های حرارتی، پروفایل‌گیر فایرفاکس، جدول‌های pstats) را ارائه می‌دهد، در حالی که پروفایل‌گیر قطعی (deterministic) خروجی سازگار با pstats تولید می‌کند. صرف‌نظر از قالب، مفاهیم زیربنایی یکسان هستند." + +msgid "Key profiling concepts:" +msgstr "مفاهیم کلیدی پروفایل‌گیری:" + +msgid "**Direct time** (also called *self time* or *tottime*)" +msgstr "**زمان مستقیم** (که زمان خود یا *self time* یا *tottime* نیز نامیده می‌شود)" + +msgid "Time spent executing code in the function itself, excluding time spent in functions it called. High direct time indicates the function contains expensive operations." +msgstr "زمانی که صرف اجرای کد در خودِ تابع می‌شود، به استثنای زمانی که در توابع فراخوانی‌شده توسط آن صرف شده است. زمان مستقیم بالا نشان می‌دهد که تابع شامل عملیات پرهزینه‌ای است." + +msgid "**Cumulative time** (also called *total time* or *cumtime*)" +msgstr "**زمان تجمعی** (که زمان کل یا *total time* یا *cumtime* نیز نامیده می‌شود)" + +msgid "Time spent in the function and all functions it called. This measures the total cost of calling a function, including its entire call subtree." +msgstr "زمانی که در تابع و تمام توابع فراخوانی‌شده توسط آن صرف شده است. این معیار هزینه کل فراخوانی یک تابع، از جمله کل زیردرخت فراخوانی آن را اندازه‌گیری می‌کند." + +msgid "**Call count** (also called *ncalls* or *samples*)" +msgstr "**تعداد فراخوانی** (که *ncalls* یا نمونه‌ها *samples* نیز نامیده می‌شود)" + +msgid "How many times the function was called (deterministic) or sampled (statistical). In deterministic profiling, this is exact. In statistical profiling, it represents the number of times the function appeared in a stack sample." +msgstr "تعداد دفعاتی که تابع فراخوانی (قطعی) یا نمونه‌برداری (آماری) شده است. در پروفایل‌گیری قطعی، این مقدار دقیق است. در پروفایل‌گیری آماری، نشان‌دهنده‌ی تعداد دفعاتی است که تابع در یک نمونه‌ی پشته ظاهر شده است." + +msgid "**Primitive calls**" +msgstr "**فراخوانی‌های اولیه**" + +msgid "Calls that are not induced by recursion. When a function recurses, the total call count includes recursive invocations, but primitive calls counts only the initial entry. Displayed as ``total/primitive`` (for example, ``3/1`` means three total calls, one primitive)." +msgstr "فراخوانی‌هایی که توسط بازگشت (recursion) القا نشده‌اند. هنگامی که یک تابع به صورت بازگشتی اجرا می‌شود، تعداد کل فراخوانی شامل فراخوانی‌های بازگشتی است، اما فراخوانی‌های اولیه فقط ورود اولیه را می‌شمارد. به صورت ``total/primitive`` نمایش داده می‌شود (برای مثال، ``3/1`` به معنای سه فراخوانی کل و یک فراخوانی اولیه است)." + +msgid "**Caller/Callee relationships**" +msgstr "**روابط فراخواننده/فراخوانی‌شونده (Caller/Callee)**" + +msgid "Which functions called a given function (callers) and which functions it called (callees). Flame graphs visualize this as nested rectangles; pstats can display it via the :meth:`~pstats.Stats.print_callers` and :meth:`~pstats.Stats.print_callees` methods." +msgstr "اینکه چه توابعی یک تابع مشخص را فراخوانی کرده‌اند (فراخواننده‌ها) و آن تابع چه توابعی را فراخوانی کرده است (فراخوانی‌شوندگان). نمودارهای شعله‌ای این را به صورت مستطیل‌های تودرتو تجسم می‌کنند؛ pstats می‌تواند آن را از طریق متدهای :meth:`~pstats.Stats.print_callers` و :meth:`~pstats.Stats.print_callees` نمایش دهد." + +msgid "Legacy compatibility" +msgstr "سازگاری با نسخه‌های قبلی" + +msgid "For backward compatibility, the ``cProfile`` module remains available as an alias to :mod:`profiling.tracing`. Existing code using ``import cProfile`` will continue to work without modification in all future Python versions." +msgstr "برای سازگاری عقبگرد، ماژول ``cProfile`` به عنوان یک نام مستعار برای :mod:`profiling.tracing` در دسترس باقی می‌ماند. کدهای موجودی که از ``import cProfile`` استفاده می‌کنند، بدون هیچ تغییری در تمام نسخه‌های آینده‌ی پایتون به کار خود ادامه خواهند داد." + +msgid "The pure Python :mod:`profile` module is deprecated and will be removed in Python 3.17. Use :mod:`profiling.tracing` (or its alias ``cProfile``) instead. See :mod:`profile` for migration guidance." +msgstr "ماژول خالص پایتون :mod:`profile` منسوخ شده است و در پایتون ۳.۱۷ حذف خواهد شد. به‌جای آن از :mod:`profiling.tracing` (یا نام مستعار آن ``cProfile``) استفاده کنید. برای راهنمایی مهاجرت به :mod:`profile` مراجعه کنید." + +msgid "Statistical sampling profiler with flame graphs, heatmaps, and GIL analysis. Recommended for most users." +msgstr "پروفایل‌گیر نمونه‌برداری آماری با نمودارهای شعله‌ای، نقشه‌های حرارتی و تحلیل GIL. برای بیشتر کاربران توصیه می‌شود." + +msgid "Deterministic tracing profiler for exact call counts." +msgstr "پروفایل‌گیر ردیابی قطعی برای تعداد دقیق فراخوانی‌ها." + +msgid ":mod:`pstats`" +msgstr ":mod:`pstats`" + +msgid "Statistics analysis and formatting for profile data." +msgstr "تحلیل آماری و قالب‌بندی برای داده‌های پروفایل." + +msgid ":mod:`timeit`" +msgstr ":mod:`timeit`" + +msgid "Module for measuring execution time of small code snippets." +msgstr "ماژولی برای اندازه‌گیری زمان اجرای قطعه‌کدهای کوچک." + +msgid "Submodules" +msgstr "زیرماژول‌ها" + +msgid "statistical profiling" +msgstr "پروفایل‌گیری آماری" + +msgid "profiling, statistical" +msgstr "پروفایل‌گیری، آماری" + +msgid "deterministic profiling" +msgstr "پروفایل‌گیری قطعی" + +msgid "profiling, deterministic" +msgstr "پروفایل‌گیری، قطعی" diff --git a/library/profiling.sampling.po b/library/profiling.sampling.po new file mode 100644 index 00000000..9f4075d9 --- /dev/null +++ b/library/profiling.sampling.po @@ -0,0 +1,1706 @@ +# Persian translations for Python package. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# Automatically generated, 2026. +# +# Translators: +# Sepehr Rasouli , 2026 +# arman mohebali , 2026 +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 19:59+0330\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: fa\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.6\n" + +msgid ":mod:`!profiling.sampling` --- Statistical profiler" +msgstr ":mod:`!profiling.sampling` --- پروفایل‌گیر آماری" + +msgid "**Source code:** :source:`Lib/profiling/sampling/`" +msgstr "**کد منبع:** :source:`Lib/profiling/sampling/`" + +msgid "Tachyon logo" +msgstr "نشان‌واره تاکیون" + +msgid "The :mod:`!profiling.sampling` module, named **Tachyon**, provides statistical profiling of Python programs through periodic stack sampling. Tachyon can run scripts directly or attach to any running Python process without requiring code changes or restarts. Because sampling occurs externally to the target process, overhead is virtually zero, making Tachyon suitable for both development and production environments." +msgstr "ماژول :mod:`!profiling.sampling` که **Tachyon** نام دارد، پروفایل‌گیری آماری برنامه‌های پایتون را از طریق نمونه‌برداری دوره‌ای پشته فراهم می‌کند. تاکیون می‌تواند اسکریپت‌ها را مستقیماً اجرا کند یا بدون نیاز به تغییرات کد یا راه‌اندازی مجدد، به هر فرایند در حال اجرای پایتون متصل شود. از آنجا که نمونه‌برداری خارج از فرایند هدف انجام می‌شود، سربار عملاً صفر است و این امر تاکیون را هم برای محیط‌های توسعه و هم برای محیط‌های تولید مناسب می‌سازد." + +msgid "What is statistical profiling?" +msgstr "پروفایل‌گیری آماری چیست؟" + +msgid "Statistical profiling builds a picture of program behavior by periodically capturing snapshots of the call stack. Rather than instrumenting every function call and return as deterministic profilers do, Tachyon reads the call stack at regular intervals to record what code is currently running." +msgstr "پروفایل‌گیری آماری با گرفتن تصویرهای لحظه‌ای دوره‌ای از پشته‌ی فراخوانی، تصویری از رفتار برنامه می‌سازد. تاکیون به‌جای ابزارگذاری هر فراخوانی تابع و بازگشت مانند کاری که پروفایل‌گیرهای قطعی انجام می‌دهند، پشته‌ی فراخوانی را در بازه‌های زمانی منظم می‌خواند تا ثبت کند در حال حاضر چه کدی در حال اجراست." + +msgid "This approach rests on a simple principle: functions that consume significant CPU time will appear frequently in the collected samples. By gathering thousands of samples over a profiling session, Tachyon constructs an accurate statistical estimate of where time is spent. The more samples collected, the more precise this estimate becomes." +msgstr "این رویکرد بر یک اصل ساده استوار است: توابعی که زمان قابل‌توجهی از پردازنده را مصرف می‌کنند، به دفعات در نمونه‌های جمع‌آوری‌شده ظاهر خواهند شد. با گردآوری هزاران نمونه در طول یک نشست پروفایل‌گیری، تاکیون تخمین آماری دقیقی از محل صرف زمان می‌سازد. هرچه نمونه‌های بیشتری جمع‌آوری شوند، این تخمین دقیق‌تر می‌شود." + +msgid "The following interactive visualization demonstrates how sampling profiling works. Press **Play** to watch a Python program execute, and observe how the profiler periodically captures snapshots of the call stack. Adjust the **sample interval** to see how sampling frequency affects the results." +msgstr "تصویرسازی تعاملی زیر نحوه عملکرد پروفایل‌گیری نمونه‌برداری را نشان می‌دهد. برای تماشای اجرای یک برنامه‌ی پایتون روی **پخش (Play)** کلیک کنید و مشاهده کنید که چگونه پروفایل‌گیر به‌صورت دوره‌ای تصویرهای لحظه‌ای از پشته‌ی فراخوانی را می‌گیرد. **بازه نمونه‌برداری (sample interval)** را تنظیم کنید تا ببینید فرکانس نمونه‌برداری چگونه بر نتایج تأثیر می‌گذارد." + +msgid "An interactive visualization of sampling profiling is available in the HTML version of this documentation." +msgstr "یک تصویرسازی تعاملی از پروفایل‌گیری نمونه‌برداری در نسخه‌ی HTML این مستندات موجود است." + +msgid "How time is estimated" +msgstr "نحوه‌ی تخمین زمان" + +msgid "The time values shown in Tachyon's output are **estimates derived from sample counts**, not direct measurements. Tachyon counts how many times each function appears in the collected samples, then multiplies by the sampling interval to estimate time." +msgstr "مقادیر زمانی نشان داده شده در خروجی تاکیون **تخمین‌هایی مشتق‌شده از تعداد نمونه‌ها** هستند، نه اندازه‌گیری‌های مستقیم. تاکیون می‌شمارد که هر تابع چند بار در نمونه‌های جمع‌آوری‌شده ظاهر می‌شود، سپس برای تخمین زمان، آن را در بازه‌ی نمونه‌برداری ضرب می‌کند." + +msgid "For example, with a 10 kHz sampling rate over a 10-second profile, Tachyon collects approximately 100,000 samples. If a function appears in 5,000 samples (5% of total), Tachyon estimates it consumed 5% of the 10-second duration, or about 500 milliseconds. This is a statistical estimate, not a precise measurement." +msgstr "برای مثال، با نرخ نمونه‌برداری ۱۰ کیلوهرتز در یک پروفایل ۱۰ ثانیه‌ای، تاکیون (Tachyon) تقریباً ۱۰۰٬۰۰۰ نمونه جمع‌آوری می‌کند. اگر تابعی در ۵٬۰۰۰ نمونه (۵ درصد کل) ظاهر شود، تاکیون تخمین می‌زند که این تابع ۵ درصد از مدت زمان ۱۰ ثانیه‌ای، یعنی حدود ۵۰۰ میلی‌ثانیه را مصرف کرده است. این یک تخمین آماری است، نه یک اندازه‌گیری دقیق." + +msgid "The accuracy of these estimates depends on sample count. With 100,000 samples, a function showing 5% has a margin of error of roughly ±0.5%. With only 1,000 samples, the same 5% measurement could actually represent anywhere from 3% to 7% of real time." +msgstr "دقت این تخمین‌ها به تعداد نمونه بستگی دارد. با ۱۰۰٬۰۰۰ نمونه، تابعی که ۵ درصد را نشان می‌دهد، حاشیه خطای تقریباً ۰.۵± درصد دارد. با تنها ۱٬۰۰۰ نمونه، همان اندازه‌گیری ۵ درصدی در واقع می‌تواند نشان‌دهنده‌ی هر مقداری بین ۳ تا ۷ درصد از زمان واقعی باشد." + +msgid "This is why longer profiling durations and shorter sampling intervals produce more reliable results---they collect more samples. For most performance analysis, the default settings provide sufficient accuracy to identify bottlenecks and guide optimization efforts." +msgstr "به همین دلیل است که مدت زمان‌های طولانی‌ترِ پروفایل‌گیری و بازه‌های نمونه‌برداری کوتاه‌تر نتایج قابل‌اعتماد تری تولید می‌کنند---زیرا نمونه‌های بیشتری جمع‌آوری می‌کنند. برای بیشتر تحلیل‌های عملکرد، تنظیمات پیش‌فرض دقت کافی را برای شناسایی گلوگاه‌ها و هدایت تلاش‌های بهینه‌سازی فراهم می‌کنند." + +msgid "Because sampling is statistical, results will vary slightly between runs. A function showing 12% in one run might show 11% or 13% in the next. This is normal and expected. Focus on the overall pattern rather than exact percentages, and don't worry about small variations between runs." +msgstr "از آنجا که نمونه‌برداری آماری است، نتایج بین اجراها کمی متفاوت خواهد بود. تابعی که در یک اجرا ۱۲ درصد را نشان می‌دهد ممکن است در اجرای بعدی ۱۱ یا ۱۳ درصد را نشان دهد. این موضوع طبیعی و قابل‌انتظار است. به‌جای درصدهای دقیق، روی الگوی کلی تمرکز کنید و نگران تغییرات کوچک بین اجراها نباشید." + +msgid "When to use a different approach" +msgstr "چه زمانی از رویکرد دیگری استفاده کنید" + +msgid "Statistical sampling is not ideal for every situation." +msgstr "نمونه‌برداری آماری برای هر وضعیتی ایده‌آل نیست." + +msgid "For very short scripts that complete in under one second, the profiler may not collect enough samples for reliable results. Use :mod:`profiling.tracing` instead, or run the script in a loop to extend profiling time." +msgstr "برای اسکریپت‌های بسیار کوتاهی که در کمتر از یک ثانیه کامل می‌شوند، ممکن است پروفایل‌گیر نمونه‌های کافی برای نتایج قابل‌اعتماد جمع‌آوری نکند. به‌جای آن از :mod:`profiling.tracing` استفاده کنید یا اسکریپت را در یک حلقه اجرا کنید تا زمان پروفایل‌گیری افزایش یابد." + +msgid "When you need exact call counts, sampling cannot provide them. Sampling estimates frequency from snapshots, so if you need to know precisely how many times a function was called, use :mod:`profiling.tracing`." +msgstr "هنگامی که به تعداد فراخوانی‌های دقیق نیاز دارید، نمونه‌برداری نمی‌تواند آن‌ها را فراهم کند. نمونه‌برداری فرکانس را از روی تصویر‌های لحظه‌ای تخمین می‌زند، بنابراین اگر نیاز دارید دقیقاً بدانید یک تابع چند بار فراخوانی شده است، از :mod:`profiling.tracing` استفاده کنید." + +msgid "When comparing two implementations where the difference might be only 1-2%, sampling noise can obscure real differences. Use :mod:`timeit` for micro-benchmarks or :mod:`profiling.tracing` for precise measurements." +msgstr "هنگام مقایسه‌ی دو پیاده‌سازی که ممکن است تفاوت آن‌ها تنها ۱ تا ۲ درصد باشد، نویز نمونه‌برداری می‌تواند تفاوت‌های واقعی را مبهم کند. برای بنچمارک‌های کوچک از :mod:`timeit` یا برای اندازه‌گیری‌های دقیق از :mod:`profiling.tracing` استفاده کنید." + +msgid "The key difference from :mod:`profiling.tracing` is how measurement happens. A tracing profiler instruments your code, recording every function call and return. This provides exact call counts and precise timing but adds overhead to every function call. A sampling profiler, by contrast, observes the program from outside at fixed intervals without modifying its execution. Think of the difference like this: tracing is like having someone follow you and write down every step you take, while sampling is like taking photographs every second and inferring your path from those snapshots." +msgstr "تفاوت کلیدی با :mod:`profiling.tracing` در نحوه‌ی انجام اندازه‌گیری است. یک پروفایل‌گیر ردیابی (tracing)، کد شما را ابزاربندی می‌کند و هر فراخوانی و بازگشت تابع را ثبت می‌کند. این کار تعداد فراخوانی دقیق و زمان‌بندی دقیقی فراهم می‌کند، اما سرباری به هر فراخوانی تابع اضافه می‌کند. در مقابل، یک پروفایل‌گیر نمونه‌برداری، برنامه را از بیرون در بازه‌های زمانی ثابت بدون تغییر اجرای آن مشاهده می‌کند. تفاوت را این‌گونه تصور کنید: ردیابی مانند این است که فردی شما را دنبال کند و تک‌تک قدم‌هایی که برمی‌دارید را یادداشت کند، در حالی که نمونه‌برداری مانند این است که هر ثانیه عکس بگیرید و مسیر خود را از آن تصاویر لحظه‌ای استنباط کنید." + +msgid "This external observation model is what makes sampling profiling practical for production use. The profiled program runs at full speed because there is no instrumentation code running inside it, and the target process is never stopped or paused during sampling---Tachyon reads the call stack directly from the process's memory while it continues to run. You can attach to a live server, collect data, and detach without the application ever knowing it was observed. The trade-off is that very short-lived functions may be missed if they happen to complete between samples." +msgstr "این مدل مشاهده‌ی خارجی است که پروفایل‌گیری نمونه‌برداری را برای استفاده در محیط عملیاتی (production) کاربردی می‌کند. برنامه‌ی پروفایل‌شده با سرعت کامل اجرا می‌شود زیرا هیچ کد ابزاربندی در داخل آن اجرا نمی‌شود و فرایند هدف هرگز در طول نمونه‌برداری متوقف یا مکث نمی‌شود---تاکیون پشته‌ی فراخوانی را مستقیماً از حافظه‌ی فرایند در حالی که به اجرای خود ادامه می‌دهد می‌خواند. شما می‌توانید به یک سرور در حال اجرا متصل شوید، داده‌ها جمع‌آوری کنید و بدون اینکه برنامه حتی متوجه شود که مشاهده شده است، قطع ارتباط کنید. نکته‌ی منفی این است که توابع بسیار کوتاه ممکن است اگر اتفاقاً بین نمونه‌ها کامل شوند، از دست بروند." + +msgid "Statistical profiling excels at answering the question, \"Where is my program spending time?\" It reveals hotspots and bottlenecks in production code where deterministic profiling overhead would be unacceptable. For exact call counts and complete call graphs, use :mod:`profiling.tracing` instead." +msgstr "پروفایل‌گیری آماری در پاسخ دادن به این سوال که «برنامه‌ی من زمان خود را کجا صرف می‌کند؟» برتری دارد. این روش نقاط داغ و گلوگاه‌ها را در کد محیط عملیاتی که سرباریِ پروفایل‌گیری قطعی (deterministic) در آن‌ها غیرقابل‌قبول است، آشکار می‌کند. برای تعداد فراخوانی دقیق و گراف‌های فراخوانی کامل، به‌جای آن از :mod:`profiling.tracing` استفاده کنید." + +msgid "Quick examples" +msgstr "مثال‌های سریع" + +msgid "Profile a script and see the results immediately::" +msgstr "یک اسکریپت را پروفایل کرده و نتایج را بلافاصله مشاهده کنید::" + +msgid "python -m profiling.sampling run script.py" +msgstr "python -m profiling.sampling run script.py" + +msgid "Profile a module with arguments::" +msgstr "یک ماژول را با آرگومان‌ها پروفایل کنید::" + +msgid "python -m profiling.sampling run -m mypackage.module arg1 arg2" +msgstr "python -m profiling.sampling run -m mypackage.module arg1 arg2" + +msgid "Generate an interactive flame graph::" +msgstr "یک گراف شعله‌ای تعاملی تولید کنید::" + +msgid "python -m profiling.sampling run --flamegraph -o profile.html script.py" +msgstr "python -m profiling.sampling run --flamegraph -o profile.html script.py" + +msgid "Attach to a running process by PID::" +msgstr "با استفاده از PID به یک فرایند در حال اجرا متصل شوید::" + +msgid "python -m profiling.sampling attach 12345" +msgstr "python -m profiling.sampling attach 12345" + +msgid "Print a single snapshot of a running process's stack::" +msgstr "چاپ یک تصویر لحظه‌ای منفرد از پشته‌ی یک فرایند در حال اجرا::" + +msgid "python -m profiling.sampling dump 12345" +msgstr "python -m profiling.sampling dump 12345" + +msgid "Use live mode for real-time monitoring (press ``q`` to quit)::" +msgstr "برای پایش بلادرنگ از حالت زنده استفاده کنید (برای خروج ``q`` را فشار دهید)::" + +msgid "python -m profiling.sampling run --live script.py" +msgstr "python -m profiling.sampling run --live script.py" + +msgid "Profile for 60 seconds with a faster sampling rate::" +msgstr "پروفایل‌گیری را به مدت ۶۰ ثانیه با نرخ نمونه‌برداری سریع‌تر انجام دهید::" + +msgid "python -m profiling.sampling run -d 60 -r 20khz script.py" +msgstr "python -m profiling.sampling run -d 60 -r 20khz script.py" + +msgid "Generate a line-by-line heatmap::" +msgstr "تولید نمودار حرارتی سطربه‌سطر::" + +msgid "python -m profiling.sampling run --heatmap script.py" +msgstr "python -m profiling.sampling run --heatmap script.py" + +msgid "Enable opcode-level profiling to see which bytecode instructions are executing::" +msgstr "برای مشاهده‌ی اینکه کدام دستورات بایت‌کد در حال اجرا هستند، پروفایل‌گیری در سطح آپ‌کد را فعال کنید::" + +msgid "python -m profiling.sampling run --opcodes --flamegraph script.py" +msgstr "python -m profiling.sampling run --opcodes --flamegraph script.py" + +msgid "Commands" +msgstr "دستورات" + +msgid "Tachyon operates through several subcommands. ``run`` and ``attach`` collect samples over time; ``dump`` captures a single snapshot; ``replay`` converts binary profiles to other formats." +msgstr "تاکیون (Tachyon) از طریق چندین زیردستور کار می‌کند. ``run`` و ``attach`` نمونه‌ها را در طول زمان جمع‌آوری می‌کنند؛ ``dump`` یک تصویر لحظه‌ای منفرد را ثبت می‌کند؛ ``replay`` پروفایل‌های دودویی را به قالب‌های دیگر تبدیل می‌کند." + +msgid "The ``run`` command" +msgstr "دستور ``run``" + +msgid "The ``run`` command launches a Python script or module and profiles it from startup::" +msgstr "دستور ``run`` یک اسکریپت یا ماژول پایتون را اجرا کرده و از زمان راه‌اندازی، آن را پروفایل‌گیری می‌کند::" + +msgid "" +"python -m profiling.sampling run script.py\n" +"python -m profiling.sampling run -m mypackage.module" +msgstr "" +"python -m profiling.sampling run script.py\n" +"python -m profiling.sampling run -m mypackage.module" + +msgid "When profiling a script, the profiler starts the target in a subprocess, waits for it to initialize, then begins collecting samples. The ``-m`` flag indicates that the target should be run as a module (equivalent to ``python -m``). Arguments after the target are passed through to the profiled program::" +msgstr "هنگام پروفایل‌گیری یک اسکریپت، پروفایل‌گیر هدف را در یک زیرفرایند راه‌اندازی می‌کند، منتظر مقداردهی اولیه آن می‌ماند و سپس جمع‌آوری نمونه‌ها را آغاز می‌کند. پرچم ``-m`` نشان می‌دهد که هدف باید به عنوان یک ماژول اجرا شود (معادل ``python -m``). آرگومان‌های پس از هدف به برنامه‌ی تحت پروفایل‌گیری منتقل می‌شوند::" + +msgid "python -m profiling.sampling run script.py --config settings.yaml" +msgstr "python -m profiling.sampling run script.py --config settings.yaml" + +msgid "The ``attach`` command" +msgstr "دستور ``attach``" + +msgid "The ``attach`` command connects to an already-running Python process by its process ID::" +msgstr "دستور ``attach`` با استفاده از شناسه‌ی فرایند، به یک فرایند پایتون که از قبل در حال اجراست متصل می‌شود::" + +msgid "This command is particularly valuable for investigating performance issues in production systems. The target process requires no modification and need not be restarted. The profiler attaches, collects samples for the specified duration, then detaches and produces output." +msgstr "این فرمان به‌ویژه برای بررسی مشکلات عملکرد در سیستم‌های محیط عملیاتی (production) بسیار ارزشمند است. فرایند هدف به هیچ تغییری نیاز ندارد و نیازی به راه‌اندازی مجدد آن نیست. پروفایل‌گیر متصل می‌شود، نمونه‌ها را برای مدت‌زمان مشخص‌شده جمع‌آوری می‌کند، سپس جدا می‌شود و خروجی تولید می‌کند." + +msgid "" +"python -m profiling.sampling attach --live 12345\n" +"python -m profiling.sampling attach --flamegraph -d 30 -o profile.html 12345" +msgstr "" +"python -m profiling.sampling attach --live 12345\n" +"python -m profiling.sampling attach --flamegraph -d 30 -o profile.html 12345" + +msgid "On most systems, attaching to another process requires appropriate permissions. See :ref:`profiling-permissions` for platform-specific requirements." +msgstr "در بیشتر سیستم‌ها، اتصال به یک فرایند دیگر نیازمند مجوزهای مناسب است. برای نیازهای مختص هر سکو، :ref:`profiling-permissions` را ببینید." + +msgid "The ``dump`` command" +msgstr "فرمان ``dump``" + +msgid "The ``dump`` command prints a single snapshot of a running process's Python stack and exits, similar to a traceback::" +msgstr "فرمان ``dump`` یک تصویر لحظه‌ای منفرد از پشته‌ی پایتونِ یک فرایند در حال اجرا را چاپ می‌کند و خارج می‌شود، که مشابه یک ردگیری (traceback) است::" + +msgid "Unlike ``attach``, ``dump`` does not run a sampling loop: it reads the stack once. This is useful for investigating hung or unresponsive processes, or for answering \"what is this process doing right now?\"." +msgstr "برخلاف ``attach``، فرمان ``dump`` حلقه‌ی نمونه‌برداری را اجرا نمی‌کند: پشته را یک بار می‌خواند. این کار برای بررسی فرایندهای معلق یا پاسخ‌گو نبودن، یا برای پاسخ به این پرسش که «این فرایند همین الان چه کاری انجام می‌دهد؟»، مفید است." + +msgid "The output mirrors a traceback (most recent call last) and annotates each thread with its current state (main thread, has GIL, on CPU, waiting for GIL, has exception, or idle):" +msgstr "خروجی، یک ردگیری (most recent call last) را منعکس می‌کند و هر نخ را با وضعیت فعلی‌اش حاشیه‌نویسی می‌کند (نخ اصلی، دارای GIL، روی پردازنده، در انتظار GIL، دارای استثنا، یا آماده به کار):" + +msgid "" +"Stack dump for PID 12345, thread 140735 (main thread, has GIL, on CPU; most recent call last):\n" +" File \"server.py\", line 28, in serve\n" +" await handle_request(req)\n" +" File \"handler.py\", line 91, in handle_request\n" +" result = expensive_call(req)" +msgstr "" +"Stack dump for PID 12345, thread 140735 (main thread, has GIL, on CPU; most recent call last):\n" +" File \"server.py\", line 28, in serve\n" +" await handle_request(req)\n" +" File \"handler.py\", line 91, in handle_request\n" +" result = expensive_call(req)" + +msgid "When the target's source files are readable, ``dump`` prints the source line for each frame and highlights the executing expression." +msgstr "هنگامی که پرونده‌های منبع هدف قابل خواندن باشند، ``dump`` سطر منبع را برای هر قاب چاپ می‌کند و عبارت در حال اجرا را برجسته می‌کند." + +msgid "Like ``attach``, ``dump`` requires permission to read the target process's memory. See :ref:`profiling-permissions`." +msgstr "مانند ``attach``، فرمان ``dump`` برای خواندن حافظه‌ی فرایند هدف به مجوز نیاز دارد. :ref:`profiling-permissions` را ببینید." + +msgid "The ``dump`` command supports the following options:" +msgstr "فرمان ``dump`` از گزینه‌های زیر پشتیبانی می‌کند:" + +msgid "``-a``, ``--all-threads``" +msgstr "``-a``، ``--all-threads``" + +msgid "Dump every thread in the target process. Without this flag only the main thread is shown." +msgstr "برون‌ریزی تمام نخ‌ها در فرایند هدف. بدون این پرچم، فقط نخ اصلی نمایش داده می‌شود." + +msgid "``--native``" +msgstr "``--native``" + +msgid "Include synthetic ```` frames marking transitions into C extensions or other non-Python code." +msgstr "شامل قاب‌های مصنوعی ```` که گذارها به افزونه‌های C یا سایر کدهای غیرپایتونی را نشان می‌دهند." + +msgid "``--no-gc``" +msgstr "``--no-gc``" + +msgid "Hide the synthetic ```` frames that mark active garbage collection." +msgstr "پنهان کردن قاب‌های مصنوعی ```` که زباله‌روبی فعال را نشان می‌دهند." + +msgid "``--opcodes``" +msgstr "``--opcodes``" + +msgid "Annotate each frame with the bytecode opcode the thread is currently executing (for example, ``opcode=CALL_KW``). Useful for instruction-level investigation, including identifying specializations chosen by the adaptive interpreter." +msgstr "حاشیه‌نویسی هر قاب با آپ‌کد بایت‌کدی که نخ در حال حاضر در حال اجرای آن است (برای مثال، ``opcode=CALL_KW``). برای بررسی در سطح دستور، از جمله شناسایی تخصیص‌های انتخاب‌شده توسط مفسر تطبیقی، مفید است." + +msgid "``--async-aware``" +msgstr "``--async-aware``" + +msgid "Reconstruct stacks across ``await`` boundaries. ``dump`` walks the task graph and emits one section per task, with ```` markers separating coroutines awaiting each other." +msgstr "بازسازی پشته‌ها در سراسر مرزهای ``await``. دستور ``dump`` گراف وظیفه را پیمایش می‌کند و یک بخش به ازای هر وظیفه صادر می‌کند، به‌طوری که نشانگرهای ```` هم‌روال‌هایی را که منتظر یکدیگر هستند از هم جدا می‌کنند." + +msgid "``--async-mode {running,all}``" +msgstr "``--async-mode {running,all}``" + +msgid "Controls which tasks are included when ``--async-aware`` is enabled. ``running`` shows only the task currently executing on each thread; ``all`` (the default for ``dump``) also includes tasks suspended on a wait. ``attach``'s default for this flag is ``running``; ``dump`` defaults to ``all`` because a single snapshot is most useful when it shows the full task graph." +msgstr "کنترل می‌کند که وقتی گزینه‌ی ``--async-aware`` فعال است، چه وظیفه‌هایی درج شوند. حالت ``running`` تنها وظیفه‌ای را نشان می‌دهد که در حال حاضر روی هر نخ در حال اجرا است؛ حالت ``all`` (که پیش‌فرض دستور ``dump`` است) همچنین شامل وظیفه‌های معلق در حالت انتظار می‌شود. پیش‌فرض این پرچم برای ``attach`` برابر با ``running`` است؛ و برای ``dump`` به طور پیش‌فرض ``all`` است زیرا یک تصویر لحظه‌ای منفرد زمانی بیشترین کارایی را دارد که گراف کامل وظایف را نشان دهد." + +msgid "``--blocking``" +msgstr "``--blocking``" + +msgid "Pause every thread in the target while reading its stack and resume them after. Guarantees a fully consistent snapshot at the cost of briefly stopping the target. Without it, ``dump`` reads memory while the target keeps running, which is faster but can occasionally produce a torn stack." +msgstr "هنگام خواندن پشته‌ی هدف، تمام نخ‌های آن را متوقف می‌کند و پس از آن از سر می‌گیرد. بهای توقف کوتاه هدف، تضمین یک تصویر لحظه‌ای کاملاً سازگار است. بدون آن، ``dump`` حافظه را در حالی می‌خواند که هدف به اجرای خود ادامه می‌دهد، که سریع‌تر است اما گاهی اوقات می‌تواند پشته‌ی ناقصی تولید کند." + +msgid "The ``replay`` command" +msgstr "دستور ``replay``" + +msgid "The ``replay`` command converts binary profile files to other output formats::" +msgstr "دستور ``replay`` پرونده‌های پروفایل دودویی را به سایر قالب‌های خروجی تبدیل می‌کند::" + +msgid "" +"python -m profiling.sampling replay profile.bin\n" +"python -m profiling.sampling replay --flamegraph -o profile.html profile.bin" +msgstr "" +"python -m profiling.sampling replay profile.bin\n" +"python -m profiling.sampling replay --flamegraph -o profile.html profile.bin" + +msgid "This command is useful when you have captured profiling data in binary format and want to analyze it later or convert it to a visualization format. Binary profiles can be replayed multiple times to different formats without re-profiling." +msgstr "این دستور زمانی مفید است که داده‌های پروفایل‌گیری را در قالب دودویی ضبط کرده‌اید و می‌خواهید بعداً آن‌ها را تحلیل کنید یا به یک قالب مصورسازی تبدیل کنید. پروفایل‌های دودویی را می‌توان چندین بار بدون پروفایل‌گیری مجدد به قالب‌های مختلف بازپخش کرد." + +msgid "" +"# Convert binary to pstats (default, prints to stdout)\n" +"python -m profiling.sampling replay profile.bin\n" +"\n" +"# Convert binary to flame graph\n" +"python -m profiling.sampling replay --flamegraph -o output.html profile.bin\n" +"\n" +"# Convert binary to gecko format for Firefox Profiler\n" +"python -m profiling.sampling replay --gecko -o profile.json profile.bin\n" +"\n" +"# Convert binary to heatmap\n" +"python -m profiling.sampling replay --heatmap -o my_heatmap profile.bin" +msgstr "" +"# Convert binary to pstats (default, prints to stdout)\n" +"python -m profiling.sampling replay profile.bin\n" +"\n" +"# Convert binary to flame graph\n" +"python -m profiling.sampling replay --flamegraph -o output.html profile.bin\n" +"\n" +"# Convert binary to gecko format for Firefox Profiler\n" +"python -m profiling.sampling replay --gecko -o profile.json profile.bin\n" +"\n" +"# Convert binary to heatmap\n" +"python -m profiling.sampling replay --heatmap -o my_heatmap profile.bin" + +msgid "Profiling in production" +msgstr "پروفایل‌گیری در محیط تولید" + +msgid "The sampling profiler is designed for production use. It imposes no measurable overhead on the target process because it reads memory externally rather than instrumenting code. The target application continues running at full speed and is unaware it is being profiled." +msgstr "پروفایل‌گیر نمونه‌بردار برای استفاده در محیط تولید طراحی شده است. این ابزار هیچ سربار قابل اندازه‌گیریی روی فرایند هدف تحمیل نمی‌کند زیرا به جای ابزارگذاری کد، حافظه را به صورت بیرونی می‌خواند. برنامه‌ی هدف با سرعت کامل به کار خود ادامه می‌دهد و متوجه نمی‌شود که در حال پروفایل‌گیری است." + +msgid "When profiling production systems, keep these guidelines in mind:" +msgstr "هنگام پروفایل‌گیری سیستم‌های تولید، این دستورالعمل‌ها را به خاطر بسپارید:" + +msgid "Start with shorter durations (10-30 seconds) to get quick results, then extend if you need more statistical accuracy. By default, profiling runs until the target process completes, which is usually sufficient to identify major hotspots." +msgstr "برای دریافت نتایج سریع با مدت‌زمان‌های کوتاه‌تر (۱۰ تا ۳۰ ثانیه) شروع کنید، سپس اگر به دقت آماری بیشتری نیاز دارید آن را افزایش دهید. به طور پیش‌فرض، پروفایل‌گیری تا زمان اتمام فرایند هدف ادامه می‌یابد، که معمولاً برای شناسایی نقاط داغ اصلی کافی است." + +msgid "If possible, profile during representative load rather than peak traffic. Profiles collected during normal operation are easier to interpret than those collected during unusual spikes." +msgstr "در صورت امکان، به جای ترافیک اوج، در طول بارگذاری نمایشی پروفایل‌گیری کنید. پروفایل‌هایی که در حین عملیات عادی جمع‌آوری می‌شوند راحت‌تر از پروفایل‌هایی که در طول جهش‌های غیرمعمول جمع‌آوری شده‌اند، تفسیر می‌شوند." + +msgid "The profiler itself consumes some CPU on the machine where it runs (not on the target process). On the same machine, this is typically negligible. When profiling remote processes, network latency does not affect the target." +msgstr "خودِ پروفایل‌گیر مقداری پردازنده را روی ماشینی که روی آن اجرا می‌شود (نه روی فرایند هدف) مصرف می‌کند. روی همان ماشین، این مقدار معمولاً ناچیز است. هنگام پروفایل‌گیری فرایندهای راه دور، تأخیر شبکه روی هدف تأثیری نمی‌گذارد." + +msgid "Results from production may differ from development due to different data sizes, concurrent load, or caching effects. This is expected and is often exactly what you want to capture." +msgstr "نتایج حاصل از محیط تولید ممکن است به دلیل اندازه‌های مختلف داده، بارگذاری هم‌زمان، یا اثرات حافظه‌ی پنهان با محیط توسعه متفاوت باشد. این امر قابل انتظار است و اغلب دقیقاً همان چیزی است که می‌خواهید ضبط کنید." + +msgid "Platform requirements" +msgstr "نیازمندی‌های سکو" + +msgid "The profiler reads the target process's memory to capture stack traces. This requires elevated permissions on most operating systems." +msgstr "پروفایل‌گیر برای ضبط ردگیری پشته‌ها، حافظه‌ی فرایند هدف را می‌خواند. این کار در بیشتر سیستم‌های عامل نیازمند دسترسی‌های ارتقایافته است." + +msgid "**Linux**" +msgstr "**لینوکس**" + +msgid "On Linux, the profiler uses ``ptrace`` or ``process_vm_readv`` to read the target process's memory. This typically requires one of:" +msgstr "در لینوکس، پروفایل‌گیر از ``ptrace`` یا ``process_vm_readv`` برای خواندن حافظه‌ی فرایند هدف استفاده می‌کند. این کار معمولاً به یکی از موارد زیر نیاز دارد:" + +msgid "Running as root" +msgstr "اجرا به عنوان کاربر root" + +msgid "Having the ``CAP_SYS_PTRACE`` capability" +msgstr "داشتن قابلیت ``CAP_SYS_PTRACE``" + +msgid "Adjusting the Yama ptrace scope: ``/proc/sys/kernel/yama/ptrace_scope``" +msgstr "تنظیم محدوده‌ی Yama ptrace: ``/proc/sys/kernel/yama/ptrace_scope``" + +msgid "The default ptrace_scope of 1 restricts ptrace to parent processes only. To allow attaching to any process owned by the same user, set it to 0::" +msgstr "مقدار پیش‌فرض ptrace_scope یعنی ۱، ptrace را فقط به فرایندهای والد محدود می‌کند. برای اجازه دادن به اتصال به هر فرایندی که متعلق به همان کاربر است، آن را روی 0 تنظیم کنید::" + +msgid "echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope" +msgstr "echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope" + +msgid "**macOS**" +msgstr "**مک‌اوس (macOS)**" + +msgid "On macOS, the profiler uses ``task_for_pid()`` to access the target process. This requires one of:" +msgstr "در مک‌اوس، پروفایل‌گیر از ``task_for_pid()`` برای دسترسی به فرایند هدف استفاده می‌کند. این کار به یکی از موارد زیر نیاز دارد:" + +msgid "The profiler binary having the ``com.apple.security.cs.debugger`` entitlement" +msgstr "داشتن حق دسترسی ``com.apple.security.cs.debugger`` توسط پرونده‌ی دودویی پروفایل‌گیر" + +msgid "System Integrity Protection (SIP) being disabled (not recommended)" +msgstr "غیرفعال بودن قابلیت محافظت یکپارچگی سیستم (SIP) (توصیه نمی‌شود)" + +msgid "**Windows**" +msgstr "**ویندوز**" + +msgid "On Windows, the profiler requires administrative privileges or the ``SeDebugPrivilege`` privilege to read another process's memory." +msgstr "در ویندوز، پروفایل‌گیر برای خواندن حافظه‌ی یک فرایند دیگر به دسترسی‌های مدیریتی یا حق دسترسی ``SeDebugPrivilege`` نیاز دارد." + +msgid "Version compatibility" +msgstr "سازگاری نسخه‌ها" + +msgid "The profiler and target process must run the same Python minor version (for example, both Python 3.15). Attaching from Python 3.14 to a Python 3.15 process is not supported." +msgstr "پروفایل‌گیر و فرایند هدف باید نسخه‌ی فرعی (minor) یکسانی از پایتون را اجرا کنند (برای نمونه، هر دو پایتون 3.15). اتصال از پایتون 3.14 به یک فرایند پایتون 3.15 پشتیبانی نمی‌شود." + +msgid "Additional restrictions apply to pre-release Python versions: if either the profiler or target is running a pre-release (alpha, beta, or release candidate), both must run the exact same version." +msgstr "محدودیت‌های اضافی برای نسخه‌های پیش‌عرضه پایتون اعمال می‌شود: اگر پروفایل‌گیر یا فرایند هدف در حال اجرای نسخه‌ی پیش‌عرضه (آلفا، بتا یا نامزد انتشار) باشد، هر دو باید دقیقاً نسخه‌ی یکسانی را اجرا کنند." + +msgid "On free-threaded Python builds, the profiler cannot attach from a free-threaded build to a standard build, or vice versa." +msgstr "در ساخت‌های نخ‌آزاد (free-threaded) پایتون، پروفایل‌گیر نمی‌تواند از یک ساخت نخ‌آزاد به یک ساخت استاندارد متصل شود، یا برعکس." + +msgid "Sampling configuration" +msgstr "پیکربندی نمونه‌برداری" + +msgid "Before exploring the various output formats and visualization options, it is important to understand how to configure the sampling process itself. The profiler offers several options that control how frequently samples are collected, how long profiling runs, which threads are observed, and what additional context is captured in each sample." +msgstr "پیش از بررسی فرمت‌های خروجی مختلف و گزینه‌های تجسم‌سازی، مهم است که درک کنید چگونه فرایند نمونه‌برداری را پیکربندی کنید. پروفایل‌گیر چندین گزینه ارائه می‌دهد که کنترل می‌کنند نمونه‌ها با چه فرکانسی جمع‌آوری شوند، فرایند پروفایل‌گیری چقدر طول بکشد، کدام نخ‌ها مشاهده شوند و چه زمینه‌ی اضافی در هر نمونه ثبت شود." + +msgid "The default configuration works well for most use cases:" +msgstr "پیکربندی پیش‌فرض برای بیشتر موارد استفاده به خوبی کار می‌کند:" + +msgid "Option" +msgstr "گزینه" + +msgid "Default" +msgstr "پیش‌فرض" + +msgid "Default for ``--sampling-rate`` / ``-r``" +msgstr "پیش‌فرض برای ``--sampling-rate`` / ``-r``" + +msgid "1 kHz" +msgstr "۱ کیلوهرتز" + +msgid "Default for ``--duration`` / ``-d``" +msgstr "پیش‌فرض برای ``--duration`` / ``-d``" + +msgid "Run to completion" +msgstr "اجرا تا تکمیل" + +msgid "Default for ``--all-threads`` / ``-a``" +msgstr "پیش‌فرض برای ``--all-threads`` / ``-a``" + +msgid "Main thread only" +msgstr "فقط نخ اصلی" + +msgid "Default for ``--native``" +msgstr "پیش‌فرض برای ``--native``" + +msgid "No ```` frames (C code time attributed to caller)" +msgstr "بدون قاب‌های ```` (زمان کد C به فراخواننده نسبت داده می‌شود)" + +msgid "Default for ``--no-gc``" +msgstr "پیش‌فرض برای ``--no-gc``" + +msgid "```` frames included when garbage collection is active" +msgstr "قاب‌های ```` هنگامی که زباله‌روبی فعال است گنجانده می‌شوند" + +msgid "Default for ``--mode``" +msgstr "پیش‌فرض برای ``--mode``" + +msgid "Wall-clock mode (all samples recorded)" +msgstr "حالت زمان دیواری (تمام نمونه‌ها ثبت می‌شوند)" + +msgid "Default for ``--realtime-stats``" +msgstr "پیش‌فرض برای ``--realtime-stats``" + +msgid "Disabled" +msgstr "غیرفعال" + +msgid "Default for ``--subprocesses``" +msgstr "پیش‌فرض برای ``--subprocesses``" + +msgid "Default for ``--blocking``" +msgstr "پیش‌فرض برای ``--blocking``" + +msgid "Disabled (non-blocking sampling)" +msgstr "غیرفعال (نمونه‌برداری غیرمسدودکننده)" + +msgid "Sampling rate and duration" +msgstr "نرخ نمونه‌برداری و مدت‌زمان" + +msgid "The two most fundamental parameters are the sampling rate and duration. Together, these determine how many samples will be collected during a profiling session." +msgstr "دو پارامتر اساسی‌ترین نرخ نمونه‌برداری و مدت‌زمان هستند. این دو با هم تعیین می‌کنند که چه تعداد نمونه در طول یک نشست پروفایل‌گیری جمع‌آوری خواهد شد." + +msgid "The :option:`--sampling-rate` option (:option:`-r`) sets how frequently samples are collected. The default is 1 kHz (1,000 samples per second)::" +msgstr "گزینه‌ی :option:`--sampling-rate` (گزینه‌ی :option:`-r`) مشخص می‌کند که نمونه‌ها با چه بسامدی جمع‌آوری شوند. مقدار پیش‌فرض ۱ کیلوهرتز (۱۰۰۰ نمونه در ثانیه) است::" + +msgid "python -m profiling.sampling run -r 20khz script.py" +msgstr "python -m profiling.sampling run -r 20khz script.py" + +msgid "Higher rates capture more samples and provide finer-grained data at the cost of slightly higher profiler CPU usage. Lower rates reduce profiler overhead but may miss short-lived functions. For most applications, the default rate provides a good balance between accuracy and overhead." +msgstr "نرخ‌های بالاتر نمونه‌های بیشتری را ثبت می‌کنند و داده‌های با دقت‌تری را به قیمت مصرف کمی بالاتر CPU توسط پروفایل‌گیر فراهم می‌کنند. نرخ‌های پایین‌تر سربار پروفایل‌گیر را کاهش می‌دهند اما ممکن است توابع عمرکوتاه را از دست بدهند. برای بیشتر برنامه‌ها، نرخ پیش‌فرض تعادل خوبی بین دقت و سربار فراهم می‌کند." + +msgid "The :option:`--duration` option (:option:`-d`) sets how long to profile in seconds. By default, profiling continues until the target process exits or is interrupted::" +msgstr "گزینه‌ی :option:`--duration` (گزینه‌ی :option:`-d`) مدت‌زمان پروفایل‌گیری را برحسب ثانیه تنظیم می‌کند. به‌طور پیش‌فرض، پروفایل‌گیری تا زمان خروج فرایند هدف یا متوقف شدن آن ادامه می‌یابد::" + +msgid "python -m profiling.sampling run -d 60 script.py" +msgstr "python -m profiling.sampling run -d 60 script.py" + +msgid "Specifying a duration is useful when attaching to long-running processes or when you want to limit profiling to a specific time window. When profiling a script, the default behavior of running to completion is usually what you want." +msgstr "مشخص کردن مدت‌زمان زمانی مفید است که به فرایندهای طولانی‌مدت متصل می‌شوید یا می‌خواهید پروفایل‌گیری را به یک بازه‌ی زمانی خاص محدود کنید. هنگام پروفایل‌گیری یک اسکریپت، رفتار پیش‌فرضِ اجرای کامل معمولاً همان چیزی است که می‌خواهید." + +msgid "Thread selection" +msgstr "انتخاب نخ" + +msgid "Python programs often use multiple threads, whether explicitly through the :mod:`threading` module or implicitly through libraries that manage thread pools." +msgstr "برنامه‌های پایتون اغلب از چندین نخ استفاده می‌کنند، چه به‌طور صریح از طریق ماژول :mod:`threading` یا به‌طور ضمنی از طریق کتابخانه‌هایی که استخرهای نخ را مدیریت می‌کنند." + +msgid "By default, the profiler samples only the main thread. The :option:`--all-threads` option (:option:`-a`) enables sampling of all threads in the process::" +msgstr "به‌طور پیش‌فرض، پروفایل‌گیر تنها نخ اصلی را نمونه‌برداری می‌کند. گزینه‌ی :option:`--all-threads` (گزینه‌ی :option:`-a`) نمونه‌برداری از تمام نخ‌ها را در فرایند فعال می‌کند::" + +msgid "python -m profiling.sampling run -a script.py" +msgstr "python -m profiling.sampling run -a script.py" + +msgid "Multi-thread profiling reveals how work is distributed across threads and can identify threads that are blocked or starved. Each thread's samples are combined in the output, with the ability to filter by thread in some formats. This option is particularly useful when investigating concurrency issues or when work is distributed across a thread pool." +msgstr "پروفایل‌گیری چندنخی نشان می‌دهد که کار چگونه در میان نخ‌ها توزیع شده است و می‌تواند نخ‌های مسدودشده یا گرسنه را شناسایی کند. نمونه‌های هر نخ در خروجی ترکیب می‌شوند، با این قابلیت که در برخی قالب‌ها امکان فیلتر کردن بر اساس نخ وجود دارد. این گزینه به‌ویژه هنگام بررسی مسائل هم‌روندی یا زمانی که کار در یک استخر نخ توزیع شده است، مفید است." + +msgid "Blocking mode" +msgstr "حالت مسدودکننده" + +msgid "By default, Tachyon reads the target process's memory without stopping it. This non-blocking approach is ideal for most profiling scenarios because it imposes virtually zero overhead on the target application: the profiled program runs at full speed and is unaware it is being observed." +msgstr "به‌طور پیش‌فرض، Tachyon حافظه‌ی فرایند هدف را بدون متوقف کردن آن می‌خواند. این رویکرد غیرمسدودکننده برای بیشتر سناریوهای پروفایل‌گیری ایده‌آل است زیرا عملاً هیچ سرباری بر برنامه‌ی هدف تحمیل نمی‌کند: برنامه‌ی پروفایل‌شده با سرعت کامل اجرا می‌شود و از اینکه در حال مشاهده است بیگاه است." + +msgid "However, non-blocking sampling can occasionally produce incomplete or inconsistent stack traces in applications with many generators or coroutines that rapidly switch between yield points, or in programs with very fast-changing call stacks where functions enter and exit between the start and end of a single stack read, resulting in reconstructed stacks that mix frames from different execution states or that never actually existed." +msgstr "با این حال، نمونه‌برداری غیرمسدودکننده می‌تواند گه‌گاه ردگیری پشته‌های ناقص یا ناسازگار را در برنامه‌هایی با تعداد زیادی تولیدگر یا هم‌روال که به‌سرعت بین نقاط yield جابه‌جا می‌شوند، یا در برنامه‌هایی با پشته‌های فراخوانی بسیار سریعی که توابع بین شروع و پایان یک خوانش تک‌پشته وارد و خارج می‌شوند، تولید کند؛ که این امر منجر به پشته‌های بازسازی‌شده‌ای می‌شود که فریم‌ها را از وضعیت‌های اجرایی مختلف ترکیب می‌کنند یا در واقع هرگز وجود نداشته‌اند." + +msgid "For these cases, the :option:`--blocking` option stops the target process during each sample::" +msgstr "برای این موارد، گزینه‌ی :option:`--blocking` فرایند هدف را در طول هر نمونه متوقف می‌کند::" + +msgid "" +"python -m profiling.sampling run --blocking script.py\n" +"python -m profiling.sampling attach --blocking 12345" +msgstr "" +"python -m profiling.sampling run --blocking script.py\n" +"python -m profiling.sampling attach --blocking 12345" + +msgid "When blocking mode is enabled, the profiler suspends the target process, reads its stack, then resumes it. This guarantees that each captured stack represents a real, consistent snapshot of what the process was doing at that instant. The trade-off is that the target process runs slower because it is repeatedly paused." +msgstr "هنگامی که حالت مسدودکننده فعال است، پروفایل‌گیر فرایند هدف را معلق می‌کند، پشته‌ی آن را می‌خواند، سپس آن را از سر می‌گیرد. این کار تضمین می‌کند که هر پشته‌ی ثبت‌شده نمایانگر یک تصویر لحظه‌ای واقعی و سازگار از کارهایی است که فرایند در آن لحظه انجام می‌داد. معاوضه‌ی آن این است که فرایند هدف کندتر اجرا می‌شود زیرا به‌طور مکرر مکث می‌کند." + +msgid "Do not use very high sample rates (low ``--interval`` values) with blocking mode. Suspending and resuming a process takes time, and if the sampling interval is too short, the target will spend more time stopped than running. For blocking mode, intervals of 1000 microseconds (1 millisecond) or higher are recommended. The default 100 microsecond interval may cause noticeable slowdown in the target application." +msgstr "از نرخ‌های نمونه‌برداری بسیار بالا (مقادیر کم ``--interval``) با حالت مسدودکننده استفاده نکنید. معلق کردن و از سرگیری یک فرایند زمان می‌برد، و اگر بازه‌ی نمونه‌برداری خیلی کوتاه باشد، هدف زمان بیشتری را صرف متوقف شدن نسبت به اجرا خواهد کرد. برای حالت مسدودکننده، بازه‌های ۱۰۰۰ میکروثانیه (۱ میلی‌ثانیه) یا بالاتر توصیه می‌شوند. بازه‌ی پیش‌فرض ۱۰۰ میکروثانیه‌ای ممکن است باعث کندی محسوسی در برنامه‌ی هدف شود." + +msgid "Use blocking mode only when you observe inconsistent stacks in your profiles, particularly with generator-heavy or coroutine-heavy code. For most applications, the default non-blocking mode provides accurate results with zero impact on the target process." +msgstr "فقط زمانی از حالت مسدودکننده استفاده کنید که پشته‌های ناسازگار را در پروفایل‌های خود مشاهده می‌کنید، به‌ویژه با کدهای دارای تولیدگر زیاد یا هم‌روال زیاد. برای بیشتر برنامه‌ها، حالت غیرمسدودکننده‌ی پیش‌فرض نتایج دقیقی با صفر تأثیر بر فرایند هدف فراهم می‌کند." + +msgid "Special frames" +msgstr "فریم‌های خاص" + +msgid "The profiler can inject artificial frames into the captured stacks to provide additional context about what the interpreter is doing at the moment each sample is taken. These synthetic frames help distinguish different types of execution that would otherwise be invisible." +msgstr "پروفایل‌گیر می‌تواند قاب‌های مصنوعی را به پشته‌های ضبط‌شده تزریق کند تا زمینه‌ی اضافی درباره‌ی آنچه مفسر در زمان گرفته شدن هر نمونه در حال انجام آن است فراهم کند. این قاب‌های مصنوعی به تمایز انواعی از اجرا کمک می‌کنند که در غیر این صورت قابل‌مشاهده نبودند." + +msgid "The :option:`--native` option adds ```` frames to indicate when Python has called into C code (extension modules, built-in functions, or the interpreter itself)::" +msgstr "گزینه‌ی :option:`--native` قاب‌های ```` را اضافه می‌کند تا نشان دهد چه زمانی پایتون کدهای C (ماژول‌های توسعه‌ای، توابع توکار یا خود مفسر) را فراخوانی کرده است::" + +msgid "python -m profiling.sampling run --native script.py" +msgstr "python -m profiling.sampling run --native script.py" + +msgid "These frames help distinguish time spent in Python code versus time spent in native libraries. Without this option, native code execution appears as time in the Python function that made the call. This is useful when optimizing code that makes heavy use of C extensions like NumPy or database drivers." +msgstr "این قاب‌ها کمک می‌کنند زمان صرف‌شده در کدهای پایتون را در مقایسه با زمان صرف‌شده در کتابخانه‌های بومی تشخیص دهید. بدون این گزینه، اجرای کد بومی به شکل زمان صرف‌شده در تابع پایتونی که فراخوانی را انجام داده است نمایش داده می‌شود. این کار هنگام بهینه‌سازی کدهایی که استفاده‌ی زیادی از افزونه‌های C مانند NumPy یا درایورهای پایگاه داده دارند مفید است." + +msgid "By default, the profiler includes ```` frames when garbage collection is active. The :option:`--no-gc` option suppresses these frames::" +msgstr "به‌طور پیش‌فرض، پروفایل‌گیر هنگامی که زباله‌روبی فعال است، قاب‌های ```` را نیز در بر می‌گیرد. گزینه‌ی :option:`--no-gc` این قاب‌ها را حذف می‌کند::" + +msgid "python -m profiling.sampling run --no-gc script.py" +msgstr "python -m profiling.sampling run --no-gc script.py" + +msgid "GC frames help identify programs where garbage collection consumes significant time, which may indicate memory allocation patterns worth optimizing. If you see substantial time in ```` frames, consider investigating object allocation rates or using object pooling." +msgstr "قاب‌های زباله‌روبی به شناسایی برنامه‌هایی کمک می‌کنند که زباله‌روبی در آن‌ها زمان قابل‌توجهی را مصرف می‌کند؛ این امر ممکن است الگوهای تخصیص حافظه را نشان دهد که ارزش بهینه‌سازی دارند. اگر زمان قابل‌توجهی را در قاب‌های ```` مشاهده کردید، بررسی نرخ تخصیص شیء یا استفاده از استخر اشیاء (object pooling) را مد نظر قرار دهید." + +msgid "Opcode-aware profiling" +msgstr "پروفایل‌گیری آگاه از آپ‌کد" + +msgid "The :option:`--opcodes` option enables instruction-level profiling that captures which Python bytecode instructions are executing at each sample::" +msgstr "گزینه‌ی :option:`--opcodes` پروفایل‌گیری در سطح دستور را فعال می‌کند که ثبت می‌کند چه دستورات بایت‌کد پایتونی در هر نمونه در حال اجرا هستند::" + +msgid "This feature provides visibility into Python's bytecode execution, including adaptive specialization optimizations. When a generic instruction like ``LOAD_ATTR`` is specialized at runtime into a more efficient variant like ``LOAD_ATTR_INSTANCE_VALUE``, the profiler shows both the specialized name and the base instruction." +msgstr "این ویژگی دیدگاهی درباره‌ی اجرای بایت‌کد پایتون، از جمله بهینه‌سازی‌های تخصصی تطبیقی، فراهم می‌کند. وقتی یک دستور عام مانند ``LOAD_ATTR`` در زمان اجرا به نوع کارآمدتری مانند ``LOAD_ATTR_INSTANCE_VALUE`` تبدیل می‌شود، پروفایل‌گیر هم نام تخصصی‌شده و هم دستور پایه را نمایش می‌دهد." + +msgid "Opcode information appears in several output formats:" +msgstr "اطلاعات آپ‌کد در چندین قالب خروجی ظاهر می‌شوند:" + +msgid "**Flame graphs**: Hovering over a frame displays a tooltip with a bytecode instruction breakdown, showing which opcodes consumed time in that function" +msgstr "**نمودارهای شعله‌ای (Flame graphs)**: نگه داشتن ماوس روی یک قاب، راهنمای ابزاری با تفکیک دستورات بایت‌کد نمایش می‌دهد که نشان می‌دهد کدام آپ‌کدها زمان را در آن تابع مصرف کرده‌اند" + +msgid "**Heatmap**: Expandable bytecode panels per source line show instruction breakdown with specialization percentages" +msgstr "**نقشه‌ی حرارتی (Heatmap)**: پنل‌های بایت‌کد قابل‌گسترش در هر سطر از کد منبع، تفکیک دستورات را به همراه درصدهای تخصصی‌سازی نشان می‌دهند" + +msgid "**Live mode**: An opcode panel shows instruction-level statistics for the selected function, accessible via keyboard navigation" +msgstr "**حالت زنده (Live mode)**: یک پنل آپ‌کد، آمارهای سطح دستور را برای تابع انتخاب‌شده نمایش می‌دهد که از طریق ناوبری صفحه‌کلید قابل‌دسترسی است" + +msgid "**Gecko format**: Opcode transitions are emitted as interval markers in the Firefox Profiler timeline" +msgstr "**قالب گکو (Gecko format)**: گذارهای آپ‌کد به عنوان نشانگرهای بازه‌ای در خط زمانی پروفایل‌گیر فایرفاکس منتشر می‌شوند" + +msgid "This level of detail is particularly useful for:" +msgstr "این سطح از جزئیات به‌ویژه برای موارد زیر مفید است:" + +msgid "Understanding the performance impact of Python's adaptive specialization" +msgstr "درک تأثیر عملکردی تخصصی‌سازی تطبیقی پایتون" + +msgid "Identifying hot bytecode instructions that might benefit from optimization" +msgstr "شناسایی دستورات داغ بایت‌کد که ممکن است از بهینه‌سازی بهره‌مند شوند" + +msgid "Analyzing the effectiveness of different code patterns at the instruction level" +msgstr "تحلیل اثربخشی الگوهای مختلف کد در سطح دستور" + +msgid "Debugging performance issues that occur at the bytecode level" +msgstr "اشکال‌زدایی مسائل مربوط به عملکرد که در سطح بایت‌کد رخ می‌دهند" + +msgid "The :option:`--opcodes` option is compatible with :option:`--live`, :option:`--flamegraph`, :option:`--heatmap`, and :option:`--gecko` formats. It requires additional memory to store opcode information and may slightly reduce sampling performance, but provides unprecedented visibility into Python's execution model." +msgstr "گزینه‌ی :option:`--opcodes` با قالب‌های :option:`--live`، :option:`--flamegraph`، :option:`--heatmap` و :option:`--gecko` سازگار است. این گزینه برای ذخیره‌ی اطلاعات آپ‌کد به حافظه‌ی اضافی نیاز دارد و ممکن است عملکرد نمونه‌برداری را به میزان ناچیزی کاهش دهد، اما دید بی‌سابقه‌ای نسبت به مدل اجرایی پایتون فراهم می‌کند." + +msgid "Real-time statistics" +msgstr "آمار بلادرنگ" + +msgid "The :option:`--realtime-stats` option displays sampling rate statistics during profiling::" +msgstr "گزینه‌ی :option:`--realtime-stats` آمارهای نرخ نمونه‌برداری را در طول پروفایل‌گیری نمایش می‌دهد::" + +msgid "python -m profiling.sampling run --realtime-stats script.py" +msgstr "python -m profiling.sampling run --realtime-stats script.py" + +msgid "This shows the actual achieved sampling rate, which may be lower than requested if the profiler cannot keep up. The statistics help verify that profiling is working correctly and that sufficient samples are being collected. See :ref:`sampling-efficiency` for details on interpreting these metrics." +msgstr "این کار نرخ نمونه‌برداری واقعیِ به‌دست‌آمده را نشان می‌دهد که اگر پروفایل‌گیر نتواند همگام شود، ممکن است کمتر از مقدار درخواست‌شده باشد. این آمار کمک می‌کند تا مطمئن شوید پروفایل‌گیری به درستی کار می‌کند و نمونه‌های کافی در حال جمع‌آوری هستند. برای جزئیات بیشتر درباره‌ی تفسیر این معیارهای سنجش، به :ref:`sampling-efficiency` مراجعه کنید." + +msgid "Subprocess profiling" +msgstr "پروفایل‌گیری زیرفرایند" + +msgid "The :option:`--subprocesses` option enables automatic profiling of subprocesses spawned by the target::" +msgstr "گزینه‌ی :option:`--subprocesses` پروفایل‌گیری خودکار زیرفرایندهای ایجادشده توسط هدف را فعال می‌کند::" + +msgid "" +"python -m profiling.sampling run --subprocesses script.py\n" +"python -m profiling.sampling attach --subprocesses 12345" +msgstr "" +"python -m profiling.sampling run --subprocesses script.py\n" +"python -m profiling.sampling attach --subprocesses 12345" + +msgid "When enabled, the profiler monitors the target process for child process creation. When a new Python child process is detected, a separate profiler instance is automatically spawned to profile it. This is useful for applications that use :mod:`multiprocessing`, :mod:`subprocess`, :mod:`concurrent.futures` with :class:`~concurrent.futures.ProcessPoolExecutor`, or other process spawning mechanisms." +msgstr "هنگامی که این قابلیت فعال باشد، پروفایل‌گیر، فرایند هدف را برای ایجاد فرایند فرزند زیر نظر می‌گیرد. با شناسایی یک فرایند فرزند جدید پایتون، یک نمونه‌ی جداگانه‌ی پروفایل‌گیر به‌طور خودکار برای پروفایل‌گیری آن راه‌اندازی می‌شود. این ویژگی برای برنامه‌هایی که از :mod:`multiprocessing`، :mod:`subprocess`، :mod:`concurrent.futures` همراه با :class:`~concurrent.futures.ProcessPoolExecutor` یا سایر سازوکارهای ایجاد فرایند استفاده می‌کنند، مفید است." + +msgid "worker_pool.py" +msgstr "worker_pool.py" + +msgid "" +"from concurrent.futures import ProcessPoolExecutor\n" +"import math\n" +"\n" +"def compute_factorial(n):\n" +" total = 0\n" +" for i in range(50):\n" +" total += math.factorial(n)\n" +" return total\n" +"\n" +"if __name__ == \"__main__\":\n" +" numbers = [5000 + i * 100 for i in range(50)]\n" +" with ProcessPoolExecutor(max_workers=4) as executor:\n" +" results = list(executor.map(compute_factorial, numbers))\n" +" print(f\"Computed {len(results)} factorials\")" +msgstr "" +"from concurrent.futures import ProcessPoolExecutor\n" +"import math\n" +"\n" +"def compute_factorial(n):\n" +" total = 0\n" +" for i in range(50):\n" +" total += math.factorial(n)\n" +" return total\n" +"\n" +"if __name__ == \"__main__\":\n" +" numbers = [5000 + i * 100 for i in range(50)]\n" +" with ProcessPoolExecutor(max_workers=4) as executor:\n" +" results = list(executor.map(compute_factorial, numbers))\n" +" print(f\"Computed {len(results)} factorials\")" + +msgid "python -m profiling.sampling run --subprocesses --flamegraph worker_pool.py" +msgstr "python -m profiling.sampling run --subprocesses --flamegraph worker_pool.py" + +msgid "This produces separate flame graphs for the main process and each worker process: ``flamegraph_.html``, ``flamegraph_.html``, and so on." +msgstr "این کار نمودارهای شعله‌ی (flame graph) جداگانه‌ای برای فرایند اصلی و هر فرایند کارگر تولید می‌کند: ``flamegraph_.html``، ``flamegraph_.html`` و غیره." + +msgid "Each subprocess receives its own output file. The filename is derived from the specified output path (or the default) with the subprocess's process ID appended:" +msgstr "هر زیرفرایند پرونده‌ی خروجی خودش را دریافت می‌کند. نام پرونده از مسیر خروجی مشخص‌شده (یا پیش‌فرض) به همراه شناسه‌ی فرایند زیرفرایند که به آن اضافه شده است، مشتق می‌شود:" + +msgid "If you specify ``-o profile.html``, subprocesses produce ``profile_12345.html``, ``profile_12346.html``, and so on" +msgstr "اگر ``-o profile.html`` را مشخص کنید، زیرفرایندها ``profile_12345.html``، ``profile_12346.html`` و غیره را تولید می‌کنند" + +msgid "With default output, subprocesses produce files like ``flamegraph_12345.html`` or directories like ``heatmap_12345``" +msgstr "با خروجی پیش‌فرض، زیرفرایندها پرونده‌هایی مانند ``flamegraph_12345.html`` یا پوشه‌هایی مانند ``heatmap_12345`` تولید می‌کنند" + +msgid "For pstats format (which defaults to stdout), subprocesses produce files like ``profile_12345.pstats``" +msgstr "برای قالب pstats (که به طور پیش‌فرض روی خروجی استاندارد است)، زیرفرایندها پرونده‌هایی مانند ``profile_12345.pstats`` تولید می‌کنند" + +msgid "The subprocess profilers inherit most sampling options from the parent (sampling rate, duration, thread selection, native frames, GC frames, async-aware mode, and output format). All Python descendant processes are profiled recursively, including grandchildren and further descendants." +msgstr "پروفایل‌گیرهای زیرفرایند بیشتر گزینه‌های نمونه‌برداری را از والد به ارث می‌برند (نرخ نمونه‌برداری، مدت‌زمان، انتخاب نخ، فریم‌های بومی، فریم‌های GC، حالت آگاه از ناهمگامی و قالب خروجی). تمام فرایندهای فرزند پایتون، از جمله نوه‌ها و فرزندان بعدی، به طور بازگشتی پروفایل‌گیری می‌شوند." + +msgid "Subprocess detection works by periodically scanning for new descendants of the target process and checking whether each new process is a Python process by probing the process memory for Python runtime structures. Non-Python subprocesses (such as shell commands or external tools) are ignored." +msgstr "شناسایی زیرفرایند با پویش دوره‌ای برای یافتن فرزندان جدید فرایند هدف و بررسی این موضوع انجام می‌شود که آیا هر فرایند جدید با بررسی حافظه‌ی فرایند برای ساختارهای زمان اجرای پایتون، یک فرایند پایتون است یا خیر. زیرفرایندهای غیرپایتونی (مانند دستورات پوسته یا ابزارهای خارجی) نادیده گرفته می‌شوند." + +msgid "There is a limit of 100 concurrent subprocess profilers to prevent resource exhaustion in programs that spawn many processes. If this limit is reached, additional subprocesses are not profiled and a warning is printed." +msgstr "محدودیتی وجود دارد که حداکثر به ۱۰۰ پروفایل‌گیر زیرفرایند هم‌زمان اجازه می‌دهد تا از اتمام منابع در برنامه‌هایی که فرایندهای زیادی ایجاد می‌کنند، جلوگیری شود. اگر به این محدودیت برسید، زیرفرایندهای اضافی پروفایل‌گیری نمی‌شوند و یک هشدار چاپ خواهد شد." + +msgid "The :option:`--subprocesses` option is incompatible with :option:`--live` mode because live mode uses an interactive terminal interface that cannot accommodate multiple concurrent profiler displays." +msgstr "گزینه‌ی :option:`--subprocesses` با حالت :option:`--live` سازگار نیست؛ زیرا حالت زنده از یک رابط پایانهی تعاملی استفاده می‌کند که نمی‌تواند چندین نمایشگر هم‌زمان پروفایل‌گیر را در خود جای دهد." + +msgid "Sampling efficiency" +msgstr "کارایی نمونه‌برداری" + +msgid "Sampling efficiency metrics help assess the quality of the collected data. These metrics appear in the profiler's terminal output and in the flame graph sidebar." +msgstr "معیارهای کارایی نمونه‌برداری به ارزیابی کیفیت داده‌های جمع‌آوری‌شده کمک می‌کنند. این معیارها در خروجی پایانه‌ی پروفایل‌گیر و در نوار کناری نمودار شعله‌ای نمایش داده می‌شوند." + +msgid "**Sampling efficiency** is the percentage of sample attempts that succeeded. Each sample attempt reads the target process's call stack from memory. An attempt can fail if the process is in an inconsistent state at the moment of reading, such as during a context switch or while the interpreter is updating its internal structures. A low efficiency may indicate that the profiler could not keep up with the requested sampling rate, often due to system load or an overly aggressive interval setting." +msgstr "**کارایی نمونه‌برداری** درصد تلاش‌های نمونه‌برداری موفق است. هر تلاش نمونه‌برداری، پشته‌ی فراخوانی فرایند هدف را از حافظه می‌خواند. اگر فرایند در لحظه‌ی خواندن در وضعیتی نامنسجم باشد، مانند زمان تغییر زمینه یا هنگامی که مفسر در حال به‌روزرسانی ساختارهای داخلی خود است، تلاش ممکن است شکست بخورد. کارایی پایین ممکن است نشان‌دهنده‌ی این باشد که پروفایل‌گیر نتوانسته است با نرخ نمونه‌برداری درخواست‌شده همگام شود، که اغلب به دلیل بارگذاری سیستم یا تنظیم بازه‌ی بیش‌ازحد تهاجمی است." + +msgid "**Missed samples** is the percentage of expected samples that were not collected. Based on the configured interval and duration, the profiler expects to collect a certain number of samples. Some samples may be missed if the profiler falls behind schedule, for example when the system is under heavy load. A small percentage of missed samples is normal and does not significantly affect the statistical accuracy of the profile." +msgstr "**نمونه‌های ازدست‌رفته** درصد نمونه‌های پیش‌بینی‌شده‌ای است که جمع‌آوری نشده‌اند. بر اساس بازه و مدت‌زمان پیکربندی‌شده، پروفایل‌گیر انتظار دارد تعداد مشخصی نمونه جمع‌آوری کند. اگر پروفایل‌گیر از برنامه عقب بیفتد، مثلاً وقتی سیستم تحت بارگذاری سنگینی است، ممکن است برخی از نمونه‌ها از دست بروند. درصد کمی از نمونه‌های ازدست‌رفته طبیعی است و تأثیر چشمگیری بر دقت آماری پروفایل ندارد." + +msgid "Both metrics are informational. Even with some failed attempts or missed samples, the profile remains statistically valid as long as enough samples were collected. The profiler reports the actual number of samples captured, which you can use to judge whether the data is sufficient for your analysis." +msgstr "هر دو معیار جنبه‌ی اطلاع‌رسانی دارند. حتی با وجود برخی تلاش‌های ناموفق یا نمونه‌های ازدست‌رفته، تا زمانی که تعداد کافی نمونه جمع‌آوری شده باشد، پروفایل از نظر آماری معتبر باقی می‌ماند. پروفایل‌گیر تعداد واقعی نمونه‌های ضبط‌شده را گزارش می‌کند که می‌توانید از آن برای قضاوت درباره‌ی کافی بودن داده‌ها برای تحلیل خود استفاده کنید." + +msgid "Profiling modes" +msgstr "حالت‌های پروفایل‌گیری" + +msgid "The sampling profiler supports four modes that control which samples are recorded. The mode determines what the profile measures: total elapsed time, CPU execution time, time spent holding the global interpreter lock, or exception handling." +msgstr "پروفایل‌گیر نمونه‌برداری از چهار حالت پشتیبانی می‌کند که مشخص می‌کنند چه نمونه‌هایی ضبط شوند. این حالت تعیین می‌کند که پروفایل چه چیزی را اندازه‌گیری کند: کل زمان سپری‌شده، زمان اجرای پردازنده، زمان صرف‌شده برای نگه داشتن قفل مفسر سراسری، یا مدیریت استثنا." + +msgid "Wall-clock mode" +msgstr "حالت ساعت دیواری" + +msgid "Wall-clock mode (:option:`--mode`\\ ``=wall``) captures all samples regardless of what the thread is doing. This is the default mode and provides a complete picture of where time passes during program execution::" +msgstr "حالت ساعت دیواری (:option:`--mode`\\ ``=wall``) تمام نمونه‌ها را بدون در نظر گرفتن اینکه نخ در حال انجام چه کاری است، ضبط می‌کند. این حالت پیش‌فرض است و تصویر کاملی از محل گذر زمان در طول اجرای برنامه ارائه می‌دهد::" + +msgid "python -m profiling.sampling run --mode=wall script.py" +msgstr "python -m profiling.sampling run --mode=wall script.py" + +msgid "In wall-clock mode, samples are recorded whether the thread is actively executing Python code, waiting for I/O, blocked on a lock, or sleeping. This makes wall-clock profiling ideal for understanding the overall time distribution in your program, including time spent waiting." +msgstr "در حالت ساعت دیواری، نمونه‌ها صرف نظر از اینکه نخ به‌طور فعال در حال اجرای کد پایتون، انتظار برای ورودی/خروجی، مسدودشده روی یک قفل، یا در حال توقف باشد، ثبت می‌شوند. این امر پروفایل‌گیری ساعت دیواری را برای درک توزیع کلی زمان در برنامه‌تان، از جمله زمان صرف‌شده در انتظار، ایده‌آل می‌سازد." + +msgid "If your program spends significant time in I/O operations, network calls, or sleep, wall-clock mode will show these waits as time attributed to the calling function. This is often exactly what you want when optimizing end-to-end latency." +msgstr "اگر برنامه‌ی شما زمان قابل‌توجهی را در عملیات‌های ورودی/خروجی، فراخوانی‌های شبکه یا توقف سپری کند، حالت ساعت دیواری این انتظارات را به عنوان زمانی که به تابع فراخواننده نسبت داده می‌شود نشان خواهد داد. این اغلب دقیقا همان چیزی است که هنگام بهینه‌سازی تاخیر سرتاسری می‌خواهید." + +msgid "CPU mode" +msgstr "حالت پردازنده" + +msgid "CPU mode (:option:`--mode`\\ ``=cpu``) records samples only when the thread is actually executing on a CPU core::" +msgstr "حالت پردازنده (:option:`--mode`\\ ``=cpu``) نمونه‌ها را تنها زمانی ضبط می‌کند که نخ در واقع روی یک هسته‌ی پردازنده در حال اجرا باشد::" + +msgid "python -m profiling.sampling run --mode=cpu script.py" +msgstr "python -m profiling.sampling run --mode=cpu script.py" + +msgid "Samples taken while the thread is sleeping, blocked on I/O, or waiting for a lock are discarded. The resulting profile shows where CPU cycles are consumed, filtering out idle time." +msgstr "نمونه‌هایی که در زمان توقف نخ، مسدود بودن روی ورودی/خروجی یا انتظار برای قفل گرفته شده‌اند، کنار گذاشته می‌شوند. پروفایل حاصل نشان می‌دهد که چرخه‌های پردازنده کجا مصرف می‌شوند و زمان بی‌عطلی را فیلتر می‌کند." + +msgid "CPU mode is useful when you want to focus on computational hotspots without being distracted by I/O waits. If your program alternates between computation and network calls, CPU mode reveals which computational sections are most expensive." +msgstr "حالت پردازنده زمانی مفید است که می‌خواهید بدون حواس‌پرتی توسط انتظارهای ورودی/خروجی، روی نقاط داغ محاسباتی تمرکز کنید. اگر برنامه‌ی شما بین محاسبات و فراخوانی‌های شبکه جابجا شود، حالت پردازنده نشان می‌دهد که کدام بخش‌های محاسباتی پرهزینه‌تر هستند." + +msgid "Comparing wall-clock and CPU profiles" +msgstr "مقایسه‌ی پروفایل‌های ساعت دیواری و پردازنده" + +msgid "Running both wall-clock and CPU mode profiles can reveal whether a function's time is spent computing or waiting." +msgstr "اجرای پروفایل‌های حالت ساعت دیواری و پردازنده می‌تواند مشخص کند که آیا زمان یک تابع صرف محاسبه می‌شود یا انتظار." + +msgid "If a function appears prominently in both profiles, it is a true computational hotspot---actively using the CPU. Optimization should focus on algorithmic improvements or more efficient code." +msgstr "اگر یک تابع در هر دو پروفایل به طور برجسته ظاهر شود، این یعنی با یک نقطه‌ی داغ محاسباتی واقعی روبه‌رو هستید که به طور فعال از پردازنده (CPU) استفاده می‌کند. بهینه‌سازی باید روی بهبودهای الگوریتمی یا کد کارآمدتر متمرکز شود." + +msgid "If a function is high in wall-clock mode but low or absent in CPU mode, it is I/O-bound or waiting. The function spends most of its time waiting for network, disk, locks, or sleep. CPU optimization won't help here; consider async I/O, connection pooling, or reducing wait time instead." +msgstr "اگر یک تابع در حالت زمان دیواری (wall-clock) بالا اما در حالت پردازنده پایین یا غایب باشد، یعنی وابسته به ورودی/خروجی (I/O-bound) است یا در حال انتظار به سر می‌برد. این تابع بیشتر وقت خود را صرف انتظار برای شبکه، دیسک، قفل‌ها یا توقف (sleep) می‌کند. بهینه‌سازی پردازنده در اینجا کمکی نمی‌کند؛ به جای آن، ورودی/خروجی ناهمگام (async I/O)، استخر اتصال (connection pooling) یا کاهش زمان انتظار را در نظر بگیرید." + +msgid "" +"import time\n" +"\n" +"def do_sleep():\n" +" time.sleep(2)\n" +"\n" +"def do_compute():\n" +" sum(i**2 for i in range(1000000))\n" +"\n" +"if __name__ == \"__main__\":\n" +" do_sleep()\n" +" do_compute()" +msgstr "" +"import time\n" +"\n" +"def do_sleep():\n" +" time.sleep(2)\n" +"\n" +"def do_compute():\n" +" sum(i**2 for i in range(1000000))\n" +"\n" +"if __name__ == \"__main__\":\n" +" do_sleep()\n" +" do_compute()" + +msgid "" +"python -m profiling.sampling run --mode=wall script.py # do_sleep ~98%, do_compute ~1%\n" +"python -m profiling.sampling run --mode=cpu script.py # do_sleep absent, do_compute dominates" +msgstr "" +"python -m profiling.sampling run --mode=wall script.py # do_sleep ~98%, do_compute ~1%\n" +"python -m profiling.sampling run --mode=cpu script.py # do_sleep absent, do_compute dominates" + +msgid "GIL mode" +msgstr "حالت GIL" + +msgid "GIL mode (:option:`--mode`\\ ``=gil``) records samples only when the thread holds Python's global interpreter lock::" +msgstr "حالت GIL (:option:`--mode`\\ ``=gil``) نمونه‌ها را تنها زمانی ثبت می‌کند که نخ، قفل مفسر سراسری (global interpreter lock) پایتون را در اختیار داشته باشد::" + +msgid "python -m profiling.sampling run --mode=gil script.py" +msgstr "python -m profiling.sampling run --mode=gil script.py" + +msgid "The GIL is held only while executing Python bytecode. When Python calls into C extensions, performs I/O operations, or executes native code, the GIL is typically released. This means GIL mode effectively measures time spent running Python code specifically, filtering out time in native libraries." +msgstr "قفل GIL تنها در هنگام اجرای بایت‌کد (bytecode) پایتون نگه داشته می‌شود. هنگامی که پایتون افزونه‌های C را فراخوانی می‌کند، عملیات ورودی/خروجی انجام می‌دهد یا کد بومی را اجرا می‌کند، GIL معمولاً آزاد می‌شود. این یعنی حالت GIL به‌طور مؤثری زمان صرف‌شده به‌طور خاص برای اجرای کد پایتون را اندازه‌گیری می‌کند و زمان مصرف‌شده در کتابخانه‌های بومی را فیلتر می‌کند." + +msgid "In multi-threaded programs, GIL mode reveals which code is preventing other threads from running Python bytecode. Since only one thread can hold the GIL at a time, functions that appear frequently in GIL mode profiles are monopolizing the interpreter." +msgstr "در برنامه‌های چندنخی (multi-threaded)، حالت GIL نشان می‌دهد که کدام کد مانع از اجرای بایت‌کد پایتون توسط نخ‌های دیگر می‌شود. از آنجا که در هر لحظه فقط یک نخ می‌تواند GIL را در اختیار داشته باشد، توابعی که به دفعات در پروفایل‌های حالت GIL ظاهر می‌شوند، مفسر را در انحصار خود درآورده‌اند." + +msgid "GIL mode helps answer questions like \"which functions are monopolizing the GIL?\" and \"why are my other threads starving?\" It can also be useful in single-threaded programs to distinguish Python execution time from time spent in C extensions or I/O." +msgstr "حالت GIL کمک می‌کند تا به سؤالاتی مانند «کدام تابع‌ها GIL را انحصاری کرده‌اند؟» و «چرا نخ‌های دیگر من معطل (starving) مانده‌اند؟» پاسخ دهید. همچنین می‌تواند در برنامه‌های تک‌نخی مفید باشد تا زمان اجرای پایتون را از زمان صرف‌شده در افزونه‌های C یا ورودی/خروجی متمایز کنید." + +msgid "" +"import hashlib\n" +"\n" +"def hash_work():\n" +" # C extension - releases GIL during computation\n" +" for _ in range(200):\n" +" hashlib.sha256(b\"data\" * 250000).hexdigest()\n" +"\n" +"def python_work():\n" +" # Pure Python - holds GIL during computation\n" +" for _ in range(3):\n" +" sum(i**2 for i in range(1000000))\n" +"\n" +"if __name__ == \"__main__\":\n" +" hash_work()\n" +" python_work()" +msgstr "" +"import hashlib\n" +"\n" +"def hash_work():\n" +" # C extension - releases GIL during computation\n" +" for _ in range(200):\n" +" hashlib.sha256(b\"data\" * 250000).hexdigest()\n" +"\n" +"def python_work():\n" +" # Pure Python - holds GIL during computation\n" +" for _ in range(3):\n" +" sum(i**2 for i in range(1000000))\n" +"\n" +"if __name__ == \"__main__\":\n" +" hash_work()\n" +" python_work()" + +msgid "" +"python -m profiling.sampling run --mode=cpu script.py # hash_work ~42%, python_work ~38%\n" +"python -m profiling.sampling run --mode=gil script.py # hash_work ~5%, python_work ~60%" +msgstr "" +"python -m profiling.sampling run --mode=cpu script.py # hash_work ~42%, python_work ~38%\n" +"python -m profiling.sampling run --mode=gil script.py # hash_work ~5%, python_work ~60%" + +msgid "Exception mode" +msgstr "حالت استثنا" + +msgid "Exception mode (``--mode=exception``) records samples only when a thread has an active exception::" +msgstr "حالت استثنا (``--mode=exception``) نمونه‌ها را تنها زمانی ثبت می‌کند که یک نخ دارای یک استثنای فعال باشد::" + +msgid "python -m profiling.sampling run --mode=exception script.py" +msgstr "python -m profiling.sampling run --mode=exception script.py" + +msgid "Samples are recorded in two situations: when an exception is being propagated up the call stack (after ``raise`` but before being caught), or when code is executing inside an ``except`` block where exception information is still present in the thread state." +msgstr "نمونه‌ها در دو موقعیت ثبت می‌شوند: هنگامی که یک استثنا در پشته‌ی فراخوانی به بالا انتشار می‌یابد (پس از ``raise`` و پیش از گرفته شدن)، یا هنگامی که کد در داخل یک بلوک ``except`` در حال اجراست که در آن اطلاعات استثنا هنوز در وضعیت نخ (thread state) موجود است." + +msgid "The following example illustrates which code regions are captured:" +msgstr "مثال زیر نشان می‌دهد که کدام نواحی کد ثبت می‌شوند:" + +msgid "" +"def example():\n" +" try:\n" +" raise ValueError(\"error\") # Captured: exception being raised\n" +" except ValueError:\n" +" process_error() # Captured: inside except block\n" +" finally:\n" +" cleanup() # NOT captured: exception already handled\n" +"\n" +"def example_propagating():\n" +" try:\n" +" try:\n" +" raise ValueError(\"error\")\n" +" finally:\n" +" cleanup() # Captured: exception propagating through\n" +" except ValueError:\n" +" pass\n" +"\n" +"def example_no_exception():\n" +" try:\n" +" do_work()\n" +" finally:\n" +" cleanup() # NOT captured: no exception involved" +msgstr "" +"def example():\n" +" try:\n" +" raise ValueError(\"error\") # Captured: exception being raised\n" +" except ValueError:\n" +" process_error() # Captured: inside except block\n" +" finally:\n" +" cleanup() # NOT captured: exception already handled\n" +"\n" +"def example_propagating():\n" +" try:\n" +" try:\n" +" raise ValueError(\"error\")\n" +" finally:\n" +" cleanup() # Captured: exception propagating through\n" +" except ValueError:\n" +" pass\n" +"\n" +"def example_no_exception():\n" +" try:\n" +" do_work()\n" +" finally:\n" +" cleanup() # NOT captured: no exception involved" + +msgid "Note that ``finally`` blocks are only captured when an exception is actively propagating through them. Once an ``except`` block finishes executing, Python clears the exception information before running any subsequent ``finally`` block. Similarly, ``finally`` blocks that run during normal execution (when no exception was raised) are not captured because no exception state is present." +msgstr "توجه داشته باشید که بلوک‌های ``finally`` تنها زمانی ثبت می‌شوند که یک استثنا به طور فعال در حال انتشار از میان آن‌ها باشد. هنگامی که اجرای یک بلوک ``except`` به پایان می‌رسد، پایتون پیش از اجرای هر بلوک ``finally`` بعدی، اطلاعات استثنا را پاک می‌کند. به همین ترتیب، بلوک‌های ``finally`` که در طول اجرای عادی (هنگامی که هیچ استثنایی بالا نیامده است) اجرا می‌شوند، ثبت نمی‌شوند زیرا هیچ وضعیت استثنایی وجود ندارد." + +msgid "This mode is useful for understanding where your program spends time handling errors. Exception handling can be a significant source of overhead in code that uses exceptions for flow control (such as ``StopIteration`` in iterators) or in applications that process many error conditions (such as network servers handling connection failures)." +msgstr "این حالت برای درک این موضوع مفید است که برنامه‌ی شما چه مقدار از زمان خود را صرف پردازش خطاها می‌کند. مدیریت استثنا می‌تواند در کدی که از استثناها برای کنترل جریان استفاده می‌کند (مانند ``StopIteration`` در پیمایش‌گرها) یا در برنامه‌هایی که شرایط خطای زیادی را پردازش می‌کنند (مانند سرورهای شبکه‌ای که با خطاهای اتصال سروکار دارند)، منبع قابل‌توجهی از سربار باشد." + +msgid "Exception mode helps answer questions like \"how much time is spent handling exceptions?\" and \"which exception handlers are the most expensive?\" It can reveal hidden performance costs in code that catches and processes many exceptions, even when those exceptions are handled gracefully. For example, if a parsing library uses exceptions internally to signal format errors, this mode will capture time spent in those handlers even if the calling code never sees the exceptions." +msgstr "حالت استثنا کمک می‌کند به پرسش‌هایی مانند «چه مقدار زمان صرف رسیدگی به استثناها می‌شود؟» و «کدام هندلرهای استثنا پرهزینه‌تر هستند؟» پاسخ دهید. این حالت می‌تواند هزینه‌های عملکردی پنهان را در کدی که تعداد زیادی استثنا را صید و فرایند می‌کند، آشکار سازد؛ حتی زمانی که آن استثناها به شکلی مناسب مدیریت شوند. برای مثال، اگر یک کتابخانه‌ی تجزیه به صورت داخلی از استثناها برای سیگنال دادن خطاهای قالب استفاده کند، این حالت زمان صرف‌شده در آن هندلرها را ضبط خواهد کرد، حتی اگر کد فراخواننده هرگز استثناها را نبیند." + +msgid "Output formats" +msgstr "قالب‌های خروجی" + +msgid "The profiler produces output in several formats, each suited to different analysis workflows. The format is selected with a command-line flag, and output goes to stdout, a file, or a directory depending on the format." +msgstr "پروفایل‌گیر خروجی را در چندین قالب تولید می‌کند که هر یک برای جریان‌کارهای تحلیل مختلفی مناسب هستند. این قالب با یک پرچم خط فرمان انتخاب می‌شود و بسته به قالب، خروجی به stdout، یک پرونده یا یک پوشه هدایت می‌شود." + +msgid "pstats format" +msgstr "قالب pstats" + +msgid "The pstats format (:option:`--pstats`) produces a text table similar to what deterministic profilers generate. This is the default output format::" +msgstr "قالب pstats (:option:`--pstats`) یک جدول متنی مشابه با آنچه پروفایل‌گیرهای قطعی تولید می‌کنند، می‌سازد. این قالب خروجی پیش‌فرض است::" + +msgid "" +"python -m profiling.sampling run script.py\n" +"python -m profiling.sampling run --pstats script.py" +msgstr "" +"python -m profiling.sampling run script.py\n" +"python -m profiling.sampling run --pstats script.py" + +msgid "Tachyon pstats terminal output" +msgstr "خروجی ترمینال pstats در Tachyon" + +msgid "The pstats format displays profiling results in a color-coded table showing function hotspots, sample counts, and timing estimates." +msgstr "قالب pstats نتایج پروفایل‌گیری را در یک جدول رنگ‌بندی‌شده نمایش می‌دهد که نقاط داغ تابع، تعداد نمونه‌ها و تخمین‌های زمانی را نشان می‌دهد." + +msgid "Output appears on stdout by default::" +msgstr "خروجی به طور پیش‌فرض روی stdout ظاهر می‌شود::" + +msgid "" +"Profile Stats (Mode: wall):\n" +" nsamples sample% tottime (ms) cumul% cumtime (ms) filename:lineno(function)\n" +" 234/892 11.7% 234.00 44.6% 892.00 server.py:145(handle_request)\n" +" 156/156 7.8% 156.00 7.8% 156.00 :0(socket.recv)\n" +" 98/421 4.9% 98.00 21.1% 421.00 parser.py:67(parse_message)" +msgstr "" +"Profile Stats (Mode: wall):\n" +" nsamples sample% tottime (ms) cumul% cumtime (ms) filename:lineno(function)\n" +" 234/892 11.7% 234.00 44.6% 892.00 server.py:145(handle_request)\n" +" 156/156 7.8% 156.00 7.8% 156.00 :0(socket.recv)\n" +" 98/421 4.9% 98.00 21.1% 421.00 parser.py:67(parse_message)" + +msgid "The columns show sampling counts and estimated times:" +msgstr "ستون‌ها تعداد نمونه‌برداری و زمان‌های تخمینی را نشان می‌دهند:" + +msgid "**nsamples**: Displayed as ``direct/cumulative`` (for example, ``10/50``). Direct samples are when the function was at the top of the stack, actively executing. Cumulative samples are when the function appeared anywhere on the stack, including when it was waiting for functions it called. If a function shows ``10/50``, it was directly executing in 10 samples and was on the call stack in 50 samples total." +msgstr "**nsamples**: به صورت ``direct/cumulative`` (برای مثال ``10/50``) نمایش داده می‌شود. نمونه‌های مستقیم زمانی هستند که تابع در بالای پشته قرار داشته و به طور فعال در حال اجرا بوده است. نمونه‌های تجمعی زمانی هستند که تابع در هر نقطه‌ای از پشته ظاهر شده است، از جمله زمانی که منتظر توابع فراخوانی‌شده‌ی خود بوده است. اگر یک تابع مقدار ``10/50`` را نشان دهد، یعنی در ۱۰ نمونه به طور مستقیم در حال اجرا بوده و در مجموع در ۵۰ نمونه روی پشته‌ی فراخوانی حضور داشته است." + +msgid "**sample%** and **cumul%**: Percentages of total samples for direct and cumulative counts respectively." +msgstr "**sample%** و **cumul%**: به ترتیب درصدهای کل نمونه‌ها برای تعداد مستقیم و تجمعی." + +msgid "**tottime** and **cumtime**: Estimated wall-clock time based on sample counts and the profiling duration. Time units are selected automatically based on the magnitude: seconds for large values, milliseconds for moderate values, or microseconds for small values." +msgstr "**tottime** و **cumtime**: زمان ساعت دیواری تخمینی بر اساس تعداد نمونه‌ها و مدت زمان پروفایل‌گیری. واحدهای زمانی به طور خودکار بر اساس بزرگی مقدار انتخاب می‌شوند: ثانیه برای مقادیر بزرگ، میلی‌ثانیه برای مقادیر متوسط، یا میکروثانیه برای مقادیر کوچک." + +msgid "The output includes a legend explaining each column and a summary of interesting functions that highlights:" +msgstr "خروجی شامل یک راهنما (Legend) برای توضیح هر ستون و خلاصه‌ای از توابع جالب است که موارد زیر را برجسته می‌کند:" + +msgid "**Hot spots**: Functions with high direct/cumulative sample ratio (ratio close to 1.0). These functions spend most of their time executing their own code rather than waiting for callees. High ratios indicate where CPU time is actually consumed." +msgstr "**نقاط داغ (Hot spots)**: توابعی با نسبت نمونه‌ی مستقیم به تجمعی بالا (نسبتی نزدیک به ۱.۰). این توابع بیشتر وقت خود را صرف اجرای کد خود می‌کنند تا انتظار برای توابع فراخوانی‌شده. نسبت‌های بالا نشان می‌دهند که زمان CPU در کجا به طور واقعی مصرف می‌شود." + +msgid "**Indirect calls**: Functions with large differences between cumulative and direct samples. These are orchestration functions that delegate work to other functions. They appear frequently on the stack but rarely at the top." +msgstr "**فراخوانی‌های غیرمستقیم**: توابعی با تفاوت زیاد بین نمونه‌های تجمعی و مستقیم. این‌ها توابع ارکستراسیون هستند که کار را به توابع دیگر محول می‌کنند. آن‌ها به وفور روی پشته ظاهر می‌شوند اما به ندرت در بالا قرار می‌گیرند." + +msgid "**Call magnification**: Functions where cumulative samples far exceed direct samples (high cumulative/direct multiplier). These are frequently-nested functions that appear deep in many call chains." +msgstr "**بزرگ‌نمایی فراخوانی**: توابعی که در آن‌ها نمونه‌های تجمعی به طور قابل‌توجهی از نمونه‌های مستقیم فراتر می‌روند (ضریب تجمعی/مستقیم بالا). این‌ها توابع به طور مکرر تو در تویی هستند که در عمق بسیاری از زنجیره‌های فراخوانی ظاهر می‌شوند." + +msgid "Use :option:`--no-summary` to suppress both the legend and summary sections." +msgstr "از :option:`--no-summary` برای حذف بخش‌های راهنما و خلاصه استفاده کنید." + +msgid "To save pstats output to a binary file instead of stdout::" +msgstr "برای ذخیره‌ی خروجی pstats در یک پرونده دودویی به جای stdout::" + +msgid "python -m profiling.sampling run -o profile.pstats script.py" +msgstr "python -m profiling.sampling run -o profile.pstats script.py" + +msgid "The pstats format supports several options for controlling the display. The :option:`--sort` option determines the column used for ordering results::" +msgstr "قالب pstats گزینه‌های متعددی را برای کنترل نحوه نمایش پشتیبانی می‌کند. گزینه‌ی :option:`--sort` ستون مورد استفاده برای مرتب‌سازی نتایج را مشخص می‌کند::" + +msgid "" +"python -m profiling.sampling run --sort=tottime script.py\n" +"python -m profiling.sampling run --sort=cumtime script.py\n" +"python -m profiling.sampling run --sort=nsamples script.py" +msgstr "" +"python -m profiling.sampling run --sort=tottime script.py\n" +"python -m profiling.sampling run --sort=cumtime script.py\n" +"python -m profiling.sampling run --sort=nsamples script.py" + +msgid "The :option:`--limit` option restricts output to the top N entries::" +msgstr "گزینه‌ی :option:`--limit` خروجی را به N ورودی برتر محدود می‌کند::" + +msgid "python -m profiling.sampling run --limit=30 script.py" +msgstr "python -m profiling.sampling run --limit=30 script.py" + +msgid "The :option:`--no-summary` option suppresses the header summary that precedes the statistics table." +msgstr "گزینه‌ی :option:`--no-summary` خلاصه سرآیند را که پیش از جدول آمار می‌آید، حذف می‌کند." + +msgid "Collapsed stacks format" +msgstr "قالب پشته‌های فشرده‌شده" + +msgid "Collapsed stacks format (:option:`--collapsed`) produces one line per unique call stack, with a count of how many times that stack was sampled::" +msgstr "قالب پشته‌های فشرده‌شده (:option:`--collapsed`) برای هر پشته‌ی فراخوانی منحصربه‌فرد یک سطر تولید می‌کند، همراه با تعداد دفعاتی که از آن پشته نمونه‌برداری شده است::" + +msgid "python -m profiling.sampling run --collapsed script.py" +msgstr "python -m profiling.sampling run --collapsed script.py" + +msgid "The output looks like:" +msgstr "خروجی به این صورت است:" + +msgid "" +"main;process_data;parse_json;decode_utf8 42\n" +"main;process_data;parse_json 156\n" +"main;handle_request;send_response 89" +msgstr "" +"main;process_data;parse_json;decode_utf8 42\n" +"main;process_data;parse_json 156\n" +"main;handle_request;send_response 89" + +msgid "Each line contains semicolon-separated function names representing the call stack from bottom to top, followed by a space and the sample count. This format is designed for compatibility with external flame graph tools, particularly Brendan Gregg's ``flamegraph.pl`` script." +msgstr "هر سطر شامل نام‌های تابعی است که با نقطه و ویرگول از هم جدا شده‌اند و نمایانگر پشته‌ی فراخوانی از پایین به بالا هستند، و به دنبال آن یک فاصله و تعداد نمونه قرار دارد. این قالب برای سازگاری با ابزارهای نمودار شعله‌ی خارجی، به‌ویژه اسکریپت ``flamegraph.pl`` اثر برندان گرگ (Brendan Gregg)، طراحی شده است." + +msgid "To generate a flame graph from collapsed stacks::" +msgstr "برای تولید یک نمودار شعله از پشته‌های فشرده‌شده::" + +msgid "" +"python -m profiling.sampling run --collapsed script.py > stacks.txt\n" +"flamegraph.pl stacks.txt > profile.svg" +msgstr "" +"python -m profiling.sampling run --collapsed script.py > stacks.txt\n" +"flamegraph.pl stacks.txt > profile.svg" + +msgid "The resulting SVG can be viewed in any web browser and provides an interactive visualization where you can click to zoom into specific call paths." +msgstr "پرونده‌ی SVG حاصل را می‌توان در هر مرورگر وبی مشاهده کرد و نمایشی تعاملی ارائه می‌دهد که در آن می‌توانید برای بزرگ‌نمایی روی مسیرهای فراخوانی خاص کلیک کنید." + +msgid "Flame graph format" +msgstr "قالب نمودار شعله" + +msgid "Flame graph format (:option:`--flamegraph`) produces a self-contained HTML file with an interactive flame graph visualization::" +msgstr "قالب نمودار شعله (:option:`--flamegraph`) یک پرونده‌ی HTML خودمحور با یک نمایشگر نمودار شعله‌ی تعاملی تولید می‌کند::" + +msgid "" +"python -m profiling.sampling run --flamegraph script.py\n" +"python -m profiling.sampling run --flamegraph -o profile.html script.py" +msgstr "" +"python -m profiling.sampling run --flamegraph script.py\n" +"python -m profiling.sampling run --flamegraph -o profile.html script.py" + +msgid "Tachyon interactive flame graph" +msgstr "نمودار شعله‌ی تعاملی Tachyon" + +msgid "The flame graph visualization shows call stacks as nested rectangles, with width proportional to time spent. The sidebar displays runtime statistics, GIL metrics, and hotspot functions." +msgstr "نمایش نمودار شعله، پشته‌های فراخوانی را به صورت مستطیل‌های تودرتو با عرض متناسب با زمان صرف‌شده نشان می‌دهد. نوار کناری آمار زمان اجرا، معیارهای GIL و توابع داغ (hotspot) را نمایش می‌دهد." + +msgid "`Try the interactive example <../_static/tachyon-example-flamegraph.html>`__!" +msgstr "`Try the interactive example <../_static/tachyon-example-flamegraph.html>`__!" + +msgid "If no output file is specified, the profiler generates a filename based on the process ID (for example, ``flamegraph.12345.html``)." +msgstr "اگر هیچ پرونده‌ی خروجی‌ای مشخص نشده باشد، پروفایل‌گیر نام پرونده‌ای را بر اساس شناسه‌ی فرایند تولید می‌کند (برای مثال، ``flamegraph.12345.html``)." + +msgid "The generated HTML file requires no external dependencies and can be opened directly in a web browser. The visualization displays call stacks as nested rectangles, with width proportional to time spent. Hovering over a rectangle shows details about that function including source code context, and clicking zooms into that portion of the call tree." +msgstr "پرونده‌ی تولیدشده‌ی HTML نیازی به وابستگی‌های خارجی ندارد و می‌توانید آن را مستقیماً در یک مرورگر وب باز کنید. این تصویرسازی پشته‌های فراخوانی را به شکل مستطیل‌های تو در تو نمایش می‌دهد که عرض آن‌ها متناسب با زمان صرف‌شده است. نگه داشتن ماوس روی یک مستطیل جزئیاتی درباره‌ی آن تابع از جمله زمینه‌ی کد منبع را نشان می‌دهد و با کلیک کردن روی آن می‌توانید روی آن بخش از درخت فراخوانی زوم کنید." + +msgid "The flame graph interface includes:" +msgstr "رابط نمودار شعله شامل موارد زیر است:" + +msgid "A sidebar showing profile summary, thread statistics, sampling efficiency metrics (see :ref:`sampling-efficiency`), and top hotspot functions" +msgstr "یک نوار کناری که خلاصه‌ی پروفایل، آمار نخ‌ها، معیارهای بهره‌وری نمونه‌برداری (نگاه کنید به :ref:`sampling-efficiency`) و توابع داغ برتر را نشان می‌دهد" + +msgid "Search functionality supporting both function name matching and ``file.py:42`` line patterns" +msgstr "قابلیت جستجو که هم از تطبیق نام تابع و هم از الگوهای سطری ``file.py:42`` پشتیبانی می‌کند" + +msgid "Per-thread filtering via dropdown" +msgstr "پالایش به ازای هر نخ از طریق منوی کشویی" + +msgid "Dark/light theme toggle (preference saved across sessions)" +msgstr "کلید تغییر تم تاریک/روشن (تنظیمات برگزیده در سراسر نشست‌ها ذخیره می‌شود)" + +msgid "SVG export for saving the current view" +msgstr "خروجی SVG برای ذخیره‌سازی نمای فعلی" + +msgid "The thread statistics section shows runtime behavior metrics:" +msgstr "بخش آمار نخ‌ها معیارهای رفتار زمان اجرا (ران‌تایم) را نشان می‌دهد:" + +msgid "**GIL Held**: percentage of samples where a thread held the global interpreter lock (actively running Python code)" +msgstr "**GIL Held**: درصدی از نمونه‌ها که در آن‌ها یک نخ قفل مفسر سراسری (global interpreter lock) را در اختیار داشت (به‌طور فعال در حال اجرای کد پایتون بود)" + +msgid "**GIL Released**: percentage of samples where no thread held the GIL" +msgstr "**GIL Released**: درصدی از نمونه‌ها که در آن‌ها هیچ نخی GIL را در اختیار نداشت" + +msgid "**Waiting GIL**: percentage of samples where a thread was waiting to acquire the GIL" +msgstr "**Waiting GIL**: درصدی از نمونه‌ها که در آن‌ها یک نخ در انتظار به‌دست آوردن GIL بود" + +msgid "**GC**: percentage of samples during garbage collection" +msgstr "**GC**: درصدی از نمونه‌ها در طول فرآیند زباله‌روبی" + +msgid "These statistics help identify GIL contention and understand how time is distributed between Python execution, native code, and waiting." +msgstr "این آمار کمک می‌کند تا رقابت بر سر GIL را شناسایی کنید و بفهمید زمان چگونه بین اجرای پایتون، کد بومی (native) و انتظار توزیع می‌شود." + +msgid "Flame graphs are particularly effective for identifying deep call stacks and understanding the hierarchical structure of time consumption. Wide rectangles at the top indicate functions that consume significant time either directly or through their callees." +msgstr "نمودارهای شعله‌ای به‌ویژه برای شناسایی پشته‌های فراخوانی عمیق و درک ساختار سلسله‌مراتب مصرف زمان مؤثر هستند. مستطیل‌های پهن در بالا توابعی را نشان می‌دهند که زمان قابل‌توجهی را به‌طور مستقیم یا از طریق توابع فراخوانده‌شده‌ی خود مصرف می‌کنند." + +msgid "Differential flame graphs" +msgstr "نمودارهای شعله‌ای تفاضلی" + +msgid "Differential flame graphs compare two profiling runs to highlight where performance changed. This helps identify regressions introduced by code changes and validate that optimizations achieved their intended effect::" +msgstr "نمودارهای شعله‌ای تفاضلی دو اجرای پروفایل‌گیری را مقایسه می‌کنند تا مشخص شود کارایی کجا تغییر کرده است. این کار به شناسایی رگرسیون‌های ایجادشده توسط تغییرات کد و تأیید اینکه بهینه‌سازی‌ها به اثر مورد نظر خود رسیده‌اند کمک می‌کند::" + +msgid "" +"# Capture baseline profile\n" +"python -m profiling.sampling run --binary -o baseline.bin script.py\n" +"\n" +"# After modifying code, generate differential flamegraph\n" +"python -m profiling.sampling run --diff-flamegraph baseline.bin -o diff.html script.py" +msgstr "" +"# Capture baseline profile\n" +"python -m profiling.sampling run --binary -o baseline.bin script.py\n" +"\n" +"# After modifying code, generate differential flamegraph\n" +"python -m profiling.sampling run --diff-flamegraph baseline.bin -o diff.html script.py" + +msgid "The visualization draws the current profile with frame widths showing current time consumption, then applies color to indicate how each function changed relative to the baseline." +msgstr "این تجسم‌سازی، پروفایل فعلی را با عرض قاب‌ها که مصرف زمان فعلی را نشان می‌دهند رسم می‌کند، سپس رنگی را اعمال می‌کند تا نشان دهد هر تابع نسبت به مبنا چگونه تغییر کرده است." + +msgid "**Color coding**:" +msgstr "**کدگذاری رنگی**:" + +msgid "**Red**: Functions consuming more time (regressions). Lighter shades indicate modest increases, while darker shades show severe regressions." +msgstr "**قرمز**: توابعی که زمان بیشتری مصرف می‌کنند (رگرسیون‌ها). سایه‌های روشن‌تر نشان‌دهنده‌ی افزایش‌های جزئی هستند، در حالی که سایه‌های تیره رگرسیون‌های شدید را نشان می‌دهند." + +msgid "**Blue**: Functions consuming less time (improvements). Lighter shades for modest reductions, darker shades for significant speedups." +msgstr "**آبی**: توابعی که زمان کمتری مصرف می‌کنند (بهبودها). سایه‌های روشن‌تر برای کاهش‌های جزئی و سایه‌های تیره‌تر برای افزایش سرعت‌های قابل‌توجه." + +msgid "**Gray**: Minimal or no change." +msgstr "**خاکستری**: تغییر حداقلی یا بدون تغییر." + +msgid "**Purple**: New functions not present in the baseline." +msgstr "**بنفش**: توابع جدیدی که در خط مبنا وجود ندارند." + +msgid "Frame colors indicate changes in **direct time** (time when the function was at the top of the stack, actively executing), not cumulative time including callees. Hovering over a frame shows comparison details including baseline time, current time, and the percentage change." +msgstr "**رنگ‌های قاب** تغییرات در **زمان مستقیم** (زمانی که تابع در بالای پشته بوده و به‌طور فعال اجرا می‌شده) را نشان می‌دهند، نه زمان تجمعی شامل توابع فراخوانی‌شده. قرار دادن نشانگر ماوس روی یک قاب، جزئیات مقایسه شامل زمان خط مبنا، زمان فعلی و درصد تغییر را نمایش می‌دهد." + +msgid "Some call paths may disappear entirely between profiles. These are called **elided stacks** and occur when optimizations eliminate code paths or certain branches stop executing. If elided stacks are present, an elided toggle appears allowing you to switch between the main differential view and an elided-only view that shows just the removed paths (colored purple)." +msgstr "**برخی مسیرهای فراخوانی ممکن است به‌طور کامل بین پروفایل‌ها ناپدید شوند. این موارد پشته‌های حذف‌شده (**elided stacks**) نامیده می‌شوند و زمانی رخ می‌دهند که بهینه‌سازی‌ها مسیرهای کد را حذف کنند یا برخی شاخه‌ها متوقف شوند. اگر پشته‌های حذف‌شده وجود داشته باشند، یک کلید تغییر وضعیت نمایان می‌شود که به شما اجازه می‌دهد بین نمای تفاضلی اصلی و نمای مختص پشته‌های حذف‌شده (که‌ فقط مسیرهای حذف‌شده را نشان می‌دهد و به رنگ بنفش است) جابه‌جا شوید." + +msgid "Gecko format" +msgstr "قالب Gecko" + +msgid "Gecko format (:option:`--gecko`) produces JSON output compatible with the Firefox Profiler::" +msgstr "قالب Gecko (:option:`--gecko`) خروجی JSON سازگار با Firefox Profiler تولید می‌کند::" + +msgid "" +"python -m profiling.sampling run --gecko script.py\n" +"python -m profiling.sampling run --gecko -o profile.json script.py" +msgstr "" +"python -m profiling.sampling run --gecko script.py\n" +"python -m profiling.sampling run --gecko -o profile.json script.py" + +msgid "The `Firefox Profiler `__ is a sophisticated web-based tool originally built for profiling Firefox itself. It provides features beyond basic flame graphs, including a timeline view, call tree exploration, and marker visualization. See the `Firefox Profiler documentation `__ for detailed usage instructions." +msgstr "ابزار `Firefox Profiler `__ یک ابزار مبتنی بر وب پیشرفته است که در اصل برای پروفایل‌گیری از خود فایرفاکس ساخته شده است. این ابزار ویژگی فراتر از نمودارهای شعله‌ی ساده، از جمله نمای زمان‌بندی، کاوش درخت فراخوانی و تجسم نشانگرها را فراهم می‌کند. برای دستورالعمل‌های استفاده‌ی تفصیلی، به `مستندات Firefox Profiler `__ مراجعه کنید." + +msgid "To use the output, open the Firefox Profiler in your browser and load the JSON file. The profiler runs entirely client-side, so your profiling data never leaves your machine." +msgstr "برای استفاده از خروجی، Firefox Profiler را در مرورگر خود باز کرده و پرونده‌ی JSON را بارگذاری کنید. پروفایل‌گیر به‌طور کامل در سمت کلاینت اجرا می‌شود، بنابراین داده‌های پروفایل‌گیری شما هرگز از دستگاه شما خارج نمی‌شوند." + +msgid "Gecko format automatically collects additional metadata about GIL state and CPU activity, enabling analysis features specific to Python's threading model. The profiler emits interval markers that appear as colored bands in the Firefox Profiler timeline:" +msgstr "قالب Gecko به‌طور خودکار فراداده‌ی اضافی درباره‌ی وضعیت GIL و فعالیت CPU جمع‌آوری می‌کند و ویژگی‌های تحلیلی مخصوص مدل نخ‌کشی پایتون را فعال می‌سازد. پروفایل‌گیر نشانگرهای بازه‌ای تولید می‌کند که به صورت نوارهای رنگی در زمان‌بندی Firefox Profiler ظاهر می‌شوند:" + +msgid "**GIL markers**: show when threads hold or release the global interpreter lock" +msgstr "**نشانگرهای GIL**: نشان می‌دهند که چه زمانی نخ‌ها قفل مفسر سراسری را نگه داشته یا آزاد می‌کنند" + +msgid "**CPU markers**: show when threads are executing on CPU versus idle" +msgstr "**نشانگرهای CPU**: نشان می‌دهند که نخ‌ها چه زمانی روی CPU در حال اجرا هستند در مقایسه با زمانی که بیکارند" + +msgid "**Code type markers**: distinguish Python code from native (C extension) code" +msgstr "**نشانگرهای نوع کد**: کد پایتون را از کد بومی (افزونه‌ی C) متمایز می‌کنند" + +msgid "**GC markers**: indicate garbage collection activity" +msgstr "**نشانگرهای GC**: فعالیت زباله‌روبی را نشان می‌دهند" + +msgid "For this reason, the :option:`--mode` option is not available with Gecko format; all relevant data is captured automatically." +msgstr "به همین دلیل، گزینه‌ی :option:`--mode` با قالب Gecko در دسترس نیست؛ تمام داده‌های مربوط به‌طور خودکار ثبت می‌شوند." + +msgid "Firefox Profiler Call Tree view" +msgstr "نمای درخت فراخوانی Firefox Profiler" + +msgid "The Call Tree view shows the complete call hierarchy with sample counts and percentages. The sidebar displays detailed statistics for the selected function including running time and sample distribution." +msgstr "نمای درخت فراخوانی (Call Tree) سلسله‌مراتب کامل فراخوانی را به همراه تعداد نمونه‌ها و درصدها نمایش می‌دهد. نوار کناری آمار تفصیلی تابع انتخاب‌شده شامل زمان اجرا و توزیع نمونه را نمایش می‌دهد." + +msgid "Firefox Profiler Flame Graph view" +msgstr "نمای نمودار شعله‌ی پروفایل‌گیر فایرفاکس" + +msgid "The Flame Graph visualization shows call stacks as nested rectangles. Functions names are visible in the call hierarchy." +msgstr "تصویرسازی نمودار شعله، پشته‌های فراخوانی را به شکل مستطیل‌های تو در تو نشان می‌دهد. نام تابع‌ها در سلسله‌مراتب فراخوانی قابل‌مشاهده است." + +msgid "Firefox Profiler Marker Chart with opcodes" +msgstr "نمودار نشانگر پروفایل‌گیر فایرفاکس با آپ‌کدها" + +msgid "The Marker Chart displays interval markers including CPU state, GIL status, and opcodes. With ``--opcodes`` enabled, bytecode instructions like ``BINARY_OP_ADD_FLOAT``, ``CALL_PY_EXACT_ARGS``, and ``CALL_LIST_APPEND`` appear as markers showing execution over time." +msgstr "نمودار نشانگر، نشانگرهای بازه‌ای شامل وضعیت پردازنده، وضعیت GIL و آپ‌کدها را نمایش می‌دهد. با فعال‌سازی ``--opcodes``، دستورالعمل‌های بایت‌کد مانند ``BINARY_OP_ADD_FLOAT``، ``CALL_PY_EXACT_ARGS`` و ``CALL_LIST_APPEND`` به عنوان نشانگرهایی ظاهر می‌شوند که اجرا را در طول زمان نشان می‌دهند." + +msgid "Heatmap format" +msgstr "قالب نقشه حرارتی" + +msgid "Heatmap format (:option:`--heatmap`) generates an interactive HTML visualization showing sample counts at the source line level::" +msgstr "قالب نقشه حرارتی (:option:`--heatmap`) یک تصویرسازی تعاملی HTML تولید می‌کند که تعداد نمونه‌ها را در سطح سطر منبع نشان می‌دهد::" + +msgid "" +"python -m profiling.sampling run --heatmap script.py\n" +"python -m profiling.sampling run --heatmap -o my_heatmap script.py" +msgstr "" +"python -m profiling.sampling run --heatmap script.py\n" +"python -m profiling.sampling run --heatmap -o my_heatmap script.py" + +msgid "Tachyon heatmap visualization" +msgstr "تصویرسازی نقشه حرارتی Tachyon" + +msgid "The heatmap overlays sample counts directly on your source code. Lines are color-coded from cool (few samples) to hot (many samples). Navigation buttons (▲▼) let you jump between callers and callees." +msgstr "نقشه حرارتی، تعداد نمونه‌ها را مستقیماً روی کد منبع شما پوشش می‌دهد. سطرها از سرد (نمونه‌های کم) تا گرم (نمونه‌های زیاد) با رنگ مشخص شده‌اند. دکمه‌های ناوبری (▲▼) به شما اجازه می‌دهند بین فراخواننده‌ها و فراخوانده‌شده‌ها جابه‌جا شوید." + +msgid "Unlike other formats that produce a single file, heatmap output creates a directory containing HTML files for each profiled source file. If no output path is specified, the directory is named ``heatmap_PID``." +msgstr "برخلاف سایر قالب‌ها که یک پرونده‌ی واحد تولید می‌کنند، خروجی نقشه حرارتی پوشه‌ای حاوی پرونده‌های HTML برای هر پرونده‌ی منبع پروفایل‌شده ایجاد می‌کند. اگر هیچ مسری برای خروجی مشخص نشود، نام پوشه ``heatmap_PID`` خواهد بود." + +msgid "The heatmap visualization displays your source code with a color gradient indicating how many samples were collected at each line. Hot lines (many samples) appear in warm colors, while cold lines (few or no samples) appear in cool colors. This view helps pinpoint exactly which lines of code are responsible for time consumption." +msgstr "تصویرسازی نقشه حرارتی، کد منبع شما را با یک طیف رنگی نمایش می‌دهد که نشان می‌دهد چه تعداد نمونه در هر سطر جمع‌آوری شده است. سطرهای گرم (نمونه‌های زیاد) با رنگ‌های گرم و سطرهای سرد (نمونه‌های کم یا بدون نمونه) با رنگ‌های سرد ظاهر می‌شوند. این نما کمک می‌کند دقیقاً مشخص کنید کدام سطرهای کد مسئول مصرف زمان هستند." + +msgid "The heatmap interface provides several interactive features:" +msgstr "رابط نقشه حرارتی چندین ویژگی تعاملی را فراهم می‌کند:" + +msgid "**Coloring modes**: toggle between \"Self Time\" (direct execution) and \"Total Time\" (cumulative, including time in called functions)" +msgstr "**حالت‌های رنگ‌آمیزی**: جابه‌جایی بین «زمان خودی» (اجرای مستقیم) و «زمان کل» (تجمعی، شامل زمان صرف‌شده در تابع‌های فراخوانده‌شده)" + +msgid "**Cold code filtering**: show all lines or only lines with samples" +msgstr "**پالایش کد سرد**: نمایش تمام سطرها یا فقط سطرهای دارای نمونه" + +msgid "**Call graph navigation**: each line shows navigation buttons (▲ for callers, ▼ for callees) that let you trace execution paths through your code. When multiple functions called or were called from a line, a menu appears showing all options with their sample counts." +msgstr "**ناوبری گراف فراخوانی**: هر سطر دکمه‌های ناوبری (▲ برای فراخواننده‌ها، ▼ برای فراخوانده‌شده‌ها) را نشان می‌دهد که به شما امکان می‌دهند مسیرهای اجرا را در کد خود ردگیری کنید. هنگامی که چندین تابع از یک سطر فراخوانی شده باشند یا از آن فراخوانی کرده باشند، منویی ظاهر می‌شود که تمام گزینه‌ها را به همراه تعداد نمونه‌هایشان نشان می‌دهد." + +msgid "**Scroll minimap**: a vertical overview showing the heat distribution across the entire file" +msgstr "**مینی‌مپ پیمایش**: یک نمای کلی عمودی که توزیع حرارت را در کل پرونده نشان می‌دهد" + +msgid "**Hierarchical index**: files organized by type (stdlib, site-packages, project) with aggregate sample counts per folder" +msgstr "**فهرست سلسله‌مراتب**: پرونده‌ها بر اساس نوع (کتابخانه استاندارد، بسته‌های سایت، پروژه) با تعداد نمونه‌های تجمیعی در هر پوشه سازماندهی شده‌اند" + +msgid "**Dark/light theme**: toggle with preference saved across sessions" +msgstr "**تم تاریک/روشن**: جابه‌جایی با تنظیماتی که در طول نشست‌ها ذخیره می‌شود" + +msgid "**Line linking**: click line numbers to create shareable URLs" +msgstr "**پیوند دادن به سطر**: برای ایجاد نشانی‌های وب قابل اشتراک‌گذاری، روی شماره‌های سطر کلیک کنید" + +msgid "When opcode-level profiling is enabled with :option:`--opcodes`, each hot line can be expanded to show which bytecode instructions consumed time:" +msgstr "هنگامی که پروفایل‌گیری در سطح آپ‌کد با :option:`--opcodes` فعال باشد، می‌توان هر سطر گرم را گسترش داد تا مشخص شود کدام دستورالعمل‌های بایت‌کد زمان مصرف کرده‌اند:" + +msgid "Heatmap with expanded bytecode panel" +msgstr "نقشه‌ی حرارتی با تابلوی بایت‌کد گسترش‌یافته" + +msgid "Expanding a hot line reveals the bytecode instructions executed, including specialized variants. The panel shows sample counts per instruction and the overall specialization percentage for the line." +msgstr "گسترش دادن یک سطر داغ، دستورات بایت‌کد اجراشده، از جمله گونه‌های تخصصی‌شده را آشکار می‌کند. این تابلو تعداد نمونه‌ها به ازای هر دستور و درصد کلی تخصصی‌سازی را برای آن سطر نشان می‌دهد." + +msgid "`Try the interactive example <../_static/tachyon-example-heatmap.html>`__!" +msgstr "`نمونه‌ی تعاملی را امتحان کنید <../_static/tachyon-example-heatmap.html>`__!" + +msgid "Heatmaps are especially useful when you know which file contains a performance issue but need to identify the specific lines. Many developers prefer this format because it maps directly to their source code, making it easy to read and navigate. For smaller scripts and focused analysis, heatmaps provide an intuitive view that shows exactly where time is spent without requiring interpretation of hierarchical visualizations." +msgstr "نقشه‌های حرارتی زمانی بسیار مفید هستند که بدانید کدام پرونده حاوی یک مشکل عملکردی است اما نیاز دارید سطر‌های خاص را شناسایی کنید. بسیاری از توسعه‌دهندگان این قالب را ترجیح می‌دهند زیرا مستقیماً به کد منبع آن‌ها نگاشت می‌شود و خواندن و جابه‌جایی در آن را آسان می‌کند. برای اسکریپت‌های کوچک‌تر و تحلیل‌های متمرکز، نقشه‌های حرارتی نمای بصری شهودی را فراهم می‌کنند که دقیقاً نشان می‌دهد زمان در کجا صرف شده است، بدون اینکه نیازی به تفسیر تجسم‌های سلسله‌مراتبی باشد." + +msgid "Binary format" +msgstr "قالب دودویی" + +msgid "Binary format (:option:`--binary`) produces a compact binary file for efficient storage of profiling data::" +msgstr "قالب دودویی (:option:`--binary`) یک پرونده دودویی فشرده را برای ذخیره‌سازی کارآمد داده‌های پروفایل‌گیری تولید می‌کند:" + +msgid "" +"python -m profiling.sampling run --binary -o profile.bin script.py\n" +"python -m profiling.sampling attach --binary -o profile.bin 12345" +msgstr "" +"python -m profiling.sampling run --binary -o profile.bin script.py\n" +"python -m profiling.sampling attach --binary -o profile.bin 12345" + +msgid "The :option:`--compression` option controls data compression:" +msgstr "گزینه‌ی :option:`--compression` فشرده‌سازی داده‌ها را کنترل می‌کند:" + +msgid "``auto`` (default): Use zstd compression if available, otherwise no compression" +msgstr "``auto`` (پیش‌فرض): در صورت امکان از فشرده‌سازی zstd استفاده کنید، در غیراین‌صورت هیچ فشرده‌سازی انجام ندهید" + +msgid "``zstd``: Force zstd compression (requires :mod:`compression.zstd` support)" +msgstr "``zstd``: فشرده‌سازی zstd را اعمال کنید (نیازمند پشتیبانی :mod:`compression.zstd` است)" + +msgid "``none``: Disable compression" +msgstr "``none``: فشرده‌سازی را غیرفعال کنید" + +msgid "python -m profiling.sampling run --binary --compression=zstd -o profile.bin script.py" +msgstr "python -m profiling.sampling run --binary --compression=zstd -o profile.bin script.py" + +msgid "To analyze binary profiles, use the :ref:`replay-command` to convert them to other formats like flame graphs or pstats output." +msgstr "برای تحلیل پروفایل‌های دودویی، از :ref:`replay-command` استفاده کنید تا آن‌ها را به قالب‌های دیگری مانند نمودارهای شعله یا خروجی pstats تبدیل کنید." + +msgid "Record and replay workflow" +msgstr "گردش کار ضبط و پخش مجدد" + +msgid "The binary format combined with the replay command enables a record-and-replay workflow that separates data capture from analysis. Rather than generating visualizations during profiling, you capture raw data to a compact binary file and convert it to different formats later." +msgstr "قالب دودویی در ترکیب با دستور پخش مجدد، یک گردش کار ضبط و پخش مجدد را فراهم می‌کند که ضبط داده‌ها را از تحلیل جدا می‌کند. به‌جای تولید تجسم‌ها در طول پروفایل‌گیری، داده‌های خام را در یک پرونده دودویی فشرده ضبط می‌کنید و بعدها آن‌ها را به قالب‌های مختلف تبدیل می‌کنید." + +msgid "This approach has three main benefits:" +msgstr "این رویکرد سه مزیت اصلی دارد:" + +msgid "Sampling runs faster because the work of building data structures for visualization is deferred until replay." +msgstr "اجرای نمونه‌برداری سریع‌تر انجام می‌شود زیرا کار ساخت ساختارهای داده برای تجسم تا زمان پخش مجدد به تأخیر می‌افتد." + +msgid "A single binary capture can be converted to multiple output formats without re-profiling: pstats for a quick overview, flame graph for visual exploration, heatmap for line-level detail." +msgstr "یک ضبط دودویی واحد را می‌توان بدون پروفایل‌گیری مجدد به چندین قالب خروجی تبدیل کرد: pstats برای مرور سریع، نمودار شعله برای کاوش بصری، و نقشه‌ی حرارتی برای جزئیات در سطح سطر." + +msgid "Binary files are compact and easy to share with colleagues who can convert them to their preferred format." +msgstr "پرونده‌های دودویی فشرده هستند و اشتراک‌گذاری آن‌ها با همکارانی که می‌توانند آن‌ها را به قالب دلخواه خود تبدیل کنند، آسان است." + +msgid "A typical workflow::" +msgstr "یک گردش کار معمولی::" + +msgid "" +"# Capture profile in production or during tests\n" +"python -m profiling.sampling attach --binary -o profile.bin 12345\n" +"\n" +"# Later, analyze with different formats\n" +"python -m profiling.sampling replay profile.bin\n" +"python -m profiling.sampling replay --flamegraph -o profile.html profile.bin\n" +"python -m profiling.sampling replay --heatmap -o heatmap profile.bin" +msgstr "" +"# Capture profile in production or during tests\n" +"python -m profiling.sampling attach --binary -o profile.bin 12345\n" +"\n" +"# Later, analyze with different formats\n" +"python -m profiling.sampling replay profile.bin\n" +"python -m profiling.sampling replay --flamegraph -o profile.html profile.bin\n" +"python -m profiling.sampling replay --heatmap -o heatmap profile.bin" + +msgid "Live mode" +msgstr "حالت زنده" + +msgid "Live mode (:option:`--live`) provides a terminal-based real-time view of profiling data, similar to the ``top`` command for system processes::" +msgstr "حالت زنده (:option:`--live`) یک نمای مبتنی بر پایانه و بلادرنگ از داده‌های پروفایل‌گیری فراهم می‌کند که مشابه دستور ``top`` برای فرایندهای سیستم است::" + +msgid "" +"python -m profiling.sampling run --live script.py\n" +"python -m profiling.sampling attach --live 12345" +msgstr "" +"python -m profiling.sampling run --live script.py\n" +"python -m profiling.sampling attach --live 12345" + +msgid "Tachyon live mode showing all threads" +msgstr "حالت زنده‌ی Tachyon که تمام نخ‌ها را نشان می‌دهد" + +msgid "Live mode displays real-time profiling statistics, showing combined data from multiple threads in a multi-threaded application." +msgstr "حالت زنده آمار پروفایل‌گیری بلادرنگ را نمایش می‌دهد و داده‌های ترکیبی چندین نخ را در یک برنامه‌ی چندنخی نشان می‌دهد." + +msgid "The display updates continuously as new samples arrive, showing the current hottest functions. This mode requires the :mod:`curses` module, which is available on Unix-like systems but not on Windows. The terminal must be at least 60 columns wide and 12 lines tall; larger terminals display more columns." +msgstr "با رسیدن نمونه‌های جدید، نمایشگر به‌طور مداوم به‌روزرسانی می‌شود و داغ‌ترین عملکردهای فعلی را نشان می‌دهد. این حالت به ماژول :mod:`curses` نیاز دارد که در سیستم‌های یونیکس‌مانند در دسترس است اما در ویندوز خیر. پایانه باید حداقل ۶۰ ستون عرض و ۱۲ سطر ارتفاع داشته باشد؛ پایانه‌های بزرگ‌تر ستون‌های بیشتری را نمایش می‌دهند." + +msgid "The header displays the top 3 hottest functions, sampling efficiency metrics, and thread status statistics (GIL held percentage, CPU usage, GC time). The main table shows function statistics with the currently sorted column indicated by an arrow (▼)." +msgstr "سرآیند ۳ تابع داغ‌تر اول، معیارهای بهره‌وری نمونه‌برداری و آمارهای وضعیت نخ (درصد نگهداری GIL، میزان استفاده از CPU، زمان GC) را نمایش می‌دهد. جدول اصلی آمار تابع را نشان می‌دهد که ستون در حال حاضر مرتب‌شده با یک پیکان (▼) مشخص شده است." + +msgid "When :option:`--opcodes` is enabled, an additional opcode panel appears below the main table, showing instruction-level statistics for the currently selected function. This panel displays which bytecode instructions are executing most frequently, including specialized variants and their base opcodes." +msgstr "هنگامی که :option:`--opcodes` فعال است، یک تابلوی آپ‌کد اضافی در زیر جدول اصلی ظاهر می‌شود که آمار در سطح دستور را برای تابع انتخاب‌شده‌ی فعلی نشان می‌دهد. این تابلو نشان می‌دهد که کدام دستورات بایت‌کد با بسامد بیشتری در حال اجرا هستند، از جمله انواع تخصصی و آپ‌کدهای پایه‌ی آن‌ها." + +msgid "Tachyon live mode with opcode panel" +msgstr "حالت زنده‌ی Tachyon با تابلوی آپ‌کد" + +msgid "Live mode with ``--opcodes`` enabled shows an opcode panel with a bytecode instruction breakdown for the selected function." +msgstr "حالت زنده با گزینه‌ی ``--opcodes`` فعال، یک تابلوی آپ‌کد همراه با تفکیک دستورات بایت‌کد برای تابع انتخاب‌شده نمایش می‌دهد." + +msgid "Keyboard commands" +msgstr "دستورات صفحه‌کلید" + +msgid "Within live mode, keyboard commands control the display:" +msgstr "در داخل حالت زنده، دستورات صفحه‌کلید نمایش را کنترل می‌کنند:" + +msgid ":kbd:`q`" +msgstr ":kbd:`q`" + +msgid "Quit the profiler and return to the shell." +msgstr "خروج از پروفایل‌گیر و بازگشت به پوسته." + +msgid ":kbd:`s` / :kbd:`S`" +msgstr ":kbd:`s` / :kbd:`S`" + +msgid "Cycle through sort orders forward/backward (sample count, percentage, total time, cumulative percentage, cumulative time)." +msgstr "چرخش بین ترتیب‌های مرتب‌سازی به جلو/عقب (تعداد نمونه، درصد، کل زمان، درصد تجمعی، زمان تجمعی)." + +msgid ":kbd:`p`" +msgstr ":kbd:`p`" + +msgid "Pause or resume display updates. Sampling continues in the background while the display is paused, so you can freeze the view to examine results without stopping data collection." +msgstr "مکث یا ازسرگیری به‌روزرسانی‌های نمایشگر. نمونه‌برداری در پس‌زمینه در حالی که نمایشگر متوقف است ادامه می‌یابد، بنابراین می‌توانید نما را فریز کنید تا نتایج را بدون متوقف کردن جمع‌آوری داده‌ها بررسی کنید." + +msgid ":kbd:`r`" +msgstr ":kbd:`r`" + +msgid "Reset all statistics and start fresh. This is disabled after profiling finishes to prevent accidental data loss." +msgstr "تمام آمارها را بازنشانی کرده و از نو شروع کنید. این قابلیت پس از اتمام پروفایل‌گیری غیرفعال می‌شود تا از از دست رفتن تصادفی داده‌ها جلوگیری شود." + +msgid ":kbd:`/`" +msgstr ":kbd:`/`" + +msgid "Enter filter mode to search for functions by name. The filter uses case-insensitive substring matching against the filename and function name. Type a pattern and press Enter to apply, or Escape to cancel. Glob patterns and regular expressions are not supported." +msgstr "وارد حالت فیلتر شوید تا توابع را بر اساس نام جستجو کنید. این فیلتر برای تطبیق زیررشته‌ها در نام پرونده و نام تابع به بزرگی و کوچکی حروف حساس نیست. یک الگو تایپ کنید و برای اعمال آن کلید Enter و برای انصراف کلید Escape را فشار دهید. الگوهای گلاب (Glob) و عبارت‌های باقاعده پشتیبانی نمی‌شوند." + +msgid ":kbd:`c`" +msgstr ":kbd:`c`" + +msgid "Clear the current filter and show all functions again." +msgstr "فیلتر فعلی را پاک کرده و دوباره تمام توابع را نمایش دهید." + +msgid ":kbd:`t`" +msgstr ":kbd:`t`" + +msgid "Toggle between viewing all threads combined or per-thread statistics. In per-thread mode, a thread counter (for example, ``1/4``) appears showing your position among the available threads." +msgstr "بین مشاهده‌ی تمام نخ‌ها به صورت ترکیبی یا آمار به ازای هر نخ جابه‌جا شوید. در حالت به ازای هر نخ، یک شمارنده‌ی نخ (برای مثال، ``1/4``) ظاهر می‌شود که موقعیت شما را در میان نخ‌های موجود نشان می‌دهد." + +msgid ":kbd:`←` :kbd:`→` or :kbd:`↑` :kbd:`↓`" +msgstr ":kbd:`←` :kbd:`→` or :kbd:`↑` :kbd:`↓`" + +msgid "In per-thread view, navigate between threads. Navigation wraps around from the last thread to the first and vice versa." +msgstr "در نمای به ازای هر نخ، بین نخ‌ها جابه‌جا شوید. ناوبری از آخرین نخ به اولین نخ و برعکس دور می‌زند (Wrap around)." + +msgid ":kbd:`+` / :kbd:`-`" +msgstr ":kbd:`+` / :kbd:`-`" + +msgid "Increase or decrease the display refresh rate. The range is 0.05 seconds (20 Hz, very responsive) to 1.0 second (1 Hz, lower overhead). Faster refresh rates use more CPU. The default is 0.1 seconds (10 Hz)." +msgstr "نرخ تازه‌سازی نمایشگر را افزایش یا کاهش دهید. بازه‌ی مجاز از ۰/۰۵ ثانیه (۲۰ هرتز، پاسخ‌دهی بسیار سریع) تا ۱/۰ ثانیه (۱ هرتز، سربار کمتر) است. نرخ‌های تازه‌سازی سریع‌تر از CPU بیشتری استفاده می‌کنند. مقدار پیش‌فرض ۰/۱ ثانیه (۱۰ هرتز) است." + +msgid ":kbd:`x`" +msgstr ":kbd:`x`" + +msgid "Toggle trend indicators that show whether functions are becoming hotter or cooler over time. When enabled, increasing metrics appear in green and decreasing metrics appear in red, comparing each update to the previous one." +msgstr "شاخص‌های روندی را فعال یا غیرفعال کنید که نشان می‌دهند آیا توابع با گذشت زمان داغ‌تر می‌شوند یا خنک‌تر. وقتی این قابلیت فعال است، مقادیر رو به افزایش با رنگ سبز و مقادیر رو به کاهش با رنگ قرمز نمایش داده می‌شوند و هر به‌روزرسانی با به‌روزرسانی قبلی مقایسه می‌شود." + +msgid ":kbd:`h` or :kbd:`?`" +msgstr ":kbd:`h` or :kbd:`?`" + +msgid "Show the help screen with all available commands." +msgstr "صفحه‌ی راهنما را با تمام دستورات موجود نمایش دهید." + +msgid ":kbd:`j` / :kbd:`k` (or :kbd:`Up` / :kbd:`Down`)" +msgstr ":kbd:`j` / :kbd:`k` (or :kbd:`Up` / :kbd:`Down`)" + +msgid "Navigate through opcode entries in the opcode panel (when ``--opcodes`` is enabled). These keys scroll through the instruction-level statistics for the currently selected function." +msgstr "در میان ورودی‌های آپ‌کد در پنل آپ‌کد حرکت کنید (وقتی ``--opcodes`` فعال است). این کلیدها در میان آمارهای سطح دستورالعمل برای تابع انتخاب‌شده‌ی فعلی جابه‌جا می‌شوند." + +msgid "When profiling finishes (duration expires or target process exits), the display shows a \"PROFILING COMPLETE\" banner and freezes the final results. You can still navigate, sort, and filter the results before pressing :kbd:`q` to exit." +msgstr "هنگامی که پروفایل‌گیری به پایان می‌رسد (مدت زمان منقضی می‌شود یا فرایند هدف خارج می‌شود)، صفحه یک بنر با متن «PROFILING COMPLETE» نمایش می‌دهد و نتایج نهایی را متوقف می‌کند. همچنان می‌توانید پیش از فشردن کلید :kbd:`q` برای خروج، در نتایج جابه‌جا شوید، آن‌ها را مرتب کنید و فیلتر اعمال کنید." + +msgid "Live mode is incompatible with output format options (:option:`--collapsed`, :option:`--flamegraph`, and so on) because it uses an interactive terminal interface rather than producing file output." +msgstr "حالت زنده با گزینه‌های قالب خروجی (:option:`--collapsed`, :option:`--flamegraph` و غیره) سازگار نیست؛ زیرا به جای تولید خروجی پرونده، از یک رابط ترمینال تعاملی استفاده می‌کند." + +msgid "Async-aware profiling" +msgstr "پروفایل‌گیری آگاه از ناهمگامی" + +msgid "For programs using :mod:`asyncio`, the profiler offers async-aware mode (:option:`--async-aware`) that reconstructs call stacks based on the task structure rather than the raw Python frames::" +msgstr "برای برنامه‌هایی که از :mod:`asyncio` استفاده می‌کنند، پروفایل‌گیر حالت آگاه از ناهمگام (:option:`--async-aware`) را ارائه می‌دهد که پشته‌های فراخوانی را بر اساس ساختار وظیفه به‌جای فریم‌های خام پایتون بازسازی می‌کند::" + +msgid "python -m profiling.sampling run --async-aware async_script.py" +msgstr "python -m profiling.sampling run --async-aware async_script.py" + +msgid "Standard profiling of async code can be confusing because the physical call stack often shows event loop internals rather than the logical flow of your coroutines. Async-aware mode addresses this by tracking which task is running and presenting stacks that reflect the ``await`` chain." +msgstr "پروفایل‌گیری استاندارد کد ناهمگام می‌تواند گیج‌کننده باشد زیرا پشته‌ی فراخوانی فیزیکی اغلب به‌جای جریان منطقی هم‌روال‌های شما، بخش‌های داخلی حلقه رویداد را نشان می‌دهد. حالت آگاه از ناهمگام با ردیابی اینکه کدام وظیفه در حال اجرا است و ارائه پشته‌هایی که زنجیره‌ی ``await`` را منعکس می‌کنند، به این مشکل رسیدگی می‌کند." + +msgid "" +"import asyncio\n" +"\n" +"async def fetch(url):\n" +" await asyncio.sleep(0.1)\n" +" return url\n" +"\n" +"async def main():\n" +" for _ in range(50):\n" +" await asyncio.gather(fetch(\"a\"), fetch(\"b\"), fetch(\"c\"))\n" +"\n" +"if __name__ == \"__main__\":\n" +" asyncio.run(main())" +msgstr "" +"import asyncio\n" +"\n" +"async def fetch(url):\n" +" await asyncio.sleep(0.1)\n" +" return url\n" +"\n" +"async def main():\n" +" for _ in range(50):\n" +" await asyncio.gather(fetch(\"a\"), fetch(\"b\"), fetch(\"c\"))\n" +"\n" +"if __name__ == \"__main__\":\n" +" asyncio.run(main())" + +msgid "python -m profiling.sampling run --async-aware --flamegraph -o out.html script.py" +msgstr "python -m profiling.sampling run --async-aware --flamegraph -o out.html script.py" + +msgid "Async-aware profiling requires the target process to have the :mod:`asyncio` module loaded. If you profile a script before it imports asyncio, async-aware mode will not be able to capture task information." +msgstr "پروفایل‌گیری آگاه از ناهمگام مستلزم آن است که فرآیند هدف، ماژول :mod:`asyncio` را بارگذاری کرده باشد. اگر اسکریپتی را پیش از ایمپورت کردن asyncio پروفایل کنید، حالت آگاه از ناهمگام قادر نخواهد بود اطلاعات وظیفه را ثبت کند." + +msgid "Async modes" +msgstr "حالت‌های ناهمگام" + +msgid "The :option:`--async-mode` option controls which tasks appear in the profile::" +msgstr "گزینه‌ی :option:`--async-mode` کنترل می‌کند که کدام وظایف در پروفایل ظاهر شوند::" + +msgid "" +"python -m profiling.sampling run --async-aware --async-mode=running async_script.py\n" +"python -m profiling.sampling run --async-aware --async-mode=all async_script.py" +msgstr "" +"python -m profiling.sampling run --async-aware --async-mode=running async_script.py\n" +"python -m profiling.sampling run --async-aware --async-mode=all async_script.py" + +msgid "With :option:`--async-mode`\\ ``=running`` (the default), only the task currently executing on the CPU is profiled. This shows where your program is actively spending time and is the typical choice for performance analysis." +msgstr "با :option:`--async-mode`\\ ``=running`` (پیش‌فرض)، تنها وظیفه‌ای که در حال حاضر روی پردازنده اجرا می‌شود پروفایل می‌گردد. این کار نشان می‌دهد برنامه‌ی شما زمان خود را فعالانه کجا صرف می‌کند و انتخاب معمولی برای تحلیل کارایی است." + +msgid "With :option:`--async-mode`\\ ``=all``, tasks that are suspended (awaiting I/O, locks, or other tasks) are also included. This mode is useful for understanding what your program is waiting on, but produces larger profiles since every suspended task appears in each sample." +msgstr "با :option:`--async-mode`\\ ``=all``، وظایفی که معلق هستند (در انتظار ورودی/خروجی، قفل‌ها یا سایر وظایف) نیز گنجانده می‌شوند. این حالت برای درک اینکه برنامه‌ی شما منتظر چه چیزی است مفید است، اما از آنجا که هر وظیفه‌ی معلقی در هر نمونه ظاهر می‌شود، پروفایل‌های بزرگ‌تری تولید می‌کند." + +msgid "Task markers and stack reconstruction" +msgstr "نشانگرهای وظیفه و بازسازی پشته" + +msgid "In async-aware profiles, you will see ```` frames that mark boundaries between asyncio tasks. These are synthetic frames inserted by the profiler to show the task structure. The task name appears as the function name in these frames." +msgstr "در پروفایل‌های آگاه از ناهمگام، فریم‌های ```` را مشاهده خواهید کرد که مرزهای بین وظایف asyncio را مشخص می‌کنند. این‌ها فریم‌های مصنوعی هستند که توسط پروفایل‌گیر درج شده‌اند تا ساختار وظیفه را نشان دهند. نام وظیفه به عنوان نام تابع در این فریم‌ها ظاهر می‌شود." + +msgid "When a task awaits another task, the profiler reconstructs the logical call chain by following the ``await`` relationships. Only \"leaf\" tasks (tasks that no other task is currently awaiting) generate their own stack entries. Tasks being awaited by other tasks appear as part of their awaiter's stack instead." +msgstr "هنگامی که یک وظیفه منتظر وظیفه‌ی دیگری است، پروفایل‌گیر زنجیره‌ی فراخوانی منطقی را با دنبال کردن روابط ``await`` بازسازی می‌کند. تنها وظایف «برگ» (وظایفی که هیچ وظیفه‌ی دیگری در حال حاضر منتظر آن‌ها نیست) ورودی‌های پشته‌ی خود را تولید می‌کنند. وظایفی که توسط وظایف دیگر مورد انتظار هستند، به‌جای آن به عنوان بخشی از پشته‌ی انتظارکشنده (awaiter) ظاهر می‌شوند." + +msgid "If a task has multiple awaiters (a diamond pattern in the task graph), the profiler deterministically selects one parent and annotates the task marker with the number of parents, for example ``MyTask (2 parents)``. This indicates that alternate execution paths exist but are not shown in this particular stack." +msgstr "اگر یک وظیفه چندین انتظارکشنده داشته باشد (یک الگوی لوزی در گراف وظیفه)، پروفایل‌گیر به روش قطعی یک والد را انتخاب می‌کند و نشانگر وظیفه را با تعداد والدین حاشیه‌نویسی می‌کند، برای مثال ``MyTask (2 parents)``. این نشان می‌دهد که مسیرهای اجرای جایگزین وجود دارند اما در این پشته‌ی خاص نمایش دادهچ نمی‌شوند." + +msgid "Option restrictions" +msgstr "محدودیت‌های گزینه" + +msgid "Async-aware mode uses a different stack reconstruction mechanism and is incompatible with: :option:`--native`, :option:`--no-gc`, :option:`--all-threads`, and :option:`--mode`\\ ``=cpu`` or :option:`--mode`\\ ``=gil``." +msgstr "حالت آگاه از ناهمگام از مکانیسم بازسازی پشته‌ی متفاوتی استفاده می‌کند و با گزینه‌های زیر سازگار نیست: :option:`--native`، :option:`--no-gc`، :option:`--all-threads` و :option:`--mode`\\ ``=cpu`` یا :option:`--mode`\\ ``=gil``." + +msgid "Command-line interface" +msgstr "رابط خط فرمان" + +msgid "The complete command-line interface for reference." +msgstr "رابط خط فرمان کامل برای ارجاع." + +msgid "Global options" +msgstr "گزینه‌های سراسری" + +msgid "Run and profile a Python script or module." +msgstr "یک اسکریپت یا ماژول پایتون را اجرا و پروفایل‌گیری کنید." + +msgid "Attach to and profile a running process by PID." +msgstr "با استفاده از PID به یک فرایند در حال اجرا متصل شوید و آن را پروفایل‌گیری کنید." + +msgid "Print a single one-shot snapshot of a running process's Python stack." +msgstr "یک تصویر لحظه‌ای تک‌باره از پشته‌ی پایتونِ یک فرایند در حال اجرا چاپ کنید." + +msgid "Convert a binary profile file to another output format." +msgstr "یک پرونده‌ی پروفایل دودویی را به قالب خروجی دیگری تبدیل کنید." + +msgid "Dump options" +msgstr "گزینه‌های برون‌ریزی" + +msgid "The following options apply to the ``dump`` subcommand:" +msgstr "گزینه‌های زیر برای زیردستور ``dump`` اعمال می‌شوند:" + +msgid "Dump all threads in the target process instead of just the main thread." +msgstr "برون‌ریزی تمام نخ‌ها در فرایند هدف به جای فقط نخ اصلی." + +msgid "Include ```` frames for non-Python code." +msgstr "شامل کردن قاب‌های ```` برای کد غیرپایتون." + +msgid "Exclude ```` frames for active garbage collection." +msgstr "حذف کردن قاب‌های ```` برای زباله‌روبی فعال." + +msgid "Show bytecode opcode names when available." +msgstr "نمایش نام‌های آپ‌کد بایت‌کد در صورت موجود بودن." + +msgid "Reconstruct the stack across ``await`` boundaries for asyncio applications." +msgstr "بازسازی پشته در سراسر مرزهای ``await`` برای برنامه‌های asyncio." + +msgid "Async stack mode: ``running`` (only the running task) or ``all`` (all tasks including waiting). Defaults to ``all`` for ``dump``. Requires :option:`--async-aware`." +msgstr "حالت پشته‌ی ناهمگام: ``running`` (فقط وظیفه‌ی در حال اجرا) یا ``all`` (تمام وظایف از جمله در حال انتظار). پیش‌فرض برای ``dump`` مقدار ``all`` است. به :option:`--async-aware` نیاز دارد." + +msgid "Pause all threads in the target process while reading the stack." +msgstr "مکث کردن تمام نخ‌ها در فرایند هدف هنگام خواندن پشته." + +msgid "Sampling options" +msgstr "گزینه‌های نمونه‌برداری" + +msgid "Sampling rate (for example, ``10000``, ``10khz``, ``10k``). Default: ``1khz``." +msgstr "نرخ نمونه‌برداری (برای مثال، ``10000``، ``10khz``، ``10k``). پیش‌فرض: ``1khz``." + +msgid "Profiling duration in seconds. Default: run to completion." +msgstr "مدت‌زمان پروفایل‌گیری بر حسب ثانیه. پیش‌فرض: اجرا تا اتمام." + +msgid "Sample all threads, not just the main thread." +msgstr "نمونه‌برداری از تمام نخ‌ها، نه فقط نخ اصلی." + +msgid "Display sampling statistics during profiling." +msgstr "نمایش آمارهای نمونه‌برداری در طول پروفایل‌گیری." + +msgid "Exclude ```` frames for garbage collection." +msgstr "حذف کردن قاب‌های ```` برای زباله‌روبی." + +msgid "Enable async-aware profiling for asyncio programs." +msgstr "فعال‌سازی پروفایل‌گیری آگاه از ناهمگامی برای برنامه‌های asyncio." + +msgid "Gather bytecode opcode information for instruction-level profiling. Shows which bytecode instructions are executing, including specializations. Compatible with ``--live``, ``--flamegraph``, ``--heatmap``, and ``--gecko`` formats only." +msgstr "جمع‌آوری اطلاعات آپ‌کد بایت‌کد برای پروفایل‌گیری در سطح دستور. نشان می‌دهد که کدام دستورات بایت‌کد در حال اجرا هستند، از جمله تخصیص‌ها. فقط با قالب‌های ``--live``، ``--flamegraph``، ``--heatmap`` و ``--gecko`` سازگار است." + +msgid "Also profile subprocesses. Each subprocess gets its own profiler instance and output file. Incompatible with ``--live``." +msgstr "همچنین پروفایل‌گیری زیرفرایندها. هر زیرفرایند نمونه و پرونده‌ی خروجی خودش را دریافت می‌کند. با ``--live`` سازگار نیست." + +msgid "Pause the target process during each sample. This ensures consistent stack traces at the cost of slowing down the target. Use with longer intervals (1000 µs or higher) to minimize impact. See :ref:`blocking-mode` for details." +msgstr "متوقف کردن فرایند هدف در طول هر نمونه. این کار ردگیری پشته را به قیمت کند شدن هدف تضمین می‌کند. برای به حداقل رساندن تأثیر، با بازه‌های طولانی‌تر (۱۰۰۰ میکروثانیه یا بیشتر) استفاده کنید. برای جزئیات به :ref:`blocking-mode` مراجعه کنید." + +msgid "Mode options" +msgstr "گزینه‌های حالت" + +msgid "Sampling mode: ``wall`` (default), ``cpu``, ``gil``, or ``exception``. The ``cpu``, ``gil``, and ``exception`` modes are incompatible with ``--async-aware``." +msgstr "حالت نمونه‌برداری: ``wall`` (پیش‌فرض)، ``cpu``، ``gil`` یا ``exception``. حالت‌های ``cpu``، ``gil`` و ``exception`` با ``--async-aware`` سازگار نیستند." + +msgid "Async profiling mode: ``running`` (default) or ``all``. Requires ``--async-aware``." +msgstr "حالت پروفایل‌گیری ناهمگام: ``running`` (پیش‌فرض) یا ``all``. نیازمند ``--async-aware`` است." + +msgid "Output options" +msgstr "گزینه‌های خروجی" + +msgid "Generate pstats statistics. This is the default. When written to stdout, the output is a text table; with :option:`-o`, it is a binary pstats file." +msgstr "تولید آمارهای pstats. این حالت پیش‌فرض است. هنگامی که در stdout نوشته شود، خروجی یک جدول متنی است؛ با :option:`-o`، یک پرونده‌ی pstats دودویی است." + +msgid "Generate collapsed stack format for external flame graph tools." +msgstr "تولید قالب پشته‌ی فشرده‌شده برای ابزارهای نمودار شعله‌ی خارجی." + +msgid "Generate self-contained HTML flame graph." +msgstr "تولید نمودار شعله‌ی HTML مستقل." + +msgid "Generate differential flamegraph comparing to a baseline binary profile." +msgstr "تولید نمودار شعله‌ی تفاضلی در مقایسه با یک پروفایل دودویی مبنا." + +msgid "Generate Gecko JSON format for Firefox Profiler." +msgstr "تولید قالب JSON جکو (Gecko) برای پروفایل‌گیر فایرفاکس." + +msgid "Generate HTML heatmap with line-level sample counts." +msgstr "تولید نقشه‌ی حرارتی HTML با تعداد نمونه‌های در سطح سطر." + +msgid "Generate high-performance binary format for later conversion with the ``replay`` command." +msgstr "تولید قالب دودویی با کارایی بالا برای تبدیل بعدی با دستور ``replay``." + +msgid "Compression for binary format: ``auto`` (use zstd if available, default), ``zstd``, or ``none``." +msgstr "فشرده‌سازی برای قالب دودویی: ``auto`` (استفاده از zstd در صورت موجود بودن، پیش‌فرض)، ``zstd`` یا ``none``." + +msgid "Output file or directory path. Default behavior varies by format: :option:`--pstats` prints a text table to stdout, while ``-o`` writes a binary pstats file. Other formats generate a file named ``_.`` (for example, ``flamegraph_12345.html``). :option:`--heatmap` creates a directory named ``heatmap_``." +msgstr "مسیر پرونده یا پوشه‌ی خروجی. رفتار پیش‌فرض بسته به قالب متفاوت است: :option:`--pstats` یک جدول متنی را در stdout چاپ می‌کند، در حالی که ``-o`` یک پرونده‌ی pstats دودویی می‌نویسد. سایر قالب‌ها پرونده‌ای با نام ``_.`` تولید می‌کنند (برای نمونه، ``flamegraph_12345.html``). :option:`--heatmap` پوشه‌ای به نام ``heatmap_`` ایجاد می‌کند." + +msgid "Automatically open HTML output (:option:`--flamegraph` and :option:`--heatmap`) in your default web browser after generation. When profiling with :option:`--subprocesses`, only the main process opens the browser; subprocess outputs are never auto-opened." +msgstr "باز کردن خودکار خروجی HTML (:option:`--flamegraph` و :option:`--heatmap`) در مرورگر وب پیش‌فرض شما پس از تولید. هنگام پروفایل‌گیری با :option:`--subprocesses`، فقط فرایند اصلی مرورگر را باز می‌کند؛ خروجی‌های زیرفرایند هرگز به طور خودکار باز نمی‌شوند." + +msgid "pstats display options" +msgstr "گزینه‌های نمایش pstats" + +msgid "These options apply only to pstats format output." +msgstr "این گزینه‌ها فقط برای خروجی قالب pstats اعمال می‌شوند." + +msgid "Sort order: ``nsamples``, ``tottime``, ``cumtime``, ``sample-pct``, ``cumul-pct``, ``nsamples-cumul``, or ``name``. Default: ``nsamples``." +msgstr "ترتیب مرتب‌سازی: ``nsamples``، ``tottime``، ``cumtime``، ``sample-pct``، ``cumul-pct``، ``nsamples-cumul`` یا ``name``. پیش‌فرض: ``nsamples``." + +msgid "Maximum number of entries to display. Default: 15." +msgstr "حداکثر تعداد ورودی‌هایی که باید نمایش داده شوند. پیش‌فرض: ۱۵." + +msgid "Omit the Legend and Summary of Interesting Functions sections from output." +msgstr "صرف‌نظر کردن از بخش‌های راهنما و خلاصه توابع جالب از خروجی." + +msgid "Run command options" +msgstr "گزینه‌های دستور اجرا" + +msgid "Treat the target as a module name rather than a script path." +msgstr "هدف را به عنوان نام یک ماژول در نظر بگیرید، نه به عنوان مسیر یک اسکریپت." + +msgid "Start interactive terminal interface instead of batch profiling." +msgstr "شروع رابط ترمینال تعاملی به جای پروفایل‌گیری دسته‌ای." + +msgid ":mod:`profiling`" +msgstr ":mod:`profiling`" + +msgid "Overview of Python profiling tools and guidance on choosing a profiler." +msgstr "نمای کلی از ابزارهای پروفایل‌گیری پایتون و راهنمایی درباره‌ی انتخاب یک پروفایل‌گیر." + +msgid ":mod:`profiling.tracing`" +msgstr ":mod:`profiling.tracing`" + +msgid "Deterministic tracing profiler for exact call counts and timing." +msgstr "پروفایل‌گیر ردیابی قطعی برای تعداد دقیق فراخوانی‌ها و زمان‌بندی." + +msgid ":mod:`pstats`" +msgstr ":mod:`pstats`" + +msgid "Statistics analysis for profile data." +msgstr "تحلیل آماری داده‌های پروفایل." + +msgid "`Firefox Profiler `__" +msgstr "`Firefox Profiler `__" + +msgid "Web-based profiler that accepts Gecko format output. See the `documentation `__ for usage details." +msgstr "پروفایل‌گیر مبتنی بر وب که خروجی با فرمت Gecko را می‌پذیرد. برای جزئیات استفاده، `مستندات `__ را ببینید." + +msgid "`FlameGraph `__" +msgstr "`FlameGraph `__" + +msgid "Tools for generating flame graphs from collapsed stack format." +msgstr "ابزارهایی برای تولید نمودارهای شعله (flame graphs) از فرمت پشته‌ی فشرده‌شده." diff --git a/library/profiling.tracing.po b/library/profiling.tracing.po new file mode 100644 index 00000000..936421a5 --- /dev/null +++ b/library/profiling.tracing.po @@ -0,0 +1,336 @@ +# Persian translations for Python package. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# Automatically generated, 2026. +# +# Translators: +# Sepehr Rasouli , 2026 +# arman mohebali , 2026 +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 20:27+0330\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: fa\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.6\n" + +msgid ":mod:`!profiling.tracing` --- Deterministic profiler" +msgstr ":mod:`!profiling.tracing` --- پروفایل‌گیر قطعی" + +msgid "**Source code:** :source:`Lib/profiling/tracing/`" +msgstr "**کد منبع:** :source:`Lib/profiling/tracing/`" + +msgid "The :mod:`!profiling.tracing` module provides deterministic profiling of Python programs. It monitors every function call, function return, and exception event, recording precise timing for each. This approach provides exact call counts and complete visibility into program execution, making it ideal for development and testing scenarios." +msgstr "ماژول :mod:`!profiling.tracing` امکان پروفایل‌گیری قطعی از برنامه‌های پایتون را فراهم می‌کند. این ماژول هر فراخوانی تابع، بازگشت تابع و رویداد استثنا را مانیتور کرده و زمان‌بندی دقیق هر کدام را ثبت می‌کند. این رویکرد تعداد دقیق فراخوانی‌ها و دید کامل نسبت به اجرای برنامه را فراهم می‌کند که آن را برای سناریوهای توسعه و تست ایده‌آل می‌سازد." + +msgid "This module is also available as ``cProfile`` for backward compatibility. The ``cProfile`` name will continue to work in all future Python versions. Use whichever import style suits your codebase::" +msgstr "این ماژول همچنین به عنوان ``cProfile`` برای سازگاری عقبگرد در دسترس است. نام ``cProfile`` در تمام نسخه‌های آینده‌ی پایتون به کار خود ادامه خواهد داد. از هر سبک ایمپورتی که با پایگاه کُد شما سازگار است استفاده کنید::" + +msgid "" +"# Preferred (new style)\n" +"import profiling.tracing\n" +"profiling.tracing.run('my_function()')\n" +"\n" +"# Also works (backward compatible)\n" +"import cProfile\n" +"cProfile.run('my_function()')" +msgstr "" +"# Preferred (new style)\n" +"import profiling.tracing\n" +"profiling.tracing.run('my_function()')\n" +"\n" +"# Also works (backward compatible)\n" +"import cProfile\n" +"cProfile.run('my_function()')" + +msgid "What is deterministic profiling?" +msgstr "پروفایل‌گیری قطعی چیست؟" + +msgid ":dfn:`Deterministic profiling` captures every function call, function return, and exception event during program execution. The profiler measures the precise time intervals between these events, providing exact statistics about how the program behaves." +msgstr ":dfn:`پروفایل‌گیری قطعی` هر فراخوانی تابع، بازگشت تابع و رویداد استثنا را در طول اجرای برنامه ثبت می‌کند. پروفایل‌گیر فاصله‌های زمانی دقیق بین این رویدادها را اندازه‌گیری می‌کند و آمارهای دقیقی درباره‌ی نحوه‌ی رفتار برنامه ارائه می‌دهد." + +msgid "In contrast to :ref:`statistical profiling `, which samples the call stack periodically to estimate where time is spent, deterministic profiling records every event. This means you get exact call counts rather than statistical approximations. The trade-off is that instrumenting every event introduces overhead that can slow down program execution." +msgstr "برخلاف :ref:`پروفایل‌گیری آماری ` که پشته‌ی فراخوانی را به طور دوره‌ای نمونه‌برداری می‌کند تا تخمین بزند زمان صرف کجا می‌شود، پروفایل‌گیری قطعی هر رویداد را ثبت می‌کند. این یعنی به‌جای تخمین‌های آماری، تعداد فراخوانی‌های دقیقی دریافت می‌کنید. هزینه‌ی مبادله این است که ابزارگذاری روی هر رویدادی سرباری ایجاد می‌کند که می‌تواند اجرای برنام را کند کند." + +msgid "Python's interpreted nature makes deterministic profiling practical. The interpreter already dispatches events for function calls and returns, so the profiler can hook into this mechanism without requiring code modification. The overhead tends to be moderate relative to the inherent cost of interpretation, making deterministic profiling suitable for most development workflows." +msgstr "ماهیت تفسیرشده‌ی پایتون، پروفایل‌گیری قطعی را کاربردی می‌سازد. مفسر از پیش رویدادها را برای فراخوانی‌ها و بازگشت‌های تابع ارسال می‌کند، بنابراین پروفایل‌گیر می‌تواند بدون نیاز به تغییر کد، به این مکانیسم متصل شود. سربار این کار معمولاً نسبت به هزینه‌ی ذاتی تفسیر معتدل است و پروفایل‌گیری قطعی را برای بیشتر چرخه‌های کاری توسعه مناسب می‌سازد." + +msgid "Deterministic profiling helps answer questions like:" +msgstr "پروفایل‌گیری قطعی به پاسخ دادن به سوالاتی مانند موارد زیر کمک می‌کند:" + +msgid "How many times was this function called?" +msgstr "این تابع چند بار فراخوانی شده است؟" + +msgid "What is the complete call graph of my program?" +msgstr "گراف فراخوانی کامل برنامه‌ی من چیست؟" + +msgid "Which functions are called by a particular function?" +msgstr "کدام تابع‌ها توسط یک تابع خاص فراخوانی می‌شوند؟" + +msgid "Are there unexpected function calls happening?" +msgstr "آیا فراخوانی‌های تابع غیرمنتظره‌ای در حال رخ دادن است؟" + +msgid "Call count statistics can identify bugs (surprising counts) and inline expansion opportunities (high call counts). Internal time statistics reveal \"hot loops\" that warrant optimization. Cumulative time statistics help identify algorithmic inefficiencies. The handling of cumulative times in this profiler allows direct comparison of recursive and iterative implementations." +msgstr "آمارهای تعداد فراخوانی می‌توانند اشکالات (تعداد تعجب‌آور) و فرصت‌های گسترش درون‌خطی (تعداد فراخوانی بالا) را شناسایی کنند. آمارهای زمان داخلی، «حلقه‌های داغ» را آشکار می‌کنند که مستحق بهینه‌سازی هستند. آمارهای زمان تجمعی به شناسایی ناکارآمدی‌های الگوریتمی کمک می‌کنند. نحوه‌ی مدیریت زمان‌های تجمعی در این پروفایل‌گیر امکان مقایسه‌ی مستقیم پیاده‌سازی‌های بازگشتی و تکراری را فراهم می‌کند." + +msgid "Command-line interface" +msgstr "رابط خط فرمان" + +msgid "The :mod:`!profiling.tracing` module can be invoked as a script to profile another script or module:" +msgstr "ماژول :mod:`!profiling.tracing` را می‌توان به عنوان یک اسکریپت برای پروفایل‌گیری یک اسکریپت یا ماژول دیگر فراخوانی کرد:" + +msgid "python -m profiling.tracing [-o output_file] [-s sort_order] (-m module | script.py)" +msgstr "python -m profiling.tracing [-o output_file] [-s sort_order] (-m module | script.py)" + +msgid "This runs the specified script or module under the profiler and prints the results to standard output (or saves them to a file)." +msgstr "این کار اسکریپت یا ماژول مشخص‌شده را تحت پروفایل‌گیر اجرا می‌کند و نتایج را در خروجی استاندارد چاپ می‌کند (یا آن‌ها را در یک پرونده ذخیره می‌کند)." + +msgid "Write the profile results to a file instead of standard output. The output file can be read by the :mod:`pstats` module for later analysis." +msgstr "نتایج پروفایل‌گیری را به‌جای خروجی استاندارد در یک پرونده بنویسید. پرونده‌ی خروجی را می‌توان توسط ماژول :mod:`pstats` برای تحلیل‌های بعدی خواند." + +msgid "Sort the output by the specified key. This accepts any of the sort keys recognized by :meth:`pstats.Stats.sort_stats`, such as ``cumulative``, ``time``, ``calls``, or ``name``. This option only applies when :option:`-o ` is not specified." +msgstr "خروجی را بر اساس کلید مشخص‌شده مرتب کنید. این گزینه هر یک از کلیدهای مرتب‌سازی شناخته‌شده توسط :meth:`pstats.Stats.sort_stats` مانند ``cumulative``، ``time``، ``calls`` یا ``name`` را می‌پذیرد. این گزینه فقط زمانی اعمال می‌شود که :option:`-o ` مشخص نشده باشد." + +msgid "Profile a module instead of a script. The module is located using the standard import mechanism." +msgstr "یک ماژول را به‌جای یک اسکریپت پروفایل‌گیری کنید. ماژول با استفاده از مکانیسم ایمپورت استاندارد پیدا می‌شود." + +msgid "The ``-m`` option for ``cProfile``." +msgstr "گزینه‌ی ``-m`` برای ``cProfile``." + +msgid "The ``-m`` option for :mod:`profile`." +msgstr "گزینه‌ی ``-m`` برای :mod:`profile`." + +msgid "Programmatic usage examples" +msgstr "نمونه‌های استفاده‌ی برنامه‌نویسی" + +msgid "For more control over profiling, use the module's functions and classes directly." +msgstr "برای کنترل بیشتر روی پروفایل‌گیری، از توابع و کلاس‌های ماژول به‌طور مستقیم استفاده کنید." + +msgid "Basic profiling" +msgstr "پروفایل‌گیری پایه‌ای" + +msgid "The simplest approach uses the :func:`!run` function::" +msgstr "ساده‌ترین رویکرد استفاده از تابع :func:`!run` است::" + +msgid "" +"import profiling.tracing\n" +"profiling.tracing.run('my_function()')" +msgstr "" +"import profiling.tracing\n" +"profiling.tracing.run('my_function()')" + +msgid "This profiles the given code string and prints a summary to standard output. To save results for later analysis::" +msgstr "این کار رشته‌ی کد داده‌شده را پروفایل کرده و خلاصه‌ای را به خروجی استاندارد چاپ می‌کند. برای ذخیره‌ی نتایج جهت تحلیل‌های بعدی::" + +msgid "profiling.tracing.run('my_function()', 'output.prof')" +msgstr "profiling.tracing.run('my_function()', 'output.prof')" + +msgid "Using the :class:`!Profile` class" +msgstr "استفاده از کلاس :class:`!Profile`" + +msgid "The :class:`!Profile` class provides fine-grained control::" +msgstr "کلاس :class:`!Profile` کنترل دقیق‌تری را فراهم می‌کند::" + +msgid "" +"import profiling.tracing\n" +"import pstats\n" +"from io import StringIO\n" +"\n" +"pr = profiling.tracing.Profile()\n" +"pr.enable()\n" +"# ... code to profile ...\n" +"pr.disable()\n" +"\n" +"# Print results\n" +"s = StringIO()\n" +"ps = pstats.Stats(pr, stream=s).sort_stats(pstats.SortKey.CUMULATIVE)\n" +"ps.print_stats()\n" +"print(s.getvalue())" +msgstr "" +"import profiling.tracing\n" +"import pstats\n" +"from io import StringIO\n" +"\n" +"pr = profiling.tracing.Profile()\n" +"pr.enable()\n" +"# ... code to profile ...\n" +"pr.disable()\n" +"\n" +"# Print results\n" +"s = StringIO()\n" +"ps = pstats.Stats(pr, stream=s).sort_stats(pstats.SortKey.CUMULATIVE)\n" +"ps.print_stats()\n" +"print(s.getvalue())" + +msgid "The :class:`!Profile` class also works as a context manager::" +msgstr "کلاس :class:`!Profile` همچنین به عنوان یک مدیر زمینه کار می‌کند::" + +msgid "" +"import profiling.tracing\n" +"\n" +"with profiling.tracing.Profile() as pr:\n" +" # ... code to profile ...\n" +"\n" +"pr.print_stats()" +msgstr "" +"import profiling.tracing\n" +"\n" +"with profiling.tracing.Profile() as pr:\n" +" # ... code to profile ...\n" +"\n" +"pr.print_stats()" + +msgid "Module reference" +msgstr "ارجاع به ماژول" + +msgid "Profile execution of a command and print or save the results." +msgstr "اجرای یک دستور را پروفایل کرده و نتایج را چاپ یا ذخیره کنید." + +msgid "This function executes the *command* string using :func:`exec` in the ``__main__`` module's namespace::" +msgstr "این تابع رشته‌ی *command* را با استفاده از :func:`exec` در فضای نام ماژول ``__main__`` اجرا می‌کند::" + +msgid "exec(command, __main__.__dict__, __main__.__dict__)" +msgstr "exec(command, __main__.__dict__, __main__.__dict__)" + +msgid "If *filename* is not provided, the function creates a :class:`pstats.Stats` instance and prints a summary to standard output. If *filename* is provided, the raw profile data is saved to that file for later analysis with :mod:`pstats`." +msgstr "اگر *filename* فراهم نشده باشد، این تابع یک نمونه از :class:`pstats.Stats` ایجاد کرده و خلاصه‌ای را به خروجی استاندارد چاپ می‌کند. اگر *filename* فراهم شده باشد، داده‌های خام پروفایل برای تحلیل بعدی با :mod:`pstats` در آن پرونده ذخیره می‌شوند." + +msgid "The *sort* argument specifies the sort order for printed output, accepting any value recognized by :meth:`pstats.Stats.sort_stats`." +msgstr "آرگومان *sort* ترتیب مرتب‌سازی خروجی چاپ‌شده را مشخص می‌کند و هر مقداری را که توسط :meth:`pstats.Stats.sort_stats` شناخته شود، می‌پذیرد." + +msgid "Profile execution of a command with explicit namespaces." +msgstr "اجرای پروفایل یک دستور با فضاهای نام صریح." + +msgid "Like :func:`run`, but executes the command with the specified *globals* and *locals* mappings instead of using the ``__main__`` module's namespace::" +msgstr "مانند :func:`run` است، اما دستور را با نگاشت‌های *globals* و *locals* مشخص‌شده به‌جای استفاده از فضای نام ماژول ``__main__`` اجرا می‌کند::" + +msgid "exec(command, globals, locals)" +msgstr "exec(command, globals, locals)" + +msgid "A profiler object that collects execution statistics." +msgstr "یک شیء پروفایل‌گیر که آمارهای اجرای برنامه را جمع‌آوری می‌کند." + +msgid "The optional *timer* argument specifies a custom timing function. If not provided, the profiler uses a platform-appropriate default timer. When supplying a custom timer, it must return a single number representing the current time. If the timer returns integers, use *timeunit* to specify the duration of one time unit (for example, ``0.001`` for milliseconds)." +msgstr "آرگومان اختیاری *timer* یک تابع زمان‌سنج سفارشی را مشخص می‌کند. اگر ارائه نشود، پروفایل‌گیر از یک زمان‌سنج پیش‌فرض مناسب با سکو استفاده می‌کند. هنگام ارائه دادن یک زمان‌سنج سفارشی، این تابع باید یک عدد واحد که نشان‌دهنده‌ی زمان فعلی است برگرداند. اگر زمان‌سنج اعداد صحیح برمی‌گرداند، از *timeunit* برای مشخص کردن مدت‌زمان یک واحد زمانی استفاده کنید (برای مثال، ``0.001`` برای میلی‌ثانیه‌ها)." + +msgid "The *subcalls* argument controls whether the profiler tracks call relationships between functions. The *builtins* argument controls whether built-in functions are profiled." +msgstr "آرگومان *subcalls* کنترل می‌کند که آیا پروفایل‌گیر روابط فراخوانی بین تابع‌ها را ردگیری می‌کند یا خیر. آرگومان *builtins* کنترل می‌کند که آیا تابع‌های توکار پروفایل می‌شوند یا خیر." + +msgid "Added context manager support." +msgstr "پشتیبانی از مدیر زمینه اضافه شد." + +msgid "Start collecting profiling data." +msgstr "شروع جمع‌آوری داده‌های پروفایل‌گیری." + +msgid "Stop collecting profiling data." +msgstr "توقف جمع‌آوری داده‌های پروفایل‌گیری." + +msgid "Stop collecting data and record the results internally as the current profile." +msgstr "جمع‌آوری داده‌ها را متوقف کرده و نتایج را به‌طور داخلی به عنوان پروفایل فعلی ثبت کنید." + +msgid "Create a :class:`pstats.Stats` object from the current profile and print the results to standard output." +msgstr "یک شیء از :class:`pstats.Stats` از پروفایل فعلی ایجاد کنید و نتایج را در خروجی استاندارد چاپ کنید." + +msgid "The *sort* argument specifies the sorting order. It accepts a single key or a tuple of keys for multi-level sorting, using the same values as :meth:`pstats.Stats.sort_stats`." +msgstr "آرگومان *sort* ترتیب مرتب‌سازی را مشخص می‌کند. این آرگومان یک کلید واحد یا یک چندتایی از کلیدها را برای مرتب‌سازی چندسطحی می‌پذیرد و از مقادیر مشابھی با :meth:`pstats.Stats.sort_stats` استفاده می‌کند." + +msgid "Support for a tuple of sort keys." +msgstr "پشتیبانی از یک چندتایی از کلیدهای مرتب‌سازی." + +msgid "Write the current profile data to *filename*. The file can be read by :class:`pstats.Stats` for later analysis." +msgstr "داده‌های پروفایل فعلی را در *filename* بنویسید. این پرونده می‌تواند توسط :class:`pstats.Stats` برای تحلیل بعدی خوانده شود." + +msgid "Profile the command string via :func:`exec`." +msgstr "رشته‌ی دستور را از طریق :func:`exec` پروفایل کنید." + +msgid "Profile the command string via :func:`exec` with the specified namespaces." +msgstr "رشته‌ی دستور را از طریق :func:`exec` با فضاهای نام مشخص‌شده پروفایل کنید." + +msgid "Profile a function call. Returns whatever *func* returns::" +msgstr "یک فراخوانی تابع را پروفایل کنید. هر چه که *func* برمی‌گرداند را برمی‌گرداند::" + +msgid "result = pr.runcall(my_function, arg1, arg2, keyword=value)" +msgstr "result = pr.runcall(my_function, arg1, arg2, keyword=value)" + +msgid "Profiling requires that the profiled code returns normally. If the interpreter terminates (for example, via :func:`sys.exit`) during profiling, no results will be available." +msgstr "پروفایل‌گیری مستلزم این است که کد پروفایل‌شده به‌طور عادی برگردد. اگر مفسر در طول پروفایل‌گیری خاتمه یابد (برای مثال، از طریق :func:`sys.exit`)، هیچ نتیجه‌ای در دسترس نخواهد بود." + +msgid "Using a custom timer" +msgstr "استفاده از یک زمان‌سنج سفارشی" + +msgid "The :class:`Profile` class accepts a custom timing function, allowing you to measure different aspects of execution such as wall-clock time or CPU time. Pass the timing function to the constructor::" +msgstr "کلاس :class:`Profile` یک تابع زمان‌سنج سفارشی را می‌پذیرد و به شما اجازه می‌دهد جنبه‌های مختلف اجرا مانند زمان ساعت دیواری یا زمان پردازنده را اندازه‌گیری کنید. تابع زمان‌سنج را به سازنده ارسال کنید::" + +msgid "pr = profiling.tracing.Profile(my_timer_function)" +msgstr "pr = profiling.tracing.Profile(my_timer_function)" + +msgid "The timer function must return a single number representing the current time. If it returns integers, also specify *timeunit* to indicate the duration of one unit::" +msgstr "تابع زمان‌سنج باید یک عدد واحد که نشان‌دهنده‌ی زمان فعلی است برگرداند. اگر این تابع اعداد صحیح برمی‌گرداند، همچنین *timeunit* را برای نشان دادن مدت‌زمان یک واحد مشخص کنید::" + +msgid "" +"# Timer returns time in milliseconds\n" +"pr = profiling.tracing.Profile(my_ms_timer, 0.001)" +msgstr "" +"# Timer returns time in milliseconds\n" +"pr = profiling.tracing.Profile(my_ms_timer, 0.001)" + +msgid "For best performance, the timer function should be as fast as possible. The profiler calls it frequently, so timer overhead directly affects profiling overhead." +msgstr "برای بهترین عملکرد، تابع تایمر باید تا حد امکان سریع باشد. پروفایل‌گیر آن را مکرراً فراخوانی می‌کند، بنابراین سربار تایمر مستقیماً روی سربار پروفایل‌گیری تأثیر می‌گذارد." + +msgid "The :mod:`time` module provides several functions suitable for use as custom timers:" +msgstr "ماژول :mod:`time` چندین تابع مناسب برای استفاده به عنوان تایمرهای سفارشی فراهم می‌کند:" + +msgid ":func:`time.perf_counter` for high-resolution wall-clock time" +msgstr ":func:`time.perf_counter` برای زمان ساعت دیواری با دقت بالا" + +msgid ":func:`time.process_time` for CPU time (excluding sleep)" +msgstr ":func:`time.process_time` برای زمان CPU (به‌جز زمان توقف)" + +msgid ":func:`time.monotonic` for monotonic clock time" +msgstr ":func:`time.monotonic` برای زمان ساعت یکنواخت" + +msgid "Limitations" +msgstr "محدودیت‌ها" + +msgid "Deterministic profiling has inherent limitations related to timing accuracy." +msgstr "پروفایل‌گیری قطعی دارای محدودیت‌های ذاتی مربوط به دقت زمان‌بندی است." + +msgid "The underlying timer typically has a resolution of about one millisecond. Measurements cannot be more accurate than this resolution. With enough measurements, timing errors tend to average out, but individual measurements may be imprecise." +msgstr "تایمر زیرین معمولاً وضوحی در حدود یک میلی‌ثانیه دارد. اندازه‌گیری‌ها نمی‌توانند دقیق‌تر از این وضوح باشند. با انجام اندازه‌گیری‌های کافی، خطاهای زمان‌بندی معمولاً خنثی می‌شوند، اما اندازه‌گیری‌های منفرد ممکن است دقیق نباشند." + +msgid "There is also latency between when an event occurs and when the profiler captures the timestamp. Similarly, there is latency after reading the timestamp before user code resumes. Functions called frequently accumulate this latency, which can make them appear slower than they actually are. This error is typically less than one clock tick per call but can become significant for functions called many times." +msgstr "همچنین بین زمان وقوع یک رویداد و زمان ثبت برچسب زمانی توسط پروفایل‌گیر، تاخیر وجود دارد. به همین صورت، پس از خواندن برچسب زمانی و پیش از ازسرگیری کدهای کاربر نیز تاخیر وجود دارد. توابعی که مکرراً فراخوانی می‌شوند این تاخیر را انباشته می‌کنند، که می‌تواند باعث شود کندتر از آنچه واقعاً هستند به نظر برسند. این خطا معمولاً کمتر از یک تیک ساعت در هر فراخوانی است اما می‌تواند برای توابعی که بارها فراخوانی می‌شوند قابل توجه باشد." + +msgid "The :mod:`!profiling.tracing` module (and its ``cProfile`` alias) is implemented as a C extension with low overhead, so these timing issues are less pronounced than with the deprecated pure Python :mod:`profile` module." +msgstr "ماژول :mod:`!profiling.tracing` (و نام مستعار ``cProfile`` آن) به عنوان یک افزونه‌ی C با سربار کم پیاده‌سازی شده است، بنابراین این مسائل مربوط به زمان‌بندی در مقایسه با ماژول منسوخ :mod:`profile` که کاملاً به زبان پایتون است، کمتر به چشم می‌آیند." + +msgid ":mod:`profiling`" +msgstr ":mod:`profiling`" + +msgid "Overview of Python profiling tools and guidance on choosing a profiler." +msgstr "نمای کلی از ابزارهای پروفایل‌گیری پایتون و راهنمایی درباره‌ی انتخاب یک پروفایل‌گیر." + +msgid ":mod:`profiling.sampling`" +msgstr ":mod:`profiling.sampling`" + +msgid "Statistical sampling profiler for production use." +msgstr "پروفایل‌گیر نمونه‌برداری آماری برای استفاده در محیط تولید." + +msgid ":mod:`pstats`" +msgstr ":mod:`pstats`" + +msgid "Statistics analysis and formatting for profile data." +msgstr "تجزیه‌وتحلیل آمار و قالب‌بندی برای داده‌های پروفایل." + +msgid ":mod:`profile`" +msgstr ":mod:`profile`" + +msgid "Deprecated pure Python profiler (includes calibration documentation)." +msgstr "پروفایل‌گیر کاملاً پایتونی منسوخ (شامل مستندات کالیبراسیون)." diff --git a/library/pstats.po b/library/pstats.po new file mode 100644 index 00000000..877a6de6 --- /dev/null +++ b/library/pstats.po @@ -0,0 +1,477 @@ +# Persian translations for Python package. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# Automatically generated, 2026. +# +# Translators: +# Sepehr Rasouli , 2026 +# arman mohebali , 2026 +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 20:23+0330\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: fa\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.6\n" + +msgid ":mod:`!pstats` --- Statistics for profilers" +msgstr ":mod:`!pstats` --- آمار برای پروفایل‌گیرها" + +msgid "**Source code:** :source:`Lib/pstats.py`" +msgstr "**کد منبع:** :source:`Lib/pstats.py`" + +msgid "The :mod:`!pstats` module provides tools for reading, manipulating, and displaying profiling statistics generated by Python's profilers. It reads output from both :mod:`profiling.tracing` (deterministic profiler) and :mod:`profiling.sampling` (statistical profiler)." +msgstr "ماژول :mod:`!pstats` ابزارهایی را برای خواندن، دستکاری و نمایش آمارهای پروفایل‌گیری تولیدشده توسط پروفایل‌گیرهای پایتون فراهم می‌کند. این ماژول خروجی هر دو ماژول :mod:`profiling.tracing` (پروفایل‌گیر قطعی) و :mod:`profiling.sampling` (پروفایل‌گیر آماری) را می‌خواند." + +msgid "Reading and displaying profile data" +msgstr "خواندن و نمایش داده‌های پروفایل" + +msgid "The :class:`Stats` class is the primary interface for working with profile data. It can read statistics from files or directly from a :class:`~profiling.tracing.Profile` object." +msgstr "کلاس :class:`Stats` رابط اصلی برای کار با داده‌های پروفایل است. این کلاس می‌تواند آمار را از پرونده‌ها یا مستقیماً از یک شیء :class:`~profiling.tracing.Profile` بخواند." + +msgid "Load statistics from a file and print a basic report::" +msgstr "بارگذاری آمار از یک پرونده و چاپ یک گزارش پایه‌ای::" + +msgid "" +"import pstats\n" +"\n" +"p = pstats.Stats('profile_output.prof')\n" +"p.print_stats()" +msgstr "" +"import pstats\n" +"\n" +"p = pstats.Stats('profile_output.prof')\n" +"p.print_stats()" + +msgid "The :class:`Stats` object provides methods for sorting and filtering the data before printing. For example, to see the ten functions with the highest cumulative time::" +msgstr "شیء :class:`Stats` متدهایی را برای مرتب‌سازی و فیلتر کردن داده‌ها قبل از چاپ فراهم می‌کند. برای مثال، برای مشاهده‌ی ده تابع با بیشترین زمان انباشته::" + +msgid "" +"from pstats import SortKey\n" +"\n" +"p = pstats.Stats('profile_output.prof')\n" +"p.sort_stats(SortKey.CUMULATIVE).print_stats(10)" +msgstr "" +"from pstats import SortKey\n" +"\n" +"p = pstats.Stats('profile_output.prof')\n" +"p.sort_stats(SortKey.CUMULATIVE).print_stats(10)" + +msgid "Working with statistics" +msgstr "کار با آمار" + +msgid "The :class:`Stats` class supports method chaining, making it convenient to perform multiple operations::" +msgstr "کلاس :class:`Stats` از زنجیره‌سازی متدها پشتیبانی می‌کند و انجام چندین عملیات را به شکلی ساده فراهم می‌سازد::" + +msgid "" +"p = pstats.Stats('restats')\n" +"p.strip_dirs().sort_stats(-1).print_stats()" +msgstr "" +"p = pstats.Stats('restats')\n" +"p.strip_dirs().sort_stats(-1).print_stats()" + +msgid "The :meth:`~Stats.strip_dirs` method removes directory paths from filenames, making the output more compact. The :meth:`~Stats.sort_stats` method accepts various keys to control the sort order." +msgstr "متد :meth:`~Stats.strip_dirs` مسیرهای پوشه را از نام پرونده‌ها حذف می‌کند و خروجی را فشرده‌تر می‌سازد. متد :meth:`~Stats.sort_stats` کلیدهای مختلفی را برای کنترل ترتیب مرتب‌سازی می‌پذیرد." + +msgid "Different sort keys highlight different aspects of performance::" +msgstr "کلیدهای مرتب‌سازی مختلف، جنبه‌های متفاوتی از عملکرد را برجسته می‌کنند::" + +msgid "" +"from pstats import SortKey\n" +"\n" +"# Functions that consume the most cumulative time\n" +"p.sort_stats(SortKey.CUMULATIVE).print_stats(10)\n" +"\n" +"# Functions that consume the most time in their own code\n" +"p.sort_stats(SortKey.TIME).print_stats(10)\n" +"\n" +"# Functions sorted by name\n" +"p.sort_stats(SortKey.NAME).print_stats()" +msgstr "" +"from pstats import SortKey\n" +"\n" +"# توابعی که بیشترین زمان انباشته را مصرف می‌کنند\n" +"p.sort_stats(SortKey.CUMULATIVE).print_stats(10)\n" +"\n" +"# توابعی که بیشترین زمان را در کد خودشان مصرف می‌کنند\n" +"p.sort_stats(SortKey.TIME).print_stats(10)\n" +"\n" +"# توابع مرتب‌شده بر اساس نام\n" +"p.sort_stats(SortKey.NAME).print_stats()" + +msgid "Filtering output" +msgstr "فیلتر کردن خروجی" + +msgid "The :meth:`~Stats.print_stats` method accepts restrictions that filter which functions are displayed. Restrictions can be integers (limiting the count), floats between 0 and 1 (selecting a percentage), or strings (matching function names via regular expression)." +msgstr "متد :meth:`~Stats.print_stats` محدودیت‌هایی را می‌پذیرد که مشخص می‌کنند چه توابعی نمایش داده شوند. محدودیت‌ها می‌توانند عدد صحیح (محدود کردن تعداد)، عدد اعشاری بین ۰ و ۱ (انتخاب یک درصد)، یا رشته (تطبیق نام توابع از طریق عبارت باقاعده) باشند." + +msgid "Print only the top 10%::" +msgstr "چاپ فقط ۱۰ درصد برتر::" + +msgid "p.print_stats(.1)" +msgstr "p.print_stats(.1)" + +msgid "Print only functions whose names contain \"init\"::" +msgstr "چاپ فقط توابعی که نام آن‌ها شامل \"init\" است::" + +msgid "p.print_stats('init')" +msgstr "p.print_stats('init')" + +msgid "Combine restrictions (they apply sequentially)::" +msgstr "ترکیب محدودیت‌ها (به‌صورت پیاپی اعمال می‌شوند)::" + +msgid "" +"# Top 10%, then only those containing \"init\"\n" +"p.print_stats(.1, 'init')\n" +"\n" +"# Functions in files matching \"foo:\", limited to top 50%\n" +"p.sort_stats(SortKey.FILENAME).print_stats('foo:', .5)" +msgstr "" +"# Top 10%, then only those containing \"init\"\n" +"p.print_stats(.1, 'init')\n" +"\n" +"# Functions in files matching \"foo:\", limited to top 50%\n" +"p.sort_stats(SortKey.FILENAME).print_stats('foo:', .5)" + +msgid "Analyzing call relationships" +msgstr "تحلیل روابط فراخوانی" + +msgid "The :meth:`~Stats.print_callers` method shows which functions called each displayed function::" +msgstr "متد :meth:`~Stats.print_callers` نشان می‌دهد که کدام تابع‌ها هر تابع نمایش‌داده‌شده را فراخوانی کرده‌اند::" + +msgid "p.print_callers()" +msgstr "p.print_callers()" + +msgid "The :meth:`~Stats.print_callees` method shows the opposite relationship, listing which functions each displayed function called::" +msgstr "متد :meth:`~Stats.print_callees` رابطه‌ی متقابل را نشان می‌دهد و فهرست می‌کند که هر تابع نمایش‌داده‌شده کدام تابع‌ها را فراخوانی کرده است::" + +msgid "p.print_callees()" +msgstr "p.print_callees()" + +msgid "Both methods accept the same restriction arguments as :meth:`~Stats.print_stats`." +msgstr "هر دو متد همان آرگومان‌های محدودیت را می‌پذیرند که متد :meth:`~Stats.print_stats` می‌پذیرد." + +msgid "Combining multiple profiles" +msgstr "ترکیب چند پروفایل" + +msgid "Statistics from multiple profiling runs can be combined into a single :class:`Stats` object::" +msgstr "آمار حاصل از چندین اجرای پروفایل‌گیری را می‌توان در یک شیء :class:`Stats` واحد ترکیب کرد::" + +msgid "" +"# Load multiple files at once\n" +"p = pstats.Stats('run1.prof', 'run2.prof', 'run3.prof')\n" +"\n" +"# Or add files incrementally\n" +"p = pstats.Stats('run1.prof')\n" +"p.add('run2.prof')\n" +"p.add('run3.prof')" +msgstr "" +"# Load multiple files at once\n" +"p = pstats.Stats('run1.prof', 'run2.prof', 'run3.prof')\n" +"\n" +"# Or add files incrementally\n" +"p = pstats.Stats('run1.prof')\n" +"p.add('run2.prof')\n" +"p.add('run3.prof')" + +msgid "When files are combined, statistics for identical functions (same file, line, and name) are accumulated, giving an aggregate view across all profiling runs." +msgstr "هنگامی که پرونده‌ها ترکیب می‌شوند، آمار مربوط به توابع یکسان (پرونده، سطر و نام یکسان) انباشته می‌شوند و نمای تجمیعی از تمامی اجراهای پروفایل‌گیری ارائه می‌دهند." + +msgid "The :class:`!Stats` class" +msgstr "کلاس :class:`!Stats`" + +msgid "Create a statistics object from profile data." +msgstr "ایجاد یک شیء آماری از داده‌های پروفایل." + +msgid "The arguments can be filenames (strings or path-like objects) or :class:`~profiling.tracing.Profile` objects. If multiple sources are provided, their statistics are combined." +msgstr "آرگومان‌ها می‌توانند نام پرونده‌ها (رشته‌ها یا اشیای شبه‌مسیر) یا اشیای :class:`~profiling.tracing.Profile` باشند. اگر چندین منبع ارائه شود، آمار آن‌ها با یکدیگر ترکیب می‌شود." + +msgid "The *stream* argument specifies where output from :meth:`print_stats` and related methods is written. It defaults to :data:`sys.stdout`." +msgstr "آرگومان *stream* مشخص می‌کند که خروجی متد :meth:`print_stats` و متدهای مرتبط با آن در کجا نوشته شود. مقدار پیش‌فرض آن :data:`sys.stdout` است." + +msgid "The profile data format is specific to the Python version that created it. There is no compatibility guarantee between Python versions or between different profilers." +msgstr "قالب داده‌های پروفایل مختص نسخه‌ای از پایتون است که آن را ایجاد کرده است. هیچ تضمینی برای سازگاری بین نسخه‌های مختلف پایتون یا بین پروفایل‌گیرهای مختلف وجود ندارد." + +msgid "Remove leading path information from all filenames." +msgstr "حذف اطلاعات مسیر پیشرو از تمام نام‌پرونده‌ها." + +msgid "This method modifies the object in place and returns it for method chaining. After stripping, the statistics are considered to be in random order." +msgstr "این متد شیء را در جای خود اصلاح می‌کند و آن را برای زنجیره‌سازی متدها برمی‌گرداند. پس از حذف، آمار به‌صورت دارای ترتیب تصادفی در نظر گرفته می‌شود." + +msgid "If stripping causes two functions to become indistinguishable (same filename, line number, and function name), their statistics are combined into a single entry." +msgstr "اگر حذف باعث شود دو تابع غیرقابل‌تمایز شوند (نام‌پرونده، شماره سطر و نام تابع یکسان)، آمار آن‌ها در یک درایه‌ی واحد ترکیب می‌شود." + +msgid "Add profiling data from additional files." +msgstr "اضافه کردن داده‌های پروفایل‌گیری از پرونده‌های اضافی." + +msgid "The files must have been created by the same profiler type. Statistics for identical functions are accumulated." +msgstr "پرونده‌ها باید توسط همان نوع پروفایل‌گیر ایجاد شده باشند. آمارهای مربوط به توابع یکسان انباشته می‌شوند." + +msgid "Save the current statistics to a file." +msgstr "ذخیره‌سازی آمارهای فعلی در یک پرونده." + +msgid "The file is created if it does not exist and overwritten if it does. The saved data can be loaded by creating a new :class:`Stats` object." +msgstr "اگر پرونده وجود نداشته باشد ایجاد می‌شود و اگر وجود داشته باشد، روی آن نوشته می‌شود. داده‌های ذخیره‌شده را می‌توان با ایجاد یک شیء جدید از :class:`Stats` بارگذاری کرد." + +msgid "Sort the statistics according to the specified criteria." +msgstr "مرتب‌سازی آمارها بر اساس معیارهای مشخص‌شده." + +msgid "Each key can be a string or a :class:`SortKey` enum member. When multiple keys are provided, later keys break ties in earlier keys." +msgstr "هر کلید می‌تواند یک رشته یا یکی از اعضای شمارشی :class:`SortKey` باشد. هنگامی که چندین کلید ارائه می‌شود، کلیدهای بعدی تساوی‌های کلیدهای قبلی را می‌شکنند." + +msgid "Using :class:`SortKey` enum members is preferred over strings as it provides better error checking::" +msgstr "استفاده از اعضای شمارشی :class:`SortKey` به دلیل فراهم کردن بررسی خطای بهتر، به رشته‌ها ترجیح داده می‌شود::" + +msgid "" +"from pstats import SortKey\n" +"p.sort_stats(SortKey.CUMULATIVE)" +msgstr "" +"from pstats import SortKey\n" +"p.sort_stats(SortKey.CUMULATIVE)" + +msgid "Valid sort keys:" +msgstr "کلیدهای مرتب‌سازی معتبر:" + +msgid "String" +msgstr "رشته" + +msgid "Enum" +msgstr "Enum" + +msgid "Meaning" +msgstr "معنی" + +msgid "``'calls'``" +msgstr "``'calls'``" + +msgid "``SortKey.CALLS``" +msgstr "``SortKey.CALLS``" + +msgid "call count" +msgstr "تعداد فراخوانی‌ها" + +msgid "``'cumulative'``" +msgstr "``'cumulative'``" + +msgid "``SortKey.CUMULATIVE``" +msgstr "``SortKey.CUMULATIVE``" + +msgid "cumulative time" +msgstr "زمان تجمعی" + +msgid "``'cumtime'``" +msgstr "``'cumtime'``" + +msgid "N/A" +msgstr "ناموجود" + +msgid "``'file'``" +msgstr "``'file'``" + +msgid "file name" +msgstr "نام پرونده" + +msgid "``'filename'``" +msgstr "``'filename'``" + +msgid "``SortKey.FILENAME``" +msgstr "``SortKey.FILENAME``" + +msgid "``'module'``" +msgstr "``'module'``" + +msgid "``'ncalls'``" +msgstr "``'ncalls'``" + +msgid "``'pcalls'``" +msgstr "``'pcalls'``" + +msgid "``SortKey.PCALLS``" +msgstr "``SortKey.PCALLS``" + +msgid "primitive call count" +msgstr "تعداد فراخوانی‌های اولیه" + +msgid "``'line'``" +msgstr "``'line'``" + +msgid "``SortKey.LINE``" +msgstr "``SortKey.LINE``" + +msgid "line number" +msgstr "شماره‌ی سطر" + +msgid "``'name'``" +msgstr "``'name'``" + +msgid "``SortKey.NAME``" +msgstr "``SortKey.NAME``" + +msgid "function name" +msgstr "نام تابع" + +msgid "``'nfl'``" +msgstr "``'nfl'``" + +msgid "``SortKey.NFL``" +msgstr "``SortKey.NFL``" + +msgid "name/file/line" +msgstr "نام/پرونده/سطر" + +msgid "``'stdname'``" +msgstr "``'stdname'``" + +msgid "``SortKey.STDNAME``" +msgstr "``SortKey.STDNAME``" + +msgid "standard name" +msgstr "نام استاندارد" + +msgid "``'time'``" +msgstr "``'time'``" + +msgid "``SortKey.TIME``" +msgstr "``SortKey.TIME``" + +msgid "internal time" +msgstr "زمان داخلی" + +msgid "``'tottime'``" +msgstr "``'tottime'``" + +msgid "All sorts on statistics are in descending order (most time consuming first), while name, file, and line number sorts are ascending (alphabetical)." +msgstr "تمام مرتب‌سازی‌ها روی آمار به ترتیب نزولی هستند (زمان‌برترین‌ها در ابتدا)، در حالی که مرتب‌سازی‌های نام، پرونده و شماره‌سطر صعودی (الفبایی) هستند." + +msgid "The difference between ``SortKey.NFL`` and ``SortKey.STDNAME`` is that NFL sorts line numbers numerically while STDNAME sorts them as strings. ``sort_stats(SortKey.NFL)`` is equivalent to ``sort_stats(SortKey.NAME, SortKey.FILENAME, SortKey.LINE)``." +msgstr "تفاوت بین ``SortKey.NFL`` و ``SortKey.STDNAME`` در این است که NFL شماره‌سطرها را به صورت عددی مرتب می‌کند، در حالی که STDNAME آن‌ها را به عنوان رشته مرتب می‌کند. عبارت ``sort_stats(SortKey.NFL)`` معادل ``sort_stats(SortKey.NAME, SortKey.FILENAME, SortKey.LINE)`` است." + +msgid "For backward compatibility, the numeric arguments ``-1``, ``0``, ``1``, and ``2`` are also accepted, meaning ``'stdname'``, ``'calls'``, ``'time'``, and ``'cumulative'`` respectively." +msgstr "برای سازگاری عقبگرد، آرگومان‌های عددی ``-1``، ``0``، ``1`` و ``2`` نیز پذیرفته می‌شوند که به ترتیب به معنای ``'stdname'``، ``'calls'``، ``'time'`` و ``'cumulative'`` هستند." + +msgid "The :class:`SortKey` enum." +msgstr "شمارشی (enum) از :class:`SortKey`." + +msgid "Reverse the current sort order." +msgstr "معکوس کردن ترتیب مرتب‌سازی فعلی." + +msgid "By default, the sort direction is chosen appropriately for the sort key (descending for time-based keys, ascending for name-based keys). This method inverts that choice." +msgstr "به طور پیش‌فرض، جهت مرتب‌سازی به صورت مناسب برای کلید مرتب‌سازی انتخاب می‌شود (نزولی برای کلیدهای مبتنی بر زمان، صعودی برای کلیدهای مبتنی بر نام). این متد آن انتخاب را معکوس می‌کند." + +msgid "Print a report of the profiling statistics." +msgstr "چاپ گزارشی از آمارهای پروفایل‌گیری." + +msgid "The output includes a header line summarizing the data, followed by a table of function statistics sorted according to the last :meth:`sort_stats` call." +msgstr "خروجی شامل یک سطر سرآیند که داده‌ها را خلاصه می‌کند، به همراه جدول آمارهای توابع است که بر اساس آخرین فراخوانی :meth:`sort_stats` مرتب شده‌اند." + +msgid "Restrictions filter the output. Each restriction is either:" +msgstr "محدودیت‌ها خروجی را فیلتر می‌کنند. هر محدودیت یکی از موارد زیر است:" + +msgid "An integer: limits output to that many entries" +msgstr "یک عدد صحیح: خروجی را به آن تعداد مدخل محدود می‌کند" + +msgid "A float between 0.0 and 1.0: selects that fraction of entries" +msgstr "یک عدد اعشاری بین 0.0 و 1.0: آن کسری از مدخل‌ها را انتخاب می‌کند" + +msgid "A string: matches function names via regular expression" +msgstr "یک رشته: نام توابع را از طریق عبارت باقاعده مطابقت می‌دهد" + +msgid "Restrictions are applied sequentially. For example::" +msgstr "محدودیت‌ها به صورت ترتیبی اعمال می‌شوند. برای مثال::" + +msgid "print_stats(.1, 'foo:')" +msgstr "print_stats(.1, 'foo:')" + +msgid "First limits to the top 10%, then filters to functions matching 'foo:'." +msgstr "ابتدا به ۱۰ درصد برتر محدود می‌کند، سپس روی توابعی که با 'foo:' مطابقت دارند فیلتر می‌کند." + +msgid "Print the callers of each function in the statistics." +msgstr "چاپ کردن فراخواننده‌های هر تابع در آمار." + +msgid "For each function in the filtered results, shows which functions called it and how often." +msgstr "برای هر تابع در نتایج فیلترشده، نشان می‌دهد که کدام توابع آن را فراخوانی کرده‌اند و چند بار." + +msgid "With :mod:`profiling.tracing` (or ``cProfile``), each caller line shows three numbers: the number of calls from that caller, and the total and cumulative times for those specific calls." +msgstr "با ماژول :mod:`profiling.tracing` (یا ``cProfile``)، هر سطر فراخواننده سه عدد را نشان می‌دهد: تعداد فراخوانی‌ها از آن فراخواننده، و زمان‌های کل و تجمعی برای آن فراخوانی‌های خاص." + +msgid "Accepts the same restriction arguments as :meth:`print_stats`." +msgstr "همان آرگومان‌های محدودکننده را مانند :meth:`print_stats` می‌پذیرد." + +msgid "Print the functions called by each function in the statistics." +msgstr "چاپ کردن توابع فراخوانی‌شده توسط هر تابع در آمار." + +msgid "This is the inverse of :meth:`print_callers`, showing which functions each listed function called." +msgstr "این کار معکوس :meth:`print_callers` است و نشان می‌دهد هر تابع فهرست‌شده چه توابعی را فراخوانی کرده است." + +msgid "Return a ``StatsProfile`` object containing the statistics." +msgstr "یک شیء ``StatsProfile`` حاوی آمار را برمی‌گرداند." + +msgid "The returned object provides programmatic access to the profile data, with function names mapped to ``FunctionProfile`` objects containing timing and call count information." +msgstr "شیء برگردانده‌شده دسترسی برنامه‌نویسی به داده‌های پروفایل را فراهم می‌کند، به‌طوری که نام توابع به شیءهای ``FunctionProfile`` حاوی اطلاعات زمان‌بندی و تعداد فراخوانی نگاشت شده‌اند." + +msgid "An enumeration of valid sort keys for :meth:`Stats.sort_stats`." +msgstr "شماره‌گذاری کلیدهای مرتب‌سازی معتبر برای :meth:`Stats.sort_stats`." + +msgid "Sort by call count." +msgstr "مرتب‌سازی بر اساس تعداد فراخوانی." + +msgid "Sort by cumulative time." +msgstr "مرتب‌سازی بر اساس زمان تجمعی." + +msgid "Sort by file name." +msgstr "مرتب‌سازی بر اساس نام پرونده." + +msgid "Sort by line number." +msgstr "مرتب‌سازی بر اساس شماره‌ی سطر." + +msgid "Sort by function name." +msgstr "مرتب‌سازی بر اساس نام تابع." + +msgid "Sort by name, then file, then line number (numeric line sort)." +msgstr "مرتب‌سازی بر اساس نام، سپس پرونده و سپس شماره‌ی سطر (مرتب‌سازی عددی سطر)." + +msgid "Sort by primitive (non-recursive) call count." +msgstr "مرتب‌سازی بر اساس تعداد فراخوانی اولیه (غیربازگشتی)." + +msgid "Sort by standard name (string-based line sort)." +msgstr "مرتب‌سازی بر اساس نام استاندارد (مرتب‌سازی سطری مبتنی بر رشته)." + +msgid "Sort by internal time (time in function excluding subcalls)." +msgstr "مرتب‌سازی بر اساس زمان داخلی (زمان صرف‌شده در تابع به جز زیرفراخوانی‌ها)." + +msgid "Command-line interface" +msgstr "رابط خط فرمان" + +msgid "The :mod:`!pstats` module can be invoked as a script to interactively browse profile data::" +msgstr "ماژول :mod:`!pstats` را می‌توان به عنوان یک اسکریپت برای مرور تعاملی داده‌های پروفایل فراخوانی کرد::" + +msgid "python -m pstats profile_output.prof" +msgstr "python -m pstats profile_output.prof" + +msgid "This opens a line-oriented interface (built on :mod:`cmd`) for examining the statistics. Type ``help`` at the prompt for available commands." +msgstr "این کار یک رابط خط‌مشی‌محور (ساخته‌شده روی :mod:`cmd`) برای بررسی آمار باز می‌کند. برای دستورهای موجود، عبارت ``help`` را در اعلان وارد کنید." + +msgid ":mod:`profiling`" +msgstr ":mod:`profiling`" + +msgid "Overview of Python profiling tools." +msgstr "نمای کلی ابزارهای پروفایل‌گیری پایتون." + +msgid ":mod:`profiling.tracing`" +msgstr ":mod:`profiling.tracing`" + +msgid "Deterministic tracing profiler." +msgstr "پروفایل‌گیر ردیابی قطعی." + +msgid ":mod:`profiling.sampling`" +msgstr ":mod:`profiling.sampling`" + +msgid "Statistical sampling profiler." +msgstr "پروفایل‌گیر نمونه‌برداری آماری." diff --git a/library/pty.po b/library/pty.po index ae37ec2f..8f169f3d 100644 --- a/library/pty.po +++ b/library/pty.po @@ -8,12 +8,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 01:11+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -44,9 +45,15 @@ msgstr "ماژول :mod:`!pty` توابع زیر را تعریف می‌کند:" msgid "Fork. Connect the child's controlling terminal to a pseudo-terminal. Return value is ``(pid, fd)``. Note that the child gets *pid* 0, and the *fd* is *invalid*. The parent's return value is the *pid* of the child, and *fd* is a file descriptor connected to the child's controlling terminal (and also to the child's standard input and output)." msgstr "فورک . پایانه‌ی کنترل‌کننده‌ی فرزند را به یک شبه‌پایانه متصل می‌کند. مقدار بازگشتی ``(pid, fd)`` است. توجه داشته باشید که فرزند *pid* برابر ۰ دریافت می‌کند و *fd* *نامعتبر* است. مقدار بازگشتی والد، *pid* فرزند است و *fd* توصیف‌گر پرونده‌ای است که به پایانه‌ی کنترل‌کننده‌ی فرزند (و همچنین به ورودی و خروجی استاندارد فرزند) متصل است." +msgid "The returned file descriptor *fd* is :ref:`non-inheritable `." +msgstr "توصیف‌گر پرونده‌ی بازگردانده‌شده‌ی *fd* :ref:`غیرقابل به ارث بردن ` است." + msgid "On macOS the use of this function is unsafe when mixed with using higher-level system APIs, and that includes using :mod:`urllib.request`." msgstr "در macOS، استفاده از این تابع در صورت ترکیب با استفاده از APIهای سیستمی سطح بالاتر ناایمن است، و این شامل استفاده از :mod:`urllib.request` نیز می‌شود." +msgid "The returned file descriptor is now made non-inheritable." +msgstr "توصیف‌گر پرونده‌ی بازگردانده‌شده اکنون غیرقابل به ارث بردن می‌شود." + msgid "Open a new pseudo-terminal pair, using :func:`os.openpty` if possible, or emulation code for generic Unix systems. Return a pair of file descriptors ``(master, slave)``, for the master and the slave end, respectively." msgstr "یک جفت شبه‌پایانه (pseudo-terminal) جدید را، در صورت امکان با استفاده از :func:`os.openpty` یا با کد شبیه‌سازی برای سیستم‌های یونیکسی عام، باز می‌کند. یک جفت توصیف‌گر پرونده ``(master, slave)`` را به‌ترتیب برای سمت master و slave برمی‌گرداند." diff --git a/library/pyexpat.po b/library/pyexpat.po index e6d557d0..4baa8dc7 100644 --- a/library/pyexpat.po +++ b/library/pyexpat.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 12:23+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -36,8 +37,8 @@ msgstr "ماژول :mod:`!xml.parsers.expat` یک رابط پایتون برای 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 "این ماژول از ماژول :mod:`pyexpat` برای فراهم کردن دسترسی به پارسرٔ Expat استفاده می‌کند. استفاده‌ی مستقیم از ماژول :mod:`pyexpat` منسوخ شده است." -msgid "This module provides the following exception, type object and data items:" -msgstr "این ماژول استثنا، شیء نوع و آیتم‌های داده‌ی زیر را فراهم می‌کند:" +msgid "This module provides one exception and one type object:" +msgstr "این ماژول یک استثنا و یک شیء نوع ارائه می‌دهد:" msgid "The exception raised when Expat reports an error. See section :ref:`expaterror-objects` for more information on interpreting Expat errors." msgstr "استثنایی که وقتی Expat خطایی را گزارش می‌دهد، پرتاب می‌شود. برای اطلاعات بیشتر در مورد تفسیر خطاهای Expat، بخش :ref:`expaterror-objects` را ببینید." @@ -48,15 +49,6 @@ msgstr "نام مستعار برای :exc:`ExpatError`." msgid "The type of the return values from the :func:`ParserCreate` function." msgstr "نوع مقادیر بازگشتی تابع :func:`ParserCreate`." -msgid "The version string of the Expat library loaded by the interpreter, like ``'expat_2.8.4'``." -msgstr "رشته‌ی نسخه‌ی کتابخانه‌ی Expat که توسط مفسر بارگذاری شده است، مانند ``'expat_2.8.4'``." - -msgid "The version of the Expat library loaded by the interpreter, as a tuple of three integers: major, minor and micro version." -msgstr "نسخه‌ی کتابخانه‌ی Expat که توسط مفسر بارگذاری شده است، به صورت یک تاپل از سه عدد صحیح: نسخه‌ی اصلی، فرعی و ریز." - -msgid "The list of the features with which the loaded Expat library was compiled, as ``(name, value)`` pairs. The value is only meaningful for features which have one, like ``'XML_CONTEXT_BYTES'`` or the default protection limits ``'XML_BLAP_ACT_THRES'`` and ``'XML_AT_MAX_AMP'``; for other features, like ``'XML_DTD'`` and ``'XML_NS'``, the value is ``0`` and only the presence of the name is significant." -msgstr "فهرست ویژگی‌هایی که کتابخانه‌ی Expat بارگذاری‌شده با آن‌ها کامپایل‌شده است، به صورت جفت‌های ``(name, value)``. مقدار تنها برای ویژگی‌هایی که دارای مقدار هستند معنا دارد، مانند ``'XML_CONTEXT_BYTES'`` یا محدودیت‌های پیش‌فرض حفاظت ``'XML_BLAP_ACT_THRES'`` و ``'XML_AT_MAX_AMP'``؛ برای سایر ویژگی‌ها، مانند ``'XML_DTD'`` و ``'XML_NS'``، مقدار ``0`` است و تنها حضور نام مهم است." - msgid "The :mod:`!xml.parsers.expat` module contains two functions:" msgstr "ماژول :mod:`!xml.parsers.expat` شامل دو تابع است:" @@ -102,9 +94,6 @@ msgstr "" "http://www.python.org/ns/ elem1\n" "elem2" -msgid "*intern*, if given, must be a dictionary. It is used to intern the names of elements and attributes, and is available as the :attr:`~xmlparser.intern` attribute. By default a new empty dictionary is created for every parser." -msgstr "*intern*، در صورت داده شدن، باید یک دیکشنری باشد. این برای درونی‌سازی کردن نام‌های المان‌ها و ویژگی‌ها استفاده می‌شود، و به عنوان ویژگی :attr:`~xmlparser.intern` در دسترس است. به طور پیش‌فرض یک دیکشنری جدید خالی برای هر پارسر ایجاد می‌شود." - 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 document. Call ``ParserCreate`` for each document to provide unique parser instances." msgstr "به دلیل محدودیت‌هایی در کتابخانه ``Expat`` که :mod:`pyexpat` از آن استفاده می‌کند، نمونه‌ی :class:`xmlparser` برگردانده‌شده فقط می‌تواند برای تجزیه‌ی یک سند XML استفاده شود. برای فراهم کردن نمونه‌های پارسر یکتا، ``ParserCreate`` را برای هر سند فراخوانی کنید." @@ -120,11 +109,11 @@ msgstr "اشیاء XMLParser" msgid ":class:`xmlparser` objects have the following methods:" msgstr "اشیای :class:`xmlparser` متدهای زیر را دارند:" -msgid "Parses the contents of *data*, calling the appropriate handler functions to process the parsed data. *data* can be a :term:`bytes-like object` or a string. If it is a string, the encoding declaration in the XML data is ignored, and the data is parsed as already decoded text. *isfinal* must be true on the final call to this method; it allows the parsing of a single file in fragments, not the submission of multiple files. *data* can be empty at any time." -msgstr "محتویات *data* را تجزیه می‌کند، با فراخوانی توابع هندلر مناسب برای پردازش داده‌های تجزیه‌شده. *data* می‌تواند یک :term:`شیء شبه‌بایت ` یا یک رشته باشد. اگر رشته باشد، اعلام کدگذاری در داده‌های XML نادیده گرفته می‌شود، و داده‌ها به عنوان متنِ کدگشایی‌شده‌ی قبلی تجزیه می‌شوند. *isfinal* باید در فراخوانی نهایی این متد true باشد؛ این امکان تجزیه یک پرونده تکی به صورت قطعات را می‌دهد، نه ارائه چندین پرونده. *data* می‌تواند در هر زمان خالی باشد." +msgid "Parses the contents of the string *data*, calling the appropriate handler functions to process the parsed data. *isfinal* must be true on the final call to this method; it allows the parsing of a single file in fragments, not the submission of multiple files. *data* can be the empty string at any time." +msgstr "محتویات رشته‌ی *data* را تجزیه کرده و توابع هندلر مناسب را برای پردازش داده‌های تجزیه‌شده فراخوانی می‌کند. *isfinal* باید در آخرین فراخوانی این متد برابر با true باشد؛ این امکان تجزیه‌ی یک پرونده‌ی واحد را در قالب تکه‌ها فراهم می‌کند، نه ارسال چندین پرونده را. *data* می‌تواند در هر زمانی رشته‌ی خالی باشد." -msgid "Parse XML data reading from the object *file*. *file* only needs to provide the ``read(nbytes)`` method, which returns bytes, and an empty bytes object when there's no more data. Text files are not supported; use :meth:`Parse` for data which is already decoded." -msgstr "داده‌های XML را از شیء *file* خوانده و تجزیه کنید. *file* تنها نیاز است که متد ``read(nbytes)`` را فراهم کند، که بایت‌ها را برمی‌گرداند، و یک شیء بایت خالی وقتی داده‌ای بیشتر وجود نداشته باشد. پرونده‌های متنی پشتیبانی نمی‌شوند؛ برای داده‌هایی که قبلاً کدگشایی شده‌اند از :meth:`Parse` استفاده کنید." +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 "داده‌های XML را با خواندن از شیء *file* تجزیه می‌کند. *file* فقط نیازمند فراهم کردن متد ``read(nbytes)`` است و هنگامی که داده‌ی دیگری وجود ندارد، رشته‌ی خالی را برمی‌گرداند." msgid "Sets the base to be used for resolving relative URIs in system identifiers in declarations. Resolving relative identifiers is left to the application: this value will be passed through as the *base* argument to the :func:`ExternalEntityRefHandler`, :func:`NotationDeclHandler`, and :func:`UnparsedEntityDeclHandler` functions." msgstr "پایه‌ای را تنظیم می‌کند که برای حل URIهای نسبی در شناسه‌های سیستم در اعلان‌ها استفاده می‌شود. حل شناسه‌های نسبی بر عهده برنامه گذاشته شده است: این مقدار به‌عنوان آرگومان *base* به توابع :func:`ExternalEntityRefHandler`، :func:`NotationDeclHandler` و :func:`UnparsedEntityDeclHandler` ارسال می‌شود." @@ -132,8 +121,8 @@ msgstr "پایه‌ای را تنظیم می‌کند که برای حل URIها 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 "رشته‌ای شامل پایه‌ی تنظیم‌شده توسط فراخوانی پیشین :meth:`SetBase`، یا در صورتی که :meth:`SetBase` فراخوانی نشده باشد، ``None`` برمی‌گرداند." -msgid "Returns the input data which generated the current event as a :class:`bytes` object. The data is in the encoding of the entity which contains the text. It extends to the end of the currently buffered input, therefore it can contain also the data of the following events, and if the event was generated by a large amount of text, not all of it may be available. When called while an event handler is not active, the return value is ``None``." -msgstr "داده‌های ورودی که رویداد جاری را تولید کرده‌اند را به عنوان یک شیء :class:`bytes` برمی‌گرداند. داده‌ها در کدگذاری موجودیتی که متن را در بر می‌گیرد هستند. این داده‌ها تا پایان ورودی بافرشده‌ی جاری گسترش می‌یابد، بنابراین می‌تواند داده‌های رویدادهای بعدی را نیز در بر بگیرد، و اگر رویداد توسط مقدار زیادی متن تولید شده باشد، ممکن است همه‌ی آن در دسترس نباشد. وقتی در حالی که هیچ هندلر رویدادی فعال نیست فراخوانی شود، مقدار بازگشتی ``None`` است." +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 "داده‌ی ورودی را که رویداد فعلی را تولید کرده است به عنوان یک رشته برمی‌گرداند. این داده در کدگذاری موجودیتی است که متن را در بر دارد. وقتی این متد در زمانی که هندلر رویداد فعال نیست فراخوانی شود، مقدار بازگشتی ``None`` است." 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* parameter should be the string passed to the :meth:`ExternalEntityRefHandler` handler function, described below. The child parser is created with the :attr:`ordered_attributes` and :attr:`specified_attributes` set to the values of this parser." msgstr "یک پارسر «فرزند» ایجاد کنید که می‌توان از آن برای تجزیه‌ی یک موجودیت تجزیه‌شده‌ی خارجی که محتوای تجزیه‌شده توسط پارسر والد به آن ارجاع می‌دهد، استفاده کرد. پارامتر *context* باید رشته‌ای باشد که به تابع هندلر :meth:`ExternalEntityRefHandler`، که در ادامه توضیح داده شده است، ارسال می‌شود. پارسر فرزند با :attr:`ordered_attributes` و :attr:`specified_attributes` که به مقادیر این پارسر تنظیم شده‌اند، ایجاد می‌شود." @@ -156,8 +145,8 @@ msgstr "فراخوانی ``SetReparseDeferralEnabled(False)`` پیامدهای msgid "Expat 2.6.0 introduced a security mechanism called \"reparse deferral\" where instead of causing denial of service through quadratic runtime from reparsing large tokens, reparsing of unfinished tokens is now delayed by default until a sufficient amount of input is reached. Due to this delay, registered handlers may — depending of the sizing of input chunks pushed to Expat — no longer be called right after pushing new input to the parser. Where immediate feedback and taking over responsibility of protecting against denial of service from large tokens are both wanted, calling ``SetReparseDeferralEnabled(False)`` disables reparse deferral for the current Expat parser instance, temporarily or altogether. Calling ``SetReparseDeferralEnabled(True)`` allows re-enabling reparse deferral." msgstr "Expat 2.6.0 یک سازوکار امنیتی به نام «تعویق تجزیه‌ی مجدد» (reparse deferral) معرفی کرد که در آن به جای ایجاد منع سرویس از طریق ران‌تایم درجه‌ی دوم ناشی از تجزیه‌ی مجدد توکن‌های بزرگ، تجزیه‌ی مجدد توکن‌های ناتمام اکنون به‌طور پیش‌فرض تا دریافت مقدار کافی ورودی به تعویق می‌افتد. به دلیل این تأخیر، ممکن است هندلرهای ثبت‌شده — بسته به اندازه‌ی تکه‌های ورودی ارسال‌شده به Expat — دیگر بلافاصله پس از ارسال ورودی جدید به پارسر فراخوانی نشوند. در مواردی که بازخورد فوری و بر عهده گرفتن مسئولیت محافظت در برابر منع سرویس ناشی از توکن‌های بزرگ هر دو مطلوب باشند، فراخوانی ``SetReparseDeferralEnabled(False)`` تعویق تجزیه‌ی مجدد را برای نمونه‌ی جاری پارسر Expat، به‌طور موقت یا به‌طور کامل غیرفعال می‌کند. فراخوانی ``SetReparseDeferralEnabled(True)`` امکان فعال‌سازی مجدد تعویق تجزیه‌ی مجدد را فراهم می‌کند." -msgid "Note that :meth:`SetReparseDeferralEnabled` has been backported to some prior releases of CPython as a security fix. Check for availability of :meth:`SetReparseDeferralEnabled` using :func:`hasattr` if used in code running across a variety of Python versions." -msgstr "توجه داشته باشید که :meth:`SetReparseDeferralEnabled` به‌عنوان یک اصلاحیه امنیتی به برخی انتشارهای پیشین CPython بک‌پورت شده است. اگر در کدی استفاده می‌شود که روی نسخه‌های مختلف پایتون اجرا می‌شود، با استفاده از :func:`hasattr` دسترس‌پذیری :meth:`SetReparseDeferralEnabled` را بررسی کنید." +msgid ":meth:`!SetReparseDeferralEnabled` has been backported to some prior releases of CPython as a security fix. Check for availability using :func:`hasattr` if used in code running across a variety of Python versions." +msgstr "متد :meth:`!SetReparseDeferralEnabled` به عنوان یک اصلاح امنیتی به برخی از نسخه‌های قبلی سی‌پایتون پورتِ معکوس (backport) شده است. اگر در کدی که در نسخه‌های مختلف پایتون اجرا می‌شود استفاده می‌کنید، با استفاده از :func:`hasattr` دسترس‌پذیری آن را بررسی کنید." msgid "Returns whether reparse deferral is currently enabled for the given Expat parser instance." msgstr "برمی‌گرداند که آیا تعویق تجزیه مجدد (reparse deferral) در حال حاضر برای نمونه پارسر Expat داده‌شده فعال است یا خیر." @@ -177,6 +166,9 @@ msgstr "اشیای پارسر معمولاً دارای آستانه فعال‌ msgid "An :exc:`ExpatError` is raised if this method is called on a |xml-non-root-parser| parser. The corresponding :attr:`~ExpatError.lineno` and :attr:`~ExpatError.offset` should not be used as they may have no special meaning." msgstr "اگر این متد را روی یک پارسر |xml-non-root-parser| فراخوانی کنید، یک :exc:`ExpatError` پرتاب می‌شود. نباید از :attr:`~ExpatError.lineno` و :attr:`~ExpatError.offset` مربوطه استفاده کنید، زیرا ممکن است معنای خاصی نداشته باشند." +msgid ":meth:`!SetBillionLaughsAttackProtectionActivationThreshold` has been backported to some prior releases of CPython as a security fix. Check for availability using :func:`hasattr` if used in code running across a variety of Python versions." +msgstr "متد :meth:`!SetBillionLaughsAttackProtectionActivationThreshold` به عنوان یک اصلاح امنیتی به برخی از نسخه‌های قبلی سی‌پایتون پورتِ معکوس (backport) شده است. اگر در کدی که در نسخه‌های مختلف پایتون اجرا می‌شود استفاده می‌کنید، با استفاده از :func:`hasattr` دسترس‌پذیری آن را بررسی کنید." + msgid "Activation thresholds below 4 MiB are known to break support for DITA 1.3 payload and are hence not recommended." msgstr "آستانه‌های فعال‌سازی کمتر از ۴ MiB، پشتیبانی از بار DITA 1.3 را مختل می‌کنند و بنابراین توصیه نمی‌شوند." @@ -195,6 +187,9 @@ msgstr "اشیای پارسر معمولاً دارای حداکثر ضریب ت msgid "An :exc:`ExpatError` is raised if this method is called on a |xml-non-root-parser| parser or if *max_factor* is outside the valid range. The corresponding :attr:`~ExpatError.lineno` and :attr:`~ExpatError.offset` should not be used as they may have no special meaning." msgstr "اگر این متد بر روی یک پارسر |xml-non-root-parser| فراخوانی شود یا *max_factor* خارج از محدوده معتبر باشد، یک استثنای :exc:`ExpatError` پرتاب می‌شود. نباید از :attr:`~ExpatError.lineno` و :attr:`~ExpatError.offset` متناظر استفاده شود، زیرا ممکن است معنای خاصی نداشته باشند." +msgid ":meth:`!SetBillionLaughsAttackProtectionMaximumAmplification` has been backported to some prior releases of CPython as a security fix. Check for availability using :func:`hasattr` if used in code running across a variety of Python versions." +msgstr "متد :meth:`!SetBillionLaughsAttackProtectionMaximumAmplification` به عنوان یک اصلاح امنیتی به برخی از نسخه‌های قبلی سی‌پایتون پورتِ معکوس (backport) شده است. اگر در کدی که در نسخه‌های مختلف پایتون اجرا می‌شود استفاده می‌کنید، با استفاده از :func:`hasattr` دسترس‌پذیری آن را بررسی کنید." + msgid "The maximum amplification factor is only considered if the threshold that can be adjusted by :meth:`.SetBillionLaughsAttackProtectionActivationThreshold` is exceeded." msgstr "حداکثر ضریب تقویت تنها در صورتی در نظر گرفته می‌شود که از آستانه‌ای که می‌توان آن را با :meth:`.SetBillionLaughsAttackProtectionActivationThreshold` تنظیم کرد، عبور شود." @@ -204,6 +199,9 @@ msgstr "تعداد بایت‌های تخصیص‌یافته از حافظه پ msgid "Parser objects usually have an allocation activation threshold of 64 MiB, but the actual default value depends on the underlying Expat library." msgstr "اشیای پارسر معمولاً آستانه فعال‌سازی تخصیص ۶۴ MiB دارند، اما مقدار پیش‌فرض واقعی به کتابخانه Expat زیرین بستگی دارد." +msgid ":meth:`!SetAllocTrackerActivationThreshold` has been backported to some prior releases of CPython as a security fix. Check for availability using :func:`hasattr` if used in code running across a variety of Python versions." +msgstr "متد :meth:`!SetAllocTrackerActivationThreshold` به عنوان یک اصلاح امنیتی به برخی از نسخه‌های قبلی سی‌پایتون پورتِ معکوس (backport) شده است. اگر در کدی که در نسخه‌های مختلف پایتون اجرا می‌شود استفاده می‌کنید، با استفاده از :func:`hasattr` دسترس‌پذیری آن را بررسی کنید." + msgid "Sets the maximum amplification factor between direct input and bytes of dynamic memory allocated." msgstr "حداکثر ضریب تقویت بین ورودی مستقیم و بایت‌های حافظه پویای تخصیص‌یافته را تنظیم می‌کند." @@ -213,6 +211,9 @@ msgstr "ضریب تقویت در حین تجزیه به‌صورت ``allocated / msgid "The *max_factor* value must be a non-NaN :class:`float` value greater than or equal to 1.0. Amplification factors greater than 100.0 can be observed near the start of parsing even with benign files in practice. In particular, the activation threshold should be carefully chosen to avoid false positives." msgstr "مقدار *max_factor* باید مقداری از نوع :class:`float`، غیر NaN و بزرگ‌تر یا مساوی 1.0 باشد. در عمل، حتی با پرونده‌های بی‌خطر نیز می‌توان ضرایب تقویت بزرگ‌تر از 100.0 را در نزدیکی شروع تجزیه مشاهده کرد. به‌ویژه، آستانه فعال‌سازی باید با دقت انتخاب شود تا از مثبت‌های کاذب اجتناب شود." +msgid ":meth:`!SetAllocTrackerMaximumAmplification` has been backported to some prior releases of CPython as a security fix. Check for availability using :func:`hasattr` if used in code running across a variety of Python versions." +msgstr "متد :meth:`!SetAllocTrackerMaximumAmplification` به عنوان یک اصلاح امنیتی به برخی از نسخه‌های قبلی سی‌پایتون پورتِ معکوس (backport) شده است. اگر در کدی که در نسخه‌های مختلف پایتون اجرا می‌شود استفاده می‌کنید، با استفاده از :func:`hasattr` دسترس‌پذیری آن را بررسی کنید." + msgid "The maximum amplification factor is only considered if the threshold that can be adjusted by :meth:`.SetAllocTrackerActivationThreshold` is exceeded." msgstr "حداکثر ضریب تقویت تنها در صورتی در نظر گرفته می‌شود که از آستانه‌ای که با :meth:`.SetAllocTrackerActivationThreshold` قابل تنظیم است، فراتر رود." @@ -234,12 +235,6 @@ msgstr "تنظیم این ویژگی روی یک عدد صحیح غیرصفر ب 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 derived from attribute declarations. Applications which set this need to be especially careful to use what additional information is available from the declarations as needed to comply with the standards for the behavior of XML processors. By default, this attribute is false; it may be changed at any time." msgstr "اگر روی یک عدد صحیح غیرصفر تنظیم شود، پارسر فقط آن ویژگی‌هایی را گزارش می‌کند که در نمونه سند مشخص شده‌اند و نه آن‌هایی که از اعلامیه‌های ویژگی به دست آمده‌اند. برنامه‌هایی که این ویژگی را تنظیم می‌کنند باید به‌ویژه مراقب باشند که از اطلاعات تکمیلی موجود در اعلامیه‌ها، در صورت نیاز، برای رعایت استانداردهای رفتار پردازنده‌های XML استفاده کنند. به‌طور پیش‌فرض، این ویژگی false است؛ می‌توان آن را در هر زمان تغییر داد." -msgid "The dictionary used to intern the names of elements and attributes. It is either the dictionary passed as the *intern* argument of :func:`ParserCreate`, or a new dictionary created for this parser." -msgstr "دیکشنریِ مورد استفاده برای درونی‌سازی کردن نام‌های المان‌ها و ویژگی‌ها. این دیکشنری یا همان دیکشنری است که به عنوان آرگومان *intern* تابع :func:`ParserCreate` پاس داده شده است، یا یک دیکشنری جدید که برای این پارسر ایجاد شده است." - -msgid "If set to a true value, and namespace processing is enabled, the namespace prefix is reported as the third part of the expanded name, separated by the namespace separator. Names which have no prefix are not affected. By default, this attribute is false; it may be changed at any time." -msgstr "اگر به یک مقدار واقعی تنظیم شود، و پردازش فضای نام فعال باشد، پیشوند فضای نام به عنوان بخش سوم نام گسترش‌یافته گزارش می‌شود، جدا شده با جداکننده‌ی فضای نام. نام‌هایی که پیشوند ندارند تحت تأثیر قرار نمی‌گیرند. به طور پیش‌فرض، این ویژگی false است؛ می‌تواند در هر زمان تغییر کند." - msgid "The following attributes contain values relating to the most recent error encountered by an :class:`xmlparser` object, and will only have correct values once a call to :meth:`Parse` or :meth:`ParseFile` has raised an :exc:`xml.parsers.expat.ExpatError` exception." msgstr "ویژگی‌های زیر شامل مقادیری مربوط به آخرین خطایی هستند که یک شیء :class:`xmlparser` با آن مواجه شده است، و تنها زمانی مقادیر صحیح خواهند داشت که یک فراخوانی :meth:`Parse` یا :meth:`ParseFile` یک استثنا :exc:`xml.parsers.expat.ExpatError` را پرتاب کرده باشد." @@ -270,20 +265,20 @@ msgstr "شماره خط جاری در ورودی پارسر ." 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 taken from the following list, and *func* must be a callable object accepting the correct number of arguments. The arguments are all strings, unless otherwise stated." msgstr "در اینجا فهرستی از هندلرها که می‌توان آن‌ها را تنظیم کرد آمده است. برای تنظیم یک هندلر روی یک شیء :class:`xmlparser` به نام *o*، از ``o.handlername = func`` استفاده کنید. *handlername* باید از فهرست زیر انتخاب شود، و *func* باید یک شیء فراخوانی‌پذیر باشد که تعداد صحیح آرگومان‌ها را بپذیرد. همه آرگومان‌ها رشته هستند، مگر آنکه خلاف آن ذکر شده باشد." -msgid "Called when the XML declaration is parsed. The XML declaration is the (optional) declaration of the applicable version of the XML recommendation, the encoding of the document text, and an optional \"standalone\" declaration. *version* and *encoding* will be strings, and *standalone* will be ``1`` if the document is declared standalone, ``0`` if it is declared not to be standalone, or ``-1`` if the standalone clause was omitted." -msgstr "فراخوانی می‌شود وقتی اعلان XML تجزیه می‌شود. اعلان XML اعلانِ (اختیاری) نسخه‌ی قابل اعمال توصیه XML، کدگذاری متن سند، و یک اعلان \"standalone\" اختیاری است. *version* و *encoding* رشته‌ها خواهند بود، و *standalone* برابر با ``1`` خواهد بود اگر سند به صورت standalone اعلام شده باشد، ``0`` اگر اعلام شده باشد که standalone نیست، یا ``-1`` اگر بند standalone حذف شده باشد." +msgid "Called when the XML declaration is parsed. The XML declaration is the (optional) declaration of the applicable version of the XML recommendation, the encoding of the document text, and an optional \"standalone\" declaration. *version* and *encoding* will be strings, and *standalone* will be ``1`` if the document is declared standalone, ``0`` if it is declared not to be standalone, or ``-1`` if the standalone clause was omitted. This is only available with Expat version 1.95.0 or newer." +msgstr "هنگامی که اعلان XML تجزیه می‌شود فراخوانی می‌شود. اعلان XML عبارت است از اعلان (اختیاری) نسخه‌ی قابل‌اجرای توصیه‌نامه‌ی XML، کدگذاری متن سند، و یک اعلان «standalone» اختیاری. *version* و *encoding* رشته خواهند بود و اگر سند به صورت مستقل اعلام شده باشد *standalone* برابر با ``1``، اگر به صورت غیرمستقل اعلام شده باشد برابر با ``0``، و اگر بند مستقل حذف شده باشد برابر با ``-1`` خواهد بود. این ویژگی فقط با Expat نسخه‌ی 1.95.0 یا جدیدتر در دسترس است." -msgid "Called when Expat begins parsing the document type declaration (``, 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 10:08+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -570,8 +571,8 @@ msgstr "`A Concrete Introduction to Probability (using Python) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 08:02+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -48,8 +49,8 @@ msgstr "توجه داشته باشید که بیشتر عملیات عبارت msgid "The third-party :pypi:`regex` module, which has an API compatible with the standard library :mod:`!re` module, but offers additional functionality and a more thorough Unicode support." msgstr "ماژول شخص ثالث :pypi:`regex` که API سازگار با ماژول :mod:`!re` کتابخانه استاندارد دارد، اما قابلیت‌های بیشتر و پشتیبانی جامع‌تر از یونیکد ارائه می‌دهد." -msgid "Regular Expression Syntax" -msgstr "سینتکس عبارت باقاعده" +msgid "Regular expression syntax" +msgstr "نحو عبارت باقاعده" msgid "A regular expression (or RE) specifies a set of strings that matches it; the functions in this module let you check if a particular string matches a given regular expression (or if a given regular expression matches a particular string, which comes down to the same thing)." msgstr "یک عبارت باقاعده (یا RE) مجموعه‌ای از رشته‌ها را مشخص می‌کند که با آن مطابقت دارند؛ توابع این ماژول به شما امکان می‌دهند بررسی کنید که آیا یک رشته‌ی خاص با یک عبارت باقاعده‌ی داده‌شده مطابقت دارد (یا اینکه آیا یک عبارت باقاعده‌ی داده‌شده با یک رشته‌ی خاص مطابقت دارد، که در نهایت به یک معناست)." @@ -141,8 +142,8 @@ msgstr "باعث می‌شود عبارت باقاعده‌ی حاصل با *m* msgid "``{m,n}+``" msgstr "``{m,n}+``" -msgid "Causes the resulting RE to match from *m* to *n* repetitions of the preceding RE, attempting to match as many repetitions as possible *without* establishing any backtracking points. This is the possessive version of the quantifier above. For example, on the 6-character string ``'aaaaaa'``, ``a{3,5}+aa`` attempt to match 5 ``'a'`` characters, then, requiring 2 more ``'a'``\\ s, will need more characters than available and thus fail, while ``a{3,5}aa`` will match with ``a{3,5}`` capturing 5, then 4 ``'a'``\\ s by backtracking and then the final 2 ``'a'``\\ s are matched by the final ``aa`` in the pattern. ``x{m,n}+`` is equivalent to ``(?>x{m,n})``." -msgstr "باعث می‌شود عبارت باقاعده حاصل، از *m* تا *n* تکرار عبارت باقاعده پیشین را تطابق دهد و تلاش می‌کند تا بیشترین تعداد تکرار ممکن را *بدون* ایجاد هیچ نقطه‌ی پس‌گردی تطابق دهد. این نسخه‌ی تصاحبی (possessive) کمیت‌گذار بالا است. برای مثال، در رشته‌ی ۶ نویسه‌ای ``'aaaaaa'``، ``a{3,5}+aa`` تلاش می‌کند ۵ نویسه ``'a'`` را تطابق دهد، سپس چون به ۲ نویسه ``'a'`` دیگر نیاز دارد، به نویسه‌های بیشتری از آنچه در دسترس است نیاز پیدا می‌کند و در نتیجه شکست می‌خورد؛ در حالی که ``a{3,5}aa`` تطابق خواهد یافت، به‌طوری‌که ``a{3,5}`` ابتدا ۵ نویسه را می‌گیرد، سپس با پس‌گرد، ۴ نویسه ``'a'`` را می‌گیرد و در نهایت ۲ نویسه ``'a'`` پایانی توسط ``aa`` پایانی در الگو تطابق داده می‌شود. ``x{m,n}+`` معادل ``(?>x{m,n})`` است." +msgid "Causes the resulting RE to match from *m* to *n* repetitions of the preceding RE, attempting to match as many repetitions as possible *without* establishing any backtracking points. This is the possessive version of the quantifier above. For example, on the 6-character string ``'aaaaaa'``, ``a{3,5}+aa`` attempts to match 5 ``'a'`` characters, then, requiring 2 more ``'a'``\\ s, will need more characters than available and thus fail, while ``a{3,5}aa`` will match with ``a{3,5}`` capturing 5, then 4 ``'a'``\\ s by backtracking and then the final 2 ``'a'``\\ s are matched by the final ``aa`` in the pattern. ``x{m,n}+`` is equivalent to ``(?>x{m,n})``." +msgstr "سبب می‌شود عبارت باقاعده‌ی حاصل با *m* تا *n* بار تکرار عبارت باقاعده‌ی قبلی مطابقت پیدا کند، و تلاش می‌کند تا جایی که ممکن است تکرارها را *بدون* ایجاد هیچ نقطه‌ی بازگشتی‌ای (backtracking) مطابقت دهد. این نسخه‌ی انحصاری کمیت‌گذار بالا است. برای مثال، روی رشته‌ی ۶ نویسیه‌ای ``'aaaaaa'``، عبارت ``a{3,5}+aa`` تلاش می‌کند ۵ نویسه‌ی ``'a'`` را مطابقت دهد، سپس با نیاز به ۲ نویسه‌ی ``'a'`` دیگر، به نویسه‌های بیشتری نسبت به موجود نیاز خواهد داشت و در نتیجه شکست می‌خورد، در حالی که ``a{3,5}aa`` با مطابقت دادن ``a{3,5}`` که ۵ نویسه را در بر می‌گیرد مطابقت پیدا می‌کند، سپس با بازگشت (backtracking) ۴ نویسه‌ی ``'a'`` و در نهایت ۲ نویسه‌ی ``'a'`` پایانی توسط ``aa`` پایانی در الگو مطابقت داده می‌شوند. عبارت ``x{m,n}+`` معادل ``(?>x{m,n})`` است." msgid "``\\``" msgstr "``\\``" @@ -507,8 +508,8 @@ msgstr "خنثی‌سازی‌های ناشناخته‌ای که از ``'\\'`` msgid "The :samp:`'\\\\N\\\\{{name}\\\\}'` escape sequence has been added. As in string literals, it expands to the named Unicode character (e.g. ``'\\N{EM DASH}'``)." msgstr "دنباله خنثی‌سازی :samp:`'\\\\N\\\\{{name}\\\\}'` افزوده شده است. همانند مقادیر لفظی رشته، این دنباله به نویسه یونیکد با نام مشخص بسط می‌یابد (برای مثال ``'\\N{EM DASH}'``)." -msgid "Module Contents" -msgstr "محتوای ماژول" +msgid "Module contents" +msgstr "محتویات ماژول" msgid "The module defines several functions, constants, and an exception. Some of the functions are simplified versions of the full featured methods for compiled regular expressions. Most non-trivial applications always use the compiled form." msgstr "این ماژول چندین تابع، چند ثابت و یک استثنا را تعریف می‌کند. برخی از توابع، نسخه‌های ساده‌شده‌ای از متدهای دارای امکانات کامل برای عبارات باقاعده‌ی کامپایل‌شده هستند. بیشتر برنامه‌های غیربدیهی همیشه از شکل کامپایل‌شده استفاده می‌کنند." @@ -574,11 +575,11 @@ msgid "Indicates no flag being applied, the value is ``0``. This flag may be us msgstr "نشان می‌دهد که هیچ پرچمی اعمال‌نشده است؛ مقدار آن ``0`` است. این پرچم می‌تواند به‌عنوان مقدار پیش‌فرض برای یک آرگومان کلیدواژه‌ای تابع یا به‌عنوان مقدار پایه‌ای که به‌صورت شرطی با پرچم‌های دیگر OR می‌شود، استفاده شود. نمونه‌ای از استفاده به‌عنوان مقدار پیش‌فرض::" msgid "" -"def myfunc(text, flag=re.NOFLAG):\n" -" return re.match(text, flag)" +"def myfunc(pattern, text, flag=re.NOFLAG):\n" +" return re.search(pattern, text, flag)" msgstr "" -"def myfunc(text, flag=re.NOFLAG):\n" -" return re.match(text, flag)" +"def myfunc(pattern, text, flag=re.NOFLAG):\n" +" return re.search(pattern, text, flag)" msgid "Make the ``'.'`` special character match any character at all, including a newline; without this flag, ``'.'`` will match anything *except* a newline." msgstr "باعث می‌شود نویسه ویژه ``'.'`` با هر نویسه‌ای، از جمله خط جدید، مطابقت کند؛ بدون این پرچم، ``'.'`` با هر چیزی *به‌جز* خط جدید مطابقت می‌کند." @@ -615,8 +616,8 @@ msgstr "متناظر با پرچم درون‌خطی ``(?x)`` است." msgid "Functions" msgstr "توابع" -msgid "Compile a regular expression pattern into a :ref:`regular expression object `, which can be used for matching using its :func:`~Pattern.match`, :func:`~Pattern.search` and other methods, described below." -msgstr "یک الگوی عبارت باقاعده را به یک :ref:`شیء عبارت باقاعده ` کامپایل می‌کند، که می‌توان از آن برای تطبیق با استفاده از متدهای :func:`~Pattern.match`، :func:`~Pattern.search` و سایر متدهای آن، که در ادامه توضیح داده شده‌اند، استفاده کرد." +msgid "Compile a regular expression pattern into a :ref:`regular expression object `, which can be used for matching using its :func:`~Pattern.prefixmatch`, :func:`~Pattern.search`, and other methods, described below." +msgstr "یک الگوی عبارت باقاعده را به یک :ref:`شیء عبارت باقاعده ` کامپایل می‌کند که می‌توان از آن برای تطبیق با استفاده از :func:`~Pattern.prefixmatch`، :func:`~Pattern.search` و سایر متدهای آن، که در ادامه توصیف شده‌اند، استفاده کرد." msgid "The expression's behaviour can be modified by specifying a *flags* value. Values can be any of the `flags`_ variables, combined using bitwise OR (the ``|`` operator)." msgstr "رفتار عبارت را می‌توان با تعیین یک مقدار *flags* تغییر داد. مقادیر می‌توانند هر یک از متغیرهای `flags`_ باشند و با استفاده از OR بیتی (عملگر ``|``) ترکیب شوند." @@ -626,16 +627,16 @@ msgstr "دنباله ::" msgid "" "prog = re.compile(pattern)\n" -"result = prog.match(string)" +"result = prog.search(string)" msgstr "" "prog = re.compile(pattern)\n" -"result = prog.match(string)" +"result = prog.search(string)" msgid "is equivalent to ::" msgstr "معادل است با ::" -msgid "result = re.match(pattern, string)" -msgstr "result = re.match(pattern, string)" +msgid "result = re.search(pattern, string)" +msgstr "result = re.search(pattern, string)" msgid "but using :func:`re.compile` and saving the resulting regular expression object for reuse is more efficient when the expression will be used several times in a single program." msgstr "اما استفاده از :func:`re.compile` و ذخیره‌ی شیء عبارت باقاعده‌ی حاصل برای استفاده‌ی مجدد، زمانی که عبارت چندین بار در یک برنامه واحد استفاده شود، کارآمدتر است." @@ -649,12 +650,18 @@ msgstr "*string* را پیمایش می‌کند تا نخستین مکانی ر msgid "If zero or more characters at the beginning of *string* match the regular expression *pattern*, return a corresponding :class:`~re.Match`. Return ``None`` if the string does not match the pattern; note that this is different from a zero-length match." msgstr "اگر صفر یا چند نویسه در ابتدای *string* با عبارت باقاعده‌ی *pattern* تطابق داشته باشند، یک :class:`~re.Match` متناظر برمی‌گرداند. اگر رشته با الگو تطابق نداشته باشد، ``None`` برمی‌گرداند؛ توجه داشته باشید که این با یک تطابق با طول صفر متفاوت است." -msgid "Note that even in :const:`MULTILINE` mode, :func:`re.match` will only match at the beginning of the string and not at the beginning of each line." -msgstr "توجه داشته باشید که حتی در حالت :const:`MULTILINE`، :func:`re.match` فقط در ابتدای رشته تطابق پیدا می‌کند و نه در ابتدای هر سطر." +msgid "Even in :const:`MULTILINE` mode, this will only match at the beginning of the string and not at the beginning of each line." +msgstr "حتی در حالت :const:`MULTILINE`، این مورد فقط در ابتدای رشته مطابقت پیدا می‌کند و نه در ابتدای هر سطر." msgid "If you want to locate a match anywhere in *string*, use :func:`search` instead (see also :ref:`search-vs-match`)." msgstr "اگر می‌خواهید یک تطابق را در هر جای *string* پیدا کنید، در عوض از :func:`search` استفاده کنید (همچنین :ref:`search-vs-match` را ببینید)." +msgid "This function now has two names and has long been known as :func:`~re.match`. Use that name when you need to retain compatibility with older Python versions." +msgstr "این تابع اکنون دو نام دارد و مدت‌هاست با نام :func:`~re.match` شناخته می‌شود. هنگامی که نیاز دارید سازگاری با نسخه‌های قدیمی‌تر پایتون را حفظ کنید، از آن نام استفاده کنید." + +msgid ":func:`~re.match` has been :term:`soft deprecated` in favor of the alternate :func:`~re.prefixmatch` name of this API which is more explicitly descriptive. Use it to better express intent. The norm in other languages and regular expression implementations is to use the term *match* to refer to the behavior of what Python has always called :func:`~re.search`. See :ref:`prefixmatch-vs-match`." +msgstr "تابع :func:`~re.match` به نفع نام جایگزین :func:`~re.prefixmatch` از این API که توصیف صریح‌تری دارد، به صورت :term:`منسوخ نرم ` درآمده است. از آن برای بیان بهتر مقصود استفاده کنید. هنجار در سایر زبان‌ها و پیاده‌سازی‌های عبارت باقاعده این است که از اصطلاح *match* برای ارجاع به رفتاری استفاده شود که پایتون همواره آن را :func:`~re.search` نامیده است. نگاه کنید به :ref:`prefixmatch-vs-match`." + msgid "If the whole *string* matches the regular expression *pattern*, return a corresponding :class:`~re.Match`. Return ``None`` if the string does not match the pattern; note that this is different from a zero-length match." msgstr "اگر کل *string* با عبارت باقاعده *pattern* تطابق داشته باشد، یک :class:`~re.Match` متناظر برمی‌گرداند. اگر رشته با الگو تطابق نداشته باشد، ``None`` برمی‌گرداند؛ توجه داشته باشید که این با تطابق با طول صفر متفاوت است." @@ -874,8 +881,8 @@ msgstr "ویژگی‌های بیشتری اضافه شد." msgid "``PatternError`` was originally named ``error``; the latter is kept as an alias for backward compatibility." msgstr "``PatternError`` در ابتدا با نام ``error`` نام‌گذاری شده بود؛ این نام برای سازگاری با نسخه‌های پیشین به‌عنوان یک نام مستعار حفظ شده است." -msgid "Regular Expression Objects" -msgstr "اشیای عبارت باقاعده" +msgid "Regular expression objects" +msgstr "اشیاء عبارت باقاعده" msgid "Compiled regular expression object returned by :func:`re.compile`." msgstr "شیء عبارت باقاعده‌ی کامپایل‌شده که توسط :func:`re.compile` بازگردانده می‌شود." @@ -909,23 +916,32 @@ msgstr "" msgid "If zero or more characters at the *beginning* of *string* match 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 "اگر این عبارت باقاعده با صفر یا چند نویسه در *ابتدای* *رشته* تطابق داشته باشد، یک :class:`~re.Match` متناظر برمی‌گرداند. اگر رشته با الگو تطابق نداشته باشد، ``None`` برمی‌گرداند؛ توجه داشته باشید که این با یک تطابق با طول صفر متفاوت است." +msgid "Note that even in :const:`MULTILINE` mode, this will only match at the beginning of the string and not at the beginning of each line." +msgstr "توجه داشته باشید که حتی در حالت :const:`MULTILINE`، این مورد فقط در ابتدای رشته مطابقت پیدا می‌کند و نه در ابتدای هر سطر." + msgid "The optional *pos* and *endpos* parameters have the same meaning as for the :meth:`~Pattern.search` method. ::" msgstr "پارامترهای اختیاری *pos* و *endpos* همان معنایی را دارند که برای متد :meth:`~Pattern.search` دارند. ::" msgid "" ">>> pattern = re.compile(\"o\")\n" -">>> pattern.match(\"dog\") # No match as \"o\" is not at the start of \"dog\".\n" -">>> pattern.match(\"dog\", 1) # Match as \"o\" is the 2nd character of \"dog\".\n" +">>> pattern.prefixmatch(\"dog\") # No match as \"o\" is not at the start of \"dog\".\n" +">>> pattern.prefixmatch(\"dog\", 1) # Match as \"o\" is the 2nd character of \"dog\".\n" "" msgstr "" ">>> pattern = re.compile(\"o\")\n" -">>> pattern.match(\"dog\") # No match as \"o\" is not at the start of \"dog\".\n" -">>> pattern.match(\"dog\", 1) # Match as \"o\" is the 2nd character of \"dog\".\n" +">>> pattern.prefixmatch(\"dog\") # No match as \"o\" is not at the start of \"dog\".\n" +">>> pattern.prefixmatch(\"dog\", 1) # Match as \"o\" is the 2nd character of \"dog\".\n" "" msgid "If you want to locate a match anywhere in *string*, use :meth:`~Pattern.search` instead (see also :ref:`search-vs-match`)." msgstr "اگر می‌خواهید تطابقی را در هر جای *string* بیابید، در عوض از :meth:`~Pattern.search` استفاده کنید (همچنین :ref:`search-vs-match` را ببینید)." +msgid "This method now has two names and has long been known as :meth:`~Pattern.match`. Use that name when you need to retain compatibility with older Python versions." +msgstr "این متد اکنون دو نام دارد و مدت‌هاست با نام :meth:`~Pattern.match` شناخته می‌شود. هنگامی که نیاز دارید سازگاری با نسخه‌های قدیمی‌تر پایتون را حفظ کنید، از آن نام استفاده کنید." + +msgid ":meth:`~Pattern.match` has been :term:`soft deprecated` in favor of the alternate :meth:`~Pattern.prefixmatch` name of this API which is more explicitly descriptive. Use it to better express intent. The norm in other languages and regular expression implementations is to use the term *match* to refer to the behavior of what Python has always called :meth:`~Pattern.search`. See :ref:`prefixmatch-vs-match`." +msgstr "متد :meth:`~Pattern.match` به نفع نام جایگزین :meth:`~Pattern.prefixmatch` از این API که توصیف صریح‌تری دارد، به صورت :term:`منسوخ نرم ` درآمده است. از آن برای بیان بهتر مقصود استفاده کنید. هنجار در سایر زبان‌ها و پیاده‌سازی‌های عبارت باقاعده این است که از اصطلاح *match* برای ارجاع به رفتاری استفاده شود که پایتون همواره آن را :meth:`~Pattern.search` نامیده است. نگاه کنید به :ref:`prefixmatch-vs-match`." + 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 "اگر کل *رشته* با این عبارت باقاعده تطابق داشته باشد، یک :class:`~re.Match` متناظر برمی‌گرداند. اگر رشته با الگو تطابق نداشته باشد، ``None`` برمی‌گرداند؛ توجه داشته باشید که این با یک تطابق با طول صفر متفاوت است." @@ -972,19 +988,17 @@ msgstr "رشته‌ی الگویی که شیء الگو از آن کامپایل msgid "Added support of :func:`copy.copy` and :func:`copy.deepcopy`. Compiled regular expression objects are considered atomic." msgstr "پشتیبانی از :func:`copy.copy` و :func:`copy.deepcopy` افزوده شد. اشیای عبارت باقاعده‌ی کامپایل‌شده، اتمی در نظر گرفته می‌شوند." -msgid "Match Objects" -msgstr "اشیای تطبیق (Match Objects)" +msgid "Match objects" +msgstr "اشیاء تطبیق" 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 "اشیای Match همیشه مقدار بولی ``True`` دارند. از آن‌جا که :meth:`~Pattern.match` و :meth:`~Pattern.search` وقتی هیچ تطبیقی وجود نداشته باشد ``None`` برمی‌گردانند، می‌توانید با یک دستور ``if`` ساده بررسی کنید که آیا تطبیقی وجود داشته است::" msgid "" -"match = re.search(pattern, string)\n" -"if match:\n" +"if match := re.search(pattern, string):\n" " process(match)" msgstr "" -"match = re.search(pattern, string)\n" -"if match:\n" +"if match := re.search(pattern, string):\n" " process(match)" msgid "Match object returned by successful ``match``\\ es and ``search``\\ es." @@ -1003,25 +1017,25 @@ msgid "Returns one or more subgroups of the match. If there is a single argumen msgstr "یک یا چند زیرگروه از تطابق را برمی‌گرداند. اگر تنها یک آرگومان وجود داشته باشد، نتیجه یک رشته‌ی تنها است؛ اگر چند آرگومان وجود داشته باشد، نتیجه یک تاپل با یک آیتم به‌ازای هر آرگومان است. بدون آرگومان، *group1* به‌طور پیش‌فرض ۰ است (کل تطابق برگردانده می‌شود). اگر آرگومان *groupN* برابر ۰ باشد، مقدار بازگشتی متناظر، کل رشته‌ی مطابق‌شده است؛ اگر یک عدد صحیح مثبت باشد، رشته‌ای است که با گروه پرانتزدار متناظر مطابقت دارد. اگر شماره‌ی گروه منفی یا بزرگ‌تر از تعداد گروه‌های تعریف‌شده در الگو باشد، استثنای :exc:`IndexError` پرتاب می‌شود. اگر گروهی در بخشی از الگو قرار داشته باشد که تطابق نداشته است، نتیجه‌ی متناظر ``None`` است. اگر گروهی در بخشی از الگو قرار داشته باشد که چند بار تطابق یافته است، آخرین تطابق برگردانده می‌شود. ::" msgid "" -">>> m = re.match(r\"(\\w+) (\\w+)\", \"Isaac Newton, physicist\")\n" +">>> m = re.search(r\"\\A(\\w+) (\\w+)\", \"Norwegian Blue, pining for the fjords\")\n" ">>> m.group(0) # The entire match\n" -"'Isaac Newton'\n" +"'Norwegian Blue'\n" ">>> m.group(1) # The first parenthesized subgroup.\n" -"'Isaac'\n" +"'Norwegian'\n" ">>> m.group(2) # The second parenthesized subgroup.\n" -"'Newton'\n" +"'Blue'\n" ">>> m.group(1, 2) # Multiple arguments give us a tuple.\n" -"('Isaac', 'Newton')" +"('Norwegian', 'Blue')" msgstr "" -">>> m = re.match(r\"(\\w+) (\\w+)\", \"Isaac Newton, physicist\")\n" -">>> m.group(0) # The entire match\n" -"'Isaac Newton'\n" -">>> m.group(1) # The first parenthesized subgroup.\n" -"'Isaac'\n" -">>> m.group(2) # The second parenthesized subgroup.\n" -"'Newton'\n" -">>> m.group(1, 2) # Multiple arguments give us a tuple.\n" -"('Isaac', 'Newton')" +">>> m = re.search(r\"\\A(\\w+) (\\w+)\", \"Norwegian Blue, pining for the fjords\")\n" +">>> m.group(0) # تمام تطابق\n" +"'Norwegian Blue'\n" +">>> m.group(1) # اولین زیرگروه پرانتزدار.\n" +"'Norwegian'\n" +">>> m.group(2) # دومین زیرگروه پرانتزدار.\n" +"'Blue'\n" +">>> m.group(1, 2) # چندین آرگومان یک تاپل به ما می‌دهند.\n" +"('Norwegian', 'Blue')" msgid "If the regular expression uses the ``(?P...)`` syntax, the *groupN* arguments may also be strings identifying groups by their group name. If a string argument is not used as a group name in the pattern, an :exc:`IndexError` exception is raised." msgstr "اگر عبارت باقاعده از سینتکس ``(?P...)`` استفاده کند، آرگومان‌های *groupN* همچنین می‌توانند رشته‌هایی باشند که گروه‌ها را با نام گروه آن‌ها شناسایی می‌کنند. اگر یک آرگومان رشته‌ای به‌عنوان نام گروه در الگو استفاده نشود، یک استثنای :exc:`IndexError` پرتاب می‌شود." @@ -1030,79 +1044,79 @@ msgid "A moderately complicated example::" msgstr "یک مثال نسبتاً پیچیده::" msgid "" -">>> m = re.match(r\"(?P\\w+) (?P\\w+)\", \"Malcolm Reynolds\")\n" -">>> m.group('first_name')\n" -"'Malcolm'\n" -">>> m.group('last_name')\n" -"'Reynolds'" +">>> m = re.search(r\"(?P\\w+) (?P\\w+)\", \"killer rabbit\")\n" +">>> m.group('adjective')\n" +"'killer'\n" +">>> m.group('animal')\n" +"'rabbit'" msgstr "" -">>> m = re.match(r\"(?P\\w+) (?P\\w+)\", \"Malcolm Reynolds\")\n" -">>> m.group('first_name')\n" -"'Malcolm'\n" -">>> m.group('last_name')\n" -"'Reynolds'" +">>> m = re.search(r\"(?P\\w+) (?P\\w+)\", \"killer rabbit\")\n" +">>> m.group('adjective')\n" +"'killer'\n" +">>> m.group('animal')\n" +"'rabbit'" msgid "Named groups can also be referred to by their index::" msgstr "همچنین می‌توان به گروه‌های نام‌دار از طریق اندیس آن‌ها ارجاع داد::" msgid "" ">>> m.group(1)\n" -"'Malcolm'\n" +"'killer'\n" ">>> m.group(2)\n" -"'Reynolds'" +"'rabbit'" msgstr "" ">>> m.group(1)\n" -"'Malcolm'\n" +"'killer'\n" ">>> m.group(2)\n" -"'Reynolds'" +"'rabbit'" msgid "If a group matches multiple times, only the last match is accessible::" msgstr "اگر یک گروه چندین بار تطابق داشته باشد، تنها آخرین تطابق قابل دسترسی است::" msgid "" -">>> m = re.match(r\"(..)+\", \"a1b2c3\") # Matches 3 times.\n" -">>> m.group(1) # Returns only the last match.\n" +">>> m = re.search(r\"(..)+\", \"a1b2c3\") # Matches 3 times.\n" +">>> m.group(1) # Returns only the last match.\n" "'c3'" msgstr "" -">>> m = re.match(r\"(..)+\", \"a1b2c3\") # Matches 3 times.\n" -">>> m.group(1) # Returns only the last match.\n" +">>> m = re.search(r\"(..)+\", \"a1b2c3\") # ۳ بار تطابق پیدا می‌کند.\n" +">>> m.group(1) # فقط آخرین تطابق را برمی‌گرداند.\n" "'c3'" msgid "This is identical to ``m.group(g)``. This allows easier access to an individual group from a match::" msgstr "این دقیقاً معادل ``m.group(g)`` است. این کار دسترسی به یک گروه منفرد از یک تطبیق را آسان‌تر می‌کند::" msgid "" -">>> m = re.match(r\"(\\w+) (\\w+)\", \"Isaac Newton, physicist\")\n" +">>> m = re.search(r\"(\\w+) (\\w+)\", \"Norwegian Blue, pining for the fjords\")\n" ">>> m[0] # The entire match\n" -"'Isaac Newton'\n" +"'Norwegian Blue'\n" ">>> m[1] # The first parenthesized subgroup.\n" -"'Isaac'\n" +"'Norwegian'\n" ">>> m[2] # The second parenthesized subgroup.\n" -"'Newton'" +"'Blue'" msgstr "" -">>> m = re.match(r\"(\\w+) (\\w+)\", \"Isaac Newton, physicist\")\n" -">>> m[0] # The entire match\n" -"'Isaac Newton'\n" -">>> m[1] # The first parenthesized subgroup.\n" -"'Isaac'\n" -">>> m[2] # The second parenthesized subgroup.\n" -"'Newton'" +">>> m = re.search(r\"(\\w+) (\\w+)\", \"Norwegian Blue, pining for the fjords\")\n" +">>> m[0] # تمام تطابق\n" +"'Norwegian Blue'\n" +">>> m[1] # اولین زیرگروه پرانتزدار.\n" +"'Norwegian'\n" +">>> m[2] # دومین زیرگروه پرانتزدار.\n" +"'Blue'" msgid "Named groups are supported as well::" msgstr "گروه‌های نام‌گذاری‌شده نیز پشتیبانی می‌شوند::" msgid "" -">>> m = re.match(r\"(?P\\w+) (?P\\w+)\", \"Isaac Newton\")\n" -">>> m['first_name']\n" -"'Isaac'\n" -">>> m['last_name']\n" -"'Newton'" +">>> m = re.search(r\"(?P\\w+) (?P\\w+)\", \"killer rabbit\")\n" +">>> m['adjective']\n" +"'killer'\n" +">>> m['animal']\n" +"'rabbit'" msgstr "" -">>> m = re.match(r\"(?P\\w+) (?P\\w+)\", \"Isaac Newton\")\n" -">>> m['first_name']\n" -"'Isaac'\n" -">>> m['last_name']\n" -"'Newton'" +">>> m = re.search(r\"(?P\\w+) (?P\\w+)\", \"killer rabbit\")\n" +">>> m['adjective']\n" +"'killer'\n" +">>> m['animal']\n" +"'rabbit'" 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 "یک تاپل حاوی تمام زیرگروه‌های تطابق، از ۱ تا هر تعداد گروهی که در الگو وجود دارد، برمی‌گرداند. آرگومان *default* برای گروه‌هایی استفاده می‌شود که در تطابق شرکت نکرده‌اند؛ مقدار پیش‌فرض آن ``None`` است." @@ -1111,11 +1125,11 @@ msgid "For example::" msgstr "برای مثال::" msgid "" -">>> m = re.match(r\"(\\d+)\\.(\\d+)\", \"24.1632\")\n" +">>> m = re.search(r\"(\\d+)\\.(\\d+)\", \"24.1632\")\n" ">>> m.groups()\n" "('24', '1632')" msgstr "" -">>> m = re.match(r\"(\\d+)\\.(\\d+)\", \"24.1632\")\n" +">>> m = re.search(r\"(\\d+)\\.(\\d+)\", \"24.1632\")\n" ">>> m.groups()\n" "('24', '1632')" @@ -1123,29 +1137,29 @@ msgid "If we make the decimal place and everything after it optional, not all gr msgstr "اگر نقطه اعشار و همه چیز پس از آن را اختیاری کنیم، ممکن است همه گروه‌ها در تطبیق شرکت نکنند. مقدار پیش‌فرض این گروه‌ها ``None`` خواهد بود، مگر اینکه آرگومان *default* داده شده باشد::" msgid "" -">>> m = re.match(r\"(\\d+)\\.?(\\d+)?\", \"24\")\n" +">>> m = re.search(r\"(\\d+)\\.?(\\d+)?\", \"24\")\n" ">>> m.groups() # Second group defaults to None.\n" "('24', None)\n" ">>> m.groups('0') # Now, the second group defaults to '0'.\n" "('24', '0')" msgstr "" -">>> m = re.match(r\"(\\d+)\\.?(\\d+)?\", \"24\")\n" -">>> m.groups() # Second group defaults to None.\n" +">>> m = re.search(r\"(\\d+)\\.?(\\d+)?\", \"24\")\n" +">>> m.groups() # گروه دوم به طور پیش‌فرض None است.\n" "('24', None)\n" -">>> m.groups('0') # Now, the second group defaults to '0'.\n" +">>> m.groups('0') # اکنون، گروه دوم به طور پیش‌فرض '0' است.\n" "('24', '0')" 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 "یک دیکشنری شامل تمام زیرگروه‌های *نام‌دار* تطبیق برمی‌گرداند که کلیدهای آن نام زیرگروه‌ها هستند. آرگومان *default* برای گروه‌هایی استفاده می‌شود که در تطبیق شرکت نکرده‌اند؛ مقدار پیش‌فرض آن ``None`` است. برای مثال::" msgid "" -">>> m = re.match(r\"(?P\\w+) (?P\\w+)\", \"Malcolm Reynolds\")\n" +">>> m = re.search(r\"(?P\\w+) (?P\\w+)\", \"killer rabbit\")\n" ">>> m.groupdict()\n" -"{'first_name': 'Malcolm', 'last_name': 'Reynolds'}" +"{'adjective': 'killer', 'animal': 'rabbit'}" msgstr "" -">>> m = re.match(r\"(?P\\w+) (?P\\w+)\", \"Malcolm Reynolds\")\n" +">>> m = re.search(r\"(?P\\w+) (?P\\w+)\", \"killer rabbit\")\n" ">>> m.groupdict()\n" -"{'first_name': 'Malcolm', 'last_name': 'Reynolds'}" +"{'adjective': 'killer', 'animal': 'rabbit'}" 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 ``-1`` if *group* exists but did not contribute to the match. For a match object *m*, and a group *g* that did contribute to the match, the substring matched by group *g* (equivalent to ``m.group(g)``) is ::" msgstr "اندیس‌های آغاز و پایان زیررشته‌ی تطبیق‌یافته با *group* را برمی‌گرداند؛ *group* به‌طور پیش‌فرض ۰ است (به معنای کل زیررشته‌ی تطبیق‌یافته). اگر *group* وجود داشته باشد اما در تطبیق مشارکت نکرده باشد، ``-1`` را برمی‌گرداند. برای یک شیء تطبیق *m*، و گروه *g* که در تطبیق مشارکت داشته باشد، زیررشته‌ی تطبیق‌یافته با گروه *g* (معادل ``m.group(g)``) عبارت است از ::" @@ -1194,10 +1208,10 @@ msgstr "رشته‌ی ارسال‌شده به :meth:`~Pattern.match` یا :meth msgid "Added support of :func:`copy.copy` and :func:`copy.deepcopy`. Match objects are considered atomic." msgstr "پشتیبانی از :func:`copy.copy` و :func:`copy.deepcopy` افزوده شد. اشیای Match اتمی در نظر گرفته می‌شوند." -msgid "Regular Expression Examples" +msgid "Regular expression examples" msgstr "نمونه‌های عبارت باقاعده" -msgid "Checking for a Pair" +msgid "Checking for a pair" msgstr "بررسی برای یک جفت" msgid "In this example, we'll use the following helper function to display match objects a little more gracefully::" @@ -1221,70 +1235,70 @@ msgid "To see if a given string is a valid hand, one could do the following::" msgstr "برای بررسی اینکه آیا یک رشته‌ی داده‌شده یک دست معتبر است، می‌توانید کار زیر را انجام دهید::" msgid "" -">>> valid = re.compile(r\"^[a2-9tjqk]{5}$\")\n" -">>> displaymatch(valid.match(\"akt5q\")) # Valid.\n" +">>> valid_hand_re = re.compile(r\"^[a2-9tjqk]{5}$\")\n" +">>> displaymatch(valid_hand_re.search(\"akt5q\")) # Valid.\n" "\"\"\n" -">>> displaymatch(valid.match(\"akt5e\")) # Invalid.\n" -">>> displaymatch(valid.match(\"akt\")) # Invalid.\n" -">>> displaymatch(valid.match(\"727ak\")) # Valid.\n" +">>> displaymatch(valid_hand_re.search(\"akt5e\")) # Invalid.\n" +">>> displaymatch(valid_hand_re.search(\"akt\")) # Invalid.\n" +">>> displaymatch(valid_hand_re.search(\"727ak\")) # Valid.\n" "\"\"" msgstr "" -">>> valid = re.compile(r\"^[a2-9tjqk]{5}$\")\n" -">>> displaymatch(valid.match(\"akt5q\")) # Valid.\n" +">>> valid_hand_re = re.compile(r\"^[a2-9tjqk]{5}$\")\n" +">>> displaymatch(valid_hand_re.search(\"akt5q\")) # معتبر.\n" "\"\"\n" -">>> displaymatch(valid.match(\"akt5e\")) # Invalid.\n" -">>> displaymatch(valid.match(\"akt\")) # Invalid.\n" -">>> displaymatch(valid.match(\"727ak\")) # Valid.\n" +">>> displaymatch(valid_hand_re.search(\"akt5e\")) # نامعتبر.\n" +">>> displaymatch(valid_hand_re.search(\"akt\")) # نامعتبر.\n" +">>> displaymatch(valid_hand_re.search(\"727ak\")) # معتبر.\n" "\"\"" 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 "آن دست آخر، ``\"727ak\"``، شامل یک جفت، یا دو کارت با ارزش یکسان بود. برای تطبیق این موضوع با یک عبارت باقاعده، می‌توان از بازارجاع‌ها (backreferences) به این شکل استفاده کرد::" msgid "" -">>> pair = re.compile(r\".*(.).*\\1\")\n" -">>> displaymatch(pair.match(\"717ak\")) # Pair of 7s.\n" +">>> pair_re = re.compile(r\".*(.).*\\1\")\n" +">>> displaymatch(pair_re.prefixmatch(\"717ak\")) # Pair of 7s.\n" "\"\"\n" -">>> displaymatch(pair.match(\"718ak\")) # No pairs.\n" -">>> displaymatch(pair.match(\"354aa\")) # Pair of aces.\n" +">>> displaymatch(pair_re.prefixmatch(\"718ak\")) # No pairs.\n" +">>> displaymatch(pair_re.prefixmatch(\"354aa\")) # Pair of aces.\n" "\"\"" msgstr "" -">>> pair = re.compile(r\".*(.).*\\1\")\n" -">>> displaymatch(pair.match(\"717ak\")) # Pair of 7s.\n" +">>> pair_re = re.compile(r\".*(.).*\\1\")\n" +">>> displaymatch(pair_re.prefixmatch(\"717ak\")) # جفت از ۷ها.\n" "\"\"\n" -">>> displaymatch(pair.match(\"718ak\")) # No pairs.\n" -">>> displaymatch(pair.match(\"354aa\")) # Pair of aces.\n" +">>> displaymatch(pair_re.prefixmatch(\"718ak\")) # بدون جفت.\n" +">>> displaymatch(pair_re.prefixmatch(\"354aa\")) # جفت از آس‌ها.\n" "\"\"" 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 "برای فهمیدن این که یک جفت از چه کارتی تشکیل شده است، می‌توانید از متد :meth:`~Match.group` شیء تطابق به شکل زیر استفاده کنید::" msgid "" -">>> pair = re.compile(r\".*(.).*\\1\")\n" -">>> pair.match(\"717ak\").group(1)\n" +">>> pair_re = re.compile(r\".*(.).*\\1\")\n" +">>> pair_re.prefixmatch(\"717ak\").group(1)\n" "'7'\n" "\n" -"# Error because re.match() returns None, which doesn't have a group() method:\n" -">>> pair.match(\"718ak\").group(1)\n" +"# Error because prefixmatch() returns None, which doesn't have a group() method:\n" +">>> pair_re.prefixmatch(\"718ak\").group(1)\n" "Traceback (most recent call last):\n" " File \"\", line 1, in \n" -" re.match(r\".*(.).*\\1\", \"718ak\").group(1)\n" +" pair_re.prefixmatch(\"718ak\").group(1)\n" "AttributeError: 'NoneType' object has no attribute 'group'\n" "\n" -">>> pair.match(\"354aa\").group(1)\n" +">>> pair_re.prefixmatch(\"354aa\").group(1)\n" "'a'" msgstr "" -">>> pair = re.compile(r\".*(.).*\\1\")\n" -">>> pair.match(\"717ak\").group(1)\n" +">>> pair_re = re.compile(r\".*(.).*\\1\")\n" +">>> pair_re.prefixmatch(\"717ak\").group(1)\n" "'7'\n" "\n" -"# Error because re.match() returns None, which doesn't have a group() method:\n" -">>> pair.match(\"718ak\").group(1)\n" +"# خطا به این دلیل که prefixmatch() مقدار None را برمی‌گرداند که متد group() را ندارد:\n" +">>> pair_re.prefixmatch(\"718ak\").group(1)\n" "Traceback (most recent call last):\n" " File \"\", line 1, in \n" -" re.match(r\".*(.).*\\1\", \"718ak\").group(1)\n" +" pair_re.prefixmatch(\"718ak\").group(1)\n" "AttributeError: 'NoneType' object has no attribute 'group'\n" "\n" -">>> pair.match(\"354aa\").group(1)\n" +">>> pair_re.prefixmatch(\"354aa\").group(1)\n" "'a'" msgid "Simulating scanf()" @@ -1350,32 +1364,32 @@ msgstr "``%x``، ``%X``" msgid "``[-+]?(0[xX])?[\\dA-Fa-f]+``" msgstr "``[-+]?(0[xX])?[\\dA-Fa-f]+``" -msgid "To extract the filename and numbers from a string like ::" -msgstr "برای استخراج نام پرونده و اعداد از رشته‌ای مانند ::" +msgid "To extract the filename and numbers from a string like:" +msgstr "برای استخراج نام پرونده و اعداد از یک رشته مانند:" msgid "/usr/sbin/sendmail - 0 errors, 4 warnings" msgstr "/usr/sbin/sendmail - 0 errors, 4 warnings" -msgid "you would use a :c:func:`!scanf` format like ::" -msgstr "از یک قالب :c:func:`!scanf` مانند زیر استفاده می‌کنید ::" +msgid "you would use a :c:func:`!scanf` format like:" +msgstr "می‌توانید از قالب :c:func:`!scanf` مانند زیر استفاده کنید:" msgid "%s - %d errors, %d warnings" msgstr "%s - %d errors, %d warnings" -msgid "The equivalent regular expression would be ::" -msgstr "عبارت باقاعده معادل به این صورت خواهد بود ::" +msgid "The equivalent regular expression would be:" +msgstr "عبارت باقاعده‌ی معادل به شکل زیر خواهد بود:" msgid "(\\S+) - (\\d+) errors, (\\d+) warnings" msgstr "(\\S+) - (\\d+) errors, (\\d+) warnings" -msgid "search() vs. match()" -msgstr "search() در مقابل match()" +msgid "search() vs. prefixmatch()" +msgstr "تابع search() در برابر prefixmatch()" msgid "Python offers different primitive operations based on regular expressions:" msgstr "پایتون عملیات‌های اولیه‌ی مختلفی را بر پایه‌ی عبارات باقاعده ارائه می‌دهد:" -msgid ":func:`re.match` checks for a match only at the beginning of the string" -msgstr ":func:`re.match` وجود تطابق را فقط در ابتدای رشته بررسی می‌کند" +msgid ":func:`re.prefixmatch` checks for a match only at the beginning of the string" +msgstr ":func:`re.prefixmatch` وجود تطابق را تنها در ابتدای رشته بررسی می‌کند" msgid ":func:`re.search` checks for a match anywhere in the string (this is what Perl does by default)" msgstr ":func:`re.search` وجود تطابق در هر جای رشته را بررسی می‌کند (Perl به‌طور پیش‌فرض همین کار را انجام می‌دهد)." @@ -1384,47 +1398,68 @@ msgid ":func:`re.fullmatch` checks for entire string to be a match" msgstr ":func:`re.fullmatch` بررسی می‌کند که کل رشته تطابق داشته باشد" msgid "" -">>> re.match(\"c\", \"abcdef\") # No match\n" -">>> re.search(\"c\", \"abcdef\") # Match\n" +">>> re.prefixmatch(\"c\", \"abcdef\") # No match\n" +">>> re.search(\"c\", \"abcdef\") # Match\n" "\n" ">>> re.fullmatch(\"p.*n\", \"python\") # Match\n" "\n" ">>> re.fullmatch(\"r.*n\", \"python\") # No match" msgstr "" -">>> re.match(\"c\", \"abcdef\") # No match\n" -">>> re.search(\"c\", \"abcdef\") # Match\n" +">>> re.prefixmatch(\"c\", \"abcdef\") # بدون تطابق\n" +">>> re.search(\"c\", \"abcdef\") # تطابق\n" "\n" -">>> re.fullmatch(\"p.*n\", \"python\") # Match\n" +">>> re.fullmatch(\"p.*n\", \"python\") # تطابق\n" "\n" -">>> re.fullmatch(\"r.*n\", \"python\") # No match" +">>> re.fullmatch(\"r.*n\", \"python\") # بدون تطابق" msgid "Regular expressions beginning with ``'^'`` can be used with :func:`search` to restrict the match at the beginning of the string::" msgstr "عبارت‌های باقاعده‌ای که با ``'^'`` شروع می‌شوند را می‌توان همراه با :func:`search` برای محدود کردن تطابق به ابتدای رشته استفاده کرد::" msgid "" -">>> re.match(\"c\", \"abcdef\") # No match\n" -">>> re.search(\"^c\", \"abcdef\") # No match\n" -">>> re.search(\"^a\", \"abcdef\") # Match\n" +">>> re.prefixmatch(\"c\", \"abcdef\") # No match\n" +">>> re.search(\"^c\", \"abcdef\") # No match\n" +">>> re.search(\"^a\", \"abcdef\") # Match\n" "" msgstr "" -">>> re.match(\"c\", \"abcdef\") # No match\n" -">>> re.search(\"^c\", \"abcdef\") # No match\n" -">>> re.search(\"^a\", \"abcdef\") # Match\n" +">>> re.prefixmatch(\"c\", \"abcdef\") # No match\n" +">>> re.search(\"^c\", \"abcdef\") # No match\n" +">>> re.search(\"^a\", \"abcdef\") # Match\n" "" -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 expression beginning with ``'^'`` will match at the beginning of each line. ::" -msgstr "با این حال توجه داشته باشید که در حالت :const:`MULTILINE`، :func:`match` فقط در ابتدای رشته مطابقت می‌کند، در حالی که استفاده از :func:`search` با عبارت باقاعده‌ای که با ``'^'`` شروع می‌شود، در ابتدای هر سطر مطابقت خواهد کرد. ::" +msgid "Note however that in :const:`MULTILINE` mode :func:`prefixmatch` only matches at the beginning of the string, whereas using :func:`search` with a regular expression beginning with ``'^'`` will match at the beginning of each line. ::" +msgstr "با این حال، توجه داشته باشید که در حالت :const:`MULTILINE` تابع :func:`prefixmatch` تنها در ابتدای رشته مطابقت پیدا می‌کند، در حالی که استفاده از :func:`search` با یک عبارت باقاعده که با ``'^'`` شروع می‌شود، در ابتدای هر سطر مطابقت خواهد داشت. ::" msgid "" -">>> re.match(\"X\", \"A\\nB\\nX\", re.MULTILINE) # No match\n" +">>> re.prefixmatch(\"X\", \"A\\nB\\nX\", re.MULTILINE) # No match\n" ">>> re.search(\"^X\", \"A\\nB\\nX\", re.MULTILINE) # Match\n" "" msgstr "" -">>> re.match(\"X\", \"A\\nB\\nX\", re.MULTILINE) # No match\n" +">>> re.prefixmatch(\"X\", \"A\\nB\\nX\", re.MULTILINE) # No match\n" ">>> re.search(\"^X\", \"A\\nB\\nX\", re.MULTILINE) # Match\n" "" -msgid "Making a Phonebook" +msgid "prefixmatch() vs. match()" +msgstr "توابع prefixmatch() در برابر match()" + +msgid "Why is the :func:`~re.match` function and method discouraged in favor of the longer :func:`~re.prefixmatch` spelling?" +msgstr "چرا تابع و متد :func:`~re.match` به نفع املای طولانی‌تر :func:`~re.prefixmatch` توصیه نمی‌شود؟" + +msgid "Many other languages have gained regex support libraries since regular expressions were added to Python. However in the most popular of those, they use the term *match* in their APIs to mean the unanchored behavior provided in Python by :func:`~re.search`. Thus use of the plain term *match* can be unclear to those used to other languages when reading or writing code and not familiar with the Python API's divergence from what otherwise become the industry norm." +msgstr "از زمانی که عبارات باقاعده به پایتون اضافه شدند، بسیاری از زبان‌های دیگر کتابخانه‌های پشتیبانی از عبارات باقاعده را دریافت کرده‌اند. با این حال، در محبوب‌ترین آن‌ها، از اصطلاح *match* در APIهای خود استفاده می‌کنند تا به رفتار بدون لنگر ارجاع دهند که در پایتون توسط :func:`~re.search` فراهم شده است. بنابراین، استفاده از اصطلاح ساده‌ی *match* ممکن است برای کسانی که به زبان‌های دیگر عادت دارند و با واگرایی API پایتون از آنچه به هنجار صنعت تبدیل شده است آشنا نیستند، هنگام خواندن یا نوشتن کد نامفهوم باشد." + +msgid "Quoting from the Zen Of Python (``python3 -m this``): *\"Explicit is better than implicit\"*. Anyone reading the name :func:`!prefixmatch` is likely to understand the intended semantics. When reading :func:`!match` there remains a seed of doubt about the intended behavior to anyone not already familiar with this old Python gotcha." +msgstr "به نقل از ذن پایتون (``python3 -m this``): *\"صریح بودن بهتر از ضمنی بودن است\"*. هر کسی که نام :func:`!prefixmatch` را می‌خواند احتمالاً معناشناسی مورد نظر را درک خواهد کرد. هنگام خواندن :func:`!match` همچنان بذر تردیدی درباره‌ی رفتار مورد نظر برای هر کسی که از پیش با این تله‌ی قدیمی پایتون آشنا نیست، باقی می‌ماند." + +msgid "We **do not** plan to remove the older :func:`!match` name, as it has been used in code for over 30 years. It has been :term:`soft deprecated`: code supporting older versions of Python should continue to use :func:`!match`, while new code should prefer :func:`!prefixmatch`." +msgstr "ما **قصد نداریم** نام قدیمی‌تر :func:`!match` را حذف کنیم، زیرا بیش از ۳۰ سال است که در کد استفاده می‌شود. این نام به صورت :term:`منسوخ نرم ` درآمده است: کدهایی که از نسخه‌های قدیمی‌تر پایتون پشتیبانی می‌کنند باید به استفاده از :func:`!match` ادامه دهند، در حالی که کدهای جدید باید :func:`!prefixmatch` را ترجیح دهند." + +msgid ":func:`!prefixmatch`" +msgstr ":func:`!prefixmatch`" + +msgid ":func:`!match`" +msgstr ":func:`!match`" + +msgid "Making a phonebook" msgstr "ساخت یک دفترچه تلفن" 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 that can be easily read and modified by Python as demonstrated in the following example that creates a phonebook." @@ -1500,8 +1535,8 @@ msgstr "" "['Frank', 'Burger', '925.541.7625', '662', 'South Dogwood Way'],\n" "['Heather', 'Albrecht', '548.326.4584', '919', 'Park Place']]" -msgid "Text Munging" -msgstr "دست‌کاری متن (Munging)" +msgid "Text munging" +msgstr "پردازش متن" 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 function to \"munge\" text, or randomize the order of all the characters in each word of a sentence except for the first and last characters::" msgstr ":func:`sub` هر رخداد از یک الگو را با یک رشته یا نتیجه‌ی یک تابع جایگزین می‌کند. این مثال استفاده از :func:`sub` را با یک تابع برای دگرگون‌سازی (munge) متن، یا تصادفی کردن ترتیب همه‌ی نویسه‌های هر واژه از یک جمله به‌جز نخستین و آخرین نویسه نشان می‌دهد::" @@ -1529,8 +1564,8 @@ msgstr "" ">>> re.sub(r\"(\\w)(\\w+)(\\w)\", repl, text)\n" "'Pofsroser Aodlambelk, plasee reoprt yuor asnebces potlmrpy.'" -msgid "Finding all Adverbs" -msgstr "یافتن همه‌ی قیدها" +msgid "Finding all adverbs" +msgstr "یافتن تمام قیدها" 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 the adverbs in some text, they might use :func:`findall` in the following manner::" msgstr ":func:`findall` *همه* رخدادهای یک الگو را تطبیق می‌دهد، نه فقط اولین رخداد را آن‌گونه که :func:`search` انجام می‌دهد. برای مثال، اگر نویسنده‌ای بخواهد همه قیدها را در متنی پیدا کند، ممکن است از :func:`findall` به شکل زیر استفاده کند::" @@ -1544,8 +1579,8 @@ msgstr "" ">>> re.findall(r\"\\w+ly\\b\", text)\n" "['carefully', 'quickly']" -msgid "Finding all Adverbs and their Positions" -msgstr "یافتن همه قیدها و موقعیت‌های آن‌ها" +msgid "Finding all adverbs and their positions" +msgstr "یافتن تمام قیدها و موقعیت‌های آن‌ها" 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` objects instead of strings. Continuing with the previous example, if a writer wanted to find all of the adverbs *and their positions* in some text, they would use :func:`finditer` in the following manner::" msgstr "اگر کسی بخواهد اطلاعات بیشتری درباره‌ی همه‌ی تطبیق‌های یک الگو فراتر از متن تطبیق‌یافته داشته باشد، :func:`finditer` مفید است، زیرا به‌جای رشته‌ها، اشیای :class:`~re.Match` را فراهم می‌کند. در ادامه‌ی مثال پیشین، اگر نویسنده‌ای بخواهد همه‌ی قیدها *و موقعیت‌های آن‌ها* را در متنی بیابد، از :func:`finditer` به شیوه‌ی زیر استفاده می‌کند::" @@ -1563,39 +1598,39 @@ msgstr "" "07-16: carefully\n" "40-47: quickly" -msgid "Raw String Notation" -msgstr "نمادگذاری رشته خام" +msgid "Raw string notation" +msgstr "نمادگذاری رشته‌ی خام" msgid "Raw string notation (``r\"text\"``) keeps regular expressions sane. Without it, every backslash (``'\\'``) in a regular expression would have to be prefixed with another one to escape it. For example, the two following lines of code are functionally identical::" msgstr "نمادگذاری رشته‌ی خام (``r\"text\"``) عبارت‌های باقاعده را قابل‌مدیر نگه می‌دارد. بدون آن، برای خنثی کردن هر بک‌اسلش (``'\\'``) در یک عبارت باقاعده باید پیش از آن یک بک‌اسلش دیگر قرار داد. برای مثال، دو خط کد زیر از نظر عملکرد یکسان هستند::" msgid "" -">>> re.match(r\"\\W(.)\\1\\W\", \" ff \")\n" +">>> re.search(r\"\\W(.)\\1\\W\", \" ff \")\n" "\n" -">>> re.match(\"\\\\W(.)\\\\1\\\\W\", \" ff \")\n" +">>> re.search(\"\\\\W(.)\\\\1\\\\W\", \" ff \")\n" "" msgstr "" -">>> re.match(r\"\\W(.)\\1\\W\", \" ff \")\n" +">>> re.search(r\"\\W(.)\\1\\W\", \" ff \")\n" "\n" -">>> re.match(\"\\\\W(.)\\\\1\\\\W\", \" ff \")\n" +">>> re.search(\"\\\\W(.)\\\\1\\\\W\", \" ff \")\n" "" msgid "When one wants to match a literal backslash, it must be escaped in the regular expression. With raw string notation, this means ``r\"\\\\\"``. Without raw string notation, one must use ``\"\\\\\\\\\"``, making the following lines of code functionally identical::" msgstr "وقتی می‌خواهید یک بک‌اسلش لفظی را تطبیق دهید، باید آن را در عبارت باقاعده خنثی کنید. با نمادگذاری رشته خام، این به معنای ``r\"\\\\\"`` است. بدون نمادگذاری رشته خام، باید از ``\"\\\\\\\\\"`` استفاده کنید، که سطرهای کد زیر را از نظر عملکردی یکسان می‌کند::" msgid "" -">>> re.match(r\"\\\\\", r\"\\\\\")\n" +">>> re.search(r\"\\\\\", r\"\\\\\")\n" "\n" -">>> re.match(\"\\\\\\\\\", r\"\\\\\")\n" +">>> re.search(\"\\\\\\\\\", r\"\\\\\")\n" "" msgstr "" -">>> re.match(r\"\\\\\", r\"\\\\\")\n" +">>> re.search(r\"\\\\\", r\"\\\\\")\n" "\n" -">>> re.match(\"\\\\\\\\\", r\"\\\\\")\n" +">>> re.search(\"\\\\\\\\\", r\"\\\\\")\n" "" -msgid "Writing a Tokenizer" -msgstr "نوشتن توکن‌ساز (Tokenizer)" +msgid "Writing a tokenizer" +msgstr "نوشتن یک توکن‌ساز" 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 "یک `توکن‌ساز (tokenizer) یا اسکنر (scanner) `_ رشته‌ای را تحلیل می‌کند تا گروه‌هایی از نویسه‌ها را دسته‌بندی کند. این نخستین گام مفید در نوشتن یک کامپایلر یا مفسر است." diff --git a/library/readline.po b/library/readline.po index b36c44d8..ac5e1754 100644 --- a/library/readline.po +++ b/library/readline.po @@ -8,12 +8,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 12:37+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -151,6 +152,9 @@ msgstr "تابعی را که به‌وسیله‌ی کال‌بک :c:data:`!rl_s msgid "Set or remove the function invoked by the :c:data:`!rl_pre_input_hook` callback of the underlying library. If *function* is specified, it will be used as the new hook function; if omitted or ``None``, any function already installed is removed. The hook is called with no arguments after the first prompt has been printed and just before readline starts reading input characters. This function only exists if Python was compiled for a version of the library that supports it." msgstr "تابعی را که توسط کال‌بک :c:data:`!rl_pre_input_hook` در کتابخانه زیربنایی فراخوانی می‌شود، تنظیم یا حذف کنید. اگر *function* مشخص شود، به‌عنوان تابع قلاب جدید استفاده خواهد شد؛ اگر ذکر نشود یا ``None`` باشد، هر تابعی که از پیش نصب‌شده باشد حذف می‌شود. این قلاب پس از چاپ نخستین اعلان و درست پیش از آنکه readline خواندن نویسه‌های ورودی را آغاز کند، بدون آرگومان فراخوانی می‌شود. این تابع فقط در صورتی وجود دارد که پایتون برای نسخه‌ای از کتابخانه کامپایل‌شده باشد که از آن پشتیبانی می‌کند." +msgid "Get the current pre-input hook function, or ``None`` if no pre-input hook function has been set. This function only exists if Python was compiled for a version of the library that supports it." +msgstr "تابع قلاب پیش‌ورودی فعلی را دریافت می‌کند، یا اگر هیچ تابع قلاب پیش‌ورودی تنظیم نشده باشد، مقدار ``None`` را برمی‌گرداند. این تابع فقط در صورتی وجود دارد که پایتون برای نسخه‌ای از کتابخانه کامپایل شده باشد که از آن پشتیبانی می‌کند." + msgid "Completion" msgstr "تکمیل" diff --git a/library/resource.po b/library/resource.po index 66347b51..7adb1be5 100644 --- a/library/resource.po +++ b/library/resource.po @@ -9,12 +9,13 @@ # Gigahertz ., 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 12:21+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -58,6 +59,12 @@ msgstr "منابع خاصی که می‌توانند محدود شوند، به msgid "Constant used to represent the limit for an unlimited resource." msgstr "ثابتی که برای نشان دادن محدودیت یک منبع نامحدود استفاده می‌شود." +msgid "It is now always positive. Previously, it could be negative, such as -1 or -3." +msgstr "اکنون همیشه مثبت است. پیش از این، می‌توانست منفی باشد، مانند ۱- یا ۳-." + +msgid "Constants used to represent the soft and hard limit values if they cannot be represented in the ``rlim_t`` value in C. Can be equal to :data:`RLIM_INFINITY`." +msgstr "ثابت‌هایی که برای نشان دادن مقادیر حد نرم و سخت استفاده می‌شوند، در صورتی که نتوان آن‌ها را در مقدار ``rlim_t`` در زبان C نشان داد. می‌تواند برابر با :data:`RLIM_INFINITY` باشد." + msgid "Returns a tuple ``(soft, hard)`` with the current soft and hard limits of *resource*. Raises :exc:`ValueError` if an invalid resource is specified, or :exc:`error` if the underlying system call fails unexpectedly." msgstr "یک تاپل ``(soft, hard)`` شامل محدودیت‌های نرم و سخت فعلی برای *resource* برمی‌گرداند. اگر منبع نامعتبری تعیین شده باشد، :exc:`ValueError` پرتاب می‌کند، یا اگر فراخوانی سیستمی زیربنایی به‌طور غیرمنتظره‌ای شکست بخورد، :exc:`error` پرتاب می‌کند." @@ -157,6 +164,18 @@ msgstr "حداکثر تعداد شبه‌پایانه‌ها (pseudo-terminals) msgid "The maximum number of kqueues this user id is allowed to create." msgstr "حداکثر تعداد kqueueهایی که این شناسه کاربری مجاز به ایجاد آن‌ها است." +msgid "The maximum number of threads for this user id, not counting the main and kernel threads." +msgstr "حداکثر تعداد نخ‌ها برای این شناسه کاربری، بدون احتساب نخ‌های اصلی و هسته." + +msgid "The maximum total size of in-kernel buffers for bi-directional pipes/fifos that this user id is allowed to consume." +msgstr "حداکثر اندازه‌ی کل بافرهای درون‌هسته‌ای برای پایپ‌ها/فایفوهای دوسویه که این شناسه‌ی کاربری مجاز به مصرف آن‌ها است." + +msgid "The maximum number of threads each process can create." +msgstr "حداکثر تعداد نخ‌هایی که هر فرایند می‌تواند ایجاد کند." + +msgid "The limit of the number of process-shared Posix thread library objects allocated by user id." +msgstr "حد تعداد اشیای کتابخانه‌ی نخ Posix که بین فرایندها به اشتراک گذاشته شده‌اند و توسط شناسه‌ی کاربری تخصیص داده می‌شوند." + msgid "Resource Usage" msgstr "استفاده از منابع" diff --git a/library/runpy.po b/library/runpy.po index 2aae0161..085f6fda 100644 --- a/library/runpy.po +++ b/library/runpy.po @@ -6,12 +6,13 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 01:12+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -48,8 +49,8 @@ msgstr "آرگومان *mod_name* باید یک نام ماژول مطلق با msgid "The optional dictionary argument *init_globals* may be used to pre-populate the module's globals dictionary before the code is executed. *init_globals* will not be modified. If any of the special global variables below are defined in *init_globals*, those definitions are overridden by :func:`run_module`." msgstr "می‌توان از آرگومان دیکشنری اختیاری *init_globals* برای از پیش پر کردن دیکشنری سراسری‌های ماژول پیش از اجرای کد استفاده کرد. *init_globals* تغییر نخواهد کرد. اگر هر یک از متغیرهای سراسری خاص زیر در *init_globals* تعریف شده باشند، آن تعریف‌ها توسط :func:`run_module` بازنویسی می‌شوند." -msgid "The special global variables ``__name__``, ``__spec__``, ``__file__``, ``__cached__``, ``__loader__`` and ``__package__`` are set in the globals dictionary before the module code is executed. (Note that this is a minimal set of variables - other variables may be set implicitly as an interpreter implementation detail.)" -msgstr "متغیرهای سراسری ویژه ``__name__``، ``__spec__``، ``__file__``، ``__cached__``، ``__loader__`` و ``__package__`` پیش از اجرای کد ماژول، در دیکشنری سراسری تنظیم می‌شوند. (توجه داشته باشید که این یک مجموعه‌ی حداقلی از متغیرها است — ممکن است متغیرهای دیگری نیز به‌صورت ضمنی به‌عنوان جزئیاتی از پیاده‌سازی مفسر تنظیم شوند.)" +msgid "The special global variables ``__name__``, ``__spec__``, ``__file__``, ``__loader__`` and ``__package__`` are set in the globals dictionary before the module code is executed. (Note that this is a minimal set of variables - other variables may be set implicitly as an interpreter implementation detail.)" +msgstr "متغیرهای سراسری خاص ``__name__``، ``__spec__``، ``__file__``، ``__loader__`` و ``__package__`` پیش از اجرای کد ماژول در دیکشنری سراسری تنظیم می‌شوند. (توجه داشته باشید که این مجموعه کوچکی از متغیرها است؛ سایر متغیرها ممکن است به طور ضمنی به عنوان جزئیات پیاده‌سازی مفسر تنظیم شوند.)" msgid "``__name__`` is set to *run_name* if this optional argument is not :const:`None`, to ``mod_name + '.__main__'`` if the named module is a package and to the *mod_name* argument otherwise." msgstr "``__name__`` هنگامی که این آرگومان اختیاری :const:`None` نباشد، به *run_name* تنظیم می‌شود؛ اگر ماژول نام‌برده یک بسته باشد، به ``mod_name + '.__main__'`` و در غیر این صورت به آرگومان *mod_name* تنظیم می‌شود." @@ -57,8 +58,8 @@ msgstr "``__name__`` هنگامی که این آرگومان اختیاری :con msgid "``__spec__`` will be set appropriately for the *actually* imported module (that is, ``__spec__.name`` will always be *mod_name* or ``mod_name + '.__main__'``, never *run_name*)." msgstr "``__spec__`` برای ماژول *واقعاً* ایمپورت‌شده به‌طور مناسب تنظیم می‌شود (یعنی ``__spec__.name`` همیشه *mod_name* یا ``mod_name + '.__main__'`` خواهد بود، هرگز *run_name* نخواهد بود)." -msgid "``__file__``, ``__cached__``, ``__loader__`` and ``__package__`` are :ref:`set as normal ` based on the module spec." -msgstr "``__file__``، ``__cached__``، ``__loader__`` و ``__package__`` بر اساس مشخصات ماژول :ref:`به‌صورت عادی تنظیم می‌شوند `." +msgid "``__file__``, ``__loader__`` and ``__package__`` are :ref:`set as normal ` based on the module spec." +msgstr "متغیرهای ``__file__``، ``__loader__`` و ``__package__`` بر اساس مشخصه ماژول :ref:`به طور عادی تنظیم می‌شوند `." msgid "If the argument *alter_sys* is supplied and evaluates to :const:`True`, then ``sys.argv[0]`` is updated with the value of ``__file__`` and ``sys.modules[__name__]`` is updated with a temporary module object for the module being executed. Both ``sys.argv[0]`` and ``sys.modules[__name__]`` are restored to their original values before the function returns." msgstr "اگر آرگومان *alter_sys* ارائه شود و به :const:`True` ارزیابی شود، ``sys.argv[0]`` با مقدار ``__file__`` به‌روزرسانی می‌شود و ``sys.modules[__name__]`` با یک شیء ماژول موقت برای ماژول در حال اجرا به‌روزرسانی می‌شود. هر دو ``sys.argv[0]`` و ``sys.modules[__name__]`` پیش از بازگشت تابع به مقادیر اصلی خود بازمی‌گردند." @@ -81,6 +82,9 @@ msgstr "به‌روزرسانی شد تا از ویژگی مشخصات ماژو msgid "The setting of ``__cached__``, ``__loader__``, and ``__package__`` are deprecated. See :class:`~importlib.machinery.ModuleSpec` for alternatives." msgstr "تنظیم ``__cached__``، ``__loader__`` و ``__package__`` منسوخ شده است. برای جایگزین‌ها به :class:`~importlib.machinery.ModuleSpec` مراجعه کنید." +msgid "The global variable ``__cached__`` is no longer set." +msgstr "متغیر سراسری ``__cached__`` دیگر تنظیم نمی‌شود." + msgid "Execute the code at the named filesystem location and return the resulting module's globals dictionary. As with a script name supplied to the CPython command line, *file_path* may refer to a Python source file, a compiled bytecode file or a valid :data:`sys.path` entry containing a :mod:`__main__` module (e.g. a zipfile containing a top-level :file:`__main__.py` file)." msgstr "کد را در موقعیت سامانه فایل‌بندی‌ای نام‌گذاری‌شده اجرا می‌کند و دیکشنری سراسری ماژول حاصل را برمی‌گرداند. همان‌طور که در مورد نام اسکریپت داده‌شده به خط فرمان CPython صدق می‌کند، *file_path* ممکن است به یک پرونده منبع پایتون، یک پرونده بایت‌کد کامپایل‌شده یا یک ورودی معتبر از :data:`sys.path` اشاره کند که حاوی یک ماژول :mod:`__main__` باشد (مثلاً یک پرونده زیپ حاوی یک پرونده :file:`__main__.py` در سطح بالا)." @@ -93,11 +97,11 @@ msgstr "می‌توان از آرگومان دیکشنری اختیاری *init_ msgid "``__name__`` is set to *run_name* if this optional argument is not :const:`None` and to ``''`` otherwise." msgstr "اگر این آرگومان اختیاری :const:`None` نباشد، ``__name__`` به *run_name* تنظیم می‌شود و در غیر این صورت به ``''`` تنظیم می‌شود." -msgid "If *file_path* directly references a script file (whether as source or as precompiled byte code), then ``__file__`` will be set to *file_path*, and ``__spec__``, ``__cached__``, ``__loader__`` and ``__package__`` will all be set to :const:`None`." -msgstr "اگر *file_path* مستقیماً به یک پرونده اسکریپت اشاره کند (چه به صورت کد منبع و چه به صورت بایت‌کد از پیش کامپایل‌شده)، ``__file__`` به *file_path* تنظیم می‌شود، و ``__spec__``، ``__cached__``، ``__loader__`` و ``__package__`` همگی به :const:`None` تنظیم می‌شوند." +msgid "If *file_path* directly references a script file (whether as source or as precompiled byte code), then ``__file__`` will be set to *file_path*, and ``__spec__``, ``__loader__`` and ``__package__`` will all be set to :const:`None`." +msgstr "اگر *file_path* مستقیماً به یک پرونده‌ی اسکریپت ارجاع دهد (چه به عنوان کد منبع و چه به عنوان بایت‌کد پیش‌کامپایل‌شده)، متغیر ``__file__`` روی *file_path* تنظیم خواهد شد و ``__spec__``، ``__loader__`` و ``__package__`` همگی روی :const:`None` تنظیم خواهند شد." -msgid "If *file_path* is a reference to a valid :data:`sys.path` entry, then ``__spec__`` will be set appropriately for the imported :mod:`__main__` module (that is, ``__spec__.name`` will always be ``__main__``). ``__file__``, ``__cached__``, ``__loader__`` and ``__package__`` will be :ref:`set as normal ` based on the module spec." -msgstr "اگر *file_path* ارجاعی به یک آیتم معتبر در :data:`sys.path` باشد، آنگاه ``__spec__`` به‌صورت مناسب برای ماژول :mod:`__main__` ایمپورت‌شده تنظیم خواهد شد (یعنی ``__spec__.name`` همیشه ``__main__`` خواهد بود). ``__file__``، ``__cached__``، ``__loader__`` و ``__package__`` بر اساس مشخصات ماژول، :ref:`به‌صورت عادی تنظیم خواهند شد `." +msgid "If *file_path* is a reference to a valid :data:`sys.path` entry, then ``__spec__`` will be set appropriately for the imported :mod:`__main__` module (that is, ``__spec__.name`` will always be ``__main__``). ``__file__``, ``__loader__`` and ``__package__`` will be :ref:`set as normal ` based on the module spec." +msgstr "اگر *file_path* ارجاعی به یک ورودی معتبر :data:`sys.path` باشد، متغیر ``__spec__`` به طور مناسب برای ماژول واردشده‌ی :mod:`__main__` تنظیم خواهد شد (یعنی ``__spec__.name`` همیشه ``__main__`` خواهد بود). متغیرهای ``__file__``، ``__loader__`` و ``__package__`` بر اساس مشخصه ماژول :ref:`به طور عادی تنظیم می‌شوند `." msgid "A number of alterations are also made to the :mod:`sys` module. Firstly, :data:`sys.path` may be altered as described above. ``sys.argv[0]`` is updated with the value of *file_path* and ``sys.modules[__name__]`` is updated with a temporary module object for the module being executed. All modifications to items in :mod:`sys` are reverted before the function returns." msgstr "تغییراتی نیز در ماژول :mod:`sys` اعمال می‌شوند. نخست، ممکن است :data:`sys.path` همان‌طور که در بالا توضیح داده شد تغییر کند. ``sys.argv[0]`` با مقدار *file_path* به‌روزرسانی می‌شود و ``sys.modules[__name__]`` با یک شیء ماژول موقتی برای ماژول در حال اجرا به‌روزرسانی می‌شود. پیش از بازگشت تابع، همه تغییرات در آیتم‌های :mod:`sys` بازگردانده می‌شوند." diff --git a/library/select.po b/library/select.po index 84863a6f..dd541b33 100644 --- a/library/select.po +++ b/library/select.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 08:13+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -62,8 +63,8 @@ msgstr "توصیف‌گر پرونده جدید اکنون غیرقابل‌ار msgid "Return an edge polling object, which can be used as Edge or Level Triggered interface for I/O events." msgstr "یک شیء پایش لبه‌ای (edge polling) را برمی‌گرداند، که می‌توان از آن به‌عنوان رابط تحریک لبه‌ای (Edge Triggered) یا تحریک سطحی (Level Triggered) برای رویدادهای ورودی/خروجی استفاده کرد." -msgid "*sizehint* informs epoll about the expected number of events to be registered. It must be positive, or ``-1`` to use the default. It is only used on older systems where :c:func:`!epoll_create1` is not available; otherwise it has no effect (though its value is still checked)." -msgstr "*sizehint* تعداد مورد انتظار رویدادهای ثبت‌شونده را به epoll اطلاع می‌دهد. این مقدار باید مثبت باشد، یا ``-1`` باشد تا از مقدار پیش‌فرض استفاده شود. این مقدار فقط در سیستم‌های قدیمی‌تری استفاده می‌شود که :c:func:`!epoll_create1` در آن‌ها در دسترس نیست؛ در غیر این صورت هیچ اثری ندارد (هرچند مقدار آن همچنان بررسی می‌شود)." +msgid "*sizehint* informs epoll about the expected number of events to be registered. It must be positive, or ``-1`` to use the default. It is only used on older systems where :manpage:`epoll_create1(2)` is not available; otherwise it has no effect (though its value is still checked)." +msgstr "پارامتر *sizehint* اپول (epoll) را از تعداد رویدادهای مورد انتظار برای ثبت مطلع می‌کند. این پارامتر باید مثبت باشد، یا برای استفاده از مقدار پیش‌فرض برابر با ``-1`` باشد. این پارامتر فقط در سیستم‌های قدیمی‌تر که :manpage:`epoll_create1(2)` در آن‌ها موجود نیست استفاده می‌شود؛ در غیر این صورت هیچ تأثیری ندارد (اگرچه مقدار آن همچنان بررسی می‌شود)." msgid "*flags* is deprecated and completely ignored. However, when supplied, its value must be ``0`` or ``select.EPOLL_CLOEXEC``, otherwise ``OSError`` is raised." msgstr "*flags* منسوخ شده و به‌طور کامل نادیده گرفته می‌شود. با این حال، در صورتی که ارائه شود، مقدار آن باید ``0`` یا ``select.EPOLL_CLOEXEC`` باشد، در غیر این صورت ``OSError`` پرتاب می‌شود." @@ -83,6 +84,9 @@ msgstr "پشتیبانی از دستور :keyword:`with` اضافه شد. توص msgid "The *flags* parameter. ``select.EPOLL_CLOEXEC`` is used by default now. Use :func:`os.set_inheritable` to make the file descriptor inheritable." msgstr "پارامتر *flags*. اکنون از ``select.EPOLL_CLOEXEC`` به‌صورت پیش‌فرض استفاده می‌شود. برای اینکه توصیف‌گر پرونده قابل ارث‌بردن شود، از :func:`os.set_inheritable` استفاده کنید." +msgid "When CPython is built, this function may be disabled using :option:`--disable-epoll`." +msgstr "هنگامی که سی‌پایتون ساخته می‌شود، این تابع ممکن است با استفاده از :option:`--disable-epoll` غیرفعال شود." + msgid "Returns a polling object, which supports registering and unregistering file descriptors, and then polling them for I/O events; see section :ref:`poll-objects` below for the methods supported by polling objects." msgstr "یک شیء پایش (polling object) برمی‌گرداند که از ثبت و لغو ثبت توصیف‌گرهای پرونده و سپس پایش آن‌ها برای رویدادهای ورودی/خروجی پشتیبانی می‌کند؛ برای متدهای پشتیبانی‌شده توسط اشیای پایش، بخش :ref:`poll-objects` در زیر را ببینید." @@ -104,8 +108,8 @@ msgstr "*wlist*: صبر کنید تا برای نوشتن آماده شود" msgid "*xlist*: wait for an \"exceptional condition\" (see the manual page for what your system considers such a condition)" msgstr "*xlist*: منتظر یک «وضعیت استثنایی» باشید (برای آگاهی از اینکه سیستم شما چه چیزی را چنین وضعیتی می‌داند، به صفحه راهنما مراجعه کنید)" -msgid "Empty iterables are allowed, but acceptance of three empty iterables is platform-dependent. (It is known to work on Unix but not on Windows.) The optional *timeout* argument specifies a time-out as a floating-point number in seconds. When the *timeout* argument is omitted or ``None``, the function blocks until at least one file descriptor is ready. A time-out value of zero specifies a poll and never blocks." -msgstr "پیمایش‌پذیرهای خالی مجاز هستند، اما پذیرش ۳ پیمایش‌پذیر خالی به پلتفرم وابسته است. (شناخته شده است که روی Unix کار می‌کند، اما روی Windows کار نمی‌کند.) آرگومان اختیاری *timeout*، مهلت زمانی را به‌صورت عدد ممیز شناور بر حسب ثانیه مشخص می‌کند. هرگاه آرگومان *timeout* حذف شود یا ``None`` باشد، تابع مسدود می‌شود تا حداقل یک توصیف‌گر پرونده آماده شود. مقدار زمان توقف ۰، یک پایش (poll) را مشخص می‌کند و تابع هرگز مسدود نمی‌شود." +msgid "Empty iterables are allowed, but acceptance of three empty iterables is platform-dependent. (It is known to work on Unix but not on Windows.) The optional *timeout* argument specifies a time-out in seconds; it may be a non-integer to specify fractions of seconds. When the *timeout* argument is omitted or ``None``, the function blocks until at least one file descriptor is ready. A time-out value of zero specifies a poll and never blocks." +msgstr "داد‌ه‌های پیمایش‌پذیر خالی مجاز هستند، اما پذیرش سه داد‌ه‌ی پیمایش‌پذیر خالی وابسته به سکو است. (شناخته‌شده است که روی یونیکس کار می‌کند اما روی ویندوز خیر.) آرگومان اختیاری *timeout* یک مهلت زمانی را بر حسب ثانیه مشخص می‌کند؛ برای مشخص کردن کسری از ثانیه می‌تواند یک عدد غیرصحیح باشد. هنگامی که آرگومان *timeout* حذف شود یا ``None`` باشد، تابع تا زمانی که حداقل یک توصیف‌گر پرونده آماده شود، مسدود می‌ماند. مقدار مهلت زمانی صفر، یک پایش را مشخص می‌کند و هرگز مسدود نمی‌شود." msgid "The return value is a triple of lists of objects that are ready: subsets of the first three arguments. When the time-out is reached without a file descriptor becoming ready, three empty lists are returned." msgstr "مقدار بازگشتی، یک سه‌تایی از فهرست‌هایی از اشیای آماده است: زیرمجموعه‌هایی از سه آرگومان نخست. هنگامی که مهلت زمانی بدون آماده شدن توصیف‌گر پرونده‌ای به پایان برسد، سه فهرست خالی برگردانده می‌شود." @@ -119,6 +123,9 @@ msgstr "اشیای پرونده در ویندوز قابل قبول نیستند msgid "The function is now retried with a recomputed timeout when interrupted by a signal, except if the signal handler raises an exception (see :pep:`475` for the rationale), instead of raising :exc:`InterruptedError`." msgstr "این تابع اکنون هنگامی که یک سیگنال آن را قطع کند، به‌جای پرتاب :exc:`InterruptedError`، با یک مهلت زمانی بازمحاسبه‌شده دوباره اجرا می‌شود، مگر اینکه هندلر سیگنال استثنایی پرتاب کند (برای دلیل آن، :pep:`475` را ببینید)." +msgid "Accepts any real number as *timeout*, not only integer or float." +msgstr "هر عدد حقیقی را به عنوان *timeout* می‌پذیرد، نه فقط عدد صحیح یا عدد اعشاری." + msgid "The minimum number of bytes which can be written without blocking to a pipe when the pipe has been reported as ready for writing by :func:`~select.select`, :func:`!poll` or another interface in this module. This doesn't apply to other kinds of file-like objects such as sockets." msgstr "حداقل تعداد بایت‌هایی که می‌توان بدون مسدود شدن در یک پایپ نوشت، هنگامی که پایپ توسط :func:`~select.select`، :func:`!poll` یا رابط دیگری در این ماژول به‌عنوان آماده برای نوشتن گزارش شده باشد. این موضوع به انواع دیگر اشیاء شبه‌پرونده مانند سوکت‌ها اعمال نمی‌شود." @@ -299,8 +306,8 @@ msgstr "یک توصیف‌گر پرونده ثبت‌شده را از شیء epo msgid "The method no longer ignores the :data:`~errno.EBADF` error." msgstr "این متد دیگر خطای :data:`~errno.EBADF` را نادیده نمی‌گیرد." -msgid "Wait for events. timeout in seconds (float)" -msgstr "منتظر رویدادها بمانید. timeout به ثانیه (float)" +msgid "Wait for events. If *timeout* is given, it specifies the length of time in seconds (may be non-integer) which the system will wait for events before returning." +msgstr "منتظر رویدادها بمانید. اگر *timeout* داده شود، مدت زمان بر حسب ثانیه (ممکن است غیرصحیح باشد) را مشخص می‌کند که سیستم قبل از بازگشت، منتظر رویدادها خواهد ماند." msgid "Polling objects" msgstr "اشیای پایش (polling)" @@ -365,6 +372,9 @@ msgstr "تلاش برای حذف توصیف‌گر پرونده‌ای که هر msgid "Polls the set of registered file descriptors, and returns a possibly empty list containing ``(fd, event)`` 2-tuples for the descriptors that have events or errors to report. *fd* is the file descriptor, and *event* is a bitmask with bits set for the reported events for that descriptor --- :const:`POLLIN` for waiting input, :const:`POLLOUT` to indicate that the descriptor can be written to, and so forth. An empty list indicates that the call timed out and no file descriptors had any events to report. If *timeout* is given, it specifies the length of time in milliseconds which the system will wait for events before returning. If *timeout* is omitted, negative, or :const:`None`, the call will block until there is an event for this poll object." msgstr "از مجموعه توصیف‌گرهای پرونده ثبت‌شده پایش می‌کند و فهرستی را برمی‌گرداند که ممکن است خالی باشد و شامل ۲-تایی‌های ``(fd, event)`` برای توصیف‌گرهایی است که رویدادها یا خطاهایی برای گزارش دارند. *fd* توصیف‌گر پرونده است، و *event* یک نقاب بیتی است که بیت‌هایی در آن برای رویدادهای گزارش‌شده برای آن توصیف‌گر تنظیم شده‌اند --- :const:`POLLIN` برای ورودی در انتظار، :const:`POLLOUT` برای نشان دادن اینکه توصیف‌گر قابل نوشتن است، و غیره. یک فهرست خالی نشان می‌دهد که مهلت فراخوانی به پایان رسیده است و هیچ توصیف‌گر پرونده‌ای رویدادی برای گزارش نداشته است. اگر *timeout* داده شده باشد، مدت زمانی را بر حسب میلی‌ثانیه مشخص می‌کند که سیستم برای رویدادها پیش از بازگشت منتظر خواهد ماند. اگر *timeout* داده نشده باشد، منفی باشد، یا :const:`None` باشد، فراخوانی تا زمانی که رویدادی برای این شیء پایش وجود داشته باشد، مسدود خواهد شد." +msgid "Accepts any real number as *timeout*, not only integer or float. If ``ppoll()`` function is available, *timeout* has a resolution of ``1`` ns (``1e-6`` ms) instead of ``1`` ms." +msgstr "هر عدد حقیقی را به عنوان *timeout* می‌پذیرد، و محدود به عدد صحیح یا عدد اعشاری نیست. اگر تابع ``ppoll()`` در دسترس باشد، *timeout* به جای تفکیک‌پذیری ``1`` میلی‌ثانیه، دارای تفکیک‌پذیری ``1`` نانوثانیه (``1e-6`` میلی‌ثانیه) است." + msgid "Kqueue objects" msgstr "اشیای Kqueue" @@ -386,8 +396,8 @@ msgstr "changelist باید یک پیمایش‌پذیر از شیءهای keven msgid "max_events must be 0 or a positive integer" msgstr "max_events باید ۰ یا یک عدد صحیح مثبت باشد" -msgid "timeout in seconds (floats possible); the default is ``None``, to wait forever" -msgstr "مهلت زمانی به ثانیه (امکان استفاده از مقادیر اعشاری وجود دارد)؛ پیش‌فرض ``None`` است، تا برای همیشه منتظر بماند" +msgid "timeout in seconds (non-integers are possible); the default is ``None``, to wait forever" +msgstr "مهلت زمانی بر حسب ثانیه (اعداد غیرصحیح امکان‌پذیر هستند)؛ پیش‌فرض ``None`` است تا برای همیشه منتظر بماند" msgid "Kevent objects" msgstr "اشیای Kevent" @@ -649,3 +659,6 @@ msgstr "popen() (در ماژول os)" msgid "WinSock" msgstr "WinSock" + +#~ msgid "Wait for events. timeout in seconds (float)" +#~ msgstr "منتظر رویدادها بمانید. timeout به ثانیه (float)" diff --git a/library/shelve.po b/library/shelve.po index 1f699ac6..9a41ca4c 100644 --- a/library/shelve.po +++ b/library/shelve.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 01:12+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -41,12 +42,27 @@ msgstr "به‌طور پیش‌فرض، پیکل‌های ایجادشده با msgid "Because of Python semantics, a shelf cannot know when a mutable persistent-dictionary entry is modified. By default modified objects are written *only* when assigned to the shelf (see :ref:`shelve-example`). If the optional *writeback* parameter is set to ``True``, all entries accessed are also cached in memory, and written back on :meth:`~Shelf.sync` and :meth:`~Shelf.close`; this can make it handier to mutate mutable entries in the persistent dictionary, but, if many entries are accessed, it can consume vast amounts of memory for the cache, and it can make the close operation very slow since all accessed entries are written back (there is no way to determine which accessed entries are mutable, nor which ones were actually mutated)." msgstr "به دلیل معناشناسی پایتون، یک shelf نمی‌تواند بداند چه زمانی یک آیتم تغییرپذیر در دیکشنری پایا تغییر می‌کند. به‌طور پیش‌فرض، اشیای تغییرکرده *فقط* زمانی نوشته می‌شوند که به shelf انتساب داده شوند (به :ref:`shelve-example` مراجعه کنید). اگر پارامتر اختیاری *writeback* روی ``True`` تنظیم شود، همه آیتم‌های دسترسی‌یافته نیز در نهانگاه حافظه ذخیره می‌شوند و در :meth:`~Shelf.sync` و :meth:`~Shelf.close` بازنویسی می‌شوند؛ این موضوع می‌تواند تغییر دادن آیتم‌های تغییرپذیر در دیکشنری پایا را آسان‌تر کند، اما اگر به آیتم‌های زیادی دسترسی پیدا شود، می‌تواند حجم بسیار زیادی از حافظه را برای نهانگاه مصرف کند و عملیات close را بسیار کند سازد، زیرا همه آیتم‌های دسترسی‌یافته بازنویسی می‌شوند (هیچ راهی برای تشخیص اینکه کدام آیتم‌های دسترسی‌یافته تغییرپذیرند، و نه اینکه کدام‌یک واقعاً تغییر کرده‌اند، وجود ندارد)." +msgid "By default, :mod:`!shelve` uses :func:`pickle.dumps` and :func:`pickle.loads` for serializing and deserializing. This can be changed by supplying *serializer* and *deserializer*, respectively." +msgstr "به طور پیش‌فرض، :mod:`!shelve` از :func:`pickle.dumps` و :func:`pickle.loads` برای سریال‌سازی و سریال‌زدایی استفاده می‌کند. این کار را می‌توان با ارائه‌ی *serializer* و *deserializer* به ترتیب تغییر داد." + +msgid "The *serializer* argument must be a callable which takes an object ``obj`` and the *protocol* as inputs and returns the representation ``obj`` as a :term:`bytes-like object`; the *protocol* value may be ignored by the serializer." +msgstr "آرگومان *serializer* باید یک شیء فراخوانی‌پذیر باشد که یک شیء ``obj`` و *protocol* را به عنوان ورودی دریافت کند و بازنمایی ``obj`` را به عنوان یک :term:`شیء شبه‌بایت ` برگرداند؛ ممکن است مقدار *protocol* توسط سریال‌ساز نادیده گرفته شود." + +msgid "The *deserializer* argument must be a callable which takes a serialized object given as a :class:`bytes` object and returns the corresponding object." +msgstr "آرگومان *deserializer* باید یک شیء فراخوانی‌پذیر باشد که یک شیء سریال‌شده را که به عنوان یک شیء :class:`bytes` داده شده است دریافت کند و شیء متناظر را برگرداند." + +msgid "A :exc:`ShelveError` is raised if *serializer* is given but *deserializer* is not, or vice-versa." +msgstr "اگر *serializer* داده شود اما *deserializer* داده نشود یا برعکس، یک :exc:`ShelveError` بالا آورده می‌شود." + msgid ":const:`pickle.DEFAULT_PROTOCOL` is now used as the default pickle protocol." msgstr ":const:`pickle.DEFAULT_PROTOCOL` اکنون به‌عنوان پروتکل پیش‌فرض pickle استفاده می‌شود." msgid "Accepts :term:`path-like object` for filename." msgstr ":term:`path-like object` را برای نام پرونده می‌پذیرد." +msgid "Accepts custom *serializer* and *deserializer* functions in place of :func:`pickle.dumps` and :func:`pickle.loads`." +msgstr "توابع *serializer* و *deserializer* سفارشی را به جای :func:`pickle.dumps` و :func:`pickle.loads` می‌پذیرد." + msgid "Do not rely on the shelf being closed automatically; always call :meth:`~Shelf.close` explicitly when you don't need it any more, or use :func:`shelve.open` as a context manager::" msgstr "به بسته شدن خودکار قفسه (shelf) اتکا نکنید؛ همیشه وقتی دیگر به آن نیاز ندارید، :meth:`~Shelf.close` را به‌صراحت فراخوانی کنید، یا از :func:`shelve.open` به‌عنوان مدیر زمینه استفاده کنید::" @@ -66,8 +82,11 @@ msgstr "اشیای Shelf از بیشتر متدها و عملیات‌هایی msgid "Two additional methods are supported:" msgstr "از دو متد اضافی پشتیبانی می‌شود:" -msgid "Write back all entries in the cache if the shelf was opened with *writeback* set to :const:`True`. Also empty the cache and synchronize the persistent dictionary on disk, if feasible. This is called automatically when the shelf is closed with :meth:`close`." -msgstr "اگر قفسه (shelf) با *writeback* برابر با :const:`True` باز شده باشد، تمام ورودی‌های نهانگاه را بازنویسی می‌کند. همچنین در صورت امکان، نهانگاه را خالی می‌کند و دیکشنری پایا روی دیسک را همگام‌سازی می‌کند. این متد به‌طور خودکار هنگامی که قفسه (shelf) با :meth:`close` بسته می‌شود، فراخوانی می‌شود." +msgid "Write back all entries in the cache if the shelf was opened with *writeback* set to :const:`True`. Also empty the cache and synchronize the persistent dictionary on disk, if feasible. This is called automatically when :meth:`reorganize` is called or the shelf is closed with :meth:`close`." +msgstr "اگر قفسه با مقدار *writeback* تنظیم‌شده روی :const:`True` باز شده باشد، تمام درایوهای موجود در نهانگاه را به عقب بازنویسی کنید. همچنین در صورت امکان، نهانگاه را خالی کرده و دیکشنری پایا را روی دیسک همگام‌سازی کنید. این کار به صورت خودکار هنگام فراخوانی :meth:`reorganize` یا بسته شدن قفسه با :meth:`close` انجام می‌شود." + +msgid "Calls :meth:`sync` and attempts to shrink space used on disk by removing empty space resulting from deletions." +msgstr "متد :meth:`sync` را فراخوانی می‌کند و تلاش می‌کند با حذف فضای خالی ناشی از حذف‌ها، فضای استفاده‌شده روی دیسک را کاهش دهد." msgid "Synchronize and close the persistent *dict* object. Operations on a closed shelf will fail with a :exc:`ValueError`." msgstr "همگام‌سازی و بستن شیء *dict* پایا. عملیات روی یک shelf بسته با :exc:`ValueError` شکست خواهد خورد." @@ -87,6 +106,9 @@ msgstr "ماژول :mod:`!shelve` از دسترسی *همزمان* خواندن/ msgid "On macOS :mod:`dbm.ndbm` can silently corrupt the database file on updates, which can cause hard crashes when trying to read from the database." msgstr "در macOS، :mod:`dbm.ndbm` می‌تواند هنگام به‌روزرسانی‌ها بدون هشدار پرونده پایگاه داده را خراب کند، که این می‌تواند هنگام تلاش برای خواندن از پایگاه داده باعث فروپاشی‌های سخت شود." +msgid ":meth:`Shelf.reorganize` may not be available for all database packages and may temporarily increase resource usage (especially disk space) when called. Additionally, it will never run automatically and instead needs to be called explicitly." +msgstr "ممکن است :meth:`Shelf.reorganize` برای همه‌ی بسته‌های پایگاه داده در دسترس نباشد و هنگام فراخوانی ممکن است به طور موقت استفاده از منابع (به ویژه فضای دیسک) را افزایش دهد. علاوه بر این، هرگز به طور خودکار اجرا نمی‌شود و در عوض باید به طور صریح فراخوانی شود." + msgid "A subclass of :class:`collections.abc.MutableMapping` which stores pickled values in the *dict* object." msgstr "زیرکلاسی از :class:`collections.abc.MutableMapping` که مقادیر پیکل‌شده را در شیء *dict* ذخیره می‌کند." @@ -99,6 +121,9 @@ msgstr "اگر پارامتر *writeback* برابر ``True`` باشد، شیء msgid "The *keyencoding* parameter is the encoding used to encode keys before they are used with the underlying dict." msgstr "پارامتر *keyencoding* کدگذاری‌ای است که برای کدگذاری کلیدها پیش از استفاده از آن‌ها در دیکشنری زیرین به کار می‌رود." +msgid "The *serializer* and *deserializer* parameters have the same interpretation as in :func:`~shelve.open`." +msgstr "پارامترهای *serializer* و *deserializer* همان تفسیری را دارند که در :func:`~shelve.open` وجود دارد." + msgid "A :class:`Shelf` object can also be used as a context manager, in which case it will be automatically closed when the :keyword:`with` block ends." msgstr "یک شیء :class:`Shelf` همچنین می‌تواند به‌عنوان مدیر زمینه استفاده شود، که در این صورت با پایان یافتن بلوک :keyword:`with` به‌طور خودکار بسته می‌شود." @@ -108,11 +133,14 @@ msgstr "پارامتر *keyencoding* افزوده شد؛ پیش‌تر، کلی msgid "Added context manager support." msgstr "پشتیبانی از مدیر زمینه افزوده شد." -msgid "A subclass of :class:`Shelf` which exposes :meth:`!first`, :meth:`!next`, :meth:`!previous`, :meth:`!last` and :meth:`!set_location` methods. These are available in the third-party :mod:`!bsddb` module from `pybsddb `_ but not in other database modules. The *dict* object passed to the constructor must support those methods. This is generally accomplished by calling one of :func:`!bsddb.hashopen`, :func:`!bsddb.btopen` or :func:`!bsddb.rnopen`. The optional *protocol*, *writeback*, and *keyencoding* parameters have the same interpretation as for the :class:`Shelf` class." -msgstr "یک زیرکلاس از :class:`Shelf` که متدهای :meth:`!first`، :meth:`!next`، :meth:`!previous`، :meth:`!last` و :meth:`!set_location` را ارائه می‌دهد. این متدها در ماژول شخص ثالث :mod:`!bsddb` از `pybsddb `_ در دسترس هستند، اما در سایر ماژول‌های پایگاه داده در دسترس نیستند. شیء *dict* که به سازنده ارسال می‌شود باید از آن متدها پشتیبانی کند. این کار معمولاً با فراخوانی یکی از :func:`!bsddb.hashopen`، :func:`!bsddb.btopen` یا :func:`!bsddb.rnopen` انجام می‌شود. پارامترهای اختیاری *protocol*، *writeback* و *keyencoding* همان تفسیری را دارند که برای کلاس :class:`Shelf` دارند." +msgid "Added the *serializer* and *deserializer* parameters." +msgstr "پارامترهای *serializer* و *deserializer* اضافه شدند." + +msgid "A subclass of :class:`Shelf` which exposes :meth:`!first`, :meth:`!next`, :meth:`!previous`, :meth:`!last` and :meth:`!set_location` methods. These are available in the third-party :mod:`!bsddb` module from `pybsddb `_ but not in other database modules. The *dict* object passed to the constructor must support those methods. This is generally accomplished by calling one of :func:`!bsddb.hashopen`, :func:`!bsddb.btopen` or :func:`!bsddb.rnopen`. The optional *protocol*, *writeback*, *keyencoding*, *serializer* and *deserializer* parameters have the same interpretation as in :func:`~shelve.open`." +msgstr "زیرکلاسی از :class:`Shelf` که متدهای :meth:`!first`، :meth:`!next`، :meth:`!previous`، :meth:`!last` و :meth:`!set_location` را ارائه می‌دهد. این موارد در ماژول شخص ثالث :mod:`!bsddb` از `pybsddb `_ موجود هستند اما در سایر ماژول‌های پایگاه داده حضور ندارند. شیء *dict* ارسال‌شده به سازنده باید از این متدها پشتیبانی کند. این کار معمولاً با فراخوانی یکی از توابع :func:`!bsddb.hashopen`، :func:`!bsddb.btopen` یا :func:`!bsddb.rnopen` انجام می‌شود. پارامترهای اختیاری *protocol*، *writeback*، *keyencoding*، *serializer* و *deserializer* همان تفسیری را دارند که در :func:`~shelve.open` دیده می‌شود." -msgid "A subclass of :class:`Shelf` which accepts a *filename* instead of a dict-like object. The underlying file will be opened using :func:`dbm.open`. By default, the file will be created and opened for both read and write. The optional *flag* parameter has the same interpretation as for the :func:`.open` function. The optional *protocol* and *writeback* parameters have the same interpretation as for the :class:`Shelf` class." -msgstr "زیرکلاسی از :class:`Shelf` که یک *filename* را به‌جای یک شیء دیکشنری‌مانند می‌پذیرد. پرونده زیربنایی با استفاده از :func:`dbm.open` باز خواهد شد. به‌طور پیش‌فرض، پرونده ایجاد می‌شود و برای خواندن و نوشتن باز می‌شود. پارامتر اختیاری *flag* همان تفسیری را دارد که برای تابع :func:`.open` وجود دارد. پارامترهای اختیاری *protocol* و *writeback* همان تفسیری را دارند که برای کلاس :class:`Shelf` وجود دارد." +msgid "A subclass of :class:`Shelf` which accepts a *filename* instead of a dict-like object. The underlying file will be opened using :func:`dbm.open`. By default, the file will be created and opened for both read and write. The optional *flag* parameter has the same interpretation as for the :func:`.open` function. The optional *protocol*, *writeback*, *serializer* and *deserializer* parameters have the same interpretation as in :func:`~shelve.open`." +msgstr "زیرکلاسی از :class:`Shelf` که به جای یک شیء دیکشنری‌مانند، یک *filename* را می‌پذیرد. پرونده‌ی زیربنایی با استفاده از :func:`dbm.open` باز خواهد شد. به طور پیش‌فرض، پرونده برای خواندن و نوشتن ایجاد و باز می‌شود. پارامتر اختیاری *flag* همان تفسیری را دارد که برای تابع :func:`.open` در نظر گرفته شده است. پارامترهای اختیاری *protocol*، *writeback*، *serializer* و *deserializer* همان تفسیری را دارند که در :func:`~shelve.open` وجود دارد." msgid "Example" msgstr "مثال" @@ -181,6 +209,15 @@ msgstr "" "\n" "d.close() # close it" +msgid "Exceptions" +msgstr "استثناها" + +msgid "Exception raised when one of the arguments *deserializer* and *serializer* is missing in the :func:`~shelve.open`, :class:`Shelf`, :class:`BsdDbShelf` and :class:`DbfilenameShelf`." +msgstr "استثنایی که وقتی یکی از آرگومان‌های *deserializer* و *serializer* در :func:`~shelve.open`، :class:`Shelf`، :class:`BsdDbShelf` و :class:`DbfilenameShelf` وجود نداشته باشد، بالا آورده می‌شود." + +msgid "The *deserializer* and *serializer* arguments must be given together." +msgstr "آرگومان‌های *deserializer* و *serializer* باید با هم داده شوند." + msgid "Module :mod:`dbm`" msgstr "ماژول :mod:`dbm`" diff --git a/library/shutil.po b/library/shutil.po index a07b4b8b..17b4533c 100644 --- a/library/shutil.po +++ b/library/shutil.po @@ -6,12 +6,13 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 09:25+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -318,8 +319,8 @@ msgstr "نوع :class:`bytes` اکنون پذیرفته می‌شود. اگر ن msgid "On Windows, the current directory is no longer prepended to the search path if *mode* includes ``os.X_OK`` and WinAPI ``NeedCurrentDirectoryForExePathW(cmd)`` is false, else the current directory is prepended even if it is already in the search path; ``PATHEXT`` is used now even when *cmd* includes a directory component or ends with an extension that is in ``PATHEXT``; and filenames that have no extension can now be found." msgstr "در ویندوز، اگر *mode* شامل ``os.X_OK`` باشد و WinAPI ``NeedCurrentDirectoryForExePathW(cmd)`` نادرست باشد، پوشه جاری دیگر به ابتدای مسیر جستجو افزوده نمی‌شود؛ در غیر این صورت، پوشه جاری حتی اگر از قبل در مسیر جستجو باشد، به ابتدای آن افزوده می‌شود؛ اکنون از ``PATHEXT`` استفاده می‌شود، حتی وقتی *cmd* شامل یک کامپوننت پوشه باشد یا با پسوندی موجود در ``PATHEXT`` تمام شود؛ و اکنون می‌توان نام پرونده‌هایی که پسوند ندارند را پیدا کرد." -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 "این استثنا، استثناهایی را که در حین یک عملیات چندپرونده‌ای پرتاب می‌شوند، جمع‌آوری می‌کند. برای :func:`copytree`، آرگومان استثنا فهرستی از تاپل‌های ۳-تایی (*srcname*, *dstname*, *exception*) است." +msgid "Subclass of :exc:`OSError` collecting exceptions raised during a multi-file operation. For :func:`copytree`, the exception argument is a list of 3-tuples (*srcname*, *dstname*, *exception*)." +msgstr "زیرکلاسی از :exc:`OSError` که استثناهای رخ‌داده طی یک عملیات چندپرونده‌ای را جمع‌آوری می‌کند. برای :func:`copytree`، آرگومان استثنا فهرستی از ۳-تایی‌ها (*srcname*، *dstname*، *exception*) است." msgid "Platform-dependent efficient copy operations" msgstr "عملیات کپی کارآمد وابسته به سکو" @@ -336,8 +337,8 @@ msgstr "در لینوکس از :func:`os.copy_file_range` یا :func:`os.sendfil msgid "On Solaris :func:`os.sendfile` is used." msgstr "در سولاریس، از :func:`os.sendfile` استفاده می‌شود." -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 "در ویندوز، :func:`shutil.copyfile` از اندازه پیش‌فرض بافر بزرگ‌تری (۱ MiB به جای ۶۴ KiB) استفاده می‌کند و از یک گونه مبتنی بر :func:`memoryview` برای :func:`shutil.copyfileobj` استفاده می‌شود." +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, which still reads and writes in a loop. :func:`shutil.copy2` uses the native ``CopyFile2`` call on Windows, which is the most efficient method, supports copy-on-write, and preserves metadata." +msgstr "روی ویندوز، تابع :func:`shutil.copyfile` از اندازه‌ی بافر پیش‌فرض بزرگ‌تری (۱ مگابایت به جای ۶۴ کیلوبایت) استفاده می‌کند و نوعی از تابع :func:`shutil.copyfileobj` که بر اساس :func:`memoryview` است به کار گرفته می‌شود که همچنان خواندن و نوشتن را در یک حلقه انجام می‌دهد. تابع :func:`shutil.copy2` روی ویندوز از فراخوانی بومی ``CopyFile2`` استفاده می‌کند که کارآمدترین روش است، از قابلیت copy-on-write پشتیبانی می‌کند و فراداده را حفظ می‌نماید." msgid "If the fast-copy operation fails and no data was written in the destination file then shutil will silently fall back to less efficient :func:`copyfileobj` function internally." msgstr "اگر عملیات کپی سریع (fast-copy) ناموفق باشد و هیچ داده‌ای در پرونده مقصد نوشته نشده باشد، shutil به‌صورت داخلی و بی‌صدا به تابع کم‌بازده‌تر :func:`copyfileobj` بازمی‌گردد." @@ -427,17 +428,17 @@ msgstr "ابزارهای سطح بالا برای ایجاد و خواندن پ msgid "Create an archive file (such as zip or tar) and return its name." msgstr "یک پرونده آرشیو (مانند zip یا tar) ایجاد می‌کند و نام آن را برمی‌گرداند." -msgid "*base_name* is the name of the file to create, including the path, minus any format-specific extension." -msgstr "*base_name* نام پرونده‌ای است که ایجاد می‌شود، شامل مسیر، بدون هیچ پسوند مخصوص قالب." +msgid "*base_name* is a string or :term:`path-like object` specifying the name of the file to create, including the path, minus any format-specific extension." +msgstr "*base_name* یک رشته یا :term:`شیء شبه‌مسیر ` است که نام پرونده‌ی قابل ایجاد را مشخص می‌کند، شامل مسیر، منهای هرگونه پسوند خاصِ فرمت." 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), \"xztar\" (if the :mod:`lzma` module is available), or \"zstdtar\" (if the :mod:`compression.zstd` module is available)." msgstr "*format* قالب بایگانی است: یکی از \"zip\" (اگر ماژول :mod:`zlib` در دسترس باشد)، \"tar\"، \"gztar\" (اگر ماژول :mod:`zlib` در دسترس باشد)، \"bztar\" (اگر ماژول :mod:`bz2` در دسترس باشد)، \"xztar\" (اگر ماژول :mod:`lzma` در دسترس باشد)، یا \"zstdtar\" (اگر ماژول :mod:`compression.zstd` در دسترس باشد)." -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 "*root_dir* پوشه‌ای است که پوشه‌ی ریشه‌ی بایگانی خواهد بود؛ همه‌ی مسیرهای داخل بایگانی نسبت به آن نسبی خواهند بود؛ برای مثال، معمولاً پیش از ایجاد بایگانی، با chdir وارد *root_dir* می‌شویم." +msgid "*root_dir* is a string or :term:`path-like object` specifying a directory that will be the root directory of the archive, all paths in the archive will be relative to it; for example, we typically chdir into *root_dir* before creating the archive." +msgstr "*root_dir* یک رشته یا :term:`شیء شبه‌مسیر ` است که پوشه‌ای را مشخص می‌کند که پوشه‌ی ریشه‌ی آرشیو خواهد بود؛ تمام مسیرهای موجود در آرشیو نسبت به آن خواهند بود؛ برای مثال، ما معمولاً پیش از ایجاد آرشیو با استفاده از chdir وارد *root_dir* می‌شویم." -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. *base_dir* must be given relative to *root_dir*. See :ref:`shutil-archiving-example-with-basedir` for how to use *base_dir* and *root_dir* together." -msgstr "*base_dir* پوشه‌ای است که بایگانی را از آن آغاز می‌کنیم؛ یعنی *base_dir* پیشوند مشترک همه‌ی پرونده‌ها و پوشه‌های درون بایگانی خواهد بود. *base_dir* باید نسبت به *root_dir* داده شود. برای چگونگی استفاده از *base_dir* و *root_dir* با یکدیگر، به :ref:`shutil-archiving-example-with-basedir` مراجعه کنید." +msgid "*base_dir* is a string or :term:`path-like object` specifying a directory where we start archiving from; i.e. *base_dir* will be the common prefix of all files and directories in the archive. *base_dir* must be given relative to *root_dir*. See :ref:`shutil-archiving-example-with-basedir` for how to use *base_dir* and *root_dir* together." +msgstr "*base_dir* یک رشته یا :term:`شیء شبه‌مسیر ` است که پوشه‌ای را مشخص می‌کند که آرشیو کردن را از آنجا شروع می‌کنیم؛ یعنی *base_dir* پیشوند مشترک تمام پرونده‌ها و پوشه‌های درون آرشیو خواهد بود. *base_dir* باید به صورت نسبی نسبت به *root_dir* داده شود. برای اطلاع از نحوه‌ی استفاده‌ی همزمان از *base_dir* و *root_dir* به :ref:`shutil-archiving-example-with-basedir` مراجعه کنید." msgid "*root_dir* and *base_dir* both default to the current directory." msgstr "*root_dir* و *base_dir* هر دو به‌طور پیش‌فرض برابر با پوشه جاری هستند." @@ -466,6 +467,9 @@ msgstr "قالب مدرن pax (POSIX.1-2001) اکنون به‌جای قالب msgid "This function is now made thread-safe during creation of standard ``.zip`` and tar archives." msgstr "این تابع اکنون هنگام ایجاد بایگانی‌های استاندارد ``.zip`` و tar، ایمن از نظر نخی (thread-safe) شده است." +msgid "Accepts a :term:`path-like object` for *base_name*, *root_dir* and *base_dir*." +msgstr "یک :term:`شیء شبه‌مسیر ` را برای *base_name*، *root_dir* و *base_dir* می‌پذیرد." + msgid "Return a list of supported formats for archiving. Each element of the returned sequence is a tuple ``(name, description)``." msgstr "فهرستی از قالب‌های پشتیبانی‌شده برای بایگانی برمی‌گرداند. هر عنصر از دنباله‌ی برگردانده‌شده یک تاپل ``(name, description)`` است." diff --git a/library/signal.po b/library/signal.po index 3831d1f9..51f74f75 100644 --- a/library/signal.po +++ b/library/signal.po @@ -8,12 +8,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 14:15+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -312,18 +313,21 @@ msgstr ":data:`SIGKILL` و :data:`SIGSTOP` نمی‌توانند مسدود شو msgid "See also :func:`pause`, :func:`sigpending` and :func:`sigwait`." msgstr "همچنین :func:`pause`، :func:`sigpending` و :func:`sigwait` را ببینید." -msgid "Sets given interval timer (one of :const:`signal.ITIMER_REAL`, :const:`signal.ITIMER_VIRTUAL` or :const:`signal.ITIMER_PROF`) specified by *which* to fire after *seconds* (float is accepted, different from :func:`alarm`) and after that every *interval* seconds (if *interval* is non-zero). The interval timer specified by *which* can be cleared by setting *seconds* to zero." -msgstr "تایمر بینابینی مشخص‌شده توسط *which* (یکی از :const:`signal.ITIMER_REAL`، :const:`signal.ITIMER_VIRTUAL` یا :const:`signal.ITIMER_PROF`) را تنظیم می‌کند تا پس از *seconds* ثانیه فعال شود (float پذیرفته می‌شود، برخلاف :func:`alarm`) و پس از آن هر *interval* ثانیه فعال شود (اگر *interval* غیرصفر باشد). تایمر بینابینی مشخص‌شده توسط *which* را می‌توان با تنظیم *seconds* روی صفر پاک کرد." +msgid "Sets given interval timer (one of :const:`signal.ITIMER_REAL`, :const:`signal.ITIMER_VIRTUAL` or :const:`signal.ITIMER_PROF`) specified by *which* to fire after *seconds* (rounded up to microseconds, different from :func:`alarm`) and after that every *interval* seconds (if *interval* is non-zero). The interval timer specified by *which* can be cleared by setting *seconds* to zero." +msgstr "تایمر فاصله‌ای مشخص‌شده (یکی از :const:`signal.ITIMER_REAL`، :const:`signal.ITIMER_VIRTUAL` یا :const:`signal.ITIMER_PROF`) که توسط *which* مشخص شده است را تنظیم می‌کند تا پس از *seconds* (گرد شده رو به بالا به میکروثانیه، متفاوت از :func:`alarm`) و پس از آن هر *interval* ثانیه (اگر *interval* غیرصفر باشد) آتش شود. تایمر فاصله‌ای مشخص‌شده توسط *which* را می‌توان با تنظیم کردن *seconds* روی صفر پاک کرد." msgid "When an interval timer fires, a signal is sent to the process. The signal sent is dependent on the timer being used; :const:`signal.ITIMER_REAL` will deliver :const:`SIGALRM`, :const:`signal.ITIMER_VIRTUAL` sends :const:`SIGVTALRM`, and :const:`signal.ITIMER_PROF` will deliver :const:`SIGPROF`." msgstr "وقتی یک زمان‌سنج بازه‌ای فعال می‌شود، یک سیگنال به فرایند ارسال می‌شود. سیگنال ارسالی به زمان‌سنج مورد استفاده بستگی دارد؛ :const:`signal.ITIMER_REAL` سیگنال :const:`SIGALRM` را ارسال می‌کند، :const:`signal.ITIMER_VIRTUAL` سیگنال :const:`SIGVTALRM` را ارسال می‌کند، و :const:`signal.ITIMER_PROF` سیگنال :const:`SIGPROF` را ارسال می‌کند." -msgid "The old values are returned as a tuple: (delay, interval)." -msgstr "مقادیر قدیمی به‌صورت یک تاپل بازگردانده می‌شوند: (delay, interval)." +msgid "The old values are returned as a two-tuple of floats: (``delay``, ``interval``)." +msgstr "مقادیر قدیمی به صورت یک ۲-تایی از اعداد اعشاری برگردانده می‌شوند: (``delay``، ``interval``)." msgid "Attempting to pass an invalid interval timer will cause an :exc:`ItimerError`." msgstr "تلاش برای ارسال یک زمان‌سنج بازه‌ای (interval timer) نامعتبر باعث بروز :exc:`ItimerError` می‌شود." +msgid "Accepts any real numbers as *seconds* and *interval*, not only integers or floats." +msgstr "هر عدد حقیقی را به عنوان *seconds* و *interval* می‌پذیرد، و محدود به اعداد صحیح یا اعشاری نیست." + msgid "Returns current value of a given interval timer specified by *which*." msgstr "مقدار فعلی زمان‌سنج بازه‌ای مشخص‌شده توسط *which* را برمی‌گرداند." @@ -414,6 +418,9 @@ msgstr "همچنین ببینید :func:`pause`، :func:`sigwait` و :func:`sigw msgid "The function is now retried with the recomputed *timeout* if interrupted by a signal not in *sigset* and the signal handler does not raise an exception (see :pep:`475` for the rationale)." msgstr "این تابع اکنون در صورتی که با سیگنالی خارج از *sigset* قطع شود و هندلر سیگنال استثنایی پرتاب نکند، با *timeout* دوباره محاسبه‌شده مجدداً اجرا می‌شود (برای دلیل، :pep:`475` را ببینید)." +msgid "Accepts any real number as *timeout*, not only integer or float." +msgstr "هر عدد حقیقی را به عنوان *timeout* می‌پذیرد، نه فقط عدد صحیح یا عدد اعشاری." + msgid "Examples" msgstr "مثال‌ها" diff --git a/library/site.po b/library/site.po index 4ff87e70..d4423ac7 100644 --- a/library/site.po +++ b/library/site.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 01:13+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -32,8 +33,8 @@ msgstr "**کد منبع:** :source:`Lib/site.py`" msgid "**This module is automatically imported during initialization.** The automatic import can be suppressed using the interpreter's :option:`-S` option." msgstr "این ماژول در حین راه‌اندازی به‌طور خودکار ایمپورت می‌شود. می‌توان با استفاده از گزینه‌ی :option:`-S` مفسر، از ایمپورت خودکار جلوگیری کرد." -msgid "Importing this module normally appends site-specific paths to the module search path and adds :ref:`callables `, including :func:`help` to the built-in namespace. However, Python startup option :option:`-S` blocks this and this module can be safely imported with no automatic modifications to the module search path or additions to the builtins. To explicitly trigger the usual site-specific additions, call the :func:`main` function." -msgstr "ایمپورت این ماژول معمولاً مسیرهای مختص سایت را به مسیر جستجوی ماژول اضافه می‌کند و :ref:`callables `، از جمله :func:`help`، را به فضای نام توکار می‌افزاید. با این حال، گزینه‌ی راه‌اندازی پایتون :option:`-S` این را مسدود می‌کند و می‌توان این ماژول را به‌صورت امن، بدون هیچ‌گونه تغییر خودکار در مسیر جستجوی ماژول یا افزودن موارد به توکارها، ایمپورت کرد. برای فعال‌سازی صریح افزودن‌های معمول مختص سایت، تابع :func:`main` را فراخوانی کنید." +msgid "Importing this module normally appends site-specific paths to the module search path and adds :ref:`callables `, including :func:`help` to the built-in namespace. However, Python startup option :option:`-S` blocks this, and this module can be safely imported with no automatic modifications to the module search path or additions to the builtins. To explicitly trigger the usual site-specific additions, call the :func:`main` function." +msgstr "ایمپورت کردن این ماژول به طور معمول مسیرهای مختص سایت را به مسیر جستجوی ماژول اضافه می‌کند و :ref:`callables `، از جمله :func:`help` را به فضای نام درونی می‌افزاید. با این حال، گزینه‌ی راه‌اندازی پایتون :option:`-S` مانع از این کار می‌شود و این ماژول را می‌توان با خیال راحت و بدون هیچ‌گونه تغییر خودکار در مسیر جستجوی ماژول یا افزودنی‌ها به موارد درونی، ایمپورت کرد. برای راه‌اندازی صریح افزودنی‌های معمول مختص سایت، تابع :func:`main` را فراخوانی کنید." msgid "Importing the module used to trigger paths manipulation even when using :option:`-S`." msgstr "ایمپورت کردن ماژول، پیش‌تر حتی در صورت استفاده از :option:`-S` نیز باعث دست‌کاری مسیرها می‌شد." @@ -50,20 +51,77 @@ msgstr "در یونیکس، نصب‌های پایتون :term:`نخ‌آزاد msgid ":mod:`!site` is no longer responsible for updating :data:`sys.prefix` and :data:`sys.exec_prefix` on :ref:`sys-path-init-virtual-environments`. This is now done during the :ref:`path initialization `. As a result, under :ref:`sys-path-init-virtual-environments`, :data:`sys.prefix` and :data:`sys.exec_prefix` no longer depend on the :mod:`!site` initialization, and are therefore unaffected by :option:`-S`." msgstr ":mod:`!site` دیگر مسئول به‌روزرسانی :data:`sys.prefix` و :data:`sys.exec_prefix` در :ref:`sys-path-init-virtual-environments` نیست. این کار اکنون در حین :ref:`مقداردهی اولیه مسیر ` انجام می‌شود. در نتیجه، در :ref:`sys-path-init-virtual-environments`، :data:`sys.prefix` و :data:`sys.exec_prefix` دیگر به مقداردهی اولیه :mod:`!site` وابسته نیستند و بنابراین تحت تأثیر :option:`-S` قرار نمی‌گیرند." -msgid "When running under a :ref:`virtual environment `, the ``pyvenv.cfg`` file in :data:`sys.prefix` is checked for site-specific configurations. If the ``include-system-site-packages`` key exists and is set to ``true`` (case-insensitive), the system-level prefixes will be searched for site-packages, otherwise they won't." -msgstr "هنگام اجرا در یک :ref:`محیط مجازی `، پرونده ``pyvenv.cfg`` در :data:`sys.prefix` از نظر پیکربندی‌های خاص سایت بررسی می‌شود. اگر کلید ``include-system-site-packages`` وجود داشته باشد و روی ``true`` تنظیم شده باشد (بدون حساسیت به بزرگی و کوچکی حروف)، پیشوندهای سطح سیستم برای site-packages جستجو خواهند شد، در غیر این صورت جستجو نخواهند شد." +msgid "When running under a :ref:`virtual environment `, the ``pyvenv.cfg`` file in :data:`sys.prefix` is checked for site-specific configurations. If the ``include-system-site-packages`` key exists and is set to ``true`` (case-insensitive), the system-level prefixes will be searched for site-packages, otherwise they won't. If the system-level prefixes are not searched then the user site prefixes are also implicitly not searched for site-packages." +msgstr "هنگام اجرا تحت یک :ref:`محیط مجازی `، پرونده‌ی ``pyvenv.cfg`` در :data:`sys.prefix` از نظر پیکربندی‌های مختص سایت بررسی می‌شود. اگر کلید ``include-system-site-packages`` وجود داشته باشد و روی ``true`` تنظیم شده باشد (بدون حساسیت به بزرگی و کوچکی حروف)، پیشوندهای سطح سیستم برای یافتن بسته‌های سایت جستجو خواهند شد، در غیر این صورت جستجو نمی‌شوند. اگر پیشوندهای سطح سیستم جستجو نشوند، پیشوندهای سایتِ کاربر نیز به طور ضمنی برای یافتن بسته‌های سایت جستجو نخواهند شد." -msgid "A path configuration file is a file whose name has the form :file:`{name}.pth` and exists in one of the four directories mentioned above; its contents are additional items (one per line) to be added to ``sys.path``. Non-existing items are never added to ``sys.path``, and no check is made that the item refers to a directory rather than a file. No item is added to ``sys.path`` more than once. Blank lines and lines beginning with ``#`` are skipped. Lines starting with ``import`` (followed by space or tab) are executed." -msgstr "پرونده پیکربندی مسیر پرونده‌ای است که نام آن به شکل :file:`{name}.pth` است و در یکی از چهار پوشه‌ی ذکرشده در بالا وجود دارد؛ محتویات آن شامل آیتم‌های اضافی (هر کدام در یک خط) برای اضافه شدن به ``sys.path`` است. آیتم‌های ناموجود هرگز به ``sys.path`` اضافه نمی‌شوند و هیچ بررسی‌ای انجام نمی‌شود که آیتم به یک پوشه اشاره می‌کند، نه یک پرونده. هیچ آیتمی بیش از یک بار به ``sys.path`` اضافه نمی‌شود. سطرهای خالی و سطرهایی که با ``#`` شروع می‌شوند، نادیده گرفته می‌شوند. سطرهایی که با ``import`` شروع می‌شوند (و پس از آن یک فاصله یا tab آمده باشد) اجرا می‌شوند." +msgid "The :mod:`!site` module recognizes two startup configuration files of the form :file:`{name}.pth` for path configurations, and :file:`{name}.start` for pre-first-line code execution. Both files can exist in one of the four directories mentioned above. Within each directory, these files are sorted alphabetically by filename, then parsed in sorted order." +msgstr "ماژول :mod:`!site` دو پرونده‌ی پیکربندی راه‌اندازی به شکل :file:`{name}.pth` برای پیکربندی‌های مسیر، و :file:`{name}.start` برای اجرای کد پیش از خط اول را تشخیص می‌دهد. هر دو پرونده می‌توانند در یکی از چهار پوشه‌ی ذکر شده در بالا وجود داشته باشند. درون هر پوشه، این پرونده‌ها بر اساس نام پرونده به صورت الفبایی مرتب می‌شوند و سپس به ترتیب مرتب‌شده تحلیل می‌شوند." -msgid "An executable line in a :file:`.pth` file is run at every Python startup, regardless of whether a particular module is actually going to be used. Its impact should thus be kept to a minimum. The primary intended purpose of executable lines is to make the corresponding module(s) importable (load 3rd-party import hooks, adjust :envvar:`PATH` etc). Any other initialization is supposed to be done upon a module's actual import, if and when it happens. Limiting a code chunk to a single line is a deliberate measure to discourage putting anything more complex here." -msgstr "یک خط قابل اجرا در پرونده :file:`.pth` در هر بار راه‌اندازی پایتون اجرا می‌شود، صرف‌نظر از اینکه آیا ماژول خاصی واقعاً استفاده خواهد شد یا خیر. بنابراین باید تأثیر آن در حداقل نگه‌داشته شود. هدف اصلی مورد نظر برای سطرهای قابل اجرا، قابل ایمپورت کردن ماژول(های) مربوطه است (بارگذاری قلاب‌های ایمپورت شخص ثالث، تنظیم :envvar:`PATH` و غیره). هرگونه مقداردهی اولیه دیگر باید هنگام ایمپورت واقعی ماژول انجام شود، اگر و هرگاه رخ دهد. محدود کردن یک قطعه کد به یک خط، تدبیری عمدی برای منصرف کردن از قرار دادن هر چیز پیچیده‌تر در اینجا است." +msgid "Path extensions (:file:`.pth` files)" +msgstr "پسوندهای مسیر (پرونده‌های :file:`.pth`)" + +msgid ":file:`{name}.pth` contains additional items (one per line) to be appended to ``sys.path``. Items that name non-existing directories are never added to ``sys.path``, and no check is made that the item refers to a directory rather than a file. No item is added to ``sys.path`` more than once. Blank lines and lines beginning with ``#`` are skipped." +msgstr "پرونده‌ی :file:`{name}.pth` حاوی آیتم‌های اضافی (هر سطر یک مورد) است که به ``sys.path`` اضافه می‌شوند. آیتم‌هایی که نام پوشه‌های ناموجود را دارند هرگز به ``sys.path`` اضافه نمی‌شوند و هیچ بررسی انجام نمی‌شود که آیا آیتم به یک پوشه اشاره دارد یا یک پرونده. هیچ آیتمی بیش از یک بار به ``sys.path`` اضافه نمی‌شود. سطرهای خالی و سطرهایی که با ``#`` شروع می‌شوند نادیده گرفته می‌شوند." + +msgid "For backward compatibility, lines starting with ``import`` (followed by space or tab) are executed with :func:`exec`." +msgstr "به‌منظور سازگاری عقبگرد، سطرهایی که با ``import`` (به‌دنبال آن فاصله یا تب) شروع می‌شوند، با :func:`exec` اجرا می‌شوند." msgid "The :file:`.pth` files are now decoded by UTF-8 at first and then by the :term:`locale encoding` if it fails." msgstr "پرونده‌های :file:`.pth` اکنون ابتدا با UTF-8 کدگشایی می‌شوند و در صورت شکست، با :term:`locale encoding` کدگشایی می‌شوند." -msgid "For example, suppose ``sys.prefix`` and ``sys.exec_prefix`` are set to :file:`/usr/local`. The Python X.Y library is then installed in :file:`/usr/local/lib/python{X.Y}`. Suppose this has a subdirectory :file:`/usr/local/lib/python{X.Y}/site-packages` with three subsubdirectories, :file:`foo`, :file:`bar` and :file:`spam`, and two path configuration files, :file:`foo.pth` and :file:`bar.pth`. Assume :file:`foo.pth` contains the following::" -msgstr "برای مثال، فرض کنید ``sys.prefix`` و ``sys.exec_prefix`` روی :file:`/usr/local` تنظیم شده‌اند. در این صورت کتابخانه‌ی پایتون X.Y در :file:`/usr/local/lib/python{X.Y}` نصب می‌شود. فرض کنید این پوشه یک زیرپوشه به نشانی :file:`/usr/local/lib/python{X.Y}/site-packages` دارد که خود دارای سه زیرپوشه به نام‌های :file:`foo`، :file:`bar` و :file:`spam` و دو پرونده پیکربندی مسیر به نام‌های :file:`foo.pth` و :file:`bar.pth` است. فرض کنید :file:`foo.pth` شامل موارد زیر است::" +msgid ":file:`.pth` file lines starting with ``import`` are deprecated. During the deprecation period, such lines are still executed (except in the case below), but a diagnostic message is emitted only when the :option:`-v` flag is given." +msgstr "سطرهای پرونده‌ی :file:`.pth` که با ``import`` شروع می‌شوند منسوخ شده‌اند. در طول دوره‌ی منسوخ‌سازی، این سطرها همچنان اجرا می‌شوند (به جز در مورد زیر)، اما پیام تشخیصی فقط زمانی صادر می‌شود که پرچم :option:`-v` داده شده باشد." + +msgid "``import`` lines in :file:`{name}.pth` are silently ignored when a :ref:`matching ` :file:`{name}.start` file exists." +msgstr "سطرهای ``import`` در :file:`{name}.pth` هنگامی که یک پرونده‌ی :ref:`matching ` :file:`{name}.start` وجود داشته باشد، به طور بی‌صدا نادیده گرفته می‌شوند." + +msgid "Errors on individual lines no longer abort processing of the rest of the file. Each error is reported and the remaining lines continue to be processed." +msgstr "خطاها در سطرهای فردی دیگر مانع پردازش بقیه‌ی پرونده نمی‌شوند. هر خطا گزارش می‌شود و پردازش سطرهای باقی‌مانده ادامه می‌یابد." + +msgid "Decoding :file:`{name}.pth` files in any encoding other than ``utf-8-sig`` is deprecated in Python 3.15, and support for decoding from the locale encoding will be removed in Python 3.20." +msgstr "کدگشایی پرونده‌های :file:`{name}.pth` با هر کدگذاری‌ای به غیر از ``utf-8-sig`` در پایتون ۳.۱۵ منسوخ شده است و پشتیبانی از کدگشایی با کدگذاری locale در پایتون ۳.۲۰ حذف خواهد شد." + +msgid "``import`` lines in :file:`{name}.pth` files are deprecated and will be silently ignored in Python 3.18 and 3.19. In Python 3.20 a warning will be produced for ``import`` lines in :file:`{name}.pth` files." +msgstr "سطرهای ``import`` در پرونده‌های :file:`{name}.pth` منسوخ شده‌اند و در نسخه‌های 3.18 و 3.19 پایتون به طور بی‌صدا نادیده گرفته خواهند شد. در نسخه‌ی 3.20 پایتون، برای سطرهای ``import`` در پرونده‌های :file:`{name}.pth` یک هشدار تولید خواهد شد." + +msgid "Startup entry points (:file:`.start` files)" +msgstr "نقاط ورودی راه‌اندازی (پرونده‌های :file:`.start`)" + +msgid "A startup entry point file is a file whose name has the form :file:`{name}.start` and exists in one of the site-packages directories described above. Each file specifies entry points to be called during interpreter startup, using the ``pkg.mod:callable`` syntax understood by :func:`pkgutil.resolve_name`." +msgstr "یک پرونده‌ی نقطه‌ی شروع راه‌اندازی، پرونده‌ای است که نام آن به شکل :file:`{name}.start` است و در یکی از پوشه‌های site-packages که در بالا توضیح داده شد قرار دارد. هر پرونده نقاط شروعی را مشخص می‌کند که باید در طول راه‌اندازی مفسر فراخوانی شوند، و این کار با استفاده از نحو ``pkg.mod:callable`` که توسط :func:`pkgutil.resolve_name` درک می‌شود، انجام می‌گیرد." + +msgid "Each non-blank line that does not begin with ``#`` must contain an entry point reference in the form ``pkg.mod:callable``. The colon and callable portion are mandatory. Each callable is invoked with no arguments, and any return value is discarded." +msgstr "هر سطر غیرخالی که با ``#`` شروع نمی‌شود باید شامل یک ارجاع نقطه‌ی ورود به شکل ``pkg.mod:callable`` باشد. دو نقطه و بخش فراخوانی‌پذیر الزامی هستند. هر فراخوانی‌پذیر بدون هیچ آرگومان فراخوانی می‌شود و هر مقدار بازگشتی دور انداخته می‌شود." + +msgid ":file:`.start` files are processed after all :file:`.pth` path extensions have been applied to :data:`sys.path`, ensuring that paths are available before any startup code runs." +msgstr "پرونده‌های :file:`.start` پس از اعمال تمام پسوندهای مسیر :file:`.pth` روی :data:`sys.path` پردازش می‌شوند و تضمین می‌کنند که مسیرها پیش از اجرای هرگونه کد راه‌اندازی در دسترس هستند." + +msgid "Unlike :data:`sys.path` extensions from :file:`.pth` files, duplicate entry points are **not** de-duplicated --- if an entry point appears more than once, it will be called more than once." +msgstr "برخلاف پسوندهای :data:`sys.path` از پرونده‌های :file:`.pth`، نقاط ورودی تکراری حذف‌تکرار **نمی‌شوند** — اگر یک نقطه‌ی ورودی بیش از یک بار ظاهر شود، بیش از یک بار فراخوانی خواهد شد." + +msgid "If an exception occurs during resolution or invocation of an entry point, a traceback is printed to :data:`sys.stderr` and processing continues with the remaining entry points." +msgstr "اگر استثنایی در طول حل یا فراخوانی یک نقطه‌ی ورود رخ دهد، یک ردگیری در :data:`sys.stderr` چاپ می‌شود و پردازش با نقاط ورود باقی‌مانده ادامه می‌یابد." + +msgid ":file:`.start` files must be encoded in UTF-8." +msgstr "پرونده‌های :file:`.start` باید با کدگذاری UTF-8 رمزگذاری شوند." + +msgid ":pep:`829` defined the original specification for these features." +msgstr ":pep:`829` مشخصات اصلی این ویژگی‌ها را تعریف کرده است." + +msgid "If a :file:`{name}.start` file exists alongside a :file:`{name}.pth` file with the same base name, any ``import`` lines in the :file:`.pth` file are ignored in favor of the entry points in the :file:`.start` file." +msgstr "اگر یک پرونده‌ی :file:`{name}.start` در کنار یک پرونده‌ی :file:`{name}.pth` با همان نام پایه وجود داشته باشد، هر سطر ``import`` در پرونده‌ی :file:`.pth` به نفع نقاط ورودی موجود در پرونده‌ی :file:`.start` نادیده گرفته می‌شود." + +msgid "Executable lines (``import`` lines in :file:`{name}.pth` files and :file:`{name}.start` file entry points) are always run at Python startup (unless :option:`-S` is given to disable the ``site.py`` module entirely), regardless of whether a particular module is actually going to be used." +msgstr "سطرهای قابل‌اجرا (سطرهای ``import`` در پرونده‌های :file:`{name}.pth` و نقاط ورودی پرونده‌ی :file:`{name}.start`) همیشه در زمان راه‌اندازی پایتون اجرا می‌شوند (مگر اینکه گزینه‌ی :option:`-S` برای غیرفعال کردن کامل ماژول ``site.py`` داده شده باشد)، صرف‌نظر از اینکه آیا قرار است از یک ماژول خاص واقعاً استفاده شود یا خیر." + +msgid ":file:`{name}.start` files invoke :func:`pkgutil.resolve_name` with ``strict=True``, which requires the full ``pkg.mod:callable`` form." +msgstr "پرونده‌های :file:`{name}.start` تابع :func:`pkgutil.resolve_name` را با مقدار ``strict=True`` فراخوانی می‌کنند، که به شکل کامل ``pkg.mod:callable`` نیاز دارد." + +msgid "Startup file examples" +msgstr "نمونه‌های پرونده‌ی راه‌اندازی" + +msgid "For example, suppose ``sys.prefix`` and ``sys.exec_prefix`` are set to :file:`/usr/local`. The Python X.Y library is then installed in :file:`/usr/local/lib/python{X.Y}`. Suppose this has a subdirectory :file:`/usr/local/lib/python{X.Y}/site-packages` with three sub-subdirectories, :file:`foo`, :file:`bar` and :file:`spam`, and two path configuration files, :file:`foo.pth` and :file:`bar.pth`. Assume :file:`foo.pth` contains the following::" +msgstr "برای مثال، فرض کنید ``sys.prefix`` و ``sys.exec_prefix`` روی :file:`/usr/local` تنظیم شده باشند. کتابخانه‌ی پایتون X.Y سپس در :file:`/usr/local/lib/python{X.Y}` نصب می‌شود. فرض کنید این مسیر دارای یک زیرپوشه به نام :file:`/usr/local/lib/python{X.Y}/site-packages` با سه زیرپوشه به نام‌های :file:`foo`، :file:`bar` و :file:`spam`، و دو پرونده‌ی پیکربندی مسیر به نام‌های :file:`foo.pth` و :file:`bar.pth` باشد. فرض کنید :file:`foo.pth` شامل موارد زیر باشد::" msgid "" "# foo package configuration\n" @@ -103,6 +161,39 @@ msgstr "" msgid "Note that :file:`bletch` is omitted because it doesn't exist; the :file:`bar` directory precedes the :file:`foo` directory because :file:`bar.pth` comes alphabetically before :file:`foo.pth`; and :file:`spam` is omitted because it is not mentioned in either path configuration file." msgstr "توجه داشته باشید که :file:`bletch` کنار گذاشته شده است، زیرا وجود ندارد؛ پوشه‌ی :file:`bar` پیش از پوشه‌ی :file:`foo` قرار می‌گیرد، زیرا :file:`bar.pth` از نظر الفبایی پیش از :file:`foo.pth` می‌آید؛ و :file:`spam` کنار گذاشته شده است، زیرا در هیچ‌کدام از پرونده‌های پیکربندی مسیر ذکر نشده است." +msgid "Let's say that there is also a :file:`foo.start` file containing the following::" +msgstr "فرض کنید پرونده‌ی :file:`foo.start` دیگری نیز وجود دارد که شامل موارد زیر است::" + +msgid "" +"# foo package startup code\n" +"\n" +"foo.submod:initialize" +msgstr "" +"# foo package startup code\n" +"\n" +"foo.submod:initialize" + +msgid "Now, after ``sys.path`` has been extended as above, and before Python turns control over to user code, the ``foo.submod`` module is imported and the ``initialize()`` function from that module is called." +msgstr "اکنون، پس از اینکه ``sys.path`` مطابق بالا گسترش یافت و پیش از اینکه پایتون کنترل را به کد کاربر واگذار کند، ماژول ``foo.submod`` ایمپورت شده و تابع ``initialize()`` از آن ماژول فراخوانی می‌شود." + +msgid "Migrating from ``import`` lines in ``.pth`` files to ``.start`` files" +msgstr "مهاجرت از سطرهای ``import`` در پرونده‌های ``.pth`` به پرونده‌های ``.start``" + +msgid "If your package currently ships a :file:`{name}.pth` file, you can keep all ``sys.path`` extension lines unchanged. Only ``import`` lines need to be migrated." +msgstr "اگر بسته‌ی شما در حال حاضر یک پرونده‌ی :file:`{name}.pth` ارائه می‌دهد، می‌توانید تمام سطرهای گسترش ``sys.path`` را دست‌نخورده نگه دارید. فقط سطرهای ``import`` نیاز به مهاجرت دارند." + +msgid "To migrate, create a callable (taking zero arguments) within an importable module in your package. Reference it as a ``pkg.mod:callable`` entry point in a matching :file:`{name}.start` file. Move everything on your ``import`` line after the first semi-colon into the ``callable()`` function." +msgstr "برای مهاجرت، یک شیء فراخوانی‌پذیر (بدون هیچ آرگومان) درون یک ماژول قابل‌ایمپورت در بسته‌ی خود ایجاد کنید. به آن به عنوان یک نقطه‌ی ورودی ``pkg.mod:callable`` در یک پرونده‌ی :file:`{name}.start` متناظر ارجاع دهید. هر چیزی را که در سطر ``import`` شما پس از نقطه‌ویرگول اول قرار دارد، به تابع ``callable()`` منتقل کنید." + +msgid "If your package must straddle older Pythons that do not support :pep:`829` and newer Pythons that do, change the ``import`` lines in your :file:`{name}.pth` to use the following form:" +msgstr "اگر بسته‌ی شما باید هم با نسخه‌های قدیمی‌تر پایتون که از :pep:`829` پشتیبانی نمی‌کنند و هم با نسخه‌های جدیدتر که پشتیبانی می‌کنند سازگار بماند، سطرهای ``import`` را در پرونده‌ی :file:`{name}.pth` خود تغییر دهید تا از شکل زیر استفاده کنند:" + +msgid "import pkg.mod; pkg.mod.callable()" +msgstr "import pkg.mod; pkg.mod.callable()" + +msgid "Older Pythons will execute these ``import`` lines, while newer Pythons will ignore them in favor of the :file:`{name}.start` file. After the straddling period, remove all ``import`` lines from your :file:`.pth` files." +msgstr "نسخه‌های قدیمی‌تر پایتون این سطرهای ``import`` را اجرا خواهند کرد، در حالی که نسخه‌های جدیدتر پایتون آن‌ها را به نفع پرونده‌ی :file:`{name}.start` نادیده خواهند گرفت. پس از دوره‌ی گذار، تمام سطرهای ``import`` را از پرونده‌های :file:`.pth` خود حذف کنید." + msgid ":mod:`!sitecustomize`" msgstr ":mod:`!sitecustomize`" @@ -148,8 +239,58 @@ msgstr "همه‌ی پوشه‌های استانداردِ خاصِ سایت ر msgid "This function used to be called unconditionally." msgstr "این تابع پیش‌تر به‌طور غیرشرطی فراخوانی می‌شد." -msgid "Add a directory to sys.path and process its :file:`.pth` files. Typically used in :mod:`sitecustomize` or :mod:`usercustomize` (see above)." -msgstr "یک پوشه را به sys.path اضافه می‌کند و پرونده‌های :file:`.pth` آن را پردازش می‌کند. معمولاً در :mod:`sitecustomize` یا :mod:`usercustomize` استفاده می‌شود (بالا را ببینید)." +msgid "Join *paths* with :func:`os.path.join`, attempt to make the result absolute with :func:`os.path.abspath`, and return a 2-tuple containing the absolute path and its case-normalized form as produced by :func:`os.path.normcase`. If :func:`os.path.abspath` raises :exc:`OSError`, the joined path is used unchanged for the case-normalization step." +msgstr "مسیرها (*paths*) را با تابع :func:`os.path.join` به هم متصل کنید، تلاش کنید نتیجه را با تابع :func:`os.path.abspath` به مسیر مطلق تبدیل کنید، و یک تاپل ۲تایی شامل مسیر مطلق و فرم نرمال‌شده‌ی بزرگ/کوچک‌نمایی حروف آن را که توسط تابع :func:`os.path.normcase` تولید شده است، برگردانید. اگر تابع :func:`os.path.abspath` خطای :exc:`OSError` را ایجاد کند، مسیر متصل‌شده بدون تغییر برای مرحله‌ی نرمال‌سازی بزرگ/کوچک‌نمایی استفاده می‌شود." + +msgid "The second element of the returned tuple is the form used throughout the :mod:`!site` module to compare paths on case-insensitive file systems, and is what populates the ``known_paths`` sets that prevent duplicate :data:`sys.path` entries in various APIs within this module." +msgstr "عنصر دوم تاپل بازگردانده‌شده، فرمی است که در سرتاسر ماژول :mod:`!site` برای مقایسه‌ی مسیرها در سیستم پرونده‌ی حساس به بزرگی و کوچکی حروف استفاده می‌شود، و همان چیزی است که مجموعه‌های ``known_paths`` را پر می‌کند تا از ورود‌ی‌های تکراری :data:`sys.path` در APIهای مختلف درون این ماژول جلوگیری کند." + +msgid "Instances of this class accumulate interpreter startup configuration data from one or more site directories. They are the preferred interface for batching the processing of :file:`.pth` and :file:`.start` files across multiple site directories, so that every :data:`sys.path` extension is visible before any startup code runs." +msgstr "نمونه‌های این کلاس، داده‌های پیکربندی راه‌اندازی مفسر را از یک یا چند دایرکتوری سایت انباشته می‌کنند. آن‌ها رابط ترجیحی برای پردازش دسته‌ای پرونده‌های :file:`.pth` و :file:`.start` در چندین دایرکتوری سایت هستند، به‌طوری‌که هر پسوند :data:`sys.path` قبل از اجرای هرگونه کد راه‌اندازی قابل‌مشاهده باشد." + +msgid "The optional *known_paths* argument is a set of case-normalized paths (which can be produced by :func:`makepath`) used to prevent duplicate :data:`sys.path` entries. When ``None`` (the default), the set is built from the current :data:`sys.path`. :func:`main` implicitly uses an instance of this class." +msgstr "آرگومان اختیاری *known_paths* مجموعه‌ای از مسیرهای نرمال‌شده از نظر بزرگی و کوچکی حروف است (که می‌توانند توسط تابع :func:`makepath` تولید شوند) و برای جلوگیری از ورود‌ی‌های تکراری :data:`sys.path` استفاده می‌شود. هنگامی که مقدار ``None`` باشد (پیش‌فرض)، مجموعه از :data:`sys.path` فعلی ساخته می‌شود. تابع :func:`main` به طور ضمنی از نمونه‌ای از این کلاس استفاده می‌کند." + +msgid "Typical use:" +msgstr "کاربرد معمولی:" + +msgid "" +"state = site.StartupState()\n" +"for sitedir in site_dirs:\n" +" state.addsitedir(sitedir)\n" +"state.process()" +msgstr "" +"state = site.StartupState()\n" +"for sitedir in site_dirs:\n" +" state.addsitedir(sitedir)\n" +"state.process()" + +msgid "Read the :file:`.pth` and :file:`.start` files in *sitedir* and record their :data:`sys.path` extensions, deprecated :file:`.pth` ``import`` lines, and :file:`.start` entry points on this state. The recorded data is not applied until :meth:`process` is called." +msgstr "پرونده‌های :file:`.pth` و :file:`.start` را در *sitedir* بخوانید و پسوندهای :data:`sys.path` آن‌ها، خطوط ``import`` منسوخ پرونده‌های :file:`.pth` و نقاط ورود :file:`.start` را در این وضعیت ثبت کنید. داده‌های ثبت‌شده تا زمانی که :meth:`process` فراخوانی نشود، اعمال نمی‌شوند." + +msgid "Add the per-user site-packages directory, if enabled and if it exists. The directory's startup data is accumulated for later processing by :meth:`process`." +msgstr "در صورت فعال بودن و وجود داشتن، پوشه‌ی site-packages مخصوص کاربر را اضافه کنید. داده‌های راه‌اندازی پوشه برای پردازش بعدی توسط :meth:`process` جمع‌آوری می‌شوند." + +msgid "Add global site-packages directories, computed from *prefixes* or from the global :data:`PREFIXES` when *prefixes* is ``None``. Each directory's startup data is accumulated for later processing by :meth:`process`." +msgstr "پوشه‌های سراسری site-packages، که از *prefixes* یا از :data:`PREFIXES` سراسری زمانی که *prefixes* برابر با ``None`` است محاسبه می‌شوند را اضافه کنید. داده‌های راه‌اندازی هر پوشه برای پردازش بعدی توسط :meth:`process` انباشته می‌شوند." + +msgid "Apply the accumulated state by first adding the path extensions to :data:`sys.path`, then executing the :file:`.start` file entry points and :file:`.pth` file ``import`` lines (:ref:`deprecated `)." +msgstr "وضعیت انباشته‌شده را ابتدا با افزودن پسوندهای مسج به :data:`sys.path`، سپس اجرای نقاط ورود پرونده‌ی :file:`.start` و سطرهای ``import`` پرونده‌ی :file:`.pth` (:ref:`منسوخ‌شده `) اعمال کنید." + +msgid "This method is not idempotent and must not be called more than once on the same instance. Doing so will apply the accumulated state more than once, re-running entry points and ``import`` lines." +msgstr "این متد هم‌توان نیست و نباید بیش از یک بار روی همان نمونه فراخوانی شود. انجام این کار وضعیت انباشته‌شده را بیش از یک بار اعمال می‌کند و نقاط ورود و سطرهای ``import`` را دوباره اجرا می‌کند." + +msgid "Add a directory to sys.path and parse the :file:`.pth` and :file:`.start` files found in that directory. Typically used in :mod:`sitecustomize` or :mod:`usercustomize` (see above)." +msgstr "یک پوشه را به sys.path اضافه کنید و پرونده‌های :file:`.pth` و :file:`.start` یافت‌شده در آن پوشه را تجزیه (parse) کنید. معمولاً در :mod:`sitecustomize` یا :mod:`usercustomize` استفاده می‌شود (به بالا مراجعه کنید)." + +msgid "The *known_paths* argument is an optional set of case-normalized paths used to prevent duplicate :data:`sys.path` entries. When ``None`` (the default), the set is built from the current :data:`sys.path`." +msgstr "آرگومان *known_paths* مجموعه‌ای اختیاری از مسیرهای نرمال‌شده از نظر بزرگی و کوچکی حروف است که برای جلوگیری از ورودهای تکراری :data:`sys.path` استفاده می‌شود. وقتی ``None`` باشد (پیش‌فرض)، این مجموعه از :data:`sys.path` فعلی ساخته می‌شود." + +msgid "For batched processing across multiple site directories, build a :class:`StartupState` explicitly and call :meth:`StartupState.addsitedir` on it; that defers :file:`.pth` and :file:`.start` processing until a single :meth:`StartupState.process` call, ensuring every :data:`sys.path` extension is visible before any startup code runs." +msgstr "برای پردازش دسته‌ای در چندین پوشه‌ی site، یک :class:`StartupState` به طور صریح بسازید و :meth:`StartupState.addsitedir` را روی آن فراخوانی کنید؛ این کار پردازش :file:`.pth` و :file:`.start` را تا زمان یک فراخوانی منفرد :meth:`StartupState.process` به تأخیر می‌اندازد و تضمین می‌کند که هر پسوند :data:`sys.path` قبل از اجرای هرگونه کد راه‌اندازی قابل مشاهده باشد." + +msgid "Also processes :file:`.start` files. See :ref:`site-start-files`." +msgstr "همچنین پرونده‌های :file:`.start` را پردازش می‌کند. نگاه کنید به :ref:`site-start-files`." msgid "Return a list containing all global site-packages directories." msgstr "فهرستی شامل تمام پوشه‌های site-packages سراسری را برمی‌گرداند." @@ -197,6 +338,9 @@ msgstr "اگر گزینه‌ای داده شود، اسکریپت با یکی ا msgid ":pep:`370` -- Per user site-packages directory" msgstr ":pep:`370` -- پوشه site-packages برای هر کاربر" +msgid ":pep:`829` -- Startup entry points and the deprecation of import lines in ``.pth`` files" +msgstr ":pep:`829` -- نقاط ورود راه‌اندازی و منسوخ شدن سطرهای import در پرونده‌های ``.pth``" + msgid ":ref:`sys-path-init` -- The initialization of :data:`sys.path`." msgstr ":ref:`sys-path-init` -- مقداردهی اولیه‌ی :data:`sys.path`." @@ -235,3 +379,6 @@ msgstr "پیکربندی" msgid "file" msgstr "پرونده" + +#~ msgid "An executable line in a :file:`.pth` file is run at every Python startup, regardless of whether a particular module is actually going to be used. Its impact should thus be kept to a minimum. The primary intended purpose of executable lines is to make the corresponding module(s) importable (load 3rd-party import hooks, adjust :envvar:`PATH` etc). Any other initialization is supposed to be done upon a module's actual import, if and when it happens. Limiting a code chunk to a single line is a deliberate measure to discourage putting anything more complex here." +#~ msgstr "یک خط قابل اجرا در پرونده :file:`.pth` در هر بار راه‌اندازی پایتون اجرا می‌شود، صرف‌نظر از اینکه آیا ماژول خاصی واقعاً استفاده خواهد شد یا خیر. بنابراین باید تأثیر آن در حداقل نگه‌داشته شود. هدف اصلی مورد نظر برای سطرهای قابل اجرا، قابل ایمپورت کردن ماژول(های) مربوطه است (بارگذاری قلاب‌های ایمپورت شخص ثالث، تنظیم :envvar:`PATH` و غیره). هرگونه مقداردهی اولیه دیگر باید هنگام ایمپورت واقعی ماژول انجام شود، اگر و هرگاه رخ دهد. محدود کردن یک قطعه کد به یک خط، تدبیری عمدی برای منصرف کردن از قرار دادن هر چیز پیچیده‌تر در اینجا است." diff --git a/library/smtplib.po b/library/smtplib.po index dbd74529..22b96803 100644 --- a/library/smtplib.po +++ b/library/smtplib.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 16:22+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -39,8 +40,14 @@ msgstr "دسترس‌پذیری" msgid "This module does not work or is not available on WebAssembly. See :ref:`wasm-availability` for more information." msgstr "این ماژول روی WebAssembly کار نمی‌کند یا در دسترس نیست. برای اطلاعات بیشتر :ref:`wasm-availability` را ببینید." -msgid "An :class:`SMTP` instance encapsulates an SMTP connection. It has methods that support a full repertoire of SMTP and ESMTP operations. If the optional *host* and *port* parameters are given, the SMTP :meth:`connect` method is called with those parameters during initialization. If specified, *local_hostname* is used as the FQDN of the local host in the HELO/EHLO command. Otherwise, the local hostname is found using :func:`socket.getfqdn`. If the :meth:`connect` call returns anything other than a success code, an :exc:`SMTPConnectError` is raised. The optional *timeout* parameter specifies a timeout in seconds for blocking operations like the connection attempt (if not specified, the global default timeout setting will be used). If the timeout expires, :exc:`TimeoutError` is raised. The optional *source_address* parameter allows binding to some specific source address in a machine with multiple network interfaces, and/or to some specific source TCP port. It takes a 2-tuple ``(host, port)``, for the socket to bind to as its source address before connecting. If omitted (or if *host* or *port* are ``''`` and/or ``0`` respectively) the OS default behavior will be used." -msgstr "یک نمونه از :class:`SMTP` یک اتصال SMTP را در بر می‌گیرد. این کلاس متدهایی دارد که از مجموعه کاملی از عملیات SMTP و ESMTP پشتیبانی می‌کنند. اگر پارامترهای اختیاری *host* و *port* داده شوند، متد :meth:`connect` SMTP در حین مقداردهی اولیه با آن پارامترها فراخوانی می‌شود. در صورت مشخص بودن، از *local_hostname* به‌عنوان FQDN میزبان محلی در دستور HELO/EHLO استفاده می‌شود. در غیر این صورت، نام میزبان محلی با استفاده از :func:`socket.getfqdn` یافت می‌شود. اگر فراخوانی :meth:`connect` هر مقداری غیر از یک کد موفقیت برگرداند، استثنای :exc:`SMTPConnectError` پرتاب می‌شود. پارامتر اختیاری *timeout* مهلتی به ثانیه برای عملیات‌های مسدودکننده مانند تلاش برای اتصال مشخص می‌کند (اگر مشخص نشود، از تنظیم پیش‌فرض سراسری مهلت استفاده خواهد شد). اگر مهلت منقضی شود، استثنای :exc:`TimeoutError` پرتاب می‌شود. پارامتر اختیاری *source_address* امکان مقیدسازی به یک نشانی مبدأ خاص در ماشینی با چندین رابط شبکه و/یا به یک پورت TCP مبدأ خاص را فراهم می‌کند. این پارامتر یک تاپل دوتایی ``(host, port)`` را می‌گیرد تا سوکت پیش از اتصال، به‌عنوان نشانی مبدأ خود به آن مقید شود. در صورت حذف این پارامتر (یا اگر *host* یا *port* به ترتیب ``''`` و/یا ``0`` باشند) از رفتار پیش‌فرض سیستم‌عامل استفاده خواهد شد." +msgid "An :class:`SMTP` instance encapsulates an SMTP connection. It has methods that support a full repertoire of SMTP and ESMTP operations." +msgstr "یک نمونه‌ی :class:`SMTP` کپسوله‌کننده‌ی یک اتصال SMTP است. این نمونه متدهایی دارد که از مجموعه کاملی از عملیات‌های SMTP و ESMTP پشتیبانی می‌کنند." + +msgid "If the host parameter is set to a truthy value, :meth:`SMTP.connect` is called with host and port automatically when the object is created; otherwise, :meth:`!connect` must be called manually." +msgstr "اگر پارامتر host روی یک مقادیر درستی (truthy) تنظیم شود، :meth:`SMTP.connect` به طور خودکار هنگام ایجاد شیء با host و port فراخوانی می‌شود؛ در غیر این صورت، :meth:`!connect` باید به صورت دستی فراخوانی شود." + +msgid "If specified, *local_hostname* is used as the FQDN of the local host in the HELO/EHLO command. Otherwise, the local hostname is found using :func:`socket.getfqdn`. If the :meth:`connect` call returns anything other than a success code, an :exc:`SMTPConnectError` is raised. The optional *timeout* parameter specifies a timeout in seconds for blocking operations like the connection attempt (if not specified, the global default timeout setting will be used). If the timeout expires, :exc:`TimeoutError` is raised. The optional *source_address* parameter allows binding to some specific source address in a machine with multiple network interfaces, and/or to some specific source TCP port. It takes a 2-tuple ``(host, port)``, for the socket to bind to as its source address before connecting. If omitted (or if *host* or *port* are ``''`` and/or ``0`` respectively) the OS default behavior will be used." +msgstr "اگر مشخص شود، *local_hostname* به عنوان FQDN میزبان محلی در دستور HELO/EHLO استفاده می‌شود. در غیر این صورت، نام میزبان محلی با استفاده از :func:`socket.getfqdn` پیدا می‌شود. اگر فراخوانی :meth:`connect` چیزی غیر از کد موفقیت‌آمیز برگرداند، یک استثنای :exc:`SMTPConnectError` بالا آورده می‌شود. پارامتر اختیاری *timeout* یک مهلت زمانی بر حسب ثانیه برای عملیات مسدودکننده‌ای مانند تلاش برای اتصال مشخص می‌کند (اگر مشخص نشود، از تنظیمات مهلت زمانی پیش‌فرض سراسری استفاده خواهد شد). اگر مهلت زمانی منقضی شود، استثنای :exc:`TimeoutError` بالا آورده می‌شود. پارامتر اختیاری *source_address* امکان اتصال به یک آدرس مبدأ خاص در ماشینی با چندین رابط شبکه، و/یا به یک پورت TCP مبدأ خاص را فراهم می‌کند. این پارامتر یک ۲-تایی ``(host, port)`` را برای سوکت می‌پذیرد تا پیش از اتصال، به عنوان آدرس مبدأ خود به آن متصل شود. اگر حذف شود (یا اگر *host* یا *port* به ترتیب ``''`` و/یا ``0`` باشند) از رفتار پیش‌فرض سیستم‌عامل استفاده خواهد شد." msgid "For normal use, you should only require the initialization/connect, :meth:`sendmail`, and :meth:`SMTP.quit` methods. An example is included below." msgstr "برای استفاده‌ی عادی، تنها باید به متدهای راه‌اندازی/اتصال، :meth:`sendmail` و :meth:`SMTP.quit` نیاز داشته باشید. یک نمونه در زیر آمده است." @@ -66,6 +73,9 @@ msgstr "" msgid "All commands will raise an :ref:`auditing event ` ``smtplib.SMTP.send`` with arguments ``self`` and ``data``, where ``data`` is the bytes about to be sent to the remote host." msgstr "تمام دستورات یک :ref:`رویداد حسابرسی ` ``smtplib.SMTP.send`` را با آرگومان‌های ``self`` و ``data`` پرتاب می‌کنند، که ``data`` بایت‌هایی است که قرار است به میزبان راه دور ارسال شوند." +msgid "The default port used for SMTP connections (25)." +msgstr "پورت پیش‌فرض مورد استفاده برای اتصالات SMTP (25)." + msgid "Support for the :keyword:`with` statement was added." msgstr "پشتیبانی از دستور :keyword:`with` افزوده شد." @@ -78,8 +88,17 @@ msgstr "افزونه‌ی SMTPUTF8 (:rfc:`6531`) اکنون پشتیبانی م msgid "If the *timeout* parameter is set to be zero, it will raise a :class:`ValueError` to prevent the creation of a non-blocking socket." msgstr "اگر پارامتر *timeout* روی صفر تنظیم شود، یک :class:`ValueError` پرتاب می‌شود تا از ایجاد یک سوکت غیرمسدودکننده جلوگیری شود." -msgid "An :class:`SMTP_SSL` instance behaves exactly the same as instances of :class:`SMTP`. :class:`SMTP_SSL` should be used for situations where SSL is required from the beginning of the connection and using :meth:`~SMTP.starttls` is not appropriate. If *host* is not specified, the local host is used. If *port* is zero, the standard SMTP-over-SSL port (465) is used. The optional arguments *local_hostname*, *timeout* and *source_address* have the same meaning as they do in the :class:`SMTP` class. *context*, also optional, can contain a :class:`~ssl.SSLContext` and allows configuring various aspects of the secure connection. Please read :ref:`ssl-security` for best practices." -msgstr "یک نمونه از :class:`SMTP_SSL` دقیقاً مانند نمونه‌های :class:`SMTP` رفتار می‌کند. :class:`SMTP_SSL` باید برای موقعیت‌هایی استفاده شود که SSL از ابتدای اتصال مورد نیاز باشد و استفاده از :meth:`~SMTP.starttls` مناسب نباشد. اگر *host* مشخص نشده باشد، از میزبان محلی استفاده می‌شود. اگر *port* صفر باشد، از درگاه استاندارد SMTP-over-SSL (۴۶۵) استفاده می‌شود. آرگومان‌های اختیاری *local_hostname*، *timeout* و *source_address* همان معنایی را دارند که در کلاس :class:`SMTP` دارند. *context*، که آن هم اختیاری است، می‌تواند شامل یک :class:`~ssl.SSLContext` باشد و به شما امکان می‌دهد که جنبه‌های مختلف اتصال امن را پیکربندی کنید. لطفاً برای بهترین شیوه‌ها، :ref:`ssl-security` را بخوانید." +msgid "An :class:`SMTP_SSL` instance behaves exactly the same as instances of :class:`SMTP`. :class:`SMTP_SSL` should be used for situations where SSL is required from the beginning of the connection and using :meth:`SMTP.starttls` is not appropriate." +msgstr "یک نمونه‌ی :class:`SMTP_SSL` دقیقاً مانند نمونه‌های :class:`SMTP` رفتار می‌کند. :class:`SMTP_SSL` باید برای موقعیت‌هایی استفاده شود که SSL از آغاز اتصال مورد نیاز است و استفاده از :meth:`SMTP.starttls` مناسب نیست." + +msgid "If the host parameter is set to a truthy value, :meth:`SMTP.connect` is called with host and port automatically when the object is created; otherwise, :meth:`!SMTP.connect` must be called manually." +msgstr "اگر پارامتر host روی یک مقادیر درستی (truthy) تنظیم شود، :meth:`SMTP.connect` به طور خودکار هنگام ایجاد شیء با host و port فراخوانی می‌شود؛ در غیر این صورت، :meth:`!SMTP.connect` باید به صورت دستی فراخوانی شود." + +msgid "The optional arguments *local_hostname*, *timeout* and *source_address* have the same meaning as they do in the :class:`SMTP` class. *context*, also optional, can contain a :class:`~ssl.SSLContext` and allows configuring various aspects of the secure connection. Please read :ref:`ssl-security` for best practices." +msgstr "آرگومان‌های اختیاری *local_hostname*، *timeout* و *source_address* همان معنایی را دارند که در کلاس :class:`SMTP` دارند. *context* که آن نیز اختیاری است، می‌تواند حاوی یک :class:`~ssl.SSLContext` باشد و امکان پیکربندی جنبه‌های مختلف اتصال امن را فراهم می‌کند. لطفاً برای بهترین روش‌ها :ref:`ssl-security` را مطالعه کنید." + +msgid "The default port used for SMTP-over-SSL connections (465)." +msgstr "پورت پیش‌فرض مورد استفاده برای اتصالات SMTP-over-SSL (465)." msgid "*context* was added." msgstr "*context* اضافه شد." @@ -189,6 +208,9 @@ msgstr "اگر اتصال به سرور در حین انتظار برای پاس msgid "Connect to a host on a given port. The defaults are to connect to the local host at the standard SMTP port (25). If the hostname ends with a colon (``':'``) followed by a number, that suffix will be stripped off and the number interpreted as the port number to use. This method is automatically invoked by the constructor if a host is specified during instantiation. Returns a 2-tuple of the response code and message sent by the server in its connection response." msgstr "به یک میزبان در یک پورت مشخص متصل می‌شود. پیش‌فرض این است که به میزبان محلی در پورت استاندارد SMTP (۲۵) متصل شود. اگر نام میزبان با یک دونقطه (``':'``) و به دنبال آن یک عدد پایان یابد، آن پسوند حذف می‌شود و عدد به‌عنوان شماره پورتی که باید استفاده شود تفسیر می‌شود. اگر در هنگام نمونه‌سازی یک میزبان مشخص شده باشد، این متد به‌طور خودکار توسط سازنده فراخوانی می‌شود. یک تاپل ۲تایی شامل کد پاسخ و پیامی که سرور در پاسخ اتصال خود ارسال کرده است برمی‌گرداند." +msgid "If port is not changed from its default value of 0, the value of the :attr:`default_port` attribute is used." +msgstr "اگر پورت از مقدار پیش‌فرض خود یعنی 0 تغییر نکند، از مقدار ویژگی :attr:`default_port` استفاده می‌شود." + msgid "Raises an :ref:`auditing event ` ``smtplib.connect`` with arguments ``self``, ``host``, ``port``." msgstr "یک :ref:`رویداد حسابرسی ` ``smtplib.connect`` را با آرگومان‌های ``self``، ``host``، ``port`` پرتاب می‌کند." diff --git a/library/socket.po b/library/socket.po index 6f7cc15e..5c0d5861 100644 --- a/library/socket.po +++ b/library/socket.po @@ -9,12 +9,13 @@ # Parham Forati, 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 15:47+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -352,6 +353,9 @@ msgstr "``IP_FREEBIND``، ``IP_RECVERR``، ``IPV6_RECVERR``، ``IP_RECVTTL`` و msgid "Added support for ``TCP_QUICKACK`` on Windows platforms when available." msgstr "پشتیبانی از ``TCP_QUICKACK`` در سکوهای ویندوزی در صورت در دسترس بودن افزوده شد." +msgid "``IPV6_HDRINCL`` was added. Added support for ``SO_PASSRIGHTS`` on Linux platforms when available." +msgstr "``IPV6_HDRINCL`` اضافه شد. پشتیبانی از ``SO_PASSRIGHTS`` در پلتفرم‌های لینوکس در صورت دسترسی اضافه شد." + msgid "Many constants of these forms, documented in the Linux documentation, are also defined in the socket module." msgstr "بسیاری از ثابت‌های این قالب‌ها، که در مستندات لینوکس مستند شده‌اند، در ماژول socket نیز تعریف شده‌اند." @@ -579,8 +583,20 @@ msgstr "این تابع فهرستی از ۵-تاپل‌ها با ساختار msgid "``(family, type, proto, canonname, sockaddr)``" msgstr "``(family, type, proto, canonname, sockaddr)``" -msgid "In these tuples, *family*, *type*, *proto* are all integers and are meant to be passed to the :func:`~socket.socket` function. *canonname* will be a string representing the canonical name of the *host* if :const:`AI_CANONNAME` is part of the *flags* argument; else *canonname* will be empty. *sockaddr* is a tuple describing a socket address, whose format depends on the returned *family* (a ``(address, port)`` 2-tuple for :const:`AF_INET`, a ``(address, port, flowinfo, scope_id)`` 4-tuple for :const:`AF_INET6`), and is meant to be passed to the :meth:`socket.connect` method." -msgstr "در این تاپل‌ها، *family*، *type* و *proto* همگی اعداد صحیح هستند و باید به تابع :func:`~socket.socket` فرستاده شوند. اگر :const:`AI_CANONNAME` بخشی از آرگومان *flags* باشد، *canonname* رشته‌ای خواهد بود که نام متعارف *host* را نشان می‌دهد؛ در غیر این صورت *canonname* خالی خواهد بود. *sockaddr* تاپلی است که نشانی سوکت را توصیف می‌کند و قالب آن به *family* برگردانده‌شده بستگی دارد (یک تاپل ۲تایی ``(address, port)`` برای :const:`AF_INET`، یک تاپل ۴تایی ``(address, port, flowinfo, scope_id)`` برای :const:`AF_INET6`) و باید به متد :meth:`socket.connect` فرستاده شود." +msgid "In these tuples, *family*, *type*, *proto* are all integers and are meant to be passed to the :func:`~socket.socket` function. *canonname* will be a string representing the canonical name of the *host* if :const:`AI_CANONNAME` is part of the *flags* argument; else *canonname* will be empty. *sockaddr* is a tuple describing a socket address, whose format depends on the returned *family* and flags Python was compiled with, and is meant to be passed to the :meth:`socket.connect` method." +msgstr "در این تاپل‌ها، *family*، *type* و *proto* همگی عدد صحیح هستند و قرار است به تابع :func:`~socket.socket` پاس داده شوند. *canonname* رشته‌ای خواهد بود که نام کانونیکال *host* را نشان می‌دهد، اگر :const:`AI_CANONNAME` بخشی از آرگومان *flags* باشد؛ در غیر این صورت *canonname* خالی خواهد بود. *sockaddr* تاپلی است که یک آدرس سوکت را توصیف می‌کند که قالب آن به *family* بازگردانده‌شده و پرچم‌هایی که پایتون با آن‌ها کامپایل‌شده است بستگی دارد و قرار است به متد :meth:`socket.connect` پاس داده شود." + +msgid "*sockaddr* can be one of the following:" +msgstr "*sockaddr* می‌تواند یکی از موارد زیر باشد:" + +msgid "a ``(address, port)`` 2-tuple for :const:`AF_INET`" +msgstr "یک 2-تایی از نوع ``(address, port)`` برای :const:`AF_INET`" + +msgid "a ``(address, port, flowinfo, scope_id)`` 4-tuple for :const:`AF_INET6` if Python was compiled with ``--enable-ipv6`` (the default)" +msgstr "یک 4-تایی از نوع ``(address, port, flowinfo, scope_id)`` برای :const:`AF_INET6` اگر پایتون با ``--enable-ipv6`` (پیش‌فرض) کامپایل‌شده باشد" + +msgid "a 2-tuple containing raw data for :const:`AF_INET6` if Python was compiled with ``--disable-ipv6``" +msgstr "یک 2-تایی حاوی داده‌ی خام برای :const:`AF_INET6` اگر پایتون با ``--disable-ipv6`` کامپایل‌شده باشد" msgid "If you intend to use results from :func:`!getaddrinfo` to create a socket (rather than, for example, retrieve *canonname*), consider limiting the results by *type* (e.g. :data:`SOCK_STREAM` or :data:`SOCK_DGRAM`) and/or *proto* (e.g. :data:`IPPROTO_TCP` or :data:`IPPROTO_UDP`) that your application can handle." msgstr "اگر قصد دارید از نتایج :func:`!getaddrinfo` برای ایجاد یک سوکت استفاده کنید (نه مثلاً برای بازیابی *canonname*)، در نظر بگیرید که نتایج را بر اساس *type* (مثلاً :data:`SOCK_STREAM` یا :data:`SOCK_DGRAM`) و/یا *proto* (مثلاً :data:`IPPROTO_TCP` یا :data:`IPPROTO_UDP`) که برنامه شما می‌تواند از آن‌ها پشتیبانی کند، محدود کنید." @@ -739,8 +755,11 @@ msgstr "بیشتر پلتفرم‌های یونیکسی." msgid "Return the default timeout in seconds (float) for new socket objects. A value of ``None`` indicates that new socket objects have no timeout. When the socket module is first imported, the default is ``None``." msgstr "بازگرداندن مهلت پیش‌فرض بر حسب ثانیه (float) برای اشیاء سوکت جدید. مقدار ``None`` نشان می‌دهد که اشیاء سوکت جدید بدون مهلت هستند. هنگامی که ماژول socket برای نخستین بار ایمپورت می‌شود، مقدار پیش‌فرض ``None`` است." -msgid "Set the default timeout in seconds (float) for new socket objects. When the socket module is first imported, the default is ``None``. See :meth:`~socket.settimeout` for possible values and their respective meanings." -msgstr "مهلت پیش‌فرض را بر حسب ثانیه (float) برای اشیای جدید سوکت تنظیم کنید. هنگامی که ماژول socket برای اولین بار ایمپورت می‌شود، مقدار پیش‌فرض ``None`` است. برای مقادیر ممکن و معانی مربوط به آن‌ها :meth:`~socket.settimeout` را ببینید." +msgid "Set the default timeout in seconds (real number) for new socket objects. When the socket module is first imported, the default is ``None``. See :meth:`~socket.settimeout` for possible values and their respective meanings." +msgstr "مهلت زمانی پیش‌فرض را برحسب ثانیه (عدد حقیقی) برای شیء‌های سوکت جدید تنظیم کنید. هنگامی که ماژول socket برای اولین بار وارد می‌شود، مقدار پیش‌فرض ``None`` است. برای مقادیر ممکن و معانی مربوط به آن‌ها، به :meth:`~socket.settimeout` مراجعه کنید." + +msgid "Accepts any real number, not only integer or float." +msgstr "هر عدد حقیقی را می‌پذیرد، نه فقط عدد صحیح یا عدد اعشاری را." msgid "Set the machine's hostname to *name*. This will raise an :exc:`OSError` if you don't have enough rights." msgstr "نام میزبان ماشین را روی *name* تنظیم می‌کند. اگر دسترسی کافی نداشته باشید، این کار یک :exc:`OSError` را پرتاب می‌کند." diff --git a/library/socketserver.po b/library/socketserver.po index 46452320..96f1ee35 100644 --- a/library/socketserver.po +++ b/library/socketserver.po @@ -8,12 +8,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 09:12+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -45,6 +46,9 @@ msgstr "چهار کلاس سرور عینی پایه وجود دارد:" msgid "This uses the internet TCP protocol, which provides for continuous streams of data between the client and server. If *bind_and_activate* is true, the constructor automatically attempts to invoke :meth:`~BaseServer.server_bind` and :meth:`~BaseServer.server_activate`. The other parameters are passed to the :class:`BaseServer` base class." msgstr "این از پروتکل TCP اینترنتی استفاده می‌کند، که جریان‌های پیوسته‌ای از داده‌ها را بین کلاینت و سرور فراهم می‌کند. اگر *bind_and_activate* مقدار true داشته باشد، سازنده به‌طور خودکار تلاش می‌کند :meth:`~BaseServer.server_bind` و :meth:`~BaseServer.server_activate` را فراخوانی کند. سایر پارامترها به کلاس پایه‌ی :class:`BaseServer` ارسال می‌شوند." +msgid "The default queue size is now ``socket.SOMAXCONN`` for :class:`socketserver.TCPServer`." +msgstr "اندازه‌ی صف پیش‌فرض اکنون برای :class:`socketserver.TCPServer` برابر با ``socket.SOMAXCONN`` است." + msgid "This uses datagrams, which are discrete packets of information that may arrive out of order or be lost while in transit. The parameters are the same as for :class:`TCPServer`." msgstr "این از دیتاگرام‌ها استفاده می‌کند، که بسته‌های گسسته‌ای از اطلاعات هستند که ممکن است خارج از ترتیب برسند یا در حین انتقال گم شوند. پارامترها همان پارامترهای :class:`TCPServer` هستند." diff --git a/library/sqlite3.po b/library/sqlite3.po index f176af81..4b3d9dbf 100644 --- a/library/sqlite3.po +++ b/library/sqlite3.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 17:33+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -316,8 +317,8 @@ msgstr "رویداد حسابرسی ``sqlite3.connect/handle`` افزوده شد msgid "Added the *autocommit* parameter." msgstr "پارامتر *autocommit* افزوده شد." -msgid "Positional use of the parameters *timeout*, *detect_types*, *isolation_level*, *check_same_thread*, *factory*, *cached_statements*, and *uri* is deprecated. They will become keyword-only parameters in Python 3.15." -msgstr "استفاده‌ی جایگاهی از پارامترهای *timeout*، *detect_types*، *isolation_level*، *check_same_thread*، *factory*، *cached_statements* و *uri* منسوخ شده است. این پارامترها در پایتون 3.15 به پارامترهای فقط کلیدواژه‌ای تبدیل خواهند شد." +msgid "All parameters except *database* are now keyword-only." +msgstr "اکنون تمام پارامترها به جز *database* فقط کلیدواژه‌ای هستند." msgid "Return ``True`` if the string *statement* appears to contain one or more complete SQL statements. No syntactic verification or parsing of any kind is performed, other than checking that there are no unclosed string literals and the statement is terminated by a semicolon." msgstr "اگر به نظر برسد که رشته‌ی *statement* حاوی یک یا چند دستور کامل SQL باشد، ``True`` را برمی‌گرداند. هیچ‌گونه صحت‌سنجی سینتکسی یا تجزیه‌ای از هیچ نوع انجام نمی‌شود، به‌جز بررسی اینکه هیچ لفظی رشته‌ای بسته‌نشده‌ای وجود نداشته باشد و دستور با نقطه‌ویرگول پایان یافته باشد." @@ -421,6 +422,12 @@ msgstr "شماره‌ی نسخه‌ی کتابخانه‌ی SQLite ران‌تا msgid "Version number of the runtime SQLite library as a :class:`tuple` of :class:`integers `." msgstr "شماره نسخه کتابخانه SQLite در ران‌تایم به‌صورت یک :class:`tuple` از :class:`اعداد صحیح `." +msgid "A :class:`tuple` containing all SQLite keywords." +msgstr "یک :class:`tuple` حاوی تمام کلیدواژه‌های SQLite." + +msgid "This constant is only available if Python was compiled with SQLite 3.24.0 or greater." +msgstr "این ثابت فقط در صورتی در دسترس است که پایتون با SQLite 3.24.0 یا بالاتر کامپایل‌شده باشد." + msgid "Integer constant required by the DB-API 2.0, stating the level of thread safety the :mod:`!sqlite3` module supports. This attribute is set based on the default `threading mode `_ the underlying SQLite library is compiled with. The SQLite threading modes are:" msgstr "ثابت عدد صحیح مورد نیاز DB-API 2.0، که سطح ایمنی نخی را که ماژول :mod:`!sqlite3` پشتیبانی می‌کند، مشخص می‌کند. این ویژگی بر اساس `حالت نخی (threading mode) `_ پیش‌فرضی تنظیم می‌شود که کتابخانه زیربنایی SQLite با آن کامپایل شده است. حالت‌های نخی SQLite عبارتند از:" @@ -577,6 +584,9 @@ msgstr "اگر ``True`` باشد، تابع SQL ایجادشده به‌عنوا msgid "Added the *deterministic* parameter." msgstr "پارامتر *deterministic* افزوده شد." +msgid "The first three parameters are now positional-only." +msgstr "سه پارامتر اول اکنون فقط جایگاهی هستند." + msgid "Example:" msgstr "مثال:" @@ -601,9 +611,6 @@ msgstr "" "('acbd18db4cc2f85cedef654fccc4a4d8',)\n" ">>> con.close()" -msgid "Passing *name*, *narg*, and *func* as keyword arguments is deprecated. These parameters will become positional-only in Python 3.15." -msgstr "ارسال *name*، *narg* و *func* به‌صورت آرگومان‌های کلیدواژه‌ای منسوخ شده است. این پارامترها در پایتون 3.15 فقط جایگاهی خواهند شد." - msgid "Create or remove a user-defined SQL aggregate function." msgstr "ایجاد یا حذف یک تابع تجمیعی SQL تعریف‌شده توسط کاربر." @@ -631,6 +638,9 @@ msgstr "تعداد آرگومان‌هایی که متد ``step()`` باید ب msgid "Set to ``None`` to remove an existing SQL aggregate function." msgstr "برای حذف یک تابع تجمیعی SQL موجود، آن را روی ``None`` تنظیم کنید." +msgid "All three parameters are now positional-only." +msgstr "هر سه پارامتر اکنون فقط جایگاهی هستند." + msgid "" "class MySum:\n" " def __init__(self):\n" @@ -672,9 +682,6 @@ msgstr "" "\n" "con.close()" -msgid "Passing *name*, *n_arg*, and *aggregate_class* as keyword arguments is deprecated. These parameters will become positional-only in Python 3.15." -msgstr "ارسال *name*، *n_arg* و *aggregate_class* به‌صورت آرگومان‌های کلیدواژه‌ای منسوخ شده است. این پارامترها در پایتون 3.15 فقط جایگاهی خواهند شد." - msgid "Create or remove a user-defined aggregate window function." msgstr "ایجاد یا حذف یک تابع پنجره‌ای تجمیعی تعریف‌شده توسط کاربر." @@ -875,8 +882,8 @@ msgstr "با ارسال ``None`` به‌عنوان *authorizer_callback*، تأ msgid "Added support for disabling the authorizer using ``None``." msgstr "پشتیبانی از غیرفعال‌سازی مجوزدهنده (authorizer) با استفاده از ``None`` افزوده شد." -msgid "Passing *authorizer_callback* as a keyword argument is deprecated. The parameter will become positional-only in Python 3.15." -msgstr "ارسال *authorizer_callback* به‌عنوان آرگومان کلیدواژه‌ای منسوخ شده است. این پارامتر در پایتون 3.15 فقط جایگاهی خواهد شد." +msgid "The only parameter is now positional-only." +msgstr "تنها پارامتر اکنون فقط جایگاهی است." msgid "Register :term:`callable` *progress_handler* to be invoked for every *n* instructions of the SQLite virtual machine. This is useful if you want to get called from SQLite during long-running operations, for example to update a GUI." msgstr ":term:`callable` *progress_handler* را ثبت کنید تا به ازای هر *n* دستورالعملِ ماشین مجازی SQLite فراخوانی شود. این قابلیت زمانی مفید است که بخواهید در حین عملیات‌های طولانی‌مدت از SQLite فراخوانی شوید، برای مثال برای به‌روزرسانی رابط کاربری گرافیکی (GUI)." @@ -887,8 +894,8 @@ msgstr "اگر می‌خواهید هر مدیر پیشرفت (progress handler) msgid "Returning a non-zero value from the handler function will terminate the currently executing query and cause it to raise a :exc:`DatabaseError` exception." msgstr "بازگرداندن یک مقدار غیرصفر از تابع هندلر، پرس‌وجوی در حال اجرا را خاتمه می‌دهد و باعث می‌شود که یک استثنا :exc:`DatabaseError` پرتاب شود." -msgid "Passing *progress_handler* as a keyword argument is deprecated. The parameter will become positional-only in Python 3.15." -msgstr "ارسال *progress_handler* به‌عنوان آرگومان کلیدواژه‌ای منسوخ شده است. این پارامتر در Python 3.15 فقط جایگاهی خواهد شد." +msgid "The first parameter is now positional-only." +msgstr "پارامتر اول اکنون فقط جایگاهی است." msgid "Register :term:`callable` *trace_callback* to be invoked for each SQL statement that is actually executed by the SQLite backend." msgstr "یک :term:`callable` به نام *trace_callback* را ثبت کنید تا برای هر دستور SQL که به‌طور واقعی توسط بک‌اند SQLite اجرا می‌شود، فراخوانی شود." @@ -902,9 +909,6 @@ msgstr "با ارسال ``None`` به‌عنوان *trace_callback*، کال‌ msgid "Exceptions raised in the trace callback are not propagated. As a development and debugging aid, use :meth:`~sqlite3.enable_callback_tracebacks` to enable printing tracebacks from exceptions raised in the trace callback." msgstr "استثناهای پرتاب‌شده در کال‌بک ردگیری منتشر نمی‌شوند. به‌عنوان کمکی برای توسعه و اشکال‌زدایی، از :meth:`~sqlite3.enable_callback_tracebacks` برای فعال کردن چاپ ردگیری‌های پشته‌ی استثناهای پرتاب‌شده در کال‌بک ردگیری استفاده کنید." -msgid "Passing *trace_callback* as a keyword argument is deprecated. The parameter will become positional-only in Python 3.15." -msgstr "ارسال *trace_callback* به‌عنوان آرگومان کلیدواژه‌ای منسوخ شده است. این پارامتر در پایتون 3.15 فقط جایگاهی خواهد شد." - msgid "Enable the SQLite engine to load SQLite extensions from shared libraries if *enabled* is ``True``; else, disallow loading SQLite extensions. SQLite extensions can define new functions, aggregates or whole new virtual table implementations. One well-known extension is the fulltext-search extension distributed with SQLite." msgstr "اگر *enabled* برابر ``True`` باشد، به موتور SQLite اجازه می‌دهد تا افزونه‌های SQLite را از کتابخانه‌های مشترک بارگذاری کند؛ در غیر این صورت، بارگذاری افزونه‌های SQLite را مجاز نمی‌داند. افزونه‌های SQLite می‌توانند توابع جدید، تجمیع‌ها یا پیاده‌سازی‌های کاملاً جدید جدول مجازی را تعریف کنند. یکی از افزونه‌های شناخته‌شده، افزونه جستجوی تمام‌متنی (fulltext-search) است که همراه SQLite توزیع شده است." @@ -2351,3 +2355,21 @@ msgstr "در دستورات SQL" msgid ": (colon)" msgstr ": (دونقطه)" + +#~ msgid "Positional use of the parameters *timeout*, *detect_types*, *isolation_level*, *check_same_thread*, *factory*, *cached_statements*, and *uri* is deprecated. They will become keyword-only parameters in Python 3.15." +#~ msgstr "استفاده‌ی جایگاهی از پارامترهای *timeout*، *detect_types*، *isolation_level*، *check_same_thread*، *factory*، *cached_statements* و *uri* منسوخ شده است. این پارامترها در پایتون 3.15 به پارامترهای فقط کلیدواژه‌ای تبدیل خواهند شد." + +#~ msgid "Passing *name*, *narg*, and *func* as keyword arguments is deprecated. These parameters will become positional-only in Python 3.15." +#~ msgstr "ارسال *name*، *narg* و *func* به‌صورت آرگومان‌های کلیدواژه‌ای منسوخ شده است. این پارامترها در پایتون 3.15 فقط جایگاهی خواهند شد." + +#~ msgid "Passing *name*, *n_arg*, and *aggregate_class* as keyword arguments is deprecated. These parameters will become positional-only in Python 3.15." +#~ msgstr "ارسال *name*، *n_arg* و *aggregate_class* به‌صورت آرگومان‌های کلیدواژه‌ای منسوخ شده است. این پارامترها در پایتون 3.15 فقط جایگاهی خواهند شد." + +#~ msgid "Passing *authorizer_callback* as a keyword argument is deprecated. The parameter will become positional-only in Python 3.15." +#~ msgstr "ارسال *authorizer_callback* به‌عنوان آرگومان کلیدواژه‌ای منسوخ شده است. این پارامتر در پایتون 3.15 فقط جایگاهی خواهد شد." + +#~ msgid "Passing *progress_handler* as a keyword argument is deprecated. The parameter will become positional-only in Python 3.15." +#~ msgstr "ارسال *progress_handler* به‌عنوان آرگومان کلیدواژه‌ای منسوخ شده است. این پارامتر در Python 3.15 فقط جایگاهی خواهد شد." + +#~ msgid "Passing *trace_callback* as a keyword argument is deprecated. The parameter will become positional-only in Python 3.15." +#~ msgstr "ارسال *trace_callback* به‌عنوان آرگومان کلیدواژه‌ای منسوخ شده است. این پارامتر در پایتون 3.15 فقط جایگاهی خواهد شد." diff --git a/library/ssl.po b/library/ssl.po index d052fabb..bca4a999 100644 --- a/library/ssl.po +++ b/library/ssl.po @@ -9,12 +9,13 @@ # Parham Forati, 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-10-01 04:48+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 15:23+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -214,6 +215,22 @@ msgstr "زمینه اکنون از پروتکل :data:`PROTOCOL_TLS_CLIENT` یا msgid "The context now uses :data:`VERIFY_X509_PARTIAL_CHAIN` and :data:`VERIFY_X509_STRICT` in its default verify flags." msgstr "این زمینه اکنون از :data:`VERIFY_X509_PARTIAL_CHAIN` و :data:`VERIFY_X509_STRICT` در پرچم‌های تأیید پیش‌فرض خود استفاده می‌کند." +msgid "Signature algorithms" +msgstr "الگوریتم‌های امضا" + +msgid "Return a list of available TLS signature algorithm names used by servers to complete the TLS handshake or clients requesting certificate-based authentication. For example::" +msgstr "فهرستی از نام‌های الگوریتم‌های امضای TLS موجود را برمی‌گرداند که توسط سرورها برای تکمیل دست‌دهی TLS یا کلاینت‌هایی که درخواست احراز هویت مبتنی بر گواهی دارند، استفاده می‌شوند. برای مثال::" + +msgid "" +">>> ssl.get_sigalgs()\n" +"['ecdsa_secp256r1_sha256', 'ecdsa_secp384r1_sha384', ...]" +msgstr "" +">>> ssl.get_sigalgs()\n" +"['ecdsa_secp256r1_sha256', 'ecdsa_secp384r1_sha384', ...]" + +msgid "These names can be used when building string values to pass to the :meth:`SSLContext.set_client_sigalgs` and :meth:`SSLContext.set_server_sigalgs` methods." +msgstr "این نام‌ها را می‌توان هنگام ساخت مقادیر رشته‌ای برای ارسال به متدهای :meth:`SSLContext.set_client_sigalgs` و :meth:`SSLContext.set_server_sigalgs` استفاده کرد." + msgid "Exceptions" msgstr "استثناها" @@ -271,8 +288,8 @@ msgstr "برای تقریباً همه‌ی کاربردها، :func:`os.urandom msgid "Read the Wikipedia article, `Cryptographically secure pseudorandom number generator (CSPRNG) `_, to get the requirements of a cryptographically strong generator." msgstr "برای به دست آوردن الزامات یک تولیدگر قوی از نظر رمزنگاری، مقاله‌ی ویکی‌پدیا، `Cryptographically secure pseudorandom number generator (CSPRNG) `_ را بخوانید." -msgid "Return ``True`` if the SSL pseudo-random number generator has been seeded with 'enough' randomness, and ``False`` otherwise. You can use :func:`ssl.RAND_egd` and :func:`ssl.RAND_add` to increase the randomness of the pseudo-random number generator." -msgstr "اگر تولیدگر اعداد شبه‌تصادفی SSL با میزان «کافی» تصادفی‌بودن بذرگذاری شده باشد، ``True`` را برمی‌گرداند و در غیر این صورت ``False`` را برمی‌گرداند. می‌توانید از :func:`ssl.RAND_egd` و :func:`ssl.RAND_add` برای افزایش تصادفی‌بودن تولیدگر اعداد شبه‌تصادفی استفاده کنید." +msgid "Return ``True`` if the SSL pseudo-random number generator has been seeded with 'enough' randomness, and ``False`` otherwise. Use :func:`ssl.RAND_add` to increase the randomness of the pseudo-random number generator." +msgstr "اگر مولد اعداد شبه‌تصادفی SSL با مقدار «کافی» از تصادفی بودن مقداردهی اولیه شده باشد، مقدار ``True`` را بازمی‌گرداند و در غیر این صورت ``False`` را برمی‌گرداند. برای افزایش تصادفی بودن مولد اعداد شبه‌تصادفی، از :func:`ssl.RAND_add` استفاده کنید." msgid "Mix the given *bytes* into the SSL pseudo-random number generator. The parameter *entropy* (a float) is a lower bound on the entropy contained in string (so you can always use ``0.0``). See :rfc:`1750` for more information on sources of entropy." msgstr "*bytes* داده‌شده را در مولد اعداد شبه‌تصادفی SSL مخلوط کنید. پارامتر *entropy* (یک عدد اعشاری) کران پایینی برای آنتروپی موجود در رشته است (بنابراین همیشه می‌توانید از ``0.0`` استفاده کنید). برای اطلاعات بیشتر درباره منابع آنتروپی، :rfc:`1750` را ببینید." @@ -591,6 +608,9 @@ msgstr "اینکه کتابخانه OpenSSL از پروتکل TLS 1.3 به‌ص msgid "Whether the OpenSSL library has built-in support for TLS-PSK." msgstr "اینکه آیا کتابخانه‌ی OpenSSL پشتیبانی توکار از TLS-PSK دارد یا خیر." +msgid "Whether the OpenSSL library has built-in support for External PSKs in TLS 1.3 as described in :rfc:`9258`." +msgstr "اینکه آیا کتابخانه‌ی OpenSSL پشتیبانی درون‌ساخته‌ای برای External PSKها در TLS 1.3 همان‌طور که در :rfc:`9258` توصیف شده است دارد یا خیر." + msgid "Whether the OpenSSL library has built-in support for TLS-PHA." msgstr "اینکه کتابخانه OpenSSL پشتیبانی توکار از TLS-PHA دارد یا خیر." @@ -706,8 +726,8 @@ msgstr ":meth:`~socket.socket.recv`، :meth:`~socket.socket.recv_into` (اما msgid ":meth:`~socket.socket.send`, :meth:`~socket.socket.sendall` (with the same limitation)" msgstr ":meth:`~socket.socket.send`، :meth:`~socket.socket.sendall` (با همان محدودیت)" -msgid ":meth:`~socket.socket.sendfile` (but :mod:`os.sendfile` will be used for plain-text sockets only, else :meth:`~socket.socket.send` will be used)" -msgstr ":meth:`~socket.socket.sendfile` (اما :mod:`os.sendfile` فقط برای سوکت‌های متن ساده استفاده خواهد شد، در غیر این صورت :meth:`~socket.socket.send` استفاده خواهد شد)" +msgid ":meth:`~socket.socket.sendfile` (it may be high-performant only when the kernel TLS is enabled by setting :data:`~ssl.OP_ENABLE_KTLS` or when a socket is plain-text, else :meth:`~socket.socket.send` will be used)" +msgstr ":meth:`~socket.socket.sendfile` (ممکن است فقط زمانی کارایی بالایی داشته باشد که TLS هسته با تنظیم :data:`~ssl.OP_ENABLE_KTLS` فعال شده باشد یا زمانی که یک سوکت متن‌ساده است، در غیر این صورت از :meth:`~socket.socket.send` استفاده خواهد شد)" msgid ":meth:`~socket.socket.shutdown`" msgstr ":meth:`~socket.socket.shutdown`" @@ -733,6 +753,9 @@ msgstr "نمونه‌های :class:`SSLSocket` باید با :meth:`~SSLContext. msgid "Python now uses ``SSL_read_ex`` and ``SSL_write_ex`` internally. The functions support reading and writing of data larger than 2 GB. Writing zero-length data no longer fails with a protocol violation error." msgstr "پایتون اکنون به‌صورت داخلی از ``SSL_read_ex`` و ``SSL_write_ex`` استفاده می‌کند. این توابع از خواندن و نوشتن داده‌های بزرگ‌تر از ۲ GB پشتیبانی می‌کنند. نوشتن داده با طول صفر دیگر با خطای نقض پروتکل شکست نمی‌خورد." +msgid "Python now uses ``SSL_sendfile`` internally when possible. The function sends a file more efficiently because it performs TLS encryption in the kernel to avoid additional context switches." +msgstr "پایتون اکنون در صورت امکان به‌طور داخلی از ``SSL_sendfile`` استفاده می‌کند. این تابع یک پرونده را با کارایی بیشتری ارسال می‌کند زیرا رمزگذاری TLS را در هسته (kernel) انجام می‌دهد تا از تعویض زمینه‌ی اضافی جلوگیری کند." + msgid "SSL sockets also have the following additional methods and attributes:" msgstr "سوکت‌های SSL همچنین دارای متدها و ویژگی‌های اضافی زیر هستند:" @@ -868,6 +891,15 @@ msgstr "یک تاپل سه‌مقداری شامل نام رمزنگار است msgid "Return the list of ciphers available in both the client and server. Each entry of the returned list is a three-value tuple containing the name of the cipher, the version of the SSL protocol that defines its use, and the number of secret bits the cipher uses. :meth:`~SSLSocket.shared_ciphers` returns ``None`` if no connection has been established or the socket is a client socket." msgstr "فهرست رمزنگارهای موجود در هر دو کلاینت و سرور (server) را برمی‌گرداند. هر آیتم از فهرست برگردانده‌شده، یک تاپل سه‌مقداری است که شامل نام رمزنگار، نسخه‌ی پروتکل SSL که استفاده از آن را تعریف می‌کند، و تعداد بیت‌های محرمانه‌ای است که رمزنگار از آن‌ها استفاده می‌کند. :meth:`~SSLSocket.shared_ciphers` در صورتی که هیچ اتصالی برقرار نشده باشد یا سوکت از نوع کلاینت باشد، ``None`` را برمی‌گرداند." +msgid "Return the group used for doing key agreement on this connection. If no connection has been established, returns ``None``." +msgstr "گروه مورد استفاده برای توافق کلید روی این اتصال را برمی‌گرداند. اگر هیچ اتصالی برقرار نشده باشد، ``None`` را برمی‌گرداند." + +msgid "Return the signature algorithm used for performing certificate-based client authentication on this connection, or ``None`` if no connection has been established or client authentication didn't occur." +msgstr "الگوریتم امضای مورد استفاده برای انجام احراز هویت کلاینت مبتنی بر گواهی روی این اتصال را برمی‌گرداند، یا اگر هیچ اتصالی برقرار نشده باشد یا احراز هویت کلاینت انجام نشده باشد، ``None`` را برمی‌گرداند." + +msgid "Return the signature algorithm used by the server to complete the TLS handshake on this connection, or ``None`` if no connection has been established or the cipher suite has no signature." +msgstr "الگوریتم امضای مورد استفاده توسط سرور برای تکمیل دست‌دهی TLS روی این اتصال را برمی‌گرداند، یا اگر هیچ اتصالی برقرار نشده باشد یا مجموعه رمز امضایی نداشته باشد، ``None`` را برمی‌گرداند." + msgid "Return the compression algorithm being used as a string, or ``None`` if the connection isn't compressed." msgstr "الگوریتم فشرده‌سازی مورد استفاده را به‌صورت یک رشته برمی‌گرداند، یا اگر اتصال فشرده‌نشده باشد ``None`` برمی‌گرداند." @@ -1139,17 +1171,57 @@ msgstr "" " 'strength_bits': 128,\n" " 'symmetric': 'aes-128-gcm'}]" +msgid "Get a list of groups implemented for key agreement, taking into account the current TLS :attr:`~SSLContext.minimum_version` and :attr:`~SSLContext.maximum_version` values. For example::" +msgstr "فهرستی از گروه‌های پیاده‌سازی‌شده برای توافق کلید را با در نظر گرفتن مقادیر کنونی :attr:`~SSLContext.minimum_version` و :attr:`~SSLContext.maximum_version` مربوط به TLS دریافت کنید. برای نمونه::" + +msgid "" +">>> ctx = ssl.create_default_context()\n" +">>> ctx.minimum_version = ssl.TLSVersion.TLSv1_3\n" +">>> ctx.maximum_version = ssl.TLSVersion.TLSv1_3\n" +">>> ctx.get_groups()\n" +"['secp256r1', 'secp384r1', 'secp521r1', 'x25519', 'x448', ...]" +msgstr "" +">>> ctx = ssl.create_default_context()\n" +">>> ctx.minimum_version = ssl.TLSVersion.TLSv1_3\n" +">>> ctx.maximum_version = ssl.TLSVersion.TLSv1_3\n" +">>> ctx.get_groups()\n" +"['secp256r1', 'secp384r1', 'secp521r1', 'x25519', 'x448', ...]" + +msgid "By default, this method returns only the preferred IANA names for the available groups. However, if the ``include_aliases`` parameter is set to :const:`True` this method will also return any associated aliases such as the ECDH curve names supported in older versions of OpenSSL." +msgstr "به طور پیش‌فرض، این متد فقط نام‌های ترجیحی IANA را برای گروه‌های موجود برمی‌گرداند. با این حال، اگر پارامتر ``include_aliases`` روی :const:`True` تنظیم شود، این متد هرگونه نام مستعار مرتبط مانند نام‌های منحنی ECDH پشتیبانی‌شده در نسخه‌های قدیمی‌تر OpenSSL را نیز برخواهد گرداند." + msgid "Load a set of default \"certification authority\" (CA) certificates from a filesystem path defined when building the OpenSSL library. Unfortunately, there's no easy way to know whether this method succeeds: no error is returned if no certificates are to be found. When the OpenSSL library is provided as part of the operating system, though, it is likely to be configured properly." msgstr "بارگذاری مجموعه‌ای از گواهی‌های پیش‌فرض «مرجع صدور گواهی» (CA) از یک مسیر سامانه فایل‌بندی که هنگام ساخت کتابخانه OpenSSL تعریف شده است. متأسفانه، راه آسانی برای اطلاع از موفقیت این متد وجود ندارد: اگر هیچ گواهی‌ای یافت نشود، هیچ خطایی بازگردانده نمی‌شود. با این حال، وقتی کتابخانه OpenSSL به‌عنوان بخشی از سیستم‌عامل ارائه شده باشد، احتمالاً به‌درستی پیکربندی شده است." -msgid "Set the available ciphers for sockets created with this context. It should be a string in the `OpenSSL cipher list format `_. If no cipher can be selected (because compile-time options or other configuration forbids use of all the specified ciphers), an :class:`SSLError` will be raised." -msgstr "رمزهای در دسترس را برای سوکت‌های ایجادشده با این زمینه تنظیم می‌کند. این باید رشته‌ای در `قالب فهرست رمزها در OpenSSL `_ باشد. اگر هیچ رمزی قابل انتخاب نباشد (زیرا گزینه‌های زمان کامپایل یا پیکربندی دیگر استفاده از همه رمزهای مشخص‌شده را ممنوع می‌کند)، یک :class:`SSLError` پرتاب خواهد شد." +msgid "Set the allowed ciphers for sockets created with this context when connecting using TLS 1.2 and earlier. The *ciphers* argument should be a string in the `OpenSSL cipher list format `_. To set allowed TLS 1.3 ciphers, use :meth:`SSLContext.set_ciphersuites`." +msgstr "رمزهای مجاز را برای سوکت‌های ایجادشده با این زمینه هنگام اتصال با استفاده از TLS 1.2 و نسخه‌های پیشین تنظیم کنید. آرگومان *ciphers* باید رشته‌ای در قالب `OpenSSL cipher list format `_ باشد. برای تنظیم رمزهای مجاز TLS 1.3، از :meth:`SSLContext.set_ciphersuites` استفاده کنید." + +msgid "If no cipher can be selected (because compile-time options or other configuration forbids use of all the specified ciphers), an :class:`SSLError` will be raised." +msgstr "اگر هیچ رمز (cipher) قابل انتخابی وجود نداشته باشد (به این دلیل که گزینه‌های زمان کامپایل یا پیکربندی‌های دیگر استفاده از تمام رمزهای مشخص‌شده را ممنوع کرده‌اند)، یک :class:`SSLError` بالا برده می‌شود." + +msgid "When connected, the :meth:`SSLSocket.cipher` method of SSL sockets will return details about the negotiated cipher." +msgstr "هنگام اتصال، متد :meth:`SSLSocket.cipher` سوکت‌های SSL جزئیاتی را درباره‌ی رمز مذاکره‌شده بازخواهد گرداند." + +msgid "Set the allowed ciphers for sockets created with this context when connecting using TLS 1.3. The *ciphersuites* argument should be a colon-separate string of TLS 1.3 cipher names. If no cipher can be selected (because compile-time options or other configuration forbids use of all the specified ciphers), an :class:`SSLError` will be raised." +msgstr "رمزهای مجاز را برای سوکت‌های ایجادشده با این زمینه هنگام اتصال با استفاده از TLS 1.3 تنظیم کنید. آرگومان *ciphersuites* باید رشته‌ای جدا شده با دو نقطه از نام رمزهای TLS 1.3 باشد. اگر هیچ رمزی انتخاب نشود (به‌دلیل اینکه گزینه‌های زمان کامپایل یا پیکربندی‌های دیگر استفاده از تمام رمزهای مشخص‌شده را ممنوع می‌کنند)، یک :class:`SSLError` بالا آورده خواهد شد." + +msgid "Set the groups allowed for key agreement for sockets created with this context. It should be a string in the `OpenSSL group list format `_." +msgstr "گروه‌های مجاز برای توافق کلید را برای سوکت‌های ایجادشده با این زمینه تنظیم کنید. این مقدار باید یک رشته در قالب `OpenSSL group list format `_ باشد." + +msgid "When connected, the :meth:`SSLSocket.group` method of SSL sockets will return the group used for key agreement on that connection." +msgstr "هنگام اتصال، متد :meth:`SSLSocket.group` سوکت‌های SSL گروه استفاده‌شده برای توافق کلید روی آن اتصال را بازخواهد گرداند." + +msgid "Set the signature algorithms allowed for certificate-based client authentication. It should be a string in the `OpenSSL client sigalgs list format `_." +msgstr "الگوریتم‌های امضای مجاز برای احراز هویت کلاینت مبتنی بر گواهی را تنظیم کنید. این مقدار باید یک رشته در قالب `OpenSSL client sigalgs list format `_ باشد." -msgid "when connected, the :meth:`SSLSocket.cipher` method of SSL sockets will give the currently selected cipher." -msgstr "پس از اتصال، متد :meth:`SSLSocket.cipher` در سوکت‌های SSL، رمزنگار انتخاب‌شده‌ی کنونی را برمی‌گرداند." +msgid "When connected, the :meth:`SSLSocket.client_sigalg` method of SSL sockets will return the signature algorithm used for performing certificate-based client authentication on that connection." +msgstr "هنگام اتصال، متد :meth:`SSLSocket.client_sigalg` سوکت‌های SSL الگوریتم امضای استفاده‌شده برای انجام احراز هویت کلاینت مبتنی بر گواهی روی آن اتصال را بازخواهد گرداند." -msgid "TLS 1.3 cipher suites cannot be disabled with :meth:`~SSLContext.set_ciphers`." -msgstr "مجموعه‌رمزهای TLS 1.3 را نمی‌توان با :meth:`~SSLContext.set_ciphers` غیرفعال کرد." +msgid "Set the signature algorithms allowed for the server to complete the TLS handshake. It should be a string in the `OpenSSL sigalgs list format `_." +msgstr "الگوریتم‌های امضای مجاز برای سرور جهت تکمیل دست‌دهی TLS را تنظیم کنید. این مقدار باید یک رشته در قالب `OpenSSL sigalgs list format `_ باشد." + +msgid "When connected, the :meth:`SSLSocket.server_sigalg` method of SSL sockets will return the signature algorithm used by the server to complete the TLS handshake on that connection." +msgstr "هنگام اتصال، متد :meth:`SSLSocket.server_sigalg` سوکت‌های SSL الگوریتم امضای استفاده‌شده توسط سرور برای تکمیل دست‌دهی TLS روی آن اتصال را بازخواهد گرداند." msgid "Specify which protocols the socket should advertise during the SSL/TLS handshake. It should be a list of ASCII strings, like ``['http/1.1', 'spdy/2']``, ordered by preference. The selection of a protocol will happen during the handshake, and will play out according to :rfc:`7301`. After a successful handshake, the :meth:`SSLSocket.selected_alpn_protocol` method will return the agreed-upon protocol." msgstr "مشخص کنید که سوکت باید در طول دست‌دهی SSL/TLS کدام پروتکل‌ها را اعلام کند. این باید فهرستی از رشته‌های ASCII، مانند ``['http/1.1', 'spdy/2']``، مرتب‌شده بر اساس ترجیح باشد. انتخاب یک پروتکل در طول دست‌دهی انجام خواهد شد و مطابق :rfc:`7301` صورت خواهد گرفت. پس از یک دست‌دهی موفق، متد :meth:`SSLSocket.selected_alpn_protocol` پروتکل توافق‌شده را برمی‌گرداند." @@ -1176,7 +1248,7 @@ msgid "A typical use of this callback is to change the :class:`ssl.SSLSocket`'s msgstr "یک کاربرد رایج این کال‌بک، تغییر ویژگی :attr:`SSLSocket.context` مربوط به :class:`ssl.SSLSocket` به شیء جدیدی از نوع :class:`SSLContext` است که نشان‌دهنده‌ی زنجیره‌ی گواهی‌ای است که با نام سرور مطابقت دارد." msgid "If the callback assigns a new context to :attr:`SSLSocket.context`, any further ClientHello message on the same connection (for example after a TLS 1.3 HelloRetryRequest) is dispatched to the new context's *sni_callback*, if it has one; the original callback is not called again for that connection." -msgstr "" +msgstr "اگر کال‌بک یک زمینه‌ی جدید به :attr:`SSLSocket.context` اختصاص دهد، هرگونه پیام ClientHello بعدی روی همان اتصال (برای مثال پس از یک TLS 1.3 HelloRetryRequest) به *sni_callback* زمینه‌ی جدید فرستاده می‌شود، اگر زمینه‌ی مذکور آن را داشته باشد؛ کال‌بک اصلی دیگر برای آن اتصال فراخوانی نمی‌شود." msgid "Due to the early negotiation phase of the TLS connection, only limited methods and attributes are usable like :meth:`SSLSocket.selected_alpn_protocol` and :attr:`SSLSocket.context`. The :meth:`SSLSocket.getpeercert`, :meth:`SSLSocket.get_verified_chain`, :meth:`SSLSocket.get_unverified_chain` :meth:`SSLSocket.cipher` and :meth:`SSLSocket.compression` methods require that the TLS connection has progressed beyond the TLS Client Hello and therefore will not return meaningful values nor can they be called safely." msgstr "به دلیل مرحله‌ی اولیه‌ی مذاکره‌ی اتصال TLS، تنها متدها و ویژگی‌های محدودی قابل استفاده هستند، مانند :meth:`SSLSocket.selected_alpn_protocol` و :attr:`SSLSocket.context`. متدهای :meth:`SSLSocket.getpeercert`، :meth:`SSLSocket.get_verified_chain`، :meth:`SSLSocket.get_unverified_chain`، :meth:`SSLSocket.cipher` و :meth:`SSLSocket.compression` نیاز دارند که اتصال TLS از TLS Client Hello فراتر رفته باشد؛ بنابراین نه مقادیر معناداری برمی‌گردانند و نه می‌توان آن‌ها را به‌طور امن فراخوانی کرد." @@ -1191,7 +1263,7 @@ msgid "This method will raise :exc:`NotImplementedError` if the OpenSSL library msgstr "اگر OPENSSL_NO_TLSEXT هنگام ساخت کتابخانه OpenSSL تعریف‌شده باشد، این متد :exc:`NotImplementedError` را پرتاب خواهد کرد." msgid "After the callback assigns a new :attr:`SSLSocket.context`, later ClientHello messages on the connection are dispatched to the new context's *sni_callback*." -msgstr "" +msgstr "پس از اینکه کال‌بک یک :attr:`SSLSocket.context` جدید اختصاص داد، پیام‌های ClientHello بعدی روی اتصال به *sni_callback* زمینه‌ی جدید فرستاده می‌شوند." msgid "This is a legacy API retained for backwards compatibility. When possible, you should use :attr:`sni_callback` instead. The given *server_name_callback* is similar to *sni_callback*, except that when the server hostname is an IDN-encoded internationalized domain name, the *server_name_callback* receives a decoded U-label (``\"pythön.org\"``)." msgstr "این یک API قدیمی است که برای سازگاری با نسخه‌های قبلی حفظ شده است. در صورت امکان، باید به‌جای آن از :attr:`sni_callback` استفاده کنید. *server_name_callback* داده‌شده مشابه *sni_callback* است، با این تفاوت که وقتی نام میزبان سرور یک IDN کدگذاری‌شده با IDN باشد، *server_name_callback* یک U-label کدگشایی‌شده را دریافت می‌کند (``\"pythön.org\"``)." @@ -1260,13 +1332,13 @@ msgid "Wrap the BIO objects *incoming* and *outgoing* and return an instance of msgstr "اشیای BIO *incoming* و *outgoing* را دربرمی‌گیرد و نمونه‌ای از :attr:`SSLContext.sslobject_class` (پیش‌فرض :class:`SSLObject`) برمی‌گرداند. روال‌های SSL داده‌های ورودی را از BIO ورودی می‌خوانند و داده‌ها را در BIO خروجی می‌نویسند." msgid "The *server_side*, *server_hostname* and *session* parameters have the same meaning as in :meth:`SSLContext.wrap_socket`, and are validated in the same way: in particular a :exc:`ValueError` is raised when :attr:`~SSLContext.check_hostname` is enabled but no *server_hostname* is given, since there would be no name to match the peer's certificate against." -msgstr "" +msgstr "پارامترهای *server_side*، *server_hostname* و *session* معنایی مشابه با :meth:`SSLContext.wrap_socket` دارند و به همان شکل اعتبارسنجی می‌شوند: به‌ویژه هنگامی که :attr:`~SSLContext.check_hostname` فعال است اما هیچ *server_hostname*\\ ی داده نشده است، یک :exc:`ValueError` بالا آورده می‌شود، زیرا هیچ نامی برای مطابقت دادن با گواهی همتا وجود نخواهد داشت." msgid "The method returns an instance of :attr:`SSLContext.sslobject_class` instead of hard-coded :class:`SSLObject`." msgstr "این متد به‌جای :class:`SSLObject` سخت‌کد، نمونه‌ای از :attr:`SSLContext.sslobject_class` را برمی‌گرداند." msgid "The *server_side*, *server_hostname* and *session* parameters are now validated as :meth:`SSLContext.wrap_socket` validates them. Previously a context with :attr:`~SSLContext.check_hostname` enabled and no *server_hostname* was accepted, and verified the certificate chain but never the peer's identity." -msgstr "" +msgstr "پارامترهای *server_side*، *server_hostname* و *session* اکنون مانند روشی که :meth:`SSLContext.wrap_socket` آن‌ها را اعتبارسنجی می‌کند، اعتبارسنجی می‌شوند. پیش‌تر، یک زمینه با :attr:`~SSLContext.check_hostname` فعال و بدون *server_hostname* پذیرفته می‌شد و زنجیره‌ی گواهی را تأیید می‌کرد اما هرگز هویت همتا را بررسی نمی‌کرد." msgid "The return type of :meth:`SSLContext.wrap_bio`, defaults to :class:`SSLObject`. The attribute can be overridden on instance of class in order to return a custom subclass of :class:`SSLObject`." msgstr "نوع بازگشتی :meth:`SSLContext.wrap_bio`، به‌طور پیش‌فرض :class:`SSLObject` است. می‌توان این ویژگی را در نمونه‌ای از کلاس بازنویسی کرد تا یک زیرکلاس سفارشی از :class:`SSLObject` بازگردانده شود." @@ -2159,8 +2231,8 @@ msgstr "TLS 1.3" msgid "The TLS 1.3 protocol behaves slightly differently than previous version of TLS/SSL. Some new TLS 1.3 features are not yet available." msgstr "پروتکل TLS 1.3 نسبت به نسخه‌ی قبلی TLS/SSL کمی متفاوت عمل می‌کند. برخی ویژگی‌های جدید TLS 1.3 هنوز در دسترس نیستند." -msgid "TLS 1.3 uses a disjunct set of cipher suites. All AES-GCM and ChaCha20 cipher suites are enabled by default. The method :meth:`SSLContext.set_ciphers` cannot enable or disable any TLS 1.3 ciphers yet, but :meth:`SSLContext.get_ciphers` returns them." -msgstr "TLS 1.3 از مجموعه‌ای مجزا از مجموعه‌های رمزنگاری (cipher suites) استفاده می‌کند. همه‌ی مجموعه‌های رمزنگاری AES-GCM و ChaCha20 به‌طور پیش‌فرض فعال هستند. متد :meth:`SSLContext.set_ciphers` هنوز نمی‌تواند هیچ‌کدام از رمزهای TLS 1.3 را فعال یا غیرفعال کند، اما :meth:`SSLContext.get_ciphers` آن‌ها را برمی‌گرداند." +msgid "TLS 1.3 uses a disjunct set of cipher suites. All AES-GCM and ChaCha20 cipher suites are enabled by default. To restrict which TLS 1.3 ciphers are allowed, the :meth:`SSLContext.set_ciphersuites` method should be called instead of :meth:`SSLContext.set_ciphers`, which only affects ciphers in older TLS versions. The :meth:`SSLContext.get_ciphers` method returns information about ciphers for both TLS 1.3 and earlier versions and the method :meth:`SSLSocket.cipher` returns information about the negotiated cipher for both TLS 1.3 and earlier versions once a connection is established." +msgstr "پروتکل TLS 1.3 از مجموعه رمزهای مجزایی استفاده می‌کند. تمام مجموعه‌های رمز AES-GCM و ChaCha20 به‌طور پیش‌فرض فعال هستند. برای محدود کردن رمزهای مجاز TLS 1.3، باید متد :meth:`SSLContext.set_ciphersuites` فراخوانی شود، نه :meth:`SSLContext.set_ciphers` که فقط روی رمزهای موجود در نسخه‌های قدیمی‌تر TLS تأثیر می‌گذارد. متد :meth:`SSLContext.get_ciphers` اطلاعاتی درباره‌ی رمزها برای هر دو نسخه‌ی TLS 1.3 و نسخه‌های پیشین برمی‌گرداند و متد :meth:`SSLSocket.cipher` پس از برقراری اتصال، اطلاعاتی را درباره‌ی رمز توافق‌شده برای هر دو نسخه‌ی TLS 1.3 و نسخه‌های پیشین برمی‌گرداند." msgid "Session tickets are no longer sent as part of the initial handshake and are handled differently. :attr:`SSLSocket.session` and :class:`SSLSession` are not compatible with TLS 1.3." msgstr "تیکت‌های نشست (session tickets) دیگر به‌عنوان بخشی از دست‌دهی اولیه ارسال نمی‌شوند و به‌شکل متفاوتی مدیریت می‌شوند. :attr:`SSLSocket.session` و :class:`SSLSession` با TLS 1.3 سازگار نیستند." @@ -2168,8 +2240,8 @@ msgstr "تیکت‌های نشست (session tickets) دیگر به‌عنوان msgid "Client-side certificates are also no longer verified during the initial handshake. A server can request a certificate at any time. Clients process certificate requests while they send or receive application data from the server." msgstr "گواهی‌های سمت کلاینت نیز دیگر در حین دست‌دهی اولیه تأیید نمی‌شوند. یک سرور می‌تواند در هر زمان یک گواهی درخواست کند. کلاینت‌ها درخواست‌های گواهی را هنگامی که داده‌های کاربردی را ارسال می‌کنند یا از سرور دریافت می‌کنند، پردازش می‌کنند." -msgid "TLS 1.3 features like early data, deferred TLS client cert request, signature algorithm configuration, and rekeying are not supported yet." -msgstr "قابلیت‌های TLS 1.3 مانند داده‌های زودهنگام (early data)، درخواست به‌تعویق‌افتاده‌ی گواهی کلاینت TLS (deferred TLS client cert request)، پیکربندی الگوریتم امضا و تولید مجدد کلید (rekeying) هنوز پشتیبانی نمی‌شوند." +msgid "TLS 1.3 features like early data, deferred TLS client cert request, and rekeying are not supported yet." +msgstr "ویژگی‌های TLS 1.3 مانند داده‌ی زودهنگام، درخواست گواهی کلاینت با تأخیر TLS و بازنشانی کلید هنوز پشتیبانی نمی‌شوند." msgid "Class :class:`socket.socket`" msgstr "کلاس :class:`socket.socket`" @@ -2255,5 +2327,11 @@ msgstr "گواهی‌ها" msgid "X509 certificate" msgstr "گواهی X509" +#~ msgid "TLS 1.3 cipher suites cannot be disabled with :meth:`~SSLContext.set_ciphers`." +#~ msgstr "مجموعه‌رمزهای TLS 1.3 را نمی‌توان با :meth:`~SSLContext.set_ciphers` غیرفعال کرد." + +#~ msgid "TLS 1.3 uses a disjunct set of cipher suites. All AES-GCM and ChaCha20 cipher suites are enabled by default. The method :meth:`SSLContext.set_ciphers` cannot enable or disable any TLS 1.3 ciphers yet, but :meth:`SSLContext.get_ciphers` returns them." +#~ msgstr "TLS 1.3 از مجموعه‌ای مجزا از مجموعه‌های رمزنگاری (cipher suites) استفاده می‌کند. همه‌ی مجموعه‌های رمزنگاری AES-GCM و ChaCha20 به‌طور پیش‌فرض فعال هستند. متد :meth:`SSLContext.set_ciphers` هنوز نمی‌تواند هیچ‌کدام از رمزهای TLS 1.3 را فعال یا غیرفعال کند، اما :meth:`SSLContext.get_ciphers` آن‌ها را برمی‌گرداند." + #~ msgid "The *server_side*, *server_hostname* and *session* parameters have the same meaning as in :meth:`SSLContext.wrap_socket`." #~ msgstr "پارامترهای *server_side*، *server_hostname* و *session* همان معنایی را دارند که در :meth:`SSLContext.wrap_socket` آمده است." diff --git a/library/stat.po b/library/stat.po index a0f4813d..55877314 100644 --- a/library/stat.po +++ b/library/stat.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 12:38+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -348,3 +349,6 @@ msgstr "در ویندوز، ثابت‌های ویژگی پرونده زیر ب msgid "On Windows, the following constants are available for comparing against the ``st_reparse_tag`` member returned by :func:`os.lstat`. These are well-known constants, but are not an exhaustive list." msgstr "در ویندوز، ثابت‌های زیر برای مقایسه با عضو ``st_reparse_tag`` برگردانده‌شده توسط :func:`os.lstat` در دسترس هستند. این‌ها ثابت‌های شناخته‌شده‌ای هستند، اما فهرستی جامع نیستند." + +msgid "On Linux, the following file attribute constants are available for use when testing bits in the :attr:`~os.statx_result.stx_attributes` and :attr:`~os.statx_result.stx_attributes_mask` members returned by :func:`os.statx`. See the :manpage:`statx(2)` man page for more detail on the meaning of these constants." +msgstr "در لینوکس، ثابت‌های ویژگی‌های پرونده‌ی زیر برای استفاده هنگام آزمون بیت‌ها در اعضای :attr:`~os.statx_result.stx_attributes` و :attr:`~os.statx_result.stx_attributes_mask` که توسط :func:`os.statx` بازگردانده می‌شوند، در دسترس هستند. برای جزئیات بیشتر درباره‌ی معنی این ثابت‌ها به صفحه‌ی راهنمای :manpage:`statx(2)` مراجعه کنید." diff --git a/library/statistics.po b/library/statistics.po index ee71d369..8456ef70 100644 --- a/library/statistics.po +++ b/library/statistics.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 09:47+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -402,9 +403,6 @@ msgstr "می‌توان از نقاط ``xarr`` و ``yarr`` برای رسم نم msgid "Scatter plot of the estimated probability density function." msgstr "نمودار پراکندگی تابع چگالی احتمال تخمینی." -msgid "Because the returned ``f_hat`` function is typically called many times, it caches the *data* for performance. To support dynamic datasets, this cache automatically refreshes whenever the length of the *data* changes. This allows new samples to be added as they become available." -msgstr "از آنجا که تابع برگردانده‌شده ``f_hat`` معمولاً بارها صدا زده می‌شود، آن *data* را برای عملکرد در نهانگاه می‌ریزد. برای حمایت از مجموعه‌داده‌های پویا، این نهانگاه به‌صورت خودکار هرگاه طول *data* تغییر کند، به‌روزرسانی می‌شود. این کار امکان افزودن نمونه‌های جدید را به محض در دسترس قرار گرفتن آن‌ها فراهم می‌کند." - msgid "Return a function that makes a random selection from the estimated probability density function produced by ``kde(data, h, kernel)``." msgstr "تابعی را برمی‌گرداند که یک انتخاب تصادفی از تابع چگالی احتمال برآوردی که توسط ``kde(data, h, kernel)`` تولید شده است، انجام می‌دهد." @@ -774,8 +772,8 @@ msgstr "" msgid "No longer raises an exception for an input with only a single data point. This allows quantile estimates to be built up one sample point at a time becoming gradually more refined with each new data point." msgstr "دیگر برای ورودی‌ای با تنها یک نقطه داده، استثنایی پرتاب نمی‌کند. این امکان را فراهم می‌کند که برآوردهای چندک (quantile) هر بار با یک نقطه نمونه ساخته شوند و با هر نقطه داده جدید به‌تدریج دقیق‌تر شوند." -msgid "Return the sample covariance of two inputs *x* and *y*. Covariance is a measure of the joint variability of two inputs." -msgstr "کوواریانس نمونه دو ورودی *x* و *y* را برمی‌گرداند. کوواریانس معیاری از تغییرپذیری مشترک دو ورودی است." +msgid "Return the sample covariance of two sequence inputs *x* and *y*. Covariance is a measure of the joint variability of two inputs." +msgstr "کوواریانس نمونه‌ی دو ورودی دنباله‌ای *x* و *y* را بازگردانید. کوواریانس معیاری برای تغییرپذیری مشترک دو ورودی است." msgid "Both inputs must be of the same length (no less than two), otherwise :exc:`StatisticsError` is raised." msgstr "هر دو ورودی باید طول یکسانی داشته باشند (طولشان کمتر از ۲ نباشد)، در غیر این صورت :exc:`StatisticsError` پرتاب می‌شود." @@ -801,8 +799,8 @@ msgstr "" ">>> covariance(z, x)\n" "-7.5" -msgid "Return the `Pearson's correlation coefficient `_ for two inputs. Pearson's correlation coefficient *r* takes values between -1 and +1. It measures the strength and direction of a linear relationship." -msgstr "`ضریب همبستگی پیرسون `_ را برای دو ورودی برمی‌گرداند. ضریب همبستگی پیرسون *r* مقادیری بین -۱ و +۱ می‌گیرد. این ضریب، شدت و جهت یک رابطه خطی را اندازه‌گیری می‌کند." +msgid "Return the `Pearson's correlation coefficient `_ for two sequence inputs. Pearson's correlation coefficient *r* takes values between -1 and +1. It measures the strength and direction of a linear relationship." +msgstr "`ضریب همبستگی پیرسون `_ را برای دو ورودی دنباله‌ای بازگردانید. ضریب همبستگی پیرسون *r* مقادیری بین ۱- و ۱+ می‌گیرد. این ضریب قدرت و جهت یک رابطه‌ی خطی را اندازه‌گیری می‌کند." msgid "If *method* is \"ranked\", computes `Spearman's rank correlation coefficient `_ for two inputs. The data is replaced by ranks. Ties are averaged so that equal values receive the same rank. The resulting coefficient measures the strength of a monotonic relationship." msgstr "اگر *method* برابر با \"ranked\" باشد، `ضریب همبستگی رتبه‌ای اسپیرمن `_ را برای دو ورودی محاسبه می‌کند. داده‌ها با رتبه‌ها جایگزین می‌شوند. برای مقادیر برابر، میانگین رتبه‌ها گرفته می‌شود تا مقادیر مساوی رتبه یکسانی دریافت کنند. ضریب حاصل، شدت رابطه‌ی یکنواخت را می‌سنجد." @@ -869,8 +867,8 @@ msgstr "*y = slope \\* x + intercept + noise*" msgid "where ``slope`` and ``intercept`` are the regression parameters that are estimated, and ``noise`` represents the variability of the data that was not explained by the linear regression (it is equal to the difference between predicted and actual values of the dependent variable)." msgstr "که در آن ``slope`` و ``intercept`` پارامترهای رگرسیون هستند که برآورد می‌شوند، و ``noise`` تغییرپذیری داده‌ها را که توسط رگرسیون خطی تبیین نشده است نشان می‌دهد (این مقدار برابر با تفاوت بین مقادیر پیش‌بینی‌شده و واقعی متغیر وابسته است)." -msgid "Both inputs must be of the same length (no less than two), and the independent variable *x* cannot be constant; otherwise a :exc:`StatisticsError` is raised." -msgstr "هر دو ورودی باید طول یکسانی داشته باشند (حداقل ۲)، و متغیر مستقل *x* نمی‌تواند ثابت باشد؛ در غیر این صورت :exc:`StatisticsError` پرتاب می‌شود." +msgid "Both inputs must be sequences of the same length (no less than two), and the independent variable *x* cannot be constant; otherwise a :exc:`StatisticsError` is raised." +msgstr "هر دو ورودی باید دنباله‌هایی با طول یکسان (حداقل دو) باشند و متغیر مستقل *x* نمی‌تواند ثابت باشد؛ در غیر این صورت یک :exc:`StatisticsError` بالا آورده می‌شود." msgid "For example, we can use the `release dates of the Monty Python films `_ to predict the cumulative number of Monty Python films that would have been produced by 2019 assuming that they had kept the pace." msgstr "برای مثال، می‌توانیم از `تاریخ‌های انتشار فیلم‌های مانتی پایتون `_ برای پیش‌بینی تعداد تجمعی فیلم‌های مانتی پایتون که با فرض حفظ آهنگ تولید، تا سال ۲۰۱۹ تولید شده بودند، استفاده کنیم." @@ -1225,3 +1223,6 @@ msgid "" msgstr "" ">>> 'male' if posterior_male > posterior_female else 'female'\n" "'female'" + +#~ msgid "Because the returned ``f_hat`` function is typically called many times, it caches the *data* for performance. To support dynamic datasets, this cache automatically refreshes whenever the length of the *data* changes. This allows new samples to be added as they become available." +#~ msgstr "از آنجا که تابع برگردانده‌شده ``f_hat`` معمولاً بارها صدا زده می‌شود، آن *data* را برای عملکرد در نهانگاه می‌ریزد. برای حمایت از مجموعه‌داده‌های پویا، این نهانگاه به‌صورت خودکار هرگاه طول *data* تغییر کند، به‌روزرسانی می‌شود. این کار امکان افزودن نمونه‌های جدید را به محض در دسترس قرار گرفتن آن‌ها فراهم می‌کند." diff --git a/library/struct.po b/library/struct.po index 4c020ea2..532c60e0 100644 --- a/library/struct.po +++ b/library/struct.po @@ -9,12 +9,13 @@ # Ariyan Bolandi, 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 19:44+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -349,8 +350,8 @@ msgstr "``d``" msgid ":c:expr:`double`" msgstr ":c:expr:`double`" -msgid "``F``" -msgstr "``F``" +msgid "``Zf``" +msgstr "``Zf``" msgid ":c:expr:`float complex`" msgstr ":c:expr:`float complex`" @@ -361,8 +362,8 @@ msgstr "complex" msgid "\\(10)" msgstr "\\(10)" -msgid "``D``" -msgstr "``D``" +msgid "``Zd``" +msgstr "``Zd``" msgid ":c:expr:`double complex`" msgstr ":c:expr:`double complex`" @@ -406,6 +407,9 @@ msgstr "پشتیبانی از قالب ``'e'`` اضافه شد." msgid "Added support for the ``'F'`` and ``'D'`` formats." msgstr "پشتیبانی از قالب‌های ``'F'`` و ``'D'`` اضافه شد." +msgid "Added support for the ``'Zf'`` and ``'Zd'`` formats. ``'F'`` and ``'D'`` formats are :term:`soft deprecated`." +msgstr "پشتیبانی از قالب‌های ``'Zf'`` و ``'Zd'`` اضافه شد. قالب‌های ``'F'`` و ``'D'`` :term:`منسوخ نرم ` هستند." + msgid "The :mod:`array` and :ref:`ctypes ` modules, as well as third-party modules like `numpy `__, use similar -- but slightly different -- type codes." msgstr "ماژول‌های :mod:`array` و :ref:`ctypes `، و همچنین ماژول‌های شخص ثالث مانند `numpy `__، از کدهای نوع مشابه، اما کمی متفاوت، استفاده می‌کنند." @@ -439,8 +443,8 @@ msgstr "نویسه قالب ``'p'`` یک «رشته پاسکالی» را کدگ msgid "For the ``'s'`` format character, the count is interpreted as the length of the byte string, not a repeat count like for the other format characters; for example, ``'10s'`` means a single 10-byte string mapping to or from a single Python byte string, while ``'10c'`` means 10 separate one byte character elements (e.g., ``cccccccccc``) mapping to or from ten different Python byte objects. (See :ref:`struct-examples` for a concrete demonstration of the difference.) If a count is not given, it defaults to 1. For packing, the byte string is truncated or padded with null bytes as appropriate to make it fit. For unpacking, the resulting :class:`!bytes` object always has exactly the specified number of bytes. As a special case, ``'0s'`` means a single, empty byte string (while ``'0c'`` means 0 characters). When packing, arguments of types :class:`bytes` and :class:`bytearray` are accepted." msgstr "برای نویسه‌ی قالب ``'s'``، تعداد به‌عنوان طول رشته‌ی بایتی تفسیر می‌شود، نه به‌عنوان تعداد تکرار مانند دیگر نویسه‌های قالب؛ برای مثال، ``'10s'`` به‌معنای یک رشته‌ی ۱۰ بایتی واحد است که به یک رشته‌ی بایتی پایتون یا از آن نگاشت می‌شود، در حالی که ``'10c'`` به‌معنای ۱۰ المان نویسه‌ای یک‌بایتی جداگانه (مانند ``cccccccccc``) است که به ۱۰ شیء بایتی متفاوت پایتون یا از آن‌ها نگاشت می‌شوند. (برای نمایش ملموس این تفاوت، :ref:`struct-examples` را ببینید.) اگر تعدادی داده نشود، مقدار پیش‌فرض ۱ است. در بسته‌بندی، رشته‌ی بایتی در صورت لزوم بریده می‌شود یا با بایت‌های تهی پر می‌شود تا در قالب جای گیرد. در واگشایی، شیء :class:`!bytes` حاصل همیشه دقیقاً دارای تعداد بایت مشخص‌شده است. به‌عنوان یک حالت خاص، ``'0s'`` به‌معنای یک رشته‌ی بایتی خالی واحد است (در حالی که ``'0c'`` به‌معنای ۰ نویسه است). هنگام بسته‌بندی، آرگومان‌هایی از انواع :class:`bytes` و :class:`bytearray` پذیرفته می‌شوند." -msgid "For the ``'F'`` and ``'D'`` format characters, the packed representation uses the IEEE 754 binary32 and binary64 format for components of the complex number, regardless of the floating-point format used by the platform. Note that complex types (``F`` and ``D``) are available unconditionally, despite complex types being an optional feature in C. As specified in the C11 standard, each complex type is represented by a two-element C array containing, respectively, the real and imaginary parts." -msgstr "برای نویسه‌های قالب ``'F'`` و ``'D'``، نمایش فشرده از قالب IEEE 754 binary32 و binary64 برای کامپوننت‌های عدد مختلط استفاده می‌کند، صرف‌نظر از قالب ممیز شناور استفاده‌شده توسط سکو. توجه داشته باشید که انواع مختلط (``F`` و ``D``) به‌طور غیرمشروط در دسترس هستند، با وجود اینکه انواع مختلط یک ویژگی اختیاری در C هستند. همان‌طور که در استاندارد C11 مشخص شده است، هر نوع مختلط به‌صورت یک آرایه C دو عنصری نمایش داده می‌شود که به‌ترتیب شامل بخش حقیقی و بخش موهومی است." +msgid "For the ``'Zf'`` and ``'Zd'`` type codes, the packed representation uses the IEEE 754 binary32 and binary64 format for components of the complex number, regardless of the floating-point format used by the platform. Note that complex types are available unconditionally, despite complex types being an optional feature in C. As specified in the C11 standard, each complex type is represented by a two-element C array containing, respectively, the real and imaginary parts. The ``'F'`` and ``'D'`` (for ``'Zf'`` and ``'Zd'``, respectively) format characters are supported for compatibility." +msgstr "برای کدهای نوع ``'Zf'`` و ``'Zd'``، بازنمایی بسته‌بندی‌شده از قالب‌های باینری ۳۲ و باینری ۶۴ استاندارد IEEE 754 برای اجزای عدد مختلط استفاده می‌کند، صرف‌نظر از قالب ممیز شناوری که پلتفرم به کار می‌برد. توجه داشته باشید که انواع مختلط به‌طور پیش‌فرض و بدون قید و شرط در دسترس هستند، با وجود اینکه انواع مختلط در زبان C یک ویژگی اختیاری محسوب می‌شوند. همان‌طور که در استاندارد C11 مشخص شده است، هر نوع مختلط با یک آرایه‌ی دو عنصری C نمایش داده می‌شود که به‌ترتیب حاوی قسمت‌های حقیقی و موهمی است. نویسه‌های قالب ``'F'`` و ``'D'`` (به‌ترتیب برای ``'Zf'`` و ``'Zd'``) برای سازگاری پشتیبانی می‌شوند." msgid "A format character may be preceded by an integral repeat count. For example, the format string ``'4h'`` means exactly the same as ``'hhhh'``." msgstr "می‌توان پیش از یک نویسه قالب، یک تعداد تکرار صحیح قرار داد. برای مثال، رشته قالب ``'4h'`` دقیقاً همان معنای ``'hhhh'`` را دارد." @@ -755,3 +759,9 @@ msgstr "! (علامت تعجب)" msgid "? (question mark)" msgstr "? (علامت سؤال)" + +#~ msgid "``F``" +#~ msgstr "``F``" + +#~ msgid "``D``" +#~ msgstr "``D``" diff --git a/library/subprocess.po b/library/subprocess.po index 2287e893..6250d2ad 100644 --- a/library/subprocess.po +++ b/library/subprocess.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 12:36+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -178,8 +179,8 @@ msgstr "ویژگی‌های *stdout* و *stderr* افزوده شدند" msgid "Subclass of :exc:`SubprocessError`, raised when a process run by :func:`check_call`, :func:`check_output`, or :func:`run` (with ``check=True``) returns a non-zero exit status." msgstr "زیرکلاسی از :exc:`SubprocessError`، زمانی پرتاب می‌شود که فرایند اجراشده به‌وسیله‌ی :func:`check_call`، :func:`check_output` یا :func:`run` (با ``check=True``) وضعیت خروجی غیرصفر برگرداند." -msgid "Exit status of the child process, an integer. If the process exited due to a signal, this will be the negative signal number." -msgstr "وضعیت خروجِ فرایندِ فرزند، یک عدد صحیح. اگر فرایند به دلیل یک سیگنال خارج شده باشد، این مقدار عدد منفیِ شماره‌ی سیگنال خواهد بود." +msgid "Exit status of the child process. If the process exited due to a signal, this will be the negative signal number." +msgstr "وضعیت خروج فرایند فرزند. اگر فرایند به دلیل دریافت یک سیگنال خارج شده باشد، این مقدار شماره‌ی منفی سیگنال خواهد بود." msgid "Output of the child process if it was captured by :func:`run` or :func:`check_output`. Otherwise, ``None``." msgstr "خروجی فرآیند فرزند، اگر توسط :func:`run` یا :func:`check_output` گرفته شده باشد. در غیر این صورت، ``None``." @@ -541,12 +542,30 @@ msgstr "اگر فرایند پس از *timeout* ثانیه به پایان نر msgid "This will deadlock when using ``stdout=PIPE`` or ``stderr=PIPE`` and the child process generates enough output to a pipe such that it blocks waiting for the OS pipe buffer to accept more data. Use :meth:`Popen.communicate` when using pipes to avoid that." msgstr "هنگام استفاده از ``stdout=PIPE`` یا ``stderr=PIPE``، اگر فرایند فرزند آن‌قدر خروجی به یک پایپ تولید کند که در انتظار پذیرش داده‌های بیشتر توسط بافر پایپ سیستم‌عامل مسدود شود، بن‌بست رخ خواهد داد. برای جلوگیری از این حالت، هنگام استفاده از پایپ‌ها از :meth:`Popen.communicate` استفاده کنید." -msgid "When the ``timeout`` parameter is not ``None``, then (on POSIX) the function is implemented using a busy loop (non-blocking call and short sleeps). Use the :mod:`asyncio` module for an asynchronous wait: see :class:`asyncio.create_subprocess_exec`." -msgstr "هنگامی که پارامتر ``timeout`` برابر ``None`` نباشد، در این صورت (در POSIX) این تابع با استفاده از یک حلقه‌ی مشغول (busy loop) پیاده‌سازی می‌شود (فراخوانی غیرمسدودکننده و توقف‌های کوتاه). برای انتظار ناهمگام، از ماژول :mod:`asyncio` استفاده کنید: :class:`asyncio.create_subprocess_exec` را ببینید." +msgid "When ``timeout`` is not ``None`` and the platform supports it, an efficient event-driven mechanism is used to wait for process termination:" +msgstr "هنگامی که ``timeout`` برابر با ``None`` نباشد و سکو از آن پشتیبانی کند، از یک مکانیزم کارآمد رویدادمحور برای انتظار جهت پایان یافتن فرایند استفاده می‌شود:" + +msgid "Linux >= 5.3 uses :func:`os.pidfd_open` + :func:`select.poll`" +msgstr "لینوکس >= 5.3 از :func:`os.pidfd_open` + :func:`select.poll` استفاده می‌کند" + +msgid "macOS and other BSD variants use :func:`select.kqueue` + ``KQ_FILTER_PROC`` + ``KQ_NOTE_EXIT``" +msgstr "مک‌اواس و سایر مشتقات BSD از :func:`select.kqueue` + ``KQ_FILTER_PROC`` + ``KQ_NOTE_EXIT`` استفاده می‌کنند" + +msgid "Windows uses ``WaitForSingleObject``" +msgstr "ویندوز از ``WaitForSingleObject`` استفاده می‌کند" + +msgid "If none of these mechanisms are available, the function falls back to a busy loop (non-blocking call and short sleeps)." +msgstr "اگر هیچ‌کدام از این مکانیزم‌ها در دسترس نباشند، تابع به حلقه‌ی مشغول (فراخوانی غیرمسدودکننده و توقف‌های کوتاه) برمی‌گردد." + +msgid "Use the :mod:`asyncio` module for an asynchronous wait: see :class:`asyncio.create_subprocess_exec`." +msgstr "برای انتظار ناهمگام از ماژول :mod:`asyncio` استفاده کنید: :class:`asyncio.create_subprocess_exec` را ببیند." msgid "*timeout* was added." msgstr "*timeout* افزوده شد." +msgid "if *timeout* is not ``None``, use efficient event-driven implementation on Linux >= 5.3 and macOS / BSD." +msgstr "اگر *timeout* برابر با ``None`` نباشد، از پیاده‌سازی رویدادمحور کارآمد در لینوکس >= 5.3 و مک‌اواس / BSD استفاده کنید." + msgid "Interact with process: Send data to stdin. Read data from stdout and stderr, until end-of-file is reached. Wait for process to terminate and set the :attr:`~Popen.returncode` attribute. The optional *input* argument should be data to be sent to the child process, or ``None``, if no data should be sent to the child. If streams were opened in text mode, *input* must be a string. Otherwise, it must be bytes." msgstr "با فرایند تعامل می‌کند: داده‌ها را به stdin ارسال می‌کند. داده‌ها را از stdout و stderr می‌خواند، تا به پایان پرونده برسد. منتظر می‌ماند تا فرایند خاتمه یابد و ویژگی :attr:`~Popen.returncode` را تنظیم می‌کند. آرگومان اختیاری *input* باید داده‌ای برای ارسال به فرایند فرزند باشد، یا ``None``، اگر نباید هیچ داده‌ای به فرایند فرزند ارسال شود. اگر جریان‌ها در حالت متنی باز شده باشند، *input* باید یک رشته باشد. در غیر این صورت، باید bytes باشد." @@ -1130,3 +1149,6 @@ msgstr "سطرهای جدید همگانی" msgid "subprocess module" msgstr "ماژول subprocess" + +#~ msgid "When the ``timeout`` parameter is not ``None``, then (on POSIX) the function is implemented using a busy loop (non-blocking call and short sleeps). Use the :mod:`asyncio` module for an asynchronous wait: see :class:`asyncio.create_subprocess_exec`." +#~ msgstr "هنگامی که پارامتر ``timeout`` برابر ``None`` نباشد، در این صورت (در POSIX) این تابع با استفاده از یک حلقه‌ی مشغول (busy loop) پیاده‌سازی می‌شود (فراخوانی غیرمسدودکننده و توقف‌های کوتاه). برای انتظار ناهمگام، از ماژول :mod:`asyncio` استفاده کنید: :class:`asyncio.create_subprocess_exec` را ببینید." diff --git a/library/superseded.po b/library/superseded.po index 7bef1d58..565efc06 100644 --- a/library/superseded.po +++ b/library/superseded.po @@ -6,12 +6,13 @@ # Translators: # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 01:14+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -21,8 +22,8 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -msgid "Superseded Modules" -msgstr "ماژول‌های جایگزین‌شده" +msgid "Superseded modules" +msgstr "ماژول‌های منسوخ‌شده" msgid "The modules described in this chapter have been superseded by other modules for most use cases, and are retained primarily to preserve backwards compatibility." msgstr "ماژول‌های توصیف‌شده در این فصل برای بیشتر موارد استفاده با ماژول‌های دیگر جایگزین شده‌اند و عمدتاً برای حفظ سازگاری با نسخه‌های قبلی نگه‌داری می‌شوند." diff --git a/library/symtable.po b/library/symtable.po index e9c9eaae..17d5575f 100644 --- a/library/symtable.po +++ b/library/symtable.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 08:14+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -35,8 +36,11 @@ msgstr "جدول‌های نماد توسط کامپایلر از روی AST، msgid "Generating Symbol Tables" msgstr "تولید جدول‌های نماد" -msgid "Return the toplevel :class:`SymbolTable` for the Python source *code*. *filename* is the name of the file containing the code. *compile_type* is like the *mode* argument to :func:`compile`." -msgstr ":class:`SymbolTable` سطح بالا را برای کد منبع پایتون *code* برمی‌گرداند. *filename* نام پرونده‌ای است که حاوی کد است. *compile_type* مانند آرگومان *mode* برای :func:`compile` است." +msgid "Return the toplevel :class:`SymbolTable` for the Python source *code*. *filename* is the name of the file containing the code. *compile_type* is like the *mode* argument to :func:`compile`. The optional argument *module* specifies the module name. It is needed to unambiguous :ref:`filter ` syntax warnings by module name." +msgstr "شیء :class:`SymbolTable` سطح بالا را برای *کد* منبع پایتون برمی‌گرداند. *filename* نام پرونده‌ای است که کد را در خود جای داده است. آرگومان *compile_type* مشابه آرگومان *mode* در تابع :func:`compile` است. آرگومان اختیاری *module* نام ماژول را مشخص می‌کند. این مقدار برای پالایش صریح هشدارهای :ref:`سینتکس ` بر اساس نام ماژول مورد نیاز است." + +msgid "Added the *module* parameter." +msgstr "پارامتر *module* اضافه شد." msgid "Examining Symbol Tables" msgstr "بررسی جدول‌های نماد" @@ -131,6 +135,9 @@ msgstr "یک تاپل شامل نام‌های nonlocal اعلام‌شده به msgid "Return a tuple containing names of :term:`free (closure) variables ` in this function." msgstr "یک تاپل شامل نام‌های :term:`متغیرهای آزاد (بستار) ` در این تابع بازمی‌گرداند." +msgid "Return a tuple containing names of :term:`cell variables ` in this table." +msgstr "یک تاپل حاوی نام‌های :term:`متغیرهای سلولی ` در این جدول را برمی‌گرداند." + msgid "A namespace of a class. This class inherits from :class:`SymbolTable`." msgstr "فضای نام یک کلاس. این کلاس از :class:`SymbolTable` ارث می‌برد." @@ -226,6 +233,9 @@ msgstr "اگر نماد حاشیه‌نویسی‌شده باشد، ``True`` ر msgid "Return ``True`` if the symbol is referenced in its block, but not assigned to." msgstr "اگر نماد در بلوک خود ارجاع داده شده باشد، اما به آن انتساب داده نشده باشد، ``True`` برمی‌گرداند." +msgid "Return ``True`` if the symbol is referenced but not assigned in a nested block." +msgstr "اگر نماد در یک بلوک تو در تو ارجاع داده شده باشد اما مقداردهی نشده باشد، مقدار ``True`` را برمی‌گرداند." + msgid "Return *True* if a class-scoped symbol is free from the perspective of a method." msgstr "اگر یک نماد با محدوده کلاس از دید یک متد آزاد باشد، *True* را برمی‌گرداند." diff --git a/library/sys.monitoring.po b/library/sys.monitoring.po index 029ac80f..6141b862 100644 --- a/library/sys.monitoring.po +++ b/library/sys.monitoring.po @@ -6,12 +6,13 @@ # Translators: # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-08-28 11:12+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -172,8 +173,8 @@ msgstr "تنظیم این رویداد، همه رویدادها را غیرفع msgid "Local events" msgstr "رویدادهای محلی" -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 "رویدادهای محلی با اجرای عادی برنامه مرتبط هستند و در مکان‌های به‌وضوح تعریف‌شده رخ می‌دهند. می‌توان تمام رویدادهای محلی را غیرفعال کرد. رویدادهای محلی عبارتند از:" +msgid "Local events are associated with normal execution of the program and happen at clearly defined locations. All local events can be disabled per location. The local events are:" +msgstr "رویدادهای محلی با اجرای عادی برنامه مرتبط هستند و در مکان‌هایی که به وضوح تعریف شده‌اند رخ می‌دهند. تمام رویدادهای محلی را می‌توان به ازای هر مکان غیرفعال کرد. رویدادهای محلی عبارتند از:" msgid ":monitoring-event:`PY_START`" msgstr ":monitoring-event:`PY_START`" @@ -235,8 +236,8 @@ msgstr "رویدادهای :monitoring-event:`C_RETURN` و :monitoring-event:`C_ msgid "Other events" msgstr "رویدادهای دیگر" -msgid "Other events are not necessarily tied to a specific location in the program and cannot be individually disabled via :data:`DISABLE`." -msgstr "سایر رویدادها لزوماً به مکان مشخصی در برنامه وابسته نیستند و نمی‌توان آن‌ها را به‌صورت جداگانه از طریق :data:`DISABLE` غیرفعال کرد." +msgid "Other events are not necessarily tied to a specific location in the program and cannot be individually disabled per location." +msgstr "سایر رویدادها لزوماً به مکان خاصی در برنامه گره نخورده‌اند و نمی‌توان آن‌ها را به صورت فردی به ازای هر مکان غیرفعال کرد." msgid "The other events that can be monitored are:" msgstr "رویدادهای دیگری که می‌توان آن‌ها را پایش کرد عبارتند از:" @@ -253,14 +254,20 @@ msgstr ":monitoring-event:`RAISE`" msgid ":monitoring-event:`EXCEPTION_HANDLED`" msgstr ":monitoring-event:`EXCEPTION_HANDLED`" +msgid ":monitoring-event:`RERAISE`" +msgstr ":monitoring-event:`RERAISE`" + +msgid "Other events can now be turned on and disabled on a per code object basis. Returning :data:`DISABLE` from a callback disables the event for the entire code object (for the current tool)." +msgstr "سایر رویدادها اکنون می‌توانند بر اساس شیء کد روشن و غیرفعال شوند. بازگرداندن :data:`DISABLE` از یک کال‌بک، رویداد را برای کل شیء کد (برای ابزار فعلی) غیرفعال می‌کند." + msgid "The STOP_ITERATION event" msgstr "رویداد STOP_ITERATION" 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 generator or coroutine. However, this is a very inefficient way to return a value, so some Python implementations, notably CPython 3.12+, do not raise an exception unless it would be visible to other code." msgstr ":pep:`PEP 380 <380#use-of-stopiteration-to-return-values>` مشخص می‌کند که هنگام برگرداندن یک مقدار از یک تولیدگر یا هم‌روال، استثنای :exc:`StopIteration` پرتاب می‌شود. با این حال، این روش بسیار ناکارآمدی برای برگرداندن یک مقدار است، بنابراین برخی از پیاده‌سازی‌های پایتون، به‌ویژه CPython 3.12+، استثنایی پرتاب نمی‌کنند مگر اینکه برای کد دیگر قابل مشاهده باشد." -msgid "To allow tools to monitor for real exceptions without slowing down generators and coroutines, the :monitoring-event:`STOP_ITERATION` event is provided. :monitoring-event:`STOP_ITERATION` can be locally disabled, unlike :monitoring-event:`RAISE`." -msgstr "برای اینکه ابزارها بتوانند استثناهای واقعی را بدون کُند کردن تولیدگرها و هم‌روال‌ها پایش کنند، رویداد :monitoring-event:`STOP_ITERATION` فراهم شده است. :monitoring-event:`STOP_ITERATION` را می‌توان به‌صورت محلی غیرفعال کرد، برخلاف :monitoring-event:`RAISE`." +msgid "To allow tools to monitor for real exceptions without slowing down generators and coroutines, the :monitoring-event:`STOP_ITERATION` event is provided. :monitoring-event:`STOP_ITERATION` can be locally disabled." +msgstr "برای اینکه به ابزارها اجازه داده شود استثناهای واقعی را بدون کند کردن تولیدگرها و هم‌روال‌ها مانیتور کنند، رویداد :monitoring-event:`STOP_ITERATION` فراهم شده است. رویداد :monitoring-event:`STOP_ITERATION` را می‌توان به صورت محلی غیرفعال کرد." msgid "Note that the :monitoring-event:`STOP_ITERATION` event and the :monitoring-event:`RAISE` event for a :exc:`StopIteration` exception are equivalent, and are treated as interchangeable when generating events. Implementations will favor :monitoring-event:`STOP_ITERATION` for performance reasons, but may generate a :monitoring-event:`RAISE` event with a :exc:`StopIteration`." msgstr "توجه داشته باشید که رویداد :monitoring-event:`STOP_ITERATION` و رویداد :monitoring-event:`RAISE` برای استثنای :exc:`StopIteration` معادل هستند و هنگام تولید رویدادها، به‌عنوان قابل تعویض در نظر گرفته می‌شوند. پیاده‌سازی‌ها به دلایل کارایی، :monitoring-event:`STOP_ITERATION` را ترجیح می‌دهند، اما ممکن است یک رویداد :monitoring-event:`RAISE` همراه با یک :exc:`StopIteration` تولید کنند." @@ -307,12 +314,12 @@ msgstr "مقدار خاصی که می‌توان آن را از یک تابع ک msgid ":ref:`Local events ` can be disabled for a specific code location by returning :data:`sys.monitoring.DISABLE` from a callback function. This does not change which events are set, or any other code locations for the same event." msgstr ":ref:`رویدادهای محلی ` را می‌توان برای یک موقعیت کد مشخص با برگرداندن :data:`sys.monitoring.DISABLE` از یک تابع کال‌بک غیرفعال کرد. این کار، رویدادهای تنظیم‌شده یا سایر موقعیت‌های کد برای همان رویداد را تغییر نمی‌دهد." +msgid ":ref:`Other events ` can be disabled on a per code object basis by returning :data:`sys.monitoring.DISABLE` from a callback function. This disables the event for the entire code object (for the current tool)." +msgstr "سایر :ref:`رویدادها ` را می‌توان با بازگرداندن :data:`sys.monitoring.DISABLE` از یک تابع کال‌بک، به ازای هر شیء کد غیرفعال کرد. این کار رویداد را برای کل شیء کد (برای ابزار فعلی) غیرفعال می‌کند." + msgid "Disabling events for specific locations is very important for high performance monitoring. For example, a program can be run under a debugger with no overhead if the debugger disables all monitoring except for a few breakpoints." msgstr "غیرفعال کردن رویدادها برای محل‌های مشخص، برای پایش با کارایی بالا بسیار مهم است. برای مثال، اگر اشکال‌زدا همه پایش را به جز چند نقطه شکست غیرفعال کند، می‌توان یک برنامه را بدون سربار تحت یک اشکال‌زدا اجرا کرد." -msgid "If :data:`DISABLE` is returned by a callback for a :ref:`global event `, :exc:`ValueError` will be raised by the interpreter in a non-specific location (that is, no traceback will be provided)." -msgstr "اگر :data:`DISABLE` توسط یک کال‌بک برای یک :ref:`رویداد سراسری ` برگردانده شود، :exc:`ValueError` توسط مفسر در مکانی نامشخص پرتاب خواهد شد (یعنی هیچ ردگیری پشته‌ای ارائه نخواهد شد)." - msgid "Enable all the events that were disabled by :data:`sys.monitoring.DISABLE` for all tools." msgstr "تمام رویدادهایی را که توسط :data:`sys.monitoring.DISABLE` غیرفعال‌شده بودند، برای همه ابزارها فعال کنید." @@ -393,3 +400,6 @@ msgstr "توجه داشته باشید که *destination_offset* محل اجرا msgid ":monitoring-event:`INSTRUCTION`::" msgstr ":monitoring-event:`INSTRUCTION`::" + +#~ msgid "If :data:`DISABLE` is returned by a callback for a :ref:`global event `, :exc:`ValueError` will be raised by the interpreter in a non-specific location (that is, no traceback will be provided)." +#~ msgstr "اگر :data:`DISABLE` توسط یک کال‌بک برای یک :ref:`رویداد سراسری ` برگردانده شود، :exc:`ValueError` توسط مفسر در مکانی نامشخص پرتاب خواهد شد (یعنی هیچ ردگیری پشته‌ای ارائه نخواهد شد)." diff --git a/library/sys.po b/library/sys.po index befcdac5..14628b88 100644 --- a/library/sys.po +++ b/library/sys.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-12 18:39+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -30,6 +31,24 @@ msgstr ":mod:`!sys` --- پارامترها و توابع مختص سیستم" msgid "This module provides access to some variables used or maintained by the interpreter and to functions that interact strongly with the interpreter. It is always available. Unless explicitly noted otherwise, all variables are read-only." msgstr "این ماژول دسترسی به برخی متغیرهایی که توسط مفسر استفاده یا نگهداری می‌شوند و به توابعی که تعامل قوی با مفسر دارند را فراهم می‌کند. این ماژول همیشه در دسترس است. مگر آن‌که به‌صراحت خلاف آن ذکر شده باشد، همه متغیرها فقط‌خواندنی هستند." +msgid "An object containing information about the ABI of the currently running Python interpreter. It should include information that affect the CPython ABI in ways that require a specific build of the interpreter chosen from variants that can co-exist on a single machine. For example, it does not encode the base OS (Linux or Windows), but does include pointer size since some systems support both 32- and 64-bit builds. The available entries are the same on all platforms; e.g. *pointer_size* is available even on 64-bit-only architectures." +msgstr "شیءای حاوی اطلاعات درباره‌ی رابط دودویی کاربردی (ABI) مفسر در حال اجرای پایتون. این شیء باید شامل اطلاعاتی باشد که روی رابط دودویی کاربردی سی‌پایتون (CPython ABI) به انحایی تأثیر می‌گذارند که نیازمند ساخت (build) خاصی از مفسرِ انتخاب‌شده از میان انواعِ توانمندِ همزیست روی یک ماشین واحد است. برای مثال، سیستم‌عامل پایه (لینوکس یا ویندوز) را رمزگذاری نمی‌کند، اما اندازه‌ی اشاره‌گر را شامل می‌شود زیرا برخی سیستم‌ها از هر دو ساخت ۳۲ بیتی و ۶۴ بیتی پشتیبانی می‌کنند. مدخل‌های موجود در تمام سکوها یکسان هستند؛ برای مثال *pointer_size* حتی روی معماری‌های فقط ۶۴ بیتی نیز در دسترس است." + +msgid "The following attributes are available:" +msgstr "ویژگی‌های زیر در دسترس هستند:" + +msgid "The width of pointers in bits, as an integer, equivalent to ``8 * sizeof(void *)``. Usually, this is ``32`` or ``64``." +msgstr "عرض اشاره‌گرها بر حسب بیت، به شکل یک عدد صحیح، معادل ``8 * sizeof(void *)``. معمولاً این مقدار ``32`` یا ``64`` است." + +msgid "A Boolean indicating whether the interpreter was built with :term:`free threading` support. This reflects either the presence of the :option:`--disable-gil` :file:`configure` option (on Unix) or setting the ``DisableGil`` property (on Windows)." +msgstr "یک مقدار بولی که نشان می‌دهد آیا مفسر با پشتیبانی از :term:`نخ‌بندی آزاد ` ساخته شده است یا خیر. این مورد بازتاب‌دهنده‌ی حضور گزینه‌ی :file:`configure` به شکل :option:`--disable-gil` (در یونیکس) یا تنظیم ویژگی ``DisableGil`` (در ویندوز) است." + +msgid "A Boolean indicating whether the interpreter was built in :ref:`debug mode `. This reflects either the presence of the :option:`--with-pydebug` :file:`configure` option (on Unix) or the ``Debug`` configuration (on Windows)." +msgstr "یک مقدار بولی که نشان می‌دهد آیا مفسر در :ref:`حالت رفع اشکال ` ساخته شده است یا خیر. این مورد بازتاب‌دهنده‌ی حضور گزینه‌ی :file:`configure` به شکل :option:`--with-pydebug` (در یونیکس) یا پیکربندی ``Debug`` (در ویندوز) است." + +msgid "A string indicating the native byte order, either ``'big'`` or ``'little'``. This is the same as the :data:`byteorder` attribute." +msgstr "رشته‌ای که ترتیب بایت بومی (native byte order)، یعنی ``'big'`` یا ``'little'`` را مشخص می‌کند. این ویژگی همانند ویژگی :data:`byteorder` است." + msgid "On POSIX systems where Python was built with the standard ``configure`` script, this contains the ABI flags as specified by :pep:`3149`." msgstr "در سیستم‌های POSIX که پایتون با اسکریپت استاندارد ``configure`` ساخته شده است، این شامل پرچم‌های ABI می‌شود، همان‌طور که در :pep:`3149` مشخص شده است." @@ -310,8 +329,8 @@ msgstr "یک استثنای :exc:`SystemExit` را پرتاب می‌کند، ک msgid "The optional argument *arg* can be an integer giving the exit status (defaulting to zero), or another type of object. If it is an integer, zero is considered \"successful termination\" and any nonzero value is considered \"abnormal termination\" by shells and the like. Most systems require it to be in the range 0--127, and produce undefined results otherwise. Some systems have a convention for assigning specific meanings to specific exit codes, but these are generally underdeveloped; Unix programs generally use 2 for command line syntax errors and 1 for all other kinds of errors. If another type of object is passed, ``None`` is equivalent to passing zero, and any other object is printed to :data:`stderr` and results in an exit code of 1. In particular, ``sys.exit(\"some error message\")`` is a quick way to exit a program when an error occurs." msgstr "آرگومان اختیاری *arg* می‌تواند یک عدد صحیح باشد که وضعیت خروج را مشخص می‌کند (پیش‌فرض آن صفر است)، یا شیءای از نوع دیگر. اگر عدد صحیح باشد، صفر از سوی پوسته‌ها و امثال آن «خاتمه‌ی موفق» و هر مقدار ناصفر «خاتمه‌ی غیرعادی» تلقی می‌شود. در بیشتر سیستم‌ها، این مقدار باید در محدوده‌ی ۰ تا ۱۲۷ باشد؛ در غیر این صورت نتایج تعریف‌نشده‌ای تولید می‌شود. برخی سیستم‌ها برای اختصاص معانی خاص به کدهای خروج خاص قراردادی دارند، اما این قراردادها عموماً چندان توسعه‌یافته نیستند؛ برنامه‌های یونیکس معمولاً از ۲ برای خطاهای سینتکس خط فرمان و از ۱ برای تمام انواع دیگر خطاها استفاده می‌کنند. اگر شیءای از نوع دیگر ارسال شود، ``None`` معادل ارسال صفر است و هر شیء دیگری در :data:`stderr` چاپ می‌شود و به کد خروج ۱ منجر می‌شود. به‌ویژه، ``sys.exit(\"some error message\")`` راهی سریع برای خروج از برنامه هنگام وقوع خطا است." -msgid "Since :func:`exit` ultimately \"only\" raises an exception, it will only exit the process when called from the main thread, and the exception is not intercepted. Cleanup actions specified by finally clauses of :keyword:`try` statements are honored, and it is possible to intercept the exit attempt at an outer level." -msgstr "از آنجا که :func:`exit` در نهایت «فقط» یک استثنا پرتاب می‌کند، تنها زمانی فرایند را خاتمه می‌دهد که از نخ اصلی فراخوانی شود و استثنا رهگیری نشده باشد. اقدامات پاک‌سازی مشخص‌شده توسط بندهای finally در دستورات :keyword:`try` اجرا می‌شوند و می‌توان تلاش برای خروج را در سطحی بیرونی رهگیری کرد." +msgid "Since :func:`exit` ultimately \"only\" raises an exception, it will only exit the process when called from the main thread, and the exception is not intercepted. Cleanup actions specified by :keyword:`finally` clauses of :keyword:`try` statements are honored, and it is possible to intercept the exit attempt at an outer level." +msgstr "از آنجا که :func:`exit` در نهایت «فقط» یک استثنا ایجاد می‌کند، فرایند را تنها زمانی متوقف می‌کند که از نخ اصلی فراخوانی شود و استثنا رهگیری نشود. کنش‌های پاکسازی مشخص‌شده توسط بندهای :keyword:`finally` از دستورات :keyword:`try` محترم شمرده می‌شوند و امکان رهگیری تلاش برای خروج در سطح بیرونی‌تر وجود دارد." msgid "If an error occurs in the cleanup after the Python interpreter has caught :exc:`SystemExit` (such as an error flushing buffered data in the standard streams), the exit status is changed to 120." msgstr "اگر در پاک‌سازی، پس از آنکه مفسر پایتون :exc:`SystemExit` را گرفته باشد، خطایی رخ دهد (مانند خطا در تخلیه‌ی داده‌های بافری‌شده در جریان‌های استاندارد)، وضعیت خروج به ۱۲۰ تغییر می‌یابد." @@ -595,6 +614,24 @@ msgstr "دریافت :term:`هندلر خطای سامانه فایل‌بندی msgid "Returns the current value for the :ref:`integer string conversion length limitation `. See also :func:`set_int_max_str_digits`." msgstr "مقدار فعلی :ref:`محدودیت طول تبدیل عدد صحیح به رشته ` را برمی‌گرداند. همچنین :func:`set_int_max_str_digits` را ببینید." +msgid "Returns the current lazy imports mode as a string." +msgstr "حالت فعلی ایمپورت‌های تنبل (lazy imports) را به شکل یک رشته برمی‌گرداند." + +msgid "``\"normal\"``: Only imports explicitly marked with the ``lazy`` keyword are lazy" +msgstr "``\"normal\"``: فقط ایمپورت‌هایی که صراحتاً با کلیدواژه‌ی ``lazy`` مشخص شده‌اند، تنبل هستند" + +msgid "``\"all\"``: All top-level imports are potentially lazy" +msgstr "``\"all\"``: تمام ایمپورت‌های سطح بالا به طور بالقوه تنبل هستند" + +msgid "See also :func:`set_lazy_imports` and :pep:`810`." +msgstr "همچنین نگاه کنید به :func:`set_lazy_imports` و :pep:`810`." + +msgid "Returns the current lazy imports filter function, or ``None`` if no filter is set." +msgstr "تابع فیلتر فعلی ایمپورت‌های تنبل را برمی‌گرداند، یا اگر هیچ فیلتری تنظیم نشده باشد، ``None`` را برمی‌گرداند." + +msgid "The filter function is called for every potentially lazy import to determine whether it should actually be lazy. See :func:`set_lazy_imports_filter` for details on the filter function signature." +msgstr "تابع فیلتر برای هر ایمپورتِ به طور بالقوه تنبلی فراخوانی می‌شود تا مشخص شود که آیا واقعاً باید تنبل باشد یا خیر. برای جزئیات درباره‌ی امضای تابع فیلتر به :func:`set_lazy_imports_filter` مراجعه کنید." + msgid "Return the reference count of the *object*. The count returned is generally one higher than you might expect, because it includes the (temporary) reference as an argument to :func:`getrefcount`." msgstr "تعداد ارجاع به *object* را برمی‌گرداند. تعداد برگردانده‌شده معمولاً یکی بیشتر از مقداری است که ممکن است انتظار داشته باشید، زیرا ارجاع (موقت) به‌عنوان آرگومان به :func:`getrefcount` را شامل می‌شود." @@ -920,6 +957,24 @@ msgstr "اگر رشته‌ی داده‌شده «درونی‌سازی‌شده 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 "این سه متغیر منسوخ شده‌اند؛ به‌جای آن‌ها از :data:`sys.last_exc` استفاده کنید. آن‌ها نمایش قدیمی ``sys.last_exc`` را نگه می‌دارند، همان‌طور که از :func:`exc_info` در بالا برگردانده شده است." +msgid "A :class:`set` of fully qualified module name strings that have been lazily imported in the current interpreter but not yet loaded. When a lazily imported module is accessed for the first time, its name is typically removed from this set." +msgstr "مجموعه‌ای (:class:`set`) از رشته‌های نام ماژول با نام کامل (fully qualified) که در مفسر فعلی به صورت تنبل ایمپورت شده‌اند اما هنوز بارگذاری نشده‌اند. هنگامی که برای اولین بار به یک ماژولِ به صورت تنبل ایمپورت‌شده دسترسی پیدا می‌شود، نام آن معمولاً از این مجموعه حذف می‌شود." + +msgid "The set may contain some additional strings. It is intended for debugging and introspection, and consumers are expected to verify each entry's status." +msgstr "این مجموعه ممکن است حاوی برخی رشته‌های اضافی باشد. این مجموعه برای اشکال‌زدایی و درون‌نگری در نظر گرفته شده است و انتظار می‌رود مصرف‌کنندگان وضعیت هر ورودی را بررسی کنند." + +msgid "Currently, :data:`!lazy_modules` may also contain:" +msgstr "در حال حاضر، :data:`!lazy_modules` همچنین ممکن است شامل موارد زیر باشد:" + +msgid "names of *attributes* (non-modules), such as ``\"pathlib.Path\"`` after running ``lazy from pathlib import Path``, and" +msgstr "نام‌های *ویژگی‌ها* (غیرماژول‌ها)، مانند ``\"pathlib.Path\"`` پس از اجرای ``lazy from pathlib import Path``، و" + +msgid "names of items than have already been accessed." +msgstr "نام آیتم‌هایی که قبلاً به آن‌ها دسترسی پیدا شده است." + +msgid "In future versions of Python, these may be removed, and/or additional extras may be added." +msgstr "در نسخه‌های آینده‌ی پایتون، ممکن است این موارد حذف شوند و/یا موارد اضافی دیگری اضافه شوند." + 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 "یک عدد صحیح که بیشینه مقداری را که یک متغیر از نوع :c:type:`Py_ssize_t` می‌تواند بگیرد، مشخص می‌کند. این مقدار معمولاً در پلتفرم ۳۲ بیتی ``2**31 - 1`` و در پلتفرم ۶۴ بیتی ``2**63 - 1`` است." @@ -1122,6 +1177,55 @@ msgstr "پرچم‌هایی را که مفسر برای فراخوانی‌ها msgid "Set the :ref:`integer string conversion length limitation ` used by this interpreter. See also :func:`get_int_max_str_digits`." msgstr ":ref:`محدودیت طول تبدیل عدد صحیح به رشته ` را که این مفسر از آن استفاده می‌کند، تنظیم کنید. همچنین :func:`get_int_max_str_digits` را ببینید." +msgid "Sets the global lazy imports mode. The *mode* parameter must be one of the following strings:" +msgstr "حالت سراسری ایمپورت‌های تنبل را تنظیم می‌کند. پارامتر *mode* باید یکی از رشته‌های زیر باشد:" + +msgid "``\"all\"``: All top-level imports become potentially lazy" +msgstr "``\"all\"``: تمام ایمپورت‌های سطح بالا به طور بالقوه تنبل می‌شوند" + +msgid "This function is intended for advanced users who need to control lazy imports across their entire application. Library developers should generally not use this function as it affects the runtime execution of applications." +msgstr "این تابع برای کاربران پیشرفته‌ای در نظر گرفته شده است که نیاز دارند ایمپورت‌های تنبل را در سرتاسر برنامه‌ی خود کنترل کنند. توسعه‌دهندگان کتابخانه‌ها به‌طور کلی نباید از این تابع استفاده کنند زیرا روی اجرای ران‌تایم برنامه‌ها تأثیر می‌گذارد." + +msgid "In addition to the mode, lazy imports can be controlled via the filter provided by :func:`set_lazy_imports_filter`." +msgstr "علاوه بر حالت، ایمپورت‌های تنبل را می‌توان از طریق فیلتر ارائه‌شده توسط :func:`set_lazy_imports_filter` کنترل کرد." + +msgid "See also :func:`get_lazy_imports` and :pep:`810`." +msgstr "همچنین نگاه کنید به :func:`get_lazy_imports` و :pep:`810`." + +msgid "Sets the lazy imports filter callback. The *filter* parameter must be a callable or ``None`` to clear the filter." +msgstr "کال‌بک فیلتر ایمپورت‌های تنبل را تنظیم می‌کند. پارامتر *filter* باید یک شیء فراخوانی‌پذیر یا برای پاک کردن فیلتر برابر با ``None`` باشد." + +msgid "The filter function is called for every potentially lazy import to determine whether it should actually be lazy. It should have the following signature::" +msgstr "تابع فیلتر برای هر ایمپورتِ به طور بالقوه تنبلی فراخوانی می‌شود تا مشخص شود که آیا واقعاً باید تنبل باشد یا خیر. این تابع باید امضای زیر را داشته باشد::" + +msgid "" +"def filter(importing_module: str, imported_module: str,\n" +" fromlist: tuple[str, ...] | None) -> bool" +msgstr "" +"def filter(importing_module: str, imported_module: str,\n" +" fromlist: tuple[str, ...] | None) -> bool" + +msgid "The function is called with three positional arguments:" +msgstr "این تابع با سه آرگومان جایگاهی فراخوانی می‌شود:" + +msgid "*importing_module* is the name of the module doing the import" +msgstr "*importing_module* نام ماژولی است که ایمپورت را انجام می‌دهد" + +msgid "*imported_module* is the resolved name of the module being imported (for example, ``lazy from .spam import eggs`` passes ``package.spam``)" +msgstr "*imported_module* نام تفکیک‌شده‌ی ماژولی است که در حال ایمپورت شدن است (برای مثال، دستور ``lazy from .spam import eggs`` مقدار ``package.spam`` را ارسال می‌کند)" + +msgid "*fromlist* is the tuple of names being imported (for ``from ... import`` statements), or ``None`` for regular imports" +msgstr "*fromlist* تاپل نام‌هایی است که در حال ایمپورت شدن هستند (برای دستورات ``from ... import``)، یا برای ایمپورت‌های معمولی مقدار ``None`` است" + +msgid "The filter should return ``True`` to allow the import to be lazy, or ``False`` to force an eager import." +msgstr "این فیلتر باید برای مجاز کردن تنبلی ایمپورت، مقدار ``True`` را برگرداند، یا برای وادار کردن به ایمپورت مشتاقانه، مقدار ``False`` را برگرداند." + +msgid "This is an advanced feature intended for specialized users who need fine-grained control over lazy import behavior." +msgstr "این یک ویژگی پیشرفته است که برای کاربران متخصصی در نظر گرفته شده است که به کنترل دقیق روی رفتار ایمپورت تنبل نیاز دارند." + +msgid "See also :func:`get_lazy_imports_filter` and :pep:`810`." +msgstr "همچنین نگاه کنید به :func:`get_lazy_imports_filter` و :pep:`810`." + 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 information on the Python profiler. The system's profile function is called similarly to the system's trace function (see :func:`settrace`), but it is called with different events, for example it isn't called for each executed line of code (only on call and return, but the return event is reported even when an exception has been set). The function is thread-specific, but there is no way for the profiler to know about context switches between threads, so it does not make sense to use this in the presence of multiple threads. Also, its return value is not used, so it can simply return ``None``. Error in the profile function will cause itself unset." msgstr "تابع پروفایل سیستم را تنظیم کنید، که به شما امکان می‌دهد یک پروفایل‌گیر برای کد منبع پایتون را در پایتون پیاده‌سازی کنید. برای اطلاعات بیشتر درباره پروفایل‌گیر پایتون، فصل :ref:`profile` را ببینید. تابع پروفایل سیستم مشابه تابع ردگیری سیستم فراخوانی می‌شود (به :func:`settrace` مراجعه کنید)، اما با رویدادهای متفاوتی فراخوانی می‌شود؛ برای مثال، به‌ازای هر خط کدی که اجرا می‌شود فراخوانی نمی‌شود (فقط در فراخوانی و بازگشت فراخوانی می‌شود، اما رویداد بازگشت حتی زمانی که استثنایی تنظیم شده باشد گزارش می‌شود). این تابع مختص نخ است، اما راهی برای آگاهی پروفایل‌گیر از تعویض‌های زمینه بین نخ‌ها وجود ندارد، بنابراین استفاده از آن در حضور چند نخ معنادار نیست. همچنین، از مقدار بازگشتی آن استفاده نمی‌شود، بنابراین می‌تواند به‌سادگی ``None`` را برگرداند. خطا در تابع پروفایل باعث می‌شود که این تابع برداشته شود." @@ -1407,11 +1511,14 @@ msgstr "``\"solaris\"``: نخ‌های Solaris" msgid "The name of the lock implementation:" msgstr "نام پیاده‌سازی قفل:" -msgid "``\"semaphore\"``: a lock uses a semaphore" -msgstr "``\"semaphore\"``: یک قفل از یک سمافور استفاده می‌کند" +msgid "``\"semaphore\"``: a lock uses a semaphore (Python 3.14 and older)" +msgstr "``\"semaphore\"``: یک قفل از یک سمافور استفاده می‌کند (پایتون ۳.۱۴ و قدیمی‌تر)" -msgid "``\"mutex+cond\"``: a lock uses a mutex and a condition variable" -msgstr "``\"mutex+cond\"``: یک قفل از یک قفل متقابل (mutex) و یک متغیر شرط (condition variable) استفاده می‌کند" +msgid "``\"mutex+cond\"``: a lock uses a mutex and a condition variable (Python 3.14 and older)" +msgstr "``\"mutex+cond\"``: یک قفل از یک قفل متقابل و یک متغیر شرط استفاده می‌کند (پایتون ۳.۱۴ و قدیمی‌تر)" + +msgid "``\"pymutex\"``: a lock uses the :c:type:`PyMutex` implementation (Python 3.15 and newer)" +msgstr "``\"pymutex\"``: یک قفل از پیاده‌سازی :c:type:`PyMutex` استفاده می‌کند (پایتون ۳.۱۵ و جدیدتر)" msgid "``None`` if this information is unknown" msgstr "``None`` اگر این اطلاعات شناخته‌نشده باشد" @@ -1446,12 +1553,15 @@ msgstr ":attr:`!err_msg`: پیام خطا، می‌تواند ``None`` باشد. msgid ":attr:`!object`: Object causing the exception, can be ``None``." msgstr ":attr:`!object`: شیء ایجادکننده‌ی استثنا، می‌تواند ``None`` باشد." -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 "قلاب پیش‌فرض، :attr:`!err_msg` و :attr:`!object` را به‌صورت ``f'{err_msg}: {object!r}'`` قالب‌بندی می‌کند؛ اگر :attr:`!err_msg` برابر ``None`` باشد، از پیام خطای \"Exception ignored in\" استفاده می‌کند." +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``. Similar to the :mod:`traceback` module, this adds color to exceptions by default. This can be disabled using :ref:`environment variables `." +msgstr "قلاب پیش‌فرض، مقادیر :attr:`!err_msg` و :attr:`!object` را به صورت ``f'{err_msg}: {object!r}'`` قالب‌بندی می‌کند؛ اگر مقدار :attr:`!err_msg` برابر با ``None`` باشد، از پیام خطای \"Exception ignored in\" استفاده کنید. مشابه ماژول :mod:`traceback`، این ویژگی به‌طور پیش‌فرض به استثناها رنگ اضافه می‌کند. این قابلیت را می‌توان با استفاده از :ref:`متغیرهای محیطی ` غیرفعال کرد." msgid ":func:`sys.unraisablehook` can be overridden to control how unraisable exceptions are handled." msgstr "می‌توان :func:`sys.unraisablehook` را بازنویسی کرد تا چگونگی مدیریت استثناهای غیرقابل‌پرتاب کنترل شود." +msgid "Exceptions are now printed with colorful text." +msgstr "استثناها اکنون با متن رنگی چاپ می‌شوند." + msgid ":func:`excepthook` which handles uncaught exceptions." msgstr ":func:`excepthook` که استثناهای گرفته‌نشده را مدیریت می‌کند." diff --git a/library/sys_path_init.po b/library/sys_path_init.po index 94bd5377..8f919d79 100644 --- a/library/sys_path_init.po +++ b/library/sys_path_init.po @@ -6,12 +6,13 @@ # Translators: # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 15:53+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -52,11 +53,11 @@ msgstr "پس از یافت شدن، ``prefix`` و ``exec_prefix`` به‌ترت msgid "If :envvar:`PYTHONHOME` is not set, and a ``pyvenv.cfg`` file is found alongside the main executable, or in its parent directory, :data:`sys.prefix` and :data:`sys.exec_prefix` get set to the directory containing ``pyvenv.cfg``, otherwise they are set to the same value as :data:`sys.base_prefix` and :data:`sys.base_exec_prefix`, respectively. This is used by :ref:`sys-path-init-virtual-environments`." msgstr "اگر :envvar:`PYTHONHOME` تنظیم‌نشده باشد و یک پرونده ``pyvenv.cfg`` در کنار پرونده اجرایی اصلی یا در پوشه‌ی والد آن پیدا شود، :data:`sys.prefix` و :data:`sys.exec_prefix` به پوشه‌ی حاوی ``pyvenv.cfg`` تنظیم می‌شوند؛ در غیر این صورت، آن‌ها به‌ترتیب به همان مقدار :data:`sys.base_prefix` و :data:`sys.base_exec_prefix` تنظیم می‌شوند. این توسط :ref:`sys-path-init-virtual-environments` استفاده می‌شود." -msgid "Finally, the :mod:`site` module is processed and :file:`site-packages` directories are added to the module search path. A common way to customize the search path is to create :mod:`sitecustomize` or :mod:`usercustomize` modules as described in the :mod:`site` module documentation." -msgstr "در نهایت، ماژول :mod:`site` پردازش می‌شود و پوشه‌های :file:`site-packages` به مسیر جستجوی ماژول افزوده می‌شوند. یک روش رایج برای سفارشی‌سازی مسیر جستجو، ایجاد ماژول‌های :mod:`sitecustomize` یا :mod:`usercustomize` است، همان‌طور که در مستندات ماژول :mod:`site` توضیح داده شده است." +msgid "Finally, the :mod:`site` module is processed and :file:`site-packages` directories are added to the module search path. The :envvar:`PYTHONUSERBASE` environment variable controls where is searched for user site-packages and the :envvar:`PYTHONNOUSERSITE` environment variable prevents searching for user site-packages all together. A common way to customize the search path is to create :mod:`sitecustomize` or :mod:`usercustomize` modules as described in the :mod:`site` module documentation." +msgstr "در نهایت، ماژول :mod:`site` پردازش می‌شود و پوشه‌های :file:`site-packages` به مسیر جستجوی ماژول اضافه می‌شوند. متغیر محیطی :envvar:`PYTHONUSERBASE` کنترل می‌کند که جستجو برای بسته‌های کاربری (user site-packages) در کجا انجام شود و متغیر محیطی :envvar:`PYTHONNOUSERSITE` به‌طور کلی مانع از جستجو برای بسته‌های کاربری می‌شود. یک روش رایج برای سفارشی‌سازی مسیر جستجو، ایجاد ماژول‌های :mod:`sitecustomize` یا :mod:`usercustomize` است، همان‌طور که در مستندات ماژول :mod:`site` توضیح داده شده است." -msgid "Certain command line options may further affect path calculations. See :option:`-E`, :option:`-I`, :option:`-s` and :option:`-S` for further details." -msgstr "برخی گزینه‌های خط فرمان ممکن است بر محاسبات مسیر تأثیر بیشتری بگذارند. برای جزئیات بیشتر، :option:`-E`، :option:`-I`، :option:`-s` و :option:`-S` را ببینید." +msgid "The command line options :option:`-E`, :option:`-P`, :option:`-I`, :option:`-S` and :option:`-s` further affect path calculations, see their documentation for details." +msgstr "گزینه‌های خط فرمان :option:`-E`، :option:`-P`، :option:`-I`، :option:`-S` و :option:`-s` بیشتر روی محاسبات مسیر تأثیر می‌گذارند؛ برای جزئیات به مستندات آن‌ها مراجعه کنید." msgid ":data:`sys.prefix` and :data:`sys.exec_prefix` are now set to the ``pyvenv.cfg`` directory during the path initialization. This was previously done by :mod:`site`, therefore affected by :option:`-S`." msgstr ":data:`sys.prefix` و :data:`sys.exec_prefix` اکنون در حین مقداردهی اولیه‌ی مسیر به پوشه‌ی حاوی ``pyvenv.cfg`` تنظیم می‌شوند. این کار پیش‌تر توسط :mod:`site` انجام می‌شد، بنابراین تحت تأثیر :option:`-S` قرار می‌گرفت." @@ -76,8 +77,8 @@ msgstr "علاوه بر استفاده به‌عنوان نشانگری برای msgid ":envvar:`PYTHONHOME` overrides the ``pyvenv.cfg`` detection." msgstr ":envvar:`PYTHONHOME` بر شناسایی ``pyvenv.cfg`` مقدم است." -msgid "There are other ways how \"virtual environments\" could be implemented, this documentation refers implementations based on the ``pyvenv.cfg`` mechanism, such as :mod:`venv`. Most virtual environment implementations follow the model set by :mod:`venv`, but there may be exotic implementations that diverge from it." -msgstr "روش‌های دیگری نیز برای پیاده‌سازی «محیط‌های مجازی» وجود دارد؛ این مستندات به پیاده‌سازی‌هایی اشاره می‌کند که بر پایه‌ی سازوکار ``pyvenv.cfg`` هستند، مانند :mod:`venv`. بیشتر پیاده‌سازی‌های محیط مجازی از مدلی پیروی می‌کنند که :mod:`venv` تعیین کرده است، اما ممکن است پیاده‌سازی‌های غیرمتعارفی وجود داشته باشند که از آن منحرف شوند." +msgid "There are other ways \"virtual environments\" could be implemented. This documentation refers to implementations based on the ``pyvenv.cfg`` mechanism, such as :mod:`venv`, that many virtual environment implementations follow." +msgstr "راه‌های دیگری نیز برای پیاده‌سازی «محیط‌های مجازی» وجود دارد. این مستندات به پیاده‌سازی‌های مبتنی بر مکانیسم ``pyvenv.cfg``، مانند :mod:`venv` اشاره دارد که بسیاری از پیاده‌سازی‌های محیط مجازی از آن‌ها پیروی می‌کنند." msgid "_pth files" msgstr "پرونده‌های _pth" diff --git a/library/sysconfig.po b/library/sysconfig.po index b89a802b..d6e7b459 100644 --- a/library/sysconfig.po +++ b/library/sysconfig.po @@ -7,12 +7,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 08:13+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -382,6 +383,15 @@ msgstr "این عمدتاً برای تمایز پوشه‌های ساخت وا msgid "Examples of returned values:" msgstr "نمونه‌هایی از مقادیر برگردانده‌شده:" +msgid "linux-x86_64" +msgstr "linux-x86_64" + +msgid "linux-aarch64" +msgstr "linux-aarch64" + +msgid "solaris-2.6-sun4u" +msgstr "solaris-2.6-sun4u" + msgid "Windows:" msgstr "ویندوز:" @@ -397,9 +407,6 @@ msgstr "win32 (همه‌ی موارد دیگر - به‌طور مشخص، sys.pl msgid "POSIX based OS:" msgstr "سیستم‌عامل مبتنی بر POSIX:" -msgid "linux-x86_64" -msgstr "linux-x86_64" - msgid "macosx-15.5-arm64" msgstr "macosx-15.5-arm64" diff --git a/library/tarfile.po b/library/tarfile.po index 253b8cc7..cb2b3efe 100644 --- a/library/tarfile.po +++ b/library/tarfile.po @@ -9,12 +9,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 15:40+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -187,8 +188,8 @@ msgstr "توجه داشته باشید که ``'a:gz'``، ``'a:bz2'`` یا ``'a:x 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 "اگر *fileobj* مشخص شده باشد، از آن به‌عنوان جایگزینی برای یک :term:`file object` بازشده در حالت دودویی برای *name* استفاده می‌شود. انتظار می‌رود در موقعیت ۰ قرار داشته باشد." -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 "برای حالت‌های ``'w:gz'``، ``'x:gz'``، ``'w|gz'``، ``'w:bz2'``، ``'x:bz2'``، ``'w|bz2'``، :func:`tarfile.open` آرگومان کلیدواژه‌ای *compresslevel* (پیش‌فرض ``9``) را برای تعیین سطح فشرده‌سازی پرونده می‌پذیرد." +msgid "For modes ``'w:gz'``, ``'x:gz'``, ``'w|gz'``, ``'w:bz2'``, ``'x:bz2'``, ``'w|bz2'``, :func:`tarfile.open` accepts the keyword argument *compresslevel* (default ``6``) to specify the compression level of the file." +msgstr "برای حالت‌های ``'w:gz'``، ``'x:gz'``، ``'w|gz'``، ``'w:bz2'``، ``'x:bz2'``، ``'w|bz2'``، تابع :func:`tarfile.open` آرگومان کلیدواژه‌ای *compresslevel* (پیش‌فرض ``6``) را برای مشخص کردن سطح فشرده‌سازی پرونده می‌پذیرد." 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 "برای حالت‌های ``'w:xz'``، ``'x:xz'`` و ``'w|xz'``، تابع :func:`tarfile.open` آرگومان کلیدواژه‌ای *preset* را برای مشخص کردن سطح فشرده‌سازی پرونده می‌پذیرد." @@ -196,6 +197,9 @@ msgstr "برای حالت‌های ``'w:xz'``، ``'x:xz'`` و ``'w|xz'``، تا 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 "برای حالت‌های ``'w:zst'``، ``'x:zst'`` و ``'w|zst'``، :func:`tarfile.open` آرگومان کلیدواژه‌ای *level* را برای تعیین سطح فشرده‌سازی پرونده می‌پذیرد. آرگومان کلیدواژه‌ای *options* نیز می‌تواند ارسال شود تا پارامترهای پیشرفته فشرده‌سازی Zstandard را که در :class:`~compression.zstd.CompressionParameter` توصیف شده‌اند، فراهم کند. آرگومان کلیدواژه‌ای *zstd_dict* می‌تواند ارسال شود تا یک :class:`~compression.zstd.ZstdDict`، یک دیکشنری Zstandard که برای بهبود فشرده‌سازی مقادیر کمتری از داده استفاده می‌شود، فراهم کند." +msgid "For modes ``'w:gz'`` and ``'w|gz'``, :func:`tarfile.open` accepts the keyword argument *mtime* to create a gzip archive header with that mtime. By default, the mtime is set to the time of creation of the archive. Use *mtime* ``0`` to generate a compressed stream that does not depend on creation time, for reproducible output." +msgstr "برای حالت‌های ``'w:gz'`` و ``'w|gz'``، تابع :func:`tarfile.open` آرگومان کلیدواژه‌ای *mtime* را می‌پذیرد تا یک سرآیند آرشیو gzip با آن زمان ایجاد کند. به طور پیش‌فرض، مقدار mtime روی زمان ایجاد آرشیو تنظیم می‌شود. از *mtime* ``0`` استفاده کنید تا یک جریان فشرده‌شده تولید کنید که به زمان ایجاد وابسته نباشد، که این امر برای خروجی‌های قابل‌تولید مجدد مفید است." + msgid "For special purposes, there is a second format for *mode*: ``'filemode|[compression]'``. :func:`tarfile.open` will return a :class:`TarFile` object that processes its data as a stream of blocks. No random seeking will be done on the file. If given, *fileobj* may be any object that has a :meth:`~io.RawIOBase.read` or :meth:`~io.RawIOBase.write` method (depending on the *mode*) that works with bytes. *bufsize* specifies the blocksize and defaults to ``20 * 512`` bytes. Use this variant in combination with e.g. ``sys.stdin.buffer``, a socket :term:`file object` or a tape device. However, such a :class:`TarFile` object is limited in that it does not allow random access, see :ref:`tar-examples`. The currently possible modes:" msgstr "برای اهداف خاص، قالب دومی برای *mode* وجود دارد: ``'filemode|[compression]'``. :func:`tarfile.open` یک شیء :class:`TarFile` برمی‌گرداند که داده‌های خود را به‌صورت جریانی از بلوک‌ها پردازش می‌کند. هیچ مکان‌یابی تصادفی‌ای روی پرونده انجام نخواهد شد. در صورت ارائه، *fileobj* می‌تواند هر شیءای باشد که یک متد :meth:`~io.RawIOBase.read` یا :meth:`~io.RawIOBase.write` (بسته به *mode*) داشته باشد که با بایت‌ها کار می‌کند. *bufsize* اندازه‌ی بلوک را مشخص می‌کند و مقدار پیش‌فرض آن ``20 * 512`` بایت است. از این حالت در ترکیب با مواردی مانند ``sys.stdin.buffer``، یک :term:`file object` برای سوکت یا یک دستگاه نوار استفاده کنید. با این حال، چنین شیء :class:`TarFile` محدود است، زیرا دسترسی تصادفی را اجازه نمی‌دهد؛ :ref:`tar-examples` را ببینید. حالت‌های ممکن کنونی:" @@ -283,6 +287,9 @@ msgstr "آرگومان کلیدواژه‌ای *compresslevel* برای جریا msgid "The *preset* keyword argument also works for streams." msgstr "آرگومان کلیدواژه‌ای *preset* برای جریان‌ها نیز کار می‌کند." +msgid "The default compression level was reduced to 6 (down from 9). It is the default level used by most compression tools and a better tradeoff between speed and performance." +msgstr "سطح پیش‌فرض فشرده‌سازی به ۶ کاهش یافت (از ۹). این سطح پیش‌فرضی است که توسط بیشتر ابزارهای فشرده‌سازی استفاده می‌شود و تعادل بهتری بین سرعت و کارایی برقرار می‌کند." + msgid "Class for reading and writing tar archives. Do not use this class directly: use :func:`tarfile.open` instead. See :ref:`tarfile-objects`." msgstr "کلاسی برای خواندن و نوشتن بایگانی‌های tar. از این کلاس به‌طور مستقیم استفاده نکنید: در عوض از :func:`tarfile.open` استفاده کنید. :ref:`tarfile-objects` را ببینید." diff --git a/library/tempfile.po b/library/tempfile.po index d9a86c70..3a7f5083 100644 --- a/library/tempfile.po +++ b/library/tempfile.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-08 09:24+0330\n" "PO-Revision-Date: 2026-09-14 15:36+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -141,6 +141,12 @@ msgstr "پوشه را می‌توان با فراخوانی متد :meth:`!clean msgid "The *delete* parameter can be used to disable cleanup of the directory tree upon exiting the context. While it may seem unusual for a context manager to disable the action taken when exiting the context, it can be useful during debugging or when you need your cleanup behavior to be conditional based on other logic." msgstr "می‌توان از پارامتر *delete* برای غیرفعال کردن پاک‌سازی درخت پوشه‌ها هنگام خروج از زمینه استفاده کرد. اگرچه ممکن است غیرعادی به نظر برسد که یک مدیر زمینه عملیات انجام‌شده هنگام خروج از زمینه را غیرفعال کند، اما این کار می‌تواند در حین اشکال‌زدایی یا زمانی که نیاز دارید رفتار پاک‌سازی شما بر اساس منطق دیگری مشروط باشد، مفید باشد." +msgid "Cleanup is not robust against the tree being modified while it is removed. Files outside of the tree may have their permissions and file flags reset." +msgstr "" + +msgid "On systems where :data:`shutil.rmtree.avoids_symlink_attacks` is false, manipulating symbolic links during cleanup may cause files outside of the tree to be removed." +msgstr "" + msgid "Raises an :ref:`auditing event ` ``tempfile.mkdtemp`` with argument ``fullpath``." msgstr "یک :ref:`رویداد حسابرسی ` ``tempfile.mkdtemp`` را با آرگومان ``fullpath`` پرتاب می‌کند." diff --git a/library/test.po b/library/test.po index cdf8bf98..ff710579 100644 --- a/library/test.po +++ b/library/test.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 13:15+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -755,12 +756,6 @@ msgstr "هنگامی که یک **کلاس** آراسته می‌شود، کل ک msgid "The subprocess inherits the enabled resources (``-u``), memory limit (``-M``) and verbosity (``-v``) of the parent test run, so that :func:`~test.support.requires_resource`, :func:`~test.support.requires`, :func:`~test.support.bigmemtest` and the like behave consistently in both processes." msgstr "زیرفرایند، منابع فعال‌شده (``-u``)، محدودیت حافظه (``-M``) و سطح جزئیات (``-v``) را از اجرای آزمون والد به ارث می‌برد، به‌گونه‌ای که :func:`~test.support.requires_resource`، :func:`~test.support.requires`، :func:`~test.support.bigmemtest` و موارد مشابه در هر دو فرایند رفتار یکسانی داشته باشند." -msgid "*options* is a sequence of interpreter command line options to run the subprocess with, and *env* is a mapping of environment variables to set in it, on top of the inherited environment. A value of ``None`` in *env* unsets the variable. Note that :option:`-E` and :option:`-I` make the subprocess ignore the ``PYTHON*`` environment variables, including :envvar:`PYTHONPATH`." -msgstr "*options* دنباله‌ای از گزینه‌های خط فرمان مفسر برای اجرای زیرفرایند است، و *env* نگاشتی از متغیرهای محیطی برای تنظیم در آن، بر روی محیط ارث‌برده است. مقدار ``None`` در *env* متغیر را حذف می‌کند. توجه داشته باشید که :option:`-E` و :option:`-I` باعث می‌شوند زیرفرایند متغیرهای محیطی ``PYTHON*`` را نادیده بگیرد، از جمله :envvar:`PYTHONPATH`." - -msgid "*timeout* is the number of seconds to wait for the subprocess; the test is reported as an error if it does not complete in time. By default there is no timeout, and a hung test is left to the timeout of the test runner." -msgstr "*timeout* تعداد ثانیه‌های انتظار برای زیرفرایند است؛ اگر در وقت تمام نشود، آزمون به عنوان خطا گزارش می‌شود. به طور پیش‌فرض مهلت زمانی وجود ندارد، و یک آزمون معلق به مهلت زمانیِ اجرای آزمون واگذار می‌شود." - msgid "The test is skipped on platforms without subprocess support." msgstr "این آزمون در سکوهای بدون پشتیبانی از subprocess نادیده گرفته می‌شود." @@ -1154,6 +1149,26 @@ msgstr "یک مدیر زمینه که به‌طور موقت umask فرایند msgid "Call :func:`os.unlink` on *filename*. As with :func:`rmdir`, on Windows platforms, this is wrapped with a wait loop that checks for the existence of the file." msgstr ":func:`os.unlink` را روی *filename* فراخوانی کنید. مانند :func:`rmdir`، در پلتفرم‌های ویندوزی، این فراخوانی با یک حلقه انتظار که وجود پرونده را بررسی می‌کند، دربرگرفته شده است." +msgid "A decorator for running tests with the :envvar:`SOURCE_DATE_EPOCH` environment variable set to *epoch*." +msgstr "یک آراینده برای اجرای آزمون‌ها با متغیر محیطی :envvar:`SOURCE_DATE_EPOCH` که روی *epoch* تنظیم شده است." + +msgid "A decorator for running tests with the :envvar:`SOURCE_DATE_EPOCH` environment variable unset." +msgstr "یک آراینده برای اجرای آزمون‌ها در حالی که متغیر محیطی :envvar:`SOURCE_DATE_EPOCH` تنظیم نشده است." + +msgid "Metaclass wrapping all test methods of the class with :func:`with_source_date_epoch` if the *source_date_epoch* keyword class argument is true, or with :func:`without_source_date_epoch` otherwise. For example::" +msgstr "فراکلاسی که تمام متدهای آزمون کلاس را با :func:`with_source_date_epoch` احاطه می‌کند، اگر آرگومان کلیدواژه‌ای کلاس *source_date_epoch* برابر با True باشد، و در غیر این صورت با :func:`without_source_date_epoch`. برای مثال::" + +msgid "" +"class TestsWithSourceEpoch(Tests,\n" +" metaclass=SourceDateEpochTestMeta,\n" +" source_date_epoch=True):\n" +" pass" +msgstr "" +"class TestsWithSourceEpoch(Tests,\n" +" metaclass=SourceDateEpochTestMeta,\n" +" source_date_epoch=True):\n" +" pass" + msgid ":mod:`!test.support.import_helper` --- Utilities for import tests" msgstr ":mod:`!test.support.import_helper` --- ابزارهای کمکی برای آزمون‌های ایمپورت" @@ -1328,5 +1343,11 @@ msgstr "آرگومان‌های اختیاری جدید *filters* و *quiet*." msgid "Class used to record warnings for unit tests. See documentation of :func:`check_warnings` above for more details." msgstr "کلاسی که برای ثبت هشدارها در آزمون واحد‌ها استفاده می‌شود. برای جزئیات بیشتر، مستندات :func:`check_warnings` در بالا را ببینید." +#~ msgid "*options* is a sequence of interpreter command line options to run the subprocess with, and *env* is a mapping of environment variables to set in it, on top of the inherited environment. A value of ``None`` in *env* unsets the variable. Note that :option:`-E` and :option:`-I` make the subprocess ignore the ``PYTHON*`` environment variables, including :envvar:`PYTHONPATH`." +#~ msgstr "*options* دنباله‌ای از گزینه‌های خط فرمان مفسر برای اجرای زیرفرایند است، و *env* نگاشتی از متغیرهای محیطی برای تنظیم در آن، بر روی محیط ارث‌برده است. مقدار ``None`` در *env* متغیر را حذف می‌کند. توجه داشته باشید که :option:`-E` و :option:`-I` باعث می‌شوند زیرفرایند متغیرهای محیطی ``PYTHON*`` را نادیده بگیرد، از جمله :envvar:`PYTHONPATH`." + +#~ msgid "*timeout* is the number of seconds to wait for the subprocess; the test is reported as an error if it does not complete in time. By default there is no timeout, and a hung test is left to the timeout of the test runner." +#~ msgstr "*timeout* تعداد ثانیه‌های انتظار برای زیرفرایند است؛ اگر در وقت تمام نشود، آزمون به عنوان خطا گزارش می‌شود. به طور پیش‌فرض مهلت زمانی وجود ندارد، و یک آزمون معلق به مهلت زمانیِ اجرای آزمون واگذار می‌شود." + #~ msgid "Its default value is 5 seconds." #~ msgstr "مقدار پیش‌فرض آن ۵ ثانیه است." diff --git a/library/threading.po b/library/threading.po index 0cfd01a2..11baef04 100644 --- a/library/threading.po +++ b/library/threading.po @@ -7,13 +7,14 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" -"PO-Revision-Date: 2026-09-13 16:31+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 19:52+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" @@ -199,6 +200,9 @@ msgstr "شناسه‌ی نخ (Thread ID) بومی به‌صورت عدد صحی msgid "Added support for GNU/kFreeBSD." msgstr "پشتیبانی از GNU/kFreeBSD افزوده شد." +msgid "Added support for Solaris." +msgstr "پشتیبانی از سولاریس اضافه شد." + msgid "Return a list of all :class:`Thread` objects currently active. The list includes daemonic threads and dummy thread objects created by :func:`current_thread`. It excludes terminated threads and threads that have not yet been started. However, the main thread is always part of the result, even when terminated." msgstr "فهرستی از تمام اشیاء :class:`Thread` که در حال حاضر فعال هستند را برمی‌گرداند. این فهرست شامل نخ‌های daemon و اشیاء نخ ساختگی ایجادشده توسط :func:`current_thread` است. این فهرست، نخ‌های خاتمه‌یافته و نخ‌هایی را که هنوز آغاز نشده‌اند مستثنی می‌کند. با این حال، نخ اصلی همیشه بخشی از نتیجه است، حتی زمانی که خاتمه یافته باشد." @@ -584,8 +588,8 @@ msgstr "" msgid "Wait until the thread terminates. This blocks the calling thread until the thread whose :meth:`~Thread.join` method is called terminates -- either normally or through an unhandled exception -- or until the optional timeout occurs." msgstr "صبر کنید تا نخ پایان یابد. این عمل نخ فراخوان را مسدود می‌کند تا زمانی که نخی که متد :meth:`~Thread.join` آن فراخوانی شده است پایان یابد -- چه به‌صورت عادی و چه از طریق استثنای مدیریت‌نشده -- یا تا زمانی که مهلت زمانی اختیاری رخ دهد." -msgid "When the *timeout* argument is present and not ``None``, it should be a floating-point number specifying a timeout for the operation in seconds (or fractions thereof). As :meth:`~Thread.join` always returns ``None``, you must call :meth:`~Thread.is_alive` after :meth:`~Thread.join` to decide whether a timeout happened -- if the thread is still alive, the :meth:`~Thread.join` call timed out." -msgstr "هنگامی که آرگومان *timeout* وجود داشته باشد و ``None`` نباشد، باید یک عدد ممیز شناور باشد که مهلت عملیات را بر حسب ثانیه (یا کسری از ثانیه) مشخص می‌کند. از آن‌جا که :meth:`~Thread.join` همیشه ``None`` را برمی‌گرداند، باید پس از :meth:`~Thread.join`، :meth:`~Thread.is_alive` را فراخوانی کنید تا تعیین کنید که آیا پایان مهلت رخ داده است — اگر نخ هنوز زنده است، فراخوانی :meth:`~Thread.join` با پایان مهلت مواجه شده است." +msgid "When the *timeout* argument is present and not ``None``, it should be a real number specifying a timeout for the operation in seconds (or fractions thereof). As :meth:`~Thread.join` always returns ``None``, you must call :meth:`~Thread.is_alive` after :meth:`~Thread.join` to decide whether a timeout happened -- if the thread is still alive, the :meth:`~Thread.join` call timed out." +msgstr "هنگامی که آرگومان *timeout* موجود باشد و برابر با ``None`` نباشد، باید یک عدد حقیقی باشد که مهلت زمانی عملی را برحسب ثانیه (یا کسری از آن) مشخص می‌کند. از آنجا که :meth:`~Thread.join` همواره ``None`` را برمی‌گرداند، باید پس از :meth:`~Thread.join` متد :meth:`~Thread.is_alive` را فراخوانی کنید تا تصمیم بگیرید آیا مهلت زمانی به پایان رسیده است یا خیر — اگر نخ همچنان زنده باشد، فراخوانی :meth:`~Thread.join` با پایان مهلت زمانی مواجه شده است." msgid "When the *timeout* argument is not present or ``None``, the operation will block until the thread terminates." msgstr "هنگامی که آرگومان *timeout* وجود ندارد یا ``None`` است، عملیات تا زمانی که نخ پایان یابد مسدود می‌شود." @@ -602,6 +606,9 @@ msgstr "اگر برای join کردن یک نخ daemon در حال اجرا در msgid "May raise :exc:`PythonFinalizationError`." msgstr "ممکن است :exc:`PythonFinalizationError` را پرتاب کند." +msgid "Accepts any real number as *timeout*, not only integer or float." +msgstr "هر عدد حقیقی را به عنوان *timeout* می‌پذیرد، و محدود به عدد صحیح یا اعشاری نیست." + msgid "A string used for identification purposes only. It has no semantics. Multiple threads may be given the same name. The initial name is set by the constructor." msgstr "رشته‌ای که فقط برای اهداف شناسایی استفاده می‌شود. این رشته هیچ معنایی ندارد. ممکن است به چندین نخ نام یکسانی داده شود. نام اولیه توسط سازنده تنظیم می‌شود." @@ -671,8 +678,8 @@ msgstr "هنگامی که با آرگومان *blocking* تنظیم‌شده ر msgid "When invoked with the *blocking* argument set to ``False``, do not block. If a call with *blocking* set to ``True`` would block, return ``False`` immediately; otherwise, set the lock to locked and return ``True``." msgstr "هنگامی که با آرگومان *blocking* تنظیم‌شده روی ``False`` فراخوانی شود، مسدود نمی‌کند. اگر فراخوانی با *blocking* تنظیم‌شده روی ``True`` قرار باشد مسدود شود، بلافاصله ``False`` را برمی‌گرداند؛ در غیر این صورت، قفل را در وضعیت قفل‌شده قرار می‌دهد و ``True`` را برمی‌گرداند." -msgid "When invoked with the floating-point *timeout* argument set to a positive value, block for at most the number of seconds specified by *timeout* and as long as the lock cannot be acquired. A *timeout* argument of ``-1`` specifies an unbounded wait. It is forbidden to specify a *timeout* when *blocking* is ``False``." -msgstr "هنگام فراخوانی با آرگومان *timeout* از نوع ممیز شناور که روی مقدار مثبت تنظیم شده باشد، حداکثر به تعداد ثانیه‌های مشخص‌شده توسط *timeout* و تا زمانی که قفل قابل کسب نباشد، مسدود می‌شود. آرگومان *timeout* با مقدار ``-1`` یک انتظار نامحدود را مشخص می‌کند. تعیین *timeout* زمانی که *blocking* برابر ``False`` باشد ممنوع است." +msgid "When invoked with the *timeout* argument set to a positive value, block for at most the number of seconds specified by *timeout* and as long as the lock cannot be acquired. A *timeout* argument of ``-1`` specifies an unbounded wait. It is forbidden to specify a *timeout* when *blocking* is ``False``." +msgstr "هنگامی که با آرگومان *timeout* تنظیم‌شده روی یک مقدار مثبت فراخوانی شود، حداکثر به مدت تعداد ثانیه‌های مشخص‌شده توسط *timeout* و تا زمانی که قفل نتواند به‌دست بیاید، مسدود می‌شود. آرگومان *timeout* برابر با ``-1`` یک انتظار نامحدود را مشخص می‌کند. مشخص کردن *timeout* وقتی که *blocking* برابر با ``False`` است، ممنوع است." msgid "The return value is ``True`` if the lock is acquired successfully, ``False`` if not (for example if the *timeout* expired)." msgstr "مقدار بازگشتی ``True`` است اگر قفل با موفقیت گرفته شود، در غیر این صورت ``False`` است (برای مثال اگر *timeout* منقضی شده باشد)." @@ -737,8 +744,8 @@ msgstr "هنگامی که با آرگومان *blocking* روی ``True`` (پیش msgid "If no thread owns the lock, acquire the lock and return immediately." msgstr "اگر هیچ نخی مالک قفل نباشد، قفل را به دست می‌آورد و بلافاصله بازمی‌گردد." -msgid "If another thread owns the lock, block until we are able to acquire lock, or *timeout*, if set to a positive float value." -msgstr "اگر نخ دیگری مالک قفل باشد، مسدود می‌شود تا زمانی که بتوانیم قفل را کسب کنیم، یا تا *timeout*، اگر روی یک مقدار float مثبت تنظیم شده باشد." +msgid "If another thread owns the lock, block until we are able to acquire lock, or *timeout*, if set to a positive value." +msgstr "اگر نخ دیگری مالک قفل باشد، تا زمانی که بتوانیم قفل را به‌دست آوریم مسدود بمانید، یا اگر *timeout* روی یک مقدار مثبت تنظیم شده باشد، تا فرا رسیدن آن." msgid "If the same thread owns the lock, acquire the lock again, and return immediately. This is the difference between :class:`Lock` and :class:`!RLock`; :class:`Lock` handles this case the same as the previous, blocking until the lock can be acquired." msgstr "اگر همان نخ مالک قفل باشد، قفل را دوباره به دست می‌آورد و بلافاصله بازمی‌گردد. این تفاوت میان :class:`Lock` و :class:`!RLock` است؛ :class:`Lock` این حالت را مانند حالت قبلی مدیریت می‌کند و تا زمانی که قفل بتواند به دست آید، مسدود می‌شود." @@ -849,8 +856,8 @@ msgstr "تا زمانی که اطلاع داده شود یا مهلت زمانی msgid "This method releases the underlying lock, and then blocks until it is awakened by a :meth:`notify` or :meth:`notify_all` call for the same condition variable in another thread, or until the optional timeout occurs. Once awakened or timed out, it re-acquires the lock and returns." msgstr "این متد قفل زیربنایی را آزاد می‌کند و سپس مسدود می‌شود تا با فراخوانی :meth:`notify` یا :meth:`notify_all` برای همان متغیر شرطی در یک نخ دیگر بیدار شود، یا تا زمانی که مهلت اختیاری به پایان برسد. پس از بیدار شدن یا به پایان رسیدن مهلت، قفل را دوباره به دست می‌آورد و بازمی‌گردد." -msgid "When the *timeout* argument is present and not ``None``, it should be a floating-point number specifying a timeout for the operation in seconds (or fractions thereof)." -msgstr "هنگامی که آرگومان *timeout* وجود دارد و ``None`` نیست، باید یک عدد ممیز شناور باشد که مهلت زمانی‌ای را برای عملیات بر حسب ثانیه (یا کسرهایی از آن) مشخص می‌کند." +msgid "When the *timeout* argument is present and not ``None``, it should be a real number specifying a timeout for the operation in seconds (or fractions thereof)." +msgstr "هنگامی که آرگومان *timeout* موجود باشد و برابر با ``None`` نباشد، باید یک عدد حقیقی باشد که مهلت زمانی عملیات را برحسب ثانیه (یا کسری از آن) مشخص می‌کند." msgid "When the underlying lock is an :class:`RLock`, it is not released using its :meth:`release` method, since this may not actually unlock the lock when it was acquired multiple times recursively. Instead, an internal interface of the :class:`RLock` class is used, which really unlocks it even when it has been recursively acquired several times. Another internal interface is then used to restore the recursion level when the lock is reacquired." msgstr "هنگامی که قفل زیربنایی یک :class:`RLock` باشد، با استفاده از متد :meth:`release` آن آزاد نمی‌شود، زیرا اگر قفل چندین بار به‌صورت بازگشتی کسب شده باشد، این کار ممکن است واقعاً قفل را باز نکند. در عوض، از یک رابط داخلی کلاس :class:`RLock` استفاده می‌شود که حتی اگر قفل چندین بار به‌صورت بازگشتی کسب شده باشد، واقعاً آن را باز می‌کند. سپس از یک رابط داخلی دیگر برای بازگرداندن سطح بازگشت، هنگامی که قفل دوباره کسب می‌شود، استفاده می‌شود." @@ -1006,8 +1013,8 @@ msgstr "پرچم داخلی را روی false بازنشانی می‌کند. پ msgid "Block as long as the internal flag is false and the timeout, if given, has not expired. The return value represents the reason that this blocking method returned; ``True`` if returning because the internal flag is set to true, or ``False`` if a timeout is given and the internal flag did not become true within the given wait time." msgstr "تا زمانی که پرچم داخلی نادرست است و مهلت، در صورت تعیین شدن، منقضی نشده باشد، مسدود می‌کند. مقدار بازگشتی، دلیل بازگشت این متد مسدودکننده را نشان می‌دهد؛ ``True`` اگر بازگشت به این دلیل باشد که پرچم داخلی روی درست تنظیم شده است، یا ``False`` اگر مهلتی تعیین شده باشد و پرچم داخلی در مهلت زمانی تعیین‌شده درست نشده باشد." -msgid "When the timeout argument is present and not ``None``, it should be a floating-point number specifying a timeout for the operation in seconds, or fractions thereof." -msgstr "هنگامی که آرگومان timeout وجود دارد و ``None`` نیست، باید یک عدد اعشاری باشد که مهلت زمانی عملیات را بر حسب ثانیه یا کسری از ثانیه مشخص می‌کند." +msgid "When the timeout argument is present and not ``None``, it should be a real number specifying a timeout for the operation in seconds, or fractions thereof." +msgstr "هنگامی که آرگومان *timeout* موجود باشد و برابر با ``None`` نباشد، باید یک عدد حقیقی باشد که مهلت زمانی عملیات را برحسب ثانیه، یا کسری از آن، مشخص می‌کند." msgid "Timer objects" msgstr "اشیای Timer" @@ -1168,6 +1175,184 @@ msgstr "" msgid "Currently, :class:`Lock`, :class:`RLock`, :class:`Condition`, :class:`Semaphore`, and :class:`BoundedSemaphore` objects may be used as :keyword:`with` statement context managers." msgstr "در حال حاضر، می‌توان از اشیای :class:`Lock`، :class:`RLock`، :class:`Condition`، :class:`Semaphore` و :class:`BoundedSemaphore` به‌عنوان مدیران زمینه‌ی دستور :keyword:`with` استفاده کرد." +msgid "Iterator synchronization" +msgstr "همگام‌سازی پیمایش‌گر" + +msgid "By default, Python iterators do not support concurrent access. Most iterators make no guarantees when accessed simultaneously from multiple threads. Generator iterators, for example, raise :exc:`ValueError` if one of their iterator methods is called while the generator is already executing. The tools in this section allow reliable concurrency support to be added to ordinary iterators and iterator-producing callables." +msgstr "به طور پیش‌فرض، پیمایش‌گرهای پایتون از دسترسی هم‌زمان پشتیبانی نمی‌کنند. بیشتر پیمایش‌گرها هنگام دسترسی هم‌زمان از چند نخ هیچ تضمینی ارائه نمی‌دهند. برای مثال، پیمایش‌گرهای تولیدگر اگر یکی از متدهای پیمایش‌گر آن‌ها در حالی که تولیدگر در حال اجراست فراخوانی شود، یک :exc:`ValueError` بالا می‌آورند. ابزارهای این بخش اجازه می‌دهند پشتیبانی قابل‌اعتمادی از هم‌زمانی به پیمایش‌گرهای معمولی و فراخوانی‌پذیرهای تولیدکننده‌ی پیمایش‌گر اضافه شود." + +msgid "The :class:`serialize_iterator` wrapper lets multiple threads share a single iterator and take turns consuming from it. While one thread is running ``__next__()``, the others block until the iterator becomes available. Each value produced by the underlying iterator is delivered to exactly one caller." +msgstr "پوششی کلاس :class:`serialize_iterator` به چندین نخ (thread) اجازه می‌دهد تا یک پیمایش‌گر واحد را به اشتراک بگذارند و به نوبت مقادیر را از آن مصرف کنند. در حالی که یک نخ در حال اجرای ``__next__()`` است، نخ‌های دیگر تا زمانی که پیمایش‌گر در دسترس قرار گیرد، مسدود می‌شوند. هر مقدار تولید شده توسط پیمایش‌گر زیرین دقیقاً به یک فراخواننده تحویل داده می‌شود." + +msgid "The :func:`concurrent_tee` function lets multiple threads each receive the full stream of values from one underlying iterator. It creates independent iterators that all draw from the same source. Values are buffered until consumed by all of the derived iterators." +msgstr "تابع :func:`concurrent_tee` به چندین نخ اجازه می‌دهد که هر کدام جریان کامل مقادیر را از یک پیمایش‌گر زیرین دریافت کنند. این تابع پیمایش‌گرهای مستقلی ایجاد می‌کند که همه از یک منبع تغذیه می‌شوند. مقادیر تا زمانی که توسط همه پیمایش‌گرهای مشتق‌شده مصرف شوند، در بافر نگهداری می‌شوند." + +msgid "Return an iterator wrapper that serializes concurrent calls to :meth:`~iterator.__next__` using a lock." +msgstr "یک پوششی پیمایش‌گر برمی‌گرداند که فراخوانی‌های هم‌زمان به :meth:`~iterator.__next__` را با استفاده از یک قفل (lock) به صورت سری درمی‌آورد." + +msgid "If the wrapped iterator also defines :meth:`~generator.send`, :meth:`~generator.throw`, or :meth:`~generator.close`, those calls are serialized as well." +msgstr "اگر پیمایش‌گر پوشش‌داده‌شده متدهای :meth:`~generator.send`، :meth:`~generator.throw` یا :meth:`~generator.close` را نیز تعریف کند، آن فراخوانی‌ها نیز به صورت سری انجام می‌شوند." + +msgid "This makes it possible to share a single iterator, including a generator iterator, between multiple threads. A lock ensures that calls are handled one at a time. No values are duplicated or skipped by the wrapper itself. Each item from the underlying iterator is given to exactly one caller." +msgstr "این کار اشتراک‌گذاری یک پیمایش‌گر واحد، از جمله یک پیمایش‌گر تولیدگر (generator iterator)، را بین چندین نخ امکان‌پذیر می‌کند. یک قفل تضمین می‌کند که فراخوانی‌ها یکی پس از دیگری مدیریت شوند. هیچ مقداری توسط خود پوششی تکرار یا رد نمی‌شود. هر آیتم از پیمایش‌گر زیرین دقیقاً به یک فراخواننده داده می‌شود." + +msgid "This wrapper does not copy or buffer values. Threads that call :func:`next` while another thread is already advancing the iterator will block until the active call completes." +msgstr "این پوششی مقادیر را کپی یا بافر نمی‌کند. نخ‌هایی که وقتی نخ دیگری در حال پیشروی در پیمایش‌گر است، تابع :func:`next` را فراخوانی می‌کنند، تا زمان اتمام فراخوانی فعال مسدود خواهند شد." + +msgid "Example:" +msgstr "مثال:" + +msgid "" +"import threading\n" +"\n" +"def squares(n):\n" +" for x in range(n):\n" +" yield x * x\n" +"\n" +"def consume(name, iterable):\n" +" for item in iterable:\n" +" print(name, item)\n" +"\n" +"source = threading.serialize_iterator(squares(5))\n" +"\n" +"t1 = threading.Thread(target=consume, args=(\"left\", source))\n" +"t2 = threading.Thread(target=consume, args=(\"right\", source))\n" +"t1.start()\n" +"t2.start()\n" +"t1.join()\n" +"t2.join()" +msgstr "" +"import threading\n" +"\n" +"def squares(n):\n" +" for x in range(n):\n" +" yield x * x\n" +"\n" +"def consume(name, iterable):\n" +" for item in iterable:\n" +" print(name, item)\n" +"\n" +"source = threading.serialize_iterator(squares(5))\n" +"\n" +"t1 = threading.Thread(target=consume, args=(\"left\", source))\n" +"t2 = threading.Thread(target=consume, args=(\"right\", source))\n" +"t1.start()\n" +"t2.start()\n" +"t1.join()\n" +"t2.join()" + +msgid "In this example, each number is printed exactly once, but the work is shared between the two threads." +msgstr "در این مثال، هر عدد دقیقاً یک بار چاپ می‌شود، اما کار بین دو نخ به اشتراک گذاشته می‌شود." + +msgid "Wrap an iterator-producing callable so that each iterator it returns is automatically passed through :class:`serialize_iterator`." +msgstr "یک شیء فراخوانی‌پذیرِ تولیدکننده‌ی پیمایش‌گر را پوشش می‌دهد تا هر پیمایش‌کری که برمی‌گرداند به طور خودکار از طریق :class:`serialize_iterator` پردازش شود." + +msgid "This is especially useful as a :term:`decorator` for generator functions, allowing their generator-iterators to be consumed from multiple threads." +msgstr "این قابلیت به عنوان یک :term:`دکوراتور ` برای توابع تولیدگر بسیار مفید است و به پیمایش‌گرهای تولیدگر آن‌ها اجازه می‌دهد تا از چندین نخ مصرف شوند." + +msgid "" +"import threading\n" +"\n" +"@threading.synchronized_iterator\n" +"def squares(n):\n" +" for x in range(n):\n" +" yield x * x\n" +"\n" +"def consume(name, iterable):\n" +" for item in iterable:\n" +" print(name, item)\n" +"\n" +"source = squares(5)\n" +"\n" +"t1 = threading.Thread(target=consume, args=(\"left\", source))\n" +"t2 = threading.Thread(target=consume, args=(\"right\", source))\n" +"t1.start()\n" +"t2.start()\n" +"t1.join()\n" +"t2.join()" +msgstr "" +"import threading\n" +"\n" +"@threading.synchronized_iterator\n" +"def squares(n):\n" +" for x in range(n):\n" +" yield x * x\n" +"\n" +"def consume(name, iterable):\n" +" for item in iterable:\n" +" print(name, item)\n" +"\n" +"source = squares(5)\n" +"\n" +"t1 = threading.Thread(target=consume, args=(\"left\", source))\n" +"t2 = threading.Thread(target=consume, args=(\"right\", source))\n" +"t1.start()\n" +"t2.start()\n" +"t1.join()\n" +"t2.join()" + +msgid "The returned wrapper preserves the metadata of *func*, such as its name and wrapped function reference." +msgstr "پوششی بازگردانده‌شده فراداده‌ی (metadata) تابع *func*، مانند نام و ارجاع تابع پوشش‌داده‌شده‌ی آن را حفظ می‌کند." + +msgid "Return *n* independent iterators from a single input *iterable*, with guaranteed behavior when the derived iterators are consumed concurrently." +msgstr "تعداد *n* پیمایش‌گر مستقل از یک *iterable* ورودی واحد برمی‌گرداند، با این تضمین که رفتار هنگام مصرف هم‌زمان پیمایش‌گرهای مشتق‌شده حفظ شود." + +msgid "This function is similar to :func:`itertools.tee`, but is intended for cases where the source iterator may feed consumers running in different threads. Each returned iterator yields every value from the underlying iterable, in the same order." +msgstr "این تابع شبیه به :func:`itertools.tee` است، اما برای مواردی در نظر گرفته شده است که ممکن است پیمایش‌گر منبع، مصرف‌کنندگانی را که در نخ‌های مختلفی اجرا می‌شوند تغذیه کند. هر پیمایش‌گر بازگردانده‌شده، هر مقدار را از پیمایش‌پذیر زیرین و به همان ترتیب تولید می‌کند." + +msgid "Internally, values are buffered until every derived iterator has consumed them." +msgstr "از نظر داخلی، مقادیر در بافر نگهداری می‌شوند تا زمانی که هر پیمایش‌گر مشتق‌شده آن‌ها را مصرف کند." + +msgid "The returned iterators share the same underlying synchronization lock. Each individual derived iterator is intended to be consumed by one thread at a time. If a single derived iterator must itself be shared by multiple threads, wrap it with :class:`serialize_iterator`." +msgstr "پیمایش‌گرهای بازگردانده‌شده یک قفل همگام‌سازی زیرین مشترک دارند. هر پیمایش‌گر مشتق‌شده‌ی فردی برای این در نظر گرفته شده است که در هر زمان توسط یک نخ مصرف شود. اگر قرار باشد یک پیمایش‌گر مشتق‌شده‌ی منفرد توسط چندین نخ به اشتراک گذاشته شود، آن را با :class:`serialize_iterator` پوشش دهید." + +msgid "If *n* is ``0``, return an empty tuple. If *n* is negative, raise :exc:`ValueError`." +msgstr "اگر *n* برابر با ``0`` باشد، یک تاپل خالی برمی‌گرداند. اگر *n* منفی باشد، استثنای :exc:`ValueError` را بالا می‌آورد." + +msgid "" +"import threading\n" +"\n" +"def squares(n):\n" +" for x in range(n):\n" +" yield x * x\n" +"\n" +"def consume(name, iterable):\n" +" for item in iterable:\n" +" print(name, item)\n" +"\n" +"source = squares(5)\n" +"left, right = threading.concurrent_tee(source)\n" +"\n" +"t1 = threading.Thread(target=consume, args=(\"left\", left))\n" +"t2 = threading.Thread(target=consume, args=(\"right\", right))\n" +"t1.start()\n" +"t2.start()\n" +"t1.join()\n" +"t2.join()" +msgstr "" +"import threading\n" +"\n" +"def squares(n):\n" +" for x in range(n):\n" +" yield x * x\n" +"\n" +"def consume(name, iterable):\n" +" for item in iterable:\n" +" print(name, item)\n" +"\n" +"source = squares(5)\n" +"left, right = threading.concurrent_tee(source)\n" +"\n" +"t1 = threading.Thread(target=consume, args=(\"left\", left))\n" +"t2 = threading.Thread(target=consume, args=(\"right\", right))\n" +"t1.start()\n" +"t2.start()\n" +"t1.join()\n" +"t2.join()" + +msgid "In this example, both consumer threads see the full sequence of squares from a single generator expression." +msgstr "در این مثال، هر دو نخ مصرف‌کننده، دنباله‌ی کامل مربعات را از یک عبارت تولیدگر واحد مشاهده می‌کنند." + msgid "trace function" msgstr "تابع ردگیری" diff --git a/library/time.po b/library/time.po index d4a0396b..71da4c6e 100644 --- a/library/time.po +++ b/library/time.po @@ -9,13 +9,14 @@ # Ariyan Bolandi, 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" -"PO-Revision-Date: 2026-09-14 15:54+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 20:23+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" @@ -109,11 +110,11 @@ msgstr ":func:`mktime`" msgid "Functions" msgstr "توابع" -msgid "Convert a tuple or :class:`struct_time` representing a time as returned by :func:`gmtime` or :func:`localtime` to a string of the following form: ``'Sun Jun 20 23:21:05 1993'``. The day field is two characters long and is space padded if the day is a single digit, for example: ``'Wed Jun 9 04:26:40 1993'``." -msgstr "یک تاپل یا :class:`struct_time` که زمانی را نشان می‌دهد همان‌طور که توسط :func:`gmtime` یا :func:`localtime` برگردانده شده، به یک رشته با فرمت زیر تبدیل کنید: ``'Sun Jun 20 23:21:05 1993'``. فیلد روز دو نویسه طول دارد و اگر روز یک رقم باشد با فاصله پر می‌شود، برای مثال: ``'Wed Jun 9 04:26:40 1993'``." +msgid "Convert a tuple or :class:`struct_time` representing a time as returned by :func:`gmtime` or :func:`localtime` to a string of the following form: ``'Sun Jun 20 23:21:05 1993'``. The day field is two characters long and is space padded if the day is a single digit, e.g.: ``'Wed Jun 9 04:26:40 1993'``." +msgstr "یک تاپل یا :class:`struct_time` را که زمان بازگردانده‌شده توسط :func:`gmtime` یا :func:`localtime` را نشان می‌دهد، به رشته‌ای با فرم زیر تبدیل کنید: ``'Sun Jun 20 23:21:05 1993'``. فیلد روز دو نویسه طول دارد و اگر روز تک‌رقمی باشد با فاصله پر می‌شود، به عنوان مثال: ``'Wed Jun 9 04:26:40 1993'``." -msgid "If *time_tuple* is not provided, the current time as returned by :func:`localtime` is used. Locale information is not used by :func:`asctime`." -msgstr "اگر *time_tuple* ارائه نشده باشد، زمان فعلی که توسط :func:`localtime` بازگردانده‌می‌شود استفاده‌می‌شود. اطلاعات locale توسط :func:`asctime` استفاده‌نمی‌شود." +msgid "If *t* is not provided, the current time as returned by :func:`localtime` is used. Locale information is not used by :func:`asctime`." +msgstr "اگر *t* ارائه نشده باشد، از زمان فعلی، همان‌طور که توسط :func:`localtime` برگردانده می‌شود، استفاده می‌شود. اطلاعات مربوط به بومی‌سازی توسط :func:`asctime` استفاده نمی‌شود." msgid "Unlike the C function of the same name, :func:`asctime` does not add a trailing newline." msgstr "برخلاف تابع C با همین نام، :func:`asctime` یک نویسه خط جدید پایانی اضافه نمی‌کند." @@ -151,14 +152,20 @@ msgstr "زمان ساعت مشخص‌شده با *clk_id* را تنظیم کنی msgid "Use :func:`clock_settime_ns` to avoid the precision loss caused by the :class:`float` type." msgstr "برای اجتناب از کاهش دقت ناشی از نوع :class:`float`، از :func:`clock_settime_ns` استفاده کنید." +msgid "Accepts any real number as *time*, not only integer or float." +msgstr "هر عدد حقیقی را به عنوان *time* می‌پذیرد، نه فقط عدد صحیح یا عدد اعشاری." + msgid "Similar to :func:`clock_settime` but set time with nanoseconds." msgstr "مشابه :func:`clock_settime` است، اما زمان را با نانوثانیه تنظیم می‌کند." -msgid "Convert a time expressed in seconds since the epoch_ to a string of a form: ``'Sun Jun 20 23:21:05 1993'`` representing local time. The day field is two characters long and is space padded if the day is a single digit, for example: ``'Wed Jun 9 04:26:40 1993'``." -msgstr "زمانِ بیان‌شده بر حسب ثانیه از epoch_ را به یک رشته به شکل ``'Sun Jun 20 23:21:05 1993'`` تبدیل کنید که زمان محلی را نشان‌می‌دهد. فیلد روز دو نویسه طول دارد و در صورت تک‌رقمی بودن روز، با فاصله پر‌می‌شود، مثلاً: ``'Wed Jun 9 04:26:40 1993'``." +msgid "Convert a time expressed in seconds since the epoch_ to a string of a form: ``'Sun Jun 20 23:21:05 1993'`` representing local time. The day field is two characters long and is space padded if the day is a single digit, e.g.: ``'Wed Jun 9 04:26:40 1993'``." +msgstr "زمانی را که برحسب ثانیه از epoch_ گذشته است به رشته‌ای با فرم: ``'Sun Jun 20 23:21:05 1993'`` که زمان محلی را نشان می‌دهد، تبدیل کنید. فیلد روز دو نویسه طول دارد و اگر روز تک‌رقمی باشد با فاصله پر می‌شود، به عنوان مثال: ``'Wed Jun 9 04:26:40 1993'``." + +msgid "If *secs* is not provided or :const:`None`, the current time as returned by :func:`.time` is used. ``ctime(secs)`` is equivalent to ``asctime(localtime(secs))``. Locale information is not used by :func:`ctime`." +msgstr "اگر *secs* ارائه نشده باشد یا :const:`None` باشد، زمان فعلی، همان‌طور که توسط :func:`.time` برگردانده می‌شود، استفاده خواهد شد. ``ctime(secs)`` معادل ``asctime(localtime(secs))`` است. اطلاعات locale توسط :func:`ctime` استفاده نمی‌شود." -msgid "If *seconds* is not provided or :const:`None`, the current time as returned by :func:`.time` is used. ``ctime(seconds)`` is equivalent to ``asctime(localtime(seconds))``. Locale information is not used by :func:`ctime`." -msgstr "اگر *seconds* ارائه نشده باشد یا :const:`None` باشد، زمان فعلی که توسط :func:`.time` بازگردانده‌می‌شود استفاده‌می‌شود. ``ctime(seconds)`` معادل ``asctime(localtime(seconds))`` است. اطلاعات locale توسط :func:`ctime` استفاده‌نمی‌شود." +msgid "Accepts any real number, not only integer or float." +msgstr "هر عدد حقیقی را می‌پذیرد، نه فقط عدد صحیح یا عدد اعشاری." msgid "Get information on the specified clock as a namespace object. Supported clock names and the corresponding functions to read their value are:" msgstr "اطلاعات مربوط به ساعت مشخص‌شده را به‌عنوان یک شیء فضای نام دریافت کنید. نام‌های ساعت پشتیبانی‌شده و توابع متناظر برای خواندن مقدار آن‌ها عبارتند از:" @@ -193,11 +200,11 @@ msgstr "*monotonic*: ``True`` اگر ساعت نتواند به عقب برود msgid "*resolution*: The resolution of the clock in seconds (:class:`float`)" msgstr "*resolution*: دقت ساعت بر حسب ثانیه (:class:`float`)" -msgid "Convert a time expressed in seconds since the epoch_ to a :class:`struct_time` in UTC in which the dst flag is always zero. If *seconds* is not provided or :const:`None`, the current time as returned by :func:`.time` is used. Fractions of a second are ignored. See above for a description of the :class:`struct_time` object. See :func:`calendar.timegm` for the inverse of this function." -msgstr "زمانِ بیان‌شده بر حسب ثانیه از epoch_ را به یک :class:`struct_time` در UTC (زمان هماهنگ جهانی) تبدیل کنید که در آن پرچم dst همیشه صفر است. اگر *seconds* ارائه نشده باشد یا :const:`None` باشد، زمان فعلی که توسط :func:`.time` بازگردانده‌می‌شود استفاده‌می‌شود. کسر ثانیه‌ها نادیده‌گرفته می‌شوند. برای توصیف شیء :class:`struct_time` به بالا مراجعه کنید. برای معکوس این تابع به :func:`calendar.timegm` مراجعه کنید." +msgid "Convert a time expressed in seconds since the epoch_ to a :class:`struct_time` in UTC in which the dst flag is always zero. If *secs* is not provided or :const:`None`, the current time as returned by :func:`.time` is used. Fractions of a second are ignored. See above for a description of the :class:`struct_time` object. See :func:`calendar.timegm` for the inverse of this function." +msgstr "زمانی را که برحسب ثانیه از epoch_ گذشته است، به یک :class:`struct_time` در زمان UTC تبدیل کنید که در آن پرچم dst همواره صفر است. اگر *secs* فراهم نشده باشد یا :const:`None` باشد، زمان فعلی بازگردانده‌شده توسط :func:`.time` استفاده می‌شود. کسرهای ثانیه نادیده گرفته می‌شوند. برای توضیحی درباره شیء :class:`struct_time` به بالا مراجعه کنید. برای معکوس این تابع به :func:`calendar.timegm` مراجعه کنید." -msgid "Like :func:`gmtime` but converts to local time. If *seconds* is not provided or :const:`None`, the current time as returned by :func:`.time` is used. The dst flag is set to ``1`` when DST applies to the given time." -msgstr "مشابه :func:`gmtime` اما به زمان محلی تبدیل‌می‌کند. اگر *seconds* ارائه نشده باشد یا :const:`None` باشد، زمان فعلی که توسط :func:`.time` بازگردانده‌می‌شود استفاده‌می‌شود. پرچم dst روی ``1`` تنظیم‌می‌شود وقتی زمان صرفه‌جویی در نور روز (DST) بر زمان داده‌شده اعمال‌می‌شود." +msgid "Like :func:`gmtime` but converts to local time. If *secs* is not provided or :const:`None`, the current time as returned by :func:`.time` is used. The dst flag is set to ``1`` when DST applies to the given time." +msgstr "مانند :func:`gmtime` است اما به زمان محلی تبدیل می‌کند. اگر *secs* فراهم نشده باشد یا :const:`None` باشد، زمان فعلی بازگردانده‌شده توسط :func:`.time` استفاده می‌شود. هنگامی که زمان صرفه‌جویی در نور روز (DST) برای زمان داده‌شده اعمال می‌شود، پرچم dst روی ``1`` تنظیم می‌شود." msgid ":func:`localtime` may raise :exc:`OverflowError`, if the timestamp is outside the range of values supported by the platform C :c:func:`localtime` or :c:func:`gmtime` functions, and :exc:`OSError` on :c:func:`localtime` or :c:func:`gmtime` failure. It's common for this to be restricted to years between 1970 and 2038." msgstr ":func:`localtime` ممکن است در صورتی که برچسب زمانی خارج از محدوده مقادیر پشتیبانی‌شده توسط توابع C سکو یعنی :c:func:`localtime` یا :c:func:`gmtime` باشد، :exc:`OverflowError` را پرتاب کند، و در صورت شکست :c:func:`localtime` یا :c:func:`gmtime` نیز :exc:`OSError` را پرتاب کند. معمولاً این محدوده به سال‌های بین ۱۹۷۰ تا ۲۰۳۸ محدود است." @@ -265,8 +272,8 @@ msgstr "برای جلوگیری از کاهش دقت ناشی از نوع :class msgid "Similar to :func:`process_time` but return time as nanoseconds." msgstr "مشابه :func:`process_time` اما زمان را به‌صورت نانوثانیه برمی‌گرداند." -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 "اجرای نخ فراخواننده را برای تعداد ثانیه‌های داده‌شده به حالت تعلیق درمی‌آورد. آرگومان می‌تواند یک عدد ممیز شناور باشد تا زمان توقف دقیق‌تری را مشخص کند." +msgid "Suspend execution of the calling thread for the given number of seconds. The argument may be a non-integer to indicate a more precise sleep time." +msgstr "اجرای نخ فراخواننده را برای تعداد ثانیه‌های داده‌شده متوقف کنید. آرگومان ممکن است یک عدد غیرصحیح باشد تا زمان توقف دقیق‌تری را نشان دهد." 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 "اگر sleep بر اثر یک سیگنال دچار وقفه شود و هندلر سیگنال استثنایی پرتاب نکند، sleep با مهلت زمانی بازمحاسبه‌شده دوباره آغاز می‌شود." @@ -277,8 +284,8 @@ msgstr "ممکن است زمان تعلیق، به دلیل زمان‌بندی msgid "Windows implementation" msgstr "پیاده‌سازی ویندوز" -msgid "On Windows, if *seconds* 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 threads ready to run, the function returns immediately, and the thread continues execution. On Windows 10 and newer the implementation uses a `high-resolution timer `_ which provides resolution of 100 nanoseconds. If *seconds* is zero, ``Sleep(0)`` is used." -msgstr "در ویندوز، اگر *seconds* صفر باشد، نخ باقی‌مانده اسلایس زمانی خود را به هر نخ دیگری که برای اجرا آماده است رها‌می‌کند. اگر هیچ نخ دیگری برای اجرا آماده نباشد، تابع بلافاصله بازگشت‌می‌دهد و نخ اجرا را ادامه‌می‌دهد. در ویندوز ۱۰ و جدیدتر، پیاده‌سازی از یک `high-resolution timer `_ استفاده‌می‌کند که وضوح ۱۰۰ نانو ثانیه فراهم‌می‌کند. اگر *seconds* صفر باشد، ``Sleep(0)`` استفاده‌می‌شود." +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 threads ready to run, the function returns immediately, and the thread continues execution. On Windows 10 and newer the implementation uses a `high-resolution timer `_ which provides resolution of 100 nanoseconds. If *secs* is zero, ``Sleep(0)`` is used." +msgstr "در ویندوز، اگر *secs* صفر باشد، نخ باقی‌مانده‌ی برش زمانی خود را به هر نخ دیگری که آماده‌ی اجرا است واگذار می‌کند. اگر هیچ نخ دیگری آماده‌ی اجرا نباشد، تابع بلافاصله برمی‌گردد و نخ به اجرای خود ادامه می‌دهد. در ویندوز ۱۰ و نسخه‌های جدیدتر، پیاده‌سازی از یک `high-resolution timer `_ استفاده می‌کند که وضوح ۱۰۰ نانوثانیه را فراهم می‌کند. اگر *secs* صفر باشد، از ``Sleep(0)`` استفاده می‌شود." msgid "Unix implementation" msgstr "پیاده‌سازی یونیکس" @@ -298,11 +305,11 @@ msgstr "برای شبیه‌سازی یک «عملیات بی‌اثر» (no-op) msgid "To voluntarily relinquish the CPU, specify a real-time :ref:`scheduling policy ` and use :func:`os.sched_yield` instead." msgstr "برای رها کردن داوطلبانه‌ی CPU، یک :ref:`سیاست زمان‌بندی بلادرنگ ` مشخص کنید و در عوض از :func:`os.sched_yield` استفاده کنید." -msgid "Raises an :ref:`auditing event ` ``time.sleep`` with argument ``seconds``." -msgstr "یک :ref:`auditing event ` ``time.sleep`` با آرگومان ``seconds`` صادر‌می‌کند." +msgid "Raises an :ref:`auditing event ` ``time.sleep`` with argument ``secs``." +msgstr "یک رویداد حسابرسی :ref:`auditing event ` با نام ``time.sleep`` و آرگومان ``secs`` را ایجاد می‌کند." -msgid "The function now sleeps at least *seconds* even if the sleep is interrupted by a signal, except if the signal handler raises an exception (see :pep:`475` for the rationale)." -msgstr "اکنون تابع حداقل *seconds* توقف‌می‌کند حتی اگر توقف توسط یک سیگنال متوقف‌شود، مگر اگر هندلر سیگنال یک استثنا پرتاب‌کند (برای استدلال به :pep:`475` مراجعه‌کنید)." +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 "تابع اکنون حداقل به میزان *secs* می‌خوابد، حتی اگر خواب توسط یک سیگنال متوقف شود، مگر اینکه هندلر سیگنال یک استثنا ایجاد کند (برای دلیل آن به :pep:`475` مراجعه کنید)." msgid "On Unix, the ``clock_nanosleep()`` and ``nanosleep()`` functions are now used if available. On Windows, a waitable timer is now used." msgstr "در یونیکس، اکنون در صورت در دسترس بودن، از توابع ``clock_nanosleep()`` و ``nanosleep()`` استفاده می‌شود. در ویندوز، اکنون از یک زمان‌سنج انتظارپذیر (waitable timer) استفاده می‌شود." @@ -310,8 +317,8 @@ msgstr "در یونیکس، اکنون در صورت در دسترس بودن، msgid "Raises an auditing event." msgstr "یک رویداد حسابرسی را پرتاب می‌کند." -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* argument. If *time_tuple* is not provided, the current time as returned by :func:`localtime` is used. *format* must be a string. :exc:`ValueError` is raised if any field in *time_tuple* is outside of the allowed range." -msgstr "یک تاپل یا :class:`struct_time` که زمانی را نشان‌می‌دهد که توسط :func:`gmtime` یا :func:`localtime` بازگردانده‌شده است را به یک رشته همان‌طور که توسط آرگومان *format* مشخص شده است تبدیل‌کنید. اگر *time_tuple* ارائه نشده باشد، زمان فعلی که توسط :func:`localtime` بازگردانده‌می‌شود استفاده‌می‌شود. *format* باید یک رشته باشد. :exc:`ValueError` پرتاب‌می‌شود اگر هر فیلدی در *time_tuple* خارج از محدوده مجاز‌باشد." +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* argument. If *t* is not provided, the current time as returned by :func:`localtime` is used. *format* must be a string. :exc:`ValueError` is raised if any field in *t* is outside of the allowed range." +msgstr "یک تاپل یا :class:`struct_time` را که زمان بازگردانده‌شده توسط :func:`gmtime` یا :func:`localtime` را نشان می‌دهد، به رشته‌ای که توسط آرگومان *format* مشخص شده است تبدیل کنید. اگر *t* فراهم نشده باشد، زمان فعلی بازگردانده‌شده توسط :func:`localtime` استفاده می‌شود. *format* باید یک رشته باشد. اگر هر فیلدی در *t* خارج از محدوده‌ی مجاز باشد، :exc:`ValueError` ایجاد می‌شود." 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 "۰ یک آرگومان مجاز برای هر جایگاهی از تاپل زمانی است؛ اگر در حالت عادی غیرمجاز باشد، مقدار به‌اجبار به مقداری درست تغییر می‌یابد." diff --git a/library/timeit.po b/library/timeit.po index 78f1d377..d7ddbbd6 100644 --- a/library/timeit.po +++ b/library/timeit.po @@ -8,12 +8,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 01:15+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -32,7 +33,7 @@ msgstr "**کد منبع:** :source:`Lib/timeit.py`" msgid "This module provides a simple way to time small bits of Python code. It has both a :ref:`timeit-command-line-interface` as well as a :ref:`callable ` one. It avoids a number of common traps for measuring execution times. See also Tim Peters' introduction to the \"Algorithms\" chapter in the second edition of *Python Cookbook*, published by O'Reilly." msgstr "این ماژول روش ساده‌ای برای زمان‌سنجی قطعه‌های کوچک کد پایتون فراهم می‌کند. این ماژول هم یک :ref:`timeit-command-line-interface` و هم یک رابط :ref:`فراخوانی‌پذیر ` دارد و از شماری از دام‌های رایج در اندازه‌گیری زمان‌های اجرا پرهیز می‌کند. همچنین به مقدمه‌ی Tim Peters بر فصل «Algorithms» در ویرایش دوم *Python Cookbook*، که توسط O'Reilly منتشر شده است، مراجعه کنید." -msgid "Basic Examples" +msgid "Basic examples" msgstr "مثال‌های پایه" msgid "The following example shows how the :ref:`timeit-command-line-interface` can be used to compare three different expressions:" @@ -86,7 +87,7 @@ msgstr "" msgid "Note however that :func:`.timeit` will automatically determine the number of repetitions only when the command-line interface is used. In the :ref:`timeit-examples` section you can find more advanced examples." msgstr "با این حال توجه داشته باشید که :func:`.timeit` تعداد تکرارها را فقط زمانی که از رابط خط فرمان استفاده شود، به‌طور خودکار تعیین می‌کند. در بخش :ref:`timeit-examples` می‌توانید مثال‌های پیشرفته‌تری پیدا کنید." -msgid "Python Interface" +msgid "Python interface" msgstr "رابط پایتون" msgid "The module defines three convenience functions and a public class:" @@ -137,12 +138,15 @@ msgstr "timeit.Timer('for i in range(10): oct(i)', 'gc.enable()').timeit()" msgid "Automatically determine how many times to call :meth:`.timeit`." msgstr "به‌طور خودکار تعیین می‌کند که چند بار :meth:`.timeit` فراخوانی شود." -msgid "This is a convenience function that calls :meth:`.timeit` repeatedly so that the total time >= 0.2 second, returning the eventual (number of loops, time taken for that number of loops). It calls :meth:`.timeit` with increasing numbers from the sequence 1, 2, 5, 10, 20, 50, ... until the time taken is at least 0.2 seconds." -msgstr "این یک تابع کمکی است که :meth:`.timeit` را به‌طور مکرر فراخوانی می‌کند تا زمان کل >= ۰٫۲ ثانیه شود و در نهایت (تعداد حلقه‌ها، زمان صرف‌شده برای آن تعداد حلقه) را برمی‌گرداند. این تابع :meth:`.timeit` را با اعداد فزاینده از دنباله‌ی ۱، ۲، ۵، ۱۰، ۲۰، ۵۰، ... فراخوانی می‌کند تا زمانی که زمان صرف‌شده حداقل ۰٫۲ ثانیه باشد." +msgid "This is a convenience function that calls :meth:`.timeit` repeatedly so that the total time >= *Timer.target_time* seconds, returning the eventual (number of loops, time taken for that number of loops). It calls :meth:`.timeit` with increasing numbers from the sequence 1, 2, 5, 10, 20, 50, ... until the time taken is at least *target_time* seconds." +msgstr "این یک تابع کمکی است که :meth:`.timeit` را به طور مکرر فراخوانی می‌کند تا زمان کل برابر یا بیشتر از *Timer.target_time* ثانیه شود، و در نهایت (تعداد حلقه‌ها، زمان صرف‌شده برای آن تعداد حلقه) را برمی‌گرداند. این تابع متد :meth:`.timeit` را با اعداد صعودی از دنباله‌ی ۱، ۲، ۵، ۱۰، ۲۰، ۵۰، ... فراخوانی می‌کند تا زمانی که زمان صرف‌شده حداقل *target_time* ثانیه شود." msgid "If *callback* is given and is not ``None``, it will be called after each trial with two arguments: ``callback(number, time_taken)``." msgstr "اگر *callback* ارائه‌شده باشد و ``None`` نباشد، پس از هر آزمایش با دو آرگومان فراخوانی می‌شود: ``callback(number, time_taken)``." +msgid "The optional *target_time* parameter was added." +msgstr "پارامتر اختیاری *target_time* اضافه شد." + msgid "Call :meth:`.timeit` a few times." msgstr ":meth:`.timeit` را چند بار فراخوانی کنید." @@ -174,7 +178,7 @@ msgstr "" msgid "The advantage over the standard traceback is that source lines in the compiled template will be displayed. The optional *file* argument directs where the traceback is sent; it defaults to :data:`sys.stderr`." msgstr "مزیت آن نسبت به ردگیری پشته استاندارد این است که ردیفهای منبع در قالب کامپایل‌شده نمایش داده خواهند شد. آرگومان اختیاری *file* مشخص می‌کند که ردگیری پشته به کجا ارسال می‌شود؛ پیش‌فرض آن :data:`sys.stderr` است." -msgid "Command-Line Interface" +msgid "Command-line interface" msgstr "رابط خط فرمان" msgid "When called as a program from the command line, the following form is used::" @@ -201,6 +205,9 @@ msgstr "اندازه‌گیری زمان فرایند، نه زمان دیوار msgid "specify a time unit for timer output; can select ``nsec``, ``usec``, ``msec``, or ``sec``" msgstr "یک واحد زمانی برای خروجی زمان‌سنج مشخص کنید؛ می‌توانید ``nsec``، ``usec``، ``msec`` یا ``sec`` را انتخاب کنید" +msgid "if :option:`--number` is 0, the code will run until it takes at least this many seconds (default: 0.2)" +msgstr "اگر :option:`--number` برابر با 0 باشد، کد تا زمانی که حداقل به این تعداد ثانیه زمان ببرد اجرا خواهد شد (پیش‌فرض: 0.2)" + msgid "print raw timing results; repeat for more digits precision" msgstr "چاپ نتایج خام زمان‌سنجی؛ برای دقت بیشتر در ارقام تکرار کنید" @@ -210,8 +217,8 @@ msgstr "یک پیام کوتاه کاربرد را چاپ کرده و خارج msgid "A multi-line statement may be given by specifying each line as a separate statement argument; indented lines are possible by enclosing an argument in quotes and using leading spaces. Multiple :option:`-s` options are treated similarly." msgstr "یک دستور چندخطی می‌تواند با مشخص کردن هر خط به‌عنوان یک آرگومان دستور جداگانه داده شود؛ سطرهای دارای تورفتگی با قرار دادن آرگومان در علامت‌های نقل‌قول و استفاده از فاصله‌های ابتدایی امکان‌پذیر است. گزینه‌های متعدد :option:`-s` نیز به‌طور مشابه رفتار می‌شوند." -msgid "If :option:`-n` is not given, a suitable number of loops is calculated by trying increasing numbers from the sequence 1, 2, 5, 10, 20, 50, ... until the total time is at least 0.2 seconds." -msgstr "اگر :option:`-n` داده نشده باشد، تعداد مناسبی برای حلقه‌ها با امتحان کردن اعداد فزاینده از دنباله‌ی ۱، ۲، ۵، ۱۰، ۲۰، ۵۰، ... محاسبه می‌شود، تا زمانی که زمان کل حداقل ۰.۲ ثانیه شود." +msgid "If :option:`-n` is not given, a suitable number of loops is calculated by trying increasing numbers from the sequence 1, 2, 5, 10, 20, 50, ... until the total time is at least :option:`--target-time` seconds (default: 0.2)." +msgstr "اگر :option:`-n` داده نشده باشد، تعداد مناسبی از حلقه‌ها با امتحان کردن اعداد صعودی از دنباله‌ی ۱، ۲، ۵، ۱۰، ۲۰، ۵۰، ... محاسبه می‌شود تا زمانی که زمان کل حداقل :option:`--target-time` ثانیه شود (پیش‌فرض: ۰.۲)." msgid ":func:`default_timer` measurements can be affected by other programs running on the same machine, so the best thing to do when accurate timing is necessary is to repeat the timing a few times and use the best time. The :option:`-r` option is good for this; the default of 5 repetitions is probably enough in most cases. You can use :func:`time.process_time` to measure CPU time." msgstr "اندازه‌گیری‌های :func:`default_timer` می‌توانند تحت تأثیر سایر برنامه‌های در حال اجرا روی همان ماشین قرار بگیرند، بنابراین بهترین کار هنگامی که زمان‌سنجی دقیق ضروری است این است که زمان‌سنجی را چند بار تکرار کنید و از بهترین زمان استفاده کنید. گزینه‌ی :option:`-r` برای این کار مناسب است؛ مقدار پیش‌فرض ۵ تکرار احتمالاً در بیشتر موارد کافی است. می‌توانید از :func:`time.process_time` برای اندازه‌گیری زمان CPU استفاده کنید." @@ -219,6 +226,9 @@ msgstr "اندازه‌گیری‌های :func:`default_timer` می‌توانن msgid "There is a certain baseline overhead associated with executing a pass statement. The code here doesn't try to hide it, but you should be aware of it. The baseline overhead can be measured by invoking the program without arguments, and it might differ between Python versions." msgstr "اجرای دستور pass با مقدار مشخصی سربار پایه همراه است. این کد سعی نمی‌کند آن را پنهان کند، اما شما باید از آن آگاه باشید. سربار پایه را می‌توان با فراخوانی برنامه بدون آرگومان اندازه‌گیری کرد، و ممکن است بین نسخه‌های پایتون متفاوت باشد." +msgid "Output is in color by default and can be :ref:`controlled using environment variables `." +msgstr "خروجی به‌طور پیش‌فرض رنگی است و می‌تواند :ref:`با استفاده از متغیرهای محیطی کنترل شود `." + msgid "Examples" msgstr "مثال‌ها" diff --git a/library/tkinter.po b/library/tkinter.po index 41ebabeb..f0f80f97 100644 --- a/library/tkinter.po +++ b/library/tkinter.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-12 14:18+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -36,8 +37,8 @@ msgstr "بسته‌ی :mod:`!tkinter` («رابط Tk») رابط استاندا msgid "Running ``python -m tkinter`` from the command line should open a window demonstrating a simple Tk interface, letting you know that :mod:`!tkinter` is properly installed on your system, and also showing what version of Tcl/Tk is installed, so you can read the Tcl/Tk documentation specific to that version." msgstr "اجرای ``python -m tkinter`` از خط فرمان باید پنجره‌ای را باز کند که یک رابط ساده Tk را نمایش می‌دهد، به شما اطلاع می‌دهد که :mod:`!tkinter` به‌درستی روی سیستم شما نصب شده است، و همچنین نشان می‌دهد چه نسخه‌ای از Tcl/Tk نصب شده است، تا بتوانید مستندات Tcl/Tk مخصوص همان نسخه را بخوانید." -msgid "Tkinter supports a range of Tcl/Tk versions, built either with or without thread support. Tcl/Tk 8.5.12 is the minimum supported version; the official Python binary release bundles Tcl/Tk 8.6. See the source code for the :mod:`_tkinter` module for more information about supported versions." -msgstr "Tkinter از محدوده‌ای از نسخه‌های Tcl/Tk پشتیبانی می‌کند، که با یا بدون پشتیبانی از نخ ساخته شده‌اند. Tcl/Tk 8.5.12 حداقل نسخه پشتیبانی‌شده است؛ نسخه دودویی رسمی پایتون شامل Tcl/Tk 8.6 می‌شود. برای اطلاعات بیشتر درباره نسخه‌های پشتیبانی‌شده، کد منبع ماژول :mod:`_tkinter` را ببینید." +msgid "Tkinter supports a range of Tcl/Tk versions, built either with or without thread support. Tcl/Tk 8.5.12 is the minimum supported version; the official Python binary release bundles Tcl/Tk 9.0. See the source code for the :mod:`_tkinter` module for more information about supported versions." +msgstr "کتابخانه‌ی Tkinter از طیفی از نسخه‌های Tcl/Tk پشتیبانی می‌کند که یا با پشتیبانی از نخ یا بدون آن ساخته شده‌اند. نسخه‌ی Tcl/Tk 8.5.12 حداقل نسخه‌ی پشتیبانی‌شده است؛ نسخه‌ی باینری رسمی پایتون شامل Tcl/Tk 9.0 است. برای اطلاعات بیشتر درباره‌ی نسخه‌های پشتیبانی‌شده، کد منبع ماژول :mod:`_tkinter` را ببینید." msgid "Support for Tcl/Tk versions older than 8.5.12 was removed." msgstr "پشتیبانی از نسخه‌های قدیمی‌تر از 8.5.12 Tcl/Tk حذف شد." @@ -461,8 +462,8 @@ msgstr "اگر مفسر Tcl در حال اجرای حلقه رویداد و پر msgid "A number of special cases exist:" msgstr "تعدادی حالت خاص وجود دارد:" -msgid "Tcl/Tk libraries built without thread support are now rare: the bundled Tcl/Tk 8.6 is built with thread support, so this case only arises with some older non-threaded builds. When the library is not thread-aware, :mod:`!tkinter` calls the library from the originating Python thread, even if this is different than the thread that created the Tcl interpreter. A global lock ensures only one call occurs at a time." -msgstr "کتابخانه‌های Tcl/Tk که بدون پشتیبانی از نخ ساخته شده‌اند، امروزه نادر هستند: نسخه‌ی همراه Tcl/Tk 8.6 با پشتیبانی از نخ ساخته شده است، بنابراین این حالت تنها در برخی ساخت‌های قدیمی‌تر بدون نخ پیش می‌آید. وقتی کتابخانه آگاه از نخ نباشد، :mod:`!tkinter` کتابخانه را از نخ پایتونی مبدأ فراخوانی می‌کند، حتی اگر این نخ با نخی که مفسر Tcl را ایجاد کرده است متفاوت باشد. یک قفل سراسری تضمین می‌کند که در هر زمان تنها یک فراخوانی انجام شود." +msgid "Tcl/Tk libraries built without thread support are now rare: Tcl/Tk 9.0 (the bundled version) is always thread-aware, so this case only arises with some older 8.x builds. When the library is not thread-aware, :mod:`!tkinter` calls the library from the originating Python thread, even if this is different than the thread that created the Tcl interpreter. A global lock ensures only one call occurs at a time." +msgstr "کتابخانه‌های Tcl/Tk که بدون پشتیبانی از نخ ساخته شده‌اند اکنون نادر هستند: نسخه‌ی Tcl/Tk 9.0 (نسخه‌ی همراه) همیشه از نخ‌ها آگاه است، بنابراین این حالت تنها در برخی از نسخه‌های قدیمی‌تر ۸.x رخ می‌دهد. هنگامی که کتابخانه از نخ‌ها آگاه نباشد، :mod:`!tkinter` کتابخانه را از نَخ مبدأ پایتون فراخوانی می‌کند، حتی اگر این نَخ با نَخی که مفسر Tcl را ایجاد کرده است متفاوت باشد. یک قفل سراسری تضمین می‌کند که در هر زمان تنها یک فراخوانی رخ دهد." msgid "While :mod:`!tkinter` allows you to create more than one instance of a :class:`Tk` object (with its own interpreter), all interpreters that are part of the same thread share a common event queue, which gets ugly fast. In practice, don't create more than one instance of :class:`Tk` at a time. Otherwise, it's best to create them in separate threads and ensure you're running a thread-aware Tcl/Tk build." msgstr "در حالی که :mod:`!tkinter` به شما امکان می‌دهد بیش از یک نمونه از شیء :class:`Tk` (با مفسر مخصوص خود) ایجاد کنید، تمام مفسرهایی که بخشی از یک نخ هستند، یک صف رویداد مشترک دارند که به‌سرعت مشکل‌ساز می‌شود. در عمل، در یک زمان بیش از یک نمونه از :class:`Tk` ایجاد نکنید. در غیر این صورت، بهتر است آن‌ها را در نخ‌های جداگانه ایجاد کنید و اطمینان حاصل کنید که در حال اجرای نسخه‌ای از Tcl/Tk با پشتیبانی از نخ هستید." @@ -1263,6 +1264,9 @@ msgstr ":meth:`size` نام مستعاری از :meth:`!grid_size` است، به msgid "Return a list of the child widgets managed in this container's grid, most recently managed first. If *row* or *column* is given, only the children in that row or column are returned." msgstr "فهرستی از ابزارک‌های فرزند مدیریت‌شده در شبکه‌ی این ظرف را برمی‌گرداند، به‌طوری که آخرین ابزارک مدیریت‌شده در ابتدا قرار دارد. اگر *row* یا *column* داده شود، فقط ابزارک‌های فرزند موجود در آن ردیف یا ستون برگردانده می‌شوند." +msgid "Same as :meth:`grid_slaves`: return the child widgets managed in this container's grid, optionally restricted to a given *row* or *column*." +msgstr "مشابه :meth:`grid_slaves`: ابزارک‌های فرزندی را که در شبکه (grid) این ظرف مدیریت می‌شوند برمی‌گرداند، که به صورت اختیاری به یک *row* یا *column* مشخص محدود می‌شود." + msgid "Enable or disable geometry propagation for this container when it manages its children with the pack geometry manager. When *flag* is true, the container resizes itself to fit the requested sizes of its children; when it is false, its size is left under your control. Called with no argument, return the current setting as a boolean." msgstr "فعال یا غیرفعال کردن انتشار هندسه برای این ظرف (container) هنگامی که فرزندان خود را با مدیر هندسه‌ی pack مدیریت می‌کند. وقتی *flag* درست باشد، ظرف اندازه‌ی خود را متناسب با اندازه‌های درخواستی فرزندان تغییر می‌دهد؛ وقتی نادرست باشد، اندازه‌ی آن تحت کنترل شما باقی می‌ماند. در صورت فراخوانی بدون آرگومان، تنظیم فعلی را به‌صورت یک مقدار بولی برمی‌گرداند." @@ -1275,9 +1279,21 @@ msgstr "فهرستی از ابزارک‌های فرزند مدیریت‌شده msgid ":meth:`slaves` is an alias of :meth:`!pack_slaves`." msgstr ":meth:`slaves` نام مستعار :meth:`!pack_slaves` است." +msgid "Same as :meth:`pack_slaves`: return the child widgets managed by this container with the pack geometry manager, in packing order." +msgstr "مشابه :meth:`pack_slaves`: ابزارک‌های فرزندی را که توسط این ظرف با مدیر هندسه‌ی بسته‌بندی (pack) مدیریت می‌شوند، به ترتیب بسته‌بندی، برمی‌گرداند." + +msgid ":meth:`content` is an alias of :meth:`!pack_content`." +msgstr ":meth:`content` نام مستعاری برای :meth:`!pack_content` است." + msgid "Return a list of the child widgets managed by this container with the place geometry manager." msgstr "فهرستی از ابزارک‌های فرزند این ظرف را که با مدیر چیدمان place مدیریت می‌شوند، برمی‌گرداند." +msgid "Same as :meth:`place_slaves`: return the child widgets managed by this container with the place geometry manager." +msgstr "مشابه :meth:`place_slaves`: ابزارک‌های فرزندی را که توسط این ظرف با مدیر هندسه‌ی مکان (place) مدیریت می‌شوند برمی‌گرداند." + +msgid "The methods with the ``bind`` and ``unbind`` prefixes associate event patterns with callbacks and remove those associations." +msgstr "متد‌هایی که دارای پیشوندهای ``bind`` و ``unbind`` هستند، الگوهای رویداد را به فراخوانی‌های بازگشتی (callback) متصل کرده و آن اتصالات را حذف می‌کنند." + msgid "Bind the event pattern *sequence* on this widget to the callable *func*." msgstr "الگوی رویداد *sequence* را در این ابزارک به شیء فراخوانی‌پذیر *func* متصل کنید." @@ -2014,6 +2030,9 @@ msgstr "مانند :meth:`Misc.pack_propagate`، با در نظر گرفتن ا msgid "Same as :meth:`Misc.pack_slaves`: return the list of widgets packed in this widget. :meth:`slaves` is an alias of :meth:`!pack_slaves`." msgstr "مشابه :meth:`Misc.pack_slaves`: فهرست ابزارک‌های تعبیه‌شده در این ابزارک را برمی‌گرداند. :meth:`slaves` نام مستعاری از :meth:`!pack_slaves` است." +msgid "Same as :meth:`Misc.pack_content`. :meth:`content` is an alias of :meth:`!pack_content`." +msgstr "مشابه :meth:`Misc.pack_content`. متد :meth:`content` نام مستعاری برای :meth:`!pack_content` است." + msgid "Geometry manager that places widgets at explicit positions and sizes within their container. The :class:`!Place` mix-in is inherited by all widgets (through :class:`Widget`). See also :ref:`tkinter-geometry-management`." msgstr "مدیر چیدمانی که ابزارک‌ها را در موقعیت‌ها و اندازه‌های مشخص درون ظرفشان قرار می‌دهد. همه ابزارک‌ها (از طریق :class:`Widget`) از کلاس میکس‌این :class:`!Place` ارث می‌برند. همچنین ببینید :ref:`tkinter-geometry-management`." @@ -2068,6 +2087,9 @@ msgstr "یک دیکشنری از گزینه‌های جاری place ابزارک msgid "Same as :meth:`Misc.place_slaves`: return the list of widgets placed in this widget." msgstr "مشابه :meth:`Misc.place_slaves`: فهرست ابزارک‌های قرار گرفته در این ابزارک را برمی‌گرداند." +msgid "Same as :meth:`Misc.place_content`." +msgstr "مشابه :meth:`Misc.place_content`." + msgid "Geometry manager that arranges widgets in a two-dimensional grid of rows and columns within their container. The :class:`!Grid` mix-in is inherited by all widgets (through :class:`Widget`). See also :ref:`tkinter-geometry-management`." msgstr "مدیر چیدمانی که ابزارک‌ها را در یک شبکه‌ی دوبعدی از ردیف‌ها و ستون‌ها درون ظرف آن‌ها می‌چیند. همه‌ی ابزارک‌ها میکس‌این :class:`!Grid` را (از طریق :class:`Widget`) به ارث می‌برند. همچنین :ref:`tkinter-geometry-management` را ببینید." @@ -2134,6 +2156,9 @@ msgstr "همان :meth:`Misc.grid_propagate` است." msgid "Same as :meth:`Misc.grid_slaves`: return the widgets managed in the grid, optionally restricted to a *row* and/or *column*." msgstr "همانند :meth:`Misc.grid_slaves`: ابزارک‌های مدیریت‌شده در شبکه را بازمی‌گرداند، که به‌صورت اختیاری به یک *ردیف* و/یا *ستون* محدود شده‌اند." +msgid "Same as :meth:`Misc.grid_content`." +msgstr "مشابه :meth:`Misc.grid_content`." + msgid "Mix-in providing the horizontal-scrolling interface shared by widgets such as :class:`Entry`, :class:`Canvas`, :class:`Listbox`, :class:`Text` and :class:`Spinbox`. A widget's :meth:`xview` method is registered as the *command* of a horizontal :class:`Scrollbar`." msgstr "میکس‌اینکه رابط پیمایش افقی مشترک میان ابزارک‌هایی مانند :class:`Entry`، :class:`Canvas`، :class:`Listbox`، :class:`Text` و :class:`Spinbox` را فراهم می‌کند. متد :meth:`xview` یک ابزارک به‌عنوان *command* یک :class:`Scrollbar` افقی ثبت می‌شود." @@ -3445,8 +3470,14 @@ msgstr "پشته‌های واگرد و بازگرد را پاک کنید." msgid "Push a separator onto the undo stack, marking a boundary between edit actions for undo and redo. Has no effect unless the *undo* option is true. Separators are inserted automatically when the *autoseparators* option is true." msgstr "یک جداکننده را روی پشته‌ی واگرد (undo) قرار می‌دهد و مرزی میان اقدام‌های ویرایشی برای واگرد و بازانجام (redo) مشخص می‌کند. این کار هیچ تأثیری ندارد، مگر اینکه گزینه‌ی *undo* درست باشد. هنگامی که گزینه‌ی *autoseparators* درست باشد، جداکننده‌ها به‌صورت خودکار درج می‌شوند." -msgid "Search for *pattern* starting at *index* and return the index of the first character of the first match, or an empty string if there is no match. Searching stops at *stopindex* if given; otherwise it wraps around the ends of the text until the starting position is reached again. The following boolean keyword flags control the search: *forwards* or *backwards* select the direction (forward is the default); *exact* (the default) or *regexp* select literal or regular-expression matching; *nocase* makes the match case-insensitive; and *elide* causes hidden text to be searched as well. If *count* is a :class:`Variable`, the number of index positions in the match is stored in it." -msgstr "*pattern* را از *index* جست‌وجو می‌کند و اندیس نخستین نویسه‌ی اولین تطابق را برمی‌گرداند، یا در صورت نبود تطابق، یک رشته خالی برمی‌گرداند. در صورت ارائه *stopindex*، جست‌وجو در *stopindex* متوقف می‌شود؛ در غیر این صورت، جست‌وجو به‌صورت چرخشی میان دو انتهای متن ادامه می‌یابد تا دوباره به موقعیت شروع برسد. پرچم‌های کلیدواژه‌ای بولی زیر، جست‌وجو را کنترل می‌کنند: *forwards* یا *backwards* جهت را انتخاب می‌کنند (پیش‌فرض رو به جلو است)؛ *exact* (پیش‌فرض) یا *regexp* تطبیق لفظی یا تطبیق با عبارت باقاعده را انتخاب می‌کنند؛ *nocase* تطابق را غیرحساس به بزرگی و کوچکی حروف می‌کند؛ و *elide* باعث می‌شود متن پنهان نیز جست‌وجو شود. اگر *count* یک :class:`Variable` باشد، تعداد موقعیت‌های اندیس در تطابق، در آن ذخیره می‌شود." +msgid "Search for *pattern* starting at *index* and return the index of the first character of the first match, or an empty string if there is no match. Searching stops at *stopindex* if given; otherwise it wraps around the ends of the text until the starting position is reached again. The following boolean keyword flags control the search: *forwards* or *backwards* select the direction (forward is the default); *exact* (the default) or *regexp* select literal or regular-expression matching; *nocase* makes the match case-insensitive; *elide* causes hidden text to be searched as well; *nolinestop* (regexp only) lets ``.`` and ``[^`` match newlines; and *strictlimits* requires the whole match to lie within *index* and *stopindex*. If *count* is a :class:`Variable`, the number of index positions in the match is stored in it." +msgstr "به دنبال *pattern* از *index* شروع کنید و اندیس اولین نویسه از اولین تطابق را برگرداند، یا اگر تطابقی وجود نداشته باشد یک رشته‌ی خالی برگردانید. جستجو در صورت مشخص شدن در *stopindex* متوقف می‌شود؛ در غیر این صورت تا زمانی که به موقعیت شروع برسیم، دور انتهای متن می‌چرخد. پرچم‌های کلیدواژه‌ی بولی زیر جستجو را کنترل می‌کنند: *forwards* یا *backwards* جهت را انتخاب می‌کنند (جلو پیش‌فرض است)؛ *exact* (پیش‌فرض) یا *regexp* تطابق لفظی یا عبارت باقاعده را انتخاب می‌کنند؛ *nocase* تطابق را نسبت به بزرگ و کوچک بودن حروف بی‌تفاوت می‌کند؛ *elide* باعث می‌شود متن پنهان نیز جستجو شود؛ *nolinestop* (فقط عبارت باقاعده) به ``.`` و ``[^`` اجازه می‌دهد خطوط جدید را مطابقت دهند؛ و *strictlimits* ایجاب می‌کند که کل تطابق در محدوده *index* و *stopindex* قرار داشته باشد. اگر *count* یک :class:`Variable` باشد، تعداد موقعیت‌های اندیس در تطابق در آن ذخیره می‌شود." + +msgid "Added the *nolinestop* and *strictlimits* parameters." +msgstr "پارامترهای *nolinestop* و *strictlimits* اضافه شدند." + +msgid "Like :meth:`search`, but find every match in the searched range and return a tuple of the starting indices of all matches (empty if there are none). By default overlapping matches are not reported; passing a true *overlap* returns every match that is not wholly contained in another. If *count* is a :class:`Variable`, it receives a list with one element per match." +msgstr "مانند :meth:`search`، اما هر تطابق را در محدوده‌ی جستجو یافته و تاپلی از اندیس‌های شروع تمام تطابق‌ها را برمی‌گرداند (اگر هیچ‌کدام وجود نداشته باشند، خالی است). به‌طور پیش‌فرض، تطابق‌های همپوشان گزارش نمی‌شوند؛ ارسال یک *overlap* مقدار صحیح، هر تطابق را که به‌طور کامل در دیگری قرار نگرفته باشد برمی‌گرداند. اگر *count* یک :class:`Variable` باشد، فهرستی با یک عنصر به ازای هر تطابق دریافت می‌کند." msgid "Scroll the widget by 10 times the difference between *x*, *y* and the coordinates passed to the last :meth:`scan_mark` call. This is typically bound to mouse motion events, producing the effect of dragging the text at high speed through the window." msgstr "ابزارک را به اندازه‌ی ۱۰ برابر اختلاف بین *x*، *y* و مختصات ارسال‌شده به آخرین فراخوانی :meth:`scan_mark` پیمایش می‌کند. این عمل معمولاً به رویدادهای حرکت ماوس متصل می‌شود و اثر کشیده‌شدن متن با سرعت بالا در پنجره را ایجاد می‌کند." @@ -3745,6 +3776,12 @@ msgstr "ابزارکی که رویداد بر آن رخ داده است." msgid "The amount the mouse wheel was rotated (for ``MouseWheel`` events)." msgstr "میزان چرخش چرخ ماوس (برای رویدادهای ``MouseWheel``)." +msgid "The data string of a virtual event, as passed to the *data* option of :meth:`Misc.event_generate`. It is ``'??'`` for non-virtual events." +msgstr "رشته‌ی داده‌ی یک رویداد مجازی، همان‌طور که به گزینه‌ی *data* در :meth:`Misc.event_generate` ارسال می‌شود. برای رویدادهای غیرمجازی برابر با ``'??'`` است." + +msgid "A fixed detail string for ``Enter``, ``Leave``, ``FocusIn``, ``FocusOut`` and ``ConfigureRequest`` events (see the Tcl/Tk documentation). It is ``'??'`` for other events." +msgstr "رشته‌ی جزئیات ثابت برای رویدادهای ``Enter``، ``Leave``، ``FocusIn``، ``FocusOut`` و ``ConfigureRequest`` (مستندات Tcl/Tk را ببینید). این مقدار برای سایر رویدادها ``'??'`` است." + msgid "An :class:`enum.StrEnum` enumerating the Tk event types, used as the value of :attr:`Event.type`. Its members include, among others, ``KeyPress``, ``KeyRelease``, ``ButtonPress``, ``ButtonRelease``, ``Motion``, ``Enter``, ``Leave``, ``FocusIn``, ``FocusOut``, ``Configure``, ``Map``, ``Unmap``, ``Expose``, ``Destroy`` and ``MouseWheel``." msgstr "یک :class:`enum.StrEnum` که انواع رویداد Tk را برمی‌شمارد و به‌عنوان مقدار :attr:`Event.type` استفاده می‌شود. اعضای آن، از میان سایر موارد، شامل ``KeyPress``، ``KeyRelease``، ``ButtonPress``، ``ButtonRelease``، ``Motion``، ``Enter``، ``Leave``، ``FocusIn``، ``FocusOut``، ``Configure``، ``Map``، ``Unmap``، ``Expose``، ``Destroy`` و ``MouseWheel`` هستند." diff --git a/library/tokenize.po b/library/tokenize.po index 40d9e49d..3f20c579 100644 --- a/library/tokenize.po +++ b/library/tokenize.po @@ -9,12 +9,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 08:31+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -40,8 +41,8 @@ msgstr "برای ساده‌سازی مدیریت جریان توکن، تمام msgid "Note that the functions in this module are only designed to parse syntactically valid Python code (code that does not raise when parsed using :func:`ast.parse`). The behavior of the functions in this module is **undefined** when providing invalid Python code and it can change at any point." msgstr "توجه داشته باشید که توابع این ماژول فقط برای تجزیه کد پایتون معتبر از نظر سینتکسی طراحی شده‌اند (کدی که هنگام تجزیه با استفاده از :func:`ast.parse` استثنایی پرتاب نمی‌کند). رفتار توابع این ماژول در صورت ارائه کد پایتون نامعتبر **تعریف‌نشده** است و ممکن است در هر زمانی تغییر کند." -msgid "Tokenizing Input" -msgstr "توکن‌بندی ورودی" +msgid "Tokenizing input" +msgstr "توکن‌سازی ورودی" msgid "The primary entry point is a :term:`generator`:" msgstr "نقطه ورود اصلی یک :term:`تولیدگر ` است:" @@ -131,8 +132,8 @@ msgstr "" " 2,\n" " 3" -msgid "Command-Line Usage" -msgstr "استفاده از خط فرمان" +msgid "Command-line usage" +msgstr "نحوه‌ی استفاده از خط فرمان" msgid "The :mod:`!tokenize` module can be executed as a script from the command line. It is as simple as:" msgstr "ماژول :mod:`!tokenize` می‌تواند به‌عنوان یک اسکریپت از خط فرمان اجرا شود. این کار به سادگی زیر است:" @@ -152,6 +153,9 @@ msgstr "نمایش نام‌های توکن با استفاده از نوع دق msgid "If :file:`filename.py` is specified its contents are tokenized to stdout. Otherwise, tokenization is performed on stdin." msgstr "اگر :file:`filename.py` مشخص شده باشد، محتوای آن به stdout توکن‌سازی می‌شود. در غیر این صورت، توکن‌سازی روی stdin انجام می‌شود." +msgid "Output is in color by default and can be :ref:`controlled using environment variables `." +msgstr "خروجی به‌طور پیش‌فرض رنگی است و می‌تواند :ref:`با استفاده از متغیرهای محیطی کنترل شود `." + msgid "Examples" msgstr "مثال‌ها" @@ -251,8 +255,8 @@ msgstr "" "\n" "say_hello()" -msgid "will be tokenized to the following output where the first column is the range of the line/column coordinates where the token is found, the second column is the name of the token, and the final column is the value of the token (if any)" -msgstr "به خروجی زیر توکن‌بندی خواهد شد که در آن ستون اول، بازه‌ی مختصات سطر/ستون محل یافت شدن توکن، ستون دوم نام توکن و ستون آخر مقدار توکن (در صورت وجود) است." +msgid "will be tokenized to the following output where the first column is the range of the line/column coordinates where the token is found, the second column is the name of the token, and the final column is the value of the token (if any):" +msgstr "به خروجی زیر توکن‌سازی خواهد شد که در آن ستون اول محدوده مختصات سطر/ستون محل یافت شدن توکن، ستون دوم نام توکن، و ستون نهایی مقدار توکن (در صورت وجود) است:" msgid "" "$ python -m tokenize hello.py\n" diff --git a/library/tomllib.po b/library/tomllib.po index a9a2b19a..e494b5c6 100644 --- a/library/tomllib.po +++ b/library/tomllib.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 12:26+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -30,8 +31,14 @@ msgstr ":mod:`!tomllib` --- تجزیه پرونده‌های TOML" msgid "**Source code:** :source:`Lib/tomllib`" msgstr "**کد منبع:** :source:`Lib/tomllib`" -msgid "This module provides an interface for parsing TOML 1.0.0 (Tom's Obvious Minimal Language, `https://toml.io `_). This module does not support writing TOML." -msgstr "این ماژول رابطی برای تجزیه‌ی TOML 1.0.0 (Tom's Obvious Minimal Language، `https://toml.io `_) فراهم می‌کند. این ماژول از نوشتن TOML پشتیبانی نمی‌کند." +msgid "This module provides an interface for parsing TOML 1.1.0 (Tom's Obvious Minimal Language, `https://toml.io `_). This module does not support writing TOML." +msgstr "این ماژول رابطی برای تجزیه کردن TOML 1.1.0 (زبان حداقل آشکار تام، `https://toml.io `_) فراهم می‌کند. این ماژول از نوشتن TOML پشتیبانی نمی‌کند." + +msgid "The module was added with support for TOML 1.0.0." +msgstr "این ماژول با پشتیبانی از TOML 1.0.0 اضافه شد." + +msgid "Added TOML 1.1.0 support. See the :ref:`What's New ` for details." +msgstr "پشتیبانی از TOML 1.1.0 اضافه شد. برای جزئیات، :ref:`بخش چه چیزی جدید است ` را ببینید." msgid "Be cautious when parsing data from untrusted sources. A malicious TOML string may cause the decoder to consume considerable CPU and memory resources. Limiting the size of data to be parsed is recommended." msgstr "هنگام تجزیه داده از منابع غیرقابل‌اعتماد، احتیاط کنید. یک رشته TOML مخرب ممکن است باعث شود کدگشا مقدار قابل‌توجهی از منابع پردازنده و حافظه را مصرف کند. محدود کردن اندازه داده‌ای که تجزیه می‌شود، توصیه می‌شود." @@ -203,3 +210,48 @@ msgstr "آرایه‌ای از جدول‌ها" msgid "list of dicts" msgstr "فهرستی از دیکشنری‌ها" + +msgid "Limits and interoperability considerations" +msgstr "محدودیت‌ها و ملاحظات سازگاری متقابل" + +msgid ":mod:`!tomllib` places some limits on the documents it can handle, and it preserves details that other TOML parsers are allowed to ignore. When writing portable TOML files, only use features that are guaranteed or recommended by the standard." +msgstr ":mod:`!tomllib` محدودیت‌هایی را روی اسنادی که می‌تواند پردازش کند اعمال می‌کند و جزئیاتی را حفظ می‌کند که سایر پارسرهای TOML مجاز به نادیده گرفتن آن‌ها هستند. هنگام نوشتن پرونده‌های TOML قابل‌حمل، فقط از ویژگی‌هایی استفاده کنید که توسط استاندارد تضمین یا توصیه شده‌اند." + +msgid "The implementation details listed here may change in future versions of Python." +msgstr "جزئیات پیاده‌سازی ذکر شده در اینجا ممکن است در نسخه‌های آینده‌ی پایتون تغییر کنند." + +msgid "Tables/dicts" +msgstr "جداول/دیکشنری‌ها" + +msgid "The TOML spec does not guarantee key/value pairs in TOML documents and tables to be in any specific order." +msgstr "مشخصات TOML تضمین نمی‌کند که جفت‌های کلید/مقدار در اسناد و جداول TOML به ترتیب خاصی باشند." + +msgid ":mod:`!tomllib` loads dictionary entries in the order they appear in the source." +msgstr ":mod:`!tomllib` درایه‌های دیکشنری را به همان ترتیبی که در منبع ظاهر می‌شوند بارگذاری می‌کند." + +msgid "Integers" +msgstr "اعداد صحیح" + +msgid "TOML recommends supporting integers in ``range(−2**63, 2**63)``." +msgstr "TOML پشتیبانی از اعداد صحیح در ``range(−2**63, 2**63)`` را توصیه می‌کند." + +msgid ":mod:`!tomllib` uses :ref:`Python's limit on integer string conversion ` (4300 digits by default)." +msgstr ":mod:`!tomllib` از :ref:`محدودیت پایتون در تبدیل رشته‌ی عدد صحیح ` (به‌طور پیش‌فرض 4300 رقم) استفاده می‌کند." + +msgid "Floats" +msgstr "اعداد اعشاری" + +msgid "TOML recommends supporting at least IEEE 754 binary64 values, which means that numbers with more than 15 significant decimal digits are likely to be rounded." +msgstr "TOML توصیه می‌کند که حداقل از مقادیر binary64 استاندارد IEEE 754 پشتیبانی شود، به این معنی که اعدادی با بیش از 15 رقم اعشار معنادار احتمالاً گرد خواهند شد." + +msgid ":mod:`!tomllib` uses Python :class:`float` by default; on many common platforms this is the recommended binary64. See :data:`sys.float_info` for details." +msgstr ":mod:`!tomllib` به‌طور پیش‌فرض از :class:`float` پایتون استفاده می‌کند؛ در بسیاری از پلتفرم‌های رایج، این همان مقدار binary64 توصیه شده است. برای جزئیات، :data:`sys.float_info` را ببینید." + +msgid "Nesting limit" +msgstr "حد تو در تو بودن" + +msgid "TOML 1.1.0 does not recommend a limit on how deeply arrays and tables may be nested inside one another. (A limit of 100 has been proposed for a future version of TOML.)" +msgstr "TOML ۱.۱.۰ محدودیتی برای میزان تو در تو بودن آرایه‌ها و جدول‌ها درون یکدیگر پیشنهاد نمی‌کند. (محدودیتی برابر با ۱۰۰ برای نسخه‌ی آینده‌ی TOML پیشنهاد شده است.)" + +msgid "In :mod:`!tomllib`, the nesting level is mainly limited by Python's :func:`recursion limit `. Note that code that calls :mod:`!tomllib` may contribute to the limit." +msgstr "در :mod:`!tomllib`، سطح تو در تو بودن عمدتاً توسط :func:`recursion limit ` پایتون محدود می‌شود. توجه داشته باشید که کدهایی که :mod:`!tomllib` را فراخوانی می‌کنند ممکن است در این محدودیت نقش داشته باشند." diff --git a/library/turtle.po b/library/turtle.po index c6096efd..b8310c41 100644 --- a/library/turtle.po +++ b/library/turtle.po @@ -8,12 +8,14 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# mahdyaralipor , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-29 04:09+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-21 13:27+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -75,8 +77,8 @@ msgstr "در یک پوسته‌ی پایتون، همه‌ی اشیای ماژو msgid "from turtle import *" msgstr "from turtle import *" -msgid "If you run into a ``No module named '_tkinter'`` error, you'll have to install the :mod:`Tk interface package ` on your system." -msgstr "اگر با خطای ``No module named '_tkinter'`` مواجه شدید، باید :mod:`بسته‌ی رابط Tk ` را روی سیستم خود نصب کنید." +msgid "If you run into a ``Standard library module '_tkinter' was not found`` error, you'll have to install the :mod:`Tk interface package ` on your system." +msgstr "اگر با خطای ``Standard library module '_tkinter' was not found`` مواجه شدید، باید :mod:`بسته رابط کاربری Tk ` را روی سیستم خود نصب کنید." msgid "Basic drawing" msgstr "ترسیم مقدماتی" diff --git a/library/types.po b/library/types.po index 6ac3ed5d..3b5b8750 100644 --- a/library/types.po +++ b/library/types.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 13:17+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -282,6 +283,21 @@ msgstr "برای جزئیات ویژگی‌ها و عملیات در دسترس msgid "The type of :ref:`frame objects ` such as found in :attr:`tb.tb_frame ` if ``tb`` is a traceback object." msgstr "نوع :ref:`اشیاء فریم `، مانند آنچه در :attr:`tb.tb_frame ` یافت می‌شود، اگر ``tb`` یک شیء ردگیری پشته باشد." +msgid "The type of frame locals proxy objects, as found on the :attr:`frame.f_locals` attribute." +msgstr "نوع شیءهای پروکسی محلی قاب، که روی ویژگی :attr:`frame.f_locals` یافت می‌شوند." + +msgid ":pep:`667`" +msgstr ":pep:`667`" + +msgid "The type of lazy import proxy objects. These objects are created when a module is lazily imported and serve as placeholders until the module is actually accessed. This type can be used to detect lazy imports programmatically." +msgstr "نوع شیءهای پروکسی ایمپورت تنبل. این شیءها زمانی ایجاد می‌شوند که یک ماژول به صورت تنبل ایمپورت شود و تا زمانی که واقعاً به ماژول دسترسی پیدا شود، به عنوان جای‌نگهدار عمل می‌کنند. این نوع می‌تواند برای شناسایی برنامه‌نویسی ایمپورت‌های تنبل استفاده شود." + +msgid ":pep:`810`" +msgstr ":pep:`810`" + +msgid "Reify the lazy import and return the \"real\" object being imported." +msgstr "реализовать (مفهوم‌سازی/متحقق‌سازی) ایمپورت تنبل و بازگرداندن شیء «واقعی» که در حال ایمپورت شدن است." + msgid "The type of objects defined in extension modules with ``PyGetSetDef``, such as :attr:`FrameType.f_locals ` or ``array.array.typecode``. This type is used as descriptor for object attributes; it has the same purpose as the :class:`property` type, but for classes defined in extension modules." msgstr "نوع اشیاء تعریف‌شده در ماژول‌های توسعه با ``PyGetSetDef``، مانند :attr:`FrameType.f_locals ` یا ``array.array.typecode``. این نوع به‌عنوان توصیف‌گر برای ویژگی‌های شیء استفاده می‌شود؛ همان هدفی را دارد که نوع :class:`property` دارد، اما برای کلاس‌های تعریف‌شده در ماژول‌های توسعه." diff --git a/library/typing.po b/library/typing.po index f4710f9e..bb0d40f2 100644 --- a/library/typing.po +++ b/library/typing.po @@ -7,13 +7,14 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" -"PO-Revision-Date: 2026-09-12 13:34+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 20:27+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" @@ -2029,6 +2030,37 @@ msgstr ":pep:`593` - حاشیه‌نویسی‌های انعطاف‌پذیر ب msgid "The PEP introducing ``Annotated`` to the standard library." msgstr "PEP معرفی‌کننده ``Annotated`` به کتابخانه استاندارد." +msgid "A special form representing the value that results from evaluating a type expression." +msgstr "یک فرم خاص که نمایانگر مقداری است که از ارزیابی یک عبارت نوع به دست می‌آید." + +msgid "This value encodes the information supplied in the type expression, and it represents the type described by that type expression." +msgstr "این مقدار اطلاعات ارائه‌شده در عبارت نوع را کدگذاری می‌کند و نمایانگر نوع توصیف‌شده توسط آن عبارت نوع است." + +msgid "When used in a type expression, ``TypeForm`` describes a set of type form objects. It accepts a single type argument, which must be a valid type expression. ``TypeForm[T]`` describes the set of all type form objects that represent the type ``T`` or types assignable to ``T``." +msgstr "هنگنگامی که در یک عبارت نوع استفاده می‌شود، ``TypeForm`` مجموعه‌ای از شیءهای فرم نوع را توصیف می‌کند. این فرم یک آرگومان نوع منفرد را می‌پذیرد که باید یک عبارت نوع معتبر باشد. ``TypeForm[T]`` مجموعه‌ای از تمام شیءهای فرم نوع را توصیف می‌کند که نمایانگر نوع ``T`` یا انواع قابل انتساب به ``T`` هستند." + +msgid "``TypeForm(obj)`` simply returns ``obj`` unchanged. This is useful for explicitly marking a value as a type form for static type checkers." +msgstr "``TypeForm(obj)`` به سادگی ``obj`` را بدون تغییر برمی‌گرداند. این کار برای نشانه‌گذاری صریح یک مقدار به عنوان فرم نوع برای بررسی‌کننده‌های ایستای نوع مفید است." + +msgid "Example::" +msgstr "مثال::" + +msgid "" +"from typing import Any, TypeForm\n" +"\n" +"def cast[T](typ: TypeForm[T], value: Any) -> T: ...\n" +"\n" +"reveal_type(cast(int, \"x\")) # Revealed type is \"int\"" +msgstr "" +"from typing import Any, TypeForm\n" +"\n" +"def cast[T](typ: TypeForm[T], value: Any) -> T: ...\n" +"\n" +"reveal_type(cast(int, \"x\")) # Revealed type is \"int\"" + +msgid "See :pep:`747` for details." +msgstr "برای جزئیات بیشتر به :pep:`747` مراجعه کنید." + msgid "Special typing construct for marking user-defined type predicate functions." msgstr "ساختار خاص نوع‌دهی برای علامت‌گذاری توابع محمول نوع تعریف‌شده توسط کاربر." @@ -2666,6 +2698,15 @@ msgstr "برای جزئیات بیشتر درباره تاپل‌های متغی msgid "The name of the type variable tuple." msgstr "نام تاپل متغیر نوع." +msgid "Whether the type variable tuple has been explicitly marked as covariant." +msgstr "اینکه آیا تاپل متغیر نوع صراحتاً به عنوان هم‌وردا علامت‌گذاری شده است یا خیر." + +msgid "Whether the type variable tuple has been explicitly marked as contravariant." +msgstr "اینکه آیا تاپل متغیر نوع صراحتاً به عنوان پادوردا علامت‌گذاری شده است یا خیر." + +msgid "Whether the type variable tuple's variance should be inferred by type checkers." +msgstr "اینکه آیا واریانس تاپل متغیر نوع باید توسط بررسی‌کننده‌های نوع استنتاج شود یا خیر." + msgid "The default value of the type variable tuple, or :data:`typing.NoDefault` if it has no default." msgstr "مقدار پیش‌فرض تاپل متغیر نوع، یا :data:`typing.NoDefault` اگر پیش‌فرضی نداشته باشد." @@ -2675,9 +2716,15 @@ msgstr "یک :term:`evaluate function` متناظر با ویژگی :attr:`~Type msgid "Return whether or not the type variable tuple has a default value. This is equivalent to checking whether :attr:`__default__` is not the :data:`typing.NoDefault` singleton, except that it does not force evaluation of the :ref:`lazily evaluated ` default value." msgstr "بازگشت می‌دهد که آیا تاپل متغیر نوع دارای مقدار پیش‌فرض است یا خیر. این معادل بررسی این است که آیا :attr:`__default__` تک‌نمونه‌ی :data:`typing.NoDefault` نیست یا خیر، با این تفاوت که ارزیابی مقدار پیش‌فرض :ref:`به‌صورت تنبل ارزیابی‌شده ` را اجباری نمی‌کند." +msgid "Type variable tuples created with ``covariant=True`` or ``contravariant=True`` can be used to declare covariant or contravariant generic types. The ``bound`` argument is also accepted, similar to :class:`TypeVar`, but its actual semantics are yet to be decided." +msgstr "تاپل‌های متغیر نوع ایجادشده با ``covariant=True`` یا ``contravariant=True`` را می‌توان برای اعلام انواع عام هم‌وردا یا پادوردا استفاده کرد. آرگومان ``bound`` نیز مشابه :class:`TypeVar` پذیرفته می‌شود، اما معناشناسی واقعی آن هنوز مشخص نشده است." + msgid "Type variable tuples can now be declared using the :ref:`type parameter ` syntax introduced by :pep:`695`." msgstr "اکنون می‌توان تاپل‌های متغیر نوع را با استفاده از سینتکس :ref:`پارامتر نوع ` که در :pep:`695` معرفی‌شده است، اعلام کرد." +msgid "Added support for the ``bound``, ``covariant``, ``contravariant``, and ``infer_variance`` parameters." +msgstr "پشتیبانی از پارامترهای ``bound``، ``covariant``، ``contravariant`` و ``infer_variance`` اضافه شد." + msgid "Parameter specification variable. A specialized version of :ref:`type variables `." msgstr "متغیر مشخصات پارامتر. نسخه‌ای تخصصی از :ref:`متغیرهای نوع `." @@ -2745,6 +2792,15 @@ msgstr "از آن‌جا که ``ParamSpec`` هم پارامترهای جایگا msgid "The name of the parameter specification." msgstr "نام مشخصه‌ی پارامتر." +msgid "Whether the parameter specification has been explicitly marked as covariant." +msgstr "اینکه آیا مشخصات پارامتر صراحتاً به عنوان هم‌وردا علامت‌گذاری شده است یا خیر." + +msgid "Whether the parameter specification has been explicitly marked as contravariant." +msgstr "اینکه آیا مشخصات پارامتر صراحتاً به عنوان پادوردا علامت‌گذاری شده است یا خیر." + +msgid "Whether the parameter specification's variance should be inferred by type checkers." +msgstr "اینکه آیا واریانس مشخصات پارامتر باید توسط بررسی‌کننده‌های نوع استنتاج شود یا خیر." + msgid "The default value of the parameter specification, or :data:`typing.NoDefault` if it has no default." msgstr "مقدار پیش‌فرض مشخصات پارامتر، یا :data:`typing.NoDefault` اگر پیش‌فرضی نداشته باشد." @@ -2811,6 +2867,22 @@ msgstr "" ">>> Alias.__name__\n" "'Alias'" +msgid "The :term:`qualified name` of the type alias:" +msgstr ":term:`نام کامل ` مستعار نوع:" + +msgid "" +">>> class Class:\n" +"... type Alias = int\n" +"...\n" +">>> Class.Alias.__qualname__\n" +"'Class.Alias'" +msgstr "" +">>> class Class:\n" +"... type Alias = int\n" +"...\n" +">>> Class.Alias.__qualname__\n" +"'Class.Alias'" + msgid "The name of the module in which the type alias was defined::" msgstr "نام ماژولی که نام مستعار نوع در آن تعریف شده است::" @@ -2823,6 +2895,12 @@ msgstr "" ">>> Alias.__module__\n" "'__main__'" +msgid "This attribute is writable." +msgstr "این ویژگی قابل نوشتن است." + +msgid "The attribute is now writable." +msgstr "این ویژگی اکنون قابل نوشتن است." + msgid "The type parameters of the type alias, or an empty tuple if the alias is not generic:" msgstr "پارامترهای نوعِ نام مستعار نوع، یا یک تاپل خالی در صورتی که نام مستعار عام نباشد:" @@ -3042,12 +3120,6 @@ msgstr "پشتیبانی از namedtuples عام افزوده شد." msgid "Using :func:`super` (and the ``__class__`` :term:`closure variable`) in methods of ``NamedTuple`` subclasses is unsupported and causes a :class:`TypeError`." msgstr "استفاده از :func:`super` (و :term:`متغیر بستار ` با نام ``__class__``) در متدهای زیرکلاس‌های ``NamedTuple`` پشتیبانی نمی‌شود و منجر به :class:`TypeError` می‌شود." -msgid "The undocumented keyword argument syntax for creating NamedTuple classes (``NT = NamedTuple(\"NT\", x=int)``) is deprecated, and will be disallowed in 3.15. Use the class-based syntax or the functional syntax instead." -msgstr "سینتکس آرگومان کلیدواژه‌ای بدون مستند برای ایجاد کلاس‌های NamedTuple (``NT = NamedTuple(\"NT\", x=int)``) منسوخ شده است و در 3.15 غیرمجاز خواهد شد. به‌جای آن، از سینتکس مبتنی بر کلاس یا سینتکس تابعی استفاده کنید." - -msgid "When using the functional syntax to create a NamedTuple class, failing to pass a value to the 'fields' parameter (``NT = NamedTuple(\"NT\")``) is deprecated. Passing ``None`` to the 'fields' parameter (``NT = NamedTuple(\"NT\", None)``) is also deprecated. Both will be disallowed in Python 3.15. To create a NamedTuple class with 0 fields, use ``class NT(NamedTuple): pass`` or ``NT = NamedTuple(\"NT\", [])``." -msgstr "هنگام استفاده از سینتکس تابعی برای ایجاد یک کلاس NamedTuple، ارسال نکردن مقدار به پارامتر 'fields' (``NT = NamedTuple(\"NT\")``) منسوخ است. ارسال ``None`` به پارامتر 'fields' (``NT = NamedTuple(\"NT\", None)``) نیز منسوخ است. هر دو مورد در Python 3.15 غیرمجاز خواهند شد. برای ایجاد یک کلاس NamedTuple با ۰ فیلد، از ``class NT(NamedTuple): pass`` یا ``NT = NamedTuple(\"NT\", [])`` استفاده کنید." - msgid "Helper class to create low-overhead :ref:`distinct types `." msgstr "کلاس کمکی برای ایجاد :ref:`انواع متمایز ` با سربار کم." @@ -3141,6 +3213,9 @@ msgstr "" " def meth(self) -> T:\n" " ..." +msgid "It is deprecated to call :func:`isinstance` and :func:`issubclass` checks on protocol classes that were not explicitly decorated with :func:`!runtime_checkable` but that inherit from a runtime-checkable protocol class. This will throw a :exc:`TypeError` in Python 3.20." +msgstr "انجام بررسی‌های :func:`isinstance` و :func:`issubclass` روی کلاس‌های پروتکلی که صریحاً با :func:`!runtime_checkable` تزئین نشده‌اند اما از یک کلاس پروتکل دارای قابلیت بررسی در ران‌تایم ارث‌بری می‌کنند، منسوخ شده است. این کار در پایتون ۳.۲۰ یک :exc:`TypeError` پرتاب خواهد کرد." + msgid "Mark a protocol class as a runtime protocol." msgstr "یک کلاس پروتکل را به‌عنوان پروتکل ران‌تایم علامت‌گذاری می‌کند." @@ -3174,6 +3249,28 @@ msgstr "" "import threading\n" "assert isinstance(threading.Thread(name='Bob'), Named)" +msgid "Runtime checkability of protocols is not inherited. A subclass of a runtime-checkable protocol is only runtime-checkable if it is explicitly marked as such, regardless of class hierarchy::" +msgstr "قابلیت بررسی در ران‌تایم پروتکل‌ها ارث‌بری نمی‌شود. زیرکلاس یک پروتکل با قابلیت بررسی در ران‌تایم تنها در صورتی قابلیت بررسی در ران‌تایم را دارد که صریحاً به همین شکل علامت‌گذاری شده باشد، صرف‌نظر از سلسله‌مراتب کلاس::" + +msgid "" +"@runtime_checkable\n" +"class Iterable(Protocol):\n" +" def __iter__(self): ...\n" +"\n" +"# Without @runtime_checkable, Reversible would no longer be runtime-checkable.\n" +"@runtime_checkable\n" +"class Reversible(Iterable, Protocol):\n" +" def __reversed__(self): ..." +msgstr "" +"@runtime_checkable\n" +"class Iterable(Protocol):\n" +" def __iter__(self): ...\n" +"\n" +"# Without @runtime_checkable, Reversible would no longer be runtime-checkable.\n" +"@runtime_checkable\n" +"class Reversible(Iterable, Protocol):\n" +" def __reversed__(self): ..." + msgid "This decorator raises :exc:`TypeError` when applied to a non-protocol class." msgstr "این دکوراتور هنگام اعمال روی یک کلاس غیرپروتکلی، استثنای :exc:`TypeError` را پرتاب می‌کند." @@ -3346,6 +3443,46 @@ msgstr "" " y: int\n" " z: int" +msgid "By default, a ``TypedDict`` is open, meaning that it may contain additional keys at runtime beyond those defined in the class body. The *closed* class argument can be used to control this; if ``closed=True``, the ``TypedDict`` cannot contain additional keys." +msgstr "به طور پیش‌فرض، یک ``TypedDict`` باز است، به این معنی که ممکن است حاوی کلیدهای اضافی در ران‌تایم فراتر از کلیدهای تعریف‌شده در بده‌ی کلاس باشد. آرگومان کلاس *closed* می‌تواند برای کنترل این موضوع استفاده شود؛ اگر ``closed=True`` باشد، ``TypedDict`` نمی‌تواند حاوی کلیدهای اضافی باشد." + +msgid "" +"class ClosedPoint(TypedDict, closed=True):\n" +" x: int\n" +" y: int\n" +"\n" +"class ClosedPoint3D(ClosedPoint): # type checker error: cannot add keys to a closed TypedDict\n" +" z: int" +msgstr "" +"class ClosedPoint(TypedDict, closed=True):\n" +" x: int\n" +" y: int\n" +"\n" +"class ClosedPoint3D(ClosedPoint): # type checker error: cannot add keys to a closed TypedDict\n" +" z: int" + +msgid "Setting ``closed=False`` explicitly requests the default open behavior. If the argument is not passed, this state is inherited from the parent class." +msgstr "تنظیم صریح ``closed=False`` رفتار پیش‌فرضِ باز را درخواست می‌کند. اگر آرگومان ارسال نشود، این وضعیت از کلاس والد به ارث برده می‌شود." + +msgid "In addition to being open or closed, a ``TypedDict`` can also be configured to have extra items. If the *extra_items* class argument is set to a type, the ``TypedDict`` can contain arbitrary additional keys, but the values of those keys must be of the specified type." +msgstr "علاوه بر باز یا بسته بودن، یک ``TypedDict`` را می‌توان به گونه‌ای پیکربندی کرد که آیتم‌های اضافی داشته باشد. اگر آرگومان کلاس *extra_items* روی یک نوع تنظیم شود، ``TypedDict`` می‌تواند کلیدهای اضافی دلخواهی را شامل شود، اما مقادیر آن کلیدها باید از نوع مشخص‌شده باشند." + +msgid "" +"class ExtraItemsPoint(TypedDict, extra_items=int):\n" +" x: int\n" +" y: int\n" +"\n" +"point: ExtraItemsPoint = {'x': 1, 'y': 2, 'anything': 3} # OK" +msgstr "" +"class ExtraItemsPoint(TypedDict, extra_items=int):\n" +" x: int\n" +" y: int\n" +"\n" +"point: ExtraItemsPoint = {'x': 1, 'y': 2, 'anything': 3} # OK" + +msgid "The *extra_items* argument is also inherited through subclassing. It is unset by default, and it may not be used together with the *closed* argument." +msgstr "آرگومان *extra_items* همچنین از طریق زیرکلاس‌سازی به ارث برده می‌شود. این آرگومان به طور پیش‌فرض تنظیم نشده است و نمی‌توان آن را به همراه آرگومان *closed* استفاده کرد." + msgid "A ``TypedDict`` cannot inherit from a non-\\ ``TypedDict`` class, except for :class:`Generic`. For example::" msgstr "یک ``TypedDict`` نمی‌تواند از کلاسی غیر ``TypedDict`` ارث‌بری کند، به‌جز :class:`Generic`. برای مثال::" @@ -3471,15 +3608,18 @@ msgstr "" msgid "If ``from __future__ import annotations`` is used or if annotations are given as strings, annotations are not evaluated when the ``TypedDict`` is defined. Therefore, the runtime introspection that ``__required_keys__`` and ``__optional_keys__`` rely on may not work properly, and the values of the attributes may be incorrect." msgstr "اگر از ``from __future__ import annotations`` استفاده شود یا اگر حاشیه‌نویسی‌ها به‌صورت رشته ارائه شوند، حاشیه‌نویسی‌ها هنگام تعریف ``TypedDict`` ارزیابی نمی‌شوند. بنابراین، ممکن است درون‌نگری ران‌تایمی که ``__required_keys__`` و ``__optional_keys__`` به آن متکی هستند، به‌درستی کار نکند و مقادیر ویژگی‌ها نادرست باشند." -msgid "Support for :data:`ReadOnly` is reflected in the following attributes:" -msgstr "پشتیبانی از :data:`ReadOnly` در ویژگی‌های زیر بازتاب یافته است:" - msgid "A :class:`frozenset` containing the names of all read-only keys. Keys are read-only if they carry the :data:`ReadOnly` qualifier." msgstr "یک :class:`frozenset` شامل نام تمام کلیدهای فقط‌خواندنی. کلیدها در صورتی فقط‌خواندنی هستند که دارای مشخص‌کننده (qualifier) :data:`ReadOnly` باشند." msgid "A :class:`frozenset` containing the names of all mutable keys. Keys are mutable if they do not carry the :data:`ReadOnly` qualifier." msgstr "یک :class:`frozenset` حاوی نام تمام کلیدهای تغییرپذیر. کلیدها در صورتی تغییرپذیر هستند که فاقد مشخص‌کننده :data:`ReadOnly` باشند." +msgid "The value of the *closed* class argument. It can be ``True``, ``False``, or :data:`None`." +msgstr "مقدار آرگومان کلاس *closed*. این مقدار می‌تواند ``True``، ``False`` یا :data:`None` باشد." + +msgid "The value of the *extra_items* class argument. It can be a valid type or :data:`NoExtraItems`." +msgstr "مقدار آرگومان کلاس *extra_items*. این مقدار می‌تواند یک نوع معتبر یا :data:`NoExtraItems` باشد." + msgid "See the `TypedDict `_ section in the typing documentation for more examples and detailed rules." msgstr "برای مثال‌های بیشتر و قوانین دقیق، بخش `TypedDict `_ را در مستندات typing ببینید." @@ -3495,11 +3635,11 @@ msgstr "پشتیبانی از ``TypedDict``\\ های عام افزوده شد." msgid "Removed support for the keyword-argument method of creating ``TypedDict``\\ s." msgstr "پشتیبانی از روش آرگومان کلیدواژه‌ای برای ایجاد ``TypedDict``\\ s حذف شد." -msgid "Support for the :data:`ReadOnly` qualifier was added." -msgstr "پشتیبانی از مشخص‌کننده (qualifier) :data:`ReadOnly` افزوده شد." +msgid "Support for the :data:`ReadOnly` qualifier was added. See :pep:`705`." +msgstr "پشتیبانی از مشخص‌کننده :data:`ReadOnly` اضافه شد. به :pep:`705` مراجعه کنید." -msgid "When using the functional syntax to create a TypedDict class, failing to pass a value to the 'fields' parameter (``TD = TypedDict(\"TD\")``) is deprecated. Passing ``None`` to the 'fields' parameter (``TD = TypedDict(\"TD\", None)``) is also deprecated. Both will be disallowed in Python 3.15. To create a TypedDict class with 0 fields, use ``class TD(TypedDict): pass`` or ``TD = TypedDict(\"TD\", {})``." -msgstr "هنگام استفاده از سینتکس تابعی برای ایجاد یک کلاس TypedDict، عدم ارسال مقدار به پارامتر 'fields' (``TD = TypedDict(\"TD\")``) منسوخ شده است. ارسال ``None`` به پارامتر 'fields' (``TD = TypedDict(\"TD\", None)``) نیز منسوخ شده است. هر دو در Python 3.15 غیرمجاز خواهند شد. برای ایجاد یک کلاس TypedDict با ۰ فیلد، از ``class TD(TypedDict): pass`` یا ``TD = TypedDict(\"TD\", {})`` استفاده کنید." +msgid "Support for the *closed* and *extra_items* class arguments was added. See :pep:`728`." +msgstr "پشتیبانی از آرگومان‌های کلاس *closed* و *extra_items* اضافه شد. نگاه کنید به :pep:`728`." msgid "Protocols" msgstr "پروتکل‌ها" @@ -3606,9 +3746,6 @@ msgstr "" msgid "Ask a static type checker to confirm that a line of code is unreachable." msgstr "از یک بررسی‌گر نوع ایستا (static type checker) بخواهید تأیید کند که یک خط کد غیرقابل‌دسترس است." -msgid "Example::" -msgstr "مثال::" - msgid "" "def int_or_str(arg: int | str) -> None:\n" " match arg:\n" @@ -3934,15 +4071,6 @@ msgstr "این به‌عنوان یک :term:`دکوراتور، آراینده < msgid "``@no_type_check`` mutates the decorated object in place." msgstr "``@no_type_check`` شیء دکوریت‌شده را به‌صورت درجا تغییر می‌دهد." -msgid "Decorator to give another decorator the :func:`no_type_check` effect." -msgstr "دکوراتوری که به دکوراتوری دیگر اثر :func:`no_type_check` می‌دهد." - -msgid "This wraps the decorator with something that wraps the decorated function in :func:`no_type_check`." -msgstr "این، دکوراتور را با چیزی می‌پوشاند که تابع دکوریت‌شده را در :func:`no_type_check` می‌پوشاند." - -msgid "No type checker ever added support for ``@no_type_check_decorator``. It is therefore deprecated, and will be removed in Python 3.15." -msgstr "تاکنون هیچ بررسی‌گر نوعی پشتیبانی از ``@no_type_check_decorator`` را اضافه نکرده است. بنابراین منسوخ شده است و در پایتون 3.15 حذف خواهد شد." - msgid "Decorator to indicate that a method in a subclass is intended to override a method or attribute in a superclass." msgstr "دکوراتوری برای نشان دادن این که یک متد در زیرکلاس برای بازنویسی یک متد یا ویژگی در ابرکلاس در نظر گرفته شده است." @@ -3985,6 +4113,38 @@ msgstr "دکوراتور تلاش می‌کند ویژگی ``__override__`` را msgid "See :pep:`698` for more details." msgstr "برای جزئیات بیشتر به :pep:`698` مراجعه کنید." +msgid "Decorator to mark a class as a disjoint base." +msgstr "دکوراتوری برای علامت‌گذاری یک کلاس به عنوان پایه مجزا." + +msgid "Type checkers do not allow child classes of a disjoint base ``C`` to inherit from other disjoint bases that are not parent or child classes of ``C``." +msgstr "بررسی‌کننده‌های نوع اجازه نمی‌دهند که کلاس‌های فرزند یک پایه‌ی مجزا ``C`` از پایه‌های مجزای دیگری که کلاس‌های والد یا فرزند ``C`` نیستند، ارث‌بری کنند." + +msgid "" +"@disjoint_base\n" +"class Disjoint1: pass\n" +"\n" +"@disjoint_base\n" +"class Disjoint2: pass\n" +"\n" +"class Disjoint3(Disjoint1, Disjoint2): pass # Type checker error" +msgstr "" +"@disjoint_base\n" +"class Disjoint1: pass\n" +"\n" +"@disjoint_base\n" +"class Disjoint2: pass\n" +"\n" +"class Disjoint3(Disjoint1, Disjoint2): pass # Type checker error" + +msgid "Type checkers can use knowledge of disjoint bases to detect unreachable code and determine when two types can overlap." +msgstr "بررسی‌کننده‌های نوع می‌توانند از دانشِ پایه‌های مجزا برای تشخیص کد دست‌نیافتنی و تعیین زمان همپوشانی دو نوع استفاده کنند." + +msgid "The corresponding runtime concept is a solid base (see :ref:`multiple-inheritance`). Classes that are solid bases at runtime can be marked with ``@disjoint_base`` in stub files. Users may also mark other classes as disjoint bases to indicate to type checkers that multiple inheritance with other disjoint bases should not be allowed." +msgstr "مفهوم متناظر در ران‌تایم، پایه‌ی صلب است (نگاه کنید به :ref:`multiple-inheritance`). کلاس‌هایی که در ران‌تایم پایه‌های صلبی هستند را می‌توان با ``@disjoint_base`` در پرونده‌های stub علامت‌گذاری کرد. کاربران همچنین ممکن است کلاس‌های دیگر را به عنوان پایه‌های مجزا علامت‌گذاری کنند تا به بررسی‌کننده‌های نوع نشان دهند که ارث‌بری چندگانه با سایر پایه‌های مجزا نباید مجاز باشد." + +msgid "Note that the concept of a solid base is a CPython implementation detail, and the exact set of standard library classes that are disjoint bases at runtime may change in future versions of Python." +msgstr "توجه داشته باشید که مفهوم پایه‌ی صلب یک جزئیات پیاده‌سازی سی‌پایتون است و مجموعه دقیق کلاس‌های کتابخانه‌ی استاندارد که در ران‌تایم پایه‌های مجزایی هستند ممکن است در نسخه‌های آینده‌ی پایتون تغییر کند." + msgid "Decorator to mark a class or function as unavailable at runtime." msgstr "دکوراتوری برای علامت‌گذاری یک کلاس یا تابع به‌عنوان غیرقابل‌دسترس در ران‌تایم." @@ -4231,6 +4391,26 @@ msgstr "" ">>> S.__default__ is None\n" "True" +msgid "A :class:`sentinel` object used to indicate that a :class:`TypedDict` does not have the *extra_items* class argument." +msgstr "یک شیء :class:`sentinel` که برای نشان دادن این استفاده می‌شود که یک :class:`TypedDict` آرگومان کلاس *extra_items* را ندارد." + +msgid "" +">>> from typing import TypedDict, NoExtraItems\n" +">>> class Point(TypedDict):\n" +"... x: int\n" +"... y: int\n" +"...\n" +">>> Point.__extra_items__ is NoExtraItems\n" +"True" +msgstr "" +">>> from typing import TypedDict, NoExtraItems\n" +">>> class Point(TypedDict):\n" +"... x: int\n" +"... y: int\n" +"...\n" +">>> Point.__extra_items__ is NoExtraItems\n" +"True" + msgid "Constant" msgstr "ثابت" @@ -4361,8 +4541,8 @@ msgstr ":class:`collections.deque` اکنون از زیرنویسی با ``[]`` msgid "Aliases to other concrete types" msgstr "نام‌های مستعار برای سایر انواع مشخص" -msgid "Deprecated aliases corresponding to the return types from :func:`re.compile` and :func:`re.match`." -msgstr "نام‌های مستعار منسوخ‌شده‌ی متناظر با انواع بازگشتی از :func:`re.compile` و :func:`re.match`." +msgid "Deprecated aliases corresponding to the return types from :func:`re.compile` and :func:`re.search`." +msgstr "نام‌های مستعار منسوخ‌شده مربوط به انواع بازگشتی از :func:`re.compile` و :func:`re.search`." msgid "These types (and the corresponding functions) are generic over :data:`AnyStr`. ``Pattern`` can be specialised as ``Pattern[str]`` or ``Pattern[bytes]``; ``Match`` can be specialised as ``Match[str]`` or ``Match[bytes]``." msgstr "این انواع (و توابع متناظر) نسبت به :data:`AnyStr` عام هستند. ``Pattern`` می‌تواند به‌صورت ``Pattern[str]`` یا ``Pattern[bytes]`` تخصصی شود؛ ``Match`` می‌تواند به‌صورت ``Match[str]`` یا ``Match[bytes]`` تخصصی شود." @@ -4665,21 +4845,12 @@ msgstr ":data:`typing.TypeAlias`" msgid ":pep:`695`" msgstr ":pep:`695`" -msgid ":func:`@typing.no_type_check_decorator `" -msgstr ":func:`@typing.no_type_check_decorator `" +msgid ":data:`typing.AnyStr`" +msgstr ":data:`typing.AnyStr`" msgid "3.13" msgstr "3.13" -msgid "3.15" -msgstr "3.15" - -msgid ":gh:`106309`" -msgstr ":gh:`106309`" - -msgid ":data:`typing.AnyStr`" -msgstr ":data:`typing.AnyStr`" - msgid "3.18" msgstr "3.18" @@ -4691,3 +4862,33 @@ msgstr "..." msgid "ellipsis literal" msgstr "لفظی سه‌نقطه (ellipsis)" + +#~ msgid "The undocumented keyword argument syntax for creating NamedTuple classes (``NT = NamedTuple(\"NT\", x=int)``) is deprecated, and will be disallowed in 3.15. Use the class-based syntax or the functional syntax instead." +#~ msgstr "سینتکس آرگومان کلیدواژه‌ای بدون مستند برای ایجاد کلاس‌های NamedTuple (``NT = NamedTuple(\"NT\", x=int)``) منسوخ شده است و در 3.15 غیرمجاز خواهد شد. به‌جای آن، از سینتکس مبتنی بر کلاس یا سینتکس تابعی استفاده کنید." + +#~ msgid "When using the functional syntax to create a NamedTuple class, failing to pass a value to the 'fields' parameter (``NT = NamedTuple(\"NT\")``) is deprecated. Passing ``None`` to the 'fields' parameter (``NT = NamedTuple(\"NT\", None)``) is also deprecated. Both will be disallowed in Python 3.15. To create a NamedTuple class with 0 fields, use ``class NT(NamedTuple): pass`` or ``NT = NamedTuple(\"NT\", [])``." +#~ msgstr "هنگام استفاده از سینتکس تابعی برای ایجاد یک کلاس NamedTuple، ارسال نکردن مقدار به پارامتر 'fields' (``NT = NamedTuple(\"NT\")``) منسوخ است. ارسال ``None`` به پارامتر 'fields' (``NT = NamedTuple(\"NT\", None)``) نیز منسوخ است. هر دو مورد در Python 3.15 غیرمجاز خواهند شد. برای ایجاد یک کلاس NamedTuple با ۰ فیلد، از ``class NT(NamedTuple): pass`` یا ``NT = NamedTuple(\"NT\", [])`` استفاده کنید." + +#~ msgid "Support for :data:`ReadOnly` is reflected in the following attributes:" +#~ msgstr "پشتیبانی از :data:`ReadOnly` در ویژگی‌های زیر بازتاب یافته است:" + +#~ msgid "When using the functional syntax to create a TypedDict class, failing to pass a value to the 'fields' parameter (``TD = TypedDict(\"TD\")``) is deprecated. Passing ``None`` to the 'fields' parameter (``TD = TypedDict(\"TD\", None)``) is also deprecated. Both will be disallowed in Python 3.15. To create a TypedDict class with 0 fields, use ``class TD(TypedDict): pass`` or ``TD = TypedDict(\"TD\", {})``." +#~ msgstr "هنگام استفاده از سینتکس تابعی برای ایجاد یک کلاس TypedDict، عدم ارسال مقدار به پارامتر 'fields' (``TD = TypedDict(\"TD\")``) منسوخ شده است. ارسال ``None`` به پارامتر 'fields' (``TD = TypedDict(\"TD\", None)``) نیز منسوخ شده است. هر دو در Python 3.15 غیرمجاز خواهند شد. برای ایجاد یک کلاس TypedDict با ۰ فیلد، از ``class TD(TypedDict): pass`` یا ``TD = TypedDict(\"TD\", {})`` استفاده کنید." + +#~ msgid "Decorator to give another decorator the :func:`no_type_check` effect." +#~ msgstr "دکوراتوری که به دکوراتوری دیگر اثر :func:`no_type_check` می‌دهد." + +#~ msgid "This wraps the decorator with something that wraps the decorated function in :func:`no_type_check`." +#~ msgstr "این، دکوراتور را با چیزی می‌پوشاند که تابع دکوریت‌شده را در :func:`no_type_check` می‌پوشاند." + +#~ msgid "No type checker ever added support for ``@no_type_check_decorator``. It is therefore deprecated, and will be removed in Python 3.15." +#~ msgstr "تاکنون هیچ بررسی‌گر نوعی پشتیبانی از ``@no_type_check_decorator`` را اضافه نکرده است. بنابراین منسوخ شده است و در پایتون 3.15 حذف خواهد شد." + +#~ msgid ":func:`@typing.no_type_check_decorator `" +#~ msgstr ":func:`@typing.no_type_check_decorator `" + +#~ msgid "3.15" +#~ msgstr "3.15" + +#~ msgid ":gh:`106309`" +#~ msgstr ":gh:`106309`" diff --git a/library/unicodedata.po b/library/unicodedata.po index c76b5655..8633ded6 100644 --- a/library/unicodedata.po +++ b/library/unicodedata.po @@ -7,13 +7,14 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" -"PO-Revision-Date: 2026-09-15 12:44+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 20:42+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" @@ -26,15 +27,150 @@ msgstr "" msgid ":mod:`!unicodedata` --- Unicode Database" msgstr ":mod:`!unicodedata` --- پایگاه داده یونیکد" -msgid "This module provides access to the Unicode Character Database (UCD) which defines character properties for all Unicode characters. The data contained in this database is compiled from the `UCD version 16.0.0 `_." -msgstr "این ماژول دسترسی به پایگاه داده‌ی نویسه‌های یونیکد (UCD) را فراهم می‌کند که ویژگی‌های همه‌ی نویسه‌های یونیکد را تعریف می‌کند. داده‌های موجود در این پایگاه داده از `UCD version 16.0.0 `_ گردآوری شده است." +msgid "This module provides access to the Unicode Character Database (UCD) which defines character properties for all Unicode characters. The data contained in this database is compiled from the `UCD version 17.0.0 `_." +msgstr "این ماژول دسترسی به پایگاه داده نویسه‌های یونیکد (UCD) را فراهم می‌کند که ویژگی‌های نویسه را برای تمام نویسه‌های یونیکد تعریف می‌کند. داده‌های موجود در این پایگاه داده از `UCD version 17.0.0 `_ کامپایل شده‌اند." -msgid "The module uses the same names and symbols as defined by Unicode Standard Annex #44, `\"Unicode Character Database\" `_. It defines the following functions:" -msgstr "این ماژول از همان نام‌ها و نمادهای تعریف‌شده در پیوست #44 استاندارد یونیکد، `\"Unicode Character Database\" `_ استفاده می‌کند. این ماژول توابع زیر را تعریف می‌کند:" +msgid "The module uses the same names and symbols as defined by Unicode Standard Annex #44, `\"Unicode Character Database\" `_." +msgstr "این ماژول از همان نام‌ها و نمادهای تعریف‌شده توسط ضمیمه‌ی استاندارد یونیکد شماره‌ی ۴۴، `\"Unicode Character Database\" `_ استفاده می‌کند." msgid "The :ref:`unicode-howto` for more information about Unicode and how to use this module." msgstr "برای اطلاعات بیشتر درباره‌ی یونیکد و چگونگی استفاده از این ماژول، :ref:`unicode-howto` را ببینید." +msgid "**Lookup**" +msgstr "**جستجو**" + +msgid ":func:`lookup(name) `" +msgstr ":func:`lookup(name) `" + +msgid "Look up character by name" +msgstr "جستجوی نویسه بر اساس نام" + +msgid ":func:`name(chr) `" +msgstr ":func:`name(chr) `" + +msgid "Return the name assigned to a character" +msgstr "برگرداندن نام اختصاص‌داده‌شده به یک نویسه" + +msgid "**Numeric values**" +msgstr "**مقادیر عددی**" + +msgid ":func:`decimal(chr) `" +msgstr ":func:`decimal(chr) `" + +msgid "Decimal value of a character" +msgstr "مقدار دهدهی یک نویسه" + +msgid ":func:`digit(chr) `" +msgstr ":func:`digit(chr) `" + +msgid "Digit value of a character" +msgstr "مقدار رقمی یک نویسه" + +msgid ":func:`numeric(chr) `" +msgstr ":func:`numeric(chr) `" + +msgid "Numeric value of a character" +msgstr "مقدار عددی یک نویسه" + +msgid "**Properties**" +msgstr "**ویژگی‌ها**" + +msgid ":func:`bidirectional(chr) `" +msgstr ":func:`bidirectional(chr) `" + +msgid "Bidirectional class of a character" +msgstr "کلاس دوسویه یک نویسه" + +msgid ":func:`block(chr) `" +msgstr ":func:`block(chr) `" + +msgid "Unicode block of a character" +msgstr "بلوک یونیکد یک نویسه" + +msgid ":func:`category(chr) `" +msgstr ":func:`category(chr) `" + +msgid "General category of a character" +msgstr "دسته‌بندی عمومی یک نویسه" + +msgid ":func:`combining(chr) `" +msgstr ":func:`combining(chr) `" + +msgid "Canonical combining class of a character" +msgstr "کلاس ترکیب کانونیکال یک نویسه" + +msgid ":func:`decomposition(chr) `" +msgstr ":func:`decomposition(chr) `" + +msgid "Character decomposition mapping" +msgstr "نگاشت تجزیه نویسه" + +msgid ":func:`east_asian_width(chr) `" +msgstr ":func:`east_asian_width(chr) `" + +msgid "East Asian width of a character" +msgstr "عرض آسیای شرقی یک نویسه" + +msgid ":func:`extended_pictographic(chr) `" +msgstr ":func:`extended_pictographic(chr) `" + +msgid "Check if a character has the Extended_Pictographic property" +msgstr "بررسی کنید که آیا یک نویسه دارای ویژگی Extended_Pictographic است یا خیر" + +msgid ":func:`grapheme_cluster_break(chr) `" +msgstr ":func:`grapheme_cluster_break(chr) `" + +msgid "Grapheme_Cluster_Break property of a character" +msgstr "ویژگی Grapheme_Cluster_Break یک نویسه" + +msgid ":func:`indic_conjunct_break(chr) `" +msgstr ":func:`indic_conjunct_break(chr) `" + +msgid "Indic_Conjunct_Break property of a character" +msgstr "ویژگی Indic_Conjunct_Break یک نویسه" + +msgid ":func:`isxidcontinue(chr) `" +msgstr ":func:`isxidcontinue(chr) `" + +msgid "Check if a character is a valid identifier continuation" +msgstr "بررسی کنید که آیا یک نویسه ادامه دهنده‌ی معتبری برای شناسه‌ است یا خیر" + +msgid ":func:`isxidstart(chr) `" +msgstr ":func:`isxidstart(chr) `" + +msgid "Check if a character is a valid identifier start" +msgstr "بررسی کنید که آیا یک نویسه شروع‌کننده‌ی معتبری برای شناسه‌ است یا خیر" + +msgid ":func:`mirrored(chr) `" +msgstr ":func:`mirrored(chr) `" + +msgid "Mirrored property of a character" +msgstr "ویژگی Mirrored یک نویسه" + +msgid "**Normalization**" +msgstr "**نرمال‌سازی**" + +msgid ":func:`normalize(form, unistr) `" +msgstr ":func:`normalize(form, unistr) `" + +msgid "Return the normalized form of a string" +msgstr "فرم نرمال‌شده‌ی یک رشته را برمی‌گرداند" + +msgid ":func:`is_normalized(form, unistr) `" +msgstr ":func:`is_normalized(form, unistr) `" + +msgid "Check if a Unicode string is normalized" +msgstr "بررسی کنید که آیا یک رشته‌ی یونیکد نرمال‌شده است یا خیر" + +msgid "**Text segmentation**" +msgstr "**قطعه‌بندی متن**" + +msgid ":func:`iter_graphemes(unistr) `" +msgstr ":func:`iter_graphemes(unistr) `" + +msgid "Iterate over grapheme clusters in a string" +msgstr "خوشه‌های گرافمی را در یک رشته پیمایش کنید" + msgid "Look up character by name. If a character with the given name is found, return the corresponding character. If not found, :exc:`KeyError` is raised. For example::" msgstr "جست‌وجوی نویسه بر اساس نام. اگر نویسه‌ای با نام داده‌شده پیدا شود، نویسه متناظر برگردانده می‌شود. اگر پیدا نشود، :exc:`KeyError` پرتاب می‌شود. برای مثال::" @@ -106,8 +242,8 @@ msgstr "" ">>> unicodedata.numeric('½')\n" "0.5" -msgid "Returns the general category assigned to the character *chr* as string. General category names consist of two letters. See the `General Category Values section of the Unicode Character Database documentation `_ for a list of category codes. For example::" -msgstr "دسته‌ی عمومی اختصاص‌یافته به نویسه‌ی *chr* را به‌صورت رشته برمی‌گرداند. نام‌های دسته‌ی عمومی از دو حرف تشکیل شده‌اند. برای فهرست کدهای دسته، `General Category Values section of the Unicode Character Database documentation `_ را ببینید. برای مثال::" +msgid "Returns the general category assigned to the character *chr* as string. General category names consist of two letters. See the `General Category Values section of the Unicode Character Database documentation `_ for a list of category codes. For example::" +msgstr "دسته‌ی عمومی اختصاص‌یافته به نویسه‌ی *chr* را به صورت یک رشته برمی‌گرداند. نام‌های دسته‌ی عمومی از دو حرف تشکیل شده‌اند. برای فهرستی از کدهای دسته، به بخش `General Category Values section of the Unicode Character Database documentation `_ مراجعه کنید. برای مثال::" msgid "" ">>> unicodedata.category('A') # 'L'etter, 'u'ppercase\n" @@ -116,8 +252,8 @@ msgstr "" ">>> unicodedata.category('A') # 'L'etter, 'u'ppercase\n" "'Lu'" -msgid "Returns the bidirectional class assigned to the character *chr* as string. If no such value is defined, an empty string is returned. See the `Bidirectional Class Values section of the Unicode Character Database `_ documentation for a list of bidirectional codes. For example::" -msgstr "کلاس دوجهته اختصاص‌یافته به نویسه *chr* را به‌صورت رشته برمی‌گرداند. اگر چنین مقداری تعریف نشده باشد، رشته‌ای خالی برگردانده می‌شود. برای فهرستی از کدهای دوجهته، مستندات `بخش Bidirectional Class Values در Unicode Character Database `_ را ببینید. برای مثال::" +msgid "Returns the bidirectional class assigned to the character *chr* as string. If no such value is defined, an empty string is returned. See the `Bidirectional Class Values section of the Unicode Character Database `_ documentation for a list of bidirectional codes. For example::" +msgstr "کلاس دوطرفه‌ی منتساب به نویسه‌ی *chr* را به شکل یک رشته برمی‌گرداند. اگر چنین مقداری تعریف نشده باشد، یک رشته‌ی خالی برگردانده می‌شود. برای مشاهده‌ی فهرستی از کدهای دوطرفه، به مستندات بخش `Bidirectional Class Values section of the Unicode Character Database `_ مراجعه کنید. برای مثال::" msgid "" ">>> unicodedata.bidirectional('\\N{ARABIC-INDIC DIGIT SEVEN}') # 'A'rabic, 'N'umber\n" @@ -126,11 +262,21 @@ msgstr "" ">>> unicodedata.bidirectional('\\N{ARABIC-INDIC DIGIT SEVEN}') # 'A'rabic, 'N'umber\n" "'AN'" -msgid "Returns the canonical combining class assigned to the character *chr* as integer. Returns ``0`` if no combining class is defined. See the `Canonical Combining Class Values section of the Unicode Character Database `_ for more information." -msgstr "کلاس ترکیب کانونیکال (canonical combining class) اختصاص‌داده‌شده به نویسه‌ی *chr* را به‌صورت عدد صحیح برمی‌گرداند. اگر کلاس ترکیبی تعریف نشده باشد، ``0`` را برمی‌گرداند. برای اطلاعات بیشتر، `بخش Canonical Combining Class Values در Unicode Character Database `_ را ببینید." +msgid "Returns the canonical combining class assigned to the character *chr* as integer. Returns ``0`` if no combining class is defined. See the `Canonical Combining Class Values section of the Unicode Character Database `_ for more information." +msgstr "کلاس ترکیب کانونیکال منتساب به نویسه‌ی *chr* را به عنوان یک عدد صحیح برمی‌گرداند. اگر هیچ کلاس ترکیبی تعریف نشده باشد، ``0`` را برمی‌گرداند. برای اطلاعات بیشتر، به `Canonical Combining Class Values section of the Unicode Character Database `_ مراجعه کنید." + +msgid "Returns the east asian width assigned to the character *chr* as string. For a list of widths and or more information, see the `Unicode Standard Annex #11 `_." +msgstr "عرض شرق آسیایی منتساب به نویسه‌ی *chr* را به شکل یک رشته برمی‌گرداند. برای مشاهده‌ی فهرستی از عرض‌ها و اطلاعات بیشتر، به `Unicode Standard Annex #11 `_ مراجعه کنید." -msgid "Returns the east asian width assigned to the character *chr* as string. For a list of widths and or more information, see the `Unicode Standard Annex #11 `_." -msgstr "عرض شرق آسیایی تخصیص‌داده‌شده به نویسه *chr* را به‌صورت رشته برمی‌گرداند. برای فهرستی از عرض‌ها و یا اطلاعات بیشتر، `Unicode Standard Annex #11 `_ را ببینید." +msgid "Returns the `block `_ assigned to the character *chr*. For example::" +msgstr "مقدار `block `_ تخصیص‌یافته به نویسه‌ی *chr* را برمی‌گرداند. برای مثال::" + +msgid "" +">>> unicodedata.block('S')\n" +"'Basic Latin'" +msgstr "" +">>> unicodedata.block('S')\n" +"'Basic Latin'" msgid "Returns the mirrored property assigned to the character *chr* as integer. Returns ``1`` if the character has been identified as a \"mirrored\" character in bidirectional text, ``0`` otherwise. For example::" msgstr "ویژگی آینه‌ای اختصاص‌یافته به نویسه‌ی *chr* را به‌صورت عدد صحیح بازمی‌گرداند. اگر نویسه به‌عنوان نویسه‌ی «آینه‌ای» در متن دوجهته شناسایی شده باشد، ``1`` و در غیر این صورت ``0`` بازمی‌گرداند. برای مثال::" @@ -142,6 +288,34 @@ msgstr "" ">>> unicodedata.mirrored('>')\n" "1" +msgid "Return ``True`` if *chr* is a valid identifier start per the `Unicode Standard Annex #31 `_, that is, it has the ``XID_Start`` property. Return ``False`` otherwise. For example::" +msgstr "اگر *chr* بر اساس `Unicode Standard Annex #31 `_ یک آغازگر شناسه‌ی معتبر باشد، یعنی ویژگی ``XID_Start`` را داشته باشد، مقدار ``True`` را برمی‌گرداند. در غیر این صورت ``False`` را برمی‌گرداند. برای مثال::" + +msgid "" +">>> unicodedata.isxidstart('S')\n" +"True\n" +">>> unicodedata.isxidstart('0')\n" +"False" +msgstr "" +">>> unicodedata.isxidstart('S')\n" +"True\n" +">>> unicodedata.isxidstart('0')\n" +"False" + +msgid "Return ``True`` if *chr* is a valid identifier character per the `Unicode Standard Annex #31 `_, that is, it has the ``XID_Continue`` property. Return ``False`` otherwise. For example::" +msgstr "اگر *chr* بر اساس `Unicode Standard Annex #31 `_ یک نویسه‌ی شناسه‌ی معتبر باشد، یعنی ویژگی ``XID_Continue`` را داشته باشد، مقدار ``True`` را برمی‌گرداند. در غیر این صورت ``False`` را برمی‌گرداند. برای مثال::" + +msgid "" +">>> unicodedata.isxidcontinue('S')\n" +"True\n" +">>> unicodedata.isxidcontinue(' ')\n" +"False" +msgstr "" +">>> unicodedata.isxidcontinue('S')\n" +"True\n" +">>> unicodedata.isxidcontinue(' ')\n" +"False" + msgid "Returns the character decomposition mapping assigned to the character *chr* as string. An empty string is returned in case no such mapping is defined. For example::" msgstr "نگاشت تجزیه‌ی نویسه‌ای را که به نویسه‌ی *chr* اختصاص‌یافته است، به‌صورت رشته برمی‌گرداند. در صورتی که چنین نگاشتی تعریف‌نشده باشد، یک رشته‌ی خالی برگردانده می‌شود. برای مثال::" @@ -152,6 +326,15 @@ msgstr "" ">>> unicodedata.decomposition('Ã')\n" "'0041 0303'" +msgid "Returns the Grapheme_Cluster_Break property assigned to the character." +msgstr "ویژگی Grapheme_Cluster_Break تخصیص‌یافته به نویسه را برمی‌گرداند." + +msgid "Returns the Indic_Conjunct_Break property assigned to the character." +msgstr "ویژگی Indic_Conjunct_Break تخصیص‌یافته به نویسه را برمی‌گرداند." + +msgid "Returns ``True`` if the character has the Extended_Pictographic property, ``False`` otherwise." +msgstr "اگر نویسه دارای ویژگی Extended_Pictographic باشد، مقدار ``True`` و در غیر این صورت ``False`` را برمی‌گرداند." + msgid "Return the normal form *form* for the Unicode string *unistr*. Valid values for *form* are 'NFC', 'NFKC', 'NFD', and 'NFKD'." msgstr "فرم نرمال *form* را برای رشته‌ی یونیکدی *unistr* برمی‌گرداند. مقادیر معتبر برای *form* عبارت‌اند از 'NFC'، 'NFKC'، 'NFD' و 'NFKD'." @@ -173,23 +356,32 @@ msgstr "حتی اگر دو رشته‌ی یونیکد نرمال‌شده باش msgid "Return whether the Unicode string *unistr* is in the normal form *form*. Valid values for *form* are 'NFC', 'NFKC', 'NFD', and 'NFKD'." msgstr "بازمی‌گرداند که آیا رشته‌ی یونیکد *unistr* در فرم نرمال *form* قرار دارد یا خیر. مقادیر معتبر برای *form* عبارت‌اند از 'NFC'، 'NFKC'، 'NFD' و 'NFKD'." -msgid "In addition, the module exposes the following constant:" -msgstr "علاوه بر این، ماژول ثابت زیر را در دسترس قرار می‌دهد:" +msgid "Returns an iterator to iterate over grapheme clusters. With optional *start*, iteration begins at that position. With optional *end*, iteration stops at that position." +msgstr "یک پیمایش‌گر برای پیمایش روی خوشه‌های گرافیم برمی‌گرداند. با *start* اختیاری، پیمایش از آن موقعیت آغاز می‌شود. با *end* اختیاری، پیمایش در آن موقعیت متوقف می‌شود." + +msgid "Converting an emitted item to string returns a substring corresponding to the grapheme cluster. Its ``start`` and ``end`` attributes denote the start and end of the grapheme cluster." +msgstr "تبدیل یک آیتم صادرشده به رشته، زیررشته‌ای متناظر با خوشه‌ی نگاره‌ای را برمی‌گرداند. ویژگی‌های ``start`` و ``end`` آن، نشان‌دهنده‌ی آغاز و پایان خوشه‌ی نگاره‌ای هستند." + +msgid "It uses extended grapheme cluster rules defined by Unicode Standard Annex #29, `\"Unicode Text Segmentation\" `_." +msgstr "این تابع از قوانین خوشه‌ی گرافیف توسعه‌یافته‌ی تعریف‌شده توسط ضمیمه‌ی شماره‌ی ۲۹ استاندارد یونیکد، یعنی `\"Unicode Text Segmentation\" `_ استفاده می‌کند." + +msgid "In addition, the module exposes the following constants:" +msgstr "علاوه بر این، این ماژول ثابت‌های زیر را ارائه می‌دهد:" msgid "The version of the Unicode database used in this module." msgstr "نسخه‌ی پایگاه داده‌ی یونیکد استفاده‌شده در این ماژول." -msgid "This is an object that has the same methods as the entire module, but uses the Unicode database version 3.2 instead, for applications that require this specific version of the Unicode database (such as IDNA)." -msgstr "این یک شیء است که همان متدهای کل ماژول را دارد، اما در عوض از پایگاه داده یونیکد نسخه 3.2 استفاده می‌کند، برای برنامه‌هایی که به این نسخه خاص از پایگاه داده یونیکد نیاز دارند (مانند IDNA)." +msgid "This is an object that has most of the methods of the entire module, but uses the Unicode database version 3.2 instead, for applications that require this specific version of the Unicode database (such as IDNA)." +msgstr "این یک شیء است که بیشتر متدهای کل ماژول را دارد، اما به جای آن از نسخه‌ی ۳.۲ پایگاه داده‌ی یونیکد استفاده می‌کند؛ این کار برای برنامه‌هایی است که به این نسخه‌ی خاص از پایگاه داده‌ی یونیکد (مانند IDNA) نیاز دارند." msgid "Footnotes" msgstr "پانویس‌ها" -msgid "https://www.unicode.org/Public/16.0.0/ucd/NameAliases.txt" -msgstr "https://www.unicode.org/Public/16.0.0/ucd/NameAliases.txt" +msgid "https://www.unicode.org/Public/17.0.0/ucd/NameAliases.txt" +msgstr "https://www.unicode.org/Public/17.0.0/ucd/NameAliases.txt" -msgid "https://www.unicode.org/Public/16.0.0/ucd/NamedSequences.txt" -msgstr "https://www.unicode.org/Public/16.0.0/ucd/NamedSequences.txt" +msgid "https://www.unicode.org/Public/17.0.0/ucd/NamedSequences.txt" +msgstr "https://www.unicode.org/Public/17.0.0/ucd/NamedSequences.txt" msgid "Unicode" msgstr "یونیکد" diff --git a/library/unittest.mock-examples.po b/library/unittest.mock-examples.po index ed5317e6..950ef106 100644 --- a/library/unittest.mock-examples.po +++ b/library/unittest.mock-examples.po @@ -6,12 +6,13 @@ # Translators: # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 13:05+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -670,8 +671,8 @@ msgstr "" msgid "One possibility would be for mock to copy the arguments you pass in. This could then cause problems if you do assertions that rely on object identity for equality." msgstr "یکی از امکان‌ها این است که ماک آرگومان‌هایی را که به آن می‌دهید کپی کند. در این صورت، اگر ادعاهایی مطرح کنید که برای برابری به هویت شیء متکی هستند، ممکن است مشکلاتی پیش بیاید." -msgid "Here's one solution that uses the :attr:`~Mock.side_effect` functionality. If you provide a ``side_effect`` function for a mock then ``side_effect`` will be called with the same args as the mock. This gives us an opportunity to copy the arguments and store them for later assertions. In this example I'm using *another* mock to store the arguments so that I can use the mock methods for doing the assertion. Again a helper function sets this up for me. ::" -msgstr "در اینجا راه‌حلی ارائه می‌شود که از قابلیت :attr:`~Mock.side_effect` استفاده می‌کند. اگر یک تابع ``side_effect`` برای یک ماک ارائه کنید، آنگاه ``side_effect`` با همان آرگومان‌هایی که ماک دریافت می‌کند فراخوانی می‌شود. این کار به ما امکان می‌دهد که آرگومان‌ها را کپی کنیم و برای ادعاهای بعدی ذخیره کنیم. در این مثال، من از یک ماک *دیگر* برای ذخیره آرگومان‌ها استفاده می‌کنم تا بتوانم از متدهای ماک برای انجام ادعا استفاده کنم. باز هم یک تابع کمکی این تنظیم را برای من انجام می‌دهد. ::" +msgid "Here's one solution that uses the :attr:`~Mock.side_effect` functionality. If you provide a ``side_effect`` function for a mock then ``side_effect`` will be called with the same args as the mock. This gives us an opportunity to copy the arguments and store them for later assertions. In this example we're using *another* mock to store the arguments so that we can use the mock methods for doing the assertion. Again a helper function sets this up for us. ::" +msgstr "این هم یک راه حل که از قابلیت :attr:`~Mock.side_effect` استفاده می‌کند. اگر یک تابع ``side_effect`` برای یک ماک فراهم کنید، ``side_effect`` با همان آرگومان‌های ماک فراخوانی خواهد شد. این موضوع به ما فرصتی می‌دهد تا آرگومان‌ها را کپی کرده و برای بررسی‌های بعدی ذخیره کنیم. در این مثال، ما از *یک ماک دیگر* برای ذخیره کردن آرگومان‌ها استفاده می‌کنیم تا بتوانیم از متدهای ماک برای انجام بررسی (ادعا) بهره ببریم. بار دیگر، یک تابع کمکی این کار را برای ما تنظیم می‌کند. ::" msgid "" ">>> from copy import deepcopy\n" diff --git a/library/unittest.mock.po b/library/unittest.mock.po index 23d31e6b..f1d19859 100644 --- a/library/unittest.mock.po +++ b/library/unittest.mock.po @@ -7,12 +7,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 12:26+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -182,14 +183,14 @@ msgstr "این متد روش مناسبی برای تأیید این است که msgid "Assert that the mock was called exactly once and that call was with the specified arguments." msgstr "تأیید کنید که ماک دقیقاً یک بار فراخوانی شده است و آن فراخوانی با آرگومان‌های مشخص‌شده بوده است." -msgid "assert the mock has been called with the specified arguments." -msgstr "ادعا می‌کند که ماک با آرگومان‌های مشخص‌شده فراخوانی شده است." +msgid "Assert the mock has been called with the specified arguments." +msgstr "بررسی کنید که ماک با آرگومان‌های مشخص‌شده فراخوانی شده است." msgid "The assert passes if the mock has *ever* been called, unlike :meth:`assert_called_with` and :meth:`assert_called_once_with` that only pass if the call is the most recent one, and in the case of :meth:`assert_called_once_with` it must also be the only call." msgstr "این ادعا (assert) در صورتی موفق می‌شود که ماک *تاکنون* فراخوانی شده باشد، برخلاف :meth:`assert_called_with` و :meth:`assert_called_once_with` که فقط در صورتی موفق می‌شوند که فراخوانی، آخرین فراخوانی باشد، و در مورد :meth:`assert_called_once_with` باید تنها فراخوانی نیز باشد." -msgid "assert the mock has been called with the specified calls. The :attr:`mock_calls` list is checked for the calls." -msgstr "ادعا می‌کند که ماک با فراخوانی‌های مشخص‌شده فراخوانی شده است. فهرست :attr:`mock_calls` برای فراخوانی‌ها بررسی می‌شود." +msgid "Assert the mock has been called with the specified calls. The :attr:`mock_calls` list is checked for the calls." +msgstr "بررسی کنید که ماک با فراخوانی‌های مشخص‌شده فراخوانی شده است. فهرست :attr:`mock_calls` برای این فراخوانی‌ها بررسی می‌شود." msgid "If *any_order* is false then the calls must be sequential. There can be extra calls before or after the specified calls." msgstr "اگر *any_order* نادرست باشد، فراخوانی‌ها باید متوالی باشند. ممکن است فراخوانی‌های اضافی قبل یا بعد از فراخوانی‌های مشخص‌شده وجود داشته باشد." diff --git a/library/unittest.po b/library/unittest.po index a9f84f14..125f5a98 100644 --- a/library/unittest.po +++ b/library/unittest.po @@ -8,12 +8,13 @@ # Parham Forati, 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 16:06+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -1200,9 +1201,24 @@ msgstr "" "self.assertIn('myfile.py', cm.filename)\n" "self.assertEqual(320, cm.lineno)" +msgid "The context managers can be nested to test that multiple different warnings are emitted::" +msgstr "مدیران زمینه می‌توانند به صورت تورتو درآیند (nested) تا آزمایش شود که چندین هشدار مختلف صادر می‌شوند::" + +msgid "" +"with (self.assertWarns(SomeWarning),\n" +" self.assertWarns(OtherWarning)):\n" +" do_something()" +msgstr "" +"with (self.assertWarns(SomeWarning),\n" +" self.assertWarns(OtherWarning)):\n" +" do_something()" + msgid "This method works regardless of the warning filters in place when it is called." msgstr "این متد صرف‌نظر از فیلترهای هشدارِ برقرار در زمان فراخوانی، عمل می‌کند." +msgid "Warnings that do not match the specified category are no longer swallowed. Nested context managers are now supported." +msgstr "هشدارهایی که با دسته‌بندی مشخص‌شده مطابقت ندارند، دیگر نادیده گرفته نمی‌شوند (swallowed). مدیران زمینه‌ی تورتو اکنون پشتیبانی می‌شوند." + msgid "Like :meth:`assertWarns` but also tests that *regex* matches on the message of the triggered warning. *regex* may be a regular expression object or a string containing a regular expression suitable for use by :func:`re.search`. Example::" msgstr "مانند :meth:`assertWarns` است، اما همچنین آزمایش می‌کند که *regex* با پیام هشدار فعال‌شده مطابقت دارد. *regex* می‌تواند یک شیء عبارت باقاعده یا رشته‌ای حاوی عبارت باقاعده مناسب برای استفاده توسط :func:`re.search` باشد. مثال::" @@ -1222,6 +1238,18 @@ msgstr "" "with self.assertWarnsRegex(RuntimeWarning, 'unsafe frobnicating'):\n" " frobnicate('/etc/passwd')" +msgid "" +"with (self.assertWarns(SomeWarning, regex1),\n" +" self.assertWarns(OtherWarning, regex2)):\n" +" do_something()" +msgstr "" +"with (self.assertWarns(SomeWarning, regex1),\n" +" self.assertWarns(OtherWarning, regex2)):\n" +" do_something()" + +msgid "Warnings that do not match the specified category or regex are no longer swallowed. Nested context managers are now supported." +msgstr "هشدارهایی که با دسته‌بندی یا عبارت منظم مشخص‌شده مطابقت ندارند، دیگر نادیده گرفته نمی‌شوند. مدیران زمینه‌ی تورتو اکنون پشتیبانی می‌شوند." + msgid "A context manager to test that at least one message is logged on the *logger* or one of its children, with at least the given *level*." msgstr "یک مدیر زمینه برای آزمایش اینکه حداقل یک پیام با حداقل *level* داده‌شده، روی *logger* یا یکی از فرزندان آن ثبت شده باشد." @@ -1231,6 +1259,9 @@ msgstr "در صورت ارائه، *logger* باید یک شیء :class:`logging msgid "If given, *level* should be either a numeric logging level or its string equivalent (for example either ``\"ERROR\"`` or :const:`logging.ERROR`). The default is :const:`logging.INFO`." msgstr "در صورت ارائه، *level* باید یا یک سطح گزارش‌گیری عددی باشد یا معادل رشته‌ای آن (برای مثال یا ``\"ERROR\"`` یا :const:`logging.ERROR`). مقدار پیش‌فرض :const:`logging.INFO` است." +msgid "If given, *formatter* should be a :class:`logging.Formatter` object. The default is a formatter with format string ``\"%(levelname)s:%(name)s:%(message)s\"``" +msgstr "در صورت تعیین، آرگومان *formatter* باید یک شیء :class:`logging.Formatter` باشد. پیش‌فرض، یک قالب‌بند با رشته‌ی قالب ``\"%(levelname)s:%(name)s:%(message)s\"`` است." + msgid "The test passes if at least one message emitted inside the ``with`` block matches the *logger* and *level* conditions, otherwise it fails." msgstr "اگر حداقل یک پیام منتشرشده درون بلوک ``with`` با شرایط *logger* و *level* مطابقت داشته باشد، آزمون موفق می‌شود، در غیر این صورت شکست می‌خورد." @@ -1259,6 +1290,9 @@ msgstr "" "self.assertEqual(cm.output, ['INFO:foo:first message',\n" " 'ERROR:foo.bar:second message'])" +msgid "Now accepts a *formatter* to control how messages are formatted." +msgstr "اکنون آرگومان *formatter* را برای کنترل نحوه‌ی قالب‌بندی پیام‌ها می‌پذیرد." + msgid "A context manager to test that no messages are logged on the *logger* or one of its children, with at least the given *level*." msgstr "یک مدیر زمینه برای آزمایش اینکه هیچ پیامی با دست‌کم *level* داده‌شده، روی *logger* یا یکی از فرزندان آن ثبت نمی‌شود." diff --git a/library/urllib.parse.po b/library/urllib.parse.po index 3d2154d7..a043d6a0 100644 --- a/library/urllib.parse.po +++ b/library/urllib.parse.po @@ -8,12 +8,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 08:24+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -51,11 +52,8 @@ msgstr "تجزیه‌ی URL" msgid "The URL parsing functions focus on splitting a URL string into its components, or on combining URL components into a URL string." msgstr "توابع تجزیه‌ی URL بر تقسیم یک رشته‌ی URL به کامپوننت‌های آن، یا ترکیب کامپوننت‌های URL در یک رشته‌ی URL تمرکز دارند." -msgid "Parse a URL into five components, returning a 5-item :term:`named tuple` :class:`SplitResult` or :class:`SplitResultBytes`. This corresponds to the general structure of a URL: ``scheme://netloc/path?query#fragment``. Each tuple item is a string, possibly empty." -msgstr "یک URL را به پنج کامپوننت تجزیه می‌کند و یک :term:`named tuple` با ۵ آیتم از نوع :class:`SplitResult` یا :class:`SplitResultBytes` را برمی‌گرداند. این با ساختار کلی یک URL مطابقت دارد: ``scheme://netloc/path?query#fragment``. هر آیتم از تاپل یک رشته است، که ممکن است خالی باشد." - -msgid "The delimiters as shown above are not part of the result, except for a leading slash in the *path* component, which is retained if present." -msgstr "جداکننده‌های نشان‌داده‌شده در بالا بخشی از نتیجه نیستند، به‌جز اسلش آغازین در کامپوننت *path* که در صورت وجود حفظ می‌شود." +msgid "Parse a URL into five components, returning a 5-item :term:`named tuple` :class:`SplitResult` or :class:`SplitResultBytes`. This corresponds to the general structure of a URL: ``scheme://netloc/path?query#fragment``. Each tuple item is a string, possibly empty, or ``None`` if *missing_as_none* is true. Not defined component are represented an empty string (by default) or ``None`` if *missing_as_none* is true. The delimiters as shown above are not part of the result, except for a leading slash in the *path* component, which is retained if present." +msgstr "یک URL را به پنج جزء تجزیه می‌کند و یک :term:`تاپل نام‌دار ` ۵ عضوی به شکل :class:`SplitResult` یا :class:`SplitResultBytes` برمی‌گرداند. این ساختار با ساختار کلی یک URL مطابقت دارد: ``scheme://netloc/path?query#fragment``. هر آیتم تاپل یک رشته است که احتمالاً خالی است، یا اگر مقدار *missing_as_none* برابر با درست (true) باشد، ``None`` است. اجزای تعریف‌نشده به صورت یک رشته‌ی خالی (به طور پیش‌فرض) یا اگر *missing_as_none* درست باشد به صورت ``None`` نمایش داده می‌شوند. جداکننده‌هایی که در بالا نشان داده شده‌اند بخشی از نتیجه نیستند، به جز یک اسلش پیشرو در جزء *path* که در صورت وجود حفظ می‌شود." msgid "Additionally, the netloc property is broken down into these additional attributes added to the returned object: username, password, hostname, and port." msgstr "علاوه بر این، خصوصیت netloc به این ویژگی‌های اضافی که به شیء برگردانده‌شده افزوده شده‌اند، تفکیک می‌شود: username، password، hostname و port." @@ -86,7 +84,13 @@ msgid "" ">>> o.port\n" "80\n" ">>> o._replace(fragment=\"\").geturl()\n" -"'http://docs.python.org:80/3/library/urllib.parse.html?highlight=params'" +"'http://docs.python.org:80/3/library/urllib.parse.html?highlight=params'\n" +">>> urlsplit(\"http://docs.python.org?\")\n" +"SplitResult(scheme='http', netloc='docs.python.org', path='',\n" +" query='', fragment='')\n" +">>> urlsplit(\"http://docs.python.org?\", missing_as_none=True)\n" +"SplitResult(scheme='http', netloc='docs.python.org', path='',\n" +" query='', fragment=None)" msgstr "" ">>> from urllib.parse import urlsplit\n" ">>> urlsplit(\"scheme://netloc/path?query#fragment\")\n" @@ -107,7 +111,13 @@ msgstr "" ">>> o.port\n" "80\n" ">>> o._replace(fragment=\"\").geturl()\n" -"'http://docs.python.org:80/3/library/urllib.parse.html?highlight=params'" +"'http://docs.python.org:80/3/library/urllib.parse.html?highlight=params'\n" +">>> urlsplit(\"http://docs.python.org?\")\n" +"SplitResult(scheme='http', netloc='docs.python.org', path='',\n" +" query='', fragment='')\n" +">>> urlsplit(\"http://docs.python.org?\", missing_as_none=True)\n" +"SplitResult(scheme='http', netloc='docs.python.org', path='',\n" +" query='', fragment=None)" msgid "Following the syntax specifications in :rfc:`1808`, :func:`!urlsplit` recognizes a netloc only if it is properly introduced by '//'. Otherwise the input is presumed to be a relative URL and thus to start with a path component." msgstr "طبق مشخصات سینتکس در :rfc:`1808`، :func:`!urlsplit` تنها در صورتی یک netloc را تشخیص می‌دهد که به‌درستی با '//' معرفی شده باشد. در غیر این صورت، فرض می‌شود ورودی یک URL نسبی است و بنابراین با یک کامپوننت مسیر شروع می‌شود." @@ -122,7 +132,10 @@ msgid "" " query='', fragment='')\n" ">>> urlsplit('help/Python.html')\n" "SplitResult(scheme='', netloc='', path='help/Python.html',\n" -" query='', fragment='')" +" query='', fragment='')\n" +">>> urlsplit('help/Python.html', missing_as_none=True)\n" +"SplitResult(scheme=None, netloc=None, path='help/Python.html',\n" +" query=None, fragment=None)" msgstr "" ">>> from urllib.parse import urlsplit\n" ">>> urlsplit('//www.cwi.nl:80/%7Eguido/Python.html')\n" @@ -133,13 +146,16 @@ msgstr "" " query='', fragment='')\n" ">>> urlsplit('help/Python.html')\n" "SplitResult(scheme='', netloc='', path='help/Python.html',\n" -" query='', fragment='')" +" query='', fragment='')\n" +">>> urlsplit('help/Python.html', missing_as_none=True)\n" +"SplitResult(scheme=None, netloc=None, path='help/Python.html',\n" +" query=None, fragment=None)" -msgid "The *scheme* argument gives the default addressing scheme, to be used only if the URL does not specify one. It should be the same type (text or bytes) as *urlstring*, except that the default value ``''`` is always allowed, and is automatically converted to ``b''`` if appropriate." -msgstr "آرگومان *scheme* طرح‌واره آدرس‌دهی پیش‌فرض را مشخص می‌کند و فقط زمانی استفاده می‌شود که URL طرح‌واره‌ای را مشخص نکرده باشد. این آرگومان باید هم‌نوع (متن یا بایت) با *urlstring* باشد، به‌جز اینکه مقدار پیش‌فرض ``''`` همیشه مجاز است و در صورت لزوم به‌طور خودکار به ``b''`` تبدیل می‌شود." +msgid "The *scheme* argument gives the default addressing scheme, to be used only if the URL does not specify one. It should be the same type (text or bytes) as *urlstring* or ``None``, except that the ``''`` is always allowed, and is automatically converted to ``b''`` if appropriate." +msgstr "آرگومان *scheme* طرح‌واره‌ی آدرس‌دهی پیش‌فرض را ارائه می‌دهد که فقط در صورتی استفاده می‌شود که URL یکی را مشخص نکرده باشد. این آرگومان باید از همان نوع (متن یا بایت) *urlstring* باشد یا ``None``، با این تفاوت که ``''`` همیشه مجاز است و در صورت لزوم به طور خودکار به ``b''`` تبدیل می‌شود." -msgid "If the *allow_fragments* argument is false, fragment identifiers are not recognized. Instead, they are parsed as part of the path, parameters or query component, and :attr:`fragment` is set to the empty string in the return value." -msgstr "اگر آرگومان *allow_fragments* نادرست باشد، شناسه‌های قطعه (fragment) شناسایی نمی‌شوند. در عوض، آن‌ها به‌عنوان بخشی از مسیر، پارامترها یا کامپوننت پرس‌وجو تجزیه می‌شوند و :attr:`fragment` در مقدار بازگشتی روی رشته‌ی خالی تنظیم می‌شود." +msgid "If the *allow_fragments* argument is false, fragment identifiers are not recognized. Instead, they are parsed as part of the path or query component, and :attr:`fragment` is set to ``None`` or the empty string (depending on the value of *missing_as_none*) in the return value." +msgstr "اگر آرگومان *allow_fragments* نادرست باشد، شناسه‌های قطعه (fragment) شناخته نمی‌شوند. در عوض، آن‌ها به عنوان بخشی از مسیر (path) یا جزء پرس‌وجو (query) تجزیه می‌شوند و :attr:`fragment` در مقدار بازگشتی روی ``None`` یا رشته‌ی خالی (بسته به مقدار *missing_as_none*) تنظیم می‌شود." msgid "The return value is a :term:`named tuple`, which means that its items can be accessed by index or as named attributes, which are:" msgstr "مقدار بازگشتی یک :term:`named tuple` است، بدین معنا که می‌توان به آیتم‌های آن با اندیس یا به‌عنوان ویژگی‌های نام‌دار دسترسی داشت، که عبارتند از:" @@ -165,8 +181,8 @@ msgstr "0" msgid "URL scheme specifier" msgstr "مشخص‌کننده‌ی طرح‌واره URL" -msgid "*scheme* parameter" -msgstr "پارامتر *scheme*" +msgid "*scheme* parameter or empty string [1]_" +msgstr "پارامتر *scheme* یا رشته‌ی خالی [1]_" msgid ":attr:`netloc`" msgstr ":attr:`netloc`" @@ -177,8 +193,8 @@ msgstr "1" msgid "Network location part" msgstr "بخش موقعیت شبکه" -msgid "empty string" -msgstr "رشته خالی" +msgid "``None`` or empty string [1]_" +msgstr "مقدار ``None`` یا رشته‌ی خالی [1]_" msgid ":attr:`path`" msgstr ":attr:`path`" @@ -189,6 +205,9 @@ msgstr "2" msgid "Hierarchical path" msgstr "مسیر سلسله‌مراتبی" +msgid "empty string" +msgstr "رشته خالی" + msgid ":attr:`query`" msgstr ":attr:`query`" @@ -213,8 +232,8 @@ msgstr ":attr:`username`" msgid "User name" msgstr "نام کاربری" -msgid ":const:`None`" -msgstr ":const:`None`" +msgid "``None``" +msgstr "``None``" msgid ":attr:`password`" msgstr ":attr:`password`" @@ -234,6 +253,9 @@ msgstr ":attr:`port`" msgid "Port number as integer, if present" msgstr "شماره‌ی پورت به‌صورت عدد صحیح، در صورت وجود" +msgid "Depending on the value of the *missing_as_none* argument." +msgstr "بسته به مقدار آرگومان *missing_as_none*." + msgid "Reading the :attr:`port` attribute will raise a :exc:`ValueError` if an invalid port is specified in the URL. See section :ref:`urlparse-result-object` for more information on the result object." msgstr "خواندن ویژگی :attr:`port` در صورتی که پورت نامعتبری در URL مشخص شده باشد، باعث پرتاب یک :exc:`ValueError` می‌شود. برای اطلاعات بیشتر درباره شیء نتیجه، بخش :ref:`urlparse-result-object` را ببینید." @@ -277,8 +299,8 @@ msgstr "قابلیت‌های تجزیه‌ی URLهای IPv6 افزوده شد." msgid "The fragment is now parsed for all URL schemes (unless *allow_fragments* is false), in accordance with :rfc:`3986`. Previously, an allowlist of schemes that support fragments existed." msgstr "قطعه (fragment) اکنون برای همه طرح‌های URL (مگر اینکه *allow_fragments* نادرست باشد)، مطابق با :rfc:`3986` تجزیه می‌شود. پیش‌تر، یک فهرست مجاز از طرح‌هایی که از قطعه‌ها پشتیبانی می‌کردند وجود داشت." -msgid "Out-of-range port numbers now raise :exc:`ValueError`, instead of returning :const:`None`." -msgstr "شماره‌های پورت خارج از محدوده، اکنون به جای برگرداندن :const:`None`، :exc:`ValueError` پرتاب می‌کنند." +msgid "Out-of-range port numbers now raise :exc:`ValueError`, instead of returning ``None``." +msgstr "شماره‌درگاه‌های خارج از محدوده اکنون به‌جای بازگرداندن ``None``، خطای :exc:`ValueError` پرتاب می‌کنند." msgid "Characters that affect netloc parsing under NFKC normalization will now raise :exc:`ValueError`." msgstr "نویسه‌هایی که بر تجزیه‌ی netloc تحت نرمال‌سازی NFKC تأثیر می‌گذارند، اکنون :exc:`ValueError` پرتاب می‌کنند." @@ -289,6 +311,9 @@ msgstr "نویسه‌های خط جدید و تب ASCII از URL حذف می‌ msgid "Leading WHATWG C0 control and space characters are stripped from the URL." msgstr "نویسه‌های کنترلی C0 و فاصله‌ی WHATWG از ابتدای URL حذف می‌شوند." +msgid "Added the *missing_as_none* parameter." +msgstr "پارامتر *missing_as_none* اضافه شد." + msgid "Parse a query string given as a string argument (data of type :mimetype:`application/x-www-form-urlencoded`). Data are returned as a dictionary. The dictionary keys are the unique query variable names and the values are lists of values for each name." msgstr "یک رشته‌ی کوئری داده‌شده به‌عنوان آرگومان رشته‌ای را تجزیه می‌کند (داده‌هایی از نوع :mimetype:`application/x-www-form-urlencoded`). داده‌ها به‌صورت یک دیکشنری بازگردانده می‌شوند. کلیدهای دیکشنری، نام‌های یکتای متغیرهای کوئری هستند و مقادیر، فهرست‌هایی از مقادیر برای هر نام هستند." @@ -328,8 +353,17 @@ msgstr "یک رشته‌ی پرس‌وجو (query string) را که به‌عن msgid "Use the :func:`urllib.parse.urlencode` function to convert such lists of pairs into query strings." msgstr "برای تبدیل چنین فهرست‌هایی از جفت‌ها به رشته‌های پرس‌وجو، از تابع :func:`urllib.parse.urlencode` استفاده کنید." -msgid "Construct a URL from a tuple as returned by ``urlsplit()``. The *parts* argument can be any five-item iterable. This may result in a slightly different, but equivalent URL, if the URL that was parsed originally had unnecessary delimiters (for example, a ``?`` with an empty query; the RFC states that these are equivalent)." -msgstr "یک URL را از یک تاپل که توسط ``urlsplit()`` برگردانده می‌شود بسازید. آرگومان *parts* می‌تواند هر پیمایش‌پذیری با پنج آیتم باشد. اگر URL اصلی تجزیه‌شده دارای جداکننده‌های غیرضروری باشد (برای مثال، یک ``?`` با پرس‌وجوی خالی؛ RFC تصریح می‌کند که این‌ها معادل هستند)، ممکن است یک URL کمی متفاوت، اما معادل به دست آید." +msgid "Construct a URL from a tuple as returned by :func:`urlsplit`. The *parts* argument can be any five-item iterable." +msgstr "یک نشانی‌وب از یک تاپلِ بازگردانده‌شده توسط :func:`urlsplit` می‌سازد. آرگومان *parts* می‌تواند هر شیء پیمایش‌پذیر پنج آیتمی باشد." + +msgid "This may result in a slightly different, but equivalent URL, if the URL that was parsed originally had unnecessary delimiters (for example, a ``?`` with an empty query; the RFC states that these are equivalent)." +msgstr "این کار ممکن است به یک URL کمی متفاوت اما معادل منجر شود، اگر URL که در ابتدا تجزیه شده است دارای جداکننده‌های غیرضروری بوده باشد (برای مثال، یک ``?`` با پرس‌وجوی خالی؛ استاندارد RFC بیان می‌کند که این موارد معادل هستند)." + +msgid "If *keep_empty* is true, empty strings are kept in the result (for example, a ``?`` for an empty query), only ``None`` components are omitted. This allows rebuilding a URL that was parsed with option ``missing_as_none=True``. By default, *keep_empty* is true if *parts* is the result of the :func:`urlsplit` call with ``missing_as_none=True``." +msgstr "اگر *keep_empty* برابر با True باشد، رشته‌های خالی در نتیجه حفظ می‌شوند (برای مثال، یک ``?`` برای یک پرس‌وجو خالی)، و فقط اجزای ``None`` حذف می‌شوند. این کار بازسازی نشانی‌وب‌ای را که با گزینه‌ی ``missing_as_none=True`` تجزیه شده است، امکان‌پذیر می‌سازد. به طور پیش‌فرض، اگر *parts* نتیجه‌ی فراخوانی :func:`urlsplit` با ``missing_as_none=True`` باشد، *keep_empty* برابر با True است." + +msgid "Added the *keep_empty* parameter." +msgstr "پارامتر *keep_empty* اضافه شد." msgid "This is similar to :func:`urlsplit`, but additionally splits the *path* component on *path* and *params*. This function returns a 6-item :term:`named tuple` :class:`ParseResult` or :class:`ParseResultBytes`. Its items are the same as for the :func:`!urlsplit` result, except that *params* is inserted at index 3, between *path* and *query*." msgstr "این تابع مشابه :func:`urlsplit` است، اما علاوه بر آن، کامپوننت *path* را به *path* و *params* تقسیم می‌کند. این تابع یک :term:`named tuple` ۶ آیتمی از نوع :class:`ParseResult` یا :class:`ParseResultBytes` برمی‌گرداند. آیتم‌های آن همان آیتم‌های نتیجه‌ی :func:`!urlsplit` هستند، با این تفاوت که *params* در اندیس ۳، بین *path* و *query* درج شده است." @@ -337,8 +371,11 @@ msgstr "این تابع مشابه :func:`urlsplit` است، اما علاوه msgid "This function is based on obsoleted :rfc:`1738` and :rfc:`1808`, which listed *params* as the main URL component. The more recent URL syntax allows parameters to be applied to each segment of the *path* portion of the URL (see :rfc:`3986`). :func:`urlsplit` should generally be used instead of :func:`urlparse`. A separate function is needed to separate the path segments and parameters." msgstr "این تابع مبتنی بر :rfc:`1738` و :rfc:`1808` منسوخ‌شده است، که *params* را به‌عنوان کامپوننت اصلی URL فهرست کرده بودند. سینتکس جدیدتر URL اجازه می‌دهد پارامترها به هر بخش از قسمت *path* URL اعمال شوند (به :rfc:`3986` مراجعه کنید). به‌طور کلی باید به‌جای :func:`urlparse` از :func:`urlsplit` استفاده شود. برای جدا کردن بخش‌های مسیر و پارامترها، به تابع جداگانه‌ای نیاز است." -msgid "Combine the elements of a tuple as returned by :func:`urlparse` into a complete URL as a string. The *parts* argument can be any six-item iterable. This may result in a slightly different, but equivalent URL, if the URL that was parsed originally had unnecessary delimiters (for example, a ? with an empty query; the RFC states that these are equivalent)." -msgstr "عناصر یک تاپل برگردانده‌شده توسط :func:`urlparse` را به یک URL کامل به‌صورت یک رشته ترکیب می‌کند. آرگومان *parts* می‌تواند هر پیمایش‌پذیری با شش آیتم باشد. این ممکن است منجر به URLای اندکی متفاوت، اما معادل شود، اگر URLای که در اصل تجزیه شده بود، جداکننده‌های غیرضروری داشته باشد (برای مثال، یک ? با پرس‌وجوی خالی؛ RFC بیان می‌کند که این‌ها معادل هستند)." +msgid "Combine the elements of a tuple as returned by :func:`urlparse` into a complete URL as a string. The *parts* argument can be any six-item iterable." +msgstr "عناصر یک تاپلِ بازگردانده‌شده توسط :func:`urlparse` را به شکل یک رشته در قالب یک نشانی‌وب کامل ترکیب می‌کند. آرگومان *parts* می‌تواند هر شیء پیمایش‌پذیر شش آیتمی باشد." + +msgid "If *keep_empty* is true, empty strings are kept in the result (for example, a ``?`` for an empty query), only ``None`` components are omitted. This allows rebuilding a URL that was parsed with option ``missing_as_none=True``. By default, *keep_empty* is true if *parts* is the result of the :func:`urlparse` call with ``missing_as_none=True``." +msgstr "اگر مقدار *keep_empty* برابر با True باشد، رشته‌های خالی در نتیجه حفظ می‌شوند (برای مثال، یک ``?`` برای یک پرس‌وجو خالی)، و فقط مؤلفه‌های ``None`` حذف می‌شوند. این کار امکان بازسازی یک URL که با گزینه‌ی ``missing_as_none=True`` تجزیه شده است را فراهم می‌کند. به‌طور پیش‌فرض، اگر *parts* نتیجه‌ی فراخوانی :func:`urlparse` با گزینه‌ی ``missing_as_none=True`` باشد، مقدار *keep_empty* برابر با True خواهد بود." msgid "Construct a full (\"absolute\") URL by combining a \"base URL\" (*base*) with another URL (*url*). Informally, this uses components of the base URL, in particular the addressing scheme, the network location and (part of) the path, to provide missing components in the relative URL. For example:" msgstr "با ترکیب یک «URL پایه» (*base*) با یک URL دیگر (*url*)، یک URL کامل («مطلق») بسازید. به‌طور غیررسمی، در این کار از کامپوننت‌های URL پایه، به‌ویژه طرح‌واره آدرس‌دهی، موقعیت شبکه و (بخشی از) مسیر، برای فراهم کردن کامپوننت‌های ناموجود در URL نسبی استفاده می‌شود. برای مثال:" @@ -367,8 +404,8 @@ msgstr "از آنجا که ممکن است یک نشانی وب مطلق (URL) msgid "Behavior updated to match the semantics defined in :rfc:`3986`." msgstr "رفتار به‌روزرسانی شد تا با معناشناسی تعریف‌شده در :rfc:`3986` مطابقت کند." -msgid "If *url* contains a fragment identifier, return a modified version of *url* with no fragment identifier, and the fragment identifier as a separate string. If there is no fragment identifier in *url*, return *url* unmodified and an empty string." -msgstr "اگر *url* شامل یک شناسه‌ی قطعه باشد، نسخه‌ی تغییرکرده‌ای از *url* را بدون شناسه‌ی قطعه، و شناسه‌ی قطعه را به‌صورت یک رشته‌ی جداگانه برمی‌گرداند. اگر شناسه‌ی قطعه‌ای در *url* وجود نداشته باشد، *url* را بدون تغییر و یک رشته‌ی خالی برمی‌گرداند." +msgid "If *url* contains a fragment identifier, return a modified version of *url* with no fragment identifier, and the fragment identifier as a separate string. If there is no fragment identifier in *url*, return *url* unmodified and an empty string (by default) or ``None`` if *missing_as_none* is true." +msgstr "اگر *url* شامل شناسه‌ی قطعه (fragment identifier) باشد، نسخه‌ی تغییریافته‌ای از *url* بدون شناسه‌ی قطعه، و شناسه‌ی قطعه را به عنوان یک رشته‌ی جداگانه برگردانید. اگر هیچ شناسه‌ی قطعه‌ای در *url* وجود نداشته باشد، *url* را دست‌نخورده و یک رشته‌ی خالی (به‌طور پیش‌فرض) یا اگر *missing_as_none* مقدار درست (true) باشد، ``None`` را برگردانید." msgid "The return value is a :term:`named tuple`, its items can be accessed by index or as named attributes:" msgstr "مقدار بازگشتی یک :term:`named tuple` است؛ می‌توان به آیتم‌های آن با اندیس یا به‌عنوان ویژگی‌های نام‌دار دسترسی پیدا کرد:" @@ -379,6 +416,9 @@ msgstr ":attr:`url`" msgid "URL with no fragment" msgstr "URL بدون قطعه (fragment)" +msgid "``None`` or empty string [3]_" +msgstr "مقدار ``None`` یا رشته‌ی خالی [3]_" + msgid "See section :ref:`urlparse-result-object` for more information on the result object." msgstr "برای اطلاعات بیشتر درباره‌ی شیء نتیجه، بخش :ref:`urlparse-result-object` را ببینید." @@ -394,8 +434,8 @@ msgstr "امنیت تجزیه‌ی URL" msgid "The :func:`urlsplit` and :func:`urlparse` APIs do not perform **validation** of inputs. They may not raise errors on inputs that other applications consider invalid. They may also succeed on some inputs that might not be considered URLs elsewhere. Their purpose is for practical functionality rather than purity." msgstr "APIهای :func:`urlsplit` و :func:`urlparse` **اعتبارسنجی** ورودی‌ها را انجام نمی‌دهند. ممکن است این APIها برای ورودی‌هایی که سایر برنامه‌ها آن‌ها را نامعتبر می‌دانند، خطا پرتاب نکنند. همچنین ممکن است برای برخی ورودی‌ها که ممکن است در جاهای دیگر به‌عنوان URL در نظر گرفته نشوند، با موفقیت عمل کنند. هدف آن‌ها عملکرد کاربردی است، نه خلوص." -msgid "Instead of raising an exception on unusual input, they may instead return some component parts as empty strings. Or components may contain more than perhaps they should." -msgstr "به‌جای پرتاب یک استثنا برای ورودی غیرمعمول، ممکن است در عوض برخی از اجزای کامپوننت‌ها را به‌صورت رشته‌های خالی برگردانند. یا ممکن است کامپوننت‌ها دارای محتوای بیشتری نسبت به آنچه شاید باید داشته باشند." +msgid "Instead of raising an exception on unusual input, they may instead return some component parts as empty strings or ``None`` (depending on the value of the *missing_as_none* argument). Or components may contain more than perhaps they should." +msgstr "آن‌ها به‌جای پرتاب کردن یک استثنا در ورودی‌های غیرمعمول، ممکن است برخی اجزا را به شکل رشته‌های خالی یا ``None`` برگردانند (بسته به مقدار آرگومان *missing_as_none*). یا ممکن است اجزا بیش از آنچه که احتمالاً باید، شامل اطلاعات باشند." msgid "We recommend that users of these APIs where the values may be used anywhere with security implications code defensively. Do some verification within your code before trusting a returned component part. Does that ``scheme`` make sense? Is that a sensible ``path``? Is there anything strange about that ``hostname``? etc." msgstr "توصیه می‌کنیم کاربران این APIها، در مواردی که مقادیر ممکن است در هر جایی با پیامدهای امنیتی استفاده شوند، به‌صورت دفاعی کد بنویسند. پیش از اعتماد به یک کامپوننت بازگشتی، در کد خود مقداری اعتبارسنجی انجام دهید. آیا آن ``scheme`` منطقی است؟ آیا آن ``path`` معقول است؟ آیا مورد عجیبی درباره آن ``hostname`` وجود دارد؟ و غیره." @@ -433,8 +473,8 @@ msgstr "نتایج تجزیه‌ی ساختاریافته" msgid "The result objects from the :func:`urlsplit`, :func:`urlparse` and :func:`urldefrag` functions are subclasses of the :class:`tuple` type. These subclasses add the attributes listed in the documentation for those functions, the encoding and decoding support described in the previous section, as well as an additional method:" msgstr "اشیاء نتیجه‌ی توابع :func:`urlsplit`، :func:`urlparse` و :func:`urldefrag` زیرکلاس‌هایی از نوع :class:`tuple` هستند. این زیرکلاس‌ها ویژگی‌های فهرست‌شده در مستندات آن توابع، پشتیبانی از کدگذاری و کدگشایی توصیف‌شده در بخش پیشین، و نیز یک متد اضافی را اضافه می‌کنند:" -msgid "Return the re-combined version of the original URL as a string. This may differ from the original URL in that the scheme may be normalized to lower case and empty components may be dropped. Specifically, empty parameters, queries, and fragment identifiers will be removed." -msgstr "نسخه‌ی بازترکیب‌شده‌ی URL اصلی را به‌صورت یک رشته برمی‌گرداند. این ممکن است با URL اصلی متفاوت باشد، به این صورت که طرح‌واره ممکن است به حروف کوچک نرمال‌سازی شود و کامپوننت‌های خالی ممکن است حذف شوند. به‌طور مشخص، پارامترهای خالی، پرس‌وجوهای خالی (queries) و شناسه‌های خالی قطعه (fragment identifiers) حذف خواهند شد." +msgid "Return the re-combined version of the original URL as a string. This may differ from the original URL in that the scheme may be normalized to lower case and empty components may be dropped. Specifically, empty parameters, queries, and fragment identifiers will be removed unless the URL was parsed with ``missing_as_none=True``." +msgstr "نسخه‌ی دوباره‌ترکیب‌شده‌ی URL اصلی را به عنوان یک رشته برگردانید. این مقدار ممکن است با URL اصلی از این جهت متفاوت باشد که طرح‌واره ممکن است به حروف کوچک نرمال‌سازی شود و اجزای خالی حذف شوند. به‌طور خاص، پارامترها، پرس‌وجوها و شناسه‌های قطعه‌ی خالی حذف خواهند شد، مگر اینکه URL با ``missing_as_none=True`` تجزیه شده باشد." msgid "For :func:`urldefrag` results, only empty fragment identifiers will be removed. For :func:`urlsplit` and :func:`urlparse` results, all noted changes will be made to the URL returned by this method." msgstr "برای نتایج :func:`urldefrag`، فقط شناسه‌های قطعه خالی حذف خواهند شد. برای نتایج :func:`urlsplit` و :func:`urlparse`، همه تغییرات ذکرشده روی URL برگردانده‌شده توسط این متد اعمال خواهند شد." @@ -612,3 +652,12 @@ msgstr "تجزیه" msgid "relative" msgstr "نسبی" + +#~ msgid "The delimiters as shown above are not part of the result, except for a leading slash in the *path* component, which is retained if present." +#~ msgstr "جداکننده‌های نشان‌داده‌شده در بالا بخشی از نتیجه نیستند، به‌جز اسلش آغازین در کامپوننت *path* که در صورت وجود حفظ می‌شود." + +#~ msgid ":const:`None`" +#~ msgstr ":const:`None`" + +#~ msgid "Combine the elements of a tuple as returned by :func:`urlparse` into a complete URL as a string. The *parts* argument can be any six-item iterable. This may result in a slightly different, but equivalent URL, if the URL that was parsed originally had unnecessary delimiters (for example, a ? with an empty query; the RFC states that these are equivalent)." +#~ msgstr "عناصر یک تاپل برگردانده‌شده توسط :func:`urlparse` را به یک URL کامل به‌صورت یک رشته ترکیب می‌کند. آرگومان *parts* می‌تواند هر پیمایش‌پذیری با شش آیتم باشد. این ممکن است منجر به URLای اندکی متفاوت، اما معادل شود، اگر URLای که در اصل تجزیه شده بود، جداکننده‌های غیرضروری داشته باشد (برای مثال، یک ? با پرس‌وجوی خالی؛ RFC بیان می‌کند که این‌ها معادل هستند)." diff --git a/library/uuid.po b/library/uuid.po index 30abbb6d..7a8e40c1 100644 --- a/library/uuid.po +++ b/library/uuid.po @@ -9,12 +9,13 @@ # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 # Neev Modh <141932641+neevmodh@users.noreply.github.com>, 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-27 04:09+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-08-28 11:23+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -49,8 +50,8 @@ msgstr "UUID به‌صورت ایمن برای چندپردازشی تولید msgid "The platform does not provide information on whether the UUID was generated safely or not." msgstr "پلتفرم اطلاعاتی درباره‌ی اینکه UUID به‌صورت ایمن تولید شده است یا خیر ارائه نمی‌دهد." -msgid "Create a UUID from either a string of 32 hexadecimal digits, a 16-byte :class:`bytes` object in big-endian order as the *bytes* argument, a 16-byte :class:`bytes` object in little-endian order as the *bytes_le* argument, a tuple of six integers (32-bit *time_low*, 16-bit *time_mid*, 16-bit *time_hi_version*, 8-bit *clock_seq_hi_variant*, 8-bit *clock_seq_low*, 48-bit *node*) as the *fields* argument, or a single 128-bit integer as the *int* argument. When a string of hex digits is given, curly braces, hyphens, and a URN prefix are all optional. For example, these expressions all yield the same UUID::" -msgstr "یک UUID را از یکی از این موارد ایجاد کنید: رشته‌ای از ۳۲ رقم مبنای شانزده، شیء :class:`bytes` ۱۶ بایتی به ترتیب big-endian به‌عنوان آرگومان *bytes*، شیء :class:`bytes` ۱۶ بایتی به ترتیب little-endian به‌عنوان آرگومان *bytes_le*، یک تاپل از شش عدد صحیح (*time_low* ۳۲ بیتی، *time_mid* ۱۶ بیتی، *time_hi_version* ۱۶ بیتی، *clock_seq_hi_variant* ۸ بیتی، *clock_seq_low* ۸ بیتی، *node* ۴۸ بیتی) به‌عنوان آرگومان *fields*، یا یک عدد صحیح ۱۲۸ بیتی به‌عنوان آرگومان *int*. هنگامی که رشته‌ای از رقم‌های مبنای شانزده داده شود، آکولادها، خط‌تیره‌ها و پیشوند URN همگی اختیاری هستند. برای مثال، این عبارت‌ها همگی یک UUID یکسان را برمی‌گردانند::" +msgid "Create a UUID from either a string of 32 hexadecimal digits, a string of 16 bytes in big-endian order as the *bytes* argument, a string of 16 bytes in little-endian order as the *bytes_le* argument, a tuple of six integers (32-bit *time_low*, 16-bit *time_mid*, 16-bit *time_hi_version*, 8-bit *clock_seq_hi_variant*, 8-bit *clock_seq_low*, 48-bit *node*) as the *fields* argument, or a single 128-bit integer as the *int* argument. When a string of hex digits is given, curly braces, hyphens, and a URN prefix are all optional. For example, these expressions all yield the same UUID::" +msgstr "یک UUID ایجاد کنید از طریق هر یک از موارد زیر: یک رشته شامل ۳۲ رقم در مبنای شانزده، یک رشته از ۱۶ بایت با ترتیب بزرگ‌اندیان به عنوان آرگومان *bytes*، یک رشته از ۱۶ بایت با ترتیب کوچک‌اندیان به عنوان آرگومان *bytes_le*، یک تاپل از شش عدد صحیح (*time_low* سی‌ودوبیتی، *time_mid* شانزده‌بیتی، *time_hi_version* شانزده‌بیتی، *clock_seq_hi_variant* هشت‌بیتی، *clock_seq_low* هشت‌بیتی، *node* چهل‌وهشت‌بیتی) به عنوان آرگومان *fields*، یا یک عدد صحیح ۱۲۸-بیتی منفرد به عنوان آرگومان *int*. هنگامی که رشته‌ای از ارقام مبنای شانزده داده می‌شود، آکولادها، خط تیره و پیشوند URN همگی اختیاری هستند. برای مثال، این عبارت‌ها همگی همان UUID را تولید می‌کنند::" msgid "" "UUID('{12345678-1234-5678-1234-567812345678}')\n" @@ -83,11 +84,11 @@ msgstr "``str(uuid)`` رشته‌ای به شکل ``12345678-1234-5678-1234-5678 msgid ":class:`UUID` instances have these read-only attributes:" msgstr "نمونه‌های :class:`UUID` این ویژگی‌های فقط‌خواندنی را دارند:" -msgid "The UUID as a 16-byte :class:`bytes` object (containing the six integer fields in big-endian byte order)." -msgstr "UUID به‌عنوان یک شیء :class:`bytes` ۱۶ بایتی (شامل شش فیلد عدد صحیح با ترتیب بایت big-endian)." +msgid "The UUID as a 16-byte string (containing the six integer fields in big-endian byte order)." +msgstr "شیء UUID به صورت یک رشته‌ی ۱۶-بایتی (حاوی شش فیلد عدد صحیح با ترتیب بایت بزرگ‌اندیان)." -msgid "The UUID as a 16-byte :class:`bytes` object (with *time_low*, *time_mid*, and *time_hi_version* in little-endian byte order)." -msgstr "UUID به‌صورت یک شیء :class:`bytes` ۱۶ بایتی (با *time_low*، *time_mid* و *time_hi_version* در ترتیب بایت‌های little-endian)." +msgid "The UUID as a 16-byte string (with *time_low*, *time_mid*, and *time_hi_version* in little-endian byte order)." +msgstr "شیء UUID به صورت یک رشته‌ی ۱۶-بایتی (با فیلدهای *time_low*، *time_mid* و *time_hi_version* با ترتیب بایت کوچک‌اندیان)." msgid "A tuple of the six integer fields of the UUID, which are also available as six individual attributes and two derived attributes:" msgstr "تاپلی از ۶ فیلد عدد صحیحی UUID، که به‌صورت ۶ ویژگی جداگانه و ۲ ویژگی مشتق‌شده نیز در دسترس هستند:" @@ -296,7 +297,7 @@ msgid "" ">>> x.bytes\n" "b'\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f'\n" "\n" -">>> # make a UUID from a 16-byte bytes object\n" +">>> # make a UUID from a 16-byte string\n" ">>> uuid.UUID(bytes=x.bytes)\n" "UUID('00010203-0405-0607-0809-0a0b0c0d0e0f')\n" "\n" @@ -328,60 +329,60 @@ msgid "" msgstr "" ">>> import uuid\n" "\n" -">>> # make a UUID based on the host ID and current time\n" +">>> # ساخت یک UUID بر اساس شناسه‌ی میزبان و زمان فعلی\n" ">>> uuid.uuid1()\n" "UUID('a8098c1a-f86e-11da-bd1a-00112444be1e')\n" "\n" -">>> # make a UUID using an MD5 hash of a namespace UUID and a name\n" +">>> # ساخت یک UUID با استفاده از هش MD5 از یک فضای نام UUID و یک نام\n" ">>> uuid.uuid3(uuid.NAMESPACE_DNS, 'python.org')\n" "UUID('6fa459ea-ee8a-3ca4-894e-db77e160355e')\n" "\n" -">>> # make a random UUID\n" +">>> # ساخت یک UUID تصادفی\n" ">>> uuid.uuid4()\n" "UUID('16fd2706-8baf-433b-82eb-8c7fada847da')\n" "\n" -">>> # make a UUID using a SHA-1 hash of a namespace UUID and a name\n" +">>> # ساخت یک UUID با استفاده از هش SHA-1 از یک فضای نام UUID و یک نام\n" ">>> uuid.uuid5(uuid.NAMESPACE_DNS, 'python.org')\n" "UUID('886313e1-3b8a-5372-9b90-0c9aee199e5d')\n" "\n" -">>> # make a UUID from a string of hex digits (braces and hyphens ignored)\n" +">>> # ساخت یک UUID از رشته‌ای از ارقام مبنای شانزده (آکولادها و خط تیره نادیده گرفته می‌شوند)\n" ">>> x = uuid.UUID('{00010203-0405-0607-0809-0a0b0c0d0e0f}')\n" "\n" -">>> # convert a UUID to a string of hex digits in standard form\n" +">>> # تبدیل یک UUID به رشته‌ای از ارقام مبنای شانزده در قالب استاندارد\n" ">>> str(x)\n" "'00010203-0405-0607-0809-0a0b0c0d0e0f'\n" "\n" -">>> # get the raw 16 bytes of the UUID\n" +">>> # دریافت ۱۶ بایت خام UUID\n" ">>> x.bytes\n" "b'\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f'\n" "\n" -">>> # make a UUID from a 16-byte bytes object\n" +">>> # ساخت یک UUID از یک رشته‌ی ۱۶-بایتی\n" ">>> uuid.UUID(bytes=x.bytes)\n" "UUID('00010203-0405-0607-0809-0a0b0c0d0e0f')\n" "\n" -">>> # get the Nil UUID\n" +">>> # دریافت Nil UUID\n" ">>> uuid.NIL\n" "UUID('00000000-0000-0000-0000-000000000000')\n" "\n" -">>> # get the Max UUID\n" +">>> # دریافت Max UUID\n" ">>> uuid.MAX\n" "UUID('ffffffff-ffff-ffff-ffff-ffffffffffff')\n" "\n" -">>> # same as UUIDv1 but with fields reordered to improve DB locality\n" +">>> # مشابه UUIDv1 اما با فیلدهای مرتب‌شده برای بهبود محلی‌سازی پایگاه داده\n" ">>> uuid.uuid6()\n" "UUID('1f0799c0-98b9-62db-92c6-a0d365b91053')\n" "\n" -">>> # get UUIDv7 creation (local) time as a timestamp in milliseconds\n" +">>> # دریافت زمان ایجاد (محلی) UUIDv7 به عنوان یک برچسب زمانی بر حسب میلی‌ثانیه\n" ">>> u = uuid.uuid7()\n" ">>> u.time\n" "1743936859822\n" "\n" -">>> # get UUIDv7 creation (local) time as a datetime object\n" +">>> # دریافت زمان ایجاد (محلی) UUIDv7 به عنوان یک شیء datetime\n" ">>> import datetime as dt\n" ">>> dt.datetime.fromtimestamp(u.time / 1000)\n" "datetime.datetime(...)\n" "\n" -">>> # make a UUID with custom blocks\n" +">>> # ساخت یک UUID با بلوک‌های سفارشی\n" ">>> uuid.uuid8(0x12345678, 0x9abcdef0, 0x11223344)\n" "UUID('00001234-5678-8ef0-8000-000011223344')" diff --git a/library/venv.po b/library/venv.po index 9d9e6b09..b96c3e0c 100644 --- a/library/venv.po +++ b/library/venv.po @@ -7,12 +7,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-08-28 10:14+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -368,6 +369,9 @@ msgstr "``inc_path`` - مسیر include (include path) برای محیط مجا msgid "``lib_path`` - The purelib path for the virtual environment." msgstr "``lib_path`` - مسیر purelib برای محیط مجازی." +msgid "``platlib_path`` - The platlib path for the virtual environment." +msgstr "``platlib_path`` - مسیر platlib برای محیط مجازی." + msgid "``bin_path`` - The script path for the virtual environment." msgstr "``bin_path`` - مسیر اسکریپت برای محیط مجازی." @@ -386,6 +390,9 @@ msgstr "از :ref:`طرح‌واره نصب sysconfig ` مر msgid "The attribute ``lib_path`` was added to the context, and the context object was documented." msgstr "ویژگی ``lib_path`` به زمینه افزوده شد و شیء زمینه مستند شد." +msgid "The attribute ``platlib_path`` was added to the context." +msgstr "ویژگی ``platlib_path`` به زمینه اضافه شد." + msgid "Creates the ``pyvenv.cfg`` configuration file in the environment." msgstr "پرونده پیکربندی ``pyvenv.cfg`` را در محیط ایجاد می‌کند." diff --git a/library/warnings.po b/library/warnings.po index d3f50d9a..dae16e43 100644 --- a/library/warnings.po +++ b/library/warnings.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 13:23+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -207,14 +208,14 @@ msgstr "``\"once\"``" msgid "print only the first occurrence of matching warnings, regardless of location" msgstr "فقط اولین رخداد هشدارهای منطبق را چاپ می‌کند، صرف‌نظر از مکان" -msgid "*message* is a string containing a regular expression that the start of the warning message must match, case-insensitively. In :option:`-W` and :envvar:`PYTHONWARNINGS`, *message* is a literal string that the start of the warning message must contain (case-insensitively), ignoring any whitespace at the start or end of *message*." -msgstr "*message* یک رشته حاوی یک عبارت باقاعده است که ابتدای پیام هشدار باید بدون حساسیت به بزرگی و کوچکی حروف با آن مطابقت داشته باشد. در :option:`-W` و :envvar:`PYTHONWARNINGS`، *message* یک رشته‌ی لفظی است که ابتدای پیام هشدار باید شامل آن باشد (بدون حساسیت به بزرگی و کوچکی حروف)، و هر فضای سفید در ابتدا یا انتهای *message* نادیده گرفته می‌شود." +msgid "*message* is a string containing a regular expression that the start of the warning message must match, case-insensitively. In :option:`-W` and :envvar:`PYTHONWARNINGS`, if *message* starts and ends with a forward slash (``/``), it specifies a regular expression as above; otherwise it is a literal string that the start of the warning message must match (case-insensitively), ignoring any whitespace at the start or end of *message*." +msgstr "*message* رشته‌ای است که شامل یک عبارت باقاعده است که ابتدای پیام هشدار باید با آن مطابقت داشته باشد (بدون حساسیت به بزرگ و کوچک بودن حروف). در :option:`-W` و :envvar:`PYTHONWARNINGS`، اگر *message* با یک اسلش رو به جلو (``/``) شروع و تمام شود، یک عبارت باقاعده را همان‌طور که در بالا ذکر شد مشخص می‌کند؛ در غیر این صورت، این یک رشته‌ی لفظی است که ابتدای پیام هشدار باید با آن مطابقت داشته باشد (بدون حساسیت به بزرگی و کوچکی حروف)، در حالی که هرگونه فضای خالی در ابتدا یا انتهای *message* نادیده گرفته می‌شود." msgid "*category* is a class (a subclass of :exc:`Warning`) of which the warning category must be a subclass in order to match." msgstr "*category* یک کلاس (یک زیرکلاس از :exc:`Warning`) است که دسته‌بندی هشدار باید برای تطابق، زیرکلاسی از آن باشد." -msgid "*module* is a string containing a regular expression that the start of the fully qualified module name must match, case-sensitively. In :option:`-W` and :envvar:`PYTHONWARNINGS`, *module* is a literal string that the fully qualified module name must be equal to (case-sensitively), ignoring any whitespace at the start or end of *module*." -msgstr "*module* رشته‌ای حاوی عبارت باقاعده است که آغاز نام کامل ماژول باید با آن مطابقت داشته باشد، و این مطابقت حساس به بزرگی و کوچکی حروف است. در :option:`-W` و :envvar:`PYTHONWARNINGS`، *module* رشته‌ای لفظی است که نام کامل ماژول باید با آن برابر باشد (حساس به بزرگی و کوچکی حروف)، و هرگونه فضای سفید در آغاز یا پایان *module* نادیده گرفته می‌شود." +msgid "*module* is a string containing a regular expression that the start of the fully qualified module name must match, case-sensitively. In :option:`-W` and :envvar:`PYTHONWARNINGS`, if *module* starts and ends with a forward slash (``/``), it specifies a regular expression as above; otherwise it is a literal string that the fully qualified module name must be equal to (case-sensitively), ignoring any whitespace at the start or end of *module*." +msgstr "*module* رشته‌ای است که شامل یک عبارت باقاعده است که ابتدای نام کامل ماژول باید با آن مطابقت داشته باشد (با حساسیت به بزرگ و کوچک بودن حروف). در :option:`-W` و :envvar:`PYTHONWARNINGS`، اگر *module* با یک اسلش رو به جلو (``/``) شروع و تمام شود، یک عبارت باقاعده را همان‌طور که در بالا ذکر شد مشخص می‌کند؛ در غیر این صورت، این یک رشته‌ی لفظی است که نام کامل ماژول باید با آن برابر باشد (با حساسیت به بزرگی و کوچکی حروف)، در حالی که هرگونه فضای خالی در ابتدا یا انتهای *module* نادیده گرفته می‌شود." msgid "*lineno* is an integer that the line number where the warning occurred must match, or ``0`` to match all line numbers." msgstr "*lineno* یک عدد صحیح است که شماره‌ی سطری که هشدار در آن رخ داده است باید با آن مطابقت کند، یا ``0`` برای مطابقت با همه‌ی شماره‌های خط." @@ -513,8 +514,8 @@ msgstr "*skip_file_prefixes* افزوده شد." msgid "This is a low-level interface to the functionality of :func:`warn`, passing in explicitly the message, category, filename and line number, and optionally other arguments. *message* must be a string and *category* a subclass of :exc:`Warning` or *message* may be a :exc:`Warning` instance, in which case *category* will be ignored." msgstr "این رابطی سطح پایین برای قابلیت :func:`warn` است که پیام، دسته، نام پرونده و شماره خط را به‌صورت صریح و سایر آرگومان‌ها را به‌اختیار دریافت می‌کند. *message* باید یک رشته باشد و *category* یک زیرکلاس از :exc:`Warning`، یا ممکن است *message* یک نمونه از :exc:`Warning` باشد که در این صورت از *category* چشم‌پوشی می‌شود." -msgid "*module*, if supplied, should be the module name. If no module is passed, the filename with ``.py`` stripped is used." -msgstr "*module*، در صورت ارائه، باید نام ماژول باشد. اگر ماژولی ارسال نشود، از نام پرونده با حذف ``.py`` استفاده می‌شود." +msgid "*module*, if supplied, should be the module name. If no module is passed, the module regular expression in :ref:`warnings filter ` will be tested against the module names constructed from the path components starting from all parent directories (with ``/__init__.py``, ``.py`` and, on Windows, ``.pyw`` stripped) and against the filename with ``.py`` stripped. For example, when the filename is ``'/path/to/package/module.py'``, it will be tested against ``'path.to.package.module'``, ``'to.package.module'`` ``'package.module'``, ``'module'``, and ``'/path/to/package/module'``." +msgstr "پارامتر *module*، در صورت ارائه، باید نام ماژول باشد. اگر هیچ ماژولی ارسال نشود، عبارت باقاعده‌ی ماژول در :ref:`warnings filter ` در برابر نام‌های ماژولی که از اجزای مسیر شروع‌شده از تمام پوشه‌های والد (با حذف ``/__init__.py``، ``.py`` و در ویندوز، ``.pyw``) ساخته شده‌اند و همچنین در برابر نام‌پرونده با حذف ``.py`` آزمایش خواهد شد. برای مثال، وقتی نام‌پرونده ``'/path/to/package/module.py'`` باشد، در برابر ``'path.to.package.module'``، ``'to.package.module'``، ``'package.module'``، ``'module'`` و ``'/path/to/package/module'`` آزمایش می‌شود." msgid "*registry*, if supplied, should be the ``__warningregistry__`` dictionary of the module. If no registry is passed, each warning is treated as the first occurrence, that is, filter actions ``\"default\"``, ``\"module\"`` and ``\"once\"`` are handled as ``\"always\"``." msgstr "*registry*، در صورت ارائه، باید دیکشنری ``__warningregistry__`` ماژول باشد. اگر هیچ registry ارسال نشود، با هر هشدار به‌عنوان نخستین رخداد رفتار می‌شود، یعنی اقدام‌های فیلتر ``\"default\"``، ``\"module\"`` و ``\"once\"`` به‌صورت ``\"always\"`` مدیریت می‌شوند." @@ -525,6 +526,9 @@ msgstr "*module_globals*، در صورت ارائه شدن، باید فضای msgid "Add the *source* parameter." msgstr "پارامتر *source* اضافه شد." +msgid "If no module is passed, test the filter regular expression against module names created from the path, not only the path itself." +msgstr "اگر هیچ ماژولی ارسال نشود، عبارت باقاعده‌ی صافی در برابر نام‌های ماژول ایجاد شده از مسیر (و نه فقط خود مسیر) آزموده می‌شود." + msgid "Write a warning to a file. The default implementation calls ``formatwarning(message, category, filename, lineno, line)`` and writes the resulting string to *file*, which defaults to :data:`sys.stderr`. You may replace this function with any callable by assigning to ``warnings.showwarning``. *line* is a line of source code to be included in the warning message; if *line* is not supplied, :func:`showwarning` will try to read the line specified by *filename* and *lineno*." msgstr "هشداری را در یک پرونده می‌نویسد. پیاده‌سازی پیش‌فرض، ``formatwarning(message, category, filename, lineno, line)`` را فراخوانی می‌کند و رشته‌ی حاصل را در *file* می‌نویسد که به‌طور پیش‌فرض :data:`sys.stderr` است. شما می‌توانید این تابع را با هر شیء فراخوانی‌پذیر، از طریق انتساب به ``warnings.showwarning`` جایگزین کنید. *line* یک خط از کد منبع است که در پیام هشدار گنجانده می‌شود؛ اگر *line* ارائه نشده باشد، :func:`showwarning` تلاش می‌کند خط مشخص‌شده توسط *filename* و *lineno* را بخواند." @@ -620,9 +624,15 @@ msgstr "``line``: سطری از کد منبع (در صورت موجود بودن msgid "``source``: the original object that generated the warning (if available), or ``None``" msgstr "``source``: شیء اصلی که هشدار را تولید کرده است (در صورت موجود بودن)، یا ``None``" +msgid "``module``: the module name where the warning occurred (:class:`str`), or ``None``" +msgstr "``module``: نام ماژولی که هشدار در آن رخ داده است (:class:`str`)، یا ``None``" + msgid "The ``source`` attribute was added." msgstr "ویژگی ``source`` اضافه شد." +msgid "The ``module`` attribute was added." +msgstr "ویژگی ``module`` اضافه شد." + msgid "The type of these objects is not specified and may change; only the presence of these attributes is guaranteed." msgstr "نوع این اشیاء مشخص نشده است و ممکن است تغییر کند؛ فقط وجود این ویژگی‌ها تضمین می‌شود." @@ -667,3 +677,6 @@ msgstr "پرچم :data:`sys.flags.context_aware_warnings` و استفاده از msgid "warnings" msgstr "هشدارها" + +#~ msgid "*module*, if supplied, should be the module name. If no module is passed, the filename with ``.py`` stripped is used." +#~ msgstr "*module*، در صورت ارائه، باید نام ماژول باشد. اگر ماژولی ارسال نشود، از نام پرونده با حذف ``.py`` استفاده می‌شود." diff --git a/library/wave.po b/library/wave.po index f2592144..8179e304 100644 --- a/library/wave.po +++ b/library/wave.po @@ -7,12 +7,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 12:38+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -29,17 +30,23 @@ msgstr ":mod:`!wave` --- خواندن و نوشتن پرونده‌های WAV" msgid "**Source code:** :source:`Lib/wave.py`" msgstr "**کد منبع:** :source:`Lib/wave.py`" -msgid "The :mod:`!wave` module provides a convenient interface to the Waveform Audio \"WAVE\" (or \"WAV\") file format. Only uncompressed PCM encoded wave files are supported." -msgstr "ماژول :mod:`!wave` رابط مناسبی برای قالب پرونده Waveform Audio با نام «WAVE» (یا «WAV») فراهم می‌کند. فقط پرونده‌های wave کدگذاری‌شده با PCM و فشرده‌نشده پشتیبانی می‌شوند." +msgid "The :mod:`!wave` module provides a convenient interface to the Waveform Audio \"WAVE\" (or \"WAV\") file format." +msgstr "ماژول :mod:`!wave` یک رابط کاربرپسند برای فرمت پرونده‌ی صوتی Waveform Audio با نام «WAVE» (یا «WAV») فراهم می‌کند." + +msgid "The module supports uncompressed PCM and IEEE floating-point WAV formats." +msgstr "این ماژول از فرمت‌های صوتی PCM فشرده‌نشده و ممیز شناور IEEE پشتیبانی می‌کند." msgid "Support for ``WAVE_FORMAT_EXTENSIBLE`` headers was added, provided that the extended format is ``KSDATAFORMAT_SUBTYPE_PCM``." msgstr "پشتیبانی از سرآیندهای ``WAVE_FORMAT_EXTENSIBLE`` افزوده شد، مشروط بر اینکه قالب گسترش‌یافته ``KSDATAFORMAT_SUBTYPE_PCM`` باشد." +msgid "Support for reading and writing ``WAVE_FORMAT_IEEE_FLOAT`` files was added." +msgstr "پشتیبانی از خواندن و نوشتن پرونده‌های ``WAVE_FORMAT_IEEE_FLOAT`` اضافه شد." + msgid "The :mod:`!wave` module defines the following function and exception:" msgstr "ماژول :mod:`!wave` تابع و استثنای زیر را تعریف می‌کند:" -msgid "If *file* is a string, open the file by that name, otherwise treat it as a file-like object. *mode* can be:" -msgstr "اگر *file* یک رشته باشد، پرونده با آن نام باز می‌شود؛ در غیر این صورت، با آن به‌عنوان یک شیء شبه‌پرونده رفتار می‌شود. *mode* می‌تواند یکی از موارد زیر باشد:" +msgid "If *file* is a string, a :term:`path-like object` or a :term:`bytes-like object` open the file by that name, otherwise treat it as a file-like object. *mode* can be:" +msgstr "اگر *file* یک رشته، یک :term:`شیء شبه‌مسیر ` یا یک :term:`شیء شبه‌بایت ` باشد، پرونده را با آن نام باز کنید، در غیر این صورت با آن مانند یک شیء شبه‌پرونده رفتار کنید. *mode* می‌تواند به صورت زیر باشد:" msgid "``'rb'``" msgstr "``'rb'``" @@ -68,9 +75,21 @@ msgstr "می‌توان از تابع :func:`.open` در یک دستور :keywor msgid "Added support for unseekable files." msgstr "پشتیبانی از پرونده‌های غیرقابل مکان‌یابی (unseekable) افزوده شد." +msgid "Added support for :term:`path-like objects ` and :term:`bytes-like objects `." +msgstr "پشتیبانی از :term:`شیء شبه‌مسیر ` و :term:`شیء شبه‌بایت ` اضافه شد." + msgid "An error raised when something is impossible because it violates the WAV specification or hits an implementation deficiency." msgstr "خطایی که هنگامی پرتاب می‌شود که انجام کاری به دلیل نقض مشخصات WAV یا مواجهه با نقصی در پیاده‌سازی غیرممکن باشد." +msgid "Format code for uncompressed PCM audio." +msgstr "کد فرمت برای صوتی PCM فشرده‌نشده." + +msgid "Format code for IEEE floating-point audio." +msgstr "کد فرمت برای صوتی ممیز شناور IEEE." + +msgid "Format code for WAVE extensible headers." +msgstr "کد فرمت برای سرآیندهای قابل‌توسعه‌ی WAVE." + msgid "Wave_read Objects" msgstr "اشیای Wave_read" @@ -95,6 +114,12 @@ msgstr "فرکانس نمونه‌برداری را برمی‌گرداند." msgid "Returns number of audio frames." msgstr "تعداد فریم‌های صوتی را برمی‌گرداند." +msgid "Returns the frame format code." +msgstr "کد فرمت قاب را برمی‌گرداند." + +msgid "This is one of :data:`WAVE_FORMAT_PCM`, :data:`WAVE_FORMAT_IEEE_FLOAT`, or :data:`WAVE_FORMAT_EXTENSIBLE`." +msgstr "این مورد یکی از مقادیر :data:`WAVE_FORMAT_PCM`، :data:`WAVE_FORMAT_IEEE_FLOAT` یا :data:`WAVE_FORMAT_EXTENSIBLE` است." + msgid "Returns compression type (``'NONE'`` is the only supported type)." msgstr "نوع فشرده‌سازی را برمی‌گرداند (``'NONE'`` تنها نوع پشتیبانی‌شده است)." @@ -110,18 +135,6 @@ msgstr "حداکثر *n* فریم صوتی را می‌خواند و به‌عن msgid "Rewind the file pointer to the beginning of the audio stream." msgstr "اشاره‌گر پرونده را به ابتدای جریان صوتی برگردانید." -msgid "The following two methods are defined for compatibility with the old :mod:`!aifc` module, and don't do anything interesting." -msgstr "دو متد زیر برای سازگاری با ماژول قدیمی :mod:`!aifc` تعریف شده‌اند و کار جالبی انجام نمی‌دهند." - -msgid "Returns ``None``." -msgstr "``None`` را برمی‌گرداند." - -msgid "The method only existed for compatibility with the :mod:`!aifc` module which has been removed in Python 3.13." -msgstr "این متد تنها برای سازگاری با ماژول :mod:`!aifc` وجود داشت که در پایتون 3.13 حذف شده است." - -msgid "Raise an error." -msgstr "یک خطا پرتاب کنید." - msgid "The following two methods define a term \"position\" which is compatible between them, and is otherwise implementation dependent." msgstr "دو متد زیر اصطلاح «position» را تعریف می‌کنند که بین آن‌ها سازگار است و در غیر این صورت وابسته به پیاده‌سازی است." @@ -158,6 +171,9 @@ msgstr "تعداد کانال‌ها را برمی‌گرداند." msgid "Set the sample width to *n* bytes." msgstr "عرض نمونه را روی *n* بایت تنظیم کنید." +msgid "For :data:`WAVE_FORMAT_IEEE_FLOAT`, only 4-byte (32-bit) and 8-byte (64-bit) sample widths are supported." +msgstr "برای :data:`WAVE_FORMAT_IEEE_FLOAT`، فقط پهنای نمونه‌ی ۴ بایتی (۳۲ بیتی) و ۸ بایتی (۶۴ بیتی) پشتیبانی می‌شوند." + msgid "Return the sample width in bytes." msgstr "عرض نمونه را بر حسب بایت برمی‌گرداند." @@ -185,8 +201,26 @@ msgstr "نوع فشرده‌سازی را برمی‌گرداند (``'NONE'``)." msgid "Return the human-readable compression type name." msgstr "نام نوع فشرده‌سازی قابل‌خواندن برای انسان را برمی‌گرداند." -msgid "The *tuple* should be ``(nchannels, sampwidth, framerate, nframes, comptype, compname)``, with values valid for the ``set*()`` methods. Sets all parameters." -msgstr "*تاپل* باید به‌صورت ``(nchannels, sampwidth, framerate, nframes, comptype, compname)`` باشد، با مقادیری معتبر برای متدهای ``set*()``. تمام پارامترها را تنظیم می‌کند." +msgid "Set the frame format code." +msgstr "کد قالب قاب را تنظیم کنید." + +msgid "Supported values are :data:`WAVE_FORMAT_PCM` and :data:`WAVE_FORMAT_IEEE_FLOAT`." +msgstr "مقادیر پشتیبانی‌شده عبارتند از :data:`WAVE_FORMAT_PCM` و :data:`WAVE_FORMAT_IEEE_FLOAT`." + +msgid "When setting :data:`WAVE_FORMAT_IEEE_FLOAT`, the sample width must be 4 or 8 bytes." +msgstr "هنگام تنظیم :data:`WAVE_FORMAT_IEEE_FLOAT`، پهنای نمونه باید ۴ یا ۸ بایت باشد." + +msgid "Return the current frame format code." +msgstr "کد قالب قاب فعلی را برمی‌گرداند." + +msgid "The *tuple* should be ``(nchannels, sampwidth, framerate, nframes, comptype, compname, format)``, with values valid for the ``set*()`` methods. Sets all parameters." +msgstr "تاپل باید به شکل ``(nchannels, sampwidth, framerate, nframes, comptype, compname, format)`` باشد و مقادیر آن برای متدهای ``set*()`` معتبر باشند. تمام پارامترها را تنظیم می‌کند." + +msgid "For backwards compatibility, a 6-item tuple without *format* is also accepted and defaults to :data:`WAVE_FORMAT_PCM`." +msgstr "برای سازگاری با نسخه‌های قبلی، یک تاپل ۶ آیتمی بدون *format* نیز پذیرفته می‌شود و به‌طور پیش‌فرض به :data:`WAVE_FORMAT_PCM` تنظیم می‌شود." + +msgid "For ``format=WAVE_FORMAT_IEEE_FLOAT``, *sampwidth* must be 4 or 8." +msgstr "برای ``format=WAVE_FORMAT_IEEE_FLOAT``، پارامتر *sampwidth* باید ۴ یا ۸ باشد." msgid "Return a :func:`~collections.namedtuple` ``(nchannels, sampwidth, framerate, nframes, comptype, compname)`` containing the current output parameters." msgstr "یک :func:`~collections.namedtuple` شامل ``(nchannels, sampwidth, framerate, nframes, comptype, compname)`` برمی‌گرداند که حاوی پارامترهای خروجی فعلی است." @@ -205,3 +239,18 @@ msgstr "فریم‌های صوتی را بنویسید و اطمینان حاص msgid "Note that it is invalid to set any parameters after calling :meth:`writeframes` or :meth:`writeframesraw`, and any attempt to do so will raise :exc:`wave.Error`." msgstr "توجه داشته باشید که تنظیم هر پارامتری پس از فراخوانی :meth:`writeframes` یا :meth:`writeframesraw` نامعتبر است، و هرگونه تلاش برای این کار باعث پرتاب :exc:`wave.Error` خواهد شد." + +msgid "For :data:`WAVE_FORMAT_IEEE_FLOAT` output, a ``fact`` chunk is written as required by the WAVE specification for non-PCM formats." +msgstr "برای خروجی :data:`WAVE_FORMAT_IEEE_FLOAT`، یک تکه (chunk) از نوع ``fact`` همان‌طور که مشخصات WAVE برای فرمت‌های غیر PCM الزام کرده است، نوشته می‌شود." + +#~ msgid "The following two methods are defined for compatibility with the old :mod:`!aifc` module, and don't do anything interesting." +#~ msgstr "دو متد زیر برای سازگاری با ماژول قدیمی :mod:`!aifc` تعریف شده‌اند و کار جالبی انجام نمی‌دهند." + +#~ msgid "Returns ``None``." +#~ msgstr "``None`` را برمی‌گرداند." + +#~ msgid "The method only existed for compatibility with the :mod:`!aifc` module which has been removed in Python 3.13." +#~ msgstr "این متد تنها برای سازگاری با ماژول :mod:`!aifc` وجود داشت که در پایتون 3.13 حذف شده است." + +#~ msgid "Raise an error." +#~ msgstr "یک خطا پرتاب کنید." diff --git a/library/webbrowser.po b/library/webbrowser.po index dd7a80a1..02393ddb 100644 --- a/library/webbrowser.po +++ b/library/webbrowser.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 11:35+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -188,11 +189,11 @@ msgstr "``WindowsDefault``" msgid "\\(2)" msgstr "\\(2)" -msgid "``'macosx'``" -msgstr "``'macosx'``" +msgid "``'macos'``" +msgstr "``'macos'``" -msgid "``MacOSXOSAScript('default')``" -msgstr "``MacOSXOSAScript('default')``" +msgid "``MacOS('default')``" +msgstr "``MacOS('default')``" msgid "\\(3)" msgstr "\\(3)" @@ -200,8 +201,17 @@ msgstr "\\(3)" msgid "``'safari'``" msgstr "``'safari'``" -msgid "``MacOSXOSAScript('safari')``" -msgstr "``MacOSXOSAScript('safari')``" +msgid "``MacOS('safari')``" +msgstr "``MacOS('safari')``" + +msgid "``'chrome'``" +msgstr "``'chrome'``" + +msgid "``MacOS('google chrome')``" +msgstr "``MacOS('google chrome')``" + +msgid "``MacOS('firefox')``" +msgstr "``MacOS('firefox')``" msgid "``'google-chrome'``" msgstr "``'google-chrome'``" @@ -209,12 +219,6 @@ msgstr "``'google-chrome'``" msgid "``Chrome('google-chrome')``" msgstr "``Chrome('google-chrome')``" -msgid "``'chrome'``" -msgstr "``'chrome'``" - -msgid "``Chrome('chrome')``" -msgstr "``Chrome('chrome')``" - msgid "``'chromium'``" msgstr "``'chromium'``" @@ -263,6 +267,12 @@ msgstr "پشتیبانی از چند مرورگر منسوخ حذف شده اس msgid "Support for iOS has been added." msgstr "پشتیبانی از iOS اضافه شد." +msgid ":class:`!MacOS` has been added as a replacement for :class:`!MacOSXOSAScript`, opening browsers via :program:`/usr/bin/open` instead of :program:`osascript`." +msgstr "کلاس :class:`!MacOS` به‌عنوان جایگزینی برای :class:`!MacOSXOSAScript` اضافه شده است که به جای :program:`osascript`، مرورگرها را از طریق :program:`/usr/bin/open` باز می‌کند." + +msgid ":class:`!MacOSXOSAScript` is deprecated in favour of :class:`!MacOS`. Using :program:`/usr/bin/open` instead of :program:`osascript` is a security and usability improvement: :program:`osascript` may be blocked on managed systems due to its abuse potential as a general-purpose scripting interpreter." +msgstr "کلاس :class:`!MacOSXOSAScript` به نفع :class:`!MacOS` منسوخ شده است. استفاده از :program:`/usr/bin/open` به‌جای :program:`osascript` یک بهبود امنیتی و کاربردی است: ممکن است :program:`osascript` روی سیستم‌های مدیریت‌شده به دلیل پتانسیل سوءاستفاده به‌عنوان یک مفسر اسکریپت‌نویسی همه‌منظوره مسدود شود." + msgid "Here are some simple examples::" msgstr "در اینجا چند مثال ساده آمده است::" @@ -306,3 +316,6 @@ msgstr "پانویس‌ها" msgid "Executables named here without a full path will be searched in the directories given in the :envvar:`PATH` environment variable." msgstr "پرونده‌های اجرایی که در اینجا بدون مسیر کامل ذکر شده‌اند، در پوشه‌های داده‌شده در متغیر محیطی :envvar:`PATH` جستجو خواهند شد." + +#~ msgid "``Chrome('chrome')``" +#~ msgstr "``Chrome('chrome')``" diff --git a/library/winreg.po b/library/winreg.po index 8b2eb64c..b2377582 100644 --- a/library/winreg.po +++ b/library/winreg.po @@ -9,12 +9,13 @@ # Rafael Fontenelle , 2025 # Gigahertz ., 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 15:56+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -28,6 +29,9 @@ msgstr "" msgid ":mod:`!winreg` --- Windows registry access" msgstr ":mod:`!winreg` --- دسترسی به رجیستری ویندوز" +msgid "**Source code:** :source:`PC/winreg.c`" +msgstr "**کد منبع:** :source:`PC/winreg.c`" + msgid "These functions expose the Windows registry API to Python. Instead of using an integer as the registry handle, a :ref:`handle object ` is used to ensure that the handles are closed correctly, even if the programmer neglects to explicitly close them." msgstr "این توابع API رجیستری ویندوز را در اختیار پایتون قرار می‌دهند. به‌جای استفاده از یک عدد صحیح به‌عنوان دسته‌ی رجیستری، از یک :ref:`شیء دسته ` استفاده می‌شود تا اطمینان حاصل شود که دسته‌ها به‌درستی بسته شوند، حتی اگر برنامه‌نویس از بستن آن‌ها به‌صورت صریح غفلت کند." @@ -118,6 +122,18 @@ msgstr "*access* عدد صحیحی است که نقاب دسترسی‌ای را msgid "On unsupported Windows versions, :exc:`NotImplementedError` is raised." msgstr "در نسخه‌های پشتیبانی‌نشده ویندوز، :exc:`NotImplementedError` پرتاب می‌شود." +msgid "Deletes the specified key and all its subkeys and values recursively." +msgstr "کلید مشخص‌شده و تمام زیرکلیدها و مقادیر آن را به شکل بازگشتی حذف می‌کند." + +msgid "*sub_key* is a string that names the subkey to delete. If ``None``, deletes all subkeys and values of the specified key." +msgstr "پارامتر *sub_key* رشته‌ای است که نام زیرکلید مورد نظر برای حذف را مشخص می‌کند. اگر مقدار آن ``None`` باشد، تمام زیرکلیدها و مقادیر کلید مشخص‌شده را حذف می‌کند." + +msgid "This function deletes a key and all its descendants. If *sub_key* is ``None``, all subkeys and values of the specified key are deleted." +msgstr "این تابع یک کلید و تمام زیرکلیدهای آن را حذف می‌کند. اگر پارامتر *sub_key* برابر با ``None`` باشد، تمام زیرکلیدها و مقادیر کلید مشخص‌شده حذف می‌شوند." + +msgid "Raises an :ref:`auditing event ` ``winreg.DeleteTree`` with arguments ``key``, ``sub_key``." +msgstr "یک :ref:`رویداد ممیزی ` با نام ``winreg.DeleteTree`` و آرگومان‌های ``key`` و ``sub_key`` را بالا می‌آورد (raise می‌کند)." + msgid "Removes a named value from a registry key." msgstr "یک مقدار نام‌دار را از یک کلید رجیستری حذف می‌کند." @@ -525,6 +541,9 @@ msgstr "" msgid "will print ``Yes`` if the handle is currently valid (has not been closed or detached)." msgstr "اگر دسته در حال حاضر معتبر باشد (بسته یا جدا نشده باشد)، ``Yes`` را چاپ خواهد کرد." +msgid "The object also support equality comparison semantics, so handle objects will compare equal if they both reference the same underlying Windows handle value. Closed handle objects (those with a handle value of zero) always compare equal." +msgstr "این شیء همچنین از معناشناسی مقایسه‌ی برابری پشتیبانی می‌کند؛ بنابراین، اگر دو شیء دسته به یک مقدار دسته‌ی زیرین ویندوز ارجاع دهند، برابر در نظر گرفته می‌شوند. اشیای دسته‌ی بسته‌شده (آن‌هایی که مقدار دسته‌شان صفر است) همیشه برابر مقایسه می‌شوند." + msgid "Handle objects can be converted to an integer (e.g., using the built-in :func:`int` function), in which case the underlying Windows handle value is returned. You can also use the :meth:`~PyHKEY.Detach` method to return the integer handle, and also disconnect the Windows handle from the handle object." msgstr "اشیای دسته را می‌توان به یک عدد صحیح تبدیل کرد (برای مثال، با استفاده از تابع توکار :func:`int`)، که در این صورت مقدار دسته ویندوزی زیرین بازگردانده می‌شود. همچنین می‌توانید از متد :meth:`~PyHKEY.Detach` برای بازگرداندن دسته به‌صورت عدد صحیح و نیز جدا کردن دسته ویندوزی از شیء دسته استفاده کنید." @@ -559,6 +578,9 @@ msgstr "" msgid "will automatically close *key* when control leaves the :keyword:`with` block." msgstr "هنگامی که کنترل از بلوک :keyword:`with` خارج می‌شود، *key* را به‌طور خودکار می‌بندد." +msgid "Handle objects are now compared by their underlying Windows handle value instead of object identity for equality comparisons." +msgstr "برای مقایسه‌ی برابری، اشیای دسته اکنون به‌جای هویت شیء، بر اساس مقدار دسته‌ی زیرین ویندوز خود مقایسه می‌شوند." + msgid "% (percent)" msgstr "% (درصد)" diff --git a/library/winsound.po b/library/winsound.po index 7e0abb21..41a30ed2 100644 --- a/library/winsound.po +++ b/library/winsound.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 12:29+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -26,12 +27,18 @@ msgstr "" msgid ":mod:`!winsound` --- Sound-playing interface for Windows" msgstr ":mod:`!winsound` --- رابط پخش صدا برای ویندوز" +msgid "**Source code:** :source:`PC/winsound.c`" +msgstr "**کد منبع:** :source:`PC/winsound.c`" + msgid "The :mod:`!winsound` module provides access to the basic sound-playing machinery provided by Windows platforms. It includes functions and several constants." msgstr "ماژول :mod:`!winsound` دسترسی به سازوکار پایه‌ی پخش صدا ارائه‌شده توسط سکوهای ویندوزی را فراهم می‌کند. این ماژول شامل توابع و چند ثابت است." msgid "Availability" msgstr "دسترس‌پذیری" +msgid "Functions" +msgstr "توابع" + msgid "Beep the PC's speaker. The *frequency* parameter specifies frequency, in hertz, of the sound, and must be in the range 37 through 32,767. The *duration* parameter specifies the number of milliseconds the sound should last. If the system is not able to beep the speaker, :exc:`RuntimeError` is raised." msgstr "بوق زدن بلندگوی رایانه. پارامتر *frequency* بسامد صدا را بر حسب هرتز مشخص می‌کند و باید در بازه‌ی ۳۷ تا ۳۲٬۷۶۷ باشد. پارامتر *duration* تعداد میلی‌ثانیه‌هایی را که صدا باید ادامه داشته باشد مشخص می‌کند. اگر سیستم قادر به بوق زدن بلندگو نباشد، :exc:`RuntimeError` پرتاب می‌شود." @@ -41,6 +48,9 @@ msgstr "تابع زیربنایی :c:func:`!PlaySound` از API پلتفرم ر msgid "Call the underlying :c:func:`!MessageBeep` function from the Platform API. This plays a sound as specified in the registry. The *type* argument specifies which sound to play; possible values are ``-1``, ``MB_ICONASTERISK``, ``MB_ICONEXCLAMATION``, ``MB_ICONHAND``, ``MB_ICONQUESTION``, and ``MB_OK``, all described below. The value ``-1`` produces a \"simple beep\"; this is the final fallback if a sound cannot be played otherwise. If the system indicates an error, :exc:`RuntimeError` is raised." msgstr "تابع زیربنایی :c:func:`!MessageBeep` را از Platform API فراخوانی می‌کند. این کار صدایی را مطابق آنچه در رجیستری مشخص شده است پخش می‌کند. آرگومان *type* مشخص می‌کند کدام صدا پخش شود؛ مقادیر ممکن عبارت‌اند از ``-1``، ``MB_ICONASTERISK``، ``MB_ICONEXCLAMATION``، ``MB_ICONHAND``، ``MB_ICONQUESTION`` و ``MB_OK``، که همگی در زیر توضیح داده شده‌اند. مقدار ``-1`` یک «بوق ساده» تولید می‌کند؛ اگر صدا به روش دیگری قابل پخش نباشد، این آخرین جایگزین است. اگر سیستم خطایی را نشان دهد، :exc:`RuntimeError` پرتاب می‌شود." +msgid "Constants" +msgstr "ثابت‌ها" + msgid "The *sound* parameter is the name of a WAV file. Do not use with :const:`SND_ALIAS`." msgstr "پارامتر *sound* نام یک پرونده WAV است. از آن همراه با :const:`SND_ALIAS` استفاده نکنید." diff --git a/library/xml.etree.elementtree.po b/library/xml.etree.elementtree.po index 586ff62e..fecea727 100644 --- a/library/xml.etree.elementtree.po +++ b/library/xml.etree.elementtree.po @@ -8,13 +8,14 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" -"PO-Revision-Date: 2026-09-21 13:26+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 20:30+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" @@ -798,8 +799,8 @@ msgstr "*exclude_tags*: مجموعه‌ای از نام برچسب‌ها که msgid "In the option list above, \"a set\" refers to any collection or iterable of strings, no ordering is expected." msgstr "در فهرست گزینه‌های بالا، «یک مجموعه» به هر مجموعه یا پیمایش‌پذیری از رشته‌ها اشاره دارد؛ هیچ ترتیبی مورد انتظار نیست." -msgid "Comment element factory. This factory function creates a special element that will be serialized as an XML comment by the standard serializer. *text* is a string containing the comment string. Returns an element instance representing a comment." -msgstr "کارخانه عنصر کامنت. این تابع کارخانه‌ای یک عنصر ویژه می‌سازد که توسط سریالایزر استاندارد به‌عنوان یک کامنت XML سریال می‌شود. *text* یک رشته است که حاوی رشته کامنت می‌باشد. یک نمونه عنصر بازمی‌گرداند که یک کامنت را نشان می‌دهد." +msgid "Comment element factory. This factory function creates a special element that will be serialized as an XML comment by the standard serializer. The comment string can be either a bytestring or a Unicode string. *text* is a string containing the comment string. Returns an element instance representing a comment." +msgstr "تابع کارخانه‌ای المان کامنت. این تابع کارخانه‌ای یک المان خاص ایجاد می‌کند که توسط سریالایزر استاندارد به عنوان یک کامنت XML سریالایزشده (serialized) خواهد شد. رشته‌ی کامنت می‌تواند یک بایت‌رشته (bytestring) یا یک رشته‌ی یونیکد باشد. پارامتر *text* رشته‌ای است که حاوی متن کامنت است. یک نمونه‌ی المان را که نماینده‌ی یک کامنت است، برمی‌گرداند." msgid "Note that :class:`XMLParser` skips over comments in the input instead of creating comment objects for them. An :class:`ElementTree` will only contain comment nodes if they have been inserted into to the tree using one of the :class:`Element` methods." msgstr "توجه داشته باشید که :class:`XMLParser` به‌جای ایجاد اشیای کامنت برای توضیح‌های موجود در ورودی، آن‌ها را نادیده می‌گیرد. یک :class:`ElementTree` تنها در صورتی حاوی گره‌های کامنت خواهد بود که آن‌ها با استفاده از یکی از متدهای :class:`Element` در درخت درج‌شده باشند." @@ -828,8 +829,8 @@ msgstr "فضای خالی را به زیردرخت می‌افزاید تا در 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 "بررسی می‌کند که آیا یک شیء به‌نظر یک شیء المان معتبر می‌رسد. *element* یک نمونه المان است. اگر این یک شیء المان باشد، ``True`` را بازمی‌گرداند." -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` containing XML data. *events* is a sequence of events to report back. The supported events are the strings ``\"start\"``, ``\"end\"``, ``\"comment\"``, ``\"pi\"``, ``\"start-ns\"`` and ``\"end-ns\"`` (the \"ns\" events are used to get detailed namespace information). If *events* is omitted, only ``\"end\"`` events are reported. *parser* is an optional parser instance. If not given, the standard :class:`XMLParser` parser is used. *parser* must be an instance of :class:`XMLParser` or its subclass and can only use the default :class:`TreeBuilder` as a target. Returns an :term:`iterator` providing ``(event, elem)`` pairs; it has a ``root`` attribute that references the root element of the resulting XML tree once *source* is fully read. The iterator has the :meth:`!close` method that closes the internal file object if *source* is a filename." -msgstr "یک بخش XML را به‌صورت افزایشی در یک درخت عنصر تجزیه می‌کند و وضعیت را به کاربر گزارش می‌دهد. *source* یک نام پرونده یا :term:`شیء پرونده ` است که حاوی داده‌های XML می‌باشد. *events* یک دنباله از رویدادها برای گزارش است. رویدادهای پشتیبانی‌شده رشته‌های ``\"start\"``، ``\"end\"``، ``\"comment\"``، ``\"pi\"``، ``\"start-ns\"`` و ``\"end-ns\"`` هستند (رویدادهای \"ns\" برای دریافت اطلاعات دقیق فضای نام استفاده می‌شوند). اگر *events* حذف شود، تنها رویدادهای ``\"end\"`` گزارش داده می‌شوند. *parser* یک نمونه پارسر اختیاری است. اگر داده نشود، پارسر استاندارد :class:`XMLParser` استفاده می‌شود. *parser* باید یک نمونه از :class:`XMLParser` یا زیرکلاس آن باشد و تنها می‌تواند از پیش‌فرض :class:`TreeBuilder` به‌عنوان هدف استفاده کند. یک :term:`پیمایش‌گر ` بازمی‌گرداند که جفت‌های ``(event, elem)`` را فراهم می‌کند؛ این پیمایش‌گر یک ویژگی ``root`` دارد که به عنصر ریشه درخت XML حاصل ارجاع می‌دهد وقتی *source* به‌صورت کامل خوانده شود. پیمایش‌گر متد :meth:`!close` را دارد که شیء پرونده داخلی را می‌بندد اگر *source* یک نام پرونده باشد." +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` containing XML data. *events* is a sequence of events to report back. The supported events are the strings ``\"start\"``, ``\"end\"``, ``\"comment\"``, ``\"pi\"``, ``\"start-ns\"`` and ``\"end-ns\"`` (the \"ns\" events are used to get detailed namespace information). If *events* is omitted, only ``\"end\"`` events are reported. *parser* is an optional parser instance. If not given, the standard :class:`XMLParser` parser is used. *parser* must be a subclass of :class:`XMLParser` and can only use the default :class:`TreeBuilder` as a target. Returns an :term:`iterator` providing ``(event, elem)`` pairs; it has a ``root`` attribute that references the root element of the resulting XML tree once *source* is fully read. The iterator has the :meth:`!close` method that closes the internal file object if *source* is a filename." +msgstr "یک بخش XML را به صورت افزایشی در قالب یک درخت المان تجزیه (parse) می‌کند و رویدادهای در حال وقوع را به کاربر گزارش می‌دهد. پارامتر *source* یک نام پرونده یا یک :term:`شیء پرونده ` است که حاوی داده‌های XML است. پارامتر *events* دنباله‌ای از رویدادها است که باید گزارش شوند. رویدادهای پشتیبانی‌شده عبارتند از رشته‌های ``\"start\"``، ``\"end\"``، ``\"comment\"``، ``\"pi\"``، ``\"start-ns\"`` و ``\"end-ns\"`` (رویدادهای \"ns\" برای به دست آوردن اطلاعات دقیق فضای نام استفاده می‌شوند). اگر *events* حذف شود، فقط رویدادهای ``\"end\"`` گزارش می‌شوند. پارامتر *parser* یک نمونه‌ی پارسر اختیاری است. اگر داده نشود، از پارسر استاندارد :class:`XMLParser` استفاده می‌شود. پارامتر *parser* باید زیرکلاسی از :class:`XMLParser` باشد و فقط می‌تواند از :class:`TreeBuilder` پیش‌فرض به عنوان هدف استفاده کند. یک :term:`پیمایش‌گر ` برمی‌گرداند که جفت‌های ``(event, elem)`` را فراهم می‌کند؛ این پیمایش‌گر دارای یک ویژگی ``root`` است که به المان ریشه‌ی درخت XML حاصل پس از خوانده شدن کامل *source* ارجاع می‌دهد. این پیمایش‌گر دارای متد :meth:`!close` است که اگر *source* یک نام پرونده باشد، شیء پرونده‌ی داخلی را می‌بندد." 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 for applications where blocking reads can't be made. For fully non-blocking parsing, see :class:`XMLPullParser`." msgstr "توجه داشته باشید که با وجود اینکه :func:`iterparse` درخت را به‌صورت تدریجی می‌سازد، خواندن‌های مسدودکننده روی *source* (یا پرونده‌ای که *source* نام آن را مشخص می‌کند) انجام می‌دهد. بنابراین، برای کاربردهایی که در آن‌ها نمی‌توان خواندن‌های مسدودکننده انجام داد، مناسب نیست. برای تجزیه کاملاً غیرمسدودکننده، :class:`XMLPullParser` را ببینید." @@ -852,6 +853,9 @@ msgstr "رویدادهای ``comment`` و ``pi`` افزوده شدند." msgid "Added the :meth:`!close` method." msgstr "متد :meth:`!close` افزوده شد." +msgid "A :exc:`ResourceWarning` is now emitted if the iterator opened a file and is not explicitly closed." +msgstr "اگر پیمایش‌گر پرونده‌ای را باز کرده باشد و آن را به‌طور صریح نبندد، اکنون یک :exc:`ResourceWarning` صادر می‌شود." + 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 not given, the standard :class:`XMLParser` parser is used. Returns an :class:`ElementTree` instance." msgstr "یک بخش XML را به یک درخت عنصر تجزیه می‌کند. *source* یک نام پرونده یا شیء پرونده حاوی داده‌های XML است. *parser* یک نمونه پارسر اختیاری است. اگر داده نشود، از پارسر استاندارد :class:`XMLParser` استفاده می‌شود. یک نمونه :class:`ElementTree` بازمی‌گرداند." @@ -867,8 +871,14 @@ msgstr "یک پیشوند فضای نام را ثبت می‌کند. این ثب msgid "Subelement factory. This function creates an element instance, and appends it to an existing element." msgstr "کارخانه‌ی زیرالمان. این تابع نمونه‌ای از المان ایجاد می‌کند و آن را به یک المان موجود می‌افزاید." -msgid "*parent* is the parent element. *tag* is the subelement name. *attrib* is an optional dictionary, containing element attributes. *extra* contains additional attributes, given as keyword arguments. Returns an element instance." -msgstr "*parent* عنصر والد است. *tag* نام زیرعنصر است. *attrib* یک دیکشنری اختیاری است که حاوی ویژگی‌های عنصر می‌باشد. *extra* ویژگی‌های اضافی را شامل می‌شود که به‌عنوان آرگومان‌های کلیدواژه‌ای داده شده‌اند. یک نمونه عنصر بازمی‌گرداند." +msgid "The element name, attribute names, and attribute values can be either bytestrings or Unicode strings. *parent* is the parent element. *tag* is the subelement name. *attrib* is an optional dictionary, containing element attributes. *extra* contains additional attributes, given as keyword arguments. Returns an element instance." +msgstr "نام المان، نام‌های ویژگی‌ها و مقادیر ویژگی‌ها می‌توانند بایت‌رشته یا رشته‌ی یونیکد باشند. پارامتر *parent* المان والد است. پارامتر *tag* نام زیرالمان است. پارامتر *attrib* یک دیکشنری اختیاری است که حاوی ویژگی‌های المان است. پارامتر *extra* شامل ویژگی‌های اضافی است که به صورت آرگومان‌های کلیدواژه‌ای داده شده‌اند. یک نمونه‌ی المان را برمی‌گرداند." + +msgid "*attrib* can now be a :class:`frozendict`." +msgstr "پارامتر *attrib* اکنون می‌تواند یک :class:`frozendict` باشد." + +msgid "*parent* and *tag* are now positional-only parameters." +msgstr "پارامترهای *parent* و *tag* اکنون صرفاً جایگاهی هستند." msgid "Generates a string representation of an XML element, including all subelements. *element* is an :class:`Element` instance. *encoding* [1]_ is the output encoding (default is US-ASCII). Use ``encoding=\"unicode\"`` to generate a Unicode string (otherwise, a bytestring is generated). *method* is either ``\"xml\"``, ``\"html\"`` or ``\"text\"`` (default is ``\"xml\"``). *xml_declaration*, *default_namespace* and *short_empty_elements* has the same meaning as in :meth:`ElementTree.write`. Returns an (optionally) encoded string containing the XML data." msgstr "نمایش رشته‌ای از یک المان XML را تولید می‌کند که شامل تمام زیرالمان‌ها است. *element* یک نمونه از :class:`Element` است. *encoding* [1]_ کدگذاری خروجی است (پیش‌فرض US-ASCII است). برای تولید یک رشته یونیکد، از ``encoding=\"unicode\"`` استفاده کنید (در غیر این صورت، یک رشته بایتی تولید می‌شود). *method* یکی از ``\"xml\"``، ``\"html\"`` یا ``\"text\"`` است (پیش‌فرض ``\"xml\"`` است). *xml_declaration*، *default_namespace* و *short_empty_elements* همان معنایی را دارند که در :meth:`ElementTree.write` آمده است. رشته‌ای (به‌صورت اختیاری) کدگذاری‌شده حاوی داده‌های XML را برمی‌گرداند." @@ -991,11 +1001,11 @@ msgstr "اشیای عنصر" msgid "Element class. This class defines the Element interface, and provides a reference implementation of this interface." msgstr "کلاس Element. این کلاس رابط Element را تعریف می‌کند و یک پیاده‌سازی مرجع از این رابط ارائه می‌دهد." -msgid "*tag* is the element name. *attrib* is an optional dictionary, containing element attributes. *extra* contains additional attributes, given as keyword arguments." -msgstr "*tag* نامِ المان است. *attrib* یک دیکشنریِ اختیاری است که شامل ویژگی‌های المان می‌شود. *extra* ویژگی‌های اضافی را شامل می‌شود که به‌عنوان آرگومان‌های کلیدواژه‌ای داده شده‌اند." +msgid "The element name, attribute names, and attribute values can be either bytestrings or Unicode strings. *tag* is the element name. *attrib* is an optional dictionary, containing element attributes. *extra* contains additional attributes, given as keyword arguments." +msgstr "نام المان، نام‌های ویژگی‌ها و مقادیر ویژگی‌ها می‌توانند بایت‌رشته یا رشته‌ی یونیکد باشند. پارامتر *tag* نام المان است. پارامتر *attrib* یک دیکشنری اختیاری است که حاوی ویژگی‌های المان است. پارامتر *extra* شامل ویژگی‌های اضافی است که به صورت آرگومان‌های کلیدواژه‌ای داده شده‌اند." -msgid "The element name and the attribute names and values are strings or :class:`QName` instances, and the text and the tail are strings or ``None``. The element name can also be :func:`Comment` or :func:`ProcessingInstruction`, which are used for special elements. If it is ``None``, the element itself is not serialized: only its text and its children are written, and its attributes are ignored. This can be used for a fragment which contains several elements. With ``method=\"html\"`` the attribute value can also be ``None``, which produces an empty attribute (such as ``checked``). Other objects can be stored in the tree, but they cannot be serialized." -msgstr "نامِ المان و نام‌ها و مقادیرِ ویژگی‌ها رشته‌ها یا نمونه‌های :class:`QName` هستند، و متن و tail رشته‌ها یا ``None`` هستند. نامِ المان همچنین می‌تواند :func:`Comment` یا :func:`ProcessingInstruction` باشد که برای المان‌های خاص استفاده می‌شوند. اگر ``None`` باشد، خودِ المان سریال‌سازی نمی‌شود: تنها متن و فرزندانِ آن نوشته می‌شوند و ویژگی‌های آن نادیده گرفته می‌شوند. این می‌تواند برای یک قطعه که شامل چندین المان است استفاده شود. با ``method=\"html\"`` مقدارِ ویژگی نیز می‌تواند ``None`` باشد که یک ویژگیِ خالی تولید می‌کند (مانند ``checked``). سایر اشیاء می‌توانند در درخت ذخیره شوند، اما آن‌ها نمی‌توانند سریال‌سازی شوند." +msgid "*tag* is now a positional-only parameter." +msgstr "*tag* اکنون یک پارامتر فقط-جایگاهی است." msgid "A string identifying what kind of data this element represents (the element type, in other words)." msgstr "رشته‌ای که مشخص می‌کند این المان نمایانگر چه نوع داده‌ای است (به عبارت دیگر، نوع المان)." @@ -1030,11 +1040,11 @@ msgstr "ویژگی المان با نام *key* را دریافت می‌کند. msgid "Returns the attribute value, or *default* if the attribute was not found." msgstr "مقدار ویژگی را برمی‌گرداند، یا اگر ویژگی یافت نشد، *default* را برمی‌گرداند." -msgid "Returns the element attributes as (name, value) pairs." -msgstr "ویژگی‌های المان را به‌عنوان جفت‌های (نام، مقدار) برمی‌گرداند." +msgid "Returns the element attributes as a sequence of (name, value) pairs. The attributes are returned in an arbitrary order." +msgstr "ویژگی‌های عنصر را به‌صورت دنباله‌ای از جفت‌های (نام، مقدار) برمی‌گرداند. ویژگی‌ها با ترتیبی دلخواه برگردانده می‌شوند." -msgid "Returns the element attribute names." -msgstr "نام‌های ویژگی‌های المان را برمی‌گرداند." +msgid "Returns the elements attribute names as a list. The names are returned in an arbitrary order." +msgstr "نام‌های ویژگی‌های المان‌ها را به‌صورت یک فهرست بازمی‌گرداند. نام‌ها با ترتیبی دلخواه بازگردانده می‌شوند." msgid "Set the attribute *key* on the element to *value*." msgstr "ویژگی *key* را روی عنصر برابر *value* قرار دهید." @@ -1250,8 +1260,8 @@ msgstr "توابع *comment_factory* و *pi_factory*، در صورت ارائه msgid "Flushes the builder buffers, and returns the toplevel document element. Returns an :class:`Element` instance." msgstr "بافرهای سازنده را تخلیه می‌کند و عنصر سند سطح بالا را بازمی‌گرداند. یک نمونه از :class:`Element` بازمی‌گرداند." -msgid "Adds text to the current element. *data* is a string." -msgstr "متنی را به المانِ جاری اضافه می‌کند. *data* یک رشته است." +msgid "Adds text to the current element. *data* is a string. This should be either a bytestring, or a Unicode string." +msgstr "متن را به المان فعلی اضافه می‌کند. پارامتر *data* یک رشته است. این رشته باید یک بایت‌رشته یا یک رشته‌ی یونیکد باشد." msgid "Closes the current element. *tag* is the element name. Returns the closed element." msgstr "عنصر جاری را می‌بندد. *tag* نام عنصر است. عنصر بسته‌شده را برمی‌گرداند." @@ -1292,14 +1302,14 @@ msgstr "پارامترها اکنون :ref:`فقط کلیدواژه‌ای `)." +msgid "Feeds data to the parser. *data* is encoded data." +msgstr "داده‌ها را به پارسر می‌خوراند. پارامتر *data* داده‌های کدگذاری‌شده است." 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 implementation of :meth:`flush` temporarily disables reparse deferral with Expat (if currently enabled) and triggers a reparse. Disabling reparse deferral has security consequences; please see :meth:`xml.parsers.expat.xmlparser.SetReparseDeferralEnabled` for details." msgstr "تجزیه‌ی هرگونه داده‌ی تجزیه‌نشده‌ای که پیش‌تر وارد شده است را راه‌اندازی می‌کند، که می‌تواند برای اطمینان از بازخورد فوری‌تر به کار رود، به‌ویژه با Expat >=2.6.0. پیاده‌سازی :meth:`flush` تعویق تجزیه‌ی مجدد در Expat را به‌طور موقت غیرفعال می‌کند (اگر در حال حاضر فعال باشد) و یک تجزیه‌ی مجدد را راه‌اندازی می‌کند. غیرفعال‌سازی تعویق تجزیه‌ی مجدد پیامدهای امنیتی دارد؛ لطفاً برای جزئیات :meth:`xml.parsers.expat.xmlparser.SetReparseDeferralEnabled` را ببینید." -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 "توجه داشته باشید که :meth:`flush` به‌عنوان یک اصلاح امنیتی به برخی نسخه‌های پیشین CPython بک‌پورت شده است . در صورت استفاده در کدی که روی نسخه‌های گوناگون پایتون اجرا می‌شود، دسترس‌پذیری :meth:`flush` را با استفاده از :func:`hasattr` بررسی کنید." +msgid ":meth:`!flush` has been backported to some prior releases of CPython as a security fix. Check for availability using :func:`hasattr` if used in code running across a variety of Python versions." +msgstr "متد :meth:`!flush` به عنوان یک اصلاح امنیتی به برخی نسخه‌های قبلی سی‌پایتون (CPython) هم‌پورت (backport) شده است. اگر در کدی استفاده می‌شود که در نسخه‌های مختلف پایتون اجرا می‌شود، با استفاده از :func:`hasattr` وجود آن را بررسی کنید." 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 is processed by method ``data(data)``. For further supported callback methods, see the :class:`TreeBuilder` class. :meth:`XMLParser.close` calls *target*\\'s method ``close()``. :class:`XMLParser` can be used not only for building a tree structure. This is an example of counting the maximum depth of an XML file::" msgstr ":meth:`XMLParser.feed` برای هر برچسب باز، متد ``start(tag, attrs_dict)`` از *target* و برای هر برچسب بسته، متد ``end(tag)`` آن را فراخوانی می‌کند، و داده با متد ``data(data)`` پردازش می‌شود. برای دیگر متدهای کال‌بک پشتیبانی‌شده، کلاس :class:`TreeBuilder` را ببینید. :meth:`XMLParser.close` متد ``close()`` از *target* را فراخوانی می‌کند. می‌توان از :class:`XMLParser` نه فقط برای ساختن ساختار درختی استفاده کرد. این مثالی برای شمارش بیشینه عمق یک پرونده XML است::" @@ -1375,8 +1385,8 @@ msgstr "اشیای XMLPullParser" 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 callback target, :class:`XMLPullParser` collects an internal list of parsing events and lets the user read from it. *events* is a sequence of events to report back. The supported events are the strings ``\"start\"``, ``\"end\"``, ``\"comment\"``, ``\"pi\"``, ``\"start-ns\"`` and ``\"end-ns\"`` (the \"ns\" events are used to get detailed namespace information). If *events* is omitted, only ``\"end\"`` events are reported." msgstr "یک پارسر کششی (pull parser) مناسب برای برنامه‌های غیرمسدودکننده. API سمت ورودی آن مشابه API :class:`XMLParser` است، اما به‌جای فرستادن فراخوانی‌ها به یک هدف کال‌بک، :class:`XMLPullParser` یک فهرست درونی از رویدادهای تجزیه را جمع‌آوری می‌کند و به کاربر اجازه می‌دهد از آن بخواند. *events* دنباله‌ای از رویدادها برای گزارش‌دهی است. رویدادهای پشتیبانی‌شده رشته‌های ``\"start\"``، ``\"end\"``، ``\"comment\"``، ``\"pi\"``، ``\"start-ns\"`` و ``\"end-ns\"`` هستند (رویدادهای \"ns\" برای دریافت اطلاعات دقیق فضای نام استفاده می‌شوند). اگر *events* حذف شود، فقط رویدادهای ``\"end\"`` گزارش می‌شوند." -msgid "Feed the given data to the parser. *data* is a string or encoded data (:class:`bytes` or a :term:`bytes-like object`)." -msgstr "داده‌ی داده‌شده را به پارسر می‌دهد. *data* یک رشته یا داده‌ی کدگذاری‌شده است (:class:`bytes` یا یک :term:`شیء شبه‌بایت `)." +msgid "Feed the given bytes data to the parser." +msgstr "داده‌ی bytes داده‌شده را به پارسر بدهید." msgid "Signal the parser that the data stream is terminated. Unlike :meth:`XMLParser.close`, this method always returns :const:`None`. Any events not yet retrieved when the parser is closed can still be read with :meth:`read_events`." msgstr "به پارسر اعلام می‌کند که جریان داده به پایان رسیده است. برخلاف :meth:`XMLParser.close`، این متد همیشه :const:`None` را برمی‌گرداند. هر رویدادی که هنوز در زمان بسته شدن پارسر دریافت‌نشده باشد، همچنان می‌تواند با :meth:`read_events` خوانده شود." @@ -1420,11 +1430,14 @@ msgstr "پانویس‌ها" 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://www.w3.org/TR/2006/REC-xml11-20060816/#NT-EncodingDecl and https://www.iana.org/assignments/character-sets/character-sets.xhtml." msgstr "رشته‌ی کدگذاری گنجانده‌شده در خروجی XML باید با استانداردهای مناسب مطابقت داشته باشد. برای مثال، \"UTF-8\" معتبر است، اما \"UTF8\" معتبر نیست. به https://www.w3.org/TR/2006/REC-xml11-20060816/#NT-EncodingDecl و https://www.iana.org/assignments/character-sets/character-sets.xhtml مراجعه کنید." -#~ msgid "Returns the element attributes as a sequence of (name, value) pairs. The attributes are returned in an arbitrary order." -#~ msgstr "ویژگی‌های عنصر را به‌صورت دنباله‌ای از جفت‌های (نام، مقدار) برمی‌گرداند. ویژگی‌ها با ترتیبی دلخواه برگردانده می‌شوند." +#~ msgid "The element name and the attribute names and values are strings or :class:`QName` instances, and the text and the tail are strings or ``None``. The element name can also be :func:`Comment` or :func:`ProcessingInstruction`, which are used for special elements. If it is ``None``, the element itself is not serialized: only its text and its children are written, and its attributes are ignored. This can be used for a fragment which contains several elements. With ``method=\"html\"`` the attribute value can also be ``None``, which produces an empty attribute (such as ``checked``). Other objects can be stored in the tree, but they cannot be serialized." +#~ msgstr "نامِ المان و نام‌ها و مقادیرِ ویژگی‌ها رشته‌ها یا نمونه‌های :class:`QName` هستند، و متن و tail رشته‌ها یا ``None`` هستند. نامِ المان همچنین می‌تواند :func:`Comment` یا :func:`ProcessingInstruction` باشد که برای المان‌های خاص استفاده می‌شوند. اگر ``None`` باشد، خودِ المان سریال‌سازی نمی‌شود: تنها متن و فرزندانِ آن نوشته می‌شوند و ویژگی‌های آن نادیده گرفته می‌شوند. این می‌تواند برای یک قطعه که شامل چندین المان است استفاده شود. با ``method=\"html\"`` مقدارِ ویژگی نیز می‌تواند ``None`` باشد که یک ویژگیِ خالی تولید می‌کند (مانند ``checked``). سایر اشیاء می‌توانند در درخت ذخیره شوند، اما آن‌ها نمی‌توانند سریال‌سازی شوند." + +#~ msgid "Returns the element attributes as (name, value) pairs." +#~ msgstr "ویژگی‌های المان را به‌عنوان جفت‌های (نام، مقدار) برمی‌گرداند." -#~ msgid "Returns the elements attribute names as a list. The names are returned in an arbitrary order." -#~ msgstr "نام‌های ویژگی‌های المان‌ها را به‌صورت یک فهرست بازمی‌گرداند. نام‌ها با ترتیبی دلخواه بازگردانده می‌شوند." +#~ msgid "Returns the element attribute names." +#~ msgstr "نام‌های ویژگی‌های المان را برمی‌گرداند." -#~ msgid "Feed the given bytes data to the parser." -#~ msgstr "داده‌ی bytes داده‌شده را به پارسر بدهید." +#~ msgid "Feed the given data to the parser. *data* is a string or encoded data (:class:`bytes` or a :term:`bytes-like object`)." +#~ msgstr "داده‌ی داده‌شده را به پارسر می‌دهد. *data* یک رشته یا داده‌ی کدگذاری‌شده است (:class:`bytes` یا یک :term:`شیء شبه‌بایت `)." diff --git a/library/xml.po b/library/xml.po index 3460cfed..426d0fa5 100644 --- a/library/xml.po +++ b/library/xml.po @@ -6,12 +6,13 @@ # Translators: # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 01:18+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -60,6 +61,21 @@ msgstr ":mod:`xml.sax`: کلاس‌های پایه SAX2 و توابع کمکی" msgid ":mod:`xml.parsers.expat`: the Expat parser binding" msgstr ":mod:`xml.parsers.expat`: اتصال پارسرٔ Expat" +msgid "This module also defines utility functions." +msgstr "این ماژول همچنین توابع کاربردی را تعریف می‌کند." + +msgid "Return ``True`` if the string is a valid element or attribute name, ``False`` otherwise." +msgstr "اگر رشته یک عنصر یا نام ویژگی معتبر باشد، مقدار ``True`` را برمی‌گرداند، در غیر این صورت ``False``." + +msgid "Almost all characters are permitted in names, except control characters and those which either are or reasonably could be used as delimiters. Characters like \":\", \"-\", \".\", \"_\", and \"·\" are permitted, but \"<\", \"/\", \"!\", \"?\", and \"=\" are forbidden. The name cannot start with a digit or a character like \"-\", \".\", and \"·\"." +msgstr "تقریباً تمام نویسه‌ها در نام‌ها مجاز هستند، به‌جز نویسه‌های کنترلی و آن‌هایی که به‌عنوان جداکننده استفاده می‌شوند یا منطقاً می‌توانند استفاده شوند. نویسه‌هایی مانند \":\"، \"-\"، \".\"، \"_\" و \"·\" مجاز هستند، اما \"<\", \"/\", \"!\", \"?\" و \"=\" ممنوع هستند. نام نمی‌تواند با یک رقم یا نویسه‌هایی مانند \"-\"، \".\" و \"·\" شروع شود." + +msgid "Return ``True`` if the string is a sequence of legal XML 1.0 characters, ``False`` otherwise." +msgstr "اگر رشته دنباله‌ای از نویسه‌های مجاز XML 1.0 باشد، مقدار ``True`` را برمی‌گرداند، در غیر این صورت ``False``." + +msgid "Almost all characters are permitted in XML 1.0 documents, except C0 control characters (excluding TAB, CR and LF), surrogate characters and special Unicode characters U+FFFE and U+FFFF." +msgstr "تقریباً تمام نویسه‌ها در سندهای XML 1.0 مجاز هستند، به جز نویسه‌های کنترلی C0 (به‌جز TAB، CR و LF)، نویسه‌های جانشین و نویسه‌های خاص یونیکد U+FFFE و U+FFFF." + msgid "XML security" msgstr "امنیت XML" diff --git a/library/xml.sax.handler.po b/library/xml.sax.handler.po index f19ff13c..bea97332 100644 --- a/library/xml.sax.handler.po +++ b/library/xml.sax.handler.po @@ -6,12 +6,13 @@ # Translators: # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 13:59+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -73,14 +74,11 @@ msgstr "true: نام‌های اصلی دارای پیشوند و ویژگی‌ msgid "false: Do not report attributes used for Namespace declarations, and optionally do not report original prefixed names (default)." msgstr "false: ویژگی‌های استفاده‌شده برای اعلان‌های فضای نام را گزارش نمی‌کند، و به‌صورت اختیاری نام‌های پیشونددار اصلی را گزارش نمی‌کند (پیش‌فرض)." -msgid "The parser based on :mod:`xml.parsers.expat` does not support this feature." -msgstr "پارسرِ مبتنی بر :mod:`xml.parsers.expat` این ویژگی را پشتیبانی نمی‌کند." - msgid "value: ``\"http://xml.org/sax/features/string-interning\"``" msgstr "مقدار: ``\"http://xml.org/sax/features/string-interning\"``" -msgid "true: All element names, prefixes, attribute names, Namespace URIs, and local names are interned in a dictionary (see :data:`property_interning_dict`)." -msgstr "true: تمام نام‌های المان، پیشوندها، نام‌های ویژگی، URIهای فضای نام، و نام‌های محلی در یک دیکشنری درونی‌سازی‌شده‌اند (به :data:`property_interning_dict` مراجعه کنید)." +msgid "true: All element names, prefixes, attribute names, Namespace URIs, and local names are interned using the built-in intern function." +msgstr "مقدار درست (true): تمام نام‌های المان، پیشوندها، نام‌های ویژگی، URIهای فضای نام و نام‌های محلی با استفاده از تابع توکار intern درونی‌سازی می‌شوند." msgid "false: Names are not necessarily interned, although they may be (default)." msgstr "false: نام‌ها لزوماً درونی‌سازی‌شده نیستند، اگرچه ممکن است این‌طور باشند (پیش‌فرض)." @@ -94,9 +92,6 @@ msgstr "true: تمام خطاهای اعتبارسنجی را گزارش می‌ msgid "false: Do not report validation errors." msgstr "false: خطاهای اعتبارسنجی گزارش داده نمی‌شوند." -msgid "The parser based on :mod:`xml.parsers.expat` does not support this feature, because Expat is a non-validating parser." -msgstr "پارسرِ مبتنی بر :mod:`xml.parsers.expat` این ویژگی را پشتیبانی نمی‌کند، زیرا Expat یک پارسرِ غیراعتبارسنجی است." - msgid "Enabling opens a vulnerability to `external entity attacks `_ if the parser is used with user-provided XML content. Please reflect on your `threat model `_ before enabling this feature." msgstr "فعال‌سازی این قابلیت، در صورتی که پارسر با محتوای XML ارائه‌شده توسط کاربر استفاده شود، آسیب‌پذیری در برابر `حملات موجودیت خارجی `_ ایجاد می‌کند. لطفاً پیش از فعال‌سازی این قابلیت، `مدل تهدید `_ خود را بررسی کنید." @@ -124,8 +119,8 @@ msgstr "فهرست تمام قابلیت‌ها." msgid "value: ``\"http://xml.org/sax/properties/lexical-handler\"``" msgstr "مقدار: ``\"http://xml.org/sax/properties/lexical-handler\"``" -msgid "data type: :class:`~xml.sax.handler.LexicalHandler`" -msgstr "نوع داده: :class:`~xml.sax.handler.LexicalHandler`" +msgid "data type: xml.sax.handler.LexicalHandler (not supported in Python 2)" +msgstr "نوع داده: xml.sax.handler.LexicalHandler (در پایتون ۲ پشتیبانی نمی‌شود)" msgid "description: An optional extension handler for lexical events like comments." msgstr "توضیحات: یک هندلر افزونه‌ای اختیاری برای رویدادهای واژگانی مانند کامنت‌ها." @@ -136,27 +131,21 @@ msgstr "دسترسی: خواندن/نوشتن" msgid "value: ``\"http://xml.org/sax/properties/declaration-handler\"``" msgstr "مقدار: ``\"http://xml.org/sax/properties/declaration-handler\"``" -msgid "data type: an object implementing the SAX2 ``DeclHandler`` interface" -msgstr "نوع داده: یک شیء که رابط SAX2 ``DeclHandler`` را پیاده‌سازی می‌کند" +msgid "data type: xml.sax.sax2lib.DeclHandler (not supported in Python 2)" +msgstr "نوع داده: xml.sax.sax2lib.DeclHandler (در Python 2 پشتیبانی نمی‌شود)" msgid "description: An optional extension handler for DTD-related events other than notations and unparsed entities." msgstr "توضیحات: یک هندلر افزونه‌ای اختیاری برای رویدادهای مرتبط با DTD، به‌جز نشان‌گذاری‌ها و موجودیت‌های تجزیه‌نشده." -msgid "No parser in the standard library supports this property, and the standard library provides no such handler." -msgstr "هیچ پارسرِ در کتابخانه‌ی استاندارد این ویژگی را پشتیبانی نمی‌کند، و کتابخانه‌ی استاندارد چنین هندلری ارائه نمی‌دهد." - msgid "value: ``\"http://xml.org/sax/properties/dom-node\"``" msgstr "مقدار: ``\"http://xml.org/sax/properties/dom-node\"``" -msgid "data type: :class:`xml.dom.Node`" -msgstr "نوع داده: :class:`xml.dom.Node`" +msgid "data type: org.w3c.dom.Node (not supported in Python 2)" +msgstr "نوع داده: org.w3c.dom.Node (در پایتون 2 پشتیبانی نمی‌شود)" msgid "description: When parsing, the current DOM node being visited if this is a DOM iterator; when not parsing, the root DOM node for iteration." msgstr "توضیح: هنگام تجزیه، گره DOM جاری که بازدید می‌شود، اگر این یک پیمایش‌گر DOM باشد؛ هنگامی که تجزیه انجام نمی‌شود، گره DOM ریشه برای پیمایش." -msgid "No parser in the standard library supports this property." -msgstr "هیچ پارسرِ در کتابخانه‌ی استاندارد این ویژگی را پشتیبانی نمی‌کند." - msgid "value: ``\"http://xml.org/sax/properties/xml-string\"``" msgstr "مقدار: ``\"http://xml.org/sax/properties/xml-string\"``" @@ -166,26 +155,8 @@ msgstr "نوع داده: بایت‌ها" msgid "description: The literal string of characters that was the source for the current event." msgstr "توضیح: رشته‌ای لفظی از نویسه‌ها که منبع رویداد جاری بود." -msgid "access: read-only, and only during a handler callback" -msgstr "دسترسی: فقط‌خواندنی، و تنها در طول یک کال‌بک هندلر" - -msgid "value: ``\"http://www.python.org/sax/properties/encoding\"``" -msgstr "مقدار: ``\"http://www.python.org/sax/properties/encoding\"``" - -msgid "data type: String" -msgstr "نوع داده: رشته" - -msgid "description: The name of the encoding to assume for input data." -msgstr "توضیح: نام کدگذاری که برای داده‌های ورودی فرض می‌شود." - -msgid "value: ``\"http://www.python.org/sax/properties/interning-dict\"``" -msgstr "مقدار: ``\"http://www.python.org/sax/properties/interning-dict\"``" - -msgid "data type: Dictionary" -msgstr "نوع داده: دیکشنری" - -msgid "description: The dictionary used to intern names, or ``None`` if names are not interned. Setting it enables interning, as does the :data:`feature_string_interning` feature." -msgstr "توضیح: دیکشنری‌ی مورد استفاده برای درونی‌سازی کردن نام‌ها، یا ``None`` اگر نام‌ها درونی‌سازی‌شده نباشند. تنظیم آن درونی‌سازی را فعال می‌کند، همان‌طور که ویژگی :data:`feature_string_interning` نیز می‌کند." +msgid "access: read-only" +msgstr "دسترسی: فقط‌خواندنی" msgid "List of all known property names." msgstr "فهرست تمام نام‌های ویژگی‌های شناخته‌شده." @@ -364,11 +335,44 @@ msgstr "محتوای بخش علامت‌گذاری‌شده CDATA از طریق msgid "Reports the end of a CDATA marked section." msgstr "پایان یک بخش نمادگذاری‌شده CDATA را گزارش می‌دهد." -#~ msgid "data type: xml.sax.sax2lib.DeclHandler (not supported in Python 2)" -#~ msgstr "نوع داده: xml.sax.sax2lib.DeclHandler (در Python 2 پشتیبانی نمی‌شود)" +#~ msgid "The parser based on :mod:`xml.parsers.expat` does not support this feature." +#~ msgstr "پارسرِ مبتنی بر :mod:`xml.parsers.expat` این ویژگی را پشتیبانی نمی‌کند." + +#~ msgid "The parser based on :mod:`xml.parsers.expat` does not support this feature, because Expat is a non-validating parser." +#~ msgstr "پارسرِ مبتنی بر :mod:`xml.parsers.expat` این ویژگی را پشتیبانی نمی‌کند، زیرا Expat یک پارسرِ غیراعتبارسنجی است." + +#~ msgid "data type: :class:`~xml.sax.handler.LexicalHandler`" +#~ msgstr "نوع داده: :class:`~xml.sax.handler.LexicalHandler`" + +#~ msgid "data type: an object implementing the SAX2 ``DeclHandler`` interface" +#~ msgstr "نوع داده: یک شیء که رابط SAX2 ``DeclHandler`` را پیاده‌سازی می‌کند" + +#~ msgid "No parser in the standard library supports this property, and the standard library provides no such handler." +#~ msgstr "هیچ پارسرِ در کتابخانه‌ی استاندارد این ویژگی را پشتیبانی نمی‌کند، و کتابخانه‌ی استاندارد چنین هندلری ارائه نمی‌دهد." + +#~ msgid "data type: :class:`xml.dom.Node`" +#~ msgstr "نوع داده: :class:`xml.dom.Node`" + +#~ msgid "No parser in the standard library supports this property." +#~ msgstr "هیچ پارسرِ در کتابخانه‌ی استاندارد این ویژگی را پشتیبانی نمی‌کند." + +#~ msgid "access: read-only, and only during a handler callback" +#~ msgstr "دسترسی: فقط‌خواندنی، و تنها در طول یک کال‌بک هندلر" + +#~ msgid "value: ``\"http://www.python.org/sax/properties/encoding\"``" +#~ msgstr "مقدار: ``\"http://www.python.org/sax/properties/encoding\"``" + +#~ msgid "data type: String" +#~ msgstr "نوع داده: رشته" + +#~ msgid "description: The name of the encoding to assume for input data." +#~ msgstr "توضیح: نام کدگذاری که برای داده‌های ورودی فرض می‌شود." + +#~ msgid "value: ``\"http://www.python.org/sax/properties/interning-dict\"``" +#~ msgstr "مقدار: ``\"http://www.python.org/sax/properties/interning-dict\"``" -#~ msgid "data type: org.w3c.dom.Node (not supported in Python 2)" -#~ msgstr "نوع داده: org.w3c.dom.Node (در پایتون 2 پشتیبانی نمی‌شود)" +#~ msgid "data type: Dictionary" +#~ msgstr "نوع داده: دیکشنری" -#~ msgid "access: read-only" -#~ msgstr "دسترسی: فقط‌خواندنی" +#~ msgid "description: The dictionary used to intern names, or ``None`` if names are not interned. Setting it enables interning, as does the :data:`feature_string_interning` feature." +#~ msgstr "توضیح: دیکشنری‌ی مورد استفاده برای درونی‌سازی کردن نام‌ها، یا ``None`` اگر نام‌ها درونی‌سازی‌شده نباشند. تنظیم آن درونی‌سازی را فعال می‌کند، همان‌طور که ویژگی :data:`feature_string_interning` نیز می‌کند." diff --git a/library/xml.sax.po b/library/xml.sax.po index 58f94067..73579f20 100644 --- a/library/xml.sax.po +++ b/library/xml.sax.po @@ -6,12 +6,13 @@ # Translators: # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-08-28 10:11+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -37,8 +38,8 @@ msgstr "اگر لازم است داده‌های غیرقابل‌اعتماد msgid "The SAX parser no longer processes general external entities by default to increase security. Before, the parser created network connections to fetch remote files or loaded local files from the file system for DTD and entities. The feature can be enabled again with method :meth:`~xml.sax.xmlreader.XMLReader.setFeature` on the parser object and argument :data:`~xml.sax.handler.feature_external_ges`." msgstr "پارسر SAX برای افزایش امنیت، دیگر به‌طور پیش‌فرض موجودیت‌های خارجی عمومی را پردازش نمی‌کند. پیش از این، پارسر برای DTD و موجودیت‌ها اتصال‌های شبکه ایجاد می‌کرد تا پرونده‌های دوردست را واکشی کند یا پرونده‌های محلی را از سامانه فایل‌بندی بارگذاری کند. این قابلیت را می‌توان دوباره با متد :meth:`~xml.sax.xmlreader.XMLReader.setFeature` بر روی شیء پارسر و آرگومان :data:`~xml.sax.handler.feature_external_ges` فعال کرد." -msgid "The convenience functions and data are:" -msgstr "توابع کمکی و داده‌ها عبارتند از:" +msgid "The convenience functions are:" +msgstr "توابع کمکی عبارتند از:" 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 an iterable of strings which name modules that have a function named :func:`create_parser`. Modules listed in *parser_list* will be used before modules in the default list of parsers." msgstr "یک شیء SAX از کلاس :class:`~xml.sax.xmlreader.XMLReader` ایجاد و بازگشت می‌دهد. اولین پارسر یافت‌شده استفاده خواهد شد. اگر *parser_list* ارائه شود، باید یک پیمایش‌پذیر از رشته‌ها باشد که نام ماژول‌های دارای تابعی به نام :func:`create_parser` را مشخص می‌کنند. ماژول‌های فهرست‌شده در *parser_list* پیش از ماژول‌های موجود در فهرست پیش‌فرض پارسرها استفاده خواهند شد." @@ -46,8 +47,8 @@ msgstr "یک شیء SAX از کلاس :class:`~xml.sax.xmlreader.XMLReader` ای msgid "The *parser_list* argument can be any iterable, not just a list." msgstr "آرگومان *parser_list* می‌تواند هر پیمایش‌پذیری باشد، نه فقط یک فهرست." -msgid "Create a SAX parser and use it to parse a document. The document, passed in as *filename_or_stream*, can be a system identifier (a string identifying the input source -- typically a file name or a URL), a :term:`path-like ` object, or a file object. A system identifier which does not refer to an existing file is opened with :func:`urllib.request.urlopen`. The *handler* parameter needs to be a SAX :class:`~handler.ContentHandler` instance. If *errorHandler* is given, it must be a SAX :class:`~handler.ErrorHandler` instance; if omitted, :exc:`SAXParseException` will be raised on all errors. There is no return value; all work must be done by the *handler* passed in." -msgstr "یک پارسر SAX بسازید و از آن برای تجزیه یک سند استفاده کنید. سند، که به عنوان *filename_or_stream* پاس داده شده، می‌تواند یک شناسه سیستمی (رشته‌ای که منبع ورودی را شناسایی می‌کند -- معمولاً نام یک پرونده یا یک URL)، یک شیء :term:`شبه‌مسیر `، یا یک شیء پرونده باشد. یک شناسه سیستمی که به یک پرونده موجود اشاره نمی‌کند با :func:`urllib.request.urlopen` باز می‌شود. پارامتر *handler* باید یک نمونه از کلاس SAX :class:`~handler.ContentHandler` باشد. اگر *errorHandler* داده شده باشد، باید یک نمونه از کلاس SAX :class:`~handler.ErrorHandler` باشد؛ در غیر این صورت، :exc:`SAXParseException` برای تمام خطاها پرتاب می‌شود. هیچ مقدار بازگشتی وجود ندارد؛ تمام کار باید توسط *handler* پاس داده شده انجام شود." +msgid "Create a SAX parser and use it to parse a document. The document, passed in as *filename_or_stream*, can be a filename or a file object. The *handler* parameter needs to be a SAX :class:`~handler.ContentHandler` instance. If *error_handler* is given, it must be a SAX :class:`~handler.ErrorHandler` instance; if omitted, :exc:`SAXParseException` will be raised on all errors. There is no return value; all work must be done by the *handler* passed in." +msgstr "یک پارسر SAX ایجاد کنید و از آن برای پردازش یک سند استفاده کنید. سند مورد نظر که به شکل *filename_or_stream* ارسال می‌شود، می‌تواند یک نام‌پرونده یا یک شیء پرونده باشد. پارامتر *handler* باید یک نمونه از :class:`~handler.ContentHandler` در SAX باشد. اگر *error_handler* داده شود، باید یک نمونه از :class:`~handler.ErrorHandler` در SAX باشد؛ اگر حذف شود، در صورت بروز هرگونه خطا، استثنای :exc:`SAXParseException` بالا آورده خواهد شد. مقدار بازگشتی وجود ندارد؛ تمام کارها باید توسط *handler* ارسالی انجام شود." 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 "مشابه :func:`parse` است، اما از یک بافر *string* که به‌عنوان پارامتر دریافت شده است، تجزیه می‌کند. *string* باید نمونه‌ای از :class:`str` یا یک :term:`bytes-like object` باشد." @@ -55,9 +56,6 @@ msgstr "مشابه :func:`parse` است، اما از یک بافر *string* ک msgid "Added support of :class:`str` instances." msgstr "پشتیبانی از نمونه‌های :class:`str` افزوده شد." -msgid "The list of the names of modules which are tried by :func:`make_parser` after the modules named in its *parser_list* argument. It contains ``'xml.sax.expatreader'``, or, if the :envvar:`!PY_SAX_PARSER` environment variable is set and the environment is not ignored, the comma-separated list of module names taken from it." -msgstr "فهرست نام ماژول‌هایی که توسط :func:`make_parser` بعد از ماژول‌های نام‌گذاری شده در آرگومان *parser_list* آن امتحان می‌شوند. این فهرست حاوی ``'xml.sax.expatreader'`` است، یا، اگر متغیر محیطی :envvar:`!PY_SAX_PARSER` تنظیم شده باشد و محیط نادیده گرفته نشود، فهرست جدا شده با کاما از نام ماژول‌های گرفته شده از آن." - 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. some piece of code that reads the bytes or characters from the input source, and produces a sequence of events. The events then get distributed to the handler objects, i.e. the reader invokes a method on the handler. A SAX application must therefore obtain a reader object, create or open the input sources, create the handlers, and connect these objects all together. As the final step of preparation, the reader is called to parse the input. During parsing, methods on the handler objects are called based on structural and syntactic events from the input data." msgstr "یک برنامه SAX معمول از سه نوع شیء استفاده می‌کند: خواننده‌ها، هندلرها و منابع ورودی. «خواننده» در این زمینه اصطلاح دیگری برای پارسر است، یعنی قطعه‌کدی که بایت‌ها یا نویسه‌ها را از منبع ورودی می‌خواند و دنباله‌ای از رویدادها را تولید می‌کند. سپس رویدادها به اشیاء هندلر توزیع می‌شوند، یعنی خواننده متدی را روی هندلر فراخوانی می‌کند. بنابراین یک برنامه SAX باید یک شیء خواننده به دست آورد، منابع ورودی را ایجاد یا باز کند، هندلرها را ایجاد کند و این اشیاء را به یکدیگر متصل کند. به‌عنوان آخرین مرحله آماده‌سازی، خواننده برای تجزیه ورودی فراخوانی می‌شود. در حین تجزیه، متدهای اشیاء هندلر بر اساس رویدادهای ساختاری و نحوی داده‌های ورودی فراخوانی می‌شوند." @@ -85,9 +83,6 @@ msgstr "زیرکلاسی از :exc:`SAXException` که زمانی پرتاب م 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 property to a value that the implementation does not support. SAX applications and extensions may use this class for similar purposes." msgstr "زیرکلاسی از :exc:`SAXException` که هنگامی پرتاب می‌شود که از یک :class:`~xml.sax.xmlreader.XMLReader` SAX خواسته شود قابلیتی را که پشتیبانی نمی‌شود فعال کند، یا ویژگی‌ای را روی مقداری تنظیم کند که پیاده‌سازی از آن پشتیبانی نمی‌کند. برنامه‌ها و افزونه‌های SAX می‌توانند از این کلاس برای اهداف مشابه استفاده کنند." -msgid "Subclass of :exc:`SAXNotSupportedException` raised when no parser is available. A parser module raises it when it is imported or during parsing if the parser it provides cannot be used, and :func:`make_parser` raises it if no module from the tried ones provides a usable parser." -msgstr "زیرکلاس :exc:`SAXNotSupportedException` که وقتی هیچ پارسری در دسترس نیست پرتاب می‌شود. یک ماژول پارسر هنگام وارد کردن یا در حین تجزیه، اگر پارسر ارائه شده قابل استفاده نباشد، این استثنا را پرتاب می‌کند، و :func:`make_parser` آن را پرتاب می‌کند اگر هیچ ماژولی از میان امتحان شده‌ها پارسر قابل استفاده‌ای ارائه ندهد." - msgid "`SAX: The Simple API for XML `_" msgstr "`SAX: API ساده برای XML `_" @@ -123,3 +118,9 @@ msgstr "یک پیام قابل‌خواندن برای انسان برمی‌گ msgid "Return an encapsulated exception object, or ``None``." msgstr "یک شیء استثنای کپسوله‌شده یا ``None`` را برمی‌گرداند." + +#~ msgid "The list of the names of modules which are tried by :func:`make_parser` after the modules named in its *parser_list* argument. It contains ``'xml.sax.expatreader'``, or, if the :envvar:`!PY_SAX_PARSER` environment variable is set and the environment is not ignored, the comma-separated list of module names taken from it." +#~ msgstr "فهرست نام ماژول‌هایی که توسط :func:`make_parser` بعد از ماژول‌های نام‌گذاری شده در آرگومان *parser_list* آن امتحان می‌شوند. این فهرست حاوی ``'xml.sax.expatreader'`` است، یا، اگر متغیر محیطی :envvar:`!PY_SAX_PARSER` تنظیم شده باشد و محیط نادیده گرفته نشود، فهرست جدا شده با کاما از نام ماژول‌های گرفته شده از آن." + +#~ msgid "Subclass of :exc:`SAXNotSupportedException` raised when no parser is available. A parser module raises it when it is imported or during parsing if the parser it provides cannot be used, and :func:`make_parser` raises it if no module from the tried ones provides a usable parser." +#~ msgstr "زیرکلاس :exc:`SAXNotSupportedException` که وقتی هیچ پارسری در دسترس نیست پرتاب می‌شود. یک ماژول پارسر هنگام وارد کردن یا در حین تجزیه، اگر پارسر ارائه شده قابل استفاده نباشد، این استثنا را پرتاب می‌کند، و :func:`make_parser` آن را پرتاب می‌کند اگر هیچ ماژولی از میان امتحان شده‌ها پارسر قابل استفاده‌ای ارائه ندهد." diff --git a/library/xml.sax.reader.po b/library/xml.sax.reader.po index 8b6c50d5..ab1275eb 100644 --- a/library/xml.sax.reader.po +++ b/library/xml.sax.reader.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 14:04+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -136,9 +136,6 @@ msgstr "تکه‌ای از *data* را پردازش می‌کند." msgid "Assume the end of the document. That will check well-formedness conditions that can be checked only at the end, invoke handlers, and may clean up resources allocated during parsing." msgstr "پایان سند را در نظر بگیرید. این کار شرایط خوش‌فرمی را که تنها در انتها قابل بررسی هستند، بررسی می‌کند، هندلرها را فراخوانی می‌کند و ممکن است منابع اختصاص‌یافته در طول تجزیه را پاک‌سازی کند." -msgid "Prepare the parser for parsing *source*, an :class:`InputSource` instance. It is called by :meth:`~XMLReader.parse` before feeding the data. The parser implementation must override this method; the default implementation raises :exc:`NotImplementedError`." -msgstr "پارسر را برای تجزیه *source*، یک نمونه از :class:`InputSource`، آماده کنید. این متد توسط :meth:`~XMLReader.parse` قبل از تغذیه داده‌ها فراخوانی می‌شود. پیاده‌سازی پارسر باید این متد را بازنویسی کند؛ پیاده‌سازی پیش‌فرض :exc:`NotImplementedError` را پرتاب می‌کند." - msgid "This method is called after close has been called to reset the parser so that it is ready to parse new documents. The results of calling parse or feed after close without calling reset are undefined." msgstr "این متد پس از فراخوانی close فراخوانی می‌شود تا پارسر بازنشانی شود و برای تجزیه اسناد جدید آماده شود. نتایج فراخوانی parse یا feed پس از close بدون فراخوانی reset تعریف‌نشده است." @@ -249,3 +246,6 @@ msgstr "بازگرداندن نام کامل برای یک جفت ``(namespace, msgid "Return the qualified names of all attributes." msgstr "نام‌های کامل (qualified names) همه ویژگی‌ها را بازمی‌گرداند." + +#~ msgid "Prepare the parser for parsing *source*, an :class:`InputSource` instance. It is called by :meth:`~XMLReader.parse` before feeding the data. The parser implementation must override this method; the default implementation raises :exc:`NotImplementedError`." +#~ msgstr "پارسر را برای تجزیه *source*، یک نمونه از :class:`InputSource`، آماده کنید. این متد توسط :meth:`~XMLReader.parse` قبل از تغذیه داده‌ها فراخوانی می‌شود. پیاده‌سازی پارسر باید این متد را بازنویسی کند؛ پیاده‌سازی پیش‌فرض :exc:`NotImplementedError` را پرتاب می‌کند." diff --git a/library/xml.sax.utils.po b/library/xml.sax.utils.po index a46a7c8c..c52b9c64 100644 --- a/library/xml.sax.utils.po +++ b/library/xml.sax.utils.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-11 12:24+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -68,11 +68,11 @@ msgstr "پارامتر *short_empty_elements* افزوده شد." msgid "This class is designed to sit between an :class:`~xml.sax.xmlreader.XMLReader` and the client application's event handlers. By default, it does nothing but pass requests up to the reader and events on to the handlers unmodified, but subclasses can override specific methods to modify the event stream or the configuration requests as they pass through." msgstr "این کلاس برای قرار گرفتن بین یک :class:`~xml.sax.xmlreader.XMLReader` و هندلرهای رویداد برنامه‌ی کلاینت طراحی شده است. به‌طور پیش‌فرض، این کلاس هیچ کاری جز انتقال درخواست‌ها به خواننده و انتقال رویدادها به هندلرها به‌صورت بدون تغییر انجام نمی‌دهد، اما زیرکلاس‌ها می‌توانند متدهای خاصی را بازنویسی کنند تا جریان رویدادها یا درخواست‌های پیکربندی را در حین عبور تغییر دهند." -msgid "Return the parent reader, or ``None`` if it is not set." -msgstr "خواننده‌ی والد (parent reader) را برگردانید، یا ``None`` اگر تنظیم نشده باشد." - -msgid "Set the parent reader, which the events are read from." -msgstr "خواننده‌ی والد را تنظیم کنید، که رویدادها از آن خوانده می‌شوند." - msgid "This function takes an input source and an optional base URL and returns a fully resolved :class:`~xml.sax.xmlreader.InputSource` object ready for reading. The input source can be given as a string, a file-like object, or an :class:`~xml.sax.xmlreader.InputSource` object; parsers will use this function to implement the polymorphic *source* argument to their :meth:`~xml.sax.xmlreader.XMLReader.parse` method." msgstr "این تابع یک منبع ورودی و یک URL پایه اختیاری می‌گیرد و یک شیء :class:`~xml.sax.xmlreader.InputSource` کاملاً حل‌شده و آماده برای خواندن برمی‌گرداند. منبع ورودی می‌تواند به‌صورت یک رشته، یک شیء شبه‌پرونده، یا یک شیء :class:`~xml.sax.xmlreader.InputSource` داده شود؛ پارسرها از این تابع برای پیاده‌سازی آرگومان چندریختی *source* در متد :meth:`~xml.sax.xmlreader.XMLReader.parse` خود استفاده می‌کنند." + +#~ msgid "Return the parent reader, or ``None`` if it is not set." +#~ msgstr "خواننده‌ی والد (parent reader) را برگردانید، یا ``None`` اگر تنظیم نشده باشد." + +#~ msgid "Set the parent reader, which the events are read from." +#~ msgstr "خواننده‌ی والد را تنظیم کنید، که رویدادها از آن خوانده می‌شوند." diff --git a/library/xmlrpc.client.po b/library/xmlrpc.client.po index 7406bfa0..b2debfe7 100644 --- a/library/xmlrpc.client.po +++ b/library/xmlrpc.client.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 10:09+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -167,8 +168,8 @@ msgstr "مشخصات رسمی." msgid "ServerProxy Objects" msgstr "اشیای ServerProxy" -msgid "A :class:`ServerProxy` instance has a method corresponding to each remote procedure call accepted by the XML-RPC server. Calling the method performs an RPC, dispatched by both name and argument signature (e.g. the same method name can be overloaded with multiple argument signatures). The RPC finishes by returning a value, which may be either returned data in a conformant type or a :class:`Fault` or :class:`ProtocolError` object indicating an error." -msgstr "یک نمونه :class:`ServerProxy` دارای یک متد متناظر با هر فراخوانی رویه‌ی راه دور پذیرفته‌شده توسط سرور XML-RPC است. فراخوانی این متد یک RPC انجام می‌دهد که بر اساس هر دو نام و امضای آرگومان اعزام (dispatch) می‌شود (برای مثال، همان نام متد می‌تواند با چندین امضای آرگومان سربارگذاری (overload) شود). این RPC با برگرداندن یک مقدار پایان می‌یابد، که ممکن است داده‌ی برگردانده‌شده در یک نوع منطبق باشد یا یک شیء :class:`Fault` یا :class:`ProtocolError` که نشان‌دهنده‌ی یک خطا است." +msgid "A :class:`ServerProxy` instance has a method corresponding to each remote procedure call accepted by the XML-RPC server. Calling the method performs an RPC, dispatched by both name and argument signature (e.g. the same method name can be overloaded with multiple argument signatures). The RPC finishes either by returning data in a conformant type or by raising a :class:`Fault` or :class:`ProtocolError` exception indicating an error." +msgstr "یک نمونه از :class:`ServerProxy` دارای متدی متناظر با هر فراخوانی روش راه دور (RPC) پذیرفته‌شده توسط سرور XML-RPC است. فراخوانی این متد یک RPC را اجرا می‌کند که هم بر اساس نام و هم بر اساس امضای آرگومان‌ها دیسپچ می‌شود (مثلاً یک نام متد واحد را می‌توان با چند امضای آرگومان سربارگذاری‌کرد). اجرای RPC یا با بازگرداندن داده در یک نوع سازگار و یا با بالا آوردن یک استثنای :class:`Fault` یا :class:`ProtocolError` که نشان‌دهنده‌ی یک خطا است، به پایان می‌رسد." msgid "Servers that support the XML introspection API support some common methods grouped under the reserved :attr:`~ServerProxy.system` attribute:" msgstr "سرورهایی که از API درون‌نگری XML پشتیبانی می‌کنند، از برخی متدهای رایج پشتیبانی می‌کنند که زیر ویژگی محفوظ :attr:`~ServerProxy.system` گروه‌بندی شده‌اند:" @@ -486,8 +487,8 @@ msgstr "اشیای MultiCall" msgid "The :class:`MultiCall` object provides a way to encapsulate multiple calls to a remote server into a single request [#]_." msgstr "شیء :class:`MultiCall` راهی برای کپسوله‌کردن چندین فراخوانی به یک سرور دوردست در قالب یک درخواست فراهم می‌کند [#]_." -msgid "Create an object used to boxcar method calls. *server* is the eventual target of the call. Calls can be made to the result object, but they will immediately return ``None``, and only store the call name and parameters in the :class:`MultiCall` object. Calling the object itself causes all stored calls to be transmitted as a single ``system.multicall`` request. The result of this call is a :term:`generator`; iterating over this generator yields the individual results." -msgstr "یک شیء برای دسته‌بندی (boxcar) فراخوانی‌های متد ایجاد می‌کند. *server* هدف نهایی فراخوانی است. می‌توان فراخوانی‌هایی را روی شیء نتیجه انجام داد، اما آن‌ها بلافاصله ``None`` را بازمی‌گردانند و فقط نام و پارامترهای فراخوانی را در شیء :class:`MultiCall` ذخیره می‌کنند. فراخوانی خود شیء باعث می‌شود همه‌ی فراخوانی‌های ذخیره‌شده در قالب یک درخواست ``system.multicall`` ارسال شوند. نتیجه‌ی این فراخوانی یک :term:`تولیدگر ` است؛ پیمایش روی این تولیدگر نتایج جداگانه را بازمی‌گرداند." +msgid "Create an object used to boxcar method calls. *server* is the eventual target of the call. Calls can be made to the result object, but they will immediately return ``None``, and only store the call name and arguments in the :class:`MultiCall` object. Calling the object itself causes all stored calls to be transmitted as a single ``system.multicall`` request. The result of this call is a :term:`generator`; iterating over this generator yields the individual results." +msgstr "یک شیء برای جعبه‌گذاری (boxcar) فراخوانی‌های متد ایجاد کنید. *server* هدف نهایی این فراخوانی است. فراخوانی‌ها را می‌توان روی شیء نتیجه انجام داد، اما آن‌ها بلافاصله مقدار ``None`` را برمی‌گردانند و فقط نام فراخوانی و آرگومان‌ها را در شیء :class:`MultiCall` ذخیره می‌کنند. فراخوانی خودِ شیء باعث می‌شود تمام فراخوانی‌های ذخیره‌شده به شکل یک درخواست منفرد ``system.multicall`` منتقل شوند. نتیجه‌ی این فراخوانی یک :term:`تولیدگر ` است؛ پیمایش روی این تولیدگر، نتایج فردی را به دست می‌دهد." msgid "A usage example of this class follows. The server code::" msgstr "در ادامه مثالی از استفاده از این کلاس آمده است. کد سرور::" diff --git a/library/zipimport.po b/library/zipimport.po index 6ca8ff36..df224365 100644 --- a/library/zipimport.po +++ b/library/zipimport.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2021-06-28 01:18+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -38,6 +39,9 @@ msgstr "معمولاً، :data:`sys.path` فهرستی از نام پوشه‌ه msgid "Any files may be present in the ZIP archive, but importers are only invoked for :file:`.py` and :file:`.pyc` files. ZIP import of dynamic modules (:file:`.pyd`, :file:`.so`) is disallowed. Note that if an archive only contains :file:`.py` files, Python will not attempt to modify the archive by adding the corresponding :file:`.pyc` file, meaning that if a ZIP archive doesn't contain :file:`.pyc` files, importing may be rather slow." msgstr "هر پرونده‌ای ممکن است در بایگانی ZIP وجود داشته باشد، اما ایمپورت‌کننده‌ها فقط برای پرونده‌های :file:`.py` و :file:`.pyc` فراخوانی می‌شوند. ایمپورت ماژول‌های پویا از ZIP (:file:`.pyd`، :file:`.so`) مجاز نیست. توجه داشته باشید که اگر یک بایگانی فقط شامل پرونده‌های :file:`.py` باشد، پایتون تلاش نمی‌کند بایگانی را با افزودن پرونده :file:`.pyc` متناظر تغییر دهد، به این معنا که اگر یک بایگانی ZIP شامل پرونده‌های :file:`.pyc` نباشد، ایمپورت ممکن است نسبتاً کند باشد." +msgid "Zstandard (*zstd*) compressed zip file entries are supported." +msgstr "درون‌دادهای پرونده‌ی فشرده‌ی Zstandard (که با *zstd* فشرده شده‌اند) پشتیبانی می‌شوند." + msgid "ZIP64 is supported" msgstr "از ZIP64 پشتیبانی می‌شود" @@ -110,12 +114,6 @@ msgstr "کد منبع ماژول مشخص‌شده را برمی‌گرداند. msgid "Return ``True`` if the module specified by *fullname* is a package. Raise :exc:`ZipImportError` if the module couldn't be found." msgstr "اگر ماژول مشخص‌شده با *fullname* یک بسته باشد، ``True`` را برمی‌گرداند. اگر ماژول یافت نشد، :exc:`ZipImportError` را پرتاب می‌کند." -msgid "Load the module specified by *fullname*. *fullname* must be the fully qualified (dotted) module name. Returns the imported module on success, raises :exc:`ZipImportError` on failure." -msgstr "ماژول مشخص‌شده با *fullname* را بارگذاری می‌کند. *fullname* باید نام کاملاً کامل (نقطه‌دار) ماژول باشد. در صورت موفقیت، ماژول ایمپورت‌شده را برمی‌گرداند و در صورت شکست، :exc:`ZipImportError` را پرتاب می‌کند." - -msgid "Use :meth:`exec_module` instead." -msgstr "به‌جای آن از :meth:`exec_module` استفاده کنید." - msgid "Clear out the internal cache of information about files found within the ZIP archive." msgstr "نهانگاه داخلی اطلاعات مربوط به پرونده‌های یافت‌شده در بایگانی ZIP را پاک می‌کند." @@ -165,3 +163,9 @@ msgstr "" ">>> import example\n" ">>> example.__file__\n" "'example_archive.zip/example.py'" + +#~ msgid "Load the module specified by *fullname*. *fullname* must be the fully qualified (dotted) module name. Returns the imported module on success, raises :exc:`ZipImportError` on failure." +#~ msgstr "ماژول مشخص‌شده با *fullname* را بارگذاری می‌کند. *fullname* باید نام کاملاً کامل (نقطه‌دار) ماژول باشد. در صورت موفقیت، ماژول ایمپورت‌شده را برمی‌گرداند و در صورت شکست، :exc:`ZipImportError` را پرتاب می‌کند." + +#~ msgid "Use :meth:`exec_module` instead." +#~ msgstr "به‌جای آن از :meth:`exec_module` استفاده کنید." diff --git a/library/zlib.po b/library/zlib.po index 7e68cabb..be23d4de 100644 --- a/library/zlib.po +++ b/library/zlib.po @@ -6,12 +6,13 @@ # Translators: # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 08:11+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -49,6 +50,15 @@ msgstr "جمع‌آزما Adler-32 برای *data* محاسبه می‌شود. ( msgid "The result is always unsigned." msgstr "نتیجه همیشه بدون علامت است." +msgid "Combine two Adler-32 checksums into one." +msgstr "دو جمع‌آزمای Adler-32 را با یکدیگر ترکیب کنید." + +msgid "Given the Adler-32 checksum *adler1* of a sequence ``A`` and the Adler-32 checksum *adler2* of a sequence ``B`` of length *len2*, return the Adler-32 checksum of ``A`` and ``B`` concatenated." +msgstr "با داشتن جمع‌آزمای Adler-32 به نام *adler1* برای دنباله‌ی ``A`` و جمع‌آزمای Adler-32 به نام *adler2* برای دنباله‌ی ``B`` با طول *len2*، جمع‌آزمای Adler-32 مربوط به الحاق ``A`` و ``B`` را برگردانید." + +msgid "This function is typically useful to combine Adler-32 checksums that were concurrently computed. To compute checksums sequentially, use :func:`adler32` with the running checksum as the ``value`` argument." +msgstr "این تابع معمولاً برای ترکیب جمع‌آزمای Adler-32 که به‌طور هم‌زمان (هم‌روند) محاسبه شده‌اند، مفید است. برای محاسبه‌ی متوالی جمع‌آزماها، از تابع :func:`adler32` همراه با جمع‌آزمای در حال اجرا به عنوان آرگومان ``value`` استفاده کنید." + msgid "Compresses the bytes in *data*, returning a bytes object containing compressed data. *level* is an integer from ``0`` to ``9`` or ``-1`` controlling the level of compression; See :const:`Z_BEST_SPEED` (``1``), :const:`Z_BEST_COMPRESSION` (``9``), :const:`Z_NO_COMPRESSION` (``0``), and the default, :const:`Z_DEFAULT_COMPRESSION` (``-1``) for more information about these values." msgstr "بایت‌های موجود در *data* را فشرده می‌کند و یک شیء bytes حاوی داده‌های فشرده را برمی‌گرداند. *level* یک عدد صحیح از ``0`` تا ``9`` یا ``-1`` است که سطح فشرده‌سازی را کنترل می‌کند؛ برای اطلاعات بیشتر درباره این مقادیر، :const:`Z_BEST_SPEED` (``1``)، :const:`Z_BEST_COMPRESSION` (``9``)، :const:`Z_NO_COMPRESSION` (``0``) و مقدار پیش‌فرض، :const:`Z_DEFAULT_COMPRESSION` (``-1``) را ببینید." @@ -100,6 +110,15 @@ msgstr "پارامتر *zdict* و پشتیبانی از آرگومان‌های msgid "Computes a CRC (Cyclic Redundancy Check) checksum of *data*. The result is an unsigned 32-bit integer. If *value* is present, it is used as the starting value of the checksum; otherwise, a default value of 0 is used. Passing in *value* allows computing a running checksum over the concatenation of several inputs. The algorithm is not cryptographically strong, and should not be used for authentication or digital signatures. Since the algorithm is designed for use as a checksum algorithm, it is not suitable for use as a general hash algorithm." msgstr "جمع‌آزما CRC (Cyclic Redundancy Check) برای *data* محاسبه می‌شود. نتیجه یک عدد صحیح ۳۲ بیتی بدون علامت است. اگر *value* موجود باشد، از آن به‌عنوان مقدار آغازین جمع‌آزما استفاده می‌شود؛ در غیر این صورت، از مقدار پیش‌فرض ۰ استفاده می‌شود. ارسال *value* امکان محاسبه‌ی جمع‌آزما جاری بر روی الحاق چندین ورودی را فراهم می‌کند. این الگوریتم از نظر رمزنگاری قوی نیست و نباید برای احراز هویت یا امضای دیجیتال استفاده شود. از آنجا که این الگوریتم برای استفاده به‌عنوان الگوریتم جمع‌آزما طراحی شده است، برای استفاده به‌عنوان یک الگوریتم هش عمومی مناسب نیست." +msgid "Combine two CRC-32 checksums into one." +msgstr "دو جمع‌آزمای CRC-32 را با یکدیگر ترکیب کنید." + +msgid "Given the CRC-32 checksum *crc1* of a sequence ``A`` and the CRC-32 checksum *crc2* of a sequence ``B`` of length *len2*, return the CRC-32 checksum of ``A`` and ``B`` concatenated." +msgstr "با داشتن جمع‌آزمای (CRC-32) *crc1* از یک دنباله‌ی ``A`` و جمع‌آزمای (CRC-32) *crc2* از یک دنباله‌ی ``B`` با طول *len2*، جمع‌آزمای (CRC-32) حاصل از الحاق ``A`` و ``B`` را برگردانید." + +msgid "This function is typically useful to combine CRC-32 checksums that were concurrently computed. To compute checksums sequentially, use :func:`crc32` with the running checksum as the ``value`` argument." +msgstr "این تابع معمولاً برای ترکیب جمع‌آزماهای CRC-32 که به‌صورت هم‌زمان محاسبه شده‌اند، مفید است. برای محاسبه‌ی ترتیبی جمع‌آزماها، از :func:`crc32` به همراه جمع‌آزمای جاری به عنوان آرگومان ``value`` استفاده کنید." + msgid "Decompresses the bytes in *data*, returning a bytes object containing the uncompressed data. The *wbits* parameter depends on the format of *data*, and is discussed further below. If *bufsize* is given, it is used as the initial size of the output buffer. Raises the :exc:`error` exception if any error occurs." msgstr "بایت‌های موجود در *data* را از حالت فشرده خارج می‌کند و یک شیء بایتی حاوی داده‌های فشرده‌نشده برمی‌گرداند. پارامتر *wbits* به قالب *data* بستگی دارد و در ادامه بیشتر توضیح داده شده است. اگر *bufsize* داده شود، از آن به‌عنوان اندازه اولیه بافر خروجی استفاده می‌شود. در صورت بروز هرگونه خطا، استثنای :exc:`error` را پرتاب می‌کند." @@ -178,8 +197,17 @@ msgstr "این امر امکان تمایز میان یک جریان فشرده msgid "Decompress *data*, returning a bytes object containing the uncompressed data corresponding to at least part of the data in *string*. This data should be concatenated to the output produced by any preceding calls to the :meth:`decompress` method. Some of the input data may be preserved in internal buffers for later processing." msgstr "*data* را از حالت فشرده خارج می‌کند و یک شیء bytes حاوی داده‌ی غیرفشرده‌ی متناظر با حداقل بخشی از داده‌های موجود در *string* برمی‌گرداند. این داده باید به خروجی حاصل از هر فراخوانی پیشین متد :meth:`decompress` الحاق شود. ممکن است بخشی از داده‌ی ورودی برای پردازش بعدی در بافرهای داخلی نگه‌داری شود." -msgid "If the optional parameter *max_length* is non-zero then the return value will be no longer than *max_length*. This may mean that not all of the compressed input can be processed; and unconsumed data will be stored in the attribute :attr:`unconsumed_tail`. This bytestring must be passed to a subsequent call to :meth:`decompress` if decompression is to continue. If *max_length* is zero then the whole input is decompressed, and :attr:`unconsumed_tail` is empty." -msgstr "اگر پارامتر اختیاری *max_length* غیرصفر باشد، طول مقدار بازگشتی بیشتر از *max_length* نخواهد بود. این ممکن است به این معنا باشد که تمام ورودی فشرده قابل پردازش نیست؛ و داده مصرف‌نشده در ویژگی :attr:`unconsumed_tail` ذخیره می‌شود. اگر قرار است واگشایی ادامه یابد، این رشته بایتی باید به فراخوانی بعدی :meth:`decompress` ارسال شود. اگر *max_length* صفر باشد، کل ورودی واگشایی می‌شود و :attr:`unconsumed_tail` خالی است." +msgid "If the optional parameter *max_length* is non-zero then the return value will be no longer than *max_length*. This may mean that not all of the compressed input can be processed; and unconsumed data will be stored in the attribute :attr:`unconsumed_tail`. This bytestring must be passed to a subsequent call to :meth:`decompress` if decompression is to continue. If *max_length* is zero then the whole input is decompressed, and :attr:`unconsumed_tail` is empty. For example, the full content could be read like::" +msgstr "اگر پارامتر اختیاری *max_length* غیرصفر باشد، آنگاه مقدار بازگشتی از *max_length* بیشتر نخواهد بود. این ممکن است به این معنا باشد که تمام ورودی فشرده‌شده قابل پردازش نیست؛ و داده‌های مصرف‌نشده در ویژگی :attr:`unconsumed_tail` ذخیره خواهند شد. اگر قرار است واگشایی ادامه پیدا کند، این رشته‌بایت باید به یک فراخوانی بعدی به :meth:`decompress` ارسال شود. اگر *max_length* صفر باشد، کل ورودی واگشایی می‌شود و :attr:`unconsumed_tail` خالی خواهد بود. برای مثال، محتوای کامل را می‌توان به شکل زیر خواند::" + +msgid "" +"process_output(d.decompress(data, max_length))\n" +"while chunk := d.decompress(d.unconsumed_tail, max_length):\n" +" process_output(chunk)" +msgstr "" +"process_output(d.decompress(data, max_length))\n" +"while chunk := d.decompress(d.unconsumed_tail, max_length):\n" +" process_output(chunk)" msgid "*max_length* can be used as a keyword argument." msgstr "می‌توان از *max_length* به‌عنوان آرگومان کلیدواژه‌ای استفاده کرد." diff --git a/library/zoneinfo.po b/library/zoneinfo.po index a23ccdbf..8cdb4bce 100644 --- a/library/zoneinfo.po +++ b/library/zoneinfo.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 08:18+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -333,8 +334,8 @@ msgstr "توابع" msgid "Get a set containing all the valid keys for IANA time zones available anywhere on the time zone path. This is recalculated on every call to the function." msgstr "مجموعه‌ای شامل تمام کلیدهای معتبر برای مناطق زمانی IANA موجود در هر نقطه از مسیر مناطق زمانی دریافت کنید. این مجموعه در هر فراخوانی تابع دوباره محاسبه می‌شود." -msgid "This function only includes canonical zone names and does not include \"special\" zones such as those under the ``posix/`` and ``right/`` directories, or the ``posixrules`` zone." -msgstr "این تابع فقط شامل نام‌های کانونیکال منطقه می‌شود و مناطق «ویژه» را شامل نمی‌شود، مانند آن‌هایی که در پوشه‌های ``posix/`` و ``right/`` قرار دارند، یا منطقه ``posixrules``." +msgid "This function only includes canonical zone names and does not include \"special\" zones such as those under the ``posix/`` and ``right/`` directories, the ``posixrules`` or the ``localtime`` zone." +msgstr "این تابع فقط شامل نام‌های مناطق کانونیکال است و شامل مناطق «خاص» مانند مناطق موجود در پوشه‌های ``posix/`` و ``right/``، یا مناطق ``posixrules`` و ``localtime`` نمی‌شود." msgid "This function may open a large number of files, as the best way to determine if a file on the time zone path is a valid time zone is to read the \"magic string\" at the beginning." msgstr "این تابع ممکن است تعداد زیادی پرونده را باز کند، زیرا بهترین راه برای تشخیص اینکه آیا یک پرونده در مسیر منطقه زمانی، یک منطقه زمانی معتبر است، خواندن «رشته جادویی» (magic string) در ابتدای آن است." diff --git a/license.po b/license.po index bf6e65bf..8b607238 100644 --- a/license.po +++ b/license.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-27 04:09+0000\n" +"POT-Creation-Date: 2026-10-08 09:24+0330\n" "PO-Revision-Date: 2026-09-26 07:42+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -1289,12 +1289,35 @@ msgstr "" msgid "expat" msgstr "expat" -msgid "The :mod:`pyexpat ` extension is built using an included copy of the expat sources unless the build is configured ``--with-system-expat``::" -msgstr "افزونه‌ی :mod:`pyexpat ` با استفاده از یک کپیِ شامل‌شده از کدهای مبداِ expat ساخته شده است، مگر اینکه ساخت با ``--with-system-expat`` پیکربندی شده باشد::" - +msgid "The :mod:`pyexpat ` extension is built using an included copy of the expat sources unless the build is configured :option:`--with-system-expat`:" +msgstr "افزونه‌ی :mod:`pyexpat ` با استفاده از یک کپیِ همراه از کُدهای منبع expat ساخته می‌شود، مگر اینکه ساخت با :option:`--with-system-expat` پیکربندی شده باشد:" + +#, fuzzy +#| msgid "" +#| "Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd\n" +#| " and Clark Cooper\n" +#| "\n" +#| "Permission is hereby granted, free of charge, to any person obtaining\n" +#| "a copy of this software and associated documentation files (the\n" +#| "\"Software\"), to deal in the Software without restriction, including\n" +#| "without limitation the rights to use, copy, modify, merge, publish,\n" +#| "distribute, sublicense, and/or sell copies of the Software, and to\n" +#| "permit persons to whom the Software is furnished to do so, subject to\n" +#| "the following conditions:\n" +#| "\n" +#| "The above copyright notice and this permission notice shall be included\n" +#| "in all copies or substantial portions of the Software.\n" +#| "\n" +#| "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n" +#| "EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n" +#| "MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n" +#| "IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n" +#| "CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n" +#| "TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n" +#| "SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." msgid "" -"Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd\n" -" and Clark Cooper\n" +"Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper\n" +"Copyright (c) 2001-2025 Expat maintainers\n" "\n" "Permission is hereby granted, free of charge, to any person obtaining\n" "a copy of this software and associated documentation files (the\n" @@ -1313,7 +1336,7 @@ msgid "" "IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n" "CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n" "TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n" -"SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." +"SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" msgstr "" "کپی‌رایت (c) ۱۹۹۸، ۱۹۹۹، ۲۰۰۰ مرکز نرم‌افزار متن‌باز تایلند لیمیتد\n" " و کلارک کوپر\n" @@ -1765,6 +1788,116 @@ msgstr "" "این نرم‌افزار توسط صاحبان کپی‌رایت و مشارکت‌کنندگان «همان‌طور که هست» ارائه می‌شود و هرگونه ضمانت صریح یا ضمنی، از جمله اما نه محدود به، ضمانت‌های ضمنی قابلیت فروش و مناسب بودن برای هدف خاصی انکار می‌شود.\n" "در هیچ رویدادی صاحب کپی‌رایت یا مشارکت‌کنندگان مسئول هیچ‌گونه خسارت مستقیم، غیرمستقیم، اتفاقی، خاص، نمونه‌ای، یا تبعی (از جمله اما نه محدود به، تامین کالا یا خدمات جایگزین؛ از دست رفتن استفاده، داده‌ها، یا سود؛ یا وقفه کار) نخواهد بود، هرچند چگونه بروز یافته و تحت هر نظریه مسئولیتی، سواء در قرارداد، مسئولیت دقیق، یا تقصیر (از جمله بی‌دقتی یا غیره) ناشی از هر روش استفاده از این نرم‌افزار، حتی اگر از امکان چنین خسارتی آگاه شده باشند." +msgid "Profiling module" +msgstr "ماژول پروفایل‌گیری" + +msgid "The :mod:`!profiling` module includes vendored third-party libraries in :file:`Lib/profiling/sampling/_vendor/` with the following licenses:" +msgstr "ماژول :mod:`!profiling` شامل کتابخانه‌های شخص ثالث تعبیه‌شده در :file:`Lib/profiling/sampling/_vendor/` با مجوزهای زیر است:" + +msgid "**d3-flamegraph**" +msgstr "**d3-flamegraph**" + +msgid "The d3-flamegraph library is distributed under the Apache License, Version 2.0. See the OpenSSL section above for the full text of the Apache License Version 2.0." +msgstr "کتابخانه‌ی d3-flamegraph تحت مجوز Apache نسخه‌ی 2.0 توزیع می‌شود. برای متن کامل مجوز Apache نسخه‌ی 2.0، بخش OpenSSL را در بالا ببینید." + +msgid "**d3.js**" +msgstr "**d3.js**" + +msgid "The d3.js library contains the following notice::" +msgstr "کتابخانه‌ی d3.js حاوی اعلامیه‌ی زیر است::" + +msgid "" +"Copyright 2010-2021 Mike Bostock\n" +"\n" +"Permission to use, copy, modify, and/or distribute this software for any purpose\n" +"with or without fee is hereby granted, provided that the above copyright notice\n" +"and this permission notice appear in all copies.\n" +"\n" +"THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n" +"REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\n" +"FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n" +"INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS\n" +"OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER\n" +"TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF\n" +"THIS SOFTWARE." +msgstr "" +"Copyright 2010-2021 Mike Bostock\n" +"\n" +"Permission to use, copy, modify, and/or distribute this software for any purpose\n" +"with or without fee is hereby granted, provided that the above copyright notice\n" +"and this permission notice appear in all copies.\n" +"\n" +"THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n" +"REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\n" +"FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n" +"INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS\n" +"OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER\n" +"TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF\n" +"THIS SOFTWARE." + +msgid "Pixi packages" +msgstr "بسته‌های Pixi" + +msgid "The Pixi package definitions found in :file:`Tools/pixi-packages` are derived from https://github.com/conda-forge/python-feedstock which contains the following license::" +msgstr "تعاریف بسته‌ی Pixi موجود در :file:`Tools/pixi-packages` از https://github.com/conda-forge/python-feedstock گرفته شده‌اند که حاوی مجوز زیر است::" + +msgid "" +"BSD-3-Clause license\n" +"Copyright (c) 2015-2026, conda-forge contributors\n" +"All rights reserved.\n" +"\n" +"Redistribution and use in source and binary forms, with or without\n" +"modification, are permitted provided that the following conditions are met:\n" +"\n" +" 1. Redistributions of source code must retain the above copyright notice,\n" +" this list of conditions and the following disclaimer.\n" +" 2. Redistributions in binary form must reproduce the above copyright\n" +" notice, this list of conditions and the following disclaimer in the\n" +" documentation and/or other materials provided with the distribution.\n" +" 3. Neither the name of the copyright holder nor the names of its\n" +" contributors may be used to endorse or promote products derived from\n" +" this software without specific prior written permission.\n" +"\n" +"THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n" +"AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n" +"IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n" +"ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR\n" +"ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n" +"DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n" +"SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n" +"CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n" +"LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n" +"OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH\n" +"DAMAGE." +msgstr "" +"مجوز BSD-3-Clause\n" +"حق نشر (c) ۲۰۱۵-۲۰۲۶، مشارکت‌کنندگان conda-forge\n" +"تمامی حقوق محفوظ است.\n" +"\n" +"بازتوزیع و استفاده در فرم‌های سورس و دودویی، با یا بدون\n" +"تغییر، مشروط بر رعایت شرایط زیر مجاز است:\n" +"\n" +" ۱. بازتوزیع‌های کد منبع باید اعلامیه‌ی حق نشر بالا،\n" +" این فهرست شرایط و سلب مسئولیت زیر را حفظ کنند.\n" +" ۲. بازتوزیع‌ها در فرم دودویی باید اعلامیه‌ی حق نشر\n" +" بالا، این فهرست شرایط و سلب مسئولیت زیر را در\n" +" مستندات و/یا سایر مواد ارائه شده به همراه توزیع باز تولید کنند.\n" +" ۳. نه نام دارنده‌ی حق نشر و نه نام مشارکت‌کنندگان آن\n" +" نمی‌تواند برای تأیید یا تبلیغ محصولات مشتق شده از\n" +" این نرم‌افزار بدون اجازه‌ی کتبی قبلی و مشخص استفاده شود.\n" +"\n" +"این نرم‌افزار توسط دارندگان حق نشر و مشارکت‌کنندگان «همان‌طور که هست»\n" +"ارائه می‌شود و هرگونه ضمانت صریح یا ضمنی، از جمله، اما نه محدود به,\n" +"ضمانت‌های ضمنی قابلیت فروش و تناسب برای یک هدف خاص\n" +"سلب می‌شود. در هیچ رویدادی دارندگان حق نشر یا مشارکت‌کنندگان مسئول\n" +"هیچ‌گونه خسارت مستقیم، غیرمستقیم، اتفاقی، خاص، نمونه‌وار یا تبعی\n" +"(از جمله، اما نه محدود به، تدارک کالیا یا خدمات جایگزین;\n" +"از دست دادن استفاده، داده‌ها یا سود؛ یا توقف کسب‌وکار)\n" +"به هر نحو ایجاد شده و بر اساس هر تئوری مسئولیت، چه در قرارداد، مسئولیت\n" +"محض، یا تقصیر (از جمله سهل‌انگاری یا موارد دیگر) ناشی از هرگونه\n" +"استفاده از این نرم‌افزار، حتی در صورت اطلاع از احتمال چنین\n" +"خسارتی، نخواهند بود." + msgid "Unicode Character Database" msgstr "پایگاه داده نویسه‌های یونیکد (UCD)" diff --git a/reference/compound_stmts.po b/reference/compound_stmts.po index ddae6eca..f6f06fac 100644 --- a/reference/compound_stmts.po +++ b/reference/compound_stmts.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-12 17:52+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -926,6 +927,9 @@ msgstr ":class:`dict`" msgid ":class:`float`" msgstr ":class:`float`" +msgid ":class:`frozendict`" +msgstr ":class:`frozendict`" + msgid ":class:`frozenset`" msgstr ":class:`frozenset`" @@ -1107,6 +1111,9 @@ msgstr "" "class Foo(object):\n" " pass" +msgid "There may be one or more base classes; see :ref:`multiple-inheritance` below for more information." +msgstr "ممکن است یک یا چند کلاس پایه وجود داشته باشد؛ برای اطلاعات بیشتر، :ref:`multiple-inheritance` را در ادامه ببینید." + msgid "The class's suite is then executed in a new execution frame (see :ref:`naming`), using a newly created local namespace and the original global namespace. (Usually, the suite contains mostly function definitions.) When the class's suite finishes execution, its execution frame is discarded but its local namespace is saved. [#]_ A class object is then created using the inheritance list for the base classes and the saved local namespace for the attribute dictionary. The class name is bound to this class object in the original local namespace." msgstr "سپس بدنه کلاس در یک فریم اجرای جدید (execution frame) اجرا می‌شود (ببینید :ref:`naming`)، با استفاده از یک فضای نام محلی به‌تازگی ایجادشده و فضای نام سراسری اصلی. (معمولاً مجموعه بیشتر شامل تعریف توابع است.) هنگامی که اجرای مجموعه‌ی کلاس به پایان می‌رسد، فریم اجرای آن دور انداخته می‌شود اما فضای نام محلی آن ذخیره می‌شود. [#]_ سپس یک شیء کلاس با استفاده از فهرست وراثت برای کلاس‌های پایه و فضای نام محلی ذخیره‌شده برای دیکشنری ویژگی‌ها ایجاد می‌شود. نام کلاس در فضای نام محلی اصلی به این شیء کلاس مقید می‌شود." @@ -1159,6 +1166,137 @@ msgstr ":pep:`3129` - دکوراتورهای کلاس" msgid "The proposal that added class decorators. Function and method decorators were introduced in :pep:`318`." msgstr "پیشنهادی که دکوراتورهای کلاس را افزود. دکوراتورهای تابع و متد در :pep:`318` معرفی شدند." +msgid "Multiple inheritance" +msgstr "وراثت چندگانه" + +msgid "Python classes may have multiple base classes, a technique known as *multiple inheritance*. The base classes are specified in the class definition by listing them in parentheses after the class name, separated by commas. For example, the following class definition:" +msgstr "کلاس‌های پایتون ممکن است چندین کلاس پایه داشته باشند، روشی که به نام *چندوراثتی* شناخته می‌شود. کلاس‌های پایه در تعریف کلاس با فهرست کردن آن‌ها در پرانتز پس از نام کلاس، با کاما از یکدیگر جدا می‌شوند. برای مثال، تعریف کلاس زیر:" + +msgid "" +">>> class A: pass\n" +">>> class B: pass\n" +">>> class C(A, B): pass" +msgstr "" +">>> class A: pass\n" +">>> class B: pass\n" +">>> class C(A, B): pass" + +msgid "defines a class ``C`` that inherits from classes ``A`` and ``B``." +msgstr "کلاسی به نام ``C`` را تعریف می‌کند که از کلاس‌های ``A`` و ``B`` ارث‌بری می‌کند." + +msgid "The :term:`method resolution order` (MRO) is the order in which base classes are searched when looking up an attribute on a class. See :ref:`python_2.3_mro` for a description of how Python determines the MRO for a class." +msgstr "دستور :term:`ترتیب حل متد ` (MRO) ترتیبی است که هنگام جستجوی یک ویژگی روی یک کلاس، کلاس‌های پایه در آن جستجو می‌شوند. برای توضیحی درباره‌ی اینکه چگونه پایتون MRO را برای یک کلاس تعیین می‌کند، :ref:`python_2.3_mro` را ببینید." + +msgid "Multiple inheritance is not always allowed. Attempting to define a class with multiple inheritance will raise an error if one of the bases does not allow subclassing, if a consistent MRO cannot be created, if no valid metaclass can be determined, or if there is an instance layout conflict. We'll discuss each of these in turn." +msgstr "چندوراثتی همیشه مجاز نیست. تلاش برای تعریف یک کلاس با چندوراثتی در صورتی که یکی از پایه‌ها اجازه‌ی زیرکلاس شدن ندهد، اگر نتوان یک MRO سازگار ایجاد کرد، اگر هیچ فراکلاس معتبری تعیین نشود، یا اگر تضادی در چیدمان نمونه وجود داشته باشد، خطایی ایجاد خواهد کرد. ما هر یک از این موارد را به نوبت بررسی خواهیم کرد." + +msgid "First, all base classes must allow subclassing. While most classes allow subclassing, some built-in classes do not, such as :class:`bool`:" +msgstr "ابتدا، تمام کلاس‌های پایه باید اجازه‌ی زیرکلاس شدن را بدهند. در حالی که بیشتر کلاس ها اجازه این کار را می دهند، برخی کلاس‌های توکار مانند :class:`bool` این‌گونه نیستند:" + +msgid "" +">>> class SubBool(bool): # TypeError\n" +"... pass\n" +"Traceback (most recent call last):\n" +" ...\n" +"TypeError: type 'bool' is not an acceptable base type" +msgstr "" +">>> class SubBool(bool): # TypeError\n" +"... pass\n" +"Traceback (most recent call last):\n" +" ...\n" +"TypeError: type 'bool' is not an acceptable base type" + +msgid "In the resolved MRO of a class, the class's bases appear in the order they were specified in the class's bases list. Additionally, the MRO always lists a child class before any of its bases. A class definition will fail if it is impossible to resolve a consistent MRO that satisfies these rules from the list of bases provided:" +msgstr "در MRO حل‌شده‌ی یک کلاس، پایه‌های کلاس به همان ترتیبی ظاهر می‌شوند که در فهرست پایه‌های کلاس مشخص شده‌اند. علاوه بر این، MRO همیشه کلاس فرزند را پیش از هر یک از پایه‌های آن فهرست می‌کند. اگر غیرممکن باشد که یک MRO سازگار که این قوانین را از فهرست پایه‌های ارائه‌شده برآورده می‌کند حل شود، تعریف کلاس با شکست مواجه خواهد شد:" + +msgid "" +">>> class Base: pass\n" +">>> class Child(Base): pass\n" +">>> class Grandchild(Base, Child): pass # TypeError\n" +"Traceback (most recent call last):\n" +" ...\n" +"TypeError: Cannot create a consistent method resolution order (MRO) for bases Base, Child" +msgstr "" +">>> class Base: pass\n" +">>> class Child(Base): pass\n" +">>> class Grandchild(Base, Child): pass # TypeError\n" +"Traceback (most recent call last):\n" +" ...\n" +"TypeError: Cannot create a consistent method resolution order (MRO) for bases Base, Child" + +msgid "In the MRO of ``Grandchild``, ``Base`` must appear before ``Child`` because it is first in the base class list, but it must also appear after ``Child`` because it is a parent of ``Child``. This is a contradiction, so the class cannot be defined." +msgstr "در MRO کلاس ``Grandchild``، کلاس ``Base`` باید پیش از ``Child`` ظاهر شود زیرا در فهرست کلاس‌های پایه در جایگاه نخست قرار دارد، اما همچنین باید پس از ``Child`` ظاهر شود زیرا والدِ ``Child`` است. این یک تناقض است، بنابراین کلاس نمی‌تواند تعریف شود." + +msgid "If some of the bases have a custom :term:`metaclass`, the metaclass of the resulting class is chosen among the metaclasses of the bases and the explicitly specified metaclass of the child class. It must be a metaclass that is a subclass of all other candidate metaclasses. If no such metaclass exists among the candidates, the class cannot be created, as explained in :ref:`metaclass-determination`." +msgstr "اگر برخی از پایه‌ها دارای یک :term:`فراکلاس ` سفارشی باشند، فراکلاس کلاس حاصل در میان فراکلاس‌های پایه‌ها و فراکلاس صراحتاً مشخص‌شده‌ی کلاس فرزند انتخاب می‌شود. این فراکلاس باید فراکلاسی باشد که زیرکلاس تمام فراکلاس‌های نامزد دیگر است. اگر چنین فراکلاسی در میان نامزدها وجود نداشته باشد، همان‌طور که در :ref:`metaclass-determination` توضیح داده شد، کلاس نمی‌تواند ایجاد شود." + +msgid "Finally, the instance layouts of the bases must be compatible. This means that it must be possible to compute a *solid base* for the class. Exactly which classes are solid bases depends on the Python implementation." +msgstr "در نهایت، طرح‌بندی‌های نمونه‌ی پایه‌ها باید سازگار باشند. این یعنی باید امکان محاسبه‌ی یک *پایه‌ی سخت* (solid base) برای کلاس وجود داشته باشد. این که دقیقاً کدام کلاس‌ها پایه‌ی سخت محسوب می‌شوند به پیاده‌سازی پایتون بستگی دارد." + +msgid "In CPython, a class is a solid base if it has a nonempty :attr:`~object.__slots__` definition. Many but not all classes defined in C are also solid bases, including most builtins (such as :class:`int` or :class:`BaseException`) but excluding most concrete :class:`Exception` classes. Generally, a C class is a solid base if its underlying struct is different in size from its base class." +msgstr "در سی‌پایتون، اگر یک کلاس دارای تعریف :attr:`~object.__slots__` غیرخالی باشد، یک پایه‌ی سخت است. بسیاری از کلاس‌های تعریف‌شده در C (اما نه همه‌ی آن‌ها) پایه‌ی سخت هستند، از جمله بیشتر توکارها (مانند :class:`int` یا :class:`BaseException`)، اما به جز اکثر کلاس‌های مشخص :class:`Exception`. به طور کلی، یک کلاس C در صورتی پایه‌ی سخت است که ساختار (struct) زیرین آن از نظر اندازه با کلاس پایه‌ی خود متفاوت باشد." + +msgid "Every class has a solid base. :class:`object`, the base class, has itself as its solid base. If there is a single base, the child class's solid base is that class if it is a solid base, or else the base class's solid base. If there are multiple bases, we first find the solid base for each base class to produce a list of candidate solid bases. If there is a unique solid base that is a subclass of all others, then that class is the solid base. Otherwise, class creation fails." +msgstr "هر کلاسی یک پایه‌ی سخت دارد. :class:`object` که کلاس پایه است، خودش را به عنوان پایه‌ی سخت خود دارد. اگر تنها یک پایه وجود داشته باشد، پایه‌ی سخت کلاس فرزند در صورتی که پایه‌ی سخت باشد همان کلاس است، در غیر این صورت پایه‌ی سخت کلاس پایه است. اگر چندین پایه وجود داشته باشد، ابتدا پایه‌ی سخت هر کلاس پایه را پیدا می‌کنیم تا فهرستی از پایه‌های سخت نامزد تولید شود. اگر یک پایه‌ی سخت یکتا وجود داشته باشد که زیرکلاس تمام موارد دیگر باشد، آنگاه آن کلاس، پایه‌ی سخت است. در غیر این صورت، ایجاد کلاس با شکست مواجه می‌شود." + +msgid "Example:" +msgstr "مثال:" + +msgid "" +">>> class Solid1:\n" +"... __slots__ = (\"solid1\",)\n" +">>>\n" +">>> class Solid2:\n" +"... __slots__ = (\"solid2\",)\n" +">>>\n" +">>> class SolidChild(Solid1):\n" +"... __slots__ = (\"solid_child\",)\n" +">>>\n" +">>> class C1: # solid base is `object`\n" +"... pass\n" +">>>\n" +">>> # OK: solid bases are `Solid1` and `object`, and `Solid1` is a subclass of `object`.\n" +">>> class C2(Solid1, C1): # solid base is `Solid1`\n" +"... pass\n" +">>>\n" +">>> # OK: solid bases are `SolidChild` and `Solid1`, and `SolidChild` is a subclass of `Solid1`.\n" +">>> class C3(SolidChild, Solid1): # solid base is `SolidChild`\n" +"... pass\n" +">>>\n" +">>> # Error: solid bases are `Solid1` and `Solid2`, but neither is a subclass of the other.\n" +">>> class C4(Solid1, Solid2): # error: no single solid base\n" +"... pass\n" +"Traceback (most recent call last):\n" +" ...\n" +"TypeError: multiple bases have instance lay-out conflict" +msgstr "" +">>> class Solid1:\n" +"... __slots__ = (\"solid1\",)\n" +">>>\n" +">>> class Solid2:\n" +"... __slots__ = (\"solid2\",)\n" +">>>\n" +">>> class SolidChild(Solid1):\n" +"... __slots__ = (\"solid_child\",)\n" +">>>\n" +">>> class C1: # solid base is `object`\n" +"... pass\n" +">>>\n" +">>> # OK: solid bases are `Solid1` and `object`, and `Solid1` is a subclass of `object`.\n" +">>> class C2(Solid1, C1): # solid base is `Solid1`\n" +"... pass\n" +">>>\n" +">>> # OK: solid bases are `SolidChild` and `Solid1`, and `SolidChild` is a subclass of `Solid1`.\n" +">>> class C3(SolidChild, Solid1): # solid base is `SolidChild`\n" +"... pass\n" +">>>\n" +">>> # Error: solid bases are `Solid1` and `Solid2`, but neither is a subclass of the other.\n" +">>> class C4(Solid1, Solid2): # error: no single solid base\n" +"... pass\n" +"Traceback (most recent call last):\n" +" ...\n" +"TypeError: multiple bases have instance lay-out conflict" + msgid "Coroutines" msgstr "هم‌روال‌ها" diff --git a/reference/datamodel.po b/reference/datamodel.po index b77fcbda..aa6bb814 100644 --- a/reference/datamodel.po +++ b/reference/datamodel.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-24 04:09+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-12 16:43+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -270,8 +271,8 @@ msgstr "نگاشت‌ها" 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 mapping ``a``; this can be used in expressions and as the target of assignments or :keyword:`del` statements. The built-in function :func:`len` returns the number of items in a mapping." msgstr "این‌ها نشان‌دهنده مجموعه‌های متناهی از اشیای اندیس‌دهی‌شده با مجموعه‌های اندیس دلخواه هستند. نمادگذاری اندیس‌دهی ``a[k]`` آیتمی را که با ``k`` از نگاشت ``a`` اندیس‌دهی شده است انتخاب می‌کند؛ می‌توان از آن در عبارت‌ها و به‌عنوان هدف انتساب‌ها یا دستورات :keyword:`del` استفاده کرد. تابع توکار :func:`len` تعداد آیتم‌های یک نگاشت را برمی‌گرداند." -msgid "There is currently a single intrinsic mapping type:" -msgstr "در حال حاضر تنها یک نوع نگاشت ذاتی وجود دارد:" +msgid "There are two intrinsic mapping types:" +msgstr "دو نوع نگاشت ذاتی وجود دارد:" msgid "Dictionaries" msgstr "دیکشنری‌ها" @@ -291,6 +292,12 @@ msgstr "ماژول‌های توسعه‌ای :mod:`dbm.ndbm` و :mod:`dbm.gnu` 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 "دیکشنری‌ها در نسخه‌های پایتون پیش از 3.6 ترتیب درج را حفظ نمی‌کردند. در CPython 3.6، ترتیب درج حفظ می‌شد، اما در آن زمان این موضوع به‌جای یک تضمین زبانی، یک جزئیات پیاده‌سازی در نظر گرفته می‌شد." +msgid "Frozen dictionaries" +msgstr "دیکشنری‌های فریز شده" + +msgid "These represent an immutable dictionary. They are created by the built-in :func:`frozendict` constructor. A frozendict is :term:`hashable` if all of its keys and values are hashable, in which case it can be used as an element of a set, or as a key in another mapping. :class:`!frozendict` is not a subclass of :class:`dict`; it inherits directly from :class:`object`." +msgstr "این‌ها نمایانگر یک دیکشنری تغییرناپذیر هستند. آن‌ها توسط سازنده‌ی توکار :func:`frozendict` ایجاد می‌شوند. یک frozendict در صورتی :term:`هش‌پذیر ` است که تمام کلیدها و مقادیر آن هش‌پذیر باشند، در این صورت می‌توان از آن به عنوان عضوی از یک مجموعه، یا به عنوان کلیدی در یک نگاشت دیگر استفاده کرد. :class:`!frozendict` زیرکلاسی از :class:`dict` نیست؛ بلکه مستقیماً از :class:`object` ارث‌بری می‌کند." + msgid "Callable types" msgstr "انواع فراخوانی‌پذیر" @@ -579,23 +586,14 @@ msgstr "یک :term:`دنباله ` (احتمالاً خالی) از ر msgid "It is **strongly** recommended that you use :attr:`module.__spec__.submodule_search_locations ` instead of :attr:`!module.__path__`." msgstr "**به‌شدت** توصیه می‌شود که به‌جای :attr:`!module.__path__` از :attr:`module.__spec__.submodule_search_locations ` استفاده کنید." -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 ":attr:`!__file__` و :attr:`!__cached__` هر دو ویژگی‌های اختیاری هستند که ممکن است مقداردهی شده یا نشده باشند. هر دو ویژگی باید هنگامی که در دسترس باشند، یک :class:`str` باشند." - -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 file for extension modules loaded dynamically from a shared library. It might be missing for certain types of modules, such as C modules that are statically linked into the interpreter, and the :ref:`import system ` may opt to leave it unset if it has no semantic meaning (for example, a module loaded from a database)." -msgstr ":attr:`!__file__` نام مسیر پرونده‌ای را نشان می‌دهد که ماژول از آن بارگذاری شده است (اگر از یک پرونده بارگذاری شده باشد)، یا نام مسیر پرونده کتابخانه اشتراکی را برای ماژول‌های توسعه‌ای که به‌صورت پویا از یک کتابخانه اشتراکی بارگذاری شده‌اند. ممکن است برای انواع خاصی از ماژول‌ها وجود نداشته باشد، مانند ماژول‌های C که به‌صورت ایستا در مفسر پیوند داده شده‌اند، و :ref:`سیستم ایمپورت ` ممکن است در صورتی که معنای مفهومی نداشته باشد، آن را تنظیم‌نشده باقی بگذارد (برای مثال، ماژولی که از یک پایگاه داده بارگذاری شده است)." +msgid ":attr:`!__file__` is an optional attribute that may or may not be set. Both attributes should be a :class:`str` when they are available." +msgstr ":attr:`!__file__` یک ویژگی اختیاری است که ممکن است تنظیم شده باشد یا نشده باشد. هر دو ویژگی در صورت در دسترس بودن باید از نوع :class:`str` باشند." -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 example, a byte-compiled file). The file does not need to exist to set this attribute; the path can simply point to where the compiled file *would* exist (see :pep:`3147`)." -msgstr "اگر :attr:`!__file__` تنظیم شده باشد، ممکن است ویژگی :attr:`!__cached__` نیز تنظیم شده باشد، که مسیر هر نسخه‌ی کامپایل‌شده‌ای از کد است (برای مثال، یک پرونده بایت‌کامپایل‌شده (byte-compiled file)). لازم نیست پرونده برای تنظیم این ویژگی وجود داشته باشد؛ مسیر می‌تواند صرفاً به جایی اشاره کند که پرونده کامپایل‌شده در آن *وجود خواهد داشت* (به :pep:`3147` مراجعه کنید)." +msgid "An optional attribute, :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 file for extension modules loaded dynamically from a shared library. It might be missing for certain types of modules, such as C modules that are statically linked into the interpreter, and the :ref:`import system ` may opt to leave it unset if it has no semantic meaning (for example, a module loaded from a database)." +msgstr "ویژگی اختیاری :attr:`!__file__` نشان‌دهنده‌ی مسیرنام پرونده‌ای است که ماژول از آن بارگذاری شده است (اگر از روی پرونده بارگذاری شده باشد)، یا مسیرنام پرونده‌ی کتابخانه‌ی مشترک برای ماژول‌های توسعه‌ای که به صورت پویا از یک کتابخانه‌ی مشترک بارگذاری شده‌اند. این ویژگی ممکن است برای انواع خاصی از ماژول‌ها وجود نداشته باشد، مانند ماژول‌های C که به صورت ایستا به مفسر لینک شده‌اند، و سیستم :ref:`import ` ممکن است اگر معنای معنایی (semantic) نداشته باشد (برای مثال، ماژول بارگذاری‌شده از یک پایگاه داده)، تصمیم بگیرد آن را تنظیم‌نشده رها کند." -msgid "Note that :attr:`!__cached__` may be set even if :attr:`!__file__` is not set. However, that scenario is quite atypical. Ultimately, the :term:`loader` is what makes use of the module spec provided by the :term:`finder` (from which :attr:`!__file__` and :attr:`!__cached__` are derived). So if a loader can load from a cached module but otherwise does not load from a file, that atypical scenario may be appropriate." -msgstr "توجه داشته باشید که ممکن است :attr:`!__cached__` تنظیم شده باشد، حتی اگر :attr:`!__file__` تنظیم نشده باشد. با این حال، این حالت بسیار غیرمعمول است. در نهایت، این :term:`بارگذار ` است که از مشخصات ماژول ارائه‌شده توسط :term:`یابنده ` استفاده می‌کند (که :attr:`!__file__` و :attr:`!__cached__` از آن به دست می‌آیند). بنابراین اگر یک بارگذار بتواند از یک ماژول نهانگاه‌شده بارگذاری کند، ولی در غیر این صورت از یک پرونده بارگذاری نکند، آن حالت غیرمعمول ممکن است مناسب باشد." - -msgid "It is **strongly** recommended that you use :attr:`module.__spec__.cached ` instead of :attr:`!module.__cached__`." -msgstr "**به‌شدت** توصیه می‌شود که شما به‌جای :attr:`!module.__cached__` از :attr:`module.__spec__.cached ` استفاده کنید." - -msgid "Setting :attr:`!__cached__` on a module while failing to set :attr:`!__spec__.cached` is deprecated. In Python 3.15, :attr:`!__cached__` will cease to be set or taken into consideration by the import system or standard library." -msgstr "تنظیم :attr:`!__cached__` در یک ماژول بدون تنظیم :attr:`!__spec__.cached` منسوخ شده است. در پایتون 3.15، :attr:`!__cached__` دیگر توسط سیستم ایمپورت یا کتابخانه استاندارد تنظیم یا در نظر گرفته نخواهد شد." +msgid "The ``__cached__`` attribute is no longer set on modules or taken into consideration by the import system or standard library." +msgstr "ویژگی ``__cached__`` دیگر روی ماژول‌ها تنظیم نمی‌شود و توسط سیستم import یا کتابخانه‌ی استاندارد مد نظر قرار نمی‌گیرد." msgid "Other writable attributes on module objects" msgstr "سایر ویژگی‌های قابل‌نوشتن در اشیاء ماژول" @@ -612,6 +610,12 @@ msgstr "دیکشنری شامل :term:`حاشیه‌نویسی‌های متغی msgid "The :term:`annotate function` for this module, or ``None`` if the module has no annotations. See also: :attr:`~object.__annotate__` attributes." msgstr ":term:`annotate function` این ماژول، یا ``None`` اگر ماژول فاقد هرگونه حاشیه‌نویسی باشد. همچنین ببینید: ویژگی‌های :attr:`~object.__annotate__`." +msgid "A container (an object implementing :meth:`~object.__contains__`) of fully qualified module name strings. When defined at module scope, any regular :keyword:`import` statement in that module whose target module name appears in this container is treated as a :ref:`lazy import `, as if the :keyword:`lazy` keyword had been used. Imports inside functions, class bodies, or :keyword:`try`/:keyword:`except`/:keyword:`finally` blocks are unaffected." +msgstr "یک ظرف (عضو پیاده‌سازی‌کننده‌ی :meth:`~object.__contains__`) از رشته‌های نام کامل ماژول. هنگامی که در محدوده‌ی ماژول تعریف می‌شود، هر دستور :keyword:`import` معمولی در آن ماژول که نام ماژول هدفش در این ظرف ظاهر می‌شود، دقیقاً مانند زمانی که از کلیدواژه‌ی :keyword:`lazy` استفاده شده باشد، به عنوان یک :ref:`واردسازی تنبل ` (lazy import) در نظر گرفته می‌شود. واردسازی‌ها در داخل توابع، بدنه‌ی کلاس‌ها یا بلوک‌های :keyword:`try`/:keyword:`except`/:keyword:`finally` تحت تأثیر قرار نمی‌گیرند." + +msgid "See :ref:`lazy-modules-compat` for details and examples." +msgstr "برای جزئیات و مثال‌ها، :ref:`lazy-modules-compat` را ببینید." + msgid "Module dictionaries" msgstr "دیکشنری‌های ماژول" @@ -809,12 +813,6 @@ msgstr "نام پرونده‌ای که کد از آن کامپایل شده ا msgid "The line number of the first line of the function" msgstr "شماره‌ی اولین خط تابع" -msgid "A string encoding the mapping from :term:`bytecode` offsets to line numbers. For details, see the source code of the interpreter." -msgstr "رشته‌ای که نگاشت از آفست‌های :term:`بایت‌کد ` به شماره‌های خط را کدگذاری می‌کند. برای جزئیات، به کد منبع مفسر مراجعه کنید." - -msgid "This attribute of code objects is deprecated, and may be removed in Python 3.15." -msgstr "این ویژگی از اشیای کد منسوخ شده است و ممکن است در پایتون 3.15 حذف شود." - msgid "A :class:`bytes` object containing encoded source location information. The exact format is an implementation detail and may change between Python versions. Use :meth:`~codeobject.co_lines` and :meth:`~codeobject.co_positions` for supported access to line and position information. To create a modified copy of a code object, use :meth:`~codeobject.replace`." msgstr "یک شیء :class:`bytes` حاوی اطلاعات مکانِ منبع کدگذاری‌شده. فرمت دقیق یک جزئیات پیاده‌سازی است و ممکن است بین نسخه‌های پایتون تغییر کند. برای دسترسی پشتیبانی‌شده به اطلاعات سطر و موقعیت، از :meth:`~codeobject.co_lines` و :meth:`~codeobject.co_positions` استفاده کنید. برای ایجاد یک کپی اصلاح‌شده از یک شیء کد، از :meth:`~codeobject.replace` استفاده کنید." @@ -1010,6 +1008,9 @@ msgstr "اشیای اسلایس" 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 "از اشیای اسلایسی (slice) برای نمایش اسلایس‌ها در متدهای :meth:`~object.__getitem__` استفاده می‌شود. این اشیاء همچنین توسط تابع توکار :func:`slice` ایجاد می‌شوند." +msgid "The :func:`slice` type now supports :ref:`subscription `. For example, ``slice[float]`` may be used in type annotations to indicate a slice containing :type:`float` objects." +msgstr "نوع :func:`slice` اکنون از :ref:`اشتراک ` پشتیبانی می‌کند. برای مثال، ``slice[float]`` ممکن است در حاشیه‌نویسی‌های نوع برای نشان دادن یک اسلایس حاوی اشیای :type:`float` استفاده شود." + 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 "ویژگی‌های فقط‌خواندنی ویژه: :attr:`~slice.start` کران پایین است؛ :attr:`~slice.stop` کران بالا است؛ :attr:`~slice.step` مقدار گام است؛ هرکدام در صورت حذف‌شدن ``None`` است. این ویژگی‌ها می‌توانند هر نوعی داشته باشند." @@ -1151,8 +1152,8 @@ msgstr "نسخه‌هایی با آرگومان‌های جابه‌جاشده msgid "When no appropriate method returns any value other than :data:`NotImplemented`, the ``==`` and ``!=`` operators will fall back to ``is`` and ``is not``, respectively." msgstr "هرگاه هیچ متد مناسبی مقداری به‌جز :data:`NotImplemented` برنگرداند، عملگرهای ``==`` و ``!=`` به‌ترتیب به ``is`` و ``is not`` بازمی‌گردند." -msgid "Called by built-in function :func:`hash` and for operations on members of hashed collections including :class:`set`, :class:`frozenset`, and :class:`dict`. The ``__hash__()`` method should return an integer. The only required property is that objects which compare equal have the same hash value; it is advised to mix together the hash values of the components of the object that also play a part in comparison of objects by packing them into a tuple and hashing the tuple. Example::" -msgstr "توسط تابع توکار :func:`hash` و برای عملیات روی اعضای مجموعه‌های هش‌شده شامل :class:`set`، :class:`frozenset` و :class:`dict` فراخوانی می‌شود. متد ``__hash__()`` باید یک عدد صحیح برگرداند. تنها ویژگی مورد نیاز این است که اشیایی که در مقایسه با هم برابر هستند، مقدار هش یکسانی داشته باشند؛ توصیه می‌شود مقادیر هش اجزای شیء را که در مقایسه کردن اشیاء نیز نقش دارند، با بسته‌بندی آن اجزا در یک تاپل و هش کردن تاپل، با هم ترکیب کنید. مثال::" +msgid "Called by built-in function :func:`hash` and for operations on members of hashed collections including :class:`set`, :class:`frozenset`, :class:`dict`, and :class:`frozendict`. The ``__hash__()`` method should return an integer. The only required property is that objects which compare equal have the same hash value; it is advised to mix together the hash values of the components of the object that also play a part in comparison of objects by packing them into a tuple and hashing the tuple. Example::" +msgstr "توسط تابع توکار :func:`hash` و برای عملیات روی اعضای مجموعه‌های هش‌شده شامل :class:`set`، :class:`frozenset`، :class:`dict` و :class:`frozendict` فراخوانی می‌شود. متد ``__hash__()`` باید یک عدد صحیح برگرداند. تنها ویژگی مورد نیاز این است که اشیایی که با هم برابر مقایسه می‌شوند، مقدار هش یکسانی داشته باشند؛ توصیه می‌شود مقادیر هش اجزای شیء را که در مقایسه‌ی اشیاء نیز نقش دارند، با بسته‌بندی کردن آن‌ها در یک تاپل (tuple) و هش کردن آن تاپل، با یکدیگر ترکیب کنید. مثال::" msgid "" "def __hash__(self):\n" @@ -1401,8 +1402,8 @@ msgstr "عملکرد تعریف *__slots__* به کلاسی که در آن تع 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 retrieving its descriptor directly from the base class). This renders the meaning of the program undefined. In the future, a check may be added to prevent this." msgstr "اگر یک کلاس یک جایگاه را تعریف کند که در یک کلاس پایه نیز تعریف شده است، متغیر نمونه‌ای که توسط جایگاه کلاس پایه تعریف شده است، غیرقابل‌دسترس است (مگر با بازیابی توصیف‌گر آن به‌صورت مستقیم از کلاس پایه). این موضوع معنای برنامه را تعریف‌نشده می‌کند. در آینده، ممکن است یک بررسی برای جلوگیری از این حالت اضافه شود." -msgid ":exc:`TypeError` will be raised if nonempty *__slots__* are defined for a class derived from a :c:member:`\"variable-length\" built-in type ` such as :class:`int`, :class:`bytes`, and :class:`tuple`." -msgstr "اگر *__slots__* غیرخالی برای کلاسی مشتق‌شده از :c:member:`\"variable-length\" built-in type ` مانند :class:`int`، :class:`bytes` و :class:`tuple` تعریف شده باشد، :exc:`TypeError` پرتاب خواهد شد." +msgid ":exc:`TypeError` will be raised if *__slots__* other than *__dict__* and *__weakref__* are defined for a class derived from a :c:member:`\"variable-length\" built-in type ` such as :class:`int`, :class:`bytes`, and :class:`type`, except :class:`tuple`." +msgstr "اگر :__slots__* غیر از :__dict__* و :__weakref__* برای کلاسی مشتق‌شده از نوع توکار :c:member:`«با طول متغیر» ` مانند :class:`int`، :class:`bytes` و :class:`type` (به‌جز :class:`tuple`) تعریف شود، استثنای :exc:`TypeError` بالا خواهد رفت." msgid "Any non-string :term:`iterable` may be assigned to *__slots__*." msgstr "هر :term:`پیمایش‌پذیر ` غیررشته‌ای را می‌توان به *__slots__* انتساب داد." @@ -1413,12 +1414,15 @@ msgstr "اگر از یک :class:`dictionary ` برای انتساب *__slo msgid ":attr:`~object.__class__` assignment works only if both classes have the same *__slots__*." msgstr "انتساب :attr:`~object.__class__` تنها در صورتی امکان‌پذیر است که هر دو کلاس *__slots__* یکسانی داشته باشند." -msgid ":ref:`Multiple inheritance ` with multiple slotted parent classes can be used, but only one parent is allowed to have attributes created by slots (the other bases must have empty slot layouts) - violations raise :exc:`TypeError`." -msgstr "می‌توان از :ref:`وراثت چندگانه ` با چندین کلاس والد دارای جایگاه استفاده کرد، اما فقط یک والد مجاز است ویژگی‌های ایجادشده توسط جایگاه‌ها را داشته باشد (سایر کلاس‌های پایه باید چیدمان‌های جایگاه خالی داشته باشند)؛ موارد نقض، :exc:`TypeError` را پرتاب می‌کنند." +msgid ":ref:`Multiple inheritance ` with multiple slotted parent classes can be used, but only one parent is allowed to have attributes created by slots (the other bases must have empty slot layouts) - violations raise :exc:`TypeError`." +msgstr "می‌توان از :ref:`چندوراثت‌بری ` با چندین کلاس والد دارای جایگاه استفاده کرد، اما تنها یک والد اجازه دارد ویژگی‌های ایجادشده توسط جایگاه‌ها را داشته باشد (سایر کلاس‌های پایه باید ساختار جایگاه خالی داشته باشند) - تخلف از این قانون باعث بروز خطای :exc:`TypeError` می‌شود." 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 "اگر یک :term:`پیمایش‌گر ` برای *__slots__* استفاده شود، آنگاه یک :term:`descriptor` برای هر یک از مقادیر آن iterator ایجاد می‌شود. با این حال، ویژگی *__slots__* یک iterator خالی خواهد بود." +msgid "Allowed defining the *__dict__* and *__weakref__* *__slots__* for any class. Allowed defining any *__slots__* for a class derived from :class:`tuple`." +msgstr "تعریف *__dict__* و *__weakref__* *__slots__* را برای هر کلاسی مجاز می‌داند. تعریف هر *__slots__* را برای یک کلاس مشتق‌شده از :class:`tuple` مجاز می‌داند." + msgid "Customizing class creation" msgstr "سفارشی‌سازی ایجاد کلاس" @@ -2576,6 +2580,9 @@ msgstr "dbm.ndbm" msgid "dbm.gnu" msgstr "dbm.gnu" +msgid "frozendict" +msgstr "frozendict" + msgid "callable" msgstr "فراخوانی‌پذیر" @@ -2705,9 +2712,6 @@ msgstr "__path__ (ویژگی ماژول)" msgid "__file__ (module attribute)" msgstr "__file__ (ویژگی ماژول)" -msgid "__cached__ (module attribute)" -msgstr "__cached__ (ویژگی ماژول)" - msgid "__doc__ (module attribute)" msgstr "__doc__ (ویژگی ماژول)" @@ -2717,6 +2721,9 @@ msgstr "__annotations__ (ویژگی ماژول)" msgid "__annotate__ (module attribute)" msgstr "__annotate__ (ویژگی ماژول)" +msgid "__lazy_modules__ (module attribute)" +msgstr "__lazy_modules__ (ویژگی ماژول)" + msgid "__dict__ (module attribute)" msgstr "__dict__ (ویژگی ماژول)" @@ -2843,9 +2850,6 @@ msgstr "co_firstlineno (ویژگی شیء کد)" msgid "co_flags (code object attribute)" msgstr "co_flags (ویژگی شیء کد)" -msgid "co_lnotab (code object attribute)" -msgstr "co_lnotab (ویژگی شیء کد)" - msgid "co_name (code object attribute)" msgstr "co_name (ویژگی شیء کد)" @@ -3079,3 +3083,30 @@ msgstr "with" msgid "context manager" msgstr "مدیر زمینه" + +#~ msgid "There is currently a single intrinsic mapping type:" +#~ msgstr "در حال حاضر تنها یک نوع نگاشت ذاتی وجود دارد:" + +#~ 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 example, a byte-compiled file). The file does not need to exist to set this attribute; the path can simply point to where the compiled file *would* exist (see :pep:`3147`)." +#~ msgstr "اگر :attr:`!__file__` تنظیم شده باشد، ممکن است ویژگی :attr:`!__cached__` نیز تنظیم شده باشد، که مسیر هر نسخه‌ی کامپایل‌شده‌ای از کد است (برای مثال، یک پرونده بایت‌کامپایل‌شده (byte-compiled file)). لازم نیست پرونده برای تنظیم این ویژگی وجود داشته باشد؛ مسیر می‌تواند صرفاً به جایی اشاره کند که پرونده کامپایل‌شده در آن *وجود خواهد داشت* (به :pep:`3147` مراجعه کنید)." + +#~ msgid "Note that :attr:`!__cached__` may be set even if :attr:`!__file__` is not set. However, that scenario is quite atypical. Ultimately, the :term:`loader` is what makes use of the module spec provided by the :term:`finder` (from which :attr:`!__file__` and :attr:`!__cached__` are derived). So if a loader can load from a cached module but otherwise does not load from a file, that atypical scenario may be appropriate." +#~ msgstr "توجه داشته باشید که ممکن است :attr:`!__cached__` تنظیم شده باشد، حتی اگر :attr:`!__file__` تنظیم نشده باشد. با این حال، این حالت بسیار غیرمعمول است. در نهایت، این :term:`بارگذار ` است که از مشخصات ماژول ارائه‌شده توسط :term:`یابنده ` استفاده می‌کند (که :attr:`!__file__` و :attr:`!__cached__` از آن به دست می‌آیند). بنابراین اگر یک بارگذار بتواند از یک ماژول نهانگاه‌شده بارگذاری کند، ولی در غیر این صورت از یک پرونده بارگذاری نکند، آن حالت غیرمعمول ممکن است مناسب باشد." + +#~ msgid "It is **strongly** recommended that you use :attr:`module.__spec__.cached ` instead of :attr:`!module.__cached__`." +#~ msgstr "**به‌شدت** توصیه می‌شود که شما به‌جای :attr:`!module.__cached__` از :attr:`module.__spec__.cached ` استفاده کنید." + +#~ msgid "Setting :attr:`!__cached__` on a module while failing to set :attr:`!__spec__.cached` is deprecated. In Python 3.15, :attr:`!__cached__` will cease to be set or taken into consideration by the import system or standard library." +#~ msgstr "تنظیم :attr:`!__cached__` در یک ماژول بدون تنظیم :attr:`!__spec__.cached` منسوخ شده است. در پایتون 3.15، :attr:`!__cached__` دیگر توسط سیستم ایمپورت یا کتابخانه استاندارد تنظیم یا در نظر گرفته نخواهد شد." + +#~ msgid "A string encoding the mapping from :term:`bytecode` offsets to line numbers. For details, see the source code of the interpreter." +#~ msgstr "رشته‌ای که نگاشت از آفست‌های :term:`بایت‌کد ` به شماره‌های خط را کدگذاری می‌کند. برای جزئیات، به کد منبع مفسر مراجعه کنید." + +#~ msgid "This attribute of code objects is deprecated, and may be removed in Python 3.15." +#~ msgstr "این ویژگی از اشیای کد منسوخ شده است و ممکن است در پایتون 3.15 حذف شود." + +#~ msgid "__cached__ (module attribute)" +#~ msgstr "__cached__ (ویژگی ماژول)" + +#~ msgid "co_lnotab (code object attribute)" +#~ msgstr "co_lnotab (ویژگی شیء کد)" diff --git a/reference/expressions.po b/reference/expressions.po index 62f08cb0..6d48f469 100644 --- a/reference/expressions.po +++ b/reference/expressions.po @@ -8,13 +8,14 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" -"PO-Revision-Date: 2026-09-12 18:45+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 19:51+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" @@ -51,8 +52,17 @@ msgstr "برخی قواعد اضافی برای برخی عملگرها و عم msgid "Atoms" msgstr "اتم‌ها" -msgid "Atoms are the most basic elements of expressions. The simplest atoms are :ref:`names ` or literals. Forms enclosed in parentheses, brackets or braces are also categorized syntactically as atoms." -msgstr "اتم‌ها بنیادی‌ترین عناصر عبارت‌ها هستند. ساده‌ترین اتم‌ها :ref:`نام‌ها ` یا مقادیر لفظی هستند. صورت‌هایی که در پرانتز، کروشه یا آکولاد محصور شده‌اند نیز از نظر نحوی در دسته اتم‌ها قرار می‌گیرند." +msgid "Atoms are the most basic elements of expressions. The simplest atoms are :ref:`builtin constants `, :ref:`names ` and :ref:`literals `. More complex atoms are enclosed in paired delimiters:" +msgstr "اتم‌ها اساسی‌ترین عناصر عبارت‌ها هستند. ساده‌ترین اتم‌ها :ref:`ثابت‌های توکار `، :ref:`نام‌ها ` و :ref:`لیترال‌ها ` هستند. اتم‌های پیچیده‌تر در درون جفت‌جداکننده‌ها قرار می‌گیرند:" + +msgid "``()`` (parentheses): :ref:`groups `, :ref:`tuple displays `, :ref:`yield atoms `, and :ref:`generator expressions `;" +msgstr "``()`` (پرانتزها): :ref:`گروه‌ها `، :ref:`نمایش‌های تاپل `، :ref:`اتم‌های yield ` و :ref:`عبارت‌های مولد `؛" + +msgid "``[]`` (square brackets): :ref:`list displays `;" +msgstr "``[]`` (براکت‌ها): :ref:`نمایش‌های فهرست `؛" + +msgid "``{}`` (curly braces): :ref:`dictionary ` and :ref:`set ` displays." +msgstr "``{}`` (آکولادها): نمایش‌های :ref:`دیکشنری ` و :ref:`مجموعه `." msgid "Formally, the syntax for atoms is:" msgstr "به‌طور رسمی، سینتکس اتم‌ها عبارت است از:" @@ -82,6 +92,9 @@ msgstr "" " ^^^^^\n" "SyntaxError: cannot assign to False" +msgid "Formally, the syntax for built-in constants is:" +msgstr "به‌طور رسمی، نحوه (سینتکس) ثابت‌های توکار به این صورت است:" + msgid "Identifiers (Names)" msgstr "شناسه‌ها (نام‌ها)" @@ -275,111 +288,611 @@ msgstr "" msgid "Formally:" msgstr "به‌طور رسمی:" -msgid "Parenthesized forms" -msgstr "قالب‌های پرانتزدار" +msgid "Parenthesized groups" +msgstr "گروه‌های پرانتزگذاری‌شده" -msgid "A parenthesized form is an optional expression list enclosed in parentheses:" -msgstr "شکل پرانتزدار، یک فهرست عبارت اختیاری است که در پرانتز محصور شده است:" +msgid "A :dfn:`parenthesized group` is an expression enclosed in parentheses. The group evaluates to the same value as the expression inside." +msgstr "یک :dfn:`گروه پرانتزدار` عبارتی است که در پرانتز محصور شده است. این گروه به همان مقداری ارزیابی می‌شود که عبارت درون آن ارزیابی می‌شود." -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 "یک فهرست عبارت پرانتزبندی‌شده، هر آنچه را که آن فهرست عبارت برمی‌گرداند، برمی‌گرداند: اگر فهرست دست‌کم شامل یک ویرگول باشد، یک تاپل برمی‌گرداند؛ در غیر این صورت، عبارت واحدی را برمی‌گرداند که فهرست عبارت را تشکیل می‌دهد." +msgid "Groups are used to override or clarify :ref:`operator precedence `, in the same way as in math notation. For example::" +msgstr "گروه‌ها برای لغو یا شفاف‌سازی :ref:`تقدم عملگر `، به همان روش نمادگذاری ریاضی استفاده می‌شوند. برای مثال::" -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 "یک جفت پرانتز خالی، یک شیء تاپل خالی را حاصل می‌کند. از آن‌جا که تاپل‌ها تغییرناپذیرند، همان قواعد مربوط به مقادیر لفظی اعمال می‌شود (یعنی ممکن است دو رخداد از تاپل خالی، شیء یکسانی را حاصل دهند یا ندهند)." +msgid "" +">>> 3 << 2 | 4\n" +"12\n" +">>> 3 << (2 | 4) # Override precedence of the | (bitwise OR)\n" +"192\n" +">>> (3 << 2) | 4 # Same as without parentheses (but more clear)\n" +"12" +msgstr "" +">>> 3 << 2 | 4\n" +"12\n" +">>> 3 << (2 | 4) # Override precedence of the | (bitwise OR)\n" +"192\n" +">>> (3 << 2) | 4 # Same as without parentheses (but more clear)\n" +"12" -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* required --- allowing unparenthesized \"nothing\" in expressions would cause ambiguities and allow common typos to pass uncaught." -msgstr "توجه داشته باشید که تاپل‌ها با پرانتزها تشکیل نمی‌شوند، بلکه با استفاده از کاما تشکیل می‌شوند. استثنا، تاپل خالی است که برای آن پرانتزها *الزامی* هستند — اجازه دادن به «هیچ» بدون پرانتز در عبارت‌ها باعث ایجاد ابهام می‌شود و اجازه می‌دهد خطاهای تایپی رایج بدون شناسایی باقی بمانند." +msgid "Note that not everything in parentheses is a *group*. Specifically, a parenthesized group must include exactly one expression, and cannot end with a comma. See :ref:`tuple displays ` and :ref:`generator expressions ` for other parenthesized forms." +msgstr "توجه داشته باشید که هر چیزی که در پرانتز قرار دارد یک *گروه* نیست. به‌طور مشخص، یک گروه پرانتزدار باید دقیقا شامل یک عبارت باشد و نمی‌تواند با کاما پایان یابد. برای سایر اشکال پرانتزدار به :ref:`نمایش‌های تاپل ` و :ref:`عبارت‌های مولد ` مراجعه کنید." -msgid "Displays for lists, sets and dictionaries" -msgstr "نمایش فهرست‌ها، مجموعه‌ها و دیکشنری‌ها" +msgid "Formally, the syntax for groups is:" +msgstr "به‌طور رسمی، نحوه (سینتکس) گروه‌ها به این صورت است:" -msgid "For constructing a list, a set or a dictionary Python provides special syntax called \"displays\", each of them in two flavors:" -msgstr "برای ساختن فهرست، مجموعه یا دیکشنری، پایتون سینتکس خاصی به نام «نمایش‌ها» (displays) فراهم می‌کند که هر کدام دو گونه دارند:" +msgid "Container displays" +msgstr "نمایش‌های ظروف" -msgid "either the container contents are listed explicitly, or" -msgstr "یا محتویات ظرف به‌صورت صریح فهرست می‌شوند، یا" +msgid "For constructing builtin containers (lists, sets, tuples or dictionaries), Python provides special syntax called :dfn:`displays`. There are subtle differences between the four kinds of displays, detailed in the following sections. All displays, however, consist of comma-separated items enclosed in paired delimiters." +msgstr "پایتون برای ساخت ظروف توکار (فهرست‌ها، مجموعه‌ها، تاپل‌ها یا دیکشنری‌ها)، نحو ویژه‌ای به نام :dfn:`نمایش‌ها` (displays) فراهم می‌کند. تفاوت‌های ظریفی بین این چهار نوع نمایش وجود دارد که در بخش‌های زیر به تفصیل شرح داده شده است. با این حال، همه نمایش‌ها از آیتم‌های جدا شده با کاما تشکیل شده‌اند که در جداکننده‌های جفت‌شده محصور شده‌اند." -msgid "they are computed via a set of looping and filtering instructions, called a :dfn:`comprehension`." -msgstr "آن‌ها از طریق مجموعه‌ای از دستورهای حلقه و فیلتر کردن، که به آن :dfn:`comprehension` گفته می‌شود، محاسبه می‌شوند." +msgid "For example, a *list display* is a series of expressions enclosed in square brackets::" +msgstr "برای نمونه، یک *نمایش فهرست* (list display) مجموعه‌ای از عبارت‌ها است که در داخل کروشه‌ها قرار گرفته‌اند::" -msgid "Common syntax elements for comprehensions are:" -msgstr "عناصر نحوی مشترک برای درک‌ها عبارتند از:" +msgid "" +">>> [\"one\", \"two\", \"three\"]\n" +"['one', 'two', 'three']\n" +">>> [1 + 2, 2 + 3]\n" +"[3, 5]" +msgstr "" +">>> [\"one\", \"two\", \"three\"]\n" +"['one', 'two', 'three']\n" +">>> [1 + 2, 2 + 3]\n" +"[3, 5]" -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` clauses. In this case, the elements of the new container are those that would be produced by considering each of the :keyword:`!for` or :keyword:`!if` clauses a block, nesting from left to right, and evaluating the expression to produce an element each time the innermost block is reached." -msgstr "این درک از یک عبارت واحد تشکیل شده است که پس از آن حداقل ۱ بند :keyword:`!for` و ۰ یا چند بند :keyword:`!for` یا :keyword:`!if` قرار می‌گیرد. در این حالت، عناصر ظرف جدید آن‌هایی هستند که با در نظر گرفتن هر یک از بندهای :keyword:`!for` یا :keyword:`!if` به‌عنوان یک بلوک، تودرتو شدن آن‌ها از چپ به راست، و ارزیابی عبارت برای تولید یک عنصر هر بار که به داخلی‌ترین بلوک می‌رسید، تولید می‌شوند." +msgid "In list, tuple and dictionary (but not set) displays, the series may be empty::" +msgstr "در نمایش‌های فهرست، تاپل و دیکشنری (اما نه مجموعه)، دنباله می‌تواند خالی باشد::" -msgid "However, aside from the iterable expression in the leftmost :keyword:`!for` clause, the comprehension is executed in a separate implicitly nested scope. This ensures that names assigned to in the target list don't \"leak\" into the enclosing scope." -msgstr "با این حال، به‌جز عبارت پیمایش‌پذیر در چپ‌ترین بند :keyword:`!for`، درک در یک محدوده‌ی تودرتوی ضمنی جداگانه اجرا می‌شود. این امر تضمین می‌کند که نام‌هایی که در فهرست هدف به آن‌ها انتساب داده می‌شود، به محدوده‌ی دربرگیرنده «نشت» نمی‌کنند." +msgid "" +">>> [] # empty list\n" +"[]\n" +">>> () # empty tuple\n" +"()\n" +">>> {} # empty dictionary\n" +"{}" +msgstr "" +">>> [] # empty list\n" +"[]\n" +">>> () # empty tuple\n" +"()\n" +">>> {} # empty dictionary\n" +"{}" -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 implicitly nested scope. 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 "عبارت پیمایش‌پذیر در چپ‌ترین بند :keyword:`!for` مستقیماً در محدوده دربرگیرنده ارزیابی می‌شود و سپس به‌عنوان آرگومان به محدوده تودرتوی ضمنی ارسال می‌شود. بندهای :keyword:`!for` بعدی و هر شرط فیلتر در چپ‌ترین بند :keyword:`!for` نمی‌توانند در محدوده دربرگیرنده ارزیابی شوند، زیرا ممکن است به مقادیر به‌دست‌آمده از چپ‌ترین پیمایش‌پذیر وابسته باشند. برای مثال: ``[x*y for x in range(10) for y in range(x, x+10)]``." +msgid "If the series is not empty, the items may be followed by an additional comma, which has no effect::" +msgstr "اگر سری خالی نباشد، پس از آیتم‌ها می‌توان از یک ویرگول اضافی استفاده کرد که هیچ تأثیری ندارد::" -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 "برای اطمینان از اینکه درک همیشه به ظرفی از نوع مناسب منجر می‌شود، عبارت‌های ``yield`` و ``yield from`` در محدوده‌ی تودرتوی ضمنی ممنوع هستند." +msgid "" +">>> [\"one\", \"two\", \"three\",] # note comma after \"three\"\n" +"['one', 'two', 'three']" +msgstr "" +">>> [\"one\", \"two\", \"three\",] # note comma after \"three\"\n" +"['one', 'two', 'three']" -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 comprehension in an :keyword:`!async def` function may consist of either a :keyword:`!for` or :keyword:`!async for` clause following the leading expression, may contain additional :keyword:`!for` or :keyword:`!async for` clauses, and may also use :keyword:`await` expressions." -msgstr "از پایتون 3.6، در یک تابع :keyword:`async def`، می‌توان از یک بند :keyword:`!async for` برای تکرار بر روی یک :term:`asynchronous iterator` استفاده کرد. یک درک در یک تابع :keyword:`!async def` می‌تواند شامل یک بند :keyword:`!for` یا :keyword:`!async for` پس از عبارت آغازین باشد، می‌تواند شامل بندهای :keyword:`!for` یا :keyword:`!async for` اضافی باشد، و همچنین می‌تواند از عبارت‌های :keyword:`await` استفاده کند." +msgid "The trailing comma is often used for displays that span multiple lines (using :ref:`implicit line joining `), so when a future programmer adds a new entry at the end, they do not need to modify an existing line::" +msgstr "ویرگول پایانی اغلب برای نمایش‌هایی استفاده می‌شود که چندین سطر را در بر می‌گیرند (با استفاده از :ref:`implicit line joining `)؛ بنابراین وقتی برنامه‌نویس آینده‌ای در انتهای آن ورودی جدیدی اضافه می‌کند، نیازی به تغییر سطر موجود ندارد::" -msgid "If a comprehension contains :keyword:`!async for` clauses, or if it contains :keyword:`!await` expressions or other asynchronous comprehensions anywhere except the iterable expression in the leftmost :keyword:`!for` clause, it is called an :dfn:`asynchronous comprehension`. An asynchronous comprehension may suspend the execution of the coroutine function in which it appears. See also :pep:`530`." -msgstr "اگر یک درک شامل بندهای :keyword:`!async for` باشد، یا شامل عبارت‌های :keyword:`!await` یا دیگر درک‌های ناهمگام در هر جایی به‌جز عبارت پیمایش‌پذیر در چپ‌ترین بند :keyword:`!for` باشد، به آن :dfn:`درک ناهمگام (asynchronous comprehension)` گفته می‌شود. یک درک ناهمگام ممکن است اجرای تابع هم‌روالی که در آن ظاهر می‌شود را معلق کند. همچنین :pep:`530` را ببینید." +msgid "" +">>> [\n" +"... 'one',\n" +"... 'two',\n" +"... 'three',\n" +"... ]\n" +"['one', 'two', 'three']" +msgstr "" +">>> [\n" +"... 'one',\n" +"... 'two',\n" +"... 'three',\n" +"... ]\n" +"['one', 'two', 'three']" -msgid "Asynchronous comprehensions were introduced." -msgstr "درک‌های ناهمگام معرفی شدند." +msgid "At runtime, when a display is evaluated, the listed items are evaluated from left to right and placed into a new container of the appropriate type." +msgstr "در زمان ران‌تایم، هنگامی که یک نمایش ارزیابی می‌شود، آیتم‌های فهرست‌شده از چپ به راست ارزیابی شده و در ظرف جدیدی از نوع مناسب قرار می‌گیرند." -msgid "``yield`` and ``yield from`` prohibited in the implicitly nested scope." -msgstr "``yield`` و ``yield from`` در محدوده‌ی تودرتوی ضمنی ممنوع است." +msgid "For tuple, list and set (but not dict) displays, any item in the display may be prefixed with an asterisk (``*``). This denotes :ref:`iterable unpacking `. At runtime, the asterisk-prefixed expression must evaluate to an iterable, whose contents are inserted into the container at the location of the unpacking. For example::" +msgstr "برای نمایش‌های تاپل، فهرست و مجموعه (اما نه دیکشنری)، هر آیتمی در نمایش می‌تواند پیشوندی با یک ستاره (``*``) داشته باشد. این موضوع نشان‌دهنده‌ی :ref:`iterable unpacking ` است. در زمان ران‌تایم، عبارتِ پیشوندگرفته با ستاره باید به یک پیمایش‌پذیر ارزیابی شود که محتویات آن در محل بازکردن بسته در ظرف درج می‌شوند. برای مثال::" -msgid "Asynchronous comprehensions are now allowed inside comprehensions in asynchronous functions. Outer comprehensions implicitly become asynchronous." -msgstr "درک‌های ناهمگام اکنون در داخل درک‌ها در توابع ناهمگام مجاز هستند. درک‌های بیرونی به‌طور ضمنی ناهمگام می‌شوند." +msgid "" +">>> numbers = (1, 2)\n" +">>> [*numbers, 'word', *numbers]\n" +"[1, 2, 'word', 1, 2]" +msgstr "" +">>> numbers = (1, 2)\n" +">>> [*numbers, 'word', *numbers]\n" +"[1, 2, 'word', 1, 2]" + +msgid "Dictionary displays use a similar mechanism called *dictionary unpacking*, denoted with a double asterisk (``**``). See :ref:`dict` for details." +msgstr "نمایش‌های دیکشنری از مکانیسم مشابه‌ای به نام *بازکردن بسته‌ی دیکشنری* استفاده می‌کنند که با دو ستاره (``**``) مشخص می‌شود. برای جزئیات بیشتر :ref:`dict` را ببینید." + +msgid "A more advanced form of displays are :dfn:`comprehensions`, where items are computed via a set of looping and filtering instructions. See the :ref:`comprehensions` section for details." +msgstr "نوع پیشرفته‌تری از نمایش‌ها، :dfn:`درک‌ها` هستند که در آن‌ها آیتم‌ها از طریق مجموعه‌ای از دستورات حلقه‌ای و فیلترینگ محاسبه می‌شوند. برای جزئیات، بخش :ref:`comprehensions` را ببینید." + +msgid "Iterable and dictionary unpacking in displays, originally proposed by :pep:`448`." +msgstr "پیمایش‌پذیر و بازکردن بسته‌ی دیکشنری در نمایش‌ها که ابتدا توسط :pep:`448` پیشنهاد شد." msgid "List displays" msgstr "نمایش‌های فهرست" -msgid "A list display is a possibly empty series of expressions enclosed in square brackets:" -msgstr "نمایش فهرست، دنباله‌ای از عبارت‌ها است که ممکن است خالی باشد و درون کروشه قرار دارد:" +msgid "A :dfn:`list display` is a possibly empty series of expressions enclosed in square brackets. For example::" +msgstr "یک :dfn:`نمایش فهرست` (list display) دنباله‌ای احتمالاً خالی از عبارت‌ها است که در داخل کروشه‌ها قرار دارد. برای نمونه::" -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 list of expressions is supplied, its elements are evaluated from left to right and placed into the list object in that order. When a comprehension is supplied, the list is constructed from the elements resulting from the comprehension." -msgstr "یک نمایش فهرست، یک شیء فهرست جدید حاصل می‌کند که محتوای آن توسط یک فهرست از عبارت‌ها یا یک درک فهرستی مشخص می‌شود. هنگامی که یک فهرست از عبارت‌های جداشده با کاما ارائه شود، عناصر آن از چپ به راست ارزیابی می‌شوند و با همان ترتیب در شیء فهرست قرار می‌گیرند. هنگامی که یک درک فهرستی ارائه شود، فهرست از عناصر حاصل از آن درک ساخته می‌شود." +msgid "" +">>> [\"one\", \"two\", \"three\"]\n" +"['one', 'two', 'three']\n" +">>> [\"one\"] # One-element list\n" +"['one']\n" +">>> [] # empty list\n" +"[]" +msgstr "" +">>> [\"one\", \"two\", \"three\"]\n" +"['one', 'two', 'three']\n" +">>> [\"one\"] # One-element list\n" +"['one']\n" +">>> [] # empty list\n" +"[]" + +msgid "See :ref:`displays` for general information on displays." +msgstr "برای اطلاعات عمومی درباره‌ی نمایش‌ها، :ref:`displays` را ببینید." + +msgid "The formal grammar for list displays is:" +msgstr "گرامر رسمی نمایش‌های فهرست عبارت است از:" msgid "Set displays" msgstr "نمایش‌های مجموعه" -msgid "A set display is denoted by curly braces and distinguishable from dictionary displays by the lack of colons separating keys and values:" -msgstr "نمایش مجموعه با آکولادها مشخص می‌شود و به دلیل نبود علامت دونقطه برای جدا کردن کلیدها و مقدارها، از نمایش‌های دیکشنری قابل تشخیص است:" +msgid "A :dfn:`set display` is a *non-empty* series of expressions enclosed in curly braces. For example::" +msgstr "یک :dfn:`نمایش مجموعه` (set display) دنباله‌ای *غیرخالی* از عبارت‌ها است که در داخل آکولادها قرار دارد. برای نمونه::" + +msgid "" +">>> {\"one\", \"two\", \"three\"}\n" +"{'one', 'three', 'two'}\n" +">>> {\"one\"} # One-element set\n" +"{'one'}" +msgstr "" +">>> {\"one\", \"two\", \"three\"}\n" +"{'one', 'three', 'two'}\n" +">>> {\"one\"} # One-element set\n" +"{'one'}" + +msgid "There is no special syntax for the empty set. The ``{}`` literal is a :ref:`dictionary display ` that constructs an empty dictionary. Call :class:`set() ` with no arguments to get an empty set." +msgstr "هیچ نحو خاصی برای مجموعه‌ی خالی وجود ندارد. لفظی ``{}`` یک :ref:`dictionary display ` است که یک دیکشنری خالی می‌سازد. برای دریافت یک مجموعه‌ی خالی، :class:`set() ` را بدون هیچ آرگومانی فراخوانی کنید." -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-separated list of expressions is supplied, its elements are evaluated from left to right and added to the set object. When a comprehension is supplied, the set is constructed from the elements resulting from the comprehension." -msgstr "یک نمایش مجموعه، یک شیء مجموعه‌ی تغییرپذیر جدید ایجاد می‌کند که محتوای آن یا با دنباله‌ای از عبارت‌ها یا با یک درک مشخص می‌شود. هنگامی که یک فهرست جداشده با کاما از عبارت‌ها ارائه شود، عناصر آن از چپ به راست ارزیابی می‌شوند و به شیء مجموعه افزوده می‌شوند. هنگامی که یک درک ارائه شود، مجموعه از عناصر حاصل از آن درک ساخته می‌شود." +msgid "The formal grammar for set displays is:" +msgstr "گرامر رسمی نمایش‌های مجموعه عبارت است از:" -msgid "An empty set cannot be constructed with ``{}``; this literal constructs an empty dictionary." -msgstr "یک مجموعه خالی را نمی‌توان با ``{}`` ساخت؛ این لفظی یک دیکشنری خالی می‌سازد." +msgid "Tuple displays" +msgstr "نمایش‌های تاپل" + +msgid "A :dfn:`tuple display` is a series of expressions enclosed in parentheses. For example::" +msgstr "یک :dfn:`نمایش تاپل` (tuple display) دنباله‌ای از عبارت‌ها است که در داخل پرانتزها قرار دارد. برای نمونه::" + +msgid "" +">>> (1, 2)\n" +"(1, 2)\n" +">>> () # an empty tuple\n" +"()" +msgstr "" +">>> (1, 2)\n" +"(1, 2)\n" +">>> () # an empty tuple\n" +"()" + +msgid "To avoid ambiguity, if a tuple display has exactly one element, it requires a trailing comma. Without it, you get a :ref:`parenthesized group `::" +msgstr "برای جلوگیری از ابهام، اگر یک نمایش تاپل دقیقاً یک عنصر داشته باشد، به یک ویرگول پایانی نیاز دارد. بدون آن، یک :ref:`parenthesized group ` دریافت می‌کنید::" + +msgid "" +">>> ('single',) # single-element tuple\n" +"('single',)\n" +">>> ('single') # no comma: single string\n" +"'single'" +msgstr "" +">>> ('single',) # single-element tuple\n" +"('single',)\n" +">>> ('single') # no comma: single string\n" +"'single'" + +msgid "To put it in other words, a tuple display is a parenthesized list of either:" +msgstr "به عبارت دیگر، نمایش تاپل فهرستی است از موارد زیر که داخل پرانتز قرار گرفته‌اند:" + +msgid "two or more comma-separated expressions, or" +msgstr "دو یا چند عبارت جداشده با کاما، یا" + +msgid "zero or more expressions, each followed by a comma." +msgstr "صفر یا چند عبارت که هر کدام با یک ویرگول دنبال می‌شوند." + +msgid "Since tuples are immutable, :ref:`object identity rules for literals ` also apply to tuples: at runtime, two occurrences of tuples with the same values may or may not yield the same object." +msgstr "از آنجایی که تاپل‌ها تغییرناپذیر هستند، :ref:`قوانین هویت شیء برای مقادیر ثابت ` نیز در مورد تاپل‌ها اعمال می‌شوند: در ران‌تایم، دو وقوع از تاپل‌ها با مقادیر یکسان ممکن است شیء یکسانی را تولید کنند یا نکنند." + +msgid "Python's syntax also includes :ref:`expression lists `, where a comma-separated list of expressions is *not* enclosed in parentheses but evaluates to tuple." +msgstr "نحو پایتون همچنین شامل :ref:`expression lists ` است که در آن فهرستی از عباراتِ جداشده با ویرگول در پرانتز قرار *نمی‌گیرند* اما به یک تاپل ارزیابی می‌شوند." + +msgid "In other words, when it comes to tuple syntax, the comma is more important that the use of parentheses. Only the empty tuple is spelled without a comma." +msgstr "به عبارت دیگر، هنگامی که صحبت از نحو تاپل به میان می‌آید، ویرگول مهم‌تر از استفاده از پرانتز است. فقط تاپل خالی بدون ویرگول نوشته می‌شود." + +msgid "The formal grammar for tuple displays is:" +msgstr "گرامر رسمی برای نمایش‌های تاپل عبارت است از:" msgid "Dictionary displays" msgstr "نمایش‌های دیکشنری" -msgid "A dictionary display is a possibly empty series of dict items (key/value pairs) enclosed in curly braces:" -msgstr "نمایش دیکشنری دنباله‌ای از آیتم‌های دیکشنری (جفت‌های کلید/مقدار) است که ممکن است خالی باشد و در آکولاد محصور شده است:" +msgid "A :dfn:`dictionary display` is a possibly empty series of :dfn:`dict items` enclosed in curly braces. Each dict item is a colon-separated pair of expressions: the :dfn:`key` and its associated :dfn:`value`. For example::" +msgstr "یک :dfn:`dictionary display` سری احتمالاً خالی از :dfn:`dict items` است که درون آکولاد قرار گرفته‌اند. هر آیتم دیکشنری یک جفت عبارتِ جداشده با دونقطه است: :dfn:`key` و :dfn:`value` مرتبط با آن. برای مثال::" -msgid "A dictionary display yields a new dictionary object." -msgstr "یک نمایش دیکشنری، یک شیء دیکشنری جدید ایجاد می‌کند." +msgid "" +">>> {1: 'one', 2: 'two'}\n" +"{1: 'one', 2: 'two'}" +msgstr "" +">>> {1: 'one', 2: 'two'}\n" +"{1: 'one', 2: 'two'}" -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 is used as a key into the dictionary to store the corresponding value. This means that you can specify the same key multiple times in the dict item list, and the final dictionary's value for that key will be the last one given." -msgstr "اگر دنباله‌ای از آیتم‌های دیکشنری که با کاما از هم جدا شده‌اند داده شود، آن‌ها از چپ به راست ارزیابی می‌شوند تا ورودی‌های دیکشنری را تعریف کنند: هر شیء کلید به‌عنوان کلیدی در دیکشنری برای ذخیره مقدار متناظر استفاده می‌شود. این بدان معناست که شما می‌توانید یک کلید را چندین بار در فهرست آیتم‌های دیکشنری مشخص کنید و مقدار دیکشنری نهایی برای آن کلید، آخرین مقدار داده‌شده خواهد بود." +msgid "At runtime, when a dictionary comprehension is evaluated, the expressions are evaluated from left to right. Each key object is used as a key into the dictionary to store the corresponding value. This means that you can specify the same key multiple times in the comprehension, and the final dictionary's value for a given key will be the last one given. For example::" +msgstr "در ران‌تایم، هنگام ارزیابی یک درک دیکشنری، عبارت‌ها از چپ به راست ارزیابی می‌شوند. هر شیء کلید به عنوان کلیدی در دیکشنری برای ذخیره‌ی مقدار متناظر استفاده می‌شود. این بدان معناست که شما می‌توانید یک کلید را چندین بار در درک مشخص کنید و مقدار دیکشنری نهایی برای یک کلید مشخص، آخرین مقداری خواهد بود که داده شده است. برای مثال::" -msgid "A double asterisk ``**`` denotes :dfn:`dictionary unpacking`. Its operand must be a :term:`mapping`. Each mapping item is added to the new dictionary. Later values replace values already set by earlier dict items and earlier dictionary unpackings." -msgstr "نماد دو ستاره ``**`` نشان‌دهنده :dfn:`واگشایی دیکشنری (dictionary unpacking)` است. عملوند آن باید یک :term:`نگاشت ` باشد. هر آیتم از نگاشت به دیکشنری جدید اضافه می‌شود. مقادیر بعدی جایگزین مقادیری می‌شوند که از پیش توسط آیتم‌های دیکشنری پیشین و واگشایی‌های دیکشنری پیشین تعیین شده‌اند." +msgid "" +">>> {\n" +"... 1: 'this will be overridden',\n" +"... 2: 'two',\n" +"... 1: 'also overridden',\n" +"... 1: 'one',\n" +"... }\n" +"{1: 'one', 2: 'two'}" +msgstr "" +">>> {\n" +"... 1: 'this will be overridden',\n" +"... 2: 'two',\n" +"... 1: 'also overridden',\n" +"... 1: 'one',\n" +"... }\n" +"{1: 'one', 2: 'two'}" + +msgid "Instead of a key-value pair, a dict item may be an expression prefixed by a double asterisk ``**``. This denotes :dfn:`dictionary unpacking`. At runtime, the expression must evaluate to a :term:`mapping`; each item of the mapping is added to the new dictionary. As with key-value pairs, later values replace values already set by earlier items and unpackings. This may be used to override a set of defaults::" +msgstr "به‌جای جفت کلید-مقدار، یک آیتم دیکشنری ممکن است عبارتی باشد که با دو ستاره ``**`` پیشوند شده است. این نشان‌دهنده‌ی :dfn:`بازکردن بسته دیکشنری` است. در ران‌تایم، عبارت باید به یک :term:`نگاشت ` ارزیابی شود؛ هر آیتم از نگاشت به دیکشنری جدید اضافه می‌شود. همانند جفت‌های کلید-مقدار، مقادیر بعدی جایگزین مقادیری می‌شوند که قبلاً توسط آیتم‌ها و بازکردن بسته‌های قبلی تنظیم شده‌اند. این ممکن است برای بازنویسی مجموعه‌ای از مقادیر پیش‌فرض استفاده شود::" + +msgid "" +">>> defaults = {'color': 'blue', 'count': 8}\n" +">>> overrides = {'color': 'yellow'}\n" +">>> {**defaults, **overrides}\n" +"{'color': 'yellow', 'count': 8}" +msgstr "" +">>> defaults = {'color': 'blue', 'count': 8}\n" +">>> overrides = {'color': 'yellow'}\n" +">>> {**defaults, **overrides}\n" +"{'color': 'yellow', 'count': 8}" msgid "Unpacking into dictionary displays, originally proposed by :pep:`448`." msgstr "واگشایی در نمایش‌های دیکشنری، که در ابتدا در :pep:`448` پیشنهاد شده بود." -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\" clauses. When the comprehension is run, the resulting key and value elements are inserted in the new dictionary in the order they are produced." -msgstr "درک دیکشنری، برخلاف درک فهرستی و درک مجموعه، به دو عبارت نیاز دارد که با یک دونقط از هم جدا شده‌اند و پس از آن‌ها بندهای معمول «for» و «if» می‌آیند. هنگامی که درک اجرا می‌شود، عناصر کلید و مقدار حاصل به ترتیبی که تولید می‌شوند، در دیکشنری جدید درج می‌شوند." +msgid "The formal grammar for dict displays is:" +msgstr "گرامر رسمی برای نمایش‌های دیکشنری عبارت است از:" + +msgid "Comprehensions" +msgstr "درک‌ها" + +msgid "List, set and dictionary :dfn:`comprehensions` are a form of :ref:`container displays ` where items are computed via a set of looping and filtering instructions rather than listed explicitly." +msgstr ":dfn:`درک‌کننده‌های` فهرست، مجموعه و دیکشنری فرمی از :ref:`نمایش‌های ظرف ` هستند که در آن‌ها آیتم‌ها به جای فهرست‌شدن صریح، از طریق مجموعه‌ای از دستورالعمل‌های حلقه‌زنی و فیلترینگ محاسبه می‌شوند." + +msgid "In its simplest form, a comprehension consists of a single expression followed by a :keyword:`!for` clause. The :keyword:`!for` clause has the same syntax as the header of a :ref:`for statement `, without a trailing colon." +msgstr "در ساده‌ترین شکل، یک درک‌کننده شامل یک عبارت واحد است که پس از آن یک بند :keyword:`!for` قرار دارد. بند :keyword:`!for` دارای همان نحو (سینتکس) سرآیند یک :ref:`دستور for ` است، بدون اینکه دو‌نقطه در انتهای آن قرار گیرد." + +msgid "For example, a list of the first ten squares is::" +msgstr "برای مثال، فهرستی از ده مربع اول به‌صورت زیر است::" + +msgid "" +">>> [x**2 for x in range(10)]\n" +"[0, 1, 4, 9, 16, 25, 36, 49, 64, 81]" +msgstr "" +">>> [x**2 for x in range(10)]\n" +"[0, 1, 4, 9, 16, 25, 36, 49, 64, 81]" + +msgid "At run time, a list comprehension creates a new list. The expression after :keyword:`!in` must evaluate to an :term:`iterable`. For each element of this iterable, the element is bound to the :keyword:`!for` clause's target as in a :keyword:`!for` statement, then the expression before :keyword:`!for` is evaluated with the target in scope and the result is added to the new list. Thus, the example above is roughly equivalent to defining and calling the following function::" +msgstr "در زمان اجرا، یک درک فهرستی یک فهرست جدید ایجاد می‌کند. عبارت پس از :keyword:`!in` باید به یک :term:`پیمایش‌پذیر ` ارزیابی شود. برای هر عنصر از این پیمایش‌پذیر، عنصر به هدف بند :keyword:`!for` مانند یک دستور :keyword:`!for` متصل می‌شود، سپس عبارت قبل از :keyword:`!for` با هدف در محدوده ارزیابی می‌شود و نتیجه به فهرست جدید اضافه می‌شود. بنابراین، مثال بالا تقریباً معادل تعریف و فراخوانی تابع زیر است::" -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 excludes all mutable objects.) Clashes between duplicate keys are not detected; the last value (textually rightmost in the display) stored for a given key value prevails." -msgstr "محدودیت‌های مربوط به نوع مقادیر کلید، پیش‌تر در بخش :ref:`types` فهرست شده‌اند. (به‌طور خلاصه، نوع کلید باید :term:`hashable` باشد که همه‌ی شیءهای تغییرپذیر را مستثنا می‌کند.) برخورد میان کلیدهای تکراری تشخیص داده نمی‌شود؛ آخرین مقداری که برای یک مقدار کلید مشخص ذخیره شده است (یعنی مقداری که از نظر متنی در نمایش، سمت راست‌تر قرار دارد) معتبر است." +msgid "" +"def make_list_of_squares(iterable):\n" +" result = []\n" +" for x in iterable:\n" +" result.append(x**2)\n" +" return result\n" +"\n" +"make_list_of_squares(range(10))" +msgstr "" +"def make_list_of_squares(iterable):\n" +" result = []\n" +" for x in iterable:\n" +" result.append(x**2)\n" +" return result\n" +"\n" +"make_list_of_squares(range(10))" + +msgid "Set comprehensions work similarly. For example, here is a set of lowercase letters::" +msgstr "درک‌های مجموعه نیز به همین صورت کار می‌کنند. برای مثال، این هم مجموعه‌ای از حروف کوچک است::" + +msgid "" +">>> {x.lower() for x in ['a', 'A', 'b', 'C']}\n" +"{'c', 'a', 'b'}" +msgstr "" +">>> {x.lower() for x in ['a', 'A', 'b', 'C']}\n" +"{'c', 'a', 'b'}" + +msgid "At run time, this corresponds roughly to calling this function::" +msgstr "در زمان اجرا، این کار تقریباً معادل فراخوانی این تابع است::" + +msgid "" +"def make_lowercase_set(iterable):\n" +" result = set(iterable)\n" +" for x in iterable:\n" +" result.append(x.lower())\n" +" return result\n" +"\n" +"make_lowercase_set(['a', 'A', 'b', 'C'])" +msgstr "" +"def make_lowercase_set(iterable):\n" +" result = set(iterable)\n" +" for x in iterable:\n" +" result.append(x.lower())\n" +" return result\n" +"\n" +"make_lowercase_set(['a', 'A', 'b', 'C'])" + +msgid "Dictionary comprehensions start with a colon-separated key-value pair instead of an expression. For example::" +msgstr "درک‌های دیکشنری به جای یک عبارت، با یک جفت کلید-مقدار جدا شده با دو‌نقطه شروع می‌شوند. برای مثال::" + +msgid "" +">>> {func.__name__: func for func in [print, hex, any]}\n" +"{'print': ,\n" +" 'hex': ,\n" +" 'any': }" +msgstr "" +">>> {func.__name__: func for func in [print, hex, any]}\n" +"{'print': ,\n" +" 'hex': ,\n" +" 'any': }" + +msgid "At run time, this corresponds roughly to::" +msgstr "در زمان اجرا، این تقریباً معادل موارد زیر است::" + +msgid "" +"def make_dict_mapping_names_to_functions(iterable):\n" +" result = {}\n" +" for func in iterable:\n" +" result[func.__name__] = func\n" +" return result\n" +"\n" +"iterable([print, hex, any])" +msgstr "" +"def make_dict_mapping_names_to_functions(iterable):\n" +" result = {}\n" +" for func in iterable:\n" +" result[func.__name__] = func\n" +" return result\n" +"\n" +"iterable([print, hex, any])" + +msgid "As in other kinds of dictionary displays, the same key may be specified multiple times. Earlier values are overwritten by ones that are evaluated later." +msgstr "مانند سایر انواع نمایش‌های دیکشنری، ممکن است یک کلید چندین بار مشخص شود. مقادیر قبلی توسط مقادیری که بعدها ارزیابی می‌شوند، بازنویسی می‌شوند." + +msgid "There are no *tuple comprehensions*. A similar syntax is instead used for :ref:`generator expressions `, from which you can construct a tuple like this::" +msgstr "چیزی به نام *درک تاپل* وجود ندارد. در عوض، نحو مشابهی برای :ref:`عبارت‌های مولد ` استفاده می‌شود که از طریق آن‌ها می‌توانید یک تاپل را به این شکل بسازید::" + +msgid "" +">>> tuple(x**2 for x in range(10))\n" +"(0, 1, 4, 9, 16, 25, 36, 49, 64, 81)" +msgstr "" +">>> tuple(x**2 for x in range(10))\n" +"(0, 1, 4, 9, 16, 25, 36, 49, 64, 81)" 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 key. Starting with 3.8, the key is evaluated before the value, as proposed by :pep:`572`." msgstr "پیش از پایتون 3.8، در درک دیکشنری، ترتیب ارزیابی کلید و مقدار به‌خوبی تعریف‌نشده بود. در CPython، مقدار پیش از کلید ارزیابی می‌شد. از 3.8 به بعد، کلید پیش از مقدار ارزیابی می‌شود، همان‌طور که در :pep:`572` پیشنهاد شده است." +msgid "Filtering in comprehensions" +msgstr "فیلتر کردن در درک‌ها" + +msgid "The :keyword:`!for` clause may be followed by an :keyword:`!if` clause with an expression." +msgstr "ممکن است پس از بند :keyword:`!for` یک بند :keyword:`!if` همراه با یک عبارت بیاید." + +msgid "For example, a list of names from the :mod:`math` module that start with ``f`` is::" +msgstr "برای مثال، فهرستی از نام‌های ماژول :mod:`math` که با ``f`` شروع می‌شوند عبارت است از::" + +msgid "" +">>> [name for name in vars(math) if name.startswith('f')]\n" +"['fabs', 'factorial', 'floor', 'fma', 'fmod', 'frexp', 'fsum']" +msgstr "" +">>> [name for name in vars(math) if name.startswith('f')]\n" +"['fabs', 'factorial', 'floor', 'fma', 'fmod', 'frexp', 'fsum']" + +msgid "At run time, the expression after :keyword:`!if` is evaluated before each element is added to the resulting container, and if it is false, the element is skipped. Thus, the above example roughly corresponds to defining and calling the following function::" +msgstr "در زمان اجرا، عبارت موجود پس از :keyword:`!if` پیش از اضافه شدن هر المان به ظرف حاصل ارزیابی می‌شود و اگر نادرست باشد، آن المان نادیده گرفته می‌شود. بنابراین، مثال بالا تقریباً با تعریف و فراخوانی تابع زیر مطابقت دارد::" + +msgid "" +"def get_math_f_names(iterable):\n" +" result = []\n" +" for name in iterable:\n" +" if name.startswith('f'):\n" +" result.append(name)\n" +" return result\n" +"\n" +"get_math_f_names(vars(math))" +msgstr "" +"def get_math_f_names(iterable):\n" +" result = []\n" +" for name in iterable:\n" +" if name.startswith('f'):\n" +" result.append(name)\n" +" return result\n" +"\n" +"get_math_f_names(vars(math))" + +msgid "Filtering is a special case of more complex comprehensions. See the next section for a more formal description." +msgstr "فیلترکردن حالت خاصی از درک‌های پیچیده‌تر است. برای توضیحات رسمی‌تر، بخش بعدی را ببینید." + +msgid "Complex comprehensions" +msgstr "درک‌های پیچیده" + +msgid "Generally, a comprehension's initial :keyword:`!for` clause may be followed by zero or more additional :keyword:`!for` or :keyword:`!if` clauses. For example, here is a list of names exposed by two Python modules, filtered to only include names that start with ``a``::" +msgstr "به‌طور کلی، بند اول :keyword:`!for` در یک درک ممکن است با صفر یا چند بند اضافی :keyword:`!for` یا :keyword:`!if` دنبال شود. برای مثال، در اینجا فهرستی از نام‌های عرضه‌شده توسط دو ماژول پایتون آورده شده است که فیلتر شده‌اند تا فقط نام‌های شروع‌شونده با ``a`` را شامل شوند::" + +msgid "" +">>> import array\n" +">>> import math\n" +">>> [\n" +"... name\n" +"... for module in [array, math]\n" +"... for name in vars(module)\n" +"... if name.startswith('a')\n" +"... ]\n" +"['array', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh']" +msgstr "" +">>> import array\n" +">>> import math\n" +">>> [\n" +"... name\n" +"... for module in [array, math]\n" +"... for name in vars(module)\n" +"... if name.startswith('a')\n" +"... ]\n" +"['array', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh']" + +msgid "At run time, this roughly corresponds to defining and calling::" +msgstr "در زمان اجرا، این مورد تقریباً با تعریف و فراخوانی زیر مطابقت دارد::" + +msgid "" +"def get_a_names(iterable):\n" +" result = []\n" +" for module in iterable:\n" +" for name in vars(module):\n" +" if name.startswith('a'):\n" +" result.append(name)\n" +" return result\n" +"\n" +"get_a_names([array, math])" +msgstr "" +"def get_a_names(iterable):\n" +" result = []\n" +" for module in iterable:\n" +" for name in vars(module):\n" +" if name.startswith('a'):\n" +" result.append(name)\n" +" return result\n" +"\n" +"get_a_names([array, math])" + +msgid "The elements of the new container are those that would be produced by considering each of the :keyword:`!for` or :keyword:`!if` clauses a block, nesting from left to right, and evaluating the expression to produce an element (or dictionary entry) each time the innermost block is reached." +msgstr "عناصر ظرف جدید آنهایی هستند که با در نظر گرفتن هر یک از بندهای :keyword:`!for` یا :keyword:`!if` به عنوان یک بلوک، تودرتو کردن از چپ به راست، و ارزیابی عبارت برای تولید یک عنصر (یا ورودی دیکشنری) در هر بار رسیدن به داخلی‌ترین بلوک، تولید می‌شوند." + +msgid "Aside from the iterable expression in the leftmost :keyword:`!for` clause, the comprehension is executed in a separate implicitly nested scope. This ensures that names assigned to in the target list don't \"leak\" into the enclosing scope. For example::" +msgstr "به‌جز عبارت پیمایش‌پذیر در سمت چپ‌ترین بند :keyword:`!for`، درک در یک محدوده‌ی تودرتوی ضمنی جداگانه اجرا می‌شود. این تضمین می‌کند که نام‌های تخصیص‌یافته در فهرست هدف به محدوده‌ی احاطه‌کننده «نشت» نکنند. برای مثال::" + +msgid "" +">>> x = 'old value'\n" +">>> [x**2 for x in range(10)] # this `x` is local to the comprehension\n" +">>> x\n" +"'old value'" +msgstr "" +">>> x = 'old value'\n" +">>> [x**2 for x in range(10)] # این `x` نسبت به درک محلی است\n" +">>> x\n" +"'old value'" + +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 implicitly nested scope." +msgstr "عبارت پیمایش‌پذیر در سمت چپ‌ترین بند :keyword:`!for` مستقیماً در محدوده‌ی احاطه‌کننده ارزیابی شده و سپس به عنوان آرگومانی به محدوده‌ی تودرتوی ضمنی ارسال می‌شود." + +msgid "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." +msgstr "بندهای بعدی :keyword:`!for` و هر شرط فیلتری در سمت چپ‌ترین بند :keyword:`!for` نمی‌توانند در محدوده‌ی احاطه‌کننده ارزیابی شوند زیرا ممکن است به مقادیر به‌دست‌آآمده از پیمایش‌پذیر سمت چپ بستگی داشته باشند." + +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 "برای اطمینان از اینکه درک همیشه به ظرفی از نوع مناسب منجر می‌شود، عبارت‌های ``yield`` و ``yield from`` در محدوده‌ی تودرتوی ضمنی ممنوع هستند." + +msgid ":ref:`Assignment expressions ` are not allowed inside comprehension iterable expressions (that is, the expressions after the :keyword:`!in` keyword), nor anywhere within comprehensions that appear directly in a class definition." +msgstr ":ref:`عبارت‌های انتساب ` در عبارت‌های پیمایش‌پذیر درک (یعنی عبارت‌های بعد از کلیدواژهین :keyword:`!in`) و همچنین در هیچ‌یک از درک‌هایی که مستقیماً در تعریف یک کلاس ظاهر می‌شوند، مجاز نیستند." + +msgid "``yield`` and ``yield from`` prohibited in the implicitly nested scope." +msgstr "``yield`` و ``yield from`` در محدوده‌ی تودرتوی ضمنی ممنوع است." + +msgid "Unpacking in comprehensions" +msgstr "بازکردن بسته در درک‌ها" + +msgid "If the expression of a list or set comprehension is starred, the result will be :ref:`unpacked ` to produce zero or more elements." +msgstr "اگر عبارت یک فهرست یا درک مجموعه ستاره‌دار باشد، نتیجه :ref:`بازنشود ` تا صفر یا چند عنصر تولید کند." + +msgid "This is often used for \"flattening\" lists, for example::" +msgstr "این کار اغلب برای «تخت‌سازی» فهرست‌ها استفاده می‌شود، برای مثال::" + +msgid "" +">>> students = ['Petr', 'Blaise', 'Jarka']\n" +">>> teachers = ['Salim', 'Bartosz']\n" +">>> lists_of_people = [students, teachers]\n" +">>> [*people for people in lists_of_people]\n" +"['Petr', 'Blaise', 'Jarka', 'Salim', 'Bartosz']" +msgstr "" +">>> students = ['Petr', 'Blaise', 'Jarka']\n" +">>> teachers = ['Salim', 'Bartosz']\n" +">>> lists_of_people = [students, teachers]\n" +">>> [*people for people in lists_of_people]\n" +"['Petr', 'Blaise', 'Jarka', 'Salim', 'Bartosz']" + +msgid "At run time, this comprehension roughly corresponds to::" +msgstr "در زمان اجرا، این درک تقریباً با موارد زیر مطابقت دارد::" + +msgid "" +"def flatten_names(lists_of_people):\n" +" result = []\n" +" for people in lists_of_people:\n" +" result.extend(people)\n" +" return result" +msgstr "" +"def flatten_names(lists_of_people):\n" +" result = []\n" +" for people in lists_of_people:\n" +" result.extend(people)\n" +" return result" + +msgid "In dict comprehensions, a double-starred expression will be evaluated and then unpacked using :ref:`dictionary unpacking `, inserting zero or more key/value pairs into the new dictionary. As in other kinds of dictionary displays, if the same key is specified multiple times, the associated value in the resulting dictionary will be the last one specified." +msgstr "در درک‌های دیکشنری، یک عبارت دو ستاره‌دار ارزیابی شده و سپس با استفاده از :ref:`بازکردن دیکشنری ` باز می‌شود و صفر یا چند جفت کلید/مقدار را در دیکشنری جدید درج می‌کند. مانند سایر انواع نمایش‌های دیکشنری، اگر یک کلید چندین بار مشخص شود، مقدار مرتبط در دیکشنری حاصل آخرین مقدار مشخص‌شده خواهد بود." + +msgid "For example::" +msgstr "برای مثال::" + +msgid "" +">>> system_defaults = {'color': 'blue', 'count': 8}\n" +">>> user_defaults = {'color': 'yellow'}\n" +">>> overrides = {'count': 5}\n" +"\n" +">>> configuration_sets = [system_defaults, user_defaults, overrides]\n" +"\n" +">>> {**d for d in configuration_sets}\n" +"{'color': 'yellow', 'count': 5}" +msgstr "" +">>> system_defaults = {'color': 'blue', 'count': 8}\n" +">>> user_defaults = {'color': 'yellow'}\n" +">>> overrides = {'count': 5}\n" +"\n" +">>> configuration_sets = [system_defaults, user_defaults, overrides]\n" +"\n" +">>> {**d for d in configuration_sets}\n" +"{'color': 'yellow', 'count': 5}" + +msgid "Unpacking in comprehensions using the ``*`` and ``**`` operators was introduced in :pep:`798`." +msgstr "بازکردن بسته در درک‌ها با استفاده از عملگرهای ``*`` و ``**`` در :pep:`798` معرفی شد." + +msgid "Asynchronous comprehensions" +msgstr "درک‌های ناهمگام" + +msgid "In an :keyword:`async def` function, an :keyword:`!async for` clause may be used to iterate over a :term:`asynchronous iterator`. A comprehension in an :keyword:`!async def` function may consist of either a :keyword:`!for` or :keyword:`!async for` clause following the leading expression, may contain additional :keyword:`!for` or :keyword:`!async for` clauses, and may also use :keyword:`await` expressions." +msgstr "در یک تابع :keyword:`async def`، می‌توان از یک بند :keyword:`!async for` برای پیمایش روی یک :term:`پیمایش‌گر ناهمگام ` استفاده کرد. یک درک در یک تابع :keyword:`!async def` ممکن است شامل یک بند :keyword:`!for` یا :keyword:`!async for` به دنبال عبارت پیشرو باشد، ممکن است حاوی بندهای :keyword:`!for` یا :keyword:`!async for` اضافی باشد، و همچنین ممکن است از عبارت‌های :keyword:`await` استفاده کند." + +msgid "If a comprehension contains :keyword:`!async for` clauses, or if it contains :keyword:`!await` expressions or other asynchronous comprehensions anywhere except the iterable expression in the leftmost :keyword:`!for` clause, it is called an :dfn:`asynchronous comprehension`. An asynchronous comprehension may suspend the execution of the coroutine function in which it appears." +msgstr "اگر یک درک حاوی بندهای :keyword:`!async for` باشد، یا اگر حاوی عبارت‌های :keyword:`!await` یا سایر درک‌های ناهمگام در هر جایی به‌جز عبارت پیمایش‌پذیر در سمت چپ‌ترین بند :keyword:`!for` باشد، به آن :dfn:`درک ناهمگام` گفته می‌شود. یک درک ناهمگام ممکن است اجرای تابع هم‌روالی را که در آن ظاهر می‌شود، به حالت تعلیق درآورد." + +msgid "Asynchronous comprehensions were introduced in :pep:`530`." +msgstr "درک‌های ناهمگام در :pep:`530` معرفی شدند." + +msgid "Asynchronous comprehensions are now allowed inside comprehensions in asynchronous functions. Outer comprehensions implicitly become asynchronous." +msgstr "درک‌های ناهمگام اکنون در داخل درک‌ها در توابع ناهمگام مجاز هستند. درک‌های بیرونی به‌طور ضمنی ناهمگام می‌شوند." + +msgid "Formal grammar for comprehensions" +msgstr "گرامر رسمی برای درک‌ها" + +msgid "The formal grammar for comprehensions is:" +msgstr "گرامر رسمی برای درک‌ها عبارت است از:" + msgid "Generator expressions" msgstr "عبارت‌های تولیدگر" @@ -1459,8 +1972,17 @@ msgstr "فهرست‌های عبارت" 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 "مگر وقتی که بخشی از یک نمایش فهرست یا مجموعه باشد، یک فهرست عبارت شامل حداقل یک ویرگول، یک تاپل حاصل می‌دهد. طول تاپل برابر تعداد عبارت‌های داخل فهرست است. عبارت‌ها از چپ به راست ارزیابی می‌شوند." -msgid "An asterisk ``*`` denotes :dfn:`iterable unpacking`. Its operand must be an :term:`iterable`. The iterable is expanded into a sequence of items, which are included in the new tuple, list, or set, at the site of the unpacking." -msgstr "ستاره ``*`` نشان‌دهنده‌ی :dfn:`واگشایی پیمایش‌پذیر (iterable unpacking)` است. عملوند آن باید یک :term:`پیمایش‌پذیر ` باشد. این پیمایش‌پذیر به دنباله‌ای از آیتم‌ها بسط داده می‌شود که در محل واگشایی، در تاپل، فهرست یا مجموعه‌ی جدید گنجانده می‌شوند." +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 trailing comma doesn't create a tuple, but rather yields the value of that expression. (To create an empty tuple, use an empty pair of parentheses: ``()``.)" +msgstr "ویرگول پایانی فقط برای ایجاد یک تاپل تک‌آیتمی، مانند ``1,`` لازم است؛ در تمام موارد دیگر اختیاری است. یک عبارت بدون ویرگول پایانی، تاپل ایجاد نمی‌کند، بلکه مقدار آن عبارت را برمی‌گرداند. (برای ایجاد یک تاپل خالی، از یک جفت پرانتز خالی استفاده کنید: ``()``.)" + +msgid "Iterable unpacking" +msgstr "بازکردن بسته‌ی پیمایش‌پذیر" + +msgid "In an expression list or tuple, list or set display, any expression may be prefixed with an asterisk (``*``). This denotes :dfn:`iterable unpacking`." +msgstr "در یک فهرست عبارت یا تاپل، نمایش فهرست یا مجموعه، هر عبارتی ممکن است با یک ستاره (``*``) پیشوند شود. این نشان‌دهنده‌ی :dfn:`بازکردن پیمایش‌پذیر` است." + +msgid "At runtime, the asterisk-prefixed expression must evaluate to an :term:`iterable`. The iterable is expanded into a sequence of items, which are included in the new tuple, list, or set, at the site of the unpacking." +msgstr "در ران‌تایم، عبارت پیشوندگرفته با ستاره باید به یک :term:`پیمایش‌پذیر ` ارزیابی شود. پیمایش‌پذیر به دنباله‌ای از آیتم‌ها گسترش می‌یابد که در تاپل، فهرست یا مجموعه‌ی جدید، در محل بازکردن بسته گنجانده می‌شوند." msgid "Iterable unpacking in expression lists, originally proposed by :pep:`448`." msgstr "واگشایی پیمایش‌پذیرها در فهرست‌های عبارت، که در ابتدا در :pep:`448` پیشنهاد شد." @@ -1468,9 +1990,6 @@ msgstr "واگشایی پیمایش‌پذیرها در فهرست‌های عب msgid "Any item in an expression list may be starred. See :pep:`646`." msgstr "هر آیتم در یک فهرست عبارت می‌تواند ستاره‌دار شود. :pep:`646` را ببینید." -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 trailing comma doesn't create a tuple, but rather yields the value of that expression. (To create an empty tuple, use an empty pair of parentheses: ``()``.)" -msgstr "ویرگول پایانی فقط برای ایجاد یک تاپل تک‌آیتمی، مانند ``1,`` لازم است؛ در تمام موارد دیگر اختیاری است. یک عبارت بدون ویرگول پایانی، تاپل ایجاد نمی‌کند، بلکه مقدار آن عبارت را برمی‌گرداند. (برای ایجاد یک تاپل خالی، از یک جفت پرانتز خالی استفاده کنید: ``()``.)" - msgid "Evaluation order" msgstr "ترتیب ارزیابی" @@ -1702,38 +2221,26 @@ msgstr "شکل پرانتزدار" msgid "() (parentheses)" msgstr "() (پرانتز)" -msgid "tuple display" -msgstr "نمایش تاپل" - -msgid "empty" -msgstr "خالی" +msgid "comprehensions" +msgstr "درک‌ها" -msgid "tuple" -msgstr "تاپل" +msgid "trailing" +msgstr "پایانی" msgid "comma" msgstr "ویرگول" -msgid ", (comma)" -msgstr ", (کاما)" - -msgid "comprehensions" -msgstr "درک‌ها" - -msgid "for" -msgstr "برای" - -msgid "in comprehensions" -msgstr "در درک‌ها" +msgid "iterable" +msgstr "پیمایش‌پذیر" -msgid "if" -msgstr "اگر" +msgid "unpacking" +msgstr "واگشایی" -msgid "async for" -msgstr "async for" +msgid "* (asterisk)" +msgstr "* (ستاره)" -msgid "await" -msgstr "await" +msgid "in expression lists" +msgstr "در فهرست‌های عبارت" msgid "list" msgstr "فهرست" @@ -1741,12 +2248,18 @@ msgstr "فهرست" msgid "display" msgstr "نمایش" +msgid "empty" +msgstr "خالی" + msgid "[] (square brackets)" msgstr "[] (کمانک‌های مربع)" msgid "list expression" msgstr "عبارت فهرستی" +msgid ", (comma)" +msgstr ", (کاما)" + msgid "expression list" msgstr "فهرست عبارت‌ها" @@ -1759,6 +2272,12 @@ msgstr "{} (آکولاد)" msgid "set expression" msgstr "عبارت مجموعه" +msgid "tuple display" +msgstr "نمایش تاپل" + +msgid "tuple" +msgstr "تاپل" + msgid "dictionary" msgstr "دیکشنری" @@ -1783,14 +2302,23 @@ msgstr "در عبارت‌های دیکشنری" msgid "in dictionary displays" msgstr "در نمایش‌های دیکشنری" -msgid "unpacking" -msgstr "واگشایی" - msgid "**" msgstr "**" -msgid "hashable" -msgstr "هش‌پذیر" +msgid "for" +msgstr "برای" + +msgid "in comprehensions" +msgstr "در درک‌ها" + +msgid "if" +msgstr "اگر" + +msgid "async for" +msgstr "async for" + +msgid "await" +msgstr "await" msgid "generator" msgstr "تولیدگر" @@ -1897,9 +2425,6 @@ msgstr "در فراخوانی‌های تابع" msgid "parameter" msgstr "پارامتر" -msgid "* (asterisk)" -msgstr "* (ستاره)" - msgid "user-defined" msgstr "تعریف‌شده توسط کاربر" @@ -2149,15 +2674,6 @@ msgstr "ناشناس" msgid "lambda expression" msgstr "عبارت lambda" -msgid "iterable" -msgstr "پیمایش‌پذیر" - -msgid "in expression lists" -msgstr "در فهرست‌های عبارت" - -msgid "trailing" -msgstr "پایانی" - msgid "evaluation" msgstr "ارزیابی" @@ -2166,3 +2682,51 @@ msgstr "ترتیب" msgid "precedence" msgstr "اولویت" + +#~ msgid "A parenthesized form is an optional expression list enclosed in parentheses:" +#~ msgstr "شکل پرانتزدار، یک فهرست عبارت اختیاری است که در پرانتز محصور شده است:" + +#~ 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 "یک فهرست عبارت پرانتزبندی‌شده، هر آنچه را که آن فهرست عبارت برمی‌گرداند، برمی‌گرداند: اگر فهرست دست‌کم شامل یک ویرگول باشد، یک تاپل برمی‌گرداند؛ در غیر این صورت، عبارت واحدی را برمی‌گرداند که فهرست عبارت را تشکیل می‌دهد." + +#~ 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* required --- allowing unparenthesized \"nothing\" in expressions would cause ambiguities and allow common typos to pass uncaught." +#~ msgstr "توجه داشته باشید که تاپل‌ها با پرانتزها تشکیل نمی‌شوند، بلکه با استفاده از کاما تشکیل می‌شوند. استثنا، تاپل خالی است که برای آن پرانتزها *الزامی* هستند — اجازه دادن به «هیچ» بدون پرانتز در عبارت‌ها باعث ایجاد ابهام می‌شود و اجازه می‌دهد خطاهای تایپی رایج بدون شناسایی باقی بمانند." + +#~ msgid "Displays for lists, sets and dictionaries" +#~ msgstr "نمایش فهرست‌ها، مجموعه‌ها و دیکشنری‌ها" + +#~ msgid "For constructing a list, a set or a dictionary Python provides special syntax called \"displays\", each of them in two flavors:" +#~ msgstr "برای ساختن فهرست، مجموعه یا دیکشنری، پایتون سینتکس خاصی به نام «نمایش‌ها» (displays) فراهم می‌کند که هر کدام دو گونه دارند:" + +#~ msgid "either the container contents are listed explicitly, or" +#~ msgstr "یا محتویات ظرف به‌صورت صریح فهرست می‌شوند، یا" + +#~ msgid "Common syntax elements for comprehensions are:" +#~ msgstr "عناصر نحوی مشترک برای درک‌ها عبارتند از:" + +#~ 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 list of expressions is supplied, its elements are evaluated from left to right and placed into the list object in that order. When a comprehension is supplied, the list is constructed from the elements resulting from the comprehension." +#~ msgstr "یک نمایش فهرست، یک شیء فهرست جدید حاصل می‌کند که محتوای آن توسط یک فهرست از عبارت‌ها یا یک درک فهرستی مشخص می‌شود. هنگامی که یک فهرست از عبارت‌های جداشده با کاما ارائه شود، عناصر آن از چپ به راست ارزیابی می‌شوند و با همان ترتیب در شیء فهرست قرار می‌گیرند. هنگامی که یک درک فهرستی ارائه شود، فهرست از عناصر حاصل از آن درک ساخته می‌شود." + +#~ msgid "A set display is denoted by curly braces and distinguishable from dictionary displays by the lack of colons separating keys and values:" +#~ msgstr "نمایش مجموعه با آکولادها مشخص می‌شود و به دلیل نبود علامت دونقطه برای جدا کردن کلیدها و مقدارها، از نمایش‌های دیکشنری قابل تشخیص است:" + +#~ 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-separated list of expressions is supplied, its elements are evaluated from left to right and added to the set object. When a comprehension is supplied, the set is constructed from the elements resulting from the comprehension." +#~ msgstr "یک نمایش مجموعه، یک شیء مجموعه‌ی تغییرپذیر جدید ایجاد می‌کند که محتوای آن یا با دنباله‌ای از عبارت‌ها یا با یک درک مشخص می‌شود. هنگامی که یک فهرست جداشده با کاما از عبارت‌ها ارائه شود، عناصر آن از چپ به راست ارزیابی می‌شوند و به شیء مجموعه افزوده می‌شوند. هنگامی که یک درک ارائه شود، مجموعه از عناصر حاصل از آن درک ساخته می‌شود." + +#~ msgid "An empty set cannot be constructed with ``{}``; this literal constructs an empty dictionary." +#~ msgstr "یک مجموعه خالی را نمی‌توان با ``{}`` ساخت؛ این لفظی یک دیکشنری خالی می‌سازد." + +#~ msgid "A dictionary display is a possibly empty series of dict items (key/value pairs) enclosed in curly braces:" +#~ msgstr "نمایش دیکشنری دنباله‌ای از آیتم‌های دیکشنری (جفت‌های کلید/مقدار) است که ممکن است خالی باشد و در آکولاد محصور شده است:" + +#~ msgid "A dictionary display yields a new dictionary object." +#~ msgstr "یک نمایش دیکشنری، یک شیء دیکشنری جدید ایجاد می‌کند." + +#~ 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\" clauses. When the comprehension is run, the resulting key and value elements are inserted in the new dictionary in the order they are produced." +#~ msgstr "درک دیکشنری، برخلاف درک فهرستی و درک مجموعه، به دو عبارت نیاز دارد که با یک دونقط از هم جدا شده‌اند و پس از آن‌ها بندهای معمول «for» و «if» می‌آیند. هنگامی که درک اجرا می‌شود، عناصر کلید و مقدار حاصل به ترتیبی که تولید می‌شوند، در دیکشنری جدید درج می‌شوند." + +#~ 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 excludes all mutable objects.) Clashes between duplicate keys are not detected; the last value (textually rightmost in the display) stored for a given key value prevails." +#~ msgstr "محدودیت‌های مربوط به نوع مقادیر کلید، پیش‌تر در بخش :ref:`types` فهرست شده‌اند. (به‌طور خلاصه، نوع کلید باید :term:`hashable` باشد که همه‌ی شیءهای تغییرپذیر را مستثنا می‌کند.) برخورد میان کلیدهای تکراری تشخیص داده نمی‌شود؛ آخرین مقداری که برای یک مقدار کلید مشخص ذخیره شده است (یعنی مقداری که از نظر متنی در نمایش، سمت راست‌تر قرار دارد) معتبر است." + +#~ msgid "hashable" +#~ msgstr "هش‌پذیر" diff --git a/reference/grammar.po b/reference/grammar.po index 2602bbea..ef1ee083 100644 --- a/reference/grammar.po +++ b/reference/grammar.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-08 09:24+0330\n" "PO-Revision-Date: 2026-08-28 10:59+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -40,3143 +40,4798 @@ msgstr "پایتون عمدتاً از اسلایس‌ها برای بهینه msgid "Cuts currently don't appear inside parentheses, brackets, lookaheads and similar. Their behavior in these contexts is deliberately left unspecified." msgstr "در حال حاضر اسلایس‌ها در داخل پرانتزها، براکت‌ها، پیش‌نگرها (lookaheads) و موارد مشابه ظاهر نمی‌شوند. رفتار آن‌ها در این زمینه‌ها عمداً نامشخص باقی مانده است." -#~ msgid "" -#~ "# PEG grammar for Python\n" -#~ "\n" -#~ "@trailer '''\n" -#~ "void *\n" -#~ "_PyPegen_parse(Parser *p)\n" -#~ "{\n" -#~ " // Initialize keywords\n" -#~ " p->keywords = reserved_keywords;\n" -#~ " p->n_keyword_lists = n_keyword_lists;\n" -#~ " p->soft_keywords = soft_keywords;\n" -#~ "\n" -#~ " // Run parser\n" -#~ " void *result = NULL;\n" -#~ " if (p->start_rule == Py_file_input) {\n" -#~ " result = file_rule(p);\n" -#~ " } else if (p->start_rule == Py_single_input) {\n" -#~ " result = interactive_rule(p);\n" -#~ " } else if (p->start_rule == Py_eval_input) {\n" -#~ " result = eval_rule(p);\n" -#~ " } else if (p->start_rule == Py_func_type_input) {\n" -#~ " result = func_type_rule(p);\n" -#~ " }\n" -#~ "\n" -#~ " return result;\n" -#~ "}\n" -#~ "'''\n" -#~ "\n" -#~ "# ========================= START OF THE GRAMMAR =========================\n" -#~ "\n" -#~ "# General grammatical elements and rules:\n" -#~ "#\n" -#~ "# * Strings with double quotes (\") denote SOFT KEYWORDS\n" -#~ "# * Strings with single quotes (') denote KEYWORDS\n" -#~ "# * Upper case names (NAME) denote tokens in the Grammar/Tokens file\n" -#~ "# * Rule names starting with \"invalid_\" are used for specialized syntax errors\n" -#~ "# - These rules are NOT used in the first pass of the parser.\n" -#~ "# - Only if the first pass fails to parse, a second pass including the invalid\n" -#~ "# rules will be executed.\n" -#~ "# - If the parser fails in the second phase with a generic syntax error, the\n" -#~ "# location of the generic failure of the first pass will be used (this avoids\n" -#~ "# reporting incorrect locations due to the invalid rules).\n" -#~ "# - The order of the alternatives involving invalid rules matter\n" -#~ "# (like any rule in PEG).\n" -#~ "#\n" -#~ "# Grammar Syntax (see PEP 617 for more information):\n" -#~ "#\n" -#~ "# rule_name: expression\n" -#~ "# Optionally, a type can be included right after the rule name, which\n" -#~ "# specifies the return type of the C or Python function corresponding to the\n" -#~ "# rule:\n" -#~ "# rule_name[return_type]: expression\n" -#~ "# If the return type is omitted, then a void * is returned in C and an Any in\n" -#~ "# Python.\n" -#~ "# e1 e2\n" -#~ "# Match e1, then match e2.\n" -#~ "# e1 | e2\n" -#~ "# Match e1 or e2.\n" -#~ "# The first alternative can also appear on the line after the rule name for\n" -#~ "# formatting purposes. In that case, a | must be used before the first\n" -#~ "# alternative, like so:\n" -#~ "# rule_name[return_type]:\n" -#~ "# | first_alt\n" -#~ "# | second_alt\n" -#~ "# ( e )\n" -#~ "# Match e (allows also to use other operators in the group like '(e)*')\n" -#~ "# [ e ] or e?\n" -#~ "# Optionally match e.\n" -#~ "# e*\n" -#~ "# Match zero or more occurrences of e.\n" -#~ "# e+\n" -#~ "# Match one or more occurrences of e.\n" -#~ "# s.e+\n" -#~ "# Match one or more occurrences of e, separated by s. The generated parse tree\n" -#~ "# does not include the separator. This is otherwise identical to (e (s e)*).\n" -#~ "# &e\n" -#~ "# Succeed if e can be parsed, without consuming any input.\n" -#~ "# !e\n" -#~ "# Fail if e can be parsed, without consuming any input.\n" -#~ "# ~\n" -#~ "# Commit to the current alternative, even if it fails to parse.\n" -#~ "# &&e\n" -#~ "# Eager parse e. The parser will not backtrack and will immediately\n" -#~ "# fail with SyntaxError if e cannot be parsed.\n" -#~ "#\n" -#~ "\n" -#~ "# STARTING RULES\n" -#~ "# ==============\n" -#~ "\n" -#~ "file[mod_ty]: a=[statements] ENDMARKER { _PyPegen_make_module(p, a) }\n" -#~ "interactive[mod_ty]: a=statement_newline { _PyAST_Interactive(a, p->arena) }\n" -#~ "eval[mod_ty]: a=expressions NEWLINE* ENDMARKER { _PyAST_Expression(a, p->arena) }\n" -#~ "func_type[mod_ty]: '(' a=[type_expressions] ')' '->' b=expression NEWLINE* ENDMARKER { _PyAST_FunctionType(a, b, p->arena) }\n" -#~ "\n" -#~ "# GENERAL STATEMENTS\n" -#~ "# ==================\n" -#~ "\n" -#~ "statements[asdl_stmt_seq*]: a=statement+ { (asdl_stmt_seq*)_PyPegen_seq_flatten(p, a) }\n" -#~ "\n" -#~ "statement[asdl_stmt_seq*]:\n" -#~ " | a=compound_stmt { _PyPegen_register_stmts(p ,\n" -#~ " (asdl_stmt_seq*)_PyPegen_singleton_seq(p, a)\n" -#~ " ) }\n" -#~ " | a[asdl_stmt_seq*]=simple_stmts { a }\n" -#~ "\n" -#~ "single_compound_stmt[asdl_stmt_seq*]:\n" -#~ " | a=compound_stmt {\n" -#~ " _PyPegen_register_stmts(p, (asdl_stmt_seq*)_PyPegen_singleton_seq(p, a)) }\n" -#~ "\n" -#~ "statement_newline[asdl_stmt_seq*]:\n" -#~ " | a=single_compound_stmt NEWLINE { a }\n" -#~ " | simple_stmts\n" -#~ " | NEWLINE { (asdl_stmt_seq*)_PyPegen_singleton_seq(p, CHECK(stmt_ty, _PyAST_Pass(EXTRA))) }\n" -#~ " | ENDMARKER { _PyPegen_interactive_exit(p) }\n" -#~ "\n" -#~ "simple_stmts[asdl_stmt_seq*]:\n" -#~ " | a=simple_stmt !';' NEWLINE { (asdl_stmt_seq*)_PyPegen_singleton_seq(p, a) } # Not needed, there for speedup\n" -#~ " | a[asdl_stmt_seq*]=';'.simple_stmt+ [';'] NEWLINE { a }\n" -#~ "\n" -#~ "# NOTE: assignment MUST precede expression, else parsing a simple assignment\n" -#~ "# will throw a SyntaxError.\n" -#~ "simple_stmt[stmt_ty] (memo):\n" -#~ " | assignment\n" -#~ " | &\"type\" type_alias\n" -#~ " | e=star_expressions { _PyAST_Expr(e, EXTRA) }\n" -#~ " | &'return' return_stmt\n" -#~ " | &('import' | 'from') import_stmt\n" -#~ " | &'raise' raise_stmt\n" -#~ " | &'pass' pass_stmt\n" -#~ " | &'del' del_stmt\n" -#~ " | &'yield' yield_stmt\n" -#~ " | &'assert' assert_stmt\n" -#~ " | &'break' break_stmt\n" -#~ " | &'continue' continue_stmt\n" -#~ " | &'global' global_stmt\n" -#~ " | &'nonlocal' nonlocal_stmt\n" -#~ "\n" -#~ "compound_stmt[stmt_ty]:\n" -#~ " | &('def' | '@' | 'async') function_def\n" -#~ " | &'if' if_stmt\n" -#~ " | &('class' | '@') class_def\n" -#~ " | &('with' | 'async') with_stmt\n" -#~ " | &('for' | 'async') for_stmt\n" -#~ " | &'try' try_stmt\n" -#~ " | &'while' while_stmt\n" -#~ " | match_stmt\n" -#~ "\n" -#~ "# SIMPLE STATEMENTS\n" -#~ "# =================\n" -#~ "\n" -#~ "# NOTE: annotated_rhs may start with 'yield'; yield_expr must start with 'yield'\n" -#~ "assignment[stmt_ty]:\n" -#~ " | a=NAME ':' b=expression c=['=' d=annotated_rhs { d }] {\n" -#~ " CHECK_VERSION(\n" -#~ " stmt_ty,\n" -#~ " 6,\n" -#~ " \"Variable annotation syntax is\",\n" -#~ " _PyAST_AnnAssign(CHECK(expr_ty, _PyPegen_set_expr_context(p, a, Store)), b, c, 1, EXTRA)\n" -#~ " ) }\n" -#~ " | a=('(' b=single_target ')' { b }\n" -#~ " | single_subscript_attribute_target) ':' b=expression c=['=' d=annotated_rhs { d }] {\n" -#~ " CHECK_VERSION(stmt_ty, 6, \"Variable annotations syntax is\", _PyAST_AnnAssign(a, b, c, 0, EXTRA)) }\n" -#~ " | a[asdl_expr_seq*]=(z=star_targets '=' { z })+ b=annotated_rhs !'=' tc=[TYPE_COMMENT] {\n" -#~ " _PyAST_Assign(a, b, NEW_TYPE_COMMENT(p, tc), EXTRA) }\n" -#~ " | a=single_target b=augassign ~ c=annotated_rhs {\n" -#~ " _PyAST_AugAssign(a, b->kind, c, EXTRA) }\n" -#~ " | invalid_assignment\n" -#~ "\n" -#~ "annotated_rhs[expr_ty]: yield_expr | star_expressions\n" -#~ "\n" -#~ "augassign[AugOperator*]:\n" -#~ " | '+=' { _PyPegen_augoperator(p, Add) }\n" -#~ " | '-=' { _PyPegen_augoperator(p, Sub) }\n" -#~ " | '*=' { _PyPegen_augoperator(p, Mult) }\n" -#~ " | '@=' { CHECK_VERSION(AugOperator*, 5, \"The '@' operator is\", _PyPegen_augoperator(p, MatMult)) }\n" -#~ " | '/=' { _PyPegen_augoperator(p, Div) }\n" -#~ " | '%=' { _PyPegen_augoperator(p, Mod) }\n" -#~ " | '&=' { _PyPegen_augoperator(p, BitAnd) }\n" -#~ " | '|=' { _PyPegen_augoperator(p, BitOr) }\n" -#~ " | '^=' { _PyPegen_augoperator(p, BitXor) }\n" -#~ " | '<<=' { _PyPegen_augoperator(p, LShift) }\n" -#~ " | '>>=' { _PyPegen_augoperator(p, RShift) }\n" -#~ " | '**=' { _PyPegen_augoperator(p, Pow) }\n" -#~ " | '//=' { _PyPegen_augoperator(p, FloorDiv) }\n" -#~ "\n" -#~ "return_stmt[stmt_ty]:\n" -#~ " | 'return' a=[star_expressions] { _PyAST_Return(a, EXTRA) }\n" -#~ "\n" -#~ "raise_stmt[stmt_ty]:\n" -#~ " | 'raise' a=expression b=['from' z=expression { z }] { _PyAST_Raise(a, b, EXTRA) }\n" -#~ " | 'raise' { _PyAST_Raise(NULL, NULL, EXTRA) }\n" -#~ "\n" -#~ "pass_stmt[stmt_ty]:\n" -#~ " | 'pass' { _PyAST_Pass(EXTRA) }\n" -#~ "\n" -#~ "break_stmt[stmt_ty]:\n" -#~ " | 'break' { _PyAST_Break(EXTRA) }\n" -#~ "\n" -#~ "continue_stmt[stmt_ty]:\n" -#~ " | 'continue' { _PyAST_Continue(EXTRA) }\n" -#~ "\n" -#~ "global_stmt[stmt_ty]: 'global' a[asdl_expr_seq*]=','.NAME+ {\n" -#~ " _PyAST_Global(CHECK(asdl_identifier_seq*, _PyPegen_map_names_to_ids(p, a)), EXTRA) }\n" -#~ "\n" -#~ "nonlocal_stmt[stmt_ty]: 'nonlocal' a[asdl_expr_seq*]=','.NAME+ {\n" -#~ " _PyAST_Nonlocal(CHECK(asdl_identifier_seq*, _PyPegen_map_names_to_ids(p, a)), EXTRA) }\n" -#~ "\n" -#~ "del_stmt[stmt_ty]:\n" -#~ " | 'del' a=del_targets &(';' | NEWLINE) { _PyAST_Delete(a, EXTRA) }\n" -#~ " | invalid_del_stmt\n" -#~ "\n" -#~ "yield_stmt[stmt_ty]: y=yield_expr { _PyAST_Expr(y, EXTRA) }\n" -#~ "\n" -#~ "assert_stmt[stmt_ty]: 'assert' a=expression b=[',' z=expression { z }] { _PyAST_Assert(a, b, EXTRA) }\n" -#~ "\n" -#~ "import_stmt[stmt_ty]:\n" -#~ " | invalid_import\n" -#~ " | import_name\n" -#~ " | import_from\n" -#~ "\n" -#~ "# Import statements\n" -#~ "# -----------------\n" -#~ "\n" -#~ "import_name[stmt_ty]: 'import' a=dotted_as_names { _PyAST_Import(a, EXTRA) }\n" -#~ "# note below: the ('.' | '...') is necessary because '...' is tokenized as ELLIPSIS\n" -#~ "import_from[stmt_ty]:\n" -#~ " | 'from' a=('.' | '...')* b=dotted_name 'import' c=import_from_targets {\n" -#~ " _PyPegen_checked_future_import(p, b->v.Name.id, c, _PyPegen_seq_count_dots(a), EXTRA) }\n" -#~ " | 'from' a=('.' | '...')+ 'import' b=import_from_targets {\n" -#~ " _PyAST_ImportFrom(NULL, b, _PyPegen_seq_count_dots(a), EXTRA) }\n" -#~ "import_from_targets[asdl_alias_seq*]:\n" -#~ " | '(' a=import_from_as_names [','] ')' { a }\n" -#~ " | import_from_as_names !','\n" -#~ " | '*' { (asdl_alias_seq*)_PyPegen_singleton_seq(p, CHECK(alias_ty, _PyPegen_alias_for_star(p, EXTRA))) }\n" -#~ " | invalid_import_from_targets\n" -#~ "import_from_as_names[asdl_alias_seq*]:\n" -#~ " | a[asdl_alias_seq*]=','.import_from_as_name+ { a }\n" -#~ "import_from_as_name[alias_ty]:\n" -#~ " | invalid_import_from_as_name\n" -#~ " | a=NAME b=['as' z=NAME { z }] { _PyAST_alias(\n" -#~ " a->v.Name.id, (b) ? ((expr_ty) b)->v.Name.id : NULL, EXTRA) }\n" -#~ "\n" -#~ "dotted_as_names[asdl_alias_seq*]:\n" -#~ " | a[asdl_alias_seq*]=','.dotted_as_name+ { a }\n" -#~ "dotted_as_name[alias_ty]:\n" -#~ " | invalid_dotted_as_name\n" -#~ " | a=dotted_name b=['as' z=NAME { z }] { _PyAST_alias(\n" -#~ " a->v.Name.id, (b) ? ((expr_ty) b)->v.Name.id : NULL, EXTRA) }\n" -#~ "\n" -#~ "dotted_name[expr_ty]:\n" -#~ " | a=dotted_name '.' b=NAME { _PyPegen_join_names_with_dot(p, a, b) }\n" -#~ " | NAME\n" -#~ "\n" -#~ "# COMPOUND STATEMENTS\n" -#~ "# ===================\n" -#~ "\n" -#~ "# Common elements\n" -#~ "# ---------------\n" -#~ "\n" -#~ "block[asdl_stmt_seq*] (memo):\n" -#~ " | NEWLINE INDENT a=statements DEDENT { a }\n" -#~ " | simple_stmts\n" -#~ " | invalid_block\n" -#~ "\n" -#~ "decorators[asdl_expr_seq*]: a[asdl_expr_seq*]=('@' f=named_expression NEWLINE { f })+ { a }\n" -#~ "\n" -#~ "# Class definitions\n" -#~ "# -----------------\n" -#~ "\n" -#~ "class_def[stmt_ty]:\n" -#~ " | a=decorators b=class_def_raw { _PyPegen_class_def_decorators(p, a, b) }\n" -#~ " | class_def_raw\n" -#~ "\n" -#~ "class_def_raw[stmt_ty]:\n" -#~ " | invalid_class_def_raw\n" -#~ " | 'class' a=NAME t=[type_params] b=['(' z=[arguments] ')' { z }] ':' c=block {\n" -#~ " _PyAST_ClassDef(a->v.Name.id,\n" -#~ " (b) ? ((expr_ty) b)->v.Call.args : NULL,\n" -#~ " (b) ? ((expr_ty) b)->v.Call.keywords : NULL,\n" -#~ " c, NULL, t, EXTRA) }\n" -#~ "\n" -#~ "# Function definitions\n" -#~ "# --------------------\n" -#~ "\n" -#~ "function_def[stmt_ty]:\n" -#~ " | d=decorators f=function_def_raw { _PyPegen_function_def_decorators(p, d, f) }\n" -#~ " | function_def_raw\n" -#~ "\n" -#~ "function_def_raw[stmt_ty]:\n" -#~ " | invalid_def_raw\n" -#~ " | 'def' n=NAME t=[type_params] '(' params=[params] ')' a=['->' z=expression { z }] ':' tc=[func_type_comment] b=block {\n" -#~ " _PyAST_FunctionDef(n->v.Name.id,\n" -#~ " (params) ? params : CHECK(arguments_ty, _PyPegen_empty_arguments(p)),\n" -#~ " b, NULL, a, NEW_TYPE_COMMENT(p, tc), t, EXTRA) }\n" -#~ " | 'async' 'def' n=NAME t=[type_params] '(' params=[params] ')' a=['->' z=expression { z }] ':' tc=[func_type_comment] b=block {\n" -#~ " CHECK_VERSION(\n" -#~ " stmt_ty,\n" -#~ " 5,\n" -#~ " \"Async functions are\",\n" -#~ " _PyAST_AsyncFunctionDef(n->v.Name.id,\n" -#~ " (params) ? params : CHECK(arguments_ty, _PyPegen_empty_arguments(p)),\n" -#~ " b, NULL, a, NEW_TYPE_COMMENT(p, tc), t, EXTRA)\n" -#~ " ) }\n" -#~ "\n" -#~ "# Function parameters\n" -#~ "# -------------------\n" -#~ "\n" -#~ "params[arguments_ty]:\n" -#~ " | invalid_parameters\n" -#~ " | parameters\n" -#~ "\n" -#~ "parameters[arguments_ty]:\n" -#~ " | a=slash_no_default b[asdl_arg_seq*]=param_no_default* c=param_with_default* d=[star_etc] {\n" -#~ " CHECK_VERSION(arguments_ty, 8, \"Positional-only parameters are\", _PyPegen_make_arguments(p, a, NULL, b, c, d)) }\n" -#~ " | a=slash_with_default b=param_with_default* c=[star_etc] {\n" -#~ " CHECK_VERSION(arguments_ty, 8, \"Positional-only parameters are\", _PyPegen_make_arguments(p, NULL, a, NULL, b, c)) }\n" -#~ " | a[asdl_arg_seq*]=param_no_default+ b=param_with_default* c=[star_etc] {\n" -#~ " _PyPegen_make_arguments(p, NULL, NULL, a, b, c) }\n" -#~ " | a=param_with_default+ b=[star_etc] { _PyPegen_make_arguments(p, NULL, NULL, NULL, a, b)}\n" -#~ " | a=star_etc { _PyPegen_make_arguments(p, NULL, NULL, NULL, NULL, a) }\n" -#~ "\n" -#~ "# Some duplication here because we can't write (',' | &')'),\n" -#~ "# which is because we don't support empty alternatives (yet).\n" -#~ "\n" -#~ "slash_no_default[asdl_arg_seq*]:\n" -#~ " | a[asdl_arg_seq*]=param_no_default+ '/' ',' { a }\n" -#~ " | a[asdl_arg_seq*]=param_no_default+ '/' &')' { a }\n" -#~ "slash_with_default[SlashWithDefault*]:\n" -#~ " | a=param_no_default* b=param_with_default+ '/' ',' { _PyPegen_slash_with_default(p, (asdl_arg_seq *)a, b) }\n" -#~ " | a=param_no_default* b=param_with_default+ '/' &')' { _PyPegen_slash_with_default(p, (asdl_arg_seq *)a, b) }\n" -#~ "\n" -#~ "star_etc[StarEtc*]:\n" -#~ " | invalid_star_etc\n" -#~ " | '*' a=param_no_default b=param_maybe_default* c=[kwds] {\n" -#~ " _PyPegen_star_etc(p, a, b, c) }\n" -#~ " | '*' a=param_no_default_star_annotation b=param_maybe_default* c=[kwds] {\n" -#~ " _PyPegen_star_etc(p, a, b, c) }\n" -#~ " | '*' ',' b=param_maybe_default+ c=[kwds] {\n" -#~ " _PyPegen_star_etc(p, NULL, b, c) }\n" -#~ " | a=kwds { _PyPegen_star_etc(p, NULL, NULL, a) }\n" -#~ "\n" -#~ "kwds[arg_ty]:\n" -#~ " | invalid_kwds\n" -#~ " | '**' a=param_no_default { a }\n" -#~ "\n" -#~ "# One parameter. This *includes* a following comma and type comment.\n" -#~ "#\n" -#~ "# There are three styles:\n" -#~ "# - No default\n" -#~ "# - With default\n" -#~ "# - Maybe with default\n" -#~ "#\n" -#~ "# There are two alternative forms of each, to deal with type comments:\n" -#~ "# - Ends in a comma followed by an optional type comment\n" -#~ "# - No comma, optional type comment, must be followed by close paren\n" -#~ "# The latter form is for a final parameter without trailing comma.\n" -#~ "#\n" -#~ "\n" -#~ "param_no_default[arg_ty]:\n" -#~ " | a=param ',' tc=TYPE_COMMENT? { _PyPegen_add_type_comment_to_arg(p, a, tc) }\n" -#~ " | a=param tc=TYPE_COMMENT? &')' { _PyPegen_add_type_comment_to_arg(p, a, tc) }\n" -#~ "param_no_default_star_annotation[arg_ty]:\n" -#~ " | a=param_star_annotation ',' tc=TYPE_COMMENT? { _PyPegen_add_type_comment_to_arg(p, a, tc) }\n" -#~ " | a=param_star_annotation tc=TYPE_COMMENT? &')' { _PyPegen_add_type_comment_to_arg(p, a, tc) }\n" -#~ "param_with_default[NameDefaultPair*]:\n" -#~ " | a=param c=default ',' tc=TYPE_COMMENT? { _PyPegen_name_default_pair(p, a, c, tc) }\n" -#~ " | a=param c=default tc=TYPE_COMMENT? &')' { _PyPegen_name_default_pair(p, a, c, tc) }\n" -#~ "param_maybe_default[NameDefaultPair*]:\n" -#~ " | a=param c=default? ',' tc=TYPE_COMMENT? { _PyPegen_name_default_pair(p, a, c, tc) }\n" -#~ " | a=param c=default? tc=TYPE_COMMENT? &')' { _PyPegen_name_default_pair(p, a, c, tc) }\n" -#~ "param[arg_ty]: a=NAME b=annotation? { _PyAST_arg(a->v.Name.id, b, NULL, EXTRA) }\n" -#~ "param_star_annotation[arg_ty]: a=NAME b=star_annotation { _PyAST_arg(a->v.Name.id, b, NULL, EXTRA) }\n" -#~ "annotation[expr_ty]: ':' a=expression { a }\n" -#~ "star_annotation[expr_ty]: ':' a=star_expression { a }\n" -#~ "default[expr_ty]: '=' a=expression { a } | invalid_default\n" -#~ "\n" -#~ "# If statement\n" -#~ "# ------------\n" -#~ "\n" -#~ "if_stmt[stmt_ty]:\n" -#~ " | invalid_if_stmt\n" -#~ " | 'if' a=named_expression ':' b=block c=elif_stmt {\n" -#~ " _PyAST_If(a, b, CHECK(asdl_stmt_seq*, _PyPegen_singleton_seq(p, c)), EXTRA) }\n" -#~ " | 'if' a=named_expression ':' b=block c=[else_block] { _PyAST_If(a, b, c, EXTRA) }\n" -#~ "elif_stmt[stmt_ty]:\n" -#~ " | invalid_elif_stmt\n" -#~ " | 'elif' a=named_expression ':' b=block c=elif_stmt {\n" -#~ " _PyAST_If(a, b, CHECK(asdl_stmt_seq*, _PyPegen_singleton_seq(p, c)), EXTRA) }\n" -#~ " | 'elif' a=named_expression ':' b=block c=[else_block] { _PyAST_If(a, b, c, EXTRA) }\n" -#~ "else_block[asdl_stmt_seq*]:\n" -#~ " | invalid_else_stmt\n" -#~ " | 'else' &&':' b=block { b }\n" -#~ "\n" -#~ "# While statement\n" -#~ "# ---------------\n" -#~ "\n" -#~ "while_stmt[stmt_ty]:\n" -#~ " | invalid_while_stmt\n" -#~ " | 'while' a=named_expression ':' b=block c=[else_block] { _PyAST_While(a, b, c, EXTRA) }\n" -#~ "\n" -#~ "# For statement\n" -#~ "# -------------\n" -#~ "\n" -#~ "for_stmt[stmt_ty]:\n" -#~ " | invalid_for_stmt\n" -#~ " | 'for' t=star_targets 'in' ~ ex=star_expressions ':' tc=[TYPE_COMMENT] b=block el=[else_block] {\n" -#~ " _PyAST_For(t, ex, b, el, NEW_TYPE_COMMENT(p, tc), EXTRA) }\n" -#~ " | 'async' 'for' t=star_targets 'in' ~ ex=star_expressions ':' tc=[TYPE_COMMENT] b=block el=[else_block] {\n" -#~ " CHECK_VERSION(stmt_ty, 5, \"Async for loops are\", _PyAST_AsyncFor(t, ex, b, el, NEW_TYPE_COMMENT(p, tc), EXTRA)) }\n" -#~ " | invalid_for_target\n" -#~ "\n" -#~ "# With statement\n" -#~ "# --------------\n" -#~ "\n" -#~ "with_stmt[stmt_ty]:\n" -#~ " | invalid_with_stmt_indent\n" -#~ " | 'with' '(' a[asdl_withitem_seq*]=','.with_item+ ','? ')' ':' tc=[TYPE_COMMENT] b=block {\n" -#~ " _PyAST_With(a, b, NEW_TYPE_COMMENT(p, tc), EXTRA) }\n" -#~ " | 'with' a[asdl_withitem_seq*]=','.with_item+ ':' tc=[TYPE_COMMENT] b=block {\n" -#~ " _PyAST_With(a, b, NEW_TYPE_COMMENT(p, tc), EXTRA) }\n" -#~ " | 'async' 'with' '(' a[asdl_withitem_seq*]=','.with_item+ ','? ')' ':' b=block {\n" -#~ " CHECK_VERSION(stmt_ty, 5, \"Async with statements are\", _PyAST_AsyncWith(a, b, NULL, EXTRA)) }\n" -#~ " | 'async' 'with' a[asdl_withitem_seq*]=','.with_item+ ':' tc=[TYPE_COMMENT] b=block {\n" -#~ " CHECK_VERSION(stmt_ty, 5, \"Async with statements are\", _PyAST_AsyncWith(a, b, NEW_TYPE_COMMENT(p, tc), EXTRA)) }\n" -#~ " | invalid_with_stmt\n" -#~ "\n" -#~ "with_item[withitem_ty]:\n" -#~ " | e=expression 'as' t=star_target &(',' | ')' | ':') { _PyAST_withitem(e, t, p->arena) }\n" -#~ " | invalid_with_item\n" -#~ " | e=expression { _PyAST_withitem(e, NULL, p->arena) }\n" -#~ "\n" -#~ "# Try statement\n" -#~ "# -------------\n" -#~ "\n" -#~ "try_stmt[stmt_ty]:\n" -#~ " | invalid_try_stmt\n" -#~ " | 'try' &&':' b=block f=finally_block { _PyAST_Try(b, NULL, NULL, f, EXTRA) }\n" -#~ " | 'try' &&':' b=block ex[asdl_excepthandler_seq*]=except_block+ el=[else_block] f=[finally_block] { _PyAST_Try(b, ex, el, f, EXTRA) }\n" -#~ " | 'try' &&':' b=block ex[asdl_excepthandler_seq*]=except_star_block+ el=[else_block] f=[finally_block] {\n" -#~ " CHECK_VERSION(stmt_ty, 11, \"Exception groups are\",\n" -#~ " _PyAST_TryStar(b, ex, el, f, EXTRA)) }\n" -#~ "\n" -#~ "\n" -#~ "# Except statement\n" -#~ "# ----------------\n" -#~ "\n" -#~ "except_block[excepthandler_ty]:\n" -#~ " | invalid_except_stmt_indent\n" -#~ " | 'except' e=expression ':' b=block {\n" -#~ " _PyAST_ExceptHandler(e, NULL, b, EXTRA) }\n" -#~ " | 'except' e=expression 'as' t=NAME ':' b=block {\n" -#~ " _PyAST_ExceptHandler(e, ((expr_ty) t)->v.Name.id, b, EXTRA) }\n" -#~ " | 'except' e=expressions ':' b=block {\n" -#~ " CHECK_VERSION(\n" -#~ " excepthandler_ty,\n" -#~ " 14,\n" -#~ " \"except expressions without parentheses are\",\n" -#~ " _PyAST_ExceptHandler(e, NULL, b, EXTRA)) }\n" -#~ " | 'except' ':' b=block { _PyAST_ExceptHandler(NULL, NULL, b, EXTRA) }\n" -#~ " | invalid_except_stmt\n" -#~ "except_star_block[excepthandler_ty]:\n" -#~ " | invalid_except_star_stmt_indent\n" -#~ " | 'except' '*' e=expression ':' b=block {\n" -#~ " _PyAST_ExceptHandler(e, NULL, b, EXTRA) }\n" -#~ " | 'except' '*' e=expression 'as' t=NAME ':' b=block {\n" -#~ " _PyAST_ExceptHandler(e, ((expr_ty) t)->v.Name.id, b, EXTRA) }\n" -#~ " | 'except' '*' e=expressions ':' b=block {\n" -#~ " CHECK_VERSION(\n" -#~ " excepthandler_ty,\n" -#~ " 14,\n" -#~ " \"except expressions without parentheses are\",\n" -#~ " _PyAST_ExceptHandler(e, NULL, b, EXTRA)) }\n" -#~ " | invalid_except_star_stmt\n" -#~ "finally_block[asdl_stmt_seq*]:\n" -#~ " | invalid_finally_stmt\n" -#~ " | 'finally' &&':' a=block { a }\n" -#~ "\n" -#~ "# Match statement\n" -#~ "# ---------------\n" -#~ "\n" -#~ "match_stmt[stmt_ty]:\n" -#~ " | \"match\" subject=subject_expr ':' NEWLINE INDENT cases[asdl_match_case_seq*]=case_block+ DEDENT {\n" -#~ " CHECK_VERSION(stmt_ty, 10, \"Pattern matching is\", _PyAST_Match(subject, cases, EXTRA)) }\n" -#~ " | invalid_match_stmt\n" -#~ "\n" -#~ "subject_expr[expr_ty]:\n" -#~ " | value=star_named_expression ',' values=star_named_expressions? {\n" -#~ " _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, value, values)), Load, EXTRA) }\n" -#~ " | named_expression\n" -#~ "\n" -#~ "case_block[match_case_ty]:\n" -#~ " | invalid_case_block\n" -#~ " | \"case\" pattern=patterns guard=guard? ':' body=block {\n" -#~ " _PyAST_match_case(pattern, guard, body, p->arena) }\n" -#~ "\n" -#~ "guard[expr_ty]: 'if' guard=named_expression { guard }\n" -#~ "\n" -#~ "patterns[pattern_ty]:\n" -#~ " | patterns[asdl_pattern_seq*]=open_sequence_pattern {\n" -#~ " _PyAST_MatchSequence(patterns, EXTRA) }\n" -#~ " | pattern\n" -#~ "\n" -#~ "pattern[pattern_ty]:\n" -#~ " | as_pattern\n" -#~ " | or_pattern\n" -#~ "\n" -#~ "as_pattern[pattern_ty]:\n" -#~ " | pattern=or_pattern 'as' target=pattern_capture_target {\n" -#~ " _PyAST_MatchAs(pattern, target->v.Name.id, EXTRA) }\n" -#~ " | invalid_as_pattern\n" -#~ "\n" -#~ "or_pattern[pattern_ty]:\n" -#~ " | patterns[asdl_pattern_seq*]='|'.closed_pattern+ {\n" -#~ " asdl_seq_LEN(patterns) == 1 ? asdl_seq_GET(patterns, 0) : _PyAST_MatchOr(patterns, EXTRA) }\n" -#~ "\n" -#~ "closed_pattern[pattern_ty] (memo):\n" -#~ " | literal_pattern\n" -#~ " | capture_pattern\n" -#~ " | wildcard_pattern\n" -#~ " | value_pattern\n" -#~ " | group_pattern\n" -#~ " | sequence_pattern\n" -#~ " | mapping_pattern\n" -#~ " | class_pattern\n" -#~ "\n" -#~ "# Literal patterns are used for equality and identity constraints\n" -#~ "literal_pattern[pattern_ty]:\n" -#~ " | value=signed_number !('+' | '-') { _PyAST_MatchValue(value, EXTRA) }\n" -#~ " | value=complex_number { _PyAST_MatchValue(value, EXTRA) }\n" -#~ " | value=strings { _PyAST_MatchValue(value, EXTRA) }\n" -#~ " | 'None' { _PyAST_MatchSingleton(Py_None, EXTRA) }\n" -#~ " | 'True' { _PyAST_MatchSingleton(Py_True, EXTRA) }\n" -#~ " | 'False' { _PyAST_MatchSingleton(Py_False, EXTRA) }\n" -#~ "\n" -#~ "# Literal expressions are used to restrict permitted mapping pattern keys\n" -#~ "literal_expr[expr_ty]:\n" -#~ " | signed_number !('+' | '-')\n" -#~ " | complex_number\n" -#~ " | &(STRING|FSTRING_START|TSTRING_START) strings\n" -#~ " | 'None' { _PyAST_Constant(Py_None, NULL, EXTRA) }\n" -#~ " | 'True' { _PyAST_Constant(Py_True, NULL, EXTRA) }\n" -#~ " | 'False' { _PyAST_Constant(Py_False, NULL, EXTRA) }\n" -#~ "\n" -#~ "complex_number[expr_ty]:\n" -#~ " | real=signed_real_number '+' imag=imaginary_number {\n" -#~ " _PyAST_BinOp(real, Add, imag, EXTRA) }\n" -#~ " | real=signed_real_number '-' imag=imaginary_number {\n" -#~ " _PyAST_BinOp(real, Sub, imag, EXTRA) }\n" -#~ "\n" -#~ "signed_number[expr_ty]:\n" -#~ " | NUMBER\n" -#~ " | '-' number=NUMBER { _PyAST_UnaryOp(USub, number, EXTRA) }\n" -#~ "\n" -#~ "signed_real_number[expr_ty]:\n" -#~ " | real_number\n" -#~ " | '-' real=real_number { _PyAST_UnaryOp(USub, real, EXTRA) }\n" -#~ "\n" -#~ "real_number[expr_ty]:\n" -#~ " | real=NUMBER { _PyPegen_ensure_real(p, real) }\n" -#~ "\n" -#~ "imaginary_number[expr_ty]:\n" -#~ " | imag=NUMBER { _PyPegen_ensure_imaginary(p, imag) }\n" -#~ "\n" -#~ "capture_pattern[pattern_ty]:\n" -#~ " | target=pattern_capture_target { _PyAST_MatchAs(NULL, target->v.Name.id, EXTRA) }\n" -#~ "\n" -#~ "pattern_capture_target[expr_ty]:\n" -#~ " | !\"_\" name=NAME !('.' | '(' | '=') {\n" -#~ " _PyPegen_set_expr_context(p, name, Store) }\n" -#~ "\n" -#~ "wildcard_pattern[pattern_ty]:\n" -#~ " | \"_\" { _PyAST_MatchAs(NULL, NULL, EXTRA) }\n" -#~ "\n" -#~ "value_pattern[pattern_ty]:\n" -#~ " | attr=attr !('.' | '(' | '=') { _PyAST_MatchValue(attr, EXTRA) }\n" -#~ "\n" -#~ "attr[expr_ty]:\n" -#~ " | value=name_or_attr '.' attr=NAME {\n" -#~ " _PyAST_Attribute(value, attr->v.Name.id, Load, EXTRA) }\n" -#~ "\n" -#~ "name_or_attr[expr_ty]:\n" -#~ " | attr\n" -#~ " | NAME\n" -#~ "\n" -#~ "group_pattern[pattern_ty]:\n" -#~ " | '(' pattern=pattern ')' { pattern }\n" -#~ "\n" -#~ "sequence_pattern[pattern_ty]:\n" -#~ " | '[' patterns=maybe_sequence_pattern? ']' { _PyAST_MatchSequence(patterns, EXTRA) }\n" -#~ " | '(' patterns=open_sequence_pattern? ')' { _PyAST_MatchSequence(patterns, EXTRA) }\n" -#~ "\n" -#~ "open_sequence_pattern[asdl_seq*]:\n" -#~ " | pattern=maybe_star_pattern ',' patterns=maybe_sequence_pattern? {\n" -#~ " _PyPegen_seq_insert_in_front(p, pattern, patterns) }\n" -#~ "\n" -#~ "maybe_sequence_pattern[asdl_seq*]:\n" -#~ " | patterns=','.maybe_star_pattern+ ','? { patterns }\n" -#~ "\n" -#~ "maybe_star_pattern[pattern_ty]:\n" -#~ " | star_pattern\n" -#~ " | pattern\n" -#~ "\n" -#~ "star_pattern[pattern_ty] (memo):\n" -#~ " | '*' target=pattern_capture_target {\n" -#~ " _PyAST_MatchStar(target->v.Name.id, EXTRA) }\n" -#~ " | '*' wildcard_pattern {\n" -#~ " _PyAST_MatchStar(NULL, EXTRA) }\n" -#~ "\n" -#~ "mapping_pattern[pattern_ty]:\n" -#~ " | '{' '}' {\n" -#~ " _PyAST_MatchMapping(NULL, NULL, NULL, EXTRA) }\n" -#~ " | '{' rest=double_star_pattern ','? '}' {\n" -#~ " _PyAST_MatchMapping(NULL, NULL, rest->v.Name.id, EXTRA) }\n" -#~ " | '{' items=items_pattern ',' rest=double_star_pattern ','? '}' {\n" -#~ " _PyAST_MatchMapping(\n" -#~ " CHECK(asdl_expr_seq*, _PyPegen_get_pattern_keys(p, items)),\n" -#~ " CHECK(asdl_pattern_seq*, _PyPegen_get_patterns(p, items)),\n" -#~ " rest->v.Name.id,\n" -#~ " EXTRA) }\n" -#~ " | '{' items=items_pattern ','? '}' {\n" -#~ " _PyAST_MatchMapping(\n" -#~ " CHECK(asdl_expr_seq*, _PyPegen_get_pattern_keys(p, items)),\n" -#~ " CHECK(asdl_pattern_seq*, _PyPegen_get_patterns(p, items)),\n" -#~ " NULL,\n" -#~ " EXTRA) }\n" -#~ "\n" -#~ "items_pattern[asdl_seq*]:\n" -#~ " | ','.key_value_pattern+\n" -#~ "\n" -#~ "key_value_pattern[KeyPatternPair*]:\n" -#~ " | key=(literal_expr | attr) ':' pattern=pattern {\n" -#~ " _PyPegen_key_pattern_pair(p, key, pattern) }\n" -#~ "\n" -#~ "double_star_pattern[expr_ty]:\n" -#~ " | '**' target=pattern_capture_target { target }\n" -#~ "\n" -#~ "class_pattern[pattern_ty]:\n" -#~ " | cls=name_or_attr '(' ')' {\n" -#~ " _PyAST_MatchClass(cls, NULL, NULL, NULL, EXTRA) }\n" -#~ " | cls=name_or_attr '(' patterns=positional_patterns ','? ')' {\n" -#~ " _PyAST_MatchClass(cls, patterns, NULL, NULL, EXTRA) }\n" -#~ " | cls=name_or_attr '(' keywords=keyword_patterns ','? ')' {\n" -#~ " _PyAST_MatchClass(\n" -#~ " cls, NULL,\n" -#~ " CHECK(asdl_identifier_seq*, _PyPegen_map_names_to_ids(p,\n" -#~ " CHECK(asdl_expr_seq*, _PyPegen_get_pattern_keys(p, keywords)))),\n" -#~ " CHECK(asdl_pattern_seq*, _PyPegen_get_patterns(p, keywords)),\n" -#~ " EXTRA) }\n" -#~ " | cls=name_or_attr '(' patterns=positional_patterns ',' keywords=keyword_patterns ','? ')' {\n" -#~ " _PyAST_MatchClass(\n" -#~ " cls,\n" -#~ " patterns,\n" -#~ " CHECK(asdl_identifier_seq*, _PyPegen_map_names_to_ids(p,\n" -#~ " CHECK(asdl_expr_seq*, _PyPegen_get_pattern_keys(p, keywords)))),\n" -#~ " CHECK(asdl_pattern_seq*, _PyPegen_get_patterns(p, keywords)),\n" -#~ " EXTRA) }\n" -#~ " | invalid_class_pattern\n" -#~ "\n" -#~ "positional_patterns[asdl_pattern_seq*]:\n" -#~ " | args[asdl_pattern_seq*]=','.pattern+ { args }\n" -#~ "\n" -#~ "keyword_patterns[asdl_seq*]:\n" -#~ " | ','.keyword_pattern+\n" -#~ "\n" -#~ "keyword_pattern[KeyPatternPair*]:\n" -#~ " | arg=NAME '=' value=pattern { _PyPegen_key_pattern_pair(p, arg, value) }\n" -#~ "\n" -#~ "# Type statement\n" -#~ "# ---------------\n" -#~ "\n" -#~ "type_alias[stmt_ty]:\n" -#~ " | \"type\" n=NAME t=[type_params] '=' b=expression {\n" -#~ " CHECK_VERSION(stmt_ty, 12, \"Type statement is\",\n" -#~ " _PyAST_TypeAlias(CHECK(expr_ty, _PyPegen_set_expr_context(p, n, Store)), t, b, EXTRA)) }\n" -#~ "\n" -#~ "# Type parameter declaration\n" -#~ "# --------------------------\n" -#~ "\n" -#~ "type_params[asdl_type_param_seq*]:\n" -#~ " | invalid_type_params\n" -#~ " | '[' t=type_param_seq ']' {\n" -#~ " CHECK_VERSION(asdl_type_param_seq *, 12, \"Type parameter lists are\", t) }\n" -#~ "\n" -#~ "type_param_seq[asdl_type_param_seq*]: a[asdl_type_param_seq*]=','.type_param+ [','] { a }\n" -#~ "\n" -#~ "type_param[type_param_ty] (memo):\n" -#~ " | a=NAME b=[type_param_bound] c=[type_param_default] { _PyAST_TypeVar(a->v.Name.id, b, c, EXTRA) }\n" -#~ " | invalid_type_param\n" -#~ " | '*' a=NAME b=[type_param_starred_default] { _PyAST_TypeVarTuple(a->v.Name.id, b, EXTRA) }\n" -#~ " | '**' a=NAME b=[type_param_default] { _PyAST_ParamSpec(a->v.Name.id, b, EXTRA) }\n" -#~ "\n" -#~ "type_param_bound[expr_ty]: ':' e=expression { e }\n" -#~ "type_param_default[expr_ty]: '=' e=expression {\n" -#~ " CHECK_VERSION(expr_ty, 13, \"Type parameter defaults are\", e) }\n" -#~ "type_param_starred_default[expr_ty]: '=' e=star_expression {\n" -#~ " CHECK_VERSION(expr_ty, 13, \"Type parameter defaults are\", e) }\n" -#~ "\n" -#~ "# EXPRESSIONS\n" -#~ "# -----------\n" -#~ "\n" -#~ "expressions[expr_ty]:\n" -#~ " | a=expression b=(',' c=expression { c })+ [','] {\n" -#~ " _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)), Load, EXTRA) }\n" -#~ " | a=expression ',' { _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_singleton_seq(p, a)), Load, EXTRA) }\n" -#~ " | expression\n" -#~ "\n" -#~ "expression[expr_ty] (memo):\n" -#~ " | invalid_expression\n" -#~ " | invalid_legacy_expression\n" -#~ " | a=disjunction 'if' b=disjunction 'else' c=expression { _PyAST_IfExp(b, a, c, EXTRA) }\n" -#~ " | disjunction\n" -#~ " | lambdef\n" -#~ "\n" -#~ "yield_expr[expr_ty]:\n" -#~ " | 'yield' 'from' a=expression { _PyAST_YieldFrom(a, EXTRA) }\n" -#~ " | 'yield' a=[star_expressions] { _PyAST_Yield(a, EXTRA) }\n" -#~ "\n" -#~ "star_expressions[expr_ty]:\n" -#~ " | a=star_expression b=(',' c=star_expression { c })+ [','] {\n" -#~ " _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)), Load, EXTRA) }\n" -#~ " | a=star_expression ',' { _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_singleton_seq(p, a)), Load, EXTRA) }\n" -#~ " | star_expression\n" -#~ "\n" -#~ "star_expression[expr_ty] (memo):\n" -#~ " | '*' a=bitwise_or { _PyAST_Starred(a, Load, EXTRA) }\n" -#~ " | expression\n" -#~ "\n" -#~ "star_named_expressions[asdl_expr_seq*]: a[asdl_expr_seq*]=','.star_named_expression+ [','] { a }\n" -#~ "\n" -#~ "star_named_expression[expr_ty]:\n" -#~ " | '*' a=bitwise_or { _PyAST_Starred(a, Load, EXTRA) }\n" -#~ " | named_expression\n" -#~ "\n" -#~ "assignment_expression[expr_ty]:\n" -#~ " | a=NAME ':=' ~ b=expression {\n" -#~ " CHECK_VERSION(expr_ty, 8, \"Assignment expressions are\",\n" -#~ " _PyAST_NamedExpr(CHECK(expr_ty, _PyPegen_set_expr_context(p, a, Store)), b, EXTRA)) }\n" -#~ "\n" -#~ "named_expression[expr_ty]:\n" -#~ " | assignment_expression\n" -#~ " | invalid_named_expression\n" -#~ " | expression !':='\n" -#~ "\n" -#~ "disjunction[expr_ty] (memo):\n" -#~ " | a=conjunction b=('or' c=conjunction { c })+ { _PyAST_BoolOp(\n" -#~ " Or,\n" -#~ " CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)),\n" -#~ " EXTRA) }\n" -#~ " | conjunction\n" -#~ "\n" -#~ "conjunction[expr_ty] (memo):\n" -#~ " | a=inversion b=('and' c=inversion { c })+ { _PyAST_BoolOp(\n" -#~ " And,\n" -#~ " CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)),\n" -#~ " EXTRA) }\n" -#~ " | inversion\n" -#~ "\n" -#~ "inversion[expr_ty] (memo):\n" -#~ " | 'not' a=inversion { _PyAST_UnaryOp(Not, a, EXTRA) }\n" -#~ " | comparison\n" -#~ "\n" -#~ "# Comparison operators\n" -#~ "# --------------------\n" -#~ "\n" -#~ "comparison[expr_ty]:\n" -#~ " | a=bitwise_or b=compare_op_bitwise_or_pair+ {\n" -#~ " _PyAST_Compare(\n" -#~ " a,\n" -#~ " CHECK(asdl_int_seq*, _PyPegen_get_cmpops(p, b)),\n" -#~ " CHECK(asdl_expr_seq*, _PyPegen_get_exprs(p, b)),\n" -#~ " EXTRA) }\n" -#~ " | bitwise_or\n" -#~ "\n" -#~ "compare_op_bitwise_or_pair[CmpopExprPair*]:\n" -#~ " | eq_bitwise_or\n" -#~ " | noteq_bitwise_or\n" -#~ " | lte_bitwise_or\n" -#~ " | lt_bitwise_or\n" -#~ " | gte_bitwise_or\n" -#~ " | gt_bitwise_or\n" -#~ " | notin_bitwise_or\n" -#~ " | in_bitwise_or\n" -#~ " | isnot_bitwise_or\n" -#~ " | is_bitwise_or\n" -#~ "\n" -#~ "eq_bitwise_or[CmpopExprPair*]: '==' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, Eq, a) }\n" -#~ "noteq_bitwise_or[CmpopExprPair*]:\n" -#~ " | (tok='!=' { _PyPegen_check_barry_as_flufl(p, tok) ? NULL : tok}) a=bitwise_or {_PyPegen_cmpop_expr_pair(p, NotEq, a) }\n" -#~ "lte_bitwise_or[CmpopExprPair*]: '<=' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, LtE, a) }\n" -#~ "lt_bitwise_or[CmpopExprPair*]: '<' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, Lt, a) }\n" -#~ "gte_bitwise_or[CmpopExprPair*]: '>=' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, GtE, a) }\n" -#~ "gt_bitwise_or[CmpopExprPair*]: '>' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, Gt, a) }\n" -#~ "notin_bitwise_or[CmpopExprPair*]: 'not' 'in' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, NotIn, a) }\n" -#~ "in_bitwise_or[CmpopExprPair*]: 'in' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, In, a) }\n" -#~ "isnot_bitwise_or[CmpopExprPair*]: 'is' 'not' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, IsNot, a) }\n" -#~ "is_bitwise_or[CmpopExprPair*]: 'is' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, Is, a) }\n" -#~ "\n" -#~ "# Bitwise operators\n" -#~ "# -----------------\n" -#~ "\n" -#~ "bitwise_or[expr_ty]:\n" -#~ " | a=bitwise_or '|' b=bitwise_xor { _PyAST_BinOp(a, BitOr, b, EXTRA) }\n" -#~ " | bitwise_xor\n" -#~ "\n" -#~ "bitwise_xor[expr_ty]:\n" -#~ " | a=bitwise_xor '^' b=bitwise_and { _PyAST_BinOp(a, BitXor, b, EXTRA) }\n" -#~ " | bitwise_and\n" -#~ "\n" -#~ "bitwise_and[expr_ty]:\n" -#~ " | a=bitwise_and '&' b=shift_expr { _PyAST_BinOp(a, BitAnd, b, EXTRA) }\n" -#~ " | shift_expr\n" -#~ "\n" -#~ "shift_expr[expr_ty]:\n" -#~ " | a=shift_expr '<<' b=sum { _PyAST_BinOp(a, LShift, b, EXTRA) }\n" -#~ " | a=shift_expr '>>' b=sum { _PyAST_BinOp(a, RShift, b, EXTRA) }\n" -#~ " | invalid_arithmetic\n" -#~ " | sum\n" -#~ "\n" -#~ "# Arithmetic operators\n" -#~ "# --------------------\n" -#~ "\n" -#~ "sum[expr_ty]:\n" -#~ " | a=sum '+' b=term { _PyAST_BinOp(a, Add, b, EXTRA) }\n" -#~ " | a=sum '-' b=term { _PyAST_BinOp(a, Sub, b, EXTRA) }\n" -#~ " | term\n" -#~ "\n" -#~ "term[expr_ty]:\n" -#~ " | a=term '*' b=factor { _PyAST_BinOp(a, Mult, b, EXTRA) }\n" -#~ " | a=term '/' b=factor { _PyAST_BinOp(a, Div, b, EXTRA) }\n" -#~ " | a=term '//' b=factor { _PyAST_BinOp(a, FloorDiv, b, EXTRA) }\n" -#~ " | a=term '%' b=factor { _PyAST_BinOp(a, Mod, b, EXTRA) }\n" -#~ " | a=term '@' b=factor { CHECK_VERSION(expr_ty, 5, \"The '@' operator is\", _PyAST_BinOp(a, MatMult, b, EXTRA)) }\n" -#~ " | invalid_factor\n" -#~ " | factor\n" -#~ "\n" -#~ "factor[expr_ty] (memo):\n" -#~ " | '+' a=factor { _PyAST_UnaryOp(UAdd, a, EXTRA) }\n" -#~ " | '-' a=factor { _PyAST_UnaryOp(USub, a, EXTRA) }\n" -#~ " | '~' a=factor { _PyAST_UnaryOp(Invert, a, EXTRA) }\n" -#~ " | power\n" -#~ "\n" -#~ "power[expr_ty]:\n" -#~ " | a=await_primary '**' b=factor { _PyAST_BinOp(a, Pow, b, EXTRA) }\n" -#~ " | await_primary\n" -#~ "\n" -#~ "# Primary elements\n" -#~ "# ----------------\n" -#~ "\n" -#~ "# Primary elements are things like \"obj.something.something\", \"obj[something]\", \"obj(something)\", \"obj\" ...\n" -#~ "\n" -#~ "await_primary[expr_ty] (memo):\n" -#~ " | 'await' a=primary { CHECK_VERSION(expr_ty, 5, \"Await expressions are\", _PyAST_Await(a, EXTRA)) }\n" -#~ " | primary\n" -#~ "\n" -#~ "primary[expr_ty]:\n" -#~ " | a=primary '.' b=NAME { _PyAST_Attribute(a, b->v.Name.id, Load, EXTRA) }\n" -#~ " | a=primary b=genexp { _PyAST_Call(a, CHECK(asdl_expr_seq*, (asdl_expr_seq*)_PyPegen_singleton_seq(p, b)), NULL, EXTRA) }\n" -#~ " | a=primary '(' b=[arguments] ')' {\n" -#~ " _PyAST_Call(a,\n" -#~ " (b) ? ((expr_ty) b)->v.Call.args : NULL,\n" -#~ " (b) ? ((expr_ty) b)->v.Call.keywords : NULL,\n" -#~ " EXTRA) }\n" -#~ " | a=primary '[' b=slices ']' { _PyAST_Subscript(a, b, Load, EXTRA) }\n" -#~ " | atom\n" -#~ "\n" -#~ "slices[expr_ty]:\n" -#~ " | a=slice !',' { a }\n" -#~ " | a[asdl_expr_seq*]=','.(slice | starred_expression)+ [','] { _PyAST_Tuple(a, Load, EXTRA) }\n" -#~ "\n" -#~ "slice[expr_ty]:\n" -#~ " | a=[expression] ':' b=[expression] c=[':' d=[expression] { d }] { _PyAST_Slice(a, b, c, EXTRA) }\n" -#~ " | a=named_expression { a }\n" -#~ "\n" -#~ "atom[expr_ty]:\n" -#~ " | NAME\n" -#~ " | 'True' { _PyAST_Constant(Py_True, NULL, EXTRA) }\n" -#~ " | 'False' { _PyAST_Constant(Py_False, NULL, EXTRA) }\n" -#~ " | 'None' { _PyAST_Constant(Py_None, NULL, EXTRA) }\n" -#~ " | &(STRING|FSTRING_START|TSTRING_START) strings\n" -#~ " | NUMBER\n" -#~ " | &'(' (tuple | group | genexp)\n" -#~ " | &'[' (list | listcomp)\n" -#~ " | &'{' (dict | set | dictcomp | setcomp)\n" -#~ " | '...' { _PyAST_Constant(Py_Ellipsis, NULL, EXTRA) }\n" -#~ "\n" -#~ "group[expr_ty]:\n" -#~ " | '(' a=(yield_expr | named_expression) ')' { a }\n" -#~ " | invalid_group\n" -#~ "\n" -#~ "# Lambda functions\n" -#~ "# ----------------\n" -#~ "\n" -#~ "lambdef[expr_ty]:\n" -#~ " | 'lambda' a=[lambda_params] ':' b=expression {\n" -#~ " _PyAST_Lambda((a) ? a : CHECK(arguments_ty, _PyPegen_empty_arguments(p)), b, EXTRA) }\n" -#~ "\n" -#~ "lambda_params[arguments_ty]:\n" -#~ " | invalid_lambda_parameters\n" -#~ " | lambda_parameters\n" -#~ "\n" -#~ "# lambda_parameters etc. duplicates parameters but without annotations\n" -#~ "# or type comments, and if there's no comma after a parameter, we expect\n" -#~ "# a colon, not a close parenthesis. (For more, see parameters above.)\n" -#~ "#\n" -#~ "lambda_parameters[arguments_ty]:\n" -#~ " | a=lambda_slash_no_default b[asdl_arg_seq*]=lambda_param_no_default* c=lambda_param_with_default* d=[lambda_star_etc] {\n" -#~ " CHECK_VERSION(arguments_ty, 8, \"Positional-only parameters are\", _PyPegen_make_arguments(p, a, NULL, b, c, d)) }\n" -#~ " | a=lambda_slash_with_default b=lambda_param_with_default* c=[lambda_star_etc] {\n" -#~ " CHECK_VERSION(arguments_ty, 8, \"Positional-only parameters are\", _PyPegen_make_arguments(p, NULL, a, NULL, b, c)) }\n" -#~ " | a[asdl_arg_seq*]=lambda_param_no_default+ b=lambda_param_with_default* c=[lambda_star_etc] {\n" -#~ " _PyPegen_make_arguments(p, NULL, NULL, a, b, c) }\n" -#~ " | a=lambda_param_with_default+ b=[lambda_star_etc] { _PyPegen_make_arguments(p, NULL, NULL, NULL, a, b)}\n" -#~ " | a=lambda_star_etc { _PyPegen_make_arguments(p, NULL, NULL, NULL, NULL, a) }\n" -#~ "\n" -#~ "lambda_slash_no_default[asdl_arg_seq*]:\n" -#~ " | a[asdl_arg_seq*]=lambda_param_no_default+ '/' ',' { a }\n" -#~ " | a[asdl_arg_seq*]=lambda_param_no_default+ '/' &':' { a }\n" -#~ "\n" -#~ "lambda_slash_with_default[SlashWithDefault*]:\n" -#~ " | a=lambda_param_no_default* b=lambda_param_with_default+ '/' ',' { _PyPegen_slash_with_default(p, (asdl_arg_seq *)a, b) }\n" -#~ " | a=lambda_param_no_default* b=lambda_param_with_default+ '/' &':' { _PyPegen_slash_with_default(p, (asdl_arg_seq *)a, b) }\n" -#~ "\n" -#~ "lambda_star_etc[StarEtc*]:\n" -#~ " | invalid_lambda_star_etc\n" -#~ " | '*' a=lambda_param_no_default b=lambda_param_maybe_default* c=[lambda_kwds] {\n" -#~ " _PyPegen_star_etc(p, a, b, c) }\n" -#~ " | '*' ',' b=lambda_param_maybe_default+ c=[lambda_kwds] {\n" -#~ " _PyPegen_star_etc(p, NULL, b, c) }\n" -#~ " | a=lambda_kwds { _PyPegen_star_etc(p, NULL, NULL, a) }\n" -#~ "\n" -#~ "lambda_kwds[arg_ty]:\n" -#~ " | invalid_lambda_kwds\n" -#~ " | '**' a=lambda_param_no_default { a }\n" -#~ "\n" -#~ "lambda_param_no_default[arg_ty]:\n" -#~ " | a=lambda_param ',' { a }\n" -#~ " | a=lambda_param &':' { a }\n" -#~ "lambda_param_with_default[NameDefaultPair*]:\n" -#~ " | a=lambda_param c=default ',' { _PyPegen_name_default_pair(p, a, c, NULL) }\n" -#~ " | a=lambda_param c=default &':' { _PyPegen_name_default_pair(p, a, c, NULL) }\n" -#~ "lambda_param_maybe_default[NameDefaultPair*]:\n" -#~ " | a=lambda_param c=default? ',' { _PyPegen_name_default_pair(p, a, c, NULL) }\n" -#~ " | a=lambda_param c=default? &':' { _PyPegen_name_default_pair(p, a, c, NULL) }\n" -#~ "lambda_param[arg_ty]: a=NAME { _PyAST_arg(a->v.Name.id, NULL, NULL, EXTRA) }\n" -#~ "\n" -#~ "# LITERALS\n" -#~ "# ========\n" -#~ "\n" -#~ "fstring_middle[expr_ty]:\n" -#~ " | fstring_replacement_field\n" -#~ " | t=FSTRING_MIDDLE { _PyPegen_constant_from_token(p, t) }\n" -#~ "fstring_replacement_field[expr_ty]:\n" -#~ " | '{' a=annotated_rhs debug_expr='='? conversion=[fstring_conversion] format=[fstring_full_format_spec] rbrace='}' {\n" -#~ " _PyPegen_formatted_value(p, a, debug_expr, conversion, format, rbrace, EXTRA) }\n" -#~ " | invalid_fstring_replacement_field\n" -#~ "fstring_conversion[ResultTokenWithMetadata*]:\n" -#~ " | conv_token=\"!\" conv=NAME { _PyPegen_check_fstring_conversion(p, conv_token, conv) }\n" -#~ "fstring_full_format_spec[ResultTokenWithMetadata*]:\n" -#~ " | colon=':' spec=fstring_format_spec* { _PyPegen_setup_full_format_spec(p, colon, (asdl_expr_seq *) spec, EXTRA) }\n" -#~ "fstring_format_spec[expr_ty]:\n" -#~ " | t=FSTRING_MIDDLE { _PyPegen_decoded_constant_from_token(p, t) }\n" -#~ " | fstring_replacement_field\n" -#~ "fstring[expr_ty]:\n" -#~ " | a=FSTRING_START b=fstring_middle* c=FSTRING_END { _PyPegen_joined_str(p, a, (asdl_expr_seq*)b, c) }\n" -#~ "\n" -#~ "tstring_format_spec_replacement_field[expr_ty]:\n" -#~ " | '{' a=annotated_rhs debug_expr='='? conversion=[fstring_conversion] format=[tstring_full_format_spec] rbrace='}' {\n" -#~ " _PyPegen_formatted_value(p, a, debug_expr, conversion, format, rbrace, EXTRA) }\n" -#~ " | invalid_tstring_replacement_field\n" -#~ "tstring_format_spec[expr_ty]:\n" -#~ " | t=TSTRING_MIDDLE { _PyPegen_decoded_constant_from_token(p, t) }\n" -#~ " | tstring_format_spec_replacement_field\n" -#~ "tstring_full_format_spec[ResultTokenWithMetadata*]:\n" -#~ " | colon=':' spec=tstring_format_spec* { _PyPegen_setup_full_format_spec(p, colon, (asdl_expr_seq *) spec, EXTRA) }\n" -#~ "tstring_replacement_field[expr_ty]:\n" -#~ " | '{' a=annotated_rhs debug_expr='='? conversion=[fstring_conversion] format=[tstring_full_format_spec] rbrace='}' {\n" -#~ " _PyPegen_interpolation(p, a, debug_expr, conversion, format, rbrace, EXTRA) }\n" -#~ " | invalid_tstring_replacement_field\n" -#~ "tstring_middle[expr_ty]:\n" -#~ " | tstring_replacement_field\n" -#~ " | t=TSTRING_MIDDLE { _PyPegen_constant_from_token(p, t) }\n" -#~ "tstring[expr_ty] (memo):\n" -#~ " | a=TSTRING_START b=tstring_middle* c=TSTRING_END {\n" -#~ " CHECK_VERSION(\n" -#~ " expr_ty,\n" -#~ " 14,\n" -#~ " \"t-strings are\",\n" -#~ " _PyPegen_template_str(p, a, (asdl_expr_seq*)b, c)) }\n" -#~ "\n" -#~ "string[expr_ty]: s[Token*]=STRING { _PyPegen_constant_from_string(p, s) }\n" -#~ "strings[expr_ty] (memo):\n" -#~ " | invalid_string_tstring_concat\n" -#~ " | a[asdl_expr_seq*]=(fstring|string)+ { _PyPegen_concatenate_strings(p, a, EXTRA) }\n" -#~ " | a[asdl_expr_seq*]=tstring+ { _PyPegen_concatenate_tstrings(p, a, EXTRA) }\n" -#~ "\n" -#~ "list[expr_ty]:\n" -#~ " | '[' a=[star_named_expressions] ']' { _PyAST_List(a, Load, EXTRA) }\n" -#~ "\n" -#~ "tuple[expr_ty]:\n" -#~ " | '(' a=[y=star_named_expression ',' z=[star_named_expressions] { _PyPegen_seq_insert_in_front(p, y, z) } ] ')' {\n" -#~ " _PyAST_Tuple(a, Load, EXTRA) }\n" -#~ "\n" -#~ "set[expr_ty]: '{' a=star_named_expressions '}' { _PyAST_Set(a, EXTRA) }\n" -#~ "\n" -#~ "# Dicts\n" -#~ "# -----\n" -#~ "\n" -#~ "dict[expr_ty]:\n" -#~ " | '{' a=[double_starred_kvpairs] '}' {\n" -#~ " _PyAST_Dict(\n" -#~ " CHECK(asdl_expr_seq*, _PyPegen_get_keys(p, a)),\n" -#~ " CHECK(asdl_expr_seq*, _PyPegen_get_values(p, a)),\n" -#~ " EXTRA) }\n" -#~ " | '{' invalid_double_starred_kvpairs '}'\n" -#~ "\n" -#~ "double_starred_kvpairs[asdl_seq*]: a=','.double_starred_kvpair+ [','] { a }\n" -#~ "\n" -#~ "double_starred_kvpair[KeyValuePair*]:\n" -#~ " | '**' a=bitwise_or { _PyPegen_key_value_pair(p, NULL, a) }\n" -#~ " | kvpair\n" -#~ "\n" -#~ "kvpair[KeyValuePair*]: a=expression ':' b=expression { _PyPegen_key_value_pair(p, a, b) }\n" -#~ "\n" -#~ "# Comprehensions & Generators\n" -#~ "# ---------------------------\n" -#~ "\n" -#~ "for_if_clauses[asdl_comprehension_seq*]:\n" -#~ " | a[asdl_comprehension_seq*]=for_if_clause+ { a }\n" -#~ "\n" -#~ "for_if_clause[comprehension_ty]:\n" -#~ " | 'async' 'for' a=star_targets 'in' ~ b=disjunction c[asdl_expr_seq*]=('if' z=disjunction { z })* {\n" -#~ " CHECK_VERSION(comprehension_ty, 6, \"Async comprehensions are\", _PyAST_comprehension(a, b, c, 1, p->arena)) }\n" -#~ " | 'for' a=star_targets 'in' ~ b=disjunction c[asdl_expr_seq*]=('if' z=disjunction { z })* {\n" -#~ " _PyAST_comprehension(a, b, c, 0, p->arena) }\n" -#~ " | invalid_for_if_clause\n" -#~ " | invalid_for_target\n" -#~ "\n" -#~ "listcomp[expr_ty]:\n" -#~ " | '[' a=named_expression b=for_if_clauses ']' { _PyAST_ListComp(a, b, EXTRA) }\n" -#~ " | invalid_comprehension\n" -#~ "\n" -#~ "setcomp[expr_ty]:\n" -#~ " | '{' a=named_expression b=for_if_clauses '}' { _PyAST_SetComp(a, b, EXTRA) }\n" -#~ " | invalid_comprehension\n" -#~ "\n" -#~ "genexp[expr_ty]:\n" -#~ " | '(' a=( assignment_expression | expression !':=') b=for_if_clauses ')' { _PyAST_GeneratorExp(a, b, EXTRA) }\n" -#~ " | invalid_comprehension\n" -#~ "\n" -#~ "dictcomp[expr_ty]:\n" -#~ " | '{' a=kvpair b=for_if_clauses '}' { _PyAST_DictComp(a->key, a->value, b, EXTRA) }\n" -#~ " | invalid_dict_comprehension\n" -#~ "\n" -#~ "# FUNCTION CALL ARGUMENTS\n" -#~ "# =======================\n" -#~ "\n" -#~ "arguments[expr_ty] (memo):\n" -#~ " | a=args [','] &')' { a }\n" -#~ " | invalid_arguments\n" -#~ "\n" -#~ "args[expr_ty]:\n" -#~ " | a[asdl_expr_seq*]=','.(starred_expression | ( assignment_expression | expression !':=') !'=')+ b=[',' k=kwargs {k}] {\n" -#~ " _PyPegen_collect_call_seqs(p, a, b, EXTRA) }\n" -#~ " | a=kwargs { _PyAST_Call(_PyPegen_dummy_name(p),\n" -#~ " CHECK_NULL_ALLOWED(asdl_expr_seq*, _PyPegen_seq_extract_starred_exprs(p, a)),\n" -#~ " CHECK_NULL_ALLOWED(asdl_keyword_seq*, _PyPegen_seq_delete_starred_exprs(p, a)),\n" -#~ " EXTRA) }\n" -#~ "\n" -#~ "kwargs[asdl_seq*]:\n" -#~ " | a=','.kwarg_or_starred+ ',' b=','.kwarg_or_double_starred+ { _PyPegen_join_sequences(p, a, b) }\n" -#~ " | ','.kwarg_or_starred+\n" -#~ " | ','.kwarg_or_double_starred+\n" -#~ "\n" -#~ "starred_expression[expr_ty]:\n" -#~ " | invalid_starred_expression_unpacking\n" -#~ " | '*' a=expression { _PyAST_Starred(a, Load, EXTRA) }\n" -#~ " | invalid_starred_expression\n" -#~ "\n" -#~ "kwarg_or_starred[KeywordOrStarred*]:\n" -#~ " | invalid_kwarg\n" -#~ " | a=NAME '=' b=expression {\n" -#~ " _PyPegen_keyword_or_starred(p, CHECK(keyword_ty, _PyAST_keyword(a->v.Name.id, b, EXTRA)), 1) }\n" -#~ " | a=starred_expression { _PyPegen_keyword_or_starred(p, a, 0) }\n" -#~ "\n" -#~ "kwarg_or_double_starred[KeywordOrStarred*]:\n" -#~ " | invalid_kwarg\n" -#~ " | a=NAME '=' b=expression {\n" -#~ " _PyPegen_keyword_or_starred(p, CHECK(keyword_ty, _PyAST_keyword(a->v.Name.id, b, EXTRA)), 1) }\n" -#~ " | '**' a=expression { _PyPegen_keyword_or_starred(p, CHECK(keyword_ty, _PyAST_keyword(NULL, a, EXTRA)), 1) }\n" -#~ "\n" -#~ "# ASSIGNMENT TARGETS\n" -#~ "# ==================\n" -#~ "\n" -#~ "# Generic targets\n" -#~ "# ---------------\n" -#~ "\n" -#~ "# NOTE: star_targets may contain *bitwise_or, targets may not.\n" -#~ "star_targets[expr_ty]:\n" -#~ " | a=star_target !',' { a }\n" -#~ " | a=star_target b=(',' c=star_target { c })* [','] {\n" -#~ " _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)), Store, EXTRA) }\n" -#~ "\n" -#~ "star_targets_list_seq[asdl_expr_seq*]: a[asdl_expr_seq*]=','.star_target+ [','] { a }\n" -#~ "\n" -#~ "star_targets_tuple_seq[asdl_expr_seq*]:\n" -#~ " | a=star_target b=(',' c=star_target { c })+ [','] { (asdl_expr_seq*) _PyPegen_seq_insert_in_front(p, a, b) }\n" -#~ " | a=star_target ',' { (asdl_expr_seq*) _PyPegen_singleton_seq(p, a) }\n" -#~ "\n" -#~ "star_target[expr_ty] (memo):\n" -#~ " | '*' a=(!'*' star_target) {\n" -#~ " _PyAST_Starred(CHECK(expr_ty, _PyPegen_set_expr_context(p, a, Store)), Store, EXTRA) }\n" -#~ " | target_with_star_atom\n" -#~ "\n" -#~ "target_with_star_atom[expr_ty] (memo):\n" -#~ " | a=t_primary '.' b=NAME !t_lookahead { _PyAST_Attribute(a, b->v.Name.id, Store, EXTRA) }\n" -#~ " | a=t_primary '[' b=slices ']' !t_lookahead { _PyAST_Subscript(a, b, Store, EXTRA) }\n" -#~ " | star_atom\n" -#~ "\n" -#~ "star_atom[expr_ty]:\n" -#~ " | a=NAME { _PyPegen_set_expr_context(p, a, Store) }\n" -#~ " | '(' a=target_with_star_atom ')' { _PyPegen_set_expr_context(p, a, Store) }\n" -#~ " | '(' a=[star_targets_tuple_seq] ')' { _PyAST_Tuple(a, Store, EXTRA) }\n" -#~ " | '[' a=[star_targets_list_seq] ']' { _PyAST_List(a, Store, EXTRA) }\n" -#~ "\n" -#~ "single_target[expr_ty]:\n" -#~ " | single_subscript_attribute_target\n" -#~ " | a=NAME { _PyPegen_set_expr_context(p, a, Store) }\n" -#~ " | '(' a=single_target ')' { a }\n" -#~ "\n" -#~ "single_subscript_attribute_target[expr_ty]:\n" -#~ " | a=t_primary '.' b=NAME !t_lookahead { _PyAST_Attribute(a, b->v.Name.id, Store, EXTRA) }\n" -#~ " | a=t_primary '[' b=slices ']' !t_lookahead { _PyAST_Subscript(a, b, Store, EXTRA) }\n" -#~ "\n" -#~ "t_primary[expr_ty]:\n" -#~ " | a=t_primary '.' b=NAME &t_lookahead { _PyAST_Attribute(a, b->v.Name.id, Load, EXTRA) }\n" -#~ " | a=t_primary '[' b=slices ']' &t_lookahead { _PyAST_Subscript(a, b, Load, EXTRA) }\n" -#~ " | a=t_primary b=genexp &t_lookahead {\n" -#~ " _PyAST_Call(a, CHECK(asdl_expr_seq*, (asdl_expr_seq*)_PyPegen_singleton_seq(p, b)), NULL, EXTRA) }\n" -#~ " | a=t_primary '(' b=[arguments] ')' &t_lookahead {\n" -#~ " _PyAST_Call(a,\n" -#~ " (b) ? ((expr_ty) b)->v.Call.args : NULL,\n" -#~ " (b) ? ((expr_ty) b)->v.Call.keywords : NULL,\n" -#~ " EXTRA) }\n" -#~ " | a=atom &t_lookahead { a }\n" -#~ "\n" -#~ "t_lookahead: '(' | '[' | '.'\n" -#~ "\n" -#~ "# Targets for del statements\n" -#~ "# --------------------------\n" -#~ "\n" -#~ "del_targets[asdl_expr_seq*]: a[asdl_expr_seq*]=','.del_target+ [','] { a }\n" -#~ "\n" -#~ "del_target[expr_ty] (memo):\n" -#~ " | a=t_primary '.' b=NAME !t_lookahead { _PyAST_Attribute(a, b->v.Name.id, Del, EXTRA) }\n" -#~ " | a=t_primary '[' b=slices ']' !t_lookahead { _PyAST_Subscript(a, b, Del, EXTRA) }\n" -#~ " | del_t_atom\n" -#~ "\n" -#~ "del_t_atom[expr_ty]:\n" -#~ " | a=NAME { _PyPegen_set_expr_context(p, a, Del) }\n" -#~ " | '(' a=del_target ')' { _PyPegen_set_expr_context(p, a, Del) }\n" -#~ " | '(' a=[del_targets] ')' { _PyAST_Tuple(a, Del, EXTRA) }\n" -#~ " | '[' a=[del_targets] ']' { _PyAST_List(a, Del, EXTRA) }\n" -#~ "\n" -#~ "# TYPING ELEMENTS\n" -#~ "# ---------------\n" -#~ "\n" -#~ "# type_expressions allow */** but ignore them\n" -#~ "type_expressions[asdl_expr_seq*]:\n" -#~ " | a=','.expression+ ',' '*' b=expression ',' '**' c=expression {\n" -#~ " (asdl_expr_seq*)_PyPegen_seq_append_to_end(\n" -#~ " p,\n" -#~ " CHECK(asdl_seq*, _PyPegen_seq_append_to_end(p, a, b)),\n" -#~ " c) }\n" -#~ " | a=','.expression+ ',' '*' b=expression { (asdl_expr_seq*)_PyPegen_seq_append_to_end(p, a, b) }\n" -#~ " | a=','.expression+ ',' '**' b=expression { (asdl_expr_seq*)_PyPegen_seq_append_to_end(p, a, b) }\n" -#~ " | '*' a=expression ',' '**' b=expression {\n" -#~ " (asdl_expr_seq*)_PyPegen_seq_append_to_end(\n" -#~ " p,\n" -#~ " CHECK(asdl_seq*, _PyPegen_singleton_seq(p, a)),\n" -#~ " b) }\n" -#~ " | '*' a=expression { (asdl_expr_seq*)_PyPegen_singleton_seq(p, a) }\n" -#~ " | '**' a=expression { (asdl_expr_seq*)_PyPegen_singleton_seq(p, a) }\n" -#~ " | a[asdl_expr_seq*]=','.expression+ {a}\n" -#~ "\n" -#~ "func_type_comment[Token*]:\n" -#~ " | NEWLINE t=TYPE_COMMENT &(NEWLINE INDENT) { t } # Must be followed by indented block\n" -#~ " | invalid_double_type_comments\n" -#~ " | TYPE_COMMENT\n" -#~ "\n" -#~ "# ========================= END OF THE GRAMMAR ===========================\n" -#~ "\n" -#~ "\n" -#~ "\n" -#~ "# ========================= START OF INVALID RULES =======================\n" -#~ "\n" -#~ "# From here on, there are rules for invalid syntax with specialised error messages\n" -#~ "invalid_arguments:\n" -#~ " | ((','.(starred_expression | ( assignment_expression | expression !':=') !'=')+ ',' kwargs) | kwargs) a=',' ','.(starred_expression !'=')+ {\n" -#~ " RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"iterable argument unpacking follows keyword argument unpacking\") }\n" -#~ " | a=expression b=for_if_clauses ',' [args | expression for_if_clauses] {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, _PyPegen_get_last_comprehension_item(PyPegen_last_item(b, comprehension_ty)), \"Generator expression must be parenthesized\") }\n" -#~ " | a=NAME b='=' expression for_if_clauses {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"invalid syntax. Maybe you meant '==' or ':=' instead of '='?\")}\n" -#~ " | (args ',')? a=NAME b='=' &(',' | ')') {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"expected argument value expression\")}\n" -#~ " | a=args b=for_if_clauses { _PyPegen_nonparen_genexp_in_call(p, a, b) }\n" -#~ " | args ',' a=expression b=for_if_clauses {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, _PyPegen_get_last_comprehension_item(PyPegen_last_item(b, comprehension_ty)), \"Generator expression must be parenthesized\") }\n" -#~ " | a=args ',' args { _PyPegen_arguments_parsing_error(p, a) }\n" -#~ "invalid_kwarg:\n" -#~ " | a[Token*]=('True'|'False'|'None') b='=' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"cannot assign to %s\", PyBytes_AS_STRING(a->bytes)) }\n" -#~ " | a=NAME b='=' expression for_if_clauses {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"invalid syntax. Maybe you meant '==' or ':=' instead of '='?\")}\n" -#~ " | !(NAME '=') a=expression b='=' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(\n" -#~ " a, b, \"expression cannot contain assignment, perhaps you meant \\\"==\\\"?\") }\n" -#~ " | a='**' expression '=' b=expression {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"cannot assign to keyword argument unpacking\") }\n" -#~ "\n" -#~ "# IMPORTANT: Note that the \"_without_invalid\" suffix causes the rule to not call invalid rules under it\n" -#~ "expression_without_invalid[expr_ty]:\n" -#~ " | a=disjunction 'if' b=disjunction 'else' c=expression { _PyAST_IfExp(b, a, c, EXTRA) }\n" -#~ " | disjunction\n" -#~ " | lambdef\n" -#~ "invalid_legacy_expression:\n" -#~ " | a=NAME !'(' b=star_expressions {\n" -#~ " _PyPegen_check_legacy_stmt(p, a) ? RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b,\n" -#~ " \"Missing parentheses in call to '%U'. Did you mean %U(...)?\", a->v.Name.id, a->v.Name.id) : NULL}\n" -#~ "\n" -#~ "invalid_type_param:\n" -#~ " | '*' a=NAME colon=':' e=expression {\n" -#~ " RAISE_SYNTAX_ERROR_STARTING_FROM(colon, e->kind == Tuple_kind\n" -#~ " ? \"cannot use constraints with TypeVarTuple\"\n" -#~ " : \"cannot use bound with TypeVarTuple\")\n" -#~ " }\n" -#~ " | '**' a=NAME colon=':' e=expression {\n" -#~ " RAISE_SYNTAX_ERROR_STARTING_FROM(colon, e->kind == Tuple_kind\n" -#~ " ? \"cannot use constraints with ParamSpec\"\n" -#~ " : \"cannot use bound with ParamSpec\")\n" -#~ " }\n" -#~ "\n" -#~ "invalid_expression:\n" -#~ " | STRING a=(!STRING expression_without_invalid)+ STRING {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE( PyPegen_first_item(a, expr_ty), PyPegen_last_item(a, expr_ty),\n" -#~ " \"invalid syntax. Is this intended to be part of the string?\") }\n" -#~ " # !(NAME STRING) is not matched so we don't show this error with some invalid string prefixes like: kf\"dsfsdf\"\n" -#~ " # Soft keywords need to also be ignored because they can be parsed as NAME NAME\n" -#~ " | !(NAME STRING | SOFT_KEYWORD) a=disjunction b=expression_without_invalid {\n" -#~ " _PyPegen_check_legacy_stmt(p, a) ? NULL : p->tokens[p->mark-1]->level == 0 ? NULL :\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"invalid syntax. Perhaps you forgot a comma?\") }\n" -#~ " | a=disjunction 'if' b=disjunction !('else'|':') { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"expected 'else' after 'if' expression\") }\n" -#~ " | a=disjunction 'if' b=disjunction 'else' !expression {\n" -#~ " RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"expected expression after 'else', but statement is given\") }\n" -#~ " | a[stmt_ty]=(pass_stmt|break_stmt|continue_stmt) 'if' b=disjunction 'else' c=simple_stmt {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION (a, \"expected expression before 'if', but statement is given\") }\n" -#~ " | a='lambda' [lambda_params] b=':' &FSTRING_MIDDLE {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"f-string: lambda expressions are not allowed without parentheses\") }\n" -#~ " | a='lambda' [lambda_params] b=':' &TSTRING_MIDDLE {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"t-string: lambda expressions are not allowed without parentheses\") }\n" -#~ "\n" -#~ "invalid_named_expression(memo):\n" -#~ " | a=expression ':=' expression {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(\n" -#~ " a, \"cannot use assignment expressions with %s\", _PyPegen_get_expr_name(a)) }\n" -#~ " | a=NAME '=' b=bitwise_or !('='|':=') {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"invalid syntax. Maybe you meant '==' or ':=' instead of '='?\") }\n" -#~ " | !(list|tuple|genexp|'True'|'None'|'False') a=bitwise_or b='=' bitwise_or !('='|':=') {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"cannot assign to %s here. Maybe you meant '==' instead of '='?\",\n" -#~ " _PyPegen_get_expr_name(a)) }\n" -#~ "\n" -#~ "invalid_assignment:\n" -#~ " | a=invalid_ann_assign_target ':' expression {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(\n" -#~ " a,\n" -#~ " \"only single target (not %s) can be annotated\",\n" -#~ " _PyPegen_get_expr_name(a)\n" -#~ " )}\n" -#~ " | a=star_named_expression ',' star_named_expressions* ':' expression {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"only single target (not tuple) can be annotated\") }\n" -#~ " | a=expression ':' expression {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"illegal target for annotation\") }\n" -#~ " | (star_targets '=')* a=star_expressions '=' {\n" -#~ " RAISE_SYNTAX_ERROR_INVALID_TARGET(STAR_TARGETS, a) }\n" -#~ " | (star_targets '=')* a=yield_expr '=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"assignment to yield expression not possible\") }\n" -#~ " | a=star_expressions augassign annotated_rhs {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(\n" -#~ " a,\n" -#~ " \"'%s' is an illegal expression for augmented assignment\",\n" -#~ " _PyPegen_get_expr_name(a)\n" -#~ " )}\n" -#~ "invalid_ann_assign_target[expr_ty]:\n" -#~ " | list\n" -#~ " | tuple\n" -#~ " | '(' a=invalid_ann_assign_target ')' { a }\n" -#~ "invalid_del_stmt:\n" -#~ " | 'del' a=star_expressions {\n" -#~ " RAISE_SYNTAX_ERROR_INVALID_TARGET(DEL_TARGETS, a) }\n" -#~ "invalid_block:\n" -#~ " | NEWLINE !INDENT { RAISE_INDENTATION_ERROR(\"expected an indented block\") }\n" -#~ "invalid_comprehension:\n" -#~ " | ('[' | '(' | '{') a=starred_expression for_if_clauses {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"iterable unpacking cannot be used in comprehension\") }\n" -#~ " | ('[' | '{') a=star_named_expression ',' b=star_named_expressions for_if_clauses {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, PyPegen_last_item(b, expr_ty),\n" -#~ " \"did you forget parentheses around the comprehension target?\") }\n" -#~ " | ('[' | '{') a=star_named_expression b=',' for_if_clauses {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"did you forget parentheses around the comprehension target?\") }\n" -#~ "invalid_dict_comprehension:\n" -#~ " | '{' a='**' bitwise_or for_if_clauses '}' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"dict unpacking cannot be used in dict comprehension\") }\n" -#~ "invalid_parameters:\n" -#~ " | a=\"/\" ',' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"at least one argument must precede /\") }\n" -#~ " | (slash_no_default | slash_with_default) param_maybe_default* a='/' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"/ may appear only once\") }\n" -#~ " | slash_no_default? param_no_default* invalid_parameters_helper a=param_no_default {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"parameter without a default follows parameter with a default\") }\n" -#~ " | param_no_default* a='(' param_no_default+ ','? b=')' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"Function parameters cannot be parenthesized\") }\n" -#~ " | (slash_no_default | slash_with_default)? param_maybe_default* '*' (',' | param_no_default) param_maybe_default* a='/' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"/ must be ahead of *\") }\n" -#~ " | param_maybe_default+ '/' a='*' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"expected comma between / and *\") }\n" -#~ "invalid_default:\n" -#~ " | a='=' &(')'|',') { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"expected default value expression\") }\n" -#~ "invalid_star_etc:\n" -#~ " | a='*' (')' | ',' (')' | '**')) { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"named arguments must follow bare *\") }\n" -#~ " | '*' ',' TYPE_COMMENT { RAISE_SYNTAX_ERROR(\"bare * has associated type comment\") }\n" -#~ " | '*' param a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"var-positional argument cannot have default value\") }\n" -#~ " | '*' (param_no_default | ',') param_maybe_default* a='*' (param_no_default | ',') {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"* argument may appear only once\") }\n" -#~ "invalid_kwds:\n" -#~ " | '**' param a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"var-keyword argument cannot have default value\") }\n" -#~ " | '**' param ',' a=param { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"arguments cannot follow var-keyword argument\") }\n" -#~ " | '**' param ',' a[Token*]=('*'|'**'|'/') { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"arguments cannot follow var-keyword argument\") }\n" -#~ "invalid_parameters_helper: # This is only there to avoid type errors\n" -#~ " | a=slash_with_default { _PyPegen_singleton_seq(p, a) }\n" -#~ " | param_with_default+\n" -#~ "invalid_lambda_parameters:\n" -#~ " | a=\"/\" ',' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"at least one argument must precede /\") }\n" -#~ " | (lambda_slash_no_default | lambda_slash_with_default) lambda_param_maybe_default* a='/' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"/ may appear only once\") }\n" -#~ " | lambda_slash_no_default? lambda_param_no_default* invalid_lambda_parameters_helper a=lambda_param_no_default {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"parameter without a default follows parameter with a default\") }\n" -#~ " | lambda_param_no_default* a='(' ','.lambda_param+ ','? b=')' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"Lambda expression parameters cannot be parenthesized\") }\n" -#~ " | (lambda_slash_no_default | lambda_slash_with_default)? lambda_param_maybe_default* '*' (',' | lambda_param_no_default) lambda_param_maybe_default* a='/' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"/ must be ahead of *\") }\n" -#~ " | lambda_param_maybe_default+ '/' a='*' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"expected comma between / and *\") }\n" -#~ "invalid_lambda_parameters_helper:\n" -#~ " | a=lambda_slash_with_default { _PyPegen_singleton_seq(p, a) }\n" -#~ " | lambda_param_with_default+\n" -#~ "invalid_lambda_star_etc:\n" -#~ " | '*' (':' | ',' (':' | '**')) { RAISE_SYNTAX_ERROR(\"named arguments must follow bare *\") }\n" -#~ " | '*' lambda_param a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"var-positional argument cannot have default value\") }\n" -#~ " | '*' (lambda_param_no_default | ',') lambda_param_maybe_default* a='*' (lambda_param_no_default | ',') {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"* argument may appear only once\") }\n" -#~ "invalid_lambda_kwds:\n" -#~ " | '**' lambda_param a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"var-keyword argument cannot have default value\") }\n" -#~ " | '**' lambda_param ',' a=lambda_param { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"arguments cannot follow var-keyword argument\") }\n" -#~ " | '**' lambda_param ',' a[Token*]=('*'|'**'|'/') { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"arguments cannot follow var-keyword argument\") }\n" -#~ "invalid_double_type_comments:\n" -#~ " | TYPE_COMMENT NEWLINE TYPE_COMMENT NEWLINE INDENT {\n" -#~ " RAISE_SYNTAX_ERROR(\"Cannot have two type comments on def\") }\n" -#~ "invalid_with_item:\n" -#~ " | expression 'as' a=expression &(',' | ')' | ':') {\n" -#~ " RAISE_SYNTAX_ERROR_INVALID_TARGET(STAR_TARGETS, a) }\n" -#~ "\n" -#~ "invalid_for_if_clause:\n" -#~ " | 'async'? 'for' (bitwise_or (',' bitwise_or)* [',']) !'in' {\n" -#~ " RAISE_SYNTAX_ERROR(\"'in' expected after for-loop variables\") }\n" -#~ "\n" -#~ "invalid_for_target:\n" -#~ " | 'async'? 'for' a=star_expressions {\n" -#~ " RAISE_SYNTAX_ERROR_INVALID_TARGET(FOR_TARGETS, a) }\n" -#~ "\n" -#~ "invalid_group:\n" -#~ " | '(' a=starred_expression ')' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"cannot use starred expression here\") }\n" -#~ " | '(' a='**' expression ')' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"cannot use double starred expression here\") }\n" -#~ "invalid_import:\n" -#~ " | a='import' ','.dotted_name+ 'from' dotted_name {\n" -#~ " RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"Did you mean to use 'from ... import ...' instead?\") }\n" -#~ " | 'import' token=NEWLINE {\n" -#~ " RAISE_SYNTAX_ERROR_STARTING_FROM(token, \"Expected one or more names after 'import'\") }\n" -#~ "invalid_dotted_as_name:\n" -#~ " | dotted_name 'as' !(NAME (',' | ')' | ';' | NEWLINE)) a=expression {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a,\n" -#~ " \"cannot use %s as import target\", _PyPegen_get_expr_name(a)) }\n" -#~ "invalid_import_from_as_name:\n" -#~ " | NAME 'as' !(NAME (',' | ')' | ';' | NEWLINE)) a=expression {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a,\n" -#~ " \"cannot use %s as import target\", _PyPegen_get_expr_name(a)) }\n" -#~ "\n" -#~ "invalid_import_from_targets:\n" -#~ " | import_from_as_names ',' NEWLINE {\n" -#~ " RAISE_SYNTAX_ERROR(\"trailing comma not allowed without surrounding parentheses\") }\n" -#~ " | token=NEWLINE {\n" -#~ " RAISE_SYNTAX_ERROR_STARTING_FROM(token, \"Expected one or more names after 'import'\") }\n" -#~ "\n" -#~ "invalid_with_stmt:\n" -#~ " | ['async'] 'with' ','.(expression ['as' star_target])+ NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" -#~ " | ['async'] 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" -#~ "invalid_with_stmt_indent:\n" -#~ " | ['async'] a='with' ','.(expression ['as' star_target])+ ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after 'with' statement on line %d\", a->lineno) }\n" -#~ " | ['async'] a='with' '(' ','.(expressions ['as' star_target])+ ','? ')' ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after 'with' statement on line %d\", a->lineno) }\n" -#~ "\n" -#~ "invalid_try_stmt:\n" -#~ " | a='try' ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after 'try' statement on line %d\", a->lineno) }\n" -#~ " | 'try' ':' block !('except' | 'finally') { RAISE_SYNTAX_ERROR(\"expected 'except' or 'finally' block\") }\n" -#~ " | 'try' ':' block* except_block+ a='except' b='*' expression ['as' NAME] ':' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"cannot have both 'except' and 'except*' on the same 'try'\") }\n" -#~ " | 'try' ':' block* except_star_block+ a='except' [expression ['as' NAME]] ':' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"cannot have both 'except' and 'except*' on the same 'try'\") }\n" -#~ "invalid_except_stmt:\n" -#~ " | 'except' a=expression ',' expressions 'as' NAME ':' {\n" -#~ " RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"multiple exception types must be parenthesized when using 'as'\") }\n" -#~ " | a='except' expression ['as' NAME ] NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" -#~ " | a='except' NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\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" -#~ "invalid_except_star_stmt:\n" -#~ " | 'except' '*' a=expression ',' expressions 'as' NAME ':' {\n" -#~ " RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"multiple exception types must be parenthesized when using 'as'\") }\n" -#~ " | a='except' '*' expression ['as' NAME ] NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" -#~ " | a='except' '*' (NEWLINE | ':') { RAISE_SYNTAX_ERROR(\"expected one or more exception types\") }\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" -#~ "invalid_finally_stmt:\n" -#~ " | a='finally' ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after 'finally' statement on line %d\", a->lineno) }\n" -#~ "invalid_except_stmt_indent:\n" -#~ " | a='except' expression ['as' NAME ] ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after 'except' statement on line %d\", a->lineno) }\n" -#~ " | a='except' ':' NEWLINE !INDENT { RAISE_INDENTATION_ERROR(\"expected an indented block after 'except' statement on line %d\", a->lineno) }\n" -#~ "invalid_except_star_stmt_indent:\n" -#~ " | a='except' '*' expression ['as' NAME ] ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after 'except*' statement on line %d\", a->lineno) }\n" -#~ "invalid_match_stmt:\n" -#~ " | \"match\" subject_expr NEWLINE { CHECK_VERSION(void*, 10, \"Pattern matching is\", RAISE_SYNTAX_ERROR(\"expected ':'\") ) }\n" -#~ " | a=\"match\" subject=subject_expr ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after 'match' statement on line %d\", a->lineno) }\n" -#~ "invalid_case_block:\n" -#~ " | \"case\" patterns guard? NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" -#~ " | a=\"case\" patterns guard? ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after 'case' statement on line %d\", a->lineno) }\n" -#~ "invalid_as_pattern:\n" -#~ " | or_pattern 'as' a=\"_\" { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"cannot use '_' as a target\") }\n" -#~ " | or_pattern 'as' a=expression {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(\n" -#~ " a, \"cannot use %s as pattern target\", _PyPegen_get_expr_name(a)) }\n" -#~ "invalid_class_pattern:\n" -#~ " | name_or_attr '(' a=invalid_class_argument_pattern { RAISE_SYNTAX_ERROR_KNOWN_RANGE(\n" -#~ " PyPegen_first_item(a, pattern_ty),\n" -#~ " PyPegen_last_item(a, pattern_ty),\n" -#~ " \"positional patterns follow keyword patterns\") }\n" -#~ "invalid_class_argument_pattern[asdl_pattern_seq*]:\n" -#~ " | [positional_patterns ','] keyword_patterns ',' a=positional_patterns { a }\n" -#~ "invalid_if_stmt:\n" -#~ " | 'if' named_expression NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" -#~ " | a='if' a=named_expression ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after 'if' statement on line %d\", a->lineno) }\n" -#~ "invalid_elif_stmt:\n" -#~ " | 'elif' named_expression NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" -#~ " | a='elif' named_expression ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after 'elif' statement on line %d\", a->lineno) }\n" -#~ "invalid_else_stmt:\n" -#~ " | a='else' ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after 'else' statement on line %d\", a->lineno) }\n" -#~ " | 'else' ':' block 'elif' { RAISE_SYNTAX_ERROR(\"'elif' block follows an 'else' block\")}\n" -#~ "invalid_while_stmt:\n" -#~ " | 'while' named_expression NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" -#~ " | a='while' named_expression ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after 'while' statement on line %d\", a->lineno) }\n" -#~ "invalid_for_stmt:\n" -#~ " | ['async'] 'for' star_targets 'in' star_expressions NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" -#~ " | ['async'] a='for' star_targets 'in' star_expressions ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after 'for' statement on line %d\", a->lineno) }\n" -#~ "invalid_def_raw:\n" -#~ " | ['async'] a='def' NAME [type_params] '(' [params] ')' ['->' expression] ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after function definition on line %d\", a->lineno) }\n" -#~ " | ['async'] 'def' NAME [type_params] &&'(' [params] ')' ['->' expression] &&':' [func_type_comment] block\n" -#~ "invalid_class_def_raw:\n" -#~ " | 'class' NAME [type_params] ['(' [arguments] ')'] NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" -#~ " | a='class' NAME [type_params] ['(' [arguments] ')'] ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after class definition on line %d\", a->lineno) }\n" -#~ "\n" -#~ "invalid_double_starred_kvpairs:\n" -#~ " | ','.double_starred_kvpair+ ',' invalid_kvpair\n" -#~ " | expression ':' a='*' bitwise_or { RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"cannot use a starred expression in a dictionary value\") }\n" -#~ " | expression a=':' &('}'|',') { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"expression expected after dictionary key and ':'\") }\n" -#~ "invalid_kvpair:\n" -#~ " | a=expression !(':') {\n" -#~ " RAISE_ERROR_KNOWN_LOCATION(p, PyExc_SyntaxError, a->lineno, a->end_col_offset - 1, a->end_lineno, -1, \"':' expected after dictionary key\") }\n" -#~ " | expression ':' a='*' bitwise_or { RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"cannot use a starred expression in a dictionary value\") }\n" -#~ " | expression a=':' &('}'|',') {RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"expression expected after dictionary key and ':'\") }\n" -#~ "invalid_starred_expression_unpacking:\n" -#~ " | a='*' expression '=' b=expression { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"cannot assign to iterable argument unpacking\") }\n" -#~ "invalid_starred_expression:\n" -#~ " | '*' { RAISE_SYNTAX_ERROR(\"Invalid star expression\") }\n" -#~ "\n" -#~ "invalid_fstring_replacement_field:\n" -#~ " | '{' a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"f-string: valid expression required before '='\") }\n" -#~ " | '{' a='!' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"f-string: valid expression required before '!'\") }\n" -#~ " | '{' a=':' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"f-string: valid expression required before ':'\") }\n" -#~ " | '{' a='}' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"f-string: valid expression required before '}'\") }\n" -#~ " | '{' !annotated_rhs { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting a valid expression after '{'\") }\n" -#~ " | '{' annotated_rhs !('=' | '!' | ':' | '}') {\n" -#~ " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting '=', or '!', or ':', or '}'\") }\n" -#~ " | '{' annotated_rhs '=' !('!' | ':' | '}') {\n" -#~ " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting '!', or ':', or '}'\") }\n" -#~ " | '{' annotated_rhs '='? invalid_fstring_conversion_character\n" -#~ " | '{' annotated_rhs '='? ['!' NAME] !(':' | '}') {\n" -#~ " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting ':' or '}'\") }\n" -#~ " | '{' annotated_rhs '='? ['!' NAME] ':' fstring_format_spec* !'}' {\n" -#~ " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting '}', or format specs\") }\n" -#~ " | '{' annotated_rhs '='? ['!' NAME] !'}' {\n" -#~ " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting '}'\") }\n" -#~ "\n" -#~ "invalid_fstring_conversion_character:\n" -#~ " | '!' &(':' | '}') { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: missing conversion character\") }\n" -#~ " | '!' !NAME { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: invalid conversion character\") }\n" -#~ "\n" -#~ "invalid_tstring_replacement_field:\n" -#~ " | '{' a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"t-string: valid expression required before '='\") }\n" -#~ " | '{' a='!' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"t-string: valid expression required before '!'\") }\n" -#~ " | '{' a=':' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"t-string: valid expression required before ':'\") }\n" -#~ " | '{' a='}' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"t-string: valid expression required before '}'\") }\n" -#~ " | '{' !annotated_rhs { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting a valid expression after '{'\") }\n" -#~ " | '{' annotated_rhs !('=' | '!' | ':' | '}') {\n" -#~ " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting '=', or '!', or ':', or '}'\") }\n" -#~ " | '{' annotated_rhs '=' !('!' | ':' | '}') {\n" -#~ " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting '!', or ':', or '}'\") }\n" -#~ " | '{' annotated_rhs '='? invalid_tstring_conversion_character\n" -#~ " | '{' annotated_rhs '='? ['!' NAME] !(':' | '}') {\n" -#~ " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting ':' or '}'\") }\n" -#~ " | '{' annotated_rhs '='? ['!' NAME] ':' fstring_format_spec* !'}' {\n" -#~ " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting '}', or format specs\") }\n" -#~ " | '{' annotated_rhs '='? ['!' NAME] !'}' {\n" -#~ " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting '}'\") }\n" -#~ "\n" -#~ "invalid_tstring_conversion_character:\n" -#~ " | '!' &(':' | '}') { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: missing conversion character\") }\n" -#~ " | '!' !NAME { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: invalid conversion character\") }\n" -#~ "\n" -#~ "invalid_string_tstring_concat:\n" -#~ " | a=(fstring|string)+ b[expr_ty]=tstring {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(PyPegen_last_item(a, expr_ty), b, \"cannot mix t-string literals with string or bytes literals\") }\n" -#~ " | a=tstring+ b[expr_ty]=(fstring|string) {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(PyPegen_last_item(a, expr_ty), b, \"cannot mix t-string literals with string or bytes literals\") }\n" -#~ "\n" -#~ "invalid_arithmetic:\n" -#~ " | sum ('+'|'-'|'*'|'/'|'%'|'//'|'@') a='not' b=inversion { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"'not' after an operator must be parenthesized\") }\n" -#~ "invalid_factor:\n" -#~ " | ('+' | '-' | '~') a='not' b=factor { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"'not' after an operator must be parenthesized\") }\n" -#~ "\n" -#~ "invalid_type_params:\n" -#~ " | '[' token=']' {\n" -#~ " RAISE_SYNTAX_ERROR_STARTING_FROM(\n" -#~ " token,\n" -#~ " \"Type parameter list cannot be empty\")}\n" -#~ msgstr "" -#~ "# PEG grammar for Python\n" -#~ "\n" -#~ "@trailer '''\n" -#~ "void *\n" -#~ "_PyPegen_parse(Parser *p)\n" -#~ "{\n" -#~ " // Initialize keywords\n" -#~ " p->keywords = reserved_keywords;\n" -#~ " p->n_keyword_lists = n_keyword_lists;\n" -#~ " p->soft_keywords = soft_keywords;\n" -#~ "\n" -#~ " // Run parser\n" -#~ " void *result = NULL;\n" -#~ " if (p->start_rule == Py_file_input) {\n" -#~ " result = file_rule(p);\n" -#~ " } else if (p->start_rule == Py_single_input) {\n" -#~ " result = interactive_rule(p);\n" -#~ " } else if (p->start_rule == Py_eval_input) {\n" -#~ " result = eval_rule(p);\n" -#~ " } else if (p->start_rule == Py_func_type_input) {\n" -#~ " result = func_type_rule(p);\n" -#~ " }\n" -#~ "\n" -#~ " return result;\n" -#~ "}\n" -#~ "'''\n" -#~ "\n" -#~ "# ========================= START OF THE GRAMMAR =========================\n" -#~ "\n" -#~ "# General grammatical elements and rules:\n" -#~ "#\n" -#~ "# * Strings with double quotes (\") denote SOFT KEYWORDS\n" -#~ "# * Strings with single quotes (') denote KEYWORDS\n" -#~ "# * Upper case names (NAME) denote tokens in the Grammar/Tokens file\n" -#~ "# * Rule names starting with \"invalid_\" are used for specialized syntax errors\n" -#~ "# - These rules are NOT used in the first pass of the parser.\n" -#~ "# - Only if the first pass fails to parse, a second pass including the invalid\n" -#~ "# rules will be executed.\n" -#~ "# - If the parser fails in the second phase with a generic syntax error, the\n" -#~ "# location of the generic failure of the first pass will be used (this avoids\n" -#~ "# reporting incorrect locations due to the invalid rules).\n" -#~ "# - The order of the alternatives involving invalid rules matter\n" -#~ "# (like any rule in PEG).\n" -#~ "#\n" -#~ "# Grammar Syntax (see PEP 617 for more information):\n" -#~ "#\n" -#~ "# rule_name: expression\n" -#~ "# Optionally, a type can be included right after the rule name, which\n" -#~ "# specifies the return type of the C or Python function corresponding to the\n" -#~ "# rule:\n" -#~ "# rule_name[return_type]: expression\n" -#~ "# If the return type is omitted, then a void * is returned in C and an Any in\n" -#~ "# Python.\n" -#~ "# e1 e2\n" -#~ "# Match e1, then match e2.\n" -#~ "# e1 | e2\n" -#~ "# Match e1 or e2.\n" -#~ "# The first alternative can also appear on the line after the rule name for\n" -#~ "# formatting purposes. In that case, a | must be used before the first\n" -#~ "# alternative, like so:\n" -#~ "# rule_name[return_type]:\n" -#~ "# | first_alt\n" -#~ "# | second_alt\n" -#~ "# ( e )\n" -#~ "# Match e (allows also to use other operators in the group like '(e)*')\n" -#~ "# [ e ] or e?\n" -#~ "# Optionally match e.\n" -#~ "# e*\n" -#~ "# Match zero or more occurrences of e.\n" -#~ "# e+\n" -#~ "# Match one or more occurrences of e.\n" -#~ "# s.e+\n" -#~ "# Match one or more occurrences of e, separated by s. The generated parse tree\n" -#~ "# does not include the separator. This is otherwise identical to (e (s e)*).\n" -#~ "# &e\n" -#~ "# Succeed if e can be parsed, without consuming any input.\n" -#~ "# !e\n" -#~ "# Fail if e can be parsed, without consuming any input.\n" -#~ "# ~\n" -#~ "# Commit to the current alternative, even if it fails to parse.\n" -#~ "# &&e\n" -#~ "# Eager parse e. The parser will not backtrack and will immediately\n" -#~ "# fail with SyntaxError if e cannot be parsed.\n" -#~ "#\n" -#~ "\n" -#~ "# STARTING RULES\n" -#~ "# ==============\n" -#~ "\n" -#~ "file[mod_ty]: a=[statements] ENDMARKER { _PyPegen_make_module(p, a) }\n" -#~ "interactive[mod_ty]: a=statement_newline { _PyAST_Interactive(a, p->arena) }\n" -#~ "eval[mod_ty]: a=expressions NEWLINE* ENDMARKER { _PyAST_Expression(a, p->arena) }\n" -#~ "func_type[mod_ty]: '(' a=[type_expressions] ')' '->' b=expression NEWLINE* ENDMARKER { _PyAST_FunctionType(a, b, p->arena) }\n" -#~ "\n" -#~ "# GENERAL STATEMENTS\n" -#~ "# ==================\n" -#~ "\n" -#~ "statements[asdl_stmt_seq*]: a=statement+ { (asdl_stmt_seq*)_PyPegen_seq_flatten(p, a) }\n" -#~ "\n" -#~ "statement[asdl_stmt_seq*]:\n" -#~ " | a=compound_stmt { _PyPegen_register_stmts(p ,\n" -#~ " (asdl_stmt_seq*)_PyPegen_singleton_seq(p, a)\n" -#~ " ) }\n" -#~ " | a[asdl_stmt_seq*]=simple_stmts { a }\n" -#~ "\n" -#~ "single_compound_stmt[asdl_stmt_seq*]:\n" -#~ " | a=compound_stmt {\n" -#~ " _PyPegen_register_stmts(p, (asdl_stmt_seq*)_PyPegen_singleton_seq(p, a)) }\n" -#~ "\n" -#~ "statement_newline[asdl_stmt_seq*]:\n" -#~ " | a=single_compound_stmt NEWLINE { a }\n" -#~ " | simple_stmts\n" -#~ " | NEWLINE { (asdl_stmt_seq*)_PyPegen_singleton_seq(p, CHECK(stmt_ty, _PyAST_Pass(EXTRA))) }\n" -#~ " | ENDMARKER { _PyPegen_interactive_exit(p) }\n" -#~ "\n" -#~ "simple_stmts[asdl_stmt_seq*]:\n" -#~ " | a=simple_stmt !';' NEWLINE { (asdl_stmt_seq*)_PyPegen_singleton_seq(p, a) } # Not needed, there for speedup\n" -#~ " | a[asdl_stmt_seq*]=';'.simple_stmt+ [';'] NEWLINE { a }\n" -#~ "\n" -#~ "# NOTE: assignment MUST precede expression, else parsing a simple assignment\n" -#~ "# will throw a SyntaxError.\n" -#~ "simple_stmt[stmt_ty] (memo):\n" -#~ " | assignment\n" -#~ " | &\"type\" type_alias\n" -#~ " | e=star_expressions { _PyAST_Expr(e, EXTRA) }\n" -#~ " | &'return' return_stmt\n" -#~ " | &('import' | 'from') import_stmt\n" -#~ " | &'raise' raise_stmt\n" -#~ " | &'pass' pass_stmt\n" -#~ " | &'del' del_stmt\n" -#~ " | &'yield' yield_stmt\n" -#~ " | &'assert' assert_stmt\n" -#~ " | &'break' break_stmt\n" -#~ " | &'continue' continue_stmt\n" -#~ " | &'global' global_stmt\n" -#~ " | &'nonlocal' nonlocal_stmt\n" -#~ "\n" -#~ "compound_stmt[stmt_ty]:\n" -#~ " | &('def' | '@' | 'async') function_def\n" -#~ " | &'if' if_stmt\n" -#~ " | &('class' | '@') class_def\n" -#~ " | &('with' | 'async') with_stmt\n" -#~ " | &('for' | 'async') for_stmt\n" -#~ " | &'try' try_stmt\n" -#~ " | &'while' while_stmt\n" -#~ " | match_stmt\n" -#~ "\n" -#~ "# SIMPLE STATEMENTS\n" -#~ "# =================\n" -#~ "\n" -#~ "# NOTE: annotated_rhs may start with 'yield'; yield_expr must start with 'yield'\n" -#~ "assignment[stmt_ty]:\n" -#~ " | a=NAME ':' b=expression c=['=' d=annotated_rhs { d }] {\n" -#~ " CHECK_VERSION(\n" -#~ " stmt_ty,\n" -#~ " 6,\n" -#~ " \"Variable annotation syntax is\",\n" -#~ " _PyAST_AnnAssign(CHECK(expr_ty, _PyPegen_set_expr_context(p, a, Store)), b, c, 1, EXTRA)\n" -#~ " ) }\n" -#~ " | a=('(' b=single_target ')' { b }\n" -#~ " | single_subscript_attribute_target) ':' b=expression c=['=' d=annotated_rhs { d }] {\n" -#~ " CHECK_VERSION(stmt_ty, 6, \"Variable annotations syntax is\", _PyAST_AnnAssign(a, b, c, 0, EXTRA)) }\n" -#~ " | a[asdl_expr_seq*]=(z=star_targets '=' { z })+ b=annotated_rhs !'=' tc=[TYPE_COMMENT] {\n" -#~ " _PyAST_Assign(a, b, NEW_TYPE_COMMENT(p, tc), EXTRA) }\n" -#~ " | a=single_target b=augassign ~ c=annotated_rhs {\n" -#~ " _PyAST_AugAssign(a, b->kind, c, EXTRA) }\n" -#~ " | invalid_assignment\n" -#~ "\n" -#~ "annotated_rhs[expr_ty]: yield_expr | star_expressions\n" -#~ "\n" -#~ "augassign[AugOperator*]:\n" -#~ " | '+=' { _PyPegen_augoperator(p, Add) }\n" -#~ " | '-=' { _PyPegen_augoperator(p, Sub) }\n" -#~ " | '*=' { _PyPegen_augoperator(p, Mult) }\n" -#~ " | '@=' { CHECK_VERSION(AugOperator*, 5, \"The '@' operator is\", _PyPegen_augoperator(p, MatMult)) }\n" -#~ " | '/=' { _PyPegen_augoperator(p, Div) }\n" -#~ " | '%=' { _PyPegen_augoperator(p, Mod) }\n" -#~ " | '&=' { _PyPegen_augoperator(p, BitAnd) }\n" -#~ " | '|=' { _PyPegen_augoperator(p, BitOr) }\n" -#~ " | '^=' { _PyPegen_augoperator(p, BitXor) }\n" -#~ " | '<<=' { _PyPegen_augoperator(p, LShift) }\n" -#~ " | '>>=' { _PyPegen_augoperator(p, RShift) }\n" -#~ " | '**=' { _PyPegen_augoperator(p, Pow) }\n" -#~ " | '//=' { _PyPegen_augoperator(p, FloorDiv) }\n" -#~ "\n" -#~ "return_stmt[stmt_ty]:\n" -#~ " | 'return' a=[star_expressions] { _PyAST_Return(a, EXTRA) }\n" -#~ "\n" -#~ "raise_stmt[stmt_ty]:\n" -#~ " | 'raise' a=expression b=['from' z=expression { z }] { _PyAST_Raise(a, b, EXTRA) }\n" -#~ " | 'raise' { _PyAST_Raise(NULL, NULL, EXTRA) }\n" -#~ "\n" -#~ "pass_stmt[stmt_ty]:\n" -#~ " | 'pass' { _PyAST_Pass(EXTRA) }\n" -#~ "\n" -#~ "break_stmt[stmt_ty]:\n" -#~ " | 'break' { _PyAST_Break(EXTRA) }\n" -#~ "\n" -#~ "continue_stmt[stmt_ty]:\n" -#~ " | 'continue' { _PyAST_Continue(EXTRA) }\n" -#~ "\n" -#~ "global_stmt[stmt_ty]: 'global' a[asdl_expr_seq*]=','.NAME+ {\n" -#~ " _PyAST_Global(CHECK(asdl_identifier_seq*, _PyPegen_map_names_to_ids(p, a)), EXTRA) }\n" -#~ "\n" -#~ "nonlocal_stmt[stmt_ty]: 'nonlocal' a[asdl_expr_seq*]=','.NAME+ {\n" -#~ " _PyAST_Nonlocal(CHECK(asdl_identifier_seq*, _PyPegen_map_names_to_ids(p, a)), EXTRA) }\n" -#~ "\n" -#~ "del_stmt[stmt_ty]:\n" -#~ " | 'del' a=del_targets &(';' | NEWLINE) { _PyAST_Delete(a, EXTRA) }\n" -#~ " | invalid_del_stmt\n" -#~ "\n" -#~ "yield_stmt[stmt_ty]: y=yield_expr { _PyAST_Expr(y, EXTRA) }\n" -#~ "\n" -#~ "assert_stmt[stmt_ty]: 'assert' a=expression b=[',' z=expression { z }] { _PyAST_Assert(a, b, EXTRA) }\n" -#~ "\n" -#~ "import_stmt[stmt_ty]:\n" -#~ " | invalid_import\n" -#~ " | import_name\n" -#~ " | import_from\n" -#~ "\n" -#~ "# Import statements\n" -#~ "# -----------------\n" -#~ "\n" -#~ "import_name[stmt_ty]: 'import' a=dotted_as_names { _PyAST_Import(a, EXTRA) }\n" -#~ "# note below: the ('.' | '...') is necessary because '...' is tokenized as ELLIPSIS\n" -#~ "import_from[stmt_ty]:\n" -#~ " | 'from' a=('.' | '...')* b=dotted_name 'import' c=import_from_targets {\n" -#~ " _PyPegen_checked_future_import(p, b->v.Name.id, c, _PyPegen_seq_count_dots(a), EXTRA) }\n" -#~ " | 'from' a=('.' | '...')+ 'import' b=import_from_targets {\n" -#~ " _PyAST_ImportFrom(NULL, b, _PyPegen_seq_count_dots(a), EXTRA) }\n" -#~ "import_from_targets[asdl_alias_seq*]:\n" -#~ " | '(' a=import_from_as_names [','] ')' { a }\n" -#~ " | import_from_as_names !','\n" -#~ " | '*' { (asdl_alias_seq*)_PyPegen_singleton_seq(p, CHECK(alias_ty, _PyPegen_alias_for_star(p, EXTRA))) }\n" -#~ " | invalid_import_from_targets\n" -#~ "import_from_as_names[asdl_alias_seq*]:\n" -#~ " | a[asdl_alias_seq*]=','.import_from_as_name+ { a }\n" -#~ "import_from_as_name[alias_ty]:\n" -#~ " | invalid_import_from_as_name\n" -#~ " | a=NAME b=['as' z=NAME { z }] { _PyAST_alias(\n" -#~ " a->v.Name.id, (b) ? ((expr_ty) b)->v.Name.id : NULL, EXTRA) }\n" -#~ "\n" -#~ "dotted_as_names[asdl_alias_seq*]:\n" -#~ " | a[asdl_alias_seq*]=','.dotted_as_name+ { a }\n" -#~ "dotted_as_name[alias_ty]:\n" -#~ " | invalid_dotted_as_name\n" -#~ " | a=dotted_name b=['as' z=NAME { z }] { _PyAST_alias(\n" -#~ " a->v.Name.id, (b) ? ((expr_ty) b)->v.Name.id : NULL, EXTRA) }\n" -#~ "\n" -#~ "dotted_name[expr_ty]:\n" -#~ " | a=dotted_name '.' b=NAME { _PyPegen_join_names_with_dot(p, a, b) }\n" -#~ " | NAME\n" -#~ "\n" -#~ "# COMPOUND STATEMENTS\n" -#~ "# ===================\n" -#~ "\n" -#~ "# Common elements\n" -#~ "# ---------------\n" -#~ "\n" -#~ "block[asdl_stmt_seq*] (memo):\n" -#~ " | NEWLINE INDENT a=statements DEDENT { a }\n" -#~ " | simple_stmts\n" -#~ " | invalid_block\n" -#~ "\n" -#~ "decorators[asdl_expr_seq*]: a[asdl_expr_seq*]=('@' f=named_expression NEWLINE { f })+ { a }\n" -#~ "\n" -#~ "# Class definitions\n" -#~ "# -----------------\n" -#~ "\n" -#~ "class_def[stmt_ty]:\n" -#~ " | a=decorators b=class_def_raw { _PyPegen_class_def_decorators(p, a, b) }\n" -#~ " | class_def_raw\n" -#~ "\n" -#~ "class_def_raw[stmt_ty]:\n" -#~ " | invalid_class_def_raw\n" -#~ " | 'class' a=NAME t=[type_params] b=['(' z=[arguments] ')' { z }] ':' c=block {\n" -#~ " _PyAST_ClassDef(a->v.Name.id,\n" -#~ " (b) ? ((expr_ty) b)->v.Call.args : NULL,\n" -#~ " (b) ? ((expr_ty) b)->v.Call.keywords : NULL,\n" -#~ " c, NULL, t, EXTRA) }\n" -#~ "\n" -#~ "# Function definitions\n" -#~ "# --------------------\n" -#~ "\n" -#~ "function_def[stmt_ty]:\n" -#~ " | d=decorators f=function_def_raw { _PyPegen_function_def_decorators(p, d, f) }\n" -#~ " | function_def_raw\n" -#~ "\n" -#~ "function_def_raw[stmt_ty]:\n" -#~ " | invalid_def_raw\n" -#~ " | 'def' n=NAME t=[type_params] '(' params=[params] ')' a=['->' z=expression { z }] ':' tc=[func_type_comment] b=block {\n" -#~ " _PyAST_FunctionDef(n->v.Name.id,\n" -#~ " (params) ? params : CHECK(arguments_ty, _PyPegen_empty_arguments(p)),\n" -#~ " b, NULL, a, NEW_TYPE_COMMENT(p, tc), t, EXTRA) }\n" -#~ " | 'async' 'def' n=NAME t=[type_params] '(' params=[params] ')' a=['->' z=expression { z }] ':' tc=[func_type_comment] b=block {\n" -#~ " CHECK_VERSION(\n" -#~ " stmt_ty,\n" -#~ " 5,\n" -#~ " \"Async functions are\",\n" -#~ " _PyAST_AsyncFunctionDef(n->v.Name.id,\n" -#~ " (params) ? params : CHECK(arguments_ty, _PyPegen_empty_arguments(p)),\n" -#~ " b, NULL, a, NEW_TYPE_COMMENT(p, tc), t, EXTRA)\n" -#~ " ) }\n" -#~ "\n" -#~ "# Function parameters\n" -#~ "# -------------------\n" -#~ "\n" -#~ "params[arguments_ty]:\n" -#~ " | invalid_parameters\n" -#~ " | parameters\n" -#~ "\n" -#~ "parameters[arguments_ty]:\n" -#~ " | a=slash_no_default b[asdl_arg_seq*]=param_no_default* c=param_with_default* d=[star_etc] {\n" -#~ " CHECK_VERSION(arguments_ty, 8, \"Positional-only parameters are\", _PyPegen_make_arguments(p, a, NULL, b, c, d)) }\n" -#~ " | a=slash_with_default b=param_with_default* c=[star_etc] {\n" -#~ " CHECK_VERSION(arguments_ty, 8, \"Positional-only parameters are\", _PyPegen_make_arguments(p, NULL, a, NULL, b, c)) }\n" -#~ " | a[asdl_arg_seq*]=param_no_default+ b=param_with_default* c=[star_etc] {\n" -#~ " _PyPegen_make_arguments(p, NULL, NULL, a, b, c) }\n" -#~ " | a=param_with_default+ b=[star_etc] { _PyPegen_make_arguments(p, NULL, NULL, NULL, a, b)}\n" -#~ " | a=star_etc { _PyPegen_make_arguments(p, NULL, NULL, NULL, NULL, a) }\n" -#~ "\n" -#~ "# Some duplication here because we can't write (',' | &')'),\n" -#~ "# which is because we don't support empty alternatives (yet).\n" -#~ "\n" -#~ "slash_no_default[asdl_arg_seq*]:\n" -#~ " | a[asdl_arg_seq*]=param_no_default+ '/' ',' { a }\n" -#~ " | a[asdl_arg_seq*]=param_no_default+ '/' &')' { a }\n" -#~ "slash_with_default[SlashWithDefault*]:\n" -#~ " | a=param_no_default* b=param_with_default+ '/' ',' { _PyPegen_slash_with_default(p, (asdl_arg_seq *)a, b) }\n" -#~ " | a=param_no_default* b=param_with_default+ '/' &')' { _PyPegen_slash_with_default(p, (asdl_arg_seq *)a, b) }\n" -#~ "\n" -#~ "star_etc[StarEtc*]:\n" -#~ " | invalid_star_etc\n" -#~ " | '*' a=param_no_default b=param_maybe_default* c=[kwds] {\n" -#~ " _PyPegen_star_etc(p, a, b, c) }\n" -#~ " | '*' a=param_no_default_star_annotation b=param_maybe_default* c=[kwds] {\n" -#~ " _PyPegen_star_etc(p, a, b, c) }\n" -#~ " | '*' ',' b=param_maybe_default+ c=[kwds] {\n" -#~ " _PyPegen_star_etc(p, NULL, b, c) }\n" -#~ " | a=kwds { _PyPegen_star_etc(p, NULL, NULL, a) }\n" -#~ "\n" -#~ "kwds[arg_ty]:\n" -#~ " | invalid_kwds\n" -#~ " | '**' a=param_no_default { a }\n" -#~ "\n" -#~ "# One parameter. This *includes* a following comma and type comment.\n" -#~ "#\n" -#~ "# There are three styles:\n" -#~ "# - No default\n" -#~ "# - With default\n" -#~ "# - Maybe with default\n" -#~ "#\n" -#~ "# There are two alternative forms of each, to deal with type comments:\n" -#~ "# - Ends in a comma followed by an optional type comment\n" -#~ "# - No comma, optional type comment, must be followed by close paren\n" -#~ "# The latter form is for a final parameter without trailing comma.\n" -#~ "#\n" -#~ "\n" -#~ "param_no_default[arg_ty]:\n" -#~ " | a=param ',' tc=TYPE_COMMENT? { _PyPegen_add_type_comment_to_arg(p, a, tc) }\n" -#~ " | a=param tc=TYPE_COMMENT? &')' { _PyPegen_add_type_comment_to_arg(p, a, tc) }\n" -#~ "param_no_default_star_annotation[arg_ty]:\n" -#~ " | a=param_star_annotation ',' tc=TYPE_COMMENT? { _PyPegen_add_type_comment_to_arg(p, a, tc) }\n" -#~ " | a=param_star_annotation tc=TYPE_COMMENT? &')' { _PyPegen_add_type_comment_to_arg(p, a, tc) }\n" -#~ "param_with_default[NameDefaultPair*]:\n" -#~ " | a=param c=default ',' tc=TYPE_COMMENT? { _PyPegen_name_default_pair(p, a, c, tc) }\n" -#~ " | a=param c=default tc=TYPE_COMMENT? &')' { _PyPegen_name_default_pair(p, a, c, tc) }\n" -#~ "param_maybe_default[NameDefaultPair*]:\n" -#~ " | a=param c=default? ',' tc=TYPE_COMMENT? { _PyPegen_name_default_pair(p, a, c, tc) }\n" -#~ " | a=param c=default? tc=TYPE_COMMENT? &')' { _PyPegen_name_default_pair(p, a, c, tc) }\n" -#~ "param[arg_ty]: a=NAME b=annotation? { _PyAST_arg(a->v.Name.id, b, NULL, EXTRA) }\n" -#~ "param_star_annotation[arg_ty]: a=NAME b=star_annotation { _PyAST_arg(a->v.Name.id, b, NULL, EXTRA) }\n" -#~ "annotation[expr_ty]: ':' a=expression { a }\n" -#~ "star_annotation[expr_ty]: ':' a=star_expression { a }\n" -#~ "default[expr_ty]: '=' a=expression { a } | invalid_default\n" -#~ "\n" -#~ "# If statement\n" -#~ "# ------------\n" -#~ "\n" -#~ "if_stmt[stmt_ty]:\n" -#~ " | invalid_if_stmt\n" -#~ " | 'if' a=named_expression ':' b=block c=elif_stmt {\n" -#~ " _PyAST_If(a, b, CHECK(asdl_stmt_seq*, _PyPegen_singleton_seq(p, c)), EXTRA) }\n" -#~ " | 'if' a=named_expression ':' b=block c=[else_block] { _PyAST_If(a, b, c, EXTRA) }\n" -#~ "elif_stmt[stmt_ty]:\n" -#~ " | invalid_elif_stmt\n" -#~ " | 'elif' a=named_expression ':' b=block c=elif_stmt {\n" -#~ " _PyAST_If(a, b, CHECK(asdl_stmt_seq*, _PyPegen_singleton_seq(p, c)), EXTRA) }\n" -#~ " | 'elif' a=named_expression ':' b=block c=[else_block] { _PyAST_If(a, b, c, EXTRA) }\n" -#~ "else_block[asdl_stmt_seq*]:\n" -#~ " | invalid_else_stmt\n" -#~ " | 'else' &&':' b=block { b }\n" -#~ "\n" -#~ "# While statement\n" -#~ "# ---------------\n" -#~ "\n" -#~ "while_stmt[stmt_ty]:\n" -#~ " | invalid_while_stmt\n" -#~ " | 'while' a=named_expression ':' b=block c=[else_block] { _PyAST_While(a, b, c, EXTRA) }\n" -#~ "\n" -#~ "# For statement\n" -#~ "# -------------\n" -#~ "\n" -#~ "for_stmt[stmt_ty]:\n" -#~ " | invalid_for_stmt\n" -#~ " | 'for' t=star_targets 'in' ~ ex=star_expressions ':' tc=[TYPE_COMMENT] b=block el=[else_block] {\n" -#~ " _PyAST_For(t, ex, b, el, NEW_TYPE_COMMENT(p, tc), EXTRA) }\n" -#~ " | 'async' 'for' t=star_targets 'in' ~ ex=star_expressions ':' tc=[TYPE_COMMENT] b=block el=[else_block] {\n" -#~ " CHECK_VERSION(stmt_ty, 5, \"Async for loops are\", _PyAST_AsyncFor(t, ex, b, el, NEW_TYPE_COMMENT(p, tc), EXTRA)) }\n" -#~ " | invalid_for_target\n" -#~ "\n" -#~ "# With statement\n" -#~ "# --------------\n" -#~ "\n" -#~ "with_stmt[stmt_ty]:\n" -#~ " | invalid_with_stmt_indent\n" -#~ " | 'with' '(' a[asdl_withitem_seq*]=','.with_item+ ','? ')' ':' tc=[TYPE_COMMENT] b=block {\n" -#~ " _PyAST_With(a, b, NEW_TYPE_COMMENT(p, tc), EXTRA) }\n" -#~ " | 'with' a[asdl_withitem_seq*]=','.with_item+ ':' tc=[TYPE_COMMENT] b=block {\n" -#~ " _PyAST_With(a, b, NEW_TYPE_COMMENT(p, tc), EXTRA) }\n" -#~ " | 'async' 'with' '(' a[asdl_withitem_seq*]=','.with_item+ ','? ')' ':' b=block {\n" -#~ " CHECK_VERSION(stmt_ty, 5, \"Async with statements are\", _PyAST_AsyncWith(a, b, NULL, EXTRA)) }\n" -#~ " | 'async' 'with' a[asdl_withitem_seq*]=','.with_item+ ':' tc=[TYPE_COMMENT] b=block {\n" -#~ " CHECK_VERSION(stmt_ty, 5, \"Async with statements are\", _PyAST_AsyncWith(a, b, NEW_TYPE_COMMENT(p, tc), EXTRA)) }\n" -#~ " | invalid_with_stmt\n" -#~ "\n" -#~ "with_item[withitem_ty]:\n" -#~ " | e=expression 'as' t=star_target &(',' | ')' | ':') { _PyAST_withitem(e, t, p->arena) }\n" -#~ " | invalid_with_item\n" -#~ " | e=expression { _PyAST_withitem(e, NULL, p->arena) }\n" -#~ "\n" -#~ "# Try statement\n" -#~ "# -------------\n" -#~ "\n" -#~ "try_stmt[stmt_ty]:\n" -#~ " | invalid_try_stmt\n" -#~ " | 'try' &&':' b=block f=finally_block { _PyAST_Try(b, NULL, NULL, f, EXTRA) }\n" -#~ " | 'try' &&':' b=block ex[asdl_excepthandler_seq*]=except_block+ el=[else_block] f=[finally_block] { _PyAST_Try(b, ex, el, f, EXTRA) }\n" -#~ " | 'try' &&':' b=block ex[asdl_excepthandler_seq*]=except_star_block+ el=[else_block] f=[finally_block] {\n" -#~ " CHECK_VERSION(stmt_ty, 11, \"Exception groups are\",\n" -#~ " _PyAST_TryStar(b, ex, el, f, EXTRA)) }\n" -#~ "\n" -#~ "\n" -#~ "# Except statement\n" -#~ "# ----------------\n" -#~ "\n" -#~ "except_block[excepthandler_ty]:\n" -#~ " | invalid_except_stmt_indent\n" -#~ " | 'except' e=expression ':' b=block {\n" -#~ " _PyAST_ExceptHandler(e, NULL, b, EXTRA) }\n" -#~ " | 'except' e=expression 'as' t=NAME ':' b=block {\n" -#~ " _PyAST_ExceptHandler(e, ((expr_ty) t)->v.Name.id, b, EXTRA) }\n" -#~ " | 'except' e=expressions ':' b=block {\n" -#~ " CHECK_VERSION(\n" -#~ " excepthandler_ty,\n" -#~ " 14,\n" -#~ " \"except expressions without parentheses are\",\n" -#~ " _PyAST_ExceptHandler(e, NULL, b, EXTRA)) }\n" -#~ " | 'except' ':' b=block { _PyAST_ExceptHandler(NULL, NULL, b, EXTRA) }\n" -#~ " | invalid_except_stmt\n" -#~ "except_star_block[excepthandler_ty]:\n" -#~ " | invalid_except_star_stmt_indent\n" -#~ " | 'except' '*' e=expression ':' b=block {\n" -#~ " _PyAST_ExceptHandler(e, NULL, b, EXTRA) }\n" -#~ " | 'except' '*' e=expression 'as' t=NAME ':' b=block {\n" -#~ " _PyAST_ExceptHandler(e, ((expr_ty) t)->v.Name.id, b, EXTRA) }\n" -#~ " | 'except' '*' e=expressions ':' b=block {\n" -#~ " CHECK_VERSION(\n" -#~ " excepthandler_ty,\n" -#~ " 14,\n" -#~ " \"except expressions without parentheses are\",\n" -#~ " _PyAST_ExceptHandler(e, NULL, b, EXTRA)) }\n" -#~ " | invalid_except_star_stmt\n" -#~ "finally_block[asdl_stmt_seq*]:\n" -#~ " | invalid_finally_stmt\n" -#~ " | 'finally' &&':' a=block { a }\n" -#~ "\n" -#~ "# Match statement\n" -#~ "# ---------------\n" -#~ "\n" -#~ "match_stmt[stmt_ty]:\n" -#~ " | \"match\" subject=subject_expr ':' NEWLINE INDENT cases[asdl_match_case_seq*]=case_block+ DEDENT {\n" -#~ " CHECK_VERSION(stmt_ty, 10, \"Pattern matching is\", _PyAST_Match(subject, cases, EXTRA)) }\n" -#~ " | invalid_match_stmt\n" -#~ "\n" -#~ "subject_expr[expr_ty]:\n" -#~ " | value=star_named_expression ',' values=star_named_expressions? {\n" -#~ " _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, value, values)), Load, EXTRA) }\n" -#~ " | named_expression\n" -#~ "\n" -#~ "case_block[match_case_ty]:\n" -#~ " | invalid_case_block\n" -#~ " | \"case\" pattern=patterns guard=guard? ':' body=block {\n" -#~ " _PyAST_match_case(pattern, guard, body, p->arena) }\n" -#~ "\n" -#~ "guard[expr_ty]: 'if' guard=named_expression { guard }\n" -#~ "\n" -#~ "patterns[pattern_ty]:\n" -#~ " | patterns[asdl_pattern_seq*]=open_sequence_pattern {\n" -#~ " _PyAST_MatchSequence(patterns, EXTRA) }\n" -#~ " | pattern\n" -#~ "\n" -#~ "pattern[pattern_ty]:\n" -#~ " | as_pattern\n" -#~ " | or_pattern\n" -#~ "\n" -#~ "as_pattern[pattern_ty]:\n" -#~ " | pattern=or_pattern 'as' target=pattern_capture_target {\n" -#~ " _PyAST_MatchAs(pattern, target->v.Name.id, EXTRA) }\n" -#~ " | invalid_as_pattern\n" -#~ "\n" -#~ "or_pattern[pattern_ty]:\n" -#~ " | patterns[asdl_pattern_seq*]='|'.closed_pattern+ {\n" -#~ " asdl_seq_LEN(patterns) == 1 ? asdl_seq_GET(patterns, 0) : _PyAST_MatchOr(patterns, EXTRA) }\n" -#~ "\n" -#~ "closed_pattern[pattern_ty] (memo):\n" -#~ " | literal_pattern\n" -#~ " | capture_pattern\n" -#~ " | wildcard_pattern\n" -#~ " | value_pattern\n" -#~ " | group_pattern\n" -#~ " | sequence_pattern\n" -#~ " | mapping_pattern\n" -#~ " | class_pattern\n" -#~ "\n" -#~ "# Literal patterns are used for equality and identity constraints\n" -#~ "literal_pattern[pattern_ty]:\n" -#~ " | value=signed_number !('+' | '-') { _PyAST_MatchValue(value, EXTRA) }\n" -#~ " | value=complex_number { _PyAST_MatchValue(value, EXTRA) }\n" -#~ " | value=strings { _PyAST_MatchValue(value, EXTRA) }\n" -#~ " | 'None' { _PyAST_MatchSingleton(Py_None, EXTRA) }\n" -#~ " | 'True' { _PyAST_MatchSingleton(Py_True, EXTRA) }\n" -#~ " | 'False' { _PyAST_MatchSingleton(Py_False, EXTRA) }\n" -#~ "\n" -#~ "# Literal expressions are used to restrict permitted mapping pattern keys\n" -#~ "literal_expr[expr_ty]:\n" -#~ " | signed_number !('+' | '-')\n" -#~ " | complex_number\n" -#~ " | &(STRING|FSTRING_START|TSTRING_START) strings\n" -#~ " | 'None' { _PyAST_Constant(Py_None, NULL, EXTRA) }\n" -#~ " | 'True' { _PyAST_Constant(Py_True, NULL, EXTRA) }\n" -#~ " | 'False' { _PyAST_Constant(Py_False, NULL, EXTRA) }\n" -#~ "\n" -#~ "complex_number[expr_ty]:\n" -#~ " | real=signed_real_number '+' imag=imaginary_number {\n" -#~ " _PyAST_BinOp(real, Add, imag, EXTRA) }\n" -#~ " | real=signed_real_number '-' imag=imaginary_number {\n" -#~ " _PyAST_BinOp(real, Sub, imag, EXTRA) }\n" -#~ "\n" -#~ "signed_number[expr_ty]:\n" -#~ " | NUMBER\n" -#~ " | '-' number=NUMBER { _PyAST_UnaryOp(USub, number, EXTRA) }\n" -#~ "\n" -#~ "signed_real_number[expr_ty]:\n" -#~ " | real_number\n" -#~ " | '-' real=real_number { _PyAST_UnaryOp(USub, real, EXTRA) }\n" -#~ "\n" -#~ "real_number[expr_ty]:\n" -#~ " | real=NUMBER { _PyPegen_ensure_real(p, real) }\n" -#~ "\n" -#~ "imaginary_number[expr_ty]:\n" -#~ " | imag=NUMBER { _PyPegen_ensure_imaginary(p, imag) }\n" -#~ "\n" -#~ "capture_pattern[pattern_ty]:\n" -#~ " | target=pattern_capture_target { _PyAST_MatchAs(NULL, target->v.Name.id, EXTRA) }\n" -#~ "\n" -#~ "pattern_capture_target[expr_ty]:\n" -#~ " | !\"_\" name=NAME !('.' | '(' | '=') {\n" -#~ " _PyPegen_set_expr_context(p, name, Store) }\n" -#~ "\n" -#~ "wildcard_pattern[pattern_ty]:\n" -#~ " | \"_\" { _PyAST_MatchAs(NULL, NULL, EXTRA) }\n" -#~ "\n" -#~ "value_pattern[pattern_ty]:\n" -#~ " | attr=attr !('.' | '(' | '=') { _PyAST_MatchValue(attr, EXTRA) }\n" -#~ "\n" -#~ "attr[expr_ty]:\n" -#~ " | value=name_or_attr '.' attr=NAME {\n" -#~ " _PyAST_Attribute(value, attr->v.Name.id, Load, EXTRA) }\n" -#~ "\n" -#~ "name_or_attr[expr_ty]:\n" -#~ " | attr\n" -#~ " | NAME\n" -#~ "\n" -#~ "group_pattern[pattern_ty]:\n" -#~ " | '(' pattern=pattern ')' { pattern }\n" -#~ "\n" -#~ "sequence_pattern[pattern_ty]:\n" -#~ " | '[' patterns=maybe_sequence_pattern? ']' { _PyAST_MatchSequence(patterns, EXTRA) }\n" -#~ " | '(' patterns=open_sequence_pattern? ')' { _PyAST_MatchSequence(patterns, EXTRA) }\n" -#~ "\n" -#~ "open_sequence_pattern[asdl_seq*]:\n" -#~ " | pattern=maybe_star_pattern ',' patterns=maybe_sequence_pattern? {\n" -#~ " _PyPegen_seq_insert_in_front(p, pattern, patterns) }\n" -#~ "\n" -#~ "maybe_sequence_pattern[asdl_seq*]:\n" -#~ " | patterns=','.maybe_star_pattern+ ','? { patterns }\n" -#~ "\n" -#~ "maybe_star_pattern[pattern_ty]:\n" -#~ " | star_pattern\n" -#~ " | pattern\n" -#~ "\n" -#~ "star_pattern[pattern_ty] (memo):\n" -#~ " | '*' target=pattern_capture_target {\n" -#~ " _PyAST_MatchStar(target->v.Name.id, EXTRA) }\n" -#~ " | '*' wildcard_pattern {\n" -#~ " _PyAST_MatchStar(NULL, EXTRA) }\n" -#~ "\n" -#~ "mapping_pattern[pattern_ty]:\n" -#~ " | '{' '}' {\n" -#~ " _PyAST_MatchMapping(NULL, NULL, NULL, EXTRA) }\n" -#~ " | '{' rest=double_star_pattern ','? '}' {\n" -#~ " _PyAST_MatchMapping(NULL, NULL, rest->v.Name.id, EXTRA) }\n" -#~ " | '{' items=items_pattern ',' rest=double_star_pattern ','? '}' {\n" -#~ " _PyAST_MatchMapping(\n" -#~ " CHECK(asdl_expr_seq*, _PyPegen_get_pattern_keys(p, items)),\n" -#~ " CHECK(asdl_pattern_seq*, _PyPegen_get_patterns(p, items)),\n" -#~ " rest->v.Name.id,\n" -#~ " EXTRA) }\n" -#~ " | '{' items=items_pattern ','? '}' {\n" -#~ " _PyAST_MatchMapping(\n" -#~ " CHECK(asdl_expr_seq*, _PyPegen_get_pattern_keys(p, items)),\n" -#~ " CHECK(asdl_pattern_seq*, _PyPegen_get_patterns(p, items)),\n" -#~ " NULL,\n" -#~ " EXTRA) }\n" -#~ "\n" -#~ "items_pattern[asdl_seq*]:\n" -#~ " | ','.key_value_pattern+\n" -#~ "\n" -#~ "key_value_pattern[KeyPatternPair*]:\n" -#~ " | key=(literal_expr | attr) ':' pattern=pattern {\n" -#~ " _PyPegen_key_pattern_pair(p, key, pattern) }\n" -#~ "\n" -#~ "double_star_pattern[expr_ty]:\n" -#~ " | '**' target=pattern_capture_target { target }\n" -#~ "\n" -#~ "class_pattern[pattern_ty]:\n" -#~ " | cls=name_or_attr '(' ')' {\n" -#~ " _PyAST_MatchClass(cls, NULL, NULL, NULL, EXTRA) }\n" -#~ " | cls=name_or_attr '(' patterns=positional_patterns ','? ')' {\n" -#~ " _PyAST_MatchClass(cls, patterns, NULL, NULL, EXTRA) }\n" -#~ " | cls=name_or_attr '(' keywords=keyword_patterns ','? ')' {\n" -#~ " _PyAST_MatchClass(\n" -#~ " cls, NULL,\n" -#~ " CHECK(asdl_identifier_seq*, _PyPegen_map_names_to_ids(p,\n" -#~ " CHECK(asdl_expr_seq*, _PyPegen_get_pattern_keys(p, keywords)))),\n" -#~ " CHECK(asdl_pattern_seq*, _PyPegen_get_patterns(p, keywords)),\n" -#~ " EXTRA) }\n" -#~ " | cls=name_or_attr '(' patterns=positional_patterns ',' keywords=keyword_patterns ','? ')' {\n" -#~ " _PyAST_MatchClass(\n" -#~ " cls,\n" -#~ " patterns,\n" -#~ " CHECK(asdl_identifier_seq*, _PyPegen_map_names_to_ids(p,\n" -#~ " CHECK(asdl_expr_seq*, _PyPegen_get_pattern_keys(p, keywords)))),\n" -#~ " CHECK(asdl_pattern_seq*, _PyPegen_get_patterns(p, keywords)),\n" -#~ " EXTRA) }\n" -#~ " | invalid_class_pattern\n" -#~ "\n" -#~ "positional_patterns[asdl_pattern_seq*]:\n" -#~ " | args[asdl_pattern_seq*]=','.pattern+ { args }\n" -#~ "\n" -#~ "keyword_patterns[asdl_seq*]:\n" -#~ " | ','.keyword_pattern+\n" -#~ "\n" -#~ "keyword_pattern[KeyPatternPair*]:\n" -#~ " | arg=NAME '=' value=pattern { _PyPegen_key_pattern_pair(p, arg, value) }\n" -#~ "\n" -#~ "# Type statement\n" -#~ "# ---------------\n" -#~ "\n" -#~ "type_alias[stmt_ty]:\n" -#~ " | \"type\" n=NAME t=[type_params] '=' b=expression {\n" -#~ " CHECK_VERSION(stmt_ty, 12, \"Type statement is\",\n" -#~ " _PyAST_TypeAlias(CHECK(expr_ty, _PyPegen_set_expr_context(p, n, Store)), t, b, EXTRA)) }\n" -#~ "\n" -#~ "# Type parameter declaration\n" -#~ "# --------------------------\n" -#~ "\n" -#~ "type_params[asdl_type_param_seq*]:\n" -#~ " | invalid_type_params\n" -#~ " | '[' t=type_param_seq ']' {\n" -#~ " CHECK_VERSION(asdl_type_param_seq *, 12, \"Type parameter lists are\", t) }\n" -#~ "\n" -#~ "type_param_seq[asdl_type_param_seq*]: a[asdl_type_param_seq*]=','.type_param+ [','] { a }\n" -#~ "\n" -#~ "type_param[type_param_ty] (memo):\n" -#~ " | a=NAME b=[type_param_bound] c=[type_param_default] { _PyAST_TypeVar(a->v.Name.id, b, c, EXTRA) }\n" -#~ " | invalid_type_param\n" -#~ " | '*' a=NAME b=[type_param_starred_default] { _PyAST_TypeVarTuple(a->v.Name.id, b, EXTRA) }\n" -#~ " | '**' a=NAME b=[type_param_default] { _PyAST_ParamSpec(a->v.Name.id, b, EXTRA) }\n" -#~ "\n" -#~ "type_param_bound[expr_ty]: ':' e=expression { e }\n" -#~ "type_param_default[expr_ty]: '=' e=expression {\n" -#~ " CHECK_VERSION(expr_ty, 13, \"Type parameter defaults are\", e) }\n" -#~ "type_param_starred_default[expr_ty]: '=' e=star_expression {\n" -#~ " CHECK_VERSION(expr_ty, 13, \"Type parameter defaults are\", e) }\n" -#~ "\n" -#~ "# EXPRESSIONS\n" -#~ "# -----------\n" -#~ "\n" -#~ "expressions[expr_ty]:\n" -#~ " | a=expression b=(',' c=expression { c })+ [','] {\n" -#~ " _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)), Load, EXTRA) }\n" -#~ " | a=expression ',' { _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_singleton_seq(p, a)), Load, EXTRA) }\n" -#~ " | expression\n" -#~ "\n" -#~ "expression[expr_ty] (memo):\n" -#~ " | invalid_expression\n" -#~ " | invalid_legacy_expression\n" -#~ " | a=disjunction 'if' b=disjunction 'else' c=expression { _PyAST_IfExp(b, a, c, EXTRA) }\n" -#~ " | disjunction\n" -#~ " | lambdef\n" -#~ "\n" -#~ "yield_expr[expr_ty]:\n" -#~ " | 'yield' 'from' a=expression { _PyAST_YieldFrom(a, EXTRA) }\n" -#~ " | 'yield' a=[star_expressions] { _PyAST_Yield(a, EXTRA) }\n" -#~ "\n" -#~ "star_expressions[expr_ty]:\n" -#~ " | a=star_expression b=(',' c=star_expression { c })+ [','] {\n" -#~ " _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)), Load, EXTRA) }\n" -#~ " | a=star_expression ',' { _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_singleton_seq(p, a)), Load, EXTRA) }\n" -#~ " | star_expression\n" -#~ "\n" -#~ "star_expression[expr_ty] (memo):\n" -#~ " | '*' a=bitwise_or { _PyAST_Starred(a, Load, EXTRA) }\n" -#~ " | expression\n" -#~ "\n" -#~ "star_named_expressions[asdl_expr_seq*]: a[asdl_expr_seq*]=','.star_named_expression+ [','] { a }\n" -#~ "\n" -#~ "star_named_expression[expr_ty]:\n" -#~ " | '*' a=bitwise_or { _PyAST_Starred(a, Load, EXTRA) }\n" -#~ " | named_expression\n" -#~ "\n" -#~ "assignment_expression[expr_ty]:\n" -#~ " | a=NAME ':=' ~ b=expression {\n" -#~ " CHECK_VERSION(expr_ty, 8, \"Assignment expressions are\",\n" -#~ " _PyAST_NamedExpr(CHECK(expr_ty, _PyPegen_set_expr_context(p, a, Store)), b, EXTRA)) }\n" -#~ "\n" -#~ "named_expression[expr_ty]:\n" -#~ " | assignment_expression\n" -#~ " | invalid_named_expression\n" -#~ " | expression !':='\n" -#~ "\n" -#~ "disjunction[expr_ty] (memo):\n" -#~ " | a=conjunction b=('or' c=conjunction { c })+ { _PyAST_BoolOp(\n" -#~ " Or,\n" -#~ " CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)),\n" -#~ " EXTRA) }\n" -#~ " | conjunction\n" -#~ "\n" -#~ "conjunction[expr_ty] (memo):\n" -#~ " | a=inversion b=('and' c=inversion { c })+ { _PyAST_BoolOp(\n" -#~ " And,\n" -#~ " CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)),\n" -#~ " EXTRA) }\n" -#~ " | inversion\n" -#~ "\n" -#~ "inversion[expr_ty] (memo):\n" -#~ " | 'not' a=inversion { _PyAST_UnaryOp(Not, a, EXTRA) }\n" -#~ " | comparison\n" -#~ "\n" -#~ "# Comparison operators\n" -#~ "# --------------------\n" -#~ "\n" -#~ "comparison[expr_ty]:\n" -#~ " | a=bitwise_or b=compare_op_bitwise_or_pair+ {\n" -#~ " _PyAST_Compare(\n" -#~ " a,\n" -#~ " CHECK(asdl_int_seq*, _PyPegen_get_cmpops(p, b)),\n" -#~ " CHECK(asdl_expr_seq*, _PyPegen_get_exprs(p, b)),\n" -#~ " EXTRA) }\n" -#~ " | bitwise_or\n" -#~ "\n" -#~ "compare_op_bitwise_or_pair[CmpopExprPair*]:\n" -#~ " | eq_bitwise_or\n" -#~ " | noteq_bitwise_or\n" -#~ " | lte_bitwise_or\n" -#~ " | lt_bitwise_or\n" -#~ " | gte_bitwise_or\n" -#~ " | gt_bitwise_or\n" -#~ " | notin_bitwise_or\n" -#~ " | in_bitwise_or\n" -#~ " | isnot_bitwise_or\n" -#~ " | is_bitwise_or\n" -#~ "\n" -#~ "eq_bitwise_or[CmpopExprPair*]: '==' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, Eq, a) }\n" -#~ "noteq_bitwise_or[CmpopExprPair*]:\n" -#~ " | (tok='!=' { _PyPegen_check_barry_as_flufl(p, tok) ? NULL : tok}) a=bitwise_or {_PyPegen_cmpop_expr_pair(p, NotEq, a) }\n" -#~ "lte_bitwise_or[CmpopExprPair*]: '<=' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, LtE, a) }\n" -#~ "lt_bitwise_or[CmpopExprPair*]: '<' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, Lt, a) }\n" -#~ "gte_bitwise_or[CmpopExprPair*]: '>=' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, GtE, a) }\n" -#~ "gt_bitwise_or[CmpopExprPair*]: '>' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, Gt, a) }\n" -#~ "notin_bitwise_or[CmpopExprPair*]: 'not' 'in' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, NotIn, a) }\n" -#~ "in_bitwise_or[CmpopExprPair*]: 'in' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, In, a) }\n" -#~ "isnot_bitwise_or[CmpopExprPair*]: 'is' 'not' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, IsNot, a) }\n" -#~ "is_bitwise_or[CmpopExprPair*]: 'is' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, Is, a) }\n" -#~ "\n" -#~ "# Bitwise operators\n" -#~ "# -----------------\n" -#~ "\n" -#~ "bitwise_or[expr_ty]:\n" -#~ " | a=bitwise_or '|' b=bitwise_xor { _PyAST_BinOp(a, BitOr, b, EXTRA) }\n" -#~ " | bitwise_xor\n" -#~ "\n" -#~ "bitwise_xor[expr_ty]:\n" -#~ " | a=bitwise_xor '^' b=bitwise_and { _PyAST_BinOp(a, BitXor, b, EXTRA) }\n" -#~ " | bitwise_and\n" -#~ "\n" -#~ "bitwise_and[expr_ty]:\n" -#~ " | a=bitwise_and '&' b=shift_expr { _PyAST_BinOp(a, BitAnd, b, EXTRA) }\n" -#~ " | shift_expr\n" -#~ "\n" -#~ "shift_expr[expr_ty]:\n" -#~ " | a=shift_expr '<<' b=sum { _PyAST_BinOp(a, LShift, b, EXTRA) }\n" -#~ " | a=shift_expr '>>' b=sum { _PyAST_BinOp(a, RShift, b, EXTRA) }\n" -#~ " | invalid_arithmetic\n" -#~ " | sum\n" -#~ "\n" -#~ "# Arithmetic operators\n" -#~ "# --------------------\n" -#~ "\n" -#~ "sum[expr_ty]:\n" -#~ " | a=sum '+' b=term { _PyAST_BinOp(a, Add, b, EXTRA) }\n" -#~ " | a=sum '-' b=term { _PyAST_BinOp(a, Sub, b, EXTRA) }\n" -#~ " | term\n" -#~ "\n" -#~ "term[expr_ty]:\n" -#~ " | a=term '*' b=factor { _PyAST_BinOp(a, Mult, b, EXTRA) }\n" -#~ " | a=term '/' b=factor { _PyAST_BinOp(a, Div, b, EXTRA) }\n" -#~ " | a=term '//' b=factor { _PyAST_BinOp(a, FloorDiv, b, EXTRA) }\n" -#~ " | a=term '%' b=factor { _PyAST_BinOp(a, Mod, b, EXTRA) }\n" -#~ " | a=term '@' b=factor { CHECK_VERSION(expr_ty, 5, \"The '@' operator is\", _PyAST_BinOp(a, MatMult, b, EXTRA)) }\n" -#~ " | invalid_factor\n" -#~ " | factor\n" -#~ "\n" -#~ "factor[expr_ty] (memo):\n" -#~ " | '+' a=factor { _PyAST_UnaryOp(UAdd, a, EXTRA) }\n" -#~ " | '-' a=factor { _PyAST_UnaryOp(USub, a, EXTRA) }\n" -#~ " | '~' a=factor { _PyAST_UnaryOp(Invert, a, EXTRA) }\n" -#~ " | power\n" -#~ "\n" -#~ "power[expr_ty]:\n" -#~ " | a=await_primary '**' b=factor { _PyAST_BinOp(a, Pow, b, EXTRA) }\n" -#~ " | await_primary\n" -#~ "\n" -#~ "# Primary elements\n" -#~ "# ----------------\n" -#~ "\n" -#~ "# Primary elements are things like \"obj.something.something\", \"obj[something]\", \"obj(something)\", \"obj\" ...\n" -#~ "\n" -#~ "await_primary[expr_ty] (memo):\n" -#~ " | 'await' a=primary { CHECK_VERSION(expr_ty, 5, \"Await expressions are\", _PyAST_Await(a, EXTRA)) }\n" -#~ " | primary\n" -#~ "\n" -#~ "primary[expr_ty]:\n" -#~ " | a=primary '.' b=NAME { _PyAST_Attribute(a, b->v.Name.id, Load, EXTRA) }\n" -#~ " | a=primary b=genexp { _PyAST_Call(a, CHECK(asdl_expr_seq*, (asdl_expr_seq*)_PyPegen_singleton_seq(p, b)), NULL, EXTRA) }\n" -#~ " | a=primary '(' b=[arguments] ')' {\n" -#~ " _PyAST_Call(a,\n" -#~ " (b) ? ((expr_ty) b)->v.Call.args : NULL,\n" -#~ " (b) ? ((expr_ty) b)->v.Call.keywords : NULL,\n" -#~ " EXTRA) }\n" -#~ " | a=primary '[' b=slices ']' { _PyAST_Subscript(a, b, Load, EXTRA) }\n" -#~ " | atom\n" -#~ "\n" -#~ "slices[expr_ty]:\n" -#~ " | a=slice !',' { a }\n" -#~ " | a[asdl_expr_seq*]=','.(slice | starred_expression)+ [','] { _PyAST_Tuple(a, Load, EXTRA) }\n" -#~ "\n" -#~ "slice[expr_ty]:\n" -#~ " | a=[expression] ':' b=[expression] c=[':' d=[expression] { d }] { _PyAST_Slice(a, b, c, EXTRA) }\n" -#~ " | a=named_expression { a }\n" -#~ "\n" -#~ "atom[expr_ty]:\n" -#~ " | NAME\n" -#~ " | 'True' { _PyAST_Constant(Py_True, NULL, EXTRA) }\n" -#~ " | 'False' { _PyAST_Constant(Py_False, NULL, EXTRA) }\n" -#~ " | 'None' { _PyAST_Constant(Py_None, NULL, EXTRA) }\n" -#~ " | &(STRING|FSTRING_START|TSTRING_START) strings\n" -#~ " | NUMBER\n" -#~ " | &'(' (tuple | group | genexp)\n" -#~ " | &'[' (list | listcomp)\n" -#~ " | &'{' (dict | set | dictcomp | setcomp)\n" -#~ " | '...' { _PyAST_Constant(Py_Ellipsis, NULL, EXTRA) }\n" -#~ "\n" -#~ "group[expr_ty]:\n" -#~ " | '(' a=(yield_expr | named_expression) ')' { a }\n" -#~ " | invalid_group\n" -#~ "\n" -#~ "# Lambda functions\n" -#~ "# ----------------\n" -#~ "\n" -#~ "lambdef[expr_ty]:\n" -#~ " | 'lambda' a=[lambda_params] ':' b=expression {\n" -#~ " _PyAST_Lambda((a) ? a : CHECK(arguments_ty, _PyPegen_empty_arguments(p)), b, EXTRA) }\n" -#~ "\n" -#~ "lambda_params[arguments_ty]:\n" -#~ " | invalid_lambda_parameters\n" -#~ " | lambda_parameters\n" -#~ "\n" -#~ "# lambda_parameters etc. duplicates parameters but without annotations\n" -#~ "# or type comments, and if there's no comma after a parameter, we expect\n" -#~ "# a colon, not a close parenthesis. (For more, see parameters above.)\n" -#~ "#\n" -#~ "lambda_parameters[arguments_ty]:\n" -#~ " | a=lambda_slash_no_default b[asdl_arg_seq*]=lambda_param_no_default* c=lambda_param_with_default* d=[lambda_star_etc] {\n" -#~ " CHECK_VERSION(arguments_ty, 8, \"Positional-only parameters are\", _PyPegen_make_arguments(p, a, NULL, b, c, d)) }\n" -#~ " | a=lambda_slash_with_default b=lambda_param_with_default* c=[lambda_star_etc] {\n" -#~ " CHECK_VERSION(arguments_ty, 8, \"Positional-only parameters are\", _PyPegen_make_arguments(p, NULL, a, NULL, b, c)) }\n" -#~ " | a[asdl_arg_seq*]=lambda_param_no_default+ b=lambda_param_with_default* c=[lambda_star_etc] {\n" -#~ " _PyPegen_make_arguments(p, NULL, NULL, a, b, c) }\n" -#~ " | a=lambda_param_with_default+ b=[lambda_star_etc] { _PyPegen_make_arguments(p, NULL, NULL, NULL, a, b)}\n" -#~ " | a=lambda_star_etc { _PyPegen_make_arguments(p, NULL, NULL, NULL, NULL, a) }\n" -#~ "\n" -#~ "lambda_slash_no_default[asdl_arg_seq*]:\n" -#~ " | a[asdl_arg_seq*]=lambda_param_no_default+ '/' ',' { a }\n" -#~ " | a[asdl_arg_seq*]=lambda_param_no_default+ '/' &':' { a }\n" -#~ "\n" -#~ "lambda_slash_with_default[SlashWithDefault*]:\n" -#~ " | a=lambda_param_no_default* b=lambda_param_with_default+ '/' ',' { _PyPegen_slash_with_default(p, (asdl_arg_seq *)a, b) }\n" -#~ " | a=lambda_param_no_default* b=lambda_param_with_default+ '/' &':' { _PyPegen_slash_with_default(p, (asdl_arg_seq *)a, b) }\n" -#~ "\n" -#~ "lambda_star_etc[StarEtc*]:\n" -#~ " | invalid_lambda_star_etc\n" -#~ " | '*' a=lambda_param_no_default b=lambda_param_maybe_default* c=[lambda_kwds] {\n" -#~ " _PyPegen_star_etc(p, a, b, c) }\n" -#~ " | '*' ',' b=lambda_param_maybe_default+ c=[lambda_kwds] {\n" -#~ " _PyPegen_star_etc(p, NULL, b, c) }\n" -#~ " | a=lambda_kwds { _PyPegen_star_etc(p, NULL, NULL, a) }\n" -#~ "\n" -#~ "lambda_kwds[arg_ty]:\n" -#~ " | invalid_lambda_kwds\n" -#~ " | '**' a=lambda_param_no_default { a }\n" -#~ "\n" -#~ "lambda_param_no_default[arg_ty]:\n" -#~ " | a=lambda_param ',' { a }\n" -#~ " | a=lambda_param &':' { a }\n" -#~ "lambda_param_with_default[NameDefaultPair*]:\n" -#~ " | a=lambda_param c=default ',' { _PyPegen_name_default_pair(p, a, c, NULL) }\n" -#~ " | a=lambda_param c=default &':' { _PyPegen_name_default_pair(p, a, c, NULL) }\n" -#~ "lambda_param_maybe_default[NameDefaultPair*]:\n" -#~ " | a=lambda_param c=default? ',' { _PyPegen_name_default_pair(p, a, c, NULL) }\n" -#~ " | a=lambda_param c=default? &':' { _PyPegen_name_default_pair(p, a, c, NULL) }\n" -#~ "lambda_param[arg_ty]: a=NAME { _PyAST_arg(a->v.Name.id, NULL, NULL, EXTRA) }\n" -#~ "\n" -#~ "# LITERALS\n" -#~ "# ========\n" -#~ "\n" -#~ "fstring_middle[expr_ty]:\n" -#~ " | fstring_replacement_field\n" -#~ " | t=FSTRING_MIDDLE { _PyPegen_constant_from_token(p, t) }\n" -#~ "fstring_replacement_field[expr_ty]:\n" -#~ " | '{' a=annotated_rhs debug_expr='='? conversion=[fstring_conversion] format=[fstring_full_format_spec] rbrace='}' {\n" -#~ " _PyPegen_formatted_value(p, a, debug_expr, conversion, format, rbrace, EXTRA) }\n" -#~ " | invalid_fstring_replacement_field\n" -#~ "fstring_conversion[ResultTokenWithMetadata*]:\n" -#~ " | conv_token=\"!\" conv=NAME { _PyPegen_check_fstring_conversion(p, conv_token, conv) }\n" -#~ "fstring_full_format_spec[ResultTokenWithMetadata*]:\n" -#~ " | colon=':' spec=fstring_format_spec* { _PyPegen_setup_full_format_spec(p, colon, (asdl_expr_seq *) spec, EXTRA) }\n" -#~ "fstring_format_spec[expr_ty]:\n" -#~ " | t=FSTRING_MIDDLE { _PyPegen_decoded_constant_from_token(p, t) }\n" -#~ " | fstring_replacement_field\n" -#~ "fstring[expr_ty]:\n" -#~ " | a=FSTRING_START b=fstring_middle* c=FSTRING_END { _PyPegen_joined_str(p, a, (asdl_expr_seq*)b, c) }\n" -#~ "\n" -#~ "tstring_format_spec_replacement_field[expr_ty]:\n" -#~ " | '{' a=annotated_rhs debug_expr='='? conversion=[fstring_conversion] format=[tstring_full_format_spec] rbrace='}' {\n" -#~ " _PyPegen_formatted_value(p, a, debug_expr, conversion, format, rbrace, EXTRA) }\n" -#~ " | invalid_tstring_replacement_field\n" -#~ "tstring_format_spec[expr_ty]:\n" -#~ " | t=TSTRING_MIDDLE { _PyPegen_decoded_constant_from_token(p, t) }\n" -#~ " | tstring_format_spec_replacement_field\n" -#~ "tstring_full_format_spec[ResultTokenWithMetadata*]:\n" -#~ " | colon=':' spec=tstring_format_spec* { _PyPegen_setup_full_format_spec(p, colon, (asdl_expr_seq *) spec, EXTRA) }\n" -#~ "tstring_replacement_field[expr_ty]:\n" -#~ " | '{' a=annotated_rhs debug_expr='='? conversion=[fstring_conversion] format=[tstring_full_format_spec] rbrace='}' {\n" -#~ " _PyPegen_interpolation(p, a, debug_expr, conversion, format, rbrace, EXTRA) }\n" -#~ " | invalid_tstring_replacement_field\n" -#~ "tstring_middle[expr_ty]:\n" -#~ " | tstring_replacement_field\n" -#~ " | t=TSTRING_MIDDLE { _PyPegen_constant_from_token(p, t) }\n" -#~ "tstring[expr_ty] (memo):\n" -#~ " | a=TSTRING_START b=tstring_middle* c=TSTRING_END {\n" -#~ " CHECK_VERSION(\n" -#~ " expr_ty,\n" -#~ " 14,\n" -#~ " \"t-strings are\",\n" -#~ " _PyPegen_template_str(p, a, (asdl_expr_seq*)b, c)) }\n" -#~ "\n" -#~ "string[expr_ty]: s[Token*]=STRING { _PyPegen_constant_from_string(p, s) }\n" -#~ "strings[expr_ty] (memo):\n" -#~ " | invalid_string_tstring_concat\n" -#~ " | a[asdl_expr_seq*]=(fstring|string)+ { _PyPegen_concatenate_strings(p, a, EXTRA) }\n" -#~ " | a[asdl_expr_seq*]=tstring+ { _PyPegen_concatenate_tstrings(p, a, EXTRA) }\n" -#~ "\n" -#~ "list[expr_ty]:\n" -#~ " | '[' a=[star_named_expressions] ']' { _PyAST_List(a, Load, EXTRA) }\n" -#~ "\n" -#~ "tuple[expr_ty]:\n" -#~ " | '(' a=[y=star_named_expression ',' z=[star_named_expressions] { _PyPegen_seq_insert_in_front(p, y, z) } ] ')' {\n" -#~ " _PyAST_Tuple(a, Load, EXTRA) }\n" -#~ "\n" -#~ "set[expr_ty]: '{' a=star_named_expressions '}' { _PyAST_Set(a, EXTRA) }\n" -#~ "\n" -#~ "# Dicts\n" -#~ "# -----\n" -#~ "\n" -#~ "dict[expr_ty]:\n" -#~ " | '{' a=[double_starred_kvpairs] '}' {\n" -#~ " _PyAST_Dict(\n" -#~ " CHECK(asdl_expr_seq*, _PyPegen_get_keys(p, a)),\n" -#~ " CHECK(asdl_expr_seq*, _PyPegen_get_values(p, a)),\n" -#~ " EXTRA) }\n" -#~ " | '{' invalid_double_starred_kvpairs '}'\n" -#~ "\n" -#~ "double_starred_kvpairs[asdl_seq*]: a=','.double_starred_kvpair+ [','] { a }\n" -#~ "\n" -#~ "double_starred_kvpair[KeyValuePair*]:\n" -#~ " | '**' a=bitwise_or { _PyPegen_key_value_pair(p, NULL, a) }\n" -#~ " | kvpair\n" -#~ "\n" -#~ "kvpair[KeyValuePair*]: a=expression ':' b=expression { _PyPegen_key_value_pair(p, a, b) }\n" -#~ "\n" -#~ "# Comprehensions & Generators\n" -#~ "# ---------------------------\n" -#~ "\n" -#~ "for_if_clauses[asdl_comprehension_seq*]:\n" -#~ " | a[asdl_comprehension_seq*]=for_if_clause+ { a }\n" -#~ "\n" -#~ "for_if_clause[comprehension_ty]:\n" -#~ " | 'async' 'for' a=star_targets 'in' ~ b=disjunction c[asdl_expr_seq*]=('if' z=disjunction { z })* {\n" -#~ " CHECK_VERSION(comprehension_ty, 6, \"Async comprehensions are\", _PyAST_comprehension(a, b, c, 1, p->arena)) }\n" -#~ " | 'for' a=star_targets 'in' ~ b=disjunction c[asdl_expr_seq*]=('if' z=disjunction { z })* {\n" -#~ " _PyAST_comprehension(a, b, c, 0, p->arena) }\n" -#~ " | invalid_for_if_clause\n" -#~ " | invalid_for_target\n" -#~ "\n" -#~ "listcomp[expr_ty]:\n" -#~ " | '[' a=named_expression b=for_if_clauses ']' { _PyAST_ListComp(a, b, EXTRA) }\n" -#~ " | invalid_comprehension\n" -#~ "\n" -#~ "setcomp[expr_ty]:\n" -#~ " | '{' a=named_expression b=for_if_clauses '}' { _PyAST_SetComp(a, b, EXTRA) }\n" -#~ " | invalid_comprehension\n" -#~ "\n" -#~ "genexp[expr_ty]:\n" -#~ " | '(' a=( assignment_expression | expression !':=') b=for_if_clauses ')' { _PyAST_GeneratorExp(a, b, EXTRA) }\n" -#~ " | invalid_comprehension\n" -#~ "\n" -#~ "dictcomp[expr_ty]:\n" -#~ " | '{' a=kvpair b=for_if_clauses '}' { _PyAST_DictComp(a->key, a->value, b, EXTRA) }\n" -#~ " | invalid_dict_comprehension\n" -#~ "\n" -#~ "# FUNCTION CALL ARGUMENTS\n" -#~ "# =======================\n" -#~ "\n" -#~ "arguments[expr_ty] (memo):\n" -#~ " | a=args [','] &')' { a }\n" -#~ " | invalid_arguments\n" -#~ "\n" -#~ "args[expr_ty]:\n" -#~ " | a[asdl_expr_seq*]=','.(starred_expression | ( assignment_expression | expression !':=') !'=')+ b=[',' k=kwargs {k}] {\n" -#~ " _PyPegen_collect_call_seqs(p, a, b, EXTRA) }\n" -#~ " | a=kwargs { _PyAST_Call(_PyPegen_dummy_name(p),\n" -#~ " CHECK_NULL_ALLOWED(asdl_expr_seq*, _PyPegen_seq_extract_starred_exprs(p, a)),\n" -#~ " CHECK_NULL_ALLOWED(asdl_keyword_seq*, _PyPegen_seq_delete_starred_exprs(p, a)),\n" -#~ " EXTRA) }\n" -#~ "\n" -#~ "kwargs[asdl_seq*]:\n" -#~ " | a=','.kwarg_or_starred+ ',' b=','.kwarg_or_double_starred+ { _PyPegen_join_sequences(p, a, b) }\n" -#~ " | ','.kwarg_or_starred+\n" -#~ " | ','.kwarg_or_double_starred+\n" -#~ "\n" -#~ "starred_expression[expr_ty]:\n" -#~ " | invalid_starred_expression_unpacking\n" -#~ " | '*' a=expression { _PyAST_Starred(a, Load, EXTRA) }\n" -#~ " | invalid_starred_expression\n" -#~ "\n" -#~ "kwarg_or_starred[KeywordOrStarred*]:\n" -#~ " | invalid_kwarg\n" -#~ " | a=NAME '=' b=expression {\n" -#~ " _PyPegen_keyword_or_starred(p, CHECK(keyword_ty, _PyAST_keyword(a->v.Name.id, b, EXTRA)), 1) }\n" -#~ " | a=starred_expression { _PyPegen_keyword_or_starred(p, a, 0) }\n" -#~ "\n" -#~ "kwarg_or_double_starred[KeywordOrStarred*]:\n" -#~ " | invalid_kwarg\n" -#~ " | a=NAME '=' b=expression {\n" -#~ " _PyPegen_keyword_or_starred(p, CHECK(keyword_ty, _PyAST_keyword(a->v.Name.id, b, EXTRA)), 1) }\n" -#~ " | '**' a=expression { _PyPegen_keyword_or_starred(p, CHECK(keyword_ty, _PyAST_keyword(NULL, a, EXTRA)), 1) }\n" -#~ "\n" -#~ "# ASSIGNMENT TARGETS\n" -#~ "# ==================\n" -#~ "\n" -#~ "# Generic targets\n" -#~ "# ---------------\n" -#~ "\n" -#~ "# NOTE: star_targets may contain *bitwise_or, targets may not.\n" -#~ "star_targets[expr_ty]:\n" -#~ " | a=star_target !',' { a }\n" -#~ " | a=star_target b=(',' c=star_target { c })* [','] {\n" -#~ " _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)), Store, EXTRA) }\n" -#~ "\n" -#~ "star_targets_list_seq[asdl_expr_seq*]: a[asdl_expr_seq*]=','.star_target+ [','] { a }\n" -#~ "\n" -#~ "star_targets_tuple_seq[asdl_expr_seq*]:\n" -#~ " | a=star_target b=(',' c=star_target { c })+ [','] { (asdl_expr_seq*) _PyPegen_seq_insert_in_front(p, a, b) }\n" -#~ " | a=star_target ',' { (asdl_expr_seq*) _PyPegen_singleton_seq(p, a) }\n" -#~ "\n" -#~ "star_target[expr_ty] (memo):\n" -#~ " | '*' a=(!'*' star_target) {\n" -#~ " _PyAST_Starred(CHECK(expr_ty, _PyPegen_set_expr_context(p, a, Store)), Store, EXTRA) }\n" -#~ " | target_with_star_atom\n" -#~ "\n" -#~ "target_with_star_atom[expr_ty] (memo):\n" -#~ " | a=t_primary '.' b=NAME !t_lookahead { _PyAST_Attribute(a, b->v.Name.id, Store, EXTRA) }\n" -#~ " | a=t_primary '[' b=slices ']' !t_lookahead { _PyAST_Subscript(a, b, Store, EXTRA) }\n" -#~ " | star_atom\n" -#~ "\n" -#~ "star_atom[expr_ty]:\n" -#~ " | a=NAME { _PyPegen_set_expr_context(p, a, Store) }\n" -#~ " | '(' a=target_with_star_atom ')' { _PyPegen_set_expr_context(p, a, Store) }\n" -#~ " | '(' a=[star_targets_tuple_seq] ')' { _PyAST_Tuple(a, Store, EXTRA) }\n" -#~ " | '[' a=[star_targets_list_seq] ']' { _PyAST_List(a, Store, EXTRA) }\n" -#~ "\n" -#~ "single_target[expr_ty]:\n" -#~ " | single_subscript_attribute_target\n" -#~ " | a=NAME { _PyPegen_set_expr_context(p, a, Store) }\n" -#~ " | '(' a=single_target ')' { a }\n" -#~ "\n" -#~ "single_subscript_attribute_target[expr_ty]:\n" -#~ " | a=t_primary '.' b=NAME !t_lookahead { _PyAST_Attribute(a, b->v.Name.id, Store, EXTRA) }\n" -#~ " | a=t_primary '[' b=slices ']' !t_lookahead { _PyAST_Subscript(a, b, Store, EXTRA) }\n" -#~ "\n" -#~ "t_primary[expr_ty]:\n" -#~ " | a=t_primary '.' b=NAME &t_lookahead { _PyAST_Attribute(a, b->v.Name.id, Load, EXTRA) }\n" -#~ " | a=t_primary '[' b=slices ']' &t_lookahead { _PyAST_Subscript(a, b, Load, EXTRA) }\n" -#~ " | a=t_primary b=genexp &t_lookahead {\n" -#~ " _PyAST_Call(a, CHECK(asdl_expr_seq*, (asdl_expr_seq*)_PyPegen_singleton_seq(p, b)), NULL, EXTRA) }\n" -#~ " | a=t_primary '(' b=[arguments] ')' &t_lookahead {\n" -#~ " _PyAST_Call(a,\n" -#~ " (b) ? ((expr_ty) b)->v.Call.args : NULL,\n" -#~ " (b) ? ((expr_ty) b)->v.Call.keywords : NULL,\n" -#~ " EXTRA) }\n" -#~ " | a=atom &t_lookahead { a }\n" -#~ "\n" -#~ "t_lookahead: '(' | '[' | '.'\n" -#~ "\n" -#~ "# Targets for del statements\n" -#~ "# --------------------------\n" -#~ "\n" -#~ "del_targets[asdl_expr_seq*]: a[asdl_expr_seq*]=','.del_target+ [','] { a }\n" -#~ "\n" -#~ "del_target[expr_ty] (memo):\n" -#~ " | a=t_primary '.' b=NAME !t_lookahead { _PyAST_Attribute(a, b->v.Name.id, Del, EXTRA) }\n" -#~ " | a=t_primary '[' b=slices ']' !t_lookahead { _PyAST_Subscript(a, b, Del, EXTRA) }\n" -#~ " | del_t_atom\n" -#~ "\n" -#~ "del_t_atom[expr_ty]:\n" -#~ " | a=NAME { _PyPegen_set_expr_context(p, a, Del) }\n" -#~ " | '(' a=del_target ')' { _PyPegen_set_expr_context(p, a, Del) }\n" -#~ " | '(' a=[del_targets] ')' { _PyAST_Tuple(a, Del, EXTRA) }\n" -#~ " | '[' a=[del_targets] ']' { _PyAST_List(a, Del, EXTRA) }\n" -#~ "\n" -#~ "# TYPING ELEMENTS\n" -#~ "# ---------------\n" -#~ "\n" -#~ "# type_expressions allow */** but ignore them\n" -#~ "type_expressions[asdl_expr_seq*]:\n" -#~ " | a=','.expression+ ',' '*' b=expression ',' '**' c=expression {\n" -#~ " (asdl_expr_seq*)_PyPegen_seq_append_to_end(\n" -#~ " p,\n" -#~ " CHECK(asdl_seq*, _PyPegen_seq_append_to_end(p, a, b)),\n" -#~ " c) }\n" -#~ " | a=','.expression+ ',' '*' b=expression { (asdl_expr_seq*)_PyPegen_seq_append_to_end(p, a, b) }\n" -#~ " | a=','.expression+ ',' '**' b=expression { (asdl_expr_seq*)_PyPegen_seq_append_to_end(p, a, b) }\n" -#~ " | '*' a=expression ',' '**' b=expression {\n" -#~ " (asdl_expr_seq*)_PyPegen_seq_append_to_end(\n" -#~ " p,\n" -#~ " CHECK(asdl_seq*, _PyPegen_singleton_seq(p, a)),\n" -#~ " b) }\n" -#~ " | '*' a=expression { (asdl_expr_seq*)_PyPegen_singleton_seq(p, a) }\n" -#~ " | '**' a=expression { (asdl_expr_seq*)_PyPegen_singleton_seq(p, a) }\n" -#~ " | a[asdl_expr_seq*]=','.expression+ {a}\n" -#~ "\n" -#~ "func_type_comment[Token*]:\n" -#~ " | NEWLINE t=TYPE_COMMENT &(NEWLINE INDENT) { t } # Must be followed by indented block\n" -#~ " | invalid_double_type_comments\n" -#~ " | TYPE_COMMENT\n" -#~ "\n" -#~ "# ========================= END OF THE GRAMMAR ===========================\n" -#~ "\n" -#~ "\n" -#~ "\n" -#~ "# ========================= START OF INVALID RULES =======================\n" -#~ "\n" -#~ "# From here on, there are rules for invalid syntax with specialised error messages\n" -#~ "invalid_arguments:\n" -#~ " | ((','.(starred_expression | ( assignment_expression | expression !':=') !'=')+ ',' kwargs) | kwargs) a=',' ','.(starred_expression !'=')+ {\n" -#~ " RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"iterable argument unpacking follows keyword argument unpacking\") }\n" -#~ " | a=expression b=for_if_clauses ',' [args | expression for_if_clauses] {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, _PyPegen_get_last_comprehension_item(PyPegen_last_item(b, comprehension_ty)), \"Generator expression must be parenthesized\") }\n" -#~ " | a=NAME b='=' expression for_if_clauses {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"invalid syntax. Maybe you meant '==' or ':=' instead of '='?\")}\n" -#~ " | (args ',')? a=NAME b='=' &(',' | ')') {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"expected argument value expression\")}\n" -#~ " | a=args b=for_if_clauses { _PyPegen_nonparen_genexp_in_call(p, a, b) }\n" -#~ " | args ',' a=expression b=for_if_clauses {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, _PyPegen_get_last_comprehension_item(PyPegen_last_item(b, comprehension_ty)), \"Generator expression must be parenthesized\") }\n" -#~ " | a=args ',' args { _PyPegen_arguments_parsing_error(p, a) }\n" -#~ "invalid_kwarg:\n" -#~ " | a[Token*]=('True'|'False'|'None') b='=' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"cannot assign to %s\", PyBytes_AS_STRING(a->bytes)) }\n" -#~ " | a=NAME b='=' expression for_if_clauses {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"invalid syntax. Maybe you meant '==' or ':=' instead of '='?\")}\n" -#~ " | !(NAME '=') a=expression b='=' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(\n" -#~ " a, b, \"expression cannot contain assignment, perhaps you meant \\\"==\\\"?\") }\n" -#~ " | a='**' expression '=' b=expression {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"cannot assign to keyword argument unpacking\") }\n" -#~ "\n" -#~ "# IMPORTANT: Note that the \"_without_invalid\" suffix causes the rule to not call invalid rules under it\n" -#~ "expression_without_invalid[expr_ty]:\n" -#~ " | a=disjunction 'if' b=disjunction 'else' c=expression { _PyAST_IfExp(b, a, c, EXTRA) }\n" -#~ " | disjunction\n" -#~ " | lambdef\n" -#~ "invalid_legacy_expression:\n" -#~ " | a=NAME !'(' b=star_expressions {\n" -#~ " _PyPegen_check_legacy_stmt(p, a) ? RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b,\n" -#~ " \"Missing parentheses in call to '%U'. Did you mean %U(...)?\", a->v.Name.id, a->v.Name.id) : NULL}\n" -#~ "\n" -#~ "invalid_type_param:\n" -#~ " | '*' a=NAME colon=':' e=expression {\n" -#~ " RAISE_SYNTAX_ERROR_STARTING_FROM(colon, e->kind == Tuple_kind\n" -#~ " ? \"cannot use constraints with TypeVarTuple\"\n" -#~ " : \"cannot use bound with TypeVarTuple\")\n" -#~ " }\n" -#~ " | '**' a=NAME colon=':' e=expression {\n" -#~ " RAISE_SYNTAX_ERROR_STARTING_FROM(colon, e->kind == Tuple_kind\n" -#~ " ? \"cannot use constraints with ParamSpec\"\n" -#~ " : \"cannot use bound with ParamSpec\")\n" -#~ " }\n" -#~ "\n" -#~ "invalid_expression:\n" -#~ " | STRING a=(!STRING expression_without_invalid)+ STRING {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE( PyPegen_first_item(a, expr_ty), PyPegen_last_item(a, expr_ty),\n" -#~ " \"invalid syntax. Is this intended to be part of the string?\") }\n" -#~ " # !(NAME STRING) is not matched so we don't show this error with some invalid string prefixes like: kf\"dsfsdf\"\n" -#~ " # Soft keywords need to also be ignored because they can be parsed as NAME NAME\n" -#~ " | !(NAME STRING | SOFT_KEYWORD) a=disjunction b=expression_without_invalid {\n" -#~ " _PyPegen_check_legacy_stmt(p, a) ? NULL : p->tokens[p->mark-1]->level == 0 ? NULL :\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"invalid syntax. Perhaps you forgot a comma?\") }\n" -#~ " | a=disjunction 'if' b=disjunction !('else'|':') { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"expected 'else' after 'if' expression\") }\n" -#~ " | a=disjunction 'if' b=disjunction 'else' !expression {\n" -#~ " RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"expected expression after 'else', but statement is given\") }\n" -#~ " | a[stmt_ty]=(pass_stmt|break_stmt|continue_stmt) 'if' b=disjunction 'else' c=simple_stmt {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION (a, \"expected expression before 'if', but statement is given\") }\n" -#~ " | a='lambda' [lambda_params] b=':' &FSTRING_MIDDLE {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"f-string: lambda expressions are not allowed without parentheses\") }\n" -#~ " | a='lambda' [lambda_params] b=':' &TSTRING_MIDDLE {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"t-string: lambda expressions are not allowed without parentheses\") }\n" -#~ "\n" -#~ "invalid_named_expression(memo):\n" -#~ " | a=expression ':=' expression {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(\n" -#~ " a, \"cannot use assignment expressions with %s\", _PyPegen_get_expr_name(a)) }\n" -#~ " | a=NAME '=' b=bitwise_or !('='|':=') {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"invalid syntax. Maybe you meant '==' or ':=' instead of '='?\") }\n" -#~ " | !(list|tuple|genexp|'True'|'None'|'False') a=bitwise_or b='=' bitwise_or !('='|':=') {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"cannot assign to %s here. Maybe you meant '==' instead of '='?\",\n" -#~ " _PyPegen_get_expr_name(a)) }\n" -#~ "\n" -#~ "invalid_assignment:\n" -#~ " | a=invalid_ann_assign_target ':' expression {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(\n" -#~ " a,\n" -#~ " \"only single target (not %s) can be annotated\",\n" -#~ " _PyPegen_get_expr_name(a)\n" -#~ " )}\n" -#~ " | a=star_named_expression ',' star_named_expressions* ':' expression {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"only single target (not tuple) can be annotated\") }\n" -#~ " | a=expression ':' expression {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"illegal target for annotation\") }\n" -#~ " | (star_targets '=')* a=star_expressions '=' {\n" -#~ " RAISE_SYNTAX_ERROR_INVALID_TARGET(STAR_TARGETS, a) }\n" -#~ " | (star_targets '=')* a=yield_expr '=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"assignment to yield expression not possible\") }\n" -#~ " | a=star_expressions augassign annotated_rhs {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(\n" -#~ " a,\n" -#~ " \"'%s' is an illegal expression for augmented assignment\",\n" -#~ " _PyPegen_get_expr_name(a)\n" -#~ " )}\n" -#~ "invalid_ann_assign_target[expr_ty]:\n" -#~ " | list\n" -#~ " | tuple\n" -#~ " | '(' a=invalid_ann_assign_target ')' { a }\n" -#~ "invalid_del_stmt:\n" -#~ " | 'del' a=star_expressions {\n" -#~ " RAISE_SYNTAX_ERROR_INVALID_TARGET(DEL_TARGETS, a) }\n" -#~ "invalid_block:\n" -#~ " | NEWLINE !INDENT { RAISE_INDENTATION_ERROR(\"expected an indented block\") }\n" -#~ "invalid_comprehension:\n" -#~ " | ('[' | '(' | '{') a=starred_expression for_if_clauses {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"iterable unpacking cannot be used in comprehension\") }\n" -#~ " | ('[' | '{') a=star_named_expression ',' b=star_named_expressions for_if_clauses {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, PyPegen_last_item(b, expr_ty),\n" -#~ " \"did you forget parentheses around the comprehension target?\") }\n" -#~ " | ('[' | '{') a=star_named_expression b=',' for_if_clauses {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"did you forget parentheses around the comprehension target?\") }\n" -#~ "invalid_dict_comprehension:\n" -#~ " | '{' a='**' bitwise_or for_if_clauses '}' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"dict unpacking cannot be used in dict comprehension\") }\n" -#~ "invalid_parameters:\n" -#~ " | a=\"/\" ',' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"at least one argument must precede /\") }\n" -#~ " | (slash_no_default | slash_with_default) param_maybe_default* a='/' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"/ may appear only once\") }\n" -#~ " | slash_no_default? param_no_default* invalid_parameters_helper a=param_no_default {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"parameter without a default follows parameter with a default\") }\n" -#~ " | param_no_default* a='(' param_no_default+ ','? b=')' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"Function parameters cannot be parenthesized\") }\n" -#~ " | (slash_no_default | slash_with_default)? param_maybe_default* '*' (',' | param_no_default) param_maybe_default* a='/' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"/ must be ahead of *\") }\n" -#~ " | param_maybe_default+ '/' a='*' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"expected comma between / and *\") }\n" -#~ "invalid_default:\n" -#~ " | a='=' &(')'|',') { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"expected default value expression\") }\n" -#~ "invalid_star_etc:\n" -#~ " | a='*' (')' | ',' (')' | '**')) { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"named arguments must follow bare *\") }\n" -#~ " | '*' ',' TYPE_COMMENT { RAISE_SYNTAX_ERROR(\"bare * has associated type comment\") }\n" -#~ " | '*' param a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"var-positional argument cannot have default value\") }\n" -#~ " | '*' (param_no_default | ',') param_maybe_default* a='*' (param_no_default | ',') {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"* argument may appear only once\") }\n" -#~ "invalid_kwds:\n" -#~ " | '**' param a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"var-keyword argument cannot have default value\") }\n" -#~ " | '**' param ',' a=param { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"arguments cannot follow var-keyword argument\") }\n" -#~ " | '**' param ',' a[Token*]=('*'|'**'|'/') { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"arguments cannot follow var-keyword argument\") }\n" -#~ "invalid_parameters_helper: # This is only there to avoid type errors\n" -#~ " | a=slash_with_default { _PyPegen_singleton_seq(p, a) }\n" -#~ " | param_with_default+\n" -#~ "invalid_lambda_parameters:\n" -#~ " | a=\"/\" ',' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"at least one argument must precede /\") }\n" -#~ " | (lambda_slash_no_default | lambda_slash_with_default) lambda_param_maybe_default* a='/' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"/ may appear only once\") }\n" -#~ " | lambda_slash_no_default? lambda_param_no_default* invalid_lambda_parameters_helper a=lambda_param_no_default {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"parameter without a default follows parameter with a default\") }\n" -#~ " | lambda_param_no_default* a='(' ','.lambda_param+ ','? b=')' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"Lambda expression parameters cannot be parenthesized\") }\n" -#~ " | (lambda_slash_no_default | lambda_slash_with_default)? lambda_param_maybe_default* '*' (',' | lambda_param_no_default) lambda_param_maybe_default* a='/' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"/ must be ahead of *\") }\n" -#~ " | lambda_param_maybe_default+ '/' a='*' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"expected comma between / and *\") }\n" -#~ "invalid_lambda_parameters_helper:\n" -#~ " | a=lambda_slash_with_default { _PyPegen_singleton_seq(p, a) }\n" -#~ " | lambda_param_with_default+\n" -#~ "invalid_lambda_star_etc:\n" -#~ " | '*' (':' | ',' (':' | '**')) { RAISE_SYNTAX_ERROR(\"named arguments must follow bare *\") }\n" -#~ " | '*' lambda_param a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"var-positional argument cannot have default value\") }\n" -#~ " | '*' (lambda_param_no_default | ',') lambda_param_maybe_default* a='*' (lambda_param_no_default | ',') {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"* argument may appear only once\") }\n" -#~ "invalid_lambda_kwds:\n" -#~ " | '**' lambda_param a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"var-keyword argument cannot have default value\") }\n" -#~ " | '**' lambda_param ',' a=lambda_param { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"arguments cannot follow var-keyword argument\") }\n" -#~ " | '**' lambda_param ',' a[Token*]=('*'|'**'|'/') { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"arguments cannot follow var-keyword argument\") }\n" -#~ "invalid_double_type_comments:\n" -#~ " | TYPE_COMMENT NEWLINE TYPE_COMMENT NEWLINE INDENT {\n" -#~ " RAISE_SYNTAX_ERROR(\"Cannot have two type comments on def\") }\n" -#~ "invalid_with_item:\n" -#~ " | expression 'as' a=expression &(',' | ')' | ':') {\n" -#~ " RAISE_SYNTAX_ERROR_INVALID_TARGET(STAR_TARGETS, a) }\n" -#~ "\n" -#~ "invalid_for_if_clause:\n" -#~ " | 'async'? 'for' (bitwise_or (',' bitwise_or)* [',']) !'in' {\n" -#~ " RAISE_SYNTAX_ERROR(\"'in' expected after for-loop variables\") }\n" -#~ "\n" -#~ "invalid_for_target:\n" -#~ " | 'async'? 'for' a=star_expressions {\n" -#~ " RAISE_SYNTAX_ERROR_INVALID_TARGET(FOR_TARGETS, a) }\n" -#~ "\n" -#~ "invalid_group:\n" -#~ " | '(' a=starred_expression ')' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"cannot use starred expression here\") }\n" -#~ " | '(' a='**' expression ')' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"cannot use double starred expression here\") }\n" -#~ "invalid_import:\n" -#~ " | a='import' ','.dotted_name+ 'from' dotted_name {\n" -#~ " RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"Did you mean to use 'from ... import ...' instead?\") }\n" -#~ " | 'import' token=NEWLINE {\n" -#~ " RAISE_SYNTAX_ERROR_STARTING_FROM(token, \"Expected one or more names after 'import'\") }\n" -#~ "invalid_dotted_as_name:\n" -#~ " | dotted_name 'as' !(NAME (',' | ')' | ';' | NEWLINE)) a=expression {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a,\n" -#~ " \"cannot use %s as import target\", _PyPegen_get_expr_name(a)) }\n" -#~ "invalid_import_from_as_name:\n" -#~ " | NAME 'as' !(NAME (',' | ')' | ';' | NEWLINE)) a=expression {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a,\n" -#~ " \"cannot use %s as import target\", _PyPegen_get_expr_name(a)) }\n" -#~ "\n" -#~ "invalid_import_from_targets:\n" -#~ " | import_from_as_names ',' NEWLINE {\n" -#~ " RAISE_SYNTAX_ERROR(\"trailing comma not allowed without surrounding parentheses\") }\n" -#~ " | token=NEWLINE {\n" -#~ " RAISE_SYNTAX_ERROR_STARTING_FROM(token, \"Expected one or more names after 'import'\") }\n" -#~ "\n" -#~ "invalid_with_stmt:\n" -#~ " | ['async'] 'with' ','.(expression ['as' star_target])+ NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" -#~ " | ['async'] 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" -#~ "invalid_with_stmt_indent:\n" -#~ " | ['async'] a='with' ','.(expression ['as' star_target])+ ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after 'with' statement on line %d\", a->lineno) }\n" -#~ " | ['async'] a='with' '(' ','.(expressions ['as' star_target])+ ','? ')' ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after 'with' statement on line %d\", a->lineno) }\n" -#~ "\n" -#~ "invalid_try_stmt:\n" -#~ " | a='try' ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after 'try' statement on line %d\", a->lineno) }\n" -#~ " | 'try' ':' block !('except' | 'finally') { RAISE_SYNTAX_ERROR(\"expected 'except' or 'finally' block\") }\n" -#~ " | 'try' ':' block* except_block+ a='except' b='*' expression ['as' NAME] ':' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"cannot have both 'except' and 'except*' on the same 'try'\") }\n" -#~ " | 'try' ':' block* except_star_block+ a='except' [expression ['as' NAME]] ':' {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"cannot have both 'except' and 'except*' on the same 'try'\") }\n" -#~ "invalid_except_stmt:\n" -#~ " | 'except' a=expression ',' expressions 'as' NAME ':' {\n" -#~ " RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"multiple exception types must be parenthesized when using 'as'\") }\n" -#~ " | a='except' expression ['as' NAME ] NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" -#~ " | a='except' NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\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" -#~ "invalid_except_star_stmt:\n" -#~ " | 'except' '*' a=expression ',' expressions 'as' NAME ':' {\n" -#~ " RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"multiple exception types must be parenthesized when using 'as'\") }\n" -#~ " | a='except' '*' expression ['as' NAME ] NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" -#~ " | a='except' '*' (NEWLINE | ':') { RAISE_SYNTAX_ERROR(\"expected one or more exception types\") }\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" -#~ "invalid_finally_stmt:\n" -#~ " | a='finally' ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after 'finally' statement on line %d\", a->lineno) }\n" -#~ "invalid_except_stmt_indent:\n" -#~ " | a='except' expression ['as' NAME ] ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after 'except' statement on line %d\", a->lineno) }\n" -#~ " | a='except' ':' NEWLINE !INDENT { RAISE_INDENTATION_ERROR(\"expected an indented block after 'except' statement on line %d\", a->lineno) }\n" -#~ "invalid_except_star_stmt_indent:\n" -#~ " | a='except' '*' expression ['as' NAME ] ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after 'except*' statement on line %d\", a->lineno) }\n" -#~ "invalid_match_stmt:\n" -#~ " | \"match\" subject_expr NEWLINE { CHECK_VERSION(void*, 10, \"Pattern matching is\", RAISE_SYNTAX_ERROR(\"expected ':'\") ) }\n" -#~ " | a=\"match\" subject=subject_expr ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after 'match' statement on line %d\", a->lineno) }\n" -#~ "invalid_case_block:\n" -#~ " | \"case\" patterns guard? NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" -#~ " | a=\"case\" patterns guard? ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after 'case' statement on line %d\", a->lineno) }\n" -#~ "invalid_as_pattern:\n" -#~ " | or_pattern 'as' a=\"_\" { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"cannot use '_' as a target\") }\n" -#~ " | or_pattern 'as' a=expression {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(\n" -#~ " a, \"cannot use %s as pattern target\", _PyPegen_get_expr_name(a)) }\n" -#~ "invalid_class_pattern:\n" -#~ " | name_or_attr '(' a=invalid_class_argument_pattern { RAISE_SYNTAX_ERROR_KNOWN_RANGE(\n" -#~ " PyPegen_first_item(a, pattern_ty),\n" -#~ " PyPegen_last_item(a, pattern_ty),\n" -#~ " \"positional patterns follow keyword patterns\") }\n" -#~ "invalid_class_argument_pattern[asdl_pattern_seq*]:\n" -#~ " | [positional_patterns ','] keyword_patterns ',' a=positional_patterns { a }\n" -#~ "invalid_if_stmt:\n" -#~ " | 'if' named_expression NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" -#~ " | a='if' a=named_expression ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after 'if' statement on line %d\", a->lineno) }\n" -#~ "invalid_elif_stmt:\n" -#~ " | 'elif' named_expression NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" -#~ " | a='elif' named_expression ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after 'elif' statement on line %d\", a->lineno) }\n" -#~ "invalid_else_stmt:\n" -#~ " | a='else' ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after 'else' statement on line %d\", a->lineno) }\n" -#~ " | 'else' ':' block 'elif' { RAISE_SYNTAX_ERROR(\"'elif' block follows an 'else' block\")}\n" -#~ "invalid_while_stmt:\n" -#~ " | 'while' named_expression NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" -#~ " | a='while' named_expression ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after 'while' statement on line %d\", a->lineno) }\n" -#~ "invalid_for_stmt:\n" -#~ " | ['async'] 'for' star_targets 'in' star_expressions NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" -#~ " | ['async'] a='for' star_targets 'in' star_expressions ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after 'for' statement on line %d\", a->lineno) }\n" -#~ "invalid_def_raw:\n" -#~ " | ['async'] a='def' NAME [type_params] '(' [params] ')' ['->' expression] ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after function definition on line %d\", a->lineno) }\n" -#~ " | ['async'] 'def' NAME [type_params] &&'(' [params] ')' ['->' expression] &&':' [func_type_comment] block\n" -#~ "invalid_class_def_raw:\n" -#~ " | 'class' NAME [type_params] ['(' [arguments] ')'] NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" -#~ " | a='class' NAME [type_params] ['(' [arguments] ')'] ':' NEWLINE !INDENT {\n" -#~ " RAISE_INDENTATION_ERROR(\"expected an indented block after class definition on line %d\", a->lineno) }\n" -#~ "\n" -#~ "invalid_double_starred_kvpairs:\n" -#~ " | ','.double_starred_kvpair+ ',' invalid_kvpair\n" -#~ " | expression ':' a='*' bitwise_or { RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"cannot use a starred expression in a dictionary value\") }\n" -#~ " | expression a=':' &('}'|',') { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"expression expected after dictionary key and ':'\") }\n" -#~ "invalid_kvpair:\n" -#~ " | a=expression !(':') {\n" -#~ " RAISE_ERROR_KNOWN_LOCATION(p, PyExc_SyntaxError, a->lineno, a->end_col_offset - 1, a->end_lineno, -1, \"':' expected after dictionary key\") }\n" -#~ " | expression ':' a='*' bitwise_or { RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"cannot use a starred expression in a dictionary value\") }\n" -#~ " | expression a=':' &('}'|',') {RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"expression expected after dictionary key and ':'\") }\n" -#~ "invalid_starred_expression_unpacking:\n" -#~ " | a='*' expression '=' b=expression { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"cannot assign to iterable argument unpacking\") }\n" -#~ "invalid_starred_expression:\n" -#~ " | '*' { RAISE_SYNTAX_ERROR(\"Invalid star expression\") }\n" -#~ "\n" -#~ "invalid_fstring_replacement_field:\n" -#~ " | '{' a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"f-string: valid expression required before '='\") }\n" -#~ " | '{' a='!' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"f-string: valid expression required before '!'\") }\n" -#~ " | '{' a=':' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"f-string: valid expression required before ':'\") }\n" -#~ " | '{' a='}' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"f-string: valid expression required before '}'\") }\n" -#~ " | '{' !annotated_rhs { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting a valid expression after '{'\") }\n" -#~ " | '{' annotated_rhs !('=' | '!' | ':' | '}') {\n" -#~ " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting '=', or '!', or ':', or '}'\") }\n" -#~ " | '{' annotated_rhs '=' !('!' | ':' | '}') {\n" -#~ " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting '!', or ':', or '}'\") }\n" -#~ " | '{' annotated_rhs '='? invalid_fstring_conversion_character\n" -#~ " | '{' annotated_rhs '='? ['!' NAME] !(':' | '}') {\n" -#~ " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting ':' or '}'\") }\n" -#~ " | '{' annotated_rhs '='? ['!' NAME] ':' fstring_format_spec* !'}' {\n" -#~ " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting '}', or format specs\") }\n" -#~ " | '{' annotated_rhs '='? ['!' NAME] !'}' {\n" -#~ " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting '}'\") }\n" -#~ "\n" -#~ "invalid_fstring_conversion_character:\n" -#~ " | '!' &(':' | '}') { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: missing conversion character\") }\n" -#~ " | '!' !NAME { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: invalid conversion character\") }\n" -#~ "\n" -#~ "invalid_tstring_replacement_field:\n" -#~ " | '{' a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"t-string: valid expression required before '='\") }\n" -#~ " | '{' a='!' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"t-string: valid expression required before '!'\") }\n" -#~ " | '{' a=':' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"t-string: valid expression required before ':'\") }\n" -#~ " | '{' a='}' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"t-string: valid expression required before '}'\") }\n" -#~ " | '{' !annotated_rhs { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting a valid expression after '{'\") }\n" -#~ " | '{' annotated_rhs !('=' | '!' | ':' | '}') {\n" -#~ " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting '=', or '!', or ':', or '}'\") }\n" -#~ " | '{' annotated_rhs '=' !('!' | ':' | '}') {\n" -#~ " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting '!', or ':', or '}'\") }\n" -#~ " | '{' annotated_rhs '='? invalid_tstring_conversion_character\n" -#~ " | '{' annotated_rhs '='? ['!' NAME] !(':' | '}') {\n" -#~ " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting ':' or '}'\") }\n" -#~ " | '{' annotated_rhs '='? ['!' NAME] ':' fstring_format_spec* !'}' {\n" -#~ " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting '}', or format specs\") }\n" -#~ " | '{' annotated_rhs '='? ['!' NAME] !'}' {\n" -#~ " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting '}'\") }\n" -#~ "\n" -#~ "invalid_tstring_conversion_character:\n" -#~ " | '!' &(':' | '}') { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: missing conversion character\") }\n" -#~ " | '!' !NAME { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: invalid conversion character\") }\n" -#~ "\n" -#~ "invalid_string_tstring_concat:\n" -#~ " | a=(fstring|string)+ b[expr_ty]=tstring {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(PyPegen_last_item(a, expr_ty), b, \"cannot mix t-string literals with string or bytes literals\") }\n" -#~ " | a=tstring+ b[expr_ty]=(fstring|string) {\n" -#~ " RAISE_SYNTAX_ERROR_KNOWN_RANGE(PyPegen_last_item(a, expr_ty), b, \"cannot mix t-string literals with string or bytes literals\") }\n" -#~ "\n" -#~ "invalid_arithmetic:\n" -#~ " | sum ('+'|'-'|'*'|'/'|'%'|'//'|'@') a='not' b=inversion { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"'not' after an operator must be parenthesized\") }\n" -#~ "invalid_factor:\n" -#~ " | ('+' | '-' | '~') a='not' b=factor { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"'not' after an operator must be parenthesized\") }\n" -#~ "\n" -#~ "invalid_type_params:\n" -#~ " | '[' token=']' {\n" -#~ " RAISE_SYNTAX_ERROR_STARTING_FROM(\n" -#~ " token,\n" -#~ " \"Type parameter list cannot be empty\")}\n" +#, fuzzy +#| msgid "" +#| "# PEG grammar for Python\n" +#| "\n" +#| "@trailer '''\n" +#| "void *\n" +#| "_PyPegen_parse(Parser *p)\n" +#| "{\n" +#| " // Initialize keywords\n" +#| " p->keywords = reserved_keywords;\n" +#| " p->n_keyword_lists = n_keyword_lists;\n" +#| " p->soft_keywords = soft_keywords;\n" +#| "\n" +#| " // Run parser\n" +#| " void *result = NULL;\n" +#| " if (p->start_rule == Py_file_input) {\n" +#| " result = file_rule(p);\n" +#| " } else if (p->start_rule == Py_single_input) {\n" +#| " result = interactive_rule(p);\n" +#| " } else if (p->start_rule == Py_eval_input) {\n" +#| " result = eval_rule(p);\n" +#| " } else if (p->start_rule == Py_func_type_input) {\n" +#| " result = func_type_rule(p);\n" +#| " }\n" +#| "\n" +#| " return result;\n" +#| "}\n" +#| "'''\n" +#| "\n" +#| "# ========================= START OF THE GRAMMAR =========================\n" +#| "\n" +#| "# General grammatical elements and rules:\n" +#| "#\n" +#| "# * Strings with double quotes (\") denote SOFT KEYWORDS\n" +#| "# * Strings with single quotes (') denote KEYWORDS\n" +#| "# * Upper case names (NAME) denote tokens in the Grammar/Tokens file\n" +#| "# * Rule names starting with \"invalid_\" are used for specialized syntax errors\n" +#| "# - These rules are NOT used in the first pass of the parser.\n" +#| "# - Only if the first pass fails to parse, a second pass including the invalid\n" +#| "# rules will be executed.\n" +#| "# - If the parser fails in the second phase with a generic syntax error, the\n" +#| "# location of the generic failure of the first pass will be used (this avoids\n" +#| "# reporting incorrect locations due to the invalid rules).\n" +#| "# - The order of the alternatives involving invalid rules matter\n" +#| "# (like any rule in PEG).\n" +#| "#\n" +#| "# Grammar Syntax (see PEP 617 for more information):\n" +#| "#\n" +#| "# rule_name: expression\n" +#| "# Optionally, a type can be included right after the rule name, which\n" +#| "# specifies the return type of the C or Python function corresponding to the\n" +#| "# rule:\n" +#| "# rule_name[return_type]: expression\n" +#| "# If the return type is omitted, then a void * is returned in C and an Any in\n" +#| "# Python.\n" +#| "# e1 e2\n" +#| "# Match e1, then match e2.\n" +#| "# e1 | e2\n" +#| "# Match e1 or e2.\n" +#| "# The first alternative can also appear on the line after the rule name for\n" +#| "# formatting purposes. In that case, a | must be used before the first\n" +#| "# alternative, like so:\n" +#| "# rule_name[return_type]:\n" +#| "# | first_alt\n" +#| "# | second_alt\n" +#| "# ( e )\n" +#| "# Match e (allows also to use other operators in the group like '(e)*')\n" +#| "# [ e ] or e?\n" +#| "# Optionally match e.\n" +#| "# e*\n" +#| "# Match zero or more occurrences of e.\n" +#| "# e+\n" +#| "# Match one or more occurrences of e.\n" +#| "# s.e+\n" +#| "# Match one or more occurrences of e, separated by s. The generated parse tree\n" +#| "# does not include the separator. This is otherwise identical to (e (s e)*).\n" +#| "# &e\n" +#| "# Succeed if e can be parsed, without consuming any input.\n" +#| "# !e\n" +#| "# Fail if e can be parsed, without consuming any input.\n" +#| "# ~\n" +#| "# Commit to the current alternative, even if it fails to parse.\n" +#| "# &&e\n" +#| "# Eager parse e. The parser will not backtrack and will immediately\n" +#| "# fail with SyntaxError if e cannot be parsed.\n" +#| "#\n" +#| "\n" +#| "# STARTING RULES\n" +#| "# ==============\n" +#| "\n" +#| "file[mod_ty]: a=[statements] ENDMARKER { _PyPegen_make_module(p, a) }\n" +#| "interactive[mod_ty]: a=statement_newline { _PyAST_Interactive(a, p->arena) }\n" +#| "eval[mod_ty]: a=expressions NEWLINE* ENDMARKER { _PyAST_Expression(a, p->arena) }\n" +#| "func_type[mod_ty]: '(' a=[type_expressions] ')' '->' b=expression NEWLINE* ENDMARKER { _PyAST_FunctionType(a, b, p->arena) }\n" +#| "\n" +#| "# GENERAL STATEMENTS\n" +#| "# ==================\n" +#| "\n" +#| "statements[asdl_stmt_seq*]: a=statement+ { (asdl_stmt_seq*)_PyPegen_seq_flatten(p, a) }\n" +#| "\n" +#| "statement[asdl_stmt_seq*]:\n" +#| " | a=compound_stmt { _PyPegen_register_stmts(p ,\n" +#| " (asdl_stmt_seq*)_PyPegen_singleton_seq(p, a)\n" +#| " ) }\n" +#| " | a[asdl_stmt_seq*]=simple_stmts { a }\n" +#| "\n" +#| "single_compound_stmt[asdl_stmt_seq*]:\n" +#| " | a=compound_stmt {\n" +#| " _PyPegen_register_stmts(p, (asdl_stmt_seq*)_PyPegen_singleton_seq(p, a)) }\n" +#| "\n" +#| "statement_newline[asdl_stmt_seq*]:\n" +#| " | a=single_compound_stmt NEWLINE { a }\n" +#| " | simple_stmts\n" +#| " | NEWLINE { (asdl_stmt_seq*)_PyPegen_singleton_seq(p, CHECK(stmt_ty, _PyAST_Pass(EXTRA))) }\n" +#| " | ENDMARKER { _PyPegen_interactive_exit(p) }\n" +#| "\n" +#| "simple_stmts[asdl_stmt_seq*]:\n" +#| " | a=simple_stmt !';' NEWLINE { (asdl_stmt_seq*)_PyPegen_singleton_seq(p, a) } # Not needed, there for speedup\n" +#| " | a[asdl_stmt_seq*]=';'.simple_stmt+ [';'] NEWLINE { a }\n" +#| "\n" +#| "# NOTE: assignment MUST precede expression, else parsing a simple assignment\n" +#| "# will throw a SyntaxError.\n" +#| "simple_stmt[stmt_ty] (memo):\n" +#| " | assignment\n" +#| " | &\"type\" type_alias\n" +#| " | e=star_expressions { _PyAST_Expr(e, EXTRA) }\n" +#| " | &'return' return_stmt\n" +#| " | &('import' | 'from') import_stmt\n" +#| " | &'raise' raise_stmt\n" +#| " | &'pass' pass_stmt\n" +#| " | &'del' del_stmt\n" +#| " | &'yield' yield_stmt\n" +#| " | &'assert' assert_stmt\n" +#| " | &'break' break_stmt\n" +#| " | &'continue' continue_stmt\n" +#| " | &'global' global_stmt\n" +#| " | &'nonlocal' nonlocal_stmt\n" +#| "\n" +#| "compound_stmt[stmt_ty]:\n" +#| " | &('def' | '@' | 'async') function_def\n" +#| " | &'if' if_stmt\n" +#| " | &('class' | '@') class_def\n" +#| " | &('with' | 'async') with_stmt\n" +#| " | &('for' | 'async') for_stmt\n" +#| " | &'try' try_stmt\n" +#| " | &'while' while_stmt\n" +#| " | match_stmt\n" +#| "\n" +#| "# SIMPLE STATEMENTS\n" +#| "# =================\n" +#| "\n" +#| "# NOTE: annotated_rhs may start with 'yield'; yield_expr must start with 'yield'\n" +#| "assignment[stmt_ty]:\n" +#| " | a=NAME ':' b=expression c=['=' d=annotated_rhs { d }] {\n" +#| " CHECK_VERSION(\n" +#| " stmt_ty,\n" +#| " 6,\n" +#| " \"Variable annotation syntax is\",\n" +#| " _PyAST_AnnAssign(CHECK(expr_ty, _PyPegen_set_expr_context(p, a, Store)), b, c, 1, EXTRA)\n" +#| " ) }\n" +#| " | a=('(' b=single_target ')' { b }\n" +#| " | single_subscript_attribute_target) ':' b=expression c=['=' d=annotated_rhs { d }] {\n" +#| " CHECK_VERSION(stmt_ty, 6, \"Variable annotations syntax is\", _PyAST_AnnAssign(a, b, c, 0, EXTRA)) }\n" +#| " | a[asdl_expr_seq*]=(z=star_targets '=' { z })+ b=annotated_rhs !'=' tc=[TYPE_COMMENT] {\n" +#| " _PyAST_Assign(a, b, NEW_TYPE_COMMENT(p, tc), EXTRA) }\n" +#| " | a=single_target b=augassign ~ c=annotated_rhs {\n" +#| " _PyAST_AugAssign(a, b->kind, c, EXTRA) }\n" +#| " | invalid_assignment\n" +#| "\n" +#| "annotated_rhs[expr_ty]: yield_expr | star_expressions\n" +#| "\n" +#| "augassign[AugOperator*]:\n" +#| " | '+=' { _PyPegen_augoperator(p, Add) }\n" +#| " | '-=' { _PyPegen_augoperator(p, Sub) }\n" +#| " | '*=' { _PyPegen_augoperator(p, Mult) }\n" +#| " | '@=' { CHECK_VERSION(AugOperator*, 5, \"The '@' operator is\", _PyPegen_augoperator(p, MatMult)) }\n" +#| " | '/=' { _PyPegen_augoperator(p, Div) }\n" +#| " | '%=' { _PyPegen_augoperator(p, Mod) }\n" +#| " | '&=' { _PyPegen_augoperator(p, BitAnd) }\n" +#| " | '|=' { _PyPegen_augoperator(p, BitOr) }\n" +#| " | '^=' { _PyPegen_augoperator(p, BitXor) }\n" +#| " | '<<=' { _PyPegen_augoperator(p, LShift) }\n" +#| " | '>>=' { _PyPegen_augoperator(p, RShift) }\n" +#| " | '**=' { _PyPegen_augoperator(p, Pow) }\n" +#| " | '//=' { _PyPegen_augoperator(p, FloorDiv) }\n" +#| "\n" +#| "return_stmt[stmt_ty]:\n" +#| " | 'return' a=[star_expressions] { _PyAST_Return(a, EXTRA) }\n" +#| "\n" +#| "raise_stmt[stmt_ty]:\n" +#| " | 'raise' a=expression b=['from' z=expression { z }] { _PyAST_Raise(a, b, EXTRA) }\n" +#| " | 'raise' { _PyAST_Raise(NULL, NULL, EXTRA) }\n" +#| "\n" +#| "pass_stmt[stmt_ty]:\n" +#| " | 'pass' { _PyAST_Pass(EXTRA) }\n" +#| "\n" +#| "break_stmt[stmt_ty]:\n" +#| " | 'break' { _PyAST_Break(EXTRA) }\n" +#| "\n" +#| "continue_stmt[stmt_ty]:\n" +#| " | 'continue' { _PyAST_Continue(EXTRA) }\n" +#| "\n" +#| "global_stmt[stmt_ty]: 'global' a[asdl_expr_seq*]=','.NAME+ {\n" +#| " _PyAST_Global(CHECK(asdl_identifier_seq*, _PyPegen_map_names_to_ids(p, a)), EXTRA) }\n" +#| "\n" +#| "nonlocal_stmt[stmt_ty]: 'nonlocal' a[asdl_expr_seq*]=','.NAME+ {\n" +#| " _PyAST_Nonlocal(CHECK(asdl_identifier_seq*, _PyPegen_map_names_to_ids(p, a)), EXTRA) }\n" +#| "\n" +#| "del_stmt[stmt_ty]:\n" +#| " | 'del' a=del_targets &(';' | NEWLINE) { _PyAST_Delete(a, EXTRA) }\n" +#| " | invalid_del_stmt\n" +#| "\n" +#| "yield_stmt[stmt_ty]: y=yield_expr { _PyAST_Expr(y, EXTRA) }\n" +#| "\n" +#| "assert_stmt[stmt_ty]: 'assert' a=expression b=[',' z=expression { z }] { _PyAST_Assert(a, b, EXTRA) }\n" +#| "\n" +#| "import_stmt[stmt_ty]:\n" +#| " | invalid_import\n" +#| " | import_name\n" +#| " | import_from\n" +#| "\n" +#| "# Import statements\n" +#| "# -----------------\n" +#| "\n" +#| "import_name[stmt_ty]: 'import' a=dotted_as_names { _PyAST_Import(a, EXTRA) }\n" +#| "# note below: the ('.' | '...') is necessary because '...' is tokenized as ELLIPSIS\n" +#| "import_from[stmt_ty]:\n" +#| " | 'from' a=('.' | '...')* b=dotted_name 'import' c=import_from_targets {\n" +#| " _PyPegen_checked_future_import(p, b->v.Name.id, c, _PyPegen_seq_count_dots(a), EXTRA) }\n" +#| " | 'from' a=('.' | '...')+ 'import' b=import_from_targets {\n" +#| " _PyAST_ImportFrom(NULL, b, _PyPegen_seq_count_dots(a), EXTRA) }\n" +#| "import_from_targets[asdl_alias_seq*]:\n" +#| " | '(' a=import_from_as_names [','] ')' { a }\n" +#| " | import_from_as_names !','\n" +#| " | '*' { (asdl_alias_seq*)_PyPegen_singleton_seq(p, CHECK(alias_ty, _PyPegen_alias_for_star(p, EXTRA))) }\n" +#| " | invalid_import_from_targets\n" +#| "import_from_as_names[asdl_alias_seq*]:\n" +#| " | a[asdl_alias_seq*]=','.import_from_as_name+ { a }\n" +#| "import_from_as_name[alias_ty]:\n" +#| " | invalid_import_from_as_name\n" +#| " | a=NAME b=['as' z=NAME { z }] { _PyAST_alias(\n" +#| " a->v.Name.id, (b) ? ((expr_ty) b)->v.Name.id : NULL, EXTRA) }\n" +#| "\n" +#| "dotted_as_names[asdl_alias_seq*]:\n" +#| " | a[asdl_alias_seq*]=','.dotted_as_name+ { a }\n" +#| "dotted_as_name[alias_ty]:\n" +#| " | invalid_dotted_as_name\n" +#| " | a=dotted_name b=['as' z=NAME { z }] { _PyAST_alias(\n" +#| " a->v.Name.id, (b) ? ((expr_ty) b)->v.Name.id : NULL, EXTRA) }\n" +#| "\n" +#| "dotted_name[expr_ty]:\n" +#| " | a=dotted_name '.' b=NAME { _PyPegen_join_names_with_dot(p, a, b) }\n" +#| " | NAME\n" +#| "\n" +#| "# COMPOUND STATEMENTS\n" +#| "# ===================\n" +#| "\n" +#| "# Common elements\n" +#| "# ---------------\n" +#| "\n" +#| "block[asdl_stmt_seq*] (memo):\n" +#| " | NEWLINE INDENT a=statements DEDENT { a }\n" +#| " | simple_stmts\n" +#| " | invalid_block\n" +#| "\n" +#| "decorators[asdl_expr_seq*]: a[asdl_expr_seq*]=('@' f=named_expression NEWLINE { f })+ { a }\n" +#| "\n" +#| "# Class definitions\n" +#| "# -----------------\n" +#| "\n" +#| "class_def[stmt_ty]:\n" +#| " | a=decorators b=class_def_raw { _PyPegen_class_def_decorators(p, a, b) }\n" +#| " | class_def_raw\n" +#| "\n" +#| "class_def_raw[stmt_ty]:\n" +#| " | invalid_class_def_raw\n" +#| " | 'class' a=NAME t=[type_params] b=['(' z=[arguments] ')' { z }] ':' c=block {\n" +#| " _PyAST_ClassDef(a->v.Name.id,\n" +#| " (b) ? ((expr_ty) b)->v.Call.args : NULL,\n" +#| " (b) ? ((expr_ty) b)->v.Call.keywords : NULL,\n" +#| " c, NULL, t, EXTRA) }\n" +#| "\n" +#| "# Function definitions\n" +#| "# --------------------\n" +#| "\n" +#| "function_def[stmt_ty]:\n" +#| " | d=decorators f=function_def_raw { _PyPegen_function_def_decorators(p, d, f) }\n" +#| " | function_def_raw\n" +#| "\n" +#| "function_def_raw[stmt_ty]:\n" +#| " | invalid_def_raw\n" +#| " | 'def' n=NAME t=[type_params] '(' params=[params] ')' a=['->' z=expression { z }] ':' tc=[func_type_comment] b=block {\n" +#| " _PyAST_FunctionDef(n->v.Name.id,\n" +#| " (params) ? params : CHECK(arguments_ty, _PyPegen_empty_arguments(p)),\n" +#| " b, NULL, a, NEW_TYPE_COMMENT(p, tc), t, EXTRA) }\n" +#| " | 'async' 'def' n=NAME t=[type_params] '(' params=[params] ')' a=['->' z=expression { z }] ':' tc=[func_type_comment] b=block {\n" +#| " CHECK_VERSION(\n" +#| " stmt_ty,\n" +#| " 5,\n" +#| " \"Async functions are\",\n" +#| " _PyAST_AsyncFunctionDef(n->v.Name.id,\n" +#| " (params) ? params : CHECK(arguments_ty, _PyPegen_empty_arguments(p)),\n" +#| " b, NULL, a, NEW_TYPE_COMMENT(p, tc), t, EXTRA)\n" +#| " ) }\n" +#| "\n" +#| "# Function parameters\n" +#| "# -------------------\n" +#| "\n" +#| "params[arguments_ty]:\n" +#| " | invalid_parameters\n" +#| " | parameters\n" +#| "\n" +#| "parameters[arguments_ty]:\n" +#| " | a=slash_no_default b[asdl_arg_seq*]=param_no_default* c=param_with_default* d=[star_etc] {\n" +#| " CHECK_VERSION(arguments_ty, 8, \"Positional-only parameters are\", _PyPegen_make_arguments(p, a, NULL, b, c, d)) }\n" +#| " | a=slash_with_default b=param_with_default* c=[star_etc] {\n" +#| " CHECK_VERSION(arguments_ty, 8, \"Positional-only parameters are\", _PyPegen_make_arguments(p, NULL, a, NULL, b, c)) }\n" +#| " | a[asdl_arg_seq*]=param_no_default+ b=param_with_default* c=[star_etc] {\n" +#| " _PyPegen_make_arguments(p, NULL, NULL, a, b, c) }\n" +#| " | a=param_with_default+ b=[star_etc] { _PyPegen_make_arguments(p, NULL, NULL, NULL, a, b)}\n" +#| " | a=star_etc { _PyPegen_make_arguments(p, NULL, NULL, NULL, NULL, a) }\n" +#| "\n" +#| "# Some duplication here because we can't write (',' | &')'),\n" +#| "# which is because we don't support empty alternatives (yet).\n" +#| "\n" +#| "slash_no_default[asdl_arg_seq*]:\n" +#| " | a[asdl_arg_seq*]=param_no_default+ '/' ',' { a }\n" +#| " | a[asdl_arg_seq*]=param_no_default+ '/' &')' { a }\n" +#| "slash_with_default[SlashWithDefault*]:\n" +#| " | a=param_no_default* b=param_with_default+ '/' ',' { _PyPegen_slash_with_default(p, (asdl_arg_seq *)a, b) }\n" +#| " | a=param_no_default* b=param_with_default+ '/' &')' { _PyPegen_slash_with_default(p, (asdl_arg_seq *)a, b) }\n" +#| "\n" +#| "star_etc[StarEtc*]:\n" +#| " | invalid_star_etc\n" +#| " | '*' a=param_no_default b=param_maybe_default* c=[kwds] {\n" +#| " _PyPegen_star_etc(p, a, b, c) }\n" +#| " | '*' a=param_no_default_star_annotation b=param_maybe_default* c=[kwds] {\n" +#| " _PyPegen_star_etc(p, a, b, c) }\n" +#| " | '*' ',' b=param_maybe_default+ c=[kwds] {\n" +#| " _PyPegen_star_etc(p, NULL, b, c) }\n" +#| " | a=kwds { _PyPegen_star_etc(p, NULL, NULL, a) }\n" +#| "\n" +#| "kwds[arg_ty]:\n" +#| " | invalid_kwds\n" +#| " | '**' a=param_no_default { a }\n" +#| "\n" +#| "# One parameter. This *includes* a following comma and type comment.\n" +#| "#\n" +#| "# There are three styles:\n" +#| "# - No default\n" +#| "# - With default\n" +#| "# - Maybe with default\n" +#| "#\n" +#| "# There are two alternative forms of each, to deal with type comments:\n" +#| "# - Ends in a comma followed by an optional type comment\n" +#| "# - No comma, optional type comment, must be followed by close paren\n" +#| "# The latter form is for a final parameter without trailing comma.\n" +#| "#\n" +#| "\n" +#| "param_no_default[arg_ty]:\n" +#| " | a=param ',' tc=TYPE_COMMENT? { _PyPegen_add_type_comment_to_arg(p, a, tc) }\n" +#| " | a=param tc=TYPE_COMMENT? &')' { _PyPegen_add_type_comment_to_arg(p, a, tc) }\n" +#| "param_no_default_star_annotation[arg_ty]:\n" +#| " | a=param_star_annotation ',' tc=TYPE_COMMENT? { _PyPegen_add_type_comment_to_arg(p, a, tc) }\n" +#| " | a=param_star_annotation tc=TYPE_COMMENT? &')' { _PyPegen_add_type_comment_to_arg(p, a, tc) }\n" +#| "param_with_default[NameDefaultPair*]:\n" +#| " | a=param c=default ',' tc=TYPE_COMMENT? { _PyPegen_name_default_pair(p, a, c, tc) }\n" +#| " | a=param c=default tc=TYPE_COMMENT? &')' { _PyPegen_name_default_pair(p, a, c, tc) }\n" +#| "param_maybe_default[NameDefaultPair*]:\n" +#| " | a=param c=default? ',' tc=TYPE_COMMENT? { _PyPegen_name_default_pair(p, a, c, tc) }\n" +#| " | a=param c=default? tc=TYPE_COMMENT? &')' { _PyPegen_name_default_pair(p, a, c, tc) }\n" +#| "param[arg_ty]: a=NAME b=annotation? { _PyAST_arg(a->v.Name.id, b, NULL, EXTRA) }\n" +#| "param_star_annotation[arg_ty]: a=NAME b=star_annotation { _PyAST_arg(a->v.Name.id, b, NULL, EXTRA) }\n" +#| "annotation[expr_ty]: ':' a=expression { a }\n" +#| "star_annotation[expr_ty]: ':' a=star_expression { a }\n" +#| "default[expr_ty]: '=' a=expression { a } | invalid_default\n" +#| "\n" +#| "# If statement\n" +#| "# ------------\n" +#| "\n" +#| "if_stmt[stmt_ty]:\n" +#| " | invalid_if_stmt\n" +#| " | 'if' a=named_expression ':' b=block c=elif_stmt {\n" +#| " _PyAST_If(a, b, CHECK(asdl_stmt_seq*, _PyPegen_singleton_seq(p, c)), EXTRA) }\n" +#| " | 'if' a=named_expression ':' b=block c=[else_block] { _PyAST_If(a, b, c, EXTRA) }\n" +#| "elif_stmt[stmt_ty]:\n" +#| " | invalid_elif_stmt\n" +#| " | 'elif' a=named_expression ':' b=block c=elif_stmt {\n" +#| " _PyAST_If(a, b, CHECK(asdl_stmt_seq*, _PyPegen_singleton_seq(p, c)), EXTRA) }\n" +#| " | 'elif' a=named_expression ':' b=block c=[else_block] { _PyAST_If(a, b, c, EXTRA) }\n" +#| "else_block[asdl_stmt_seq*]:\n" +#| " | invalid_else_stmt\n" +#| " | 'else' &&':' b=block { b }\n" +#| "\n" +#| "# While statement\n" +#| "# ---------------\n" +#| "\n" +#| "while_stmt[stmt_ty]:\n" +#| " | invalid_while_stmt\n" +#| " | 'while' a=named_expression ':' b=block c=[else_block] { _PyAST_While(a, b, c, EXTRA) }\n" +#| "\n" +#| "# For statement\n" +#| "# -------------\n" +#| "\n" +#| "for_stmt[stmt_ty]:\n" +#| " | invalid_for_stmt\n" +#| " | 'for' t=star_targets 'in' ~ ex=star_expressions ':' tc=[TYPE_COMMENT] b=block el=[else_block] {\n" +#| " _PyAST_For(t, ex, b, el, NEW_TYPE_COMMENT(p, tc), EXTRA) }\n" +#| " | 'async' 'for' t=star_targets 'in' ~ ex=star_expressions ':' tc=[TYPE_COMMENT] b=block el=[else_block] {\n" +#| " CHECK_VERSION(stmt_ty, 5, \"Async for loops are\", _PyAST_AsyncFor(t, ex, b, el, NEW_TYPE_COMMENT(p, tc), EXTRA)) }\n" +#| " | invalid_for_target\n" +#| "\n" +#| "# With statement\n" +#| "# --------------\n" +#| "\n" +#| "with_stmt[stmt_ty]:\n" +#| " | invalid_with_stmt_indent\n" +#| " | 'with' '(' a[asdl_withitem_seq*]=','.with_item+ ','? ')' ':' tc=[TYPE_COMMENT] b=block {\n" +#| " _PyAST_With(a, b, NEW_TYPE_COMMENT(p, tc), EXTRA) }\n" +#| " | 'with' a[asdl_withitem_seq*]=','.with_item+ ':' tc=[TYPE_COMMENT] b=block {\n" +#| " _PyAST_With(a, b, NEW_TYPE_COMMENT(p, tc), EXTRA) }\n" +#| " | 'async' 'with' '(' a[asdl_withitem_seq*]=','.with_item+ ','? ')' ':' b=block {\n" +#| " CHECK_VERSION(stmt_ty, 5, \"Async with statements are\", _PyAST_AsyncWith(a, b, NULL, EXTRA)) }\n" +#| " | 'async' 'with' a[asdl_withitem_seq*]=','.with_item+ ':' tc=[TYPE_COMMENT] b=block {\n" +#| " CHECK_VERSION(stmt_ty, 5, \"Async with statements are\", _PyAST_AsyncWith(a, b, NEW_TYPE_COMMENT(p, tc), EXTRA)) }\n" +#| " | invalid_with_stmt\n" +#| "\n" +#| "with_item[withitem_ty]:\n" +#| " | e=expression 'as' t=star_target &(',' | ')' | ':') { _PyAST_withitem(e, t, p->arena) }\n" +#| " | invalid_with_item\n" +#| " | e=expression { _PyAST_withitem(e, NULL, p->arena) }\n" +#| "\n" +#| "# Try statement\n" +#| "# -------------\n" +#| "\n" +#| "try_stmt[stmt_ty]:\n" +#| " | invalid_try_stmt\n" +#| " | 'try' &&':' b=block f=finally_block { _PyAST_Try(b, NULL, NULL, f, EXTRA) }\n" +#| " | 'try' &&':' b=block ex[asdl_excepthandler_seq*]=except_block+ el=[else_block] f=[finally_block] { _PyAST_Try(b, ex, el, f, EXTRA) }\n" +#| " | 'try' &&':' b=block ex[asdl_excepthandler_seq*]=except_star_block+ el=[else_block] f=[finally_block] {\n" +#| " CHECK_VERSION(stmt_ty, 11, \"Exception groups are\",\n" +#| " _PyAST_TryStar(b, ex, el, f, EXTRA)) }\n" +#| "\n" +#| "\n" +#| "# Except statement\n" +#| "# ----------------\n" +#| "\n" +#| "except_block[excepthandler_ty]:\n" +#| " | invalid_except_stmt_indent\n" +#| " | 'except' e=expression ':' b=block {\n" +#| " _PyAST_ExceptHandler(e, NULL, b, EXTRA) }\n" +#| " | 'except' e=expression 'as' t=NAME ':' b=block {\n" +#| " _PyAST_ExceptHandler(e, ((expr_ty) t)->v.Name.id, b, EXTRA) }\n" +#| " | 'except' e=expressions ':' b=block {\n" +#| " CHECK_VERSION(\n" +#| " excepthandler_ty,\n" +#| " 14,\n" +#| " \"except expressions without parentheses are\",\n" +#| " _PyAST_ExceptHandler(e, NULL, b, EXTRA)) }\n" +#| " | 'except' ':' b=block { _PyAST_ExceptHandler(NULL, NULL, b, EXTRA) }\n" +#| " | invalid_except_stmt\n" +#| "except_star_block[excepthandler_ty]:\n" +#| " | invalid_except_star_stmt_indent\n" +#| " | 'except' '*' e=expression ':' b=block {\n" +#| " _PyAST_ExceptHandler(e, NULL, b, EXTRA) }\n" +#| " | 'except' '*' e=expression 'as' t=NAME ':' b=block {\n" +#| " _PyAST_ExceptHandler(e, ((expr_ty) t)->v.Name.id, b, EXTRA) }\n" +#| " | 'except' '*' e=expressions ':' b=block {\n" +#| " CHECK_VERSION(\n" +#| " excepthandler_ty,\n" +#| " 14,\n" +#| " \"except expressions without parentheses are\",\n" +#| " _PyAST_ExceptHandler(e, NULL, b, EXTRA)) }\n" +#| " | invalid_except_star_stmt\n" +#| "finally_block[asdl_stmt_seq*]:\n" +#| " | invalid_finally_stmt\n" +#| " | 'finally' &&':' a=block { a }\n" +#| "\n" +#| "# Match statement\n" +#| "# ---------------\n" +#| "\n" +#| "match_stmt[stmt_ty]:\n" +#| " | \"match\" subject=subject_expr ':' NEWLINE INDENT cases[asdl_match_case_seq*]=case_block+ DEDENT {\n" +#| " CHECK_VERSION(stmt_ty, 10, \"Pattern matching is\", _PyAST_Match(subject, cases, EXTRA)) }\n" +#| " | invalid_match_stmt\n" +#| "\n" +#| "subject_expr[expr_ty]:\n" +#| " | value=star_named_expression ',' values=star_named_expressions? {\n" +#| " _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, value, values)), Load, EXTRA) }\n" +#| " | named_expression\n" +#| "\n" +#| "case_block[match_case_ty]:\n" +#| " | invalid_case_block\n" +#| " | \"case\" pattern=patterns guard=guard? ':' body=block {\n" +#| " _PyAST_match_case(pattern, guard, body, p->arena) }\n" +#| "\n" +#| "guard[expr_ty]: 'if' guard=named_expression { guard }\n" +#| "\n" +#| "patterns[pattern_ty]:\n" +#| " | patterns[asdl_pattern_seq*]=open_sequence_pattern {\n" +#| " _PyAST_MatchSequence(patterns, EXTRA) }\n" +#| " | pattern\n" +#| "\n" +#| "pattern[pattern_ty]:\n" +#| " | as_pattern\n" +#| " | or_pattern\n" +#| "\n" +#| "as_pattern[pattern_ty]:\n" +#| " | pattern=or_pattern 'as' target=pattern_capture_target {\n" +#| " _PyAST_MatchAs(pattern, target->v.Name.id, EXTRA) }\n" +#| " | invalid_as_pattern\n" +#| "\n" +#| "or_pattern[pattern_ty]:\n" +#| " | patterns[asdl_pattern_seq*]='|'.closed_pattern+ {\n" +#| " asdl_seq_LEN(patterns) == 1 ? asdl_seq_GET(patterns, 0) : _PyAST_MatchOr(patterns, EXTRA) }\n" +#| "\n" +#| "closed_pattern[pattern_ty] (memo):\n" +#| " | literal_pattern\n" +#| " | capture_pattern\n" +#| " | wildcard_pattern\n" +#| " | value_pattern\n" +#| " | group_pattern\n" +#| " | sequence_pattern\n" +#| " | mapping_pattern\n" +#| " | class_pattern\n" +#| "\n" +#| "# Literal patterns are used for equality and identity constraints\n" +#| "literal_pattern[pattern_ty]:\n" +#| " | value=signed_number !('+' | '-') { _PyAST_MatchValue(value, EXTRA) }\n" +#| " | value=complex_number { _PyAST_MatchValue(value, EXTRA) }\n" +#| " | value=strings { _PyAST_MatchValue(value, EXTRA) }\n" +#| " | 'None' { _PyAST_MatchSingleton(Py_None, EXTRA) }\n" +#| " | 'True' { _PyAST_MatchSingleton(Py_True, EXTRA) }\n" +#| " | 'False' { _PyAST_MatchSingleton(Py_False, EXTRA) }\n" +#| "\n" +#| "# Literal expressions are used to restrict permitted mapping pattern keys\n" +#| "literal_expr[expr_ty]:\n" +#| " | signed_number !('+' | '-')\n" +#| " | complex_number\n" +#| " | &(STRING|FSTRING_START|TSTRING_START) strings\n" +#| " | 'None' { _PyAST_Constant(Py_None, NULL, EXTRA) }\n" +#| " | 'True' { _PyAST_Constant(Py_True, NULL, EXTRA) }\n" +#| " | 'False' { _PyAST_Constant(Py_False, NULL, EXTRA) }\n" +#| "\n" +#| "complex_number[expr_ty]:\n" +#| " | real=signed_real_number '+' imag=imaginary_number {\n" +#| " _PyAST_BinOp(real, Add, imag, EXTRA) }\n" +#| " | real=signed_real_number '-' imag=imaginary_number {\n" +#| " _PyAST_BinOp(real, Sub, imag, EXTRA) }\n" +#| "\n" +#| "signed_number[expr_ty]:\n" +#| " | NUMBER\n" +#| " | '-' number=NUMBER { _PyAST_UnaryOp(USub, number, EXTRA) }\n" +#| "\n" +#| "signed_real_number[expr_ty]:\n" +#| " | real_number\n" +#| " | '-' real=real_number { _PyAST_UnaryOp(USub, real, EXTRA) }\n" +#| "\n" +#| "real_number[expr_ty]:\n" +#| " | real=NUMBER { _PyPegen_ensure_real(p, real) }\n" +#| "\n" +#| "imaginary_number[expr_ty]:\n" +#| " | imag=NUMBER { _PyPegen_ensure_imaginary(p, imag) }\n" +#| "\n" +#| "capture_pattern[pattern_ty]:\n" +#| " | target=pattern_capture_target { _PyAST_MatchAs(NULL, target->v.Name.id, EXTRA) }\n" +#| "\n" +#| "pattern_capture_target[expr_ty]:\n" +#| " | !\"_\" name=NAME !('.' | '(' | '=') {\n" +#| " _PyPegen_set_expr_context(p, name, Store) }\n" +#| "\n" +#| "wildcard_pattern[pattern_ty]:\n" +#| " | \"_\" { _PyAST_MatchAs(NULL, NULL, EXTRA) }\n" +#| "\n" +#| "value_pattern[pattern_ty]:\n" +#| " | attr=attr !('.' | '(' | '=') { _PyAST_MatchValue(attr, EXTRA) }\n" +#| "\n" +#| "attr[expr_ty]:\n" +#| " | value=name_or_attr '.' attr=NAME {\n" +#| " _PyAST_Attribute(value, attr->v.Name.id, Load, EXTRA) }\n" +#| "\n" +#| "name_or_attr[expr_ty]:\n" +#| " | attr\n" +#| " | NAME\n" +#| "\n" +#| "group_pattern[pattern_ty]:\n" +#| " | '(' pattern=pattern ')' { pattern }\n" +#| "\n" +#| "sequence_pattern[pattern_ty]:\n" +#| " | '[' patterns=maybe_sequence_pattern? ']' { _PyAST_MatchSequence(patterns, EXTRA) }\n" +#| " | '(' patterns=open_sequence_pattern? ')' { _PyAST_MatchSequence(patterns, EXTRA) }\n" +#| "\n" +#| "open_sequence_pattern[asdl_seq*]:\n" +#| " | pattern=maybe_star_pattern ',' patterns=maybe_sequence_pattern? {\n" +#| " _PyPegen_seq_insert_in_front(p, pattern, patterns) }\n" +#| "\n" +#| "maybe_sequence_pattern[asdl_seq*]:\n" +#| " | patterns=','.maybe_star_pattern+ ','? { patterns }\n" +#| "\n" +#| "maybe_star_pattern[pattern_ty]:\n" +#| " | star_pattern\n" +#| " | pattern\n" +#| "\n" +#| "star_pattern[pattern_ty] (memo):\n" +#| " | '*' target=pattern_capture_target {\n" +#| " _PyAST_MatchStar(target->v.Name.id, EXTRA) }\n" +#| " | '*' wildcard_pattern {\n" +#| " _PyAST_MatchStar(NULL, EXTRA) }\n" +#| "\n" +#| "mapping_pattern[pattern_ty]:\n" +#| " | '{' '}' {\n" +#| " _PyAST_MatchMapping(NULL, NULL, NULL, EXTRA) }\n" +#| " | '{' rest=double_star_pattern ','? '}' {\n" +#| " _PyAST_MatchMapping(NULL, NULL, rest->v.Name.id, EXTRA) }\n" +#| " | '{' items=items_pattern ',' rest=double_star_pattern ','? '}' {\n" +#| " _PyAST_MatchMapping(\n" +#| " CHECK(asdl_expr_seq*, _PyPegen_get_pattern_keys(p, items)),\n" +#| " CHECK(asdl_pattern_seq*, _PyPegen_get_patterns(p, items)),\n" +#| " rest->v.Name.id,\n" +#| " EXTRA) }\n" +#| " | '{' items=items_pattern ','? '}' {\n" +#| " _PyAST_MatchMapping(\n" +#| " CHECK(asdl_expr_seq*, _PyPegen_get_pattern_keys(p, items)),\n" +#| " CHECK(asdl_pattern_seq*, _PyPegen_get_patterns(p, items)),\n" +#| " NULL,\n" +#| " EXTRA) }\n" +#| "\n" +#| "items_pattern[asdl_seq*]:\n" +#| " | ','.key_value_pattern+\n" +#| "\n" +#| "key_value_pattern[KeyPatternPair*]:\n" +#| " | key=(literal_expr | attr) ':' pattern=pattern {\n" +#| " _PyPegen_key_pattern_pair(p, key, pattern) }\n" +#| "\n" +#| "double_star_pattern[expr_ty]:\n" +#| " | '**' target=pattern_capture_target { target }\n" +#| "\n" +#| "class_pattern[pattern_ty]:\n" +#| " | cls=name_or_attr '(' ')' {\n" +#| " _PyAST_MatchClass(cls, NULL, NULL, NULL, EXTRA) }\n" +#| " | cls=name_or_attr '(' patterns=positional_patterns ','? ')' {\n" +#| " _PyAST_MatchClass(cls, patterns, NULL, NULL, EXTRA) }\n" +#| " | cls=name_or_attr '(' keywords=keyword_patterns ','? ')' {\n" +#| " _PyAST_MatchClass(\n" +#| " cls, NULL,\n" +#| " CHECK(asdl_identifier_seq*, _PyPegen_map_names_to_ids(p,\n" +#| " CHECK(asdl_expr_seq*, _PyPegen_get_pattern_keys(p, keywords)))),\n" +#| " CHECK(asdl_pattern_seq*, _PyPegen_get_patterns(p, keywords)),\n" +#| " EXTRA) }\n" +#| " | cls=name_or_attr '(' patterns=positional_patterns ',' keywords=keyword_patterns ','? ')' {\n" +#| " _PyAST_MatchClass(\n" +#| " cls,\n" +#| " patterns,\n" +#| " CHECK(asdl_identifier_seq*, _PyPegen_map_names_to_ids(p,\n" +#| " CHECK(asdl_expr_seq*, _PyPegen_get_pattern_keys(p, keywords)))),\n" +#| " CHECK(asdl_pattern_seq*, _PyPegen_get_patterns(p, keywords)),\n" +#| " EXTRA) }\n" +#| " | invalid_class_pattern\n" +#| "\n" +#| "positional_patterns[asdl_pattern_seq*]:\n" +#| " | args[asdl_pattern_seq*]=','.pattern+ { args }\n" +#| "\n" +#| "keyword_patterns[asdl_seq*]:\n" +#| " | ','.keyword_pattern+\n" +#| "\n" +#| "keyword_pattern[KeyPatternPair*]:\n" +#| " | arg=NAME '=' value=pattern { _PyPegen_key_pattern_pair(p, arg, value) }\n" +#| "\n" +#| "# Type statement\n" +#| "# ---------------\n" +#| "\n" +#| "type_alias[stmt_ty]:\n" +#| " | \"type\" n=NAME t=[type_params] '=' b=expression {\n" +#| " CHECK_VERSION(stmt_ty, 12, \"Type statement is\",\n" +#| " _PyAST_TypeAlias(CHECK(expr_ty, _PyPegen_set_expr_context(p, n, Store)), t, b, EXTRA)) }\n" +#| "\n" +#| "# Type parameter declaration\n" +#| "# --------------------------\n" +#| "\n" +#| "type_params[asdl_type_param_seq*]:\n" +#| " | invalid_type_params\n" +#| " | '[' t=type_param_seq ']' {\n" +#| " CHECK_VERSION(asdl_type_param_seq *, 12, \"Type parameter lists are\", t) }\n" +#| "\n" +#| "type_param_seq[asdl_type_param_seq*]: a[asdl_type_param_seq*]=','.type_param+ [','] { a }\n" +#| "\n" +#| "type_param[type_param_ty] (memo):\n" +#| " | a=NAME b=[type_param_bound] c=[type_param_default] { _PyAST_TypeVar(a->v.Name.id, b, c, EXTRA) }\n" +#| " | invalid_type_param\n" +#| " | '*' a=NAME b=[type_param_starred_default] { _PyAST_TypeVarTuple(a->v.Name.id, b, EXTRA) }\n" +#| " | '**' a=NAME b=[type_param_default] { _PyAST_ParamSpec(a->v.Name.id, b, EXTRA) }\n" +#| "\n" +#| "type_param_bound[expr_ty]: ':' e=expression { e }\n" +#| "type_param_default[expr_ty]: '=' e=expression {\n" +#| " CHECK_VERSION(expr_ty, 13, \"Type parameter defaults are\", e) }\n" +#| "type_param_starred_default[expr_ty]: '=' e=star_expression {\n" +#| " CHECK_VERSION(expr_ty, 13, \"Type parameter defaults are\", e) }\n" +#| "\n" +#| "# EXPRESSIONS\n" +#| "# -----------\n" +#| "\n" +#| "expressions[expr_ty]:\n" +#| " | a=expression b=(',' c=expression { c })+ [','] {\n" +#| " _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)), Load, EXTRA) }\n" +#| " | a=expression ',' { _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_singleton_seq(p, a)), Load, EXTRA) }\n" +#| " | expression\n" +#| "\n" +#| "expression[expr_ty] (memo):\n" +#| " | invalid_expression\n" +#| " | invalid_legacy_expression\n" +#| " | a=disjunction 'if' b=disjunction 'else' c=expression { _PyAST_IfExp(b, a, c, EXTRA) }\n" +#| " | disjunction\n" +#| " | lambdef\n" +#| "\n" +#| "yield_expr[expr_ty]:\n" +#| " | 'yield' 'from' a=expression { _PyAST_YieldFrom(a, EXTRA) }\n" +#| " | 'yield' a=[star_expressions] { _PyAST_Yield(a, EXTRA) }\n" +#| "\n" +#| "star_expressions[expr_ty]:\n" +#| " | a=star_expression b=(',' c=star_expression { c })+ [','] {\n" +#| " _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)), Load, EXTRA) }\n" +#| " | a=star_expression ',' { _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_singleton_seq(p, a)), Load, EXTRA) }\n" +#| " | star_expression\n" +#| "\n" +#| "star_expression[expr_ty] (memo):\n" +#| " | '*' a=bitwise_or { _PyAST_Starred(a, Load, EXTRA) }\n" +#| " | expression\n" +#| "\n" +#| "star_named_expressions[asdl_expr_seq*]: a[asdl_expr_seq*]=','.star_named_expression+ [','] { a }\n" +#| "\n" +#| "star_named_expression[expr_ty]:\n" +#| " | '*' a=bitwise_or { _PyAST_Starred(a, Load, EXTRA) }\n" +#| " | named_expression\n" +#| "\n" +#| "assignment_expression[expr_ty]:\n" +#| " | a=NAME ':=' ~ b=expression {\n" +#| " CHECK_VERSION(expr_ty, 8, \"Assignment expressions are\",\n" +#| " _PyAST_NamedExpr(CHECK(expr_ty, _PyPegen_set_expr_context(p, a, Store)), b, EXTRA)) }\n" +#| "\n" +#| "named_expression[expr_ty]:\n" +#| " | assignment_expression\n" +#| " | invalid_named_expression\n" +#| " | expression !':='\n" +#| "\n" +#| "disjunction[expr_ty] (memo):\n" +#| " | a=conjunction b=('or' c=conjunction { c })+ { _PyAST_BoolOp(\n" +#| " Or,\n" +#| " CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)),\n" +#| " EXTRA) }\n" +#| " | conjunction\n" +#| "\n" +#| "conjunction[expr_ty] (memo):\n" +#| " | a=inversion b=('and' c=inversion { c })+ { _PyAST_BoolOp(\n" +#| " And,\n" +#| " CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)),\n" +#| " EXTRA) }\n" +#| " | inversion\n" +#| "\n" +#| "inversion[expr_ty] (memo):\n" +#| " | 'not' a=inversion { _PyAST_UnaryOp(Not, a, EXTRA) }\n" +#| " | comparison\n" +#| "\n" +#| "# Comparison operators\n" +#| "# --------------------\n" +#| "\n" +#| "comparison[expr_ty]:\n" +#| " | a=bitwise_or b=compare_op_bitwise_or_pair+ {\n" +#| " _PyAST_Compare(\n" +#| " a,\n" +#| " CHECK(asdl_int_seq*, _PyPegen_get_cmpops(p, b)),\n" +#| " CHECK(asdl_expr_seq*, _PyPegen_get_exprs(p, b)),\n" +#| " EXTRA) }\n" +#| " | bitwise_or\n" +#| "\n" +#| "compare_op_bitwise_or_pair[CmpopExprPair*]:\n" +#| " | eq_bitwise_or\n" +#| " | noteq_bitwise_or\n" +#| " | lte_bitwise_or\n" +#| " | lt_bitwise_or\n" +#| " | gte_bitwise_or\n" +#| " | gt_bitwise_or\n" +#| " | notin_bitwise_or\n" +#| " | in_bitwise_or\n" +#| " | isnot_bitwise_or\n" +#| " | is_bitwise_or\n" +#| "\n" +#| "eq_bitwise_or[CmpopExprPair*]: '==' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, Eq, a) }\n" +#| "noteq_bitwise_or[CmpopExprPair*]:\n" +#| " | (tok='!=' { _PyPegen_check_barry_as_flufl(p, tok) ? NULL : tok}) a=bitwise_or {_PyPegen_cmpop_expr_pair(p, NotEq, a) }\n" +#| "lte_bitwise_or[CmpopExprPair*]: '<=' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, LtE, a) }\n" +#| "lt_bitwise_or[CmpopExprPair*]: '<' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, Lt, a) }\n" +#| "gte_bitwise_or[CmpopExprPair*]: '>=' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, GtE, a) }\n" +#| "gt_bitwise_or[CmpopExprPair*]: '>' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, Gt, a) }\n" +#| "notin_bitwise_or[CmpopExprPair*]: 'not' 'in' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, NotIn, a) }\n" +#| "in_bitwise_or[CmpopExprPair*]: 'in' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, In, a) }\n" +#| "isnot_bitwise_or[CmpopExprPair*]: 'is' 'not' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, IsNot, a) }\n" +#| "is_bitwise_or[CmpopExprPair*]: 'is' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, Is, a) }\n" +#| "\n" +#| "# Bitwise operators\n" +#| "# -----------------\n" +#| "\n" +#| "bitwise_or[expr_ty]:\n" +#| " | a=bitwise_or '|' b=bitwise_xor { _PyAST_BinOp(a, BitOr, b, EXTRA) }\n" +#| " | bitwise_xor\n" +#| "\n" +#| "bitwise_xor[expr_ty]:\n" +#| " | a=bitwise_xor '^' b=bitwise_and { _PyAST_BinOp(a, BitXor, b, EXTRA) }\n" +#| " | bitwise_and\n" +#| "\n" +#| "bitwise_and[expr_ty]:\n" +#| " | a=bitwise_and '&' b=shift_expr { _PyAST_BinOp(a, BitAnd, b, EXTRA) }\n" +#| " | shift_expr\n" +#| "\n" +#| "shift_expr[expr_ty]:\n" +#| " | a=shift_expr '<<' b=sum { _PyAST_BinOp(a, LShift, b, EXTRA) }\n" +#| " | a=shift_expr '>>' b=sum { _PyAST_BinOp(a, RShift, b, EXTRA) }\n" +#| " | invalid_arithmetic\n" +#| " | sum\n" +#| "\n" +#| "# Arithmetic operators\n" +#| "# --------------------\n" +#| "\n" +#| "sum[expr_ty]:\n" +#| " | a=sum '+' b=term { _PyAST_BinOp(a, Add, b, EXTRA) }\n" +#| " | a=sum '-' b=term { _PyAST_BinOp(a, Sub, b, EXTRA) }\n" +#| " | term\n" +#| "\n" +#| "term[expr_ty]:\n" +#| " | a=term '*' b=factor { _PyAST_BinOp(a, Mult, b, EXTRA) }\n" +#| " | a=term '/' b=factor { _PyAST_BinOp(a, Div, b, EXTRA) }\n" +#| " | a=term '//' b=factor { _PyAST_BinOp(a, FloorDiv, b, EXTRA) }\n" +#| " | a=term '%' b=factor { _PyAST_BinOp(a, Mod, b, EXTRA) }\n" +#| " | a=term '@' b=factor { CHECK_VERSION(expr_ty, 5, \"The '@' operator is\", _PyAST_BinOp(a, MatMult, b, EXTRA)) }\n" +#| " | invalid_factor\n" +#| " | factor\n" +#| "\n" +#| "factor[expr_ty] (memo):\n" +#| " | '+' a=factor { _PyAST_UnaryOp(UAdd, a, EXTRA) }\n" +#| " | '-' a=factor { _PyAST_UnaryOp(USub, a, EXTRA) }\n" +#| " | '~' a=factor { _PyAST_UnaryOp(Invert, a, EXTRA) }\n" +#| " | power\n" +#| "\n" +#| "power[expr_ty]:\n" +#| " | a=await_primary '**' b=factor { _PyAST_BinOp(a, Pow, b, EXTRA) }\n" +#| " | await_primary\n" +#| "\n" +#| "# Primary elements\n" +#| "# ----------------\n" +#| "\n" +#| "# Primary elements are things like \"obj.something.something\", \"obj[something]\", \"obj(something)\", \"obj\" ...\n" +#| "\n" +#| "await_primary[expr_ty] (memo):\n" +#| " | 'await' a=primary { CHECK_VERSION(expr_ty, 5, \"Await expressions are\", _PyAST_Await(a, EXTRA)) }\n" +#| " | primary\n" +#| "\n" +#| "primary[expr_ty]:\n" +#| " | a=primary '.' b=NAME { _PyAST_Attribute(a, b->v.Name.id, Load, EXTRA) }\n" +#| " | a=primary b=genexp { _PyAST_Call(a, CHECK(asdl_expr_seq*, (asdl_expr_seq*)_PyPegen_singleton_seq(p, b)), NULL, EXTRA) }\n" +#| " | a=primary '(' b=[arguments] ')' {\n" +#| " _PyAST_Call(a,\n" +#| " (b) ? ((expr_ty) b)->v.Call.args : NULL,\n" +#| " (b) ? ((expr_ty) b)->v.Call.keywords : NULL,\n" +#| " EXTRA) }\n" +#| " | a=primary '[' b=slices ']' { _PyAST_Subscript(a, b, Load, EXTRA) }\n" +#| " | atom\n" +#| "\n" +#| "slices[expr_ty]:\n" +#| " | a=slice !',' { a }\n" +#| " | a[asdl_expr_seq*]=','.(slice | starred_expression)+ [','] { _PyAST_Tuple(a, Load, EXTRA) }\n" +#| "\n" +#| "slice[expr_ty]:\n" +#| " | a=[expression] ':' b=[expression] c=[':' d=[expression] { d }] { _PyAST_Slice(a, b, c, EXTRA) }\n" +#| " | a=named_expression { a }\n" +#| "\n" +#| "atom[expr_ty]:\n" +#| " | NAME\n" +#| " | 'True' { _PyAST_Constant(Py_True, NULL, EXTRA) }\n" +#| " | 'False' { _PyAST_Constant(Py_False, NULL, EXTRA) }\n" +#| " | 'None' { _PyAST_Constant(Py_None, NULL, EXTRA) }\n" +#| " | &(STRING|FSTRING_START|TSTRING_START) strings\n" +#| " | NUMBER\n" +#| " | &'(' (tuple | group | genexp)\n" +#| " | &'[' (list | listcomp)\n" +#| " | &'{' (dict | set | dictcomp | setcomp)\n" +#| " | '...' { _PyAST_Constant(Py_Ellipsis, NULL, EXTRA) }\n" +#| "\n" +#| "group[expr_ty]:\n" +#| " | '(' a=(yield_expr | named_expression) ')' { a }\n" +#| " | invalid_group\n" +#| "\n" +#| "# Lambda functions\n" +#| "# ----------------\n" +#| "\n" +#| "lambdef[expr_ty]:\n" +#| " | 'lambda' a=[lambda_params] ':' b=expression {\n" +#| " _PyAST_Lambda((a) ? a : CHECK(arguments_ty, _PyPegen_empty_arguments(p)), b, EXTRA) }\n" +#| "\n" +#| "lambda_params[arguments_ty]:\n" +#| " | invalid_lambda_parameters\n" +#| " | lambda_parameters\n" +#| "\n" +#| "# lambda_parameters etc. duplicates parameters but without annotations\n" +#| "# or type comments, and if there's no comma after a parameter, we expect\n" +#| "# a colon, not a close parenthesis. (For more, see parameters above.)\n" +#| "#\n" +#| "lambda_parameters[arguments_ty]:\n" +#| " | a=lambda_slash_no_default b[asdl_arg_seq*]=lambda_param_no_default* c=lambda_param_with_default* d=[lambda_star_etc] {\n" +#| " CHECK_VERSION(arguments_ty, 8, \"Positional-only parameters are\", _PyPegen_make_arguments(p, a, NULL, b, c, d)) }\n" +#| " | a=lambda_slash_with_default b=lambda_param_with_default* c=[lambda_star_etc] {\n" +#| " CHECK_VERSION(arguments_ty, 8, \"Positional-only parameters are\", _PyPegen_make_arguments(p, NULL, a, NULL, b, c)) }\n" +#| " | a[asdl_arg_seq*]=lambda_param_no_default+ b=lambda_param_with_default* c=[lambda_star_etc] {\n" +#| " _PyPegen_make_arguments(p, NULL, NULL, a, b, c) }\n" +#| " | a=lambda_param_with_default+ b=[lambda_star_etc] { _PyPegen_make_arguments(p, NULL, NULL, NULL, a, b)}\n" +#| " | a=lambda_star_etc { _PyPegen_make_arguments(p, NULL, NULL, NULL, NULL, a) }\n" +#| "\n" +#| "lambda_slash_no_default[asdl_arg_seq*]:\n" +#| " | a[asdl_arg_seq*]=lambda_param_no_default+ '/' ',' { a }\n" +#| " | a[asdl_arg_seq*]=lambda_param_no_default+ '/' &':' { a }\n" +#| "\n" +#| "lambda_slash_with_default[SlashWithDefault*]:\n" +#| " | a=lambda_param_no_default* b=lambda_param_with_default+ '/' ',' { _PyPegen_slash_with_default(p, (asdl_arg_seq *)a, b) }\n" +#| " | a=lambda_param_no_default* b=lambda_param_with_default+ '/' &':' { _PyPegen_slash_with_default(p, (asdl_arg_seq *)a, b) }\n" +#| "\n" +#| "lambda_star_etc[StarEtc*]:\n" +#| " | invalid_lambda_star_etc\n" +#| " | '*' a=lambda_param_no_default b=lambda_param_maybe_default* c=[lambda_kwds] {\n" +#| " _PyPegen_star_etc(p, a, b, c) }\n" +#| " | '*' ',' b=lambda_param_maybe_default+ c=[lambda_kwds] {\n" +#| " _PyPegen_star_etc(p, NULL, b, c) }\n" +#| " | a=lambda_kwds { _PyPegen_star_etc(p, NULL, NULL, a) }\n" +#| "\n" +#| "lambda_kwds[arg_ty]:\n" +#| " | invalid_lambda_kwds\n" +#| " | '**' a=lambda_param_no_default { a }\n" +#| "\n" +#| "lambda_param_no_default[arg_ty]:\n" +#| " | a=lambda_param ',' { a }\n" +#| " | a=lambda_param &':' { a }\n" +#| "lambda_param_with_default[NameDefaultPair*]:\n" +#| " | a=lambda_param c=default ',' { _PyPegen_name_default_pair(p, a, c, NULL) }\n" +#| " | a=lambda_param c=default &':' { _PyPegen_name_default_pair(p, a, c, NULL) }\n" +#| "lambda_param_maybe_default[NameDefaultPair*]:\n" +#| " | a=lambda_param c=default? ',' { _PyPegen_name_default_pair(p, a, c, NULL) }\n" +#| " | a=lambda_param c=default? &':' { _PyPegen_name_default_pair(p, a, c, NULL) }\n" +#| "lambda_param[arg_ty]: a=NAME { _PyAST_arg(a->v.Name.id, NULL, NULL, EXTRA) }\n" +#| "\n" +#| "# LITERALS\n" +#| "# ========\n" +#| "\n" +#| "fstring_middle[expr_ty]:\n" +#| " | fstring_replacement_field\n" +#| " | t=FSTRING_MIDDLE { _PyPegen_constant_from_token(p, t) }\n" +#| "fstring_replacement_field[expr_ty]:\n" +#| " | '{' a=annotated_rhs debug_expr='='? conversion=[fstring_conversion] format=[fstring_full_format_spec] rbrace='}' {\n" +#| " _PyPegen_formatted_value(p, a, debug_expr, conversion, format, rbrace, EXTRA) }\n" +#| " | invalid_fstring_replacement_field\n" +#| "fstring_conversion[ResultTokenWithMetadata*]:\n" +#| " | conv_token=\"!\" conv=NAME { _PyPegen_check_fstring_conversion(p, conv_token, conv) }\n" +#| "fstring_full_format_spec[ResultTokenWithMetadata*]:\n" +#| " | colon=':' spec=fstring_format_spec* { _PyPegen_setup_full_format_spec(p, colon, (asdl_expr_seq *) spec, EXTRA) }\n" +#| "fstring_format_spec[expr_ty]:\n" +#| " | t=FSTRING_MIDDLE { _PyPegen_decoded_constant_from_token(p, t) }\n" +#| " | fstring_replacement_field\n" +#| "fstring[expr_ty]:\n" +#| " | a=FSTRING_START b=fstring_middle* c=FSTRING_END { _PyPegen_joined_str(p, a, (asdl_expr_seq*)b, c) }\n" +#| "\n" +#| "tstring_format_spec_replacement_field[expr_ty]:\n" +#| " | '{' a=annotated_rhs debug_expr='='? conversion=[fstring_conversion] format=[tstring_full_format_spec] rbrace='}' {\n" +#| " _PyPegen_formatted_value(p, a, debug_expr, conversion, format, rbrace, EXTRA) }\n" +#| " | invalid_tstring_replacement_field\n" +#| "tstring_format_spec[expr_ty]:\n" +#| " | t=TSTRING_MIDDLE { _PyPegen_decoded_constant_from_token(p, t) }\n" +#| " | tstring_format_spec_replacement_field\n" +#| "tstring_full_format_spec[ResultTokenWithMetadata*]:\n" +#| " | colon=':' spec=tstring_format_spec* { _PyPegen_setup_full_format_spec(p, colon, (asdl_expr_seq *) spec, EXTRA) }\n" +#| "tstring_replacement_field[expr_ty]:\n" +#| " | '{' a=annotated_rhs debug_expr='='? conversion=[fstring_conversion] format=[tstring_full_format_spec] rbrace='}' {\n" +#| " _PyPegen_interpolation(p, a, debug_expr, conversion, format, rbrace, EXTRA) }\n" +#| " | invalid_tstring_replacement_field\n" +#| "tstring_middle[expr_ty]:\n" +#| " | tstring_replacement_field\n" +#| " | t=TSTRING_MIDDLE { _PyPegen_constant_from_token(p, t) }\n" +#| "tstring[expr_ty] (memo):\n" +#| " | a=TSTRING_START b=tstring_middle* c=TSTRING_END {\n" +#| " CHECK_VERSION(\n" +#| " expr_ty,\n" +#| " 14,\n" +#| " \"t-strings are\",\n" +#| " _PyPegen_template_str(p, a, (asdl_expr_seq*)b, c)) }\n" +#| "\n" +#| "string[expr_ty]: s[Token*]=STRING { _PyPegen_constant_from_string(p, s) }\n" +#| "strings[expr_ty] (memo):\n" +#| " | invalid_string_tstring_concat\n" +#| " | a[asdl_expr_seq*]=(fstring|string)+ { _PyPegen_concatenate_strings(p, a, EXTRA) }\n" +#| " | a[asdl_expr_seq*]=tstring+ { _PyPegen_concatenate_tstrings(p, a, EXTRA) }\n" +#| "\n" +#| "list[expr_ty]:\n" +#| " | '[' a=[star_named_expressions] ']' { _PyAST_List(a, Load, EXTRA) }\n" +#| "\n" +#| "tuple[expr_ty]:\n" +#| " | '(' a=[y=star_named_expression ',' z=[star_named_expressions] { _PyPegen_seq_insert_in_front(p, y, z) } ] ')' {\n" +#| " _PyAST_Tuple(a, Load, EXTRA) }\n" +#| "\n" +#| "set[expr_ty]: '{' a=star_named_expressions '}' { _PyAST_Set(a, EXTRA) }\n" +#| "\n" +#| "# Dicts\n" +#| "# -----\n" +#| "\n" +#| "dict[expr_ty]:\n" +#| " | '{' a=[double_starred_kvpairs] '}' {\n" +#| " _PyAST_Dict(\n" +#| " CHECK(asdl_expr_seq*, _PyPegen_get_keys(p, a)),\n" +#| " CHECK(asdl_expr_seq*, _PyPegen_get_values(p, a)),\n" +#| " EXTRA) }\n" +#| " | '{' invalid_double_starred_kvpairs '}'\n" +#| "\n" +#| "double_starred_kvpairs[asdl_seq*]: a=','.double_starred_kvpair+ [','] { a }\n" +#| "\n" +#| "double_starred_kvpair[KeyValuePair*]:\n" +#| " | '**' a=bitwise_or { _PyPegen_key_value_pair(p, NULL, a) }\n" +#| " | kvpair\n" +#| "\n" +#| "kvpair[KeyValuePair*]: a=expression ':' b=expression { _PyPegen_key_value_pair(p, a, b) }\n" +#| "\n" +#| "# Comprehensions & Generators\n" +#| "# ---------------------------\n" +#| "\n" +#| "for_if_clauses[asdl_comprehension_seq*]:\n" +#| " | a[asdl_comprehension_seq*]=for_if_clause+ { a }\n" +#| "\n" +#| "for_if_clause[comprehension_ty]:\n" +#| " | 'async' 'for' a=star_targets 'in' ~ b=disjunction c[asdl_expr_seq*]=('if' z=disjunction { z })* {\n" +#| " CHECK_VERSION(comprehension_ty, 6, \"Async comprehensions are\", _PyAST_comprehension(a, b, c, 1, p->arena)) }\n" +#| " | 'for' a=star_targets 'in' ~ b=disjunction c[asdl_expr_seq*]=('if' z=disjunction { z })* {\n" +#| " _PyAST_comprehension(a, b, c, 0, p->arena) }\n" +#| " | invalid_for_if_clause\n" +#| " | invalid_for_target\n" +#| "\n" +#| "listcomp[expr_ty]:\n" +#| " | '[' a=named_expression b=for_if_clauses ']' { _PyAST_ListComp(a, b, EXTRA) }\n" +#| " | invalid_comprehension\n" +#| "\n" +#| "setcomp[expr_ty]:\n" +#| " | '{' a=named_expression b=for_if_clauses '}' { _PyAST_SetComp(a, b, EXTRA) }\n" +#| " | invalid_comprehension\n" +#| "\n" +#| "genexp[expr_ty]:\n" +#| " | '(' a=( assignment_expression | expression !':=') b=for_if_clauses ')' { _PyAST_GeneratorExp(a, b, EXTRA) }\n" +#| " | invalid_comprehension\n" +#| "\n" +#| "dictcomp[expr_ty]:\n" +#| " | '{' a=kvpair b=for_if_clauses '}' { _PyAST_DictComp(a->key, a->value, b, EXTRA) }\n" +#| " | invalid_dict_comprehension\n" +#| "\n" +#| "# FUNCTION CALL ARGUMENTS\n" +#| "# =======================\n" +#| "\n" +#| "arguments[expr_ty] (memo):\n" +#| " | a=args [','] &')' { a }\n" +#| " | invalid_arguments\n" +#| "\n" +#| "args[expr_ty]:\n" +#| " | a[asdl_expr_seq*]=','.(starred_expression | ( assignment_expression | expression !':=') !'=')+ b=[',' k=kwargs {k}] {\n" +#| " _PyPegen_collect_call_seqs(p, a, b, EXTRA) }\n" +#| " | a=kwargs { _PyAST_Call(_PyPegen_dummy_name(p),\n" +#| " CHECK_NULL_ALLOWED(asdl_expr_seq*, _PyPegen_seq_extract_starred_exprs(p, a)),\n" +#| " CHECK_NULL_ALLOWED(asdl_keyword_seq*, _PyPegen_seq_delete_starred_exprs(p, a)),\n" +#| " EXTRA) }\n" +#| "\n" +#| "kwargs[asdl_seq*]:\n" +#| " | a=','.kwarg_or_starred+ ',' b=','.kwarg_or_double_starred+ { _PyPegen_join_sequences(p, a, b) }\n" +#| " | ','.kwarg_or_starred+\n" +#| " | ','.kwarg_or_double_starred+\n" +#| "\n" +#| "starred_expression[expr_ty]:\n" +#| " | invalid_starred_expression_unpacking\n" +#| " | '*' a=expression { _PyAST_Starred(a, Load, EXTRA) }\n" +#| " | invalid_starred_expression\n" +#| "\n" +#| "kwarg_or_starred[KeywordOrStarred*]:\n" +#| " | invalid_kwarg\n" +#| " | a=NAME '=' b=expression {\n" +#| " _PyPegen_keyword_or_starred(p, CHECK(keyword_ty, _PyAST_keyword(a->v.Name.id, b, EXTRA)), 1) }\n" +#| " | a=starred_expression { _PyPegen_keyword_or_starred(p, a, 0) }\n" +#| "\n" +#| "kwarg_or_double_starred[KeywordOrStarred*]:\n" +#| " | invalid_kwarg\n" +#| " | a=NAME '=' b=expression {\n" +#| " _PyPegen_keyword_or_starred(p, CHECK(keyword_ty, _PyAST_keyword(a->v.Name.id, b, EXTRA)), 1) }\n" +#| " | '**' a=expression { _PyPegen_keyword_or_starred(p, CHECK(keyword_ty, _PyAST_keyword(NULL, a, EXTRA)), 1) }\n" +#| "\n" +#| "# ASSIGNMENT TARGETS\n" +#| "# ==================\n" +#| "\n" +#| "# Generic targets\n" +#| "# ---------------\n" +#| "\n" +#| "# NOTE: star_targets may contain *bitwise_or, targets may not.\n" +#| "star_targets[expr_ty]:\n" +#| " | a=star_target !',' { a }\n" +#| " | a=star_target b=(',' c=star_target { c })* [','] {\n" +#| " _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)), Store, EXTRA) }\n" +#| "\n" +#| "star_targets_list_seq[asdl_expr_seq*]: a[asdl_expr_seq*]=','.star_target+ [','] { a }\n" +#| "\n" +#| "star_targets_tuple_seq[asdl_expr_seq*]:\n" +#| " | a=star_target b=(',' c=star_target { c })+ [','] { (asdl_expr_seq*) _PyPegen_seq_insert_in_front(p, a, b) }\n" +#| " | a=star_target ',' { (asdl_expr_seq*) _PyPegen_singleton_seq(p, a) }\n" +#| "\n" +#| "star_target[expr_ty] (memo):\n" +#| " | '*' a=(!'*' star_target) {\n" +#| " _PyAST_Starred(CHECK(expr_ty, _PyPegen_set_expr_context(p, a, Store)), Store, EXTRA) }\n" +#| " | target_with_star_atom\n" +#| "\n" +#| "target_with_star_atom[expr_ty] (memo):\n" +#| " | a=t_primary '.' b=NAME !t_lookahead { _PyAST_Attribute(a, b->v.Name.id, Store, EXTRA) }\n" +#| " | a=t_primary '[' b=slices ']' !t_lookahead { _PyAST_Subscript(a, b, Store, EXTRA) }\n" +#| " | star_atom\n" +#| "\n" +#| "star_atom[expr_ty]:\n" +#| " | a=NAME { _PyPegen_set_expr_context(p, a, Store) }\n" +#| " | '(' a=target_with_star_atom ')' { _PyPegen_set_expr_context(p, a, Store) }\n" +#| " | '(' a=[star_targets_tuple_seq] ')' { _PyAST_Tuple(a, Store, EXTRA) }\n" +#| " | '[' a=[star_targets_list_seq] ']' { _PyAST_List(a, Store, EXTRA) }\n" +#| "\n" +#| "single_target[expr_ty]:\n" +#| " | single_subscript_attribute_target\n" +#| " | a=NAME { _PyPegen_set_expr_context(p, a, Store) }\n" +#| " | '(' a=single_target ')' { a }\n" +#| "\n" +#| "single_subscript_attribute_target[expr_ty]:\n" +#| " | a=t_primary '.' b=NAME !t_lookahead { _PyAST_Attribute(a, b->v.Name.id, Store, EXTRA) }\n" +#| " | a=t_primary '[' b=slices ']' !t_lookahead { _PyAST_Subscript(a, b, Store, EXTRA) }\n" +#| "\n" +#| "t_primary[expr_ty]:\n" +#| " | a=t_primary '.' b=NAME &t_lookahead { _PyAST_Attribute(a, b->v.Name.id, Load, EXTRA) }\n" +#| " | a=t_primary '[' b=slices ']' &t_lookahead { _PyAST_Subscript(a, b, Load, EXTRA) }\n" +#| " | a=t_primary b=genexp &t_lookahead {\n" +#| " _PyAST_Call(a, CHECK(asdl_expr_seq*, (asdl_expr_seq*)_PyPegen_singleton_seq(p, b)), NULL, EXTRA) }\n" +#| " | a=t_primary '(' b=[arguments] ')' &t_lookahead {\n" +#| " _PyAST_Call(a,\n" +#| " (b) ? ((expr_ty) b)->v.Call.args : NULL,\n" +#| " (b) ? ((expr_ty) b)->v.Call.keywords : NULL,\n" +#| " EXTRA) }\n" +#| " | a=atom &t_lookahead { a }\n" +#| "\n" +#| "t_lookahead: '(' | '[' | '.'\n" +#| "\n" +#| "# Targets for del statements\n" +#| "# --------------------------\n" +#| "\n" +#| "del_targets[asdl_expr_seq*]: a[asdl_expr_seq*]=','.del_target+ [','] { a }\n" +#| "\n" +#| "del_target[expr_ty] (memo):\n" +#| " | a=t_primary '.' b=NAME !t_lookahead { _PyAST_Attribute(a, b->v.Name.id, Del, EXTRA) }\n" +#| " | a=t_primary '[' b=slices ']' !t_lookahead { _PyAST_Subscript(a, b, Del, EXTRA) }\n" +#| " | del_t_atom\n" +#| "\n" +#| "del_t_atom[expr_ty]:\n" +#| " | a=NAME { _PyPegen_set_expr_context(p, a, Del) }\n" +#| " | '(' a=del_target ')' { _PyPegen_set_expr_context(p, a, Del) }\n" +#| " | '(' a=[del_targets] ')' { _PyAST_Tuple(a, Del, EXTRA) }\n" +#| " | '[' a=[del_targets] ']' { _PyAST_List(a, Del, EXTRA) }\n" +#| "\n" +#| "# TYPING ELEMENTS\n" +#| "# ---------------\n" +#| "\n" +#| "# type_expressions allow */** but ignore them\n" +#| "type_expressions[asdl_expr_seq*]:\n" +#| " | a=','.expression+ ',' '*' b=expression ',' '**' c=expression {\n" +#| " (asdl_expr_seq*)_PyPegen_seq_append_to_end(\n" +#| " p,\n" +#| " CHECK(asdl_seq*, _PyPegen_seq_append_to_end(p, a, b)),\n" +#| " c) }\n" +#| " | a=','.expression+ ',' '*' b=expression { (asdl_expr_seq*)_PyPegen_seq_append_to_end(p, a, b) }\n" +#| " | a=','.expression+ ',' '**' b=expression { (asdl_expr_seq*)_PyPegen_seq_append_to_end(p, a, b) }\n" +#| " | '*' a=expression ',' '**' b=expression {\n" +#| " (asdl_expr_seq*)_PyPegen_seq_append_to_end(\n" +#| " p,\n" +#| " CHECK(asdl_seq*, _PyPegen_singleton_seq(p, a)),\n" +#| " b) }\n" +#| " | '*' a=expression { (asdl_expr_seq*)_PyPegen_singleton_seq(p, a) }\n" +#| " | '**' a=expression { (asdl_expr_seq*)_PyPegen_singleton_seq(p, a) }\n" +#| " | a[asdl_expr_seq*]=','.expression+ {a}\n" +#| "\n" +#| "func_type_comment[Token*]:\n" +#| " | NEWLINE t=TYPE_COMMENT &(NEWLINE INDENT) { t } # Must be followed by indented block\n" +#| " | invalid_double_type_comments\n" +#| " | TYPE_COMMENT\n" +#| "\n" +#| "# ========================= END OF THE GRAMMAR ===========================\n" +#| "\n" +#| "\n" +#| "\n" +#| "# ========================= START OF INVALID RULES =======================\n" +#| "\n" +#| "# From here on, there are rules for invalid syntax with specialised error messages\n" +#| "invalid_arguments:\n" +#| " | ((','.(starred_expression | ( assignment_expression | expression !':=') !'=')+ ',' kwargs) | kwargs) a=',' ','.(starred_expression !'=')+ {\n" +#| " RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"iterable argument unpacking follows keyword argument unpacking\") }\n" +#| " | a=expression b=for_if_clauses ',' [args | expression for_if_clauses] {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, _PyPegen_get_last_comprehension_item(PyPegen_last_item(b, comprehension_ty)), \"Generator expression must be parenthesized\") }\n" +#| " | a=NAME b='=' expression for_if_clauses {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"invalid syntax. Maybe you meant '==' or ':=' instead of '='?\")}\n" +#| " | (args ',')? a=NAME b='=' &(',' | ')') {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"expected argument value expression\")}\n" +#| " | a=args b=for_if_clauses { _PyPegen_nonparen_genexp_in_call(p, a, b) }\n" +#| " | args ',' a=expression b=for_if_clauses {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, _PyPegen_get_last_comprehension_item(PyPegen_last_item(b, comprehension_ty)), \"Generator expression must be parenthesized\") }\n" +#| " | a=args ',' args { _PyPegen_arguments_parsing_error(p, a) }\n" +#| "invalid_kwarg:\n" +#| " | a[Token*]=('True'|'False'|'None') b='=' {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"cannot assign to %s\", PyBytes_AS_STRING(a->bytes)) }\n" +#| " | a=NAME b='=' expression for_if_clauses {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"invalid syntax. Maybe you meant '==' or ':=' instead of '='?\")}\n" +#| " | !(NAME '=') a=expression b='=' {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_RANGE(\n" +#| " a, b, \"expression cannot contain assignment, perhaps you meant \\\"==\\\"?\") }\n" +#| " | a='**' expression '=' b=expression {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"cannot assign to keyword argument unpacking\") }\n" +#| "\n" +#| "# IMPORTANT: Note that the \"_without_invalid\" suffix causes the rule to not call invalid rules under it\n" +#| "expression_without_invalid[expr_ty]:\n" +#| " | a=disjunction 'if' b=disjunction 'else' c=expression { _PyAST_IfExp(b, a, c, EXTRA) }\n" +#| " | disjunction\n" +#| " | lambdef\n" +#| "invalid_legacy_expression:\n" +#| " | a=NAME !'(' b=star_expressions {\n" +#| " _PyPegen_check_legacy_stmt(p, a) ? RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b,\n" +#| " \"Missing parentheses in call to '%U'. Did you mean %U(...)?\", a->v.Name.id, a->v.Name.id) : NULL}\n" +#| "\n" +#| "invalid_type_param:\n" +#| " | '*' a=NAME colon=':' e=expression {\n" +#| " RAISE_SYNTAX_ERROR_STARTING_FROM(colon, e->kind == Tuple_kind\n" +#| " ? \"cannot use constraints with TypeVarTuple\"\n" +#| " : \"cannot use bound with TypeVarTuple\")\n" +#| " }\n" +#| " | '**' a=NAME colon=':' e=expression {\n" +#| " RAISE_SYNTAX_ERROR_STARTING_FROM(colon, e->kind == Tuple_kind\n" +#| " ? \"cannot use constraints with ParamSpec\"\n" +#| " : \"cannot use bound with ParamSpec\")\n" +#| " }\n" +#| "\n" +#| "invalid_expression:\n" +#| " | STRING a=(!STRING expression_without_invalid)+ STRING {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_RANGE( PyPegen_first_item(a, expr_ty), PyPegen_last_item(a, expr_ty),\n" +#| " \"invalid syntax. Is this intended to be part of the string?\") }\n" +#| " # !(NAME STRING) is not matched so we don't show this error with some invalid string prefixes like: kf\"dsfsdf\"\n" +#| " # Soft keywords need to also be ignored because they can be parsed as NAME NAME\n" +#| " | !(NAME STRING | SOFT_KEYWORD) a=disjunction b=expression_without_invalid {\n" +#| " _PyPegen_check_legacy_stmt(p, a) ? NULL : p->tokens[p->mark-1]->level == 0 ? NULL :\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"invalid syntax. Perhaps you forgot a comma?\") }\n" +#| " | a=disjunction 'if' b=disjunction !('else'|':') { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"expected 'else' after 'if' expression\") }\n" +#| " | a=disjunction 'if' b=disjunction 'else' !expression {\n" +#| " RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"expected expression after 'else', but statement is given\") }\n" +#| " | a[stmt_ty]=(pass_stmt|break_stmt|continue_stmt) 'if' b=disjunction 'else' c=simple_stmt {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_LOCATION (a, \"expected expression before 'if', but statement is given\") }\n" +#| " | a='lambda' [lambda_params] b=':' &FSTRING_MIDDLE {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"f-string: lambda expressions are not allowed without parentheses\") }\n" +#| " | a='lambda' [lambda_params] b=':' &TSTRING_MIDDLE {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"t-string: lambda expressions are not allowed without parentheses\") }\n" +#| "\n" +#| "invalid_named_expression(memo):\n" +#| " | a=expression ':=' expression {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(\n" +#| " a, \"cannot use assignment expressions with %s\", _PyPegen_get_expr_name(a)) }\n" +#| " | a=NAME '=' b=bitwise_or !('='|':=') {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"invalid syntax. Maybe you meant '==' or ':=' instead of '='?\") }\n" +#| " | !(list|tuple|genexp|'True'|'None'|'False') a=bitwise_or b='=' bitwise_or !('='|':=') {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"cannot assign to %s here. Maybe you meant '==' instead of '='?\",\n" +#| " _PyPegen_get_expr_name(a)) }\n" +#| "\n" +#| "invalid_assignment:\n" +#| " | a=invalid_ann_assign_target ':' expression {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(\n" +#| " a,\n" +#| " \"only single target (not %s) can be annotated\",\n" +#| " _PyPegen_get_expr_name(a)\n" +#| " )}\n" +#| " | a=star_named_expression ',' star_named_expressions* ':' expression {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"only single target (not tuple) can be annotated\") }\n" +#| " | a=expression ':' expression {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"illegal target for annotation\") }\n" +#| " | (star_targets '=')* a=star_expressions '=' {\n" +#| " RAISE_SYNTAX_ERROR_INVALID_TARGET(STAR_TARGETS, a) }\n" +#| " | (star_targets '=')* a=yield_expr '=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"assignment to yield expression not possible\") }\n" +#| " | a=star_expressions augassign annotated_rhs {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(\n" +#| " a,\n" +#| " \"'%s' is an illegal expression for augmented assignment\",\n" +#| " _PyPegen_get_expr_name(a)\n" +#| " )}\n" +#| "invalid_ann_assign_target[expr_ty]:\n" +#| " | list\n" +#| " | tuple\n" +#| " | '(' a=invalid_ann_assign_target ')' { a }\n" +#| "invalid_del_stmt:\n" +#| " | 'del' a=star_expressions {\n" +#| " RAISE_SYNTAX_ERROR_INVALID_TARGET(DEL_TARGETS, a) }\n" +#| "invalid_block:\n" +#| " | NEWLINE !INDENT { RAISE_INDENTATION_ERROR(\"expected an indented block\") }\n" +#| "invalid_comprehension:\n" +#| " | ('[' | '(' | '{') a=starred_expression for_if_clauses {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"iterable unpacking cannot be used in comprehension\") }\n" +#| " | ('[' | '{') a=star_named_expression ',' b=star_named_expressions for_if_clauses {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, PyPegen_last_item(b, expr_ty),\n" +#| " \"did you forget parentheses around the comprehension target?\") }\n" +#| " | ('[' | '{') a=star_named_expression b=',' for_if_clauses {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"did you forget parentheses around the comprehension target?\") }\n" +#| "invalid_dict_comprehension:\n" +#| " | '{' a='**' bitwise_or for_if_clauses '}' {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"dict unpacking cannot be used in dict comprehension\") }\n" +#| "invalid_parameters:\n" +#| " | a=\"/\" ',' {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"at least one argument must precede /\") }\n" +#| " | (slash_no_default | slash_with_default) param_maybe_default* a='/' {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"/ may appear only once\") }\n" +#| " | slash_no_default? param_no_default* invalid_parameters_helper a=param_no_default {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"parameter without a default follows parameter with a default\") }\n" +#| " | param_no_default* a='(' param_no_default+ ','? b=')' {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"Function parameters cannot be parenthesized\") }\n" +#| " | (slash_no_default | slash_with_default)? param_maybe_default* '*' (',' | param_no_default) param_maybe_default* a='/' {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"/ must be ahead of *\") }\n" +#| " | param_maybe_default+ '/' a='*' {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"expected comma between / and *\") }\n" +#| "invalid_default:\n" +#| " | a='=' &(')'|',') { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"expected default value expression\") }\n" +#| "invalid_star_etc:\n" +#| " | a='*' (')' | ',' (')' | '**')) { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"named arguments must follow bare *\") }\n" +#| " | '*' ',' TYPE_COMMENT { RAISE_SYNTAX_ERROR(\"bare * has associated type comment\") }\n" +#| " | '*' param a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"var-positional argument cannot have default value\") }\n" +#| " | '*' (param_no_default | ',') param_maybe_default* a='*' (param_no_default | ',') {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"* argument may appear only once\") }\n" +#| "invalid_kwds:\n" +#| " | '**' param a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"var-keyword argument cannot have default value\") }\n" +#| " | '**' param ',' a=param { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"arguments cannot follow var-keyword argument\") }\n" +#| " | '**' param ',' a[Token*]=('*'|'**'|'/') { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"arguments cannot follow var-keyword argument\") }\n" +#| "invalid_parameters_helper: # This is only there to avoid type errors\n" +#| " | a=slash_with_default { _PyPegen_singleton_seq(p, a) }\n" +#| " | param_with_default+\n" +#| "invalid_lambda_parameters:\n" +#| " | a=\"/\" ',' {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"at least one argument must precede /\") }\n" +#| " | (lambda_slash_no_default | lambda_slash_with_default) lambda_param_maybe_default* a='/' {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"/ may appear only once\") }\n" +#| " | lambda_slash_no_default? lambda_param_no_default* invalid_lambda_parameters_helper a=lambda_param_no_default {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"parameter without a default follows parameter with a default\") }\n" +#| " | lambda_param_no_default* a='(' ','.lambda_param+ ','? b=')' {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"Lambda expression parameters cannot be parenthesized\") }\n" +#| " | (lambda_slash_no_default | lambda_slash_with_default)? lambda_param_maybe_default* '*' (',' | lambda_param_no_default) lambda_param_maybe_default* a='/' {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"/ must be ahead of *\") }\n" +#| " | lambda_param_maybe_default+ '/' a='*' {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"expected comma between / and *\") }\n" +#| "invalid_lambda_parameters_helper:\n" +#| " | a=lambda_slash_with_default { _PyPegen_singleton_seq(p, a) }\n" +#| " | lambda_param_with_default+\n" +#| "invalid_lambda_star_etc:\n" +#| " | '*' (':' | ',' (':' | '**')) { RAISE_SYNTAX_ERROR(\"named arguments must follow bare *\") }\n" +#| " | '*' lambda_param a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"var-positional argument cannot have default value\") }\n" +#| " | '*' (lambda_param_no_default | ',') lambda_param_maybe_default* a='*' (lambda_param_no_default | ',') {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"* argument may appear only once\") }\n" +#| "invalid_lambda_kwds:\n" +#| " | '**' lambda_param a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"var-keyword argument cannot have default value\") }\n" +#| " | '**' lambda_param ',' a=lambda_param { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"arguments cannot follow var-keyword argument\") }\n" +#| " | '**' lambda_param ',' a[Token*]=('*'|'**'|'/') { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"arguments cannot follow var-keyword argument\") }\n" +#| "invalid_double_type_comments:\n" +#| " | TYPE_COMMENT NEWLINE TYPE_COMMENT NEWLINE INDENT {\n" +#| " RAISE_SYNTAX_ERROR(\"Cannot have two type comments on def\") }\n" +#| "invalid_with_item:\n" +#| " | expression 'as' a=expression &(',' | ')' | ':') {\n" +#| " RAISE_SYNTAX_ERROR_INVALID_TARGET(STAR_TARGETS, a) }\n" +#| "\n" +#| "invalid_for_if_clause:\n" +#| " | 'async'? 'for' (bitwise_or (',' bitwise_or)* [',']) !'in' {\n" +#| " RAISE_SYNTAX_ERROR(\"'in' expected after for-loop variables\") }\n" +#| "\n" +#| "invalid_for_target:\n" +#| " | 'async'? 'for' a=star_expressions {\n" +#| " RAISE_SYNTAX_ERROR_INVALID_TARGET(FOR_TARGETS, a) }\n" +#| "\n" +#| "invalid_group:\n" +#| " | '(' a=starred_expression ')' {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"cannot use starred expression here\") }\n" +#| " | '(' a='**' expression ')' {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"cannot use double starred expression here\") }\n" +#| "invalid_import:\n" +#| " | a='import' ','.dotted_name+ 'from' dotted_name {\n" +#| " RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"Did you mean to use 'from ... import ...' instead?\") }\n" +#| " | 'import' token=NEWLINE {\n" +#| " RAISE_SYNTAX_ERROR_STARTING_FROM(token, \"Expected one or more names after 'import'\") }\n" +#| "invalid_dotted_as_name:\n" +#| " | dotted_name 'as' !(NAME (',' | ')' | ';' | NEWLINE)) a=expression {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a,\n" +#| " \"cannot use %s as import target\", _PyPegen_get_expr_name(a)) }\n" +#| "invalid_import_from_as_name:\n" +#| " | NAME 'as' !(NAME (',' | ')' | ';' | NEWLINE)) a=expression {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a,\n" +#| " \"cannot use %s as import target\", _PyPegen_get_expr_name(a)) }\n" +#| "\n" +#| "invalid_import_from_targets:\n" +#| " | import_from_as_names ',' NEWLINE {\n" +#| " RAISE_SYNTAX_ERROR(\"trailing comma not allowed without surrounding parentheses\") }\n" +#| " | token=NEWLINE {\n" +#| " RAISE_SYNTAX_ERROR_STARTING_FROM(token, \"Expected one or more names after 'import'\") }\n" +#| "\n" +#| "invalid_with_stmt:\n" +#| " | ['async'] 'with' ','.(expression ['as' star_target])+ NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +#| " | ['async'] 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +#| "invalid_with_stmt_indent:\n" +#| " | ['async'] a='with' ','.(expression ['as' star_target])+ ':' NEWLINE !INDENT {\n" +#| " RAISE_INDENTATION_ERROR(\"expected an indented block after 'with' statement on line %d\", a->lineno) }\n" +#| " | ['async'] a='with' '(' ','.(expressions ['as' star_target])+ ','? ')' ':' NEWLINE !INDENT {\n" +#| " RAISE_INDENTATION_ERROR(\"expected an indented block after 'with' statement on line %d\", a->lineno) }\n" +#| "\n" +#| "invalid_try_stmt:\n" +#| " | a='try' ':' NEWLINE !INDENT {\n" +#| " RAISE_INDENTATION_ERROR(\"expected an indented block after 'try' statement on line %d\", a->lineno) }\n" +#| " | 'try' ':' block !('except' | 'finally') { RAISE_SYNTAX_ERROR(\"expected 'except' or 'finally' block\") }\n" +#| " | 'try' ':' block* except_block+ a='except' b='*' expression ['as' NAME] ':' {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"cannot have both 'except' and 'except*' on the same 'try'\") }\n" +#| " | 'try' ':' block* except_star_block+ a='except' [expression ['as' NAME]] ':' {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"cannot have both 'except' and 'except*' on the same 'try'\") }\n" +#| "invalid_except_stmt:\n" +#| " | 'except' a=expression ',' expressions 'as' NAME ':' {\n" +#| " RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"multiple exception types must be parenthesized when using 'as'\") }\n" +#| " | a='except' expression ['as' NAME ] NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +#| " | a='except' NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\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" +#| "invalid_except_star_stmt:\n" +#| " | 'except' '*' a=expression ',' expressions 'as' NAME ':' {\n" +#| " RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"multiple exception types must be parenthesized when using 'as'\") }\n" +#| " | a='except' '*' expression ['as' NAME ] NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +#| " | a='except' '*' (NEWLINE | ':') { RAISE_SYNTAX_ERROR(\"expected one or more exception types\") }\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" +#| "invalid_finally_stmt:\n" +#| " | a='finally' ':' NEWLINE !INDENT {\n" +#| " RAISE_INDENTATION_ERROR(\"expected an indented block after 'finally' statement on line %d\", a->lineno) }\n" +#| "invalid_except_stmt_indent:\n" +#| " | a='except' expression ['as' NAME ] ':' NEWLINE !INDENT {\n" +#| " RAISE_INDENTATION_ERROR(\"expected an indented block after 'except' statement on line %d\", a->lineno) }\n" +#| " | a='except' ':' NEWLINE !INDENT { RAISE_INDENTATION_ERROR(\"expected an indented block after 'except' statement on line %d\", a->lineno) }\n" +#| "invalid_except_star_stmt_indent:\n" +#| " | a='except' '*' expression ['as' NAME ] ':' NEWLINE !INDENT {\n" +#| " RAISE_INDENTATION_ERROR(\"expected an indented block after 'except*' statement on line %d\", a->lineno) }\n" +#| "invalid_match_stmt:\n" +#| " | \"match\" subject_expr NEWLINE { CHECK_VERSION(void*, 10, \"Pattern matching is\", RAISE_SYNTAX_ERROR(\"expected ':'\") ) }\n" +#| " | a=\"match\" subject=subject_expr ':' NEWLINE !INDENT {\n" +#| " RAISE_INDENTATION_ERROR(\"expected an indented block after 'match' statement on line %d\", a->lineno) }\n" +#| "invalid_case_block:\n" +#| " | \"case\" patterns guard? NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +#| " | a=\"case\" patterns guard? ':' NEWLINE !INDENT {\n" +#| " RAISE_INDENTATION_ERROR(\"expected an indented block after 'case' statement on line %d\", a->lineno) }\n" +#| "invalid_as_pattern:\n" +#| " | or_pattern 'as' a=\"_\" { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"cannot use '_' as a target\") }\n" +#| " | or_pattern 'as' a=expression {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_LOCATION(\n" +#| " a, \"cannot use %s as pattern target\", _PyPegen_get_expr_name(a)) }\n" +#| "invalid_class_pattern:\n" +#| " | name_or_attr '(' a=invalid_class_argument_pattern { RAISE_SYNTAX_ERROR_KNOWN_RANGE(\n" +#| " PyPegen_first_item(a, pattern_ty),\n" +#| " PyPegen_last_item(a, pattern_ty),\n" +#| " \"positional patterns follow keyword patterns\") }\n" +#| "invalid_class_argument_pattern[asdl_pattern_seq*]:\n" +#| " | [positional_patterns ','] keyword_patterns ',' a=positional_patterns { a }\n" +#| "invalid_if_stmt:\n" +#| " | 'if' named_expression NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +#| " | a='if' a=named_expression ':' NEWLINE !INDENT {\n" +#| " RAISE_INDENTATION_ERROR(\"expected an indented block after 'if' statement on line %d\", a->lineno) }\n" +#| "invalid_elif_stmt:\n" +#| " | 'elif' named_expression NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +#| " | a='elif' named_expression ':' NEWLINE !INDENT {\n" +#| " RAISE_INDENTATION_ERROR(\"expected an indented block after 'elif' statement on line %d\", a->lineno) }\n" +#| "invalid_else_stmt:\n" +#| " | a='else' ':' NEWLINE !INDENT {\n" +#| " RAISE_INDENTATION_ERROR(\"expected an indented block after 'else' statement on line %d\", a->lineno) }\n" +#| " | 'else' ':' block 'elif' { RAISE_SYNTAX_ERROR(\"'elif' block follows an 'else' block\")}\n" +#| "invalid_while_stmt:\n" +#| " | 'while' named_expression NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +#| " | a='while' named_expression ':' NEWLINE !INDENT {\n" +#| " RAISE_INDENTATION_ERROR(\"expected an indented block after 'while' statement on line %d\", a->lineno) }\n" +#| "invalid_for_stmt:\n" +#| " | ['async'] 'for' star_targets 'in' star_expressions NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +#| " | ['async'] a='for' star_targets 'in' star_expressions ':' NEWLINE !INDENT {\n" +#| " RAISE_INDENTATION_ERROR(\"expected an indented block after 'for' statement on line %d\", a->lineno) }\n" +#| "invalid_def_raw:\n" +#| " | ['async'] a='def' NAME [type_params] '(' [params] ')' ['->' expression] ':' NEWLINE !INDENT {\n" +#| " RAISE_INDENTATION_ERROR(\"expected an indented block after function definition on line %d\", a->lineno) }\n" +#| " | ['async'] 'def' NAME [type_params] &&'(' [params] ')' ['->' expression] &&':' [func_type_comment] block\n" +#| "invalid_class_def_raw:\n" +#| " | 'class' NAME [type_params] ['(' [arguments] ')'] NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +#| " | a='class' NAME [type_params] ['(' [arguments] ')'] ':' NEWLINE !INDENT {\n" +#| " RAISE_INDENTATION_ERROR(\"expected an indented block after class definition on line %d\", a->lineno) }\n" +#| "\n" +#| "invalid_double_starred_kvpairs:\n" +#| " | ','.double_starred_kvpair+ ',' invalid_kvpair\n" +#| " | expression ':' a='*' bitwise_or { RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"cannot use a starred expression in a dictionary value\") }\n" +#| " | expression a=':' &('}'|',') { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"expression expected after dictionary key and ':'\") }\n" +#| "invalid_kvpair:\n" +#| " | a=expression !(':') {\n" +#| " RAISE_ERROR_KNOWN_LOCATION(p, PyExc_SyntaxError, a->lineno, a->end_col_offset - 1, a->end_lineno, -1, \"':' expected after dictionary key\") }\n" +#| " | expression ':' a='*' bitwise_or { RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"cannot use a starred expression in a dictionary value\") }\n" +#| " | expression a=':' &('}'|',') {RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"expression expected after dictionary key and ':'\") }\n" +#| "invalid_starred_expression_unpacking:\n" +#| " | a='*' expression '=' b=expression { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"cannot assign to iterable argument unpacking\") }\n" +#| "invalid_starred_expression:\n" +#| " | '*' { RAISE_SYNTAX_ERROR(\"Invalid star expression\") }\n" +#| "\n" +#| "invalid_fstring_replacement_field:\n" +#| " | '{' a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"f-string: valid expression required before '='\") }\n" +#| " | '{' a='!' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"f-string: valid expression required before '!'\") }\n" +#| " | '{' a=':' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"f-string: valid expression required before ':'\") }\n" +#| " | '{' a='}' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"f-string: valid expression required before '}'\") }\n" +#| " | '{' !annotated_rhs { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting a valid expression after '{'\") }\n" +#| " | '{' annotated_rhs !('=' | '!' | ':' | '}') {\n" +#| " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting '=', or '!', or ':', or '}'\") }\n" +#| " | '{' annotated_rhs '=' !('!' | ':' | '}') {\n" +#| " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting '!', or ':', or '}'\") }\n" +#| " | '{' annotated_rhs '='? invalid_fstring_conversion_character\n" +#| " | '{' annotated_rhs '='? ['!' NAME] !(':' | '}') {\n" +#| " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting ':' or '}'\") }\n" +#| " | '{' annotated_rhs '='? ['!' NAME] ':' fstring_format_spec* !'}' {\n" +#| " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting '}', or format specs\") }\n" +#| " | '{' annotated_rhs '='? ['!' NAME] !'}' {\n" +#| " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting '}'\") }\n" +#| "\n" +#| "invalid_fstring_conversion_character:\n" +#| " | '!' &(':' | '}') { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: missing conversion character\") }\n" +#| " | '!' !NAME { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: invalid conversion character\") }\n" +#| "\n" +#| "invalid_tstring_replacement_field:\n" +#| " | '{' a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"t-string: valid expression required before '='\") }\n" +#| " | '{' a='!' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"t-string: valid expression required before '!'\") }\n" +#| " | '{' a=':' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"t-string: valid expression required before ':'\") }\n" +#| " | '{' a='}' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"t-string: valid expression required before '}'\") }\n" +#| " | '{' !annotated_rhs { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting a valid expression after '{'\") }\n" +#| " | '{' annotated_rhs !('=' | '!' | ':' | '}') {\n" +#| " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting '=', or '!', or ':', or '}'\") }\n" +#| " | '{' annotated_rhs '=' !('!' | ':' | '}') {\n" +#| " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting '!', or ':', or '}'\") }\n" +#| " | '{' annotated_rhs '='? invalid_tstring_conversion_character\n" +#| " | '{' annotated_rhs '='? ['!' NAME] !(':' | '}') {\n" +#| " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting ':' or '}'\") }\n" +#| " | '{' annotated_rhs '='? ['!' NAME] ':' fstring_format_spec* !'}' {\n" +#| " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting '}', or format specs\") }\n" +#| " | '{' annotated_rhs '='? ['!' NAME] !'}' {\n" +#| " PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting '}'\") }\n" +#| "\n" +#| "invalid_tstring_conversion_character:\n" +#| " | '!' &(':' | '}') { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: missing conversion character\") }\n" +#| " | '!' !NAME { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: invalid conversion character\") }\n" +#| "\n" +#| "invalid_string_tstring_concat:\n" +#| " | a=(fstring|string)+ b[expr_ty]=tstring {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_RANGE(PyPegen_last_item(a, expr_ty), b, \"cannot mix t-string literals with string or bytes literals\") }\n" +#| " | a=tstring+ b[expr_ty]=(fstring|string) {\n" +#| " RAISE_SYNTAX_ERROR_KNOWN_RANGE(PyPegen_last_item(a, expr_ty), b, \"cannot mix t-string literals with string or bytes literals\") }\n" +#| "\n" +#| "invalid_arithmetic:\n" +#| " | sum ('+'|'-'|'*'|'/'|'%'|'//'|'@') a='not' b=inversion { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"'not' after an operator must be parenthesized\") }\n" +#| "invalid_factor:\n" +#| " | ('+' | '-' | '~') a='not' b=factor { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"'not' after an operator must be parenthesized\") }\n" +#| "\n" +#| "invalid_type_params:\n" +#| " | '[' token=']' {\n" +#| " RAISE_SYNTAX_ERROR_STARTING_FROM(\n" +#| " token,\n" +#| " \"Type parameter list cannot be empty\")}\n" +msgid "" +"# PEG grammar for Python\n" +"\n" +"@trailer '''\n" +"void *\n" +"_PyPegen_parse(Parser *p)\n" +"{\n" +" // Initialize keywords\n" +" p->keywords = reserved_keywords;\n" +" p->n_keyword_lists = n_keyword_lists;\n" +" p->soft_keywords = soft_keywords;\n" +"\n" +" // Run parser\n" +" void *result = NULL;\n" +" if (p->start_rule == Py_file_input) {\n" +" result = file_rule(p);\n" +" } else if (p->start_rule == Py_single_input) {\n" +" result = interactive_rule(p);\n" +" } else if (p->start_rule == Py_eval_input) {\n" +" result = eval_rule(p);\n" +" } else if (p->start_rule == Py_func_type_input) {\n" +" result = func_type_rule(p);\n" +" }\n" +"\n" +" return result;\n" +"}\n" +"'''\n" +"\n" +"# ========================= START OF THE GRAMMAR =========================\n" +"\n" +"# General grammatical elements and rules:\n" +"#\n" +"# * Strings with double quotes (\") denote SOFT KEYWORDS\n" +"# * Strings with single quotes (') denote KEYWORDS\n" +"# * Upper case names (NAME) denote tokens in the Grammar/Tokens file\n" +"# * Rule names starting with \"invalid_\" are used for specialized syntax errors\n" +"# - These rules are NOT used in the first pass of the parser.\n" +"# - Only if the first pass fails to parse, a second pass including the invalid\n" +"# rules will be executed.\n" +"# - If the parser fails in the second phase with a generic syntax error, the\n" +"# location of the generic failure of the first pass will be used (this avoids\n" +"# reporting incorrect locations due to the invalid rules).\n" +"# - The order of the alternatives involving invalid rules matter\n" +"# (like any rule in PEG).\n" +"#\n" +"# Grammar Syntax (see PEP 617 for more information):\n" +"#\n" +"# rule_name: expression\n" +"# Optionally, a type can be included right after the rule name, which\n" +"# specifies the return type of the C or Python function corresponding to the\n" +"# rule:\n" +"# rule_name[return_type]: expression\n" +"# If the return type is omitted, then a void * is returned in C and an Any in\n" +"# Python.\n" +"# e1 e2\n" +"# Match e1, then match e2.\n" +"# e1 | e2\n" +"# Match e1 or e2.\n" +"# The first alternative can also appear on the line after the rule name for\n" +"# formatting purposes. In that case, a | must be used before the first\n" +"# alternative, like so:\n" +"# rule_name[return_type]:\n" +"# | first_alt\n" +"# | second_alt\n" +"# ( e )\n" +"# Match e (allows also to use other operators in the group like '(e)*')\n" +"# [ e ] or e?\n" +"# Optionally match e.\n" +"# e*\n" +"# Match zero or more occurrences of e.\n" +"# e+\n" +"# Match one or more occurrences of e.\n" +"# s.e+\n" +"# Match one or more occurrences of e, separated by s. The generated parse tree\n" +"# does not include the separator. This is otherwise identical to (e (s e)*).\n" +"# &e\n" +"# Succeed if e can be parsed, without consuming any input.\n" +"# !e\n" +"# Fail if e can be parsed, without consuming any input.\n" +"# ~\n" +"# Commit to the current alternative, even if it fails to parse.\n" +"# &&e\n" +"# Eager parse e. The parser will not backtrack and will immediately\n" +"# fail with SyntaxError if e cannot be parsed.\n" +"#\n" +"\n" +"# STARTING RULES\n" +"# ==============\n" +"\n" +"file[mod_ty]: a=[statements] ENDMARKER { _PyPegen_make_module(p, a) }\n" +"interactive[mod_ty]: a=statement_newline { _PyAST_Interactive(a, p->arena) }\n" +"eval[mod_ty]: a=expressions NEWLINE* ENDMARKER { _PyAST_Expression(a, p->arena) }\n" +"func_type[mod_ty]: '(' a=[type_expressions] ')' '->' b=expression NEWLINE* ENDMARKER { _PyAST_FunctionType(a, b, p->arena) }\n" +"\n" +"# GENERAL STATEMENTS\n" +"# ==================\n" +"\n" +"statements[asdl_stmt_seq*]: a=statement+ { (asdl_stmt_seq*)_PyPegen_seq_flatten(p, a) }\n" +"\n" +"statement[asdl_stmt_seq*]:\n" +" | a=compound_stmt { _PyPegen_register_stmts(p ,\n" +" (asdl_stmt_seq*)_PyPegen_singleton_seq(p, a)\n" +" ) }\n" +" | a[asdl_stmt_seq*]=simple_stmts { a }\n" +"\n" +"single_compound_stmt[asdl_stmt_seq*]:\n" +" | a=compound_stmt {\n" +" _PyPegen_register_stmts(p, (asdl_stmt_seq*)_PyPegen_singleton_seq(p, a)) }\n" +"\n" +"statement_newline[asdl_stmt_seq*]:\n" +" | a=single_compound_stmt NEWLINE { a }\n" +" | simple_stmts\n" +" | NEWLINE { (asdl_stmt_seq*)_PyPegen_singleton_seq(p, CHECK(stmt_ty, _PyAST_Pass(EXTRA))) }\n" +" | ENDMARKER { _PyPegen_interactive_exit(p) }\n" +"\n" +"simple_stmts[asdl_stmt_seq*]:\n" +" | a=simple_stmt !';' NEWLINE { (asdl_stmt_seq*)_PyPegen_singleton_seq(p, a) } # Not needed, there for speedup\n" +" | a[asdl_stmt_seq*]=';'.simple_stmt+ [';'] NEWLINE { a }\n" +"\n" +"# NOTE: assignment MUST precede expression, else parsing a simple assignment\n" +"# will throw a SyntaxError.\n" +"simple_stmt[stmt_ty] (memo):\n" +" | assignment\n" +" | &\"type\" type_alias\n" +" | &('import' | 'from' | \"lazy\") import_stmt\n" +" | e=star_expressions { _PyAST_Expr(e, EXTRA) }\n" +" | &'return' return_stmt\n" +" | &'raise' raise_stmt\n" +" | &'pass' pass_stmt\n" +" | &'del' del_stmt\n" +" | &'yield' yield_stmt\n" +" | &'assert' assert_stmt\n" +" | &'break' break_stmt\n" +" | &'continue' continue_stmt\n" +" | &'global' global_stmt\n" +" | &'nonlocal' nonlocal_stmt\n" +"\n" +"compound_stmt[stmt_ty]:\n" +" | &('def' | '@' | 'async') function_def\n" +" | &'if' if_stmt\n" +" | &('class' | '@') class_def\n" +" | &('with' | 'async') with_stmt\n" +" | &('for' | 'async') for_stmt\n" +" | &'try' try_stmt\n" +" | &'while' while_stmt\n" +" | match_stmt\n" +"\n" +"# SIMPLE STATEMENTS\n" +"# =================\n" +"\n" +"# NOTE: annotated_rhs may start with 'yield'; yield_expr must start with 'yield'\n" +"assignment[stmt_ty]:\n" +" | a=NAME ':' b=expression c=['=' d=annotated_rhs { d }] {\n" +" CHECK_VERSION(\n" +" stmt_ty,\n" +" 6,\n" +" \"Variable annotation syntax is\",\n" +" _PyAST_AnnAssign(CHECK(expr_ty, _PyPegen_set_expr_context(p, a, Store)), b, c, 1, EXTRA)\n" +" ) }\n" +" | a=('(' b=single_target ')' { b }\n" +" | single_subscript_attribute_target) ':' b=expression c=['=' d=annotated_rhs { d }] {\n" +" CHECK_VERSION(stmt_ty, 6, \"Variable annotations syntax is\", _PyAST_AnnAssign(a, b, c, 0, EXTRA)) }\n" +" | a[asdl_expr_seq*]=(z=star_targets '=' { z })+ b=annotated_rhs !'=' tc=[TYPE_COMMENT] {\n" +" _PyAST_Assign(a, b, NEW_TYPE_COMMENT(p, tc), EXTRA) }\n" +" | a=single_target b=augassign ~ c=annotated_rhs {\n" +" _PyAST_AugAssign(a, b->kind, c, EXTRA) }\n" +" | invalid_assignment\n" +"\n" +"annotated_rhs[expr_ty]: yield_expr | star_expressions\n" +"\n" +"augassign[AugOperator*]:\n" +" | '+=' { _PyPegen_augoperator(p, Add) }\n" +" | '-=' { _PyPegen_augoperator(p, Sub) }\n" +" | '*=' { _PyPegen_augoperator(p, Mult) }\n" +" | '@=' { CHECK_VERSION(AugOperator*, 5, \"The '@' operator is\", _PyPegen_augoperator(p, MatMult)) }\n" +" | '/=' { _PyPegen_augoperator(p, Div) }\n" +" | '%=' { _PyPegen_augoperator(p, Mod) }\n" +" | '&=' { _PyPegen_augoperator(p, BitAnd) }\n" +" | '|=' { _PyPegen_augoperator(p, BitOr) }\n" +" | '^=' { _PyPegen_augoperator(p, BitXor) }\n" +" | '<<=' { _PyPegen_augoperator(p, LShift) }\n" +" | '>>=' { _PyPegen_augoperator(p, RShift) }\n" +" | '**=' { _PyPegen_augoperator(p, Pow) }\n" +" | '//=' { _PyPegen_augoperator(p, FloorDiv) }\n" +"\n" +"return_stmt[stmt_ty]:\n" +" | 'return' a=[star_expressions] { _PyAST_Return(a, EXTRA) }\n" +"\n" +"raise_stmt[stmt_ty]:\n" +" | 'raise' a=expression 'from' b=expression { _PyAST_Raise(a, b, EXTRA) }\n" +" | invalid_raise_stmt\n" +" | 'raise' a=expression { _PyAST_Raise(a, NULL, EXTRA) }\n" +" | 'raise' { _PyAST_Raise(NULL, NULL, EXTRA) }\n" +"\n" +"pass_stmt[stmt_ty]:\n" +" | 'pass' { _PyAST_Pass(EXTRA) }\n" +"\n" +"break_stmt[stmt_ty]:\n" +" | 'break' { _PyAST_Break(EXTRA) }\n" +"\n" +"continue_stmt[stmt_ty]:\n" +" | 'continue' { _PyAST_Continue(EXTRA) }\n" +"\n" +"global_stmt[stmt_ty]: 'global' a[asdl_expr_seq*]=','.NAME+ {\n" +" _PyAST_Global(CHECK(asdl_identifier_seq*, _PyPegen_map_names_to_ids(p, a)), EXTRA) }\n" +"\n" +"nonlocal_stmt[stmt_ty]: 'nonlocal' a[asdl_expr_seq*]=','.NAME+ {\n" +" _PyAST_Nonlocal(CHECK(asdl_identifier_seq*, _PyPegen_map_names_to_ids(p, a)), EXTRA) }\n" +"\n" +"del_stmt[stmt_ty]:\n" +" | 'del' a=del_targets &(';' | NEWLINE) { _PyAST_Delete(a, EXTRA) }\n" +" | invalid_del_stmt\n" +"\n" +"yield_stmt[stmt_ty]: y=yield_expr { _PyAST_Expr(y, EXTRA) }\n" +"\n" +"assert_stmt[stmt_ty]:\n" +" | invalid_assert_stmt\n" +" | 'assert' a=expression b=[',' z=expression { z }] { _PyAST_Assert(a, b, EXTRA) }\n" +"\n" +"import_stmt[stmt_ty](memo):\n" +" | invalid_import\n" +" | import_name\n" +" | import_from\n" +"\n" +"# Import statements\n" +"# -----------------\n" +"\n" +"import_name[stmt_ty]:\n" +" | lazy=\"lazy\"? 'import' a=dotted_as_names { _PyAST_Import(a, lazy ? 1 : 0, EXTRA) }\n" +"\n" +"# note below: the ('.' | '...') is necessary because '...' is tokenized as ELLIPSIS\n" +"import_from[stmt_ty]:\n" +" | invalid_import_from\n" +" | lazy=\"lazy\"? 'from' a=('.' | '...')* b=dotted_name 'import' c=import_from_targets {\n" +" _PyPegen_checked_from_import(p, a, b, c, lazy, EXTRA) }\n" +" | lazy=\"lazy\"? 'from' a=('.' | '...')+ 'import' b=import_from_targets {\n" +" _PyAST_ImportFrom(NULL, b, _PyPegen_seq_count_dots(a), lazy ? 1 : 0, EXTRA) }\n" +"import_from_targets[asdl_alias_seq*]:\n" +" | '(' a=import_from_as_names [','] ')' { a }\n" +" | import_from_as_names !','\n" +" | '*' { (asdl_alias_seq*)_PyPegen_singleton_seq(p, CHECK(alias_ty, _PyPegen_alias_for_star(p, EXTRA))) }\n" +" | invalid_import_from_targets\n" +"import_from_as_names[asdl_alias_seq*]:\n" +" | a[asdl_alias_seq*]=','.import_from_as_name+ { a }\n" +"import_from_as_name[alias_ty]:\n" +" | invalid_import_from_as_name\n" +" | a=NAME b=['as' z=NAME { z }] { _PyAST_alias(\n" +" a->v.Name.id, (b) ? ((expr_ty) b)->v.Name.id : NULL, EXTRA) }\n" +"\n" +"dotted_as_names[asdl_alias_seq*]:\n" +" | a[asdl_alias_seq*]=','.dotted_as_name+ { a }\n" +"dotted_as_name[alias_ty]:\n" +" | invalid_dotted_as_name\n" +" | a=dotted_name b=['as' z=NAME { z }] { _PyAST_alias(\n" +" a->v.Name.id, (b) ? ((expr_ty) b)->v.Name.id : NULL, EXTRA) }\n" +"\n" +"dotted_name[expr_ty]:\n" +" | a=dotted_name '.' b=NAME { _PyPegen_join_names_with_dot(p, a, b) }\n" +" | NAME\n" +"\n" +"# COMPOUND STATEMENTS\n" +"# ===================\n" +"\n" +"# Common elements\n" +"# ---------------\n" +"\n" +"block[asdl_stmt_seq*] (memo):\n" +" | NEWLINE INDENT a=statements DEDENT { a }\n" +" | simple_stmts\n" +" | invalid_block\n" +"\n" +"decorators[asdl_expr_seq*]: a[asdl_expr_seq*]=('@' f=named_expression NEWLINE { f })+ { a }\n" +"\n" +"# Class definitions\n" +"# -----------------\n" +"\n" +"class_def[stmt_ty]:\n" +" | a=decorators b=class_def_raw { _PyPegen_class_def_decorators(p, a, b) }\n" +" | class_def_raw\n" +"\n" +"class_def_raw[stmt_ty]:\n" +" | invalid_class_def_raw\n" +" | 'class' a=NAME t=[type_params] b=['(' z=[arguments] ')' { z }] ':' c=block {\n" +" _PyAST_ClassDef(a->v.Name.id,\n" +" (b) ? ((expr_ty) b)->v.Call.args : NULL,\n" +" (b) ? ((expr_ty) b)->v.Call.keywords : NULL,\n" +" c, NULL, t, EXTRA) }\n" +"\n" +"# Function definitions\n" +"# --------------------\n" +"\n" +"function_def[stmt_ty]:\n" +" | d=decorators f=function_def_raw { _PyPegen_function_def_decorators(p, d, f) }\n" +" | function_def_raw\n" +"\n" +"function_def_raw[stmt_ty]:\n" +" | invalid_def_raw\n" +" | 'def' n=NAME t=[type_params] '(' params=[params] ')' a=['->' z=expression { z }] ':' tc=[func_type_comment] b=block {\n" +" _PyAST_FunctionDef(n->v.Name.id,\n" +" (params) ? params : CHECK(arguments_ty, _PyPegen_empty_arguments(p)),\n" +" b, NULL, a, NEW_TYPE_COMMENT(p, tc), t, EXTRA) }\n" +" | 'async' 'def' n=NAME t=[type_params] '(' params=[params] ')' a=['->' z=expression { z }] ':' tc=[func_type_comment] b=block {\n" +" CHECK_VERSION(\n" +" stmt_ty,\n" +" 5,\n" +" \"Async functions are\",\n" +" _PyAST_AsyncFunctionDef(n->v.Name.id,\n" +" (params) ? params : CHECK(arguments_ty, _PyPegen_empty_arguments(p)),\n" +" b, NULL, a, NEW_TYPE_COMMENT(p, tc), t, EXTRA)\n" +" ) }\n" +"\n" +"# Function parameters\n" +"# -------------------\n" +"\n" +"params[arguments_ty]:\n" +" | invalid_parameters\n" +" | parameters\n" +"\n" +"parameters[arguments_ty]:\n" +" | a=slash_no_default b[asdl_arg_seq*]=param_no_default* c=param_with_default* d=[star_etc] {\n" +" CHECK_VERSION(arguments_ty, 8, \"Positional-only parameters are\", _PyPegen_make_arguments(p, a, NULL, b, c, d)) }\n" +" | a=slash_with_default b=param_with_default* c=[star_etc] {\n" +" CHECK_VERSION(arguments_ty, 8, \"Positional-only parameters are\", _PyPegen_make_arguments(p, NULL, a, NULL, b, c)) }\n" +" | a[asdl_arg_seq*]=param_no_default+ b=param_with_default* c=[star_etc] {\n" +" _PyPegen_make_arguments(p, NULL, NULL, a, b, c) }\n" +" | a=param_with_default+ b=[star_etc] { _PyPegen_make_arguments(p, NULL, NULL, NULL, a, b)}\n" +" | a=star_etc { _PyPegen_make_arguments(p, NULL, NULL, NULL, NULL, a) }\n" +"\n" +"# Some duplication here because we can't write (',' | &')'),\n" +"# which is because we don't support empty alternatives (yet).\n" +"\n" +"slash_no_default[asdl_arg_seq*]:\n" +" | a[asdl_arg_seq*]=param_no_default+ '/' ',' { a }\n" +" | a[asdl_arg_seq*]=param_no_default+ '/' &')' { a }\n" +"slash_with_default[SlashWithDefault*]:\n" +" | a=param_no_default* b=param_with_default+ '/' ',' { _PyPegen_slash_with_default(p, (asdl_arg_seq *)a, b) }\n" +" | a=param_no_default* b=param_with_default+ '/' &')' { _PyPegen_slash_with_default(p, (asdl_arg_seq *)a, b) }\n" +"\n" +"star_etc[StarEtc*]:\n" +" | invalid_star_etc\n" +" | '*' a=param_no_default b=param_maybe_default* c=[kwds] {\n" +" _PyPegen_star_etc(p, a, b, c) }\n" +" | '*' a=param_no_default_star_annotation b=param_maybe_default* c=[kwds] {\n" +" _PyPegen_star_etc(p, a, b, c) }\n" +" | '*' ',' b=param_maybe_default+ c=[kwds] {\n" +" _PyPegen_star_etc(p, NULL, b, c) }\n" +" | a=kwds { _PyPegen_star_etc(p, NULL, NULL, a) }\n" +"\n" +"kwds[arg_ty]:\n" +" | invalid_kwds\n" +" | '**' a=param_no_default { a }\n" +"\n" +"# One parameter. This *includes* a following comma and type comment.\n" +"#\n" +"# There are three styles:\n" +"# - No default\n" +"# - With default\n" +"# - Maybe with default\n" +"#\n" +"# There are two alternative forms of each, to deal with type comments:\n" +"# - Ends in a comma followed by an optional type comment\n" +"# - No comma, optional type comment, must be followed by close paren\n" +"# The latter form is for a final parameter without trailing comma.\n" +"#\n" +"\n" +"param_no_default[arg_ty]:\n" +" | a=param ',' tc=TYPE_COMMENT? { _PyPegen_add_type_comment_to_arg(p, a, tc) }\n" +" | a=param tc=TYPE_COMMENT? &')' { _PyPegen_add_type_comment_to_arg(p, a, tc) }\n" +"param_no_default_star_annotation[arg_ty]:\n" +" | a=param_star_annotation ',' tc=TYPE_COMMENT? { _PyPegen_add_type_comment_to_arg(p, a, tc) }\n" +" | a=param_star_annotation tc=TYPE_COMMENT? &')' { _PyPegen_add_type_comment_to_arg(p, a, tc) }\n" +"param_with_default[NameDefaultPair*]:\n" +" | a=param c=default ',' tc=TYPE_COMMENT? { _PyPegen_name_default_pair(p, a, c, tc) }\n" +" | a=param c=default tc=TYPE_COMMENT? &')' { _PyPegen_name_default_pair(p, a, c, tc) }\n" +"param_maybe_default[NameDefaultPair*]:\n" +" | a=param c=default? ',' tc=TYPE_COMMENT? { _PyPegen_name_default_pair(p, a, c, tc) }\n" +" | a=param c=default? tc=TYPE_COMMENT? &')' { _PyPegen_name_default_pair(p, a, c, tc) }\n" +"param[arg_ty]: a=NAME b=annotation? { _PyAST_arg(a->v.Name.id, b, NULL, EXTRA) }\n" +"param_star_annotation[arg_ty]: a=NAME b=star_annotation { _PyAST_arg(a->v.Name.id, b, NULL, EXTRA) }\n" +"annotation[expr_ty]: ':' a=expression { a }\n" +"star_annotation[expr_ty]: ':' a=star_expression { a }\n" +"default[expr_ty]: '=' a=expression { a } | invalid_default\n" +"\n" +"# If statement\n" +"# ------------\n" +"\n" +"if_stmt[stmt_ty]:\n" +" | invalid_if_stmt\n" +" | 'if' a=named_expression ':' b=block c=elif_stmt {\n" +" _PyAST_If(a, b, CHECK(asdl_stmt_seq*, _PyPegen_singleton_seq(p, c)), EXTRA) }\n" +" | 'if' a=named_expression ':' b=block c=[else_block] { _PyAST_If(a, b, c, EXTRA) }\n" +"elif_stmt[stmt_ty]:\n" +" | invalid_elif_stmt\n" +" | 'elif' a=named_expression ':' b=block c=elif_stmt {\n" +" _PyAST_If(a, b, CHECK(asdl_stmt_seq*, _PyPegen_singleton_seq(p, c)), EXTRA) }\n" +" | 'elif' a=named_expression ':' b=block c=[else_block] { _PyAST_If(a, b, c, EXTRA) }\n" +"else_block[asdl_stmt_seq*]:\n" +" | invalid_else_stmt\n" +" | 'else' &&':' b=block { b }\n" +"\n" +"# While statement\n" +"# ---------------\n" +"\n" +"while_stmt[stmt_ty]:\n" +" | invalid_while_stmt\n" +" | 'while' a=named_expression ':' b=block c=[else_block] { _PyAST_While(a, b, c, EXTRA) }\n" +"\n" +"# For statement\n" +"# -------------\n" +"\n" +"for_stmt[stmt_ty]:\n" +" | invalid_for_stmt\n" +" | 'for' t=star_targets 'in' ~ ex=star_expressions ':' tc=[TYPE_COMMENT] b=block el=[else_block] {\n" +" _PyAST_For(t, ex, b, el, NEW_TYPE_COMMENT(p, tc), EXTRA) }\n" +" | 'async' 'for' t=star_targets 'in' ~ ex=star_expressions ':' tc=[TYPE_COMMENT] b=block el=[else_block] {\n" +" CHECK_VERSION(stmt_ty, 5, \"Async for loops are\", _PyAST_AsyncFor(t, ex, b, el, NEW_TYPE_COMMENT(p, tc), EXTRA)) }\n" +" | invalid_for_target\n" +"\n" +"# With statement\n" +"# --------------\n" +"\n" +"with_stmt[stmt_ty]:\n" +" | invalid_with_stmt_indent\n" +" | 'with' '(' a[asdl_withitem_seq*]=','.with_item+ ','? ')' ':' tc=[TYPE_COMMENT] b=block {\n" +" _PyAST_With(a, b, NEW_TYPE_COMMENT(p, tc), EXTRA) }\n" +" | 'with' a[asdl_withitem_seq*]=','.with_item+ ':' tc=[TYPE_COMMENT] b=block {\n" +" _PyAST_With(a, b, NEW_TYPE_COMMENT(p, tc), EXTRA) }\n" +" | 'async' 'with' '(' a[asdl_withitem_seq*]=','.with_item+ ','? ')' ':' b=block {\n" +" CHECK_VERSION(stmt_ty, 5, \"Async with statements are\", _PyAST_AsyncWith(a, b, NULL, EXTRA)) }\n" +" | 'async' 'with' a[asdl_withitem_seq*]=','.with_item+ ':' tc=[TYPE_COMMENT] b=block {\n" +" CHECK_VERSION(stmt_ty, 5, \"Async with statements are\", _PyAST_AsyncWith(a, b, NEW_TYPE_COMMENT(p, tc), EXTRA)) }\n" +" | invalid_with_stmt\n" +"\n" +"with_item[withitem_ty]:\n" +" | e=expression 'as' t=star_target &(',' | ')' | ':') { _PyAST_withitem(e, t, p->arena) }\n" +" | invalid_with_item\n" +" | e=expression { _PyAST_withitem(e, NULL, p->arena) }\n" +"\n" +"# Try statement\n" +"# -------------\n" +"\n" +"try_stmt[stmt_ty]:\n" +" | invalid_try_stmt\n" +" | 'try' &&':' b=block f=finally_block { _PyAST_Try(b, NULL, NULL, f, EXTRA) }\n" +" | 'try' &&':' b=block ex[asdl_excepthandler_seq*]=except_block+ el=[else_block] f=[finally_block] { _PyAST_Try(b, ex, el, f, EXTRA) }\n" +" | 'try' &&':' b=block ex[asdl_excepthandler_seq*]=except_star_block+ el=[else_block] f=[finally_block] {\n" +" CHECK_VERSION(stmt_ty, 11, \"Exception groups are\",\n" +" _PyAST_TryStar(b, ex, el, f, EXTRA)) }\n" +"\n" +"\n" +"# Except statement\n" +"# ----------------\n" +"\n" +"except_block[excepthandler_ty]:\n" +" | invalid_except_stmt_indent\n" +" | 'except' e=expression ':' b=block {\n" +" _PyAST_ExceptHandler(e, NULL, b, EXTRA) }\n" +" | 'except' e=expression 'as' t=NAME ':' b=block {\n" +" _PyAST_ExceptHandler(e, ((expr_ty) t)->v.Name.id, b, EXTRA) }\n" +" | 'except' e=expressions ':' b=block {\n" +" CHECK_VERSION(\n" +" excepthandler_ty,\n" +" 14,\n" +" \"except expressions without parentheses are\",\n" +" _PyAST_ExceptHandler(e, NULL, b, EXTRA)) }\n" +" | 'except' ':' b=block { _PyAST_ExceptHandler(NULL, NULL, b, EXTRA) }\n" +" | invalid_except_stmt\n" +"except_star_block[excepthandler_ty]:\n" +" | invalid_except_star_stmt_indent\n" +" | 'except' '*' e=expression ':' b=block {\n" +" _PyAST_ExceptHandler(e, NULL, b, EXTRA) }\n" +" | 'except' '*' e=expression 'as' t=NAME ':' b=block {\n" +" _PyAST_ExceptHandler(e, ((expr_ty) t)->v.Name.id, b, EXTRA) }\n" +" | 'except' '*' e=expressions ':' b=block {\n" +" CHECK_VERSION(\n" +" excepthandler_ty,\n" +" 14,\n" +" \"except expressions without parentheses are\",\n" +" _PyAST_ExceptHandler(e, NULL, b, EXTRA)) }\n" +" | invalid_except_star_stmt\n" +"finally_block[asdl_stmt_seq*]:\n" +" | invalid_finally_stmt\n" +" | 'finally' &&':' a=block { a }\n" +"\n" +"# Match statement\n" +"# ---------------\n" +"\n" +"match_stmt[stmt_ty]:\n" +" | \"match\" subject=subject_expr ':' NEWLINE INDENT cases[asdl_match_case_seq*]=case_block+ DEDENT {\n" +" CHECK_VERSION(stmt_ty, 10, \"Pattern matching is\", _PyAST_Match(subject, cases, EXTRA)) }\n" +" | invalid_match_stmt\n" +"\n" +"subject_expr[expr_ty]:\n" +" | value=star_named_expression ',' values=star_named_expressions? {\n" +" _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, value, values)), Load, EXTRA) }\n" +" | named_expression\n" +"\n" +"case_block[match_case_ty]:\n" +" | invalid_case_block\n" +" | \"case\" pattern=patterns guard=guard? ':' body=block {\n" +" _PyAST_match_case(pattern, guard, body, p->arena) }\n" +"\n" +"guard[expr_ty]: 'if' guard=named_expression { guard }\n" +"\n" +"patterns[pattern_ty]:\n" +" | patterns[asdl_pattern_seq*]=open_sequence_pattern {\n" +" _PyAST_MatchSequence(patterns, EXTRA) }\n" +" | pattern\n" +"\n" +"pattern[pattern_ty]:\n" +" | as_pattern\n" +" | or_pattern\n" +"\n" +"as_pattern[pattern_ty]:\n" +" | pattern=or_pattern 'as' target=pattern_capture_target {\n" +" _PyAST_MatchAs(pattern, target->v.Name.id, EXTRA) }\n" +" | invalid_as_pattern\n" +"\n" +"or_pattern[pattern_ty]:\n" +" | patterns[asdl_pattern_seq*]='|'.closed_pattern+ {\n" +" asdl_seq_LEN(patterns) == 1 ? asdl_seq_GET(patterns, 0) : _PyAST_MatchOr(patterns, EXTRA) }\n" +"\n" +"closed_pattern[pattern_ty] (memo):\n" +" | literal_pattern\n" +" | capture_pattern\n" +" | wildcard_pattern\n" +" | value_pattern\n" +" | group_pattern\n" +" | sequence_pattern\n" +" | mapping_pattern\n" +" | class_pattern\n" +"\n" +"# Literal patterns are used for equality and identity constraints\n" +"literal_pattern[pattern_ty]:\n" +" | value=signed_number !('+' | '-') { _PyAST_MatchValue(value, EXTRA) }\n" +" | value=complex_number { _PyAST_MatchValue(value, EXTRA) }\n" +" | value=strings { _PyAST_MatchValue(value, EXTRA) }\n" +" | 'None' { _PyAST_MatchSingleton(Py_None, EXTRA) }\n" +" | 'True' { _PyAST_MatchSingleton(Py_True, EXTRA) }\n" +" | 'False' { _PyAST_MatchSingleton(Py_False, EXTRA) }\n" +"\n" +"# Literal expressions are used to restrict permitted mapping pattern keys\n" +"literal_expr[expr_ty]:\n" +" | signed_number !('+' | '-')\n" +" | complex_number\n" +" | &(STRING|FSTRING_START|TSTRING_START) strings\n" +" | 'None' { _PyAST_Constant(Py_None, NULL, EXTRA) }\n" +" | 'True' { _PyAST_Constant(Py_True, NULL, EXTRA) }\n" +" | 'False' { _PyAST_Constant(Py_False, NULL, EXTRA) }\n" +"\n" +"complex_number[expr_ty]:\n" +" | real=signed_real_number '+' imag=imaginary_number {\n" +" _PyAST_BinOp(real, Add, imag, EXTRA) }\n" +" | real=signed_real_number '-' imag=imaginary_number {\n" +" _PyAST_BinOp(real, Sub, imag, EXTRA) }\n" +"\n" +"signed_number[expr_ty]:\n" +" | NUMBER\n" +" | '+' number=NUMBER { _PyAST_UnaryOp(UAdd, number, EXTRA) }\n" +" | '-' number=NUMBER { _PyAST_UnaryOp(USub, number, EXTRA) }\n" +"\n" +"signed_real_number[expr_ty]:\n" +" | real_number\n" +" | '+' real=real_number { _PyAST_UnaryOp(UAdd, real, EXTRA) }\n" +" | '-' real=real_number { _PyAST_UnaryOp(USub, real, EXTRA) }\n" +"\n" +"real_number[expr_ty]:\n" +" | real=NUMBER { _PyPegen_ensure_real(p, real) }\n" +"\n" +"imaginary_number[expr_ty]:\n" +" | imag=NUMBER { _PyPegen_ensure_imaginary(p, imag) }\n" +"\n" +"capture_pattern[pattern_ty]:\n" +" | target=pattern_capture_target { _PyAST_MatchAs(NULL, target->v.Name.id, EXTRA) }\n" +"\n" +"pattern_capture_target[expr_ty]:\n" +" | !\"_\" name=NAME !('.' | '(' | '=') {\n" +" _PyPegen_set_expr_context(p, name, Store) }\n" +"\n" +"wildcard_pattern[pattern_ty]:\n" +" | \"_\" { _PyAST_MatchAs(NULL, NULL, EXTRA) }\n" +"\n" +"value_pattern[pattern_ty]:\n" +" | attr=attr !('.' | '(' | '=') { _PyAST_MatchValue(attr, EXTRA) }\n" +"\n" +"attr[expr_ty]:\n" +" | value=name_or_attr '.' attr=NAME {\n" +" _PyAST_Attribute(value, attr->v.Name.id, Load, EXTRA) }\n" +"\n" +"name_or_attr[expr_ty]:\n" +" | attr\n" +" | NAME\n" +"\n" +"group_pattern[pattern_ty]:\n" +" | '(' pattern=pattern ')' { pattern }\n" +"\n" +"sequence_pattern[pattern_ty]:\n" +" | '[' patterns=maybe_sequence_pattern? ']' { _PyAST_MatchSequence(patterns, EXTRA) }\n" +" | '(' patterns=open_sequence_pattern? ')' { _PyAST_MatchSequence(patterns, EXTRA) }\n" +"\n" +"open_sequence_pattern[asdl_seq*]:\n" +" | pattern=maybe_star_pattern ',' patterns=maybe_sequence_pattern? {\n" +" _PyPegen_seq_insert_in_front(p, pattern, patterns) }\n" +"\n" +"maybe_sequence_pattern[asdl_seq*]:\n" +" | patterns=','.maybe_star_pattern+ ','? { patterns }\n" +"\n" +"maybe_star_pattern[pattern_ty]:\n" +" | star_pattern\n" +" | pattern\n" +"\n" +"star_pattern[pattern_ty] (memo):\n" +" | '*' target=pattern_capture_target {\n" +" _PyAST_MatchStar(target->v.Name.id, EXTRA) }\n" +" | '*' wildcard_pattern {\n" +" _PyAST_MatchStar(NULL, EXTRA) }\n" +"\n" +"mapping_pattern[pattern_ty]:\n" +" | '{' '}' {\n" +" _PyAST_MatchMapping(NULL, NULL, NULL, EXTRA) }\n" +" | '{' rest=double_star_pattern ','? '}' {\n" +" _PyAST_MatchMapping(NULL, NULL, rest->v.Name.id, EXTRA) }\n" +" | '{' items=items_pattern ',' rest=double_star_pattern ','? '}' {\n" +" _PyAST_MatchMapping(\n" +" CHECK(asdl_expr_seq*, _PyPegen_get_pattern_keys(p, items)),\n" +" CHECK(asdl_pattern_seq*, _PyPegen_get_patterns(p, items)),\n" +" rest->v.Name.id,\n" +" EXTRA) }\n" +" | '{' items=items_pattern ','? '}' {\n" +" _PyAST_MatchMapping(\n" +" CHECK(asdl_expr_seq*, _PyPegen_get_pattern_keys(p, items)),\n" +" CHECK(asdl_pattern_seq*, _PyPegen_get_patterns(p, items)),\n" +" NULL,\n" +" EXTRA) }\n" +" | invalid_mapping_pattern\n" +"\n" +"items_pattern[asdl_seq*]:\n" +" | ','.key_value_pattern+\n" +"\n" +"key_value_pattern[KeyPatternPair*]:\n" +" | key=(literal_expr | attr) ':' pattern=pattern {\n" +" _PyPegen_key_pattern_pair(p, key, pattern) }\n" +"\n" +"double_star_pattern[expr_ty]:\n" +" | '**' target=pattern_capture_target { target }\n" +"\n" +"class_pattern[pattern_ty]:\n" +" | cls=name_or_attr '(' ')' {\n" +" _PyAST_MatchClass(cls, NULL, NULL, NULL, EXTRA) }\n" +" | cls=name_or_attr '(' patterns=positional_patterns ','? ')' {\n" +" _PyAST_MatchClass(cls, patterns, NULL, NULL, EXTRA) }\n" +" | cls=name_or_attr '(' keywords=keyword_patterns ','? ')' {\n" +" _PyAST_MatchClass(\n" +" cls, NULL,\n" +" CHECK(asdl_identifier_seq*, _PyPegen_map_names_to_ids(p,\n" +" CHECK(asdl_expr_seq*, _PyPegen_get_pattern_keys(p, keywords)))),\n" +" CHECK(asdl_pattern_seq*, _PyPegen_get_patterns(p, keywords)),\n" +" EXTRA) }\n" +" | cls=name_or_attr '(' patterns=positional_patterns ',' keywords=keyword_patterns ','? ')' {\n" +" _PyAST_MatchClass(\n" +" cls,\n" +" patterns,\n" +" CHECK(asdl_identifier_seq*, _PyPegen_map_names_to_ids(p,\n" +" CHECK(asdl_expr_seq*, _PyPegen_get_pattern_keys(p, keywords)))),\n" +" CHECK(asdl_pattern_seq*, _PyPegen_get_patterns(p, keywords)),\n" +" EXTRA) }\n" +" | invalid_class_pattern\n" +"\n" +"positional_patterns[asdl_pattern_seq*]:\n" +" | args[asdl_pattern_seq*]=','.pattern+ { args }\n" +"\n" +"keyword_patterns[asdl_seq*]:\n" +" | ','.keyword_pattern+\n" +"\n" +"keyword_pattern[KeyPatternPair*]:\n" +" | arg=NAME '=' value=pattern { _PyPegen_key_pattern_pair(p, arg, value) }\n" +"\n" +"# Type statement\n" +"# ---------------\n" +"\n" +"type_alias[stmt_ty]:\n" +" | \"type\" n=NAME t=[type_params] '=' b=expression {\n" +" CHECK_VERSION(stmt_ty, 12, \"Type statement is\",\n" +" _PyAST_TypeAlias(CHECK(expr_ty, _PyPegen_set_expr_context(p, n, Store)), t, b, EXTRA)) }\n" +"\n" +"# Type parameter declaration\n" +"# --------------------------\n" +"\n" +"type_params[asdl_type_param_seq*]:\n" +" | invalid_type_params\n" +" | '[' t=type_param_seq ']' {\n" +" CHECK_VERSION(asdl_type_param_seq *, 12, \"Type parameter lists are\", t) }\n" +"\n" +"type_param_seq[asdl_type_param_seq*]: a[asdl_type_param_seq*]=','.type_param+ [','] { a }\n" +"\n" +"type_param[type_param_ty] (memo):\n" +" | a=NAME b=[type_param_bound] c=[type_param_default] { _PyAST_TypeVar(a->v.Name.id, b, c, EXTRA) }\n" +" | invalid_type_param\n" +" | '*' a=NAME b=[type_param_starred_default] { _PyAST_TypeVarTuple(a->v.Name.id, b, EXTRA) }\n" +" | '**' a=NAME b=[type_param_default] { _PyAST_ParamSpec(a->v.Name.id, b, EXTRA) }\n" +"\n" +"type_param_bound[expr_ty]: ':' e=expression { e }\n" +"type_param_default[expr_ty]: '=' e=expression {\n" +" CHECK_VERSION(expr_ty, 13, \"Type parameter defaults are\", e) }\n" +"type_param_starred_default[expr_ty]: '=' e=star_expression {\n" +" CHECK_VERSION(expr_ty, 13, \"Type parameter defaults are\", e) }\n" +"\n" +"# EXPRESSIONS\n" +"# -----------\n" +"\n" +"expressions[expr_ty]:\n" +" | a=expression b=(',' c=expression { c })+ [','] {\n" +" _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)), Load, EXTRA) }\n" +" | a=expression ',' { _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_singleton_seq(p, a)), Load, EXTRA) }\n" +" | expression\n" +"\n" +"expression[expr_ty] (memo):\n" +" | invalid_if_expression\n" +" | invalid_expression\n" +" | invalid_legacy_expression\n" +" | if_expression\n" +" | disjunction\n" +" | lambdef\n" +"\n" +"if_expression[expr_ty]:\n" +" | a=disjunction 'if' b=disjunction 'else' c=expression { _PyAST_IfExp(b, a, c, EXTRA) }\n" +"\n" +"yield_expr[expr_ty]:\n" +" | 'yield' 'from' a=expression { _PyAST_YieldFrom(a, EXTRA) }\n" +" | 'yield' a=[star_expressions] { _PyAST_Yield(a, EXTRA) }\n" +"\n" +"star_expressions[expr_ty]:\n" +" | a=star_expression b=(',' c=star_expression { c })+ [','] {\n" +" _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)), Load, EXTRA) }\n" +" | a=star_expression ',' { _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_singleton_seq(p, a)), Load, EXTRA) }\n" +" | star_expression\n" +"\n" +"star_expression[expr_ty] (memo):\n" +" | '*' a=bitwise_or { _PyAST_Starred(a, Load, EXTRA) }\n" +" | expression\n" +"\n" +"star_named_expressions[asdl_expr_seq*]: a[asdl_expr_seq*]=','.star_named_expression+ [','] { a }\n" +"\n" +"star_named_expressions_sequence[asdl_expr_seq*]: a[asdl_expr_seq*]=','.star_named_expression_sequence+ [','] { a }\n" +"\n" +"star_named_expression[expr_ty]:\n" +" | '*' a=bitwise_or { _PyAST_Starred(a, Load, EXTRA) }\n" +" | named_expression\n" +"\n" +"star_named_expression_sequence[expr_ty]:\n" +" | invalid_starred_expression_unpacking_sequence\n" +" | star_named_expression\n" +"\n" +"assignment_expression[expr_ty]:\n" +" | a=NAME ':=' ~ b=expression {\n" +" CHECK_VERSION(expr_ty, 8, \"Assignment expressions are\",\n" +" _PyAST_NamedExpr(CHECK(expr_ty, _PyPegen_set_expr_context(p, a, Store)), b, EXTRA)) }\n" +"\n" +"named_expression[expr_ty]:\n" +" | assignment_expression\n" +" | invalid_named_expression\n" +" | expression !':='\n" +"\n" +"disjunction[expr_ty] (memo):\n" +" | a=conjunction b=('or' c=conjunction { c })+ { _PyAST_BoolOp(\n" +" Or,\n" +" CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)),\n" +" EXTRA) }\n" +" | conjunction\n" +"\n" +"conjunction[expr_ty] (memo):\n" +" | a=inversion b=('and' c=inversion { c })+ { _PyAST_BoolOp(\n" +" And,\n" +" CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)),\n" +" EXTRA) }\n" +" | inversion\n" +"\n" +"inversion[expr_ty] (memo):\n" +" | 'not' a=inversion { _PyAST_UnaryOp(Not, a, EXTRA) }\n" +" | comparison\n" +"\n" +"# Comparison operators\n" +"# --------------------\n" +"\n" +"comparison[expr_ty]:\n" +" | a=bitwise_or b=compare_op_bitwise_or_pair+ {\n" +" _PyAST_Compare(\n" +" a,\n" +" CHECK(asdl_int_seq*, _PyPegen_get_cmpops(p, b)),\n" +" CHECK(asdl_expr_seq*, _PyPegen_get_exprs(p, b)),\n" +" EXTRA) }\n" +" | bitwise_or\n" +"\n" +"compare_op_bitwise_or_pair[CmpopExprPair*]:\n" +" | eq_bitwise_or\n" +" | noteq_bitwise_or\n" +" | lte_bitwise_or\n" +" | invalid_noteq\n" +" | lt_bitwise_or\n" +" | gte_bitwise_or\n" +" | gt_bitwise_or\n" +" | notin_bitwise_or\n" +" | in_bitwise_or\n" +" | isnot_bitwise_or\n" +" | is_bitwise_or\n" +"\n" +"eq_bitwise_or[CmpopExprPair*]: '==' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, Eq, a) }\n" +"noteq_bitwise_or[CmpopExprPair*]:\n" +" | (tok='!=' { _PyPegen_check_barry_as_flufl(p, tok) ? NULL : tok}) a=bitwise_or {_PyPegen_cmpop_expr_pair(p, NotEq, a) }\n" +"lte_bitwise_or[CmpopExprPair*]: '<=' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, LtE, a) }\n" +"lt_bitwise_or[CmpopExprPair*]: '<' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, Lt, a) }\n" +"gte_bitwise_or[CmpopExprPair*]: '>=' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, GtE, a) }\n" +"gt_bitwise_or[CmpopExprPair*]: '>' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, Gt, a) }\n" +"notin_bitwise_or[CmpopExprPair*]: 'not' 'in' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, NotIn, a) }\n" +"in_bitwise_or[CmpopExprPair*]: 'in' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, In, a) }\n" +"isnot_bitwise_or[CmpopExprPair*]: 'is' 'not' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, IsNot, a) }\n" +"is_bitwise_or[CmpopExprPair*]: 'is' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, Is, a) }\n" +"\n" +"# Bitwise operators\n" +"# -----------------\n" +"\n" +"bitwise_or[expr_ty]:\n" +" | a=bitwise_or '|' b=bitwise_xor { _PyAST_BinOp(a, BitOr, b, EXTRA) }\n" +" | bitwise_xor\n" +"\n" +"bitwise_xor[expr_ty]:\n" +" | a=bitwise_xor '^' b=bitwise_and { _PyAST_BinOp(a, BitXor, b, EXTRA) }\n" +" | bitwise_and\n" +"\n" +"bitwise_and[expr_ty]:\n" +" | a=bitwise_and '&' b=shift_expr { _PyAST_BinOp(a, BitAnd, b, EXTRA) }\n" +" | shift_expr\n" +"\n" +"shift_expr[expr_ty]:\n" +" | a=shift_expr '<<' b=sum { _PyAST_BinOp(a, LShift, b, EXTRA) }\n" +" | a=shift_expr '>>' b=sum { _PyAST_BinOp(a, RShift, b, EXTRA) }\n" +" | invalid_arithmetic\n" +" | sum\n" +"\n" +"# Arithmetic operators\n" +"# --------------------\n" +"\n" +"sum[expr_ty]:\n" +" | a=sum '+' b=term { _PyAST_BinOp(a, Add, b, EXTRA) }\n" +" | a=sum '-' b=term { _PyAST_BinOp(a, Sub, b, EXTRA) }\n" +" | term\n" +"\n" +"term[expr_ty]:\n" +" | a=term '*' b=factor { _PyAST_BinOp(a, Mult, b, EXTRA) }\n" +" | a=term '/' b=factor { _PyAST_BinOp(a, Div, b, EXTRA) }\n" +" | a=term '//' b=factor { _PyAST_BinOp(a, FloorDiv, b, EXTRA) }\n" +" | a=term '%' b=factor { _PyAST_BinOp(a, Mod, b, EXTRA) }\n" +" | a=term '@' b=factor { CHECK_VERSION(expr_ty, 5, \"The '@' operator is\", _PyAST_BinOp(a, MatMult, b, EXTRA)) }\n" +" | invalid_factor\n" +" | factor\n" +"\n" +"factor[expr_ty] (memo):\n" +" | '+' a=factor { _PyAST_UnaryOp(UAdd, a, EXTRA) }\n" +" | '-' a=factor { _PyAST_UnaryOp(USub, a, EXTRA) }\n" +" | '~' a=factor { _PyAST_UnaryOp(Invert, a, EXTRA) }\n" +" | power\n" +"\n" +"power[expr_ty]:\n" +" | a=await_primary '**' b=factor { _PyAST_BinOp(a, Pow, b, EXTRA) }\n" +" | await_primary\n" +"\n" +"# Primary elements\n" +"# ----------------\n" +"\n" +"# Primary elements are things like \"obj.something.something\", \"obj[something]\", \"obj(something)\", \"obj\" ...\n" +"\n" +"await_primary[expr_ty] (memo):\n" +" | 'await' a=primary { CHECK_VERSION(expr_ty, 5, \"Await expressions are\", _PyAST_Await(a, EXTRA)) }\n" +" | primary\n" +"\n" +"primary[expr_ty]:\n" +" | a=primary '.' b=NAME { _PyAST_Attribute(a, b->v.Name.id, Load, EXTRA) }\n" +" | a=primary b=genexp { _PyAST_Call(a, CHECK(asdl_expr_seq*, (asdl_expr_seq*)_PyPegen_singleton_seq(p, b)), NULL, EXTRA) }\n" +" | a=primary '(' b=[arguments] ')' {\n" +" _PyAST_Call(a,\n" +" (b) ? ((expr_ty) b)->v.Call.args : NULL,\n" +" (b) ? ((expr_ty) b)->v.Call.keywords : NULL,\n" +" EXTRA) }\n" +" | a=primary '[' b=slices ']' { _PyAST_Subscript(a, b, Load, EXTRA) }\n" +" | atom\n" +"\n" +"slices[expr_ty]:\n" +" | a=slice !',' { a }\n" +" | a[asdl_expr_seq*]=','.(slice | starred_expression)+ [','] { _PyAST_Tuple(a, Load, EXTRA) }\n" +"\n" +"slice[expr_ty]:\n" +" | a=[expression] ':' b=[expression] c=[':' d=[expression] { d }] { _PyAST_Slice(a, b, c, EXTRA) }\n" +" | a=named_expression { a }\n" +"\n" +"atom[expr_ty]:\n" +" | NAME\n" +" | 'True' { _PyAST_Constant(Py_True, NULL, EXTRA) }\n" +" | 'False' { _PyAST_Constant(Py_False, NULL, EXTRA) }\n" +" | 'None' { _PyAST_Constant(Py_None, NULL, EXTRA) }\n" +" | &(STRING|FSTRING_START|TSTRING_START) strings\n" +" | NUMBER\n" +" | &'(' (genexp | tuple | group)\n" +" | &'[' (listcomp | list)\n" +" | &'{' (dictcomp | setcomp | dict | set)\n" +" | '...' { _PyAST_Constant(Py_Ellipsis, NULL, EXTRA) }\n" +"\n" +"group[expr_ty]:\n" +" | '(' a=(yield_expr | named_expression) ')' { a }\n" +" | invalid_group\n" +"\n" +"# Lambda functions\n" +"# ----------------\n" +"\n" +"lambdef[expr_ty]:\n" +" | 'lambda' a=[lambda_params] ':' b=expression {\n" +" _PyAST_Lambda((a) ? a : CHECK(arguments_ty, _PyPegen_empty_arguments(p)), b, EXTRA) }\n" +"\n" +"lambda_params[arguments_ty]:\n" +" | invalid_lambda_parameters\n" +" | lambda_parameters\n" +"\n" +"# lambda_parameters etc. duplicates parameters but without annotations\n" +"# or type comments, and if there's no comma after a parameter, we expect\n" +"# a colon, not a close parenthesis. (For more, see parameters above.)\n" +"#\n" +"lambda_parameters[arguments_ty]:\n" +" | a=lambda_slash_no_default b[asdl_arg_seq*]=lambda_param_no_default* c=lambda_param_with_default* d=[lambda_star_etc] {\n" +" CHECK_VERSION(arguments_ty, 8, \"Positional-only parameters are\", _PyPegen_make_arguments(p, a, NULL, b, c, d)) }\n" +" | a=lambda_slash_with_default b=lambda_param_with_default* c=[lambda_star_etc] {\n" +" CHECK_VERSION(arguments_ty, 8, \"Positional-only parameters are\", _PyPegen_make_arguments(p, NULL, a, NULL, b, c)) }\n" +" | a[asdl_arg_seq*]=lambda_param_no_default+ b=lambda_param_with_default* c=[lambda_star_etc] {\n" +" _PyPegen_make_arguments(p, NULL, NULL, a, b, c) }\n" +" | a=lambda_param_with_default+ b=[lambda_star_etc] { _PyPegen_make_arguments(p, NULL, NULL, NULL, a, b)}\n" +" | a=lambda_star_etc { _PyPegen_make_arguments(p, NULL, NULL, NULL, NULL, a) }\n" +"\n" +"lambda_slash_no_default[asdl_arg_seq*]:\n" +" | a[asdl_arg_seq*]=lambda_param_no_default+ '/' ',' { a }\n" +" | a[asdl_arg_seq*]=lambda_param_no_default+ '/' &':' { a }\n" +"\n" +"lambda_slash_with_default[SlashWithDefault*]:\n" +" | a=lambda_param_no_default* b=lambda_param_with_default+ '/' ',' { _PyPegen_slash_with_default(p, (asdl_arg_seq *)a, b) }\n" +" | a=lambda_param_no_default* b=lambda_param_with_default+ '/' &':' { _PyPegen_slash_with_default(p, (asdl_arg_seq *)a, b) }\n" +"\n" +"lambda_star_etc[StarEtc*]:\n" +" | invalid_lambda_star_etc\n" +" | '*' a=lambda_param_no_default b=lambda_param_maybe_default* c=[lambda_kwds] {\n" +" _PyPegen_star_etc(p, a, b, c) }\n" +" | '*' ',' b=lambda_param_maybe_default+ c=[lambda_kwds] {\n" +" _PyPegen_star_etc(p, NULL, b, c) }\n" +" | a=lambda_kwds { _PyPegen_star_etc(p, NULL, NULL, a) }\n" +"\n" +"lambda_kwds[arg_ty]:\n" +" | invalid_lambda_kwds\n" +" | '**' a=lambda_param_no_default { a }\n" +"\n" +"lambda_param_no_default[arg_ty]:\n" +" | a=lambda_param ',' { a }\n" +" | a=lambda_param &':' { a }\n" +"lambda_param_with_default[NameDefaultPair*]:\n" +" | a=lambda_param c=default ',' { _PyPegen_name_default_pair(p, a, c, NULL) }\n" +" | a=lambda_param c=default &':' { _PyPegen_name_default_pair(p, a, c, NULL) }\n" +"lambda_param_maybe_default[NameDefaultPair*]:\n" +" | a=lambda_param c=default? ',' { _PyPegen_name_default_pair(p, a, c, NULL) }\n" +" | a=lambda_param c=default? &':' { _PyPegen_name_default_pair(p, a, c, NULL) }\n" +"lambda_param[arg_ty]: a=NAME { _PyAST_arg(a->v.Name.id, NULL, NULL, EXTRA) }\n" +"\n" +"# LITERALS\n" +"# ========\n" +"\n" +"fstring_middle[expr_ty]:\n" +" | fstring_replacement_field\n" +" | t=FSTRING_MIDDLE { _PyPegen_constant_from_token(p, t) }\n" +"fstring_replacement_field[expr_ty]:\n" +" | '{' a=annotated_rhs debug_expr='='? conversion=[fstring_conversion] format=[fstring_full_format_spec] rbrace='}' {\n" +" _PyPegen_formatted_value(p, a, debug_expr, conversion, format, rbrace, EXTRA) }\n" +" | invalid_fstring_replacement_field\n" +"fstring_conversion[ResultTokenWithMetadata*]:\n" +" | conv_token=\"!\" conv=NAME { _PyPegen_check_fstring_conversion(p, conv_token, conv) }\n" +"fstring_full_format_spec[ResultTokenWithMetadata*]:\n" +" | colon=':' spec=fstring_format_spec* { _PyPegen_setup_full_format_spec(p, colon, (asdl_expr_seq *) spec, EXTRA) }\n" +"fstring_format_spec[expr_ty]:\n" +" | t=FSTRING_MIDDLE { _PyPegen_decoded_constant_from_token(p, t) }\n" +" | fstring_replacement_field\n" +"fstring[expr_ty]:\n" +" | a=FSTRING_START b=fstring_middle* c=FSTRING_END { _PyPegen_joined_str(p, a, (asdl_expr_seq*)b, c) }\n" +"\n" +"tstring_format_spec_replacement_field[expr_ty]:\n" +" | '{' a=annotated_rhs debug_expr='='? conversion=[fstring_conversion] format=[tstring_full_format_spec] rbrace='}' {\n" +" _PyPegen_formatted_value(p, a, debug_expr, conversion, format, rbrace, EXTRA) }\n" +" | invalid_tstring_replacement_field\n" +"tstring_format_spec[expr_ty]:\n" +" | t=TSTRING_MIDDLE { _PyPegen_decoded_constant_from_token(p, t) }\n" +" | tstring_format_spec_replacement_field\n" +"tstring_full_format_spec[ResultTokenWithMetadata*]:\n" +" | colon=':' spec=tstring_format_spec* { _PyPegen_setup_full_format_spec(p, colon, (asdl_expr_seq *) spec, EXTRA) }\n" +"tstring_replacement_field[expr_ty]:\n" +" | '{' a=annotated_rhs debug_expr='='? conversion=[fstring_conversion] format=[tstring_full_format_spec] rbrace='}' {\n" +" _PyPegen_interpolation(p, a, debug_expr, conversion, format, rbrace, EXTRA) }\n" +" | invalid_tstring_replacement_field\n" +"tstring_middle[expr_ty]:\n" +" | tstring_replacement_field\n" +" | t=TSTRING_MIDDLE { _PyPegen_constant_from_token(p, t) }\n" +"tstring[expr_ty] (memo):\n" +" | a=TSTRING_START b=tstring_middle* c=TSTRING_END {\n" +" CHECK_VERSION(\n" +" expr_ty,\n" +" 14,\n" +" \"t-strings are\",\n" +" _PyPegen_template_str(p, a, (asdl_expr_seq*)b, c)) }\n" +"\n" +"string[expr_ty]: s[Token*]=STRING { _PyPegen_constant_from_string(p, s) }\n" +"strings[expr_ty] (memo):\n" +" | invalid_string_tstring_concat\n" +" | a[asdl_expr_seq*]=(fstring|string)+ { _PyPegen_concatenate_strings(p, a, EXTRA) }\n" +" | a[asdl_expr_seq*]=tstring+ { _PyPegen_concatenate_tstrings(p, a, EXTRA) }\n" +"\n" +"list[expr_ty]:\n" +" | '[' a=[star_named_expressions_sequence] ']' { _PyAST_List(a, Load, EXTRA) }\n" +"\n" +"tuple[expr_ty]:\n" +" | '(' a=[y=star_named_expression_sequence ',' z=[star_named_expressions_sequence] { _PyPegen_seq_insert_in_front(p, y, z) } ] ')' {\n" +" _PyAST_Tuple(a, Load, EXTRA) }\n" +"\n" +"set[expr_ty]: '{' a=star_named_expressions_sequence '}' { _PyAST_Set(a, EXTRA) }\n" +"\n" +"# Dicts\n" +"# -----\n" +"\n" +"dict[expr_ty]:\n" +" | '{' a=[double_starred_kvpairs] '}' {\n" +" _PyAST_Dict(\n" +" CHECK(asdl_expr_seq*, _PyPegen_get_keys(p, a)),\n" +" CHECK(asdl_expr_seq*, _PyPegen_get_values(p, a)),\n" +" EXTRA) }\n" +" | '{' invalid_double_starred_kvpairs '}'\n" +"\n" +"double_starred_kvpairs[asdl_seq*]: a=','.double_starred_kvpair+ [','] { a }\n" +"\n" +"double_starred_kvpair[KeyValuePair*]:\n" +" | '**' a=bitwise_or { _PyPegen_key_value_pair(p, NULL, a) }\n" +" | kvpair\n" +"\n" +"kvpair[KeyValuePair*]: a=expression ':' b=expression { _PyPegen_key_value_pair(p, a, b) }\n" +"\n" +"# Comprehensions & Generators\n" +"# ---------------------------\n" +"\n" +"for_if_clauses[asdl_comprehension_seq*]:\n" +" | a[asdl_comprehension_seq*]=for_if_clause+ { a }\n" +"\n" +"for_if_clause[comprehension_ty]:\n" +" | 'async' 'for' a=star_targets 'in' ~ b=disjunction c[asdl_expr_seq*]=('if' z=disjunction { z })* {\n" +" CHECK_VERSION(comprehension_ty, 6, \"Async comprehensions are\", _PyAST_comprehension(a, b, c, 1, p->arena)) }\n" +" | 'for' a=star_targets 'in' ~ b=disjunction c[asdl_expr_seq*]=('if' z=disjunction { z })* {\n" +" _PyAST_comprehension(a, b, c, 0, p->arena) }\n" +" | invalid_for_if_clause\n" +" | invalid_for_target\n" +"\n" +"listcomp[expr_ty]:\n" +" | '[' a=star_named_expression b=for_if_clauses ']' { _PyAST_ListComp(a, b, EXTRA) }\n" +" | invalid_comprehension\n" +"\n" +"setcomp[expr_ty]:\n" +" | '{' a=star_named_expression b=for_if_clauses '}' { _PyAST_SetComp(a, b, EXTRA) }\n" +" | invalid_comprehension\n" +"\n" +"genexp[expr_ty]:\n" +" | '(' a=( assignment_expression | expression !':=' | starred_expression ) b=for_if_clauses ')' { _PyAST_GeneratorExp(a, b, EXTRA) }\n" +" | invalid_comprehension\n" +"\n" +"dictcomp[expr_ty]:\n" +" | '{' a=kvpair b=for_if_clauses '}' { _PyAST_DictComp(a->key, a->value, b, EXTRA) }\n" +" | '{' '**' a=expression b=for_if_clauses '}' { _PyAST_DictComp(a, NULL, b, EXTRA) }\n" +"\n" +"# FUNCTION CALL ARGUMENTS\n" +"# =======================\n" +"\n" +"arguments[expr_ty] (memo):\n" +" | a=args [','] &')' { a }\n" +" | invalid_arguments\n" +"\n" +"args[expr_ty]:\n" +" | a[asdl_expr_seq*]=','.(starred_expression | ( assignment_expression | expression !':=') !'=')+ b=[',' k=kwargs {k}] {\n" +" _PyPegen_collect_call_seqs(p, a, b, EXTRA) }\n" +" | a=kwargs { _PyAST_Call(_PyPegen_dummy_name(p),\n" +" CHECK_NULL_ALLOWED(asdl_expr_seq*, _PyPegen_seq_extract_starred_exprs(p, a)),\n" +" CHECK_NULL_ALLOWED(asdl_keyword_seq*, _PyPegen_seq_delete_starred_exprs(p, a)),\n" +" EXTRA) }\n" +"\n" +"kwargs[asdl_seq*]:\n" +" | a=','.kwarg_or_starred+ ',' b=','.kwarg_or_double_starred+ { _PyPegen_join_sequences(p, a, b) }\n" +" | ','.kwarg_or_starred+\n" +" | ','.kwarg_or_double_starred+\n" +"\n" +"starred_expression[expr_ty]:\n" +" | invalid_starred_expression_unpacking\n" +" | '*' a=expression { _PyAST_Starred(a, Load, EXTRA) }\n" +" | invalid_starred_expression\n" +"\n" +"kwarg_or_starred[KeywordOrStarred*]:\n" +" | invalid_kwarg\n" +" | a=NAME '=' b=expression {\n" +" _PyPegen_keyword_or_starred(p, CHECK(keyword_ty, _PyAST_keyword(a->v.Name.id, b, EXTRA)), 1) }\n" +" | a=starred_expression { _PyPegen_keyword_or_starred(p, a, 0) }\n" +"\n" +"kwarg_or_double_starred[KeywordOrStarred*]:\n" +" | invalid_kwarg\n" +" | a=NAME '=' b=expression {\n" +" _PyPegen_keyword_or_starred(p, CHECK(keyword_ty, _PyAST_keyword(a->v.Name.id, b, EXTRA)), 1) }\n" +" | '**' a=expression { _PyPegen_keyword_or_starred(p, CHECK(keyword_ty, _PyAST_keyword(NULL, a, EXTRA)), 1) }\n" +"\n" +"# ASSIGNMENT TARGETS\n" +"# ==================\n" +"\n" +"# Generic targets\n" +"# ---------------\n" +"\n" +"# NOTE: star_targets may contain *bitwise_or, targets may not.\n" +"star_targets[expr_ty]:\n" +" | a=star_target !',' { a }\n" +" | a=star_target b=(',' c=star_target { c })* [','] {\n" +" _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)), Store, EXTRA) }\n" +"\n" +"star_targets_list_seq[asdl_expr_seq*]: a[asdl_expr_seq*]=','.star_target+ [','] { a }\n" +"\n" +"star_targets_tuple_seq[asdl_expr_seq*]:\n" +" | a=star_target b=(',' c=star_target { c })+ [','] { (asdl_expr_seq*) _PyPegen_seq_insert_in_front(p, a, b) }\n" +" | a=star_target ',' { (asdl_expr_seq*) _PyPegen_singleton_seq(p, a) }\n" +"\n" +"star_target[expr_ty] (memo):\n" +" | '*' a=(!'*' star_target) {\n" +" _PyAST_Starred(CHECK(expr_ty, _PyPegen_set_expr_context(p, a, Store)), Store, EXTRA) }\n" +" | target_with_star_atom\n" +"\n" +"target_with_star_atom[expr_ty] (memo):\n" +" | a=t_primary '.' b=NAME !t_lookahead { _PyAST_Attribute(a, b->v.Name.id, Store, EXTRA) }\n" +" | a=t_primary '[' b=slices ']' !t_lookahead { _PyAST_Subscript(a, b, Store, EXTRA) }\n" +" | star_atom\n" +"\n" +"star_atom[expr_ty]:\n" +" | a=NAME { _PyPegen_set_expr_context(p, a, Store) }\n" +" | '(' a=target_with_star_atom ')' { _PyPegen_set_expr_context(p, a, Store) }\n" +" | '(' a=[star_targets_tuple_seq] ')' { _PyAST_Tuple(a, Store, EXTRA) }\n" +" | '[' a=[star_targets_list_seq] ']' { _PyAST_List(a, Store, EXTRA) }\n" +"\n" +"single_target[expr_ty]:\n" +" | single_subscript_attribute_target\n" +" | a=NAME { _PyPegen_set_expr_context(p, a, Store) }\n" +" | '(' a=single_target ')' { a }\n" +"\n" +"single_subscript_attribute_target[expr_ty]:\n" +" | a=t_primary '.' b=NAME !t_lookahead { _PyAST_Attribute(a, b->v.Name.id, Store, EXTRA) }\n" +" | a=t_primary '[' b=slices ']' !t_lookahead { _PyAST_Subscript(a, b, Store, EXTRA) }\n" +"\n" +"t_primary[expr_ty]:\n" +" | a=t_primary '.' b=NAME &t_lookahead { _PyAST_Attribute(a, b->v.Name.id, Load, EXTRA) }\n" +" | a=t_primary '[' b=slices ']' &t_lookahead { _PyAST_Subscript(a, b, Load, EXTRA) }\n" +" | a=t_primary b=genexp &t_lookahead {\n" +" _PyAST_Call(a, CHECK(asdl_expr_seq*, (asdl_expr_seq*)_PyPegen_singleton_seq(p, b)), NULL, EXTRA) }\n" +" | a=t_primary '(' b=[arguments] ')' &t_lookahead {\n" +" _PyAST_Call(a,\n" +" (b) ? ((expr_ty) b)->v.Call.args : NULL,\n" +" (b) ? ((expr_ty) b)->v.Call.keywords : NULL,\n" +" EXTRA) }\n" +" | a=atom &t_lookahead { a }\n" +"\n" +"t_lookahead: '(' | '[' | '.'\n" +"\n" +"# Targets for del statements\n" +"# --------------------------\n" +"\n" +"del_targets[asdl_expr_seq*]: a[asdl_expr_seq*]=','.del_target+ [','] { a }\n" +"\n" +"del_target[expr_ty] (memo):\n" +" | a=t_primary '.' b=NAME !t_lookahead { _PyAST_Attribute(a, b->v.Name.id, Del, EXTRA) }\n" +" | a=t_primary '[' b=slices ']' !t_lookahead { _PyAST_Subscript(a, b, Del, EXTRA) }\n" +" | del_t_atom\n" +"\n" +"del_t_atom[expr_ty]:\n" +" | a=NAME { _PyPegen_set_expr_context(p, a, Del) }\n" +" | '(' a=del_target ')' { _PyPegen_set_expr_context(p, a, Del) }\n" +" | '(' a=[del_targets] ')' { _PyAST_Tuple(a, Del, EXTRA) }\n" +" | '[' a=[del_targets] ']' { _PyAST_List(a, Del, EXTRA) }\n" +"\n" +"# TYPING ELEMENTS\n" +"# ---------------\n" +"\n" +"# type_expressions allow */** but ignore them\n" +"type_expressions[asdl_expr_seq*]:\n" +" | a=','.expression+ ',' '*' b=expression ',' '**' c=expression {\n" +" (asdl_expr_seq*)_PyPegen_seq_append_to_end(\n" +" p,\n" +" CHECK(asdl_seq*, _PyPegen_seq_append_to_end(p, a, b)),\n" +" c) }\n" +" | a=','.expression+ ',' '*' b=expression { (asdl_expr_seq*)_PyPegen_seq_append_to_end(p, a, b) }\n" +" | a=','.expression+ ',' '**' b=expression { (asdl_expr_seq*)_PyPegen_seq_append_to_end(p, a, b) }\n" +" | '*' a=expression ',' '**' b=expression {\n" +" (asdl_expr_seq*)_PyPegen_seq_append_to_end(\n" +" p,\n" +" CHECK(asdl_seq*, _PyPegen_singleton_seq(p, a)),\n" +" b) }\n" +" | '*' a=expression { (asdl_expr_seq*)_PyPegen_singleton_seq(p, a) }\n" +" | '**' a=expression { (asdl_expr_seq*)_PyPegen_singleton_seq(p, a) }\n" +" | a[asdl_expr_seq*]=','.expression+ {a}\n" +"\n" +"func_type_comment[Token*]:\n" +" | NEWLINE t=TYPE_COMMENT &(NEWLINE INDENT) { t } # Must be followed by indented block\n" +" | invalid_double_type_comments\n" +" | TYPE_COMMENT\n" +"\n" +"# ========================= END OF THE GRAMMAR ===========================\n" +"\n" +"\n" +"\n" +"# ========================= START OF INVALID RULES =======================\n" +"\n" +"# From here on, there are rules for invalid syntax with specialised error messages\n" +"invalid_arguments:\n" +" | ((','.(starred_expression | ( assignment_expression | expression !':=') !'=')+ ',' kwargs) | kwargs) a=',' ','.(starred_expression !'=')+ {\n" +" RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"iterable argument unpacking follows keyword argument unpacking\") }\n" +" | a=expression b=for_if_clauses ',' [args | expression for_if_clauses] {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, _PyPegen_get_last_comprehension_item(PyPegen_last_item(b, comprehension_ty)), \"Generator expression must be parenthesized\") }\n" +" | a=NAME b='=' expression for_if_clauses {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"invalid syntax. Maybe you meant '==' or ':=' instead of '='?\")}\n" +" | (args ',')? a=NAME b='=' &(',' | ')') {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"expected argument value expression\")}\n" +" | a=args b=for_if_clauses { _PyPegen_nonparen_genexp_in_call(p, a, b) }\n" +" | args ',' a=expression b=for_if_clauses {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, _PyPegen_get_last_comprehension_item(PyPegen_last_item(b, comprehension_ty)), \"Generator expression must be parenthesized\") }\n" +" | a=args ',' args { _PyPegen_arguments_parsing_error(p, a) }\n" +"invalid_kwarg:\n" +" | a[Token*]=('True'|'False'|'None') b='=' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"cannot assign to %s\", PyBytes_AS_STRING(a->bytes)) }\n" +" | a=NAME b='=' expression for_if_clauses {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"invalid syntax. Maybe you meant '==' or ':=' instead of '='?\")}\n" +" | !(NAME '=') a=expression b='=' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(\n" +" a, b, \"expression cannot contain assignment, perhaps you meant \\\"==\\\"?\") }\n" +" | a='**' expression '=' b=expression {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"cannot assign to keyword argument unpacking\") }\n" +"\n" +"# IMPORTANT: Note that the \"_without_invalid\" suffix causes the rule to not call invalid rules under it\n" +"expression_without_invalid[expr_ty]:\n" +" | a=disjunction 'if' b=disjunction 'else' c=expression { _PyAST_IfExp(b, a, c, EXTRA) }\n" +" | disjunction\n" +" | lambdef\n" +"invalid_legacy_expression:\n" +" | a=NAME !'(' b=star_expressions {\n" +" _PyPegen_check_legacy_stmt(p, a) ? RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b,\n" +" \"Missing parentheses in call to '%U'. Did you mean %U(...)?\", a->v.Name.id, a->v.Name.id) : NULL}\n" +"\n" +"invalid_type_param:\n" +" | '*' a=NAME colon=':' e=expression {\n" +" RAISE_SYNTAX_ERROR_STARTING_FROM(colon, e->kind == Tuple_kind\n" +" ? \"cannot use constraints with TypeVarTuple\"\n" +" : \"cannot use bound with TypeVarTuple\")\n" +" }\n" +" | '**' a=NAME colon=':' e=expression {\n" +" RAISE_SYNTAX_ERROR_STARTING_FROM(colon, e->kind == Tuple_kind\n" +" ? \"cannot use constraints with ParamSpec\"\n" +" : \"cannot use bound with ParamSpec\")\n" +" }\n" +"\n" +"invalid_expression:\n" +" | STRING a=(!STRING expression_without_invalid)+ STRING {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE( PyPegen_first_item(a, expr_ty), PyPegen_last_item(a, expr_ty),\n" +" \"invalid syntax. Is this intended to be part of the string?\") }\n" +" # !(NAME STRING) is not matched so we don't show this error with some invalid string prefixes like: kf\"dsfsdf\"\n" +" # Soft keywords need to also be ignored because they can be parsed as NAME NAME\n" +" | !(NAME STRING | SOFT_KEYWORD) a=disjunction b=expression_without_invalid {\n" +" _PyPegen_raise_error_for_missing_comma(p, a, b) }\n" +" | a=disjunction 'if' b=disjunction !('else'|':') { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"expected 'else' after 'if' expression\") }\n" +" | a=disjunction 'if' b=disjunction 'else' !expression {\n" +" RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"expected expression after 'else', but statement is given\") }\n" +" | a[stmt_ty]=(pass_stmt|break_stmt|continue_stmt) 'if' b=disjunction 'else' c=simple_stmt {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION (a, \"expected expression before 'if', but statement is given\") }\n" +" | a='lambda' [lambda_params] b=':' &FSTRING_MIDDLE {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"f-string: lambda expressions are not allowed without parentheses\") }\n" +" | a='lambda' [lambda_params] b=':' &TSTRING_MIDDLE {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"t-string: lambda expressions are not allowed without parentheses\") }\n" +"\n" +"invalid_if_expression:\n" +" | disjunction 'if' b=disjunction 'else' a='*' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"cannot unpack only part of a conditional expression\") }\n" +" | disjunction 'if' b=disjunction 'else' a='**' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"cannot use dict unpacking on only part of a conditional expression\") }\n" +"\n" +"invalid_named_expression(memo):\n" +" | a=expression ':=' expression {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(\n" +" a, \"cannot use assignment expressions with %s\", _PyPegen_get_expr_name(a)) }\n" +" | a=NAME '=' b=bitwise_or !('='|':=') {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"invalid syntax. Maybe you meant '==' or ':=' instead of '='?\") }\n" +" | !(list|tuple|genexp|'True'|'None'|'False') a=bitwise_or b='=' bitwise_or !('='|':=') {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"cannot assign to %s here. Maybe you meant '==' instead of '='?\",\n" +" _PyPegen_get_expr_name(a)) }\n" +"\n" +"invalid_assignment:\n" +" | a=invalid_ann_assign_target ':' expression {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(\n" +" a,\n" +" \"only single target (not %s) can be annotated\",\n" +" _PyPegen_get_expr_name(a)\n" +" )}\n" +" | a=star_named_expression ',' star_named_expressions* ':' expression {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"only single target (not tuple) can be annotated\") }\n" +" | a=expression ':' expression {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"illegal target for annotation\") }\n" +" | (star_targets '=')* a=star_expressions '=' {\n" +" RAISE_SYNTAX_ERROR_INVALID_TARGET(STAR_TARGETS, a) }\n" +" | (star_targets '=')* a=yield_expr '=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"assignment to yield expression not possible\") }\n" +" | a=star_expressions augassign annotated_rhs {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(\n" +" a,\n" +" \"'%s' is an illegal expression for augmented assignment\",\n" +" _PyPegen_get_expr_name(a)\n" +" )}\n" +"invalid_ann_assign_target[expr_ty]:\n" +" | list\n" +" | tuple\n" +" | '(' a=invalid_ann_assign_target ')' { a }\n" +"invalid_raise_stmt:\n" +" | a='raise' b='from' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"did you forget an expression between 'raise' and 'from'?\") }\n" +" | 'raise' expression a='from' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"did you forget an expression after 'from'?\") }\n" +"invalid_del_stmt:\n" +" | 'del' a=star_expressions {\n" +" RAISE_SYNTAX_ERROR_INVALID_TARGET(DEL_TARGETS, a) }\n" +"invalid_assert_stmt:\n" +" | 'assert' a=expression '=' b=expression {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(\n" +" a, b,\n" +" \"cannot assign to %s here. Maybe you meant '==' instead of '='?\",\n" +" _PyPegen_get_expr_name(a)) }\n" +" | 'assert' expression ',' a=expression '=' b=expression {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(\n" +" a, b,\n" +" \"cannot assign to %s here. Maybe you meant '==' instead of '='?\",\n" +" _PyPegen_get_expr_name(a)) }\n" +" | 'assert' a=expression ':=' b=expression {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(\n" +" a, b,\n" +" \"cannot use named expression without parentheses here\") }\n" +" | 'assert' expression ',' a=expression ':=' b=expression {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(\n" +" a, b,\n" +" \"cannot use named expression without parentheses here\") }\n" +"invalid_block:\n" +" | NEWLINE !INDENT { RAISE_INDENTATION_ERROR(\"expected an indented block\") }\n" +"invalid_comprehension:\n" +" | '[' a='**' b=expression for_if_clauses {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"cannot use dict unpacking in list comprehension\") }\n" +" | '(' a='**' b=expression for_if_clauses {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"cannot use dict unpacking in generator expression\") }\n" +" | ('[' | '{') a=star_named_expression ',' b=star_named_expressions for_if_clauses {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, PyPegen_last_item(b, expr_ty),\n" +" \"did you forget parentheses around the comprehension target?\") }\n" +" | ('[' | '{') a=star_named_expression b=',' for_if_clauses {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"did you forget parentheses around the comprehension target?\") }\n" +"invalid_parameters:\n" +" | a=\"/\" ',' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"at least one parameter must precede /\") }\n" +" | (slash_no_default | slash_with_default) param_maybe_default* a='/' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"/ may appear only once\") }\n" +" | slash_no_default? param_no_default* invalid_parameters_helper a=param_no_default {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"parameter without a default follows parameter with a default\") }\n" +" | param_no_default* a='(' param_no_default+ ','? b=')' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"Function parameters cannot be parenthesized\") }\n" +" | (slash_no_default | slash_with_default)? param_maybe_default* '*' (',' | param_no_default) param_maybe_default* a='/' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"/ must be ahead of *\") }\n" +" | param_maybe_default+ '/' a='*' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"expected comma between / and *\") }\n" +"invalid_default:\n" +" | a='=' &(')'|',') { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"expected default value expression\") }\n" +"invalid_star_etc:\n" +" | a='*' (')' | ',' (')' | '**')) { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"named parameters must follow bare *\") }\n" +" | '*' ',' TYPE_COMMENT { RAISE_SYNTAX_ERROR(\"bare * has associated type comment\") }\n" +" | '*' param a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"var-positional parameter cannot have default value\") }\n" +" | '*' (param_no_default | ',') param_maybe_default* a='*' (param_no_default | ',') {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"* may appear only once\") }\n" +"invalid_kwds:\n" +" | '**' param a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"var-keyword parameter cannot have default value\") }\n" +" | '**' param ',' a=param { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"parameters cannot follow var-keyword parameter\") }\n" +" | '**' param ',' a[Token*]=('*'|'**'|'/') { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"parameters cannot follow var-keyword parameter\") }\n" +"invalid_parameters_helper: # This is only there to avoid type errors\n" +" | a=slash_with_default { _PyPegen_singleton_seq(p, a) }\n" +" | param_with_default+\n" +"invalid_lambda_parameters:\n" +" | a=\"/\" ',' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"at least one parameter must precede /\") }\n" +" | (lambda_slash_no_default | lambda_slash_with_default) lambda_param_maybe_default* a='/' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"/ may appear only once\") }\n" +" | lambda_slash_no_default? lambda_param_no_default* invalid_lambda_parameters_helper a=lambda_param_no_default {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"parameter without a default follows parameter with a default\") }\n" +" | lambda_param_no_default* a='(' ','.lambda_param+ ','? b=')' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"Lambda expression parameters cannot be parenthesized\") }\n" +" | (lambda_slash_no_default | lambda_slash_with_default)? lambda_param_maybe_default* '*' (',' | lambda_param_no_default) lambda_param_maybe_default* a='/' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"/ must be ahead of *\") }\n" +" | lambda_param_maybe_default+ '/' a='*' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"expected comma between / and *\") }\n" +"invalid_lambda_parameters_helper:\n" +" | a=lambda_slash_with_default { _PyPegen_singleton_seq(p, a) }\n" +" | lambda_param_with_default+\n" +"invalid_lambda_star_etc:\n" +" | '*' (':' | ',' (':' | '**')) { RAISE_SYNTAX_ERROR(\"named parameters must follow bare *\") }\n" +" | '*' lambda_param a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"var-positional parameter cannot have default value\") }\n" +" | '*' (lambda_param_no_default | ',') lambda_param_maybe_default* a='*' (lambda_param_no_default | ',') {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"* may appear only once\") }\n" +"invalid_lambda_kwds:\n" +" | '**' lambda_param a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"var-keyword parameter cannot have default value\") }\n" +" | '**' lambda_param ',' a=lambda_param { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"parameters cannot follow var-keyword parameter\") }\n" +" | '**' lambda_param ',' a[Token*]=('*'|'**'|'/') { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"parameters cannot follow var-keyword parameter\") }\n" +"invalid_double_type_comments:\n" +" | TYPE_COMMENT NEWLINE TYPE_COMMENT NEWLINE INDENT {\n" +" RAISE_SYNTAX_ERROR(\"Cannot have two type comments on def\") }\n" +"invalid_with_item:\n" +" | expression 'as' a=expression &(',' | ')' | ':') {\n" +" RAISE_SYNTAX_ERROR_INVALID_TARGET(STAR_TARGETS, a) }\n" +"\n" +"invalid_for_if_clause:\n" +" | 'async'? 'for' (bitwise_or (',' bitwise_or)* [',']) !'in' {\n" +" RAISE_SYNTAX_ERROR(\"'in' expected after for-loop variables\") }\n" +"\n" +"invalid_for_target:\n" +" | 'async'? 'for' a=star_expressions {\n" +" RAISE_SYNTAX_ERROR_INVALID_TARGET(FOR_TARGETS, a) }\n" +"\n" +"invalid_group:\n" +" | '(' a=starred_expression ')' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"cannot use starred expression here\") }\n" +" | '(' a='**' expression ')' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"cannot use double starred expression here\") }\n" +"invalid_import:\n" +" | a='import' ','.dotted_name+ 'from' dotted_name {\n" +" RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"Did you mean to use 'from ... import ...' instead?\") }\n" +" | 'import' token=NEWLINE {\n" +" RAISE_SYNTAX_ERROR_STARTING_FROM(token, \"Expected one or more names after 'import'\") }\n" +"invalid_dotted_as_name:\n" +" | dotted_name 'as' !(NAME (',' | ')' | ';' | NEWLINE)) a=expression {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a,\n" +" \"cannot use %s as import target\", _PyPegen_get_expr_name(a)) }\n" +"invalid_import_from_as_name:\n" +" | NAME 'as' !(NAME (',' | ')' | ';' | NEWLINE)) a=expression {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a,\n" +" \"cannot use %s as import target\", _PyPegen_get_expr_name(a)) }\n" +"\n" +"invalid_import_from:\n" +" | 'from' ('.' | '...')* dotted_name a=\"lazy\" 'import' import_from_targets {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a,\n" +" \"use 'lazy from ... ' instead of 'from ... lazy import'\") }\n" +"\n" +"invalid_import_from_targets:\n" +" | import_from_as_names ',' NEWLINE {\n" +" RAISE_SYNTAX_ERROR(\"trailing comma not allowed without surrounding parentheses\") }\n" +" | token=NEWLINE {\n" +" RAISE_SYNTAX_ERROR_STARTING_FROM(token, \"Expected one or more names after 'import'\") }\n" +"\n" +"invalid_with_stmt:\n" +" | ['async'] 'with' ','.(expression ['as' star_target])+ trailing=',' ':' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(trailing, \"the last 'with' item has a trailing comma\") }\n" +" | ['async'] 'with' ','.(expression ['as' star_target])+ NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +" | ['async'] 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +"invalid_with_stmt_indent:\n" +" | ['async'] a='with' ','.(expression ['as' star_target])+ ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after 'with' statement on line %d\", a->lineno) }\n" +" | ['async'] a='with' '(' ','.(expressions ['as' star_target])+ ','? ')' ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after 'with' statement on line %d\", a->lineno) }\n" +"\n" +"invalid_try_stmt:\n" +" | a='try' ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after 'try' statement on line %d\", a->lineno) }\n" +" | 'try' ':' block !('except' | 'finally') { RAISE_SYNTAX_ERROR(\"expected 'except' or 'finally' block\") }\n" +" | 'try' ':' block* except_block+ a='except' b='*' expression ['as' NAME] ':' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"cannot have both 'except' and 'except*' on the same 'try'\") }\n" +" | 'try' ':' block* except_star_block+ a='except' [expression ['as' NAME]] ':' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"cannot have both 'except' and 'except*' on the same 'try'\") }\n" +"invalid_except_stmt:\n" +" | 'except' a=expression ',' expressions 'as' NAME ':' {\n" +" RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"multiple exception types must be parenthesized when using 'as'\") }\n" +" | a='except' expression ['as' NAME ] NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +" | a='except' NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\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" +"invalid_except_star_stmt:\n" +" | 'except' '*' a=expression ',' expressions 'as' NAME ':' {\n" +" RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"multiple exception types must be parenthesized when using 'as'\") }\n" +" | a='except' '*' expression ['as' NAME ] NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +" | a='except' '*' (NEWLINE | ':') { RAISE_SYNTAX_ERROR(\"expected one or more exception types\") }\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" +"invalid_finally_stmt:\n" +" | a='finally' ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after 'finally' statement on line %d\", a->lineno) }\n" +"invalid_except_stmt_indent:\n" +" | a='except' expression ['as' NAME ] ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after 'except' statement on line %d\", a->lineno) }\n" +" | a='except' ':' NEWLINE !INDENT { RAISE_INDENTATION_ERROR(\"expected an indented block after 'except' statement on line %d\", a->lineno) }\n" +"invalid_except_star_stmt_indent:\n" +" | a='except' '*' expression ['as' NAME ] ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after 'except*' statement on line %d\", a->lineno) }\n" +"invalid_match_stmt:\n" +" | \"match\" subject_expr NEWLINE { CHECK_VERSION(void*, 10, \"Pattern matching is\", RAISE_SYNTAX_ERROR(\"expected ':'\") ) }\n" +" | a=\"match\" subject=subject_expr ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after 'match' statement on line %d\", a->lineno) }\n" +" | a=\"case\" patterns guard? b=':' block {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(\n" +" a, b,\n" +" \"case statement must be inside match statement\") }\n" +"invalid_case_block:\n" +" | \"case\" patterns guard? NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +" | a=\"case\" patterns guard? ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after 'case' statement on line %d\", a->lineno) }\n" +"invalid_as_pattern:\n" +" | or_pattern 'as' a=\"_\" { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"cannot use '_' as a target\") }\n" +" | or_pattern 'as' a=expression {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(\n" +" a, \"cannot use %s as pattern target\", _PyPegen_get_expr_name(a)) }\n" +"invalid_class_pattern:\n" +" | name_or_attr '(' a=invalid_class_argument_pattern { RAISE_SYNTAX_ERROR_KNOWN_RANGE(\n" +" PyPegen_first_item(a, pattern_ty),\n" +" PyPegen_last_item(a, pattern_ty),\n" +" \"positional patterns follow keyword patterns\") }\n" +"invalid_mapping_pattern:\n" +" | '{' (items_pattern ',')? rest=double_star_pattern ',' items_pattern ','? '}' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(\n" +" rest,\n" +" \"double star pattern must be the last (right-most) subpattern in the mapping pattern\") }\n" +"invalid_class_argument_pattern[asdl_pattern_seq*]:\n" +" | [positional_patterns ','] keyword_patterns ',' a=positional_patterns { a }\n" +"invalid_if_stmt:\n" +" | 'if' named_expression NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +" | a='if' a=named_expression ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after 'if' statement on line %d\", a->lineno) }\n" +"invalid_elif_stmt:\n" +" | 'elif' named_expression NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +" | a='elif' named_expression ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after 'elif' statement on line %d\", a->lineno) }\n" +"invalid_else_stmt:\n" +" | a='else' ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after 'else' statement on line %d\", a->lineno) }\n" +" | 'else' ':' block 'elif' { RAISE_SYNTAX_ERROR(\"'elif' block follows an 'else' block\")}\n" +"invalid_while_stmt:\n" +" | 'while' named_expression NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +" | a='while' named_expression ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after 'while' statement on line %d\", a->lineno) }\n" +"invalid_for_stmt:\n" +" | ['async'] 'for' star_targets 'in' star_expressions NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +" | ['async'] a='for' star_targets 'in' star_expressions ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after 'for' statement on line %d\", a->lineno) }\n" +"invalid_def_raw:\n" +" | ['async'] a='def' NAME [type_params] '(' [params] ')' ['->' expression] ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after function definition on line %d\", a->lineno) }\n" +" | ['async'] 'def' NAME [type_params] &&'(' [params] ')' ['->' expression] &&':' [func_type_comment] block\n" +"invalid_class_def_raw:\n" +" | 'class' NAME [type_params] ['(' [arguments] ')'] NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +" | a='class' NAME [type_params] ['(' [arguments] ')'] ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after class definition on line %d\", a->lineno) }\n" +"\n" +"invalid_double_starred_kvpairs:\n" +" | invalid_kvpair_unpacking [',']\n" +" | ','.double_starred_kvpair+ ',' (invalid_kvpair | invalid_kvpair_unpacking)\n" +" | expression a=':' &('}'|',') { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"expression expected after dictionary key and ':'\") }\n" +"invalid_kvpair_unpacking:\n" +" | a='**' b=if_expression {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"invalid double starred expression. Did you forget to wrap the conditional expression in parentheses?\") }\n" +" | a='*' b=bitwise_or ':' expression { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"cannot use a starred expression in a dictionary key\") }\n" +" | a='**' b=bitwise_or ':' expression { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"cannot use dict unpacking in a dictionary key\") }\n" +" | expression ':' a='*' b=bitwise_or { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"cannot use a starred expression in a dictionary value\") }\n" +" | expression ':' a='**' b=bitwise_or { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"cannot use dict unpacking in a dictionary value\") }\n" +"invalid_kvpair:\n" +" | a=expression !(':') {\n" +" RAISE_ERROR_KNOWN_LOCATION(p, PyExc_SyntaxError, a->lineno, a->end_col_offset - 1, a->end_lineno, -1, \"':' expected after dictionary key\") }\n" +" | expression ':' a='*' bitwise_or { RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"cannot use a starred expression in a dictionary value\") }\n" +" | expression ':' a='**' bitwise_or { RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"cannot use dict unpacking in a dictionary value\") }\n" +" | expression a=':' &('}'|',') {RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"expression expected after dictionary key and ':'\") }\n" +"invalid_starred_expression_unpacking:\n" +" | a='*' b=if_expression {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"invalid starred expression. Did you forget to wrap the conditional expression in parentheses?\") }\n" +" | a='*' expression '=' b=expression { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"cannot assign to iterable argument unpacking\") }\n" +"invalid_starred_expression_unpacking_sequence:\n" +" | a='**' bitwise_or {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"cannot use dict unpacking here\") }\n" +" | invalid_starred_expression_unpacking\n" +"invalid_starred_expression:\n" +" | '*' { RAISE_SYNTAX_ERROR(\"Invalid star expression\") }\n" +"invalid_fstring_replacement_field:\n" +" | '{' a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"f-string: valid expression required before '='\") }\n" +" | '{' a='!' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"f-string: valid expression required before '!'\") }\n" +" | '{' a=':' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"f-string: valid expression required before ':'\") }\n" +" | '{' a='}' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"f-string: valid expression required before '}'\") }\n" +" | '{' !annotated_rhs { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting a valid expression after '{'\") }\n" +" | '{' annotated_rhs !('=' | '!' | ':' | '}') {\n" +" PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting '=', or '!', or ':', or '}'\") }\n" +" | '{' annotated_rhs '=' !('!' | ':' | '}') {\n" +" PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting '!', or ':', or '}'\") }\n" +" | '{' annotated_rhs '='? invalid_fstring_conversion_character\n" +" | '{' annotated_rhs '='? ['!' NAME] !(':' | '}') {\n" +" PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting ':' or '}'\") }\n" +" | '{' annotated_rhs '='? ['!' NAME] ':' fstring_format_spec* !'}' {\n" +" PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting '}', or format specs\") }\n" +" | '{' annotated_rhs '='? ['!' NAME] !'}' {\n" +" PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting '}'\") }\n" +"\n" +"invalid_fstring_conversion_character:\n" +" | '!' &(':' | '}') { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: missing conversion character\") }\n" +" | '!' !NAME { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: invalid conversion character\") }\n" +"\n" +"invalid_tstring_replacement_field:\n" +" | '{' a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"t-string: valid expression required before '='\") }\n" +" | '{' a='!' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"t-string: valid expression required before '!'\") }\n" +" | '{' a=':' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"t-string: valid expression required before ':'\") }\n" +" | '{' a='}' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"t-string: valid expression required before '}'\") }\n" +" | '{' !annotated_rhs { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting a valid expression after '{'\") }\n" +" | '{' annotated_rhs !('=' | '!' | ':' | '}') {\n" +" PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting '=', or '!', or ':', or '}'\") }\n" +" | '{' annotated_rhs '=' !('!' | ':' | '}') {\n" +" PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting '!', or ':', or '}'\") }\n" +" | '{' annotated_rhs '='? invalid_tstring_conversion_character\n" +" | '{' annotated_rhs '='? ['!' NAME] !(':' | '}') {\n" +" PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting ':' or '}'\") }\n" +" | '{' annotated_rhs '='? ['!' NAME] ':' fstring_format_spec* !'}' {\n" +" PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting '}', or format specs\") }\n" +" | '{' annotated_rhs '='? ['!' NAME] !'}' {\n" +" PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting '}'\") }\n" +"\n" +"invalid_tstring_conversion_character:\n" +" | '!' &(':' | '}') { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: missing conversion character\") }\n" +" | '!' !NAME { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: invalid conversion character\") }\n" +"\n" +"invalid_string_tstring_concat:\n" +" | a=(fstring|string)+ b[expr_ty]=tstring {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(PyPegen_last_item(a, expr_ty), b, \"cannot mix t-string literals with string or bytes literals\") }\n" +" | a=tstring+ b[expr_ty]=(fstring|string) {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(PyPegen_last_item(a, expr_ty), b, \"cannot mix t-string literals with string or bytes literals\") }\n" +"\n" +"invalid_arithmetic:\n" +" | sum ('+'|'-'|'*'|'/'|'%'|'//'|'@') a='not' b=inversion { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"'not' after an operator must be parenthesized\") }\n" +"invalid_factor:\n" +" | ('+' | '-' | '~') a='not' b=factor { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"'not' after an operator must be parenthesized\") }\n" +"\n" +"invalid_type_params:\n" +" | '[' token=']' {\n" +" RAISE_SYNTAX_ERROR_STARTING_FROM(\n" +" token,\n" +" \"Type parameter list cannot be empty\")}\n" +"\n" +"invalid_noteq:\n" +" | a='<' b='>' {\n" +" _PyPegen_tokens_are_adjacent(a, b)\n" +" ? RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"invalid syntax. Maybe you meant '!=' instead of '<>'?\")\n" +" : NULL\n" +" }\n" +msgstr "" +"# PEG grammar for Python\n" +"\n" +"@trailer '''\n" +"void *\n" +"_PyPegen_parse(Parser *p)\n" +"{\n" +" // Initialize keywords\n" +" p->keywords = reserved_keywords;\n" +" p->n_keyword_lists = n_keyword_lists;\n" +" p->soft_keywords = soft_keywords;\n" +"\n" +" // Run parser\n" +" void *result = NULL;\n" +" if (p->start_rule == Py_file_input) {\n" +" result = file_rule(p);\n" +" } else if (p->start_rule == Py_single_input) {\n" +" result = interactive_rule(p);\n" +" } else if (p->start_rule == Py_eval_input) {\n" +" result = eval_rule(p);\n" +" } else if (p->start_rule == Py_func_type_input) {\n" +" result = func_type_rule(p);\n" +" }\n" +"\n" +" return result;\n" +"}\n" +"'''\n" +"\n" +"# ========================= START OF THE GRAMMAR =========================\n" +"\n" +"# General grammatical elements and rules:\n" +"#\n" +"# * Strings with double quotes (\") denote SOFT KEYWORDS\n" +"# * Strings with single quotes (') denote KEYWORDS\n" +"# * Upper case names (NAME) denote tokens in the Grammar/Tokens file\n" +"# * Rule names starting with \"invalid_\" are used for specialized syntax errors\n" +"# - These rules are NOT used in the first pass of the parser.\n" +"# - Only if the first pass fails to parse, a second pass including the invalid\n" +"# rules will be executed.\n" +"# - If the parser fails in the second phase with a generic syntax error, the\n" +"# location of the generic failure of the first pass will be used (this avoids\n" +"# reporting incorrect locations due to the invalid rules).\n" +"# - The order of the alternatives involving invalid rules matter\n" +"# (like any rule in PEG).\n" +"#\n" +"# Grammar Syntax (see PEP 617 for more information):\n" +"#\n" +"# rule_name: expression\n" +"# Optionally, a type can be included right after the rule name, which\n" +"# specifies the return type of the C or Python function corresponding to the\n" +"# rule:\n" +"# rule_name[return_type]: expression\n" +"# If the return type is omitted, then a void * is returned in C and an Any in\n" +"# Python.\n" +"# e1 e2\n" +"# Match e1, then match e2.\n" +"# e1 | e2\n" +"# Match e1 or e2.\n" +"# The first alternative can also appear on the line after the rule name for\n" +"# formatting purposes. In that case, a | must be used before the first\n" +"# alternative, like so:\n" +"# rule_name[return_type]:\n" +"# | first_alt\n" +"# | second_alt\n" +"# ( e )\n" +"# Match e (allows also to use other operators in the group like '(e)*')\n" +"# [ e ] or e?\n" +"# Optionally match e.\n" +"# e*\n" +"# Match zero or more occurrences of e.\n" +"# e+\n" +"# Match one or more occurrences of e.\n" +"# s.e+\n" +"# Match one or more occurrences of e, separated by s. The generated parse tree\n" +"# does not include the separator. This is otherwise identical to (e (s e)*).\n" +"# &e\n" +"# Succeed if e can be parsed, without consuming any input.\n" +"# !e\n" +"# Fail if e can be parsed, without consuming any input.\n" +"# ~\n" +"# Commit to the current alternative, even if it fails to parse.\n" +"# &&e\n" +"# Eager parse e. The parser will not backtrack and will immediately\n" +"# fail with SyntaxError if e cannot be parsed.\n" +"#\n" +"\n" +"# STARTING RULES\n" +"# ==============\n" +"\n" +"file[mod_ty]: a=[statements] ENDMARKER { _PyPegen_make_module(p, a) }\n" +"interactive[mod_ty]: a=statement_newline { _PyAST_Interactive(a, p->arena) }\n" +"eval[mod_ty]: a=expressions NEWLINE* ENDMARKER { _PyAST_Expression(a, p->arena) }\n" +"func_type[mod_ty]: '(' a=[type_expressions] ')' '->' b=expression NEWLINE* ENDMARKER { _PyAST_FunctionType(a, b, p->arena) }\n" +"\n" +"# GENERAL STATEMENTS\n" +"# ==================\n" +"\n" +"statements[asdl_stmt_seq*]: a=statement+ { (asdl_stmt_seq*)_PyPegen_seq_flatten(p, a) }\n" +"\n" +"statement[asdl_stmt_seq*]:\n" +" | a=compound_stmt { _PyPegen_register_stmts(p ,\n" +" (asdl_stmt_seq*)_PyPegen_singleton_seq(p, a)\n" +" ) }\n" +" | a[asdl_stmt_seq*]=simple_stmts { a }\n" +"\n" +"single_compound_stmt[asdl_stmt_seq*]:\n" +" | a=compound_stmt {\n" +" _PyPegen_register_stmts(p, (asdl_stmt_seq*)_PyPegen_singleton_seq(p, a)) }\n" +"\n" +"statement_newline[asdl_stmt_seq*]:\n" +" | a=single_compound_stmt NEWLINE { a }\n" +" | simple_stmts\n" +" | NEWLINE { (asdl_stmt_seq*)_PyPegen_singleton_seq(p, CHECK(stmt_ty, _PyAST_Pass(EXTRA))) }\n" +" | ENDMARKER { _PyPegen_interactive_exit(p) }\n" +"\n" +"simple_stmts[asdl_stmt_seq*]:\n" +" | a=simple_stmt !';' NEWLINE { (asdl_stmt_seq*)_PyPegen_singleton_seq(p, a) } # Not needed, there for speedup\n" +" | a[asdl_stmt_seq*]=';'.simple_stmt+ [';'] NEWLINE { a }\n" +"\n" +"# NOTE: assignment MUST precede expression, else parsing a simple assignment\n" +"# will throw a SyntaxError.\n" +"simple_stmt[stmt_ty] (memo):\n" +" | assignment\n" +" | &\"type\" type_alias\n" +" | e=star_expressions { _PyAST_Expr(e, EXTRA) }\n" +" | &'return' return_stmt\n" +" | &('import' | 'from') import_stmt\n" +" | &'raise' raise_stmt\n" +" | &'pass' pass_stmt\n" +" | &'del' del_stmt\n" +" | &'yield' yield_stmt\n" +" | &'assert' assert_stmt\n" +" | &'break' break_stmt\n" +" | &'continue' continue_stmt\n" +" | &'global' global_stmt\n" +" | &'nonlocal' nonlocal_stmt\n" +"\n" +"compound_stmt[stmt_ty]:\n" +" | &('def' | '@' | 'async') function_def\n" +" | &'if' if_stmt\n" +" | &('class' | '@') class_def\n" +" | &('with' | 'async') with_stmt\n" +" | &('for' | 'async') for_stmt\n" +" | &'try' try_stmt\n" +" | &'while' while_stmt\n" +" | match_stmt\n" +"\n" +"# SIMPLE STATEMENTS\n" +"# =================\n" +"\n" +"# NOTE: annotated_rhs may start with 'yield'; yield_expr must start with 'yield'\n" +"assignment[stmt_ty]:\n" +" | a=NAME ':' b=expression c=['=' d=annotated_rhs { d }] {\n" +" CHECK_VERSION(\n" +" stmt_ty,\n" +" 6,\n" +" \"Variable annotation syntax is\",\n" +" _PyAST_AnnAssign(CHECK(expr_ty, _PyPegen_set_expr_context(p, a, Store)), b, c, 1, EXTRA)\n" +" ) }\n" +" | a=('(' b=single_target ')' { b }\n" +" | single_subscript_attribute_target) ':' b=expression c=['=' d=annotated_rhs { d }] {\n" +" CHECK_VERSION(stmt_ty, 6, \"Variable annotations syntax is\", _PyAST_AnnAssign(a, b, c, 0, EXTRA)) }\n" +" | a[asdl_expr_seq*]=(z=star_targets '=' { z })+ b=annotated_rhs !'=' tc=[TYPE_COMMENT] {\n" +" _PyAST_Assign(a, b, NEW_TYPE_COMMENT(p, tc), EXTRA) }\n" +" | a=single_target b=augassign ~ c=annotated_rhs {\n" +" _PyAST_AugAssign(a, b->kind, c, EXTRA) }\n" +" | invalid_assignment\n" +"\n" +"annotated_rhs[expr_ty]: yield_expr | star_expressions\n" +"\n" +"augassign[AugOperator*]:\n" +" | '+=' { _PyPegen_augoperator(p, Add) }\n" +" | '-=' { _PyPegen_augoperator(p, Sub) }\n" +" | '*=' { _PyPegen_augoperator(p, Mult) }\n" +" | '@=' { CHECK_VERSION(AugOperator*, 5, \"The '@' operator is\", _PyPegen_augoperator(p, MatMult)) }\n" +" | '/=' { _PyPegen_augoperator(p, Div) }\n" +" | '%=' { _PyPegen_augoperator(p, Mod) }\n" +" | '&=' { _PyPegen_augoperator(p, BitAnd) }\n" +" | '|=' { _PyPegen_augoperator(p, BitOr) }\n" +" | '^=' { _PyPegen_augoperator(p, BitXor) }\n" +" | '<<=' { _PyPegen_augoperator(p, LShift) }\n" +" | '>>=' { _PyPegen_augoperator(p, RShift) }\n" +" | '**=' { _PyPegen_augoperator(p, Pow) }\n" +" | '//=' { _PyPegen_augoperator(p, FloorDiv) }\n" +"\n" +"return_stmt[stmt_ty]:\n" +" | 'return' a=[star_expressions] { _PyAST_Return(a, EXTRA) }\n" +"\n" +"raise_stmt[stmt_ty]:\n" +" | 'raise' a=expression b=['from' z=expression { z }] { _PyAST_Raise(a, b, EXTRA) }\n" +" | 'raise' { _PyAST_Raise(NULL, NULL, EXTRA) }\n" +"\n" +"pass_stmt[stmt_ty]:\n" +" | 'pass' { _PyAST_Pass(EXTRA) }\n" +"\n" +"break_stmt[stmt_ty]:\n" +" | 'break' { _PyAST_Break(EXTRA) }\n" +"\n" +"continue_stmt[stmt_ty]:\n" +" | 'continue' { _PyAST_Continue(EXTRA) }\n" +"\n" +"global_stmt[stmt_ty]: 'global' a[asdl_expr_seq*]=','.NAME+ {\n" +" _PyAST_Global(CHECK(asdl_identifier_seq*, _PyPegen_map_names_to_ids(p, a)), EXTRA) }\n" +"\n" +"nonlocal_stmt[stmt_ty]: 'nonlocal' a[asdl_expr_seq*]=','.NAME+ {\n" +" _PyAST_Nonlocal(CHECK(asdl_identifier_seq*, _PyPegen_map_names_to_ids(p, a)), EXTRA) }\n" +"\n" +"del_stmt[stmt_ty]:\n" +" | 'del' a=del_targets &(';' | NEWLINE) { _PyAST_Delete(a, EXTRA) }\n" +" | invalid_del_stmt\n" +"\n" +"yield_stmt[stmt_ty]: y=yield_expr { _PyAST_Expr(y, EXTRA) }\n" +"\n" +"assert_stmt[stmt_ty]: 'assert' a=expression b=[',' z=expression { z }] { _PyAST_Assert(a, b, EXTRA) }\n" +"\n" +"import_stmt[stmt_ty]:\n" +" | invalid_import\n" +" | import_name\n" +" | import_from\n" +"\n" +"# Import statements\n" +"# -----------------\n" +"\n" +"import_name[stmt_ty]: 'import' a=dotted_as_names { _PyAST_Import(a, EXTRA) }\n" +"# note below: the ('.' | '...') is necessary because '...' is tokenized as ELLIPSIS\n" +"import_from[stmt_ty]:\n" +" | 'from' a=('.' | '...')* b=dotted_name 'import' c=import_from_targets {\n" +" _PyPegen_checked_future_import(p, b->v.Name.id, c, _PyPegen_seq_count_dots(a), EXTRA) }\n" +" | 'from' a=('.' | '...')+ 'import' b=import_from_targets {\n" +" _PyAST_ImportFrom(NULL, b, _PyPegen_seq_count_dots(a), EXTRA) }\n" +"import_from_targets[asdl_alias_seq*]:\n" +" | '(' a=import_from_as_names [','] ')' { a }\n" +" | import_from_as_names !','\n" +" | '*' { (asdl_alias_seq*)_PyPegen_singleton_seq(p, CHECK(alias_ty, _PyPegen_alias_for_star(p, EXTRA))) }\n" +" | invalid_import_from_targets\n" +"import_from_as_names[asdl_alias_seq*]:\n" +" | a[asdl_alias_seq*]=','.import_from_as_name+ { a }\n" +"import_from_as_name[alias_ty]:\n" +" | invalid_import_from_as_name\n" +" | a=NAME b=['as' z=NAME { z }] { _PyAST_alias(\n" +" a->v.Name.id, (b) ? ((expr_ty) b)->v.Name.id : NULL, EXTRA) }\n" +"\n" +"dotted_as_names[asdl_alias_seq*]:\n" +" | a[asdl_alias_seq*]=','.dotted_as_name+ { a }\n" +"dotted_as_name[alias_ty]:\n" +" | invalid_dotted_as_name\n" +" | a=dotted_name b=['as' z=NAME { z }] { _PyAST_alias(\n" +" a->v.Name.id, (b) ? ((expr_ty) b)->v.Name.id : NULL, EXTRA) }\n" +"\n" +"dotted_name[expr_ty]:\n" +" | a=dotted_name '.' b=NAME { _PyPegen_join_names_with_dot(p, a, b) }\n" +" | NAME\n" +"\n" +"# COMPOUND STATEMENTS\n" +"# ===================\n" +"\n" +"# Common elements\n" +"# ---------------\n" +"\n" +"block[asdl_stmt_seq*] (memo):\n" +" | NEWLINE INDENT a=statements DEDENT { a }\n" +" | simple_stmts\n" +" | invalid_block\n" +"\n" +"decorators[asdl_expr_seq*]: a[asdl_expr_seq*]=('@' f=named_expression NEWLINE { f })+ { a }\n" +"\n" +"# Class definitions\n" +"# -----------------\n" +"\n" +"class_def[stmt_ty]:\n" +" | a=decorators b=class_def_raw { _PyPegen_class_def_decorators(p, a, b) }\n" +" | class_def_raw\n" +"\n" +"class_def_raw[stmt_ty]:\n" +" | invalid_class_def_raw\n" +" | 'class' a=NAME t=[type_params] b=['(' z=[arguments] ')' { z }] ':' c=block {\n" +" _PyAST_ClassDef(a->v.Name.id,\n" +" (b) ? ((expr_ty) b)->v.Call.args : NULL,\n" +" (b) ? ((expr_ty) b)->v.Call.keywords : NULL,\n" +" c, NULL, t, EXTRA) }\n" +"\n" +"# Function definitions\n" +"# --------------------\n" +"\n" +"function_def[stmt_ty]:\n" +" | d=decorators f=function_def_raw { _PyPegen_function_def_decorators(p, d, f) }\n" +" | function_def_raw\n" +"\n" +"function_def_raw[stmt_ty]:\n" +" | invalid_def_raw\n" +" | 'def' n=NAME t=[type_params] '(' params=[params] ')' a=['->' z=expression { z }] ':' tc=[func_type_comment] b=block {\n" +" _PyAST_FunctionDef(n->v.Name.id,\n" +" (params) ? params : CHECK(arguments_ty, _PyPegen_empty_arguments(p)),\n" +" b, NULL, a, NEW_TYPE_COMMENT(p, tc), t, EXTRA) }\n" +" | 'async' 'def' n=NAME t=[type_params] '(' params=[params] ')' a=['->' z=expression { z }] ':' tc=[func_type_comment] b=block {\n" +" CHECK_VERSION(\n" +" stmt_ty,\n" +" 5,\n" +" \"Async functions are\",\n" +" _PyAST_AsyncFunctionDef(n->v.Name.id,\n" +" (params) ? params : CHECK(arguments_ty, _PyPegen_empty_arguments(p)),\n" +" b, NULL, a, NEW_TYPE_COMMENT(p, tc), t, EXTRA)\n" +" ) }\n" +"\n" +"# Function parameters\n" +"# -------------------\n" +"\n" +"params[arguments_ty]:\n" +" | invalid_parameters\n" +" | parameters\n" +"\n" +"parameters[arguments_ty]:\n" +" | a=slash_no_default b[asdl_arg_seq*]=param_no_default* c=param_with_default* d=[star_etc] {\n" +" CHECK_VERSION(arguments_ty, 8, \"Positional-only parameters are\", _PyPegen_make_arguments(p, a, NULL, b, c, d)) }\n" +" | a=slash_with_default b=param_with_default* c=[star_etc] {\n" +" CHECK_VERSION(arguments_ty, 8, \"Positional-only parameters are\", _PyPegen_make_arguments(p, NULL, a, NULL, b, c)) }\n" +" | a[asdl_arg_seq*]=param_no_default+ b=param_with_default* c=[star_etc] {\n" +" _PyPegen_make_arguments(p, NULL, NULL, a, b, c) }\n" +" | a=param_with_default+ b=[star_etc] { _PyPegen_make_arguments(p, NULL, NULL, NULL, a, b)}\n" +" | a=star_etc { _PyPegen_make_arguments(p, NULL, NULL, NULL, NULL, a) }\n" +"\n" +"# Some duplication here because we can't write (',' | &')'),\n" +"# which is because we don't support empty alternatives (yet).\n" +"\n" +"slash_no_default[asdl_arg_seq*]:\n" +" | a[asdl_arg_seq*]=param_no_default+ '/' ',' { a }\n" +" | a[asdl_arg_seq*]=param_no_default+ '/' &')' { a }\n" +"slash_with_default[SlashWithDefault*]:\n" +" | a=param_no_default* b=param_with_default+ '/' ',' { _PyPegen_slash_with_default(p, (asdl_arg_seq *)a, b) }\n" +" | a=param_no_default* b=param_with_default+ '/' &')' { _PyPegen_slash_with_default(p, (asdl_arg_seq *)a, b) }\n" +"\n" +"star_etc[StarEtc*]:\n" +" | invalid_star_etc\n" +" | '*' a=param_no_default b=param_maybe_default* c=[kwds] {\n" +" _PyPegen_star_etc(p, a, b, c) }\n" +" | '*' a=param_no_default_star_annotation b=param_maybe_default* c=[kwds] {\n" +" _PyPegen_star_etc(p, a, b, c) }\n" +" | '*' ',' b=param_maybe_default+ c=[kwds] {\n" +" _PyPegen_star_etc(p, NULL, b, c) }\n" +" | a=kwds { _PyPegen_star_etc(p, NULL, NULL, a) }\n" +"\n" +"kwds[arg_ty]:\n" +" | invalid_kwds\n" +" | '**' a=param_no_default { a }\n" +"\n" +"# One parameter. This *includes* a following comma and type comment.\n" +"#\n" +"# There are three styles:\n" +"# - No default\n" +"# - With default\n" +"# - Maybe with default\n" +"#\n" +"# There are two alternative forms of each, to deal with type comments:\n" +"# - Ends in a comma followed by an optional type comment\n" +"# - No comma, optional type comment, must be followed by close paren\n" +"# The latter form is for a final parameter without trailing comma.\n" +"#\n" +"\n" +"param_no_default[arg_ty]:\n" +" | a=param ',' tc=TYPE_COMMENT? { _PyPegen_add_type_comment_to_arg(p, a, tc) }\n" +" | a=param tc=TYPE_COMMENT? &')' { _PyPegen_add_type_comment_to_arg(p, a, tc) }\n" +"param_no_default_star_annotation[arg_ty]:\n" +" | a=param_star_annotation ',' tc=TYPE_COMMENT? { _PyPegen_add_type_comment_to_arg(p, a, tc) }\n" +" | a=param_star_annotation tc=TYPE_COMMENT? &')' { _PyPegen_add_type_comment_to_arg(p, a, tc) }\n" +"param_with_default[NameDefaultPair*]:\n" +" | a=param c=default ',' tc=TYPE_COMMENT? { _PyPegen_name_default_pair(p, a, c, tc) }\n" +" | a=param c=default tc=TYPE_COMMENT? &')' { _PyPegen_name_default_pair(p, a, c, tc) }\n" +"param_maybe_default[NameDefaultPair*]:\n" +" | a=param c=default? ',' tc=TYPE_COMMENT? { _PyPegen_name_default_pair(p, a, c, tc) }\n" +" | a=param c=default? tc=TYPE_COMMENT? &')' { _PyPegen_name_default_pair(p, a, c, tc) }\n" +"param[arg_ty]: a=NAME b=annotation? { _PyAST_arg(a->v.Name.id, b, NULL, EXTRA) }\n" +"param_star_annotation[arg_ty]: a=NAME b=star_annotation { _PyAST_arg(a->v.Name.id, b, NULL, EXTRA) }\n" +"annotation[expr_ty]: ':' a=expression { a }\n" +"star_annotation[expr_ty]: ':' a=star_expression { a }\n" +"default[expr_ty]: '=' a=expression { a } | invalid_default\n" +"\n" +"# If statement\n" +"# ------------\n" +"\n" +"if_stmt[stmt_ty]:\n" +" | invalid_if_stmt\n" +" | 'if' a=named_expression ':' b=block c=elif_stmt {\n" +" _PyAST_If(a, b, CHECK(asdl_stmt_seq*, _PyPegen_singleton_seq(p, c)), EXTRA) }\n" +" | 'if' a=named_expression ':' b=block c=[else_block] { _PyAST_If(a, b, c, EXTRA) }\n" +"elif_stmt[stmt_ty]:\n" +" | invalid_elif_stmt\n" +" | 'elif' a=named_expression ':' b=block c=elif_stmt {\n" +" _PyAST_If(a, b, CHECK(asdl_stmt_seq*, _PyPegen_singleton_seq(p, c)), EXTRA) }\n" +" | 'elif' a=named_expression ':' b=block c=[else_block] { _PyAST_If(a, b, c, EXTRA) }\n" +"else_block[asdl_stmt_seq*]:\n" +" | invalid_else_stmt\n" +" | 'else' &&':' b=block { b }\n" +"\n" +"# While statement\n" +"# ---------------\n" +"\n" +"while_stmt[stmt_ty]:\n" +" | invalid_while_stmt\n" +" | 'while' a=named_expression ':' b=block c=[else_block] { _PyAST_While(a, b, c, EXTRA) }\n" +"\n" +"# For statement\n" +"# -------------\n" +"\n" +"for_stmt[stmt_ty]:\n" +" | invalid_for_stmt\n" +" | 'for' t=star_targets 'in' ~ ex=star_expressions ':' tc=[TYPE_COMMENT] b=block el=[else_block] {\n" +" _PyAST_For(t, ex, b, el, NEW_TYPE_COMMENT(p, tc), EXTRA) }\n" +" | 'async' 'for' t=star_targets 'in' ~ ex=star_expressions ':' tc=[TYPE_COMMENT] b=block el=[else_block] {\n" +" CHECK_VERSION(stmt_ty, 5, \"Async for loops are\", _PyAST_AsyncFor(t, ex, b, el, NEW_TYPE_COMMENT(p, tc), EXTRA)) }\n" +" | invalid_for_target\n" +"\n" +"# With statement\n" +"# --------------\n" +"\n" +"with_stmt[stmt_ty]:\n" +" | invalid_with_stmt_indent\n" +" | 'with' '(' a[asdl_withitem_seq*]=','.with_item+ ','? ')' ':' tc=[TYPE_COMMENT] b=block {\n" +" _PyAST_With(a, b, NEW_TYPE_COMMENT(p, tc), EXTRA) }\n" +" | 'with' a[asdl_withitem_seq*]=','.with_item+ ':' tc=[TYPE_COMMENT] b=block {\n" +" _PyAST_With(a, b, NEW_TYPE_COMMENT(p, tc), EXTRA) }\n" +" | 'async' 'with' '(' a[asdl_withitem_seq*]=','.with_item+ ','? ')' ':' b=block {\n" +" CHECK_VERSION(stmt_ty, 5, \"Async with statements are\", _PyAST_AsyncWith(a, b, NULL, EXTRA)) }\n" +" | 'async' 'with' a[asdl_withitem_seq*]=','.with_item+ ':' tc=[TYPE_COMMENT] b=block {\n" +" CHECK_VERSION(stmt_ty, 5, \"Async with statements are\", _PyAST_AsyncWith(a, b, NEW_TYPE_COMMENT(p, tc), EXTRA)) }\n" +" | invalid_with_stmt\n" +"\n" +"with_item[withitem_ty]:\n" +" | e=expression 'as' t=star_target &(',' | ')' | ':') { _PyAST_withitem(e, t, p->arena) }\n" +" | invalid_with_item\n" +" | e=expression { _PyAST_withitem(e, NULL, p->arena) }\n" +"\n" +"# Try statement\n" +"# -------------\n" +"\n" +"try_stmt[stmt_ty]:\n" +" | invalid_try_stmt\n" +" | 'try' &&':' b=block f=finally_block { _PyAST_Try(b, NULL, NULL, f, EXTRA) }\n" +" | 'try' &&':' b=block ex[asdl_excepthandler_seq*]=except_block+ el=[else_block] f=[finally_block] { _PyAST_Try(b, ex, el, f, EXTRA) }\n" +" | 'try' &&':' b=block ex[asdl_excepthandler_seq*]=except_star_block+ el=[else_block] f=[finally_block] {\n" +" CHECK_VERSION(stmt_ty, 11, \"Exception groups are\",\n" +" _PyAST_TryStar(b, ex, el, f, EXTRA)) }\n" +"\n" +"\n" +"# Except statement\n" +"# ----------------\n" +"\n" +"except_block[excepthandler_ty]:\n" +" | invalid_except_stmt_indent\n" +" | 'except' e=expression ':' b=block {\n" +" _PyAST_ExceptHandler(e, NULL, b, EXTRA) }\n" +" | 'except' e=expression 'as' t=NAME ':' b=block {\n" +" _PyAST_ExceptHandler(e, ((expr_ty) t)->v.Name.id, b, EXTRA) }\n" +" | 'except' e=expressions ':' b=block {\n" +" CHECK_VERSION(\n" +" excepthandler_ty,\n" +" 14,\n" +" \"except expressions without parentheses are\",\n" +" _PyAST_ExceptHandler(e, NULL, b, EXTRA)) }\n" +" | 'except' ':' b=block { _PyAST_ExceptHandler(NULL, NULL, b, EXTRA) }\n" +" | invalid_except_stmt\n" +"except_star_block[excepthandler_ty]:\n" +" | invalid_except_star_stmt_indent\n" +" | 'except' '*' e=expression ':' b=block {\n" +" _PyAST_ExceptHandler(e, NULL, b, EXTRA) }\n" +" | 'except' '*' e=expression 'as' t=NAME ':' b=block {\n" +" _PyAST_ExceptHandler(e, ((expr_ty) t)->v.Name.id, b, EXTRA) }\n" +" | 'except' '*' e=expressions ':' b=block {\n" +" CHECK_VERSION(\n" +" excepthandler_ty,\n" +" 14,\n" +" \"except expressions without parentheses are\",\n" +" _PyAST_ExceptHandler(e, NULL, b, EXTRA)) }\n" +" | invalid_except_star_stmt\n" +"finally_block[asdl_stmt_seq*]:\n" +" | invalid_finally_stmt\n" +" | 'finally' &&':' a=block { a }\n" +"\n" +"# Match statement\n" +"# ---------------\n" +"\n" +"match_stmt[stmt_ty]:\n" +" | \"match\" subject=subject_expr ':' NEWLINE INDENT cases[asdl_match_case_seq*]=case_block+ DEDENT {\n" +" CHECK_VERSION(stmt_ty, 10, \"Pattern matching is\", _PyAST_Match(subject, cases, EXTRA)) }\n" +" | invalid_match_stmt\n" +"\n" +"subject_expr[expr_ty]:\n" +" | value=star_named_expression ',' values=star_named_expressions? {\n" +" _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, value, values)), Load, EXTRA) }\n" +" | named_expression\n" +"\n" +"case_block[match_case_ty]:\n" +" | invalid_case_block\n" +" | \"case\" pattern=patterns guard=guard? ':' body=block {\n" +" _PyAST_match_case(pattern, guard, body, p->arena) }\n" +"\n" +"guard[expr_ty]: 'if' guard=named_expression { guard }\n" +"\n" +"patterns[pattern_ty]:\n" +" | patterns[asdl_pattern_seq*]=open_sequence_pattern {\n" +" _PyAST_MatchSequence(patterns, EXTRA) }\n" +" | pattern\n" +"\n" +"pattern[pattern_ty]:\n" +" | as_pattern\n" +" | or_pattern\n" +"\n" +"as_pattern[pattern_ty]:\n" +" | pattern=or_pattern 'as' target=pattern_capture_target {\n" +" _PyAST_MatchAs(pattern, target->v.Name.id, EXTRA) }\n" +" | invalid_as_pattern\n" +"\n" +"or_pattern[pattern_ty]:\n" +" | patterns[asdl_pattern_seq*]='|'.closed_pattern+ {\n" +" asdl_seq_LEN(patterns) == 1 ? asdl_seq_GET(patterns, 0) : _PyAST_MatchOr(patterns, EXTRA) }\n" +"\n" +"closed_pattern[pattern_ty] (memo):\n" +" | literal_pattern\n" +" | capture_pattern\n" +" | wildcard_pattern\n" +" | value_pattern\n" +" | group_pattern\n" +" | sequence_pattern\n" +" | mapping_pattern\n" +" | class_pattern\n" +"\n" +"# Literal patterns are used for equality and identity constraints\n" +"literal_pattern[pattern_ty]:\n" +" | value=signed_number !('+' | '-') { _PyAST_MatchValue(value, EXTRA) }\n" +" | value=complex_number { _PyAST_MatchValue(value, EXTRA) }\n" +" | value=strings { _PyAST_MatchValue(value, EXTRA) }\n" +" | 'None' { _PyAST_MatchSingleton(Py_None, EXTRA) }\n" +" | 'True' { _PyAST_MatchSingleton(Py_True, EXTRA) }\n" +" | 'False' { _PyAST_MatchSingleton(Py_False, EXTRA) }\n" +"\n" +"# Literal expressions are used to restrict permitted mapping pattern keys\n" +"literal_expr[expr_ty]:\n" +" | signed_number !('+' | '-')\n" +" | complex_number\n" +" | &(STRING|FSTRING_START|TSTRING_START) strings\n" +" | 'None' { _PyAST_Constant(Py_None, NULL, EXTRA) }\n" +" | 'True' { _PyAST_Constant(Py_True, NULL, EXTRA) }\n" +" | 'False' { _PyAST_Constant(Py_False, NULL, EXTRA) }\n" +"\n" +"complex_number[expr_ty]:\n" +" | real=signed_real_number '+' imag=imaginary_number {\n" +" _PyAST_BinOp(real, Add, imag, EXTRA) }\n" +" | real=signed_real_number '-' imag=imaginary_number {\n" +" _PyAST_BinOp(real, Sub, imag, EXTRA) }\n" +"\n" +"signed_number[expr_ty]:\n" +" | NUMBER\n" +" | '-' number=NUMBER { _PyAST_UnaryOp(USub, number, EXTRA) }\n" +"\n" +"signed_real_number[expr_ty]:\n" +" | real_number\n" +" | '-' real=real_number { _PyAST_UnaryOp(USub, real, EXTRA) }\n" +"\n" +"real_number[expr_ty]:\n" +" | real=NUMBER { _PyPegen_ensure_real(p, real) }\n" +"\n" +"imaginary_number[expr_ty]:\n" +" | imag=NUMBER { _PyPegen_ensure_imaginary(p, imag) }\n" +"\n" +"capture_pattern[pattern_ty]:\n" +" | target=pattern_capture_target { _PyAST_MatchAs(NULL, target->v.Name.id, EXTRA) }\n" +"\n" +"pattern_capture_target[expr_ty]:\n" +" | !\"_\" name=NAME !('.' | '(' | '=') {\n" +" _PyPegen_set_expr_context(p, name, Store) }\n" +"\n" +"wildcard_pattern[pattern_ty]:\n" +" | \"_\" { _PyAST_MatchAs(NULL, NULL, EXTRA) }\n" +"\n" +"value_pattern[pattern_ty]:\n" +" | attr=attr !('.' | '(' | '=') { _PyAST_MatchValue(attr, EXTRA) }\n" +"\n" +"attr[expr_ty]:\n" +" | value=name_or_attr '.' attr=NAME {\n" +" _PyAST_Attribute(value, attr->v.Name.id, Load, EXTRA) }\n" +"\n" +"name_or_attr[expr_ty]:\n" +" | attr\n" +" | NAME\n" +"\n" +"group_pattern[pattern_ty]:\n" +" | '(' pattern=pattern ')' { pattern }\n" +"\n" +"sequence_pattern[pattern_ty]:\n" +" | '[' patterns=maybe_sequence_pattern? ']' { _PyAST_MatchSequence(patterns, EXTRA) }\n" +" | '(' patterns=open_sequence_pattern? ')' { _PyAST_MatchSequence(patterns, EXTRA) }\n" +"\n" +"open_sequence_pattern[asdl_seq*]:\n" +" | pattern=maybe_star_pattern ',' patterns=maybe_sequence_pattern? {\n" +" _PyPegen_seq_insert_in_front(p, pattern, patterns) }\n" +"\n" +"maybe_sequence_pattern[asdl_seq*]:\n" +" | patterns=','.maybe_star_pattern+ ','? { patterns }\n" +"\n" +"maybe_star_pattern[pattern_ty]:\n" +" | star_pattern\n" +" | pattern\n" +"\n" +"star_pattern[pattern_ty] (memo):\n" +" | '*' target=pattern_capture_target {\n" +" _PyAST_MatchStar(target->v.Name.id, EXTRA) }\n" +" | '*' wildcard_pattern {\n" +" _PyAST_MatchStar(NULL, EXTRA) }\n" +"\n" +"mapping_pattern[pattern_ty]:\n" +" | '{' '}' {\n" +" _PyAST_MatchMapping(NULL, NULL, NULL, EXTRA) }\n" +" | '{' rest=double_star_pattern ','? '}' {\n" +" _PyAST_MatchMapping(NULL, NULL, rest->v.Name.id, EXTRA) }\n" +" | '{' items=items_pattern ',' rest=double_star_pattern ','? '}' {\n" +" _PyAST_MatchMapping(\n" +" CHECK(asdl_expr_seq*, _PyPegen_get_pattern_keys(p, items)),\n" +" CHECK(asdl_pattern_seq*, _PyPegen_get_patterns(p, items)),\n" +" rest->v.Name.id,\n" +" EXTRA) }\n" +" | '{' items=items_pattern ','? '}' {\n" +" _PyAST_MatchMapping(\n" +" CHECK(asdl_expr_seq*, _PyPegen_get_pattern_keys(p, items)),\n" +" CHECK(asdl_pattern_seq*, _PyPegen_get_patterns(p, items)),\n" +" NULL,\n" +" EXTRA) }\n" +"\n" +"items_pattern[asdl_seq*]:\n" +" | ','.key_value_pattern+\n" +"\n" +"key_value_pattern[KeyPatternPair*]:\n" +" | key=(literal_expr | attr) ':' pattern=pattern {\n" +" _PyPegen_key_pattern_pair(p, key, pattern) }\n" +"\n" +"double_star_pattern[expr_ty]:\n" +" | '**' target=pattern_capture_target { target }\n" +"\n" +"class_pattern[pattern_ty]:\n" +" | cls=name_or_attr '(' ')' {\n" +" _PyAST_MatchClass(cls, NULL, NULL, NULL, EXTRA) }\n" +" | cls=name_or_attr '(' patterns=positional_patterns ','? ')' {\n" +" _PyAST_MatchClass(cls, patterns, NULL, NULL, EXTRA) }\n" +" | cls=name_or_attr '(' keywords=keyword_patterns ','? ')' {\n" +" _PyAST_MatchClass(\n" +" cls, NULL,\n" +" CHECK(asdl_identifier_seq*, _PyPegen_map_names_to_ids(p,\n" +" CHECK(asdl_expr_seq*, _PyPegen_get_pattern_keys(p, keywords)))),\n" +" CHECK(asdl_pattern_seq*, _PyPegen_get_patterns(p, keywords)),\n" +" EXTRA) }\n" +" | cls=name_or_attr '(' patterns=positional_patterns ',' keywords=keyword_patterns ','? ')' {\n" +" _PyAST_MatchClass(\n" +" cls,\n" +" patterns,\n" +" CHECK(asdl_identifier_seq*, _PyPegen_map_names_to_ids(p,\n" +" CHECK(asdl_expr_seq*, _PyPegen_get_pattern_keys(p, keywords)))),\n" +" CHECK(asdl_pattern_seq*, _PyPegen_get_patterns(p, keywords)),\n" +" EXTRA) }\n" +" | invalid_class_pattern\n" +"\n" +"positional_patterns[asdl_pattern_seq*]:\n" +" | args[asdl_pattern_seq*]=','.pattern+ { args }\n" +"\n" +"keyword_patterns[asdl_seq*]:\n" +" | ','.keyword_pattern+\n" +"\n" +"keyword_pattern[KeyPatternPair*]:\n" +" | arg=NAME '=' value=pattern { _PyPegen_key_pattern_pair(p, arg, value) }\n" +"\n" +"# Type statement\n" +"# ---------------\n" +"\n" +"type_alias[stmt_ty]:\n" +" | \"type\" n=NAME t=[type_params] '=' b=expression {\n" +" CHECK_VERSION(stmt_ty, 12, \"Type statement is\",\n" +" _PyAST_TypeAlias(CHECK(expr_ty, _PyPegen_set_expr_context(p, n, Store)), t, b, EXTRA)) }\n" +"\n" +"# Type parameter declaration\n" +"# --------------------------\n" +"\n" +"type_params[asdl_type_param_seq*]:\n" +" | invalid_type_params\n" +" | '[' t=type_param_seq ']' {\n" +" CHECK_VERSION(asdl_type_param_seq *, 12, \"Type parameter lists are\", t) }\n" +"\n" +"type_param_seq[asdl_type_param_seq*]: a[asdl_type_param_seq*]=','.type_param+ [','] { a }\n" +"\n" +"type_param[type_param_ty] (memo):\n" +" | a=NAME b=[type_param_bound] c=[type_param_default] { _PyAST_TypeVar(a->v.Name.id, b, c, EXTRA) }\n" +" | invalid_type_param\n" +" | '*' a=NAME b=[type_param_starred_default] { _PyAST_TypeVarTuple(a->v.Name.id, b, EXTRA) }\n" +" | '**' a=NAME b=[type_param_default] { _PyAST_ParamSpec(a->v.Name.id, b, EXTRA) }\n" +"\n" +"type_param_bound[expr_ty]: ':' e=expression { e }\n" +"type_param_default[expr_ty]: '=' e=expression {\n" +" CHECK_VERSION(expr_ty, 13, \"Type parameter defaults are\", e) }\n" +"type_param_starred_default[expr_ty]: '=' e=star_expression {\n" +" CHECK_VERSION(expr_ty, 13, \"Type parameter defaults are\", e) }\n" +"\n" +"# EXPRESSIONS\n" +"# -----------\n" +"\n" +"expressions[expr_ty]:\n" +" | a=expression b=(',' c=expression { c })+ [','] {\n" +" _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)), Load, EXTRA) }\n" +" | a=expression ',' { _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_singleton_seq(p, a)), Load, EXTRA) }\n" +" | expression\n" +"\n" +"expression[expr_ty] (memo):\n" +" | invalid_expression\n" +" | invalid_legacy_expression\n" +" | a=disjunction 'if' b=disjunction 'else' c=expression { _PyAST_IfExp(b, a, c, EXTRA) }\n" +" | disjunction\n" +" | lambdef\n" +"\n" +"yield_expr[expr_ty]:\n" +" | 'yield' 'from' a=expression { _PyAST_YieldFrom(a, EXTRA) }\n" +" | 'yield' a=[star_expressions] { _PyAST_Yield(a, EXTRA) }\n" +"\n" +"star_expressions[expr_ty]:\n" +" | a=star_expression b=(',' c=star_expression { c })+ [','] {\n" +" _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)), Load, EXTRA) }\n" +" | a=star_expression ',' { _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_singleton_seq(p, a)), Load, EXTRA) }\n" +" | star_expression\n" +"\n" +"star_expression[expr_ty] (memo):\n" +" | '*' a=bitwise_or { _PyAST_Starred(a, Load, EXTRA) }\n" +" | expression\n" +"\n" +"star_named_expressions[asdl_expr_seq*]: a[asdl_expr_seq*]=','.star_named_expression+ [','] { a }\n" +"\n" +"star_named_expression[expr_ty]:\n" +" | '*' a=bitwise_or { _PyAST_Starred(a, Load, EXTRA) }\n" +" | named_expression\n" +"\n" +"assignment_expression[expr_ty]:\n" +" | a=NAME ':=' ~ b=expression {\n" +" CHECK_VERSION(expr_ty, 8, \"Assignment expressions are\",\n" +" _PyAST_NamedExpr(CHECK(expr_ty, _PyPegen_set_expr_context(p, a, Store)), b, EXTRA)) }\n" +"\n" +"named_expression[expr_ty]:\n" +" | assignment_expression\n" +" | invalid_named_expression\n" +" | expression !':='\n" +"\n" +"disjunction[expr_ty] (memo):\n" +" | a=conjunction b=('or' c=conjunction { c })+ { _PyAST_BoolOp(\n" +" Or,\n" +" CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)),\n" +" EXTRA) }\n" +" | conjunction\n" +"\n" +"conjunction[expr_ty] (memo):\n" +" | a=inversion b=('and' c=inversion { c })+ { _PyAST_BoolOp(\n" +" And,\n" +" CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)),\n" +" EXTRA) }\n" +" | inversion\n" +"\n" +"inversion[expr_ty] (memo):\n" +" | 'not' a=inversion { _PyAST_UnaryOp(Not, a, EXTRA) }\n" +" | comparison\n" +"\n" +"# Comparison operators\n" +"# --------------------\n" +"\n" +"comparison[expr_ty]:\n" +" | a=bitwise_or b=compare_op_bitwise_or_pair+ {\n" +" _PyAST_Compare(\n" +" a,\n" +" CHECK(asdl_int_seq*, _PyPegen_get_cmpops(p, b)),\n" +" CHECK(asdl_expr_seq*, _PyPegen_get_exprs(p, b)),\n" +" EXTRA) }\n" +" | bitwise_or\n" +"\n" +"compare_op_bitwise_or_pair[CmpopExprPair*]:\n" +" | eq_bitwise_or\n" +" | noteq_bitwise_or\n" +" | lte_bitwise_or\n" +" | lt_bitwise_or\n" +" | gte_bitwise_or\n" +" | gt_bitwise_or\n" +" | notin_bitwise_or\n" +" | in_bitwise_or\n" +" | isnot_bitwise_or\n" +" | is_bitwise_or\n" +"\n" +"eq_bitwise_or[CmpopExprPair*]: '==' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, Eq, a) }\n" +"noteq_bitwise_or[CmpopExprPair*]:\n" +" | (tok='!=' { _PyPegen_check_barry_as_flufl(p, tok) ? NULL : tok}) a=bitwise_or {_PyPegen_cmpop_expr_pair(p, NotEq, a) }\n" +"lte_bitwise_or[CmpopExprPair*]: '<=' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, LtE, a) }\n" +"lt_bitwise_or[CmpopExprPair*]: '<' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, Lt, a) }\n" +"gte_bitwise_or[CmpopExprPair*]: '>=' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, GtE, a) }\n" +"gt_bitwise_or[CmpopExprPair*]: '>' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, Gt, a) }\n" +"notin_bitwise_or[CmpopExprPair*]: 'not' 'in' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, NotIn, a) }\n" +"in_bitwise_or[CmpopExprPair*]: 'in' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, In, a) }\n" +"isnot_bitwise_or[CmpopExprPair*]: 'is' 'not' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, IsNot, a) }\n" +"is_bitwise_or[CmpopExprPair*]: 'is' a=bitwise_or { _PyPegen_cmpop_expr_pair(p, Is, a) }\n" +"\n" +"# Bitwise operators\n" +"# -----------------\n" +"\n" +"bitwise_or[expr_ty]:\n" +" | a=bitwise_or '|' b=bitwise_xor { _PyAST_BinOp(a, BitOr, b, EXTRA) }\n" +" | bitwise_xor\n" +"\n" +"bitwise_xor[expr_ty]:\n" +" | a=bitwise_xor '^' b=bitwise_and { _PyAST_BinOp(a, BitXor, b, EXTRA) }\n" +" | bitwise_and\n" +"\n" +"bitwise_and[expr_ty]:\n" +" | a=bitwise_and '&' b=shift_expr { _PyAST_BinOp(a, BitAnd, b, EXTRA) }\n" +" | shift_expr\n" +"\n" +"shift_expr[expr_ty]:\n" +" | a=shift_expr '<<' b=sum { _PyAST_BinOp(a, LShift, b, EXTRA) }\n" +" | a=shift_expr '>>' b=sum { _PyAST_BinOp(a, RShift, b, EXTRA) }\n" +" | invalid_arithmetic\n" +" | sum\n" +"\n" +"# Arithmetic operators\n" +"# --------------------\n" +"\n" +"sum[expr_ty]:\n" +" | a=sum '+' b=term { _PyAST_BinOp(a, Add, b, EXTRA) }\n" +" | a=sum '-' b=term { _PyAST_BinOp(a, Sub, b, EXTRA) }\n" +" | term\n" +"\n" +"term[expr_ty]:\n" +" | a=term '*' b=factor { _PyAST_BinOp(a, Mult, b, EXTRA) }\n" +" | a=term '/' b=factor { _PyAST_BinOp(a, Div, b, EXTRA) }\n" +" | a=term '//' b=factor { _PyAST_BinOp(a, FloorDiv, b, EXTRA) }\n" +" | a=term '%' b=factor { _PyAST_BinOp(a, Mod, b, EXTRA) }\n" +" | a=term '@' b=factor { CHECK_VERSION(expr_ty, 5, \"The '@' operator is\", _PyAST_BinOp(a, MatMult, b, EXTRA)) }\n" +" | invalid_factor\n" +" | factor\n" +"\n" +"factor[expr_ty] (memo):\n" +" | '+' a=factor { _PyAST_UnaryOp(UAdd, a, EXTRA) }\n" +" | '-' a=factor { _PyAST_UnaryOp(USub, a, EXTRA) }\n" +" | '~' a=factor { _PyAST_UnaryOp(Invert, a, EXTRA) }\n" +" | power\n" +"\n" +"power[expr_ty]:\n" +" | a=await_primary '**' b=factor { _PyAST_BinOp(a, Pow, b, EXTRA) }\n" +" | await_primary\n" +"\n" +"# Primary elements\n" +"# ----------------\n" +"\n" +"# Primary elements are things like \"obj.something.something\", \"obj[something]\", \"obj(something)\", \"obj\" ...\n" +"\n" +"await_primary[expr_ty] (memo):\n" +" | 'await' a=primary { CHECK_VERSION(expr_ty, 5, \"Await expressions are\", _PyAST_Await(a, EXTRA)) }\n" +" | primary\n" +"\n" +"primary[expr_ty]:\n" +" | a=primary '.' b=NAME { _PyAST_Attribute(a, b->v.Name.id, Load, EXTRA) }\n" +" | a=primary b=genexp { _PyAST_Call(a, CHECK(asdl_expr_seq*, (asdl_expr_seq*)_PyPegen_singleton_seq(p, b)), NULL, EXTRA) }\n" +" | a=primary '(' b=[arguments] ')' {\n" +" _PyAST_Call(a,\n" +" (b) ? ((expr_ty) b)->v.Call.args : NULL,\n" +" (b) ? ((expr_ty) b)->v.Call.keywords : NULL,\n" +" EXTRA) }\n" +" | a=primary '[' b=slices ']' { _PyAST_Subscript(a, b, Load, EXTRA) }\n" +" | atom\n" +"\n" +"slices[expr_ty]:\n" +" | a=slice !',' { a }\n" +" | a[asdl_expr_seq*]=','.(slice | starred_expression)+ [','] { _PyAST_Tuple(a, Load, EXTRA) }\n" +"\n" +"slice[expr_ty]:\n" +" | a=[expression] ':' b=[expression] c=[':' d=[expression] { d }] { _PyAST_Slice(a, b, c, EXTRA) }\n" +" | a=named_expression { a }\n" +"\n" +"atom[expr_ty]:\n" +" | NAME\n" +" | 'True' { _PyAST_Constant(Py_True, NULL, EXTRA) }\n" +" | 'False' { _PyAST_Constant(Py_False, NULL, EXTRA) }\n" +" | 'None' { _PyAST_Constant(Py_None, NULL, EXTRA) }\n" +" | &(STRING|FSTRING_START|TSTRING_START) strings\n" +" | NUMBER\n" +" | &'(' (tuple | group | genexp)\n" +" | &'[' (list | listcomp)\n" +" | &'{' (dict | set | dictcomp | setcomp)\n" +" | '...' { _PyAST_Constant(Py_Ellipsis, NULL, EXTRA) }\n" +"\n" +"group[expr_ty]:\n" +" | '(' a=(yield_expr | named_expression) ')' { a }\n" +" | invalid_group\n" +"\n" +"# Lambda functions\n" +"# ----------------\n" +"\n" +"lambdef[expr_ty]:\n" +" | 'lambda' a=[lambda_params] ':' b=expression {\n" +" _PyAST_Lambda((a) ? a : CHECK(arguments_ty, _PyPegen_empty_arguments(p)), b, EXTRA) }\n" +"\n" +"lambda_params[arguments_ty]:\n" +" | invalid_lambda_parameters\n" +" | lambda_parameters\n" +"\n" +"# lambda_parameters etc. duplicates parameters but without annotations\n" +"# or type comments, and if there's no comma after a parameter, we expect\n" +"# a colon, not a close parenthesis. (For more, see parameters above.)\n" +"#\n" +"lambda_parameters[arguments_ty]:\n" +" | a=lambda_slash_no_default b[asdl_arg_seq*]=lambda_param_no_default* c=lambda_param_with_default* d=[lambda_star_etc] {\n" +" CHECK_VERSION(arguments_ty, 8, \"Positional-only parameters are\", _PyPegen_make_arguments(p, a, NULL, b, c, d)) }\n" +" | a=lambda_slash_with_default b=lambda_param_with_default* c=[lambda_star_etc] {\n" +" CHECK_VERSION(arguments_ty, 8, \"Positional-only parameters are\", _PyPegen_make_arguments(p, NULL, a, NULL, b, c)) }\n" +" | a[asdl_arg_seq*]=lambda_param_no_default+ b=lambda_param_with_default* c=[lambda_star_etc] {\n" +" _PyPegen_make_arguments(p, NULL, NULL, a, b, c) }\n" +" | a=lambda_param_with_default+ b=[lambda_star_etc] { _PyPegen_make_arguments(p, NULL, NULL, NULL, a, b)}\n" +" | a=lambda_star_etc { _PyPegen_make_arguments(p, NULL, NULL, NULL, NULL, a) }\n" +"\n" +"lambda_slash_no_default[asdl_arg_seq*]:\n" +" | a[asdl_arg_seq*]=lambda_param_no_default+ '/' ',' { a }\n" +" | a[asdl_arg_seq*]=lambda_param_no_default+ '/' &':' { a }\n" +"\n" +"lambda_slash_with_default[SlashWithDefault*]:\n" +" | a=lambda_param_no_default* b=lambda_param_with_default+ '/' ',' { _PyPegen_slash_with_default(p, (asdl_arg_seq *)a, b) }\n" +" | a=lambda_param_no_default* b=lambda_param_with_default+ '/' &':' { _PyPegen_slash_with_default(p, (asdl_arg_seq *)a, b) }\n" +"\n" +"lambda_star_etc[StarEtc*]:\n" +" | invalid_lambda_star_etc\n" +" | '*' a=lambda_param_no_default b=lambda_param_maybe_default* c=[lambda_kwds] {\n" +" _PyPegen_star_etc(p, a, b, c) }\n" +" | '*' ',' b=lambda_param_maybe_default+ c=[lambda_kwds] {\n" +" _PyPegen_star_etc(p, NULL, b, c) }\n" +" | a=lambda_kwds { _PyPegen_star_etc(p, NULL, NULL, a) }\n" +"\n" +"lambda_kwds[arg_ty]:\n" +" | invalid_lambda_kwds\n" +" | '**' a=lambda_param_no_default { a }\n" +"\n" +"lambda_param_no_default[arg_ty]:\n" +" | a=lambda_param ',' { a }\n" +" | a=lambda_param &':' { a }\n" +"lambda_param_with_default[NameDefaultPair*]:\n" +" | a=lambda_param c=default ',' { _PyPegen_name_default_pair(p, a, c, NULL) }\n" +" | a=lambda_param c=default &':' { _PyPegen_name_default_pair(p, a, c, NULL) }\n" +"lambda_param_maybe_default[NameDefaultPair*]:\n" +" | a=lambda_param c=default? ',' { _PyPegen_name_default_pair(p, a, c, NULL) }\n" +" | a=lambda_param c=default? &':' { _PyPegen_name_default_pair(p, a, c, NULL) }\n" +"lambda_param[arg_ty]: a=NAME { _PyAST_arg(a->v.Name.id, NULL, NULL, EXTRA) }\n" +"\n" +"# LITERALS\n" +"# ========\n" +"\n" +"fstring_middle[expr_ty]:\n" +" | fstring_replacement_field\n" +" | t=FSTRING_MIDDLE { _PyPegen_constant_from_token(p, t) }\n" +"fstring_replacement_field[expr_ty]:\n" +" | '{' a=annotated_rhs debug_expr='='? conversion=[fstring_conversion] format=[fstring_full_format_spec] rbrace='}' {\n" +" _PyPegen_formatted_value(p, a, debug_expr, conversion, format, rbrace, EXTRA) }\n" +" | invalid_fstring_replacement_field\n" +"fstring_conversion[ResultTokenWithMetadata*]:\n" +" | conv_token=\"!\" conv=NAME { _PyPegen_check_fstring_conversion(p, conv_token, conv) }\n" +"fstring_full_format_spec[ResultTokenWithMetadata*]:\n" +" | colon=':' spec=fstring_format_spec* { _PyPegen_setup_full_format_spec(p, colon, (asdl_expr_seq *) spec, EXTRA) }\n" +"fstring_format_spec[expr_ty]:\n" +" | t=FSTRING_MIDDLE { _PyPegen_decoded_constant_from_token(p, t) }\n" +" | fstring_replacement_field\n" +"fstring[expr_ty]:\n" +" | a=FSTRING_START b=fstring_middle* c=FSTRING_END { _PyPegen_joined_str(p, a, (asdl_expr_seq*)b, c) }\n" +"\n" +"tstring_format_spec_replacement_field[expr_ty]:\n" +" | '{' a=annotated_rhs debug_expr='='? conversion=[fstring_conversion] format=[tstring_full_format_spec] rbrace='}' {\n" +" _PyPegen_formatted_value(p, a, debug_expr, conversion, format, rbrace, EXTRA) }\n" +" | invalid_tstring_replacement_field\n" +"tstring_format_spec[expr_ty]:\n" +" | t=TSTRING_MIDDLE { _PyPegen_decoded_constant_from_token(p, t) }\n" +" | tstring_format_spec_replacement_field\n" +"tstring_full_format_spec[ResultTokenWithMetadata*]:\n" +" | colon=':' spec=tstring_format_spec* { _PyPegen_setup_full_format_spec(p, colon, (asdl_expr_seq *) spec, EXTRA) }\n" +"tstring_replacement_field[expr_ty]:\n" +" | '{' a=annotated_rhs debug_expr='='? conversion=[fstring_conversion] format=[tstring_full_format_spec] rbrace='}' {\n" +" _PyPegen_interpolation(p, a, debug_expr, conversion, format, rbrace, EXTRA) }\n" +" | invalid_tstring_replacement_field\n" +"tstring_middle[expr_ty]:\n" +" | tstring_replacement_field\n" +" | t=TSTRING_MIDDLE { _PyPegen_constant_from_token(p, t) }\n" +"tstring[expr_ty] (memo):\n" +" | a=TSTRING_START b=tstring_middle* c=TSTRING_END {\n" +" CHECK_VERSION(\n" +" expr_ty,\n" +" 14,\n" +" \"t-strings are\",\n" +" _PyPegen_template_str(p, a, (asdl_expr_seq*)b, c)) }\n" +"\n" +"string[expr_ty]: s[Token*]=STRING { _PyPegen_constant_from_string(p, s) }\n" +"strings[expr_ty] (memo):\n" +" | invalid_string_tstring_concat\n" +" | a[asdl_expr_seq*]=(fstring|string)+ { _PyPegen_concatenate_strings(p, a, EXTRA) }\n" +" | a[asdl_expr_seq*]=tstring+ { _PyPegen_concatenate_tstrings(p, a, EXTRA) }\n" +"\n" +"list[expr_ty]:\n" +" | '[' a=[star_named_expressions] ']' { _PyAST_List(a, Load, EXTRA) }\n" +"\n" +"tuple[expr_ty]:\n" +" | '(' a=[y=star_named_expression ',' z=[star_named_expressions] { _PyPegen_seq_insert_in_front(p, y, z) } ] ')' {\n" +" _PyAST_Tuple(a, Load, EXTRA) }\n" +"\n" +"set[expr_ty]: '{' a=star_named_expressions '}' { _PyAST_Set(a, EXTRA) }\n" +"\n" +"# Dicts\n" +"# -----\n" +"\n" +"dict[expr_ty]:\n" +" | '{' a=[double_starred_kvpairs] '}' {\n" +" _PyAST_Dict(\n" +" CHECK(asdl_expr_seq*, _PyPegen_get_keys(p, a)),\n" +" CHECK(asdl_expr_seq*, _PyPegen_get_values(p, a)),\n" +" EXTRA) }\n" +" | '{' invalid_double_starred_kvpairs '}'\n" +"\n" +"double_starred_kvpairs[asdl_seq*]: a=','.double_starred_kvpair+ [','] { a }\n" +"\n" +"double_starred_kvpair[KeyValuePair*]:\n" +" | '**' a=bitwise_or { _PyPegen_key_value_pair(p, NULL, a) }\n" +" | kvpair\n" +"\n" +"kvpair[KeyValuePair*]: a=expression ':' b=expression { _PyPegen_key_value_pair(p, a, b) }\n" +"\n" +"# Comprehensions & Generators\n" +"# ---------------------------\n" +"\n" +"for_if_clauses[asdl_comprehension_seq*]:\n" +" | a[asdl_comprehension_seq*]=for_if_clause+ { a }\n" +"\n" +"for_if_clause[comprehension_ty]:\n" +" | 'async' 'for' a=star_targets 'in' ~ b=disjunction c[asdl_expr_seq*]=('if' z=disjunction { z })* {\n" +" CHECK_VERSION(comprehension_ty, 6, \"Async comprehensions are\", _PyAST_comprehension(a, b, c, 1, p->arena)) }\n" +" | 'for' a=star_targets 'in' ~ b=disjunction c[asdl_expr_seq*]=('if' z=disjunction { z })* {\n" +" _PyAST_comprehension(a, b, c, 0, p->arena) }\n" +" | invalid_for_if_clause\n" +" | invalid_for_target\n" +"\n" +"listcomp[expr_ty]:\n" +" | '[' a=named_expression b=for_if_clauses ']' { _PyAST_ListComp(a, b, EXTRA) }\n" +" | invalid_comprehension\n" +"\n" +"setcomp[expr_ty]:\n" +" | '{' a=named_expression b=for_if_clauses '}' { _PyAST_SetComp(a, b, EXTRA) }\n" +" | invalid_comprehension\n" +"\n" +"genexp[expr_ty]:\n" +" | '(' a=( assignment_expression | expression !':=') b=for_if_clauses ')' { _PyAST_GeneratorExp(a, b, EXTRA) }\n" +" | invalid_comprehension\n" +"\n" +"dictcomp[expr_ty]:\n" +" | '{' a=kvpair b=for_if_clauses '}' { _PyAST_DictComp(a->key, a->value, b, EXTRA) }\n" +" | invalid_dict_comprehension\n" +"\n" +"# FUNCTION CALL ARGUMENTS\n" +"# =======================\n" +"\n" +"arguments[expr_ty] (memo):\n" +" | a=args [','] &')' { a }\n" +" | invalid_arguments\n" +"\n" +"args[expr_ty]:\n" +" | a[asdl_expr_seq*]=','.(starred_expression | ( assignment_expression | expression !':=') !'=')+ b=[',' k=kwargs {k}] {\n" +" _PyPegen_collect_call_seqs(p, a, b, EXTRA) }\n" +" | a=kwargs { _PyAST_Call(_PyPegen_dummy_name(p),\n" +" CHECK_NULL_ALLOWED(asdl_expr_seq*, _PyPegen_seq_extract_starred_exprs(p, a)),\n" +" CHECK_NULL_ALLOWED(asdl_keyword_seq*, _PyPegen_seq_delete_starred_exprs(p, a)),\n" +" EXTRA) }\n" +"\n" +"kwargs[asdl_seq*]:\n" +" | a=','.kwarg_or_starred+ ',' b=','.kwarg_or_double_starred+ { _PyPegen_join_sequences(p, a, b) }\n" +" | ','.kwarg_or_starred+\n" +" | ','.kwarg_or_double_starred+\n" +"\n" +"starred_expression[expr_ty]:\n" +" | invalid_starred_expression_unpacking\n" +" | '*' a=expression { _PyAST_Starred(a, Load, EXTRA) }\n" +" | invalid_starred_expression\n" +"\n" +"kwarg_or_starred[KeywordOrStarred*]:\n" +" | invalid_kwarg\n" +" | a=NAME '=' b=expression {\n" +" _PyPegen_keyword_or_starred(p, CHECK(keyword_ty, _PyAST_keyword(a->v.Name.id, b, EXTRA)), 1) }\n" +" | a=starred_expression { _PyPegen_keyword_or_starred(p, a, 0) }\n" +"\n" +"kwarg_or_double_starred[KeywordOrStarred*]:\n" +" | invalid_kwarg\n" +" | a=NAME '=' b=expression {\n" +" _PyPegen_keyword_or_starred(p, CHECK(keyword_ty, _PyAST_keyword(a->v.Name.id, b, EXTRA)), 1) }\n" +" | '**' a=expression { _PyPegen_keyword_or_starred(p, CHECK(keyword_ty, _PyAST_keyword(NULL, a, EXTRA)), 1) }\n" +"\n" +"# ASSIGNMENT TARGETS\n" +"# ==================\n" +"\n" +"# Generic targets\n" +"# ---------------\n" +"\n" +"# NOTE: star_targets may contain *bitwise_or, targets may not.\n" +"star_targets[expr_ty]:\n" +" | a=star_target !',' { a }\n" +" | a=star_target b=(',' c=star_target { c })* [','] {\n" +" _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)), Store, EXTRA) }\n" +"\n" +"star_targets_list_seq[asdl_expr_seq*]: a[asdl_expr_seq*]=','.star_target+ [','] { a }\n" +"\n" +"star_targets_tuple_seq[asdl_expr_seq*]:\n" +" | a=star_target b=(',' c=star_target { c })+ [','] { (asdl_expr_seq*) _PyPegen_seq_insert_in_front(p, a, b) }\n" +" | a=star_target ',' { (asdl_expr_seq*) _PyPegen_singleton_seq(p, a) }\n" +"\n" +"star_target[expr_ty] (memo):\n" +" | '*' a=(!'*' star_target) {\n" +" _PyAST_Starred(CHECK(expr_ty, _PyPegen_set_expr_context(p, a, Store)), Store, EXTRA) }\n" +" | target_with_star_atom\n" +"\n" +"target_with_star_atom[expr_ty] (memo):\n" +" | a=t_primary '.' b=NAME !t_lookahead { _PyAST_Attribute(a, b->v.Name.id, Store, EXTRA) }\n" +" | a=t_primary '[' b=slices ']' !t_lookahead { _PyAST_Subscript(a, b, Store, EXTRA) }\n" +" | star_atom\n" +"\n" +"star_atom[expr_ty]:\n" +" | a=NAME { _PyPegen_set_expr_context(p, a, Store) }\n" +" | '(' a=target_with_star_atom ')' { _PyPegen_set_expr_context(p, a, Store) }\n" +" | '(' a=[star_targets_tuple_seq] ')' { _PyAST_Tuple(a, Store, EXTRA) }\n" +" | '[' a=[star_targets_list_seq] ']' { _PyAST_List(a, Store, EXTRA) }\n" +"\n" +"single_target[expr_ty]:\n" +" | single_subscript_attribute_target\n" +" | a=NAME { _PyPegen_set_expr_context(p, a, Store) }\n" +" | '(' a=single_target ')' { a }\n" +"\n" +"single_subscript_attribute_target[expr_ty]:\n" +" | a=t_primary '.' b=NAME !t_lookahead { _PyAST_Attribute(a, b->v.Name.id, Store, EXTRA) }\n" +" | a=t_primary '[' b=slices ']' !t_lookahead { _PyAST_Subscript(a, b, Store, EXTRA) }\n" +"\n" +"t_primary[expr_ty]:\n" +" | a=t_primary '.' b=NAME &t_lookahead { _PyAST_Attribute(a, b->v.Name.id, Load, EXTRA) }\n" +" | a=t_primary '[' b=slices ']' &t_lookahead { _PyAST_Subscript(a, b, Load, EXTRA) }\n" +" | a=t_primary b=genexp &t_lookahead {\n" +" _PyAST_Call(a, CHECK(asdl_expr_seq*, (asdl_expr_seq*)_PyPegen_singleton_seq(p, b)), NULL, EXTRA) }\n" +" | a=t_primary '(' b=[arguments] ')' &t_lookahead {\n" +" _PyAST_Call(a,\n" +" (b) ? ((expr_ty) b)->v.Call.args : NULL,\n" +" (b) ? ((expr_ty) b)->v.Call.keywords : NULL,\n" +" EXTRA) }\n" +" | a=atom &t_lookahead { a }\n" +"\n" +"t_lookahead: '(' | '[' | '.'\n" +"\n" +"# Targets for del statements\n" +"# --------------------------\n" +"\n" +"del_targets[asdl_expr_seq*]: a[asdl_expr_seq*]=','.del_target+ [','] { a }\n" +"\n" +"del_target[expr_ty] (memo):\n" +" | a=t_primary '.' b=NAME !t_lookahead { _PyAST_Attribute(a, b->v.Name.id, Del, EXTRA) }\n" +" | a=t_primary '[' b=slices ']' !t_lookahead { _PyAST_Subscript(a, b, Del, EXTRA) }\n" +" | del_t_atom\n" +"\n" +"del_t_atom[expr_ty]:\n" +" | a=NAME { _PyPegen_set_expr_context(p, a, Del) }\n" +" | '(' a=del_target ')' { _PyPegen_set_expr_context(p, a, Del) }\n" +" | '(' a=[del_targets] ')' { _PyAST_Tuple(a, Del, EXTRA) }\n" +" | '[' a=[del_targets] ']' { _PyAST_List(a, Del, EXTRA) }\n" +"\n" +"# TYPING ELEMENTS\n" +"# ---------------\n" +"\n" +"# type_expressions allow */** but ignore them\n" +"type_expressions[asdl_expr_seq*]:\n" +" | a=','.expression+ ',' '*' b=expression ',' '**' c=expression {\n" +" (asdl_expr_seq*)_PyPegen_seq_append_to_end(\n" +" p,\n" +" CHECK(asdl_seq*, _PyPegen_seq_append_to_end(p, a, b)),\n" +" c) }\n" +" | a=','.expression+ ',' '*' b=expression { (asdl_expr_seq*)_PyPegen_seq_append_to_end(p, a, b) }\n" +" | a=','.expression+ ',' '**' b=expression { (asdl_expr_seq*)_PyPegen_seq_append_to_end(p, a, b) }\n" +" | '*' a=expression ',' '**' b=expression {\n" +" (asdl_expr_seq*)_PyPegen_seq_append_to_end(\n" +" p,\n" +" CHECK(asdl_seq*, _PyPegen_singleton_seq(p, a)),\n" +" b) }\n" +" | '*' a=expression { (asdl_expr_seq*)_PyPegen_singleton_seq(p, a) }\n" +" | '**' a=expression { (asdl_expr_seq*)_PyPegen_singleton_seq(p, a) }\n" +" | a[asdl_expr_seq*]=','.expression+ {a}\n" +"\n" +"func_type_comment[Token*]:\n" +" | NEWLINE t=TYPE_COMMENT &(NEWLINE INDENT) { t } # Must be followed by indented block\n" +" | invalid_double_type_comments\n" +" | TYPE_COMMENT\n" +"\n" +"# ========================= END OF THE GRAMMAR ===========================\n" +"\n" +"\n" +"\n" +"# ========================= START OF INVALID RULES =======================\n" +"\n" +"# From here on, there are rules for invalid syntax with specialised error messages\n" +"invalid_arguments:\n" +" | ((','.(starred_expression | ( assignment_expression | expression !':=') !'=')+ ',' kwargs) | kwargs) a=',' ','.(starred_expression !'=')+ {\n" +" RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"iterable argument unpacking follows keyword argument unpacking\") }\n" +" | a=expression b=for_if_clauses ',' [args | expression for_if_clauses] {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, _PyPegen_get_last_comprehension_item(PyPegen_last_item(b, comprehension_ty)), \"Generator expression must be parenthesized\") }\n" +" | a=NAME b='=' expression for_if_clauses {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"invalid syntax. Maybe you meant '==' or ':=' instead of '='?\")}\n" +" | (args ',')? a=NAME b='=' &(',' | ')') {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"expected argument value expression\")}\n" +" | a=args b=for_if_clauses { _PyPegen_nonparen_genexp_in_call(p, a, b) }\n" +" | args ',' a=expression b=for_if_clauses {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, _PyPegen_get_last_comprehension_item(PyPegen_last_item(b, comprehension_ty)), \"Generator expression must be parenthesized\") }\n" +" | a=args ',' args { _PyPegen_arguments_parsing_error(p, a) }\n" +"invalid_kwarg:\n" +" | a[Token*]=('True'|'False'|'None') b='=' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"cannot assign to %s\", PyBytes_AS_STRING(a->bytes)) }\n" +" | a=NAME b='=' expression for_if_clauses {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"invalid syntax. Maybe you meant '==' or ':=' instead of '='?\")}\n" +" | !(NAME '=') a=expression b='=' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(\n" +" a, b, \"expression cannot contain assignment, perhaps you meant \\\"==\\\"?\") }\n" +" | a='**' expression '=' b=expression {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"cannot assign to keyword argument unpacking\") }\n" +"\n" +"# IMPORTANT: Note that the \"_without_invalid\" suffix causes the rule to not call invalid rules under it\n" +"expression_without_invalid[expr_ty]:\n" +" | a=disjunction 'if' b=disjunction 'else' c=expression { _PyAST_IfExp(b, a, c, EXTRA) }\n" +" | disjunction\n" +" | lambdef\n" +"invalid_legacy_expression:\n" +" | a=NAME !'(' b=star_expressions {\n" +" _PyPegen_check_legacy_stmt(p, a) ? RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b,\n" +" \"Missing parentheses in call to '%U'. Did you mean %U(...)?\", a->v.Name.id, a->v.Name.id) : NULL}\n" +"\n" +"invalid_type_param:\n" +" | '*' a=NAME colon=':' e=expression {\n" +" RAISE_SYNTAX_ERROR_STARTING_FROM(colon, e->kind == Tuple_kind\n" +" ? \"cannot use constraints with TypeVarTuple\"\n" +" : \"cannot use bound with TypeVarTuple\")\n" +" }\n" +" | '**' a=NAME colon=':' e=expression {\n" +" RAISE_SYNTAX_ERROR_STARTING_FROM(colon, e->kind == Tuple_kind\n" +" ? \"cannot use constraints with ParamSpec\"\n" +" : \"cannot use bound with ParamSpec\")\n" +" }\n" +"\n" +"invalid_expression:\n" +" | STRING a=(!STRING expression_without_invalid)+ STRING {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE( PyPegen_first_item(a, expr_ty), PyPegen_last_item(a, expr_ty),\n" +" \"invalid syntax. Is this intended to be part of the string?\") }\n" +" # !(NAME STRING) is not matched so we don't show this error with some invalid string prefixes like: kf\"dsfsdf\"\n" +" # Soft keywords need to also be ignored because they can be parsed as NAME NAME\n" +" | !(NAME STRING | SOFT_KEYWORD) a=disjunction b=expression_without_invalid {\n" +" _PyPegen_check_legacy_stmt(p, a) ? NULL : p->tokens[p->mark-1]->level == 0 ? NULL :\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"invalid syntax. Perhaps you forgot a comma?\") }\n" +" | a=disjunction 'if' b=disjunction !('else'|':') { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"expected 'else' after 'if' expression\") }\n" +" | a=disjunction 'if' b=disjunction 'else' !expression {\n" +" RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"expected expression after 'else', but statement is given\") }\n" +" | a[stmt_ty]=(pass_stmt|break_stmt|continue_stmt) 'if' b=disjunction 'else' c=simple_stmt {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION (a, \"expected expression before 'if', but statement is given\") }\n" +" | a='lambda' [lambda_params] b=':' &FSTRING_MIDDLE {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"f-string: lambda expressions are not allowed without parentheses\") }\n" +" | a='lambda' [lambda_params] b=':' &TSTRING_MIDDLE {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"t-string: lambda expressions are not allowed without parentheses\") }\n" +"\n" +"invalid_named_expression(memo):\n" +" | a=expression ':=' expression {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(\n" +" a, \"cannot use assignment expressions with %s\", _PyPegen_get_expr_name(a)) }\n" +" | a=NAME '=' b=bitwise_or !('='|':=') {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"invalid syntax. Maybe you meant '==' or ':=' instead of '='?\") }\n" +" | !(list|tuple|genexp|'True'|'None'|'False') a=bitwise_or b='=' bitwise_or !('='|':=') {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"cannot assign to %s here. Maybe you meant '==' instead of '='?\",\n" +" _PyPegen_get_expr_name(a)) }\n" +"\n" +"invalid_assignment:\n" +" | a=invalid_ann_assign_target ':' expression {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(\n" +" a,\n" +" \"only single target (not %s) can be annotated\",\n" +" _PyPegen_get_expr_name(a)\n" +" )}\n" +" | a=star_named_expression ',' star_named_expressions* ':' expression {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"only single target (not tuple) can be annotated\") }\n" +" | a=expression ':' expression {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"illegal target for annotation\") }\n" +" | (star_targets '=')* a=star_expressions '=' {\n" +" RAISE_SYNTAX_ERROR_INVALID_TARGET(STAR_TARGETS, a) }\n" +" | (star_targets '=')* a=yield_expr '=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"assignment to yield expression not possible\") }\n" +" | a=star_expressions augassign annotated_rhs {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(\n" +" a,\n" +" \"'%s' is an illegal expression for augmented assignment\",\n" +" _PyPegen_get_expr_name(a)\n" +" )}\n" +"invalid_ann_assign_target[expr_ty]:\n" +" | list\n" +" | tuple\n" +" | '(' a=invalid_ann_assign_target ')' { a }\n" +"invalid_del_stmt:\n" +" | 'del' a=star_expressions {\n" +" RAISE_SYNTAX_ERROR_INVALID_TARGET(DEL_TARGETS, a) }\n" +"invalid_block:\n" +" | NEWLINE !INDENT { RAISE_INDENTATION_ERROR(\"expected an indented block\") }\n" +"invalid_comprehension:\n" +" | ('[' | '(' | '{') a=starred_expression for_if_clauses {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"iterable unpacking cannot be used in comprehension\") }\n" +" | ('[' | '{') a=star_named_expression ',' b=star_named_expressions for_if_clauses {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, PyPegen_last_item(b, expr_ty),\n" +" \"did you forget parentheses around the comprehension target?\") }\n" +" | ('[' | '{') a=star_named_expression b=',' for_if_clauses {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"did you forget parentheses around the comprehension target?\") }\n" +"invalid_dict_comprehension:\n" +" | '{' a='**' bitwise_or for_if_clauses '}' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"dict unpacking cannot be used in dict comprehension\") }\n" +"invalid_parameters:\n" +" | a=\"/\" ',' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"at least one argument must precede /\") }\n" +" | (slash_no_default | slash_with_default) param_maybe_default* a='/' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"/ may appear only once\") }\n" +" | slash_no_default? param_no_default* invalid_parameters_helper a=param_no_default {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"parameter without a default follows parameter with a default\") }\n" +" | param_no_default* a='(' param_no_default+ ','? b=')' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"Function parameters cannot be parenthesized\") }\n" +" | (slash_no_default | slash_with_default)? param_maybe_default* '*' (',' | param_no_default) param_maybe_default* a='/' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"/ must be ahead of *\") }\n" +" | param_maybe_default+ '/' a='*' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"expected comma between / and *\") }\n" +"invalid_default:\n" +" | a='=' &(')'|',') { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"expected default value expression\") }\n" +"invalid_star_etc:\n" +" | a='*' (')' | ',' (')' | '**')) { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"named arguments must follow bare *\") }\n" +" | '*' ',' TYPE_COMMENT { RAISE_SYNTAX_ERROR(\"bare * has associated type comment\") }\n" +" | '*' param a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"var-positional argument cannot have default value\") }\n" +" | '*' (param_no_default | ',') param_maybe_default* a='*' (param_no_default | ',') {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"* argument may appear only once\") }\n" +"invalid_kwds:\n" +" | '**' param a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"var-keyword argument cannot have default value\") }\n" +" | '**' param ',' a=param { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"arguments cannot follow var-keyword argument\") }\n" +" | '**' param ',' a[Token*]=('*'|'**'|'/') { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"arguments cannot follow var-keyword argument\") }\n" +"invalid_parameters_helper: # This is only there to avoid type errors\n" +" | a=slash_with_default { _PyPegen_singleton_seq(p, a) }\n" +" | param_with_default+\n" +"invalid_lambda_parameters:\n" +" | a=\"/\" ',' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"at least one argument must precede /\") }\n" +" | (lambda_slash_no_default | lambda_slash_with_default) lambda_param_maybe_default* a='/' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"/ may appear only once\") }\n" +" | lambda_slash_no_default? lambda_param_no_default* invalid_lambda_parameters_helper a=lambda_param_no_default {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"parameter without a default follows parameter with a default\") }\n" +" | lambda_param_no_default* a='(' ','.lambda_param+ ','? b=')' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"Lambda expression parameters cannot be parenthesized\") }\n" +" | (lambda_slash_no_default | lambda_slash_with_default)? lambda_param_maybe_default* '*' (',' | lambda_param_no_default) lambda_param_maybe_default* a='/' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"/ must be ahead of *\") }\n" +" | lambda_param_maybe_default+ '/' a='*' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"expected comma between / and *\") }\n" +"invalid_lambda_parameters_helper:\n" +" | a=lambda_slash_with_default { _PyPegen_singleton_seq(p, a) }\n" +" | lambda_param_with_default+\n" +"invalid_lambda_star_etc:\n" +" | '*' (':' | ',' (':' | '**')) { RAISE_SYNTAX_ERROR(\"named arguments must follow bare *\") }\n" +" | '*' lambda_param a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"var-positional argument cannot have default value\") }\n" +" | '*' (lambda_param_no_default | ',') lambda_param_maybe_default* a='*' (lambda_param_no_default | ',') {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"* argument may appear only once\") }\n" +"invalid_lambda_kwds:\n" +" | '**' lambda_param a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"var-keyword argument cannot have default value\") }\n" +" | '**' lambda_param ',' a=lambda_param { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"arguments cannot follow var-keyword argument\") }\n" +" | '**' lambda_param ',' a[Token*]=('*'|'**'|'/') { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"arguments cannot follow var-keyword argument\") }\n" +"invalid_double_type_comments:\n" +" | TYPE_COMMENT NEWLINE TYPE_COMMENT NEWLINE INDENT {\n" +" RAISE_SYNTAX_ERROR(\"Cannot have two type comments on def\") }\n" +"invalid_with_item:\n" +" | expression 'as' a=expression &(',' | ')' | ':') {\n" +" RAISE_SYNTAX_ERROR_INVALID_TARGET(STAR_TARGETS, a) }\n" +"\n" +"invalid_for_if_clause:\n" +" | 'async'? 'for' (bitwise_or (',' bitwise_or)* [',']) !'in' {\n" +" RAISE_SYNTAX_ERROR(\"'in' expected after for-loop variables\") }\n" +"\n" +"invalid_for_target:\n" +" | 'async'? 'for' a=star_expressions {\n" +" RAISE_SYNTAX_ERROR_INVALID_TARGET(FOR_TARGETS, a) }\n" +"\n" +"invalid_group:\n" +" | '(' a=starred_expression ')' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"cannot use starred expression here\") }\n" +" | '(' a='**' expression ')' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"cannot use double starred expression here\") }\n" +"invalid_import:\n" +" | a='import' ','.dotted_name+ 'from' dotted_name {\n" +" RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"Did you mean to use 'from ... import ...' instead?\") }\n" +" | 'import' token=NEWLINE {\n" +" RAISE_SYNTAX_ERROR_STARTING_FROM(token, \"Expected one or more names after 'import'\") }\n" +"invalid_dotted_as_name:\n" +" | dotted_name 'as' !(NAME (',' | ')' | ';' | NEWLINE)) a=expression {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a,\n" +" \"cannot use %s as import target\", _PyPegen_get_expr_name(a)) }\n" +"invalid_import_from_as_name:\n" +" | NAME 'as' !(NAME (',' | ')' | ';' | NEWLINE)) a=expression {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a,\n" +" \"cannot use %s as import target\", _PyPegen_get_expr_name(a)) }\n" +"\n" +"invalid_import_from_targets:\n" +" | import_from_as_names ',' NEWLINE {\n" +" RAISE_SYNTAX_ERROR(\"trailing comma not allowed without surrounding parentheses\") }\n" +" | token=NEWLINE {\n" +" RAISE_SYNTAX_ERROR_STARTING_FROM(token, \"Expected one or more names after 'import'\") }\n" +"\n" +"invalid_with_stmt:\n" +" | ['async'] 'with' ','.(expression ['as' star_target])+ NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +" | ['async'] 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +"invalid_with_stmt_indent:\n" +" | ['async'] a='with' ','.(expression ['as' star_target])+ ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after 'with' statement on line %d\", a->lineno) }\n" +" | ['async'] a='with' '(' ','.(expressions ['as' star_target])+ ','? ')' ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after 'with' statement on line %d\", a->lineno) }\n" +"\n" +"invalid_try_stmt:\n" +" | a='try' ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after 'try' statement on line %d\", a->lineno) }\n" +" | 'try' ':' block !('except' | 'finally') { RAISE_SYNTAX_ERROR(\"expected 'except' or 'finally' block\") }\n" +" | 'try' ':' block* except_block+ a='except' b='*' expression ['as' NAME] ':' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"cannot have both 'except' and 'except*' on the same 'try'\") }\n" +" | 'try' ':' block* except_star_block+ a='except' [expression ['as' NAME]] ':' {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"cannot have both 'except' and 'except*' on the same 'try'\") }\n" +"invalid_except_stmt:\n" +" | 'except' a=expression ',' expressions 'as' NAME ':' {\n" +" RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"multiple exception types must be parenthesized when using 'as'\") }\n" +" | a='except' expression ['as' NAME ] NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +" | a='except' NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\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" +"invalid_except_star_stmt:\n" +" | 'except' '*' a=expression ',' expressions 'as' NAME ':' {\n" +" RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"multiple exception types must be parenthesized when using 'as'\") }\n" +" | a='except' '*' expression ['as' NAME ] NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +" | a='except' '*' (NEWLINE | ':') { RAISE_SYNTAX_ERROR(\"expected one or more exception types\") }\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" +"invalid_finally_stmt:\n" +" | a='finally' ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after 'finally' statement on line %d\", a->lineno) }\n" +"invalid_except_stmt_indent:\n" +" | a='except' expression ['as' NAME ] ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after 'except' statement on line %d\", a->lineno) }\n" +" | a='except' ':' NEWLINE !INDENT { RAISE_INDENTATION_ERROR(\"expected an indented block after 'except' statement on line %d\", a->lineno) }\n" +"invalid_except_star_stmt_indent:\n" +" | a='except' '*' expression ['as' NAME ] ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after 'except*' statement on line %d\", a->lineno) }\n" +"invalid_match_stmt:\n" +" | \"match\" subject_expr NEWLINE { CHECK_VERSION(void*, 10, \"Pattern matching is\", RAISE_SYNTAX_ERROR(\"expected ':'\") ) }\n" +" | a=\"match\" subject=subject_expr ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after 'match' statement on line %d\", a->lineno) }\n" +"invalid_case_block:\n" +" | \"case\" patterns guard? NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +" | a=\"case\" patterns guard? ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after 'case' statement on line %d\", a->lineno) }\n" +"invalid_as_pattern:\n" +" | or_pattern 'as' a=\"_\" { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"cannot use '_' as a target\") }\n" +" | or_pattern 'as' a=expression {\n" +" RAISE_SYNTAX_ERROR_KNOWN_LOCATION(\n" +" a, \"cannot use %s as pattern target\", _PyPegen_get_expr_name(a)) }\n" +"invalid_class_pattern:\n" +" | name_or_attr '(' a=invalid_class_argument_pattern { RAISE_SYNTAX_ERROR_KNOWN_RANGE(\n" +" PyPegen_first_item(a, pattern_ty),\n" +" PyPegen_last_item(a, pattern_ty),\n" +" \"positional patterns follow keyword patterns\") }\n" +"invalid_class_argument_pattern[asdl_pattern_seq*]:\n" +" | [positional_patterns ','] keyword_patterns ',' a=positional_patterns { a }\n" +"invalid_if_stmt:\n" +" | 'if' named_expression NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +" | a='if' a=named_expression ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after 'if' statement on line %d\", a->lineno) }\n" +"invalid_elif_stmt:\n" +" | 'elif' named_expression NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +" | a='elif' named_expression ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after 'elif' statement on line %d\", a->lineno) }\n" +"invalid_else_stmt:\n" +" | a='else' ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after 'else' statement on line %d\", a->lineno) }\n" +" | 'else' ':' block 'elif' { RAISE_SYNTAX_ERROR(\"'elif' block follows an 'else' block\")}\n" +"invalid_while_stmt:\n" +" | 'while' named_expression NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +" | a='while' named_expression ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after 'while' statement on line %d\", a->lineno) }\n" +"invalid_for_stmt:\n" +" | ['async'] 'for' star_targets 'in' star_expressions NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +" | ['async'] a='for' star_targets 'in' star_expressions ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after 'for' statement on line %d\", a->lineno) }\n" +"invalid_def_raw:\n" +" | ['async'] a='def' NAME [type_params] '(' [params] ')' ['->' expression] ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after function definition on line %d\", a->lineno) }\n" +" | ['async'] 'def' NAME [type_params] &&'(' [params] ')' ['->' expression] &&':' [func_type_comment] block\n" +"invalid_class_def_raw:\n" +" | 'class' NAME [type_params] ['(' [arguments] ')'] NEWLINE { RAISE_SYNTAX_ERROR(\"expected ':'\") }\n" +" | a='class' NAME [type_params] ['(' [arguments] ')'] ':' NEWLINE !INDENT {\n" +" RAISE_INDENTATION_ERROR(\"expected an indented block after class definition on line %d\", a->lineno) }\n" +"\n" +"invalid_double_starred_kvpairs:\n" +" | ','.double_starred_kvpair+ ',' invalid_kvpair\n" +" | expression ':' a='*' bitwise_or { RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"cannot use a starred expression in a dictionary value\") }\n" +" | expression a=':' &('}'|',') { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"expression expected after dictionary key and ':'\") }\n" +"invalid_kvpair:\n" +" | a=expression !(':') {\n" +" RAISE_ERROR_KNOWN_LOCATION(p, PyExc_SyntaxError, a->lineno, a->end_col_offset - 1, a->end_lineno, -1, \"':' expected after dictionary key\") }\n" +" | expression ':' a='*' bitwise_or { RAISE_SYNTAX_ERROR_STARTING_FROM(a, \"cannot use a starred expression in a dictionary value\") }\n" +" | expression a=':' &('}'|',') {RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"expression expected after dictionary key and ':'\") }\n" +"invalid_starred_expression_unpacking:\n" +" | a='*' expression '=' b=expression { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"cannot assign to iterable argument unpacking\") }\n" +"invalid_starred_expression:\n" +" | '*' { RAISE_SYNTAX_ERROR(\"Invalid star expression\") }\n" +"\n" +"invalid_fstring_replacement_field:\n" +" | '{' a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"f-string: valid expression required before '='\") }\n" +" | '{' a='!' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"f-string: valid expression required before '!'\") }\n" +" | '{' a=':' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"f-string: valid expression required before ':'\") }\n" +" | '{' a='}' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"f-string: valid expression required before '}'\") }\n" +" | '{' !annotated_rhs { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting a valid expression after '{'\") }\n" +" | '{' annotated_rhs !('=' | '!' | ':' | '}') {\n" +" PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting '=', or '!', or ':', or '}'\") }\n" +" | '{' annotated_rhs '=' !('!' | ':' | '}') {\n" +" PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting '!', or ':', or '}'\") }\n" +" | '{' annotated_rhs '='? invalid_fstring_conversion_character\n" +" | '{' annotated_rhs '='? ['!' NAME] !(':' | '}') {\n" +" PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting ':' or '}'\") }\n" +" | '{' annotated_rhs '='? ['!' NAME] ':' fstring_format_spec* !'}' {\n" +" PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting '}', or format specs\") }\n" +" | '{' annotated_rhs '='? ['!' NAME] !'}' {\n" +" PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: expecting '}'\") }\n" +"\n" +"invalid_fstring_conversion_character:\n" +" | '!' &(':' | '}') { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: missing conversion character\") }\n" +" | '!' !NAME { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"f-string: invalid conversion character\") }\n" +"\n" +"invalid_tstring_replacement_field:\n" +" | '{' a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"t-string: valid expression required before '='\") }\n" +" | '{' a='!' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"t-string: valid expression required before '!'\") }\n" +" | '{' a=':' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"t-string: valid expression required before ':'\") }\n" +" | '{' a='}' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, \"t-string: valid expression required before '}'\") }\n" +" | '{' !annotated_rhs { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting a valid expression after '{'\") }\n" +" | '{' annotated_rhs !('=' | '!' | ':' | '}') {\n" +" PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting '=', or '!', or ':', or '}'\") }\n" +" | '{' annotated_rhs '=' !('!' | ':' | '}') {\n" +" PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting '!', or ':', or '}'\") }\n" +" | '{' annotated_rhs '='? invalid_tstring_conversion_character\n" +" | '{' annotated_rhs '='? ['!' NAME] !(':' | '}') {\n" +" PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting ':' or '}'\") }\n" +" | '{' annotated_rhs '='? ['!' NAME] ':' fstring_format_spec* !'}' {\n" +" PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting '}', or format specs\") }\n" +" | '{' annotated_rhs '='? ['!' NAME] !'}' {\n" +" PyErr_Occurred() ? NULL : RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: expecting '}'\") }\n" +"\n" +"invalid_tstring_conversion_character:\n" +" | '!' &(':' | '}') { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: missing conversion character\") }\n" +" | '!' !NAME { RAISE_SYNTAX_ERROR_ON_NEXT_TOKEN(\"t-string: invalid conversion character\") }\n" +"\n" +"invalid_string_tstring_concat:\n" +" | a=(fstring|string)+ b[expr_ty]=tstring {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(PyPegen_last_item(a, expr_ty), b, \"cannot mix t-string literals with string or bytes literals\") }\n" +" | a=tstring+ b[expr_ty]=(fstring|string) {\n" +" RAISE_SYNTAX_ERROR_KNOWN_RANGE(PyPegen_last_item(a, expr_ty), b, \"cannot mix t-string literals with string or bytes literals\") }\n" +"\n" +"invalid_arithmetic:\n" +" | sum ('+'|'-'|'*'|'/'|'%'|'//'|'@') a='not' b=inversion { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"'not' after an operator must be parenthesized\") }\n" +"invalid_factor:\n" +" | ('+' | '-' | '~') a='not' b=factor { RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, \"'not' after an operator must be parenthesized\") }\n" +"\n" +"invalid_type_params:\n" +" | '[' token=']' {\n" +" RAISE_SYNTAX_ERROR_STARTING_FROM(\n" +" token,\n" +" \"Type parameter list cannot be empty\")}\n" diff --git a/reference/import.po b/reference/import.po index ab228401..8dd504bd 100644 --- a/reference/import.po +++ b/reference/import.po @@ -8,13 +8,14 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-17 13:34+0330\n" -"PO-Revision-Date: 2026-09-13 14:37+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 20:25+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" @@ -224,21 +225,16 @@ msgid "" "if spec.loader is None:\n" " # unsupported\n" " raise ImportError\n" -"if spec.origin is None and spec.submodule_search_locations is not None:\n" -" # namespace package\n" -" sys.modules[spec.name] = module\n" -"elif not hasattr(spec.loader, 'exec_module'):\n" -" module = spec.loader.load_module(spec.name)\n" -"else:\n" -" sys.modules[spec.name] = module\n" +"\n" +"sys.modules[spec.name] = module\n" +"try:\n" +" spec.loader.exec_module(module)\n" +"except BaseException:\n" " try:\n" -" spec.loader.exec_module(module)\n" -" except BaseException:\n" -" try:\n" -" del sys.modules[spec.name]\n" -" except KeyError:\n" -" pass\n" -" raise\n" +" del sys.modules[spec.name]\n" +" except KeyError:\n" +" pass\n" +" raise\n" "return sys.modules[spec.name]" msgstr "" "module = None\n" @@ -253,21 +249,16 @@ msgstr "" "if spec.loader is None:\n" " # unsupported\n" " raise ImportError\n" -"if spec.origin is None and spec.submodule_search_locations is not None:\n" -" # namespace package\n" -" sys.modules[spec.name] = module\n" -"elif not hasattr(spec.loader, 'exec_module'):\n" -" module = spec.loader.load_module(spec.name)\n" -"else:\n" -" sys.modules[spec.name] = module\n" +"\n" +"sys.modules[spec.name] = module\n" +"try:\n" +" spec.loader.exec_module(module)\n" +"except BaseException:\n" " try:\n" -" spec.loader.exec_module(module)\n" -" except BaseException:\n" -" try:\n" -" del sys.modules[spec.name]\n" -" except KeyError:\n" -" pass\n" -" raise\n" +" del sys.modules[spec.name]\n" +" except KeyError:\n" +" pass\n" +" raise\n" "return sys.modules[spec.name]" msgid "Note the following details:" @@ -291,8 +282,11 @@ msgstr "اجرای ماژول، لحظه کلیدی بارگذاری است که msgid "The module created during loading and passed to exec_module() may not be the one returned at the end of import [#fnlo]_." msgstr "ممکن است ماژولی که در حین بارگذاری ایجاد می‌شود و به exec_module() پاس داده می‌شود، همان ماژولی نباشد که در پایان ایمپورت برگردانده می‌شود [#fnlo]_." -msgid "The import system has taken over the boilerplate responsibilities of loaders. These were previously performed by the :meth:`importlib.abc.Loader.load_module` method." -msgstr "سیستم ایمپورت مسئولیت‌های قالبی بارگذارها را بر عهده گرفته است. این مسئولیت‌ها پیش‌تر توسط متد :meth:`importlib.abc.Loader.load_module` انجام می‌شدند." +msgid "The import system has taken over the boilerplate responsibilities of loaders. These were previously performed by the ``importlib.abc.Loader.load_module`` method." +msgstr "سیستم ایمپورت مسئولیت‌های کد پیش‌ساخته‌ی بارگذارها را بر عهده گرفته است. این کار پیش‌تر توسط متد ``importlib.abc.Loader.load_module`` انجام می‌شد." + +msgid "The ``load_module`` method is no longer used." +msgstr "متد ``load_module`` دیگر استفاده نمی‌شود." msgid "Loaders" msgstr "بارگذارها" @@ -318,8 +312,8 @@ msgstr "بارگذارهای ماژول می‌توانند با پیاده‌س msgid "The :meth:`~importlib.abc.Loader.create_module` method of loaders." msgstr "متد :meth:`~importlib.abc.Loader.create_module` بارگذارها." -msgid "The :meth:`~importlib.abc.Loader.load_module` method was replaced by :meth:`~importlib.abc.Loader.exec_module` and the import machinery assumed all the boilerplate responsibilities of loading." -msgstr "متد :meth:`~importlib.abc.Loader.load_module` با :meth:`~importlib.abc.Loader.exec_module` جایگزین شد و سازوکار ایمپورت تمام مسئولیت‌های قالبی بارگذاری را بر عهده گرفت." +msgid "The ``importlib.abc.Loader.load_module`` method was replaced by :meth:`~importlib.abc.Loader.exec_module` and the import machinery assumed all the boilerplate responsibilities of loading." +msgstr "متد ``importlib.abc.Loader.load_module`` با :meth:`~importlib.abc.Loader.exec_module` جایگزین شد و ماشین‌افزار ایمپورت تمام مسئولیت‌های کد پیش‌ساخته‌ی بارگذاری را بر عهده گرفت." msgid "For compatibility with existing loaders, the import machinery will use the ``load_module()`` method of loaders if it exists and the loader does not also implement ``exec_module()``. However, ``load_module()`` has been deprecated and loaders should implement ``exec_module()`` instead." msgstr "برای سازگاری با بارگذارهای موجود، سازوکار ایمپورت در صورتی از متد ``load_module()`` بارگذارها استفاده می‌کند که این متد وجود داشته باشد و بارگذار ``exec_module()`` را نیز پیاده‌سازی نکرده باشد. با این حال، ``load_module()`` منسوخ شده است و بارگذارها باید به‌جای آن ``exec_module()`` را پیاده‌سازی کنند." diff --git a/reference/lexical_analysis.po b/reference/lexical_analysis.po index 22135c20..51de6e27 100644 --- a/reference/lexical_analysis.po +++ b/reference/lexical_analysis.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 09:00+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -416,6 +417,9 @@ msgstr "``match``، ``case`` و ``_``، هنگامی که در دستور :keywo msgid "``type``, when used in the :keyword:`type` statement." msgstr "``type``، هنگامی که در دستور :keyword:`type` استفاده می‌شود." +msgid "``lazy``, when used before an :keyword:`import` statement." +msgstr "``lazy``، هنگامی که قبل از یک دستور :keyword:`import` استفاده شود." + msgid "These syntactically act as keywords in their specific contexts, but this distinction is done at the parser level, not when tokenizing." msgstr "این موارد از نظر نحوی در زمینه‌های خاص خود به‌عنوان کلیدواژه عمل می‌کنند، اما این تمایز در سطح پارسر صورت می‌گیرد، نه هنگام توکن‌بندی (tokenizing)." @@ -425,6 +429,9 @@ msgstr "به‌عنوان کلیدواژه‌های نرم (soft keywords)، ا msgid "``type`` is now a soft keyword." msgstr "``type`` اکنون یک کلیدواژه نرم (soft keyword) است." +msgid "``lazy`` is now a soft keyword." +msgstr "``lazy`` اکنون یک کلیدواژهی نرم است." + msgid "Reserved classes of identifiers" msgstr "کلاس‌های رزروشده‌ی شناسه‌ها" @@ -901,8 +908,8 @@ msgstr "" msgid "This sequence cannot appear in :ref:`bytes literals `." msgstr "این دنباله نمی‌تواند در :ref:`مقادیر لفظی بایتی ` ظاهر شود." -msgid "Support for `name aliases `__ has been added." -msgstr "پشتیبانی از `نام‌های مستعار `__ اضافه شده است." +msgid "Support for `name aliases `__ has been added." +msgstr "پشتیبانی از `نام مستعارها `__ اضافه شده است." msgid "Hexadecimal Unicode characters" msgstr "نویسه‌های یونیکد مبنای شانزده" diff --git a/reference/simple_stmts.po b/reference/simple_stmts.po index 0386c7d6..2651f9c2 100644 --- a/reference/simple_stmts.po +++ b/reference/simple_stmts.po @@ -8,13 +8,14 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" -"PO-Revision-Date: 2026-09-14 10:28+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 20:24+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" @@ -561,6 +562,96 @@ msgstr ":func:`importlib.import_module` برای پشتیبانی از برنا msgid "Raises an :ref:`auditing event ` ``import`` with arguments ``module``, ``filename``, ``sys.path``, ``sys.meta_path``, ``sys.path_hooks``." msgstr "یک :ref:`رویداد حسابرسی ` ``import`` را با آرگومان‌های ``module``، ``filename``، ``sys.path``، ``sys.meta_path`` و ``sys.path_hooks`` پرتاب می‌کند." +msgid "Lazy imports" +msgstr "ایمپورت‌های تنبل" + +msgid "The :keyword:`lazy` keyword is a :ref:`soft keyword ` that only has special meaning when it appears immediately before an :keyword:`import` or :keyword:`from` statement. When an import statement is preceded by the :keyword:`lazy` keyword, the import becomes *lazy*: the module is not loaded immediately at the import statement. Instead, a lazy proxy object is created and bound to the name. The actual module is loaded on first use of that name." +msgstr "کلیدواژه‌ی :keyword:`lazy` یک :ref:`کلیدواژه‌ی نرم ` است که تنها زمانی معنای ویژه‌ای دارد که بلافاصله پیش از یک دستور :keyword:`import` یا :keyword:`from` ظاهر شود. هنگامی که یک دستور import با کلیدواژه‌ی :keyword:`lazy` پیشوند شود، آن import به صورت *تنبل (lazy)* درمی‌آید: ماژول بلافاصله در دستور import بارگذاری نمی‌شود. در عوض، یک شیء پراکسی تنبل ایجاد شده و به نام کران می‌شود. ماژول واقعی در اولین استفاده از آن نام بارگذاری می‌شود." + +msgid "Lazy imports are only permitted at module scope. Using :keyword:`lazy` inside a function, class body, or :keyword:`try`/:keyword:`except`/:keyword:`finally` block raises a :exc:`SyntaxError`. Star imports cannot be lazy (``lazy from module import *`` is a syntax error), and :ref:`future statements ` cannot be lazy." +msgstr "ایمپورت‌های تنبل تنها در محدوده‌ی ماژول مجاز هستند. استفاده از :keyword:`lazy` درون یک تابع، بدنه‌ی کلاس، یا بلوک :keyword:`try`/:keyword:`except`/:keyword:`finally` خطای :exc:`SyntaxError` ایجاد می‌کند. ایمپورت‌های ستاره‌ای نمی‌توانند تنبل باشند (عبارت ``lazy from module import *`` یک خطای نحوی است)، و :ref:`بیانیه‌های آینده ` نمی‌توانند تنبل باشند." + +msgid "When using ``lazy from ... import``, each imported name is bound to a lazy proxy object. The first access to any of these names triggers loading of the entire module and resolves only that specific name to its actual value. Other names remain as lazy proxies until they are accessed." +msgstr "هنگام استفاده از ``lazy from ... import``، هر نام ایمپورت‌شده به یک شیء پراکسی تنبل متصل (bound) می‌شود. اولین دسترسی به هر یک از این نام‌ها، بارگذاری کل ماژول را فعال می‌کند و تنها همان نام مشخص را به مقدار واقعی‌اش حل می‌کند. سایر نام‌ها تا زمانی که به آن‌ها دسترسی پیدا شود به عنوان پراکسی‌های تنبل باقی می‌مانند." + +msgid "Example::" +msgstr "مثال::" + +msgid "" +"lazy import json\n" +"import sys\n" +"\n" +"print('json' in sys.modules) # False - json module not yet loaded\n" +"\n" +"# First use triggers loading\n" +"result = json.dumps({\"hello\": \"world\"})\n" +"\n" +"print('json' in sys.modules) # True - now loaded" +msgstr "" +"lazy import json\n" +"import sys\n" +"\n" +"print('json' in sys.modules) # False - json module not yet loaded\n" +"\n" +"# First use triggers loading\n" +"result = json.dumps({\"hello\": \"world\"})\n" +"\n" +"print('json' in sys.modules) # True - now loaded" + +msgid "If an error occurs during module loading (such as :exc:`ImportError` or :exc:`SyntaxError`), it is raised at the point where the lazy import is first used, not at the import statement itself." +msgstr "اگر خطایی در طول بارگذاری ماژول رخ دهد (مانند :exc:`ImportError` یا :exc:`SyntaxError`)، این خطا در نقطه‌ای که ایمپورت تنبل برای اولین بار استفاده می‌شود بالا برده می‌شود، نه در خود دستور ایمپورت." + +msgid "See :pep:`810` for the full specification of lazy imports." +msgstr "برای مشخصات کامل ایمپورت‌های تنبل، به :pep:`810` مراجعه کنید." + +msgid "Compatibility via ``__lazy_modules__``" +msgstr "سازگاری از طریق ``__lazy_modules__``" + +msgid "As an alternative to using the :keyword:`lazy` keyword, a module can opt into lazy loading for specific imports by defining a module-level :attr:`~module.__lazy_modules__` variable. When present, it must be a container of fully qualified module name strings. Any regular (non-``lazy``) :keyword:`import` statement at module scope whose target appears in :attr:`!__lazy_modules__` is treated as a lazy import, exactly as if the :keyword:`lazy` keyword had been used." +msgstr "به‌عنوان جایگزینی برای استفاده از کلیدواژه‌ی :keyword:`lazy`، یک ماژول می‌تواند با تعریف متغیر :attr:`~module.__lazy_modules__` در سطح ماژول، بارگذاری تنبل را برای واردکردن‌های مشخص فعال کند. در صورت وجود این متغیر، باید یک ظرف شامل رشته‌هایی با نام کامل ماژول‌ها باشد. هر دستور :keyword:`import` معمولی (غیر از ``lazy``) در سطح ماژول که هدف آن در :attr:`!__lazy_modules__` قرار داشته باشد، به‌عنوان یک import تنبل در نظر گرفته می‌شود؛ دقیقاً گویی از کلیدواژه‌ی :keyword:`lazy` استفاده شده است." + +msgid "This provides a way to enable lazy loading for specific dependencies without changing individual ``import`` statements. This is useful when supporting Python versions older than 3.15 while using lazy imports in 3.15+::" +msgstr "این روش راهی برای فعال کردن بارگذاری تنبل برای وابستگی‌های خاص بدون تغییر دستورات ``import`` فردی فراهم می‌کند. این کار هنگام پشتیبانی از نسخه‌های پایتون قدیمی‌تر از ۳.۱۵ در حالی که از ایمپورت‌های تنبل در ۳.۱۵+ استفاده می‌کنید مفید است::" + +msgid "" +"__lazy_modules__ = [\"json\", \"pathlib\"]\n" +"\n" +"import json # loaded lazily (name is in __lazy_modules__)\n" +"import os # loaded eagerly (name not in __lazy_modules__)\n" +"\n" +"import pathlib # loaded lazily" +msgstr "" +"__lazy_modules__ = [\"json\", \"pathlib\"]\n" +"\n" +"import json # loaded lazily (name is in __lazy_modules__)\n" +"import os # loaded eagerly (name not in __lazy_modules__)\n" +"\n" +"import pathlib # loaded lazily" + +msgid "Relative imports are resolved to their absolute name before the lookup, so :attr:`!__lazy_modules__` must always contain fully qualified module names." +msgstr "ایمپورت‌های نسبی پیش از جستجو به نام مطلق خود حل می‌شوند، بنابراین :attr:`!__lazy_modules__` همیشه باید شامل نام‌های ماژول با نام کاملاً واجد شرایط باشد." + +msgid "For ``from``-style imports, the relevant name is the module following ``from``, not the names of its members::" +msgstr "برای ایمپورت‌های سبکیِ ``from``، نام مربوطه ماژولی است که پس از ``from`` می‌آید، نه نام اعضای آن::" + +msgid "" +"# In mypackage/mymodule.py\n" +"__lazy_modules__ = [\"mypackage\", \"mypackage.sub.utils\"]\n" +"\n" +"from . import helper # loaded lazily: . resolves to mypackage\n" +"from .sub.utils import func # loaded lazily: .sub.utils resolves to mypackage.sub.utils\n" +"import json # loaded eagerly (not in __lazy_modules__)" +msgstr "" +"# In mypackage/mymodule.py\n" +"__lazy_modules__ = [\"mypackage\", \"mypackage.sub.utils\"]\n" +"\n" +"from . import helper # loaded lazily: . resolves to mypackage\n" +"from .sub.utils import func # loaded lazily: .sub.utils resolves to mypackage.sub.utils\n" +"import json # loaded eagerly (not in __lazy_modules__)" + +msgid "Imports inside functions, class bodies, or :keyword:`try`/:keyword:`except`/:keyword:`finally` blocks are always eager, regardless of :attr:`!__lazy_modules__`." +msgstr "ایمپورت‌های درون تابع‌ها، بدنه‌ی کلاس‌ها، یا بلوک‌های :keyword:`try`/:keyword:`except`/:keyword:`finally` همیشه مشتاق (eager) هستند، صرف‌نظر از :attr:`!__lazy_modules__`." + msgid "Future statements" msgstr "دستورهای آینده" @@ -996,6 +1087,9 @@ msgstr "from" msgid "as" msgstr "as" +msgid "lazy" +msgstr "lazy" + msgid "ImportError" msgstr "ImportError" @@ -1008,6 +1102,12 @@ msgstr "__all__ (ویژگی اختیاری ماژول)" msgid "relative" msgstr "نسبی" +msgid "lazy import" +msgstr "ایمپورت تنبل" + +msgid "__lazy_modules__" +msgstr "__lazy_modules__" + msgid "future" msgstr "آینده" diff --git a/reports/contributor_stats_latest.png b/reports/contributor_stats_latest.png index 51b0606b..4f834840 100644 Binary files a/reports/contributor_stats_latest.png and b/reports/contributor_stats_latest.png differ diff --git a/scripts/po_sync.py b/scripts/po_sync.py index 4ed7b311..dfb49b6a 100644 --- a/scripts/po_sync.py +++ b/scripts/po_sync.py @@ -8,7 +8,7 @@ - scripts/update_python_version.py (manual, deliberate version bumps, full clone, creates new .po files for brand-new pages) - .github/workflows/sync-with-cpython.yml (nightly automated msgid sync, - sparse checkout, merge-only by default, opens an issue for fuzzy strings) + merge-only by default, opens an issue for fuzzy strings) Keeping this logic in one place means both paths build .pot files and run msgmerge/msgfmt identically -- no more silent flag drift (e.g. one path @@ -21,6 +21,23 @@ sync_sphinx_catalog() combines both into one POT before merging, so neither set of strings clobbers the other. +Changelog (whatsnew/changelog.po) +--------------------------------- +The "Changelog" page is not written by hand: CPython's `make gettext` +first runs `blurb merge`, which assembles Doc/build/NEWS from the entries in +Misc/NEWS.d, and only then runs Sphinx. Two things follow: + + - the checkout must be a complete CPython checkout (blurb refuses to run + outside one, so a sparse Doc/Include/Misc checkout fails), and + - the .pot must be built with `make -C Doc gettext`, not by calling + sphinx-build directly, otherwise whatsnew/changelog.pot only contains + the page title. + +build_gettext() therefore uses `make`, exactly like the translations +dashboard does, and verify_changelog_pot() refuses to continue if the +changelog template looks truncated (merging against a truncated template +would turn every changelog translation into an obsolete `#~` entry). + New upstream pages ------------------ When CPython adds a page (e.g. the whole Doc/library/builtins section), there @@ -68,6 +85,13 @@ IGNORED_DIR_NAMES = {".git", ".cpython-src", ".pot-templates"} +# whatsnew/changelog.pot is generated from Misc/NEWS.d by blurb. A healthy +# build has many thousands of entries (~15k for 3.15); a build where blurb +# did not run has exactly one (the page title). Anything below this threshold +# is treated as a broken build. +CHANGELOG_POT = Path("whatsnew") / "changelog.pot" +MIN_CHANGELOG_MSGIDS = 1000 + def run( cmd: list, cwd: Path | None = None, check: bool = True @@ -92,9 +116,11 @@ def iter_po_files(repo_root: Path = REPO_ROOT): def fetch_cpython_full(tag: str, workdir: Path) -> None: - """Full clone of CPython at `tag`. Used by the version-bump script, - which needs the full doc tree to build every .pot (including ones for - brand-new pages that a sparse checkout might not anticipate).""" + """Shallow, full-tree clone of CPython at `tag` (a tag or a branch name, + e.g. "3.15"). Needed for every sync because `make gettext` runs blurb, + which only works inside a complete CPython checkout, and because the + full doc tree is needed to build every .pot (including ones for brand-new + pages).""" if workdir.exists(): shutil.rmtree(workdir) run( @@ -112,9 +138,12 @@ def fetch_cpython_full(tag: str, workdir: Path) -> None: def fetch_cpython_sparse(tag: str, workdir: Path) -> None: - """Sparse, blobless clone of just Doc/ + Include/. Used by the nightly - workflow. Doc/ contains everything needed to build every .pot, including - ones for brand-new pages, so this is enough for --create-new too.""" + """Sparse, blobless clone of Doc/ + Include/ + Misc/. + + NOT used by sync-only any more: blurb (run by `make gettext` to build the + changelog) rejects this layout with "You're not inside a CPython repo + right now!". Kept only so other scripts that import it keep working; it + can build every .pot *except* a complete whatsnew/changelog.pot.""" if workdir.exists(): shutil.rmtree(workdir) run( @@ -131,21 +160,52 @@ def fetch_cpython_sparse(tag: str, workdir: Path) -> None: str(workdir), ] ) - run(["git", "sparse-checkout", "set", "Doc", "Include"], cwd=workdir) + run(["git", "sparse-checkout", "set", "Doc", "Include", "Misc"], cwd=workdir) def build_gettext(doc_dir: Path) -> Path: - """Build .pot templates from a CPython Doc/ checkout, return their root dir.""" - venv_dir = doc_dir / "venv" - run([sys.executable, "-m", "venv", str(venv_dir)]) - pip = venv_dir / "bin" / "pip" - sphinx_build = venv_dir / "bin" / "sphinx-build" - run([str(pip), "install", "-r", "requirements.txt"], cwd=doc_dir) + """Build .pot templates from a CPython Doc/ checkout, return their root dir. + + Uses CPython's own Makefile (same as the translations dashboard) so that + `blurb merge` runs first and the changelog page has real content. + `make venv` creates Doc/venv with the exact pinned Sphinx that CPython's + docs build with.""" + run(["make", "-C", str(doc_dir), "venv"]) + run(["make", "-C", str(doc_dir), "gettext"]) pot_root = doc_dir / "build" / "gettext" - run([str(sphinx_build), "-b", "gettext", ".", str(pot_root)], cwd=doc_dir) + verify_changelog_pot(pot_root) return pot_root +def count_msgids(pot_path: Path) -> int: + """Number of real entries in a .pot/.po file (the header is not counted).""" + count = 0 + with pot_path.open(encoding="utf-8") as f: + for line in f: + # "msgid " (with the space) excludes msgid_plural lines. + if line.startswith("msgid "): + count += 1 + return max(count - 1, 0) + + +def verify_changelog_pot(pot_root: Path) -> None: + """Fail loudly if whatsnew/changelog.pot was built without blurb. + + Merging an almost-empty template into a translated changelog.po would + mark every entry obsolete, so it is far safer to stop here.""" + pot_path = pot_root / CHANGELOG_POT + if not pot_path.exists(): + raise RuntimeError(f"{pot_path} was not generated by `make gettext`") + entries = count_msgids(pot_path) + print(f" {CHANGELOG_POT}: {entries} entries") + if entries < MIN_CHANGELOG_MSGIDS: + raise RuntimeError( + f"{CHANGELOG_POT} has only {entries} entries (expected thousands). " + "`blurb merge` probably did not run or Misc/NEWS.d is missing; " + "refusing to merge against a truncated changelog template." + ) + + # --------------------------------------------------------------------------- # Merge # --------------------------------------------------------------------------- @@ -279,9 +339,9 @@ def merge_all( def find_sphinx_pot(venv_dir: Path) -> Path: """Locate sphinx.pot inside the sphinx version installed in `venv_dir` - (the same venv build_gettext() creates from Doc/requirements.txt, so - this stays pinned to whatever Sphinx version CPython's docs actually - build with -- not whatever sphinx happens to be on the runner).""" + (the same venv build_gettext() creates via `make venv`, so this stays + pinned to whatever Sphinx version CPython's docs actually build with -- + not whatever sphinx happens to be on the runner).""" python = venv_dir / "bin" / "python" result = subprocess.run( [ @@ -366,8 +426,9 @@ def check_po_files(repo_root: Path = REPO_ROOT) -> list: def _cli_sync_only(args: argparse.Namespace) -> int: - """Sparse clone + build gettext + merge into existing .po files + - (optionally) create .po files for new upstream pages + validate. + """Shallow clone + build gettext (incl. the changelog) + merge into + existing .po files + (optionally) create .po files for new upstream + pages + validate. Without --create-new this is report-only for new upstream pages. With --create-new, empty .po files are created for them, so they show up @@ -378,8 +439,8 @@ def _cli_sync_only(args: argparse.Namespace) -> int: tag = args.tag doc_venv_dir = workdir / "Doc" / "venv" - print(f"== Sparse-fetching CPython {tag} ==") - fetch_cpython_sparse(tag, workdir) + print(f"== Fetching CPython {tag} ==") + fetch_cpython_full(tag, workdir) print("\n== Building gettext templates ==") pot_root = build_gettext(workdir / "Doc") @@ -427,11 +488,15 @@ def main() -> None: sync = sub.add_parser( "sync-only", - help="Sparse-checkout sync used by the nightly workflow: fetch, " - "build gettext, merge into existing .po files, report (or create) " - "new upstream pages, validate.", + help="Fetch CPython, build gettext (including the changelog), merge " + "into existing .po files, report (or create) new upstream pages, " + "validate. Used by the nightly workflow.", + ) + sync.add_argument( + "tag", + help="CPython git tag or branch to sync against, e.g. v3.14.7 or 3.15 " + "(use the branch name to match the translations dashboard)", ) - sync.add_argument("tag", help="CPython git tag to sync against, e.g. v3.14.7") sync.add_argument( "--create-new", action="store_true", @@ -461,4 +526,4 @@ def main() -> None: if __name__ == "__main__": - main() + main() \ No newline at end of file diff --git a/sphinx.po b/sphinx.po index 3203471b..6638b1b3 100644 --- a/sphinx.po +++ b/sphinx.po @@ -9,15 +9,16 @@ # Revisto , 2025 # Sepehr Rasouli , 2026 # invincible627 , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-19 20:08+0330\n" -"PO-Revision-Date: 2026-09-21 15:41+0330\n" +"POT-Creation-Date: 2026-10-08 09:24+0330\n" +"PO-Revision-Date: 2026-08-28 10:54+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" -"Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" +"Language-Team: Persian (https://github.com/python/python-docs-fa/fa/)\n" "Language: fa\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -189,7 +190,7 @@ msgid "in development" msgstr "در حال توسعه" msgid "pre-release" -msgstr "نسخه‌ی پیش‌انتشار" +msgstr "پیش‌انتشار" msgid "stable" msgstr "پایدار" @@ -219,7 +220,7 @@ msgid "Start here: a tour of Python's syntax and features" msgstr "از اینجا شروع کنید: سفری در سینتکس و ویژگی‌های پایتون" msgid "Built-ins reference" -msgstr "مرجع توکارها" +msgstr "ارجاع‌های داخلی" msgid "Built-in functions and classes" msgstr "توابع و کلاس‌های توکار" @@ -234,7 +235,7 @@ msgid "Language reference" msgstr "مرجع زبان" msgid "Syntax and language elements" -msgstr "المان‌های نحوی و زبانی" +msgstr "سینتکس و عناصر زبان" msgid "Python setup and usage" msgstr "راه‌اندازی و استفاده از پایتون" @@ -264,7 +265,7 @@ msgid "Python's C API" msgstr "رابط برنامه‌نویسی C پایتون" msgid "C API reference" -msgstr "مرجع رابط برنامه‌نویسی C" +msgstr "مراجع C API" msgid "FAQs" msgstr "سوالات متداول" @@ -273,7 +274,7 @@ msgid "Frequently asked questions (with answers!)" msgstr "سؤالات متداول (همراه با پاسخ!)" msgid "Deprecations" -msgstr "موارد منسوخ‌شده" +msgstr "منسوخ‌شده‌ها" msgid "Deprecated functionality" msgstr "قابلیت‌های منسوخ‌شده" @@ -285,7 +286,7 @@ msgid "Python developer's guide" msgstr "راهنمای توسعه‌دهندگان پایتون" msgid "Information on contributing to Python" -msgstr "" +msgstr "اطلاعات درباره‌ی مشارکت به پایتون" msgid "Python Packaging User Guide" msgstr "راهنمای کاربر بسته‌بندی پایتون" @@ -297,13 +298,13 @@ msgid "Audio/visual talks" msgstr "گفتارهای صوتی/تصویری" msgid "Podcasts, talks, and video presentations from the community" -msgstr "" +msgstr "پادکست‌ها، سخنرانی‌ها و ارائه‌های ویدئویی از سوی اعضای جامعه" msgid "Python Enhancement Proposals" -msgstr "" +msgstr "پیشنهادهای بهبود پایتون" msgid "Index of proposed improvements to Python" -msgstr "" +msgstr "فهرست پیشنهادهای بهبود پایتون" msgid "Static Typing with Python" msgstr "تایپ‌گذاری ایستا (Static Typing) در پایتون" @@ -315,7 +316,7 @@ msgid "Indices, glossary, and search:" msgstr "اندیس‌ها، واژه‌نامه و جست‌وجو:" msgid "Global module index" -msgstr "اندیس ماژول‌های سراسری" +msgstr "اندیس ماژول سراسری" msgid "All modules and libraries" msgstr "همه‌ی ماژول‌ها و کتابخانه‌ها" @@ -345,13 +346,13 @@ msgid "All sections and subsections" msgstr "همه‌ی بخش‌ها و زیربخش‌ها" msgid "Project information:" -msgstr "اطلاعات پروژه:" +msgstr "اطلاعات پروژه" msgid "Reporting issues" -msgstr "گزارش مشکلات" +msgstr "گزارش اشکالات" msgid "Contributing to docs" -msgstr "مشارکت در مستندات" +msgstr "مشارکت به مستندات" msgid "Download the documentation" msgstr "دانلود مستندات" @@ -393,165 +394,165 @@ msgstr "نسخه‌ی پایدار فعلی" #, python-format msgid "The %s extension is required by needs_extensions settings, but it is not loaded." -msgstr "" +msgstr "افزونه‌ی %s توسط تنظیمات needs_extensions لازم است، اما بار نشده است." #, python-format msgid "This project needs the extension %s at least in version %s and therefore cannot be built with the loaded version (%s)." -msgstr "" +msgstr "این پروژه به افزونه‌ی %s حداقل در نسخه‌ی %s نیاز دارد و بنابراین نمی‌توان آن را با نسخه‌ی بارشده (%s) ساخت." #, python-format msgid "Cannot find source directory (%s)" -msgstr "" +msgstr "پوشه‌ی منبع (%s) پیدا نشد" #, python-format msgid "Output directory (%s) is not a directory" -msgstr "" +msgstr "پوشه‌ی خروجی (%s) یک پوشه نیست" msgid "Source directory and destination directory cannot be identical" -msgstr "" +msgstr "پوشه‌ی منبع و پوشه‌ی مقصد نمی‌توانند یکسان باشند" #, python-format msgid "Running Sphinx v%s" -msgstr "" +msgstr "در حال اجرای Sphinx نسخه‌ی %s" #, python-format msgid "This project needs at least Sphinx v%s and therefore cannot be built with this version." -msgstr "" +msgstr "این پروژه حداقل به Sphinx نسخه‌ی %s نیاز دارد و بنابراین نمی‌توان آن را با این نسخه ساخت." msgid "making output directory" -msgstr "" +msgstr "در حال ساخت پوشه‌ی خروجی" #, python-format msgid "while setting up extension %s:" -msgstr "" +msgstr "هنگام راه‌اندازی افزونه‌ی %s:" msgid "'setup' as currently defined in conf.py isn't a Python callable. Please modify its definition to make it a callable function. This is needed for conf.py to behave as a Sphinx extension." -msgstr "" +msgstr "«setup» به‌شکلی که در حال حاضر در conf.py تعریف شده، یک فراخوانی‌پذیر پایتونی نیست. لطفاً تعریف آن را تغییر دهید تا به یک تابع فراخوانی‌پذیر تبدیل شود. این کار برای اینکه conf.py مانند یک افزونه‌ی Sphinx رفتار کند، لازم است." #, python-format msgid "loading translations [%s]... " -msgstr "" +msgstr "در حال بارگذاری ترجمه‌ها [%s]... " msgid "done" -msgstr "" +msgstr "انجام شد" msgid "not available for built-in messages" -msgstr "" +msgstr "برای پیام‌های توکار در دسترس نیست" msgid "loading pickled environment" -msgstr "" +msgstr "در حال بارگذاری محیط پیکل‌شده" #, python-format msgid "failed: %s" -msgstr "" +msgstr "شکست خورد: %s" msgid "No builder selected, using default: html" -msgstr "" +msgstr "هیچ سازنده‌ای انتخاب نشد، استفاده از پیش‌فرض: html" msgid "build finished with problems." -msgstr "" +msgstr "ساخت با مشکلاتی به پایان رسید." msgid "build succeeded." -msgstr "" +msgstr "ساخت با موفقیت به پایان رسید." msgid "build finished with problems, 1 warning (with warnings treated as errors)." -msgstr "" +msgstr "ساخت با مشکلاتی به پایان رسید، ۱ هشدار (با هشدارها به‌عنوان خطا برخورد شده است)." msgid "build finished with problems, 1 warning." -msgstr "" +msgstr "ساخت با مشکلاتی به پایان رسید، ۱ هشدار." msgid "build succeeded, 1 warning." -msgstr "" +msgstr "ساخت با موفقیت به پایان رسید، ۱ هشدار." #, python-format msgid "build finished with problems, %s warnings (with warnings treated as errors)." -msgstr "" +msgstr "ساخت با مشکلاتی به پایان رسید، %s هشدار (با هشدارها به‌عنوان خطا برخورد شده است)." #, python-format msgid "build finished with problems, %s warnings." -msgstr "" +msgstr "ساخت با مشکلاتی به پایان رسید، %s هشدار." #, python-format msgid "build succeeded, %s warnings." -msgstr "" +msgstr "ساخت با موفقیت به پایان رسید، %s هشدار." #, python-format msgid "node class %r is already registered, its visitors will be overridden" -msgstr "" +msgstr "کلاس گره‌ی %r هم‌اکنون ثبت شده است، بازدیدکننده‌های آن بازنویسی خواهند شد" #, python-format msgid "directive %r is already registered and will not be overridden" -msgstr "" +msgstr "دایرکتیو %r هم‌اکنون ثبت شده و بازنویسی نخواهد شد" #, python-format msgid "role %r is already registered and will not be overridden" -msgstr "" +msgstr "رول %r هم‌اکنون ثبت شده و بازنویسی نخواهد شد" #, python-format msgid "the %s extension does not declare if it is safe for parallel reading, assuming it isn't - please ask the extension author to check and make it explicit" -msgstr "" +msgstr "افزونه‌ی %s مشخص نکرده که برای خواندن موازی امن است یا نه، فرض بر ناامن بودن است - لطفاً از نویسنده‌ی افزونه بخواهید این موضوع را بررسی و صریح کند" #, python-format msgid "the %s extension is not safe for parallel reading" -msgstr "" +msgstr "افزونه‌ی %s برای خواندن موازی امن نیست" #, python-format msgid "the %s extension does not declare if it is safe for parallel writing, assuming it isn't - please ask the extension author to check and make it explicit" -msgstr "" +msgstr "افزونه‌ی %s مشخص نکرده که برای نوشتن موازی امن است یا نه، فرض بر ناامن بودن است - لطفاً از نویسنده‌ی افزونه بخواهید این موضوع را بررسی و صریح کند" #, python-format msgid "the %s extension is not safe for parallel writing" -msgstr "" +msgstr "افزونه‌ی %s برای نوشتن موازی امن نیست" #, python-format msgid "doing serial %s" -msgstr "" +msgstr "در حال انجام %s به‌صورت سریال" #, python-format msgid "config directory doesn't contain a conf.py file (%s)" -msgstr "" +msgstr "پوشه‌ی پیکربندی حاوی پرونده‌ی conf.py نیست (%s)" msgid "Invalid configuration value found: 'language = None'. Update your configuration to a valid language code. Falling back to 'en' (English)." -msgstr "" +msgstr "مقدار پیکربندی نامعتبری یافت شد: «language = None». پیکربندی خود را به یک کد زبان معتبر به‌روزرسانی کنید. بازگشت به «en» (انگلیسی)." #, python-format msgid "'%s' must be '0' or '1', got '%s'" -msgstr "" +msgstr "«%s» باید «۰» یا «۱» باشد، «%s» دریافت شد" #, python-format msgid "cannot override dictionary config setting %r, ignoring (use %r to set individual elements)" -msgstr "" +msgstr "نمی‌توان تنظیم پیکربندی دیکشنری‌ای %r را بازنویسی کرد، نادیده گرفته شد (برای تنظیم عناصر جداگانه از %r استفاده کنید)" #, python-format msgid "invalid number %r for config value %r, ignoring" -msgstr "" +msgstr "عدد نامعتبر %r برای مقدار پیکربندی %r، نادیده گرفته شد" #, python-format msgid "cannot override config setting %r with unsupported type, ignoring" -msgstr "" +msgstr "نمی‌توان تنظیم پیکربندی %r را با نوعی پشتیبانی‌نشده بازنویسی کرد، نادیده گرفته شد" #, python-format msgid "unknown config value %r in override, ignoring" -msgstr "" +msgstr "مقدار پیکربندی ناشناخته‌ی %r در بازنویسی، نادیده گرفته شد" #, python-format msgid "No such config value: %r" -msgstr "" +msgstr "چنین مقدار پیکربندی‌ای وجود ندارد: %r" #, python-format msgid "Config value %r already present" -msgstr "" +msgstr "مقدار پیکربندی %r هم‌اکنون وجود دارد" #, python-format msgid "cannot cache unpickleable configuration value: %r (because it contains a function, class, or module object)" -msgstr "" +msgstr "نمی‌توان مقدار پیکربندی پیکل‌ناپذیر %r را در نهانگاه ذخیره کرد (چون حاوی یک تابع، کلاس یا شیء ماژول است)" #, python-format msgid "There is a syntax error in your configuration file: %s\n" -msgstr "" +msgstr "خطای نحوی در پرونده‌ی پیکربندی شما وجود دارد: %s\n" msgid "The configuration file (or one of the modules it imports) called sys.exit()" -msgstr "" +msgstr "پرونده‌ی پیکربندی (یا یکی از ماژول‌هایی که ایمپورت می‌کند) تابع ()sys.exit را فراخوانی کرد" #, python-format msgid "" @@ -559,18 +560,21 @@ msgid "" "\n" "%s" msgstr "" +"خطایی برنامه‌ای در پرونده‌ی پیکربندی شما وجود دارد:\n" +"\n" +"%s" #, python-format msgid "Failed to convert %r to a frozenset" -msgstr "" +msgstr "تبدیل %r به frozenset شکست خورد" #, python-format msgid "Converting `source_suffix = %r` to `source_suffix = %r`." -msgstr "" +msgstr "در حال تبدیل «source_suffix = %r» به «source_suffix = %r»." #, python-format msgid "The config value `source_suffix' expects a dictionary, a string, or a list of strings. Got `%r' instead (type %s)." -msgstr "" +msgstr "مقدار پیکربندی «source_suffix» انتظار یک دیکشنری، رشته یا فهرستی از رشته‌ها را دارد. به‌جای آن «%r» (نوع %s) دریافت شد." #, python-format msgid "Section %s" @@ -578,369 +582,371 @@ msgstr "بخش %s" #, python-format msgid "Fig. %s" -msgstr "" +msgstr "شکل %s" #, python-format msgid "Table %s" -msgstr "" +msgstr "جدول %s" #, python-format msgid "Listing %s" -msgstr "" +msgstr "لیستینگ %s" #, python-brace-format msgid "The config value `{name}` has to be a one of {candidates}, but `{current}` is given." -msgstr "" +msgstr "مقدار پیکربندی «{name}» باید یکی از {candidates} باشد، اما «{current}» داده شده است." #, python-brace-format msgid "The config value `{name}' has type `{current.__name__}'; expected {permitted}." -msgstr "" +msgstr "مقدار پیکربندی «{name}» از نوع «{current.__name__}» است؛ {permitted} انتظار می‌رفت." #, python-brace-format msgid "The config value `{name}' has type `{current.__name__}', defaults to `{default.__name__}'." -msgstr "" +msgstr "مقدار پیکربندی «{name}» از نوع «{current.__name__}» است و مقدار پیش‌فرض آن «{default.__name__}» است." #, python-format msgid "primary_domain %r not found, ignored." -msgstr "" +msgstr "primary_domain %r پیدا نشد، نادیده گرفته شد." msgid "Sphinx now uses \"index\" as the master document by default. To keep pre-2.0 behaviour, set \"master_doc = 'contents'\"." -msgstr "" +msgstr "Sphinx اکنون به‌طور پیش‌فرض از «index» به‌عنوان سند اصلی استفاده می‌کند. برای حفظ رفتار پیش از نسخه‌ی ۲.۰، مقدار «master_doc = 'contents'» را تنظیم کنید." #, python-format msgid "Pygments lexer name %r is not known" -msgstr "" +msgstr "نام لکسر Pygments با نام %r شناخته‌شده نیست" #, python-format msgid "Lexing literal_block %r as \"%s\" resulted in an error at token: %r. Retrying in relaxed mode." -msgstr "" +msgstr "لکسینگ literal_block با نام %r به‌صورت «%s» در توکن %r به خطا انجامید. تلاش دوباره در حالت آزاد." #, python-format msgid "Theme configuration sections other than [theme] and [options] are not supported (tried to get a value from %r)." -msgstr "" +msgstr "بخش‌های پیکربندی پوسته غیر از [theme] و [options] پشتیبانی نمی‌شوند (تلاش برای دریافت مقدار از %r)." #, python-format msgid "setting %s.%s occurs in none of the searched theme configs" -msgstr "" +msgstr "تنظیم %s.%s در هیچ‌کدام از پیکربندی‌های پوسته‌ی جست‌وجوشده وجود ندارد" #, python-format msgid "unsupported theme option %r given" -msgstr "" +msgstr "گزینه‌ی پشتیبانی‌نشده‌ی پوسته‌ی %r داده شد" #, python-format msgid "file %r on theme path is not a valid zipfile or contains no theme" -msgstr "" +msgstr "پرونده‌ی %r در مسیر پوسته یک زیپ‌فایل معتبر نیست یا حاوی هیچ پوسته‌ای نیست" #, python-format msgid "no theme named %r found (missing theme.toml?)" -msgstr "" +msgstr "هیچ پوسته‌ای با نام %r پیدا نشد (theme.toml گم شده؟)" #, python-format msgid "The %r theme has circular inheritance" -msgstr "" +msgstr "پوسته‌ی %r دارای وراثت چرخه‌ای است" #, python-format msgid "The %r theme inherits from %r, which is not a loaded theme. Loaded themes are: %s" -msgstr "" +msgstr "پوسته‌ی %r از %r ارث‌بری می‌کند که پوسته‌ای بارشده نیست. پوسته‌های بارشده عبارت‌اند از: %s" #, python-format msgid "The %r theme has too many ancestors" -msgstr "" +msgstr "پوسته‌ی %r اجداد بیش از حد زیادی دارد" #, python-format msgid "no theme configuration file found in %r" -msgstr "" +msgstr "هیچ پرونده‌ی پیکربندی پوسته‌ای در %r پیدا نشد" #, python-format msgid "theme %r doesn't have the \"theme\" table" -msgstr "" +msgstr "پوسته‌ی %r جدول «theme» را ندارد" #, python-format msgid "The %r theme \"[theme]\" table is not a table" -msgstr "" +msgstr "جدول «[theme]» در پوسته‌ی %r یک جدول نیست" #, python-format msgid "The %r theme must define the \"theme.inherit\" setting" -msgstr "" +msgstr "پوسته‌ی %r باید تنظیم «theme.inherit» را تعریف کند" #, python-format msgid "The %r theme \"[options]\" table is not a table" -msgstr "" +msgstr "جدول «[options]» در پوسته‌ی %r یک جدول نیست" #, python-format msgid "The \"theme.pygments_style\" setting must be a table. Hint: \"%s\"" -msgstr "" +msgstr "تنظیم «theme.pygments_style» باید یک جدول باشد. راهنمایی: «%s»" #, python-format msgid "Event %r already present" -msgstr "" +msgstr "رویداد %r هم‌اکنون وجود دارد" #, python-format msgid "Unknown event name: %s" -msgstr "" +msgstr "نام رویداد ناشناخته: %s" #, python-format msgid "Handler %r for event %r threw an exception" -msgstr "" +msgstr "هندلر %r برای رویداد %r استثنایی پرتاب کرد" #, python-format msgid "" "multiple files found for the document \"%s\": %s\n" "Use %r for the build." msgstr "" +"چندین پرونده برای سند «%s» پیدا شد: %s\n" +"برای ساخت از %r استفاده کنید." #, python-format msgid "Ignored unreadable document %r." -msgstr "" +msgstr "سند غیرقابل‌خواندن %r نادیده گرفته شد." #, python-format msgid "Builder class %s has no \"name\" attribute" -msgstr "" +msgstr "کلاس سازنده‌ی %s ویژگی «name» ندارد" #, python-format msgid "Builder %r already exists (in module %s)" -msgstr "" +msgstr "سازنده‌ی %r هم‌اکنون وجود دارد (در ماژول %s)" #, python-format msgid "Builder name %s not registered or available through entry point" -msgstr "" +msgstr "نام سازنده‌ی %s ثبت نشده یا از طریق نقطه‌ی ورود در دسترس نیست" #, python-format msgid "Builder name %s not registered" -msgstr "" +msgstr "نام سازنده‌ی %s ثبت نشده است" #, python-format msgid "domain %s already registered" -msgstr "" +msgstr "دامنه‌ی %s هم‌اکنون ثبت شده است" #, python-format msgid "domain %s not yet registered" -msgstr "" +msgstr "دامنه‌ی %s هنوز ثبت نشده است" #, python-format msgid "The %r directive is already registered to domain %s" -msgstr "" +msgstr "دایرکتیو %r هم‌اکنون در دامنه‌ی %s ثبت شده است" #, python-format msgid "The %r role is already registered to domain %s" -msgstr "" +msgstr "رول %r هم‌اکنون در دامنه‌ی %s ثبت شده است" #, python-format msgid "The %r index is already registered to domain %s" -msgstr "" +msgstr "اندیس %r هم‌اکنون در دامنه‌ی %s ثبت شده است" #, python-format msgid "The %r object_type is already registered" -msgstr "" +msgstr "object_type با نام %r هم‌اکنون ثبت شده است" #, python-format msgid "The %r crossref_type is already registered" -msgstr "" +msgstr "crossref_type با نام %r هم‌اکنون ثبت شده است" #, python-format msgid "source_suffix %r is already registered" -msgstr "" +msgstr "source_suffix با نام %r هم‌اکنون ثبت شده است" #, python-format msgid "source_parser for %r is already registered" -msgstr "" +msgstr "source_parser برای %r هم‌اکنون ثبت شده است" #, python-format msgid "Source parser for %s not registered" -msgstr "" +msgstr "پارسر منبع برای %s ثبت نشده است" #, python-format msgid "Translator for %r already exists" -msgstr "" +msgstr "مترجم برای %r هم‌اکنون وجود دارد" #, python-format msgid "kwargs for add_node() must be a (visit, depart) function tuple: %r=%r" -msgstr "" +msgstr "آرگومان‌های کلیدواژه‌ای ()add_node باید یک تاپل تابعی (visit, depart) باشد: %r=%r" #, python-format msgid "enumerable_node %r already registered" -msgstr "" +msgstr "enumerable_node با نام %r هم‌اکنون ثبت شده است" #, python-format msgid "math renderer %s is already registered" -msgstr "" +msgstr "رندرکننده‌ی ریاضی %s هم‌اکنون ثبت شده است" #, python-format msgid "the extension %r was already merged with Sphinx since version %s; this extension is ignored." -msgstr "" +msgstr "افزونه‌ی %r از نسخه‌ی %s با Sphinx ادغام شده است؛ این افزونه نادیده گرفته می‌شود." msgid "Original exception:\n" -msgstr "" +msgstr "استثنای اصلی:\n" #, python-format msgid "Could not import extension %s" -msgstr "" +msgstr "ایمپورت افزونه‌ی %s ممکن نشد" #, python-format msgid "extension %r has no setup() function; is it really a Sphinx extension module?" -msgstr "" +msgstr "افزونه‌ی %r تابع ()setup ندارد؛ آیا این واقعاً یک ماژول افزونه‌ی Sphinx است؟" #, python-format msgid "The %s extension used by this project needs at least Sphinx v%s; it therefore cannot be built with this version." -msgstr "" +msgstr "افزونه‌ی %s که این پروژه استفاده می‌کند حداقل به Sphinx نسخه‌ی %s نیاز دارد؛ بنابراین نمی‌توان آن را با این نسخه ساخت." #, python-format msgid "extension %r returned an unsupported object from its setup() function; it should return None or a metadata dictionary" -msgstr "" +msgstr "افزونه‌ی %r شیئی پشتیبانی‌نشده از تابع ()setup خود بازگرداند؛ باید None یا دیکشنری فراداده بازگرداند" #, python-format msgid "`None` is not a valid filetype for %r." -msgstr "" +msgstr "«None» نوع پرونده‌ی معتبری برای %r نیست." #, python-format msgid "Common Vulnerabilities and Exposures; CVE %s" -msgstr "" +msgstr "آسیب‌پذیری‌ها و افشاگری‌های عمومی؛ CVE %s" #, python-format msgid "invalid CVE number %s" -msgstr "" +msgstr "شماره‌ی CVE نامعتبر %s" #, python-format msgid "Common Weakness Enumeration; CWE %s" -msgstr "" +msgstr "فهرست ضعف‌های عمومی؛ CWE %s" #, python-format msgid "invalid CWE number %s" -msgstr "" +msgstr "شماره‌ی CWE نامعتبر %s" #, python-format msgid "Python Enhancement Proposals; PEP %s" -msgstr "" +msgstr "پیشنهادهای بهبود پایتون؛ PEP %s" #, python-format msgid "invalid PEP number %s" -msgstr "" +msgstr "شماره‌ی PEP نامعتبر %s" #, python-format msgid "invalid RFC number %s" -msgstr "" +msgstr "شماره‌ی RFC نامعتبر %s" msgid "[source]" -msgstr "[source]" +msgstr "نمایش منبع" msgid "highlighting module code... " -msgstr "" +msgstr "در حال برجسته‌سازی کد ماژول... " msgid "[docs]" -msgstr "" +msgstr "[مستندات]" msgid "Module code" -msgstr "" +msgstr "کد ماژول" #, python-format msgid "

Source code for %s

" -msgstr "" +msgstr "

کد منبع برای %s

" msgid "Overview: module code" -msgstr "" +msgstr "بررسی اجمالی: کد ماژول" msgid "

All modules for which code is available

" -msgstr "" +msgstr "

تمام ماژول‌هایی که کد آن‌ها در دسترس است

" #, python-format msgid "hardcoded link %r could be replaced by an extlink (try using %r instead)" -msgstr "" +msgstr "پیوند سخت‌کدشده‌ی %r می‌تواند با یک extlink جایگزین شود (به‌جای آن از %r استفاده کنید)" #, python-format msgid "section \"%s\" gets labeled as \"%s\"" -msgstr "" +msgstr "بخش «%s» با برچسب «%s» علامت‌گذاری می‌شود" #, python-format msgid "duplicate label %s, other instance in %s" -msgstr "" +msgstr "برچسب تکراری %s، نمونه‌ی دیگر در %s" msgid "Link to this equation" -msgstr "" +msgstr "پیوند به این معادله" msgid "====================== slowest reading durations =======================" -msgstr "" +msgstr "====================== کندترین مدت‌زمان‌های خواندن =======================" #, python-format msgid "missing '+' or '-' in '%s' option." -msgstr "" +msgstr "«+» یا «-» در گزینه‌ی «%s» گم شده است." #, python-format msgid "'%s' is not a valid option." -msgstr "" +msgstr "«%s» گزینه‌ی معتبری نیست." #, python-format msgid "'%s' is not a valid pyversion option" -msgstr "" +msgstr "«%s» گزینه‌ی pyversion معتبری نیست" msgid "invalid TestCode type" -msgstr "" +msgstr "نوع TestCode نامعتبر" #, python-format msgid "Testing of doctests in the sources finished, look at the results in %(outdir)s/output.txt." -msgstr "" +msgstr "آزمایش doctestها در منابع به پایان رسید، نتایج را در %(outdir)s/output.txt ببینید." #, python-format msgid "no code/output in %s block at %s:%s" -msgstr "" +msgstr "هیچ کد/خروجی‌ای در بلوک %s در %s:%s نیست" #, python-format msgid "ignoring invalid doctest code: %r" -msgstr "" +msgstr "کد doctest نامعتبر نادیده گرفته شد: %r" #, python-format msgid "LaTeX command %r cannot be run (needed for math display), check the imgmath_latex setting" -msgstr "" +msgstr "دستور LaTeX با نام %r قابل اجرا نیست (برای نمایش ریاضی لازم است)، تنظیم imgmath_latex را بررسی کنید" #, python-format msgid "%s command %r cannot be run (needed for math display), check the imgmath_%s setting" -msgstr "" +msgstr "دستور %s با نام %r قابل اجرا نیست (برای نمایش ریاضی لازم است)، تنظیم imgmath_%s را بررسی کنید" #, python-format msgid "display latex %r: %s" -msgstr "" +msgstr "نمایش latex برای %r: %s" #, python-format msgid "inline latex %r: %s" -msgstr "" +msgstr "latex درون‌خطی برای %r: %s" #, python-format msgid "invalid regex %r in %s" -msgstr "" +msgstr "عبارت باقاعده‌ی نامعتبر %r در %s" #, python-format msgid "module %s could not be imported: %s" -msgstr "" +msgstr "ماژول %s ایمپورت نشد: %s" #, python-format msgid "the following modules are documented but were not specified in coverage_modules: %s" -msgstr "" +msgstr "ماژول‌های زیر مستند شده‌اند اما در coverage_modules مشخص نشده‌اند: %s" msgid "the following modules are specified in coverage_modules but were not documented" -msgstr "" +msgstr "ماژول‌های زیر در coverage_modules مشخص شده‌اند اما مستند نشده‌اند" #, python-format, python-brace-format msgid "Testing of coverage in the sources finished, look at the results in %(outdir)s{sep}python.txt." -msgstr "" +msgstr "آزمایش پوشش در منابع به پایان رسید، نتایج را در %(outdir)s{sep}python.txt ببینید." #, python-format msgid "invalid regex %r in coverage_c_regexes" -msgstr "" +msgstr "عبارت باقاعده‌ی نامعتبر %r در coverage_c_regexes" #, python-format msgid "undocumented c api: %s [%s] in file %s" -msgstr "" +msgstr "API سی مستندنشده: %s [%s] در پرونده‌ی %s" #, python-format msgid "undocumented python function: %s :: %s" -msgstr "" +msgstr "تابع پایتونی مستندنشده: %s :: %s" #, python-format msgid "undocumented python class: %s :: %s" -msgstr "" +msgstr "کلاس پایتونی مستندنشده: %s :: %s" #, python-format msgid "undocumented python method: %s :: %s :: %s" -msgstr "" +msgstr "متد پایتونی مستندنشده: %s :: %s :: %s" #, python-format msgid "" @@ -948,6 +954,9 @@ msgid "" "\n" "Traceback: %s" msgstr "" +"اجرای دستور تبدیل تصویر %r ممکن نشد. «sphinx.ext.imgconverter» به‌طور پیش‌فرض به ImageMagick نیاز دارد. اطمینان حاصل کنید نصب شده است، یا گزینه‌ی «image_converter» را روی یک دستور تبدیل سفارشی تنظیم کنید.\n" +"\n" +"ردگیری: %s" #, python-format msgid "" @@ -957,28 +966,33 @@ msgid "" "[stdout]\n" "%r" msgstr "" +"دستور convert با خطا خارج شد:\n" +"[stderr]\n" +"%r\n" +"[stdout]\n" +"%r" #, python-format msgid "convert command %r cannot be run, check the image_converter setting" -msgstr "" +msgstr "دستور convert با نام %r قابل اجرا نیست، تنظیم image_converter را بررسی کنید" msgid "Graphviz directive cannot have both content and a filename argument" -msgstr "" +msgstr "دایرکتیو Graphviz نمی‌تواند هم محتوا و هم آرگومان نام پرونده داشته باشد" #, python-format msgid "External Graphviz file %r not found or reading it failed" -msgstr "" +msgstr "پرونده‌ی خارجی Graphviz با نام %r پیدا نشد یا خواندن آن شکست خورد" msgid "Ignoring \"graphviz\" directive without content." -msgstr "" +msgstr "دایرکتیو «graphviz» بدون محتوا نادیده گرفته شد." #, python-format msgid "graphviz_dot executable path must be set! %r" -msgstr "" +msgstr "مسیر اجرایی graphviz_dot باید تنظیم شود! %r" #, python-format msgid "dot command %r cannot be run (needed for graphviz output), check the graphviz_dot setting" -msgstr "" +msgstr "دستور dot با نام %r قابل اجرا نیست (برای خروجی graphviz لازم است)، تنظیم graphviz_dot را بررسی کنید" #, python-format msgid "" @@ -988,6 +1002,11 @@ msgid "" "[stdout]\n" "%r" msgstr "" +"دستور dot با خطا خارج شد:\n" +"[stderr]\n" +"%r\n" +"[stdout]\n" +"%r" #, python-format msgid "" @@ -997,817 +1016,827 @@ msgid "" "[stdout]\n" "%r" msgstr "" +"دستور dot پرونده‌ی خروجی تولید نکرد:\n" +"[stderr]\n" +"%r\n" +"[stdout]\n" +"%r" #, python-format msgid "graphviz_output_format must be either 'png' or 'svg', but is %r" -msgstr "" +msgstr "graphviz_output_format باید «png» یا «svg» باشد، اما %r است" #, python-format msgid "dot code %r: %s" -msgstr "" +msgstr "کد dot در %r: %s" #, python-format msgid "[graph: %s]" -msgstr "" +msgstr "[گراف: %s]" msgid "[graph]" -msgstr "" +msgstr "[گراف]" msgid "Todo" -msgstr "" +msgstr "کارهای باقی‌مانده" #, python-format msgid "TODO entry found: %s" -msgstr "" +msgstr "ورودی کارهای باقی‌مانده پیدا شد: %s" msgid "<>" -msgstr "" +msgstr "<<ورودی اصلی>>" #, python-format msgid "(The <> is located in %s, line %d.)" -msgstr "" +msgstr "(<<ورودی اصلی>> در %s، سطر %d قرار دارد.)" msgid "original entry" -msgstr "" +msgstr "ورودی اصلی" msgid "non-whitespace stripped by dedent" -msgstr "" +msgstr "نویسه‌ی غیرفاصله توسط dedent حذف شد" #, python-format msgid "Invalid caption: %s" -msgstr "" +msgstr "زیرنویس نامعتبر: %s" #, python-format msgid "line number spec is out of range(1-%d): %r" -msgstr "" +msgstr "مشخصه‌ی شماره‌ی سطر خارج از محدوده‌ی (۱ تا %d) است: %r" #, python-format msgid "Cannot use both \"%s\" and \"%s\" options" -msgstr "" +msgstr "نمی‌توان هر دو گزینه‌ی «%s» و «%s» را استفاده کرد" #, python-format msgid "Include file '%s' not found or reading it failed" -msgstr "" +msgstr "پرونده‌ی include با نام «%s» پیدا نشد یا خواندن آن شکست خورد" #, python-format msgid "Encoding %r used for reading included file '%s' seems to be wrong, try giving an :encoding: option" -msgstr "" +msgstr "کدگذاری %r که برای خواندن پرونده‌ی include‌شده‌ی «%s» استفاده شده، اشتباه به‌نظر می‌رسد، گزینه‌ی :encoding: را امتحان کنید" #, python-format msgid "Object named %r not found in include file %r" -msgstr "" +msgstr "شیئی با نام %r در پرونده‌ی include شده‌ی %r پیدا نشد" msgid "Cannot use \"lineno-match\" with a disjoint set of \"lines\"" -msgstr "" +msgstr "نمی‌توان «lineno-match» را با مجموعه‌ای ناپیوسته از «lines» استفاده کرد" #, python-format msgid "Line spec %r: no lines pulled from include file %r" -msgstr "" +msgstr "مشخصه‌ی سطر %r: هیچ سطری از پرونده‌ی include شده‌ی %r دریافت نشد" msgid "\":file:\" option for csv-table directive now recognizes an absolute path as a relative path from source directory. Please update your document." -msgstr "" +msgstr "گزینه‌ی «:file:» برای دایرکتیو csv-table اکنون یک مسیر مطلق را به‌عنوان مسیری نسبی از پوشه‌ی منبع تشخیص می‌دهد. لطفاً سند خود را به‌روزرسانی کنید." #, python-format msgid "toctree glob pattern %r didn't match any documents" -msgstr "" +msgstr "الگوی glob در toctree با نام %r با هیچ سندی مطابقت نداشت" #, python-format msgid "toctree contains reference to excluded document %r" -msgstr "" +msgstr "toctree حاوی ارجاعی به سند حذف‌شده‌ی %r است" #, python-format msgid "toctree contains reference to nonexisting document %r" -msgstr "" +msgstr "toctree حاوی ارجاعی به سند ناموجود %r است" #, python-format msgid "duplicated entry found in toctree: %s" -msgstr "" +msgstr "ورودی تکراری در toctree پیدا شد: %s" msgid "Section author: " -msgstr "" +msgstr "نویسنده‌ی بخش: " msgid "Module author: " -msgstr "" +msgstr "نویسنده‌ی ماژول: " msgid "Code author: " -msgstr "" +msgstr "نویسنده‌ی کد: " msgid "Author: " -msgstr "" +msgstr "نویسنده: " msgid ".. acks content is not a list" -msgstr "" +msgstr "محتوای ‎.. acks یک فهرست نیست" msgid ".. hlist content is not a list" -msgstr "" +msgstr "محتوای ‎.. hlist یک فهرست نیست" #, python-format msgid "The overview file is in %(outdir)s." -msgstr "" +msgstr "پرونده‌ی بررسی اجمالی در %(outdir)s است." #, python-format msgid "no changes in version %s." -msgstr "هیچ تغیری در نسخه‌ی %s نبوده" +msgstr "تغییری در نسخه‌ی %s وجود ندارد." msgid "writing summary file..." -msgstr "" +msgstr "در حال نوشتن پرونده‌ی خلاصه..." msgid "Builtins" -msgstr "" +msgstr "توکارها" msgid "Module level" -msgstr "" +msgstr "سطح ماژول" msgid "copying source files..." -msgstr "" +msgstr "در حال کپی کردن پرونده‌های منبع..." #, python-format msgid "could not read %r for changelog creation" -msgstr "" +msgstr "خواندن %r برای ساخت گزارش تغییرات ممکن نشد" #, python-format msgid "The manual pages are in %(outdir)s." -msgstr "" +msgstr "صفحه‌های راهنما در %(outdir)s هستند." msgid "no \"man_pages\" config value found; no manual pages will be written" -msgstr "" +msgstr "هیچ مقدار پیکربندی «man_pages» پیدا نشد؛ هیچ صفحه‌ی راهنمایی نوشته نخواهد شد" msgid "writing" -msgstr "" +msgstr "در حال نوشتن" #, python-format msgid "\"man_pages\" config value references unknown document %s" -msgstr "" +msgstr "مقدار پیکربندی «man_pages» به سند ناشناخته‌ی %s ارجاع می‌دهد" #, python-format msgid "a suitable image for %s builder not found: %s (%s)" -msgstr "" +msgstr "تصویر مناسبی برای سازنده‌ی %s پیدا نشد: %s (%s)" #, python-format msgid "a suitable image for %s builder not found: %s" -msgstr "" +msgstr "تصویر مناسبی برای سازنده‌ی %s پیدا نشد: %s" msgid "building [mo]: " -msgstr "" +msgstr "در حال ساخت [mo]: " msgid "writing output... " -msgstr "" +msgstr "در حال نوشتن خروجی... " #, python-format msgid "all of %d po files" -msgstr "" +msgstr "همه‌ی %d پرونده‌ی po" #, python-format msgid "targets for %d po files that are specified" -msgstr "" +msgstr "هدف‌ها برای %d پرونده‌ی po که مشخص شده‌اند" #, python-format msgid "targets for %d po files that are out of date" -msgstr "" +msgstr "هدف‌ها برای %d پرونده‌ی po که قدیمی هستند" msgid "all source files" -msgstr "" +msgstr "همه‌ی پرونده‌های منبع" #, python-format msgid "file %r given on command line does not exist, " -msgstr "" +msgstr "پرونده‌ی %r که در خط فرمان داده شده وجود ندارد، " #, python-format msgid "file %r given on command line is not under the source directory, ignoring" -msgstr "" +msgstr "پرونده‌ی %r که در خط فرمان داده شده زیرمجموعه‌ی پوشه‌ی منبع نیست، نادیده گرفته شد" #, python-format msgid "file %r given on command line is not a valid document, ignoring" -msgstr "" +msgstr "پرونده‌ی %r که در خط فرمان داده شده سند معتبری نیست، نادیده گرفته شد" #, python-format msgid "%d source files given on command line" -msgstr "" +msgstr "%d پرونده‌ی منبع در خط فرمان داده شد" #, python-format msgid "targets for %d source files that are out of date" -msgstr "" +msgstr "هدف‌ها برای %d پرونده‌ی منبع که قدیمی هستند" #, python-format msgid "building [%s]: " -msgstr "" +msgstr "در حال ساخت [%s]: " msgid "looking for now-outdated files... " -msgstr "" +msgstr "در حال جست‌وجوی پرونده‌های اکنون قدیمی... " #, python-format msgid "%d found" -msgstr "" +msgstr "%d پیدا شد" msgid "none found" -msgstr "" +msgstr "هیچ‌کدام پیدا نشد" msgid "pickling environment" -msgstr "" +msgstr "در حال پیکل کردن محیط" msgid "checking consistency" -msgstr "" +msgstr "در حال بررسی یکپارچگی" msgid "no targets are out of date." -msgstr "" +msgstr "هیچ هدفی قدیمی نیست." msgid "updating environment: " -msgstr "" +msgstr "در حال به‌روزرسانی محیط: " #, python-format msgid "%s added, %s changed, %s removed" -msgstr "" +msgstr "%s افزوده شد، %s تغییر کرد، %s حذف شد" #, python-format msgid "Sphinx is unable to load the master document (%s) because it matches a built-in exclude pattern %r. Please move your master document to a different location." -msgstr "" +msgstr "Sphinx نمی‌تواند سند اصلی (%s) را بار کند چون با الگوی حذف توکار %r مطابقت دارد. لطفاً سند اصلی خود را به مکان دیگری منتقل کنید." #, python-format msgid "Sphinx is unable to load the master document (%s) because it matches an exclude pattern specified in conf.py, %r. Please remove this pattern from conf.py." -msgstr "" +msgstr "Sphinx نمی‌تواند سند اصلی (%s) را بار کند چون با الگوی حذف مشخص‌شده در conf.py، یعنی %r، مطابقت دارد. لطفاً این الگو را از conf.py حذف کنید." #, python-format msgid "Sphinx is unable to load the master document (%s) because it is not included in the custom include_patterns = %r. Ensure that a pattern in include_patterns matches the master document." -msgstr "" +msgstr "Sphinx نمی‌تواند سند اصلی (%s) را بار کند چون در include_patterns سفارشی، یعنی %r، گنجانده نشده است. مطمئن شوید یکی از الگوهای include_patterns با سند اصلی مطابقت دارد." #, python-format msgid "Sphinx is unable to load the master document (%s). The master document must be within the source directory or a subdirectory of it." -msgstr "" +msgstr "Sphinx نمی‌تواند سند اصلی (%s) را بار کند. سند اصلی باید درون پوشه‌ی منبع یا زیرپوشه‌ای از آن باشد." msgid "reading sources... " -msgstr "" +msgstr "در حال خواندن منابع... " #, python-format msgid "docnames to write: %s" -msgstr "" +msgstr "نام‌سندهای موردنیاز برای نوشتن: %s" msgid "no docnames to write!" -msgstr "" +msgstr "هیچ نام‌سندی برای نوشتن وجود ندارد!" msgid "preparing documents" -msgstr "" +msgstr "در حال آماده‌سازی سندها" msgid "copying assets" -msgstr "" +msgstr "در حال کپی کردن دارایی‌ها" #, python-format msgid "undecodable source characters, replacing with \"?\": %r" -msgstr "" +msgstr "نویسه‌های منبع کدگشایی‌ناپذیر، جایگزینی با «؟»: %r" #, python-format msgid "The ePub file is in %(outdir)s." -msgstr "" +msgstr "پرونده‌ی ePub در %(outdir)s است." msgid "writing nav.xhtml file..." -msgstr "" +msgstr "در حال نوشتن پرونده‌ی nav.xhtml..." msgid "conf value \"epub_language\" (or \"language\") should not be empty for EPUB3" -msgstr "" +msgstr "مقدار پیکربندی «epub_language» (یا «language») برای EPUB3 نباید خالی باشد" msgid "conf value \"epub_uid\" should be XML NAME for EPUB3" -msgstr "" +msgstr "مقدار پیکربندی «epub_uid» برای EPUB3 باید XML NAME باشد" msgid "conf value \"epub_title\" (or \"html_title\") should not be empty for EPUB3" -msgstr "" +msgstr "مقدار پیکربندی «epub_title» (یا «html_title») برای EPUB3 نباید خالی باشد" msgid "conf value \"epub_author\" should not be empty for EPUB3" -msgstr "" +msgstr "مقدار پیکربندی «epub_author» برای EPUB3 نباید خالی باشد" msgid "conf value \"epub_contributor\" should not be empty for EPUB3" -msgstr "" +msgstr "مقدار پیکربندی «epub_contributor» برای EPUB3 نباید خالی باشد" msgid "conf value \"epub_description\" should not be empty for EPUB3" -msgstr "" +msgstr "مقدار پیکربندی «epub_description» برای EPUB3 نباید خالی باشد" msgid "conf value \"epub_publisher\" should not be empty for EPUB3" -msgstr "" +msgstr "مقدار پیکربندی «epub_publisher» برای EPUB3 نباید خالی باشد" msgid "conf value \"epub_copyright\" (or \"copyright\")should not be empty for EPUB3" -msgstr "" +msgstr "مقدار پیکربندی «epub_copyright» (یا «copyright») برای EPUB3 نباید خالی باشد" msgid "conf value \"epub_identifier\" should not be empty for EPUB3" -msgstr "" +msgstr "مقدار پیکربندی «epub_identifier» برای EPUB3 نباید خالی باشد" msgid "conf value \"version\" should not be empty for EPUB3" -msgstr "" +msgstr "مقدار پیکربندی «version» برای EPUB3 نباید خالی باشد" #, python-format msgid "invalid css_file: %r, ignored" -msgstr "" +msgstr "css_file نامعتبر: %r، نادیده گرفته شد" #, python-format msgid "The XML files are in %(outdir)s." -msgstr "" +msgstr "پرونده‌های XML در %(outdir)s هستند." #, python-format msgid "error writing file %s: %s" -msgstr "" +msgstr "خطا در نوشتن پرونده‌ی %s: %s" #, python-format msgid "The pseudo-XML files are in %(outdir)s." -msgstr "" +msgstr "پرونده‌های شبه‌XML در %(outdir)s هستند." #, python-format msgid "The Texinfo files are in %(outdir)s." -msgstr "" +msgstr "پرونده‌های Texinfo در %(outdir)s هستند." msgid "" "\n" "Run 'make' in that directory to run these through makeinfo\n" "(use 'make info' here to do that automatically)." msgstr "" +"\n" +"دستور «make» را در آن پوشه اجرا کنید تا این‌ها از طریق makeinfo پردازش شوند\n" +"(برای انجام خودکار این کار از «make info» استفاده کنید)." msgid "no \"texinfo_documents\" config value found; no documents will be written" -msgstr "" +msgstr "هیچ مقدار پیکربندی «texinfo_documents» پیدا نشد؛ هیچ سندی نوشته نخواهد شد" #, python-format msgid "\"texinfo_documents\" config value references unknown document %s" -msgstr "" +msgstr "مقدار پیکربندی «texinfo_documents» به سند ناشناخته‌ی %s ارجاع می‌دهد" #, python-format msgid "processing %s" -msgstr "" +msgstr "در حال پردازش %s" msgid "resolving references..." -msgstr "" +msgstr "در حال حل ارجاع‌ها..." msgid " (in " -msgstr "" +msgstr " (در " msgid "copying images... " -msgstr "" +msgstr "در حال کپی کردن تصاویر... " #, python-format msgid "cannot copy image file %r: %s" -msgstr "" +msgstr "کپی کردن پرونده‌ی تصویر %r ممکن نشد: %s" msgid "copying Texinfo support files" -msgstr "" +msgstr "در حال کپی کردن پرونده‌های پشتیبانی Texinfo" #, python-format msgid "error writing file Makefile: %s" -msgstr "" +msgstr "خطا در نوشتن پرونده‌ی Makefile: %s" #, python-format msgid "duplicated ToC entry found: %s" -msgstr "" +msgstr "ورودی تکراری فهرست مطالب پیدا شد: %s" #, python-format msgid "cannot read image file %r: copying it instead" -msgstr "" +msgstr "خواندن پرونده‌ی تصویر %r ممکن نشد: به‌جای آن کپی می‌شود" #, python-format msgid "cannot write image file %r: %s" -msgstr "" +msgstr "نوشتن پرونده‌ی تصویر %r ممکن نشد: %s" msgid "Pillow not found - copying image files" -msgstr "" +msgstr "Pillow پیدا نشد - در حال کپی کردن پرونده‌های تصویر" msgid "writing mimetype file..." -msgstr "" +msgstr "در حال نوشتن پرونده‌ی mimetype..." msgid "writing META-INF/container.xml file..." -msgstr "" +msgstr "در حال نوشتن پرونده‌ی META-INF/container.xml..." msgid "writing content.opf file..." -msgstr "" +msgstr "در حال نوشتن پرونده‌ی content.opf..." #, python-format msgid "unknown mimetype for %s, ignoring" -msgstr "" +msgstr "mimetype ناشناخته برای %s، نادیده گرفته شد" msgid "node has an invalid level" -msgstr "" +msgstr "گره سطح نامعتبری دارد" msgid "writing toc.ncx file..." -msgstr "" +msgstr "در حال نوشتن پرونده‌ی toc.ncx..." #, python-format msgid "writing %s file..." -msgstr "" +msgstr "در حال نوشتن پرونده‌ی %s..." msgid "The dummy builder generates no files." -msgstr "" +msgstr "سازنده‌ی ساختگی هیچ پرونده‌ای تولید نمی‌کند." #, python-format msgid "The message catalogs are in %(outdir)s." -msgstr "" +msgstr "کاتالوگ‌های پیام در %(outdir)s هستند." #, python-format msgid "targets for %d template files" -msgstr "" +msgstr "هدف‌ها برای %d پرونده‌ی قالب" msgid "reading templates... " -msgstr "" +msgstr "در حال خواندن قالب‌ها... " msgid "writing message catalogs... " -msgstr "" +msgstr "در حال نوشتن کاتالوگ‌های پیام... " #, python-format msgid "The HTML page is in %(outdir)s." -msgstr "" +msgstr "صفحه‌ی HTML در %(outdir)s است." msgid "assembling single document" -msgstr "" +msgstr "در حال گردآوری سند تکی" msgid "writing additional files" -msgstr "" +msgstr "در حال نوشتن پرونده‌های اضافی" #, python-format msgid "Look for any errors in the above output or in %(outdir)s/output.txt" -msgstr "" +msgstr "به‌دنبال هر خطایی در خروجی بالا یا در %(outdir)s/output.txt بگردید" #, python-format msgid "broken link: %s (%s)" -msgstr "" +msgstr "پیوند خراب: %s (%s)" #, python-format msgid "Anchor '%s' not found" -msgstr "" +msgstr "لنگر «%s» پیدا نشد" #, python-format msgid "Failed to compile regex in linkcheck_allowed_redirects: %r %s" -msgstr "" +msgstr "کامپایل عبارت باقاعده در linkcheck_allowed_redirects شکست خورد: %r %s" #, python-format msgid "The text files are in %(outdir)s." -msgstr "" +msgstr "پرونده‌های متنی در %(outdir)s هستند." #, python-brace-format msgid "inconsistent footnote references in translated message. original: {0}, translated: {1}" -msgstr "" +msgstr "ارجاع‌های پانویس ناسازگار در پیام ترجمه‌شده. اصلی: {0}، ترجمه‌شده: {1}" #, python-brace-format msgid "inconsistent references in translated message. original: {0}, translated: {1}" -msgstr "" +msgstr "ارجاع‌های ناسازگار در پیام ترجمه‌شده. اصلی: {0}، ترجمه‌شده: {1}" #, python-brace-format msgid "inconsistent citation references in translated message. original: {0}, translated: {1}" -msgstr "" +msgstr "ارجاع‌های استناد ناسازگار در پیام ترجمه‌شده. اصلی: {0}، ترجمه‌شده: {1}" #, python-brace-format msgid "inconsistent term references in translated message. original: {0}, translated: {1}" -msgstr "" +msgstr "ارجاع‌های اصطلاح ناسازگار در پیام ترجمه‌شده. اصلی: {0}، ترجمه‌شده: {1}" #, python-format msgid "%b %d, %Y" -msgstr "" +msgstr "%d %b %Y" msgid "could not calculate translation progress!" -msgstr "" +msgstr "محاسبه‌ی پیشرفت ترجمه ممکن نشد!" msgid "no translated elements!" -msgstr "" +msgstr "هیچ عنصر ترجمه‌شده‌ای وجود ندارد!" #, python-format msgid "4 column based index found. It might be a bug of extensions you use: %r" -msgstr "" +msgstr "اندیس چهارستونی پیدا شد. ممکن است اشکالی از افزونه‌هایی باشد که استفاده می‌کنید: %r" #, python-format msgid "Footnote [%s] is not referenced." -msgstr "" +msgstr "پانویس [%s] ارجاع داده نشده است." msgid "Footnote [*] is not referenced." -msgstr "" +msgstr "پانویس [*] ارجاع داده نشده است." msgid "Footnote [#] is not referenced." -msgstr "" +msgstr "پانویس [#] ارجاع داده نشده است." msgid "Usage:" -msgstr "" +msgstr "کاربرد:" #, python-brace-format msgid "{0} [OPTIONS] []" -msgstr "" +msgstr "{0} [OPTIONS] []" msgid " The Sphinx documentation generator." -msgstr "" +msgstr " تولیدکننده‌ی مستندات Sphinx." msgid "Commands:" -msgstr "" +msgstr "دستورها:" msgid "Options" msgstr "گزینه‌ها" msgid "For more information, visit https://www.sphinx-doc.org/en/master/man/." -msgstr "" +msgstr "برای اطلاعات بیشتر، از https://www.sphinx-doc.org/en/master/man/ دیدن کنید." #, python-brace-format msgid "" "{0}: error: {1}\n" "Run '{0} --help' for information" msgstr "" +"{0}: خطا: {1}\n" +"برای اطلاعات بیشتر «{0} --help» را اجرا کنید" msgid " Manage documentation with Sphinx." -msgstr "" +msgstr " مدیریت مستندات با Sphinx." msgid "Show the version and exit." -msgstr "" +msgstr "نمایش نسخه و خروج." msgid "Show this message and exit." -msgstr "" +msgstr "نمایش این پیام و خروج." msgid "Logging" -msgstr "" +msgstr "گزارش‌گیری" msgid "Increase verbosity (can be repeated)" -msgstr "" +msgstr "افزایش پرگویی (قابل تکرار)" msgid "Only print errors and warnings." -msgstr "" +msgstr "فقط چاپ خطاها و هشدارها." msgid "No output at all" -msgstr "" +msgstr "بدون هیچ خروجی‌ای" msgid "" -msgstr "" +msgstr "" msgid "See 'sphinx --help'.\n" -msgstr "" +msgstr "به «sphinx --help» مراجعه کنید.\n" msgid "new config" -msgstr "" +msgstr "پیکربندی جدید" msgid "config changed" -msgstr "" +msgstr "پیکربندی تغییر کرد" msgid "extensions changed" -msgstr "" +msgstr "افزونه‌ها تغییر کردند" msgid "build environment version not current" -msgstr "" +msgstr "نسخه‌ی محیط ساخت به‌روز نیست" msgid "source directory has changed" -msgstr "" +msgstr "پوشه‌ی منبع تغییر کرده است" #, python-format msgid "The configuration has changed (1 option: %r)" -msgstr "" +msgstr "پیکربندی تغییر کرده است (۱ گزینه: %r)" #, python-format msgid "The configuration has changed (%d options: %s)" -msgstr "" +msgstr "پیکربندی تغییر کرده است (%d گزینه: %s)" #, python-format msgid "The configuration has changed (%d options: %s, ...)" -msgstr "" +msgstr "پیکربندی تغییر کرده است (%d گزینه: %s، ...)" msgid "This environment is incompatible with the selected builder, please choose another doctree directory." -msgstr "" +msgstr "این محیط با سازنده‌ی انتخاب‌شده ناسازگار است، لطفاً پوشه‌ی doctree دیگری انتخاب کنید." #, python-format msgid "Failed to scan documents in %s: %r" -msgstr "" +msgstr "پویش سندها در %s شکست خورد: %r" #, python-format msgid "Domain %r is not registered" -msgstr "" +msgstr "دامنه‌ی %r ثبت نشده است" msgid "document isn't included in any toctree" -msgstr "" +msgstr "سند در هیچ toctree‌ای گنجانده نشده است" msgid "self referenced toctree found. Ignored." -msgstr "" +msgstr "toctree خودارجاع پیدا شد. نادیده گرفته شد." #, python-format msgid "document is referenced in multiple toctrees: %s, selecting: %s <- %s" -msgstr "" +msgstr "سند در چندین toctree ارجاع داده شده است: %s، انتخاب: %s <- %s" #, python-format msgid "reading error: %s, %s" -msgstr "" +msgstr "خطای خواندن: %s، %s" #, python-format msgid "writing error: %s, %s" -msgstr "" +msgstr "خطای نوشتن: %s، %s" #, python-format msgid "locale_dir %s does not exist" -msgstr "" +msgstr "locale_dir با مقدار %s وجود ندارد" #, python-format msgid "Invalid Babel locale: %r." -msgstr "" +msgstr "لوکیل Babel نامعتبر: %r." #, python-format msgid "Invalid date format. Quote the string by single quote if you want to output it directly: %s" -msgstr "" +msgstr "قالب تاریخ نامعتبر است. اگر می‌خواهید آن را مستقیماً خروجی دهید، رشته را با تک‌کوتیشن نقل‌قول کنید: %s" #, python-format msgid "Problem in %s domain: field is supposed to use role '%s', but that role is not in the domain." -msgstr "" +msgstr "مشکل در دامنه‌ی %s: فرض بر این است که فیلد از رول «%s» استفاده کند، اما آن رول در دامنه وجود ندارد." #, python-format msgid "%r is deprecated for index entries (from entry %r). Use 'pair: %s' instead." -msgstr "" +msgstr "%r برای ورودی‌های اندیس منسوخ شده است (از ورودی %r). به‌جای آن از «pair: %s» استفاده کنید." #, python-format msgid "toctree contains ref to nonexisting file %r" -msgstr "" +msgstr "toctree حاوی ارجاعی به پرونده‌ی ناموجود %r است" #, python-format msgid "exception while evaluating only directive expression: %s" -msgstr "" +msgstr "استثنا هنگام ارزیابی عبارت دایرکتیو only: %s" msgid "skipped" -msgstr "" +msgstr "رد شد" msgid "failed" -msgstr "" +msgstr "شکست خورد" #, python-format msgid "Aborted attempted copy from %s to %s (the destination path has existing data)." -msgstr "" +msgstr "تلاش برای کپی از %s به %s لغو شد (مسیر مقصد دارای داده‌ی موجود است)." #, python-format msgid "unknown directive name: %s" -msgstr "" +msgstr "نام دایرکتیو ناشناخته: %s" #, python-format msgid "unknown role name: %s" -msgstr "" +msgstr "نام رول ناشناخته: %s" #, python-format msgid "unknown node type: %r" -msgstr "" +msgstr "نوع گره ناشناخته: %r" #, python-format msgid "Aborted attempted copy from rendered template %s to %s (the destination path has existing data)." -msgstr "" +msgstr "تلاش برای کپی از قالب رندرشده‌ی %s به %s لغو شد (مسیر مقصد دارای داده‌ی موجود است)." #, python-format msgid "Writing evaluated template result to %s" -msgstr "" +msgstr "در حال نوشتن نتیجه‌ی ارزیابی‌شده‌ی قالب در %s" #, python-format msgid "default role %s not found" -msgstr "" +msgstr "رول پیش‌فرض %s پیدا نشد" #, python-format msgid "inventory <%s> contains duplicate definitions of %s" -msgstr "" +msgstr "فهرست موجودی <%s> حاوی تعریف‌های تکراری از %s است" #, python-format msgid "inventory <%s> contains multiple definitions for %s" -msgstr "" +msgstr "فهرست موجودی <%s> حاوی چندین تعریف برای %s است" msgid "Footnotes" -msgstr "" +msgstr "پانویس‌ها" #, python-format msgid "[image: %s]" -msgstr "" +msgstr "[تصویر: %s]" msgid "[image]" -msgstr "" +msgstr "[تصویر]" msgid "Index" -msgstr "" +msgstr "اندیس" msgid "encountered title node not in section, topic, table, admonition or sidebar" -msgstr "" +msgstr "گره‌ی عنوانی برخورد شد که در بخش، موضوع، جدول، هشدار یا نوار کناری نیست" msgid "caption not inside a figure." -msgstr "" +msgstr "زیرنویس درون یک شکل نیست." #, python-format msgid "unimplemented node type: %r" -msgstr "" +msgstr "نوع گره پیاده‌سازی‌نشده: %r" #, python-format msgid "unknown %r toplevel_sectioning for class %r" -msgstr "" +msgstr "toplevel_sectioning ناشناخته‌ی %r برای کلاس %r" #, python-format msgid "no Babel option known for language %r" -msgstr "" +msgstr "هیچ گزینه‌ی Babel شناخته‌شده‌ای برای زبان %r وجود ندارد" msgid "too large :maxdepth:, ignored." -msgstr "" +msgstr ":maxdepth: بیش از حد بزرگ است، نادیده گرفته شد." #, python-format msgid "template %s not found; loading from legacy %s instead" -msgstr "" +msgstr "قالب %s پیدا نشد؛ به‌جای آن از %s قدیمی بار می‌شود" msgid "document title is not a single Text node" -msgstr "" +msgstr "عنوان سند یک گره‌ی متنی تکی نیست" #, python-format msgid "unsupported rubric heading level: %s" -msgstr "" +msgstr "سطح عنوان rubric پشتیبانی‌نشده: %s" msgid "both tabularcolumns and :widths: option are given. :widths: is ignored." -msgstr "" +msgstr "هم tabularcolumns و هم گزینه‌ی :widths: داده شده‌اند. :widths: نادیده گرفته می‌شود." #, python-format msgid "dimension unit %s is invalid. Ignored." -msgstr "" +msgstr "واحد ابعاد %s نامعتبر است. نادیده گرفته شد." #, python-format msgid "unknown index entry type %s found" -msgstr "" +msgstr "نوع ورودی اندیس ناشناخته‌ی %s پیدا شد" #, python-format msgid "Invalid math_eqref_format: %r" -msgstr "" +msgstr "math_eqref_format نامعتبر: %r" msgid "Link to this definition" -msgstr "" +msgstr "پیوند به این تعریف" #, python-format msgid "numfig_format is not defined for %s" -msgstr "" +msgstr "numfig_format برای %s تعریف نشده است" #, python-format msgid "Any IDs not assigned for %s node" -msgstr "" +msgstr "هیچ شناسه‌ای برای گره‌ی %s تخصیص نیافته است" msgid "Link to this term" -msgstr "" +msgstr "پیوند به این اصطلاح" msgid "Link to this heading" -msgstr "" +msgstr "پیوند به این عنوان" msgid "Link to this table" -msgstr "" +msgstr "پیوند به این جدول" msgid "Link to this code" -msgstr "" +msgstr "پیوند به این کد" msgid "Link to this image" -msgstr "" +msgstr "پیوند به این تصویر" msgid "Link to this toctree" -msgstr "" +msgstr "پیوند به این toctree" msgid "Could not obtain image size. :scale: option is ignored." -msgstr "" +msgstr "اندازه‌ی تصویر به‌دست نیامد. گزینه‌ی :scale: نادیده گرفته می‌شود." #, python-format msgid "%s %s" -msgstr "" +msgstr "%s %s" #, python-format msgid "duplicate label of equation %s, other instance in %s" -msgstr "" +msgstr "برچسب تکراری معادله‌ی %s، نمونه‌ی دیگر در %s" #, python-format msgid "%s() (built-in function)" -msgstr "" +msgstr "()%s (تابع توکار)" #, python-format msgid "%s() (%s method)" -msgstr "" +msgstr "()%s (متد %s)" #, python-format msgid "%s() (class)" -msgstr "" +msgstr "()%s (کلاس)" #, python-format msgid "%s (global variable or constant)" -msgstr "" +msgstr "%s (متغیر سراسری یا ثابت)" #, python-format msgid "%s (%s attribute)" -msgstr "" +msgstr "%s (ویژگی %s)" msgid "Arguments" -msgstr "" +msgstr "آرگومان‌ها" msgid "Throws" -msgstr "" +msgstr "پرتاب می‌کند" msgid "Returns" -msgstr "" +msgstr "بازمی‌گرداند" msgid "Return type" -msgstr "" +msgstr "نوع بازگشتی" #, python-format msgid "%s (module)" -msgstr "" +msgstr "%s (ماژول)" msgid "function" -msgstr "" +msgstr "تابع" msgid "method" -msgstr "" +msgstr "متد" msgid "class" -msgstr "" +msgstr "کلاس" msgid "data" -msgstr "" +msgstr "داده" msgid "attribute" -msgstr "" +msgstr "ویژگی" msgid "module" -msgstr "" +msgstr "ماژول" #, python-format msgid "duplicate %s description of %s, other %s in %s" -msgstr "" +msgstr "توضیح %s تکراری برای %s، %s دیگر در %s" #, python-format msgid "Added in version %s" @@ -1827,167 +1856,175 @@ msgstr "حذف شده در نسخه‌ی %s" #, python-format msgid "%s (directive)" -msgstr "" +msgstr "%s (دایرکتیو)" #, python-format msgid ":%s: (directive option)" -msgstr "" +msgstr ":%s: (گزینه‌ی دایرکتیو)" #, python-format msgid "%s (role)" -msgstr "" +msgstr "%s (رول)" msgid "directive" -msgstr "" +msgstr "دایرکتیو" msgid "directive-option" -msgstr "" +msgstr "گزینه‌ی دایرکتیو" msgid "role" -msgstr "" +msgstr "رول" #, python-format msgid "duplicate description of %s %s, other instance in %s" -msgstr "" +msgstr "توضیح تکراری %s %s، نمونه‌ی دیگر در %s" #, python-format msgid "duplicate citation %s, other instance in %s" -msgstr "" +msgstr "استناد تکراری %s، نمونه‌ی دیگر در %s" #, python-format msgid "Citation [%s] is not referenced." -msgstr "" +msgstr "استناد [%s] ارجاع داده نشده است." msgid "Attention" -msgstr "" +msgstr "توجه" msgid "Caution" -msgstr "" +msgstr "احتیاط" msgid "Danger" -msgstr "" +msgstr "خطر" msgid "Error" -msgstr "" +msgstr "خطا" msgid "Hint" -msgstr "" +msgstr "راهنمایی" msgid "Important" -msgstr "" +msgstr "مهم" msgid "Note" -msgstr "" +msgstr "نکته" msgid "See also" -msgstr "" +msgstr "همچنین ببینید" msgid "Tip" -msgstr "" +msgstr "نکته‌ی کاربردی" msgid "Warning" -msgstr "" +msgstr "هشدار" msgid "automatically insert docstrings from modules" -msgstr "" +msgstr "درج خودکار رشته‌های مستندساز از ماژول‌ها" msgid "automatically test code snippets in doctest blocks" -msgstr "" +msgstr "آزمایش خودکار قطعه‌کدها در بلوک‌های doctest" msgid "link between Sphinx documentation of different projects" -msgstr "" +msgstr "پیوند میان مستندات Sphinx پروژه‌های مختلف" msgid "write \"todo\" entries that can be shown or hidden on build" -msgstr "" +msgstr "نوشتن ورودی‌های «todo» که هنگام ساخت می‌توانند نمایش یا پنهان شوند" msgid "checks for documentation coverage" -msgstr "" +msgstr "بررسی پوشش مستندات" msgid "include math, rendered as PNG or SVG images" -msgstr "" +msgstr "گنجاندن ریاضیات، رندرشده به‌صورت تصاویر PNG یا SVG" msgid "include math, rendered in the browser by MathJax" -msgstr "" +msgstr "گنجاندن ریاضیات، رندرشده در مرورگر توسط MathJax" msgid "conditional inclusion of content based on config values" -msgstr "" +msgstr "گنجاندن شرطی محتوا بر اساس مقادیر پیکربندی" msgid "include links to the source code of documented Python objects" -msgstr "" +msgstr "گنجاندن پیوند به کد منبع اشیای پایتونی مستندشده" msgid "create .nojekyll file to publish the document on GitHub pages" -msgstr "" +msgstr "ساخت پرونده‌ی nojekyll. برای انتشار سند در GitHub Pages" msgid "Please enter a valid path name." -msgstr "" +msgstr "لطفاً یک نام مسیر معتبر وارد کنید." msgid "Please enter some text." -msgstr "" +msgstr "لطفاً متنی وارد کنید." #, python-format msgid "Please enter one of %s." -msgstr "" +msgstr "لطفاً یکی از %s را وارد کنید." msgid "Please enter either 'y' or 'n'." -msgstr "" +msgstr "لطفاً «y» یا «n» را وارد کنید." msgid "Please enter a file suffix, e.g. '.rst' or '.txt'." -msgstr "" +msgstr "لطفاً یک پسوند پرونده وارد کنید، مثلاً «rst.» یا «txt.»." #, python-format msgid "Welcome to the Sphinx %s quickstart utility." -msgstr "" +msgstr "به ابزار شروع سریع Sphinx نسخه‌ی %s خوش‌آمدید." msgid "" "Please enter values for the following settings (just press Enter to\n" "accept a default value, if one is given in brackets)." msgstr "" +"لطفاً مقادیری برای تنظیمات زیر وارد کنید (برای پذیرفتن مقدار پیش‌فرض،\n" +"در صورتی که در کروشه داده شده، فقط کلید Enter را بزنید)." #, python-format msgid "Selected root path: %s" -msgstr "" +msgstr "مسیر ریشه‌ی انتخاب‌شده: %s" msgid "Enter the root path for documentation." -msgstr "مسیر ریشه برای مستندات را وارد کنید." +msgstr "مسیر ریشه را برای مستندات وارد کنید." msgid "Root path for the documentation" msgstr "مسیر ریشه برای مستندات" msgid "Error: an existing conf.py has been found in the selected root path." -msgstr "" +msgstr "خطا: یک conf.py موجود در مسیر ریشه‌ی انتخاب‌شده پیدا شد." msgid "sphinx-quickstart will not overwrite existing Sphinx projects." -msgstr "" +msgstr "sphinx-quickstart پروژه‌های موجود Sphinx را بازنویسی نخواهد کرد." msgid "Please enter a new root path (or just Enter to exit)" -msgstr "" +msgstr "لطفاً یک مسیر ریشه‌ی جدید وارد کنید (یا برای خروج فقط Enter را بزنید)" msgid "" "You have two options for placing the build directory for Sphinx output.\n" "Either, you use a directory \"_build\" within the root path, or you separate\n" "\"source\" and \"build\" directories within the root path." msgstr "" +"دو گزینه برای قرار دادن پوشه‌ی ساخت خروجی Sphinx دارید.\n" +"یا از پوشه‌ی «‎_build» درون مسیر ریشه استفاده می‌کنید، یا پوشه‌های\n" +"«source» و «build» را درون مسیر ریشه از هم جدا می‌کنید." msgid "Separate source and build directories (y/n)" -msgstr "" +msgstr "جداسازی پوشه‌های source و build (y/n)" msgid "" "Inside the root directory, two more directories will be created; \"_templates\"\n" "for custom HTML templates and \"_static\" for custom stylesheets and other static\n" "files. You can enter another prefix (such as \".\") to replace the underscore." msgstr "" +"درون پوشه‌ی ریشه، دو پوشه‌ی دیگر ساخته خواهد شد؛ «‎_templates»\n" +"برای قالب‌های سفارشی HTML و «‎_static» برای شیوه‌نامه‌های سفارشی و دیگر پرونده‌های\n" +"ایستا. می‌توانید پیشوند دیگری (مانند «.») برای جایگزینی زیرخط وارد کنید." msgid "Name prefix for templates and static dir" -msgstr "" +msgstr "پیشوند نام برای پوشه‌های قالب و ایستا" msgid "The project name will occur in several places in the built documentation." -msgstr "" +msgstr "نام پروژه در چندین مکان از مستندات ساخته‌شده ظاهر خواهد شد." msgid "Project name" -msgstr "" +msgstr "نام پروژه" msgid "Author name(s)" -msgstr "" +msgstr "نام (های) نویسنده" msgid "" "Sphinx has the notion of a \"version\" and a \"release\" for the\n" @@ -1996,12 +2033,17 @@ msgid "" "something like 2.5.1 or 3.0a1. If you don't need this dual structure,\n" "just set both to the same value." msgstr "" +"Sphinx برای نرم‌افزار مفهوم «نسخه» (version) و «انتشار» (release)\n" +"را دارد. هر نسخه می‌تواند چندین انتشار داشته باشد. برای مثال، برای\n" +"پایتون، نسخه چیزی شبیه 2.5 یا 3.0 است، درحالی‌که انتشار\n" +"چیزی شبیه 2.5.1 یا 3.0a1 است. اگر به این ساختار دوگانه نیاز ندارید،\n" +"فقط هر دو را به یک مقدار یکسان تنظیم کنید." msgid "Project version" -msgstr "" +msgstr "نسخه‌ی پروژه" msgid "Project release" -msgstr "" +msgstr "انتشار پروژه" msgid "" "If the documents are to be written in a language other than English,\n" @@ -2011,17 +2053,25 @@ msgid "" "For a list of supported codes, see\n" "https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language." msgstr "" +"اگر قرار است سندها به زبانی غیر از انگلیسی نوشته شوند،\n" +"می‌توانید در اینجا زبانی را با کد زبان آن انتخاب کنید. سپس Sphinx\n" +"متنی را که تولید می‌کند به آن زبان ترجمه خواهد کرد.\n" +"\n" +"برای فهرست کدهای پشتیبانی‌شده، به\n" +"https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language مراجعه کنید." msgid "Project language" -msgstr "" +msgstr "زبان پروژه" msgid "" "The file name suffix for source files. Commonly, this is either \".txt\"\n" "or \".rst\". Only files with this suffix are considered documents." msgstr "" +"پسوند نام پرونده برای پرونده‌های منبع. معمولاً این پسوند یا «txt.»\n" +"یا «rst.» است. فقط پرونده‌های دارای این پسوند سند محسوب می‌شوند." msgid "Source file suffix" -msgstr "" +msgstr "پسوند پرونده‌ی منبع" msgid "" "One document is special in that it is considered the top node of the\n" @@ -2029,68 +2079,81 @@ msgid "" "of the documents. Normally, this is \"index\", but if your \"index\"\n" "document is a custom template, you can also set this to another filename." msgstr "" +"یک سند از این نظر خاص است که گره‌ی بالای «درخت محتویات»\n" +"در نظر گرفته می‌شود، یعنی ریشه‌ی ساختار سلسله‌مراتبی\n" +"سندها است. معمولاً این سند «index» است، اما اگر سند «index»\n" +"شما یک قالب سفارشی است، می‌توانید آن را به نام پرونده‌ی دیگری تنظیم کنید." msgid "Name of your master document (without suffix)" -msgstr "" +msgstr "نام سند اصلی شما (بدون پسوند)" #, python-format msgid "Error: the master file %s has already been found in the selected root path." -msgstr "" +msgstr "خطا: پرونده‌ی اصلی %s هم‌اکنون در مسیر ریشه‌ی انتخاب‌شده پیدا شده است." msgid "sphinx-quickstart will not overwrite the existing file." -msgstr "" +msgstr "sphinx-quickstart پرونده‌ی موجود را بازنویسی نخواهد کرد." msgid "Please enter a new file name, or rename the existing file and press Enter" -msgstr "" +msgstr "لطفاً یک نام پرونده‌ی جدید وارد کنید، یا پرونده‌ی موجود را تغییرنام دهید و Enter را بزنید" msgid "Indicate which of the following Sphinx extensions should be enabled:" -msgstr "" +msgstr "مشخص کنید کدام‌یک از افزونه‌های زیر Sphinx باید فعال شوند:" msgid "Note: imgmath and mathjax cannot be enabled at the same time. imgmath has been deselected." -msgstr "" +msgstr "نکته: imgmath و mathjax را نمی‌توان همزمان فعال کرد. imgmath از حالت انتخاب خارج شد." msgid "" "A Makefile and a Windows command file can be generated for you so that you\n" "only have to run e.g. `make html' instead of invoking sphinx-build\n" "directly." msgstr "" +"یک Makefile و یک پرونده‌ی دستور ویندوز می‌توانند برای شما تولید شوند تا\n" +"فقط لازم باشد مثلاً «make html» را اجرا کنید، به‌جای فراخوانی مستقیم\n" +"sphinx-build." msgid "Create Makefile? (y/n)" -msgstr "" +msgstr "ساخت Makefile؟ (y/n)" msgid "Create Windows command file? (y/n)" -msgstr "" +msgstr "ساخت پرونده‌ی دستور ویندوز؟ (y/n)" #, python-format msgid "Creating file %s." -msgstr "" +msgstr "در حال ساخت پرونده‌ی %s." #, python-format msgid "File %s already exists, skipping." -msgstr "" +msgstr "پرونده‌ی %s هم‌اکنون وجود دارد، رد شد." msgid "Finished: An initial directory structure has been created." -msgstr "" +msgstr "پایان یافت: یک ساختار پوشه‌ی اولیه ساخته شد." #, python-format msgid "" "You should now populate your master file %s and create other documentation\n" "source files. " msgstr "" +"اکنون باید پرونده‌ی اصلی %s خود را پر کنید و دیگر پرونده‌های منبع\n" +"مستندات را بسازید. " msgid "" "Use the Makefile to build the docs, like so:\n" " make builder" msgstr "" +"برای ساخت مستندات از Makefile استفاده کنید، به این شکل:\n" +" make builder" #, python-format msgid "" "Use the sphinx-build command to build the docs, like so:\n" " sphinx-build -b builder %s %s" msgstr "" +"برای ساخت مستندات از دستور sphinx-build استفاده کنید، به این شکل:\n" +" sphinx-build -b builder %s %s" msgid "where \"builder\" is one of the supported builders, e.g. html, latex or linkcheck." -msgstr "" +msgstr "که در آن «builder» یکی از سازنده‌های پشتیبانی‌شده است، مثلاً html، latex یا linkcheck." msgid "" "\n" @@ -2100,107 +2163,113 @@ msgid "" "project and then generates a complete documentation directory and sample\n" "Makefile to be used with sphinx-build.\n" msgstr "" +"\n" +"تولید پرونده‌های موردنیاز برای یک پروژه‌ی Sphinx.\n" +"\n" +"sphinx-quickstart ابزاری تعاملی است که چند پرسش درباره‌ی پروژه‌ی\n" +"شما می‌پرسد و سپس یک پوشه‌ی کامل مستندات و یک Makefile نمونه\n" +"برای استفاده با sphinx-build تولید می‌کند.\n" msgid "For more information, visit ." -msgstr "" +msgstr "برای اطلاعات بیشتر، از دیدن کنید." msgid "quiet mode" -msgstr "" +msgstr "حالت بی‌صدا" msgid "project root" -msgstr "" +msgstr "ریشه‌ی پروژه" msgid "Structure options" -msgstr "" +msgstr "گزینه‌های ساختار" msgid "if specified, separate source and build dirs" -msgstr "" +msgstr "اگر مشخص شود، پوشه‌های source و build جدا می‌شوند" msgid "if specified, create build dir under source dir" -msgstr "" +msgstr "اگر مشخص شود، پوشه‌ی build زیر پوشه‌ی source ساخته می‌شود" msgid "replacement for dot in _templates etc." -msgstr "" +msgstr "جایگزین نقطه در ‎_templates و غیره." msgid "Project basic options" -msgstr "" +msgstr "گزینه‌های پایه‌ی پروژه" msgid "project name" -msgstr "" +msgstr "نام پروژه" msgid "author names" -msgstr "" +msgstr "نام‌های نویسنده" msgid "version of project" -msgstr "" +msgstr "نسخه‌ی پروژه" msgid "release of project" -msgstr "" +msgstr "انتشار پروژه" msgid "document language" -msgstr "" +msgstr "زبان سند" msgid "source file suffix" -msgstr "" +msgstr "پسوند پرونده‌ی منبع" msgid "master document name" -msgstr "" +msgstr "نام سند اصلی" msgid "use epub" -msgstr "" +msgstr "استفاده از epub" msgid "Extension options" -msgstr "" +msgstr "گزینه‌های افزونه" #, python-format msgid "enable %s extension" -msgstr "" +msgstr "فعال‌سازی افزونه‌ی %s" msgid "enable arbitrary extensions" -msgstr "" +msgstr "فعال‌سازی افزونه‌های دلخواه" msgid "Makefile and Batchfile creation" -msgstr "" +msgstr "ساخت Makefile و Batchfile" msgid "create makefile" -msgstr "" +msgstr "ساخت makefile" msgid "do not create makefile" -msgstr "" +msgstr "makefile ساخته نشود" msgid "create batchfile" -msgstr "" +msgstr "ساخت batchfile" msgid "do not create batchfile" -msgstr "" +msgstr "batchfile ساخته نشود" msgid "use make-mode for Makefile/make.bat" -msgstr "" +msgstr "استفاده از حالت make برای Makefile/make.bat" msgid "Project templating" -msgstr "" +msgstr "قالب‌بندی پروژه" msgid "template directory for template files" -msgstr "" +msgstr "پوشه‌ی قالب برای پرونده‌های قالب" msgid "define a template variable" -msgstr "" +msgstr "تعریف یک متغیر قالب" msgid "\"quiet\" is specified, but any of \"project\" or \"author\" is not specified." -msgstr "" +msgstr "«quiet» مشخص شده، اما هیچ‌کدام از «project» یا «author» مشخص نشده است." msgid "Error: specified path is not a directory, or sphinx files already exist." -msgstr "" +msgstr "خطا: مسیر مشخص‌شده یک پوشه نیست، یا پرونده‌های sphinx هم‌اکنون وجود دارند." msgid "sphinx-quickstart only generate into a empty directory. Please specify a new root path." -msgstr "" +msgstr "sphinx-quickstart فقط در یک پوشه‌ی خالی تولید می‌کند. لطفاً یک مسیر ریشه‌ی جدید مشخص کنید." #, python-format msgid "Invalid template variable: %s" -msgstr "" +msgstr "متغیر قالب نامعتبر: %s" msgid "job number should be a positive number" -msgstr "" +msgstr "شماره‌ی کار باید عددی مثبت باشد" msgid "" "\n" @@ -2219,106 +2288,121 @@ msgid "" "By default, everything that is outdated is built. Output only for selected\n" "files can be built by specifying individual filenames.\n" msgstr "" +"\n" +"تولید مستندات از پرونده‌های منبع.\n" +"\n" +"sphinx-build مستندات را از پرونده‌های موجود در SOURCEDIR تولید می‌کند و آن را\n" +"در OUTPUTDIR قرار می‌دهد. برای تنظیمات پیکربندی به‌دنبال «conf.py»\n" +"در SOURCEDIR می‌گردد. ابزار «sphinx-quickstart» را می‌توان برای تولید پرونده‌های قالب،\n" +"از جمله «conf.py»، استفاده کرد\n" +"\n" +"sphinx-build می‌تواند مستندات را در قالب‌های مختلف بسازد. یک قالب با\n" +"مشخص کردن نام سازنده در خط فرمان انتخاب می‌شود؛ پیش‌فرض آن\n" +"HTML است. سازنده‌ها همچنین می‌توانند وظیفه‌های دیگری مرتبط با پردازش\n" +"مستندات انجام دهند.\n" +"\n" +"به‌طور پیش‌فرض، هرچه قدیمی است ساخته می‌شود. خروجی فقط برای پرونده‌های\n" +"انتخاب‌شده را می‌توان با مشخص کردن نام پرونده‌های جداگانه ساخت.\n" msgid "path to documentation source files" -msgstr "مسیر منابع مستندات" +msgstr "مسیر پرونده‌های منبع مستندات" msgid "path to output directory" -msgstr "" +msgstr "مسیر پوشه‌ی خروجی" msgid "(optional) a list of specific files to rebuild. Ignored if --write-all is specified" -msgstr "" +msgstr "(اختیاری) فهرستی از پرونده‌های مشخص برای بازسازی. اگر --write-all مشخص شود، نادیده گرفته می‌شود" msgid "general options" -msgstr "گزینه‌های عمومی" +msgstr "گزینه‌های کلی" msgid "builder to use (default: 'html')" -msgstr "" +msgstr "سازنده‌ای که استفاده می‌شود (پیش‌فرض: «html»)" msgid "run in parallel with N processes, when possible. 'auto' uses the number of CPU cores" -msgstr "" +msgstr "در صورت امکان، اجرا به‌صورت موازی با N فرایند. «auto» از تعداد هسته‌های پردازنده استفاده می‌کند" msgid "write all files (default: only write new and changed files)" -msgstr "" +msgstr "نوشتن همه‌ی پرونده‌ها (پیش‌فرض: فقط نوشتن پرونده‌های جدید و تغییریافته)" msgid "don't use a saved environment, always read all files" -msgstr "" +msgstr "استفاده نکردن از محیط ذخیره‌شده، همیشه خواندن همه‌ی پرونده‌ها" msgid "path options" -msgstr "" +msgstr "گزینه‌های مسیر" msgid "directory for doctree and environment files (default: OUTPUT_DIR/.doctrees)" -msgstr "" +msgstr "پوشه برای پرونده‌های doctree و محیط (پیش‌فرض: OUTPUT_DIR/.doctrees)" msgid "directory for the configuration file (conf.py) (default: SOURCE_DIR)" -msgstr "" +msgstr "پوشه برای پرونده‌ی پیکربندی (conf.py) (پیش‌فرض: SOURCE_DIR)" msgid "use no configuration file, only use settings from -D options" -msgstr "" +msgstr "استفاده نکردن از پرونده‌ی پیکربندی، فقط استفاده از تنظیمات گزینه‌های -D" msgid "override a setting in configuration file" -msgstr "" +msgstr "بازنویسی یک تنظیم در پرونده‌ی پیکربندی" msgid "pass a value into HTML templates" -msgstr "" +msgstr "ارسال یک مقدار به قالب‌های HTML" msgid "define tag: include \"only\" blocks with TAG" -msgstr "" +msgstr "تعریف تگ: گنجاندن بلوک‌های «only» دارای TAG" msgid "nitpicky mode: warn about all missing references" -msgstr "" +msgstr "حالت موشکافانه: هشدار درباره‌ی همه‌ی ارجاع‌های گم‌شده" msgid "console output options" -msgstr "" +msgstr "گزینه‌های خروجی کنسول" msgid "increase verbosity (can be repeated)" -msgstr "" +msgstr "افزایش پرگویی (قابل تکرار)" msgid "no output on stdout, just warnings on stderr" -msgstr "" +msgstr "بدون خروجی در stdout، فقط هشدارها در stderr" msgid "no output at all, not even warnings" -msgstr "" +msgstr "بدون هیچ خروجی‌ای، حتی هشدارها" msgid "do emit colored output (default: auto-detect)" -msgstr "" +msgstr "تولید خروجی رنگی (پیش‌فرض: تشخیص خودکار)" msgid "do not emit colored output (default: auto-detect)" -msgstr "" +msgstr "تولید نکردن خروجی رنگی (پیش‌فرض: تشخیص خودکار)" msgid "warning control options" -msgstr "" +msgstr "گزینه‌های کنترل هشدار" msgid "write warnings (and errors) to given file" -msgstr "" +msgstr "نوشتن هشدارها (و خطاها) در پرونده‌ی داده‌شده" msgid "turn warnings into errors" -msgstr "" +msgstr "تبدیل هشدارها به خطا" msgid "show full traceback on exception" -msgstr "" +msgstr "نمایش ردگیری کامل هنگام استثنا" msgid "run Pdb on exception" -msgstr "" +msgstr "اجرای Pdb هنگام استثنا" msgid "raise an exception on warnings" -msgstr "" +msgstr "پرتاب استثنا هنگام هشدارها" msgid "cannot combine -a option and filenames" -msgstr "" +msgstr "نمی‌توان گزینه‌ی -a و نام پرونده‌ها را ترکیب کرد" #, python-format msgid "cannot open warning file '%s': %s" -msgstr "" +msgstr "پرونده‌ی هشدار «%s» باز نشد: %s" msgid "-D option argument must be in the form name=value" -msgstr "" +msgstr "آرگومان گزینه‌ی -D باید به شکل name=value باشد" msgid "-A option argument must be in the form name=value" -msgstr "" +msgstr "آرگومان گزینه‌ی -A باید به شکل name=value باشد" msgid "Collapse sidebar" -msgstr "" +msgstr "جمع کردن نوار کناری" msgid "Table of Contents" msgstr "فهرست مطالب" @@ -2327,777 +2411,790 @@ msgid "Search" msgstr "جست‌وجو" msgid "Go" -msgstr "" +msgstr "برو" msgid "Show Source" msgstr "نمایش منبع" msgid "Contents" -msgstr "" +msgstr "محتویات" #, python-format msgid "Search %(docstitle)s" -msgstr "" +msgstr "جست‌وجوی %(docstitle)s" msgid "Overview" -msgstr "" +msgstr "بررسی اجمالی" msgid "Welcome! This is" -msgstr "خوش آمدید! این" +msgstr "خوش‌آمدید! این است" msgid "the documentation for" -msgstr "مستندات" +msgstr "مستندات برای" msgid "last updated" -msgstr "" +msgstr "آخرین به‌روزرسانی" msgid "Indices and tables:" -msgstr "" +msgstr "اندیس‌ها و جدول‌ها:" msgid "Complete Table of Contents" -msgstr "فهرست مطالب کامل" +msgstr "جدول کامل محتویات" msgid "lists all sections and subsections" -msgstr "" +msgstr "همه‌ی بخش‌ها و زیربخش‌ها را فهرست می‌کند" msgid "Search Page" -msgstr "" +msgstr "صفحه‌ی جست‌وجو" msgid "search this documentation" -msgstr "" +msgstr "این مستند را جست‌وجو کنید" msgid "Global Module Index" -msgstr "" +msgstr "اندیس ماژول‌های سراسری" msgid "quick access to all modules" -msgstr "" +msgstr "دسترسی سریع به همه‌ی ماژول‌ها" msgid "General Index" -msgstr "" +msgstr "اندیس کلی" msgid "all functions, classes, terms" -msgstr "" +msgstr "همه‌ی توابع، کلاس‌ها و اصطلاحات" msgid "This Page" msgstr "این صفحه" #, python-format msgid "Index – %(key)s" -msgstr "" +msgstr "اندیس – %(key)s" msgid "Full index on one page" -msgstr "" +msgstr "اندیس کامل در یک صفحه" msgid "Quick search" -msgstr "" +msgstr "جست‌وجوی سریع" msgid "Index pages by letter" -msgstr "" +msgstr "صفحه‌های اندیس بر اساس حرف" msgid "can be huge" -msgstr "" +msgstr "می‌تواند بسیار بزرگ باشد" msgid "Previous topic" -msgstr "" +msgstr "موضوع قبلی" msgid "previous chapter" -msgstr "" +msgstr "فصل قبلی" msgid "Next topic" -msgstr "" +msgstr "موضوع بعدی" msgid "next chapter" -msgstr "" +msgstr "فصل بعدی" msgid "Navigation" -msgstr "" +msgstr "پیمایش" #, python-format msgid "Search within %(docstitle)s" -msgstr "" +msgstr "جست‌وجو در %(docstitle)s" msgid "About these documents" -msgstr "درباره‌ی مستندات" +msgstr "درباره‌ی این مستندات" #, python-format msgid "© %(copyright_prefix)s %(copyright)s." -msgstr "" +msgstr "© %(copyright_prefix)s %(copyright)s." #, python-format msgid "Last updated on %(last_updated)s." -msgstr "" +msgstr "آخرین به‌روزرسانی در: %(last_updated)s." #, python-format msgid "Created using Sphinx %(sphinx_version)s." -msgstr "" +msgstr "ساخته‌شده با استفاده از Sphinx نسخه‌ی %(sphinx_version)s." msgid "" "Please activate JavaScript to enable the search\n" " functionality." msgstr "" +"لطفاً برای فعال کردن قابلیت جست‌وجو،\n" +" جاوااسکریپت را فعال کنید." msgid "" "Searching for multiple words only shows matches that contain\n" " all words." msgstr "" +"جست‌وجوی چند واژه فقط مواردی را نشان می‌دهد که حاوی\n" +" همه‌ی واژه‌ها باشند." msgid "search" -msgstr "" +msgstr "جست‌وجو" msgid "Hide Search Matches" -msgstr "" +msgstr "پنهان کردن نتایج جست‌وجو" msgid "Search Results" -msgstr "" +msgstr "نتایج جست‌وجو" msgid "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories." -msgstr "" +msgstr "جست‌وجوی شما با هیچ سندی مطابقت نداشت. لطفاً مطمئن شوید همه‌ی واژه‌ها به‌درستی نوشته شده‌اند و دسته‌های کافی را انتخاب کرده‌اید." #, python-brace-format msgid "Search finished, found one page matching the search query." msgid_plural "Search finished, found ${resultCount} pages matching the search query." -msgstr[0] "" -msgstr[1] "" +msgstr[0] "جست‌وجو به پایان رسید، یک صفحه با پرس‌وجوی جست‌وجو مطابقت داشت." +msgstr[1] "جست‌وجو به پایان رسید، ${resultCount} صفحه با پرس‌وجوی جست‌وجو مطابقت داشت." msgid "Searching" -msgstr "" +msgstr "در حال جست‌وجو" msgid "Preparing search..." -msgstr "" +msgstr "در حال آماده‌سازی جست‌وجو..." msgid ", in " -msgstr "" +msgstr "، در " #, python-format msgid "%(filename)s — %(docstitle)s" -msgstr "" +msgstr "%(filename)s — %(docstitle)s" #, python-format msgid "Changes in Version %(version)s — %(docstitle)s" -msgstr "" +msgstr "تغییرات در نسخه‌ی %(version)s — %(docstitle)s" #, python-format msgid "Automatically generated list of changes in version %(version)s" -msgstr "" +msgstr "فهرست خودکارتولیدشده‌ی تغییرات در نسخه‌ی %(version)s" msgid "Library changes" -msgstr "" +msgstr "تغییرات کتابخانه" msgid "C API changes" -msgstr "" +msgstr "تغییرات API سی" msgid "Other changes" -msgstr "" +msgstr "دیگر تغییرات" msgid "Expand sidebar" -msgstr "" +msgstr "باز کردن نوار کناری" msgid "Positional-only parameter separator (PEP 570)" -msgstr "" +msgstr "جداکننده‌ی پارامتر فقط-جایگاهی (PEP 570)" msgid "Keyword-only parameters separator (PEP 3102)" -msgstr "" +msgstr "جداکننده‌ی پارامترهای فقط-کلیدواژه‌ای (PEP 3102)" #, python-format msgid "%s() (in module %s)" -msgstr "" +msgstr "()%s (در ماژول %s)" #, python-format msgid "%s (in module %s)" -msgstr "" +msgstr "%s (در ماژول %s)" #, python-format msgid "%s (built-in variable)" -msgstr "" +msgstr "%s (متغیر توکار)" #, python-format msgid "%s (built-in class)" -msgstr "" +msgstr "%s (کلاس توکار)" #, python-format msgid "%s (class in %s)" -msgstr "" +msgstr "%s (کلاس در %s)" #, python-format msgid "%s() (%s class method)" -msgstr "" +msgstr "()%s (متد کلاس %s)" #, python-format msgid "%s() (%s static method)" -msgstr "" +msgstr "()%s (متد ایستای %s)" #, python-format msgid "%s (%s property)" -msgstr "" +msgstr "%s (پراپرتی %s)" #, python-format msgid "%s (type alias in %s)" -msgstr "" +msgstr "%s (مستعار نوع در %s)" msgid "Python Module Index" -msgstr "" +msgstr "اندیس ماژول‌های پایتون" msgid "modules" -msgstr "" +msgstr "ماژول‌ها" msgid "Deprecated" -msgstr "" +msgstr "منسوخ‌شده" msgid "exception" -msgstr "" +msgstr "استثنا" msgid "class method" -msgstr "" +msgstr "متد کلاس" msgid "static method" -msgstr "" +msgstr "متد ایستا" msgid "property" -msgstr "" +msgstr "پراپرتی" msgid "type alias" -msgstr "" +msgstr "مستعار نوع" #, python-format msgid "duplicate object description of %s, other instance in %s, use :no-index: for one of them" -msgstr "" +msgstr "توضیح شیء تکراری برای %s، نمونه‌ی دیگر در %s، برای یکی از آن‌ها از :no-index: استفاده کنید" #, python-format msgid "more than one target found for cross-reference %r: %s" -msgstr "" +msgstr "بیش از یک هدف برای ارجاع‌متقابل %r پیدا شد: %s" msgid " (deprecated)" -msgstr "" +msgstr " (منسوخ‌شده)" msgid "Parameters" -msgstr "" +msgstr "پارامترها" msgid "Variables" -msgstr "" +msgstr "متغیرها" msgid "Raises" -msgstr "" +msgstr "پرتاب می‌کند" msgid "Template Parameters" -msgstr "" +msgstr "پارامترهای قالب" #, python-format msgid "%s (C++ %s)" -msgstr "" +msgstr "%s (++C %s)" #, python-format msgid "" "Duplicate C++ declaration, also defined at %s:%s.\n" "Declaration is '.. cpp:%s:: %s'." msgstr "" +"اعلان تکراری ++C، همچنین در %s:%s تعریف شده است.\n" +"اعلان «.. cpp:%s:: %s» است." msgid "Return values" -msgstr "" +msgstr "مقادیر بازگشتی" msgid "union" -msgstr "" +msgstr "یونیون" msgid "member" -msgstr "" +msgstr "عضو" msgid "type" -msgstr "" +msgstr "نوع" msgid "concept" -msgstr "" +msgstr "مفهوم" msgid "enum" -msgstr "" +msgstr "enum" msgid "enumerator" -msgstr "" +msgstr "شمارشگر" msgid "function parameter" -msgstr "" +msgstr "پارامتر تابع" msgid "template parameter" -msgstr "" +msgstr "پارامتر قالب" #, python-format msgid "%s (C %s)" -msgstr "" +msgstr "%s (سی %s)" #, python-format msgid "" "Duplicate C declaration, also defined at %s:%s.\n" "Declaration is '.. c:%s:: %s'." msgstr "" +"اعلان تکراری سی، همچنین در %s:%s تعریف شده است.\n" +"اعلان «.. c:%s:: %s» است." msgid "variable" -msgstr "" +msgstr "متغیر" msgid "macro" -msgstr "" +msgstr "ماکرو" msgid "struct" -msgstr "" +msgstr "struct" #, python-format msgid "environment variable; %s" -msgstr "" +msgstr "متغیر محیطی؛ %s" #, python-format msgid "%s; configuration value" -msgstr "" +msgstr "%s؛ مقدار پیکربندی" msgid "Type" -msgstr "" +msgstr "نوع" msgid "Default" -msgstr "" +msgstr "پیش‌فرض" #, python-format msgid "Malformed option description %r, should look like \"opt\", \"-opt args\", \"--opt args\", \"/opt args\" or \"+opt args\"" -msgstr "" +msgstr "توضیح گزینه‌ی بدشکل %r، باید شبیه «opt»، «‎-opt args»، «‎--opt args»، «‎/opt args» یا «‎+opt args» باشد" #, python-format msgid "%s command line option" -msgstr "" +msgstr "گزینه‌ی خط فرمان %s" msgid "command line option" -msgstr "" +msgstr "گزینه‌ی خط فرمان" msgid "glossary term must be preceded by empty line" -msgstr "" +msgstr "اصطلاح واژه‌نامه باید قبل از آن یک سطر خالی داشته باشد" msgid "glossary terms must not be separated by empty lines" -msgstr "" +msgstr "اصطلاحات واژه‌نامه نباید با سطرهای خالی از هم جدا شوند" msgid "glossary seems to be misformatted, check indentation" -msgstr "" +msgstr "به‌نظر می‌رسد واژه‌نامه بدقالب است، تورفتگی را بررسی کنید" msgid "glossary term" -msgstr "" +msgstr "اصطلاح واژه‌نامه" msgid "grammar token" -msgstr "" +msgstr "توکن گرامری" msgid "reference label" -msgstr "" +msgstr "برچسب ارجاع" msgid "environment variable" -msgstr "" +msgstr "متغیر محیطی" msgid "program option" -msgstr "" +msgstr "گزینه‌ی برنامه" msgid "document" -msgstr "" +msgstr "سند" msgid "Module Index" -msgstr "" +msgstr "اندیس ماژول‌ها" #, python-format msgid "duplicate %s description of %s, other instance in %s" -msgstr "" +msgstr "توضیح %s تکراری برای %s، نمونه‌ی دیگر در %s" msgid "numfig is disabled. :numref: is ignored." -msgstr "" +msgstr "numfig غیرفعال است. :numref: نادیده گرفته می‌شود." #, python-format msgid "Failed to create a cross reference. Any number is not assigned: %s" -msgstr "" +msgstr "ساخت ارجاع‌متقابل شکست خورد. هیچ شماره‌ای تخصیص نیافته است: %s" #, python-format msgid "the link has no caption: %s" -msgstr "" +msgstr "پیوند زیرنویسی ندارد: %s" #, python-format msgid "invalid numfig_format: %s (%r)" -msgstr "" +msgstr "numfig_format نامعتبر: %s (%r)" #, python-format msgid "invalid numfig_format: %s" -msgstr "" +msgstr "numfig_format نامعتبر: %s" #, python-format msgid "undefined label: %r" -msgstr "" +msgstr "برچسب تعریف‌نشده: %r" #, python-format msgid "Failed to create a cross reference. A title or caption not found: %r" -msgstr "" +msgstr "ساخت ارجاع‌متقابل شکست خورد. هیچ عنوان یا زیرنویسی پیدا نشد: %r" #, python-format msgid "circular toctree references detected, ignoring: %s <- %s" -msgstr "" +msgstr "ارجاع‌های چرخه‌ای toctree شناسایی شد، نادیده گرفته شد: %s <- %s" #, python-format msgid "toctree contains reference to document %r that doesn't have a title: no link will be generated" -msgstr "" +msgstr "toctree حاوی ارجاعی به سند %r است که عنوانی ندارد: هیچ پیوندی تولید نخواهد شد" #, python-format msgid "toctree contains reference to non-included document %r" -msgstr "" +msgstr "toctree حاوی ارجاعی به سند گنجانده‌نشده‌ی %r است" #, python-format msgid "toctree contains reference to non-existing document %r" -msgstr "" +msgstr "toctree حاوی ارجاعی به سند ناموجود %r است" #, python-format msgid "see %s" -msgstr "" +msgstr "%s را ببینید" #, python-format msgid "see also %s" -msgstr "" +msgstr "همچنین %s را ببینید" #, python-format msgid "unknown index entry type %r" -msgstr "" +msgstr "نوع ورودی اندیس ناشناخته‌ی %r" msgid "Symbols" -msgstr "" +msgstr "نمادها" #, python-format msgid "image file not readable: %s" -msgstr "" +msgstr "پرونده‌ی تصویر خوانا نیست: %s" #, python-format msgid "image file %s not readable: %s" -msgstr "" +msgstr "پرونده‌ی تصویر %s خوانا نیست: %s" #, python-format msgid "download file not readable: %s" -msgstr "" +msgstr "پرونده‌ی دانلود خوانا نیست: %s" #, python-format msgid "%s is already assigned section numbers (nested numbered toctree?)" -msgstr "" +msgstr "به %s هم‌اکنون شماره‌های بخش تخصیص یافته است (toctree شماره‌گذاری‌شده‌ی تودرتو؟)" msgid "Interrupted!" -msgstr "" +msgstr "قطع شد!" msgid "reStructuredText markup error!" -msgstr "" +msgstr "خطای نشانه‌گذاری reStructuredText!" msgid "Encoding error!" -msgstr "" +msgstr "خطای کدگذاری!" msgid "Recursion error!" -msgstr "" +msgstr "خطای بازگشتی!" msgid "This can happen with very large or deeply nested source files. You can carefully increase the default Python recursion limit of 1,000 in conf.py with e.g.:" -msgstr "" +msgstr "این ممکن است با پرونده‌های منبع بسیار بزرگ یا عمیقاً تودرتو رخ دهد. می‌توانید با احتیاط محدودیت بازگشت پیش‌فرض پایتون، یعنی ۱۰۰۰، را در conf.py افزایش دهید، مثلاً با:" msgid "Starting debugger:" -msgstr "" +msgstr "در حال آغاز اشکال‌زدا:" msgid "The full traceback has been saved in:" -msgstr "" +msgstr "ردگیری کامل در این مسیر ذخیره شده است:" msgid "To report this error to the developers, please open an issue at . Thanks!" -msgstr "" +msgstr "برای گزارش این خطا به توسعه‌دهندگان، لطفاً یک گزارش مشکل در باز کنید. متشکریم!" msgid "Please also report this if it was a user error, so that a better error message can be provided next time." -msgstr "" +msgstr "لطفاً حتی اگر این خطا از کاربر بوده نیز آن را گزارش دهید، تا دفعه‌ی بعد پیام خطای بهتری ارائه شود." msgid "Could not determine the fallback text for the cross-reference. Might be a bug." -msgstr "" +msgstr "متن جایگزین برای ارجاع‌متقابل تعیین نشد. ممکن است اشکالی باشد." #, python-format msgid "more than one target found for 'any' cross-reference %r: could be %s" -msgstr "" +msgstr "بیش از یک هدف برای ارجاع‌متقابل «any» با نام %r پیدا شد: می‌تواند %s باشد" #, python-format msgid "%s:%s reference target not found: %s" -msgstr "" +msgstr "هدف ارجاع %s:%s پیدا نشد: %s" #, python-format msgid "%r reference target not found: %s" -msgstr "" +msgstr "هدف ارجاع %r پیدا نشد: %s" #, python-format msgid "Could not fetch remote image: %s [%s]" -msgstr "" +msgstr "دریافت تصویر دوردست ممکن نشد: %s [%s]" #, python-format msgid "Could not fetch remote image: %s [%d]" -msgstr "" +msgstr "دریافت تصویر دوردست ممکن نشد: %s [%d]" #, python-format msgid "Unknown image format: %s..." -msgstr "" +msgstr "قالب تصویر ناشناخته: %s..." #, python-format msgid "The HTML pages are in %(outdir)s." -msgstr "" +msgstr "صفحه‌های HTML در %(outdir)s هستند." #, python-format msgid "Failed to read build info file: %r" -msgstr "" +msgstr "خواندن پرونده‌ی اطلاعات ساخت شکست خورد: %r" msgid "build_info mismatch, copying .buildinfo to .buildinfo.bak" -msgstr "" +msgstr "عدم تطابق build_info، در حال کپی کردن buildinfo. به buildinfo.bak." msgid "building [html]: " -msgstr "" +msgstr "در حال ساخت [html]: " #, python-format msgid "template %s has been changed since the previous build, all docs will be rebuilt" -msgstr "" +msgstr "قالب %s از ساخت پیشین تغییر کرده است، همه‌ی سندها بازسازی خواهند شد" msgid "index" -msgstr "" +msgstr "اندیس" #, python-format msgid "Logo of %s" -msgstr "" +msgstr "لوگوی %s" msgid "next" -msgstr "" +msgstr "بعدی" msgid "previous" -msgstr "" +msgstr "قبلی" msgid "generating indices" -msgstr "" +msgstr "در حال تولید اندیس‌ها" msgid "writing additional pages" -msgstr "" +msgstr "در حال نوشتن صفحه‌های اضافی" #, python-format msgid "cannot copy image file '%s': %s" -msgstr "" +msgstr "کپی کردن پرونده‌ی تصویر «%s» ممکن نشد: %s" msgid "copying downloadable files... " -msgstr "" +msgstr "در حال کپی کردن پرونده‌های قابل‌دانلود... " #, python-format msgid "cannot copy downloadable file %r: %s" -msgstr "" +msgstr "کپی کردن پرونده‌ی قابل‌دانلود %r ممکن نشد: %s" #, python-format msgid "Failed to copy a file in the theme's 'static' directory: %s: %r" -msgstr "" +msgstr "کپی کردن پرونده‌ای در پوشه‌ی «static» پوسته شکست خورد: %s: %r" #, python-format msgid "Failed to copy a file in html_static_file: %s: %r" -msgstr "" +msgstr "کپی کردن پرونده‌ای در html_static_file شکست خورد: %s: %r" msgid "copying static files" -msgstr "" +msgstr "در حال کپی کردن پرونده‌های ایستا" #, python-format msgid "cannot copy static file %r" -msgstr "" +msgstr "کپی کردن پرونده‌ی ایستای %r ممکن نشد" msgid "copying extra files" -msgstr "" +msgstr "در حال کپی کردن پرونده‌های اضافی" #, python-format msgid "cannot copy extra file %r" -msgstr "" +msgstr "کپی کردن پرونده‌ی اضافی %r ممکن نشد" #, python-format msgid "Failed to write build info file: %r" -msgstr "" +msgstr "نوشتن پرونده‌ی اطلاعات ساخت شکست خورد: %r" msgid "search index couldn't be loaded, but not all documents will be built: the index will be incomplete." -msgstr "" +msgstr "اندیس جست‌وجو بار نشد، اما همه‌ی سندها ساخته نخواهند شد: اندیس ناقص خواهد بود." #, python-format msgid "page %s matches two patterns in html_sidebars: %r and %r" -msgstr "" +msgstr "صفحه‌ی %s با دو الگو در html_sidebars مطابقت دارد: %r و %r" #, python-format msgid "a Unicode error occurred when rendering the page %s. Please make sure all config values that contain non-ASCII content are Unicode strings." -msgstr "" +msgstr "هنگام رندر صفحه‌ی %s خطای یونیکد رخ داد. لطفاً مطمئن شوید همه‌ی مقادیر پیکربندی حاوی محتوای غیرASCII، رشته‌های یونیکد هستند." #, python-format msgid "" "An error happened in rendering the page %s.\n" "Reason: %r" msgstr "" +"خطایی هنگام رندر صفحه‌ی %s رخ داد.\n" +"دلیل: %r" msgid "dumping object inventory" -msgstr "" +msgstr "در حال برون‌ریزی فهرست موجودی اشیا" #, python-format msgid "dumping search index in %s" -msgstr "" +msgstr "در حال برون‌ریزی اندیس جست‌وجو در %s" #, python-format msgid "invalid js_file: %r, ignored" -msgstr "" +msgstr "js_file نامعتبر: %r، نادیده گرفته شد" msgid "Many math_renderers are registered. But no math_renderer is selected." -msgstr "" +msgstr "چندین math_renderer ثبت شده‌اند. اما هیچ math_renderer‌ای انتخاب نشده است." #, python-format msgid "Unknown math_renderer %r is given." -msgstr "" +msgstr "math_renderer ناشناخته‌ی %r داده شده است." #, python-format msgid "html_extra_path entry %r is placed inside outdir" -msgstr "" +msgstr "ورودی html_extra_path با نام %r درون outdir قرار دارد" #, python-format msgid "html_extra_path entry %r does not exist" -msgstr "" +msgstr "ورودی html_extra_path با نام %r وجود ندارد" #, python-format msgid "html_static_path entry %r is placed inside outdir" -msgstr "" +msgstr "ورودی html_static_path با نام %r درون outdir قرار دارد" #, python-format msgid "html_static_path entry %r does not exist" -msgstr "" +msgstr "ورودی html_static_path با نام %r وجود ندارد" #, python-format msgid "logo file %r does not exist" -msgstr "" +msgstr "پرونده‌ی لوگوی %r وجود ندارد" #, python-format msgid "favicon file %r does not exist" -msgstr "" +msgstr "پرونده‌ی favicon با نام %r وجود ندارد" #, python-format msgid "Values in 'html_sidebars' must be a list of strings. At least one pattern has a string value: %s. Change to `html_sidebars = %r`." -msgstr "" +msgstr "مقادیر در «html_sidebars» باید فهرستی از رشته‌ها باشند. حداقل یک الگو مقدار رشته‌ای دارد: %s. به «html_sidebars = %r» تغییر دهید." msgid "HTML 4 is no longer supported by Sphinx. (\"html4_writer=True\" detected in configuration options)" -msgstr "" +msgstr "HTML ۴ دیگر توسط Sphinx پشتیبانی نمی‌شود. («html4_writer=True» در گزینه‌های پیکربندی شناسایی شد)" #, python-format msgid "%s %s documentation" -msgstr "" +msgstr "مستندات %s %s" msgid "failed to read broken build info file (unknown version)" -msgstr "" +msgstr "خواندن پرونده‌ی اطلاعات ساخت خراب شکست خورد (نسخه‌ی ناشناخته)" msgid "failed to read broken build info file (missing config entry)" -msgstr "" +msgstr "خواندن پرونده‌ی اطلاعات ساخت خراب شکست خورد (ورودی پیکربندی گم‌شده)" msgid "failed to read broken build info file (missing tags entry)" -msgstr "" +msgstr "خواندن پرونده‌ی اطلاعات ساخت خراب شکست خورد (ورودی تگ‌ها گم‌شده)" #, python-format msgid "The LaTeX files are in %(outdir)s." -msgstr "" +msgstr "پرونده‌های LaTeX در %(outdir)s هستند." msgid "" "\n" "Run 'make' in that directory to run these through (pdf)latex\n" "(use `make latexpdf' here to do that automatically)." msgstr "" +"\n" +"دستور «make» را در آن پوشه اجرا کنید تا این‌ها از طریق (pdf)latex پردازش شوند\n" +"(برای انجام خودکار این کار از «make latexpdf» استفاده کنید)." msgid "no \"latex_documents\" config value found; no documents will be written" -msgstr "" +msgstr "هیچ مقدار پیکربندی «latex_documents» پیدا نشد؛ هیچ سندی نوشته نخواهد شد" #, python-format msgid "\"latex_documents\" config value references unknown document %s" -msgstr "" +msgstr "مقدار پیکربندی «latex_documents» به سند ناشناخته‌ی %s ارجاع می‌دهد" msgid "Release" -msgstr "" +msgstr "انتشار" msgid "copying TeX support files" -msgstr "" +msgstr "در حال کپی کردن پرونده‌های پشتیبانی TeX" msgid "copying additional files" -msgstr "" +msgstr "در حال کپی کردن پرونده‌های اضافی" #, python-format msgid "Unknown configure key: latex_elements[%r], ignored." -msgstr "" +msgstr "کلید پیکربندی ناشناخته: latex_elements[%r]، نادیده گرفته شد." #, python-format msgid "Unknown theme option: latex_theme_options[%r], ignored." -msgstr "" +msgstr "گزینه‌ی پوسته‌ی ناشناخته: latex_theme_options[%r]، نادیده گرفته شد." msgid "Failed to get a docname!" -msgstr "" +msgstr "دریافت نام‌سند شکست خورد!" #, python-format msgid "Failed to get a docname for source %r!" -msgstr "" +msgstr "دریافت نام‌سند برای منبع %r شکست خورد!" #, python-format msgid "No footnote was found for given reference node %r" -msgstr "" +msgstr "هیچ پانویسی برای گره‌ی ارجاع داده‌شده‌ی %r پیدا نشد" #, python-format msgid "%r doesn't have \"theme\" setting" -msgstr "" +msgstr "%r تنظیم «theme» را ندارد" #, python-format msgid "%r doesn't have \"%s\" setting" -msgstr "" +msgstr "%r تنظیم «%s» را ندارد" msgid "continued from previous page" -msgstr "" +msgstr "ادامه از صفحه‌ی قبل" msgid "continues on next page" -msgstr "" +msgstr "در صفحه‌ی بعد ادامه دارد" msgid "Non-alphabetical" -msgstr "" +msgstr "غیرالفبایی" msgid "Numbers" -msgstr "" +msgstr "اعداد" msgid "page" -msgstr "" +msgstr "صفحه" msgid "Keyword Arguments" -msgstr "" +msgstr "آرگومان‌های کلیدواژه‌ای" #, python-format msgid "invalid value set (missing closing brace): %s" -msgstr "" +msgstr "مجموعه‌مقدار نامعتبر (آکولاد بسته گم‌شده): %s" #, python-format msgid "invalid value set (missing opening brace): %s" -msgstr "" +msgstr "مجموعه‌مقدار نامعتبر (آکولاد باز گم‌شده): %s" #, python-format msgid "malformed string literal (missing closing quote): %s" -msgstr "" +msgstr "لفظ رشته‌ای بدشکل (نقل‌قول بسته گم‌شده): %s" #, python-format msgid "malformed string literal (missing opening quote): %s" -msgstr "" +msgstr "لفظ رشته‌ای بدشکل (نقل‌قول باز گم‌شده): %s" msgid "Example" -msgstr "" +msgstr "مثال" msgid "Examples" -msgstr "" +msgstr "مثال‌ها" msgid "Notes" -msgstr "" +msgstr "یادداشت‌ها" msgid "Other Parameters" -msgstr "" +msgstr "دیگر پارامترها" msgid "Receives" -msgstr "" +msgstr "دریافت می‌کند" msgid "References" -msgstr "" +msgstr "مراجع" msgid "Warns" -msgstr "" +msgstr "هشدار می‌دهد" msgid "Yields" -msgstr "" +msgstr "بازده می‌دهد" #, python-format msgid "autosummary references excluded document %r. Ignored." -msgstr "" +msgstr "autosummary به سند حذف‌شده‌ی %r ارجاع می‌دهد. نادیده گرفته شد." #, python-format msgid "autosummary: stub file not found %r. Check your autosummary_generate setting." -msgstr "" +msgstr "autosummary: پرونده‌ی stub با نام %r پیدا نشد. تنظیم autosummary_generate خود را بررسی کنید." msgid "A captioned autosummary requires :toctree: option. ignored." -msgstr "" +msgstr "یک autosummary دارای زیرنویس به گزینه‌ی :toctree: نیاز دارد. نادیده گرفته شد." #, python-format msgid "" @@ -3105,39 +3202,44 @@ msgid "" "Possible hints:\n" "%s" msgstr "" +"autosummary: ایمپورت %s شکست خورد.\n" +"راهنمایی‌های احتمالی:\n" +"%s" #, python-format msgid "failed to parse name %s" -msgstr "" +msgstr "پارس کردن نام %s شکست خورد" #, python-format msgid "failed to import object %s" -msgstr "" +msgstr "ایمپورت شیء %s شکست خورد" #, python-format msgid "Summarised items should not include the current module. Replace %r with %r." -msgstr "" +msgstr "آیتم‌های خلاصه‌شده نباید شامل ماژول فعلی باشند. %r را با %r جایگزین کنید." #, python-format msgid "autosummary_generate: file not found: %s" -msgstr "" +msgstr "autosummary_generate: پرونده پیدا نشد: %s" msgid "autosummary generates .rst files internally. But your source_suffix does not contain .rst. Skipped." -msgstr "" +msgstr "autosummary به‌صورت درونی پرونده‌های rst. تولید می‌کند. اما source_suffix شما حاوی rst. نیست. رد شد." #, python-format msgid "" "autosummary: failed to determine %r to be documented, the following exception was raised:\n" "%s" msgstr "" +"autosummary: تعیین %r برای مستندسازی شکست خورد، استثنای زیر پرتاب شد:\n" +"%s" #, python-format msgid "[autosummary] generating autosummary for: %s" -msgstr "" +msgstr "[autosummary] در حال تولید autosummary برای: %s" #, python-format msgid "[autosummary] writing to %s" -msgstr "" +msgstr "[autosummary] در حال نوشتن در %s" #, python-format msgid "" @@ -3145,6 +3247,9 @@ msgid "" "Possible hints:\n" "%s" msgstr "" +"[autosummary] ایمپورت %s شکست خورد.\n" +"راهنمایی‌های احتمالی:\n" +"%s" msgid "" "\n" @@ -3159,35 +3264,46 @@ msgid "" "\n" " pydoc sphinx.ext.autosummary\n" msgstr "" +"\n" +"تولید ReStructuredText با استفاده از دایرکتیوهای autosummary.\n" +"\n" +"sphinx-autogen یک فرانت‌اند برای sphinx.ext.autosummary.generate است. این ابزار\n" +"پرونده‌های reStructuredText را از دایرکتیوهای autosummary موجود در\n" +"پرونده‌های ورودی داده‌شده تولید می‌کند.\n" +"\n" +"قالب دایرکتیو autosummary در ماژول پایتون\n" +"``sphinx.ext.autosummary`` مستند شده است و با دستور زیر قابل خواندن است::\n" +"\n" +" pydoc sphinx.ext.autosummary\n" msgid "source files to generate rST files for" -msgstr "" +msgstr "پرونده‌های منبع برای تولید پرونده‌های rST" msgid "directory to place all output in" -msgstr "" +msgstr "پوشه‌ای برای قرار دادن تمام خروجی" #, python-format msgid "default suffix for files (default: %(default)s)" -msgstr "" +msgstr "پسوند پیش‌فرض برای پرونده‌ها (پیش‌فرض: %(default)s)" #, python-format msgid "custom template directory (default: %(default)s)" -msgstr "" +msgstr "پوشه‌ی قالب سفارشی (پیش‌فرض: %(default)s)" #, python-format msgid "document imported members (default: %(default)s)" -msgstr "" +msgstr "مستندسازی اعضای ایمپورت‌شده (پیش‌فرض: %(default)s)" #, python-format msgid "document exactly the members in module __all__ attribute. (default: %(default)s)" -msgstr "" +msgstr "مستندسازی دقیقاً اعضای موجود در ویژگی ‎__all__ ماژول. (پیش‌فرض: %(default)s)" msgid "Remove existing files in the output directory that were not generated" -msgstr "" +msgstr "حذف پرونده‌های موجود در پوشه‌ی خروجی که تولید نشده‌اند" #, python-format msgid "Failed to remove %s: %s" -msgstr "" +msgstr "حذف %s شکست خورد: %s" msgid "" "\n" @@ -3199,328 +3315,332 @@ msgid "" "\n" "Note: By default this script will not overwrite already created files." msgstr "" +"\n" +"به‌صورت بازگشتی در به‌دنبال ماژول‌ها و بسته‌های پایتونی بگردید و\n" +"یک پرونده‌ی reST با دایرکتیوهای automodule به‌ازای هر بسته در بسازید.\n" +"\n" +"ها می‌توانند الگوهای پرونده و/یا پوشه باشند که از\n" +"تولید کنار گذاشته می‌شوند.\n" +"\n" +"نکته: به‌طور پیش‌فرض این اسکریپت پرونده‌های از پیش ساخته‌شده را بازنویسی نمی‌کند." msgid "path to module to document" -msgstr "" +msgstr "مسیر ماژول برای مستندسازی" msgid "fnmatch-style file and/or directory patterns to exclude from generation" -msgstr "" +msgstr "الگوهای پرونده و/یا پوشه به سبک fnmatch برای کنار گذاشتن از تولید" msgid "directory to place all output" -msgstr "" +msgstr "پوشه‌ای برای قرار دادن تمام خروجی" msgid "maximum depth of submodules to show in the TOC (default: 4)" -msgstr "" +msgstr "حداکثر عمق زیرماژول‌ها برای نمایش در فهرست مطالب (پیش‌فرض: ۴)" msgid "overwrite existing files" -msgstr "" +msgstr "بازنویسی پرونده‌های موجود" msgid "follow symbolic links. Powerful when combined with collective.recipe.omelette." -msgstr "" +msgstr "دنبال کردن پیوندهای نمادین. هنگام ترکیب با collective.recipe.omelette قدرتمند است." msgid "run the script without creating files" -msgstr "" +msgstr "اجرای اسکریپت بدون ساخت پرونده" msgid "put documentation for each module on its own page" -msgstr "" +msgstr "قرار دادن مستندات هر ماژول در صفحه‌ی خودش" msgid "include \"_private\" modules" -msgstr "" +msgstr "گنجاندن ماژول‌های «‎_private»" msgid "filename of table of contents (default: modules)" -msgstr "" +msgstr "نام پرونده‌ی فهرست مطالب (پیش‌فرض: modules)" msgid "don't create a table of contents file" -msgstr "" +msgstr "پرونده‌ی فهرست مطالب ساخته نشود" msgid "don't create headings for the module/package packages (e.g. when the docstrings already contain them)" -msgstr "" +msgstr "عنوان برای بسته‌های ماژول/بسته ساخته نشود (مثلاً وقتی رشته‌های مستندساز هم‌اکنون حاوی آن‌ها هستند)" msgid "put module documentation before submodule documentation" -msgstr "" +msgstr "قرار دادن مستندات ماژول پیش از مستندات زیرماژول" msgid "interpret module paths according to PEP-0420 implicit namespaces specification" -msgstr "" +msgstr "تفسیر مسیرهای ماژول بر اساس مشخصات فضای‌نام ضمنی PEP-0420" msgid "Comma-separated list of options to pass to automodule directive (or use SPHINX_APIDOC_OPTIONS)." -msgstr "" +msgstr "فهرستی جداشده با ویرگول از گزینه‌ها برای ارسال به دایرکتیو automodule (یا استفاده از SPHINX_APIDOC_OPTIONS)." msgid "file suffix (default: rst)" -msgstr "" +msgstr "پسوند پرونده (پیش‌فرض: rst)" msgid "generate a full project with sphinx-quickstart" -msgstr "" +msgstr "تولید یک پروژه‌ی کامل با sphinx-quickstart" msgid "append module_path to sys.path, used when --full is given" -msgstr "" +msgstr "افزودن module_path به sys.path، هنگامی که --full داده شده استفاده می‌شود" msgid "project name (default: root module name)" -msgstr "" +msgstr "نام پروژه (پیش‌فرض: نام ماژول ریشه)" msgid "project author(s), used when --full is given" -msgstr "" +msgstr "نویسنده (های) پروژه، هنگامی که --full داده شده استفاده می‌شود" msgid "project version, used when --full is given" -msgstr "" +msgstr "نسخه‌ی پروژه، هنگامی که --full داده شده استفاده می‌شود" msgid "project release, used when --full is given, defaults to --doc-version" -msgstr "" +msgstr "انتشار پروژه، هنگامی که --full داده شده استفاده می‌شود، پیش‌فرض آن --doc-version است" msgid "extension options" -msgstr "" +msgstr "گزینه‌های افزونه" msgid "enable arbitrary extensions, used when --full is given" -msgstr "" +msgstr "فعال‌سازی افزونه‌های دلخواه، هنگامی که --full داده شده استفاده می‌شود" #, python-format msgid "enable %s extension, used when --full is given" -msgstr "" +msgstr "فعال‌سازی افزونه‌ی %s، هنگامی که --full داده شده استفاده می‌شود" #, python-format msgid "%s is not a directory." -msgstr "" +msgstr "%s یک پوشه نیست." msgid "Running apidoc" -msgstr "" +msgstr "در حال اجرای apidoc" #, python-format msgid "apidoc_modules item %i must be a dict" -msgstr "" +msgstr "آیتم %i در apidoc_modules باید یک دیکشنری باشد" #, python-format msgid "apidoc_modules item %i must have a 'path' key" -msgstr "" +msgstr "آیتم %i در apidoc_modules باید کلید «path» داشته باشد" #, python-format msgid "apidoc_modules item %i 'path' must be a string" -msgstr "" +msgstr "«path» در آیتم %i از apidoc_modules باید یک رشته باشد" #, python-format msgid "apidoc_modules item %i 'path' is not an existing folder: %s" -msgstr "" +msgstr "«path» در آیتم %i از apidoc_modules یک پوشه‌ی موجود نیست: %s" #, python-format msgid "apidoc_modules item %i must have a 'destination' key" -msgstr "" +msgstr "آیتم %i در apidoc_modules باید کلید «destination» داشته باشد" #, python-format msgid "apidoc_modules item %i 'destination' must be a string" -msgstr "" +msgstr "«destination» در آیتم %i از apidoc_modules باید یک رشته باشد" #, python-format msgid "apidoc_modules item %i 'destination' should be a relative path" -msgstr "" +msgstr "«destination» در آیتم %i از apidoc_modules باید یک مسیر نسبی باشد" #, python-format msgid "apidoc_modules item %i cannot create destination directory: %s" -msgstr "" +msgstr "آیتم %i از apidoc_modules نمی‌تواند پوشه‌ی مقصد بسازد: %s" #, python-format msgid "apidoc_modules item %i '%s' must be an int" -msgstr "" +msgstr "آیتم %i از apidoc_modules، «%s» باید یک عدد صحیح باشد" #, python-format msgid "apidoc_modules item %i '%s' must be a boolean" -msgstr "" +msgstr "آیتم %i از apidoc_modules، «%s» باید یک بولی باشد" #, python-format msgid "apidoc_modules item %i has unexpected keys: %s" -msgstr "" +msgstr "آیتم %i از apidoc_modules کلیدهای غیرمنتظره‌ای دارد: %s" #, python-format msgid "apidoc_modules item %i '%s' must be a sequence" -msgstr "" +msgstr "آیتم %i از apidoc_modules، «%s» باید یک دنباله باشد" #, python-format msgid "apidoc_modules item %i '%s' must contain strings" -msgstr "" +msgstr "آیتم %i از apidoc_modules، «%s» باید حاوی رشته باشد" #, python-format msgid "Would create file %s." -msgstr "" +msgstr "پرونده‌ی %s ساخته خواهد شد." #, python-format msgid "(in %s v%s)" -msgstr "" +msgstr "(در %s نسخه‌ی %s)" #, python-format msgid "(in %s)" -msgstr "" +msgstr "(در %s)" #, python-format msgid "inventory '%s': duplicate matches found for %s:%s" -msgstr "" +msgstr "فهرست موجودی «%s»: تطبیق‌های تکراری برای %s:%s پیدا شد" #, python-format msgid "inventory '%s': multiple matches found for %s:%s" -msgstr "" +msgstr "فهرست موجودی «%s»: چندین تطبیق برای %s:%s پیدا شد" #, python-format msgid "inventory for external cross-reference not found: %r" -msgstr "" +msgstr "فهرست موجودی برای ارجاع‌متقابل خارجی پیدا نشد: %r" #, python-format msgid "invalid external cross-reference suffix: %r" -msgstr "" +msgstr "پسوند ارجاع‌متقابل خارجی نامعتبر: %r" #, python-format msgid "domain for external cross-reference not found: %r" -msgstr "" +msgstr "دامنه برای ارجاع‌متقابل خارجی پیدا نشد: %r" #, python-format msgid "external %s:%s reference target not found: %s" -msgstr "" +msgstr "هدف ارجاع خارجی %s:%s پیدا نشد: %s" #, python-format msgid "Invalid intersphinx project identifier `%r` in intersphinx_mapping. Project identifiers must be non-empty strings." -msgstr "" +msgstr "شناسه‌ی پروژه‌ی intersphinx نامعتبر «%r» در intersphinx_mapping. شناسه‌های پروژه باید رشته‌های غیرخالی باشند." #, python-format msgid "Invalid value `%r` in intersphinx_mapping[%r]. Expected a two-element tuple or list." -msgstr "" +msgstr "مقدار نامعتبر «%r» در intersphinx_mapping[%r]. یک تاپل یا فهرست دوعضوی انتظار می‌رفت." #, python-format msgid "Invalid value `%r` in intersphinx_mapping[%r]. Values must be a (target URI, inventory locations) pair." -msgstr "" +msgstr "مقدار نامعتبر «%r» در intersphinx_mapping[%r]. مقادیر باید یک جفت (URI هدف، مکان‌های فهرست موجودی) باشند." #, python-format msgid "Invalid target URI value `%r` in intersphinx_mapping[%r][0]. Target URIs must be unique non-empty strings." -msgstr "" +msgstr "مقدار URI هدف نامعتبر «%r» در intersphinx_mapping[%r][0]. URIهای هدف باید رشته‌های غیرخالی یکتا باشند." #, python-format msgid "Invalid target URI value `%r` in intersphinx_mapping[%r][0]. Target URIs must be unique (other instance in intersphinx_mapping[%r])." -msgstr "" +msgstr "مقدار URI هدف نامعتبر «%r» در intersphinx_mapping[%r][0]. URIهای هدف باید یکتا باشند (نمونه‌ی دیگر در intersphinx_mapping[%r])." #, python-format msgid "Invalid inventory location value `%r` in intersphinx_mapping[%r][1]. Inventory locations must be non-empty strings or None." -msgstr "" +msgstr "مقدار مکان فهرست موجودی نامعتبر «%r» در intersphinx_mapping[%r][1]. مکان‌های فهرست موجودی باید رشته‌های غیرخالی یا None باشند." msgid "Invalid `intersphinx_mapping` configuration (1 error)." -msgstr "" +msgstr "پیکربندی «intersphinx_mapping» نامعتبر (۱ خطا)." #, python-format msgid "Invalid `intersphinx_mapping` configuration (%s errors)." -msgstr "" +msgstr "پیکربندی «intersphinx_mapping» نامعتبر (%s خطا)." msgid "An invalid intersphinx_mapping entry was added after normalisation." -msgstr "" +msgstr "یک ورودی نامعتبر intersphinx_mapping پس از نرمال‌سازی افزوده شد." #, python-format msgid "loading intersphinx inventory '%s' from %s ..." -msgstr "" +msgstr "در حال بارگذاری فهرست موجودی intersphinx با نام «%s» از %s ..." msgid "encountered some issues with some of the inventories, but they had working alternatives:" -msgstr "" +msgstr "با برخی از فهرست‌های موجودی مشکلاتی برخورد شد، اما جایگزین‌های کارآمدی داشتند:" msgid "failed to reach any of the inventories with the following issues:" -msgstr "" +msgstr "دسترسی به هیچ‌کدام از فهرست‌های موجودی با مشکلات زیر ممکن نشد:" #, python-format msgid "intersphinx inventory has moved: %s -> %s" -msgstr "" +msgstr "فهرست موجودی intersphinx جابه‌جا شده است: %s -> %s" #, python-format msgid "invalid value for member-order option: %s" -msgstr "" +msgstr "مقدار نامعتبر برای گزینه‌ی member-order: %s" #, python-format msgid "invalid value for class-doc-from option: %s" -msgstr "" +msgstr "مقدار نامعتبر برای گزینه‌ی class-doc-from: %s" #, python-format msgid "invalid signature for auto%s (%r)" -msgstr "" +msgstr "امضای نامعتبر برای auto%s (%r)" #, python-format msgid "error while formatting arguments for %s: %s" -msgstr "" +msgstr "خطا هنگام قالب‌بندی آرگومان‌ها برای %s: %s" #, python-format msgid "" "autodoc: failed to determine %s.%s (%r) to be documented, the following exception was raised:\n" "%s" msgstr "" +"autodoc: تعیین %s.%s (%r) برای مستندسازی شکست خورد، استثنای زیر پرتاب شد:\n" +"%s" #, python-format msgid "don't know which module to import for autodocumenting %r (try placing a \"module\" or \"currentmodule\" directive in the document, or giving an explicit module name)" -msgstr "" +msgstr "مشخص نیست کدام ماژول برای مستندسازی خودکار %r باید ایمپورت شود (سعی کنید دایرکتیو «module» یا «currentmodule» را در سند قرار دهید، یا نام ماژول را صریحاً بدهید)" #, python-format msgid "A mocked object is detected: %r" -msgstr "" +msgstr "شیء ماک‌شده‌ای شناسایی شد: %r" #, python-format msgid "error while formatting signature for %s: %s" -msgstr "" +msgstr "خطا هنگام قالب‌بندی امضا برای %s: %s" msgid "\"::\" in automodule name doesn't make sense" -msgstr "" +msgstr "«::» در نام automodule معنایی ندارد" #, python-format msgid "signature arguments or return annotation given for automodule %s" -msgstr "" +msgstr "آرگومان‌های امضا یا حاشیه‌نویسی بازگشتی برای automodule با نام %s داده شده است" #, python-format msgid "__all__ should be a list of strings, not %r (in module %s) -- ignoring __all__" -msgstr "" +msgstr "‎__all__ باید فهرستی از رشته‌ها باشد، نه %r (در ماژول %s) -- ‎__all__ نادیده گرفته شد" #, python-format msgid "missing attribute mentioned in :members: option: module %s, attribute %s" -msgstr "" +msgstr "ویژگی گم‌شده که در گزینه‌ی :members: ذکر شده: ماژول %s، ویژگی %s" #, python-format msgid "Failed to get a function signature for %s: %s" -msgstr "" +msgstr "دریافت امضای تابع برای %s شکست خورد: %s" #, python-format msgid "Failed to get a constructor signature for %s: %s" -msgstr "" +msgstr "دریافت امضای سازنده برای %s شکست خورد: %s" #, python-format msgid "Bases: %s" -msgstr "" +msgstr "پایه‌ها: %s" #, python-format msgid "missing attribute %s in object %s" -msgstr "" +msgstr "ویژگی گم‌شده‌ی %s در شیء %s" #, python-format msgid "alias of %s" -msgstr "" +msgstr "مستعار %s" #, python-format msgid "alias of TypeVar(%s)" -msgstr "" +msgstr "مستعار TypeVar(%s)" #, python-format msgid "Failed to get a method signature for %s: %s" -msgstr "" +msgstr "دریافت امضای متد برای %s شکست خورد: %s" #, python-format msgid "Invalid __slots__ found on %s. Ignored." -msgstr "" +msgstr "‎__slots__ نامعتبر در %s پیدا شد. نادیده گرفته شد." #, python-format msgid "Failed to parse a default argument value for %r: %s" -msgstr "" +msgstr "پارس کردن مقدار پیش‌فرض آرگومان برای %r شکست خورد: %s" #, python-format msgid "Failed to update signature for %r: parameter not found: %s" -msgstr "" +msgstr "به‌روزرسانی امضا برای %r شکست خورد: پارامتر پیدا نشد: %s" #, python-format msgid "Failed to parse type_comment for %r: %s" -msgstr "" +msgstr "پارس کردن type_comment برای %r شکست خورد: %s" #~ msgid "Download these documents" #~ msgstr "دانلود این مستندات" -#~ msgid "Other resources" -#~ msgstr "منابع دیگر" - -#~ msgid "PEP index" -#~ msgstr "اندیس PEP" - #~ msgid "Beginner's guide" #~ msgstr "راهنمای مبتدیان" diff --git a/tutorial/classes.po b/tutorial/classes.po index c21d6625..787d5225 100644 --- a/tutorial/classes.po +++ b/tutorial/classes.po @@ -10,12 +10,13 @@ # khosro azimi, 2025 # Sepehr Rasouli , 2026 # invincible627 , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 19:29+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -653,6 +654,9 @@ msgstr "در واقع، این موضوع کمی پیچیده‌تر از این msgid "Dynamic ordering is necessary because all cases of multiple inheritance exhibit one or more diamond relationships (where at least one of the parent classes can be accessed through multiple paths from the bottommost class). For example, all classes inherit from :class:`object`, so any case of multiple inheritance provides more than one path to reach :class:`object`. To keep the base classes from being accessed more than once, the dynamic algorithm linearizes the search order in a way that preserves the left-to-right ordering specified in each class, that calls each parent only once, and that is monotonic (meaning that a class can be subclassed without affecting the precedence order of its parents). Taken together, these properties make it possible to design reliable and extensible classes with multiple inheritance. For more detail, see :ref:`python_2.3_mro`." msgstr "ترتیب‌دهی پویا ضروری است زیرا همه‌ی موارد ارث‌بری چندگانه دارای یک یا چند رابطه‌ی الماسی هستند (جایی که حداقل یکی از کلاس‌های والد از طریق چندین مسیر از پایین‌ترین کلاس قابل دسترسی است). برای مثال، همه‌ی کلاس‌ها از :class:`object` ارث‌بری می‌کنند، بنابراین هر موردی از ارث‌بری چندگانه بیش از یک مسیر برای رسیدن به :class:`object` فراهم می‌کند. برای جلوگیری از دسترسی بیش از یک بار به کلاس‌های پایه، الگوریتم پویا ترتیب جست‌وجو را به‌گونه‌ای خطی‌سازی می‌کند که ترتیب چپ‌به‌راست مشخص‌شده در هر کلاس را حفظ کند، که هر والد را فقط یک بار فراخوانی می‌کند، و یکنواخت است (به این معنی که یک کلاس می‌تواند زیرکلاس داشته باشد بدون اینکه بر ترتیب اولویت والدین آن تأثیر بگذارد). این ویژگی‌ها در کنار هم، طراحی کلاس‌های قابل اعتماد و قابل توسعه با ارث‌بری چندگانه را ممکن می‌سازند. برای جزئیات بیشتر، به :ref:`python_2.3_mro` مراجعه کنید." +msgid "In some cases multiple inheritance is not allowed; see :ref:`multiple-inheritance` for details." +msgstr "در برخی موارد وراثت چندگانه مجاز نیست؛ برای جزئیات به :ref:`multiple-inheritance` مراجعه کنید." + msgid "Private Variables" msgstr "متغیرهای خصوصی" @@ -945,7 +949,12 @@ msgid "" "\n" ">>> data = 'golf'\n" ">>> list(data[i] for i in range(len(data)-1, -1, -1))\n" -"['f', 'l', 'o', 'g']" +"['f', 'l', 'o', 'g']\n" +"\n" +">>> x = [[1,2,3], [], [4, 5]]\n" +">>> g = (*i for i in x)\n" +">>> list(g)\n" +"[1, 2, 3, 4, 5]" msgstr "" ">>> sum(i*i for i in range(10)) # sum of squares\n" "285\n" @@ -961,7 +970,32 @@ msgstr "" "\n" ">>> data = 'golf'\n" ">>> list(data[i] for i in range(len(data)-1, -1, -1))\n" -"['f', 'l', 'o', 'g']" +"['f', 'l', 'o', 'g']\n" +"\n" +">>> x = [[1,2,3], [], [4, 5]]\n" +">>> g = (*i for i in x)\n" +">>> list(g)\n" +"[1, 2, 3, 4, 5]" + +msgid "In most cases, generator expressions must be wrapped in parentheses. As a special case, however, when provided as the sole argument to a function (as in the examples involving ``sum``, ``set``, ``max``, and ``list`` above), the generator expression does not need to be wrapped in an additional set of parentheses. That is to say, the following two pieces of code are semantically equivalent::" +msgstr "در بیشتر موارد، عبارت‌های تولیدگر باید داخل پرانتز قرار گیرند. با این حال، به عنوان یک مورد خاص، هنگامی که به عنوان تنها آرگومان یک تابع ارائه می‌شوند (همانند مثال‌های شامل ``sum``، ``set``، ``max`` و ``list`` در بالا)، عبارت تولیدگر نیازی به قرار گرفتن در یک مجموعه پرانتز اضافی ندارد. به عبارت دیگر، دو قطعه کد زیر از نظر معنایی معادل هستند::" + +msgid "" +">>> f(x for x in y)\n" +">>> f((x for x in y))" +msgstr "" +">>> f(x for x in y)\n" +">>> f((x for x in y))" + +msgid "as are the following::" +msgstr "همچنین موارد زیر::" + +msgid "" +">>> f(*x for x in y)\n" +">>> f((*x for x in y))" +msgstr "" +">>> f(*x for x in y)\n" +">>> f((*x for x in y))" msgid "Footnotes" msgstr "پانویس‌ها" diff --git a/tutorial/datastructures.po b/tutorial/datastructures.po index bd56ab00..ae802f0d 100644 --- a/tutorial/datastructures.po +++ b/tutorial/datastructures.po @@ -6,12 +6,13 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 19:18+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -428,6 +429,66 @@ msgstr "" msgid "See :ref:`tut-unpacking-arguments` for details on the asterisk in this line." msgstr "برای جزئیات درباره‌ی ستاره در این خط، به :ref:`tut-unpacking-arguments` مراجعه کنید." +msgid "Unpacking in Lists and List Comprehensions" +msgstr "بازکردن بسته در فهرست‌ها و درک‌های فهرستی" + +msgid "The section on :ref:`tut-unpacking-arguments` describes the use of ``*`` to \"unpack\" the elements of an iterable object, providing each one separately as an argument to a function. Unpacking can also be used in other contexts, for example, when creating lists. When specifying elements of a list, prefixing an expression by a ``*`` will unpack the result of that expression, adding each of its elements to the list we're creating::" +msgstr "بخش :ref:`tut-unpacking-arguments` استفاده از ``*`` را برای «بازکردن بسته» اجزای یک شیء پیمایش‌پذیر توصیف می‌کند و هر یک را به‌طور جداگانه به عنوان آرگومان به یک تابع می‌فرستد. بازکردن بسته را می‌توان در زمینه‌های دیگر نیز استفاده کرد، برای مثال، هنگام ایجاد فهرست‌ها. هنگام مشخص کردن اجزای یک فهرست، قرار دادن پیشوند ``*`` پیش از یک عبارت، نتیجه‌ی آن عبارت را باز می‌کند و هر یک از عناصر آن را به فهرستی که در حال ساخت آن هستیم اضافه می‌کند::" + +msgid "" +">>> x = [1, 2, 3]\n" +">>> [0, *x, 4, 5, 6]\n" +"[0, 1, 2, 3, 4, 5, 6]" +msgstr "" +">>> x = [1, 2, 3]\n" +">>> [0, *x, 4, 5, 6]\n" +"[0, 1, 2, 3, 4, 5, 6]" + +msgid "This only works if the expression following the ``*`` evaluates to an iterable object; trying to unpack a non-iterable object will raise an exception::" +msgstr "این کار تنها زمانی کار می‌کند که عبارت پس از ``*`` به یک شیء پیمایش‌پذیر ارزیابی شود؛ تلاش برای بازکردن بسته‌ی یک شیء غیرپیمایش‌پذیر یک استثنا ایجاد خواهد کرد::" + +msgid "" +">>> x = 1\n" +">>> [0, *x, 2, 3, 4]\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +" [0, *x, 2, 3, 4]\n" +"TypeError: Value after * must be an iterable, not int" +msgstr "" +">>> x = 1\n" +">>> [0, *x, 2, 3, 4]\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +" [0, *x, 2, 3, 4]\n" +"TypeError: Value after * must be an iterable, not int" + +msgid "Unpacking can also be used in list comprehensions, as a way to build a new list representing the concatenation of an arbitrary number of iterables::" +msgstr "بازکردن بسته را همچنین می‌توان در درک فهرستی‌ها، به عنوان روشی برای ساخت یک فهرست جدید که نشان‌دهنده‌ی اتصال تعداد دلخواهی از اشیاء پیمایش‌پذیر است، استفاده کرد::" + +msgid "" +">>> x = [[1, 2, 3], [4, 5, 6], [], [7], [8, 9]]\n" +">>> [*element for element in x]\n" +"[1, 2, 3, 4, 5, 6, 7, 8, 9]" +msgstr "" +">>> x = [[1, 2, 3], [4, 5, 6], [], [7], [8, 9]]\n" +">>> [*element for element in x]\n" +"[1, 2, 3, 4, 5, 6, 7, 8, 9]" + +msgid "Note that the effect is that each element from ``x`` is unpacked. This works for arbitrary iterable objects, not just lists::" +msgstr "توجه داشته باشید که اثر این کار باز شدن بسته‌ی هر عنصر از ``x`` است. این کار برای اشیاء پیمایش‌پذیر دلخواه، و نه فقط فهرست‌ها، کار می‌کند::" + +msgid "" +">>> x = [[1, 2, 3], 'cat', {'spam': 'eggs'}]\n" +">>> [*element for element in x]\n" +"[1, 2, 3, 'c', 'a', 't', 'spam']" +msgstr "" +">>> x = [[1, 2, 3], 'cat', {'spam': 'eggs'}]\n" +">>> [*element for element in x]\n" +"[1, 2, 3, 'c', 'a', 't', 'spam']" + +msgid "But if the objects in ``x`` are not iterable, this expression would again raise an exception." +msgstr "اما اگر اشیاء موجود در ``x`` پیمایش‌پذیر نباشند، این عبارت دوباره یک استثنا ایجاد خواهد کرد." + msgid "The :keyword:`!del` statement" msgstr "دستور :keyword:`!del`" @@ -493,7 +554,11 @@ msgid "" ">>> # but they can contain mutable objects:\n" ">>> v = ([1, 2, 3], [3, 2, 1])\n" ">>> v\n" -"([1, 2, 3], [3, 2, 1])" +"([1, 2, 3], [3, 2, 1])\n" +">>> # they support unpacking just like lists:\n" +">>> x = [1, 2, 3]\n" +">>> 0, *x, 4\n" +"(0, 1, 2, 3, 4)" msgstr "" ">>> t = 12345, 54321, 'hello!'\n" ">>> t[0]\n" @@ -512,7 +577,11 @@ msgstr "" ">>> # but they can contain mutable objects:\n" ">>> v = ([1, 2, 3], [3, 2, 1])\n" ">>> v\n" -"([1, 2, 3], [3, 2, 1])" +"([1, 2, 3], [3, 2, 1])\n" +">>> # they support unpacking just like lists:\n" +">>> x = [1, 2, 3]\n" +">>> 0, *x, 4\n" +"(0, 1, 2, 3, 4)" msgid "As you see, on output tuples are always enclosed in parentheses, so that nested tuples are interpreted correctly; they may be input with or without surrounding parentheses, although often parentheses are necessary anyway (if the tuple is part of a larger expression). It is not possible to assign to the individual items of a tuple, however it is possible to create tuples which contain mutable objects, such as lists." msgstr "همان‌طور که می‌بینید، در خروجی تاپل‌ها همیشه درون پرانتز قرار می‌گیرند تا تاپل‌های تودرتو به‌درستی تفسیر شوند؛ آن‌ها می‌توانند با یا بدون پرانتزهای اطرافشان وارد شوند، اگرچه اغلب پرانتزها به هر حال لازم هستند (اگر تاپل بخشی از یک عبارت بزرگ‌تر باشد). امکان انتساب به آیتم‌های جداگانه‌ی یک تاپل وجود ندارد، بااین‌حال می‌توان تاپل‌هایی ایجاد کرد که شامل اشیای تغییرپذیر، مانند فهرست‌ها، باشند." @@ -613,17 +682,25 @@ msgstr "" ">>> a ^ b # letters in a or b but not both\n" "{'r', 'd', 'b', 'm', 'z', 'l'}" -msgid "Similarly to :ref:`list comprehensions `, set comprehensions are also supported::" -msgstr "مانند :ref:`درک‌های فهرستی `، درک‌های مجموعه نیز پشتیبانی می‌شوند::" +msgid "Similarly to :ref:`list comprehensions `, set comprehensions are also supported, including comprehensions with unpacking::" +msgstr "مشابه :ref:`درک‌های فهرستی `، درک‌های مجموعه نیز پشتیبانی می‌شوند، از جمله درک‌ها همراه با بازکردن بسته::" msgid "" ">>> a = {x for x in 'abracadabra' if x not in 'abc'}\n" ">>> a\n" -"{'r', 'd'}" +"{'r', 'd'}\n" +"\n" +">>> fruits = [{'apple', 'avocado', 'apricot'}, {'banana', 'blueberry'}]\n" +">>> {*fruit for fruit in fruits}\n" +"{'blueberry', 'banana', 'avocado', 'apple', 'apricot'}" msgstr "" ">>> a = {x for x in 'abracadabra' if x not in 'abc'}\n" ">>> a\n" -"{'r', 'd'}" +"{'r', 'd'}\n" +"\n" +">>> fruits = [{'apple', 'avocado', 'apricot'}, {'banana', 'blueberry'}]\n" +">>> {*fruit for fruit in fruits}\n" +"{'blueberry', 'banana', 'avocado', 'apple', 'apricot'}" msgid "Dictionaries" msgstr "دیکشنری‌ها" @@ -717,6 +794,28 @@ msgstr "" ">>> {x: x**2 for x in (2, 4, 6)}\n" "{2: 4, 4: 16, 6: 36}" +msgid "And dictionary unpacking (via ``**``) can be used to merge multiple dictionaries::" +msgstr "و بازکردن بسته‌ی دیکشنری (از طریق ``**``) را می‌توان برای ادغام چندین دیکشنری استفاده کرد::" + +msgid "" +">>> odds = {i: i**2 for i in (1, 3, 5)}\n" +">>> evens = {i: i**2 for i in (2, 4, 6)}\n" +">>> {**odds, **evens}\n" +"{1: 1, 3: 9, 5: 25, 2: 4, 4: 16, 6: 36}\n" +"\n" +">>> all_values = [odds, evens, {0: 0}]\n" +">>> {**i for i in all_values}\n" +"{1: 1, 3: 9, 5: 25, 2: 4, 4: 16, 6: 36, 0: 0}" +msgstr "" +">>> odds = {i: i**2 for i in (1, 3, 5)}\n" +">>> evens = {i: i**2 for i in (2, 4, 6)}\n" +">>> {**odds, **evens}\n" +"{1: 1, 3: 9, 5: 25, 2: 4, 4: 16, 6: 36}\n" +"\n" +">>> all_values = [odds, evens, {0: 0}]\n" +">>> {**i for i in all_values}\n" +"{1: 1, 3: 9, 5: 25, 2: 4, 4: 16, 6: 36, 0: 0}" + msgid "When the keys are simple strings, it is sometimes easier to specify pairs using keyword arguments::" msgstr "هنگامی که کلیدها رشته‌های ساده هستند، گاهی مشخص کردن جفت‌ها با استفاده از آرگومان‌های کلیدواژه‌ای آسان‌تر است::" @@ -948,3 +1047,12 @@ msgstr "پانویس‌ها" msgid "Other languages may return the mutated object, which allows method chaining, such as ``d->insert(\"a\")->remove(\"b\")->sort();``." msgstr "زبان‌های دیگر ممکن است شیء تغییریافته را برگردانند، که امکان زنجیره‌سازی متدها را فراهم می‌کند، مانند ``d->insert(\"a\")->remove(\"b\")->sort();``." + +#~ msgid "" +#~ ">>> a = {x for x in 'abracadabra' if x not in 'abc'}\n" +#~ ">>> a\n" +#~ "{'r', 'd'}" +#~ msgstr "" +#~ ">>> a = {x for x in 'abracadabra' if x not in 'abc'}\n" +#~ ">>> a\n" +#~ "{'r', 'd'}" diff --git a/tutorial/inputoutput.po b/tutorial/inputoutput.po index fd9e3835..e858b124 100644 --- a/tutorial/inputoutput.po +++ b/tutorial/inputoutput.po @@ -8,13 +8,14 @@ # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 # invincible627 , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" -"PO-Revision-Date: 2026-09-13 16:19+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 20:25+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" @@ -24,13 +25,13 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Poedit 3.6\n" -msgid "Input and Output" +msgid "Input and output" msgstr "ورودی و خروجی" msgid "There are several ways to present the output of a program; data can be printed in a human-readable form, or written to a file for future use. This chapter will discuss some of the possibilities." msgstr "روش‌های گوناگونی برای نمایش خروجی یک برنامه وجود دارد؛ داده‌ها را می‌توان به‌صورت قابل‌خواندن برای انسان چاپ کرد، یا برای استفاده‌ی بعدی در یک پرونده نوشت. این فصل به بررسی برخی از این امکانات می‌پردازد." -msgid "Fancier Output Formatting" +msgid "Fancier output formatting" msgstr "قالب‌بندی پیشرفته‌تر خروجی" msgid "So far we've encountered two ways of writing values: *expression statements* and the :func:`print` function. (A third way is using the :meth:`~io.TextIOBase.write` method of file objects; the standard output file can be referenced as ``sys.stdout``. See the Library Reference for more information on this.)" @@ -130,8 +131,8 @@ msgstr "" msgid "The :mod:`string` module contains support for a simple templating approach based upon regular expressions, via :class:`string.Template`. This offers yet another way to substitute values into strings, using placeholders like ``$x`` and replacing them with values from a dictionary. This syntax is easy to use, although it offers much less control for formatting." msgstr "ماژول :mod:`string` شامل پشتیبانی از یک رویکرد ساده‌ی قالب‌بندی (templating) است که بر اساس عبارت‌های باقاعده (regular expressions) و از طریق :class:`string.Template` کار می‌کند. این روشی دیگر برای جایگزینی مقادیر در رشته‌ها ارائه می‌دهد، با استفاده از جای‌نگهدارهایی (placeholders) مانند ``$x`` و جایگزینی آن‌ها با مقادیر یک دیکشنری. این سینتکس (سینتکس) آسان است، اگرچه کنترل بسیار کمتری برای قالب‌بندی ارائه می‌دهد." -msgid "Formatted String Literals" -msgstr "مقادیر لفظی رشته‌ای قالبی" +msgid "Formatted string literals" +msgstr "مقادیر لفظی رشته‌ای قالب‌بندی‌شده" msgid ":ref:`Formatted string literals ` (also called f-strings for short) let you include the value of Python expressions inside a string by prefixing the string with ``f`` or ``F`` and writing expressions as ``{expression}``." msgstr ":ref:`مقادیر لفظی رشته‌ای قالبی ` (که به‌طور خلاصه f-strings نیز نامیده می‌شوند) به شما اجازه می‌دهند که مقدار عبارت‌های پایتون را درون یک رشته با پیشوندگذاری رشته با ``f`` یا ``F`` و نوشتن عبارت‌ها به صورت ``{expression}`` بگنجانید." @@ -190,8 +191,8 @@ msgstr "مشخص‌کننده‌ی ``=`` را می‌توان برای گستر msgid "See :ref:`self-documenting expressions ` for more information on the ``=`` specifier. For a reference on these format specifications, see the reference guide for the :ref:`formatspec`." msgstr "برای اطلاعات بیشتر درباره‌ی مشخص‌کننده‌ی ``=``، به :ref:`عبارات خودمستند ` مراجعه کنید. برای مرجعی در مورد این مشخصات قالب‌بندی، به راهنمای مرجع برای :ref:`formatspec` مراجعه کنید." -msgid "The String format() Method" -msgstr "متد قالب‌بندی رشته" +msgid "The string format() method" +msgstr "متد format() رشته" msgid "Basic usage of the :meth:`str.format` method looks like this::" msgstr "استفاده‌ی پایه از متد :meth:`str.format` به این شکل است::" @@ -316,8 +317,8 @@ msgstr "" msgid "For a complete overview of string formatting with :meth:`str.format`, see :ref:`formatstrings`." msgstr "برای دریافت نمای کلی کامل از قالب‌بندی رشته با :meth:`str.format`، به :ref:`formatstrings` مراجعه کنید." -msgid "Manual String Formatting" -msgstr "قالب‌بندی دستی" +msgid "Manual string formatting" +msgstr "قالب‌بندی دستی رشته" msgid "Here's the same table of squares and cubes, formatted manually::" msgstr "در اینجا همان جدول مربع‌ها و مکعب‌ها، به‌صورت دستی قالب‌بندی شده است::" @@ -397,20 +398,20 @@ msgstr "" msgid "More information can be found in the :ref:`old-string-formatting` section." msgstr "اطلاعات بیشتر می‌تواند در بخش :ref:`old-string-formatting` پیدا شود." -msgid "Reading and Writing Files" -msgstr "خواندن و نوشتن فایل‌ها" +msgid "Reading and writing files" +msgstr "خواندن و نوشتن پرونده‌ها" -msgid ":func:`open` returns a :term:`file object`, and is most commonly used with two positional arguments and one keyword argument: ``open(filename, mode, encoding=None)``" -msgstr ":func:`open` یک :term:`شیء پرونده ` بازمی‌گرداند و معمولاً با دو آرگومان جایگاهی و یک آرگومان کلیدواژه‌ای استفاده می‌شود: ``open(filename, mode, encoding=None)``" +msgid ":func:`open` returns a :term:`file object`, and is most commonly used with two positional arguments: ``open(filename, mode)``" +msgstr ":func:`open` یک :term:`شیء پرونده ` برمی‌گرداند و معمولاً با دو آرگومان جایگاهی استفاده می‌شود: ``open(filename, mode)``" -msgid ">>> f = open('workfile', 'w', encoding=\"utf-8\")" -msgstr ">>> f = open('workfile', 'w', encoding=\"utf-8\")" +msgid ">>> f = open('workfile', 'w')" +msgstr ">>> f = open('workfile', 'w')" msgid "The first argument is a string containing the filename. The second argument is another string containing a few characters describing the way in which the file will be used. *mode* can be ``'r'`` when the file will only be read, ``'w'`` for only writing (an existing file with the same name will be erased), and ``'a'`` opens the file for appending; any data written to the file is automatically added to the end. ``'r+'`` opens the file for both reading and writing. The *mode* argument is optional; ``'r'`` will be assumed if it's omitted." msgstr "آرگومان اول رشته‌ای است که نام پرونده را در بر دارد. آرگومان دوم رشته‌ی دیگری است که شامل چند نویسه است و نحوه‌ی استفاده از پرونده را توضیح می‌دهد. *mode* می‌تواند ``'r'`` باشد زمانی که پرونده فقط خوانده می‌شود، ``'w'`` برای فقط نوشتن (یک پرونده موجود با همان نام حذف خواهد شد)، و ``'a'`` پرونده را برای افزودن (append) باز می‌کند؛ هر داده‌ای که در پرونده نوشته شود به‌طور خودکار به انتهای آن اضافه می‌شود. ``'r+'`` پرونده را هم برای خواندن و هم برای نوشتن باز می‌کند. آرگومان *mode* اختیاری است؛ اگر حذف شود، ``'r'`` در نظر گرفته می‌شود." -msgid "Normally, files are opened in :dfn:`text mode`, that means, you read and write strings from and to the file, which are encoded in a specific *encoding*. If *encoding* is not specified, the default is platform dependent (see :func:`open`). Because UTF-8 is the modern de-facto standard, ``encoding=\"utf-8\"`` is recommended unless you know that you need to use a different encoding. Appending a ``'b'`` to the mode opens the file in :dfn:`binary mode`. Binary mode data is read and written as :class:`bytes` objects. You can not specify *encoding* when opening file in binary mode." -msgstr "به‌طور معمول، پرونده‌ها در :dfn:`text mode` باز می‌شوند، یعنی شما رشته‌ها را از پرونده می‌خوانید و در پرونده می‌نویسید، که با یک *encoding* (کدگذاری) خاص کدگذاری شده‌اند. اگر *encoding* مشخص نشود، مقدار پیش‌فرض به سیستم‌عامل بستگی دارد (به :func:`open` مراجعه کنید). از آنجا که UTF-8 استاندارد بالفعل مدرن است، ``encoding=\"utf-8\"`` توصیه می‌شود مگر اینکه بدانید باید از کدگذاری دیگری استفاده کنید. اضافه کردن ``'b'`` به حالت، پرونده را در :dfn:`binary mode` باز می‌کند. داده‌ها در حالت دودویی به صورت اشیاء :class:`bytes` خوانده و نوشته می‌شوند. هنگام باز کردن پرونده در حالت دودویی نمی‌توانید *encoding* را مشخص کنید." +msgid "Normally, files are opened in :dfn:`text mode`, that means, you read and write strings from and to the file, which are encoded in a specific *encoding*. If *encoding* is not specified, the default is UTF-8 (see :func:`open`). Appending a ``'b'`` to the mode opens the file in :dfn:`binary mode`. Binary mode data is read and written as :class:`bytes` objects. You can not specify *encoding* when opening file in binary mode." +msgstr "به‌طور معمول، پرونده‌ها در :dfn:`حالت متنی` باز می‌شوند؛ یعنی رشته‌ها را از پرونده می‌خوانید و رشته‌ها را در پرونده می‌نویسید که با یک *encoding* مشخص کدگذاری شده‌اند. اگر *encoding* مشخص نشده باشد، مقدار پیش‌فرض UTF-8 است (به :func:`open` مراجعه کنید). افزودن ``'b'`` به حالت، پرونده را در :dfn:`حالت دودویی` باز می‌کند. داده‌ها در حالت دودویی به‌صورت شیءهای :class:`bytes` خوانده و نوشته می‌شوند. هنگام بازکردن پرونده در حالت دودویی، نمی‌توانید *encoding* را مشخص کنید." msgid "In text mode, the default when reading is to convert platform-specific line endings (``\\n`` on Unix, ``\\r\\n`` on Windows) to just ``\\n``. When writing in text mode, the default is to convert occurrences of ``\\n`` back to platform-specific line endings. This behind-the-scenes modification to file data is fine for text files, but will corrupt binary data like that in :file:`JPEG` or :file:`EXE` files. Be very careful to use binary mode when reading and writing such files." msgstr "در حالت متنی، حالت پیش‌فرض هنگام خواندن، تبدیل پایان‌سطرهای ویژه‌ی هر سیستم‌عامل (``\\n`` در یونیکس، ``\\r\\n`` در ویندوز) به فقط ``\\n`` است. هنگام نوشتن در حالت متنی، حالت پیش‌فرض تبدیل ``\\n`` به پایان‌سطرهای ویژه‌ی هر سیستم‌عامل است. این تغییرات پشت‌صحنه در داده‌های پرونده برای پرونده‌های متنی خوب است، اما داده‌های دودویی مانند پرونده‌های :file:`JPEG` یا :file:`EXE` را خراب می‌کند. هنگام خواندن و نوشتن چنین پرونده‌هایی بسیار دقت کنید که از حالت دودویی استفاده کنید." @@ -419,14 +420,14 @@ msgid "It is good practice to use the :keyword:`with` keyword when dealing with msgstr "استفاده از کلیدواژه‌ی :keyword:`with` هنگام کار با اشیاء پرونده، یک روش خوب است. مزیت آن این است که پرونده پس از پایان بدنه خود به‌درستی بسته می‌شود، حتی اگر در جایی استثنا ایجاد شود. استفاده از :keyword:`!with` همچنین بسیار کوتاه‌تر از نوشتن بلوک‌های معادل :keyword:`try`\\ -\\ :keyword:`finally` است::" msgid "" -">>> with open('workfile', encoding=\"utf-8\") as f:\n" +">>> with open('workfile') as f:\n" "... read_data = f.read()\n" "\n" ">>> # We can check that the file has been automatically closed.\n" ">>> f.closed\n" "True" msgstr "" -">>> with open('workfile', encoding=\"utf-8\") as f:\n" +">>> with open('workfile') as f:\n" "... read_data = f.read()\n" "\n" ">>> # We can check that the file has been automatically closed.\n" @@ -455,7 +456,7 @@ msgstr "" " File \"\", line 1, in \n" "ValueError: I/O operation on closed file." -msgid "Methods of File Objects" +msgid "Methods of file objects" msgstr "متدهای اشیاء پرونده" msgid "The rest of the examples in this section will assume that a file object called ``f`` has already been created." @@ -611,8 +612,8 @@ msgstr "برای کدگشایی مجدد شیء، اگر ``f`` یک شیء :term msgid "x = json.load(f)" msgstr "x = json.load(f)" -msgid "JSON files must be encoded in UTF-8. Use ``encoding=\"utf-8\"`` when opening JSON file as a :term:`text file` for both of reading and writing." -msgstr "پرونده‌های JSON باید با UTF-8 کدگذاری شوند. هنگام باز کردن پرونده JSON به‌عنوان یک :term:`پرونده متنی ` برای هر دو عمل خواندن و نوشتن، از ``encoding=\"utf-8\"`` استفاده کنید." +msgid "JSON files must be encoded in UTF-8, the default encoding for :term:`text files `." +msgstr "پرونده‌های JSON باید با رمزگذاری UTF-8 که رمزگذاری پیش‌فرض برای :term:`پرونده‌های متنی ` است، رمزگذاری شوند." msgid "This simple serialization technique can handle lists and dictionaries, but serializing arbitrary class instances in JSON requires a bit of extra effort. The reference for the :mod:`json` module contains an explanation of this." msgstr "این تکنیک ساده‌ی سریال‌سازی می‌تواند فهرست‌ها و دیکشنری‌ها را مدیریت کند، اما سریال‌سازی نمونه‌های دلخواه از کلاس‌ها در JSON نیازمند کمی تلاش اضافی است. مرجع ماژول :mod:`json` شامل توضیحاتی در مورد این موضوع است." @@ -661,3 +662,6 @@ msgstr "ماژول" msgid "json" msgstr "json" + +#~ msgid "Formatted String Literals" +#~ msgstr "مقادیر لفظی رشته‌ای قالبی" diff --git a/tutorial/interpreter.po b/tutorial/interpreter.po index a357a66f..a3d8e2d1 100644 --- a/tutorial/interpreter.po +++ b/tutorial/interpreter.po @@ -6,12 +6,13 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 07:48+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -31,8 +32,8 @@ msgstr "فراخوانی مفسر" msgid "The Python interpreter is usually installed as |usr_local_bin_python_x_dot_y_literal| on those machines where it is available; putting :file:`/usr/local/bin` in your Unix shell's search path makes it possible to start it by typing the command:" msgstr "مفسر پایتون معمولاً روی سیستم‌هایی که در دسترس است، در مسیر |usr_local_bin_python_x_dot_y_literal| نصب می‌شود. اگر مسیر :file:`/usr/local/bin` را به مسیر جست‌وجوی پوسته یونیکس خود اضافه کنید، می‌توانید با وارد کردن دستور زیر آن را اجرا کنید:" -msgid "python3.14" -msgstr "python3.14" +msgid "python3.15" +msgstr "python3.15" msgid "to the shell. [#]_ Since the choice of the directory where the interpreter lives is an installation option, other places are possible; check with your local Python guru or system administrator. (E.g., :file:`/usr/local/python` is a popular alternative location.)" msgstr "در پوسته. [#]_ از آنجا که انتخاب محل نصب مفسر به تنظیمات نصب بستگی دارد، ممکن است در مسیرهای دیگری نیز قرار داشته باشد؛ در این صورت با مسئول سیستم یا فرد آشنا با پایتون در سیستم خود مشورت کنید. (برای مثال، :file:`/usr/local/python` نیز محل رایج دیگری برای نصب است.)" @@ -74,14 +75,14 @@ msgid "When commands are read from a tty, the interpreter is said to be in *inte msgstr "وقتی دستورات از یک tty خوانده می‌شوند، گفته می‌شود که مفسر در *حالت تعاملی* قرار دارد. در این حالت، مفسر برای دریافت دستور بعدی، *اعلان اصلی* را نمایش می‌دهد که معمولاً شامل سه علامت بزرگ‌تر از (``>>>``) است. برای سطرهای ادامه نیز *اعلان ثانویه* را نمایش می‌دهد که به‌طور پیش‌فرض سه نقطه (``...``) است. پیش از نمایش اولین اعلان، مفسر پیام خوشامدگویی شامل شماره‌ی نسخه و اطلاعیه‌ی حق نشر را چاپ می‌کند:" msgid "" -"$ python3.14\n" -"Python 3.14 (default, April 4 2024, 09:25:04)\n" +"$ python3.15\n" +"Python 3.15 (default, May 7 2025, 15:46:04)\n" "[GCC 10.2.0] on linux\n" "Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n" ">>>" msgstr "" -"$ python3.14\n" -"Python 3.14 (default, April 4 2024, 09:25:04)\n" +"$ python3.15\n" +"Python 3.15 (default, May 7 2025, 15:46:04)\n" "[GCC 10.2.0] on linux\n" "Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n" ">>>" diff --git a/tutorial/stdlib.po b/tutorial/stdlib.po index f08df183..4a6df273 100644 --- a/tutorial/stdlib.po +++ b/tutorial/stdlib.po @@ -6,12 +6,13 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 09:30+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -34,14 +35,14 @@ msgstr "ماژول :mod:`os` ده‌ها تابع برای تعامل با سی msgid "" ">>> import os\n" ">>> os.getcwd() # Return the current working directory\n" -"'C:\\\\Python314'\n" +"'C:\\\\Python315'\n" ">>> os.chdir('/server/accesslogs') # Change current working directory\n" ">>> os.system('mkdir today') # Run the command mkdir in the system shell\n" "0" msgstr "" ">>> import os\n" ">>> os.getcwd() # Return the current working directory\n" -"'C:\\\\Python314'\n" +"'C:\\\\Python315'\n" ">>> os.chdir('/server/accesslogs') # Change current working directory\n" ">>> os.system('mkdir today') # Run the command mkdir in the system shell\n" "0" diff --git a/tutorial/stdlib2.po b/tutorial/stdlib2.po index eaeb87cb..5d434cc7 100644 --- a/tutorial/stdlib2.po +++ b/tutorial/stdlib2.po @@ -6,12 +6,13 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 09:32+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -377,7 +378,7 @@ msgid "" "Traceback (most recent call last):\n" " File \"\", line 1, in \n" " d['primary'] # entry was automatically removed\n" -" File \"C:/python314/lib/weakref.py\", line 46, in __getitem__\n" +" File \"C:/python315/lib/weakref.py\", line 46, in __getitem__\n" " o = self.data[key]()\n" "KeyError: 'primary'" msgstr "" @@ -400,7 +401,7 @@ msgstr "" "Traceback (most recent call last):\n" " File \"\", line 1, in \n" " d['primary'] # entry was automatically removed\n" -" File \"C:/python314/lib/weakref.py\", line 46, in __getitem__\n" +" File \"C:/python315/lib/weakref.py\", line 46, in __getitem__\n" " o = self.data[key]()\n" "KeyError: 'primary'" diff --git a/using/android.po b/using/android.po index 3259bbce..5239a9e6 100644 --- a/using/android.po +++ b/using/android.po @@ -6,12 +6,13 @@ # Translators: # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2024-09-27 14:19+0000\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -57,8 +58,8 @@ msgstr "`pyqtdeploy msgid "`Termux `__" msgstr "`Termux `__" -msgid "If you're sure you want to do all of this manually, read on. You can use the :source:`testbed app ` as a guide; each step below contains a link to the relevant file." -msgstr "اگر مطمئن هستید که می‌خواهید همه این کارها را به‌صورت دستی انجام دهید، به خواندن ادامه دهید. می‌توانید از :source:`اپلیکیشن testbed ` به‌عنوان راهنما استفاده کنید؛ هر یک از گام‌های زیر شامل پیوندی به پرونده مربوطه است." +msgid "If you're sure you want to do all of this manually, read on. You can use the :source:`testbed app ` as a guide; each step below contains a link to the relevant file." +msgstr "اگر مطمئن هستید که می‌خواهید همه‌ی این کارها را به‌صورت دستی انجام دهید، به خواندن ادامه دهید. می‌توانید از :source:`برنامه‌ی آزمایشگاهی ` به عنوان راهنما استفاده کنید؛ هر مرحله در ادامه شامل پیوندی به پرونده‌ی مربوطه است." msgid "First, acquire a build of Python for Android:" msgstr "ابتدا، یک ساخت‌ از پایتون برای اندروید به دست آورید:" @@ -66,11 +67,11 @@ msgstr "ابتدا، یک ساخت‌ از پایتون برای اندروید msgid "The easiest way is to download an Android release from `python.org `__. The ``prefix`` directory mentioned below is at the top level of the package." msgstr "آسان‌ترین راه، دانلود یک نسخه اندرویدی از `python.org `__ است. پوشه ``prefix`` که در ادامه ذکر می‌شود، در سطح بالای بسته قرار دارد." -msgid "Or if you want to build it yourself, follow the instructions in :source:`Android/README.md`. The ``prefix`` directory will be created under :samp:`cross-build/{HOST}`." -msgstr "یا اگر می‌خواهید آن را خودتان بسازید، دستورالعمل‌های :source:`Android/README.md` را دنبال کنید. پوشه‌ی ``prefix`` زیر :samp:`cross-build/{HOST}` ایجاد خواهد شد." +msgid "Or if you want to build it yourself, follow the instructions in :source:`Platforms/Android/README.md`. The ``prefix`` directory will be created under :samp:`cross-build/{HOST}`." +msgstr "یا اگر می‌خواهید آن را خودتان بسازید، دستورالعمل‌های موجود در :source:`Platforms/Android/README.md` را دنبال کنید. پوشه‌ی ``prefix`` در زیر :samp:`cross-build/{HOST}` ایجاد خواهد شد." -msgid "Add code to your :source:`build.gradle ` file to copy the following items into your project. All except your own Python code can be copied from ``prefix/lib``:" -msgstr "کدی به پرونده‌ی :source:`build.gradle ` خود اضافه کنید تا موارد زیر را به پروژه‌ی شما کپی کند. همه‌ی موارد به‌جز کد پایتون خودتان را می‌توان از ``prefix/lib`` کپی کرد:" +msgid "Add code to your :source:`build.gradle ` file to copy the following items into your project. All except your own Python code can be copied from ``prefix/lib``:" +msgstr "کد را به پرونده‌ی :source:`build.gradle ` خود اضافه کنید تا اقلام زیر در پروژه‌ی شما کپی شوند. همه‌ی موارد به جز کد پایتون خودتان را می‌توانید از ``prefix/lib`` کپی کنید:" msgid "In your JNI libraries:" msgstr "در کتابخانه‌های JNI شما:" @@ -90,11 +91,11 @@ msgstr "``python*.*`` (کتابخانه استاندارد پایتون)" msgid "``python*.*/site-packages`` (your own Python code)" msgstr "``python*.*/site-packages`` (کد پایتون خودتان)" -msgid "Add code to your app to :source:`extract the assets to the filesystem `." -msgstr "برای :source:`استخراج دارایی‌ها (assets) به سامانه فایل‌بندی ` کدی به برنامه‌تان اضافه کنید." +msgid "Add code to your app to :source:`extract the assets to the filesystem `." +msgstr "کدی را به برنامه‌ی خود اضافه کنید تا :source:`دارایی‌ها را در سیستم‌پرونده استخراج کند `." -msgid "Add code to your app to :source:`start Python in embedded mode `. This will need to be C code called via JNI." -msgstr "برای :source:`راه‌اندازی پایتون در حالت تعبیه‌شده `، کدی به برنامه‌ی خود اضافه کنید. این کد باید کد C باشد که از طریق JNI فراخوانی می‌شود." +msgid "Add code to your app to :source:`start Python in embedded mode `. This will need to be C code called via JNI." +msgstr "کدی را به برنامه‌ی خود اضافه کنید تا :source:`پایتون را در حالت تعبیه‌شده راه‌اندازی کند `. این کار نیازمند کدی به زبان C است که از طریق JNI فراخوانی شود." msgid "Building a Python package for Android" msgstr "ساخت بسته پایتون برای اندروید" diff --git a/using/cmdline.po b/using/cmdline.po index 2abb22d5..bb2d2985 100644 --- a/using/cmdline.po +++ b/using/cmdline.po @@ -7,13 +7,14 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" -"PO-Revision-Date: 2026-09-21 13:26+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 20:26+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" @@ -62,8 +63,8 @@ msgstr "هنگامی که با آرگومان نام پرونده یا با پر msgid "When called with a directory name argument, it reads and executes an appropriately named script from that directory." msgstr "هنگامی که با آرگومان نام یک پوشه فراخوانی شود، اسکریپتی با نام مناسب را از آن پوشه می‌خواند و اجرا می‌کند." -msgid "When called with ``-c command``, it executes the Python statement(s) given as *command*. Here *command* may contain multiple statements separated by newlines. Leading whitespace is significant in Python statements!" -msgstr "هنگامی که با ``-c command`` فراخوانی شود، دستور(های) پایتونِ داده‌شده به‌عنوان *command* را اجرا می‌کند. در اینجا *command* می‌تواند شامل چندین دستور باشد که با سطرهای جدید از هم جدا شده‌اند. فضای سفیدِ ابتدای سطر در دستورهای پایتون معنادار است!" +msgid "When called with ``-c command``, it executes the Python statement(s) given as *command*. Here *command* may contain multiple statements separated by newlines." +msgstr "هنگامی که با ``-c command`` فراخوانی شود، دستور(های) پایتون داده‌شده به عنوان *command* را اجرا می‌کند. در اینجا *command* ممکن است شامل چندین دستور باشد که با خط جدید از یکدیگر جدا شده‌اند." msgid "When called with ``-m module-name``, the given module is located using the standard import mechanism and executed as a script." msgstr "وقتی با ``-m module-name`` فراخوانی شود، ماژول داده‌شده با استفاده از سازوکار استاندارد ایمپورت یافته می‌شود و به‌عنوان یک اسکریپت اجرا می‌شود." @@ -214,6 +215,9 @@ msgstr "هنگام تبدیل :class:`bytes` یا :class:`bytearray` به :class msgid "Affects also comparisons of :class:`bytes` with :class:`int`." msgstr "همچنین بر مقایسه‌های :class:`bytes` با :class:`int` تأثیر می‌گذارد." +msgid "Deprecate :option:`-b` and :option:`!-bb` command line options and schedule them to become no-op in Python 3.17. These were primarily helpers for the Python 2 -> 3 transition. Starting with Python 3.17, no :exc:`BytesWarning` will be raised for these cases; use a type checker instead." +msgstr "گزینه‌های خط فرمان :option:`-b` و :option:`!-bb` منسوخ شده و زمان‌بندی شده‌اند تا در پایتون 3.17 به عملیات بی‌اثر تبدیل شوند. این گزینه‌ها در اصل کمکی برای گذار از پایتون ۲ به ۳ بودند. از پایتون 3.17 به بعد، هیچ :exc:`BytesWarning` برای این موارد ایجاد نخواهد شد؛ به جای آن از یک بررسی‌کننده نوع استفاده کنید." + msgid "If given, Python won't try to write ``.pyc`` files on the import of source modules. See also :envvar:`PYTHONDONTWRITEBYTECODE`." msgstr "در صورت داده شدن، پایتون هنگام ایمپورت ماژول‌های منبع تلاش نمی‌کند پرونده‌های ``.pyc`` را بنویسد. همچنین :envvar:`PYTHONDONTWRITEBYTECODE` را ببینید." @@ -372,14 +376,14 @@ msgstr "فیلدهای خالی با همه‌ی مقادیر مطابقت دا msgid "The *action* field is as explained above but only applies to warnings that match the remaining fields." msgstr "فیلد *اکشن* همان‌طور است که در بالا توضیح داده شد، اما فقط بر هشدارهایی اعمال می‌شود که با فیلدهای باقی‌مانده مطابقت داشته باشند." -msgid "The *message* field must match the whole warning message; this match is case-insensitive." -msgstr "فیلد *message* باید با تمام پیام هشدار تطبیق داشته باشد؛ این تطبیق بدون حساسیت به بزرگی و کوچکی حروف است." +msgid "The *message* field must match the start of the warning message; this match is case-insensitive. If it starts and ends with a forward slash (``/``), it specifies a regular expression, otherwise it specifies a literal string." +msgstr "فیلد *message* باید با ابتدای پیام هشدار مطابقت داشته باشد؛ این تطابق به بزرگی و کوچکی حروف حساس نیست. اگر با یک اسلش (``/``) شروع و تمام شود، یک عبارت باقاعده را مشخص می‌کند، در غیر این صورت یک رشته‌ی لفظی را مشخص می‌کند." msgid "The *category* field matches the warning category (ex: ``DeprecationWarning``). This must be a class name; the match test whether the actual warning category of the message is a subclass of the specified warning category." msgstr "فیلد *category* با دسته‌ی هشدار مطابقت دارد (مثلاً ``DeprecationWarning``). این باید یک نام کلاس باشد؛ این مطابقت بررسی می‌کند که آیا دسته‌ی هشدار واقعی پیام، زیرکلاسی از دسته‌ی هشدار مشخص‌شده است یا خیر." -msgid "The *module* field matches the (fully qualified) module name; this match is case-sensitive." -msgstr "فیلد *ماژول* با نام (کامل) ماژول تطبیق می‌کند؛ این تطبیق به بزرگی و کوچکی حروف حساس است." +msgid "The *module* field matches the (fully qualified) module name; this match is case-sensitive. If it starts and ends with a forward slash (``/``), it specifies a regular expression that the start of the fully qualified module name must match, otherwise it specifies a literal string that the fully qualified module name must be equal to." +msgstr "فیلد *module* با نام ماژول (به‌طور کامل واجد شرایط) مطابقت دارد؛ این تطابق به بزرگی و کوچکی حروف حساس است. اگر با یک اسلش (``/``) شروع و تمام شود، یک عبارت باقاعده را مشخص می‌کند که ابتدای نام ماژولِ کامل باید با آن مطابقت داشته باشد، در غیر این صورت یک رشته‌ی لفظی را مشخص می‌کند که نام ماژولِ کامل باید با آن برابر باشد." msgid "The *lineno* field matches the line number, where zero matches all line numbers and is thus equivalent to an omitted line number." msgstr "فیلد *lineno* با شماره سطر تطبیق می‌کند، که در آن صفر با همه شماره سطرها تطبیق می‌کند و بنابراین معادل شماره سطر ذکرنشده است." @@ -393,6 +397,9 @@ msgstr "هشدارها همچنین می‌توانند با استفاده از msgid "See :ref:`warning-filter` and :ref:`describing-warning-filters` for more details." msgstr "برای جزئیات بیشتر به :ref:`warning-filter` و :ref:`describing-warning-filters` مراجعه کنید." +msgid "Added regular expression support for *message* and *module*." +msgstr "پشتیبانی از عبارت باقاعده برای *message* و *module* اضافه شد." + msgid "Skip the first line of the source, allowing use of non-Unix forms of ``#!cmd``." msgstr "از سطر اول منبع بگذرید، که امکان استفاده از فرم‌های غیریونیکس ``#!cmd`` را می‌دهد." @@ -471,8 +478,11 @@ msgstr "این گزینه تنها در برخی پلتفرم‌ها در دست msgid ":samp:`-X cpu_count={n}` overrides :func:`os.cpu_count`, :func:`os.process_cpu_count`, and :func:`multiprocessing.cpu_count`. *n* must be greater than or equal to 1. This option may be useful for users who need to limit CPU resources of a container system. See also :envvar:`PYTHON_CPU_COUNT`. If *n* is ``default``, nothing is overridden." msgstr ":samp:`-X cpu_count={n}` :func:`os.cpu_count`، :func:`os.process_cpu_count` و :func:`multiprocessing.cpu_count` را بازنویسی می‌کند. *n* باید بزرگ‌تر یا مساوی ۱ باشد. این گزینه ممکن است برای کاربرانی که نیاز به محدود کردن منابع CPU یک سیستم کانتینری دارند، مفید باشد. همچنین :envvar:`PYTHON_CPU_COUNT` را ببینید. اگر *n* برابر ``default`` باشد، هیچ‌چیز بازنویسی نمی‌شود." -msgid ":samp:`-X presite={package.module}` specifies a module that should be imported before the :mod:`site` module is executed and before the :mod:`__main__` module exists. Therefore, the imported module isn't :mod:`__main__`. This can be used to execute code early during Python initialization. Python needs to be :ref:`built in debug mode ` for this option to exist. See also :envvar:`PYTHON_PRESITE`." -msgstr ":samp:`-X presite={package.module}` ماژولی را مشخص می‌کند که باید پیش از اجرای ماژول :mod:`site` و پیش از وجود داشتن ماژول :mod:`__main__` ایمپورت شود. بنابراین، ماژول ایمپورت‌شده :mod:`__main__` نیست. از این می‌توان برای اجرای کد در ابتدای راه‌اندازی پایتون استفاده کرد. پایتون باید :ref:`در حالت اشکال‌زدایی ساخته شده باشد ` تا این گزینه وجود داشته باشد. همچنین :envvar:`PYTHON_PRESITE` را ببینید." +msgid ":samp:`-X presite={module}` or :samp:`-X presite={module:func}` specifies an entry point that should be executed before the :mod:`site` module is executed and before the :mod:`__main__` module exists. Therefore, the imported module isn't :mod:`__main__`. This can be used to execute code early during Python initialization. Python needs to be :ref:`built in debug mode ` for this option to exist. See also :envvar:`PYTHON_PRESITE`." +msgstr ":samp:`-X presite={module}` یا :samp:`-X presite={module:func}` یک نقطه‌ی ورود را مشخص می‌کند که باید پیش از اجرای ماژول :mod:`site` و پیش از ایجاد ماژول :mod:`__main__` اجرا شود. بنابراین، ماژول واردشده :mod:`__main__` نیست. از این گزینه می‌توان برای اجرای زودهنگام کد در جریان مقداردهی اولیه‌ی پایتون استفاده کرد. برای در دسترس بودن این گزینه، پایتون باید در :ref:`حالت اشکال‌زدایی ساخته شده باشد `. همچنین :envvar:`PYTHON_PRESITE` را ببینید." + +msgid "Accept also ``module:func`` entry point format." +msgstr "همچنین فرمت نقطه‌ی ورودی ``module:func`` را بپذیرید." msgid ":samp:`-X gil={0,1}` forces the GIL to be disabled or enabled, respectively. Setting to ``0`` is only available in builds configured with :option:`--disable-gil`. See also :envvar:`PYTHON_GIL` and :ref:`whatsnew313-free-threaded-cpython`." msgstr ":samp:`-X gil={0,1}` قفل مفسر سراسری (GIL) را به‌ترتیب مجبور به غیرفعال یا فعال شدن می‌کند. تنظیم به ``0`` تنها در ساخت‌های پیکربندی‌شده با :option:`--disable-gil` در دسترس است. همچنین :envvar:`PYTHON_GIL` و :ref:`whatsnew313-free-threaded-cpython` را ببینید." @@ -483,9 +493,15 @@ msgstr ":samp:`-X thread_inherit_context={0,1}` باعث می‌شود :class:`~ msgid ":samp:`-X context_aware_warnings={0,1}` causes the :class:`warnings.catch_warnings` context manager to use a :class:`~contextvars.ContextVar` to store warnings filter state. If unset, the value of this option defaults to ``1`` on free-threaded builds and to ``0`` otherwise. See also :envvar:`PYTHON_CONTEXT_AWARE_WARNINGS`." msgstr ":samp:`-X context_aware_warnings={0,1}` باعث می‌شود مدیر زمینه :class:`warnings.catch_warnings` برای ذخیره وضعیت فیلتر هشدارها از یک :class:`~contextvars.ContextVar` استفاده کند. اگر تنظیم نشده باشد، مقدار این گزینه در ساخت‌های نخ‌آزاد به‌طور پیش‌فرض ``1`` و در غیر این صورت ``0`` است. همچنین :envvar:`PYTHON_CONTEXT_AWARE_WARNINGS` را ببینید." +msgid ":samp:`-X pathconfig_warnings={0,1}` if true (``1``) then :ref:`sys-path-init` is allowed to log warnings into stderr. If false (``0``) suppress these warnings. Set to true by default. See also :envvar:`PYTHON_PATHCONFIG_WARNINGS`." +msgstr ":samp:`-X pathconfig_warnings={0,1}` اگر درست باشد (``1``) آنگاه :ref:`sys-path-init` مجاز است هشدارها را در stderr ثبت کند. اگر نادرست باشد (``0``) این هشدارها را سرکوب کنید. به طور پیش‌فرض روی درست تنظیم شده است. همچنین ببینید :envvar:`PYTHON_PATHCONFIG_WARNINGS`." + 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 ":samp:`-X tlbc={0,1}` در ساخت‌هایی که با :option:`--disable-gil` پیکربندی شده‌اند، بایت‌کد نخ‌محلی را فعال (1، پیش‌فرض) یا غیرفعال (0) می‌کند. در صورت غیرفعال بودن، مفسر تخصص‌ساز (specializing interpreter) نیز غیرفعال می‌شود. همچنین ببینید: :envvar:`PYTHON_TLBC`." +msgid ":samp:`-X lazy_imports={all,normal}` controls lazy import behavior. ``all`` makes all imports lazy by default, and ``normal`` (the default) respects the ``lazy`` keyword in source code. See also :envvar:`PYTHON_LAZY_IMPORTS`." +msgstr ":samp:`-X lazy_imports={all,normal}` رفتار ایمپورت تنبل را کنترل می‌کند. مقدار ``all`` تمام ایمپورت‌ها را به طور پیش‌فرض تنبل می‌کند، و ``normal`` (پیش‌فرض) به کلیدواژه ``lazy`` در کد منبع احترام می‌گذارد. همچنین ببینید :envvar:`PYTHON_LAZY_IMPORTS`." + msgid "It also allows passing arbitrary values and retrieving them through the :data:`sys._xoptions` dictionary." msgstr "این گزینه همچنین امکان ارسال مقادیر دلخواه و بازیابی آن‌ها از طریق دیکشنری :data:`sys._xoptions` را فراهم می‌کند." @@ -618,12 +634,15 @@ msgstr "بخش ``encodingname`` اکنون اختیاری است." msgid "On Windows, the encoding specified by this variable is ignored for interactive console buffers unless :envvar:`PYTHONLEGACYWINDOWSSTDIO` is also specified. Files and pipes redirected through the standard streams are not affected." msgstr "در ویندوز، کدگذاری تعیین‌شده توسط این متغیر برای بافرهای کنسول تعاملی نادیده گرفته می‌شود، مگر اینکه :envvar:`PYTHONLEGACYWINDOWSSTDIO` نیز تعیین‌شده باشد. پرونده‌ها و پایپ‌هایی که از طریق جریان‌های استاندارد تغییر مسیر داده‌شده‌اند، تأثیر نمی‌پذیرند." -msgid "If this is set, Python won't add the :data:`user site-packages directory ` to :data:`sys.path`." -msgstr "اگر این تنظیم شده باشد، پایتون :data:`پوشه‌ی site-packages کاربر ` را به :data:`sys.path` اضافه نمی‌کند." +msgid "This is equivalent to the :option:`-s` option. If this is set, Python won't add the :data:`user site-packages directory ` to :data:`sys.path`." +msgstr "این کار معادل گزینه ی :option:`-s` است. اگر این گزینه تنظیم شود، پایتون پوشه ی بسته های سایت کاربر :data:`user site-packages directory ` را به :data:`sys.path` اضافه نمی کند." msgid "Defines the :data:`user base directory `, which is used to compute the path of the :data:`user site-packages directory ` and :ref:`installation paths ` for ``python -m pip install --user``." msgstr ":data:`پوشه‌ی پایه‌ی کاربر ` را تعریف می‌کند که برای محاسبه‌ی مسیر :data:`پوشه‌ی site-packages کاربر ` و :ref:`مسیر‌های نصب ` برای ``python -m pip install --user`` استفاده می‌شود." +msgid "To disable the user site-packages, see :envvar:`PYTHONNOUSERSITE` or the :option:`-s` option." +msgstr "برای غیرفعال کردن بسته‌های سایت کاربر، :envvar:`PYTHONNOUSERSITE` یا گزینه‌ی :option:`-s` را ببینید." + msgid "If this environment variable is set, ``sys.argv[0]`` will be set to its value instead of the value got through the C runtime. Only works on macOS." msgstr "اگر این متغیر محیطی تنظیم شده باشد، ``sys.argv[0]`` به‌جای مقداری که از ران‌تایم C به دست می‌آید، به مقدار آن تنظیم می‌شود. فقط روی macOS کار می‌کند." @@ -710,6 +729,18 @@ msgstr "اگر متغیر محیطی :envvar:`PYTHONMALLOC` برای اجبار 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 "اکنون می‌توان از این متغیر روی پایتون کامپایل‌شده در حالت انتشار نیز استفاده کرد. اکنون اگر روی رشته‌ی خالی تنظیم شود، هیچ اثری نخواهد داشت." +msgid "If set to a non-zero integer, enable huge page support for :ref:`pymalloc ` arenas. Set to ``0`` or unset to disable. Python must be compiled with :option:`--with-pymalloc-hugepages` for this variable to have any effect." +msgstr "اگر روی یک عدد صحیح غیرصفر تنظیم شود، پشتیبانی از صفحات بزرگ را برای ناحیه‌های حافظه یا همان :ref:`pymalloc ` فعال می‌کند. برای غیرفعال کردن، آن را روی ``0`` قرار دهید یا تنظیم نکنید. پایتون باید با گزینه‌ی :option:`--with-pymalloc-hugepages` کامپایل‌شده باشد تا این متغیر تأثیری داشته باشد." + +msgid "When enabled, arena allocation uses ``MAP_HUGETLB`` (Linux) or ``MEM_LARGE_PAGES`` (Windows) with automatic fallback to regular pages if huge pages are not available." +msgstr "هنگامی که فعال باشد، تخصیص ناحیه‌ی حافظه از ``MAP_HUGETLB`` (لینوکس) یا ``MEM_LARGE_PAGES`` (ویندوز) استفاده می‌کند و اگر صفحات بزرگ در دسترس نباشند، به‌طور خودکار به صفحات معمولی برمی‌گردد." + +msgid "On Linux, if the huge-page pool is exhausted, page faults — including copy-on-write faults triggered by :func:`os.fork` — deliver ``SIGBUS`` and kill the process. Only enable this in environments where the huge-page pool is properly sized and fork-safety is not a concern." +msgstr "در لینوکس، اگر استخر صفحات بزرگ تمام شود، خطاهای حافظه (page fault) — از جمله خطاهای کپی هنگام نوشتن (copy-on-write) که توسط :func:`os.fork` ایجاد می‌شوند — سیگنال ``SIGBUS`` را صادر کرده و فرایند را متوقف می‌کنند. این ویژگی را فقط در محیط‌هایی فعال کنید که استخر صفحات بزرگ اندازه‌گیری مناسبی داشته باشد و ایمنی انشعاب (fork-safety) دغدغه‌ی نباشد." + +msgid "On Windows you need a special privilege. See the `Windows documentation for large pages `_ for details. Python will fail on startup if the required privilege `SeLockMemoryPrivilege `_ is not held by the user." +msgstr "در ویندوز به دسترسی ویژه‌ای نیاز دارید. برای جزئیات بیشتر، `مستندات ویندوز برای صفحات بزرگ `_ را ببینید. اگر کاربر دسترسی لازم `SeLockMemoryPrivilege `_ را نداشته باشد، پایتون هنگام راه‌اندازی با خطا مواجه خواهد شد." + 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 'replace', respectively. Otherwise, the new defaults 'utf-8' and 'surrogatepass' are used." msgstr "اگر روی رشته‌ای غیرخالی تنظیم شود، حالت پیش‌فرض :term:`filesystem encoding and error handler` به‌ترتیب به مقادیر پیش از 3.6 خود یعنی 'mbcs' و 'replace' بازمی‌گردد. در غیر این صورت، پیش‌فرض‌های جدید 'utf-8' و 'surrogatepass' استفاده می‌شوند." @@ -818,6 +849,9 @@ msgstr "اگر این متغیر روی ``1`` تنظیم شود، مفسر ان msgid "If this variable is set to any value, the interpreter will not attempt to load the Python-based :term:`REPL` that requires :mod:`readline`, and will instead use the traditional parser-based :term:`REPL`." msgstr "اگر این متغیر به هر مقداری تنظیم شده باشد، مفسر تلاش نخواهد کرد :term:`REPL` مبتنی بر پایتون را که به :mod:`readline` نیاز دارد بارگذاری کند، و در عوض از :term:`REPL` سنتی مبتنی بر پارسر استفاده خواهد کرد." +msgid "If this variable is set to any value, PyREPL will use :mod:`rlcompleter` to implement tab completion, instead of the default one which uses colors." +msgstr "اگر این متغیر روی هر مقداری تنظیم شود، PyREPL به جای مقدار پیش‌فرضی که از رنگ‌ها استفاده می‌کند، از ماژول :mod:`rlcompleter` برای پیاده‌سازی تکمیل خودکار با کلید تب (tab completion) استفاده خواهد کرد." + 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 "از این متغیر محیطی می‌توان برای تعیین مکان پرونده ``.python_history`` استفاده کرد (به‌طور پیش‌فرض، این پرونده ``.python_history`` در پوشه خانگی کاربر است)." @@ -833,6 +867,9 @@ msgstr "اگر این متغیر روی ``1`` تنظیم شده باشد، :clas msgid "If set to ``1`` then the :class:`warnings.catch_warnings` context manager will use a :class:`~contextvars.ContextVar` to store warnings filter state. If unset, this variable defaults to ``1`` on free-threaded builds and to ``0`` otherwise. See :option:`-X context_aware_warnings<-X>`." msgstr "اگر روی ``1`` تنظیم شده باشد، مدیر زمینه‌ی :class:`warnings.catch_warnings` برای ذخیره‌سازی وضعیت فیلتر هشدارها از یک :class:`~contextvars.ContextVar` استفاده خواهد کرد. اگر تنظیم نشده باشد، مقدار پیش‌فرض این متغیر در ساخت‌های نخ‌آزاد ``1`` و در غیر این صورت ``0`` است. به :option:`-X context_aware_warnings<-X>` مراجعه کنید." +msgid "If true (``1``) then :ref:`sys-path-init` is allowed to log warnings into stderr. If false (``0``) suppress these warnings. Set to true by default. See also :option:`-X pathconfig_warnings<-X>`." +msgstr "اگر درست باشد (``1``)، اجازه‌ی ثبت هشدارها توسط :ref:`sys-path-init` در خروجی خطای استاندارد (stderr) داده می‌شود. اگر نادرست باشد (``0``)، این هشدارها سرکوب می‌شوند. به‌طور پیش‌فرض روی درست تنظیم شده است. همچنین نگاه کنید به :option:`-X pathconfig_warnings<-X>`." + 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 "در ساخت‌هایی (builds) که کامپایل در لحظه (JIT) به‌صورت آزمایشی در دسترس است، این متغیر می‌تواند JIT را هنگام راه‌اندازی مفسر به‌اجبار غیرفعال (``0``) یا فعال (``1``) کند." @@ -842,6 +879,12 @@ msgstr "اگر روی ``1`` تنظیم شود، بایت‌کد نخ‌محلی msgid "See also the :option:`-X tlbc <-X>` command-line option." msgstr "همچنین گزینه‌ی خط فرمان :option:`-X tlbc <-X>` را ببینید." +msgid "Controls lazy import behavior. Accepts two values: ``all`` makes all imports lazy by default, and ``normal`` (the default) respects the ``lazy`` keyword in source code." +msgstr "رفتار ایمپورت تنبل را کنترل می‌کند. دو مقدار را می‌پذیرد: ``all`` تمام ایمپورت‌ها را به‌طور پیش‌فرض تنبل می‌کند، و ``normal`` (پیش‌فرض) به کلیدواژه ``lazy`` در کد منبع احترام می‌گذارد." + +msgid "See also the :option:`-X lazy_imports <-X>` command-line option." +msgstr "همچنین نگاه کنید به گزینه ی خط فرمان :option:`-X lazy_imports <-X>`." + msgid "Debug-mode variables" msgstr "متغیرهای حالت اشکال‌زدایی" @@ -868,3 +911,9 @@ msgstr "همچنین گزینه‌ی خط فرمان :option:`-X presite <-X>` msgid "Needs Python configured with the :option:`--with-pydebug` build option." msgstr "نیازمند پایتونی است که با گزینه‌ی ساخت :option:`--with-pydebug` پیکربندی‌شده باشد." + +#~ msgid "The *message* field must match the whole warning message; this match is case-insensitive." +#~ msgstr "فیلد *message* باید با تمام پیام هشدار تطبیق داشته باشد؛ این تطبیق بدون حساسیت به بزرگی و کوچکی حروف است." + +#~ msgid "The *module* field matches the (fully qualified) module name; this match is case-sensitive." +#~ msgstr "فیلد *ماژول* با نام (کامل) ماژول تطبیق می‌کند؛ این تطبیق به بزرگی و کوچکی حروف حساس است." diff --git a/using/configure.po b/using/configure.po index 3b22351e..80932ce2 100644 --- a/using/configure.po +++ b/using/configure.po @@ -6,13 +6,15 @@ # Translators: # Alireza Shabani (Revisto) , 2025 # Sepehr Rasouli , 2026 +# mahdyaralipor , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-29 04:09+0000\n" -"PO-Revision-Date: 2026-09-14 10:31+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 20:27+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" @@ -375,6 +377,28 @@ msgstr "``yes``: :program:`pkg-config` الزامی است" msgid "``no``: configure does not use :program:`pkg-config` even when present" msgstr "``no``: configure حتی وقتی :program:`pkg-config` موجود باشد، از آن استفاده نمی‌کند" +msgid "Path to a `JSON `_ configuration file containing custom error messages for missing :term:`standard library` modules." +msgstr "مسیر یک پرونده‌ی پیکربندی `JSON `_ که حاوی پیام‌های خطای سفارشی برای ماژول‌های مفقود :term:`کتابخانه‌ی استاندارد ` است." + +msgid "This option is intended for Python distributors who wish to provide distribution-specific guidance when users encounter standard library modules that are missing or packaged separately." +msgstr "این گزینه‌ی برای توزیع‌کنندگان پایتون در نظر گرفته شده است که می‌خواهند هنگامی که کاربران با ماژول‌های کتابخانه‌ی استاندارد که مفقود شده‌اند یا به‌طور جداگانه بسته‌بندی شده‌اند مواجه می‌شوند، راهنمایی‌های مختصِ آن توزیع را ارائه دهند." + +msgid "The JSON file should map missing module names to custom error message strings. For example, if your distribution packages :mod:`tkinter` and :mod:`_tkinter` separately and excludes :mod:`!_gdbm` for legal reasons, the configuration could contain:" +msgstr "پرونده‌ی JSON باید نام ماژول‌های مفقود را به رشته‌های پیام خطای سفارشی نگاشت کند. برای مثال، اگر توزیع شما بسته‌های :mod:`tkinter` و :mod:`_tkinter` را به‌طور جداگانه بسته‌بندی کند و به دلایل قانونی :mod:`!_gdbm` را کنار بگذارد، پیکربندی می‌تواند شامل موارد زیر باشد:" + +msgid "" +"{\n" +" \"_gdbm\": \"The '_gdbm' module is not available in this distribution\",\n" +" \"tkinter\": \"Install the python-tk package to use tkinter\",\n" +" \"_tkinter\": \"Install the python-tk package to use tkinter\",\n" +"}" +msgstr "" +"{\n" +" \"_gdbm\": \"The '_gdbm' module is not available in this distribution\",\n" +" \"tkinter\": \"Install the python-tk package to use tkinter\",\n" +" \"_tkinter\": \"Install the python-tk package to use tkinter\",\n" +"}" + msgid "Turn on internal Python performance statistics gathering." msgstr "فعال کردن گردآوری آمار کارایی داخلی پایتون." @@ -531,6 +555,9 @@ msgstr "مسیر ابزار ``pkg-config``." msgid "``pkg-config`` options." msgstr "گزینه‌های ``pkg-config``." +msgid "Build without ``epoll``, meaning that :py:func:`select.epoll` will not be present even if the system provides an :manpage:`epoll_create ` function. This may be used on systems where :manpage:`!epoll_create` or :manpage:`epoll_create1 ` is available but incompatible with Linux semantics." +msgstr "ساخت بدون ``epoll``، به این معنا که تابع :py:func:`select.epoll` حتی اگر سیستم یک تابع :manpage:`epoll_create ` را فراهم کند، حضور نخواهد داشت. این ممکن است روی سیستم‌هایی استفاده شود که در آن‌ها :manpage:`!epoll_create` یا :manpage:`epoll_create1 ` موجود است اما با معناشناسی لینوکس سازگار نیست." + msgid "C compiler options" msgstr "گزینه‌های کامپایلر C" @@ -720,6 +747,30 @@ msgstr "فعال کردن گوتوهای محاسبه‌شده (computed goto) msgid "Enable interpreters using tail calls in CPython. If enabled, enabling PGO (:option:`--enable-optimizations`) is highly recommended. This option specifically requires a C compiler with proper tail call support, and the `preserve_none `_ calling convention. For example, Clang 19 and newer supports this feature." msgstr "فعال کردن مفسرهایی که در سی‌پایتون از فراخوانی‌های دمی استفاده می‌کنند. در صورت فعال بودن، فعال‌سازی PGO (:option:`--enable-optimizations`) به‌شدت توصیه می‌شود. این گزینه به‌طور خاص به کامپایلر C با پشتیبانی مناسب از فراخوانی دمی و قرارداد فراخوانی `preserve_none `_ نیاز دارد. برای مثال، Clang 19 و نسخه‌های جدیدتر از این قابلیت پشتیبانی می‌کنند." +msgid "Disable frame pointers, which are enabled by default (see :pep:`831`)." +msgstr "غیرفعال کردن اشاره‌گرهای قاب (frame pointer)، که به‌طور پیش‌فرض فعال هستند (به :pep:`831` مراجعه کنید)." + +msgid "By default, the build appends flags to generate frame or backchain pointers to ``BASECFLAGS``:" +msgstr "به‌طور پیش‌فرض، فرایند ساخت پرچم‌هایی را برای تولید اشاره‌گرهای قاب یا زنجیره‌ی پشتی به ``BASECFLAGS`` اضافه می‌کند:" + +msgid "``-fno-omit-frame-pointer`` and/or ``-mno-omit-leaf-frame-pointer`` are added when the compiler supports them." +msgstr "هنگامی که کامپایلر از آن‌ها پشتیبانی کند، ``-fno-omit-frame-pointer`` و/یا ``-mno-omit-leaf-frame-pointer`` اضافه می‌شوند." + +msgid "``-marm`` and/or ``-mno-thumb`` is added on 32-bit ARM when supported," +msgstr "هنگامی که پشتیبانی شود، ``-marm`` و/یا ``-mno-thumb`` روی معماری ۳۲ بیتی ARM اضافه می‌شوند،" + +msgid "on s390x platforms, when supported, ``-mbackchain`` is added *instead*. of the above frame pointer flags." +msgstr "روی پلتفرم‌های s390x، در صورت پشتیبانی، ``-mbackchain`` *به‌جای* پرچم‌های اشاره‌گر قاب ذکر شده در بالا اضافه می‌شود." + +msgid "on ppc64le platforms, no compiler flags is needed since the power ABI requires that compilers maintain a back chain by default." +msgstr "روی پلتفرم‌های ppc64le، از آنجا که رابط دودویی کاربردی (ABI) پاور ایجاب می‌کند که کامپایلرها به‌طور پیش‌فرض زنجیره‌ی پشتی را حفظ کنند، نیازی به پرچم کامپایلر نیست." + +msgid "Frame pointers enable profilers, debuggers, and system tracing tools (``perf``, ``eBPF``, ``dtrace``, ``gdb``) to walk the C call stack without DWARF metadata. The flags propagate to third-party C extensions through :mod:`sysconfig`. On compilers that do not understand them, the build silently skips them." +msgstr "اشاره‌گرهای قاب به پروفایل‌گیرها، اشکال‌زداها و ابزارهای ردیابی سیستم (مانند ``perf``، ``eBPF``، ``dtrace``، ``gdb``) امکان می‌دهند تا پشته‌ی فراخوانی C را بدون متادیتای DWARF پیمایش کنند. این پرچم‌ها از طریق :mod:`sysconfig` به برنامه‌های افزودنی C شخص ثالث منتقل می‌شوند. روی کامپایلرهایی که آن‌ها را درک نمی‌کنند، فرایند ساخت به‌طور بی‌صدا از آن‌ها عبور می‌کند." + +msgid "Downstream packagers and authors of native libraries built with custom build systems should set the same flags so the unwind chain stays unbroken across all native frames." +msgstr "توزیع‌کنندگان پایین‌دست و توسعه‌دهندگان کتابخانه‌های بومی که با سیستم‌های ساخت سفارشی ساخته شده‌اند باید همان پرچم‌ها را تنظیم کنند تا زنجیره‌ی بازگشایی در تمامی قاب‌های بومی دست‌نخورده باقی بماند." + msgid "Disable the fast :ref:`mimalloc ` allocator (enabled by default)." msgstr "غیرفعال کردن تخصیص‌دهنده‌ی سریع :ref:`mimalloc ` (به‌طور پیش‌فرض فعال است)." @@ -732,6 +783,24 @@ msgstr "همچنین متغیر محیطی :envvar:`PYTHONMALLOC` را ببین msgid "Disable the specialized Python memory allocator :ref:`pymalloc ` (enabled by default)." msgstr "غیرفعال کردن تخصیص‌دهنده حافظه‌ی تخصصی پایتون :ref:`pymalloc ` (که به‌طور پیش‌فرض فعال است)." +msgid "Enable huge page support for :ref:`pymalloc ` arenas (disabled by default). When enabled, the arena size on 64-bit platforms is increased to 2 MiB and arena allocation uses ``MAP_HUGETLB`` (Linux) or ``MEM_LARGE_PAGES`` (Windows) with automatic fallback to regular pages." +msgstr "فعال‌سازی پشتیبانی از صفحات بزرگ (huge page) برای آرناهای :ref:`pymalloc ` (به‌طور پیش‌فرض غیرفعال است). هنگامی که فعال باشد، اندازه‌ی آرنا در پلتفرم‌های ۶۴ بیتی به ۲ مگابایت افزایش می‌یابد و تخصیص آرنا از ``MAP_HUGETLB`` (لینوکس) یا ``MEM_LARGE_PAGES`` (ویندوز) با جایگزین خودکار به صفحات معمولی استفاده می‌کند." + +msgid "Even when compiled with this option, huge pages are **not** used at runtime unless the :envvar:`PYTHON_PYMALLOC_HUGEPAGES` environment variable is set to ``1``. This opt-in is required because huge pages" +msgstr "حتی هنگام کامپایل‌شده با این گزینه، صفحات بزرگ در طول ران‌تایم **استفاده نمی‌شوند** مگر اینکه متغیر محیطی :envvar:`PYTHON_PYMALLOC_HUGEPAGES` روی ``1`` تنظیم شود. این انتخاب اختیاری لازم است زیرا صفحات بزرگ" + +msgid "carry risks on Linux: if the huge-page pool is exhausted, page faults (including copy-on-write faults after :func:`os.fork`) deliver ``SIGBUS`` and kill the process." +msgstr "خطراتی را روی لینوکس به همراه دارند: اگر استخر صفحات بزرگ تخلیه شود، خطاهای صفحه (شامل خطاهای copy-on-write پس از :func:`os.fork`) سیگنال ``SIGBUS`` را تحویل داده و فرایند را متوقف می‌کنند." + +msgid "need a special privilege on Windows. See the `Windows documentation for large pages `_ for details. Python will fail on startup if the required privilege `SeLockMemoryPrivilege `_ is not held by the user." +msgstr "روی ویندوز به دسترسی ویژه‌ای نیاز دارند. برای جزئیات، `مستندات ویندوز برای صفحات بزرگ `_ را ببینید. اگر دسترسی لازم `SeLockMemoryPrivilege `_ توسط کاربر وجود نداشته باشد، پایتون هنگام راه‌اندازی با خطا مواجه خواهد شد." + +msgid "The configure script checks that the platform supports ``MAP_HUGETLB`` and emits a warning if it is not available." +msgstr "اسکریپت کانفیگ بررسی می‌کند که آیا پلتفرم از ``MAP_HUGETLB`` پشتیبانی می‌کند یا خیر، و در صورت در دسترس نبودن، هشداری صادر می‌کند." + +msgid "On Windows, use the ``--pymalloc-hugepages`` flag with ``build.bat`` or set the ``UsePymallocHugepages`` MSBuild property." +msgstr "روی ویندوز، از پرچم ``--pymalloc-hugepages`` به همراه ``build.bat`` استفاده کنید یا ویژگی ``UsePymallocHugepages`` در MSBuild را تنظیم کنید." + msgid "Disable static documentation strings to reduce the memory footprint (enabled by default). Documentation strings defined in Python are not affected." msgstr "غیرفعال‌سازی رشته‌های مستند ایستا برای کاهش مصرف حافظه (به‌صورت پیش‌فرض فعال است). رشته‌های مستند تعریف‌شده در پایتون تحت تأثیر قرار نمی‌گیرند." @@ -879,6 +948,15 @@ msgstr "فعال‌سازی ساخت کتابخانه‌ی اشتراکی پای msgid "Do not build ``libpythonMAJOR.MINOR.a`` and do not install ``python.o`` (built and enabled by default)." msgstr "``libpythonMAJOR.MINOR.a`` ساخته نمی‌شود و ``python.o`` نصب نمی‌شود (به‌طور پیش‌فرض ساخته و فعال می‌شوند)." +msgid "Do not link the Python interpreter binary (``python3``) against the shared Python library; instead, statically link the interpreter against ``libpython`` as if ``--enable-shared`` had not been used, but continue to build the shared ``libpython`` (for use by other programs)." +msgstr "فایل دودویی مفسر پایتون (``python3``) را به کتابخانه‌ی مشترک پایتون لینک نکنید؛ در عوض، مفسر را به‌طور ایستا به ``libpython`` لینک کنید، گویی از ``--enable-shared`` استفاده نشده است، اما به ساخت ``libpython`` مشترک (برای استفاده‌ی سایر برنامه‌ها) ادامه دهید." + +msgid "This option does nothing if ``--enable-shared`` is not used." +msgstr "اگر از ``--enable-shared`` استفاده نشود، این گزینه هیچ کاری انجام نمی‌دهد." + +msgid "The default (when ``-enable-shared`` is used) is to link the Python interpreter against the built shared library." +msgstr "حالت پیش‌فرض (هنگامی که از ``-enable-shared`` استفاده می‌شود) این است که مفسر پایتون به کتابخانه‌ی مشترک ساخته‌شده لینک شود." + msgid "Libraries options" msgstr "گزینه‌های کتابخانه‌ها" @@ -1071,8 +1149,8 @@ msgstr "کتابخانه استاندارد پایتون شامل رشته‌ه msgid "iOS Options" msgstr "گزینه‌های iOS" -msgid "See :source:`iOS/README.rst`." -msgstr "به :source:`iOS/README.rst` مراجعه کنید." +msgid "See :source:`Platforms/Apple/iOS/README.md`." +msgstr "نگاه کنید به :source:`Platforms/Apple/iOS/README.md`." msgid "Create a Python.framework. Unlike macOS, the *INSTALLDIR* argument specifying the installation path is mandatory." msgstr "ایجاد یک Python.framework. برخلاف macOS، آرگومان *INSTALLDIR* که مسیر نصب را مشخص می‌کند، الزامی است." @@ -1441,6 +1519,9 @@ msgstr "مقدار متغیر :envvar:`LDFLAGS_NODIST` که به اسکریپت msgid "Linker flags, e.g. :samp:`-L{lib_dir}` if you have libraries in a nonstandard directory *lib_dir*." msgstr "پرچم‌های پیونددهنده، برای مثال :samp:`-L{lib_dir}` اگر کتابخانه‌ها را در پوشه‌ی غیراستاندارد *lib_dir* دارید." +msgid "Please consider using ``EXE_LDFLAGS`` if the supplied linker flags are executable specific, e.g. GCC's ``-pie`` flag." +msgstr "اگر پرچم‌های پیونددهنده‌ی ارائه‌شده مختص فایل اجرایی هستند (مانند پرچم ``-pie`` در GCC)، لطفاً استفاده از ``EXE_LDFLAGS`` را در نظر بگیرید." + msgid "Linker flags to pass libraries to the linker when linking the Python executable." msgstr "پرچم‌های پیونددهنده برای فرستادن کتابخانه‌ها به پیونددهنده هنگام پیوند دادن پرونده اجرایی پایتون." @@ -1468,6 +1549,18 @@ msgstr "پیش‌فرض: ``$(CONFIGURE_LDFLAGS_NODIST) $(LDFLAGS_NODIST)``." msgid "Linker flags used for building the interpreter object files." msgstr "پرچم‌های پیونددهنده که برای ساخت پرونده‌های شیء مفسر استفاده می‌شوند." +msgid "Linker flags used for building executable targets such as the interpreter. If supplied, :envvar:`PY_CORE_EXE_LDFLAGS` will be used in replacement of :envvar:`PY_CORE_LDFLAGS`." +msgstr "پرچم‌های پیونددهنده‌ای که برای ساخت اهداف اجرایی مانند مفسر استفاده می‌شوند. در صورت ارائه، :envvar:`PY_CORE_EXE_LDFLAGS` به جای :envvar:`PY_CORE_LDFLAGS` استفاده خواهد شد." + +msgid "Value of :envvar:`EXE_LDFLAGS` variable passed to the ``./configure`` script." +msgstr "مقدار متغیر :envvar:`EXE_LDFLAGS` که به اسکریپت ``./configure`` پاس داده می شود." + +msgid "Linker flags used for building the interpreter and executable targets." +msgstr "پرچم های پیونددهنده ی مورد استفاده برای ساخت مفسر و اهداف اجرایی." + +msgid "Default: ``$(PY_CORE_LDFLAGS)``" +msgstr "پیش فرض: ``$(PY_CORE_LDFLAGS)``" + msgid "Footnotes" msgstr "پانوشت‌ها" diff --git a/using/ios.po b/using/ios.po index 9a6a618e..8c4ed3b7 100644 --- a/using/ios.po +++ b/using/ios.po @@ -7,13 +7,14 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" -"PO-Revision-Date: 2026-09-15 07:49+0330\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" +"PO-Revision-Date: 2026-10-06 20:26+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" @@ -128,8 +129,8 @@ msgstr "پایتون را می‌توان با استفاده از Swift یا Ob msgid "To add Python to an iOS Xcode project:" msgstr "برای افزودن پایتون به یک پروژه Xcode در iOS:" -msgid "Build or obtain a Python ``XCFramework``. See the instructions in :source:`Apple/iOS/README.md` (in the CPython source distribution) for details on how to build a Python ``XCFramework``. At a minimum, you will need a build that supports ``arm64-apple-ios``, plus one of either ``arm64-apple-ios-simulator`` or ``x86_64-apple-ios-simulator``." -msgstr "یک ``XCFramework`` پایتون بسازید یا به دست آورید. برای جزئیات نحوه‌ی ساخت یک ``XCFramework`` پایتون، به دستورالعمل‌های موجود در :source:`Apple/iOS/README.md` (در توزیع کد منبع سی‌پایتون) مراجعه کنید. دست‌کم به ساخت‌ی نیاز دارید که از ``arm64-apple-ios`` پشتیبانی کند، به‌علاوه‌ی یکی از دو مورد ``arm64-apple-ios-simulator`` یا ``x86_64-apple-ios-simulator``." +msgid "Build or obtain a Python ``XCFramework``. See the instructions in :source:`Platforms/Apple/iOS/README.md` (in the CPython source distribution) for details on how to build a Python ``XCFramework``. At a minimum, you will need a build that supports ``arm64-apple-ios``, plus one of either ``arm64-apple-ios-simulator`` or ``x86_64-apple-ios-simulator``." +msgstr "یک ``XCFramework`` پایتون را بسازید یا تهیه کنید. برای جزئیات مربوط به نحوه‌ی ساخت یک ``XCFramework`` پایتون، به دستورالعمل‌های موجود در :source:`Platforms/Apple/iOS/README.md` (در توزیع کد منبع CPython) مراجعه کنید. حداقل به ساختی نیاز دارید که از ``arm64-apple-ios`` پشتیبانی کند، به‌علاوه یکی از ``arm64-apple-ios-simulator`` یا ``x86_64-apple-ios-simulator``." msgid "Drag the ``XCframework`` into your iOS project. In the following instructions, we'll assume you've dropped the ``XCframework`` into the root of your project; however, you can use any other location that you want by adjusting paths as needed." msgstr "``XCframework`` را به پروژه‌ی iOS خود بکشید. در دستورالعمل‌های زیر فرض می‌کنیم که ``XCframework`` را در ریشه‌ی پروژه‌تان رها کرده‌اید؛ با این حال، می‌توانید با تنظیم مسیرها در صورت نیاز، از هر مکان دیگری که بخواهید استفاده کنید." @@ -236,11 +237,11 @@ msgstr "اگر هر یک از پوشه‌هایی که بسته‌های شخص msgid "Testing a Python package" msgstr "آزمون یک بسته پایتون" -msgid "The CPython source tree contains :source:`a testbed project ` that is used to run the CPython test suite on the iOS simulator. This testbed can also be used as a testbed project for running your Python library's test suite on iOS." -msgstr "درخت منبع سی‌پایتون شامل :source:`یک پروژه‌ی بستر آزمون (testbed) ` است که برای اجرای بدنه‌ی آزمون‌های سی‌پایتون روی شبیه‌ساز iOS استفاده می‌شود. این بستر آزمون همچنین می‌تواند به‌عنوان یک پروژه‌ی بستر آزمون برای اجرای بدنه‌ی آزمون‌های کتابخانه‌ی پایتون شما روی iOS استفاده شود." +msgid "The CPython source tree contains :source:`a testbed project ` that is used to run the CPython test suite on the iOS simulator. This testbed can also be used as a testbed project for running your Python library's test suite on iOS." +msgstr "درخت کد منبع سی‌پایتون شامل :source:`یک پروژه ی آزمایشگاهی ` است که برای اجرای مجموعه آزمون های سی‌پایتون روی شبیه ساز iOS استفاده می شود. از این آزمایشگاه همچنین می توان به عنوان یک پروژه ی آزمایشی برای اجرای مجموعه آزمون کتابخانه ی پایتون خود روی iOS استفاده کرد." -msgid "After building or obtaining an iOS XCFramework (see :source:`Apple/iOS/README.md` for details), create a clone of the Python iOS testbed project. If you used the ``Apple`` build script to build the XCframework, you can run:" -msgstr "پس از ساخت یا دریافت یک XCFramework برای iOS (برای جزئیات به :source:`Apple/iOS/README.md` مراجعه کنید)، یک رونوشت از پروژه‌ی بستر آزمون (testbed) iOS پایتون ایجاد کنید. اگر برای ساخت XCframework از اسکریپت ساخت ``Apple`` استفاده کرده‌اید، می‌توانید اجرا کنید:" +msgid "After building or obtaining an iOS XCFramework (see :source:`Platforms/Apple/iOS/README.md` for details), create a clone of the Python iOS testbed project. If you used the ``Platforms/Apple`` build script to build the XCframework, you can run:" +msgstr "پس از ساخت یا تهیه ی یک XCFramework برای iOS (برای جزئیات به :source:`Platforms/Apple/iOS/README.md` مراجعه کنید)، یک رونوشت (clone) از پروژه ی آزمایشگاهی پایتون iOS ایجاد کنید. اگر از اسکریپت ساخت ``Platforms/Apple`` برای ساخت XCframework استفاده کرده اید، می توانید اجرا کنید:" msgid "$ python cross-build/iOS/testbed clone --app --app app-testbed" msgstr "$ python cross-build/iOS/testbed clone --app --app app-testbed" @@ -248,8 +249,8 @@ msgstr "$ python cross-build/iOS/testbed clone --app --app --app --app app-testbed" -msgstr "$ python Apple/testbed clone --platform iOS --framework --app --app app-testbed" +msgid "$ python Platforms/Apple/testbed clone --platform iOS --framework --app --app app-testbed" +msgstr "$ python Platforms/Apple/testbed clone --platform iOS --framework --app --app app-testbed" msgid "Any folders specified with the ``--app`` flag will be copied into the cloned testbed project. The resulting testbed will be created in the ``app-testbed`` folder. In this example, the ``module1`` and ``module2`` would be importable modules at runtime. If your project has additional dependencies, they can be installed into the ``app-testbed/Testbed/app_packages`` folder (using ``pip install --target app-testbed/Testbed/app_packages`` or similar)." msgstr "هر پوشه‌ای که با پرچم ``--app`` مشخص شده باشد، در پروژه‌ی رونوشت‌شده‌ی testbed کپی می‌شود. testbed حاصل در پوشه‌ی ``app-testbed`` ایجاد می‌شود. در این مثال، ``module1`` و ``module2`` در زمان اجرا ماژول‌هایی قابل ایمپورت خواهند بود. اگر پروژه‌ی شما وابستگی‌های اضافی دارد، می‌توان آن‌ها را در پوشه‌ی ``app-testbed/Testbed/app_packages`` نصب کرد (با استفاده از ``pip install --target app-testbed/Testbed/app_packages`` یا مشابه آن)." diff --git a/using/mac.po b/using/mac.po index 99978434..3cc90dcb 100644 --- a/using/mac.po +++ b/using/mac.po @@ -7,12 +7,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 10:40+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -38,14 +39,14 @@ msgstr "استفاده از پایتون برای مک‌او‌اس از ``pyth msgid "Installation steps" msgstr "مراحل نصب" -msgid "For `current Python versions `_ (other than those in ``security`` status), the release team produces a **Python for macOS** installer package for each new release. A list of available installers is available `here `_. We recommend using the most recent supported Python version where possible. Current installers provide a `universal2 binary `_ build of Python which runs natively on all Macs (Apple Silicon and Intel) that are supported by a wide range of macOS versions, currently typically from at least **macOS 10.15 Catalina** on." -msgstr "برای `نسخه‌های فعلی پایتون `_ (به‌جز نسخه‌هایی که در وضعیت ``security`` قرار دارند)، تیم انتشار برای هر انتشار جدید یک بسته‌ی نصب‌کننده‌ی **Python for macOS** تولید می‌کند. فهرستی از نصب‌کننده‌های موجود `اینجا `_ در دسترس است. توصیه می‌کنیم در صورت امکان، از جدیدترین نسخه‌ی پشتیبانی‌شده‌ی پایتون استفاده کنید. نصب‌کننده‌های فعلی، یک ساخت‌ `دودوییِ universal2 `_ از پایتون ارائه می‌دهند که به‌طور بومی روی همه‌ی مک‌ها (Apple Silicon و Intel) اجرا می‌شود؛ مک‌هایی که توسط طیف گسترده‌ای از نسخه‌های macOS — در حال حاضر معمولاً از حداقل **macOS 10.15 Catalina** به بعد — پشتیبانی می‌شوند." +msgid "For `current Python versions `_ (other than those in ``security`` status), the release team produces a **Python for macOS** installer package for each new release. A list of available installers is provided on the `macOS downloads page `__. We recommend using the most recent supported Python version where possible. Current installers provide a `universal2 binary `_ build of Python which runs natively on all Macs (Apple Silicon and Intel) that are supported by a wide range of macOS versions, currently typically from at least **macOS 10.15 Catalina** on." +msgstr "برای `نسخه های فعلی پایتون `_ (به جز موارد دارای وضعیت ``security``)، تیم انتشار یک بسته ی نصبی **Python for macOS** برای هر نسخه ی جدید تولید می کند. فهرستی از نصب کننده های موجود در `صفحه ی دانلودهای macOS `__ ارائه شده است. توصیه می کنیم در صورت امکان از جدیدترین نسخه ی پشتیبانی شده ی پایتون استفاده کنید. نصب کننده های فعلی یک ساخت `دوتایی universal2 `_ از پایتون را ارائه می دهند که به صورت بومی روی تمام مک ها (Apple Silicon و اینتل) که توسط طیف وسیعی از نسخه های macOS پشتیبانی می شوند، اجرا می شود؛ که در حال حاضر معمولاً از **macOS 10.15 Catalina** به بعد است." -msgid "The downloaded file is a standard macOS installer package file (``.pkg``). File integrity information (checksum, size, sigstore signature, etc) for each file is included on the release download page. Installer packages and their contents are signed and notarized with ``Python Software Foundation`` Apple Developer ID certificates to meet `macOS Gatekeeper requirements `_." -msgstr "پرونده دانلود‌شده یک پرونده بسته نصب استاندارد macOS است (``.pkg``). اطلاعات یکپارچگی پرونده (جمع‌آزما، اندازه، امضای sigstore و غیره) برای هر پرونده در صفحه دانلود نسخه گنجانده شده است. بسته‌های نصب و محتویات آن‌ها با گواهی‌های Apple Developer ID متعلق به ``Python Software Foundation`` امضا و نوتاری‌سازی (notarized) شده‌اند تا `الزامات macOS Gatekeeper `_ برآورده شوند." +msgid "The downloaded file is a standard macOS installer package file (``.pkg``). File integrity information (such as checksum, size, and Sigstore signature) for each file is included on the release download page. Installer packages and their contents are signed and notarized with ``Python Software Foundation`` Apple Developer ID certificates to meet `macOS Gatekeeper requirements `_." +msgstr "پرونده ی دانلودشده یک پرونده ی بسته ی نصب کننده ی استاندارد macOS (``.pkg``) است. اطلاعات یکپارچگی پرونده (مانند جمع‌آزما، اندازه و امضای Sigstore) برای هر پرونده در صفحه ی دانلود نسخه گنجانده شده است. بسته های نصب کننده و محتویات آن ها با گواهی های شناسه ی توسعه دهنده ی اپل ``Python Software Foundation`` امضا و محضری (notarized) شده اند تا با `الزامات گیت کیپر macOS `_ مطابقت داشته باشند." -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 "برای نصب پیش‌فرض، روی پرونده‌ی بسته‌ی نصب‌کننده‌ی دانلود‌شده دوبار کلیک کنید. این کار باید برنامه‌ی استاندارد Installer در macOS را اجرا کند و نخستین مرحله از چندین مرحله‌ی پنجره‌های نصب‌کننده را نمایش دهد." +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 steps." +msgstr "برای یک نصب پیش فرض، روی پرونده ی بسته ی نصب کننده ی دانلودشده دو بار کلیک کنید. این کار باید برنامه ی نصب کننده ی استاندارد macOS را اجرا کرده و اولین مرحله از چندین مرحله ی نصب را نمایش دهد." 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 |applications_python_version_literal| and available to read anytime." msgstr "با کلیک روی دکمه‌ی **Continue**، **Read Me** این نصب‌کننده نمایش داده می‌شود. **Read Me** در کنار سایر اطلاعات مهم، شرح می‌دهد که کدام نسخه‌ی پایتون قرار است نصب شود و روی کدام نسخه‌های macOS پشتیبانی می‌شود. ممکن است برای خواندن کل پرونده، لازم باشد آن را اسکرول کنید. به‌طور پیش‌فرض، این **Read Me** همچنین در |applications_python_version_literal| نصب خواهد شد و هر زمان که بخواهید قابل مطالعه خواهد بود." @@ -56,8 +57,8 @@ msgstr "با کلیک روی **Continue**، مجوز پایتون و سایر ن 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 "پس از پذیرفته شدن شرایط مجوز، گام بعدی نمایش **Installation Type** است. برای بیشتر کاربردها، مجموعه استاندارد عملیات‌های نصب مناسب است." -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 free-threaded feature, see :ref:`install-freethreaded-macos`." -msgstr "با فشردن دکمه‌ی **Customize** می‌توانید برخی از اجزای بسته‌ی نصب‌کننده را حذف کرده یا انتخاب کنید. روی نام هر بسته کلیک کنید تا توضیحی درباره‌ی آنچه نصب می‌کند ببینید. برای اینکه پشتیبانی از قابلیت اختیاری نخ‌آزاد را نیز نصب کنید، به :ref:`install-freethreaded-macos` مراجعه کنید." +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. For details of the optional free-threaded feature, which is installed by default, see :ref:`install-freethreaded-macos`." +msgstr "با فشردن دکمه ی **Customize**، می توانید اجزای خاصی از بسته ی نصب کننده را انتخاب کرده یا از نصب خارج کنید. روی نام هر بسته کلیک کنید تا توضیحات مربوط به آنچه نصب می کند را ببینید. برای جزئیات ویژگی اختیاری نخ‌آزاد (free-threaded) که به صورت پیش فرض نصب می شود، به :ref:`install-freethreaded-macos` مراجعه کنید." msgid "In either case, clicking **Install** will begin the install process by asking permission to install new software. A macOS user name with ``Administrator`` privilege is needed as the installed Python will be available to all users of the Mac." msgstr "در هر دو حالت، کلیک روی **Install** فرایند نصب را با درخواست مجوز برای نصب نرم‌افزار جدید آغاز می‌کند. نام کاربری macOS با امتیاز ``Administrator`` لازم است، زیرا پایتون نصب‌شده برای همه‌ی کاربران مک در دسترس خواهد بود." @@ -71,8 +72,8 @@ msgstr "برای تکمیل نصب، روی نماد یا پرونده‌ی :com 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 "این کار یک پنجره‌ی پوسته‌ی موقت :program:`Terminal` باز می‌کند که با استفاده از پایتون جدید، گواهی‌های ریشه‌ی SSL را برای استفاده‌ی خود دانلود و نصب می‌کند." -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 "اگر ``Successfully installed certifi`` و ``update complete`` در پنجره‌ی پایانه ظاهر شد، نصب کامل شده است. این پنجره‌ی پایانه و پنجره‌ی نصاب را ببندید." +msgid "If ``Successfully installed certifi`` and ``update complete`` appear in the terminal window, the installation is complete. Close this terminal window and the installer window." +msgstr "اگر عبارات ``Successfully installed certifi`` و ``update complete`` در پنجره ی پایانه ظاهر شدند، نصب کامل شده است. این پنجره ی پایانه و پنجره ی نصب کننده را ببندید." msgid "A default install will include:" msgstr "نصب پیش‌فرض شامل موارد زیر خواهد بود:" @@ -116,8 +117,8 @@ msgstr "از طریق پنجره اطلاعات Finder، :program:`Python Launch 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 script will not be run in the usual shell environment including any setting of environment variables in shell profiles. And, as with any other script or program, be certain of what you are about to run." msgstr "آگاه باشید که اجرای مستقیم اسکریپت از Finder در macOS ممکن است نتایجی متفاوت نسبت به اجرای آن از طریق یک پنجره پایانه به دست دهد، زیرا اسکریپت در محیط معمول پوسته، از جمله هر تنظیمی از متغیرهای محیطی در پروفایل‌های پوسته، اجرا نخواهد شد. و همانند هر اسکریپت یا برنامه دیگری، از چیزی که می‌خواهید اجرا کنید مطمئن باشید." -msgid "Alternative Distributions" -msgstr "توزیع‌های جایگزین" +msgid "Alternative distributions" +msgstr "توزیع های جایگزین" 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 "علاوه بر نصب‌کننده استاندارد ``python.org`` برای macOS، توزیع‌های شخص ثالثی برای macOS وجود دارند که ممکن است قابلیت‌های اضافی داشته باشند. برخی از توزیع‌های محبوب و ویژگی‌های کلیدی آن‌ها:" @@ -149,14 +150,14 @@ msgstr "یک مدیر بسته‌ی دیگر برای macOS که شامل چند 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 "توجه داشته باشید که توزیع‌ها ممکن است شامل جدیدترین نسخه‌های پایتون یا کتابخانه‌های دیگر نباشند و توسط تیم اصلی پایتون نگهداری یا پشتیبانی نمی‌شوند." -msgid "Installing Additional Python Packages" -msgstr "نصب بسته‌های اضافی پایتون" +msgid "Installing additional Python packages" +msgstr "نصب بسته های اضافی پایتون" msgid "Refer to the `Python Packaging User Guide`_ for more information." msgstr "برای اطلاعات بیشتر به `Python Packaging User Guide`_ مراجعه کنید." -msgid "GUI Programming" -msgstr "برنامه‌نویسی رابط کاربری گرافیکی" +msgid "GUI programming" +msgstr "برنامه نویسی رابط گرافیکی کاربر" msgid "There are several options for building GUI applications on the Mac with Python." msgstr "چندین گزینه برای ساخت برنامه‌های رابط کاربری گرافیکی (GUI) روی مک با پایتون وجود دارد." @@ -185,26 +186,29 @@ msgstr "`Toga `_: بخشی از `پروژه BeeWare msgid "`wxPython `_: A cross-platform toolkit that supports desktop operating systems." msgstr "`wxPython `_: مجموعه ابزار چندسکویی که از سیستم‌عامل‌های دسکتاپ پشتیبانی می‌کند." -msgid "Advanced Topics" +msgid "Advanced topics" msgstr "مباحث پیشرفته" -msgid "Installing Free-threaded Binaries" -msgstr "نصب دودویی‌های نخ‌آزاد" +msgid "Installing free-threaded binaries" +msgstr "نصب نسخه‌های باینری نخ‌آزاد" -msgid "The ``python.org`` :ref:`Python for macOS ` installer package can optionally install an additional build of 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 "بسته‌ی نصب‌کننده‌ی :ref:`پایتون برای macOS ` در ``python.org`` می‌تواند به‌صورت اختیاری یک ساخت اضافی از پایتون |version| را نصب کند که از :pep:`703`، یعنی قابلیت نخ‌بندی آزاد (اجرا با :term:`قفل مفسر سراسری ` غیرفعال)، پشتیبانی می‌کند. صفحه‌ی انتشار در ``python.org`` را برای اطلاعات احتمالیِ به‌روز بررسی کنید." +msgid "Free-threading support is now installed by default." +msgstr "پشتیبانی از رشته‌آزاد (free-threading) اکنون به‌طور پیش‌فرض نصب می‌شود." -msgid "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 "حالت نخ‌آزاد کار می‌کند و بهبود آن همچنان ادامه دارد، اما در مقایسه با ساخت‌ معمولی، در بارهای کاری تک‌نخی مقداری سربار اضافی وجود دارد. علاوه بر این، بسته‌های شخص ثالث، به‌ویژه بسته‌هایی که دارای :term:`ماژول توسعه‌ای ` هستند، ممکن است برای استفاده در ساخت‌ نخ‌آزاد آماده نباشند و :term:`قفل مفسر سراسری ` را دوباره فعال خواهند کرد. بنابراین، پشتیبانی از نخ‌بندی آزاد به‌صورت پیش‌فرض نصب نمی‌شود. این پشتیبانی به‌عنوان یک گزینه نصب جداگانه بسته‌بندی شده است و مطابق توضیحات بالا، با کلیک روی دکمه‌ی **Customize** در مرحله‌ی **Installation Type** نصب‌کننده در دسترس است." +msgid "The ``python.org`` :ref:`Python for macOS ` installer package installs, by default, an additional build of Python |version| that supports :term:`free threading` (running with the :term:`global interpreter lock` disabled). Check the release page on ``python.org`` for possible updated information." +msgstr "بسته‌ی نصبی :ref:`Python for macOS ` در سایت ``python.org`` به‌طور پیش‌فرض، ساخت (build) اضافه‌ای از پایتون |version| را نصب می‌کند که از :term:`نخ‌بندی آزاد ` (اجرا با غیرفعال بودن :term:`قفل مفسر سراسری `) پشتیبانی می‌کند. برای اطلاع از آخرین اطلاعات به‌روزرسانی‌شده، صفحه‌ی انتشار را در ``python.org`` بررسی کنید." -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 |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 "اگر کادر کنار نام بسته‌ی **Free-threaded Python** علامت‌گذاری شده باشد، یک :file:`PythonT.framework` جداگانه نیز در کنار :file:`Python.framework` معمولی در :file:`/Library/Frameworks` نصب خواهد شد. این پیکربندی اجازه می‌دهد نسخه‌ای از پایتون نخ‌آزاد |version| در حین نصب یا آزمایش، با کمترین ریسک در کنار نسخه‌ای از پایتون سنتی |version| (فقط با قفل مفسر سراسری) روی سیستم شما هم‌زیستی کند. این چیدمان نصب ممکن است در نسخه‌های آینده تغییر کند." +msgid "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`. As of Python 3.15, free-threading support is installed by default. It is packaged as a separate install option, which can be deselected by clicking the **Customize** button on the **Installation Type** step of the installer as described above." +msgstr "حالت نخ‌آزاد کار می‌کند و همچنان در حال بهبود است، اما در بارهای کاری تک‌نخه‌ای در مقایسه با ساخت معمولی، مقداری سربار اضافی وجود دارد. علاوه بر این، بسته‌های شخص ثالث، به‌ویژه آنهایی که دارای یک :term:`ماژول توسعه‌ای ` هستند، ممکن است برای استفاده در یک ساخت نخ‌آزاد آماده نباشند و :term:`GIL` را دوباره فعال کنند. از پایتون ۳.۱۵ به بعد، پشتیبانی از نخ‌بندی آزاد به‌طور پیش‌فرض نصب می‌شود. این قابلیت به شکل یک گزینه‌ی نصبی مجزا بسته‌بندی شده است که می‌توان آن را با کلیک کردن روی دکمه‌ی **Customize** در مرحله‌ی **Installation Type** برنامه‌ی نصب (همان‌طور که در بالا توضیح داده شد) لغو انتخاب کرد." + +msgid "If the box next to the **Free-threaded Python** package name is checked (as it is by default), 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 |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 "اگر کادر کنار نام بسته‌ی **Free-threaded Python** علامت زده شده باشد (همان‌طور که به‌طور پیش‌فرض است)، یک :file:`PythonT.framework` جداگانه نیز در کنار :file:`Python.framework` معمولی در :file:`/Library/Frameworks` نصب خواهد شد. این پیکربندی به یک ساخت پایتون |version| نخ‌آزاد اجازه می‌دهد تا هنگام نصب یا آزمایش، با حداقل خطر در کنار یک ساخت سنتی پایتون |version| (فقط دارای GIL) روی سیستم شما همزیستی داشته باشد. این ساختار نصب ممکن است در نسخه‌های آینده تغییر کند." msgid "Known cautions and limitations:" msgstr "هشدارها و محدودیت‌های شناخته‌شده:" -msgid "The **UNIX command-line tools** package, which is selected by default, will 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 "بسته‌ی **UNIX command-line tools** که به‌طور پیش‌فرض انتخاب شده است، پیوندهایی را در :file:`/usr/local/bin` برای |python_x_dot_y_t_literal| (مفسر نخ‌آزاد) و |python_x_dot_y_t_literal_config| (ابزار پیکربندی که ممکن است برای سازندگان بسته مفید باشد) نصب می‌کند. از آنجا که :file:`/usr/local/bin` معمولاً در ``PATH`` پوسته‌ی شما قرار دارد، در بیشتر موارد برای استفاده از |python_x_dot_y_t_literal| نیازی به تغییر متغیرهای محیطی ``PATH`` شما نخواهد بود." +msgid "The **UNIX command-line tools** package, which is selected by default, will 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 variable should be needed to use |python_x_dot_y_t_literal|." +msgstr "بسته‌ی **UNIX command-line tools** که به‌طور پیش‌فرض انتخاب شده است، پیوندهایی را در :file:`/usr/local/bin` برای |python_x_dot_y_t_literal| (مفسر نخ‌آزاد) و |python_x_dot_y_t_literal_config| (یک ابزار پیکربندی که ممکن است برای سازندگان بسته مفید باشد) نصب خواهد کرد. از آنجا که :file:`/usr/local/bin` معمولاً در ``PATH`` پوسته‌ی شما گنجانده می‌شود، در بیشتر موارد نباید نیازی به ایجاد تغییر در متغیر محیطی ``PATH`` خود برای استفاده از |python_x_dot_y_t_literal| داشته باشید." msgid "For this release, the **Shell profile updater** package and the :file:`Update Shell Profile.command` in |applications_python_version_literal| do not support the free-threaded package." msgstr "برای این نسخه، بسته‌ی **به‌روزرسان پروفایل پوسته (Shell profile updater)** و :file:`Update Shell Profile.command` در |applications_python_version_literal| از بسته‌ی نخ‌آزاد پشتیبانی نمی‌کنند." @@ -258,8 +262,8 @@ msgstr "" msgid "Installing using the command line" msgstr "نصب با استفاده از خط فرمان" -msgid "If you want to use automation to install the ``python.org`` installer package (rather than by using the familiar macOS :program:`Installer` GUI app), the macOS command line :command:`installer` utility lets you select 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 |x_dot_y_b2_literal| release and selecting the free-threaded interpreter option:" -msgstr "اگر می‌خواهید برای نصب بسته‌ی نصب‌کننده‌ی ``python.org`` از خودکارسازی استفاده کنید (به‌جای استفاده از برنامه‌ی گرافیکی آشنای :program:`Installer` در macOS)، ابزار :command:`installer` در خط فرمان macOS به شما امکان می‌دهد گزینه‌های غیرپیش‌فرض را نیز انتخاب کنید. اگر با :command:`installer` آشنایی ندارید، ممکن است تا حدی گنگ باشد (برای اطلاعات بیشتر، :command:`man installer` را ببینید). به‌عنوان مثال، قطعه‌کد پوسته‌ی زیر یکی از راه‌های انجام این کار را با استفاده از نسخه‌ی |x_dot_y_b2_literal| و انتخاب گزینه‌ی مفسر نخ‌آزاد نشان می‌دهد:" +msgid "If you want to use automation to install the ``python.org`` installer package (rather than by using the familiar macOS :program:`Installer` GUI app), the macOS command line :command:`installer` utility lets you select 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 |x_dot_y_b2_literal| release and deselecting the free-threaded interpreter option:" +msgstr "اگر می‌خواهید برای نصب بسته‌ی نصبی ``python.org`` از خودکارسازی استفاده کنید (به‌جای استفاده از برنامه‌ی گرافیکی آشنای macOS :program:`Installer`)، ابزار خط فرمان macOS یعنی :command:`installer` به شما اجازه می‌دهد گزینه‌های غیرپیش‌فرض را نیز انتخاب کنید. اگر با :command:`installer` آشنا نیستید، ممکن است تا حدی مبهم باشد (برای اطلاعات بیشتر به :command:`man installer` مراجعه کنید). به عنوان یک نمونه، قطعه‌کد پوسته‌ی زیر یکی از راه‌های انجام این کار را نشان می‌دهد که در آن از انتشار |x_dot_y_b2_literal| استفاده شده و گزینه‌ی مفسر نخ‌آزاد لغو انتخاب شده است:" msgid "" "RELEASE=\"python-\\ |version|\\ 0b2-macos11.pkg\"\n" @@ -268,7 +272,7 @@ msgid "" "curl -O \\https://www.python.org/ftp/python/\\ |version|\\ .0/${RELEASE}\n" "\n" "# create installer choicechanges to customize the install:\n" -"# enable the PythonTFramework-\\ |version|\\ package\n" +"# disable the PythonTFramework-\\ |version|\\ package\n" "# while accepting the other defaults (install all other packages)\n" "cat > ./choicechanges.plist <\n" @@ -277,7 +281,7 @@ msgid "" "\n" " \n" " attributeSetting\n" -" 1\n" +" 0\n" " choiceAttribute\n" " selected\n" " choiceIdentifier\n" @@ -295,7 +299,7 @@ msgstr "" "curl -O \\https://www.python.org/ftp/python/\\ |version|\\ .0/${RELEASE}\n" "\n" "# create installer choicechanges to customize the install:\n" -"# enable the PythonTFramework-\\ |version|\\ package\n" +"# disable the PythonTFramework-\\ |version|\\ package\n" "# while accepting the other defaults (install all other packages)\n" "cat > ./choicechanges.plist <\n" @@ -304,7 +308,7 @@ msgstr "" "\n" " \n" " attributeSetting\n" -" 1\n" +" 0\n" " choiceAttribute\n" " selected\n" " choiceIdentifier\n" @@ -316,8 +320,8 @@ msgstr "" "\n" "sudo installer -pkg ./${RELEASE} -applyChoiceChangesXML ./choicechanges.plist -target /" -msgid "You can then test that both installer builds are now available with something like:" -msgstr "سپس می‌توانید با چیزی شبیه به موارد زیر آزمون کنید که هر دو ساخت‌ نصب‌کننده اکنون در دسترس هستند:" +msgid "After a default install, you can test that both builds are available with something like:" +msgstr "پس از یک نصب پیش‌فرض، می‌توانید با دستوری شبیه به زیر آزمایش کنید که هر دو ساخت موجود هستند:" msgid "" "$ # test that the free-threaded interpreter was installed if the Unix Command Tools package was enabled\n" @@ -347,7 +351,7 @@ msgstr "" msgid "Current ``python.org`` installers only install to fixed locations like :file:`/Library/Frameworks/`, :file:`/Applications`, and :file:`/usr/local/bin`. You cannot use the :command:`installer` ``-domain`` option to install to other locations." msgstr "نصب‌کننده‌های فعلی ``python.org`` فقط در مکان‌های ثابتی مانند :file:`/Library/Frameworks/`، :file:`/Applications` و :file:`/usr/local/bin` نصب می‌کنند. شما نمی‌توانید از گزینه ``-domain`` دستور :command:`installer` برای نصب در مکان‌های دیگر استفاده کنید." -msgid "Distributing Python Applications" +msgid "Distributing Python applications" msgstr "توزیع برنامه‌های پایتون" msgid "A range of tools exist for converting your Python code into a standalone distributable application:" @@ -362,8 +366,8 @@ msgstr "`Briefcase `_: بخشی از پروژ msgid "`PyInstaller `_: A cross-platform packaging tool that creates a single file or folder as a distributable artifact." msgstr "`PyInstaller `_: ابزار بسته‌بندی چندسکویی که یک پرونده یا پوشه‌ی واحد را به‌عنوان یک مصنوع توزیع‌پذیر (distributable artifact) ایجاد می‌کند." -msgid "App Store Compliance" -msgstr "انطباق با App Store" +msgid "App Store compliance" +msgstr "سازگاری با اپ استور" msgid "Apps submitted for distribution through the macOS App Store must pass Apple's app review process. This process includes a set of automated validation rules that inspect the submitted application bundle for problematic code." msgstr "اپلیکیشن‌هایی که برای توزیع از طریق macOS App Store ارسال می‌شوند، باید فرایند بررسی اپلیکیشن اپل را با موفقیت پشت سر بگذارند. این فرایند شامل مجموعه‌ای از قواعد اعتبارسنجی خودکار است که بسته اپلیکیشن ارسالی را از نظر وجود کد مشکل‌دار بررسی می‌کنند." @@ -377,7 +381,7 @@ msgstr "درخت منبع پایتون شامل :source:`یک پرونده وص 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 *only* required if you are using the macOS App Store as a distribution channel." msgstr "این وصل معمولاً برای استفاده از سی‌پایتون روی مک لازم نیست؛ و اگر برنامه‌ای را *خارج از* macOS App Store توزیع می‌کنید نیز لازم نیست. این وصل *تنها* زمانی لازم است که از macOS App Store به‌عنوان کانال توزیع استفاده کنید." -msgid "Other Resources" +msgid "Other resources" msgstr "منابع دیگر" msgid "The `python.org Help page `_ has links to many useful resources. The `Pythonmac-SIG mailing list `_ is another support resource specifically for Python users and developers on the Mac." diff --git a/using/windows.po b/using/windows.po index 9f4580d9..bc18d6a2 100644 --- a/using/windows.po +++ b/using/windows.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 13:35+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -1044,20 +1045,23 @@ msgstr "پس از تغییر گزینه‌ی بالا و راه‌اندازی msgid "UTF-8 mode" msgstr "حالت UTF-8" -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 "ویندوز همچنان از کدگذاری‌های قدیمی برای کدگذاری سیستم (صفحه‌ی کد ANSI) استفاده می‌کند. پایتون از آن برای کدگذاری پیش‌فرض پرونده‌های متنی استفاده می‌کند (برای مثال :func:`locale.getencoding`)." +msgid "Python UTF-8 mode is now enabled by default (:pep:`686`)." +msgstr "حالت UTF-8 پایتون اکنون به‌طور پیش‌فرض فعال است (:pep:`686`)." + +msgid "Windows still uses legacy encodings for the system encoding (the ANSI Code Page). When the :ref:`Python UTF-8 Mode ` is disabled, Python uses the ANSI Code Page as the default encoding of text files, as returned by :func:`locale.getencoding`." +msgstr "ویندوز همچنان از کدگذاری‌های قدیمی برای کدگذاری سیستم (صفحه کد ANSI) استفاده می‌کند. وقتی :ref:`حالت UTF-8 پایتون ` غیرفعال است، پایتون از صفحه‌ی کد ANSI به عنوان کدگذاری پیش‌فرض پرونده‌های متنی استفاده می‌کند، همان‌طور که :func:`locale.getencoding` آن را برمی‌گرداند." 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 "این ممکن است مشکلاتی ایجاد کند، زیرا UTF-8 به‌طور گسترده در اینترنت و بیشتر سیستم‌های یونیکس، از جمله WSL (زیرسیستم ویندوز برای لینوکس)، استفاده می‌شود." -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 ` via the ``-X utf8`` command line option, or the ``PYTHONUTF8=1`` environment variable. See :envvar:`PYTHONUTF8` for enabling UTF-8 mode, and :ref:`setting-envvars` for how to modify environment variables." -msgstr "می‌توانید از :ref:`حالت UTF-8 پایتون ` برای تغییر کدگذاری متن پیش‌فرض به UTF-8 استفاده کنید. می‌توانید :ref:`حالت UTF-8 پایتون ` را از طریق گزینه‌ی خط فرمان ``-X utf8`` یا متغیر محیطی ``PYTHONUTF8=1`` فعال کنید. برای فعال کردن حالت UTF-8 به :envvar:`PYTHONUTF8` و برای نحوه‌ی تغییر متغیرهای محیطی به :ref:`setting-envvars` مراجعه کنید." +msgid "The :ref:`Python UTF-8 Mode `, enabled by default, ignores the system encoding and uses UTF-8 as the default text encoding. When the :ref:`UTF-8 mode ` is enabled, you can still use the system encoding (the ANSI Code Page) via the \"mbcs\" codec." +msgstr ":ref:`حالت UTF-8 پایتون ` که به‌طور پیش‌فرض فعال است، کدگذاری سیستم را نادیده می‌گیرد و از UTF-8 به عنوان کدگذاری پیش‌فرض متن استفاده می‌کند. هنگامی که :ref:`حالت UTF-8 ` فعال است، همچنان می‌توانید از طریق کُدک «mbcs» از کدگذاری سیستم (صفحه کد ANSI) استفاده کنید." -msgid "When the :ref:`Python UTF-8 Mode ` is enabled, you can still use the system encoding (the ANSI Code Page) via the \"mbcs\" codec." -msgstr "وقتی :ref:`حالت UTF-8 پایتون ` فعال باشد، شما همچنان می‌توانید از کدگذاری سیستم (صفحه‌ی کد ANSI) از طریق کدک «mbcs» استفاده کنید." +msgid "You can disable the :ref:`Python UTF-8 Mode ` via the ``-X utf8=0`` command line option, or the ``PYTHONUTF8=0`` environment variable. See :envvar:`PYTHONUTF8` for disabling UTF-8 mode, and :ref:`setting-envvars` for how to modify environment variables." +msgstr "می‌توانید :ref:`حالت UTF-8 پایتون ` را از طریق گزینه‌ی خط فرمان ``-X utf8=0`` یا متغیر محیطی ``PYTHONUTF8=0`` غیرفعال کنید. برای غیرفعال کردن حالت UTF-8 به :envvar:`PYTHONUTF8` و برای نحوه‌ی اصلاح متغیرهای محیطی به :ref:`setting-envvars` مراجعه کنید." -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 3.7+ applications which rely on the legacy system encoding, it is recommended to set the environment variable temporarily or use the ``-X utf8`` command line option." -msgstr "توجه داشته باشید که افزودن ``PYTHONUTF8=1`` به متغیرهای محیطی پیش‌فرض، بر تمام برنامه‌های Python 3.7+ در سیستم شما تأثیر می‌گذارد. اگر برنامه‌هایی از Python 3.7+ دارید که به کدگذاری قدیمی سیستم متکی هستند، توصیه می‌شود متغیر محیطی را به‌صورت موقت تنظیم کنید یا از گزینه‌ی خط فرمان ``-X utf8`` استفاده کنید." +msgid "Adding ``PYTHONUTF8={0,1}`` to the default environment variables will affect all Python 3.7+ applications on your system. If you have any Python 3.7+ applications which rely on the legacy system encoding, it is recommended to set the environment variable temporarily or use the ``-X utf8`` command line option." +msgstr "افزودن ``PYTHONUTF8={0,1}`` به متغیرهای محیطی پیش‌فرض، روی تمام برنامه‌های پایتون 3.7 به بالا روی سیستم شما تأثیر خواهد گذاشت. اگر برنامه‌ای به زبان پایتون 3.7 یا بالاتر دارید که به کدگذاری قدیمی سیستم وابسته است، توصیه می‌شود متغیر محیطی را به صورت موقت تنظیم کنید یا از گزینه‌ی خط فرمان ``-X utf8`` استفاده کنید." msgid "Even when UTF-8 mode is disabled, Python uses UTF-8 by default on Windows for:" msgstr "حتی زمانی که حالت UTF-8 غیرفعال است، پایتون به‌طور پیش‌فرض در ویندوز برای موارد زیر از UTF-8 استفاده می‌کند:" diff --git a/whatsnew/2.5.po b/whatsnew/2.5.po index 1815b9b2..d4cf7a6c 100644 --- a/whatsnew/2.5.po +++ b/whatsnew/2.5.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 07:50+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -1229,8 +1230,8 @@ msgstr "نوع صف دوطرفه‌ی :class:`~collections.deque` که توسط msgid "New module: The :mod:`contextlib` module contains helper functions for use with the new ':keyword:`with`' statement. See section :ref:`contextlibmod` for more about this module." msgstr "ماژول جدید: ماژول :mod:`contextlib` شامل توابع کمکی برای استفاده با دستور جدید «:keyword:`with`» است. برای اطلاعات بیشتر درباره‌ی این ماژول، به بخش :ref:`contextlibmod` مراجعه کنید." -msgid "New module: The :mod:`cProfile` module is a C implementation of the existing :mod:`profile` module that has much lower overhead. The module's interface is the same as :mod:`profile`: you run ``cProfile.run('main()')`` to profile a function, can save profile data to a file, etc. It's not yet known if the Hotshot profiler, which is also written in C but doesn't match the :mod:`profile` module's interface, will continue to be maintained in future versions of Python. (Contributed by Armin Rigo.)" -msgstr "ماژول جدید: ماژول :mod:`cProfile` یک پیاده‌سازی به زبان C از ماژول موجود :mod:`profile` است که سربار بسیار کمتری دارد. رابط این ماژول همانند :mod:`profile` است: برای پروفایل‌گیری یک تابع، ``cProfile.run('main()')`` را اجرا می‌کنید، می‌توانید داده‌های پروفایل را در یک پرونده ذخیره کنید و غیره. هنوز مشخص نیست که پروفایل‌گیر Hotshot، که آن هم به زبان C نوشته شده اما با رابط ماژول :mod:`profile` مطابقت ندارد، در نسخه‌های آینده پایتون همچنان نگهداری خواهد شد یا خیر. (مشارکت Armin Rigo.)" +msgid "New module: The :mod:`!cProfile` module is a C implementation of the existing :mod:`!profile` module that has much lower overhead. The module's interface is the same as :mod:`!profile`: you run ``cProfile.run('main()')`` to profile a function, can save profile data to a file, etc. It's not yet known if the Hotshot profiler, which is also written in C but doesn't match the :mod:`!profile` module's interface, will continue to be maintained in future versions of Python. (Contributed by Armin Rigo.)" +msgstr "ماژول جدید: ماژول :mod:`!cProfile` یک پیاده‌سازی به زبان C از ماژول موجود :mod:`!profile` است که سربار بسیار کمتری دارد. رابط این ماژول مشابه :mod:`!profile` است: برای پروفایل‌گیری از یک تابع، ``cProfile.run('main()')`` را اجرا می‌کنید، می‌توانید داده‌های پروفایل‌گیری را در یک پرونده ذخیره کنید و غیره. هنوز مشخص نیست که آیا پروفایل‌گیر Hotshot که آن هم به زبان C نوشته شده اما با رابط ماژول :mod:`!profile` مطابقت ندارد، در نسخه‌های آینده‌ی پایتون پشتیبانی خواهد شد یا خیر. (مشارکت توسط Armin Rigo.)" msgid "Also, the :mod:`pstats` module for analyzing the data measured by the profiler now supports directing the output to any file object by supplying a *stream* argument to the :class:`~pstats.Stats` constructor. (Contributed by Skip Montanaro.)" msgstr "همچنین، ماژول :mod:`pstats` برای تحلیل داده‌های اندازه‌گیری‌شده توسط پروفایل‌گیر، اکنون با فراهم‌کردن آرگومان *stream* برای سازنده‌ی :class:`~pstats.Stats` از هدایت خروجی به هر شیء پرونده‌ای پشتیبانی می‌کند. (ارائه‌شده توسط Skip Montanaro.)" diff --git a/whatsnew/2.6.po b/whatsnew/2.6.po index 946981e8..c7c484bd 100644 --- a/whatsnew/2.6.po +++ b/whatsnew/2.6.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 07:57+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -2919,8 +2920,8 @@ msgstr "رابط بافر جدید، که پیش‌تر در `بخش PEP 3118 <# msgid "Python's use of the C stdio library is now thread-safe, or at least as thread-safe as the underlying library is. A long-standing potential bug occurred if one thread closed a file object while another thread was reading from or writing to the object. In 2.6 file objects have a reference count, manipulated by the :c:func:`!PyFile_IncUseCount` and :c:func:`!PyFile_DecUseCount` functions. File objects can't be closed unless the reference count is zero. :c:func:`!PyFile_IncUseCount` should be called while the GIL is still held, before carrying out an I/O operation using the ``FILE *`` pointer, and :c:func:`!PyFile_DecUseCount` should be called immediately after the GIL is re-acquired. (Contributed by Antoine Pitrou and Gregory P. Smith.)" msgstr "استفاده‌ی پایتون از کتابخانه‌ی stdio زبان C اکنون نخ‌ایمن است، یا دست‌کم به اندازه‌ی کتابخانه‌ی زیرین نخ‌ایمن است. یک اشکال بالقوه‌ی دیرینه در صورتی رخ می‌داد که یک نخ شیء پرونده‌ای را می‌بست، در حالی که نخ دیگری در حال خواندن از آن شیء یا نوشتن در آن بود. در نسخه‌ی 2.6 اشیاء پرونده دارای شمارش ارجاع هستند که توسط توابع :c:func:`!PyFile_IncUseCount` و :c:func:`!PyFile_DecUseCount` تغییر داده می‌شود. اشیاء پرونده نمی‌توانند بسته شوند مگر آنکه شمارش ارجاع آن‌ها صفر باشد. :c:func:`!PyFile_IncUseCount` باید در حالی که قفل مفسر سراسری هنوز در اختیار است، پیش از انجام عملیات ورودی/خروجی با استفاده از اشاره‌گر ``FILE *`` فراخوانی شود، و :c:func:`!PyFile_DecUseCount` باید بلافاصله پس از به‌دست آوردن مجدد قفل مفسر سراسری فراخوانی شود. (با مشارکت Antoine Pitrou و Gregory P. Smith.)" -msgid "Importing modules simultaneously in two different threads no longer deadlocks; it will now raise an :exc:`ImportError`. A new API function, :c:func:`PyImport_ImportModuleNoBlock`, will look for a module in ``sys.modules`` first, then try to import it after acquiring an import lock. If the import lock is held by another thread, an :exc:`ImportError` is raised. (Contributed by Christian Heimes.)" -msgstr "ایمپورت کردن ماژول‌ها به‌طور همزمان در دو نخ مختلف دیگر باعث بن‌بست نمی‌شود؛ اکنون استثنای :exc:`ImportError` ایجاد می‌کند. یک تابع API جدید، :c:func:`PyImport_ImportModuleNoBlock`، ابتدا ماژول را در ``sys.modules`` جست‌وجو می‌کند و سپس پس از به دست آوردن قفل ایمپورت، تلاش می‌کند آن را ایمپورت کند. اگر قفل ایمپورت در اختیار نخ دیگری باشد، استثنای :exc:`ImportError` ایجاد می‌شود. (مشارکت‌شده توسط Christian Heimes.)" +msgid "Importing modules simultaneously in two different threads no longer deadlocks; it will now raise an :exc:`ImportError`. A new API function, :c:func:`!PyImport_ImportModuleNoBlock`, will look for a module in ``sys.modules`` first, then try to import it after acquiring an import lock. If the import lock is held by another thread, an :exc:`ImportError` is raised. (Contributed by Christian Heimes.)" +msgstr "ایمپورت کردن هم‌زمان ماژول‌ها در دو نخ مختلف دیگر دچار بن‌بست نمی‌شود؛ اکنون یک استثنای :exc:`ImportError` را بالا می‌آورد. یک تابع جدید در API به نام :c:func:`!PyImport_ImportModuleNoBlock`، ابتدا به دنبال ماژول در ``sys.modules`` می‌گردد و سپس پس از به دست آوردن قفل ایمپورت، سعی می‌کند آن را ایمپورت کند. اگر قفل ایمپورت در اختیار نخ دیگری باشد، یک استثنای :exc:`ImportError` بالا می‌آورد. (مشارکت توسط Christian Heimes.)" msgid "Several functions return information about the platform's floating-point support. :c:func:`PyFloat_GetMax` returns the maximum representable floating-point value, and :c:func:`PyFloat_GetMin` returns the minimum positive value. :c:func:`PyFloat_GetInfo` returns an object containing more information from the :file:`float.h` file, such as ``\"mant_dig\"`` (number of digits in the mantissa), ``\"epsilon\"`` (smallest difference between 1.0 and the next largest value representable), and several others. (Contributed by Christian Heimes; :issue:`1534`.)" msgstr "چندین تابع اطلاعات مربوط به پشتیبانی پلتفرم از ممیز شناور را برمی‌گردانند. :c:func:`PyFloat_GetMax` بزرگ‌ترین مقدار ممیز شناور قابل‌نمایش را برمی‌گرداند و :c:func:`PyFloat_GetMin` کوچک‌ترین مقدار مثبت را برمی‌گرداند. :c:func:`PyFloat_GetInfo` شیئی حاوی اطلاعات بیشتری از پرونده‌ی :file:`float.h` برمی‌گرداند، مانند ``\"mant_dig\"`` (تعداد ارقام مانتيس)، ``\"epsilon\"`` (کوچک‌ترین تفاوت میان 1.0 و مقدار بزرگ‌تر قابل‌نمایش بعدی) و چندین مورد دیگر. (ارائه‌شده توسط کریستین هایمز؛ :issue:`1534`.)" diff --git a/whatsnew/3.0.po b/whatsnew/3.0.po index 208cb77d..9543e180 100644 --- a/whatsnew/3.0.po +++ b/whatsnew/3.0.po @@ -8,12 +8,13 @@ # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-15 07:56+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -659,8 +660,8 @@ msgstr "پشتیبانی C API برای اجرای محدود (restricted execut msgid ":c:func:`!PyNumber_Coerce`, :c:func:`!PyNumber_CoerceEx`, :c:func:`!PyMember_Get`, and :c:func:`!PyMember_Set` C APIs are removed." msgstr ":c:func:`!PyNumber_Coerce`، :c:func:`!PyNumber_CoerceEx`، :c:func:`!PyMember_Get` و :c:func:`!PyMember_Set` API‌های C حذف شده‌اند." -msgid "New C API :c:func:`PyImport_ImportModuleNoBlock`, works like :c:func:`PyImport_ImportModule` but won't block on the import lock (returning an error instead)." -msgstr "C API جدید :c:func:`PyImport_ImportModuleNoBlock`، مانند :c:func:`PyImport_ImportModule` کار می‌کند، اما روی قفل ایمپورت مسدود نمی‌شود (به جای آن خطا برمی‌گرداند)." +msgid "New C API :c:func:`!PyImport_ImportModuleNoBlock`, works like :c:func:`PyImport_ImportModule` but won't block on the import lock (returning an error instead)." +msgstr "تابع جدید در C API به نام :c:func:`!PyImport_ImportModuleNoBlock`، مشابه :c:func:`PyImport_ImportModule` کار می‌کند اما روی قفل ایمپورت متوقف (block) نمی‌شود (و به جای آن یک خطا برمی‌گرداند)." msgid "Renamed the boolean conversion C-level slot and method: ``nb_nonzero`` is now ``nb_bool``." msgstr "نام جایگاه و متد تبدیل بولی در سطح C تغییر کرد: ``nb_nonzero`` اکنون ``nb_bool`` است." diff --git a/whatsnew/3.10.po b/whatsnew/3.10.po index e33a4f65..b48bd650 100644 --- a/whatsnew/3.10.po +++ b/whatsnew/3.10.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 07:20+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -535,8 +536,8 @@ msgstr "PEP 626 شماره‌های سطر دقیق‌تر و قابل‌اعت msgid "The :attr:`~frame.f_lineno` attribute of frame objects will always contain the expected line number." msgstr "ویژگی :attr:`~frame.f_lineno` در اشیاء فریم همیشه شماره سطر مورد انتظار را در بر خواهد گرفت." -msgid "The :attr:`~codeobject.co_lnotab` attribute of :ref:`code objects ` is deprecated and will be removed in 3.12. Code that needs to convert from offset to line number should use the new :meth:`~codeobject.co_lines` method instead." -msgstr "ویژگی :attr:`~codeobject.co_lnotab` در :ref:`اشیاء کد ` منسوخ شده است و در نسخه 3.12 حذف خواهد شد. کدی که نیاز به تبدیل از آفست به شماره سطر دارد، باید به جای آن از متد جدید :meth:`~codeobject.co_lines` استفاده کند." +msgid "The :attr:`!codeobject.co_lnotab` attribute of :ref:`code objects ` is deprecated and will be removed in 3.12. Code that needs to convert from offset to line number should use the new :meth:`~codeobject.co_lines` method instead." +msgstr "ویژگی :attr:`!codeobject.co_lnotab` از :ref:`اشیای کد ` منسوخ شده است و در نسخه‌ی 3.12 حذف خواهد شد. کدهایی که نیاز دارند آفست را به شماره سطر تبدیل کنند، باید به جای آن از روش :meth:`~codeobject.co_lines` استفاده کنند." msgid "PEP 634: Structural Pattern Matching" msgstr "PEP 634: تطبیق الگوی ساختاری" @@ -1658,8 +1659,8 @@ msgstr "منسوخ" msgid "Currently Python accepts numeric literals immediately followed by keywords, for example ``0in x``, ``1or x``, ``0if 1else 2``. It allows confusing and ambiguous expressions like ``[0x1for x in y]`` (which can be interpreted as ``[0x1 for x in y]`` or ``[0x1f or x in y]``). Starting in this release, a deprecation warning is raised if the numeric literal is immediately followed by one of keywords :keyword:`and`, :keyword:`else`, :keyword:`for`, :keyword:`if`, :keyword:`in`, :keyword:`is` and :keyword:`or`. In future releases it will be changed to syntax warning, and finally to syntax error. (Contributed by Serhiy Storchaka in :issue:`43833`.)" msgstr "در حال حاضر پایتون مقادیر لفظی عددی را می‌پذیرد که بلافاصله کلیدواژه‌ای پس از آن‌ها بیاید، برای مثال ``0in x``، ``1or x``، ``0if 1else 2``. این امر اجازه می‌دهد عبارت‌های گیج‌کننده و مبهمی مانند ``[0x1for x in y]`` وجود داشته باشند (که می‌توان آن را به صورت ``[0x1 for x in y]`` یا ``[0x1f or x in y]`` تفسیر کرد). از این نسخه به بعد، اگر بلافاصله پس از مقدار لفظی عددی یکی از کلیدواژه‌های :keyword:`and`، :keyword:`else`، :keyword:`for`، :keyword:`if`، :keyword:`in`، :keyword:`is` و :keyword:`or` بیاید، هشدار منسوخ‌شدن نشان داده می‌شود. در نسخه‌های آینده این به هشدار نحوی و در نهایت به خطای نحوی تغییر خواهد کرد. (مشارکت‌شده توسط Serhiy Storchaka در :issue:`43833`.)" -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. Specifically, :meth:`!find_loader`/:meth:`!find_module` (superseded by :meth:`~importlib.abc.MetaPathFinder.find_spec`), :meth:`~importlib.abc.Loader.load_module` (superseded by :meth:`~importlib.abc.Loader.exec_module`), :meth:`!module_repr` (which the import system takes care of for you), the ``__package__`` attribute (superseded by ``__spec__.parent``), the ``__loader__`` attribute (superseded by ``__spec__.loader``), and the ``__cached__`` attribute (superseded by ``__spec__.cached``) will slowly be removed (as well as other classes and methods in :mod:`importlib`). :exc:`ImportWarning` and/or :exc:`DeprecationWarning` will be raised as appropriate to help identify code which needs updating during this transition." -msgstr "از این نسخه به بعد، تلاشی هماهنگ برای آغاز پاک‌سازی معناشناسی‌های قدیمی ایمپورت که برای سازگاری با Python 2.7 نگه داشته شده بودند، صورت خواهد گرفت. به‌طور خاص، :meth:`!find_loader`/:meth:`!find_module` (که :meth:`~importlib.abc.MetaPathFinder.find_spec` جایگزین آن‌ها شده است)، :meth:`~importlib.abc.Loader.load_module` (که :meth:`~importlib.abc.Loader.exec_module` جایگزین آن شده است)، :meth:`!module_repr` (که سیستم ایمپورت آن را برای شما انجام می‌دهد)، ویژگی ``__package__`` (که ``__spec__.parent`` جایگزین آن شده است)، ویژگی ``__loader__`` (که ``__spec__.loader`` جایگزین آن شده است) و ویژگی ``__cached__`` (که ``__spec__.cached`` جایگزین آن شده است) به‌تدریج حذف خواهند شد (و همچنین کلاس‌ها و متدهای دیگر در :mod:`importlib`). :exc:`ImportWarning` و/یا :exc:`DeprecationWarning` در موارد مناسب برانگیخته خواهند شد تا به شناسایی کدهایی که در طول این گذار نیاز به به‌روزرسانی دارند کمک کنند." +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. Specifically, :meth:`!find_loader`/:meth:`!find_module` (superseded by :meth:`~importlib.abc.MetaPathFinder.find_spec`), ``importlib.abc.Loader.load_module`` (superseded by :meth:`~importlib.abc.Loader.exec_module`), :meth:`!module_repr` (which the import system takes care of for you), the ``__package__`` attribute (superseded by ``__spec__.parent``), the ``__loader__`` attribute (superseded by ``__spec__.loader``), and the ``__cached__`` attribute (superseded by ``__spec__.cached``) will slowly be removed (as well as other classes and methods in :mod:`importlib`). :exc:`ImportWarning` and/or :exc:`DeprecationWarning` will be raised as appropriate to help identify code which needs updating during this transition." +msgstr "با شروع از این نسخه، تلاشی هماهنگ برای شروع پاکسازی معناشناسی ایمپورت قدیمی که برای سازگاری با پایتون 2.7 نگه داشته شده بودند، انجام خواهد شد. به‌طور خاص، :meth:`!find_loader`/:meth:`!find_module` (که با :meth:`~importlib.abc.MetaPathFinder.find_spec` جایگزین شده‌اند)، ``importlib.abc.Loader.load_module`` (که با :meth:`~importlib.abc.Loader.exec_module` جایگزین شده است)، :meth:`!module_repr` (که سیستم ایمپورت آن را برای شما انجام می‌دهد)، ویژگی ``__package__`` (که با ``__spec__.parent`` جایگزین شده است)، ویژگی ``__loader__`` (که با ``__spec__.loader`` جایگزین شده است) و ویژگی ``__cached__`` (که با ``__spec__.cached`` جایگزین شده است) به آرامی حذف خواهند شد (به همراه سایر کلاس‌ها و متدها در :mod:`importlib`). هشدار :exc:`ImportWarning` و/یا :exc:`DeprecationWarning` به عنوان هشدار مناسب بالا آورده خواهند شد تا به شناسایی کدهایی که در طول این انتقال نیاز به به‌روزرسانی دارند کمک کنند." 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 "کل فضای نام ``distutils`` منسوخ شده است و در پایتون 3.12 حذف خواهد شد. برای اطلاعات بیشتر به بخش :ref:`تغییرات ماژول ` مراجعه کنید." @@ -1673,8 +1674,8 @@ msgstr "متدهای گوناگون ``load_module()`` در :mod:`importlib` از 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 ":meth:`!zimport.zipimporter.load_module` به نفع :meth:`~zipimport.zipimporter.exec_module` منسوخ شده است. (مشارکت‌شده توسط Brett Cannon در :issue:`26131`.)" -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 "استفاده از :meth:`~importlib.abc.Loader.load_module` توسط سیستم ایمپورت اکنون یک :exc:`ImportWarning` ایجاد می‌کند، زیرا :meth:`~importlib.abc.Loader.exec_module` ترجیح داده می‌شود. (مشارکت‌شده توسط Brett Cannon در :issue:`26131`.)" +msgid "The use of ``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 "استفاده از ``importlib.abc.Loader.load_module`` توسط سیستم ایمپورت اکنون یک :exc:`ImportWarning` را فعال می‌کند زیرا ترجیح بر استفاده از :meth:`~importlib.abc.Loader.exec_module` است. (مشارکت‌کرده توسط Brett Cannon در :issue:`26131`.)" msgid "The use of :meth:`!importlib.abc.MetaPathFinder.find_module` and :meth:`!importlib.abc.PathEntryFinder.find_module` by the import system now trigger an :exc:`ImportWarning` as :meth:`importlib.abc.MetaPathFinder.find_spec` and :meth:`importlib.abc.PathEntryFinder.find_spec` are preferred, respectively. You can use :func:`importlib.util.spec_from_loader` to help in porting. (Contributed by Brett Cannon in :issue:`42134`.)" msgstr "استفاده از :meth:`!importlib.abc.MetaPathFinder.find_module` و :meth:`!importlib.abc.PathEntryFinder.find_module` توسط سیستم ایمپورت اکنون موجب صدور :exc:`ImportWarning` می‌شود، زیرا :meth:`importlib.abc.MetaPathFinder.find_spec` و :meth:`importlib.abc.PathEntryFinder.find_spec` به ترتیب ترجیح داده می‌شوند. می‌توانید از :func:`importlib.util.spec_from_loader` برای کمک به انتقال استفاده کنید. (مشارکت‌شده توسط Brett Cannon در :issue:`42134`.)" @@ -2047,8 +2048,8 @@ msgstr "``PyUnicode_FromUnicode(NULL, size)`` و ``PyUnicode_FromStringAndSize(N 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 "ساختار خصوصی ``_PyUnicode_Name_CAPI`` از PyCapsule API ``unicodedata.ucnhash_CAPI`` به API داخلی C منتقل شده است. (با مشارکت Victor Stinner در :issue:`42157`.)" -msgid ":c:func:`Py_GetPath`, :c:func:`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, :c:func:`Py_GetProgramFullPath`, :c:func:`Py_GetPythonHome` and :c:func:`Py_GetProgramName` functions now return ``NULL`` if called before :c:func:`Py_Initialize` (before Python is initialized). Use the new :ref:`init-config` API to get the :ref:`init-path-config`. (Contributed by Victor Stinner in :issue:`42260`.)" -msgstr "توابع :c:func:`Py_GetPath`، :c:func:`Py_GetPrefix`، :c:func:`Py_GetExecPrefix`، :c:func:`Py_GetProgramFullPath`، :c:func:`Py_GetPythonHome` و :c:func:`Py_GetProgramName` اکنون اگر پیش از :c:func:`Py_Initialize` (پیش از مقداردهی اولیه‌ی پایتون) فراخوانی شوند، مقدار ``NULL`` را برمی‌گردانند. برای دریافت :ref:`init-path-config`، از API جدید :ref:`init-config` استفاده کنید. (مشارکت‌شده توسط Victor Stinner در :issue:`42260`.)" +msgid ":c:func:`!Py_GetPath`, :c:func:`!Py_GetPrefix`, :c:func:`!Py_GetExecPrefix`, :c:func:`!Py_GetProgramFullPath`, :c:func:`!Py_GetPythonHome` and :c:func:`!Py_GetProgramName` functions now return ``NULL`` if called before :c:func:`Py_Initialize` (before Python is initialized). Use the new :ref:`init-config` API to get the :ref:`init-path-config`. (Contributed by Victor Stinner in :issue:`42260`.)" +msgstr "توابع :c:func:`!Py_GetPath`، :c:func:`!Py_GetPrefix`، :c:func:`!Py_GetExecPrefix`، :c:func:`!Py_GetProgramFullPath`، :c:func:`!Py_GetPythonHome` و :c:func:`!Py_GetProgramName` اکنون اگر پیش از :c:func:`Py_Initialize` فراخوانی شوند (پیش از اینکه پایتون مقداردهی اولیه شود)، مقدار ``NULL`` برمی‌گردانند. از API جدید :ref:`init-config` برای دریافت :ref:`init-path-config` استفاده کنید. (مشارکت‌کرده توسط Victor Stinner در :issue:`42260`.)" 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 example, ``x = PyList_SET_ITEM(a, b, c)`` and ``PyList_SET_ITEM(a, b, c) = x`` now fail with a compiler error. It prevents bugs like ``if (PyList_SET_ITEM (a, b, c) < 0) ...`` test. (Contributed by Zackery Spytz and Victor Stinner in :issue:`30459`.)" msgstr "ماکروهای :c:func:`PyList_SET_ITEM`، :c:func:`PyTuple_SET_ITEM` و :c:func:`PyCell_SET` دیگر نمی‌توانند به‌عنوان مقدار چپ (l-value) یا مقدار راست (r-value) به کار روند. برای مثال، ``x = PyList_SET_ITEM(a, b, c)`` و ``PyList_SET_ITEM(a, b, c) = x`` اکنون با خطای کامپایلر شکست می‌خورند. این امر از باگ‌هایی مانند آزمون ``if (PyList_SET_ITEM (a, b, c) < 0) ...`` جلوگیری می‌کند. (مشارکت‌شده توسط Zackery Spytz و Victor Stinner در :issue:`30459`.)" diff --git a/whatsnew/3.11.po b/whatsnew/3.11.po index 6d239e96..f268d2d2 100644 --- a/whatsnew/3.11.po +++ b/whatsnew/3.11.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 13:38+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -2629,8 +2630,8 @@ msgstr "این‌ها بخشی از :ref:`API محدود ` ن msgid "(Contributed by Victor Stinner in :issue:`45474`.)" msgstr "(مشارکت‌شده توسط Victor Stinner در :issue:`45474`.)" -msgid "Exclude :c:func:`PyWeakref_GET_OBJECT` from the limited C API. It never worked since the :c:type:`!PyWeakReference` structure is opaque in the limited C API. (Contributed by Victor Stinner in :issue:`35134`.)" -msgstr "حذف :c:func:`PyWeakref_GET_OBJECT` از C API محدود. این تابع هرگز کار نمی‌کرد، زیرا ساختار :c:type:`!PyWeakReference` در C API محدود مات است. (مشارکت‌شده توسط Victor Stinner در :issue:`35134`.)" +msgid "Exclude :c:func:`!PyWeakref_GET_OBJECT` from the limited C API. It never worked since the :c:type:`!PyWeakReference` structure is opaque in the limited C API. (Contributed by Victor Stinner in :issue:`35134`.)" +msgstr "تابع :c:func:`!PyWeakref_GET_OBJECT` از API محدود C حذف شد. این تابع هیچ‌وقت کار نمی‌کرد زیرا ساختار :c:type:`!PyWeakReference` در API محدود C به صورت کدر (opaque) است. (مشارکت‌کرده توسط Victor Stinner در :issue:`35134`.)" msgid "Remove the ``PyHeapType_GET_MEMBERS()`` macro. It was exposed in the public C API by mistake, it must only be used by Python internally. Use the ``PyTypeObject.tp_members`` member instead. (Contributed by Victor Stinner in :issue:`40170`.)" msgstr "ماکرو ``PyHeapType_GET_MEMBERS()`` حذف شد. این ماکرو به اشتباه در API عمومی C افشا شده بود و تنها باید به‌صورت داخلی توسط پایتون استفاده شود. در عوض از عضو ``PyTypeObject.tp_members`` استفاده کنید. (مشارکت‌شده توسط Victor Stinner در :issue:`40170`.)" diff --git a/whatsnew/3.12.po b/whatsnew/3.12.po index 84c651e4..5bccc298 100644 --- a/whatsnew/3.12.po +++ b/whatsnew/3.12.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 12:45+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -1097,14 +1098,14 @@ msgstr "امضاهای سه‌آرگومانی (type، value، traceback) در : msgid ":exc:`DeprecationWarning` is now raised when :attr:`~module.__package__` on a module differs from :attr:`__spec__.parent ` (previously it was :exc:`ImportWarning`). (Contributed by Brett Cannon in :gh:`65961`.)" msgstr "اکنون وقتی :attr:`~module.__package__` روی یک ماژول با :attr:`__spec__.parent ` متفاوت باشد، :exc:`DeprecationWarning` برخاسته می‌شود (پیش‌تر :exc:`ImportWarning` بود). (مشارکت توسط Brett Cannon در :gh:`65961`.)" -msgid "Setting :attr:`~module.__package__` or :attr:`~module.__cached__` on a module is deprecated, and will cease to be set or taken into consideration by the import system in Python 3.14. (Contributed by Brett Cannon in :gh:`65961`.)" -msgstr "تنظیم :attr:`~module.__package__` یا :attr:`~module.__cached__` روی یک ماژول منسوخ شده است و در پایتون 3.14 سیستم ایمپورت دیگر آن‌ها را تنظیم نخواهد کرد یا در نظر نخواهد گرفت. (مشارکت‌شده توسط Brett Cannon در :gh:`65961`.)" +msgid "Setting :attr:`~module.__package__` or ``__cached__`` on a module is deprecated, and will cease to be set or taken into consideration by the import system in Python 3.14. (Contributed by Brett Cannon in :gh:`65961`.)" +msgstr "تنظیم :attr:`~module.__package__` یا ``__cached__`` روی یک ماژول منسوخ شده است و در پایتون ۳.۱۴ دیگر توسط سیستم ایمپورت تنظیم نخواهد شد یا در نظر گرفته نخواهد شد. (مشارکت‌کرده توسط Brett Cannon در :gh:`65961`.)" msgid "The bitwise inversion operator (``~``) on bool is deprecated. It will throw an error in Python 3.16. Use ``not`` for logical negation of bools instead. In the rare case that you really need the bitwise inversion of the underlying ``int``, convert to int explicitly: ``~int(x)``. (Contributed by Tim Hoffmann in :gh:`103487`.)" msgstr "عملگر وارون‌سازی بیتی (``~``) روی bool منسوخ شده است. این عملگر در Python 3.16 خطا پرتاب خواهد کرد. به‌جای آن، از ``not`` برای نقیه منطقی مقادیر بولی استفاده کنید. در حالت نادر که واقعاً به وارون‌سازی بیتی ``int`` زیرین نیاز دارید، آن را صریحاً به int تبدیل کنید: ``~int(x)``. (مشارکت‌شده توسط Tim Hoffmann در :gh:`103487`.)" -msgid "Accessing :attr:`~codeobject.co_lnotab` on code objects was deprecated in Python 3.10 via :pep:`626`, but it only got a proper :exc:`DeprecationWarning` in 3.12. May be removed in 3.15. (Contributed by Nikita Sobolev in :gh:`101866`.)" -msgstr "دسترسی به :attr:`~codeobject.co_lnotab` روی اشیاء کد در پایتون 3.10 از طریق :pep:`626` منسوخ شد، اما تنها در نسخه 3.12 بود که یک :exc:`DeprecationWarning` مناسب دریافت کرد. ممکن است در نسخه 3.15 حذف شود. (مشارکت نیکیتا سوبولف در :gh:`101866`.)" +msgid "Accessing :attr:`!codeobject.co_lnotab` on code objects was deprecated in Python 3.10 via :pep:`626`, but it only got a proper :exc:`DeprecationWarning` in 3.12. May be removed in 3.15. (Contributed by Nikita Sobolev in :gh:`101866`.)" +msgstr "دسترسی به :attr:`!codeobject.co_lnotab` روی اشیاء کد در پایتون ۳.۱۰ از طریق :pep:`626` منسوخ شد، اما تنها در نسخه‌ی ۳.۱۲ هشدار مناسب :exc:`DeprecationWarning` را دریافت کرد. ممکن است در نسخه‌ی ۳.۱۵ حذف شود. (مشارکت‌کرده توسط Nikita Sobolev در :gh:`101866`.)" msgid "Pending removal in Python 3.13" msgstr "در پایتون 3.13 حذف خواهد شد" @@ -1253,8 +1254,8 @@ msgstr "در انتظار حذف در پایتون 3.15" msgid "The import system:" msgstr "سیستم ایمپورت:" -msgid "Setting :attr:`~module.__cached__` on a module while failing to set :attr:`__spec__.cached ` is deprecated. In Python 3.15, :attr:`!__cached__` will cease to be set or take into consideration by the import system or standard library. (:gh:`97879`)" -msgstr "تنظیم :attr:`~module.__cached__` روی یک ماژول بدون آنکه :attr:`__spec__.cached ` تنظیم شود، منسوخ شده است. در پایتون 3.15، :attr:`!__cached__` دیگر توسط سیستم ایمپورت یا کتابخانه استاندارد تنظیم یا در نظر گرفته نخواهد شد. (:gh:`97879`)" +msgid "Setting ``__cached__`` on a module while failing to set :attr:`__spec__.cached ` is deprecated. In Python 3.15, ``__cached__`` will cease to be set or take into consideration by the import system or standard library. (:gh:`97879`)" +msgstr "تنظیم ``__cached__`` روی یک ماژول در حالی که تنظیم :attr:`__spec__.cached ` با شکست مواجه می‌شود، منسوخ شده است. در پایتون ۳.۱۵، ``__cached__`` دیگر توسط سیستم ایمپورت یا کتابخانه‌ی استاندارد تنظیم نخواهد شد یا در نظر گرفته نخواهد شد. (:gh:`97879`)" msgid "Setting :attr:`~module.__package__` on a module while failing to set :attr:`__spec__.parent ` is deprecated. In Python 3.15, :attr:`!__package__` will cease to be set or take into consideration by the import system or standard library. (:gh:`97879`)" msgstr "تنظیم :attr:`~module.__package__` روی یک ماژول بدون تنظیم :attr:`__spec__.parent ` منسوخ شده است. در پایتون 3.15، :attr:`!__package__` دیگر توسط سامانه ایمپورت یا کتابخانه استاندارد تنظیم یا در نظر گرفته نخواهد شد. (:gh:`97879`)" @@ -1268,8 +1269,8 @@ msgstr "تابع مستندسازی‌نشده‌ی :func:`!ctypes.SetPointerTyp msgid ":mod:`http.server`:" msgstr ":mod:`http.server`:" -msgid "The obsolete and rarely used :class:`~http.server.CGIHTTPRequestHandler` has been deprecated since Python 3.13. No direct replacement exists. *Anything* is better than CGI to interface a web server with a request handler." -msgstr "کلاس :class:`~http.server.CGIHTTPRequestHandler` که منسوخ است و به‌ندرت استفاده می‌شود، از پایتون 3.13 از رده خارج شده است. هیچ جایگزین مستقیمی وجود ندارد. برای اتصال یک وب‌سرور به هندلر درخواست، *هر چیزی* بهتر از CGI است." +msgid "The obsolete and rarely used :class:`!CGIHTTPRequestHandler` has been deprecated since Python 3.13. No direct replacement exists. *Anything* is better than CGI to interface a web server with a request handler." +msgstr "کلاس منسوخ‌شده و به‌ندرت استفاده‌شده‌ی :class:`!CGIHTTPRequestHandler` از پایتون ۳.۱۳ منسوخ شده است. هیچ جایگزین مستقیمی برای آن وجود ندارد. *هر چیزی* بهتر از CGI است تا یک وب‌سرور را به یک هندلر درخواست متصل کند." msgid "The :option:`!--cgi` flag to the :program:`python -m http.server` command-line interface has been deprecated since Python 3.13." msgstr "پرچم :option:`!--cgi` در رابط خط فرمان :program:`python -m http.server` از پایتون 3.13 منسوخ شده است." @@ -1283,14 +1284,14 @@ msgstr "متد ``load_module()``: به‌جای آن از ``exec_module()`` اس msgid ":mod:`pathlib`:" msgstr ":mod:`pathlib`:" -msgid ":meth:`.PurePath.is_reserved` has been deprecated since Python 3.13. Use :func:`os.path.isreserved` to detect reserved paths on Windows." -msgstr ":meth:`.PurePath.is_reserved` از پایتون 3.13 منسوخ شده است. برای تشخیص مسیرهای رزروشده در ویندوز، از :func:`os.path.isreserved` استفاده کنید." +msgid ":meth:`!.PurePath.is_reserved` has been deprecated since Python 3.13. Use :func:`os.path.isreserved` to detect reserved paths on Windows." +msgstr "متد :meth:`!.PurePath.is_reserved` از پایتون ۳.۱۳ منسوخ شده است. برای شناسایی مسیرهای رزرو شده در ویندوز از :func:`os.path.isreserved` استفاده کنید." msgid ":mod:`platform`:" msgstr ":mod:`platform`:" -msgid ":func:`~platform.java_ver` has been deprecated since Python 3.13. This function is only useful for Jython support, has a confusing API, and is largely untested." -msgstr ":func:`~platform.java_ver` از پایتون 3.13 منسوخ شده است. این تابع تنها برای پشتیبانی از Jython مفید است، API گیج‌کننده‌ای دارد و عمدتاً آزمون‌نشده است." +msgid ":func:`!platform.java_ver` has been deprecated since Python 3.13. This function is only useful for Jython support, has a confusing API, and is largely untested." +msgstr "تابع :func:`!platform.java_ver` از پایتون ۳.۱۳ منسوخ شده است. این تابع فقط برای پشتیبانی از Jython مفید است، یک API گیج‌کننده دارد و تا حد زیادی آزمایش نشده است." msgid ":mod:`sysconfig`:" msgstr ":mod:`sysconfig`:" @@ -1307,8 +1308,8 @@ msgstr ":func:`~threading.RLock` در پایتون 3.15 هیچ آرگومانی msgid ":mod:`types`:" msgstr ":mod:`types`:" -msgid ":class:`types.CodeType`: Accessing :attr:`~codeobject.co_lnotab` was deprecated in :pep:`626` since 3.10 and was planned to be removed in 3.12, but it only got a proper :exc:`DeprecationWarning` in 3.12. May be removed in 3.15. (Contributed by Nikita Sobolev in :gh:`101866`.)" -msgstr ":class:`types.CodeType`: دسترسی به :attr:`~codeobject.co_lnotab` مطابق :pep:`626` از نسخه‌ی 3.10 منسوخ شد و قرار بود در 3.12 حذف شود، اما تنها در 3.12 یک :exc:`DeprecationWarning` مناسب دریافت کرد. ممکن است در 3.15 حذف شود. (مشارکت‌شده توسط Nikita Sobolev در :gh:`101866`.)" +msgid ":class:`types.CodeType`: Accessing :attr:`!codeobject.co_lnotab` was deprecated in :pep:`626` since 3.10 and was planned to be removed in 3.12, but it only got a proper :exc:`DeprecationWarning` in 3.12. May be removed in 3.15. (Contributed by Nikita Sobolev in :gh:`101866`.)" +msgstr ":class:`types.CodeType`: دسترسی به :attr:`!codeobject.co_lnotab` در :pep:`626` از نسخه‌ی ۳.۱۰ منسوخ شد و برنامه‌ریزی شده بود که در نسخه‌ی ۳.۱۲ حذف شود، اما تنها در نسخه‌ی ۳.۱۲ هشدار مناسب :exc:`DeprecationWarning` را دریافت کرد. ممکن است در نسخه‌ی ۳.۱۵ حذف شود. (مشارکت‌کرده توسط Nikita Sobolev در :gh:`101866`.)" msgid "The undocumented keyword argument syntax for creating :class:`~typing.NamedTuple` classes (for example, ``Point = NamedTuple(\"Point\", x=int, y=int)``) has been deprecated since Python 3.13. Use the class-based syntax or the functional syntax instead." msgstr "سینتکس مستند‌نشده‌ی آرگومان کلیدواژه‌ای برای ایجاد کلاس‌های :class:`~typing.NamedTuple` (برای مثال، ``Point = NamedTuple(\"Point\", x=int, y=int)``) از پایتون 3.13 منسوخ شده است. به جای آن از سینتکس مبتنی بر کلاس یا سینتکس تابعی استفاده کنید." @@ -1316,20 +1317,23 @@ msgstr "سینتکس مستند‌نشده‌ی آرگومان کلیدواژه msgid "When using the functional syntax of :class:`~typing.TypedDict`\\s, failing to pass a value to the *fields* parameter (``TD = TypedDict(\"TD\")``) or passing ``None`` (``TD = TypedDict(\"TD\", None)``) has been deprecated since Python 3.13. Use ``class TD(TypedDict): pass`` or ``TD = TypedDict(\"TD\", {})`` to create a TypedDict with zero field." msgstr "هنگام استفاده از سینتکس تابعی :class:`~typing.TypedDict`\\s، ارسال‌نکردن مقدار به پارامتر *fields* (``TD = TypedDict(\"TD\")``) یا ارسال ``None`` (``TD = TypedDict(\"TD\", None)``) از پایتون 3.13 منسوخ شده است. برای ایجاد یک TypedDict بدون هیچ فیلدی، از ``class TD(TypedDict): pass`` یا ``TD = TypedDict(\"TD\", {})`` استفاده کنید." -msgid "The :deco:`typing.no_type_check_decorator` decorator function has been deprecated since Python 3.13. After eight years in the :mod:`typing` module, it has yet to be supported by any major type checker." -msgstr "تابع دکوراتور :deco:`typing.no_type_check_decorator` از پایتون 3.13 منسوخ شده است. پس از هشت سال حضور در ماژول :mod:`typing`، هنوز هیچ بررسی‌گر نوع (type checker) بزرگی از آن پشتیبانی نکرده است." +msgid "The :deco:`!typing.no_type_check_decorator` decorator function has been deprecated since Python 3.13. After eight years in the :mod:`typing` module, it has yet to be supported by any major type checker." +msgstr "تابع آراینده‌ی :deco:`!typing.no_type_check_decorator` از پایتون ۳.۱۳ منسوخ شده است. پس از هشت سال حضور در ماژول :mod:`typing`، هنوز توسط هیچ بررسی‌کننده نوع (type checker) مهمی پشتیبانی نمی‌شود." + +msgid ":mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse` modules." +msgstr "ماژول‌های :mod:`!sre_compile`، :mod:`!sre_constants` و :mod:`!sre_parse`." msgid ":mod:`wave`:" msgstr ":mod:`wave`:" -msgid "The :meth:`~wave.Wave_read.getmark`, :meth:`!setmark`, and :meth:`~wave.Wave_read.getmarkers` methods of the :class:`~wave.Wave_read` and :class:`~wave.Wave_write` classes have been deprecated since Python 3.13." -msgstr "متدهای :meth:`~wave.Wave_read.getmark`، :meth:`!setmark` و :meth:`~wave.Wave_read.getmarkers` در کلاس‌های :class:`~wave.Wave_read` و :class:`~wave.Wave_write` از پایتون 3.13 منسوخ شده‌اند." +msgid "The ``getmark()``, ``setmark()`` and ``getmarkers()`` methods of the :class:`~wave.Wave_read` and :class:`~wave.Wave_write` classes have been deprecated since Python 3.13." +msgstr "متدهای ``getmark()``، ``setmark()`` و ``getmarkers()`` از کلاس‌های :class:`~wave.Wave_read` و :class:`~wave.Wave_write` از پایتون ۳.۱۳ منسوخ شده‌اند." msgid ":mod:`zipimport`:" msgstr ":mod:`zipimport`:" -msgid ":meth:`~zipimport.zipimporter.load_module` has been deprecated since Python 3.10. Use :meth:`~zipimport.zipimporter.exec_module` instead. (Contributed by Jiahao Li in :gh:`125746`.)" -msgstr ":meth:`~zipimport.zipimporter.load_module` از پایتون 3.10 منسوخ شده است. به جای آن از :meth:`~zipimport.zipimporter.exec_module` استفاده کنید. (مشارکت‌شده توسط Jiahao Li در :gh:`125746`.)" +msgid ":meth:`!zipimport.zipimporter.load_module` has been deprecated since Python 3.10. Use :meth:`~zipimport.zipimporter.exec_module` instead. (:gh:`125746`.)" +msgstr "متد :meth:`!zipimport.zipimporter.load_module` از پایتون ۳.۱۰ منسوخ شده است. به‌جای آن از :meth:`~zipimport.zipimporter.exec_module` استفاده کنید. (:gh:`125746`.)" msgid "Pending removal in Python 3.16" msgstr "در انتظار حذف در پایتون 3.16" @@ -1445,18 +1449,195 @@ msgstr "ویژگی مستندنشده و استفاده‌نشده‌ی :attr:`! msgid "Pending removal in Python 3.17" msgstr "در انتظار حذف در Python 3.17" +msgid ":mod:`datetime`:" +msgstr ":mod:`datetime`:" + +msgid ":meth:`~datetime.datetime.strptime` calls using a format string containing ``%e`` (day of month) without a year. This has been deprecated since Python 3.15. (Contributed by Stan Ulbrych in :gh:`70647`.)" +msgstr "فراخوانی‌های :meth:`~datetime.datetime.strptime` که از یک رشته‌ی قالب حاوی ``%e`` (روز ماه) بدون سال استفاده می‌کنند. این مورد از پایتون ۳.۱۵ منسوخ شده است. (مشارکت‌شده توسط Stan Ulbrych در :gh:`70647`.)" + msgid ":mod:`collections.abc`:" msgstr ":mod:`collections.abc`:" msgid ":class:`collections.abc.ByteString` is scheduled for removal in Python 3.17." msgstr ":class:`collections.abc.ByteString` برای حذف در پایتون 3.17 برنامه‌ریزی شده است." +msgid ":mod:`encodings`:" +msgstr ":mod:`encodings`:" + +msgid "Passing non-ascii *encoding* names to :func:`encodings.normalize_encoding` is deprecated and scheduled for removal in Python 3.17. (Contributed by Stan Ulbrych in :gh:`136702`.)" +msgstr "ارسال نام‌های *کدگذاری* (encoding) غیر اسکی به :func:`encodings.normalize_encoding` منسوخ شده است و طبق برنامه در پایتون ۳.۱۷ حذف خواهد شد. (مشارکت‌شده توسط Stan Ulbrych در :gh:`136702`.)" + +msgid ":mod:`profile`:" +msgstr ":mod:`profile`:" + +msgid "The :mod:`!profile` module is deprecated and will be removed in Python 3.17. Use :mod:`profiling.tracing` instead, which provides a compatible API. See :pep:`799` for details. (Contributed by Pablo Galindo and László Kiss Kollár in :gh:`138122`.)" +msgstr "ماژول :mod:`!profile` منسوخ شده است و در پایتون ۳.۱۷ حذف خواهد شد. به جای آن از :mod:`profiling.tracing` استفاده کنید که یک API سازگار فراهم می‌کند. برای جزئیات، :pep:`799` را ببینید. (مشارکت‌شده توسط Pablo Galindo و László Kiss Kollár در :gh:`138122`.)" + +msgid ":mod:`webbrowser`:" +msgstr ":mod:`webbrowser`:" + +msgid ":class:`!webbrowser.MacOSXOSAScript` is deprecated in favour of :class:`!webbrowser.MacOS`. (:gh:`137586`)" +msgstr "کلاس :class:`!webbrowser.MacOSXOSAScript` به نفع :class:`!webbrowser.MacOS` منسوخ شده است. (:gh:`137586`)" + msgid "Before Python 3.14, old-style unions were implemented using the private class ``typing._UnionGenericAlias``. This class is no longer needed for the implementation, but it has been retained for backward compatibility, with removal scheduled for Python 3.17. Users should use documented introspection helpers like :func:`typing.get_origin` and :func:`typing.get_args` instead of relying on private implementation details." msgstr "پیش از پایتون 3.14، اجتماع‌های سبک قدیمی (old-style unions) با استفاده از کلاس خصوصی ``typing._UnionGenericAlias`` پیاده‌سازی می‌شدند. این کلاس دیگر برای پیاده‌سازی مورد نیاز نیست، اما برای سازگاری با نسخه‌های قبلی حفظ شده است و حذف آن برای پایتون 3.17 برنامه‌ریزی شده است. کاربران باید به‌جای اتکا به جزئیات پیاده‌سازی خصوصی، از ابزارهای کمکی مستند‌شده‌ی درون‌نگری مانند :func:`typing.get_origin` و :func:`typing.get_args` استفاده کنند." msgid ":class:`typing.ByteString`, deprecated since Python 3.9, is scheduled for removal in Python 3.17." msgstr ":class:`typing.ByteString`، که از پایتون 3.9 منسوخ شده است، قرار است در پایتون 3.17 حذف شود." +msgid ":mod:`tkinter`:" +msgstr ":mod:`tkinter`:" + +msgid "The :class:`!tkinter.Variable` methods :meth:`!trace_variable`, :meth:`!trace` (an alias of :meth:`!trace_variable`), :meth:`!trace_vdelete` and :meth:`!trace_vinfo`, deprecated since Python 3.14, are scheduled for removal in Python 3.17. Use :meth:`!trace_add`, :meth:`!trace_remove` and :meth:`!trace_info` instead. (Contributed by Serhiy Storchaka in :gh:`120220`.)" +msgstr "متدهای :class:`!tkinter.Variable` یعنی :meth:`!trace_variable`، :meth:`!trace` (یک نام مستعار برای :meth:`!trace_variable`)، :meth:`!trace_vdelete` و :meth:`!trace_vinfo` که از پایتون ۳.۱۴ منسوخ شده‌اند، طبق برنامه در پایتون ۳.۱۷ حذف خواهند شد. به جای آن‌ها از :meth:`!trace_add`، :meth:`!trace_remove` و :meth:`!trace_info` استفاده کنید. (مشارکت‌شده توسط Serhiy Storchaka در :gh:`120220`.)" + +msgid "Pending removal in Python 3.19" +msgstr "در نوبت حذف در پایتون ۳.۱۹" + +msgid "Implicitly switching to the MSVC-compatible struct layout by setting :attr:`~ctypes.Structure._pack_` but not :attr:`~ctypes.Structure._layout_` on non-Windows platforms." +msgstr "تغییر ضمنی به چیدمان struct سازگار با MSVC با تنظیم :attr:`~ctypes.Structure._pack_` اما بدون تنظیم :attr:`~ctypes.Structure._layout_` روی پلتفرم‌های غیر ویندوزی." + +msgid ":mod:`hashlib`:" +msgstr ":mod:`hashlib`:" + +msgid "In hash function constructors such as :func:`~hashlib.new` or the direct hash-named constructors such as :func:`~hashlib.md5` and :func:`~hashlib.sha256`, their optional initial data parameter could also be passed a keyword argument named ``data=`` or ``string=`` in various :mod:`!hashlib` implementations." +msgstr "در سازنده‌های تابع هش مانند :func:`~hashlib.new` یا سازنده‌های مستقیم با نام هش مانند :func:`~hashlib.md5` و :func:`~hashlib.sha256`، پارامتر داده‌ی اولیه‌ی اختیاری آن‌ها همچنین می‌تواند به عنوان یک آرگومان کلیدواژه‌ای به نام ``data=`` یا ``string=`` در پیاده‌سازی‌های مختلف :mod:`!hashlib` ارسال شود." + +msgid "Support for the ``string`` keyword argument name is now deprecated and slated for removal in Python 3.19." +msgstr "پشتیبانی از نام آرگومان کلیدواژه‌ای ``string`` اکنون منسوخ شده است و در پایتون ۳.۱۹ حذف خواهد شد." + +msgid "Before Python 3.13, the ``string`` keyword parameter was not correctly supported depending on the backend implementation of hash functions. Prefer passing the initial data as a positional argument for maximum backwards compatibility." +msgstr "پیش از پایتون ۳.۱۳، پارامتر کلیدواژه‌ای ``string`` بسته به پیاده‌سازی بک‌اند توابع هش به طور صحیح پشتیبانی نمی‌شد. برای حداکثر سازگاری رو به عقب، ترجیح دهید داده‌های اولیه را به عنوان یک آرگومان جایگاهی ارسال کنید." + +msgid ":mod:`http.cookies`:" +msgstr ":mod:`http.cookies`:" + +msgid ":meth:`http.cookies.Morsel.js_output` is deprecated and will be removed in Python 3.19." +msgstr "متد :meth:`http.cookies.Morsel.js_output` منسوخ شده است و در پایتون ۳.۱۹ حذف خواهد شد." + +msgid ":meth:`http.cookies.BaseCookie.js_output` is deprecated and will be removed in Python 3.19." +msgstr "متد :meth:`http.cookies.BaseCookie.js_output` منسوخ شده است و در پایتون ۳.۱۹ حذف خواهد شد." + +msgid ":mod:`imaplib`:" +msgstr ":mod:`imaplib`:" + +msgid "Altering :attr:`IMAP4.file ` is now deprecated and slated for removal in Python 3.19. This property is now unused and changing its value does not automatically close the current file." +msgstr "تغییر دادن :attr:`IMAP4.file ` اکنون منسوخ شده است و در پایتون ۳.۱۹ حذف خواهد شد. این ویژگی اکنون استفاده نمی‌شود و تغییر مقدار آن پرونده‌ی جاری را به طور خودکار نمی‌بندد." + +msgid "Before Python 3.14, this property was used to implement the corresponding ``read()`` and ``readline()`` methods for :class:`~imaplib.IMAP4` but this is no longer the case since then." +msgstr "پیش از پایتون ۳.۱۴، از این ویژگی برای پیاده‌سازی متدهای متناظر ``read()`` و ``readline()`` برای :class:`~imaplib.IMAP4` استفاده می‌شد، اما از آن زمان به بعد دیگر این‌گونه نیست." + +msgid "Pending removal in Python 3.20" +msgstr "در نسخه‌ی ۳.۲۰ پایتون حذف خواهد شد" + +msgid "Calling the ``__new__()`` method of :class:`struct.Struct` without the *format* argument is deprecated and will be removed in Python 3.20. Calling :meth:`~object.__init__` method on initialized :class:`~struct.Struct` objects is deprecated and will be removed in Python 3.20." +msgstr "فراخوانی متد ``__new__()`` از :class:`struct.Struct` بدون آرگومان *format* منسوخ شده است و در پایتون ۳.۲۰ حذف خواهد شد. فراخوانی متد :meth:`~object.__init__` روی اشیاء مقداردهی‌شده‌ی :class:`~struct.Struct` منسوخ شده است و در پایتون ۳.۲۰ حذف خواهد شد." + +msgid "(Contributed by Sergey B Kirpichev and Serhiy Storchaka in :gh:`143715`.)" +msgstr "(مشارکت‌کرده توسط Sergey B Kirpichev و Serhiy Storchaka در :gh:`143715`.)" + +msgid "The ``__version__``, ``version`` and ``VERSION`` attributes have been deprecated in these standard library modules and will be removed in Python 3.20. Use :py:data:`sys.version_info` instead." +msgstr "ویژگی‌های ``__version__``، ``version`` و ``VERSION`` در این ماژول‌های کتابخانه‌ی استاندارد منسوخ شده‌اند و در پایتون ۳.۲۰ حذف خواهند شد. به جای آن از :py:data:`sys.version_info` استفاده کنید." + +msgid ":mod:`argparse`" +msgstr ":mod:`argparse`" + +msgid ":mod:`csv`" +msgstr ":mod:`csv`" + +msgid ":mod:`ctypes`" +msgstr ":mod:`ctypes`" + +msgid ":mod:`!ctypes.macholib`" +msgstr ":mod:`!ctypes.macholib`" + +msgid ":mod:`decimal` (use :data:`decimal.SPEC_VERSION` instead)" +msgstr ":mod:`decimal` (به جای آن از :data:`decimal.SPEC_VERSION` استفاده کنید)" + +msgid ":mod:`http.server`" +msgstr ":mod:`http.server`" + +msgid ":mod:`imaplib`" +msgstr ":mod:`imaplib`" + +msgid ":mod:`ipaddress`" +msgstr ":mod:`ipaddress`" + +msgid ":mod:`json`" +msgstr ":mod:`json`" + +msgid ":mod:`logging` (``__date__`` also deprecated)" +msgstr ":mod:`logging` (همچنین ``__date__`` منسوخ شده است)" + +msgid ":mod:`optparse`" +msgstr ":mod:`optparse`" + +msgid ":mod:`pickle`" +msgstr ":mod:`pickle`" + +msgid ":mod:`platform`" +msgstr ":mod:`platform`" + +msgid ":mod:`re`" +msgstr ":mod:`re`" + +msgid ":mod:`socketserver`" +msgstr ":mod:`socketserver`" + +msgid ":mod:`tabnanny`" +msgstr ":mod:`tabnanny`" + +msgid ":mod:`tarfile`" +msgstr ":mod:`tarfile`" + +msgid ":mod:`tkinter.font`" +msgstr ":mod:`tkinter.font`" + +msgid ":mod:`tkinter.ttk`" +msgstr ":mod:`tkinter.ttk`" + +msgid ":mod:`wsgiref.simple_server`" +msgstr ":mod:`wsgiref.simple_server`" + +msgid ":mod:`xml.etree.ElementTree`" +msgstr ":mod:`xml.etree.ElementTree`" + +msgid ":mod:`!xml.sax.expatreader`" +msgstr ":mod:`!xml.sax.expatreader`" + +msgid ":mod:`xml.sax.handler`" +msgstr ":mod:`xml.sax.handler`" + +msgid ":mod:`zlib`" +msgstr ":mod:`zlib`" + +msgid "(Contributed by Hugo van Kemenade and Stan Ulbrych in :gh:`76007`.)" +msgstr "(تهیه‌شده توسط Hugo van Kemenade و Stan Ulbrych در :gh:`76007`.)" + +msgid "Deprecations defined by :pep:`829`:" +msgstr "موارد منسوخ‌شده‌ی تعریف‌شده توسط :pep:`829`:" + +msgid "Warnings are produced for ``import`` lines found in :file:`{name}.pth` files." +msgstr "برای سطرهای ``import`` موجود در پرونده‌های :file:`{name}.pth` هشدارها تولید می‌شوند." + +msgid ":file:`{name}.pth` files are no longer decoded in the locale encoding by default. They **MUST** be encoded in ``utf-8-sig``." +msgstr "پرونده‌های :file:`{name}.pth` دیگر به طور پیش‌فرض با کدگذاری locale رمزگشایی نمی‌شوند. آن‌ها **باید** با ``utf-8-sig`` کدگذاری شوند." + +msgid "(Contributed by Barry Warsaw in :gh:`148641`.)" +msgstr "(تهیه‌شده توسط Barry Warsaw در :gh:`148641`.)" + +msgid ":mod:`ast`:" +msgstr ":mod:`ast`:" + +msgid "Creating instances of abstract AST nodes (such as :class:`ast.AST` or :class:`!ast.expr`) is deprecated and will raise an error in Python 3.20." +msgstr "ایجاد نمونه‌هایی از گره‌های درخت نحوی انتزاعی (AST) انتزاعی (مانند :class:`ast.AST` یا :class:`!ast.expr`) منسوخ شده است و در پایتون ۳.۲۰ یک خطا ایجاد خواهد کرد." + +msgid "It is deprecated to call :func:`isinstance` and :func:`issubclass` checks on protocol classes that were not explicitly decorated with :func:`!runtime_checkable` but that inherit from a runtime-checkable protocol class. This will raise a :exc:`TypeError` in Python 3.20." +msgstr "انجام بررسی‌های :func:`isinstance` و :func:`issubclass` روی کلاس‌های پروتکلی که صراحتاً با :func:`!runtime_checkable` دکور نشده‌اند اما از یک کلاس پروتکل قابل‌بررسی در ران‌تایم ارث‌بری می‌کنند، منسوخ شده است. این کار در پایتون ۳.۲۰ یک :exc:`TypeError` ایجاد خواهد کرد." + +msgid "(Contributed by Bartosz Sławecki in :gh:`132604`.)" +msgstr "(تهیه‌شده توسط Bartosz Sławecki در :gh:`132604`.)" + msgid "Pending removal in future versions" msgstr "در انتظار حذف در نسخه‌های آینده" @@ -1496,11 +1677,8 @@ msgstr "گذراندن یک عدد مختلط به‌عنوان آرگومان * msgid ":mod:`codecs`: use :func:`open` instead of :func:`codecs.open`. (:gh:`133038`)" msgstr ":mod:`codecs`: به جای :func:`codecs.open` از :func:`open` استفاده کنید. (:gh:`133038`)" -msgid ":attr:`codeobject.co_lnotab`: use the :meth:`codeobject.co_lines` method instead." -msgstr ":attr:`codeobject.co_lnotab`: به جای آن از متد :meth:`codeobject.co_lines` استفاده کنید." - -msgid ":mod:`datetime`:" -msgstr ":mod:`datetime`:" +msgid ":attr:`!codeobject.co_lnotab`: use the :meth:`codeobject.co_lines` method instead." +msgstr ":attr:`!codeobject.co_lnotab`: به‌جای آن از متد :meth:`codeobject.co_lines` استفاده کنید." msgid ":meth:`~datetime.datetime.utcnow`: use ``datetime.datetime.now(tz=datetime.UTC)``." msgstr ":meth:`~datetime.datetime.utcnow`: از ``datetime.datetime.now(tz=datetime.UTC)`` استفاده کنید." @@ -1529,8 +1707,11 @@ msgstr ":mod:`logging`: متد ``warn()`` از پایتون 3.3 منسوخ شد msgid ":mod:`mailbox`: Use of StringIO input and text mode is deprecated, use BytesIO and binary mode instead." msgstr ":mod:`mailbox`: استفاده از ورودی StringIO و حالت متنی منسوخ شده است؛ به جای آن از BytesIO و حالت دودویی استفاده کنید." -msgid ":mod:`os`: Calling :func:`os.register_at_fork` in multi-threaded process." -msgstr ":mod:`os`: فراخوانی :func:`os.register_at_fork` در فرایند چندنخی." +msgid ":mod:`os`: Calling :func:`os.register_at_fork` in a multi-threaded process." +msgstr ":mod:`os`: فراخوانی :func:`os.register_at_fork` در یک فرایند چندنخی." + +msgid ":mod:`os.path`: :func:`os.path.commonprefix` is deprecated, use :func:`os.path.commonpath` for path prefixes. The :func:`os.path.commonprefix` function is being deprecated due to having a misleading name and module. The function is not safe to use for path prefixes despite being included in a module about path manipulation, meaning it is easy to accidentally introduce path traversal vulnerabilities into Python programs by using this function." +msgstr ":mod:`os.path`: تابع :func:`os.path.commonprefix` منسوخ شده است؛ برای پیشوندهای مسیر از :func:`os.path.commonpath` استفاده کنید. تابع :func:`os.path.commonprefix` به دلیل داشتن نام و ماژول گمراه‌کننده در حال منسوخ شدن است. این تابع با وجود اینکه در ماژولی مربوط به دستکاری مسیر قرار دارد، برای پیشوندهای مسیر ناامن است، به این معنی که با استفاده از این تابع به راحتی می‌توان آسیب‌پذیری‌های پیمایش مسیر را به طور تصادفی وارد برنامه‌های پایتون کرد." msgid ":class:`!pydoc.ErrorDuringImport`: A tuple value for *exc_info* parameter is deprecated, use an exception instance." msgstr ":class:`!pydoc.ErrorDuringImport`: مقدار تاپل برای پارامتر *exc_info* منسوخ شده است؛ از یک نمونه استثنا استفاده کنید." @@ -1538,9 +1719,6 @@ msgstr ":class:`!pydoc.ErrorDuringImport`: مقدار تاپل برای پارا msgid ":mod:`re`: More strict rules are now applied for numerical group references and group names in regular expressions. Only sequence of ASCII digits is now accepted as a numerical reference. The group name in bytes patterns and replacement strings can now only contain ASCII letters and digits and underscore. (Contributed by Serhiy Storchaka in :gh:`91760`.)" msgstr ":mod:`re`: اکنون قواعد سخت‌گیرانه‌تری برای ارجاع‌های عددی گروه و نام‌های گروه در عبارات باقاعده اعمال می‌شوند. از این پس فقط دنباله‌ای از ارقام اسکی به‌عنوان ارجاع عددی پذیرفته می‌شود. نام گروه در الگوهای bytes و رشته‌های جایگزینی اکنون فقط می‌تواند شامل حروف و ارقام اسکی و خط زیر باشد. (مشارکت‌شده توسط Serhiy Storchaka در :gh:`91760`.)" -msgid ":mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse` modules." -msgstr "ماژول‌های :mod:`!sre_compile`، :mod:`!sre_constants` و :mod:`!sre_parse`." - msgid ":mod:`shutil`: :func:`~shutil.rmtree`'s *onerror* parameter is deprecated in Python 3.12; use the *onexc* parameter instead." msgstr ":mod:`shutil`: پارامتر *onerror* در :func:`~shutil.rmtree` در پایتون 3.12 منسوخ شده است؛ به جای آن از پارامتر *onexc* استفاده کنید." @@ -2585,14 +2763,11 @@ msgstr "فیلد ``ma_version_tag`` در :c:type:`PyDictObject` برای ماژ msgid "Creating :c:data:`immutable types ` with mutable bases (:gh:`95388`)." msgstr "ایجاد :c:data:`نوع‌های تغییرناپذیر ` با کلاس‌های پایه‌ی تغییرپذیر (:gh:`95388`)." -msgid "The :c:func:`PyImport_ImportModuleNoBlock`: Use :c:func:`PyImport_ImportModule` instead." -msgstr "تابع :c:func:`PyImport_ImportModuleNoBlock`: به‌جای آن از :c:func:`PyImport_ImportModule` استفاده کنید." +msgid "The :c:func:`!PyImport_ImportModuleNoBlock`: Use :c:func:`PyImport_ImportModule` instead." +msgstr "تابعی که :c:func:`!PyImport_ImportModuleNoBlock` بود: به‌جای آن از :c:func:`PyImport_ImportModule` استفاده کنید." -msgid ":c:func:`PyWeakref_GetObject` and :c:func:`PyWeakref_GET_OBJECT`: Use :c:func:`PyWeakref_GetRef` instead. The `pythoncapi-compat project `__ can be used to get :c:func:`PyWeakref_GetRef` on Python 3.12 and older." -msgstr ":c:func:`PyWeakref_GetObject` و :c:func:`PyWeakref_GET_OBJECT`: به‌جای آن‌ها از :c:func:`PyWeakref_GetRef` استفاده کنید. می‌توان از `پروژه‌ی pythoncapi-compat `__ برای دریافت :c:func:`PyWeakref_GetRef` در پایتون 3.12 و نسخه‌های قدیمی‌تر استفاده کرد." - -msgid ":c:type:`Py_UNICODE` type and the :c:macro:`!Py_UNICODE_WIDE` macro: Use :c:type:`wchar_t` instead." -msgstr "نوع :c:type:`Py_UNICODE` و ماکروی :c:macro:`!Py_UNICODE_WIDE`: به‌جای آن‌ها از :c:type:`wchar_t` استفاده کنید." +msgid ":c:func:`!PyWeakref_GetObject` and :c:func:`!PyWeakref_GET_OBJECT`: Use :c:func:`PyWeakref_GetRef` instead. The `pythoncapi-compat project `__ can be used to get :c:func:`PyWeakref_GetRef` on Python 3.12 and older." +msgstr ":c:func:`!PyWeakref_GetObject` و :c:func:`!PyWeakref_GET_OBJECT`: به‌جای آن‌ها از :c:func:`PyWeakref_GetRef` استفاده کنید. پروژه‌ی `pythoncapi-compat project `__ می‌تواند برای دریافت :c:func:`PyWeakref_GetRef` در پایتون ۳.۱۲ و قدیمی‌تر استفاده شود." msgid ":c:func:`!PyUnicode_AsDecodedObject`: Use :c:func:`PyCodec_Decode` instead." msgstr ":c:func:`!PyUnicode_AsDecodedObject`: به‌جای آن از :c:func:`PyCodec_Decode` استفاده کنید." @@ -2609,23 +2784,23 @@ msgstr ":c:func:`!PyUnicode_AsEncodedUnicode`: به‌جای آن از :c:func:` msgid "Python initialization functions, deprecated in Python 3.13:" msgstr "توابع مقداردهی اولیه پایتون، منسوخ‌شده در پایتون 3.13:" -msgid ":c:func:`Py_GetPath`: Use :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:`sys.path`) instead." -msgstr ":c:func:`Py_GetPath`: به جای آن از :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:`sys.path`) استفاده کنید." +msgid ":c:func:`!Py_GetPath`: Use :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:`sys.path`) instead." +msgstr ":c:func:`!Py_GetPath`: به‌جای آن از :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:`sys.path`) استفاده کنید." -msgid ":c:func:`Py_GetPrefix`: Use :c:func:`PyConfig_Get(\"base_prefix\") ` (:data:`sys.base_prefix`) instead. Use :c:func:`PyConfig_Get(\"prefix\") ` (:data:`sys.prefix`) if :ref:`virtual environments ` need to be handled." -msgstr ":c:func:`Py_GetPrefix`: به‌جای آن از :c:func:`PyConfig_Get(\"base_prefix\") ` (:data:`sys.base_prefix`) استفاده کنید. اگر لازم باشد :ref:`محیط‌های مجازی ` مدیریت شوند، از :c:func:`PyConfig_Get(\"prefix\") ` (:data:`sys.prefix`) استفاده کنید." +msgid ":c:func:`!Py_GetPrefix`: Use :c:func:`PyConfig_Get(\"base_prefix\") ` (:data:`sys.base_prefix`) instead. Use :c:func:`PyConfig_Get(\"prefix\") ` (:data:`sys.prefix`) if :ref:`virtual environments ` need to be handled." +msgstr ":c:func:`!Py_GetPrefix`: به‌جای آن از :c:func:`PyConfig_Get(\"base_prefix\") ` (:data:`sys.base_prefix`) استفاده کنید. اگر نیاز به مدیریت :ref:`محیط‌های مجازی ` است، از :c:func:`PyConfig_Get(\"prefix\") ` (:data:`sys.prefix`) استفاده کنید." -msgid ":c:func:`Py_GetExecPrefix`: Use :c:func:`PyConfig_Get(\"base_exec_prefix\") ` (:data:`sys.base_exec_prefix`) instead. Use :c:func:`PyConfig_Get(\"exec_prefix\") ` (:data:`sys.exec_prefix`) if :ref:`virtual environments ` need to be handled." -msgstr ":c:func:`Py_GetExecPrefix`: به جای آن از :c:func:`PyConfig_Get(\"base_exec_prefix\") ` (:data:`sys.base_exec_prefix`) استفاده کنید. اگر نیاز به مدیریت :ref:`محیط‌های مجازی ` وجود دارد، از :c:func:`PyConfig_Get(\"exec_prefix\") ` (:data:`sys.exec_prefix`) استفاده کنید." +msgid ":c:func:`!Py_GetExecPrefix`: Use :c:func:`PyConfig_Get(\"base_exec_prefix\") ` (:data:`sys.base_exec_prefix`) instead. Use :c:func:`PyConfig_Get(\"exec_prefix\") ` (:data:`sys.exec_prefix`) if :ref:`virtual environments ` need to be handled." +msgstr ":c:func:`!Py_GetExecPrefix`: به‌جای آن از :c:func:`PyConfig_Get(\"base_exec_prefix\") ` (:data:`sys.base_exec_prefix`) استفاده کنید. اگر نیاز به مدیریت :ref:`محیط‌های مجازی ` است، از :c:func:`PyConfig_Get(\"exec_prefix\") ` (:data:`sys.exec_prefix`) استفاده کنید." -msgid ":c:func:`Py_GetProgramFullPath`: Use :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) instead." -msgstr ":c:func:`Py_GetProgramFullPath`: به‌جای آن از :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) استفاده کنید." +msgid ":c:func:`!Py_GetProgramFullPath`: Use :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) instead." +msgstr ":c:func:`!Py_GetProgramFullPath`: به‌جای آن از :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) استفاده کنید." -msgid ":c:func:`Py_GetProgramName`: Use :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) instead." -msgstr ":c:func:`Py_GetProgramName`: به جای آن از :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) استفاده کنید." +msgid ":c:func:`!Py_GetProgramName`: Use :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) instead." +msgstr ":c:func:`!Py_GetProgramName`: به‌جای آن از :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) استفاده کنید." -msgid ":c:func:`Py_GetPythonHome`: Use :c:func:`PyConfig_Get(\"home\") ` or the :envvar:`PYTHONHOME` environment variable instead." -msgstr ":c:func:`Py_GetPythonHome`: به‌جای آن از :c:func:`PyConfig_Get(\"home\") ` یا متغیر محیطی :envvar:`PYTHONHOME` استفاده کنید." +msgid ":c:func:`!Py_GetPythonHome`: Use :c:func:`PyConfig_Get(\"home\") ` or the :envvar:`PYTHONHOME` environment variable instead." +msgstr ":c:func:`!Py_GetPythonHome`: به‌جای آن از :c:func:`PyConfig_Get(\"home\") ` یا متغیر محیطی :envvar:`PYTHONHOME` استفاده کنید." msgid "The `pythoncapi-compat project `__ can be used to get :c:func:`PyConfig_Get` on Python 3.13 and older." msgstr "می‌توان از `پروژه‌ی pythoncapi-compat `__ برای دسترسی به :c:func:`PyConfig_Get` در پایتون 3.13 و قدیمی‌تر استفاده کرد." @@ -2645,8 +2820,8 @@ msgstr ":c:func:`!Py_SetProgramName()`: به جای آن، :c:member:`PyConfig.p msgid ":c:func:`!Py_SetPythonHome()`: Set :c:member:`PyConfig.home` instead." msgstr ":c:func:`!Py_SetPythonHome()`: به جای آن، :c:member:`PyConfig.home` را تنظیم کنید." -msgid ":c:func:`PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!warnings.filters` instead." -msgstr ":c:func:`PySys_ResetWarnOptions`: به جای آن، :data:`sys.warnoptions` و :data:`!warnings.filters` را پاک کنید." +msgid ":c:func:`!PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!warnings.filters` instead." +msgstr ":c:func:`!PySys_ResetWarnOptions`: به‌جای آن :data:`sys.warnoptions` و :data:`!warnings.filters` را پاکسازی کنید." msgid "The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:`PyConfig` instead." msgstr "به‌جای آن، باید از API تابع :c:func:`Py_InitializeFromConfig` به همراه :c:type:`PyConfig` استفاده کرد." @@ -2812,3 +2987,6 @@ msgstr ":c:func:`!PyUnicode_GET_DATA_SIZE`" msgid "Remove the ``PyUnicode_InternImmortal()`` function macro. (Contributed by Victor Stinner in :gh:`85858`.)" msgstr "ماکروی تابع ``PyUnicode_InternImmortal()`` حذف شد. (مشارکت‌شده توسط Victor Stinner در :gh:`85858`.)" + +#~ msgid ":c:type:`Py_UNICODE` type and the :c:macro:`!Py_UNICODE_WIDE` macro: Use :c:type:`wchar_t` instead." +#~ msgstr "نوع :c:type:`Py_UNICODE` و ماکروی :c:macro:`!Py_UNICODE_WIDE`: به‌جای آن‌ها از :c:type:`wchar_t` استفاده کنید." diff --git a/whatsnew/3.13.po b/whatsnew/3.13.po index 3bd06a42..ededa1ca 100644 --- a/whatsnew/3.13.po +++ b/whatsnew/3.13.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 07:23+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -1424,8 +1425,8 @@ msgstr "توابع مستند‌نشده‌ی :func:`!glob0` و :func:`!glob1` msgid ":mod:`http.server`:" msgstr ":mod:`http.server`:" -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 very long time. This code was outdated, unmaintained, and rarely used. It has a high potential for both security and functionality bugs. (Contributed by Gregory P. Smith in :gh:`109096`.)" -msgstr "کلاس :class:`~http.server.CGIHTTPRequestHandler` منسوخ شد و در پایتون 3.15 حذف خواهد شد. سرورهای HTTP CGI مبتنی بر فرایند مدت‌هاست از مد افتاده‌اند. این کد قدیمی بود، نگهداری نمی‌شد و به‌ندرت استفاده می‌شد. این کد پتانسیل بالایی برای باگ‌های امنیتی و کارکردی دارد. (مشارکت‌شده توسط Gregory P. Smith در :gh:`109096`.)" +msgid "Deprecate :class:`!CGIHTTPRequestHandler`, to be removed in Python 3.15. Process-based CGI HTTP servers have been out of favor for a very long time. This code was outdated, unmaintained, and rarely used. It has a high potential for both security and functionality bugs. (Contributed by Gregory P. Smith in :gh:`109096`.)" +msgstr "منسوخ‌سازی :class:`!CGIHTTPRequestHandler`، که قرار است در پایتون ۳.۱۵ حذف شود. سرورهای HTTP مبتنی بر CGI بر پایه‌ی فرایند مدت‌هاست که منسوخ شده‌اند. این کد قدیمی، بدون پشتیبانی و به‌ندرت استفاده‌شده بود. این کد پتانسیل بالایی برای اشکالات امنیتی و عملکردی دارد. (تهیه‌شده توسط Gregory P. Smith در :gh:`109096`.)" 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 "پرچم :option:`!--cgi` در رابط خط فرمان :program:`python -m http.server` منسوخ شد و در پایتون 3.15 حذف خواهد شد. (مشارکت‌شده توسط گرگوری پی. اسمیت در :gh:`109096`.)" @@ -1445,14 +1446,14 @@ msgstr "ارسال آرگومان‌های اختیاری *maxsplit*، *count* msgid ":mod:`pathlib`:" msgstr ":mod:`pathlib`:" -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 "متد :meth:`.PurePath.is_reserved` منسوخ شد و در پایتون 3.15 حذف خواهد شد. برای تشخیص مسیرهای رزرو‌شده در ویندوز از :func:`os.path.isreserved` استفاده کنید. (مشارکت‌شده توسط Barney Gale در :gh:`88569`.)" +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 "منسوخ‌سازی :meth:`!.PurePath.is_reserved`، که قرار است در پایتون ۳.۱۵ حذف شود. برای تشخیص مسیرهای رزرو شده در ویندوز از :func:`os.path.isreserved` استفاده کنید. (تهیه‌شده توسط Barney Gale در :gh:`88569`.)" msgid ":mod:`platform`:" msgstr ":mod:`platform`:" -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 "تابع :func:`~platform.java_ver` منسوخ شد و در پایتون 3.15 حذف خواهد شد. این تابع فقط برای پشتیبانی از Jython مفید است، API گیج‌کننده‌ای دارد و عمدتاً آزمون‌نشده است. (مشارکت Nikita Sobolev در :gh:`116349`.)" +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 "تابع :func:`!platform.java_ver` منسوخ شد و در نسخه‌ی ۳.۱۵ پایتون حذف خواهد شد. این تابع فقط برای پشتیبانی از Jython مفید است، یک API گیج‌کننده دارد و تا حد زیادی آزمایش‌نشده است. (مشارکتی از Nikita Sobolev در :gh:`116349`.)" msgid ":mod:`pydoc`:" msgstr ":mod:`pydoc`:" @@ -1499,8 +1500,8 @@ msgstr "سینتکس مستندنشده‌ی آرگومان کلیدواژه‌ msgid "Deprecate omitting the *fields* parameter when creating a :class:`~typing.NamedTuple` or :class:`typing.TypedDict` class, and deprecate passing ``None`` to the *fields* parameter of both types. Python 3.15 will require a valid sequence for the *fields* parameter. To create a NamedTuple class with zero fields, use ``class NT(NamedTuple): pass`` or ``NT = NamedTuple(\"NT\", ())``. To create a TypedDict class with zero fields, use ``class TD(TypedDict): pass`` or ``TD = TypedDict(\"TD\", {})``. (Contributed by Alex Waygood in :gh:`105566` and :gh:`105570`.)" msgstr "استفاده‌نکردن از پارامتر *fields* هنگام ایجاد کلاس :class:`~typing.NamedTuple` یا :class:`typing.TypedDict` منسوخ شد، و ارسال ``None`` به پارامتر *fields* هر دو نوع نیز منسوخ شد. پایتون 3.15 برای پارامتر *fields* یک دنباله معتبر را الزامی خواهد کرد. برای ایجاد یک کلاس NamedTuple بدون هیچ فیلدی، از ``class NT(NamedTuple): pass`` یا ``NT = NamedTuple(\"NT\", ())`` استفاده کنید. برای ایجاد یک کلاس TypedDict بدون هیچ فیلدی، از ``class TD(TypedDict): pass`` یا ``TD = TypedDict(\"TD\", {})`` استفاده کنید. (مشارکت‌شده توسط Alex Waygood در :gh:`105566` و :gh:`105570`.)" -msgid "Deprecate the :deco:`typing.no_type_check_decorator` decorator function, to 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 "تابع دکوراتور :deco:`typing.no_type_check_decorator` منسوخ می‌شود و در Python 3.15 حذف خواهد شد. پس از هشت سال حضور در ماژول :mod:`typing`، هنوز هیچ بررسی‌گر نوع بزرگی از آن پشتیبانی نکرده است. (مشارکت‌شده توسط Alex Waygood در :gh:`106309`.)" +msgid "Deprecate the :deco:`!typing.no_type_check_decorator` decorator function, to 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 "تابع دکوراتور :deco:`!typing.no_type_check_decorator` منسوخ شد و در نسخه‌ی ۳.۱۵ پایتون حذف خواهد شد. پس از هشت سال حضور در ماژول :mod:`typing`، هنوز توسط هیچ‌کدام از بررسی‌کنندگان نوع اصلی پشتیبانی نمی‌شود. (مشارکتی از Alex Waygood در :gh:`106309`.)" msgid "Deprecate :data:`typing.AnyStr`. In Python 3.16, it will be removed from ``typing.__all__``, and a :exc:`DeprecationWarning` will be emitted at runtime when it is imported or accessed. It will be removed entirely in Python 3.18. Use the new :ref:`type parameter syntax ` instead. (Contributed by Michael The in :gh:`107116`.)" msgstr ":data:`typing.AnyStr` منسوخ اعلام شد. در پایتون 3.16، از ``typing.__all__`` حذف خواهد شد و هنگام ایمپورت یا دسترسی به آن، یک :exc:`DeprecationWarning` در زمان اجرا نشان داده خواهد شد. در پایتون 3.18 به‌طور کامل حذف خواهد شد. به‌جای آن از :ref:`سینتکس پارامتر نوع ` جدید استفاده کنید. (مشارکت‌شده توسط Michael The در :gh:`107116`.)" @@ -1508,8 +1509,8 @@ msgstr ":data:`typing.AnyStr` منسوخ اعلام شد. در پایتون 3.16 msgid ":mod:`wave`:" msgstr ":mod:`wave`:" -msgid "Deprecate the :meth:`~wave.Wave_read.getmark`, :meth:`!setmark`, and :meth:`~wave.Wave_read.getmarkers` methods of the :class:`~wave.Wave_read` and :class:`~wave.Wave_write` classes, to be removed in Python 3.15. (Contributed by Victor Stinner in :gh:`105096`.)" -msgstr "متدهای :meth:`~wave.Wave_read.getmark`، :meth:`!setmark` و :meth:`~wave.Wave_read.getmarkers` از کلاس‌های :class:`~wave.Wave_read` و :class:`~wave.Wave_write` منسوخ شدند و در پایتون 3.15 حذف خواهند شد. (مشارکت‌شده توسط Victor Stinner در :gh:`105096`.)" +msgid "Deprecate the ``getmark()``, ``setmark()`` and ``getmarkers()`` methods of the :class:`~wave.Wave_read` and :class:`~wave.Wave_write` classes, to be removed in Python 3.15. (Contributed by Victor Stinner in :gh:`105096`.)" +msgstr "متدهای ``getmark()``، ``setmark()`` و ``getmarkers()`` از کلاس‌های :class:`~wave.Wave_read` و :class:`~wave.Wave_write` منسوخ شدند و در نسخه‌ی ۳.۱۵ پایتون حذف خواهند شد. (مشارکتی از Victor Stinner در :gh:`105096`.)" msgid "Pending removal in Python 3.14" msgstr "در پایتون 3.14 حذف خواهد شد" @@ -1613,8 +1614,8 @@ msgstr "در انتظار حذف در پایتون 3.15" msgid "The import system:" msgstr "سیستم ایمپورت:" -msgid "Setting :attr:`~module.__cached__` on a module while failing to set :attr:`__spec__.cached ` is deprecated. In Python 3.15, :attr:`!__cached__` will cease to be set or take into consideration by the import system or standard library. (:gh:`97879`)" -msgstr "تنظیم :attr:`~module.__cached__` روی یک ماژول در حالی که :attr:`__spec__.cached ` تنظیم نشده باشد، منسوخ شده است. در پایتون 3.15، :attr:`!__cached__` دیگر توسط سیستم ایمپورت یا کتابخانه استاندارد تنظیم نخواهد شد یا در نظر گرفته نخواهد شد. (:gh:`97879`)" +msgid "Setting ``__cached__`` on a module while failing to set :attr:`__spec__.cached ` is deprecated. In Python 3.15, ``__cached__`` will cease to be set or take into consideration by the import system or standard library. (:gh:`97879`)" +msgstr "تنظیم مقدار ``__cached__`` روی یک ماژول در حالی که تنظیم :attr:`__spec__.cached ` انجام نشده است، منسوخ شد. در نسخه‌ی ۳.۱۵ پایتون، ``__cached__`` دیگر توسط سامانه ایمپورت یا کتابخانه‌ی استاندارد تنظیم نشده و در نظر گرفته نخواهد شد. (:gh:`97879`)" msgid "Setting :attr:`~module.__package__` on a module while failing to set :attr:`__spec__.parent ` is deprecated. In Python 3.15, :attr:`!__package__` will cease to be set or take into consideration by the import system or standard library. (:gh:`97879`)" msgstr "تنظیم :attr:`~module.__package__` روی یک ماژول در حالی که :attr:`__spec__.parent ` تنظیم نمی‌شود، منسوخ شده است. در پایتون 3.15، :attr:`!__package__` دیگر توسط سیستم ایمپورت یا کتابخانه استاندارد تنظیم یا در نظر گرفته نخواهد شد. (:gh:`97879`)" @@ -1622,8 +1623,8 @@ msgstr "تنظیم :attr:`~module.__package__` روی یک ماژول در حا msgid "The undocumented :func:`!ctypes.SetPointerType` function has been deprecated since Python 3.13." msgstr "تابع مستندنشده‌ی :func:`!ctypes.SetPointerType` از پایتون 3.13 منسوخ شده است." -msgid "The obsolete and rarely used :class:`~http.server.CGIHTTPRequestHandler` has been deprecated since Python 3.13. No direct replacement exists. *Anything* is better than CGI to interface a web server with a request handler." -msgstr ":class:`~http.server.CGIHTTPRequestHandler` که از رده خارج است و به‌ندرت استفاده می‌شود، از پایتون 3.13 منسوخ شده است. هیچ جایگزین مستقیمی وجود ندارد. برای اتصال وب‌سرور به هندلر درخواست، *هر چیزی* بهتر از CGI است." +msgid "The obsolete and rarely used :class:`!CGIHTTPRequestHandler` has been deprecated since Python 3.13. No direct replacement exists. *Anything* is better than CGI to interface a web server with a request handler." +msgstr "کلاس منسوخ‌شده و کم‌استفاده‌ی :class:`!CGIHTTPRequestHandler` از نسخه‌ی ۳.۱۳ پایتون منسوخ شده است. هیچ جایگزین مستقیمی وجود ندارد. *هر چیزی* بهتر از CGI است تا یک وب‌سرور را به یک هندلر درخواست متصل کند." msgid "The :option:`!--cgi` flag to the :program:`python -m http.server` command-line interface has been deprecated since Python 3.13." msgstr "پرچم :option:`!--cgi` در رابط خط فرمان :program:`python -m http.server` از پایتون 3.13 منسوخ شده است." @@ -1634,11 +1635,11 @@ msgstr ":mod:`importlib`:" msgid "``load_module()`` method: use ``exec_module()`` instead." msgstr "متد ``load_module()``: به‌جای آن از ``exec_module()`` استفاده کنید." -msgid ":meth:`.PurePath.is_reserved` has been deprecated since Python 3.13. Use :func:`os.path.isreserved` to detect reserved paths on Windows." -msgstr ":meth:`.PurePath.is_reserved` از پایتون 3.13 منسوخ شده است. برای تشخیص مسیرهای رزرو‌شده در ویندوز از :func:`os.path.isreserved` استفاده کنید." +msgid ":meth:`!.PurePath.is_reserved` has been deprecated since Python 3.13. Use :func:`os.path.isreserved` to detect reserved paths on Windows." +msgstr "متد :meth:`!.PurePath.is_reserved` از نسخه‌ی ۳.۱۳ پایتون منسوخ شده است. برای شناسایی مسیرهای رزرو شده در ویندوز از :func:`os.path.isreserved` استفاده کنید." -msgid ":func:`~platform.java_ver` has been deprecated since Python 3.13. This function is only useful for Jython support, has a confusing API, and is largely untested." -msgstr ":func:`~platform.java_ver` از پایتون 3.13 منسوخ شده است. این تابع فقط برای پشتیبانی از Jython مفید است، API گیج‌کننده‌ای دارد و تا حد زیادی آزمون‌نشده است." +msgid ":func:`!platform.java_ver` has been deprecated since Python 3.13. This function is only useful for Jython support, has a confusing API, and is largely untested." +msgstr "تابع :func:`!platform.java_ver` از نسخه‌ی ۳.۱۳ پایتون منسوخ شده است. این تابع فقط برای پشتیبانی از Jython مفید است، یک API گیج‌کننده دارد و تا حد زیادی آزمایش‌نشده است." msgid ":mod:`sysconfig`:" msgstr ":mod:`sysconfig`:" @@ -1655,8 +1656,8 @@ msgstr ":func:`~threading.RLock` در پایتون 3.15 هیچ آرگومانی msgid ":mod:`types`:" msgstr ":mod:`types`:" -msgid ":class:`types.CodeType`: Accessing :attr:`~codeobject.co_lnotab` was deprecated in :pep:`626` since 3.10 and was planned to be removed in 3.12, but it only got a proper :exc:`DeprecationWarning` in 3.12. May be removed in 3.15. (Contributed by Nikita Sobolev in :gh:`101866`.)" -msgstr ":class:`types.CodeType`: دسترسی به :attr:`~codeobject.co_lnotab` مطابق :pep:`626` از نسخه‌ی 3.10 منسوخ شد و قرار بود در 3.12 حذف شود، اما تنها در 3.12 یک :exc:`DeprecationWarning` مناسب دریافت کرد. ممکن است در 3.15 حذف شود. (با مشارکت نیکیتا سوبولف در :gh:`101866`.)" +msgid ":class:`types.CodeType`: Accessing :attr:`!codeobject.co_lnotab` was deprecated in :pep:`626` since 3.10 and was planned to be removed in 3.12, but it only got a proper :exc:`DeprecationWarning` in 3.12. May be removed in 3.15. (Contributed by Nikita Sobolev in :gh:`101866`.)" +msgstr ":class:`types.CodeType`: دسترسی به :attr:`!codeobject.co_lnotab` در :pep:`626` از نسخه‌ی ۳.۱۰ منسوخ شد و برنامه‌ریزی شده بود در نسخه‌ی ۳.۱۲ حذف شود، اما فقط در نسخه‌ی ۳.۱۲ یک :exc:`DeprecationWarning` مناسب دریافت کرد. ممکن است در نسخه‌ی ۳.۱۵ حذف شود. (مشارکتی از Nikita Sobolev در :gh:`101866`.)" msgid "The undocumented keyword argument syntax for creating :class:`~typing.NamedTuple` classes (for example, ``Point = NamedTuple(\"Point\", x=int, y=int)``) has been deprecated since Python 3.13. Use the class-based syntax or the functional syntax instead." msgstr "سینتکس آرگومان کلیدواژه‌ایِ مستندنشده برای ایجاد کلاس‌های :class:`~typing.NamedTuple` (برای مثال، ``Point = NamedTuple(\"Point\", x=int, y=int)``) از پایتون 3.13 منسوخ شده است. به جای آن از سینتکس مبتنی بر کلاس یا سینتکس تابعی استفاده کنید." @@ -1664,17 +1665,20 @@ msgstr "سینتکس آرگومان کلیدواژه‌ایِ مستندنشده msgid "When using the functional syntax of :class:`~typing.TypedDict`\\s, failing to pass a value to the *fields* parameter (``TD = TypedDict(\"TD\")``) or passing ``None`` (``TD = TypedDict(\"TD\", None)``) has been deprecated since Python 3.13. Use ``class TD(TypedDict): pass`` or ``TD = TypedDict(\"TD\", {})`` to create a TypedDict with zero field." msgstr "هنگام استفاده از سینتکس تابعی :class:`~typing.TypedDict`، عدم ارسال مقدار به پارامتر *fields* (``TD = TypedDict(\"TD\")``) یا ارسال ``None`` (``TD = TypedDict(\"TD\", None)``) از پایتون 3.13 منسوخ شده است. برای ایجاد یک TypedDict با صفر فیلد، از ``class TD(TypedDict): pass`` یا ``TD = TypedDict(\"TD\", {})`` استفاده کنید." -msgid "The :deco:`typing.no_type_check_decorator` decorator function has been deprecated since Python 3.13. After eight years in the :mod:`typing` module, it has yet to be supported by any major type checker." -msgstr "تابع دکوراتور :deco:`typing.no_type_check_decorator` از پایتون 3.13 منسوخ شده است. پس از هشت سال در ماژول :mod:`typing`، هنوز هیچ‌یک از بررسی‌گرهای نوع اصلی آن را پشتیبانی نکرده‌اند." +msgid "The :deco:`!typing.no_type_check_decorator` decorator function has been deprecated since Python 3.13. After eight years in the :mod:`typing` module, it has yet to be supported by any major type checker." +msgstr "تابع دکوراتور :deco:`!typing.no_type_check_decorator` از نسخه‌ی ۳.۱۳ پایتون منسوخ شده است. پس از هشت سال حضور در ماژول :mod:`typing`، هنوز توسط هیچ‌کدام از بررسی‌کنندگان نوع اصلی پشتیبانی نمی‌شود." -msgid "The :meth:`~wave.Wave_read.getmark`, :meth:`!setmark`, and :meth:`~wave.Wave_read.getmarkers` methods of the :class:`~wave.Wave_read` and :class:`~wave.Wave_write` classes have been deprecated since Python 3.13." -msgstr "متدهای :meth:`~wave.Wave_read.getmark`، :meth:`!setmark` و :meth:`~wave.Wave_read.getmarkers` در کلاس‌های :class:`~wave.Wave_read` و :class:`~wave.Wave_write` از پایتون 3.13 منسوخ شده‌اند." +msgid ":mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse` modules." +msgstr "ماژول‌های :mod:`!sre_compile`، :mod:`!sre_constants` و :mod:`!sre_parse`." + +msgid "The ``getmark()``, ``setmark()`` and ``getmarkers()`` methods of the :class:`~wave.Wave_read` and :class:`~wave.Wave_write` classes have been deprecated since Python 3.13." +msgstr "متدهای ``getmark()``، ``setmark()`` و ``getmarkers()`` از کلاس‌های :class:`~wave.Wave_read` و :class:`~wave.Wave_write` از نسخه‌ی ۳.۱۳ پایتون منسوخ شده‌اند." msgid ":mod:`zipimport`:" msgstr ":mod:`zipimport`:" -msgid ":meth:`~zipimport.zipimporter.load_module` has been deprecated since Python 3.10. Use :meth:`~zipimport.zipimporter.exec_module` instead. (Contributed by Jiahao Li in :gh:`125746`.)" -msgstr ":meth:`~zipimport.zipimporter.load_module` از پایتون 3.10 منسوخ شده است. به جای آن از :meth:`~zipimport.zipimporter.exec_module` استفاده کنید. (مشارکت‌شده توسط Jiahao Li در :gh:`125746`.)" +msgid ":meth:`!zipimport.zipimporter.load_module` has been deprecated since Python 3.10. Use :meth:`~zipimport.zipimporter.exec_module` instead. (:gh:`125746`.)" +msgstr "متد :meth:`!zipimport.zipimporter.load_module` از نسخه‌ی ۳.۱۰ پایتون منسوخ شده است. به‌جای آن از :meth:`~zipimport.zipimporter.exec_module` استفاده کنید. (:gh:`125746`.)" msgid "Pending removal in Python 3.16" msgstr "در پایتون 3.16 در انتظار حذف است" @@ -1778,6 +1782,12 @@ msgstr "ویژگی مستندنشده و استفاده‌نشده‌ی :attr:`! msgid "Pending removal in Python 3.17" msgstr "در انتظار حذف در پایتون 3.17" +msgid ":mod:`datetime`:" +msgstr ":mod:`datetime`:" + +msgid ":meth:`~datetime.datetime.strptime` calls using a format string containing ``%e`` (day of month) without a year. This has been deprecated since Python 3.15. (Contributed by Stan Ulbrych in :gh:`70647`.)" +msgstr "فراخوانی‌های :meth:`~datetime.datetime.strptime` که از یک رشته‌ی قالب حاوی ``%e`` (روز ماه) بدون سال استفاده می‌کنند. این مورد از پایتون ۳.۱۵ منسوخ شده است. (مشارکت توسط Stan Ulbrych در :gh:`70647`.)" + msgid ":mod:`collections.abc`:" msgstr ":mod:`collections.abc`:" @@ -1793,24 +1803,195 @@ msgstr ":class:`!ByteString` در ابتدا قرار بود یک کلاس پا msgid "See :pep:`PEP 688 <688#current-options>` for more details. (Contributed by Shantanu Jain in :gh:`91896`.)" msgstr "برای جزئیات بیشتر به :pep:`PEP 688 <688#current-options>` مراجعه کنید. (مشارکت‌شده توسط شانتانو جین در :gh:`91896`.)" +msgid ":mod:`encodings`:" +msgstr ":mod:`encodings`:" + +msgid "Passing non-ascii *encoding* names to :func:`encodings.normalize_encoding` is deprecated and scheduled for removal in Python 3.17. (Contributed by Stan Ulbrych in :gh:`136702`.)" +msgstr "ارسال نام‌های *کدگذاری* غیر اسکی (non-ascii) به :func:`encodings.normalize_encoding` منسوخ شده است و برنامه‌ریزی شده تا در نسخه‌ی ۳.۱۷ پایتون حذف شود. (مشارکتی از Stan Ulbrych در :gh:`136702`.)" + +msgid ":mod:`profile`:" +msgstr ":mod:`profile`:" + +msgid "The :mod:`!profile` module is deprecated and will be removed in Python 3.17. Use :mod:`profiling.tracing` instead, which provides a compatible API. See :pep:`799` for details. (Contributed by Pablo Galindo and László Kiss Kollár in :gh:`138122`.)" +msgstr "ماژول :mod:`!profile` منسوخ شده است و در پایتون ۳.۱۷ حذف خواهد شد. به جای آن از :mod:`profiling.tracing` استفاده کنید که یک API سازگار ارائه می‌دهد. برای جزئیات به :pep:`799` مراجعه کنید. (مشارکت توسط Pablo Galindo و László Kiss Kollár در :gh:`138122`.)" + +msgid ":mod:`webbrowser`:" +msgstr ":mod:`webbrowser`:" + +msgid ":class:`!webbrowser.MacOSXOSAScript` is deprecated in favour of :class:`!webbrowser.MacOS`. (:gh:`137586`)" +msgstr "کلاس :class:`!webbrowser.MacOSXOSAScript` به نفع کلاس :class:`!webbrowser.MacOS` منسوخ شده است. (:gh:`137586`)" + msgid "Before Python 3.14, old-style unions were implemented using the private class ``typing._UnionGenericAlias``. This class is no longer needed for the implementation, but it has been retained for backward compatibility, with removal scheduled for Python 3.17. Users should use documented introspection helpers like :func:`typing.get_origin` and :func:`typing.get_args` instead of relying on private implementation details." msgstr "پیش از پایتون 3.14، اجتماعهای سبک قدیمی (old-style unions) با استفاده از کلاس خصوصی ``typing._UnionGenericAlias`` پیاده‌سازی می‌شدند. این کلاس دیگر برای پیاده‌سازی مورد نیاز نیست، اما برای سازگاری با نسخه‌های قبلی حفظ شده است و حذف آن برای پایتون 3.17 برنامه‌ریزی شده است. کاربران باید به جای اتکا به جزئیات پیاده‌سازی خصوصی، از ابزارهای کمکی مستند درون‌نگری مانند :func:`typing.get_origin` و :func:`typing.get_args` استفاده کنند." msgid ":class:`typing.ByteString`, deprecated since Python 3.9, is scheduled for removal in Python 3.17." msgstr ":class:`typing.ByteString`، که از پایتون 3.9 منسوخ شده است، برای حذف در پایتون 3.17 برنامه‌ریزی شده است." +msgid ":mod:`tkinter`:" +msgstr ":mod:`tkinter`:" + +msgid "The :class:`!tkinter.Variable` methods :meth:`!trace_variable`, :meth:`!trace` (an alias of :meth:`!trace_variable`), :meth:`!trace_vdelete` and :meth:`!trace_vinfo`, deprecated since Python 3.14, are scheduled for removal in Python 3.17. Use :meth:`!trace_add`, :meth:`!trace_remove` and :meth:`!trace_info` instead. (Contributed by Serhiy Storchaka in :gh:`120220`.)" +msgstr "متدهای :class:`!tkinter.Variable` یعنی :meth:`!trace_variable`، :meth:`!trace` (یک نام مستعار برای :meth:`!trace_variable`)، :meth:`!trace_vdelete` و :meth:`!trace_vinfo` که از پایتون ۳.۱۴ منسوخ شده‌اند، قرار است در پایتون ۳.۱۷ حذف شوند. به‌جای آن‌ها از :meth:`!trace_add`، :meth:`!trace_remove` و :meth:`!trace_info` استفاده کنید. (ارائه‌شده توسط Serhiy Storchaka در :gh:`120220`.)" + msgid "Pending removal in Python 3.18" msgstr "در انتظار حذف در پایتون 3.18" +msgid "No longer accept a boolean value when a file descriptor is expected. (Contributed by Serhiy Storchaka in :gh:`82626`.)" +msgstr "هنگامی که انتظار یک توصیف‌گر پرونده می‌رود، دیگر مقدار بولی پذیرفته نمی‌شود. (مشارکتی از Serhiy Storchaka در :gh:`82626`.)" + msgid "The non-standard and undocumented :class:`~decimal.Decimal` format specifier ``'N'``, which is only supported in the :mod:`!decimal` module's C implementation, has been deprecated since Python 3.13. (Contributed by Serhiy Storchaka in :gh:`89902`.)" msgstr "مشخصه‌ی قالب‌بندی غیراستاندارد و مستند‌نشده‌ی ``'N'`` در :class:`~decimal.Decimal`، که تنها در پیاده‌سازی C ماژول :mod:`!decimal` پشتیبانی می‌شود، از Python 3.13 منسوخ شده است. (مشارکت‌شده توسط Serhiy Storchaka در :gh:`89902`.)" +msgid "Deprecations defined by :pep:`829`:" +msgstr "موارد منسوخ‌شده تعریف‌شده توسط :pep:`829`:" + +msgid "``import`` lines in :file:`{name}.pth` files are silently ignored." +msgstr "سطرهای ``import`` در پرونده‌های :file:`{name}.pth` بدون سر و صدا نادیده گرفته می‌شوند." + +msgid "(Contributed by Barry Warsaw in :gh:`148641`.)" +msgstr "(مشارکتی از Barry Warsaw در :gh:`148641`.)" + msgid "Pending removal in Python 3.19" msgstr "در انتظار حذف در پایتون 3.19" msgid "Implicitly switching to the MSVC-compatible struct layout by setting :attr:`~ctypes.Structure._pack_` but not :attr:`~ctypes.Structure._layout_` on non-Windows platforms." msgstr "تغییر ضمنی به چیدمان ساختار سازگار با MSVC از طریق تنظیم :attr:`~ctypes.Structure._pack_` بدون تنظیم :attr:`~ctypes.Structure._layout_` روی پلتفرم‌های غیر ویندوزی." +msgid ":mod:`hashlib`:" +msgstr ":mod:`hashlib`:" + +msgid "In hash function constructors such as :func:`~hashlib.new` or the direct hash-named constructors such as :func:`~hashlib.md5` and :func:`~hashlib.sha256`, their optional initial data parameter could also be passed a keyword argument named ``data=`` or ``string=`` in various :mod:`!hashlib` implementations." +msgstr "در سازندهای تابع هش مانند :func:`~hashlib.new` یا سازندهای مستقیم دارای نام هش مانند :func:`~hashlib.md5` و :func:`~hashlib.sha256`، در پیاده‌سازی‌های مختلف :mod:`!hashlib` امکان ارسال یک آرگومان کلیدواژه‌ای با نام ``data=`` یا ``string=`` نیز به پارامتر داده‌ی اولیه اختیاری آن‌ها وجود داشت." + +msgid "Support for the ``string`` keyword argument name is now deprecated and slated for removal in Python 3.19." +msgstr "پشتیبانی از نام آرگومان کلیدواژه‌ای ``string`` اکنون منسوخ شده و قرار است در نسخه‌ی ۳.۱۹ پایتون حذف شود." + +msgid "Before Python 3.13, the ``string`` keyword parameter was not correctly supported depending on the backend implementation of hash functions. Prefer passing the initial data as a positional argument for maximum backwards compatibility." +msgstr "پیش از پایتون ۳.۱۳، پارامتر کلیدواژه‌ای ``string`` بسته به پیاده‌سازی بک‌اند عملکردهای هش به شکل درستی پشتیبانی نمی‌شد. برای حداکثر سازگاری با نسخه‌های قبلی، ترجیح دهید داده‌ی اولیه را به عنوان یک آرگومان جایگاهی ارسال کنید." + +msgid ":mod:`http.cookies`:" +msgstr ":mod:`http.cookies`:" + +msgid ":meth:`http.cookies.Morsel.js_output` is deprecated and will be removed in Python 3.19." +msgstr "متد :meth:`http.cookies.Morsel.js_output` منسوخ شده است و در پایتون ۳.۱۹ حذف خواهد شد." + +msgid ":meth:`http.cookies.BaseCookie.js_output` is deprecated and will be removed in Python 3.19." +msgstr "متد :meth:`http.cookies.BaseCookie.js_output` منسوخ شده است و در پایتون ۳.۱۹ حذف خواهد شد." + +msgid ":mod:`imaplib`:" +msgstr ":mod:`imaplib`:" + +msgid "Altering :attr:`IMAP4.file ` is now deprecated and slated for removal in Python 3.19. This property is now unused and changing its value does not automatically close the current file." +msgstr "تغییر دادن :attr:`IMAP4.file ` اکنون منسوخ شده است و برنامه‌ریزی شده تا در پایتون ۳.۱۹ حذف شود. این ویژگی اکنون استفاده نمی‌شود و تغییر مقدار آن پرونده‌ی فعلی را به طور خودکار نمی‌بندد." + +msgid "Before Python 3.14, this property was used to implement the corresponding ``read()`` and ``readline()`` methods for :class:`~imaplib.IMAP4` but this is no longer the case since then." +msgstr "پیش از پایتون ۳.۱۴، از این ویژگی برای پیاده‌سازی متدهای متناظر ``read()`` و ``readline()`` برای :class:`~imaplib.IMAP4` استفاده می‌شد، اما از آن زمان به بعد دیگر این‌طور نیست." + +msgid "Pending removal in Python 3.20" +msgstr "حذف در نسخه‌ی ۳.۲۰ پایتون در راه است" + +msgid "Calling the ``__new__()`` method of :class:`struct.Struct` without the *format* argument is deprecated and will be removed in Python 3.20. Calling :meth:`~object.__init__` method on initialized :class:`~struct.Struct` objects is deprecated and will be removed in Python 3.20." +msgstr "فراخوانی متد ``__new__()`` از :class:`struct.Struct` بدون آرگومان *format* منسوخ شده است و در پایتون ۳.۲۰ حذف خواهد شد. فراخوانی متد :meth:`~object.__init__` روی شیء‌های مقداردهی اولیه‌شده‌ی :class:`~struct.Struct` منسوخ شده است و در پایتون ۳.۲۰ حذف خواهد شد." + +msgid "(Contributed by Sergey B Kirpichev and Serhiy Storchaka in :gh:`143715`.)" +msgstr "(مشارکت‌کرده توسط Sergey B Kirpichev و Serhiy Storchaka در :gh:`143715`.)" + +msgid "The ``__version__``, ``version`` and ``VERSION`` attributes have been deprecated in these standard library modules and will be removed in Python 3.20. Use :py:data:`sys.version_info` instead." +msgstr "ویژگی‌های ``__version__``، ``version`` و ``VERSION`` در این ماژول‌های کتابخانه‌ی استاندارد منسوخ شده‌اند و در پایتون ۳.۲۰ حذف خواهند شد. به‌جای آن‌ها از :py:data:`sys.version_info` استفاده کنید." + +msgid ":mod:`argparse`" +msgstr ":mod:`argparse`" + +msgid ":mod:`csv`" +msgstr ":mod:`csv`" + +msgid ":mod:`ctypes`" +msgstr ":mod:`ctypes`" + +msgid ":mod:`!ctypes.macholib`" +msgstr ":mod:`!ctypes.macholib`" + +msgid ":mod:`decimal` (use :data:`decimal.SPEC_VERSION` instead)" +msgstr ":mod:`decimal` (به‌جای آن از :data:`decimal.SPEC_VERSION` استفاده کنید)" + +msgid ":mod:`http.server`" +msgstr ":mod:`http.server`" + +msgid ":mod:`imaplib`" +msgstr ":mod:`imaplib`" + +msgid ":mod:`ipaddress`" +msgstr ":mod:`ipaddress`" + +msgid ":mod:`json`" +msgstr ":mod:`json`" + +msgid ":mod:`logging` (``__date__`` also deprecated)" +msgstr ":mod:`logging` (``__date__`` نیز منسوخ شده است)" + +msgid ":mod:`optparse`" +msgstr ":mod:`optparse`" + +msgid ":mod:`pickle`" +msgstr ":mod:`pickle`" + +msgid ":mod:`platform`" +msgstr ":mod:`platform`" + +msgid ":mod:`re`" +msgstr ":mod:`re`" + +msgid ":mod:`socketserver`" +msgstr ":mod:`socketserver`" + +msgid ":mod:`tabnanny`" +msgstr ":mod:`tabnanny`" + +msgid ":mod:`tarfile`" +msgstr ":mod:`tarfile`" + +msgid ":mod:`tkinter.font`" +msgstr ":mod:`tkinter.font`" + +msgid ":mod:`tkinter.ttk`" +msgstr ":mod:`tkinter.ttk`" + +msgid ":mod:`wsgiref.simple_server`" +msgstr ":mod:`wsgiref.simple_server`" + +msgid ":mod:`xml.etree.ElementTree`" +msgstr ":mod:`xml.etree.ElementTree`" + +msgid ":mod:`!xml.sax.expatreader`" +msgstr ":mod:`!xml.sax.expatreader`" + +msgid ":mod:`xml.sax.handler`" +msgstr ":mod:`xml.sax.handler`" + +msgid ":mod:`zlib`" +msgstr ":mod:`zlib`" + +msgid "(Contributed by Hugo van Kemenade and Stan Ulbrych in :gh:`76007`.)" +msgstr "(مشارکت‌کرده توسط Hugo van Kemenade و Stan Ulbrych در :gh:`76007`.)" + +msgid "Warnings are produced for ``import`` lines found in :file:`{name}.pth` files." +msgstr "برای سطرهای ``import`` که در پرونده‌های :file:`{name}.pth` پیدا شوند، هشدارها تولید می‌شوند." + +msgid ":file:`{name}.pth` files are no longer decoded in the locale encoding by default. They **MUST** be encoded in ``utf-8-sig``." +msgstr "پرونده‌های :file:`{name}.pth` دیگر به طور پیش‌فرض با کدگذاری locale رمزگشایی نمی‌شوند. آن‌ها **باید** با ``utf-8-sig`` کدگذاری شوند." + +msgid ":mod:`ast`:" +msgstr ":mod:`ast`:" + +msgid "Creating instances of abstract AST nodes (such as :class:`ast.AST` or :class:`!ast.expr`) is deprecated and will raise an error in Python 3.20." +msgstr "ایجاد نمونه‌ها از گره‌های درخت نحوی انتزاعی (مانند :class:`ast.AST` یا :class:`!ast.expr`) منسوخ شده است و در پایتون ۳.۲۰ یک خطا ایجاد خواهد کرد." + +msgid "It is deprecated to call :func:`isinstance` and :func:`issubclass` checks on protocol classes that were not explicitly decorated with :func:`!runtime_checkable` but that inherit from a runtime-checkable protocol class. This will raise a :exc:`TypeError` in Python 3.20." +msgstr "فراخوانی بررسی‌های :func:`isinstance` و :func:`issubclass` روی کلاس‌های پروتکلی که به طور صریح با :func:`!runtime_checkable` دکوریت نشده‌اند اما از یک کلاس پروتکل با قابلیت بررسی در زمان اجرا ارث‌بری می‌کنند، منسوخ شده است. این کار در پایتون ۳.۲۰ یک خطای :exc:`TypeError` ایجاد خواهد کرد." + +msgid "(Contributed by Bartosz Sławecki in :gh:`132604`.)" +msgstr "(مشارکت‌کرده توسط Bartosz Sławecki در :gh:`132604`.)" + msgid "Pending removal in future versions" msgstr "در انتظار حذف در نسخه‌های آینده" @@ -1853,11 +2034,8 @@ msgstr ":mod:`calendar`: ثابت‌های ``calendar.January`` و ``calendar.Fe msgid ":mod:`codecs`: use :func:`open` instead of :func:`codecs.open`. (:gh:`133038`)" msgstr ":mod:`codecs`: به‌جای :func:`codecs.open` از :func:`open` استفاده کنید. (:gh:`133038`)" -msgid ":attr:`codeobject.co_lnotab`: use the :meth:`codeobject.co_lines` method instead." -msgstr ":attr:`codeobject.co_lnotab`: به جای آن از متد :meth:`codeobject.co_lines` استفاده کنید." - -msgid ":mod:`datetime`:" -msgstr ":mod:`datetime`:" +msgid ":attr:`!codeobject.co_lnotab`: use the :meth:`codeobject.co_lines` method instead." +msgstr ":attr:`!codeobject.co_lnotab`: به‌جای آن از متد :meth:`codeobject.co_lines` استفاده کنید." msgid ":meth:`~datetime.datetime.utcnow`: use ``datetime.datetime.now(tz=datetime.UTC)``." msgstr ":meth:`~datetime.datetime.utcnow`: از ``datetime.datetime.now(tz=datetime.UTC)`` استفاده کنید." @@ -1886,8 +2064,11 @@ msgstr ":mod:`logging`: متد ``warn()`` از پایتون 3.3 منسوخ شد msgid ":mod:`mailbox`: Use of StringIO input and text mode is deprecated, use BytesIO and binary mode instead." msgstr ":mod:`mailbox`: استفاده از ورودی StringIO و حالت متنی منسوخ شده است؛ به جای آن از BytesIO و حالت دودویی استفاده کنید." -msgid ":mod:`os`: Calling :func:`os.register_at_fork` in multi-threaded process." -msgstr ":mod:`os`: فراخوانی :func:`os.register_at_fork` در فرایند چندنخی." +msgid ":mod:`os`: Calling :func:`os.register_at_fork` in a multi-threaded process." +msgstr ":mod:`os`: فراخوانی :func:`os.register_at_fork` در یک فرایند چندنخی." + +msgid ":mod:`os.path`: :func:`os.path.commonprefix` is deprecated, use :func:`os.path.commonpath` for path prefixes. The :func:`os.path.commonprefix` function is being deprecated due to having a misleading name and module. The function is not safe to use for path prefixes despite being included in a module about path manipulation, meaning it is easy to accidentally introduce path traversal vulnerabilities into Python programs by using this function." +msgstr ":mod:`os.path`: تابع :func:`os.path.commonprefix` منسوخ شده است، برای پیشوندهای مسیر از :func:`os.path.commonpath` استفاده کنید. تابع :func:`os.path.commonprefix` به دلیل داشتن نام و ماژول گمراه‌کننده در حال منسوخ شدن است. این تابع با وجود اینکه در ماژولی درباره‌ی دستکاری مسیر گنجانده شده است، برای استفاده در پیشوندهای مسیر ایمن نیست، به این معنا که با استفاده از این تابع می‌توان به‌طور تصادفی آسیب‌پذیری‌های پیمایش مسیر را به برنامه‌های پایتون تزریق کرد." msgid ":class:`!pydoc.ErrorDuringImport`: A tuple value for *exc_info* parameter is deprecated, use an exception instance." msgstr ":class:`!pydoc.ErrorDuringImport`: مقدار تاپل برای پارامتر *exc_info* منسوخ شده است؛ از یک نمونه استثنا استفاده کنید." @@ -1895,9 +2076,6 @@ msgstr ":class:`!pydoc.ErrorDuringImport`: مقدار تاپل برای پارا msgid ":mod:`re`: More strict rules are now applied for numerical group references and group names in regular expressions. Only sequence of ASCII digits is now accepted as a numerical reference. The group name in bytes patterns and replacement strings can now only contain ASCII letters and digits and underscore. (Contributed by Serhiy Storchaka in :gh:`91760`.)" msgstr ":mod:`re`: اکنون قواعد سخت‌گیرانه‌تری برای ارجاع‌های عددی به گروه‌ها و نام گروه‌ها در عبارات باقاعده اعمال می‌شود. اکنون فقط دنباله‌ای از ارقام اسکی به‌عنوان ارجاع عددی پذیرفته می‌شود. نام گروه در الگوهای بایتی و رشته‌های جایگزین اکنون فقط می‌تواند شامل حروف و ارقام اسکی و زیرخط باشد. (مشارکت‌شده توسط Serhiy Storchaka در :gh:`91760`.)" -msgid ":mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse` modules." -msgstr "ماژول‌های :mod:`!sre_compile`، :mod:`!sre_constants` و :mod:`!sre_parse`." - msgid ":mod:`shutil`: :func:`~shutil.rmtree`'s *onerror* parameter is deprecated in Python 3.12; use the *onexc* parameter instead." msgstr ":mod:`shutil`: پارامتر *onerror* در :func:`~shutil.rmtree` در پایتون 3.12 منسوخ شده است؛ به جای آن از پارامتر *onexc* استفاده کنید." @@ -2210,8 +2388,8 @@ msgstr "تابع :c:func:`PyType_GetModuleName` برای دریافت نام م msgid "Add the :c:func:`PyUnicode_EqualToUTF8AndSize` and :c:func:`PyUnicode_EqualToUTF8` functions to compare a Unicode object with a :c:expr:`const char*` UTF-8 encoded string and ``1`` if they are equal or ``0`` otherwise. These functions do not raise exceptions. (Contributed by Serhiy Storchaka in :gh:`110289`.)" msgstr "توابع :c:func:`PyUnicode_EqualToUTF8AndSize` و :c:func:`PyUnicode_EqualToUTF8` برای مقایسه‌ی یک شیء یونیکد با یک رشته‌ی کدگذاری‌شده به UTF-8 از نوع :c:expr:`const char*` و ``1`` اگر برابر باشند یا ``0`` در غیر این صورت اضافه شدند. این توابع استثنا ایجاد نمی‌کنند. (مشارکت‌شده توسط Serhiy Storchaka در :gh:`110289`.)" -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 the referent is no longer live. (Contributed by Victor Stinner in :gh:`105927`.)" -msgstr "تابع :c:func:`PyWeakref_GetRef` به‌عنوان جایگزینی برای :c:func:`PyWeakref_GetObject` افزوده شد که اگر مورد ارجاع دیگر زنده نباشد، ``NULL`` و در غیر این صورت یک :term:`ارجاع قوی ` برمی‌گرداند. (مشارکت‌شده توسط Victor Stinner در :gh:`105927`.)" +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 the referent is no longer live. (Contributed by Victor Stinner in :gh:`105927`.)" +msgstr "افزودن تابع :c:func:`PyWeakref_GetRef` به‌عنوان جایگزینی برای :c:func:`!PyWeakref_GetObject` که یک :term:`ارجاع قوی ` یا ``NULL`` را برمی‌گرداند (اگر ارجاع‌شونده دیگر زنده نباشد). (مشارکت‌کرده توسط Victor Stinner در :gh:`105927`.)" msgid "Add fixed variants of functions which silently ignore errors:" msgstr "افزودن نسخه‌های اصلاح‌شده‌ی توابعی که خطاها را بی‌سروصدا نادیده می‌گیرند:" @@ -2449,26 +2627,26 @@ msgstr "APIهای منسوخ C" msgid "Deprecate old Python initialization functions:" msgstr "منسوخ کردن توابع قدیمی مقداردهی اولیه پایتون:" -msgid ":c:func:`PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!warnings.filters` instead." -msgstr ":c:func:`PySys_ResetWarnOptions`: در عوض، :data:`sys.warnoptions` و :data:`!warnings.filters` را پاک کنید." +msgid ":c:func:`!PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!warnings.filters` instead." +msgstr ":c:func:`!PySys_ResetWarnOptions`: به‌جای آن :data:`sys.warnoptions` و :data:`!warnings.filters` را پاکسازی کنید." -msgid ":c:func:`Py_GetExecPrefix`: Get :data:`sys.exec_prefix` instead." -msgstr ":c:func:`Py_GetExecPrefix`: به‌جای آن :data:`sys.exec_prefix` را دریافت کنید." +msgid ":c:func:`!Py_GetExecPrefix`: Get :data:`sys.exec_prefix` instead." +msgstr ":c:func:`!Py_GetExecPrefix`: به‌جای آن :data:`sys.exec_prefix` را دریافت کنید." -msgid ":c:func:`Py_GetPath`: Get :data:`sys.path` instead." -msgstr ":c:func:`Py_GetPath`: به‌جای آن :data:`sys.path` را دریافت کنید." +msgid ":c:func:`!Py_GetPath`: Get :data:`sys.path` instead." +msgstr ":c:func:`!Py_GetPath`: به‌جای آن :data:`sys.path` را دریافت کنید." -msgid ":c:func:`Py_GetPrefix`: Get :data:`sys.prefix` instead." -msgstr ":c:func:`Py_GetPrefix`: به جای آن، :data:`sys.prefix` را دریافت کنید." +msgid ":c:func:`!Py_GetPrefix`: Get :data:`sys.prefix` instead." +msgstr ":c:func:`!Py_GetPrefix`: به‌جای آن :data:`sys.prefix` را دریافت کنید." -msgid ":c:func:`Py_GetProgramFullPath`: Get :data:`sys.executable` instead." -msgstr ":c:func:`Py_GetProgramFullPath`: به جای آن :data:`sys.executable` را دریافت کنید." +msgid ":c:func:`!Py_GetProgramFullPath`: Get :data:`sys.executable` instead." +msgstr ":c:func:`!Py_GetProgramFullPath`: به‌جای آن :data:`sys.executable` را دریافت کنید." -msgid ":c:func:`Py_GetProgramName`: Get :data:`sys.executable` instead." -msgstr ":c:func:`Py_GetProgramName`: به‌جای آن :data:`sys.executable` را دریافت کنید." +msgid ":c:func:`!Py_GetProgramName`: Get :data:`sys.executable` instead." +msgstr ":c:func:`!Py_GetProgramName`: به‌جای آن :data:`sys.executable` را دریافت کنید." -msgid ":c:func:`Py_GetPythonHome`: Get :c:member:`PyConfig.home` or the :envvar:`PYTHONHOME` environment variable instead." -msgstr ":c:func:`Py_GetPythonHome`: به جای آن، :c:member:`PyConfig.home` یا متغیر محیطی :envvar:`PYTHONHOME` را دریافت کنید." +msgid ":c:func:`!Py_GetPythonHome`: Get :c:member:`PyConfig.home` or the :envvar:`PYTHONHOME` environment variable instead." +msgstr ":c:func:`!Py_GetPythonHome`: به‌جای آن از :c:member:`PyConfig.home` یا متغیر محیطی :envvar:`PYTHONHOME` استفاده کنید." msgid "(Contributed by Victor Stinner in :gh:`105145`.)" msgstr "(مشارکت‌شده توسط ویکتور استینر در :gh:`105145`.)" @@ -2476,8 +2654,8 @@ msgstr "(مشارکت‌شده توسط ویکتور استینر در :gh:`1051 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 ":term:`منسوخ‌سازی نرم (soft deprecation) ` توابع :c:func:`PyEval_GetBuiltins`، :c:func:`PyEval_GetGlobals` و :c:func:`PyEval_GetLocals` که یک :term:`ارجاع امانتی ` برمی‌گردانند. (منسوخ‌سازی نرم به‌عنوان بخشی از :pep:`667`.)" -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 "منسوخ شدن تابع :c:func:`PyImport_ImportModuleNoBlock` که از پایتون 3.3 صرفاً یک نام مستعار برای :c:func:`PyImport_ImportModule` است. (نوشته‌ی Victor Stinner در :gh:`105396`.)" +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 "منسوخ کردن تابع :c:func:`!PyImport_ImportModuleNoBlock` که از پایتون ۳.۳ تاکنون صرفاً نام مستعاری برای :c:func:`PyImport_ImportModule` است. (مشارکت‌کرده توسط Victor Stinner در :gh:`105396`.)" 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 ":term:`منسوخ‌سازی نرم ` تابع :c:func:`PyModule_AddObject` انجام شد. این تابع باید با :c:func:`PyModule_Add` یا :c:func:`PyModule_AddObjectRef` جایگزین شود. (مشارکت‌شده توسط Serhiy Storchaka در :gh:`86493`.)" @@ -2485,8 +2663,8 @@ msgstr ":term:`منسوخ‌سازی نرم ` تابع :c:func: 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 instead. Since Python 3.3, ``Py_UNICODE`` and ``PY_UNICODE_TYPE`` are just aliases to :c:type:`!wchar_t`. (Contributed by Victor Stinner in :gh:`105156`.)" msgstr "نوع‌های قدیمی ``Py_UNICODE`` و ``PY_UNICODE_TYPE`` و تعریف :c:macro:`!Py_UNICODE_WIDE` منسوخ شدند. به‌جای آن‌ها مستقیماً از نوع :c:type:`wchar_t` استفاده کنید. از پایتون 3.3 به بعد، ``Py_UNICODE`` و ``PY_UNICODE_TYPE`` فقط مستعاری برای :c:type:`!wchar_t` هستند. (مشارکت‌شده توسط Victor Stinner در :gh:`105156`.)" -msgid "Deprecate the :c:func:`PyWeakref_GetObject` and :c:func:`PyWeakref_GET_OBJECT` functions, which return a :term:`borrowed reference`. Replace them with the new :c:func:`PyWeakref_GetRef` function, which returns a :term:`strong reference`. The `pythoncapi-compat project`_ can be used to get :c:func:`PyWeakref_GetRef` on Python 3.12 and older. (Contributed by Victor Stinner in :gh:`105927`.)" -msgstr "توابع :c:func:`PyWeakref_GetObject` و :c:func:`PyWeakref_GET_OBJECT` که یک :term:`borrowed reference` برمی‌گردانند، منسوخ شدند. به‌جای آن‌ها می‌توان از تابع جدید :c:func:`PyWeakref_GetRef` استفاده کرد که یک :term:`strong reference` برمی‌گرداند. برای به‌دست‌آوردن :c:func:`PyWeakref_GetRef` در پایتون 3.12 و نسخه‌های قدیمی‌تر می‌توان از `pythoncapi-compat project`_ استفاده کرد. (مشارکت‌شده توسط Victor Stinner در :gh:`105927`.)" +msgid "Deprecate the :c:func:`!PyWeakref_GetObject` and :c:func:`!PyWeakref_GET_OBJECT` functions, which return a :term:`borrowed reference`. Replace them with the new :c:func:`PyWeakref_GetRef` function, which returns a :term:`strong reference`. The `pythoncapi-compat project`_ can be used to get :c:func:`PyWeakref_GetRef` on Python 3.12 and older. (Contributed by Victor Stinner in :gh:`105927`.)" +msgstr "منسوخ کردن توابع :c:func:`!PyWeakref_GetObject` و :c:func:`!PyWeakref_GET_OBJECT` که یک :term:`ارجاع امانتی ` را برمی‌گردانند. آن‌ها را با تابع جدید :c:func:`PyWeakref_GetRef` جایگزین کنید که یک :term:`ارجاع قوی ` را برمی‌گرداند. پروژهی `pythoncapi-compat project`_ را می‌توان برای دریافت :c:func:`PyWeakref_GetRef` در پایتون ۳.۱۲ و قدیمی‌تر استفاده کرد. (مشارکت‌کرده توسط Victor Stinner در :gh:`105927`.)" msgid "The ``ma_version_tag`` field in :c:type:`PyDictObject` for extension modules (:pep:`699`; :gh:`101193`)." msgstr "فیلد ``ma_version_tag`` در :c:type:`PyDictObject` برای ماژول‌های توسعه‌ای (:pep:`699`؛ :gh:`101193`)." @@ -2494,14 +2672,11 @@ msgstr "فیلد ``ma_version_tag`` در :c:type:`PyDictObject` برای ماژ msgid "Creating :c:data:`immutable types ` with mutable bases (:gh:`95388`)." msgstr "ایجاد :c:data:`نوع‌های تغییر‌ناپذیر ` با کلاس‌های پایه‌ی تغییر‌پذیر (:gh:`95388`)." -msgid "The :c:func:`PyImport_ImportModuleNoBlock`: Use :c:func:`PyImport_ImportModule` instead." -msgstr ":c:func:`PyImport_ImportModuleNoBlock`: به جای آن از :c:func:`PyImport_ImportModule` استفاده کنید." +msgid "The :c:func:`!PyImport_ImportModuleNoBlock`: Use :c:func:`PyImport_ImportModule` instead." +msgstr "تابع :c:func:`!PyImport_ImportModuleNoBlock`: به‌جای آن از :c:func:`PyImport_ImportModule` استفاده کنید." -msgid ":c:func:`PyWeakref_GetObject` and :c:func:`PyWeakref_GET_OBJECT`: Use :c:func:`PyWeakref_GetRef` instead. The `pythoncapi-compat project `__ can be used to get :c:func:`PyWeakref_GetRef` on Python 3.12 and older." -msgstr ":c:func:`PyWeakref_GetObject` و :c:func:`PyWeakref_GET_OBJECT`: به‌جای آن‌ها از :c:func:`PyWeakref_GetRef` استفاده کنید. می‌توان از `پروژه‌ی pythoncapi-compat `__ برای به‌دست آوردن :c:func:`PyWeakref_GetRef` در پایتون 3.12 و قدیمی‌تر استفاده کرد." - -msgid ":c:type:`Py_UNICODE` type and the :c:macro:`!Py_UNICODE_WIDE` macro: Use :c:type:`wchar_t` instead." -msgstr "نوع :c:type:`Py_UNICODE` و ماکروی :c:macro:`!Py_UNICODE_WIDE`: به جای آن‌ها از :c:type:`wchar_t` استفاده کنید." +msgid ":c:func:`!PyWeakref_GetObject` and :c:func:`!PyWeakref_GET_OBJECT`: Use :c:func:`PyWeakref_GetRef` instead. The `pythoncapi-compat project `__ can be used to get :c:func:`PyWeakref_GetRef` on Python 3.12 and older." +msgstr ":c:func:`!PyWeakref_GetObject` و :c:func:`!PyWeakref_GET_OBJECT`: به‌جای آن‌ها از :c:func:`PyWeakref_GetRef` استفاده کنید. برای دریافت :c:func:`PyWeakref_GetRef` در نسخه‌ی ۳.۱۲ پایتون و نسخه‌های قدیمی‌تر، می‌توانید از پروژه‌ی `pythoncapi-compat project `__ استفاده کنید." msgid ":c:func:`!PyUnicode_AsDecodedObject`: Use :c:func:`PyCodec_Decode` instead." msgstr ":c:func:`!PyUnicode_AsDecodedObject`: به جای آن از :c:func:`PyCodec_Decode` استفاده کنید." @@ -2518,23 +2693,23 @@ msgstr ":c:func:`!PyUnicode_AsEncodedUnicode`: به‌جای آن از :c:func:` msgid "Python initialization functions, deprecated in Python 3.13:" msgstr "توابع مقداردهی اولیه پایتون، منسوخ‌شده در پایتون 3.13:" -msgid ":c:func:`Py_GetPath`: Use :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:`sys.path`) instead." -msgstr ":c:func:`Py_GetPath`: به‌جای آن از :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:`sys.path`) استفاده کنید." +msgid ":c:func:`!Py_GetPath`: Use :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:`sys.path`) instead." +msgstr ":c:func:`!Py_GetPath`: به‌جای آن از :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:`sys.path`) استفاده کنید." -msgid ":c:func:`Py_GetPrefix`: Use :c:func:`PyConfig_Get(\"base_prefix\") ` (:data:`sys.base_prefix`) instead. Use :c:func:`PyConfig_Get(\"prefix\") ` (:data:`sys.prefix`) if :ref:`virtual environments ` need to be handled." -msgstr ":c:func:`Py_GetPrefix`: به‌جای آن از :c:func:`PyConfig_Get(\"base_prefix\") ` (:data:`sys.base_prefix`) استفاده کنید. اگر لازم باشد :ref:`محیط‌های مجازی ` مدیریت شوند، از :c:func:`PyConfig_Get(\"prefix\") ` (:data:`sys.prefix`) استفاده کنید." +msgid ":c:func:`!Py_GetPrefix`: Use :c:func:`PyConfig_Get(\"base_prefix\") ` (:data:`sys.base_prefix`) instead. Use :c:func:`PyConfig_Get(\"prefix\") ` (:data:`sys.prefix`) if :ref:`virtual environments ` need to be handled." +msgstr ":c:func:`!Py_GetPrefix`: به‌جای آن از :c:func:`PyConfig_Get(\"base_prefix\") ` (:data:`sys.base_prefix`) استفاده کنید. اگر نیاز است :ref:`محیط‌های مجازی ` مدیریت شوند، از :c:func:`PyConfig_Get(\"prefix\") ` (:data:`sys.prefix`) استفاده کنید." -msgid ":c:func:`Py_GetExecPrefix`: Use :c:func:`PyConfig_Get(\"base_exec_prefix\") ` (:data:`sys.base_exec_prefix`) instead. Use :c:func:`PyConfig_Get(\"exec_prefix\") ` (:data:`sys.exec_prefix`) if :ref:`virtual environments ` need to be handled." -msgstr ":c:func:`Py_GetExecPrefix`: به‌جای آن از :c:func:`PyConfig_Get(\"base_exec_prefix\") ` (:data:`sys.base_exec_prefix`) استفاده کنید. اگر نیاز به مدیریت :ref:`محیط‌های مجازی ` وجود دارد، از :c:func:`PyConfig_Get(\"exec_prefix\") ` (:data:`sys.exec_prefix`) استفاده کنید." +msgid ":c:func:`!Py_GetExecPrefix`: Use :c:func:`PyConfig_Get(\"base_exec_prefix\") ` (:data:`sys.base_exec_prefix`) instead. Use :c:func:`PyConfig_Get(\"exec_prefix\") ` (:data:`sys.exec_prefix`) if :ref:`virtual environments ` need to be handled." +msgstr ":c:func:`!Py_GetExecPrefix`: به‌جای آن از :c:func:`PyConfig_Get(\"base_exec_prefix\") ` (:data:`sys.base_exec_prefix`) استفاده کنید. اگر نیاز است :ref:`محیط‌های مجازی ` مدیریت شوند، از :c:func:`PyConfig_Get(\"exec_prefix\") ` (:data:`sys.exec_prefix`) استفاده کنید." -msgid ":c:func:`Py_GetProgramFullPath`: Use :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) instead." -msgstr ":c:func:`Py_GetProgramFullPath`: به‌جای آن از :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) استفاده کنید." +msgid ":c:func:`!Py_GetProgramFullPath`: Use :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) instead." +msgstr ":c:func:`!Py_GetProgramFullPath`: به‌جای آن از :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) استفاده کنید." -msgid ":c:func:`Py_GetProgramName`: Use :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) instead." -msgstr ":c:func:`Py_GetProgramName`: به‌جای آن از :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) استفاده کنید." +msgid ":c:func:`!Py_GetProgramName`: Use :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) instead." +msgstr ":c:func:`!Py_GetProgramName`: به‌جای آن از :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) استفاده کنید." -msgid ":c:func:`Py_GetPythonHome`: Use :c:func:`PyConfig_Get(\"home\") ` or the :envvar:`PYTHONHOME` environment variable instead." -msgstr ":c:func:`Py_GetPythonHome`: به جای آن از :c:func:`PyConfig_Get(\"home\") ` یا متغیر محیطی :envvar:`PYTHONHOME` استفاده کنید." +msgid ":c:func:`!Py_GetPythonHome`: Use :c:func:`PyConfig_Get(\"home\") ` or the :envvar:`PYTHONHOME` environment variable instead." +msgstr ":c:func:`!Py_GetPythonHome`: به‌جای آن از :c:func:`PyConfig_Get(\"home\") ` یا متغیر محیطی :envvar:`PYTHONHOME` استفاده کنید." msgid "The `pythoncapi-compat project `__ can be used to get :c:func:`PyConfig_Get` on Python 3.13 and older." msgstr "می‌توان از `پروژه‌ی pythoncapi-compat `__ برای به‌دست آوردن :c:func:`PyConfig_Get` در پایتون 3.13 و قدیمی‌تر استفاده کرد." @@ -2978,3 +3153,6 @@ msgstr "تغییرات آزمون‌های رگرسیون" msgid "Python built with :file:`configure` :option:`--with-pydebug` now supports a :option:`-X presite=package.module <-X>` command-line option. If used, it specifies a module that should be imported early in the lifecycle of the interpreter, before ``site.py`` is executed. (Contributed by Łukasz Langa in :gh:`110769`.)" msgstr "پایتونی که با :file:`configure` :option:`--with-pydebug` ساخته شده است، اکنون از گزینه‌ی خط فرمان :option:`-X presite=package.module <-X>` پشتیبانی می‌کند. در صورت استفاده، این گزینه ماژولی را مشخص می‌کند که باید در اوایل چرخه‌ی حیات مفسر، پیش از اجرای ``site.py`` ایمپورت شود. (مشارکت‌شده توسط Łukasz Langa در :gh:`110769`.)" + +#~ msgid ":c:type:`Py_UNICODE` type and the :c:macro:`!Py_UNICODE_WIDE` macro: Use :c:type:`wchar_t` instead." +#~ msgstr "نوع :c:type:`Py_UNICODE` و ماکروی :c:macro:`!Py_UNICODE_WIDE`: به جای آن‌ها از :c:type:`wchar_t` استفاده کنید." diff --git a/whatsnew/3.14.po b/whatsnew/3.14.po index 61f6a054..0c11498b 100644 --- a/whatsnew/3.14.po +++ b/whatsnew/3.14.po @@ -5,12 +5,13 @@ # # Translators: # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-21 11:59+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 16:38+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: none\n" @@ -877,8 +878,8 @@ msgstr "مقادیر بالاتر از ``2`` برای ``-X importtime`` اکنو msgid "(Contributed by Noah Kim and Adam Turner in :gh:`118655`.)" msgstr "(با مشارکت Noah Kim و Adam Turner در :gh:`118655`.)" -msgid "The command-line option :option:`-c` now automatically dedents its code argument before execution. The auto-dedentation behavior mirrors :func:`textwrap.dedent`. (Contributed by Jon Crall and Steven Sun in :gh:`103998`.)" -msgstr "گزینه‌ی خط فرمان :option:`-c` اکنون پیش از اجرا، آرگومان کد خود را به‌طور خودکار حذف تورفتگی (dedent) می‌کند. رفتار حذف تورفتگی خودکار مشابه :func:`textwrap.dedent` است. (مشارکت‌شده توسط Jon Crall و Steven Sun در :gh:`103998`.)" +msgid "The command-line option :option:`-c` now automatically dedents its code argument before execution. (Contributed by Jon Crall and Steven Sun in :gh:`103998`.)" +msgstr "گزینه‌ی خط فرمان :option:`-c` اکنون به‌طور خودکار تورفتگی آرگومان کد خود را پیش از اجرا حذف می‌کند. (مشارکت‌کنندگان: Jon Crall و Steven Sun در :gh:`103998`.)" msgid ":option:`!-J` is no longer a reserved flag for Jython_, and now has no special meaning. (Contributed by Adam Turner in :gh:`133336`.)" msgstr "پرچم :option:`!-J` دیگر برای Jython_ رزرو‌شده نیست و اکنون معنای خاصی ندارد. (مشارکت‌شده توسط Adam Turner در :gh:`133336`.)" @@ -2371,8 +2372,8 @@ msgstr "در پایتون 3.15 حذف خواهد شد" msgid "The import system:" msgstr "سیستم ایمپورت:" -msgid "Setting :attr:`~module.__cached__` on a module while failing to set :attr:`__spec__.cached ` is deprecated. In Python 3.15, :attr:`!__cached__` will cease to be set or take into consideration by the import system or standard library. (:gh:`97879`)" -msgstr "تنظیم :attr:`~module.__cached__` روی یک ماژول در حالی که :attr:`__spec__.cached ` تنظیم نشود، منسوخ شده است. در پایتون 3.15، :attr:`!__cached__` دیگر توسط سیستم ایمپورت یا کتابخانه استاندارد تنظیم نخواهد شد یا در نظر گرفته نخواهد شد. (:gh:`97879`)" +msgid "Setting ``__cached__`` on a module while failing to set :attr:`__spec__.cached ` is deprecated. In Python 3.15, ``__cached__`` will cease to be set or take into consideration by the import system or standard library. (:gh:`97879`)" +msgstr "تنظیم ``__cached__`` روی یک ماژول در حالی که تنظیم کردن :attr:`__spec__.cached ` ناموفق باشد، منسوخ شده است. در پایتون ۳.۱۵، ``__cached__`` توسط سیستم ایمپورت یا کتابخانه‌ی استاندارد تنظیم نخواهد شد و در نظر گرفته نمی‌شود. (:gh:`97879`)" msgid "Setting :attr:`~module.__package__` on a module while failing to set :attr:`__spec__.parent ` is deprecated. In Python 3.15, :attr:`!__package__` will cease to be set or take into consideration by the import system or standard library. (:gh:`97879`)" msgstr "تنظیم :attr:`~module.__package__` روی یک ماژول بدون آنکه :attr:`__spec__.parent ` تنظیم شود، منسوخ شده است. در پایتون 3.15، :attr:`!__package__` دیگر توسط سیستم ایمپورت یا کتابخانه استاندارد تنظیم یا در نظر گرفته نخواهد شد. (:gh:`97879`)" @@ -2383,8 +2384,8 @@ msgstr "تابع مستند‌نشده‌ی :func:`!ctypes.SetPointerType` از msgid ":mod:`http.server`:" msgstr ":mod:`http.server`:" -msgid "The obsolete and rarely used :class:`~http.server.CGIHTTPRequestHandler` has been deprecated since Python 3.13. No direct replacement exists. *Anything* is better than CGI to interface a web server with a request handler." -msgstr "کلاس قدیمی و به‌ندرت استفاده‌شده :class:`~http.server.CGIHTTPRequestHandler` از پایتون 3.13 منسوخ شده است. هیچ جایگزین مستقیمی وجود ندارد. برای برقراری رابط بین وب‌سرور و هندلر درخواست، *هر چیزی* بهتر از CGI است." +msgid "The obsolete and rarely used :class:`!CGIHTTPRequestHandler` has been deprecated since Python 3.13. No direct replacement exists. *Anything* is better than CGI to interface a web server with a request handler." +msgstr "کلاس منسوخ و به‌ندرت استفاده‌شده‌ی :class:`!CGIHTTPRequestHandler` از نسخه‌ی ۳.۱۳ پایتون از رده خارج شده است. هیچ جایگزین مستقیمی برای آن وجود ندارد. *هر چیزی* برای برقراری ارتباط بین یک سرور وب و یک هندلر درخواست، از CGI بهتر است." msgid "The :option:`!--cgi` flag to the :program:`python -m http.server` command-line interface has been deprecated since Python 3.13." msgstr "پرچم :option:`!--cgi` در رابط خط فرمان :program:`python -m http.server` از پایتون 3.13 منسوخ شده است." @@ -2398,14 +2399,14 @@ msgstr "متد ``load_module()``: به‌جای آن از ``exec_module()`` اس msgid ":mod:`pathlib`:" msgstr ":mod:`pathlib`:" -msgid ":meth:`.PurePath.is_reserved` has been deprecated since Python 3.13. Use :func:`os.path.isreserved` to detect reserved paths on Windows." -msgstr ":meth:`.PurePath.is_reserved` از پایتون 3.13 منسوخ شده است. برای تشخیص مسیرهای رزروشده در ویندوز از :func:`os.path.isreserved` استفاده کنید." +msgid ":meth:`!.PurePath.is_reserved` has been deprecated since Python 3.13. Use :func:`os.path.isreserved` to detect reserved paths on Windows." +msgstr "متد :meth:`!.PurePath.is_reserved` از پایتون ۳.۱۳ منسوخ شده است. برای شناسایی مسیرهای رزرو شده در ویندوز، از :func:`os.path.isreserved` استفاده کنید." msgid ":mod:`platform`:" msgstr ":mod:`platform`:" -msgid ":func:`~platform.java_ver` has been deprecated since Python 3.13. This function is only useful for Jython support, has a confusing API, and is largely untested." -msgstr ":func:`~platform.java_ver` از پایتون 3.13 منسوخ شده است. این تابع تنها برای پشتیبانی از Jython مفید است، API گیج‌کننده‌ای دارد و عمدتاً آزمایش‌نشده است." +msgid ":func:`!platform.java_ver` has been deprecated since Python 3.13. This function is only useful for Jython support, has a confusing API, and is largely untested." +msgstr "تابعی :func:`!platform.java_ver` از نسخه‌ی ۳.۱۳ پایتون منسوخ شده است. این تابع فقط برای پشتیبانی از Jython مفید است، دارای یک API گیج‌کننده است و تا حد زیادی آزمایش نشده است." msgid ":mod:`sysconfig`:" msgstr ":mod:`sysconfig`:" @@ -2422,8 +2423,8 @@ msgstr ":func:`~threading.RLock` در پایتون 3.15 هیچ آرگومانی msgid ":mod:`types`:" msgstr ":mod:`types`:" -msgid ":class:`types.CodeType`: Accessing :attr:`~codeobject.co_lnotab` was deprecated in :pep:`626` since 3.10 and was planned to be removed in 3.12, but it only got a proper :exc:`DeprecationWarning` in 3.12. May be removed in 3.15. (Contributed by Nikita Sobolev in :gh:`101866`.)" -msgstr ":class:`types.CodeType`: دسترسی به :attr:`~codeobject.co_lnotab` مطابق :pep:`626` از نسخه‌ی 3.10 منسوخ شده بود و قرار بود در 3.12 حذف شود، اما تنها در 3.12 یک :exc:`DeprecationWarning` مناسب دریافت کرد. ممکن است در 3.15 حذف شود. (با مشارکت Nikita Sobolev در :gh:`101866`.)" +msgid ":class:`types.CodeType`: Accessing :attr:`!codeobject.co_lnotab` was deprecated in :pep:`626` since 3.10 and was planned to be removed in 3.12, but it only got a proper :exc:`DeprecationWarning` in 3.12. May be removed in 3.15. (Contributed by Nikita Sobolev in :gh:`101866`.)" +msgstr ":class:`types.CodeType`: دسترسی به :attr:`!codeobject.co_lnotab` در :pep:`626` از نسخه‌ی ۳.۱۰ منسوخ شد و برنامه‌ریزی شده بود در نسخه‌ی ۳.۱۲ حذف شود، اما تنها در نسخه‌ی ۳.۱۲ یک هشدار :exc:`DeprecationWarning` مناسب دریافت کرد. ممکن است در نسخه‌ی ۳.۱۵ حذف شود. (مشارکت‌کننده: Nikita Sobolev در :gh:`101866`.)" msgid ":mod:`typing`:" msgstr ":mod:`typing`:" @@ -2434,20 +2435,23 @@ msgstr "سینتکس آرگومان کلیدواژه‌ای مستندنشده msgid "When using the functional syntax of :class:`~typing.TypedDict`\\s, failing to pass a value to the *fields* parameter (``TD = TypedDict(\"TD\")``) or passing ``None`` (``TD = TypedDict(\"TD\", None)``) has been deprecated since Python 3.13. Use ``class TD(TypedDict): pass`` or ``TD = TypedDict(\"TD\", {})`` to create a TypedDict with zero field." msgstr "هنگام استفاده از سینتکس تابعی :class:`~typing.TypedDict`، عدم ارسال مقدار به پارامتر *fields* (``TD = TypedDict(\"TD\")``) یا ارسال ``None`` (``TD = TypedDict(\"TD\", None)``) از پایتون 3.13 منسوخ شده است. برای ایجاد یک TypedDict با صفر فیلد، از ``class TD(TypedDict): pass`` یا ``TD = TypedDict(\"TD\", {})`` استفاده کنید." -msgid "The :deco:`typing.no_type_check_decorator` decorator function has been deprecated since Python 3.13. After eight years in the :mod:`typing` module, it has yet to be supported by any major type checker." -msgstr "تابع دکوراتور :deco:`typing.no_type_check_decorator` از Python 3.13 منسوخ شده است. پس از هشت سال حضور در ماژول :mod:`typing`، هنوز هیچ‌یک از بررسی‌گرهای نوع اصلی از آن پشتیبانی نکرده است." +msgid "The :deco:`!typing.no_type_check_decorator` decorator function has been deprecated since Python 3.13. After eight years in the :mod:`typing` module, it has yet to be supported by any major type checker." +msgstr "تابع :deco:`!typing.no_type_check_decorator` از نسخه‌ی ۳.۱۳ پایتون منسوخ شده است. پس از هشت سال حضور در ماژول :mod:`typing`، هنوز توسط هیچ‌کدام از بررسی‌کننده‌های نوع بزرگ پشتیبانی نمی‌شود." + +msgid ":mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse` modules." +msgstr "ماژول‌های :mod:`!sre_compile`، :mod:`!sre_constants` و :mod:`!sre_parse`." msgid ":mod:`wave`:" msgstr ":mod:`wave`:" -msgid "The :meth:`~wave.Wave_read.getmark`, :meth:`!setmark`, and :meth:`~wave.Wave_read.getmarkers` methods of the :class:`~wave.Wave_read` and :class:`~wave.Wave_write` classes have been deprecated since Python 3.13." -msgstr "متدهای :meth:`~wave.Wave_read.getmark`، :meth:`!setmark` و :meth:`~wave.Wave_read.getmarkers` در کلاس‌های :class:`~wave.Wave_read` و :class:`~wave.Wave_write` از پایتون 3.13 منسوخ شده‌اند." +msgid "The ``getmark()``, ``setmark()`` and ``getmarkers()`` methods of the :class:`~wave.Wave_read` and :class:`~wave.Wave_write` classes have been deprecated since Python 3.13." +msgstr "متدهای ``getmark()``، ``setmark()`` و ``getmarkers()`` از کلاس‌های :class:`~wave.Wave_read` و :class:`~wave.Wave_write` از پایتون ۳.۱۳ منسوخ شده‌اند." msgid ":mod:`zipimport`:" msgstr ":mod:`zipimport`:" -msgid ":meth:`~zipimport.zipimporter.load_module` has been deprecated since Python 3.10. Use :meth:`~zipimport.zipimporter.exec_module` instead. (Contributed by Jiahao Li in :gh:`125746`.)" -msgstr ":meth:`~zipimport.zipimporter.load_module` از پایتون 3.10 منسوخ شده است. به جای آن از :meth:`~zipimport.zipimporter.exec_module` استفاده کنید. (مشارکت‌شده توسط Jiahao Li در :gh:`125746`.)" +msgid ":meth:`!zipimport.zipimporter.load_module` has been deprecated since Python 3.10. Use :meth:`~zipimport.zipimporter.exec_module` instead. (:gh:`125746`.)" +msgstr ":meth:`!zipimport.zipimporter.load_module` از پایتون ۳.۱۰ منسوخ شده است. به‌جای آن از :meth:`~zipimport.zipimporter.exec_module` استفاده کنید. (:gh:`125746`.)" msgid "Pending removal in Python 3.16" msgstr "در انتظار حذف در پایتون 3.16" @@ -2527,6 +2531,12 @@ msgstr "ویژگی مستندنشده و استفاده‌نشده‌ی :attr:`! msgid "Pending removal in Python 3.17" msgstr "در انتظار حذف در پایتون 3.17" +msgid ":mod:`datetime`:" +msgstr ":mod:`datetime`:" + +msgid ":meth:`~datetime.datetime.strptime` calls using a format string containing ``%e`` (day of month) without a year. This has been deprecated since Python 3.15. (Contributed by Stan Ulbrych in :gh:`70647`.)" +msgstr "فراخوانی‌های متد :meth:`~datetime.datetime.strptime` که از یک رشته‌ی قالب حاوی ``%e`` (روز ماه) بدون سال استفاده می‌کنند. این مورد از نسخه‌ی ۳.۱۵ پایتون منسوخ شده است. (مشارکت توسط Stan Ulbrych در :gh:`70647`.)" + msgid ":mod:`collections.abc`:" msgstr ":mod:`collections.abc`:" @@ -2542,27 +2552,198 @@ msgstr ":class:`!ByteString` در اصل قرار بود یک کلاس انتز msgid "See :pep:`PEP 688 <688#current-options>` for more details. (Contributed by Shantanu Jain in :gh:`91896`.)" msgstr "برای جزئیات بیشتر به :pep:`PEP 688 <688#current-options>` مراجعه کنید. (مشارکت‌شده توسط شانتانو جین در :gh:`91896`.)" +msgid ":mod:`encodings`:" +msgstr ":mod:`encodings`:" + +msgid "Passing non-ascii *encoding* names to :func:`encodings.normalize_encoding` is deprecated and scheduled for removal in Python 3.17. (Contributed by Stan Ulbrych in :gh:`136702`.)" +msgstr "ارسال نام‌های کدگذاری non-ascii به تابع :func:`encodings.normalize_encoding` منسوخ شده است و طبق برنامه‌ریزی در نسخه‌ی ۳.۱۷ پایتون حذف خواهد شد. (مشارکت توسط Stan Ulbrych در :gh:`136702`.)" + +msgid ":mod:`profile`:" +msgstr ":mod:`profile`:" + +msgid "The :mod:`!profile` module is deprecated and will be removed in Python 3.17. Use :mod:`profiling.tracing` instead, which provides a compatible API. See :pep:`799` for details. (Contributed by Pablo Galindo and László Kiss Kollár in :gh:`138122`.)" +msgstr "ماژول :mod:`!profile` منسوخ شده است و در نسخه‌ی ۳.۱۷ پایتون حذف خواهد شد. به‌جای آن از :mod:`profiling.tracing` استفاده کنید که یک API سازگار فراهم می‌کند. برای جزئیات به :pep:`799` مراجعه کنید. (مشارکت توسط Pablo Galindo و László Kiss Kollár در :gh:`138122`.)" + +msgid ":mod:`webbrowser`:" +msgstr ":mod:`webbrowser`:" + +msgid ":class:`!webbrowser.MacOSXOSAScript` is deprecated in favour of :class:`!webbrowser.MacOS`. (:gh:`137586`)" +msgstr ":class:`!webbrowser.MacOSXOSAScript` به نفع :class:`!webbrowser.MacOS` منسوخ شده است. (:gh:`137586`)" + msgid "Before Python 3.14, old-style unions were implemented using the private class ``typing._UnionGenericAlias``. This class is no longer needed for the implementation, but it has been retained for backward compatibility, with removal scheduled for Python 3.17. Users should use documented introspection helpers like :func:`typing.get_origin` and :func:`typing.get_args` instead of relying on private implementation details." msgstr "پیش از پایتون 3.14، اجتماعهای سبک قدیمی (old-style unions) با استفاده از کلاس خصوصی ``typing._UnionGenericAlias`` پیاده‌سازی می‌شدند. این کلاس دیگر برای پیاده‌سازی مورد نیاز نیست، اما برای سازگاری با نسخه‌های قبلی حفظ شده است و حذف آن برای پایتون 3.17 برنامه‌ریزی شده است. کاربران باید به‌جای تکیه بر جزئیات پیاده‌سازی خصوصی، از ابزارهای کمکی درون‌نگری مستند مانند :func:`typing.get_origin` و :func:`typing.get_args` استفاده کنند." msgid ":class:`typing.ByteString`, deprecated since Python 3.9, is scheduled for removal in Python 3.17." msgstr ":class:`typing.ByteString` که از پایتون 3.9 منسوخ شده است، قرار است در پایتون 3.17 حذف شود." +msgid ":mod:`tkinter`:" +msgstr ":mod:`tkinter`:" + +msgid "The :class:`!tkinter.Variable` methods :meth:`!trace_variable`, :meth:`!trace` (an alias of :meth:`!trace_variable`), :meth:`!trace_vdelete` and :meth:`!trace_vinfo`, deprecated since Python 3.14, are scheduled for removal in Python 3.17. Use :meth:`!trace_add`, :meth:`!trace_remove` and :meth:`!trace_info` instead. (Contributed by Serhiy Storchaka in :gh:`120220`.)" +msgstr "متدهای :class:`!tkinter.Variable` یعنی :meth:`!trace_variable`، :meth:`!trace` (که نام مستعاری برای :meth:`!trace_variable` است)، :meth:`!trace_vdelete` و :meth:`!trace_vinfo` که از نسخه‌ی ۳.۱۴ پایتون منسوخ شده‌اند، برای حذف در نسخه‌ی ۳.۱۷ پایتون برنامه‌ریزی شده‌اند. به‌جای آن‌ها از :meth:`!trace_add`، :meth:`!trace_remove` و :meth:`!trace_info` استفاده کنید. (توسط Serhiy Storchaka در :gh:`120220` مشارکت داده شده است.)" + msgid "Pending removal in Python 3.18" msgstr "در انتظار حذف در پایتون 3.18" +msgid "No longer accept a boolean value when a file descriptor is expected. (Contributed by Serhiy Storchaka in :gh:`82626`.)" +msgstr "دیگر مقداری بولی در جایی که انتظار توصیف‌گر پرونده می‌رود پذیرفته نمی‌شود. (توسط Serhiy Storchaka در :gh:`82626` مشارکت داده شده است.)" + msgid ":mod:`decimal`:" msgstr ":mod:`decimal`:" msgid "The non-standard and undocumented :class:`~decimal.Decimal` format specifier ``'N'``, which is only supported in the :mod:`!decimal` module's C implementation, has been deprecated since Python 3.13. (Contributed by Serhiy Storchaka in :gh:`89902`.)" msgstr "مشخص‌کننده‌ی قالب ``'N'`` در :class:`~decimal.Decimal`، که غیراستاندارد و مستندسازی‌نشده است و تنها در پیاده‌سازی C ماژول :mod:`!decimal` پشتیبانی می‌شود، از پایتون 3.13 منسوخ شده است. (مشارکت‌شده توسط Serhiy Storchaka در :gh:`89902`.)" +msgid "Deprecations defined by :pep:`829`:" +msgstr "موارد منسوخ تعریف‌شده توسط :pep:`829`:" + +msgid "``import`` lines in :file:`{name}.pth` files are silently ignored." +msgstr "سطرهای ``import`` در پرونده‌های :file:`{name}.pth` به‌طور صامت نادیده گرفته می‌شوند." + +msgid "(Contributed by Barry Warsaw in :gh:`148641`.)" +msgstr "(توسط Barry Warsaw در :gh:`148641` مشارکت داده شده است.)" + msgid "Pending removal in Python 3.19" msgstr "در انتظار حذف در پایتون 3.19" msgid "Implicitly switching to the MSVC-compatible struct layout by setting :attr:`~ctypes.Structure._pack_` but not :attr:`~ctypes.Structure._layout_` on non-Windows platforms." msgstr "تغییر ضمنی به چیدمان ساختار سازگار با MSVC از طریق تنظیم :attr:`~ctypes.Structure._pack_` اما بدون تنظیم :attr:`~ctypes.Structure._layout_` روی پلتفرم‌های غیر ویندوزی." +msgid ":mod:`hashlib`:" +msgstr ":mod:`hashlib`:" + +msgid "In hash function constructors such as :func:`~hashlib.new` or the direct hash-named constructors such as :func:`~hashlib.md5` and :func:`~hashlib.sha256`, their optional initial data parameter could also be passed a keyword argument named ``data=`` or ``string=`` in various :mod:`!hashlib` implementations." +msgstr "در سازنده‌های تابع هش مانند :func:`~hashlib.new` یا سازنده‌های مستقیم با نام هش مانند :func:`~hashlib.md5` و :func:`~hashlib.sha256`، به پارامتر داده‌ی اولیه‌ی اختیاری آن‌ها نیز می‌توان در پیاده‌سازی‌های مختلف :mod:`!hashlib` یک آرگومان کلیدواژه‌ای به نام ``data=`` یا ``string=`` ارسال کرد." + +msgid "Support for the ``string`` keyword argument name is now deprecated and slated for removal in Python 3.19." +msgstr "پشتیبانی از نام آرگومان کلیدواژه‌ای ``string`` اکنون منسوخ شده است و در نسخه‌ی ۳.۱۹ پایتون حذف خواهد شد." + +msgid "Before Python 3.13, the ``string`` keyword parameter was not correctly supported depending on the backend implementation of hash functions. Prefer passing the initial data as a positional argument for maximum backwards compatibility." +msgstr "پیش از نسخه‌ی ۳.۱۳ پایتون، پارامتر کلیدواژه‌ای ``string`` بسته به پیاده‌سازی بک‌اند تابع‌های هش به‌درستی پشتیبانی نمی‌شد. برای حداکثر سازگاری با نسخه‌های قبلی، ترجیح دهید داده‌ی اولیه را به عنوان یک آرگومان جایگاهی ارسال کنید." + +msgid ":mod:`http.cookies`:" +msgstr ":mod:`http.cookies`:" + +msgid ":meth:`http.cookies.Morsel.js_output` is deprecated and will be removed in Python 3.19." +msgstr "متد :meth:`http.cookies.Morsel.js_output` منسوخ شده است و در نسخه‌ی ۳.۱۹ پایتون حذف خواهد شد." + +msgid ":meth:`http.cookies.BaseCookie.js_output` is deprecated and will be removed in Python 3.19." +msgstr "متد :meth:`http.cookies.BaseCookie.js_output` منسوخ شده است و در نسخه‌ی ۳.۱۹ پایتون حذف خواهد شد." + +msgid ":mod:`imaplib`:" +msgstr ":mod:`imaplib`:" + +msgid "Altering :attr:`IMAP4.file ` is now deprecated and slated for removal in Python 3.19. This property is now unused and changing its value does not automatically close the current file." +msgstr "تغییر دادن :attr:`IMAP4.file ` اکنون منسوخ شده است و طبق برنامه‌ریزی در نسخه‌ی ۳.۱۹ پایتون حذف خواهد شد. این خصوصیت اکنون استفاده نمی‌شود و تغییر مقدار آن به‌طور خودکار پرونده‌ی فعلی را نمی‌بندد." + +msgid "Before Python 3.14, this property was used to implement the corresponding ``read()`` and ``readline()`` methods for :class:`~imaplib.IMAP4` but this is no longer the case since then." +msgstr "پیش از نسخه‌ی ۳.۱۴ پایتون، این خصوصیت برای پیاده‌سازی متدهای مربوط به ``read()`` و ``readline()`` برای :class:`~imaplib.IMAP4` استفاده می‌شد، اما از آن زمان به بعد دیگر این‌طور نیست." + +msgid "Pending removal in Python 3.20" +msgstr "در نوبت حذف در نسخه‌ی ۳.۲۰ پایتون" + +msgid "Calling the ``__new__()`` method of :class:`struct.Struct` without the *format* argument is deprecated and will be removed in Python 3.20. Calling :meth:`~object.__init__` method on initialized :class:`~struct.Struct` objects is deprecated and will be removed in Python 3.20." +msgstr "فراخوانی متد ``__new__()`` از :class:`struct.Struct` بدون آرگومان *format* منسوخ شده است و در نسخه‌ی ۳.۲۰ پایتون حذف خواهد شد. فراخوانی متد :meth:`~object.__init__` روی شیءهای مقداردهی اولیه‌شده‌ی :class:`~struct.Struct` منسوخ شده است و در نسخه‌ی ۳.۲۰ پایتون حذف خواهد شد." + +msgid "(Contributed by Sergey B Kirpichev and Serhiy Storchaka in :gh:`143715`.)" +msgstr "(توسط Sergey B Kirpichev و Serhiy Storchaka در :gh:`143715` مشارکت داده شده است.)" + +msgid "The ``__version__``, ``version`` and ``VERSION`` attributes have been deprecated in these standard library modules and will be removed in Python 3.20. Use :py:data:`sys.version_info` instead." +msgstr "صفات ``__version__``، ``version`` و ``VERSION`` در این ماژول‌های کتابخانه‌ی استاندارد منسوخ شده‌اند و در نسخه‌ی ۳.۲۰ پایتون حذف خواهند شد. به‌جای آن از :py:data:`sys.version_info` استفاده کنید." + +msgid ":mod:`argparse`" +msgstr ":mod:`argparse`" + +msgid ":mod:`csv`" +msgstr ":mod:`csv`" + +msgid ":mod:`ctypes`" +msgstr ":mod:`ctypes`" + +msgid ":mod:`!ctypes.macholib`" +msgstr ":mod:`!ctypes.macholib`" + +msgid ":mod:`decimal` (use :data:`decimal.SPEC_VERSION` instead)" +msgstr ":mod:`decimal` (به‌جای آن از :data:`decimal.SPEC_VERSION` استفاده کنید)" + +msgid ":mod:`http.server`" +msgstr ":mod:`http.server`" + +msgid ":mod:`imaplib`" +msgstr ":mod:`imaplib`" + +msgid ":mod:`ipaddress`" +msgstr ":mod:`ipaddress`" + +msgid ":mod:`json`" +msgstr ":mod:`json`" + +msgid ":mod:`logging` (``__date__`` also deprecated)" +msgstr ":mod:`logging` (``__date__`` نیز منسوخ شده است)" + +msgid ":mod:`optparse`" +msgstr ":mod:`optparse`" + +msgid ":mod:`pickle`" +msgstr ":mod:`pickle`" + +msgid ":mod:`platform`" +msgstr ":mod:`platform`" + +msgid ":mod:`re`" +msgstr ":mod:`re`" + +msgid ":mod:`socketserver`" +msgstr ":mod:`socketserver`" + +msgid ":mod:`tabnanny`" +msgstr ":mod:`tabnanny`" + +msgid ":mod:`tarfile`" +msgstr ":mod:`tarfile`" + +msgid ":mod:`tkinter.font`" +msgstr ":mod:`tkinter.font`" + +msgid ":mod:`tkinter.ttk`" +msgstr ":mod:`tkinter.ttk`" + +msgid ":mod:`wsgiref.simple_server`" +msgstr ":mod:`wsgiref.simple_server`" + +msgid ":mod:`xml.etree.ElementTree`" +msgstr ":mod:`xml.etree.ElementTree`" + +msgid ":mod:`!xml.sax.expatreader`" +msgstr ":mod:`!xml.sax.expatreader`" + +msgid ":mod:`xml.sax.handler`" +msgstr ":mod:`xml.sax.handler`" + +msgid ":mod:`zlib`" +msgstr ":mod:`zlib`" + +msgid "(Contributed by Hugo van Kemenade and Stan Ulbrych in :gh:`76007`.)" +msgstr "(مشارکت توسط Hugo van Kemenade و Stan Ulbrych در :gh:`76007`.)" + +msgid "Warnings are produced for ``import`` lines found in :file:`{name}.pth` files." +msgstr "برای خط‌های ``import`` یافت‌شده در پرونده‌های :file:`{name}.pth` اخطارهایی تولید می‌شود." + +msgid ":file:`{name}.pth` files are no longer decoded in the locale encoding by default. They **MUST** be encoded in ``utf-8-sig``." +msgstr "پرونده‌های :file:`{name}.pth` دیگر به‌طور پیش‌فرض با کدگذاری locale رمزگشایی نمی‌شوند. آن‌ها **باید** با ``utf-8-sig`` کدگذاری شوند." + +msgid ":mod:`ast`:" +msgstr ":mod:`ast`:" + +msgid "Creating instances of abstract AST nodes (such as :class:`ast.AST` or :class:`!ast.expr`) is deprecated and will raise an error in Python 3.20." +msgstr "ایجاد نمونه‌هایی از گره‌های درخت نحوی انتزاعی (AST) (مانند :class:`ast.AST` یا :class:`!ast.expr`) منسوخ شده است و در پایتون ۳.۲۰ خطایی را ایجاد خواهد کرد." + +msgid "It is deprecated to call :func:`isinstance` and :func:`issubclass` checks on protocol classes that were not explicitly decorated with :func:`!runtime_checkable` but that inherit from a runtime-checkable protocol class. This will raise a :exc:`TypeError` in Python 3.20." +msgstr "فراخوانی بررسی‌های :func:`isinstance` و :func:`issubclass` روی کلاس‌های پروتکلی که صراحتاً با :func:`!runtime_checkable` تزئین نشده‌اند اما از یک کلاس پروتکلِ قابل‌بررسی در زمان اجرا (runtime-checkable) ارث‌بری می‌کنند، منسوخ شده است. این کار در پایتون ۳.۲۰ یک :exc:`TypeError` ایجاد خواهد کرد." + +msgid "(Contributed by Bartosz Sławecki in :gh:`132604`.)" +msgstr "(مشارکت توسط Bartosz Sławecki در :gh:`132604`.)" + msgid "Pending removal in future versions" msgstr "در انتظار حذف در نسخه‌های آینده" @@ -2602,11 +2783,8 @@ msgstr ":mod:`calendar`: ثابت‌های ``calendar.January`` و ``calendar.Fe msgid ":mod:`codecs`: use :func:`open` instead of :func:`codecs.open`. (:gh:`133038`)" msgstr ":mod:`codecs`: به‌جای :func:`codecs.open` از :func:`open` استفاده کنید. (:gh:`133038`)" -msgid ":attr:`codeobject.co_lnotab`: use the :meth:`codeobject.co_lines` method instead." -msgstr ":attr:`codeobject.co_lnotab`: به‌جای آن از متد :meth:`codeobject.co_lines` استفاده کنید." - -msgid ":mod:`datetime`:" -msgstr ":mod:`datetime`:" +msgid ":attr:`!codeobject.co_lnotab`: use the :meth:`codeobject.co_lines` method instead." +msgstr ":attr:`!codeobject.co_lnotab`: به‌جای آن از متد :meth:`codeobject.co_lines` استفاده کنید." msgid ":meth:`~datetime.datetime.utcnow`: use ``datetime.datetime.now(tz=datetime.UTC)``." msgstr ":meth:`~datetime.datetime.utcnow`: از ``datetime.datetime.now(tz=datetime.UTC)`` استفاده کنید." @@ -2635,8 +2813,11 @@ msgstr ":mod:`logging`: متد ``warn()`` از پایتون 3.3 منسوخ شد msgid ":mod:`mailbox`: Use of StringIO input and text mode is deprecated, use BytesIO and binary mode instead." msgstr ":mod:`mailbox`: استفاده از ورودی StringIO و حالت متنی منسوخ شده است؛ به جای آن از BytesIO و حالت دودویی استفاده کنید." -msgid ":mod:`os`: Calling :func:`os.register_at_fork` in multi-threaded process." -msgstr ":mod:`os`: فراخوانی :func:`os.register_at_fork` در فرایند چندنخی." +msgid ":mod:`os`: Calling :func:`os.register_at_fork` in a multi-threaded process." +msgstr ":mod:`os`: فراخوانی :func:`os.register_at_fork` در یک فرایند چندنخی." + +msgid ":mod:`os.path`: :func:`os.path.commonprefix` is deprecated, use :func:`os.path.commonpath` for path prefixes. The :func:`os.path.commonprefix` function is being deprecated due to having a misleading name and module. The function is not safe to use for path prefixes despite being included in a module about path manipulation, meaning it is easy to accidentally introduce path traversal vulnerabilities into Python programs by using this function." +msgstr ":mod:`os.path`: تابع :func:`os.path.commonprefix` منسوخ شده است؛ برای پیشوندهای مسیر از :func:`os.path.commonpath` استفاده کنید. تابع :func:`os.path.commonprefix` به دلیل داشتن نام و ماژول گمراه‌کننده در حال منسوخ شدن است. این تابع با وجود اینکه در ماژولی مربوط به دستکاری مسیر قرار دارد، برای استفاده با پیشوندهای مسیر ایمن نیست؛ به این معنی که با استفاده از این تابع، به‌طور تصادفی آسیب‌پذیری‌های پیمایش مسیر (path traversal) در برنامه‌های پایتون ایجاد می‌شود." msgid ":class:`!pydoc.ErrorDuringImport`: A tuple value for *exc_info* parameter is deprecated, use an exception instance." msgstr ":class:`!pydoc.ErrorDuringImport`: مقدار تاپل برای پارامتر *exc_info* منسوخ شده است؛ از یک نمونه استثنا استفاده کنید." @@ -2644,9 +2825,6 @@ msgstr ":class:`!pydoc.ErrorDuringImport`: مقدار تاپل برای پارا msgid ":mod:`re`: More strict rules are now applied for numerical group references and group names in regular expressions. Only sequence of ASCII digits is now accepted as a numerical reference. The group name in bytes patterns and replacement strings can now only contain ASCII letters and digits and underscore. (Contributed by Serhiy Storchaka in :gh:`91760`.)" msgstr ":mod:`re`: اکنون قواعد سخت‌گیرانه‌تری برای ارجاع‌های عددی گروه و نام گروه‌ها در عبارات باقاعده اعمال می‌شود. اکنون فقط دنباله‌ای از ارقام اسکی به‌عنوان ارجاع عددی پذیرفته می‌شود. نام گروه در الگوهای بایتی و رشته‌های جایگزین اکنون فقط می‌تواند شامل حروف و ارقام اسکی و زیرخط باشد. (مشارکت‌شده توسط Serhiy Storchaka در :gh:`91760`.)" -msgid ":mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse` modules." -msgstr "ماژول‌های :mod:`!sre_compile`، :mod:`!sre_constants` و :mod:`!sre_parse`." - msgid ":mod:`shutil`: :func:`~shutil.rmtree`'s *onerror* parameter is deprecated in Python 3.12; use the *onexc* parameter instead." msgstr ":mod:`shutil`: پارامتر *onerror* در :func:`~shutil.rmtree` در پایتون 3.12 منسوخ شده است؛ به جای آن از پارامتر *onexc* استفاده کنید." @@ -2809,8 +2987,8 @@ msgstr "افزودن شبه‌دستورالعمل‌های :opcode:`JUMP_IF_TRU msgid "Add the :opcode:`!LOAD_CONST_MORTAL` pseudo instruction. (Contributed by Mark Shannon in :gh:`128685`.)" msgstr "افزودن شبه‌دستور (pseudo instruction) :opcode:`!LOAD_CONST_MORTAL`. (مشارکت‌شده توسط Mark Shannon در :gh:`128685`.)" -msgid "Add the :opcode:`LOAD_CONST_IMMORTAL` pseudo instruction, which does the same as :opcode:`!LOAD_CONST`, but is more efficient for immortal objects. (Contributed by Mark Shannon in :gh:`125837`.)" -msgstr "شبه‌دستور :opcode:`LOAD_CONST_IMMORTAL` اضافه شد که همان کار :opcode:`!LOAD_CONST` را انجام می‌دهد، اما برای اشیاء نامیرا کارآمدتر است. (مشارکت‌شده توسط مارک شنون در :gh:`125837`.)" +msgid "Add the :opcode:`!LOAD_CONST_IMMORTAL` pseudo instruction, which does the same as :opcode:`!LOAD_CONST`, but is more efficient for immortal objects. (Contributed by Mark Shannon in :gh:`125837`.)" +msgstr "دستور شبه‌پیش فرض :opcode:`!LOAD_CONST_IMMORTAL` اضافه شد که کاری مشابه :opcode:`!LOAD_CONST` انجام می‌دهد، اما برای اشیای نامیرا کارآمدتر است. (مشارکت توسط Mark Shannon در :gh:`125837`.)" msgid "Add the :opcode:`NOT_TAKEN` pseudo instruction, used by :mod:`sys.monitoring` to record branch events (such as :monitoring-event:`BRANCH_LEFT`). (Contributed by Mark Shannon in :gh:`122548`.)" msgstr "افزودن شبه‌دستورالعمل :opcode:`NOT_TAKEN` که توسط :mod:`sys.monitoring` برای ثبت رویدادهای انشعاب (مانند :monitoring-event:`BRANCH_LEFT`) استفاده می‌شود. (مشارکت‌شده توسط Mark Shannon در :gh:`122548`.)" @@ -3085,8 +3263,8 @@ msgstr "APIهای غیرمستند :c:macro:`!Py_C_RECURSION_LIMIT` و :c:member msgid "Deprecated C APIs" msgstr "APIهای C منسوخ" -msgid "The :c:macro:`!Py_HUGE_VAL` macro is now :term:`soft deprecated`. Use :c:macro:`!Py_INFINITY` instead. (Contributed by Sergey B Kirpichev in :gh:`120026`.)" -msgstr "ماکروی :c:macro:`!Py_HUGE_VAL` اکنون :term:`soft deprecated` است. به جای آن از :c:macro:`!Py_INFINITY` استفاده کنید. (مشارکت‌شده توسط Sergey B Kirpichev در :gh:`120026`.)" +msgid "The :c:macro:`!Py_HUGE_VAL` macro is now :term:`soft deprecated`. Use :c:macro:`!INFINITY` instead. (Contributed by Sergey B Kirpichev in :gh:`120026`.)" +msgstr "ماکروی :c:macro:`!Py_HUGE_VAL` اکنون :term:`به‌طور نرم‌افزاری منسوخ ` شده است. به‌جای آن از :c:macro:`!INFINITY` استفاده کنید. (مشارکت توسط Sergey B Kirpichev در :gh:`120026`.)" msgid "The :c:macro:`!Py_IS_NAN`, :c:macro:`!Py_IS_INFINITY`, and :c:macro:`!Py_IS_FINITE` macros are now :term:`soft deprecated`. Use :c:macro:`!isnan`, :c:macro:`!isinf` and :c:macro:`!isfinite` instead, available from :file:`math.h` since C99. (Contributed by Sergey B Kirpichev in :gh:`119613`.)" msgstr "ماکروهای :c:macro:`!Py_IS_NAN`، :c:macro:`!Py_IS_INFINITY` و :c:macro:`!Py_IS_FINITE` اکنون :term:`نرم‌منسوخ ` هستند. به‌جای آن‌ها از :c:macro:`!isnan`، :c:macro:`!isinf` و :c:macro:`!isfinite` استفاده کنید که از C99 به بعد در :file:`math.h` در دسترس هستند. (مشارکت Sergey B Kirpichev در :gh:`119613`.)" @@ -3100,14 +3278,11 @@ msgstr "تابع ``_PyMonitoring_FireBranchEvent`` اکنون منسوخ شده msgid "The previously undocumented function :c:func:`PySequence_In` is now :term:`soft deprecated`. Use :c:func:`PySequence_Contains` instead. (Contributed by Yuki Kobayashi in :gh:`127896`.)" msgstr "تابع :c:func:`PySequence_In` که پیش‌تر مستند نشده بود، اکنون :term:`soft deprecated` است. به‌جای آن از :c:func:`PySequence_Contains` استفاده کنید. (مشارکت‌شده توسط Yuki Kobayashi در :gh:`127896`.)" -msgid "The :c:func:`PyImport_ImportModuleNoBlock`: Use :c:func:`PyImport_ImportModule` instead." -msgstr "تابع :c:func:`PyImport_ImportModuleNoBlock`: به جای آن از :c:func:`PyImport_ImportModule` استفاده کنید." +msgid "The :c:func:`!PyImport_ImportModuleNoBlock`: Use :c:func:`PyImport_ImportModule` instead." +msgstr ":c:func:`!PyImport_ImportModuleNoBlock`: به‌جای آن از :c:func:`PyImport_ImportModule` استفاده کنید." -msgid ":c:func:`PyWeakref_GetObject` and :c:func:`PyWeakref_GET_OBJECT`: Use :c:func:`PyWeakref_GetRef` instead. The `pythoncapi-compat project `__ can be used to get :c:func:`PyWeakref_GetRef` on Python 3.12 and older." -msgstr ":c:func:`PyWeakref_GetObject` و :c:func:`PyWeakref_GET_OBJECT`: به‌جای آن‌ها از :c:func:`PyWeakref_GetRef` استفاده کنید. می‌توان از `پروژه‌ی pythoncapi-compat `__ برای دسترسی به :c:func:`PyWeakref_GetRef` در پایتون 3.12 و نسخه‌های قدیمی‌تر استفاده کرد." - -msgid ":c:type:`Py_UNICODE` type and the :c:macro:`!Py_UNICODE_WIDE` macro: Use :c:type:`wchar_t` instead." -msgstr "نوع :c:type:`Py_UNICODE` و ماکروی :c:macro:`!Py_UNICODE_WIDE`: به‌جای آن از :c:type:`wchar_t` استفاده کنید." +msgid ":c:func:`!PyWeakref_GetObject` and :c:func:`!PyWeakref_GET_OBJECT`: Use :c:func:`PyWeakref_GetRef` instead. The `pythoncapi-compat project `__ can be used to get :c:func:`PyWeakref_GetRef` on Python 3.12 and older." +msgstr ":c:func:`!PyWeakref_GetObject` و :c:func:`!PyWeakref_GET_OBJECT`: به‌جای آن از :c:func:`PyWeakref_GetRef` استفاده کنید. پروژه‌ی `pythoncapi-compat project `__ را می‌توان برای دسترسی به :c:func:`PyWeakref_GetRef` در پایتون ۳.۱۲ و نسخه‌های قدیمی‌تر استفاده کرد." msgid ":c:func:`!PyUnicode_AsDecodedObject`: Use :c:func:`PyCodec_Decode` instead." msgstr ":c:func:`!PyUnicode_AsDecodedObject`: به‌جای آن از :c:func:`PyCodec_Decode` استفاده کنید." @@ -3124,23 +3299,23 @@ msgstr ":c:func:`!PyUnicode_AsEncodedUnicode`: به جای آن از :c:func:`Py msgid "Python initialization functions, deprecated in Python 3.13:" msgstr "توابع مقداردهی اولیه پایتون، منسوخ‌شده در پایتون 3.13:" -msgid ":c:func:`Py_GetPath`: Use :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:`sys.path`) instead." -msgstr ":c:func:`Py_GetPath`: به‌جای آن از :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:`sys.path`) استفاده کنید." +msgid ":c:func:`!Py_GetPath`: Use :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:`sys.path`) instead." +msgstr ":c:func:`!Py_GetPath`: به‌جای آن از :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:`sys.path`) استفاده کنید." -msgid ":c:func:`Py_GetPrefix`: Use :c:func:`PyConfig_Get(\"base_prefix\") ` (:data:`sys.base_prefix`) instead. Use :c:func:`PyConfig_Get(\"prefix\") ` (:data:`sys.prefix`) if :ref:`virtual environments ` need to be handled." -msgstr ":c:func:`Py_GetPrefix`: به‌جای آن از :c:func:`PyConfig_Get(\"base_prefix\") ` (:data:`sys.base_prefix`) استفاده کنید. اگر لازم است به :ref:`محیط‌های مجازی ` رسیدگی شود، از :c:func:`PyConfig_Get(\"prefix\") ` (:data:`sys.prefix`) استفاده کنید." +msgid ":c:func:`!Py_GetPrefix`: Use :c:func:`PyConfig_Get(\"base_prefix\") ` (:data:`sys.base_prefix`) instead. Use :c:func:`PyConfig_Get(\"prefix\") ` (:data:`sys.prefix`) if :ref:`virtual environments ` need to be handled." +msgstr ":c:func:`!Py_GetPrefix`: به‌جای آن از :c:func:`PyConfig_Get(\"base_prefix\") ` (:data:`sys.base_prefix`) استفاده کنید. اگر نیاز است محیط‌های مجازی (:ref:`virtual environments `) مدیریت شوند، از :c:func:`PyConfig_Get(\"prefix\") ` (:data:`sys.prefix`) استفاده کنید." -msgid ":c:func:`Py_GetExecPrefix`: Use :c:func:`PyConfig_Get(\"base_exec_prefix\") ` (:data:`sys.base_exec_prefix`) instead. Use :c:func:`PyConfig_Get(\"exec_prefix\") ` (:data:`sys.exec_prefix`) if :ref:`virtual environments ` need to be handled." -msgstr ":c:func:`Py_GetExecPrefix`: به جای آن از :c:func:`PyConfig_Get(\"base_exec_prefix\") ` (:data:`sys.base_exec_prefix`) استفاده کنید. اگر نیاز به مدیریت :ref:`محیط‌های مجازی ` باشد، از :c:func:`PyConfig_Get(\"exec_prefix\") ` (:data:`sys.exec_prefix`) استفاده کنید." +msgid ":c:func:`!Py_GetExecPrefix`: Use :c:func:`PyConfig_Get(\"base_exec_prefix\") ` (:data:`sys.base_exec_prefix`) instead. Use :c:func:`PyConfig_Get(\"exec_prefix\") ` (:data:`sys.exec_prefix`) if :ref:`virtual environments ` need to be handled." +msgstr ":c:func:`!Py_GetExecPrefix`: به‌جای آن از :c:func:`PyConfig_Get(\"base_exec_prefix\") ` (:data:`sys.base_exec_prefix`) استفاده کنید. اگر نیاز است محیط‌های مجازی (:ref:`virtual environments `) مدیریت شوند، از :c:func:`PyConfig_Get(\"exec_prefix\") ` (:data:`sys.exec_prefix`) استفاده کنید." -msgid ":c:func:`Py_GetProgramFullPath`: Use :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) instead." -msgstr ":c:func:`Py_GetProgramFullPath`: به جای آن از :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) استفاده کنید." +msgid ":c:func:`!Py_GetProgramFullPath`: Use :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) instead." +msgstr ":c:func:`!Py_GetProgramFullPath`: به‌جای آن از :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) استفاده کنید." -msgid ":c:func:`Py_GetProgramName`: Use :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) instead." -msgstr ":c:func:`Py_GetProgramName`: به جای آن از :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) استفاده کنید." +msgid ":c:func:`!Py_GetProgramName`: Use :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) instead." +msgstr ":c:func:`!Py_GetProgramName`: به‌جای آن از :c:func:`PyConfig_Get(\"executable\") ` (یعنی :data:`sys.executable`) استفاده کنید." -msgid ":c:func:`Py_GetPythonHome`: Use :c:func:`PyConfig_Get(\"home\") ` or the :envvar:`PYTHONHOME` environment variable instead." -msgstr ":c:func:`Py_GetPythonHome`: به‌جای آن از :c:func:`PyConfig_Get(\"home\") ` یا متغیر محیطی :envvar:`PYTHONHOME` استفاده کنید." +msgid ":c:func:`!Py_GetPythonHome`: Use :c:func:`PyConfig_Get(\"home\") ` or the :envvar:`PYTHONHOME` environment variable instead." +msgstr ":c:func:`!Py_GetPythonHome`: به‌جای آن از :c:func:`PyConfig_Get(\"home\") ` یا متغیر محیطی :envvar:`PYTHONHOME` استفاده کنید." msgid "The `pythoncapi-compat project `__ can be used to get :c:func:`PyConfig_Get` on Python 3.13 and older." msgstr "می‌توان از `پروژه‌ی pythoncapi-compat `__ برای به دست آوردن :c:func:`PyConfig_Get` در پایتون 3.13 و نسخه‌های قدیمی‌تر استفاده کرد." @@ -3160,8 +3335,8 @@ msgstr ":c:func:`!Py_SetProgramName()`: به جای آن، :c:member:`PyConfig.p msgid ":c:func:`!Py_SetPythonHome()`: Set :c:member:`PyConfig.home` instead." msgstr ":c:func:`!Py_SetPythonHome()`: به‌جای آن، :c:member:`PyConfig.home` را تنظیم کنید." -msgid ":c:func:`PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!warnings.filters` instead." -msgstr ":c:func:`PySys_ResetWarnOptions`: به جای آن، :data:`sys.warnoptions` و :data:`!warnings.filters` را پاک کنید." +msgid ":c:func:`!PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!warnings.filters` instead." +msgstr ":c:func:`!PySys_ResetWarnOptions`: به‌جای آن :data:`sys.warnoptions` و :data:`!warnings.filters` را پاک کنید." msgid "The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:`PyConfig` instead." msgstr "باید به‌جای آن از API :c:func:`Py_InitializeFromConfig` به همراه :c:type:`PyConfig` استفاده شود." @@ -3625,14 +3800,17 @@ msgstr "``PyMutex_IsLocked()`` : :c:func:`PyMutex_IsLocked`" msgid "The `pythoncapi-compat project`_ can be used to get most of these new functions on Python 3.13 and older." msgstr "می‌توان از `pythoncapi-compat project`_ برای به‌دست آوردن بیشتر این توابع جدید در پایتون 3.13 و نسخه‌های قدیمی‌تر استفاده کرد." -msgid "Notable changes in 3.14.1" -msgstr "تغییرات قابل توجه در 3.14.1" - -msgid "Add :c:func:`PyUnstable_ThreadState_SetStackProtection` and :c:func:`PyUnstable_ThreadState_ResetStackProtection` functions to set the stack protection base address and stack protection size of a Python thread state. (Contributed by Victor Stinner in :gh:`139653`.)" -msgstr "توابع :c:func:`PyUnstable_ThreadState_SetStackProtection` و :c:func:`PyUnstable_ThreadState_ResetStackProtection` برای تنظیم نشانی پایه‌ی محافظت از پشته و اندازه‌ی محافظت از پشته‌ی وضعیت یک نخ پایتون اضافه شدند. (مشارکت‌شده توسط Victor Stinner در :gh:`139653`.)" - msgid "Notable changes in 3.14.5" msgstr "تغییرات قابل توجه در 3.14.5" msgid "The incremental garbage collector shipped in Python 3.14.0-3.14.4 has been reverted back to the generational garbage collector from 3.13, due to a number of `reports `__ of significant memory pressure in production environments. See :ref:`whatsnew314-incremental-gc` for details." msgstr "زباله‌روب افزایشی که در پایتون 3.14.0-3.14.4 عرضه شده بود، به دلیل تعدادی `گزارش `__ مبنی بر فشار حافظه‌ی قابل‌توجه در محیط‌های عملیاتی، به زباله‌روب نسلی نسخه‌ی 3.13 بازگردانی شده است. برای جزئیات به :ref:`whatsnew314-incremental-gc` مراجعه کنید." + +#~ msgid ":c:type:`Py_UNICODE` type and the :c:macro:`!Py_UNICODE_WIDE` macro: Use :c:type:`wchar_t` instead." +#~ msgstr "نوع :c:type:`Py_UNICODE` و ماکروی :c:macro:`!Py_UNICODE_WIDE`: به‌جای آن از :c:type:`wchar_t` استفاده کنید." + +#~ msgid "Notable changes in 3.14.1" +#~ msgstr "تغییرات قابل توجه در 3.14.1" + +#~ msgid "Add :c:func:`PyUnstable_ThreadState_SetStackProtection` and :c:func:`PyUnstable_ThreadState_ResetStackProtection` functions to set the stack protection base address and stack protection size of a Python thread state. (Contributed by Victor Stinner in :gh:`139653`.)" +#~ msgstr "توابع :c:func:`PyUnstable_ThreadState_SetStackProtection` و :c:func:`PyUnstable_ThreadState_ResetStackProtection` برای تنظیم نشانی پایه‌ی محافظت از پشته و اندازه‌ی محافظت از پشته‌ی وضعیت یک نخ پایتون اضافه شدند. (مشارکت‌شده توسط Victor Stinner در :gh:`139653`.)" diff --git a/whatsnew/3.15.po b/whatsnew/3.15.po new file mode 100644 index 00000000..ddc80d18 --- /dev/null +++ b/whatsnew/3.15.po @@ -0,0 +1,2791 @@ +# Persian translations for Python package. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# Automatically generated, 2026. +# +# Translators: +# Sepehr Rasouli , 2026 +# arman mohebali , 2026 +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-10-08 09:24+0330\n" +"PO-Revision-Date: 2026-10-06 19:50+0330\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: fa\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.6\n" + +msgid "What's new in Python 3.15" +msgstr "نسخه ۳.۱۵ چه چیزهای جدیدی دارد" + +msgid "Editor" +msgstr "ویرایشگر" + +msgid "Hugo van Kemenade" +msgstr "Hugo van Kemenade" + +msgid "This article explains the new features in Python 3.15, compared to 3.14." +msgstr "این مقاله ویژگی‌های جدید پایتون ۳.۱۵ را در مقایسه با ۳.۱۴ توضیح می‌دهد." + +msgid "For full details, see the :ref:`changelog `." +msgstr "برای جزئیات کامل، به :ref:`فهرست تغییرات ` مراجعه کنید." + +msgid "Prerelease users should be aware that this document is currently in draft form. It will be updated substantially as Python 3.15 moves towards release, so it's worth checking back even after reading earlier versions." +msgstr "کاربران نسخه‌های پیش‌انتشار باید آگاه باشند که این سند در حال حاضر به صورت پیش‌نویس است. این سند هم‌زمان با نزدیک شدن پایتون ۳.۱۵ به مرحله‌ی انتشار به میزان قابل‌توجهی به‌روزرسانی خواهد شد، بنابراین حتی پس از خواندن نسخه‌های قبلی، ارزش بررسی مجدد را دارد." + +msgid "Summary -- Release highlights" +msgstr "خلاصه -- نکات برجسته‌ی انتشار" + +msgid "Python 3.15 will be the latest stable release of the Python programming language, with a mix of changes to the language, the implementation, and the standard library. The biggest changes include :ref:`lazy imports `, :ref:`frozendict ` and :ref:`sentinel ` builtins, :ref:`UTF-8 as the default encoding `, :ref:`unpacking in comprehensions `, and a :ref:`stable ABI for free-threaded builds `." +msgstr "پایتون ۳.۱۵ آخرین نسخه‌ی پایدار زبان برنامه‌نویسی پایتون خواهد بود که شامل ترکیبی از تغییرات در زبان، پیاده‌سازی و کتابخانه‌ی استاندارد است. بزرگ‌ترین تغییرات شامل :ref:`واردسازی تنبل `، :ref:`فرهنگ لغت‌های فریز شده ` و توابع توکار :ref:`نگهبان `، :ref:`استفاده از UTF-8 به عنوان کدگذاری پیش‌فرض `، :ref:`باز کردن بسته‌بندی در درک مجموعه‌ها `، و یک :ref:`ای‌بی‌آی پایدار برای بیز‌های رایگان از قفل (free-threaded) ` می‌شود." + +msgid "The library changes include a new :ref:`profiling package ` with :ref:`Tachyon `, a high-frequency statistical sampling profiler, :ref:`more color ` in command-line output, as well as the usual deprecations and removals, and improvements in user-friendliness and correctness." +msgstr "تغییرات کتابخانه شامل یک :ref:`بسته‌ی پروفایل‌گیری ` جدید با :ref:`Tachyon ` (یک پروفایل‌گیر نمونه‌برداری آماری با فرکانس بالا)، :ref:`رنگ‌های بیشتر ` در خروجی خط فرمان، و همچنین منسوخ‌سازی‌ها و حذف‌های معمول، و بهبودهایی در کاربرپسندی و درستی است." + +msgid "This article doesn't attempt to provide a complete specification of all new features, but instead gives a convenient overview. For full details refer to the documentation, such as the :ref:`Library Reference ` and :ref:`Language Reference `. To understand the complete implementation and design rationale for a change, refer to the PEP for a particular new feature; but note that PEPs usually are not kept up-to-date once a feature has been fully implemented." +msgstr "این مقاله تلاشی برای ارائه‌ی مشخصات کامل از همه‌ی ویژگی‌های جدید نمی‌کند، بلکه نمای کلی مناسبی را ارائه می‌دهد. برای جزئیات کامل به مستندات، مانند :ref:`مرجع کتابخانه ` و :ref:`مرجع زبان ` مراجعه کنید. برای درک پیاده‌سازی کامل و مبانی طراحی یک تغییر، به PEP مربوط به آن ویژگی خاص مراجعه کنید؛ اما توجه داشته باشید که معمولاً پس از پیاده‌سازی کامل یک ویژگی، PEPها به‌روز نگه داشته نمی‌شوند." + +msgid "See `Porting to Python 3.15`_ for guidance on upgrading from earlier versions of Python." +msgstr "برای راهنمایی در مورد ارتقا از نسخه‌های قبلی پایتون، به `Porting to Python 3.15`_ مراجعه کنید." + +msgid "Interpreter improvements:" +msgstr "بهبودهای مفسر:" + +msgid ":pep:`661`: :ref:`Add sentinel built-in type `" +msgstr ":pep:`661`: :ref:`افزودن نوع داده‌ی توکار نگهبان (sentinel) `" + +msgid ":pep:`686`: :ref:`Python now uses UTF-8 as the default encoding `" +msgstr ":pep:`686`: :ref:`پایتون اکنون از UTF-8 به عنوان کدگذاری پیش‌فرض استفاده می‌کند `" + +msgid ":pep:`798`: :ref:`Unpacking in comprehensions `" +msgstr ":pep:`798`: :ref:`Unpacking در درک مجموعه‌ها `" + +msgid ":pep:`810`: :ref:`Explicit lazy imports for faster startup times `" +msgstr ":pep:`810`: :ref:`واردات تنبل صریح برای زمان راه‌اندازی سریع‌تر `" + +msgid ":pep:`814`: :ref:`Add frozendict built-in type `" +msgstr ":pep:`814`: :ref:`افزودن نوع توکار frozendict `" + +msgid ":pep:`829`: :ref:`Package startup configuration files `" +msgstr ":pep:`829`: :ref:`پرونده‌های پیکربندی راه‌اندازی بسته‌ها `" + +msgid ":ref:`The experimental JIT compiler has been significantly upgraded `" +msgstr ":ref:`کامپایلر JIT آزمایشی به‌طور چشمگیری ارتقا یافته است `" + +msgid ":ref:`Improved error messages `" +msgstr ":ref:`پیام‌های خطای بهبودیافته `" + +msgid "Significant improvements in the standard library:" +msgstr "بهبودهای چشمگیر در کتابخانه‌ی استاندارد:" + +msgid ":pep:`799`: :ref:`A dedicated profiling package for organizing Python profiling tools `" +msgstr ":pep:`799`: :ref:`یک بسته‌ی تحلیل عملکرد اختصاصی برای سازماندهی ابزارهای تحلیل عملکرد پایتون `" + +msgid ":pep:`799`: :ref:`Tachyon: High-frequency statistical sampling profiler `" +msgstr ":pep:`799`: :ref:`تاکیون (Tachyon): تحلیل‌گر نمونه‌برداری آماری با فرکانس بالا `" + +msgid ":ref:`More color `" +msgstr ":ref:`رنگ‌های بیشتر `" + +msgid "New typing features:" +msgstr "ویژگی‌های جدید تایپینگ:" + +msgid ":pep:`728`: :ref:`TypedDict with typed extra items `" +msgstr ":pep:`728`: :ref:`TypedDict با اقلام اضافی تایپ‌شده `" + +msgid ":pep:`747`: :ref:`Annotating type forms with TypeForm `" +msgstr ":pep:`747`: :ref:`حاشیه‌نویسی فرم‌های نوع با TypeForm `" + +msgid ":pep:`800`: :ref:`Disjoint bases in the type system `" +msgstr ":pep:`800`: :ref:`پایه‌های مجزا در سیستم نوع `" + +msgid "C API improvements:" +msgstr "بهبودهای API زبان C:" + +msgid ":pep:`782`: :ref:`A new PyBytesWriter C API to create a Python bytes object `" +msgstr ":pep:`782`: :ref:`یک API جدید PyBytesWriter برای ایجاد یک شیء بایت پایتون `" + +msgid ":pep:`788`: :ref:`Protection against finalization in the C API `" +msgstr ":pep:`788`: :ref:`محافظت در برابر نهایی‌سازی در API زبان C `" + +msgid ":pep:`803`, :pep:`820 <820>`, :pep:`793 <793>`: :ref:`Stable ABI for free-threaded builds ` and related C API" +msgstr ":pep:`803`, :pep:`820 <820>`, :pep:`793 <793>`: :ref:`نسخه پایدار ABI برای نسخه‌های بدون نخ ` و API مرتبط زبان C" + +msgid "Build changes:" +msgstr "تغییرات ساخت:" + +msgid ":pep:`831`: :ref:`Frame pointers are enabled by default for improved system-level observability `" +msgstr ":pep:`831`: :ref:`نشانگرهای فریم به‌طور پیش‌فرض برای بهبود قابلیت مشاهده در سطح سیستم فعال می‌شوند `" + +msgid "Release changes:" +msgstr "تغییرات نسخه‌ی جدید:" + +msgid ":ref:`The official Windows 64-bit binaries now use the tail-calling interpreter `" +msgstr ":ref:`نسخه‌های رسمی ۶۴ بیتی ویندوز اکنون از مفسر فراخوانی تهی استفاده می‌کنند `" + +msgid "New features" +msgstr "ویژگی‌های جدید" + +msgid ":pep:`810`: Explicit lazy imports" +msgstr ":pep:`810`: ایمپورت‌های تنبل صریح" + +msgid "Large Python applications often suffer from slow startup times. A significant contributor to this problem is the import system: when a module is imported, Python must locate the file, read it from disk, compile it to bytecode, and execute all top-level code. For applications with deep dependency trees, this process can take seconds, even when most of the imported code is never actually used during a particular run." +msgstr "برنامه‌های بزرگ پایتون اغلب از زمان راه‌اندازی کند رنج می‌برند. عامل اصلی این مشکل، سیستم ایمپورت است: وقتی یک ماژول ایمپورت می‌شود، پایتون باید پرونده را پیدا کند، آن را از دیسک بخواند، به بایت‌کد کامپایل کند و تمام کد سطح بالا را اجرا کند. برای برنامه‌هایی با درخت‌های وابستگی عمیق، این فرایند می‌تواند ثانیه‌ها طول بکشد، حتی زمانی که بیشتر کدهای ایمپورت‌شده در طول یک اجرای خاص عملاً هرگز استفاده نمی‌شوند." + +msgid "Developers have worked around this by moving imports inside functions, using :mod:`importlib` to load modules on demand, or restructuring code to avoid unnecessary dependencies. These approaches work but make code harder to read and maintain, scatter import statements throughout the codebase, and require discipline to apply consistently." +msgstr "توسعه‌دهندگان با انتقال ایمپورت‌ها به داخل تابع‌ها، استفاده از :mod:`importlib` برای بارگذاری ماژول‌ها در صورت نیاز، یا بازسازی ساختار کد برای جلوگیری از وابستگی‌های غیرضروری، این مشکل را دور زده‌اند. این رویکردها کار می‌کنند اما خواندن و نگهداری کد را دشوارتر می‌کنند، دستورهای ایمپورت را در سراسر پایگاه کد پراکنده می‌کنند و برای اعمال مداوم به نظم نیاز دارند." + +msgid "Python now provides a cleaner solution through explicit :keyword:`lazy` imports using the new ``lazy`` soft keyword. When you mark an import as lazy, Python defers the actual module loading until the imported name is first used. This gives you the organizational benefits of declaring all imports at the top of the file while only paying the loading cost for modules you actually use." +msgstr "پایتون اکنون راه‌حل تمیزتری را از طریق ایمپورت‌های تنبل صریح با استفاده از :keyword:`lazy`، یعنی کلیدواژه‌ی نرم جدید ``lazy``، فراهم می‌کند. وقتی یک ایمپورت را به‌عنوان تنبل علامت‌گذاری می‌کنید، پایتون بارگذاری واقعی ماژول را تا زمان اولین استفاده از نام ایمپورت‌شده به تعویق می‌اندازد. این کار مزایای سازمانی اعلام تمام ایمپورت‌ها در بالای پرونده را به شما می‌دهد، در حالی که فقط هزینه‌ی بارگذاری را برای ماژول‌هایی که واقعاً استفاده می‌کنید پرداخت می‌کنید." + +msgid "The ``lazy`` keyword works with both ``import`` and ``from ... import`` statements. When you write ``lazy import heavy_module``, Python does not immediately load the module. Instead, it creates a lightweight proxy object. The actual module loading happens transparently when you first access the name:" +msgstr "کلیدواژه ``lazy`` با دستورهای ``import`` و ``from ... import`` کار می‌کند. وقتی می‌نویسید ``lazy import heavy_module``، پایتون بلافاصله ماژول را بارگذاری نمی‌کند. در عوض، یک شیء پراکسی سبک‌وزن ایجاد می‌کند. بارگذاری واقعی ماژول به صورت شفاف هنگام دسترسی اولیه‌ی شما به نام اتفاق می‌افتد:" + +#, fuzzy +#| msgid "" +#| "lazy import json\n" +#| "lazy from pathlib import Path\n" +#| "\n" +#| "print(\"Starting up...\") # json and pathlib not loaded yet\n" +#| "\n" +#| "data = json.loads('{\"key\": \"value\"}') # json loads here\n" +#| "p = Path(\".\") # pathlib loads here" +msgid "" +"lazy import json\n" +"lazy from pathlib import Path\n" +"\n" +"print(\"Starting up...\") # json and pathlib are not fully imported yet\n" +"\n" +"data = json.loads('{\"key\": \"value\"}') # json gets fully imported here\n" +"p = Path(\".\") # pathlib gets fully imported here" +msgstr "" +"lazy import json\n" +"lazy from pathlib import Path\n" +"\n" +"print(\"Starting up...\") # json and pathlib not loaded yet\n" +"\n" +"data = json.loads('{\"key\": \"value\"}') # json loads here\n" +"p = Path(\".\") # pathlib loads here" + +msgid "This mechanism is particularly useful for applications that import many modules at the top level but may only use a subset of them in any given run. The deferred loading reduces startup latency without requiring code restructuring or conditional imports scattered throughout the codebase." +msgstr "این مکانیزم به‌ویژه برای برنامه‌هایی مفید است که ماژول‌های زیادی را در سطح بالا ایمپورت می‌کنند اما ممکن است فقط زیرمجموعه‌ای از آن‌ها را در هر اجرای مشخصی استفاده کنند. بارگذاری به تعویق افتاده، تأخیر راه‌اندازی را بدون نیاز به بازسازی ساختار کد یا ایمپورت‌های شرطی پراکنده در سراسر پایگاه کد کاهش می‌دهد." + +msgid "In the case where loading a lazily imported module fails (for example, if the module does not exist), Python raises the exception at the point of first use rather than at import time. The associated traceback includes both the location where the name was accessed and the original import statement, making it straightforward to diagnose and debug the failure." +msgstr "در مواردی که بارگذاری یک ماژول ایمپورت‌شده‌ی تنبل با شکست مواجه شود (برای مثال، اگر ماژول وجود نداشته باشد)، پایتون استثنا را در نقطه‌ی اولین استفاده به جای زمان ایمپورت بالا می‌آورد. ردگیری مرتبط شامل هم مکانی است که به نام دسترسی پیدا شده و هم دستور اصلی ایمپورت، که عیب‌یابی و رفع خطا را ساده می‌کند." + +msgid "For cases where you want to enable lazy loading globally without modifying source code, Python provides the :option:`-X lazy_imports <-X>` command-line option and the :envvar:`PYTHON_LAZY_IMPORTS` environment variable. Both accept two values: ``all`` makes all imports lazy by default, and ``normal`` (the default) respects the ``lazy`` keyword in source code. The :func:`sys.set_lazy_imports` and :func:`sys.get_lazy_imports` functions allow changing and querying this mode at runtime." +msgstr "برای مواردی که می‌خواهید بارگذاری تنبل را به صورت سراسری و بدون تغییر کد منبع فعال کنید، پایتون گزینه‌ی خط فرمان :option:`-X lazy_imports <-X>` و متغیر محیطی :envvar:`PYTHON_LAZY_IMPORTS` را فراهم می‌کند. هر دو دو مقدار را می‌پذیرند: ``all`` همه ایمپورت‌ها را به طور پیش‌فرض تنبل می‌کند، و ``normal`` (پیش‌فرض) به کلیدواژه ``lazy`` در کد منبع احترام می‌گذارد. توابع :func:`sys.set_lazy_imports` و :func:`sys.get_lazy_imports` امکان تغییر و پرس‌وجوی این حالت را در ران‌تایم فراهم می‌کنند." + +msgid "For more selective control, :func:`sys.set_lazy_imports_filter` accepts a callable that determines whether a specific module should be loaded lazily. The filter receives three arguments: the importing module's name (or ``None``), the imported module's name, and the fromlist (or ``None`` for regular imports). It should return ``True`` to allow the import to be lazy, or ``False`` to force eager loading. This allows patterns like making only your own application's modules lazy while keeping third-party dependencies eager:" +msgstr "برای کنترل انتخابی‌تر، تابع :func:`sys.set_lazy_imports_filter` یک شیء فراخوانی‌پذیر را می‌پذیرد که تعیین می‌کند آیا یک ماژول خاص باید به صورت تنبل بارگذاری شود یا خیر. این فیلتر سه آرگومان دریافت می‌کند: نام ماژول ایمپورت‌کننده (یا ``None``)، نام ماژول ایمپورت‌شده، و fromlist (یا ``None`` برای ایمپورت‌های معمولی). این تابع باید ``True`` برگرداند تا به ایمپورت اجازه دهد تنبل باشد، یا ``False`` برگرداند تا بارگذاری اشتیاقی را اجبار کند. این امر الگوهایی مانند تنبل کردن فقط ماژول‌های برنامه‌ی خودتان و در عین حال حفظ وابستگی‌های شخص ثالث به صورت اشتیاقی را امکان‌پذیر می‌سازد:" + +msgid "" +"import sys\n" +"\n" +"def myapp_filter(importing, imported, fromlist):\n" +" return imported.startswith(\"myapp.\")\n" +"sys.set_lazy_imports_filter(myapp_filter)\n" +"sys.set_lazy_imports(\"all\")\n" +"\n" +"import myapp.slow_module # lazy (matches filter)\n" +"import json # eager (does not match filter)" +msgstr "" +"import sys\n" +"\n" +"def myapp_filter(importing, imported, fromlist):\n" +" return imported.startswith(\"myapp.\")\n" +"sys.set_lazy_imports_filter(myapp_filter)\n" +"sys.set_lazy_imports(\"all\")\n" +"\n" +"import myapp.slow_module # lazy (matches filter)\n" +"import json # eager (does not match filter)" + +msgid "The proxy type itself is available as :class:`types.LazyImportType` for code that needs to detect lazy imports programmatically." +msgstr "خود نوع پراکسی به عنوان :class:`types.LazyImportType` برای کدهایی که نیاز دارند ایمپورت‌های تنبل را به صورت برنامه‌نویسی تشخیص دهند، در دسترس است." + +msgid "There are some restrictions on where the ``lazy`` keyword can be used. Lazy imports are only permitted at module scope; using ``lazy`` inside a function, class body, or ``try``/``except``/``finally`` block raises a :exc:`SyntaxError`. Neither star imports nor future imports can be lazy (``lazy from module import *`` and ``lazy from __future__ import ...`` both raise :exc:`SyntaxError`)." +msgstr "برخی محدودیت‌ها در مورد جایی که می‌توان از کلیدواژه ``lazy`` استفاده کرد وجود دارد. ایمپورت‌های تنبل فقط در محدوده ماژول مجاز هستند؛ استفاده از ``lazy`` در داخل یک تابع، بدنه کلاس، یا بلوک ``try``/``except``/``finally`` یک :exc:`SyntaxError` بالا می‌آورد. نه ایمپورت‌های ستاره‌ای و نه ایمپورت‌های آینده نمی‌توانند تنبل باشند (``lazy from module import *`` و ``lazy from __future__ import ...`` هر دو :exc:`SyntaxError` بالا می‌آورند)." + +msgid "For code that cannot use the ``lazy`` keyword directly (for example, when supporting Python versions older than 3.15 while still using lazy imports on 3.15+), a module can define :attr:`~module.__lazy_modules__` as a container of fully qualified module name strings. Regular ``import`` statements for those modules are then treated as lazy, with the same semantics as the ``lazy`` keyword::" +msgstr "برای کدهایی که نمی‌توانند مستقیماً از کلیدواژه ``lazy`` استفاده کنند (برای مثال، هنگام پشتیبانی از نسخه‌های پایتون قدیمی‌تر از ۳.۱۵ در حالی که همچنان از ایمپورت‌های تنبل در ۳.۱۵+ استفاده می‌شود)، یک ماژول می‌تواند :attr:`~module.__lazy_modules__` را به عنوان ظرفی از رشته‌های نام ماژول کاملاً واجد شرایط تعریف کند. دستورهای معمولی ``import`` برای آن ماژول‌ها سپس به عنوان تنبل رفتار می‌شوند، با همان معناشناسی کلیدواژه ``lazy``::" + +msgid "" +"__lazy_modules__ = [\"json\", \"pathlib\"]\n" +"\n" +"import json # lazy\n" +"import os # still eager" +msgstr "" +"__lazy_modules__ = [\"json\", \"pathlib\"]\n" +"\n" +"import json # lazy\n" +"import os # still eager" + +msgid "(Contributed by Pablo Galindo Salgado and Dino Viehland in :gh:`142349`.)" +msgstr "(مشارکت‌داده‌شده توسط Pablo Galindo Salgado و Dino Viehland در :gh:`142349`.)" + +msgid ":pep:`810` for the full specification and rationale." +msgstr ":pep:`810` برای مشخصات کامل و توجیه منطقی." + +msgid ":pep:`814`: Add frozendict built-in type" +msgstr ":pep:`814`: افزودن نوع توکار frozendict" + +msgid "A new :term:`immutable` type, :class:`frozendict`, is added to the :mod:`builtins` module. It does not allow modification after creation. A :class:`!frozendict` is not a subclass of ``dict``; it inherits directly from ``object``. A :class:`!frozendict` is :term:`hashable` as long as all of its keys and values are hashable. A :class:`!frozendict` preserves insertion order, but comparison does not take order into account." +msgstr "یک نوع :term:`تغییرناپذیر ` جدید به نام :class:`frozendict` به ماژول :mod:`builtins` اضافه شده است. این نوع اجازه نمی‌دهد پس از ایجاد تغییری در آن ایجاد شود. یک شیء :class:`!frozendict` زیرکلاسی از ``dict`` نیست؛ بلکه مستقیماً از ``object`` ارث‌بری می‌کند. یک شیء :class:`!frozendict` تا زمانی که تمام کلیدها و مقادیر آن هش‌پذیر باشند، :term:`هش‌پذیر ` است. یک شیء :class:`!frozendict` ترتیب درج را حفظ می‌کند، اما مقایسه، ترتیب را در نظر نمی‌گیرد." + +msgid "For example::" +msgstr "برای مثال::" + +msgid "" +">>> a = frozendict(x=1, y=2)\n" +">>> a\n" +"frozendict({'x': 1, 'y': 2})\n" +">>> a['z'] = 3\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +" a['z'] = 3\n" +" ~^^^^^\n" +"TypeError: 'frozendict' object does not support item assignment\n" +">>> b = frozendict(y=2, x=1)\n" +">>> hash(a) == hash(b)\n" +"True\n" +">>> a == b\n" +"True" +msgstr "" +">>> a = frozendict(x=1, y=2)\n" +">>> a\n" +"frozendict({'x': 1, 'y': 2})\n" +">>> a['z'] = 3\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +" a['z'] = 3\n" +" ~^^^^^\n" +"TypeError: 'frozendict' object does not support item assignment\n" +">>> b = frozendict(y=2, x=1)\n" +">>> hash(a) == hash(b)\n" +"True\n" +">>> a == b\n" +"True" + +msgid "The following standard library modules have been updated to accept :class:`!frozendict`: :mod:`copy`, :mod:`decimal`, :mod:`json`, :mod:`marshal`, :mod:`plistlib` (only for serialization), :mod:`pickle`, :mod:`pprint` and :mod:`xml.etree.ElementTree`." +msgstr "ماژول‌های کتابخانه‌ی استاندارد زیر به‌روزرسانی شده‌اند تا :class:`!frozendict` را بپذیرند: :mod:`copy`، :mod:`decimal`، :mod:`json`، :mod:`marshal`، :mod:`plistlib` (فقط برای سریال‌سازی)، :mod:`pickle`، :mod:`pprint` و :mod:`xml.etree.ElementTree`." + +msgid ":func:`eval` and :func:`exec` accept :class:`!frozendict` for *globals*, and :func:`type` and :meth:`str.maketrans` accept :class:`!frozendict` for *dict*." +msgstr "توابع :func:`eval` و :func:`exec` نوع :class:`!frozendict` را برای *globals* می‌پذیرند و :func:`type` و :meth:`str.maketrans` نوع :class:`!frozendict` را برای *dict* می‌پذیرند." + +msgid "Code checking for :class:`dict` type using ``isinstance(arg, dict)`` can be updated to ``isinstance(arg, (dict, frozendict))`` to accept also the :class:`!frozendict` type, or to ``isinstance(arg, collections.abc.Mapping)`` to accept also other mapping types such as :class:`~types.MappingProxyType`." +msgstr "کدهایی که نوع :class:`dict` را با استفاده از ``isinstance(arg, dict)`` بررسی می‌کنند، می‌توانند به‌روزرسانی شوند تا نوع :class:`!frozendict` را نیز با ``isinstance(arg, (dict, frozendict))`` بپذیرند، یا با ``isinstance(arg, collections.abc.Mapping)`` سایر انواع نگاشت مانند :class:`~types.MappingProxyType` را نیز بپذیرند." + +msgid "(Contributed by Victor Stinner and Donghee Na in :gh:`141510`.)" +msgstr "(مشارکت‌کرده توسط Victor Stinner و Donghee Na در :gh:`141510`.)" + +msgid ":pep:`814` for the full specification and rationale." +msgstr "برای مشاهده‌ی مشخصات کامل و توجیه منطقی، به :pep:`814` مراجعه کنید." + +msgid ":pep:`661`: Add sentinel built-in type" +msgstr ":pep:`661`: افزودن نوع توکار sentinel" + +msgid "A new :class:`sentinel` type is added to the :mod:`builtins` module for creating unique sentinel values with a concise representation. Sentinel objects preserve identity when copied, support use in type expressions with the ``|`` operator, and can be pickled when they are importable by module and name." +msgstr "یک نوع :class:`sentinel` جدید به ماژول :mod:`builtins` اضافه شده است تا مقادیر نشانگر منحصر‌به‌فردی با بازنمایی مختصر ایجاد شود. اشیای نشانگر هویت خود را هنگام کپی شدن حفظ می‌کنند، از استفاده در عبارات نوع با عملگر ``|`` پشتیبانی می‌کنند و هنگامی که توسط ماژول و نام قابل درون‌ریزی باشند، قابل پیکل‌شدن (pickle) هستند." + +msgid "(Contributed by Jelle Zijlstra in :gh:`148829`; PEP 661 written by Tal Einat.)" +msgstr "(مشارکت‌کرده توسط Jelle Zijlstra در :gh:`148829`؛ PEP 661 توسط Tal Einat نوشته شده است.)" + +msgid ":pep:`661` for further details." +msgstr "برای جزئیات بیشتر به :pep:`661` مراجعه کنید." + +msgid ":pep:`799`: A dedicated profiling package" +msgstr ":pep:`799`: یک بسته‌ی اختصاصی برای پروفایل‌گیری" + +msgid "A new :mod:`profiling` module has been added to organize Python's built-in profiling tools under a single, coherent namespace. This module contains:" +msgstr "یک ماژول :mod:`profiling` جدید اضافه شده است تا ابزارهای پروفایل‌گیری توکار پایتون را تحت یک فضای نام واحد و منسجم سازمان‌دهی کند. این ماژول شامل موارد زیر است:" + +msgid ":mod:`profiling.tracing`: deterministic function-call tracing (relocated from ``cProfile``)." +msgstr ":mod:`profiling.tracing`: ردیابی قطعی فراخوانی تابع (منتقل‌شده از ``cProfile``)." + +msgid ":mod:`profiling.sampling`: a new statistical sampling profiler (named Tachyon)." +msgstr ":mod:`profiling.sampling`: یک پروفایل‌گیر نمونه‌برداری آماری جدید (به نام Tachyon)." + +msgid "The ``cProfile`` module remains as an alias for backwards compatibility. The :mod:`profile` module is deprecated and will be removed in Python 3.17." +msgstr "ماژول ``cProfile`` به عنوان یک نام مستعار برای سازگاری با نسخه‌های قبلی باقی می‌ماند. ماژول :mod:`profile` منسوخ شده است و در پایتون ۳.۱۷ حذف خواهد شد." + +msgid "(Contributed by Pablo Galindo and László Kiss Kollár in :gh:`138122`.)" +msgstr "(مشارکت‌کرده توسط Pablo Galindo و László Kiss Kollár در :gh:`138122`.)" + +msgid ":pep:`799` for further details." +msgstr "برای جزئیات بیشتر به :pep:`799` مراجعه کنید." + +msgid "Tachyon: High-frequency statistical sampling profiler" +msgstr "تاکیون: پروفایل‌گیر نمونه‌برداری آماری با فرکانس بالا" + +msgid "Tachyon profiler logo" +msgstr "لوگوی پروفایل‌گیر تاکیون" + +msgid "A new statistical sampling profiler (Tachyon) has been added as :mod:`profiling.sampling`. This profiler enables low-overhead performance analysis of running Python processes without requiring code modification or process restart." +msgstr "یک پروفایل‌گیر نمونه‌برداری آماری جدید (تاکیون) به :mod:`profiling.sampling` اضافه شده است. این پروفایل‌گیر امکان تحلیل عملکرد با سربار کم را روی فرایندهای در حال اجرای پایتون بدون نیاز به تغییر کد یا راه‌اندازی مجدد فرایند فراهم می‌کند." + +msgid "Unlike deterministic profilers (such as :mod:`profiling.tracing`) that instrument every function call, the sampling profiler periodically captures stack traces from running processes. This approach provides virtually zero overhead while achieving sampling rates of **up to 1,000,000 Hz**, making it the fastest sampling profiler available for Python (at the time of its contribution) and ideal for debugging performance issues in production environments. This capability is particularly valuable for debugging performance issues in production systems where traditional profiling approaches would be too intrusive." +msgstr "برخلاف پروفایل‌گیرهای قطعی (مانند :mod:`profiling.tracing`) که هر فراخوانی تابع را ابزارگذاری می‌کنند، پروفایل‌گیر نمونه‌برداری به‌طور دوره‌ای ردگیری پشته‌ها را از فرایندهای در حال اجرا ثبت می‌کند. این رویکرد عملاً سربار صفر را فراهم می‌کند و در عین حال نرخ‌های نمونه‌برداری **تا ۱,۰۰۰,۰۰۰ هرتز** را به دست می‌آورد، که آن را به سریع‌ترین پروفایل‌گیر نمونه‌برداری موجود برای پایتون (در زمان مشارکت آن) تبدیل می‌کند و برای اشکال‌زدایی مشکلات عملکرد در محیط‌های پروداکشن ایده‌آل است. این قابلیت به‌ویژه برای اشکال‌زدایی مشکلات عملکرد در سیستم‌های پروداکشن که روش‌های سنتی پروفایل‌گیری در آن‌ها بیش از حد مزاحم خواهند بود، بسیار باارزش است." + +msgid "Key features include:" +msgstr "ویژگی‌های کلیدی عبارتند از:" + +msgid "**Zero-overhead profiling**: Attach to any running Python process without affecting its performance. Ideal for production debugging where you can't afford to restart or slow down your application." +msgstr "**پروفایل‌گیری با سربار صفر**: به هر فرایند در حال اجرای پایتون بدون تأثیر بر عملکرد آن متصل شوید. ایده‌آل برای اشکال‌زدایی پروداکشن که در آن امکان راه‌اندازی مجدد یا کند کردن برنامه‌ی خود را ندارید." + +msgid "**No code modification required**: Profile existing applications without restart. Simply point the profiler at a running process by PID and start collecting data." +msgstr "**بدون نیاز به تغییر کد**: برنامه‌های موجود را بدون راه‌اندازی مجدد پروفایل کنید. به سادگی پروفایل‌گیر را با استفاده از PID روی یک فرایند در حال اجرا قرار دهید و شروع به جمع‌آوری داده‌ها کنید." + +msgid "**Flexible target modes**:" +msgstr "**حالت‌های هدف انعطاف‌پذیر**:" + +msgid "Profile running processes by PID (``attach``) - attach to already-running applications" +msgstr "پروفایل کردن فرایندهای در حال اجرا بر اساس PID (``attach``) - اتصال به برنامه‌های از پیش در حال اجرا" + +msgid "Run and profile scripts directly (``run``) - profile from the very start of execution" +msgstr "اجرا و پروفایل مستقیم اسکریپت‌ها (``run``) - پروفایل‌گیری از همان ابتدای اجرا" + +msgid "Execute and profile modules (``run -m``) - profile packages run as ``python -m module``" +msgstr "اجرا و پروفایل ماژول‌ها (``run -m``) - پروفایل‌گیری بسته‌های اجرا شده به صورت ``python -m module``" + +msgid "Capture a one-shot snapshot of a running process (``dump``) - print a traceback-style stack of every thread (or all asyncio tasks with ``--async-aware``). Useful for investigating hung processes." +msgstr "ثبت یک تصویر لحظه‌ای تک‌باره از یک فرایند در حال اجرا (``dump``) - چاپ پشته‌ای به سبک ردگیری از هر نخ (یا تمام وظایف asyncio با ``--async-aware``). مفید برای بررسی فرایندهای متوقف‌شده." + +msgid "**Multiple profiling modes**: Choose what to measure based on your performance investigation:" +msgstr "**چندین حالت پروفایل‌گیری**: بر اساس بررسی عملکرد خود، آنچه را که باید اندازه‌گیری شود انتخاب کنید:" + +msgid "**Wall-clock time** (``--mode wall``, default): Measures real elapsed time including I/O, network waits, and blocking operations. Use this to understand where your program spends calendar time, including when waiting for external resources." +msgstr "**زمان ساعت دیواری** (``--mode wall``، پیش‌فرض): زمان سپری‌شده‌ی واقعی شامل I/O، انتظارهای شبکه و عملیات‌های مسدود کننده را اندازه‌گیری می‌کند. از این مورد استفاده کنید تا بفهمید برنامه‌ی شما زمان تقویمی خود را کجا صرف می‌کند، از جمله زمانی که منتظر منابع خارجی است." + +msgid "**CPU time** (``--mode cpu``): Measures only active CPU execution time, excluding I/O waits and blocking. Use this to identify CPU-bound bottlenecks and optimize computational work." +msgstr "**زمان CPU** (``--mode cpu``): فقط زمان اجرای فعال CPU را اندازه‌گیری می‌کند و انتظارهای I/O و مسدود کننده را مستثنی می‌کند. از این مورد برای شناسایی گلوگاه‌های محدود به CPU و بهینه‌سازی کار محاسباتی استفاده کنید." + +msgid "**GIL-holding time** (``--mode gil``): Measures time spent holding Python's Global Interpreter Lock. Use this to identify which threads dominate GIL usage in multi-threaded applications." +msgstr "**زمان نگهداری GIL** (``--mode gil``): زمان صرف‌شده برای نگهداری قفل مفسر سراسری پایتون را اندازه‌گیری می‌کند. از این مورد برای شناسایی اینکه کدام نخ‌ها بر استفاده از GIL در برنامه‌های چندنخی تسلط دارند، استفاده کنید." + +msgid "**Exception handling time** (``--mode exception``): Captures samples only from threads with an active exception. Use this to analyze exception handling overhead." +msgstr "**زمان مدیریت استثنا** (``--mode exception``): نمونه‌ها را فقط از نخ‌هایی با یک استثنای فعال ثبت می‌کند. از این مورد برای تحلیل سربار مدیریت استثنا استفاده کنید." + +msgid "**Thread-aware profiling**: Option to profile all threads (``-a``) or just the main thread, essential for understanding multi-threaded application behavior." +msgstr "**پروفایل‌گیری آگاه از نخ**: گزینه‌ای برای پروفایل کردن تمام نخ‌ها (``-a``) یا فقط نخ اصلی، که برای درک رفتار برنامه‌ی چندنخی ضروری است." + +msgid "**Multiple output formats**: Choose the visualization that best fits your workflow:" +msgstr "**چندین قالب خروجی**: تجسمی را انتخاب کنید که به بهترین وجه با جریان کار شما سازگار است:" + +msgid "``--pstats``: Detailed tabular statistics compatible with :mod:`pstats`. Shows function-level timing with direct and cumulative samples. Best for detailed analysis and integration with existing Python profiling tools." +msgstr "``--pstats``: آمار جدول‌بندی‌شده‌ی تفصیلی سازگار با :mod:`pstats`. زمان‌بندی در سطح تابع را با نمونه‌های مستقیم و تجمعی نشان می‌دهد. بهترین گزینه برای تحلیل تفصیلی و ادغام با ابزارهای پروفایل‌گیری موجود پایتون." + +msgid "``--collapsed``: Generates collapsed stack traces (one line per stack). This format is specifically designed for creating flame graphs with external tools like Brendan Gregg's FlameGraph scripts or speedscope." +msgstr "``--collapsed``: ردگیری‌های پشته‌ی فشرده (یک سطر به ازای هر پشته) تولید می‌کند. این قالب به‌طور ویژه برای ایجاد نمودارهای شعله (flame graphs) با ابزارهای خارجی مانند اسکریپت‌های FlameGraph اثر Brendan Gregg یا speedscope طراحی شده است." + +msgid "``--flamegraph``: Generates a self-contained interactive HTML flame graph using D3.js. Opens directly in your browser for immediate visual analysis. Flame graphs show the call hierarchy where width represents time spent, making it easy to spot bottlenecks at a glance." +msgstr "``--flamegraph``: با استفاده از D3.js یک نمودار شعله‌ی تعاملی و خودمتککی HTML تولید می‌کند. برای تحلیل بصری فوری مستقیماً در مرورگر شما باز می‌شود. نمودارهای شعله، سلسله‌مراتب فراخوانی را نشان می‌دهند که در آن عرض نشان‌دهنده‌ی زمان صرف‌شده است و تشخیص سریع گلوگاه‌ها را آسان می‌کند." + +msgid "``--gecko``: Generates Gecko Profiler format compatible with `Firefox Profiler `__. Upload the output to Firefox Profiler for advanced timeline-based analysis with features like stack charts, markers, and network activity." +msgstr "``--gecko``: قالب پروفایل‌گیر Gecko سازگار با `Firefox Profiler `__ را تولید می‌کند. خروجی را برای تحلیل پیشرفته‌ی مبتنی بر خط زمانی با ویژگی‌هایی مانند نمودارهای پشته، نشانگرها و فعالیت شبکه، در Firefox Profiler بارگذاری کنید." + +msgid "``--heatmap``: Generates an interactive HTML heatmap visualization with line-level sample counts. Creates a directory with per-file heatmaps showing exactly where time is spent at the source code level." +msgstr "``--heatmap``: یک تصویرسازی نقلم حرارتی تعاملی HTML با تعداد نمونه‌ها در سطح سطر تولید می‌کند. پوشه‌ای با نقشه‌های حرارتی به ازای هر پرونده ایجاد می‌کند که دقیقا نشان می‌دهد زمان در سطح کد منبع کجا صرف شده است." + +msgid "**Live interactive mode**: Real-time TUI profiler with a top-like interface (``--live``). Monitor performance as your application runs with interactive sorting and filtering." +msgstr "**حالت تعاملی زنده**: پروفایل‌گیر TUI بلادرنگ با رابطی شبیه به top (``--live``). با اجرای برنامه‌ی خود، عملکرد را به همراه مرتب‌سازی و فیلترسازی تعاملی پایش کنید." + +msgid "**Async-aware profiling**: Profile async/await code with task-based stack reconstruction (``--async-aware``). See which coroutines are consuming time, with options to show only running tasks or all tasks including those waiting." +msgstr "**پروفایل‌گیری آگاه از ناهمگامی**: کد ناهمگام/await را با بازسازی پشته‌ی مبتنی بر وظیفه پروفایل کنید (``--async-aware``). ببینید کدام هم‌روال‌ها در حال مصرف زمان هستند، همراه با گزینه‌هایی برای نمایش فقط وظایف در حال اجرا یا تمام وظایف شامل آن‌هایی که در انتظارند." + +msgid "**Opcode-level profiling**: Gather bytecode opcode information for instruction-level profiling (``--opcodes``). Shows which bytecode instructions are executing, including specializations from the adaptive interpreter." +msgstr "**پروفایل‌گیری در سطح آپ‌کد**: اطلاعات آپ‌کد بایت‌کد را برای پروفایل‌گیری در سطح دستورالعمل جمع‌آوری کنید (``--opcodes``). نشان می‌دهد کدام دستورالعمل‌های بایت‌کد در حال اجرا هستند، از جمله ویژگی‌های تخصصی از مفسر تطبیقی." + +msgid "See :mod:`profiling.sampling` for the complete documentation, including all available output formats, profiling modes, and configuration options." +msgstr "برای مستندات کامل، از جمله تمام قالب‌های خروجی موجود، حالت‌های پروفایل‌گیری و گزینه‌های پیکربندی، :mod:`profiling.sampling` را ببینید." + +msgid "(Contributed by Pablo Galindo and László Kiss Kollár in :gh:`135953` and :gh:`138122`.)" +msgstr "(مشارکت‌داده‌شده توسط Pablo Galindo و László Kiss Kollár در :gh:`135953` و :gh:`138122`.)" + +msgid ":pep:`831`: Frame pointers enabled by default" +msgstr ":pep:`831`: اشاره‌گرهای قاب به‌طور پیش‌فرض فعال شدند" + +msgid "CPython is now built with frame pointers by default on platforms that support them. This uses the compiler flags ``-fno-omit-frame-pointer`` and ``-mno-omit-leaf-frame-pointer``, making native stack unwinding faster and more reliable for system profilers, debuggers, crash analysis tools, and eBPF-based observability tools." +msgstr "سی‌پایتون اکنون به‌طور پیش‌فرض روی پلتفرم‌هایی که از آن‌ها پشتیبانی می‌کنند با اشاره‌گرهای قاب ساخته می‌شود. این کار با استفاده از پرچم‌های کامپایلر ``-fno-omit-frame-pointer`` و ``-mno-omit-leaf-frame-pointer`` انجام می‌شود که باز کردن پشته‌ی بومی را برای پروفایل‌گیرهای سیستم، دیباگرها، ابزارهای تحلیل فروپاشی و ابزارهای قابلیت مشاهده‌ی مبتنی بر eBPF سریع‌تر و قابل‌اعتمادتر می‌کند." + +msgid "The flags are exposed through :mod:`sysconfig`, so extension modules built by tools that consume Python's build configuration inherit frame pointers by default. This propagation is intentional: mixed Python/native profiling needs an unbroken frame-pointer chain through the interpreter, extension modules, embedding applications, and native libraries." +msgstr "این پرچم‌ها از طریق :mod:`sysconfig` در معرض دید قرار می‌گیرند، بنابراین ماژول‌های توسعه‌ای ساخته‌شده توسط ابزارهایی که پیکربندی ساخت پایتون را مصرف می‌کنند، به‌طور پیش‌فرض اشاره‌گرهای قاب را به ارث می‌برند. این انتشار عمدی است: پروفایل‌گیری ترکیبی پایتون/بومی به یک زنجیره‌ی اشاره‌گر قاب شکسته‌نشده از طریق مفسر، ماژول‌های توسعه‌ای، برنامه‌های تعبیه‌شده و کتابخانه‌های بومی نیاز دارد." + +msgid "Third-party build backends and native build systems should preserve these flags when they consume Python's :mod:`sysconfig` values. Build systems that compile C, C++, Rust, or other native code without inheriting Python's compiler flags should enable equivalent frame-pointer flags themselves. A single native component built without frame pointers can break stack unwinding for the whole Python process." +msgstr "بک‌اند‌های ساخت شخص ثالث و سیستم‌های ساخت بومی باید هنگام مصرف مقادیر :mod:`sysconfig` پایتون، این پرچم‌ها را حفظ کنند. سیستم‌های ساختی که کد C، C++، Rust یا سایر کدهای بومی را بدون به ارث بردن پرچم‌های کامپایلر پایتون کامپایل می‌کنند، باید خودشان پرچم‌های اشاره‌گر قاب معادل را فعال کنند. یک جزء بومی واحد که بدون اشاره‌گرهای قاب ساخته شده باشد می‌تواند باز کردن پشته را برای کل فرایند پایتون مختل کند." + +msgid "(Contributed by Pablo Galindo Salgado and Savannah Ostrowski in :gh:`149201`; PEP 831 written by Pablo Galindo Salgado, Ken Jin, Savannah Ostrowski, and Diego Russo.)" +msgstr "(مشارکت‌داده‌شده توسط Pablo Galindo Salgado و Savannah Ostrowski در :gh:`149201`؛ PEP 831 نوشته‌شده توسط Pablo Galindo Salgado، Ken Jin، Savannah Ostrowski و Diego Russo.)" + +msgid ":pep:`831` for further details." +msgstr "برای جزئیات بیشتر :pep:`831` را ببینید." + +msgid ":pep:`798`: Unpacking in comprehensions" +msgstr ":pep:`798`: بازکردن بسته در درک‌ها (comprehensions)" + +msgid "List, set, and dictionary comprehensions, as well as generator expressions, now support unpacking with ``*`` and ``**``. This extends the unpacking syntax from :pep:`448` to comprehensions, providing a new syntax for combining an arbitrary number of iterables or dictionaries into a single flat structure. This new syntax is a direct alternative to nested comprehensions, :func:`itertools.chain`, and :meth:`itertools.chain.from_iterable`. For example::" +msgstr "درک‌های فهرست، مجموعه و دیکشنری و همچنین عبرات تولیدگر، اکنون از بازکردن بسته با ``*`` و ``**`` پشتیبانی می‌کنند. این کار نحو بازکردن بسته را از :pep:`448` به درک‌ها گسترش می‌دهد و نحوی جدید برای ترکیب تعداد دلخواهی از موارد پیمایش‌پذیر یا دیکشنری‌ها در یک ساختار تخت واحد فراهم می‌کند. این نحو جدید جایگزینی مستقیم برای درک‌های تو در تو، :func:`itertools.chain` و :meth:`itertools.chain.from_iterable` است. برای مثال::" + +msgid "" +">>> lists = [[1, 2], [3, 4], [5]]\n" +">>> [*L for L in lists] # equivalent to [x for L in lists for x in L]\n" +"[1, 2, 3, 4, 5]\n" +"\n" +">>> sets = [{1, 2}, {2, 3}, {3, 4}]\n" +">>> {*s for s in sets} # equivalent to {x for s in sets for x in s}\n" +"{1, 2, 3, 4}\n" +"\n" +">>> dicts = [{'a': 1}, {'b': 2}, {'a': 3}]\n" +">>> {**d for d in dicts} # equivalent to {k: v for d in dicts for k,v in d.items()}\n" +"{'a': 3, 'b': 2}" +msgstr "" +">>> lists = [[1, 2], [3, 4], [5]]\n" +">>> [*L for L in lists] # معادل [x for L in lists for x in L]\n" +"[1, 2, 3, 4, 5]\n" +"\n" +">>> sets = [{1, 2}, {2, 3}, {3, 4}]\n" +">>> {*s for s in sets} # معادل {x for s in sets for x in s}\n" +"{1, 2, 3, 4}\n" +"\n" +">>> dicts = [{'a': 1}, {'b': 2}, {'a': 3}]\n" +">>> {**d for d in dicts} # معادل {k: v for d in dicts for k,v in d.items()}\n" +"{'a': 3, 'b': 2}" + +msgid "Generator expressions can similarly use unpacking to yield values from multiple iterables::" +msgstr "عبارت‌های تولیدگر می‌توانند به طور مشابه از بازکردن بسته برای تولید مقادیر از چندین شیء پیمایش‌پذیر استفاده کنند::" + +msgid "" +">>> gen = (*L for L in lists) # equivalent to (x for L in lists for x in L)\n" +">>> list(gen)\n" +"[1, 2, 3, 4, 5]" +msgstr "" +">>> gen = (*L for L in lists) # معادل (x for L in lists for x in L)\n" +">>> list(gen)\n" +"[1, 2, 3, 4, 5]" + +msgid "This change also extends to asynchronous generator expressions, such that, for example, ``(*a async for a in agen())`` is equivalent to ``(x async for a in agen() for x in a)``." +msgstr "این تغییر همچنین به عبارت‌های تولیدگر ناهمگام گسترش می‌یابد؛ به‌طوری‌که برای مثال، ``(*a async for a in agen())`` معادل ``(x async for a in agen() for x in a)`` است." + +msgid "(Contributed by Adam Hartz in :gh:`143055`.)" +msgstr "(تهیه‌شده توسط Adam Hartz در :gh:`143055`.)" + +msgid ":pep:`798` for further details." +msgstr "برای جزئیات بیشتر به :pep:`798` مراجعه کنید." + +msgid ":pep:`829`: Package startup configuration files" +msgstr ":pep:`829`: پرونده‌های پیکربندی راه‌اندازی بسته" + +msgid "Loaded by the :mod:`site` module when ``-S`` is not given, :ref:`.pth files ` can contain lines that both extend :data:`sys.path` and execute arbitrary code when the line starts with ``import`` (followed by a space or tab). The latter functionality can be problematic, since it is difficult to know exactly what gets executed when Python starts up." +msgstr "پرونده‌های :ref:`.pth files ` که هنگام عدم ارائه‌ی گزینه‌ی ``-S`` توسط ماژول :mod:`site` بارگذاری می‌شوند، می‌توانند سطرهایی را در بر داشته باشند که هم :data:`sys.path` را گسترش داده و هم زمانی که سطر با ``import`` (به دنبال یک فاصله یا تب) آغاز می‌شود، کد دلخواهی را اجرا کنند. قابلیت دوم می‌تواند مشکل‌ساز باشد، زیرا دانستن دقیق آنچه هنگام راه‌اندازی پایتون اجرا می‌شود دشوار است." + +msgid "As a step towards improving the ability to audit pre-start executable code, Python 3.15 introduces :ref:`.start files ` which contain entry point specifications of the form ``pkg.mod:callable`` where ``pkg.mod`` is the import path to the given callable. When Python starts up, the callable is located and called with no arguments." +msgstr "به عنوان گامی در راستای بهبود قابلیت حسابرسی کد اجرایی پیش‌از‌راه‌اندازی، پایتون ۳.۱۵ پرونده‌های :ref:`.start files ` را معرفی می‌کند که حاوی مشخصات نقطه‌ی ورود به شکل ``pkg.mod:callable`` هستند؛ جایی که ``pkg.mod`` مسیر ایمپورت به فراخوانی‌پذیر مورد نظر است. هنگام راه‌اندازی پایتون، فراخوانی‌پذیر پیدا شده و بدون هیچ آرگومانی فراخوانی می‌شود." + +msgid "``import`` lines in :file:`.pth` files are silently deprecated. When a matching :file:`.start` file is found, ``import`` lines in :file:`.pth` files are ignored. There is no change to :data:`sys.path` extension lines in :file:`.pth` files." +msgstr "سطرهای ``import`` در پرونده‌های :file:`.pth` به صورت بی‌صدا منسوخ شده‌اند. هنگامی که یک پرونده‌ی :file:`.start` منطبق پیدا شود، سطرهای ``import`` در پرونده‌های :file:`.pth` نادیده گرفته می‌شوند. هیچ تغییری در سطرهای گسترش :data:`sys.path` در پرونده‌های :file:`.pth` ایجاد نشده است." + +msgid "The :mod:`site` module also provides :class:`site.StartupState` to batch startup processing for multiple site directories, ensuring all static path extensions are applied before any startup code is executed. :func:`site.main` uses an instance of this class implicitly to batch process all startup configuration files during normal interpreter startup. Callers needing the same batching behavior can build a :class:`~site.StartupState` directly and drive it with :meth:`~site.StartupState.addsitedir`, :meth:`~site.StartupState.addusersitepackages`, and :meth:`~site.StartupState.addsitepackages`, then call :meth:`~site.StartupState.process` once at the end of the batch." +msgstr "ماژول :mod:`site` همچنین :class:`site.StartupState` را فراهم می‌کند تا پردازش راه‌اندازی برای دایرکتوری‌های متعدد سایت به صورت دسته‌ای انجام شود و اطمینان حاصل گردد که تمامی توسعه‌های مسیر ایستا پیش از اجرای هرگونه کد راه‌اندازی اعمال می‌شوند. تابع :func:`site.main` به طور ضمنی از یک نمونه‌ی این کلاس برای پردازش دسته‌ای تمام پرونده‌های پیکربندی راه‌اندازی در طول راه‌اندازی معمولی مفسر استفاده می‌کند. فراخوانندگانی که به رفتار دسته‌ای مشابه نیاز دارند، می‌توانند یک :class:`~site.StartupState` را مستقیماً ساخته و آن را با :meth:`~site.StartupState.addsitedir`، :meth:`~site.StartupState.addusersitepackages` و :meth:`~site.StartupState.addsitepackages` هدایت کنند، سپس :meth:`~site.StartupState.process` را یک بار در انتهای دسته فراخوانی نمایند." + +msgid "(Contributed by Barry Warsaw in :gh:`148641` and :gh:`150228`.)" +msgstr "(تهیه‌شده توسط Barry Warsaw در :gh:`148641` و :gh:`150228`.)" + +msgid ":pep:`803`: Stable ABI for free-threaded builds" +msgstr ":pep:`803`: رابط دودویی کاربردی (ABI) پایدار برای ساخت‌های نخ‌آزاد" + +msgid "C extensions that target the :ref:`Stable ABI ` can now be compiled for the new *Stable ABI for Free-Threaded Builds* (also known as ``abi3t``), which makes them compatible with :term:`free-threaded builds ` of CPython. This usually requires some non-trivial changes to the source code; specifically:" +msgstr "افزونه‌های C که :ref:`رابط دودویی کاربردی پایدار (Stable ABI) ` را هدف قرار می‌دهند، اکنون می‌توانند برای *رابط دودویی کاربردی پایدار برای ساخت‌های نخ‌آزاد* جدید (که با نام ``abi3t`` نیز شناخته می‌شود) کامپایل شوند، که این امر آن‌ها را با :term:`ساخت‌های نخ‌آزاد ` سی‌پایتون سازگار می‌کند. این کار معمولاً مستلزم برخی تغییرات غیرپیش‌پاافتاده در کد منبع است؛ به طور خاص:" + +msgid "Switching to API introduced in :pep:`697` (Python 3.12), such as negative :c:member:`~PyType_Spec.basicsize` and :c:func:`PyObject_GetTypeData`, rather than making :c:type:`PyObject` part of the instance struct; and" +msgstr "تغییر به API معرفی‌شده در :pep:`697` (پایتون ۳.۱۲)، مانند :c:member:`~PyType_Spec.basicsize` و :c:func:`PyObject_GetTypeData` منفی، به جای قرار دادن :c:type:`PyObject` به عنوان بخشی از ساختار (struct) نمونه؛ و" + +msgid "Switching from a ``PyInit_`` function to a new export hook, :c:func:`PyModExport_* `, introduced for this purpose in :pep:`793`, with a new :c:type:`PySlot` structure introduced in :pep:`820`." +msgstr "تغییر از یک تابع ``PyInit_`` به یک قلاب اکسپورت جدید، یعنی :c:func:`PyModExport_* ` که برای همین منظور در :pep:`793` معرفی شده است، همراه با یک ساختار :c:type:`PySlot` جدید که در :pep:`820` معرفی شده است." + +msgid "Note that Stable ABI does not offer all the functionality that CPython has to offer. Extensions that cannot switch to ``abi3t`` should continue to build for the existing Stable ABI (``abi3``) and the version-specific ABI for free-threading (``cp315t``) separately." +msgstr "توجه داشته باشید که رابط دودویی کاربردی (ABI) پایدار تمام قابلیت‌هایی را که سی‌پایتون ارائه می‌دهد، فراهم نمی‌کند. افزونه‌هایی که نمی‌توانند به ``abi3t`` تغییر وضعیت دهند، باید به ساخت برای رابط دودویی کاربردی پایدار موجود (``abi3``) و رابط دودویی کاربردی مخصوص نسخه‌ی نخ‌آزاد (``cp315t``) به صورت جداگانه ادامه دهند." + +#, fuzzy +#| msgid "Stable ABI for Free-Threaded Builds should typically be selected in a build tool (such as, for example, Setuptools, meson-python, scikit-build-core, or Maturin). At the time of writing, these tools do **not** support ``abi3t``. If this is the case for your tool, compile for ``cp315t`` separately. If not using a build tool -- or when writing such a tool -- you can select ``abi3t`` by setting the macro :c:macro:`!Py_TARGET_ABI3T` as discussed in :ref:`abi3-compiling`." +msgid "Stable ABI for Free-Threaded Builds should typically be selected in a build tool. Tools with ``abi3t`` support include meson-python, scikit-build-core, and Maturin; see :ref:`abi3t-migration-build` for links to their documentation on ``abi3t`` builds. If your build tool does not support ``abi3t``, compile for ``cp315t`` separately. If not using a build tool -- or when writing such a tool -- you can select ``abi3t`` by setting the macro :c:macro:`!Py_TARGET_ABI3T` as discussed in :ref:`abi3-compiling`." +msgstr "رابط دودویی کاربردی پایدار برای ساخت‌های نخ‌آزاد معمولاً باید در یک ابزار ساخت (مانند Setuptools، meson-python، scikit-build-core، یا Maturin) انتخاب شود. در زمان نگارش این متن، این ابزارها از ``abi3t`` پشتیبانی **نمی‌کنند**. اگر ابزار شما نیز چنین است، برای ``cp315t`` به صورت جداگانه کامپایل کنید. اگر از ابزار ساخت استفاده نمی‌کنید — یا هنگام نوشتن چنین ابزاری — می‌توانید با تنظیم کلان‌دستور :c:macro:`!Py_TARGET_ABI3T` همان‌طور که در :ref:`abi3-compiling` بحث شد، ``abi3t`` را انتخاب کنید." + +msgid "A practical :ref:`migration guide ` for switching to ``abi3t`` is available. The community-maintained `Python Free-Threading Guide `__ provides examples of building and testing ``abi3t`` wheels." +msgstr "" + +msgid ":pep:`803` for further details." +msgstr "برای جزئیات بیشتر به :pep:`803` مراجعه کنید." + +msgid ":pep:`788`: Protecting the C API from interpreter finalization" +msgstr ":pep:`788`: محافظت از API زبان C در برابر نهایی‌سازی مفسر" + +msgid "In the C API, :term:`interpreter finalization ` can be problematic for many extensions, because :term:`attaching ` a thread state will permanently hang the thread, resulting in deadlocks and other spurious issues. Additionally, it has historically been impossible to safely check whether an interpreter is alive before using it, leading to crashes when a thread concurrently deletes an interpreter while another thread is trying to attach to it." +msgstr "در API زبان C، :term:`نهایی‌سازی مفسر ` می‌تواند برای بسیاری از افزونه‌ها مشکل‌ساز باشد، زیرا :term:`متصل کردن ` یک وضعیت نخ (thread state) باعث معلق ماندن دائمی نخ خواهد شد که به بن‌بست‌ها و سایر مسائل کاذب منجر می‌شود. علاوه بر این، از نظر تاریخی بررسی ایمن زنده‌بودن مفسر پیش از استفاده از آن غیرممکن بوده است و زمانی که یک نخ به طور همزمان مفسر را حذف می‌کند در حالی که نخ دیگری تلاش دارد به آن متصل شود، به خرابی‌ها (crashes) منجر می‌شود." + +msgid "There are now several new suites of APIs to circumvent these problems:" +msgstr "اکنون چندین مجموعه‌ی جدید از APIها برای دور زدن این مشکلات وجود دارد:" + +msgid ":ref:`Interpreter guards `, which prevent an interpreter from finalizing." +msgstr ":ref:`محافظ‌های مفسر ` که از نهایی‌سازی یک مفسر جلوگیری می‌کنند." + +msgid ":ref:`Interpreter views `, which allow thread-safe access to an interpreter that may be concurrently finalizing or deleted." +msgstr ":ref:`نماهای مفسر ` که امکان دسترسی نخ‌ایمن به مفسری را فراهم می‌کنند که ممکن است هم‌زمان در حال نهایی‌سازی یا حذف شدن باشد." + +msgid ":ref:`New APIs ` to automatically attach and detach thread states that come with built-in protection against finalization." +msgstr ":ref:`رابط‌های برنامه‌نویسی کاربردی جدید ` برای اتصال و جداسازی خودکار وضعیت‌های نخ که همراه با محافظت توکار در برابر نهایی‌سازی ارائه می‌شوند." + +msgid "In addition, APIs in the ``PyGILState`` family (most notably :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release`) have been :term:`soft deprecated`. There is **no** plan to remove them, and existing code will continue to work, but there will be no new ``PyGILState`` APIs in future versions of Python." +msgstr "علاوه بر این، رابط‌های برنامه‌نویسی کاربردی در خانواده‌ی ``PyGILState`` (به‌ویژه :c:func:`PyGILState_Ensure` و :c:func:`PyGILState_Release`) :term:`منسوخ نرم ` شده‌اند. هیچ برنامه‌ای برای حذف آن‌ها **وجود ندارد** و کدهای موجود به کار خود ادامه خواهند داد، اما در نسخه‌های آینده‌ی پایتون هیچ رابط برنامه‌نویسی کاربردی جدیدی از ``PyGILState`` ارائه نخواهد شد." + +msgid "(Contributed by Peter Bierma in :gh:`149101`.)" +msgstr "(مشارکت‌کرده توسط Peter Bierma در :gh:`149101`.)" + +msgid ":pep:`788` for further details." +msgstr "برای جزئیات بیشتر به :pep:`788` مراجعه کنید." + +msgid "Improved error messages" +msgstr "بهبود پیام‌های خطا" + +msgid "The interpreter now provides more helpful suggestions in :exc:`AttributeError` exceptions when accessing an attribute on an object that does not exist, but a similar attribute is available through one of its members." +msgstr "مفسر اکنون هنگام دسترسی به ویژگی‌ای روی یک شیء که وجود ندارد اما ویژگی مشابهی از طریق یکی از اعضای آن در دسترس است، پیشنهادهای مفیدتری را در استثناهای :exc:`AttributeError` ارائه می‌دهد." + +msgid "For example, if the object has an attribute that itself exposes the requested name, the error message will suggest accessing it via that inner attribute:" +msgstr "برای نمونه، اگر شیء دارای ویژگی‌ای باشد که خود نام درخواست‌شده را نمایش می‌دهد، پیام خطا پیشنهاد می‌کند که از طریق آن ویژگی درونی به آن دسترسی داشته باشید:" + +msgid "" +"from dataclasses import dataclass\n" +"from math import pi\n" +"\n" +"@dataclass\n" +"class Circle:\n" +" radius: float\n" +"\n" +" @property\n" +" def area(self) -> float:\n" +" return pi * self.radius**2\n" +"\n" +"class Container:\n" +" def __init__(self, inner: Circle) -> None:\n" +" self.inner = inner\n" +"\n" +"circle = Circle(radius=4.0)\n" +"container = Container(circle)\n" +"print(container.area)" +msgstr "" +"from dataclasses import dataclass\n" +"from math import pi\n" +"\n" +"@dataclass\n" +"class Circle:\n" +" radius: float\n" +"\n" +" @property\n" +" def area(self) -> float:\n" +" return pi * self.radius**2\n" +"\n" +"class Container:\n" +" def __init__(self, inner: Circle) -> None:\n" +" self.inner = inner\n" +"\n" +"circle = Circle(radius=4.0)\n" +"container = Container(circle)\n" +"print(container.area)" + +msgid "Running this code now produces a clearer suggestion:" +msgstr "اجرای این کد اکنون پیشنهاد روشن‌تری را ایجاد می‌کند:" + +msgid "" +"Traceback (most recent call last):\n" +" File \"example.py\", line 18, in \n" +" print(container.area)\n" +" ^^^^^^^^^^^^^^\n" +"AttributeError: 'Container' object has no attribute 'area'. Did you mean '.inner.area' instead of '.area'?" +msgstr "" +"Traceback (most recent call last):\n" +" File \"example.py\", line 18, in \n" +" print(container.area)\n" +" ^^^^^^^^^^^^^^\n" +"AttributeError: 'Container' object has no attribute 'area'. Did you mean '.inner.area' instead of '.area'?" + +msgid "When an :exc:`AttributeError` on a builtin type has no close match via Levenshtein distance, the error message now checks a static table of common method names from other languages (JavaScript, Java, Ruby, C#) and suggests the Python equivalent:" +msgstr "هنگامی که یک :exc:`AttributeError` روی یک نوع توکار تطابق نزدیکی از طریق فاصله‌ی لوونشتین ندارد، پیام خطا اکنون جدول ثابتی از نام‌های متدهای رایج از زبان‌های دیگر (جاوااسکریپت، جاوا، روبی، #C) را بررسی کرده و معادل پایتونی آن را پیشنهاد می‌کند:" + +msgid "" +">>> [1, 2, 3].push(4)\n" +"Traceback (most recent call last):\n" +"...\n" +"AttributeError: 'list' object has no attribute 'push'. Did you mean '.append'?\n" +"\n" +">>> 'hello'.toUpperCase()\n" +"Traceback (most recent call last):\n" +"...\n" +"AttributeError: 'str' object has no attribute 'toUpperCase'. Did you mean '.upper'?" +msgstr "" +">>> [1, 2, 3].push(4)\n" +"Traceback (most recent call last):\n" +"...\n" +"AttributeError: 'list' object has no attribute 'push'. Did you mean '.append'?\n" +"\n" +">>> 'hello'.toUpperCase()\n" +"Traceback (most recent call last):\n" +"...\n" +"AttributeError: 'str' object has no attribute 'toUpperCase'. Did you mean '.upper'?" + +msgid "When the Python equivalent is a language construct rather than a method, the hint describes the construct directly:" +msgstr "هنگامی که معادل پایتونی یک ساختار زبانی باشد تا یک متد، راهنمایی به‌طور مستقیم آن ساختار را توصیف می‌کند:" + +msgid "" +">>> {}.put(\"a\", 1)\n" +"Traceback (most recent call last):\n" +"...\n" +"AttributeError: 'dict' object has no attribute 'put'. Use d[k] = v." +msgstr "" +">>> {}.put(\"a\", 1)\n" +"Traceback (most recent call last):\n" +"...\n" +"AttributeError: 'dict' object has no attribute 'put'. Use d[k] = v." + +msgid "When a mutable method is called on an immutable type, the hint suggests the mutable counterpart:" +msgstr "هنگامی که یک متد تغییرپذیر روی یک نوع تغییرناپذیر فراخوانی می‌شود، راهنمایی، همتای تغییرپذیر آن را پیشنهاد می‌کند:" + +msgid "" +">>> (1, 2, 3).append(4)\n" +"Traceback (most recent call last):\n" +"...\n" +"AttributeError: 'tuple' object has no attribute 'append'. Did you mean to use a 'list' object?" +msgstr "" +">>> (1, 2, 3).append(4)\n" +"Traceback (most recent call last):\n" +"...\n" +"AttributeError: 'tuple' object has no attribute 'append'. Did you mean to use a 'list' object?" + +msgid "These hints also work for subclasses of builtin types." +msgstr "این راهنمایی‌ها برای زیرکلاس‌های انواع توکار نیز کار می‌کنند." + +msgid "(Contributed by Matt Van Horn in :gh:`146406`.)" +msgstr "(مشارکت‌کرده توسط Matt Van Horn در :gh:`146406`.)" + +msgid "The interpreter now tries to provide a suggestion when :func:`delattr` fails due to a missing attribute. When an attribute name that closely resembles an existing attribute is used, the interpreter will suggest the correct attribute name in the error message. For example:" +msgstr "مفسر اکنون هنگام ناموفق بودن تابع :func:`delattr` به دلیل یک ویژگی مفقود، تلاش می‌کند پیشنهادی ارائه دهد. هنگامی که از نام ویژگی‌ای استفاده می‌شود که شباهت زیادی به یک ویژگی موجود دارد، مفسر نام صحیح ویژگی را در پیام خطا پیشنهاد می‌کند. برای مثال:" + +msgid "" +">>> class A:\n" +"... pass\n" +">>> a = A()\n" +">>> a.abcde = 1\n" +">>> del a.abcdf\n" +"Traceback (most recent call last):\n" +"...\n" +"AttributeError: 'A' object has no attribute 'abcdf'. Did you mean: 'abcde'?" +msgstr "" +">>> class A:\n" +"... pass\n" +">>> a = A()\n" +">>> a.abcde = 1\n" +">>> del a.abcdf\n" +"Traceback (most recent call last):\n" +"...\n" +"AttributeError: 'A' object has no attribute 'abcdf'. Did you mean: 'abcde'?" + +msgid "(Contributed by Nikita Sobolev and Pranjal Prajapati in :gh:`136588`.)" +msgstr "(مشارکت‌کرده توسط نیکیتا سوبولِف (Nikita Sobolev) و پرانجال پرجاپاتی (Pranjal Prajapati) در :gh:`136588`.)" + +msgid "Several error messages incorrectly using the term \"argument\" have been corrected. (Contributed by Stan Ulbrych in :gh:`133382`.)" +msgstr "چندین پیام خطا که به‌طور نادرست از اصطلاح «آرگومان» استفاده کرده بودند، اصلاح شدند. (مشارکت‌کرده توسط استن اولبریخ (Stan Ulbrych) در :gh:`133382`.)" + +msgid "Other language changes" +msgstr "سایر تغییرات زبان" + +msgid "Python now uses UTF-8_ as the default encoding, independent of the system's environment. This means that I/O operations without an explicit encoding, for example, ``open('flying-circus.txt')``, will use UTF-8. UTF-8 is a widely-supported Unicode_ character encoding that has become a *de facto* standard for representing text, including nearly every webpage on the internet, many common file formats, programming languages, and more." +msgstr "پایتون اکنون از UTF-8_ به عنوان کدگذاری پیش‌فرض استفاده می‌کند که مستقل از محیط سیستم است. این بدان معناست که عملیات‌های ورودی/خروجی بدون کدگذاری صریح، برای مثال ``open('flying-circus.txt')``، از UTF-8 استفاده خواهند کرد. فرمت UTF-8 یک کدگذاری نویسه‌ی یونیکد_ است که به‌طور گسترده پشتیبانی می‌شود و به استاندارد *دو فَتو* (de facto) برای نمایش متن، از جمله تقریباً هر صفحه‌وب در اینترنت، بسیاری از فرمت‌های متداول پرونده، زبان‌های برنامه‌نویسی و موارد دیگر تبدیل شده است." + +msgid "This only applies when no ``encoding`` argument is given. For best compatibility between versions of Python, ensure that an explicit ``encoding`` argument is always provided. The :ref:`opt-in encoding warning ` can be used to identify code that may be affected by this change. The special ``encoding='locale'`` argument uses the current locale encoding, and has been supported since Python 3.10." +msgstr "این امر فقط زمانی اعمال می‌شود که هیچ آرگومان ``encoding`` داده نشده باشد. برای بهترین سازگاری بین نسخه‌های مختلف پایتون، مطمئن شوید که همیشه یک آرگومان صریح ``encoding`` فراهم شده است. هشدار کدگذاری اختیاری :ref:`opt-in encoding warning ` می‌تواند برای شناسایی کدهایی که ممکن است تحت تأثیر این تغییر قرار گیرند، استفاده شود. آرگومان ویژه‌ی ``encoding='locale'`` از کدگذاری locale فعلی استفاده می‌کند و از پایتون ۳.۱۰ به بعد پشتیبانی می‌شود." + +msgid "To retain the previous behaviour, Python's UTF-8 mode may be disabled with the :envvar:`PYTHONUTF8=0 ` environment variable or the :option:`-X utf8=0 <-X>` command-line option." +msgstr "برای حفظ رفتار قبلی، حالت UTF-8 پایتون را می‌توان با متغیر محیطی :envvar:`PYTHONUTF8=0 ` یا گزینه‌ی خط فرمان :option:`-X utf8=0 <-X>` غیرفعال کرد." + +msgid "(Contributed by Adam Turner in :gh:`133711`; PEP 686 written by Inada Naoki.)" +msgstr "(مشارکت از Adam Turner در :gh:`133711`؛ PEP 686 نوشته‌ی Inada Naoki.)" + +msgid ":pep:`686` for further details." +msgstr "برای جزئیات بیشتر به :pep:`686` مراجعه کنید." + +msgid "The interpreter help (such as ``python --help``) is now in color. This can be controlled by :ref:`environment variables `. (Contributed by Hugo van Kemenade in :gh:`148766`.)" +msgstr "راهنمای مفسر (مانند ``python --help``) اکنون رنگی است. این ویژگی را می‌توان توسط :ref:`متغیرهای محیطی ` کنترل کرد. (مشارکت‌کرده توسط هوگو فان کمناده (Hugo van Kemenade) در :gh:`148766`.)" + +msgid "Unraisable exceptions are now highlighted with color by default. This can be controlled by :ref:`environment variables `. (Contributed by Peter Bierma in :gh:`134170`.)" +msgstr "استثناهای غیرقابل‌پرتاب اکنون به‌طور پیش‌فرض با رنگ برجسته می‌شوند. این ویژگی را می‌توان توسط :ref:`متغیرهای محیطی ` کنترل کرد. (مشارکت‌کرده توسط پیتر بیرما (Peter Bierma) در :gh:`134170`.)" + +msgid "More color in :ref:`argparse `, :ref:`ast `, :ref:`calendar `, :ref:`difflib `, :ref:`http.server `, :ref:`pickletools `, :ref:`PyREPL tab completion `, :ref:`python --help `, :ref:`sqlite3 `, :ref:`timeit `, :ref:`tokenize `, :ref:`unraisable exceptions ` and :term:`stdlib` (ast, compileall, doctest, gzip, inspect, json.tool, pdb, profiling.sampling, random, regrtest, sqlite3, timeit, tokenize, trace, unittest, uuid, zipapp, zipfile) CLI help." +msgstr "رنگ‌های بیشتر در راهنمای CLI مربوط به :ref:`argparse `، :ref:`ast `، :ref:`calendar `، :ref:`difflib `، :ref:`http.server `، :ref:`pickletools `، :ref:`PyREPL tab completion `، :ref:`python --help `، :ref:`sqlite3 `، :ref:`timeit `، :ref:`tokenize `، :ref:`unraisable exceptions ` و :term:`کتابخانه‌ی استاندارد ` (ast، compileall، doctest، gzip، inspect، json.tool، pdb، profiling.sampling، random، regrtest، sqlite3، timeit، tokenize، trace، unittest، uuid، zipapp، zipfile)." + +msgid "The :meth:`~object.__repr__` of :class:`ImportError` and :class:`ModuleNotFoundError` now shows \"name\" and \"path\" as ``name=`` and ``path=`` if they were given as keyword arguments at construction time. (Contributed by Serhiy Storchaka, Oleg Iarygin, and Yoav Nir in :gh:`74185`.)" +msgstr "متد :meth:`~object.__repr__` برای :class:`ImportError` و :class:`ModuleNotFoundError` اکنون اگر «name» و «path» در زمان ساخت به عنوان آرگومان‌های کلیدواژه‌ای داده شده باشند، آن‌ها را به صورت ``name=`` و ``path=`` نمایش می‌دهد. (مشارکت‌کرده توسط سرهی استورچاک (Serhiy Storchaka)، اولگ ایاریگین (Oleg Iarygin) و یوآو نیر (Yoav Nir) در :gh:`74185`.)" + +msgid "The :attr:`~object.__dict__` and :attr:`!__weakref__` descriptors now use a single descriptor instance per interpreter, shared across all types that need them. This speeds up class creation, and helps avoid reference cycles. (Contributed by Petr Viktorin in :gh:`135228`.)" +msgstr "توصیف‌گرهای :attr:`~object.__dict__` و :attr:`!__weakref__` اکنون از یک نمونه توصیف‌گر واحد به ازای هر مفسر استفاده می‌کنند که در میان تمام انواعی که به آن‌ها نیاز دارند به اشتراک گذاشته می‌شود. این کار باعث سرعت بخشیدن به ایجاد کلاس و کمک به جلوگیری از چرخه‌های ارجاع می‌شود. (مشارکت‌کرده توسط پتر ویکتورین (Petr Viktorin) در :gh:`135228`.)" + +msgid "The :option:`-W` option and the :envvar:`PYTHONWARNINGS` environment variable can now specify regular expressions instead of literal strings to match the warning message and the module name, if the corresponding field starts and ends with a forward slash (``/``). (Contributed by Serhiy Storchaka in :gh:`134716`.)" +msgstr "گزینه‌ی :option:`-W` و متغیر محیطی :envvar:`PYTHONWARNINGS` اکنون می‌توانند به جای رشته‌های لفظی، عبارات باقاعده را برای تطبیق پیام هشدار و نام ماژول مشخص کنند، مشروط بر اینکه فیلد مربوطه با یک اسلش رو به جلو (``/``) شروع و تمام شود. (مشارکت‌کرده توسط سرهی استورچاک (Serhiy Storchaka) در :gh:`134716`.)" + +msgid "Functions that take timestamp or timeout arguments now accept any real numbers (such as :class:`~decimal.Decimal` and :class:`~fractions.Fraction`), not only integers or floats, although this does not improve precision. (Contributed by Serhiy Storchaka in :gh:`67795`.)" +msgstr "توابعی که آرگومان‌های زمان‌سنجی (timestamp) یا مهلت زمانی (timeout) را می‌پذیرند، اکنون هر عدد حقیقی (مانند :class:`~decimal.Decimal` و :class:`~fractions.Fraction`) را می‌پذیرند، نه فقط اعداد صحیح یا اعشاری، اگرچه این کار دقت را بهبود نمی‌بخشد. (مشارکت‌کرده توسط سرهی استورچاک (Serhiy Storchaka) در :gh:`67795`.)" + +msgid "Added :meth:`bytearray.take_bytes(n=None, /) ` to take bytes out of a :class:`bytearray` without copying. This enables optimizing code which must return :class:`bytes` after working with a mutable buffer of bytes such as data buffering, network protocol parsing, encoding, decoding, and compression. Common code patterns which can be optimized with :func:`~bytearray.take_bytes` are listed below." +msgstr "تابع :meth:`bytearray.take_bytes(n=None, /) ` اضافه شد تا بتوان بایت‌ها را از یک :class:`bytearray` بدون نیاز به کپی‌کردن برداشت. این امر بهینه‌سازی کدهایی را که باید پس از کار با یک بافر تغییرپذیر از بایت‌ها (مانند بافرکردن داده‌ها، تجزیه‌ی پروتکل شبکه، کدگذاری، کدگشایی و فشرده‌سازی) شیء :class:`bytes` را برگردانند، ممکن می‌سازد. الگوهای رایج کد که می‌توانند با :func:`~bytearray.take_bytes` بهینه‌سازی شوند در ادامه فهرست شده‌اند." + +msgid "Suggested optimizing refactors" +msgstr "بازطراحی‌های بهینه‌سازی پیشنهادی" + +msgid "Description" +msgstr "شرح" + +msgid "Old" +msgstr "قدیمی" + +msgid "New" +msgstr "جدید" + +msgid "Return :class:`bytes` after working with :class:`bytearray`" +msgstr "برگرداندن :class:`bytes` پس از کار با :class:`bytearray`" + +msgid "" +"def read() -> bytes:\n" +" buffer = bytearray(1024)\n" +" ...\n" +" return bytes(buffer)" +msgstr "" +"def read() -> bytes:\n" +" buffer = bytearray(1024)\n" +" ...\n" +" return bytes(buffer)" + +msgid "" +"def read() -> bytes:\n" +" buffer = bytearray(1024)\n" +" ...\n" +" return buffer.take_bytes()" +msgstr "" +"def read() -> bytes:\n" +" buffer = bytearray(1024)\n" +" ...\n" +" return buffer.take_bytes()" + +msgid "Empty a buffer getting the bytes" +msgstr "خالی کردن یک بافر و دریافت بایت‌ها" + +msgid "" +"buffer = bytearray(1024)\n" +"...\n" +"data = bytes(buffer)\n" +"buffer.clear()" +msgstr "" +"buffer = bytearray(1024)\n" +"...\n" +"data = bytes(buffer)\n" +"buffer.clear()" + +msgid "" +"buffer = bytearray(1024)\n" +"...\n" +"data = buffer.take_bytes()" +msgstr "" +"buffer = bytearray(1024)\n" +"...\n" +"data = buffer.take_bytes()" + +msgid "Split a buffer at a specific separator" +msgstr "بخش‌بندی یک بافر در یک جداکننده‌ی مشخص" + +msgid "" +"buffer = bytearray(b'abc\\ndef')\n" +"n = buffer.find(b'\\n')\n" +"data = bytes(buffer[:n + 1])\n" +"del buffer[:n + 1]\n" +"assert data == b'abc\\n'\n" +"assert buffer == bytearray(b'def')" +msgstr "" +"buffer = bytearray(b'abc\\ndef')\n" +"n = buffer.find(b'\\n')\n" +"data = bytes(buffer[:n + 1])\n" +"del buffer[:n + 1]\n" +"assert data == b'abc\\n'\n" +"assert buffer == bytearray(b'def')" + +msgid "" +"buffer = bytearray(b'abc\\ndef')\n" +"n = buffer.find(b'\\n')\n" +"data = buffer.take_bytes(n + 1)" +msgstr "" +"buffer = bytearray(b'abc\\ndef')\n" +"n = buffer.find(b'\\n')\n" +"data = buffer.take_bytes(n + 1)" + +msgid "Split a buffer at a specific separator; discard after the separator" +msgstr "بخش‌بندی یک بافر در یک جداکننده‌ی مشخص؛ دور انداختن محتوای پس از جداکننده" + +msgid "" +"buffer = bytearray(b'abc\\ndef')\n" +"n = buffer.find(b'\\n')\n" +"data = bytes(buffer[:n])\n" +"buffer.clear()\n" +"assert data == b'abc'\n" +"assert len(buffer) == 0" +msgstr "" +"buffer = bytearray(b'abc\\ndef')\n" +"n = buffer.find(b'\\n')\n" +"data = bytes(buffer[:n])\n" +"buffer.clear()\n" +"assert data == b'abc'\n" +"assert len(buffer) == 0" + +msgid "" +"buffer = bytearray(b'abc\\ndef')\n" +"n = buffer.find(b'\\n')\n" +"buffer.resize(n)\n" +"data = buffer.take_bytes()" +msgstr "" +"buffer = bytearray(b'abc\\ndef')\n" +"n = buffer.find(b'\\n')\n" +"buffer.resize(n)\n" +"data = buffer.take_bytes()" + +msgid "(Contributed by Cody Maloney in :gh:`139871`.)" +msgstr "(مشارکت‌کرده توسط Cody Maloney در :gh:`139871`.)" + +msgid "Many functions related to compiling or parsing Python code, such as :func:`compile`, :func:`ast.parse`, :func:`symtable.symtable`, and :func:`importlib.abc.InspectLoader.source_to_code`, now allow the module name to be passed. It is needed to unambiguously :ref:`filter ` syntax warnings by module name. (Contributed by Serhiy Storchaka in :gh:`135801`.)" +msgstr "بسیاری از توابع مرتبط با کامپایل یا تجزیه‌ی کد پایتون، مانند :func:`compile`، :func:`ast.parse`، :func:`symtable.symtable` و :func:`importlib.abc.InspectLoader.source_to_code`، اکنون اجازه می‌دهند نام ماژول ارسال شود. این کار برای :ref:`فیلتر کردن ` هشدار‌های نحو بر اساس نام ماژول به شکلی بدون ابهام مورد نیاز است. (مشارکت‌کرده توسط Serhiy Storchaka در :gh:`135801`.)" + +msgid "Allowed defining the *__dict__* and *__weakref__* :ref:`__slots__ ` for any class. (Contributed by Serhiy Storchaka in :gh:`41779`.)" +msgstr "امکان تعریف :ref:`__slots__ `\\ های *__dict__* و *__weakref__* برای هر کلاسی فراهم شد. (مشارکت‌کرده توسط Serhiy Storchaka در :gh:`41779`.)" + +msgid "Allowed defining any :ref:`__slots__ ` for a class derived from :class:`tuple` (including classes created by :func:`collections.namedtuple`). (Contributed by Serhiy Storchaka in :gh:`41779`.)" +msgstr "امکان تعریف هر :ref:`__slots__ ` برای یک کلاس مشتق‌شده از :class:`tuple` (از جمله کلاس‌های ایجادشده توسط :func:`collections.namedtuple`) فراهم شد. (مشارکت‌کرده توسط Serhiy Storchaka در :gh:`41779`.)" + +msgid "The :class:`slice` type now supports subscription, making it a :term:`generic type`. (Contributed by James Hilton-Balfe in :gh:`128335`.)" +msgstr "نوع :class:`slice` اکنون از زیرنویسی پشتیبانی می‌کند و آن را به یک :term:`نوع عام ` تبدیل می‌کند. (مشارکت‌کرده توسط James Hilton-Balfe در :gh:`128335`.)" + +msgid "The class :class:`memoryview` now supports the :c:expr:`float complex` and :c:expr:`double complex` C types: formatting characters ``'Zf'`` and ``'Zd'`` respectively. (Contributed by Victor Stinner in :gh:`146151` and :gh:`148675`.)" +msgstr "کلاس :class:`memoryview` اکنون از انواع C پیش‌فرض :c:expr:`float complex` و :c:expr:`double complex` پشتیبانی می‌کند: به ترتیب با نویسه‌های قالب‌بندی ``'Zf'`` و ``'Zd'``. (مشارکت‌کرده توسط Victor Stinner در :gh:`146151` و :gh:`148675`.)" + +msgid "Allow the *count* argument of :meth:`bytes.replace` to be a keyword. (Contributed by Stan Ulbrych in :gh:`147856`.)" +msgstr "اجازه دهید آرگومان (argument) *count* در متد :meth:`bytes.replace` به عنوان یک کلیدواژه (keyword) پذیرفته شود. (توسط Stan Ulbrych در :gh:`147856` مشارکت داده شده است.)" + +msgid "Unary plus is now accepted in :keyword:`match` literal patterns, mirroring the existing support for unary minus. (Contributed by Bartosz Sławecki in :gh:`145239`.)" +msgstr "علامت مثبت یک‌عملوندی (unary) اکنون در الگوهای لفظی (literal) :keyword:`match` پذیرفته می‌شود و از پشتیبانی موجود برای منفی یک‌عملوندی تقلید می‌کند. (توسط Bartosz Sławecki در :gh:`145239` مشارکت داده شده است.)" + +msgid "The import system now acquires per-module locks in hierarchical order (parent packages before their submodules). This fixes a long-standing deadlock where one thread importing ``pkg.sub`` and another importing ``pkg.sub.mod`` could each block the other when ``pkg/sub/__init__.py`` imports ``pkg.sub.mod``. (Contributed by Gregory P. Smith in :gh:`83065`.)" +msgstr "سیستم ایمپورت (import) اکنون قفل‌های هر ماژول را به ترتیب سلسله‌مراتبی (بسته‌های والد پیش از زیرماژول‌هایشان) به‌دست می‌آورد (acquire). این کار یک بن‌بست (deadlock) دیرینه را برطرف می‌کند که در آن یک نخ (thread) در حال ایمپورت کردن (importing) ``pkg.sub`` و نخی دیگر در حال ایمپورت کردن ``pkg.sub.mod`` می‌توانستند در صورتی که ``pkg/sub/__init__.py`` ماژول ``pkg.sub.mod`` را ایمپورت کند، یکدیگر را مسدود کنند. (توسط Gregory P. Smith در :gh:`83065` مشارکت داده شده است.)" + +msgid "File names of Stable ABI extensions that use the ``.so`` suffix may now include a multiarch tuple, for example, ``foo.abi3-x86-64-linux-gnu.so``. This permits stable ABI extensions for multiple architectures to be co-installed into the same directory, without clashing with each other, as regular dynamic extensions do. (Contributed by Stefano Rivera in :gh:`122931`.)" +msgstr "نام پرونده‌های (file) افزونه‌های Stable ABI که از پسوند ``.so`` استفاده می‌کنند اکنون ممکن است شامل یک چندمعماری (multiarch tuple) باشد، برای نمونه ``foo.abi3-x86-64-linux-gnu.so``. این امر به افزونه‌های پایدار (stable) ABI اجازه می‌دهد تا برای معماری‌های چندگانه در یک پوشه (directory) مشترک نصب شوند، بدون اینکه مانند افزونه‌های پویای (dynamic) معمولی با یکدیگر تداخل داشته باشند. (توسط Stefano Rivera در :gh:`122931` مشارکت داده شده است.)" + +msgid "The ``__cached__`` attribute on modules, which was deprecated since version 3.13, is no longer set or taken into consideration by the import system or standard library. Use :attr:`__spec__.cached ` instead. (Contributed by Brett Cannon in :gh:`97879`.)" +msgstr "ویژگی (attribute) ``__cached__`` روی ماژول‌ها که از نسخه‌ی ۳.۱۳ منسوخ شده بود، دیگر توسط سیستم ایمپورت (import) یا کتابخانه‌ی استاندارد تنظیم (set) نشده یا در نظر گرفته نمی‌شود. به جای آن از :attr:`__spec__.cached ` استفاده کنید. (توسط Brett Cannon در :gh:`97879` مشارکت داده شده است.)" + +msgid "Note that the :attr:`~module.__loader__` and :attr:`~module.__package__` attributes are also deprecated and scheduled for removal." +msgstr "توجه داشته باشید که ویژگی‌های (attributes) :attr:`~module.__loader__` و :attr:`~module.__package__` نیز منسوخ (deprecated) شده‌اند و برای حذف برنامه‌ریزی شده‌اند." + +msgid "Default interactive shell" +msgstr "پوسته‌ی (shell) تعاملی (interactive) پیش‌فرض" + +msgid "Tab completions are now colored by object kind, based on :pypi:`fancycompleter`. Set :envvar:`PYTHON_BASIC_COMPLETER` to fall back to :mod:`rlcompleter`. Color can also be controlled by :ref:`environment variables `. (Contributed by Antonio Cuni and Pablo Galindo in :gh:`130472`.)" +msgstr "تکمیل تب (Tab completions) اکنون بر اساس :pypi:`fancycompleter` و بر حسب نوع شیء (object) رنگ‌آمیزی می‌شوند. برای بازگشت به :mod:`rlcompleter`، متغیر :envvar:`PYTHON_BASIC_COMPLETER` را تنظیم (set) کنید. همچنین رنگ را می‌توان توسط :ref:`environment variables ` کنترل کرد. (توسط Antonio Cuni و Pablo Galindo در :gh:`130472` مشارکت داده شده است.)" + +msgid "Tab completion now suggests module attributes in ``from ... import`` statements. Attributes can only be suggested once the module is imported, so :term:`stdlib` modules are imported automatically, while for other modules the completer offers to import them when :kbd:`Tab` is pressed a second time. (Contributed by Loïc Simon and Pablo Galindo in :gh:`140870`.)" +msgstr "تکمیل تب (Tab completion) اکنون ویژگی‌های (attributes) ماژول (module) را در دستورات (statements) ``from ... import`` پیشنهاد می‌کند. ویژگی‌ها تنها پس از ایمپورت (import) شدن ماژول قابل پیشنهاد هستند، بنابراین ماژول‌های :term:`stdlib` به طور خودکار ایمپورت می‌شوند، در حالی که برای سایر ماژول‌ها، تکمیل‌کننده پیشنهاد می‌کند که وقتی کلید :kbd:`Tab` برای بار دوم فشرده می‌شود، آن‌ها را ایمپورت کند. (توسط Loïc Simon و Pablo Galindo در :gh:`140870` مشارکت داده شده است.)" + +msgid "New modules" +msgstr "ماژول‌های (modules) جدید" + +msgid "math.integer" +msgstr "math.integer" + +msgid "This module provides access to the mathematical functions for integer arguments (:pep:`791`). (Contributed by Serhiy Storchaka in :gh:`81313`.)" +msgstr "این ماژول (module) دسترسی به توابع (functions) ریاضی را برای آرگومان‌های (arguments) عدد صحیح (integer) فراهم می‌کند (:pep:`791`). (توسط Serhiy Storchaka در :gh:`81313` مشارکت داده شده است.)" + +msgid "Improved modules" +msgstr "ماژول‌های (modules) بهبودیافته" + +msgid "argparse" +msgstr "argparse" + +msgid "The :class:`~argparse.BooleanOptionalAction` action now supports single-dash long options and alternate prefix characters. (Contributed by Serhiy Storchaka in :gh:`138525`.)" +msgstr "اکشن (action) :class:`~argparse.BooleanOptionalAction` اکنون از گزینه‌های طولانی خط تیره تکی و نویسه‌های (characters) پیشوند جایگزین پشتیبانی می‌کند. (توسط Serhiy Storchaka در :gh:`138525` مشارکت داده شده است.)" + +msgid "Changed the *suggest_on_error* parameter of :class:`argparse.ArgumentParser` to default to ``True``. This enables suggestions for mistyped arguments by default. (Contributed by Jakob Schluse in :gh:`140450`.)" +msgstr "مقدار پیش‌فرض پارامتر (parameter) *suggest_on_error* در :class:`argparse.ArgumentParser` به ``True`` تغییر یافت. این کار پیشنهادها را برای آرگومان‌های (arguments) اشتباه تایپ‌شده به طور پیش‌فرض فعال می‌کند. (توسط Jakob Schluse در :gh:`140450` مشارکت داده شده است.)" + +msgid "Added backtick markup support in :class:`~argparse.ArgumentParser` description and epilog text to highlight inline code when color output is enabled. (Contributed by Savannah Ostrowski in :gh:`142390`.)" +msgstr "پشتیبانی از نشانه‌گذاری بک‌تیک در متن توضیحات و پایانی (epilog) :class:`~argparse.ArgumentParser` اضافه شد تا هنگام فعال بودن خروجی رنگی، کد درون‌خطی برجسته شود. (توسط Savannah Ostrowski در :gh:`142390` مشارکت داده شده است.)" + +msgid "Extended backtick markup to argument ``help`` text and added support for double backticks (RST inline-literal style). (Contributed by Hugo van Kemenade in :gh:`149375`.)" +msgstr "نشانه‌گذاری بک‌تیک به متن ``help`` آرگومان (argument) گسترش یافت و پشتیبانی از بک‌تیک‌های دوگانه (سبک RST inline-literal) اضافه شد. (توسط Hugo van Kemenade در :gh:`149375` مشارکت داده شده است.)" + +msgid "array" +msgstr "array" + +msgid "Support the :c:expr:`float complex` and :c:expr:`double complex` C types: formatting characters ``'Zf'`` and ``'Zd'`` respectively. (Contributed by Victor Stinner in :gh:`146151` and :gh:`148675`.)" +msgstr "پشتیبانی از انواع (types) C به نام‌های :c:expr:`float complex` و :c:expr:`double complex`: نویسه‌های (characters) قالب‌بندی به ترتیب ``'Zf'`` و ``'Zd'``. (توسط Victor Stinner در :gh:`146151` و :gh:`148675` مشارکت داده شده است.)" + +msgid "Support half-floats (16-bit IEEE 754 binary interchange format): formatting character ``'e'``. (Contributed by Sergey B Kirpichev in :gh:`146238`.)" +msgstr "پشتیبانی از اعداد اعشاری نیم‌دقت (فرمت تبادل دودویی ۱۶ بیتی IEEE 754): نویسه‌ی قالب‌بندی ``'e'``. (مشارکت‌کننده: Sergey B Kirpichev در :gh:`146238`.)" + +msgid "The :data:`array.typecodes` type changed from :class:`str` to :class:`tuple` to support type codes longer than 1 character (``Zf`` and ``Zd``). (Contributed by Victor Stinner in :gh:`148675`.)" +msgstr "نوع داده‌ی :data:`array.typecodes` از :class:`str` به :class:`tuple` تغییر کرد تا از کدهای نوع طولانی‌تر از ۱ نویسه (``Zf`` و ``Zd``) پشتیبانی کند. (مشارکت‌کننده: Victor Stinner در :gh:`148675`.)" + +msgid "ast" +msgstr "ast" + +msgid "Add *color* parameter to :func:`~ast.dump`. If ``True``, the returned string is syntax highlighted using ANSI escape sequences. If ``False`` (the default), colored output is always disabled. (Contributed by Stan Ulbrych in :gh:`148981`.)" +msgstr "پارامتر *color* به :func:`~ast.dump` اضافه شد. اگر ``True`` باشد، رشته‌ی بازگردانده‌شده با استفاده از دنباله‌های گریز ANSI برجسته‌سازی نحوی می‌شود. اگر ``False`` باشد (پیش‌فرض)، خروجی رنگی همیشه غیرفعال است. (مشارکت‌کننده: Stan Ulbrych در :gh:`148981`.)" + +msgid "The :ref:`command-line ` output is now syntax highlighted by default. This can be :ref:`controlled using environment variables `. (Contributed by Stan Ulbrych in :gh:`148981`.)" +msgstr "خروجی :ref:`command-line ` اکنون به‌طور پیش‌فرض برجسته‌سازی نحوی می‌شود. این کار را می‌توان :ref:`با استفاده از متغیرهای محیطی کنترل کرد `. (مشارکت‌کننده: Stan Ulbrych در :gh:`148981`.)" + +msgid "asyncio" +msgstr "asyncio" + +msgid "Added :meth:`TaskGroup.cancel ` to allow early termination of a task group, for instance, when the goal of the tasks has been achieved or their services are no longer needed. Previously this would involve unintuitive boilerplate such as an extra task raising a custom exception which is then suppressed as it exits the task group. (Contributed by John Belmonte in :gh:`127214`.)" +msgstr "متد :meth:`TaskGroup.cancel ` اضافه شد تا امکان پایان زودهنگام یک گروه وظیفه فراهم شود؛ برای مثال، زمانی که هدف وظایف محقق شده است یا خدمات آن‌ها دیگر مورد نیاز نیست. پیش از این، این کار مستلزم کدهای پیش‌ساخته‌ی غیرشهودی مانند یک وظیفه‌ی اضافی بود که یک استثنای سفارشی را ایجاد می‌کند و سپس با خروج از گروه وظیفه، سرکوب می‌شود. (مشارکت‌کننده: John Belmonte در :gh:`127214`.)" + +msgid "base64" +msgstr "base64" + +msgid "Added the *pad* parameter in :func:`~base64.z85encode`. (Contributed by Hauke Dämpfling in :gh:`143103`.)" +msgstr "پارامتر *pad* به :func:`~base64.z85encode` اضافه شد. (مشارکت‌کننده: Hauke Dämpfling در :gh:`143103`.)" + +msgid "Added the *padded* parameter in :func:`~base64.b32encode`, :func:`~base64.b32decode`, :func:`~base64.b32hexencode`, :func:`~base64.b32hexdecode`, :func:`~base64.b64encode`, :func:`~base64.b64decode`, :func:`~base64.urlsafe_b64encode`, and :func:`~base64.urlsafe_b64decode`. (Contributed by Serhiy Storchaka in :gh:`73613`.)" +msgstr "پارامتر *padded* به :func:`~base64.b32encode`، :func:`~base64.b32decode`، :func:`~base64.b32hexencode`، :func:`~base64.b32hexdecode`، :func:`~base64.b64encode`، :func:`~base64.b64decode`، :func:`~base64.urlsafe_b64encode` و :func:`~base64.urlsafe_b64decode` اضافه شد. (مشارکت‌کننده: Serhiy Storchaka در :gh:`73613`.)" + +msgid "Added the *wrapcol* parameter in :func:`~base64.b16encode`, :func:`~base64.b32encode`, :func:`~base64.b32hexencode`, :func:`~base64.b64encode`, :func:`~base64.b85encode`, and :func:`~base64.z85encode`. (Contributed by Serhiy Storchaka in :gh:`143214` and :gh:`146431`.)" +msgstr "پارامتر *wrapcol* به :func:`~base64.b16encode`، :func:`~base64.b32encode`، :func:`~base64.b32hexencode`، :func:`~base64.b64encode`، :func:`~base64.b85encode` و :func:`~base64.z85encode` اضافه شد. (مشارکت‌کننده: Serhiy Storchaka در :gh:`143214` و :gh:`146431`.)" + +msgid "Added the *ignorechars* parameter in :func:`~base64.b16decode`, :func:`~base64.b32decode`, :func:`~base64.b32hexdecode`, :func:`~base64.b64decode`, :func:`~base64.b85decode`, and :func:`~base64.z85decode`. (Contributed by Serhiy Storchaka in :gh:`144001` and :gh:`146431`.)" +msgstr "پارامتر *ignorechars* به :func:`~base64.b16decode`، :func:`~base64.b32decode`، :func:`~base64.b32hexdecode`، :func:`~base64.b64decode`، :func:`~base64.b85decode` و :func:`~base64.z85decode` اضافه شد. (مشارکت‌کننده: Serhiy Storchaka در :gh:`144001` و :gh:`146431`.)" + +msgid "Added the *canonical* parameter in :func:`~base64.b32decode`, :func:`~base64.b32hexdecode`, :func:`~base64.b64decode`, :func:`~base64.a85decode`, :func:`~base64.b85decode`, and :func:`~base64.z85decode`, to reject encodings with non-zero padding bits or other non-canonical forms. (Contributed by Gregory P. Smith in :gh:`146311`.)" +msgstr "پارامتر *canonical* به :func:`~base64.b32decode`، :func:`~base64.b32hexdecode`، :func:`~base64.b64decode`، :func:`~base64.a85decode`، :func:`~base64.b85decode` و :func:`~base64.z85decode` اضافه شد تا کدهای با بیت‌های پُرکننده‌ی غیرصفر یا سایر فرم‌های غیرکانونیکال را رد کند. (مشارکت‌کننده: Gregory P. Smith در :gh:`146311`.)" + +msgid "binascii" +msgstr "binascii" + +msgid "Added functions for Base32 encoding:" +msgstr "توابع برای کدگذاری Base32 اضافه شدند:" + +msgid ":func:`~binascii.b2a_base32` and :func:`~binascii.a2b_base32`" +msgstr ":func:`~binascii.b2a_base32` و :func:`~binascii.a2b_base32`" + +msgid "(Contributed by James Seo in :gh:`146192`.)" +msgstr "(مشارکت‌کننده: James Seo در :gh:`146192`.)" + +msgid "Added functions for Ascii85, Base85, and Z85 encoding:" +msgstr "توابع برای کدگذاری Ascii85، Base85 و Z85 اضافه شدند:" + +msgid ":func:`~binascii.b2a_ascii85` and :func:`~binascii.a2b_ascii85`" +msgstr ":func:`~binascii.b2a_ascii85` و :func:`~binascii.a2b_ascii85`" + +msgid ":func:`~binascii.b2a_base85` and :func:`~binascii.a2b_base85`" +msgstr ":func:`~binascii.b2a_base85` و :func:`~binascii.a2b_base85`" + +msgid "(Contributed by James Seo and Serhiy Storchaka in :gh:`101178`.)" +msgstr "(مشارکت‌کرده توسط جیمز سو (James Seo) و سرهی استورچاک (Serhiy Storchaka) در :gh:`101178`.)" + +msgid "Added the *padded* parameter in :func:`~binascii.b2a_base32`, :func:`~binascii.a2b_base32`, :func:`~binascii.b2a_base64`, and :func:`~binascii.a2b_base64`. (Contributed by Serhiy Storchaka in :gh:`73613`.)" +msgstr "پارامتر *padded* به :func:`~binascii.b2a_base32`، :func:`~binascii.a2b_base32`، :func:`~binascii.b2a_base64` و :func:`~binascii.a2b_base64` اضافه شد. (مشارکت‌کرده توسط سرهی استورچاک (Serhiy Storchaka) در :gh:`73613`.)" + +msgid "Added the *wrapcol* parameter in :func:`~binascii.b2a_base64`. (Contributed by Serhiy Storchaka in :gh:`143214`.)" +msgstr "پارامتر *wrapcol* به :func:`~binascii.b2a_base64` اضافه شد. (مشارکت‌کرده توسط سرهی استورچاک (Serhiy Storchaka) در :gh:`143214`.)" + +msgid "Added the *alphabet* parameter in :func:`~binascii.b2a_base64` and :func:`~binascii.a2b_base64`. (Contributed by Serhiy Storchaka in :gh:`145980`.)" +msgstr "پارامتر *alphabet* به :func:`~binascii.b2a_base64` و :func:`~binascii.a2b_base64` اضافه شد. (مشارکت‌کرده توسط سرهی استورچاک (Serhiy Storchaka) در :gh:`145980`.)" + +msgid "Added the *ignorechars* parameter in :func:`~binascii.a2b_hex`, :func:`~binascii.unhexlify`, and :func:`~binascii.a2b_base64`. (Contributed by Serhiy Storchaka in :gh:`144001` and :gh:`146431`.)" +msgstr "پارامتر *ignorechars* به :func:`~binascii.a2b_hex`، :func:`~binascii.unhexlify` و :func:`~binascii.a2b_base64` اضافه شد. (مشارکت‌کرده توسط سرهی استورچاک (Serhiy Storchaka) در :gh:`144001` و :gh:`146431`.)" + +msgid "Added the *canonical* parameter in :func:`~binascii.a2b_base64`, to reject encodings with non-zero padding bits. (Contributed by Gregory P. Smith in :gh:`146311`.)" +msgstr "پارامتر *canonical* به :func:`~binascii.a2b_base64` اضافه شد تا کدنوشته‌های دارای بیت‌های پُراکنده‌ی غیرصفر را رد کند. (مشارکت‌کرده توسط گرگوری پی. اسمیت (Gregory P. Smith) در :gh:`146311`.)" + +msgid "calendar" +msgstr "گاه‌شماری" + +msgid ":mod:`calendar`'s :ref:`command-line ` text output has more color. This can be controlled with :ref:`environment variables `. (Contributed by Hugo van Kemenade in :gh:`148352`.)" +msgstr "خروجی متنی خط فرمان :ref:`command-line ` ماژول :mod:`calendar` رنگ بیشتری دارد. این ویژگی را می‌توان با :ref:`environment variables ` کنترل کرد. (مشارکت‌کرده توسط هوگو وان کمیناد (Hugo van Kemenade) در :gh:`148352`.)" + +msgid "The :mod:`calendar`'s :ref:`command-line ` HTML output now accepts the year-month option: ``python -m calendar -t html 2009 06``. (Contributed by Pål Grønås Drange in :gh:`140212`.)" +msgstr "خروجی HTML خط فرمان :ref:`command-line ` ماژول :mod:`calendar` اکنون گزینه‌ی سال-ماه را می‌پذیرد: ``python -m calendar -t html 2009 06``. (مشارکت‌کرده توسط پال گروناس درانژ (Pål Grønås Drange) در :gh:`140212`.)" + +msgid "Calendar pages generated by the :class:`calendar.HTMLCalendar` class now support dark mode and have been migrated to the HTML5 standard for improved accessibility. (Contributed by Jiahao Li and Hugo van Kemenade in :gh:`137634`.)" +msgstr "صفحات تقویم تولیدشده توسط کلاس :class:`calendar.HTMLCalendar` اکنون از حالت تاریک پشتیبانی می‌کنند و برای بهبود دسترسی‌پذیری به استاندارد HTML5 مهاجرت کرده‌اند. (مشارکت‌کرده توسط جیاهاو لی (Jiahao Li) و هوگو وان کمیناد (Hugo van Kemenade) در :gh:`137634`.)" + +msgid "collections" +msgstr "مجموعه‌ها (collections)" + +msgid "Added :meth:`!collections.Counter.__xor__` and :meth:`!collections.Counter.__ixor__` to compute the symmetric difference between :class:`~collections.Counter` objects. (Contributed by Raymond Hettinger in :gh:`138682`.)" +msgstr "متدهای :meth:`!collections.Counter.__xor__` و :meth:`!collections.Counter.__ixor__` برای محاسبه‌ی تفاضل متقارن بین اشیای :class:`~collections.Counter` اضافه شدند. (مشارکت‌کرده توسط ریموند هتینگر (Raymond Hettinger) در :gh:`138682`.)" + +msgid "concurrent.futures" +msgstr "concurrent.futures" + +msgid "Improved error reporting when a child process in a :class:`concurrent.futures.ProcessPoolExecutor` terminates abruptly. The resulting traceback will now tell you the PID and exit code of the terminated process. (Contributed by Jonathan Berg in :gh:`139486`.)" +msgstr "گزارش خطا هنگام خاتمه‌ی ناگهانی یک فرایند فرزند در :class:`concurrent.futures.ProcessPoolExecutor` بهبود یافته است. ردگیری (traceback) حاصل اکنون شناسه فرایند (PID) و کد خروج فرایند خاتمه‌یافته را به شما می‌گوید. (مشارکت‌کرده توسط جاناتان برگ (Jonathan Berg) در :gh:`139486`.)" + +msgid "contextlib" +msgstr "contextlib" + +msgid "Added support for arbitrary descriptors :meth:`!__enter__`, :meth:`!__exit__`, :meth:`!__aenter__`, and :meth:`!__aexit__` in :class:`~contextlib.ExitStack` and :class:`contextlib.AsyncExitStack`, for consistency with the :keyword:`with` and :keyword:`async with` statements. (Contributed by Serhiy Storchaka in :gh:`144386`.)" +msgstr "پشتیبانی از توصیف‌گرهای دلخواه :meth:`!__enter__`، :meth:`!__exit__`، :meth:`!__aenter__` و :meth:`!__aexit__` در :class:`~contextlib.ExitStack` و :class:`contextlib.AsyncExitStack`، برای سازگاری با دستورهای :keyword:`with` و :keyword:`async with` اضافه شد. (مشارکت‌کرده توسط سرهی استورچاک (Serhiy Storchaka) در :gh:`144386`.)" + +msgid ":class:`~contextlib.ContextDecorator` and :class:`~contextlib.AsyncContextDecorator` (and therefore :func:`~contextlib.contextmanager` and :func:`~contextlib.asynccontextmanager` used as decorators) now detect generator functions, coroutine functions, and asynchronous generator functions and keep the context manager open across iteration or await. Previously the context manager exited as soon as the generator or coroutine object was created. (Contributed by Alex Grönholm & Gregory P. Smith in :gh:`125862`.)" +msgstr "توابع :class:`~contextlib.ContextDecorator` و :class:`~contextlib.AsyncContextDecorator` (و در نتیجه :func:`~contextlib.contextmanager` و :func:`~contextlib.asynccontextmanager` که به عنوان دکوراتور استفاده می‌شوند) اکنون توابع تولیدگر (generator)، توابع هم‌روال (coroutine) و توابع تولیدگر ناهمگام را شناسایی کرده و مدیر زمینه را در طول پیمایش یا await باز نگه می‌دارند. پیش از این، مدیر زمینه به محض ایجاد شیء تولیدگر یا هم‌روال خارج می‌شد. (مشارکت‌کرده توسط الکس گرونهولم (Alex Grönholm) و گرگوری پی. اسمیت (Gregory P. Smith) در :gh:`125862`.)" + +msgid "ctypes" +msgstr "ctypes" + +msgid "Change the :py:attr:`~ctypes._SimpleCData._type_` of :class:`~ctypes.c_float_complex`, :class:`~ctypes.c_double_complex` and :class:`~ctypes.c_longdouble_complex` from ``F``, ``D`` and ``G`` to ``Zf``, ``Zd`` and ``Zg`` for compatibility with NumPy. (Contributed by Victor Stinner in :gh:`148675`.)" +msgstr "مقدار :py:attr:`~ctypes._SimpleCData._type_` برای :class:`~ctypes.c_float_complex`، :class:`~ctypes.c_double_complex` و :class:`~ctypes.c_longdouble_complex` را برای سازگاری با NumPy از ``F``، ``D`` و ``G`` به ``Zf``، ``Zd`` و ``Zg`` تغییر دهید. (مشارکت‌کرده توسط ویکتور استینر (Victor Stinner) در :gh:`148675`.)" + +msgid "dataclasses" +msgstr "dataclasses" + +msgid "Annotations for generated ``__init__`` methods no longer include internal type names. (Contributed by David Ellis in :gh:`137530`.)" +msgstr "حاشیه‌نویسی‌های متدهای تولیدشده‌ی ``__init__`` دیگر شامل نام‌های نوع داخلی نمی‌شوند. (مشارکت توسط دیوید الیس (David Ellis) در :gh:`137530`.)" + +msgid "dbm" +msgstr "dbm" + +msgid "Added new :meth:`!reorganize` methods to :mod:`dbm.dumb` and :mod:`dbm.sqlite3` to recover unused free space previously occupied by deleted entries. (Contributed by Andrea Oliveri in :gh:`134004`.)" +msgstr "متدهای جدید :meth:`!reorganize` به :mod:`dbm.dumb` و :mod:`dbm.sqlite3` اضافه شدند تا فضای خالی استفاده‌نشده‌ای که پیش‌تر توسط درایه‌های حذف‌شده اشغال شده بود، بازیابی شود. (مشارکت توسط آندره‌آ اولیری (Andrea Oliveri) در :gh:`134004`.)" + +msgid "difflib" +msgstr "difflib" + +msgid "Introduced the optional *color* parameter to :func:`difflib.unified_diff`, enabling color output similar to :program:`git diff`. This can be controlled by :ref:`environment variables `. (Contributed by Douglas Thor in :gh:`133725`.)" +msgstr "پارامتر اختیاری *color* به تابع :func:`difflib.unified_diff` اضافه شد که امکان خروجی رنگی مشابه :program:`git diff` را فراهم می‌کند. این مورد را می‌توان از طریق :ref:`متغیرهای محیطی ` کنترل کرد. (مشارکت توسط داگلاس تور (Douglas Thor) در :gh:`133725`.)" + +msgid "Improved the styling of HTML diff pages generated by the :class:`difflib.HtmlDiff` class, and migrated the output to the HTML5 standard. (Contributed by Jiahao Li in :gh:`134580`.)" +msgstr "استایل‌دهی صفحات تفاوت HTML تولیدشده توسط کلاس :class:`difflib.HtmlDiff` بهبود یافت و خروجی به استاندارد HTML5 مهاجرت کرد. (مشارکت توسط جیاهائو لی (Jiahao Li) در :gh:`134580`.)" + +msgid "email" +msgstr "email" + +msgid "Email generators now raise an error when an :class:`.EmailMessage` cannot be accurately flattened due to a non-ASCII email address (mailbox) in an address header. Options for supporting Email Address Internationalization (EAI) are discussed in :attr:`.EmailPolicy.utf8`. (Contributed by R David Murray and Mike Edmunds in :gh:`122540`.)" +msgstr "تولیدگرهای ایمیل اکنون زمانی که یک :class:`.EmailMessage` به دلیل وجود یک آدرس ایمیل (صندوق پستی) غیر اسکی در سرآیند آدرس نتواند به دقت تخت‌سازی (flatten) شود، خطایی را بالا می‌آورند. گزینه‌های پشتیبانی از بین‌المللی‌سازی آدرس ایمیل (EAI) در :attr:`.EmailPolicy.utf8` بحث شده‌اند. (مشارکت توسط آر. دیوید ماری (R David Murray) و مایک ادموندز (Mike Edmunds) در :gh:`122540`.)" + +msgid "faulthandler" +msgstr "faulthandler" + +msgid "Added the *max_threads* parameter in :func:`faulthandler.enable`, :func:`faulthandler.dump_traceback`, :func:`faulthandler.dump_traceback_later`, and :func:`faulthandler.register`. (Contributed by Eric Froemling in :gh:`149085`.)" +msgstr "پارامتر *max_threads* به :func:`faulthandler.enable`، :func:`faulthandler.dump_traceback`، :func:`faulthandler.dump_traceback_later` و :func:`faulthandler.register` اضافه شد. (مشارکت توسط اریک فروملینگ (Eric Froemling) در :gh:`149085`.)" + +msgid "functools" +msgstr "functools" + +msgid ":func:`~functools.singledispatchmethod` now supports non-:term:`descriptor` callables. (Contributed by Serhiy Storchaka in :gh:`140873`.)" +msgstr "متد :func:`~functools.singledispatchmethod` اکنون از فراخوانی‌پذیرهای غیر :term:`توصیف‌گر ` پشتیبانی می‌کند. (مشارکت توسط سرهی استورچاک (Serhiy Storchaka) در :gh:`140873`.)" + +msgid ":func:`~functools.singledispatchmethod` now dispatches on the second argument if it wraps a regular method and is called as a class attribute. (Contributed by Bartosz Sławecki in :gh:`143535`.)" +msgstr "متد :func:`~functools.singledispatchmethod` اکنون اگر یک متد معمولی را پوشش دهد و به عنوان یک ویژگی کلاس فراخوانی شود، روی آرگومان دوم توزیع انجام می‌دهد. (مشارکت توسط بارتوش اسلاوکی (Bartosz Sławecki) در :gh:`143535`.)" + +msgid "gc" +msgstr "gc" + +msgid "Python 3.14.0-3.14.4 shipped with a new incremental garbage collector. However, due to a number of `reports `__ of significant memory pressure in production environments, it has been reverted back to the generational GC from 3.13. This is the GC now used in Python 3.14.5 and later and Python 3.15. (Contributed by Sergey Miryanov in :gh:`148726`.)" +msgstr "پایتون 3.14.0 تا 3.14.4 با یک جمع‌آورنده‌ی زباله‌ی افزایشی جدید عرضه شد. با این حال، به دلیل تعدادی از `گزارش‌ها `__ درباره فشار حافظه قابل توجه در محیط‌های پروداکشن، به جمع‌آورنده‌ی زباله نسلی نسخه‌ی 3.13 بازگردانده شد. این همان جمع‌آورنده‌ی زباله‌ای است که اکنون در پایتون 3.14.5 و نسخه‌های بعد از آن و همچنین پایتون 3.15 استفاده می‌شود. (مشارکت توسط سرگی میریانوف (Sergey Miryanov) در :gh:`148726`.)" + +msgid "hashlib" +msgstr "hashlib" + +msgid "Ensure that hash functions guaranteed to be always *available* exist as attributes of :mod:`hashlib` even if they will not work at runtime due to missing backend implementations. For instance, ``hashlib.md5`` will no longer raise :exc:`AttributeError` if OpenSSL is not available and Python has been built without MD5 support. (Contributed by Bénédikt Tran in :gh:`136929`.)" +msgstr "اطمینان حاصل کنید توابع هش که تضمین شده است همیشه *موجود* باشند، به عنوان ویژگی‌های :mod:`hashlib` وجود دارند، حتی اگر در زمان اجرا (runtime) به دلیل عدم وجود پیاده‌سازی‌های بک‌اند کار نکنند. به عنوان مثال، اگر OpenSSL موجود نباشد و پایتون بدون پشتیبانی از MD5 ساخته شده باشد، ``hashlib.md5`` دیگر خطای :exc:`AttributeError` را بالا نخواهد آورد. (مشارکت توسط بندیک تران (Bénédikt Tran) در :gh:`136929`.)" + +msgid "http.client" +msgstr "http.client" + +msgid "A new *max_response_headers* keyword-only parameter has been added to :class:`~http.client.HTTPConnection` and :class:`~http.client.HTTPSConnection` constructors. This parameter overrides the default maximum number of allowed response headers. (Contributed by Alexander Enrique Urieles Nieto in :gh:`131724`.)" +msgstr "یک پارامتر جدید فقط-کلیدواژه به نام *max_response_headers* به سازنده‌های :class:`~http.client.HTTPConnection` و :class:`~http.client.HTTPSConnection` اضافه شده است. این پارامتر حداکثر تعداد مجاز پیش‌فرض برای سرآیندهای پاسخ را بازنویسی می‌کند. (مشارکت توسط الکساندر انریکه اوریلس نیتو (Alexander Enrique Urieles Nieto) در :gh:`131724`.)" + +msgid "http.server" +msgstr "http.server" + +msgid "The logging of :mod:`~http.server.BaseHTTPRequestHandler`, as used by the :ref:`command-line interface `, is colored by default. This can be controlled with :ref:`environment variables `. (Contributed by Hugo van Kemenade in :gh:`146292`.)" +msgstr "گزارش‌گیری (:mod:`~http.server.BaseHTTPRequestHandler`)، که توسط :ref:`رابط خط فرمان ` استفاده می‌شود، به‌طور پیش‌فرض رنگی است. این ویژگی را می‌توان با :ref:`متغیرهای محیطی ` کنترل کرد. (مشارکت توسط Hugo van Kemenade در :gh:`146292`.)" + +msgid "Added :attr:`~http.server.SimpleHTTPRequestHandler.default_content_type` and the :option:`--content-type ` command-line option to allow customizing the default ``Content-Type`` header for files with unknown extensions. (Contributed by John Comeau and Hugo van Kemenade in :gh:`113471`.)" +msgstr "اضافه شدن :attr:`~http.server.SimpleHTTPRequestHandler.default_content_type` و گزینه‌ی خط فرمان :option:`--content-type ` برای امکان سفارشی‌سازی سرآیند پیش‌فرض ``Content-Type`` برای پرونده‌هایی با پسوندهای ناشناخته. (مشارکت توسط John Comeau و Hugo van Kemenade در :gh:`113471`.)" + +msgid "Add a new ``extra_response_headers`` keyword argument to :class:`~http.server.SimpleHTTPRequestHandler` to support custom headers in HTTP responses. (Contributed by Anton I. Sipos in :gh:`135057`.)" +msgstr "اضافه شدن آرگومان کلیدواژه‌ای ``extra_response_headers`` جدید به :class:`~http.server.SimpleHTTPRequestHandler` برای پشتیبانی از سرآیندهای اختصاصی در پاسخ‌های HTTP. (مشارکت توسط Anton I. Sipos در :gh:`135057`.)" + +msgid "Add a :option:`-H/--header ` option to the :program:`python -m http.server` command-line interface to support custom headers in HTTP responses. (Contributed by Anton I. Sipos in :gh:`135057`.)" +msgstr "اضافه شدن گزینه‌ی :option:`-H/--header ` به رابط خط فرمان :program:`python -m http.server` برای پشتیبانی از سرآیندهای اختصاصی در پاسخ‌های HTTP. (مشارکت توسط Anton I. Sipos در :gh:`135057`.)" + +msgid "importlib.metadata" +msgstr "importlib.metadata" + +msgid "Previously, when accessing a distribution metadata directory not containing a metadata file, ``metadata()`` and ``Distribution.metadata`` would return an empty ``PackageMetadata`` object as if the file was present but empty. Now, a ``MetadataNotFound`` exception is raised. See `importlib_metadata#493 `_ for background and rationale and :gh:`143387` for rationale on the compatibility concerns. (Contributed by Jason R. Coombs.)" +msgstr "پیش‌تر، هنگام دسترسی به یک پوشه‌ی فراداده‌ی توزیع که حاوی پرونده‌ی فراداده نبود، توابع ``metadata()`` و ``Distribution.metadata`` یک شیء خالی ``PackageMetadata`` را برمی‌گرداندند، گویی که پرونده موجود اما خالی است. اکنون، یک استثنای ``MetadataNotFound`` بالا آورده می‌شود. برای اطلاعات بیشتر درباره‌ی پس‌زمینه و توجیه منطقی به `importlib_metadata#493 `_ و برای توجیه منطقی درباره‌ی مسائل سازگاری به :gh:`143387` مراجعه کنید. (مشارکت توسط Jason R. Coombs.)" + +msgid "inspect" +msgstr "inspect" + +msgid "Add parameters *inherit_class_doc* and *fallback_to_class_doc* for :func:`~inspect.getdoc`. (Contributed by Serhiy Storchaka in :gh:`132686`.)" +msgstr "اضافه شدن پارامترهای *inherit_class_doc* و *fallback_to_class_doc* برای :func:`~inspect.getdoc`. (مشارکت توسط Serhiy Storchaka در :gh:`132686`.)" + +msgid "json" +msgstr "json" + +msgid "Add the *array_hook* parameter to :func:`~json.load` and :func:`~json.loads` functions: allow a callback for JSON literal array types to customize Python lists in the resulting decoded object. Passing combined :class:`frozendict` to *object_pairs_hook* parameter and :class:`tuple` to *array_hook* will yield a deeply nested immutable Python structure representing the JSON data. (Contributed by Joao S. O. Bueno in :gh:`146440`.)" +msgstr "اضافه شدن پارامتر *array_hook* به توابع :func:`~json.load` و :func:`~json.loads`: امکان استفاده از یک فراخوانی بازگشتی برای انواع آرایه‌های لفظی JSON جهت سفارشی‌سازی فهرست‌های پایتون در شیء رمزگشایی‌شده‌ی حاصل. ارسال ترکیب :class:`frozendict` به پارامتر *object_pairs_hook* و :class:`tuple` به *array_hook*، یک ساختار پایتون تغییرناپذیرِ عمیقاً تودرو را تولید می‌کند که داده‌های JSON را نمایش می‌دهد. (مشارکت توسط Joao S. O. Bueno در :gh:`146440`.)" + +msgid "locale" +msgstr "locale" + +msgid ":func:`~locale.setlocale` now supports language codes with ``@``-modifiers. ``@``-modifiers are no longer silently removed in :func:`~locale.getlocale`, but included in the language code. (Contributed by Serhiy Storchaka in :gh:`137729`.)" +msgstr ":func:`~locale.setlocale` اکنون از کدهای زبان دارای اصلاح‌گرهای ``@`` پشتیبانی می‌کند. اصلاح‌گرهای ``@`` دیگر به‌طور خاموش در :func:`~locale.getlocale` حذف نمی‌شوند، بلکه در کد زبان گنجانده می‌شوند. (مشارکت توسط Serhiy Storchaka در :gh:`137729`.)" + +msgid "Undeprecate the :func:`locale.getdefaultlocale` function. (Contributed by Victor Stinner in :gh:`130796`.)" +msgstr "خارج کردن تابع :func:`locale.getdefaultlocale` از حالت منسوخ. (مشارکت توسط Victor Stinner در :gh:`130796`.)" + +msgid "math" +msgstr "math" + +msgid "Add :func:`math.isnormal` and :func:`math.issubnormal` functions. (Contributed by Sergey B Kirpichev in :gh:`132908`.)" +msgstr "اضافه شدن توابع :func:`math.isnormal` و :func:`math.issubnormal`. (مشارکت توسط Sergey B Kirpichev در :gh:`132908`.)" + +msgid "Add :func:`math.fmax`, :func:`math.fmin` and :func:`math.signbit` functions. (Contributed by Bénédikt Tran in :gh:`135853`.)" +msgstr "اضافه شدن توابع :func:`math.fmax`، :func:`math.fmin` و :func:`math.signbit`. (مشارکت توسط Bénédikt Tran در :gh:`135853`.)" + +msgid "mimetypes" +msgstr "mimetypes" + +msgid "Add more MIME types. (Contributed by Benedikt Johannes, Charlie Lin, Foolbar, Gil Forcada and John Franey in :gh:`144217`, :gh:`145720`, :gh:`140937`, :gh:`139959`, :gh:`145698`, :gh:`145718`, :gh:`145918`, and :gh:`144213`.)" +msgstr "اضافه شدن انواع MIME بیشتر. (مشارکت توسط Benedikt Johannes، Charlie Lin، Foolbar، Gil Forcada و John Franey در :gh:`144217`، :gh:`145720`، :gh:`140937`، :gh:`139959`، :gh:`145698`، :gh:`145718`، :gh:`145918` و :gh:`144213`.)" + +msgid "Rename ``application/x-texinfo`` to ``application/texinfo``. (Contributed by Charlie Lin in :gh:`140165`.)" +msgstr "تغییر نام ``application/x-texinfo`` به ``application/texinfo``. (مشارکت توسط Charlie Lin در :gh:`140165`.)" + +msgid "Changed the MIME type for ``.ai`` files to ``application/pdf``. (Contributed by Stan Ulbrych in :gh:`141239`.)" +msgstr "تغییر نوع MIME برای پرونده‌های ``.ai`` به ``application/pdf``. (مشارکت توسط Stan Ulbrych در :gh:`141239`.)" + +msgid "mmap" +msgstr "mmap" + +msgid ":class:`mmap.mmap` now has a *trackfd* parameter on Windows; if it is ``False``, the file handle corresponding to *fileno* will not be duplicated. (Contributed by Serhiy Storchaka in :gh:`78502`.)" +msgstr ":class:`mmap.mmap` اکنون دارای یک پارامتر *trackfd* در ویندوز است؛ اگر مقدار آن ``False`` باشد، دسته‌ی پرونده‌ی متناظر با *fileno* تکثیر نخواهد شد. (مشارکت توسط Serhiy Storchaka در :gh:`78502`.)" + +msgid "Added the :meth:`mmap.mmap.set_name` method to annotate an anonymous memory mapping if Linux kernel supports :manpage:`PR_SET_VMA_ANON_NAME ` (Linux 5.17 or newer). (Contributed by Donghee Na in :gh:`142419`.)" +msgstr "متد :meth:`mmap.mmap.set_name` برای حاشیه‌نویسی کردن یک نگاشت حافظه‌ی ناشناس اضافه شد، در صورتی که هسته‌ی لینوکس از :manpage:`PR_SET_VMA_ANON_NAME ` پشتیبانی کند (لینوکس ۵.۱۷ یا جدیدتر). (مشارکت توسط Donghee Na در :gh:`142419`.)" + +msgid "os" +msgstr "os" + +msgid "Add :func:`os.statx` on Linux kernel versions 4.11 and later with glibc versions 2.28 and later. (Contributed by Jeffrey Bosboom and Victor Stinner in :gh:`83714`.)" +msgstr "تابع :func:`os.statx` در نسخه‌های ۴.۱۱ و پس از آنِ هسته‌ی لینوکس با نسخه‌های ۲.۲۸ و پس از آنِ glibc اضافه شد. (مشارکت توسط Jeffrey Bosboom و Victor Stinner در :gh:`83714`.)" + +msgid ":func:`os.makedirs` function now has a *parent_mode* parameter that allows specifying the mode for intermediate directories. This can be used to match the behavior from Python 3.6 and earlier by passing ``parent_mode=mode``. (Contributed by Zackery Spytz and Gregory P. Smith in :gh:`86533`.)" +msgstr "تابع :func:`os.makedirs` اکنون دارای یک پارامتر *parent_mode* است که امکان تعیین حالت را برای دایرکتوری‌های میانی فراهم می‌کند. از این ویژگی می‌توان برای مطابقت با رفتار نسخه‌ی ۳.۶ و پیش از آن پایتون با ارسال ``parent_mode=mode`` استفاده کرد. (مشارکت توسط Zackery Spytz و Gregory P. Smith در :gh:`86533`.)" + +msgid "os.path" +msgstr "os.path" + +msgid "Add support of the all-but-last mode in :func:`~os.path.realpath`. (Contributed by Serhiy Storchaka in :gh:`71189`.)" +msgstr "پشتیبانی از حالت همه به جز آخرین (all-but-last) در :func:`~os.path.realpath` اضافه شد. (مشارکت توسط Serhiy Storchaka در :gh:`71189`.)" + +msgid "The *strict* parameter to :func:`os.path.realpath` accepts a new value, :data:`os.path.ALLOW_MISSING`. If used, errors other than :exc:`FileNotFoundError` will be re-raised; the resulting path can be missing but it will be free of symlinks. (Contributed by Petr Viktorin for :cve:`2025-4517`.)" +msgstr "پارامتر *strict* در :func:`os.path.realpath` مقدار جدیدی یعنی :data:`os.path.ALLOW_MISSING` را می‌پذیرد. در صورت استفاده، خطاهایی به غیر از :exc:`FileNotFoundError` دوباره بالا برده خواهند شد؛ مسیر حاصل ممکن است موجود نباشد اما عاری از پیوندهای نمادین خواهد بود. (مشارکت توسط Petr Viktorin برای :cve:`2025-4517`.)" + +msgid "pathlib" +msgstr "pathlib" + +msgid ":meth:`pathlib.Path.mkdir` now has a *parent_mode* parameter that allows specifying the mode for intermediate directories when ``parents=True``. (Contributed by Gregory P. Smith in :gh:`86533`.)" +msgstr "متد :meth:`pathlib.Path.mkdir` اکنون دارای یک پارامتر *parent_mode* است که اجازه می‌دهد حالت دایرکتوری‌های میانی هنگام استفاده از ``parents=True`` مشخص شود. (مشارکت توسط Gregory P. Smith در :gh:`86533`.)" + +msgid "pdb" +msgstr "pdb" + +msgid "Use the new interactive shell as the default input shell for :mod:`pdb`. (Contributed by Tian Gao in :gh:`145379`.)" +msgstr "استفاده از پوسته‌ی تعاملی جدید به عنوان پوسته‌ی ورودی پیش‌فرض برای :mod:`pdb`. (مشارکت توسط Tian Gao در :gh:`145379`.)" + +msgid "pickle" +msgstr "pickle" + +msgid "Add support for pickling private methods and nested classes. (Contributed by Zackery Spytz and Serhiy Storchaka in :gh:`77188`.)" +msgstr "پشتیبانی از پیکل‌کردن متدهای خصوصی و کلاس‌های تو در تو اضافه شد. (مشارکت توسط Zackery Spytz و Serhiy Storchaka در :gh:`77188`.)" + +msgid "pickletools" +msgstr "pickletools" + +msgid "The output of the :mod:`pickletools` command-line interface is colored by default. This can be controlled with :ref:`environment variables `. (Contributed by Hugo van Kemenade in :gh:`149026`.)" +msgstr "خروجی رابط خط فرمان :mod:`pickletools` به طور پیش‌فرض رنگی است. این مورد را می‌توان با :ref:`environment variables ` کنترل کرد. (مشارکت توسط Hugo van Kemenade در :gh:`149026`.)" + +msgid "pprint" +msgstr "pprint" + +msgid "Add an *expand* keyword argument for :func:`pprint.pprint`, :func:`pprint.pformat`, :func:`pprint.pp`. If true, the output will be formatted similar to pretty-printed :func:`json.dumps` when *indent* is supplied. (Contributed by Stefan Todoran, Semyon Moroz and Hugo van Kemenade in :gh:`112632`.)" +msgstr "یک آرگومان کلیدواژه‌ای *expand* برای :func:`pprint.pprint`، :func:`pprint.pformat` و :func:`pprint.pp` اضافه شد. اگر مقدار آن درست (true) باشد، خروجی مشابه چاپ زیبا (pretty-printed) تابع :func:`json.dumps` هنگامی که *indent* ارائه شده است، قالب‌بندی خواهد شد. (مشارکت توسط Stefan Todoran، Semyon Moroz و Hugo van Kemenade در :gh:`112632`.)" + +msgid "Add t-string support to :mod:`pprint`. (Contributed by Loïc Simon and Hugo van Kemenade in :gh:`134551`.)" +msgstr "پشتیبانی از تی‌استرینگ به :mod:`pprint` اضافه شد. (مشارکت توسط Loïc Simon و Hugo van Kemenade در :gh:`134551`.)" + +msgid "re" +msgstr "re" + +msgid ":func:`re.prefixmatch` and a corresponding :meth:`re.Pattern.prefixmatch` have been added as alternate, more explicit names for the existing and now :term:`soft deprecated` :func:`re.match` and :meth:`re.Pattern.match` APIs. These are intended to be used to alleviate confusion around what *match* means by following the Zen of Python's *\"Explicit is better than implicit\"* mantra. Most other language regular expression libraries use an API named *match* to mean what Python has always called *search*. (Contributed by Gregory P. Smith in :gh:`86519`.)" +msgstr "توابع :func:`re.prefixmatch` و :meth:`re.Pattern.prefixmatch` به عنوان نام‌های جایگزین و صریح‌تر برای APIهای موجود و اکنون :term:`منسوخ‌نشانه ` :func:`re.match` و :meth:`re.Pattern.match` اضافه شده‌اند. این موارد به این منظور در نظر گرفته شده‌اند که با پیروی از شعار ذن پایتون *«صریح بودن بهتر از ضمنی بودن است»*، سردرگمی پیرامون معنای *match* را کاهش دهند. بیشتر کتابخانه‌های عبارت باقاعده در زبان‌های دیگر از یک API به نام *match* برای معنایی استفاده می‌کنند که پایتون همیشه آن را *search* نامیده است. (مشارکت توسط Gregory P. Smith در :gh:`86519`.)" + +msgid "resource" +msgstr "resource" + +msgid "Add new constants: :data:`~resource.RLIMIT_NTHR`, :data:`~resource.RLIMIT_UMTXP`, :data:`~resource.RLIMIT_THREADS`, :data:`~resource.RLIM_SAVED_CUR`, and :data:`~resource.RLIM_SAVED_MAX`. (Contributed by Serhiy Storchaka in :gh:`137512`.)" +msgstr "افزودن ثابت‌های جدید: :data:`~resource.RLIMIT_NTHR`، :data:`~resource.RLIMIT_UMTXP`، :data:`~resource.RLIMIT_THREADS`، :data:`~resource.RLIM_SAVED_CUR` و :data:`~resource.RLIM_SAVED_MAX`. (مشارکت توسط Serhiy Storchaka در :gh:`137512`.)" + +msgid "shelve" +msgstr "shelve" + +msgid "Added new :meth:`!reorganize` method to :mod:`shelve` used to recover unused free space previously occupied by deleted entries. (Contributed by Andrea Oliveri in :gh:`134004`.)" +msgstr "افزودن متد جدید :meth:`!reorganize` به ماژول :mod:`shelve` که برای بازیابی فضای آزاد استفاده‌نشده‌ی اشغال‌شده‌ی قبلی توسط شناسه‌های حذف‌شده به کار می‌رود. (مشارکت توسط Andrea Oliveri در :gh:`134004`.)" + +msgid "Add support for custom serialization and deserialization functions in the :mod:`shelve` module. (Contributed by Furkan Onder in :gh:`99631`.)" +msgstr "افزودن پشتیبانی برای توابع سریال‌سازی و سریال‌زدایی سفارشی در ماژول :mod:`shelve`. (مشارکت توسط Furkan Onder در :gh:`99631`.)" + +msgid "socket" +msgstr "socket" + +msgid "Add constants for the ISO-TP CAN protocol. (Contributed by Patrick Menschel and Stefan Tatschner in :gh:`86819`.)" +msgstr "افزودن ثابت‌ها برای پروتکل ISO-TP CAN. (مشارکت توسط Patrick Menschel و Stefan Tatschner در :gh:`86819`.)" + +msgid "sqlite3" +msgstr "sqlite3" + +msgid "The :ref:`command-line interface ` has several new features:" +msgstr "رابط خط فرمان :ref:`command-line interface ` چندین ویژگی جدید دارد:" + +msgid "SQL keyword completion on :kbd:`Tab`. (Contributed by Long Tan in :gh:`133393`.)" +msgstr "تکمیل کلیدواژه‌ی SQL روی کلید :kbd:`Tab`. (مشارکت توسط Long Tan در :gh:`133393`.)" + +msgid "Prompts, error messages, and help text are now colored. This is enabled by default, see :ref:`using-on-controlling-color` for details. (Contributed by Stan Ulbrych and Łukasz Langa in :gh:`133461`.)" +msgstr "اعلان‌ها، پیام‌های خطا و متن راهنما اکنون رنگی شده‌اند. این ویژگی به‌طور پیش‌فرض فعال است، برای جزئیات :ref:`using-on-controlling-color` را ببینید. (مشارکت توسط Stan Ulbrych و Łukasz Langa در :gh:`133461`.)" + +msgid "Table, index, trigger, view, column, function, and schema completion on :kbd:`Tab`. (Contributed by Long Tan in :gh:`136101`.)" +msgstr "تکمیل جدول، اندیس، تریگر، نما، ستون، تابع و شما روی کلید :kbd:`Tab`. (مشارکت توسط Long Tan در :gh:`136101`.)" + +msgid "ssl" +msgstr "ssl" + +msgid "Indicate through :data:`ssl.HAS_PSK_TLS13` whether the :mod:`ssl` module supports \"External PSKs\" in TLSv1.3, as described in :rfc:`9258`. (Contributed by Will Childs-Klein in :gh:`133624`.)" +msgstr "نشان دادن این موضوع از طریق :data:`ssl.HAS_PSK_TLS13` که آیا ماژول :mod:`ssl` از «PSKهای خارجی» در TLSv1.3 پشتیبانی می‌کند یا خیر، همان‌طور که در :rfc:`9258` توصیف شده است. (مشارکت توسط Will Childs-Klein در :gh:`133624`.)" + +msgid "Added new methods for managing groups used for SSL key agreement:" +msgstr "افزودن متدهای جدید برای مدیریت گروه‌های استفاده‌شده برای توافق کلید SSL:" + +msgid ":meth:`ssl.SSLContext.set_groups` sets the groups allowed for doing key agreement, extending the previous :meth:`ssl.SSLContext.set_ecdh_curve` method. This new API provides the ability to list multiple groups and supports fixed-field and post-quantum groups in addition to ECDH curves. This method can also be used to control what key shares are sent in the TLS handshake." +msgstr "متد :meth:`ssl.SSLContext.set_groups` گروه‌های مجاز برای انجام توافق کلید را تنظیم می‌کند و متد قبلی :meth:`ssl.SSLContext.set_ecdh_curve` را گسترش می‌دهد. این API جدید توانایی فهرست کردن چندین گروه را فراهم می‌کند و علاوه بر منحنی‌های ECDH، از گروه‌های با فیلد ثابت و پساکوانتومی نیز پشتیبانی می‌کند. همچنین می‌توان از این متد برای کنترل اشتراک‌گذاری‌های کلیدی که در دست‌دهی TLS ارسال می‌شوند، استفاده کرد." + +msgid ":meth:`ssl.SSLSocket.group` returns the group selected for doing key agreement on the current connection after the TLS handshake completes. This call requires OpenSSL 3.2 or later." +msgstr "متد :meth:`ssl.SSLSocket.group` گروه انتخاب‌شده برای انجام توافق کلید روی اتصال فعلی را پس از اتمام دست‌دهی TLS برمی‌گرداند. این فراخوانی به OpenSSL نسخه ۳.۲ یا بالاتر نیاز دارد." + +msgid ":meth:`ssl.SSLContext.get_groups` returns a list of all available key agreement groups compatible with the minimum and maximum TLS versions currently set in the context. This call requires OpenSSL 3.5 or later." +msgstr "متد :meth:`ssl.SSLContext.get_groups` فهرستی از تمام گروه‌های توافق کلید موجود سازگار با نسخه‌های حداقل و حداکثر TLS که در حال حاضر در زمینه تنظیم شده‌اند را برمی‌گرداند. این فراخوانی به OpenSSL نسخه ۳.۵ یا بالاتر نیاز دارد." + +msgid "(Contributed by Ron Frederick in :gh:`136306`.)" +msgstr "(مشارکت توسط Ron Frederick در :gh:`136306`.)" + +msgid "Added a new method :meth:`ssl.SSLContext.set_ciphersuites` for setting TLS 1.3 ciphers. For TLS 1.2 or earlier, :meth:`ssl.SSLContext.set_ciphers` should continue to be used. Both calls can be made on the same context and the selected cipher suite will depend on the TLS version negotiated when a connection is made. (Contributed by Ron Frederick in :gh:`137197`.)" +msgstr "متد جدیدی به نام :meth:`ssl.SSLContext.set_ciphersuites` برای تنظیم رمزهای TLS 1.3 اضافه شد. برای TLS 1.2 یا نسخه‌های قبلی، باید همچنان از :meth:`ssl.SSLContext.set_ciphers` استفاده شود. هر دو فراخوانی را می‌توان روی یک زمینه انجام داد و مجموعه‌ی رمز انتخاب‌شده به نسخه‌ی TLS مورد توافق هنگام برقراری اتصال بستگی خواهد داشت. (مشارکت توسط Ron Frederick در :gh:`137197`.)" + +msgid "Added new methods for managing signature algorithms:" +msgstr "متدهای جدیدی برای مدیریت الگوریتم‌های امضا اضافه شدند:" + +msgid ":func:`ssl.get_sigalgs` returns a list of all available TLS signature algorithms. This call requires OpenSSL 3.4 or later." +msgstr "تابع :func:`ssl.get_sigalgs` فهرستی از تمام الگوریتم‌های امضای TLS موجود را برمی‌گرداند. این فراخوانی به OpenSSL نسخه ۳.۴ یا بالاتر نیاز دارد." + +msgid ":meth:`ssl.SSLContext.set_client_sigalgs` sets the signature algorithms allowed for certificate-based client authentication." +msgstr "متد :meth:`ssl.SSLContext.set_client_sigalgs` الگوریتم‌های امضای مجاز برای احراز هویت کلاینت مبتنی بر گواهی را تنظیم می‌کند." + +msgid ":meth:`ssl.SSLContext.set_server_sigalgs` sets the signature algorithms allowed for the server to complete the TLS handshake." +msgstr "متد :meth:`ssl.SSLContext.set_server_sigalgs` الگوریتم‌های امضای مجاز برای سرور جهت تکمیل دست‌دهی TLS را تنظیم می‌کند." + +msgid ":meth:`ssl.SSLSocket.client_sigalg` returns the signature algorithm selected for client authentication on the current connection. This call requires OpenSSL 3.5 or later." +msgstr "متد :meth:`ssl.SSLSocket.client_sigalg` الگوریتم امضای انتخاب‌شده برای احراز هویت کلاینت در اتصال فعلی را برمی‌گرداند. این فراخوانی به OpenSSL نسخه ۳.۵ یا بالاتر نیاز دارد." + +msgid ":meth:`ssl.SSLSocket.server_sigalg` returns the signature algorithm selected for the server to complete the TLS handshake on the current connection. This call requires OpenSSL 3.5 or later." +msgstr "متد :meth:`ssl.SSLSocket.server_sigalg` الگوریتم امضای انتخاب‌شده برای سرور جهت تکمیل دست‌دهی TLS در اتصال فعلی را برمی‌گرداند. این فراخوانی به OpenSSL نسخه ۳.۵ یا بالاتر نیاز دارد." + +msgid "(Contributed by Ron Frederick in :gh:`138252`.)" +msgstr "(مشارکت توسط Ron Frederick در :gh:`138252`.)" + +msgid "subprocess" +msgstr "subprocess" + +msgid ":meth:`subprocess.Popen.wait`: when ``timeout`` is not ``None`` and the platform supports it, an efficient event-driven mechanism is used to wait for process termination:" +msgstr ":meth:`subprocess.Popen.wait`: هنگامی که ``timeout`` برابر با ``None`` نباشد و پلتفرم از آن پشتیبانی کند، از یک مکانیزم رویدادمحور کارآمد برای انتظار جهت پایان یافتن فرایند استفاده می‌شود:" + +msgid "Linux >= 5.3 uses :func:`os.pidfd_open` + :func:`select.poll`." +msgstr "لینوکس ۵.۳ به بالا از :func:`os.pidfd_open` + :func:`select.poll` استفاده می‌کند." + +msgid "macOS and other BSD variants use :func:`select.kqueue` + ``KQ_FILTER_PROC`` + ``KQ_NOTE_EXIT``." +msgstr "سیستم‌عامل macOS و سایر انواع BSD از :func:`select.kqueue` + ``KQ_FILTER_PROC`` + ``KQ_NOTE_EXIT`` استفاده می‌کنند." + +msgid "Windows keeps using ``WaitForSingleObject`` (unchanged)." +msgstr "ویندوز همچنان از ``WaitForSingleObject`` استفاده می‌کند (بدون تغییر)." + +msgid "If none of these mechanisms are available, the function falls back to the traditional busy loop (non-blocking call and short sleeps). (Contributed by Giampaolo Rodola in :gh:`83069`.)" +msgstr "اگر هیچ‌کدام از این مکانیزم‌ها در دسترس نباشند، تابع به حلقه‌ی مشغول سنتی (فراخوانی غیرمسدودکننده و توقف‌های کوتاه) بازمی‌گردد. (مشارکت توسط Giampaolo Rodola در :gh:`83069`.)" + +msgid "symtable" +msgstr "symtable" + +msgid "Add :meth:`symtable.Function.get_cells` and :meth:`symtable.Symbol.is_cell` methods. (Contributed by Yashp002 in :gh:`143504`.)" +msgstr "متدهای :meth:`symtable.Function.get_cells` و :meth:`symtable.Symbol.is_cell` اضافه شدند. (مشارکت توسط Yashp002 در :gh:`143504`.)" + +msgid "sys" +msgstr "sys" + +msgid "Add :data:`sys.abi_info` namespace to improve access to ABI information. (Contributed by Klaus Zimmermann in :gh:`137476`.)" +msgstr "فضای نام :data:`sys.abi_info` برای بهبود دسترسی به اطلاعات ABI اضافه شد. (مشارکت توسط Klaus Zimmermann در :gh:`137476`.)" + +msgid "sys.monitoring" +msgstr "sys.monitoring" + +msgid "The :ref:`other events ` (:monitoring-event:`PY_THROW`, :monitoring-event:`PY_UNWIND`, :monitoring-event:`RAISE`, :monitoring-event:`EXCEPTION_HANDLED`, and :monitoring-event:`RERAISE`) can now be turned on and disabled on a per code object basis. Returning :data:`~sys.monitoring.DISABLE` from a callback for one of these events disables the event for the entire code object (for the current tool), rather than raising :exc:`ValueError` as in prior versions. (Contributed by Gabriele N. Tornetta in :gh:`146182`.)" +msgstr "اکنون می‌توان :ref:`سایر رویدادها ` (:monitoring-event:`PY_THROW`، :monitoring-event:`PY_UNWIND`، :monitoring-event:`RAISE`، :monitoring-event:`EXCEPTION_HANDLED` و :monitoring-event:`RERAISE`) را بر اساس هر شیء کد (code object) فعال یا غیرفعال کرد. بازگرداندن :data:`~sys.monitoring.DISABLE` از یک کال‌بک برای یکی از این رویدادها، به‌جای بالا آوردن :exc:`ValueError` مانند نسخه‌های پیشین، آن رویداد را برای کل شیء کد (برای ابزار فعلی) غیرفعال می‌کند. (مشارکت از Gabriele N. Tornetta در :gh:`146182`.)" + +msgid "tarfile" +msgstr "tarfile" + +msgid ":func:`~tarfile.data_filter` now normalizes symbolic link targets in order to avoid path traversal attacks. (Contributed by Petr Viktorin in :gh:`127987` and :cve:`2025-4138`.)" +msgstr "اکنون تابع :func:`~tarfile.data_filter` هدف‌های پیوند نمادین را به منظور جلوگیری از حملات گذر از مسیر (path traversal) نرمال‌سازی می‌کند. (مشارکت از Petr Viktorin در :gh:`127987` و :cve:`2025-4138`.)" + +msgid ":func:`~tarfile.TarFile.extractall` now skips fixing up directory attributes when a directory was removed or replaced by another kind of file. (Contributed by Petr Viktorin in :gh:`127987` and :cve:`2024-12718`.)" +msgstr "متد :func:`~tarfile.TarFile.extractall` اکنون زمانی که یک پوشه حذف شده یا با نوع دیگری از پرونده جایگزین شده است، از اصلاح ویژگی‌های پوشه صرف‌نظر می‌کند. (مشارکت از Petr Viktorin در :gh:`127987` و :cve:`2024-12718`.)" + +msgid ":func:`~tarfile.TarFile.extract` and :func:`~tarfile.TarFile.extractall` now (re-)apply the extraction filter when substituting a link (hard or symbolic) with a copy of another archive member, and when fixing up directory attributes. The former raises a new exception, :exc:`~tarfile.LinkFallbackError`. (Contributed by Petr Viktorin for :cve:`2025-4330` and :cve:`2024-12718`.)" +msgstr "متدهای :func:`~tarfile.TarFile.extract` و :func:`~tarfile.TarFile.extractall` اکنون هنگام جایگزین کردن یک پیوند (سخت یا نمادین) با کپی یک عضو دیگر از آرشیو و هنگام اصلاح ویژگی‌های پوشه، صافی استخراج را (دوباره) اعمال می‌کنند. حالت اول یک استثنای جدید به نام :exc:`~tarfile.LinkFallbackError` بالا می‌آورد. (مشارکت از Petr Viktorin برای :cve:`2025-4330` و :cve:`2024-12718`.)" + +msgid ":func:`~tarfile.TarFile.extract` and :func:`~tarfile.TarFile.extractall` no longer extract rejected members when :func:`~tarfile.TarFile.errorlevel` is zero. (Contributed by Matt Prodani and Petr Viktorin in :gh:`112887` and :cve:`2025-4435`.)" +msgstr "متدهای :func:`~tarfile.TarFile.extract` و :func:`~tarfile.TarFile.extractall` هنگامی که :func:`~tarfile.TarFile.errorlevel` برابر با صفر است، دیگر اعضای ردشده را استخراج نمی‌کنند. (مشارکت از Matt Prodani و Petr Viktorin در :gh:`112887` و :cve:`2025-4435`.)" + +msgid ":func:`~tarfile.TarFile.extract` and :func:`~tarfile.TarFile.extractall` now replace slashes with backslashes in symlink targets on Windows to prevent creation of corrupted links. (Contributed by Christoph Walcher in :gh:`57911`.)" +msgstr "متدهای :func:`~tarfile.TarFile.extract` و :func:`~tarfile.TarFile.extractall` اکنون در ویندوز، اسلش‌ها را در هدف‌های پیوند نمادین با بک‌اسلش جایگزین می‌کنند تا از ایجاد پیوندهای خراب جلوگیری شود. (مشارکت از Christoph Walcher در :gh:`57911`.)" + +msgid ":func:`~tarfile.TarFile.gettarinfo` now replaces backslashes with slashes in symlink targets on Windows to conform to the tar format standard. (Contributed by Daniele Nicolodi in :gh:`151669`.)" +msgstr "متد :func:`~tarfile.TarFile.gettarinfo` اکنون در ویندوز، بک‌اسلش‌ها را در هدف‌های پیوند نمادین با اسلش جایگزین می‌کند تا با استاندارد قالب tar مطابقت داشته باشد. (مشارکت از Daniele Nicolodi در :gh:`151669`.)" + +msgid "threading" +msgstr "threading" + +msgid "Added :class:`~threading.serialize_iterator`, :func:`~threading.synchronized_iterator`, and :func:`~threading.concurrent_tee` to support concurrent access to generators and iterators. (Contributed by Raymond Hettinger in :gh:`124397`.)" +msgstr "برای پشتیبانی از دسترسی هم‌زمان به تولیدگرها و پیمایش‌گرها، کلاس :class:`~threading.serialize_iterator` و متدهای :func:`~threading.synchronized_iterator` و :func:`~threading.concurrent_tee` اضافه شدند. (مشارکت از Raymond Hettinger در :gh:`124397`.)" + +msgid "timeit" +msgstr "timeit" + +msgid "The output of the :mod:`timeit` command-line interface is colored by default. This can be controlled with :ref:`environment variables `. (Contributed by Hugo van Kemenade in :gh:`146609`.)" +msgstr "خروجی رابط خط فرمان :mod:`timeit` به طور پیش‌فرض رنگی است. این ویژگی را می‌توان با :ref:`متغیرهای محیطی ` کنترل کرد. (مشارکت از Hugo van Kemenade در :gh:`146609`.)" + +msgid "The command-line interface now colorizes error tracebacks by default. This can be controlled with :ref:`environment variables `. (Contributed by Yi Hong in :gh:`139374`.)" +msgstr "رابط خط فرمان اکنون به طور پیش‌فرض ردگیری‌های خطا را رنگی می‌کند. این ویژگی را می‌توان با :ref:`متغیرهای محیطی ` کنترل کرد. (مشارکت از Yi Hong در :gh:`139374`.)" + +msgid "Make the target time of :meth:`timeit.Timer.autorange` configurable and add ``--target-time`` option to the command-line interface. (Contributed by Alessandro Cucci and Miikka Koskinen in :gh:`80642`.)" +msgstr "زمان هدف متد :meth:`timeit.Timer.autorange` قابل تنظیم شد و گزینه‌ی ``--target-time`` به رابط خط فرمان اضافه شد. (مشارکت از Alessandro Cucci و Miikka Koskinen در :gh:`80642`.)" + +msgid "tkinter" +msgstr "tkinter" + +msgid "The :meth:`!tkinter.Text.search` method now supports two additional arguments: *nolinestop* which allows the search to continue across line boundaries; and *strictlimits* which restricts the search to within the specified range. (Contributed by Rihaan Meher in :gh:`130848`.)" +msgstr "متد :meth:`!tkinter.Text.search` اکنون از دو آرگومان اضافی پشتیبانی می‌کند: *nolinestop* که به جستجو اجازه می‌دهد از مرزهای سطر عبور کند؛ و *strictlimits* که جستجو را به محدوده‌ی مشخص‌شده محدود می‌کند. (مشارکت از Rihaan Meher در :gh:`130848`.)" + +msgid "A new method :meth:`!tkinter.Text.search_all` has been introduced. This method allows for searching for all matches of a pattern using Tcl's ``-all`` and ``-overlap`` options. (Contributed by Rihaan Meher in :gh:`130848`.)" +msgstr "متد جدیدی به نام :meth:`!tkinter.Text.search_all` معرفی شده است. این متد به شما اجازه می‌دهد با استفاده از گزینه‌های ``-all`` و ``-overlap`` در Tcl، تمام موارد تطابق یک الگو را جستجو کنید. (مشارکت از Rihaan Meher در :gh:`130848`.)" + +msgid "Added new methods :meth:`!pack_content`, :meth:`!place_content` and :meth:`!grid_content` which use Tk commands with new names (introduced in Tk 8.6) instead of :meth:`!*_slaves` methods which use Tk commands with outdated names. (Contributed by Serhiy Storchaka in :gh:`143754`.)" +msgstr "متدهای جدید :meth:`!pack_content`، :meth:`!place_content` و :meth:`!grid_content` اضافه شدند که از دستورات Tk با نام‌های جدید (معرفی‌شده در Tk 8.6) به‌جای متدهای :meth:`!*_slaves` که از دستورات Tk با نام‌های قدیمی استفاده می‌کنند، بهره می‌برند. (مشارکت از Serhiy Storchaka در :gh:`143754`.)" + +msgid "Added :class:`!Event` attributes :attr:`!user_data` for Tk virtual events and :attr:`!detail` for ``Enter``, ``Leave``, ``FocusIn``, ``FocusOut``, and ``ConfigureRequest`` events. (Contributed by Matthias Kievernagel and Serhiy Storchaka in :gh:`47655`.)" +msgstr "ویژگی‌های :attr:`!user_data` برای رویدادهای مجازی Tk و :attr:`!detail` برای رویدادهای ``Enter``، ``Leave``، ``FocusIn``، ``FocusOut`` و ``ConfigureRequest`` به کلاس :class:`!Event` اضافه شدند. (مشارکت از Matthias Kievernagel و Serhiy Storchaka در :gh:`47655`.)" + +msgid "tokenize" +msgstr "tokenize" + +msgid "The output of the :mod:`tokenize` :ref:`command-line interface ` is colored by default. This can be controlled with :ref:`environment variables `. (Contributed by Hugo van Kemenade in :gh:`148991`.)" +msgstr "خروجی :ref:`رابط خط فرمان ` ماژول :mod:`tokenize` به‌صورت پیش‌فرض رنگی است. این ویژگی را می‌توانید از طریق :ref:`متغیرهای محیطی ` کنترل کنید. (مشارکت توسط Hugo van Kemenade در :gh:`148991`.)" + +msgid "tomllib" +msgstr "tomllib" + +msgid "The :mod:`tomllib` module now supports TOML 1.1.0. This is a backwards compatible update, meaning that all valid TOML 1.0.0 documents are parsed the same way." +msgstr "ماژول :mod:`tomllib` اکنون از TOML 1.1.0 پشتیبانی می‌کند. این یک به‌روزرسانی سازگار با گذشته است، به این معنا که تمام سندهای معتبر TOML 1.0.0 به همان شکل تجزیه می‌شوند." + +msgid "The changes, according to the `official TOML changelog`_, are:" +msgstr "تغییرات، براساس `ثبت تغییرات رسمی TOML`_، به شرح زیر است:" + +msgid "Allow newlines and trailing commas in inline tables." +msgstr "اجازه دادن به خطوط جدید و کامای پایانی در جدول‌های خطی (inline tables)." + +msgid "Previously an inline table had to be on a single line and couldn't end with a trailing comma. This is now relaxed so that the following is valid:" +msgstr "پیش‌ازاین، جدول خطی باید روی یک سطر قرار می‌گرفت و نمی‌توانست با کامای پایانی تمام شود. این محدودیت اکنون برداشته شده است تا مورد زیر معتبر باشد:" + +msgid "" +"tbl = {\n" +" key = \"a string\",\n" +" moar-tbl = {\n" +" key = 1,\n" +" },\n" +"}" +msgstr "" +"tbl = {\n" +" key = \"a string\",\n" +" moar-tbl = {\n" +" key = 1,\n" +" },\n" +"}" + +msgid "Add ``\\xHH`` notation to basic strings for codepoints under 255, and the ``\\e`` escape for the escape character:" +msgstr "افزودن نماد ``\\xHH`` به رشته‌های پایه برای نقطه‌کدهای زیر ۲۵۵، و نماد گریز ``\\e`` برای نویسه‌ی گریز:" + +msgid "" +"null = \"null byte: \\x00; letter a: \\x61\"\n" +"csi = \"\\e[\"" +msgstr "" +"null = \"null byte: \\x00; letter a: \\x61\"\n" +"csi = \"\\e[\"" + +msgid "Seconds in datetime and time values are now optional. The following are now valid:" +msgstr "ثانیه‌ها در مقادیر تاریخ و زمان (datetime و time) اکنون اختیاری هستند. مقادیر زیر اکنون معتبرند:" + +msgid "" +"dt = 2010-02-03 14:15\n" +"t = 14:15" +msgstr "" +"dt = 2010-02-03 14:15\n" +"t = 14:15" + +msgid "(Contributed by Taneli Hukkinen in :gh:`142956`.)" +msgstr "(مشارکت توسط Taneli Hukkinen در :gh:`142956`.)" + +msgid "types" +msgstr "types" + +msgid "Expose the write-through :func:`locals` proxy type as :class:`types.FrameLocalsProxyType`. This represents the type of the :attr:`frame.f_locals` attribute, as described in :pep:`667`. (Contributed by Peter Bierma in :gh:`136492`.)" +msgstr "قرار دادن نوع پراکسی :func:`locals` با قابلیت نوشتن‌همزمان به عنوان :class:`types.FrameLocalsProxyType`. این مورد نشان‌دهنده‌ی نوع ویژگی :attr:`frame.f_locals` است، همان‌طور که در :pep:`667` توصیف شده است. (مشارکت توسط Peter Bierma در :gh:`136492`.)" + +msgid "typing" +msgstr "typing" + +msgid ":pep:`747`: Add :data:`~typing.TypeForm`, a new special form for annotating values that are themselves type expressions. ``TypeForm[T]`` means \"a type form object describing ``T`` (or a type assignable to ``T``)\". At runtime, ``TypeForm(x)`` simply returns ``x``, which allows explicit annotation of type-form values without changing behavior." +msgstr ":pep:`747`: افزودن :data:`~typing.TypeForm`، یک فرم ویژه‌ی جدید برای حاشیه‌نویسی مقادیری که خودشان عبارت‌های نوع هستند. عبارت ``TypeForm[T]`` به معنای «یک شیء فرم نوع توصیف‌کننده‌ی ``T`` (یا نوعی قابل انتساب به ``T``)» است. در هنگام اجرا، ``TypeForm(x)`` به سادگی ``x`` را برمی‌گرداند، که این امر اجازه می‌دهد حاشیه‌نویسی صریح مقادیر نوع‌فرم بدون تغییر رفتار انجام شود." + +msgid "This helps libraries that accept user-provided type expressions (for example ``int``, ``str | None``, :class:`~typing.TypedDict` classes, or ``list[int]``) expose precise signatures:" +msgstr "این کار به کتابخانه‌هایی که عبارت‌های نوع ارائه‌شده توسط کاربر (برای مثال ``int``، ``str | None``، کلاس‌های :class:`~typing.TypedDict` یا ``list[int]``) را می‌پذیرند، کمک می‌کند تا امضاهای دقیقی را ارائه دهند:" + +msgid "" +"from typing import Any, TypeForm\n" +"\n" +"def cast[T](typ: TypeForm[T], value: Any) -> T: ..." +msgstr "" +"from typing import Any, TypeForm\n" +"\n" +"def cast[T](typ: TypeForm[T], value: Any) -> T: ..." + +msgid "(Contributed by Jelle Zijlstra in :gh:`145033`.)" +msgstr "(مشارکت توسط Jelle Zijlstra در :gh:`145033`.)" + +msgid ":pep:`728`: Add support in :class:`~typing.TypedDict` for the *closed* and *extra_items* class arguments. A closed :class:`~typing.TypedDict` does not allow extra keys beyond those specified in the class body, while a :class:`~typing.TypedDict` with ``extra_items`` allows arbitrary extra items where the values are of the specified type. (Contributed by Angela Liss in :gh:`137840`.)" +msgstr ":pep:`728`: افزودن پشتیبانی در :class:`~typing.TypedDict` برای آرگومان‌های کلاس *closed* و *extra_items*. یک :class:`~typing.TypedDict` بسته (closed) اجازه نمی‌دهد کلیدهای اضافی فراتر از موارد مشخص‌شده در بدنه کلاس وجود داشته باشد، در حالی که یک :class:`~typing.TypedDict` دارای ``extra_items`` اجازه می‌دهد آیتم‌های اضافی دلخواهی که مقادیر آن‌ها از نوع مشخص‌شده هستند وجود داشته باشند. (مشارکت توسط Angela Liss در :gh:`137840`.)" + +msgid "Code like ``class ExtraTypeVars(P1[S], Protocol[T, T2]): ...`` now raises a :exc:`TypeError`, because ``S`` is not listed in ``Protocol`` parameters. (Contributed by Nikita Sobolev in :gh:`137191`.)" +msgstr "کدهایی مانند ``class ExtraTypeVars(P1[S], Protocol[T, T2]): ...`` اکنون یک :exc:`TypeError` بالا می‌آورند؛ زیرا ``S`` در پارامترهای ``Protocol`` فهرست نشده است. (مشارکت توسط Nikita Sobolev در :gh:`137191`.)" + +msgid "Code like ``class B2(A[T2], Protocol[T1, T2]): ...`` now correctly handles type parameters order: it is ``(T1, T2)``, not ``(T2, T1)`` as it was incorrectly inferred at runtime before. (Contributed by Nikita Sobolev in :gh:`137191`.)" +msgstr "کدهایی مانند ``class B2(A[T2], Protocol[T1, T2]): ...`` اکنون ترتیب پارامترهای نوع را به درستی مدیریت می‌کنند: ترتیب آن ``(T1, T2)`` است، نه ``(T2, T1)`` که پیش‌تر به صورت نادرست در ران‌تایم استنتاج می‌شد. (مشارکت توسط Nikita Sobolev در :gh:`137191`.)" + +msgid ":pep:`800`: Add :deco:`typing.disjoint_base`, a new decorator marking a class as a disjoint base. This is an advanced feature primarily intended to allow type checkers to faithfully reflect the runtime semantics of types defined as builtins or in compiled extensions. If a class ``C`` is a disjoint base, then child classes of that class cannot inherit from other disjoint bases that are not parent or child classes of ``C``. (Contributed by Jelle Zijlstra in :gh:`148639`.)" +msgstr ":pep:`800`: افزودن :deco:`typing.disjoint_base`، یک دکوراتور جدید که کلاسی را به عنوان یک پایه مجزا علامت‌گذاری می‌کند. این یک ویژگی پیشرفته است که در درجه‌ی اول برای این منظور در نظر گرفته شده است تا به بررسی‌کنندگان نوع اجازه دهد معناشناسی ران‌تایم انواعی را که به عنوان توکار یا در افزونه‌های کامپایل‌شده تعریف شده‌اند، به طور دقیق منعکس کنند. اگر کلاسی مانند ``C`` یک پایه مجزا باشد، کلاس‌های فرزند آن کلاس نمی‌توانند از پایه‌های مجزای دیگری که کلاس‌های والد یا فرزند ``C`` نیستند، ارث‌بری کنند. (مشارکت توسط Jelle Zijlstra در :gh:`148639`.)" + +msgid ":class:`~typing.TypeVarTuple` now accepts ``bound``, ``covariant``, ``contravariant``, and ``infer_variance`` keyword arguments, matching the interface of :class:`~typing.TypeVar` and :class:`~typing.ParamSpec`. ``bound`` semantics remain undefined in the specification." +msgstr ":class:`~typing.TypeVarTuple` اکنون آرگومان‌های کلیدواژه‌ای ``bound``، ``covariant``، ``contravariant`` و ``infer_variance`` را می‌پذیرد که با رابط :class:`~typing.TypeVar` و :class:`~typing.ParamSpec` مطابقت دارد. معناشناسی ``bound`` در مشخصات تعریف‌نشده باقی می‌ماند." + +msgid "unicodedata" +msgstr "unicodedata" + +msgid "The Unicode database has been updated to Unicode 17.0.0. (Contributed by Benjamin Peterson in :gh:`138706`.)" +msgstr "پایگاه داده‌ی یونیکد به یونیکد ۱۷.۰.۰ به‌روزرسانی شده است. (مشارکت توسط Benjamin Peterson در :gh:`138706`.)" + +msgid "Add :func:`unicodedata.isxidstart` and :func:`unicodedata.isxidcontinue` functions to check whether a character can start or continue a `Unicode Standard Annex #31 `_ identifier. (Contributed by Stan Ulbrych in :gh:`129117`.)" +msgstr "افزودن توابع :func:`unicodedata.isxidstart` و :func:`unicodedata.isxidcontinue` برای بررسی اینکه آیا یک نویسه می‌تواند آغازگر یا ادامه‌دهنده‌ی یک شناسه‌ی `Unicode Standard Annex #31 `_ باشد. (مشارکت توسط Stan Ulbrych در :gh:`129117`.)" + +msgid "Add the :func:`~unicodedata.iter_graphemes` function to iterate over grapheme clusters according to rules defined in `Unicode Standard Annex #29, \"Unicode Text Segmentation\" `_. Add :func:`~unicodedata.grapheme_cluster_break`, :func:`~unicodedata.indic_conjunct_break` and :func:`~unicodedata.extended_pictographic` functions to get the properties of the character which are related to the above algorithm. (Contributed by Serhiy Storchaka and Guillaume Sanchez in :gh:`74902`.)" +msgstr "افزودن تابع :func:`~unicodedata.iter_graphemes` برای پیمایش کردن خوشه‌های نگارشی بر اساس قوانین تعریف‌شده در `Unicode Standard Annex #29, \"Unicode Text Segmentation\" `_. افزودن توابع :func:`~unicodedata.grapheme_cluster_break`، :func:`~unicodedata.indic_conjunct_break` و :func:`~unicodedata.extended_pictographic` برای دریافت ویژگی‌های نویسه که با الگوریتم بالا مرتبط هستند. (مشارکت توسط Serhiy Storchaka و Guillaume Sanchez در :gh:`74902`.)" + +msgid "Add :func:`~unicodedata.block` function to return the `Unicode block `_ assigned to a character. (Contributed by Stan Ulbrych in :gh:`66802`.)" +msgstr "افزودن تابع :func:`~unicodedata.block` برای برگرداندن `Unicode block `_ تخصیص‌یافته به یک نویسه. (مشارکت توسط Stan Ulbrych در :gh:`66802`.)" + +msgid "unittest" +msgstr "unittest" + +msgid ":meth:`unittest.TestCase.assertLogs` will now accept a formatter to control how messages are formatted. (Contributed by Garry Cairns in :gh:`134567`.)" +msgstr ":meth:`unittest.TestCase.assertLogs` از این به بعد یک قالب‌بند را برای کنترل نحوه‌ی قالب‌بندی پیام‌ها می‌پذیرد. (مشارکت توسط Garry Cairns در :gh:`134567`.)" + +msgid ":meth:`unittest.TestCase.assertWarns` and :meth:`unittest.TestCase.assertWarnsRegex` no longer swallow warnings that do not match the specified category or regex. Nested context managers are now supported. (Contributed by Serhiy Storchaka in :gh:`143231`.)" +msgstr ":meth:`unittest.TestCase.assertWarns` و :meth:`unittest.TestCase.assertWarnsRegex` دیگر هشدارهایی را که با دسته‌ی مشخص‌شده یا عبارت باقاعده مطابقت ندارند، نادیده نمی‌گیرند. مدیر زمینه‌های تورتوپر اکنون پشتیبانی می‌شوند. (مشارکت توسط Serhiy Storchaka در :gh:`143231`.)" + +msgid "urllib.parse" +msgstr "urllib.parse" + +msgid "Add the *missing_as_none* parameter to :func:`~urllib.parse.urlsplit`, :func:`~urllib.parse.urlparse` and :func:`~urllib.parse.urldefrag` functions. Add the *keep_empty* parameter to :func:`~urllib.parse.urlunsplit` and :func:`~urllib.parse.urlunparse` functions. This allows distinguishing between empty and undefined URI components and preserving empty components. (Contributed by Serhiy Storchaka in :gh:`67041`.)" +msgstr "افزودن پارامتر *missing_as_none* به توابع :func:`~urllib.parse.urlsplit`، :func:`~urllib.parse.urlparse` و :func:`~urllib.parse.urldefrag`. افزودن پارامتر *keep_empty* به توابع :func:`~urllib.parse.urlunsplit` و :func:`~urllib.parse.urlunparse`. این کار امکان تمایز بین اجزای URI خالی و تعریف‌نشده و حفظ اجزای خالی را فراهم می‌کند. (مشارکت توسط Serhiy Storchaka در :gh:`67041`.)" + +msgid "venv" +msgstr "venv" + +msgid "On POSIX platforms, platlib directories will be created if needed when creating virtual environments, instead of using a ``lib64 -> lib`` symlink. This means purelib and platlib of virtual environments no longer share the same ``lib`` directory on platforms where :data:`sys.platlibdir` is not equal to ``lib``. (Contributed by Rui Xi in :gh:`133951`.)" +msgstr "در سکوهای POSIX، هنگام ایجاد محیط‌های مجازی، پوشه‌های platlib در صورت نیاز ایجاد خواهند شد، به جای اینکه از پیوند نمادین ``lib64 -> lib`` استفاده شود. این بدین معناست که در سکوهایی که :data:`sys.platlibdir` برابر با ``lib`` نیست، پوشه‌های purelib و platlib در محیط‌های مجازی دیگر پوشه‌ی ``lib`` یکسانی را به اشتراک نمی‌گذارند. (مشارکت توسط Rui Xi در :gh:`133951`.)" + +msgid "warnings" +msgstr "warnings" + +msgid "Improve filtering by module in :func:`warnings.warn_explicit` if no *module* argument is passed. It now tests the module regular expression in the warnings filter not only against the filename with ``.py`` stripped, but also against module names constructed starting from different parent directories of the filename (with ``/__init__.py``, ``.py`` and, on Windows, ``.pyw`` stripped). (Contributed by Serhiy Storchaka in :gh:`135801`.)" +msgstr "بهبود صافی‌سازی (فیلتر کردن) بر اساس ماژول در :func:`warnings.warn_explicit` در صورتی که هیچ آرگومان *module* ارسال نشود. این تابع اکنون عبارت باقاعده‌ی ماژول را در صافی هشدارها نه تنها در برابر نام پرونده با حذف ``.py``، بلکه در برابر نام‌های ماژول ساخته‌شده از پوشه‌های والد مختلفِ نام پرونده (با حذف ``/__init__.py``، ``.py`` و در ویندوز ``.pyw``) می‌آزماید. (مشارکت توسط Serhiy Storchaka در :gh:`135801`.)" + +msgid "wave" +msgstr "wave" + +msgid "Added support for IEEE floating-point WAVE audio (``WAVE_FORMAT_IEEE_FLOAT``) in :mod:`wave`." +msgstr "پشتیبانی از صدای WAVE با اعشار شناور IEEE (``WAVE_FORMAT_IEEE_FLOAT``) به :mod:`wave` اضافه شد." + +msgid "Added :meth:`wave.Wave_read.getformat`, :meth:`wave.Wave_write.getformat`, and :meth:`wave.Wave_write.setformat` for explicit frame format handling." +msgstr "توابع :meth:`wave.Wave_read.getformat`، :meth:`wave.Wave_write.getformat` و :meth:`wave.Wave_write.setformat` برای مدیریت صریح قالب قاب اضافه شدند." + +msgid ":meth:`wave.Wave_write.setparams` accepts both 7-item tuples including ``format`` and 6-item tuples for backwards compatibility (defaulting to ``WAVE_FORMAT_PCM``)." +msgstr "متد :meth:`wave.Wave_write.setparams` برای سازگاری با نسخه‌های قبلی، هم تاپل‌های ۷ آیتمی شامل ``format`` و هم تاپل‌های ۶ آیتمی را می‌پذیرد (که به طور پیش‌فرض روی ``WAVE_FORMAT_PCM`` تنظیم می‌شوند)." + +msgid "``WAVE_FORMAT_IEEE_FLOAT`` output now includes a ``fact`` chunk, as required for non-PCM WAVE formats." +msgstr "خروجی ``WAVE_FORMAT_IEEE_FLOAT`` اکنون شامل یک بخش ``fact`` است، همان‌طور که برای قالب‌های WAVE غیر PCM لازم است." + +msgid "(Contributed by Lionel Koenig and Michiel W. Beijen in :gh:`60729`.)" +msgstr "(مشارکت‌کرده توسط Lionel Koenig و Michiel W. Beijen در :gh:`60729`.)" + +msgid "webbrowser" +msgstr "webbrowser" + +msgid "On macOS, the new :class:`!webbrowser.MacOS` class opens URLs via :program:`/usr/bin/open` instead of constructing and executing AppleScript via :program:`osascript`. The default browser is detected from the LaunchServices preferences file using :mod:`plistlib`, with :class:`!com.apple.Safari` as the fallback on fresh installations. For non-HTTP(S) URLs, :program:`open -b ` is used to route the URL through a browser rather than the OS file handler, preventing file injection attacks. (Contributed by Jeff Lyon in :gh:`137586`.)" +msgstr "روی سیستم‌عامل macOS، کلاس جدید :class:`!webbrowser.MacOS` نشانی‌های وب را به جای ساخت و اجرای AppleScript از طریق :program:`osascript`، با استفاده از :program:`/usr/bin/open` باز می‌کند. مرورگر پیش‌فرض از پرونده‌ی تنظیمات LaunchServices با استفاده از :mod:`plistlib` شناسایی می‌شود و کلاس :class:`!com.apple.Safari` به عنوان مرورگر جایگزین در نصب‌های تازه در نظر گرفته می‌شود. برای نشانی‌های وب غیر HTTP(S)، از :program:`open -b ` برای هدایت نشانی وب از طریق یک مرورگر به جای هندلر پرونده‌ی سیستم‌عامل استفاده می‌شود تا از حملات تزریق پرونده جلوگیری شود. (مشارکت‌کرده توسط Jeff Lyon در :gh:`137586`.)" + +msgid "xml" +msgstr "xml" + +msgid "Add the :func:`xml.is_valid_name` function to check whether a string can be used as an element or attribute name in XML. (Contributed by Serhiy Storchaka in :gh:`139489`.)" +msgstr "تابع :func:`xml.is_valid_name` اضافه شد تا بررسی کند آیا می‌توان از یک رشته به عنوان نام یک عنصر یا ویژگی در XML استفاده کرد یا خیر. (مشارکت‌کرده توسط Serhiy Storchaka در :gh:`139489`.)" + +msgid "Add the :func:`xml.is_valid_text` function to check whether a string can be used in an XML document. (Contributed by Serhiy Storchaka in :gh:`139489`.)" +msgstr "تابع :func:`xml.is_valid_text` اضافه شد تا بررسی کند آیا می‌توان از یک رشته در یک سند XML استفاده کرد یا خیر. (مشارکت‌کرده توسط Serhiy Storchaka در :gh:`139489`.)" + +msgid "xml.parsers.expat" +msgstr "xml.parsers.expat" + +msgid "Add :meth:`~xml.parsers.expat.xmlparser.SetAllocTrackerActivationThreshold` and :meth:`~xml.parsers.expat.xmlparser.SetAllocTrackerMaximumAmplification` to :ref:`xmlparser ` objects to tune protections against disproportional amounts of dynamic memory usage from within an Expat parser. (Contributed by Bénédikt Tran in :gh:`90949`.)" +msgstr "متدهای :meth:`~xml.parsers.expat.xmlparser.SetAllocTrackerActivationThreshold` و :meth:`~xml.parsers.expat.xmlparser.SetAllocTrackerMaximumAmplification` به اشیاء :ref:`xmlparser ` اضافه شدند تا محافظت در برابر مقادیر نامتناسب استفاده از حافظه‌ی پویا را از درون یک پارسر Expat تنظیم کنند. (مشارکت‌کرده توسط Bénédikt Tran در :gh:`90949`.)" + +msgid "Add :meth:`~xml.parsers.expat.xmlparser.SetBillionLaughsAttackProtectionActivationThreshold` and :meth:`~xml.parsers.expat.xmlparser.SetBillionLaughsAttackProtectionMaximumAmplification` to :ref:`xmlparser ` objects to tune protections against `billion laughs`_ attacks. (Contributed by Bénédikt Tran in :gh:`90949`.)" +msgstr "متدهای :meth:`~xml.parsers.expat.xmlparser.SetBillionLaughsAttackProtectionActivationThreshold` و :meth:`~xml.parsers.expat.xmlparser.SetBillionLaughsAttackProtectionMaximumAmplification` به اشیاء :ref:`xmlparser ` اضافه شدند تا محافظت در برابر حملات `billion laughs`_ را تنظیم کنند. (مشارکت‌کرده توسط Bénédikt Tran در :gh:`90949`.)" + +msgid "zlib" +msgstr "zlib" + +msgid "Allow combining two Adler-32 checksums via :func:`~zlib.adler32_combine`. (Contributed by Callum Attryde and Bénédikt Tran in :gh:`134635`.)" +msgstr "امکان ترکیب دو جمع‌آزمای Adler-32 از طریق :func:`~zlib.adler32_combine` فراهم شد. (مشارکت‌کرده توسط Callum Attryde و Bénédikt Tran در :gh:`134635`.)" + +msgid "Allow combining two CRC-32 checksums via :func:`~zlib.crc32_combine`. (Contributed by Bénédikt Tran in :gh:`134635`.)" +msgstr "امکان ترکیب دو جمع‌آزمای CRC-32 از طریق :func:`~zlib.crc32_combine` فراهم شد. (مشارکت‌کرده توسط Bénédikt Tran در :gh:`134635`.)" + +msgid "Optimizations" +msgstr "بهینه‌سازی‌ها" + +msgid "``mimalloc`` is now used as the default allocator for raw memory allocations such as via :c:func:`PyMem_RawMalloc` for better performance on :term:`free-threaded builds `. (Contributed by Kumar Aditya in :gh:`144914`.)" +msgstr "کتابخانه‌ی ``mimalloc`` اکنون به عنوان تخصیص‌دهنده‌ی پیش‌فرض برای تخصیص‌های حافظه‌ی خام، مانند مواردی که از طریق :c:func:`PyMem_RawMalloc` انجام می‌شوند، برای عملکرد بهتر در :term:`ساخت نخ‌آزاد ` استفاده می‌شود. (مشارکت‌کرده توسط Kumar Aditya در :gh:`144914`.)" + +msgid "base64 & binascii" +msgstr "base64 و binascii" + +msgid "CPython's underlying base64 implementation now encodes 2x faster and decodes 3x faster thanks to simple CPU pipelining optimizations. (Contributed by Gregory P. Smith and Serhiy Storchaka in :gh:`143262`.)" +msgstr "پیاده‌سازی زیربنایی base64 در سی‌پایتون اکنون به لطف بهینه‌سازی‌های ساده‌ی پایپ‌لاین CPU، با سرعت ۲ برابر بیشتر کدگذاری و ۳ برابر سریع‌تر کدگشایی می‌کند. (مشارکت‌کرده توسط Gregory P. Smith و Serhiy Storchaka در :gh:`143262`.)" + +msgid "Implementation for Ascii85, Base85, and Z85 encoding has been rewritten in C. Encoding and decoding is now two orders of magnitude faster and consumes two orders of magnitude less memory. (Contributed by James Seo and Serhiy Storchaka in :gh:`101178`.)" +msgstr "پیاده‌سازی کدگذاری‌های Ascii85، Base85 و Z85 به زبان C بازنویسی شده است. کدگذاری و کدگشایی اکنون دو مرتبه بزرگی سریع‌تر شده‌اند و دو مرتبه بزرگی حافظه‌ی کمتری مصرف می‌کنند. (مشارکت‌کرده توسط James Seo و Serhiy Storchaka در :gh:`101178`.)" + +msgid "Implementation for Base32 has been rewritten in C. Encoding and decoding is now two orders of magnitude faster. (Contributed by James Seo in :gh:`146192`.)" +msgstr "پیاده‌سازی Base32 با زبان C بازنویسی شده است. کدگذاری و کدگشایی اکنون دو مرتبه سریع‌تر شده است. (مشارکت‌کننده: James Seo در :gh:`146192`.)" + +msgid "csv" +msgstr "csv" + +msgid ":meth:`csv.Sniffer.sniff` delimiter detection is now up to 1.6x faster. (Contributed by Maurycy Pawłowski-Wieroński in :gh:`137628`.)" +msgstr "تشخیص جداکننده در :meth:`csv.Sniffer.sniff` اکنون تا ۱.۶ برابر سریع‌تر شده است. (مشارکت‌کننده: Maurycy Pawłowski-Wieroński در :gh:`137628`.)" + +msgid "Upgraded experimental JIT compiler" +msgstr "ارتقاهای اساسی کامپایلر درجا (JIT)" + +msgid "Results from the `pyperformance `__ benchmark suite report a `7-8% `__ geometric mean performance improvement for the JIT over the standard CPython interpreter built with all optimizations enabled on x86-64 Linux. On AArch64 macOS, the JIT has an `11-12% `__ speedup over the :ref:`tail calling interpreter ` with all optimizations enabled. The speedups for JIT builds versus no JIT builds range from roughly 15% slowdown to over 100% speedup (ignoring the ``unpack_sequence`` microbenchmark) on x86-64 Linux and AArch64 macOS systems." +msgstr "نتایج حاصل از مجموعه بنچمارک `pyperformance `__ بهبود عملکرد میانگین هندسی `7-8% `__ را برای کامپایلر درجا (JIT) نسبت به مفسر استاندارد سی‌پایتون (CPython) که با فعال بودن تمامی بهینه‌سازی‌ها روی لینوکس x86-64 ساخته شده است، گزارش می‌دهد. روی مک‌اوس AArch64، کامپایلر درجا (JIT) دارای سرعت اجرای `11-12% `__ سریع‌تر نسبت به :ref:`مفسر فراخوانی تهی ` با تمام بهینه‌سازی‌های فعال است. بهبودهای سرعت برای ساخت‌های کامپایلر درجا (JIT) در مقایسه با ساخت‌های بدون آن، از حدود ۱۵ درصد کندی تا بیش از ۱۰۰ درصد سرعت بیشتر (با صرف‌نظر کردن از ریزبنچمارک ``unpack_sequence``) در سیستم‌های لینوکس x86-64 و مک‌اوس AArch64 متغیر است." + +msgid "The major upgrades to the JIT are:" +msgstr "ارتقاهای اصلی کامپایلر درجا (JIT) عبارتند از:" + +msgid "LLVM 21 build-time dependency" +msgstr "وابستگی زمان ساخت LLVM 21" + +msgid "New tracing frontend" +msgstr "رابط فرهنگی ردیابی جدید" + +msgid "Basic register allocation in the JIT" +msgstr "تخصیص ثبات پایه در کامپایلر درجا (JIT)" + +msgid "More JIT optimizations" +msgstr "بهینه‌سازی‌های بیشتر کامپایلر درجا (JIT)" + +msgid "GDB and GNU ``backtrace()`` unwinding support" +msgstr "پشتیبانی از باز کردن پشته (unwinding) با GDB و ``backtrace()`` در گنو (GNU)" + +msgid "Better machine code generation" +msgstr "تولید کد ماشین بهتر" + +msgid "The JIT compiler now uses LLVM 21 for build-time stencil generation. As always, LLVM is only needed when building CPython with the JIT enabled; end users running Python do not need LLVM installed. Instructions for installing LLVM can be found in the `JIT compiler documentation `__ for all supported platforms. (Contributed by Savannah Ostrowski in :gh:`140973`.)" +msgstr "کامپایلر درجا (JIT) اکنون از LLVM 21 برای تولید استنسیل در زمان ساخت استفاده می‌کند. مثل همیشه، LLVM فقط هنگام ساخت سی‌پایتون (CPython) با کامپایلر درجا (JIT) فعال مورد نیاز است؛ کاربران نهایی که پایتون را اجرا می‌کنند نیازی به نصب LLVM ندارند. دستورالعمل‌های نصب LLVM را می‌توانید در `مستندات کامپایلر درجا (JIT) `__ برای تمام پلتفرم‌های پشتیبانی‌شده پیدا کنید. (مشارکت‌کننده: Savannah Ostrowski در :gh:`140973`.)" + +msgid "A new tracing frontend" +msgstr "رابط فرهنگی ردیابی جدید" + +msgid "The JIT compiler now supports significantly more bytecode operations and control flow than in Python 3.14, enabling speedups on a wider variety of code. For example, simple Python object creation is now understood by the 3.15 JIT compiler. Overloaded operations and generators are also partially supported. This was made possible by an overhauled JIT tracing frontend that records actual execution paths through code, rather than estimating them as the previous implementation did. (Contributed by Ken Jin in :gh:`139109`. Support for Windows added by Mark Shannon in :gh:`141703`.)" +msgstr "کامپایلر درجا (JIT) اکنون به طور قابل توجهی از عملیات بایت‌کد و جریان کنترلی بیشتری نسبت به پایتون 3.14 پشتیبانی می‌کند که امکان افزایش سرعت را در طیف وسیع‌تری از کد فراهم می‌کند. برای مثال، ایجاد شیء ساده‌ی پایتون اکنون توسط کامپایلر درجا (JIT) نسخه‌ی 3.15 درک می‌شود. عملیات‌های سربارگذاری‌شده و تولیدگرها نیز به طور جزئی پشتیبانی می‌شوند. این امر با ارتقای اساسی رابط فرهنگی ردیابی کامپایلر درجا (JIT) ممکن شده است که به جای تخمین زدن مسیرهای اجرا مانند پیاده‌سازی قبلی، مسیرهای اجرای واقعی را از طریق کد ثبت می‌کند. (مشارکت‌کننده: Ken Jin در :gh:`139109`. پشتیبانی از ویندوز توسط Mark Shannon در :gh:`141703` اضافه شد.)" + +msgid "A basic form of register allocation has been added to the JIT compiler's optimizer. This allows the JIT compiler to avoid certain stack operations altogether and instead operate on registers. This allows the JIT to produce more efficient traces by avoiding reads and writes to memory. (Contributed by Mark Shannon in :gh:`135379`.)" +msgstr "یک شکل اولیه‌ی از تخصیص ثبات به بهینه‌ساز کامپایلر درجا (JIT) اضافه شده است. این امر به کامپایلر درجا (JIT) اجازه می‌دهد تا از برخی عملیات پشته کاملاً اجتناب کند و در عوض روی ثبات‌ها کار کند. این کار به کامپایلر درجا (JIT) اجازه می‌دهد با اجتناب از خواندن و نوشتن در حافظه، ردوندهای (traces) کارآمدتری تولید کند. (مشارکت‌کننده: Mark Shannon در :gh:`135379`.)" + +msgid "More `constant-propagation `__ is now performed. This means when the JIT compiler detects that certain user code results in constants, the code can be simplified by the JIT. (Contributed by Ken Jin and Savannah Ostrowski in :gh:`132732`.)" +msgstr "اکنون انتشار ثابت بیشتری (`constant-propagation `__) انجام می‌شود. این بدان معناست که وقتی کامپایلر درجا (JIT) تشخیص می‌دهد که کدهای خاص کاربر به مقادیر ثابت منجر می‌شوند، کد می‌تواند توسط کامپایلر درجا (JIT) ساده‌سازی شود. (مشارکت‌کنندگان: Ken Jin و Savannah Ostrowski در :gh:`132732`.)" + +msgid ":term:`Reference counts ` are avoided whenever it is safe to do so. This generally reduces the cost of most operations in Python. (Contributed by Ken Jin, Donghee Na, Zheao Li, Hai Zhu, Savannah Ostrowski, Reiden Ong, Noam Cohen, Tomas Roun, PuQing, Cajetan Rodrigues, and Sacul in :gh:`134584`.)" +msgstr "هر زمان که انجام آن ایمن باشد، از :term:`شماره‌ی ارجاع ` اجتناب می‌شود. این موضوع به طور کلی هزینه‌ی بیشتر عملیات‌ها را در پایتون کاهش می‌دهد. (مشارکت‌کنندگان: Ken Jin, Donghee Na, Zheao Li, Hai Zhu, Savannah Ostrowski, Reiden Ong, Noam Cohen, Tomas Roun, PuQing, Cajetan Rodrigues, و Sacul در :gh:`134584`.)" + +msgid "By tracking unique references to objects, the JIT optimizer can now eliminate reference count updates and perform in-place operations on ints and floats. (Contributed by Reiden Ong, and Pieter Eendebak in :gh:`143414` and :gh:`146306`.)" +msgstr "بهینه‌ساز کامپایلر درجا (JIT) با پیگیری ارجاعات یکتا به شیءها، اکنون می‌تواند به‌روزرسانی‌های شماره‌ی ارجاع را حذف کرده و عملیات درون‌جا (in-place) را روی اعداد صحیح و اعداد اعشاری انجام دهد. (مشارکت‌کنندگان: Reiden Ong و Pieter Eendebak در :gh:`143414` و :gh:`146306`.)" + +msgid "The JIT optimizer now supports significantly more operations than in 3.14. (Contributed by Kumar Aditya, Ken Jin, Jiahao Li, and Sacul in :gh:`131798`.)" +msgstr "بهینه‌ساز کامپایلر درجا (JIT) اکنون به طور قابل توجهی از عملیات بیشتری نسبت به نسخه‌ی 3.14 پشتیبانی می‌کند. (مشارکت‌کنندگان: Kumar Aditya, Ken Jin, Jiahao Li, و Sacul در :gh:`131798`.)" + +msgid "The JIT compiler now publishes unwind information for generated machine code to the GDB interface on supported Linux ELF platforms. When libgcc frame registration is available, the same unwind information is also registered for GNU ``backtrace()`` stack walkers. This allows native debuggers, crash handlers, and diagnostic tools using these mechanisms to unwind through JIT frames instead of stopping at generated code. (Contributed by Diego Russo and Pablo Galindo Salgado in :gh:`146071` and :gh:`149104`.)" +msgstr "کامپایلر درجا (JIT) اکنون اطلاعات بازکردن پشته (unwind) را برای کد ماشین تولیدشده در پلتفرم‌های پشتیبانی‌شده‌ی لینوکس ELF به رابط GDB منتشر می‌کند. هنگامی که ثبت قاب (frame) در libgcc دردسترس باشد، همان اطلاعات بازکردن پشته برای پیمایش‌گرهای پشته‌ی GNU ``backtrace()`` نیز ثبت می‌شود. این امر به دیباگرهای بومی، هندلرهای فروپاشی و ابزارهای تشخیصی که از این مکانیسم‌ها استفاده می‌کنند اجازه می‌دهد تا به‌جای متوقف شدن در کد تولیدشده، از طریق قاب‌های کامپایلر درجا (JIT) به عقب برگردند. (مشارکت‌کنندگان: Diego Russo و Pablo Galindo Salgado در :gh:`146071` و :gh:`149104`.)" + +msgid "The JIT compiler's machine code generator now produces better machine code for x86-64 and AArch64 macOS and Linux targets. In general, users should experience lower memory usage for generated machine code and more efficient machine code versus 3.14. (Contributed by Brandt Bucher in :gh:`136528` and :gh:`135905`. Implementation for AArch64 contributed by Mark Shannon in :gh:`139855`. Additional optimizations for AArch64 contributed by Mark Shannon and Diego Russo in :gh:`140683` and :gh:`142305`.)" +msgstr "تولیدگر کد ماشین کامپایلر درجا (JIT) اکنون کد ماشین بهتری برای اهداف x86-64 و AArch64 در سیستم‌عامل‌های مک‌اوس و لینوکس تولید می‌کند. به‌طور کلی، کاربران باید در مقایسه با نسخه‌ی ۳.۱۴، مصرف حافظه‌ی کمتری برای کد ماشین تولیدشده و کد ماشین کارآمدتری را تجربه کنند. (مشارکت‌کننده: Brandt Bucher در :gh:`136528` و :gh:`135905`. پیاده‌سازی برای AArch64 توسط Mark Shannon در :gh:`139855`. بهینه‌سازی‌های اضافی برای AArch64 توسط Mark Shannon و Diego Russo در :gh:`140683` و :gh:`142305`.)" + +msgid "Maintainability" +msgstr "قابلیت نگهداری" + +msgid "The JIT optimizer's operations have been simplified. This was made possible by a refactoring of JIT data structures. (Contributed by Zhongtian Zheng in :gh:`148211` and Hai Zhu in :gh:`143421`.)" +msgstr "عملیات بهینه‌ساز کامپایلر درجا (JIT) ساده‌سازی شده‌اند. این کار با بازسازی ساختارهای داده‌ی کامپایلر درجا (JIT) امکان‌پذیر شد. (مشارکت‌کنندگان: Zhongtian Zheng در :gh:`148211` و Hai Zhu در :gh:`143421`.)" + +msgid "Removed" +msgstr "حذف‌شده" + +msgid "The constructors of :ref:`AST nodes ` now raise a :exc:`TypeError` when a required argument is omitted or when a keyword argument that does not map to a field on the AST node is passed. These cases had previously raised a :exc:`DeprecationWarning` since Python 3.13. (Contributed by Brian Schubert and Jelle Zijlstra in :gh:`137600` and :gh:`105858`.)" +msgstr "سازنده‌های :ref:`AST nodes ` اکنون هنگامی که یک آرگومان ضروری حذف شود یا یک آرگومان کلیدواژه‌ای که به فیلدی در درخت نحوی انتزاعی (AST) نگاشت نمی‌شود ارسال شود، یک :exc:`TypeError` بالا می‌آورند. این موارد پیش‌تر از نسخه‌ی ۳.۱۳ پایتون یک :exc:`DeprecationWarning` بالا می‌آوردند. (مشارکت‌کنندگان: Brian Schubert و Jelle Zijlstra در :gh:`137600` و :gh:`105858`.)" + +msgid "collections.abc" +msgstr "collections.abc" + +msgid ":class:`collections.abc.ByteString` has been removed from ``collections.abc.__all__``. :class:`!collections.abc.ByteString` has been deprecated since Python 3.12, and is scheduled for removal in Python 3.17. (Contributed by Alex Waygood in :gh:`118803`.)" +msgstr ":class:`collections.abc.ByteString` از ``collections.abc.__all__`` حذف شده است. :class:`!collections.abc.ByteString` از نسخه‌ی ۳.۱۲ پایتون منسوخ شده و قرار است در نسخه‌ی ۳.۱۷ پایتون حذف شود. (مشارکت‌کننده: Alex Waygood در :gh:`118803`.)" + +msgid "Removed the undocumented function :func:`!ctypes.SetPointerType`, which has been deprecated since Python 3.13. (Contributed by Bénédikt Tran in :gh:`133866`.)" +msgstr "تابع مستندنشده‌ی :func:`!ctypes.SetPointerType` که از نسخه‌ی ۳.۱۳ پایتون منسوخ شده بود، حذف شد. (مشارکت‌کننده: Bénédikt Tran در :gh:`133866`.)" + +msgid "datetime" +msgstr "datetime" + +msgid ":meth:`~datetime.datetime.strptime` now raises :exc:`ValueError` when the format string contains ``%d`` (day of month) without a year directive. This has been deprecated since Python 3.13. (Contributed by Stan Ulbrych and Gregory P. Smith in :gh:`70647`.)" +msgstr ":meth:`~datetime.datetime.strptime` اکنون زمانی که رشته‌ی قالب حاوی ``%d`` (روز ماه) بدون دایرکتیو سال باشد، :exc:`ValueError` بالا می‌آورد. این مورد از نسخه‌ی ۳.۱۳ پایتون منسوخ شده بود. (مشارکت‌کنندگان: Stan Ulbrych و Gregory P. Smith در :gh:`70647`.)" + +msgid "glob" +msgstr "glob" + +msgid "Removed the undocumented :func:`!glob.glob0` and :func:`!glob.glob1` functions, which have been deprecated since Python 3.13. Use :func:`glob.glob` and pass a directory to its *root_dir* argument instead. (Contributed by Barney Gale in :gh:`137466`.)" +msgstr "توابع مستندنشده‌ی :func:`!glob.glob0` و :func:`!glob.glob1` که از نسخه‌ی ۳.۱۳ پایتون منسوخ شده بودند، حذف شدند. به‌جای آن از :func:`glob.glob` استفاده کنید و یک پوشه را به آرگومان *root_dir* آن ارسال کنید. (مشارکت‌کننده: Barney Gale در :gh:`137466`.)" + +msgid "Removed the :class:`!CGIHTTPRequestHandler` class and the ``--cgi`` flag from the :program:`python -m http.server` command-line interface. They were deprecated in Python 3.13. (Contributed by Bénédikt Tran in :gh:`133810`.)" +msgstr "کلاس :class:`!CGIHTTPRequestHandler` و پرچم ``--cgi`` از رابط خط فرمان :program:`python -m http.server` حذف شدند. آن‌ها در نسخه‌ی ۳.۱۳ پایتون منسوخ شده بودند. (مشارکت‌کننده: Bénédikt Tran در :gh:`133810`.)" + +msgid "importlib" +msgstr "importlib" + +msgid "The ``load_module()`` methods of :class:`~importlib.abc.Loader` and its subclasses is removed. The import system will no longer call it when defined on custom subclasses. The method has been deprecated in favor of :meth:`~importlib.abc.Loader.exec_module` since Python 3.4. (Contributed by Brett Cannon in :gh:`97850`.)" +msgstr "متدهای ``load_module()`` از :class:`~importlib.abc.Loader` و زیرکلاس‌های آن حذف شدند. سیستم ایمپورت دیگر هنگام تعریف روی زیرکلاس‌های سفارشی، آن را فراخوانی نخواهد کرد. این متد از نسخه‌ی ۳.۴ پایتون به نفع :meth:`~importlib.abc.Loader.exec_module` منسوخ شده بود. (مشارکت‌کننده: Brett Cannon در :gh:`97850`.)" + +msgid "importlib.resources" +msgstr "importlib.resources" + +msgid "Removed deprecated ``package`` parameter from :func:`importlib.resources.files` function. (Contributed by Semyon Moroz in :gh:`138044`.)" +msgstr "پارامتر منسوخ‌شده‌ی ``package`` از تابع :func:`importlib.resources.files` حذف شد. (مشارکت‌کننده: Semyon Moroz در :gh:`138044`.)" + +msgid "Removed deprecated :meth:`!pathlib.PurePath.is_reserved`. Use :func:`os.path.isreserved` to detect reserved paths on Windows. (Contributed by Nikita Sobolev in :gh:`133875`.)" +msgstr "متد منسوخ‌شده‌ی :meth:`!pathlib.PurePath.is_reserved` حذف شد. برای شناسایی مسیرهای رزرو شده در ویندوز، از :func:`os.path.isreserved` استفاده کنید. (مشارکت‌کننده: Nikita Sobolev در :gh:`133875`.)" + +msgid "platform" +msgstr "platform" + +msgid "Removed the :func:`!platform.java_ver` function, which was deprecated since Python 3.13. (Contributed by Alexey Makridenko in :gh:`133604`.)" +msgstr "تابع :func:`!platform.java_ver` که از نسخه‌ی ۳.۱۳ پایتون منسوخ شده بود، حذف شد. (مشارکت توسط Alexey Makridenko در :gh:`133604`.)" + +msgid "sre_*" +msgstr "sre_*" + +msgid "Removed :mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse` modules. (Contributed by Stan Ulbrych in :gh:`135994`.)" +msgstr "ماژول‌های :mod:`!sre_compile`، :mod:`!sre_constants` و :mod:`!sre_parse` حذف شدند. (مشارکت توسط Stan Ulbrych در :gh:`135994`.)" + +msgid "sysconfig" +msgstr "sysconfig" + +msgid "Removed the *check_home* parameter of :func:`sysconfig.is_python_build`. (Contributed by Filipe Laíns in :gh:`92897`.)" +msgstr "پارامتر *check_home* از :func:`sysconfig.is_python_build` حذف شد. (مشارکت توسط Filipe Laíns در :gh:`92897`.)" + +msgid "Remove support for arbitrary positional or keyword arguments in the C implementation of :class:`~threading.RLock` objects. This was deprecated in Python 3.14. (Contributed by Bénédikt Tran in :gh:`134087`.)" +msgstr "پشتیبانی از آرگومان‌های جایگاهی یا کلیدواژه‌ای دلخواه در پیاده‌سازی C اشیاء :class:`~threading.RLock` حذف شد. این قابلیت در نسخه‌ی ۳.۱۴ پایتون منسوخ شده بود. (مشارکت توسط Bénédikt Tran در :gh:`134087`.)" + +msgid "Removed :attr:`!codeobject.co_lnotab` from :class:`types.CodeType`, deprecated since Python 3.12 by :pep:`626`. (Contributed by Nikita Sobolev in :gh:`134690`.)" +msgstr "ویژگی :attr:`!codeobject.co_lnotab` از :class:`types.CodeType` حذف شد. این ویژگی از نسخه‌ی ۳.۱۲ پایتون توسط :pep:`626` منسوخ شده بود. (مشارکت توسط Nikita Sobolev در :gh:`134690`.)" + +msgid ":class:`typing.ByteString` has been removed from ``typing.__all__``. :class:`!typing.ByteString` has been deprecated since Python 3.9, and is scheduled for removal in Python 3.17. (Contributed by Alex Waygood in :gh:`118803`.)" +msgstr ":class:`typing.ByteString` از ``typing.__all__`` حذف شده است. :class:`!typing.ByteString` از نسخه‌ی ۳.۹ پایتون منسوخ شده و برنامه‌ریزی شده است که در نسخه‌ی ۳.۱۷ حذف شود. (مشارکت توسط Alex Waygood در :gh:`118803`.)" + +msgid "The undocumented keyword argument syntax for creating :class:`~typing.NamedTuple` classes (for example, ``Point = NamedTuple(\"Point\", x=int, y=int)``) is no longer supported. Use the class-based syntax or the functional syntax instead. (Contributed by Bénédikt Tran in :gh:`133817`.)" +msgstr "سینتکس آرگومان کلیدواژه‌ای مستندنشده برای ایجاد کلاس‌های :class:`~typing.NamedTuple` (برای مثال، ``Point = NamedTuple(\"Point\", x=int, y=int)``) دیگر پشتیبانی نمی‌شود. به‌جای آن از سینتکس مبتنی بر کلاس یا سینتکس تابعی استفاده کنید. (مشارکت توسط Bénédikt Tran در :gh:`133817`.)" + +msgid "Using ``TD = TypedDict(\"TD\")`` or ``TD = TypedDict(\"TD\", None)`` to construct a :class:`~typing.TypedDict` type with zero fields is no longer supported. Use ``class TD(TypedDict): pass`` or ``TD = TypedDict(\"TD\", {})`` instead. (Contributed by Bénédikt Tran in :gh:`133823`.)" +msgstr "استفاده از ``TD = TypedDict(\"TD\")`` یا ``TD = TypedDict(\"TD\", None)`` برای ساخت یک نوع :class:`~typing.TypedDict` بدون هیچ فیلدی دیگر پشتیبانی نمی‌شود. به‌جای آن از ``class TD(TypedDict): pass`` یا ``TD = TypedDict(\"TD\", {})`` استفاده کنید. (مشارکت توسط Bénédikt Tran در :gh:`133823`.)" + +msgid "Deprecated :deco:`!typing.no_type_check_decorator` has been removed. (Contributed by Nikita Sobolev in :gh:`133601`.)" +msgstr "دکوراتور منسوخ :deco:`!typing.no_type_check_decorator` حذف شد. (مشارکت توسط Nikita Sobolev در :gh:`133601`.)" + +msgid "Removed the ``getmark()``, ``setmark()`` and ``getmarkers()`` methods of the :class:`~wave.Wave_read` and :class:`~wave.Wave_write` classes, which were deprecated since Python 3.13. (Contributed by Bénédikt Tran in :gh:`133873`.)" +msgstr "متدهای ``getmark()``، ``setmark()`` و ``getmarkers()`` از کلاس‌های :class:`~wave.Wave_read` و :class:`~wave.Wave_write` که از نسخه‌ی ۳.۱۳ پایتون منسوخ شده بودند، حذف شدند. (مشارکت توسط Bénédikt Tran در :gh:`133873`.)" + +msgid "zipimport" +msgstr "zipimport" + +msgid "Remove deprecated :meth:`!zipimport.zipimporter.load_module`. Use :meth:`zipimport.zipimporter.exec_module` instead. (Contributed by Jiahao Li in :gh:`133656`.)" +msgstr "متد منسوخ :meth:`!zipimport.zipimporter.load_module` را حذف کنید. به‌جای آن از :meth:`zipimport.zipimporter.exec_module` استفاده کنید. (مشارکت توسط Jiahao Li در :gh:`133656`.)" + +msgid "Deprecated" +msgstr "منسوخ‌شده‌ها" + +msgid "New deprecations" +msgstr "موارد منسوخ جدید" + +msgid ":mod:`ast`:" +msgstr ":mod:`ast`:" + +msgid "Creating instances of abstract AST nodes (such as :class:`ast.AST` or :class:`!ast.expr`) is deprecated and will raise an error in Python 3.20." +msgstr "ایجاد نمونه‌ از گره‌های انتزاعی AST (مانند :class:`ast.AST` یا :class:`!ast.expr`) منسوخ شده است و در نسخه‌ی ۳.۲۰ پایتون خطایی ایجاد خواهد کرد." + +msgid "(Contributed by Brian Schubert in :gh:`116021`.)" +msgstr "(مشارکت توسط Brian Schubert در :gh:`116021`.)" + +msgid ":mod:`base64`:" +msgstr ":mod:`base64`:" + +msgid "Accepting the ``+`` and ``/`` characters with an alternative alphabet in :func:`~base64.b64decode` and :func:`~base64.urlsafe_b64decode` is now deprecated. In future Python versions they will be errors in the strict mode and discarded in the non-strict mode. (Contributed by Serhiy Storchaka in :gh:`125346`.)" +msgstr "پذیرش نویسه‌های ``+`` و ``/`` با الفبای جایگزین در :func:`~base64.b64decode` و :func:`~base64.urlsafe_b64decode` اکنون منسوخ شده است. در نسخه‌های آینده‌ی پایتون، این موارد در حالت سخت‌گیرانه (strict mode) به خطا تبدیل می‌شوند و در حالت غیرسخت‌گیرانه نادیده گرفته خواهند شد. (مشارکت توسط Serhiy Storchaka در :gh:`125346`.)" + +msgid "CLI:" +msgstr "رابط خط فرمان (CLI):" + +msgid "Deprecate :option:`-b` and :option:`!-bb` command-line options and schedule them to become no-ops in Python 3.17. These were primarily helpers for the Python 2 -> 3 transition. Starting with Python 3.17, no :exc:`BytesWarning` will be raised for these cases; use a type checker instead." +msgstr "گزینه‌های خط فرمان :option:`-b` و :option:`!-bb` منسوخ شده و برنامه‌ریزی شده است که در پایتون 3.17 به عملیات بی‌اثر تبدیل شوند. این گزینه‌ها در اصل کمکی برای انتقال از پایتون ۲ به ۳ بودند. از پایتون 3.17 به بعد، هیچ :exc:`BytesWarning` برای این موارد صادر نخواهد شد؛ به‌جای آن از یک بررسی‌کننده نوع استفاده کنید." + +msgid "(Contributed by Nikita Sobolev in :gh:`136355`.)" +msgstr "(مشارکت توسط Nikita Sobolev در :gh:`136355`.)" + +msgid ":mod:`collections.abc`:" +msgstr ":mod:`collections.abc`:" + +msgid "The following statements now cause ``DeprecationWarning``\\ s to be emitted at runtime:" +msgstr "دستورات زیر اکنون باعث می‌شوند که ``DeprecationWarning``\\ ها در زمان ران‌تایم صادر شوند:" + +msgid "``from collections.abc import ByteString``" +msgstr "``from collections.abc import ByteString``" + +msgid "``import collections.abc; collections.abc.ByteString``." +msgstr "``import collections.abc; collections.abc.ByteString``." + +msgid "``DeprecationWarning``\\ s were already emitted if :class:`collections.abc.ByteString` was subclassed or used as the second argument to :func:`isinstance` or :func:`issubclass`, but warnings were not previously emitted if it was merely imported or accessed from the :mod:`!collections.abc` module. (Contributed by Alex Waygood in :gh:`118803`.)" +msgstr "اگر از :class:`collections.abc.ByteString` زیرکلاس‌دهی می‌شد یا به‌عنوان آرگومان دوم در :func:`isinstance` یا :func:`issubclass` استفاده می‌شد، هشدارهای ``DeprecationWarning`` از قبل صادر می‌شدند، اما اگر این کلاس صرفاً از ماژول :mod:`!collections.abc` وارد (import) یا دسترسی می‌شد، پیش‌تر هشداری صادر نمی‌شد. (مشارکت توسط Alex Waygood در :gh:`118803`.)" + +msgid ":mod:`hashlib`:" +msgstr ":mod:`hashlib`:" + +msgid "In hash function constructors such as :func:`~hashlib.new` or the direct hash-named constructors such as :func:`~hashlib.md5` and :func:`~hashlib.sha256`, the optional initial data parameter could also be passed as a keyword argument named ``data=`` or ``string=`` in various :mod:`hashlib` implementations." +msgstr "در سازنده‌های توابع هش مانند :func:`~hashlib.new` یا سازنده‌های مستقیم با نام هش مانند :func:`~hashlib.md5` و :func:`~hashlib.sha256`، پارامتر داده‌ی اولیه اختیاری را می‌توانستید در پیاده‌سازی‌های مختلف :mod:`hashlib` به عنوان یک آرگومان کلیدواژه‌ای با نام ``data=`` یا ``string=`` نیز ارسال کنید." + +msgid "Support for the ``string`` keyword argument name is now deprecated and is slated for removal in Python 3.19. Prefer passing the initial data as a positional argument for maximum backwards compatibility." +msgstr "پشتیبانی از نام آرگومان کلیدواژه‌ای ``string`` اکنون منسوخ شده است و برنامه‌ریزی شده تا در پایتون 3.19 حذف شود. برای حداکثر سازگاری با نسخه‌های قبل، ترجیح دهید داده‌ی اولیه را به‌عنوان یک آرگومان جایگاهی ارسال کنید." + +msgid "(Contributed by Bénédikt Tran in :gh:`134978`.)" +msgstr "(مشارکت توسط Bénédikt Tran در :gh:`134978`.)" + +msgid ":mod:`http.cookies`:" +msgstr ":mod:`http.cookies`:" + +msgid ":meth:`Morsel.js_output ` and :meth:`BaseCookie.js_output ` are deprecated and will be removed in Python 3.19. Use :meth:`Morsel.output ` or :meth:`BaseCookie.output ` instead. (Contributed by kishorhange111 in :gh:`148849`.)" +msgstr "متدهای :meth:`Morsel.js_output ` و :meth:`BaseCookie.js_output ` منسوخ شده‌اند و در پایتون 3.19 حذف خواهند شد. به‌جای آن‌ها از :meth:`Morsel.output ` یا :meth:`BaseCookie.output ` استفاده کنید. (مشارکت توسط kishorhange111 در :gh:`148849`.)" + +msgid ":mod:`imaplib`:" +msgstr ":mod:`imaplib`:" + +msgid "Altering :attr:`IMAP4.file ` is now deprecated and slated for removal in Python 3.19. This property is now unused and changing its value does *not* explicitly close the current file. (Contributed by Bénédikt Tran in :gh:`142307`.)" +msgstr "تغییر دادن :attr:`IMAP4.file ` اکنون منسوخ شده است و برنامه‌ریزی شده تا در پایتون 3.19 حذف شود. این ویژگی اکنون استفاده نمی‌شود و تغییر مقدار آن پرونده‌ی فعلی را به طور صریح نمی‌بندد. (مشارکت توسط Bénédikt Tran در :gh:`142307`.)" + +msgid ":mod:`profile`:" +msgstr ":mod:`profile`:" + +msgid "The :mod:`!profile` module is deprecated and will be removed in Python 3.17. Use :mod:`profiling.tracing` instead, which provides a compatible API. See :pep:`799` for details. (Contributed by Pablo Galindo and László Kiss Kollár in :gh:`138122`.)" +msgstr "ماژول :mod:`!profile` منسوخ شده است و در پایتون 3.17 حذف خواهد شد. به‌جای آن از :mod:`profiling.tracing` استفاده کنید که یک API سازگار فراهم می‌کند. برای جزئیات بیشتر :pep:`799` را ببینید. (مشارکت توسط Pablo Galindo و László Kiss Kollár در :gh:`138122`.)" + +msgid ":mod:`re`:" +msgstr ":mod:`re`:" + +msgid ":func:`re.match` and :meth:`re.Pattern.match` are now :term:`soft deprecated` in favor of the new :func:`re.prefixmatch` and :meth:`re.Pattern.prefixmatch` APIs, which have been added as alternate, more explicit names. These are intended to be used to alleviate confusion around what *match* means by following the Zen of Python's *\"Explicit is better than implicit\"* mantra. Most other language regular expression libraries use an API named *match* to mean what Python has always called *search*." +msgstr "توابع :func:`re.match` و :meth:`re.Pattern.match` اکنون به صورت :term:`نسبتاً منسوخ ` درآمده‌اند و APIهای جدید :func:`re.prefixmatch` و :meth:`re.Pattern.prefixmatch` جایگزین آن‌ها شده‌اند که به عنوان نام‌های جایگزین و صریح‌تر اضافه شده‌اند. هدف از این کار، کاهش سردرگمی درباره‌ی معنای *match* با پیروی از شعار زن پایتون یعنی *\"Explicit is better than implicit\"* (صریح بهتر از ضمنی است) است. بیشتر کتابخانه‌های عبارات باقاعده در زبان‌های دیگر از API با نام *match* برای معنایی استفاده می‌کنند که پایتون همیشه آن را *search* نامیده است." + +msgid "We **do not** plan to remove the older :func:`!match` name, as it has been used in code for over 30 years. Code supporting older versions of Python should continue to use :func:`!match`, while new code should prefer :func:`!prefixmatch`. See :ref:`prefixmatch-vs-match`." +msgstr "ما برنامه‌ای برای حذف نام قدیمی‌تر :func:`!match` **نداریم**، زیرا بیش از ۳۰ سال است که در کدها استفاده می‌شود. کدهایی که از نسخه‌های قدیمی‌تر پایتون پشتیبانی می‌کنند باید همچنان از :func:`!match` استفاده کنند، در حالی که کدهای جدید باید :func:`!prefixmatch` را ترجیح دهند. به :ref:`prefixmatch-vs-match` مراجعه کنید." + +msgid "(Contributed by Gregory P. Smith in :gh:`86519` and Hugo van Kemenade in :gh:`148100`.)" +msgstr "(مشارکت‌کرده توسط Gregory P. Smith در :gh:`86519` و Hugo van Kemenade در :gh:`148100`.)" + +msgid ":mod:`struct`:" +msgstr ":mod:`struct`:" + +msgid "Calling ``Struct.__new__()`` without a required argument is now deprecated and will be removed in Python 3.20. Calling the :meth:`~object.__init__` method on an initialized :class:`~struct.Struct` object is deprecated and will be removed in Python 3.20." +msgstr "فراخوانی ``Struct.__new__()`` بدون آرگومان الزامی اکنون منسوخ شده و در پایتون ۳.۲۰ حذف خواهد شد. فراخوانی متد :meth:`~object.__init__` روی یک شیء :class:`~struct.Struct` مقداردهی اولیه شده، منسوخ شده است و در پایتون ۳.۲۰ حذف خواهد شد." + +msgid "(Contributed by Sergey B Kirpichev and Serhiy Storchaka in :gh:`143715`.)" +msgstr "(مشارکت‌کرده توسط Sergey B Kirpichev و Serhiy Storchaka در :gh:`143715`.)" + +msgid "The ``'F'`` and ``'D'`` type codes are now :term:`soft deprecated` in favor of the two-letter forms ``'Zf'`` and ``'Zd'``. (Contributed by Sergey B Kirpichev in :gh:`121249`.)" +msgstr "کدهای نوع ``'F'`` و ``'D'`` اکنون به سود فرم‌های دوحرفی ``'Zf'`` و ``'Zd'`` به صورت :term:`نسبتاً منسوخ ` درآمده‌اند. (مشارکت‌کرده توسط Sergey B Kirpichev در :gh:`121249`.)" + +msgid ":mod:`typing`:" +msgstr ":mod:`typing`:" + +msgid "``from typing import ByteString``" +msgstr "``from typing import ByteString``" + +msgid "``import typing; typing.ByteString``." +msgstr "``import typing; typing.ByteString``." + +msgid "``DeprecationWarning``\\ s were already emitted if :class:`typing.ByteString` was subclassed or used as the second argument to :func:`isinstance` or :func:`issubclass`, but warnings were not previously emitted if it was merely imported or accessed from the :mod:`!typing` module. (Contributed by Alex Waygood in :gh:`118803`.)" +msgstr "اگر :class:`typing.ByteString` زیرکلاس‌ زده می‌شد یا به عنوان آرگومان دوم به :func:`isinstance` یا :func:`issubclass` ارسال می‌گردید، هشدار‌های ``DeprecationWarning`` از پیش صادر می‌شدند، اما پیش‌تر اگر این کلاس صرفاً از ماژول :mod:`!typing` وارد (import) یا به آن دسترسی پیدا می‌شد، هشداری صادر نمی‌شد. (توسط Alex Waygood در :gh:`118803` مشارکت داده شده است.)" + +msgid "It is deprecated to call :func:`isinstance` and :func:`issubclass` checks on protocol classes that were not explicitly decorated with :func:`!runtime_checkable` but that inherit from a runtime-checkable protocol class. This will raise a :exc:`TypeError` in Python 3.20." +msgstr "فراخوانی بررسی‌های :func:`isinstance` و :func:`issubclass` روی کلاس‌های پروتکلی که صراحتاً با :func:`!runtime_checkable` دکورور نشده‌اند اما از یک کلاس پروتکل قابل‌بررسی در زمان اجرا ارث‌بری می‌کنند، منسوخ شده است. این کار در پایتون ۳.۲۰ یک :exc:`TypeError` ایجاد خواهد کرد." + +msgid "(Contributed by Bartosz Sławecki in :gh:`132604`.)" +msgstr "(مشارکت‌کرده توسط Bartosz Sławecki در :gh:`132604`.)" + +msgid ":mod:`webbrowser`:" +msgstr ":mod:`webbrowser`:" + +msgid ":class:`!webbrowser.MacOSXOSAScript` is deprecated in favour of :class:`!webbrowser.MacOS` and scheduled for removal in Python 3.17. (Contributed by Jeff Lyon in :gh:`137586`.)" +msgstr "کلاس :class:`!webbrowser.MacOSXOSAScript` به نفع :class:`!webbrowser.MacOS` منسوخ شده است و طبق برنامه‌ریزی در پایتون ۳.۱۷ حذف خواهد شد. (مشارکت‌کرده توسط Jeff Lyon در :gh:`137586`.)" + +msgid "``__version__``:" +msgstr "``__version__``:" + +msgid "The ``__version__``, ``version`` and ``VERSION`` attributes have been deprecated in these standard library modules and will be removed in Python 3.20. Use :py:data:`sys.version_info` instead." +msgstr "ویژگی‌های ``__version__``، ``version`` و ``VERSION`` در این ماژول‌های کتابخانه‌ی استاندارد منسوخ شده‌اند و در پایتون ۳.۲۰ حذف خواهند شد. به جای آن از :py:data:`sys.version_info` استفاده کنید." + +msgid ":mod:`argparse`" +msgstr ":mod:`argparse`" + +msgid ":mod:`csv`" +msgstr ":mod:`csv`" + +msgid ":mod:`ctypes`" +msgstr ":mod:`ctypes`" + +msgid ":mod:`!ctypes.macholib`" +msgstr ":mod:`!ctypes.macholib`" + +msgid ":mod:`decimal` (use :data:`decimal.SPEC_VERSION` instead)" +msgstr ":mod:`decimal` (به‌جای آن از :data:`decimal.SPEC_VERSION` استفاده کنید)" + +msgid ":mod:`http.server`" +msgstr ":mod:`http.server`" + +msgid ":mod:`imaplib`" +msgstr ":mod:`imaplib`" + +msgid ":mod:`ipaddress`" +msgstr ":mod:`ipaddress`" + +msgid ":mod:`json`" +msgstr ":mod:`json`" + +msgid ":mod:`logging` (``__date__`` also deprecated)" +msgstr ":mod:`logging` (``__date__`` نیز منسوخ شده است)" + +msgid ":mod:`optparse`" +msgstr ":mod:`optparse`" + +msgid ":mod:`pickle`" +msgstr ":mod:`pickle`" + +msgid ":mod:`platform`" +msgstr ":mod:`platform`" + +msgid ":mod:`re`" +msgstr ":mod:`re`" + +msgid ":mod:`socketserver`" +msgstr ":mod:`socketserver`" + +msgid ":mod:`tabnanny`" +msgstr ":mod:`tabnanny`" + +msgid ":mod:`tarfile`" +msgstr ":mod:`tarfile`" + +msgid ":mod:`tkinter.font`" +msgstr ":mod:`tkinter.font`" + +msgid ":mod:`tkinter.ttk`" +msgstr ":mod:`tkinter.ttk`" + +msgid ":mod:`wsgiref.simple_server`" +msgstr ":mod:`wsgiref.simple_server`" + +msgid ":mod:`xml.etree.ElementTree`" +msgstr ":mod:`xml.etree.ElementTree`" + +msgid ":mod:`!xml.sax.expatreader`" +msgstr ":mod:`!xml.sax.expatreader`" + +msgid ":mod:`xml.sax.handler`" +msgstr ":mod:`xml.sax.handler`" + +msgid ":mod:`zlib`" +msgstr ":mod:`zlib`" + +msgid "(Contributed by Hugo van Kemenade and Stan Ulbrych in :gh:`76007`.)" +msgstr "(مشارکت‌شده توسط Hugo van Kemenade و Stan Ulbrych در :gh:`76007`.)" + +msgid "Pending removal in Python 3.16" +msgstr "حذف احتمالی در پایتون ۳.۱۶" + +msgid "The import system:" +msgstr "سیستم ایمپورت:" + +msgid "Setting :attr:`~module.__loader__` on a module while failing to set :attr:`__spec__.loader ` is deprecated. In Python 3.16, :attr:`!__loader__` will cease to be set or taken into consideration by the import system or the standard library." +msgstr "تنظیم کردن :attr:`~module.__loader__` روی یک ماژول در صورتی که :attr:`__spec__.loader ` تنظیم نشود، منسوخ شده است. در پایتون ۳.۱۶، :attr:`!__loader__` دیگر توسط سیستم ایمپورت یا کتابخانه‌ی استاندارد تنظیم نشده و در نظر گرفته نخواهد شد." + +msgid ":mod:`array`:" +msgstr ":mod:`array`:" + +msgid "The ``'u'`` format code (:c:type:`wchar_t`) has been deprecated in documentation since Python 3.3 and at runtime since Python 3.13. Use the ``'w'`` format code (:c:type:`Py_UCS4`) for Unicode characters instead." +msgstr "کد قالب ``'u'`` (:c:type:`wchar_t`) از نسخه‌ی ۳.۳ پایتون در مستندات و از نسخه‌ی ۳.۱۳ در ران‌تایم منسوخ شده است. به‌جای آن از کد قالب ``'w'`` (:c:type:`Py_UCS4`) برای نویسه‌های یونیکد استفاده کنید." + +msgid ":mod:`asyncio`:" +msgstr ":mod:`asyncio`:" + +msgid ":func:`!asyncio.iscoroutinefunction` is deprecated and will be removed in Python 3.16; use :func:`inspect.iscoroutinefunction` instead. (Contributed by Jiahao Li and Kumar Aditya in :gh:`122875`.)" +msgstr "تابعی :func:`!asyncio.iscoroutinefunction` منسوخ شده است و در پایتون ۳.۱۶ حذف خواهد شد؛ به‌جای آن از :func:`inspect.iscoroutinefunction` استفاده کنید. (مشارکت‌شده توسط Jiahao Li و Kumar Aditya در :gh:`122875`.)" + +msgid ":mod:`asyncio` policy system is deprecated and will be removed in Python 3.16. In particular, the following classes and functions are deprecated:" +msgstr "سیستم سیاست :mod:`asyncio` منسوخ شده است و در پایتون ۳.۱۶ حذف خواهد شد. به‌ویژه، کلاس‌ها و توابع زیر منسوخ شده‌اند:" + +msgid ":class:`asyncio.AbstractEventLoopPolicy`" +msgstr ":class:`asyncio.AbstractEventLoopPolicy`" + +msgid ":class:`asyncio.DefaultEventLoopPolicy`" +msgstr ":class:`asyncio.DefaultEventLoopPolicy`" + +msgid ":class:`asyncio.WindowsSelectorEventLoopPolicy`" +msgstr ":class:`asyncio.WindowsSelectorEventLoopPolicy`" + +msgid ":class:`asyncio.WindowsProactorEventLoopPolicy`" +msgstr ":class:`asyncio.WindowsProactorEventLoopPolicy`" + +msgid ":func:`asyncio.get_event_loop_policy`" +msgstr ":func:`asyncio.get_event_loop_policy`" + +msgid ":func:`asyncio.set_event_loop_policy`" +msgstr ":func:`asyncio.set_event_loop_policy`" + +msgid "Users should use :func:`asyncio.run` or :class:`asyncio.Runner` with *loop_factory* to use the desired event loop implementation." +msgstr "کاربران باید برای استفاده از پیاده‌سازی حلقه‌ی رویداد دلخواه، از :func:`asyncio.run` یا :class:`asyncio.Runner` به همراه *loop_factory* استفاده کنند." + +msgid "For example, to use :class:`asyncio.SelectorEventLoop` on Windows::" +msgstr "برای نمونه، برای استفاده از :class:`asyncio.SelectorEventLoop` روی ویندوز:" + +msgid "" +"import asyncio\n" +"\n" +"async def main():\n" +" ...\n" +"\n" +"asyncio.run(main(), loop_factory=asyncio.SelectorEventLoop)" +msgstr "" +"import asyncio\n" +"\n" +"async def main():\n" +" ...\n" +"\n" +"asyncio.run(main(), loop_factory=asyncio.SelectorEventLoop)" + +msgid "(Contributed by Kumar Aditya in :gh:`127949`.)" +msgstr "(مشارکت‌شده توسط Kumar Aditya در :gh:`127949`.)" + +msgid ":mod:`builtins`:" +msgstr ":mod:`builtins`:" + +msgid "Bitwise inversion on boolean types, ``~True`` or ``~False`` has been deprecated since Python 3.12, as it produces surprising and unintuitive results (``-2`` and ``-1``). Use ``not x`` instead for the logical negation of a Boolean. In the rare case that you need the bitwise inversion of the underlying integer, convert to ``int`` explicitly (``~int(x)``)." +msgstr "وارونسازی بیتی روی انواع داده‌ی بولی، یعنی ``~True`` یا ``~False`` از نسخه‌ی ۳.۱۲ پایتون منسوخ شده است، زیرا نتایج تعجب‌آور و غیرشهودی تولید می‌کند (``-2`` و ``-1``). به‌جای آن برای نفی منطقی یک مقدار بولی از ``not x`` استفاده کنید. در موارد نادر که به وارونسازی بیتی عدد صحیح زیرین نیاز دارید، به‌طور صریح به ``int`` تبدیل کنید (``~int(x)``)." + +msgid ":mod:`functools`:" +msgstr ":mod:`functools`:" + +msgid "Calling the Python implementation of :func:`functools.reduce` with *function* or *sequence* as keyword arguments has been deprecated since Python 3.14." +msgstr "فراخوانی پیاده‌سازی پایتونی :func:`functools.reduce` با آرگومان‌های کلیدواژه‌ای *function* یا *sequence* از نسخه‌ی ۳.۱۴ پایتون منسوخ شده است." + +msgid ":mod:`logging`:" +msgstr ":mod:`logging`:" + +msgid "Support for custom logging handlers with the *strm* argument is deprecated and scheduled for removal in Python 3.16. Define handlers with the *stream* argument instead. (Contributed by Mariusz Felisiak in :gh:`115032`.)" +msgstr "پشتیبانی از هندلرهای گزارش‌گیری سفارشی با آرگومان *strm* منسوخ شده است و طبق برنامه در نسخه‌ی ۳.۱۶ پایتون حذف خواهد شد. به‌جای آن، هندلرها را با آرگومان *stream* تعریف کنید. (مشارکت توسط Mariusz Felisiak در :gh:`115032`.)" + +msgid ":mod:`mimetypes`:" +msgstr ":mod:`mimetypes`:" + +msgid "Valid extensions start with a '.' or are empty for :meth:`mimetypes.MimeTypes.add_type`. Undotted extensions are deprecated and will raise a :exc:`ValueError` in Python 3.16. (Contributed by Hugo van Kemenade in :gh:`75223`.)" +msgstr "پسوندهای معتبر با یک '.' شروع می‌شوند یا برای :meth:`mimetypes.MimeTypes.add_type` خالی هستند. پسوندهای بدون نقطه منسوخ شده‌اند و در نسخه‌ی ۳.۱۶ پایتون یک :exc:`ValueError` ایجاد خواهند کرد. (مشارکت توسط Hugo van Kemenade در :gh:`75223`.)" + +msgid ":mod:`shutil`:" +msgstr ":mod:`shutil`:" + +msgid "The :class:`!ExecError` exception has been deprecated since Python 3.14. It has not been used by any function in :mod:`!shutil` since Python 3.4, and is now an alias of :exc:`RuntimeError`." +msgstr "استثنای :class:`!ExecError` از نسخه‌ی ۳.۱۴ پایتون منسوخ شده است. این استثنا از نسخه‌ی ۳.۴ پایتون توسط هیچ تابعی در :mod:`!shutil` استفاده نشده است و اکنون یک نام مستعار برای :exc:`RuntimeError` است." + +msgid ":mod:`symtable`:" +msgstr ":mod:`symtable`:" + +msgid "The :meth:`Class.get_methods ` method has been deprecated since Python 3.14." +msgstr "متد :meth:`Class.get_methods ` از نسخه‌ی ۳.۱۴ پایتون منسوخ شده است." + +msgid ":mod:`sys`:" +msgstr ":mod:`sys`:" + +msgid "The :func:`~sys._enablelegacywindowsfsencoding` function has been deprecated since Python 3.13. Use the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` environment variable instead." +msgstr "تابع :func:`~sys._enablelegacywindowsfsencoding` از نسخه‌ی ۳.۱۳ پایتون منسوخ شده است. به‌جای آن از متغیر محیطی :envvar:`PYTHONLEGACYWINDOWSFSENCODING` استفاده کنید." + +msgid ":mod:`sysconfig`:" +msgstr ":mod:`sysconfig`:" + +msgid "The :func:`!sysconfig.expand_makefile_vars` function has been deprecated since Python 3.14. Use the ``vars`` argument of :func:`sysconfig.get_paths` instead." +msgstr "تابع :func:`!sysconfig.expand_makefile_vars` از نسخه‌ی ۳.۱۴ پایتون منسوخ شده است. به‌جای آن از آرگومان ``vars`` مربوط به :func:`sysconfig.get_paths` استفاده کنید." + +msgid ":mod:`tarfile`:" +msgstr ":mod:`tarfile`:" + +msgid "The undocumented and unused :attr:`!TarFile.tarfile` attribute has been deprecated since Python 3.13." +msgstr "ویژگی مستندنشده و استفاده‌نشده‌ی :attr:`!TarFile.tarfile` از نسخه‌ی ۳.۱۳ پایتون منسوخ شده است." + +msgid "Pending removal in Python 3.17" +msgstr "در نوبت حذف در نسخه‌ی ۳.۱۷" + +msgid ":mod:`datetime`:" +msgstr ":mod:`datetime`:" + +msgid ":meth:`~datetime.datetime.strptime` calls using a format string containing ``%e`` (day of month) without a year. This has been deprecated since Python 3.15. (Contributed by Stan Ulbrych in :gh:`70647`.)" +msgstr "فراخوانی‌های :meth:`~datetime.datetime.strptime` که از یک رشته قالب حاوی ``%e`` (روز ماه) بدون سال استفاده می‌کنند. این مورد از نسخه‌ی ۳.۱۵ پایتون منسوخ شده است. (مشارکت‌شده توسط Stan Ulbrych در :gh:`70647`.)" + +msgid ":class:`collections.abc.ByteString` is scheduled for removal in Python 3.17." +msgstr ":class:`collections.abc.ByteString` برای حذف در نسخه‌ی ۳.۱۷ پایتون برنامه‌ریزی شده است." + +msgid "Use ``isinstance(obj, collections.abc.Buffer)`` to test if ``obj`` implements the :ref:`buffer protocol ` at runtime. For use in type annotations, either use :class:`~collections.abc.Buffer` or a union that explicitly specifies the types your code supports (e.g., ``bytes | bytearray | memoryview``)." +msgstr "برای بررسی اینکه آیا ``obj`` پروتکل :ref:`buffer protocol ` را در ران‌تایم پیاده‌سازی می‌کند یا خیر، از ``isinstance(obj, collections.abc.Buffer)`` استفاده کنید. برای استفاده در حاشیه‌نویسی‌های نوع، یا از :class:`~collections.abc.Buffer` استفاده کنید یا از یک union که به‌طور صریح انواع پشتیبانی‌شده توسط کد شما را مشخص می‌کند (مانند ``bytes | bytearray | memoryview``)." + +msgid ":class:`!ByteString` was originally intended to be an abstract class that would serve as a supertype of both :class:`bytes` and :class:`bytearray`. However, since the ABC never had any methods, knowing that an object was an instance of :class:`!ByteString` never actually told you anything useful about the object. Other common buffer types such as :class:`memoryview` were also never understood as subtypes of :class:`!ByteString` (either at runtime or by static type checkers)." +msgstr "کلاس :class:`!ByteString` در ابتدا به این منظور در نظر گرفته شده بود که یک کلاس پایه انتزاعی باشد که به‌عنوان نوع برتر برای هر دو کلاس :class:`bytes` و :class:`bytearray` عمل کند. با این حال، از آنجا که کلاس پایه انتزاعی هرگز هیچ متدی نداشت، دانستن اینکه یک شیء نمونه‌ای از :class:`!ByteString` است، در واقع هرگز نکته‌ی مفیدی درباره‌ی آن شیء به شما نمی‌گفت. سایر انواع متداول بافر مانند :class:`memoryview` نیز هرگز به‌عنوان زیرنوع‌های :class:`!ByteString` شناخته نشدند (چه در ران‌تایم و چه توسط بررسی‌کنندگان ایستای نوع)." + +msgid "See :pep:`PEP 688 <688#current-options>` for more details. (Contributed by Shantanu Jain in :gh:`91896`.)" +msgstr "برای جزئیات بیشتر به :pep:`PEP 688 <688#current-options>` مراجعه کنید. (مشارکت‌شده توسط Shantanu Jain در :gh:`91896`.)" + +msgid ":mod:`encodings`:" +msgstr ":mod:`encodings`:" + +msgid "Passing non-ascii *encoding* names to :func:`encodings.normalize_encoding` is deprecated and scheduled for removal in Python 3.17. (Contributed by Stan Ulbrych in :gh:`136702`.)" +msgstr "ارسال نام‌های *encoding* غیر اسکی به :func:`encodings.normalize_encoding` منسوخ شده است و برای حذف در نسخه‌ی ۳.۱۷ پایتون برنامه‌ریزی شده است. (مشارکت‌شده توسط Stan Ulbrych در :gh:`136702`.)" + +msgid ":class:`!webbrowser.MacOSXOSAScript` is deprecated in favour of :class:`!webbrowser.MacOS`. (:gh:`137586`)" +msgstr "کلاس :class:`!webbrowser.MacOSXOSAScript` به نفع :class:`!webbrowser.MacOS` منسوخ شده است. (:gh:`137586`)" + +msgid "Before Python 3.14, old-style unions were implemented using the private class ``typing._UnionGenericAlias``. This class is no longer needed for the implementation, but it has been retained for backward compatibility, with removal scheduled for Python 3.17. Users should use documented introspection helpers like :func:`typing.get_origin` and :func:`typing.get_args` instead of relying on private implementation details." +msgstr "قبل از نسخه‌ی ۳.۱۴ پایتون، unionهای سبک قدیمی با استفاده از کلاس خصوصی ``typing._UnionGenericAlias`` پیاده‌سازی می‌شدند. این کلاس دیگر برای پیاده‌سازی مورد نیاز نیست، اما برای سازگاری عقبگرد حفظ شده است و حذف آن برای نسخه‌ی ۳.۱۷ پایتون برنامه‌ریزی شده است. کاربران باید به جای اتکا به جزئیات پیاده‌سازی خصوصی، از ابزارهای کمکی درون‌نگری مستندشده مانند :func:`typing.get_origin` و :func:`typing.get_args` استفاده کنند." + +msgid ":class:`typing.ByteString`, deprecated since Python 3.9, is scheduled for removal in Python 3.17." +msgstr "کلاس :class:`typing.ByteString` که از نسخه‌ی ۳.۹ پایتون منسوخ شده است، برای حذف در نسخه‌ی ۳.۱۷ پایتون برنامه‌ریزی شده است." + +msgid ":mod:`tkinter`:" +msgstr ":mod:`tkinter`:" + +msgid "The :class:`!tkinter.Variable` methods :meth:`!trace_variable`, :meth:`!trace` (an alias of :meth:`!trace_variable`), :meth:`!trace_vdelete` and :meth:`!trace_vinfo`, deprecated since Python 3.14, are scheduled for removal in Python 3.17. Use :meth:`!trace_add`, :meth:`!trace_remove` and :meth:`!trace_info` instead. (Contributed by Serhiy Storchaka in :gh:`120220`.)" +msgstr "متدهای :class:`!tkinter.Variable` یعنی :meth:`!trace_variable`، :meth:`!trace` (یک نام مستعار برای :meth:`!trace_variable`)، :meth:`!trace_vdelete` و :meth:`!trace_vinfo` که از نسخه‌ی ۳.۱۴ پایتون منسوخ شده‌اند، برای حذف در نسخه‌ی ۳.۱۷ پایتون برنامه‌ریزی شده‌اند. به جای آن‌ها از :meth:`!trace_add`، :meth:`!trace_remove` و :meth:`!trace_info` استفاده کنید. (مشارکت‌شده توسط Serhiy Storchaka در :gh:`120220`.)" + +msgid "Pending removal in Python 3.18" +msgstr "در انتظار حذف در نسخه‌ی ۳.۱۸ پایتون" + +msgid "No longer accept a boolean value when a file descriptor is expected. (Contributed by Serhiy Storchaka in :gh:`82626`.)" +msgstr "دیگر مقدار بولی را هنگامی که انتظار توصیف‌گر پرونده می‌رود، نمی‌پذیرد. (مشارکت‌شده توسط Serhiy Storchaka در :gh:`82626`.)" + +msgid ":mod:`decimal`:" +msgstr ":mod:`decimal`:" + +msgid "The non-standard and undocumented :class:`~decimal.Decimal` format specifier ``'N'``, which is only supported in the :mod:`!decimal` module's C implementation, has been deprecated since Python 3.13. (Contributed by Serhiy Storchaka in :gh:`89902`.)" +msgstr "مشخص‌کننده‌ی قالب غیر استاندارد و مستندنشده‌ی :class:`~decimal.Decimal` یعنی ``'N'`` که فقط در پیاده‌سازی C ماژول :mod:`!decimal` پشتیبانی می‌شود، از نسخه‌ی ۳.۱۳ پایتون منسوخ شده است. (مشارکت‌شده توسط Serhiy Storchaka در :gh:`89902`.)" + +msgid "Deprecations defined by :pep:`829`:" +msgstr "مواردهای منسوخ تعریف‌شده توسط :pep:`829`:" + +msgid "``import`` lines in :file:`{name}.pth` files are silently ignored." +msgstr "سطرهای ``import`` در پرونده‌های :file:`{name}.pth` به‌صورت بی‌صدا نادیده گرفته می‌شوند." + +msgid "(Contributed by Barry Warsaw in :gh:`148641`.)" +msgstr "(مشارکت‌شده توسط Barry Warsaw در :gh:`148641`.)" + +msgid "Pending removal in Python 3.19" +msgstr "در انتظار حذف در نسخه‌ی ۳.۱۹ پایتون" + +msgid ":mod:`ctypes`:" +msgstr ":mod:`ctypes`:" + +msgid "Implicitly switching to the MSVC-compatible struct layout by setting :attr:`~ctypes.Structure._pack_` but not :attr:`~ctypes.Structure._layout_` on non-Windows platforms." +msgstr "سوئیچ ضمنی به ساختار struct سازگار با MSVC با تنظیم کردن :attr:`~ctypes.Structure._pack_` اما نه :attr:`~ctypes.Structure._layout_` روی سیستم‌عامل‌های غیر ویندوزی." + +msgid "In hash function constructors such as :func:`~hashlib.new` or the direct hash-named constructors such as :func:`~hashlib.md5` and :func:`~hashlib.sha256`, their optional initial data parameter could also be passed a keyword argument named ``data=`` or ``string=`` in various :mod:`!hashlib` implementations." +msgstr "در سازنده‌های تابع هش مانند :func:`~hashlib.new` یا سازنده‌های مستقیم با نام هش مانند :func:`~hashlib.md5` و :func:`~hashlib.sha256`، در پیاده‌سازی‌های مختلف :mod:`!hashlib` امکان ارسال یک آرگومان کلیدواژه‌ای با نام ``data=`` یا ``string=`` نیز برای پارامتر داده‌ی اولیه‌ی اختیاری آن‌ها وجود داشت." + +msgid "Support for the ``string`` keyword argument name is now deprecated and slated for removal in Python 3.19." +msgstr "پشتیبانی از نام آرگومان کلیدواژه‌ای ``string`` اکنون منسوخ شده است و در پایتون ۳.۱۹ حذف خواهد شد." + +msgid "Before Python 3.13, the ``string`` keyword parameter was not correctly supported depending on the backend implementation of hash functions. Prefer passing the initial data as a positional argument for maximum backwards compatibility." +msgstr "پیش از پایتون ۳.۱۳، بسته به پیاده‌سازی بک‌اند تابع‌های هش، از پارامتر کلیدواژه‌ای ``string`` به‌درستی پشتیبانی نمی‌شد. برای حداکثر سازگاری با نسخه‌های پیشین، ترجیح دهید داده‌ی اولیه را به عنوان یک آرگومان جایگاهی ارسال کنید." + +msgid ":meth:`http.cookies.Morsel.js_output` is deprecated and will be removed in Python 3.19." +msgstr ":meth:`http.cookies.Morsel.js_output` منسوخ شده است و در پایتون ۳.۱۹ حذف خواهد شد." + +msgid ":meth:`http.cookies.BaseCookie.js_output` is deprecated and will be removed in Python 3.19." +msgstr ":meth:`http.cookies.BaseCookie.js_output` منسوخ شده است و در پایتون ۳.۱۹ حذف خواهد شد." + +msgid "Altering :attr:`IMAP4.file ` is now deprecated and slated for removal in Python 3.19. This property is now unused and changing its value does not automatically close the current file." +msgstr "تغییر دادن :attr:`IMAP4.file ` اکنون منسوخ شده است و در پایتون ۳.۱۹ حذف خواهد شد. این ویژگی اکنون استفاده نمی‌شود و تغییر دادن مقدار آن پرونده‌ی فعلی را به طور خودکار نمی‌بندد." + +msgid "Before Python 3.14, this property was used to implement the corresponding ``read()`` and ``readline()`` methods for :class:`~imaplib.IMAP4` but this is no longer the case since then." +msgstr "پیش از پایتون ۳.۱۴، از این ویژگی برای پیاده‌سازی متدهای متناظر ``read()`` و ``readline()`` برای :class:`~imaplib.IMAP4` استفاده می‌شد، اما از آن زمان به بعد دیگر این‌طور نیست." + +msgid "Pending removal in Python 3.20" +msgstr "در نوبت حذف در پایتون ۳.۲۰" + +msgid "Calling the ``__new__()`` method of :class:`struct.Struct` without the *format* argument is deprecated and will be removed in Python 3.20. Calling :meth:`~object.__init__` method on initialized :class:`~struct.Struct` objects is deprecated and will be removed in Python 3.20." +msgstr "فراخوانی متد ``__new__()`` از :class:`struct.Struct` بدون آرگومان *format* منسوخ شده است و در پایتون ۳.۲۰ حذف خواهد شد. فراخوانی متد :meth:`~object.__init__` روی شیءهای مقداردهی اولیه‌شده‌ی :class:`~struct.Struct` منسوخ شده است و در پایتون ۳.۲۰ حذف خواهد شد." + +msgid "Warnings are produced for ``import`` lines found in :file:`{name}.pth` files." +msgstr "برای سطرهای ``import`` پیدا شده در پرونده‌های :file:`{name}.pth` هشدارده‌هایی تولید می‌شوند." + +msgid ":file:`{name}.pth` files are no longer decoded in the locale encoding by default. They **MUST** be encoded in ``utf-8-sig``." +msgstr "پرونده‌های :file:`{name}.pth` دیگر به طور پیش‌فرض با کدگذاری locale رمزگشایی نمی‌شوند. آن‌ها **باید** با ``utf-8-sig`` کدگذاری شوند." + +msgid "Pending removal in future versions" +msgstr "در نوبت حذف در نسخه‌های آینده" + +msgid "The following APIs will be removed in the future, although there is currently no date scheduled for their removal." +msgstr "واسط‌های برنامه‌نویسی (API) زیر در آینده حذف خواهند شد، البته در حال حاضر هیچ تاریخ مشخصی برای حذف آن‌ها تعیین نشده است." + +msgid ":mod:`argparse`:" +msgstr ":mod:`argparse`:" + +msgid "Nesting argument groups and nesting mutually exclusive groups are deprecated." +msgstr "تودرتو قرار دادن گروه‌های آرگومان و تودرتو قرار دادن گروه‌های متقابلاً انحصاری منسوخ شده است." + +msgid "Passing the undocumented keyword argument *prefix_chars* to :meth:`~argparse.ArgumentParser.add_argument_group` is now deprecated." +msgstr "ارسال آرگومان کلیدواژه‌ای مستندنشده‌ی *prefix_chars* به :meth:`~argparse.ArgumentParser.add_argument_group` اکنون منسوخ شده است." + +msgid "The :class:`argparse.FileType` type converter is deprecated." +msgstr "مبدل نوع :class:`argparse.FileType` منسوخ شده است." + +msgid "Generators: ``throw(type, exc, tb)`` and ``athrow(type, exc, tb)`` signature is deprecated: use ``throw(exc)`` and ``athrow(exc)`` instead, the single argument signature." +msgstr "تولیدگرها: امضای ``throw(type, exc, tb)`` و ``athrow(type, exc, tb)`` منسوخ شده است: به جای آن از ``throw(exc)`` و ``athrow(exc)``، یعنی امضای تک‌آرگومانی استفاده کنید." + +msgid "Currently Python accepts numeric literals immediately followed by keywords, for example ``0in x``, ``1or x``, ``0if 1else 2``. It allows confusing and ambiguous expressions like ``[0x1for x in y]`` (which can be interpreted as ``[0x1 for x in y]`` or ``[0x1f or x in y]``). A syntax warning is raised if the numeric literal is immediately followed by one of keywords :keyword:`and`, :keyword:`else`, :keyword:`for`, :keyword:`if`, :keyword:`in`, :keyword:`is` and :keyword:`or`. In a future release it will be changed to a syntax error. (:gh:`87999`)" +msgstr "در حال حاضر پایتون مقادیر لفظی عددی را که بلافاصله پس از آن‌ها کلیدواژه‌هایی آمده باشد می‌پذیرد، برای نمونه ``0in x``، ``1or x``، ``0if 1else 2``. این موضوع به عبارات گیج‌کننده و مبهمی مانند ``[0x1for x in y]`` اجازه می‌دهد (که می‌تواند به صورت ``[0x1 for x in y]`` یا ``[0x1f or x in y]`` تفسیر شود). اگر مقدار لفظی عددی بلافاصله با یکی از کلیدواژه‌های :keyword:`and`، :keyword:`else`، :keyword:`for`، :keyword:`if`، :keyword:`in`، :keyword:`is` و :keyword:`or` دنبال شود، یک اخطار نحوی (syntax warning) صادر می‌شود. در نسخه‌های آینده این رفتار به خطای نحوی (syntax error) تبدیل خواهد شد. (:gh:`87999`)" + +msgid "Support for ``__index__()`` and ``__int__()`` method returning non-int type: these methods will be required to return an instance of a strict subclass of :class:`int`." +msgstr "پشتیبانی از متدهای ``__index__()`` و ``__int__()`` که نوعی غیر از int برمی‌گردانند: این متدها ملزم خواهند شد که نمونه‌ای از یک زیرکلاس سخت‌گیرانه‌ی :class:`int` را برگردانند." + +msgid "Support for ``__float__()`` method returning a strict subclass of :class:`float`: these methods will be required to return an instance of :class:`float`." +msgstr "پشتیبانی از متد ``__float__()`` که زیرکلاس سخت‌گیرانه‌ای از :class:`float` برمی‌گرداند: این متدها ملزم خواهند شد که نمونه‌ای از :class:`float` را برگردانند." + +msgid "Support for ``__complex__()`` method returning a strict subclass of :class:`complex`: these methods will be required to return an instance of :class:`complex`." +msgstr "پشتیبانی از متد ``__complex__()`` که زیرکلاس سخت‌گیرانه‌ای از :class:`complex` برمی‌گرداند: این متدها ملزم خواهند شد که نمونه‌ای از :class:`complex` را برگردانند." + +msgid "Passing a complex number as the *real* or *imag* argument in the :func:`complex` constructor is now deprecated; it should only be passed as a single positional argument. (Contributed by Serhiy Storchaka in :gh:`109218`.)" +msgstr "ارسال یک عدد مختلط به عنوان آرگومان *real* یا *imag* در سازنده‌ی :func:`complex` اکنون منسوخ شده است؛ این مقدار باید فقط به عنوان یک آرگومان جایگاهی منفرد ارسال شود. (مشارکت‌کرده توسط Serhiy Storchaka در :gh:`109218`.)" + +msgid ":mod:`calendar`: ``calendar.January`` and ``calendar.February`` constants are deprecated and replaced by :data:`calendar.JANUARY` and :data:`calendar.FEBRUARY`. (Contributed by Prince Roshan in :gh:`103636`.)" +msgstr ":mod:`calendar`: ثابت‌های ``calendar.January`` و ``calendar.February`` منسوخ شده‌اند و با :data:`calendar.JANUARY` و :data:`calendar.FEBRUARY` جایگزین شده‌اند. (مشارکت‌کرده توسط Prince Roshan در :gh:`103636`.)" + +msgid ":mod:`codecs`: use :func:`open` instead of :func:`codecs.open`. (:gh:`133038`)" +msgstr ":mod:`codecs`: به جای :func:`codecs.open` از :func:`open` استفاده کنید. (:gh:`133038`)" + +msgid ":attr:`!codeobject.co_lnotab`: use the :meth:`codeobject.co_lines` method instead." +msgstr ":attr:`!codeobject.co_lnotab`: به جای آن از متد :meth:`codeobject.co_lines` استفاده کنید." + +msgid ":meth:`~datetime.datetime.utcnow`: use ``datetime.datetime.now(tz=datetime.UTC)``." +msgstr ":meth:`~datetime.datetime.utcnow`: از ``datetime.datetime.now(tz=datetime.UTC)`` استفاده کنید." + +msgid ":meth:`~datetime.datetime.utcfromtimestamp`: use ``datetime.datetime.fromtimestamp(timestamp, tz=datetime.UTC)``." +msgstr ":meth:`~datetime.datetime.utcfromtimestamp`: از ``datetime.datetime.fromtimestamp(timestamp, tz=datetime.UTC)`` استفاده کنید." + +msgid ":mod:`gettext`: Plural value must be an integer." +msgstr ":mod:`gettext`: مقدار جمع باید یک عدد صحیح باشد." + +msgid ":mod:`importlib`:" +msgstr ":mod:`importlib`:" + +msgid ":func:`~importlib.util.cache_from_source` *debug_override* parameter is deprecated: use the *optimization* parameter instead." +msgstr "پارامتر *debug_override* تابع :func:`~importlib.util.cache_from_source` منسوخ شده است: به جای آن از پارامتر *optimization* استفاده کنید." + +msgid ":mod:`importlib.metadata`:" +msgstr ":mod:`importlib.metadata`:" + +msgid "``EntryPoints`` tuple interface." +msgstr "رابط تاپل ``EntryPoints``." + +msgid "Implicit ``None`` on return values." +msgstr "مقادیر بازگشتی ``None`` ضمنی." + +msgid ":mod:`logging`: the ``warn()`` method has been deprecated since Python 3.3, use :meth:`~logging.warning` instead." +msgstr ":mod:`logging`: متد ``warn()`` از نسخه‌ی ۳.۳ پایتون منسوخ شده است، به جای آن از :meth:`~logging.warning` استفاده کنید." + +msgid ":mod:`mailbox`: Use of StringIO input and text mode is deprecated, use BytesIO and binary mode instead." +msgstr ":mod:`mailbox`: استفاده از ورودی StringIO و حالت متنی منسوخ شده است، به جای آن از BytesIO و حالت دودویی استفاده کنید." + +msgid ":mod:`os`: Calling :func:`os.register_at_fork` in a multi-threaded process." +msgstr ":mod:`os`: فراخوانی :func:`os.register_at_fork` در یک فرایند چندنخی." + +msgid ":mod:`os.path`: :func:`os.path.commonprefix` is deprecated, use :func:`os.path.commonpath` for path prefixes. The :func:`os.path.commonprefix` function is being deprecated due to having a misleading name and module. The function is not safe to use for path prefixes despite being included in a module about path manipulation, meaning it is easy to accidentally introduce path traversal vulnerabilities into Python programs by using this function." +msgstr ":mod:`os.path`: تابع :func:`os.path.commonprefix` منسوخ شده است، برای پیشوندهای مسیر از :func:`os.path.commonpath` استفاده کنید. تابع :func:`os.path.commonprefix` به دلیل داشتن نام و ماژول گمراه‌کننده در حال منسوخ شدن است. این تابع با وجود اینکه در ماژولی درباره‌ی دستکاری مسیر قرار دارد، برای پیشوندهای مسیر ایمن نیست، به این معنا که استفاده از این تابع می‌تواند به طور تصادفی آسیب‌پذیری‌های پیمایش مسیر را وارد برنامه‌های پایتون کند." + +msgid ":class:`!pydoc.ErrorDuringImport`: A tuple value for *exc_info* parameter is deprecated, use an exception instance." +msgstr ":class:`!pydoc.ErrorDuringImport`: مقدار تاپل برای پارامتر *exc_info* منسوخ شده است، از یک نمونه‌ی استثنا استفاده کنید." + +msgid ":mod:`re`: More strict rules are now applied for numerical group references and group names in regular expressions. Only sequence of ASCII digits is now accepted as a numerical reference. The group name in bytes patterns and replacement strings can now only contain ASCII letters and digits and underscore. (Contributed by Serhiy Storchaka in :gh:`91760`.)" +msgstr ":mod:`re`: اکنون قوانین سخت‌گیرانه‌تری برای ارجاع‌های عددی گروه‌ها و نام گروه‌ها در عبارت‌های باقاعده اعمال می‌شود. اکنون فقط دنباله‌ای از ارقام اسکی به‌عنوان ارجاع عددی پذیرفته می‌شود. نام گروه در الگوهای bytes و رشته‌های جایگزین‌کننده اکنون فقط می‌تواند شامل حروف و ارقام اسکی و خط زیر باشد. (مشارکت توسط Serhiy Storchaka در :gh:`91760`.)" + +msgid ":mod:`shutil`: :func:`~shutil.rmtree`'s *onerror* parameter is deprecated in Python 3.12; use the *onexc* parameter instead." +msgstr ":mod:`shutil`: پارامتر *onerror* متد :func:`~shutil.rmtree` در نسخه‌ی ۳.۱۲ پایتون منسوخ شده است؛ به‌جای آن از پارامتر *onexc* استفاده کنید." + +msgid ":mod:`ssl` options and protocols:" +msgstr "گزینه‌ها و پروتکل‌های ماژول :mod:`ssl`:" + +msgid ":class:`ssl.SSLContext` without protocol argument is deprecated." +msgstr "کلاس :class:`ssl.SSLContext` بدون آرگومان پروتکل منسوخ شده است." + +msgid ":class:`ssl.SSLContext`: :meth:`~ssl.SSLContext.set_npn_protocols` and :meth:`!selected_npn_protocol` are deprecated: use ALPN instead." +msgstr ":class:`ssl.SSLContext`: متدهای :meth:`~ssl.SSLContext.set_npn_protocols` و :meth:`!selected_npn_protocol` منسوخ شده‌اند: به‌جای آن‌ها از ALPN استفاده کنید." + +msgid "``ssl.OP_NO_SSL*`` options" +msgstr "گزینه‌های ``ssl.OP_NO_SSL*``" + +msgid "``ssl.OP_NO_TLS*`` options" +msgstr "گزینه‌های ``ssl.OP_NO_TLS*``" + +msgid "``ssl.PROTOCOL_SSLv3``" +msgstr "``ssl.PROTOCOL_SSLv3``" + +msgid "``ssl.PROTOCOL_TLS``" +msgstr "``ssl.PROTOCOL_TLS``" + +msgid "``ssl.PROTOCOL_TLSv1``" +msgstr "``ssl.PROTOCOL_TLSv1``" + +msgid "``ssl.PROTOCOL_TLSv1_1``" +msgstr "``ssl.PROTOCOL_TLSv1_1``" + +msgid "``ssl.PROTOCOL_TLSv1_2``" +msgstr "``ssl.PROTOCOL_TLSv1_2``" + +msgid "``ssl.TLSVersion.SSLv3``" +msgstr "``ssl.TLSVersion.SSLv3``" + +msgid "``ssl.TLSVersion.TLSv1``" +msgstr "``ssl.TLSVersion.TLSv1``" + +msgid "``ssl.TLSVersion.TLSv1_1``" +msgstr "``ssl.TLSVersion.TLSv1_1``" + +msgid ":mod:`threading` methods:" +msgstr "متدهای :mod:`threading`:" + +msgid ":meth:`!threading.Condition.notifyAll`: use :meth:`~threading.Condition.notify_all`." +msgstr ":meth:`!threading.Condition.notifyAll`: از :meth:`~threading.Condition.notify_all` استفاده کنید." + +msgid ":meth:`!threading.Event.isSet`: use :meth:`~threading.Event.is_set`." +msgstr ":meth:`!threading.Event.isSet`: از :meth:`~threading.Event.is_set` استفاده کنید." + +msgid ":meth:`!threading.Thread.isDaemon`, :meth:`threading.Thread.setDaemon`: use :attr:`threading.Thread.daemon` attribute." +msgstr ":meth:`!threading.Thread.isDaemon`، :meth:`threading.Thread.setDaemon`: از ویژگی :attr:`threading.Thread.daemon` استفاده کنید." + +msgid ":meth:`!threading.Thread.getName`, :meth:`threading.Thread.setName`: use :attr:`threading.Thread.name` attribute." +msgstr ":meth:`!threading.Thread.getName` و :meth:`threading.Thread.setName`: از ویژگی :attr:`threading.Thread.name` استفاده کنید." + +msgid ":meth:`!threading.currentThread`: use :meth:`threading.current_thread`." +msgstr ":meth:`!threading.currentThread`: از :meth:`threading.current_thread` استفاده کنید." + +msgid ":meth:`!threading.activeCount`: use :meth:`threading.active_count`." +msgstr ":meth:`!threading.activeCount`: از :meth:`threading.active_count` استفاده کنید." + +msgid ":class:`typing.Text` (:gh:`92332`)." +msgstr ":class:`typing.Text` (:gh:`92332`)." + +msgid "The internal class ``typing._UnionGenericAlias`` is no longer used to implement :class:`typing.Union`. To preserve compatibility with users using this private class, a compatibility shim will be provided until at least Python 3.17. (Contributed by Jelle Zijlstra in :gh:`105499`.)" +msgstr "کلاس داخلی ``typing._UnionGenericAlias`` دیگر برای پیاده‌سازی :class:`typing.Union` استفاده نمی‌شود. برای حفظ سازگاری با کاربرانی که از این کلاس خصوصی استفاده می‌کنند، یک لایه‌ی سازگاری حداقل تا نسخه‌ی ۳.۱۷ پایتون ارائه خواهد شد. (مشارکت توسط Jelle Zijlstra در :gh:`105499`.)" + +msgid ":class:`unittest.IsolatedAsyncioTestCase`: it is deprecated to return a value that is not ``None`` from a test case." +msgstr ":class:`unittest.IsolatedAsyncioTestCase`: برگرداندن مقداری غیر از ``None`` از یک مورد آزمون، منسوخ شده است." + +msgid ":mod:`urllib.parse` deprecated functions: :func:`~urllib.parse.urlparse` instead" +msgstr "توابع منسوخ‌شده‌ی :mod:`urllib.parse`: به‌جای آن از :func:`~urllib.parse.urlparse` استفاده کنید" + +msgid "``splitattr()``" +msgstr "``splitattr()``" + +msgid "``splithost()``" +msgstr "``splithost()``" + +msgid "``splitnport()``" +msgstr "``splitnport()``" + +msgid "``splitpasswd()``" +msgstr "``splitpasswd()``" + +msgid "``splitport()``" +msgstr "``splitport()``" + +msgid "``splitquery()``" +msgstr "``splitquery()``" + +msgid "``splittag()``" +msgstr "``splittag()``" + +msgid "``splittype()``" +msgstr "``splittype()``" + +msgid "``splituser()``" +msgstr "``splituser()``" + +msgid "``splitvalue()``" +msgstr "``splitvalue()``" + +msgid "``to_bytes()``" +msgstr "``to_bytes()``" + +msgid ":mod:`wsgiref`: ``SimpleHandler.stdout.write()`` should not do partial writes." +msgstr ":mod:`wsgiref`: تابع ``SimpleHandler.stdout.write()`` نباید نوشتن‌های جزئی انجام دهد." + +msgid ":mod:`xml.etree.ElementTree`: Testing the truth value of an :class:`~xml.etree.ElementTree.Element` is deprecated. In a future release it will always return ``True``. Prefer explicit ``len(elem)`` or ``elem is not None`` tests instead." +msgstr ":mod:`xml.etree.ElementTree`: آزمون ارزش درستی یک :class:`~xml.etree.ElementTree.Element` منسوخ شده است. در نسخه‌ای در آینده همیشه ``True`` برخواهد گرداند. به‌جای آن استفاده از آزمون صریح ``len(elem)`` یا ``elem is not None`` را ترجیح دهید." + +msgid ":func:`sys._clear_type_cache` is deprecated: use :func:`sys._clear_internal_caches` instead." +msgstr "تابع :func:`sys._clear_type_cache` منسوخ شده است: به جای آن از :func:`sys._clear_internal_caches` استفاده کنید." + +msgid "Soft deprecations" +msgstr "منسوخ‌سازی‌های نرم" + +msgid "There are no plans to remove :term:`soft deprecated` APIs." +msgstr "هیچ برنامه‌ای برای حذف APIهای :term:`با منسوخ‌سازی نرم ` وجود ندارد." + +msgid "Using ``'F'`` and ``'D'`` format type codes of the :mod:`struct` module now are :term:`soft deprecated` in favor of two-letter forms ``'Zf'`` and ``'Zd'``. (Contributed by Sergey B Kirpichev in :gh:`121249`.)" +msgstr "استفاده از کدهای نوع فرمت ``'F'`` و ``'D'`` در ماژول :mod:`struct` اکنون به نفع فرم‌های دوحرفی ``'Zf'`` و ``'Zd'`` :term:`با منسوخ‌سازی نرم ` مواجه شده‌اند. (مشارکت‌کننده: Sergey B Kirpichev در :gh:`121249`.)" + +msgid "C API changes" +msgstr "تغییرات C API" + +msgid "Add :c:func:`PyArg_ParseArray` and :c:func:`PyArg_ParseArrayAndKeywords` functions to parse arguments of functions using the :c:macro:`METH_FASTCALL` calling convention. (Contributed by Victor Stinner in :gh:`144175`.)" +msgstr "توابع :c:func:`PyArg_ParseArray` و :c:func:`PyArg_ParseArrayAndKeywords` برای تجزیه‌ی آرگومان‌های توابع با استفاده از قرارداد فراخوانی :c:macro:`METH_FASTCALL` اضافه شدند. (مشارکت‌کننده: Victor Stinner در :gh:`144175`.)" + +msgid "Add the following functions for the new :class:`frozendict` type:" +msgstr "توابع زیر برای نوع جدید :class:`frozendict` اضافه شدند:" + +msgid ":c:func:`PyAnyDict_Check`" +msgstr ":c:func:`PyAnyDict_Check`" + +msgid ":c:func:`PyAnyDict_CheckExact`" +msgstr ":c:func:`PyAnyDict_CheckExact`" + +msgid ":c:func:`PyFrozenDict_Check`" +msgstr ":c:func:`PyFrozenDict_Check`" + +msgid ":c:func:`PyFrozenDict_CheckExact`" +msgstr ":c:func:`PyFrozenDict_CheckExact`" + +msgid ":c:func:`PyFrozenDict_New`" +msgstr ":c:func:`PyFrozenDict_New`" + +msgid "(Contributed by Victor Stinner in :gh:`141510`.)" +msgstr "(مشارکت‌کننده: Victor Stinner در :gh:`141510`.)" + +msgid "Add :c:func:`PyObject_CallFinalizerFromDealloc` function to the limited C API. (Contributed by Victor Stinner in :gh:`146063`.)" +msgstr "تابع :c:func:`PyObject_CallFinalizerFromDealloc` به C API محدود اضافه شد. (مشارکت‌کننده: Victor Stinner در :gh:`146063`.)" + +msgid "Add :c:func:`PySys_GetAttr`, :c:func:`PySys_GetAttrString`, :c:func:`PySys_GetOptionalAttr`, and :c:func:`PySys_GetOptionalAttrString` functions as replacements for :c:func:`PySys_GetObject`. (Contributed by Serhiy Storchaka in :gh:`108512`.)" +msgstr "توابع :c:func:`PySys_GetAttr`، :c:func:`PySys_GetAttrString`، :c:func:`PySys_GetOptionalAttr` و :c:func:`PySys_GetOptionalAttrString` به عنوان جایگزین‌هایی برای :c:func:`PySys_GetObject` اضافه شدند. (مشارکت‌کننده: Serhiy Storchaka در :gh:`108512`.)" + +msgid "Add :c:func:`PyUnstable_Unicode_GET_CACHED_HASH` to get the cached hash of a string. See the documentation for caveats. (Contributed by Petr Viktorin in :gh:`131510`.)" +msgstr "تابع :c:func:`PyUnstable_Unicode_GET_CACHED_HASH` برای دریافت هش کش‌شده‌ی یک رشته اضافه شد. برای اطلاع از نکات احتیاطی، مستندات را مطالعه کنید. (مشارکت‌کننده: Petr Viktorin در :gh:`131510`.)" + +msgid "Add API for checking an extension module's ABI compatibility: :c:data:`Py_mod_abi`, :c:func:`PyABIInfo_Check`, and :c:macro:`PyABIInfo_VAR`. (Contributed by Petr Viktorin in :gh:`137210`.)" +msgstr "API برای بررسی سازگاری ABI ماژول توسعه‌ای اضافه شد: :c:data:`Py_mod_abi`، :c:func:`PyABIInfo_Check` و :c:macro:`PyABIInfo_VAR`. (مشارکت‌کننده: Petr Viktorin در :gh:`137210`.)" + +msgid "Implement :pep:`782`, the :ref:`PyBytesWriter API `. Add functions:" +msgstr "پیاده‌سازی :pep:`782`، یعنی :ref:`PyBytesWriter API ` انجام شد. توابع زیر اضافه شدند:" + +msgid ":c:func:`PyBytesWriter_Create`" +msgstr ":c:func:`PyBytesWriter_Create`" + +msgid ":c:func:`PyBytesWriter_Discard`" +msgstr ":c:func:`PyBytesWriter_Discard`" + +msgid ":c:func:`PyBytesWriter_Finish`" +msgstr ":c:func:`PyBytesWriter_Finish`" + +msgid ":c:func:`PyBytesWriter_FinishWithPointer`" +msgstr ":c:func:`PyBytesWriter_FinishWithPointer`" + +msgid ":c:func:`PyBytesWriter_FinishWithSize`" +msgstr ":c:func:`PyBytesWriter_FinishWithSize`" + +msgid ":c:func:`PyBytesWriter_Format`" +msgstr ":c:func:`PyBytesWriter_Format`" + +msgid ":c:func:`PyBytesWriter_GetData`" +msgstr ":c:func:`PyBytesWriter_GetData`" + +msgid ":c:func:`PyBytesWriter_GetSize`" +msgstr ":c:func:`PyBytesWriter_GetSize`" + +msgid ":c:func:`PyBytesWriter_Grow`" +msgstr ":c:func:`PyBytesWriter_Grow`" + +msgid ":c:func:`PyBytesWriter_GrowAndUpdatePointer`" +msgstr ":c:func:`PyBytesWriter_GrowAndUpdatePointer`" + +msgid ":c:func:`PyBytesWriter_Resize`" +msgstr ":c:func:`PyBytesWriter_Resize`" + +msgid ":c:func:`PyBytesWriter_WriteBytes`" +msgstr ":c:func:`PyBytesWriter_WriteBytes`" + +msgid "(Contributed by Victor Stinner in :gh:`129813`.)" +msgstr "(تهیه‌شده توسط Victor Stinner در :gh:`129813`.)" + +msgid ":c:type:`PyCriticalSection` and related functions are added to the Stable ABI. (Contributed by Petr Viktorin in :gh:`149225`.)" +msgstr "انواع :c:type:`PyCriticalSection` و توابع مرتبط به ABI پایدار اضافه شدند. (تهیه‌شده توسط Petr Viktorin در :gh:`149225`.)" + +msgid "Add a new :c:func:`PyImport_CreateModuleFromInitfunc` C API for creating a module from a *spec* and *initfunc*. (Contributed by Itamar Oren in :gh:`116146`.)" +msgstr "افزودن یک API جدید به نام :c:func:`PyImport_CreateModuleFromInitfunc` در زبان C برای ایجاد یک ماژول از روی *مشخصات* (spec) و *initfunc*. (تهیه‌شده توسط Itamar Oren در :gh:`116146`.)" + +msgid "Add :c:func:`PyTuple_FromArray` to create a :class:`tuple` from an array. (Contributed by Victor Stinner in :gh:`111489`.)" +msgstr "افزودن تابع :c:func:`PyTuple_FromArray` برای ایجاد یک :class:`tuple` از روی یک آرایه. (تهیه‌شده توسط Victor Stinner در :gh:`111489`.)" + +msgid "Add a new module export hook, :c:func:`PyModExport_* `." +msgstr "افزودن یک قلاب (hook) جدید برای اکسپورت ماژول، :c:func:`PyModExport_* `." + +msgid "(Contributed by Petr Viktorin in :pep:`793` and :gh:`140550`.)" +msgstr "(تهیه‌شده توسط Petr Viktorin در :pep:`793` و :gh:`140550`.)" + +msgid "Add functions that are guaranteed to be safe for use in :c:member:`~PyTypeObject.tp_traverse` handlers: :c:func:`PyObject_GetTypeData_DuringGC`, :c:func:`PyObject_GetItemData_DuringGC`, :c:func:`PyType_GetModuleState_DuringGC`, :c:func:`PyModule_GetState_DuringGC`, :c:func:`PyModule_GetToken_DuringGC`, :c:func:`PyType_GetBaseByToken_DuringGC`, :c:func:`PyType_GetModule_DuringGC`, :c:func:`PyType_GetModuleByToken_DuringGC`. (Contributed by Petr Viktorin in :gh:`145925`.)" +msgstr "افزودن توابعی که استفاده از آن‌ها در هندلرهای :c:member:`~PyTypeObject.tp_traverse` کاملاً امن تضمین شده است: :c:func:`PyObject_GetTypeData_DuringGC`، :c:func:`PyObject_GetItemData_DuringGC`، :c:func:`PyType_GetModuleState_DuringGC`، :c:func:`PyModule_GetState_DuringGC`، :c:func:`PyModule_GetToken_DuringGC`، :c:func:`PyType_GetBaseByToken_DuringGC`، :c:func:`PyType_GetModule_DuringGC`، :c:func:`PyType_GetModuleByToken_DuringGC`. (تهیه‌شده توسط Petr Viktorin در :gh:`145925`.)" + +msgid "Add :c:func:`PyObject_Dump` to dump an object to ``stderr``. It should only be used for debugging. (Contributed by Victor Stinner in :gh:`141070`.)" +msgstr "افزودن :c:func:`PyObject_Dump` برای برون‌ریزی (dump) یک شیء به ``stderr``. این تابع فقط باید برای اشکال‌زدایی استفاده شود. (تهیه‌شده توسط Victor Stinner در :gh:`141070`.)" + +msgid "Implement :pep:`820`: ``PySlot`` -- Unified slot system for the C API. See :ref:`capi-slots` for documentation." +msgstr "پیاده‌سازی :pep:`820`: ``PySlot`` -- سیستم جایگاه یکپارچه برای API زبان C. برای مستندات بیشتر به :ref:`capi-slots` مراجعه کنید." + +msgid "This adds:" +msgstr "این موارد اضافه شدند:" + +msgid "The :c:type:`PySlot` struct;" +msgstr "ساختار :c:type:`PySlot`؛" + +msgid "the :c:func:`PyType_FromSlots` function;" +msgstr "تابع :c:func:`PyType_FromSlots`؛" + +msgid "new slot IDs: :c:macro:`Py_slot_end`, :c:macro:`Py_slot_invalid`; :c:macro:`Py_slot_subslots`, :c:macro:`Py_tp_slots`, :c:macro:`Py_mod_slots`; :c:macro:`Py_tp_name`, :c:macro:`Py_tp_basicsize`, :c:macro:`Py_tp_extra_basicsize`, :c:macro:`Py_tp_itemsize`, :c:macro:`Py_tp_flags`, :c:macro:`Py_tp_metaclass`, :c:macro:`Py_tp_module`;" +msgstr "شناسه‌های جایگاه جدید: :c:macro:`Py_slot_end`، :c:macro:`Py_slot_invalid`؛ :c:macro:`Py_slot_subslots`، :c:macro:`Py_tp_slots`، :c:macro:`Py_mod_slots`؛ :c:macro:`Py_tp_name`، :c:macro:`Py_tp_basicsize`، :c:macro:`Py_tp_extra_basicsize`، :c:macro:`Py_tp_itemsize`، :c:macro:`Py_tp_flags`، :c:macro:`Py_tp_metaclass`، :c:macro:`Py_tp_module`؛" + +msgid "convenience macros: :c:macro:`PySlot_DATA`, :c:macro:`PySlot_FUNC`, :c:macro:`PySlot_SIZE`, :c:macro:`PySlot_INT64`, :c:macro:`PySlot_UINT64`, :c:macro:`PySlot_STATIC_DATA`, :c:macro:`PySlot_END`, :c:macro:`PySlot_PTR`, :c:macro:`PySlot_PTR_STATIC`." +msgstr "ماکروهای کمکی: :c:macro:`PySlot_DATA`، :c:macro:`PySlot_FUNC`، :c:macro:`PySlot_SIZE`، :c:macro:`PySlot_INT64`، :c:macro:`PySlot_UINT64`، :c:macro:`PySlot_STATIC_DATA`، :c:macro:`PySlot_END`، :c:macro:`PySlot_PTR`، :c:macro:`PySlot_PTR_STATIC`." + +msgid "The :c:func:`PyModule_FromSlotsAndSpec` function and ``PyModExport`` :ref:`module export hook ` also use the new :c:type:`!PySlot` struct." +msgstr "تابع :c:func:`PyModule_FromSlotsAndSpec` و هوک صادر کردن ماژول :ref:`module export hook ` با نام ``PyModExport`` نیز از ساختار جدید :c:type:`!PySlot` استفاده می‌کنند." + +msgid "The following functions are :term:`soft deprecated`:" +msgstr "توابع زیر دارای :term:`منسوخ‌شدگی نرم ` هستند:" + +msgid ":c:func:`PyType_FromSpec`" +msgstr ":c:func:`PyType_FromSpec`" + +msgid ":c:func:`PyType_FromSpecWithBases`" +msgstr ":c:func:`PyType_FromSpecWithBases`" + +msgid ":c:func:`PyType_FromModuleAndSpec`" +msgstr ":c:func:`PyType_FromModuleAndSpec`" + +msgid ":c:func:`PyType_FromMetaclass`" +msgstr ":c:func:`PyType_FromMetaclass`" + +msgid ":c:func:`PyModule_FromDefAndSpec`" +msgstr ":c:func:`PyModule_FromDefAndSpec`" + +msgid ":c:func:`PyModule_FromDefAndSpec2`" +msgstr ":c:func:`PyModule_FromDefAndSpec2`" + +msgid ":c:func:`PyModule_ExecDef`" +msgstr ":c:func:`PyModule_ExecDef`" + +msgid "The slots :c:macro:`Py_tp_bases` and :c:macro:`Py_tp_base` are now equivalent: they can be set either to a single type or a tuple of types. The :c:macro:`Py_tp_bases` slot is preferred; the other is ignored if both are specified." +msgstr "جایگاه‌های :c:macro:`Py_tp_bases` و :c:macro:`Py_tp_base` اکنون معادل هستند: می‌توان آن‌ها را روی یک نوع واحد یا یک تاپل از نوع‌ها تنظیم کرد. جایگاه :c:macro:`Py_tp_bases` ارجح است؛ اگر هر دو مشخص شده باشند، دیگری نادیده گرفته می‌شود." + +msgid "(Contributed by Petr Viktorin in :gh:`149044`.)" +msgstr "(مشارکت‌کننده: Petr Viktorin در :gh:`149044`.)" + +msgid "Add :c:func:`PyUnstable_ThreadState_SetStackProtection` and :c:func:`PyUnstable_ThreadState_ResetStackProtection` functions to set the stack protection base address and stack protection size of a Python thread state. (Contributed by Victor Stinner in :gh:`139653`.)" +msgstr "توابع :c:func:`PyUnstable_ThreadState_SetStackProtection` و :c:func:`PyUnstable_ThreadState_ResetStackProtection` اضافه شدند تا آدرس پایه محافظت از پشته و اندازه‌ی محافظت از پشته برای وضعیت نخ پایتون تنظیم شود. (مشارکت‌کننده: Victor Stinner در :gh:`139653`.)" + +msgid "Add :c:func:`PyUnstable_SetImmortal` C API function to mark objects as :term:`immortal`. (Contributed by Kumar Aditya in :gh:`143300`.)" +msgstr "تابع API زبان C با نام :c:func:`PyUnstable_SetImmortal` اضافه شد تا شیءها به عنوان :term:`نامیرا ` علامت‌گذاری شوند. (مشارکت‌کننده: Kumar Aditya در :gh:`143300`.)" + +msgid "Restore private provisional ``_Py_InitializeMain()`` function removed in Python 3.14. (Contributed by Victor Stinner in :gh:`142417`.)" +msgstr "بازگردانی تابع خصوصی و موقتی ``_Py_InitializeMain()`` که در پایتون ۳.۱۴ حذف شده بود. (مشارکت‌کننده: Victor Stinner در :gh:`142417`.)" + +msgid "Add :c:func:`PyUnstable_DumpTraceback` and :c:func:`PyUnstable_DumpTracebackThreads` functions to output Python stacktraces. (Contributed by Alex Malyshev in :gh:`145559`.)" +msgstr "توابع :c:func:`PyUnstable_DumpTraceback` و :c:func:`PyUnstable_DumpTracebackThreads` برای خروجی گرفتن از رد پشته‌های (stacktraces) پایتون اضافه شدند. (مشارکت‌کننده: Alex Malyshev در :gh:`145559`.)" + +msgid "Changed C APIs" +msgstr "APIهای تغییریافته‌ی C" + +msgid "If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` or :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` flag is set then :c:macro:`Py_TPFLAGS_HAVE_GC` must be set too. (Contributed by Sergey Miryanov in :gh:`134786`.)" +msgstr "اگر پرچم :c:macro:`Py_TPFLAGS_MANAGED_DICT` یا :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` تنظیم شده باشد، پرچم :c:macro:`Py_TPFLAGS_HAVE_GC` نیز باید تنظیم شود. (توسط Sergey Miryanov در :gh:`134786` مشارکت داده شده است.)" + +msgid ":c:macro:`PyDateTime_IMPORT` is now thread safe. Code that directly checks ``PyDateTimeAPI`` for ``NULL`` should be updated to call :c:macro:`PyDateTime_IMPORT` instead. (Contributed by Kumar Aditya in :gh:`141563`.)" +msgstr "ماکروی :c:macro:`PyDateTime_IMPORT` اکنون ایمن در برابر نخ (thread-safe) است. کدهایی که مستقیماً ``PyDateTimeAPI`` را از نظر ``NULL`` بودن بررسی می‌کنند، باید به‌روزرسانی شوند تا به جای آن :c:macro:`PyDateTime_IMPORT` را فراخوانی کنند. (مشارکت‌کننده: Kumar Aditya در :gh:`141563`.)" + +msgid "Removed C APIs" +msgstr "رابط‌های برنامه‌نویسی کاربردی (API) زبان C حذف‌شده" + +msgid "Remove deprecated ``PyUnicode`` functions:" +msgstr "تابع‌های منسوخ‌شده‌ی ``PyUnicode`` را حذف کنید:" + +msgid ":c:func:`!PyUnicode_AsDecodedObject`: Use :c:func:`PyCodec_Decode` instead." +msgstr ":c:func:`!PyUnicode_AsDecodedObject`: به‌جای آن از :c:func:`PyCodec_Decode` استفاده کنید." + +msgid ":c:func:`!PyUnicode_AsDecodedUnicode`: Use :c:func:`PyCodec_Decode` instead; note that some codecs (for example, \"base64\") may return a type other than :class:`str`, such as :class:`bytes`." +msgstr ":c:func:`!PyUnicode_AsDecodedUnicode`: به‌جای آن از :c:func:`PyCodec_Decode` استفاده کنید؛ توجه داشته باشید که برخی از کُدک‌ها (برای مثال، \"base64\") ممکن است نوعی غیر از :class:`str`، مانند :class:`bytes` را برگردانند." + +msgid ":c:func:`!PyUnicode_AsEncodedObject`: Use :c:func:`PyCodec_Encode` instead." +msgstr ":c:func:`!PyUnicode_AsEncodedObject`: به‌جای آن از :c:func:`PyCodec_Encode` استفاده کنید." + +msgid ":c:func:`!PyUnicode_AsEncodedUnicode`: Use :c:func:`PyCodec_Encode` instead; note that some codecs (for example, \"base64\") may return a type other than :class:`bytes`, such as :class:`str`." +msgstr ":c:func:`!PyUnicode_AsEncodedUnicode`: به‌جای آن از :c:func:`PyCodec_Encode` استفاده کنید؛ توجه داشته باشید که برخی از کُدک‌ها (برای مثال، \"base64\") ممکن است نوعی غیر از :class:`bytes`، مانند :class:`str` را برگردانند." + +msgid "(Contributed by Stan Ulbrych in :gh:`133612`.)" +msgstr "(توسط Stan Ulbrych در :gh:`133612` مشارکت داده شده است.)" + +msgid ":c:func:`!PyImport_ImportModuleNoBlock`: deprecated alias of :c:func:`PyImport_ImportModule`. (Contributed by Bénédikt Tran in :gh:`133644`.)" +msgstr ":c:func:`!PyImport_ImportModuleNoBlock`: نام مستعار منسوخ‌شده‌ی :c:func:`PyImport_ImportModule`. (توسط Bénédikt Tran در :gh:`133644` مشارکت داده شده است.)" + +msgid ":c:func:`!PyWeakref_GetObject` and :c:macro:`!PyWeakref_GET_OBJECT`: use :c:func:`PyWeakref_GetRef` instead. The |pythoncapi_compat_project| can be used to get :c:func:`!PyWeakref_GetRef` on Python 3.12 and older. (Contributed by Bénédikt Tran in :gh:`133644`.)" +msgstr ":c:func:`!PyWeakref_GetObject` و :c:macro:`!PyWeakref_GET_OBJECT`: به‌جای آن از :c:func:`PyWeakref_GetRef` استفاده کنید. از |pythoncapi_compat_project| می‌توان برای دریافت :c:func:`!PyWeakref_GetRef` در پایتون ۳.۱۲ و نسخه‌های قدیمی‌تر استفاده کرد. (توسط Bénédikt Tran در :gh:`133644` مشارکت داده شده است.)" + +msgid "Remove deprecated :c:func:`!PySys_ResetWarnOptions`. Clear :data:`sys.warnoptions` and :data:`!warnings.filters` instead." +msgstr "تابع منسوخ‌شده‌ی :c:func:`!PySys_ResetWarnOptions` حذف شد. به‌جای آن :data:`sys.warnoptions` و :data:`!warnings.filters` را پاکسازی کنید." + +msgid "(Contributed by Nikita Sobolev in :gh:`138886`.)" +msgstr "(توسط Nikita Sobolev در :gh:`138886` مشارکت داده شده است.)" + +msgid "The following functions are removed in favor of :c:func:`PyConfig_Get`. The |pythoncapi_compat_project| can be used to get :c:func:`!PyConfig_Get` on Python 3.13 and older." +msgstr "تابع‌های زیر به نفع :c:func:`PyConfig_Get` حذف شده‌اند. از |pythoncapi_compat_project| می‌توان برای دریافت :c:func:`!PyConfig_Get` در پایتون ۳.۱۳ و نسخه‌های قدیمی‌تر استفاده کرد." + +msgid "Python initialization functions:" +msgstr "تابع‌های مقداردهی اولیه‌ی پایتون:" + +msgid ":c:func:`!Py_GetExecPrefix`: use :c:func:`PyConfig_Get(\"base_exec_prefix\") ` (:data:`sys.base_exec_prefix`) instead. Use :c:func:`PyConfig_Get(\"exec_prefix\") ` (:data:`sys.exec_prefix`) if :ref:`virtual environments ` need to be handled." +msgstr ":c:func:`!Py_GetExecPrefix`: به‌جای آن از :c:func:`PyConfig_Get(\"base_exec_prefix\") ` (:data:`sys.base_exec_prefix`) استفاده کنید. اگر نیاز است :ref:`محیط‌های مجازی ` مدیریت شوند، از :c:func:`PyConfig_Get(\"exec_prefix\") ` (:data:`sys.exec_prefix`) استفاده کنید." + +msgid ":c:func:`!Py_GetPath`: use :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:`sys.path`) instead." +msgstr ":c:func:`!Py_GetPath`: به‌جای آن از :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:`sys.path`) استفاده کنید." + +msgid ":c:func:`!Py_GetPrefix`: use :c:func:`PyConfig_Get(\"base_prefix\") ` (:data:`sys.base_prefix`) instead. Use :c:func:`PyConfig_Get(\"prefix\") ` (:data:`sys.prefix`) if :ref:`virtual environments ` need to be handled." +msgstr ":c:func:`!Py_GetPrefix`: به‌جای آن از :c:func:`PyConfig_Get(\"base_prefix\") ` (:data:`sys.base_prefix`) استفاده کنید. اگر نیاز است :ref:`محیط‌های مجازی ` مدیریت شوند، از :c:func:`PyConfig_Get(\"prefix\") ` (:data:`sys.prefix`) استفاده کنید." + +msgid ":c:func:`!Py_GetProgramFullPath`: use :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) instead." +msgstr ":c:func:`!Py_GetProgramFullPath`: به‌جای آن از :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) استفاده کنید." + +msgid ":c:func:`!Py_GetProgramName`: use :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) instead." +msgstr ":c:func:`!Py_GetProgramName`: به‌جای آن از :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys.executable`) استفاده کنید." + +msgid ":c:func:`!Py_GetPythonHome`: use :c:func:`PyConfig_Get(\"home\") ` or the :envvar:`PYTHONHOME` environment variable instead." +msgstr ":c:func:`!Py_GetPythonHome`: به‌جای آن از :c:func:`PyConfig_Get(\"home\") ` یا متغیر محیطی :envvar:`PYTHONHOME` استفاده کنید." + +msgid "(Contributed by Bénédikt Tran in :gh:`133644`.)" +msgstr "(مشارکت‌کننده: Bénédikt Tran در :gh:`133644`.)" + +msgid "Deprecated C APIs" +msgstr "رابط‌های برنامه‌نویسی کاربردی C منسوخ‌شده" + +msgid "Deprecate :pep:`456` support for providing an external definition of the string hashing scheme. Removal is scheduled for Python 3.19." +msgstr "پشتیبانی از :pep:`456` برای ارائه‌ی تعریفی خارجی از طرح‌واره‌ی هش‌کردن رشته منسوخ شد. حذف آن برای پایتون ۳.۱۹ برنامه‌ریزی شده است." + +msgid "Previously, embedders could define :c:macro:`Py_HASH_ALGORITHM` to be ``Py_HASH_EXTERNAL`` to indicate that the hashing scheme was provided externally but this feature was undocumented, untested and most likely unused." +msgstr "پیش‌تر، برنامه‌های تعبیه‌کننده می‌توانستند :c:macro:`Py_HASH_ALGORITHM` را طوری تعریف کنند که برابر با ``Py_HASH_EXTERNAL`` باشد تا نشان دهند طرح‌واره‌ی هش‌کردن به صورت خارجی فراهم شده است، اما این ویژگی مستندنشده، آزمایش‌نشده و احتمالاً بدون استفاده بود." + +msgid "(Contributed by Bénédikt Tran in :gh:`141226`.)" +msgstr "(مشارکت‌کننده: Bénédikt Tran در :gh:`141226`.)" + +msgid "For unsigned integer formats in :c:func:`PyArg_ParseTuple`, accepting Python integers with value that is larger than the maximal value for the C type or less than the minimal value for the corresponding signed integer type of the same size is now deprecated. (Contributed by Serhiy Storchaka in :gh:`132629`.)" +msgstr "برای قالب‌های عدد صحیح بدون علامت در :c:func:`PyArg_ParseTuple`، پذیرش اعداد صحیح پایتون با مقداری که از بیشینه مقدار برای نوع C بزرگ‌تر است یا از کمینه مقدار برای نوع عدد صحیح علامت‌دار متناظر با همان اندازه کمتر است، اکنون منسوخ شده است. (مشارکت‌کننده: Serhiy Storchaka در :gh:`132629`.)" + +msgid ":c:func:`PyBytes_FromStringAndSize(NULL, len) ` and :c:func:`_PyBytes_Resize` are :term:`soft deprecated`, use the :c:type:`PyBytesWriter` API instead. (Contributed by Victor Stinner in :gh:`129813`.)" +msgstr ":c:func:`PyBytes_FromStringAndSize(NULL, len) ` و :c:func:`_PyBytes_Resize` :term:`منسوخ‌نشانه ` هستند، به‌جای آن‌ها از API مربوط به :c:type:`PyBytesWriter` استفاده کنید. (مشارکت‌کننده: Victor Stinner در :gh:`129813`.)" + +msgid ":c:func:`!_PyObject_CallMethodId`, :c:func:`!_PyObject_GetAttrId` and :c:func:`!_PyUnicode_FromId` are deprecated since Python 3.15 and will be removed in Python 3.20. Instead, use :c:func:`PyUnicode_InternFromString()` and cache the result in the module state, then call :c:func:`PyObject_CallMethod` or :c:func:`PyObject_GetAttr`. (Contributed by Victor Stinner in :gh:`141049`.)" +msgstr ":c:func:`!_PyObject_CallMethodId`، :c:func:`!_PyObject_GetAttrId` و :c:func:`!_PyUnicode_FromId` از پایتون ۳.۱۵ منسوخ شده‌اند و در پایتون ۳.۲۰ حذف خواهند شد. به‌جای آن، از :c:func:`PyUnicode_InternFromString()` استفاده کنید و نتیجه را در وضعیت ماژول نهانگاه کنید، سپس :c:func:`PyObject_CallMethod` یا :c:func:`PyObject_GetAttr` را فراخوانی کنید. (مشارکت‌کننده: Victor Stinner در :gh:`141049`.)" + +msgid "Deprecate :c:member:`~PyComplexObject.cval` field of the :c:type:`PyComplexObject` type. Use :c:func:`PyComplex_AsCComplex` and :c:func:`PyComplex_FromCComplex` to convert a Python complex number to/from the C :c:type:`Py_complex` representation. (Contributed by Sergey B Kirpichev in :gh:`128813`.)" +msgstr "فیلد :c:member:`~PyComplexObject.cval` از نوع :c:type:`PyComplexObject` منسوخ شد. برای تبدیل یک عدد مختلط پایتون به/از نمایش C مربوط به :c:type:`Py_complex`، از :c:func:`PyComplex_AsCComplex` و :c:func:`PyComplex_FromCComplex` استفاده کنید. (مشارکت‌کننده: Sergey B Kirpichev در :gh:`128813`.)" + +msgid "Functions :c:func:`_Py_c_sum`, :c:func:`_Py_c_diff`, :c:func:`_Py_c_neg`, :c:func:`_Py_c_prod`, :c:func:`_Py_c_quot`, :c:func:`_Py_c_pow` and :c:func:`_Py_c_abs` are :term:`soft deprecated`. (Contributed by Sergey B Kirpichev in :gh:`128813`.)" +msgstr "توابع :c:func:`_Py_c_sum`، :c:func:`_Py_c_diff`، :c:func:`_Py_c_neg`، :c:func:`_Py_c_prod`، :c:func:`_Py_c_quot`، :c:func:`_Py_c_pow` و :c:func:`_Py_c_abs` :term:`منسوخ‌نشانه ` هستند. (مشارکت‌کننده: Sergey B Kirpichev در :gh:`128813`.)" + +msgid ":c:member:`~PyConfig.bytes_warning` is deprecated since Python 3.15 and will be removed in Python 3.17. (Contributed by Nikita Sobolev in :gh:`136355`.)" +msgstr ":c:member:`~PyConfig.bytes_warning` از پایتون ۳.۱۵ منسوخ شده است و در پایتون ۳.۱۷ حذف خواهد شد. (مشارکت‌کننده: Nikita Sobolev در :gh:`136355`.)" + +msgid ":c:macro:`!Py_INFINITY` macro is :term:`soft deprecated`, use the C11 standard ```` :c:macro:`!INFINITY` instead. (Contributed by Sergey B Kirpichev in :gh:`141004`.)" +msgstr "ماکروی :c:macro:`!Py_INFINITY` :term:`منسوخ‌نشانه ` است، به‌جای آن از ماکروی :c:macro:`!INFINITY` استاندارد C11 یعنی ```` استفاده کنید. (مشارکت‌کننده: Sergey B Kirpichev در :gh:`141004`.)" + +msgid "The following macros are :term:`soft deprecated`:" +msgstr "ماکروهای زیر :term:`منسوخ‌نشانه ` هستند:" + +msgid ":c:macro:`Py_ALIGNED`: Prefer ``alignas`` instead." +msgstr ":c:macro:`Py_ALIGNED`: به‌جای آن ``alignas`` را ترجیح دهید." + +msgid ":c:macro:`PY_FORMAT_SIZE_T`: Use ``\"z\"`` directly." +msgstr ":c:macro:`PY_FORMAT_SIZE_T`: از ``\"z\"`` مستقیماً استفاده کنید." + +msgid ":c:macro:`Py_LL` and :c:macro:`Py_ULL`: Use standard suffixes, ``LL`` and ``ULL``." +msgstr ":c:macro:`Py_LL` و :c:macro:`Py_ULL`: از پسوندهای استاندارد یعنی ``LL`` و ``ULL`` استفاده کنید." + +msgid ":c:macro:`PY_LONG_LONG`, :c:macro:`PY_LLONG_MIN`, :c:macro:`PY_LLONG_MAX`, :c:macro:`PY_ULLONG_MAX`, :c:macro:`PY_INT32_T`, :c:macro:`PY_UINT32_T`, :c:macro:`PY_INT64_T`, :c:macro:`PY_UINT64_T`, :c:macro:`PY_SIZE_MAX`: Use C99 types/limits." +msgstr ":c:macro:`PY_LONG_LONG`، :c:macro:`PY_LLONG_MIN`، :c:macro:`PY_LLONG_MAX`، :c:macro:`PY_ULLONG_MAX`، :c:macro:`PY_INT32_T`، :c:macro:`PY_UINT32_T`، :c:macro:`PY_INT64_T`، :c:macro:`PY_UINT64_T`، :c:macro:`PY_SIZE_MAX`: از انواع/حدود C99 استفاده کنید." + +msgid ":c:macro:`Py_UNICODE_SIZE`: Use ``sizeof(wchar_t)`` directly." +msgstr ":c:macro:`Py_UNICODE_SIZE`: مستقیماً از ``sizeof(wchar_t)`` استفاده کنید." + +msgid ":c:macro:`Py_VA_COPY`: Use ``va_copy`` directly." +msgstr ":c:macro:`Py_VA_COPY`: مستقیماً از ``va_copy`` استفاده کنید." + +msgid "The macro :c:macro:`Py_UNICODE_WIDE`, which was scheduled for removal, is :term:`soft deprecated` instead." +msgstr "کلان‌دستور :c:macro:`Py_UNICODE_WIDE` که قرار بود حذف شود، اکنون به‌جای آن :term:`منسوخ ملایم ` شده است." + +msgid "(Contributed by Petr Viktorin in :gh:`146175`.)" +msgstr "(تهیه‌شده توسط Petr Viktorin در :gh:`146175`.)" + +msgid ":c:macro:`!Py_MATH_El` and :c:macro:`!Py_MATH_PIl` are deprecated since Python 3.15 and will be removed in Python 3.20. (Contributed by Sergey B Kirpichev in :gh:`141004`.)" +msgstr "موارد :c:macro:`!Py_MATH_El` و :c:macro:`!Py_MATH_PIl` از نسخه‌ی ۳.۱۵ پایتون منسوخ شده‌اند و در نسخه‌ی ۳.۲۰ پایتون حذف خواهند شد. (تهیه‌شده توسط Sergey B Kirpichev در :gh:`141004`.)" + +msgid "Build changes" +msgstr "تغییرات ساخت" + +msgid "Removed implicit fallback to the bundled copy of the ``libmpdec`` library. Now this should be explicitly enabled with :option:`--with-system-libmpdec` set to ``no`` or with :option:`!--without-system-libmpdec`. (Contributed by Sergey B Kirpichev in :gh:`115119`.)" +msgstr "پشتیبان ضمنی به نسخه‌ی بسته‌بندی‌شده‌ی کتابخانه‌ی ``libmpdec`` حذف شد. اکنون این مورد باید با تنظیم :option:`--with-system-libmpdec` روی ``no`` یا با استفاده از :option:`!--without-system-libmpdec` به‌طور صریح فعال شود. (تهیه‌شده توسط Sergey B Kirpichev در :gh:`115119`.)" + +msgid "The new configure option :option:`--with-missing-stdlib-config=FILE` allows distributors to pass a `JSON `_ configuration file containing custom error messages for :term:`standard library` modules that are missing or packaged separately. (Contributed by Stan Ulbrych and Petr Viktorin in :gh:`139707`.)" +msgstr "گزینه‌ی پیکربندی جدید :option:`--with-missing-stdlib-config=FILE` به توزیع‌کنندگان اجازه می‌دهد تا یک پرونده‌ی پیکربندی `JSON `_ حاوی پیام‌های خطای سفارشی برای ماژول‌های :term:`کتابخانه‌ی استاندارد ` که گم شده‌اند یا به‌صورت جداگانه بسته‌بندی شده‌اند، ارسال کنند. (تهیه‌شده توسط Stan Ulbrych و Petr Viktorin در :gh:`139707`.)" + +msgid "The new configure option :option:`--with-pymalloc-hugepages` enables huge page support for :ref:`pymalloc ` arenas. When enabled, arena size increases to 2 MiB and allocation uses ``MAP_HUGETLB`` (Linux) or ``MEM_LARGE_PAGES`` (Windows) with automatic fallback to regular pages. On Windows, use ``build.bat --pymalloc-hugepages``. At runtime, huge pages must be explicitly enabled by setting the :envvar:`PYTHON_PYMALLOC_HUGEPAGES` environment variable to ``1``. (Contributed by Pablo Galindo Salgado in :gh:`144319`.)" +msgstr "گزینه‌ی پیکربندی جدید :option:`--with-pymalloc-hugepages` پشتیبانی از صفحات بزرگ را برای ناحیه‌های :ref:`pymalloc ` فعال می‌کند. در صورت فعال‌سازی، اندازه‌ی ناحیه به ۲ مگابایت افزایش می‌یابد و تخصیص حافظه با استفاده از ``MAP_HUGETLB`` (لینوکس) یا ``MEM_LARGE_PAGES`` (ویندوز) به همراه جایگزین خودکار به صفحات معمولی انجام می‌شود. در ویندوز، از ``build.bat --pymalloc-hugepages`` استفاده کنید. در حین اجرا (ران‌تایم)، صفحات بزرگ باید با تنظیم متغیر محیطی :envvar:`PYTHON_PYMALLOC_HUGEPAGES` روی ``1`` به‌طور صریح فعال شوند. (تهیه‌شده توسط Pablo Galindo Salgado در :gh:`144319`.)" + +msgid "Annotating anonymous mmap usage is now supported if the Linux kernel supports :manpage:`PR_SET_VMA_ANON_NAME ` (Linux 5.17 or newer). Annotations are visible in ``/proc//maps`` if the kernel supports the feature and :option:`-X dev <-X>` is passed to Python, or Python is built in :ref:`debug mode `. (Contributed by Donghee Na in :gh:`141770`.)" +msgstr "حاشیه‌نویسی استفاده از mmap ناشناس اکنون در صورتی پشتیبانی می‌شود که هسته‌ی لینوکس از :manpage:`PR_SET_VMA_ANON_NAME ` (لینوکس ۵.۱۷ یا جدیدتر) پشتیبانی کند. حاشیه‌نویسی‌ها در ``/proc//maps`` قابل مشاهده هستند، مشروط بر اینکه هسته از این ویژگی پشتیبانی کند و :option:`-X dev <-X>` به پایتون ارسال شود یا پایتون در :ref:`حالت اشکال‌زدایی ` ساخته شده باشد. (تهیه‌شده توسط Donghee Na در :gh:`141770`.)" + +msgid "CPython is now built with frame pointers enabled by default (:pep:`831`). Pass :option:`--without-frame-pointers` to opt out." +msgstr "سی‌پایتون اکنون به‌طور پیش‌فرض با اشاره‌گرهای قاب فعال ساخته می‌شود (:pep:`831`). برای انصراف، :option:`--without-frame-pointers` را ارسال کنید." + +msgid "Authors of C extensions and native libraries built with custom build systems should ensure the unwind chain is intact. This is usually done by adding ``-fno-omit-frame-pointer`` and similar flags to ``CFLAGS``. See :option:`--without-frame-pointers` documentation for the specific flags Python uses." +msgstr "سازندگان افزونه‌های C و کتابخانه‌های بومی که با سیستم‌های ساخت سفارشی ساخته شده‌اند، باید مطمئن شوند که زنجیره‌ی بازگشایی سالم است. این کار معمولاً با افزودن ``-fno-omit-frame-pointer`` و پرچم‌های مشابه به ``CFLAGS`` انجام می‌شود. برای اطلاع از پرچم‌های خاصی که پایتون استفاده می‌کند، به مستندات :option:`--without-frame-pointers` مراجعه کنید." + +msgid "(Contributed by Pablo Galindo Salgado and Savannah Ostrowski in :gh:`149201`.)" +msgstr "(تهیه‌شده توسط Pablo Galindo Salgado و Savannah Ostrowski در :gh:`149201`.)" + +msgid "64-bit builds using Visual Studio 2026 (MSVC 18) may now use the new :ref:`tail-calling interpreter `. Results on Visual Studio 18.1.1 report between `15-20% `__ speedup on the geometric mean of pyperformance on Windows x86-64 over the switch-case interpreter on an AMD Ryzen 7 5800X. We have observed speedups ranging from 14% for large pure-Python libraries to 40% for long-running small pure-Python scripts on Windows. This was made possible by a new feature introduced in MSVC 18, which the official Windows 64-bit binaries on python.org__ now use. (Contributed by Chris Eibl, Ken Jin, and Brandt Bucher in :gh:`143068`. Special thanks to Steve Dower, and the MSVC team including Hulon Jenkins.)" +msgstr "ساخت‌های ۶۴ بیتی با استفاده از ویژوال استودیوی ۲۰۲۶ (MSVC 18) اکنون می‌توانند از :ref:`مفسر فراخوانی انتها ` جدید استفاده کنند. نتایج روی ویژوال استودیو ۱۸.۱.۱ سرعتی بین `15-20% `__ روی میانگین هندسی pyperformance در ویندوز x86-64 نسبت به مفسر switch-case روی پردازنده‌ی AMD Ryzen 7 5800X را گزارش می‌دهند. ما افزایش سرعت بین ۱۴٪ برای کتابخانه‌های بزرگ پایتون خالص تا ۴۰٪ برای اسکریپت‌های کوچک پایتون خالصِ طولانی‌مدت را در ویندوز مشاهده کرده‌ایم. این امر با ویژگی جدیدی که در MSVC 18 معرفی شده امکان‌پذیر شده است که باینری‌های رسمی ۶۴ بیتی ویندوز در python.org__ اکنون از آن استفاده می‌کنند. (تهیه‌شده توسط Chris Eibl، Ken Jin و Brandt Bucher در :gh:`143068`. تشکر ویژه از Steve Dower و تیم MSVC از جمله Hulon Jenkins.)" + +msgid "Porting to Python 3.15" +msgstr "انتقال به پایتون ۳.۱۵" + +msgid "This section lists previously described changes and other bugfixes that may require changes to your code." +msgstr "این بخش تغییرات توصیف‌شده‌ی قبلی و سایر رفع باگ‌هایی را فهرست می‌کند که ممکن است نیازمند تغییراتی در کد شما باشند." + +msgid ":class:`sqlite3.Connection` APIs have been cleaned up." +msgstr "رابط‌های برنامه‌نویسی :class:`sqlite3.Connection` پاک‌سازی شده‌اند." + +msgid "All parameters of :func:`sqlite3.connect` except *database* are now keyword-only." +msgstr "تمام پارامترهای :func:`sqlite3.connect` به جز *database* اکنون فقط-کلیدواژه هستند." + +msgid "The first three parameters of methods :meth:`~sqlite3.Connection.create_function` and :meth:`~sqlite3.Connection.create_aggregate` are now positional-only." +msgstr "سه پارامتر اول متدهای :meth:`~sqlite3.Connection.create_function` و :meth:`~sqlite3.Connection.create_aggregate` اکنون فقط-جایگاهی هستند." + +msgid "The first parameter of methods :meth:`~sqlite3.Connection.set_authorizer`, :meth:`~sqlite3.Connection.set_progress_handler` and :meth:`~sqlite3.Connection.set_trace_callback` is now positional-only." +msgstr "پارامتر اول متدهای :meth:`~sqlite3.Connection.set_authorizer`، :meth:`~sqlite3.Connection.set_progress_handler` و :meth:`~sqlite3.Connection.set_trace_callback` اکنون فقط-جایگاهی است." + +msgid "(Contributed by Serhiy Storchaka in :gh:`133595`.)" +msgstr "(تهیه‌شده توسط Serhiy Storchaka در :gh:`133595`.)" + +msgid ":data:`resource.RLIM_INFINITY` is now always positive. Passing a negative integer value that corresponded to its old value (such as ``-1`` or ``-3``, depending on platform) to :func:`resource.setrlimit` and :func:`resource.prlimit` is now deprecated. (Contributed by Serhiy Storchaka in :gh:`137044`.)" +msgstr ":data:`resource.RLIM_INFINITY` اکنون همیشه مثبت است. ارسال یک مقدار عدد صحیح منفی که با مقدار قبلی آن مطابقت داشت (مانند ``-1`` یا ``-3``، بسته به پلتفرم) به :func:`resource.setrlimit` و :func:`resource.prlimit` اکنون منسوخ شده است. (تهیه‌شده توسط Serhiy Storchaka در :gh:`137044`.)" + +msgid ":meth:`mmap.mmap.resize` has been removed on platforms that don't support the underlying syscall, instead of raising a :exc:`SystemError`. (Contributed by An Long in :gh:`138205`.)" +msgstr "متد :meth:`mmap.mmap.resize` در پلتفرم‌هایی که از سیستم‌کل زیرساختی پشتیبانی نمی‌کنند، به‌جای بالا آوردن یک :exc:`SystemError` حذف شده است. (مشارکت‌شده توسط An Long در :gh:`138205`.)" + +msgid "A resource warning is now emitted for an unclosed :func:`xml.etree.ElementTree.iterparse` iterator if it opened a file. Use its :meth:`!close` method or the :func:`contextlib.closing` context manager to close it. (Contributed by Osama Abdelkader and Serhiy Storchaka in :gh:`140601`.)" +msgstr "اگر یک پیمایش‌گر :func:`xml.etree.ElementTree.iterparse` نبسته، پرونده‌ای را باز کرده باشد، اکنون یک هشدار منبع (resource warning) صادر می‌شود. برای بستن آن، از متد :meth:`!close` یا مدیر زمینه‌ی :func:`contextlib.closing` استفاده کنید. (مشارکت‌شده توسط اسامه عبدالقادر و سرهی استورچاکا در :gh:`140601`.)" + +msgid "If a short option and a single-dash long option are passed to :meth:`argparse.ArgumentParser.add_argument`, *dest* is now inferred from the single-dash long option. For example, in ``add_argument('-f', '-foo')``, *dest* is now ``'foo'`` instead of ``'f'``. Pass an explicit *dest* argument to preserve the old behavior. (Contributed by Serhiy Storchaka in :gh:`138697`.)" +msgstr "اگر یک گزینه‌ی کوتاه و یک گزینه‌ی بلند با خط تیره‌ی تکی به :meth:`argparse.ArgumentParser.add_argument` فرستاده شوند، مقدار *dest* اکنون از گزینه‌ی بلند با خط تیره‌ی تکی استنباط می‌شود. برای نمونه، در ``add_argument('-f', '-foo')``، مقدار *dest* به‌جای ``'f'`` اکنون ``'foo'`` است. برای حفظ رفتار قبلی، یک آرگومان *dest* صریح ارسال کنید. (مشارکت‌کننده: Serhiy Storchaka در :gh:`138697`.)" + +msgid "Padding of input no longer required in :func:`base64.urlsafe_b64decode`. Pass a new argument ``padded=True`` or use :func:`base64.b64decode` with argument ``altchars=b'-_'`` (this works with older Python versions) to make padding required. (Contributed by Serhiy Storchaka in :gh:`73613`.)" +msgstr "پُرکننده (padding) ورودی دیگر در :func:`base64.urlsafe_b64decode` الزامی نیست. برای الزامی کردن پُرکننده، یک آرگومان جدید ``padded=True`` ارسال کنید یا از :func:`base64.b64decode` با آرگومان ``altchars=b'-_'`` استفاده کنید (این روش با نسخه‌های قدیمی‌تر پایتون کار می‌کند). (مشارکت‌شده توسط Serhiy Storchaka در :gh:`73613`.)" + +msgid "Since :meth:`unittest.TestCase.assertWarns` and :meth:`unittest.TestCase.assertWarnsRegex` no longer swallow warnings that do not match the specified category or regex, your tests may start leaking some warnings that were previously masked. Use warning filters to silence them or additional :meth:`!assertWarns*` to catch and check them. (Contributed by Serhiy Storchaka in :gh:`143231`.)" +msgstr "از آنجا که :meth:`unittest.TestCase.assertWarns` و :meth:`unittest.TestCase.assertWarnsRegex` دیگر اخطارهایی را که با دسته‌بندی یا عبارت منظم مشخص‌شده مطابقت ندارند نادیده نمی‌گیرند، ممکن است آزمون‌های شما شروع به نشت دادن برخی اخطارها کنند که پیش‌تر پنهان شده بودند. برای بی‌صدا کردن آن‌ها از صافی‌های اخطار (warning filters) یا از متدهای اضافی :meth:`!assertWarns*` برای گرفتن و بررسی آن‌ها استفاده کنید. (مشارکت‌شده توسط Serhiy Storchaka در :gh:`143231`.)" + +#~ msgid "A practical :ref:`migration guide ` for switching to ``abi3t`` is available." +#~ msgstr "یک :ref:`راهنمای مهاجرت ` کاربردی برای تغییر به ``abi3t`` در دسترس است." diff --git a/whatsnew/3.2.po b/whatsnew/3.2.po index 8f51bdb2..c8512a52 100644 --- a/whatsnew/3.2.po +++ b/whatsnew/3.2.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 16:35+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -344,8 +345,8 @@ msgstr "برای حل این مشکل، سازوکار ایمپورت پایتو msgid "Aside from the filenames and target directories, the new scheme has a few aspects that are visible to the programmer:" msgstr "علاوه بر نام پرونده‌ها و پوشه‌های مقصد، طرح‌واره جدید چند جنبه دارد که برای برنامه‌نویس قابل مشاهده‌اند:" -msgid "Imported modules now have a :attr:`~module.__cached__` attribute which stores the name of the actual file that was imported:" -msgstr "ماژول‌های ایمپورت‌شده اکنون یک ویژگی :attr:`~module.__cached__` دارند که نام پرونده‌ی واقعیِ ایمپورت‌شده را ذخیره می‌کند:" +msgid "Imported modules now have a ``__cached__`` attribute which stores the name of the actual file that was imported:" +msgstr "ماژول‌های ایمپورت‌شده اکنون دارای یک ویژگی ``__cached__`` هستند که نام پرونده‌ی واقعی ایمپورت‌شده را ذخیره می‌کند:" msgid "The tag that is unique to each interpreter is accessible from the :mod:`!imp` module:" msgstr "برچسبی که برای هر مفسر یکتا است، از ماژول :mod:`!imp` قابل دسترسی است:" diff --git a/whatsnew/3.3.po b/whatsnew/3.3.po index 129b28d5..afa5d700 100644 --- a/whatsnew/3.3.po +++ b/whatsnew/3.3.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 14:40+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -868,8 +869,8 @@ msgstr "(با مشارکت Benjamin Peterson.)" msgid "A Finer-Grained Import Lock" msgstr "قفل ایمپورت با دانه‌بندی ریزتر" -msgid "Previous versions of CPython have always relied on a global import lock. This led to unexpected annoyances, such as deadlocks when importing a module would trigger code execution in a different thread as a side-effect. Clumsy workarounds were sometimes employed, such as the :c:func:`PyImport_ImportModuleNoBlock` C API function." -msgstr "نسخه‌های قبلی سی‌پایتون همیشه به یک قفل سراسری ایمپورت تکیه داشته‌اند. این امر به مزاحمت‌های غیرمنتظره‌ای منجر می‌شد، مانند بن‌بست‌ها در مواردی که ایمپورت کردن یک ماژول، به‌عنوان یک اثر جانبی، اجرای کد را در نخ دیگری فعال می‌کرد. گاهی راه‌حل‌های ناشیانه‌ای به کار گرفته می‌شد، مانند تابع :c:func:`PyImport_ImportModuleNoBlock` در C API." +msgid "Previous versions of CPython have always relied on a global import lock. This led to unexpected annoyances, such as deadlocks when importing a module would trigger code execution in a different thread as a side-effect. Clumsy workarounds were sometimes employed, such as the :c:func:`!PyImport_ImportModuleNoBlock` C API function." +msgstr "نسخه‌های قبلی سی‌پایتون همیشه به قفل ایمپورت سراسری متکی بودند. این امر منجر به بروز مشکلات غیرمنتظره‌ای می‌شد؛ مانند بن‌بست‌هایی که در آن‌ها ایمپورت کردن یک ماژول به‌عنوان اثر جانبی، باعث اجرای کد در یک نخ متفاوت می‌شد. گاهی اوقات از راه‌حل‌های ناخوشایندی مانند تابع C API به نام :c:func:`!PyImport_ImportModuleNoBlock` استفاده می‌شد." msgid "In Python 3.3, importing a module takes a per-module lock. This correctly serializes importation of a given module from multiple threads (preventing the exposure of incompletely initialized modules), while eliminating the aforementioned annoyances." msgstr "در پایتون 3.3، هنگام ایمپورت کردن یک ماژول، قفلی مخصوص همان ماژول گرفته می‌شود. این کار، ایمپورت یک ماژول معین از چندین نخ را به‌درستی متوالی می‌سازد (و مانع از نمایان شدن ماژول‌های ناقص مقداردهی‌شده می‌شود) و در عین حال مزاحمت‌های پیش‌گفته را از بین می‌برد." diff --git a/whatsnew/3.4.po b/whatsnew/3.4.po index 3fd16e06..e09771ff 100644 --- a/whatsnew/3.4.po +++ b/whatsnew/3.4.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-14 13:44+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -1442,8 +1443,8 @@ msgstr "این بخش به API‌های گوناگون و سایر قابلیت msgid "Deprecations in the Python API" msgstr "منسوخ‌شدگی‌ها در API پایتون" -msgid "As mentioned in :ref:`whatsnew-pep-451`, a number of :mod:`importlib` methods and functions are deprecated: :meth:`!importlib.find_loader` is replaced by :func:`importlib.util.find_spec`; :meth:`!importlib.machinery.PathFinder.find_module` is replaced by :meth:`importlib.machinery.PathFinder.find_spec`; :meth:`!importlib.abc.MetaPathFinder.find_module` is replaced by :meth:`importlib.abc.MetaPathFinder.find_spec`; :meth:`!importlib.abc.PathEntryFinder.find_loader` and :meth:`!find_module` are replaced by :meth:`importlib.abc.PathEntryFinder.find_spec`; all of the :samp:`{xxx}Loader` ABC ``load_module`` methods (:meth:`!importlib.abc.Loader.load_module`, :meth:`!importlib.abc.InspectLoader.load_module`, :meth:`!importlib.abc.FileLoader.load_module`, :meth:`!importlib.abc.SourceLoader.load_module`) should no longer be implemented, instead loaders should implement an ``exec_module`` method (:meth:`importlib.abc.Loader.exec_module`, :meth:`importlib.abc.InspectLoader.exec_module` :meth:`importlib.abc.SourceLoader.exec_module`) and let the import system take care of the rest; and :meth:`!importlib.abc.Loader.module_repr`, :meth:`!importlib.util.module_for_loader`, :meth:`!importlib.util.set_loader`, and :meth:`!importlib.util.set_package` are no longer needed because their functions are now handled automatically by the import system." -msgstr "همان‌طور که در :ref:`whatsnew-pep-451` ذکر شد، تعدادی از متدها و توابع :mod:`importlib` منسوخ شده‌اند: :meth:`!importlib.find_loader` با :func:`importlib.util.find_spec` جایگزین شده است؛ :meth:`!importlib.machinery.PathFinder.find_module` با :meth:`importlib.machinery.PathFinder.find_spec` جایگزین شده است؛ :meth:`!importlib.abc.MetaPathFinder.find_module` با :meth:`importlib.abc.MetaPathFinder.find_spec` جایگزین شده است؛ :meth:`!importlib.abc.PathEntryFinder.find_loader` و :meth:`!find_module` با :meth:`importlib.abc.PathEntryFinder.find_spec` جایگزین شده‌اند؛ همه متدهای ``load_module`` کلاس‌های پایه انتزاعی :samp:`{xxx}Loader` (:meth:`!importlib.abc.Loader.load_module`، :meth:`!importlib.abc.InspectLoader.load_module`، :meth:`!importlib.abc.FileLoader.load_module`، :meth:`!importlib.abc.SourceLoader.load_module`) دیگر نباید پیاده‌سازی شوند؛ در عوض، بارگذارها باید یک متد ``exec_module`` پیاده‌سازی کنند (:meth:`importlib.abc.Loader.exec_module`، :meth:`importlib.abc.InspectLoader.exec_module`، :meth:`importlib.abc.SourceLoader.exec_module`) و بگذارند سیستم ایمپورت بقیه کارها را انجام دهد؛ و :meth:`!importlib.abc.Loader.module_repr`، :meth:`!importlib.util.module_for_loader`، :meth:`!importlib.util.set_loader` و :meth:`!importlib.util.set_package` دیگر مورد نیاز نیستند، زیرا کارکردهای آن‌ها اکنون به‌طور خودکار توسط سیستم ایمپورت مدیریت می‌شوند." +msgid "As mentioned in :ref:`whatsnew-pep-451`, a number of :mod:`importlib` methods and functions are deprecated: :meth:`!importlib.find_loader` is replaced by :func:`importlib.util.find_spec`; :meth:`!importlib.machinery.PathFinder.find_module` is replaced by :meth:`importlib.machinery.PathFinder.find_spec`; :meth:`!importlib.abc.MetaPathFinder.find_module` is replaced by :meth:`importlib.abc.MetaPathFinder.find_spec`; :meth:`!importlib.abc.PathEntryFinder.find_loader` and :meth:`!find_module` are replaced by :meth:`importlib.abc.PathEntryFinder.find_spec`; all of the :samp:`{xxx}Loader` ABC ``load_module`` methods (``importlib.abc.Loader.load_module``, ``importlib.abc.InspectLoader.load_module``, ``importlib.abc.FileLoader.load_module``, ``importlib.abc.SourceLoader.load_module``) should no longer be implemented, instead loaders should implement an ``exec_module`` method (:meth:`importlib.abc.Loader.exec_module`, :meth:`importlib.abc.InspectLoader.exec_module` :meth:`importlib.abc.SourceLoader.exec_module`) and let the import system take care of the rest; and :meth:`!importlib.abc.Loader.module_repr`, :meth:`!importlib.util.module_for_loader`, :meth:`!importlib.util.set_loader`, and :meth:`!importlib.util.set_package` are no longer needed because their functions are now handled automatically by the import system." +msgstr "همان‌طور که در :ref:`whatsnew-pep-451` ذکر شد، تعدادی از متدها و عملکردهای :mod:`importlib` منسوخ شده‌اند: :meth:`!importlib.find_loader` با :func:`importlib.util.find_spec` جایگزین شده است؛ :meth:`!importlib.machinery.PathFinder.find_module` با :meth:`importlib.machinery.PathFinder.find_spec` جایگزین شده است؛ :meth:`!importlib.abc.MetaPathFinder.find_module` با :meth:`importlib.abc.MetaPathFinder.find_spec` جایگزین شده است؛ :meth:`!importlib.abc.PathEntryFinder.find_loader` و :meth:`!find_module` با :meth:`importlib.abc.PathEntryFinder.find_spec` جایگزین شده‌اند؛ تمام متدهای ``load_module`` متعلق به کلاس‌های پایه انتزاعی :samp:`{xxx}Loader` (شامل ``importlib.abc.Loader.load_module``، ``importlib.abc.InspectLoader.load_module``، ``importlib.abc.FileLoader.load_module``، ``importlib.abc.SourceLoader.load_module``) نباید دیگر پیاده‌سازی شوند، در عوض بارگذارها باید یک متد ``exec_module`` پیاده‌سازی کنند (:meth:`importlib.abc.Loader.exec_module`، :meth:`importlib.abc.InspectLoader.exec_module`، :meth:`importlib.abc.SourceLoader.exec_module`) و اجازه دهند سیستم ایمپورت بقیه‌ی کارها را انجام دهد؛ و متدهای :meth:`!importlib.abc.Loader.module_repr`، :meth:`!importlib.util.module_for_loader`، :meth:`!importlib.util.set_loader` و :meth:`!importlib.util.set_package` دیگر مورد نیاز نیستند زیرا عملکردهای آن‌ها اکنون به‌طور خودکار توسط سیستم ایمپورت مدیریت می‌شود." msgid "The :mod:`!imp` module is pending deprecation. To keep compatibility with Python 2/3 code bases, the module's removal is currently not scheduled." msgstr "ماژول :mod:`!imp` در آستانه‌ی منسوخ شدن است. برای حفظ سازگاری با کدبیس‌های Python 2/3، حذف این ماژول در حال حاضر برنامه‌ریزی نشده است." diff --git a/whatsnew/3.6.po b/whatsnew/3.6.po index 99da0c86..53b0f367 100644 --- a/whatsnew/3.6.po +++ b/whatsnew/3.6.po @@ -8,12 +8,13 @@ # Danial Behzadi , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 12:47+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -1673,8 +1674,8 @@ msgstr "grp" msgid "The support of non-integer arguments in :func:`~grp.getgrgid` has been deprecated. (Contributed by Serhiy Storchaka in :issue:`26129`.)" msgstr "پشتیبانی از آرگومان‌های غیر از اعداد صحیح در :func:`~grp.getgrgid` منسوخ شده است. (با مشارکت Serhiy Storchaka در :issue:`26129`.)" -msgid "The :meth:`importlib.machinery.SourceFileLoader.load_module` and :meth:`importlib.machinery.SourcelessFileLoader.load_module` methods are now deprecated. They were the only remaining implementations of :meth:`importlib.abc.Loader.load_module` in :mod:`importlib` that had not been deprecated in previous versions of Python in favour of :meth:`importlib.abc.Loader.exec_module`." -msgstr "متدهای :meth:`importlib.machinery.SourceFileLoader.load_module` و :meth:`importlib.machinery.SourcelessFileLoader.load_module` اکنون منسوخ شده‌اند. آن‌ها تنها پیاده‌سازی‌های باقی‌مانده‌ی :meth:`importlib.abc.Loader.load_module` در :mod:`importlib` بودند که در نسخه‌های پیشین پایتون به نفع :meth:`importlib.abc.Loader.exec_module` منسوخ نشده بودند." +msgid "The ``importlib.machinery.SourceFileLoader.load_module`` and ``importlib.machinery.SourcelessFileLoader.load_module`` methods are now deprecated. They were the only remaining implementations of ``importlib.abc.Loader.load_module`` in :mod:`importlib` that had not been deprecated in previous versions of Python in favour of :meth:`importlib.abc.Loader.exec_module`." +msgstr "متدهای ``importlib.machinery.SourceFileLoader.load_module`` و ``importlib.machinery.SourcelessFileLoader.load_module`` اکنون منسوخ شده‌اند. آن‌ها تنها پیاده‌سازی‌های باقی‌مانده از ``importlib.abc.Loader.load_module`` در :mod:`importlib` بودند که در نسخه‌های قبلی پایتون به‌نفع :meth:`importlib.abc.Loader.exec_module` منسوخ نشده بودند." msgid "The :class:`importlib.machinery.WindowsRegistryFinder` class is now deprecated. As of 3.6.0, it is still added to :data:`sys.meta_path` by default (on Windows), but this may change in future releases." msgstr "کلاس :class:`importlib.machinery.WindowsRegistryFinder` اکنون منسوخ شده است. از نسخه‌ی 3.6.0، این کلاس همچنان به‌صورت پیش‌فرض به :data:`sys.meta_path` اضافه می‌شود (در ویندوز)، اما این امر ممکن است در نسخه‌های آینده تغییر کند." @@ -1775,8 +1776,8 @@ msgstr "هنگامی که :meth:`importlib.abc.Loader.exec_module` تعریف ش msgid ":c:func:`PyErr_SetImportError` now sets :exc:`TypeError` when its **msg** argument is not set. Previously only ``NULL`` was returned." msgstr ":c:func:`PyErr_SetImportError` اکنون هنگامی که آرگومان **msg** آن تنظیم نشده باشد، :exc:`TypeError` را تنظیم می‌کند. پیش‌تر تنها ``NULL`` برگردانده می‌شد." -msgid "The format of the :attr:`~codeobject.co_lnotab` attribute of code objects changed to support a negative line number delta. By default, Python does not emit bytecode with a negative line number delta. Functions using :attr:`frame.f_lineno`, ``PyFrame_GetLineNumber()`` or ``PyCode_Addr2Line()`` are not affected. Functions directly decoding :attr:`!co_lnotab` should be updated to use a signed 8-bit integer type for the line number delta, but this is only required to support applications using a negative line number delta. See ``Objects/lnotab_notes.txt`` for the :attr:`!co_lnotab` format and how to decode it, and see the :pep:`511` for the rationale." -msgstr "قالب ویژگی :attr:`~codeobject.co_lnotab` در اشیاء کد تغییر کرد تا از دلتای منفی شماره سطر پشتیبانی کند. به‌طور پیش‌فرض، پایتون بایت‌کدی با دلتای منفی شماره سطر تولید نمی‌کند. توابعی که از :attr:`frame.f_lineno`، ``PyFrame_GetLineNumber()`` یا ``PyCode_Addr2Line()`` استفاده می‌کنند، تحت تأثیر قرار نمی‌گیرند. توابعی که مستقیماً :attr:`!co_lnotab` را کدگشایی می‌کنند، باید به‌روزرسانی شوند تا برای دلتای شماره سطر از نوع عدد صحیح ۸ بیتی علامت‌دار استفاده کنند، اما این کار تنها برای پشتیبانی از برنامه‌هایی که از دلتای منفی شماره سطر استفاده می‌کنند، لازم است. برای اطلاع از قالب :attr:`!co_lnotab` و نحوه‌ی کدگشایی آن، ``Objects/lnotab_notes.txt`` را ببینید، و برای اطلاع از دلایل آن، :pep:`511` را ببینید." +msgid "The format of the :attr:`!codeobject.co_lnotab` attribute of code objects changed to support a negative line number delta. By default, Python does not emit bytecode with a negative line number delta. Functions using :attr:`frame.f_lineno`, ``PyFrame_GetLineNumber()`` or ``PyCode_Addr2Line()`` are not affected. Functions directly decoding :attr:`!co_lnotab` should be updated to use a signed 8-bit integer type for the line number delta, but this is only required to support applications using a negative line number delta. See ``Objects/lnotab_notes.txt`` for the :attr:`!co_lnotab` format and how to decode it, and see the :pep:`511` for the rationale." +msgstr "قالب ویژگی :attr:`!codeobject.co_lnotab` از شیءهای کد تغییر کرده است تا از اختلاف (دلتا) منفی شماره‌سطر پشتیبانی کند. به‌طور پیش‌فرض، پایتون بایت‌کدی با اختلاف شماره‌سطر منفی تولید نمی‌کند. توابعی که از :attr:`frame.f_lineno`، ``PyFrame_GetLineNumber()`` یا ``PyCode_Addr2Line()`` استفاده می‌کنند تحت تأثیر قرار نمی‌گیرند. توابعی که به‌طور مستقیم :attr:`!co_lnotab` را کدگشایی می‌کنند باید به‌روزرسانی شوند تا از یک نوع عدد صحیح علامت‌دار ۸بیتی برای اختلاف شماره‌سطر استفاده کنند، اما این کار فقط برای پشتیبانی از برنامه‌هایی که از اختلاف شماره‌سطر منفی استفاده می‌کنند، لازم است. برای اطلاع از قالب :attr:`!co_lnotab` و نحوه‌ی کدگشایی آن، پرونده‌ی ``Objects/lnotab_notes.txt`` را ببینید و برای کسب اطلاعات درباره‌ی منطق پشت آن، :pep:`511` را مطالعه کنید." msgid "The functions in the :mod:`compileall` module now return booleans instead of ``1`` or ``0`` to represent success or failure, respectively. Thanks to booleans being a subclass of integers, this should only be an issue if you were doing identity checks for ``1`` or ``0``. See :issue:`25768`." msgstr "توابع ماژول :mod:`compileall` اکنون به جای ``1`` یا ``0`` که به ترتیب موفقیت یا شکست را نشان می‌دادند، مقدار بولی برمی‌گردانند. از آنجا که بولی‌ها زیرکلاسی از اعداد صحیح هستند، این تنها در صورتی مشکل‌ساز خواهد بود که در حال انجام بررسی‌های هویت برای ``1`` یا ``0`` بوده باشید. به :issue:`25768` مراجعه کنید." diff --git a/whatsnew/3.7.po b/whatsnew/3.7.po index b76fa3ec..cb18f1d0 100644 --- a/whatsnew/3.7.po +++ b/whatsnew/3.7.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 07:29+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -653,8 +654,8 @@ msgstr ":deco:`~contextlib.asynccontextmanager`، :class:`~contextlib.AbstractAs msgid "cProfile" msgstr "cProfile" -msgid "The :mod:`cProfile` command line now accepts ``-m module_name`` as an alternative to script path. (Contributed by Sanyam Khurana in :issue:`21862`.)" -msgstr "خط فرمان :mod:`cProfile` اکنون ``-m module_name`` را به‌عنوان جایگزینی برای مسیر اسکریپت می‌پذیرد. (مشارکت‌شده توسط Sanyam Khurana در :issue:`21862`.)" +msgid "The :mod:`!cProfile` command line now accepts ``-m module_name`` as an alternative to script path. (Contributed by Sanyam Khurana in :issue:`21862`.)" +msgstr "خط فرمان :mod:`!cProfile` اکنون ``-m module_name`` را به‌عنوان جایگزینی برای مسیر اسکریپت می‌پذیرد. (مشارکت‌شده توسط Sanyam Khurana در :issue:`21862`.)" msgid "crypt" msgstr "crypt" diff --git a/whatsnew/3.8.po b/whatsnew/3.8.po index 915025f8..9a950468 100644 --- a/whatsnew/3.8.po +++ b/whatsnew/3.8.po @@ -7,12 +7,13 @@ # Alireza Shabani (Revisto) , 2025 # Rafael Fontenelle , 2025 # Sepehr Rasouli , 2026 +# arman mohebali , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-16 12:56+0000\n" +"POT-Creation-Date: 2026-10-01 14:41+0330\n" "PO-Revision-Date: 2026-09-13 15:58+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -1615,8 +1616,8 @@ msgstr "اشیاء نوعِ تخصیص‌یافته در هیپ اکنون شم msgid "The new function :c:func:`!PyCode_NewWithPosOnlyArgs` allows to create code objects like :c:func:`!PyCode_New`, but with an extra *posonlyargcount* parameter for indicating the number of positional-only arguments. (Contributed by Pablo Galindo in :issue:`37221`.)" msgstr "تابع جدید :c:func:`!PyCode_NewWithPosOnlyArgs` مانند :c:func:`!PyCode_New` امکان ایجاد شیءهای کد را فراهم می‌کند، اما با یک پارامتر اضافی *posonlyargcount* برای نشان دادن تعداد آرگومان‌های صرفاً جایگاهی. (مشارکت Pablo Galindo در :issue:`37221`.)" -msgid ":c:func:`!Py_SetPath` now sets :data:`sys.executable` to the program full path (:c:func:`Py_GetProgramFullPath`) rather than to the program name (:c:func:`Py_GetProgramName`). (Contributed by Victor Stinner in :issue:`38234`.)" -msgstr ":c:func:`!Py_SetPath` اکنون :data:`sys.executable` را به مسیر کامل برنامه (:c:func:`Py_GetProgramFullPath`) تنظیم می‌کند، نه به نام برنامه (:c:func:`Py_GetProgramName`). (مشارکت‌شده توسط ویکتور استینر در :issue:`38234`.)" +msgid ":c:func:`!Py_SetPath` now sets :data:`sys.executable` to the program full path (:c:func:`!Py_GetProgramFullPath`) rather than to the program name (:c:func:`!Py_GetProgramName`). (Contributed by Victor Stinner in :issue:`38234`.)" +msgstr ":c:func:`!Py_SetPath` اکنون ویژگی :data:`sys.executable` را روی مسیر کامل برنامه (:c:func:`!Py_GetProgramFullPath`) تنظیم می‌کند و نه روی نام برنامه (:c:func:`!Py_GetProgramName`). (مشارکت‌شده توسط Victor Stinner در :issue:`38234`.)" msgid "Deprecated" msgstr "منسوخ" diff --git a/whatsnew/changelog.po b/whatsnew/changelog.po index 83463b07..697130bd 100644 --- a/whatsnew/changelog.po +++ b/whatsnew/changelog.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-26 03:59+0000\n" +"POT-Creation-Date: 2026-10-08 09:24+0330\n" "PO-Revision-Date: 2026-08-28 10:52+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" @@ -26,3 +26,46310 @@ msgstr "" msgid "Changelog" msgstr "گزارش تغییرات" + +msgid "Python 3.15.0 release candidate 3" +msgstr "" + +msgid "*Release date: 2026-10-02*" +msgstr "" + +msgid "Security" +msgstr "" + +msgid ":gh:`158446`: Fix a crash or incorrect output that could occur when formatting a :class:`float` or :class:`complex` with a precision close to the platform's ``INT_MAX``. :c:func:`PyOS_double_to_string` now raises :exc:`ValueError` for any precision of that magnitude, regardless of presentation type or value, as the format string parsers already did for precisions above ``INT_MAX``." +msgstr "" + +msgid ":gh:`156793`: :mod:`asyncio`: :meth:`loop.start_tls() ` and :meth:`loop.create_connection() ` now validate the *server_hostname* argument if an :class:`ssl.SSLContext` is passed with *check_hostname* set to ``True``." +msgstr "" + +msgid ":gh:`156793`: :meth:`ssl.SSLContext.wrap_bio` now validates its *server_side*, *server_hostname* and *session* arguments similar to :meth:`ssl.SSLContext.wrap_socket`." +msgstr "" + +msgid "In particular, a context with :attr:`~ssl.SSLContext.check_hostname` enabled and no *server_hostname* passed to :meth:`!wrap_bio` now raises :exc:`ValueError` instead of completing a handshake that verified the certificate chain without verifying the peer's identity, with no indication that the check had been skipped." +msgstr "" + +msgid ":gh:`157265`: In :mod:`tarfile`, when extracting a link falls back to extracting a member of the archive, skip the member when the filter function returns None when called with the extracted member's name replaced with the link's." +msgstr "" + +msgid ":gh:`157953`: Update bundled `libexpat `_ to version 2.8.5." +msgstr "" + +msgid ":gh:`157579`: Fix a race condition in the cleanup of :class:`tempfile.TemporaryDirectory`. When working around file system permission errors, files are now removed relative to open directory file descriptors instead of resolving their path again, so that replacing a directory of the tree with a symbolic link can no longer make the cleanup delete files outside of the temporary directory. This addresses :cve:`2026-12345`." +msgstr "" + +msgid ":gh:`156293`: Fix a crash in :mod:`ssl` when an :attr:`~ssl.SSLContext.sni_callback` switches a connection to another :class:`~ssl.SSLContext` and the context that carries the callback is no longer referenced by the application. Servers that keep their ``sni_callback`` context alive (the usual case when it wraps the listening socket or is stored on the server object) were not affected. This addresses :cve:`2026-19445`." +msgstr "" + +msgid "Core and Builtins" +msgstr "" + +msgid ":gh:`158140`: Resolve lazily imported sibling submodules independently, so accessing one does not import another merely because its declaration came last." +msgstr "" + +msgid ":gh:`158364`: Fix crash when :func:`sys._current_frames` or :func:`sys._current_exceptions` is called while another interpreter is running." +msgstr "" + +msgid ":gh:`158254`: Reverse iterators over a :class:`dict` and its views now raise :exc:`RuntimeError` if the dictionary's keys change during iteration, like forward iterators, instead of yielding entries for the new keys." +msgstr "" + +msgid ":gh:`157914`: Revert :gh:`146064`. The linked PyMutex change was causing a significant performance regression in some cases." +msgstr "" + +msgid ":gh:`157838`: Merge biased reference counts on behalf of threads that are detached instead of waiting for them to attach again, in the free-threaded build." +msgstr "" + +msgid ":gh:`157778`: Include the line number of the opening brace in the :exc:`SyntaxError` for an unclosed f-string or t-string replacement field when a matching quote on a later line is interpreted as the start of an unterminated string." +msgstr "" + +msgid ":gh:`157757`: Fix a lazy ``import a.b as c`` reading ``b`` off ``a`` instead of importing the module ``a.b``. It now binds the submodule, and raises :exc:`ModuleNotFoundError` when no module backs the name." +msgstr "" + +msgid ":gh:`155695`: Resolved names are now removed from :data:`sys.lazy_modules` more consistently: a lazy import of an already loaded module is no longer recorded, and reifying ``lazy from pkg import attr`` now discards the ``pkg.attr`` entry." +msgstr "" + +msgid ":gh:`157378`: Fix ``SyntaxError.offset`` and ``SyntaxError.end_offset`` for the \"Non-UTF-8 code starting with ...\" error when a non-ASCII character precedes the invalid byte on the same line. Patch by Shamil Abdulaev." +msgstr "" + +msgid ":gh:`156762`: Fix undefined behaviour in :class:`operator.methodcaller`: its :c:member:`~PyTypeObject.tp_clear` slot function returned ``void`` instead of ``int``, so the garbage collector called it through an incompatible function type. Patched by Shamil Abdulaev." +msgstr "" + +msgid ":gh:`157377`: Fix :func:`gc.get_count` on the free-threaded build resetting the thread-local allocation counter that schedules automatic garbage collection. A thread that called it while allocating could prevent cyclic garbage from ever being collected." +msgstr "" + +msgid ":gh:`157247`: Fix :func:`sys.activate_stack_trampoline` allowing activation from a subinterpreter while the JIT is enabled in the main interpreter." +msgstr "" + +msgid ":gh:`156995`: Fix :class:`bytearray` sharing its buffer with the single-byte :class:`bytes` object of the same value, so that writing to the bytearray modified that :class:`bytes` object. This happened with :meth:`bytearray.take_bytes` when exactly one byte remained, and on the free-threaded build when a bytearray was shrunk to one byte from another thread." +msgstr "" + +msgid ":gh:`156910`: Fix a deadlock in the :term:`free threaded ` build when setting ``__abstractmethods__`` on a type while another thread holds the type lock." +msgstr "" + +msgid ":gh:`156894`: Fix the position of syntax errors which cover a range if the line contains non-ASCII characters before the error." +msgstr "" + +msgid ":gh:`155525`: Fix quadratic-time tokenization of modules containing many f-strings or t-strings." +msgstr "" + +msgid ":gh:`156689`: Fix an out-of-bounds read in :func:`compile` and :func:`ast.parse` when an AST object is passed with ``mode='func_type'``." +msgstr "" + +msgid ":gh:`156114`: Fix a crash in the perf trampoline when a code object has a name or filename that cannot be encoded to UTF-8. Patched by Shamil Abdulaev." +msgstr "" + +msgid ":gh:`156126`: Fix a crash when importing a module whose name contains characters that cannot be encoded to UTF-8 (such as lone surrogates) while :option:`-X importtime <-X>` is enabled." +msgstr "" + +msgid ":gh:`155526`: Fix spurious :exc:`OverflowError` for ``abs(nanj)`` in case :c:data:`errno` was previously set to :c:macro:`!ERANGE` by some library call. Patch by Sergey B Kirpichev." +msgstr "" + +msgid ":gh:`151464`: Exclude invalid token ``<>`` from :mod:`tokenize` output. :exc:`SyntaxError` for ``<>`` now suggests ``!=``." +msgstr "" + +msgid ":gh:`154719`: Trailing whitespace in a t-string interpolation expression is now preserved in :attr:`string.templatelib.Interpolation.expression`, up to the closing ``}`` or the conversion (``!``), format (``:``), or debug (``=``) delimiter. Explicit line continuations following a debug ``=`` remain part of the debug text and are excluded from :attr:`~string.templatelib.Interpolation.expression`." +msgstr "" + +msgid ":gh:`152708`: Fix AST generation asymmetry where unary positive ``+`` was implicitly dropped in pattern match expressions, restoring parsing parity with unary negative ``-``." +msgstr "" + +msgid "Library" +msgstr "" + +msgid ":gh:`157788`: Fix ``python -m asyncio ps`` failing on a process that has a task with a name longer than 255 characters." +msgstr "" + +msgid ":gh:`157660`: Fix :mod:`profiling.sampling` reporting errors or incorrect line numbers in free-threaded builds when a thread-local bytecode array grows or gains entries after being cached." +msgstr "" + +msgid ":gh:`157639`: Fix a crash in :mod:`!cProfile` when an external timer re-enters the profiler. Profiling events raised while the external timer runs are now ignored." +msgstr "" + +msgid ":gh:`157335`: Fix out-of-bounds write in ``mmap.mmap.__setitem__`` that could occur when converting the index or the assigned value (via :meth:`~object.__index__` for a single item, or via the buffer protocol for a slice) resized or closed the mmap object during the assignment." +msgstr "" + +msgid ":gh:`128509`: :func:`marshal.load` and :func:`marshal.loads` can now get 1-byte string singletons. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`157301`: Fix :class:`asyncio.Task` hanging the event loop when an eager start fails to enter the task's context." +msgstr "" + +msgid ":gh:`157213`: Fix :func:`asyncio.gather` leaving stale await-graph edges on children that outlive it." +msgstr "" + +msgid ":gh:`156002`: :mod:`zipfile` again reads members through a third-party decompressor installed by monkey-patching the private ``_get_decompressor()`` to return an object that only implements old BZ2Decompressor API from Python 3.3. Note that decompressors without ``needs_input`` and two-argument ``decompress()`` are vulnerable to :cve:`2026-15310`." +msgstr "" + +msgid ":gh:`157159`: The usage message printed by ``python -m tabnanny`` when no arguments are given now suggests ``python -m`` instead of the source file." +msgstr "" + +msgid ":gh:`157058`: :func:`asyncio.wait_for` with a non-positive timeout now records the waiter in the call graph." +msgstr "" + +msgid ":gh:`156933`: Fix incorrect integer return values from :mod:`ctypes` callbacks on some platforms, such as s390x." +msgstr "" + +msgid ":gh:`156988`: :func:`asyncio.print_call_graph` no longer truncates the call stack at a synchronous generator." +msgstr "" + +msgid ":gh:`156970`: Set the docstring of :attr:`unittest.mock.Mock.return_value`." +msgstr "" + +msgid ":gh:`156924`: :meth:`annotationlib.ForwardRef.evaluate` now resolves :ref:`lazy import ` proxies found in the namespace. With :attr:`~annotationlib.Format.FORWARDREF`, a lazy import that fails to resolve now results in a :class:`~annotationlib.ForwardRef` instead of the :class:`lazy import proxy `, and with :attr:`~annotationlib.Format.VALUE` the underlying exception is propagated." +msgstr "" + +msgid ":gh:`127057`: Fix :class:`asyncio.ProactorEventLoop` UDP transports so that a :exc:`ConnectionResetError` raised by ``WSARecvFrom`` no longer stops the read loop." +msgstr "" + +msgid ":gh:`156512`: Fix :mod:`asyncio` losing a connection twice when ``resume_writing()`` closes the transport." +msgstr "" + +msgid ":gh:`155596`: Fix :func:`pprint.pprint` and :func:`pprint.pformat` with ``expand=True`` not honouring *width* for nested values. The width of the ``'key':`` prefix was not counted when deciding whether a value fitted on the current line, so values under long keys could overflow *width* instead of being expanded." +msgstr "" + +msgid ":gh:`155433`: Fix :class:`asyncio.TaskGroup` losing outside cancellation after ``cancel()``." +msgstr "" + +msgid ":gh:`155418`: Fix :class:`asyncio.TaskGroup` hang when a task created by :func:`asyncio.eager_task_factory` cancels the group before suspending." +msgstr "" + +msgid ":gh:`155143`: Fix :func:`asyncio.shield` leaking the calling task via the await-graph and callbacks when called on a future that never resolves." +msgstr "" + +msgid ":gh:`154470`: Fixed a spurious ``^J`` printed at the end of every source line by the ``list`` command of :mod:`pdb` when the output is colorized (for example when attaching to a running process). The source line is now stripped before it is colorized, like the ``where`` command already did." +msgstr "" + +msgid ":gh:`154335`: The :mod:`profiling.sampling` profiler now respects ``NO_COLOR``, ``FORCE_COLOR``, and ``PYTHON_COLORS`` and avoids colored output when not writing to a terminal." +msgstr "" + +msgid ":gh:`154090`: Record the profiling mode in Tachyon binary profiles and reject differential comparisons whose known modes do not match." +msgstr "" + +msgid ":gh:`152907`: Restore cooked-mode terminal output flags around :c:data:`PyOS_InputHook` callbacks in the new :term:`REPL` (:mod:`!_pyrepl`), so that output written by an input hook (for example a GUI toolkit event loop) is no longer emitted with ``OPOST`` disabled and keeps its carriage returns." +msgstr "" + +msgid ":gh:`151179`: Fix a pidfd leak in ``_PidfdChildWatcher`` on Linux: the watcher no longer leaks the process file descriptor when ``waitpid()`` fails with an error other than :exc:`ChildProcessError`." +msgstr "" + +msgid "Documentation" +msgstr "" + +msgid ":gh:`57491`: Reduce the depth of the table of contents in the EPUB documentation from three levels to two, making it much shorter and easier to navigate in e-book readers." +msgstr "" + +msgid "Tests" +msgstr "" + +msgid ":gh:`158051`: The iOS testbed has been updated for compatibilty with Xcode 27." +msgstr "" + +msgid "Build" +msgstr "" + +msgid ":gh:`158010`: Update Android and iOS build scripts to use OpenSSL 3.5.9." +msgstr "" + +msgid ":gh:`157549`: Use ``sysconf(_SC_PAGESIZE)`` instead of ``getpagesize()`` in ``remote_debug.h`` so ``_remote_debugging`` builds on Darwin with ``-Werror=implicit-function-declaration``." +msgstr "" + +msgid ":gh:`152023`: Update Android builds to SQLite 3.53.4. Additionally, enable the ``median()`` and ``percentile()`` functions." +msgstr "" + +msgid "Windows" +msgstr "" + +msgid ":gh:`158010`: Updated Windows builds to use OpenSSL 3.5.9." +msgstr "" + +msgid ":gh:`157368`: Fix truncated :data:`sys.version` in the case of clang-cl versions 22 or newer on Windows. Also fixes the Windows on Arm case, where the Microsoft compiler was reported instead of clang. Patch by Chris Eibl." +msgstr "" + +msgid ":gh:`157212`: Fix ``_Py_ThreadId()`` compilation on Windows ARM64 with MinGW toolchains, where ``__getReg()`` is unavailable. The TEB address is now read directly from ``x18``. Patch by Christian Aurich." +msgstr "" + +msgid ":gh:`152023`: Update Windows builds to SQLite 3.53.4. Additionally, enable the ``median()`` and ``percentile()`` functions." +msgstr "" + +msgid "macOS" +msgstr "" + +msgid ":gh:`158010`: Update macOS installer to use OpenSSL 3.5.9." +msgstr "" + +msgid ":gh:`152023`: Update macOS installer builds to SQLite 3.53.4." +msgstr "" + +msgid "IDLE" +msgstr "" + +msgid ":gh:`158067`: Fix the IDLE File Open dialog listing text files before Python files when opened from the Shell or an Output window." +msgstr "" + +msgid ":gh:`75512`: Output from a thread printed in the IDLE Shell while a statement is being entered no longer takes over the prompt of the statement." +msgstr "" + +msgid ":gh:`89544`: Fix IDLE hanging after Restart Shell while receiving a large output from the user process." +msgstr "" + +msgid ":gh:`59568`: Fix \"Save As\" and \"Open\" dialogs in IDLE for a file whose name starts with ``~`` on Windows and X11 with Tcl/Tk older than 9." +msgstr "" + +msgid ":gh:`69004`: The Debugger item of the IDLE Debug menu is now disabled while user code runs, like Stack Viewer." +msgstr "" + +msgid ":gh:`93966`: The highlighting of a syntax error in the IDLE Shell is now removed when the next statement is entered, not only when the next syntax error occurs." +msgstr "" + +msgid ":gh:`75234`: Fix editing help sources and key bindings in the IDLE Settings dialog after selecting them with the keyboard." +msgstr "" + +msgid ":gh:`55646`: Fix IDLE crash at startup when the user configuration contains an invalid key binding, such as ```` instead of ````. The invalid binding is now ignored with a warning." +msgstr "" + +msgid "C API" +msgstr "" + +msgid ":gh:`156939`: Fix :c:func:`PyBytesWriter_FinishWithSize` to return an empty bytearray when :c:func:`!_PyBytesWriter_CreateByteArray` is used, instead of returning an empty bytes string. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`156939`: Fix :c:func:`PyBytesWriter_Format` error handling: restore the writer to its previous state on error. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`140550`: Fix the :c:macro:`PyABIInfo_VAR` macro: remove redundant ``;``. Before, ``PyABIInfo_VAR(abi_info);`` code added two ``;;`` which is illegal in C++03. Patch by Victor Stinner." +msgstr "" + +msgid "Python 3.15.0 release candidate 2" +msgstr "" + +msgid "*Release date: 2026-09-01*" +msgstr "" + +msgid ":gh:`156723`: Update bundled `libexpat `_ to version 2.8.4." +msgstr "" + +msgid ":gh:`156002`: Bound the amount of data :mod:`zipfile` decompresses per read for members compressed with bzip2, LZMA, or Zstandard, matching the existing limit for deflate. A small archive member could previously expand into an unbounded allocation even when read in small chunks." +msgstr "" + +msgid ":gh:`155999`: Fix the :mod:`tarfile` ``tar`` and ``data`` extraction filters creating directories outside the destination for members whose name leaves the destination and returns to it, such as ``../evil/../dest/sub/file``. The containment check used the resolved path, but intermediate directories were created from the name as given." +msgstr "" + +msgid ":gh:`155292`: Change the :mod:`stringprep` module and :mod:`encodings.idna` codec to not consider Unicode codepoint attributes beyond those defined in :rfc:`3454`." +msgstr "" + +msgid ":gh:`155694`: Fix :cve:`2026-15806` by scoping :class:`~urllib.request.HTTPPasswordMgr` credentials to the URL scheme, preventing credentials stored for an HTTPS URL from being used for a matching HTTP URL, while URIs without a scheme continue to match any scheme." +msgstr "" + +msgid ":gh:`155725`: :mod:`tracemalloc` no longer acquires the :term:`GIL` nor creates a temporary thread state to trace memory allocations: traceback frames now store plain UTF-8 strings instead of Python str objects, and tracebacks are captured using the Python thread state already associated with the calling thread, even if it is not attached. Threads without a Python thread state record the traceback as ````." +msgstr "" + +msgid ":gh:`148750`: :mod:`encodings` is no longer frozen, due to issues importing submodules when using a zipped standard library." +msgstr "" + +msgid ":gh:`155254`: Avoid warning about missing standard library when using :ref:`sys-path-init-_pth-files`." +msgstr "" + +msgid ":gh:`155978`: Fix a memory leak in the free-threaded build when setting or deleting a special method (such as ``__repr__``) on a class that has many subclasses." +msgstr "" + +msgid ":gh:`155752`: Fix a crash when a :class:`types.GenericAlias` argument gains a ``__typing_subst__`` hook after the alias parameters have been cached." +msgstr "" + +msgid ":gh:`129752`: Don't update adaptive counters in the free-threaded build when thread-local bytecode is disabled (``-X tlbc=0``). Patch by Donghee Na." +msgstr "" + +msgid ":gh:`155515`: Track the internal HAMT iterators, which back iteration over a :class:`contextvars.Context`, with the garbage collector. A reference cycle running through such an iterator was never collected, leaking the whole context it iterated over." +msgstr "" + +msgid ":gh:`155400`: Fix a deadlock in the free-threaded build between two threads assigning to a special method of the same class. While applying the type slot updates with the world stopped, only the type lock was prevented from being released; the type dict mutex could still be released and re-acquired, in the wrong order, if the thread blocked on the stop-the-world mutex." +msgstr "" + +msgid ":gh:`155363`: Fix a leak in the :term:`free-threaded build` when creating a thread state fails after an internal QSBR slot has been reserved for it. The slot could never be reclaimed, so the QSBR array grew without bound across repeated failures." +msgstr "" + +msgid ":gh:`154701`: Fix an infinite loop in JIT when a ``FOR_ITER`` side exit links an executor back to itself." +msgstr "" + +msgid ":gh:`154196`: Improve :exc:`AttributeError` messages from unresolved lazy imports. Patch by Bartosz Sławecki." +msgstr "" + +msgid ":gh:`151377`: Fix races in free-threaded builds when updating type slots for newly created classes and when removing entries from a base type's subclasses dictionary." +msgstr "" + +msgid ":gh:`148817`: Fold large constant list and set literals used as the iterable of a :keyword:`for` loop or ``in``/``not in`` test into a constant :class:`tuple` or :class:`frozenset`, restoring an optimization previously done by the AST optimizer that was lost when constant folding moved to the CFG." +msgstr "" + +msgid ":gh:`85260`: :func:`compile` now raises :exc:`ValueError` instead of crashing on a debug build if an identifier field of an AST node (such as the name of a function, a class, an imported module or a caught exception) is ``\"None\"``, ``\"True\"`` or ``\"False\"``." +msgstr "" + +msgid ":gh:`156523`: Fix :func:`asyncio.as_completed` not recording the awaiting task in the call graph." +msgstr "" + +msgid ":gh:`156408`: Fix :func:`asyncio.print_call_graph` raising :exc:`AttributeError` when called on a task that has already finished." +msgstr "" + +msgid ":gh:`156404`: Restore compatibility with :file:`.pth` files generated before Python 3.15 in the :mod:`site` module. Inject the ``fullname`` variable in the frame which executes pth code." +msgstr "" + +msgid ":gh:`156353`: Fix :mod:`configparser` parsing when using whitespace in *delimiters*." +msgstr "" + +msgid ":gh:`156112`: :mod:`!_ios_support` no longer fails to import when :func:`ctypes.util.find_library` cannot resolve the ObjC runtime through the dyld shared cache, as is the case on iOS 13. The runtime is now loaded by name, which dyld resolves against the cache directly." +msgstr "" + +msgid ":gh:`155974`: Fix a regression in Python 3.15: :meth:`~curses.window.addstr`, :meth:`~curses.window.addnstr`, :meth:`~curses.window.insstr` and :meth:`~curses.window.insnstr` again restore the window attributes when the write fails, instead of leaving the temporary *attr* applied." +msgstr "" + +msgid ":gh:`155952`: Fix the signatures of :meth:`sqlite3.Connection.execute`, :func:`warnings.warn` and :func:`locale.setlocale` which rendered ```` instead of the correct defaults for parameters." +msgstr "" + +msgid ":gh:`155888`: Fix :meth:`asyncio.WriteTransport.writelines` hanging the transport when the last data chunk is empty." +msgstr "" + +msgid ":gh:`155869`: Fix :meth:`!reorganize` in :mod:`dbm.dumb` failing to persist updated value offsets, which could cause data loss after reopening the database." +msgstr "" + +msgid ":gh:`155781`: Fix a possible crash in free-threaded builds when the :mod:`sqlite3` converter registry is modified concurrently while a cursor builds its row cast map." +msgstr "" + +msgid ":gh:`155702`: Fix :class:`sqlite3.Blob` slice assignment with a step. It patched the bytes object read from the blob, which for a single byte is an immortal singleton, so that the value of that byte was changed in the whole process." +msgstr "" + +msgid ":gh:`155468`: Fix :mod:`netrc` to distinguish empty quoted tokens from end-of-file, so malformed files no longer cause the remaining content to be silently ignored." +msgstr "" + +msgid ":gh:`155519`: Avoid a data-race in free-threaded builds when reading and writing context variables from different threads." +msgstr "" + +msgid ":gh:`155009`: Fix :class:`argparse.ArgumentParser` to preserve the program name from ``sys.argv[0]`` when a named module is executed as the main program without replacing ``sys.argv[0]``." +msgstr "" + +msgid ":gh:`155063`: Bump the version of pip bundled in ensurepip to version 26.2.1" +msgstr "" + +msgid ":gh:`153711`: On macOS, add run-time checks around the syscalls :manpage:`pipe2 (2)` and :manpage:`dup3 (2)`, in addition to the existing build-time checks. This means that Python built on macOS 27 (where these calls are available) can run on macOS 26 (where they aren't)." +msgstr "" + +msgid ":gh:`154871`: Fixed a crash in :meth:`asyncio.Task.get_context` when called on an uninitialized task." +msgstr "" + +msgid ":gh:`154568`: Fix :mod:`array` unpickling of little-endian float16." +msgstr "" + +msgid ":gh:`154566`: Fix :meth:`array.array.byteswap` corrupting data for ``'Zd'`` (complex double) arrays with more than one element: the 16-byte item loop advanced the buffer pointer by only 8 bytes per iteration, causing items after the first to be scrambled." +msgstr "" + +msgid ":gh:`154467`: Fixed :mod:`pdb` remote attaching (``python -m pdb -p PID``) sending an empty prompt to the client instead of ``(Pdb)`` when the target process has an interactive terminal." +msgstr "" + +msgid ":gh:`153772`: :func:`isinstance` checks against :mod:`collections.abc` classes such as :class:`~collections.abc.Mapping` no longer raise :exc:`AttributeError` when the instance has no ``__class__``. The abstract base class machinery now falls back to the object's type in that case, matching the behaviour of the built-in :func:`isinstance`." +msgstr "" + +msgid ":gh:`154086`: Store per-thread sample counts in Tachyon flamegraphs so filtering a thread updates frame widths and totals." +msgstr "" + +msgid ":gh:`154060`: Store measured duration and sampling rate in Tachyon binary profiles so they remain available in replayed flamegraphs." +msgstr "" + +msgid ":gh:`154085`: Prevent differential flamegraphs from duplicating self time across line nodes for the same function." +msgstr "" + +msgid ":gh:`154088`: Make Tachyon count and render elided stacks consistently in differential flamegraphs." +msgstr "" + +msgid ":gh:`154089`: Do not show unavailable sampling efficiency statistics in replayed Tachyon flamegraphs." +msgstr "" + +msgid ":gh:`153158`: Remove the erroneous *width* argument of :meth:`!calendar.HTMLCalendar.formatmonthpage`, which could drop the year from the heading." +msgstr "" + +msgid ":gh:`113329`: Fix :exc:`OSError` being raised when trying to run doctests on a class objects in the REPL. Patch by Sten Wessel." +msgstr "" + +msgid ":gh:`156369`: Update Android and iOS build scripts to use OpenSSL 3.5.8." +msgstr "" + +msgid ":gh:`156115`: iOS simulator builds are now configured with ``-mios-simulator-version-min`` instead of the device's ``-mios-version-min``. The device flag made the linker reject libraries resolved from the simulator SDK, so library detection silently failed." +msgstr "" + +msgid ":gh:`156369`: Updated Windows builds to use OpenSSL 3.5.8." +msgstr "" + +msgid ":gh:`156369`: Update macOS installer to use OpenSSL 3.5.8." +msgstr "" + +msgid "Tools/Demos" +msgstr "" + +msgid ":gh:`154059`: Fix the time units in Tachyon flame graph tooltips by accounting for the sampling interval when converting samples to milliseconds." +msgstr "" + +msgid ":gh:`131740`: On the free-threaded build, :c:func:`PyUnstable_GC_VisitObjects` now also visits frozen objects (objects moved to the permanent generation by :func:`gc.freeze`), matching the behavior of the default build." +msgstr "" + +msgid "Python 3.15.0 release candidate 1" +msgstr "" + +msgid "*Release date: 2026-08-04*" +msgstr "" + +msgid ":gh:`152674`: The :class:`xml.etree.ElementTree.Element` methods :meth:`~xml.etree.ElementTree.Element.findall`, :meth:`~xml.etree.ElementTree.Element.iterfind` and :meth:`~xml.etree.ElementTree.Element.find` avoid quadratic behavior when using XPath index predicates (``[1]``, ``[last()]``, ``[last()-N]``) on XML documents with many same-tag siblings." +msgstr "" + +msgid ":gh:`154902`: Fix a crash when ``__conditional_annotations__`` is rebound to a non-set object." +msgstr "" + +msgid ":gh:`133931`: Fix data races when setting attributes of function objects on the :term:`free threaded ` build." +msgstr "" + +msgid ":gh:`154775`: When matching a complex literal in :keyword:`case` statements, an extraneous ``+`` sign (for example, ``1++1j`` or ``1-+1j``) is no longer allowed." +msgstr "" + +msgid ":gh:`154709`: Fix an out-of-bounds access in reverse dictionary iterators when the underlying dictionary is cleared and modified after the iterator is created." +msgstr "" + +msgid ":gh:`154695`: Fix :class:`asyncio.Task` raising :exc:`AttributeError` when created with ``eager_start=True`` and no explicit *loop* argument." +msgstr "" + +msgid ":gh:`153809`: Fix interpreter crash while deallocating objects of :class:`asyncio.Task` on free-threaded builds. Contributed by Sergey Miryanov." +msgstr "" + +msgid ":gh:`154275`: Fix a crash when getting deeply nested ``__parameters__`` from a :class:`types.GenericAlias` objects." +msgstr "" + +msgid ":gh:`154014`: Fix a JIT assertion during interpreter shutdown by initializing ``vm_data`` fields for cold executors that bypass ``_Py_ExecutorInit()``." +msgstr "" + +msgid ":gh:`153932`: Fix thread safety issue in the ``__reduce__`` method of :py:class:`enumerate`." +msgstr "" + +msgid ":gh:`153881`: Fix potential data race when calling :meth:`~object.__getstate__` under the :term:`free-threaded build`." +msgstr "" + +msgid ":gh:`153570`: Fix a use-after-free in :meth:`bytearray.take_bytes` when the argument's :meth:`~object.__index__` method resizes the bytearray. Patch by tonghuaroot." +msgstr "" + +msgid ":gh:`153419`: Fix multiple :class:`bytearray` crashes and reference leaks caused by skipping :meth:`~object.__init__` and broken state setup code." +msgstr "" + +msgid ":gh:`153236`: Propagate exceptions raised while importing lazy submodules instead of reporting them as missing attributes." +msgstr "" + +msgid ":gh:`148874`: Ignore interrupts immediately after calling the ``__enter__`` method of a context menager in a ``with`` statement. This ensures that the ``__exit__`` method is always called in a ``with`` statement." +msgstr "" + +msgid ":gh:`150208`: Avoid double-quoting string values from ``pyconfig.h`` in ``sysconfigdata`` variables." +msgstr "" + +msgid ":gh:`155063`: Bump the version of pip bundled in ensurepip to version 26.2" +msgstr "" + +msgid ":gh:`154936`: Fix the pure Python :mod:`json` decoder to report the correct position for invalid literal control characters in JSON strings." +msgstr "" + +msgid ":gh:`154892`: Fix a bug in the C accelerator for :mod:`zoneinfo` where :class:`datetime.datetime` subclasses returning ``-1`` for ``hour``, ``minute``, or ``second`` could incorrectly raise a :exc:`SystemError`." +msgstr "" + +msgid ":gh:`154848`: The :mod:`pickle` C accelerator now enforces frame boundaries when unpickling, as the pure Python implementation already did. An argument that straddles a frame boundary, or a frame that begins before the previous one has ended, now raises :exc:`pickle.UnpicklingError` instead of being silently read across the boundary. This prevents the loaded data from diverging from the :mod:`pickletools` disassembly of the same pickle." +msgstr "" + +msgid ":gh:`154885`: :func:`os.get_terminal_size` now checks ``isatty`` before calling ``ioctl``, which reduces log noise on Android." +msgstr "" + +msgid ":gh:`109638`: Fix exponential time in :meth:`csv.Sniffer.sniff` for a sample which contains many quote characters. A doubled quote character is now also detected in a field which contains the delimiter or a line break." +msgstr "" + +msgid ":gh:`98820`: Fix quadratic time in :meth:`csv.Sniffer.sniff` for a sample which contains quoted fields, in particular for a single column of quoted fields." +msgstr "" + +msgid ":gh:`154738`: Fix :meth:`!ExternalEntityParserCreate` not propagating the reparse-deferral setting to the subparser, which left :meth:`!GetReparseDeferralEnabled` returning an uninitialized value. Patch by tonghuaroot." +msgstr "" + +msgid ":gh:`93251`: Fix :exc:`UnicodeDecodeError` in :mod:`socket` functions (such as :func:`~socket.getaddrinfo` and :func:`~socket.gethostbyaddr`) when the localized error message of the C library is not UTF-8: decode it from the locale encoding." +msgstr "" + +msgid ":gh:`148468`: Fix a regression in :mod:`argparse` where colorized argument help containing format specifiers did not accept string-like proxy objects." +msgstr "" + +msgid ":gh:`142035`: Fix incorrect wrapping of :mod:`argparse` help text when color is enabled." +msgstr "" + +msgid ":gh:`135736`: Fix ::class:`asyncio.TaskGroup` to not wrap a :exc:`GeneratorExit` into a :exc:`BaseExceptionGroup` if it was raised by the body of the task group and none of the tasks in the group raised exceptions." +msgstr "" + +msgid ":gh:`154551`: Fix :func:`ctypes.util.find_library` returning ``None`` in non-UTF-8 locales." +msgstr "" + +msgid ":gh:`79366`: Fixed a race condition in :mod:`logging`: if a handler was removed while a record was being emitted, the following handlers of the same logger could be skipped." +msgstr "" + +msgid ":gh:`154189`: Fixed a potential use-after-free when calling :func:`functools.partial`. Now, when invoking a :func:`~functools.partial` object, the stored function, positional arguments, and keyword arguments are preserved for the duration of the call in case of reentrancy." +msgstr "" + +msgid ":gh:`73458`: Fix :func:`logging.config.listen`: it left the caller waiting for the ``ready`` event forever if the server could not be started, for example if the port was invalid or already in use. It now also binds to an IPv6 address if the host has no IPv4 address, for example if ``localhost`` is only aliased to ``::1``." +msgstr "" + +msgid ":gh:`154460`: Fix :func:`time.strftime` and :meth:`datetime.datetime.strftime` returning a wrong ISO 8601 week number (``%V``) on OpenBSD." +msgstr "" + +msgid ":gh:`154435`: Fix :func:`os.posix_fadvise` and :func:`os.posix_fallocate` on DragonFly BSD: they raised :exc:`OSError` with a meaningless error code, because these functions return -1 and set ``errno`` there." +msgstr "" + +msgid ":gh:`154399`: Fix :mod:`venv` activation in a non-interactive csh: ``activate.csh`` no longer fails when the ``prompt`` variable is not set." +msgstr "" + +msgid ":gh:`154389`: Fix :func:`uuid.uuid1` on OpenBSD: it returned a version 4 UUID, because ``uuid_create()`` generates random UUIDs on this platform." +msgstr "" + +msgid ":gh:`154324`: Fix :func:`os.sendfile` on illumos: it no longer reports a successful transfer when the underlying system call failed without writing any data." +msgstr "" + +msgid ":gh:`154307`: Fix :meth:`tempfile.TemporaryDirectory.cleanup` on DragonFly BSD, where removing a file with the ``UF_NOUNLINK`` flag failed with ``EISDIR`` instead of ``EPERM``." +msgstr "" + +msgid ":gh:`154291`: Fix :func:`socket.has_dualstack_ipv6` to return ``False`` on platforms such as DragonFly BSD where setting ``IPV6_V6ONLY`` to 0 silently has no effect." +msgstr "" + +msgid ":gh:`154283`: On DragonFly BSD, :func:`threading.get_native_id` now returns a value that is unique across processes, matching the other platforms." +msgstr "" + +msgid ":gh:`154258`: Fix a crash in :meth:`mmap.mmap.resize` on NetBSD when growing a shared anonymous mapping. :meth:`!resize` now raises :exc:`ValueError` in this case, as it already did on Linux." +msgstr "" + +msgid ":gh:`131565`: :func:`ctypes.util.dllist` now works on NetBSD. It is implemented in the :mod:`!_ctypes` extension module so that ``dl_iterate_phdr()`` reports all loaded shared libraries: on NetBSD it only reports the link-map group of the calling object, which excluded them when called through ctypes." +msgstr "" + +msgid ":gh:`154225`: Fix :func:`os.openpty` on Solaris and illumos: it no longer leaves the pseudo-terminal as the controlling terminal of the calling process." +msgstr "" + +msgid ":gh:`154227`: Fix :func:`os.posix_openpt` on OpenBSD, where it rejected the :data:`~os.O_CLOEXEC` flag." +msgstr "" + +msgid ":gh:`145030`: Fix :mod:`asyncio` write pipe transports for named FIFOs on macOS and Solaris. Unread data sitting in the FIFO made the transport misinterpret a poll event as the reader disconnecting, wrongly closing the transport." +msgstr "" + +msgid ":gh:`154176`: Fix a crash in :func:`locale.strxfrm` on DragonFly BSD, whose ``wcsxfrm()`` does not support the zero size." +msgstr "" + +msgid ":gh:`154836`: Fix :meth:`subprocess.Popen.wait` raising :exc:`TypeError` (macOS and other BSDs) or :exc:`OverflowError` (Linux) for very large *timeout* values such as ``float('inf')``, a 3.15 regression in the new event-driven wait. Also fix :meth:`select.kqueue.control` masking :exc:`OverflowError` for out-of-range timeouts as :exc:`TypeError`." +msgstr "" + +msgid ":gh:`154053`: Fix compilation of the :mod:`ssl` module against LibreSSL, which does not provide ``SSL_CTX_set1_sigalgs_list()`` and ``SSL_CTX_set1_client_sigalgs_list()``. The :meth:`!set_server_sigalgs` and :meth:`!set_client_sigalgs` methods of :class:`ssl.SSLContext` now raise :exc:`NotImplementedError` on LibreSSL." +msgstr "" + +msgid ":gh:`154001`: Fix :func:`random.binomialvariate` raising :exc:`ZeroDivisionError` when :func:`random.random` returns zero." +msgstr "" + +msgid ":gh:`153908`: Fix data race when calling :func:`repr` on :class:`itertools.count` under the :term:`free-threaded build`." +msgstr "" + +msgid ":gh:`153896`: Deduplicate unhashable args in :data:`typing.Literal`." +msgstr "" + +msgid ":gh:`153864`: On a wide :mod:`curses` build, :meth:`curses.window.insch` now inserts a non-ASCII byte as the character it encodes in the window's encoding, consistently with :meth:`~curses.window.addch`, instead of its code point." +msgstr "" + +msgid ":gh:`153862`: On a wide :mod:`curses` build, :meth:`curses.window.inch` now returns the locale-encoded byte of a non-ASCII character, matching :meth:`~curses.window.instr`, instead of the low byte of its code point." +msgstr "" + +msgid ":gh:`146011`: Fix a heap-use-after-free in the C implementation of :mod:`decimal` when calling :func:`repr` after deleting the :class:`~decimal.Context`." +msgstr "" + +msgid ":gh:`153761`: Fix cancelling :meth:`asyncio.loop.sock_accept` dropping a pending connection." +msgstr "" + +msgid ":gh:`127049`: Fix a race condition in :mod:`asyncio` on Unix where :meth:`asyncio.subprocess.Process.send_signal`, :meth:`~asyncio.subprocess.Process.terminate` or :meth:`~asyncio.subprocess.Process.kill` could signal an unrelated process that was recycled onto the PID of the already-reaped child when ThreadedChildWatcher is used. Patch by Kumar Aditya." +msgstr "" + +msgid ":gh:`153404`: :class:`urllib.robotparser.RobotFileParser` now silently ignores a ``Crawl-delay`` or ``Request-rate`` value written with non-decimal digits (such as ``U+00B2 SUPERSCRIPT TWO``) instead of raising :exc:`ValueError` and aborting the parse of the whole ``robots.txt`` file." +msgstr "" + +msgid ":gh:`153291`: Fix a data race in :func:`readline.get_completer` and :func:`readline.get_pre_input_hook` on the :term:`free-threaded ` build: the getters read the stored hook without the critical section that the corresponding setters hold." +msgstr "" + +msgid ":gh:`153133`: Fix a socket leak in :meth:`asyncio.loop.create_connection` when the transport cannot be created." +msgstr "" + +msgid ":gh:`152431`: Fix ``asyncio.StreamWriter.start_tls()`` to keep the linked ``StreamReader`` transport in sync with the upgraded transport." +msgstr "" + +msgid ":gh:`151955`: Allow more types to be used in the ``bound`` argument to :class:`typing.ParamSpec` and :class:`typing.TypeVarTuple`." +msgstr "" + +msgid ":gh:`119710`: Fix :mod:`asyncio` subprocess :meth:`~asyncio.subprocess.Process.wait` hanging when the process has exited but one of its pipes is kept open by an inherited child process (so the pipe never reaches EOF). ``wait()`` now returns as soon as the process exits, regardless of the pipes' state." +msgstr "" + +msgid ":gh:`151022`: Fix ``_remote_debugging`` stack traces for code objects with large line tables." +msgstr "" + +msgid ":gh:`149319`: The :mod:`asyncio` REPL now ignores :envvar:`PYTHONSTARTUP` and :envvar:`PYTHON_BASIC_REPL` when :option:`-E` or :option:`-I` is used. Patch by Jonathan Dung." +msgstr "" + +msgid ":gh:`148665`: socket.shutdown function is now enabled for Emscripten builds. However, if the runtime does not implement the shutdown syscall, it will show \"Function not implemented\" error." +msgstr "" + +msgid ":gh:`140326`: Fix the :mod:`asyncio` REPL namespace so that relative imports no longer resolve against the :mod:`asyncio` package and ``__file__`` is no longer set." +msgstr "" + +msgid ":gh:`103925`: Fix :meth:`csv.Sniffer.sniff` for a sample with ``\\r\\n`` line endings in which a quoted field ends a line: a letter could be detected as the delimiter." +msgstr "" + +msgid ":gh:`118150`: Clarify in the :mod:`difflib` documentation what *junk* actually does, its drawbacks, and how to control it." +msgstr "" + +msgid ":gh:`76595`: Add C API tests for :c:func:`PyCapsule_Import`." +msgstr "" + +msgid ":gh:`154211`: Add ``test.support.skip_if_huge_c_stack()`` and use it to skip tests that exhaust the C stack if the stack limit is very large (e.g. on DragonFly BSD or with ``ulimit -s unlimited``)." +msgstr "" + +msgid ":gh:`154167`: The test runner (regrtest) now restores the default SIGINT handler if it was inherited as ignored, so the test suite no longer hangs when run as a shell background job." +msgstr "" + +msgid ":gh:`154144`: Fix building the :mod:`!_testcapi` module on NetBSD." +msgstr "" + +msgid ":gh:`152548`: Add the :func:`test.support.isolation.runInSubprocess` decorator to run a test method or ``TestCase`` subclass in a fresh interpreter subprocess, isolated from the rest of the test run." +msgstr "" + +msgid ":gh:`154070`: Build the :mod:`curses` module against a wide-character capable ncurses even when it is not named ``ncursesw`` -- for example the pkgsrc ncurses on NetBSD and illumos, or the system ncurses on macOS. Such a library previously produced a narrow build." +msgstr "" + +msgid ":gh:`138800`: Fix library name in python3.pc on Android." +msgstr "" + +msgid ":gh:`124111`: Updated Windows builds to use Tcl/Tk 9.0.4." +msgstr "" + +msgid ":gh:`154580`: Fix ``python-gdb.py`` raising :exc:`UnicodeEncodeError` when pretty-printing a non-ASCII :class:`str` in a locale whose host charset cannot encode it, such as any non-ASCII string in the C locale." +msgstr "" + +msgid ":gh:`152384`: The CPython Pixi packages are now all accessible at the same ``Tools/pixi-packages`` subdirectory, rather than at ``Tools/pixi-packages/{variant}`` as before. Variants are now selected not via subdirectory but via ``flags``; see https://pixi.prefix.dev/latest/concepts/package_specifications/#extras-and-flags for usage instructions. The ``tsan-freethreading`` variant has been renamed to ``tsan_freethreading``, while the ``default``, ``asan``, and ``freethreading`` variants retain their previous names." +msgstr "" + +msgid ":gh:`122931`: Allow importing stable ABI C extensions that include a multiarch tuple in their filename, e.g. ``foo.abi3-x86-64-linux-gnu.so``." +msgstr "" + +msgid "Python 3.15.0 beta 4" +msgstr "" + +msgid "*Release date: 2026-07-18*" +msgstr "" + +msgid ":gh:`153030`: Fixed quadratic complexity in incremental parsing of long unterminated constructs (such as tags or comments) in :class:`html.parser.HTMLParser`, which could be exploited for a denial of service." +msgstr "" + +msgid ":gh:`152216`: Update bundled `libexpat `_ to version 2.8.2." +msgstr "" + +msgid ":gh:`151987`: The :meth:`tarfile.TarFile.extract` method now applies the given filter when it extracts a link target from the archive as a fallback." +msgstr "" + +msgid ":gh:`151981`: In :mod:`tarfile`, seeking a stream now stops when end of the stream is reached." +msgstr "" + +msgid ":gh:`151558`: Fixed an vulnerability in the :mod:`tarfile` ``data`` and ``tar`` extraction filters where crafted archives could create a symlink pointing outside the destination directory. This was a bypass of :cve:`2025-4330`." +msgstr "" + +msgid ":gh:`150743`: :mod:`http.client` now limits the number of chunked-response trailer lines it will read to :attr:`~http.client.HTTPConnection.max_response_headers` (100 by default), and the number of interim (1xx) responses it will skip to 100. A malicious or broken server could previously stream trailer lines or ``100 Continue`` responses forever, hanging the client even when a socket timeout was in use. Reported by ``@YLChen-007`` via GHSA-w4q2-g22w-6fr4." +msgstr "" + +msgid ":gh:`143927`: Normalize all line endings (CR, CRLF, and LF) to LF+TAB when writing multi-line configparser values." +msgstr "" + +msgid ":gh:`153298`: Fixes a data race in :class:`types.GenericAlias` ``__parameters__`` initialization on free-threading builds." +msgstr "" + +msgid ":gh:`153205`: Fix a potential :exc:`SystemError` during vector calls when memory allocation fails. A :exc:`MemoryError` is now raised instead." +msgstr "" + +msgid ":gh:`152682`: Fix NULL pointer dereference in :func:`compile` when a reserved name (e.g. ``__classdict__``) is used as a type parameter name and memory allocation fails while formatting the error message." +msgstr "" + +msgid ":gh:`152635`: Fix a crash caused when running out of memory creating a :mod:`!_interpchannels` channel. Now a :exc:`MemoryError` is correctly raised." +msgstr "" + +msgid ":gh:`152405`: Do not expose the internal mapping of :class:`types.MappingProxyType` when performing rich-compare operations with non-stdlib types. Previously, it was possible to mutate the internal mapping of a proxy there. Now we pass not the original :class:`dict` instance, but its copy, when dealing with custom types." +msgstr "" + +msgid ":gh:`152492`: :type:`collections.OrderedDict` ``update`` method can now accept :type:`frozendict` as an argument." +msgstr "" + +msgid ":gh:`152375`: Fix undefined behaviour when a :mod:`sys.monitoring` callback raised an exception while the program was following a branch or loop." +msgstr "" + +msgid ":gh:`152235`: Defer GC tracking of :meth:`set.intersection`, :meth:`set.difference`, :meth:`set.symmetric_difference`, :meth:`set.union` and ``set.__sub__``. Patch by Donghee Na." +msgstr "" + +msgid ":gh:`152235`: Defer GC tracking of a :class:`set` or :class:`frozenset` to the end of its construction from iterable. Patch by Donghee Na." +msgstr "" + +msgid ":gh:`152228`: Fix an assertion failure when python is built in a debug mode that happened in :meth:`str.replace` under a limited memory situation." +msgstr "" + +msgid ":gh:`151722`: :meth:`!frozendict.fromkeys` now only tracks the :class:`frozendict` in the garbage collector once the dictionary is fully initialized. Patch by Donghee Na and Victor Stinner." +msgstr "" + +msgid ":gh:`151763`: Fixes possible crash on :class:`types.CodeType` deallocation." +msgstr "" + +msgid ":gh:`152020`: On the free-threaded build, :func:`asyncio.all_tasks` no longer loses eager-started tasks when called from a thread other than the one running the event loop." +msgstr "" + +msgid ":gh:`151763`: Fix a potential crash in :func:`compile`, :func:`exec`, :func:`eval` and :func:`ast.parse` when an allocation fails: the parser or compiler could return without setting an exception." +msgstr "" + +msgid ":gh:`151912`: Fixed a crash in ``type()`` when selecting a metaclass whose ``tp_new`` slot is ``NULL``. Such metaclasses are now rejected with ``TypeError`` instead of causing a NULL pointer dereference." +msgstr "" + +msgid ":gh:`151773`: Fix a crash in :func:`contextvars.ContextVar.set` when memory allocation fails." +msgstr "" + +msgid ":gh:`151672`: Fix an inconsistency where calling ``__lazy_import__`` with a string ``fromlist`` would return a :class:`types.LazyImportType` that resolves to the named member, rather than the module being imported." +msgstr "" + +msgid ":gh:`151619`: Fix an issue where using non-module global or builtin namespaces (such as dictionaries passed to :func:`exec`) could cause cached global loads to produce unresolved :ref:`lazy imports `." +msgstr "" + +msgid ":gh:`151126`: Fix a crash when sharing :class:`memoryview` objects between interpreters fails due to running out of memory. It now raises a proper :exc:`MemoryError`." +msgstr "" + +msgid ":gh:`151644`: Fix a data race in :func:`sys.setdlopenflags` and :func:`sys.getdlopenflags` when called concurrently in the free-threaded build. The underlying ``_PyImport_GetDLOpenFlags`` and ``_PyImport_SetDLOpenFlags`` functions now use atomic load/store operations." +msgstr "" + +msgid ":gh:`151126`: Avoid possible crash in ``_winapi.c`` where a device has no memory left. Now it properly raises a :exc:`MemoryError`. Patch by Ivy Xu." +msgstr "" + +msgid ":gh:`151029`: On Linux, fix :func:`sys.remote_exec` unable to find remote writable memory when ``libpython`` replaced on disk." +msgstr "" + +msgid ":gh:`150459`: Fix :exc:`SyntaxError` error message for ``from x lazy import y``. Raise :exc:`SyntaxWarning` on ``from . lazy import x`` (with whitespace between the dots and a module named ``lazy``)." +msgstr "" + +msgid ":gh:`150858`: Fix a data race while changing ``__qualname__`` of a type concurrently on free-threaded builds." +msgstr "" + +msgid ":gh:`144774`: Fix data race in :class:`BaseException` when an exception is copied while being mutated." +msgstr "" + +msgid ":gh:`150411`: Fix a data race in the free-threaded build when :func:`gc.get_count` reads the young generation allocation count while another thread updates it." +msgstr "" + +msgid ":gh:`149689`: Fix missing error propagation in parser action helpers when memory allocation fails. Patch by Thomas Kowalski." +msgstr "" + +msgid ":gh:`149162`: Fix a potential deadlock in :c:func:`PyUnicode_InternFromString` and other interning functions in the :term:`free-threaded build` when called from C++ static local initializers." +msgstr "" + +msgid ":gh:`148825`: Fix build error if specialization is disabled." +msgstr "" + +msgid ":gh:`153695`: Hashing a :class:`sqlite3.Row` that contains an unhashable value now raises :exc:`TypeError` instead of :exc:`SystemError`. Patch by tonghuaroot." +msgstr "" + +msgid ":gh:`153658`: Fix :meth:`sqlite3.Connection.iterdump` raising :exc:`sqlite3.OperationalError` when a table name contains a single quote. Patch by tonghuaroot." +msgstr "" + +msgid ":gh:`85943`: Fix :mod:`struct` functions raising :exc:`BytesWarning` under the ``-bb`` command line option when a :class:`str` format is used after an equal :class:`bytes` format (or vice versa). The internal format cache no longer mixes :class:`str` and :class:`bytes` keys." +msgstr "" + +msgid ":gh:`151292`: Store the sample count in :mod:`profiling.sampling` binary format, as a 64-bit integer, widening from previously used 32-bit integer. This breaks the existing recordings. Long or thread-heavy profiling sessions will no longer fail because of :exc:`OverflowError`. Patch by Maurycy Pawłowski-Wieroński." +msgstr "" + +msgid ":gh:`153417`: Error messages from :meth:`imaplib.IMAP4.select` and :meth:`imaplib.IMAP4.uid` no longer raise :exc:`BytesWarning` under :option:`!-bb` when the mailbox or command argument is :class:`bytes`." +msgstr "" + +msgid ":gh:`153406`: :func:`email.utils.parsedate_to_datetime` now raises :exc:`ValueError` instead of :exc:`OverflowError` when the parsed year or timezone offset is out of range, matching its documented behavior." +msgstr "" + +msgid ":gh:`153333`: The ``readprofile`` method of :class:`tkinter.Tk` now reads the user's profile scripts using the encoding declared in the file, instead of the locale encoding." +msgstr "" + +msgid ":gh:`153083`: Defer GC tracking of an :class:`array.array` to the end of its construction. Patch by Donghee Na." +msgstr "" + +msgid ":gh:`153292`: Fix data race in repr of :class:`threading.RLock` in free-threading build." +msgstr "" + +msgid ":gh:`153293`: Fix the live sampling profiler TUI keeping stale aggregated opcode statistics after a stats reset." +msgstr "" + +msgid ":gh:`143990`: A :class:`tkinter.font.Font` created from a named font, including by :meth:`~tkinter.font.Font.copy`, now copies its configured options rather than the options resolved by Tcl's ``font actual``, preserving a size specified in pixels (a negative size)." +msgstr "" + +msgid ":gh:`148286`: Fix undefined behavior in :attr:`compression.zstd.ZstdDecompressor.unused_data` when a complete frame was decompressed in a single call." +msgstr "" + +msgid ":gh:`153210`: Fix crash on :mod:`array` import under a memory pressure." +msgstr "" + +msgid ":gh:`153200`: Fix :func:`math.isqrt` returning an incorrect result for arguments not less than 2**64 that are instances of an :class:`int` subclass with an overridden comparison operator." +msgstr "" + +msgid ":gh:`153068`: Fix :meth:`!cProfile.Profile.enable` to no longer overwrite errors from :mod:`sys.monitoring`." +msgstr "" + +msgid ":gh:`153062`: Fix a crash when concurrently iterating an :func:`itertools.tee` iterator on the free-threaded build." +msgstr "" + +msgid ":gh:`153056`: Fix :class:`string.Template` raising a spurious :exc:`ValueError` when the *pattern* attribute is a compiled regular expression object, which the documentation allows. On the free-threaded build this also occurred as a data race on the first concurrent use." +msgstr "" + +msgid ":gh:`143921`: Narrow the control character check in :mod:`imaplib` commands: only NUL, CR and LF are now rejected. Other control characters are valid in quoted strings and can occur in mailbox names returned by the server, so they are now accepted and sent quoted." +msgstr "" + +msgid ":gh:`153037`: Fix :class:`~compression.zstd.ZstdFile` raising :exc:`AttributeError` instead of :exc:`io.UnsupportedOperation` when iterating over a file that is not open for reading." +msgstr "" + +msgid ":gh:`135661`: Fix :class:`html.parser.HTMLParser`: an abruptly closed empty comment (```` or ````) no longer extends up to a later ``-->`` in the same :meth:`~html.parser.HTMLParser.feed` call." +msgstr "" + +msgid ":gh:`152851`: Prevent a crash when allocation fails while copying a :func:`BLAKE-2s/2b ` object. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`54930`: Error responses of :class:`http.server.BaseHTTPRequestHandler` to malformed request lines now include a status line and headers instead of being sent in the bare HTTP/0.9 style. Only a valid HTTP/0.9 request (a two-word ``GET`` request line) now receives an HTTP/0.9 style response." +msgstr "" + +msgid ":gh:`119592`: Fix :class:`concurrent.futures.ProcessPoolExecutor` stranding submitted work forever when a worker process exited upon reaching its *max_tasks_per_child* limit after :meth:`~concurrent.futures.Executor.shutdown` was called with ``wait=False``: a replacement worker is now spawned and the remaining work executed as documented. If the executor has instead been garbage collected without ``shutdown()`` (:gh:`152967`), or a replacement worker cannot be started, the remaining futures now fail with :exc:`~concurrent.futures.process.BrokenProcessPool` instead of never resolving. A worker exit racing ``shutdown(wait=False)`` can also no longer crash the executor management thread." +msgstr "" + +msgid ":gh:`150579`: :mod:`concurrent.futures` now uses lazy imports for its executor submodules instead of a module ``__getattr__`` hook." +msgstr "" + +msgid ":gh:`152951`: :class:`collections.deque` prevent rare crash when calling ``extend`` under high memory pressure conditions." +msgstr "" + +msgid ":gh:`150880`: Normalize non-extended Windows paths before appending the wildcard used by ``os.listdir()`` and ``os.scandir()``, making paths with trailing spaces behave consistently with other filesystem APIs." +msgstr "" + +msgid ":gh:`152068`: Fixes a bug when a line was split (particularly on macOS Terminal.app) in the middle of a colorized keyword, causing the ANSI Color Reset sequence (ESC0m) to not be properly printed, causing the output to be colored when it shouldn't" +msgstr "" + +msgid ":gh:`152849`: Out-of-range float and integer timestamps now raise :exc:`OverflowError` with the same message. Patch by tonghuaroot." +msgstr "" + +msgid ":gh:`152847`: Reject a POSIX TZ transition rule with non-digit characters in the day-of-year field in the pure-Python :mod:`zoneinfo` parser. Patch by tonghuaroot." +msgstr "" + +msgid ":gh:`152718`: Fix unbounded memory allocation in the :mod:`profiling.sampling` binary profile reader when a file declares more string or frame entries than it contains." +msgstr "" + +msgid ":gh:`108280`: Connecting :mod:`imaplib` to a server that does not send a valid IMAP4 greeting (for example a POP3 server answering on the IMAP port) now raises an error reporting the server's response instead of ``imaplib.IMAP4.error: None``." +msgstr "" + +msgid ":gh:`63121`: :mod:`imaplib` now refreshes the cached capability list after a successful :meth:`~imaplib.IMAP4.login` or :meth:`~imaplib.IMAP4.authenticate`, using the ``CAPABILITY`` response sent by the server or, if none was sent, by querying it, so that capabilities that become available only after authentication (such as ``ENABLE`` on Gmail) are recognized. Capabilities advertised in the server greeting are now also used, avoiding a redundant ``CAPABILITY`` command." +msgstr "" + +msgid ":gh:`88574`: :mod:`imaplib` no longer fails when a server sends a spurious blank line after the counted data of a literal, including after a literal that terminates a response (such as a mailbox name returned by ``LIST``). Such blank lines are now skipped without swallowing the following line." +msgstr "" + +msgid ":gh:`152502`: Detect the :mod:`curses` mouse interface (:func:`~curses.getmouse`, the ``BUTTON*`` constants, and others) with a configure capability probe or library macros instead of gating it on ncurses-specific macros. It is now also available with other curses implementations that provide it, such as NetBSD curses and PDCurses (the latter underpins ``windows-curses``)." +msgstr "" + +msgid ":gh:`151842`: Fix a crash in :func:`!_interpreters.capture_exception` when :exc:`MemoryError` happens. Patch by Amrutha Modela." +msgstr "" + +msgid ":gh:`40038`: :mod:`imaplib` now again quotes command arguments when necessary, for example mailbox names containing a space. Such quoting was inadvertently disabled when the module was ported to Python 3, and the arguments are now quoted according to the :rfc:`3501` grammar. For backward compatibility, an argument already enclosed in double quotes is left unchanged, so code that quotes arguments itself keeps working." +msgstr "" + +msgid ":gh:`50966`: Fix unbounded recursion in :mod:`turtle` when a mouse event handler that moves the turtle is reentered while the screen is being redrawn, for example with ``screen.ondrag(turtle.goto)``. This could previously crash the interpreter." +msgstr "" + +msgid ":gh:`152569`: Fix :func:`asyncio.wait` leaking waiting tasks via the await-graph when racing a future that never resolves. The waiting task is now discarded from every future's ``awaited_by`` set once :func:`~asyncio.wait` returns, even for pending futures." +msgstr "" + +msgid ":gh:`110357`: Importing :mod:`hashlib` no longer logs an error to stderr when a normally guaranteed hash algorithm is unavailable in the current runtime (for example under an OpenSSL FIPS configuration or a build using :option:`--without-builtin-hashlib-hashes <--with-builtin-hashlib-hashes>`). Code that actually uses the missing algorithm still gets a clear :exc:`ValueError`." +msgstr "" + +msgid ":gh:`152356`: Fix a hang in ``profiling.sampling run --blocking`` on Windows when the target process exits. The profiler now finalizes binary profiles instead of continuing to sample the exited process." +msgstr "" + +msgid ":gh:`78335`: Update the docstrings of :mod:`tkinter` and :mod:`tkinter.ttk` widget classes to list all supported widget options, including options added in Tk 9.0 and 9.1. ``tkinter.Menubutton`` and ``tkinter.Message`` previously had no option list at all." +msgstr "" + +msgid ":gh:`151126`: Fix two crashes in :mod:`tkinter` and :mod:`socket` modules initialization under a memory pressure. Sets missing :exc:`MemoryError`." +msgstr "" + +msgid ":gh:`133031`: :class:`curses.textpad.Textbox` now enters and reads back the non-ASCII characters of an 8-bit locale encoding, instead of mangling them with a 7-bit mask." +msgstr "" + +msgid ":gh:`71880`: :class:`curses.textpad.Textbox` now lets the lower-right cell of the window be edited. Writing it with :meth:`~curses.window.addch` would move the cursor past the end of the window, raising an error and scrolling a scrollable window, so it is now written with :meth:`~curses.window.insch`, which keeps the cursor in place." +msgstr "" + +msgid ":gh:`83274`: Deallocating a :mod:`tkinter` application from a thread other than the one it was created in no longer crashes the interpreter. The underlying Tcl interpreter is leaked instead, and a :exc:`RuntimeWarning` is reported." +msgstr "" + +msgid ":gh:`152305`: Fix the pure-Python :meth:`datetime.time.strftime` implementation raising :exc:`AttributeError` for the year directives. Patch by tonghuaroot." +msgstr "" + +msgid ":gh:`88758`: :meth:`!tkinter.Misc.focus_get`, :meth:`!focus_displayof`, :meth:`!focus_lastfor` and :meth:`!winfo_containing` now return ``None`` instead of raising :exc:`KeyError` when the widget was not created by :mod:`tkinter` (for example a torn-off menu)." +msgstr "" + +msgid ":gh:`38464`: :meth:`!tkinter.Misc.nametowidget` now resolves the auto-generated names of cloned menus (a menu used as a menubar or a cascade) back to the original widget." +msgstr "" + +msgid ":gh:`152248`: Make the C and pure-Python :mod:`zoneinfo` parsers validate POSIX TZ abbreviations consistently, rejecting unquoted abbreviations with non-letter characters and empty quoted abbreviations. Patch by tonghuaroot." +msgstr "" + +msgid ":gh:`80937`: Fix a memory leak in :mod:`tkinter` when a Tcl command created with ``createcommand`` was not explicitly removed before the interpreter was deleted. The command no longer keeps the interpreter alive through a reference cycle." +msgstr "" + +msgid ":gh:`152246`: Fix the pure-Python :mod:`zoneinfo` parser accepting an invalid POSIX TZ transition rule with a non-period separator. Patch by tonghuaroot." +msgstr "" + +msgid ":gh:`151496`: Fixed ``profiling.sampling --gecko`` with ``--async-aware`` by flattening async task stacks before generating Gecko samples. ``--binary`` now rejects ``--async-aware`` until the binary format supports async task data." +msgstr "" + +msgid ":gh:`139816`: Fix a hang in :mod:`tkinter` on interactive Python built without :mod:`readline`. An exception raised in a callback no longer causes the event loop to stop and wait for the user to press Enter; pending callbacks now keep running until input is actually available on stdin." +msgstr "" + +msgid ":gh:`139145`: Fix a busy loop in :mod:`tkinter` on interactive Python. When a Tcl command running its own event loop (such as ``vwait`` or :meth:`!wait_variable`) was active and input arrived on stdin, the event loop kept spinning at 100% CPU. The stdin file handler is now removed as soon as input is available. Based on a patch by Michiel de Hoon." +msgstr "" + +msgid ":gh:`152212`: Fix the pure-Python :mod:`zoneinfo` parser accepting a POSIX TZ string with a ``std`` abbreviation but no offset. This is invalid per POSIX and now raises :exc:`ValueError`, matching the C accelerator. Patch by tonghuaroot." +msgstr "" + +msgid ":gh:`152156`: Fix a possible crash in :func:`concurrent.interpreters.create` under limited memory conditions." +msgstr "" + +msgid ":gh:`152157`: The C implementations of :meth:`~datetime.datetime.fromisoformat` and :meth:`~datetime.time.fromisoformat` now reject a decimal separator that is not followed by any fractional digit before a timezone designator." +msgstr "" + +msgid ":gh:`151763`: Fix crash in :func:`!_interpqueues.create` whe :exc:`MemoryError` happens on queue creation." +msgstr "" + +msgid ":gh:`151669`: On Windows, when populating tar archives from filesystem content, to conform to the tar format standard, backslashes in symlink targets are be replaced by slashes." +msgstr "" + +msgid ":gh:`105895`: Add :keyword:`match` and :keyword:`case` to the list of supported topics by :func:`help`." +msgstr "" + +msgid ":gh:`151378`: Fix a bug in the binary collector in Tachyon that caused unbounded memory growth while profiling a thread that stayed asleep. Patch by Maurycy Pawłowski-Wieroński." +msgstr "" + +msgid ":gh:`152079`: Fix :meth:`datetime.datetime.fromisoformat` in the C implementation dropping the sub-second part of a UTC offset whose whole-second part is zero, matching the pure-Python implementation." +msgstr "" + +msgid ":gh:`152052`: The :mod:`json` C accelerator now correctly reports an unterminated string for a ``\\uXXXX`` escape at the end of the input." +msgstr "" + +msgid ":gh:`152060`: Fix :meth:`datetime.datetime.fromisoformat` raising :exc:`AssertionError` instead of :exc:`ValueError` for some malformed strings in the pure-Python implementation, matching the C implementation." +msgstr "" + +msgid ":gh:`127802`: The deprecated :class:`tkinter.Variable` methods :meth:`!trace_variable`, :meth:`!trace`, :meth:`!trace_vdelete` and :meth:`!trace_vinfo` are now scheduled for removal in Python 3.17." +msgstr "" + +msgid ":gh:`126219`: Fixed a crash in :class:`tkinter.Tk` when *className* contains a non-BMP character and tkinter is built against Tcl/Tk 8.x. Such a name is now rejected with a :exc:`ValueError`." +msgstr "" + +msgid ":gh:`86165`: Fix :func:`imaplib.Time2Internaldate` to use the local timezone offset for ``time.struct_time`` values with ``tm_gmtoff`` set to ``None``, as returned by ``datetime.datetime.timetuple()``. Contributed by Xiao Yuan." +msgstr "" + +msgid ":gh:`151814`: Fix unbounded memory growth in :class:`io.TextIOWrapper` when repeatedly writing an empty string." +msgstr "" + +msgid ":gh:`151596`: Add missing ``size`` positional argument to the pure-Python implementation of :meth:`io.TextIOBase.readline`." +msgstr "" + +msgid ":gh:`151640`: Fix a data race in :class:`io.BytesIO` in free-threaded builds when whole-buffer reads or peeks, or :meth:`~io.BytesIO.getvalue`, share the internal buffer with concurrent writes." +msgstr "" + +msgid ":gh:`151613`: Fix another way the Tachyon profiler frame cache could produce impossible mixed stack traces when ``_PyInterpreterFrame`` addresses are reused, by validating cached frame anchors with a sequence counter." +msgstr "" + +msgid ":gh:`148660`: Fix a crash in :meth:`!collections.OrderedDict.copy` when a key's ``__eq__`` or a subclass method mutates the dict during the copy. Now raises :exc:`RuntimeError` instead, as iteration does." +msgstr "" + +msgid ":gh:`151497`: Opening a :mod:`tarfile` archive no longer attempts to pre-allocate a huge buffer when a crafted or truncated member claims an oversized extended header (a GNU long name/link or a pax header). The extended header is now read in bounded chunks, so its size field can no longer trigger memory exhaustion." +msgstr "" + +msgid ":gh:`151416`: Fix a crash in :func:`os.spawnv` and :func:`os.spawnve` when an *argv* item's :meth:`~os.PathLike.__fspath__` method mutates the *argv* list during argument conversion. :func:`!os.spawnv` argument conversion errors other than :exc:`TypeError`, such as the :exc:`ValueError` for an embedded null, are no longer replaced with a generic :exc:`TypeError`." +msgstr "" + +msgid ":gh:`150994`: Make the type annotations in the private ``_colorize`` module resolvable." +msgstr "" + +msgid ":gh:`150583`: Correctly set the default compression level in :mod:`compression.zstd` when passing a digested dictionary during compression." +msgstr "" + +msgid ":gh:`150641`: Fix bug where :func:`typing.evaluate_forward_ref` with the ``STRING`` format could leak internal names used by the annotation machinery." +msgstr "" + +msgid ":gh:`149816`: Fix a potential use after free condition in :func:`pickle.dumps` in free-threaded mode when serializing lists." +msgstr "" + +msgid ":gh:`47005`: Fix :meth:`!urllib.request.AbstractHTTPHandler.do_open` to give regular headers set via :meth:`~urllib.request.Request.add_header` priority over unredirected headers, consistent with :meth:`~urllib.request.Request.get_header` and :meth:`~urllib.request.Request.header_items`." +msgstr "" + +msgid ":gh:`140729`: Fix a pickling error in the ``cProfile`` module when profiling a script that uses :class:`multiprocessing.Process` with the ``spawn`` and ``forkserver`` start methods." +msgstr "" + +msgid ":gh:`115634`: Fix a deadlock in :class:`concurrent.futures.ProcessPoolExecutor` when using ``max_tasks_per_child``, present since the feature was introduced in Python 3.11. The executor stopped scheduling queued tasks after a worker process exited upon reaching its task limit. Based on a fix proposed by Tabrez Mohammed." +msgstr "" + +msgid ":gh:`79638`: Disallow all access in :mod:`urllib.robotparser` if the ``robots.txt`` file is unreachable due to server or network errors." +msgstr "" + +msgid ":gh:`105708`: Accept an uppercase V prefix in IPvFuture addresses in :func:`urllib.parse.urlsplit`." +msgstr "" + +msgid ":gh:`151626`: Fix several tests in ``test.test_inspect``, ``test.test_import``, ``test.test_importlib``, ``test.test_py_compile`` and ``test.test_compileall`` that failed when the test suite was run with :envvar:`PYTHONPYCACHEPREFIX` set. These tests now neutralize the pycache prefix where they assume the default ``__pycache__`` bytecode layout." +msgstr "" + +msgid ":gh:`151096`: Fix ``test_embed`` failing when CPython is configured with a split exec prefix (``--exec-prefix`` differing from ``--prefix``)." +msgstr "" + +msgid ":gh:`126877`: Fix the :program:`configure` check for Tcl/Tk which could wrongly succeed with optimizing compilers when the libraries are missing." +msgstr "" + +msgid ":gh:`153438`: Update Windows build and installer tooling and documentation to use the current download URL for ``nuget.exe``." +msgstr "" + +msgid ":gh:`152870`: Fix a compilation error in the :mod:`decimal` C extension (``_decimal``) when it is built with ``EXTRA_FUNCTIONALITY``. ``Context.apply()`` called the internal ``_apply`` helper using its pre-Argument-Clinic signature; the call is now made through the generated ``_impl`` function." +msgstr "" + +msgid ":gh:`152769`: Enable the :ref:`perf profiler ` trampoline on Alpine Linux with the musl C library on ``x86_64`` and ``aarch64``. The trampoline is architecture-specific and does not depend on the C library, so the same assembly trampoline used for glibc is reused for musl." +msgstr "" + +msgid ":gh:`152502`: The :mod:`curses` module now detects ``set_escdelay()``, ``set_tabsize()`` and the ``ESCDELAY`` and ``TABSIZE`` variables with :program:`configure` capability probes instead of the ncurses-specific ``NCURSES_EXT_FUNCS`` macro, so they are exposed when building against other curses implementations such as NetBSD curses that provide them." +msgstr "" + +msgid ":gh:`140146`: Prevent :mod:`tkinter` from hanging on Windows if stdin is redirected to a pipe in an interactive session. This is helpful for testing interactive usage of tkinter from a script, for example as part of the cpython test suite." +msgstr "" + +msgid ":gh:`124111`: Update macOS installer to use Tcl/Tk 9.0.4." +msgstr "" + +msgid ":gh:`152023`: Update macOS installer builds to SQLite 3.53.3. Enable median() and percentile() functions." +msgstr "" + +msgid ":gh:`82183`: When the shell is busy running code, using \"Run... Customized\" with \"Restart shell\" unchecked now reports that the shell is executing instead of restarting it anyway." +msgstr "" + +msgid ":gh:`83653`: Blanking an integer entry in IDLE's Settings dialog, such as \"Auto squeeze min lines\", no longer saves an empty string as an invalid configuration value." +msgstr "" + +msgid ":gh:`65339`: Saving the IDLE Shell or an Output window now defaults to a ``.txt`` extension and lists text files before Python files, since their content is not Python source." +msgstr "" + +msgid ":gh:`80504`: The \"In files:\" field of IDLE's Find in Files dialog now always contains a full directory path, even for an unsaved editor or the Shell. This shows in the grep output which directory was searched." +msgstr "" + +msgid ":gh:`134300`: Do not add the ``idlelib`` directory to the path of the IDLE user process. User code run in IDLE can no longer import ``idlelib`` submodules as top-level modules, such as ``import help``." +msgstr "" + +msgid ":gh:`89360`: Fix a rare crash in the IDLE editor when the completion window is closed: deleting a key binding for a sequence that is not bound to the virtual event is now ignored instead of raising a ``ValueError``." +msgstr "" + +msgid ":gh:`71956`: Fix Replace All in the IDLE editor's Replace dialog when the search direction is \"Up\" and \"Wrap around\" is off: it now replaces all matches above the current position instead of only the first one." +msgstr "" + +msgid ":gh:`152728`: Move functions run.fix_scaling, editor.fixwordbreaks (as fix_word_breaks) and pyshell.fix_x11_paste to idlelib.util." +msgstr "" + +msgid ":gh:`66331`: Set the ``WM_CLASS`` window property of IDLE's windows to ``Idle`` on X11, so that window managers group and label them correctly instead of using the default ``Toplevel``." +msgstr "" + +msgid ":gh:`85320`: IDLE now reads and writes its configuration files and the breakpoints file using UTF-8 instead of the locale encoding. This keeps non-ASCII data (such as non-ASCII paths) from being corrupted and makes the files portable between environments." +msgstr "" + +msgid ":gh:`152132`: Fix :c:func:`Py_RunMain` to return an exit code, rather than calling :c:func:`Py_Exit`, when running a script, a command, or the REPL. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`145633`: :c:func:`PyFloat_Pack8` and ``PyFloat_Unpack*`` functions are no longer guaranteed to always succeed on CPython." +msgstr "" + +msgid ":gh:`153300`: :c:func:`PyConfig_Set()` now also set global configuration variables. For example, ``PyConfig_Set(\"inspect\", value)`` now also sets :c:var:`Py_InspectFlag`. Patch by Victor Stinner." +msgstr "" + +msgid "Python 3.15.0 beta 3" +msgstr "" + +msgid "*Release date: 2026-06-23*" +msgstr "" + +msgid ":gh:`151544`: :file:`Modules/Setup.local` is no longer used as a landmark to discover whether Python is running in a source tree, as it could potentially affect actual installs. The :file:`pybuilddir.txt` file is now the sole indicator of running in a source tree." +msgstr "" + +msgid ":gh:`151159`: Update macOS installer to use OpenSSL 3.5.7." +msgstr "" + +msgid ":gh:`151159`: Update Android and iOS installers to use OpenSSL 3.5.7." +msgstr "" + +msgid ":gh:`150599`: Fix a possible stack buffer overflow in :mod:`bz2` when a :class:`bz2.BZ2Decompressor` is reused after a decompression error. The decompressor now becomes unusable after libbz2 reports an error." +msgstr "" + +msgid ":gh:`149835`: :func:`shutil.move` now resolves symlinks via :func:`os.path.realpath` when checking whether the destination is inside the source directory, preventing a symlink-based bypass of that guard." +msgstr "" + +msgid ":gh:`151905`: Fix OOM error handling in :c:func:`PyFrame_GetBack` to propagate exceptions instead of masking them as None." +msgstr "" + +msgid ":gh:`151722`: Defer GC tracking of :class:`frozendict` to end of construction. Patch by Donghee Na." +msgstr "" + +msgid ":gh:`151546`: Fix the stack limit check if Python is linked to musl (ex: Alpine Linux). Use the stack size set by the linker to compute the stack limits. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`151510`: Fix a crash in :func:`!__lazy_import__` when called without an explicit ``globals`` argument and without a current Python frame." +msgstr "" + +msgid ":gh:`151461`: Fix direct execution of files with invalid source encodings to report the underlying codec lookup or decoding error instead of the generic ``SyntaxError: encoding problem`` message. Patch by Bartosz Sławecki." +msgstr "" + +msgid ":gh:`151218`: :c:func:`PyConfig_Set` and :func:`sys.set_int_max_str_digits` now replace :data:`sys.flags` (create a new object), instead of modifying :data:`sys.flags` in-place. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`151297`: Fix an invalid pointer dereference that could occur when calling :c:func:`PyObject_Realloc` with a NULL pointer in :term:`free-threaded builds ` or with :envvar:`PYTHONMALLOC` set to ``mimalloc``." +msgstr "" + +msgid ":gh:`151253`: If ``import encodings`` (first import) fails at Python startup, dump the Python path configuration to help users debugging their configuration. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`151238`: Fix a crash when compiling a concatenated f-string or t-string if an error occurs when processing one of it's parts." +msgstr "" + +msgid ":gh:`151112`: Fix a crash in the compiler that could occur when running out of memory." +msgstr "" + +msgid ":gh:`151126`: Fix a crash, when there's no memory left on a device, which happened in: code compilation, :mod:`!_interpchannels` module, :func:`!_winapi.CreateProcess` function." +msgstr "" + +msgid "Now these places raise proper :exc:`MemoryError` errors." +msgstr "" + +msgid ":gh:`150902`: Apply an existing optimization of PyCriticalSection (single mutex) to PyCriticalSection2: avoid acquiring the same locks that the current CS has already acquired." +msgstr "" + +msgid ":gh:`151065`: Fix memory leak when using the :ref:`mimalloc memory allocator `." +msgstr "" + +msgid ":gh:`150988`: Fix a reference leak in :exc:`OSError` when attributes are set before ``super().__init__()``." +msgstr "" + +msgid ":gh:`150723`: Fix perf jitdump timestamps on macOS. Events were stamped using ``CLOCK_MONOTONIC``, but macOS profilers timestamp their samples with ``mach_absolute_time()``. The mismatch prevented the JIT code mappings from lining up with the samples, so no Python frame could be resolved." +msgstr "" + +msgid ":gh:`150723`: Fix malformed perf jitdump thread ids on macOS. The ``thread_id`` field of the ``JR_CODE_LOAD`` record was written as a 64-bit value instead of the 32-bit value required by the jitdump format, which shifted every following field and prevented profilers from resolving Python frames." +msgstr "" + +msgid ":gh:`150700`: Fix a :exc:`SystemError` when compiling a class-scope comprehension containing a ``lambda`` that references ``__class__``, ``__classdict__``, or ``__conditional_annotations__``. Patch by Bartosz Sławecki." +msgstr "" + +msgid ":gh:`150633`: Fix the frozen importer accepting module names with embedded null bytes, which caused it to bypass the :data:`sys.modules` cache and create duplicate module objects." +msgstr "" + +msgid ":gh:`148613`: Fix a data race in the free-threaded build between :func:`gc.set_threshold` and garbage collection scheduling during object allocation." +msgstr "" + +msgid ":gh:`150207`: Fix a crash when a memory allocation fails during tokenizer initialization. A proper :exc:`MemoryError` is now raised instead." +msgstr "" + +msgid ":gh:`149805`: Fix a :exc:`SystemError` when compiling a compiling ``__classdict__`` class annotation. Found by OSS-Fuzz in :oss-fuzz:`512907042`." +msgstr "" + +msgid ":gh:`149321`: Do not support ``none`` as a lazy imports mode." +msgstr "" + +msgid ":gh:`75666`: Fix a reference leak in :mod:`tkinter`: the Tcl commands created for event callbacks are now deleted when a binding is replaced or unbound." +msgstr "" + +msgid ":gh:`151770`: Fix :meth:`datetime.datetime.fromisoformat` raising :exc:`AssertionError` instead of :exc:`ValueError` for an out-of-range month combined with a ``24:00`` time." +msgstr "" + +msgid ":gh:`151665`: :func:`inspect.signature` now works on the lazy evaluators of type aliases and type parameters instead of raising :exc:`ValueError`." +msgstr "" + +msgid ":gh:`151695`: Fix a use-after-free in the :mod:`curses` module. The encoding of the initial screen, used by :func:`curses.unctrl` and :func:`curses.ungetch` to encode non-ASCII characters, is now kept as a private copy instead of a borrowed pointer to a window object that may be deallocated." +msgstr "" + +msgid ":gh:`151436`: Fix skewed stack trackes in the Tachyon profiler when caching is enabled and when generators and coroutines are profiled, by updating ``tstate->last_profiled_frame`` at every frame-removal site. The issue resulted in total erasure of some callers. Patch by Maurycy Pawłowski-Wieroński." +msgstr "" + +msgid ":gh:`151426`: Fix impossible stack traces (callers and callees cross called, orphans and incorrect lines) in the Tachyon profiler when caching frames, by snapshotting the stack chunks before walking the frame chain on a cache miss. Patch by Maurycy Pawłowski-Wieroński." +msgstr "" + +msgid ":gh:`151403`: Fixed a crash in :class:`subprocess.Popen` (and ``_posixsubprocess.fork_exec``) when an ``argv`` item's :meth:`~os.PathLike.__fspath__` concurrently mutates the ``args`` sequence being converted." +msgstr "" + +msgid ":gh:`151390`: Colorize ``match`` in the :term:`REPL` when followed by a unary ``+`` or ``-`` operator. Patch by Bartosz Sławecki." +msgstr "" + +msgid ":gh:`151126`: Fix crash on unset :exc:`MemoryError` on allocation failure in :func:`ctypes.get_errno`." +msgstr "" + +msgid ":gh:`151337`: Avoid possible memory leak in ``tkinter.c`` on Windows." +msgstr "" + +msgid ":gh:`151126`: Fix a crash when :exc:`MemoryError` in :func:`!os._path_splitroot` was not set properly." +msgstr "" + +msgid ":gh:`149671`: Restore compatibility with setuptools ``-nspkg.pth`` files in the :mod:`site` module. Inject ``sitedir`` variable in the frame which executes pth code. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`151295`: Fixed a crash (use-after-free) in :meth:`bytes.join` and :meth:`bytearray.join` that could occur if an item's :meth:`~object.__buffer__` concurrently mutates the sequence being joined. The mutation is now reported as a :exc:`RuntimeError` instead." +msgstr "" + +msgid ":gh:`109940`: Fix Windows :mod:`venv` activation in ``cmd.exe`` to respect ``VIRTUAL_ENV_DISABLE_PROMPT``." +msgstr "" + +msgid ":gh:`150771`: Fix :mod:`email` messages created with ``shift_jis`` or ``euc-jp`` charsets. ``set_content()`` now stores the payload using the output charset (``iso-2022-jp``) so printing the message no longer raises :exc:`UnicodeEncodeError`." +msgstr "" + +msgid ":gh:`151039`: Fix a crash when static :mod:`datetime` types outlive the ``_datetime`` module." +msgstr "" + +msgid ":gh:`151021`: Fix :meth:`mmap.mmap.find` and :meth:`~mmap.mmap.rfind` to return ``-1`` when searching for an empty subsequence with a start position past the end of the mapping." +msgstr "" + +msgid ":gh:`62825`: Encodings \"KS_C_5601-1987\", \"KS X 1001\", etc are now aliases of \"CP949\" instead of \"EUC-KR\"." +msgstr "" + +msgid ":gh:`150913`: Fix :class:`sqlite3.Blob` slice assignment to raise :exc:`TypeError` and :exc:`IndexError` for type and size mismatches respectively, even when the target slice is empty." +msgstr "" + +msgid ":gh:`143008`: Fix race conditions when re-initializing a :class:`io.TextIOWrapper` object." +msgstr "" + +msgid ":gh:`150662`: Fix the ``--gecko`` collector in :mod:`profiling.sampling` that kept every sample in memory. It now writes sample and marker data to temporary files and reads them back, ultimately building the output file at the end. Patch by Pablo Galindo and Maurycy Pawłowski-Wieroński." +msgstr "" + +msgid ":gh:`150750`: Fix a race condition in :meth:`collections.deque.index` with free-threading." +msgstr "" + +msgid ":gh:`148932`: Fix ``profiling.sampling`` on Windows virtual environments to resolve the actual Python PID from a virtual environment shim." +msgstr "" + +msgid ":gh:`149816`: Fix race condition in :attr:`ssl.SSLContext.sni_callback`" +msgstr "" + +msgid ":gh:`53144`: The :mod:`email` package now supports all aliases of Python codecs and uses MIME/IANA names for all IANA registered charsets." +msgstr "" + +msgid ":gh:`149891`: Add support for more encoding aliases `officially registered in IANA `__." +msgstr "" + +msgid ":gh:`149473`: Calling ``os.environ.clear()`` now emits ``os._clearenv`` auditing event. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`148954`: Fix XML injection vulnerability in :func:`xmlrpc.client.dumps` where the ``methodname`` was not being escaped before interpolation into the XML body." +msgstr "" + +msgid ":gh:`143988`: Fixed crashes in :meth:`socket.socket.sendmsg` and :meth:`socket.socket.recvmsg_into` that could occur if buffer sequences are concurrently mutated." +msgstr "" + +msgid ":gh:`120665`: Fixed an issue where ``unittest`` loaders would load and instantiate :class:`unittest.TestCase`-derived subclasses that are also abstract base classes, which can't be instantiated." +msgstr "" + +msgid ":gh:`91099`: :meth:`imaplib.IMAP4.login` now raises exceptions with :class:`str` instead of :class:`bytes`. Patch by Florian Best." +msgstr "" + +msgid ":gh:`101267`: When a worker process terminates unexpectedly, :class:`concurrent.futures.ProcessPoolExecutor` now sets a separate :exc:`~concurrent.futures.process.BrokenProcessPool` exception on each pending future instead of sharing a single instance among them all. Sharing one exception produced malformed tracebacks: each :meth:`Future.result() ` call re-raised the same object, appending another copy of the traceback to it." +msgstr "" + +msgid ":gh:`86726`: Greatly expand the :mod:`tkinter` documentation to cover the full public API of the package and its submodules. The descriptions are oriented towards Python rather than Tcl/Tk, with corrected return types and ``versionadded``/``versionchanged`` information." +msgstr "" + +msgid ":gh:`150319`: Generic builtin and standard library types now document the meaning of their type parameters." +msgstr "" + +msgid ":gh:`109503`: Fix documentation for :func:`shutil.move` on usage of :func:`os.rename` since nonatomic move might be used even if the files are on the same filesystem. Patch by Fang Li" +msgstr "" + +msgid ":gh:`151130`: Add more tests for ``PyWeakref_*`` C API." +msgstr "" + +msgid ":gh:`150966`: Avoid prematurely terminating failing live sampling profiler test targets, which made stderr assertions flaky on ASAN buildbots." +msgstr "" + +msgid ":gh:`148853`: Fix tests failing on FreeBSD in test.support's in_systemd_nspawn_sync_suppressed() due to unreadable /run directory." +msgstr "" + +msgid ":gh:`151163`: Updated Android build to include SQLite version 3.53.2." +msgstr "" + +msgid ":gh:`151163`: Updated Windows builds to include SQLite version 3.53.2." +msgstr "" + +msgid ":gh:`151159`: Updated bundled version of OpenSSL to 3.5.7." +msgstr "" + +msgid ":gh:`150836`: Make installed tkinter work with Tcl/Tk 9 builds that embed the Tk script library in the Tk DLL on Windows." +msgstr "" + +msgid ":gh:`151163`: Updated macOS installer to include SQLite version 3.53.2." +msgstr "" + +msgid ":issue:`6699`: Warn the user if a file will be overwritten when saving." +msgstr "" + +msgid ":gh:`141510`: Add :class:`frozendict` to the fast paths of :c:func:`PyMapping_GetOptionalItem`, :c:func:`PyMapping_Keys`, :c:func:`PyMapping_Values`, and :c:func:`PyMapping_Items`." +msgstr "" + +msgid ":gh:`123619`: :c:func:`PyUnstable_Object_EnableDeferredRefcount` now returns ``0`` if the object is not tracked by the garbage collector: if :func:`gc.is_tracked` is false. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`149044`: Improved error message when specifying non-type base classes in :c:macro:`Py_tp_bases`, :c:macro:`Py_tp_base`, and *bases* argument to :c:func:`PyType_FromMetaclass` and other ``PyType_From*`` functions." +msgstr "" + +msgid ":gh:`150907`: Fix ``dynamic_annotations.h`` header file when built with C++ and Valgrind: add ``extern \"C++\" scope`` for the C++ template. Patch by Victor Stinner." +msgstr "" + +msgid "Python 3.15.0 beta 2" +msgstr "" + +msgid "*Release date: 2026-06-02*" +msgstr "" + +msgid ":gh:`149698`: Update bundled `libexpat `_ to version 2.8.1 for the fix for :cve:`2026-45186`." +msgstr "" + +msgid ":gh:`87451`: The :mod:`ftplib` module's undocumented ``ftpcp`` function no longer trusts the IPv4 address value returned from the source server in response to the ``PASV`` command by default, completing the fix for CVE-2021-4189. As with :class:`ftplib.FTP`, the former behavior can be re-enabled by setting the ``trust_server_pasv_ipv4_address`` attribute on the source :class:`ftplib.FTP` instance to ``True``. Thanks to Qi Deng at Aurascape AI for the report." +msgstr "" + +msgid ":gh:`149474`: Fix the binary writer in :mod:`profiling.sampling` not firing the audit (:pep:`578`) when creating the output file. The writer and the reader now accept any path-like object. Patch by Maurycy Pawłowski-Wieroński." +msgstr "" + +msgid ":gh:`149486`: :func:`tarfile.data_filter` now validates link targets using the same normalised value that is written to disk, strips trailing separators from the member name when resolving a symlink's directory, and rejects link members that would replace the destination directory itself. This closes several path-traversal bypasses of the ``data`` extraction filter." +msgstr "" + +msgid ":gh:`149079`: Fix a potential denial of service in :func:`unicodedata.normalize`. The canonical ordering step of Unicode normalization used a quadratic-time insertion sort for reordering combining characters, which could be exploited with crafted input containing many combining characters in non-canonical order. Replaced with a linear-time counting sort for long runs." +msgstr "" + +msgid ":gh:`149018`: Improved protection against XML hash-flooding attacks in :mod:`xml.parsers.expat` and :mod:`xml.etree.ElementTree` when Python is compiled with libExpat 2.8.0 or later." +msgstr "" + +msgid ":gh:`150374`: Fix double release of the import lock on lazy import reification errors." +msgstr "" + +msgid ":gh:`149156`: Fix an intermittent crash after :func:`os.fork` when perf trampoline profiling is enabled and the child returns through trampoline frames inherited from the parent process." +msgstr "" + +msgid ":gh:`149449`: Fix a use-after-free crash when the :mod:`unicodedata` module was removed from :data:`sys.modules` and garbage-collected between calls that decode ``\\N{...}`` escapes or use the ``namereplace`` codec error handler." +msgstr "" + +msgid ":gh:`150107`: :mod:`asyncio`: ``sendfile()`` and ``sock_sendfile()`` event loop methods now call ``file.seek(offset)`` if *file* has a ``seek()`` method, even if *offset* is ``0`` (default value)." +msgstr "" + +msgid ":gh:`150146`: Fix a crash on a complex type variable substitution." +msgstr "" + +msgid "``from typing import TypeVar; memoryview[TypeVar(\"\")][*typing.Mapping[..., ...]]`` used to fail due to missing ``NULL`` check on ``_unpack_args`` C function call." +msgstr "" + +msgid ":gh:`148587`: :py:attr:`sys.lazy_modules` is now a set instead of a dict as initially spelled out in PEP 810." +msgstr "" + +msgid ":gh:`150042`: Fix refleak in queue.SimpleQueue.put if memory allocation fails." +msgstr "" + +msgid ":gh:`149590`: Fix crash when faulthandler is imported more than once." +msgstr "" + +msgid ":gh:`149816`: Fix a race condition in ``_PyBytes_FromList`` in free-threading mode." +msgstr "" + +msgid ":gh:`149816`: Fix a race condition in :class:`memoryview` with free-threading." +msgstr "" + +msgid ":gh:`149807`: Fix ``hash(frozendict)``: compute the hash of each ``(key, value)`` pair correctly. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`149738`: :mod:`sqlite3`: Disallow removing ``row_factory`` and ``text_factory`` attributes of a connection to prevent a crash on a query." +msgstr "" + +msgid ":gh:`139808`: Add branch protections for AArch64 (BTI/PAC) in assembly code used by :option:`-X perf_jit <-X>` (Linux perf profiler integration)." +msgstr "" + +msgid ":gh:`149676`: Fix ``frozendict | frozendict`` hash." +msgstr "" + +msgid ":gh:`148829`: :class:`sentinel` objects now support a ``repr=`` argument and their :attr:`~sentinel.__module__` attribute is writable." +msgstr "" + +msgid ":gh:`149642`: Allow imports inside ``exec()`` calls within functions under ``PYTHON_LAZY_IMPORTS=all``." +msgstr "" + +msgid ":gh:`144957`: Fix lazy ``from`` imports of module attributes provided by module-level ``__getattr__``." +msgstr "" + +msgid ":gh:`149459`: Fix a crash in the JIT optimizer when a specialized ``LOAD_SPECIAL`` guard deoptimized after inserting the synthetic ``NULL`` stack entry." +msgstr "" + +msgid ":gh:`148450`: Fix ``abc.register()`` so it invalidates type version tags for registered classes." +msgstr "" + +msgid ":gh:`150685`: Update bundled pip to 26.1.2" +msgstr "" + +msgid ":gh:`150228`: The new :class:`site.StartupState` class lets callers batch-process :pep:`829` startup configuration files across multiple site directories before any startup code runs, with public :meth:`~site.StartupState.addsitedir`, :meth:`~site.StartupState.addusersitepackages`, :meth:`~site.StartupState.addsitepackages`, and :meth:`~site.StartupState.process` methods. The signature of :func:`site.addsitedir` is unchanged from Python 3.14. The :data:`!defer_processing_start_files` argument and the ``process_startup_files()`` function added earlier in the 3.15 cycle have been removed; use :class:`!site.StartupState` instead." +msgstr "" + +msgid ":gh:`150406`: Fix a possible crash occurring during :mod:`socket` module initialization when the system is out of memory on platforms without a reentrant ``gethostbyname``." +msgstr "" + +msgid ":gh:`150372`: :mod:`readline`: Fix a potential crash during tab completion caused by an out-of-memory error during module initialization." +msgstr "" + +msgid ":gh:`150157`: Fix a crash in free-threaded builds that occurs when pickling by name objects without a ``__module__`` attribute while :data:`sys.modules` is concurrently being modified." +msgstr "" + +msgid ":gh:`150175`: Fix race condition in :class:`unittest.mock.ThreadingMock` where concurrent calls could lose increments to ``call_count`` and other attributes due to a missing lock in ``_increment_mock_call``." +msgstr "" + +msgid ":gh:`84353`: Preserve non-UTF-8 encoded filenames when appending to a :class:`zipfile.ZipFile`. Previously, non-ASCII names stored in a legacy encoding (without the UTF-8 flag bit set) could be corrupted when the central directory was rewritten: they were decoded as cp437 and then re-stored as UTF-8." +msgstr "" + +msgid ":gh:`149189`: Revert the changes to :mod:`pprint` defaults. Patch by Hugo van Kemenade." +msgstr "" + +msgid ":gh:`149995`: Update various docstrings in :mod:`typing`." +msgstr "" + +msgid ":gh:`88726`: The :mod:`email` package now uses standard MIME charset names \"gb2312\" and \"big5\" instead of non-standard names \"eucgb2312_cn\" and \"big5_tw\"." +msgstr "" + +msgid ":gh:`149571`: Fix the C implementation of :meth:`xml.etree.ElementTree.Element.itertext`: it no longer emits text for comments and processing instructions." +msgstr "" + +msgid ":gh:`149921`: Fix reference leaks in error paths of the :mod:`!_interpchannels` and :mod:`!_interpqueues` extension modules." +msgstr "" + +msgid ":gh:`142349`: Add :keyword:`lazy` to the list of support topic by :func:`help`." +msgstr "" + +msgid ":gh:`149819`: Fix regression in :func:`site.addsitedir` where ``.pth`` files were no longer processed in Python subprocesses. This happened because :func:`site.main` seeded ``known_paths`` with entries inherited from the parent process, causing ``addsitedir`` to skip ``.pth`` processing." +msgstr "" + +msgid ":gh:`149816`: Fix a race condition in ``_random.Random.__init__`` method in free-threading mode." +msgstr "" + +msgid ":gh:`149801`: Add IANA registered names and aliases with leading zeros before number (like IBM00858, CP00858, IBM01140, CP01140) for corresponding codecs." +msgstr "" + +msgid ":gh:`149718`: Coalesce consecutive identical stack frames in Tachyon, so aggregating collectors (pstats, collapsed, flamegraph, gecko) receive one collect. Improves sample rate 3x, error rate and missed rate drop by 70%. Patch by Maurycy Pawłowski-Wieroński." +msgstr "" + +msgid ":gh:`149701`: Fix bad return code from Lib/venv/bin/activate if hashing is disabled" +msgstr "" + +msgid ":gh:`149504`: Fix :func:`site.addsitedir` to allow re-entrant calls from within startup files. Previously, a ``.pth`` file containing an ``import`` line that called :func:`site.addsitedir` (or a ``.start`` entry point doing the same) could crash with ``RuntimeError: dictionary changed size during iteration`` during site initialization, breaking tools such as ``uv run --with``." +msgstr "" + +msgid ":gh:`149584`: Fix excessive overhead in the Tachyon profiler when inspecting a remote process by avoiding repeated remote page-cache scans, batching predicted remote reads, and reusing cached profiler result objects. Patch by Pablo Galindo and Maurycy Pawłowski-Wieroński." +msgstr "" + +msgid ":gh:`139489`: Add :func:`xml.is_valid_text` to ``xml.__all__``." +msgstr "" + +msgid ":gh:`149614`: Fix a regression that broke the ability to deepcopy :class:`argparse.ArgumentParser` instances." +msgstr "" + +msgid ":gh:`112821`: In the REPL, autocompletion might run arbitrary code in the getter of a descriptor. If that getter raised an exception, autocompletion would fail to present any options for the entire object. Autocompletion now works as expected for these objects." +msgstr "" + +msgid ":gh:`149534`: Fix merging of :class:`collections.defaultdict` and :class:`frozendict`." +msgstr "" + +msgid ":gh:`149388`: Make :class:`!asyncio.windows_utils.PipeHandle` closing idempotent." +msgstr "" + +msgid ":gh:`149489`: Fix :mod:`~xml.etree.ElementTree` serialization to HTML. The content of comments, processing instructions and elements \"xmp\", \"iframe\", \"noembed\", \"noframes\", and \"plaintext\" is no longer escaped. The \"plaintext\" element no longer have the closing tag. Add support of empty attributes (with value ``None``)." +msgstr "" + +msgid ":gh:`149056`: Fix :func:`json.load` not forwarding the *array_hook* argument to :func:`json.loads`. Patch by Thomas Kowalski." +msgstr "" + +msgid ":gh:`149046`: :mod:`io`: Fix :class:`io.StringIO` serialization: no longer call ``str(obj)`` on :class:`str` subclasses. Patch by Thomas Kowalski." +msgstr "" + +msgid ":gh:`148441`: :mod:`xml.parsers.expat`: prevent a crash in :meth:`~xml.parsers.expat.xmlparser.CharacterDataHandler` when the character data size exceeds the parser's :attr:`buffer size `." +msgstr "" + +msgid ":gh:`146452`: Fix segfault in :mod:`pickle` when pickling a dictionary concurrently mutated by another thread in the free-threaded build." +msgstr "" + +msgid ":gh:`86533`: The :func:`os.makedirs` function and :meth:`pathlib.Path.mkdir` method now have a *parent_mode* parameter to specify the mode for intermediate directories when creating parent directories. This allows one to match the behavior from Python 3.6 and earlier for :func:`os.makedirs`." +msgstr "" + +msgid ":gh:`134261`: zip: On reproducible builds, ZipFile uses UTC instead of the local time when writing file datetimes to avoid underflows." +msgstr "" + +msgid ":gh:`133998`: Fix :exc:`struct.error` exception when creating a file with :class:`gzip.GzipFile` or compressing data with :func:`gzip.compress` if the system time is outside the range 00:00:00 UTC, January 1, 1970 through 06:28:15 UTC, February 7, 2106, or explicitly passed *mtime* argument is outside the range ``0`` to ``2**32-1``." +msgstr "" + +msgid ":gh:`128110`: Fix bug in the parsing of :mod:`email` address headers that could result in extraneous spaces in the decoded text when using a modern email policy. Space between pairs of adjacent :rfc:`2047` encoded-words is now ignored, per section 6.2 (and consistent with existing parsing of unstructured headers like *Subject*)." +msgstr "" + +msgid ":gh:`107398`: Fix :mod:`tarfile` stream mode exception when process the file with the gzip extra field." +msgstr "" + +msgid ":gh:`121109`: Fix :mod:`tarfile` performance issue when reading archives in streaming mode (e.g. ``r|*``)." +msgstr "" + +msgid ":issue:`45509`: Gzip headers are now checked for corrupted NAME, COMMENT and HCRC fields." +msgstr "" + +msgid ":gh:`150387`: Fix hang in ``test.test_profiling.test_sampling_profiler.test_live_collector_ui.TestLiveModeErrors.test_run_failed_script_live`` on slow buildbots. The test now always queues a final ``q`` keystroke so the live TUI loop exits even when the profiler collects enough samples to enter the post-finished input loop." +msgstr "" + +msgid ":gh:`149776`: Fix test_socket on Linux kernel 7.1 and newer: skip UDP Lite tests if it's not supported. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`148294`: Corrected the use of ``AC_PATH_TOOL`` in ``configure.ac`` to allow a C++ compiler to be found on :envvar:`!PATH`." +msgstr "" + +msgid ":gh:`148260`: On Linux when Python is linked to the musl C library, use a thread stack size of at least 1 MiB instead of musl default which is 128 kiB. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`149786`: Fixes virtual environment launchers on Windows free-threaded builds." +msgstr "" + +msgid ":gh:`124111`: Updated Windows builds to use Tcl/Tk 9.0.3." +msgstr "" + +msgid ":gh:`138489`: Windows distributions now include a :file:`build-details.json` file (see :pep:`739`). The legacy installer does not install it, but all other distributions from python.org and all preset configurations in the ``PC\\layout`` script will include one." +msgstr "" + +msgid ":gh:`149029`: Update Windows installer to ship with SQLite 3.53.1." +msgstr "" + +msgid ":gh:`150644`: When system logging is enabled (with ``config.use_system_logger``, messages are now tagged as public. This allows the macOS 26 system logger to view messages without special configuration." +msgstr "" + +msgid ":gh:`149029`: Update macOS installer to ship with SQLite version 3.53.1." +msgstr "" + +msgid ":gh:`150258`: Update the tooltip on the Tachyon flame graph to show both absolute and relative percentages." +msgstr "" + +msgid ":gh:`149725`: Add :c:func:`PySentinel_CheckExact` for exact :class:`sentinel` type tests to accompany the existing :c:func:`PySentinel_Check`." +msgstr "" + +msgid ":gh:`145235`: Made :c:func:`PyDict_AddWatcher`, :c:func:`PyDict_ClearWatcher`, :c:func:`PyDict_Watch`, and :c:func:`PyDict_Unwatch` thread-safe on the :term:`free threaded ` build." +msgstr "" + +msgid "Python 3.15.0 beta 1" +msgstr "" + +msgid "*Release date: 2026-05-07*" +msgstr "" + +msgid ":gh:`149254`: Update Android and iOS installer to use OpenSSL 3.5.6." +msgstr "" + +msgid ":gh:`149017`: Update bundled `libexpat `_ to version 2.8.0." +msgstr "" + +msgid ":gh:`148252`: Fixed string table and sample record bounds checks in :mod:`!_remote_debugging` when decoding certain ``.pyb`` inputs on 32-bit builds. Patch by Maurycy Pawłowski-Wieroński." +msgstr "" + +msgid ":gh:`90309`: Base64-encode values when embedding cookies to JavaScript using the :meth:`http.cookies.BaseCookie.js_output` method to avoid injection and escaping." +msgstr "" + +msgid ":gh:`148808`: Added buffer boundary check when using ``nbytes`` parameter with :meth:`!asyncio.AbstractEventLoop.sock_recvfrom_into`. Only relevant for Windows and the :class:`asyncio.ProactorEventLoop`." +msgstr "" + +msgid ":gh:`148395`: Fix a dangling input pointer in :class:`lzma.LZMADecompressor`, :class:`bz2.BZ2Decompressor`, and internal :class:`!zlib._ZlibDecompressor` when memory allocation fails with :exc:`MemoryError`, which could let a subsequent :meth:`!decompress` call read or write through a stale pointer to the already-released caller buffer." +msgstr "" + +msgid ":gh:`148252`: Fixed stack depth calculation in :mod:`!_remote_debugging` when decoding certain ``.pyb`` inputs on 32-bit builds. Issue originally identified and diagnosed by Tristan Madani (@TristanInSec on GitHub)." +msgstr "" + +msgid ":gh:`148178`: Hardened :mod:`!_remote_debugging` by validating remote debug offset tables before using them to size memory reads or interpret remote layouts." +msgstr "" + +msgid ":gh:`148169`: A bypass in :mod:`webbrowser` allowed URLs prefixed with ``%action`` to pass the dash-prefix safety check." +msgstr "" + +msgid ":gh:`146581`: Fix vulnerability in :func:`shutil.unpack_archive` for ZIP files on Windows which allowed to write files outside of the destination tree if the patch in the archive contains a Windows drive prefix. Now such invalid paths will be skipped. Files containing \"..\" in the name (like \"foo..bar\") are no longer skipped." +msgstr "" + +msgid ":gh:`137586`: Fix a PATH-injection vulnerability in :mod:`webbrowser` on macOS where ``osascript`` was invoked without an absolute path. The new :class:`!MacOS` class uses ``/usr/bin/open`` directly, eliminating the dependency on ``osascript`` entirely." +msgstr "" + +msgid ":gh:`146333`: Fix quadratic backtracking in :class:`configparser.RawConfigParser` option parsing regexes (``OPTCRE`` and ``OPTCRE_NV``). A crafted configuration line with many whitespace characters could cause excessive CPU usage." +msgstr "" + +msgid ":gh:`146211`: Reject CR/LF characters in tunnel request headers for the HTTPConnection.set_tunnel() method." +msgstr "" + +msgid ":gh:`148940`: Revert the process size based deferral of garbage collection (:gh:`133464`). The performance issue this change resolves is also fixed by :gh:`142562`. This approach has the problem that process size as seen by the OS (e.g. the resident size or RSS) does not immediately decrease after cyclic garbage is freed since mimalloc defers returning memory of the OS. This change applies to the free-threaded GC only." +msgstr "" + +msgid ":gh:`149243`: Check for recursion limits in ``CALL_ALLOC_AND_ENTER_INIT`` opcode." +msgstr "" + +msgid ":gh:`126910`: Add support for unwinding JIT frames using GNU backtrace. Patch by Diego Russo and Pablo Galindo" +msgstr "" + +msgid ":gh:`149171`: Allow assignment to the ``__module__`` attribute of :class:`typing.TypeAliasType` instances." +msgstr "" + +msgid ":gh:`149122`: Fix a crash in optimized calls to :func:`all`, :func:`any`, :func:`tuple`, :func:`list`, and :func:`set` with an async generator expression argument (for example, ``tuple(await x for x in y)``). These calls now correctly raise ``TypeError`` instead of crashing." +msgstr "" + +msgid ":gh:`149049`: Fix stack underflow for ``BINARY_OP`` in tier 2." +msgstr "" + +msgid ":gh:`83065`: Fix a deadlock that could occur when one thread is importing a submodule (for example ``import pkg.sub.mod``) while another thread is importing one of its parent packages (for example ``import pkg.sub``) and that parent's ``__init__.py`` itself imports the submodule. The import system now acquires module locks in hierarchical (parent-before-child) order so the two threads serialise instead of raising ``_DeadlockError``." +msgstr "" + +msgid ":gh:`113956`: Fix a data race in :func:`sys.intern` in the free-threaded build when interning a string owned by another thread. An interned copy owned by the current thread is used instead when it is not safe to immortalize the original." +msgstr "" + +msgid ":gh:`148850`: Fix the memory sanitizer false positive in :func:`os.getrandom`." +msgstr "" + +msgid ":gh:`148820`: Fix a race in :c:type:`!_PyRawMutex` on the free-threaded build where a ``Py_PARK_INTR`` return from ``_PySemaphore_Wait`` could let the waiter destroy its semaphore before the unlocking thread's ``_PySemaphore_Wakeup`` completed, causing a fatal ``ReleaseSemaphore`` error." +msgstr "" + +msgid ":gh:`148829`: Add :class:`sentinel`, implementing :pep:`661`. PEP by Tal Einat; patch by Jelle Zijlstra." +msgstr "" + +msgid ":gh:`146270`: Fix a sequential consistency bug in ``structmember.c``." +msgstr "" + +msgid ":gh:`148766`: The interpreter help (such as ``python --help``) is now in color. Patch by Hugo van Kemenade." +msgstr "" + +msgid ":gh:`148571`: Fix a crash in the JIT optimizer when specialized opcode families inherited incompatible recorded operand layouts." +msgstr "" + +msgid ":gh:`148653`: Forbid :mod:`marshalling ` recursive code objects, :class:`slice` and :class:`frozendict` objects which cannot be correctly unmarshalled." +msgstr "" + +msgid ":gh:`142516`: Forward-port the generational cycle garbage collector to the default 3.15 build, replacing the incremental collector while leaving the free-threaded collector unchanged." +msgstr "" + +msgid ":gh:`146462`: Added ``PyTypeObject.tp_basicsize``, ``PyTypeObject.tp_dictoffset``, and ``PyHeapTypeObject.ht_cached_keys`` offsets to :c:type:`!_Py_DebugOffsets` to support version-independent read-only dict introspection tools." +msgstr "" + +msgid ":gh:`145239`: Unary plus is now accepted in :keyword:`match` literal patterns, mirroring the existing support for unary minus. Patch by Bartosz Sławecki." +msgstr "" + +msgid ":gh:`148515`: Fix a bug in the JIT optimizer reading operands for uops with multiple caches." +msgstr "" + +msgid ":gh:`148390`: Fix an undefined behavior in :class:`memoryview` when using the native boolean format (``?``) in :meth:`~memoryview.cast`. Previously, on some common platforms, calling ``memoryview(b).cast(\"?\").tolist()`` incorrectly returned ``[False]`` instead of ``[True]`` for any even byte *b*. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`148418`: Fix a possible reference leak in a corrupted ``TYPE_CODE`` marshal stream." +msgstr "" + +msgid ":gh:`148393`: Fix data races between :c:func:`PyDict_Watch` / :c:func:`PyDict_Unwatch` and concurrent dict mutation in the :term:`free-threaded build`." +msgstr "" + +msgid ":gh:`148398`: Fix a bug in the JIT optimizer where class attribute loads were not invalidated after type mutation." +msgstr "" + +msgid ":gh:`146527`: Add a ``GCMonitor`` class with a ``get_gc_stats`` method to the :mod:`!_remote_debugging` module to allow reading GC statistics from an external Python process without requiring the full ``RemoteUnwinder`` functionality. Patch by Sergey Miryanov and Pablo Galindo." +msgstr "" + +msgid ":gh:`148284`: Fix high stack consumption in Python's interpreter loop on Clang 22 by setting function limits for inlining when building with computed gotos." +msgstr "" + +msgid ":gh:`148037`: Remove critical section from :c:func:`!PyCode_Addr2Line` in free-threading." +msgstr "" + +msgid ":gh:`115802`: Improve JIT code generation on Linux AArch64 by reducing the indirect call to external symbols. Patch by Diego Russo." +msgstr "" + +msgid ":gh:`148189`: Repaired undercount of bytes in type-specific free lists reported by sys._debugmallocstats(). For types that participate in cyclic garbage collection, it was missing two pointers used by GC." +msgstr "" + +msgid ":gh:`148222`: Fix vectorcall support in :class:`types.GenericAlias` when the underlying type does not support the vectorcall protocol. Fix possible leaks in :class:`types.GenericAlias` and :class:`types.UnionType` in case of memory error." +msgstr "" + +msgid ":gh:`148208`: Fix recursion depth leak in :c:func:`PyObject_Print`" +msgstr "" + +msgid ":gh:`95004`: The specializing interpreter now specializes for :class:`enum.Enum` improving performance and scaling in free-threading. Patch by Kumar Aditya." +msgstr "" + +msgid ":gh:`149202`: Enable frame pointers by default for GCC-compatible CPython builds, including ``-mno-omit-leaf-frame-pointer``, ``-marm`` on 32-bit ARM, and/or ``-mbackchain`` on s390x platforms when the compiler supports them, so profilers and debuggers can unwind native interpreter frames more reliably. Users can pass :option:`--without-frame-pointers` to ``./configure`` to opt out." +msgstr "" + +msgid ":gh:`148014`: Accept a function name in :option:`-X presite <-X>` command line option and :envvar:`PYTHON_PRESITE` environment variable. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`147998`: Fixed a memory leak in interpreter helper calls so cleanup works when an operation falls across interpreter boundaries. Patch by Maurycy Pawłowski-Wieroński." +msgstr "" + +msgid ":gh:`146455`: Fix O(N²) compile-time regression in constant folding after it was moved from AST to CFG optimizer." +msgstr "" + +msgid ":gh:`146306`: Specialize float true division in the tier 2 optimizer with inplace mutation for uniquely-referenced operands." +msgstr "" + +msgid ":gh:`142186`: Global :mod:`sys.monitoring` events can now be turned on and disabled on a per code object basis. Returning ``DISABLE`` from a callback disables the event for the entire code object (for the current tool)." +msgstr "" + +msgid ":gh:`126910`: Add support for unwinding JIT frames using GDB. Patch by Diego Russo and Pablo Galindo." +msgstr "" + +msgid ":gh:`146031`: The unstable API _PyInterpreterState_SetEvalFrameFunc has a companion function _PyInterpreterState_SetEvalFrameAllowSpecialization to specify if specialization should be allowed. When this option is set to 1 the specializer will turn Python -> Python calls into specialized opcodes which the replacement interpreter loop can choose to respect and perform inlined dispatch." +msgstr "" + +msgid ":gh:`145278`: The :mod:`encodings` is now partially frozen, including the ``aliases`` and ``utf_8`` submodules." +msgstr "" + +msgid "The :mod:`linecache` is now frozen." +msgstr "" + +msgid ":gh:`134584`: Optimize and eliminate redundant ref-counting for ``MAKE_FUNCTION`` in the JIT." +msgstr "" + +msgid ":gh:`143886`: Reorder function annotations so positional-only arguments are returned before other arguments. This fixes how :func:`functools.singledispatch` registers functions with positional-only arguments." +msgstr "" + +msgid ":gh:`98894`: Restore ``function__entry`` and ``function__return`` DTrace/SystemTap probes that were broken since Python 3.11." +msgstr "" + +msgid ":gh:`116021`: Support for creating instances of abstract AST nodes from the :mod:`ast` module is deprecated and scheduled for removal in Python 3.20. Patch by Brian Schubert." +msgstr "" + +msgid ":gh:`137814`: Fix the ``__qualname__`` attribute of ``__annotate__`` functions on functions." +msgstr "" + +msgid ":gh:`137600`: :mod:`ast`: The constructors of AST nodes now raise a :exc:`TypeError` when a required argument is omitted or when a keyword argument that does not map to a field on the AST node is passed. These cases had previously raised a :exc:`DeprecationWarning` since Python 3.13. Patch by Brian Schubert." +msgstr "" + +msgid ":gh:`137293`: Fix :exc:`SystemError` when searching ELF Files in :func:`sys.remote_exec`." +msgstr "" + +msgid ":gh:`135357`: Add support for :data:`!socket.SO_PASSRIGHTS` on Linux." +msgstr "" + +msgid ":gh:`134690`: Removed deprecated in :pep:`626` since Python 3.12 :attr:`!codeobject.co_lnotab` from :class:`types.CodeType`." +msgstr "" + +msgid ":gh:`100239`: Specialize ``BINARY_OP`` for concatenation of lists and tuples, and propagate the result type through ``_BINARY_OP_EXTEND`` in the tier 2 optimizer so that follow-up type guards can be eliminated." +msgstr "" + +msgid ":gh:`148823`: Defer the import of ``_colorize`` in ``argparse`` until needed for coloring output." +msgstr "" + +msgid ":gh:`141560`: Add an *annotation_format* parameter to :func:`inspect.getfullargspec`." +msgstr "" + +msgid ":gh:`139489`: Add the :func:`xml.is_valid_text` function, which allows to check whether a string can be used in the XML document." +msgstr "" + +msgid ":gh:`142389`: Add backticks to stdlib argparse help to display in colour. Patch by Hugo van Kemenade." +msgstr "" + +msgid ":gh:`149377`: Update bundled pip to 26.1.1" +msgstr "" + +msgid ":gh:`142389`: Add backtick markup support in :mod:`argparse` option help text to highlight inline code when color output is enabled. Patch by Hugo van Kemenade." +msgstr "" + +msgid ":gh:`148675`: Remove ``F`` and ``D`` formats from :mod:`array` and :class:`memoryview`. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`149342`: Fix :mod:`!_remote_debugging` binary writing so that sampling a thread whose Python frame stack is empty (for example while it is in a C call or mid-syscall) no longer raises ``RuntimeError(\"Invalid stack encoding type\")``, and so that ``BinaryWriter.total_samples`` after :meth:`!finalize` or context-manager exit includes samples flushed from the RLE buffer. Patch by Maurycy Pawłowski-Wieroński." +msgstr "" + +msgid ":gh:`149010`: The ``inspect`` module CLI now reports as much information as it has available for non-source modules when ``--details`` is specified, and provides an error message rather than a traceback when ``--details`` is omitted. It also reports improved information when the given target location is not the target's defining location and when the given target is a data value rather than a class or function definition." +msgstr "" + +msgid ":gh:`146609`: Use :mod:`argparse` for colour help :mod:`timeit` CLI. Patch by Hugo van Kemenade." +msgstr "" + +msgid ":gh:`142389`: Add backticks for colour to regrtest and pdb's help description. Patch by Hugo van Kemenade." +msgstr "" + +msgid ":gh:`144384`: Lazily import :mod:`!_colorize`. Patch by Hugo van Kemenade." +msgstr "" + +msgid ":gh:`149321`: Fix import cycles exposed by running standard library modules with ``-X lazy_imports=none``." +msgstr "" + +msgid ":gh:`145378`: Generate consistent colors for :mod:`pdb` commands in :mod:`pdb` REPL." +msgstr "" + +msgid ":gh:`149296`: Add a ``dump`` subcommand to :mod:`profiling.sampling` that prints a single traceback-style snapshot of a running process's Python stack, including per-thread status, source line highlighting, optional bytecode opcode names, and async-aware task reconstruction. Patch by Pablo Galindo." +msgstr "" + +msgid ":gh:`143231`: A *module* attribute has been added to :class:`!warnings.WarningMessage`." +msgstr "" + +msgid ":gh:`148675`: :mod:`ctypes`: Change the :py:attr:`~ctypes._SimpleCData._type_` of :class:`~ctypes.c_float_complex`, :class:`~ctypes.c_double_complex` and :class:`~ctypes.c_longdouble_complex` from ``F``, ``D`` and ``G`` to ``Zf``, ``Zd`` and ``Zg`` for compatibility with numpy. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`148675`: The :data:`array.typecodes` type changed from :class:`str` to :class:`tuple` to support type codes longer than 1 character (``Zf`` and ``Zd``). Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`149221`: Catch rare math domain error for :func:`random.binomialvariate`." +msgstr "" + +msgid ":gh:`149231`: In :mod:`tomllib`, the number of parts in TOML keys is now limited." +msgstr "" + +msgid ":gh:`143231`: :func:`unittest.TestCase.assertWarns` and :func:`unittest.TestCase.assertWarnsRegex` no longer swallow warnings that do not match the specified category or regex. Nested context managers are now supported." +msgstr "" + +msgid ":gh:`149214`: Fix :mod:`!_remote_debugging` misreading non-ASCII Unicode strings (Latin-1, BMP and non-BMP) from a remote process. Filenames and function names that contain non-ASCII characters are now reported correctly in stack traces, the sampling profiler, and :mod:`asyncio` task introspection." +msgstr "" + +msgid ":gh:`149189`: :mod:`pprint` now uses modern defaults: ``indent=4`` and ``width=88``, and the default ``compact=False`` output is now formatted similar to pretty-printed :func:`json.dumps`, with opening parentheses and brackets followed by a newline and the contents indented by one level. The *expand* parameter, added in 3.15.0a8, has been removed; ``compact=False`` (the default) now produces the former ``expand=True`` layout. Patch by Hugo van Kemenade." +msgstr "" + +msgid ":gh:`149173`: Fix inverted :envvar:`PYTHON_BASIC_REPL` environment check in ``pdb._pyrepl_available``." +msgstr "" + +msgid ":gh:`149117`: Fix :func:`runpy.run_module` and :func:`runpy.run_path` to set the :attr:`~ImportError.name` attribute on the :exc:`ImportError` they raise." +msgstr "" + +msgid ":gh:`149148`: :mod:`ensurepip`: Upgrade bundled pip to 26.1. This version fixes the :cve:`2026-3219` vulnerability. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`149009`: Validate that :mod:`profiling.sampling` binary profiles do not contain more unique (thread, interpreter) pairs than declared in the header. Patch by Maurycy Pawłowski-Wieroński." +msgstr "" + +msgid ":gh:`148292`: :mod:`ssl`: Update :class:`ssl.SSLSocket` and :class:`ssl.SSLObject` for OpenSSL 4. The classes now remember if they get a :exc:`ssl.SSLEOFError`. In this case, following :meth:`~ssl.SSLSocket.read`, :meth:`!sendfile`, :meth:`~ssl.SSLSocket.write`, and :meth:`~ssl.SSLSocket.do_handshake` calls raise :exc:`ssl.SSLEOFError` without calling the underlying OpenSSL function. Thanks to that, :class:`ssl.SSLSocket` behaves the same on all OpenSSL versions on EOF. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`149085`: Add a *max_threads* keyword argument to :func:`faulthandler.dump_traceback`, :func:`faulthandler.dump_traceback_later`, :func:`faulthandler.enable`, and :func:`faulthandler.register`." +msgstr "" + +msgid ":gh:`148641`: :func:`pkgutil.resolve_name` gets a new optional, keyword-only argument called ``strict``. The default is ``False`` for backward compatibility." +msgstr "" + +msgid ":gh:`148093`: Fix an out-of-bounds read of one byte in :func:`binascii.a2b_uu`. Raise :exc:`binascii.Error`, instead of reading past the buffer end." +msgstr "" + +msgid ":gh:`149083`: :data:`dataclasses.MISSING` and :data:`dataclasses.KW_ONLY` are now instances of :class:`sentinel`." +msgstr "" + +msgid ":gh:`148914`: Fix memoization of in-band :class:`~pickle.PickleBuffer` in the Python implementation of :mod:`pickle`. Previously, identical :class:`!PickleBuffer`\\ s did not preserve identity, and empty writable :class:`!PickleBuffer` memoized an empty bytearray object in place of ``b''``, so the following references to ``b''`` were unpickled as an empty bytearray object." +msgstr "" + +msgid ":gh:`149026`: Add colour to :mod:`pickletools` CLI output. Patch by Hugo van Kemenade." +msgstr "" + +msgid ":gh:`148991`: Add colour to :mod:`tokenize` CLI output. Patch by Hugo van Kemenade." +msgstr "" + +msgid ":gh:`138907`: Support :rfc:`9309` in :mod:`urllib.robotparser`." +msgstr "" + +msgid ":gh:`148981`: Add *color* parameter to :func:`ast.dump`." +msgstr "" + +msgid ":gh:`148849`: Deprecate :meth:`http.cookies.Morsel.js_output` and :meth:`http.cookies.BaseCookie.js_output`, which will be removed in Python 3.19. Use :meth:`http.cookies.Morsel.output` or :meth:`http.cookies.BaseCookie.output` instead." +msgstr "" + +msgid ":gh:`146311`: Add a *canonical* keyword-only parameter to the base32, base64, base85, ascii85, and Z85 decoders in :mod:`base64` and :mod:`binascii`. When true, encodings with non-zero padding bits (base32/64) or non-canonical encodings (base85/ascii85) are rejected. Single-character final groups in :func:`binascii.a2b_ascii85` and :func:`binascii.a2b_base85` are now always rejected as encoding violations, regardless of *canonical*; previously they were silently ignored and produced no output bytes." +msgstr "" + +msgid ":gh:`148947`: Fix crash in :deco:`dataclasses.dataclass` with ``slots=True`` that occurred when a function found within the class had an empty ``__class__`` cell." +msgstr "" + +msgid ":gh:`148680`: ``ForwardRef`` objects that contain internal names to represent known objects now show the ``type_repr`` of the known object rather than the internal ``__annotationlib_name_x__`` name when evaluated as strings." +msgstr "" + +msgid ":gh:`124397`: The threading module added tooling to support concurrent iterator access: :class:`threading.serialize_iterator`, :func:`threading.synchronized_iterator`, and :func:`threading.concurrent_tee`." +msgstr "" + +msgid ":gh:`148801`: :mod:`xml.etree.ElementTree`: Fix a crash in :meth:`Element.__deepcopy__ ` on deeply nested trees." +msgstr "" + +msgid ":gh:`148735`: :mod:`xml.etree.ElementTree`: Fix a use-after-free in :meth:`Element.findtext ` when the element tree is mutated concurrently during the search." +msgstr "" + +msgid ":gh:`148740`: Fix usage for :mod:`uuid` command-line interface to support a custom namespace be provided for uuid3 and uuid5." +msgstr "" + +msgid ":gh:`148688`: :mod:`bz2`, :mod:`compression.zstd`, :mod:`lzma`, :mod:`zlib`: Fix a double free on memory allocation failure. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`148675`: :mod:`array`, :mod:`struct`: Add support for ``Zd`` and ``Zf`` formats for double complex and float complex. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`148651`: Fix reference leak in :class:`compression.zstd.ZstdDecompressor` when an invalid option key is passed." +msgstr "" + +msgid ":gh:`148641`: :pep:`829` (package startup configuration files) implements a new format ``.start`` parallel to ``.pth`` files, to replace ``import`` lines in the latter." +msgstr "" + +msgid ":gh:`148639`: Implement :pep:`800`, adding the :deco:`typing.disjoint_base` decorator. Patch by Jelle Zijlstra." +msgstr "" + +msgid ":gh:`148615`: Fix :mod:`pdb` to accept standard -- end of options separator. Reported by haampie. Patched by Shrey Naithani." +msgstr "" + +msgid ":gh:`146553`: Fix infinite loop in :func:`typing.get_type_hints` when ``__wrapped__`` forms a cycle. Patch by Shamil Abdulaev." +msgstr "" + +msgid ":gh:`148599`: Update the :mod:`socket` module's WSA error messages to match official documentation." +msgstr "" + +msgid ":gh:`148508`: An intermittent timing error when running SSL tests on iOS has been resolved." +msgstr "" + +msgid ":gh:`144881`: :mod:`asyncio` debugging tools (``python -m asyncio ps`` and ``pstree``) now retry automatically on transient errors that can occur when attaching to a process under active thread delegation. The number of retries can be controlled with the ``--retries`` flag. Patch by Bartosz Sławecki." +msgstr "" + +msgid ":gh:`148518`: If an email containing an address header that ended in an open double quote was parsed with a non-``compat32`` policy, accessing the ``username`` attribute of the mailbox accessed through that header object would result in an ``IndexError``. It now correctly returns an empty string as the result." +msgstr "" + +msgid ":gh:`148464`: Add missing ``__ctype_le/be__`` attributes for :class:`~ctypes.c_float_complex` and :class:`~ctypes.c_double_complex`. Patch by Sergey B Kirpichev." +msgstr "" + +msgid ":gh:`148370`: :mod:`configparser`: prevent quadratic behavior when a :exc:`~configparser.ParsingError` is raised after a parser fails to parse multiple lines. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`121190`: ``importlib.resources.files()`` now emits a more meaningful error message when module spec is None (as found in some ``__main__`` modules)." +msgstr "" + +msgid ":gh:`127012`: ``importlib.abc.Traversable.read_text`` now allows/solicits an ``errors`` parameter." +msgstr "" + +msgid ":gh:`137855`: Improve import time of :mod:`dataclasses` module by lazy importing :mod:`re` and :mod:`copy` modules." +msgstr "" + +msgid ":gh:`148352`: Add more color to :mod:`calendar`'s CLI output. Patch by Hugo van Kemenade." +msgstr "" + +msgid ":gh:`148254`: Use singular \"sec\" instead of \"secs\" in :mod:`timeit` verbose output for consistency with other time units." +msgstr "" + +msgid ":gh:`130472`: Integrate fancycompleter with import completions." +msgstr "" + +msgid ":gh:`148241`: :mod:`json`: Fix serialization: no longer call ``str(obj)`` on :class:`str` subclasses. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`148225`: The :mod:`profiling.sampling` ``replay`` command now rejects non-binary profile files with a clear error explaining that replay only accepts files created with ``--binary``." +msgstr "" + +msgid ":gh:`148192`: ``email.generator.Generator._make_boundary`` could fail to detect a duplicate boundary string if linesep was not \\n. It now correctly detects boundary strings when linesep is \\r\\n as well." +msgstr "" + +msgid ":gh:`148207`: :class:`typing.TypeVarTuple` now accepts ``bound``, ``covariant``, ``contravariant``, and ``infer_variance`` parameters, matching the interface of :class:`typing.TypeVar` and :class:`typing.ParamSpec`." +msgstr "" + +msgid ":gh:`148100`: :term:`Soft deprecate ` :func:`re.match` and :meth:`re.Pattern.match` in favour of :func:`re.prefixmatch` and :meth:`re.Pattern.prefixmatch`. Patch by Hugo van Kemenade." +msgstr "" + +msgid ":gh:`147991`: Improve :mod:`tomllib` import time (up to 10x faster). Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`147957`: Guarantees that :meth:`collections.UserDict.popitem` will pop in the same order as the wrapped dictionary rather than an arbitrary order." +msgstr "" + +msgid ":gh:`146256`: The ``profiling.sampling`` module now supports JSONL output format via ``--jsonl``. Each run emits a newline-delimited JSON file that is sequentially parseable by external tools, scripts, and programmatic consumers. Patch by Maurycy Pawłowski-Wieroński." +msgstr "" + +msgid ":gh:`146609`: Add colour to :mod:`timeit` CLI output. Patch by Hugo van Kemenade." +msgstr "" + +msgid ":gh:`146563`: :mod:`xml.parsers.expat`: add an exception note when a custom Expat handler return value cannot be properly interpreted. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`137586`: Add :class:`!MacOS` to :mod:`webbrowser` for macOS, which opens URLs via ``/usr/bin/open`` instead of piping AppleScript to ``osascript``. Deprecate :class:`!MacOSXOSAScript` in favour of :class:`!MacOS`." +msgstr "" + +msgid ":gh:`146406`: Cross-language method suggestions are now shown for :exc:`AttributeError` on builtin types and their subclasses. For example, ``[].push()`` suggests ``append``, ``(1,2).append(3)`` suggests using a ``list``, ``None.keys()`` suggests expecting a ``dict``, and ``1.0.__or__`` suggests using an ``int``." +msgstr "" + +msgid ":gh:`146313`: Fix a deadlock in :mod:`multiprocessing`'s resource tracker where the parent process could hang indefinitely in :func:`os.waitpid` during interpreter shutdown if a child created via :func:`os.fork` still held the resource tracker's pipe open." +msgstr "" + +msgid ":gh:`146292`: Add colour to :mod:`~http.server.BaseHTTPRequestHandler` logs, as used by the :mod:`http.server` CLI. Patch by Hugo van Kemenade." +msgstr "" + +msgid ":gh:`145917`: Add MIME types for TTC and Haptics formats to :mod:`mimetypes`. (Contributed by Charlie Lin in :gh:`145918`.)" +msgstr "" + +msgid ":gh:`145846`: Fix memory leak in ``_lsprof`` when ``clear()`` is called during active profiling with nested calls. ``clearEntries()`` now walks the entire ``currentProfilerContext`` linked list instead of only freeing the top context." +msgstr "" + +msgid ":gh:`145831`: Fix :func:`!email.quoprimime.decode` leaving a stray ``\\r`` when ``eol='\\r\\n'`` by stripping the full *eol* string instead of one character." +msgstr "" + +msgid ":gh:`145378`: Use ``PyREPL`` as the default input console for :mod:`pdb`" +msgstr "" + +msgid ":gh:`145244`: Fixed a use-after-free in :mod:`json` encoder when a ``default`` callback mutates the dictionary being serialized." +msgstr "" + +msgid ":gh:`117716`: Fix :mod:`wave` writing of odd-sized ``data`` chunks by appending the required RIFF pad byte and correcting the RIFF chunk size field accordingly." +msgstr "" + +msgid ":gh:`145200`: :mod:`hashlib`: fix a memory leak when allocating or initializing an OpenSSL HMAC context fails." +msgstr "" + +msgid ":gh:`145056`: Add support for :class:`frozendict` in :meth:`dataclasses.asdict` and :meth:`dataclasses.astuple`." +msgstr "" + +msgid ":gh:`145105`: Fix crash in :mod:`csv` reader when iterating with a re-entrant iterator that calls :func:`next` on the same reader from within ``__next__``." +msgstr "" + +msgid ":gh:`130750`: Restore quoting of choices in :mod:`argparse` error messages for improved clarity and consistency with documentation." +msgstr "" + +msgid ":gh:`137855`: Reduce the import time of :mod:`dataclasses` module by ~20%." +msgstr "" + +msgid ":gh:`70647`: :meth:`~datetime.datetime.strptime` now raises :exc:`ValueError` when the format string contains ``%d`` without a year directive. Using ``%e`` without a year now emits a :exc:`DeprecationWarning`." +msgstr "" + +msgid ":gh:`105936`: Attempting to mutate non-field attributes of :mod:`dataclasses` with both *frozen* and *slots* being ``True`` now raises :class:`~dataclasses.FrozenInstanceError` instead of :class:`TypeError`. Their non-dataclass subclasses can now freely mutate non-field attributes, and the original non-slotted class can be garbage collected." +msgstr "" + +msgid ":gh:`142831`: Fix a crash in the :mod:`json` module where a use-after-free could occur if the object being encoded is modified during serialization." +msgstr "" + +msgid ":gh:`108411`: ``typing.IO`` and ``typing.BinaryIO`` method arguments are now positional-only." +msgstr "" + +msgid ":gh:`130273`: Fix traceback color output with Unicode characters." +msgstr "" + +msgid ":gh:`142307`: :mod:`imaplib`: deprecate support for :attr:`IMAP4.file `. This attribute was never meant to be part of the public interface and altering its value may result in unclosed files or other synchronization issues with the underlying socket. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`141449`: Improve tests and documentation for non-function callables as :term:`annotate functions `." +msgstr "" + +msgid ":gh:`140287`: The :mod:`asyncio` REPL now handles exceptions when executing :envvar:`PYTHONSTARTUP` scripts. Patch by Bartosz Sławecki." +msgstr "" + +msgid ":gh:`139489`: Add the :func:`xml.is_valid_name` function, which allows to check whether a string can be used as an element or attribute name in XML." +msgstr "" + +msgid ":gh:`75707`: Add optional ``mtime`` argument to :func:`tarfile.open`, for setting the ``mtime`` header field in ``.tar.gz`` archives." +msgstr "" + +msgid ":gh:`125862`: The :func:`contextlib.contextmanager` and :func:`contextlib.asynccontextmanager` decorators now work correctly with generators, coroutine functions, and async generators when the wrapped callables are used as decorators." +msgstr "" + +msgid ":gh:`135528`: :mod:`http.cookiejar`: add \"tv\", \"or\", \"nom\", \"sch\", and \"web\" to the default list of supported country code second-level domains." +msgstr "" + +msgid ":gh:`135056`: Add a ``-H`` or ``--header`` CLI option to :program:`python -m http.server`. Contributed by Anton I. Sipos." +msgstr "" + +msgid ":gh:`134551`: Add t-strings support to pprint functions" +msgstr "" + +msgid ":gh:`133956`: Fix bug where :func:`@dataclass ` wouldn't detect ``ClassVar`` fields if ``ClassVar`` was re-exported from a module other than :mod:`typing`." +msgstr "" + +msgid ":gh:`132631`: Fix \"I/O operation on closed file\" when parsing JSON Lines file with :mod:`JSON CLI `." +msgstr "" + +msgid ":gh:`108951`: :mod:`asyncio`: Add :meth:`TaskGroup.cancel ` which cancels unfinished tasks and exits the group without raising :exc:`asyncio.CancelledError`." +msgstr "" + +msgid ":gh:`123853`: Update the table of Windows language code identifiers (LCIDs) used by :func:`locale.getdefaultlocale` on Windows to protocol version 16.0 (2024-04-23)." +msgstr "" + +msgid ":gh:`122476`: The :mod:`email` module no longer incorrectly uses :rfc:`2047` encoding for a mailbox with non-ASCII characters in its local-part. Under a policy with :attr:`~email.policy.EmailPolicy.utf8` set ``False``, attempting to serialize such a message will now raise an :exc:`~email.errors.HeaderWriteError`. There is no valid 7-bit encoding for an internationalized local-part. Use :data:`email.policy.SMTPUTF8` (or another policy with ``utf8=True``) to correctly pass through the local-part as Unicode characters." +msgstr "" + +msgid ":gh:`83938`: The :mod:`email` module no longer incorrectly uses :rfc:`2047` encoding for a mailbox with non-ASCII characters in its domain. Under a policy with :attr:`~email.policy.EmailPolicy.utf8` set ``False``, attempting to serialize such a message will now raise an :exc:`~email.errors.HeaderWriteError`. Either apply an appropriate IDNA encoding to convert the domain to ASCII before serialization, or use :data:`email.policy.SMTPUTF8` (or another policy with ``utf8=True``) to correctly pass through the internationalized domain name as Unicode characters." +msgstr "" + +msgid ":gh:`81074`: The :mod:`email` module no longer treats email addresses with non-ASCII characters as defects when parsing a Unicode string or in the ``addr_spec`` parameter to :class:`email.headerregistry.Address`. :rfc:`5322` permits such addresses, and they were already supported when parsing bytes and in the Address ``username`` parameter." +msgstr "" + +msgid "The (undocumented) :exc:`!email.errors.NonASCIILocalPartDefect` is no longer used and should be considered deprecated." +msgstr "" + +msgid ":gh:`70039`: Fixed bug where :meth:`smtplib.SMTP.starttls` could fail if :meth:`smtplib.SMTP.connect` is called explicitly rather than implicitly." +msgstr "" + +msgid ":gh:`113471`: Allow :mod:`http.server` to set a default content-type when serving files with an unknown or missing extension." +msgstr "" + +msgid ":gh:`83281`: :mod:`email`: improve handling trailing garbage in address lists to avoid throwing AttributeError in certain edge cases" +msgstr "" + +msgid ":gh:`96894`: Do not turn echo off for subsequent commands in batch activators (``activate.bat`` and ``deactivate.bat``) of :mod:`venv`." +msgstr "" + +msgid ":gh:`148663`: Document that :class:`calendar.IllegalMonthError` is a subclass of both :exc:`ValueError` and :exc:`IndexError` since Python 3.12." +msgstr "" + +msgid ":gh:`146646`: Document that :func:`glob.glob`, :func:`glob.iglob`, :meth:`pathlib.Path.glob`, and :meth:`pathlib.Path.rglob` silently suppress :exc:`OSError` exceptions raised from scanning the filesystem." +msgstr "" + +msgid ":gh:`149425`: Increase time delta in ``test.test_zipfile.test_core.OtherTests.test_write_without_source_date_epoch``" +msgstr "" + +msgid ":gh:`148600`: Add OpenSSL 4.0.0 support to test configurations." +msgstr "" + +msgid ":gh:`149353`: Avoid unnecessary JIT-related rebuilds during ``make install`` after ``--enable-optimizations`` builds." +msgstr "" + +msgid ":gh:`149351`: Avoid possible broken macOS framework install names when DESTDIR is specified during builds." +msgstr "" + +msgid ":gh:`149252`: Update to WASI SDK 33." +msgstr "" + +msgid ":gh:`148690`: Windows free-threaded builds now output to a different default path with default filenames, for example, ``PCbuild/amd64t/python.exe`` rather than ``PCbuild/amd64/python3.15t.exe``. The ``PC/layout`` script has been updated to ensure compatibility of generated layouts." +msgstr "" + +msgid ":gh:`146475`: Block Apple Clang from being used to build the JIT as it ships without required LLVM tools." +msgstr "" + +msgid ":gh:`148644`: Errors during the PGO training job on Windows are no longer ignored, and a non-zero return code will cause the build to fail." +msgstr "" + +msgid ":gh:`148535`: No longer use the ``gcc -fprofile-update=atomic`` flag on i686. The flag has been added to fix a random GCC internal error on PGO build (:gh:`145801`) caused by corruption of profile data (.gcda files). The problem is that it makes the PGO build way slower (up to 47x slower) on i686. Since the GCC internal error was not seen on i686 so far, don't use ``-fprofile-update=atomic`` on i686 anymore. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`148483`: Use ``Py_GCC_ATTRIBUTE(unused)`` for stop_tracing label." +msgstr "" + +msgid ":gh:`148474`: Fixed compilation of :file:`Python/pystrhex.c` with older clang versions." +msgstr "" + +msgid ":gh:`146445`: The Android build tools have been moved to the Platforms folder." +msgstr "" + +msgid ":gh:`146264`: Fix static module builds on non-WASI targets by linking HACL dependencies as static libraries when ``MODULE_BUILDTYPE=static``, preventing duplicate ``_Py_LibHacl_*`` symbol errors at link time." +msgstr "" + +msgid ":gh:`138451`: Allow for custom LLVM path using ``LLVM_TOOLS_INSTALL_DIR`` during JIT build." +msgstr "" + +msgid ":gh:`133312`: Add a new ``./configure`` option :option:`--enable-static-libpython-for-interpreter` which, when used with :option:`--enable-shared`, continues to build the shared library but does not use it for the interpreter. Instead, libpython is statically linked into the interpreter, as if :option:`--enable-shared` had not been used. This allows you to do a single build and get a Python interpreter binary that does not use a shared library but also get a shared library for use by other programs." +msgstr "" + +msgid ":gh:`149254`: Updated bundled version of OpenSSL to 3.5.6." +msgstr "" + +msgid ":gh:`148690`: Non-freethreaded builds on Windows now support extensions linked to ``python3t.dll``, and will include a copy of that library in normal installs that references the non-freethreaded runtime." +msgstr "" + +msgid ":gh:`146458`: Fix incorrect REPL height and width tracking on console window resize on Windows." +msgstr "" + +msgid ":gh:`142295`: For Python macOS framework builds, update Info.plist files to be more compliant with current Apple guidelines. Original patch contributed by Martinus Verburg." +msgstr "" + +msgid ":gh:`149254`: Update macOS installer to use OpenSSL 3.5.6." +msgstr "" + +msgid ":gh:`94523`: Detect file if modified at local disk and prompt to ask refresh. Patch by Shixian Li." +msgstr "" + +msgid ":gh:`139551`: Support rendering :exc:`BaseExceptionGroup` in IDLE." +msgstr "" + +msgid ":gh:`89520`: Make IDLE extension configuration look at user config files, allowing user-installed extensions to have settings and key bindings defined in ~/.idlerc." +msgstr "" + +msgid ":gh:`149225`: :c:type:`PyCriticalSection` and related functions are added to the Stable ABI." +msgstr "" + +msgid ":gh:`149216`: :c:type:`PyType_WatchCallback` callbacks registered via :c:func:`PyType_AddWatcher` are now also invoked when a watched heap type is deallocated. Previously, type watchers were only notified of modifications, which could cause stale references when a type was freed and its address was reused." +msgstr "" + +msgid ":gh:`149101`: Implement :pep:`788`." +msgstr "" + +msgid ":gh:`149044`: Implement :pep:`820`: Unified slot system for the C API." +msgstr "" + +msgid ":gh:`148267`: Using :c:macro:`Py_LIMITED_API` on a non-Windows free-threaded build no longer needs an extra :c:macro:`Py_GIL_DISABLED`." +msgstr "" + +msgid ":gh:`145559`: Rename ``_Py_DumpTraceback`` and ``_Py_DumpTracebackThreads`` to :c:func:`PyUnstable_DumpTraceback` and :c:func:`PyUnstable_DumpTracebackThreads`." +msgstr "" + +msgid ":gh:`146636`: Implement :pep:`803` -- ``abi3t``: Stable ABI for Free-Threaded Builds." +msgstr "" + +msgid ":gh:`146302`: :c:func:`Py_IsInitialized` no longer returns true until initialization has fully completed, including import of the :mod:`site` module. The underlying runtime flags now use atomic operations." +msgstr "" + +msgid ":gh:`146063`: Add :c:func:`PyObject_CallFinalizerFromDealloc` function to the limited C API. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`145921`: Add functions that are guaranteed to be safe for use in :c:member:`~PyTypeObject.tp_traverse` handlers: :c:func:`PyObject_GetTypeData_DuringGC`, :c:func:`PyObject_GetItemData_DuringGC`, :c:func:`PyType_GetModuleState_DuringGC`, :c:func:`PyModule_GetState_DuringGC`, :c:func:`PyModule_GetToken_DuringGC`, :c:func:`PyType_GetBaseByToken_DuringGC`, :c:func:`PyType_GetModule_DuringGC`, :c:func:`PyType_GetModuleByToken_DuringGC`." +msgstr "" + +msgid "Python 3.15.0 alpha 8" +msgstr "" + +msgid "*Release date: 2026-04-07*" +msgstr "" + +msgid ":gh:`145986`: :mod:`xml.parsers.expat`: Fixed a crash caused by unbounded C recursion when converting deeply nested XML content models with :meth:`~xml.parsers.expat.xmlparser.ElementDeclHandler`. This addresses :cve:`2026-4224`." +msgstr "" + +msgid ":gh:`145599`: Reject control characters in :class:`http.cookies.Morsel` :meth:`~http.cookies.Morsel.update` and :meth:`~http.cookies.BaseCookie.js_output`. This addresses :cve:`2026-3644`." +msgstr "" + +msgid ":gh:`143930`: Reject leading dashes in URLs passed to :func:`webbrowser.open`." +msgstr "" + +msgid ":gh:`148157`: Fix an unlikely crash when parsing an invalid type comments for function parameters. Found by OSS Fuzz in :oss-fuzz:`492782951`." +msgstr "" + +msgid ":gh:`100239`: Propagate result type and uniqueness information through ``_BINARY_OP_EXTEND`` in the tier 2 optimizer, enabling elimination of downstream type guards and selection of inplace float operations." +msgstr "" + +msgid ":gh:`148144`: Initialize ``_PyInterpreterFrame.visited`` when copying interpreter frames so incremental GC does not read an uninitialized byte from generator and frame-object copies." +msgstr "" + +msgid ":gh:`148072`: Cache ``pickle.dumps`` and ``pickle.loads`` per interpreter in the XIData framework, avoiding repeated module lookups on every cross-interpreter data transfer. This speeds up :class:`~concurrent.futures.InterpreterPoolExecutor` for mutable types (``list``, ``dict``) by 1.7x--3.3x." +msgstr "" + +msgid ":gh:`148110`: Fix :func:`sys.set_lazy_imports_filter` so relative lazy imports pass the resolved imported module name to the filter callback. Patch by Pablo Galindo." +msgstr "" + +msgid ":gh:`148083`: Constant-fold ``_CONTAINS_OP_SET`` for :class:`frozenset`. Patch by Donghee Na." +msgstr "" + +msgid ":gh:`144319`: Fix a bug that could cause applications with specific allocation patterns to leak memory via Huge Pages if compiled with Huge Page support. Patch by Pablo Galindo" +msgstr "" + +msgid ":gh:`147985`: Make :c:func:`PySet_Contains` attempt a lock-free lookup, similar to :meth:`!set.__contains__`. This avoids acquiring the set object mutex in the normal case." +msgstr "" + +msgid ":gh:`147856`: Allow the *count* argument of :meth:`bytes.replace` to be a keyword." +msgstr "" + +msgid ":gh:`146615`: Fix a crash in :meth:`~object.__get__` for :c:expr:`METH_METHOD` descriptors when an invalid (non-type) object is passed as the second argument. Patch by Steven Sun." +msgstr "" + +msgid ":gh:`146306`: Optimize compact integer arithmetic in the JIT by mutating uniquely-referenced operands in place, avoiding allocation of a new int object. Speeds up the pyperformance ``spectral_norm`` benchmark by ~10%." +msgstr "" + +msgid ":gh:`146587`: Fix type slot assignment incase of multiple slots for same name in type object implementation. Patch by Kumar Aditya." +msgstr "" + +msgid ":gh:`126910`: Set frame pointers in ``aarch64-unknown-linux-gnu`` JIT code, allowing most native profilers and debuggers to unwind through them. Patch by Diego Russo" +msgstr "" + +msgid ":gh:`146388`: Adds a null check to handle when the JIT optimizer runs out of space when dealing with contradictions in ``make_bottom``." +msgstr "" + +msgid ":gh:`146308`: Fixed multiple error handling issues in the :mod:`!_remote_debugging` module including a double-free in code object caching, memory leaks on allocation failure, missing exception checks in binary format varint decoding, reference leaks on error paths in frame chain processing, and inconsistent thread status error reporting across platforms. Patch by Pablo Galindo." +msgstr "" + +msgid ":gh:`146306`: Optimize float arithmetic in the JIT by mutating uniquely-referenced operands in place, avoiding allocation of a new float object. Speeds up the pyperformance ``nbody`` benchmark by ~19%." +msgstr "" + +msgid ":gh:`146128`: Fix a bug which could cause constant values to be partially corrupted in AArch64 JIT code. This issue is theoretical, and hasn't actually been observed in unmodified Python interpreters." +msgstr "" + +msgid ":gh:`146250`: Fixed a memory leak in :exc:`SyntaxError` when re-initializing it." +msgstr "" + +msgid ":gh:`146245`: Fixed reference leaks in :mod:`socket` when audit hooks raise exceptions in :func:`socket.getaddrinfo` and :meth:`!socket.sendto`." +msgstr "" + +msgid ":gh:`146151`: :class:`memoryview` now supports the :c:expr:`float complex` and :c:expr:`double complex` C types: formatting characters ``'F'`` and ``'D'`` respectively. Patch by Sergey B Kirpichev." +msgstr "" + +msgid ":gh:`146196`: Fix potential Undefined Behavior in :c:func:`PyUnicodeWriter_WriteASCII` by adding a zero-length check. Patch by Shamil Abdulaev." +msgstr "" + +msgid ":gh:`146227`: Fix wrong type in ``_Py_atomic_load_uint16`` in the C11 atomics backend (``pyatomic_std.h``), which used a 32-bit atomic load instead of 16-bit. Found by Mohammed Zuhaib." +msgstr "" + +msgid ":gh:`146205`: Fixed a bug where :meth:`select.epoll.close`, :meth:`select.kqueue.close`, and :meth:`select.devpoll.close` silently ignored errors." +msgstr "" + +msgid ":gh:`146199`: Comparison of code objects now handles errors correctly." +msgstr "" + +msgid ":gh:`145667`: Remove the ``GET_ITER_YIELD_FROM`` instruction, modifying ``SEND`` to pair with ``GET_ITER`` when compiling ``yield from`` expressions." +msgstr "" + +msgid ":gh:`146192`: Add Base32 support to :mod:`binascii` and improve the performance of the Base32 converters in :mod:`base64`. Patch by James Seo." +msgstr "" + +msgid ":gh:`135871`: Improve multithreaded scaling of PyMutex in low-contention scenarios by reloading the lock's internal state, without slowing down high-contention scenarios." +msgstr "" + +msgid ":gh:`146096`: Fixed segmentation fault when called repr for BaseExceptionGroup with empty or 1-size tuple args." +msgstr "" + +msgid ":gh:`146056`: Fix :func:`repr` for lists and tuples containing ``NULL``\\ s." +msgstr "" + +msgid ":gh:`145059`: Fixed :py:attr:`sys.lazy_modules` to include lazy modules without submodules. Patch by Bartosz Sławecki." +msgstr "" + +msgid ":gh:`146041`: Fix free-threading scaling bottleneck in :func:`sys.intern` and :c:func:`PyObject_SetAttr` by avoiding the interpreter-wide lock when the string is already interned and immortalized." +msgstr "" + +msgid ":gh:`145990`: ``python --help-env`` sections are now sorted by environment variable name." +msgstr "" + +msgid ":gh:`145990`: ``python --help-xoptions`` is now sorted by ``-X`` option name." +msgstr "" + +msgid ":gh:`145876`: :exc:`AttributeError`\\ s and :exc:`KeyError`\\ s raised in :meth:`!keys` or :meth:`!__getitem__` during dictionary unpacking (``{**mymapping}`` or ``func(**mymapping)``) are no longer masked by :exc:`TypeError`." +msgstr "" + +msgid ":gh:`127958`: Support tracing from function entrypoints in the JIT. Patch by Ken Jin." +msgstr "" + +msgid ":gh:`145376`: Fix GC tracking in ``structseq.__replace__()``." +msgstr "" + +msgid ":gh:`145792`: Fix out-of-bounds access when invoking faulthandler on a CPython build compiled without support for VLAs." +msgstr "" + +msgid ":gh:`142183`: Avoid a pathological case where repeated calls at a specific stack depth could be significantly slower." +msgstr "" + +msgid ":gh:`145779`: Improve scaling of :func:`classmethod` and :func:`staticmethod` calls in the free-threaded build by avoiding the descriptor ``__get__`` call." +msgstr "" + +msgid ":gh:`145783`: Fix an unlikely crash in the parser when certain errors were erroneously not propagated. Found by OSS Fuzz in :oss-fuzz:`491369109`." +msgstr "" + +msgid ":gh:`145685`: Improve scaling of type attribute lookups in the :term:`free-threaded build` by avoiding contention on the internal type lock." +msgstr "" + +msgid ":gh:`145713`: Make :meth:`bytearray.resize` thread-safe in the free-threaded build by using a critical section and calling the lock-held variant of the resize function." +msgstr "" + +msgid ":gh:`145036`: In free-threaded build, fix race condition when calling :meth:`!__sizeof__` on a :class:`list`" +msgstr "" + +msgid ":gh:`134584`: Eliminate redundant refcounting for ``MATCH_CLASS`` in the JIT." +msgstr "" + +msgid ":gh:`69605`: Add :mod:`math.integer` to :term:`REPL` auto-completion of imports." +msgstr "" + +msgid ":gh:`131798`: Optimize ``_ITER_CHECK_RANGE`` and ``_ITER_CHECK_LIST`` in the JIT" +msgstr "" + +msgid ":gh:`143414`: Add tracking to the JIT optimizer to determine whether a reference is uniquely owned or shared" +msgstr "" + +msgid ":gh:`143636`: Fix a crash when calling :class:`SimpleNamespace.__replace__() ` on non-namespace instances. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`126910`: Set frame pointers in ``x86_64-unknown-linux-gnu`` JIT code, allowing most native profilers and debuggers to unwind through them." +msgstr "" + +msgid ":gh:`140594`: Fix an out of bounds read when a single NUL character is read from the standard input. Patch by Shamil Abdulaev." +msgstr "" + +msgid ":gh:`140870`: Add support for module attributes in the :term:`REPL` auto-completion of imports." +msgstr "" + +msgid ":gh:`144503`: Fix a regression introduced in 3.14.3 and 3.13.12 where the :mod:`multiprocessing` ``forkserver`` start method would fail with :exc:`BrokenPipeError` when the parent process had a very large :data:`sys.argv`. The argv is now passed to the forkserver as separate command-line arguments rather than being embedded in the ``-c`` command string, avoiding the operating system's per-argument length limit." +msgstr "" + +msgid ":gh:`148153`: :func:`base64.b32encode` now always raises :exc:`ValueError` instead of :exc:`AssertionError` for the value of *map01* with invalid length." +msgstr "" + +msgid ":gh:`73613`: Add the *padded* parameter in functions related to Base32 and Base64 codecs in the :mod:`binascii` and :mod:`base64` modules. In the encoding functions it controls whether the pad character can be added in the output, in the decoding functions it controls whether padding is required in input. Padding of input no longer required in :func:`base64.urlsafe_b64decode` by default." +msgstr "" + +msgid ":gh:`146613`: :mod:`itertools`: Fix a crash in :func:`itertools.groupby` when the grouper iterator is concurrently mutated." +msgstr "" + +msgid ":gh:`147944`: Accepted range for the *bytes_per_sep* argument of :meth:`bytes.hex`, :meth:`bytearray.hex`, :meth:`memoryview.hex`, and :func:`binascii.b2a_hex` is now increased, so passing ``sys.maxsize`` and ``-sys.maxsize`` is now valid." +msgstr "" + +msgid ":gh:`146080`: :mod:`ssl`: fix a crash when an SNI callback tries to use an SSL object that has already been garbage-collected. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`146556`: Fix :func:`annotationlib.get_annotations` hanging indefinitely when called with ``eval_str=True`` on a callable that has a circular ``__wrapped__`` chain (e.g. ``f.__wrapped__ = f``). Cycle detection using an id-based visited set now stops the traversal and falls back to the globals found so far, mirroring the approach of :func:`inspect.unwrap`." +msgstr "" + +msgid ":gh:`146090`: :mod:`sqlite3`: fix a crash when :meth:`sqlite3.Connection.create_collation` fails with `SQLITE_BUSY `__. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`146090`: :mod:`sqlite3`: properly raise :exc:`MemoryError` instead of :exc:`SystemError` when a context callback fails to be allocated. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`146507`: Make :meth:`asyncio.SelectorEventLoop` stream transport's :meth:`~asyncio.WriteTransport.get_write_buffer_size` O(1) by maintaining a running byte counter instead of iterating the buffer on every call." +msgstr "" + +msgid ":gh:`145056`: Fix merging of :class:`collections.OrderedDict` and :class:`frozendict`." +msgstr "" + +msgid ":gh:`145056`: Add support for merging :class:`collections.UserDict` and :class:`frozendict`." +msgstr "" + +msgid ":gh:`145633`: Fix ``struct.pack('f', float)``: use :c:func:`PyFloat_Pack4` to raise :exc:`OverflowError`. Patch by Sergey B Kirpichev and Victor Stinner." +msgstr "" + +msgid ":gh:`146440`: :mod:`json`: Add the *array_hook* parameter to :func:`~json.load` and :func:`~json.loads` functions: allow a callback for JSON literal array types to customize Python lists in the resulting decoded object. Passing combined :class:`frozendict` to *object_pairs_hook* param and :class:`tuple` to ``array_hook`` will yield a deeply nested immutable Python structure representing the JSON data." +msgstr "" + +msgid ":gh:`146431`: Add the *wrapcol* parameter to :mod:`base64` functions :func:`~base64.b16encode`, :func:`~base64.b32encode`, :func:`~base64.b32hexencode`, :func:`~base64.b85encode` and :func:`~base64.z85encode`, and :mod:`binascii` functions :func:`~binascii.b2a_base32` and :func:`~binascii.b2a_base85`. Add the *ignorechars* parameter to :mod:`base64` functions :func:`~base64.b16decode`, :func:`~base64.b32decode`, :func:`~base64.b32hexdecode`, :func:`~base64.b85decode` and :func:`~base64.z85decode`, and :mod:`binascii` functions :func:`~binascii.a2b_hex`, :func:`~binascii.unhexlify`, :func:`~binascii.a2b_base32` and :func:`~binascii.a2b_base85`." +msgstr "" + +msgid ":gh:`146310`: The :mod:`ensurepip` module no longer looks for ``pip-*.whl`` wheel packages in the current directory." +msgstr "" + +msgid ":gh:`141510`: Support :class:`frozendict` in :mod:`plistlib`, for serialization only. Patch by Hugo van Kemenade." +msgstr "" + +msgid ":gh:`146238`: Support half-floats (type code ``'e'`` of the :mod:`struct` module) in the :mod:`array` module. Patch by Sergey B Kirpichev." +msgstr "" + +msgid ":gh:`140947`: Fix incorrect contextvars handling in server tasks created by :mod:`asyncio`. Patch by Kumar Aditya." +msgstr "" + +msgid ":gh:`146151`: Support the :c:expr:`float complex` and :c:expr:`double complex` C types in the :mod:`array` module: formatting characters ``'F'`` and ``'D'`` respectively. Patch by Sergey B Kirpichev." +msgstr "" + +msgid ":gh:`143387`: In importlib.metadata, when a distribution file is corrupt and there is no metadata file, calls to ``Distribution.metadata()`` (including implicit calls from other properties like ``.name`` and ``.requires``) will now raise a ``MetadataNotFound`` Exception. This allows callers to distinguish between missing metadata and a degenerate (empty) metadata. Previously, if the file was missing, an empty ``PackageMetadata`` would be returned and would be indistinguishable from the presence of an empty file." +msgstr "" + +msgid ":gh:`146228`: Cached FastPath objects in importlib.metadata are now cleared on fork, avoiding broken references to zip files during fork." +msgstr "" + +msgid ":gh:`146171`: Nested :exc:`AttributeError` suggestions now include property-backed attributes on nested objects without executing the property getter." +msgstr "" + +msgid ":gh:`145410`: On Windows, :func:`sysconfig.get_platform` now gets the platform from the ``_sysconfig`` module instead of parsing :data:`sys.version` string. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`146091`: Fix a bug in :func:`termios.tcsetwinsize` where passing a sequence that raises an exception in ``__getitem__`` would cause a :exc:`SystemError` instead of propagating the original exception." +msgstr "" + +msgid ":gh:`146083`: Update bundled `libexpat `_ to version 2.7.5." +msgstr "" + +msgid ":gh:`146076`: :mod:`zoneinfo`: fix crashes when deleting ``_weak_cache`` from a :class:`zoneinfo.ZoneInfo` subclass." +msgstr "" + +msgid ":gh:`123471`: Make concurrent iteration over :class:`itertools.zip_longest` safe under free-threading." +msgstr "" + +msgid ":gh:`146075`: Errors when calling :func:`functools.partial` with a malformed keyword will no longer crash the interpreter." +msgstr "" + +msgid ":gh:`146054`: Limit the size of :func:`encodings.search_function` cache. Found by OSS Fuzz in :oss-fuzz:`493449985`." +msgstr "" + +msgid ":gh:`146004`: All :option:`-X` options from the Python command line are now propagated to child processes spawned by :mod:`multiprocessing`, not just a hard-coded subset. This makes the behavior consistent between default \"spawn\" and \"forkserver\" start methods and the old \"fork\" start method. The options that were previously not propagated are: ``context_aware_warnings``, ``cpu_count``, ``disable-remote-debug``, ``int_max_str_digits``, ``lazy_imports``, ``no_debug_ranges``, ``pathconfig_warnings``, ``perf``, ``perf_jit``, ``presite``, ``pycache_prefix``, ``thread_inherit_context``, and ``warn_default_encoding``." +msgstr "" + +msgid ":gh:`145980`: Added the *alphabet* parameter in :func:`~binascii.b2a_base64`, :func:`~binascii.a2b_base64`, :func:`~binascii.b2a_base85` and :func:`~binascii.a2b_base85` and a number of ``*_ALPHABET`` constants in the :mod:`binascii` module. Removed :func:`!b2a_z85` and :func:`!a2b_z85`." +msgstr "" + +msgid ":gh:`145968`: Fix translation in :func:`base64.b64decode` when altchars overlaps with the standard ones." +msgstr "" + +msgid ":gh:`145966`: Non-:exc:`AttributeError` exceptions raised during dialect attribute lookup in :mod:`csv` are no longer silently suppressed." +msgstr "" + +msgid ":gh:`145883`: :mod:`zoneinfo`: Fix heap buffer overflow reads from malformed TZif data. Found by OSS Fuzz, issues :oss-fuzz:`492245058` and :oss-fuzz:`492230068`." +msgstr "" + +msgid ":gh:`145850`: Changed some implementation details in :class:`struct.Struct`: calling it with non-ASCII string format will now raise a :exc:`ValueError` instead of :exc:`UnicodeEncodeError`, calling it with non-ASCII bytes format will now raise a :exc:`ValueError` instead of :exc:`struct.error`, getting the :attr:`!format` attribute of uninitialized object will now raise an :exc:`AttributeError` instead of :exc:`RuntimeError`." +msgstr "" + +msgid ":gh:`123720`: asyncio: Fix :func:`asyncio.Server.serve_forever` shutdown regression. Since 3.12, cancelling ``serve_forever()`` could hang waiting for a handler blocked on a read from a client that never closed (effectively requiring two interrupts to stop); the shutdown sequence now ensures client streams are closed so ``serve_forever()`` exits promptly and handlers observe EOF." +msgstr "" + +msgid ":gh:`138122`: The ``profiling.sampling`` module now supports differential flamegraph visualization via ``--diff-flamegraph`` to compare two profiling runs. Functions are colored red (regressions), blue (improvements), gray (neutral), or purple (new). Elided stacks show code paths that disappeared between runs." +msgstr "" + +msgid ":gh:`145754`: Request signature during mock autospec with ``FORWARDREF`` annotation format. This prevents runtime errors when an annotation uses a name that is not defined at runtime." +msgstr "" + +msgid ":gh:`145750`: Avoid undefined behaviour from signed integer overflow when parsing format strings in the :mod:`struct` module. Found by OSS Fuzz in :oss-fuzz:`488466741`." +msgstr "" + +msgid ":gh:`145719`: Add ``application/efi`` MIME type to :mod:`mimetypes`." +msgstr "" + +msgid ":gh:`145717`: Add a few Microsoft-specific MIME types." +msgstr "" + +msgid ":gh:`145703`: :mod:`asyncio`: Make sure that :meth:`loop.call_at ` and :meth:`loop.call_later ` trigger scheduled events on time when the clock resolution becomes too small." +msgstr "" + +msgid ":gh:`145697`: Add ``application/sql`` and ``application/vnd.sqlite3`` into ``mimetypes``." +msgstr "" + +msgid ":gh:`145492`: Fix infinite recursion in :class:`collections.defaultdict` ``__repr__`` when a ``defaultdict`` contains itself. Based on analysis by KowalskiThomas in :gh:`145492`." +msgstr "" + +msgid ":gh:`145650`: Add :meth:`~object.__repr__` support to :class:`logging.Formatter` and :class:`logging.Filter`, showing the format string and filter name respectively." +msgstr "" + +msgid ":gh:`145587`: Resolved a performance regression in ``multiprocessing.connection.wait`` on Windows that caused infinite busy loops when called with no objects. The function now properly yields control to the OS to conserve CPU resources. Patch By Shrey Naithani" +msgstr "" + +msgid ":gh:`145616`: Detect Android sysconfig ABI correctly on 32-bit ARM Android on 64-bit ARM kernel" +msgstr "" + +msgid ":gh:`145546`: Fix ``unittest.util.sorted_list_difference()`` to deduplicate remaining elements when one input list is exhausted before the other." +msgstr "" + +msgid ":gh:`145446`: Now :mod:`functools` is safer in free-threaded build when using keywords in :func:`functools.partial`" +msgstr "" + +msgid ":gh:`145264`: Base64 decoder (see :func:`binascii.a2b_base64`, :func:`base64.b64decode`, etc) no longer ignores excess data after the first padded quad in non-strict (default) mode. Instead, in conformance with :rfc:`4648`, section 3.3, it now ignores the pad character, \"=\", if it is present before the end of the encoded data." +msgstr "" + +msgid ":gh:`145035`: Allows omitting the internal library ``_pyrepl`` with limited loss of functionality. This allows complete removal of the modern REPL, which is an unsupported configuration, but still desirable for some distributions." +msgstr "" + +msgid ":gh:`144270`: Made the *tag* parameter of :class:`xml.etree.ElementTree.Element` and the *parent* and *tag* parameters of :func:`xml.etree.ElementTree.SubElement` positional-only, matching the behavior of the C accelerator." +msgstr "" + +msgid ":gh:`144984`: Fix crash in :meth:`xml.parsers.expat.xmlparser.ExternalEntityParserCreate` when an allocation fails. The error paths could dereference NULL ``handlers`` and double-decrement the parent parser's reference count." +msgstr "" + +msgid ":gh:`144975`: :meth:`wave.Wave_write.setframerate` now validates the frame rate after rounding to an integer, preventing values like ``0.5`` from being accepted and causing confusing errors later. Patch by Michiel Beijen." +msgstr "" + +msgid ":gh:`140715`: Add ``%n`` and ``%t`` support to :meth:`~datetime.datetime.strptime`." +msgstr "" + +msgid ":gh:`144259`: Fix inconsistent display of long multiline pasted content in the REPL." +msgstr "" + +msgid ":gh:`140814`: :func:`multiprocessing.freeze_support` no longer sets the default start method as a side effect, which previously caused a subsequent :func:`multiprocessing.set_start_method` call to raise :exc:`RuntimeError`." +msgstr "" + +msgid ":gh:`123471`: Make concurrent iteration over :class:`itertools.accumulate` safe under free-threading." +msgstr "" + +msgid ":gh:`143715`: Calling the ``Struct.__new__()`` without required argument now is deprecated. Calling :meth:`~object.__init__` method on initialized :class:`~struct.Struct` objects is deprecated." +msgstr "" + +msgid ":gh:`142763`: Fix a race condition between :class:`zoneinfo.ZoneInfo` creation and :func:`zoneinfo.ZoneInfo.clear_cache` that could raise :exc:`KeyError`." +msgstr "" + +msgid ":gh:`141707`: Don't change :class:`tarfile.TarInfo` type from ``AREGTYPE`` to ``DIRTYPE`` when parsing GNU long name or link headers." +msgstr "" + +msgid ":gh:`138577`: :func:`getpass.getpass` with non-empty ``echo_char`` now handles keyboard shortcuts including Ctrl+A/E (cursor movement), Ctrl+K/U (kill line), Ctrl+W (erase word), and Ctrl+V (literal next) by reading the terminal's control character settings and processing them appropriately in non-canonical mode. Patch by Sanyam Khurana." +msgstr "" + +msgid ":gh:`140049`: :func:`traceback.format_exception_only` now colorizes exception notes." +msgstr "" + +msgid ":gh:`139933`: Improve :exc:`AttributeError` suggestions for classes with a custom :meth:`~object.__dir__` method returning a list of unsortable values. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`139633`: The :mod:`netrc` security check is now run once per parse rather than once per entry." +msgstr "" + +msgid ":gh:`130472`: Add fancycompleter and enable it by default when using pyrepl. This gives colored tab completion." +msgstr "" + +msgid ":gh:`112632`: Add an *expand* keyword argument for :func:`pprint.pprint`, :func:`pprint.pformat`, :func:`pprint.pp` by passing on all *kwargs* and :class:`pprint.PrettyPrinter`. Contributed by Stefan Todoran and Semyon Moroz." +msgstr "" + +msgid ":gh:`66419`: Optional argument with :ref:`nargs` equals to ``argparse.REMAINDER`` now consumes all remaining arguments including ``'--'``." +msgstr "" + +msgid ":gh:`60729`: Add support for floating point audio wave files in :mod:`wave`." +msgstr "" + +msgid ":issue:`36461`: Make the target time of :meth:`timeit.Timer.autorange` configurable and add ``--target-time`` option to the command-line interface of :mod:`timeit`." +msgstr "" + +msgid ":gh:`126676`: Expand :mod:`argparse` documentation for ``type=bool`` with a demonstration of the surprising behavior and pointers to common alternatives." +msgstr "" + +msgid ":gh:`145649`: Fix text wrapping and formatting of ``-X`` option descriptions in the :manpage:`python(1)` man page by using proper roff markup." +msgstr "" + +msgid ":gh:`144418`: The Android testbed's emulator RAM has been increased from 2 GB to 4 GB." +msgstr "" + +msgid ":gh:`146202`: Fix a race condition in regrtest: make sure that the temporary directory is created in the worker process. Previously, temp_cwd() could fail on Windows if the \"build\" directory was not created. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`146541`: The Android testbed can now be built for 32-bit ARM and x86 targets." +msgstr "" + +msgid ":gh:`146498`: The iOS XCframework build script now ensures libpython isn't included in installed app content, and is more robust in identifying standard library binary content that requires processing." +msgstr "" + +msgid ":gh:`146450`: The Android build script was modified to improve parity with other platform build scripts." +msgstr "" + +msgid ":gh:`146446`: The clean target for the Apple/iOS XCframework build script is now more selective when targeting a single architecture." +msgstr "" + +msgid ":gh:`146444`: The Apple/iOS build script has been moved to the Platforms directory." +msgstr "" + +msgid ":gh:`146210`: Fix building the jit stencils on Windows when the interpreter is built with a different clang version. Patch by Chris Eibl." +msgstr "" + +msgid ":gh:`145844`: Update to WASI SDK 32." +msgstr "" + +msgid ":gh:`145801`: When Python build is optimized with GCC using PGO, use ``-fprofile-update=atomic`` option to use atomic operations when updating profile information. This option reduces the risk of gcov Data Files (.gcda) corruption which can cause random GCC crashes. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`138850`: Add :option:`--disable-epoll` to ``configure``" +msgstr "" + +msgid ":gh:`145633`: Remove support for ancient ARM platforms (ARMv4L and ARMv5L OABI boards), using mixed-endian representation for doubles. Patch by Sergey B Kirpichev." +msgstr "" + +msgid ":gh:`85277`: Fix building without ``stropts.h`` or empty ``stropts.h``" +msgstr "" + +msgid ":gh:`140131`: Fix REPL cursor position on Windows when module completion suggestion line hits console width." +msgstr "" + +msgid ":gh:`137586`: Invoke :program:`osascript` with absolute path in :mod:`webbrowser` and :mod:`!turtledemo`." +msgstr "" + +msgid ":gh:`135953`: Properly identify the main thread in the Gecko profiler collector by using a status flag from the interpreter state instead of relying on :func:`threading.main_thread` in the collector process." +msgstr "" + +msgid ":gh:`145976`: Remove :file:`Misc/indent.pro`, a configuration file for GNU :manpage:`indent(1)`." +msgstr "" + +msgid ":gh:`145976`: Remove :file:`Misc/vgrindefs` and :file:`Misc/Porting`." +msgstr "" + +msgid ":gh:`146636`: The :c:data:`Py_mod_abi` slot is now mandatory for modules created from a slots array (using :c:func:`PyModule_FromSlotsAndSpec` or the :c:func:`PyModExport_* ` export hook)." +msgstr "" + +msgid ":gh:`146175`: The following macros are :term:`soft deprecated`: :c:macro:`Py_ALIGNED`, :c:macro:`PY_FORMAT_SIZE_T`, :c:macro:`Py_LL`, :c:macro:`Py_ULL`, :c:macro:`PY_LONG_LONG`, :c:macro:`PY_LLONG_MIN`, :c:macro:`PY_LLONG_MAX`, :c:macro:`PY_ULLONG_MAX`, :c:macro:`PY_INT32_T`, :c:macro:`PY_UINT32_T`, :c:macro:`PY_INT64_T`, :c:macro:`PY_UINT64_T`, :c:macro:`PY_SIZE_MAX`, :c:macro:`Py_UNICODE_SIZE`, :c:macro:`Py_VA_COPY`." +msgstr "" + +msgid "The macro :c:macro:`Py_UNICODE_WIDE`, which was scheduled for removal, is :term:`soft deprecated` instead." +msgstr "" + +msgid ":gh:`146143`: :c:func:`PyUnicodeWriter_WriteUCS4` now accepts a pointer to a constant buffer of ``Py_UCS4``." +msgstr "" + +msgid ":gh:`146056`: :c:func:`PyUnicodeWriter_WriteRepr` now supports ``NULL`` argument." +msgstr "" + +msgid ":gh:`145010`: Use GCC dialect alternatives for inline assembly in ``object.h`` so that the Python headers compile correctly with ``-masm=intel``." +msgstr "" + +msgid "Python 3.15.0 alpha 7" +msgstr "" + +msgid "*Release date: 2026-03-10*" +msgstr "" + +msgid ":gh:`145731`: Fix negative timestamp during DST on Windows. Patch by Hugo van Kemenade." +msgstr "" + +msgid ":gh:`145307`: Defers loading of the ``psapi.dll`` module until it is used by :func:`ctypes.util.dllist`." +msgstr "" + +msgid ":gh:`144551`: Updated bundled version of OpenSSL to 3.5.5." +msgstr "" + +msgid ":gh:`144741`: Fix ``test_frame_pointer_unwind`` when Python is built with :option:`--enable-shared`. Classify also libpython frames as ``\"python\"``. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`144739`: When Python was compiled with system expat older then 2.7.2 but tests run with newer expat, still skip :class:`!test.test_pyexpat.MemoryProtectionTest`." +msgstr "" + +msgid ":gh:`145506`: Fixes :cve:`2026-2297` by ensuring that ``SourcelessFileLoader`` uses :func:`io.open_code` when opening ``.pyc`` files." +msgstr "" + +msgid ":gh:`144370`: Disallow usage of control characters in status in :mod:`wsgiref.handlers` to prevent HTTP header injections. Patch by Benedikt Johannes." +msgstr "" + +msgid ":gh:`145623`: Fix crash in :mod:`struct` when calling :func:`repr` or ``__sizeof__()`` on an uninitialized :class:`struct.Struct` object created via ``Struct.__new__()`` without calling ``__init__()``." +msgstr "" + +msgid ":gh:`145551`: Fix InvalidStateError when cancelling process created by :func:`asyncio.create_subprocess_exec` or :func:`asyncio.create_subprocess_shell`. Patch by Daan De Meyer." +msgstr "" + +msgid ":gh:`141510`: :mod:`marshal` now supports :class:`frozendict` objects. The marshal format version was increased to 6. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`145417`: :mod:`venv`: Prevent incorrect preservation of SELinux context when copying the ``Activate.ps1`` script. The script inherited the SELinux security context of the system template directory, rather than the destination project directory." +msgstr "" + +msgid ":gh:`145335`: ``os.listdir(-1)`` and ``os.scandir(-1)`` now fail with ``OSError(errno.EBADF)`` rather than listing the current directory. ``os.listxattr(-1)`` now fails with ``OSError(errno.EBADF)`` rather than listing extended attributes of the current directory. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`145376`: Fix double free and null pointer dereference in unusual error scenarios in :mod:`hashlib` and :mod:`hmac` modules." +msgstr "" + +msgid ":gh:`145301`: :mod:`hmac`: fix a crash when the initialization of the underlying C extension module fails." +msgstr "" + +msgid ":gh:`145301`: :mod:`hashlib`: fix a crash when the initialization of the underlying C extension module fails." +msgstr "" + +msgid ":gh:`76007`: The ``version`` attribute of the :mod:`tarfile` module is deprecated and slated for removal in Python 3.20." +msgstr "" + +msgid ":gh:`145158`: Avoid undefined behaviour from signed integer overflow when parsing format strings in the :mod:`struct` module." +msgstr "" + +msgid ":gh:`123853`: Removed Windows 95 compatibility for :func:`locale.getdefaultlocale`." +msgstr "" + +msgid ":gh:`66802`: Add :func:`unicodedata.block` function to return the `Unicode block `_ of a character." +msgstr "" + +msgid ":gh:`145033`: Add :data:`typing.TypeForm`, implementing :pep:`747`. Patch by Jelle Zijlstra." +msgstr "" + +msgid ":gh:`141510`: :func:`dataclasses.field`: if *metadata* is ``None``, use an empty :class:`frozendict`, instead of a :func:`~types.MappingProxyType` of an empty :class:`dict`. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`145006`: Add :exc:`ModuleNotFoundError` hints when a module for a different ABI exists." +msgstr "" + +msgid ":gh:`141510`: ``ParameterizedMIMEHeader.params`` of :mod:`email.headerregistry` is now a :class:`frozendict` instead of a :class:`types.MappingProxyType`. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`134872`: Add valid import name suggestions on :exc:`ModuleNotFoundError`." +msgstr "" + +msgid ":gh:`88091`: Fix :func:`unicodedata.decomposition` for Hangul characters." +msgstr "" + +msgid ":gh:`144986`: Fix a memory leak in :func:`atexit.register`. Patch by Shamil Abdulaev." +msgstr "" + +msgid ":gh:`144777`: Fix data races in :class:`io.IncrementalNewlineDecoder` in the :term:`free-threaded build`." +msgstr "" + +msgid ":gh:`144809`: Make :class:`collections.deque` copy atomic in the :term:`free-threaded build`." +msgstr "" + +msgid ":gh:`141510`: The :mod:`copy` module now supports the :class:`frozendict` type. Patch by Pieter Eendebak based on work by Victor Stinner." +msgstr "" + +msgid ":gh:`141510`: The :mod:`json` module now supports the :class:`frozendict` type. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`144835`: Added missing explanations for some parameters in :func:`glob.glob` and :func:`glob.iglob`." +msgstr "" + +msgid ":gh:`144833`: Fixed a use-after-free in :mod:`ssl` when ``SSL_new()`` returns NULL in ``newPySSLSocket()``. The error was reported via a dangling pointer after the object had already been freed." +msgstr "" + +msgid ":gh:`140715`: Add ``'%D'`` support to :meth:`~datetime.datetime.strptime`." +msgstr "" + +msgid ":gh:`144782`: Fix :class:`argparse.ArgumentParser` to be :mod:`pickleable `." +msgstr "" + +msgid ":gh:`144763`: Fix a race condition in :mod:`tracemalloc`: it no longer detaches the attached thread state to acquire its internal lock. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`142224`: :func:`unicodedata.bidirectional` now return the correct default bidi class for unassigned code points." +msgstr "" + +msgid ":gh:`117865`: Reduce the import time of :mod:`inspect` module by ~20%." +msgstr "" + +msgid ":gh:`144156`: Fix the folding of headers by the :mod:`email` library when :rfc:`2047` encoded words are used. Now whitespace is correctly preserved and also correctly added between adjacent encoded words. The latter property was broken by the fix for :gh:`92081`, which mostly fixed previous failures to preserve whitespace." +msgstr "" + +msgid ":gh:`66305`: Fixed a hang on Windows in the :mod:`tempfile` module when trying to create a temporary file or subdirectory in a non-writable directory." +msgstr "" + +msgid ":gh:`144615`: Methods directly decorated with :deco:`functools.singledispatchmethod` now dispatch on the second argument when called after being accessed as class attributes. Patch by Bartosz Sławecki." +msgstr "" + +msgid ":gh:`144321`: The functional syntax for creating :class:`typing.NamedTuple` classes now supports passing any :term:`iterable` of fields and types. Previously, only sequences were supported." +msgstr "" + +msgid ":gh:`144475`: Calling :func:`repr` on :func:`functools.partial` is now safer when the partial object's internal attributes are replaced while the string representation is being generated." +msgstr "" + +msgid ":gh:`144285`: Attribute suggestions in :exc:`AttributeError` tracebacks are now formatted differently to make them easier to understand, for example: ``Did you mean '.datetime.now' instead of '.now'``. Contributed by Bartosz Sławecki." +msgstr "" + +msgid ":gh:`144316`: Fix crash in ``_remote_debugging`` that caused ``test_external_inspection`` to intermittently fail. Patch by Taegyun Kim." +msgstr "" + +msgid ":gh:`143637`: Fixed a crash in socket.sendmsg() that could occur if ancillary data is mutated re-entrantly during argument parsing." +msgstr "" + +msgid ":gh:`140652`: Fix a crash in :func:`!_interpchannels.list_all` after closing a channel." +msgstr "" + +msgid ":gh:`143698`: Allow *scheduler* and *setpgroup* arguments to be explicitly :const:`None` when calling :func:`os.posix_spawn` or :func:`os.posix_spawnp`. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`143698`: Raise :exc:`TypeError` instead of :exc:`SystemError` when the *scheduler* in :func:`os.posix_spawn` or :func:`os.posix_spawnp` is not a tuple. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`142516`: :mod:`ssl`: fix reference leaks in :class:`ssl.SSLContext` objects. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`85809`: Added :term:`path-like object` support for :func:`shutil.make_archive`." +msgstr "" + +msgid ":gh:`143304`: Fix :class:`ctypes.CDLL` to honor the ``handle`` parameter on POSIX systems." +msgstr "" + +msgid ":gh:`142781`: :mod:`zoneinfo`: fix a crash when instantiating :class:`~zoneinfo.ZoneInfo` objects for which the internal class-level cache is inconsistent." +msgstr "" + +msgid ":gh:`142787`: Fix assertion failure in :mod:`sqlite3` blob subscript when slicing with indices that result in an empty slice." +msgstr "" + +msgid ":gh:`142352`: Fix :meth:`asyncio.StreamWriter.start_tls` to transfer buffered data from :class:`~asyncio.StreamReader` to the SSL layer, preventing data loss when upgrading a connection to TLS mid-stream (e.g., when implementing PROXY protocol support)." +msgstr "" + +msgid ":gh:`139899`: Introduced :meth:`importlib.abc.MetaPathFinder.discover` and :meth:`importlib.abc.PathEntryFinder.discover` to allow module and submodule name discovery without assuming the use of traditional filesystem based imports." +msgstr "" + +msgid ":gh:`137335`: Get rid of any possibility of a name conflict for named pipes in :mod:`multiprocessing` and :mod:`asyncio` on Windows, no matter how small." +msgstr "" + +msgid ":gh:`135883`: Fix :mod:`sqlite3`'s :ref:`interactive shell ` keeping part of previous commands when scrolling history." +msgstr "" + +msgid ":gh:`124748`: Improve :exc:`TypeError` error message when :meth:`!weakref.WeakKeyDictionary.update` is used with keyword-only parameters." +msgstr "" + +msgid ":gh:`80667`: Add support for Tangut Ideographs names in :mod:`unicodedata`." +msgstr "" + +msgid ":issue:`42353`: The :mod:`re` module gains a new :func:`re.prefixmatch` function as an explicit spelling of what has to date always been known as :func:`re.match`. :class:`re.Pattern` similary gains a :meth:`re.Pattern.prefixmatch` method." +msgstr "" + +msgid "Why? Explicit is better than implicit. Other widely used languages all use the term \"match\" to mean what Python uses the term \"search\" for. The unadorened \"match\" name in Python has been a frequent case of confusion and coding bugs due to the inconsistency with the rest if the software industry." +msgstr "" + +msgid "We do not plan to deprecate and remove the older ``match`` name." +msgstr "" + +msgid ":issue:`40243`: Fix :meth:`!unicodedata.ucd_3_2_0.numeric` for non-decimal values." +msgstr "" + +msgid ":issue:`40212`: Re-enable :func:`os.posix_fallocate` and :func:`os.posix_fadvise` on AIX." +msgstr "" + +msgid ":issue:`3405`: Add support for user data of Tk virtual events and detail for ``Enter``, ``Leave``, ``FocusIn``, ``FocusOut``, and ``ConfigureRequest`` events to :mod:`tkinter`." +msgstr "" + +msgid ":issue:`32234`: :class:`mailbox.Mailbox` instances can now be used as a context manager. The Mailbox is locked on context entry and unlocked and closed at context exit." +msgstr "" + +msgid ":gh:`145450`: Document missing public :class:`wave.Wave_write` getter methods." +msgstr "" + +msgid ":gh:`110937`: Document rest of full public :class:`importlib.metadata.Distribution` API. Also add the (already documented) :class:`~importlib.metadata.PackagePath` to ``__all__``." +msgstr "" + +msgid ":gh:`136246`: A new \"Improve this page\" link is available in the left-hand sidebar of the docs, offering links to create GitHub issues, discussion forum posts, or pull requests." +msgstr "" + +msgid ":gh:`145701`: Fix :exc:`SystemError` when ``__classdict__`` or ``__conditional_annotations__`` is in a class-scope inlined comprehension. Found by OSS Fuzz in :oss-fuzz:`491105000`." +msgstr "" + +msgid ":gh:`145615`: Fixed a memory leak in the :term:`free-threaded build` where mimalloc pages could become permanently unreclaimable until the owning thread exited." +msgstr "" + +msgid ":gh:`116738`: Make :meth:`!mmap.mmap.set_name` thread-safe on the :term:`free threaded ` build." +msgstr "" + +msgid ":gh:`145566`: In the free threading build, skip the stop-the-world pause when reassigning ``__class__`` on a newly created object." +msgstr "" + +msgid ":gh:`143055`: Fix crash in AST unparser when unparsing dict comprehension unpacking. Found by OSS Fuzz in :oss-fuzz:`489790200`." +msgstr "" + +msgid ":gh:`145335`: Fix a crash in :func:`os.pathconf` when called with ``-1`` as the path argument." +msgstr "" + +msgid ":gh:`145376`: Fix reference leaks in various unusual error scenarios." +msgstr "" + +msgid ":gh:`145234`: Fixed a ``SystemError`` in the parser when an encoding cookie (for example, UTF-7) decodes to carriage returns (``\\r``). Newlines are now normalized after decoding in the string tokenizer." +msgstr "" + +msgid "Patch by Pablo Galindo." +msgstr "" + +msgid ":gh:`145275`: Added the :option:`-X pathconfig_warnings<-X>` and :envvar:`PYTHON_PATHCONFIG_WARNINGS` options, allowing to disable warnings from :ref:`sys-path-init`." +msgstr "" + +msgid ":gh:`145273`: A warning is now shown during :ref:`sys-path-init` if it can't find a valid standard library." +msgstr "" + +msgid ":gh:`145241`: Specialized the parser error for when ``with`` items are followed by a trailing comma (for example, ``with item,:``), raising a clearer :exc:`SyntaxError` message. Patch by Pablo Galindo and Bartosz Sławecki." +msgstr "" + +msgid ":gh:`130555`: Fix use-after-free in :meth:`dict.clear` when the dictionary values are embedded in an object and a destructor causes re-entrant mutation of the dictionary." +msgstr "" + +msgid ":gh:`145197`: Fix JIT trace crash when recording function from cleared generator frame." +msgstr "" + +msgid ":gh:`145187`: Fix compiler assertion fail when a type parameter bound contains an invalid expression in a conditional block." +msgstr "" + +msgid ":gh:`145142`: Fix a crash in the free-threaded build when the dictionary argument to :meth:`str.maketrans` is concurrently modified." +msgstr "" + +msgid ":gh:`145118`: :meth:`str.maketrans` now accepts :class:`frozendict`." +msgstr "" + +msgid ":gh:`144015`: Speed up :meth:`bytes.hex`, :meth:`bytearray.hex`, :func:`binascii.hexlify`, and :mod:`hashlib` ``.hexdigest()`` operations with SIMD on x86-64, ARM64, and ARM32 with NEON when built with gcc (version 12 or higher) or clang (version 3 or higher) compilers. Around 1.1-3x faster for common 16-64 byte inputs such as hashlib hex digests, and up to 8x faster for larger data." +msgstr "" + +msgid ":gh:`145118`: :func:`type` now accepts :class:`frozendict` as an argument." +msgstr "" + +msgid ":gh:`145064`: Fix JIT optimizer assertion failure during ``CALL_ALLOC_AND_ENTER_INIT`` side exit." +msgstr "" + +msgid ":gh:`145055`: :func:`exec` and :func:`eval` now accept :class:`frozendict` for *globals*. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`145058`: Fix a crash when :func:`!__lazy_import__` is passed a non-string argument, by raising an :exc:`TypeError` instead." +msgstr "" + +msgid ":gh:`144995`: Optimize :class:`memoryview` comparison: a :class:`memoryview` is equal to itself, there is no need to compare values. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`141510`: Update specializer to support frozendict. Patch by Donghee Na." +msgstr "" + +msgid ":gh:`141510`: Optimize :meth:`!frozendict.fromkeys` to avoid unnecessary thread-safety operations in frozendict cases. Patch by Donghee Na." +msgstr "" + +msgid ":gh:`100239`: Speedup ``BINARY_OP_EXTEND`` for exact floats and medium-size integers by up to 15%. Patch by Chris Eibl." +msgstr "" + +msgid ":gh:`144914`: Use ``mimalloc`` for raw memory allocations such as via :c:func:`PyMem_RawMalloc` for better performance on :term:`free-threaded builds `. Patch by Kumar Aditya." +msgstr "" + +msgid ":gh:`144872`: Fix heap buffer overflow in the parser found by OSS-Fuzz." +msgstr "" + +msgid ":gh:`144766`: Fix a crash in fork child process when perf support is enabled." +msgstr "" + +msgid ":gh:`144759`: Fix undefined behavior in the lexer when ``start`` and ``multi_line_start`` pointers are ``NULL`` in ``_PyLexer_remember_fstring_buffers()`` and ``_PyLexer_restore_fstring_buffers()``. The ``NULL`` pointer arithmetic (``NULL - valid_pointer``) is now guarded with explicit ``NULL`` checks." +msgstr "" + +msgid ":gh:`141510`: Add built-in :class:`frozendict` type. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`144681`: Fix a JIT assertion failure when a conditional branch jumps to the same target as the fallthrough path." +msgstr "" + +msgid ":gh:`143300`: Add :c:func:`PyUnstable_SetImmortal` C-API function to mark objects as :term:`immortal`." +msgstr "" + +msgid ":gh:`144702`: Clarify the error message raised when a class pattern is used to match on a non-class object." +msgstr "" + +msgid ":gh:`144569`: Optimize ``BINARY_SLICE`` for list, tuple, and unicode by avoiding temporary ``slice`` object creation." +msgstr "" + +msgid ":gh:`144438`: Align the QSBR thread state array to a 64-byte cache line boundary to avoid false sharing in the :term:`free-threaded build`." +msgstr "" + +msgid ":gh:`142349`: Implement :pep:`810`. Patch by Pablo Galindo and Dino Viehland." +msgstr "" + +msgid ":gh:`141226`: Deprecate :pep:`456` support for providing an external definition of the string hashing scheme. Removal is scheduled for Python 3.19. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`138912`: Improve :opcode:`MATCH_CLASS` performance by up to 52% in certain cases. Patch by Marc Mueller." +msgstr "" + +msgid ":gh:`130327`: Fix erroneous clearing of an object's :attr:`~object.__dict__` if overwritten at runtime." +msgstr "" + +msgid ":gh:`80667`: Literals using the ``\\N{name}`` escape syntax can now construct CJK ideographs and Hangul syllables using case-insensitive names." +msgstr "" + +msgid ":gh:`142417`: Restore private provisional ``_Py_InitializeMain()`` function removed in Python 3.14. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`144748`: :c:func:`PyErr_CheckSignals` now raises the exception scheduled by :c:func:`PyThreadState_SetAsyncExc`, if any." +msgstr "" + +msgid ":gh:`144981`: Made :c:func:`PyUnstable_Code_SetExtra`, :c:func:`PyUnstable_Code_GetExtra`, and :c:func:`PyUnstable_Eval_RequestCodeExtraIndex` thread-safe on the :term:`free threaded ` build." +msgstr "" + +msgid ":gh:`141510`: Add the following functions for the new :class:`frozendict` type:" +msgstr "" + +msgid ":c:func:`PyAnyDict_Check`" +msgstr "" + +msgid ":c:func:`PyAnyDict_CheckExact`" +msgstr "" + +msgid ":c:func:`PyFrozenDict_Check`" +msgstr "" + +msgid ":c:func:`PyFrozenDict_CheckExact`" +msgstr "" + +msgid ":c:func:`PyFrozenDict_New`" +msgstr "" + +msgid "Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`121617`: ``Python.h`` now also includes ```` in the limited C API version 3.11 and newer to fix the :c:macro:`Py_CLEAR` macro which uses ``memcpy()``. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`144175`: Add :c:func:`PyArg_ParseArray` and :c:func:`PyArg_ParseArrayAndKeywords` functions to parse arguments of functions using the :c:macro:`METH_FASTCALL` calling convention. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`144533`: Use wasmtime's ``--argv0`` to auto-discover sysconfig in WASI builds" +msgstr "" + +msgid ":gh:`145110`: Fix targets \"Clean\" and \"CLeanAll\" in case of PGO builds on Windows. Patch by Chris Eibl." +msgstr "" + +msgid ":gh:`144679`: When building with Visual Studio 2026 (Version 18), use PlatformToolSet v145 by default. Patch by Chris Eibl." +msgstr "" + +msgid ":gh:`144675`: Update to WASI SDK 30." +msgstr "" + +msgid ":gh:`136677`: Introduce executable specific linker flags to ``./configure``." +msgstr "" + +msgid "Python 3.15.0 alpha 6" +msgstr "" + +msgid "*Release date: 2026-02-11*" +msgstr "" + +msgid ":gh:`144648`: Allowed _remote_debugging to build on more OS versions by using proc_listpids() rather than proc_listallpids()." +msgstr "" + +msgid ":gh:`124111`: Update macOS installer to use Tcl/Tk 9.0.3." +msgstr "" + +msgid ":gh:`144551`: Update macOS installer to use OpenSSL 3.5.5." +msgstr "" + +msgid ":gh:`80620`: Support negative timestamps in :func:`time.gmtime`, :func:`time.localtime`, and various :mod:`datetime` functions." +msgstr "" + +msgid ":gh:`144415`: The Android testbed now distinguishes between stdout/stderr messages which were triggered by a newline, and those triggered by a manual call to ``flush``. This fixes logging of progress indicators and similar content." +msgstr "" + +msgid ":gh:`65784`: Add support for parametrized resource ``wantobjects`` in regrtests, which allows to run Tkinter tests with the specified value of :data:`!tkinter.wantobjects`, for example ``-u wantobjects=0``." +msgstr "" + +msgid ":gh:`144125`: :mod:`~email.generator.BytesGenerator` will now refuse to serialize (write) headers that are unsafely folded or delimited; see :attr:`~email.policy.Policy.verify_generated_headers`. (Contributed by Bas Bloemsaat and Petr Viktorin in :gh:`121650`)." +msgstr "" + +msgid ":gh:`143935`: Fixed a bug in the folding of comments when flattening an email message using a modern email policy. Comments consisting of a very long sequence of non-foldable characters could trigger a forced line wrap that omitted the required leading space on the continuation line, causing the remainder of the comment to be interpreted as a new header field. This enabled header injection with carefully crafted inputs." +msgstr "" + +msgid ":gh:`143925`: Reject control characters in ``data:`` URL media types." +msgstr "" + +msgid ":gh:`143923`: Reject control characters in POP3 commands." +msgstr "" + +msgid ":gh:`143921`: Reject control characters in IMAP commands." +msgstr "" + +msgid ":gh:`143919`: Reject control characters in :class:`http.cookies.Morsel` fields and values." +msgstr "" + +msgid ":gh:`143916`: Reject C0 control characters within wsgiref.headers.Headers fields, values, and parameters." +msgstr "" + +msgid ":gh:`144538`: Bump the version of pip bundled in ensurepip to version 26.0.1" +msgstr "" + +msgid ":gh:`144493`: Improve an exception error message in ``_overlapped.BindLocal()`` that is raised when :meth:`asyncio.loop.sock_connect` is called on a :class:`asyncio.ProactorEventLoop` with a socket that has an invalid address family." +msgstr "" + +msgid ":gh:`144386`: Add support for arbitrary descriptors :meth:`!__enter__`, :meth:`!__exit__`, :meth:`!__aenter__`, and :meth:`!__aexit__` in :class:`contextlib.ExitStack` and :class:`contextlib.AsyncExitStack`, for consistency with the :keyword:`with` and :keyword:`async with` statements." +msgstr "" + +msgid ":gh:`123471`: Make concurrent iteration over :class:`itertools.combinations_with_replacement` and :class:`itertools.permutations` safe under free-threading." +msgstr "" + +msgid ":gh:`74453`: Deprecate :func:`os.path.commonprefix` in favor of :func:`os.path.commonpath` for path segment prefixes." +msgstr "" + +msgid "The :func:`os.path.commonprefix` function is being deprecated due to having a misleading name and module. The function is not safe to use for path prefixes despite being included in a module about path manipulation, meaning it is easy to accidentally introduce path traversal vulnerabilities into Python programs by using this function." +msgstr "" + +msgid ":gh:`144380`: Improve performance of :class:`io.BufferedReader` line iteration by ~49%." +msgstr "" + +msgid ":gh:`144363`: Update bundled `libexpat `_ to 2.7.4" +msgstr "" + +msgid ":gh:`140824`: When :mod:`faulthandler` dumps the list of third-party extension modules, ignore sub-modules of stdlib packages. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`144206`: Improve error messages for buffer overflow in :func:`fcntl.fcntl` and :func:`fcntl.ioctl`." +msgstr "" + +msgid ":gh:`144264`: Speed up Base64 decoding of data containing ignored characters (both in non-strict mode and with an explicit *ignorechars* argument). It is now up to 2 times faster for multiline Base64 data." +msgstr "" + +msgid ":gh:`144249`: Add filename context to :exc:`OSError` exceptions raised by :func:`ssl.SSLContext.load_cert_chain`, allowing users to have more context." +msgstr "" + +msgid ":gh:`132888`: Fix incorrect use of :func:`ctypes.GetLastError` and add missing error checks for Windows API calls in :mod:`!_pyrepl.windows_console`." +msgstr "" + +msgid ":gh:`142956`: Updated :mod:`tomllib` to parse TOML 1.1.0." +msgstr "" + +msgid ":gh:`144217`: :mod:`mimetypes`: Add support for DICOM files (for medical imaging) with the official MIME type ``application/dicom``. Patch by Benedikt Johannes." +msgstr "" + +msgid ":gh:`144212`: Mime type ``image/jxl`` is now supported by :mod:`mimetypes`." +msgstr "" + +msgid ":gh:`143594`: Add :meth:`symtable.Function.get_cells` and :meth:`symtable.Symbol.is_cell` methods." +msgstr "" + +msgid ":gh:`144169`: Fix three crashes when non-string keyword arguments are supplied to objects in the :mod:`ast` module." +msgstr "" + +msgid ":gh:`144128`: Fix a crash in :meth:`array.array.fromlist` when an element's :meth:`~object.__index__` method mutates the input list during conversion." +msgstr "" + +msgid ":gh:`144100`: Fixed a crash in ctypes when using a deprecated ``POINTER(str)`` type in ``argtypes``. Instead of aborting, ctypes now raises a proper Python exception when the pointer target type is unresolved." +msgstr "" + +msgid ":gh:`143658`: :mod:`importlib.metadata`: Use :meth:`str.lower` and :meth:`str.replace` to further improve performance of :meth:`!importlib.metadata.Prepared.normalize`. Patch by Hugo van Kemenade and Henry Schreiner." +msgstr "" + +msgid ":gh:`144050`: Fix :func:`stat.filemode` in the pure-Python implementation to avoid misclassifying invalid mode values as block devices." +msgstr "" + +msgid ":gh:`83069`: :meth:`subprocess.Popen.wait`: when ``timeout`` is not ``None``, an efficient event-driven mechanism now waits for process termination, if available. Linux >= 5.3 uses :func:`os.pidfd_open` + :func:`select.poll`. macOS and other BSD variants use :func:`select.kqueue` + ``KQ_FILTER_PROC`` + ``KQ_NOTE_EXIT``. Windows keeps using ``WaitForSingleObject`` (unchanged). If none of these mechanisms are available, the function falls back to the traditional busy loop (non-blocking call and short sleeps). Patch by Giampaolo Rodola." +msgstr "" + +msgid ":gh:`144030`: The Python implementation of :func:`functools.lru_cache` differed from the default C implementation in that it did not check that its argument is callable. This discrepancy is now fixed and both raise a :exc:`TypeError`." +msgstr "" + +msgid ":gh:`144001`: Added the *ignorechars* parameter in :func:`binascii.a2b_base64` and :func:`base64.b64decode`." +msgstr "" + +msgid ":gh:`144023`: Fixed validation of file descriptor 0 in posix functions when used with follow_symlinks parameter." +msgstr "" + +msgid ":gh:`143999`: Fix an issue where :func:`inspect.getgeneratorstate` and :func:`inspect.getcoroutinestate` could fail for generators wrapped by :func:`types.coroutine` in the suspended state." +msgstr "" + +msgid ":gh:`143952`: Fixed :mod:`asyncio` debugging tools to work with new remote debugging API. Patch by Bartosz Sławecki." +msgstr "" + +msgid ":gh:`143904`: :func:`struct.pack_into` now raises OverflowError instead of IndexError for too large *offset* argument." +msgstr "" + +msgid ":gh:`143897`: Remove the :meth:`!isxidstart` and :meth:`!isxidcontinue` methods of :data:`unicodedata.ucd_3_2_0`. They are now only exposed as :func:`unicodedata.isxidstart` and :func:`unicodedata.isxidcontinue`." +msgstr "" + +msgid ":gh:`143831`: :class:`annotationlib.ForwardRef` objects are now hashable when created from annotation scopes with closures. Previously, hashing such objects would throw an exception. Patch by Bartosz Sławecki." +msgstr "" + +msgid ":gh:`143874`: Fixed a bug in :mod:`pdb` where expression results were not sent back to remote client." +msgstr "" + +msgid ":gh:`143754`: Add new :mod:`tkinter` widget methods :meth:`!pack_content`, :meth:`!place_content` and :meth:`!grid_content` which are alternative spelling of old :meth:`!*_slaves` methods." +msgstr "" + +msgid ":gh:`143756`: Fix potential thread safety issues in :mod:`ssl` module." +msgstr "" + +msgid ":gh:`132604`: Previously, :class:`~typing.Protocol` classes that were not decorated with :deco:`~typing.runtime_checkable`, but that inherited from another ``Protocol`` class that did have this decorator, could be used in :func:`isinstance` and :func:`issubclass` checks. This behavior is now deprecated and such checks will throw a :exc:`TypeError` in Python 3.20. Patch by Bartosz Sławecki." +msgstr "" + +msgid ":gh:`143543`: Fix a crash in itertools.groupby that could occur when a user-defined :meth:`~object.__eq__` method re-enters the iterator during key comparison." +msgstr "" + +msgid ":gh:`143689`: Fix :meth:`io.BufferedReader.read1` state cleanup on buffer allocation failure." +msgstr "" + +msgid ":gh:`143602`: Fix a inconsistency issue in :meth:`~io.RawIOBase.write` that leads to unexpected buffer overwrite by deduplicating the buffer exports." +msgstr "" + +msgid ":gh:`142434`: Use ``ppoll()`` if available in :func:`select.poll` to have a timeout resolution of 1 nanosecond, instead of a resolution of 1 ms. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`140557`: :class:`array.array` buffers now have the same alignment when empty as when allocated. Unaligned buffers can still be created by slicing." +msgstr "" + +msgid ":gh:`143423`: Fix free-threaded build detection in the sampling profiler when Py_GIL_DISABLED is set to 0." +msgstr "" + +msgid ":gh:`101178`: Add Ascii85, Base85, and Z85 support to :mod:`binascii` and improve the performance of the base-85 converters in :mod:`base64`." +msgstr "" + +msgid ":gh:`142966`: Fix :func:`!ctypes.POINTER.set_type` not updating the format string to match the type." +msgstr "" + +msgid ":gh:`142555`: :mod:`array`: fix a crash in ``a[i] = v`` when converting *i* to an index via :meth:`i.__index__ ` or :meth:`i.__float__ ` mutates the array." +msgstr "" + +msgid ":gh:`142438`: Fix _decimal builds configured with EXTRA_FUNCTIONALITY by correcting the Context.apply wrapper to pass the right argument." +msgstr "" + +msgid ":gh:`141860`: Add an ``on_error`` keyword-only parameter to :func:`multiprocessing.set_forkserver_preload` to control how import failures during module preloading are handled. Accepts ``'ignore'`` (default, silent), ``'warn'`` (emit :exc:`ImportWarning`), or ``'fail'`` (raise exception). Contributed by Nick Neumann and Gregory P. Smith." +msgstr "" + +msgid ":gh:`125346`: Accepting ``+`` and ``/`` characters with an alternative alphabet in :func:`base64.b64decode` and :func:`base64.urlsafe_b64decode` is now deprecated. In future Python versions they will be errors in the strict mode and discarded in the non-strict mode." +msgstr "" + +msgid ":gh:`140715`: Add ``'%F'`` support to :meth:`~datetime.datetime.strptime`." +msgstr "" + +msgid ":gh:`67041`: Add the *missing_as_none* parameter to :func:`~urllib.parse.urlparse`, :func:`~urllib.parse.urlsplit` and :func:`~urllib.parse.urldefrag` functions. Add the *keep_empty* parameter to :func:`~urllib.parse.urlunparse` and :func:`~urllib.parse.urlunsplit` functions. This allows to distinguish between empty and not defined URI components and preserve empty components." +msgstr "" + +msgid ":gh:`77188`: The :mod:`pickle` module now properly handles name-mangled private methods." +msgstr "" + +msgid ":gh:`143774`: Better explain the operation of Format / Format Paragraph." +msgstr "" + +msgid ":gh:`134584`: Optimize and eliminate ref-counting in ``_BINARY_OP_SUBSCR_LIST_SLICE``" +msgstr "" + +msgid ":gh:`144563`: Fix interaction of the Tachyon profiler and :mod:`ctypes` and other modules that load the Python shared library (if present) in an independent map as this was causing the mechanism that loads the binary information to be confused. Patch by Pablo Galindo" +msgstr "" + +msgid ":gh:`144601`: Fix crash when importing a module whose ``PyInit`` function raises an exception from a subinterpreter." +msgstr "" + +msgid ":gh:`144549`: Fix building the tail calling interpreter on Visual Studio 2026 with free-threading." +msgstr "" + +msgid ":gh:`144513`: Fix potential deadlock when using critical sections during stop-the-world pauses in the free-threaded build." +msgstr "" + +msgid ":gh:`131798`: Optimise ``_GUARD_TOS_SLICE`` in the JIT." +msgstr "" + +msgid ":gh:`144330`: Move ``classmethod`` and ``staticmethod`` initialization from ``__init__()`` to ``__new__()``. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`144446`: Fix data races in the free-threaded build when reading frame object attributes while another thread is executing the frame." +msgstr "" + +msgid ":gh:`120321`: Add ``gi_state``, ``cr_state``, and ``ag_state`` attributes to generators, coroutines, and async generators that return the current state as a string (e.g., ``GEN_RUNNING``). The :mod:`inspect` module functions :func:`~inspect.getgeneratorstate`, :func:`~inspect.getcoroutinestate`, and :func:`~inspect.getasyncgenstate` now return these attributes directly." +msgstr "" + +msgid ":gh:`141563`: Fix thread safety of :c:macro:`! PyDateTime_IMPORT`." +msgstr "" + +msgid ":gh:`144280`: Fix a bug in JIT where the predicate symbol had no truthiness" +msgstr "" + +msgid ":gh:`140550`: In :c:member:`PyModuleDef.m_slots`, allow slots that repeat information present in :c:type:`PyModuleDef`." +msgstr "" + +msgid ":gh:`139103`: Improve scaling of :func:`~collections.namedtuple` instantiation in the free-threaded build." +msgstr "" + +msgid ":gh:`144307`: Prevent a reference leak in module teardown at interpreter finalization." +msgstr "" + +msgid ":gh:`144319`: Add huge pages support for the pymalloc allocator. Patch by Pablo Galindo" +msgstr "" + +msgid ":gh:`120321`: Made ``gi_yieldfrom`` thread-safe in the free-threading build by using a lightweight lock on the frame state." +msgstr "" + +msgid ":gh:`144194`: Fix error handling in perf jitdump initialization on memory allocation failure." +msgstr "" + +msgid ":gh:`143962`: Name suggestion for not normalized name suggests now the normalized name or the closest name to the normalized name. If the suggested name is not ASCII, include also its ASCII representation." +msgstr "" + +msgid ":gh:`144157`: :meth:`bytes.translate` now allows the compiler to unroll its loop more usefully for a 2x speedup in the common no-deletions specified case." +msgstr "" + +msgid ":gh:`144068`: Fix JIT tracer memory leak, ensure the JIT tracer state is freed when daemon threads are cleaned up during interpreter shutdown." +msgstr "" + +msgid ":gh:`144012`: Check if the result is ``NULL`` in ``BINARY_OP_EXTENT`` opcode." +msgstr "" + +msgid ":gh:`144007`: Eliminate redundant refcounting in the JIT for ``BINARY_OP``." +msgstr "" + +msgid ":gh:`144005`: Eliminate redundant refcounting from ``BINARY_OP_EXTEND``." +msgstr "" + +msgid ":gh:`143939`: Fix erroneous \"cannot reuse already awaited coroutine\" error that could occur when a generator was run during the process of clearing a coroutine's frame." +msgstr "" + +msgid ":gh:`141805`: Fix crash in :class:`set` when objects with the same hash are concurrently added to the set after removing an element with the same hash while the set still contains elements with the same hash." +msgstr "" + +msgid ":gh:`143670`: Fixes a crash in ``ga_repr_items_list`` function." +msgstr "" + +msgid ":gh:`143650`: Fix race condition in :mod:`importlib` where a thread could receive a stale module reference when another thread's import fails." +msgstr "" + +msgid ":gh:`143569`: Generator expressions in 3.15 now conform to the documented behavior when the iterable does not support iteration. This matches the behavior in 3.14 and earlier" +msgstr "" + +msgid ":gh:`143192`: Improve performance of bitwise operations on multi-digit ints." +msgstr "" + +msgid ":gh:`132657`: If we are specializing to ``LOAD_GLOBAL_MODULE`` or ``LOAD_ATTR_MODULE``, try to enable deferred reference counting for the value, if the object is owned by a different thread. This applies to the free-threaded build only and should improve scaling of multi-threaded programs. Note that when deferred reference counting is enabled, the object will be deallocated by the GC, rather than by :c:func:`Py_DECREF`." +msgstr "" + +msgid ":gh:`143055`: Implement :pep:`798` (Unpacking in Comprehensions). Patch by Adam Hartz." +msgstr "" + +msgid ":gh:`142037`: Improve error messages for printf-style formatting. For errors in the format string, always include the position of the start of the format unit. For errors related to the formatted arguments, always include the number or the name of the argument. Raise more specific errors and include more information (type and number of arguments, most probable causes of error)." +msgstr "" + +msgid ":gh:`140557`: :class:`bytearray` buffers now have the same alignment when empty as when allocated. Unaligned buffers can still be created by slicing." +msgstr "" + +msgid ":gh:`140232`: Frozenset objects with immutable elements are no longer tracked by the garbage collector." +msgstr "" + +msgid ":gh:`115231`: Setup ``__module__`` attribute for built-in static methods. Patch by Sergey B Kirpichev." +msgstr "" + +msgid ":gh:`143869`: Added :c:func:`PyLong_GetNativeLayout`, :c:struct:`PyLongLayout`, :c:struct:`PyLongExport`, :c:func:`PyLong_Export`, :c:func:`PyLong_FreeExport`, :c:struct:`PyLongWriter`, :c:func:`PyLongWriter_Create`, :c:func:`PyLongWriter_Finish` and :c:func:`PyLongWriter_Discard` to the limited API." +msgstr "" + +msgid ":gh:`141070`: Renamed :c:func:`!PyUnstable_Object_Dump` to :c:func:`PyObject_Dump`." +msgstr "" + +msgid ":gh:`140421`: Disable the perf trampoline on older macOS versions where it cannot be built." +msgstr "" + +msgid ":gh:`144309`: Build Python with POSIX 2024, instead of POSIX 2008. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`144278`: Enables defining the ``_PY_IMPL_NAME`` and ``_PY_IMPL_CACHE_TAG`` preprocessor definitions to override :data:`sys.implementation` at build time. Definitions need to include quotes when setting to a string literal. Setting the cache tag to ``NULL`` has the effect of completely disabling automatic creation and use of ``.pyc`` files." +msgstr "" + +msgid ":gh:`143960`: Add support for OpenSSL 3.6, drop EOL 3.2. Patch by Hugo van Kemenade." +msgstr "" + +msgid ":gh:`143941`: Move WASI-related files to :file:`Platforms/WASI`. Along the way, leave a deprecated :file:`Tools/wasm/wasi/__main__.py` behind for backwards-compatibility." +msgstr "" + +msgid ":gh:`143842`: Prevent static builds from clashing with curses by making the optimizer COLORS table static." +msgstr "" + +msgid "Python 3.15.0 alpha 5" +msgstr "" + +msgid "*Release date: 2026-01-14*" +msgstr "" + +msgid ":gh:`143082`: Fix :mod:`pdb` arrow key history not working when ``stdin`` is ``sys.stdin``." +msgstr "" + +msgid ":gh:`128067`: Fix a bug in PyREPL on Windows where output without a trailing newline was overwritten by the next prompt." +msgstr "" + +msgid ":gh:`142095`: Make gdb 'py-bt' command use frame from thread local state when available. Patch by Sam Gross and Victor Stinner." +msgstr "" + +msgid ":gh:`143460`: Skip tests relying on infinite recusion if stack size is unlimited." +msgstr "" + +msgid ":gh:`143553`: Add support for parametrized resources, such as ``-u xpickle=2.7``." +msgstr "" + +msgid ":issue:`31391`: Forward-port test_xpickle from Python 2 to Python 3 and add the resource back to test's command line." +msgstr "" + +msgid ":gh:`143706`: Fix :mod:`multiprocessing` forkserver so that :data:`sys.argv` is correctly set before ``__main__`` is preloaded. Previously, :data:`sys.argv` was empty during main module import in forkserver child processes. This fixes a regression introduced in 3.13.8 and 3.14.1. Root caused by Aaron Wieczorek, test provided by Thomas Watson, thanks!" +msgstr "" + +msgid ":gh:`143638`: Forbid reentrant calls of the :class:`pickle.Pickler` and :class:`pickle.Unpickler` methods for the C implementation. Previously, this could cause crash or data corruption, now concurrent calls of methods of the same object raise :exc:`RuntimeError`." +msgstr "" + +msgid ":gh:`143658`: :mod:`importlib.metadata`: Use :meth:`str.translate` to improve performance of :meth:`!importlib.metadata.Prepared.normalize`. Patch by Hugo van Kemenade and Henry Schreiner." +msgstr "" + +msgid ":gh:`78724`: Raise :exc:`RuntimeError`'s when user attempts to call methods on half-initialized :class:`~struct.Struct` objects, For example, created by ``Struct.__new__(Struct)``. Patch by Sergey B Kirpichev." +msgstr "" + +msgid ":gh:`143196`: Fix crash when the internal encoder object returned by undocumented function :func:`!json.encoder.c_make_encoder` was called with non-zero second (*_current_indent_level*) argument." +msgstr "" + +msgid ":gh:`143191`: :func:`_thread.stack_size` now raises :exc:`ValueError` if the stack size is too small. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`143547`: Fix :func:`sys.unraisablehook` when the hook raises an exception and changes :func:`sys.unraisablehook`: hold a strong reference to the old hook. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`139686`: Revert 0a97941245f1dda6d838f9aaf0512104e5253929 and 57db12514ac686f0a752ec8fe1c08b6daa0c6219 which made importlib.reload a no-op for lazy modules; caused Buildbot failures." +msgstr "" + +msgid ":gh:`143517`: :func:`annotationlib.get_annotations` no longer raises a :exc:`SyntaxError` when evaluating a stringified starred annotation that starts with one or more whitespace characters followed by a ``*``. Patch by Bartosz Sławecki." +msgstr "" + +msgid ":gh:`143474`: Add :data:`os.RWF_ATOMIC` constant for Linux 6.11+." +msgstr "" + +msgid ":gh:`143445`: Speed up :func:`copy.deepcopy` by 1.04x." +msgstr "" + +msgid ":gh:`143378`: Fix use-after-free crashes when a :class:`~io.BytesIO` object is concurrently mutated during :meth:`~io.RawIOBase.write` or :meth:`~io.IOBase.writelines`." +msgstr "" + +msgid ":gh:`143368`: Fix endless retry loop in :mod:`profiling.sampling` blocking mode when threads cannot be seized due to ``EPERM``. Such threads are now skipped instead of causing repeated error messages. Patch by Pablo Galindo." +msgstr "" + +msgid ":gh:`143346`: Fix incorrect wrapping of the Base64 data in :class:`!plistlib._PlistWriter` when the indent contains a mix of tabs and spaces." +msgstr "" + +msgid ":gh:`140025`: :mod:`queue`: Fix :meth:`!SimpleQueue.__sizeof__` computation." +msgstr "" + +msgid ":gh:`143310`: :mod:`tkinter`: fix a crash when a Python :class:`list` is mutated during the conversion to a Tcl object (e.g., when setting a Tcl variable). Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`143309`: Fix a crash in :func:`os.execve` on non-Windows platforms when given a custom environment mapping which is then mutated during parsing. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`143308`: :mod:`pickle`: fix use-after-free crashes when a :class:`~pickle.PickleBuffer` is concurrently mutated by a custom buffer callback during pickling. Patch by Bénédikt Tran and Aaron Wieczorek." +msgstr "" + +msgid ":gh:`142939`: Performance optimisations for :func:`difflib.get_close_matches`" +msgstr "" + +msgid ":gh:`124951`: The base64 implementation behind the :mod:`binascii`, :mod:`base64`, and related codec has been optimized for modern pipelined CPU architectures and now performs 2-3x faster across all platforms." +msgstr "" + +msgid ":gh:`143237`: Fix support of named pipes in the rotating :mod:`logging` handlers." +msgstr "" + +msgid ":gh:`143249`: Fix possible buffer leaks in Windows overlapped I/O on error handling." +msgstr "" + +msgid ":gh:`143241`: :mod:`zoneinfo`: fix infinite loop in :meth:`ZoneInfo.from_file ` when parsing a malformed TZif file. Patch by Fatih Celik." +msgstr "" + +msgid ":gh:`142830`: :mod:`sqlite3`: fix use-after-free crashes when the connection's callbacks are mutated during a callback execution. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`143200`: :mod:`xml.etree.ElementTree`: fix use-after-free crashes in :meth:`~object.__getitem__` and :meth:`~object.__setitem__` methods of :class:`~xml.etree.ElementTree.Element` when the element is concurrently mutated. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`143214`: Add the *wrapcol* parameter in :func:`binascii.b2a_base64` and :func:`base64.b64encode`." +msgstr "" + +msgid ":gh:`142195`: Updated timeout evaluation logic in :mod:`subprocess` to be compatible with deterministic environments like Shadow where time moves exactly as requested." +msgstr "" + +msgid ":gh:`140739`: Fix several crashes due to reading invalid memory in the new Tachyon sampling profiler. Patch by Pablo Galindo." +msgstr "" + +msgid ":gh:`142164`: Fix the ctypes bitfield overflow error message to report the correct offset and size calculation." +msgstr "" + +msgid ":gh:`143145`: Fixed a possible reference leak in ctypes when constructing results with multiple output parameters on error." +msgstr "" + +msgid ":gh:`143103`: Add padding support to :func:`base64.z85encode` via the ``pad`` parameter." +msgstr "" + +msgid ":gh:`130796`: Undeprecate the :func:`locale.getdefaultlocale` function. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`74902`: Add the :func:`~unicodedata.iter_graphemes` function in the :mod:`unicodedata` module to iterate over grapheme clusters according to rules defined in `Unicode Standard Annex #29, \"Unicode Text Segmentation\" `_. Add :func:`~unicodedata.grapheme_cluster_break`, :func:`~unicodedata.indic_conjunct_break` and :func:`~unicodedata.extended_pictographic` functions to get the properties of the character which are related to the above algorithm." +msgstr "" + +msgid ":gh:`143004`: Fix a potential use-after-free in :meth:`collections.Counter.update` when user code mutates the Counter during an update." +msgstr "" + +msgid ":gh:`140648`: The :mod:`asyncio` REPL now respects the :option:`-I` flag (isolated mode). Previously, it would load and execute :envvar:`PYTHONSTARTUP` even if the flag was set. Contributed by Bartosz Sławecki." +msgstr "" + +msgid ":gh:`142991`: Fixed socket operations such as recvfrom() and sendto() for FreeBSD divert(4) socket." +msgstr "" + +msgid ":gh:`116738`: Make the attributes in :mod:`lzma` thread-safe on the :term:`free threaded ` build." +msgstr "" + +msgid ":gh:`142950`: Fix regression in :mod:`argparse` where format specifiers in help strings raised :exc:`ValueError`." +msgstr "" + +msgid ":gh:`142881`: Fix concurrent and reentrant call of :func:`atexit.unregister`." +msgstr "" + +msgid ":gh:`142615`: Fix possible crashes when initializing :class:`asyncio.Task` or :class:`asyncio.Future` multiple times. These classes can now be initialized only once and any subsequent initialization attempt will raise a RuntimeError. Patch by Kumar Aditya." +msgstr "" + +msgid ":gh:`142517`: The non-``compat32`` :mod:`email` policies now correctly handle refolding encoded words that contain bytes that can not be decoded in their specified character set. Previously this resulted in an encoding exception during folding." +msgstr "" + +msgid ":gh:`138122`: The Tachyon profiler's live TUI now integrates with the experimental :mod:`!_colorize` theming system. Users can customize colors via :func:`!_colorize.set_theme` (experimental API, subject to change). A :class:`!LiveProfilerLight` theme is provided for light terminal backgrounds. Patch by Pablo Galindo." +msgstr "" + +msgid ":gh:`142306`: Improve errors for :meth:`Element.remove `." +msgstr "" + +msgid ":gh:`63016`: Add a ``flags`` parameter to :meth:`mmap.mmap.flush` to control synchronization behavior." +msgstr "" + +msgid ":gh:`139262`: Some keystrokes can be swallowed in the new ``PyREPL`` on Windows, especially when used together with the ALT key. Fix by Chris Eibl." +msgstr "" + +msgid ":gh:`138897`: Improved :data:`license`/:data:`copyright`/:data:`credits` display in the :term:`REPL`: now uses a pager." +msgstr "" + +msgid ":gh:`135852`: Add :func:`!_winapi.RegisterEventSource`, :func:`!_winapi.DeregisterEventSource` and :func:`!_winapi.ReportEvent`. Using these functions in :class:`~logging.handlers.NTEventLogHandler` to replace :mod:`!pywin32`." +msgstr "" + +msgid ":gh:`109263`: Starting a process from spawn context in :mod:`multiprocessing` no longer sets the start method globally." +msgstr "" + +msgid ":gh:`132715`: Skip writing objects during marshalling once a failure has occurred." +msgstr "" + +msgid ":gh:`140806`: Add documentation for :func:`enum.bin`." +msgstr "" + +msgid ":gh:`134584`: Eliminate redundant refcounting from ``_CONTAINS_OP``, ``_CONTAINS_OP_SET`` and ``_CONTAINS_OP_DICT``." +msgstr "" + +msgid ":gh:`143604`: Fix a reference counting issue in the JIT tracer where the current executor could be prematurely freed during tracing." +msgstr "" + +msgid ":gh:`143469`: Enable :opcode:`!LOAD_ATTR_MODULE` specialization even if :func:`!__getattr__` is defined in module." +msgstr "" + +msgid ":gh:`134584`: Eliminate redundant refcounting from ``TO_BOOL_STR``." +msgstr "" + +msgid ":gh:`143377`: Fix a crash in :func:`!_interpreters.capture_exception` when the exception is incorrectly formatted. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`139757`: Add ``BINARY_OP_SUBSCR_USTR_INT`` to specialize reading an ASCII character from any string. Patch by Chris Eibl." +msgstr "" + +msgid ":gh:`141504`: Factor out tracing and optimization heuristics into a single object. Patch by Donghee Na." +msgstr "" + +msgid ":gh:`142982`: Specialize :opcode:`CALL_FUNCTION_EX` for Python and non-Python callables." +msgstr "" + +msgid ":gh:`136924`: The interactive help mode in the :term:`REPL` no longer incorrectly syntax highlights text input as Python code. Contributed by Olga Matoula." +msgstr "" + +msgid ":gh:`139757`: Fix unintended bytecode specialization for non-ascii string. Patch by Donghee Na, Ken Jin and Chris Eibl." +msgstr "" + +msgid ":gh:`143361`: Add ``PY_VECTORCALL_ARGUMENTS_OFFSET`` to ``_Py_CallBuiltinClass_StackRefSteal`` to avoid redundant allocations" +msgstr "" + +msgid ":gh:`131798`: The JIT optimizer now understands more generator instructions." +msgstr "" + +msgid ":gh:`134584`: Eliminate redundant refcounting from ``_LOAD_ATTR_SLOT``." +msgstr "" + +msgid ":gh:`143189`: Fix crash when inserting a non-:class:`str` key into a split table dictionary when the key matches an existing key in the split table but has no corresponding value in the dict." +msgstr "" + +msgid ":gh:`143228`: Fix use-after-free in perf trampoline when toggling profiling while threads are running or during interpreter finalization with daemon threads active. The fix uses reference counting to ensure trampolines are not freed while any code object could still reference them. Pach by Pablo Galindo" +msgstr "" + +msgid ":gh:`142664`: Fix a use-after-free crash in :meth:`memoryview.__hash__ ` when the ``__hash__`` method of the referenced object mutates that object or the view. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`142557`: Fix a use-after-free crash in :ref:`bytearray.__mod__ ` when the :class:`!bytearray` is mutated while formatting the ``%``-style arguments. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`143195`: Fix use-after-free crashes in :meth:`bytearray.hex` and :meth:`memoryview.hex` when the separator's :meth:`~object.__len__` mutates the original object. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`143183`: Fix a bug in the JIT when dealing with unsupported control-flow or operations." +msgstr "" + +msgid ":gh:`142975`: Fix crash after unfreezing all objects tracked by the garbage collector on the :term:`free threaded ` build." +msgstr "" + +msgid ":gh:`143135`: Set :data:`sys.flags.inspect` to ``1`` when :envvar:`PYTHONINSPECT` is ``0``. Previously, it was set to ``0`` in this case." +msgstr "" + +msgid ":gh:`143123`: Protect the JIT against recursive tracing." +msgstr "" + +msgid ":gh:`143092`: Fix a crash in the JIT when dealing with ``list.append(x)`` style code." +msgstr "" + +msgid ":gh:`143003`: Fix an overflow of the shared empty buffer in :meth:`bytearray.extend` when ``__length_hint__()`` returns 0 for non-empty iterator." +msgstr "" + +msgid ":gh:`143006`: Fix a possible assertion error when comparing negative non-integer ``float`` and ``int`` with the same number of bits in the integer part." +msgstr "" + +msgid ":gh:`116738`: Fix thread safety of :func:`contextvars.Context.run`." +msgstr "" + +msgid ":gh:`142829`: Fix a use-after-free crash in :class:`contextvars.Context` comparison when a custom ``__eq__`` method modifies the context via :meth:`~contextvars.ContextVar.set`." +msgstr "" + +msgid ":gh:`142863`: Generate optimized bytecode when calling :class:`list` or :class:`set` with generator expression." +msgstr "" + +msgid ":gh:`41779`: Allowed defining any :ref:`__slots__ ` for a class derived from :class:`tuple` (including classes created by :func:`collections.namedtuple`)." +msgstr "" + +msgid ":gh:`69605`: Fix edge-cases around already imported modules in the :term:`REPL` auto-completion of imports." +msgstr "" + +msgid ":gh:`138568`: Adjusted the built-in :func:`help` function so that empty inputs are ignored in interactive mode." +msgstr "" + +msgid ":gh:`131798`: Remove bounds check when indexing into tuples with a constant index." +msgstr "" + +msgid ":gh:`134584`: Eliminate redundant refcounting from ``_CALL_TYPE_1``. Patch by Tomas Roun" +msgstr "" + +msgid ":gh:`132108`: Speed up :meth:`int.from_bytes` when passed object supports :ref:`buffer protocol `, like :class:`bytearray` by ~1.2x." +msgstr "" + +msgid ":gh:`128334`: Make the :class:`slice` class subscriptable at runtime to be consistent with typing implementation." +msgstr "" + +msgid ":gh:`141671`: :c:macro:`PyMODINIT_FUNC` (and the new :c:macro:`PyMODEXPORT_FUNC`) now adds a linkage declaration (``__declspec(dllexport)``) on Windows." +msgstr "" + +msgid "Python 3.15.0 alpha 4" +msgstr "" + +msgid "*Release date: 2026-01-13*" +msgstr "" + +msgid ":gh:`142836`: Accommodated Solaris in ``test_pdb.test_script_target_anonymous_pipe``." +msgstr "" + +msgid ":gh:`122431`: Corrected the error message in :func:`readline.append_history_file` to state that ``nelements`` must be non-negative instead of positive." +msgstr "" + +msgid ":gh:`143046`: The :mod:`asyncio` REPL no longer prints copyright and version messages in the quiet mode (:option:`-q`). Patch by Bartosz Sławecki." +msgstr "" + +msgid ":gh:`80744`: Fix issue where ``pdb`` would read a ``.pdbrc`` twice if launched from the home directory" +msgstr "" + +msgid ":gh:`138122`: Add blocking mode to Tachyon for accurate stack traces in applications with many generators or fast-changing call stacks. Patch by Pablo Galindo." +msgstr "" + +msgid ":gh:`143010`: Fixed a bug in :mod:`mailbox` where the precise timing of an external event could result in the library opening an existing file instead of a file it expected to create." +msgstr "" + +msgid ":gh:`112127`: Fix possible use-after-free in :func:`atexit.unregister` when the callback is unregistered during comparison." +msgstr "" + +msgid ":gh:`138122`: Fix incomplete stack traces in the Tachyon profiler's frame cache when profiling code with deeply nested generators. The frame cache now validates that stack traces reach the base frame before caching, preventing broken flamegraphs. Patch by Pablo Galindo." +msgstr "" + +msgid ":gh:`142834`: Change the :mod:`pdb` ``commands`` command to use the last available breakpoint instead of failing when the most recently created breakpoint was deleted." +msgstr "" + +msgid ":gh:`142783`: Fix zoneinfo use-after-free with descriptor _weak_cache. a descriptor as _weak_cache could cause crashes during object creation. The fix ensures proper reference counting for descriptor-provided objects." +msgstr "" + +msgid ":gh:`76007`: Deprecate ``VERSION`` from :mod:`xml.etree.ElementTree` and ``version`` from :mod:`!xml.sax.expatreader` and :mod:`xml.sax.handler`. Patch by Hugo van Kemenade." +msgstr "" + +msgid ":gh:`142784`: The :mod:`asyncio` REPL now properly closes the loop upon the end of interactive session. Previously, it could cause surprising warnings. Contributed by Bartosz Sławecki." +msgstr "" + +msgid ":gh:`138122`: Add binary output format to :mod:`profiling.sampling` for compact storage of profiling data. The new ``--binary`` option captures samples to a file that can be converted to other formats using the ``replay`` command. Patch by Pablo Galindo" +msgstr "" + +msgid ":gh:`142495`: :class:`collections.defaultdict` now prioritizes :meth:`~object.__setitem__` when inserting default values from ``default_factory``. This prevents race conditions where a default value would overwrite a value set before ``default_factory`` returns." +msgstr "" + +msgid ":gh:`142654`: Show the clearer error message when using ``profiling.sampling`` on an unknown PID." +msgstr "" + +msgid ":gh:`142560`: Fix use-after-free in :class:`bytearray` search-like methods (:meth:`~bytearray.find`, :meth:`~bytearray.count`, :meth:`~bytearray.index`, :meth:`~bytearray.rindex`, and :meth:`~bytearray.rfind`) by marking the storage as exported which causes reallocation attempts to raise :exc:`BufferError`. For :func:`~operator.contains`, :meth:`~bytearray.split`, and :meth:`~bytearray.rsplit` the :ref:`buffer protocol ` is used for this." +msgstr "" + +msgid ":gh:`142419`: :meth:`mmap.mmap.set_name` method added to annotate an anonymous memory map if Linux kernel supports ``PR_SET_VMA_ANON_NAME`` (Linux 5.17 or newer). Patch by Donghee Na." +msgstr "" + +msgid ":gh:`139971`: :mod:`pydoc`: Ensure that the link to the online documentation of a :term:`stdlib` module is correct." +msgstr "" + +msgid ":gh:`124098`: Fix issue where methods in handlers that lacked the protocol name but matched a valid base handler method (e.g., ``_open()`` or ``error()``) were incorrectly added to :class:`urllib.request.OpenerDirector`'s handlers. Contributed by Andrea Mattei." +msgstr "" + +msgid ":gh:`136282`: Add support for :const:`~configparser.UNNAMED_SECTION` when creating a section via the mapping protocol access" +msgstr "" + +msgid ":gh:`143057`: Avoid locking in :c:func:`PyTraceMalloc_Track` and :c:func:`PyTraceMalloc_Untrack` when :mod:`tracemalloc` is not enabled." +msgstr "" + +msgid ":gh:`139109`: Add missing terminator in certain cases when tracing in the new JIT compiler." +msgstr "" + +msgid ":gh:`142961`: Fix a segfault in the JIT when constant folding ``len(tuple)``." +msgstr "" + +msgid ":gh:`142776`: Fix a file descriptor leak in import.c" +msgstr "" + +msgid ":gh:`139757`: Fix building JIT stencils on free-threaded builds." +msgstr "" + +msgid ":gh:`129068`: Make concurrent iteration over the same range iterator thread-safe in the free threading build." +msgstr "" + +msgid ":gh:`142543`: Fix a stack overflow on Clang JIT build configurations with full LTO." +msgstr "" + +msgid ":gh:`142448`: Fix a bug when using monitoring with the JIT." +msgstr "" + +msgid ":gh:`142766`: Clear the frame of a generator when :meth:`generator.close` is called." +msgstr "" + +msgid ":gh:`134584`: Eliminate redundant refcounting from ``_LOAD_ATTR_INSTANCE_VALUE``." +msgstr "" + +msgid ":gh:`134584`: Eliminate redundant refcounting from ``_STORE_ATTR_WITH_HINT``." +msgstr "" + +msgid ":gh:`142476`: Fix a memory leak in the experimental Tier 2 optimizer when creating executors. Patched by Shamil Abdulaev." +msgstr "" + +msgid ":gh:`100964`: Fix reference cycle in exhausted generator frames. Patch by Savannah Ostrowski." +msgstr "" + +msgid ":gh:`139922`: Allow building CPython with the tail calling interpreter on Visual Studio 2026 MSVC. This provides a performance gain over the prior interpreter for MSVC. Patch by Ken Jin, Brandt Bucher, and Chris Eibl. With help from the MSVC team including Hulon Jenkins." +msgstr "" + +msgid "Python 3.15.0 alpha 3" +msgstr "" + +msgid "*Release date: 2025-12-16*" +msgstr "" + +msgid ":gh:`141692`: Each slice of an iOS XCframework now contains a ``lib`` folder that contains a symlink to the libpython dylib. This allows binary modules to be compiled for iOS using dynamic libreary linking, rather than Framework linking." +msgstr "" + +msgid ":gh:`140381`: Fix flaky test_profiling tests on i686 and s390x architectures by increasing slow_fibonacci call frequency from every 5th iteration to every 2nd iteration." +msgstr "" + +msgid ":gh:`140210`: Make ``test_sysconfig.test_parse_makefile_renamed_vars`` less fragile by clearing the environment variables before parsing the Makefile." +msgstr "" + +msgid ":gh:`142145`: Remove quadratic behavior in ``xml.minidom`` node ID cache clearing." +msgstr "" + +msgid ":gh:`42400`: Fix buffer overflow in ``_Py_wrealpath()`` for paths exceeding ``MAXPATHLEN`` bytes by using dynamic memory allocation instead of fixed-size buffer. Patch by Shamil Abdulaev." +msgstr "" + +msgid ":gh:`119451`: Fix a potential memory denial of service in the :mod:`http.client` module. When connecting to a malicious server, it could cause an arbitrary amount of memory to be allocated. This could have led to symptoms including a :exc:`MemoryError`, swapping, out of memory (OOM) killed processes or containers, or even system crashes." +msgstr "" + +msgid ":gh:`119342`: Fix a potential memory denial of service in the :mod:`plistlib` module. When reading a Plist file received from untrusted source, it could cause an arbitrary amount of memory to be allocated. This could have led to symptoms including a :exc:`MemoryError`, swapping, out of memory (OOM) killed processes or containers, or even system crashes." +msgstr "" + +msgid ":gh:`142754`: Add the *ownerDocument* attribute to :mod:`xml.dom.minidom` elements and attributes created by directly instantiating the ``Element`` or ``Attr`` class. Note that this way of creating nodes is not supported; creator functions like :py:meth:`xml.dom.Document.documentElement` should be used instead." +msgstr "" + +msgid ":gh:`142594`: Fix crash in ``TextIOWrapper.close()`` when the underlying buffer's ``closed`` property calls :meth:`~io.TextIOBase.detach`." +msgstr "" + +msgid ":gh:`76007`: Deprecate ``__version__`` from :mod:`ctypes`. Patch by Hugo van Kemenade." +msgstr "" + +msgid ":gh:`76007`: Deprecate ``__version__`` from :mod:`wsgiref.simple_server`. Patch by Hugo van Kemenade." +msgstr "" + +msgid ":gh:`142651`: :mod:`unittest.mock`: fix a thread safety issue where :attr:`Mock.call_count ` may return inaccurate values when the mock is called concurrently from multiple threads." +msgstr "" + +msgid ":gh:`76007`: Deprecate ``__version__`` from :mod:`http.server`. Patch by Hugo van Kemenade." +msgstr "" + +msgid ":gh:`138122`: Add ``--subprocesses`` flag to :mod:`profiling.sampling` CLI to automatically profile subprocesses spawned by the target. When enabled, the profiler monitors for new Python subprocesses and profiles each one separately, writing results to individual output files. This is useful for profiling applications that use :mod:`multiprocessing`, :class:`~concurrent.futures.ProcessPoolExecutor`, or other subprocess-based parallelism. Patch by Pablo Galindo." +msgstr "" + +msgid ":gh:`142595`: Added type check during initialization of the :mod:`decimal` module to prevent a crash in case of broken stdlib. Patch by Sergey B Kirpichev." +msgstr "" + +msgid ":gh:`142556`: Fix crash when a task gets re-registered during finalization in :mod:`asyncio`. Patch by Kumar Aditya." +msgstr "" + +msgid ":gh:`138122`: Add ``--mode=exception`` to the sampling profiler to capture samples only from threads with an active exception, useful for analyzing exception handling overhead. Patch by Pablo Galindo." +msgstr "" + +msgid ":gh:`142539`: :mod:`traceback`: Fix location of carets in :exc:`SyntaxError`\\s when the source contains wide characters." +msgstr "" + +msgid ":gh:`123241`: Avoid reference count operations in garbage collection of :mod:`ctypes` objects." +msgstr "" + +msgid ":gh:`142451`: :mod:`hmac`: correctly copy :class:`~hmac.HMAC` attributes for objects copied through :meth:`HMAC.copy() `. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`138122`: The ``profiling.sampling`` flamegraph profiler now supports inverted flamegraph view that aggregates all leaf nodes. In a standard flamegraph, if a hot function is called from multiple locations, it appears multiple times as separate leaf nodes. In the inverted flamegraph, all occurrences of the same leaf function are merged into a single aggregated node at the root, showing the total hotness of that function in one place. The children of each aggregated node represent its callers, making it easier to identify which functions consume the most CPU time and where they are called from." +msgstr "" + +msgid ":gh:`112527`: The help text for required options in :mod:`argparse` no longer extended with \" (default: None)\"." +msgstr "" + +msgid ":gh:`142438`: Fixed a possible leaked GIL in _PySSL_keylog_callback." +msgstr "" + +msgid ":gh:`138122`: Add bytecode-level instruction profiling to the sampling profiler via the new ``--opcodes`` flag. When enabled, the profiler captures which bytecode opcode is executing at each sample, including Python 3.11+ adaptive specializations, and visualizes this data in the heatmap, flamegraph, gecko, and live output formats. Patch by Pablo Galindo" +msgstr "" + +msgid ":gh:`142389`: Add backtick markup support in :mod:`argparse` description and epilog text to highlight inline code when color output is enabled." +msgstr "" + +msgid ":gh:`142346`: Fix usage formatting for mutually exclusive groups in :mod:`argparse` when they are preceded by positional arguments or followed or intermixed with other optional arguments." +msgstr "" + +msgid ":gh:`142374`: Fix cumulative percentage calculation for recursive functions in the new sampling profiler. When profiling recursive functions, cumulative statistics (cumul%, cumtime) could exceed 100% because each recursive frame in a stack was counted separately. For example, a function recursing 500 times in every sample would show 50000% cumulative presence. The fix deduplicates locations within each sample so cumulative stats correctly represent \"percentage of samples where this function was on the stack\". Patch by Pablo Galindo." +msgstr "" + +msgid ":gh:`142315`: Pdb can now run scripts from anonymous pipes used in process substitution. Patch by Bartosz Sławecki." +msgstr "" + +msgid ":gh:`64532`: Subparser help now includes required optional arguments from the parent parser in the usage, making it clearer what arguments are needed to run a subcommand. Patch by Savannah Ostrowski." +msgstr "" + +msgid ":gh:`142207`: Fix: profiling.sampling may cause assertion ``!(has_gil && gil_requested)``" +msgstr "" + +msgid ":gh:`142332`: Fix usage formatting for positional arguments in mutually exclusive groups in :mod:`argparse`. in :mod:`argparse`." +msgstr "" + +msgid ":gh:`142282`: Fix :func:`winreg.QueryValueEx` to not accidentally read garbage buffer under race condition." +msgstr "" + +msgid ":gh:`142318`: Fix typing ``'q'`` at the help of the interactive tachyon profiler exiting the profiler." +msgstr "" + +msgid ":gh:`75949`: Fix :mod:`argparse` to preserve ``|`` separators in mutually exclusive groups when the usage line wraps due to length." +msgstr "" + +msgid ":gh:`142267`: Improve :mod:`argparse` performance by caching the formatter used for argument validation." +msgstr "" + +msgid ":gh:`139862`: Remove ``color`` parameter from :class:`!argparse.HelpFormatter` constructor. Color is controlled by :class:`~argparse.ArgumentParser`." +msgstr "" + +msgid ":gh:`68552`: ``MisplacedEnvelopeHeaderDefect`` and ``Missing header name`` defects are now correctly passed to the ``handle_defect`` method of ``policy`` in :class:`~email.parser.FeedParser`." +msgstr "" + +msgid ":gh:`142206`: The resource tracker in the :mod:`multiprocessing` module can now understand messages from older versions of itself. This avoids issues with upgrading Python while it is running. (Note that such 'in-place' upgrades are not tested.)" +msgstr "" + +msgid ":gh:`142214`: Fix two regressions in :mod:`dataclasses` in Python 3.14.1 related to annotations." +msgstr "" + +msgid "An exception is no longer raised if ``slots=True`` is used and the ``__init__`` method does not have an ``__annotate__`` attribute (likely because ``init=False`` was used)." +msgstr "" + +msgid "An exception is no longer raised if annotations are requested on the ``__init__`` method and one of the fields is not present in the class annotations. This can occur in certain dynamic scenarios." +msgstr "" + +msgid "Patch by Jelle Zijlstra." +msgstr "" + +msgid ":gh:`142203`: Remove the *debug_override* parameter from :func:`importlib.util.cache_from_source` which has been deprecated since Python 3.5." +msgstr "" + +msgid ":gh:`138122`: The ``_remote_debugging`` module now implements frame caching in the ``RemoteUnwinder`` class to reduce memory reads when profiling remote processes. When ``cache_frames=True``, unchanged portions of the call stack are reused from previous samples, significantly improving profiling performance for deep call stacks." +msgstr "" + +msgid ":gh:`116738`: Fix :mod:`cmath` data race when initializing trigonometric tables with subinterpreters." +msgstr "" + +msgid ":gh:`141982`: Allow :mod:`pdb` to set breakpoints on async functions with function names." +msgstr "" + +msgid ":gh:`74389`: When the stdin being used by a :class:`subprocess.Popen` instance is closed, this is now ignored in :meth:`subprocess.Popen.communicate` instead of leaving the class in an inconsistent state." +msgstr "" + +msgid ":gh:`87512`: Fix :func:`subprocess.Popen.communicate` timeout handling on Windows when writing large input. Previously, the timeout was ignored during stdin writing, causing the method to block indefinitely if the child process did not consume input quickly. The stdin write is now performed in a background thread, allowing the timeout to be properly enforced." +msgstr "" + +msgid ":gh:`141939`: Add color to all interpolated values in :mod:`argparse` help, like ``%(default)s`` or ``%(choices)s``. Patch by Alex Prengère." +msgstr "" + +msgid ":gh:`141473`: When :meth:`subprocess.Popen.communicate` was called with *input* and a *timeout* and is called for a second time after a :exc:`~subprocess.TimeoutExpired` exception before the process has died, it should no longer hang." +msgstr "" + +msgid ":gh:`141999`: Correctly allow :exc:`KeyboardInterrupt` to stop the process when using :mod:`!profiling.sampling`." +msgstr "" + +msgid ":gh:`142006`: Fix a bug in the :mod:`email.policy.default` folding algorithm which incorrectly resulted in a doubled newline when a line ending at exactly max_line_length was followed by an unfoldable token." +msgstr "" + +msgid ":gh:`141968`: Remove data copy from :mod:`re` compilation of regexes with large charsets by using :meth:`bytearray.take_bytes`." +msgstr "" + +msgid ":gh:`141968`: Remove data copy from :mod:`encodings.idna` :meth:`~codecs.Codec.encode` and :meth:`~codecs.IncrementalEncoder.encode` by using :meth:`bytearray.take_bytes`." +msgstr "" + +msgid ":gh:`141968`: Remove data copy from :mod:`codecs` ``punycode`` encoding by using :meth:`bytearray.take_bytes`." +msgstr "" + +msgid ":gh:`141968`: Remove data copy from :func:`wave.Wave_read.readframes` and :func:`wave.Wave_write.writeframes` by using :meth:`bytearray.take_bytes`." +msgstr "" + +msgid ":gh:`141968`: Remove a data copy from :func:`base64.b32decode` and :func:`base64.b32encode` by using :meth:`bytearray.take_bytes`." +msgstr "" + +msgid ":gh:`59000`: Fix :mod:`pdb` breakpoint resolution for class methods when the module defining the class is not imported." +msgstr "" + +msgid ":gh:`116738`: Fix thread safety issue with :mod:`re` scanner objects in free-threaded builds." +msgstr "" + +msgid ":gh:`138122`: The ``profiling.sampling`` flamegraph profiler now displays thread status statistics showing the percentage of time threads spend holding the GIL, running without the GIL, waiting for the GIL, and performing garbage collection. These statistics help identify GIL contention and thread behavior patterns. When filtering by thread, the display shows per-thread metrics." +msgstr "" + +msgid ":gh:`141781`: Fixed an issue where pdb.line_prefix assignment was ignored if assigned after the module was imported." +msgstr "" + +msgid ":gh:`141863`: Update :ref:`asyncio-streams` to use :meth:`bytearray.take_bytes` for a over 10% performance improvement on pyperformance asyncio_tcp benchmark." +msgstr "" + +msgid ":gh:`141817`: Add :data:`!socket.IPV6_HDRINCL` constant." +msgstr "" + +msgid ":gh:`105836`: Fix :meth:`asyncio.run_coroutine_threadsafe` leaving underlying cancelled asyncio task running." +msgstr "" + +msgid ":gh:`141570`: Support :term:`file-like object` raising :exc:`OSError` from :meth:`~io.IOBase.fileno` in color detection (``_colorize.can_colorize()``). This can occur when ``sys.stdout`` is redirected." +msgstr "" + +msgid ":gh:`141679`: Add colour to defaults in :mod:`argparse` help. Patch by Hugo van Kemenade." +msgstr "" + +msgid ":gh:`141686`: Break reference cycles created by each call to :func:`json.dump` or :meth:`json.JSONEncoder.iterencode`." +msgstr "" + +msgid ":gh:`141659`: Fix bad file descriptor errors from ``_posixsubprocess`` on AIX." +msgstr "" + +msgid ":gh:`141645`: Add a new ``--live`` mode to the tachyon profiler in :mod:`!profiling.sampling` module. This mode consist of a live TUI that displays real-time profiling statistics as the target application runs, similar to ``top``. Patch by Pablo Galindo" +msgstr "" + +msgid ":gh:`141615`: Check ``stdin`` instead of ``stdout`` for ``use_rawinput`` in :mod:`pdb`." +msgstr "" + +msgid ":gh:`69113`: Fix :mod:`doctest` to correctly report line numbers for doctests in ``__test__`` dictionary when formatted as triple-quoted strings by finding unique lines in the string and matching them in the source file." +msgstr "" + +msgid ":gh:`141600`: Fix musl version detection on Void Linux." +msgstr "" + +msgid ":gh:`48752`: Add :func:`readline.get_pre_input_hook` function to retrieve the current pre-input hook. This allows applications to save and restore the hook without overwriting user settings. Patch by Sanyam Khurana." +msgstr "" + +msgid ":gh:`141565`: Add async-aware profiling to the Tachyon sampling profiler. The profiler now reconstructs and displays async task hierarchies in flamegraphs, making the output more actionable for users. Patch by Savannah Ostrowski and Pablo Galindo Salgado." +msgstr "" + +msgid ":gh:`60107`: Remove a copy from :meth:`io.RawIOBase.read`. If the underlying I/O class keeps a reference to the mutable memory, raise a :exc:`BufferError`." +msgstr "" + +msgid ":gh:`116738`: Make csv module thread-safe on the :term:`free threaded ` build." +msgstr "" + +msgid ":gh:`140911`: :mod:`collections`: Ensure that the methods ``UserString.rindex()`` and ``UserString.index()`` accept :class:`collections.UserString` instances as the sub argument." +msgstr "" + +msgid ":gh:`140875`: Fix handling of unclosed character references (named and numerical) followed by the end of file in :class:`html.parser.HTMLParser` with ``convert_charrefs=False``." +msgstr "" + +msgid ":gh:`140677`: Add heatmap visualization mode to the Tachyon sampling profiler. The new ``--heatmap`` output format provides a line-by-line view showing execution intensity with color-coded samples, inline statistics, and interactive call graph navigation between callers and callees." +msgstr "" + +msgid ":gh:`139946`: Distinguish stdout and stderr when colorizing output in argparse module." +msgstr "" + +msgid ":gh:`76007`: :mod:`pydoc`: Fix :exc:`DeprecationWarning` being raised when generating doc for :term:`stdlib` modules." +msgstr "" + +msgid ":gh:`138697`: Fix inferring *dest* from a single-dash long option in :mod:`argparse`. If a short option and a single-dash long option are passed to :meth:`!add_argument`, *dest* is now inferred from the single-dash long option." +msgstr "" + +msgid ":gh:`138525`: Add support for single-dash long options and alternate prefix characters in :class:`argparse.BooleanOptionalAction`." +msgstr "" + +msgid ":gh:`79986`: Add parsing for ``References`` and ``In-Reply-To`` headers to the :mod:`email` library that parses the header content as lists of message id tokens. This prevents them from being folded incorrectly." +msgstr "" + +msgid ":gh:`135559`: Flag: a ``dir()`` on a ``Flag`` enumeration now shows non-canonical members. (i.e. aliases)." +msgstr "" + +msgid ":gh:`134453`: Fixed :func:`subprocess.Popen.communicate` ``input=`` handling of :class:`memoryview` instances that were non-byte shaped on POSIX platforms. Those are now properly cast to a byte shaped view instead of truncating the input. Windows platforms did not have this bug." +msgstr "" + +msgid ":gh:`127930`: Add ``__all__`` to :mod:`tkinter.simpledialog`." +msgstr "" + +msgid ":gh:`115952`: Fix a potential memory denial of service in the :mod:`pickle` module. When reading a pickled data received from untrusted source, it could cause an arbitrary amount of memory to be allocated, even if the code that is allowed to execute is restricted by overriding the :meth:`~pickle.Unpickler.find_class` method. This could have led to symptoms including a :exc:`MemoryError`, swapping, out of memory (OOM) killed processes or containers, or even system crashes." +msgstr "" + +msgid ":issue:`40350`: Fix support for namespace packages in :mod:`modulefinder`." +msgstr "" + +msgid ":gh:`141994`: :mod:`xml.sax.handler`: Make Documentation of :data:`xml.sax.handler.feature_external_ges` warn of opening up to `external entity attacks `_. Patch by Sebastian Pipping." +msgstr "" + +msgid ":gh:`134584`: Eliminate redundant refcounting from ``_STORE_ATTR_INSTANCE_VALUE``." +msgstr "" + +msgid ":gh:`142718`: JIT: Fix segfault caused by not flushing the stack to memory at side exits." +msgstr "" + +msgid ":gh:`142737`: Tracebacks will be displayed in fallback mode even if :func:`io.open` is lost. Previously, this would crash the interpreter. Patch by Bartosz Sławecki." +msgstr "" + +msgid ":gh:`116738`: Make the attributes in :mod:`bz2` thread-safe on the :term:`free threaded ` build." +msgstr "" + +msgid ":gh:`134584`: Eliminate redundant refcounting from ``_CALL_LIST_APPEND``." +msgstr "" + +msgid ":gh:`142554`: Fix a crash in :func:`divmod` when :func:`!_pylong.int_divmod` does not return a tuple of length two exactly. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`142531`: Fix a free-threaded GC performance regression. If there are many untracked tuples, the GC will run too often, resulting in poor performance. The fix is to include untracked tuples in the \"long lived\" object count. The number of frozen objects is also now included since the free-threaded GC must scan those too." +msgstr "" + +msgid ":gh:`142402`: Fix reference counting when adjacent literal parts are merged while constructing :class:`string.templatelib.Template`, preventing the displaced string object from leaking." +msgstr "" + +msgid ":gh:`116738`: Make the attributes in :mod:`zlib` thread-safe on the :term:`free threaded ` build." +msgstr "" + +msgid ":gh:`142343`: Fix SIGILL crash on m68k due to incorrect assembly constraint." +msgstr "" + +msgid ":gh:`142236`: Improve the \"Perhaps you forgot a comma?\" syntax error for multi-line string concatenations to point to the last string instead of the first, making it easier to locate where the comma is missing. Patch by Pablo Galindo." +msgstr "" + +msgid ":gh:`142236`: Fix incorrect keyword suggestions for syntax errors in :mod:`traceback`. The keyword typo suggestion mechanism would incorrectly suggest replacements when the extracted source code was incomplete rather than containing an actual typo. Patch by Pablo Galindo." +msgstr "" + +msgid ":gh:`142305`: Decrease the size of the generated stencils and the runtime JIT code. Patch by Diego Russo." +msgstr "" + +msgid ":gh:`135379`: Implement a limited form of register allocation known as \"top of stack caching\" in the JIT. It works by keeping 0-3 of the top items in the stack in registers. The code generator generates multiple versions of those uops that do not escape and are relatively small. During JIT compilation, the copy that produces the least memory traffic is selected, spilling or reloading values when needed." +msgstr "" + +msgid ":gh:`142276`: Fix missing type watcher when promoting attribute loads to constants in the JIT. Patch by Ken Jin. Reproducer by Yuancheng Jiang." +msgstr "" + +msgid ":gh:`142218`: Fix crash when inserting into a split table dictionary with a non :class:`str` key that matches an existing key." +msgstr "" + +msgid ":gh:`141976`: Check against abstract stack overflow in the JIT optimizer." +msgstr "" + +msgid ":gh:`97850`: Remove all ``*.load_module()`` usage and definitions from the import system and importlib. The method has been deprecated in favor of ``importlib.abc.Loader.exec_module()`` since Python 3.4." +msgstr "" + +msgid ":gh:`142048`: Fix quadratically increasing garbage collection delays in free-threaded build." +msgstr "" + +msgid ":gh:`65961`: Stop setting ``__cached__`` on modules." +msgstr "" + +msgid ":gh:`141770`: Annotate anonymous mmap usage only when supported by the Linux kernel and if ``-X dev`` is used or Python is built in debug mode. Patch by Donghee Na." +msgstr "" + +msgid ":gh:`142029`: Raise :exc:`ModuleNotFoundError` instead of crashing when a nonexistent module is used as a name in ``_imp.create_builtin()``." +msgstr "" + +msgid ":gh:`142029`: Raise :exc:`ValueError` instead of crashing when empty string is used as a name in ``_imp.create_builtin()``." +msgstr "" + +msgid ":gh:`141976`: Protect against specialization failures in the tracing JIT compiler for performance reasons." +msgstr "" + +msgid ":gh:`141861`: Fix invalid memory read in the ``ENTER_EXECUTOR`` instruction." +msgstr "" + +msgid ":gh:`141930`: When importing a module, use Python's regular file object to ensure that writes to ``.pyc`` files are complete or an appropriate error is raised." +msgstr "" + +msgid ":gh:`138122`: Add incomplete sample detection to prevent corrupted profiling data. Each thread state now contains an embedded base frame (sentinel at the bottom of the frame stack) with owner type ``FRAME_OWNED_BY_INTERPRETER``. The profiler validates that stack unwinding terminates at this sentinel frame. Samples that fail to reach the base frame (due to race conditions, memory corruption, or other errors) are now rejected rather than being included as spurious data." +msgstr "" + +msgid ":gh:`120158`: Fix inconsistent state when enabling or disabling monitoring events too many times." +msgstr "" + +msgid ":gh:`140638`: Expose a ``\"candidates\"`` stat in :func:`gc.get_stats` and :data:`gc.callbacks`." +msgstr "" + +msgid ":gh:`141780`: Fix :c:macro:`Py_mod_gil` with API added in :pep:`793`: :c:func:`!PyModule_FromSlotsAndSpec` and ``PyModExport`` hooks" +msgstr "" + +msgid ":gh:`141732`: Ensure the :meth:`~object.__repr__` for :exc:`ExceptionGroup` and :exc:`BaseExceptionGroup` does not change when the exception sequence that was original passed in to its constructor is subsequently mutated." +msgstr "" + +msgid ":gh:`140638`: Expose a ``\"duration\"`` stat in :func:`gc.get_stats` and :data:`gc.callbacks`." +msgstr "" + +msgid ":gh:`139653`: Only raise a ``RecursionError`` or trigger a fatal error if the stack pointer is both below the limit pointer *and* above the stack base. If outside of these bounds assume that it is OK. This prevents false positives when user-space threads swap stacks." +msgstr "" + +msgid ":gh:`41779`: Allowed defining the *__dict__* and *__weakref__* :ref:`__slots__ ` for any class." +msgstr "" + +msgid ":gh:`139103`: Improve multithreaded scaling of dataclasses on the free-threaded build." +msgstr "" + +msgid ":gh:`141589`: Change ``backoff counter`` to use prime numbers instead of powers of 2. Use only 3 bits for ``counter`` and 13 bits for ``value``. This allows to support values up to 8191. Patch by Mikhail Efimov." +msgstr "" + +msgid ":gh:`137007`: Fix a bug during JIT compilation failure which caused garbage collection debug assertions to fail." +msgstr "" + +msgid ":gh:`132657`: For the free-threaded build, avoid locking the :class:`set` object for the ``__contains__`` method." +msgstr "" + +msgid ":gh:`134584`: Eliminate redundant refcounting from ``_CALL_STR_1``." +msgstr "" + +msgid ":gh:`134584`: Eliminate redundant refcounting from ``_CALL_BUILTIN_O``." +msgstr "" + +msgid ":gh:`134584`: Eliminate redundant refcounting from ``_CALL_TUPLE_1``. Patch by Noam Cohen" +msgstr "" + +msgid ":gh:`142589`: Fix :c:func:`PyUnstable_Object_IsUniqueReferencedTemporary()` handling of tagged ints on the interpreter stack." +msgstr "" + +msgid ":gh:`142571`: :c:func:`!PyUnstable_CopyPerfMapFile` now checks that opening the file succeeded before flushing." +msgstr "" + +msgid ":gh:`142225`: Fixed the :c:macro:`PyABIInfo_VAR` macro." +msgstr "" + +msgid ":gh:`141049`: :c:func:`!_PyObject_CallMethodId`, :c:func:`!_PyObject_GetAttrId` and :c:func:`!_PyUnicode_FromId` are deprecated since 3.15 and will be removed in 3.20. Instead, use :c:func:`PyUnicode_InternFromString()` and cache the result in the module state, then call :c:func:`PyObject_CallMethod` or :c:func:`PyObject_GetAttr`. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`142163`: Fix the ``HAVE_THREAD_LOCAL`` macro being defined without the ``Py_BUILD_CORE`` macro set after including :file:`Python.h`." +msgstr "" + +msgid ":gh:`137422`: Fix :term:`free threading` race condition in :c:func:`PyImport_AddModuleRef`. It was previously possible for two calls to the function return two different objects, only one of which was stored in :data:`sys.modules`." +msgstr "" + +msgid ":gh:`141726`: Add :c:func:`PyDict_SetDefaultRef` to the Stable ABI." +msgstr "" + +msgid ":gh:`140042`: Removed the sqlite3_shutdown call that could cause closing connections for sqlite when used with multiple sub interpreters." +msgstr "" + +msgid ":gh:`141070`: Add :c:func:`!PyUnstable_Object_Dump` to dump an object to ``stderr``. It should only be used for debugging. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`139165`: Expose the functions :c:func:`Py_SIZE`, :c:func:`Py_IS_TYPE` and :c:func:`Py_SET_SIZE` in the Stable ABI." +msgstr "" + +msgid ":gh:`131372`: Add ``LDVERSION`` and ``EXE`` to the ``base_interpreter`` value of ``build-details.json``." +msgstr "" + +msgid ":gh:`142454`: When calculating the digest of the JIT stencils input, sort the hashed files by filenames before adding their content to the hasher. This ensures deterministic hash input and hence deterministic hash, independent on filesystem order." +msgstr "" + +msgid ":gh:`131372`: ``build-details.py`` will only be installed as part of the main install (``make install``). ``make altinstall`` will no longer include it." +msgstr "" + +msgid ":gh:`142234`: Allow ``--enable-wasm-dynamic-linking`` for WASI. While CPython doesn't directly support it so external/downstream users do not have to patch in support for the flag." +msgstr "" + +msgid ":gh:`142050`: Fixed a bug where JIT stencils produced on Windows contained debug data. Patch by Chris Eibl." +msgstr "" + +msgid ":gh:`141808`: Do not generate the jit stencils twice in case of PGO builds on Windows." +msgstr "" + +msgid ":gh:`141926`: ``RUNSHARED`` is no longer cleared when cross-compiling. Previously, ``RUNSHARED`` was cleared when cross-compiling, which breaks PGO when using ``--enabled-shared`` on systems where the cross-compiled CPython is otherwise executable (e.g., via transparent emulation)." +msgstr "" + +msgid ":gh:`141808`: When running ``make clean-retain-profile``, keep the generated JIT stencils. That way, the stencils are not generated twice when Profile-guided optimization (PGO) is used. It also allows distributors to supply their own pre-built JIT stencils." +msgstr "" + +msgid ":gh:`141784`: Fix ``_remote_debugging_module.c`` compilation on 32-bit Linux. Include Python.h before system headers to make sure that ``_remote_debugging_module.c`` uses the same types (ABI) than Python. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`141172`: Update to WASI SDK 29." +msgstr "" + +msgid ":gh:`139707`: Add configure option :option:`--with-missing-stdlib-config=FILE` allows which distributors to pass a `JSON `_ configuration file containing custom error messages for missing :term:`standard library` modules." +msgstr "" + +msgid ":gh:`108819`: Honor :option:`--with-platlibdir` in the pure-Python standard library installation path, if ``PLATLIBDIR`` doesn't match the value used in ``LIBDIR``." +msgstr "" + +msgid "Python 3.15.0 alpha 2" +msgstr "" + +msgid "*Release date: 2025-11-18*" +msgstr "" + +msgid ":gh:`140849`: Update bundled liblzma to version 5.8.1." +msgstr "" + +msgid ":gh:`141442`: The iOS testbed now correctly handles test arguments that contain spaces." +msgstr "" + +msgid ":gh:`140702`: The iOS testbed app will now expose the ``GITHUB_ACTIONS`` environment variable to iOS apps being tested." +msgstr "" + +msgid ":gh:`139198`: Remove ``Tools/scripts/checkpip.py`` script." +msgstr "" + +msgid ":gh:`139188`: Remove ``Tools/tz/zdump.py`` script." +msgstr "" + +msgid ":gh:`140482`: Preserve and restore the state of ``stty echo`` as part of the test environment." +msgstr "" + +msgid ":gh:`140082`: Update ``python -m test`` to set ``FORCE_COLOR=1`` when being run with color enabled so that :mod:`unittest` which is run by it with redirected output will output in color." +msgstr "" + +msgid ":gh:`136442`: Use exitcode ``1`` instead of ``5`` if :func:`unittest.TestCase.setUpClass` raises an exception" +msgstr "" + +msgid ":gh:`137836`: Add support of the \"plaintext\" element, RAWTEXT elements \"xmp\", \"iframe\", \"noembed\" and \"noframes\", and optionally RAWTEXT element \"noscript\" in :class:`html.parser.HTMLParser`." +msgstr "" + +msgid ":gh:`136063`: :mod:`email.message`: ensure linear complexity for legacy HTTP parameters parsing. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`136065`: Fix quadratic complexity in :func:`os.path.expandvars`." +msgstr "" + +msgid ":gh:`141497`: :mod:`ipaddress`: ensure that the methods :meth:`IPv4Network.hosts() ` and :meth:`IPv6Network.hosts() ` always return an iterator." +msgstr "" + +msgid ":gh:`140938`: The :func:`statistics.stdev` and :func:`statistics.pstdev` functions now raise a :exc:`ValueError` when the input contains an infinity or a NaN." +msgstr "" + +msgid ":gh:`124111`: Updated Tcl threading configuration in :mod:`_tkinter` to assume that threads are always available in Tcl 9 and later." +msgstr "" + +msgid ":gh:`137109`: The :mod:`os.fork` and related forking APIs will no longer warn in the common case where Linux or macOS platform APIs return the number of threads in a process and find the answer to be 1 even when a :func:`os.register_at_fork` ``after_in_parent=`` callback (re)starts a thread." +msgstr "" + +msgid ":gh:`141314`: Fix assertion failure in :meth:`io.TextIOWrapper.tell` when reading files with standalone carriage return (``\\r``) line endings." +msgstr "" + +msgid ":gh:`141311`: Fix assertion failure in :func:`!io.BytesIO.readinto` and undefined behavior arising when read position is above capcity in :class:`io.BytesIO`." +msgstr "" + +msgid ":gh:`87710`: :mod:`mimetypes`: Update mime type for ``.ai`` files to ``application/pdf``." +msgstr "" + +msgid ":gh:`85524`: Update ``io.FileIO.readall``, an implementation of :meth:`io.RawIOBase.readall`, to follow :class:`io.IOBase` guidelines and raise :exc:`io.UnsupportedOperation` when a file is in \"w\" mode rather than :exc:`OSError`" +msgstr "" + +msgid ":gh:`141141`: Fix a thread safety issue with :func:`base64.b85decode`. Contributed by Benel Tayar." +msgstr "" + +msgid ":gh:`141018`: :mod:`mimetypes`: Update ``.exe``, ``.dll``, ``.rtf`` and (when ``strict=False``) ``.jpg`` to their correct IANA mime type." +msgstr "" + +msgid ":gh:`137969`: Fix :meth:`annotationlib.ForwardRef.evaluate` returning :class:`~annotationlib.ForwardRef` objects which don't update with new globals." +msgstr "" + +msgid ":gh:`75593`: Add support of :term:`path-like objects ` and :term:`bytes-like objects ` in :func:`wave.open`." +msgstr "" + +msgid ":gh:`140797`: The undocumented :class:`!re.Scanner` class now forbids regular expressions containing capturing groups in its lexicon patterns. Patterns using capturing groups could previously lead to crashes with segmentation fault. Use non-capturing groups (?:...) instead." +msgstr "" + +msgid ":gh:`125115`: Refactor the :mod:`pdb` parsing issue so positional arguments can pass through intuitively." +msgstr "" + +msgid ":gh:`140815`: :mod:`faulthandler` now detects if a frame or a code object is invalid or freed. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`100218`: Correctly set :attr:`~OSError.errno` when :func:`socket.if_nametoindex` or :func:`socket.if_indextoname` raise an :exc:`OSError`. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`140734`: :mod:`multiprocessing`: fix off-by-one error when checking the length of a temporary socket file path. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`140873`: Add support of non-:term:`descriptor` callables in :func:`functools.singledispatchmethod`." +msgstr "" + +msgid ":gh:`140874`: Bump the version of pip bundled in ensurepip to version 25.3" +msgstr "" + +msgid ":gh:`140826`: Now :class:`!winreg.HKEYType` objects are compared by their underlying Windows registry handle value instead of their object identity." +msgstr "" + +msgid ":gh:`140808`: The internal class ``mailbox._ProxyFile`` is no longer a parameterized generic." +msgstr "" + +msgid ":gh:`140691`: In :mod:`urllib.request`, when opening a FTP URL fails because a data connection cannot be made, the control connection's socket is now closed to avoid a :exc:`ResourceWarning`." +msgstr "" + +msgid ":gh:`103847`: Fix hang when cancelling process created by :func:`asyncio.create_subprocess_exec` or :func:`asyncio.create_subprocess_shell`. Patch by Kumar Aditya." +msgstr "" + +msgid ":gh:`137821`: Convert ``_json`` module to use Argument Clinic. Patched by Yoonho Hann." +msgstr "" + +msgid ":gh:`140790`: Initialize all Pdb's instance variables in ``__init__``, remove some hasattr/getattr" +msgstr "" + +msgid ":gh:`140766`: Add :func:`enum.show_flag_values` and ``enum.bin`` to ``enum.__all__``." +msgstr "" + +msgid ":gh:`120057`: Add :func:`os.reload_environ` to ``os.__all__``." +msgstr "" + +msgid ":gh:`140741`: Fix ``profiling.sampling.sample()`` incorrectly handling a :exc:`FileNotFoundError` or :exc:`PermissionError`." +msgstr "" + +msgid ":gh:`140228`: Avoid making unnecessary filesystem calls for frozen modules in :mod:`linecache` when the global module cache is not present." +msgstr "" + +msgid ":gh:`139946`: Error and warning keywords in ``argparse.ArgumentParser`` messages are now colorized when color output is enabled, fixing a visual inconsistency in which they remained plain text while other output was colorized." +msgstr "" + +msgid ":gh:`140590`: Fix arguments checking for the :meth:`!functools.partial.__setstate__` that may lead to internal state corruption and crash. Patch by Sergey Miryanov." +msgstr "" + +msgid ":gh:`125434`: Display thread name in :mod:`faulthandler` on Windows. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`140634`: Fix a reference counting bug in :meth:`!os.sched_param.__reduce__`." +msgstr "" + +msgid ":gh:`140650`: Fix an issue where closing :class:`io.BufferedWriter` could crash if the closed attribute raised an exception on access or could not be converted to a boolean." +msgstr "" + +msgid ":gh:`140633`: Ignore :exc:`AttributeError` when setting a module's ``__file__`` attribute when loading an extension module packaged as Apple Framework." +msgstr "" + +msgid ":gh:`140601`: :func:`xml.etree.ElementTree.iterparse` now emits a :exc:`ResourceWarning` when the iterator is not explicitly closed and was opened with a filename. This helps developers identify and fix resource leaks. Patch by Osama Abdelkader." +msgstr "" + +msgid ":gh:`140593`: :mod:`xml.parsers.expat`: Fix a memory leak that could affect users with :meth:`~xml.parsers.expat.xmlparser.ElementDeclHandler` set to a custom element declaration handler. Patch by Sebastian Pipping." +msgstr "" + +msgid ":gh:`140607`: Inside :meth:`io.RawIOBase.read`, validate that the count of bytes returned by :meth:`io.RawIOBase.readinto` is valid (inside the provided buffer)." +msgstr "" + +msgid ":gh:`138162`: Fix :class:`logging.LoggerAdapter` with ``merge_extra=True`` and without the *extra* argument." +msgstr "" + +msgid ":gh:`140481`: Improve error message when trying to iterate a Tk widget, image or font." +msgstr "" + +msgid ":gh:`138774`: :func:`ast.unparse` now generates full source code when handling :class:`ast.Interpolation` nodes that do not have a specified source." +msgstr "" + +msgid ":gh:`140474`: Fix memory leak in :class:`array.array` when creating arrays from an empty :class:`str` and the ``u`` type code." +msgstr "" + +msgid ":gh:`140448`: Change the default of ``suggest_on_error`` to ``True`` in ``argparse.ArgumentParser``." +msgstr "" + +msgid ":gh:`137530`: :mod:`dataclasses` Fix annotations for generated ``__init__`` methods by replacing the annotations that were in-line in the generated source code with ``__annotate__`` functions attached to the methods." +msgstr "" + +msgid ":gh:`140348`: Fix regression in Python 3.14.0 where using the ``|`` operator on a :class:`typing.Union` object combined with an object that is not a type would raise an error." +msgstr "" + +msgid ":gh:`76007`: :mod:`decimal`: Deprecate ``__version__`` and replace with :data:`decimal.SPEC_VERSION`." +msgstr "" + +msgid ":gh:`76007`: Deprecate ``__version__`` from :mod:`imaplib`. Patch by Hugo van Kemenade." +msgstr "" + +msgid ":gh:`140272`: Fix memory leak in the :meth:`!clear` method of the :mod:`dbm.gnu` database." +msgstr "" + +msgid ":gh:`129117`: :mod:`unicodedata`: Add :func:`~unicodedata.isxidstart` and :func:`~unicodedata.isxidcontinue` functions to check whether a character can start or continue a `Unicode Standard Annex #31 `_ identifier." +msgstr "" + +msgid ":gh:`140251`: Colorize the default import statement ``import asyncio`` in asyncio REPL." +msgstr "" + +msgid ":gh:`140212`: Calendar's HTML formatting now accepts year and month as options. Previously, running ``python -m calendar -t html 2025 10`` would result in an error message. It now generates an HTML document displaying the calendar for the specified month. Contributed by Pål Grønås Drange." +msgstr "" + +msgid ":gh:`135801`: Improve filtering by module in :func:`warnings.warn_explicit` if no *module* argument is passed. It now tests the module regular expression in the warnings filter not only against the filename with ``.py`` stripped, but also against module names constructed starting from different parent directories of the filename (with ``/__init__.py``, ``.py`` and, on Windows, ``.pyw`` stripped)." +msgstr "" + +msgid ":gh:`139707`: Improve :exc:`ModuleNotFoundError` error message when a :term:`standard library` module is missing." +msgstr "" + +msgid ":gh:`140041`: Fix import of :mod:`ctypes` on Android and Cygwin when ABI flags are present." +msgstr "" + +msgid ":gh:`140120`: Fixed a memory leak in :mod:`hmac` when it was using the hacl-star backend. Discovered by ``@ashm-dev`` using AddressSanitizer." +msgstr "" + +msgid ":gh:`140141`: The :py:class:`importlib.metadata.PackageNotFoundError` traceback raised when ``importlib.metadata.Distribution.from_name`` cannot discover a distribution no longer includes a transient :exc:`StopIteration` exception trace." +msgstr "" + +msgid "Contributed by Bartosz Sławecki in :gh:`140142`." +msgstr "" + +msgid ":gh:`140166`: :mod:`mimetypes`: Per the `IANA assignment `_, update the MIME type for the ``.texi`` and ``.texinfo`` file formats to ``application/texinfo``, instead of ``application/x-texinfo``." +msgstr "" + +msgid ":gh:`140135`: Speed up :meth:`io.RawIOBase.readall` by using PyBytesWriter API (about 4x faster)" +msgstr "" + +msgid ":gh:`76007`: :mod:`zlib`: Deprecate ``__version__`` and schedule for removal in Python 3.20." +msgstr "" + +msgid ":gh:`136702`: :mod:`encodings`: Deprecate passing a non-ascii *encoding* name to :func:`encodings.normalize_encoding` and schedule removal of support for Python 3.17." +msgstr "" + +msgid ":gh:`139940`: Print clearer error message when using ``pdb`` to attach to a non-existing process." +msgstr "" + +msgid ":gh:`139462`: When a child process in a :class:`concurrent.futures.ProcessPoolExecutor` terminates abruptly, the resulting traceback will now tell you the PID and exit code of the terminated process. Contributed by Jonathan Berg." +msgstr "" + +msgid ":gh:`63161`: Fix :func:`tokenize.detect_encoding`. Support non-UTF-8 shebang and comments if non-UTF-8 encoding is specified. Detect decoding error for non-UTF-8 encoding. Detect null bytes in source code." +msgstr "" + +msgid ":gh:`101828`: Fix ``'shift_jisx0213'``, ``'shift_jis_2004'``, ``'euc_jisx0213'`` and ``'euc_jis_2004'`` codecs truncating null chars as they were treated as part of multi-character sequences." +msgstr "" + +msgid ":gh:`139246`: fix: paste zero-width in default repl width is wrong." +msgstr "" + +msgid ":gh:`83714`: Implement :func:`os.statx` on Linux kernel versions 4.11 and later with glibc versions 2.28 and later. Contributed by Jeffrey Bosboom and Victor Stinner." +msgstr "" + +msgid ":gh:`138891`: Fix ``SyntaxError`` when ``inspect.get_annotations(f, eval_str=True)`` is called on a function annotated with a :pep:`646` ``star_expression``" +msgstr "" + +msgid ":gh:`138859`: Fix generic type parameterization raising a :exc:`TypeError` when omitting a :class:`ParamSpec` that has a default which is not a list of types." +msgstr "" + +msgid ":gh:`138764`: Prevent :func:`annotationlib.call_annotate_function` from calling ``__annotate__`` functions that don't support ``VALUE_WITH_FAKE_GLOBALS`` in a fake globals namespace with empty globals." +msgstr "" + +msgid "Make ``FORWARDREF`` and ``STRING`` annotations fall back to using ``VALUE`` annotations in the case that neither their own format, nor ``VALUE_WITH_FAKE_GLOBALS`` are supported." +msgstr "" + +msgid ":gh:`138775`: Use of ``python -m`` with :mod:`base64` has been fixed to detect input from a terminal so that it properly notices EOF." +msgstr "" + +msgid ":gh:`98896`: Fix a failure in multiprocessing resource_tracker when SharedMemory names contain colons. Patch by Rani Pinchuk." +msgstr "" + +msgid ":gh:`138425`: Fix partial evaluation of :class:`annotationlib.ForwardRef` objects which rely on names defined as globals." +msgstr "" + +msgid ":gh:`138151`: In :mod:`annotationlib`, improve evaluation of forward references to nonlocal variables that are not yet defined when the annotations are initially evaluated." +msgstr "" + +msgid ":gh:`69528`: The :attr:`~io.FileIO.mode` attribute of files opened in the ``'wb+'`` mode is now ``'wb+'`` instead of ``'rb+'``." +msgstr "" + +msgid ":gh:`137627`: Speed up :meth:`csv.Sniffer.sniff` delimiter detection by up to 1.6x." +msgstr "" + +msgid ":gh:`55531`: :mod:`encodings`: Improve :func:`~encodings.normalize_encoding` performance by implementing the function in C using the private ``_Py_normalize_encoding`` which has been modified to make lowercase conversion optional." +msgstr "" + +msgid ":gh:`136057`: Fixed the bug in :mod:`pdb` and :mod:`bdb` where ``next`` and ``step`` can't go over the line if a loop exists in the line." +msgstr "" + +msgid ":gh:`133390`: Support table, index, trigger, view, column, function, and schema completion for :mod:`sqlite3`'s :ref:`command-line interface `." +msgstr "" + +msgid ":gh:`135307`: :mod:`email`: Fix exception in ``set_content()`` when encoding text and max_line_length is set to ``0`` or ``None`` (unlimited)." +msgstr "" + +msgid ":gh:`133789`: Fix unpickling of :mod:`pathlib` objects that were pickled in Python 3.13." +msgstr "" + +msgid ":gh:`133601`: Remove deprecated :func:`!typing.no_type_check_decorator`." +msgstr "" + +msgid ":gh:`132686`: Add parameters *inherit_class_doc* and *fallback_to_class_doc* for :func:`inspect.getdoc`." +msgstr "" + +msgid ":gh:`131116`: :func:`inspect.getdoc` now correctly returns an inherited docstring on :class:`~functools.cached_property` objects if none is given in a subclass." +msgstr "" + +msgid ":gh:`130693`: Add support for ``-nolinestop``, and ``-strictlimits`` options to :meth:`!tkinter.Text.search`. Also add the :meth:`!tkinter.Text.search_all` method for ``-all`` and ``-overlap`` options." +msgstr "" + +msgid ":gh:`122255`: In the :mod:`linecache` module and in the Python implementation of the :mod:`warnings` module, a ``DeprecationWarning`` is issued when ``mod.__loader__`` differs from ``mod.__spec__.loader`` (like in the C implementation of the :mod:`!warnings` module)." +msgstr "" + +msgid ":gh:`121011`: :func:`math.log` now supports arbitrary large integer-like arguments in the same way as arbitrary large integer arguments." +msgstr "" + +msgid ":gh:`119668`: Publicly expose and document :class:`importlib.machinery.NamespacePath`." +msgstr "" + +msgid ":gh:`102431`: Clarify constraints for \"logical\" arguments in methods of :class:`decimal.Context`." +msgstr "" + +msgid ":gh:`81313`: Add the :mod:`math.integer` module (:pep:`791`)." +msgstr "" + +msgid ":gh:`141579`: Fix :func:`sys.activate_stack_trampoline` to properly support the ``perf_jit`` backend. Patch by Pablo Galindo." +msgstr "" + +msgid ":gh:`114203`: Skip locking if object is already locked by two-mutex critical section." +msgstr "" + +msgid ":gh:`141528`: Suggest using :meth:`concurrent.interpreters.Interpreter.close` instead of the private ``_interpreters.destroy`` function when warning about remaining subinterpreters. Patch by Sergey Miryanov." +msgstr "" + +msgid ":gh:`141367`: Specialize ``CALL_LIST_APPEND`` instruction only for lists, not for list subclasses, to avoid unnecessary deopt. Patch by Mikhail Efimov." +msgstr "" + +msgid ":gh:`141312`: Fix the assertion failure in the ``__setstate__`` method of the range iterator when a non-integer argument is passed. Patch by Sergey Miryanov." +msgstr "" + +msgid ":gh:`140643`: Add support for ```` and ```` frames to :mod:`!profiling.sampling` output to denote active garbage collection and calls to native code." +msgstr "" + +msgid ":gh:`140942`: Add ``.cjs`` to :mod:`mimetypes` to give CommonJS modules a MIME type of ``application/node``." +msgstr "" + +msgid ":gh:`140479`: Update JIT compilation to use LLVM 21 at build time." +msgstr "" + +msgid ":gh:`140939`: Fix memory leak when :class:`bytearray` or :class:`bytes` is formated with the ``%*b`` format with a large width that results in a :exc:`MemoryError`." +msgstr "" + +msgid ":gh:`140260`: Fix :mod:`struct` data race in endian table initialization with subinterpreters. Patch by Shamil Abdulaev." +msgstr "" + +msgid ":gh:`140530`: Fix a reference leak when ``raise exc from cause`` fails. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`90344`: Replace :class:`io.IncrementalNewlineDecoder` with non incremental newline decoders in codebase where :meth:`!io.IncrementalNewlineDecoder.decode` was being called once." +msgstr "" + +msgid ":gh:`140373`: Correctly emit ``PY_UNWIND`` event when generator object is closed. Patch by Mikhail Efimov." +msgstr "" + +msgid ":gh:`140729`: Fix pickling error in the sampling profiler when using ``concurrent.futures.ProcessPoolExecutor`` script can not be properly pickled and executed in worker processes." +msgstr "" + +msgid ":gh:`131527`: Dynamic borrow checking for stackrefs is added to ``Py_STACKREF_DEBUG`` mode. Patch by Mikhail Efimov." +msgstr "" + +msgid ":gh:`140576`: Fixed crash in :func:`tokenize.generate_tokens` in case of specific incorrect input. Patch by Mikhail Efimov." +msgstr "" + +msgid ":gh:`140544`: Speed up accessing interpreter state by caching it in a thread local variable. Patch by Kumar Aditya." +msgstr "" + +msgid ":gh:`140551`: Fixed crash in :class:`dict` if :meth:`dict.clear` is called at the lookup stage. Patch by Mikhail Efimov and Inada Naoki." +msgstr "" + +msgid ":gh:`140517`: Fixed a reference leak when iterating over the result of :func:`map` with ``strict=True`` when the input iterables have different lengths. Patch by Mikhail Efimov." +msgstr "" + +msgid ":gh:`133467`: Fix race when updating :attr:`!type.__bases__` that could allow a read of :attr:`!type.__base__` to observe an inconsistent value on the free threaded build." +msgstr "" + +msgid ":gh:`140471`: Fix potential buffer overflow in :class:`ast.AST` node initialization when encountering malformed :attr:`~ast.AST._fields` containing non-:class:`str`." +msgstr "" + +msgid ":gh:`140443`: The logarithm functions (such as :func:`math.log10` and :func:`math.log`) may now produce slightly different results for extremely large integers that cannot be converted to floats without overflow. These results are generally more accurate, with reduced worst-case error and a tighter overall error distribution." +msgstr "" + +msgid ":gh:`140431`: Fix a crash in Python's :term:`garbage collector ` due to partially initialized :term:`coroutine` objects when coroutine origin tracking depth is enabled (:func:`sys.set_coroutine_origin_tracking_depth`)." +msgstr "" + +msgid ":gh:`140476`: Optimize :c:func:`PySet_Add` for :class:`frozenset` in :term:`free threaded ` build." +msgstr "" + +msgid ":gh:`135904`: Add special labels to the assembly created during stencil creation to support relocations that the native object file format does not support. Specifically, 19 bit branches for AArch64 in Mach-O object files." +msgstr "" + +msgid ":gh:`140398`: Fix memory leaks in :mod:`readline` functions :func:`~readline.read_init_file`, :func:`~readline.read_history_file`, :func:`~readline.write_history_file`, and :func:`~readline.append_history_file` when :c:func:`PySys_Audit` fails." +msgstr "" + +msgid ":gh:`140406`: Fix memory leak when an object's :meth:`~object.__hash__` method returns an object that isn't an :class:`int`." +msgstr "" + +msgid ":gh:`140358`: Restore elapsed time and unreachable object count in GC debug output. These were inadvertently removed during a refactor of ``gc.c``. The debug log now again reports elapsed collection time and the number of unreachable objects. Contributed by Pål Grønås Drange." +msgstr "" + +msgid ":gh:`136895`: Update JIT compilation to use LLVM 20 at build time." +msgstr "" + +msgid ":gh:`139109`: A new tracing frontend for the JIT compiler has been implemented. Patch by Ken Jin. Design for CPython by Ken Jin, Mark Shannon and Brandt Bucher." +msgstr "" + +msgid ":gh:`140306`: Fix memory leaks in cross-interpreter channel operations and shared namespace handling." +msgstr "" + +msgid ":gh:`116738`: Make _suggestions module thread-safe on the :term:`free threaded ` build." +msgstr "" + +msgid ":gh:`140301`: Fix memory leak of ``PyConfig`` in subinterpreters." +msgstr "" + +msgid ":gh:`140257`: Fix data race between interpreter_clear() and take_gil() on eval_breaker during finalization with daemon threads." +msgstr "" + +msgid ":gh:`139951`: Fixes a regression in GC performance for a growing heap composed mostly of small tuples." +msgstr "" + +msgid "Counts number of actually tracked objects, instead of trackable objects. This ensures that untracking tuples has the desired effect of reducing GC overhead." +msgstr "" + +msgid "Does not track most untrackable tuples during creation. This prevents large numbers of small tuples causing excessive GCs." +msgstr "" + +msgid ":gh:`140253`: Wrong placement of a double-star pattern inside a mapping pattern now throws a specialized syntax error. Contributed by Bartosz Sławecki in :gh:`140253`." +msgstr "" + +msgid ":gh:`140104`: Fix a bug with exception handling in the JIT. Patch by Ken Jin. Bug reported by Daniel Diniz." +msgstr "" + +msgid ":gh:`140149`: Speed up parsing bytes literals concatenation by using PyBytesWriter API and a single memory allocation (about 3x faster)." +msgstr "" + +msgid ":gh:`140061`: Fixing the checking of whether an object is uniquely referenced to ensure free-threaded compatibility. Patch by Sergey Miryanov." +msgstr "" + +msgid ":gh:`140080`: Fix hang during finalization when attempting to call :mod:`atexit` handlers under no memory." +msgstr "" + +msgid ":gh:`139871`: Update :class:`bytearray` to use a :class:`bytes` under the hood as its buffer and add :meth:`bytearray.take_bytes` to take it out." +msgstr "" + +msgid ":gh:`140067`: Fix memory leak in sub-interpreter creation." +msgstr "" + +msgid ":gh:`139914`: Restore support for HP PA-RISC, which has an upwards-growing stack." +msgstr "" + +msgid ":gh:`139817`: Attribute ``__qualname__`` is added to :class:`typing.TypeAliasType`. Patch by Mikhail Efimov." +msgstr "" + +msgid ":gh:`135801`: Many functions related to compiling or parsing Python code, such as :func:`compile`, :func:`ast.parse`, :func:`symtable.symtable`, and :func:`importlib.abc.InspectLoader.source_to_code` now allow to specify the module name. It is needed to unambiguous :ref:`filter ` syntax warnings by module name." +msgstr "" + +msgid ":gh:`139640`: :func:`ast.parse` no longer emits syntax warnings for ``return``/``break``/``continue`` in ``finally`` (see :pep:`765`) -- they are only emitted during compilation." +msgstr "" + +msgid ":gh:`139640`: Fix swallowing some syntax warnings in different modules if they accidentally have the same message and are emitted from the same line. Fix duplicated warnings in the ``finally`` block." +msgstr "" + +msgid ":gh:`139475`: Changes in stackref debugging mode when ``Py_STACKREF_DEBUG`` is set. We use the same pattern of refcounting for stackrefs as in production build." +msgstr "" + +msgid ":gh:`139269`: Fix undefined behavior when using unaligned store in JIT's ``patch_*`` functions." +msgstr "" + +msgid ":gh:`138944`: Fix :exc:`SyntaxError` message when invalid syntax appears on the same line as a valid ``import ... as ...`` or ``from ... import ... as ...`` statement. Patch by Brian Schubert." +msgstr "" + +msgid ":gh:`138857`: Improve :exc:`SyntaxError` message for ``case`` keyword placed outside :keyword:`match` body." +msgstr "" + +msgid ":gh:`131253`: Support the ``--enable-pystats`` build option for the free-threaded build." +msgstr "" + +msgid ":gh:`136327`: Errors when calling functions with invalid values after ``*`` and ``**`` now do not include the function name. Patch by Ilia Solin." +msgstr "" + +msgid ":gh:`134786`: If :c:macro:`Py_TPFLAGS_MANAGED_DICT` and :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` are used, then :c:macro:`Py_TPFLAGS_HAVE_GC` must be used as well." +msgstr "" + +msgid ":gh:`141341`: On Windows, rename the ``COMPILER`` macro to ``_Py_COMPILER`` to avoid name conflicts. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`116146`: Add a new :c:func:`PyImport_CreateModuleFromInitfunc` C-API for creating a module from a *spec* and *initfunc*. Patch by Itamar Oren." +msgstr "" + +msgid ":gh:`141042`: Make qNaN in :c:func:`PyFloat_Pack2` and :c:func:`PyFloat_Pack4`, if while conversion to a narrower precision floating-point format --- the remaining after truncation payload will be zero. Patch by Sergey B Kirpichev." +msgstr "" + +msgid ":gh:`141004`: :c:macro:`!Py_MATH_El` and :c:macro:`!Py_MATH_PIl` are deprecated." +msgstr "" + +msgid ":gh:`141004`: The :c:macro:`!Py_INFINITY` macro is :term:`soft deprecated`." +msgstr "" + +msgid ":gh:`140556`: :pep:`793`: Add a new entry point for C extension modules, ``PyModExport_``." +msgstr "" + +msgid ":gh:`140487`: Fix :c:macro:`Py_RETURN_NOTIMPLEMENTED` in limited C API 3.11 and older: don't treat ``Py_NotImplemented`` as immortal. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`140153`: Fix :c:func:`Py_REFCNT` definition on limited C API 3.11-3.13. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`139653`: Add :c:func:`PyUnstable_ThreadState_SetStackProtection` and :c:func:`PyUnstable_ThreadState_ResetStackProtection` functions to set the stack protection base address and stack protection size of a Python thread state. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`140454`: When building the JIT, match the jit_stencils filename expectations in Makefile with the generator script. This avoid needless JIT recompilation during ``make install``." +msgstr "" + +msgid ":gh:`140768`: Warn when the WASI SDK version doesn't match what's supported." +msgstr "" + +msgid ":gh:`140513`: Generate a clear compilation error when ``_Py_TAIL_CALL_INTERP`` is enabled but either ``preserve_none`` or ``musttail`` is not supported." +msgstr "" + +msgid ":gh:`140475`: Support WASI SDK 25." +msgstr "" + +msgid ":gh:`140239`: Check ``statx`` availability only on Linux (including Android)." +msgstr "" + +msgid ":gh:`140189`: iOS builds were added to CI." +msgstr "" + +msgid ":gh:`137618`: ``PYTHON_FOR_REGEN`` now requires Python 3.10 to Python 3.15. Patch by Adam Turner." +msgstr "" + +msgid "Python 3.15.0 alpha 1" +msgstr "" + +msgid "*Release date: 2025-10-14*" +msgstr "" + +msgid ":gh:`115119`: Update macOS installer to use libmpdecimal 4.0.1." +msgstr "" + +msgid ":gh:`124111`: Update macOS installer to use Tcl/Tk 9.0.2." +msgstr "" + +msgid ":gh:`132339`: Update macOS installer version of OpenSSL to 3.5.4." +msgstr "" + +msgid ":gh:`137450`: macOS installer shell path management improvements: separate the installer ``Shell profile updater`` postinstall script from the ``Update Shell Profile.command`` to enable more robust error handling." +msgstr "" + +msgid ":gh:`137134`: Update macOS installer to ship with SQLite version 3.50.4." +msgstr "" + +msgid ":gh:`139810`: Installing with ``py install 3[.x]-dev`` will now select final versions as well as prereleases." +msgstr "" + +msgid ":gh:`139573`: Updated bundled version of OpenSSL to 3.0.18." +msgstr "" + +msgid ":gh:`138896`: Fix error installing C runtime on non-updated Windows machines" +msgstr "" + +msgid ":gh:`138314`: Add :func:`winreg.DeleteTree`." +msgstr "" + +msgid ":gh:`137136`: Suppress build warnings when build on Windows with ``--experimental-jit-interpreter``." +msgstr "" + +msgid ":gh:`137134`: Update Windows installer to ship with SQLite 3.50.4." +msgstr "" + +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 "" + +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 "" + +msgid ":gh:`76023`: Make :func:`os.path.realpath` ignore Windows error 1005 when in non-strict mode." +msgstr "" + +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 "" + +msgid ":gh:`133626`: Ensures packages are not accidentally bundled into the traditional installer." +msgstr "" + +msgid ":gh:`133580`: Fix :func:`sys.getwindowsversion` failing without setting an exception when called on some WinAPI partitions." +msgstr "" + +msgid ":gh:`133572`: Avoid LsaNtStatus to WinError conversion on unsupported WinAPI partitions." +msgstr "" + +msgid ":gh:`133568`: Fix compile error when using a WinAPI partition that doesn't support the RPC runtime library." +msgstr "" + +msgid ":gh:`133562`: Disable handling of security descriptors by :func:`os.mkdir` with mode ``0o700`` on WinAPI partitions that do not support it. This only affects custom builds for specialized targets." +msgstr "" + +msgid ":gh:`133537`: Avoid using console I/O in WinAPI partitions that don’t support it" +msgstr "" + +msgid ":gh:`131942`: Use the Python-specific :c:macro:`Py_DEBUG` macro rather than :c:macro:`!_DEBUG` in Windows-related C code. Patch by Xuehai Pan." +msgstr "" + +msgid ":gh:`139330`: SBOM generation tool didn't cross-check the version and checksum values against the ``Modules/expat/refresh.sh`` script, leading to the values becoming out-of-date during routine updates." +msgstr "" + +msgid ":gh:`132006`: XCframeworks now include privacy manifests to satisfy Apple App Store submission requirements." +msgstr "" + +msgid ":gh:`138171`: A script for building an iOS XCframework was added. As part of this change, the top level ``iOS`` folder has been moved to be a subdirectory of the ``Apple`` folder." +msgstr "" + +msgid ":gh:`137873`: The iOS test runner has been simplified, resolving some issues that have been observed using the runner in GitHub Actions and Azure Pipelines test environments." +msgstr "" + +msgid ":gh:`137484`: Have ``Tools/wasm/wasi`` put the build Python into a directory named after the build triple instead of \"build\"." +msgstr "" + +msgid ":gh:`137025`: The ``wasm_build.py`` script has been removed. ``Tools/wasm/emscripten`` and ``Tools/wasm/wasi`` should be used instead, as described in the `Dev Guide `__." +msgstr "" + +msgid ":gh:`137248`: Add a ``--logdir`` option to ``Tools/wasm/wasi`` for specifying where to write log files." +msgstr "" + +msgid ":gh:`137243`: Have Tools/wasm/wasi detect a WASI SDK install in /opt when it was directly extracted from a release tarball." +msgstr "" + +msgid ":gh:`136251`: Fixes and usability improvements for ``Tools/wasm/emscripten/web_example``" +msgstr "" + +msgid ":gh:`135968`: Stubs for ``strip`` are now provided as part of an iOS install." +msgstr "" + +msgid ":gh:`135379`: The cases generator no longer accepts type annotations on stack items. Conversions to non-default types are now done explicitly in bytecodes.c and optimizer_bytecodes.c. This will simplify code generation for top-of-stack caching and other future features." +msgstr "" + +msgid ":gh:`134215`: :term:`REPL` import autocomplete only suggests private modules when explicitly specified." +msgstr "" + +msgid ":gh:`139208`: Fix regrtest ``--fast-ci --verbose``: don't ignore the ``--verbose`` option anymore. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`138313`: Restore skipped test and add janky workaround to prevent select buildbots from failing with a ResourceWarning." +msgstr "" + +msgid ":gh:`135966`: The iOS testbed now handles the ``app_packages`` folder as a site directory." +msgstr "" + +msgid ":gh:`135494`: Fix regrtest to support excluding tests from ``--pgo`` tests. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`132815`: Fix test__opcode: add ``JUMP_BACKWARD`` to specialization stats." +msgstr "" + +msgid ":gh:`135489`: Show verbose output for failing tests during PGO profiling step with --enable-optimizations." +msgstr "" + +msgid ":gh:`135401`: Add a new GitHub CI job to test the :mod:`ssl` module with `AWS-LC `_ as the backing cryptography and TLS library." +msgstr "" + +msgid ":gh:`135120`: Add :func:`!test.support.subTests`." +msgstr "" + +msgid ":gh:`134567`: Expose log formatter to users in TestCase.assertLogs. :func:`unittest.TestCase.assertLogs` will now optionally accept a formatter that will be used to format the strings in output if provided." +msgstr "" + +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 "" + +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 "" + +msgid ":gh:`133639`: Fix ``TestPyReplAutoindent.test_auto_indent_default()`` doesn't run ``input_code``." +msgstr "" + +msgid ":gh:`139700`: Check consistency of the zip64 end of central directory record. Support records with \"zip64 extensible data\" if there are no bytes prepended to the ZIP file." +msgstr "" + +msgid ":gh:`139400`: :mod:`xml.parsers.expat`: Make sure that parent Expat parsers are only garbage-collected once they are no longer referenced by subparsers created by :meth:`~xml.parsers.expat.xmlparser.ExternalEntityParserCreate`. Patch by Sebastian Pipping." +msgstr "" + +msgid ":gh:`139283`: :mod:`sqlite3`: correctly handle maximum number of rows to fetch in :meth:`Cursor.fetchmany ` and reject negative values for :attr:`Cursor.arraysize `. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`136053`: :mod:`marshal`: fix a possible crash when deserializing :class:`slice` objects." +msgstr "" + +msgid ":gh:`135661`: Fix parsing start and end tags in :class:`html.parser.HTMLParser` according to the HTML5 standard." +msgstr "" + +msgid "Whitespaces no longer accepted between ```` does not end the script section." +msgstr "" + +msgid "Vertical tabulation (``\\v``) and non-ASCII whitespaces no longer recognized as whitespaces. The only whitespaces are ``\\t\\n\\r\\f`` and space." +msgstr "" + +msgid "Null character (U+0000) no longer ends the tag name." +msgstr "" + +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 "" + +msgid "Multiple slashes and whitespaces between the last attribute and closing ``>`` are now ignored in both start and end tags. E.g. ````." +msgstr "" + +msgid "Multiple ``=`` between attribute name and value are no longer collapsed. E.g. ```` produces attribute \"foo\" with value \"=bar\"." +msgstr "" + +msgid ":gh:`135661`: Fix CDATA section parsing in :class:`html.parser.HTMLParser` according to the HTML5 standard: ``] ]>`` and ``]] >`` no longer end the CDATA section. Add private method ``_set_support_cdata()`` which can be used to specify how to parse ``<[CDATA[`` --- as a CDATA section in foreign content (SVG or MathML) or as a bogus comment in the HTML namespace." +msgstr "" + +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 "" + +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 "" + +msgid ":gh:`118350`: Fix support of escapable raw text mode (elements \"textarea\" and \"title\") in :class:`html.parser.HTMLParser`." +msgstr "" + +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 "" + +msgid "Addresses :cve:`2024-12718`, :cve:`2025-4138`, :cve:`2025-4330`, and :cve:`2025-4517`." +msgstr "" + +msgid ":gh:`133767`: Fix use-after-free in the \"unicode-escape\" decoder with a non-\"strict\" error handler." +msgstr "" + +msgid ":gh:`133623`: Indicate through :data:`ssl.HAS_PSK_TLS13` whether the :mod:`ssl` module supports \"External PSKs\" in TLSv1.3, as described in RFC 9258. Patch by Will Childs-Klein." +msgstr "" + +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 "" + +msgid ":gh:`139482`: Optimize :data:`os.environ.clear() ` by calling :manpage:`clearenv(3)` when this function is available. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`139958`: The ``application/toml`` mime type is now supported by :mod:`mimetypes`. Patch by Gil Forcada." +msgstr "" + +msgid ":gh:`139823`: :mod:`ensurepip` now fails with a nicer error message when the :mod:`zlib` module is not available." +msgstr "" + +msgid ":gh:`139905`: Add suggestion to error message for :class:`typing.Generic` subclasses when ``cls.__parameters__`` is missing due to a parent class failing to call :meth:`super().__init_subclass__() ` in its ``__init_subclass__``." +msgstr "" + +msgid ":gh:`139894`: Fix incorrect sharing of current task with the child process while forking in :mod:`asyncio`. Patch by Kumar Aditya." +msgstr "" + +msgid ":gh:`139845`: Fix to not print KeyboardInterrupt twice in default asyncio REPL." +msgstr "" + +msgid ":gh:`139783`: Fix :func:`inspect.getsourcelines` for the case when a decorator is followed by a comment or an empty line." +msgstr "" + +msgid ":gh:`139809`: Prevent premature colorization of subparser ``prog`` in :meth:`argparse.ArgumentParser.add_subparsers` to respect color environment variable changes after parser creation." +msgstr "" + +msgid ":gh:`139736`: Fix excessive indentation in the default :mod:`argparse` :class:`!HelpFormatter`. Patch by Alexander Edland." +msgstr "" + +msgid ":gh:`70765`: :mod:`http.server`: fix default handling of HTTP/0.9 requests in :class:`~http.server.BaseHTTPRequestHandler`. Previously, :meth:`!BaseHTTPRequestHandler.parse_request` incorrectly waited for headers in the request although those are not supported in HTTP/0.9. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`139322`: Fix :func:`os.getlogin` error handling: fix the error number. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`135953`: Add a Gecko format output to the tachyon profiler via ``--gecko``." +msgstr "" + +msgid ":gh:`139184`: :func:`os.forkpty` does now make the returned file descriptor non-inheritable." +msgstr "" + +msgid ":gh:`139391`: Fix an issue when, on non-Windows platforms, it was not possible to gracefully exit a ``python -m asyncio`` process suspended by Ctrl+Z and later resumed by :manpage:`fg` other than with :manpage:`kill`." +msgstr "" + +msgid ":gh:`139374`: :mod:`timeit`: Add color to error tracebacks." +msgstr "" + +msgid ":gh:`90949`: Add :meth:`~xml.parsers.expat.xmlparser.SetBillionLaughsAttackProtectionActivationThreshold` and :meth:`~xml.parsers.expat.xmlparser.SetBillionLaughsAttackProtectionMaximumAmplification` to :ref:`xmlparser ` objects to tune protections against `billion laughs `_ attacks. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`139312`: Upgrade bundled libexpat to 2.7.3" +msgstr "" + +msgid ":gh:`139289`: Do a real lazy-import on :mod:`rlcompleter` in :mod:`pdb` and restore the existing completer after importing :mod:`rlcompleter`." +msgstr "" + +msgid ":gh:`90949`: Add :meth:`~xml.parsers.expat.xmlparser.SetAllocTrackerActivationThreshold` and :meth:`~xml.parsers.expat.xmlparser.SetAllocTrackerMaximumAmplification` to :ref:`xmlparser ` objects to tune protections against disproportional amounts of dynamic memory usage from within an Expat parser. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`67795`: Functions that take timestamp or timeout arguments now accept any real numbers (such as :class:`~decimal.Decimal` and :class:`~fractions.Fraction`), not only integers or floats, although this does not improve precision." +msgstr "" + +msgid ":gh:`95953`: A CSS class, ``diff_changed``, was added to the changed lines in the ``make_table`` output of :class:`difflib.HtmlDiff`. Patch by Katie Gardner." +msgstr "" + +msgid ":gh:`139210`: Fix use-after-free when reporting unknown event in :func:`xml.etree.ElementTree.iterparse`. Patch by Ken Jin." +msgstr "" + +msgid ":gh:`138860`: Lazy import :mod:`rlcompleter` in :mod:`pdb` to avoid deadlock in subprocess." +msgstr "" + +msgid ":gh:`112729`: Fix crash when calling :func:`concurrent.interpreters.create` when the process is out of memory." +msgstr "" + +msgid ":gh:`126016`: Fix an assertion failure when sending :exc:`KeyboardInterrupt` to a Python process running a subinterpreter in a separate thread." +msgstr "" + +msgid ":gh:`118803`: :class:`collections.abc.ByteString` has been removed from ``collections.abc.__all__``, and :class:`typing.ByteString` has been removed from ``typing.__all__``. The former has been deprecated since Python 3.12, and the latter has been deprecated since Python 3.9. Both classes are scheduled for removal in Python 3.17." +msgstr "" + +msgid "Additionally, the following statements now cause ``DeprecationWarning``\\ s to be emitted at runtime: ``from collections.abc import ByteString``, ``from typing import ByteString``, ``import collections.abc; collections.abc.ByteString`` and ``import typing; typing.ByteString``. Both classes already caused ``DeprecationWarning``\\ s to be emitted if they were subclassed or used as the second argument to ``isinstance()`` or ``issubclass()``, but they did not previously lead to ``DeprecationWarning``\\ s if they were merely imported or accessed from their respective modules." +msgstr "" + +msgid ":gh:`135729`: Fix unraisable exception during finalization when using :mod:`concurrent.interpreters` in the REPL." +msgstr "" + +msgid ":gh:`139076`: Fix a bug in the :mod:`pydoc` module that was hiding functions in a Python module if they were implemented in an extension module and the module did not have ``__all__``." +msgstr "" + +msgid ":gh:`139090`: Add :data:`os.RWF_DONTCACHE` constant for Linux 6.14+." +msgstr "" + +msgid ":gh:`139065`: Fix trailing space before a wrapped long word if the line length is exactly *width* in :mod:`textwrap`." +msgstr "" + +msgid ":gh:`139001`: Fix race condition in :class:`pathlib.Path` on the internal ``_raw_paths`` field." +msgstr "" + +msgid ":gh:`138813`: :class:`!multiprocessing.BaseProcess` defaults ``kwargs`` to ``None`` instead of a shared dictionary." +msgstr "" + +msgid ":gh:`138998`: Update bundled libexpat to 2.7.2" +msgstr "" + +msgid ":gh:`138993`: Dedent :data:`credits` text." +msgstr "" + +msgid ":gh:`118803`: Add back :class:`collections.abc.ByteString` and :class:`typing.ByteString`. Both had been removed in prior alpha, beta and release candidates for Python 3.14, but their removal has now been postponed to Python 3.17." +msgstr "" + +msgid ":gh:`130567`: Fix possible crash in :func:`locale.strxfrm` due to a platform bug on macOS." +msgstr "" + +msgid ":gh:`137226`: Fix :func:`typing.get_type_hints` calls on generic :class:`typing.TypedDict` classes defined with string annotations." +msgstr "" + +msgid ":gh:`138899`: Executing ``quit`` command in :mod:`pdb` will raise :exc:`bdb.BdbQuit` when :mod:`pdb` is started from an asyncio console using :func:`breakpoint` or :func:`pdb.set_trace`." +msgstr "" + +msgid ":gh:`138804`: Raise :exc:`TypeError` instead of :exc:`AttributeError` when an argument of incorrect type is passed to :func:`shlex.quote`. This restores the behavior of the function prior to 3.14." +msgstr "" + +msgid ":gh:`138779`: Support device numbers larger than ``2**63-1`` for the :attr:`~os.stat_result.st_rdev` field of the :class:`os.stat_result` structure." +msgstr "" + +msgid ":gh:`138682`: Added symmetric difference support to :class:`collections.Counter` objects." +msgstr "" + +msgid ":gh:`138712`: Add :const:`os.NODEV`." +msgstr "" + +msgid ":gh:`128636`: Fix crash in PyREPL when os.environ is overwritten with an invalid value for mac" +msgstr "" + +msgid ":gh:`138720`: Fix an issue where :class:`io.BufferedWriter` and :class:`io.BufferedRandom` had different definitions of \"closed\" for :meth:`~io.IOBase.close` and :meth:`~io.IOBase.flush` which resulted in an exception when close called flush but flush thought the file was already closed." +msgstr "" + +msgid ":gh:`138706`: Update :mod:`unicodedata` database to Unicode 17.0.0." +msgstr "" + +msgid ":gh:`76007`: Deprecate ``__version__`` from a number of standard library modules. Patch by Hugo van Kemenade." +msgstr "" + +msgid ":gh:`138535`: Speed up :func:`os.stat` for files with reasonable timestamps. Contributed by Jeffrey Bosboom." +msgstr "" + +msgid ":gh:`116946`: :mod:`curses.panel`: the type of :func:`curses.panel.new_panel` is now immutable. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`116946`: :mod:`zlib`: the types of :func:`zlib.compressobj` and :func:`zlib.decompressobj` are now immutable. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`116946`: :mod:`os`: the :class:`os.DirEntry` type and the type of :func:`os.scandir` are now immutable. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`116946`: :mod:`tkinter`: the types :class:`!_tkinter.Tcl_Obj` (wrapper for Tcl objects), :class:`!_tkinter.tktimertoken` (obtained by calling ``createtimerhandler()`` on a :attr:`Tk ` application) and :class:`!_tkinter.tkapp` (the runtime type of Tk applications) are now immutable. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`138514`: Raise :exc:`ValueError` when a multi-character string is passed to the *echo_char* parameter of :func:`getpass.getpass`. Patch by Benjamin Johnson." +msgstr "" + +msgid ":gh:`137706`: Fix the partial evaluation of annotations that use ``typing.Annotated[T, x]`` where ``T`` is a forward reference." +msgstr "" + +msgid ":gh:`88375`: Fix normalization of the ``robots.txt`` rules and URLs in the :mod:`urllib.robotparser` module. No longer ignore trailing ``?``. Distinguish raw special characters ``?``, ``=`` and ``&`` from the percent-encoded ones." +msgstr "" + +msgid ":gh:`138515`: :mod:`email` is added to Emscripten build." +msgstr "" + +msgid ":gh:`99948`: :func:`ctypes.util.find_library` now works in Emscripten build." +msgstr "" + +msgid ":gh:`111788`: Fix parsing errors in the :mod:`urllib.robotparser` module. Don't fail trying to parse weird paths. Don't fail trying to decode non-UTF-8 ``robots.txt`` files." +msgstr "" + +msgid ":gh:`138432`: :meth:`zoneinfo.reset_tzpath` will now convert any :class:`os.PathLike` objects it receives into strings before adding them to ``TZPATH``. It will raise ``TypeError`` if anything other than a string is found after this conversion. If given an :class:`os.PathLike` object that represents a relative path, it will now raise ``ValueError`` instead of ``TypeError``, and present a more informative error message." +msgstr "" + +msgid ":gh:`132657`: Improve the scaling of :func:`copy.copy` and :func:`copy.deepcopy` in the free-threading build." +msgstr "" + +msgid ":gh:`116946`: The types of :func:`select.poll` and :func:`select.epoll` objects are now immutable. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`116946`: The :class:`!_random.Random` C type is now immutable. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`57911`: When extracting tar files on Windows, slashes in symlink targets will be replaced by backslashes to prevent corrupted links." +msgstr "" + +msgid ":gh:`138205`: Removed the :meth:`~mmap.mmap.resize` method on platforms that don't support the underlying syscall, instead of raising a :exc:`SystemError`." +msgstr "" + +msgid ":gh:`138008`: Fix segmentation faults in the :mod:`ctypes` module due to invalid :attr:`~ctypes._CFuncPtr.argtypes`. Patch by Dung Nguyen." +msgstr "" + +msgid ":gh:`138252`: :mod:`ssl`: :class:`~ssl.SSLContext` objects can now set client and server TLS signature algorithms. If Python has been built with OpenSSL 3.5 or later, :class:`~ssl.SSLSocket` objects can return the signature algorithms selected on a connection." +msgstr "" + +msgid ":gh:`138253`: Add the *block* parameter in the :meth:`!put` and :meth:`!get` methods of the :mod:`concurrent.interpreters` queues for compatibility with the :class:`queue.Queue` interface." +msgstr "" + +msgid ":gh:`60462`: Fix :func:`locale.strxfrm` on Solaris (and possibly other platforms)." +msgstr "" + +msgid ":gh:`138239`: The REPL now highlights :keyword:`type` as a soft keyword in :ref:`type statements `." +msgstr "" + +msgid ":gh:`78502`: :class:`mmap.mmap` now has a *trackfd* parameter on Windows; if it is ``False``, the file handle corresponding to *fileno* will not be duplicated." +msgstr "" + +msgid ":gh:`138204`: Forbid expansion of shared anonymous :mod:`memory maps ` on Linux, which caused a bus error." +msgstr "" + +msgid ":gh:`138010`: Fix an issue where defining a class with a :deco:`warnings.deprecated`-decorated base class may not invoke the correct :meth:`~object.__init_subclass__` method in cases involving multiple inheritance. Patch by Brian Schubert." +msgstr "" + +msgid ":gh:`134716`: Add support of regular expressions in the :option:`-W` option and the :envvar:`PYTHONWARNINGS` environment variable." +msgstr "" + +msgid ":gh:`138133`: Prevent infinite traceback loop when sending CTRL^C to Python through ``strace``." +msgstr "" + +msgid ":gh:`138122`: Implement :pep:`799` -- A dedicated profiling package for organizing Python profiling tools. Patch by Pablo Galindo." +msgstr "" + +msgid ":gh:`138092`: Fixed a bug in :meth:`mmap.mmap.flush` where calling with only an offset parameter would fail." +msgstr "" + +msgid ":gh:`138044`: Remove compatibility shim for deprecated parameter *package* in :func:`importlib.resources.files`. Patch by Semyon Moroz." +msgstr "" + +msgid ":gh:`86819`: :mod:`socket`: Add missing constants for ISO-TP sockets." +msgstr "" + +msgid ":gh:`137884`: Add :func:`threading.get_native_id` support for Illumos/Solaris. Patch by Yüce Tekol." +msgstr "" + +msgid ":gh:`134869`: Fix an issue where pressing Ctrl+C during tab completion in the REPL would leave the autocompletion menu in a corrupted state." +msgstr "" + +msgid ":gh:`137840`: :class:`typing.TypedDict` now supports the ``closed`` and ``extra_items`` keyword arguments (as described in :pep:`728`) to control whether additional non-required keys are allowed and to specify their value type." +msgstr "" + +msgid ":gh:`132947`: Applied changes to ``importlib.metadata`` from `importlib_metadata 8.7 `_, including ``dist`` now disallowed for ``EntryPoints.select``; deferred imports for faster import times; added support for metadata with newlines (python/cpython#119650); and ``metadata()`` function now returns ``None`` when a metadata directory is present but no metadata is present." +msgstr "" + +msgid ":gh:`90548`: Fix ``musl`` detection for :func:`platform.libc_ver` on Alpine Linux if compiled with --strip-all." +msgstr "" + +msgid ":gh:`137317`: :func:`inspect.signature` now correctly handles classes that use a descriptor on a wrapped :meth:`!__init__` or :meth:`!__new__` method. Contributed by Yongyu Yan." +msgstr "" + +msgid ":gh:`137754`: Fix import of the :mod:`zoneinfo` module if the C implementation of the :mod:`datetime` module is not available." +msgstr "" + +msgid ":gh:`125854`: Improve error messages for invalid category in :func:`warnings.warn`." +msgstr "" + +msgid ":gh:`137729`: :func:`locale.setlocale` now supports language codes with ``@``-modifiers. ``@``-modifier are no longer silently removed in :func:`locale.getlocale`, but included in the language code." +msgstr "" + +msgid ":gh:`73487`: Speedup processing arguments (up to 1.5x) in the :mod:`decimal` module methods, that now using :c:macro:`METH_FASTCALL` calling convention. Patch by Sergey B Kirpichev." +msgstr "" + +msgid ":gh:`137634`: Calendar pages generated by the :class:`calendar.HTMLCalendar` class now support dark mode and have been migrated to the HTML5 standard for improved accessibility." +msgstr "" + +msgid ":gh:`137630`: The :mod:`!_interpreters` module now uses Argument Clinic to parse arguments. Patch by Adam Turner." +msgstr "" + +msgid ":gh:`137583`: Fix a deadlock introduced in 3.13.6 when a call to :meth:`ssl.SSLSocket.recv ` was blocked in one thread, and then another method on the object (such as :meth:`ssl.SSLSocket.send `) was subsequently called in another thread." +msgstr "" + +msgid ":gh:`92936`: Update regex used by ``http.cookies.SimpleCookie`` to handle values containing double quotes." +msgstr "" + +msgid ":gh:`137426`: Remove the code deprecation of ``importlib.abc.ResourceLoader``. It is documented as deprecated, but left for backwards compatibility with other classes in ``importlib.abc``." +msgstr "" + +msgid ":gh:`137490`: Handle :data:`~errno.ECANCELED` in the same way as :data:`~errno.EINTR` in :func:`signal.sigwaitinfo` on NetBSD." +msgstr "" + +msgid ":gh:`137512`: Add new constants in the :mod:`resource` module: :data:`~resource.RLIMIT_NTHR`, :data:`~resource.RLIMIT_UMTXP`, :data:`~resource.RLIMIT_PIPEBUF`, :data:`~resource.RLIMIT_THREADS`, :data:`~resource.RLIM_SAVED_CUR`, and :data:`~resource.RLIM_SAVED_MAX`." +msgstr "" + +msgid ":gh:`137044`: :data:`resource.RLIM_INFINITY` is now always a positive integer. On all supported platforms, it is larger than any limited resource value, which simplifies comparison of the resource values. Previously, it could be negative, such as -1 or -3, depending on platform." +msgstr "" + +msgid ":gh:`137477`: Fix :func:`!inspect.getblock`, :func:`inspect.getsourcelines` and :func:`inspect.getsource` for generator expressions." +msgstr "" + +msgid ":gh:`137481`: Calendar uses the lengths of the locale's weekdays to decide if the width requires abbreviation." +msgstr "" + +msgid ":gh:`137466`: Remove undocumented :func:`!glob.glob0` and :func:`!glob.glob1` functions, which have been deprecated since Python 3.13. Use :func:`glob.glob` and pass a directory to its *root_dir* argument instead." +msgstr "" + +msgid ":gh:`137044`: Return large limit values as positive integers instead of negative integers in :func:`resource.getrlimit`. Accept large values and reject negative values (except :data:`~resource.RLIM_INFINITY`) for limits in :func:`resource.setrlimit`." +msgstr "" + +msgid ":gh:`115766`: Fix :attr:`!ipaddress.IPv4Interface.is_unspecified`." +msgstr "" + +msgid ":gh:`75989`: :func:`tarfile.TarFile.extractall` and :func:`tarfile.TarFile.extract` now overwrite symlinks when extracting hardlinks. (Contributed by Alexander Enrique Urieles Nieto in :gh:`75989`.)" +msgstr "" + +msgid ":gh:`137017`: Fix :obj:`threading.Thread.is_alive` to remain ``True`` until the underlying OS thread is fully cleaned up. This avoids false negatives in edge cases involving thread monitoring or premature :obj:`threading.Thread.is_alive` calls." +msgstr "" + +msgid ":gh:`137273`: Fix debug assertion failure in :func:`locale.setlocale` on Windows." +msgstr "" + +msgid ":gh:`137191`: Fix how type parameters are collected, when :class:`typing.Protocol` are specified with explicit parameters. Now, :class:`typing.Generic` and :class:`typing.Protocol` always dictate the parameter number and parameter ordering of types. Previous behavior was a bug." +msgstr "" + +msgid ":gh:`137282`: Fix tab completion and :func:`dir` on :mod:`concurrent.futures`." +msgstr "" + +msgid ":gh:`137257`: Bump the version of pip bundled in ensurepip to version 25.2" +msgstr "" + +msgid ":gh:`137239`: :mod:`heapq`: Update :data:`!heapq.__all__` with ``*_max`` functions." +msgstr "" + +msgid ":gh:`124503`: :func:`ast.literal_eval` is 10-20% faster for small inputs." +msgstr "" + +msgid ":gh:`137226`: Fix behavior of :meth:`annotationlib.ForwardRef.evaluate` when the *type_params* parameter is passed and the name of a type param is also present in an enclosing scope." +msgstr "" + +msgid ":gh:`137197`: :class:`~ssl.SSLContext` objects can now set TLS 1.3 cipher suites via :meth:`~ssl.SSLContext.set_ciphersuites`." +msgstr "" + +msgid ":gh:`81325`: :class:`tarfile.TarFile` now accepts a :term:`path-like ` when working on a tar archive. (Contributed by Alexander Enrique Urieles Nieto in :gh:`81325`.)" +msgstr "" + +msgid ":gh:`137185`: Fix a potential async-signal-safety issue in :mod:`faulthandler` when printing C stack traces." +msgstr "" + +msgid ":gh:`133951`: Remove lib64-lib symlink creation when creating new virtual environments in :mod:`venv` module" +msgstr "" + +msgid ":gh:`130522`: Fix unraisable :exc:`TypeError` raised during :term:`interpreter shutdown` in the :mod:`threading` module." +msgstr "" + +msgid ":gh:`137059`: Fix handling of file URLs with a Windows drive letter in the URL authority by :func:`urllib.request.url2pathname`. This fixes a regression in earlier pre-releases of Python 3.14." +msgstr "" + +msgid ":gh:`136980`: Remove unused C tracing code in bdb for event type ``c_call``, ``c_return`` and ``c_exception``" +msgstr "" + +msgid ":gh:`130577`: :mod:`tarfile` now validates archives to ensure member offsets are non-negative. (Contributed by Alexander Enrique Urieles Nieto in :gh:`130577`.)" +msgstr "" + +msgid ":gh:`136170`: Removed the unreleased ``zipfile.ZipFile.data_offset`` property added in 3.14.0a7 as it wasn't fully clear which behavior it should have in some situations so the result was not always what a user might expect." +msgstr "" + +msgid ":gh:`121237`: Support ``%:z`` directive for :meth:`datetime.datetime.strptime`, :meth:`datetime.time.strptime` and :func:`time.strptime`. Patch by Lucas Esposito and Semyon Moroz." +msgstr "" + +msgid ":gh:`136929`: Ensure that hash functions guaranteed to be always *available* exist as attributes of :mod:`hashlib` even if they will not work at runtime due to missing backend implementations. For instance, ``hashlib.md5`` will no longer raise :exc:`AttributeError` if OpenSSL is not available and Python has been built without MD5 support. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`124621`: pyrepl now works in Emscripten." +msgstr "" + +msgid ":gh:`136914`: Fix retrieval of :attr:`doctest.DocTest.lineno` for objects decorated with :func:`functools.cache` or :class:`functools.cached_property`." +msgstr "" + +msgid ":gh:`136912`: :func:`hmac.digest` now properly handles large keys and messages by falling back to the pure Python implementation when necessary. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`83424`: Allows creating a :class:`ctypes.CDLL` without name when passing a handle as an argument." +msgstr "" + +msgid ":gh:`135228`: When :mod:`dataclasses` replaces a class with a slotted dataclass, the original class can now be garbage collected again. Earlier changes in Python 3.14 caused this class to always remain in existence together with the replacement class synthesized by :mod:`dataclasses`." +msgstr "" + +msgid ":gh:`136874`: Discard URL query and fragment in :func:`urllib.request.url2pathname`." +msgstr "" + +msgid ":gh:`136787`: :mod:`hashlib`: improve exception messages when a hash algorithm is not recognized, blocked by the current security policy or incompatible with the desired operation (for instance, using HMAC with SHAKE). Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`130645`: Enable color help by default in :mod:`argparse`." +msgstr "" + +msgid ":gh:`131724`: In :mod:`http.client`, a new *max_response_headers* keyword-only parameter has been added to :class:`~http.client.HTTPConnection` and :class:`~http.client.HTTPSConnection` constructors. This parameter sets the maximum number of allowed response headers, helping to prevent denial-of-service attacks." +msgstr "" + +msgid ":gh:`135427`: With :option:`-Werror <-W>`, the DeprecationWarning emitted by :py:func:`os.fork` and :py:func:`os.forkpty` in mutli-threaded processes is now raised as an exception. Previously it was silently ignored. Patch by Rani Pinchuk." +msgstr "" + +msgid ":gh:`136234`: Fix :meth:`asyncio.WriteTransport.writelines` to be robust to connection failure, by using the same behavior as :meth:`~asyncio.WriteTransport.write`." +msgstr "" + +msgid ":gh:`53144`: :mod:`!encodings.aliases`: Add ``latin_N`` aliases" +msgstr "" + +msgid ":gh:`136669`: :mod:`!_asyncio` is now statically linked for improved performance." +msgstr "" + +msgid ":gh:`136134`: :meth:`!SMTP.auth_cram_md5` now raises an :exc:`~smtplib.SMTPException` instead of a :exc:`ValueError` if Python has been built without MD5 support. In particular, :class:`~smtplib.SMTP` clients will not attempt to use this method even if the remote server is assumed to support it. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`136134`: :meth:`IMAP4.login_cram_md5 ` now raises an :exc:`IMAP4.error ` if CRAM-MD5 authentication is not supported. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`136591`: :mod:`!_hashlib`: avoid using deprecated functions :manpage:`ERR_func_error_string` and :manpage:`EVP_MD_CTX_md` when using OpenSSL 3.0 and later. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`136571`: :meth:`datetime.date.fromisocalendar` can now raise OverflowError for out of range arguments." +msgstr "" + +msgid ":gh:`136549`: Fix signature of :func:`threading.excepthook`." +msgstr "" + +msgid ":gh:`136492`: Expose :pep:`667`'s :data:`~types.FrameLocalsProxyType` in the :mod:`types` module." +msgstr "" + +msgid ":gh:`83336`: ``utf8_sig`` is now aliased to :mod:`encodings.utf_8_sig`" +msgstr "" + +msgid ":gh:`136523`: Fix :class:`wave.Wave_write` emitting an unraisable when open raises." +msgstr "" + +msgid ":gh:`136507`: Fix mimetypes CLI to handle multiple file parameters." +msgstr "" + +msgid ":gh:`52876`: Add missing ``keepends`` (default ``True``) parameter to :meth:`!codecs.StreamReaderWriter.readline` and :meth:`!codecs.StreamReaderWriter.readlines`." +msgstr "" + +msgid ":gh:`136470`: Correct :class:`concurrent.futures.InterpreterPoolExecutor`'s default thread name." +msgstr "" + +msgid ":gh:`136476`: Fix a bug that was causing the ``get_async_stack_trace`` function to miss some frames in the stack trace." +msgstr "" + +msgid ":gh:`136434`: Fix docs generation of ``UnboundItem`` in :mod:`concurrent.interpreters` when running with :option:`-OO`." +msgstr "" + +msgid ":gh:`136380`: Raises :exc:`AttributeError` when accessing :class:`concurrent.futures.InterpreterPoolExecutor` and subinterpreters are not available." +msgstr "" + +msgid ":gh:`72327`: Suggest using the system command prompt when ``pip install`` is typed into the REPL. Patch by Tom Viner, Richard Si, and Brian Schubert." +msgstr "" + +msgid ":gh:`135953`: Implement a new high-frequency runtime profiler that leverages the existing remote debugging functionality to collect detailed execution statistics from running Python processes. This tool is exposed in the ``profile.sample`` module and enables non-intrusive observation of production applications by attaching to already-running processes without requiring any code modifications, restarts, or special startup flags. The observer can perform extremely high-frequency sampling of stack traces and interpreter state, providing detailed runtime execution analysis of live applications." +msgstr "" + +msgid ":gh:`136021`: Make ``type_params`` parameter required in :func:`!typing._eval_type` after a deprecation period for not providing this parameter. Also remove the :exc:`DeprecationWarning` for the old behavior." +msgstr "" + +msgid ":gh:`136286`: Fix pickling failures for protocols 0 and 1 for many objects related to subinterpreters." +msgstr "" + +msgid ":gh:`136047`: Fix issues with :mod:`typing` when the C implementation of :mod:`abc` is not available." +msgstr "" + +msgid ":gh:`136316`: Improve support for evaluating nested forward references in :func:`typing.evaluate_forward_ref`." +msgstr "" + +msgid ":gh:`136306`: :mod:`ssl` can now get and set groups used for key agreement." +msgstr "" + +msgid ":gh:`136156`: :func:`tempfile.TemporaryFile` no longer uses :data:`os.O_EXCL` with :data:`os.O_TMPFILE`, so it's possible to use ``linkat()`` on the file descriptor. Patch by Victor Stinner." +msgstr "" + +msgid ":gh:`133982`: Update Python implementation of :class:`io.BytesIO` to be thread safe." +msgstr "" + +msgid ":gh:`136193`: Improve :exc:`TypeError` error message, when richcomparing two :class:`types.SimpleNamespace` objects." +msgstr "" + +msgid ":gh:`136097`: Fix potential infinite recursion and KeyError in ``sysconfig --generate-posix-vars``." +msgstr "" + +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 "" + +msgid ":gh:`90733`: Improve error messages when reporting invalid parameters in :func:`hashlib.scrypt`. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`134759`: Fix :exc:`UnboundLocalError` in :func:`email.message.Message.get_payload` when the payload to decode is a :class:`bytes` object. Patch by Kliment Lamonov." +msgstr "" + +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 "" + +msgid ":gh:`87135`: Acquiring a :class:`threading.Lock` or :class:`threading.RLock` at interpreter shutdown will raise :exc:`PythonFinalizationError` if Python can determine that it would otherwise deadlock." +msgstr "" + +msgid ":gh:`135995`: In the palmos encoding, make byte ``0x9b`` decode to ``›`` (U+203A - SINGLE RIGHT-POINTING ANGLE QUOTATION MARK)." +msgstr "" + +msgid ":gh:`105456`: Removed :mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse` modules." +msgstr "" + +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 "" + +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 "" + +msgid ":gh:`135853`: Add :func:`math.fmax` and :func:`math.fmin` to get the larger and smaller of two floating-point values. Patch by Bénédikt Tran." +msgstr "" + +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 "" + +msgid ":gh:`135853`: :mod:`math`: expose C99 :func:`~math.signbit` function to determine whether the sign bit of a floating-point value is set. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`134531`: :mod:`hmac`: use the :manpage:`EVP_MAC(3ssl)` interface for HMAC when Python is built with OpenSSL 3.0 and later instead of the deprecated :manpage:`HMAC_CTX(3ssl) ` interface. Patch by Bénédikt Tran." +msgstr "" + +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 "" + +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 "" + +msgid ":gh:`135823`: :mod:`netrc`: improve the error message when the security check for the ownership of the default configuration file ``~/.netrc`` fails. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`135815`: :mod:`netrc`: skip security checks if :func:`os.getuid` is missing. Patch by Bénédikt Tran." +msgstr "" + +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 "" + +msgid ":gh:`90117`: Speed up :mod:`pprint` for :class:`list` and :class:`tuple`." +msgstr "" + +msgid ":gh:`135759`: :mod:`hashlib`: reject negative digest lengths in OpenSSL-based SHAKE objects by raising a :exc:`ValueError`. Previously, negative lengths were implicitly rejected by raising a :exc:`MemoryError` or a :exc:`SystemError`. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`123471`: Make concurrent iterations over :class:`itertools.chain` safe under :term:`free threading`." +msgstr "" + +msgid ":gh:`135645`: Added ``supports_isolated_interpreters`` field to :data:`sys.implementation`." +msgstr "" + +msgid ":gh:`135646`: Raise consistent :exc:`NameError` exceptions in :func:`annotationlib.ForwardRef.evaluate`" +msgstr "" + +msgid ":gh:`135557`: Fix races on :mod:`heapq` updates and :class:`list` reads on the :term:`free threaded ` build." +msgstr "" + +msgid ":gh:`119180`: Only fetch globals and locals if necessary in :func:`annotationlib.get_annotations`" +msgstr "" + +msgid ":gh:`135561`: Fix a crash on DEBUG builds when an HACL* HMAC routine fails. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`135386`: Fix opening a :mod:`dbm.sqlite3` database for reading from read-only file or directory." +msgstr "" + +msgid ":gh:`135444`: Fix :meth:`asyncio.DatagramTransport.sendto` to account for datagram header size when data cannot be sent." +msgstr "" + +msgid ":gh:`65697`: :class:`configparser`'s error message when attempting to write an invalid key is now more helpful." +msgstr "" + +msgid ":gh:`135497`: Fix :func:`os.getlogin` failing for longer usernames on BSD-based platforms." +msgstr "" + +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 "" + +msgid ":gh:`135429`: Fix the argument mismatch in ``_lsprof`` for ``PY_THROW`` event." +msgstr "" + +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 "" + +msgid ":gh:`135336`: :mod:`json` now encodes strings up to 2.2x faster if they consist solely of characters that don’t require escaping." +msgstr "" + +msgid ":gh:`135335`: :mod:`multiprocessing`: Flush ``stdout`` and ``stderr`` after preloading modules in the ``forkserver``." +msgstr "" + +msgid ":gh:`126631`: Fix :mod:`multiprocessing` ``forkserver`` bug which prevented ``__main__`` from being preloaded." +msgstr "" + +msgid ":gh:`133967`: Do not normalize :mod:`locale` name 'C.UTF-8' to 'en_US.UTF-8'." +msgstr "" + +msgid ":gh:`130870`: Preserve :class:`types.GenericAlias` subclasses in :func:`typing.get_type_hints`" +msgstr "" + +msgid ":gh:`135321`: Raise a correct exception for values greater than 0x7fffffff for the ``BINSTRING`` opcode in the C implementation of :mod:`pickle`." +msgstr "" + +msgid ":gh:`121914`: Changed the names of the symbol tables for lambda expressions and generator expressions to \"\" and \"\" respectively to avoid conflicts with user-defined names." +msgstr "" + +msgid ":gh:`135276`: Synchronized zipfile.Path with zipp 3.23, including improved performance of :meth:`zipfile.Path.open` for non-reading modes, rely on :func:`functools.cached_property` to cache values on the instance. Rely on ``save_method_args`` to save the initialization method arguments. Fixed ``.name``, ``.stem`` and other basename-based properties on Windows when working with a zipfile on disk." +msgstr "" + +msgid ":gh:`135234`: :mod:`hashlib`: improve exception messages when an OpenSSL function failed. When memory allocation fails on OpenSSL's side, a :exc:`MemoryError` is raised instead of a :exc:`ValueError`. Patch by Bénédikt Tran." +msgstr "" + +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 "" + +msgid ":gh:`135241`: The :code:`INT` opcode of the C accelerator :mod:`!_pickle` module was updated to look only for \"00\" and \"01\" to push booleans onto the stack, aligning with the Python :mod:`pickle` module." +msgstr "" + +msgid ":gh:`133934`: Improve :mod:`sqlite3` CLI's ``.help`` message." +msgstr "" + +msgid ":gh:`135069`: Fix the \"Invalid error handling\" exception in :class:`!encodings.idna.IncrementalDecoder` to correctly replace the 'errors' parameter." +msgstr "" + +msgid ":gh:`130662`: +Accept leading zeros in precision and width fields for +:class:`~decimal.Decimal` formatting, for example ``format(Decimal(1.25), '.016f')``." +msgstr "" + +msgid ":gh:`130662`: Accept leading zeros in precision and width fields for :class:`~fractions.Fraction` formatting, for example ``format(Fraction(1, 3), '.016f')``." +msgstr "" + +msgid ":gh:`135004`: Rewrite and cleanup the internal :mod:`!_blake2` module. Some exception messages were changed but their types were left untouched. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`134953`: Expand ``_colorize`` theme with ``keyword_constant`` and implement in :term:`repl`." +msgstr "" + +msgid ":gh:`134978`: :mod:`hashlib`: Supporting the ``string`` keyword parameter in hash function constructors such as :func:`~hashlib.new` or the direct hash-named constructors such as :func:`~hashlib.md5` and :func:`~hashlib.sha256` is now deprecated and slated for removal in Python 3.19. Prefer passing the initial data as a positional argument for maximum backwards compatibility. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`134970`: Fix the \"unknown action\" exception in :meth:`argparse.ArgumentParser.add_argument_group` to correctly replace the action class." +msgstr "" + +msgid ":gh:`134718`: By default, omit optional ``Load()`` values in :func:`ast.dump`." +msgstr "" + +msgid ":gh:`134718`: :func:`ast.dump` now only omits ``None`` and ``[]`` values if they are default values." +msgstr "" + +msgid ":gh:`134939`: Add the :mod:`concurrent.interpreters` module. See :pep:`734`." +msgstr "" + +msgid ":gh:`108885`: Run each example as a subtest in unit tests synthesized by :func:`doctest.DocFileSuite` and :func:`doctest.DocTestSuite`. Add the :meth:`doctest.DocTestRunner.report_skip` method." +msgstr "" + +msgid ":gh:`134885`: Fix possible crash in the :mod:`compression.zstd` module related to setting parameter types. Patch by Jelle Zijlstra." +msgstr "" + +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 "" + +msgid ":gh:`128840`: Fix parsing long IPv6 addresses with embedded IPv4 address." +msgstr "" + +msgid ":gh:`133579`: :mod:`curses`: Consistently report failures of curses C API calls in module-level methods by raising a :exc:`curses.error`. This affects :func:`~curses.assume_default_colors`, :func:`~curses.baudrate`, :func:`~curses.cbreak`, :func:`~curses.echo`, :func:`~curses.longname`, :func:`~curses.initscr`, :func:`~curses.nl`, :func:`~curses.raw`, :func:`~curses.termattrs`, :func:`~curses.termname` and :func:`~curses.unctrl`. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`133579`: :meth:`curses.window.refresh` and :meth:`curses.window.noutrefresh` now raise a :exc:`TypeError` instead of :exc:`curses.error` when called with an incorrect number of arguments for :ref:`pads `. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`133579`: :ref:`curses.window `: Consistently report failures of curses C API calls in Window methods by raising a :exc:`curses.error`. This affects :meth:`~curses.window.addch`, :meth:`~curses.window.addnstr`, :meth:`~curses.window.addstr`, :meth:`~curses.window.border`, :meth:`~curses.window.box`, :meth:`~curses.window.chgat`, :meth:`~curses.window.getbkgd`, :meth:`~curses.window.inch`, :meth:`~curses.window.insstr` and :meth:`~curses.window.insnstr`. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`134771`: The ``time_clockid_converter()`` function now selects correct type for ``clockid_t`` on Cygwin which fixes a build error." +msgstr "" + +msgid ":gh:`134637`: Fix performance regression in calling a :mod:`ctypes` function pointer in :term:`free threading`." +msgstr "" + +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 "" + +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 "" + +msgid ":gh:`134531`: :mod:`!_hashlib`: Rename internal C functions for :class:`!_hashlib.HASH` and :class:`!_hashlib.HASHXOF` objects. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`134698`: Fix a crash when calling methods of :class:`ssl.SSLContext` or :class:`ssl.SSLSocket` across multiple threads." +msgstr "" + +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 "" + +msgid ":gh:`134635`: :mod:`zlib`: Allow to combine Adler-32 and CRC-32 checksums via :func:`~zlib.adler32_combine` and :func:`~zlib.crc32_combine`. Patch by Callum Attryde and Bénédikt Tran." +msgstr "" + +msgid ":gh:`134657`: :mod:`asyncio`: Remove some private names from ``asyncio.__all__``." +msgstr "" + +msgid ":gh:`134210`: :func:`curses.window.getch` now correctly handles signals. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`80334`: :func:`multiprocessing.freeze_support` now checks for work on any \"spawn\" start method platform rather than only on Windows." +msgstr "" + +msgid ":gh:`134582`: Fix tokenize.untokenize() round-trip errors related to t-strings braces escaping" +msgstr "" + +msgid ":gh:`134580`: Improved the styling of HTML diff pages generated by the :class:`difflib.HtmlDiff` class, and migrated the output to the HTML5 standard." +msgstr "" + +msgid ":gh:`134565`: :func:`unittest.doModuleCleanups` no longer swallows all but first exception raised in the cleanup code, but raises a :exc:`ExceptionGroup` if multiple errors occurred." +msgstr "" + +msgid ":gh:`134546`: Ensure :mod:`pdb` remote debugging script is readable by remote Python process." +msgstr "" + +msgid ":gh:`134451`: Converted ``asyncio.tools.CycleFoundException`` from dataclass to a regular exception type." +msgstr "" + +msgid ":gh:`114177`: Fix :mod:`asyncio` to not close subprocess pipes which would otherwise error out when the event loop is already closed." +msgstr "" + +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 "" + +msgid ":gh:`134323`: Fix the :meth:`threading.RLock.locked` method." +msgstr "" + +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 "" + +msgid ":gh:`71189`: Add support of the all-but-last mode in :func:`os.path.realpath`." +msgstr "" + +msgid ":gh:`72902`: Improve speed (x1.1-1.8) of the :class:`~fractions.Fraction` constructor for typical inputs (:class:`float`'s, :class:`~decimal.Decimal`'s or strings)." +msgstr "" + +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 "" + +msgid ":gh:`88994`: Change :func:`datetime.datetime.now` to half-even rounding for consistency with :func:`datetime.datetime.fromtimestamp`. Patch by John Keith Hohm." +msgstr "" + +msgid ":gh:`80184`: The default queue size is now ``socket.SOMAXCONN`` for :class:`socketserver.TCPServer`." +msgstr "" + +msgid ":gh:`132983`: Add :mod:`!compression.zstd` version information to ``test.pythoninfo``." +msgstr "" + +msgid ":gh:`134235`: Updated tab completion on REPL to include builtin modules. Contributed by Tom Wang, Hunter Young" +msgstr "" + +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 "" + +msgid ":gh:`134152`: :mod:`email`: Fix parsing of email message ID with invalid domain." +msgstr "" + +msgid ":gh:`134168`: :mod:`http.server`: Fix IPv6 address binding and :option:`--directory ` handling when using HTTPS." +msgstr "" + +msgid ":gh:`62184`: Remove import of C implementation of :class:`io.FileIO` from Python implementation which has its own implementation" +msgstr "" + +msgid ":gh:`134087`: Remove support for arbitrary positional or keyword arguments in the C implementation of :class:`threading.RLock` objects. This was deprecated since Python 3.14. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`134173`: Speed up :mod:`asyncio` performance of transferring state from thread pool :class:`concurrent.futures.Future` by up to 4.4x. Patch by J. Nick Koston." +msgstr "" + +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 "" + +msgid ":gh:`133890`: The :mod:`tarfile` module now handles :exc:`UnicodeEncodeError` in the same way as :exc:`OSError` when cannot extract a member." +msgstr "" + +msgid ":gh:`134097`: Fix interaction of the new :term:`REPL` and :option:`-X showrefcount <-X>` command line option." +msgstr "" + +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 "" + +msgid ":gh:`134098`: Fix handling paths that end with a percent-encoded slash (``%2f`` or ``%2F``) in :class:`http.server.SimpleHTTPRequestHandler`." +msgstr "" + +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 "" + +msgid ":gh:`134062`: :mod:`ipaddress`: fix collisions in :meth:`~object.__hash__` for :class:`~ipaddress.IPv4Network` and :class:`~ipaddress.IPv6Network` objects." +msgstr "" + +msgid ":gh:`134004`: :mod:`shelve` as well as underlying :mod:`!dbm.dumb` and :mod:`!dbm.sqlite` now have :meth:`!reorganize` methods to recover unused free space previously occupied by deleted entries." +msgstr "" + +msgid ":gh:`133970`: Make :class:`!string.templatelib.Template` and :class:`!string.templatelib.Interpolation` generic." +msgstr "" + +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 "" + +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 "" + +msgid ":gh:`133925`: Make the private class ``typing._UnionGenericAlias`` hashable." +msgstr "" + +msgid ":gh:`133604`: Remove :func:`!platform.java_ver` which was deprecated since Python 3.13." +msgstr "" + +msgid ":gh:`133875`: Removed deprecated :meth:`!pathlib.PurePath.is_reserved`. Use :func:`os.path.isreserved` to detect reserved paths on Windows." +msgstr "" + +msgid ":gh:`133873`: Remove the deprecated ``getmark()``, ``setmark()`` and ``getmarkers()`` methods of the :class:`~wave.Wave_read` and :class:`~wave.Wave_write` classes, which were deprecated since Python 3.13. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`133866`: Remove the undocumented function :func:`!ctypes.SetPointerType`, which has been deprecated since Python 3.13. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`133823`: Remove support for ``TD = TypedDict(\"TD\")`` and ``TD = TypedDict(\"TD\", None)`` calls for constructing :class:`typing.TypedDict` objects with zero field. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`125996`: Fix thread safety of :class:`collections.OrderedDict`. Patch by Kumar Aditya." +msgstr "" + +msgid ":gh:`133817`: Remove support for creating :class:`~typing.NamedTuple` classes via the undocumented keyword argument syntax. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`133653`: Fix :class:`argparse.ArgumentParser` with the *formatter_class* argument. Fix TypeError when *formatter_class* is a custom subclass of :class:`!HelpFormatter`. Fix TypeError when *formatter_class* is not a subclass of :class:`!HelpFormatter` and non-standard *prefix_char* is used. Fix support of colorizing when *formatter_class* is not a subclass of :class:`!HelpFormatter`." +msgstr "" + +msgid ":gh:`133810`: Remove :class:`!http.server.CGIHTTPRequestHandler` and ``--cgi`` flag from the :program:`python -m http.server` command-line interface. They were deprecated in Python 3.13. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`132641`: Fixed a race in :func:`functools.lru_cache` under free-threading." +msgstr "" + +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 "" + +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 "" + +msgid ":gh:`77057`: Fix handling of invalid markup declarations in :class:`html.parser.HTMLParser`." +msgstr "" + +msgid ":gh:`130328`: Speedup pasting in ``PyREPL`` on Windows in a legacy console. Patch by Chris Eibl." +msgstr "" + +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 "" + +msgid ":gh:`133656`: Remove deprecated :meth:`!zipimport.zipimporter.load_module`. Use :meth:`zipimport.zipimporter.exec_module` instead." +msgstr "" + +msgid ":gh:`133722`: Added a *color* option to :func:`difflib.unified_diff` that colors output similar to :program:`git diff`." +msgstr "" + +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 "" + +msgid ":gh:`133595`: Clean up :class:`sqlite3.Connection` APIs. All parameters of :func:`sqlite3.connect` except *database* are now keyword-only. The first three parameters of methods :meth:`~sqlite3.Connection.create_function` and :meth:`~sqlite3.Connection.create_aggregate` are now positional-only. The first parameter of methods :meth:`~sqlite3.Connection.set_authorizer`, :meth:`~sqlite3.Connection.set_progress_handler` and :meth:`~sqlite3.Connection.set_trace_callback` is now positional-only." +msgstr "" + +msgid ":gh:`133581`: Improve unparsing of t-strings in :func:`ast.unparse` and ``from __future__ import annotations``. Empty t-strings now round-trip correctly and formatting in interpolations is preserved. Patch by Jelle Zijlstra." +msgstr "" + +msgid ":gh:`133577`: Add parameter ``formatter`` to :func:`logging.basicConfig`." +msgstr "" + +msgid ":gh:`92897`: Removed the ``check_home`` parameter from :func:`sysconfig.is_python_build`, deprecated since Python 3.12." +msgstr "" + +msgid ":gh:`133551`: Support t-strings (:pep:`750`) in :mod:`annotationlib`. Patch by Jelle Zijlstra." +msgstr "" + +msgid ":gh:`133517`: Remove :func:`os.listdrives`, :func:`os.listvolumes` and :func:`os.listmounts` in non Windows desktop builds since the underlying functionality is missing." +msgstr "" + +msgid ":gh:`133439`: Fix dot commands with trailing spaces are mistaken for multi-line SQL statements in the sqlite3 command-line interface." +msgstr "" + +msgid ":gh:`133447`: Add basic color to :mod:`sqlite3` CLI interface." +msgstr "" + +msgid ":gh:`133253`: Fix thread-safety issues in :mod:`linecache`." +msgstr "" + +msgid ":gh:`133390`: Support keyword completion in the :mod:`sqlite3` command-line interface and add :data:`sqlite3.SQLITE_KEYWORDS` constant." +msgstr "" + +msgid ":gh:`132493`: Avoid accessing ``__annotations__`` unnecessarily in :func:`inspect.signature`." +msgstr "" + +msgid ":gh:`133017`: Improve the error message of :func:`multiprocessing.sharedctypes.Array`, :func:`multiprocessing.sharedctypes.RawArray`, :func:`multiprocessing.sharedctypes.Value` and :func:`multiprocessing.sharedctypes.RawValue` when an invalid typecode is passed. Patch by Tomas Roun" +msgstr "" + +msgid ":gh:`132813`: Improve error messages for incorrect types and values of :class:`csv.Dialect` attributes." +msgstr "" + +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 "" + +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 "" + +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 "" + +msgid ":gh:`132908`: Add :func:`math.isnormal` and :func:`math.issubnormal` functions. Patch by Sergey B Kirpichev." +msgstr "" + +msgid ":gh:`95380`: :func:`fcntl.fcntl` and :func:`fcntl.ioctl`: Remove the 1024 bytes limit on the size of not mutated bytes-like argument." +msgstr "" + +msgid ":gh:`122781`: Fix ``%z`` directive in :func:`datetime.datetime.strptime` to allow for no provided offset as was documented." +msgstr "" + +msgid ":gh:`123471`: Make concurrent iterations over :class:`itertools.combinations` and :class:`itertools.product` safe under free-threading." +msgstr "" + +msgid ":gh:`127081`: Fix libc thread safety issues with :mod:`dbm` by performing stateful operations in critical sections." +msgstr "" + +msgid ":gh:`127081`: Fix libc thread safety issues with :mod:`os` by replacing ``getlogin`` with ``getlogin_r`` re-entrant version." +msgstr "" + +msgid ":gh:`127081`: Fix libc thread safety issues with :mod:`pwd` by locking access to ``getpwall``." +msgstr "" + +msgid ":gh:`132551`: Make :class:`io.BytesIO` safe in :term:`free-threaded ` build." +msgstr "" + +msgid ":gh:`107583`: Fix :class:`!Flag` inversion when flag set has missing values (:class:`!IntFlag` still flips all bits); fix negative assigned values during flag creation (both :class:`!Flag` and :class:`!IntFlag` ignore missing values)." +msgstr "" + +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 "" + +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 "" + +msgid ":gh:`131884`: Fix formatting issues in :func:`json.dump` when both *indent* and *skipkeys* are used." +msgstr "" + +msgid ":gh:`131788`: Make ``ResourceTracker.send`` from :mod:`multiprocessing` re-entrant safe" +msgstr "" + +msgid ":gh:`91349`: Adjust default ``compressionlevel=`` to 6 (down from 9) in :mod:`gzip` and :mod:`tarfile`. It is the default level used by most compression tools and a better tradeoff between speed and performance." +msgstr "" + +msgid ":gh:`131146`: Fix :class:`calendar.TextCalendar`, :class:`calendar.HTMLCalendar`, and the :mod:`calendar` CLI to display month names in the nominative case by adding :data:`calendar.standalone_month_name` and :data:`calendar.standalone_month_abbr`, which provide month names and abbreviations in the grammatical form used when a month name stands by itself, if the locale supports it." +msgstr "" + +msgid ":gh:`123471`: Make concurrent iterations over :class:`itertools.cycle` safe under free-threading." +msgstr "" + +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 "" + +msgid ":gh:`130999`: Avoid exiting the new REPL and offer suggestions even if there are non-string candidates when errors occur." +msgstr "" + +msgid ":gh:`88473`: Implement a fast path for :class:`datetime.date` objects in :func:`datetime.date.today` which results in a 5x performance gain while proper subclasses retain their previous performance." +msgstr "" + +msgid ":gh:`126883`: Add check that timezone fields are in range for :meth:`datetime.datetime.fromisoformat` and :meth:`datetime.time.fromisoformat`. Patch by Semyon Moroz." +msgstr "" + +msgid ":gh:`125028`: :data:`functools.Placeholder` cannot be passed to :func:`functools.partial` as a keyword argument." +msgstr "" + +msgid ":gh:`125843`: If possible, indicate which :mod:`curses` C function or macro is responsible for raising a :exc:`curses.error` exception. Patch by Bénédikt Tran." +msgstr "" + +msgid ":gh:`119109`: :func:`functools.partial` calls are now faster when keyword arguments are used." +msgstr "" + +msgid ":gh:`124033`: ``SimplePath`` is now presented in ``importlib.metadata.__all__``." +msgstr "" + +msgid ":gh:`91216`: ``importlib.metadata`` now raises a ``KeyError`` instead of returning ``None`` when a key is missing from the metadata." +msgstr "" + +msgid ":gh:`120492`: ``importlib.metadata`` now prioritizes valid dists to invalid dists when retrieving by name." +msgstr "" + +msgid ":gh:`99631`: The :mod:`shelve` module now accepts custom serialization and deserialization functions." +msgstr "" + +msgid ":gh:`119186`: Slightly speed up :func:`os.walk` by calling :func:`os.path.join` less often." +msgstr "" + +msgid ":gh:`120170`: Fix an issue in the :mod:`!_pickle` extension module in which importing :mod:`multiprocessing` could change how pickle identifies which module an object belongs to, potentially breaking the unpickling of those objects." +msgstr "" + +msgid ":gh:`118981`: Fix potential hang in ``multiprocessing.popen_spawn_posix`` that can happen when the child proc dies early by closing the child fds right away." +msgstr "" + +msgid ":gh:`105497`: Fix flag mask inversion when unnamed flags exist." +msgstr "" + +msgid ":gh:`99813`: :mod:`ssl` now uses ``SSL_sendfile`` internally when it is possible (see :data:`~ssl.OP_ENABLE_KTLS`). The function sends a file more efficiently because it performs TLS encryption in the kernel to avoid additional context switches. Patch by Illia Volochii." +msgstr "" + +msgid ":gh:`62824`: Fix aliases for ``iso8859_8`` encoding. Patch by Dave Goncalves." +msgstr "" + +msgid ":gh:`86155`: :meth:`html.parser.HTMLParser.close` no longer loses data when the ``