@@ -258,6 +258,10 @@ msgid ""
258258">>> list(ChainMap(adjustments, baseline))\n"
259259"['music', 'art', 'opera']"
260260msgstr ""
261+ ">>> baseline = {'music': 'bach', 'art': 'rembrandt'}\n"
262+ ">>> adjustments = {'art': 'van gogh', 'opera': 'carmen'}\n"
263+ ">>> list(ChainMap(adjustments, baseline))\n"
264+ "['music', 'art', 'opera']"
261265
262266#: ../../library/collections.rst:110
263267msgid ""
@@ -274,6 +278,10 @@ msgid ""
274278">>> list(combined)\n"
275279"['music', 'art', 'opera']"
276280msgstr ""
281+ ">>> combined = baseline.copy()\n"
282+ ">>> combined.update(adjustments)\n"
283+ ">>> list(combined)\n"
284+ "['music', 'art', 'opera']"
277285
278286#: ../../library/collections.rst:118
279287msgid "Added support for ``|`` and ``|=`` operators, specified in :pep:`584`."
@@ -344,6 +352,8 @@ msgid ""
344352"import builtins\n"
345353"pylookup = ChainMap(locals(), globals(), vars(builtins))"
346354msgstr ""
355+ "import builtins\n"
356+ "pylookup = ChainMap(locals(), globals(), vars(builtins))"
347357
348358#: ../../library/collections.rst:156
349359msgid ""
@@ -1237,6 +1247,10 @@ msgid ""
12371247"normal dictionaries, return ``None`` as a default rather than using :attr:"
12381248"`default_factory`."
12391249msgstr ""
1250+ "なお、 :meth:`__missing__` は :meth:`~object.__getitem__` 以外のいかなる演算"
1251+ "に対しても呼び出され *ません* 。よって :meth:`~dict.get` は、普通の辞書と同様"
1252+ "に、 :attr:`default_factory` を使うのではなくデフォルトとして ``None`` を返し"
1253+ "ます。"
12401254
12411255#: ../../library/collections.rst:756
12421256msgid ":class:`defaultdict` objects support the following instance variable:"
@@ -1348,6 +1362,12 @@ msgid ""
13481362"`~object.__repr__` method which lists the tuple contents in a ``name=value`` "
13491363"format."
13501364msgstr ""
1365+ "*typename* という名前の tuple の新しいサブクラスを返します。新しいサブクラス"
1366+ "は、 tuple に似ているけれどもインデックスやイテレータだけでなく属性名によるア"
1367+ "クセスもできるオブジェクトを作るのに使います。このサブクラスのインスタンス"
1368+ "は、わかりやすい docstring (型名と属性名が入っています) や、 tuple の内容を "
1369+ "``name=value`` という形のリストで返す使いやすい :meth:`~object.__repr__` も"
1370+ "持っています。"
13511371
13521372#: ../../library/collections.rst:856
13531373msgid ""
@@ -1407,6 +1427,8 @@ msgid ""
14071427"If *module* is defined, the :attr:`~type.__module__` attribute of the named "
14081428"tuple is set to that value."
14091429msgstr ""
1430+ "もし *module* が指定されていれば、名前付きタプルの :attr:`~type.__module__` "
1431+ "属性は、指定された値に設定されます"
14101432
14111433#: ../../library/collections.rst:881
14121434msgid ""
@@ -1442,13 +1464,15 @@ msgstr "*module* 引数が追加されました。"
14421464
14431465#: ../../library/collections.rst:897
14441466msgid "Removed the *verbose* parameter and the :attr:`!_source` attribute."
1445- msgstr ""
1467+ msgstr "*verbose* 引数と :attr:`!_source` 属性が削除されました。 "
14461468
14471469#: ../../library/collections.rst:900
14481470msgid ""
14491471"Added the *defaults* parameter and the :attr:`~somenamedtuple."
14501472"_field_defaults` attribute."
14511473msgstr ""
1474+ "*defaults* 引数と :attr:`~somenamedtuple._field_defaults` 属性が追加されまし"
1475+ "た。"
14521476
14531477#: ../../library/collections.rst:904
14541478msgid ""
@@ -1789,6 +1813,9 @@ msgid ""
17891813"different signature. It accepts an optional argument to specify which item "
17901814"is popped."
17911815msgstr ""
1816+ ":class:`OrderedDict` の :meth:`~OrderedDict.popitem` メソッドはシグネチャが異"
1817+ "なります。\n"
1818+ "どの要素を取り出すかを指定するオプション引数を受け付けます。"
17921819
17931820#: ../../library/collections.rst:1116
17941821msgid ""
@@ -1814,6 +1841,8 @@ msgid ""
18141841":class:`OrderedDict` has a :meth:`~OrderedDict.move_to_end` method to "
18151842"efficiently reposition an element to an endpoint."
18161843msgstr ""
1844+ ":class:`OrderedDict` には、 効率的に要素を末尾に置き直す :meth:`~OrderedDict."
1845+ "move_to_end` メソッドがあります。"
18171846
18181847#: ../../library/collections.rst:1126
18191848msgid ""
@@ -1839,6 +1868,8 @@ msgstr ""
18391868msgid ""
18401869"Until Python 3.8, :class:`dict` lacked a :meth:`~object.__reversed__` method."
18411870msgstr ""
1871+ "Python 3.8 以前は、 :class:`dict` には :meth:`~object.__reversed__` メソッド"
1872+ "が欠けています。"
18421873
18431874#: ../../library/collections.rst:1139
18441875msgid ""
@@ -1917,6 +1948,8 @@ msgid ""
19171948"passed to the :class:`OrderedDict` constructor and its :meth:`~dict.update` "
19181949"method."
19191950msgstr ""
1951+ ":pep:`468` の受理によって、:class:`OrderedDict` のコンストラクタと、:meth:"
1952+ "`~dict.update` メソッドに渡したキーワード引数の順序は保持されます。"
19201953
19211954#: ../../library/collections.rst:1197
19221955msgid ":class:`OrderedDict` Examples and Recipes"
0 commit comments