8000 [skip ci] Update .po files · python/python-docs-ja@0a8173b · GitHub
[go: up one dir, main page]

Skip to content

Commit 0a8173b

Browse files
author
Autobuild bot on TravisCI
committed
[skip ci] Update .po files
1 parent 2916dc8 commit 0a8173b

File tree

1 file changed

+28
-20
lines changed

1 file changed

+28
-20
lines changed

library/contextlib.po

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 2.7\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2018-01-21 01:52+0900\n"
11-
"PO-Revision-Date: 2018-01-20 20:59+0000\n"
10+
"POT-Creation-Date: 2018-07-24 13:56+0900\n"
11+
"PO-Revision-Date: 2018-07-24 05:02+0000\n"
1212
"Last-Translator: tomo🐧\n"
1313
"Language-Team: Japanese (http://www.transifex.com/python-doc/python-27/language/ja/)\n"
1414
"MIME-Version: 1.0\n"
@@ -46,18 +46,26 @@ msgstr "この関数は :keyword:`with` 文コンテキストマネージャの
4646

4747
#: ../../library/contextlib.rst:27
4848
msgid ""
49-
"A simple example (this is not recommended as a real way of generating "
50-
"HTML!)::"
51-
msgstr "簡単な例(実際に HTML を生成する方法としてはお勧めできません!)::"
49+
"While many objects natively support use in with statements, sometimes a "
50+
"resource needs to be managed that isn't a context manager in its own right, "
51+
"and doesn't implement a ``close()`` method for use with "
52+
"``contextlib.closing``"
53+
msgstr ""
54+
55+
#: ../../library/contextlib.rst:31
56+
msgid ""
57+
"An abstract example would be the following to ensure correct resource "
58+
"management::"
59+
msgstr ""
5260

53-
#: ../../library/contextlib.rst:44
61+
#: ../../library/contextlib.rst:50
5462
msgid ""
5563
"The function being decorated must return a :term:`generator`-iterator when "
5664
"called. This iterator must yield exactly one value, which will be bound to "
5765
"the targets in the :keyword:`with` statement's :keyword:`as` clause, if any."
5866
msgstr "デコレート対象の関数は呼び出されたときに :term:`ジェネレータ <generator>`-イテレータを返す必要があります。このイテレータは必ず値を1つ yield しなければなりません。 :keyword:`with` 文の :keyword:`as` 節が存在するなら、その値は as 節のターゲットへ束縛されることになります。"
5967

60-
#: ../../library/contextlib.rst:48
68+
#: ../../library/contextlib.rst:54
6169
msgid ""
6270
"At the point where the generator yields, the block nested in the "
6371
":keyword:`with` statement is executed. The generator is then resumed after "
@@ -73,25 +81,25 @@ msgid ""
7381
"the :keyword:`with` statement."
7482
msgstr "ジェネレータが yield を実行した箇所で :keyword:`with` 文のネストされたブロックが実行されます。ブロックから抜けた後でジェネレータは再開されます。ブロック内で処理されない例外が発生した場合は、ジェネレータ内部の yield を実行した箇所で例外が再送出されます。なので、(もしあれば) エラーを捕捉したり、クリーンアップ処理を確実に実行したりするために、:keyword:`try`...\\ :keyword:`except`...\\ :keyword:`finally` 構文を使用できます。例外を捕捉する目的が、(完全に例外を抑制してしまうのではなく) 単に例外のログをとるため、もしくはあるアクションを実行するためなら、ジェネレータはその例外を再送出しなければなりません。例外を再送出しない場合、ジェネレータのコンテキストマネージャは :keyword:`with` 文に対して例外が処理されたことを示し、:keyword:`with` 文の直後の文から実行を再開します。"
7583

76-
#: ../../library/contextlib.rst:63
84+
#: ../../library/contextlib.rst:69
7785
msgid ""
7886
"Combine multiple context managers into a single nested context manager."
7987
msgstr "複数のコンテキストマネージャを一つのネストされたコンテキストマネージャへ結合します。"
8088

81-
#: ../../library/contextlib.rst:65
89+
#: ../../library/contextlib.rst:71
8290
msgid ""
8391
"This function has been deprecated in favour of the multiple manager form of "
8492
"the :keyword:`with` statement."
8593
msgstr "この関数は、 :keyword:`with` 文にマルチマネージャー形式ができたために非推奨になりました。"
8694

87-
#: ../../library/contextlib.rst:68
95+
#: ../../library/contextlib.rst:74
8896
msgid ""
8997
"The one advantage of this function over the multiple manager form of the "
9098
":keyword:`with` statement is that argument unpacking allows it to be used "
9199
"with a variable number of context managers as follows::"
92100
msgstr "この関数の :keyword:`with` 文のマルチマネージャー形式に対する唯一の利点は、引数のアンパックによって、次の例のように可変数個のコンテキストマネージャーを扱えることです。 ::"
93101

