-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathsubinterpreters.po
More file actions
310 lines (223 loc) · 40.4 KB
/
Copy pathsubinterpreters.po
File metadata and controls
310 lines (223 loc) · 40.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
# 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 <sepehrrasouli06@gmail.com>, 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:17+0330\n"
"Last-Translator: Sepehr Rasouli <sepehrrasouli06@gmail.com>, 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 "Multiple interpreters in a Python process"
msgstr "چندین مفسر در یک فرایند پایتون"
msgid "While in most uses, you will only embed a single Python interpreter, there are cases where you need to create several independent interpreters in the same process and perhaps even in the same thread. Sub-interpreters allow you to do that."
msgstr "هرچند در بیشتر موارد شما تنها یک مفسر پایتون را تعبیه میکنید، مواردی وجود دارد که نیاز دارید چندین مفسر مستقل را در همان فرایند و شاید حتی در همان نخ ایجاد کنید. زیرمفسرها به شما امکان انجام این کار را میدهند."
msgid "The \"main\" interpreter is the first one created when the runtime initializes. It is usually the only Python interpreter in a process. Unlike sub-interpreters, the main interpreter has unique process-global responsibilities like signal handling. It is also responsible for execution during runtime initialization and is usually the active interpreter during runtime finalization. The :c:func:`PyInterpreterState_Main` function returns a pointer to its state."
msgstr "مفسر «اصلی» نخستین مفسری است که هنگام راهاندازی رانتایم ایجاد میشود. این مفسر معمولاً تنها مفسر پایتون در یک فرایند است. برخلاف زیرمفسرها، مفسر اصلی مسئولیتهای منحصربهفردی در سطح کل فرایند مانند مدیریت سیگنال را بر عهده دارد. این مفسر همچنین مسئول اجرا در طول راهاندازی رانتایم است و معمولاً مفسر فعال در طول نهاییسازی رانتایم است. تابع :c:func:`PyInterpreterState_Main` اشارهگری به وضعیت آن برمیگرداند."
msgid "You can switch between sub-interpreters using the :c:func:`PyThreadState_Swap` function. You can create and destroy them using the following functions:"
msgstr "میتوانید با استفاده از تابع :c:func:`PyThreadState_Swap` بین زیرمفسرها جابهجا شوید. میتوانید آنها را با استفاده از توابع زیر ایجاد و نابود کنید:"
msgid "Structure containing most parameters to configure a sub-interpreter. Its values are used only in :c:func:`Py_NewInterpreterFromConfig` and never modified by the runtime."
msgstr "ساختاری که بیشتر پارامترهای لازم برای پیکربندی یک زیرمفسر را در بر دارد. مقادیر آن تنها در :c:func:`Py_NewInterpreterFromConfig` استفاده میشوند و هرگز توسط رانتایم تغییر داده نمیشوند."
msgid "Structure fields:"
msgstr "فیلدهای ساختار:"
msgid "If this is ``0`` then the sub-interpreter will use its own \"object\" allocator state. Otherwise it will use (share) the main interpreter's."
msgstr "اگر این مقدار ``0`` باشد، زیرمفسر از وضعیت تخصیصدهندهی «object» خود استفاده میکند. در غیر این صورت از وضعیت تخصیصدهندهی مفسر اصلی (به اشتراک) استفاده میکند."
msgid "If this is ``0`` then :c:member:`~PyInterpreterConfig.check_multi_interp_extensions` must be ``1`` (non-zero). If this is ``1`` then :c:member:`~PyInterpreterConfig.gil` must not be :c:macro:`PyInterpreterConfig_OWN_GIL`."
msgstr "اگر این مقدار ``0`` باشد، آنگاه :c:member:`~PyInterpreterConfig.check_multi_interp_extensions` باید ``1`` (ناصفر) باشد. اگر این مقدار ``1`` باشد، آنگاه :c:member:`~PyInterpreterConfig.gil` نباید :c:macro:`PyInterpreterConfig_OWN_GIL` باشد."
msgid "If this is ``0`` then the runtime will not support forking the process in any thread where the sub-interpreter is currently active. Otherwise fork is unrestricted."
msgstr "اگر این مقدار ``0`` باشد، رانتایم از فورک کردن فرایند در هیچ نخی که زیرمفسر در حال حاضر در آن فعال است پشتیبانی نخواهد کرد. در غیر این صورت، فورک بدون محدودیت است."
msgid "Note that the :mod:`subprocess` module still works when fork is disallowed."
msgstr "توجه داشته باشید که ماژول :mod:`subprocess` وقتی فورک ممنوع است، همچنان کار میکند."
msgid "If this is ``0`` then the runtime will not support replacing the current process via exec (e.g. :func:`os.execv`) in any thread where the sub-interpreter is currently active. Otherwise exec is unrestricted."
msgstr "اگر این مقدار ``0`` باشد، رانتایم در هیچ نخی که زیرمفسر در حال حاضر در آن فعال است، از جایگزینی فرایند جاری از طریق exec (مثلاً :func:`os.execv`) پشتیبانی نخواهد کرد. در غیر این صورت، exec بدون محدودیت است."
msgid "Note that the :mod:`subprocess` module still works when exec is disallowed."
msgstr "توجه داشته باشید که ماژول :mod:`subprocess` هنگامی که exec ممنوع است، همچنان کار میکند."
msgid "If this is ``0`` then the sub-interpreter's :mod:`threading` module won't create threads. Otherwise threads are allowed."
msgstr "اگر این مقدار ``0`` باشد، ماژول :mod:`threading` زیرمفسر نخها را ایجاد نمیکند. در غیر این صورت، نخها مجاز هستند."
msgid "If this is ``0`` then the sub-interpreter's :mod:`threading` module won't create daemon threads. Otherwise daemon threads are allowed (as long as :c:member:`~PyInterpreterConfig.allow_threads` is non-zero)."
msgstr "اگر این مقدار ``0`` باشد، ماژول :mod:`threading` در زیرمفسر نخهای دِیمِن ایجاد نمیکند. در غیر این صورت، نخهای دِیمِن مجاز هستند (تا زمانی که :c:member:`~PyInterpreterConfig.allow_threads` ناصفر باشد)."
msgid "If this is ``0`` then all extension modules may be imported, including legacy (single-phase init) modules, in any thread where the sub-interpreter is currently active. Otherwise only multi-phase init extension modules (see :pep:`489`) may be imported. (Also see :c:macro:`Py_mod_multiple_interpreters`.)"
msgstr "اگر این مقدار ``0`` باشد، همه ماژولهای توسعهای، از جمله ماژولهای قدیمی (با مقداردهی اولیه تکمرحلهای)، میتوانند در هر نخی که زیرمفسر در حال حاضر در آن فعال است ایمپورت شوند. در غیر این صورت، فقط ماژولهای توسعهای با مقداردهی اولیه چندمرحلهای (نگاه کنید به :pep:`489`) میتوانند ایمپورت شوند. (همچنین :c:macro:`Py_mod_multiple_interpreters` را ببینید.)"
msgid "This must be ``1`` (non-zero) if :c:member:`~PyInterpreterConfig.use_main_obmalloc` is ``0``."
msgstr "اگر :c:member:`~PyInterpreterConfig.use_main_obmalloc` برابر ``0`` باشد، این مقدار باید ``1`` (ناصفر) باشد."
msgid "This determines the operation of the GIL for the sub-interpreter. It may be one of the following:"
msgstr "این، عملکرد قفل مفسر سراسری را برای زیرمفسر تعیین میکند. این میتواند یکی از موارد زیر باشد:"
msgid "Use the default selection (:c:macro:`PyInterpreterConfig_SHARED_GIL`)."
msgstr "از انتخاب پیشفرض (:c:macro:`PyInterpreterConfig_SHARED_GIL`) استفاده کنید."
msgid "Use (share) the main interpreter's GIL."
msgstr "استفاده از (اشتراکگذاری) قفل مفسر سراسریِ مفسر اصلی."
msgid "Use the sub-interpreter's own GIL."
msgstr "از قفل مفسر سراسریِ خودِ زیرمفسر استفاده کنید."
msgid "If this is :c:macro:`PyInterpreterConfig_OWN_GIL` then :c:member:`PyInterpreterConfig.use_main_obmalloc` must be ``0``."
msgstr "اگر این مقدار :c:macro:`PyInterpreterConfig_OWN_GIL` باشد، آنگاه :c:member:`PyInterpreterConfig.use_main_obmalloc` باید ``0`` باشد."
msgid "Create a new sub-interpreter. This is an (almost) totally separate environment for the execution of Python code. In particular, the new interpreter has separate, independent versions of all imported modules, including the fundamental modules :mod:`builtins`, :mod:`__main__` and :mod:`sys`. The table of loaded modules (``sys.modules``) and the module search path (``sys.path``) are also separate. The new environment has no ``sys.argv`` variable. It has new standard I/O stream file objects ``sys.stdin``, ``sys.stdout`` and ``sys.stderr`` (however these refer to the same underlying file descriptors)."
msgstr "یک زیرمفسر جدید ایجاد کنید. این یک محیط (تقریباً) کاملاً جداگانه برای اجرای کد پایتون است. بهویژه، مفسر جدید نسخههای جداگانه و مستقلی از تمام ماژولهای ایمپورتشده دارد، از جمله ماژولهای بنیادی :mod:`builtins`، :mod:`__main__` و :mod:`sys`. جدول ماژولهای بارگذاریشده (``sys.modules``) و مسیر جستجوی ماژول (``sys.path``) نیز جداگانه هستند. محیط جدید متغیر ``sys.argv`` ندارد. این محیط اشیاء پروندهی جدید جریانهای ورودی/خروجی استاندارد ``sys.stdin``، ``sys.stdout`` و ``sys.stderr`` را دارد (البته اینها به همان توصیفگرهای پروندهی زیرین ارجاع میدهند)."
msgid "The given *config* controls the options with which the interpreter is initialized."
msgstr "*config* دادهشده، گزینههایی را که مفسر با آنها راهاندازی میشود کنترل میکند."
msgid "Upon success, *tstate_p* will be set to the first :term:`thread state` created in the new sub-interpreter. This thread state is :term:`attached <attached thread state>`. Note that no actual thread is created; see the discussion of thread states below. If creation of the new interpreter is unsuccessful, *tstate_p* is set to ``NULL``; no exception is set since the exception state is stored in the :term:`attached thread state`, which might not exist."
msgstr "در صورت موفقیت، *tstate_p* به نخستین :term:`وضعیت نخ <thread state>` ایجادشده در زیرمفسر جدید تنظیم میشود. این وضعیت نخ :term:`متصل <attached thread state>` است. توجه داشته باشید که هیچ نخ واقعی ایجاد نمیشود؛ بحث درباره وضعیتهای نخ را در ادامه ببینید. اگر ایجاد مفسر جدید ناموفق باشد، *tstate_p* به ``NULL`` تنظیم میشود؛ هیچ استثنایی تنظیم نمیشود، زیرا وضعیت استثنا در :term:`وضعیت نخ متصل <attached thread state>` ذخیره میشود که ممکن است وجود نداشته باشد."
msgid "Like all other Python/C API functions, an :term:`attached thread state` must be present before calling this function, but it might be detached upon returning. On success, the returned thread state will be :term:`attached <attached thread state>`. If the sub-interpreter is created with its own :term:`GIL` then the :term:`attached thread state` of the calling interpreter will be detached. When the function returns, the new interpreter's :term:`thread state` will be :term:`attached <attached thread state>` to the current thread and the previous interpreter's :term:`attached thread state` will remain detached."
msgstr "مانند تمام توابع دیگر Python/C API، باید پیش از فراخوانی این تابع، یک :term:`attached thread state` موجود باشد، اما ممکن است هنگام بازگشت جدا شده باشد. در صورت موفقیت، وضعیت نخ بازگرداندهشده :term:`متصل <attached thread state>` خواهد بود. اگر زیرمفسر (sub-interpreter) با :term:`GIL` اختصاصی خودش ایجاد شود، :term:`attached thread state` مفسر فراخواننده جدا خواهد شد. هنگامی که تابع بازمیگردد، :term:`thread state` مفسر جدید به نخ فعلی :term:`متصل <attached thread state>` خواهد بود و :term:`attached thread state` مفسر قبلی جدا باقی خواهد ماند."
msgid "Sub-interpreters are most effective when isolated from each other, with certain functionality restricted::"
msgstr "زیرمفسرها زمانی بیشترین کارایی را دارند که از یکدیگر ایزوله باشند و برخی از قابلیتها محدود باشند::"
msgid ""
"PyInterpreterConfig config = {\n"
" .use_main_obmalloc = 0,\n"
" .allow_fork = 0,\n"
" .allow_exec = 0,\n"
" .allow_threads = 1,\n"
" .allow_daemon_threads = 0,\n"
" .check_multi_interp_extensions = 1,\n"
" .gil = PyInterpreterConfig_OWN_GIL,\n"
"};\n"
"PyThreadState *tstate = NULL;\n"
"PyStatus status = Py_NewInterpreterFromConfig(&tstate, &config);\n"
"if (PyStatus_Exception(status)) {\n"
" Py_ExitStatusException(status);\n"
"}"
msgstr ""
"PyInterpreterConfig config = {\n"
" .use_main_obmalloc = 0,\n"
" .allow_fork = 0,\n"
" .allow_exec = 0,\n"
" .allow_threads = 1,\n"
" .allow_daemon_threads = 0,\n"
" .check_multi_interp_extensions = 1,\n"
" .gil = PyInterpreterConfig_OWN_GIL,\n"
"};\n"
"PyThreadState *tstate = NULL;\n"
"PyStatus status = Py_NewInterpreterFromConfig(&tstate, &config);\n"
"if (PyStatus_Exception(status)) {\n"
" Py_ExitStatusException(status);\n"
"}"
msgid "Note that the config is used only briefly and does not get modified. During initialization the config's values are converted into various :c:type:`PyInterpreterState` values. A read-only copy of the config may be stored internally on the :c:type:`PyInterpreterState`."
msgstr "توجه داشته باشید که پیکربندی فقط بهطور گذرا استفاده میشود و تغییر داده نمیشود. در طول مقداردهی اولیه، مقادیر پیکربندی به مقادیر مختلف :c:type:`PyInterpreterState` تبدیل میشوند. ممکن است یک نسخهی فقطخواندنی از پیکربندی بهطور داخلی روی :c:type:`PyInterpreterState` ذخیره شود."
msgid "Extension modules are shared between (sub-)interpreters as follows:"
msgstr "ماژولهای توسعهای بین (زیر-)مفسرها به شرح زیر به اشتراک گذاشته میشوند:"
msgid "For modules using multi-phase initialization, e.g. :c:func:`PyModule_FromDefAndSpec`, a separate module object is created and initialized for each interpreter. Only C-level static and global variables are shared between these module objects."
msgstr "برای ماژولهایی که از مقداردهی اولیه چندمرحلهای استفاده میکنند، مانند :c:func:`PyModule_FromDefAndSpec`، یک شیء ماژول جداگانه برای هر مفسر ایجاد و مقداردهی اولیه میشود. تنها متغیرهای ایستا و سراسری در سطح C بین این اشیاء ماژول به اشتراک گذاشته میشوند."
msgid "For modules using legacy :ref:`single-phase initialization <single-phase-initialization>`, e.g. :c:func:`PyModule_Create`, the first time a particular extension is imported, it is initialized normally, and a (shallow) copy of its module's dictionary is squirreled away. When the same extension is imported by another (sub-)interpreter, a new module is initialized and filled with the contents of this copy; the extension's ``init`` function is not called. Objects in the module's dictionary thus end up shared across (sub-)interpreters, which might cause unwanted behavior (see `Bugs and caveats`_ below)."
msgstr "برای ماژولهایی که از :ref:`مقداردهی اولیه تکفازی <single-phase-initialization>` قدیمی استفاده میکنند، مانند :c:func:`PyModule_Create`، اولین باری که یک ماژول توسعهای خاص ایمپورت میشود، بهطور عادی مقداردهی اولیه میشود و یک کپی (سطحی) از دیکشنری ماژول آن ذخیره میشود. وقتی همان ماژول توسعهای توسط (زیر)مفسر دیگری ایمپورت میشود، یک ماژول جدید مقداردهی اولیه میشود و با محتویات این کپی پر میشود؛ تابع ``init`` ماژول توسعهای فراخوانی نمیشود. بنابراین، اشیاء موجود در دیکشنری ماژول در نهایت میان (زیر)مفسرها به اشتراک گذاشته میشوند، که ممکن است باعث رفتار ناخواسته شود (به `باگها و هشدارها`_ در ادامه مراجعه کنید)."
msgid "Note that this is different from what happens when an extension is imported after the interpreter has been completely re-initialized by calling :c:func:`Py_FinalizeEx` and :c:func:`Py_Initialize`; in that case, the extension's ``initmodule`` function *is* called again. As with multi-phase initialization, this means that only C-level static and global variables are shared between these modules."
msgstr "توجه داشته باشید که این مورد با آنچه هنگام ایمپورت شدن یک ماژول توسعهای پس از بازمقداردهی اولیهی کامل مفسر از طریق فراخوانی :c:func:`Py_FinalizeEx` و :c:func:`Py_Initialize` رخ میدهد، متفاوت است؛ در آن صورت، تابع ``initmodule`` ماژول توسعهای *دوباره* فراخوانی میشود. مانند مقداردهی اولیهی چندمرحلهای، این بدان معناست که تنها متغیرهای ایستا و سراسری در سطح C بین این ماژولها مشترک هستند."
msgid "Create a new sub-interpreter. This is essentially just a wrapper around :c:func:`Py_NewInterpreterFromConfig` with a config that preserves the existing behavior. The result is an unisolated sub-interpreter that shares the main interpreter's GIL, allows fork/exec, allows daemon threads, and allows single-phase init modules."
msgstr "یک زیرمفسر (sub-interpreter) جدید ایجاد کنید. این در اصل صرفاً پوششی در اطراف :c:func:`Py_NewInterpreterFromConfig` با پیکربندیای است که رفتار موجود را حفظ میکند. نتیجه، یک زیرمفسر غیرمجزا (unisolated) است که قفل مفسر سراسری (GIL) را با مفسر اصلی به اشتراک میگذارد، اجازهی fork/exec را میدهد، اجازهی نخهای دِیمِن را میدهد و اجازهی ماژولهای مقداردهی اولیهی تکفازی (single-phase init) را میدهد."
msgid "Destroy the (sub-)interpreter represented by the given :term:`thread state`. The given thread state must be :term:`attached <attached thread state>`. When the call returns, there will be no :term:`attached thread state`. All thread states associated with this interpreter are destroyed."
msgstr "(زیر)مفسری را نابود میکند که :term:`وضعیت نخ <thread state>` دادهشده آن را نمایندگی میکند. وضعیت نخ دادهشده باید :term:`متصل <attached thread state>` باشد. هنگامی که فراخوانی بازگردد، هیچ :term:`وضعیت نخ متصل <attached thread state>` وجود نخواهد داشت. تمام وضعیتهای نخ مرتبط با این مفسر نابود میشوند."
msgid ":c:func:`Py_FinalizeEx` will destroy all sub-interpreters that haven't been explicitly destroyed at that point."
msgstr ":c:func:`Py_FinalizeEx` تمام زیرمفسرهایی را که تا آن لحظه بهطور صریح نابود نشدهاند، از بین میبرد."
msgid "A per-interpreter GIL"
msgstr "قفل مفسر سراسری (GIL) بهازای هر مفسر"
msgid "Using :c:func:`Py_NewInterpreterFromConfig` you can create a sub-interpreter that is completely isolated from other interpreters, including having its own GIL. The most important benefit of this isolation is that such an interpreter can execute Python code without being blocked by other interpreters or blocking any others. Thus a single Python process can truly take advantage of multiple CPU cores when running Python code. The isolation also encourages a different approach to concurrency than that of just using threads. (See :pep:`554` and :pep:`684`.)"
msgstr "با استفاده از :c:func:`Py_NewInterpreterFromConfig` میتوانید یک زیرمفسر ایجاد کنید که بهطور کامل از سایر مفسرها جداشده باشد، از جمله با داشتن قفل مفسر سراسری مخصوص به خود. مهمترین مزیت این جداسازی این است که چنین مفسری میتواند بدون مسدود شدن توسط مفسرهای دیگر و بدون مسدود کردن هیچ مفسر دیگری، کد پایتون را اجرا کند. بدین ترتیب، یک فرایند پایتون واحد میتواند هنگام اجرای کد پایتون واقعاً از چندین هستهی CPU بهره ببرد. این جداسازی همچنین بهجای صرفاً استفاده از نخها، رویکردی متفاوت به همزمانی را ترغیب میکند. (به :pep:`554` و :pep:`684` مراجعه کنید.)"
msgid "Using an isolated interpreter requires vigilance in preserving that isolation. That especially means not sharing any objects or mutable state without guarantees about thread-safety. Even objects that are otherwise immutable (e.g. ``None``, ``(1, 5)``) can't normally be shared because of the refcount. One simple but less-efficient approach around this is to use a global lock around all use of some state (or object). Alternately, effectively immutable objects (like integers or strings) can be made safe in spite of their refcounts by making them :term:`immortal`. In fact, this has been done for the builtin singletons, small integers, and a number of other builtin objects."
msgstr "استفاده از مفسر مجزا نیازمند هوشیاری در حفظ آن جداسازی است. این بهویژه به آن معناست که هیچ شیئی یا وضعیت تغییرپذیری را نباید بدون تضمینهایی دربارهی نخایمنی به اشتراک گذاشت. حتی اشیائی که در سایر جهات تغییرناپذیرند (مانند ``None`` و ``(1, 5)``) بهطور معمول نمیتوانند به دلیل شمارش ارجاع به اشتراک گذاشته شوند. یک راهحل ساده اما کمکارآمدتر برای این مسئله، استفاده از یک قفل سراسری در پیرامون تمامی استفادهها از یک وضعیت (یا شیء) است. بهطور جایگزین، اشیاء عملاً تغییرناپذیر (مانند اعداد صحیح یا رشتهها) را میتوان با وجود شمارش ارجاعشان، از طریق :term:`نامیرا <immortal>` کردن آنها ایمن ساخت. در واقع، این کار برای تکنمونههای توکار، اعداد صحیح کوچک و تعدادی از اشیاء توکار دیگر انجام شده است."
msgid "If you preserve isolation then you will have access to proper multi-core computing without the complications that come with free-threading. Failure to preserve isolation will expose you to the full consequences of free-threading, including races and hard-to-debug crashes."
msgstr "اگر جداسازی را حفظ کنید، به محاسبات چندهستهای واقعی بدون پیچیدگیهایی که با نخبندی آزاد همراه هستند دسترسی خواهید داشت. در صورت عدم حفظ جداسازی، با تمام پیامدهای نخبندی آزاد از جمله رقابتها و فروپاشیهایی که اشکالزدایی آنها دشوار است روبهرو خواهید شد."
msgid "Aside from that, one of the main challenges of using multiple isolated interpreters is how to communicate between them safely (not break isolation) and efficiently. The runtime and stdlib do not provide any standard approach to this yet. A future stdlib module would help mitigate the effort of preserving isolation and expose effective tools for communicating (and sharing) data between interpreters."
msgstr "علاوه بر این، یکی از چالشهای اصلی استفاده از چندین مفسر جداشده این است که چگونه میتوان بهطور امن (بدون بر هم زدن جداسازی) و کارآمد بین آنها ارتباط برقرار کرد. رانتایم و کتابخانه استاندارد هنوز هیچ رویکرد استانداردی برای این کار ارائه نمیدهند. یک ماژول آینده در کتابخانه استاندارد میتواند به کاهش تلاش لازم برای حفظ جداسازی کمک کند و ابزارهای مؤثری برای ارتباط (و اشتراکگذاری) دادهها بین مفسرها در اختیار بگذارد."
msgid "Bugs and caveats"
msgstr "اشکالها و هشدارها"
msgid "Because sub-interpreters (and the main interpreter) are part of the same process, the insulation between them isn't perfect --- for example, using low-level file operations like :func:`os.close` they can (accidentally or maliciously) affect each other's open files. Because of the way extensions are shared between (sub-)interpreters, some extensions may not work properly; this is especially likely when using single-phase initialization or (static) global variables. It is possible to insert objects created in one sub-interpreter into a namespace of another (sub-)interpreter; this should be avoided if possible."
msgstr "از آنجا که زیرمفسرها (و مفسر اصلی) بخشی از یک فرایند واحد هستند، جداسازی میان آنها بینقص نیست --- برای مثال، با استفاده از عملیاتهای سطح پایین پرونده مانند :func:`os.close` میتوانند (بهطور تصادفی یا خرابکارانه) بر پروندههای باز یکدیگر تأثیر بگذارند. به دلیل نحوهی اشتراکگذاری ماژولهای توسعهای میان (زیر)مفسرها، ممکن است برخی از ماژولهای توسعهای بهدرستی کار نکنند؛ احتمال این امر بهویژه هنگام استفاده از مقداردهی اولیهی تکفازی یا متغیرهای سراسری (ایستا) بیشتر است. میتوان اشیایی را که در یک زیرمفسر ایجاد شدهاند، در فضای نام (زیر)مفسر دیگری قرار داد؛ بهتر است در صورت امکان از این کار پرهیز شود."
msgid "Special care should be taken to avoid sharing user-defined functions, methods, instances or classes between sub-interpreters, since import operations executed by such objects may affect the wrong (sub-)interpreter's dictionary of loaded modules. It is equally important to avoid sharing objects from which the above are reachable."
msgstr "باید با دقت ویژه از اشتراکگذاری توابع، متدها، نمونهها یا کلاسهای تعریفشده توسط کاربر بین زیرمفسرها جلوگیری شود، زیرا عملیات ایمپورت که توسط چنین اشیایی اجرا میشوند، ممکن است بر دیکشنری ماژولهای بارگذاریشدهی (زیر)مفسر اشتباه تأثیر بگذارد. به همان اندازه مهم است که از اشتراکگذاری اشیایی که موارد فوق از طریق آنها قابل دسترسیاند، جلوگیری شود."
msgid "Also note that combining this functionality with ``PyGILState_*`` APIs is delicate, because these APIs assume a bijection between Python thread states and OS-level threads, an assumption broken by the presence of sub-interpreters. It is highly recommended that you don't switch sub-interpreters between a pair of matching :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release` calls. Furthermore, extensions (such as :mod:`ctypes`) using these APIs to allow calling of Python code from non-Python created threads will probably be broken when using sub-interpreters."
msgstr "همچنین توجه داشته باشید که ترکیب این قابلیت با APIهای ``PyGILState_*`` امری حساس است، زیرا این APIها تناظر یکبهیک بین وضعیتهای نخ پایتون و نخهای سطح سیستمعامل را فرض میکنند؛ فرضی که با وجود زیرمفسرها نقض میشود. قویاً توصیه میشود که زیرمفسرها را بین یک جفت فراخوانی متناظر :c:func:`PyGILState_Ensure` و :c:func:`PyGILState_Release` عوض نکنید. علاوه بر این، ماژولهای توسعهای (مانند :mod:`ctypes`) که از این APIها برای فراهم کردن امکان فراخوانی کد پایتون از نخهایی که توسط پایتون ایجاد نشدهاند استفاده میکنند، احتمالاً هنگام استفاده از زیرمفسرها از کار میافتند."
msgid "High-level APIs"
msgstr "APIهای سطحبالا"
msgid "This data structure represents the state shared by a number of cooperating threads. Threads belonging to the same interpreter share their module administration and a few other internal items. There are no public members in this structure."
msgstr "این ساختار داده وضعیت مشترک بین تعدادی از نخهای همکاریکننده را نشان میدهد. نخهایی که به یک مفسر واحد تعلق دارند، مدیریت ماژول خود و چند مورد داخلی دیگر را به اشتراک میگذارند. در این ساختار هیچ عضو عمومی وجود ندارد."
msgid "Threads belonging to different interpreters initially share nothing, except process state like available memory, open file descriptors and such. The global interpreter lock is also shared by all threads, regardless of to which interpreter they belong."
msgstr "نخهای متعلق به مفسرهای مختلف در ابتدا هیچ چیزی را به اشتراک نمیگذارند، بهجز وضعیت فرایند مانند حافظهی در دسترس، توصیفگرهای پروندهی باز و مواردی از این دست. قفل مفسر سراسری نیز میان همهی نخها مشترک است، صرفنظر از اینکه به کدام مفسر تعلق دارند."
msgid ":pep:`684` introduced the possibility of a :ref:`per-interpreter GIL <per-interpreter-gil>`. See :c:func:`Py_NewInterpreterFromConfig`."
msgstr ":pep:`684` امکان :ref:`قفل مفسر سراسری برای هر مفسر <per-interpreter-gil>` را معرفی کرد. :c:func:`Py_NewInterpreterFromConfig` را ببینید."
msgid "Get the current interpreter."
msgstr "مفسر جاری را برمیگرداند."
msgid "Issue a fatal error if there is no :term:`attached thread state`. It cannot return NULL."
msgstr "اگر :term:`attached thread state` وجود نداشته باشد، خطای مهلک صادر میکند. این تابع نمیتواند NULL را بازگرداند."
msgid "Return the interpreter's unique ID. If there was any error in doing so then ``-1`` is returned and an error is set."
msgstr "شناسه یکتای مفسر را برمیگرداند. اگر در انجام این کار خطایی رخ دهد، ``-1`` برگردانده میشود و خطا تنظیم میشود."
msgid "The caller must have an :term:`attached thread state`."
msgstr "فراخوانکننده باید یک :term:`attached thread state` داشته باشد."
msgid "Return a dictionary in which interpreter-specific data may be stored. If this function returns ``NULL`` then no exception has been raised and the caller should assume no interpreter-specific dict is available."
msgstr "یک دیکشنری برمیگرداند که در آن میتوان دادههای خاص مفسر را ذخیره کرد. اگر این تابع ``NULL`` را برگرداند، هیچ استثنایی ایجاد نشده است و فراخواننده باید فرض کند که هیچ دیکشنری خاص مفسری در دسترس نیست."
msgid "This is not a replacement for :c:func:`PyModule_GetState()`, which extensions should use to store interpreter-specific state information."
msgstr "این جایگزینی برای :c:func:`PyModule_GetState()` نیست؛ ماژولهای توسعهای باید از آن برای ذخیرهسازی اطلاعات وضعیت مخصوص مفسر استفاده کنند."
msgid "The returned dictionary is borrowed from the interpreter and is valid until interpreter shutdown."
msgstr "دیکشنری برگرداندهشده از مفسر امانت گرفته شده است و تا زمان خاموش شدن مفسر معتبر است."
msgid "Type of a frame evaluation function."
msgstr "نوع یک تابع ارزیابی فریم."
msgid "The *throwflag* parameter is used by the ``throw()`` method of generators: if non-zero, handle the current exception."
msgstr "پارامتر *throwflag* توسط متد ``throw()`` تولیدگرها استفاده میشود: اگر ناصفر باشد، استثنای جاری مدیریت میشود."
msgid "The function now takes a *tstate* parameter."
msgstr "این تابع اکنون پارامتر *tstate* را میپذیرد."
msgid "The *frame* parameter changed from ``PyFrameObject*`` to ``_PyInterpreterFrame*``."
msgstr "پارامتر *frame* از ``PyFrameObject*`` به ``_PyInterpreterFrame*`` تغییر کرد."
msgid "Get the frame evaluation function."
msgstr "تابع ارزیابی فریم را دریافت کنید."
msgid "See the :pep:`523` \"Adding a frame evaluation API to CPython\"."
msgstr "به :pep:`523` «افزودن یک API ارزیابی فریم به سیپایتون» مراجعه کنید."
msgid "Set the frame evaluation function."
msgstr "تابع ارزیابی فریم را تنظیم میکند."
msgid "Low-level APIs"
msgstr "APIهای سطح پایین"
msgid "All of the following functions must be called after :c:func:`Py_Initialize`."
msgstr "تمام توابع زیر باید پس از :c:func:`Py_Initialize` فراخوانی شوند."
msgid ":c:func:`Py_Initialize()` now initializes the :term:`GIL` and sets an :term:`attached thread state`."
msgstr ":c:func:`Py_Initialize()` اکنون :term:`قفل مفسر سراسری <GIL>` را مقداردهی اولیه میکند و یک :term:`وضعیت نخ متصل <attached thread state>` تنظیم میکند."
msgid "Create a new interpreter state object. An :term:`attached thread state` is not needed, but may optionally exist if it is necessary to serialize calls to this function."
msgstr "یک شیء وضعیت مفسر جدید ایجاد میکند. نیازی به :term:`attached thread state` نیست، اما در صورت ضرورت سریالسازی فراخوانیهای این تابع، میتواند بهصورت اختیاری وجود داشته باشد."
msgid "Raises an :ref:`auditing event <auditing>` ``cpython.PyInterpreterState_New`` with no arguments."
msgstr "یک :ref:`رویداد حسابرسی <auditing>` ``cpython.PyInterpreterState_New`` را بدون هیچ آرگومانی ایجاد میکند."
msgid "Reset all information in an interpreter state object. There must be an :term:`attached thread state` for the interpreter."
msgstr "تمام اطلاعات در یک شیء وضعیت مفسر را بازنشانی میکند. باید یک :term:`attached thread state` برای مفسر وجود داشته باشد."
msgid "Raises an :ref:`auditing event <auditing>` ``cpython.PyInterpreterState_Clear`` with no arguments."
msgstr ":ref:`رویداد حسابرسی <auditing>` ``cpython.PyInterpreterState_Clear`` را بدون هیچ آرگومانی ایجاد میکند."
msgid "Destroy an interpreter state object. There **should not** be an :term:`attached thread state` for the target interpreter. The interpreter state must have been reset with a previous call to :c:func:`PyInterpreterState_Clear`."
msgstr "یک شیء وضعیت مفسر را نابود میکند. برای مفسر هدف **نباید** :term:`attached thread state` وجود داشته باشد. وضعیت مفسر باید پیشتر با فراخوانی :c:func:`PyInterpreterState_Clear` بازنشانی شده باشد."
msgid "Advanced debugger support"
msgstr "پشتیبانی از اشکالزدای پیشرفته"
msgid "These functions are only intended to be used by advanced debugging tools."
msgstr "این توابع تنها برای استفاده توسط ابزارهای پیشرفتهی اشکالزدایی در نظر گرفته شدهاند."
msgid "Return the interpreter state object at the head of the list of all such objects."
msgstr "شیء وضعیت مفسر در ابتدای فهرست همهی چنین اشیایی را بازمیگرداند."
msgid "Return the main interpreter state object."
msgstr "شیء وضعیت مفسر اصلی را برمیگرداند."
msgid "Return the next interpreter state object after *interp* from the list of all such objects."
msgstr "شیء وضعیت مفسرِ بعدی پس از *interp* را از فهرست همهی چنین اشیایی برمیگرداند."
msgid "Return the pointer to the first :c:type:`PyThreadState` object in the list of threads associated with the interpreter *interp*."
msgstr "اشارهگر به نخستین شیء :c:type:`PyThreadState` در فهرست نخهای مرتبط با مفسر *interp* را برمیگرداند."
msgid "Return the next thread state object after *tstate* from the list of all such objects belonging to the same :c:type:`PyInterpreterState` object."
msgstr "شیء وضعیت نخ بعدی را پس از *tstate* از فهرست همهی اشیاء از این دست که به همان شیء :c:type:`PyInterpreterState` تعلق دارند، برمیگرداند."
msgid "module"
msgstr "ماژول"
msgid "builtins"
msgstr "builtins"
msgid "__main__"
msgstr "__main__"
msgid "sys"
msgstr "sys"
msgid "stdout (in module sys)"
msgstr "stdout (در ماژول sys)"
msgid "stderr (in module sys)"
msgstr "stderr (در ماژول sys)"
msgid "stdin (in module sys)"
msgstr "stdin (در ماژول sys)"
msgid "Py_FinalizeEx (C function)"
msgstr "Py_FinalizeEx (تابع C)"
msgid "Py_Initialize (C function)"
msgstr "Py_Initialize (تابع C)"
msgid "close (in module os)"
msgstr "close (در ماژول os)"