@@ -13,12 +13,12 @@ msgstr ""
1313"POT-Creation-Date : 2026-02-26 18:44-0300\n "
1414"PO-Revision-Date : 2023-10-16 19:31-0300\n "
1515"Last-Translator : Carlos A. Crespo <lvccrespo@gmail.com>\n "
16- "Language : es\n "
1716"Language-Team : python-doc-es\n "
18- "Plural-Forms : nplurals=2; plural=(n != 1); \n "
17+ "Language : es \n "
1918"MIME-Version : 1.0\n "
2019"Content-Type : text/plain; charset=utf-8\n "
2120"Content-Transfer-Encoding : 8bit\n "
21+ "Plural-Forms : nplurals=2; plural=(n != 1);\n "
2222"Generated-By : Babel 2.18.0\n "
2323
2424#: ../Doc/tutorial/classes.rst:5
@@ -427,6 +427,28 @@ msgid ""
427427"scope_test()\n"
428428"print(\" In global scope:\" , spam)"
429429msgstr ""
430+ "def scope_test():\n"
431+ " def do_local():\n"
432+ " spam = \" local spam\" \n"
433+ "\n"
434+ " def do_nonlocal():\n"
435+ " nonlocal spam\n"
436+ " spam = \" nonlocal spam\" \n"
437+ "\n"
438+ " def do_global():\n"
439+ " global spam\n"
440+ " spam = \" global spam\" \n"
441+ "\n"
442+ " spam = \" test spam\" \n"
443+ " do_local()\n"
444+ " print(\" After local assignment:\" , spam)\n"
445+ " do_nonlocal()\n"
446+ " print(\" After nonlocal assignment:\" , spam)\n"
447+ " do_global()\n"
448+ " print(\" After global assignment:\" , spam)\n"
449+ "\n"
450+ "scope_test()\n"
451+ "print(\" In global scope:\" , spam)"
430452
431453#: ../Doc/tutorial/classes.rst:191
432454msgid "The output of the example code is:"
@@ -439,6 +461,10 @@ msgid ""
439461"After global assignment: nonlocal spam\n"
440462"In global scope: global spam"
441463msgstr ""
464+ "After local assignment: test spam\n"
465+ "After nonlocal assignment: nonlocal spam\n"
466+ "After global assignment: nonlocal spam\n"
467+ "In global scope: global spam"
442468
443469#: ../Doc/tutorial/classes.rst:200
444470msgid ""
@@ -489,6 +515,12 @@ msgid ""
489515" .\n"
490516" <statement-N>"
491517msgstr ""
518+ "class ClassName:\n"
519+ " <statement-1>\n"
520+ " .\n"
521+ " .\n"
522+ " .\n"
523+ " <statement-N>"
492524
493525#: ../Doc/tutorial/classes.rst:232
494526msgid ""
@@ -583,6 +615,12 @@ msgid ""
583615" def f(self):\n"
584616" return 'hello world'"
585617msgstr ""
618+ "class MyClass:\n"
619+ " \"\"\" A simple example class\"\"\" \n"
620+ " i = 12345\n"
621+ "\n"
622+ " def f(self):\n"
623+ " return 'hello world'"
586624
587625#: ../Doc/tutorial/classes.rst:276
588626msgid ""
@@ -611,7 +649,7 @@ msgstr ""
611649
612650#: ../Doc/tutorial/classes.rst:286 ../Doc/tutorial/classes.rst:303
613651msgid "x = MyClass()"
614- msgstr ""
652+ msgstr "x = MyClass() "
615653
616654#: ../Doc/tutorial/classes.rst:288
617655msgid ""
@@ -638,6 +676,8 @@ msgid ""
638676"def __init__(self):\n"
639677" self.data = []"
640678msgstr ""
679+ "def __init__(self):\n"
680+ " self.data = []"
641681
642682#: ../Doc/tutorial/classes.rst:299
643683msgid ""
@@ -673,6 +713,14 @@ msgid ""
673713">>> x.r, x.i\n"
674714"(3.0, -4.5)"
675715msgstr ""
716+ ">>> class Complex:\n"
717+ "... def __init__(self, realpart, imagpart):\n"
718+ "... self.r = realpart\n"
719+ "... self.i = imagpart\n"
720+ "...\n"
721+ ">>> x = Complex(3.0, -4.5)\n"
722+ ">>> x.r, x.i\n"
723+ "(3.0, -4.5)"
676724
677725#: ../Doc/tutorial/classes.rst:322
678726msgid "Instance Objects"
@@ -712,6 +760,11 @@ msgid ""
712760"print(x.counter)\n"
713761"del x.counter"
714762msgstr ""
763+ "x.counter = 1\n"
764+ "while x.counter < 10:\n"
765+ " x.counter = x.counter * 2\n"
766+ "print(x.counter)\n"
767+ "del x.counter"
715768
716769#: ../Doc/tutorial/classes.rst:340
717770msgid ""
@@ -748,7 +801,7 @@ msgstr "Generalmente, un método es llamado luego de ser vinculado::"
748801
749802#: ../Doc/tutorial/classes.rst:360
750803msgid "x.f()"
751- msgstr ""
804+ msgstr "x.f() "
752805
753806#: ../Doc/tutorial/classes.rst:362
754807msgid ""
@@ -768,6 +821,9 @@ msgid ""
768821"while True:\n"
769822" print(xf())"
770823msgstr ""
824+ "xf = x.f\n"
825+ "while True:\n"
826+ " print(xf())"
771827
772828#: ../Doc/tutorial/classes.rst:370
773829msgid "will continue to print ``hello world`` until the end of time."
@@ -1000,6 +1056,17 @@ msgid ""
10001056">>> print(w2.purpose, w2.region)\n"
10011057"storage east"
10021058msgstr ""
1059+ ">>> class Warehouse:\n"
1060+ "... purpose = 'storage'\n"
1061+ "... region = 'west'\n"
1062+ "...\n"
1063+ ">>> w1 = Warehouse()\n"
1064+ ">>> print(w1.purpose, w1.region)\n"
1065+ "storage west\n"
1066+ ">>> w2 = Warehouse()\n"
1067+ ">>> w2.region = 'east'\n"
1068+ ">>> print(w2.purpose, w2.region)\n"
1069+ "storage east"
10031070
10041071#: ../Doc/tutorial/classes.rst:488
10051072msgid ""
@@ -1135,6 +1202,16 @@ msgid ""
11351202" self.add(x)\n"
11361203" self.add(x)"
11371204msgstr ""
1205+ "class Bag:\n"
1206+ " def __init__(self):\n"
1207+ " self.data = []\n"
1208+ "\n"
1209+ " def add(self, x):\n"
1210+ " self.data.append(x)\n"
1211+ "\n"
1212+ " def addtwice(self, x):\n"
1213+ " self.add(x)\n"
1214+ " self.add(x)"
11381215
11391216#: ../Doc/tutorial/classes.rst:549
11401217msgid ""
@@ -1190,6 +1267,12 @@ msgid ""
11901267" .\n"
11911268" <statement-N>"
11921269msgstr ""
1270+ "class DerivedClassName(BaseClassName):\n"
1271+ " <statement-1>\n"
1272+ " .\n"
1273+ " .\n"
1274+ " .\n"
1275+ " <statement-N>"
11931276
11941277#: ../Doc/tutorial/classes.rst:579
11951278msgid ""
@@ -1205,7 +1288,7 @@ msgstr ""
12051288
12061289#: ../Doc/tutorial/classes.rst:585
12071290msgid "class DerivedClassName(modname.BaseClassName):"
1208- msgstr ""
1291+ msgstr "class DerivedClassName(modname.BaseClassName): "
12091292
12101293#: ../Doc/tutorial/classes.rst:587
12111294msgid ""
@@ -1317,6 +1400,12 @@ msgid ""
13171400" .\n"
13181401" <statement-N>"
13191402msgstr ""
1403+ "class DerivedClassName(Base1, Base2, Base3):\n"
1404+ " <statement-1>\n"
1405+ " .\n"
1406+ " .\n"
1407+ " .\n"
1408+ " <statement-N>"
13201409
13211410#: ../Doc/tutorial/classes.rst:640
13221411msgid ""
@@ -1544,6 +1633,13 @@ msgid ""
15441633" dept: str\n"
15451634" salary: int"
15461635msgstr ""
1636+ "from dataclasses import dataclass\n"
1637+ "\n"
1638+ "@dataclass\n"
1639+ "class Employee:\n"
1640+ " name: str\n"
1641+ " dept: str\n"
1642+ " salary: int"
15471643
15481644#: ../Doc/tutorial/classes.rst:754
15491645msgid ""
@@ -1553,6 +1649,11 @@ msgid ""
15531649">>> john.salary\n"
15541650"1000"
15551651msgstr ""
1652+ ">>> john = Employee('john', 'computer lab', 1000)\n"
1653+ ">>> john.dept\n"
1654+ "'computer lab'\n"
1655+ ">>> john.salary\n"
1656+ "1000"
15561657
15571658#: ../Doc/tutorial/classes.rst:760
15581659msgid ""
@@ -1609,6 +1710,16 @@ msgid ""
16091710"for line in open(\" myfile.txt\" ):\n"
16101711" print(line, end='')"
16111712msgstr ""
1713+ "for element in [1, 2, 3]:\n"
1714+ " print(element)\n"
1715+ "for element in (1, 2, 3):\n"
1716+ " print(element)\n"
1717+ "for key in {'one':1, 'two':2}:\n"
1718+ " print(key)\n"
1719+ "for char in \" 123\" :\n"
1720+ " print(char)\n"
1721+ "for line in open(\" myfile.txt\" ):\n"
1722+ " print(line, end='')"
16121723
16131724#: ../Doc/tutorial/classes.rst:798
16141725msgid ""
@@ -1651,6 +1762,21 @@ msgid ""
16511762" next(it)\n"
16521763"StopIteration"
16531764msgstr ""
1765+ ">>> s = 'abc'\n"
1766+ ">>> it = iter(s)\n"
1767+ ">>> it\n"
1768+ "<str_iterator object at 0x10c90e650>\n"
1769+ ">>> next(it)\n"
1770+ "'a'\n"
1771+ ">>> next(it)\n"
1772+ "'b'\n"
1773+ ">>> next(it)\n"
1774+ "'c'\n"
1775+ ">>> next(it)\n"
1776+ "Traceback (most recent call last):\n"
1777+ " File \" <stdin>\" , line 1, in <module>\n"
1778+ " next(it)\n"
1779+ "StopIteration"
16541780
16551781#: ../Doc/tutorial/classes.rst:823
16561782msgid ""
@@ -1711,6 +1837,16 @@ msgid ""
17111837"p\n"
17121838"s"
17131839msgstr ""
1840+ ">>> rev = Reverse('spam')\n"
1841+ ">>> iter(rev)\n"
1842+ "<__main__.Reverse object at 0x00A1DB50>\n"
1843+ ">>> for char in rev:\n"
1844+ "... print(char)\n"
1845+ "...\n"
1846+ "m\n"
1847+ "a\n"
1848+ "p\n"
1849+ "s"
17141850
17151851#: ../Doc/tutorial/classes.rst:860
17161852msgid "Generators"
@@ -1738,6 +1874,9 @@ msgid ""
17381874" for index in range(len(data)-1, -1, -1):\n"
17391875" yield data[index]"
17401876msgstr ""
1877+ "def reverse(data):\n"
1878+ " for index in range(len(data)-1, -1, -1):\n"
1879+ " yield data[index]"
17411880
17421881#: ../Doc/tutorial/classes.rst:875
17431882msgid ""
@@ -1749,6 +1888,13 @@ msgid ""
17491888"o\n"
17501889"g"
17511890msgstr ""
1891+ ">>> for char in reverse('golf'):\n"
1892+ "... print(char)\n"
1893+ "...\n"
1894+ "f\n"
1895+ "l\n"
1896+ "o\n"
1897+ "g"
17521898
17531899#: ../Doc/tutorial/classes.rst:883
17541900msgid ""
0 commit comments