@@ -11,7 +11,7 @@ msgid ""
1111msgstr ""
1212"Project-Id-Version : Python 3.12\n "
1313"Report-Msgid-Bugs-To : \n "
14- "POT-Creation-Date : 2024-10-11 14:48 +0000\n "
14+ "POT-Creation-Date : 2024-10-25 14:54 +0000\n "
1515"PO-Revision-Date : 2024-05-11 00:34+0000\n "
1616"Last-Translator : Rafael Fontenelle <rffontenelle@gmail.com>, 2024\n "
1717"Language-Team : Polish (https://app.transifex.com/python-doc/teams/5390/pl/)\n "
@@ -394,6 +394,28 @@ msgid ""
394394"scope_test()\n"
395395"print(\" In global scope:\" , spam)"
396396msgstr ""
397+ "def scope_test():\n"
398+ " def do_local():\n"
399+ " spam = \" lokalna konserwa\" \n"
400+ "\n"
401+ " def do_nonlocal():\n"
402+ " nonlocal spam\n"
403+ " spam = \" nielokalna konserwa\" \n"
404+ "\n"
405+ " def do_global():\n"
406+ " global spam\n"
407+ " spam = \" globalna konserwa\" \n"
408+ "\n"
409+ " spam = \" testowa konserwa\" \n"
410+ " do_local()\n"
411+ " print(\" Po przypisaniu lokalnym:\" , spam)\n"
412+ " do_nonlocal()\n"
413+ " print(\" Po przypisaniu nielokalnym:\" , spam)\n"
414+ " do_global()\n"
415+ " print(\" Po przypisaniu globalnym:\" , spam)\n"
416+ "\n"
417+ "scope_test()\n"
418+ "print(\" W globalnym zakresie:\" , spam)"
397419
398420msgid "The output of the example code is:"
399421msgstr "Wyjście przykładowego kodu to:"
@@ -404,6 +426,10 @@ msgid ""
404426"After global assignment: nonlocal spam\n"
405427"In global scope: global spam"
406428msgstr ""
429+ "Po przypisaniu lokalnym: testowa konserwa\n"
430+ "Po przypisaniu nielokalnym: nielokalna konserwa\n"
431+ "Po przypisaniu globalnym: nielokalna konserwa\n"
432+ "W globalnym zakresie: globalna konserwa"
407433
408434msgid ""
409435"Note how the *local* assignment (which is default) didn't change "
@@ -447,6 +473,12 @@ msgid ""
447473" .\n"
448474" <statement-N>"
449475msgstr ""
476+ "class ClassName:\n"
477+ " <instrukcja-1>\n"
478+ " .\n"
479+ " .\n"
480+ " .\n"
481+ " <instrukcja-N>"
450482
451483msgid ""
452484"Class definitions, like function definitions (:keyword:`def` statements) "
@@ -501,19 +533,26 @@ msgstr ""
501533"(:class:`!ClassName` w przykładzie)."
502534
503535msgid "Class Objects"
504- msgstr ""
536+ msgstr "Obiekty klas "
505537
506538msgid ""
507539"Class objects support two kinds of operations: attribute references and "
508540"instantiation."
509541msgstr ""
542+ "Obiekty klas obsługują dwa rodzaje operacji: odniesienia do atrybutów i "
543+ "tworzenie instancji."
510544
511545msgid ""
512546"*Attribute references* use the standard syntax used for all attribute "
513547"references in Python: ``obj.name``. Valid attribute names are all the names "
514548"that were in the class's namespace when the class object was created. So, "
515549"if the class definition looked like this::"
516550msgstr ""
551+ "*Odniesienia do atrybutów* używają standardowej składni używanej dla "
552+ "wszystkich odniesień do atrybutów w Pythonie: ``obj.name``. Prawidłowe "
553+ "nazwy atrybutów to wszystkie nazwy, które znajdowały się w przestrzeni nazw "
554+ "klasy, gdy obiekt klasy został utworzony. Tak więc, jeśli definicja klasy "
555+ "wyglądała tak::"
517556
518557msgid ""
519558"class MyClass:\n"
@@ -523,6 +562,12 @@ msgid ""
523562" def f(self):\n"
524563" return 'hello world'"
525564msgstr ""
565+ "class MyClass:\n"
566+ " \"\"\" Prosta przykładowa klasa\"\"\" \n"
567+ " i = 12345\n"
568+ "\n"
569+ " def f(self):\n"
570+ " return 'witaj świecie'"
526571
527572msgid ""
528573"then ``MyClass.i`` and ``MyClass.f`` are valid attribute references, "
@@ -531,45 +576,69 @@ msgid ""
531576"assignment. :attr:`~type.__doc__` is also a valid attribute, returning the "
532577"docstring belonging to the class: ``\" A simple example class\" ``."
533578msgstr ""
579+ "wtedy ``MyClass.i`` i ``MyClass.f`` są poprawnymi odniesieniami do "
580+ "atrybutów, zwracającymi odpowiednio liczbę całkowitą i funkcję. Do atrybutów "
581+ "klasowych można również przypisywać wartości, więc można zmienić wartość "
582+ "``MyClass.i`` przez przypisanie. :attr:`~type.__doc__` jest również "
583+ "poprawnym atrybutem, zwracającym docstring należący do klasy: ``\" Prosta "
584+ "przykładowa klasa\" ``."
534585
535586msgid ""
536587"Class *instantiation* uses function notation. Just pretend that the class "
537588"object is a parameterless function that returns a new instance of the class. "
538589"For example (assuming the above class)::"
539590msgstr ""
591+ "*Instancjonowanie* klasy używa notacji funkcji. Wystarczy udawać, że obiekt "
592+ "klasy jest bezparametrową funkcją, która zwraca nową instancję klasy. Na "
593+ "przykład (zakładając powyższą klasę)::"
540594
541595msgid "x = MyClass()"
542- msgstr ""
596+ msgstr "x = MyClass() "
543597
544598msgid ""
545599"creates a new *instance* of the class and assigns this object to the local "
546600"variable ``x``."
547601msgstr ""
602+ "tworzy nową *instancję* klasy i przypisuje ten obiekt do zmiennej lokalnej "
603+ "``x``."
548604
549605msgid ""
550606"The instantiation operation (\" calling\" a class object) creates an empty "
551607"object. Many classes like to create objects with instances customized to a "
552608"specific initial state. Therefore a class may define a special method named :"
553609"meth:`~object.__init__`, like this::"
554610msgstr ""
611+ "Operacja instancjonowania („wywołanie” obiektu klasy) tworzy pusty obiekt. "
612+ "Wiele klas lubi tworzyć obiekty z instancjami dostosowanymi do określonego "
613+ "stanu początkowego. Dlatego klasa może zdefiniować specjalną metodę o "
614+ "nazwie :meth:`~object.__init__`, taką jak ta::"
555615
556616msgid ""
557617"def __init__(self):\n"
558618" self.data = []"
559619msgstr ""
620+ "def __init__(self):\n"
621+ " self.data = []"
560622
561623msgid ""
562624"When a class defines an :meth:`~object.__init__` method, class instantiation "
563625"automatically invokes :meth:`!__init__` for the newly created class "
564626"instance. So in this example, a new, initialized instance can be obtained "
565627"by::"
566628msgstr ""
629+ "Gdy klasa definiuje metodę :meth:`~object.__init__`, instancjonowanie klasy "
630+ "automatycznie wywołuje :meth:`!__init__` dla nowo utworzonej instancji "
631+ "klasy. Tak więc w tym przykładzie nową, zainicjalizowaną instancję można "
632+ "uzyskać przez::"
567633
568634msgid ""
569635"Of course, the :meth:`~object.__init__` method may have arguments for "
570636"greater flexibility. In that case, arguments given to the class "
571637"instantiation operator are passed on to :meth:`!__init__`. For example, ::"
572638msgstr ""
639+ "Oczywiście metoda :meth:`~object.__init__` może mieć argumenty dla większej "
640+ "elastyczności. W takim przypadku argumenty podane operatorowi "
641+ "instancjonowania klasy są przekazywane do :meth:`!__init__`. Na przykład ::"
573642
574643msgid ""
575644">>> class Complex:\n"
@@ -581,6 +650,14 @@ msgid ""
581650">>> x.r, x.i\n"
582651"(3.0, -4.5)"
583652msgstr ""
653+ ">>> class Complex:\n"
654+ "... def __init__(self, realpart, imagpart):\n"
655+ "... self.r = realpart\n"
656+ "... self.i = imagpart\n"
657+ "...\n"
658+ ">>> x = Complex(3.0, -4.5)\n"
659+ ">>> x.r, x.i\n"
660+ "(3.0, -4.5)"
584661
585662msgid "Instance Objects"
586663msgstr ""
0 commit comments