44# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55#
66# Translators:
7- # Dmitry Luschan, 2026
87# python-doc bot, 2026
8+ # Dmitry Luschan, 2026
99# Rafael Fontenelle <rffontenelle@gmail.com>, 2026
1010#
1111#, fuzzy
1212msgid ""
1313msgstr ""
1414"Project-Id-Version : Python 3.15\n "
1515"Report-Msgid-Bugs-To : \n "
16- "POT-Creation-Date : 2026-10-03 17:41 +0000\n "
16+ "POT-Creation-Date : 2026-10-13 19:59 +0000\n "
1717"PO-Revision-Date : 2026-09-13 17:09+0000\n "
1818"Last-Translator : Rafael Fontenelle <rffontenelle@gmail.com>, 2026\n "
1919"Language-Team : Russian (https://app.transifex.com/python-doc/teams/5390/ "
@@ -1050,7 +1050,7 @@ msgid ""
10501050"using :func:`int` instead."
10511051msgstr ""
10521052
1053- msgid "Iterator Types "
1053+ msgid "Iteration-related types "
10541054msgstr ""
10551055
10561056msgid ""
@@ -1060,6 +1060,9 @@ msgid ""
10601060"support the iteration methods."
10611061msgstr ""
10621062
1063+ msgid "Iterables"
1064+ msgstr ""
1065+
10631066msgid ""
10641067"One method needs to be defined for container objects to provide :term:"
10651068"`iterable` support:"
@@ -1076,6 +1079,9 @@ msgid ""
10761079"in the Python/C API."
10771080msgstr ""
10781081
1082+ msgid "Iterators"
1083+ msgstr ""
1084+
10791085msgid ""
10801086"The iterator objects themselves are required to support the following two "
10811087"methods, which together form the :dfn:`iterator protocol`:"
@@ -1108,17 +1114,298 @@ msgid ""
11081114"Implementations that do not obey this property are deemed broken."
11091115msgstr ""
11101116
1111- msgid "Generator Types"
1117+ msgid "Generator types"
1118+ msgstr ""
1119+
1120+ msgid ""
1121+ "Python's :term:`generators <generator>` -- or more precisely, :term:"
1122+ "`generator functions <generator function>` and :term:`generator iterators "
1123+ "<generator iterator>` -- provide a convenient way to implement the iterator "
1124+ "protocol."
1125+ msgstr ""
1126+
1127+ msgid ""
1128+ "A function that contains one or more :ref:`yield expressions <yieldexpr>` is "
1129+ "a :term:`generator function`. For example::"
1130+ msgstr ""
1131+
1132+ msgid ""
1133+ ">>> def count_to_three():\n"
1134+ "... yield 0\n"
1135+ "... yield 1\n"
1136+ "... yield 2\n"
1137+ "... yield 3"
1138+ msgstr ""
1139+
1140+ msgid ""
1141+ "Generator functions behave as regular :ref:`user-defined functions <user-"
1142+ "defined-funcs>` (for example, they have the same attributes), except that "
1143+ "calling a generator function returns a :ref:`generator iterator <generator-"
1144+ "methods>`::"
1145+ msgstr ""
1146+
1147+ msgid ""
1148+ ">>> count_to_three()\n"
1149+ "<generator object count_to_three at 0x7f33a2305000>"
1150+ msgstr ""
1151+
1152+ msgid ""
1153+ "Iterating a generator iterator executes code of the underlying generator "
1154+ "function, producing each :keyword:`yield`\\ ed value in turn::"
1155+ msgstr ""
1156+
1157+ msgid ""
1158+ ">>> for number in count_to_three():\n"
1159+ "... print(number)\n"
1160+ "0\n"
1161+ "1\n"
1162+ "2\n"
1163+ "3\n"
1164+ "\n"
1165+ ">>> list(count_to_three())\n"
1166+ "[0, 1, 2, 3]"
1167+ msgstr ""
1168+
1169+ msgid ""
1170+ "One common use for generator functions is implementing the :meth:`~object."
1171+ "__iter__` method of custom iterable objects. For example::"
1172+ msgstr ""
1173+
1174+ msgid ""
1175+ ">>> class CardDeck:\n"
1176+ "... def __iter__(self):\n"
1177+ "... yield 'three of clubs'\n"
1178+ "... yield 'ace of hearts'\n"
1179+ "\n"
1180+ ">>> list(CardDeck())\n"
1181+ "['three of clubs', 'ace of hearts']"
1182+ msgstr ""
1183+
1184+ msgid "Generator iterators"
1185+ msgstr ""
1186+
1187+ msgid ""
1188+ "Generator iterators implement the :ref:`iterator protocol <stdtypes-"
1189+ "iterators>`. Iterating them drives execution of the underlying generator "
1190+ "function."
1191+ msgstr ""
1192+
1193+ msgid ""
1194+ "Starts the execution of a generator function or resumes it at the :ref:"
1195+ "`yield expression <yieldexpr>` where the function is currently suspended. "
1196+ "When a generator function is resumed with a :meth:`~generator.__next__` "
1197+ "method, the current yield expression always evaluates to :const:`None`. The "
1198+ "execution then continues to the next yield expression, where the generator "
1199+ "is suspended again, and the value of the expression after the :keyword:"
1200+ "`yield` keyword is returned to :meth:`~generator.__next__`'s caller. If the "
1201+ "generator exits without yielding another value, :meth:`~generator.__next__` "
1202+ "raises a :exc:`StopIteration` exception, signalling that iteration has "
1203+ "completed."
1204+ msgstr ""
1205+
1206+ msgid ""
1207+ "This method is normally called implicitly, for example by a :keyword:`for` "
1208+ "loop, or by the built-in :func:`next` function."
1209+ msgstr ""
1210+
1211+ msgid ""
1212+ "Generator iterators have a few more methods than generic iterators, which "
1213+ "can be used to control the execution of the underlying generator function:"
1214+ msgstr ""
1215+
1216+ msgid ""
1217+ "\" Sends\" a value into the generator function: the *value* argument becomes "
1218+ "the result of the current yield expression."
1219+ msgstr ""
1220+
1221+ msgid ""
1222+ "Otherwise, this method behaves like :meth:`~generator.__next__`: it resumes "
1223+ "the underlying function and either returns the next yielded value or raises :"
1224+ "exc:`StopIteration`."
1225+ msgstr ""
1226+
1227+ msgid ""
1228+ "When :meth:`send` is called to start the generator, it must be called with :"
1229+ "const:`None` as the argument, because there is no current yield expression "
1230+ "that could receive the value."
1231+ msgstr ""
1232+
1233+ msgid ""
1234+ "Raises an exception at the point where the generator is currently suspended."
1235+ msgstr ""
1236+
1237+ msgid ""
1238+ "Otherwise, this method behaves like :meth:`~generator.__next__`: it resumes "
1239+ "the underlying function and either returns the next yielded value or raises :"
1240+ "exc:`StopIteration`. If the generator function does not catch the passed-in "
1241+ "exception, or raises a different exception, then that exception propagates "
1242+ "to the caller."
1243+ msgstr ""
1244+
1245+ msgid ""
1246+ "When :meth:`throw` is called to start the generator, the generator "
1247+ "immediately exits (that is, subsequent calls to :meth:`~generator.__next__` "
1248+ "will raise :exc:`StopIteration`) and the thrown exception is propagated to :"
1249+ "meth:`throw`'s caller."
1250+ msgstr ""
1251+
1252+ msgid ""
1253+ "In typical use, this is called with a single argument, an exception "
1254+ "instance, similar to the way the :keyword:`raise` keyword is used."
1255+ msgstr ""
1256+
1257+ msgid ""
1258+ "For backwards compatibility, however, the second signature is supported, "
1259+ "following a convention from older versions of Python. The *type* argument "
1260+ "should be an exception class, and *value* should be an exception instance. "
1261+ "If the *value* is not provided, the *type* constructor is called to get an "
1262+ "instance. If *traceback* is provided, it is set on the exception, otherwise "
1263+ "any existing :attr:`~BaseException.__traceback__` attribute stored in "
1264+ "*value* may be cleared."
1265+ msgstr ""
1266+
1267+ msgid ""
1268+ "The second signature \\ (type\\ [, value\\ [, traceback\\ ]\\ ]\\ ) is deprecated "
1269+ "and may be removed in a future version of Python."
1270+ msgstr ""
1271+
1272+ msgid ""
1273+ "Raises a :exc:`GeneratorExit` exception at the point where the generator "
1274+ "function is currently suspended (equivalent to calling "
1275+ "``throw(GeneratorExit)``)."
1276+ msgstr ""
1277+
1278+ msgid ""
1279+ "If the generator function has already exited (due to an exception or normal "
1280+ "return), or raises :exc:`GeneratorExit` (by not catching the exception), :"
1281+ "meth:`close` returns :const:`None`. If the generator yields a value, a :exc:"
1282+ "`RuntimeError` is raised. If the generator raises any other exception, it is "
1283+ "propagated to the caller. If a generator returns a value upon being closed, "
1284+ "that value is returned by :meth:`close`."
1285+ msgstr ""
1286+
1287+ msgid ""
1288+ "When a generator iterator is garbage collected before it has exited, :meth:"
1289+ "`~generator.close` is called automatically."
1290+ msgstr ""
1291+
1292+ msgid ""
1293+ "If a generator returns a value upon being closed, the value is returned by :"
1294+ "meth:`close`. Previously, it returned ``None``."
1295+ msgstr ""
1296+
1297+ msgid ""
1298+ "Calling any of the generator methods (:meth:`~generator.__next__`, :meth:"
1299+ "`~generator.send`, :meth:`~generator.throw`, :meth:`~generator.close`) while "
1300+ "one of these methods is already executing raises a :exc:`ValueError` "
1301+ "exception."
1302+ msgstr ""
1303+
1304+ msgid "Asynchronous generator iterators"
1305+ msgstr ""
1306+
1307+ msgid ""
1308+ "This subsection describes the methods of an asynchronous generator iterator, "
1309+ "which are used to control the execution of an asynchronous generator "
1310+ "function."
1311+ msgstr ""
1312+
1313+ msgid ""
1314+ "Returns an :term:`awaitable` which when run starts to execute the "
1315+ "asynchronous generator function or resumes it at the :ref:`yield expression "
1316+ "<yieldexpr>` where the function is currently suspended. When an asynchronous "
1317+ "generator function is resumed with an :meth:`~agen.__anext__` method, the "
1318+ "current yield expression always evaluates to :const:`None` in the returned "
1319+ "awaitable, which when run will continue to the next yield expression. The "
1320+ "value of the expression after the :keyword:`yield` keyword is the value of "
1321+ "the :exc:`StopIteration` exception raised by the completing coroutine. If "
1322+ "the asynchronous generator exits without yielding another value, the "
1323+ "awaitable instead raises a :exc:`StopAsyncIteration` exception, signalling "
1324+ "that the asynchronous iteration has completed."
1325+ msgstr ""
1326+
1327+ msgid ""
1328+ "This method is normally called implicitly by an :keyword:`async for` loop, "
1329+ "or by the built-in :func:`anext` function."
1330+ msgstr ""
1331+
1332+ msgid ""
1333+ "Asynchronous generator-iterators have a few more methods than generic "
1334+ "asynchronous iterators, which can be used to control the execution of the "
1335+ "underlying generator function:"
1336+ msgstr ""
1337+
1338+ msgid ""
1339+ "Returns an awaitable which, when run, \" sends\" a value into the underlying "
1340+ "asynchronous generator function: the *value* argument becomes the result of "
1341+ "the current yield expression."
1342+ msgstr ""
1343+
1344+ msgid ""
1345+ "Otherwise, this method behaves like :meth:`~agen.__anext__`: when the "
1346+ "returned awaitable runs, it resumes the underlying function and either "
1347+ "returns the next yielded value as the value of the raised :exc:"
1348+ "`StopIteration`, or raises :exc:`StopAsyncIteration`."
1349+ msgstr ""
1350+
1351+ msgid ""
1352+ "When :meth:`asend` is called to start the asynchronous generator, it must be "
1353+ "called with :const:`None` as the argument, because there is no yield "
1354+ "expression that could receive the value."
1355+ msgstr ""
1356+
1357+ msgid ""
1358+ "Returns an awaitable that, when run, raises an exception at the point where "
1359+ "the underlying asynchronous generator function is currently suspended."
1360+ msgstr ""
1361+
1362+ msgid ""
1363+ "Otherwise, this method behaves like :meth:`~agen.__anext__`: when the "
1364+ "returned awaitable runs, it resumes the underlying function (with an "
1365+ "exception raised) and either returns the next yielded value as the value of "
1366+ "the raised :exc:`StopIteration`, or raises :exc:`StopAsyncIteration`. If the "
1367+ "underlying function does not catch the passed-in exception, or raises a "
1368+ "different exception, then when the awaitable is run, that exception "
1369+ "propagates to the caller of the awaitable."
1370+ msgstr ""
1371+
1372+ msgid ""
1373+ "When :meth:`~agen.athrow` is called to start the generator, the generator "
1374+ "exits when the awaitable runs (that is, subsequent results from :meth:`~agen."
1375+ "__anext__` will raise :exc:`StopAsyncIteration` when run) and the thrown "
1376+ "exception is propagated to the awaitable's caller."
1377+ msgstr ""
1378+
1379+ msgid ""
1380+ "For backwards compatibility, however, the second signature is supported. An "
1381+ "exception instance is created from three arguments in the same way as in :"
1382+ "meth:`generator.throw`."
1383+ msgstr ""
1384+
1385+ msgid ""
1386+ "Returns an awaitable that when run will throw a :exc:`GeneratorExit` into "
1387+ "the underlying asynchronous generator function at the point where it is "
1388+ "currently suspended (equivalent to calling ``athrow(GeneratorExit)``)."
1389+ msgstr ""
1390+
1391+ msgid ""
1392+ "If the asynchronous generator function then exits gracefully, is already "
1393+ "closed, or raises :exc:`GeneratorExit` (by not catching the exception), then "
1394+ "the returned awaitable will raise a :exc:`StopIteration` exception. Any "
1395+ "further awaitables returned by subsequent calls to the asynchronous "
1396+ "generator will raise a :exc:`StopAsyncIteration` exception."
1397+ msgstr ""
1398+
1399+ msgid ""
1400+ "If the asynchronous generator yields a value, a :exc:`RuntimeError` is "
1401+ "raised by the awaitable. If the asynchronous generator raises any other "
1402+ "exception, that exception is propagated to the caller of the awaitable."
11121403msgstr ""
11131404
11141405msgid ""
1115- "Python's :term:`generator`\\ s provide a convenient way to implement the "
1116- "iterator protocol. If a container object's :meth:`~object.__iter__` method "
1117- "is implemented as a generator, it will automatically return an iterator "
1118- "object (technically, a generator object) supplying the :meth:`~iterator."
1119- "__iter__` and :meth:`~generator.__next__` methods. More information about "
1120- "generators can be found in :ref:`the documentation for the yield expression "
1121- "<yieldexpr>`."
1406+ "If the asynchronous generator has already exited due to an exception or "
1407+ "normal exit, then further calls to :meth:`aclose` will return an awaitable "
1408+ "that does nothing."
11221409msgstr ""
11231410
11241411msgid "Sequence Types --- :class:`list`, :class:`tuple`, :class:`range`"
@@ -7601,6 +7888,24 @@ msgstr ""
76017888msgid "iteration over"
76027889msgstr ""
76037890
7891+ msgid "generator"
7892+ msgstr ""
7893+
7894+ msgid "exception"
7895+ msgstr ""
7896+
7897+ msgid "StopIteration"
7898+ msgstr ""
7899+
7900+ msgid "GeneratorExit"
7901+ msgstr ""
7902+
7903+ msgid "asynchronous-generator"
7904+ msgstr ""
7905+
7906+ msgid "StopAsyncIteration"
7907+ msgstr ""
7908+
76047909msgid "len"
76057910msgstr ""
76067911
0 commit comments