@@ -240,6 +240,8 @@ msgid ""
240240"The following code shows how the high level :mod:`threading` module can run "
241241"tasks in background while the main program continues to run::"
242242msgstr ""
243+ "Poniższy kod pokazuje, w jaki sposób wysokopoziomowy :mod:`threading` moduł "
244+ "może uruchamiać zadania w tle, podczas gdy główny program nadal działa::"
243245
244246msgid ""
245247"import threading, zipfile\n"
@@ -289,6 +291,9 @@ msgid ""
289291"system. At its simplest, log messages are sent to a file or to ``sys."
290292"stderr``::"
291293msgstr ""
294+ "Moduł :mod:`logging` oferuje w pełni funkcjonalny i elastyczny system "
295+ "logowania. W najprostszym przypadku komunikaty dziennika są wysyłane do "
296+ "pliku lub na adres ``sys.stderr``::"
292297
293298msgid ""
294299"import logging\n"
@@ -298,6 +303,13 @@ msgid ""
298303"logging.error('Error occurred')\n"
299304"logging.critical('Critical error -- shutting down')"
300305msgstr ""
306+ "import logging\n"
307+ "logging.debug('Informacje o debugowaniuwarning')\n"
308+ "logging.info('Komunikat informacyjny')\n"
309+ "logging.warning('ostrzeżenie: nie znaleziono pliku konfiguracyjnego %s ', "
310+ "'server.conf')\n"
311+ "logging.error('Wystąpił błąd')\n"
312+ "logging.critical('Błąd krytyczny -- wyłączenie')"
301313
302314msgid "This produces the following output:"
303315msgstr "Daje to taki wyniki:"
@@ -379,6 +391,9 @@ msgid ""
379391"sometimes there is a need for alternative implementations with different "
380392"performance trade-offs."
381393msgstr ""
394+ "Wiele potrzeb związanych ze strukturami danych można zaspokoić za pomocą "
395+ "listy wbudowanej. Czasami jednak istnieje potrzeba alternatywnych "
396+ "implementacji z różnymi kompromisami w zakresie wydajności."
382397
383398msgid ""
384399"The :mod:`array` module provides an :class:`~array.array` object that is "
@@ -432,6 +447,13 @@ msgid ""
432447" return m\n"
433448" unsearched.append(m)"
434449msgstr ""
450+ "unsearched = deque([starting_node])\n"
451+ "def breadth_first_search(unsearched):\n"
452+ " node = unsearched.popleft()\n"
453+ " for m in gen_moves(node):\n"
454+ " if is_goal(m):\n"
455+ " return m\n"
456+ " unsearched.append(m)"
435457
436458msgid ""
437459"In addition to alternative list implementations, the library also offers "
@@ -465,6 +487,13 @@ msgid ""
465487">>> [heappop(data) for i in range(3)] # fetch the three smallest entries\n"
466488"[-5, 0, 1]"
467489msgstr ""
490+ ">>> from heapq import heapify, heappop, heappush\n"
491+ ">>> dane = [1, 3, 5, 7, 9, 2, 4, 6, 8, 0]\n"
492+ ">>> heapify(dane) # uporządkuj listę w kolejności na stercie\n"
493+ ">>> heappush(dane, -5) # dodanie nowego wpisu\n"
494+ ">>> [heappop(dane) for i in range(3)] # pobranie trzech najmniejszych "
495+ "wpisów\n"
496+ "[-5, 0, 1]"
468497
469498msgid "Decimal Floating-Point Arithmetic"
470499msgstr "Dziesiętna arytmetyka zmiennoprzecinkowa"
@@ -532,6 +561,9 @@ msgid ""
532561"modulo calculations and equality tests that are unsuitable for binary "
533562"floating point::"
534563msgstr ""
564+ "Dokładna reprezentacja umożliwia klasie :class:`~decimal.Decimal` "
565+ "wykonywanie obliczeń modulo i testów równości, które nie są odpowiednie dla "
566+ "binarnych liczb zmiennoprzecinkowych:"
535567
536568msgid ""
537569">>> Decimal('1.00') % Decimal('.10')\n"
@@ -544,6 +576,15 @@ msgid ""
544576">>> 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 == 1.0\n"
545577"False"
546578msgstr ""
579+ ">>> Decimal('1.00') % Decimal('.10')\n"
580+ "Decimal('0.00')\n"
581+ ">>> 1.00 % 0.10\n"
582+ "0.09999999999999995\n"
583+ "\n"
584+ ">>> sum([Decimal('0.1')]*10) == Decimal('1.0')\n"
585+ "True\n"
586+ ">>> 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 == 1.0\n"
587+ "False"
547588
548589msgid ""
549590"The :mod:`decimal` module provides arithmetic with as much precision as "
0 commit comments