# 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 # 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" "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" msgid "Object Life Cycle" msgstr "چرخه‌ی حیات شیء" msgid "This section explains how a type's slots relate to each other throughout the life of an object. It is not intended to be a complete canonical reference for the slots; instead, refer to the slot-specific documentation in :ref:`type-structs` for details about a particular slot." msgstr "این بخش توضیح می‌دهد که جایگاه‌های یک نوع در طول عمر یک شیء چگونه با یکدیگر در ارتباط هستند. این بخش به‌عنوان مرجع کامل و کانونیکال برای جایگاه‌ها در نظر گرفته نشده است؛ در عوض، برای جزئیات درباره‌ی یک جایگاه خاص، به مستندات اختصاصی جایگاه در :ref:`type-structs` مراجعه کنید." msgid "Life Events" msgstr "رویدادهای چرخه حیات" msgid "The figure below illustrates the order of events that can occur throughout an object's life. An arrow from *A* to *B* indicates that event *B* can occur after event *A* has occurred, with the arrow's label indicating the condition that must be true for *B* to occur after *A*." msgstr "شکل زیر ترتیب رویدادهایی را که در طول عمر یک شیء می‌توانند رخ دهند نشان می‌دهد. پیکانی از *A* به *B* نشان می‌دهد که رویداد *B* می‌تواند پس از رخ دادن رویداد *A* رخ دهد، و برچسب پیکان، شرطی را که برای رخ دادن *B* پس از *A* باید برقرار باشد، مشخص می‌کند." msgid "Diagram showing events in an object's life. Explained in detail below." msgstr "نموداری که رویدادهای طول عمر یک شیء را نشان می‌دهد. در ادامه با جزئیات توضیح داده شده است." msgid "Explanation:" msgstr "توضیح:" msgid "When a new object is constructed by calling its type:" msgstr "هنگامی که شیء جدیدی با فراخوانی نوع آن ساخته می‌شود:" msgid ":c:member:`~PyTypeObject.tp_new` is called to create a new object." msgstr ":c:member:`~PyTypeObject.tp_new` برای ایجاد یک شیء جدید فراخوانی می‌شود." msgid ":c:member:`~PyTypeObject.tp_alloc` is directly called by :c:member:`~PyTypeObject.tp_new` to allocate the memory for the new object." msgstr ":c:member:`~PyTypeObject.tp_alloc` مستقیماً توسط :c:member:`~PyTypeObject.tp_new` برای تخصیص حافظه‌ی شیء جدید فراخوانی می‌شود." msgid ":c:member:`~PyTypeObject.tp_init` initializes the newly created object. :c:member:`!tp_init` can be called again to re-initialize an object, if desired. The :c:member:`!tp_init` call can also be skipped entirely, for example by Python code calling :py:meth:`~object.__new__`." msgstr ":c:member:`~PyTypeObject.tp_init` شیء تازه‌ایجادشده را مقداردهی اولیه می‌کند. در صورت تمایل می‌توان :c:member:`!tp_init` را دوباره فراخوانی کرد تا یک شیء مجدداً مقداردهی اولیه شود. همچنین می‌توان از فراخوانی :c:member:`!tp_init` به‌طور کامل صرف‌نظر کرد، برای مثال توسط کد پایتونی که :py:meth:`~object.__new__` را فراخوانی می‌کند." msgid "After :c:member:`!tp_init` completes, the object is ready to use." msgstr "پس از تکمیل :c:member:`!tp_init`، شیء آماده استفاده است." msgid "Some time after the last reference to an object is removed:" msgstr "مدتی پس از حذف آخرین ارجاع به یک شیء:" msgid "If an object is not marked as *finalized*, it might be finalized by marking it as *finalized* and calling its :c:member:`~PyTypeObject.tp_finalize` function. Python does *not* finalize an object when the last reference to it is deleted; use :c:func:`PyObject_CallFinalizerFromDealloc` to ensure that :c:member:`~PyTypeObject.tp_finalize` is always called." msgstr "اگر شیء‌ای به‌عنوان *نهایی‌شده* علامت‌گذاری نشده باشد، می‌توان آن را با علامت‌گذاری به‌عنوان *نهایی‌شده* و فراخوانی تابع :c:member:`~PyTypeObject.tp_finalize` آن نهایی‌سازی کرد. پایتون هنگامی که آخرین ارجاع به یک شیء حذف می‌شود، آن را نهایی‌سازی *نمی‌کند*؛ برای اطمینان از اینکه :c:member:`~PyTypeObject.tp_finalize` همیشه فراخوانی می‌شود، از :c:func:`PyObject_CallFinalizerFromDealloc` استفاده کنید." msgid "If the object is marked as finalized, :c:member:`~PyTypeObject.tp_clear` might be called by the garbage collector to clear references held by the object. It is *not* called when the object's reference count reaches zero." msgstr "اگر شیء به‌عنوان نهایی‌سازی‌شده علامت‌گذاری شده باشد، ممکن است :c:member:`~PyTypeObject.tp_clear` توسط زباله‌روب فراخوانی شود تا ارجاع‌هایی را که شیء نگه‌داشته است پاک کند. این متد هنگامی که شمارش ارجاع شیء به صفر برسد فراخوانی *نمی‌شود*." msgid ":c:member:`~PyTypeObject.tp_dealloc` is called to destroy the object. To avoid code duplication, :c:member:`~PyTypeObject.tp_dealloc` typically calls into :c:member:`~PyTypeObject.tp_clear` to free up the object's references." msgstr ":c:member:`~PyTypeObject.tp_dealloc` برای نابود کردن شیء فراخوانی می‌شود. برای جلوگیری از تکرار کد، :c:member:`~PyTypeObject.tp_dealloc` معمولاً :c:member:`~PyTypeObject.tp_clear` را فراخوانی می‌کند تا ارجاع‌های شیء را آزاد کند." msgid "When :c:member:`~PyTypeObject.tp_dealloc` finishes object destruction, it directly calls :c:member:`~PyTypeObject.tp_free` (usually set to :c:func:`PyObject_Free` or :c:func:`PyObject_GC_Del` automatically as appropriate for the type) to deallocate the memory." msgstr "وقتی :c:member:`~PyTypeObject.tp_dealloc` تخریب شیء را به پایان می‌رساند، برای آزادسازی حافظه :c:member:`~PyTypeObject.tp_free` را مستقیماً فراخوانی می‌کند (که معمولاً به‌طور خودکار و متناسب با نوع، روی :c:func:`PyObject_Free` یا :c:func:`PyObject_GC_Del` تنظیم می‌شود)." msgid "The :c:member:`~PyTypeObject.tp_finalize` function is permitted to add a reference to the object if desired. If it does, the object is *resurrected*, preventing its pending destruction. (Only :c:member:`!tp_finalize` is allowed to resurrect an object; :c:member:`~PyTypeObject.tp_clear` and :c:member:`~PyTypeObject.tp_dealloc` cannot without calling into :c:member:`!tp_finalize`.) Resurrecting an object may or may not cause the object's *finalized* mark to be removed. Currently, Python does not remove the *finalized* mark from a resurrected object if it supports garbage collection (i.e., the :c:macro:`Py_TPFLAGS_HAVE_GC` flag is set) but does remove the mark if the object does not support garbage collection; either or both of these behaviors may change in the future." msgstr "تابع :c:member:`~PyTypeObject.tp_finalize` در صورت تمایل مجاز است ارجاعی به شیء اضافه کند. اگر چنین کند، شیء *احیا* می‌شود و از تخریب در انتظارش جلوگیری می‌شود. (تنها :c:member:`!tp_finalize` مجاز است یک شیء را احیا کند؛ :c:member:`~PyTypeObject.tp_clear` و :c:member:`~PyTypeObject.tp_dealloc` بدون فراخوانی :c:member:`!tp_finalize` نمی‌توانند این کار را انجام دهند.) احیای یک شیء ممکن است باعث حذف نشان *نهایی‌شده* از روی آن شود یا نشود. در حال حاضر، پایتون اگر شیء احیاشده از زباله‌روبی پشتیبانی کند (یعنی پرچم :c:macro:`Py_TPFLAGS_HAVE_GC` تنظیم شده باشد)، نشان *نهایی‌شده* را از روی آن حذف نمی‌کند، اما اگر شیء از زباله‌روبی پشتیبانی نکند، این نشان را حذف می‌کند؛ هر یک یا هر دوی این رفتارها ممکن است در آینده تغییر کنند." msgid ":c:member:`~PyTypeObject.tp_dealloc` can optionally call :c:member:`~PyTypeObject.tp_finalize` via :c:func:`PyObject_CallFinalizerFromDealloc` if it wishes to reuse that code to help with object destruction. This is recommended because it guarantees that :c:member:`!tp_finalize` is always called before destruction. See the :c:member:`~PyTypeObject.tp_dealloc` documentation for example code." msgstr ":c:member:`~PyTypeObject.tp_dealloc` می‌تواند در صورت تمایل به استفاده مجدد از آن کد برای کمک به تخریب شیء، به‌صورت اختیاری :c:member:`~PyTypeObject.tp_finalize` را از طریق :c:func:`PyObject_CallFinalizerFromDealloc` فراخوانی کند. انجام این کار توصیه می‌شود، زیرا تضمین می‌کند که :c:member:`!tp_finalize` همیشه پیش از تخریب فراخوانی می‌شود. برای مشاهده کد نمونه، به مستندات :c:member:`~PyTypeObject.tp_dealloc` مراجعه کنید." msgid "If the object is a member of a :term:`cyclic isolate` and either :c:member:`~PyTypeObject.tp_clear` fails to break the reference cycle or the cyclic isolate is not detected (perhaps :func:`gc.disable` was called, or the :c:macro:`Py_TPFLAGS_HAVE_GC` flag was erroneously omitted in one of the involved types), the objects remain indefinitely uncollectable (they \"leak\"). See :data:`gc.garbage`." msgstr "اگر شیء عضوی از یک :term:`cyclic isolate` باشد و یا :c:member:`~PyTypeObject.tp_clear` در شکستن چرخه ارجاع ناکام بماند یا مجموعه ایزوله چرخه‌ای تشخیص داده نشود (شاید :func:`gc.disable` فراخوانی شده باشد، یا پرچم :c:macro:`Py_TPFLAGS_HAVE_GC` به‌اشتباه در یکی از نوع‌های درگیر تنظیم نشده باشد)، اشیاء به‌طور نامحدود غیرقابل جمع‌آوری باقی می‌مانند (آن‌ها «نشت» می‌کنند). :data:`gc.garbage` را ببینید." msgid "If the object is marked as supporting garbage collection (the :c:macro:`Py_TPFLAGS_HAVE_GC` flag is set in :c:member:`~PyTypeObject.tp_flags`), the following events are also possible:" msgstr "اگر شیء به‌عنوان پشتیبان از زباله‌روبی نشانه‌گذاری شده باشد (پرچم :c:macro:`Py_TPFLAGS_HAVE_GC` در :c:member:`~PyTypeObject.tp_flags` تنظیم شده باشد)، رویدادهای زیر نیز ممکن‌اند:" msgid "The garbage collector occasionally calls :c:member:`~PyTypeObject.tp_traverse` to identify :term:`cyclic isolates `." msgstr "زباله‌روب گاهی برای شناسایی :term:`ایزوله‌های چرخه‌ای `، :c:member:`~PyTypeObject.tp_traverse` را فراخوانی می‌کند." msgid "When the garbage collector discovers a :term:`cyclic isolate`, it finalizes one of the objects in the group by marking it as *finalized* and calling its :c:member:`~PyTypeObject.tp_finalize` function, if it has one. This repeats until the cyclic isolate doesn't exist or all of the objects have been finalized." msgstr "هنگامی که زباله‌روب یک :term:`cyclic isolate` را کشف می‌کند، یکی از اشیاء درون گروه را با علامت‌گذاری آن به‌عنوان *نهایی‌شده* و فراخوانی تابع :c:member:`~PyTypeObject.tp_finalize` آن (در صورت وجود) نهایی‌سازی می‌کند. این کار تا زمانی تکرار می‌شود که ایزوله چرخه‌ای دیگر وجود نداشته باشد یا همه‌ی اشیاء نهایی‌سازی شده باشند." msgid ":c:member:`~PyTypeObject.tp_finalize` is permitted to resurrect the object by adding a reference from outside the :term:`cyclic isolate`. The new reference causes the group of objects to no longer form a cyclic isolate (the reference cycle may still exist, but if it does the objects are no longer isolated)." msgstr ":c:member:`~PyTypeObject.tp_finalize` مجاز است با افزودن ارجاعی از بیرون :term:`cyclic isolate` شیء را احیا کند. این ارجاع جدید باعث می‌شود که گروه اشیاء دیگر مجموعه ایزوله چرخه‌ای تشکیل ندهد (ممکن است چرخه ارجاع همچنان وجود داشته باشد، اما در این صورت اشیاء دیگر ایزوله نیستند)." msgid "When the garbage collector discovers a :term:`cyclic isolate` and all of the objects in the group have already been marked as *finalized*, the garbage collector clears one or more of the uncleared objects in the group (possibly concurrently) by calling each's :c:member:`~PyTypeObject.tp_clear` function. This repeats as long as the cyclic isolate still exists and not all of the objects have been cleared." msgstr "وقتی زباله‌روب یک :term:`مجموعه‌ی ایزوله چرخه‌ای ` را کشف می‌کند و همه‌ی اشیاء در گروه از قبل به‌عنوان *نهایی‌سازی‌شده* علامت‌گذاری شده‌اند، زباله‌روب یک یا چند شیء از اشیاء پاک‌نشده در گروه را (احتمالاً به‌صورت هم‌زمان) با فراخوانی تابع :c:member:`~PyTypeObject.tp_clear` هر یک از آن‌ها پاک می‌کند. این کار تا زمانی که مجموعه‌ی ایزوله چرخه‌ای همچنان وجود داشته باشد و همه‌ی اشیاء هنوز پاک نشده باشند، تکرار می‌شود." msgid "Cyclic Isolate Destruction" msgstr "تخریب ایزوله‌های چرخه‌ای" msgid "Listed below are the stages of life of a hypothetical :term:`cyclic isolate` that continues to exist after each member object is finalized or cleared. It is a memory leak if a cyclic isolate progresses through all of these stages; it should vanish once all objects are cleared, if not sooner. A cyclic isolate can vanish either because the reference cycle is broken or because the objects are no longer isolated due to finalizer resurrection (see :c:member:`~PyTypeObject.tp_finalize`)." msgstr "در ادامه، مراحل حیات یک :term:`مجموعه‌ی ایزوله چرخه‌ای ` فرضی که پس از نهایی شدن یا پاک شدن هر شیء عضو، همچنان وجود دارد، فهرست شده‌اند. اگر یک مجموعه‌ی ایزوله چرخه‌ای از تمام این مراحل عبور کند، نشت حافظه رخ داده است؛ چنین مجموعه‌ای باید به محض پاک شدن تمام اشیاء ناپدید شود، اگر نه زودتر از آن. مجموعه‌ی ایزوله چرخه‌ای می‌تواند یا به این دلیل ناپدید شود که چرخه‌ی ارجاع شکسته شده است، یا به این دلیل که اشیاء در نتیجه احیا شدن توسط نهایی‌ساز دیگر ایزوله نیستند (به :c:member:`~PyTypeObject.tp_finalize` مراجعه کنید)." msgid "**Reachable** (not yet a cyclic isolate): All objects are in their normal, reachable state. A reference cycle could exist, but an external reference means the objects are not yet isolated." msgstr "**قابل دسترس** (هنوز ایزوله چرخه‌ای نیست): همه‌ی اشیاء در وضعیت عادی و قابل دسترس خود هستند. ممکن است چرخه‌ی ارجاع وجود داشته باشد، اما وجود یک ارجاع بیرونی به این معناست که اشیاء هنوز ایزوله نشده‌اند." msgid "**Unreachable but consistent:** The final reference from outside the cyclic group of objects has been removed, causing the objects to become isolated (thus a cyclic isolate is born). None of the group's objects have been finalized or cleared yet. The cyclic isolate remains at this stage until some future run of the garbage collector (not necessarily the next run because the next run might not scan every object)." msgstr "**دسترس‌ناپذیر اما سازگار:** آخرین ارجاع از بیرون گروه چرخه‌ای اشیاء حذف شده است و در نتیجه اشیاء ایزوله شده‌اند (بدین ترتیب یک ایزوله چرخه‌ای (cyclic isolate) متولد می‌شود). هیچ‌یک از اشیاء گروه هنوز نهایی‌سازی یا پاک‌سازی نشده‌اند. ایزوله چرخه‌ای در این مرحله باقی می‌ماند تا اجرای آینده‌ای از زباله‌روب انجام شود (که لزوماً اجرای بعدی نیست، زیرا ممکن است اجرای بعدی هر شیء را پویش نکند)." msgid "**Mix of finalized and not finalized:** Objects in a cyclic isolate are finalized one at a time, which means that there is a period of time when the cyclic isolate is composed of a mix of finalized and non-finalized objects. Finalization order is unspecified, so it can appear random. A finalized object must behave in a sane manner when non-finalized objects interact with it, and a non-finalized object must be able to tolerate the finalization of an arbitrary subset of its referents." msgstr "**ترکیبی از نهایی‌شده و نهایی‌نشده:** اشیاء در یک مجموعه‌ی چرخه‌ای ایزوله یک‌به‌یک نهایی‌سازی می‌شوند، که این بدان معناست که برای مدتی، مجموعه‌ی چرخه‌ای ایزوله از ترکیبی از اشیاء نهایی‌شده و نهایی‌نشده تشکیل شده است. ترتیب نهایی‌سازی نامشخص است، بنابراین ممکن است تصادفی به نظر برسد. یک شیء نهایی‌شده باید هنگامی که اشیاء نهایی‌نشده با آن تعامل می‌کنند، به شیوه‌ای منطقی رفتار کند، و یک شیء نهایی‌نشده باید بتواند نهایی‌سازی زیرمجموعه‌ی دلخواهی از اشیایی را که به آن‌ها ارجاع دارد (referents) تحمل کند." msgid "**All finalized:** All objects in a cyclic isolate are finalized before any of them are cleared." msgstr "**همه نهایی‌سازی می‌شوند:** همه‌ی اشیاء موجود در یک ایزوله چرخه‌ای (cyclic isolate) پیش از پاک شدن هر یک از آن‌ها نهایی‌سازی می‌شوند." msgid "**Mix of finalized and cleared:** The objects can be cleared serially or concurrently (but with the :term:`GIL` held); either way, some will finish before others. A finalized object must be able to tolerate the clearing of a subset of its referents. :pep:`442` calls this stage \"cyclic trash\"." msgstr "**ترکیبی از نهایی‌سازی‌شده و پاک‌سازی‌شده:** اشیاء می‌توانند به‌صورت متوالی یا هم‌زمان پاک‌سازی شوند (اما با در اختیار داشتن :term:`قفل مفسر سراسری `)؛ در هر دو حالت، برخی پیش از بقیه پایان می‌یابند. یک شیء نهایی‌سازی‌شده باید بتواند پاک‌سازی زیرمجموعه‌ای از اشیایی که به آن‌ها ارجاع دارد را تحمل کند. :pep:`442` این مرحله را «زباله چرخه‌ای» (cyclic trash) می‌نامد." msgid "**Leaked:** If a cyclic isolate still exists after all objects in the group have been finalized and cleared, then the objects remain indefinitely uncollectable (see :data:`gc.garbage`). It is a bug if a cyclic isolate reaches this stage---it means the :c:member:`~PyTypeObject.tp_clear` methods of the participating objects have failed to break the reference cycle as required." msgstr "**نشت‌شده:** اگر یک ایزوله چرخه‌ای پس از نهایی‌سازی و پاک‌سازی همه‌ی اشیاء گروه همچنان وجود داشته باشد، در این صورت اشیاء برای همیشه غیرقابل جمع‌آوری باقی می‌مانند (به :data:`gc.garbage` مراجعه کنید). اگر یک ایزوله چرخه‌ای به این مرحله برسد، این یک باگ است---یعنی متدهای :c:member:`~PyTypeObject.tp_clear` اشیاء شرکت‌کننده نتوانسته‌اند چرخه‌ی ارجاع را همان‌طور که لازم است بشکنند." msgid "If :c:member:`~PyTypeObject.tp_clear` did not exist, then Python would have no way to safely break a reference cycle. Simply destroying an object in a cyclic isolate would result in a dangling pointer, triggering undefined behavior when an object referencing the destroyed object is itself destroyed. The clearing step makes object destruction a two-phase process: first :c:member:`~PyTypeObject.tp_clear` is called to partially destroy the objects enough to detangle them from each other, then :c:member:`~PyTypeObject.tp_dealloc` is called to complete the destruction." msgstr "اگر :c:member:`~PyTypeObject.tp_clear` وجود نداشت، پایتون هیچ راهی نداشت تا یک چرخه‌ی ارجاع را به‌طور ایمن قطع کند. صرفاً نابود کردن یک شیء در یک مجموعه‌ی ایزوله چرخه‌ای منجر به یک اشاره‌گر سرگردان می‌شد و هنگامی که شیء‌ای که به شیء نابودشده ارجاع می‌کند، خود نابود شود، رفتار تعریف‌نشده را برمی‌انگیخت. مرحله‌ی پاک‌سازی، نابود کردن شیء را به فرایندی دو مرحله‌ای تبدیل می‌کند: نخست :c:member:`~PyTypeObject.tp_clear` فراخوانی می‌شود تا اشیاء را تا حدی نابود کند که از یکدیگر گره‌گشایی شوند، سپس :c:member:`~PyTypeObject.tp_dealloc` فراخوانی می‌شود تا نابودی را کامل کند." msgid "Unlike clearing, finalization is not a phase of destruction. A finalized object must still behave properly by continuing to fulfill its design contracts. An object's finalizer is allowed to execute arbitrary Python code, and is even allowed to prevent the impending destruction by adding a reference. The finalizer is only related to destruction by call order---if it runs, it runs before destruction, which starts with :c:member:`~PyTypeObject.tp_clear` (if called) and concludes with :c:member:`~PyTypeObject.tp_dealloc`." msgstr "برخلاف پاک‌سازی، نهایی‌سازی مرحله‌ای از تخریب نیست. یک شیء نهایی‌شده همچنان باید با ادامه‌ی برآوردن قراردادهای طراحی‌اش، به‌درستی رفتار کند. نهایی‌ساز یک شیء مجاز است هر کد پایتونی را اجرا کند، و حتی مجاز است با افزودن یک ارجاع، از تخریب قریب‌الوقوع جلوگیری کند. نهایی‌ساز تنها از نظر ترتیب فراخوانی با تخریب در ارتباط است---اگر اجرا شود، پیش از تخریب اجرا می‌شود؛ تخریبی که با :c:member:`~PyTypeObject.tp_clear` (در صورت فراخوانی) آغاز می‌شود و با :c:member:`~PyTypeObject.tp_dealloc` به پایان می‌رسد." msgid "The finalization step is not necessary to safely reclaim the objects in a cyclic isolate, but its existence makes it easier to design types that behave in a sane manner when objects are cleared. Clearing an object might necessarily leave it in a broken, partially destroyed state---it might be unsafe to call any of the cleared object's methods or access any of its attributes. With finalization, only finalized objects can possibly interact with cleared objects; non-finalized objects are guaranteed to interact with only non-cleared (but potentially finalized) objects." msgstr "گام نهایی‌سازی برای بازپس‌گیری ایمن اشیاء در یک مجموعه چرخه‌ای ایزوله (cyclic isolate) ضروری نیست، اما وجود آن طراحی نوع‌هایی را آسان‌تر می‌کند که هنگام پاک‌سازی اشیاء به شیوه‌ای معقول رفتار کنند. پاک‌سازی یک شیء ممکن است آن را ناگزیر در وضعیتی معیوب و نیمه‌تخریب‌شده باقی بگذارد---ممکن است فراخوانی هر یک از متدهای شیء پاک‌سازی‌شده یا دسترسی به هر یک از ویژگی‌های آن ناایمن باشد. با نهایی‌سازی، تنها اشیاء نهایی‌سازی‌شده ممکن است با اشیاء پاک‌سازی‌شده تعامل داشته باشند؛ برای اشیاء غیرنهایی‌سازی‌شده تضمین می‌شود که تنها با اشیاء پاک‌سازی‌نشده (اما به‌طور بالقوه نهایی‌سازی‌شده) تعامل داشته باشند." msgid "To summarize the possible interactions:" msgstr "برای جمع‌بندی تعامل‌های ممکن:" msgid "A non-finalized object might have references to or from non-finalized and finalized objects, but not to or from cleared objects." msgstr "یک شیء نهایی‌نشده ممکن است ارجاع‌هایی به اشیاء نهایی‌نشده و نهایی‌شده داشته باشد یا از آن‌ها ارجاعی دریافت کند، اما به اشیاء پاک‌سازی‌شده ارجاعی ندارد و از آن‌ها نیز ارجاعی دریافت نمی‌کند." msgid "A finalized object might have references to or from non-finalized, finalized, and cleared objects." msgstr "یک شیء نهایی‌شده ممکن است ارجاع‌هایی به اشیاء نهایی‌نشده، نهایی‌شده و پاک‌سازی‌شده داشته باشد یا آن اشیاء ارجاع‌هایی به آن داشته باشند." msgid "A cleared object might have references to or from finalized and cleared objects, but not to or from non-finalized objects." msgstr "یک شیء پاک‌سازی‌شده ممکن است ارجاع‌هایی به اشیاء نهایی‌سازی‌شده و پاک‌سازی‌شده داشته باشد یا از آن‌ها ارجاعی به آن وجود داشته باشد، اما هیچ ارجاعی به اشیاء نهایی‌سازی‌نشده یا از آن‌ها به آن وجود نخواهد داشت." msgid "Without any reference cycles, an object can be simply destroyed once its last reference is deleted; the finalization and clearing steps are not necessary to safely reclaim unused objects. However, it can be useful to automatically call :c:member:`~PyTypeObject.tp_finalize` and :c:member:`~PyTypeObject.tp_clear` before destruction anyway because type design is simplified when all objects always experience the same series of events regardless of whether they participated in a cyclic isolate. Python currently only calls :c:member:`~PyTypeObject.tp_finalize` and :c:member:`~PyTypeObject.tp_clear` as needed to destroy a cyclic isolate; this may change in a future version." msgstr "در نبود هرگونه چرخه ارجاع، یک شیء را می‌توان به‌سادگی به محض حذف آخرین ارجاع به آن نابود کرد؛ گام‌های نهایی‌سازی و پاک‌سازی برای بازپس‌گیری ایمن اشیاء استفاده‌نشده ضروری نیستند. با این حال، می‌تواند مفید باشد که :c:member:`~PyTypeObject.tp_finalize` و :c:member:`~PyTypeObject.tp_clear` به هر جهت پیش از نابودی به‌طور خودکار فراخوانی شوند، زیرا وقتی همه اشیاء همیشه دنباله یکسانی از رویدادها را تجربه کنند، صرف‌نظر از اینکه در یک مجموعه چرخه‌ای ایزوله مشارکت داشته‌اند یا نه، طراحی نوع ساده‌تر می‌شود. در حال حاضر، پایتون :c:member:`~PyTypeObject.tp_finalize` و :c:member:`~PyTypeObject.tp_clear` را تنها در صورت نیاز برای نابود کردن یک مجموعه چرخه‌ای ایزوله فراخوانی می‌کند؛ این ممکن است در نسخه‌ای آینده تغییر کند." msgid "Functions" msgstr "توابع" msgid "To allocate and free memory, see :ref:`allocating-objects`." msgstr "برای تخصیص و آزادسازی حافظه، به :ref:`allocating-objects` مراجعه کنید." msgid "Finalizes the object as described in :c:member:`~PyTypeObject.tp_finalize`. Call this function (or :c:func:`PyObject_CallFinalizerFromDealloc`) instead of calling :c:member:`~PyTypeObject.tp_finalize` directly because this function may deduplicate multiple calls to :c:member:`!tp_finalize`. Currently, calls are only deduplicated if the type supports garbage collection (i.e., the :c:macro:`Py_TPFLAGS_HAVE_GC` flag is set); this may change in the future." msgstr "شیء را مطابق توضیحات داده‌شده در :c:member:`~PyTypeObject.tp_finalize` نهایی‌سازی می‌کند. به جای فراخوانی مستقیم :c:member:`~PyTypeObject.tp_finalize`، این تابع (یا :c:func:`PyObject_CallFinalizerFromDealloc`) را فراخوانی کنید، زیرا این تابع ممکن است تکرار فراخوانی‌های متعدد :c:member:`!tp_finalize` را حذف کند. در حال حاضر، تکرار فراخوانی‌ها تنها زمانی حذف می‌شود که نوع از زباله‌روبی پشتیبانی کند (یعنی پرچم :c:macro:`Py_TPFLAGS_HAVE_GC` تنظیم شده باشد)؛ این موضوع ممکن است در آینده تغییر کند." msgid "Same as :c:func:`PyObject_CallFinalizer` but meant to be called at the beginning of the object's destructor (:c:member:`~PyTypeObject.tp_dealloc`). There must not be any references to the object. If the object's finalizer resurrects the object, this function returns -1; no further destruction should happen. Otherwise, this function returns 0 and destruction can continue normally." msgstr "همانند :c:func:`PyObject_CallFinalizer` است، اما در نظر گرفته شده که در ابتدای مخرب شیء (:c:member:`~PyTypeObject.tp_dealloc`) فراخوانی شود. نباید هیچ ارجاعی به شیء وجود داشته باشد. اگر نهایی‌ساز شیء آن را احیا کند، این تابع مقدار -1 را برمی‌گرداند؛ هیچ تخریب بیشتری نباید رخ دهد. در غیر این صورت، این تابع مقدار 0 را برمی‌گرداند و تخریب می‌تواند به‌طور عادی ادامه یابد." msgid ":c:member:`~PyTypeObject.tp_dealloc` for example code." msgstr ":c:member:`~PyTypeObject.tp_dealloc` برای کد نمونه."