94-
#: ../../library/contextlib.rst:77
102+
#: ../../library/contextlib.rst:83
95103
msgid ""
96104
"Note that if the :meth:`__exit__` method of one of the nested context "
97105
"managers indicates an exception should be suppressed, no exception "
@@ -104,7 +112,7 @@ msgid ""
104112
"exception."
105113
msgstr "ネストされたコンテキストマネージャのうちのいずれかの :meth:`__exit__` メソッドが例外を抑制すべきと判断した場合、外側にある残りのすべてのコンテキストマネージャに例外情報が渡されないということに注意してください。同様に、ネストされたコンテキストマネージャのうちのいずれかの :meth:`__exit__` メソッドが例外を送出したならば、それ以前の例外状態は失われ、新しい例外が外側にある残りのすべてのコンテキストマネージャの :meth:`__exit__` メソッドに渡されます。一般的に :meth:`__exit__` メソッドが例外を送出することは避けるべきであり、特に渡された例外を再送出すべきではありません。"
106114

107-
#: ../../library/contextlib.rst:86
115+
#: ../../library/contextlib.rst:92
108116
msgid ""
109117
"This function has two major quirks that have led to it being deprecated. "
110118
"Firstly, as the context managers are all constructed before the function is "
@@ -115,7 +123,7 @@ msgid ""
115123
"if an exception is thrown when opening the second file."
116124
msgstr "この関数が非推奨になった理由に、2つの大きな問題があります。 1つ目は、全てのコンテキストマネージャーが関数が呼び出される前に構築されることです。内側のコンテキストマネージャーの :meth:`__new__` と :meth:`__init__` メソッドは外側のコンテキストマネージャーの内側に入っていません。つまり、例えば :func:`nested` を2つのファイルを開くために利用した場合、 2つめのファイルを開くのに失敗すると1つめのファイルが正しく close されないというプログラムエラーになります。"
117125

118-
#: ../../library/contextlib.rst:94
126+
#: ../../library/contextlib.rst:100
119127
msgid ""
120128
"Secondly, if the :meth:`__enter__` method of one of the inner context "
121129
"managers raises an exception that is caught and suppressed by the "
@@ -124,41 +132,41 @@ msgid ""
124132
":keyword:`with` statement."
125133
msgstr "2つ目の問題は、内側のコンテキストマネージャーの1つの :meth:`__enter__` メソッドが例外を発生させたときに、外側のコンテキストマネージャーの :meth:`__exit__` メソッドがその例外を捕まえて抑制させてしまうことで、この場合に :keyword:`with` の body 部分の実行がスキップされるのではなく :exc:`RuntimeError` が発生する恐れがあります。"
126134

127-
#: ../../library/contextlib.rst:100
135+
#: ../../library/contextlib.rst:106
128136
msgid ""
129137
"Developers that need to support nesting of a variable number of context "
130138
"managers can either use the :mod:`warnings` module to suppress the "
131139
"DeprecationWarning raised by this function or else use this function as a "
132140
"model for an application specific implementation."
133141
msgstr "可変数個のコンテキストマネージャーのネストをサポートしなければならない場合、 :mod:`warnings` モジュールを利用してこの関数が発生させる DeprecationWarning を抑制するか、この関数を参考にしてアプリケーション独自の実装をすることができます。"
134142

135-
#: ../../library/contextlib.rst:105
143+
#: ../../library/contextlib.rst:111
136144
msgid ""
137145
"The with-statement now supports this functionality directly (without the "
138146
"confusing error prone quirks)."
139147
msgstr "with 文がこの関数の機能を(この関数と違って奇妙なエラーを発生させることなしに) 直接サポートしました。"
140148

141-
#: ../../library/contextlib.rst:111
149+
#: ../../library/contextlib.rst:117
142150
msgid ""
143151
"Return a context manager that closes *thing* upon completion of the block. "
144152
"This is basically equivalent to::"
145153
msgstr "ブロックの完了時に *thing* を close するコンテキストマネージャを返します。これは基本的に以下と等価です::"
146154

147-
#: ../../library/contextlib.rst:123
155+
#: ../../library/contextlib.rst:129
148156
msgid "And lets you write code like this::"
149157
msgstr "そして、明示的に ``page`` を close する必要なしに、次のように書くことができます::"
150158

151-
#: ../../library/contextlib.rst:132
159+
#: ../../library/contextlib.rst:138
152160
msgid ""
153161
"without needing to explicitly close ``page``. Even if an error occurs, "
154162
"``page.close()`` will be called when the :keyword:`with` block is exited."
155163
msgstr "``page`` を明示的に close する必要は無く、エラーが発生した場合でも、 :keyword:`with` ブロックを出るときに ``page.close()`` が呼ばれます。"
156164

157-
#: ../../library/contextlib.rst:139
165+
#: ../../library/contextlib.rst:145
158166
msgid ":pep:`343` - The \"with\" statement"
159167
msgstr ":pep:`343` - \"with\" ステートメント"
160168

161-
#: ../../library/contextlib.rst:139
169+
#: ../../library/contextlib.rst:145
162170
msgid ""
163171
"The specification, background, and examples for the Python :keyword:`with` "
164172
"statement."

0 commit comments

Comments
 (0)
0