@@ -11,7 +11,7 @@ msgid ""
1111msgstr ""
1212"Project-Id-Version : Python 3.14\n "
1313"Report-Msgid-Bugs-To : \n "
14- "POT-Creation-Date : 2025-05-09 14:19 +0000\n "
14+ "POT-Creation-Date : 2025-07-31 14:20 +0000\n "
1515"PO-Revision-Date : 2025-07-18 18:48+0000\n "
1616"Last-Translator : Rafael Fontenelle <rffontenelle@gmail.com>, 2025\n "
1717"Language-Team : Japanese (https://app.transifex.com/python-doc/teams/5390/ "
@@ -50,10 +50,20 @@ msgid ""
5050msgstr ""
5151
5252#: ../../library/bisect.rst:29
53+ msgid ""
54+ "The functions in this module are not thread-safe. If multiple threads "
55+ "concurrently use :mod:`bisect` functions on the same sequence, this may "
56+ "result in undefined behaviour. Likewise, if the provided sequence is mutated "
57+ "by a different thread while a :mod:`bisect` function is operating on it, the "
58+ "result is undefined. For example, using :py:func:`~bisect.insort_left` on "
59+ "the same list from multiple threads may result in the list becoming unsorted."
60+ msgstr ""
61+
62+ #: ../../library/bisect.rst:39
5363msgid "The following functions are provided:"
5464msgstr "次の関数が用意されています:"
5565
56- #: ../../library/bisect.rst:34
66+ #: ../../library/bisect.rst:44
5767msgid ""
5868"Locate the insertion point for *x* in *a* to maintain sorted order. The "
5969"parameters *lo* and *hi* may be used to specify a subset of the list which "
@@ -69,105 +79,105 @@ msgstr ""
6979"insert()`` の第一引数として使うのに適しています。*a* はすでにソートされている"
7080"ものとします。"
7181
72- #: ../../library/bisect.rst:41
82+ #: ../../library/bisect.rst:51
7383msgid ""
7484"The returned insertion point *ip* partitions the array *a* into two slices "
7585"such that ``all(elem < x for elem in a[lo : ip])`` is true for the left "
7686"slice and ``all(elem >= x for elem in a[ip : hi])`` is true for the right "
7787"slice."
7888msgstr ""
7989
80- #: ../../library/bisect.rst:46
90+ #: ../../library/bisect.rst:56
8191msgid ""
8292"*key* specifies a :term:`key function` of one argument that is used to "
8393"extract a comparison key from each element in the array. To support "
8494"searching complex records, the key function is not applied to the *x* value."
8595msgstr ""
8696
87- #: ../../library/bisect.rst:50
97+ #: ../../library/bisect.rst:60
8898msgid ""
8999"If *key* is ``None``, the elements are compared directly and no key function "
90100"is called."
91101msgstr ""
92102
93- #: ../../library/bisect.rst:53 ../../library/bisect.rst:67
94- #: ../../library/bisect.rst:85 ../../library/bisect.rst:105
103+ #: ../../library/bisect.rst:63 ../../library/bisect.rst:77
104+ #: ../../library/bisect.rst:95 ../../library/bisect.rst:115
95105msgid "Added the *key* parameter."
96106msgstr "*key* パラメータが追加されました。"
97107
98- #: ../../library/bisect.rst:60
108+ #: ../../library/bisect.rst:70
99109msgid ""
100110"Similar to :py:func:`~bisect.bisect_left`, but returns an insertion point "
101111"which comes after (to the right of) any existing entries of *x* in *a*."
102112msgstr ""
103113
104- #: ../../library/bisect.rst:63
114+ #: ../../library/bisect.rst:73
105115msgid ""
106116"The returned insertion point *ip* partitions the array *a* into two slices "
107117"such that ``all(elem <= x for elem in a[lo : ip])`` is true for the left "
108118"slice and ``all(elem > x for elem in a[ip : hi])`` is true for the right "
109119"slice."
110120msgstr ""
111121
112- #: ../../library/bisect.rst:73
122+ #: ../../library/bisect.rst:83
113123msgid "Insert *x* in *a* in sorted order."
114124msgstr "*x* を *a* にソート順で挿入します。"
115125
116- #: ../../library/bisect.rst:75
126+ #: ../../library/bisect.rst:85
117127msgid ""
118128"This function first runs :py:func:`~bisect.bisect_left` to locate an "
119129"insertion point. Next, it runs the :meth:`!insert` method on *a* to insert "
120130"*x* at the appropriate position to maintain sort order."
121131msgstr ""
122132
123- #: ../../library/bisect.rst:79 ../../library/bisect.rst:99
133+ #: ../../library/bisect.rst:89 ../../library/bisect.rst:109
124134msgid ""
125135"To support inserting records in a table, the *key* function (if any) is "
126136"applied to *x* for the search step but not for the insertion step."
127137msgstr ""
128138
129- #: ../../library/bisect.rst:82 ../../library/bisect.rst:102
139+ #: ../../library/bisect.rst:92 ../../library/bisect.rst:112
130140msgid ""
131141"Keep in mind that the *O*\\ (log *n*) search is dominated by the slow *O*\\ "
132142"(*n*) insertion step."
133143msgstr ""
134144
135- #: ../../library/bisect.rst:92
145+ #: ../../library/bisect.rst:102
136146msgid ""
137147"Similar to :py:func:`~bisect.insort_left`, but inserting *x* in *a* after "
138148"any existing entries of *x*."
139149msgstr ""
140150
141- #: ../../library/bisect.rst:95
151+ #: ../../library/bisect.rst:105
142152msgid ""
143153"This function first runs :py:func:`~bisect.bisect_right` to locate an "
144154"insertion point. Next, it runs the :meth:`!insert` method on *a* to insert "
145155"*x* at the appropriate position to maintain sort order."
146156msgstr ""
147157
148- #: ../../library/bisect.rst:110
158+ #: ../../library/bisect.rst:120
149159msgid "Performance Notes"
150160msgstr "パフォーマンスに関するメモ"
151161
152- #: ../../library/bisect.rst:112
162+ #: ../../library/bisect.rst:122
153163msgid ""
154164"When writing time sensitive code using *bisect()* and *insort()*, keep these "
155165"thoughts in mind:"
156166msgstr ""
157167
158- #: ../../library/bisect.rst:115
168+ #: ../../library/bisect.rst:125
159169msgid ""
160170"Bisection is effective for searching ranges of values. For locating specific "
161171"values, dictionaries are more performant."
162172msgstr ""
163173
164- #: ../../library/bisect.rst:118
174+ #: ../../library/bisect.rst:128
165175msgid ""
166176"The *insort()* functions are *O*\\ (*n*) because the logarithmic search step "
167177"is dominated by the linear time insertion step."
168178msgstr ""
169179
170- #: ../../library/bisect.rst:121
180+ #: ../../library/bisect.rst:131
171181msgid ""
172182"The search functions are stateless and discard key function results after "
173183"they are used. Consequently, if the search functions are used in a loop, "
@@ -178,14 +188,14 @@ msgid ""
178188"shown in the examples section below)."
179189msgstr ""
180190
181- #: ../../library/bisect.rst:131
191+ #: ../../library/bisect.rst:141
182192msgid ""
183193"`Sorted Collections <https://grantjenks.com/docs/sortedcollections/>`_ is a "
184194"high performance module that uses *bisect* to managed sorted collections of "
185195"data."
186196msgstr ""
187197
188- #: ../../library/bisect.rst:135
198+ #: ../../library/bisect.rst:145
189199msgid ""
190200"The `SortedCollection recipe <https://code.activestate.com/recipes/577197-"
191201"sortedcollection/>`_ uses bisect to build a full-featured collection class "
@@ -198,19 +208,19 @@ msgstr ""
198208"activestate.com/recipes/577197-sortedcollection/>`_\\ 。キーは、探索中に不必"
199209"要な呼び出しをさせないために、予め計算しておきます。"
200210
201- #: ../../library/bisect.rst:143
211+ #: ../../library/bisect.rst:153
202212msgid "Searching Sorted Lists"
203213msgstr "ソート済みリストの探索"
204214
205- #: ../../library/bisect.rst:145
215+ #: ../../library/bisect.rst:155
206216msgid ""
207217"The above `bisect functions`_ are useful for finding insertion points but "
208218"can be tricky or awkward to use for common searching tasks. The following "
209219"five functions show how to transform them into the standard lookups for "
210220"sorted lists::"
211221msgstr ""
212222
213- #: ../../library/bisect.rst:150
223+ #: ../../library/bisect.rst:160
214224msgid ""
215225"def index(a, x):\n"
216226" 'Locate the leftmost value exactly equal to x'\n"
@@ -248,19 +258,19 @@ msgid ""
248258" raise ValueError"
249259msgstr ""
250260
251- #: ../../library/bisect.rst:187
261+ #: ../../library/bisect.rst:197
252262msgid "Examples"
253263msgstr "使用例"
254264
255- #: ../../library/bisect.rst:191
265+ #: ../../library/bisect.rst:201
256266msgid ""
257267"The :py:func:`~bisect.bisect` function can be useful for numeric table "
258268"lookups. This example uses :py:func:`~bisect.bisect` to look up a letter "
259269"grade for an exam score (say) based on a set of ordered numeric breakpoints: "
260270"90 and up is an 'A', 80 to 89 is a 'B', and so on::"
261271msgstr ""
262272
263- #: ../../library/bisect.rst:196
273+ #: ../../library/bisect.rst:206
264274msgid ""
265275">>> def grade(score, breakpoints=[60, 70, 80, 90], grades='FDCBA'):\n"
266276"... i = bisect(breakpoints, score)\n"
@@ -270,14 +280,14 @@ msgid ""
270280"['F', 'A', 'C', 'C', 'B', 'A', 'A']"
271281msgstr ""
272282
273- #: ../../library/bisect.rst:203
283+ #: ../../library/bisect.rst:213
274284msgid ""
275285"The :py:func:`~bisect.bisect` and :py:func:`~bisect.insort` functions also "
276286"work with lists of tuples. The *key* argument can serve to extract the "
277287"field used for ordering records in a table::"
278288msgstr ""
279289
280- #: ../../library/bisect.rst:207
290+ #: ../../library/bisect.rst:217
281291msgid ""
282292">>> from collections import namedtuple\n"
283293">>> from operator import attrgetter\n"
@@ -310,13 +320,13 @@ msgid ""
310320" Movie(name='Titanic', released=1997, director='Cameron')]"
311321msgstr ""
312322
313- #: ../../library/bisect.rst:237
323+ #: ../../library/bisect.rst:247
314324msgid ""
315325"If the key function is expensive, it is possible to avoid repeated function "
316326"calls by searching a list of precomputed keys to find the index of a record::"
317327msgstr ""
318328
319- #: ../../library/bisect.rst:240
329+ #: ../../library/bisect.rst:250
320330msgid ""
321331">>> data = [('red', 5), ('blue', 1), ('yellow', 8), ('black', 0)]\n"
322332">>> data.sort(key=lambda r: r[1]) # Or use operator.itemgetter(1).\n"
0 commit comments