| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7c6901f commit 7f00f9a
13 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,7 +11,7 @@ msgid "" | |||
| 11 | 11 | msgstr "" | |
| 12 | 12 | "Project-Id-Version: Python 3.14\n" | |
| 13 | 13 | "Report-Msgid-Bugs-To: \n" | |
| 14 | - "POT-Creation-Date: 2026-10-01 14:41+0330\n" | ||
| 14 | + "POT-Creation-Date: 2026-10-20 04:16+0000\n" | ||
| 15 | 15 | "PO-Revision-Date: 2026-10-06 20:44+0330\n" | |
| 16 | 16 | "Last-Translator: Sepehr Rasouli <sepehrrasouli06@gmail.com>, 2026\n" | |
| 17 | 17 | "Language-Team: none\n" | |
@@ -298,13 +298,30 @@ msgstr "در مقداردهی اولیهی تکمرحلهای، :ref:` | |||
| 298 | 298 | msgid "Single-phase initialization differs from the :ref:`default <multi-phase-initialization>` in the following ways:" | |
| 299 | 299 | msgstr "مقداردهی اولیه تکفازی در موارد زیر با :ref:`پیشفرض <multi-phase-initialization>` تفاوت دارد:" | |
| 300 | 300 | ||
| 301 | - msgid "Single-phase modules are, or rather *contain*, “singletons”." | ||
| 301 | + #, fuzzy | ||
| 302 | + #| msgid "Single-phase modules are, or rather *contain*, “singletons”." | ||
| 303 | + msgid "Single-phase modules with :c:member:`PyModuleDef.m_size` set to -1 are, or rather *contain*, “singletons”." | ||
| 302 | 304 | msgstr "ماژولهای تکفاز (single-phase) «تکنمونه» هستند، یا به بیان دقیقتر، *حاوی* «تکنمونه» هستند." | |
| 303 | 305 | ||
| 304 | - msgid "When the module is first initialized, Python saves the contents of the module's ``__dict__`` (that is, typically, the module's functions and types)." | ||
| 306 | + #, fuzzy | ||
| 307 | + #| msgid "When the module is first initialized, Python saves the contents of the module's ``__dict__`` (that is, typically, the module's functions and types)." | ||
| 308 | + msgid "When such a module is first initialized, Python saves the contents of the module's ``__dict__`` (that is, typically, the module's functions and types)." | ||
| 305 | 309 | msgstr "هنگامی که ماژول برای نخستین بار مقداردهی اولیه میشود، پایتون محتویات ``__dict__`` ماژول را ذخیره میکند (یعنی، بهطور معمول، توابع و نوعهای ماژول)." | |
| 306 | 310 | ||
| 307 | - msgid "For subsequent imports, Python does not call the initialization function again. Instead, it creates a new module object with a new ``__dict__``, and copies the saved contents to it. For example, given a single-phase module ``_testsinglephase`` [#testsinglephase]_ that defines a function ``sum`` and an exception class ``error``:" | ||
| 311 | + #, fuzzy | ||
| 312 | + #| msgid "For subsequent imports, Python does not call the initialization function again. Instead, it creates a new module object with a new ``__dict__``, and copies the saved contents to it. For example, given a single-phase module ``_testsinglephase`` [#testsinglephase]_ that defines a function ``sum`` and an exception class ``error``:" | ||
| 313 | + msgid "For subsequent imports, Python does not call the initialization function again. Instead, it creates a new module object with a new ``__dict__``, and copies the saved contents to it. Modules are matched to the saved contents by a (*module_name*, *file_name*) tuple where:" | ||
| 314 | + msgstr "برای ایمپورتهای بعدی، پایتون تابع مقداردهی اولیه را دوباره فراخوانی نمیکند. در عوض، شیء ماژول جدیدی با ``__dict__`` جدید میسازد و محتویات ذخیرهشده را در آن کپی میکند. برای مثال، با فرض یک ماژول تکفاز ``_testsinglephase`` [#testsinglephase]_ که تابعی به نام ``sum`` و کلاس استثنایی به نام ``error`` را تعریف میکند:" | ||
| 315 | + | ||
| 316 | + msgid "*module_name* is the module's full dotted name, taken from :py:attr:`ModuleSpec.name <importlib.machinery.ModuleSpec.name>` (or the equivalent argument of the importing function). Note that names that the initialization function uses to create the module (for example, :c:member:`PyModuleDef.m_name`) are not taken into account." | ||
| 317 | + msgstr "" | ||
| 318 | + | ||
| 319 | + msgid "*file_name* is the extension's file name. It is unset for modules not loaded from a file, such as built-ins and modules added with :c:func:`PyImport_CreateModuleFromInitfunc` or :c:func:`PyImport_AppendInittab`." | ||
| 320 | + msgstr "" | ||
| 321 | + | ||
| 322 | + #, fuzzy | ||
| 323 | + #| msgid "For subsequent imports, Python does not call the initialization function again. Instead, it creates a new module object with a new ``__dict__``, and copies the saved contents to it. For example, given a single-phase module ``_testsinglephase`` [#testsinglephase]_ that defines a function ``sum`` and an exception class ``error``:" | ||
| 324 | + msgid "As part of the first initialization, Python also adds the module to :data:`sys.modules` under its name. For example, given a single-phase module ``_testsinglephase`` [#testsinglephase]_ that defines a function ``sum`` and an exception class ``error``:" | ||
| 308 | 325 | msgstr "برای ایمپورتهای بعدی، پایتون تابع مقداردهی اولیه را دوباره فراخوانی نمیکند. در عوض، شیء ماژول جدیدی با ``__dict__`` جدید میسازد و محتویات ذخیرهشده را در آن کپی میکند. برای مثال، با فرض یک ماژول تکفاز ``_testsinglephase`` [#testsinglephase]_ که تابعی به نام ``sum`` و کلاس استثنایی به نام ``error`` را تعریف میکند:" | |
| 309 | 326 | ||
| 310 | 327 | msgid "" | |
@@ -337,6 +354,17 @@ msgstr "" | |||
| 337 | 354 | msgid "The exact behavior should be considered a CPython implementation detail." | |
| 338 | 355 | msgstr "رفتار دقیق باید بهعنوان جزئیات پیادهسازی سیپایتون در نظر گرفته شود." | |
| 339 | 356 | ||
| 357 | + msgid "For single-phase modules with non-negative :c:member:`PyModuleDef.m_size`, Python may cache a pointer to the initialization function under the (*module_name*, *file_name*) key as for ``m_size == -1``." | ||
| 358 | + msgstr "" | ||
| 359 | + | ||
| 360 | + msgid "Subsequent imports that specify a different initialization function (for example, using :c:func:`PyImport_CreateModuleFromInitfunc`) may call either the cached function or the provided \"new\" one." | ||
| 361 | + msgstr "" | ||
| 362 | + | ||
| 363 | + #, fuzzy | ||
| 364 | + #| msgid "The exact behavior should be considered a CPython implementation detail." | ||
| 365 | + msgid "The exact behavior should again be considered a CPython implementation detail." | ||
| 366 | + msgstr "رفتار دقیق باید بهعنوان جزئیات پیادهسازی سیپایتون در نظر گرفته شود." | ||
| 367 | + | ||
| 340 | 368 | msgid "To work around the fact that ``PyInit_modulename`` does not take a *spec* argument, some state of the import machinery is saved and applied to the first suitable module created during the ``PyInit_modulename`` call. Specifically, when a sub-module is imported, this mechanism prepends the parent package name to the name of the module." | |
| 341 | 369 | msgstr "برای دور زدن این واقعیت که ``PyInit_modulename`` آرگومان *مشخصات* نمیپذیرد، بخشی از وضعیت سازوکار ایمپورت ذخیره میشود و بر نخستین ماژول مناسب ایجادشده در طول فراخوانی ``PyInit_modulename`` اعمال میشود. بهطور خاص، هنگامی که یک زیرماژول ایمپورت میشود، این سازوکار نام بسته والد را به ابتدای نام ماژول میافزاید." | |
| 342 | 370 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,7 +11,7 @@ msgid "" | |||
| 11 | 11 | msgstr "" | |
| 12 | 12 | "Project-Id-Version: Python 3.14\n" | |
| 13 | 13 | "Report-Msgid-Bugs-To: \n" | |
| 14 | - "POT-Creation-Date: 2026-09-16 12:56+0000\n" | ||
| 14 | + "POT-Creation-Date: 2026-10-20 04:16+0000\n" | ||
| 15 | 15 | "PO-Revision-Date: 2021-06-28 00:48+0000\n" | |
| 16 | 16 | "Last-Translator: Sepehr Rasouli <sepehrrasouli06@gmail.com>, 2026\n" | |
| 17 | 17 | "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" | |
@@ -42,6 +42,18 @@ msgstr "توصیفگر پرونده مرتبط با *p* را بهصورت | |||
| 42 | 42 | msgid "Equivalent to ``p.readline([n])``, this function reads one line from the object *p*. *p* may be a file object or any object with a :meth:`~io.IOBase.readline` method. If *n* is ``0``, exactly one line is read, regardless of the length of the line. If *n* is greater than ``0``, no more than *n* bytes will be read from the file; a partial line can be returned. In both cases, an empty string is returned if the end of the file is reached immediately. If *n* is less than ``0``, however, one line is read regardless of length, but :exc:`EOFError` is raised if the end of the file is reached immediately." | |
| 43 | 43 | msgstr "این تابع معادل ``p.readline([n])`` است و یک سطر از شیء *p* میخواند. *p* میتواند یک شیء پرونده یا هر شیء دارای متد :meth:`~io.IOBase.readline` باشد. اگر *n* برابر ``0`` باشد، دقیقاً یک سطر خوانده میشود، بدون توجه به طول سطر. اگر *n* بزرگتر از ``0`` باشد، بیش از *n* بایت از پرونده خوانده نمیشود؛ ممکن است سطر ناقصی برگردانده شود. در هر دو حالت، اگر بلافاصله به پایان پرونده برسیم، رشتهای خالی برگردانده میشود. اما اگر *n* کوچکتر از ``0`` باشد، یک سطر بدون توجه به طول خوانده میشود، ولی اگر بلافاصله به پایان پرونده برسیم، :exc:`EOFError` پرتاب میشود." | |
| 44 | 44 | ||
| 45 | + msgid "Read a line from the C stream *stream* into the buffer *buf*, like the C standard library function :c:func:`!fgets`, but treating all of ``\\n``, ``\\r`` and ``\\r\\n`` as line endings (see :term:`universal newlines`). Any ``\\r`` or ``\\r\\n`` read from the stream is stored in *buf* as a single ``\\n``." | ||
| 46 | + msgstr "" | ||
| 47 | + | ||
| 48 | + msgid "At most ``n - 1`` characters are stored in *buf*; reading stops after a newline has been stored or when the end of the file is reached. The result is always null-terminated. *stream* should be opened in binary mode, so that the C library does not perform its own newline translation." | ||
| 49 | + msgstr "" | ||
| 50 | + | ||
| 51 | + msgid "Return *buf* on success. Return ``NULL`` if no characters could be read, because *stream* is at end of file, a read error occurred, or *n* is less than 2. Like :c:func:`!fgets`, this function does not distinguish between end of file and a read error, and it does not set an exception." | ||
| 52 | + msgstr "" | ||
| 53 | + | ||
| 54 | + msgid "*fobj* exists only for backward compatibility and must be ``NULL``." | ||
| 55 | + msgstr "" | ||
| 56 | + | ||
| 45 | 57 | msgid "Overrides the normal behavior of :func:`io.open_code` to pass its parameter through the provided handler." | |
| 46 | 58 | msgstr "رفتار عادی :func:`io.open_code` را بازتعریف میکند تا پارامتر خود را از هندلر ارائهشده عبور دهد." | |
| 47 | 59 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,7 +12,7 @@ msgid "" | |||
| 12 | 12 | msgstr "" | |
| 13 | 13 | "Project-Id-Version: Python 3.14\n" | |
| 14 | 14 | "Report-Msgid-Bugs-To: \n" | |
| 15 | - "POT-Creation-Date: 2026-10-01 14:41+0330\n" | ||
| 15 | + "POT-Creation-Date: 2026-10-20 04:16+0000\n" | ||
| 16 | 16 | "PO-Revision-Date: 2026-09-15 13:21+0330\n" | |
| 17 | 17 | "Last-Translator: Sepehr Rasouli <sepehrrasouli06@gmail.com>, 2026\n" | |
| 18 | 18 | "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" | |
@@ -149,7 +149,9 @@ msgstr "فرض بر این است که نوع :c:expr:`double` دارای فرم | |||
| 149 | 149 | msgid "Pack functions" | |
| 150 | 150 | msgstr "توابع بستهبندی" | |
| 151 | 151 | ||
| 152 | - 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." | ||
| 152 | + #, fuzzy | ||
| 153 | + #| 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." | ||
| 154 | + 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." | ||
| 153 | 155 | msgstr "روالهای pack تعداد ۲، ۴ یا ۸ بایت را از *p* به بعد مینویسند. پارامتر *le* یک آرگومان :c:expr:`int` است که اگر بخواهید رشتهی بایتی در فرمت کوچکاندیان (توان در انتها، در ``p+1``، ``p+3``، یا ``p+6`` و ``p+7``) باشد، غیرصفر است و اگر فرمت بزرگاندیان (توان در ابتدا، در *p*) را بخواهید، صفر است. از ثابت :c:macro:`!PY_LITTLE_ENDIAN` برای انتخاب اندیان بومی استفاده کنید: این مقدار روی پردازندهی بزرگاندیان برابر با ``0`` و روی پردازندهی کوچکاندیان برابر با ``1`` است." | |
| 154 | 156 | ||
| 155 | 157 | msgid "Return value: ``0`` if all is OK, ``-1`` if error (and an exception is set, most likely :exc:`OverflowError`)." | |
@@ -167,7 +169,9 @@ msgstr "یک double زبان C را به قالب دقت مضاعف binary64 ا | |||
| 167 | 169 | msgid "Unpack functions" | |
| 168 | 170 | msgstr "توابع واگشایی" | |
| 169 | 171 | ||
| 170 | - 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." | ||
| 172 | + #, fuzzy | ||
| 173 | + #| 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." | ||
| 174 | + 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." | ||
| 171 | 175 | msgstr "روالهای unpack تعداد ۲، ۴ یا ۸ بایت را از *p* به بعد میخوانند. پارامتر *le* یک آرگومان :c:expr:`int` است که اگر رشتهی بایتی در فرمت کوچکاندیان (توان در انتها، در ``p+1``، ``p+3`` یا ``p+6`` و ``p+7``) باشد، غیرصفر است و اگر بزرگاندیان باشد (توان در ابتدا، در *p*)، صفر است. از ثابت :c:macro:`!PY_LITTLE_ENDIAN` برای انتخاب اندیان بومی استفاده کنید: این مقدار روی پردازندهی بزرگاندیان برابر با ``0`` و روی پردازندهی کوچکاندیان برابر با ``1`` است." | |
| 172 | 176 | ||
| 173 | 177 | 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`)." | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,7 +12,7 @@ msgid "" | |||
| 12 | 12 | msgstr "" | |
| 13 | 13 | "Project-Id-Version: Python 3.14\n" | |
| 14 | 14 | "Report-Msgid-Bugs-To: \n" | |
| 15 | - "POT-Creation-Date: 2026-10-15 04:16+0000\n" | ||
| 15 | + "POT-Creation-Date: 2026-10-20 04:16+0000\n" | ||
| 16 | 16 | "PO-Revision-Date: 2026-10-06 20:48+0330\n" | |
| 17 | 17 | "Last-Translator: Sepehr Rasouli <sepehrrasouli06@gmail.com>, 2026\n" | |
| 18 | 18 | "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" | |
@@ -242,18 +242,32 @@ msgstr "این تابع یک بلوک ساختاری است که به تعبیه | |||
| 242 | 242 | msgid "*spec* must be a :class:`~importlib.machinery.ModuleSpec` object." | |
| 243 | 243 | msgstr "*spec* باید یک شیء :class:`~importlib.machinery.ModuleSpec` باشد." | |
| 244 | 244 | ||
| 245 | - msgid "*initfunc* must be an :ref:`initialization function <extension-export-hook>`, the same as for :c:func:`PyImport_AppendInittab`." | ||
| 245 | + #, fuzzy | ||
| 246 | + #| msgid "*initfunc* must be an :ref:`initialization function <extension-export-hook>`, the same as for :c:func:`PyImport_AppendInittab`." | ||
| 247 | + msgid "*initfunc* must be an :ref:`initialization function <extension-pyinit>`, the same as for :c:func:`PyImport_AppendInittab`." | ||
| 246 | 248 | msgstr "*initfunc* باید یک :ref:`تابع مقداردهی اولیه <extension-export-hook>` باشد، درست مانند :c:func:`PyImport_AppendInittab`." | |
| 247 | 249 | ||
| 248 | 250 | 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.)" | |
| 249 | 251 | msgstr "در صورت موفقیت، یک شیء ماژول ایجاد کرده و برمیگرداند. این ماژول مقداردهی اولیه نخواهد شد؛ برای مقداردهی اولیه آن، :c:func:`PyModule_Exec` را فراخوانی کنید. (ایمپورتکنندههای سفارشی باید این کار را در متد :py:meth:`~importlib.abc.Loader.exec_module` خود انجام دهند.)" | |
| 250 | 252 | ||
| 251 | - msgid "If the spec's name is dotted and *initfunc* creates the module using only the last component of the name, the module's :attr:`~module.__name__` is set to the full name from the spec." | ||
| 252 | - msgstr "اگر نام مشخصات (spec) نقطهگذاریشده باشد و *initfunc* ماژول را فقط با استفاده از آخرین جزء نام ایجاد کند، مقدار :attr:`~module.__name__` ماژول روی نام کامل مشخصات تنظیم میشود." | ||
| 253 | - | ||
| 254 | 253 | msgid "On error, return NULL with an exception set." | |
| 255 | 254 | msgstr "در صورت بروز خطا، مقدار NULL را همراه با تنظیم یک استثنا برمیگرداند." | |
| 256 | 255 | ||
| 256 | + msgid "For modules using :ref:`legacy single-phase initialization <single-phase-initialization>`, most of the import process is done in this function, rather than in extra steps that importers typically take after :py:meth:`~importlib.abc.Loader.create_module`. Specifically:" | ||
| 257 | + msgstr "" | ||
| 258 | + | ||
| 259 | + msgid "The module is added to :data:`sys.modules` under the *spec*'s :py:attr:`~importlib.machinery.ModuleSpec.name` as part of initialization." | ||
| 260 | + msgstr "" | ||
| 261 | + | ||
| 262 | + msgid "If a single-phase module was previously imported under the same :py:attr:`~importlib.machinery.ModuleSpec.name` by this function or as a built-in module (for example, one registered with :c:func:`PyImport_AppendInittab`), Python may reuse the previous module's contents instead of calling *initfunc* again." | ||
| 263 | + msgstr "" | ||
| 264 | + | ||
| 265 | + msgid "The module will be fully initialized by *initfunc*. Calling :c:func:`PyModule_Exec` on it will have no effect, though it is still recommended, in case the module later switches to :ref:`multi-phase initialization <multi-phase-initialization>`." | ||
| 266 | + msgstr "" | ||
| 267 | + | ||
| 268 | + msgid "Also, if the *spec*'s :py:attr:`!name` contains dots, this name is used for prepending a parent package to the new module's :attr:`~module.__name__`." | ||
| 269 | + msgstr "" | ||
| 270 | + | ||
| 257 | 271 | msgid "package variable" | |
| 258 | 272 | msgstr "متغیر بسته" | |
| 259 | 273 | ||
@@ -278,6 +292,9 @@ msgstr "کامپایل" | |||
| 278 | 292 | msgid "freeze utility" | |
| 279 | 293 | msgstr "ابزار انجماد (freeze)" | |
| 280 | 294 | ||
| 295 | + #~ msgid "If the spec's name is dotted and *initfunc* creates the module using only the last component of the name, the module's :attr:`~module.__name__` is set to the full name from the spec." | ||
| 296 | + #~ msgstr "اگر نام مشخصات (spec) نقطهگذاریشده باشد و *initfunc* ماژول را فقط با استفاده از آخرین جزء نام ایجاد کند، مقدار :attr:`~module.__name__` ماژول روی نام کامل مشخصات تنظیم میشود." | ||
| 297 | + | ||
| 281 | 298 | #~ msgid "This function is a deprecated alias of :c:func:`PyImport_ImportModule`." | |
| 282 | 299 | #~ msgstr "این تابع یک نام مستعار منسوخ برای :c:func:`PyImport_ImportModule` است." | |
| 283 | 300 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments