From d5344cbbce104c6cfefb930bf8d18c5a73156b48 Mon Sep 17 00:00:00 2001 From: Sepehr Rasouli Date: Sun, 16 Aug 2026 12:47:34 +0330 Subject: [PATCH 1/2] Update GLOSSARY.md --- GLOSSARY.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/GLOSSARY.md b/GLOSSARY.md index 48a2629fa..5985d2516 100644 --- a/GLOSSARY.md +++ b/GLOSSARY.md @@ -13,14 +13,14 @@ | string | رشته | | integer | عدد صحیح | | boolean | بولی | -| list | لیست | +| list | فهرست | | dictionary | دیکشنری | | function | تابع | | argument | آرگومان | | return | بازگشت، برگرداندن | | expression | عبارت | | statement | دستور | -| method | متد، روش | +| method | متد | | attribute | ویژگی، صفت، شاخصه | | property | ویژگی، پراپرتی، خصوصیت | | class | کلاس | @@ -62,7 +62,7 @@ | method | روش | | parameter | پارامتر | | iterator | تکرارگر | -| generator | مولد، تولیدگر | +| generator | تولیدگر | | decorator | دکوراتور، آراینده | | keyword | کلیدواژه | | operator | عملگر | @@ -71,3 +71,10 @@ | immutable | تغییرناپذیر | | callback | کال‌بک، فراخوانی بازگشتی | | deprecated | منسوخ، از رده خارج شده | +| character | نویسه | +| scope | محدوده | +| keyword argument | آرگومان کلیدواژه‌ای | +| raise | پرتاب | +| list comprehension | درک فهرستی | +| directory | پوشه | +| stack traceback | ردگیری پشته | \ No newline at end of file From 1b2191387b5277884a2558ed88aa03b0799991d0 Mon Sep 17 00:00:00 2001 From: Sepehr Rasouli Date: Sun, 16 Aug 2026 12:47:57 +0330 Subject: [PATCH 2/2] Update translation files so translations are consistent across different pages --- about.po | 2 +- bugs.po | 2 +- c-api/abstract.po | 4 +- c-api/bytearray.po | 4 +- library/functions.po | 3952 +++++++++++++++++------------------- tutorial/appendix.po | 12 +- tutorial/appetite.po | 2 +- tutorial/classes.po | 56 +- tutorial/controlflow.po | 36 +- tutorial/datastructures.po | 80 +- tutorial/errors.po | 32 +- tutorial/index.po | 2 +- tutorial/inputoutput.po | 22 +- tutorial/introduction.po | 40 +- tutorial/modules.po | 4 +- tutorial/stdlib2.po | 2 +- tutorial/venv.po | 14 +- tutorial/whatnow.po | 2 +- 18 files changed, 2050 insertions(+), 2218 deletions(-) diff --git a/about.po b/about.po index 99d6e3846..7ee43521b 100644 --- a/about.po +++ b/about.po @@ -33,7 +33,7 @@ msgid "" "maintained as an independent project." msgstr "" "مستندات پایتون از طریق منابع `reStructuredText`_ با استفاده از `Sphinx`_ " -"تولید می‌شوند، که یک تولیدکننده مستندات است که در ابتدا برای پایتون ساخته شد " +"تولید می‌شوند، که یک تولیدگر مستندات است که در ابتدا برای پایتون ساخته شد " "و اکنون به‌عنوان یک پروژه مستقل نگهداری می‌شود." msgid "" diff --git a/bugs.po b/bugs.po index 9cfe9604a..9a68acf86 100644 --- a/bugs.po +++ b/bugs.po @@ -161,7 +161,7 @@ msgid "" "using the \"Sign up\" link. It is not possible to submit a bug report " "anonymously." msgstr "" -"اگر مشکلی که گزارش می‌دهید در لیست موجود نباشد، وارد GitHub شوید. اگر قبلاً " +"اگر مشکلی که گزارش می‌دهید در فهرست موجود نباشد، وارد GitHub شوید. اگر قبلاً " "حساب GitHub ندارید، با استفاده از لینک \"Sign up\" یک حساب جدید ایجاد کنید. " "ارسال گزارش باگ به صورت ناشناس امکان پذیر نیست." diff --git a/c-api/abstract.po b/c-api/abstract.po index 184b3efc7..e04e3d9a2 100644 --- a/c-api/abstract.po +++ b/c-api/abstract.po @@ -36,7 +36,7 @@ msgstr "" "توابع در این فصل با انواع اشیاء صرف نظر از نوع آنها یا با کلاس‌های گسترده‌ای " "از انواع اشیاء ( برای مثال همه‌ی اعداد یا همه‌ی انواع توالی) تعامل دارند. اگر " "این توابع بر روی نوعی از اشیاء استفاده شوند که برای آن‌ها تعریف نشده‌اند، یک " -"استثنا در پایتون ایجاد خواهند کرد." +"استثنا در پایتون پرتاب خواهند کرد." msgid "" "It is not possible to use these functions on objects that are not properly " @@ -45,6 +45,6 @@ msgid "" "value yet." msgstr "" "امکان استفاده از این توابع بر روی اشیایی که به‌درستی مقداردهی اولیه نشده‌اند " -"وجود ندارد؛ برای مثال، یک لیست از اشیاء که با استفاده از :c:func:" +"وجود ندارد؛ برای مثال، یک فهرست از اشیاء که با استفاده از :c:func:" "`PyList_New` ایجاد شده اما مقادیر آیتم‌های آن هنوز به مقداری غیر از ``NULL`` " "داده نشده است." diff --git a/c-api/bytearray.po b/c-api/bytearray.po index a62e0e2a7..972bd1639 100644 --- a/c-api/bytearray.po +++ b/c-api/bytearray.po @@ -93,7 +93,7 @@ msgid "" "Return the contents of *bytearray* as a char array after checking for a " "``NULL`` pointer. The returned array always has an extra null byte appended." msgstr "" -"محتوای *bytearray* را پس از بررسی اشاره‌گر ``NULL`` به‌صورت یک آرایه کاراکتری " +"محتوای *bytearray* را پس از بررسی اشاره‌گر ``NULL`` به‌صورت یک آرایه نویسه‌ای " "(char array) بازگردانید. آرایه‌ی برگشتی همیشه دارای یک بایت null اضافی در " "انتها است." @@ -101,7 +101,7 @@ msgid "" "It is not thread-safe to mutate the bytearray object while using the " "returned char array." msgstr "" -"زمانی که از آرایه‌ی کاراکتری برگشتی استفاده می‌شود، تغییر دادن شیء bytearray " +"زمانی که از آرایه‌ی نویسه‌ای برگشتی استفاده می‌شود، تغییر دادن شیء bytearray " "ایمن از نظر ریسه‌ها نیست." msgid "" diff --git a/library/functions.po b/library/functions.po index eb857ea9a..a30954569 100644 --- a/library/functions.po +++ b/library/functions.po @@ -18,7 +18,7 @@ msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2026-08-16 08:01+0000\n" -"PO-Revision-Date: 2026-07-26 12:31+0330\n" +"PO-Revision-Date: 2026-08-16 12:46+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/revisto/python-docs-fa/)\n" "Language: fa\n" @@ -32,12 +32,11 @@ msgid "Built-in Functions" msgstr "توابع پیش ساخته" msgid "" -"The Python interpreter has a number of functions and types built into it " -"that are always available. They are listed here in alphabetical order." +"The Python interpreter has a number of functions and types built into it that are " +"always available. They are listed here in alphabetical order." msgstr "" -"مفسر پایتون دارای تعدادی تابع و نوع داده (type) است که در آن بصورت توکار " -"(built-in) همیشه در دسترس می‌باشند. آن‌ها در اینجا به ترتیب حروف الفبا فهرست " -"شده‌اند." +"مفسر پایتون دارای تعدادی تابع و نوع داده (type) است که در آن بصورت توکار (built-in) " +"همیشه در دسترس می‌باشند. آن‌ها در اینجا به ترتیب حروف الفبا فهرست شده‌اند." msgid "**A**" msgstr "**A**" @@ -313,30 +312,30 @@ msgid ":func:`__import__`" msgstr ":func:`__import__`" msgid "" -"Return the absolute value of a number. The argument may be an integer, a " -"floating-point number, or an object implementing :meth:`~object.__abs__`. If " -"the argument is a complex number, its magnitude is returned." +"Return the absolute value of a number. The argument may be an integer, a floating-" +"point number, or an object implementing :meth:`~object.__abs__`. If the argument is " +"a complex number, its magnitude is returned." msgstr "" -"مقدار قدر مطلق یک عدد را برمی‌گرداند. آرگومان می تواند یک عدد صحیح، یک عدد " -"اعشاری، یا یک شیء که :meth:`~object.__abs__` را پیاده سازی می‌کند، باشد. اگر " -"ارگومان یک عدد مختلط باشد، بزرگی آن بازگردانده می‌شود." +"مقدار قدر مطلق یک عدد را برمی‌گرداند. آرگومان می تواند یک عدد صحیح، یک عدد اعشاری، " +"یا یک شیء که :meth:`~object.__abs__` را پیاده سازی می‌کند، باشد. اگر ارگومان یک عدد " +"مختلط باشد، بزرگی آن بازگردانده می‌شود." msgid "" -"Return an :term:`asynchronous iterator` for an :term:`asynchronous " -"iterable`. Equivalent to calling ``x.__aiter__()``." +"Return an :term:`asynchronous iterator` for an :term:`asynchronous iterable`. " +"Equivalent to calling ``x.__aiter__()``." msgstr "" -"بازگرداندن یک :term:`asynchronous iterator` برای یک :term:`asynchronous " -"iterable` معادل فراخوانی ``x.__aiter__()`` است." +"بازگرداندن یک :term:`asynchronous iterator` برای یک :term:`asynchronous iterable` " +"معادل فراخوانی ``x.__aiter__()`` است." msgid "Note: Unlike :func:`iter`, :func:`aiter` has no 2-argument variant." msgstr "توجه: برخلاف :func:`iter`، :func:`aiter` نسخه دو آرگومانی ندارد." msgid "" -"Return ``True`` if all elements of the *iterable* are true (or if the " -"iterable is empty). Equivalent to::" +"Return ``True`` if all elements of the *iterable* are true (or if the iterable is " +"empty). Equivalent to::" msgstr "" -"در صورتی که تمام عناصر *iterable* درست باشند (یا اگر iterable خالی باشد)، " -"``True`` را برمی گرداند. معادل با::" +"در صورتی که تمام عناصر *iterable* درست باشند (یا اگر iterable خالی باشد)، ``True`` " +"را برمی گرداند. معادل با::" msgid "" "def all(iterable):\n" @@ -352,35 +351,33 @@ msgstr "" " return True" msgid "" -"When awaited, return the next item from the given :term:`asynchronous " -"iterator`, or *default* if given and the iterator is exhausted." +"When awaited, return the next item from the given :term:`asynchronous iterator`, or " +"*default* if given and the iterator is exhausted." msgstr "" "هنگام اِنتظار (await)، عنصر بعدی را از :term:`asynchronous iterator` داده شده " -"برمی‌گرداند، یا اگر آرگومان *default* ارائه شده و تکرارکننده به پایان رسیده " -"باشد، مقدار *default* را برمی‌گرداند." +"برمی‌گرداند، یا اگر آرگومان *default* ارائه شده و تکرارکننده به پایان رسیده باشد، " +"مقدار *default* را برمی‌گرداند." -msgid "" -"This is the async variant of the :func:`next` builtin, and behaves similarly." -msgstr "" -"این، نسخه ناهمگامِ تابع داخلی :func:`next` است و به طور مشابه عمل می‌کند." +msgid "This is the async variant of the :func:`next` builtin, and behaves similarly." +msgstr "این، نسخه ناهمگامِ تابع داخلی :func:`next` است و به طور مشابه عمل می‌کند." msgid "" -"This calls the :meth:`~object.__anext__` method of *async_iterator*, " -"returning an :term:`awaitable`. Awaiting this returns the next value of the " -"iterator. If *default* is given, it is returned if the iterator is " -"exhausted, otherwise :exc:`StopAsyncIteration` is raised." +"This calls the :meth:`~object.__anext__` method of *async_iterator*, returning " +"an :term:`awaitable`. Awaiting this returns the next value of the iterator. If " +"*default* is given, it is returned if the iterator is exhausted, " +"otherwise :exc:`StopAsyncIteration` is raised." msgstr "" -"این روش(متد) :meth:`~object.__anext__` از *async_iterator* را فراخوانی می " -"کند و یک :term:`awaitable` را برمی گرداند. در انتظار این مقدار بعدی تکرار " -"کننده را برمی گرداند. اگر *default* داده شود، اگر تکرار کننده تمام شده باشد، " -"برگردانده می شود، در غیر این صورت :exc:`StopAsyncIteration` افزایش می یابد." +"این متد :meth:`~object.__anext__` از *async_iterator* را فراخوانی می کند و " +"یک :term:`awaitable` را برمی گرداند. در انتظار این مقدار بعدی تکرار کننده را برمی " +"گرداند. اگر *default* داده شود، اگر تکرار کننده تمام شده باشد، برگردانده می شود، در " +"غیر این صورت :exc:`StopAsyncIteration` افزایش می یابد." msgid "" -"Return ``True`` if any element of the *iterable* is true. If the iterable " -"is empty, return ``False``. Equivalent to::" +"Return ``True`` if any element of the *iterable* is true. If the iterable is " +"empty, return ``False``. Equivalent to::" msgstr "" -"اگر هر عنصری از *iterable* درست باشد، ``True`` را برگردانید. اگر iterable " -"خالی باشد، ``False`` را برگردانید. معادل با::" +"اگر هر عنصری از *iterable* درست باشد، ``True`` را برگردانید. اگر iterable خالی " +"باشد، ``False`` را برگردانید. معادل با::" msgid "" "def any(iterable):\n" @@ -397,39 +394,35 @@ msgstr "" msgid "" "As :func:`repr`, return a string containing a printable representation of an " -"object, but escape the non-ASCII characters in the string returned by :func:" -"`repr` using ``\\x``, ``\\u``, or ``\\U`` escapes. This generates a string " -"similar to that returned by :func:`repr` in Python 2." +"object, but escape the non-ASCII characters in the string returned by :func:`repr` " +"using ``\\x``, ``\\u``, or ``\\U`` escapes. This generates a string similar to " +"that returned by :func:`repr` in Python 2." msgstr "" -"مانند تابع :func:`repr`، رشته‌ای حاوی نمایش قابل چاپ یک شیء را برمی‌گرداند، " -"اما کاراکترهای غیر اَسکی (non-ASCII) را در رشته‌ی بازگردانده‌شده توسط تابع :" -"func:`repr`، با استفاده از توالی‌های گریز (escapes) ``\\x``، ``\\u`` یا " -"``\\U`` اِسکِیپ (escape) می‌کند. این عمل، رشته‌ای مشابه آنچه تابع :func:`repr` " -"در پایتون ۲ بازمی‌گرداند، تولید می‌کند." +"مانند تابع :func:`repr`، رشته‌ای حاوی نمایش قابل چاپ یک شیء را برمی‌گرداند، اما " +"نویسه‌های غیر اَسکی (non-ASCII) را در رشته‌ی بازگردانده‌شده توسط تابع :func:`repr`، با " +"استفاده از توالی‌های گریز (escapes) ``\\x``، ``\\u`` یا ``\\U`` اِسکِیپ (escape) " +"می‌کند. این عمل، رشته‌ای مشابه آنچه تابع :func:`repr` در پایتون ۲ بازمی‌گرداند، تولید " +"می‌کند." msgid "" -"Convert an integer number to a binary string prefixed with \"0b\". The " -"result is a valid Python expression. If *integer* is not a Python :class:" -"`int` object, it has to define an :meth:`~object.__index__` method that " -"returns an integer. Some examples:" +"Convert an integer number to a binary string prefixed with \"0b\". The result is a " +"valid Python expression. If *integer* is not a Python :class:`int` object, it has " +"to define an :meth:`~object.__index__` method that returns an integer. Some " +"examples:" msgstr "" -"تبدیل یک عدد صحیح به یک رشته باینری که با \"0b\" پیشوند شده است. نتیجه یک " -"عبارت معتبر پایتون خواهد بود. اگر *integer* یک شیء پایتون :class:`int` " -"نباشد، لازم است یک روش(متد) :meth:`~object.__index__` تعریف کند که یک عدد " -"صحیح برگرداند. برخی مثال ها:" +"تبدیل یک عدد صحیح به یک رشته باینری که با \"0b\" پیشوند شده است. نتیجه یک عبارت " +"معتبر پایتون خواهد بود. اگر *integer* یک شیء پایتون :class:`int` نباشد، لازم است یک " +"متد :meth:`~object.__index__` تعریف کند که یک عدد صحیح برگرداند. برخی مثال ها:" msgid "" -"If the prefix \"0b\" is desired or not, you can use either of the following " -"ways." +"If the prefix \"0b\" is desired or not, you can use either of the following ways." msgstr "" -"چنانچه پیشوند \"0b\" مطلوب باشد یا نباشد، می‌توانید از یکی از روش‌های زیر " -"استفاده کنید." +"چنانچه پیشوند \"0b\" مطلوب باشد یا نباشد، می‌توانید از یکی از روش‌های زیر استفاده " +"کنید." -msgid "" -"See also :func:`enum.bin` to represent negative values as twos-complement." +msgid "See also :func:`enum.bin` to represent negative values as twos-complement." msgstr "" -"همچنین برای نمایش مقادیر منفی به‌صورت مکمل دو، به :func:`enum.bin` مراجعه " -"کنید." +"همچنین برای نمایش مقادیر منفی به‌صورت مکمل دو، به :func:`enum.bin` مراجعه کنید." msgid "See also :func:`format` for more information." msgstr "همچنین برای اطلاعات بیشتر، به تابع :func:`format` مراجعه کنید." @@ -438,90 +431,86 @@ msgid "" "Return a Boolean value, i.e. one of ``True`` or ``False``. The argument is " "converted using the standard :ref:`truth testing procedure `. If the " "argument is false or omitted, this returns ``False``; otherwise, it returns " -"``True``. The :class:`bool` class is a subclass of :class:`int` (see :ref:" -"`typesnumeric`). It cannot be subclassed further. Its only instances are " +"``True``. The :class:`bool` class is a subclass of :class:`int` " +"(see :ref:`typesnumeric`). It cannot be subclassed further. Its only instances are " "``False`` and ``True`` (see :ref:`typebool`)." msgstr "" "یک مقدار بولی، یعنی یکی از ``True`` یا ``False`` را بر می‌گرداند. آرگومان با " -"استفاده از استاندارد :ref:`truth testing procedure ` تبدیل می شود. " -"اگر آرگومان نادرست یا حذف شده باشد، ``False`` را برمی گرداند. در غیر این " -"صورت، ``True`` را برمی گرداند. کلاس :class:`bool` یک زیر کلاس از :class:" -"`int` است (به :ref:`typesnumeric` مراجعه کنید). این کلاس دیگر قابل " -"زیرکلاس‌بندی نیست. تنها نمونه های آن ``False`` و ``True`` هستند (به :ref:" -"`typebool` مراجعه کنید)." +"استفاده از استاندارد :ref:`truth testing procedure ` تبدیل می شود. اگر " +"آرگومان نادرست یا حذف شده باشد، ``False`` را برمی گرداند. در غیر این صورت، ``True`` " +"را برمی گرداند. کلاس :class:`bool` یک زیر کلاس از :class:`int` است " +"(به :ref:`typesnumeric` مراجعه کنید). این کلاس دیگر قابل زیرکلاس‌بندی نیست. تنها " +"نمونه های آن ``False`` و ``True`` هستند (به :ref:`typebool` مراجعه کنید)." msgid "The parameter is now positional-only." msgstr "این آرگومان اکنون صرفاً جایگاهی (positional-only) است." msgid "" -"This function drops you into the debugger at the call site. Specifically, " -"it calls :func:`sys.breakpointhook`, passing ``args`` and ``kws`` straight " -"through. By default, ``sys.breakpointhook()`` calls :func:`pdb.set_trace` " -"expecting no arguments. In this case, it is purely a convenience function " -"so you don't have to explicitly import :mod:`pdb` or type as much code to " -"enter the debugger. However, :func:`sys.breakpointhook` can be set to some " -"other function and :func:`breakpoint` will automatically call that, allowing " -"you to drop into the debugger of choice. If :func:`sys.breakpointhook` is " -"not accessible, this function will raise :exc:`RuntimeError`." +"This function drops you into the debugger at the call site. Specifically, it " +"calls :func:`sys.breakpointhook`, passing ``args`` and ``kws`` straight through. " +"By default, ``sys.breakpointhook()`` calls :func:`pdb.set_trace` expecting no " +"arguments. In this case, it is purely a convenience function so you don't have to " +"explicitly import :mod:`pdb` or type as much code to enter the debugger. " +"However, :func:`sys.breakpointhook` can be set to some other function " +"and :func:`breakpoint` will automatically call that, allowing you to drop into the " +"debugger of choice. If :func:`sys.breakpointhook` is not accessible, this function " +"will raise :exc:`RuntimeError`." msgstr "" -"این تابع، اجرای برنامه را در محل فراخوانی متوقف کرده و شما را وارد محیط " -"اشکال‌زدا (debugger) می‌کند. به طور خاص، این تابع، :func:`sys.breakpointhook` " -"را فراخوانی کرده و مقادیر ``args`` و ``kws`` مستقیماً به آن ارسال (pass) " -"می‌کند. به طور پیش‌فرض، تابع ``sys.breakpointhook()`` بدون نیاز به هیچ " -"آرگومانی :func:`pdb.set_trace` را فراخوانی می کند. در این حالت، این صرفاً یک " -"تابع کمکی (convenience function) است تا مجبور نباشید ماژول :mod:`pdb` را به " -"صراحت ایمپورت (import) کنید یا برای ورود به اشکال‌زدا، کد زیادی بنویسید. با " -"این حال، می‌توان :func:`sys.breakpointhook` را روی تابع دیگری تنظیم کرد و در " -"این صورت، :func:`breakpoint` به طور خودکار آن را فراخوانی می کند و به شما " -"این امکان را می دهد که به اشکال‌زدای مورد نظر خود وارد شوید. اگر :func:`sys." -"breakpointhook` قابل دسترسی نباشد، این تابع، استثنای :exc:`RuntimeError` را " -"ایجاد خواهد کرد." +"این تابع، اجرای برنامه را در محل فراخوانی متوقف کرده و شما را وارد محیط اشکال‌زدا " +"(debugger) می‌کند. به طور خاص، این تابع، :func:`sys.breakpointhook` را فراخوانی کرده " +"و مقادیر ``args`` و ``kws`` مستقیماً به آن ارسال (pass) می‌کند. به طور پیش‌فرض، تابع " +"``sys.breakpointhook()`` بدون نیاز به هیچ آرگومانی :func:`pdb.set_trace` را " +"فراخوانی می کند. در این حالت، این صرفاً یک تابع کمکی (convenience function) است تا " +"مجبور نباشید ماژول :mod:`pdb` را به صراحت ایمپورت (import) کنید یا برای ورود به " +"اشکال‌زدا، کد زیادی بنویسید. با این حال، می‌توان :func:`sys.breakpointhook` را روی " +"تابع دیگری تنظیم کرد و در این صورت، :func:`breakpoint` به طور خودکار آن را فراخوانی " +"می کند و به شما این امکان را می دهد که به اشکال‌زدای مورد نظر خود وارد شوید. " +"اگر :func:`sys.breakpointhook` قابل دسترسی نباشد، این تابع، " +"استثنای :exc:`RuntimeError` را پرتاب خواهد کرد." msgid "" -"By default, the behavior of :func:`breakpoint` can be changed with the :" -"envvar:`PYTHONBREAKPOINT` environment variable. See :func:`sys." -"breakpointhook` for usage details." +"By default, the behavior of :func:`breakpoint` can be changed with " +"the :envvar:`PYTHONBREAKPOINT` environment variable. See :func:`sys.breakpointhook` " +"for usage details." msgstr "" -"به طور پیش‌فرض، رفتار تابع :func:`breakpoint` را می‌توان با متغیر محیطی :" -"envvar:`PYTHONBREAKPOINT` تغییر داد. برای جزئیات استفاده، به تابع :func:`sys." -"breakpointhook` مراجعه کنید." +"به طور پیش‌فرض، رفتار تابع :func:`breakpoint` را می‌توان با متغیر " +"محیطی :envvar:`PYTHONBREAKPOINT` تغییر داد. برای جزئیات استفاده، به " +"تابع :func:`sys.breakpointhook` مراجعه کنید." msgid "" -"Note that this is not guaranteed if :func:`sys.breakpointhook` has been " -"replaced." +"Note that this is not guaranteed if :func:`sys.breakpointhook` has been replaced." msgstr "" "توجه داشته باشید که این امر تضمین نمی‌شود اگر تابع :func:`sys.breakpointhook` " "جایگزین شده باشد." msgid "" -"Raises an :ref:`auditing event ` ``builtins.breakpoint`` with " -"argument ``breakpointhook``." +"Raises an :ref:`auditing event ` ``builtins.breakpoint`` with argument " +"``breakpointhook``." msgstr "" "یک :ref:`auditing event ` ``builtins.breakpoint`` با آرگومان " -"``breakpointhook`` ایجاد می کند." +"``breakpointhook`` پرتاب می‌کند." msgid "" -"Return a new array of bytes. The :class:`bytearray` class is a mutable " -"sequence of integers in the range 0 <= x < 256. It has most of the usual " -"methods of mutable sequences, described in :ref:`typesseq-mutable`, as well " -"as most methods that the :class:`bytes` type has, see :ref:`bytes-methods`." +"Return a new array of bytes. The :class:`bytearray` class is a mutable sequence of " +"integers in the range 0 <= x < 256. It has most of the usual methods of mutable " +"sequences, described in :ref:`typesseq-mutable`, as well as most methods that " +"the :class:`bytes` type has, see :ref:`bytes-methods`." msgstr "" -"یک آرایهٔ جدید از بایت‌ها را برمی‌گرداند. کلاس :class:`bytearray` دنباله‌ای " -"قابل‌تغییر از اعداد صحیح در بازهٔ 0 <= x < 256 است. این کلاس بیشتر متدهای " -"معمول دنباله‌های قابل‌تغییر را دارد که در :ref:`typesseq-mutable` شرح داده " -"شده‌اند، و همچنین بیشتر متدهایی را دارد که نوع :class:`bytes` دارد؛ به :ref:" -"`bytes-methods` مراجعه کنید." +"یک آرایهٔ جدید از بایت‌ها را برمی‌گرداند. کلاس :class:`bytearray` دنباله‌ای قابل‌تغییر " +"از اعداد صحیح در بازهٔ 0 <= x < 256 است. این کلاس بیشتر متدهای معمول دنباله‌های " +"قابل‌تغییر را دارد که در :ref:`typesseq-mutable` شرح داده شده‌اند، و همچنین بیشتر " +"متدهایی را دارد که نوع :class:`bytes` دارد؛ به :ref:`bytes-methods` مراجعه کنید." msgid "" "The optional *source* parameter can be used to initialize the array in a few " "different ways:" msgstr "" -"از پارامتر اختیاری *source* می‌توان برای مقداردهی اولیه آرایه به چند روش " -"مختلف استفاده کرد:" +"از پارامتر اختیاری *source* می‌توان برای مقداردهی اولیه آرایه به چند روش مختلف " +"استفاده کرد:" msgid "" -"If it is a *string*, you must also give the *encoding* (and optionally, " -"*errors*) parameters; :func:`bytearray` then converts the string to bytes " +"If it is a *string*, you must also give the *encoding* (and optionally, *errors*) " +"parameters; :func:`bytearray` then converts the string to bytes " "using :meth:`str.encode`." msgstr "" "اگر *source* یک *رشته* «*string*» باشد، باید پارامترهای *encoding* و (به‌صورت " @@ -529,27 +518,26 @@ msgstr "" "استفاده از متد :meth:`str.encode` به بایت‌ها تبدیل می‌کند." msgid "" -"If it is an *integer*, the array will have that size and will be initialized " -"with null bytes." +"If it is an *integer*, the array will have that size and will be initialized with " +"null bytes." msgstr "" -"اگر «*source*» یک *عدد صحیح* «integer» باشد، آرایه به اندازه همان عدد ایجاد " -"شده و با بایت‌های تهی «null byte» مقداردهی اولیه خواهد شد." +"اگر «*source*» یک *عدد صحیح* «integer» باشد، آرایه به اندازه همان عدد ایجاد شده و " +"با بایت‌های تهی «null byte» مقداردهی اولیه خواهد شد." msgid "" -"If it is an object conforming to the :ref:`buffer interface " -"`, a read-only buffer of the object will be used to " -"initialize the bytes array." +"If it is an object conforming to the :ref:`buffer interface `, a " +"read-only buffer of the object will be used to initialize the bytes array." msgstr "" -"اگر آرگومان، شیئی سازگار با :ref:`رابط بافر ` باشد، از یک " -"بافر فقط‌خواندنیِ آن شیء برای مقداردهی اولیهٔ آرایهٔ بایت‌ها استفاده خواهد شد." +"اگر آرگومان، شیئی سازگار با :ref:`رابط بافر ` باشد، از یک بافر " +"فقط‌خواندنیِ آن شیء برای مقداردهی اولیهٔ آرایهٔ بایت‌ها استفاده خواهد شد." msgid "" -"If it is an *iterable*, it must be an iterable of integers in the range ``0 " -"<= x < 256``, which are used as the initial contents of the array." +"If it is an *iterable*, it must be an iterable of integers in the range ``0 <= x < " +"256``, which are used as the initial contents of the array." msgstr "" -"اگر «*source*» یک *تکرارپذیر* «iterable» باشد، باید یک تکرارپذیر از اعداد " -"صحیح در بازه ``0 <= x < 256`` باشد، که این اعداد به عنوان محتویات اولیه " -"آرایه استفاده می‌شوند." +"اگر «*source*» یک *تکرارپذیر* «iterable» باشد، باید یک تکرارپذیر از اعداد صحیح در " +"بازه ``0 <= x < 256`` باشد، که این اعداد به عنوان محتویات اولیه آرایه استفاده " +"می‌شوند." msgid "Without an argument, an array of size 0 is created." msgstr "بدون آرگومان، یک آرایه با اندازه صفر «0» ایجاد می شود." @@ -558,18 +546,16 @@ msgid "See also :ref:`binaryseq` and :ref:`typebytearray`." msgstr "همچنین به :ref:`binaryseq` و :ref:`typebytearray` مراجعه کنید." msgid "" -"Return a new \"bytes\" object which is an immutable sequence of integers in " -"the range ``0 <= x < 256``. :class:`bytes` is an immutable version of :" -"class:`bytearray` -- it has the same non-mutating methods and the same " -"indexing and slicing behavior." +"Return a new \"bytes\" object which is an immutable sequence of integers in the " +"range ``0 <= x < 256``. :class:`bytes` is an immutable version " +"of :class:`bytearray` -- it has the same non-mutating methods and the same indexing " +"and slicing behavior." msgstr "" -"یک شیء «bytes» جدید را برمی‌گرداند که دنباله‌ای تغییرناپذیر از اعداد صحیح در " -"بازهٔ ``0 <= x < 256`` است. :class:`bytes` نسخهٔ تغییرناپذیر :class:" -"`bytearray` است؛ همان متدهای غیرتغییردهنده و همان رفتار اندیس‌گذاری و برش " -"(slicing) را دارد." +"یک شیء «bytes» جدید را برمی‌گرداند که دنباله‌ای تغییرناپذیر از اعداد صحیح در بازهٔ ``0 " +"<= x < 256`` است. :class:`bytes` نسخهٔ تغییرناپذیر :class:`bytearray` است؛ همان " +"متدهای غیرتغییردهنده و همان رفتار اندیس‌گذاری و برش (slicing) را دارد." -msgid "" -"Accordingly, constructor arguments are interpreted as for :func:`bytearray`." +msgid "Accordingly, constructor arguments are interpreted as for :func:`bytearray`." msgstr "بر این اساس، آرگومان‌های سازنده همانند :func:`bytearray` تفسیر می‌شوند." msgid "Bytes objects can also be created with literals, see :ref:`strings`." @@ -579,57 +565,52 @@ msgstr "" msgid "See also :ref:`binaryseq`, :ref:`typebytes`, and :ref:`bytes-methods`." msgstr "" -"همچنین به :ref:`binaryseq`، :ref:`typebytes` و :ref:`bytes-methods` مراجعه " -"کنید." +"همچنین به :ref:`binaryseq`، :ref:`typebytes` و :ref:`bytes-methods` مراجعه کنید." msgid "" -"Return :const:`True` if the *object* argument appears callable, :const:" -"`False` if not. If this returns ``True``, it is still possible that a call " -"fails, but if it is ``False``, calling *object* will never succeed. Note " -"that classes are callable (calling a class returns a new instance); " -"instances are callable if their class has a :meth:`~object.__call__` method." +"Return :const:`True` if the *object* argument appears callable, :const:`False` if " +"not. If this returns ``True``, it is still possible that a call fails, but if it " +"is ``False``, calling *object* will never succeed. Note that classes are callable " +"(calling a class returns a new instance); instances are callable if their class has " +"a :meth:`~object.__call__` method." msgstr "" -"اگر آرگومان *object* فراخوانی‌پذیر باشد، مقدار :const:`True` و در غیر این " -"صورت مقدار :const:`False` را برمی‌گرداند. اگر نتیجه ``True`` باشد، همچنان " -"ممکن است فراخوانی با شکست مواجه شود؛ اما اگر ``False`` باشد، فراخوانی " -"*object* هرگز موفق نخواهد شد. توجه داشته باشید که کلاس‌ها فراخوانی‌پذیر هستند " -"(فراخوانی یک کلاس یک نمونهٔ جدید برمی‌گرداند) و نمونه‌ها نیز در صورتی " -"فراخوانی‌پذیر هستند که کلاس آن‌ها متد :meth:`~object.__call__` را داشته باشد." +"اگر آرگومان *object* فراخوانی‌پذیر باشد، مقدار :const:`True` و در غیر این صورت " +"مقدار :const:`False` را برمی‌گرداند. اگر نتیجه ``True`` باشد، همچنان ممکن است " +"فراخوانی با شکست مواجه شود؛ اما اگر ``False`` باشد، فراخوانی *object* هرگز موفق " +"نخواهد شد. توجه داشته باشید که کلاس‌ها فراخوانی‌پذیر هستند (فراخوانی یک کلاس یک نمونهٔ " +"جدید برمی‌گرداند) و نمونه‌ها نیز در صورتی فراخوانی‌پذیر هستند که کلاس آن‌ها " +"متد :meth:`~object.__call__` را داشته باشد." msgid "" -"This function was first removed in Python 3.0 and then brought back in " -"Python 3.2." -msgstr "" -"این تابع ابتدا در پایتون ۳٫۰ حذف شد و سپس در پایتون ۳٫۲ دوباره بازگردانده شد." +"This function was first removed in Python 3.0 and then brought back in Python 3.2." +msgstr "این تابع ابتدا در پایتون ۳٫۰ حذف شد و سپس در پایتون ۳٫۲ دوباره بازگردانده شد." msgid "" -"Return the string representing a character with the specified Unicode code " -"point. For example, ``chr(97)`` returns the string ``'a'``, while " -"``chr(8364)`` returns the string ``'€'``. This is the inverse of :func:`ord`." +"Return the string representing a character with the specified Unicode code point. " +"For example, ``chr(97)`` returns the string ``'a'``, while ``chr(8364)`` returns " +"the string ``'€'``. This is the inverse of :func:`ord`." msgstr "" -"رشته‌ای را که نویسهٔ متناظر با نقطهٔ کد یونی‌کد مشخص‌شده را نمایش می‌دهد، " -"برمی‌گرداند. برای مثال، ``chr(97)`` رشتهٔ ``'a'`` و ``chr(8364)`` رشتهٔ ``'€'`` " -"را برمی‌گرداند. این تابع معکوس :func:`ord` است." +"رشته‌ای را که نویسهٔ متناظر با نقطهٔ کد یونی‌کد مشخص‌شده را نمایش می‌دهد، برمی‌گرداند. " +"برای مثال، ``chr(97)`` رشتهٔ ``'a'`` و ``chr(8364)`` رشتهٔ ``'€'`` را برمی‌گرداند. این " +"تابع معکوس :func:`ord` است." msgid "" -"The valid range for the argument is from 0 through 1,114,111 (0x10FFFF in " -"base 16). :exc:`ValueError` will be raised if it is outside that range." +"The valid range for the argument is from 0 through 1,114,111 (0x10FFFF in base " +"16). :exc:`ValueError` will be raised if it is outside that range." msgstr "" -"بازهٔ معتبر برای این آرگومان از ۰ تا ۱٬۱۱۴٬۱۱۱ (برابر با 0x10FFFF در مبنای " -"۱۶) است. اگر مقدار خارج از این بازه باشد، استثنای :exc:`ValueError` ایجاد " -"خواهد شد." +"بازهٔ معتبر برای این آرگومان از ۰ تا ۱٬۱۱۴٬۱۱۱ (برابر با 0x10FFFF در مبنای ۱۶) است. " +"اگر مقدار خارج از این بازه باشد، استثنای :exc:`ValueError` پرتاب خواهد شد." msgid "Transform a method into a class method." msgstr "یک متد را به متد کلاسی تبدیل می‌کند." msgid "" -"A class method receives the class as an implicit first argument, just like " -"an instance method receives the instance. To declare a class method, use " -"this idiom::" +"A class method receives the class as an implicit first argument, just like an " +"instance method receives the instance. To declare a class method, use this idiom::" msgstr "" -"یک متد کلاس، همان‌طور که متد نمونه، نمونه را به‌عنوان نخستین آرگومان ضمنی " -"دریافت می‌کند، کلاس را به‌عنوان نخستین آرگومان ضمنی دریافت می‌کند. برای تعریف " -"یک متد کلاس، از الگوی زیر استفاده کنید::" +"یک متد کلاس، همان‌طور که متد نمونه، نمونه را به‌عنوان نخستین آرگومان ضمنی دریافت " +"می‌کند، کلاس را به‌عنوان نخستین آرگومان ضمنی دریافت می‌کند. برای تعریف یک متد کلاس، از " +"الگوی زیر استفاده کنید::" msgid "" "class C:\n" @@ -641,212 +622,203 @@ msgstr "" " def f(cls, arg1, arg2): ..." msgid "" -"The ``@classmethod`` form is a function :term:`decorator` -- see :ref:" -"`function` for details." +"The ``@classmethod`` form is a function :term:`decorator` -- see :ref:`function` " +"for details." msgstr "" "شکل ``@classmethod`` یک :term:`تزئین‌کننده ` تابع است؛ برای جزئیات " "به :ref:`function` مراجعه کنید." msgid "" -"A class method can be called either on the class (such as ``C.f()``) or on " -"an instance (such as ``C().f()``). The instance is ignored except for its " -"class. If a class method is called for a derived class, the derived class " -"object is passed as the implied first argument." +"A class method can be called either on the class (such as ``C.f()``) or on an " +"instance (such as ``C().f()``). The instance is ignored except for its class. If a " +"class method is called for a derived class, the derived class object is passed as " +"the implied first argument." msgstr "" -"یک متد کلاس را می‌توان هم روی خود کلاس (مانند ``C.f()``) و هم روی یک نمونه " -"(مانند ``C().f()``) فراخوانی کرد. در حالت دوم، نمونه نادیده گرفته می‌شود و " -"فقط کلاس آن در نظر گرفته می‌شود. اگر متد کلاس برای یک کلاس مشتق‌شده فراخوانی " -"شود، شیء کلاس مشتق‌شده به‌عنوان نخستین آرگومان ضمنی ارسال می‌شود." +"یک متد کلاس را می‌توان هم روی خود کلاس (مانند ``C.f()``) و هم روی یک نمونه (مانند " +"``C().f()``) فراخوانی کرد. در حالت دوم، نمونه نادیده گرفته می‌شود و فقط کلاس آن در " +"نظر گرفته می‌شود. اگر متد کلاس برای یک کلاس مشتق‌شده فراخوانی شود، شیء کلاس مشتق‌شده " +"به‌عنوان نخستین آرگومان ضمنی ارسال می‌شود." msgid "" -"Class methods are different than C++ or Java static methods. If you want " -"those, see :func:`staticmethod` in this section. For more information on " -"class methods, see :ref:`types`." +"Class methods are different than C++ or Java static methods. If you want those, " +"see :func:`staticmethod` in this section. For more information on class methods, " +"see :ref:`types`." msgstr "" -"متدهای کلاس با متدهای ایستای زبان‌های ++C یا Java تفاوت دارند. اگر به آن نوع " -"متدها نیاز دارید، به :func:`staticmethod` در همین بخش مراجعه کنید. برای " -"اطلاعات بیشتر دربارهٔ متدهای کلاس، :ref:`types` را ببینید." +"متدهای کلاس با متدهای ایستای زبان‌های ++C یا Java تفاوت دارند. اگر به آن نوع متدها " +"نیاز دارید، به :func:`staticmethod` در همین بخش مراجعه کنید. برای اطلاعات بیشتر " +"دربارهٔ متدهای کلاس، :ref:`types` را ببینید." msgid "" -"Class methods can now wrap other :term:`descriptors ` such as :" -"func:`property`." +"Class methods can now wrap other :term:`descriptors ` such " +"as :func:`property`." msgstr "" -"اکنون متدهای کلاس می‌توانند سایر :term:`توصیفگرها `، مانند :func:" -"`property`، را دربر بگیرند." +"اکنون متدهای کلاس می‌توانند سایر :term:`توصیفگرها `، " +"مانند :func:`property`، را دربر بگیرند." msgid "" -"Class methods now inherit the method attributes (:attr:`~function." -"__module__`, :attr:`~function.__name__`, :attr:`~function.__qualname__`, :" -"attr:`~function.__doc__` and :attr:`~function.__annotations__`) and have a " -"new ``__wrapped__`` attribute." +"Class methods now inherit the method attributes " +"(:attr:`~function.__module__`, :attr:`~function.__name__`, :attr:`~function.__qualname__`, :attr:`~function.__doc__` " +"and :attr:`~function.__annotations__`) and have a new ``__wrapped__`` attribute." msgstr "" -"اکنون متدهای کلاس ویژگی‌های متد (:attr:`~function.__module__`، :attr:" -"`~function.__name__`، :attr:`~function.__qualname__`، :attr:`~function." -"__doc__` و :attr:`~function.__annotations__`) را به ارث می‌برند و همچنین " -"دارای ویژگی جدید ``__wrapped__`` هستند." +"اکنون متدهای کلاس ویژگی‌های متد " +"(:attr:`~function.__module__`، :attr:`~function.__name__`، :attr:`~function.__qualname__`، :attr:`~function.__doc__` " +"و :attr:`~function.__annotations__`) را به ارث می‌برند و همچنین دارای ویژگی جدید " +"``__wrapped__`` هستند." msgid "" "Class methods can no longer wrap other :term:`descriptors ` such " "as :func:`property`." msgstr "" -"دیگر متدهای کلاس نمی‌توانند سایر :term:`توصیفگرها `، مانند :func:" -"`property`، را دربر بگیرند." +"دیگر متدهای کلاس نمی‌توانند سایر :term:`توصیفگرها `، " +"مانند :func:`property`، را دربر بگیرند." msgid "" -"Compile the *source* into a code or AST object. Code objects can be " -"executed by :func:`exec` or :func:`eval`. *source* can either be a normal " -"string, a byte string, or an AST object. Refer to the :mod:`ast` module " -"documentation for information on how to work with AST objects." +"Compile the *source* into a code or AST object. Code objects can be executed " +"by :func:`exec` or :func:`eval`. *source* can either be a normal string, a byte " +"string, or an AST object. Refer to the :mod:`ast` module documentation for " +"information on how to work with AST objects." msgstr "" -"*source* را به یک شیء کد یا AST کامپایل می‌کند. اشیای کد را می‌توان با :func:" -"`exec` یا :func:`eval` اجرا کرد. *source* می‌تواند یک رشتهٔ معمولی، یک رشتهٔ " -"بایتی یا یک شیء AST باشد. برای اطلاعات بیشتر دربارهٔ کار با اشیای AST، به " -"مستندات ماژول :mod:`ast` مراجعه کنید." +"*source* را به یک شیء کد یا AST کامپایل می‌کند. اشیای کد را می‌توان با :func:`exec` " +"یا :func:`eval` اجرا کرد. *source* می‌تواند یک رشتهٔ معمولی، یک رشتهٔ بایتی یا یک شیء " +"AST باشد. برای اطلاعات بیشتر دربارهٔ کار با اشیای AST، به مستندات ماژول :mod:`ast` " +"مراجعه کنید." msgid "" -"The *filename* argument should give the file from which the code was read; " -"pass some recognizable value if it wasn't read from a file (``''`` " -"is commonly used)." +"The *filename* argument should give the file from which the code was read; pass " +"some recognizable value if it wasn't read from a file (``''`` is commonly " +"used)." msgstr "" -"آرگومان *filename* باید نام پرونده‌ای را مشخص کند که کد از آن خوانده شده است؛ " -"اگر کد از پرونده خوانده نشده، مقدار قابل تشخیصی را ارسال کنید (معمولاً از " -"``''`` استفاده می‌شود)." +"آرگومان *filename* باید نام پرونده‌ای را مشخص کند که کد از آن خوانده شده است؛ اگر کد " +"از پرونده خوانده نشده، مقدار قابل تشخیصی را ارسال کنید (معمولاً از ``''`` " +"استفاده می‌شود)." msgid "" "The *mode* argument specifies what kind of code must be compiled; it can be " -"``'exec'`` if *source* consists of a sequence of statements, ``'eval'`` if " -"it consists of a single expression, or ``'single'`` if it consists of a " -"single interactive statement (in the latter case, expression statements that " -"evaluate to something other than ``None`` will be printed)." +"``'exec'`` if *source* consists of a sequence of statements, ``'eval'`` if it " +"consists of a single expression, or ``'single'`` if it consists of a single " +"interactive statement (in the latter case, expression statements that evaluate to " +"something other than ``None`` will be printed)." msgstr "" "آرگومان *mode* مشخص می‌کند که چه نوع کدی باید کامپایل شود؛ اگر *source* شامل " -"دنباله‌ای از دستورها باشد، می‌تواند ``'exec'`` باشد؛ اگر شامل تنها یک عبارت " -"باشد، ``'eval'``؛ و اگر شامل تنها یک دستور تعاملی باشد، ``'single'`` (در " -"حالت آخر، اگر عبارت مقداری غیر از ``None`` تولید کند، آن مقدار چاپ خواهد شد)." - -msgid "" -"The optional arguments *flags* and *dont_inherit* control which :ref:" -"`compiler options ` should be activated and which :ref:" -"`future features ` should be allowed. If neither is present (or both " -"are zero) the code is compiled with the same flags that affect the code that " -"is calling :func:`compile`. If the *flags* argument is given and " -"*dont_inherit* is not (or is zero) then the compiler options and the future " -"statements specified by the *flags* argument are used in addition to those " -"that would be used anyway. If *dont_inherit* is a non-zero integer then the " -"*flags* argument is it -- the flags (future features and compiler options) " -"in the surrounding code are ignored." -msgstr "" -"آرگومان‌های اختیاری *flags* و *dont_inherit* تعیین می‌کنند که کدام :ref:" -"`گزینه‌های کامپایلر ` فعال شوند و کدام :ref:`قابلیت‌های " -"آینده ` مجاز باشند. اگر هیچ‌یک از آن‌ها ارائه نشوند (یا هر دو صفر " -"باشند)، کد با همان پرچم‌هایی کامپایل می‌شود که بر کدی که :func:`compile` را " -"فراخوانی کرده است اعمال می‌شوند. اگر آرگومان *flags* ارائه شود و " -"*dont_inherit* ارائه نشود (یا صفر باشد)، گزینه‌های کامپایلر و دستورهای future " -"مشخص‌شده توسط *flags* علاوه بر مواردی که به‌طور معمول اعمال می‌شوند، استفاده " -"خواهند شد. اگر *dont_inherit* یک عدد صحیح ناصفر باشد، تنها از *flags* " -"استفاده می‌شود و پرچم‌های (قابلیت‌های future و گزینه‌های کامپایلر) موجود در کد " +"دنباله‌ای از دستورها باشد، می‌تواند ``'exec'`` باشد؛ اگر شامل تنها یک عبارت باشد، " +"``'eval'``؛ و اگر شامل تنها یک دستور تعاملی باشد، ``'single'`` (در حالت آخر، اگر " +"عبارت مقداری غیر از ``None`` تولید کند، آن مقدار چاپ خواهد شد)." + +msgid "" +"The optional arguments *flags* and *dont_inherit* control which :ref:`compiler " +"options ` should be activated and which :ref:`future features " +"` should be allowed. If neither is present (or both are zero) the code is " +"compiled with the same flags that affect the code that is calling :func:`compile`. " +"If the *flags* argument is given and *dont_inherit* is not (or is zero) then the " +"compiler options and the future statements specified by the *flags* argument are " +"used in addition to those that would be used anyway. If *dont_inherit* is a non-" +"zero integer then the *flags* argument is it -- the flags (future features and " +"compiler options) in the surrounding code are ignored." +msgstr "" +"آرگومان‌های اختیاری *flags* و *dont_inherit* تعیین می‌کنند که کدام :ref:`گزینه‌های " +"کامپایلر ` فعال شوند و کدام :ref:`قابلیت‌های آینده ` " +"مجاز باشند. اگر هیچ‌یک از آن‌ها ارائه نشوند (یا هر دو صفر باشند)، کد با همان پرچم‌هایی " +"کامپایل می‌شود که بر کدی که :func:`compile` را فراخوانی کرده است اعمال می‌شوند. اگر " +"آرگومان *flags* ارائه شود و *dont_inherit* ارائه نشود (یا صفر باشد)، گزینه‌های " +"کامپایلر و دستورهای future مشخص‌شده توسط *flags* علاوه بر مواردی که به‌طور معمول " +"اعمال می‌شوند، استفاده خواهند شد. اگر *dont_inherit* یک عدد صحیح ناصفر باشد، تنها از " +"*flags* استفاده می‌شود و پرچم‌های (قابلیت‌های future و گزینه‌های کامپایلر) موجود در کد " "پیرامون نادیده گرفته می‌شوند." msgid "" -"Compiler options and future statements are specified by bits which can be " -"bitwise ORed together to specify multiple options. The bitfield required to " -"specify a given future feature can be found as the :attr:`~__future__." -"_Feature.compiler_flag` attribute on the :class:`~__future__._Feature` " -"instance in the :mod:`__future__` module. :ref:`Compiler flags ` can be found in :mod:`ast` module, with ``PyCF_`` prefix." +"Compiler options and future statements are specified by bits which can be bitwise " +"ORed together to specify multiple options. The bitfield required to specify a given " +"future feature can be found as the :attr:`~__future__._Feature.compiler_flag` " +"attribute on the :class:`~__future__._Feature` instance in the :mod:`__future__` " +"module. :ref:`Compiler flags ` can be found in :mod:`ast` " +"module, with ``PyCF_`` prefix." msgstr "" -"گزینه‌های کامپایلر و دستورهای future با استفاده از بیت‌هایی مشخص می‌شوند که " -"می‌توان آن‌ها را با عملگر OR بیتی با یکدیگر ترکیب کرد تا چندین گزینه به‌طور " -"هم‌زمان مشخص شوند. بیت‌فیلد لازم برای مشخص کردن هر قابلیت future را می‌توان در " -"ویژگی :attr:`~__future__._Feature.compiler_flag` از نمونهٔ :class:" -"`~__future__._Feature` در ماژول :mod:`__future__` یافت. :ref:`پرچم‌های " -"کامپایلر ` نیز با پیشوند ``PyCF_`` در ماژول :mod:`ast` " -"موجود هستند." +"گزینه‌های کامپایلر و دستورهای future با استفاده از بیت‌هایی مشخص می‌شوند که می‌توان " +"آن‌ها را با عملگر OR بیتی با یکدیگر ترکیب کرد تا چندین گزینه به‌طور هم‌زمان مشخص شوند. " +"بیت‌فیلد لازم برای مشخص کردن هر قابلیت future را می‌توان در " +"ویژگی :attr:`~__future__._Feature.compiler_flag` از " +"نمونهٔ :class:`~__future__._Feature` در ماژول :mod:`__future__` یافت. :ref:`پرچم‌های " +"کامپایلر ` نیز با پیشوند ``PyCF_`` در ماژول :mod:`ast` موجود " +"هستند." msgid "" -"The argument *optimize* specifies the optimization level of the compiler; " -"the default value of ``-1`` selects the optimization level of the " -"interpreter as given by :option:`-O` options. Explicit levels are ``0`` (no " -"optimization; ``__debug__`` is true), ``1`` (asserts are removed, " -"``__debug__`` is false) or ``2`` (docstrings are removed too)." +"The argument *optimize* specifies the optimization level of the compiler; the " +"default value of ``-1`` selects the optimization level of the interpreter as given " +"by :option:`-O` options. Explicit levels are ``0`` (no optimization; ``__debug__`` " +"is true), ``1`` (asserts are removed, ``__debug__`` is false) or ``2`` (docstrings " +"are removed too)." msgstr "" -"آرگومان *optimize* سطح بهینه‌سازی کامپایلر را مشخص می‌کند؛ مقدار پیش‌فرض ``-1`` " -"سطح بهینه‌سازی مفسر را مطابق گزینه‌های :option:`-O` انتخاب می‌کند. سطوح صریح " -"عبارت‌اند از: ``0`` (بدون بهینه‌سازی؛ ``__debug__`` برابر با true است)، ``1`` " -"(دستورهای assert حذف می‌شوند و ``__debug__`` برابر false است)، و ``2`` (علاوه " -"بر آن، docstringها نیز حذف می‌شوند)." +"آرگومان *optimize* سطح بهینه‌سازی کامپایلر را مشخص می‌کند؛ مقدار پیش‌فرض ``-1`` سطح " +"بهینه‌سازی مفسر را مطابق گزینه‌های :option:`-O` انتخاب می‌کند. سطوح صریح عبارت‌اند از: " +"``0`` (بدون بهینه‌سازی؛ ``__debug__`` برابر با true است)، ``1`` (دستورهای assert حذف " +"می‌شوند و ``__debug__`` برابر false است)، و ``2`` (علاوه بر آن، docstringها نیز حذف " +"می‌شوند)." msgid "" -"This function raises :exc:`SyntaxError` or :exc:`ValueError` if the compiled " -"source is invalid." +"This function raises :exc:`SyntaxError` or :exc:`ValueError` if the compiled source " +"is invalid." msgstr "" -"اگر کد منبع کامپایل‌شده نامعتبر باشد، این تابع استثنای :exc:`SyntaxError` یا :" -"exc:`ValueError` ایجاد می‌کند." +"اگر کد منبع کامپایل‌شده نامعتبر باشد، این تابع استثنای :exc:`SyntaxError` " +"یا :exc:`ValueError` پرتاب می‌کند." msgid "" -"If you want to parse Python code into its AST representation, see :func:`ast." -"parse`." +"If you want to parse Python code into its AST representation, see :func:`ast.parse`." msgstr "" -"اگر می‌خواهید کد پایتون را به نمایش AST آن تجزیه کنید، به :func:`ast.parse` " -"مراجعه کنید." +"اگر می‌خواهید کد پایتون را به نمایش AST آن تجزیه کنید، به :func:`ast.parse` مراجعه " +"کنید." msgid "" -"Raises an :ref:`auditing event ` ``compile`` with arguments " -"``source`` and ``filename``. This event may also be raised by implicit " -"compilation." +"Raises an :ref:`auditing event ` ``compile`` with arguments ``source`` " +"and ``filename``. This event may also be raised by implicit compilation." msgstr "" -"یک :ref:`رویداد ممیزی ` با نام ``compile`` و آرگومان‌های ``source`` " -"و ``filename`` ایجاد می‌کند. این رویداد ممکن است در نتیجهٔ کامپایل ضمنی نیز " -"ایجاد شود." +"یک :ref:`رویداد ممیزی ` با نام ``compile`` و آرگومان‌های ``source`` و " +"``filename`` پرتاب می‌کند. این رویداد ممکن است در نتیجهٔ کامپایل ضمنی نیز پرتاب شود." msgid "" -"When compiling a string with multi-line code in ``'single'`` or ``'eval'`` " -"mode, input must be terminated by at least one newline character. This is " -"to facilitate detection of incomplete and complete statements in the :mod:" -"`code` module." +"When compiling a string with multi-line code in ``'single'`` or ``'eval'`` mode, " +"input must be terminated by at least one newline character. This is to facilitate " +"detection of incomplete and complete statements in the :mod:`code` module." msgstr "" -"هنگام کامپایل یک رشته شامل کد چندخطی در حالت ``'single'`` یا ``'eval'``، " -"ورودی باید دست‌کم با یک نویسهٔ پایان خط خاتمه یابد. این کار تشخیص دستورات ناقص " -"و کامل را در ماژول :mod:`code` تسهیل می‌کند." +"هنگام کامپایل یک رشته شامل کد چندخطی در حالت ``'single'`` یا ``'eval'``، ورودی باید " +"دست‌کم با یک نویسهٔ پایان خط خاتمه یابد. این کار تشخیص دستورات ناقص و کامل را در " +"ماژول :mod:`code` تسهیل می‌کند." msgid "" -"It is possible to crash the Python interpreter with a sufficiently large/" -"complex string when compiling to an AST object due to stack depth " -"limitations in Python's AST compiler." +"It is possible to crash the Python interpreter with a sufficiently large/complex " +"string when compiling to an AST object due to stack depth limitations in Python's " +"AST compiler." msgstr "" -"به دلیل محدودیت عمق پشته (stack depth) در کامپایلر AST پایتون، کامپایل یک " -"رشتهٔ به‌اندازهٔ کافی بزرگ یا پیچیده به یک شیء AST ممکن است باعث ازکارافتادن " -"(crash) مفسر پایتون شود." +"به دلیل محدودیت عمق پشته (stack depth) در کامپایلر AST پایتون، کامپایل یک رشتهٔ " +"به‌اندازهٔ کافی بزرگ یا پیچیده به یک شیء AST ممکن است باعث ازکارافتادن (crash) مفسر " +"پایتون شود." msgid "" -"Allowed use of Windows and Mac newlines. Also, input in ``'exec'`` mode " -"does not have to end in a newline anymore. Added the *optimize* parameter." +"Allowed use of Windows and Mac newlines. Also, input in ``'exec'`` mode does not " +"have to end in a newline anymore. Added the *optimize* parameter." msgstr "" -"استفاده از نویسه‌های پایان خط ویندوز و مک مجاز شد. همچنین، ورودی در حالت " -"``'exec'`` دیگر لازم نیست با یک نویسهٔ پایان خط خاتمه یابد. پارامتر " -"*optimize* نیز اضافه شد." +"استفاده از نویسه‌های پایان خط ویندوز و مک مجاز شد. همچنین، ورودی در حالت ``'exec'`` " +"دیگر لازم نیست با یک نویسهٔ پایان خط خاتمه یابد. پارامتر *optimize* نیز اضافه شد." msgid "" "Previously, :exc:`TypeError` was raised when null bytes were encountered in " "*source*." msgstr "" -"پیش از این، هنگام برخورد با بایت‌های تهی در *source*، استثنای :exc:" -"`TypeError` ایجاد می‌شد." +"پیش از این، هنگام برخورد با بایت‌های تهی در *source*، استثنای :exc:`TypeError` پرتاب " +"می‌شد." msgid "" -"``ast.PyCF_ALLOW_TOP_LEVEL_AWAIT`` can now be passed in flags to enable " -"support for top-level ``await``, ``async for``, and ``async with``." +"``ast.PyCF_ALLOW_TOP_LEVEL_AWAIT`` can now be passed in flags to enable support for " +"top-level ``await``, ``async for``, and ``async with``." msgstr "" "اکنون می‌توان ``ast.PyCF_ALLOW_TOP_LEVEL_AWAIT`` را در پرچم‌ها ارسال کرد تا از " -"``await``، ``async for`` و ``async with`` در سطح بالای کد (top-level) " -"پشتیبانی شود." +"``await``، ``async for`` و ``async with`` در سطح بالای کد (top-level) پشتیبانی شود." msgid "" -"Convert a single string or number to a complex number, or create a complex " -"number from real and imaginary parts." +"Convert a single string or number to a complex number, or create a complex number " +"from real and imaginary parts." msgstr "" -"تبدیل یک رشته یا عدد به یک عدد مختلط، یا ایجاد یک عدد مختلط از بخش‌های حقیقی " -"و موهومی یک عدد." +"تبدیل یک رشته یا عدد به یک عدد مختلط، یا ایجاد یک عدد مختلط از بخش‌های حقیقی و " +"موهومی یک عدد." msgid "Examples:" msgstr "مثال‌ها:" @@ -887,68 +859,62 @@ msgstr "" "(-1.23+4.5j)" msgid "" -"If the argument is a string, it must contain either a real part (in the same " -"format as for :func:`float`) or an imaginary part (in the same format but " -"with a ``'j'`` or ``'J'`` suffix), or both real and imaginary parts (the " -"sign of the imaginary part is mandatory in this case). The string can " -"optionally be surrounded by whitespaces and the round parentheses ``'('`` " -"and ``')'``, which are ignored. The string must not contain whitespace " -"between ``'+'``, ``'-'``, the ``'j'`` or ``'J'`` suffix, and the decimal " -"number. For example, ``complex('1+2j')`` is fine, but ``complex('1 + 2j')`` " -"raises :exc:`ValueError`. More precisely, the input must conform to the :" -"token:`~float:complexvalue` production rule in the following grammar, after " -"parentheses and leading and trailing whitespace characters are removed:" -msgstr "" -"اگر آرگومان یک رشته باشد، باید شامل بخش حقیقی (با همان قالبی که برای :func:" -"`float` استفاده می‌شود)، یا بخش موهومی (با همان قالب اما همراه با پسوند " -"``'j'`` یا ``'J'``)، یا هر دو بخش حقیقی و موهومی باشد (در این حالت، وجود " -"علامت بخش موهومی الزامی است). رشته می‌تواند به‌صورت اختیاری با نویسه‌های فاصلهٔ " -"سفید و پرانتزهای گرد ``'('`` و ``')'`` احاطه شده باشد که نادیده گرفته " -"می‌شوند. همچنین، نباید بین ``'+'``، ``'-'``، پسوند ``'j'`` یا ``'J'`` و عدد " -"ده‌دهی فاصلهٔ سفید وجود داشته باشد. برای مثال، ``complex('1+2j')`` معتبر است، " -"اما ``complex('1 + 2j')`` باعث ایجاد استثنای :exc:`ValueError` می‌شود. به‌طور " -"دقیق‌تر، پس از حذف پرانتزها و نویسه‌های فاصلهٔ سفید ابتدا و انتهای رشته، ورودی " -"باید با قاعدهٔ تولید :token:`~float:complexvalue` در دستور زبان زیر مطابقت " -"داشته باشد:" +"If the argument is a string, it must contain either a real part (in the same format " +"as for :func:`float`) or an imaginary part (in the same format but with a ``'j'`` " +"or ``'J'`` suffix), or both real and imaginary parts (the sign of the imaginary " +"part is mandatory in this case). The string can optionally be surrounded by " +"whitespaces and the round parentheses ``'('`` and ``')'``, which are ignored. The " +"string must not contain whitespace between ``'+'``, ``'-'``, the ``'j'`` or ``'J'`` " +"suffix, and the decimal number. For example, ``complex('1+2j')`` is fine, but " +"``complex('1 + 2j')`` raises :exc:`ValueError`. More precisely, the input must " +"conform to the :token:`~float:complexvalue` production rule in the following " +"grammar, after parentheses and leading and trailing whitespace characters are " +"removed:" +msgstr "" +"اگر آرگومان یک رشته باشد، باید شامل بخش حقیقی (با همان قالبی که برای :func:`float` " +"استفاده می‌شود)، یا بخش موهومی (با همان قالب اما همراه با پسوند ``'j'`` یا ``'J'``)، " +"یا هر دو بخش حقیقی و موهومی باشد (در این حالت، وجود علامت بخش موهومی الزامی است). " +"رشته می‌تواند به‌صورت اختیاری با نویسه‌های فاصلهٔ سفید و پرانتزهای گرد ``'('`` و " +"``')'`` احاطه شده باشد که نادیده گرفته می‌شوند. همچنین، نباید بین ``'+'``، ``'-'``، " +"پسوند ``'j'`` یا ``'J'`` و عدد ده‌دهی فاصلهٔ سفید وجود داشته باشد. برای مثال، " +"``complex('1+2j')`` معتبر است، اما ``complex('1 + 2j')`` باعث پرتاب " +"استثنای :exc:`ValueError` می‌شود. به‌طور دقیق‌تر، پس از حذف پرانتزها و نویسه‌های فاصلهٔ " +"سفید ابتدا و انتهای رشته، ورودی باید با قاعدهٔ تولید :token:`~float:complexvalue` در " +"دستور زبان زیر مطابقت داشته باشد:" msgid "" "If the argument is a number, the constructor serves as a numeric conversion " "like :class:`int` and :class:`float`. For a general Python object ``x``, " -"``complex(x)`` delegates to ``x.__complex__()``. If :meth:`~object." -"__complex__` is not defined then it falls back to :meth:`~object.__float__`. " -"If :meth:`!__float__` is not defined then it falls back to :meth:`~object." -"__index__`." -msgstr "" -"اگر آرگومان یک عدد باشد، سازنده مانند :class:`int` و :class:`float` به‌عنوان " -"یک تبدیل عددی عمل می‌کند. برای یک شیء عمومی پایتون به نام ``x``، تابع " -"``complex(x)`` فراخوانی را به ``x.__complex__()`` واگذار می‌کند. اگر :meth:" -"`~object.__complex__` تعریف نشده باشد، به :meth:`~object.__float__` " -"بازمی‌گردد. اگر :meth:`!__float__` نیز تعریف نشده باشد، به :meth:`~object." -"__index__` بازمی‌گردد." - -msgid "" -"If two arguments are provided or keyword arguments are used, each argument " -"may be any numeric type (including complex). If both arguments are real " -"numbers, return a complex number with the real component *real* and the " -"imaginary component *imag*. If both arguments are complex numbers, return a " -"complex number with the real component ``real.real-imag.imag`` and the " -"imaginary component ``real.imag+imag.real``. If one of arguments is a real " -"number, only its real component is used in the above expressions." -msgstr "" -"اگر دو آرگومان ارائه شوند یا از آرگومان‌های کلیدواژه‌ای استفاده شود، هر " -"آرگومان می‌تواند از هر نوع عددی (از جمله اعداد مختلط) باشد. اگر هر دو آرگومان " -"عدد حقیقی باشند، یک عدد مختلط با بخش حقیقی *real* و بخش موهومی *imag* " -"برگردانده می‌شود. اگر هر دو آرگومان عدد مختلط باشند، عدد مختلطی با بخش حقیقی " -"``real.real-imag.imag`` و بخش موهومی ``real.imag+imag.real`` برگردانده " -"می‌شود. اگر یکی از آرگومان‌ها عدد حقیقی باشد، فقط بخش حقیقی آن در عبارت‌های " -"بالا استفاده می‌شود." - -msgid "" -"See also :meth:`complex.from_number` which only accepts a single numeric " -"argument." -msgstr "" -"همچنین به :meth:`complex.from_number` مراجعه کنید که فقط یک آرگومان عددی را " -"می‌پذیرد." +"``complex(x)`` delegates to ``x.__complex__()``. If :meth:`~object.__complex__` is " +"not defined then it falls back to :meth:`~object.__float__`. If :meth:`!__float__` " +"is not defined then it falls back to :meth:`~object.__index__`." +msgstr "" +"اگر آرگومان یک عدد باشد، سازنده مانند :class:`int` و :class:`float` به‌عنوان یک " +"تبدیل عددی عمل می‌کند. برای یک شیء عمومی پایتون به نام ``x``، تابع ``complex(x)`` " +"فراخوانی را به ``x.__complex__()`` واگذار می‌کند. اگر :meth:`~object.__complex__` " +"تعریف نشده باشد، به :meth:`~object.__float__` بازمی‌گردد. اگر :meth:`!__float__` نیز " +"تعریف نشده باشد، به :meth:`~object.__index__` بازمی‌گردد." + +msgid "" +"If two arguments are provided or keyword arguments are used, each argument may be " +"any numeric type (including complex). If both arguments are real numbers, return a " +"complex number with the real component *real* and the imaginary component *imag*. " +"If both arguments are complex numbers, return a complex number with the real " +"component ``real.real-imag.imag`` and the imaginary component " +"``real.imag+imag.real``. If one of arguments is a real number, only its real " +"component is used in the above expressions." +msgstr "" +"اگر دو آرگومان ارائه شوند یا از آرگومان‌های کلیدواژه‌ای استفاده شود، هر آرگومان " +"می‌تواند از هر نوع عددی (از جمله اعداد مختلط) باشد. اگر هر دو آرگومان عدد حقیقی " +"باشند، یک عدد مختلط با بخش حقیقی *real* و بخش موهومی *imag* برگردانده می‌شود. اگر هر " +"دو آرگومان عدد مختلط باشند، عدد مختلطی با بخش حقیقی ``real.real-imag.imag`` و بخش " +"موهومی ``real.imag+imag.real`` برگردانده می‌شود. اگر یکی از آرگومان‌ها عدد حقیقی " +"باشد، فقط بخش حقیقی آن در عبارت‌های بالا استفاده می‌شود." + +msgid "" +"See also :meth:`complex.from_number` which only accepts a single numeric argument." +msgstr "" +"همچنین به :meth:`complex.from_number` مراجعه کنید که فقط یک آرگومان عددی را می‌پذیرد." msgid "If all arguments are omitted, returns ``0j``." msgstr "اگر همهٔ آرگومان‌ها حذف شوند، مقدار ``0j`` برگردانده می‌شود." @@ -957,157 +923,146 @@ msgid "The complex type is described in :ref:`typesnumeric`." msgstr "نوع مختلط در :ref:`typesnumeric` توضیح داده شده است." msgid "Grouping digits with underscores as in code literals is allowed." -msgstr "" -"گروه‌بندی رقم‌ها با استفاده از زیرخط، همانند ثابت‌های عددی در کد، مجاز است." +msgstr "گروه‌بندی رقم‌ها با استفاده از زیرخط، همانند ثابت‌های عددی در کد، مجاز است." msgid "" -"Falls back to :meth:`~object.__index__` if :meth:`~object.__complex__` and :" -"meth:`~object.__float__` are not defined." +"Falls back to :meth:`~object.__index__` if :meth:`~object.__complex__` " +"and :meth:`~object.__float__` are not defined." msgstr "" -"اگر :meth:`~object.__complex__` و :meth:`~object.__float__` تعریف نشده " -"باشند، به :meth:`~object.__index__` بازمی‌گردد." +"اگر :meth:`~object.__complex__` و :meth:`~object.__float__` تعریف نشده باشند، " +"به :meth:`~object.__index__` بازمی‌گردد." msgid "" -"Passing a complex number as the *real* or *imag* argument is now deprecated; " -"it should only be passed as a single positional argument." +"Passing a complex number as the *real* or *imag* argument is now deprecated; it " +"should only be passed as a single positional argument." msgstr "" -"ارسال یک عدد مختلط به‌عنوان آرگومان *real* یا *imag* اکنون منسوخ شده است؛ عدد " -"مختلط باید فقط به‌صورت یک آرگومان مکانی ارسال شود." +"ارسال یک عدد مختلط به‌عنوان آرگومان *real* یا *imag* اکنون منسوخ شده است؛ عدد مختلط " +"باید فقط به‌صورت یک آرگومان مکانی ارسال شود." msgid "" -"This is a relative of :func:`setattr`. The arguments are an object and a " -"string. The string must be the name of one of the object's attributes. The " -"function deletes the named attribute, provided the object allows it. For " -"example, ``delattr(x, 'foobar')`` is equivalent to ``del x.foobar``. *name* " -"need not be a Python identifier (see :func:`setattr`)." +"This is a relative of :func:`setattr`. The arguments are an object and a string. " +"The string must be the name of one of the object's attributes. The function " +"deletes the named attribute, provided the object allows it. For example, " +"``delattr(x, 'foobar')`` is equivalent to ``del x.foobar``. *name* need not be a " +"Python identifier (see :func:`setattr`)." msgstr "" -"این تابع همتای :func:`setattr` است. آرگومان‌های آن یک شیء و یک رشته هستند. " -"رشته باید نام یکی از ویژگی‌های شیء باشد. در صورت مجاز بودن، این تابع ویژگی " -"نام‌برده را حذف می‌کند. برای مثال، ``delattr(x, 'foobar')`` معادل ``del x." -"foobar`` است. *name* الزامی ندارد که یک شناسهٔ معتبر پایتون باشد (به :func:" -"`setattr` مراجعه کنید)." +"این تابع همتای :func:`setattr` است. آرگومان‌های آن یک شیء و یک رشته هستند. رشته باید " +"نام یکی از ویژگی‌های شیء باشد. در صورت مجاز بودن، این تابع ویژگی نام‌برده را حذف " +"می‌کند. برای مثال، ``delattr(x, 'foobar')`` معادل ``del x.foobar`` است. *name* " +"الزامی ندارد که یک شناسهٔ معتبر پایتون باشد (به :func:`setattr` مراجعه کنید)." msgid "" "Create a new dictionary. The :class:`dict` object is the dictionary class. " "See :class:`dict` and :ref:`typesmapping` for documentation about this class." msgstr "" -"ایجاد یک فرهنگ لغت جدید. شیء :class:`dict` کلاس فرهنگ لغت است. برای مستندات " -"این کلاس، به :class:`dict` و :ref:`typesmapping` مراجعه کنید." +"ایجاد یک دیکشنری جدید. شیء :class:`dict` کلاس دیکشنری است. برای مستندات این کلاس، " +"به :class:`dict` و :ref:`typesmapping` مراجعه کنید." msgid "" -"For other containers see the built-in :class:`list`, :class:`set`, and :" -"class:`tuple` classes, as well as the :mod:`collections` module." +"For other containers see the built-in :class:`list`, :class:`set`, " +"and :class:`tuple` classes, as well as the :mod:`collections` module." msgstr "" -"برای سایر انواع محفظه‌ها، به کلاس‌های داخلی :class:`list`، :class:`set` و :" -"class:`tuple`، و همچنین ماژول :mod:`collections` مراجعه کنید." +"برای سایر انواع محفظه‌ها، به کلاس‌های داخلی :class:`list`، :class:`set` " +"و :class:`tuple`، و همچنین ماژول :mod:`collections` مراجعه کنید." msgid "" -"Without arguments, return the list of names in the current local scope. " -"With an argument, attempt to return a list of valid attributes for that " -"object." +"Without arguments, return the list of names in the current local scope. With an " +"argument, attempt to return a list of valid attributes for that object." msgstr "" -"بدون آرگومان، فهرست نام‌های موجود در دامنهٔ محلیِ فعلی را بازمی‌گرداند. با ارسال " -"یک آرگومان، تلاش می‌کند فهرستی از ویژگی‌های معتبر آن شیء را بازگرداند." +"بدون آرگومان، فهرست نام‌های موجود در دامنهٔ محلیِ فعلی را بازمی‌گرداند. با ارسال یک " +"آرگومان، تلاش می‌کند فهرستی از ویژگی‌های معتبر آن شیء را بازگرداند." msgid "" -"If the object has a method named :meth:`~object.__dir__`, this method will " -"be called and must return the list of attributes. This allows objects that " -"implement a custom :func:`~object.__getattr__` or :func:`~object." -"__getattribute__` function to customize the way :func:`dir` reports their " -"attributes." +"If the object has a method named :meth:`~object.__dir__`, this method will be " +"called and must return the list of attributes. This allows objects that implement a " +"custom :func:`~object.__getattr__` or :func:`~object.__getattribute__` function to " +"customize the way :func:`dir` reports their attributes." msgstr "" -"اگر شیء متدی با نام :meth:`~object.__dir__` داشته باشد، این متد فراخوانی " -"می‌شود و باید فهرستی از ویژگی‌ها را برگرداند. این امکان را فراهم می‌کند که " -"اشیایی که :func:`~object.__getattr__` یا :func:`~object.__getattribute__` " -"سفارشی را پیاده‌سازی کرده‌اند، نحوهٔ گزارش ویژگی‌های خود توسط :func:`dir` را " -"سفارشی‌سازی کنند." +"اگر شیء متدی با نام :meth:`~object.__dir__` داشته باشد، این متد فراخوانی می‌شود و " +"باید فهرستی از ویژگی‌ها را برگرداند. این امکان را فراهم می‌کند که اشیایی " +"که :func:`~object.__getattr__` یا :func:`~object.__getattribute__` سفارشی را " +"پیاده‌سازی کرده‌اند، نحوهٔ گزارش ویژگی‌های خود توسط :func:`dir` را سفارشی‌سازی کنند." msgid "" -"If the object does not provide :meth:`~object.__dir__`, the function tries " -"its best to gather information from the object's :attr:`~object.__dict__` " -"attribute, if defined, and from its type object. The resulting list is not " -"necessarily complete and may be inaccurate when the object has a custom :" -"func:`~object.__getattr__`." +"If the object does not provide :meth:`~object.__dir__`, the function tries its best " +"to gather information from the object's :attr:`~object.__dict__` attribute, if " +"defined, and from its type object. The resulting list is not necessarily complete " +"and may be inaccurate when the object has a custom :func:`~object.__getattr__`." msgstr "" -"اگر شیء متد :meth:`~object.__dir__` را ارائه نکند، این تابع در صورت تعریف " -"شدن، تلاش می‌کند تا حد امکان اطلاعات را از ویژگی :attr:`~object.__dict__` شیء " -"و همچنین از شیء نوع (type object) آن جمع‌آوری کند. فهرست حاصل لزوماً کامل نیست " -"و اگر شیء دارای :func:`~object.__getattr__` سفارشی باشد، ممکن است دقیق هم " -"نباشد." +"اگر شیء متد :meth:`~object.__dir__` را ارائه نکند، این تابع در صورت تعریف شدن، تلاش " +"می‌کند تا حد امکان اطلاعات را از ویژگی :attr:`~object.__dict__` شیء و همچنین از شیء " +"نوع (type object) آن جمع‌آوری کند. فهرست حاصل لزوماً کامل نیست و اگر شیء " +"دارای :func:`~object.__getattr__` سفارشی باشد، ممکن است دقیق هم نباشد." msgid "" -"The default :func:`dir` mechanism behaves differently with different types " -"of objects, as it attempts to produce the most relevant, rather than " -"complete, information:" +"The default :func:`dir` mechanism behaves differently with different types of " +"objects, as it attempts to produce the most relevant, rather than complete, " +"information:" msgstr "" -"سازوکار پیش‌فرض :func:`dir` بسته به نوع شیء رفتار متفاوتی دارد، زیرا تلاش " -"می‌کند به‌جای ارائهٔ اطلاعات کامل، مرتبط‌ترین اطلاعات را ارائه دهد:" +"سازوکار پیش‌فرض :func:`dir` بسته به نوع شیء رفتار متفاوتی دارد، زیرا تلاش می‌کند " +"به‌جای ارائهٔ اطلاعات کامل، مرتبط‌ترین اطلاعات را ارائه دهد:" msgid "" -"If the object is a module object, the list contains the names of the " -"module's attributes." +"If the object is a module object, the list contains the names of the module's " +"attributes." msgstr "اگر شیء یک ماژول باشد، فهرست شامل نام ویژگی‌های آن ماژول خواهد بود." msgid "" "If the object is a type or class object, the list contains the names of its " "attributes, and recursively of the attributes of its bases." msgstr "" -"اگر شیء یک نوع (type) یا کلاس باشد، فهرست شامل نام ویژگی‌های آن و همچنین، " -"به‌صورت بازگشتی، نام ویژگی‌های کلاس‌های پایهٔ آن خواهد بود." +"اگر شیء یک نوع (type) یا کلاس باشد، فهرست شامل نام ویژگی‌های آن و همچنین، به‌صورت " +"بازگشتی، نام ویژگی‌های کلاس‌های پایهٔ آن خواهد بود." msgid "" -"Otherwise, the list contains the object's attributes' names, the names of " -"its class's attributes, and recursively of the attributes of its class's " -"base classes." +"Otherwise, the list contains the object's attributes' names, the names of its " +"class's attributes, and recursively of the attributes of its class's base classes." msgstr "" -"در غیر این صورت، فهرست شامل نام ویژگی‌های شیء، نام ویژگی‌های کلاس آن، و همچنین " -"به‌صورت بازگشتی، نام ویژگی‌های کلاس‌های پایهٔ آن خواهد بود." +"در غیر این صورت، فهرست شامل نام ویژگی‌های شیء، نام ویژگی‌های کلاس آن، و همچنین به‌صورت " +"بازگشتی، نام ویژگی‌های کلاس‌های پایهٔ آن خواهد بود." msgid "The resulting list is sorted alphabetically. For example:" msgstr "فهرست حاصل به‌ترتیب الفبایی مرتب می‌شود. برای مثال:" msgid "" "Because :func:`dir` is supplied primarily as a convenience for use at an " -"interactive prompt, it tries to supply an interesting set of names more than " -"it tries to supply a rigorously or consistently defined set of names, and " -"its detailed behavior may change across releases. For example, metaclass " -"attributes are not in the result list when the argument is a class." -msgstr "" -"از آنجا که :func:`dir` در درجهٔ اول برای سهولت استفاده در اعلان تعاملی طراحی " -"شده است، بیشتر تلاش می‌کند مجموعه‌ای مفید از نام‌ها را ارائه دهد تا مجموعه‌ای با " -"تعریف دقیق و سازگار. بنابراین، رفتار دقیق آن ممکن است بین نسخه‌های مختلف " -"تغییر کند. برای مثال، اگر آرگومان یک کلاس باشد، ویژگی‌های فراداده در فهرست " -"نتایج قرار نمی‌گیرند." - -msgid "" -"Take two (non-complex) numbers as arguments and return a pair of numbers " -"consisting of their quotient and remainder when using integer division. " -"With mixed operand types, the rules for binary arithmetic operators apply. " -"For integers, the result is the same as ``(a // b, a % b)``. For floating-" -"point numbers the result is ``(q, a % b)``, where *q* is usually ``math." -"floor(a / b)`` but may be 1 less than that. In any case ``q * b + a % b`` " -"is very close to *a*, if ``a % b`` is non-zero it has the same sign as *b*, " -"and ``0 <= abs(a % b) < abs(b)``." +"interactive prompt, it tries to supply an interesting set of names more than it " +"tries to supply a rigorously or consistently defined set of names, and its detailed " +"behavior may change across releases. For example, metaclass attributes are not in " +"the result list when the argument is a class." +msgstr "" +"از آنجا که :func:`dir` در درجهٔ اول برای سهولت استفاده در اعلان تعاملی طراحی شده " +"است، بیشتر تلاش می‌کند مجموعه‌ای مفید از نام‌ها را ارائه دهد تا مجموعه‌ای با تعریف دقیق " +"و سازگار. بنابراین، رفتار دقیق آن ممکن است بین نسخه‌های مختلف تغییر کند. برای مثال، " +"اگر آرگومان یک کلاس باشد، ویژگی‌های فراداده در فهرست نتایج قرار نمی‌گیرند." + +msgid "" +"Take two (non-complex) numbers as arguments and return a pair of numbers consisting " +"of their quotient and remainder when using integer division. With mixed operand " +"types, the rules for binary arithmetic operators apply. For integers, the result " +"is the same as ``(a // b, a % b)``. For floating-point numbers the result is ``(q, " +"a % b)``, where *q* is usually ``math.floor(a / b)`` but may be 1 less than that. " +"In any case ``q * b + a % b`` is very close to *a*, if ``a % b`` is non-zero it has " +"the same sign as *b*, and ``0 <= abs(a % b) < abs(b)``." msgstr "" "دو عدد (غیرمختلط) را به‌عنوان آرگومان می‌گیرد و جفتی از اعداد شامل خارج‌قسمت و " -"باقیماندهٔ تقسیم صحیح آن‌ها را برمی‌گرداند. در صورت متفاوت بودن نوع عملوندها، " -"قواعد عملگرهای حسابی دودویی اعمال می‌شود. برای اعداد صحیح، نتیجه برابر با " -"``(a // b, a % b)`` است. برای اعداد ممیز شناور، نتیجه ``(q, a % b)`` است که " -"در آن *q* معمولاً برابر ``math.floor(a / b)`` است، اما ممکن است یک واحد کمتر " -"از آن باشد. در هر صورت، مقدار ``q * b + a % b`` بسیار به *a* نزدیک است، و " -"اگر ``a % b`` صفر نباشد، هم‌علامت با *b* خواهد بود و همچنین ``0 <= abs(a % b) " -"< abs(b)`` برقرار است." +"باقیماندهٔ تقسیم صحیح آن‌ها را برمی‌گرداند. در صورت متفاوت بودن نوع عملوندها، قواعد " +"عملگرهای حسابی دودویی اعمال می‌شود. برای اعداد صحیح، نتیجه برابر با ``(a // b, a % " +"b)`` است. برای اعداد ممیز شناور، نتیجه ``(q, a % b)`` است که در آن *q* معمولاً برابر " +"``math.floor(a / b)`` است، اما ممکن است یک واحد کمتر از آن باشد. در هر صورت، مقدار " +"``q * b + a % b`` بسیار به *a* نزدیک است، و اگر ``a % b`` صفر نباشد، هم‌علامت با *b* " +"خواهد بود و همچنین ``0 <= abs(a % b) < abs(b)`` برقرار است." msgid "" -"Return an enumerate object. *iterable* must be a sequence, an :term:" -"`iterator`, or some other object which supports iteration. The :meth:" -"`~iterator.__next__` method of the iterator returned by :func:`enumerate` " -"returns a tuple containing a count (from *start* which defaults to 0) and " -"the values obtained from iterating over *iterable*." +"Return an enumerate object. *iterable* must be a sequence, an :term:`iterator`, or " +"some other object which supports iteration. The :meth:`~iterator.__next__` method " +"of the iterator returned by :func:`enumerate` returns a tuple containing a count " +"(from *start* which defaults to 0) and the values obtained from iterating over " +"*iterable*." msgstr "" "یک شیء enumerate را برمی‌گرداند. *iterable* باید یک دنباله، یک :term:`تکرارگر " -"` یا هر شیء دیگری باشد که از پیمایش پشتیبانی می‌کند. متد :meth:" -"`~iterator.__next__` تکرارگر بازگردانده‌شده توسط :func:`enumerate`، تاپلی " +"` یا هر شیء دیگری باشد که از پیمایش پشتیبانی می‌کند. " +"متد :meth:`~iterator.__next__` تکرارگر بازگردانده‌شده توسط :func:`enumerate`، تاپلی " "شامل یک شمارنده (که از *start* آغاز می‌شود و مقدار پیش‌فرض آن 0 است) و مقادیر " "به‌دست‌آمده از پیمایش *iterable* را برمی‌گرداند." @@ -1146,233 +1101,225 @@ msgid "The result of the evaluated expression." msgstr "نتیجهٔ عبارت ارزیابی‌شده." msgid "raises" -msgstr "ایجاد می‌کند" +msgstr "پرتاب می‌کند" msgid "Syntax errors are reported as exceptions." msgstr "خطاهای نحوی به‌صورت استثنا گزارش می‌شوند." msgid "" -"This function executes arbitrary code. Calling it with untrusted user-" -"supplied input will lead to security vulnerabilities." +"This function executes arbitrary code. Calling it with untrusted user-supplied " +"input will lead to security vulnerabilities." msgstr "" -"این تابع کد دلخواه را اجرا می‌کند. فراخوانی آن با ورودیِ تأمین‌شده از سوی کاربر " -"که قابل اعتماد نیست، منجر به آسیب‌پذیری‌های امنیتی خواهد شد." +"این تابع کد دلخواه را اجرا می‌کند. فراخوانی آن با ورودیِ تأمین‌شده از سوی کاربر که " +"قابل اعتماد نیست، منجر به آسیب‌پذیری‌های امنیتی خواهد شد." msgid "" -"The *source* argument is parsed and evaluated as a Python expression " -"(technically speaking, a condition list) using the *globals* and *locals* " -"mappings as global and local namespace. If the *globals* dictionary is " -"present and does not contain a value for the key ``__builtins__``, a " -"reference to the dictionary of the built-in module :mod:`builtins` is " -"inserted under that key before *source* is parsed. Overriding " -"``__builtins__`` can be used to restrict or change the available names, but " -"this is **not** a security mechanism: the executed code can still access all " +"The *source* argument is parsed and evaluated as a Python expression (technically " +"speaking, a condition list) using the *globals* and *locals* mappings as global and " +"local namespace. If the *globals* dictionary is present and does not contain a " +"value for the key ``__builtins__``, a reference to the dictionary of the built-in " +"module :mod:`builtins` is inserted under that key before *source* is parsed. " +"Overriding ``__builtins__`` can be used to restrict or change the available names, " +"but this is **not** a security mechanism: the executed code can still access all " "builtins. If the *locals* mapping is omitted it defaults to the *globals* " "dictionary. If both mappings are omitted, the source is executed with the " -"*globals* and *locals* in the environment where :func:`eval` is called. " -"Note, *eval()* will only have access to the :term:`nested scopes ` (non-locals) in the enclosing environment if they are already " -"referenced in the scope that is calling :func:`eval` (e.g. via a :keyword:" -"`nonlocal` statement)." -msgstr "" -"آرگومان *source* به‌عنوان یک عبارت پایتون (از نظر فنی، یک condition list) با " -"استفاده از نگاشت‌های *globals* و *locals* به‌ترتیب به‌عنوان فضای نام سراسری و " -"محلی، تجزیه و ارزیابی می‌شود. اگر دیکشنری *globals* وجود داشته باشد اما کلید " -"``__builtins__`` را نداشته باشد، پیش از تجزیهٔ *source*، ارجاعی به دیکشنری " -"ماژول داخلی :mod:`builtins` تحت این کلید درج می‌شود. بازنویسی " -"``__builtins__`` می‌تواند برای محدود کردن یا تغییر نام‌های در دسترس استفاده " -"شود، اما این **یک سازوکار امنیتی نیست**؛ زیرا کد اجراشده همچنان می‌تواند به " -"تمام توابع و اشیای داخلی دسترسی داشته باشد. اگر نگاشت *locals* ارائه نشود، " -"به‌طور پیش‌فرض از دیکشنری *globals* استفاده می‌شود. اگر هر دو نگاشت حذف شوند، " -"*source* با استفاده از *globals* و *locals* محیطی که :func:`eval` در آن " -"فراخوانی شده اجرا می‌شود. توجه داشته باشید که *eval()* تنها در صورتی به :term:" -"`دامنه‌های تو‌در‌تو ` (متغیرهای nonlocal) محیط پیرامون دسترسی " -"خواهد داشت که آن‌ها از قبل در دامنه‌ای که :func:`eval` را فراخوانی می‌کند ارجاع " -"داده شده باشند (برای مثال، از طریق دستور :keyword:`nonlocal`)." +"*globals* and *locals* in the environment where :func:`eval` is called. Note, " +"*eval()* will only have access to the :term:`nested scopes ` (non-" +"locals) in the enclosing environment if they are already referenced in the scope " +"that is calling :func:`eval` (e.g. via a :keyword:`nonlocal` statement)." +msgstr "" +"آرگومان *source* به‌عنوان یک عبارت پایتون (از نظر فنی، یک condition list) با استفاده " +"از نگاشت‌های *globals* و *locals* به‌ترتیب به‌عنوان فضای نام سراسری و محلی، تجزیه و " +"ارزیابی می‌شود. اگر دیکشنری *globals* وجود داشته باشد اما کلید ``__builtins__`` را " +"نداشته باشد، پیش از تجزیهٔ *source*، ارجاعی به دیکشنری ماژول داخلی :mod:`builtins` " +"تحت این کلید درج می‌شود. بازنویسی ``__builtins__`` می‌تواند برای محدود کردن یا تغییر " +"نام‌های در دسترس استفاده شود، اما این **یک سازوکار امنیتی نیست**؛ زیرا کد اجراشده " +"همچنان می‌تواند به تمام توابع و اشیای داخلی دسترسی داشته باشد. اگر نگاشت *locals* " +"ارائه نشود، به‌طور پیش‌فرض از دیکشنری *globals* استفاده می‌شود. اگر هر دو نگاشت حذف " +"شوند، *source* با استفاده از *globals* و *locals* محیطی که :func:`eval` در آن " +"فراخوانی شده اجرا می‌شود. توجه داشته باشید که *eval()* تنها در صورتی " +"به :term:`دامنه‌های تو‌در‌تو ` (متغیرهای nonlocal) محیط پیرامون دسترسی " +"خواهد داشت که آن‌ها از قبل در دامنه‌ای که :func:`eval` را فراخوانی می‌کند ارجاع داده " +"شده باشند (برای مثال، از طریق دستور :keyword:`nonlocal`)." msgid "Example:" msgstr "مثال:" msgid "" -"This function can also be used to execute arbitrary code objects (such as " -"those created by :func:`compile`). In this case, pass a code object instead " -"of a string. If the code object has been compiled with ``'exec'`` as the " -"*mode* argument, :func:`eval`\\'s return value will be ``None``." +"This function can also be used to execute arbitrary code objects (such as those " +"created by :func:`compile`). In this case, pass a code object instead of a " +"string. If the code object has been compiled with ``'exec'`` as the *mode* " +"argument, :func:`eval`\\'s return value will be ``None``." msgstr "" -"از این تابع همچنین می‌توان برای اجرای اشیای کد دلخواه (مانند اشیایی که توسط :" -"func:`compile` ایجاد شده‌اند) استفاده کرد. در این حالت، به‌جای رشته، یک شیء کد " -"ارسال کنید. اگر شیء کد با آرگومان *mode* برابر ``'exec'`` کامپایل شده باشد، " -"مقدار بازگشتی :func:`eval` برابر ``None`` خواهد بود." +"از این تابع همچنین می‌توان برای اجرای اشیای کد دلخواه (مانند اشیایی که " +"توسط :func:`compile` ایجاد شده‌اند) استفاده کرد. در این حالت، به‌جای رشته، یک شیء کد " +"ارسال کنید. اگر شیء کد با آرگومان *mode* برابر ``'exec'`` کامپایل شده باشد، مقدار " +"بازگشتی :func:`eval` برابر ``None`` خواهد بود." msgid "" -"Hints: dynamic execution of statements is supported by the :func:`exec` " -"function. The :func:`globals` and :func:`locals` functions return the " -"current global and local dictionary, respectively, which may be useful to " -"pass around for use by :func:`eval` or :func:`exec`." +"Hints: dynamic execution of statements is supported by the :func:`exec` function. " +"The :func:`globals` and :func:`locals` functions return the current global and " +"local dictionary, respectively, which may be useful to pass around for use " +"by :func:`eval` or :func:`exec`." msgstr "" -"راهنمایی: اجرای پویای دستورها توسط تابع :func:`exec` پشتیبانی می‌شود. توابع :" -"func:`globals` و :func:`locals` به‌ترتیب فرهنگ لغت سراسری و محلی فعلی را " -"برمی‌گردانند که می‌توان آن‌ها را برای استفاده در :func:`eval` یا :func:`exec` " -"به توابع دیگر ارسال کرد." +"راهنمایی: اجرای پویای دستورها توسط تابع :func:`exec` پشتیبانی می‌شود. " +"توابع :func:`globals` و :func:`locals` به‌ترتیب دیکشنری سراسری و محلی فعلی را " +"برمی‌گردانند که می‌توان آن‌ها را برای استفاده در :func:`eval` یا :func:`exec` به توابع " +"دیگر ارسال کرد." msgid "" -"If the given source is a string, then leading and trailing spaces and tabs " -"are stripped." +"If the given source is a string, then leading and trailing spaces and tabs are " +"stripped." msgstr "" -"اگر کد منبع داده‌شده یک رشته باشد، فاصله‌ها و نویسه‌های تب ابتدا و انتهای آن " -"حذف می‌شوند." +"اگر کد منبع داده‌شده یک رشته باشد، فاصله‌ها و نویسه‌های تب ابتدا و انتهای آن حذف " +"می‌شوند." msgid "" -"See :func:`ast.literal_eval` for a function to evaluate strings with " -"expressions containing only literals." +"See :func:`ast.literal_eval` for a function to evaluate strings with expressions " +"containing only literals." msgstr "" -"برای تابعی که رشته‌های حاوی عبارت‌هایی متشکل فقط از مقادیر ثابت را ارزیابی " -"می‌کند، به :func:`ast.literal_eval` مراجعه کنید." +"برای تابعی که رشته‌های حاوی عبارت‌هایی متشکل فقط از مقادیر ثابت را ارزیابی می‌کند، " +"به :func:`ast.literal_eval` مراجعه کنید." msgid "" -"Raises an :ref:`auditing event ` ``exec`` with the code object as " -"the argument. Code compilation events may also be raised." +"Raises an :ref:`auditing event ` ``exec`` with the code object as the " +"argument. Code compilation events may also be raised." msgstr "" -"یک :ref:`رویداد ممیزی ` با نام ``exec`` و شیء کد به‌عنوان آرگومان " -"ایجاد می‌کند. رویدادهای مربوط به کامپایل کد نیز ممکن است ایجاد شوند." +"یک :ref:`رویداد ممیزی ` با نام ``exec`` و شیء کد به‌عنوان آرگومان پرتاب " +"می‌کند. رویدادهای مربوط به کامپایل کد نیز ممکن است پرتاب شوند." msgid "The *globals* and *locals* arguments can now be passed as keywords." msgstr "" -"آرگومان‌های *globals* و *locals* اکنون می‌توانند به‌صورت آرگومان کلیدی نیز " -"ارسال شوند." +"آرگومان‌های *globals* و *locals* اکنون می‌توانند به‌صورت آرگومان کلیدواژه‌ای نیز ارسال " +"شوند." msgid "" -"The semantics of the default *locals* namespace have been adjusted as " -"described for the :func:`locals` builtin." +"The semantics of the default *locals* namespace have been adjusted as described for " +"the :func:`locals` builtin." msgstr "" -"معنای فضای نام پیش‌فرض *locals* مطابق توضیحات ارائه‌شده برای تابع داخلی :func:" -"`locals` تنظیم شده است." +"معنای فضای نام پیش‌فرض *locals* مطابق توضیحات ارائه‌شده برای تابع " +"داخلی :func:`locals` تنظیم شده است." msgid "" -"This function supports dynamic execution of Python code. *source* must be " -"either a string or a code object. If it is a string, the string is parsed " -"as a suite of Python statements which is then executed (unless a syntax " -"error occurs). [#]_ If it is a code object, it is simply executed. In all " -"cases, the code that's executed is expected to be valid as file input (see " -"the section :ref:`file-input` in the Reference Manual). Be aware that the :" -"keyword:`nonlocal`, :keyword:`yield`, and :keyword:`return` statements may " -"not be used outside of function definitions even within the context of code " -"passed to the :func:`exec` function. The return value is ``None``." +"This function supports dynamic execution of Python code. *source* must be either a " +"string or a code object. If it is a string, the string is parsed as a suite of " +"Python statements which is then executed (unless a syntax error occurs). [#]_ If it " +"is a code object, it is simply executed. In all cases, the code that's executed is " +"expected to be valid as file input (see the section :ref:`file-input` in the " +"Reference Manual). Be aware that the :keyword:`nonlocal`, :keyword:`yield`, " +"and :keyword:`return` statements may not be used outside of function definitions " +"even within the context of code passed to the :func:`exec` function. The return " +"value is ``None``." msgstr "" -"این تابع از اجرای پویای کد پایتون پشتیبانی می‌کند. *source* باید یا یک رشته " -"باشد یا یک شیء کد. اگر رشته باشد، به‌عنوان مجموعه‌ای از دستورهای پایتون تجزیه " -"و سپس اجرا می‌شود (مگر اینکه خطای نحوی رخ دهد). [#]_ اگر یک شیء کد باشد، " -"مستقیماً اجرا می‌شود. در همهٔ موارد، انتظار می‌رود کد اجراشده به‌عنوان ورودی فایل " -"معتبر باشد (به بخش :ref:`file-input` در راهنمای مرجع مراجعه کنید). توجه " -"داشته باشید که دستورهای :keyword:`nonlocal`، :keyword:`yield` و :keyword:" -"`return` حتی در کدی که از طریق :func:`exec` اجرا می‌شود نیز خارج از تعریف " -"تابع قابل استفاده نیستند. مقدار بازگشتی ``None`` است." +"این تابع از اجرای پویای کد پایتون پشتیبانی می‌کند. *source* باید یا یک رشته باشد یا " +"یک شیء کد. اگر رشته باشد، به‌عنوان مجموعه‌ای از دستورهای پایتون تجزیه و سپس اجرا " +"می‌شود (مگر اینکه خطای نحوی رخ دهد). [#]_ اگر یک شیء کد باشد، مستقیماً اجرا می‌شود. در " +"همهٔ موارد، انتظار می‌رود کد اجراشده به‌عنوان ورودی فایل معتبر باشد (به بخش :ref:`file-" +"input` در راهنمای مرجع مراجعه کنید). توجه داشته باشید که " +"دستورهای :keyword:`nonlocal`، :keyword:`yield` و :keyword:`return` حتی در کدی که از " +"طریق :func:`exec` اجرا می‌شود نیز خارج از تعریف تابع قابل استفاده نیستند. مقدار " +"بازگشتی ``None`` است." msgid "" "In all cases, if the optional parts are omitted, the code is executed in the " -"current scope. If only *globals* is provided, it must be a dictionary (and " -"not a subclass of dictionary), which will be used for both the global and " -"the local variables. If *globals* and *locals* are given, they are used for " -"the global and local variables, respectively. If provided, *locals* can be " -"any mapping object. Remember that at the module level, globals and locals " -"are the same dictionary." -msgstr "" -"در همهٔ حالت‌ها، اگر بخش‌های اختیاری حذف شوند، کد در حوزهٔ فعلی اجرا می‌شود. اگر " -"فقط *globals* ارائه شود، باید یک فرهنگ لغت باشد (و نه یک زیرکلاس از فرهنگ " -"لغت) که هم برای متغیرهای سراسری و هم برای متغیرهای محلی استفاده خواهد شد. " -"اگر هر دو *globals* و *locals* ارائه شوند، به‌ترتیب برای متغیرهای سراسری و " -"محلی استفاده می‌شوند. در صورت ارائه، *locals* می‌تواند هر شیء نگاشتی باشد. به " -"خاطر داشته باشید که در سطح ماژول، globals و locals همان فرهنگ لغت یکسان " -"هستند." +"current scope. If only *globals* is provided, it must be a dictionary (and not a " +"subclass of dictionary), which will be used for both the global and the local " +"variables. If *globals* and *locals* are given, they are used for the global and " +"local variables, respectively. If provided, *locals* can be any mapping object. " +"Remember that at the module level, globals and locals are the same dictionary." +msgstr "" +"در همهٔ حالت‌ها، اگر بخش‌های اختیاری حذف شوند، کد در محدوده فعلی اجرا می‌شود. اگر فقط " +"*globals* ارائه شود، باید یک دیکشنری باشد (و نه یک زیرکلاس از فرهنگ لغت) که هم برای " +"متغیرهای سراسری و هم برای متغیرهای محلی استفاده خواهد شد. اگر هر دو *globals* و " +"*locals* ارائه شوند، به‌ترتیب برای متغیرهای سراسری و محلی استفاده می‌شوند. در صورت " +"ارائه، *locals* می‌تواند هر شیء نگاشتی باشد. به خاطر داشته باشید که در سطح ماژول، " +"globals و locals همان دیکشنری یکسان هستند." msgid "" -"When ``exec`` gets two separate objects as *globals* and *locals*, the code " -"will be executed as if it were embedded in a class definition. This means " -"functions and classes defined in the executed code will not be able to " -"access variables assigned at the top level (as the \"top level\" variables " -"are treated as class variables in a class definition)." +"When ``exec`` gets two separate objects as *globals* and *locals*, the code will be " +"executed as if it were embedded in a class definition. This means functions and " +"classes defined in the executed code will not be able to access variables assigned " +"at the top level (as the \"top level\" variables are treated as class variables in " +"a class definition)." msgstr "" -"وقتی ``exec`` دو شیء جداگانه را به‌عنوان *globals* و *locals* دریافت می‌کند، " -"کد به‌گونه‌ای اجرا می‌شود که گویی درون یک تعریف کلاس قرار دارد. این بدان معناست " -"که توابع و کلاس‌های تعریف‌شده در کد اجراشده نمی‌توانند به متغیرهای اختصاص‌یافته " -"در سطح بالا دسترسی داشته باشند (زیرا متغیرهای «سطح بالا» در تعریف کلاس " -"به‌عنوان متغیرهای کلاس در نظر گرفته می‌شوند)." +"وقتی ``exec`` دو شیء جداگانه را به‌عنوان *globals* و *locals* دریافت می‌کند، کد " +"به‌گونه‌ای اجرا می‌شود که گویی درون یک تعریف کلاس قرار دارد. این بدان معناست که توابع " +"و کلاس‌های تعریف‌شده در کد اجراشده نمی‌توانند به متغیرهای اختصاص‌یافته در سطح بالا " +"دسترسی داشته باشند (زیرا متغیرهای «سطح بالا» در تعریف کلاس به‌عنوان متغیرهای کلاس در " +"نظر گرفته می‌شوند)." msgid "" -"If the *globals* dictionary does not contain a value for the key " -"``__builtins__``, a reference to the dictionary of the built-in module :mod:" -"`builtins` is inserted under that key. Overriding ``__builtins__`` can be " -"used to restrict or change the available names, but this is **not** a " -"security mechanism: the executed code can still access all builtins." +"If the *globals* dictionary does not contain a value for the key ``__builtins__``, " +"a reference to the dictionary of the built-in module :mod:`builtins` is inserted " +"under that key. Overriding ``__builtins__`` can be used to restrict or change the " +"available names, but this is **not** a security mechanism: the executed code can " +"still access all builtins." msgstr "" -"اگر فرهنگ لغت *globals* مقداری برای کلید ``__builtins__`` نداشته باشد، " -"ارجاعی به فرهنگ لغت ماژول داخلی :mod:`builtins` با همان کلید در آن درج " -"می‌شود. بازنویسی ``__builtins__`` می‌تواند برای محدود کردن یا تغییر نام‌های در " -"دسترس استفاده شود، اما این **یک سازوکار امنیتی نیست**؛ زیرا کدی که اجرا " -"می‌شود همچنان می‌تواند به تمام اشیای داخلی دسترسی داشته باشد." +"اگر دیکشنری *globals* مقداری برای کلید ``__builtins__`` نداشته باشد، ارجاعی به " +"دیکشنری ماژول داخلی :mod:`builtins` با همان کلید در آن درج می‌شود. بازنویسی " +"``__builtins__`` می‌تواند برای محدود کردن یا تغییر نام‌های در دسترس استفاده شود، اما " +"این **یک سازوکار امنیتی نیست**؛ زیرا کدی که اجرا می‌شود همچنان می‌تواند به تمام اشیای " +"داخلی دسترسی داشته باشد." msgid "" -"The *closure* argument specifies a closure--a tuple of cellvars. It's only " -"valid when the *object* is a code object containing :term:`free (closure) " -"variables `. The length of the tuple must exactly match " -"the length of the code object's :attr:`~codeobject.co_freevars` attribute." +"The *closure* argument specifies a closure--a tuple of cellvars. It's only valid " +"when the *object* is a code object containing :term:`free (closure) variables " +"`. The length of the tuple must exactly match the length of the " +"code object's :attr:`~codeobject.co_freevars` attribute." msgstr "" -"آرگومان *closure* یک closure را مشخص می‌کند؛ یعنی یک تاپل از cellvarها. این " -"آرگومان تنها زمانی معتبر است که *object* یک شیء کد باشد که شامل :term:" -"`متغیرهای آزاد (closure) ` باشد. طول این تاپل باید دقیقاً " -"با طول ویژگی :attr:`~codeobject.co_freevars` شیء کد برابر باشد." +"آرگومان *closure* یک closure را مشخص می‌کند؛ یعنی یک تاپل از cellvarها. این آرگومان " +"تنها زمانی معتبر است که *object* یک شیء کد باشد که شامل :term:`متغیرهای آزاد " +"(closure) ` باشد. طول این تاپل باید دقیقاً با طول " +"ویژگی :attr:`~codeobject.co_freevars` شیء کد برابر باشد." msgid "" -"The built-in functions :func:`globals` and :func:`locals` return the current " -"global and local namespace, respectively, which may be useful to pass around " -"for use as the second and third argument to :func:`exec`." +"The built-in functions :func:`globals` and :func:`locals` return the current global " +"and local namespace, respectively, which may be useful to pass around for use as " +"the second and third argument to :func:`exec`." msgstr "" -"توابع داخلی :func:`globals` و :func:`locals` به‌ترتیب فضای نام سراسری و محلی " -"فعلی را برمی‌گردانند که می‌توانند برای ارسال به‌عنوان آرگومان دوم و سوم تابع :" -"func:`exec` مفید باشند." +"توابع داخلی :func:`globals` و :func:`locals` به‌ترتیب فضای نام سراسری و محلی فعلی را " +"برمی‌گردانند که می‌توانند برای ارسال به‌عنوان آرگومان دوم و سوم تابع :func:`exec` مفید " +"باشند." msgid "" -"The default *locals* act as described for function :func:`locals` below. " -"Pass an explicit *locals* dictionary if you need to see effects of the code " -"on *locals* after function :func:`exec` returns." +"The default *locals* act as described for function :func:`locals` below. Pass an " +"explicit *locals* dictionary if you need to see effects of the code on *locals* " +"after function :func:`exec` returns." msgstr "" -"*locals* پیش‌فرض همان‌گونه عمل می‌کند که در ادامه برای تابع :func:`locals` " -"توضیح داده شده است. اگر لازم است پس از بازگشت تابع :func:`exec` تغییرات " -"اعمال‌شده روی *locals* را مشاهده کنید، یک دیکشنری *locals* صریح ارسال کنید." +"*locals* پیش‌فرض همان‌گونه عمل می‌کند که در ادامه برای تابع :func:`locals` توضیح داده " +"شده است. اگر لازم است پس از بازگشت تابع :func:`exec` تغییرات اعمال‌شده روی *locals* " +"را مشاهده کنید، یک دیکشنری *locals* صریح ارسال کنید." msgid "Added the *closure* parameter." msgstr "پارامتر *closure* اضافه شد." msgid "" -"Construct an iterator from those elements of *iterable* for which *function* " -"is true. *iterable* may be either a sequence, a container which supports " -"iteration, or an iterator. If *function* is ``None``, the identity function " -"is assumed, that is, all elements of *iterable* that are false are removed." +"Construct an iterator from those elements of *iterable* for which *function* is " +"true. *iterable* may be either a sequence, a container which supports iteration, " +"or an iterator. If *function* is ``None``, the identity function is assumed, that " +"is, all elements of *iterable* that are false are removed." msgstr "" -"از میان عناصر *iterable*، آن‌هایی را که *function* برایشان مقدار True " -"برمی‌گرداند، انتخاب کرده و یک تکرارگر می‌سازد. *iterable* می‌تواند یک دنباله، " -"یک محفظهٔ قابل پیمایش، یا یک تکرارگر باشد. اگر *function* برابر ``None`` " -"باشد، تابع همانی در نظر گرفته می‌شود؛ یعنی تمام عناصری از *iterable* که " -"نادرست (False) هستند، حذف می‌شوند." +"از میان عناصر *iterable*، آن‌هایی را که *function* برایشان مقدار True برمی‌گرداند، " +"انتخاب کرده و یک تکرارگر می‌سازد. *iterable* می‌تواند یک دنباله، یک محفظهٔ تکرارپذیر، " +"یا یک تکرارگر باشد. اگر *function* برابر ``None`` باشد، تابع همانی در نظر گرفته " +"می‌شود؛ یعنی تمام عناصری از *iterable* که نادرست (False) هستند، حذف می‌شوند." msgid "" -"Note that ``filter(function, iterable)`` is equivalent to the generator " -"expression ``(item for item in iterable if function(item))`` if function is " -"not ``None`` and ``(item for item in iterable if item)`` if function is " -"``None``." +"Note that ``filter(function, iterable)`` is equivalent to the generator expression " +"``(item for item in iterable if function(item))`` if function is not ``None`` and " +"``(item for item in iterable if item)`` if function is ``None``." msgstr "" "توجه داشته باشید که اگر *function* برابر ``None`` نباشد، ``filter(function, " -"iterable)`` معادل عبارت مولد ``(item for item in iterable if " -"function(item))`` است، و اگر *function* برابر ``None`` باشد، معادل ``(item " -"for item in iterable if item)`` خواهد بود." +"iterable)`` معادل عبارت تولیدگر ``(item for item in iterable if function(item))`` " +"است، و اگر *function* برابر ``None`` باشد، معادل ``(item for item in iterable if " +"item)`` خواهد بود." msgid "" -"See :func:`itertools.filterfalse` for the complementary function that " -"returns elements of *iterable* for which *function* is false." +"See :func:`itertools.filterfalse` for the complementary function that returns " +"elements of *iterable* for which *function* is false." msgstr "" -"برای تابع مکملی که عناصر *iterable* را که *function* برای آن‌ها مقدار نادرست " -"(false) برمی‌گرداند، بازمی‌گرداند، به :func:`itertools.filterfalse` مراجعه " -"کنید." +"برای تابع مکملی که عناصر *iterable* را که *function* برای آن‌ها مقدار نادرست (false) " +"برمی‌گرداند، بازمی‌گرداند، به :func:`itertools.filterfalse` مراجعه کنید." msgid "Return a floating-point number constructed from a number or a string." msgstr "یک عدد ممیز شناور که از یک عدد یا یک رشته ساخته شده است را برمی‌گرداند." @@ -1402,53 +1349,50 @@ msgstr "" msgid "" "If the argument is a string, it should contain a decimal number, optionally " -"preceded by a sign, and optionally embedded in whitespace. The optional " -"sign may be ``'+'`` or ``'-'``; a ``'+'`` sign has no effect on the value " -"produced. The argument may also be a string representing a NaN (not-a-" -"number), or positive or negative infinity. More precisely, the input must " -"conform to the :token:`~float:floatvalue` production rule in the following " -"grammar, after leading and trailing whitespace characters are removed:" +"preceded by a sign, and optionally embedded in whitespace. The optional sign may " +"be ``'+'`` or ``'-'``; a ``'+'`` sign has no effect on the value produced. The " +"argument may also be a string representing a NaN (not-a-number), or positive or " +"negative infinity. More precisely, the input must conform to " +"the :token:`~float:floatvalue` production rule in the following grammar, after " +"leading and trailing whitespace characters are removed:" msgstr "" -"اگر آرگومان یک رشته باشد، باید شامل یک عدد ده‌دهی باشد که به‌صورت اختیاری با " -"یک علامت و همچنین با فاصلهٔ سفید احاطه شده باشد. علامت اختیاری می‌تواند " -"``'+'`` یا ``'-'`` باشد؛ علامت ``'+'`` تأثیری بر مقدار تولیدشده ندارد. " -"آرگومان همچنین می‌تواند رشته‌ای باشد که یک NaN (عدد نیست) یا بی‌نهایت مثبت یا " -"منفی را نمایش می‌دهد. به‌طور دقیق‌تر، پس از حذف نویسه‌های فاصلهٔ سفید ابتدا و " -"انتهای رشته، ورودی باید با قاعدهٔ تولید :token:`~float:floatvalue` در دستور " -"زبان زیر مطابقت داشته باشد:" +"اگر آرگومان یک رشته باشد، باید شامل یک عدد ده‌دهی باشد که به‌صورت اختیاری با یک علامت " +"و همچنین با فاصلهٔ سفید احاطه شده باشد. علامت اختیاری می‌تواند ``'+'`` یا ``'-'`` " +"باشد؛ علامت ``'+'`` تأثیری بر مقدار تولیدشده ندارد. آرگومان همچنین می‌تواند رشته‌ای " +"باشد که یک NaN (عدد نیست) یا بی‌نهایت مثبت یا منفی را نمایش می‌دهد. به‌طور دقیق‌تر، پس " +"از حذف نویسه‌های فاصلهٔ سفید ابتدا و انتهای رشته، ورودی باید با قاعدهٔ " +"تولید :token:`~float:floatvalue` در دستور زبان زیر مطابقت داشته باشد:" msgid "" -"Case is not significant, so, for example, \"inf\", \"Inf\", \"INFINITY\", " -"and \"iNfINity\" are all acceptable spellings for positive infinity." +"Case is not significant, so, for example, \"inf\", \"Inf\", \"INFINITY\", and " +"\"iNfINity\" are all acceptable spellings for positive infinity." msgstr "" "بزرگی و کوچکی حروف (case) اهمیتی ندارد؛ بنابراین، برای مثال، «inf»، «Inf»، " "«INFINITY» و «iNfINity» همگی برای نمایش بی‌نهایت مثبت معتبر هستند." msgid "" -"Otherwise, if the argument is an integer or a floating-point number, a " -"floating-point number with the same value (within Python's floating-point " -"precision) is returned. If the argument is outside the range of a Python " -"float, an :exc:`OverflowError` will be raised." +"Otherwise, if the argument is an integer or a floating-point number, a floating-" +"point number with the same value (within Python's floating-point precision) is " +"returned. If the argument is outside the range of a Python float, " +"an :exc:`OverflowError` will be raised." msgstr "" -"در غیر این صورت، اگر آرگومان یک عدد صحیح یا یک عدد ممیز شناور باشد، یک عدد " -"ممیز شناور با همان مقدار (در محدودهٔ دقت اعداد ممیز شناور پایتون) برگردانده " -"می‌شود. اگر آرگومان خارج از محدودهٔ یک عدد ممیز شناور در پایتون باشد، استثنای :" -"exc:`OverflowError` ایجاد خواهد شد." +"در غیر این صورت، اگر آرگومان یک عدد صحیح یا یک عدد ممیز شناور باشد، یک عدد ممیز " +"شناور با همان مقدار (در محدودهٔ دقت اعداد ممیز شناور پایتون) برگردانده می‌شود. اگر " +"آرگومان خارج از محدودهٔ یک عدد ممیز شناور در پایتون باشد، " +"استثنای :exc:`OverflowError` پرتاب خواهد شد." msgid "" -"For a general Python object ``x``, ``float(x)`` delegates to ``x." -"__float__()``. If :meth:`~object.__float__` is not defined then it falls " -"back to :meth:`~object.__index__`." +"For a general Python object ``x``, ``float(x)`` delegates to ``x.__float__()``. " +"If :meth:`~object.__float__` is not defined then it falls back " +"to :meth:`~object.__index__`." msgstr "" -"برای یک شیء عمومی پایتون به نام ``x``، تابع ``float(x)`` فراخوانی را به ``x." -"__float__()`` واگذار می‌کند. اگر :meth:`~object.__float__` تعریف نشده باشد، " +"برای یک شیء عمومی پایتون به نام ``x``، تابع ``float(x)`` فراخوانی را به " +"``x.__float__()`` واگذار می‌کند. اگر :meth:`~object.__float__` تعریف نشده باشد، " "به :meth:`~object.__index__` بازمی‌گردد." -msgid "" -"See also :meth:`float.from_number` which only accepts a numeric argument." +msgid "See also :meth:`float.from_number` which only accepts a numeric argument." msgstr "" -"همچنین به :meth:`float.from_number` مراجعه کنید که فقط یک آرگومان عددی را " -"می‌پذیرد." +"همچنین به :meth:`float.from_number` مراجعه کنید که فقط یک آرگومان عددی را می‌پذیرد." msgid "If no argument is given, ``0.0`` is returned." msgstr "اگر هیچ آرگومانی ارائه نشود، مقدار ``0.0`` برگردانده می‌شود." @@ -1457,144 +1401,141 @@ msgid "The float type is described in :ref:`typesnumeric`." msgstr "نوع ممیز شناور در :ref:`typesnumeric` توضیح داده شده است." msgid "" -"Falls back to :meth:`~object.__index__` if :meth:`~object.__float__` is not " -"defined." +"Falls back to :meth:`~object.__index__` if :meth:`~object.__float__` is not defined." msgstr "" "اگر :meth:`~object.__float__` تعریف نشده باشد، به :meth:`~object.__index__` " "بازمی‌گردد." msgid "" "Convert a *value* to a \"formatted\" representation, as controlled by " -"*format_spec*. The interpretation of *format_spec* will depend on the type " -"of the *value* argument; however, there is a standard formatting syntax that " -"is used by most built-in types: :ref:`formatspec`." +"*format_spec*. The interpretation of *format_spec* will depend on the type of the " +"*value* argument; however, there is a standard formatting syntax that is used by " +"most built-in types: :ref:`formatspec`." msgstr "" -"*value* را مطابق با *format_spec* به یک نمایش قالب‌بندی‌شده تبدیل می‌کند. نحوهٔ " -"تفسیر *format_spec* به نوع آرگومان *value* بستگی دارد؛ با این حال، یک نحو " -"استاندارد برای قالب‌بندی وجود دارد که بیشتر انواع داخلی از آن استفاده " -"می‌کنند: :ref:`formatspec`." +"*value* را مطابق با *format_spec* به یک نمایش قالب‌بندی‌شده تبدیل می‌کند. نحوهٔ تفسیر " +"*format_spec* به نوع آرگومان *value* بستگی دارد؛ با این حال، یک نحو استاندارد برای " +"قالب‌بندی وجود دارد که بیشتر انواع داخلی از آن استفاده می‌کنند: :ref:`formatspec`." msgid "" -"The default *format_spec* is an empty string which usually gives the same " -"effect as calling :func:`str(value) `." +"The default *format_spec* is an empty string which usually gives the same effect as " +"calling :func:`str(value) `." msgstr "" "مقدار پیش‌فرض *format_spec* یک رشتهٔ خالی است که معمولاً همان اثری را دارد که " "فراخوانی :func:`str(value) ` ایجاد می‌کند." msgid "" -"A call to ``format(value, format_spec)`` is translated to ``type(value)." -"__format__(value, format_spec)`` which bypasses the instance dictionary when " -"searching for the value's :meth:`~object.__format__` method. A :exc:" -"`TypeError` exception is raised if the method search reaches :mod:`object` " -"and the *format_spec* is non-empty, or if either the *format_spec* or the " -"return value are not strings." +"A call to ``format(value, format_spec)`` is translated to " +"``type(value).__format__(value, format_spec)`` which bypasses the instance " +"dictionary when searching for the value's :meth:`~object.__format__` method. " +"A :exc:`TypeError` exception is raised if the method search reaches :mod:`object` " +"and the *format_spec* is non-empty, or if either the *format_spec* or the return " +"value are not strings." msgstr "" "فراخوانی ``format(value, format_spec)`` به ``type(value).__format__(value, " -"format_spec)`` تبدیل می‌شود که هنگام جستجوی متد :meth:`~object.__format__` " -"مربوط به *value*، فرهنگ لغت نمونه را نادیده می‌گیرد. اگر جستجوی متد به :mod:" -"`object` برسد و *format_spec* خالی نباشد، یا اگر *format_spec* یا مقدار " -"بازگشتی رشته نباشند، استثنای :exc:`TypeError` ایجاد می‌شود." +"format_spec)`` تبدیل می‌شود که هنگام جستجوی متد :meth:`~object.__format__` مربوط به " +"*value*، دیکشنری نمونه را نادیده می‌گیرد. اگر جستجوی متد به :mod:`object` برسد و " +"*format_spec* خالی نباشد، یا اگر *format_spec* یا مقدار بازگشتی رشته نباشند، " +"استثنای :exc:`TypeError` پرتاب می‌شود." msgid "" -"``object().__format__(format_spec)`` raises :exc:`TypeError` if " -"*format_spec* is not an empty string." +"``object().__format__(format_spec)`` raises :exc:`TypeError` if *format_spec* is " +"not an empty string." msgstr "" "اگر *format_spec* یک رشتهٔ خالی نباشد، ``object().__format__(format_spec)`` " -"استثنای :exc:`TypeError` ایجاد می‌کند." +"استثنای :exc:`TypeError` پرتاب می‌کند." msgid "" "Return a new :class:`frozenset` object, optionally with elements taken from " -"*iterable*. ``frozenset`` is a built-in class. See :class:`frozenset` and :" -"ref:`types-set` for documentation about this class." +"*iterable*. ``frozenset`` is a built-in class. See :class:`frozenset` " +"and :ref:`types-set` for documentation about this class." msgstr "" -"یک شیء جدید از نوع :class:`frozenset` را برمی‌گرداند که در صورت ارائه، عناصر " -"آن از *iterable* گرفته می‌شوند. ``frozenset`` یک کلاس داخلی است. برای مستندات " -"این کلاس، به :class:`frozenset` و :ref:`types-set` مراجعه کنید." +"یک شیء جدید از نوع :class:`frozenset` را برمی‌گرداند که در صورت ارائه، عناصر آن از " +"*iterable* گرفته می‌شوند. ``frozenset`` یک کلاس داخلی است. برای مستندات این کلاس، " +"به :class:`frozenset` و :ref:`types-set` مراجعه کنید." msgid "" -"For other containers see the built-in :class:`set`, :class:`list`, :class:" -"`tuple`, and :class:`dict` classes, as well as the :mod:`collections` module." +"For other containers see the built-in :class:`set`, :class:`list`, :class:`tuple`, " +"and :class:`dict` classes, as well as the :mod:`collections` module." msgstr "" -"برای سایر انواع محفظه‌ها، به کلاس‌های داخلی :class:`set`، :class:`list`، :" -"class:`tuple` و :class:`dict`، و همچنین ماژول :mod:`collections` مراجعه کنید." +"برای سایر انواع محفظه‌ها، به کلاس‌های " +"داخلی :class:`set`، :class:`list`، :class:`tuple` و :class:`dict`، و همچنین " +"ماژول :mod:`collections` مراجعه کنید." msgid "" -"Return the value of the named attribute of *object*. *name* must be a " -"string. If the string is the name of one of the object's attributes, the " -"result is the value of that attribute. For example, ``getattr(x, " -"'foobar')`` is equivalent to ``x.foobar``. If the named attribute does not " -"exist, *default* is returned if provided, otherwise :exc:`AttributeError` is " -"raised. *name* need not be a Python identifier (see :func:`setattr`)." +"Return the value of the named attribute of *object*. *name* must be a string. If " +"the string is the name of one of the object's attributes, the result is the value " +"of that attribute. For example, ``getattr(x, 'foobar')`` is equivalent to " +"``x.foobar``. If the named attribute does not exist, *default* is returned if " +"provided, otherwise :exc:`AttributeError` is raised. *name* need not be a Python " +"identifier (see :func:`setattr`)." msgstr "" -"مقدار ویژگیِ نام‌گذاری‌شدهٔ *object* را برمی‌گرداند. *name* باید یک رشته باشد. " -"اگر رشته، نام یکی از ویژگی‌های شیء باشد، نتیجه مقدار آن ویژگی خواهد بود. برای " -"مثال، ``getattr(x, 'foobar')`` معادل ``x.foobar`` است. اگر ویژگیِ نام‌گذاری‌شده " -"وجود نداشته باشد، در صورت ارائه، *default* برگردانده می‌شود؛ در غیر این صورت، " -"استثنای :exc:`AttributeError` ایجاد می‌شود. لازم نیست *name* یک شناسهٔ معتبر " -"پایتون باشد (به :func:`setattr` مراجعه کنید)." +"مقدار ویژگیِ نام‌گذاری‌شدهٔ *object* را برمی‌گرداند. *name* باید یک رشته باشد. اگر رشته، " +"نام یکی از ویژگی‌های شیء باشد، نتیجه مقدار آن ویژگی خواهد بود. برای مثال، " +"``getattr(x, 'foobar')`` معادل ``x.foobar`` است. اگر ویژگیِ نام‌گذاری‌شده وجود نداشته " +"باشد، در صورت ارائه، *default* برگردانده می‌شود؛ در غیر این صورت، " +"استثنای :exc:`AttributeError` پرتاب می‌شود. لازم نیست *name* یک شناسهٔ معتبر پایتون " +"باشد (به :func:`setattr` مراجعه کنید)." msgid "" -"Since :ref:`private name mangling ` happens at " -"compilation time, one must manually mangle a private attribute's (attributes " -"with two leading underscores) name in order to retrieve it with :func:" -"`getattr`." +"Since :ref:`private name mangling ` happens at compilation " +"time, one must manually mangle a private attribute's (attributes with two leading " +"underscores) name in order to retrieve it with :func:`getattr`." msgstr "" -"از آنجا که :ref:`تغییر نام خصوصی ` در زمان کامپایل " -"انجام می‌شود، برای بازیابی یک ویژگی خصوصی (ویژگی‌هایی که با دو زیرخط آغاز " -"می‌شوند) با استفاده از :func:`getattr`، باید نام آن را به‌صورت دستی تغییر دهید." +"از آنجا که :ref:`تغییر نام خصوصی ` در زمان کامپایل انجام " +"می‌شود، برای بازیابی یک ویژگی خصوصی (ویژگی‌هایی که با دو زیرخط آغاز می‌شوند) با " +"استفاده از :func:`getattr`، باید نام آن را به‌صورت دستی تغییر دهید." msgid "" -"Return the dictionary implementing the current module namespace. For code " -"within functions, this is set when the function is defined and remains the " -"same regardless of where the function is called." +"Return the dictionary implementing the current module namespace. For code within " +"functions, this is set when the function is defined and remains the same regardless " +"of where the function is called." msgstr "" -"فرهنگ لغتی را که فضای نام ماژول فعلی را پیاده‌سازی می‌کند، برمی‌گرداند. برای " -"کدهای داخل توابع، این مقدار هنگام تعریف تابع تنظیم می‌شود و بدون توجه به " -"این‌که تابع از کجا فراخوانی شود، ثابت باقی می‌ماند." +"دیکشنریی را که فضای نام ماژول فعلی را پیاده‌سازی می‌کند، برمی‌گرداند. برای کدهای داخل " +"توابع، این مقدار هنگام تعریف تابع تنظیم می‌شود و بدون توجه به این‌که تابع از کجا " +"فراخوانی شود، ثابت باقی می‌ماند." msgid "" -"The arguments are an object and a string. The result is ``True`` if the " -"string is the name of one of the object's attributes, ``False`` if not. " -"(This is implemented by calling ``getattr(object, name)`` and seeing whether " -"it raises an :exc:`AttributeError` or not.)" +"The arguments are an object and a string. The result is ``True`` if the string is " +"the name of one of the object's attributes, ``False`` if not. (This is implemented " +"by calling ``getattr(object, name)`` and seeing whether it raises " +"an :exc:`AttributeError` or not.)" msgstr "" -"آرگومان‌ها شامل یک شیء و یک رشته هستند. اگر رشته نام یکی از ویژگی‌های آن شیء " -"باشد، نتیجه ``True`` و در غیر این صورت ``False`` خواهد بود. (این کار با " -"فراخوانی ``getattr(object, name)`` و بررسی اینکه آیا استثنای :exc:" -"`AttributeError` ایجاد می‌شود یا نه، پیاده‌سازی شده است.)" +"آرگومان‌ها شامل یک شیء و یک رشته هستند. اگر رشته نام یکی از ویژگی‌های آن شیء باشد، " +"نتیجه ``True`` و در غیر این صورت ``False`` خواهد بود. (این کار با فراخوانی " +"``getattr(object, name)`` و بررسی اینکه آیا استثنای :exc:`AttributeError` پرتاب " +"می‌شود یا نه، پیاده‌سازی شده است.)" msgid "" -"Return the hash value of the object (if it has one). Hash values are " -"integers. They are used to quickly compare dictionary keys during a " -"dictionary lookup. Numeric values that compare equal have the same hash " -"value (even if they are of different types, as is the case for 1 and 1.0)." +"Return the hash value of the object (if it has one). Hash values are integers. " +"They are used to quickly compare dictionary keys during a dictionary lookup. " +"Numeric values that compare equal have the same hash value (even if they are of " +"different types, as is the case for 1 and 1.0)." msgstr "" -"مقدار هش شیء را (در صورتی که داشته باشد) برمی‌گرداند. مقادیر هش اعداد صحیح " -"هستند. از آن‌ها برای مقایسهٔ سریع کلیدهای فرهنگ لغت هنگام جستجو در فرهنگ لغت " -"استفاده می‌شود. مقادیر عددی که با یکدیگر برابر مقایسه می‌شوند، مقدار هش یکسانی " -"دارند (حتی اگر از نوع‌های متفاوتی باشند، مانند 1 و 1.0)." +"مقدار هش شیء را (در صورتی که داشته باشد) برمی‌گرداند. مقادیر هش اعداد صحیح هستند. از " +"آن‌ها برای مقایسهٔ سریع کلیدهای دیکشنری هنگام جستجو در دیکشنری استفاده می‌شود. مقادیر " +"عددی که با یکدیگر برابر مقایسه می‌شوند، مقدار هش یکسانی دارند (حتی اگر از نوع‌های " +"متفاوتی باشند، مانند 1 و 1.0)." msgid "" -"For objects with custom :meth:`~object.__hash__` methods, note that :func:" -"`hash` truncates the return value based on the bit width of the host machine." +"For objects with custom :meth:`~object.__hash__` methods, note that :func:`hash` " +"truncates the return value based on the bit width of the host machine." msgstr "" "برای اشیایی که متد :meth:`~object.__hash__` سفارشی دارند، توجه داشته باشید " "که :func:`hash` مقدار بازگشتی را بر اساس پهنای بیت ماشین میزبان کوتاه می‌کند." msgid "" -"Invoke the built-in help system. (This function is intended for interactive " -"use.) If no argument is given, the interactive help system starts on the " -"interpreter console. If the argument is a string, then the string is looked " -"up as the name of a module, function, class, method, keyword, or " -"documentation topic, and a help page is printed on the console. If the " -"argument is any other kind of object, a help page on the object is generated." +"Invoke the built-in help system. (This function is intended for interactive use.) " +"If no argument is given, the interactive help system starts on the interpreter " +"console. If the argument is a string, then the string is looked up as the name of " +"a module, function, class, method, keyword, or documentation topic, and a help page " +"is printed on the console. If the argument is any other kind of object, a help " +"page on the object is generated." msgstr "" -"سامانهٔ راهنمای داخلی را فراخوانی می‌کند. (این تابع برای استفادهٔ تعاملی طراحی " -"شده است.) اگر هیچ آرگومانی ارائه نشود، سامانهٔ راهنمای تعاملی در کنسول مفسر " -"آغاز می‌شود. اگر آرگومان یک رشته باشد، آن رشته به‌عنوان نام یک ماژول، تابع، " -"کلاس، متد، کلیدواژه یا موضوع مستندات جستجو می‌شود و صفحهٔ راهنمای آن در کنسول " -"نمایش داده می‌شود. اگر آرگومان هر نوع شیء دیگری باشد، صفحهٔ راهنمای مربوط به " -"آن شیء تولید می‌شود." +"سامانهٔ راهنمای داخلی را فراخوانی می‌کند. (این تابع برای استفادهٔ تعاملی طراحی شده " +"است.) اگر هیچ آرگومانی ارائه نشود، سامانهٔ راهنمای تعاملی در کنسول مفسر آغاز می‌شود. " +"اگر آرگومان یک رشته باشد، آن رشته به‌عنوان نام یک ماژول، تابع، کلاس، متد، کلیدواژه " +"یا موضوع مستندات جستجو می‌شود و صفحهٔ راهنمای آن در کنسول نمایش داده می‌شود. اگر " +"آرگومان هر نوع شیء دیگری باشد، صفحهٔ راهنمای مربوط به آن شیء تولید می‌شود." msgid "" "Note that if a slash(/) appears in the parameter list of a function when " @@ -1602,87 +1543,80 @@ msgid "" "positional-only. For more info, see :ref:`the FAQ entry on positional-only " "parameters `." msgstr "" -"توجه داشته باشید که اگر هنگام فراخوانی :func:`help` یک اسلش (/) در فهرست " -"پارامترهای یک تابع ظاهر شود، به این معناست که پارامترهای قبل از اسلش فقط " -"به‌صورت مکانی قابل ارسال هستند. برای اطلاعات بیشتر، به :ref:`پرسش متداول " -"مربوط به پارامترهای فقط مکانی ` مراجعه کنید." +"توجه داشته باشید که اگر هنگام فراخوانی :func:`help` یک اسلش (/) در فهرست پارامترهای " +"یک تابع ظاهر شود، به این معناست که پارامترهای قبل از اسلش فقط به‌صورت مکانی قابل " +"ارسال هستند. برای اطلاعات بیشتر، به :ref:`پرسش متداول مربوط به پارامترهای فقط مکانی " +"` مراجعه کنید." -msgid "" -"This function is added to the built-in namespace by the :mod:`site` module." +msgid "This function is added to the built-in namespace by the :mod:`site` module." msgstr "" -"این تابع توسط ماژول :mod:`site` به فضای نام داخلی (built-in namespace) اضافه " -"می‌شود." +"این تابع توسط ماژول :mod:`site` به فضای نام داخلی (built-in namespace) اضافه می‌شود." msgid "" -"Changes to :mod:`pydoc` and :mod:`inspect` mean that the reported signatures " -"for callables are now more comprehensive and consistent." +"Changes to :mod:`pydoc` and :mod:`inspect` mean that the reported signatures for " +"callables are now more comprehensive and consistent." msgstr "" -"تغییرات اعمال‌شده در :mod:`pydoc` و :mod:`inspect` باعث شده‌اند امضاهای " -"گزارش‌شده برای اشیای فراخوانی‌پذیر اکنون کامل‌تر و سازگارتر باشند." +"تغییرات اعمال‌شده در :mod:`pydoc` و :mod:`inspect` باعث شده‌اند امضاهای گزارش‌شده برای " +"اشیای فراخوانی‌پذیر اکنون کامل‌تر و سازگارتر باشند." msgid "" -"Convert an integer number to a lowercase hexadecimal string prefixed with " -"\"0x\". If *integer* is not a Python :class:`int` object, it has to define " +"Convert an integer number to a lowercase hexadecimal string prefixed with \"0x\". " +"If *integer* is not a Python :class:`int` object, it has to define " "an :meth:`~object.__index__` method that returns an integer. Some examples:" msgstr "" -"بدیل یک عدد صحیح به یک رشته باینری که با \"0b\" پیشوند شده است. نتیجه یک " -"عبارت معتبر پایتون خواهد بود. اگر *integer* یک شیء پایتون :class:`int` " -"نباشد، لازم است یک روش(متد) :meth:`~object.__index__` تعریف کند که یک عدد " -"صحیح برگرداند. برخی مثال ها:" +"یک عدد صحیح را به یک رشتهٔ شانزده‌شانزدهی کوچک‌حرف با پیشوند «0x» تبدیل می‌کند. اگر " +"*integer* یک شیء از نوع :class:`int` پایتون نباشد، باید متدی به " +"نام :meth:`~object.__index__` تعریف کند که یک عدد صحیح برمی‌گرداند. چند نمونه:" msgid "" -"If you want to convert an integer number to an uppercase or lower " -"hexadecimal string with prefix or not, you can use either of the following " -"ways:" +"If you want to convert an integer number to an uppercase or lower hexadecimal " +"string with prefix or not, you can use either of the following ways:" msgstr "" -"اگر می‌خواهید یک عدد صحیح را به یک رشتهٔ شانزده‌شانزدهی با حروف بزرگ یا کوچک، " -"با پیشوند یا بدون آن، تبدیل کنید، می‌توانید از هر یک از روش‌های زیر استفاده " -"کنید:" +"اگر می‌خواهید یک عدد صحیح را به یک رشتهٔ شانزده‌شانزدهی با حروف بزرگ یا کوچک، با " +"پیشوند یا بدون آن، تبدیل کنید، می‌توانید از هر یک از روش‌های زیر استفاده کنید:" msgid "" -"See also :func:`int` for converting a hexadecimal string to an integer using " -"a base of 16." +"See also :func:`int` for converting a hexadecimal string to an integer using a base " +"of 16." msgstr "" -"همچنین برای تبدیل یک رشتهٔ شانزده‌شانزدهی به یک عدد صحیح با استفاده از مبنای " -"16، به :func:`int` مراجعه کنید." +"همچنین برای تبدیل یک رشتهٔ شانزده‌شانزدهی به یک عدد صحیح با استفاده از مبنای 16، " +"به :func:`int` مراجعه کنید." msgid "" -"To obtain a hexadecimal string representation for a float, use the :meth:" -"`float.hex` method." +"To obtain a hexadecimal string representation for a float, use " +"the :meth:`float.hex` method." msgstr "" -"برای به‌دست‌آوردن نمایش شانزدهی یک عدد ممیز شناور، از متد :meth:`float.hex` " -"استفاده کنید." +"برای به‌دست‌آوردن نمایش شانزدهی یک عدد ممیز شناور، از متد :meth:`float.hex` استفاده " +"کنید." msgid "" -"Return the \"identity\" of an object. This is an integer which is " -"guaranteed to be unique and constant for this object during its lifetime. " -"Two objects with non-overlapping lifetimes may have the same :func:`id` " -"value." +"Return the \"identity\" of an object. This is an integer which is guaranteed to be " +"unique and constant for this object during its lifetime. Two objects with non-" +"overlapping lifetimes may have the same :func:`id` value." msgstr "" -"«شناسه» یک شیء را برمی‌گرداند. این مقدار یک عدد صحیح است که در طول عمر آن " -"شیء، یکتا و ثابت بودنش تضمین شده است. دو شیء که طول عمر آن‌ها با یکدیگر " -"هم‌پوشانی ندارد، ممکن است مقدار یکسانی از :func:`id` داشته باشند." +"«شناسه» یک شیء را برمی‌گرداند. این مقدار یک عدد صحیح است که در طول عمر آن شیء، یکتا " +"و ثابت بودنش تضمین شده است. دو شیء که طول عمر آن‌ها با یکدیگر هم‌پوشانی ندارد، ممکن " +"است مقدار یکسانی از :func:`id` داشته باشند." msgid "This is the address of the object in memory." msgstr "این، آدرس شیء در حافظه است." msgid "" -"Raises an :ref:`auditing event ` ``builtins.id`` with argument " -"``id``." +"Raises an :ref:`auditing event ` ``builtins.id`` with argument ``id``." msgstr "" -"یک :ref:`رویداد ممیزی ` با نام ``builtins.id`` و آرگومان ``id`` " -"ایجاد می‌کند." +"یک :ref:`رویداد ممیزی ` با نام ``builtins.id`` و آرگومان ``id`` پرتاب " +"می‌کند." msgid "" -"If the *prompt* argument is present, it is written to standard output " -"without a trailing newline. The function then reads a line from input, " -"converts it to a string (stripping a trailing newline), and returns that. " -"When EOF is read, :exc:`EOFError` is raised. Example::" +"If the *prompt* argument is present, it is written to standard output without a " +"trailing newline. The function then reads a line from input, converts it to a " +"string (stripping a trailing newline), and returns that. When EOF is " +"read, :exc:`EOFError` is raised. Example::" msgstr "" -"اگر آرگومان *prompt* ارائه شود، بدون افزودن نویسهٔ پایان خط در خروجی " -"استاندارد نوشته می‌شود. سپس تابع یک خط از ورودی می‌خواند، آن را به یک رشته " -"تبدیل می‌کند (با حذف نویسهٔ پایان خط انتهایی) و همان را برمی‌گرداند. اگر به " -"انتهای فایل (EOF) برسد، استثنای :exc:`EOFError` ایجاد می‌شود. مثال::" +"اگر آرگومان *prompt* ارائه شود، بدون افزودن نویسهٔ پایان خط در خروجی استاندارد نوشته " +"می‌شود. سپس تابع یک خط از ورودی می‌خواند، آن را به یک رشته تبدیل می‌کند (با حذف نویسهٔ " +"پایان خط انتهایی) و همان را برمی‌گرداند. اگر به انتهای فایل (EOF) برسد، " +"استثنای :exc:`EOFError` پرتاب می‌شود. مثال::" msgid "" ">>> s = input('--> ')\n" @@ -1696,32 +1630,32 @@ msgstr "" "\"Monty Python's Flying Circus\"" msgid "" -"If the :mod:`readline` module was loaded, then :func:`input` will use it to " -"provide elaborate line editing and history features." +"If the :mod:`readline` module was loaded, then :func:`input` will use it to provide " +"elaborate line editing and history features." msgstr "" -"اگر ماژول :mod:`readline` بارگذاری شده باشد، :func:`input` از آن برای فراهم " -"کردن امکانات پیشرفتهٔ ویرایش خط و تاریخچهٔ ورودی استفاده می‌کند." +"اگر ماژول :mod:`readline` بارگذاری شده باشد، :func:`input` از آن برای فراهم کردن " +"امکانات پیشرفتهٔ ویرایش خط و تاریخچهٔ ورودی استفاده می‌کند." msgid "" "Raises an :ref:`auditing event ` ``builtins.input`` with argument " "``prompt`` before reading input" msgstr "" -"پیش از خواندن ورودی، یک :ref:`رویداد ممیزی ` با نام ``builtins." -"input`` و آرگومان ``prompt`` ایجاد می‌کند" +"پیش از خواندن ورودی، یک :ref:`رویداد ممیزی ` با نام ``builtins.input`` و " +"آرگومان ``prompt`` پرتاب می‌کند" msgid "" -"Raises an :ref:`auditing event ` ``builtins.input/result`` with " -"the result after successfully reading input." +"Raises an :ref:`auditing event ` ``builtins.input/result`` with the " +"result after successfully reading input." msgstr "" "پس از خواندن موفقیت‌آمیز ورودی، یک :ref:`رویداد ممیزی ` با نام " -"``builtins.input/result`` و نتیجهٔ خوانده‌شده ایجاد می‌کند." +"``builtins.input/result`` و نتیجهٔ خوانده‌شده پرتاب می‌کند." msgid "" -"Return an integer object constructed from a number or a string, or return " -"``0`` if no arguments are given." +"Return an integer object constructed from a number or a string, or return ``0`` if " +"no arguments are given." msgstr "" -"یک شیء عدد صحیح را که از یک عدد یا یک رشته ساخته شده است برمی‌گرداند، یا اگر " -"هیچ آرگومانی داده نشده باشد، مقدار ``0`` را برمی‌گرداند." +"یک شیء عدد صحیح را که از یک عدد یا یک رشته ساخته شده است برمی‌گرداند، یا اگر هیچ " +"آرگومانی داده نشده باشد، مقدار ``0`` را برمی‌گرداند." msgid "" ">>> int(123.45)\n" @@ -1751,173 +1685,164 @@ msgstr "" "115" msgid "" -"If the argument defines :meth:`~object.__int__`, ``int(x)`` returns ``x." -"__int__()``. If the argument defines :meth:`~object.__index__`, it returns " +"If the argument defines :meth:`~object.__int__`, ``int(x)`` returns " +"``x.__int__()``. If the argument defines :meth:`~object.__index__`, it returns " "``x.__index__()``. For floating-point numbers, this truncates towards zero." msgstr "" "اگر آرگومان متد :meth:`~object.__int__` را تعریف کرده باشد، ``int(x)`` مقدار " -"``x.__int__()`` را برمی‌گرداند. اگر آرگومان متد :meth:`~object.__index__` را " -"تعریف کرده باشد، مقدار ``x.__index__()`` برگردانده می‌شود. برای اعداد ممیز " -"شناور، این تبدیل بخش اعشاری را در جهت صفر حذف می‌کند." +"``x.__int__()`` را برمی‌گرداند. اگر آرگومان متد :meth:`~object.__index__` را تعریف " +"کرده باشد، مقدار ``x.__index__()`` برگردانده می‌شود. برای اعداد ممیز شناور، این " +"تبدیل بخش اعشاری را در جهت صفر حذف می‌کند." msgid "" "If the argument is not a number or if *base* is given, then it must be a " -"string, :class:`bytes`, or :class:`bytearray` instance representing an " -"integer in radix *base*. Optionally, the string can be preceded by ``+`` or " -"``-`` (with no space in between), have leading zeros, be surrounded by " -"whitespace, and have single underscores interspersed between digits." -msgstr "" -"اگر آرگومان یک عدد نباشد یا *base* مشخص شده باشد، باید نمونه‌ای از :class:" -"`bytes` یا :class:`bytearray` باشد که یک عدد صحیح در مبنای *base* را نمایش " -"می‌دهد. به‌صورت اختیاری، رشته می‌تواند با ``+`` یا ``-`` (بدون فاصله بین آن‌ها و " -"عدد) آغاز شود، دارای صفرهای ابتدایی باشد، با فاصلهٔ سفید احاطه شده باشد و بین " -"رقم‌های آن زیرخط‌های تکی قرار گرفته باشند." - -msgid "" -"A base-n integer string contains digits, each representing a value from 0 to " -"n-1. The values 0--9 can be represented by any Unicode decimal digit. The " -"values 10--35 can be represented by ``a`` to ``z`` (or ``A`` to ``Z``). The " -"default *base* is 10. The allowed bases are 0 and 2--36. Base-2, -8, and -16 " -"strings can be optionally prefixed with ``0b``/``0B``, ``0o``/``0O``, or " -"``0x``/``0X``, as with integer literals in code. For base 0, the string is " -"interpreted in a similar way to an :ref:`integer literal in code " -"`, in that the actual base is 2, 8, 10, or 16 as determined by the " -"prefix. Base 0 also disallows leading zeros: ``int('010', 0)`` is not legal, " -"while ``int('010')`` and ``int('010', 8)`` are." -msgstr "" -"یک رشتهٔ عدد صحیح در مبنای n شامل رقم‌هایی است که هر یک مقداری بین 0 تا n-1 را " -"نمایش می‌دهند. مقادیر 0 تا 9 را می‌توان با هر رقم ده‌دهی یونیکد نمایش داد. " -"مقادیر 10 تا 35 را می‌توان با نویسه‌های ``a`` تا ``z`` (یا ``A`` تا ``Z``) " -"نمایش داد. مقدار پیش‌فرض *base* برابر 10 است. مبناهای مجاز عبارت‌اند از 0 و 2 " -"تا 36. رشته‌های مبنای 2، 8 و 16 می‌توانند، همانند ثابت‌های عدد صحیح در کد، " -"به‌ترتیب با پیشوندهای ``0b``/``0B``، ``0o``/``0O`` یا ``0x``/``0X`` آغاز " -"شوند. برای مبنای 0، رشته مشابه یک :ref:`ثابت عدد صحیح در کد ` " -"تفسیر می‌شود؛ یعنی مبنای واقعی بر اساس پیشوند، یکی از 2، 8، 10 یا 16 خواهد " -"بود. همچنین در مبنای 0 استفاده از صفرهای ابتدایی مجاز نیست؛ بنابراین " -"``int('010', 0)`` معتبر نیست، در حالی که ``int('010')`` و ``int('010', 8)`` " -"معتبر هستند." +"string, :class:`bytes`, or :class:`bytearray` instance representing an integer in " +"radix *base*. Optionally, the string can be preceded by ``+`` or ``-`` (with no " +"space in between), have leading zeros, be surrounded by whitespace, and have single " +"underscores interspersed between digits." +msgstr "" +"اگر آرگومان یک عدد نباشد یا *base* مشخص شده باشد، باید نمونه‌ای از :class:`bytes` " +"یا :class:`bytearray` باشد که یک عدد صحیح در مبنای *base* را نمایش می‌دهد. به‌صورت " +"اختیاری، رشته می‌تواند با ``+`` یا ``-`` (بدون فاصله بین آن‌ها و عدد) آغاز شود، دارای " +"صفرهای ابتدایی باشد، با فاصلهٔ سفید احاطه شده باشد و بین رقم‌های آن زیرخط‌های تکی قرار " +"گرفته باشند." + +msgid "" +"A base-n integer string contains digits, each representing a value from 0 to n-1. " +"The values 0--9 can be represented by any Unicode decimal digit. The values 10--35 " +"can be represented by ``a`` to ``z`` (or ``A`` to ``Z``). The default *base* is 10. " +"The allowed bases are 0 and 2--36. Base-2, -8, and -16 strings can be optionally " +"prefixed with ``0b``/``0B``, ``0o``/``0O``, or ``0x``/``0X``, as with integer " +"literals in code. For base 0, the string is interpreted in a similar way to " +"an :ref:`integer literal in code `, in that the actual base is 2, 8, 10, " +"or 16 as determined by the prefix. Base 0 also disallows leading zeros: " +"``int('010', 0)`` is not legal, while ``int('010')`` and ``int('010', 8)`` are." +msgstr "" +"یک رشتهٔ عدد صحیح در مبنای n شامل رقم‌هایی است که هر یک مقداری بین 0 تا n-1 را نمایش " +"می‌دهند. مقادیر 0 تا 9 را می‌توان با هر رقم ده‌دهی یونیکد نمایش داد. مقادیر 10 تا 35 " +"را می‌توان با نویسه‌های ``a`` تا ``z`` (یا ``A`` تا ``Z``) نمایش داد. مقدار پیش‌فرض " +"*base* برابر 10 است. مبناهای مجاز عبارت‌اند از 0 و 2 تا 36. رشته‌های مبنای 2، 8 و 16 " +"می‌توانند، همانند ثابت‌های عدد صحیح در کد، به‌ترتیب با پیشوندهای ``0b``/``0B``، ``0o``/" +"``0O`` یا ``0x``/``0X`` آغاز شوند. برای مبنای 0، رشته مشابه یک :ref:`ثابت عدد صحیح " +"در کد ` تفسیر می‌شود؛ یعنی مبنای واقعی بر اساس پیشوند، یکی از 2، 8، 10 یا " +"16 خواهد بود. همچنین در مبنای 0 استفاده از صفرهای ابتدایی مجاز نیست؛ بنابراین " +"``int('010', 0)`` معتبر نیست، در حالی که ``int('010')`` و ``int('010', 8)`` معتبر " +"هستند." msgid "The integer type is described in :ref:`typesnumeric`." msgstr "نوع عدد صحیح (integer) در :ref:`typesnumeric` توضیح داده شده است." msgid "" -"If *base* is not an instance of :class:`int` and the *base* object has a :" -"meth:`base.__index__ ` method, that method is called to " -"obtain an integer for the base. Previous versions used :meth:`base.__int__ " +"If *base* is not an instance of :class:`int` and the *base* object has " +"a :meth:`base.__index__ ` method, that method is called to obtain " +"an integer for the base. Previous versions used :meth:`base.__int__ " "` instead of :meth:`base.__index__ `." msgstr "" -"اگر *base* نمونه‌ای از :class:`int` نباشد و شیء *base* متد :meth:`base." -"__index__ ` را تعریف کرده باشد، آن متد برای به‌دست آوردن یک " -"عدد صحیح به‌عنوان مبنا فراخوانی می‌شود. در نسخه‌های پیشین، به‌جای :meth:`base." -"__index__ ` از :meth:`base.__int__ ` " -"استفاده می‌شد." +"اگر *base* نمونه‌ای از :class:`int` نباشد و شیء *base* متد :meth:`base.__index__ " +"` را تعریف کرده باشد، آن متد برای به‌دست آوردن یک عدد صحیح به‌عنوان " +"مبنا فراخوانی می‌شود. در نسخه‌های پیشین، به‌جای :meth:`base.__index__ " +"` از :meth:`base.__int__ ` استفاده می‌شد." msgid "The first parameter is now positional-only." msgstr "پارامتر اول اکنون فقط به‌صورت موقعیتی قابل ارسال است." msgid "" -"Falls back to :meth:`~object.__index__` if :meth:`~object.__int__` is not " -"defined." +"Falls back to :meth:`~object.__index__` if :meth:`~object.__int__` is not defined." msgstr "" -"اگر :meth:`~object.__int__` تعریف نشده باشد، به :meth:`~object.__index__` " -"بازمی‌گردد." +"اگر :meth:`~object.__int__` تعریف نشده باشد، به :meth:`~object.__index__` بازمی‌گردد." msgid "" -":class:`int` string inputs and string representations can be limited to help " -"avoid denial of service attacks. A :exc:`ValueError` is raised when the " -"limit is exceeded while converting a string to an :class:`int` or when " -"converting an :class:`int` into a string would exceed the limit. See the :" -"ref:`integer string conversion length limitation ` " -"documentation." +":class:`int` string inputs and string representations can be limited to help avoid " +"denial of service attacks. A :exc:`ValueError` is raised when the limit is exceeded " +"while converting a string to an :class:`int` or when converting an :class:`int` " +"into a string would exceed the limit. See the :ref:`integer string conversion " +"length limitation ` documentation." msgstr "" -"ورودی‌های رشته‌ای :class:`int` و نمایش‌های رشته‌ای آن را می‌توان برای کمک به " -"جلوگیری از حملات منع سرویس (Denial of Service) محدود کرد. اگر هنگام تبدیل یک " -"رشته به :class:`int` از این محدودیت فراتر رود، یا تبدیل یک :class:`int` به " -"رشته باعث عبور از این محدودیت شود، استثنای :exc:`ValueError` ایجاد می‌شود. " -"برای اطلاعات بیشتر، مستندات :ref:`محدودیت طول تبدیل رشته‌ای اعداد صحیح " -"` را ببینید." +"ورودی‌های رشته‌ای :class:`int` و نمایش‌های رشته‌ای آن را می‌توان برای کمک به جلوگیری از " +"حملات منع سرویس (Denial of Service) محدود کرد. اگر هنگام تبدیل یک رشته " +"به :class:`int` از این محدودیت فراتر رود، یا تبدیل یک :class:`int` به رشته باعث " +"عبور از این محدودیت شود، استثنای :exc:`ValueError` پرتاب می‌شود. برای اطلاعات بیشتر، " +"مستندات :ref:`محدودیت طول تبدیل رشته‌ای اعداد صحیح ` را ببینید." -msgid "" -":func:`int` no longer delegates to the :meth:`~object.__trunc__` method." -msgstr "" -":func:`int` دیگر فراخوانی را به متد :meth:`~object.__trunc__` واگذار نمی‌کند." +msgid ":func:`int` no longer delegates to the :meth:`~object.__trunc__` method." +msgstr ":func:`int` دیگر فراخوانی را به متد :meth:`~object.__trunc__` واگذار نمی‌کند." msgid "" "Return ``True`` if the *object* argument is an instance of the *classinfo* " -"argument, or of a (direct, indirect, or :term:`virtual `) subclass thereof. If *object* is not an object of the given type, " -"the function always returns ``False``. If *classinfo* is a tuple of type " -"objects (or recursively, other such tuples) or a :ref:`types-union` of " -"multiple types, return ``True`` if *object* is an instance of any of the " -"types. If *classinfo* is not a type or tuple of types and such tuples, a :" -"exc:`TypeError` exception is raised. :exc:`TypeError` may not be raised for " -"an invalid type if an earlier check succeeds." -msgstr "" -"اگر آرگومان *object* نمونه‌ای از *classinfo* یا از یکی از زیرکلاس‌های آن " -"(مستقیم، غیرمستقیم یا :term:`مجازی `) باشد، مقدار " -"``True`` را برمی‌گرداند. اگر *object* از نوع داده‌شده نباشد، این تابع همیشه " -"``False`` برمی‌گرداند. اگر *classinfo* یک تاپل از نوع‌ها (یا به‌صورت بازگشتی، " -"تاپل‌هایی از این نوع) یا یک :ref:`types-union` از چندین نوع باشد، در صورتی که " -"*object* نمونه‌ای از هر یک از آن نوع‌ها باشد، مقدار ``True`` برگردانده می‌شود. " -"اگر *classinfo* یک نوع، یا تاپلی از نوع‌ها و تاپل‌های مشابه نباشد، استثنای :" -"exc:`TypeError` ایجاد می‌شود. با این حال، اگر یک بررسیِ زودتر با موفقیت انجام " -"شود، ممکن است برای یک نوع نامعتبر استثنای :exc:`TypeError` ایجاد نشود." +"argument, or of a (direct, indirect, or :term:`virtual `) " +"subclass thereof. If *object* is not an object of the given type, the function " +"always returns ``False``. If *classinfo* is a tuple of type objects (or " +"recursively, other such tuples) or a :ref:`types-union` of multiple types, return " +"``True`` if *object* is an instance of any of the types. If *classinfo* is not a " +"type or tuple of types and such tuples, a :exc:`TypeError` exception is " +"raised. :exc:`TypeError` may not be raised for an invalid type if an earlier check " +"succeeds." +msgstr "" +"اگر آرگومان *object* نمونه‌ای از *classinfo* یا از یکی از زیرکلاس‌های آن (مستقیم، " +"غیرمستقیم یا :term:`مجازی `) باشد، مقدار ``True`` را " +"برمی‌گرداند. اگر *object* از نوع داده‌شده نباشد، این تابع همیشه ``False`` برمی‌گرداند. " +"اگر *classinfo* یک تاپل از نوع‌ها (یا به‌صورت بازگشتی، تاپل‌هایی از این نوع) یا " +"یک :ref:`types-union` از چندین نوع باشد، در صورتی که *object* نمونه‌ای از هر یک از " +"آن نوع‌ها باشد، مقدار ``True`` برگردانده می‌شود. اگر *classinfo* یک نوع، یا تاپلی از " +"نوع‌ها و تاپل‌های مشابه نباشد، استثنای :exc:`TypeError` پرتاب می‌شود. با این حال، اگر " +"یک بررسیِ زودتر با موفقیت انجام شود، ممکن است برای یک نوع نامعتبر " +"استثنای :exc:`TypeError` پرتاب نشود." msgid "*classinfo* can be a :ref:`types-union`." msgstr "*classinfo* می‌تواند یک :ref:`types-union` باشد." msgid "" -"Return ``True`` if *class* is a subclass (direct, indirect, or :term:" -"`virtual `) of *classinfo*. A class is considered a " -"subclass of itself. *classinfo* may be a tuple of class objects (or " -"recursively, other such tuples) or a :ref:`types-union`, in which case " -"return ``True`` if *class* is a subclass of any entry in *classinfo*. In " -"any other case, a :exc:`TypeError` exception is raised." +"Return ``True`` if *class* is a subclass (direct, indirect, or :term:`virtual " +"`) of *classinfo*. A class is considered a subclass of " +"itself. *classinfo* may be a tuple of class objects (or recursively, other such " +"tuples) or a :ref:`types-union`, in which case return ``True`` if *class* is a " +"subclass of any entry in *classinfo*. In any other case, a :exc:`TypeError` " +"exception is raised." msgstr "" -"اگر *class* زیرکلاس (مستقیم، غیرمستقیم یا :term:`مجازی `) *classinfo* باشد، مقدار ``True`` را برمی‌گرداند. هر کلاس، زیرکلاس " -"خودش نیز در نظر گرفته می‌شود. *classinfo* می‌تواند یک تاپل از اشیای کلاس (یا " -"به‌صورت بازگشتی، تاپل‌هایی از این نوع) یا یک :ref:`types-union` باشد؛ در این " -"صورت، اگر *class* زیرکلاس هر یک از اعضای *classinfo* باشد، مقدار ``True`` " -"برگردانده می‌شود. در هر حالت دیگر، استثنای :exc:`TypeError` ایجاد می‌شود." +"اگر *class* زیرکلاس (مستقیم، غیرمستقیم یا :term:`مجازی `) " +"*classinfo* باشد، مقدار ``True`` را برمی‌گرداند. هر کلاس، زیرکلاس خودش نیز در نظر " +"گرفته می‌شود. *classinfo* می‌تواند یک تاپل از اشیای کلاس (یا به‌صورت بازگشتی، تاپل‌هایی " +"از این نوع) یا یک :ref:`types-union` باشد؛ در این صورت، اگر *class* زیرکلاس هر یک " +"از اعضای *classinfo* باشد، مقدار ``True`` برگردانده می‌شود. در هر حالت دیگر، " +"استثنای :exc:`TypeError` پرتاب می‌شود." msgid "" "Return an :term:`iterator` object. The first argument is interpreted very " -"differently depending on the presence of the second argument. Without a " -"second argument, the single argument must be a collection object which " -"supports the :term:`iterable` protocol (the :meth:`~object.__iter__` " -"method), or it must support the sequence protocol (the :meth:`~object." -"__getitem__` method with integer arguments starting at ``0``). If it does " -"not support either of those protocols, :exc:`TypeError` is raised. If the " -"second argument, *sentinel*, is given, then the first argument must be a " -"callable object. The iterator created in this case will call *callable* " -"with no arguments for each call to its :meth:`~iterator.__next__` method; if " -"the value returned is equal to *sentinel*, :exc:`StopIteration` will be " -"raised, otherwise the value will be returned." -msgstr "" -"یک شیء :term:`تکرارگر ` را برمی‌گرداند. تفسیر آرگومان اول به وجود " -"یا عدم وجود آرگومان دوم بستگی دارد. اگر آرگومان دومی وجود نداشته باشد، " -"آرگومان اول باید یک شیء مجموعه باشد که از پروتکل :term:`تکرارپذیر " -"` (متد :meth:`~object.__iter__`) پشتیبانی کند، یا از پروتکل دنباله " +"differently depending on the presence of the second argument. Without a second " +"argument, the single argument must be a collection object which supports " +"the :term:`iterable` protocol (the :meth:`~object.__iter__` method), or it must " +"support the sequence protocol (the :meth:`~object.__getitem__` method with integer " +"arguments starting at ``0``). If it does not support either of those " +"protocols, :exc:`TypeError` is raised. If the second argument, *sentinel*, is " +"given, then the first argument must be a callable object. The iterator created in " +"this case will call *callable* with no arguments for each call to " +"its :meth:`~iterator.__next__` method; if the value returned is equal to " +"*sentinel*, :exc:`StopIteration` will be raised, otherwise the value will be " +"returned." +msgstr "" +"یک شیء :term:`تکرارگر ` را برمی‌گرداند. تفسیر آرگومان اول به وجود یا عدم " +"وجود آرگومان دوم بستگی دارد. اگر آرگومان دومی وجود نداشته باشد، آرگومان اول باید یک " +"شیء مجموعه باشد که از پروتکل :term:`تکرارپذیر ` " +"(متد :meth:`~object.__iter__`) پشتیبانی کند، یا از پروتکل دنباله " "(متد :meth:`~object.__getitem__` با آرگومان‌های صحیح که از ``0`` شروع می‌شوند) " -"پشتیبانی کند. اگر از هیچ‌یک از این پروتکل‌ها پشتیبانی نکند، استثنای :exc:" -"`TypeError` ایجاد می‌شود. اگر آرگومان دوم، یعنی *sentinel*، ارائه شود، " -"آرگومان اول باید یک شیء فراخوانی‌پذیر باشد. تکرارگر ایجادشده در این حالت، در " -"هر فراخوانی متد :meth:`~iterator.__next__`، *callable* را بدون آرگومان " -"فراخوانی می‌کند؛ اگر مقدار بازگردانده‌شده برابر *sentinel* باشد، استثنای :exc:" -"`StopIteration` ایجاد می‌شود؛ در غیر این صورت، همان مقدار برگردانده می‌شود." +"پشتیبانی کند. اگر از هیچ‌یک از این پروتکل‌ها پشتیبانی نکند، استثنای :exc:`TypeError` " +"پرتاب می‌شود. اگر آرگومان دوم، یعنی *sentinel*، ارائه شود، آرگومان اول باید یک شیء " +"فراخوانی‌پذیر باشد. تکرارگر ایجادشده در این حالت، در هر فراخوانی " +"متد :meth:`~iterator.__next__`، *callable* را بدون آرگومان فراخوانی می‌کند؛ اگر " +"مقدار بازگردانده‌شده برابر *sentinel* باشد، استثنای :exc:`StopIteration` پرتاب " +"می‌شود؛ در غیر این صورت، همان مقدار برگردانده می‌شود." msgid "See also :ref:`typeiter`." msgstr "همچنین به :ref:`typeiter` مراجعه کنید." msgid "" -"One useful application of the second form of :func:`iter` is to build a " -"block-reader. For example, reading fixed-width blocks from a binary database " -"file until the end of file is reached::" +"One useful application of the second form of :func:`iter` is to build a block-" +"reader. For example, reading fixed-width blocks from a binary database file until " +"the end of file is reached::" msgstr "" -"یکی از کاربردهای مفید شکل دوم :func:`iter`، ساختن یک خوانندهٔ بلوکی (block " -"reader) است. برای مثال، خواندن بلوک‌هایی با اندازهٔ ثابت از یک پروندهٔ پایگاه " -"دادهٔ دودویی تا رسیدن به انتهای پرونده::" +"یکی از کاربردهای مفید شکل دوم :func:`iter`، ساختن یک خوانندهٔ بلوکی (block reader) " +"است. برای مثال، خواندن بلوک‌هایی با اندازهٔ ثابت از یک پروندهٔ پایگاه دادهٔ دودویی تا " +"رسیدن به انتهای پرونده::" msgid "" "from functools import partial\n" @@ -1932,189 +1857,175 @@ msgstr "" msgid "" "Return the length (the number of items) of an object. The argument may be a " -"sequence (such as a string, bytes, tuple, list, or range) or a collection " -"(such as a dictionary, set, or frozen set)." +"sequence (such as a string, bytes, tuple, list, or range) or a collection (such as " +"a dictionary, set, or frozen set)." msgstr "" -"طول یک شیء (تعداد عناصر آن) را برمی‌گرداند. آرگومان می‌تواند یک دنباله (مانند " -"رشته، bytes، تاپل، فهرست یا range) یا یک مجموعه (مانند فرهنگ لغت، set یا " -"frozenset) باشد." +"طول یک شیء (تعداد عناصر آن) را برمی‌گرداند. آرگومان می‌تواند یک دنباله (مانند رشته، " +"bytes، تاپل، فهرست یا range) یا یک مجموعه (مانند دیکشنری، set یا frozenset) باشد." msgid "" -"``len`` raises :exc:`OverflowError` on lengths larger than :data:`sys." -"maxsize`, such as :class:`range(2 ** 100) `." +"``len`` raises :exc:`OverflowError` on lengths larger than :data:`sys.maxsize`, " +"such as :class:`range(2 ** 100) `." msgstr "" -"``len`` برای طول‌هایی بزرگ‌تر از :data:`sys.maxsize`، مانند :class:`range(2 ** " -"100) `، استثنای :exc:`OverflowError` ایجاد می‌کند." +"``len`` برای طول‌هایی بزرگ‌تر از :data:`sys.maxsize`، مانند :class:`range(2 ** 100) " +"`، استثنای :exc:`OverflowError` پرتاب می‌کند." msgid "" -"Rather than being a function, :class:`list` is actually a mutable sequence " -"type, as documented in :ref:`typesseq-list` and :ref:`typesseq`." +"Rather than being a function, :class:`list` is actually a mutable sequence type, as " +"documented in :ref:`typesseq-list` and :ref:`typesseq`." msgstr "" ":class:`list` در واقع یک نوع دنبالهٔ تغییرپذیر است، نه یک تابع؛ همان‌گونه که " "در :ref:`typesseq-list` و :ref:`typesseq` مستند شده است." msgid "" -"Return a mapping object representing the current local symbol table, with " -"variable names as the keys, and their currently bound references as the " -"values." +"Return a mapping object representing the current local symbol table, with variable " +"names as the keys, and their currently bound references as the values." msgstr "" -"یک شیء نگاشتی را برمی‌گرداند که جدول نمادهای محلی فعلی را نمایش می‌دهد؛ در آن، " -"نام متغیرها کلیدها و ارجاع‌های فعلی آن‌ها مقادیر هستند." +"یک شیء نگاشتی را برمی‌گرداند که جدول نمادهای محلی فعلی را نمایش می‌دهد؛ در آن، نام " +"متغیرها کلیدها و ارجاع‌های فعلی آن‌ها مقادیر هستند." msgid "" -"At module scope, as well as when using :func:`exec` or :func:`eval` with a " -"single namespace, this function returns the same namespace as :func:" -"`globals`." +"At module scope, as well as when using :func:`exec` or :func:`eval` with a single " +"namespace, this function returns the same namespace as :func:`globals`." msgstr "" -"در حوزهٔ ماژول، و همچنین هنگام استفاده از :func:`exec` یا :func:`eval` با یک " -"فضای نام واحد، این تابع همان فضای نامی را برمی‌گرداند که :func:`globals` " -"برمی‌گرداند." +"در محدوده‌ی ماژول، و همچنین هنگام استفاده از :func:`exec` یا :func:`eval` با یک فضای " +"نام واحد، این تابع همان فضای نامی را برمی‌گرداند که :func:`globals` برمی‌گرداند." msgid "" -"At class scope, it returns the namespace that will be passed to the " -"metaclass constructor." +"At class scope, it returns the namespace that will be passed to the metaclass " +"constructor." msgstr "" -"در حوزهٔ کلاس، این تابع فضای نامی را برمی‌گرداند که به سازندهٔ فراداده ارسال " -"خواهد شد." +"در محدوده‌ی کلاس، این تابع فضای نامی را برمی‌گرداند که به سازندهٔ فراداده ارسال خواهد " +"شد." msgid "" -"When using ``exec()`` or ``eval()`` with separate local and global " -"arguments, it returns the local namespace passed in to the function call." +"When using ``exec()`` or ``eval()`` with separate local and global arguments, it " +"returns the local namespace passed in to the function call." msgstr "" -"هنگام استفاده از ``exec()`` یا ``eval()`` با آرگومان‌های محلی و سراسریِ " -"جداگانه، این تابع فضای نام محلیِ ارسال‌شده به فراخوانی تابع را بازمی‌گرداند." +"هنگام استفاده از ``exec()`` یا ``eval()`` با آرگومان‌های محلی و سراسریِ جداگانه، این " +"تابع فضای نام محلیِ ارسال‌شده به فراخوانی تابع را بازمی‌گرداند." msgid "" -"In all of the above cases, each call to ``locals()`` in a given frame of " -"execution will return the *same* mapping object. Changes made through the " -"mapping object returned from ``locals()`` will be visible as assigned, " -"reassigned, or deleted local variables, and assigning, reassigning, or " -"deleting local variables will immediately affect the contents of the " -"returned mapping object." +"In all of the above cases, each call to ``locals()`` in a given frame of execution " +"will return the *same* mapping object. Changes made through the mapping object " +"returned from ``locals()`` will be visible as assigned, reassigned, or deleted " +"local variables, and assigning, reassigning, or deleting local variables will " +"immediately affect the contents of the returned mapping object." msgstr "" -"در همهٔ حالت‌های بالا، هر فراخوانی ``locals()`` در یک قاب (frame) مشخص از " -"اجرا، *همان* شیء نگاشتی را برمی‌گرداند. تغییراتی که از طریق شیء نگاشتیِ " -"بازگردانده‌شده توسط ``locals()`` اعمال شوند، به‌صورت انتساب، انتساب مجدد یا " -"حذف متغیرهای محلی قابل مشاهده خواهند بود، و انتساب، انتساب مجدد یا حذف " -"متغیرهای محلی نیز بلافاصله محتوای شیء نگاشتیِ بازگردانده‌شده را تغییر می‌دهد." +"در همهٔ حالت‌های بالا، هر فراخوانی ``locals()`` در یک قاب (frame) مشخص از اجرا، " +"*همان* شیء نگاشتی را برمی‌گرداند. تغییراتی که از طریق شیء نگاشتیِ بازگردانده‌شده توسط " +"``locals()`` اعمال شوند، به‌صورت انتساب، انتساب مجدد یا حذف متغیرهای محلی قابل " +"مشاهده خواهند بود، و انتساب، انتساب مجدد یا حذف متغیرهای محلی نیز بلافاصله محتوای " +"شیء نگاشتیِ بازگردانده‌شده را تغییر می‌دهد." msgid "" -"In an :term:`optimized scope` (including functions, generators, and " -"coroutines), each call to ``locals()`` instead returns a fresh dictionary " -"containing the current bindings of the function's local variables and any " -"nonlocal cell references. In this case, name binding changes made via the " -"returned dict are *not* written back to the corresponding local variables or " -"nonlocal cell references, and assigning, reassigning, or deleting local " -"variables and nonlocal cell references does *not* affect the contents of " -"previously returned dictionaries." +"In an :term:`optimized scope` (including functions, generators, and coroutines), " +"each call to ``locals()`` instead returns a fresh dictionary containing the current " +"bindings of the function's local variables and any nonlocal cell references. In " +"this case, name binding changes made via the returned dict are *not* written back " +"to the corresponding local variables or nonlocal cell references, and assigning, " +"reassigning, or deleting local variables and nonlocal cell references does *not* " +"affect the contents of previously returned dictionaries." msgstr "" -"در یک :term:`حوزهٔ بهینه‌شده ` (از جمله توابع، مولدها و " -"هم‌روال‌ها)، هر فراخوانی ``locals()`` یک فرهنگ لغت جدید برمی‌گرداند که شامل " -"انتساب‌های فعلی متغیرهای محلی تابع و هرگونه ارجاع به سلول‌های غیرمحلی است. در " -"این حالت، تغییرات انتساب نام که از طریق فرهنگ لغت بازگردانده‌شده انجام شوند، " -"به متغیرهای محلی یا ارجاع‌های سلول‌های غیرمحلی متناظر بازنویسی *نمی‌شوند*، و " -"انتساب، انتساب مجدد یا حذف متغیرهای محلی و ارجاع‌های سلول‌های غیرمحلی نیز بر " -"محتوای فرهنگ لغت‌های بازگردانده‌شدهٔ قبلی تأثیری *ندارد*." +"در یک :term:`محدوده‌ی بهینه‌شده ` (از جمله توابع، تولیدگرها و " +"هم‌روال‌ها)، هر فراخوانی ``locals()`` یک دیکشنری جدید برمی‌گرداند که شامل انتساب‌های " +"فعلی متغیرهای محلی تابع و هرگونه ارجاع به سلول‌های غیرمحلی است. در این حالت، تغییرات " +"انتساب نام که از طریق دیکشنری بازگردانده‌شده انجام شوند، به متغیرهای محلی یا " +"ارجاع‌های سلول‌های غیرمحلی متناظر بازنویسی *نمی‌شوند*، و انتساب، انتساب مجدد یا حذف " +"متغیرهای محلی و ارجاع‌های سلول‌های غیرمحلی نیز بر محتوای دیکشنری‌های بازگردانده‌شدهٔ " +"قبلی تأثیری *ندارد*." msgid "" "Calling ``locals()`` as part of a comprehension in a function, generator, or " -"coroutine is equivalent to calling it in the containing scope, except that " -"the comprehension's initialised iteration variables will be included. In " -"other scopes, it behaves as if the comprehension were running as a nested " -"function." +"coroutine is equivalent to calling it in the containing scope, except that the " +"comprehension's initialised iteration variables will be included. In other scopes, " +"it behaves as if the comprehension were running as a nested function." msgstr "" -"فراخوانی ``locals()`` درون یک comprehension در یک تابع، مولد یا هم‌روال، " -"معادل فراخوانی آن در حوزهٔ دربرگیرنده است، با این تفاوت که متغیرهای پیمایشِ " -"مقداردهی‌شدهٔ comprehension نیز در آن گنجانده می‌شوند. در سایر حوزه‌ها، رفتار آن " -"به‌گونه‌ای است که گویی comprehension به‌صورت یک تابع تو‌در‌تو اجرا می‌شود." +"فراخوانی ``locals()`` درون یک comprehension در یک تابع، تولیدگر یا هم‌روال، معادل " +"فراخوانی آن در محدوده‌ی دربرگیرنده است، با این تفاوت که متغیرهای پیمایشِ مقداردهی‌شدهٔ " +"comprehension نیز در آن گنجانده می‌شوند. در سایر محدوده‌ها رفتار آن به‌گونه‌ای است که " +"گویی comprehension به‌صورت یک تابع تو‌در‌تو اجرا می‌شود." msgid "" -"Calling ``locals()`` as part of a generator expression is equivalent to " -"calling it in a nested generator function." +"Calling ``locals()`` as part of a generator expression is equivalent to calling it " +"in a nested generator function." msgstr "" -"فراخوانی ``locals()`` درون یک عبارت مولد معادل فراخوانی آن در یک تابع مولد " +"فراخوانی ``locals()`` درون یک عبارت تولیدگر معادل فراخوانی آن در یک تابع تولیدگر " "تو‌در‌تو است." msgid "" -"The behaviour of ``locals()`` in a comprehension has been updated as " -"described in :pep:`709`." -msgstr "" -"رفتار ``locals()`` در comprehensionها مطابق :pep:`709` به‌روزرسانی شده است." +"The behaviour of ``locals()`` in a comprehension has been updated as described " +"in :pep:`709`." +msgstr "رفتار ``locals()`` در comprehensionها مطابق :pep:`709` به‌روزرسانی شده است." msgid "" -"As part of :pep:`667`, the semantics of mutating the mapping objects " -"returned from this function are now defined. The behavior in :term:" -"`optimized scopes ` is now as described above. Aside from " -"being defined, the behaviour in other scopes remains unchanged from previous " -"versions." +"As part of :pep:`667`, the semantics of mutating the mapping objects returned from " +"this function are now defined. The behavior in :term:`optimized scopes ` is now as described above. Aside from being defined, the behaviour in other " +"scopes remains unchanged from previous versions." msgstr "" -"به‌عنوان بخشی از :pep:`667`، اکنون معناشناسی تغییر دادن اشیای نگاشتی که این " -"تابع برمی‌گرداند، تعریف شده است. رفتار این تابع در :term:`حوزه‌های بهینه‌شده " -"` اکنون همان‌گونه است که در بالا توضیح داده شد. به‌جز تعریف " -"رسمی این رفتار، عملکرد آن در سایر حوزه‌ها نسبت به نسخه‌های پیشین تغییری نکرده " -"است." +"به‌عنوان بخشی از :pep:`667`، اکنون معناشناسی تغییر دادن اشیای نگاشتی که این تابع " +"برمی‌گرداند، تعریف شده است. رفتار این تابع در :term:`محدوده‌های بهینه‌شده ` اکنون همان‌گونه است که در بالا توضیح داده شد. به‌جز تعریف رسمی این رفتار، " +"عملکرد آن در سایر محدوده‌ها نسبت به نسخه‌های پیشین تغییری نکرده است." msgid "" -"Return an iterator that applies *function* to every item of *iterable*, " -"yielding the results. If additional *iterables* arguments are passed, " -"*function* must take that many arguments and is applied to the items from " -"all iterables in parallel. With multiple iterables, the iterator stops when " -"the shortest iterable is exhausted. If *strict* is ``True`` and one of the " -"iterables is exhausted before the others, a :exc:`ValueError` is raised. For " -"cases where the function inputs are already arranged into argument tuples, " -"see :func:`itertools.starmap`." -msgstr "" -"تکرارگری را برمی‌گرداند که *function* را روی هر عنصر *iterable* اعمال کرده و " -"نتایج را تولید می‌کند. اگر آرگومان‌های *iterables* اضافی ارائه شوند، " -"*function* باید به همان تعداد آرگومان بپذیرد و به‌طور هم‌زمان روی عناصر همهٔ " -"تکرارپذیرها اعمال شود. در صورت وجود چند تکرارپذیر، تکرارگر زمانی متوقف می‌شود " -"که کوتاه‌ترین تکرارپذیر به پایان برسد. اگر *strict* برابر ``True`` باشد و یکی " -"از تکرارپذیرها زودتر از بقیه به پایان برسد، استثنای :exc:`ValueError` ایجاد " -"می‌شود. در مواردی که ورودی‌های تابع از پیش به‌صورت تاپل‌های آرگومان مرتب شده‌اند، " -"به :func:`itertools.starmap` مراجعه کنید." +"Return an iterator that applies *function* to every item of *iterable*, yielding " +"the results. If additional *iterables* arguments are passed, *function* must take " +"that many arguments and is applied to the items from all iterables in parallel. " +"With multiple iterables, the iterator stops when the shortest iterable is " +"exhausted. If *strict* is ``True`` and one of the iterables is exhausted before " +"the others, a :exc:`ValueError` is raised. For cases where the function inputs are " +"already arranged into argument tuples, see :func:`itertools.starmap`." +msgstr "" +"تکرارگری را برمی‌گرداند که *function* را روی هر عنصر *iterable* اعمال کرده و نتایج " +"را تولید می‌کند. اگر آرگومان‌های *iterables* اضافی ارائه شوند، *function* باید به " +"همان تعداد آرگومان بپذیرد و به‌طور هم‌زمان روی عناصر همهٔ تکرارپذیرها اعمال شود. در " +"صورت وجود چند تکرارپذیر، تکرارگر زمانی متوقف می‌شود که کوتاه‌ترین تکرارپذیر به پایان " +"برسد. اگر *strict* برابر ``True`` باشد و یکی از تکرارپذیرها زودتر از بقیه به پایان " +"برسد، استثنای :exc:`ValueError` پرتاب می‌شود. در مواردی که ورودی‌های تابع از پیش " +"به‌صورت تاپل‌های آرگومان مرتب شده‌اند، به :func:`itertools.starmap` مراجعه کنید." msgid "Added the *strict* parameter." msgstr "پارامتر *strict* اضافه شد." msgid "" -"Return the largest item in an iterable or the largest of two or more " -"arguments." +"Return the largest item in an iterable or the largest of two or more arguments." msgstr "" "بزرگ‌ترین عنصر یک تکرارپذیر، یا بزرگ‌ترین مقدار از میان دو یا چند آرگومان را " "برمی‌گرداند." msgid "" -"If one positional argument is provided, it should be an :term:`iterable`. " -"The largest item in the iterable is returned. If two or more positional " -"arguments are provided, the largest of the positional arguments is returned." +"If one positional argument is provided, it should be an :term:`iterable`. The " +"largest item in the iterable is returned. If two or more positional arguments are " +"provided, the largest of the positional arguments is returned." msgstr "" -"اگر یک آرگومان مکانی ارائه شود، باید یک :term:`تکرارپذیر ` باشد. " -"در این صورت، بزرگ‌ترین عنصر آن تکرارپذیر برگردانده می‌شود. اگر دو یا چند " -"آرگومان مکانی ارائه شوند، بزرگ‌ترین آرگومان مکانی برگردانده می‌شود." +"اگر یک آرگومان مکانی ارائه شود، باید یک :term:`تکرارپذیر ` باشد. در این " +"صورت، بزرگ‌ترین عنصر آن تکرارپذیر برگردانده می‌شود. اگر دو یا چند آرگومان مکانی ارائه " +"شوند، بزرگ‌ترین آرگومان مکانی برگردانده می‌شود." msgid "" -"There are two optional keyword-only arguments. The *key* argument specifies " -"a one-argument ordering function like that used for :meth:`list.sort`. The " -"*default* argument specifies an object to return if the provided iterable is " -"empty. If the iterable is empty and *default* is not provided, a :exc:" -"`ValueError` is raised." +"There are two optional keyword-only arguments. The *key* argument specifies a one-" +"argument ordering function like that used for :meth:`list.sort`. The *default* " +"argument specifies an object to return if the provided iterable is empty. If the " +"iterable is empty and *default* is not provided, a :exc:`ValueError` is raised." msgstr "" -"دو آرگومان اختیاریِ فقط-کلیدی (keyword-only) وجود دارد. آرگومان *key* یک تابع " -"مرتب‌سازی تک‌آرگومانی، مشابه آنچه در :meth:`list.sort` استفاده می‌شود، مشخص " -"می‌کند. آرگومان *default* شیئی را مشخص می‌کند که در صورت خالی بودن تکرارپذیر " -"بازگردانده شود. اگر تکرارپذیر خالی باشد و *default* ارائه نشده باشد، " -"استثنای :exc:`ValueError` ایجاد می‌شود." +"دو آرگومان اختیاریِ فقط-کلیدواژه‌ای (keyword-only) وجود دارد. آرگومان *key* یک تابع " +"مرتب‌سازی تک‌آرگومانی، مشابه آنچه در :meth:`list.sort` استفاده می‌شود، مشخص می‌کند. " +"آرگومان *default* شیئی را مشخص می‌کند که در صورت خالی بودن تکرارپذیر بازگردانده شود. " +"اگر تکرارپذیر خالی باشد و *default* ارائه نشده باشد، استثنای :exc:`ValueError` " +"پرتاب می‌شود." msgid "" -"If multiple items are maximal, the function returns the first one " -"encountered. This is consistent with other sort-stability preserving tools " -"such as ``sorted(iterable, key=keyfunc, reverse=True)[0]`` and ``heapq." -"nlargest(1, iterable, key=keyfunc)``." +"If multiple items are maximal, the function returns the first one encountered. " +"This is consistent with other sort-stability preserving tools such as " +"``sorted(iterable, key=keyfunc, reverse=True)[0]`` and ``heapq.nlargest(1, " +"iterable, key=keyfunc)``." msgstr "" -"اگر چندین عنصر دارای بیشترین مقدار باشند، تابع نخستین موردی را که با آن " -"برخورد کند برمی‌گرداند. این رفتار با سایر ابزارهایی که پایداری مرتب‌سازی را " -"حفظ می‌کنند، مانند ``sorted(iterable, key=keyfunc, reverse=True)[0]`` و " -"``heapq.nlargest(1, iterable, key=keyfunc)``، سازگار است." +"اگر چندین عنصر دارای بیشترین مقدار باشند، تابع نخستین موردی را که با آن برخورد کند " +"برمی‌گرداند. این رفتار با سایر ابزارهایی که پایداری مرتب‌سازی را حفظ می‌کنند، مانند " +"``sorted(iterable, key=keyfunc, reverse=True)[0]`` و ``heapq.nlargest(1, iterable, " +"key=keyfunc)``، سازگار است." msgid "Added the *default* keyword-only parameter." msgstr "پارامتر فقط-کلیدواژهٔ *default* اضافه شد." @@ -2123,136 +2034,125 @@ msgid "The *key* can be ``None``." msgstr "*key* می‌تواند ``None`` باشد." msgid "" -"Return a \"memory view\" object created from the given argument. See :ref:" -"`typememoryview` for more information." +"Return a \"memory view\" object created from the given argument. " +"See :ref:`typememoryview` for more information." msgstr "" -"یک شیء «memory view» ایجادشده از آرگومان داده‌شده را برمی‌گرداند. برای اطلاعات " -"بیشتر، به :ref:`typememoryview` مراجعه کنید." +"یک شیء «memory view» ایجادشده از آرگومان داده‌شده را برمی‌گرداند. برای اطلاعات بیشتر، " +"به :ref:`typememoryview` مراجعه کنید." msgid "" -"Return the smallest item in an iterable or the smallest of two or more " -"arguments." +"Return the smallest item in an iterable or the smallest of two or more arguments." msgstr "" "کوچک‌ترین عنصر یک تکرارپذیر، یا کوچک‌ترین مقدار از میان دو یا چند آرگومان را " "برمی‌گرداند." msgid "" -"If one positional argument is provided, it should be an :term:`iterable`. " -"The smallest item in the iterable is returned. If two or more positional " -"arguments are provided, the smallest of the positional arguments is returned." +"If one positional argument is provided, it should be an :term:`iterable`. The " +"smallest item in the iterable is returned. If two or more positional arguments are " +"provided, the smallest of the positional arguments is returned." msgstr "" -"اگر یک آرگومان مکانی ارائه شود، باید یک :term:`تکرارپذیر ` باشد. " -"در این صورت، کوچک‌ترین عنصر آن تکرارپذیر برگردانده می‌شود. اگر دو یا چند " -"آرگومان مکانی ارائه شوند، کوچک‌ترین آرگومان مکانی برگردانده می‌شود." +"اگر یک آرگومان مکانی ارائه شود، باید یک :term:`تکرارپذیر ` باشد. در این " +"صورت، کوچک‌ترین عنصر آن تکرارپذیر برگردانده می‌شود. اگر دو یا چند آرگومان مکانی ارائه " +"شوند، کوچک‌ترین آرگومان مکانی برگردانده می‌شود." msgid "" -"If multiple items are minimal, the function returns the first one " -"encountered. This is consistent with other sort-stability preserving tools " -"such as ``sorted(iterable, key=keyfunc)[0]`` and ``heapq.nsmallest(1, " -"iterable, key=keyfunc)``." +"If multiple items are minimal, the function returns the first one encountered. " +"This is consistent with other sort-stability preserving tools such as " +"``sorted(iterable, key=keyfunc)[0]`` and ``heapq.nsmallest(1, iterable, " +"key=keyfunc)``." msgstr "" -"اگر چندین عنصر دارای کمترین مقدار باشند، تابع نخستین موردی را که با آن " -"برخورد کند برمی‌گرداند. این رفتار با سایر ابزارهایی که پایداری مرتب‌سازی را " -"حفظ می‌کنند، مانند ``sorted(iterable, key=keyfunc)[0]`` و ``heapq." -"nsmallest(1, iterable, key=keyfunc)``، سازگار است." +"اگر چندین عنصر دارای کمترین مقدار باشند، تابع نخستین موردی را که با آن برخورد کند " +"برمی‌گرداند. این رفتار با سایر ابزارهایی که پایداری مرتب‌سازی را حفظ می‌کنند، مانند " +"``sorted(iterable, key=keyfunc)[0]`` و ``heapq.nsmallest(1, iterable, " +"key=keyfunc)``، سازگار است." msgid "" -"Retrieve the next item from the :term:`iterator` by calling its :meth:" -"`~iterator.__next__` method. If *default* is given, it is returned if the " -"iterator is exhausted, otherwise :exc:`StopIteration` is raised." +"Retrieve the next item from the :term:`iterator` by calling " +"its :meth:`~iterator.__next__` method. If *default* is given, it is returned if " +"the iterator is exhausted, otherwise :exc:`StopIteration` is raised." msgstr "" "با فراخوانی متد :meth:`~iterator.__next__`، عنصر بعدی را از :term:`تکرارگر " -"` دریافت می‌کند. اگر *default* مشخص شده باشد، در صورت پایان یافتن " -"تکرارگر همان مقدار برگردانده می‌شود؛ در غیر این صورت، استثنای :exc:" -"`StopIteration` ایجاد می‌شود." +"` دریافت می‌کند. اگر *default* مشخص شده باشد، در صورت پایان یافتن تکرارگر " +"همان مقدار برگردانده می‌شود؛ در غیر این صورت، استثنای :exc:`StopIteration` پرتاب " +"می‌شود." msgid "" -"This is the ultimate base class of all other classes. It has methods that " -"are common to all instances of Python classes. When the constructor is " -"called, it returns a new featureless object. The constructor does not accept " -"any arguments." +"This is the ultimate base class of all other classes. It has methods that are " +"common to all instances of Python classes. When the constructor is called, it " +"returns a new featureless object. The constructor does not accept any arguments." msgstr "" -"این، کلاس پایهٔ نهایی همهٔ کلاس‌های دیگر است. این کلاس متدهایی را در اختیار " -"دارد که میان تمام نمونه‌های کلاس‌های پایتون مشترک هستند. هنگام فراخوانی سازندهٔ " -"آن، یک شیء جدید و بدون ویژگی ایجاد می‌شود. این سازنده هیچ آرگومانی را " -"نمی‌پذیرد." +"این، کلاس پایهٔ نهایی همهٔ کلاس‌های دیگر است. این کلاس متدهایی را در اختیار دارد که " +"میان تمام نمونه‌های کلاس‌های پایتون مشترک هستند. هنگام فراخوانی سازندهٔ آن، یک شیء " +"جدید و بدون ویژگی ایجاد می‌شود. این سازنده هیچ آرگومانی را نمی‌پذیرد." msgid "" -":class:`object` instances do *not* have :attr:`~object.__dict__` attributes, " -"so you can't assign arbitrary attributes to an instance of :class:`object`." +":class:`object` instances do *not* have :attr:`~object.__dict__` attributes, so you " +"can't assign arbitrary attributes to an instance of :class:`object`." msgstr "" -"نمونه‌های :class:`object` دارای ویژگی :attr:`~object.__dict__` *نیستند*؛ " -"بنابراین نمی‌توانید ویژگی‌های دلخواهی را به یک نمونه از :class:`object` اختصاص " -"دهید." +"نمونه‌های :class:`object` دارای ویژگی :attr:`~object.__dict__` *نیستند*؛ بنابراین " +"نمی‌توانید ویژگی‌های دلخواهی را به یک نمونه از :class:`object` اختصاص دهید." msgid "" -"Convert an integer number to an octal string prefixed with \"0o\". The " -"result is a valid Python expression. If *integer* is not a Python :class:" -"`int` object, it has to define an :meth:`~object.__index__` method that " -"returns an integer. For example:" +"Convert an integer number to an octal string prefixed with \"0o\". The result is a " +"valid Python expression. If *integer* is not a Python :class:`int` object, it has " +"to define an :meth:`~object.__index__` method that returns an integer. For example:" msgstr "" -"تبدیل یک عدد صحیح به یک رشته باینری که با \"0b\" پیشوند شده است. نتیجه یک " -"عبارت معتبر پایتون خواهد بود. اگر *integer* یک شیء پایتون :class:`int` " -"نباشد، لازم است یک روش(متد) :meth:`~object.__index__` تعریف کند که یک عدد " -"صحیح برگرداند. برخی مثال ها:" +"تبدیل یک عدد صحیح به یک رشته باینری که با \"0b\" پیشوند شده است. نتیجه یک عبارت " +"معتبر پایتون خواهد بود. اگر *integer* یک شیء پایتون :class:`int` نباشد، لازم است یک " +"متد :meth:`~object.__index__` تعریف کند که یک عدد صحیح برگرداند. برخی مثال ها:" msgid "" -"If you want to convert an integer number to an octal string either with the " -"prefix \"0o\" or not, you can use either of the following ways." +"If you want to convert an integer number to an octal string either with the prefix " +"\"0o\" or not, you can use either of the following ways." msgstr "" -"اگر می‌خواهید یک عدد صحیح را به یک رشتهٔ هشت‌هشتی، با پیشوند «0o» یا بدون آن، " -"تبدیل کنید، می‌توانید از هر یک از روش‌های زیر استفاده کنید." +"اگر می‌خواهید یک عدد صحیح را به یک رشتهٔ هشت‌هشتی، با پیشوند «0o» یا بدون آن، تبدیل " +"کنید، می‌توانید از هر یک از روش‌های زیر استفاده کنید." msgid "" -"Open *file* and return a corresponding :term:`file object`. If the file " -"cannot be opened, an :exc:`OSError` is raised. See :ref:`tut-files` for more " -"examples of how to use this function." +"Open *file* and return a corresponding :term:`file object`. If the file cannot be " +"opened, an :exc:`OSError` is raised. See :ref:`tut-files` for more examples of how " +"to use this function." msgstr "" -"*file* را باز کرده و :term:`شیء پرونده ` متناظر با آن را " -"برمی‌گرداند. اگر پرونده قابل باز شدن نباشد، استثنای :exc:`OSError` ایجاد " -"می‌شود. برای مثال‌های بیشتر دربارهٔ نحوهٔ استفاده از این تابع، به :ref:`tut-" -"files` مراجعه کنید." +"*file* را باز کرده و :term:`شیء پرونده ` متناظر با آن را برمی‌گرداند. " +"اگر پرونده قابل باز شدن نباشد، استثنای :exc:`OSError` پرتاب می‌شود. برای مثال‌های " +"بیشتر دربارهٔ نحوهٔ استفاده از این تابع، به :ref:`tut-files` مراجعه کنید." msgid "" -"*file* is a :term:`path-like object` giving the pathname (absolute or " -"relative to the current working directory) of the file to be opened or an " -"integer file descriptor of the file to be wrapped. (If a file descriptor is " -"given, it is closed when the returned I/O object is closed unless *closefd* " -"is set to ``False``.)" +"*file* is a :term:`path-like object` giving the pathname (absolute or relative to " +"the current working directory) of the file to be opened or an integer file " +"descriptor of the file to be wrapped. (If a file descriptor is given, it is closed " +"when the returned I/O object is closed unless *closefd* is set to ``False``.)" msgstr "" -"*file* یک :term:`شیء مسیرمانند ` است که مسیر پرونده (مطلق " -"یا نسبی نسبت به پوشهٔ کاری فعلی) را برای باز شدن مشخص می‌کند، یا یک توصیفگر " -"عددی پرونده مربوط به پرونده‌ای است که باید در یک شیء ورودی/خروجی بسته‌بندی " -"شود. (اگر یک توصیفگر پرونده ارائه شود، هنگام بسته شدن شیء ورودی/خروجیِ " -"بازگشتی نیز بسته خواهد شد، مگر اینکه *closefd* برابر ``False`` تنظیم شده " -"باشد.)" +"*file* یک :term:`شیء مسیرمانند ` است که مسیر پرونده (مطلق یا نسبی " +"نسبت به پوشهٔ کاری فعلی) را برای باز شدن مشخص می‌کند، یا یک توصیفگر عددی پرونده مربوط " +"به پرونده‌ای است که باید در یک شیء ورودی/خروجی بسته‌بندی شود. (اگر یک توصیفگر پرونده " +"ارائه شود، هنگام بسته شدن شیء ورودی/خروجیِ بازگشتی نیز بسته خواهد شد، مگر اینکه " +"*closefd* برابر ``False`` تنظیم شده باشد.)" msgid "" -"*mode* is an optional string that specifies the mode in which the file is " -"opened. It defaults to ``'r'`` which means open for reading in text mode. " -"Other common values are ``'w'`` for writing (truncating the file if it " -"already exists), ``'x'`` for exclusive creation, and ``'a'`` for appending " -"(which on *some* Unix systems, means that *all* writes append to the end of " -"the file regardless of the current seek position). In text mode, if " -"*encoding* is not specified the encoding used is platform-dependent: :func:" -"`locale.getencoding` is called to get the current locale encoding. (For " -"reading and writing raw bytes use binary mode and leave *encoding* " +"*mode* is an optional string that specifies the mode in which the file is opened. " +"It defaults to ``'r'`` which means open for reading in text mode. Other common " +"values are ``'w'`` for writing (truncating the file if it already exists), ``'x'`` " +"for exclusive creation, and ``'a'`` for appending (which on *some* Unix systems, " +"means that *all* writes append to the end of the file regardless of the current " +"seek position). In text mode, if *encoding* is not specified the encoding used is " +"platform-dependent: :func:`locale.getencoding` is called to get the current locale " +"encoding. (For reading and writing raw bytes use binary mode and leave *encoding* " "unspecified.) The available modes are:" msgstr "" -"*mode* یک رشتهٔ اختیاری است که حالت باز شدن پرونده را مشخص می‌کند. مقدار " -"پیش‌فرض آن ``'r'`` است که به معنای باز کردن پرونده برای خواندن در حالت متنی " -"است. مقادیر رایج دیگر عبارت‌اند از ``'w'`` برای نوشتن (که اگر پرونده از قبل " -"وجود داشته باشد، محتوای آن را حذف می‌کند)، ``'x'`` برای ایجاد انحصاری، و " -"``'a'`` برای افزودن به انتهای پرونده (که در *برخی* از سیستم‌های یونیکس به این " -"معناست که *تمام* عملیات نوشتن، صرف‌نظر از موقعیت فعلی نشانگر، به انتهای " -"پرونده افزوده می‌شوند). در حالت متنی، اگر *encoding* مشخص نشده باشد، رمزگذاری " -"مورد استفاده به سکو بستگی دارد؛ در این حالت، :func:`locale.getencoding` برای " -"دریافت رمزگذاری محلی (locale) فعلی فراخوانی می‌شود. (برای خواندن و نوشتن " -"بایت‌های خام، از حالت دودویی استفاده کنید و *encoding* را مشخص نکنید.) " -"حالت‌های موجود عبارت‌اند از:" +"*mode* یک رشتهٔ اختیاری است که حالت باز شدن پرونده را مشخص می‌کند. مقدار پیش‌فرض آن " +"``'r'`` است که به معنای باز کردن پرونده برای خواندن در حالت متنی است. مقادیر رایج " +"دیگر عبارت‌اند از ``'w'`` برای نوشتن (که اگر پرونده از قبل وجود داشته باشد، محتوای " +"آن را حذف می‌کند)، ``'x'`` برای ایجاد انحصاری، و ``'a'`` برای افزودن به انتهای " +"پرونده (که در *برخی* از سیستم‌های یونیکس به این معناست که *تمام* عملیات نوشتن، " +"صرف‌نظر از موقعیت فعلی نشانگر، به انتهای پرونده افزوده می‌شوند). در حالت متنی، اگر " +"*encoding* مشخص نشده باشد، رمزگذاری مورد استفاده به سکو بستگی دارد؛ در این " +"حالت، :func:`locale.getencoding` برای دریافت رمزگذاری محلی (locale) فعلی فراخوانی " +"می‌شود. (برای خواندن و نوشتن بایت‌های خام، از حالت دودویی استفاده کنید و *encoding* " +"را مشخص نکنید.) حالت‌های موجود عبارت‌اند از:" msgid "Character" -msgstr "کاراکتر" +msgstr "نویسه" msgid "Meaning" msgstr "به معنی" @@ -2274,16 +2174,15 @@ msgstr "``'x'``" msgid "open for exclusive creation, failing if the file already exists" msgstr "" -"باز کردن برای ایجاد انحصاری؛ در صورتی که پرونده از قبل وجود داشته باشد، " -"عملیات شکست می‌خورد" +"باز کردن برای ایجاد انحصاری؛ در صورتی که پرونده از قبل وجود داشته باشد، عملیات شکست " +"می‌خورد" msgid "``'a'``" msgstr "``'a'``" msgid "open for writing, appending to the end of file if it exists" msgstr "" -"باز کردن برای نوشتن؛ اگر پرونده وجود داشته باشد، داده‌ها به انتهای آن افزوده " -"می‌شوند" +"باز کردن برای نوشتن؛ اگر پرونده وجود داشته باشد، داده‌ها به انتهای آن افزوده می‌شوند" msgid "``'b'``" msgstr "``'b'``" @@ -2304,241 +2203,228 @@ msgid "open for updating (reading and writing)" msgstr "باز کردن برای به‌روزرسانی (خواندن و نوشتن)" msgid "" -"The default mode is ``'r'`` (open for reading text, a synonym of ``'rt'``). " -"Modes ``'w+'`` and ``'w+b'`` open and truncate the file. Modes ``'r+'`` and " -"``'r+b'`` open the file with no truncation." +"The default mode is ``'r'`` (open for reading text, a synonym of ``'rt'``). Modes " +"``'w+'`` and ``'w+b'`` open and truncate the file. Modes ``'r+'`` and ``'r+b'`` " +"open the file with no truncation." msgstr "" -"حالت پیش‌فرض ``'r'`` است (باز کردن پرونده برای خواندن متن، که معادل ``'rt'`` " -"است). حالت‌های ``'w+'`` و ``'w+b'`` پرونده را باز کرده و محتوای آن را حذف " -"می‌کنند. حالت‌های ``'r+'`` و ``'r+b'`` پرونده را بدون حذف محتوا باز می‌کنند." +"حالت پیش‌فرض ``'r'`` است (باز کردن پرونده برای خواندن متن، که معادل ``'rt'`` است). " +"حالت‌های ``'w+'`` و ``'w+b'`` پرونده را باز کرده و محتوای آن را حذف می‌کنند. حالت‌های " +"``'r+'`` و ``'r+b'`` پرونده را بدون حذف محتوا باز می‌کنند." msgid "" -"As mentioned in the :ref:`io-overview`, Python distinguishes between binary " -"and text I/O. Files opened in binary mode (including ``'b'`` in the *mode* " -"argument) return contents as :class:`bytes` objects without any decoding. " -"In text mode (the default, or when ``'t'`` is included in the *mode* " -"argument), the contents of the file are returned as :class:`str`, the bytes " -"having been first decoded using a platform-dependent encoding or using the " -"specified *encoding* if given." +"As mentioned in the :ref:`io-overview`, Python distinguishes between binary and " +"text I/O. Files opened in binary mode (including ``'b'`` in the *mode* argument) " +"return contents as :class:`bytes` objects without any decoding. In text mode (the " +"default, or when ``'t'`` is included in the *mode* argument), the contents of the " +"file are returned as :class:`str`, the bytes having been first decoded using a " +"platform-dependent encoding or using the specified *encoding* if given." msgstr "" -"همان‌طور که در :ref:`io-overview` اشاره شد، پایتون بین ورودی/خروجی دودویی و " -"متنی تفاوت قائل می‌شود. پرونده‌هایی که در حالت دودویی باز می‌شوند (یعنی *mode* " -"شامل ``'b'`` باشد)، محتوا را بدون هیچ رمزگشایی به‌صورت اشیای :class:`bytes` " -"برمی‌گردانند. در حالت متنی (حالت پیش‌فرض، یا زمانی که *mode* شامل ``'t'`` " -"باشد)، محتوای پرونده به‌صورت :class:`str` برگردانده می‌شود؛ در این حالت، " -"بایت‌ها ابتدا با استفاده از رمزگذاری وابسته به سکو یا، در صورت مشخص شدن، با " -"استفاده از *encoding* داده‌شده رمزگشایی می‌شوند." +"همان‌طور که در :ref:`io-overview` اشاره شد، پایتون بین ورودی/خروجی دودویی و متنی " +"تفاوت قائل می‌شود. پرونده‌هایی که در حالت دودویی باز می‌شوند (یعنی *mode* شامل ``'b'`` " +"باشد)، محتوا را بدون هیچ رمزگشایی به‌صورت اشیای :class:`bytes` برمی‌گردانند. در حالت " +"متنی (حالت پیش‌فرض، یا زمانی که *mode* شامل ``'t'`` باشد)، محتوای پرونده " +"به‌صورت :class:`str` برگردانده می‌شود؛ در این حالت، بایت‌ها ابتدا با استفاده از " +"رمزگذاری وابسته به سکو یا، در صورت مشخص شدن، با استفاده از *encoding* داده‌شده " +"رمزگشایی می‌شوند." msgid "" -"Python doesn't depend on the underlying operating system's notion of text " -"files; all the processing is done by Python itself, and is therefore " -"platform-independent." +"Python doesn't depend on the underlying operating system's notion of text files; " +"all the processing is done by Python itself, and is therefore platform-independent." msgstr "" -"پایتون به مفهوم پروندهٔ متنی در سیستم‌عامل زیربنایی وابسته نیست؛ تمام پردازش‌ها " -"توسط خود پایتون انجام می‌شوند و بنابراین مستقل از سکو هستند." +"پایتون به مفهوم پروندهٔ متنی در سیستم‌عامل زیربنایی وابسته نیست؛ تمام پردازش‌ها توسط " +"خود پایتون انجام می‌شوند و بنابراین مستقل از سکو هستند." msgid "" -"*buffering* is an optional integer used to set the buffering policy. Pass 0 " -"to switch buffering off (only allowed in binary mode), 1 to select line " -"buffering (only usable when writing in text mode), and an integer > 1 to " -"indicate the size in bytes of a fixed-size chunk buffer. Note that " -"specifying a buffer size this way applies for binary buffered I/O, but " -"``TextIOWrapper`` (i.e., files opened with ``mode='r+'``) would have another " -"buffering. To disable buffering in ``TextIOWrapper``, consider using the " -"``write_through`` flag for :func:`io.TextIOWrapper.reconfigure`. When no " -"*buffering* argument is given, the default buffering policy works as follows:" +"*buffering* is an optional integer used to set the buffering policy. Pass 0 to " +"switch buffering off (only allowed in binary mode), 1 to select line buffering " +"(only usable when writing in text mode), and an integer > 1 to indicate the size in " +"bytes of a fixed-size chunk buffer. Note that specifying a buffer size this way " +"applies for binary buffered I/O, but ``TextIOWrapper`` (i.e., files opened with " +"``mode='r+'``) would have another buffering. To disable buffering in " +"``TextIOWrapper``, consider using the ``write_through`` flag " +"for :func:`io.TextIOWrapper.reconfigure`. When no *buffering* argument is given, " +"the default buffering policy works as follows:" msgstr "" -"آرگومان *buffering* یک عدد صحیح اختیاری است که برای تعیین سیاست بافرگذاری " -"استفاده می‌شود. برای غیرفعال کردن بافرگذاری مقدار 0 را وارد کنید (که فقط در " -"حالت دودویی مجاز است)، برای انتخاب بافرگذاری خطی مقدار 1 را وارد کنید (که " -"فقط هنگام نوشتن در حالت متنی قابل استفاده است)، و یک عدد صحیح بزرگ‌تر از 1 را " -"برای تعیین اندازهٔ یک بافر با اندازهٔ ثابت (بر حسب بایت) مشخص کنید. توجه داشته " -"باشید که تعیین اندازهٔ بافر به این روش فقط برای ورودی/خروجی دودوییِ بافرشده " -"اعمال می‌شود، اما ``TextIOWrapper`` (یعنی پرونده‌هایی که با ``mode='r+'`` باز " -"می‌شوند) از بافرگذاری دیگری استفاده می‌کند. برای غیرفعال کردن بافرگذاری در " -"``TextIOWrapper``، استفاده از پرچم ``write_through`` برای :func:`io." -"TextIOWrapper.reconfigure` را در نظر بگیرید. اگر آرگومان *buffering* مشخص " -"نشود، سیاست پیش‌فرض بافرگذاری به صورت زیر عمل می‌کند:" +"آرگومان *buffering* یک عدد صحیح اختیاری است که برای تعیین سیاست بافرگذاری استفاده " +"می‌شود. برای غیرفعال کردن بافرگذاری مقدار 0 را وارد کنید (که فقط در حالت دودویی مجاز " +"است)، برای انتخاب بافرگذاری خطی مقدار 1 را وارد کنید (که فقط هنگام نوشتن در حالت " +"متنی قابل استفاده است)، و یک عدد صحیح بزرگ‌تر از 1 را برای تعیین اندازهٔ یک بافر با " +"اندازهٔ ثابت (بر حسب بایت) مشخص کنید. توجه داشته باشید که تعیین اندازهٔ بافر به این " +"روش فقط برای ورودی/خروجی دودوییِ بافرشده اعمال می‌شود، اما ``TextIOWrapper`` (یعنی " +"پرونده‌هایی که با ``mode='r+'`` باز می‌شوند) از بافرگذاری دیگری استفاده می‌کند. برای " +"غیرفعال کردن بافرگذاری در ``TextIOWrapper``، استفاده از پرچم ``write_through`` " +"برای :func:`io.TextIOWrapper.reconfigure` را در نظر بگیرید. اگر آرگومان *buffering* " +"مشخص نشود، سیاست پیش‌فرض بافرگذاری به صورت زیر عمل می‌کند:" msgid "" "Binary files are buffered in fixed-size chunks; the size of the buffer is " -"``max(min(blocksize, 8 MiB), DEFAULT_BUFFER_SIZE)`` when the device block " -"size is available. On most systems, the buffer will typically be 128 " -"kilobytes long." +"``max(min(blocksize, 8 MiB), DEFAULT_BUFFER_SIZE)`` when the device block size is " +"available. On most systems, the buffer will typically be 128 kilobytes long." msgstr "" -"پرونده‌های دودویی در قطعه‌هایی با اندازهٔ ثابت بافر می‌شوند؛ اگر اندازهٔ بلوک " -"دستگاه در دسترس باشد، اندازهٔ بافر برابر با ``max(min(blocksize, 8 MiB), " -"DEFAULT_BUFFER_SIZE)`` خواهد بود. در بیشتر سیستم‌ها، اندازهٔ بافر معمولاً ۱۲۸ " -"کیلوبایت است." +"پرونده‌های دودویی در قطعه‌هایی با اندازهٔ ثابت بافر می‌شوند؛ اگر اندازهٔ بلوک دستگاه در " +"دسترس باشد، اندازهٔ بافر برابر با ``max(min(blocksize, 8 MiB), " +"DEFAULT_BUFFER_SIZE)`` خواهد بود. در بیشتر سیستم‌ها، اندازهٔ بافر معمولاً ۱۲۸ کیلوبایت " +"است." msgid "" -"\"Interactive\" text files (files for which :meth:`~io.IOBase.isatty` " -"returns ``True``) use line buffering. Other text files use the policy " -"described above for binary files." +"\"Interactive\" text files (files for which :meth:`~io.IOBase.isatty` returns " +"``True``) use line buffering. Other text files use the policy described above for " +"binary files." msgstr "" -"پرونده‌های متنی «تعاملی» (پرونده‌هایی که :meth:`~io.IOBase.isatty` برای آن‌ها " -"مقدار ``True`` برمی‌گرداند) از بافرگذاری خطی استفاده می‌کنند. سایر پرونده‌های " -"متنی از سیاستی که در بالا برای پرونده‌های دودویی توضیح داده شده است، پیروی " -"می‌کنند." +"پرونده‌های متنی «تعاملی» (پرونده‌هایی که :meth:`~io.IOBase.isatty` برای آن‌ها مقدار " +"``True`` برمی‌گرداند) از بافرگذاری خطی استفاده می‌کنند. سایر پرونده‌های متنی از سیاستی " +"که در بالا برای پرونده‌های دودویی توضیح داده شده است، پیروی می‌کنند." msgid "" -"*encoding* is the name of the encoding used to decode or encode the file. " -"This should only be used in text mode. The default encoding is platform " -"dependent (whatever :func:`locale.getencoding` returns), but any :term:`text " -"encoding` supported by Python can be used. See the :mod:`codecs` module for " -"the list of supported encodings." +"*encoding* is the name of the encoding used to decode or encode the file. This " +"should only be used in text mode. The default encoding is platform dependent " +"(whatever :func:`locale.getencoding` returns), but any :term:`text encoding` " +"supported by Python can be used. See the :mod:`codecs` module for the list of " +"supported encodings." msgstr "" -"*encoding* نام رمزگذاری مورد استفاده برای رمزگشایی یا رمزگذاری پرونده است. " -"این گزینه فقط باید در حالت متنی استفاده شود. رمزگذاری پیش‌فرض به سکو بستگی " -"دارد (هر مقداری که :func:`locale.getencoding` برگرداند)، اما می‌توان از هر :" -"term:`رمزگذاری متنی ` که توسط پایتون پشتیبانی می‌شود استفاده " -"کرد. برای مشاهدهٔ فهرست رمزگذاری‌های پشتیبانی‌شده، به ماژول :mod:`codecs` " -"مراجعه کنید." +"*encoding* نام رمزگذاری مورد استفاده برای رمزگشایی یا رمزگذاری پرونده است. این " +"گزینه فقط باید در حالت متنی استفاده شود. رمزگذاری پیش‌فرض به سکو بستگی دارد (هر " +"مقداری که :func:`locale.getencoding` برگرداند)، اما می‌توان از هر :term:`رمزگذاری " +"متنی ` که توسط پایتون پشتیبانی می‌شود استفاده کرد. برای مشاهدهٔ فهرست " +"رمزگذاری‌های پشتیبانی‌شده، به ماژول :mod:`codecs` مراجعه کنید." msgid "" -"*errors* is an optional string that specifies how encoding and decoding " -"errors are to be handled—this cannot be used in binary mode. A variety of " -"standard error handlers are available (listed under :ref:`error-handlers`), " -"though any error handling name that has been registered with :func:`codecs." -"register_error` is also valid. The standard names include:" +"*errors* is an optional string that specifies how encoding and decoding errors are " +"to be handled—this cannot be used in binary mode. A variety of standard error " +"handlers are available (listed under :ref:`error-handlers`), though any error " +"handling name that has been registered with :func:`codecs.register_error` is also " +"valid. The standard names include:" msgstr "" -"*errors* یک رشتهٔ اختیاری است که مشخص می‌کند خطاهای رمزگذاری و رمزگشایی چگونه " -"مدیریت شوند؛ این گزینه در حالت دودویی قابل استفاده نیست. مجموعه‌ای از " -"مدیریت‌کننده‌های استاندارد خطا (که در :ref:`error-handlers` فهرست شده‌اند) در " -"دسترس هستند، با این حال هر نام مدیریت خطایی که با :func:`codecs." -"register_error` ثبت شده باشد نیز معتبر است. نام‌های استاندارد شامل موارد زیر " -"هستند:" +"*errors* یک رشتهٔ اختیاری است که مشخص می‌کند خطاهای رمزگذاری و رمزگشایی چگونه مدیریت " +"شوند؛ این گزینه در حالت دودویی قابل استفاده نیست. مجموعه‌ای از مدیریت‌کننده‌های " +"استاندارد خطا (که در :ref:`error-handlers` فهرست شده‌اند) در دسترس هستند، با این حال " +"هر نام مدیریت خطایی که با :func:`codecs.register_error` ثبت شده باشد نیز معتبر است. " +"نام‌های استاندارد شامل موارد زیر هستند:" msgid "" -"``'strict'`` to raise a :exc:`ValueError` exception if there is an encoding " -"error. The default value of ``None`` has the same effect." +"``'strict'`` to raise a :exc:`ValueError` exception if there is an encoding error. " +"The default value of ``None`` has the same effect." msgstr "" -"``'strict'`` در صورت بروز خطای رمزگذاری، استثنای :exc:`ValueError` ایجاد " -"می‌کند. مقدار پیش‌فرض ``None`` نیز همین رفتار را دارد." +"``'strict'`` در صورت بروز خطای رمزگذاری، استثنای :exc:`ValueError` پرتاب می‌کند. " +"مقدار پیش‌فرض ``None`` نیز همین رفتار را دارد." msgid "" -"``'ignore'`` ignores errors. Note that ignoring encoding errors can lead to " -"data loss." +"``'ignore'`` ignores errors. Note that ignoring encoding errors can lead to data " +"loss." msgstr "" "``'ignore'`` خطاها را نادیده می‌گیرد. توجه داشته باشید که نادیده گرفتن خطاهای " "رمزگذاری ممکن است به از دست رفتن داده‌ها منجر شود." msgid "" -"``'replace'`` causes a replacement marker (such as ``'?'``) to be inserted " -"where there is malformed data." +"``'replace'`` causes a replacement marker (such as ``'?'``) to be inserted where " +"there is malformed data." msgstr "" -"``'replace'`` باعث می‌شود در محل داده‌های نادرست، یک نویسهٔ جایگزین (مانند " -"``'?'``) درج شود." +"``'replace'`` باعث می‌شود در محل داده‌های نادرست، یک نویسهٔ جایگزین (مانند ``'?'``) " +"درج شود." msgid "" -"``'surrogateescape'`` will represent any incorrect bytes as low surrogate " -"code units ranging from U+DC80 to U+DCFF. These surrogate code units will " -"then be turned back into the same bytes when the ``surrogateescape`` error " -"handler is used when writing data. This is useful for processing files in " -"an unknown encoding." +"``'surrogateescape'`` will represent any incorrect bytes as low surrogate code " +"units ranging from U+DC80 to U+DCFF. These surrogate code units will then be turned " +"back into the same bytes when the ``surrogateescape`` error handler is used when " +"writing data. This is useful for processing files in an unknown encoding." msgstr "" -"``'surrogateescape'`` هر بایت نادرست را به‌صورت واحدهای کد جانشین پایینی در " -"بازهٔ U+DC80 تا U+DCFF نمایش می‌دهد. سپس، هنگام نوشتن داده‌ها و استفاده از " -"مدیریت‌کنندهٔ خطای ``surrogateescape``، این واحدهای کد جانشین دوباره به همان " -"بایت‌ها تبدیل می‌شوند. این قابلیت برای پردازش پرونده‌هایی با رمزگذاری نامشخص " -"مفید است." +"``'surrogateescape'`` هر بایت نادرست را به‌صورت واحدهای کد جانشین پایینی در بازهٔ " +"U+DC80 تا U+DCFF نمایش می‌دهد. سپس، هنگام نوشتن داده‌ها و استفاده از مدیریت‌کنندهٔ خطای " +"``surrogateescape``، این واحدهای کد جانشین دوباره به همان بایت‌ها تبدیل می‌شوند. این " +"قابلیت برای پردازش پرونده‌هایی با رمزگذاری نامشخص مفید است." msgid "" -"``'xmlcharrefreplace'`` is only supported when writing to a file. Characters " -"not supported by the encoding are replaced with the appropriate XML " -"character reference :samp:`&#{nnn};`." +"``'xmlcharrefreplace'`` is only supported when writing to a file. Characters not " +"supported by the encoding are replaced with the appropriate XML character " +"reference :samp:`&#{nnn};`." msgstr "" -"``'xmlcharrefreplace'`` فقط هنگام نوشتن در یک پرونده پشتیبانی می‌شود. " -"نویسه‌هایی که توسط رمزگذاری پشتیبانی نمی‌شوند، با ارجاع نویسهٔ XML متناظر آن‌ها " -"به صورت :samp:`&#{nnn};` جایگزین می‌شوند." +"``'xmlcharrefreplace'`` فقط هنگام نوشتن در یک پرونده پشتیبانی می‌شود. نویسه‌هایی که " +"توسط رمزگذاری پشتیبانی نمی‌شوند، با ارجاع نویسهٔ XML متناظر آن‌ها به " +"صورت :samp:`&#{nnn};` جایگزین می‌شوند." msgid "" -"``'backslashreplace'`` replaces malformed data by Python's backslashed " -"escape sequences." +"``'backslashreplace'`` replaces malformed data by Python's backslashed escape " +"sequences." msgstr "" -"``'backslashreplace'`` داده‌های نادرست را با توالی‌های گریز دارای بک‌اسلش در " -"پایتون جایگزین می‌کند." +"``'backslashreplace'`` داده‌های نادرست را با توالی‌های گریز دارای بک‌اسلش در پایتون " +"جایگزین می‌کند." msgid "" "``'namereplace'`` (also only supported when writing) replaces unsupported " "characters with ``\\N{...}`` escape sequences." msgstr "" -"``'namereplace'`` (که آن هم فقط هنگام نوشتن پشتیبانی می‌شود) نویسه‌های " -"پشتیبانی‌نشده را با توالی‌های گریز ``\\N{...}`` جایگزین می‌کند." +"``'namereplace'`` (که آن هم فقط هنگام نوشتن پشتیبانی می‌شود) نویسه‌های پشتیبانی‌نشده " +"را با توالی‌های گریز ``\\N{...}`` جایگزین می‌کند." msgid "" -"*newline* determines how to parse newline characters from the stream. It can " -"be ``None``, ``''``, ``'\\n'``, ``'\\r'``, and ``'\\r\\n'``. It works as " -"follows:" +"*newline* determines how to parse newline characters from the stream. It can be " +"``None``, ``''``, ``'\\n'``, ``'\\r'``, and ``'\\r\\n'``. It works as follows:" msgstr "" -"*newline* مشخص می‌کند که نویسه‌های پایان خط در جریان داده چگونه تجزیه شوند. " -"این مقدار می‌تواند ``None``، ``''``، ``'\\n'``، ``'\\r'`` یا ``'\\r\\n'`` " -"باشد. عملکرد آن به صورت زیر است:" +"*newline* مشخص می‌کند که نویسه‌های پایان خط در جریان داده چگونه تجزیه شوند. این مقدار " +"می‌تواند ``None``، ``''``، ``'\\n'``، ``'\\r'`` یا ``'\\r\\n'`` باشد. عملکرد آن به " +"صورت زیر است:" msgid "" -"When reading input from the stream, if *newline* is ``None``, universal " -"newlines mode is enabled. Lines in the input can end in ``'\\n'``, " -"``'\\r'``, or ``'\\r\\n'``, and these are translated into ``'\\n'`` before " -"being returned to the caller. If it is ``''``, universal newlines mode is " -"enabled, but line endings are returned to the caller untranslated. If it " -"has any of the other legal values, input lines are only terminated by the " -"given string, and the line ending is returned to the caller untranslated." +"When reading input from the stream, if *newline* is ``None``, universal newlines " +"mode is enabled. Lines in the input can end in ``'\\n'``, ``'\\r'``, or " +"``'\\r\\n'``, and these are translated into ``'\\n'`` before being returned to the " +"caller. If it is ``''``, universal newlines mode is enabled, but line endings are " +"returned to the caller untranslated. If it has any of the other legal values, " +"input lines are only terminated by the given string, and the line ending is " +"returned to the caller untranslated." msgstr "" -"هنگام خواندن ورودی از جریان، اگر *newline* برابر ``None`` باشد، حالت " -"پایان‌خط‌های همگانی فعال می‌شود. در این حالت، خطوط ورودی می‌توانند با ``'\\n'``، " -"``'\\r'`` یا ``'\\r\\n'`` پایان یابند و پیش از بازگردانده شدن به فراخواننده، " -"همگی به ``'\\n'`` تبدیل می‌شوند. اگر مقدار آن ``''`` باشد، حالت پایان‌خط‌های " -"همگانی همچنان فعال است، اما نویسه‌های پایان خط بدون تبدیل به فراخواننده " -"بازگردانده می‌شوند. اگر *newline* یکی از مقادیر مجاز دیگر را داشته باشد، خطوط " -"ورودی فقط با همان رشته خاتمه می‌یابند و نویسهٔ پایان خط بدون تبدیل بازگردانده " -"می‌شود." +"هنگام خواندن ورودی از جریان، اگر *newline* برابر ``None`` باشد، حالت پایان‌خط‌های " +"همگانی فعال می‌شود. در این حالت، خطوط ورودی می‌توانند با ``'\\n'``، ``'\\r'`` یا " +"``'\\r\\n'`` پایان یابند و پیش از بازگردانده شدن به فراخواننده، همگی به ``'\\n'`` " +"تبدیل می‌شوند. اگر مقدار آن ``''`` باشد، حالت پایان‌خط‌های همگانی همچنان فعال است، اما " +"نویسه‌های پایان خط بدون تبدیل به فراخواننده بازگردانده می‌شوند. اگر *newline* یکی از " +"مقادیر مجاز دیگر را داشته باشد، خطوط ورودی فقط با همان رشته خاتمه می‌یابند و نویسهٔ " +"پایان خط بدون تبدیل بازگردانده می‌شود." msgid "" "When writing output to the stream, if *newline* is ``None``, any ``'\\n'`` " -"characters written are translated to the system default line separator, :" -"data:`os.linesep`. If *newline* is ``''`` or ``'\\n'``, no translation " +"characters written are translated to the system default line " +"separator, :data:`os.linesep`. If *newline* is ``''`` or ``'\\n'``, no translation " "takes place. If *newline* is any of the other legal values, any ``'\\n'`` " "characters written are translated to the given string." msgstr "" -"هنگام نوشتن خروجی در جریان، اگر *newline* برابر ``None`` باشد، هر نویسهٔ " -"``'\\n'`` نوشته‌شده به جداکنندهٔ پیش‌فرض پایان خط سیستم، یعنی :data:`os." -"linesep`، تبدیل می‌شود. اگر *newline* برابر ``''`` یا ``'\\n'`` باشد، هیچ " -"تبدیلی انجام نمی‌شود. اگر *newline* یکی از مقادیر مجاز دیگر را داشته باشد، هر " -"``'\\n'`` نوشته‌شده به همان رشتهٔ مشخص‌شده تبدیل خواهد شد." +"هنگام نوشتن خروجی در جریان، اگر *newline* برابر ``None`` باشد، هر نویسهٔ ``'\\n'`` " +"نوشته‌شده به جداکنندهٔ پیش‌فرض پایان خط سیستم، یعنی :data:`os.linesep`، تبدیل می‌شود. " +"اگر *newline* برابر ``''`` یا ``'\\n'`` باشد، هیچ تبدیلی انجام نمی‌شود. اگر " +"*newline* یکی از مقادیر مجاز دیگر را داشته باشد، هر ``'\\n'`` نوشته‌شده به همان رشتهٔ " +"مشخص‌شده تبدیل خواهد شد." msgid "" -"If *closefd* is ``False`` and a file descriptor rather than a filename was " -"given, the underlying file descriptor will be kept open when the file is " -"closed. If a filename is given *closefd* must be ``True`` (the default); " -"otherwise, an error will be raised." +"If *closefd* is ``False`` and a file descriptor rather than a filename was given, " +"the underlying file descriptor will be kept open when the file is closed. If a " +"filename is given *closefd* must be ``True`` (the default); otherwise, an error " +"will be raised." msgstr "" -"اگر *closefd* برابر ``False`` باشد و به‌جای نام پرونده یک توصیفگر پرونده " -"ارائه شده باشد، هنگام بسته شدن پرونده، توصیفگر پروندهٔ زیربنایی باز خواهد " -"ماند. اگر نام پرونده ارائه شود، *closefd* باید برابر ``True`` (مقدار پیش‌فرض) " -"باشد؛ در غیر این صورت، خطا ایجاد خواهد شد." +"اگر *closefd* برابر ``False`` باشد و به‌جای نام پرونده یک توصیفگر پرونده ارائه شده " +"باشد، هنگام بسته شدن پرونده، توصیفگر پروندهٔ زیربنایی باز خواهد ماند. اگر نام پرونده " +"ارائه شود، *closefd* باید برابر ``True`` (مقدار پیش‌فرض) باشد؛ در غیر این صورت، خطا " +"پرتاب خواهد شد." msgid "" -"A custom opener can be used by passing a callable as *opener*. The " -"underlying file descriptor for the file object is then obtained by calling " -"*opener* with (*file*, *flags*). *opener* must return an open file " -"descriptor (passing :mod:`os.open` as *opener* results in functionality " -"similar to passing ``None``)." +"A custom opener can be used by passing a callable as *opener*. The underlying file " +"descriptor for the file object is then obtained by calling *opener* with (*file*, " +"*flags*). *opener* must return an open file descriptor (passing :mod:`os.open` as " +"*opener* results in functionality similar to passing ``None``)." msgstr "" -"با ارسال یک شیء فراخوانی‌پذیر به‌عنوان *opener* می‌توان از یک بازکنندهٔ سفارشی " -"استفاده کرد. در این صورت، توصیفگر پروندهٔ زیربناییِ شیء پرونده با فراخوانی " -"*opener* و ارسال (*file*, *flags*) به آن به‌دست می‌آید. *opener* باید یک " -"توصیفگر پروندهٔ باز برگرداند (ارسال :mod:`os.open` به‌عنوان *opener* رفتاری " -"مشابه ارسال ``None`` خواهد داشت)." +"با ارسال یک شیء فراخوانی‌پذیر به‌عنوان *opener* می‌توان از یک بازکنندهٔ سفارشی استفاده " +"کرد. در این صورت، توصیفگر پروندهٔ زیربناییِ شیء پرونده با فراخوانی *opener* و ارسال " +"(*file*, *flags*) به آن به‌دست می‌آید. *opener* باید یک توصیفگر پروندهٔ باز برگرداند " +"(ارسال :mod:`os.open` به‌عنوان *opener* رفتاری مشابه ارسال ``None`` خواهد داشت)." msgid "The newly created file is :ref:`non-inheritable `." msgstr "پروندهٔ تازه ایجادشده :ref:`غیرقابل‌وراثت ` است." msgid "" -"The following example uses the :ref:`dir_fd ` parameter of the :func:" -"`os.open` function to open a file relative to a given directory::" +"The following example uses the :ref:`dir_fd ` parameter of " +"the :func:`os.open` function to open a file relative to a given directory::" msgstr "" -"مثال زیر از پارامتر :ref:`dir_fd ` تابع :func:`os.open` برای باز " -"کردن پرونده‌ای نسبت به یک دایرکتوری مشخص استفاده می‌کند::" +"مثال زیر از پارامتر :ref:`dir_fd ` تابع :func:`os.open` برای باز کردن " +"پرونده‌ای نسبت به یک پوشه مشخص استفاده می‌کند::" msgid "" ">>> import os\n" @@ -2562,52 +2448,51 @@ msgstr "" ">>> os.close(dir_fd) # don't leak a file descriptor" msgid "" -"The type of :term:`file object` returned by the :func:`open` function " -"depends on the mode. When :func:`open` is used to open a file in a text " -"mode (``'w'``, ``'r'``, ``'wt'``, ``'rt'``, etc.), it returns a subclass of :" -"class:`io.TextIOBase` (specifically :class:`io.TextIOWrapper`). When used " -"to open a file in a binary mode with buffering, the returned class is a " -"subclass of :class:`io.BufferedIOBase`. The exact class varies: in read " -"binary mode, it returns an :class:`io.BufferedReader`; in write binary and " -"append binary modes, it returns an :class:`io.BufferedWriter`, and in read/" -"write mode, it returns an :class:`io.BufferedRandom`. When buffering is " -"disabled, the raw stream, a subclass of :class:`io.RawIOBase`, :class:`io." -"FileIO`, is returned." -msgstr "" -"نوع :term:`شیء فایل ` بازگردانده‌شده توسط تابع :func:`open` به " -"حالت (mode) بستگی دارد. هنگامی که :func:`open` برای باز کردن پرونده در حالت " -"متنی (مانند ``'w'``، ``'r'``، ``'wt'``، ``'rt'`` و غیره) استفاده شود، " -"زیرکلاسی از :class:`io.TextIOBase` (به‌طور مشخص :class:`io.TextIOWrapper`) را " -"بازمی‌گرداند. هنگام باز کردن پرونده در حالت دودویی همراه با بافر، کلاس " -"بازگردانده‌شده زیرکلاسی از :class:`io.BufferedIOBase` خواهد بود. کلاس دقیق " -"بسته به حالت متفاوت است: در حالت خواندن دودویی، :class:`io.BufferedReader`؛ " -"در حالت‌های نوشتن دودویی و افزودن به انتهای پرونده، :class:`io." -"BufferedWriter`؛ و در حالت خواندن/نوشتن، :class:`io.BufferedRandom` " -"بازگردانده می‌شود. اگر بافر غیرفعال باشد، جریان خام (raw stream)، یعنی :class:" -"`io.FileIO` که زیرکلاسی از :class:`io.RawIOBase` است، بازگردانده می‌شود." +"The type of :term:`file object` returned by the :func:`open` function depends on " +"the mode. When :func:`open` is used to open a file in a text mode (``'w'``, " +"``'r'``, ``'wt'``, ``'rt'``, etc.), it returns a subclass of :class:`io.TextIOBase` " +"(specifically :class:`io.TextIOWrapper`). When used to open a file in a binary " +"mode with buffering, the returned class is a subclass " +"of :class:`io.BufferedIOBase`. The exact class varies: in read binary mode, it " +"returns an :class:`io.BufferedReader`; in write binary and append binary modes, it " +"returns an :class:`io.BufferedWriter`, and in read/write mode, it returns " +"an :class:`io.BufferedRandom`. When buffering is disabled, the raw stream, a " +"subclass of :class:`io.RawIOBase`, :class:`io.FileIO`, is returned." +msgstr "" +"نوع :term:`شیء فایل ` بازگردانده‌شده توسط تابع :func:`open` به حالت " +"(mode) بستگی دارد. هنگامی که :func:`open` برای باز کردن پرونده در حالت متنی (مانند " +"``'w'``، ``'r'``، ``'wt'``، ``'rt'`` و غیره) استفاده شود، زیرکلاسی " +"از :class:`io.TextIOBase` (به‌طور مشخص :class:`io.TextIOWrapper`) را بازمی‌گرداند. " +"هنگام باز کردن پرونده در حالت دودویی همراه با بافر، کلاس بازگردانده‌شده زیرکلاسی " +"از :class:`io.BufferedIOBase` خواهد بود. کلاس دقیق بسته به حالت متفاوت است: در حالت " +"خواندن دودویی، :class:`io.BufferedReader`؛ در حالت‌های نوشتن دودویی و افزودن به " +"انتهای پرونده، :class:`io.BufferedWriter`؛ و در حالت خواندن/" +"نوشتن، :class:`io.BufferedRandom` بازگردانده می‌شود. اگر بافر غیرفعال باشد، جریان " +"خام (raw stream)، یعنی :class:`io.FileIO` که زیرکلاسی از :class:`io.RawIOBase` است، " +"بازگردانده می‌شود." msgid "" "See also the file handling modules, such as :mod:`fileinput`, :mod:`io` " -"(where :func:`open` is declared), :mod:`os`, :mod:`os.path`, :mod:" -"`tempfile`, and :mod:`shutil`." +"(where :func:`open` is declared), :mod:`os`, :mod:`os.path`, :mod:`tempfile`, " +"and :mod:`shutil`." msgstr "" -"همچنین به ماژول‌های مربوط به کار با پرونده‌ها، مانند :mod:`fileinput`، :mod:" -"`io` (که :func:`open` در آن تعریف شده است)، :mod:`os`، :mod:`os.path`، :mod:" -"`tempfile` و :mod:`shutil` مراجعه کنید." +"همچنین به ماژول‌های مربوط به کار با پرونده‌ها، مانند :mod:`fileinput`، :mod:`io` " +"(که :func:`open` در آن تعریف شده است)، :mod:`os`، :mod:`os.path`، :mod:`tempfile` " +"و :mod:`shutil` مراجعه کنید." msgid "" "Raises an :ref:`auditing event ` ``open`` with arguments ``path``, " "``mode``, ``flags``." msgstr "" -"یک :ref:`رویداد ممیزی ` با نام ``open`` و آرگومان‌های ``path``، " -"``mode`` و ``flags`` ایجاد می‌کند." +"یک :ref:`رویداد ممیزی ` با نام ``open`` و آرگومان‌های ``path``، ``mode`` و " +"``flags`` پرتاب می‌کند." msgid "" -"The ``mode`` and ``flags`` arguments may have been modified or inferred from " -"the original call." +"The ``mode`` and ``flags`` arguments may have been modified or inferred from the " +"original call." msgstr "" -"آرگومان‌های ``mode`` و ``flags`` ممکن است بر اساس فراخوانی اولیه تغییر داده " -"شده یا مقدار آن‌ها استنباط شده باشند." +"آرگومان‌های ``mode`` و ``flags`` ممکن است بر اساس فراخوانی اولیه تغییر داده شده یا " +"مقدار آن‌ها استنباط شده باشند." msgid "The *opener* parameter was added." msgstr "پارامتر *opener* اضافه شده است." @@ -2617,42 +2502,41 @@ msgstr "حالت ``'x'`` اضافه شده است." msgid ":exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`." msgstr "" -"در گذشته استثنای :exc:`IOError` ایجاد می‌شد؛ اکنون این استثنا نام مستعاری " +"در گذشته استثنای :exc:`IOError` پرتاب می‌شد؛ اکنون این استثنا نام مستعاری " "برای :exc:`OSError` است." msgid "" -":exc:`FileExistsError` is now raised if the file opened in exclusive " -"creation mode (``'x'``) already exists." +":exc:`FileExistsError` is now raised if the file opened in exclusive creation mode " +"(``'x'``) already exists." msgstr "" -"اگر فایلی که در حالت ایجاد انحصاری (``'x'``) باز می‌شود از قبل وجود داشته " -"باشد، اکنون استثنای :exc:`FileExistsError` ایجاد می‌شود." +"اگر فایلی که در حالت ایجاد انحصاری (``'x'``) باز می‌شود از قبل وجود داشته باشد، " +"اکنون استثنای :exc:`FileExistsError` پرتاب می‌شود." msgid "The file is now non-inheritable." msgstr "اکنون این پرونده غیرقابل‌وراثت است." msgid "" "If the system call is interrupted and the signal handler does not raise an " -"exception, the function now retries the system call instead of raising an :" -"exc:`InterruptedError` exception (see :pep:`475` for the rationale)." +"exception, the function now retries the system call instead of raising " +"an :exc:`InterruptedError` exception (see :pep:`475` for the rationale)." msgstr "" -"اگر فراخوانی سیستمی متوقف شود و مدیریت‌کنندهٔ سیگنال استثنایی ایجاد نکند، " -"اکنون این تابع به‌جای ایجاد استثنای :exc:`InterruptedError`، فراخوانی سیستمی " -"را دوباره امتحان می‌کند (برای دلیل این تغییر، :pep:`475` را ببینید)." +"اگر فراخوانی سیستمی متوقف شود و مدیریت‌کنندهٔ سیگنال استثنایی پرتاب نکند، اکنون این " +"تابع به‌جای پرتاب استثنای :exc:`InterruptedError`، فراخوانی سیستمی را دوباره امتحان " +"می‌کند (برای دلیل این تغییر، :pep:`475` را ببینید)." msgid "The ``'namereplace'`` error handler was added." msgstr "مدیر خطای ``'namereplace'`` اضافه شده است." msgid "Support added to accept objects implementing :class:`os.PathLike`." msgstr "" -"پشتیبانی از پذیرش اشیایی که :class:`os.PathLike` را پیاده‌سازی می‌کنند، اضافه " -"شده است." +"پشتیبانی از پذیرش اشیایی که :class:`os.PathLike` را پیاده‌سازی می‌کنند، اضافه شده است." msgid "" -"On Windows, opening a console buffer may return a subclass of :class:`io." -"RawIOBase` other than :class:`io.FileIO`." +"On Windows, opening a console buffer may return a subclass of :class:`io.RawIOBase` " +"other than :class:`io.FileIO`." msgstr "" -"در ویندوز، باز کردن یک بافر کنسول ممکن است زیرکلاسی از :class:`io.RawIOBase` " -"غیر از :class:`io.FileIO` را برگرداند." +"در ویندوز، باز کردن یک بافر کنسول ممکن است زیرکلاسی از :class:`io.RawIOBase` غیر " +"از :class:`io.FileIO` را برگرداند." msgid "The ``'U'`` mode has been removed." msgstr "حالت ``'U'`` حذف شده است." @@ -2661,77 +2545,69 @@ msgid "Return the ordinal value of a character." msgstr "مقدار ترتیبی (ordinal) یک نویسه را برمی‌گرداند." msgid "" -"If the argument is a one-character string, return the Unicode code point of " -"that character. For example, ``ord('a')`` returns the integer ``97`` and " -"``ord('€')`` (Euro sign) returns ``8364``. This is the inverse of :func:" -"`chr`." +"If the argument is a one-character string, return the Unicode code point of that " +"character. For example, ``ord('a')`` returns the integer ``97`` and ``ord('€')`` " +"(Euro sign) returns ``8364``. This is the inverse of :func:`chr`." msgstr "" -"اگر آرگومان یک رشتهٔ تک‌نویسه‌ای باشد، نقطهٔ کد یونیکد آن نویسه برگردانده می‌شود. " -"برای مثال، ``ord('a')`` عدد صحیح ``97`` و ``ord('€')`` (نماد یورو) عدد " -"``8364`` را برمی‌گرداند. این تابع معکوس :func:`chr` است." +"اگر آرگومان یک رشتهٔ تک‌نویسه‌ای باشد، نقطهٔ کد یونیکد آن نویسه برگردانده می‌شود. برای " +"مثال، ``ord('a')`` عدد صحیح ``97`` و ``ord('€')`` (نماد یورو) عدد ``8364`` را " +"برمی‌گرداند. این تابع معکوس :func:`chr` است." msgid "" -"If the argument is a :class:`bytes` or :class:`bytearray` object of length " -"1, return its single byte value. For example, ``ord(b'a')`` returns the " -"integer ``97``." +"If the argument is a :class:`bytes` or :class:`bytearray` object of length 1, " +"return its single byte value. For example, ``ord(b'a')`` returns the integer ``97``." msgstr "" -"اگر آرگومان یک شیء :class:`bytes` یا :class:`bytearray` با طول ۱ باشد، مقدار " -"تنها بایت آن برگردانده می‌شود. برای مثال، ``ord(b'a')`` عدد صحیح ``97`` را " -"برمی‌گرداند." +"اگر آرگومان یک شیء :class:`bytes` یا :class:`bytearray` با طول ۱ باشد، مقدار تنها " +"بایت آن برگردانده می‌شود. برای مثال، ``ord(b'a')`` عدد صحیح ``97`` را برمی‌گرداند." msgid "" -"Return *base* to the power *exp*; if *mod* is present, return *base* to the " -"power *exp*, modulo *mod* (computed more efficiently than ``pow(base, exp) % " -"mod``). The two-argument form ``pow(base, exp)`` is equivalent to using the " -"power operator: ``base**exp``." +"Return *base* to the power *exp*; if *mod* is present, return *base* to the power " +"*exp*, modulo *mod* (computed more efficiently than ``pow(base, exp) % mod``). The " +"two-argument form ``pow(base, exp)`` is equivalent to using the power operator: " +"``base**exp``." msgstr "" -"*base* را به توان *exp* می‌رساند؛ اگر *mod* مشخص شده باشد، مقدار *base* به " -"توان *exp* را به پیمانهٔ *mod* برمی‌گرداند (که کارآمدتر از ``pow(base, exp) % " -"mod`` محاسبه می‌شود). شکل دوآرگومانی ``pow(base, exp)`` معادل استفاده از " -"عملگر توان، یعنی ``base**exp``، است." +"*base* را به توان *exp* می‌رساند؛ اگر *mod* مشخص شده باشد، مقدار *base* به توان " +"*exp* را به پیمانهٔ *mod* برمی‌گرداند (که کارآمدتر از ``pow(base, exp) % mod`` محاسبه " +"می‌شود). شکل دوآرگومانی ``pow(base, exp)`` معادل استفاده از عملگر توان، یعنی " +"``base**exp``، است." msgid "" -"When arguments are builtin numeric types with mixed operand types, the " -"coercion rules for binary arithmetic operators apply. For :class:`int` " -"operands, the result has the same type as the operands (after coercion) " -"unless the second argument is negative; in that case, all arguments are " -"converted to float and a float result is delivered. For example, ``pow(10, " -"2)`` returns ``100``, but ``pow(10, -2)`` returns ``0.01``. For a negative " -"base of type :class:`int` or :class:`float` and a non-integral exponent, a " -"complex result is delivered. For example, ``pow(-9, 0.5)`` returns a value " -"close to ``3j``. Whereas, for a negative base of type :class:`int` or :class:" -"`float` with an integral exponent, a float result is delivered. For example, " -"``pow(-9, 2.0)`` returns ``81.0``." +"When arguments are builtin numeric types with mixed operand types, the coercion " +"rules for binary arithmetic operators apply. For :class:`int` operands, the result " +"has the same type as the operands (after coercion) unless the second argument is " +"negative; in that case, all arguments are converted to float and a float result is " +"delivered. For example, ``pow(10, 2)`` returns ``100``, but ``pow(10, -2)`` " +"returns ``0.01``. For a negative base of type :class:`int` or :class:`float` and a " +"non-integral exponent, a complex result is delivered. For example, ``pow(-9, " +"0.5)`` returns a value close to ``3j``. Whereas, for a negative base of " +"type :class:`int` or :class:`float` with an integral exponent, a float result is " +"delivered. For example, ``pow(-9, 2.0)`` returns ``81.0``." msgstr "" "وقتی آرگومان‌ها از انواع عددی داخلی با انواع عملوند متفاوت باشند، قواعد تبدیل " -"(coercion) عملگرهای حسابی دودویی اعمال می‌شود. برای عملوندهای :class:`int`، " -"نتیجه پس از اعمال تبدیل، همان نوع عملوندها را خواهد داشت؛ مگر اینکه آرگومان " -"دوم منفی باشد که در این صورت همهٔ آرگومان‌ها به float تبدیل شده و نتیجه نیز از " -"نوع float خواهد بود. برای مثال، ``pow(10, 2)`` مقدار ``100`` را برمی‌گرداند، " -"اما ``pow(10, -2)`` مقدار ``0.01`` را بازمی‌گرداند. اگر پایهٔ منفی از نوع :" -"class:`int` یا :class:`float` باشد و توان عددی غیرصحیح باشد، نتیجه از نوع " -"مختلط خواهد بود. برای مثال، ``pow(-9, 0.5)`` مقداری نزدیک به ``3j`` را " -"برمی‌گرداند. در مقابل، اگر پایهٔ منفی از نوع :class:`int` یا :class:`float` " -"باشد و توان عددی صحیح باشد، نتیجه از نوع float خواهد بود. برای مثال، " -"``pow(-9, 2.0)`` مقدار ``81.0`` را برمی‌گرداند." - -msgid "" -"For :class:`int` operands *base* and *exp*, if *mod* is present, *mod* must " -"also be of integer type and *mod* must be nonzero. If *mod* is present and " -"*exp* is negative, *base* must be relatively prime to *mod*. In that case, " -"``pow(inv_base, -exp, mod)`` is returned, where *inv_base* is an inverse to " -"*base* modulo *mod*." -msgstr "" -"برای عملوندهای :class:`int` یعنی *base* و *exp*، اگر *mod* ارائه شود، باید " -"از نوع عدد صحیح باشد و مقدار آن نیز نباید صفر باشد. اگر *mod* ارائه شده باشد " -"و *exp* منفی باشد، *base* و *mod* باید نسبت به هم اول باشند. در این حالت، " -"``pow(inv_base, -exp, mod)`` برگردانده می‌شود که در آن *inv_base* وارونِ " -"*base* به پیمانهٔ *mod* است." +"(coercion) عملگرهای حسابی دودویی اعمال می‌شود. برای عملوندهای :class:`int`، نتیجه پس " +"از اعمال تبدیل، همان نوع عملوندها را خواهد داشت؛ مگر اینکه آرگومان دوم منفی باشد که " +"در این صورت همهٔ آرگومان‌ها به float تبدیل شده و نتیجه نیز از نوع float خواهد بود. " +"برای مثال، ``pow(10, 2)`` مقدار ``100`` را برمی‌گرداند، اما ``pow(10, -2)`` مقدار " +"``0.01`` را بازمی‌گرداند. اگر پایهٔ منفی از نوع :class:`int` یا :class:`float` باشد و " +"توان عددی غیرصحیح باشد، نتیجه از نوع مختلط خواهد بود. برای مثال، ``pow(-9, 0.5)`` " +"مقداری نزدیک به ``3j`` را برمی‌گرداند. در مقابل، اگر پایهٔ منفی از نوع :class:`int` " +"یا :class:`float` باشد و توان عددی صحیح باشد، نتیجه از نوع float خواهد بود. برای " +"مثال، ``pow(-9, 2.0)`` مقدار ``81.0`` را برمی‌گرداند." + +msgid "" +"For :class:`int` operands *base* and *exp*, if *mod* is present, *mod* must also be " +"of integer type and *mod* must be nonzero. If *mod* is present and *exp* is " +"negative, *base* must be relatively prime to *mod*. In that case, ``pow(inv_base, " +"-exp, mod)`` is returned, where *inv_base* is an inverse to *base* modulo *mod*." +msgstr "" +"برای عملوندهای :class:`int` یعنی *base* و *exp*، اگر *mod* ارائه شود، باید از نوع " +"عدد صحیح باشد و مقدار آن نیز نباید صفر باشد. اگر *mod* ارائه شده باشد و *exp* منفی " +"باشد، *base* و *mod* باید نسبت به هم اول باشند. در این حالت، ``pow(inv_base, -exp, " +"mod)`` برگردانده می‌شود که در آن *inv_base* وارونِ *base* به پیمانهٔ *mod* است." msgid "Here's an example of computing an inverse for ``38`` modulo ``97``::" msgstr "" -"در اینجا مثالی از محاسبهٔ وارون پیمانه‌ایِ ``38`` به پیمانهٔ ``97`` آورده شده " -"است::" +"در اینجا مثالی از محاسبهٔ وارون پیمانه‌ایِ ``38`` به پیمانهٔ ``97`` آورده شده است::" msgid "" ">>> pow(38, -1, mod=97)\n" @@ -2745,58 +2621,56 @@ msgstr "" "True" msgid "" -"For :class:`int` operands, the three-argument form of ``pow`` now allows the " -"second argument to be negative, permitting computation of modular inverses." +"For :class:`int` operands, the three-argument form of ``pow`` now allows the second " +"argument to be negative, permitting computation of modular inverses." msgstr "" -"برای عملوندهای :class:`int`، شکل سه‌آرگومانی ``pow`` اکنون اجازه می‌دهد " -"آرگومان دوم منفی باشد و در نتیجه امکان محاسبهٔ وارون پیمانه‌ای را فراهم می‌کند." +"برای عملوندهای :class:`int`، شکل سه‌آرگومانی ``pow`` اکنون اجازه می‌دهد آرگومان دوم " +"منفی باشد و در نتیجه امکان محاسبهٔ وارون پیمانه‌ای را فراهم می‌کند." -msgid "" -"Allow keyword arguments. Formerly, only positional arguments were supported." +msgid "Allow keyword arguments. Formerly, only positional arguments were supported." msgstr "" -"امکان استفاده از آرگومان‌های کلیدواژه‌ای اضافه شد. پیش از این، فقط آرگومان‌های " -"مکانی پشتیبانی می‌شدند." +"امکان استفاده از آرگومان‌های کلیدواژه‌ای اضافه شد. پیش از این، فقط آرگومان‌های مکانی " +"پشتیبانی می‌شدند." msgid "" -"Print *objects* to the text stream *file*, separated by *sep* and followed " -"by *end*. *sep*, *end*, *file*, and *flush*, if present, must be given as " -"keyword arguments." +"Print *objects* to the text stream *file*, separated by *sep* and followed by " +"*end*. *sep*, *end*, *file*, and *flush*, if present, must be given as keyword " +"arguments." msgstr "" -"*objects* را با جداکنندهٔ *sep* و در انتها با *end* در جریان متنی *file* چاپ " -"می‌کند. اگر *sep*، *end*، *file* یا *flush* مشخص شوند، باید به‌صورت آرگومان‌های " -"کلیدواژه‌ای ارائه شوند." +"*objects* را با جداکنندهٔ *sep* و در انتها با *end* در جریان متنی *file* چاپ می‌کند. " +"اگر *sep*، *end*، *file* یا *flush* مشخص شوند، باید به‌صورت آرگومان‌های کلیدواژه‌ای " +"ارائه شوند." msgid "" "All non-keyword arguments are converted to strings like :func:`str` does and " -"written to the stream, separated by *sep* and followed by *end*. Both *sep* " -"and *end* must be strings; they can also be ``None``, which means to use the " -"default values. If no *objects* are given, :func:`print` will just write " -"*end*." +"written to the stream, separated by *sep* and followed by *end*. Both *sep* and " +"*end* must be strings; they can also be ``None``, which means to use the default " +"values. If no *objects* are given, :func:`print` will just write *end*." msgstr "" -"همهٔ آرگومان‌های غیرکلیدواژه‌ای، همانند :func:`str`، به رشته تبدیل شده و با " -"جداکنندهٔ *sep* از یکدیگر جدا شده و سپس همراه با *end* در جریان (stream) " -"نوشته می‌شوند. هر دو مقدار *sep* و *end* باید رشته باشند؛ همچنین می‌توانند " -"``None`` باشند که در این صورت از مقادیر پیش‌فرض استفاده می‌شود. اگر هیچ " -"*objects*\\ ی ارائه نشود، :func:`print` فقط مقدار *end* را خواهد نوشت." +"همهٔ آرگومان‌های غیرکلیدواژه‌ای، همانند :func:`str`، به رشته تبدیل شده و با جداکنندهٔ " +"*sep* از یکدیگر جدا شده و سپس همراه با *end* در جریان (stream) نوشته می‌شوند. هر دو " +"مقدار *sep* و *end* باید رشته باشند؛ همچنین می‌توانند ``None`` باشند که در این صورت " +"از مقادیر پیش‌فرض استفاده می‌شود. اگر هیچ *objects*\\ ی ارائه نشود، :func:`print` فقط " +"مقدار *end* را خواهد نوشت." msgid "" -"The *file* argument must be an object with a ``write(string)`` method; if it " -"is not present or ``None``, :data:`sys.stdout` will be used. Since printed " -"arguments are converted to text strings, :func:`print` cannot be used with " -"binary mode file objects. For these, use ``file.write(...)`` instead." +"The *file* argument must be an object with a ``write(string)`` method; if it is not " +"present or ``None``, :data:`sys.stdout` will be used. Since printed arguments are " +"converted to text strings, :func:`print` cannot be used with binary mode file " +"objects. For these, use ``file.write(...)`` instead." msgstr "" -"آرگومان *file* باید شیئی باشد که متد ``write(string)`` را داشته باشد؛ اگر " -"این آرگومان ارائه نشود یا ``None`` باشد، از :data:`sys.stdout` استفاده خواهد " -"شد. از آنجا که آرگومان‌های چاپ‌شده به رشتهٔ متنی تبدیل می‌شوند، :func:`print` را " -"نمی‌توان با اشیای فایل در حالت دودویی استفاده کرد. برای چنین مواردی، به‌جای آن " -"از ``file.write(...)`` استفاده کنید." +"آرگومان *file* باید شیئی باشد که متد ``write(string)`` را داشته باشد؛ اگر این " +"آرگومان ارائه نشود یا ``None`` باشد، از :data:`sys.stdout` استفاده خواهد شد. از " +"آنجا که آرگومان‌های چاپ‌شده به رشتهٔ متنی تبدیل می‌شوند، :func:`print` را نمی‌توان با " +"اشیای فایل در حالت دودویی استفاده کرد. برای چنین مواردی، به‌جای آن از " +"``file.write(...)`` استفاده کنید." msgid "" -"Output buffering is usually determined by *file*. However, if *flush* is " -"true, the stream is forcibly flushed." +"Output buffering is usually determined by *file*. However, if *flush* is true, the " +"stream is forcibly flushed." msgstr "" -"بافرگذاری خروجی معمولاً توسط *file* تعیین می‌شود. با این حال، اگر *flush* " -"برابر True باشد، جریان داده به‌اجبار تخلیه می‌شود." +"بافرگذاری خروجی معمولاً توسط *file* تعیین می‌شود. با این حال، اگر *flush* برابر True " +"باشد، جریان داده به‌اجبار تخلیه می‌شود." msgid "Added the *flush* keyword argument." msgstr "آرگومان کلیدواژه‌ای *flush* اضافه شد." @@ -2805,13 +2679,13 @@ msgid "Return a property attribute." msgstr "یک ویژگی از نوع property را برمی‌گرداند." msgid "" -"*fget* is a function for getting an attribute value. *fset* is a function " -"for setting an attribute value. *fdel* is a function for deleting an " -"attribute value. And *doc* creates a docstring for the attribute." +"*fget* is a function for getting an attribute value. *fset* is a function for " +"setting an attribute value. *fdel* is a function for deleting an attribute value. " +"And *doc* creates a docstring for the attribute." msgstr "" -"*fget* تابعی برای دریافت مقدار یک ویژگی است. *fset* تابعی برای تنظیم مقدار " -"یک ویژگی است. *fdel* تابعی برای حذف مقدار یک ویژگی است. همچنین *doc* یک رشتهٔ " -"مستندات برای آن ویژگی ایجاد می‌کند." +"*fget* تابعی برای دریافت مقدار یک ویژگی است. *fset* تابعی برای تنظیم مقدار یک ویژگی " +"است. *fdel* تابعی برای حذف مقدار یک ویژگی است. همچنین *doc* یک رشتهٔ مستندات برای آن " +"ویژگی ایجاد می‌کند." msgid "A typical use is to define a managed attribute ``x``::" msgstr "یک کاربرد رایج، تعریف ویژگی مدیریت‌شدهٔ ``x`` به‌صورت زیر است::" @@ -2848,23 +2722,21 @@ msgstr "" " x = property(getx, setx, delx, \"I'm the 'x' property.\")" msgid "" -"If *c* is an instance of *C*, ``c.x`` will invoke the getter, ``c.x = " -"value`` will invoke the setter, and ``del c.x`` the deleter." +"If *c* is an instance of *C*, ``c.x`` will invoke the getter, ``c.x = value`` will " +"invoke the setter, and ``del c.x`` the deleter." msgstr "" -"اگر *c* نمونه‌ای از *C* باشد، عبارت ``c.x`` فراخوانی‌کنندهٔ getter، عبارت ``c.x " -"= value`` فراخوانی‌کنندهٔ setter، و عبارت ``del c.x`` فراخوانی‌کنندهٔ deleter " -"خواهد بود." +"اگر *c* نمونه‌ای از *C* باشد، عبارت ``c.x`` فراخوانی‌کنندهٔ getter، عبارت ``c.x = " +"value`` فراخوانی‌کنندهٔ setter، و عبارت ``del c.x`` فراخوانی‌کنندهٔ deleter خواهد بود." msgid "" -"If given, *doc* will be the docstring of the property attribute. Otherwise, " -"the property will copy *fget*'s docstring (if it exists). This makes it " -"possible to create read-only properties easily using :func:`property` as a :" -"term:`decorator`::" +"If given, *doc* will be the docstring of the property attribute. Otherwise, the " +"property will copy *fget*'s docstring (if it exists). This makes it possible to " +"create read-only properties easily using :func:`property` as a :term:`decorator`::" msgstr "" -"اگر *doc* مشخص شده باشد، به‌عنوان docstring ویژگی property استفاده خواهد شد. " -"در غیر این صورت، property، docstring مربوط به *fget* را (در صورت وجود) کپی " -"می‌کند. این امکان را فراهم می‌کند که با استفاده از :func:`property` به‌عنوان " -"یک :term:`دکوراتور `، به‌سادگی ویژگی‌های فقط‌خواندنی ایجاد شوند::" +"اگر *doc* مشخص شده باشد، به‌عنوان docstring ویژگی property استفاده خواهد شد. در غیر " +"این صورت، property، docstring مربوط به *fget* را (در صورت وجود) کپی می‌کند. این " +"امکان را فراهم می‌کند که با استفاده از :func:`property` به‌عنوان یک :term:`دکوراتور " +"`، به‌سادگی ویژگی‌های فقط‌خواندنی ایجاد شوند::" msgid "" "class Parrot:\n" @@ -2886,24 +2758,23 @@ msgstr "" " return self._voltage" msgid "" -"The ``@property`` decorator turns the :meth:`!voltage` method into a " -"\"getter\" for a read-only attribute with the same name, and it sets the " -"docstring for *voltage* to \"Get the current voltage.\"" +"The ``@property`` decorator turns the :meth:`!voltage` method into a \"getter\" for " +"a read-only attribute with the same name, and it sets the docstring for *voltage* " +"to \"Get the current voltage.\"" msgstr "" "تزئین‌کنندهٔ ``@property`` متد :meth:`!voltage` را به یک «getter» برای ویژگی " -"فقط‌خواندنی‌ای با همان نام تبدیل می‌کند و docstring ویژگی *voltage* را روی «Get " -"the current voltage.» تنظیم می‌کند." +"فقط‌خواندنی‌ای با همان نام تبدیل می‌کند و docstring ویژگی *voltage* را روی «Get the " +"current voltage.» تنظیم می‌کند." msgid "" -"A property object has ``getter``, ``setter``, and ``deleter`` methods usable " -"as decorators that create a copy of the property with the corresponding " -"accessor function set to the decorated function. This is best explained " -"with an example:" +"A property object has ``getter``, ``setter``, and ``deleter`` methods usable as " +"decorators that create a copy of the property with the corresponding accessor " +"function set to the decorated function. This is best explained with an example:" msgstr "" -"یک شیء property دارای متدهای ``getter``، ``setter`` و ``deleter`` است که " -"می‌توان از آن‌ها به‌عنوان دکوراتور استفاده کرد. این متدها نسخه‌ای از property را " -"ایجاد می‌کنند که تابع دسترسی متناظر آن با تابع دکوراتورشده جایگزین شده است. " -"این موضوع با یک مثال بهتر توضیح داده می‌شود:" +"یک شیء property دارای متدهای ``getter``، ``setter`` و ``deleter`` است که می‌توان از " +"آن‌ها به‌عنوان دکوراتور استفاده کرد. این متدها نسخه‌ای از property را ایجاد می‌کنند که " +"تابع دسترسی متناظر آن با تابع دکوراتورشده جایگزین شده است. این موضوع با یک مثال " +"بهتر توضیح داده می‌شود:" msgid "" "class C:\n" @@ -2942,55 +2813,52 @@ msgstr "" msgid "" "This code is exactly equivalent to the first example. Be sure to give the " -"additional functions the same name as the original property (``x`` in this " -"case.)" +"additional functions the same name as the original property (``x`` in this case.)" msgstr "" -"این کد دقیقاً معادل مثال اول است. دقت کنید که توابع اضافی نیز همان نام " -"property اصلی (در این مثال ``x``) را داشته باشند." +"این کد دقیقاً معادل مثال اول است. دقت کنید که توابع اضافی نیز همان نام property اصلی " +"(در این مثال ``x``) را داشته باشند." msgid "" "The returned property object also has the attributes ``fget``, ``fset``, and " "``fdel`` corresponding to the constructor arguments." msgstr "" -"شیء property بازگردانده‌شده همچنین دارای ویژگی‌های ``fget``، ``fset`` و " -"``fdel`` متناظر با آرگومان‌های سازنده است." +"شیء property بازگردانده‌شده همچنین دارای ویژگی‌های ``fget``، ``fset`` و ``fdel`` " +"متناظر با آرگومان‌های سازنده است." msgid "The docstrings of property objects are now writeable." msgstr "اکنون docstring اشیای property قابل‌ویرایش است." msgid "" -"Attribute holding the name of the property. The name of the property can be " -"changed at runtime." +"Attribute holding the name of the property. The name of the property can be changed " +"at runtime." msgstr "" -"ویژگی‌ای که نام property را نگه می‌دارد. نام property را می‌توان در زمان اجرا " -"تغییر داد." +"ویژگی‌ای که نام property را نگه می‌دارد. نام property را می‌توان در زمان اجرا تغییر " +"داد." msgid "" -"Rather than being a function, :class:`range` is actually an immutable " -"sequence type, as documented in :ref:`typesseq-range` and :ref:`typesseq`." +"Rather than being a function, :class:`range` is actually an immutable sequence " +"type, as documented in :ref:`typesseq-range` and :ref:`typesseq`." msgstr "" -":class:`range` در واقع یک نوع دنبالهٔ تغییرناپذیر است، نه یک تابع؛ همان‌گونه " -"که در :ref:`typesseq-range` و :ref:`typesseq` مستند شده است." +":class:`range` در واقع یک نوع دنبالهٔ تغییرناپذیر است، نه یک تابع؛ همان‌گونه که " +"در :ref:`typesseq-range` و :ref:`typesseq` مستند شده است." msgid "" -"Return a string containing a printable representation of an object. For " -"many types, this function makes an attempt to return a string that would " -"yield an object with the same value when passed to :func:`eval`; otherwise, " -"the representation is a string enclosed in angle brackets that contains the " -"name of the type of the object together with additional information often " -"including the name and address of the object. A class can control what this " -"function returns for its instances by defining a :meth:`~object.__repr__` " -"method. If :func:`sys.displayhook` is not accessible, this function will " -"raise :exc:`RuntimeError`." +"Return a string containing a printable representation of an object. For many " +"types, this function makes an attempt to return a string that would yield an object " +"with the same value when passed to :func:`eval`; otherwise, the representation is a " +"string enclosed in angle brackets that contains the name of the type of the object " +"together with additional information often including the name and address of the " +"object. A class can control what this function returns for its instances by " +"defining a :meth:`~object.__repr__` method. If :func:`sys.displayhook` is not " +"accessible, this function will raise :exc:`RuntimeError`." msgstr "" -"رشته‌ای را برمی‌گرداند که نمایش قابل چاپی از یک شیء را در بر دارد. برای بسیاری " -"از نوع‌ها، این تابع تلاش می‌کند رشته‌ای برگرداند که اگر به :func:`eval` داده " -"شود، شیئی با همان مقدار تولید کند؛ در غیر این صورت، نمایش به‌صورت رشته‌ای درون " -"کروشه‌های زاویه‌دار خواهد بود که نام نوع شیء و اطلاعات اضافی، که معمولاً شامل " -"نام و نشانی شیء است، در آن قرار دارد. یک کلاس می‌تواند با تعریف متد :meth:" -"`~object.__repr__` مشخص کند که این تابع برای نمونه‌های آن چه مقداری برگرداند. " -"اگر :func:`sys.displayhook` در دسترس نباشد، این تابع استثنای :exc:" -"`RuntimeError` ایجاد می‌کند." +"رشته‌ای را برمی‌گرداند که نمایش قابل چاپی از یک شیء را در بر دارد. برای بسیاری از " +"نوع‌ها، این تابع تلاش می‌کند رشته‌ای برگرداند که اگر به :func:`eval` داده شود، شیئی با " +"همان مقدار تولید کند؛ در غیر این صورت، نمایش به‌صورت رشته‌ای درون کروشه‌های زاویه‌دار " +"خواهد بود که نام نوع شیء و اطلاعات اضافی، که معمولاً شامل نام و نشانی شیء است، در آن " +"قرار دارد. یک کلاس می‌تواند با تعریف متد :meth:`~object.__repr__` مشخص کند که این " +"تابع برای نمونه‌های آن چه مقداری برگرداند. اگر :func:`sys.displayhook` در دسترس " +"نباشد، این تابع استثنای :exc:`RuntimeError` پرتاب می‌کند." msgid "This class has a custom representation that can be evaluated::" msgstr "این کلاس یک نمایش (representation) سفارشی دارد که قابل ارزیابی است::" @@ -3015,225 +2883,218 @@ msgstr "" msgid "" "Return a reverse :term:`iterator`. The argument must be an object which has " "a :meth:`~object.__reversed__` method or supports the sequence protocol " -"(the :meth:`~object.__len__` method and the :meth:`~object.__getitem__` " -"method with integer arguments starting at ``0``)." +"(the :meth:`~object.__len__` method and the :meth:`~object.__getitem__` method with " +"integer arguments starting at ``0``)." msgstr "" "یک :term:`تکرارگر ` معکوس را برمی‌گرداند. آرگومان باید شیئی باشد که " -"متد :meth:`~object.__reversed__` را داشته باشد یا از پروتکل دنباله (متد :" -"meth:`~object.__len__` و متد :meth:`~object.__getitem__` با آرگومان‌های صحیح " +"متد :meth:`~object.__reversed__` را داشته باشد یا از پروتکل دنباله " +"(متد :meth:`~object.__len__` و متد :meth:`~object.__getitem__` با آرگومان‌های صحیح " "که از ``0`` شروع می‌شوند) پشتیبانی کند." msgid "" "Return *number* rounded to *ndigits* precision after the decimal point. If " -"*ndigits* is omitted or is ``None``, it returns the nearest integer to its " -"input." +"*ndigits* is omitted or is ``None``, it returns the nearest integer to its input." msgstr "" -"*number* را با دقت *ndigits* رقم پس از ممیز گرد می‌کند. اگر *ndigits* حذف شده " -"باشد یا برابر ``None`` باشد، نزدیک‌ترین عدد صحیح به ورودی را برمی‌گرداند." +"*number* را با دقت *ndigits* رقم پس از ممیز گرد می‌کند. اگر *ndigits* حذف شده باشد " +"یا برابر ``None`` باشد، نزدیک‌ترین عدد صحیح به ورودی را برمی‌گرداند." msgid "" -"For the built-in types supporting :func:`round`, values are rounded to the " -"closest multiple of 10 to the power minus *ndigits*; if two multiples are " -"equally close, rounding is done toward the even choice (so, for example, " -"both ``round(0.5)`` and ``round(-0.5)`` are ``0``, and ``round(1.5)`` is " -"``2``). Any integer value is valid for *ndigits* (positive, zero, or " -"negative). The return value is an integer if *ndigits* is omitted or " -"``None``. Otherwise, the return value has the same type as *number*." +"For the built-in types supporting :func:`round`, values are rounded to the closest " +"multiple of 10 to the power minus *ndigits*; if two multiples are equally close, " +"rounding is done toward the even choice (so, for example, both ``round(0.5)`` and " +"``round(-0.5)`` are ``0``, and ``round(1.5)`` is ``2``). Any integer value is " +"valid for *ndigits* (positive, zero, or negative). The return value is an integer " +"if *ndigits* is omitted or ``None``. Otherwise, the return value has the same type " +"as *number*." msgstr "" -"برای انواع داخلی‌ای که از :func:`round` پشتیبانی می‌کنند، مقادیر به نزدیک‌ترین " -"مضرب 10 به توان منفی *ndigits* گرد می‌شوند. اگر دو مضرب به یک اندازه نزدیک " -"باشند، گرد کردن به سمت مقدار زوج انجام می‌شود (برای مثال، هر دو عبارت " -"``round(0.5)`` و ``round(-0.5)`` برابر ``0`` هستند و ``round(1.5)`` برابر " -"``2`` است). هر مقدار صحیحی (مثبت، صفر یا منفی) برای *ndigits* معتبر است. اگر " -"*ndigits* حذف شود یا ``None`` باشد، مقدار بازگشتی یک عدد صحیح خواهد بود. در " -"غیر این صورت، مقدار بازگشتی همان نوع *number* را خواهد داشت." +"برای انواع داخلی‌ای که از :func:`round` پشتیبانی می‌کنند، مقادیر به نزدیک‌ترین مضرب 10 " +"به توان منفی *ndigits* گرد می‌شوند. اگر دو مضرب به یک اندازه نزدیک باشند، گرد کردن " +"به سمت مقدار زوج انجام می‌شود (برای مثال، هر دو عبارت ``round(0.5)`` و " +"``round(-0.5)`` برابر ``0`` هستند و ``round(1.5)`` برابر ``2`` است). هر مقدار صحیحی " +"(مثبت، صفر یا منفی) برای *ndigits* معتبر است. اگر *ndigits* حذف شود یا ``None`` " +"باشد، مقدار بازگشتی یک عدد صحیح خواهد بود. در غیر این صورت، مقدار بازگشتی همان نوع " +"*number* را خواهد داشت." msgid "" -"For a general Python object ``number``, ``round`` delegates to ``number." -"__round__``." +"For a general Python object ``number``, ``round`` delegates to ``number.__round__``." msgstr "" "برای یک شیء عمومی پایتون به نام ``number``، تابع ``round`` فراخوانی را به " "``number.__round__`` واگذار می‌کند." msgid "" "The behavior of :func:`round` for floats can be surprising: for example, " -"``round(2.675, 2)`` gives ``2.67`` instead of the expected ``2.68``. This is " -"not a bug: it's a result of the fact that most decimal fractions can't be " -"represented exactly as a float. See :ref:`tut-fp-issues` for more " -"information." +"``round(2.675, 2)`` gives ``2.67`` instead of the expected ``2.68``. This is not a " +"bug: it's a result of the fact that most decimal fractions can't be represented " +"exactly as a float. See :ref:`tut-fp-issues` for more information." msgstr "" -"رفتار :func:`round` برای اعداد ممیز شناور ممکن است غافلگیرکننده باشد؛ برای " -"مثال، ``round(2.675, 2)`` به‌جای ``2.68`` مقدار ``2.67`` را برمی‌گرداند. این " -"یک باگ نیست؛ بلکه نتیجهٔ این واقعیت است که بیشتر کسرهای ده‌دهی را نمی‌توان " -"به‌طور دقیق به‌صورت عدد ممیز شناور نمایش داد. برای اطلاعات بیشتر به :ref:`tut-" -"fp-issues` مراجعه کنید." +"رفتار :func:`round` برای اعداد ممیز شناور ممکن است غافلگیرکننده باشد؛ برای مثال، " +"``round(2.675, 2)`` به‌جای ``2.68`` مقدار ``2.67`` را برمی‌گرداند. این یک باگ نیست؛ " +"بلکه نتیجهٔ این واقعیت است که بیشتر کسرهای ده‌دهی را نمی‌توان به‌طور دقیق به‌صورت عدد " +"ممیز شناور نمایش داد. برای اطلاعات بیشتر به :ref:`tut-fp-issues` مراجعه کنید." msgid "" -"Return a new :class:`set` object, optionally with elements taken from " -"*iterable*. ``set`` is a built-in class. See :class:`set` and :ref:`types-" -"set` for documentation about this class." +"Return a new :class:`set` object, optionally with elements taken from *iterable*. " +"``set`` is a built-in class. See :class:`set` and :ref:`types-set` for " +"documentation about this class." msgstr "" "یک شیء جدید از نوع :class:`set` را برمی‌گرداند که در صورت ارائه، عناصر آن از " "*iterable* گرفته می‌شوند. ``set`` یک کلاس داخلی است. برای مستندات این کلاس، " "به :class:`set` و :ref:`types-set` مراجعه کنید." msgid "" -"For other containers see the built-in :class:`frozenset`, :class:`list`, :" -"class:`tuple`, and :class:`dict` classes, as well as the :mod:`collections` " -"module." +"For other containers see the built-" +"in :class:`frozenset`, :class:`list`, :class:`tuple`, and :class:`dict` classes, as " +"well as the :mod:`collections` module." msgstr "" -"برای سایر انواع محفظه‌ها، به کلاس‌های داخلی :class:`frozenset`، :class:" -"`list`، :class:`tuple` و :class:`dict`، و همچنین ماژول :mod:`collections` " -"مراجعه کنید." +"برای سایر انواع محفظه‌ها، به کلاس‌های " +"داخلی :class:`frozenset`، :class:`list`، :class:`tuple` و :class:`dict`، و همچنین " +"ماژول :mod:`collections` مراجعه کنید." msgid "" -"This is the counterpart of :func:`getattr`. The arguments are an object, a " -"string, and an arbitrary value. The string may name an existing attribute " -"or a new attribute. The function assigns the value to the attribute, " -"provided the object allows it. For example, ``setattr(x, 'foobar', 123)`` " -"is equivalent to ``x.foobar = 123``." +"This is the counterpart of :func:`getattr`. The arguments are an object, a string, " +"and an arbitrary value. The string may name an existing attribute or a new " +"attribute. The function assigns the value to the attribute, provided the object " +"allows it. For example, ``setattr(x, 'foobar', 123)`` is equivalent to ``x.foobar " +"= 123``." msgstr "" -"این تابع همتای :func:`getattr` است. آرگومان‌های آن یک شیء، یک رشته و یک مقدار " -"دلخواه هستند. رشته می‌تواند نام یک ویژگی موجود یا یک ویژگی جدید باشد. در صورت " -"مجاز بودن، تابع مقدار را به آن ویژگی اختصاص می‌دهد. برای مثال، ``setattr(x, " -"'foobar', 123)`` معادل ``x.foobar = 123`` است." +"این تابع همتای :func:`getattr` است. آرگومان‌های آن یک شیء، یک رشته و یک مقدار دلخواه " +"هستند. رشته می‌تواند نام یک ویژگی موجود یا یک ویژگی جدید باشد. در صورت مجاز بودن، " +"تابع مقدار را به آن ویژگی اختصاص می‌دهد. برای مثال، ``setattr(x, 'foobar', 123)`` " +"معادل ``x.foobar = 123`` است." msgid "" -"*name* need not be a Python identifier as defined in :ref:`identifiers` " -"unless the object chooses to enforce that, for example in a custom :meth:" -"`~object.__getattribute__` or via :attr:`~object.__slots__`. An attribute " -"whose name is not an identifier will not be accessible using the dot " +"*name* need not be a Python identifier as defined in :ref:`identifiers` unless the " +"object chooses to enforce that, for example in a " +"custom :meth:`~object.__getattribute__` or via :attr:`~object.__slots__`. An " +"attribute whose name is not an identifier will not be accessible using the dot " "notation, but is accessible through :func:`getattr` etc.." msgstr "" -"*name* لازم نیست یک شناسهٔ پایتون، مطابق تعریف :ref:`identifiers`، باشد؛ مگر " -"اینکه خود شیء این موضوع را اعمال کند، برای مثال در یک :meth:`~object." -"__getattribute__` سفارشی یا از طریق :attr:`~object.__slots__`. ویژگی‌ای که " -"نام آن یک شناسه نباشد، با استفاده از نماد نقطه قابل دسترسی نیست، اما از " -"طریق :func:`getattr` و توابع مشابه قابل دسترسی خواهد بود." +"*name* لازم نیست یک شناسهٔ پایتون، مطابق تعریف :ref:`identifiers`، باشد؛ مگر اینکه " +"خود شیء این موضوع را اعمال کند، برای مثال در یک :meth:`~object.__getattribute__` " +"سفارشی یا از طریق :attr:`~object.__slots__`. ویژگی‌ای که نام آن یک شناسه نباشد، با " +"استفاده از نماد نقطه قابل دسترسی نیست، اما از طریق :func:`getattr` و توابع مشابه " +"قابل دسترسی خواهد بود." msgid "" -"Since :ref:`private name mangling ` happens at " -"compilation time, one must manually mangle a private attribute's (attributes " -"with two leading underscores) name in order to set it with :func:`setattr`." +"Since :ref:`private name mangling ` happens at compilation " +"time, one must manually mangle a private attribute's (attributes with two leading " +"underscores) name in order to set it with :func:`setattr`." msgstr "" -"از آنجا که :ref:`تغییر نام خصوصی ` در زمان کامپایل " -"انجام می‌شود، برای تنظیم مقدار یک ویژگی خصوصی (ویژگی‌هایی که با دو زیرخط آغاز " -"می‌شوند) با استفاده از :func:`setattr`، باید نام آن را به‌صورت دستی تغییر دهید." +"از آنجا که :ref:`تغییر نام خصوصی ` در زمان کامپایل انجام " +"می‌شود، برای تنظیم مقدار یک ویژگی خصوصی (ویژگی‌هایی که با دو زیرخط آغاز می‌شوند) با " +"استفاده از :func:`setattr`، باید نام آن را به‌صورت دستی تغییر دهید." msgid "" "Return a :term:`slice` object representing the set of indices specified by " -"``range(start, stop, step)``. The *start* and *step* arguments default to " -"``None``." +"``range(start, stop, step)``. The *start* and *step* arguments default to ``None``." msgstr "" -"یک شیء :term:`slice` را برمی‌گرداند که مجموعهٔ اندیس‌های مشخص‌شده توسط " -"``range(start, stop, step)`` را نمایش می‌دهد. آرگومان‌های *start* و *step* " -"به‌طور پیش‌فرض برابر ``None`` هستند." +"یک شیء :term:`slice` را برمی‌گرداند که مجموعهٔ اندیس‌های مشخص‌شده توسط ``range(start, " +"stop, step)`` را نمایش می‌دهد. آرگومان‌های *start* و *step* به‌طور پیش‌فرض برابر " +"``None`` هستند." msgid "" -"Slice objects are also generated when :ref:`slicing syntax ` is " -"used. For example: ``a[start:stop:step]`` or ``a[start:stop, i]``." +"Slice objects are also generated when :ref:`slicing syntax ` is used. " +"For example: ``a[start:stop:step]`` or ``a[start:stop, i]``." msgstr "" -"اشیای slice هنگام استفاده از :ref:`نحو برش ` نیز ایجاد می‌شوند. " -"برای مثال: ``a[start:stop:step]`` یا ``a[start:stop, i]``." +"اشیای slice هنگام استفاده از :ref:`نحو برش ` نیز ایجاد می‌شوند. برای مثال: " +"``a[start:stop:step]`` یا ``a[start:stop, i]``." msgid "" -"See :func:`itertools.islice` for an alternate version that returns an :term:" -"`iterator`." +"See :func:`itertools.islice` for an alternate version that returns " +"an :term:`iterator`." msgstr "" -"برای نسخهٔ جایگزینی که یک :term:`تکرارگر ` برمی‌گرداند، به :func:" -"`itertools.islice` مراجعه کنید." +"برای نسخهٔ جایگزینی که یک :term:`تکرارگر ` برمی‌گرداند، " +"به :func:`itertools.islice` مراجعه کنید." msgid "" -"These read-only attributes are set to the argument values (or their " -"default). They have no other explicit functionality; however, they are used " -"by NumPy and other third-party packages." +"These read-only attributes are set to the argument values (or their default). They " +"have no other explicit functionality; however, they are used by NumPy and other " +"third-party packages." msgstr "" -"این ویژگی‌های فقط‌خواندنی بر اساس مقادیر آرگومان‌ها (یا مقادیر پیش‌فرض آن‌ها) " -"تنظیم می‌شوند. خود آن‌ها قابلیت صریح دیگری ندارند؛ بااین‌حال، توسط NumPy و سایر " -"بسته‌های شخص ثالث استفاده می‌شوند." +"این ویژگی‌های فقط‌خواندنی بر اساس مقادیر آرگومان‌ها (یا مقادیر پیش‌فرض آن‌ها) تنظیم " +"می‌شوند. خود آن‌ها قابلیت صریح دیگری ندارند؛ بااین‌حال، توسط NumPy و سایر بسته‌های شخص " +"ثالث استفاده می‌شوند." msgid "" -"Slice objects are now :term:`hashable` (provided :attr:`~slice.start`, :attr:" -"`~slice.stop`, and :attr:`~slice.step` are hashable)." +"Slice objects are now :term:`hashable` " +"(provided :attr:`~slice.start`, :attr:`~slice.stop`, and :attr:`~slice.step` are " +"hashable)." msgstr "" -"اشیای slice اکنون :term:`هش‌پذیر ` هستند (به شرطی که :attr:`~slice." -"start`، :attr:`~slice.stop` و :attr:`~slice.step` نیز هش‌پذیر باشند)." +"اشیای slice اکنون :term:`هش‌پذیر ` هستند (به شرطی " +"که :attr:`~slice.start`، :attr:`~slice.stop` و :attr:`~slice.step` نیز هش‌پذیر " +"باشند)." msgid "Return a new sorted list from the items in *iterable*." msgstr "یک فهرست مرتب‌شدهٔ جدید از عناصر *iterable* را برمی‌گرداند." -msgid "" -"Has two optional arguments which must be specified as keyword arguments." -msgstr "" -"دارای دو آرگومان اختیاری است که باید به‌صورت آرگومان‌های کلیدواژه‌ای مشخص شوند." +msgid "Has two optional arguments which must be specified as keyword arguments." +msgstr "دارای دو آرگومان اختیاری است که باید به‌صورت آرگومان‌های کلیدواژه‌ای مشخص شوند." msgid "" -"*key* specifies a function of one argument that is used to extract a " -"comparison key from each element in *iterable* (for example, ``key=str." -"lower``). The default value is ``None`` (compare the elements directly)." +"*key* specifies a function of one argument that is used to extract a comparison key " +"from each element in *iterable* (for example, ``key=str.lower``). The default " +"value is ``None`` (compare the elements directly)." msgstr "" -"*key* تابعی با یک آرگومان را مشخص می‌کند که برای استخراج یک کلید مقایسه از هر " -"عنصر در *iterable* استفاده می‌شود (برای مثال، ``key=str.lower``). مقدار " -"پیش‌فرض آن ``None`` است (در این حالت، عناصر مستقیماً با یکدیگر مقایسه می‌شوند)." +"*key* تابعی با یک آرگومان را مشخص می‌کند که برای استخراج یک کلید مقایسه از هر عنصر " +"در *iterable* استفاده می‌شود (برای مثال، ``key=str.lower``). مقدار پیش‌فرض آن " +"``None`` است (در این حالت، عناصر مستقیماً با یکدیگر مقایسه می‌شوند)." msgid "" -"*reverse* is a boolean value. If set to ``True``, then the list elements " -"are sorted as if each comparison were reversed." +"*reverse* is a boolean value. If set to ``True``, then the list elements are " +"sorted as if each comparison were reversed." msgstr "" -"*reverse* یک مقدار بولی است. اگر برابر ``True`` باشد، عناصر فهرست به گونه‌ای " -"مرتب می‌شوند که گویی نتیجهٔ هر مقایسه معکوس شده است." +"*reverse* یک مقدار بولی است. اگر برابر ``True`` باشد، عناصر فهرست به گونه‌ای مرتب " +"می‌شوند که گویی نتیجهٔ هر مقایسه معکوس شده است." msgid "" -"Use :func:`functools.cmp_to_key` to convert an old-style *cmp* function to a " -"*key* function." +"Use :func:`functools.cmp_to_key` to convert an old-style *cmp* function to a *key* " +"function." msgstr "" -"برای تبدیل یک تابع *cmp* به سبک قدیمی به یک تابع *key*، از :func:`functools." -"cmp_to_key` استفاده کنید." +"برای تبدیل یک تابع *cmp* به سبک قدیمی به یک تابع *key*، " +"از :func:`functools.cmp_to_key` استفاده کنید." msgid "" -"The built-in :func:`sorted` function is guaranteed to be stable. A sort is " -"stable if it guarantees not to change the relative order of elements that " -"compare equal --- this is helpful for sorting in multiple passes (for " -"example, sort by department, then by salary grade)." +"The built-in :func:`sorted` function is guaranteed to be stable. A sort is stable " +"if it guarantees not to change the relative order of elements that compare equal " +"--- this is helpful for sorting in multiple passes (for example, sort by " +"department, then by salary grade)." msgstr "" -"تابع داخلی :func:`sorted` تضمین می‌کند که مرتب‌سازی پایدار باشد. مرتب‌سازی " -"پایدار به این معناست که ترتیب نسبی عناصری که با هم برابر مقایسه می‌شوند تغییر " -"نمی‌کند؛ این ویژگی برای مرتب‌سازی چندمرحله‌ای (برای مثال، ابتدا بر اساس " -"دپارتمان و سپس بر اساس ردهٔ حقوق) مفید است." +"تابع داخلی :func:`sorted` تضمین می‌کند که مرتب‌سازی پایدار باشد. مرتب‌سازی پایدار به " +"این معناست که ترتیب نسبی عناصری که با هم برابر مقایسه می‌شوند تغییر نمی‌کند؛ این " +"ویژگی برای مرتب‌سازی چندمرحله‌ای (برای مثال، ابتدا بر اساس دپارتمان و سپس بر اساس ردهٔ " +"حقوق) مفید است." msgid "" -"The sort algorithm uses only ``<`` comparisons between items. While " -"defining an :meth:`~object.__lt__` method will suffice for sorting, :PEP:`8` " -"recommends that all six :ref:`rich comparisons ` be " -"implemented. This will help avoid bugs when using the same data with other " -"ordering tools such as :func:`max` that rely on a different underlying " -"method. Implementing all six comparisons also helps avoid confusion for " -"mixed type comparisons which can call the reflected :meth:`~object.__gt__` " -"method." +"The sort algorithm uses only ``<`` comparisons between items. While defining " +"an :meth:`~object.__lt__` method will suffice for sorting, :PEP:`8` recommends that " +"all six :ref:`rich comparisons ` be implemented. This will help avoid " +"bugs when using the same data with other ordering tools such as :func:`max` that " +"rely on a different underlying method. Implementing all six comparisons also helps " +"avoid confusion for mixed type comparisons which can call the " +"reflected :meth:`~object.__gt__` method." msgstr "" -"الگوریتم مرتب‌سازی تنها از مقایسه‌های ``<`` بین عناصر استفاده می‌کند. هرچند " -"تعریف متد :meth:`~object.__lt__` برای مرتب‌سازی کافی است، :PEP:`8` توصیه " -"می‌کند که هر شش عملگر :ref:`مقایسهٔ غنی ` پیاده‌سازی شوند. این کار " -"به جلوگیری از بروز خطا هنگام استفاده از همان داده‌ها با ابزارهای مرتب‌سازی " -"دیگری مانند :func:`max` که به متد زیربنایی متفاوتی متکی هستند کمک می‌کند. " -"همچنین، پیاده‌سازی هر شش مقایسه از سردرگمی در مقایسهٔ انواع مختلف که ممکن است " -"متد بازتابی :meth:`~object.__gt__` را فراخوانی کنند جلوگیری می‌کند." +"الگوریتم مرتب‌سازی تنها از مقایسه‌های ``<`` بین عناصر استفاده می‌کند. هرچند تعریف " +"متد :meth:`~object.__lt__` برای مرتب‌سازی کافی است، :PEP:`8` توصیه می‌کند که هر شش " +"عملگر :ref:`مقایسهٔ غنی ` پیاده‌سازی شوند. این کار به جلوگیری از بروز " +"خطا هنگام استفاده از همان داده‌ها با ابزارهای مرتب‌سازی دیگری مانند :func:`max` که به " +"متد زیربنایی متفاوتی متکی هستند کمک می‌کند. همچنین، پیاده‌سازی هر شش مقایسه از " +"سردرگمی در مقایسهٔ انواع مختلف که ممکن است متد بازتابی :meth:`~object.__gt__` را " +"فراخوانی کنند جلوگیری می‌کند." -msgid "" -"For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`." +msgid "For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`." msgstr "" -"برای مثال‌هایی از مرتب‌سازی و یک آموزش کوتاه دربارهٔ آن، به :ref:`sortinghowto` " -"مراجعه کنید." +"برای مثال‌هایی از مرتب‌سازی و یک آموزش کوتاه دربارهٔ آن، به :ref:`sortinghowto` مراجعه " +"کنید." msgid "Transform a method into a static method." msgstr "یک متد را به متد ایستا تبدیل می‌کند." msgid "" -"A static method does not receive an implicit first argument. To declare a " -"static method, use this idiom::" +"A static method does not receive an implicit first argument. To declare a static " +"method, use this idiom::" msgstr "" -"یک متد ایستا نخستین آرگومان ضمنی دریافت نمی‌کند. برای تعریف یک متد ایستا، از " -"الگوی زیر استفاده کنید::" +"یک متد ایستا نخستین آرگومان ضمنی دریافت نمی‌کند. برای تعریف یک متد ایستا، از الگوی " +"زیر استفاده کنید::" msgid "" "class C:\n" @@ -3245,43 +3106,40 @@ msgstr "" " def f(arg1, arg2, argN): ..." msgid "" -"The ``@staticmethod`` form is a function :term:`decorator` -- see :ref:" -"`function` for details." +"The ``@staticmethod`` form is a function :term:`decorator` -- see :ref:`function` " +"for details." msgstr "" -"شکل ``@staticmethod`` یک :term:`تزئین‌کننده ` تابع است؛ برای " -"جزئیات به :ref:`function` مراجعه کنید." +"شکل ``@staticmethod`` یک :term:`تزئین‌کننده ` تابع است؛ برای جزئیات " +"به :ref:`function` مراجعه کنید." msgid "" -"A static method can be called either on the class (such as ``C.f()``) or on " -"an instance (such as ``C().f()``). Moreover, the static method :term:" -"`descriptor` is also callable, so it can be used in the class definition " -"(such as ``f()``)." +"A static method can be called either on the class (such as ``C.f()``) or on an " +"instance (such as ``C().f()``). Moreover, the static method :term:`descriptor` is " +"also callable, so it can be used in the class definition (such as ``f()``)." msgstr "" -"یک متد ایستا را می‌توان هم روی خود کلاس (مانند ``C.f()``) و هم روی یک نمونه " -"(مانند ``C().f()``) فراخوانی کرد. علاوه بر این، :term:`توصیفگر ` " -"متد ایستا نیز فراخوانی‌پذیر است؛ بنابراین می‌توان از آن در تعریف کلاس (مانند " -"``f()``) استفاده کرد." +"یک متد ایستا را می‌توان هم روی خود کلاس (مانند ``C.f()``) و هم روی یک نمونه (مانند " +"``C().f()``) فراخوانی کرد. علاوه بر این، :term:`توصیفگر ` متد ایستا نیز " +"فراخوانی‌پذیر است؛ بنابراین می‌توان از آن در تعریف کلاس (مانند ``f()``) استفاده کرد." msgid "" "Static methods in Python are similar to those found in Java or C++. Also, " -"see :func:`classmethod` for a variant that is useful for creating alternate " -"class constructors." +"see :func:`classmethod` for a variant that is useful for creating alternate class " +"constructors." msgstr "" -"متدهای ایستا در پایتون مشابه متدهای ایستای موجود در جاوا یا ++C هستند. " -"همچنین، برای گونه‌ای که در ایجاد سازنده‌های جایگزین برای کلاس مفید است، به :" -"func:`classmethod` مراجعه کنید." +"متدهای ایستا در پایتون مشابه متدهای ایستای موجود در جاوا یا ++C هستند. همچنین، برای " +"گونه‌ای که در ایجاد سازنده‌های جایگزین برای کلاس مفید است، به :func:`classmethod` " +"مراجعه کنید." msgid "" -"Like all decorators, it is also possible to call ``staticmethod`` as a " -"regular function and do something with its result. This is needed in some " -"cases where you need a reference to a function from a class body and you " -"want to avoid the automatic transformation to instance method. For these " -"cases, use this idiom::" +"Like all decorators, it is also possible to call ``staticmethod`` as a regular " +"function and do something with its result. This is needed in some cases where you " +"need a reference to a function from a class body and you want to avoid the " +"automatic transformation to instance method. For these cases, use this idiom::" msgstr "" -"مانند همهٔ دکوراتورها، می‌توان ``staticmethod`` را نیز به‌صورت یک تابع معمولی " -"فراخوانی کرد و از نتیجهٔ آن استفاده نمود. این کار در برخی موارد که به ارجاعی " -"به یک تابع از درون بدنهٔ کلاس نیاز دارید و می‌خواهید از تبدیل خودکار آن به متد " -"نمونه جلوگیری کنید، ضروری است. در چنین مواردی، از الگوی زیر استفاده کنید::" +"مانند همهٔ دکوراتورها، می‌توان ``staticmethod`` را نیز به‌صورت یک تابع معمولی فراخوانی " +"کرد و از نتیجهٔ آن استفاده نمود. این کار در برخی موارد که به ارجاعی به یک تابع از " +"درون بدنهٔ کلاس نیاز دارید و می‌خواهید از تبدیل خودکار آن به متد نمونه جلوگیری کنید، " +"ضروری است. در چنین مواردی، از الگوی زیر استفاده کنید::" msgid "" "def regular_function():\n" @@ -3300,22 +3158,20 @@ msgid "For more information on static methods, see :ref:`types`." msgstr "برای اطلاعات بیشتر دربارهٔ متدهای ایستا، به :ref:`types` مراجعه کنید." msgid "" -"Static methods now inherit the method attributes (:attr:`~function." -"__module__`, :attr:`~function.__name__`, :attr:`~function.__qualname__`, :" -"attr:`~function.__doc__` and :attr:`~function.__annotations__`), have a new " -"``__wrapped__`` attribute, and are now callable as regular functions." +"Static methods now inherit the method attributes " +"(:attr:`~function.__module__`, :attr:`~function.__name__`, :attr:`~function.__qualname__`, :attr:`~function.__doc__` " +"and :attr:`~function.__annotations__`), have a new ``__wrapped__`` attribute, and " +"are now callable as regular functions." msgstr "" -"متدهای ایستا اکنون ویژگی‌های متد (:attr:`~function.__module__`، :attr:" -"`~function.__name__`، :attr:`~function.__qualname__`، :attr:`~function." -"__doc__` و :attr:`~function.__annotations__`) را به ارث می‌برند، دارای ویژگی " -"جدید ``__wrapped__`` هستند و همچنین اکنون مانند توابع معمولی قابل " -"فراخوانی‌اند." +"متدهای ایستا اکنون ویژگی‌های متد " +"(:attr:`~function.__module__`، :attr:`~function.__name__`، :attr:`~function.__qualname__`، :attr:`~function.__doc__` " +"و :attr:`~function.__annotations__`) را به ارث می‌برند، دارای ویژگی جدید " +"``__wrapped__`` هستند و همچنین اکنون مانند توابع معمولی قابل فراخوانی‌اند." -msgid "" -"Return a :class:`str` version of *object*. See :func:`str` for details." +msgid "Return a :class:`str` version of *object*. See :func:`str` for details." msgstr "" -"نسخه‌ای از *object* از نوع :class:`str` را برمی‌گرداند. برای جزئیات بیشتر، به :" -"func:`str` مراجعه کنید." +"نسخه‌ای از *object* از نوع :class:`str` را برمی‌گرداند. برای جزئیات بیشتر، " +"به :func:`str` مراجعه کنید." msgid "" "``str`` is the built-in string :term:`class`. For general information about " @@ -3325,36 +3181,34 @@ msgstr "" "رشته‌ها، :ref:`textseq` را ببینید." msgid "" -"Sums *start* and the items of an *iterable* from left to right and returns " -"the total. The *iterable*'s items are normally numbers, and the start value " -"is not allowed to be a string." +"Sums *start* and the items of an *iterable* from left to right and returns the " +"total. The *iterable*'s items are normally numbers, and the start value is not " +"allowed to be a string." msgstr "" -"*start* و عناصر *iterable* را از چپ به راست با هم جمع می‌کند و مجموع را " -"برمی‌گرداند. عناصر *iterable* معمولاً عدد هستند و مقدار *start* مجاز نیست رشته " -"باشد." +"*start* و عناصر *iterable* را از چپ به راست با هم جمع می‌کند و مجموع را برمی‌گرداند. " +"عناصر *iterable* معمولاً عدد هستند و مقدار *start* مجاز نیست رشته باشد." msgid "" -"For some use cases, there are good alternatives to :func:`sum`. The " -"preferred, fast way to concatenate a sequence of strings is by calling ``''." -"join(sequence)``. To add floating-point values with extended precision, " -"see :func:`math.fsum`\\. To concatenate a series of iterables, consider " -"using :func:`itertools.chain`." +"For some use cases, there are good alternatives to :func:`sum`. The preferred, fast " +"way to concatenate a sequence of strings is by calling ``''.join(sequence)``. To " +"add floating-point values with extended precision, see :func:`math.fsum`\\. To " +"concatenate a series of iterables, consider using :func:`itertools.chain`." msgstr "" -"برای برخی کاربردها، جایگزین‌های مناسبی برای :func:`sum` وجود دارد. روش ترجیحی " -"و سریع برای به‌هم‌چسباندن یک دنباله از رشته‌ها، فراخوانی ``''.join(sequence)`` " -"است. برای جمع کردن اعداد ممیز شناور با دقت بیشتر، به :func:`math.fsum` " -"مراجعه کنید. همچنین برای به‌هم‌پیوستن مجموعه‌ای از تکرارپذیرها، استفاده از :" -"func:`itertools.chain` را در نظر بگیرید." +"برای برخی کاربردها، جایگزین‌های مناسبی برای :func:`sum` وجود دارد. روش ترجیحی و سریع " +"برای به‌هم‌چسباندن یک دنباله از رشته‌ها، فراخوانی ``''.join(sequence)`` است. برای جمع " +"کردن اعداد ممیز شناور با دقت بیشتر، به :func:`math.fsum` مراجعه کنید. همچنین برای " +"به‌هم‌پیوستن مجموعه‌ای از تکرارپذیرها، استفاده از :func:`itertools.chain` را در نظر " +"بگیرید." msgid "The *start* parameter can be specified as a keyword argument." -msgstr "پارامتر *start* را می‌توان به‌صورت آرگومان کلیدی مشخص کرد." +msgstr "پارامتر *start* را می‌توان به‌صورت آرگومان کلیدواژه‌ای مشخص کرد." msgid "" -"Summation of floats switched to an algorithm that gives higher accuracy and " -"better commutativity on most builds." +"Summation of floats switched to an algorithm that gives higher accuracy and better " +"commutativity on most builds." msgstr "" -"الگوریتم جمع اعداد ممیز شناور به الگوریتمی تغییر یافته است که در بیشتر " -"نسخه‌های ساخت (buildها)، دقت بیشتر و جابجاپذیری بهتری فراهم می‌کند." +"الگوریتم جمع اعداد ممیز شناور به الگوریتمی تغییر یافته است که در بیشتر نسخه‌های ساخت " +"(buildها)، دقت بیشتر و جابجاپذیری بهتری فراهم می‌کند." msgid "" "Added specialization for summation of complexes, using same algorithm as for " @@ -3364,98 +3218,95 @@ msgstr "" "اعشاری، اضافه شد." msgid "" -"Return a proxy object that delegates method calls to a parent or sibling " -"class of *type*. This is useful for accessing inherited methods that have " -"been overridden in a class." +"Return a proxy object that delegates method calls to a parent or sibling class of " +"*type*. This is useful for accessing inherited methods that have been overridden " +"in a class." msgstr "" -"یک شیء واسط را برمی‌گرداند که فراخوانی متدها را به یک کلاس والد یا هم‌ردهٔ " -"*type* واگذار می‌کند. این قابلیت برای دسترسی به متدهای به‌ارث‌رسیده‌ای که در یک " -"کلاس بازنویسی شده‌اند، مفید است." +"یک شیء واسط را برمی‌گرداند که فراخوانی متدها را به یک کلاس والد یا هم‌ردهٔ *type* " +"واگذار می‌کند. این قابلیت برای دسترسی به متدهای به‌ارث‌رسیده‌ای که در یک کلاس بازنویسی " +"شده‌اند، مفید است." msgid "" "The *object_or_type* determines the :term:`method resolution order` to be " "searched. The search starts from the class right after the *type*." msgstr "" -"*object_or_type* ترتیب :term:`حل متد ` را که باید " -"جستجو شود تعیین می‌کند. جستجو از کلاسی که بلافاصله پس از *type* قرار دارد " -"آغاز می‌شود." +"*object_or_type* ترتیب :term:`حل متد ` را که باید جستجو " +"شود تعیین می‌کند. جستجو از کلاسی که بلافاصله پس از *type* قرار دارد آغاز می‌شود." msgid "" -"For example, if :attr:`~type.__mro__` of *object_or_type* is ``D -> B -> C -" -"> A -> object`` and the value of *type* is ``B``, then :func:`super` " -"searches ``C -> A -> object``." +"For example, if :attr:`~type.__mro__` of *object_or_type* is ``D -> B -> C -> A -> " +"object`` and the value of *type* is ``B``, then :func:`super` searches ``C -> A -> " +"object``." msgstr "" -"برای مثال، اگر :attr:`~type.__mro__` مربوط به *object_or_type* برابر با ``D -" -"> B -> C -> A -> object`` باشد و مقدار *type* برابر ``B`` باشد، در این صورت :" -"func:`super` در مسیر ``C -> A -> object`` جستجو می‌کند." +"برای مثال، اگر :attr:`~type.__mro__` مربوط به *object_or_type* برابر با ``D -> B -> " +"C -> A -> object`` باشد و مقدار *type* برابر ``B`` باشد، در این صورت :func:`super` " +"در مسیر ``C -> A -> object`` جستجو می‌کند." msgid "" -"The :attr:`~type.__mro__` attribute of the class corresponding to " -"*object_or_type* lists the method resolution search order used by both :func:" -"`getattr` and :func:`super`. The attribute is dynamic and can change " -"whenever the inheritance hierarchy is updated." +"The :attr:`~type.__mro__` attribute of the class corresponding to *object_or_type* " +"lists the method resolution search order used by both :func:`getattr` " +"and :func:`super`. The attribute is dynamic and can change whenever the " +"inheritance hierarchy is updated." msgstr "" -"ویژگی :attr:`~type.__mro__` کلاس متناظر با *object_or_type* ترتیب جستجوی حل " -"متد را که هم توسط :func:`getattr` و هم توسط :func:`super` استفاده می‌شود، " -"فهرست می‌کند. این ویژگی پویا است و هر زمان که سلسله‌مراتب وراثت تغییر کند، " -"ممکن است تغییر یابد." +"ویژگی :attr:`~type.__mro__` کلاس متناظر با *object_or_type* ترتیب جستجوی حل متد را " +"که هم توسط :func:`getattr` و هم توسط :func:`super` استفاده می‌شود، فهرست می‌کند. این " +"ویژگی پویا است و هر زمان که سلسله‌مراتب وراثت تغییر کند، ممکن است تغییر یابد." msgid "" -"If the second argument is omitted, the super object returned is unbound. If " -"the second argument is an object, ``isinstance(obj, type)`` must be true. " -"If the second argument is a type, ``issubclass(type2, type)`` must be true " -"(this is useful for classmethods)." +"If the second argument is omitted, the super object returned is unbound. If the " +"second argument is an object, ``isinstance(obj, type)`` must be true. If the " +"second argument is a type, ``issubclass(type2, type)`` must be true (this is useful " +"for classmethods)." msgstr "" -"اگر آرگومان دوم حذف شود، شیء super بازگردانده‌شده بدون اتصال (unbound) خواهد " -"بود. اگر آرگومان دوم یک شیء باشد، باید ``isinstance(obj, type)`` برقرار " -"باشد. اگر آرگومان دوم یک نوع (type) باشد، باید ``issubclass(type2, type)`` " -"برقرار باشد (این مورد برای متدهای کلاس مفید است)." +"اگر آرگومان دوم حذف شود، شیء super بازگردانده‌شده بدون اتصال (unbound) خواهد بود. " +"اگر آرگومان دوم یک شیء باشد، باید ``isinstance(obj, type)`` برقرار باشد. اگر " +"آرگومان دوم یک نوع (type) باشد، باید ``issubclass(type2, type)`` برقرار باشد (این " +"مورد برای متدهای کلاس مفید است)." msgid "" -"When called directly within an ordinary method of a class, both arguments " -"may be omitted (\"zero-argument :func:`!super`\"). In this case, *type* will " -"be the enclosing class, and *obj* will be the first argument of the " -"immediately enclosing function (typically ``self``). (This means that zero-" -"argument :func:`!super` will not work as expected within nested functions, " -"including generator expressions, which implicitly create nested functions.)" +"When called directly within an ordinary method of a class, both arguments may be " +"omitted (\"zero-argument :func:`!super`\"). In this case, *type* will be the " +"enclosing class, and *obj* will be the first argument of the immediately enclosing " +"function (typically ``self``). (This means that zero-argument :func:`!super` will " +"not work as expected within nested functions, including generator expressions, " +"which implicitly create nested functions.)" msgstr "" -"هنگامی که این تابع مستقیماً درون یک متد معمولیِ یک کلاس فراخوانی شود، هر دو " -"آرگومان را می‌توان حذف کرد («:func:`!super` بدون آرگومان»). در این حالت، " -"*type* همان کلاسِ محصورکننده خواهد بود و *obj* اولین آرگومانِ تابعِ بلافاصله " -"محصورکننده (معمولاً ``self``) خواهد بود. (این بدان معناست که :func:`!super` " -"بدون آرگومان در توابع تو‌در‌تو، از جمله عبارت‌های مولد که به‌طور ضمنی توابع " -"تو‌در‌تو ایجاد می‌کنند، مطابق انتظار عمل نخواهد کرد.)" +"هنگامی که این تابع مستقیماً درون یک متد معمولیِ یک کلاس فراخوانی شود، هر دو آرگومان " +"را می‌توان حذف کرد («:func:`!super` بدون آرگومان»). در این حالت، *type* همان کلاسِ " +"محصورکننده خواهد بود و *obj* اولین آرگومانِ تابعِ بلافاصله محصورکننده (معمولاً " +"``self``) خواهد بود. (این بدان معناست که :func:`!super` بدون آرگومان در توابع " +"تو‌در‌تو، از جمله عبارت‌های تولیدگر که به‌طور ضمنی توابع تو‌در‌تو ایجاد می‌کنند، مطابق " +"انتظار عمل نخواهد کرد.)" msgid "" -"There are two typical use cases for *super*. In a class hierarchy with " -"single inheritance, *super* can be used to refer to parent classes without " -"naming them explicitly, thus making the code more maintainable. This use " -"closely parallels the use of *super* in other programming languages." +"There are two typical use cases for *super*. In a class hierarchy with single " +"inheritance, *super* can be used to refer to parent classes without naming them " +"explicitly, thus making the code more maintainable. This use closely parallels the " +"use of *super* in other programming languages." msgstr "" -"دو کاربرد متداول برای *super* وجود دارد. در سلسله‌مراتب کلاسی با وراثت تکی، " -"می‌توان از *super* برای ارجاع به کلاس‌های والد بدون نام بردن صریح از آن‌ها " -"استفاده کرد و در نتیجه نگهداری کد را آسان‌تر ساخت. این کاربرد بسیار مشابه " -"استفاده از *super* در سایر زبان‌های برنامه‌نویسی است." +"دو کاربرد متداول برای *super* وجود دارد. در سلسله‌مراتب کلاسی با وراثت تکی، می‌توان " +"از *super* برای ارجاع به کلاس‌های والد بدون نام بردن صریح از آن‌ها استفاده کرد و در " +"نتیجه نگهداری کد را آسان‌تر ساخت. این کاربرد بسیار مشابه استفاده از *super* در سایر " +"زبان‌های برنامه‌نویسی است." msgid "" -"The second use case is to support cooperative multiple inheritance in a " -"dynamic execution environment. This use case is unique to Python and is not " -"found in statically compiled languages or languages that only support single " -"inheritance. This makes it possible to implement \"diamond diagrams\" where " -"multiple base classes implement the same method. Good design dictates that " -"such implementations have the same calling signature in every case (because " -"the order of calls is determined at runtime, because that order adapts to " -"changes in the class hierarchy, and because that order can include sibling " -"classes that are unknown prior to runtime)." +"The second use case is to support cooperative multiple inheritance in a dynamic " +"execution environment. This use case is unique to Python and is not found in " +"statically compiled languages or languages that only support single inheritance. " +"This makes it possible to implement \"diamond diagrams\" where multiple base " +"classes implement the same method. Good design dictates that such implementations " +"have the same calling signature in every case (because the order of calls is " +"determined at runtime, because that order adapts to changes in the class hierarchy, " +"and because that order can include sibling classes that are unknown prior to " +"runtime)." msgstr "" -"کاربرد متداول دوم، پشتیبانی از وراثت چندگانهٔ مشارکتی در یک محیط اجرای پویا " -"است. این کاربرد مختص پایتون است و در زبان‌های کامپایل‌شوندهٔ ایستا یا زبان‌هایی " -"که فقط از وراثت تکی پشتیبانی می‌کنند وجود ندارد. این قابلیت امکان پیاده‌سازی " -"«الگوهای الماسی» را فراهم می‌کند؛ جایی که چندین کلاس پایه یک متد یکسان را " -"پیاده‌سازی می‌کنند. طراحی مناسب ایجاب می‌کند که چنین پیاده‌سازی‌هایی در همهٔ موارد " -"امضای فراخوانی یکسانی داشته باشند (زیرا ترتیب فراخوانی‌ها در زمان اجرا تعیین " -"می‌شود، با تغییرات سلسله‌مراتب کلاس تطبیق می‌یابد و ممکن است شامل کلاس‌های " -"هم‌سطحی باشد که پیش از زمان اجرا ناشناخته هستند)." +"کاربرد متداول دوم، پشتیبانی از وراثت چندگانهٔ مشارکتی در یک محیط اجرای پویا است. این " +"کاربرد مختص پایتون است و در زبان‌های کامپایل‌شوندهٔ ایستا یا زبان‌هایی که فقط از وراثت " +"تکی پشتیبانی می‌کنند وجود ندارد. این قابلیت امکان پیاده‌سازی «الگوهای الماسی» را " +"فراهم می‌کند؛ جایی که چندین کلاس پایه یک متد یکسان را پیاده‌سازی می‌کنند. طراحی مناسب " +"ایجاب می‌کند که چنین پیاده‌سازی‌هایی در همهٔ موارد امضای فراخوانی یکسانی داشته باشند " +"(زیرا ترتیب فراخوانی‌ها در زمان اجرا تعیین می‌شود، با تغییرات سلسله‌مراتب کلاس تطبیق " +"می‌یابد و ممکن است شامل کلاس‌های هم‌سطحی باشد که پیش از زمان اجرا ناشناخته هستند)." msgid "For both use cases, a typical superclass call looks like this::" msgstr "در هر دو مورد استفاده، یک فراخوانی معمول به ابرکلاس به صورت زیر است::" @@ -3472,165 +3323,159 @@ msgstr "" " # super(C, self).method(arg)" msgid "" -"In addition to method lookups, :func:`super` also works for attribute " -"lookups. One possible use case for this is calling :term:`descriptors " -"` in a parent or sibling class." +"In addition to method lookups, :func:`super` also works for attribute lookups. One " +"possible use case for this is calling :term:`descriptors ` in a parent " +"or sibling class." msgstr "" -"علاوه بر جستجوی متدها، :func:`super` برای جستجوی ویژگی‌ها نیز عمل می‌کند. یکی " -"از کاربردهای ممکن آن، فراخوانی :term:`توصیفگرها ` در یک کلاس " -"والد یا هم‌رده است." +"علاوه بر جستجوی متدها، :func:`super` برای جستجوی ویژگی‌ها نیز عمل می‌کند. یکی از " +"کاربردهای ممکن آن، فراخوانی :term:`توصیفگرها ` در یک کلاس والد یا هم‌رده " +"است." msgid "" -"Note that :func:`super` is implemented as part of the binding process for " -"explicit dotted attribute lookups such as ``super().__getitem__(name)``. It " -"does so by implementing its own :meth:`~object.__getattribute__` method for " -"searching classes in a predictable order that supports cooperative multiple " -"inheritance. Accordingly, :func:`super` is undefined for implicit lookups " -"using statements or operators such as ``super()[name]``." +"Note that :func:`super` is implemented as part of the binding process for explicit " +"dotted attribute lookups such as ``super().__getitem__(name)``. It does so by " +"implementing its own :meth:`~object.__getattribute__` method for searching classes " +"in a predictable order that supports cooperative multiple inheritance. " +"Accordingly, :func:`super` is undefined for implicit lookups using statements or " +"operators such as ``super()[name]``." msgstr "" -"توجه داشته باشید که :func:`super` به‌عنوان بخشی از فرایند اتصال برای جستجوی " -"صریح ویژگی‌ها با نماد نقطه، مانند ``super().__getitem__(name)``, پیاده‌سازی " -"شده است. این کار از طریق پیاده‌سازی متد :meth:`~object.__getattribute__` خودش " -"انجام می‌شود تا کلاس‌ها را با ترتیبی قابل پیش‌بینی جستجو کند؛ ترتیبی که از " -"وراثت چندگانهٔ مشارکتی (cooperative multiple inheritance) پشتیبانی می‌کند. بر " -"این اساس، رفتار :func:`super` برای جستجوهای ضمنی که با دستورها یا عملگرهایی " -"مانند ``super()[name]`` انجام می‌شوند، تعریف نشده است." +"توجه داشته باشید که :func:`super` به‌عنوان بخشی از فرایند اتصال برای جستجوی صریح " +"ویژگی‌ها با نماد نقطه، مانند ``super().__getitem__(name)``, پیاده‌سازی شده است. این " +"کار از طریق پیاده‌سازی متد :meth:`~object.__getattribute__` خودش انجام می‌شود تا " +"کلاس‌ها را با ترتیبی قابل پیش‌بینی جستجو کند؛ ترتیبی که از وراثت چندگانهٔ مشارکتی " +"(cooperative multiple inheritance) پشتیبانی می‌کند. بر این اساس، رفتار :func:`super` " +"برای جستجوهای ضمنی که با دستورها یا عملگرهایی مانند ``super()[name]`` انجام می‌شوند، " +"تعریف نشده است." msgid "" -"Also note that, aside from the zero argument form, :func:`super` is not " -"limited to use inside methods. The two argument form specifies the " -"arguments exactly and makes the appropriate references. The zero argument " -"form only works inside a class definition, as the compiler fills in the " -"necessary details to correctly retrieve the class being defined, as well as " -"accessing the current instance for ordinary methods." +"Also note that, aside from the zero argument form, :func:`super` is not limited to " +"use inside methods. The two argument form specifies the arguments exactly and " +"makes the appropriate references. The zero argument form only works inside a class " +"definition, as the compiler fills in the necessary details to correctly retrieve " +"the class being defined, as well as accessing the current instance for ordinary " +"methods." msgstr "" -"همچنین توجه داشته باشید که، به‌جز حالت بدون آرگومان، :func:`super` محدود به " -"استفاده درون متدها نیست. شکل دوآرگومانی، آرگومان‌ها را دقیقاً همان‌گونه که داده " -"شده‌اند استفاده کرده و ارجاعات مناسب را ایجاد می‌کند. شکل بدون آرگومان فقط " -"درون تعریف یک کلاس کار می‌کند، زیرا کامپایلر جزئیات لازم را برای بازیابی صحیح " -"کلاس در حال تعریف و همچنین دسترسی به نمونهٔ فعلی در متدهای معمولی به‌طور " -"خودکار فراهم می‌کند." +"همچنین توجه داشته باشید که، به‌جز حالت بدون آرگومان، :func:`super` محدود به استفاده " +"درون متدها نیست. شکل دوآرگومانی، آرگومان‌ها را دقیقاً همان‌گونه که داده شده‌اند استفاده " +"کرده و ارجاعات مناسب را ایجاد می‌کند. شکل بدون آرگومان فقط درون تعریف یک کلاس کار " +"می‌کند، زیرا کامپایلر جزئیات لازم را برای بازیابی صحیح کلاس در حال تعریف و همچنین " +"دسترسی به نمونهٔ فعلی در متدهای معمولی به‌طور خودکار فراهم می‌کند." msgid "" -"For practical suggestions on how to design cooperative classes using :func:" -"`super`, see `guide to using super() `_." +"For practical suggestions on how to design cooperative classes using :func:`super`, " +"see `guide to using super() `_." msgstr "" -"برای پیشنهادهای کاربردی دربارهٔ طراحی کلاس‌های مشارکتی با استفاده از :func:" -"`super`، به `راهنمای استفاده از super() `_ مراجعه کنید." +"برای پیشنهادهای کاربردی دربارهٔ طراحی کلاس‌های مشارکتی با استفاده از :func:`super`، " +"به `راهنمای استفاده از super() `_ مراجعه کنید." msgid "" -":class:`super` objects are now :mod:`pickleable ` and :mod:" -"`copyable `." +":class:`super` objects are now :mod:`pickleable ` and :mod:`copyable " +"`." msgstr "" -"اکنون اشیای :class:`super` از :mod:`سریال‌سازی با pickle ` و :mod:" -"`کپی شدن ` پشتیبانی می‌کنند." +"اکنون اشیای :class:`super` از :mod:`سریال‌سازی با pickle ` و :mod:`کپی شدن " +"` پشتیبانی می‌کنند." msgid "" -"Rather than being a function, :class:`tuple` is actually an immutable " -"sequence type, as documented in :ref:`typesseq-tuple` and :ref:`typesseq`." +"Rather than being a function, :class:`tuple` is actually an immutable sequence " +"type, as documented in :ref:`typesseq-tuple` and :ref:`typesseq`." msgstr "" -":class:`tuple` در واقع یک نوع دنبالهٔ تغییرناپذیر است، نه یک تابع؛ همان‌گونه " -"که در :ref:`typesseq-tuple` و :ref:`typesseq` مستند شده است." +":class:`tuple` در واقع یک نوع دنبالهٔ تغییرناپذیر است، نه یک تابع؛ همان‌گونه که " +"در :ref:`typesseq-tuple` و :ref:`typesseq` مستند شده است." msgid "" -"With one argument, return the type of an *object*. The return value is a " -"type object and generally the same object as returned by :attr:`object." -"__class__`." +"With one argument, return the type of an *object*. The return value is a type " +"object and generally the same object as returned by :attr:`object.__class__`." msgstr "" -"در صورت ارسال یک آرگومان، نوعِ یک *object* را بازمی‌گرداند. مقدار بازگشتی یک " -"شیء از نوع type است و معمولاً همان شیئی است که توسط :attr:`object.__class__` " -"بازگردانده می‌شود." +"در صورت ارسال یک آرگومان، نوعِ یک *object* را بازمی‌گرداند. مقدار بازگشتی یک شیء از " +"نوع type است و معمولاً همان شیئی است که توسط :attr:`object.__class__` بازگردانده " +"می‌شود." msgid "" -"The :func:`isinstance` built-in function is recommended for testing the type " -"of an object, because it takes subclasses into account." +"The :func:`isinstance` built-in function is recommended for testing the type of an " +"object, because it takes subclasses into account." msgstr "" -"برای بررسی نوع یک شیء، استفاده از تابع داخلی :func:`isinstance` توصیه می‌شود، " -"زیرا زیرکلاس‌ها را نیز در نظر می‌گیرد." +"برای بررسی نوع یک شیء، استفاده از تابع داخلی :func:`isinstance` توصیه می‌شود، زیرا " +"زیرکلاس‌ها را نیز در نظر می‌گیرد." msgid "" -"With three arguments, return a new type object. This is essentially a " -"dynamic form of the :keyword:`class` statement. The *name* string is the " -"class name and becomes the :attr:`~type.__name__` attribute. The *bases* " -"tuple contains the base classes and becomes the :attr:`~type.__bases__` " -"attribute; if empty, :class:`object`, the ultimate base of all classes, is " -"added. The *dict* dictionary contains attribute and method definitions for " -"the class body; it may be copied or wrapped before becoming the :attr:`~type." -"__dict__` attribute. The following two statements create identical :class:`!" -"type` objects:" +"With three arguments, return a new type object. This is essentially a dynamic form " +"of the :keyword:`class` statement. The *name* string is the class name and becomes " +"the :attr:`~type.__name__` attribute. The *bases* tuple contains the base classes " +"and becomes the :attr:`~type.__bases__` attribute; if empty, :class:`object`, the " +"ultimate base of all classes, is added. The *dict* dictionary contains attribute " +"and method definitions for the class body; it may be copied or wrapped before " +"becoming the :attr:`~type.__dict__` attribute. The following two statements create " +"identical :class:`!type` objects:" msgstr "" -"در صورت ارسال سه آرگومان، یک شیء type جدید بازمی‌گرداند. این در واقع شکل " -"پویای دستور :keyword:`class` است. رشتهٔ *name* نام کلاس را مشخص می‌کند و به " -"ویژگی :attr:`~type.__name__` تبدیل می‌شود. تاپل *bases* کلاس‌های پایه را در " -"خود نگه می‌دارد و به ویژگی :attr:`~type.__bases__` تبدیل می‌شود؛ اگر خالی " -"باشد، :class:`object`، که کلاس پایهٔ نهایی همهٔ کلاس‌ها است، به آن افزوده " -"می‌شود. دیکشنری *dict* شامل تعریف ویژگی‌ها و متدهای بدنهٔ کلاس است؛ این دیکشنری " -"ممکن است پیش از تبدیل شدن به ویژگی :attr:`~type.__dict__` کپی یا در یک " -"wrapper قرار داده شود. دو دستور زیر اشیای :class:`!type` یکسانی ایجاد می‌کنند:" +"در صورت ارسال سه آرگومان، یک شیء type جدید بازمی‌گرداند. این در واقع شکل پویای " +"دستور :keyword:`class` است. رشتهٔ *name* نام کلاس را مشخص می‌کند و به " +"ویژگی :attr:`~type.__name__` تبدیل می‌شود. تاپل *bases* کلاس‌های پایه را در خود نگه " +"می‌دارد و به ویژگی :attr:`~type.__bases__` تبدیل می‌شود؛ اگر خالی " +"باشد، :class:`object`، که کلاس پایهٔ نهایی همهٔ کلاس‌ها است، به آن افزوده می‌شود. " +"دیکشنری *dict* شامل تعریف ویژگی‌ها و متدهای بدنهٔ کلاس است؛ این دیکشنری ممکن است پیش " +"از تبدیل شدن به ویژگی :attr:`~type.__dict__` کپی یا در یک wrapper قرار داده شود. دو " +"دستور زیر اشیای :class:`!type` یکسانی ایجاد می‌کنند:" msgid "See also:" msgstr "همچنین ببینید:" msgid "" -":ref:`Documentation on attributes and methods on classes `." +":ref:`Documentation on attributes and methods on classes `." msgstr ":ref:`مستندات ویژگی‌ها و متدهای کلاس‌ها `." msgid ":ref:`bltin-type-objects`" msgstr ":ref:`bltin-type-objects`" msgid "" -"Keyword arguments provided to the three argument form are passed to the " -"appropriate metaclass machinery (usually :meth:`~object.__init_subclass__`) " -"in the same way that keywords in a class definition (besides *metaclass*) " -"would." +"Keyword arguments provided to the three argument form are passed to the appropriate " +"metaclass machinery (usually :meth:`~object.__init_subclass__`) in the same way " +"that keywords in a class definition (besides *metaclass*) would." msgstr "" -"آرگومان‌های کلیدواژه‌ای که به شکل سه‌آرگومانی ارسال می‌شوند، همانند کلیدواژه‌های " -"موجود در تعریف یک کلاس (به‌جز *فرا‌داده*) به سازوکار مناسب فراداده (معمولاً :" -"meth:`~object.__init_subclass__`) ارسال می‌شوند." +"آرگومان‌های کلیدواژه‌ای که به شکل سه‌آرگومانی ارسال می‌شوند، همانند کلیدواژه‌های موجود " +"در تعریف یک کلاس (به‌جز *فرا‌داده*) به سازوکار مناسب فراداده " +"(معمولاً :meth:`~object.__init_subclass__`) ارسال می‌شوند." msgid "See also :ref:`class-customization`." msgstr "همچنین به :ref:`class-customization` مراجعه کنید." msgid "" -"Subclasses of :class:`!type` which don't override ``type.__new__`` may no " -"longer use the one-argument form to get the type of an object." +"Subclasses of :class:`!type` which don't override ``type.__new__`` may no longer " +"use the one-argument form to get the type of an object." msgstr "" -"زیرکلاس‌های :class:`!type` که ``type.__new__`` را بازنویسی نمی‌کنند، دیگر " -"نمی‌توانند از شکل تک‌آرگومانی برای دریافت نوع یک شیء استفاده کنند." +"زیرکلاس‌های :class:`!type` که ``type.__new__`` را بازنویسی نمی‌کنند، دیگر نمی‌توانند " +"از شکل تک‌آرگومانی برای دریافت نوع یک شیء استفاده کنند." msgid "" -"Return the :attr:`~object.__dict__` attribute for a module, class, instance, " -"or any other object with a :attr:`!__dict__` attribute." +"Return the :attr:`~object.__dict__` attribute for a module, class, instance, or any " +"other object with a :attr:`!__dict__` attribute." msgstr "" -"ویژگی :attr:`~object.__dict__` یک ماژول، کلاس، نمونه یا هر شیء دیگری که " -"دارای ویژگی :attr:`!__dict__` باشد را برمی‌گرداند." +"ویژگی :attr:`~object.__dict__` یک ماژول، کلاس، نمونه یا هر شیء دیگری که دارای " +"ویژگی :attr:`!__dict__` باشد را برمی‌گرداند." msgid "" -"Objects such as modules and instances have an updateable :attr:`~object." -"__dict__` attribute; however, other objects may have write restrictions on " -"their :attr:`!__dict__` attributes (for example, classes use a :class:`types." -"MappingProxyType` to prevent direct dictionary updates)." +"Objects such as modules and instances have an updateable :attr:`~object.__dict__` " +"attribute; however, other objects may have write restrictions on their :attr:`!" +"__dict__` attributes (for example, classes use a :class:`types.MappingProxyType` to " +"prevent direct dictionary updates)." msgstr "" -"اشیایی مانند ماژول‌ها و نمونه‌ها دارای ویژگی :attr:`~object.__dict__` " -"قابل‌به‌روزرسانی هستند؛ با این حال، برخی اشیای دیگر ممکن است محدودیت‌هایی برای " -"نوشتن در ویژگی :attr:`!__dict__` خود داشته باشند (برای مثال، کلاس‌ها از :" -"class:`types.MappingProxyType` برای جلوگیری از به‌روزرسانی مستقیم فرهنگ لغت " -"استفاده می‌کنند)." +"اشیایی مانند ماژول‌ها و نمونه‌ها دارای ویژگی :attr:`~object.__dict__` قابل‌به‌روزرسانی " +"هستند؛ با این حال، برخی اشیای دیگر ممکن است محدودیت‌هایی برای نوشتن در ویژگی :attr:`!" +"__dict__` خود داشته باشند (برای مثال، کلاس‌ها از :class:`types.MappingProxyType` " +"برای جلوگیری از به‌روزرسانی مستقیم دیکشنری استفاده می‌کنند)." msgid "Without an argument, :func:`vars` acts like :func:`locals`." msgstr "در صورت نداشتن آرگومان، :func:`vars` همانند :func:`locals` عمل می‌کند." msgid "" -"A :exc:`TypeError` exception is raised if an object is specified but it " -"doesn't have a :attr:`~object.__dict__` attribute (for example, if its class " -"defines the :attr:`~object.__slots__` attribute)." +"A :exc:`TypeError` exception is raised if an object is specified but it doesn't " +"have a :attr:`~object.__dict__` attribute (for example, if its class defines " +"the :attr:`~object.__slots__` attribute)." msgstr "" -"اگر شیئی مشخص شود اما دارای ویژگی :attr:`~object.__dict__` نباشد (برای مثال، " -"اگر کلاس آن ویژگی :attr:`~object.__slots__` را تعریف کرده باشد)، استثنای :" -"exc:`TypeError` ایجاد می‌شود." +"اگر شیئی مشخص شود اما دارای ویژگی :attr:`~object.__dict__` نباشد (برای مثال، اگر " +"کلاس آن ویژگی :attr:`~object.__slots__` را تعریف کرده باشد)، " +"استثنای :exc:`TypeError` پرتاب می‌شود." msgid "" "The result of calling this function without an argument has been updated as " @@ -3640,11 +3485,11 @@ msgstr "" "داخلی :func:`locals` به‌روزرسانی شده است." msgid "" -"Iterate over several iterables in parallel, producing tuples with an item " -"from each one." +"Iterate over several iterables in parallel, producing tuples with an item from each " +"one." msgstr "" -"روی چندین تکرارپذیر به‌طور هم‌زمان پیمایش می‌کند و تاپل‌هایی تولید می‌کند که هر " -"یک شامل یک عنصر از هر تکرارپذیر هستند." +"روی چندین تکرارپذیر به‌طور هم‌زمان پیمایش می‌کند و تاپل‌هایی تولید می‌کند که هر یک شامل " +"یک عنصر از هر تکرارپذیر هستند." msgid "Example::" msgstr "مثال::" @@ -3665,49 +3510,47 @@ msgstr "" "(3, 'everything nice')" msgid "" -"More formally: :func:`zip` returns an iterator of tuples, where the *i*-th " -"tuple contains the *i*-th element from each of the argument iterables." +"More formally: :func:`zip` returns an iterator of tuples, where the *i*-th tuple " +"contains the *i*-th element from each of the argument iterables." msgstr "" -"به‌طور دقیق‌تر، :func:`zip` یک تکرارگر از تاپل‌ها برمی‌گرداند که در آن، تاپل " -"*i*\\ ام شامل عنصر *i*\\ ام از هر یک از تکرارپذیرهای آرگومان‌ها است." +"به‌طور دقیق‌تر، :func:`zip` یک تکرارگر از تاپل‌ها برمی‌گرداند که در آن، تاپل *i*\\ ام " +"شامل عنصر *i*\\ ام از هر یک از تکرارپذیرهای آرگومان‌ها است." msgid "" -"Another way to think of :func:`zip` is that it turns rows into columns, and " -"columns into rows. This is similar to `transposing a matrix `_." +"Another way to think of :func:`zip` is that it turns rows into columns, and columns " +"into rows. This is similar to `transposing a matrix `_." msgstr "" -"راه دیگری برای درک :func:`zip` این است که سطرها را به ستون‌ها و ستون‌ها را به " -"سطرها تبدیل می‌کند. این کار مشابه `ترانهادهٔ یک ماتریس `_ است." +"راه دیگری برای درک :func:`zip` این است که سطرها را به ستون‌ها و ستون‌ها را به سطرها " +"تبدیل می‌کند. این کار مشابه `ترانهادهٔ یک ماتریس `_ است." msgid "" -":func:`zip` is lazy: The elements won't be processed until the iterable is " -"iterated on, e.g. by a :keyword:`!for` loop or by wrapping in a :class:" -"`list`." +":func:`zip` is lazy: The elements won't be processed until the iterable is iterated " +"on, e.g. by a :keyword:`!for` loop or by wrapping in a :class:`list`." msgstr "" -":func:`zip` تنبل است؛ عناصر تا زمانی که روی تکرارپذیر پیمایش انجام نشود، " -"پردازش نمی‌شوند؛ برای مثال، با یک حلقهٔ :keyword:`!for` یا با قرار دادن آن در :" -"class:`list`." +":func:`zip` تنبل است؛ عناصر تا زمانی که روی تکرارپذیر پیمایش انجام نشود، پردازش " +"نمی‌شوند؛ برای مثال، با یک حلقهٔ :keyword:`!for` یا با قرار دادن آن در :class:`list`." msgid "" "One thing to consider is that the iterables passed to :func:`zip` could have " -"different lengths; sometimes by design, and sometimes because of a bug in " -"the code that prepared these iterables. Python offers three different " -"approaches to dealing with this issue:" +"different lengths; sometimes by design, and sometimes because of a bug in the code " +"that prepared these iterables. Python offers three different approaches to dealing " +"with this issue:" msgstr "" -"یکی از نکاتی که باید در نظر داشت این است که تکرارپذیرهای ارسال‌شده به :func:" -"`zip` ممکن است طول‌های متفاوتی داشته باشند؛ گاهی این موضوع عمدی است و گاهی به " -"دلیل وجود یک باگ در کدی است که این تکرارپذیرها را آماده کرده است. پایتون سه " -"روش مختلف برای برخورد با این مسئله ارائه می‌دهد:" +"یکی از نکاتی که باید در نظر داشت این است که تکرارپذیرهای ارسال‌شده به :func:`zip` " +"ممکن است طول‌های متفاوتی داشته باشند؛ گاهی این موضوع عمدی است و گاهی به دلیل وجود یک " +"باگ در کدی است که این تکرارپذیرها را آماده کرده است. پایتون سه روش مختلف برای " +"برخورد با این مسئله ارائه می‌دهد:" msgid "" -"By default, :func:`zip` stops when the shortest iterable is exhausted. It " -"will ignore the remaining items in the longer iterables, cutting off the " -"result to the length of the shortest iterable::" +"By default, :func:`zip` stops when the shortest iterable is exhausted. It will " +"ignore the remaining items in the longer iterables, cutting off the result to the " +"length of the shortest iterable::" msgstr "" -"به‌طور پیش‌فرض، :func:`zip` زمانی متوقف می‌شود که کوتاه‌ترین تکرارپذیر به پایان " -"برسد. در این حالت، عناصر باقی‌مانده در تکرارپذیرهای بلندتر نادیده گرفته " -"می‌شوند و طول نتیجه برابر با طول کوتاه‌ترین تکرارپذیر خواهد بود::" +"به‌طور پیش‌فرض، :func:`zip` زمانی متوقف می‌شود که کوتاه‌ترین تکرارپذیر به پایان برسد. " +"در این حالت، عناصر باقی‌مانده در تکرارپذیرهای بلندتر نادیده گرفته می‌شوند و طول نتیجه " +"برابر با طول کوتاه‌ترین تکرارپذیر خواهد بود::" msgid "" ">>> list(zip(range(3), ['fee', 'fi', 'fo', 'fum']))\n" @@ -3717,13 +3560,13 @@ msgstr "" "[(0, 'fee'), (1, 'fi'), (2, 'fo')]" msgid "" -":func:`zip` is often used in cases where the iterables are assumed to be of " -"equal length. In such cases, it's recommended to use the ``strict=True`` " -"option. Its output is the same as regular :func:`zip`::" +":func:`zip` is often used in cases where the iterables are assumed to be of equal " +"length. In such cases, it's recommended to use the ``strict=True`` option. Its " +"output is the same as regular :func:`zip`::" msgstr "" -"از :func:`zip` اغلب در مواردی استفاده می‌شود که فرض بر این است تکرارپذیرها " -"طول یکسانی دارند. در چنین مواردی، توصیه می‌شود از گزینهٔ ``strict=True`` " -"استفاده کنید. خروجی آن با :func:`zip` معمولی یکسان است::" +"از :func:`zip` اغلب در مواردی استفاده می‌شود که فرض بر این است تکرارپذیرها طول " +"یکسانی دارند. در چنین مواردی، توصیه می‌شود از گزینهٔ ``strict=True`` استفاده کنید. " +"خروجی آن با :func:`zip` معمولی یکسان است::" msgid "" ">>> list(zip(('a', 'b', 'c'), (1, 2, 3), strict=True))\n" @@ -3733,60 +3576,55 @@ msgstr "" "[('a', 1), ('b', 2), ('c', 3)]" msgid "" -"Unlike the default behavior, it raises a :exc:`ValueError` if one iterable " -"is exhausted before the others:" +"Unlike the default behavior, it raises a :exc:`ValueError` if one iterable is " +"exhausted before the others:" msgstr "" "برخلاف رفتار پیش‌فرض، اگر یکی از تکرارپذیرها پیش از بقیه به پایان برسد، " -"استثنای :exc:`ValueError` ایجاد می‌کند:" +"استثنای :exc:`ValueError` پرتاب می‌کند:" msgid "" "Without the ``strict=True`` argument, any bug that results in iterables of " -"different lengths will be silenced, possibly manifesting as a hard-to-find " -"bug in another part of the program." +"different lengths will be silenced, possibly manifesting as a hard-to-find bug in " +"another part of the program." msgstr "" -"بدون آرگومان ``strict=True``، هر اشکالی که باعث شود تکرارشونده‌ها طول‌های " -"متفاوتی داشته باشند، بی‌صدا نادیده گرفته می‌شود و ممکن است در بخش دیگری از " -"برنامه به‌صورت یک باگ دشوار برای یافتن ظاهر شود." +"بدون آرگومان ``strict=True``، هر اشکالی که باعث شود تکرارشونده‌ها طول‌های متفاوتی " +"داشته باشند، بی‌صدا نادیده گرفته می‌شود و ممکن است در بخش دیگری از برنامه به‌صورت یک " +"باگ دشوار برای یافتن ظاهر شود." msgid "" -"Shorter iterables can be padded with a constant value to make all the " -"iterables have the same length. This is done by :func:`itertools." -"zip_longest`." +"Shorter iterables can be padded with a constant value to make all the iterables " +"have the same length. This is done by :func:`itertools.zip_longest`." msgstr "" -"می‌توان تکرارپذیرهای کوتاه‌تر را با یک مقدار ثابت پُر کرد تا همهٔ تکرارپذیرها " -"طول یکسانی داشته باشند. این کار توسط :func:`itertools.zip_longest` انجام " -"می‌شود." +"می‌توان تکرارپذیرهای کوتاه‌تر را با یک مقدار ثابت پُر کرد تا همهٔ تکرارپذیرها طول " +"یکسانی داشته باشند. این کار توسط :func:`itertools.zip_longest` انجام می‌شود." msgid "" -"Edge cases: With a single iterable argument, :func:`zip` returns an iterator " -"of 1-tuples. With no arguments, it returns an empty iterator." +"Edge cases: With a single iterable argument, :func:`zip` returns an iterator of 1-" +"tuples. With no arguments, it returns an empty iterator." msgstr "" -"حالت‌های خاص: اگر فقط یک آرگومان تکرارپذیر به :func:`zip` داده شود، یک " -"تکرارگر از تاپل‌های تک‌عضوی برمی‌گرداند. اگر هیچ آرگومانی داده نشود، یک تکرارگر " -"خالی برمی‌گرداند." +"حالت‌های خاص: اگر فقط یک آرگومان تکرارپذیر به :func:`zip` داده شود، یک تکرارگر از " +"تاپل‌های تک‌عضوی برمی‌گرداند. اگر هیچ آرگومانی داده نشود، یک تکرارگر خالی برمی‌گرداند." msgid "Tips and tricks:" msgstr "نکته‌ها و ترفندها:" msgid "" -"The left-to-right evaluation order of the iterables is guaranteed. This " -"makes possible an idiom for clustering a data series into n-length groups " -"using ``zip(*[iter(s)]*n, strict=True)``. This repeats the *same* iterator " -"``n`` times so that each output tuple has the result of ``n`` calls to the " -"iterator. This has the effect of dividing the input into n-length chunks." +"The left-to-right evaluation order of the iterables is guaranteed. This makes " +"possible an idiom for clustering a data series into n-length groups using " +"``zip(*[iter(s)]*n, strict=True)``. This repeats the *same* iterator ``n`` times " +"so that each output tuple has the result of ``n`` calls to the iterator. This has " +"the effect of dividing the input into n-length chunks." msgstr "" -"ترتیب ارزیابی تکرارپذیرها از چپ به راست تضمین شده است. این موضوع امکان " -"استفاده از الگوی ``zip(*[iter(s)]*n, strict=True)`` را برای گروه‌بندی یک " -"دنبالهٔ داده به گروه‌هایی با طول n فراهم می‌کند. در این روش، *همان* تکرارگر " -"``n`` بار تکرار می‌شود تا هر تاپل خروجی حاصل ``n`` فراخوانی از همان تکرارگر " -"باشد. نتیجهٔ این کار تقسیم ورودی به قطعاتی با طول n است." +"ترتیب ارزیابی تکرارپذیرها از چپ به راست تضمین شده است. این موضوع امکان استفاده از " +"الگوی ``zip(*[iter(s)]*n, strict=True)`` را برای گروه‌بندی یک دنبالهٔ داده به " +"گروه‌هایی با طول n فراهم می‌کند. در این روش، *همان* تکرارگر ``n`` بار تکرار می‌شود تا " +"هر تاپل خروجی حاصل ``n`` فراخوانی از همان تکرارگر باشد. نتیجهٔ این کار تقسیم ورودی " +"به قطعاتی با طول n است." msgid "" -":func:`zip` in conjunction with the ``*`` operator can be used to unzip a " -"list::" +":func:`zip` in conjunction with the ``*`` operator can be used to unzip a list::" msgstr "" -"می‌توان از :func:`zip` همراه با عملگر ``*`` برای بازکردن یک فهرست استفاده " -"کرد::" +"می‌توان از :func:`zip` همراه با عملگر ``*`` برای بازکردن یک فهرست استفاده کرد::" msgid "" ">>> x = [1, 2, 3]\n" @@ -3809,73 +3647,69 @@ msgid "Added the ``strict`` argument." msgstr "آرگومان ``strict`` اضافه شد." msgid "" -"This is an advanced function that is not needed in everyday Python " -"programming, unlike :func:`importlib.import_module`." +"This is an advanced function that is not needed in everyday Python programming, " +"unlike :func:`importlib.import_module`." msgstr "" -"این تابع پیشرفته‌ای است که برخلاف :func:`importlib.import_module` در " -"برنامه‌نویسی روزمرهٔ پایتون معمولاً به آن نیازی نخواهید داشت." +"این تابع پیشرفته‌ای است که برخلاف :func:`importlib.import_module` در برنامه‌نویسی " +"روزمرهٔ پایتون معمولاً به آن نیازی نخواهید داشت." msgid "" -"This function is invoked by the :keyword:`import` statement. It can be " -"replaced (by importing the :mod:`builtins` module and assigning to " -"``builtins.__import__``) in order to change semantics of the :keyword:`!" -"import` statement, but doing so is **strongly** discouraged as it is usually " -"simpler to use import hooks (see :pep:`302`) to attain the same goals and " -"does not cause issues with code which assumes the default import " -"implementation is in use. Direct use of :func:`__import__` is also " -"discouraged in favor of :func:`importlib.import_module`." +"This function is invoked by the :keyword:`import` statement. It can be replaced " +"(by importing the :mod:`builtins` module and assigning to ``builtins.__import__``) " +"in order to change semantics of the :keyword:`!import` statement, but doing so is " +"**strongly** discouraged as it is usually simpler to use import hooks " +"(see :pep:`302`) to attain the same goals and does not cause issues with code which " +"assumes the default import implementation is in use. Direct use " +"of :func:`__import__` is also discouraged in favor " +"of :func:`importlib.import_module`." msgstr "" "این تابع توسط دستور :keyword:`import` فراخوانی می‌شود. برای تغییر معنای " -"دستور :keyword:`!import` می‌توان آن را (با وارد کردن ماژول :mod:`builtins` و " -"انتساب به ``builtins.__import__``) جایگزین کرد، اما انجام این کار **اکیداً " -"توصیه نمی‌شود**، زیرا معمولاً استفاده از import hookها (به :pep:`302` مراجعه " -"کنید) برای دستیابی به همان هدف ساده‌تر است و با کدی که فرض می‌کند پیاده‌سازی " -"پیش‌فرض import در حال استفاده است نیز مشکلی ایجاد نمی‌کند. همچنین استفادهٔ " -"مستقیم از :func:`__import__` به نفع :func:`importlib.import_module` توصیه " -"نمی‌شود." - -msgid "" -"The function imports the module *name*, potentially using the given " -"*globals* and *locals* to determine how to interpret the name in a package " -"context. The *fromlist* gives the names of objects or submodules that should " -"be imported from the module given by *name*. The standard implementation " -"does not use its *locals* argument at all and uses its *globals* only to " -"determine the package context of the :keyword:`import` statement." -msgstr "" -"این تابع ماژول *name* را درون‌ریزی می‌کند و در صورت نیاز از *globals* و " -"*locals* داده‌شده برای تعیین نحوهٔ تفسیر نام در زمینهٔ یک بسته استفاده می‌کند. " -"آرگومان *fromlist* نام اشیا یا زیرماژول‌هایی را مشخص می‌کند که باید از ماژول " -"مشخص‌شده توسط *name* وارد شوند. پیاده‌سازی استاندارد اصلاً از آرگومان *locals* " -"استفاده نمی‌کند و از *globals* تنها برای تعیین زمینهٔ بسته در دستور :keyword:" -"`import` بهره می‌برد." - -msgid "" -"*level* specifies whether to use absolute or relative imports. ``0`` (the " -"default) means only perform absolute imports. Positive values for *level* " -"indicate the number of parent directories to search relative to the " -"directory of the module calling :func:`__import__` (see :pep:`328` for the " -"details)." -msgstr "" -"*level* مشخص می‌کند که از درون‌ریزی مطلق استفاده شود یا نسبی. مقدار ``0`` (که " -"مقدار پیش‌فرض است) به این معناست که فقط درون‌ریزی مطلق انجام شود. مقادیر مثبت " -"برای *level* تعداد پوشه‌های والد را مشخص می‌کنند که باید نسبت به پوشهٔ ماژولی " -"که :func:`__import__` را فراخوانی کرده است جستجو شوند (برای جزئیات، :pep:" -"`328` را ببینید)." - -msgid "" -"When the *name* variable is of the form ``package.module``, normally, the " -"top-level package (the name up till the first dot) is returned, *not* the " -"module named by *name*. However, when a non-empty *fromlist* argument is " -"given, the module named by *name* is returned." -msgstr "" -"وقتی متغیر *name* به شکل ``package.module`` باشد، به‌طور معمول بستهٔ سطح بالا " -"(بخشی از نام تا اولین نقطه) بازگردانده می‌شود، نه ماژولی که *name* به آن " -"اشاره می‌کند. با این حال، اگر آرگومان *fromlist* ناتهی باشد، ماژول مشخص‌شده " -"توسط *name* بازگردانده می‌شود." - -msgid "" -"For example, the statement ``import spam`` results in bytecode resembling " -"the following code::" +"دستور :keyword:`!import` می‌توان آن را (با وارد کردن ماژول :mod:`builtins` و انتساب " +"به ``builtins.__import__``) جایگزین کرد، اما انجام این کار **اکیداً توصیه نمی‌شود**، " +"زیرا معمولاً استفاده از import hookها (به :pep:`302` مراجعه کنید) برای دستیابی به " +"همان هدف ساده‌تر است و با کدی که فرض می‌کند پیاده‌سازی پیش‌فرض import در حال استفاده " +"است نیز مشکلی ایجاد نمی‌کند. همچنین استفادهٔ مستقیم از :func:`__import__` به " +"نفع :func:`importlib.import_module` توصیه نمی‌شود." + +msgid "" +"The function imports the module *name*, potentially using the given *globals* and " +"*locals* to determine how to interpret the name in a package context. The " +"*fromlist* gives the names of objects or submodules that should be imported from " +"the module given by *name*. The standard implementation does not use its *locals* " +"argument at all and uses its *globals* only to determine the package context of " +"the :keyword:`import` statement." +msgstr "" +"این تابع ماژول *name* را درون‌ریزی می‌کند و در صورت نیاز از *globals* و *locals* " +"داده‌شده برای تعیین نحوهٔ تفسیر نام در زمینهٔ یک بسته استفاده می‌کند. آرگومان " +"*fromlist* نام اشیا یا زیرماژول‌هایی را مشخص می‌کند که باید از ماژول مشخص‌شده توسط " +"*name* وارد شوند. پیاده‌سازی استاندارد اصلاً از آرگومان *locals* استفاده نمی‌کند و از " +"*globals* تنها برای تعیین زمینهٔ بسته در دستور :keyword:`import` بهره می‌برد." + +msgid "" +"*level* specifies whether to use absolute or relative imports. ``0`` (the default) " +"means only perform absolute imports. Positive values for *level* indicate the " +"number of parent directories to search relative to the directory of the module " +"calling :func:`__import__` (see :pep:`328` for the details)." +msgstr "" +"*level* مشخص می‌کند که از درون‌ریزی مطلق استفاده شود یا نسبی. مقدار ``0`` (که مقدار " +"پیش‌فرض است) به این معناست که فقط درون‌ریزی مطلق انجام شود. مقادیر مثبت برای *level* " +"تعداد پوشه‌های والد را مشخص می‌کنند که باید نسبت به پوشهٔ ماژولی که :func:`__import__` " +"را فراخوانی کرده است جستجو شوند (برای جزئیات، :pep:`328` را ببینید)." + +msgid "" +"When the *name* variable is of the form ``package.module``, normally, the top-level " +"package (the name up till the first dot) is returned, *not* the module named by " +"*name*. However, when a non-empty *fromlist* argument is given, the module named " +"by *name* is returned." +msgstr "" +"وقتی متغیر *name* به شکل ``package.module`` باشد، به‌طور معمول بستهٔ سطح بالا (بخشی " +"از نام تا اولین نقطه) بازگردانده می‌شود، نه ماژولی که *name* به آن اشاره می‌کند. با " +"این حال، اگر آرگومان *fromlist* ناتهی باشد، ماژول مشخص‌شده توسط *name* بازگردانده " +"می‌شود." + +msgid "" +"For example, the statement ``import spam`` results in bytecode resembling the " +"following code::" msgstr "برای مثال، دستور ``import spam`` به بایت‌کدی مشابه کد زیر تبدیل می‌شود::" msgid "spam = __import__('spam', globals(), locals(), [], 0)" @@ -3888,19 +3722,18 @@ msgid "spam = __import__('spam.ham', globals(), locals(), [], 0)" msgstr "spam = __import__('spam.ham', globals(), locals(), [], 0)" msgid "" -"Note how :func:`__import__` returns the toplevel module here because this is " -"the object that is bound to a name by the :keyword:`import` statement." +"Note how :func:`__import__` returns the toplevel module here because this is the " +"object that is bound to a name by the :keyword:`import` statement." msgstr "" -"توجه داشته باشید که :func:`__import__` در اینجا ماژول سطح بالا را " -"برمی‌گرداند، زیرا این همان شیئی است که توسط دستور :keyword:`import` به یک نام " -"منتسب می‌شود." +"توجه داشته باشید که :func:`__import__` در اینجا ماژول سطح بالا را برمی‌گرداند، زیرا " +"این همان شیئی است که توسط دستور :keyword:`import` به یک نام منتسب می‌شود." msgid "" -"On the other hand, the statement ``from spam.ham import eggs, sausage as " -"saus`` results in ::" +"On the other hand, the statement ``from spam.ham import eggs, sausage as saus`` " +"results in ::" msgstr "" -"از سوی دیگر، دستور ``from spam.ham import eggs, sausage as saus`` به نتیجهٔ " -"زیر منجر می‌شود::" +"از سوی دیگر، دستور ``from spam.ham import eggs, sausage as saus`` به نتیجهٔ زیر منجر " +"می‌شود::" msgid "" "_temp = __import__('spam.ham', globals(), locals(), ['eggs', 'sausage'], 0)\n" @@ -3912,31 +3745,30 @@ msgstr "" "saus = _temp.sausage" msgid "" -"Here, the ``spam.ham`` module is returned from :func:`__import__`. From " -"this object, the names to import are retrieved and assigned to their " -"respective names." +"Here, the ``spam.ham`` module is returned from :func:`__import__`. From this " +"object, the names to import are retrieved and assigned to their respective names." msgstr "" -"در اینجا، ماژول ``spam.ham`` از :func:`__import__` بازگردانده می‌شود. سپس، " -"نام‌هایی که باید درون‌ریزی شوند از این شیء استخراج شده و به نام‌های متناظر خود " -"اختصاص داده می‌شوند." +"در اینجا، ماژول ``spam.ham`` از :func:`__import__` بازگردانده می‌شود. سپس، نام‌هایی " +"که باید درون‌ریزی شوند از این شیء استخراج شده و به نام‌های متناظر خود اختصاص داده " +"می‌شوند." msgid "" -"If you simply want to import a module (potentially within a package) by " -"name, use :func:`importlib.import_module`." +"If you simply want to import a module (potentially within a package) by name, " +"use :func:`importlib.import_module`." msgstr "" -"اگر فقط می‌خواهید یک ماژول (احتمالاً درون یک بسته) را بر اساس نام آن درون‌ریزی " -"کنید، از :func:`importlib.import_module` استفاده کنید." +"اگر فقط می‌خواهید یک ماژول (احتمالاً درون یک بسته) را بر اساس نام آن درون‌ریزی کنید، " +"از :func:`importlib.import_module` استفاده کنید." msgid "" -"Negative values for *level* are no longer supported (which also changes the " -"default value to 0)." +"Negative values for *level* are no longer supported (which also changes the default " +"value to 0)." msgstr "" -"مقادیر منفی برای *level* دیگر پشتیبانی نمی‌شوند (در نتیجه، مقدار پیش‌فرض آن " -"نیز به 0 تغییر کرده است)." +"مقادیر منفی برای *level* دیگر پشتیبانی نمی‌شوند (در نتیجه، مقدار پیش‌فرض آن نیز به 0 " +"تغییر کرده است)." msgid "" -"When the command line options :option:`-E` or :option:`-I` are being used, " -"the environment variable :envvar:`PYTHONCASEOK` is now ignored." +"When the command line options :option:`-E` or :option:`-I` are being used, the " +"environment variable :envvar:`PYTHONCASEOK` is now ignored." msgstr "" "هنگامی که گزینه‌های خط فرمان :option:`-E` یا :option:`-I` استفاده شوند، متغیر " "محیطی :envvar:`PYTHONCASEOK` نادیده گرفته می‌شود." @@ -3945,13 +3777,13 @@ msgid "Footnotes" msgstr "پاورقی‌ها" msgid "" -"Note that the parser only accepts the Unix-style end of line convention. If " -"you are reading the code from a file, make sure to use newline conversion " -"mode to convert Windows or Mac-style newlines." +"Note that the parser only accepts the Unix-style end of line convention. If you are " +"reading the code from a file, make sure to use newline conversion mode to convert " +"Windows or Mac-style newlines." msgstr "" -"توجه داشته باشید که تجزیه‌کننده (parser) فقط قرارداد پایان خط به سبک یونیکس " -"را می‌پذیرد. اگر کد را از یک پرونده می‌خوانید، مطمئن شوید که از حالت تبدیل " -"نویسهٔ پایان خط برای تبدیل پایان خط‌های ویندوز یا مک استفاده می‌کنید." +"توجه داشته باشید که تجزیه‌کننده (parser) فقط قرارداد پایان خط به سبک یونیکس را " +"می‌پذیرد. اگر کد را از یک پرونده می‌خوانید، مطمئن شوید که از حالت تبدیل نویسهٔ پایان " +"خط برای تبدیل پایان خط‌های ویندوز یا مک استفاده می‌کنید." msgid "Boolean" msgstr "بولی" diff --git a/tutorial/appendix.po b/tutorial/appendix.po index c535d257f..1e6b981f7 100644 --- a/tutorial/appendix.po +++ b/tutorial/appendix.po @@ -87,9 +87,9 @@ msgid "" "memory. All error messages are written to the standard error stream; normal " "output from executed commands is written to standard output." msgstr "" -"زمان بروز خطا، مفسر یک پیام خطا و «گزارش پشته» «stack trace» چاپ می‌کند. در " +"زمان بروز خطا، مفسر یک پیام خطا و «ردگیری پشته» «stack trace» چاپ می‌کند. در " "حالت تعاملی، بعد از نمایش خطا، برنامه به حالت آماده‌باش برای دریافت دستورات " -"جدید بازمی‌گردد؛ اما اگر ورودی از یک فایل آمده باشد، پس از چاپ گزارش پشته با " +"جدید بازمی‌گردد؛ اما اگر ورودی از یک فایل آمده باشد، پس از چاپ ردگیری پشته با " "یک کد خروجی غیر صفر از برنامه خارج می‌شود. (استثناهایی که با بخش :keyword:" "`except` در یک دستور :keyword:`try` مدیریت می‌شوند، در این زمینه خطا محسوب " "نمی‌شوند.) بعضی خطاها به‌طور قطعی باعث خروج از برنامه می‌شوند و کد خروجی غیر " @@ -200,7 +200,7 @@ msgid "" "want to use the startup file in a script, you must do this explicitly in the " "script::" msgstr "" -"اگر می‌خواهید یک فایل راه‌اندازی اضافی از دایرکتوری فعلی بخوانید، می‌توانید این " +"اگر می‌خواهید یک فایل راه‌اندازی اضافی از پوشه فعلی بخوانید، می‌توانید این " "کار را در فایل راه‌اندازی عمومی با کدی مشابه ``if os.path.isfile('.pythonrc." "py'): exec(open('.pythonrc.py').read())``. اگر می‌خواهید از فایل راه‌اندازی در " "یک اسکریپت استفاده کنید، باید این کار را به‌طور صریح در اسکریپت انجام دهید::" @@ -231,7 +231,7 @@ msgid "" msgstr "" "پایتون دو نقطه‌ی اتصال برای سفارشی سازی ارائه می‌دهد: :index:`sitecustomize` " "و :index:`usercustomize`. برای دیدن چگونگی کارکرد آن، ابتدا باید مکان " -"دایرکتوری user site-packages خود را پیدا کنید. پایتون را اجرا کرده و این کد " +"پوشه user site-packages خود را پیدا کنید. پایتون را اجرا کرده و این کد " "را اجرا کنید:" msgid "" @@ -249,7 +249,7 @@ msgid "" "unless it is started with the :option:`-s` option to disable the automatic " "import." msgstr "" -"حالا می‌توانید فایلی به نام :file:`usercustomize.py` در آن دایرکتوری ایجاد " +"حالا می‌توانید فایلی به نام :file:`usercustomize.py` در آن پوشه ایجاد " "کرده و هر چیزی که می‌خواهید در آن قرار دهید. این فایل روی هر بار اجرای پایتون " "تأثیر خواهد گذاشت، مگر اینکه پایتون با گزینه :option:`-s` اجرا شود تا وارد " "کردن خودکار غیرفعال گردد." @@ -261,7 +261,7 @@ msgid "" "`site` module for more details." msgstr "" ":index:`sitecustomize` به همان صورت کار می‌کند، اما به‌طور معمول توسط مدیر " -"سیستم در دایرکتوری global site-packages ایجاد می‌شود و قبل از :index:" +"سیستم در پوشه global site-packages ایجاد می‌شود و قبل از :index:" "`usercustomize` وارد می‌شود. برای جزئیات بیشتر به مستندات ماژول :mod:`site` " "مراجعه کنید." diff --git a/tutorial/appetite.po b/tutorial/appetite.po index f810a49e8..0a1944096 100644 --- a/tutorial/appetite.po +++ b/tutorial/appetite.po @@ -164,7 +164,7 @@ msgstr "" "می‌توانید یک تابع یا ماژول داخلی جدید به مفسر اضافه کنید؛ چه برای اجرای " "عملیات حیاتی با بیشترین سرعت ممکن، و چه برای اتصال برنامه‌های پایتون به " "کتابخانه‌هایی که فقط به‌صورت دودویی در دسترس هستند (مانند یک کتابخانهٔ گرافیکی " -"اختصاصیِ یک تولیدکننده). وقتی کاملاً به پایتون علاقه‌مند شدید، حتی می‌توانید " +"اختصاصیِ یک تولیدگر). وقتی کاملاً به پایتون علاقه‌مند شدید، حتی می‌توانید " "مفسر پایتون را درون یک برنامهٔ نوشته‌شده با C جاسازی کنید و از آن به‌عنوان زبان " "توسعه یا زبان فرمان آن برنامه استفاده کنید." diff --git a/tutorial/classes.po b/tutorial/classes.po index 67ce955fa..7655178e3 100644 --- a/tutorial/classes.po +++ b/tutorial/classes.po @@ -123,7 +123,7 @@ msgstr "" "ویژگی معمولاً در نگاه اول به پایتون چندان جلب توجه نمی‌کند و هنگام کار با " "انواع پایه‌ی تغییرناپذیر (اعداد، رشته‌ها، تاپل‌ها) می‌توان آن را نادیده گرفت. با " "این حال، نام‌های مستعار می‌توانند تأثیری شگفت‌آور بر معناشناسی کد پایتونی داشته " -"باشند، به‌ویژه هنگامی که با اشیاء تغییرپذیر مانند لیستها، دیکشنری‌ها و بیشتر " +"باشند، به‌ویژه هنگامی که با اشیاء تغییرپذیر مانند فهرستها، دیکشنری‌ها و بیشتر " "انواع دیگر سروکار داریم. این ویژگی معمولاً به سود برنامه تمام می‌شود، چون " "نام‌های مستعار از برخی جهات مانند اشاره‌گرها (pointer) رفتار می‌کنند. برای " "مثال، ارسال یک شیء به‌عنوان آرگومان ارزان است، چون پیاده‌سازی فقط یک اشاره‌گر " @@ -141,9 +141,9 @@ msgid "" "understand what's going on. Incidentally, knowledge about this subject is " "useful for any advanced Python programmer." msgstr "" -"قبل از معرفی کلاسها، ابتدا باید چیزی درباره‌ی قوانین حوزه در پایتون به شما " +"قبل از معرفی کلاسها، ابتدا باید چیزی درباره‌ی قوانین محدوده در پایتون به شما " "بگویم. تعریف کلاسها چند ترفند جالب با فضا‌های نام انجام می‌دهد و برای اینکه " -"به‌طور کامل متوجه شوید چه می‌گذرد، باید بدانید که حوزه‌ها و فضا‌های نام چگونه " +"به‌طور کامل متوجه شوید چه می‌گذرد، باید بدانید که محدوده‌ها و فضا‌های نام چگونه " "کار می‌کنند. ضمناً، آگاهی از این موضوع برای هر برنامه‌نویس پیشرفته‌ی پایتون مفید " "است." @@ -235,7 +235,7 @@ msgid "" "their own local namespace." msgstr "" "فضای نام محلی برای یک تابع زمانی ایجاد می‌شود که تابع فراخوانی شود و زمانی که " -"تابع بازمی‌گردد یا استثنایی پرتاب می‌کند که در درون تابع مدیریت نمی‌شود، حذف " +"تابع بازمی‌گردد یا استثنا‌ای پرتاب می‌کند که در درون تابع مدیریت نمی‌شود، حذف " "می‌گردد. (در واقع، «فراموش شدن» توصیف بهتری برای چیزی است که واقعاً اتفاق " "می‌افتد.) البته، هر فراخوانی بازگشتی، فضای نام محلی خودش را دارد." @@ -259,7 +259,7 @@ msgstr "" "نام آن‌ها مستقیماً قابل دسترسی هستند:" msgid "the innermost scope, which is searched first, contains the local names" -msgstr "درونی‌ترین حوزه، که ابتدا جستجو می‌شود، شامل نام‌های محلی است" +msgstr "درونی‌ترین محدوده، که ابتدا جستجو می‌شود، شامل نام‌های محلی است" msgid "" "the scopes of any enclosing functions, which are searched starting with the " @@ -269,7 +269,7 @@ msgstr "" "می‌شود، شامل نام‌های غیرمحلی و همچنین غیرسراسری هستند" msgid "the next-to-last scope contains the current module's global names" -msgstr "حوزه‌ی قبل از آخر شامل نام‌های عمومی ماژول جاری است" +msgstr "محدوده‌ی قبل از آخر شامل نام‌های عمومی ماژول جاری است" msgid "" "the outermost scope (searched last) is the namespace containing built-in " @@ -493,7 +493,7 @@ msgid "" msgstr "" "در عمل، دستورات داخل یک تعریف کلاس معمولاً تعاریف توابع هستند، اما دستورات " "دیگری نیز مجاز هستند و گاهی مفیدند --- بعداً به این موضوع بازخواهیم گشت. " -"تعاریف توابع داخل یک کلاس معمولاً دارای شکل خاصی از لیست آرگومان‌ها هستند که " +"تعاریف توابع داخل یک کلاس معمولاً دارای شکل خاصی از فهرست آرگومان‌ها هستند که " "توسط قراردادهای فراخوانی برای متدها تعیین می‌شود --- باز هم، این موضوع بعداً " "توضیح داده می‌شود." @@ -766,8 +766,8 @@ msgid "" msgstr "" "در واقع، شاید پاسخ را حدس زده باشید: نکته‌ی ویژه در مورد متدها این است که شیء " "نمونه به عنوان اولین آرگومان تابع ارسال می‌شود. در مثال ما، فراخوانی ``x." -"f()`` دقیقاً معادل ``MyClass.f(x)`` است. به طور کلی، فراخوانی یک متد با لیستی " -"از *n* آرگومان معادل فراخوانی تابع متناظر با لیست آرگومانی است که با قرار " +"f()`` دقیقاً معادل ``MyClass.f(x)`` است. به طور کلی، فراخوانی یک متد با فهرستی " +"از *n* آرگومان معادل فراخوانی تابع متناظر با فهرست آرگومانی است که با قرار " "دادن شیء نمونه‌ی متد قبل از اولین آرگومان ایجاد می‌شود." msgid "" @@ -782,9 +782,9 @@ msgstr "" "به طور کلی، متدها به صورت زیر کار می‌کنند. هنگامی که به یک ویژگی غیرداده‌ای از " "یک نمونه ارجاع داده می‌شود، کلاس آن نمونه جستجو می‌شود. اگر آن نام نشان‌دهنده‌ی " "یک ویژگی کلاس معتبر باشد که یک شیء تابع است، ارجاعات به هر دو شیء نمونه و " -"شیء تابع در یک شیء متد بسته‌بندی می‌شوند. هنگامی که شیء متد با یک لیست آرگومان " -"فراخوانی می‌شود، یک لیست آرگومان جدید از شیء نمونه و لیست آرگومان ساخته می‌شود " -"و شیء تابع با این لیست آرگومان جدید فراخوانی می‌شود." +"شیء تابع در یک شیء متد بسته‌بندی می‌شوند. هنگامی که شیء متد با یک فهرست آرگومان " +"فراخوانی می‌شود، یک فهرست آرگومان جدید از شیء نمونه و فهرست آرگومان ساخته می‌شود " +"و شیء تابع با این فهرست آرگومان جدید فراخوانی می‌شود." msgid "Class and Instance Variables" msgstr "کلاس و متغیر‌های نمونه" @@ -843,9 +843,9 @@ msgid "" "instances::" msgstr "" "همان‌طور که در :ref:`tut-object` بحث شد، داده‌های مشترک می‌توانند تأثیرات " -"شگفت‌آوری بر روی اشیاء :term:`mutable` مانند لیستها و دیکشنری‌ها داشته باشند. " -"برای مثال، لیست *tricks* در کد زیر نباید به‌عنوان یک متغیر کلاس استفاده شود، " -"زیرا فقط یک لیست واحد بین همه‌ی نمونه‌های *Dog* مشترک خواهد بود::" +"شگفت‌آوری بر روی اشیاء :term:`mutable` مانند فهرستها و دیکشنری‌ها داشته باشند. " +"برای مثال، فهرست *tricks* در کد زیر نباید به‌عنوان یک متغیر کلاس استفاده شود، " +"زیرا فقط یک فهرست واحد بین همه‌ی نمونه‌های *Dog* مشترک خواهد بود::" msgid "" "class Dog:\n" @@ -1665,7 +1665,7 @@ msgstr "" "s" msgid "Generators" -msgstr "تولیدکننده‌ها" +msgstr "تولیدگر" msgid "" ":term:`Generators ` are a simple and powerful tool for creating " @@ -1678,9 +1678,9 @@ msgstr "" ":term:`Generators ` یک ابزار ساده و قدرتمند برای ایجاد " "اینتراتور‌ها هستند. آن‌ها مانند توابع عادی نوشته می‌شوند اما هر زمان که " "می‌خواهند داده‌ای را بازگردانند از دستور :keyword:`yield` استفاده می‌کنند. هر " -"بار که :func:`next` بر روی آن فراخوانی می‌شود، مولد از جایی که متوقف شده " +"بار که :func:`next` بر روی آن فراخوانی می‌شود، تولیدگر از جایی که متوقف شده " "ادامه می‌یابد (تمام مقادیر داده‌ها و اینکه آخرین دستور اجرا شده چه بوده را به " -"خاطر می‌آورد). یک مثال نشان می‌دهد که ایجاد مولد‌ها می‌تواند به طرز باور‌نکردنی " +"خاطر می‌آورد). یک مثال نشان می‌دهد که ایجاد تولیدگر‌ها می‌تواند به طرز باور‌نکردنی " "ساده باشد::" msgid "" @@ -1715,9 +1715,9 @@ msgid "" "compact is that the :meth:`~iterator.__iter__` and :meth:`~generator." "__next__` methods are created automatically." msgstr "" -"هر چیزی که با تولیدکننده‌ها قابل انجام است، می‌تواند با استفاده از تکرارگرهای " +"هر چیزی که با تولیدگرها قابل انجام است، می‌تواند با استفاده از تکرارگرهای " "مبتنی بر کلاس نیز انجام شود، همانطور که در بخش قبلی توضیح داده شد. آنچه " -"تولیدکننده‌ها را فشرده می‌کند، این است که روش‌های :meth:`~iterator.__iter__` و :" +"تولیدگر‌ها را فشرده می‌کند، این است که روش‌های :meth:`~iterator.__iter__` و :" "meth:`~generator.__next__` به‌طور خودکار ایجاد می‌شوند." msgid "" @@ -1726,7 +1726,7 @@ msgid "" "and much more clear than an approach using instance variables like ``self." "index`` and ``self.data``." msgstr "" -"یکی دیگر از ویژگیهای کلیدی این است که متغیر‌های محلی و وضعیت اجرا به‌طور " +"یکی دیگر از ویژگی‌های کلیدواژه‌ای این است که متغیر‌های محلی و وضعیت اجرا به‌طور " "خودکار بین فراخوانی‌ها ذخیره می‌شوند. این امر نوشتن تابع را آسان‌تر و خیلی " "واضح‌تر از رویکردی که از متغیر‌های نمونه‌ای مانند ``self.index`` و ``self." "data`` استفاده می‌کند، کرده است." @@ -1737,13 +1737,13 @@ msgid "" "combination, these features make it easy to create iterators with no more " "effort than writing a regular function." msgstr "" -"علاوه بر ایجاد خودکار متد‌ها و ذخیره سازی وضعیت برنامه، زمانی که تولیدکننده‌ها " +"علاوه بر ایجاد خودکار متد‌ها و ذخیره سازی وضعیت برنامه، زمانی که تولیدگر‌ها " "خاتمه می‌یابند، به‌طور خودکار :exc:`StopIteration` را ایجاد می‌کنند. این " "ویژگیها به صورت ترکیبی، ساختن تکرارگرها را به همان سادگی نوشتن یک تابع عادی " "امکان پذیر می‌سازند." msgid "Generator Expressions" -msgstr "عبارات تولیدکننده" +msgstr "عبارات تولیدگر" msgid "" "Some simple generators can be coded succinctly as expressions using a syntax " @@ -1753,11 +1753,11 @@ msgid "" "compact but less versatile than full generator definitions and tend to be " "more memory friendly than equivalent list comprehensions." msgstr "" -"برخی از تولیدکننده‌های ساده را می‌توان به‌صورت مختصر به عنوان عبارت کدنویسی " -"کرد، با استفاده از یک نحو مشابه درک‌لیستها اما با پرانتز به جای کروشه‌ی باز. " -"این عبارت‌ها برای شرایطی طراحی شده‌اند که تولیدکننده بلافاصله توسط یک تابع " -"محاط‌شونده استفاده می‌شود. عبارت‌های تولیدکننده فشرده‌تر هستند اما نسبت به " -"تعاریف کامل تولیدکننده، انعطاف‌پذیری کمتری دارند و معمولاً نسبت به درک‌لیستهای " +"برخی از تولیدگر‌های ساده را می‌توان به‌صورت مختصر به عنوان عبارت کدنویسی " +"کرد، با استفاده از یک نحو مشابه درک‌فهرستها اما با پرانتز به جای کروشه‌ی باز. " +"این عبارت‌ها برای شرایطی طراحی شده‌اند که تولیدگر بلافاصله توسط یک تابع " +"محاط‌شونده استفاده می‌شود. عبارت‌های تولیدگر فشرده‌تر هستند اما نسبت به " +"تعاریف کامل تولیدگر، انعطاف‌پذیری کمتری دارند و معمولاً نسبت به درک‌فهرستهای " "معادل، با حافظه سازگارتر هستند." msgid "Examples::" diff --git a/tutorial/controlflow.po b/tutorial/controlflow.po index b83518b0d..599751829 100644 --- a/tutorial/controlflow.po +++ b/tutorial/controlflow.po @@ -78,7 +78,7 @@ msgid "" "``switch`` or ``case`` statements found in other languages." msgstr "" "می‌تواند صفر یا چند بخش :keyword:`elif` وجود داشته باشد و بخش :keyword:`else` " -"اختیاری است. کلمهٔ کلیدی ':keyword:`!elif`' کوتاه‌شدهٔ 'else if' است و برای " +"اختیاری است. کلمهٔ کلیدواژه‌ای ':keyword:`!elif`' کوتاه‌شدهٔ 'else if' است و برای " "جلوگیری از تورفتگی بیش از حد مفید است. یک دنبالهٔ :keyword:`!if` ... :keyword:" "`!elif` ... :keyword:`!elif` ... جایگزینی برای دستورهای ``switch`` یا " "``case`` موجود در زبان‌های دیگر است." @@ -204,7 +204,7 @@ msgid "" "a different increment (even negative; sometimes this is called the 'step')::" msgstr "" "نقطهٔ پایانی داده‌شده هرگز بخشی از دنبالهٔ تولیدشده نیست؛ ``range(10)`` مقدار " -"تولید می‌کند که همان نمایه‌های مجاز برای آیتم‌های یک دنباله با طول ۱۰ هستند. " +"تولید می‌کند که همان اندیس‌‌های مجاز برای آیتم‌های یک دنباله با طول ۱۰ هستند. " "امکان این وجود دارد که شروع بازه را از عدد دیگری تعیین کنید، یا افزایشی " "متفاوت (حتی منفی؛ که گاهی «گام» نامیده می‌شود) مشخص کنید::" @@ -231,7 +231,7 @@ msgid "" "To iterate over the indices of a sequence, you can combine :func:`range` " "and :func:`len` as follows::" msgstr "" -"برای پیمایش روی نمایه‌های یک دنباله، می‌توانید :func:`range` و :func:`len` را " +"برای پیمایش روی اندیس‌‌های یک دنباله، می‌توانید :func:`range` و :func:`len` را " "به شکل زیر ترکیب کنید::" msgid "" @@ -294,7 +294,7 @@ msgstr "" "و ساختارهایی مناسب است که انتظار دارند چیزی وجود داشته باشد که بتوانند از آن " "آیتم‌های متوالی را تا زمانی که چیزی باقی نمانده است دریافت کنند. دیدیم که " "دستور :keyword:`for` چنین ساختاری است، در حالی که نمونه‌ای از تابعی که یک شیء " -"قابل پیمایش دریافت می‌کند :func:`sum` است::" +"تکرارپذیر دریافت می‌کند :func:`sum` است::" msgid "" ">>> sum(range(4)) # 0 + 1 + 2 + 3\n" @@ -308,8 +308,8 @@ msgid "" "arguments. In chapter :ref:`tut-structures`, we will discuss :func:`list` " "in more detail." msgstr "" -"بعداً تابع‌های بیشتری را خواهیم دید که اشیای قابل پیمایش برمی‌گردانند و اشیای " -"قابل پیمایش را به‌عنوان آرگومان دریافت می‌کنند. در فصل :ref:`tut-structures`، " +"بعداً تابع‌های بیشتری را خواهیم دید که اشیای تکرارپذیر برمی‌گردانند و اشیای " +"تکرارپذیر را به‌عنوان آرگومان دریافت می‌کنند. در فصل :ref:`tut-structures`، " "دربارهٔ :func:`list` با جزئیات بیشتری صحبت خواهیم کرد." msgid ":keyword:`!break` and :keyword:`!continue` Statements" @@ -861,7 +861,7 @@ msgid "" "also supported. (But ``**_`` would be redundant, so it is not allowed.)" msgstr "" "الگوهای نگاشتی: ``{\"bandwidth\": b, \"latency\": l}`` مقادیر " -"``\"bandwidth\"`` و ``\"latency\"`` را از یک فرهنگ لغت دریافت می‌کند. برخلاف " +"``\"bandwidth\"`` و ``\"latency\"`` را از یک دیکشنری دریافت می‌کند. برخلاف " "الگوهای دنباله‌ای، کلیدهای اضافی نادیده گرفته می‌شوند. بازکردن بسته‌ای مانند " "``**rest`` نیز پشتیبانی می‌شود. (اما ``**_`` اضافی است، بنابراین مجاز نیست.)" @@ -1258,7 +1258,7 @@ msgid "" "function accumulates the arguments passed to it on subsequent calls::" msgstr "" "**هشدار مهم:** مقدار پیش‌فرض فقط یک‌بار ارزیابی می‌شود. این موضوع زمانی تفاوت " -"ایجاد می‌کند که مقدار پیش‌فرض یک شیء قابل تغییر مانند یک فهرست، فرهنگ لغت، یا " +"ایجاد می‌کند که مقدار پیش‌فرض یک شیء قابل تغییر مانند یک فهرست، دیکشنری، یا " "نمونه‌ای از بیشتر کلاس‌ها باشد. برای مثال، تابع زیر آرگومان‌هایی را که در " "فراخوانی‌های بعدی به آن داده می‌شوند جمع‌آوری می‌کند::" @@ -1356,12 +1356,12 @@ msgid "" "keyword" msgstr "" "parrot(1000) # یک آرگومان موقعیتی\n" -"parrot(voltage=1000) # یک آرگومان کلیدی\n" -"parrot(voltage=1000000, action='VOOOOOM') # دو آرگومان کلیدی\n" -"parrot(action='VOOOOOM', voltage=1000000) # دو آرگومان کلیدی\n" +"parrot(voltage=1000) # یک آرگومان کلیدواژه‌ای\n" +"parrot(voltage=1000000, action='VOOOOOM') # دو آرگومان کلیدواژه‌ای\n" +"parrot(action='VOOOOOM', voltage=1000000) # دو آرگومان کلیدواژه‌ای\n" "parrot('a million', 'bereft of life', 'jump') # سه آرگومان موقعیتی\n" "parrot('a thousand', state='pushing up the daisies') # یک آرگومان موقعیتی، " -"یک آرگومان کلیدی" +"یک آرگومان کلیدواژه‌ای" msgid "but all the following calls would be invalid::" msgstr "اما تمام فراخوانی‌های زیر نامعتبر خواهند بود::" @@ -1374,10 +1374,10 @@ msgid "" "parrot(actor='John Cleese') # unknown keyword argument" msgstr "" "parrot() # آرگومان الزامی وارد نشده است\n" -"parrot(voltage=5.0, 'dead') # آرگومان غیرکلیدی پس از آرگومان کلیدی آمده " +"parrot(voltage=5.0, 'dead') # آرگومان غیرکلیدواژه‌ای پس از آرگومان کلیدواژه‌ای آمده " "است\n" "parrot(110, voltage=220) # مقدار تکراری برای یک آرگومان یکسان\n" -"parrot(actor='John Cleese') # آرگومان کلیدی ناشناخته" +"parrot(actor='John Cleese') # آرگومان کلیدواژه‌ای ناشناخته" msgid "" "In a function call, keyword arguments must follow positional arguments. All " @@ -1492,7 +1492,7 @@ msgid "" "Note that the order in which the keyword arguments are printed is guaranteed " "to match the order in which they were provided in the function call." msgstr "" -"توجه داشته باشید که ترتیب چاپ آرگومان‌های کلیدی تضمین شده است که با ترتیبی که " +"توجه داشته باشید که ترتیب چاپ آرگومان‌های کلیدواژه‌ای تضمین شده است که با ترتیبی که " "در فراخوانی تابع ارائه شده‌اند مطابقت داشته باشد." msgid "Special parameters" @@ -1741,7 +1741,7 @@ msgid "" "as a key::" msgstr "" "در نهایت، این تعریف تابع را در نظر بگیرید که در آن بین آرگومان موقعیتی " -"``name`` و ``**kwds`` که دارای کلیدی به نام ``name`` است، یک برخورد احتمالی " +"``name`` و ``**kwds`` که دارای کلیدواژه‌ای به نام ``name`` است، یک برخورد احتمالی " "وجود دارد::" msgid "" @@ -1975,7 +1975,7 @@ msgstr "" "می‌توان هر جا که به اشیای تابع نیاز باشد استفاده کرد. آن‌ها از نظر نحوی به یک " "عبارت منفرد محدود هستند. از نظر معنایی، آن‌ها تنها شکری نحوی برای یک تعریف " "معمولی تابع هستند. مانند تعریف‌های توابع تو‌در‌تو، توابع لامبدا می‌توانند به " -"متغیرهای حوزهٔ دربرگیرنده دسترسی داشته باشند::" +"متغیرهای محدوده‌ی دربرگیرنده دسترسی داشته باشند::" msgid "" ">>> def make_incrementor(n):\n" @@ -2118,7 +2118,7 @@ msgid "" "a required argument, an optional argument, and the return value annotated::" msgstr "" ":term:`حاشیه‌نویسی‌ها ` در ویژگی :attr:`~object." -"__annotations__` تابع، به‌صورت یک فرهنگ‌لغت ذخیره می‌شوند و هیچ تأثیری بر بخش " +"__annotations__` تابع، به‌صورت یک دیکشنری ذخیره می‌شوند و هیچ تأثیری بر بخش " "دیگری از تابع ندارند. حاشیه‌نویسی پارامترها با قرار دادن یک دونقطه پس از نام " "پارامتر و سپس یک عبارت که مقدار حاشیه‌نویسی را ارزیابی می‌کند، تعریف می‌شود. " "حاشیه‌نویسی مقدار بازگشتی با قرار دادن یک نشانهٔ لفظی ``->`` و سپس یک عبارت، " diff --git a/tutorial/datastructures.po b/tutorial/datastructures.po index 94fc68c3c..96259f98f 100644 --- a/tutorial/datastructures.po +++ b/tutorial/datastructures.po @@ -34,7 +34,7 @@ msgstr "" "می‌دهد و همچنین چند مورد جدید نیز اضافه می‌کند." msgid "More on Lists" -msgstr "بیشتر درباره‌ی لیست‌ها" +msgstr "بیشتر درباره‌ی فهرست‌ها" msgid "" "The :ref:`list ` data type has some more methods. Here are " @@ -51,7 +51,7 @@ msgid "" "Extend the list by appending all the items from the iterable. Similar to " "``a[len(a):] = iterable``." msgstr "" -"فهرست را با افزودن تمام آیتم‌های شیء قابل پیمایش گسترش می‌دهد. مشابه " +"فهرست را با افزودن تمام آیتم‌های شیء تکرارپذیر گسترش می‌دهد. مشابه " "``a[len(a):] = iterable`` است." msgid "" @@ -59,7 +59,7 @@ msgid "" "element before which to insert, so ``a.insert(0, x)`` inserts at the front " "of the list, and ``a.insert(len(a), x)`` is equivalent to ``a.append(x)``." msgstr "" -"یک آیتم را در موقعیت مشخصی درج می‌کند. اولین آرگومان، نمایهٔ عنصری است که آیتم " +"یک آیتم را در موقعیت مشخصی درج می‌کند. اولین آرگومان، اندیس‌ٔ عنصری است که آیتم " "باید پیش از آن درج شود؛ بنابراین ``a.insert(0, x)`` آیتم را در ابتدای فهرست " "درج می‌کند و ``a.insert(len(a), x)`` معادل ``a.append(x)`` است." @@ -68,7 +68,7 @@ msgid "" "raises a :exc:`ValueError` if there is no such item." msgstr "" "اولین آیتم از فهرست را که مقدار آن برابر با *value* است حذف می‌کند. اگر چنین " -"آیتمی وجود نداشته باشد، یک :exc:`ValueError` ایجاد می‌کند." +"آیتمی وجود نداشته باشد، یک :exc:`ValueError` پرتاب می‌کند." msgid "" "Remove the item at the given position in the list, and return it. If no " @@ -77,9 +77,9 @@ msgid "" "outside the list range." msgstr "" "آیتم موجود در موقعیت مشخص‌شده از فهرست را حذف می‌کند و آن را برمی‌گرداند. اگر " -"هیچ نمایه‌ای مشخص نشده باشد، ``a.pop()`` آخرین آیتم فهرست را حذف کرده و " -"برمی‌گرداند. اگر فهرست خالی باشد یا نمایه خارج از محدودهٔ فهرست باشد، یک :exc:" -"`IndexError` ایجاد می‌کند." +"هیچ اندیس‌‌ای مشخص نشده باشد، ``a.pop()`` آخرین آیتم فهرست را حذف کرده و " +"برمی‌گرداند. اگر فهرست خالی باشد یا اندیس‌ خارج از محدودهٔ فهرست باشد، یک :exc:" +"`IndexError` پرتاب می‌کند." msgid "Remove all items from the list. Similar to ``del a[:]``." msgstr "تمام آیتم‌های فهرست را حذف می‌کند. مشابه ``del a[:]`` است." @@ -88,8 +88,8 @@ msgid "" "Return zero-based index of the first occurrence of *value* in the list. " "Raises a :exc:`ValueError` if there is no such item." msgstr "" -"نمایهٔ مبتنی بر صفرِ اولین رخداد *value* در فهرست را برمی‌گرداند. اگر چنین " -"آیتمی وجود نداشته باشد، یک :exc:`ValueError` ایجاد می‌کند." +"اندیس‌ٔ مبتنی بر صفرِ اولین رخداد *value* در فهرست را برمی‌گرداند. اگر چنین " +"آیتمی وجود نداشته باشد، یک :exc:`ValueError` پرتاب می‌کند." msgid "" "The optional arguments *start* and *end* are interpreted as in the slice " @@ -98,7 +98,7 @@ msgid "" "sequence rather than the *start* argument." msgstr "" "آرگومان‌های اختیاری *start* و *end* مانند نشانه‌گذاری برش تفسیر می‌شوند و برای " -"محدود کردن جستجو به یک زیر‌دنبالهٔ مشخص از فهرست استفاده می‌شوند. نمایهٔ " +"محدود کردن جستجو به یک زیر‌دنبالهٔ مشخص از فهرست استفاده می‌شوند. اندیس‌ٔ " "بازگردانده‌شده نسبت به ابتدای دنبالهٔ کامل محاسبه می‌شود، نه نسبت به آرگومان " "*start*." @@ -205,7 +205,7 @@ msgstr "" "آخرین عنصری که اضافه می‌شود، اولین عنصری است که دریافت می‌شود («آخرین ورودی، " "اولین خروجی»). برای افزودن یک آیتم به بالای پشته، از :meth:`~list.append` " "استفاده کنید. برای دریافت یک آیتم از بالای پشته، از :meth:`~list.pop` بدون " -"یک نمایهٔ صریح استفاده کنید. برای مثال::" +"یک اندیس‌ٔ صریح استفاده کنید. برای مثال::" msgid "" ">>> stack = [3, 4, 5]\n" @@ -241,7 +241,7 @@ msgstr "" "[3, 4]" msgid "Using Lists as Queues" -msgstr "استفاده از لیست‌ها به عنوان صف" +msgstr "استفاده از فهرست‌ها به عنوان صف" msgid "" "It is also possible to use a list as a queue, where the first element added " @@ -298,7 +298,7 @@ msgid "" msgstr "" "درک‌های فهرستی روشی کوتاه و مختصر برای ایجاد فهرست‌ها فراهم می‌کنند. کاربردهای " "رایج آن‌ها ایجاد فهرست‌های جدیدی است که در آن‌ها هر عنصر، نتیجهٔ انجام برخی " -"عملیات روی هر عضو از یک دنباله یا شیء قابل پیمایش دیگر است، یا ایجاد یک " +"عملیات روی هر عضو از یک دنباله یا شیء تکرارپذیر دیگر است، یا ایجاد یک " "زیر‌دنباله از عناصری که یک شرط مشخص را برآورده می‌کنند." msgid "For example, assume we want to create a list of squares, like::" @@ -427,10 +427,10 @@ msgid "" "[1, 2, 3, 4, 5, 6, 7, 8, 9]" msgstr "" ">>> vec = [-4, -2, 0, 2, 4]\n" -">>> # ایجاد یک لیست جدید با مقادیر دو برابر شده\n" +">>> # ایجاد یک فهرست جدید با مقادیر دو برابر شده\n" ">>> [x*2 for x in vec]\n" "[-8, -4, 0, 4, 8]\n" -">>> # فیلتر کردن لیست برای حذف اعداد منفی\n" +">>> # فیلتر کردن فهرست برای حذف اعداد منفی\n" ">>> [x for x in vec if x >= 0]\n" "[0, 2, 4]\n" ">>> # اعمال یک تابع روی تمام عناصر\n" @@ -440,7 +440,7 @@ msgstr "" ">>> freshfruit = [' banana', ' loganberry ', 'passion fruit ']\n" ">>> [weapon.strip() for weapon in freshfruit]\n" "['banana', 'loganberry', 'passion fruit']\n" -">>> # ایجاد لیستی از تاپل‌های ۲تایی به شکل (عدد، مربع عدد)\n" +">>> # ایجاد فهرستی از تاپل‌های ۲تایی به شکل (عدد، مربع عدد)\n" ">>> [(x, x**2) for x in range(6)]\n" "[(0, 0), (1, 1), (2, 4), (3, 9), (4, 16), (5, 25)]\n" ">>> # تاپل باید داخل پرانتز قرار بگیرد، در غیر این صورت خطا ایجاد می‌شود\n" @@ -449,7 +449,7 @@ msgstr "" " [x, x**2 for x in range(6)]\n" " ^^^^^^^\n" "SyntaxError: did you forget parentheses around the comprehension target?\n" -">>> # تخت کردن یک لیست با استفاده از listcomp و دو حلقه‌ی for\n" +">>> # تخت کردن یک فهرست با استفاده از listcomp و دو حلقه‌ی for\n" ">>> vec = [[1,2,3], [4,5,6], [7,8,9]]\n" ">>> [num for elem in vec for num in elem]\n" "[1, 2, 3, 4, 5, 6, 7, 8, 9]" @@ -586,7 +586,7 @@ msgid "" "be used to remove slices from a list or clear the entire list (which we did " "earlier by assignment of an empty list to the slice). For example::" msgstr "" -"روشی برای حذف یک آیتم از فهرست با استفاده از نمایهٔ آن به‌جای مقدار آن وجود " +"روشی برای حذف یک آیتم از فهرست با استفاده از اندیس‌ٔ آن به‌جای مقدار آن وجود " "دارد: دستور :keyword:`del`. این دستور با متد :meth:`~list.pop` که یک مقدار " "برمی‌گرداند تفاوت دارد. دستور :keyword:`!del` همچنین می‌تواند برای حذف برش‌هایی " "از یک فهرست یا خالی کردن کامل فهرست استفاده شود (که پیش‌تر با انتساب یک فهرست " @@ -639,7 +639,7 @@ msgid "" "data types may be added. There is also another standard sequence data type: " "the *tuple*." msgstr "" -"دیدیم که فهرست‌ها و رشته‌ها ویژگی‌های مشترک بسیاری مانند عملیات نمایه‌گذاری و " +"دیدیم که فهرست‌ها و رشته‌ها ویژگی‌های مشترک بسیاری مانند عملیات اندیس‌‌گذاری و " "برش دارند. آن‌ها دو نمونه از نوع‌های دادهٔ *دنباله‌ای* (به :ref:`typesseq` " "مراجعه کنید) هستند. از آنجا که پایتون زبانی در حال تکامل است، ممکن است " "نوع‌های دادهٔ دنباله‌ای دیگری نیز به آن افزوده شوند. همچنین یک نوع دادهٔ " @@ -717,7 +717,7 @@ msgstr "" "اگرچه تاپل‌ها ممکن است شبیه فهرست‌ها به نظر برسند، اغلب در موقعیت‌ها و برای " "اهداف متفاوتی استفاده می‌شوند. تاپل‌ها :term:`immutable` هستند و معمولاً شامل " "یک دنبالهٔ ناهمگن از عناصر هستند که از طریق بازکردن بسته‌بندی (در ادامهٔ این " -"بخش توضیح داده می‌شود) یا نمایه‌گذاری (یا حتی از طریق ویژگی‌ها در مورد :func:" +"بخش توضیح داده می‌شود) یا اندیس‌‌گذاری (یا حتی از طریق ویژگی‌ها در مورد :func:" "`namedtuples `) به آن‌ها دسترسی پیدا می‌شود. فهرست‌ها :" "term:`mutable` هستند و عناصر آن‌ها معمولاً همگن هستند و با پیمایش روی فهرست به " "آن‌ها دسترسی پیدا می‌شود." @@ -802,7 +802,7 @@ msgid "" msgstr "" "از آکولادها یا تابع :func:`set` می‌توان برای ایجاد مجموعه‌ها استفاده کرد. " "توجه: برای ایجاد یک مجموعهٔ خالی باید از ``set()`` استفاده کنید، نه ``{}``؛ " -"مورد دوم یک فرهنگ لغت خالی ایجاد می‌کند، که یک ساختار داده است و در بخش بعدی " +"مورد دوم یک دیکشنری خالی ایجاد می‌کند، که یک ساختار داده است و در بخش بعدی " "دربارهٔ آن صحبت می‌کنیم." msgid "" @@ -899,16 +899,16 @@ msgid "" "in place using index assignments, slice assignments, or methods like :meth:" "`~list.append` and :meth:`~list.extend`." msgstr "" -"یک نوع دادهٔ مفید دیگر که به‌صورت داخلی در پایتون وجود دارد، *فرهنگ لغت* است " +"یک نوع دادهٔ مفید دیگر که به‌صورت داخلی در پایتون وجود دارد، *دیکشنری* است " "(به :ref:`typesmapping` مراجعه کنید). فرهنگ‌های لغت در برخی زبان‌های دیگر با " "نام «حافظه‌های انجمنی» یا «آرایه‌های انجمنی» شناخته می‌شوند. برخلاف دنباله‌ها که " -"با یک بازه از اعداد نمایه‌گذاری می‌شوند، فرهنگ‌های لغت با *کلیدها* نمایه‌گذاری " +"با یک بازه از اعداد اندیس‌‌گذاری می‌شوند، فرهنگ‌های لغت با *کلیدها* اندیس‌‌گذاری " "می‌شوند؛ کلیدها می‌توانند هر نوع تغییرناپذیری باشند؛ رشته‌ها و اعداد همیشه " "می‌توانند کلید باشند. تاپل‌ها نیز می‌توانند به‌عنوان کلید استفاده شوند، اگر فقط " "شامل رشته‌ها، اعداد یا تاپل‌ها باشند؛ اگر یک تاپل به‌صورت مستقیم یا غیرمستقیم " "شامل یک شیء تغییرپذیر باشد، نمی‌توان از آن به‌عنوان کلید استفاده کرد. " "نمی‌توانید از فهرست‌ها به‌عنوان کلید استفاده کنید، زیرا فهرست‌ها را می‌توان با " -"استفاده از انتساب نمایه‌ای، انتساب برش، یا متدهایی مانند :meth:`~list.append` " +"استفاده از انتساب اندیس‌‌ای، انتساب برش، یا متدهایی مانند :meth:`~list.append` " "و :meth:`~list.extend` در محل تغییر داد." msgid "" @@ -918,11 +918,11 @@ msgid "" "of key:value pairs within the braces adds initial key:value pairs to the " "dictionary; this is also the way dictionaries are written on output." msgstr "" -"بهترین روش این است که یک فرهنگ لغت را به‌عنوان مجموعه‌ای از جفت‌های *کلید: " -"مقدار* در نظر بگیرید، با این شرط که کلیدها (درون یک فرهنگ لغت) یکتا باشند. " -"یک جفت آکولاد یک فرهنگ لغت خالی ایجاد می‌کند: ``{}``. قرار دادن یک فهرست " +"بهترین روش این است که یک دیکشنری را به‌عنوان مجموعه‌ای از جفت‌های *کلید: " +"مقدار* در نظر بگیرید، با این شرط که کلیدها (درون یک دیکشنری) یکتا باشند. " +"یک جفت آکولاد یک دیکشنری خالی ایجاد می‌کند: ``{}``. قرار دادن یک فهرست " "جداشده با ویرگول از جفت‌های کلید:مقدار درون آکولاد، جفت‌های اولیهٔ کلید:مقدار " -"را به فرهنگ لغت اضافه می‌کند؛ این همان روشی است که فرهنگ‌های لغت در خروجی " +"را به دیکشنری اضافه می‌کند؛ این همان روشی است که فرهنگ‌های لغت در خروجی " "نوشته می‌شوند." msgid "" @@ -931,7 +931,7 @@ msgid "" "value pair with ``del``. If you store using a key that is already in use, " "the old value associated with that key is forgotten." msgstr "" -"عملیات اصلی روی یک فرهنگ لغت، ذخیره کردن یک مقدار با یک کلید مشخص و استخراج " +"عملیات اصلی روی یک دیکشنری، ذخیره کردن یک مقدار با یک کلید مشخص و استخراج " "مقدار با استفاده از کلید است. همچنین امکان حذف یک جفت کلید:مقدار با استفاده " "از ``del`` وجود دارد. اگر مقداری را با کلیدی ذخیره کنید که از قبل استفاده " "شده است، مقدار قدیمی مرتبط با آن کلید فراموش می‌شود." @@ -944,9 +944,9 @@ msgid "" "dictionary." msgstr "" "استخراج مقدار برای یک کلید موجود نیست با استفاده از زیرنویس‌گذاری " -"(``d[key]``) یک :exc:`KeyError` ایجاد می‌کند. برای جلوگیری از دریافت این خطا " +"(``d[key]``) یک :exc:`KeyError` پرتاب می‌کند. برای جلوگیری از دریافت این خطا " "هنگام تلاش برای دسترسی به کلیدی که ممکن است وجود نداشته باشد، از متد :meth:" -"`~dict.get` استفاده کنید؛ این متد در صورتی که کلید در فرهنگ لغت وجود نداشته " +"`~dict.get` استفاده کنید؛ این متد در صورتی که کلید در دیکشنری وجود نداشته " "باشد، ``None`` (یا یک مقدار پیش‌فرض مشخص‌شده) را برمی‌گرداند." msgid "" @@ -955,13 +955,13 @@ msgid "" "``sorted(d)`` instead). To check whether a single key is in the dictionary, " "use the :keyword:`in` keyword." msgstr "" -"اجرای ``list(d)`` روی یک فرهنگ لغت، فهرستی از تمام کلیدهای استفاده‌شده در " -"فرهنگ لغت را با ترتیب درج آن‌ها برمی‌گرداند (اگر می‌خواهید مرتب شده باشد، فقط " -"از ``sorted(d)`` استفاده کنید). برای بررسی اینکه یک کلید مشخص در فرهنگ لغت " -"وجود دارد یا نه، از کلمهٔ کلیدی :keyword:`in` استفاده کنید." +"اجرای ``list(d)`` روی یک دیکشنری، فهرستی از تمام کلیدهای استفاده‌شده در " +"دیکشنری را با ترتیب درج آن‌ها برمی‌گرداند (اگر می‌خواهید مرتب شده باشد، فقط " +"از ``sorted(d)`` استفاده کنید). برای بررسی اینکه یک کلید مشخص در دیکشنری " +"وجود دارد یا نه، از کلمهٔ کلیدواژه‌ای :keyword:`in` استفاده کنید." msgid "Here is a small example using a dictionary::" -msgstr "در اینجا یک مثال کوچک با استفاده از یک فرهنگ لغت آورده شده است::" +msgstr "در اینجا یک مثال کوچک با استفاده از یک دیکشنری آورده شده است::" msgid "" ">>> tel = {'jack': 4098, 'sape': 4139}\n" @@ -1032,7 +1032,7 @@ msgid "" "In addition, dict comprehensions can be used to create dictionaries from " "arbitrary key and value expressions::" msgstr "" -"علاوه بر این، درک‌های فرهنگ لغت می‌توانند برای ایجاد فرهنگ‌های لغت از عبارت‌های " +"علاوه بر این، درک‌های دیکشنری می‌توانند برای ایجاد فرهنگ‌های لغت از عبارت‌های " "دلخواه کلید و مقدار استفاده شوند::" msgid "" @@ -1047,7 +1047,7 @@ msgid "" "using keyword arguments::" msgstr "" "هنگامی که کلیدها رشته‌های ساده هستند، گاهی مشخص کردن جفت‌ها با استفاده از " -"آرگومان‌های کلیدی آسان‌تر است::" +"آرگومان‌های کلیدواژه‌ای آسان‌تر است::" msgid "" ">>> dict(sape=4139, guido=4127, jack=4098)\n" @@ -1085,7 +1085,7 @@ msgid "" "When looping through a sequence, the position index and corresponding value " "can be retrieved at the same time using the :func:`enumerate` function. ::" msgstr "" -"هنگام پیمایش روی یک دنباله، نمایهٔ موقعیت و مقدار متناظر آن را می‌توان به‌طور " +"هنگام پیمایش روی یک دنباله، اندیس‌ٔ موقعیت و مقدار متناظر آن را می‌توان به‌طور " "هم‌زمان با استفاده از تابع :func:`enumerate` دریافت کرد. ::" msgid "" @@ -1389,7 +1389,7 @@ msgstr "" "که اشیا متدهای مقایسهٔ مناسب داشته باشند. برای مثال، نوع‌های عددی ترکیبی بر " "اساس مقدار عددی خود مقایسه می‌شوند، بنابراین 0 با 0.0 برابر است و موارد " "مشابه. در غیر این صورت، مفسر به‌جای ارائهٔ یک ترتیب دلخواه، یک استثنای :exc:" -"`TypeError` ایجاد می‌کند." +"`TypeError` پرتاب می‌کند." msgid "Footnotes" msgstr "پانویس‌ها" diff --git a/tutorial/errors.po b/tutorial/errors.po index c480ef949..4d3ad6450 100644 --- a/tutorial/errors.po +++ b/tutorial/errors.po @@ -81,7 +81,7 @@ msgstr "" "فایل آمده باشد، بدانید باید کجا را بررسی کنید." msgid "Exceptions" -msgstr "استثناء ها" +msgstr "استثنا ها" msgid "" "Even if a statement or expression is syntactically correct, it may cause an " @@ -153,7 +153,7 @@ msgstr "" "`TypeError`. رشته ای که به عنوان نوع استثنا چاپ می شود، نام استثنای داخلی " "است که رخ داده است. این موضوع برای تمام استثناهای داخلی صدق می کند، اما برای " "استثناهای تعریف شده توسط کاربر لزوماً صحیح نیست (گرچه این یک قاعدهٔ مفید محسوب " -"می‌شود). نام های استثنای استاندارد شناسه های داخلی هستند (نه کلمات کلیدی رزرو " +"می‌شود). نام های استثنای استاندارد شناسه های داخلی هستند (نه کلمات کلیدواژه‌ای رزرو " "شده)." msgid "" @@ -177,7 +177,7 @@ msgstr "" msgid "" ":ref:`bltin-exceptions` lists the built-in exceptions and their meanings." msgstr "" -":ref:`bltin-exceptions` لیستی از استثناهای داخلی و معانی آن ها را ارائه می " +":ref:`bltin-exceptions` فهرستی از استثناهای داخلی و معانی آن ها را ارائه می " "دهد." msgid "Handling Exceptions" @@ -195,7 +195,7 @@ msgstr "" "مثال زیر نگاه کنید که از کاربر ورودی می‌خواهد تا زمانی که یک عدد صحیح معتبر " "وارد شود، اما به کاربر اجازه می‌دهد برنامه را قطع کند (با فشردن :kbd:`Control-" "C` یا هر روشی که سیستم‌عامل پشتیبانی می‌کند)؛ توجه داشته باشید که قطع برنامه " -"توسط کاربر با ایجاد استثنای :exc:`KeyboardInterrupt` مشخص می‌شود. ::" +"توسط کاربر با پرتاب استثنای :exc:`KeyboardInterrupt` مشخص می‌شود. ::" msgid "" ">>> while True:\n" @@ -414,8 +414,8 @@ msgstr "" "یعنی :exc:`Exception`، کلاس پایهٔ تمام استثناهای غیرمرگبار است. استثناهایی که " "زیرکلاس :exc:`Exception` نیستند معمولاً مدیریت نمی‌شوند، زیرا برای نشان دادن " "این موضوع به‌کار می‌روند که برنامه باید خاتمه یابد. از جملهٔ آن‌ها می‌توان به :" -"exc:`SystemExit` که توسط :meth:`sys.exit` ایجاد می‌شود و :exc:" -"`KeyboardInterrupt` که هنگام درخواست کاربر برای قطع اجرای برنامه ایجاد " +"exc:`SystemExit` که توسط :meth:`sys.exit` پرتاب می‌شود و :exc:" +"`KeyboardInterrupt` که هنگام درخواست کاربر برای قطع اجرای برنامه پرتاب " "می‌شود، اشاره کرد." msgid "" @@ -435,7 +435,7 @@ msgid "" "well)::" msgstr "" "رایج‌ترین الگوی مدیریت :exc:`Exception` این است که ابتدا استثنا چاپ یا ثبت " -"(log) شود و سپس دوباره ایجاد (re-raise) گردد تا فراخواننده نیز بتواند در " +"(log) شود و سپس دوباره پرتاب گردد تا فراخواننده نیز بتواند در " "صورت نیاز آن را مدیریت کند::" msgid "" @@ -475,7 +475,7 @@ msgid "" msgstr "" "دستور :keyword:`try` ... :keyword:`except` یک *بند else* اختیاری نیز دارد که " "در صورت وجود، باید پس از همهٔ *بندهای except* قرار گیرد. این بند برای کدی " -"مفید است که تنها در صورتی باید اجرا شود که *بخش try* هیچ استثنایی ایجاد " +"مفید است که تنها در صورتی باید اجرا شود که *بخش try* هیچ استثنایی پرتاب " "نکرده باشد. برای مثال::" msgid "" @@ -505,7 +505,7 @@ msgid "" msgstr "" "استفاده از بند :keyword:`!else` بهتر از افزودن کد بیشتر به :keyword:`try` " "است، زیرا از این که به‌طور ناخواسته استثنایی که توسط کد محافظت‌شده با دستور :" -"keyword:`!try` ... :keyword:`!except` ایجاد نشده است نیز گرفته شود، جلوگیری " +"keyword:`!try` ... :keyword:`!except` پرتاب نشده است نیز گرفته شود، جلوگیری " "می‌کند." msgid "" @@ -539,14 +539,14 @@ msgstr "" "Handling run-time error: division by zero" msgid "Raising Exceptions" -msgstr "ایجاد استثناها" +msgstr "پرتاب استثناها" msgid "" "The :keyword:`raise` statement allows the programmer to force a specified " "exception to occur. For example::" msgstr "" "دستور :keyword:`raise` به برنامه‌نویس اجازه می‌دهد وقوع یک استثنای مشخص را " -"به‌صورت اجباری ایجاد کند. برای مثال::" +"به‌صورت اجباری پرتاب کند. برای مثال::" msgid "" ">>> raise NameError('HiThere')\n" @@ -568,7 +568,7 @@ msgid "" "its subclasses). If an exception class is passed, it will be implicitly " "instantiated by calling its constructor with no arguments::" msgstr "" -"تنها آرگومان دستور :keyword:`raise` مشخص می‌کند که چه استثنایی باید ایجاد " +"تنها آرگومان دستور :keyword:`raise` مشخص می‌کند که چه استثنایی باید پرتاب " "شود. این آرگومان باید یا یک نمونهٔ استثنا (exception instance) باشد یا یک " "کلاس استثنا (کلاسی که از :class:`BaseException` مشتق شده باشد، مانند :exc:" "`Exception` یا یکی از زیرکلاس‌های آن). اگر یک کلاس استثنا ارسال شود، پایتون " @@ -587,7 +587,7 @@ msgid "" msgstr "" "اگر فقط لازم است تشخیص دهید که آیا استثنایی رخ داده است یا نه، اما قصد " "مدیریت آن را ندارید، می‌توانید از شکل ساده‌تری از دستور :keyword:`raise` برای " -"ایجاد مجدد (re-raise) همان استثنا استفاده کنید::" +"پرتاب مجدد همان استثنا استفاده کنید::" msgid "" ">>> try:\n" @@ -991,7 +991,7 @@ msgid "" "finally` clause has been executed." msgstr "" "همان‌طور که می‌بینید، بخش :keyword:`finally` در هر صورت اجرا می‌شود. استثنای :" -"exc:`TypeError` که در اثر تقسیم دو رشته ایجاد شده است، توسط بخش :keyword:" +"exc:`TypeError` که در اثر تقسیم دو رشته پرتاب شده است، توسط بخش :keyword:" "`except` مدیریت نمی‌شود و بنابراین پس از اجرای بخش :keyword:`!finally` دوباره " "پرتاب می‌شود." @@ -1059,7 +1059,7 @@ msgstr "" "تعریف‌شده دارند، این موضوع را در مستندات خود ذکر می‌کنند." msgid "Raising and Handling Multiple Unrelated Exceptions" -msgstr "ایجاد و مدیریت چندین استثنای نامربوط به هم" +msgstr "پرتاب و مدیریت چندین استثنای نامربوط به هم" msgid "" "There are situations where it is necessary to report several exceptions that " @@ -1275,7 +1275,7 @@ msgid "" "standard traceback rendering includes all notes, in the order they were " "added, after the exception. ::" msgstr "" -"وقتی یک استثنا برای پرتاب شدن ایجاد می‌شود، معمولاً با اطلاعاتی مقداردهی اولیه " +"وقتی یک استثنا برای پرتاب شدن پرتاب می‌شود، معمولاً با اطلاعاتی مقداردهی اولیه " "می‌شود که خطای رخ‌داده را توصیف می‌کنند. بااین‌حال، گاهی مفید است که پس از " "مدیریت (catch) شدن استثنا نیز اطلاعات بیشتری به آن افزوده شود. برای این " "منظور، استثناها متدی به نام ``add_note(note)`` دارند که یک رشته را دریافت " diff --git a/tutorial/index.po b/tutorial/index.po index 15da73808..552fe2f04 100644 --- a/tutorial/index.po +++ b/tutorial/index.po @@ -44,7 +44,7 @@ msgstr "" "ساختمان داده‌های سطح بالا و کارآمد و همچنین رویکردی ساده اما مؤثر به برنامه " "نویسی شیء گرا است. سینتکس زیبا و نوع دهی پویا در پایتون، به همراه طبیعت " "تفسیری آن، این زبان را به گزینه ای ایده‌آل برای اسکریپت‌نویسی و توسعه سریع " -"برنامه ها در بسیاری از حوزه ها و بر روی اکثر پلتفرم ها تبدیل کرده است." +"برنامه ها در بسیاری از محدوده‌ها و بر روی اکثر پلتفرم ها تبدیل کرده است." msgid "" "The Python interpreter and the extensive standard library are freely " diff --git a/tutorial/inputoutput.po b/tutorial/inputoutput.po index d0e26eae7..f0f6f8445 100644 --- a/tutorial/inputoutput.po +++ b/tutorial/inputoutput.po @@ -68,7 +68,7 @@ msgid "" msgstr "" "برای استفاده از :ref:`لیترال‌های رشته‌ای قالبی `، یک رشته را با " "``f`` یا ``F`` قبل از علامت نقل‌قول یا نقل‌قول سه‌گانه آغاز کنید. درون این " -"رشته، می‌توانید یک عبارت پایتون را بین کاراکترهای ``{`` و ``}`` بنویسید که " +"رشته، می‌توانید یک عبارت پایتون را بین نویسه‌های ``{`` و ``}`` بنویسید که " "می‌تواند به متغیرها یا مقادیر لیترال ارجاع دهد." msgid "" @@ -152,9 +152,9 @@ msgstr "" "تابع :func:`str` برای بازگرداندن نمایشی از مقادیر طراحی شده است که تا حدی " "قابل‌خواندن برای انسان باشد، در حالی که :func:`repr` برای تولید نمایشی طراحی " "شده که توسط مفسر قابل خواندن باشد (یا اگر معادل نحوی وجود نداشته باشد، یک :" -"exc:`SyntaxError` ایجاد می‌کند). برای اشیایی که نمایش خاصی برای مصرف انسان " +"exc:`SyntaxError` پرتاب می‌کند). برای اشیایی که نمایش خاصی برای مصرف انسان " "ندارند، :func:`str` همان مقدار :func:`repr` را بازمی‌گرداند. بسیاری از " -"مقادیر، مانند اعداد یا ساختارهایی مانند لیست‌ها و دیکشنری‌ها، با استفاده از هر " +"مقادیر، مانند اعداد یا ساختارهایی مانند فهرست‌ها و دیکشنری‌ها، با استفاده از هر " "دو تابع نمایش یکسانی دارند. به‌ویژه رشته‌ها، دو نمایش متمایز دارند." msgid "Some examples::" @@ -256,7 +256,7 @@ msgid "" "number of characters wide. This is useful for making columns line up. ::" msgstr "" "گذراندن یک عدد صحیح بعد از ``':'`` باعث می‌شود که آن فیلد حداقل به آن اندازه " -"کاراکتر عرض داشته باشد. این برای هم‌تراز کردن ستون‌ها مفید است. ::" +"نویسه عرض داشته باشد. این برای هم‌تراز کردن ستون‌ها مفید است. ::" msgid "" ">>> table = {'Sjoerd': 4127, 'Jack': 4098, 'Dcab': 7678}\n" @@ -333,7 +333,7 @@ msgid "" "brackets can be used to refer to the position of the object passed into the :" "meth:`str.format` method. ::" msgstr "" -"براکت‌ها و کاراکترهای داخل آن‌ها (که فیلدهای قالب نامیده می‌شوند) با اشیاء " +"براکت‌ها و نویسه‌های داخل آن‌ها (که فیلدهای قالب نامیده می‌شوند) با اشیاء " "ارسال‌شده به متد :meth:`str.format` جایگزین می‌شوند. از یک عدد درون براکت‌ها " "می‌توان برای اشاره به جایگاه شیء ارسال‌شده به متد :meth:`str.format` استفاده " "کرد. ::" @@ -619,7 +619,7 @@ msgid "" "assumed if it's omitted." msgstr "" "آرگومان اول رشته‌ای است که نام فایل را در بر دارد. آرگومان دوم رشته‌ی دیگری " -"است که شامل چند کاراکتر است و نحوه‌ی استفاده از فایل را توضیح می‌دهد. *mode* " +"است که شامل چند نویسه است و نحوه‌ی استفاده از فایل را توضیح می‌دهد. *mode* " "می‌تواند ``'r'`` باشد زمانی که فایل فقط خوانده می‌شود، ``'w'`` برای فقط نوشتن " "(یک فایل موجود با همان نام حذف خواهد شد)، و ``'a'`` فایل را برای افزودن " "(append) باز می‌کند؛ هر داده‌ای که در فایل نوشته شود به‌طور خودکار به انتهای آن " @@ -755,7 +755,7 @@ msgstr "" "bytes (در حالت دودویی) بازمی‌گرداند. *size* یک آرگومان عددی اختیاری است. " "وقتی *size* حذف شود یا منفی باشد، تمام محتویات فایل خوانده شده و بازگردانده " "می‌شود؛ اگر فایل دو برابر حافظه‌ی دستگاه شما باشد، این مشکل شماست. در غیر این " -"صورت، حداکثر *size* کاراکتر (در حالت متنی) یا *size* بایت (در حالت دودویی) " +"صورت، حداکثر *size* نویسه (در حالت متنی) یا *size* بایت (در حالت دودویی) " "خوانده و بازگردانده می‌شوند. اگر به انتهای فایل رسیده باشد، ``f.read()`` یک " "رشته‌ی خالی (``''``) بازمی‌گرداند. ::" @@ -824,14 +824,14 @@ msgid "" "If you want to read all the lines of a file in a list you can also use " "``list(f)`` or ``f.readlines()``." msgstr "" -"اگر می‌خواهید تمام خطوط یک فایل را در یک لیست بخوانید، می‌توانید از " +"اگر می‌خواهید تمام خطوط یک فایل را در یک فهرست بخوانید، می‌توانید از " "``list(f)`` یا ``f.readlines()`` نیز استفاده کنید." msgid "" "``f.write(string)`` writes the contents of *string* to the file, returning " "the number of characters written. ::" msgstr "" -"``f.write(string)`` محتویات *string* را در فایل می‌نویسد و تعداد کاراکترهای " +"``f.write(string)`` محتویات *string* را در فایل می‌نویسد و تعداد نویسه‌های " "نوشته‌شده را بازمی‌گرداند. ::" msgid "" @@ -946,7 +946,7 @@ msgstr "" "نیاز دارند، زیرا متد :meth:`~io.TextIOBase.read` فقط رشته‌ها را بازمی‌گرداند، " "که باید به تابعی مانند :func:`int` داده شوند، که یک رشته مانند ``'123'`` را " "گرفته و مقدار عددی آن، یعنی 123، را بازمی‌گرداند. وقتی می‌خواهید انواع داده‌ی " -"پیچیده‌تر مانند لیست‌های تو در تو و دیکشنری‌ها را ذخیره کنید، تجزیه و سریال‌سازی " +"پیچیده‌تر مانند فهرست‌های تو در تو و دیکشنری‌ها را ذخیره کنید، تجزیه و سریال‌سازی " "دستی پیچیده می‌شود." msgid "" @@ -1032,7 +1032,7 @@ msgid "" "effort. The reference for the :mod:`json` module contains an explanation of " "this." msgstr "" -"این تکنیک ساده‌ی سریال‌سازی می‌تواند لیست‌ها و دیکشنری‌ها را مدیریت کند، اما " +"این تکنیک ساده‌ی سریال‌سازی می‌تواند فهرست‌ها و دیکشنری‌ها را مدیریت کند، اما " "سریال‌سازی نمونه‌های دلخواه از کلاس‌ها در JSON نیازمند کمی تلاش اضافی است. مرجع " "ماژول :mod:`json` شامل توضیحاتی در مورد این موضوع است." diff --git a/tutorial/introduction.po b/tutorial/introduction.po index a84741831..00d9bc20c 100644 --- a/tutorial/introduction.po +++ b/tutorial/introduction.po @@ -534,8 +534,8 @@ msgid "" "index 0. There is no separate character type; a character is simply a string " "of size one::" msgstr "" -"رشته‌ها را می‌توان *نمایه‌گذاری* (زیرنویس‌گذاری) کرد؛ به‌طوری که اولین نویسه " -"دارای نمایهٔ 0 است. نوع جداگانه‌ای برای نویسه وجود ندارد؛ یک نویسه در واقع فقط " +"رشته‌ها را می‌توان *اندیس‌‌گذاری* (زیرنویس‌گذاری) کرد؛ به‌طوری که اولین نویسه " +"دارای اندیس‌ٔ 0 است. نوع جداگانه‌ای برای نویسه وجود ندارد؛ یک نویسه در واقع فقط " "رشته‌ای با اندازهٔ یک است::" msgid "" @@ -554,7 +554,7 @@ msgstr "" msgid "" "Indices may also be negative numbers, to start counting from the right::" msgstr "" -"نمایه‌ها همچنین می‌توانند اعداد منفی باشند تا شمارش از سمت راست آغاز شود::" +"اندیس‌‌ها همچنین می‌توانند اعداد منفی باشند تا شمارش از سمت راست آغاز شود::" msgid "" ">>> word[-1] # last character\n" @@ -572,14 +572,14 @@ msgstr "" "'P'" msgid "Note that since -0 is the same as 0, negative indices start from -1." -msgstr "توجه کنید که چون ‎-0 همان 0 است، نمایه‌های منفی از ‎-1 شروع می‌شوند." +msgstr "توجه کنید که چون ‎-0 همان 0 است، اندیس‌‌های منفی از ‎-1 شروع می‌شوند." msgid "" "In addition to indexing, *slicing* is also supported. While indexing is " "used to obtain individual characters, *slicing* allows you to obtain a " "substring::" msgstr "" -"علاوه بر نمایه‌گذاری، *برش‌دهی* نیز پشتیبانی می‌شود. در حالی که نمایه‌گذاری برای " +"علاوه بر اندیس‌‌گذاری، *برش‌دهی* نیز پشتیبانی می‌شود. در حالی که اندیس‌‌گذاری برای " "به‌دست آوردن نویسه‌های جداگانه استفاده می‌شود، *برش‌دهی* به شما اجازه می‌دهد یک " "زیررشته به‌دست آورید::" @@ -598,8 +598,8 @@ msgid "" "Slice indices have useful defaults; an omitted first index defaults to zero, " "an omitted second index defaults to the size of the string being sliced. ::" msgstr "" -"نمایه‌های برش مقدارهای پیش‌فرض مفیدی دارند؛ اگر نمایهٔ اول حذف شود، مقدار " -"پیش‌فرض آن صفر است و اگر نمایهٔ دوم حذف شود، مقدار پیش‌فرض آن اندازهٔ رشته‌ای است " +"اندیس‌‌های برش مقدارهای پیش‌فرض مفیدی دارند؛ اگر اندیس‌ٔ اول حذف شود، مقدار " +"پیش‌فرض آن صفر است و اگر اندیس‌ٔ دوم حذف شود، مقدار پیش‌فرض آن اندازهٔ رشته‌ای است " "که در حال برش خوردن است. ::" msgid "" @@ -641,9 +641,9 @@ msgid "" "Then the right edge of the last character of a string of *n* characters has " "index *n*, for example::" msgstr "" -"یک روش برای به خاطر سپردن نحوهٔ کار برش‌ها این است که تصور کنید نمایه‌ها به " +"یک روش برای به خاطر سپردن نحوهٔ کار برش‌ها این است که تصور کنید اندیس‌‌ها به " "*بین* نویسه‌ها اشاره می‌کنند، به‌طوری که لبهٔ سمت چپ اولین نویسه شمارهٔ 0 دارد. " -"سپس لبهٔ سمت راست آخرین نویسهٔ یک رشته با *n* نویسه، دارای نمایهٔ *n* است؛ برای " +"سپس لبهٔ سمت راست آخرین نویسهٔ یک رشته با *n* نویسه، دارای اندیس‌ٔ *n* است؛ برای " "مثال::" msgid "" @@ -665,8 +665,8 @@ msgid "" "from *i* to *j* consists of all characters between the edges labeled *i* and " "*j*, respectively." msgstr "" -"ردیف اول اعداد، موقعیت نمایه‌های 0...6 در رشته را نشان می‌دهد؛ ردیف دوم " -"نمایه‌های منفی متناظر را نشان می‌دهد. برش از *i* تا *j* شامل تمام نویسه‌هایی " +"ردیف اول اعداد، موقعیت اندیس‌‌های 0...6 در رشته را نشان می‌دهد؛ ردیف دوم " +"اندیس‌‌های منفی متناظر را نشان می‌دهد. برش از *i* تا *j* شامل تمام نویسه‌هایی " "است که بین لبه‌های مشخص‌شده با *i* و *j* قرار دارند." msgid "" @@ -674,12 +674,12 @@ msgid "" "indices, if both are within bounds. For example, the length of " "``word[1:3]`` is 2." msgstr "" -"برای نمایه‌های غیرمنفی، طول یک برش برابر با تفاوت بین نمایه‌ها است، به شرطی که " +"برای اندیس‌‌های غیرمنفی، طول یک برش برابر با تفاوت بین اندیس‌‌ها است، به شرطی که " "هر دو در محدوده باشند. برای مثال، طول ``word[1:3]`` برابر با 2 است." msgid "Attempting to use an index that is too large will result in an error::" msgstr "" -"تلاش برای استفاده از نمایه‌ای که بیش از حد بزرگ است، باعث ایجاد خطا خواهد شد::" +"تلاش برای استفاده از اندیس‌‌ای که بیش از حد بزرگ است، باعث ایجاد خطا خواهد شد::" msgid "" ">>> word[42] # the word only has 6 characters\n" @@ -696,7 +696,7 @@ msgid "" "However, out of range slice indexes are handled gracefully when used for " "slicing::" msgstr "" -"بااین‌حال، نمایه‌های برش خارج از محدوده هنگام استفاده برای برش‌دهی به‌صورت " +"بااین‌حال، اندیس‌‌های برش خارج از محدوده هنگام استفاده برای برش‌دهی به‌صورت " "مناسبی مدیریت می‌شوند::" msgid "" @@ -715,7 +715,7 @@ msgid "" "assigning to an indexed position in the string results in an error::" msgstr "" "رشته‌های پایتون قابل تغییر نیستند --- آن‌ها :term:`immutable` هستند. بنابراین، " -"اختصاص دادن مقدار به یک موقعیت نمایه‌گذاری‌شده در رشته باعث ایجاد خطا می‌شود::" +"اختصاص دادن مقدار به یک موقعیت اندیس‌‌گذاری‌شده در رشته باعث ایجاد خطا می‌شود::" msgid "" ">>> word[0] = 'J'\n" @@ -803,7 +803,7 @@ msgstr "" "``%`` باشند، در اینجا با جزئیات بیشتری توضیح داده شده‌اند." msgid "Lists" -msgstr "لیست‌ها" +msgstr "فهرست‌ها" msgid "" "Python knows a number of *compound* data types, used to group together other " @@ -831,7 +831,7 @@ msgid "" "indexed and sliced::" msgstr "" "مانند رشته‌ها (و تمام نوع‌های داخلی دیگر :term:`sequence`)، فهرست‌ها را می‌توان " -"نمایه‌گذاری و برش داد::" +"اندیس‌‌گذاری و برش داد::" msgid "" ">>> squares[0] # indexing returns the item\n" @@ -845,7 +845,7 @@ msgstr "" "1\n" ">>> squares[-1]\n" "25\n" -">>> squares[-3:] # برش‌زدن، یک لیست جدید برمی‌گرداند\n" +">>> squares[-3:] # برش‌زدن، یک فهرست جدید برمی‌گرداند\n" "[9, 16, 25]" msgid "Lists also support operations like concatenation::" @@ -984,7 +984,7 @@ msgstr "" ">>> letters[2:5] = []\n" ">>> letters\n" "['a', 'b', 'f', 'g']\n" -">>> # خالی کردن لیست با جایگزین کردن همهٔ عناصر آن با یک لیست خالی\n" +">>> # خالی کردن فهرست با جایگزین کردن همهٔ عناصر آن با یک فهرست خالی\n" ">>> letters[:] = []\n" ">>> letters\n" "[]" @@ -1155,7 +1155,7 @@ msgid "" "The keyword argument *end* can be used to avoid the newline after the " "output, or end the output with a different string::" msgstr "" -"آرگومان کلیدی *end* می‌تواند برای جلوگیری از ایجاد خط جدید پس از خروجی، یا " +"آرگومان کلیدواژه‌ای *end* می‌تواند برای جلوگیری از ایجاد خط جدید پس از خروجی، یا " "پایان دادن خروجی با یک رشتهٔ متفاوت استفاده شود::" msgid "" diff --git a/tutorial/modules.po b/tutorial/modules.po index 3a887dee5..aa01ecc0f 100644 --- a/tutorial/modules.po +++ b/tutorial/modules.po @@ -961,7 +961,7 @@ msgstr "" "تعریف شده است، مانند یک تابع، کلاس یا متغیر. دستور ``import`` ابتدا بررسی " "می‌کند که آیا item در بسته تعریف شده است یا خیر؛ اگر تعریف نشده باشد، فرض " "می‌کند که یک ماژول است و تلاش می‌کند آن را بارگذاری کند. اگر نتواند آن را پیدا " -"کند، یک استثنای :exc:`ImportError` ایجاد می‌شود." +"کند، یک استثنای :exc:`ImportError` پرتاب می‌شود." msgid "" "Contrarily, when using syntax like ``import item.subitem.subsubitem``, each " @@ -987,7 +987,7 @@ msgstr "" "حالت ایده‌آل، انتظار می‌رود این دستور به‌نحوی به سیستم فایل مراجعه کند، " "زیرماژول‌های موجود در بسته را پیدا کند و همهٔ آن‌ها را وارد کند. این کار " "می‌تواند زمان زیادی طول بکشد و وارد کردن زیرماژول‌ها ممکن است عوارض جانبی " -"ناخواسته‌ای ایجاد کند که باید فقط هنگام وارد کردن صریح زیرماژول رخ دهند." +"ناخواسته‌ای پرتاب کند که باید فقط هنگام وارد کردن صریح زیرماژول رخ دهند." msgid "" "The only solution is for the package author to provide an explicit index of " diff --git a/tutorial/stdlib2.po b/tutorial/stdlib2.po index 1933db827..9ce6b56f2 100644 --- a/tutorial/stdlib2.po +++ b/tutorial/stdlib2.po @@ -196,7 +196,7 @@ msgid "" "it will leave placeholders unchanged if data is missing::" msgstr "" "متد :meth:`~string.Template.substitute` اگر جای‌نگهداری در دیکشنری یا " -"آرگومان‌های کلیدی مقداردهی نشده باشد، استثنای :exc:`KeyError` ایجاد می‌کند. در " +"آرگومان‌های کلیدواژه‌ای مقداردهی نشده باشد، استثنای :exc:`KeyError` پرتاب می‌کند. در " "برنامه‌هایی مانند ادغام نامه‌ها (mail merge) که ممکن است داده‌های واردشده توسط " "کاربر ناقص باشند، استفاده از متد :meth:`~string.Template.safe_substitute` " "مناسب‌تر است؛ زیرا در صورت نبود داده، جای‌نگهدارها را بدون تغییر باقی می‌گذارد::" diff --git a/tutorial/venv.po b/tutorial/venv.po index d34a7c406..cc9f7b0c0 100644 --- a/tutorial/venv.po +++ b/tutorial/venv.po @@ -61,7 +61,7 @@ msgid "" "particular version of Python, plus a number of additional packages." msgstr "" "راه‌حل این مشکل، ایجاد یک :term:`محیط مجازی ` است؛ یک " -"ساختار دایرکتوری مستقل که شامل یک نصب از پایتون برای نسخه‌ای مشخص از پایتون، " +"ساختار پوشه مستقل که شامل یک نصب از پایتون برای نسخه‌ای مشخص از پایتون، " "به‌همراه تعدادی بستهٔ اضافی است." msgid "" @@ -97,8 +97,8 @@ msgid "" "place it, and run the :mod:`venv` module as a script with the directory " "path::" msgstr "" -"برای ایجاد یک محیط مجازی، ابتدا دایرکتوری موردنظر خود را انتخاب کنید و سپس " -"ماژول :mod:`venv` را به‌صورت یک اسکریپت همراه با مسیر آن دایرکتوری اجرا کنید::" +"برای ایجاد یک محیط مجازی، ابتدا پوشه موردنظر خود را انتخاب کنید و سپس " +"ماژول :mod:`venv` را به‌صورت یک اسکریپت همراه با مسیر آن پوشه اجرا کنید::" msgid "python -m venv tutorial-env" msgstr "python -m venv tutorial-env" @@ -108,8 +108,8 @@ msgid "" "also create directories inside it containing a copy of the Python " "interpreter and various supporting files." msgstr "" -"اگر دایرکتوری ``tutorial-env`` وجود نداشته باشد، این دستور آن را ایجاد می‌کند " -"و همچنین درون آن دایرکتوری‌هایی شامل یک نسخه از مفسر پایتون و فایل‌های پشتیبان " +"اگر پوشه ``tutorial-env`` وجود نداشته باشد، این دستور آن را ایجاد می‌کند " +"و همچنین درون آن پوشه‌هایی شامل یک نسخه از مفسر پایتون و فایل‌های پشتیبان " "موردنیاز را می‌سازد." msgid "" @@ -119,8 +119,8 @@ msgid "" "prevents clashing with ``.env`` environment variable definition files that " "some tooling supports." msgstr "" -"یکی از محل‌های رایج برای ایجاد محیط مجازی، دایرکتوری ``.venv`` است. این نام " -"معمولاً باعث می‌شود دایرکتوری در شل مخفی بماند و در عین حال به‌خوبی نشان دهد که " +"یکی از محل‌های رایج برای ایجاد محیط مجازی، پوشه ``.venv`` است. این نام " +"معمولاً باعث می‌شود پوشه در شل مخفی بماند و در عین حال به‌خوبی نشان دهد که " "دلیل وجود آن چیست. همچنین از تداخل با فایل‌های تعریف متغیرهای محیطی ``.env`` " "که برخی ابزارها از آن‌ها پشتیبانی می‌کنند، جلوگیری می‌کند." diff --git a/tutorial/whatnow.po b/tutorial/whatnow.po index e79d14782..c3ca52bd9 100644 --- a/tutorial/whatnow.po +++ b/tutorial/whatnow.po @@ -97,7 +97,7 @@ msgid "" "available for download. Once you begin releasing code, you can register it " "here so that others can find it." msgstr "" -"https://pypi.org: نمایهٔ بسته‌های پایتون (Python Package Index) که پیش‌تر با " +"https://pypi.org: اندیس‌ٔ بسته‌های پایتون (Python Package Index) که پیش‌تر با " "نام مستعار Cheese Shop [#]_ نیز شناخته می‌شد، فهرستی از ماژول‌های پایتونِ " "ایجادشده توسط کاربران است که برای دانلود در دسترس هستند. هنگامی که انتشار " "کدهای خود را آغاز کردید، می‌توانید آن‌ها را در اینجا ثبت کنید تا دیگران "