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
{{ message }}
Repository navigation
Commit 8f54635
Browse filesBrowse the repository at this point in the historyBrowse files
"Language-Team: Persian (https://github.com/python/python-docs-fa/)\n"
@@ -218,6 +218,11 @@ msgstr "حالت فعلی ایمپورتهای تنبل را دریافت م
218
218
msgid"Return a :term:`strong reference` to the current lazy imports filter, or ``NULL`` if none exists. This function always succeeds."
219
219
msgstr"یک :term:`ارجاع قوی <strong reference>` به صافی ایمپورتهای تنبل فعلی، یا در صورت عدم وجود، ``NULL`` را برمیگرداند. این تابع همیشه موفق اجرا میشود."
220
220
221
+
#,fuzzy
222
+
#| msgid "Gets the current lazy imports mode."
223
+
msgid"Sets the current lazy imports mode."
224
+
msgstr"حالت فعلی ایمپورتهای تنبل را دریافت میکند."
"Language-Team: Persian (https://github.com/python/python-docs-fa/)\n"
@@ -108,7 +108,9 @@ msgstr "*file* یک :term:`path-like object` را میپذیرد."
108
108
msgid"The object returned by :func:`~dbm.open` supports the basic functionality of mutable :term:`mappings <mapping>`; keys and their corresponding values can be stored, retrieved, and deleted, and iteration, the :keyword:`in` operator and methods :meth:`!keys`, :meth:`!get`, :meth:`!setdefault` and :meth:`!clear` are available. The :meth:`!keys` method returns a list instead of a view object. The :meth:`!setdefault` method requires two arguments."
109
109
msgstr"شیء برگرداندهشده توسط :func:`~dbm.open`، از کارکرد پایهی :term:`نگاشتهای تغییرپذیر <mapping>` پشتیبانی میکند؛ کلیدها و مقدارهای متناظرشان میتوانند ذخیره، بازیابی و حذف شوند و پیمایش، عملگر :keyword:`in` و متدهای :meth:`!keys`، :meth:`!get`، :meth:`!setdefault` و :meth:`!clear` در دسترس هستند. متد :meth:`!keys` بهجای یک شیء نما، یک فهرست برمیگرداند. متد :meth:`!setdefault` به دو آرگومان نیاز دارد."
110
110
111
-
msgid"Key and values are always stored as :class:`bytes`. This means that when strings are used they are implicitly converted to the default encoding before being stored."
111
+
#,fuzzy
112
+
#| msgid "Key and values are always stored as :class:`bytes`. This means that when strings are used they are implicitly converted to the default encoding before being stored."
113
+
msgid"Key and values are always stored as :class:`bytes`. This means that when strings are used they are implicitly converted to the default encoding before being stored. For detailed information about accepted types, see :ref:`dbm-key-value-types`."
112
114
msgstr"کلید و مقادیر همیشه بهصورت :class:`bytes` ذخیره میشوند. این بدان معناست که وقتی از رشتهها استفاده میشود، آنها پیش از ذخیره شدن بهطور ضمنی به کدگذاری پیشفرض تبدیل میشوند."
113
115
114
116
msgid"These objects also support being used in a :keyword:`with` statement, which will automatically close them when done."
@@ -126,9 +128,85 @@ msgstr "حذف یک کلید از پایگاه دادهی فقطخواند
126
128
msgid":meth:`!clear` methods are now available for all :mod:`!dbm` backends."
127
129
msgstr"متدهای :meth:`!clear` اکنون برای تمام بکاندهای :mod:`!dbm` در دسترس هستند."
128
130
131
+
msgid"Key and value types"
132
+
msgstr""
133
+
134
+
msgid"The accepted types for keys and values vary by backend. Keys and values are handled the same way, except where noted below:"
135
+
msgstr""
136
+
137
+
msgid"**Traditional backends:**"
138
+
msgstr""
139
+
140
+
msgid":mod:`dbm.gnu` and :mod:`dbm.ndbm`: Accept :class:`str` and :class:`bytes` objects."
141
+
msgstr""
142
+
143
+
msgid":mod:`dbm.dumb`: Accepts :class:`str` and :class:`bytes` objects; :class:`bytearray` is acceptable as a value, but not as a key."
msgid"All keys and values are stored as :class:`bytes` objects in the database. When retrieving, you'll always get bytes back, regardless of the original type stored."
153
+
msgstr""
154
+
155
+
msgid"**Type conversion examples:**"
156
+
msgstr""
157
+
158
+
msgid"``db['key'] = 'string'`` stored as ``b'string'``"
159
+
msgstr""
160
+
161
+
msgid"``db['key'] = bytearray(b'data')`` stored as ``b'data'`` (:mod:`dbm.dumb` and :mod:`dbm.sqlite3` only)"
162
+
msgstr""
163
+
164
+
msgid"``db['key'] = 42`` stored as ``b'42'`` (:mod:`dbm.sqlite3` only)"
165
+
msgstr""
166
+
167
+
msgid"``db['key'] = 3.14`` stored as ``b'3.14'`` (:mod:`dbm.sqlite3` only)"
168
+
msgstr""
169
+
170
+
msgid"``db['key'] = True`` stored as ``b'1'`` (:mod:`dbm.sqlite3` only)"
171
+
msgstr""
172
+
173
+
msgid"``db['key'] = False`` stored as ``b'0'`` (:mod:`dbm.sqlite3` only)"
174
+
msgstr""
175
+
176
+
msgid"``db['key'] = memoryview(b'data')`` stored as ``b'data'`` (:mod:`dbm.sqlite3` only)"
177
+
msgstr""
178
+
179
+
msgid"``db['key'] = array.array('i', [1, 2, 3])`` stored as bytes (for example, on little-endian: ``b'\\x01\\x00\\x00\\x00\\x02\\x00\\x00\\x00\\x03\\x00\\x00\\x00'``) (:mod:`dbm.sqlite3` only)"
180
+
msgstr""
181
+
129
182
msgid"The following example records some hostnames and a corresponding title, and then prints out the contents of the database::"
130
183
msgstr"مثال زیر چند نام میزبان و یک عنوان متناظر را ثبت میکند، و سپس محتویات پایگاه داده را چاپ میکند::"
131
184
185
+
#,fuzzy
186
+
#| msgid ""
187
+
#| "import dbm\n"
188
+
#| "\n"
189
+
#| "# Open database, creating it if necessary.\n"
190
+
#| "with dbm.open('cache', 'c') as db:\n"
191
+
#| "\n"
192
+
#| " # Record some values\n"
193
+
#| " db[b'hello'] = b'there'\n"
194
+
#| " db['www.python.org'] = 'Python Website'\n"
195
+
#| " db['www.cnn.com'] = 'Cable News Network'\n"
196
+
#| "\n"
197
+
#| " # Note that the keys are considered bytes now.\n"
"Language-Team: Persian (https://github.com/python/python-docs-fa/)\n"
@@ -134,7 +134,9 @@ msgstr "*charset* مجموعه نویسههای ورودی است و باید
134
134
msgid"Optional *header_enc* and *body_enc* is either ``charset.QP`` for quoted-printable, ``charset.BASE64`` for base64 encoding, ``charset.SHORTEST`` for the shortest of quoted-printable or base64 encoding, or ``None`` for no encoding. ``SHORTEST`` is only valid for *header_enc*. The default is ``None`` for no encoding."
135
135
msgstr"*header_enc* و *body_enc* اختیاری میتوانند یکی از مقادیر زیر باشند: ``charset.QP`` برای کدگذاری quoted-printable، ``charset.BASE64`` برای کدگذاری base64، ``charset.SHORTEST`` برای کوتاهترین حالت از کدگذاری quoted-printable یا base64، یا ``None`` برای بدون کدگذاری. ``SHORTEST`` فقط برای *header_enc* معتبر است. مقدار پیشفرض ``None`` برای بدون کدگذاری است."
136
136
137
-
msgid"Optional *output_charset* is the character set that the output should be in. Conversions will proceed from input charset, to Unicode, to the output charset when the method :meth:`Charset.convert` is called. The default is to output in the same character set as the input."
137
+
#,fuzzy
138
+
#| msgid "Optional *output_charset* is the character set that the output should be in. Conversions will proceed from input charset, to Unicode, to the output charset when the method :meth:`Charset.convert` is called. The default is to output in the same character set as the input."
139
+
msgid"Optional *output_charset* is the character set that the output should be in. Conversions will proceed from input charset, to Unicode, to the output charset when the method :meth:`Charset.body_encode` is called. The default is to output in the same character set as the input."
138
140
msgstr"*output_charset* اختیاری، مجموعه نویسهای است که خروجی باید با آن باشد. هنگامی که متد :meth:`Charset.convert` فراخوانی میشود، تبدیلها از مجموعه نویسه ورودی، به یونیکد و سپس به مجموعه نویسه خروجی انجام میشوند. بهطور پیشفرض، خروجی با همان مجموعه نویسه ورودی خواهد بود."
139
141
140
142
msgid"Both *input_charset* and *output_charset* must have Unicode codec entries in the module's character set-to-codec mapping; use :func:`add_codec` to add codecs the module does not know about. See the :mod:`codecs` module's documentation for more information."
"Language-Team: Persian (https://github.com/python/python-docs-fa/)\n"
@@ -44,7 +44,9 @@ msgstr "توجه داشته باشید که پارسر را میتوان به
44
44
msgid"FeedParser API"
45
45
msgstr"API مربوط به FeedParser"
46
46
47
-
msgid"The :class:`BytesFeedParser`, imported from the :mod:`email.feedparser` module, provides an API that is conducive to incremental parsing of email messages, such as would be necessary when reading the text of an email message from a source that can block (such as a socket). The :class:`BytesFeedParser` can of course be used to parse an email message fully contained in a :term:`bytes-like object`, string, or file, but the :class:`BytesParser` API may be more convenient for such use cases. The semantics and results of the two parser APIs are identical."
47
+
#,fuzzy
48
+
#| msgid "The :class:`BytesFeedParser`, imported from the :mod:`email.feedparser` module, provides an API that is conducive to incremental parsing of email messages, such as would be necessary when reading the text of an email message from a source that can block (such as a socket). The :class:`BytesFeedParser` can of course be used to parse an email message fully contained in a :term:`bytes-like object`, string, or file, but the :class:`BytesParser` API may be more convenient for such use cases. The semantics and results of the two parser APIs are identical."
49
+
msgid"The :class:`BytesFeedParser`, imported from the :mod:`!email.feedparser` module, provides an API that is conducive to incremental parsing of email messages, such as would be necessary when reading the text of an email message from a source that can block (such as a socket). The :class:`BytesFeedParser` can of course be used to parse an email message fully contained in a :term:`bytes-like object`, string, or file, but the :class:`BytesParser` API may be more convenient for such use cases. The semantics and results of the two parser APIs are identical."
48
50
msgstr":class:`BytesFeedParser`، که از ماژول :mod:`email.feedparser` ایمپورت میشود، یک API فراهم میکند که برای تجزیه تدریجی پیامهای ایمیل مناسب است، مانند حالتی که لازم باشد متن یک پیام ایمیل از منبعی که ممکن است مسدودکننده باشد (مانند سوکت) خوانده شود. البته میتوان از :class:`BytesFeedParser` برای تجزیه پیام ایمیلی که بهطور کامل در یک :term:`bytes-like object`، رشته یا پرونده قرار دارد استفاده کرد، اما ممکن است API :class:`BytesParser` برای چنین موارد استفادهای مناسبتر باشد. معناشناسی و نتایج این دو API پارسر یکسان است."
49
51
50
52
msgid"The :class:`BytesFeedParser`'s API is simple; you create an instance, feed it a bunch of bytes until there's no more to feed it, then close the parser to retrieve the root message object. The :class:`BytesFeedParser` is extremely accurate when parsing standards-compliant messages, and it does a very good job of parsing non-compliant messages, providing information about how a message was deemed broken. It will populate a message object's :attr:`~email.message.EmailMessage.defects` attribute with a list of any problems it found in a message. See the :mod:`email.errors` module for the list of defects that it can find."
@@ -59,7 +61,9 @@ msgstr "نمونهای از :class:`BytesFeedParser` ایجاد کنید. *_f
59
61
msgid"If *policy* is specified use the rules it specifies to update the representation of the message. If *policy* is not set, use the :class:`compat32 <email.policy.Compat32>` policy, which maintains backward compatibility with the Python 3.2 version of the email package and provides :class:`~email.message.Message` as the default factory. All other policies provide :class:`~email.message.EmailMessage` as the default *_factory*. For more information on what else *policy* controls, see the :mod:`~email.policy` documentation."
60
62
msgstr"اگر *policy* مشخص شده باشد، برای بهروزرسانی بازنمایی پیام از قواعدی که مشخص میکند استفاده میشود. اگر *policy* تنظیم نشده باشد، از سیاست :class:`compat32 <email.policy.Compat32>` استفاده میشود، که سازگاری با نسخهی Python 3.2 بستهی email را حفظ میکند و :class:`~email.message.Message` را بهعنوان کارخانهی پیشفرض فراهم میکند. تمام سیاستهای دیگر :class:`~email.message.EmailMessage` را بهعنوان *_factory* پیشفرض فراهم میکنند. برای اطلاعات بیشتر دربارهی سایر مواردی که *policy* کنترل میکند، به مستندات :mod:`~email.policy` مراجعه کنید."
61
63
62
-
msgid"Note: **The policy keyword should always be specified**; The default will change to :data:`email.policy.default` in a future version of Python."
64
+
#,fuzzy
65
+
#| msgid "Note: **The policy keyword should always be specified**; The default will change to :data:`email.policy.default` in a future version of Python."
66
+
msgid"Note: **The policy keyword should always be specified**. The default will change to :data:`email.policy.default` in a future version of Python."
63
67
msgstr"توجه: **کلیدواژهی policy همیشه باید تعیین شود**؛ مقدار پیشفرض در نسخهی آیندهی پایتون به :data:`email.policy.default` تغییر خواهد کرد."
0 commit comments