-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathasyncio-future.po
More file actions
286 lines (220 loc) · 19.8 KB
/
Copy pathasyncio-future.po
File metadata and controls
286 lines (220 loc) · 19.8 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
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001 Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# Rafael Fontenelle <[email protected]>, 2025
# Revisto <[email protected]>, 2025
# Sepehr Rasouli <[email protected]>, 2026
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3.14\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-09-16 12:56+0000\n"
"PO-Revision-Date: 2026-09-14 12:38+0330\n"
"Last-Translator: Sepehr Rasouli <[email protected]>, 2026\n"
"Language-Team: Persian (https://github.com/python/python-docs-fa/fa/)\n"
"Language: fa\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Poedit 3.6\n"
msgid "Futures"
msgstr "آیندهنماها (Futures)"
msgid "**Source code:** :source:`Lib/asyncio/futures.py`, :source:`Lib/asyncio/base_futures.py`"
msgstr "**کد منبع:** :source:`Lib/asyncio/futures.py`، :source:`Lib/asyncio/base_futures.py`"
msgid "*Future* objects are used to bridge **low-level callback-based code** with high-level async/await code."
msgstr "اشیای *Future* برای پیوند دادن **کد سطحپایین مبتنی بر کالبک** با کد سطحبالای ناهمگام/await استفاده میشوند."
msgid "Future Functions"
msgstr "توابع آیندهنما"
msgid "Return ``True`` if *obj* is either of:"
msgstr "اگر *obj* یکی از موارد زیر باشد، ``True`` را برمیگرداند:"
msgid "an instance of :class:`asyncio.Future`,"
msgstr "نمونهای از :class:`asyncio.Future`،"
msgid "an instance of :class:`asyncio.Task`,"
msgstr "نمونهای از :class:`asyncio.Task`،"
msgid "a Future-like object with a ``_asyncio_future_blocking`` attribute."
msgstr "یک شیء شبیه به Future با ویژگی ``_asyncio_future_blocking``."
msgid "Return:"
msgstr "بازگشت:"
msgid "*obj* argument as is, if *obj* is a :class:`Future`, a :class:`Task`, or a Future-like object (:func:`isfuture` is used for the test.)"
msgstr "آرگومان *obj* را همانگونه که هست، اگر *obj* یک :class:`Future`، یک :class:`Task`، یا یک شیء شبیه Future باشد (برای آزمون از :func:`isfuture` استفاده میشود.)"
msgid "a :class:`Task` object wrapping *obj*, if *obj* is a coroutine (:func:`iscoroutine` is used for the test); in this case the coroutine will be scheduled by ``ensure_future()``."
msgstr "یک شیء :class:`Task` که *obj* را در بر میگیرد، اگر *obj* یک همروال باشد (برای آزمون از :func:`iscoroutine` استفاده میشود)؛ در این حالت، همروال توسط ``ensure_future()`` زمانبندی خواهد شد."
msgid "a :class:`Task` object that would await on *obj*, if *obj* is an awaitable (:func:`inspect.isawaitable` is used for the test.)"
msgstr "یک شیء :class:`Task` که اگر *obj* قابل await (awaitable) باشد، روی *obj* await میکند (برای بررسی از :func:`inspect.isawaitable` استفاده میشود.)"
msgid "If *obj* is neither of the above a :exc:`TypeError` is raised."
msgstr "اگر *obj* هیچکدام از موارد بالا نباشد، یک :exc:`TypeError` پرتاب میشود."
msgid "Save a reference to the result of this function, to avoid a task disappearing mid-execution."
msgstr "برای جلوگیری از ناپدید شدن یک وظیفه در میانهی اجرا، ارجاعی به نتیجهی این تابع ذخیره کنید."
msgid "See also the :func:`create_task` function which is the preferred way for creating new tasks or use :class:`asyncio.TaskGroup` which keeps reference to the task internally."
msgstr "همچنین تابع :func:`create_task` را ببینید که روش ترجیحی برای ایجاد وظایف جدید است، یا از :class:`asyncio.TaskGroup` استفاده کنید که ارجاعی به وظیفه را بهصورت داخلی نگه میدارد."
msgid "The function accepts any :term:`awaitable` object."
msgstr "این تابع هر شیء :term:`awaitable` را میپذیرد."
msgid "Deprecation warning is emitted if *obj* is not a Future-like object and *loop* is not specified and there is no running event loop."
msgstr "اگر *obj* یک شیء شبهآیندهنما نباشد و *loop* مشخص نشده باشد و هیچ حلقه رویدادی در حال اجرا وجود نداشته باشد، هشدار از رده خارج شدن نشان داده میشود."
msgid "Wrap a :class:`concurrent.futures.Future` object in a :class:`asyncio.Future` object."
msgstr "یک شیء :class:`concurrent.futures.Future` را در یک شیء :class:`asyncio.Future` قرار دهید."
msgid "Deprecation warning is emitted if *future* is not a Future-like object and *loop* is not specified and there is no running event loop."
msgstr "اگر *future* یک شیء شبهآیندهنما نباشد و *loop* تعیین نشده باشد و هیچ حلقه رویداد در حال اجرا وجود نداشته باشد، هشدار از رده خارج شدن نشان داده میشود."
msgid "Future Object"
msgstr "شیء Future"
msgid "A Future represents an eventual result of an asynchronous operation. Not thread-safe."
msgstr "یک Future نتیجه نهایی یک عملیات ناهمگام را نشان میدهد. ایمن نسبت به نخ نیست."
msgid "Future is an :term:`awaitable` object. Coroutines can await on Future objects until they either have a result or an exception set, or until they are cancelled. A Future can be awaited multiple times and the result is same."
msgstr "Future یک شیء :term:`awaitable` است. همروالها میتوانند اشیاء Future را تا زمانی که یا نتیجه یا استثنا برای آنها تنظیم شده باشد، یا تا زمانی که لغو شوند، await کنند. یک Future را میتوان چندین بار await کرد و نتیجه یکسان است."
msgid "Typically Futures are used to enable low-level callback-based code (e.g. in protocols implemented using asyncio :ref:`transports <asyncio-transports-protocols>`) to interoperate with high-level async/await code."
msgstr "بهطور معمول از Futures استفاده میشود تا امکان تعامل کد سطح پایین مبتنی بر کالبک (برای مثال، در پروتکلهایی که با استفاده از :ref:`transports <asyncio-transports-protocols>` asyncio پیادهسازی شدهاند) با کد سطح بالای async/await فراهم شود."
msgid "The rule of thumb is to never expose Future objects in user-facing APIs, and the recommended way to create a Future object is to call :meth:`loop.create_future`. This way alternative event loop implementations can inject their own optimized implementations of a Future object."
msgstr "قاعده سرانگشتی این است که هرگز اشیای Future را در APIهای رو به کاربر در معرض قرار ندهید، و روش توصیهشده برای ایجاد یک شیء Future، فراخوانی :meth:`loop.create_future` است. به این ترتیب، پیادهسازیهای جایگزین حلقه رویداد میتوانند پیادهسازیهای بهینهشده خود از شیء Future را تزریق کنند."
msgid "Futures are :ref:`generic <generics>` over the type of their results."
msgstr "Futures نسبت به نوع نتایج خود :ref:`عام <generics>` هستند."
msgid "Added support for the :mod:`contextvars` module."
msgstr "پشتیبانی از ماژول :mod:`contextvars` افزوده شد."
msgid "Deprecation warning is emitted if *loop* is not specified and there is no running event loop."
msgstr "اگر *loop* مشخصنشده باشد و هیچ حلقه رویدادی در حال اجرا وجود نداشته باشد، هشدار از رده خارج شدن نشان داده میشود."
msgid "Return the result of the Future."
msgstr "نتیجهی Future را برمیگرداند."
msgid "If the Future is *done* and has a result set by the :meth:`set_result` method, the result value is returned."
msgstr "اگر Future *انجامشده* باشد و نتیجهای از طریق متد :meth:`set_result` برای آن تنظیم شده باشد، مقدار نتیجه برگردانده میشود."
msgid "If the Future is *done* and has an exception set by the :meth:`set_exception` method, this method raises the exception."
msgstr "اگر Future *انجامشده* باشد و استثنایی توسط متد :meth:`set_exception` برای آن تنظیم شده باشد، این متد آن استثنا را پرتاب میکند."
msgid "If the Future has been *cancelled*, this method raises a :exc:`CancelledError` exception."
msgstr "اگر Future *لغوشده* باشد، این متد یک استثنای :exc:`CancelledError` پرتاب میکند."
msgid "If the Future's result isn't yet available, this method raises an :exc:`InvalidStateError` exception."
msgstr "اگر نتیجهی Future هنوز در دسترس نباشد، این متد استثانای :exc:`InvalidStateError` را پرتاب میکند."
msgid "Mark the Future as *done* and set its result."
msgstr "Future را بهعنوان *انجامشده* علامتگذاری میکند و نتیجهی آن را تنظیم میکند."
msgid "Raises an :exc:`InvalidStateError` error if the Future is already *done*."
msgstr "اگر Future از قبل *انجامشده* باشد، خطای :exc:`InvalidStateError` را پرتاب میکند."
msgid "Mark the Future as *done* and set an exception."
msgstr "Future را بهعنوان *done* علامتگذاری میکند و یک استثنا تنظیم میکند."
msgid "Return ``True`` if the Future is *done*."
msgstr "اگر Future *انجامشده* باشد، ``True`` برمیگرداند."
msgid "A Future is *done* if it was *cancelled* or if it has a result or an exception set with :meth:`set_result` or :meth:`set_exception` calls."
msgstr "یک Future در صورتی *انجامشده* است که *لغوشده* باشد یا نتیجه یا استثنایی با فراخوانیهای :meth:`set_result` یا :meth:`set_exception` روی آن تنظیمشده باشد."
msgid "Return ``True`` if the Future was *cancelled*."
msgstr "اگر Future *لغوشده* باشد، ``True`` را برمیگرداند."
msgid "The method is usually used to check if a Future is not *cancelled* before setting a result or an exception for it::"
msgstr "این متد معمولاً برای بررسی این استفاده میشود که یک Future پیش از تنظیم نتیجه یا استثنا برای آن *لغونشده* باشد::"
msgid ""
"if not fut.cancelled():\n"
" fut.set_result(42)"
msgstr ""
"if not fut.cancelled():\n"
" fut.set_result(42)"
msgid "Add a callback to be run when the Future is *done*."
msgstr "یک کالبک اضافه کنید تا هنگامی که Future *انجامشده* است اجرا شود."
msgid "The *callback* is called with the Future object as its only argument."
msgstr "*کالبک* با شیء Future بهعنوان تنها آرگومان آن فراخوانی میشود."
msgid "If the Future is already *done* when this method is called, the callback is scheduled with :meth:`loop.call_soon`."
msgstr "اگر Future در زمان فراخوانی این متد از قبل *انجامشده* باشد، کالبک با :meth:`loop.call_soon` زمانبندی میشود."
msgid "An optional keyword-only *context* argument allows specifying a custom :class:`contextvars.Context` for the *callback* to run in. The current context is used when no *context* is provided."
msgstr "یک آرگومان *context* اختیاری و فقط کلیدواژهای به شما امکان میدهد یک :class:`contextvars.Context` سفارشی را مشخص کنید تا *callback* در آن اجرا شود. هنگامی که *context* ارائه نشود، از زمینهی کنونی استفاده میشود."
msgid ":func:`functools.partial` can be used to pass parameters to the callback, e.g.::"
msgstr "میتوان از :func:`functools.partial` برای ارسال پارامترها به کالبک استفاده کرد، برای مثال::"
msgid ""
"# Call 'print(\"Future:\", fut)' when \"fut\" is done.\n"
"fut.add_done_callback(\n"
" functools.partial(print, \"Future:\"))"
msgstr ""
"# Call 'print(\"Future:\", fut)' when \"fut\" is done.\n"
"fut.add_done_callback(\n"
" functools.partial(print, \"Future:\"))"
msgid "The *context* keyword-only parameter was added. See :pep:`567` for more details."
msgstr "پارامتر *context* که فقط کلیدواژهای است، اضافه شد. برای جزئیات بیشتر، :pep:`567` را ببینید."
msgid "Remove *callback* from the callbacks list."
msgstr "*callback* را از فهرست کالبکها حذف کنید."
msgid "Returns the number of callbacks removed, which is typically 1, unless a callback was added more than once."
msgstr "تعداد کالبکهای حذفشده را برمیگرداند، که معمولاً ۱ است، مگر اینکه یک کالبک بیش از یک بار افزوده شده باشد."
msgid "Cancel the Future and schedule callbacks."
msgstr "Future را لغو میکند و کالبکها را زمانبندی میکند."
msgid "If the Future is already *done* or *cancelled*, return ``False``. Otherwise, change the Future's state to *cancelled*, schedule the callbacks, and return ``True``."
msgstr "اگر Future از قبل *done* یا *cancelled* باشد، ``False`` را برمیگرداند. در غیر این صورت، وضعیت Future را به *cancelled* تغییر میدهد، کالبکها را زمانبندی میکند و ``True`` را برمیگرداند."
msgid "The optional string argument *msg* is passed as the argument to the :exc:`CancelledError` exception raised when a cancelled Future is awaited."
msgstr "آرگومان اختیاری رشتهای *msg* بهعنوان آرگومان به استثنای :exc:`CancelledError` ارسال میشود؛ این استثنا هنگامی پرتاب میشود که یک Future لغوشده await شود."
msgid "Added the *msg* parameter."
msgstr "پارامتر *msg* افزوده شد."
msgid "Return the exception that was set on this Future."
msgstr "استثنایی را که روی این Future تنظیم شده است، برمیگرداند."
msgid "The exception (or ``None`` if no exception was set) is returned only if the Future is *done*."
msgstr "استثنا (یا ``None`` اگر استثنایی تنظیم نشده باشد) تنها در صورتی برگردانده میشود که Future *انجامشده* باشد."
msgid "If the Future isn't *done* yet, this method raises an :exc:`InvalidStateError` exception."
msgstr "اگر Future هنوز *انجامشده* نیست، این متد استثنای :exc:`InvalidStateError` را پرتاب میکند."
msgid "Return the event loop the Future object is bound to."
msgstr "حلقه رویدادی را که شیء Future به آن متصل است، برمیگرداند."
msgid "This example creates a Future object, creates and schedules an asynchronous Task to set result for the Future, and waits until the Future has a result::"
msgstr "این مثال یک شیء Future ایجاد میکند، یک Task ناهمگام را ایجاد و زمانبندی میکند تا نتیجه را برای Future تنظیم کند، و منتظر میماند تا Future نتیجه داشته باشد::"
msgid ""
"async def set_after(fut, delay, value):\n"
" # Sleep for *delay* seconds.\n"
" await asyncio.sleep(delay)\n"
"\n"
" # Set *value* as a result of *fut* Future.\n"
" fut.set_result(value)\n"
"\n"
"async def main():\n"
" # Get the current event loop.\n"
" loop = asyncio.get_running_loop()\n"
"\n"
" # Create a new Future object.\n"
" fut = loop.create_future()\n"
"\n"
" # Run \"set_after()\" coroutine in a parallel Task.\n"
" # We are using the low-level \"loop.create_task()\" API here because\n"
" # we already have a reference to the event loop at hand.\n"
" # Otherwise we could have just used \"asyncio.create_task()\".\n"
" loop.create_task(\n"
" set_after(fut, 1, '... world'))\n"
"\n"
" print('hello ...')\n"
"\n"
" # Wait until *fut* has a result (1 second) and print it.\n"
" print(await fut)\n"
"\n"
"asyncio.run(main())"
msgstr ""
"async def set_after(fut, delay, value):\n"
" # Sleep for *delay* seconds.\n"
" await asyncio.sleep(delay)\n"
"\n"
" # Set *value* as a result of *fut* Future.\n"
" fut.set_result(value)\n"
"\n"
"async def main():\n"
" # Get the current event loop.\n"
" loop = asyncio.get_running_loop()\n"
"\n"
" # Create a new Future object.\n"
" fut = loop.create_future()\n"
"\n"
" # Run \"set_after()\" coroutine in a parallel Task.\n"
" # We are using the low-level \"loop.create_task()\" API here because\n"
" # we already have a reference to the event loop at hand.\n"
" # Otherwise we could have just used \"asyncio.create_task()\".\n"
" loop.create_task(\n"
" set_after(fut, 1, '... world'))\n"
"\n"
" print('hello ...')\n"
"\n"
" # Wait until *fut* has a result (1 second) and print it.\n"
" print(await fut)\n"
"\n"
"asyncio.run(main())"
msgid "The Future object was designed to mimic :class:`concurrent.futures.Future`. Key differences include:"
msgstr "شیء Future بهگونهای طراحی شده است که از :class:`concurrent.futures.Future` تقلید کند. تفاوتهای اصلی عبارتند از:"
msgid "unlike asyncio Futures, :class:`concurrent.futures.Future` instances cannot be awaited."
msgstr "برخلاف Futureهای asyncio، نمونههای :class:`concurrent.futures.Future` را نمیتوان await کرد."
msgid ":meth:`asyncio.Future.result` and :meth:`asyncio.Future.exception` do not accept the *timeout* argument."
msgstr ":meth:`asyncio.Future.result` و :meth:`asyncio.Future.exception` آرگومان *timeout* را نمیپذیرند."
msgid ":meth:`asyncio.Future.result` and :meth:`asyncio.Future.exception` raise an :exc:`InvalidStateError` exception when the Future is not *done*."
msgstr ":meth:`asyncio.Future.result` و :meth:`asyncio.Future.exception` زمانی که Future *انجامشده* نباشد، استثنای :exc:`InvalidStateError` را پرتاب میکنند."
msgid "Callbacks registered with :meth:`asyncio.Future.add_done_callback` are not called immediately. They are scheduled with :meth:`loop.call_soon` instead."
msgstr "کالبکهای ثبتشده با :meth:`asyncio.Future.add_done_callback` بلافاصله فراخوانی نمیشوند. در عوض، با :meth:`loop.call_soon` زمانبندی میشوند."
msgid "asyncio Future is not compatible with the :func:`concurrent.futures.wait` and :func:`concurrent.futures.as_completed` functions."
msgstr "Future در asyncio با توابع :func:`concurrent.futures.wait` و :func:`concurrent.futures.as_completed` سازگار نیست."
msgid ":meth:`asyncio.Future.cancel` accepts an optional ``msg`` argument, but :meth:`concurrent.futures.Future.cancel` does not."
msgstr ":meth:`asyncio.Future.cancel` یک آرگومان اختیاری ``msg`` را میپذیرد، اما :meth:`concurrent.futures.Future.cancel` نمیپذیرد."