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