Skip to content

Commit 4e4ed20

Browse files
[po] auto sync
1 parent 582f7b0 commit 4e4ed20

3 files changed

Lines changed: 26 additions & 1 deletion

File tree

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "1.55%", "updated_at": "2025-12-09T18:32:51Z"}
1+
{"translation": "1.56%", "updated_at": "2025-12-09T19:17:33Z"}

tutorial/stdlib2.mo

2.85 KB
Binary file not shown.

tutorial/stdlib2.po

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,13 +695,23 @@ msgid ""
695695
" return m\n"
696696
" unsearched.append(m)"
697697
msgstr ""
698+
"unsearched = deque([starting_node])\n"
699+
"def breadth_first_search(unsearched):\n"
700+
" node = unsearched.popleft()\n"
701+
" for m in gen_moves(node):\n"
702+
" if is_goal(m):\n"
703+
" return m\n"
704+
" unsearched.append(m)"
698705

699706
#: ../../tutorial/stdlib2.rst:330
700707
msgid ""
701708
"In addition to alternative list implementations, the library also offers "
702709
"other tools such as the :mod:`bisect` module with functions for manipulating"
703710
" sorted lists::"
704711
msgstr ""
712+
"Помимо альтернативных реализаций списка, стандартная библиотека также "
713+
"предлагает другие инструменты, например модуль :mod:`bisect` с функциями для"
714+
" работы с отсортированными списками::"
705715

706716
#: ../../tutorial/stdlib2.rst:334
707717
msgid ""
@@ -711,6 +721,11 @@ msgid ""
711721
">>> scores\n"
712722
"[(100, 'perl'), (200, 'tcl'), (300, 'ruby'), (400, 'lua'), (500, 'python')]"
713723
msgstr ""
724+
">>> import bisect\n"
725+
">>> scores = [(100, 'perl'), (200, 'tcl'), (400, 'lua'), (500, 'python')]\n"
726+
">>> bisect.insort(scores, (300, 'ruby'))\n"
727+
">>> scores\n"
728+
"[(100, 'perl'), (200, 'tcl'), (300, 'ruby'), (400, 'lua'), (500, 'python')]"
714729

715730
#: ../../tutorial/stdlib2.rst:340
716731
msgid ""
@@ -719,6 +734,10 @@ msgid ""
719734
"This is useful for applications which repeatedly access the smallest element"
720735
" but do not want to run a full list sort::"
721736
msgstr ""
737+
"Модуль :mod:`heapq` предоставляет функции для реализации кучи на основе "
738+
"обычных списков. Запись с наименьшим значением всегда сохраняется в нулевой "
739+
"позиции. Это полезно для приложений, которые неоднократно обращаются к "
740+
"наименьшему элементу, но не хотят выполнять полную сортировку списка::"
722741

723742
#: ../../tutorial/stdlib2.rst:345
724743
msgid ""
@@ -729,6 +748,12 @@ msgid ""
729748
">>> [heappop(data) for i in range(3)] # fetch the three smallest entries\n"
730749
"[-5, 0, 1]"
731750
msgstr ""
751+
">>> from heapq import heapify, heappop, heappush\n"
752+
">>> data = [1, 3, 5, 7, 9, 2, 4, 6, 8, 0]\n"
753+
">>> heapify(data) # переупорядочить список в кучу\n"
754+
">>> heappush(data, -5) # добавить новый элемент\n"
755+
">>> [heappop(data) for i in range(3)] # получить три наименьших элемента\n"
756+
"[-5, 0, 1]"
732757

733758
#: ../../tutorial/stdlib2.rst:356
734759
msgid "Decimal Floating-Point Arithmetic"

0 commit comments

Comments
 (0)