@@ -482,6 +482,9 @@ msgid ""
482482":meth:`~Counter.update` and :meth:`~Counter.subtract` which allow negative "
483483"and zero values for both inputs and outputs."
484484msgstr ""
485+ "``c[key] += 1`` のようなインプレース演算では、値の型に必要なのは 足し算と引き算ができることだけです。よって分数、浮動小数点数、 "
486+ "小数も使え、負の値がサポートされています。これと同じことが、 負や 0 の値を入力と出力に許す :meth:`~Counter.update` と "
487+ ":meth:`~Counter.subtract` メソッド にも言えます。"
485488
486489#: ../../library/collections.rst:384
487490msgid ""
@@ -746,6 +749,9 @@ msgid ""
746749":meth:`~deque.popleft`; otherwise, it can be cycled back to the end with the"
747750" :meth:`~deque.rotate` method::"
748751msgstr ""
752+ "`ラウンドロビンスケジューラ <https://en.wikipedia.org/wiki/Round-robin_scheduling>`_ は、入力されたイテレータを :class:`deque` に格納することで実装できます。\n"
753+ "値は、位置0にある選択中のイテレータから取り出されます。\n"
754+ "そのイテレータが値を出し切った場合は、 :meth:`~deque.popleft` で除去できます; そうでない場合は、 :meth:`~deque.rotate` メソッドで末尾に回せます::"
749755
750756#: ../../library/collections.rst:659
751757msgid ""
@@ -997,6 +1003,9 @@ msgid ""
9971003"``x`` will be a required argument, ``y`` will default to ``1``, and ``z`` "
9981004"will default to ``2``."
9991005msgstr ""
1006+ "*defaults* には ``None`` あるいはデフォルト値の :term:`iterable` が指定できます。\n"
1007+ "デフォルト値を持つフィールドはデフォルト値を持たないフィールドより後ろに来なければならないので、 *defaults* は最も右にある変数に適用されます。\n"
1008+ "例えば、 field_names が ``['x', 'y', 'z']`` で defaults が ``(1, 2)`` の場合、 ``x`` は必須の引数、 ``y`` は ``1`` がデフォルト、 ``z`` は ``2`` がデフォルトとなります。"
10001009
10011010#: ../../library/collections.rst:834
10021011msgid ""
@@ -1059,7 +1068,7 @@ msgstr "既存の sequence や Iterable から新しいインスタンスを作
10591068msgid ""
10601069"Return a new :class:`dict` which maps field names to their corresponding "
10611070"values:"
1062- msgstr "フィールド名を対応する値にマッピングする新しい:class:`dict` を返します::"
1071+ msgstr "フィールド名を対応する値にマッピングする新しい :class:`dict` を返します::"
10631072
10641073#: ../../library/collections.rst:914
10651074msgid "Returns an :class:`OrderedDict` instead of a regular :class:`dict`."
@@ -1179,23 +1188,29 @@ msgid ""
11791188"remember insertion order (this new behavior became guaranteed in Python "
11801189"3.7)."
11811190msgstr ""
1191+ "順序付き辞書は普通の辞書のようですが、順序操作に関係する追加の機能があります。\n"
1192+ "組み込みの :class:`dict` クラスが挿入順序を記憶しておく機能 (この新しい振る舞いは Python 3.7 で保証されるようになりました) を獲得した今となっては、順序付き辞書の重要性は薄れました。"
11821193
11831194#: ../../library/collections.rst:1041
11841195msgid "Some differences from :class:`dict` still remain:"
1185- msgstr ""
1196+ msgstr "いまだ残っている :class:`dict` との差分: "
11861197
11871198#: ../../library/collections.rst:1043
11881199msgid ""
11891200"The regular :class:`dict` was designed to be very good at mapping "
11901201"operations. Tracking insertion order was secondary."
11911202msgstr ""
1203+ "通常の :class:`dict` は対応付けに向いているように設計されました。\n"
1204+ "挿入順序の追跡は二の次です。"
11921205
11931206#: ../../library/collections.rst:1046
11941207msgid ""
11951208"The :class:`OrderedDict` was designed to be good at reordering operations. "
11961209"Space efficiency, iteration speed, and the performance of update operations "
11971210"were secondary."
11981211msgstr ""
1212+ ":class:`OrderedDict` は並べ替え操作に向いているように設計されました。\n"
1213+ "空間効率、反復処理の速度、更新操作のパフォーマンスは二の次です。"
11991214
12001215#: ../../library/collections.rst:1050
12011216msgid ""
@@ -1205,33 +1220,38 @@ msgid ""
12051220"<https://medium.com/@krishankantsinghal/my-first-blog-on-"
12061221"medium-583159139237>`_)."
12071222msgstr ""
1223+ "アルゴリズム的に、 :class:`OrderedDict` は高頻度の並べ替え操作を :class:`dict` よりも上手く扱えます。\n"
1224+ "この性質により、 :class:`OrderedDict` は直近のアクセスの追跡 (例えば、 `LRU キャッシュ <https://medium.com/@krishankantsinghal/my-first-blog-on-medium-583159139237>`_) に向いています。"
12081225
12091226#: ../../library/collections.rst:1055
12101227msgid ""
12111228"The equality operation for :class:`OrderedDict` checks for matching order."
1212- msgstr ""
1229+ msgstr ":class:`OrderedDict` に対する等価演算は突き合わせ順序もチェックします。 "
12131230
12141231#: ../../library/collections.rst:1057
12151232msgid ""
12161233"The :meth:`popitem` method of :class:`OrderedDict` has a different "
12171234"signature. It accepts an optional argument to specify which item is popped."
12181235msgstr ""
1236+ ":class:`OrderedDict` の :meth:`popitem` メソッドはシグネチャが異なります。\n"
1237+ "どの要素を取り出すかを指定するオプション引数を受け付けます。"
12191238
12201239#: ../../library/collections.rst:1060
12211240msgid ""
12221241":class:`OrderedDict` has a :meth:`move_to_end` method to efficiently "
12231242"reposition an element to an endpoint."
12241243msgstr ""
1244+ ":class:`OrderedDict` には、 効率的に要素を末尾に置き直す :meth:`move_to_end` メソッドがあります。"
12251245
12261246#: ../../library/collections.rst:1063
12271247msgid "Until Python 3.8, :class:`dict` lacked a :meth:`__reversed__` method."
1228- msgstr ""
1248+ msgstr "Python 3.8 以前は、 :class:`dict` には :meth:`__reversed__` メソッドが欠けています。 "
12291249
12301250#: ../../library/collections.rst:1068
12311251msgid ""
12321252"Return an instance of a :class:`dict` subclass that has methods specialized "
12331253"for rearranging dictionary order."
1234- msgstr ""
1254+ msgstr "辞書の順序を並べ直すためのメソッドを持つ :class:`dict` のサブクラスのインスタンスを返します。 "
12351255
12361256#: ../../library/collections.rst:1075
12371257msgid ""
@@ -1241,8 +1261,8 @@ msgid ""
12411261" false."
12421262msgstr ""
12431263"順序付き辞書の :meth:`popitem` メソッドは、(key, value) 対を返して消去します。この対は *last* が真なら "
1244- ":abbr:`LIFO(last-in, first-out 後入先出)` で、偽なら :abbr:`FIFO` (first-in, first-"
1245- "out 先入先出)` で返されます。"
1264+ ":abbr:`LIFO (last-in, first-out, 後入先出)` で、偽なら :abbr:`FIFO (first-in, first-"
1265+ "out, 先入先出)` で返されます。"
12461266
12471267#: ../../library/collections.rst:1082
12481268msgid ""
@@ -1301,12 +1321,15 @@ msgid ""
13011321"existing entry, the original insertion position is changed and moved to the "
13021322"end::"
13031323msgstr ""
1324+ "キーが *最後に* 追加されたときの順序を記憶する、順序付き辞書の変種を作るのは簡単です。\n"
1325+ "新しい値が既存の値を上書きする場合、元々の挿入位置が最後尾へ変更されます::"
13041326
13051327#: ../../library/collections.rst:1131
13061328msgid ""
13071329"An :class:`OrderedDict` would also be useful for implementing variants of "
13081330":func:`functools.lru_cache`::"
13091331msgstr ""
1332+ ":class:`OrderedDict` は :func:`functools.lru_cache` の変種を実装するのにも役に立ちます::"
13101333
13111334#: ../../library/collections.rst:1154
13121335msgid ":class:`UserDict` objects"
@@ -1436,18 +1459,22 @@ msgid ""
14361459"to a copy of *seq*. The *seq* argument can be any object which can be "
14371460"converted into a string using the built-in :func:`str` function."
14381461msgstr ""
1462+ "文字列オブジェクトをシミュレートするクラスです。\n"
1463+ "インスタンスの内容は通常の文字列に保存され、 :class:`UserString` インスタンスの :attr:`data` 属性を通してアクセスできます。\n"
1464+ "インスタンスの内容には最初に *seq* のコピーが設定されます。\n"
1465+ "*seq* 引数は、組み込みの :func:`str` 関数で文字列に変換できる任意のオブジェクトです。"
14391466
14401467#: ../../library/collections.rst:1238
14411468msgid ""
14421469"In addition to supporting the methods and operations of strings, "
14431470":class:`UserString` instances provide the following attribute:"
1444- msgstr ""
1471+ msgstr "文字列のメソッドと演算をサポートするのに加え、 :class:`UserString` インスタンスは次の属性を提供します: "
14451472
14461473#: ../../library/collections.rst:1243
14471474msgid ""
14481475"A real :class:`str` object used to store the contents of the "
14491476":class:`UserString` class."
1450- msgstr ""
1477+ msgstr ":class:`UserString` クラスの内容を保存するために使われる実際の :class:`str` オブジェクトです。 "
14511478
14521479#: ../../library/collections.rst:1246
14531480msgid ""
0 commit comments