| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The source text changed slightly, so the existing translation (msgstr) may need updating. - is the old source, + the new.
- Single-phase modules are, or rather *contain*, “singletons”.
+ Single-phase modules with :c:member:`PyModuleDef.m_size` set to -1 are, or rather *contain*, “singletons”.
msgstr: ماژولهای تکفاز (single-phase) «تکنمونه» هستند، یا به بیان دقیقتر، *حاوی* «تکنمونه» هستند.
- When the module is first initialized, Python saves the contents of the module's ``__dict__`` (that is, typically, the module's functions and types).
+ 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).
msgstr: هنگامی که ماژول برای نخستین بار مقداردهی اولیه میشود، پایتون محتویات ``__dict__`` ماژول را ذخیره میکند (یعنی، بهطور معمول، توابع و نوعهای ماژول).
- 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…
+ 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…
msgstr: برای ایمپورتهای بعدی، پایتون تابع مقداردهی اولیه را دوباره فراخوانی نمیکند. در عوض، شیء ماژول جدیدی با ``__dict__`` جدید میسازد و محتویات ذخیرهشده را در آن…
- 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…
+ 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 ``_testsinglep…
msgstr: برای ایمپورتهای بعدی، پایتون تابع مقداردهی اولیه را دوباره فراخوانی نمیکند. در عوض، شیء ماژول جدیدی با ``__dict__`` جدید میسازد و محتویات ذخیرهشده را در آن…
- The exact behavior should be considered a CPython implementation detail.
+ The exact behavior should again be considered a CPython implementation detail.
msgstr: رفتار دقیق باید بهعنوان جزئیات پیادهسازی سیپایتون در نظر گرفته شود.
- 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 (exp…
+ 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 (exp…
msgstr: روالهای pack تعداد ۲، ۴ یا ۸ بایت را از *p* به بعد مینویسند. پارامتر *le* یک آرگومان :c:expr:`int` است که اگر بخواهید رشتهی بایتی در فرمت کوچکاندیان (توان …
- 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 (exponen…
+ 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 (exponen…
msgstr: روالهای unpack تعداد ۲، ۴ یا ۸ بایت را از *p* به بعد میخوانند. پارامتر *le* یک آرگومان :c:expr:`int` است که اگر رشتهی بایتی در فرمت کوچکاندیان (توان در انت…
- *initfunc* must be an :ref:`initialization function <extension-export-hook>`, the same as for :c:func:`PyImport_AppendInittab`.
+ *initfunc* must be an :ref:`initialization function <extension-pyinit>`, the same as for :c:func:`PyImport_AppendInittab`.
msgstr: *initfunc* باید یک :ref:`تابع مقداردهی اولیه <extension-export-hook>` باشد، درست مانند :c:func:`PyImport_AppendInittab`.
- A signed integral type such that ``sizeof(Py_ssize_t) == sizeof(size_t)``. C99 doesn't define such a thing directly (size_t is an unsigned integral type). See …
+ A signed integral type such that ``sizeof(Py_ssize_t) == sizeof(size_t)``. C99 doesn't define such a thing directly (size_t is an unsigned integral type). See …
msgstr: یک نوع صحیح علامتدار بهگونهای که ``sizeof(Py_ssize_t) == sizeof(size_t)`` باشد. استاندارد C99 چنین چیزی را مستقیماً تعریف نمیکند (size_t یک نوع صحیح بدون ع…
- The :c:macro:`!READONLY` macro was renamed to :c:macro:`Py_READONLY`. The :c:macro:`!PY_AUDIT_READ` macro was renamed with the ``Py_`` prefix. The new names ar…
+ The :c:macro:`!READONLY` macro was renamed to :c:macro:`Py_READONLY`. The :c:macro:`PY_AUDIT_READ` macro was renamed with the ``Py_`` prefix. The new names are…
msgstr: ماکروی :c:macro:`!READONLY` به :c:macro:`Py_READONLY` تغییر نام یافت. ماکروی :c:macro:`!PY_AUDIT_READ` با پیشوند ``Py_`` تغییر نام یافت. نامهای جدید اکنون همی…
- *arguments* is a tuple containing the parameters originally passed to the function call, this allows specializing the behavior on the arguments used.
+ *arguments* is a tuple containing the parameters passed to the function call, including any output parameters that :mod:`!ctypes` created for the call; this al…
msgstr: *arguments* یک تاپل حاوی پارامترهایی است که در ابتدا به فراخوانی تابع ارسالشدهاند؛ این امر امکان ویژهسازی رفتار بر اساس آرگومانهای استفادهشده را فراهم می…
- >>> def errcheck(result, func, args):\n... if not result:\n... raise WinError()\n... return args\n...\n>>> GetWindowRect.errcheck = errcheck\n>…
+ def errcheck(result, func, arguments):\n if result < 0:\n raise RuntimeError(f"call failed with error {result}")\n return arguments
msgstr: >>> def errcheck(result, func, args):\n... if not result:\n... raise WinError()\n... return args\n...\n>>> GetWindowRect.errcheck = errcheck\n>…
- Fundamental data types
+ Windows data types
msgstr: انواع داده بنیادی
- **Source code:** :source:`Lib/ctypes`
+ **Source code:** :source:`Lib/ctypes/wintypes.py`
msgstr: **کد منبع:** :source:`Lib/ctypes`
- Incomplete Types
+ Simple types
msgstr: انواع ناقص
- These are the fundamental ctypes data types:
+ The following names are aliases for fundamental :mod:`ctypes` types:
msgstr: اینها انواع دادهی بنیادی ctypes هستند:
- ctypes type
+ :mod:`ctypes` type
msgstr: نوع ctypes
- :class:`c_ubyte`
+ :class:`~ctypes.c_ubyte`
msgstr: :class:`c_ubyte`
- :class:`c_char`
+ :class:`~ctypes.c_char`
msgstr: :class:`c_char`
- :class:`c_wchar`
+ :class:`~ctypes.c_wchar`
msgstr: :class:`c_wchar`
… and 48 more- Care must be taken when using objects returned by :func:`get_referrers` because some of them could still be under construction and hence in a temporarily inval…
+ Care must be taken when using objects returned by :func:`get_objects` because some of them could still be under construction and hence in a temporarily invalid…
msgstr: هنگام استفاده از اشیای برگرداندهشده توسط :func:`get_referrers` باید احتیاط کنید، زیرا برخی از آنها ممکن است هنوز در حال ساخت باشند و بنابراین بهطور موقت در …
- instance to which a method is bound, or ``None``
+ instance to which a method is bound, or module object a function was defined in, or ``None``
msgstr: نمونهای که یک متد به آن مقید شده است، یا ``None``
- Return the value ``__file__`` would be set to if the specified module was imported. Raise :exc:`ZipImportError` if the module couldn't be imported.
+ Return the value ``__file__`` would be set to if the specified module was imported. Raise :exc:`ZipImportError` if the module couldn't be found.
msgstr: مقداری را برمیگرداند که ``__file__`` در صورت ایمپورت شدن ماژول مشخصشده، به آن تنظیم میشد. اگر ماژول نتواند ایمپورت شود، :exc:`ZipImportError` را پرتاب میکن…
- The name of the module the function was defined in, or ``None`` if unavailable.
+ :attr:`!__self__` is the module object the function was defined in or ``None`` if unavailable.
msgstr: نام ماژولی که تابع در آن تعریف شده است، یا ``None`` اگر در دسترس نباشد.
- :gh:`109823`: Fix bug where compiler does not adjust labels when removing an empty basic block which is a jump target.
+ :gh:`130279`: Fix bug where compiler did not set the right exception handler for some jump instructions.
msgstr: :gh:`109823`: رفع باگی که در آن کامپایلر هنگام حذف یک بلوک پایه خالی که هدف پرش است، برچسبها را تنظیم نمیکند.
- :gh:`145244`: Fixed a use-after-free in :mod:`json` encoder when a ``default`` callback mutates the dictionary being serialized.
+ :gh:`159041`: Fix a use-after-free in :mod:`asyncio` task bookkeeping when a finalizer creates a task during thread shutdown.
msgstr: :gh:`145244`: رفع خطای استفاده پس از آزادسازی (use-after-free) در رمزگذار :mod:`json` هنگامی که یک کالبک ``default`` دیکشنری در حال سریالسازی را تغییر میدهد.
- :gh:`155843`: :mod:`hmac`: ensure that HMAC objects are properly initialized to prevent rare crashes on allocation failures. Patch by Bénédikt Tran.
+ :gh:`155830`: :mod:`!_blake2`: Ensure that BLAKE-2 objects are correctly initialized before being tracked by the garbage collector. Patch by Bénédikt Tran.
msgstr: :gh:`155843`: :mod:`hmac`: اطمینان حاصل کنید که اشیاء HMAC به درستی مقداردهی اولیه میشوند تا از فروپاشیهای نادر در زمان شکستهای تخصیص حافظه جلوگیری شود. وصل…
- :gh:`142516`: :mod:`ssl`: fix reference leaks in :class:`ssl.SSLContext` objects. Patch by Bénédikt Tran.
+ :gh:`155782`: :mod:`ssl`: prevent a crash in :meth:`~ssl.SSLSocket.group` for session-less objects on OpenSSL 3.2 and later. Patch by Bénédikt Tran.
msgstr: :gh:`142516`: :mod:`ssl`: رفع نشت ارجاع در اشیای :class:`ssl.SSLContext`. وصلهای از Bénédikt Tran.
- :gh:`145376`: Fix reference leaks in various unusual error scenarios.
+ :gh:`159739`: Fix a reference leak when :c:func:`_PyTuple_Resize` fails.
msgstr: :gh:`145376`: رفع نشتیهای ارجاع در سناریوهای خطای مختلف و غیرمعمول.
Brand-new source strings with no close match to an existing translation.
*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 …
*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_CreateModu…
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*, …
Subsequent imports that specify a different initialization function (for example, using :c:func:`PyImport_CreateModuleFromInitfunc`) may call either the cached…
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 ``\…
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 nu…
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…
*fobj* exists only for backward compatibility and must be ``NULL``.
For modules using :ref:`legacy single-phase initialization <single-phase-initialization>`, most of the import process is done in this function, rather than in …
The module is added to :data:`sys.modules` under the *spec*'s :py:attr:`~importlib.machinery.ModuleSpec.name` as part of initialization.
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 e…
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 modu…
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__`.
See also :c:func:`PyUnicode_EncodeFSDefault` and :ref:`related functions <capi-filesystem-encoding>` for encoding paths at runtime.
Constants describing the byte order of the platform that Python was built for. Exactly one of them is ``1`` and the other is ``0``.
The limit values (largest positive one and smallest negative one, respecitvely) of type :c:type:`Py_ssize_t`.
Soft-deprecated alias of :c:macro:`Py_AUDIT_READ` (note capitalization of the ``y``). Only available with ``#include "structmember.h"``.
Use :c:macro:`Py_AUDIT_READ` instead.
If the callable returns the *arguments* tuple it received, unchanged, :mod:`!ctypes` continues its normal processing of the result, which includes returning ou…
For example, this callable raises an exception when the foreign function signals failure with a negative return value, and otherwise leaves the result to :mod:…
This one instead replaces the result, converting a C ``int`` used as a boolean into a :class:`bool`::
def errcheck(result, func, arguments):\n return result != 0
The returned function prototype creates functions that use the Python calling convention. Unlike :func:`CFUNCTYPE` and :func:`WINFUNCTYPE`, ctypes does *not* …
The :mod:`!ctypes.wintypes` module provides types for use with Windows APIs. Most are aliases for types defined in :mod:`ctypes`. See Microsoft's `Windows data…
Added :class:`HCONV`, :class:`HCONVLIST`, :class:`HCURSOR`, :class:`HDDEDATA`, :class:`HDROP`, :class:`HFILE`, :class:`HRESULT`, and :class:`HSZ`.
>>> from ctypes import POINTER\n>>> from ctypes.wintypes import LPRECT, RECT, SHORT\n>>> SHORT(-1).value\n-1\n>>> rect = RECT(0, 0, 100, 50)\n>>> rect.right, r…
Windows types
:class:`LARGE_INTEGER` and :class:`ULARGE_INTEGER` expose an integer :attr:`!value` attribute, with no ``LowPart``, ``HighPart``, or ``QuadPart`` fields.
An unsigned integer type with the same size as :class:`~ctypes.c_void_p`.
A signed integer type with the same size as :class:`~ctypes.c_void_p`.
A 16-bit Boolean type whose :attr:`!value` attribute is a Python :class:`bool`. Assigning to :attr:`!value` stores ``-1`` for a true value and ``0`` for a fal…
An alias for :class:`~ctypes.c_void_p`, used to represent Windows handles.
Aliases for :class:`HANDLE` for use with specific Windows APIs. :class:`HFILE` is an alias for :class:`INT` and is listed among the simple types above.
The following types are subclasses of :class:`ctypes.Structure`.
A rectangle with ``left``, ``top``, ``right``, and ``bottom`` fields, all of type :class:`LONG`.
A rectangle with ``Left``, ``Top``, ``Right``, and ``Bottom`` fields, all of type :class:`SHORT`.
A point with ``x`` and ``y`` fields, both of type :class:`LONG`.
Dimensions with ``cx`` and ``cy`` fields, both of type :class:`LONG`.
A file time with ``dwLowDateTime`` and ``dwHighDateTime`` fields, both of type :class:`DWORD`.
A Windows message with the following fields:
Field
Type
``hWnd``
… and 25 more
:gh:`159739`: Fix memory leaks during interpreter startup when a path configuration file is empty or too large, or when an audit hook rejects a command.
:gh:`158973`: Reset the warnings lock in the child after :func:`os.fork`, before clearing other threads' states, to avoid deadlocks when their finalizers issue…
:gh:`158121`: Fix missing :mod:`sys.monitoring` ``INSTRUCTION`` events when a ``LINE`` callback returns :data:`sys.monitoring.DISABLE`.
:gh:`159739`: Fix resource leaks in :mod:`ssl` when certificate conversion or key log setup fails.
:gh:`149015`: Fix :meth:`bdb.Bdb.clear_all_file_breaks` leaving breakpoints behind when multiple breakpoints are set on the same line.
:gh:`159049`: Fix reference cycles in :meth:`asyncio.loop.create_connection` and :meth:`asyncio.loop.start_tls` after a failed TLS handshake. Patch by Timofei …
:gh:`155426`: Make sure that the pure Python fallback of :func:`hmac.digest` rejects keys that are neither :class:`bytes` or :class:`bytearray`. Previously, an…
:gh:`141276`: Fix duplicate :exc:`SyntaxWarning` messages when importing source modules from ZIP archives. :meth:`zipimport.zipimporter.get_filename`, and ther…
:gh:`159739`: :c:func:`PyInitConfig_SetStr` now releases a previously configured value and preserves it if conversion of the replacement fails.
Triggered by sync with 3.15 (commit 7f00f9a).
| Back | FazBrowse Home | New Git URL |
Activity