@@ -80,6 +80,9 @@ msgid ""
8080"context variables which prevents context variables from being properly "
8181"garbage collected."
8282msgstr ""
83+ "**重要:** "
84+ "コンテキスト変数は、モジュールのトップレベルで生成する必要があり、クロージャの中で作成すべきではありません。:class:`Context` "
85+ "オブジェクトはコンテキスト変数への強参照を持っており、コンテキスト変数がガーベジコレクトされるのを防ぎます。"
8386
8487#: ../../library/contextvars.rst:49
8588msgid "The name of the variable. This is a read-only property."
@@ -178,40 +181,46 @@ msgstr "現在の :class:`~contextvars.Context` オブジェクトのコピー
178181msgid ""
179182"The following snippet gets a copy of the current context and prints all "
180183"variables and their values that are set in it::"
181- msgstr ""
184+ msgstr "次のスニペットは、現在のコンテキストのコピーを取得し、コンテキストに設定されているすべての変数とその値を表示します:: "
182185
183186#: ../../library/contextvars.rst:134
184187msgid ""
185188"The function has an O(1) complexity, i.e. works equally fast for contexts "
186189"with a few context variables and for contexts that have a lot of them."
187190msgstr ""
191+ "この関数の複雑性はO(1) です。つまり、少数のコンテキスト変数を持つコンテキストと多くの変数を持つコンテキストで同程度の速度で動作します。"
188192
189193#: ../../library/contextvars.rst:141
190194msgid "A mapping of :class:`ContextVars <ContextVar>` to their values."
191- msgstr ""
195+ msgstr ":class:`ContextVars` とその値の写像。 "
192196
193197#: ../../library/contextvars.rst:143
194198msgid ""
195199"``Context()`` creates an empty context with no values in it. To get a copy "
196200"of the current context use the :func:`~contextvars.copy_context` function."
197201msgstr ""
202+ "``Context()`` "
203+ "は、値を持たない空のコンテキストを生成します。現在のコンテキストのコピーを得るには、:func:`~contextvars.copy_context` "
204+ "関数を利用します。"
198205
199206#: ../../library/contextvars.rst:147
200207msgid "Context implements the :class:`collections.abc.Mapping` interface."
201- msgstr ""
208+ msgstr "Context は、 :class:`collections.abc.Mapping` インタフェースを実装します。 "
202209
203210#: ../../library/contextvars.rst:151
204211msgid ""
205212"Execute ``callable(*args, **kwargs)`` code in the context object the *run* "
206213"method is called on. Return the result of the execution or propagate an "
207214"exception if one occurred."
208215msgstr ""
216+ "``callable(*args, **kwargs)`` を *run* "
217+ "メソッドが呼ばれたコンテキストオブジェクトの中で実行します。実行した結果を返すか、例外が発生した場合はその例外を伝播します。"
209218
210219#: ../../library/contextvars.rst:155
211220msgid ""
212221"Any changes to any context variables that *callable* makes will be contained"
213222" in the context object::"
214- msgstr ""
223+ msgstr "*callable* が行ったコンテキスト変数へのいかなる変更も、コンテキストオブジェクトに格納されます:: "
215224
216225#: ../../library/contextvars.rst:184
217226msgid ""
@@ -221,7 +230,7 @@ msgstr ""
221230
222231#: ../../library/contextvars.rst:190
223232msgid "Return a shallow copy of the context object."
224- msgstr ""
233+ msgstr "コンテキストオブジェクトの浅いコピーを返します。 "
225234
226235#: ../../library/contextvars.rst:194
227236msgid ""
@@ -234,38 +243,42 @@ msgid ""
234243"Return the value of the *var* :class:`ContextVar` variable. If the variable "
235244"is not set in the context object, a :exc:`KeyError` is raised."
236245msgstr ""
246+ ":class:`ContextVar` *var* "
247+ "の値を返します。コンテキストオブジェクト内で変数が設定されていない場合は、:exc:`KeyError` を送出します。"
237248
238249#: ../../library/contextvars.rst:205
239250msgid ""
240251"Return the value for *var* if *var* has the value in the context object. "
241252"Return *default* otherwise. If *default* is not given, return ``None``."
242253msgstr ""
254+ "*var* がコンテキストオブジェクトの中に値を持てば、その値を返します。さもなければ、*default* を返します。*default* "
255+ "を指定していなければ、``None`` を返します。"
243256
244257#: ../../library/contextvars.rst:211
245258msgid "Return an iterator over the variables stored in the context object."
246- msgstr ""
259+ msgstr "コンテキストオブジェクトに格納されている変数群のイテレータを返します。 "
247260
248261#: ../../library/contextvars.rst:216
249262msgid "Return the number of variables set in the context object."
250- msgstr ""
263+ msgstr "コンテキストオブジェクトに格納されている変数の数を返します。 "
251264
252265#: ../../library/contextvars.rst:220
253266msgid "Return a list of all variables in the context object."
254- msgstr ""
267+ msgstr "コンテキストオブジェクト中のすべての変数のリストを返します。 "
255268
256269#: ../../library/contextvars.rst:224
257270msgid "Return a list of all variables' values in the context object."
258- msgstr ""
271+ msgstr "コンテキストオブジェクト中のすべての変数の値のリストを返します。 "
259272
260273#: ../../library/contextvars.rst:229
261274msgid ""
262275"Return a list of 2-tuples containing all variables and their values in the "
263276"context object."
264- msgstr ""
277+ msgstr "コンテキストオブジェクト中のすべての変数について、変数とその値からなる2要素のタプルのリストを返します。 "
265278
266279#: ../../library/contextvars.rst:234
267280msgid "asyncio support"
268- msgstr ""
281+ msgstr "asyncioサポート "
269282
270283#: ../../library/contextvars.rst:236
271284msgid ""
@@ -274,3 +287,5 @@ msgid ""
274287" server, that uses a context variable to make the address of a remote client"
275288" available in the Task that handles that client::"
276289msgstr ""
290+ "コンテキスト変数は、追加の設定なしに :mod:`asyncio`をサポートします。例えば、次の単純なechoサーバーは、クライアントを扱う Task "
291+ "の中でリモートクライアントのアドレスが利用できるように、コンテキスト変数を利用します::"
0 commit comments