You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
msgid"Imports of the form ``from __future__ import feature`` are called :ref:`future statements <future>`. These are special-cased by the Python compiler to allow the use of new Python features in modules containing the future statement before the release in which the feature becomes standard."
33
33
msgstr""
34
+
"ایمپورتهایی به شکل ``from __future__ import feature``، :ref:"
35
+
"`future statements <future>` نامیده میشوند. این موارد توسط کامپایلر پایتون بهصورت ویژه "
36
+
"درنظر گرفته میشوند تا امکان استفاده از ویژگیهای جدید پایتون را در ماژولهایی "
37
+
"که شامل دستور آینده هستند، قبل از نسخهای که آن ویژگی بهصورت استاندارد درمیآید، "
38
+
"فراهم کنند."
34
39
35
40
msgid"While these future statements are given additional special meaning by the Python compiler, they are still executed like any other import statement and the :mod:`!__future__` exists and is handled by the import system the same way any other Python module would be. This design serves three purposes:"
36
41
msgstr""
42
+
"اگرچه این دستورات آیندهنگر بهواسطه کامپایلر پایتون معنای ویژهای پیدا میکنند، "
43
+
"اما همچنان مانند هر دستور ایمپورت دیگری اجرا میشوند. ماژول :mod:`!__future__` "
44
+
"وجود دارد و توسط سازوکار ایمپورت، دقیقاً مانند هر ماژول پایتون دیگری مدیریت میشود. "
45
+
"این طراحی سه هدف را دنبال میکند:"
37
46
38
47
msgid"To avoid confusing existing tools that analyze import statements and expect to find the modules they're importing."
39
48
msgstr""
49
+
"برای جلوگیری از سردرگمی ابزارهای موجود که دستورات ایمپورت را تحلیل میکنند و انتظار "
50
+
"دارند که ماژولهای مورد نظر خود را پیدا کنند."
40
51
41
52
msgid"To document when incompatible changes were introduced, and when they will be --- or were --- made mandatory. This is a form of executable documentation, and can be inspected programmatically via importing :mod:`!__future__` and examining its contents."
42
53
msgstr""
54
+
"برای مستندسازی زمان معرفی تغییرات ناسازگار و زمانی که "
55
+
"این تغییرات اجباری خواهند شد --- یا شدهاند، این نوعی مستندسازی قابلاجرا است، "
56
+
"و میتوان آن را بهصورت برنامهنویسی با ایمپورت کردن :mod:`!__future__` و "
57
+
"بررسی محتویات آن مشاهده کرد."
43
58
44
59
msgid"To ensure that :ref:`future statements <future>` run under releases prior to Python 2.1 at least yield runtime exceptions (the import of :mod:`!__future__` will fail, because there was no module of that name prior to 2.1)."
45
60
msgstr""
61
+
"برای اطمینان از اینکه :ref:`future statements <future>` در نسخههای پیش از "
62
+
"پایتون 2.1 حداقل استثناهای زمان اجرا ایجاد میکنند (ایمپورت کردن :mod:`!"
63
+
"__future__` با شکست مواجه خواهد شد، زیرا هیچ ماژولی با آن نام پیش از "
64
+
"نسخهی ۲.۱ وجود نداشته است)."
46
65
47
66
msgid"Module Contents"
48
-
msgstr""
67
+
msgstr"محتویات ماژول"
49
68
50
69
msgid"No feature description will ever be deleted from :mod:`!__future__`. Since its introduction in Python 2.1 the following features have found their way into the language using this mechanism:"
51
70
msgstr""
71
+
"هیچ توضیح ویژگیای هرگز از :mod:`!__future__` حذف نخواهد شد. از "
72
+
"زمان معرفی آن در پایتون ۲.۱، ویژگیهای زیر راه خود را "
73
+
"به این زبان با استفاده از این مکانیزم پیدا کردهاند:"
52
74
53
75
msgid"feature"
54
-
msgstr""
76
+
msgstr"ویژگی"
55
77
56
78
msgid"optional in"
57
-
msgstr""
79
+
msgstr"اختیاری در"
58
80
59
81
msgid"mandatory in"
60
-
msgstr""
82
+
msgstr"اجباری در"
61
83
62
84
msgid"effect"
63
-
msgstr""
85
+
msgstr"تأثیر"
64
86
65
87
msgid"2.1.0b1"
66
-
msgstr""
88
+
msgstr"2.1.0b1"
67
89
68
90
msgid"2.2"
69
-
msgstr""
91
+
msgstr"2.2"
70
92
71
93
msgid":pep:`227`: *Statically Nested Scopes*"
72
-
msgstr""
94
+
msgstr":pep:`227`: *محدودههای تو در تو ایستا*"
73
95
74
96
msgid"2.2.0a1"
75
-
msgstr""
97
+
msgstr"2.2.0a1"
76
98
77
99
msgid"2.3"
78
-
msgstr""
100
+
msgstr"2.3"
79
101
80
102
msgid":pep:`255`: *Simple Generators*"
81
-
msgstr""
103
+
msgstr":pep:`255`: *تولیدگرهای ساده*"
82
104
83
105
msgid"2.2.0a2"
84
-
msgstr""
106
+
msgstr"2.2.0a2"
85
107
86
108
msgid"3.0"
87
-
msgstr""
109
+
msgstr"3.0"
88
110
89
111
msgid":pep:`238`: *Changing the Division Operator*"
90
-
msgstr""
112
+
msgstr":pep:`238`: *تغییر عملگر تقسیم*"
91
113
92
114
msgid"2.5.0a1"
93
-
msgstr""
115
+
msgstr"2.5.0a1"
94
116
95
117
msgid":pep:`328`: *Imports: Multi-Line and Absolute/Relative*"
96
-
msgstr""
118
+
msgstr":pep:`328`: *ایمپورتها: چندخطی و مطلق/نسبی*"
97
119
98
120
msgid"2.6"
99
-
msgstr""
121
+
msgstr"2.6"
100
122
101
123
msgid":pep:`343`: *The “with” Statement*"
102
-
msgstr""
124
+
msgstr":pep:`343`: *دستور “with”*"
103
125
104
126
msgid"2.6.0a2"
105
-
msgstr""
127
+
msgstr"2.6.0a2"
106
128
107
129
msgid":pep:`3105`: *Make print a function*"
108
-
msgstr""
130
+
msgstr":pep:`3105`: *تبدیل print به یک تابع*"
109
131
110
132
msgid":pep:`3112`: *Bytes literals in Python 3000*"
111
-
msgstr""
133
+
msgstr":pep:`3112`: *لیترالهای بایت در پایتون ۳۰۰۰*"
msgid"where, normally, *OptionalRelease* is less than *MandatoryRelease*, and both are 5-tuples of the same form as :data:`sys.version_info`::"
140
166
msgstr""
167
+
"که در آن، بهطور معمول، *OptionalRelease* کوچکتر از *MandatoryRelease* است، و هر دو "
168
+
"تاپلهای ۵ عضوی به همان شکل :data:`sys.version_info` هستند::"
141
169
142
170
msgid""
143
171
"(PY_MAJOR_VERSION, # the 2 in 2.1.0a3; an int\n"
@@ -147,33 +175,58 @@ msgid ""
147
175
" PY_RELEASE_SERIAL # the 3; an int\n"
148
176
")"
149
177
msgstr""
178
+
"(PY_MAJOR_VERSION, # عدد 2 در 2.1.0a3؛ یک عدد صحیح\n"
179
+
" PY_MINOR_VERSION, # عدد 1؛ یک عدد صحیح\n"
180
+
" PY_MICRO_VERSION, # عدد 0؛ یک عدد صحیح\n"
181
+
" PY_RELEASE_LEVEL, # \"alpha\"، \"beta\"، \"candidate\" یا \"final\"؛ رشته\n"
182
+
" PY_RELEASE_SERIAL # عدد 3؛ یک عدد صحیح\n"
183
+
")"
150
184
151
185
msgid"*OptionalRelease* records the first release in which the feature was accepted."
152
186
msgstr""
187
+
"*OptionalRelease* اولین نسخهای را ثبت میکند که ویژگی در آن "
188
+
"پذیرفته شده است."
153
189
154
190
msgid"In the case of a *MandatoryRelease* that has not yet occurred, *MandatoryRelease* predicts the release in which the feature will become part of the language."
155
191
msgstr""
192
+
"در مورد *MandatoryRelease* که هنوز رخ نداده است، "
193
+
"*MandatoryRelease* نسخهای را پیشبینی میکند که ویژگی در آن "
194
+
"بخشی از زبان خواهد شد."
156
195
157
196
msgid"Else *MandatoryRelease* records when the feature became part of the language; in releases at or after that, modules no longer need a future statement to use the feature in question, but may continue to use such imports."
158
197
msgstr""
198
+
"در غیر این صورت، *MandatoryRelease* زمانی را ثبت میکند که ویژگی به بخشی از "
199
+
"زبان تبدیل شد؛ در نسخههای همان یا بعد از آن، ماژولها دیگر برای استفاده از "
200
+
"آن ویژگی نیازی به دستور future ندارند، اما میتوانند به استفاده از چنین "
201
+
"ایمپورتهایی ادامه دهند."
159
202
160
203
msgid"*MandatoryRelease* may also be ``None``, meaning that a planned feature got dropped or that it is not yet decided."
161
204
msgstr""
205
+
"*MandatoryRelease* همچنین میتواند ``None`` باشد، به این معنی که یک ویژگی برنامهریزیشده "
206
+
"حذف شده است یا اینکه هنوز تصمیمی دربارهی آن گرفته نشده است."
162
207
163
208
msgid"*CompilerFlag* is the (bitfield) flag that should be passed in the fourth argument to the built-in function :func:`compile` to enable the feature in dynamically compiled code. This flag is stored in the :attr:`_Feature.compiler_flag` attribute on :class:`_Feature` instances."
164
209
msgstr""
210
+
"*CompilerFlag* پرچم است که باید در آرگومان چهارم "
211
+
"به تابع داخلی :func:`compile` ارسال شود تا ویژگی را در "
212
+
"کد کامپایلشدهی پویا فعال کند. این پرچم در ویژگی :attr:`_Feature."
213
+
"compiler_flag` در نمونههای :class:`_Feature` ذخیره میشود."
165
214
166
215
msgid"``from __future__ import annotations`` was previously scheduled to become mandatory in Python 3.10, but the change was delayed and ultimately canceled. This feature will eventually be deprecated and removed. See :pep:`649` and :pep:`749`."
167
216
msgstr""
217
+
"``from __future__ import annotations`` قبلاً قرار بود در پایتون ۳.۱۰ "
218
+
"اجباری شود، اما این تغییر به تعویق افتاد و در نهایت "
219
+
"لغو شد. این ویژگی در نهایت منسوخ و حذف خواهد شد. برای اطلاعات بیشتر به :pep:"
220
+
"`649` و :pep:`749` مراجعه کنید."
168
221
169
222
msgid":ref:`future`"
170
-
msgstr""
223
+
msgstr":ref:`future`"
171
224
172
225
msgid"How the compiler treats future imports."
173
-
msgstr""
226
+
msgstr"نحوهی برخورد کامپایلر با ایمپورتهای future"
174
227
175
228
msgid":pep:`236` - Back to the __future__"
176
-
msgstr""
229
+
msgstr":pep:`236` - بازگشت به __future__"
177
230
178
231
msgid"The original proposal for the __future__ mechanism."
Copy file name to clipboardExpand all lines: library/__main__.po
+23-2Lines changed: 23 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -26,39 +26,60 @@ msgstr ""
26
26
27
27
msgid"In Python, the special name ``__main__`` is used for two important constructs:"
28
28
msgstr""
29
+
"در پایتون، از نام ویژهی ``__main__`` برای دو ساختار مهم "
30
+
"استفاده میشود:"
29
31
30
32
msgid"the name of the top-level environment of the program, which can be checked using the ``__name__ == '__main__'`` expression; and"
31
33
msgstr""
34
+
"نام محیط سطح بالای برنامه، که میتوان آن را با استفاده از عبارت "
35
+
"``__name__ == '__main__'`` بررسی کرد؛ و"
32
36
33
37
msgid"the ``__main__.py`` file in Python packages."
34
-
msgstr""
38
+
msgstr"فایل ``__main__.py`` در بستههای پایتون."
35
39
36
40
msgid"Both of these mechanisms are related to Python modules; how users interact with them and how they interact with each other. They are explained in detail below. If you're new to Python modules, see the tutorial section :ref:`tut-modules` for an introduction."
37
41
msgstr""
42
+
"هر دوی این مکانیزمها به ماژولهای پایتون مربوط میشوند: نحوهی تعامل کاربران "
43
+
"با آنها و نحوهی تعامل آنها با یکدیگر. این موارد در "
44
+
"زیر بهتفصیل توضیح داده شدهاند. اگر با ماژولهای پایتون تازهکار هستید، برای آشنایی به بخش آموزش :"
45
+
"ref:`tut-modules` مراجعه کنید."
38
46
39
47
msgid"``__name__ == '__main__'``"
40
-
msgstr""
48
+
msgstr"``__name__ == '__main__'``"
41
49
42
50
msgid"When a Python module or package is imported, ``__name__`` is set to the module's name. Usually, this is the name of the Python file itself without the ``.py`` extension::"
43
51
msgstr""
52
+
"هنگامی که یک ماژول یا بستهٔ پایتون ایمپورت میشود، ``__name__`` به "
53
+
"نام ماژول تنظیم میشود. معمولاً این همان نام فایل پایتون است بدون "
54
+
"پسوند ``.py``::"
44
55
45
56
msgid""
46
57
">>> import configparser\n"
47
58
">>> configparser.__name__\n"
48
59
"'configparser'"
49
60
msgstr""
61
+
">>> import configparser\n"
62
+
">>> configparser.__name__\n"
63
+
"'configparser'"
50
64
51
65
msgid"If the file is part of a package, ``__name__`` will also include the parent package's path::"
52
66
msgstr""
67
+
"اگر فایل بخشی از یک بسته باشد، ``__name__`` همچنین مسیر بستهٔ والد را "
68
+
"شامل خواهد شد::"
53
69
54
70
msgid""
55
71
">>> from concurrent.futures import process\n"
56
72
">>> process.__name__\n"
57
73
"'concurrent.futures.process'"
58
74
msgstr""
75
+
">>> from concurrent.futures import process\n"
76
+
">>> process.__name__\n"
77
+
"'concurrent.futures.process'"
59
78
60
79
msgid"However, if the module is executed in the top-level code environment, its ``__name__`` is set to the string ``'__main__'``."
61
80
msgstr""
81
+
"با این حال، اگر ماژول در محیط کد سطح بالا اجرا شود، "
82
+
"``__name__`` آن به رشتهی ``'__main__'`` تنظیم میشود."
62
83
63
84
msgid"What is the \"top-level code environment\"?"
0 commit comments